0.4.59 • Published 1 year ago

custom-grid-library v0.4.59

Weekly downloads
2,070
License
-
Repository
-
Last release
1 year ago

Custom Grid Library

This package (KUICC: Kendo UI Core Components) provides web component wrappers for Kendo UI Core widgets. All functionalities of Kendo UI Core except AngularJS are supported.

Important Note This package is NOT published by Progress Software Corporation, the owner of Kendo UI frameworks, and so no supports are provided from the company.

Stable version 0.0.83

Features

1. Main component: custom-grid

1.1. dataSource="<<Array_any>>" - The main array over which the grid is build. 1.2. dataSourcePk = "<<Obj_string>>" - Identification key of the dataSource in question. It is used as a unique identifier in the table, to find certain information, as well as to process details at the row level. 1.3. width = "<>", height = "<>" - The basic dimension of the grid. Can be used in pixels, %, em or viewport units. 1.4. overflowX = "<> & overflowY = "<>" - The way of sizing the container in wich the grid is held. It can have 3 values: scroll = scroll inside the grid container when the size of the elements in the grid is larger than the size of the table. hidden = the content of the grid is hidden if the size of the table is smaller than the size of the elements used inside it. * auto = scrolling behavior is set automatically based on the dimensions of the grid, and elements inside it. 1.5. (filters)="<>" - Object containing the filters in the grid's header. 1.6. (triggerFilters) = <>($event) - An event to whom we associate an callback function that will be called hen a filters is completed. The callback function should contain a logic to determin the filtering method. Below is an example of implementation:

filtersHandler(event: any){
    switch (event.filterMethod) {
    case filterMethod.local:
        this.filteredData = this.testData.values;
        let filterObj = event.filters;
        Object.keys(filterObj).forEach((element, index) => {
        var filter: string = Object.values(filterObj)[index] != null ? Object.values(filterObj)[index].toString() : null;
        if (!(filter == "" || filter == null)) {
            this.filteredData = this.testData.values.filter(x => { return x[element] && x[element].toLowerCase().includes(filter.toLowerCase()) });
        }
        });
        break;
    case filterMethod.server:
        console.log("NotImplemented");
        break;
    default: console.log("Invalid filter logic");
        return;
    }
}

1.7. filterMethod = "<>" - This parameter help us differentiate the filtering method: filterMethod.local = filtering will be done on the client-side, with the internal logic, see previous example. filterMethod.server = filtering will be done on the client, the filtering logic being develop server-side, in the example above, in the block for filterMethod.server, the "get" function will be called with the parameters "filters".

1.8. popoverConfiguration = "<>" - Parameter that configures the pop-over at row level. Generic form of the object : popoverConfig = {translation: string, action: string}. Action is an constant to identify witch function should be called. This parameter is used in pair with popoverHandler. An example of implementation is presented below:

popoverHandler(event: any) {
    if (event) {
    switch (event.action) {
        case 'popoverAction-approve':
        this.approve(event.id);
        break;
        case 'popoverAction-reject':
        this.reject(event.id);
        break;
        default: return;
    }
    }      
}

1.9. (scroll) = "<>($event)" - This parameter gives us the possibily to apply the "infinite-scroll" feature. Pay attention!: To use This property we have to make sure our datasource is paged. An example of implementation:

scrollHandler (event: any) {
    if (((window.scrollY + window.innerHeight) * 1.3> = document.body.clientHeight) && this.dataLoaded && this.hasMore) {
    this.simulateApiCall (false); // loadData method
    }
}

1.10. rowHasDetails = "<<Obj_boolean>>" - This parameters determines whether the grid will have the "details expand" feature.

1.11. detailsLoadMethod = "<>" - With this parameter we determine if the row details are provided directly or if a separate method to load details data is needed. server local

1.12. rowDetails = "<>" - Support object that contains the details data's.

1.13. (detailsToggled) = "<>($event)" - This function is called when you expand the details section. eg:

handlerRowToggled(event: string){
    this._dataService.GetDetailsByRowId(event).subscribe(result => {
            this.rowDetails = result;
        });
    }
}

1.14. rowChecable = "<<Obj_boolean>>" - This parameter determines if the grid has the "row-check" feature. If this parameter is set to true, you should provide a support object to bind the selected rows into that.

