@kubex/zinc 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +89 -2
- package/dist/web-types.json +1 -1
- package/dist/zn.d.ts +8 -0
- package/dist/zn.min.js +183 -154
- package/package.json +1 -1
- package/src/components/content-block/content-block.scss +35 -23
- package/src/components/data-table/data-table.component.ts +128 -27
- package/src/components/data-table/data-table.scss +56 -10
- package/src/components/editor/editor.component.ts +1 -1
- package/src/components/filter-wrapper/filter-wrapper.component.ts +1 -1
- package/src/components/form-group/form-group.component.ts +0 -1
- package/src/components/form-group/form-group.scss +0 -1
- package/src/components/tile/tile.component.ts +3 -1
|
@@ -5526,7 +5526,7 @@
|
|
|
5526
5526
|
"kind": "field",
|
|
5527
5527
|
"name": "_dataTask",
|
|
5528
5528
|
"privacy": "private",
|
|
5529
|
-
"default": "new Task(this, { task: async ([dataUri, requestParams], {signal}) => { if (dataUri === undefined || this.noInitialLoad && this._initialLoad) { return {rows: [], page: 1, perPage: this.itemsPerPage, total: 0}; } if (this.groupBy) { // we want to load all the data possible so we can group and show multiple tables this.itemsPerPage = 1000; } const requestData: DataRequest = { page: this.page, perPage: this.itemsPerPage, sortColumn: this.sortColumn, sortDirection: this.sortDirection, filter: this.filter, }; // get all inputs that are in the inputs slot and add them to the const inputs = this.hasSlotController.getSlots(ActionSlots.inputs.valueOf()); const params: Record<string, any> = {}; if (inputs) { inputs.forEach((input) => { const allowedInputs = ['zn-input', 'zn-select', 'zn-query-builder', 'zn-multiselect', 'zn-params-select', 'input', 'select', 'textarea']; if (allowedInputs.includes(input.tagName.toLowerCase())) { const value = (input as AllowedInputElement).value as string || input.getAttribute('value'); const name = (input as AllowedInputElement).name || input.getAttribute('name'); if (name) { params[name] = value; } } }); Object.assign(requestData, params); } // Add any extra request params if (requestParams && typeof requestParams === 'object') { Object.assign(requestData, requestParams); } // This is also used for Rubix, so it may not work for your application. const response = await fetch(dataUri, { method: this.method, headers: { 'x-kx-fetch-style': 'zn-data-table', }, signal, credentials: 'same-origin', body: this.method === 'POST' ? JSON.stringify(requestData) : undefined }); if (!response.ok) throw new Error(response.statusText); return response.json(); }, args: () => [this.dataUri, this.requestParams] })"
|
|
5529
|
+
"default": "new Task(this, { task: async ([dataUri, requestParams], {signal}) => { if (dataUri === undefined || this.noInitialLoad && this._initialLoad) { return {rows: [], page: 1, perPage: this.itemsPerPage, total: 0}; } if (this.groupBy) { // we want to load all the data possible so we can group and show multiple tables this.itemsPerPage = 1000; } const requestData: DataRequest = { page: this.page, perPage: this.itemsPerPage, sortColumn: this.sortColumn, sortDirection: this.sortDirection, filter: this.filter, }; // get all inputs that are in the inputs slot and add them to the const inputs = this.hasSlotController.getSlots(ActionSlots.inputs.valueOf()); const params: Record<string, any> = {}; if (inputs) { inputs.forEach((input) => { const allowedInputs = ['zn-input', 'zn-select', 'zn-query-builder', 'zn-multiselect', 'zn-params-select', 'zn-datepicker', 'input', 'select', 'textarea']; if (allowedInputs.includes(input.tagName.toLowerCase())) { const value = (input as AllowedInputElement).value as string || input.getAttribute('value'); const name = (input as AllowedInputElement).name || input.getAttribute('name'); if (name) { params[name] = value; } } }); Object.assign(requestData, params); } // Add any extra request params if (requestParams && typeof requestParams === 'object') { Object.assign(requestData, requestParams); } // This is also used for Rubix, so it may not work for your application. const response = await fetch(dataUri, { method: this.method, headers: { 'x-kx-fetch-style': 'zn-data-table', }, signal, credentials: 'same-origin', body: this.method === 'POST' ? JSON.stringify(requestData) : undefined }); if (!response.ok) throw new Error(response.statusText); return response.json(); }, args: () => [this.dataUri, this.requestParams] })"
|
|
5530
5530
|
},
|
|
5531
5531
|
{
|
|
5532
5532
|
"kind": "field",
|
|
@@ -5537,6 +5537,32 @@
|
|
|
5537
5537
|
"privacy": "private",
|
|
5538
5538
|
"default": "false"
|
|
5539
5539
|
},
|
|
5540
|
+
{
|
|
5541
|
+
"kind": "field",
|
|
5542
|
+
"name": "_expandedRows",
|
|
5543
|
+
"type": {
|
|
5544
|
+
"text": "Set<string>"
|
|
5545
|
+
},
|
|
5546
|
+
"privacy": "private",
|
|
5547
|
+
"default": "new Set()"
|
|
5548
|
+
},
|
|
5549
|
+
{
|
|
5550
|
+
"kind": "field",
|
|
5551
|
+
"name": "_hiddenCells",
|
|
5552
|
+
"type": {
|
|
5553
|
+
"text": "Map<string, Cell[]>"
|
|
5554
|
+
},
|
|
5555
|
+
"privacy": "private",
|
|
5556
|
+
"default": "new Map()"
|
|
5557
|
+
},
|
|
5558
|
+
{
|
|
5559
|
+
"kind": "field",
|
|
5560
|
+
"name": "_secondaryHeaders",
|
|
5561
|
+
"type": {
|
|
5562
|
+
"text": "HeaderConfig[]"
|
|
5563
|
+
},
|
|
5564
|
+
"privacy": "private"
|
|
5565
|
+
},
|
|
5540
5566
|
{
|
|
5541
5567
|
"kind": "field",
|
|
5542
5568
|
"name": "requestParams",
|
|
@@ -5773,6 +5799,67 @@
|
|
|
5773
5799
|
}
|
|
5774
5800
|
]
|
|
5775
5801
|
},
|
|
5802
|
+
{
|
|
5803
|
+
"kind": "method",
|
|
5804
|
+
"name": "hasHiddenColumns",
|
|
5805
|
+
"privacy": "private",
|
|
5806
|
+
"return": {
|
|
5807
|
+
"type": {
|
|
5808
|
+
"text": "boolean"
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
},
|
|
5812
|
+
{
|
|
5813
|
+
"kind": "method",
|
|
5814
|
+
"name": "renderExpanderCell",
|
|
5815
|
+
"privacy": "private",
|
|
5816
|
+
"parameters": [
|
|
5817
|
+
{
|
|
5818
|
+
"name": "row",
|
|
5819
|
+
"type": {
|
|
5820
|
+
"text": "Row"
|
|
5821
|
+
}
|
|
5822
|
+
}
|
|
5823
|
+
]
|
|
5824
|
+
},
|
|
5825
|
+
{
|
|
5826
|
+
"kind": "method",
|
|
5827
|
+
"name": "renderDetailsRow",
|
|
5828
|
+
"privacy": "private",
|
|
5829
|
+
"parameters": [
|
|
5830
|
+
{
|
|
5831
|
+
"name": "row",
|
|
5832
|
+
"type": {
|
|
5833
|
+
"text": "Row"
|
|
5834
|
+
}
|
|
5835
|
+
},
|
|
5836
|
+
{
|
|
5837
|
+
"name": "colSpan",
|
|
5838
|
+
"type": {
|
|
5839
|
+
"text": "number"
|
|
5840
|
+
}
|
|
5841
|
+
}
|
|
5842
|
+
]
|
|
5843
|
+
},
|
|
5844
|
+
{
|
|
5845
|
+
"kind": "method",
|
|
5846
|
+
"name": "toggleRowExpansion",
|
|
5847
|
+
"privacy": "private",
|
|
5848
|
+
"parameters": [
|
|
5849
|
+
{
|
|
5850
|
+
"name": "e",
|
|
5851
|
+
"type": {
|
|
5852
|
+
"text": "Event"
|
|
5853
|
+
}
|
|
5854
|
+
},
|
|
5855
|
+
{
|
|
5856
|
+
"name": "row",
|
|
5857
|
+
"type": {
|
|
5858
|
+
"text": "Row"
|
|
5859
|
+
}
|
|
5860
|
+
}
|
|
5861
|
+
]
|
|
5862
|
+
},
|
|
5776
5863
|
{
|
|
5777
5864
|
"kind": "method",
|
|
5778
5865
|
"name": "isRowSelected",
|
|
@@ -26298,7 +26385,7 @@
|
|
|
26298
26385
|
"package": {
|
|
26299
26386
|
"name": "@kubex/zinc",
|
|
26300
26387
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
26301
|
-
"version": "1.0.
|
|
26388
|
+
"version": "1.0.14",
|
|
26302
26389
|
"author": "",
|
|
26303
26390
|
"license": "MIT"
|
|
26304
26391
|
}
|
package/dist/web-types.json
CHANGED
package/dist/zn.d.ts
CHANGED
|
@@ -2600,6 +2600,7 @@ declare module "components/data-table/data-table.component" {
|
|
|
2600
2600
|
filterable?: boolean;
|
|
2601
2601
|
hideHeader?: boolean;
|
|
2602
2602
|
hideColumn?: boolean;
|
|
2603
|
+
secondary?: boolean;
|
|
2603
2604
|
}
|
|
2604
2605
|
/**
|
|
2605
2606
|
* @summary Short summary of the component's intended use.
|
|
@@ -2679,6 +2680,9 @@ declare module "components/data-table/data-table.component" {
|
|
|
2679
2680
|
private hasSlotController;
|
|
2680
2681
|
private _dataTask;
|
|
2681
2682
|
private rowHasActions;
|
|
2683
|
+
private _expandedRows;
|
|
2684
|
+
private _hiddenCells;
|
|
2685
|
+
private _secondaryHeaders;
|
|
2682
2686
|
requestParams: Record<string, any>;
|
|
2683
2687
|
refresh(): void;
|
|
2684
2688
|
render(): TemplateResult<1>;
|
|
@@ -2709,6 +2713,10 @@ declare module "components/data-table/data-table.component" {
|
|
|
2709
2713
|
private getTableSortIcon;
|
|
2710
2714
|
private renderCellHeader;
|
|
2711
2715
|
private renderCellBody;
|
|
2716
|
+
private hasHiddenColumns;
|
|
2717
|
+
private renderExpanderCell;
|
|
2718
|
+
private renderDetailsRow;
|
|
2719
|
+
private toggleRowExpansion;
|
|
2712
2720
|
private isRowSelected;
|
|
2713
2721
|
private getRows;
|
|
2714
2722
|
private getSelectedKeys;
|