@limetech/lime-elements 35.0.0-next.3 → 35.0.0-next.32
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/cjs/checkbox.template-7e3fd86a.js +43 -0
- package/dist/cjs/{component-f7ef9087.js → component-66df95e7.js} +190 -132
- package/dist/cjs/{component-f532119f.js → component-67144c1c.js} +47 -3
- package/dist/cjs/{component-ed21410d.js → component-ae3bfacf.js} +367 -235
- package/dist/cjs/{component-2faaa141.js → component-cf490570.js} +213 -143
- package/dist/cjs/{component-10dbdd60.js → component-dd795ff0.js} +7 -5
- package/dist/cjs/{index-e63a89d7.js → index-43283636.js} +23 -0
- package/dist/cjs/lime-elements.cjs.js +3 -3
- package/dist/cjs/limel-badge.cjs.entry.js +3 -3
- package/dist/cjs/limel-banner.cjs.entry.js +1 -1
- package/dist/cjs/limel-button-group.cjs.entry.js +2 -2
- package/dist/cjs/limel-button.cjs.entry.js +2 -2
- package/dist/cjs/limel-checkbox.cjs.entry.js +135 -89
- package/dist/cjs/limel-chip-set.cjs.entry.js +234 -190
- package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
- package/dist/cjs/limel-code-editor.cjs.entry.js +49 -22
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-config.cjs.entry.js +1 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +5 -5
- package/dist/cjs/limel-dialog.cjs.entry.js +8 -9
- package/dist/cjs/limel-file.cjs.entry.js +5 -5
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +972 -648
- package/dist/cjs/limel-flex-container.cjs.entry.js +5 -1
- package/dist/cjs/limel-form.cjs.entry.js +382 -355
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +1 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +5 -5
- package/dist/cjs/limel-icon.cjs.entry.js +1 -1
- package/dist/cjs/limel-input-field.cjs.entry.js +9 -8
- package/dist/cjs/limel-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/limel-list_3.cjs.entry.js +147 -88
- package/dist/cjs/limel-menu-list.cjs.entry.js +86 -73
- package/dist/cjs/limel-menu.cjs.entry.js +1 -1
- package/dist/cjs/limel-picker.cjs.entry.js +3 -6
- package/dist/cjs/limel-popover-surface.cjs.entry.js +2 -2
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
- package/dist/cjs/limel-select.cjs.entry.js +5 -5
- package/dist/cjs/limel-slider.cjs.entry.js +33 -6
- package/dist/cjs/limel-snackbar.cjs.entry.js +78 -72
- package/dist/cjs/limel-spinner.cjs.entry.js +1 -1
- package/dist/cjs/limel-switch.cjs.entry.js +497 -201
- package/dist/cjs/limel-tab-bar.cjs.entry.js +262 -185
- package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +375 -12
- package/dist/cjs/limel-tooltip_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/badge/badge.css +9 -15
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/button/button.css +333 -145
- package/dist/collection/components/button-group/button-group.css +30 -5
- package/dist/collection/components/checkbox/checkbox.css +70 -17
- package/dist/collection/components/checkbox/checkbox.js +5 -4
- package/dist/collection/components/checkbox/checkbox.template.js +24 -20
- package/dist/collection/components/chip-set/chip-set.css +367 -34
- package/dist/collection/components/circular-progress/circular-progress.css +2 -2
- package/dist/collection/components/code-editor/code-editor.css +8 -13
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +1 -1
- package/dist/collection/components/dialog/dialog.css +153 -109
- package/dist/collection/components/dialog/dialog.js +7 -0
- package/dist/collection/components/flex-container/flex-container.js +10 -0
- package/dist/collection/components/form/form.css +5 -1
- package/dist/collection/components/form/form.js +34 -0
- package/dist/collection/components/form/templates/common.js +4 -1
- package/dist/collection/components/icon-button/icon-button.css +116 -59
- package/dist/collection/components/icon-button/icon-button.js +1 -0
- package/dist/collection/components/input-field/input-field.css +344 -29
- package/dist/collection/components/input-field/input-field.js +3 -2
- package/dist/collection/components/linear-progress/linear-progress.css +14 -2
- package/dist/collection/components/list/list-renderer.js +1 -4
- package/dist/collection/components/list/list.css +937 -90
- package/dist/collection/components/list/list.js +13 -6
- package/dist/collection/components/menu-list/menu-list-renderer.js +1 -4
- package/dist/collection/components/menu-list/menu-list.css +937 -90
- package/dist/collection/components/menu-surface/menu-surface.css +31 -7
- package/dist/collection/components/picker/picker.js +4 -6
- package/dist/collection/components/popover-surface/popover-surface.css +1 -0
- package/dist/collection/components/select/select.css +424 -17
- package/dist/collection/components/select/select.template.js +1 -1
- package/dist/collection/components/slider/slider.css +49 -2
- package/dist/collection/components/snackbar/snackbar.css +588 -301
- package/dist/collection/components/switch/switch.css +592 -222
- package/dist/collection/components/switch/switch.js +18 -12
- package/dist/collection/components/tab-bar/tab-bar.css +77 -48
- package/dist/collection/components/table/columns.js +1 -1
- package/dist/collection/components/table/selection.js +111 -0
- package/dist/collection/components/table/table-selection.js +125 -0
- package/dist/collection/components/table/table.css +275 -141
- package/dist/collection/components/table/table.js +231 -13
- package/dist/collection/style/functions.scss +3 -1
- package/dist/collection/style/internal/lime-theme.scss +30 -31
- package/dist/collection/style/internal/lime-typography.scss +55 -56
- package/dist/collection/style/internal/z-index.scss +2 -1
- package/dist/esm/checkbox.template-e68ade4d.js +41 -0
- package/dist/esm/{component-89e0ce26.js → component-19eb6e2b.js} +7 -5
- package/dist/esm/{component-2630c3d7.js → component-288691f3.js} +367 -235
- package/dist/esm/{component-d682c974.js → component-410aad5a.js} +44 -4
- package/dist/esm/{component-429e92ee.js → component-5b4ac85a.js} +213 -143
- package/dist/esm/{component-2eb4e07b.js → component-fffa3419.js} +191 -133
- package/dist/esm/{index-2316f345.js → index-4456d4ad.js} +23 -0
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-badge.entry.js +3 -3
- package/dist/esm/limel-banner.entry.js +1 -1
- package/dist/esm/limel-button-group.entry.js +2 -2
- package/dist/esm/limel-button.entry.js +2 -2
- package/dist/esm/limel-checkbox.entry.js +136 -90
- package/dist/esm/limel-chip-set.entry.js +234 -190
- package/dist/esm/limel-circular-progress.entry.js +2 -2
- package/dist/esm/limel-code-editor.entry.js +49 -22
- package/dist/esm/limel-collapsible-section.entry.js +1 -1
- package/dist/esm/limel-color-picker-palette_2.entry.js +1 -1
- package/dist/esm/limel-color-picker.entry.js +1 -1
- package/dist/esm/limel-config.entry.js +1 -1
- package/dist/esm/limel-date-picker.entry.js +5 -5
- package/dist/esm/limel-dialog.entry.js +8 -9
- package/dist/esm/limel-file.entry.js +5 -5
- package/dist/esm/limel-flatpickr-adapter.entry.js +972 -648
- package/dist/esm/limel-flex-container.entry.js +5 -1
- package/dist/esm/limel-form.entry.js +383 -356
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-icon-button.entry.js +5 -5
- package/dist/esm/limel-icon.entry.js +1 -1
- package/dist/esm/limel-input-field.entry.js +9 -8
- package/dist/esm/limel-linear-progress.entry.js +4 -4
- package/dist/esm/limel-list_3.entry.js +148 -89
- package/dist/esm/limel-menu-list.entry.js +87 -74
- package/dist/esm/limel-menu.entry.js +1 -1
- package/dist/esm/limel-picker.entry.js +3 -6
- package/dist/esm/limel-popover-surface.entry.js +2 -2
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js +1 -1
- package/dist/esm/limel-select.entry.js +5 -5
- package/dist/esm/limel-slider.entry.js +34 -7
- package/dist/esm/limel-snackbar.entry.js +78 -72
- package/dist/esm/limel-spinner.entry.js +1 -1
- package/dist/esm/limel-switch.entry.js +497 -201
- package/dist/esm/limel-tab-bar.entry.js +262 -185
- package/dist/esm/limel-tab-panel.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +375 -12
- package/dist/esm/limel-tooltip_2.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{util-71a23335.js → util-f1bde91c.js} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-a4c532a7.entry.js → p-00d485d8.entry.js} +1 -1
- package/dist/lime-elements/p-062a9599.entry.js +131 -0
- package/dist/lime-elements/p-0c5655e2.js +1 -0
- package/dist/lime-elements/{p-597cbe05.entry.js → p-0ea1cbf6.entry.js} +1 -1
- package/dist/lime-elements/p-1bacecd5.entry.js +73 -0
- package/dist/lime-elements/p-1c284626.js +73 -0
- package/dist/lime-elements/p-1fef7a86.entry.js +16 -0
- package/dist/lime-elements/{p-a2cf74c1.entry.js → p-255084bd.entry.js} +1 -1
- package/dist/lime-elements/{p-e881e98d.entry.js → p-2550ff27.entry.js} +1 -1
- package/dist/lime-elements/p-2a7c3c07.entry.js +1 -0
- package/dist/lime-elements/{p-31fecf5d.entry.js → p-3bef288b.entry.js} +1 -1
- package/dist/lime-elements/{p-58cbe99d.entry.js → p-3f440859.entry.js} +1 -1
- package/dist/lime-elements/{p-4b5af81b.entry.js → p-41ec08c9.entry.js} +1 -1
- package/dist/lime-elements/{p-92146da6.js → p-44f9b6d5.js} +0 -0
- package/dist/lime-elements/{p-1fb5340d.entry.js → p-45689f25.entry.js} +1 -1
- package/dist/lime-elements/p-47ef0ebb.entry.js +1 -0
- package/dist/lime-elements/{p-076bd4dc.js → p-48d4ef20.js} +3 -3
- package/dist/lime-elements/p-4e9869f4.entry.js +126 -0
- package/dist/lime-elements/{p-6003f817.entry.js → p-549190f6.entry.js} +1 -1
- package/dist/lime-elements/p-63516991.entry.js +1 -0
- package/dist/lime-elements/p-6fc9a0be.entry.js +59 -0
- package/dist/lime-elements/{p-64549ba6.entry.js → p-70a4d004.entry.js} +3 -3
- package/dist/lime-elements/p-7d4eb67f.entry.js +1 -0
- package/dist/lime-elements/p-87a8afd2.entry.js +16 -0
- package/dist/lime-elements/{p-714fde78.entry.js → p-897a7f8a.entry.js} +1 -1
- package/dist/lime-elements/{p-fc30b8e3.entry.js → p-8a5ca741.entry.js} +1 -1
- package/dist/lime-elements/{p-8a2c1038.entry.js → p-9607b6f9.entry.js} +2 -2
- package/dist/lime-elements/p-9caf28bd.entry.js +1 -0
- package/dist/lime-elements/{p-152a6d5f.js → p-9faad6eb.js} +1 -1
- package/dist/lime-elements/{p-34c7872e.entry.js → p-a35e6b8a.entry.js} +1 -1
- package/dist/lime-elements/{p-13f0e4f4.entry.js → p-ab88cc76.entry.js} +1 -1
- package/dist/lime-elements/{p-041ae00c.entry.js → p-b808ba3d.entry.js} +1 -1
- package/dist/lime-elements/p-bcaa25e1.entry.js +1 -0
- package/dist/lime-elements/p-be351178.entry.js +37 -0
- package/dist/lime-elements/p-c40f5030.entry.js +82 -0
- package/dist/lime-elements/p-c4e2eb42.entry.js +1 -0
- package/dist/lime-elements/{p-1876a96a.entry.js → p-c5168bda.entry.js} +1 -1
- package/dist/lime-elements/p-cbc43682.js +81 -0
- package/dist/lime-elements/{p-ace9affc.js → p-d0a7de87.js} +2 -2
- package/dist/lime-elements/{p-be56ffab.entry.js → p-d5f17adb.entry.js} +1 -1
- package/dist/lime-elements/p-d70f1c00.entry.js +59 -0
- package/dist/lime-elements/{p-8ad5e143.entry.js → p-dd62c71b.entry.js} +1 -1
- package/dist/lime-elements/p-dfba92de.js +126 -0
- package/dist/lime-elements/p-e320ba6a.entry.js +1 -0
- package/dist/lime-elements/p-e55144ec.entry.js +1 -0
- package/dist/lime-elements/p-e66816a4.entry.js +82 -0
- package/dist/lime-elements/{p-dfe0a58b.entry.js → p-e6f39a71.entry.js} +1 -1
- package/dist/lime-elements/p-f777d8a3.entry.js +82 -0
- package/dist/lime-elements/style/functions.scss +3 -1
- package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
- package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
- package/dist/lime-elements/style/internal/z-index.scss +2 -1
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +3 -2
- package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
- package/dist/types/components/dialog/dialog.d.ts +7 -0
- package/dist/types/components/flex-container/flex-container.d.ts +7 -0
- package/dist/types/components/form/form.d.ts +8 -1
- package/dist/types/components/form/form.types.d.ts +6 -0
- package/dist/types/components/picker/picker.d.ts +2 -1
- package/dist/types/components/switch/switch.d.ts +2 -2
- package/dist/types/components/table/columns.d.ts +7 -0
- package/dist/types/components/table/selection.d.ts +79 -0
- package/dist/types/components/table/table-selection.d.ts +57 -0
- package/dist/types/components/table/table.d.ts +41 -7
- package/dist/types/components/table/table.types.d.ts +13 -0
- package/dist/types/components.d.ts +44 -4
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/package.json +22 -22
- package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
- package/dist/esm/checkbox.template-50f7c07b.js +0 -37
- package/dist/lime-elements/p-0ce9165f.entry.js +0 -1
- package/dist/lime-elements/p-0fd208f3.entry.js +0 -82
- package/dist/lime-elements/p-143705b1.entry.js +0 -1
- package/dist/lime-elements/p-250f55be.js +0 -1
- package/dist/lime-elements/p-29f054cc.entry.js +0 -37
- package/dist/lime-elements/p-31299106.js +0 -126
- package/dist/lime-elements/p-468e940e.entry.js +0 -16
- package/dist/lime-elements/p-4932c029.entry.js +0 -1
- package/dist/lime-elements/p-510bb5a4.entry.js +0 -1
- package/dist/lime-elements/p-668795a7.js +0 -73
- package/dist/lime-elements/p-6cfb45a1.entry.js +0 -1
- package/dist/lime-elements/p-7476efe0.entry.js +0 -1
- package/dist/lime-elements/p-902347b9.js +0 -81
- package/dist/lime-elements/p-90f3e17c.entry.js +0 -37
- package/dist/lime-elements/p-96e44a1e.entry.js +0 -82
- package/dist/lime-elements/p-b2a8cb31.entry.js +0 -59
- package/dist/lime-elements/p-bc0dcf01.entry.js +0 -73
- package/dist/lime-elements/p-c35874db.entry.js +0 -1
- package/dist/lime-elements/p-c8c8a946.entry.js +0 -59
- package/dist/lime-elements/p-ca664c9f.entry.js +0 -1
- package/dist/lime-elements/p-d2c74396.entry.js +0 -1
- package/dist/lime-elements/p-d48ad9f7.entry.js +0 -126
- package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
- package/dist/lime-elements/p-f2c706b8.entry.js +0 -131
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import Tabulator from 'tabulator-tables';
|
|
3
|
+
import { ElementPool } from './element-pool';
|
|
4
|
+
/**
|
|
5
|
+
* Provides row selection to Tabulator with shift-click support for range selections
|
|
6
|
+
*/
|
|
7
|
+
export declare class TableSelection {
|
|
8
|
+
private getTable;
|
|
9
|
+
private pool;
|
|
10
|
+
private selectEvent;
|
|
11
|
+
private selection;
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of the TableSelection class
|
|
14
|
+
*
|
|
15
|
+
* @param {Function} getTable Function that returns the Tabulator instance
|
|
16
|
+
* @param {ElementPool} pool The element pool used to cache the checkbox components
|
|
17
|
+
* @param {EventEmitter<object[]>} selectEvent The event emitter to use when checkboxes are toggled
|
|
18
|
+
*/
|
|
19
|
+
constructor(getTable: () => Tabulator, pool: ElementPool, selectEvent: EventEmitter<object[]>);
|
|
20
|
+
/**
|
|
21
|
+
* @returns {boolean} Returns `true` when the selection is non-empty, otherwise `false`
|
|
22
|
+
*/
|
|
23
|
+
get hasSelection(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Clears the selection
|
|
26
|
+
*/
|
|
27
|
+
clear(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the selected items
|
|
30
|
+
*
|
|
31
|
+
* @param {any[]} data The selected items
|
|
32
|
+
*/
|
|
33
|
+
setSelection(data: any[]): void;
|
|
34
|
+
/**
|
|
35
|
+
* Prepends a checkbox column used for row selection to the given column definitions
|
|
36
|
+
*
|
|
37
|
+
* @param {Tabulator.ColumnDefinition[]} columnDefinitions The column definition for the table
|
|
38
|
+
* @returns {Tabulator.ColumnDefinition[]} The column definitions with the checkbox column prepended to it
|
|
39
|
+
*/
|
|
40
|
+
getColumnDefinitions(columnDefinitions: Tabulator.ColumnDefinition[]): Tabulator.ColumnDefinition[];
|
|
41
|
+
private getRowSelectorColumnDefinition;
|
|
42
|
+
private headerClick;
|
|
43
|
+
private getRowSelectorFormatter;
|
|
44
|
+
/**
|
|
45
|
+
* Tabulator cell click handler that updates the selection for the clicked
|
|
46
|
+
* row and toggles the selection from the last clicked row if the shift key
|
|
47
|
+
* is pressed down.
|
|
48
|
+
*
|
|
49
|
+
* @param {PointerEvent} ev The pointer event
|
|
50
|
+
* @param {Tabulator.CellComponent} cell The clicked cell component
|
|
51
|
+
*/
|
|
52
|
+
protected rowSelectorCellClick: (ev: PointerEvent, cell: Tabulator.CellComponent) => void;
|
|
53
|
+
private updateRowSelectors;
|
|
54
|
+
private updateRowSelector;
|
|
55
|
+
private getActiveRows;
|
|
56
|
+
private getRowByIndex;
|
|
57
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { Column, TableParams, ColumnSorter } from './table.types';
|
|
2
|
+
import { Column, TableParams, ColumnSorter, ColumnAggregate } from './table.types';
|
|
3
3
|
/**
|
|
4
4
|
* @exampleComponent limel-example-table
|
|
5
5
|
* @exampleComponent limel-example-table-custom-components
|
|
@@ -8,6 +8,7 @@ import { Column, TableParams, ColumnSorter } from './table.types';
|
|
|
8
8
|
* @exampleComponent limel-example-table-local
|
|
9
9
|
* @exampleComponent limel-example-table-remote
|
|
10
10
|
* @exampleComponent limel-example-table-activate-row
|
|
11
|
+
* @exampleComponent limel-example-table-selectable-rows
|
|
11
12
|
* @exampleComponent limel-example-table-default-sorted
|
|
12
13
|
* @exampleComponent limel-example-table-low-density
|
|
13
14
|
*/
|
|
@@ -67,6 +68,18 @@ export declare class Table {
|
|
|
67
68
|
* A message to display when the table has no data
|
|
68
69
|
*/
|
|
69
70
|
emptyMessage: string;
|
|
71
|
+
/**
|
|
72
|
+
* Column aggregates to be displayed in the table
|
|
73
|
+
*/
|
|
74
|
+
aggregates: ColumnAggregate[];
|
|
75
|
+
/**
|
|
76
|
+
* Enables row selection
|
|
77
|
+
*/
|
|
78
|
+
selectable: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Selected data. Requires `selectable` to be true.
|
|
81
|
+
*/
|
|
82
|
+
selection: object[];
|
|
70
83
|
/**
|
|
71
84
|
* Emitted when `mode` is `remote` and the table is loading new data. The
|
|
72
85
|
* consumer is responsible for giving the table new data
|
|
@@ -80,6 +93,14 @@ export declare class Table {
|
|
|
80
93
|
* Emitted when the columns have been changed
|
|
81
94
|
*/
|
|
82
95
|
changeColumns: EventEmitter<Column[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Emitted when the row selection has been changed
|
|
98
|
+
*/
|
|
99
|
+
select: EventEmitter<object[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Emitted when the select all rows state is toggled
|
|
102
|
+
*/
|
|
103
|
+
selectAll: EventEmitter<boolean>;
|
|
83
104
|
private host;
|
|
84
105
|
private currentLoad;
|
|
85
106
|
private tabulator;
|
|
@@ -87,23 +108,31 @@ export declare class Table {
|
|
|
87
108
|
private columnFactory;
|
|
88
109
|
private firstRequest;
|
|
89
110
|
private currentSorting;
|
|
111
|
+
private tableSelection;
|
|
90
112
|
constructor();
|
|
91
113
|
componentWillLoad(): void;
|
|
92
114
|
componentDidLoad(): void;
|
|
93
115
|
disconnectedCallback(): void;
|
|
94
|
-
totalRowsChanged(): void;
|
|
95
|
-
pageSizeChanged(): void;
|
|
96
|
-
pageChanged(): void;
|
|
97
|
-
activeRowChanged(): void;
|
|
98
|
-
updateData(newData?: any[], oldData?: any[]): void;
|
|
99
|
-
updateColumns(newColumns: Column[], oldColumns: Column[]): void;
|
|
116
|
+
protected totalRowsChanged(): void;
|
|
117
|
+
protected pageSizeChanged(): void;
|
|
118
|
+
protected pageChanged(): void;
|
|
119
|
+
protected activeRowChanged(): void;
|
|
120
|
+
protected updateData(newData?: any[], oldData?: any[]): void;
|
|
121
|
+
protected updateColumns(newColumns: Column[], oldColumns: Column[]): void;
|
|
122
|
+
protected updateAggregates(newAggregates: ColumnAggregate[], oldAggregates: ColumnAggregate[]): void;
|
|
123
|
+
protected updateSelection(newSelection: any[]): void;
|
|
124
|
+
protected updateSelectable(): void;
|
|
100
125
|
private areSameColumns;
|
|
126
|
+
private haveSameAggregateFields;
|
|
101
127
|
private init;
|
|
102
128
|
private initTabulatorComponent;
|
|
129
|
+
private initTableSelection;
|
|
130
|
+
private setSelection;
|
|
103
131
|
private updateMaxPage;
|
|
104
132
|
private getOptions;
|
|
105
133
|
private getColumnSorter;
|
|
106
134
|
private getColumnDefinitions;
|
|
135
|
+
private addColumnAggregator;
|
|
107
136
|
private getAjaxOptions;
|
|
108
137
|
private handleAjaxRequesting;
|
|
109
138
|
private getPaginationOptions;
|
|
@@ -112,6 +141,10 @@ export declare class Table {
|
|
|
112
141
|
private handleDataSorting;
|
|
113
142
|
private handlePageLoaded;
|
|
114
143
|
private onClickRow;
|
|
144
|
+
private getActiveRows;
|
|
145
|
+
private getActiveRowsData;
|
|
146
|
+
private selectAllOnChange;
|
|
147
|
+
private formatRows;
|
|
115
148
|
private formatRow;
|
|
116
149
|
private calculatePageCount;
|
|
117
150
|
private hasAggregation;
|
|
@@ -119,5 +152,6 @@ export declare class Table {
|
|
|
119
152
|
private handleMoveColumn;
|
|
120
153
|
private findColumn;
|
|
121
154
|
render(): any;
|
|
155
|
+
private renderSelectAll;
|
|
122
156
|
private renderEmptyMessage;
|
|
123
157
|
}
|
|
@@ -130,3 +130,16 @@ export declare enum ColumnAggregatorType {
|
|
|
130
130
|
* @returns {*} the aggregated data
|
|
131
131
|
*/
|
|
132
132
|
export declare type ColumnAggregatorFunction<T = object> = (column?: Column, values?: any[], data?: T[]) => any;
|
|
133
|
+
/**
|
|
134
|
+
* Defines aggregate values for columns
|
|
135
|
+
*/
|
|
136
|
+
export interface ColumnAggregate {
|
|
137
|
+
/**
|
|
138
|
+
* The name of the `Column` field
|
|
139
|
+
*/
|
|
140
|
+
field: string;
|
|
141
|
+
/**
|
|
142
|
+
* The aggregate value
|
|
143
|
+
*/
|
|
144
|
+
value: any;
|
|
145
|
+
}
|
|
@@ -10,14 +10,14 @@ import { Action as Action1, Chip, DateType, DialogHeading, FileInfo, FlexContain
|
|
|
10
10
|
import { CircularProgressSize } from "./components/circular-progress/circular-progress.types";
|
|
11
11
|
import { ColorScheme, Language } from "./components/code-editor/code-editor.types";
|
|
12
12
|
import { Action } from "./components/collapsible-section/action";
|
|
13
|
-
import { FormError, ValidationStatus } from "./components/form/form.types";
|
|
13
|
+
import { FormError, ValidationError, ValidationStatus } from "./components/form/form.types";
|
|
14
14
|
import { IconSize } from "./components/icon/icon.types";
|
|
15
15
|
import { InputType } from "./components/input-field/input-field.types";
|
|
16
16
|
import { ActionPosition, ActionScrollBehavior } from "./components/picker/actions.types";
|
|
17
17
|
import { OpenDirection as OpenDirection1 } from "./components/menu/menu.types";
|
|
18
18
|
import { FlowItem } from "./components/progress-flow/progress-flow.types";
|
|
19
19
|
import { Tab } from "./components/tab-bar/tab.types";
|
|
20
|
-
import { Column, ColumnSorter, TableParams } from "./components/table/table.types";
|
|
20
|
+
import { Column, ColumnAggregate, ColumnSorter, TableParams } from "./components/table/table.types";
|
|
21
21
|
export namespace Components {
|
|
22
22
|
interface LimelBadge {
|
|
23
23
|
/**
|
|
@@ -101,7 +101,7 @@ export namespace Components {
|
|
|
101
101
|
*/
|
|
102
102
|
"label": string;
|
|
103
103
|
/**
|
|
104
|
-
* Disables the checkbox when `true`.
|
|
104
|
+
* Disables the checkbox when `true`. This visualizes the checkbox slightly differently. But shows no visual sign indicating that the checkbox is disabled or can ever become interactable.
|
|
105
105
|
*/
|
|
106
106
|
"readonly": boolean;
|
|
107
107
|
/**
|
|
@@ -430,6 +430,10 @@ export namespace Components {
|
|
|
430
430
|
* Set to `true` to disable the whole form.
|
|
431
431
|
*/
|
|
432
432
|
"disabled": boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Extra errors to display in the form. Typical use case is asynchronous errors generated server side.
|
|
435
|
+
*/
|
|
436
|
+
"errors": ValidationError;
|
|
433
437
|
/**
|
|
434
438
|
* Factory for creating properties for custom form components When using custom components in the form some properties might have to be set dynamically. If this factory is set, it will be called with the current schema for the field for each custom component in the form. The factory must return an object where each key is the name of the property that should be set, along with its value.
|
|
435
439
|
*/
|
|
@@ -965,6 +969,10 @@ export namespace Components {
|
|
|
965
969
|
* Active row in the table
|
|
966
970
|
*/
|
|
967
971
|
"activeRow": object;
|
|
972
|
+
/**
|
|
973
|
+
* Column aggregates to be displayed in the table
|
|
974
|
+
*/
|
|
975
|
+
"aggregates": ColumnAggregate[];
|
|
968
976
|
/**
|
|
969
977
|
* Columns used to display the data
|
|
970
978
|
*/
|
|
@@ -997,6 +1005,14 @@ export namespace Components {
|
|
|
997
1005
|
* Number of rows per page
|
|
998
1006
|
*/
|
|
999
1007
|
"pageSize": number;
|
|
1008
|
+
/**
|
|
1009
|
+
* Enables row selection
|
|
1010
|
+
*/
|
|
1011
|
+
"selectable": boolean;
|
|
1012
|
+
/**
|
|
1013
|
+
* Selected data. Requires `selectable` to be true.
|
|
1014
|
+
*/
|
|
1015
|
+
"selection": object[];
|
|
1000
1016
|
/**
|
|
1001
1017
|
* The initial sorted columns
|
|
1002
1018
|
*/
|
|
@@ -1434,7 +1450,7 @@ declare namespace LocalJSX {
|
|
|
1434
1450
|
*/
|
|
1435
1451
|
"onChange"?: (event: CustomEvent<boolean>) => void;
|
|
1436
1452
|
/**
|
|
1437
|
-
* Disables the checkbox when `true`.
|
|
1453
|
+
* Disables the checkbox when `true`. This visualizes the checkbox slightly differently. But shows no visual sign indicating that the checkbox is disabled or can ever become interactable.
|
|
1438
1454
|
*/
|
|
1439
1455
|
"readonly"?: boolean;
|
|
1440
1456
|
/**
|
|
@@ -1815,6 +1831,10 @@ declare namespace LocalJSX {
|
|
|
1815
1831
|
* Set to `true` to disable the whole form.
|
|
1816
1832
|
*/
|
|
1817
1833
|
"disabled"?: boolean;
|
|
1834
|
+
/**
|
|
1835
|
+
* Extra errors to display in the form. Typical use case is asynchronous errors generated server side.
|
|
1836
|
+
*/
|
|
1837
|
+
"errors"?: ValidationError;
|
|
1818
1838
|
/**
|
|
1819
1839
|
* Emitted when a change is made within the form
|
|
1820
1840
|
*/
|
|
@@ -2438,6 +2458,10 @@ declare namespace LocalJSX {
|
|
|
2438
2458
|
* Active row in the table
|
|
2439
2459
|
*/
|
|
2440
2460
|
"activeRow"?: object;
|
|
2461
|
+
/**
|
|
2462
|
+
* Column aggregates to be displayed in the table
|
|
2463
|
+
*/
|
|
2464
|
+
"aggregates"?: ColumnAggregate[];
|
|
2441
2465
|
/**
|
|
2442
2466
|
* Columns used to display the data
|
|
2443
2467
|
*/
|
|
@@ -2478,6 +2502,14 @@ declare namespace LocalJSX {
|
|
|
2478
2502
|
* Emitted when `mode` is `remote` and the table is loading new data. The consumer is responsible for giving the table new data
|
|
2479
2503
|
*/
|
|
2480
2504
|
"onLoad"?: (event: CustomEvent<TableParams>) => void;
|
|
2505
|
+
/**
|
|
2506
|
+
* Emitted when the row selection has been changed
|
|
2507
|
+
*/
|
|
2508
|
+
"onSelect"?: (event: CustomEvent<object[]>) => void;
|
|
2509
|
+
/**
|
|
2510
|
+
* Emitted when the select all rows state is toggled
|
|
2511
|
+
*/
|
|
2512
|
+
"onSelectAll"?: (event: CustomEvent<boolean>) => void;
|
|
2481
2513
|
/**
|
|
2482
2514
|
* Emitted when `mode` is `local` the data is sorted
|
|
2483
2515
|
*/
|
|
@@ -2490,6 +2522,14 @@ declare namespace LocalJSX {
|
|
|
2490
2522
|
* Number of rows per page
|
|
2491
2523
|
*/
|
|
2492
2524
|
"pageSize"?: number;
|
|
2525
|
+
/**
|
|
2526
|
+
* Enables row selection
|
|
2527
|
+
*/
|
|
2528
|
+
"selectable"?: boolean;
|
|
2529
|
+
/**
|
|
2530
|
+
* Selected data. Requires `selectable` to be true.
|
|
2531
|
+
*/
|
|
2532
|
+
"selection"?: object[];
|
|
2493
2533
|
/**
|
|
2494
2534
|
* The initial sorted columns
|
|
2495
2535
|
*/
|
|
@@ -666,7 +666,7 @@ export declare namespace JSXBase {
|
|
|
666
666
|
use: JSXBase.SVGAttributes;
|
|
667
667
|
view: JSXBase.SVGAttributes;
|
|
668
668
|
}
|
|
669
|
-
interface SlotAttributes {
|
|
669
|
+
interface SlotAttributes extends JSXAttributes {
|
|
670
670
|
name?: string;
|
|
671
671
|
slot?: string;
|
|
672
672
|
onSlotchange?: (event: Event) => void;
|
|
@@ -1427,9 +1427,7 @@ export declare namespace JSXBase {
|
|
|
1427
1427
|
z?: number | string;
|
|
1428
1428
|
zoomAndPan?: string;
|
|
1429
1429
|
}
|
|
1430
|
-
interface DOMAttributes<T
|
|
1431
|
-
key?: string | number;
|
|
1432
|
-
ref?: (elm?: T) => void;
|
|
1430
|
+
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1433
1431
|
slot?: string;
|
|
1434
1432
|
part?: string;
|
|
1435
1433
|
exportparts?: string;
|
|
@@ -1550,6 +1548,10 @@ export declare namespace JSXBase {
|
|
|
1550
1548
|
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
|
1551
1549
|
}
|
|
1552
1550
|
}
|
|
1551
|
+
export interface JSXAttributes<T = Element> {
|
|
1552
|
+
key?: string | number;
|
|
1553
|
+
ref?: (elm?: T) => void;
|
|
1554
|
+
}
|
|
1553
1555
|
export interface CustomElementsDefineOptions {
|
|
1554
1556
|
exclude?: string[];
|
|
1555
1557
|
resourcesUrl?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "35.0.0-next.
|
|
3
|
+
"version": "35.0.0-next.32",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,54 +41,54 @@
|
|
|
41
41
|
"generate": "stencil generate"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@commitlint/config-conventional": "^
|
|
44
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
45
45
|
"@lundalogik/cz-conventional-changelog": "^3.1.0",
|
|
46
46
|
"@lundalogik/lime-icons8": "^2.7.0",
|
|
47
47
|
"@popperjs/core": "^2.9.3",
|
|
48
|
-
"@rjsf/core": "^2.
|
|
49
|
-
"@stencil/core": "^2.
|
|
48
|
+
"@rjsf/core": "^2.4.2",
|
|
49
|
+
"@stencil/core": "^2.13.0",
|
|
50
50
|
"@stencil/eslint-plugin": "^0.4.0",
|
|
51
|
-
"@stencil/sass": "^1.
|
|
51
|
+
"@stencil/sass": "^1.5.2",
|
|
52
52
|
"@types/codemirror": "^5.60.2",
|
|
53
53
|
"@types/html-escaper": "^3.0.0",
|
|
54
|
-
"@types/jest": "^
|
|
54
|
+
"@types/jest": "^27.4.0",
|
|
55
55
|
"@types/lodash-es": "^4.17.4",
|
|
56
56
|
"@types/puppeteer": "^5.4.4",
|
|
57
|
-
"@types/react": "^
|
|
57
|
+
"@types/react": "^17.0.39",
|
|
58
58
|
"@types/tabulator-tables": "^4.9.3",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
60
|
-
"@typescript-eslint/parser": "^
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
60
|
+
"@typescript-eslint/parser": "^5.14.0",
|
|
61
61
|
"ajv": "^6.12.6",
|
|
62
62
|
"awesome-debounce-promise": "^2.1.0",
|
|
63
63
|
"codemirror": "^5.62.3",
|
|
64
64
|
"commitizen": "^4.2.4",
|
|
65
65
|
"cross-env": "^7.0.3",
|
|
66
|
-
"dayjs": "^1.10.
|
|
67
|
-
"eslint": "^
|
|
66
|
+
"dayjs": "^1.10.8",
|
|
67
|
+
"eslint": "^8.10.0",
|
|
68
68
|
"eslint-config-prettier": "^8.3.0",
|
|
69
|
-
"eslint-plugin-jsdoc": "^37.
|
|
69
|
+
"eslint-plugin-jsdoc": "^37.9.5",
|
|
70
70
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
71
71
|
"eslint-plugin-prettier": "^4.0.0",
|
|
72
|
-
"eslint-plugin-react": "^7.
|
|
73
|
-
"eslint-plugin-sonarjs": "^0.
|
|
74
|
-
"flatpickr": "^4.6.
|
|
72
|
+
"eslint-plugin-react": "^7.29.2",
|
|
73
|
+
"eslint-plugin-sonarjs": "^0.12.0",
|
|
74
|
+
"flatpickr": "^4.6.10",
|
|
75
75
|
"html-escaper": "^3.0.3",
|
|
76
76
|
"jest": "^26.6.3",
|
|
77
|
-
"jest-cli": "^
|
|
77
|
+
"jest-cli": "^27.5.0",
|
|
78
78
|
"jsx-dom": "^7.0.4",
|
|
79
79
|
"kompendium": "^0.10.3",
|
|
80
80
|
"lodash-es": "^4.17.21",
|
|
81
|
-
"material-components-web": "^
|
|
81
|
+
"material-components-web": "^13.0.0",
|
|
82
82
|
"moment": "^2.29.1",
|
|
83
83
|
"number-abbreviate": "^2.0.0",
|
|
84
|
-
"prettier": "^2.
|
|
85
|
-
"puppeteer": "^
|
|
86
|
-
"react": "^
|
|
87
|
-
"react-dom": "^
|
|
84
|
+
"prettier": "^2.5.1",
|
|
85
|
+
"puppeteer": "^13.5.0",
|
|
86
|
+
"react": "^17.0.2",
|
|
87
|
+
"react-dom": "^17.0.2",
|
|
88
88
|
"react-shadow-dom-retarget-events": "^1.1.0",
|
|
89
89
|
"replace-in-file": "^6.2.0",
|
|
90
90
|
"shelljs": "0.8.5",
|
|
91
|
-
"showdown": "
|
|
91
|
+
"showdown": "2.0.3",
|
|
92
92
|
"shx": "^0.3.3",
|
|
93
93
|
"tabulator-tables": "^4.9.3",
|
|
94
94
|
"typescript": "^4.3.5"
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-e63a89d7.js');
|
|
4
|
-
|
|
5
|
-
const CheckboxTemplate = (props) => {
|
|
6
|
-
const inputProps = {};
|
|
7
|
-
if (props.indeterminate) {
|
|
8
|
-
inputProps['data-indeterminate'] = 'true';
|
|
9
|
-
}
|
|
10
|
-
return (index.h("div", { class: "mdc-form-field " },
|
|
11
|
-
index.h("div", { class: {
|
|
12
|
-
'mdc-checkbox': true,
|
|
13
|
-
'mdc-checkbox--invalid': props.invalid,
|
|
14
|
-
'mdc-checkbox--disabled': props.disabled,
|
|
15
|
-
'mdc-checkbox--required': props.required,
|
|
16
|
-
'mdc-checkbox--indeterminate': props.indeterminate,
|
|
17
|
-
} },
|
|
18
|
-
index.h("input", Object.assign({ type: "checkbox", class: "mdc-checkbox__native-control", id: props.id, checked: props.checked, disabled: props.disabled, required: props.required, onChange: props.onChange }, inputProps)),
|
|
19
|
-
index.h("div", { class: "mdc-checkbox__background" },
|
|
20
|
-
index.h("svg", { class: "mdc-checkbox__checkmark", viewBox: "0 0 24 24" },
|
|
21
|
-
index.h("path", { class: "mdc-checkbox__checkmark-path", fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" })),
|
|
22
|
-
index.h("div", { class: "mdc-checkbox__mixedmark" }))),
|
|
23
|
-
index.h("label", { class: {
|
|
24
|
-
'mdc-checkbox--invalid': props.invalid,
|
|
25
|
-
'mdc-checkbox--disabled': props.disabled,
|
|
26
|
-
'mdc-checkbox--required': props.required,
|
|
27
|
-
'mdc-checkbox--indeterminate': props.indeterminate,
|
|
28
|
-
}, htmlFor: props.id }, props.label),
|
|
29
|
-
index.h(HelperText, { text: props.helperText })));
|
|
30
|
-
};
|
|
31
|
-
const HelperText = (props) => {
|
|
32
|
-
if (typeof props.text !== 'string') {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
return (index.h("div", { class: "limel-checkbox-helper-line" },
|
|
36
|
-
index.h("p", { class: "limel-checkbox-helper-text", "aria-hidden": "true" }, props.text.trim())));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.CheckboxTemplate = CheckboxTemplate;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { h } from './index-2316f345.js';
|
|
2
|
-
|
|
3
|
-
const CheckboxTemplate = (props) => {
|
|
4
|
-
const inputProps = {};
|
|
5
|
-
if (props.indeterminate) {
|
|
6
|
-
inputProps['data-indeterminate'] = 'true';
|
|
7
|
-
}
|
|
8
|
-
return (h("div", { class: "mdc-form-field " },
|
|
9
|
-
h("div", { class: {
|
|
10
|
-
'mdc-checkbox': true,
|
|
11
|
-
'mdc-checkbox--invalid': props.invalid,
|
|
12
|
-
'mdc-checkbox--disabled': props.disabled,
|
|
13
|
-
'mdc-checkbox--required': props.required,
|
|
14
|
-
'mdc-checkbox--indeterminate': props.indeterminate,
|
|
15
|
-
} },
|
|
16
|
-
h("input", Object.assign({ type: "checkbox", class: "mdc-checkbox__native-control", id: props.id, checked: props.checked, disabled: props.disabled, required: props.required, onChange: props.onChange }, inputProps)),
|
|
17
|
-
h("div", { class: "mdc-checkbox__background" },
|
|
18
|
-
h("svg", { class: "mdc-checkbox__checkmark", viewBox: "0 0 24 24" },
|
|
19
|
-
h("path", { class: "mdc-checkbox__checkmark-path", fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" })),
|
|
20
|
-
h("div", { class: "mdc-checkbox__mixedmark" }))),
|
|
21
|
-
h("label", { class: {
|
|
22
|
-
'mdc-checkbox--invalid': props.invalid,
|
|
23
|
-
'mdc-checkbox--disabled': props.disabled,
|
|
24
|
-
'mdc-checkbox--required': props.required,
|
|
25
|
-
'mdc-checkbox--indeterminate': props.indeterminate,
|
|
26
|
-
}, htmlFor: props.id }, props.label),
|
|
27
|
-
h(HelperText, { text: props.helperText })));
|
|
28
|
-
};
|
|
29
|
-
const HelperText = (props) => {
|
|
30
|
-
if (typeof props.text !== 'string') {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
return (h("div", { class: "limel-checkbox-helper-line" },
|
|
34
|
-
h("p", { class: "limel-checkbox-helper-text", "aria-hidden": "true" }, props.text.trim())));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { CheckboxTemplate as C };
|