1.15. (checkedRows) = "<>" - Support object for "row-check" feature.

1.16. disabledRows = "<<Obj_array>>" - Support object to mark the read-only rows in the grid. This array contains the id's dataSourcePK of the rows you want to disable.

1.17. disabledReasons = "<>" - This parameters provide further more informations about disabled rows. eg:

    disabledReasons: any = [
        { title: "ReasonTitle", description: "Reason description" },
        { title: "ReasonTitle2", description: "ReasonDescription2" }
    ]

Secondary component custom-grid-column

2.1. title = "<>" - The title displayed in the grid header. Preferably key in a translation json. 2.2. field = "<<value_string>>" - The name of the column in dataSource, to identify the data displayed in that certain column. 2.3. width = "<>" - This property represents the value of the width of each column. If this property is not set, the columns will be dimensioned according to the width of the grid. 2.4. redirectLink = "<<value_string>>" - The property sets the route you will be redirected at click on that cell. 2.5. columnType = "<> - Sets the column data type displayed: date - calendar date depending on the chosen culture text (default) - string number - decimal number, 2 decimal points ng-switcher

2.6. disabled = "<<Obj_boolean>>" - Read-only at column level.

2.7. stateClasses = "<>" - Sets the specified class based on the evaluation of the expression.

stateClasses = [
    { className: "state-card-approved", expression: "row.stateCode == 'Approved'" },
    { className: "state-card-canceled", expression: "row.stateCode == 'Canceled'" },
    { className: "state-card-pending", expression: "row.stateCode == 'PendingApproval'" },
    { className: "state-card-nostatus", expression: "row.stateCode == 'Initialized'" },
]
with the class: 
.state-card-approved {
    display: inherit;
    width: 113px;  
    border-radius: 6px;
    background-color: rgba(100, 200, 188, 0.1);
    color: #000;
    padding: 6px;
    font-size: 14px;
    text-align: center;
}

2.8. hasPageSizeSelection="<<Obj_boolean>> - If set true, you will be able to choose from a dropdown how many records is showed in the page.

2.9 detailsTitle = "<>" - Details title

2.10 (action) = "<<handlerFunction($event)>> - Callback to an internal function that executes at cell click.

2.11 missingText = "<> - Lable that is displayed if there are no data to display in the cell. If this parameter is not set and theres no data to render then the cell will be empty.

Example of usage:

<div class="list-container">
    <custom-grid [dataSource]="companylistDatasource"
                dataSourcePK="id"
                noDataImg="../../../assets/img/startup.svg"
                (scroll)="scrollHandler()"
                [(filters)]="filters"
                (triggerFilters)="filterHandler($event)"
                [filterMethod]="filterMethod.server"
                [popoverConfiguration]="popoverConfig" 
                (popOver)="popoverHandler($event)"
                [rowHasDetails]="false"
                width="1140px"
                [hasPageSizeSelection] = "true"
    >
        <custom-grid-column [title]="'companyList.name'" field="name" width="166px" redirectLink="company/saveCompany">
        </custom-grid-column>
        <custom-grid-column [title]="'companyList.uniqueIdentifier'" field="uniqueIdentifier" width="170px">
        </custom-grid-column>
        <custom-grid-column [title]="'companyList.address'" field="address" width="170px">
        </custom-grid-column>
        <custom-grid-column [title]="'companyList.contactPerson'" field="contactPerson" width="116px">
        </custom-grid-column>
        <custom-grid-column [title]="'companyList.toActivate'" field="toActivate" width="176px" [hasFilter]="false" [stateClasses]="stateClasses">
        </custom-grid-column>
    </custom-grid>
</div>
0.4.59

1 year ago

0.4.58

1 year ago

0.4.57

1 year ago

0.4.5-5.1

1 year ago

0.4.54

1 year ago

0.4.51

1 year ago

0.4.52

1 year ago

0.4.55

1 year ago

0.4.56

1 year ago

0.4.42

2 years ago

0.4.43

2 years ago

0.4.40

2 years ago

0.4.41

2 years ago

0.4.48

2 years ago

0.4.49

2 years ago

0.4.46

2 years ago

0.4.47

2 years ago

0.4.44

2 years ago

0.4.45

2 years ago

0.4.39

2 years ago

0.4.50

2 years ago

0.4.31

2 years ago

0.4.32

2 years ago

0.4.30

2 years ago

0.4.37

2 years ago

0.4.38

2 years ago

0.4.35

2 years ago

0.4.36

2 years ago

0.4.33

2 years ago

0.4.34

2 years ago

0.4.21

2 years ago

0.4.28

2 years ago

0.4.29

2 years ago

0.4.26

2 years ago

0.4.27

2 years ago

0.4.24

2 years ago

0.4.25

2 years ago

0.4.22

2 years ago

0.4.23

2 years ago

0.4.19

2 years ago

0.4.17

2 years ago

0.4.18

2 years ago

0.4.15

2 years ago

0.4.16

2 years ago

0.4.14

2 years ago

0.4.10

2 years ago

0.4.13

2 years ago

0.4.11

2 years ago

0.4.12

2 years ago

0.4.9

2 years ago

0.3.97

2 years ago

0.3.96

2 years ago

0.3.95

2 years ago

0.3.94

2 years ago

0.3.93

2 years ago

0.3.92

2 years ago

0.3.91

2 years ago

0.3.98

2 years ago

0.4.8

2 years ago

0.3.101

2 years ago

0.3.100

2 years ago

0.3.103

2 years ago

0.3.102

2 years ago

0.3.105

2 years ago

0.3.104

2 years ago

0.3.107

2 years ago

0.3.106

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.7

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.110

2 years ago

0.3.112

2 years ago

0.3.111

2 years ago

0.3.113

2 years ago

0.3.109

2 years ago

0.3.75

2 years ago

0.3.74

2 years ago

0.3.73

2 years ago

0.3.72

2 years ago

0.3.71

2 years ago

0.3.70

2 years ago

0.3.79

2 years ago

0.3.78

2 years ago

0.3.77

2 years ago

0.3.76

2 years ago

0.3.64

2 years ago

0.3.63

2 years ago

0.3.62

2 years ago

0.3.61

2 years ago

0.3.60

3 years ago

0.3.69

2 years ago

0.3.68

2 years ago

0.3.67

2 years ago

0.3.66

2 years ago

0.3.65

2 years ago

0.3.59

3 years ago

0.3.58

3 years ago

0.3.57

3 years ago

0.3.90

2 years ago

0.3.86

2 years ago

0.3.85

2 years ago

0.3.84

2 years ago

0.3.83

2 years ago

0.3.82

2 years ago

0.3.81

2 years ago

0.3.80

2 years ago

0.3.89

2 years ago

0.3.88

2 years ago

0.3.87

2 years ago

0.3.53

3 years ago

0.3.52

3 years ago

0.3.51

3 years ago

0.3.50

3 years ago

0.3.56

3 years ago

0.3.55

3 years ago

0.3.54

3 years ago

0.3.42

3 years ago

0.3.41

3 years ago

0.3.40

3 years ago

0.3.49

3 years ago

0.3.48

3 years ago

0.3.47

3 years ago

0.3.46

3 years ago

0.3.45

3 years ago

0.3.44

3 years ago

0.3.43

3 years ago

0.3.39

3 years ago

0.3.38

3 years ago

0.3.37

3 years ago

0.3.36

3 years ago

0.3.35

3 years ago

0.3.34

3 years ago

0.3.33

3 years ago

0.3.31

3 years ago

0.3.30

3 years ago

0.3.32

3 years ago

0.3.29

3 years ago

0.3.28

3 years ago

0.3.27

3 years ago

0.3.26

3 years ago

0.3.25

3 years ago

0.3.24

3 years ago

0.3.23

3 years ago

0.3.22

3 years ago

0.3.20

3 years ago

0.3.21

3 years ago

0.3.19

3 years ago

0.3.18

3 years ago

0.3.17

3 years ago

0.3.16

3 years ago

0.3.9

3 years ago

0.3.15

3 years ago

0.3.14

3 years ago

0.3.13

3 years ago

0.3.12

3 years ago

0.3.11

3 years ago

0.3.10

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.2.96

3 years ago

0.2.95

3 years ago

0.2.94

3 years ago

0.2.93

3 years ago

0.2.92

3 years ago

0.2.91

3 years ago

0.2.99

3 years ago

0.2.98

3 years ago

0.2.97

3 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.1.96

3 years ago

0.1.97

3 years ago

0.1.98

3 years ago

0.1.99

3 years ago

0.1.90

3 years ago

0.1.91

3 years ago

0.1.92

3 years ago

0.1.93

3 years ago

0.1.94

3 years ago

0.1.95

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.1.87

3 years ago

0.1.88

3 years ago

0.1.89

3 years ago

0.1.86

3 years ago

0.1.85

3 years ago

0.1.84

3 years ago

0.1.83

3 years ago

0.1.80

3 years ago

0.1.81

3 years ago

0.1.82

3 years ago

0.1.74

3 years ago

0.1.75

3 years ago

0.1.76

3 years ago

0.1.77

3 years ago

0.1.78

3 years ago

0.1.70

3 years ago

0.1.71

3 years ago

0.1.72

3 years ago

0.1.73

3 years ago

0.1.68

3 years ago

0.1.69

3 years ago

0.1.63

3 years ago

0.1.64

3 years ago

0.1.65

3 years ago

0.1.66

3 years ago

0.1.67

3 years ago

0.1.60

3 years ago

0.1.61

3 years ago

0.1.62

3 years ago

0.1.52

3 years ago

0.1.53

3 years ago

0.1.54

3 years ago

0.1.55

3 years ago

0.1.56

3 years ago

0.1.57

3 years ago

0.1.58

3 years ago

0.1.59

3 years ago

0.1.50

3 years ago

0.1.51

3 years ago

0.1.49

3 years ago

0.1.43

3 years ago

0.1.44

3 years ago

0.1.45

3 years ago

0.1.46

3 years ago

0.1.47

3 years ago

0.1.48

3 years ago

0.1.42

3 years ago

0.1.41

3 years ago

0.1.40

3 years ago

0.1.38

3 years ago

0.1.39

3 years ago

0.1.36

3 years ago

0.1.37

3 years ago

0.1.32

3 years ago

0.1.33

3 years ago

0.1.34

3 years ago

0.1.35

3 years ago

0.1.31

3 years ago

0.1.30

3 years ago

0.1.27

3 years ago

0.1.28

3 years ago

0.1.29

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.1.25

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago

0.1.16

3 years ago

0.1.17

3 years ago

0.1.18

3 years ago

0.1.19

3 years ago

0.1.15

3 years ago

0.0.100

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.0.98

3 years ago

0.0.99

3 years ago

0.0.87

3 years ago

0.0.88

3 years ago

0.0.89

3 years ago

0.0.95

3 years ago

0.0.96

3 years ago

0.0.97

3 years ago

0.0.90

3 years ago

0.0.91

3 years ago

0.0.92

3 years ago

0.0.93

3 years ago

0.0.94

3 years ago

0.0.84

3 years ago

0.0.85

3 years ago

0.0.86

3 years ago

0.0.80

3 years ago

0.0.81

3 years ago

0.0.82

3 years ago

0.0.83

3 years ago

0.0.76

3 years ago

0.0.77

3 years ago

0.0.78

3 years ago

0.0.79

3 years ago

0.0.75

3 years ago

0.0.73

3 years ago

0.0.74

3 years ago

0.0.70

3 years ago

0.0.71

3 years ago

0.0.72

3 years ago

0.0.62

3 years ago

0.0.63

3 years ago

0.0.64

3 years ago

0.0.65

3 years ago

0.0.66

3 years ago

0.0.67

3 years ago

0.0.68

3 years ago

0.0.69

3 years ago

0.0.60

3 years ago

0.0.61

3 years ago

0.0.59

3 years ago

0.0.56

3 years ago

0.0.57

3 years ago

0.0.58

3 years ago

0.0.55

3 years ago

0.0.53

3 years ago

0.0.54

3 years ago

0.0.52

3 years ago

0.0.51

3 years ago

0.0.50

3 years ago

0.0.49

3 years ago

0.0.48

3 years ago

0.0.47

3 years ago

0.0.46

3 years ago

0.0.45

3 years ago

0.0.44

3 years ago

0.0.43

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.40

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.39

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.32

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.25

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago