@limetech/lime-elements 35.0.0-next.2 → 35.0.0-next.23
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-7f83d0b4.js +41 -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 +131 -86
- 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 +1 -1
- package/dist/cjs/limel-flex-container.cjs.entry.js +5 -1
- package/dist/cjs/limel-form.cjs.entry.js +7547 -8994
- 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 +6 -6
- package/dist/cjs/limel-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/limel-list_3.cjs.entry.js +146 -84
- package/dist/cjs/limel-menu-list.cjs.entry.js +85 -69
- package/dist/cjs/limel-menu.cjs.entry.js +1 -1
- package/dist/cjs/limel-picker.cjs.entry.js +2 -2
- 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 +363 -11
- 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 +46 -16
- package/dist/collection/components/checkbox/checkbox.template.js +22 -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/dialog/dialog.css +153 -109
- 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/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 +351 -29
- package/dist/collection/components/linear-progress/linear-progress.css +14 -2
- package/dist/collection/components/list/list.css +912 -89
- package/dist/collection/components/list/list.js +13 -6
- package/dist/collection/components/menu-list/menu-list.css +912 -89
- package/dist/collection/components/menu-surface/menu-surface.css +31 -7
- package/dist/collection/components/picker/picker.js +1 -1
- package/dist/collection/components/popover-surface/popover-surface.css +1 -0
- package/dist/collection/components/select/select.css +430 -20
- package/dist/collection/components/select/select.template.js +1 -1
- package/dist/collection/components/slider/slider.css +54 -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 +134 -38
- package/dist/collection/components/table/table.js +212 -7
- 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/shared_input-select-picker.scss +1 -0
- package/dist/collection/style/internal/z-index.scss +2 -1
- package/dist/esm/checkbox.template-f429c5b6.js +39 -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 +132 -87
- 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 +1 -1
- package/dist/esm/limel-flex-container.entry.js +5 -1
- package/dist/esm/limel-form.entry.js +7550 -8997
- 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 +6 -6
- package/dist/esm/limel-linear-progress.entry.js +4 -4
- package/dist/esm/limel-list_3.entry.js +147 -85
- package/dist/esm/limel-menu-list.entry.js +86 -70
- package/dist/esm/limel-menu.entry.js +1 -1
- package/dist/esm/limel-picker.entry.js +2 -2
- 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 +363 -11
- 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-597cbe05.entry.js → p-0ea1cbf6.entry.js} +1 -1
- package/dist/lime-elements/p-1c284626.js +73 -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-13f0e4f4.entry.js → p-2a1d6f3d.entry.js} +1 -1
- 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-3f5ba6f4.entry.js +1 -0
- 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-555f774c.entry.js +82 -0
- package/dist/lime-elements/p-63516991.entry.js +1 -0
- package/dist/lime-elements/p-68c4e708.entry.js +16 -0
- package/dist/lime-elements/p-6acee2e5.entry.js +73 -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-468e940e.entry.js → p-75846313.entry.js} +1 -1
- package/dist/lime-elements/p-779d1567.entry.js +1 -0
- package/dist/lime-elements/p-7d4eb67f.entry.js +1 -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-041ae00c.entry.js → p-b808ba3d.entry.js} +1 -1
- package/dist/lime-elements/p-be2bd743.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-dbd61714.entry.js +1 -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-e55144ec.entry.js +1 -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/shared_input-select-picker.scss +1 -0
- 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/flex-container/flex-container.d.ts +7 -0
- 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 +39 -7
- package/dist/types/components/table/table.types.d.ts +13 -0
- package/dist/types/components.d.ts +33 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/package.json +20 -20
- 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-31299106.js +0 -126
- 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-6215e45e.entry.js +0 -37
- 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-a77cbb08.entry.js +0 -1
- package/dist/lime-elements/p-b5faa40d.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-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
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu::after {
|
|
694
694
|
display: inline-block;
|
|
695
695
|
position: absolute;
|
|
696
|
-
top: calc(5px + .4em);
|
|
696
|
+
top: calc(5px + 0.4em);
|
|
697
697
|
right: 10px;
|
|
698
698
|
height: 7px;
|
|
699
699
|
width: 7px;
|
|
@@ -952,13 +952,16 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
952
952
|
cursor: pointer;
|
|
953
953
|
}
|
|
954
954
|
[aria-sort=none] .tabulator-arrow {
|
|
955
|
-
border-bottom-color: rgb(var(--
|
|
955
|
+
border-bottom-color: rgb(var(--table-arrow-color)) !important;
|
|
956
956
|
}
|
|
957
957
|
[aria-sort=desc] .tabulator-arrow {
|
|
958
|
-
border-top-color:
|
|
958
|
+
border-top-color: var(--table-arrow-color--active) !important;
|
|
959
959
|
}
|
|
960
960
|
[aria-sort=asc] .tabulator-arrow {
|
|
961
|
-
border-bottom-color:
|
|
961
|
+
border-bottom-color: var(--table-arrow-color--active) !important;
|
|
962
|
+
}
|
|
963
|
+
[aria-sort=desc] .tabulator-arrow:after, [aria-sort=asc] .tabulator-arrow:after {
|
|
964
|
+
background-color: var(--table-arrow-color--active);
|
|
962
965
|
}
|
|
963
966
|
.tabulator-arrow:before, .tabulator-arrow:after {
|
|
964
967
|
display: block;
|
|
@@ -967,16 +970,19 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
967
970
|
bottom: 0;
|
|
968
971
|
}
|
|
969
972
|
.tabulator-arrow:before {
|
|
970
|
-
background-color: rgb(var(--
|
|
973
|
+
background-color: rgb(var(--table-header-background-color));
|
|
971
974
|
width: 0.5rem;
|
|
972
975
|
height: 0.5rem;
|
|
973
976
|
transform: rotate(45deg);
|
|
974
977
|
left: -0.25rem;
|
|
975
978
|
top: 0.25rem;
|
|
976
979
|
}
|
|
980
|
+
.tabulator-col.tabulator-sortable:hover .tabulator-arrow:before {
|
|
981
|
+
background-color: rgb(var(--table-header-background-color--hover));
|
|
982
|
+
}
|
|
977
983
|
.tabulator-arrow:after {
|
|
978
984
|
width: 0.125rem;
|
|
979
|
-
background-color: rgb(var(--
|
|
985
|
+
background-color: rgb(var(--table-arrow-color));
|
|
980
986
|
height: 0.5625rem;
|
|
981
987
|
top: 0.125rem;
|
|
982
988
|
left: -0.0625rem;
|
|
@@ -990,9 +996,6 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
990
996
|
[aria-sort=desc] .tabulator-arrow:after {
|
|
991
997
|
top: -0.6875rem;
|
|
992
998
|
}
|
|
993
|
-
[aria-sort=desc] .tabulator-arrow:after, [aria-sort=asc] .tabulator-arrow:after {
|
|
994
|
-
background-color: rgb(var(--color-teal-light));
|
|
995
|
-
}
|
|
996
999
|
|
|
997
1000
|
@keyframes indicate-sortable-column {
|
|
998
1001
|
0%, 100% {
|
|
@@ -1070,8 +1073,12 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
1070
1073
|
max-height: calc(100% - 2.125rem) !important;
|
|
1071
1074
|
}
|
|
1072
1075
|
.tabulator:not(.has-pagination).has-aggregation .tabulator-tableHolder {
|
|
1073
|
-
height: calc(
|
|
1074
|
-
|
|
1076
|
+
height: calc(100% - (
|
|
1077
|
+
2.125rem + 2.25rem
|
|
1078
|
+
)) !important;
|
|
1079
|
+
max-height: calc(100% - (
|
|
1080
|
+
2.125rem + 2.25rem
|
|
1081
|
+
)) !important;
|
|
1075
1082
|
}
|
|
1076
1083
|
.tabulator:not(.has-pagination) .tabulator-footer {
|
|
1077
1084
|
pointer-events: none;
|
|
@@ -1156,21 +1163,21 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
1156
1163
|
* Nothing in this file may output any CSS
|
|
1157
1164
|
* without being explicitly called by outside code.
|
|
1158
1165
|
*/
|
|
1159
|
-
:host(.has-interactive-rows) .tabulator-row.tabulator-selectable {
|
|
1166
|
+
:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable {
|
|
1160
1167
|
transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
|
|
1161
1168
|
}
|
|
1162
|
-
:host(.has-interactive-rows) .tabulator-row.tabulator-selectable:hover {
|
|
1169
|
+
:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:hover {
|
|
1163
1170
|
box-shadow: var(--button-shadow-hovered);
|
|
1164
1171
|
}
|
|
1165
|
-
:host(.has-interactive-rows) .tabulator-row.tabulator-selectable:active {
|
|
1172
|
+
:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:active {
|
|
1166
1173
|
box-shadow: var(--button-shadow-pressed);
|
|
1167
1174
|
transform: translate3d(0, 0.08rem, 0);
|
|
1168
1175
|
}
|
|
1169
|
-
:host(.has-interactive-rows) .tabulator-row.tabulator-selectable:hover {
|
|
1170
|
-
z-index:
|
|
1176
|
+
:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:hover {
|
|
1177
|
+
z-index: 2;
|
|
1171
1178
|
}
|
|
1172
|
-
:host(.has-interactive-rows) .tabulator-row.tabulator-selectable:not(.active):hover {
|
|
1173
|
-
background-color: rgb(var(--
|
|
1179
|
+
:host(.has-interactive-rows) .tabulator-row:not(.tabulator-calcs).tabulator-selectable:not(.active):hover {
|
|
1180
|
+
background-color: rgb(var(--table-row-background-color--hover));
|
|
1174
1181
|
}
|
|
1175
1182
|
|
|
1176
1183
|
:host(.has-low-density) #tabulator-table {
|
|
@@ -1197,7 +1204,9 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
1197
1204
|
border-radius: 0 0.375rem 0.375rem 0;
|
|
1198
1205
|
}
|
|
1199
1206
|
:host(.has-low-density) .tabulator-row {
|
|
1200
|
-
width: calc(
|
|
1207
|
+
width: calc(
|
|
1208
|
+
100% - 1rem
|
|
1209
|
+
);
|
|
1201
1210
|
margin-right: auto;
|
|
1202
1211
|
margin-left: auto;
|
|
1203
1212
|
border-radius: 0.5rem;
|
|
@@ -1263,26 +1272,113 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
1263
1272
|
.tabulator.has-movable-columns .tabulator-header {
|
|
1264
1273
|
overflow-y: visible;
|
|
1265
1274
|
}
|
|
1266
|
-
.tabulator.has-movable-columns .tabulator-header .tabulator-col {
|
|
1275
|
+
.tabulator.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen) {
|
|
1267
1276
|
cursor: move !important;
|
|
1268
1277
|
}
|
|
1269
|
-
.tabulator.has-movable-columns .tabulator-header .tabulator-col.tabulator-sortable.tabulator-moving {
|
|
1278
|
+
.tabulator.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving {
|
|
1270
1279
|
animation: detach-a-column-header 0.2s ease forwards;
|
|
1271
1280
|
opacity: 0.9;
|
|
1272
1281
|
border: none;
|
|
1273
1282
|
border-radius: 0.25rem;
|
|
1274
|
-
background-color: rgb(var(
|
|
1283
|
+
background-color: rgb(var(---table-header-background-color-when-being-dragged));
|
|
1275
1284
|
box-shadow: var(--shadow-depth-16);
|
|
1276
1285
|
}
|
|
1277
|
-
.tabulator.has-movable-columns .tabulator-header .tabulator-col.tabulator-sortable.tabulator-moving:hover {
|
|
1278
|
-
background-color: rgb(var(
|
|
1286
|
+
.tabulator.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving:hover {
|
|
1287
|
+
background-color: rgb(var(---table-header-background-color-when-being-dragged));
|
|
1288
|
+
}
|
|
1289
|
+
.tabulator.has-movable-columns .tabulator-header .tabulator-col:not(.tabulator-frozen).tabulator-sortable.tabulator-moving .tabulator-arrow:before {
|
|
1290
|
+
background-color: rgb(var(---table-header-background-color-when-being-dragged));
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
/*
|
|
1294
|
+
* This file is imported into every component!
|
|
1295
|
+
*
|
|
1296
|
+
* Nothing in this file may output any CSS
|
|
1297
|
+
* without being explicitly called by outside code.
|
|
1298
|
+
*/
|
|
1299
|
+
.select-all,
|
|
1300
|
+
.limel-table--row-selector {
|
|
1301
|
+
--mdc-checkbox-touch-target-size: 1rem;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
.select-all {
|
|
1305
|
+
position: absolute;
|
|
1306
|
+
z-index: 1;
|
|
1307
|
+
left: 0;
|
|
1308
|
+
top: 0.375rem;
|
|
1309
|
+
width: 2.5625rem;
|
|
1310
|
+
display: flex !important;
|
|
1311
|
+
align-items: center;
|
|
1312
|
+
justify-content: center;
|
|
1313
|
+
}
|
|
1314
|
+
.select-all limel-checkbox {
|
|
1315
|
+
transform: translate(-0.25rem, 0);
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
.limel-table--row-selector {
|
|
1319
|
+
position: sticky !important;
|
|
1320
|
+
left: 0;
|
|
1321
|
+
border-width: 0;
|
|
1322
|
+
justify-content: center;
|
|
1323
|
+
z-index: 1;
|
|
1324
|
+
}
|
|
1325
|
+
.tabulator-row-odd .limel-table--row-selector {
|
|
1326
|
+
background-image: linear-gradient(to right, rgb(var(--table-row-background-color--odd)) 70%, rgb(var(--table-row-background-color--odd), 0));
|
|
1327
|
+
}
|
|
1328
|
+
.tabulator-row-even .limel-table--row-selector {
|
|
1329
|
+
background-image: linear-gradient(to right, rgb(var(--table-row-background-color--even)) 70%, rgb(var(--table-row-background-color--even), 0));
|
|
1330
|
+
}
|
|
1331
|
+
.tabulator-row:not(.tabulator-calcs):hover .limel-table--row-selector {
|
|
1332
|
+
will-change: background-image;
|
|
1333
|
+
background-image: linear-gradient(to right, rgb(var(--table-row-background-color--hover)) 70%, rgb(var(--table-row-background-color--hover), 0));
|
|
1334
|
+
}
|
|
1335
|
+
.tabulator-row.active .limel-table--row-selector, .tabulator-row.active:hover .limel-table--row-selector {
|
|
1336
|
+
background-image: linear-gradient(to right, rgb(var(--table-row-background-color--active)) 70%, rgb(var(--table-row-background-color--active), 0));
|
|
1279
1337
|
}
|
|
1280
|
-
.
|
|
1281
|
-
|
|
1338
|
+
.limel-table--row-selector limel-checkbox {
|
|
1339
|
+
transition: opacity 0.2s ease;
|
|
1340
|
+
align-self: center;
|
|
1341
|
+
opacity: 0.3;
|
|
1342
|
+
transform: translate(-0.25rem, 0);
|
|
1343
|
+
}
|
|
1344
|
+
.tabulator-row:hover .limel-table--row-selector limel-checkbox {
|
|
1345
|
+
opacity: 1;
|
|
1346
|
+
}
|
|
1347
|
+
.has-selection .limel-table--row-selector limel-checkbox {
|
|
1348
|
+
opacity: 1;
|
|
1349
|
+
}
|
|
1350
|
+
.limel-table--row-selector .tabulator-col-resize-handle {
|
|
1351
|
+
display: none;
|
|
1352
|
+
}
|
|
1353
|
+
.limel-table--row-selector + .tabulator-col .tabulator-col-resize-handle.prev, .limel-table--row-selector + .tabulator-cell .tabulator-col-resize-handle.prev {
|
|
1354
|
+
display: none;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
.tabulator.has-movable-columns .tabulator-header .tabulator-col.limel-table--row-selector {
|
|
1358
|
+
border: none;
|
|
1359
|
+
cursor: default;
|
|
1360
|
+
pointer-events: none;
|
|
1361
|
+
background-color: transparent;
|
|
1362
|
+
background-image: linear-gradient(to right, rgb(var(--table-header-background-color--hover)) 70%, rgb(var(--table-header-background-color--hover), 0));
|
|
1363
|
+
position: sticky;
|
|
1364
|
+
left: 0;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
.has-selection .tabulator-calcs .tabulator-cell {
|
|
1368
|
+
color: var(--table-arrow-color--active);
|
|
1282
1369
|
}
|
|
1283
1370
|
|
|
1284
1371
|
:host {
|
|
1285
1372
|
display: block;
|
|
1373
|
+
--table-header-background-color: var(--contrast-500);
|
|
1374
|
+
--table-header-background-color--hover: var(--contrast-400);
|
|
1375
|
+
--table-header-background-color-when-being-dragged: var(--contrast-100);
|
|
1376
|
+
--table-row-background-color--odd: var(--contrast-200);
|
|
1377
|
+
--table-row-background-color--even: var(--contrast-100);
|
|
1378
|
+
--table-row-background-color--hover: var(--contrast-100);
|
|
1379
|
+
--table-row-background-color--active: var(--color-teal-lighter);
|
|
1380
|
+
--table-arrow-color: var(--contrast-800);
|
|
1381
|
+
--table-arrow-color--active: var(--mdc-theme-primary);
|
|
1286
1382
|
}
|
|
1287
1383
|
|
|
1288
1384
|
#tabulator-container {
|
|
@@ -1304,46 +1400,46 @@ body.tabulator-print-fullscreen-hide > *:not(.tabulator-print-fullscreen) {
|
|
|
1304
1400
|
|
|
1305
1401
|
.tabulator .tabulator-header {
|
|
1306
1402
|
border-bottom: 0;
|
|
1307
|
-
background-color: rgb(var(--
|
|
1403
|
+
background-color: rgb(var(--table-header-background-color));
|
|
1308
1404
|
}
|
|
1309
1405
|
.tabulator .tabulator-header .tabulator-col {
|
|
1310
1406
|
transition: background-color 0.2s ease;
|
|
1311
|
-
background-color: rgb(var(--
|
|
1407
|
+
background-color: rgb(var(--table-header-background-color));
|
|
1312
1408
|
border-right-color: rgb(var(--contrast-200));
|
|
1313
1409
|
}
|
|
1314
|
-
.tabulator .tabulator-header .tabulator-col .tabulator-col-content {
|
|
1315
|
-
padding-top: 0.5rem;
|
|
1316
|
-
padding-bottom: 0.5rem;
|
|
1317
|
-
}
|
|
1318
1410
|
.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {
|
|
1319
|
-
background-color: rgb(var(--
|
|
1411
|
+
background-color: rgb(var(--table-header-background-color--hover));
|
|
1320
1412
|
}
|
|
1321
1413
|
.tabulator .tabulator-header .tabulator-col-title {
|
|
1322
1414
|
font-weight: 500;
|
|
1323
1415
|
padding-left: 0.125rem;
|
|
1324
1416
|
}
|
|
1325
1417
|
.tabulator .tabulator-footer {
|
|
1326
|
-
background-color: rgb(var(--
|
|
1418
|
+
background-color: rgb(var(--table-header-background-color--hover));
|
|
1327
1419
|
border: none;
|
|
1420
|
+
user-select: auto;
|
|
1328
1421
|
}
|
|
1329
1422
|
.tabulator .tabulator-footer .tabulator-calcs-holder {
|
|
1330
1423
|
border-color: rgb(var(--contrast-600));
|
|
1331
1424
|
}
|
|
1332
1425
|
|
|
1426
|
+
.tabulator-row.tabulator-calcs {
|
|
1427
|
+
cursor: default !important;
|
|
1428
|
+
}
|
|
1333
1429
|
.tabulator-row.tabulator-selectable {
|
|
1334
1430
|
transition: background-color 0.2s ease;
|
|
1335
1431
|
}
|
|
1336
1432
|
.tabulator-row.tabulator-selectable:not(.active):hover {
|
|
1337
|
-
background-color: rgb(var(--
|
|
1433
|
+
background-color: rgb(var(--table-header-background-color));
|
|
1338
1434
|
}
|
|
1339
1435
|
.tabulator-row.tabulator-row-odd {
|
|
1340
|
-
background-color: rgb(var(--
|
|
1436
|
+
background-color: rgb(var(--table-row-background-color--odd));
|
|
1341
1437
|
}
|
|
1342
1438
|
.tabulator-row.tabulator-row-even {
|
|
1343
|
-
background-color: rgb(var(--
|
|
1439
|
+
background-color: rgb(var(--table-row-background-color--even));
|
|
1344
1440
|
}
|
|
1345
1441
|
.tabulator-row.active, .tabulator-row.active:hover {
|
|
1346
|
-
background-color:
|
|
1442
|
+
background-color: rgb(var(--table-row-background-color--active));
|
|
1347
1443
|
}
|
|
1348
1444
|
.tabulator-row .tabulator-cell {
|
|
1349
1445
|
border-right: transparent;
|
|
@@ -3,6 +3,7 @@ import TabulatorTable from 'tabulator-tables';
|
|
|
3
3
|
import { ColumnDefinitionFactory, createColumnSorter } from './columns';
|
|
4
4
|
import { isEqual, has } from 'lodash-es';
|
|
5
5
|
import { ElementPool } from './element-pool';
|
|
6
|
+
import { TableSelection } from './table-selection';
|
|
6
7
|
const FIRST_PAGE = 1;
|
|
7
8
|
/**
|
|
8
9
|
* @exampleComponent limel-example-table
|
|
@@ -12,6 +13,7 @@ const FIRST_PAGE = 1;
|
|
|
12
13
|
* @exampleComponent limel-example-table-local
|
|
13
14
|
* @exampleComponent limel-example-table-remote
|
|
14
15
|
* @exampleComponent limel-example-table-activate-row
|
|
16
|
+
* @exampleComponent limel-example-table-selectable-rows
|
|
15
17
|
* @exampleComponent limel-example-table-default-sorted
|
|
16
18
|
* @exampleComponent limel-example-table-low-density
|
|
17
19
|
*/
|
|
@@ -44,6 +46,27 @@ export class Table {
|
|
|
44
46
|
* The page to show
|
|
45
47
|
*/
|
|
46
48
|
this.page = FIRST_PAGE;
|
|
49
|
+
this.getActiveRows = () => {
|
|
50
|
+
if (!this.tabulator) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
return this.tabulator.getRows('active');
|
|
54
|
+
};
|
|
55
|
+
this.getActiveRowsData = () => {
|
|
56
|
+
// Note: Tabulator.getData() creates copies of each data object
|
|
57
|
+
// and will break this.selection.has checks, hence why this function
|
|
58
|
+
// intentionally retrieves the data using the row components
|
|
59
|
+
return this.getActiveRows().map((row) => row.getData());
|
|
60
|
+
};
|
|
61
|
+
this.selectAllOnChange = (ev) => {
|
|
62
|
+
const selectAll = ev.detail;
|
|
63
|
+
ev.stopPropagation();
|
|
64
|
+
ev.preventDefault();
|
|
65
|
+
const newSelection = selectAll ? this.getActiveRowsData() : [];
|
|
66
|
+
this.select.emit(newSelection);
|
|
67
|
+
this.tableSelection.setSelection(newSelection);
|
|
68
|
+
this.selectAll.emit(selectAll);
|
|
69
|
+
};
|
|
47
70
|
this.getColumnOptions = () => {
|
|
48
71
|
if (!this.movableColumns) {
|
|
49
72
|
return {};
|
|
@@ -54,7 +77,7 @@ export class Table {
|
|
|
54
77
|
};
|
|
55
78
|
};
|
|
56
79
|
this.handleMoveColumn = (_, components) => {
|
|
57
|
-
const columns = components.map(this.findColumn);
|
|
80
|
+
const columns = components.map(this.findColumn).filter((c) => c);
|
|
58
81
|
this.changeColumns.emit(columns);
|
|
59
82
|
};
|
|
60
83
|
this.findColumn = (component) => {
|
|
@@ -69,13 +92,20 @@ export class Table {
|
|
|
69
92
|
this.requestData = this.requestData.bind(this);
|
|
70
93
|
this.onClickRow = this.onClickRow.bind(this);
|
|
71
94
|
this.formatRow = this.formatRow.bind(this);
|
|
95
|
+
this.formatRows = this.formatRows.bind(this);
|
|
72
96
|
this.updateMaxPage = this.updateMaxPage.bind(this);
|
|
73
97
|
this.initTabulatorComponent = this.initTabulatorComponent.bind(this);
|
|
98
|
+
this.setSelection = this.setSelection.bind(this);
|
|
99
|
+
this.addColumnAggregator = this.addColumnAggregator.bind(this);
|
|
74
100
|
this.pool = new ElementPool(document);
|
|
75
101
|
this.columnFactory = new ColumnDefinitionFactory(this.pool);
|
|
76
102
|
}
|
|
77
103
|
componentWillLoad() {
|
|
78
104
|
this.firstRequest = this.mode === 'remote';
|
|
105
|
+
if (this.selectable) {
|
|
106
|
+
this.tableSelection = new TableSelection(() => this.tabulator, this.pool, this.select);
|
|
107
|
+
this.tableSelection.setSelection(this.selection);
|
|
108
|
+
}
|
|
79
109
|
}
|
|
80
110
|
componentDidLoad() {
|
|
81
111
|
this.init();
|
|
@@ -102,7 +132,7 @@ export class Table {
|
|
|
102
132
|
if (!this.tabulator) {
|
|
103
133
|
return;
|
|
104
134
|
}
|
|
105
|
-
this.
|
|
135
|
+
this.formatRows();
|
|
106
136
|
}
|
|
107
137
|
updateData(newData = [], oldData = []) {
|
|
108
138
|
if (isEqual(newData, oldData)) {
|
|
@@ -114,6 +144,7 @@ export class Table {
|
|
|
114
144
|
return;
|
|
115
145
|
}
|
|
116
146
|
this.tabulator.replaceData(this.data);
|
|
147
|
+
this.setSelection();
|
|
117
148
|
});
|
|
118
149
|
}
|
|
119
150
|
updateColumns(newColumns, oldColumns) {
|
|
@@ -123,20 +154,46 @@ export class Table {
|
|
|
123
154
|
if (this.areSameColumns(newColumns, oldColumns)) {
|
|
124
155
|
return;
|
|
125
156
|
}
|
|
126
|
-
const
|
|
157
|
+
const columnsInTable = this.tabulator
|
|
127
158
|
.getColumns()
|
|
128
|
-
.
|
|
129
|
-
|
|
159
|
+
.filter((c) => c.getField());
|
|
160
|
+
const oldColumnsInTable = columnsInTable.map((c) => oldColumns.find((old) => old.field === c.getField()));
|
|
161
|
+
if (this.areSameColumns(newColumns, oldColumnsInTable)) {
|
|
130
162
|
return;
|
|
131
163
|
}
|
|
132
164
|
// Updating columns requires a reinitialization otherwise sorting will not work
|
|
133
165
|
// afterwards
|
|
134
166
|
this.init();
|
|
135
167
|
}
|
|
168
|
+
updateAggregates(newAggregates, oldAggregates) {
|
|
169
|
+
if (!this.tabulator) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (isEqual(newAggregates, oldAggregates)) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (!this.haveSameAggregateFields(newAggregates, oldAggregates)) {
|
|
176
|
+
this.init();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.tabulator.recalc();
|
|
180
|
+
this.tabulator.rowManager.redraw();
|
|
181
|
+
}
|
|
182
|
+
updateSelection(newSelection) {
|
|
183
|
+
if (!this.tableSelection) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
this.tableSelection.setSelection(newSelection);
|
|
187
|
+
}
|
|
136
188
|
areSameColumns(newColumns, oldColumns) {
|
|
137
189
|
return (newColumns.length === oldColumns.length &&
|
|
138
190
|
newColumns.every((column) => oldColumns.includes(column)));
|
|
139
191
|
}
|
|
192
|
+
haveSameAggregateFields(newAggregates, oldAggregates) {
|
|
193
|
+
const oldAggregateFields = (oldAggregates === null || oldAggregates === void 0 ? void 0 : oldAggregates.map((a) => a.field)) || [];
|
|
194
|
+
return ((newAggregates === null || newAggregates === void 0 ? void 0 : newAggregates.length) === (oldAggregates === null || oldAggregates === void 0 ? void 0 : oldAggregates.length) &&
|
|
195
|
+
!!(newAggregates === null || newAggregates === void 0 ? void 0 : newAggregates.every((a) => oldAggregateFields.includes(a.field))));
|
|
196
|
+
}
|
|
140
197
|
init() {
|
|
141
198
|
if (this.tabulator) {
|
|
142
199
|
this.pool.releaseAll();
|
|
@@ -163,14 +220,22 @@ export class Table {
|
|
|
163
220
|
// matter if its rendered or not.
|
|
164
221
|
if (!('ResizeObserver' in window)) {
|
|
165
222
|
this.tabulator = new TabulatorTable(table, options);
|
|
223
|
+
this.setSelection();
|
|
166
224
|
return;
|
|
167
225
|
}
|
|
168
226
|
const observer = new ResizeObserver(() => {
|
|
169
227
|
this.tabulator = new TabulatorTable(table, options);
|
|
228
|
+
this.setSelection();
|
|
170
229
|
observer.unobserve(table);
|
|
171
230
|
});
|
|
172
231
|
observer.observe(table);
|
|
173
232
|
}
|
|
233
|
+
setSelection() {
|
|
234
|
+
if (!(this.tabulator && this.tableSelection)) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
this.tableSelection.setSelection(this.selection);
|
|
238
|
+
}
|
|
174
239
|
updateMaxPage() {
|
|
175
240
|
var _a;
|
|
176
241
|
(_a = this.tabulator) === null || _a === void 0 ? void 0 : _a.setMaxPage(this.calculatePageCount());
|
|
@@ -192,7 +257,38 @@ export class Table {
|
|
|
192
257
|
});
|
|
193
258
|
}
|
|
194
259
|
getColumnDefinitions() {
|
|
195
|
-
|
|
260
|
+
const columnDefinitions = this.columns
|
|
261
|
+
.map(this.addColumnAggregator)
|
|
262
|
+
.map(this.columnFactory.create);
|
|
263
|
+
if (this.tableSelection) {
|
|
264
|
+
return this.tableSelection.getColumnDefinitions(columnDefinitions);
|
|
265
|
+
}
|
|
266
|
+
return columnDefinitions;
|
|
267
|
+
}
|
|
268
|
+
addColumnAggregator(column) {
|
|
269
|
+
var _a;
|
|
270
|
+
if (!((_a = this.aggregates) === null || _a === void 0 ? void 0 : _a.length) || column.aggregator) {
|
|
271
|
+
return column;
|
|
272
|
+
}
|
|
273
|
+
const aggregate = this.aggregates.find((a) => a.field === column.field);
|
|
274
|
+
if (aggregate) {
|
|
275
|
+
column.aggregator = (col,
|
|
276
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
277
|
+
_values,
|
|
278
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
279
|
+
_data) => {
|
|
280
|
+
var _a;
|
|
281
|
+
if (!col) {
|
|
282
|
+
return undefined;
|
|
283
|
+
}
|
|
284
|
+
const value = (_a = this.aggregates.find((a) => a.field === col.field)) === null || _a === void 0 ? void 0 : _a.value;
|
|
285
|
+
if (col.formatter) {
|
|
286
|
+
return col.formatter(value);
|
|
287
|
+
}
|
|
288
|
+
return value;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
return column;
|
|
196
292
|
}
|
|
197
293
|
getAjaxOptions() {
|
|
198
294
|
if (!this.isRemoteMode()) {
|
|
@@ -291,7 +387,11 @@ export class Table {
|
|
|
291
387
|
}
|
|
292
388
|
this.changePage.emit(page);
|
|
293
389
|
}
|
|
294
|
-
onClickRow(
|
|
390
|
+
onClickRow(_ev, row) {
|
|
391
|
+
if (typeof row.getPosition === 'undefined') {
|
|
392
|
+
// Not a data row, probably a CalcComponent
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
295
395
|
if (this.activeRow === row.getData()) {
|
|
296
396
|
this.activeRow = null;
|
|
297
397
|
}
|
|
@@ -300,6 +400,9 @@ export class Table {
|
|
|
300
400
|
}
|
|
301
401
|
this.activate.emit(this.activeRow);
|
|
302
402
|
}
|
|
403
|
+
formatRows() {
|
|
404
|
+
this.tabulator.getRows().forEach(this.formatRow);
|
|
405
|
+
}
|
|
303
406
|
formatRow(row) {
|
|
304
407
|
if (this.activeRow === row.getData()) {
|
|
305
408
|
row.getElement().classList.add('active');
|
|
@@ -319,16 +422,30 @@ export class Table {
|
|
|
319
422
|
return columns.some((column) => has(column, 'aggregator'));
|
|
320
423
|
}
|
|
321
424
|
render() {
|
|
425
|
+
var _a;
|
|
322
426
|
return (h("div", { id: "tabulator-container" },
|
|
323
427
|
h("div", { id: "tabulator-loader", style: { display: this.loading ? 'flex' : 'none' } },
|
|
324
428
|
h("limel-spinner", { size: "large" })),
|
|
325
429
|
this.renderEmptyMessage(),
|
|
430
|
+
this.renderSelectAll(),
|
|
326
431
|
h("div", { id: "tabulator-table", class: {
|
|
327
432
|
'has-pagination': this.totalRows > this.pageSize,
|
|
328
433
|
'has-aggregation': this.hasAggregation(this.columns),
|
|
329
434
|
'has-movable-columns': this.movableColumns,
|
|
435
|
+
'has-rowselector': this.selectable,
|
|
436
|
+
'has-selection': (_a = this.tableSelection) === null || _a === void 0 ? void 0 : _a.hasSelection,
|
|
330
437
|
} })));
|
|
331
438
|
}
|
|
439
|
+
renderSelectAll() {
|
|
440
|
+
var _a, _b, _c;
|
|
441
|
+
if (!this.selectable) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
const showSelectAll = !this.loading && this.tableSelection;
|
|
445
|
+
return (h("div", { class: "select-all", style: { display: showSelectAll ? 'inline-block' : 'none' } },
|
|
446
|
+
h("limel-checkbox", { onChange: this.selectAllOnChange, checked: (_a = this.tableSelection) === null || _a === void 0 ? void 0 : _a.hasSelection, indeterminate: ((_b = this.tableSelection) === null || _b === void 0 ? void 0 : _b.hasSelection) &&
|
|
447
|
+
((_c = this.selection) === null || _c === void 0 ? void 0 : _c.length) < this.data.length })));
|
|
448
|
+
}
|
|
332
449
|
renderEmptyMessage() {
|
|
333
450
|
const showEmptyMessage = !this.loading && !this.data.length && this.emptyMessage;
|
|
334
451
|
return (h("div", { id: "tabulator-empty-text", style: { display: showEmptyMessage ? 'flex' : 'none' } },
|
|
@@ -537,6 +654,58 @@ export class Table {
|
|
|
537
654
|
},
|
|
538
655
|
"attribute": "empty-message",
|
|
539
656
|
"reflect": false
|
|
657
|
+
},
|
|
658
|
+
"aggregates": {
|
|
659
|
+
"type": "unknown",
|
|
660
|
+
"mutable": false,
|
|
661
|
+
"complexType": {
|
|
662
|
+
"original": "ColumnAggregate[]",
|
|
663
|
+
"resolved": "ColumnAggregate[]",
|
|
664
|
+
"references": {
|
|
665
|
+
"ColumnAggregate": {
|
|
666
|
+
"location": "import",
|
|
667
|
+
"path": "./table.types"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"required": false,
|
|
672
|
+
"optional": false,
|
|
673
|
+
"docs": {
|
|
674
|
+
"tags": [],
|
|
675
|
+
"text": "Column aggregates to be displayed in the table"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"selectable": {
|
|
679
|
+
"type": "boolean",
|
|
680
|
+
"mutable": false,
|
|
681
|
+
"complexType": {
|
|
682
|
+
"original": "boolean",
|
|
683
|
+
"resolved": "boolean",
|
|
684
|
+
"references": {}
|
|
685
|
+
},
|
|
686
|
+
"required": false,
|
|
687
|
+
"optional": false,
|
|
688
|
+
"docs": {
|
|
689
|
+
"tags": [],
|
|
690
|
+
"text": "Enables row selection"
|
|
691
|
+
},
|
|
692
|
+
"attribute": "selectable",
|
|
693
|
+
"reflect": false
|
|
694
|
+
},
|
|
695
|
+
"selection": {
|
|
696
|
+
"type": "unknown",
|
|
697
|
+
"mutable": false,
|
|
698
|
+
"complexType": {
|
|
699
|
+
"original": "object[]",
|
|
700
|
+
"resolved": "object[]",
|
|
701
|
+
"references": {}
|
|
702
|
+
},
|
|
703
|
+
"required": false,
|
|
704
|
+
"optional": false,
|
|
705
|
+
"docs": {
|
|
706
|
+
"tags": [],
|
|
707
|
+
"text": "Selected data. Requires `selectable` to be true."
|
|
708
|
+
}
|
|
540
709
|
}
|
|
541
710
|
}; }
|
|
542
711
|
static get events() { return [{
|
|
@@ -629,6 +798,36 @@ export class Table {
|
|
|
629
798
|
}
|
|
630
799
|
}
|
|
631
800
|
}
|
|
801
|
+
}, {
|
|
802
|
+
"method": "select",
|
|
803
|
+
"name": "select",
|
|
804
|
+
"bubbles": true,
|
|
805
|
+
"cancelable": true,
|
|
806
|
+
"composed": true,
|
|
807
|
+
"docs": {
|
|
808
|
+
"tags": [],
|
|
809
|
+
"text": "Emitted when the row selection has been changed"
|
|
810
|
+
},
|
|
811
|
+
"complexType": {
|
|
812
|
+
"original": "object[]",
|
|
813
|
+
"resolved": "object[]",
|
|
814
|
+
"references": {}
|
|
815
|
+
}
|
|
816
|
+
}, {
|
|
817
|
+
"method": "selectAll",
|
|
818
|
+
"name": "selectAll",
|
|
819
|
+
"bubbles": true,
|
|
820
|
+
"cancelable": true,
|
|
821
|
+
"composed": true,
|
|
822
|
+
"docs": {
|
|
823
|
+
"tags": [],
|
|
824
|
+
"text": "Emitted when the select all rows state is toggled"
|
|
825
|
+
},
|
|
826
|
+
"complexType": {
|
|
827
|
+
"original": "boolean",
|
|
828
|
+
"resolved": "boolean",
|
|
829
|
+
"references": {}
|
|
830
|
+
}
|
|
632
831
|
}]; }
|
|
633
832
|
static get elementRef() { return "host"; }
|
|
634
833
|
static get watchers() { return [{
|
|
@@ -649,5 +848,11 @@ export class Table {
|
|
|
649
848
|
}, {
|
|
650
849
|
"propName": "columns",
|
|
651
850
|
"methodName": "updateColumns"
|
|
851
|
+
}, {
|
|
852
|
+
"propName": "aggregates",
|
|
853
|
+
"methodName": "updateAggregates"
|
|
854
|
+
}, {
|
|
855
|
+
"propName": "selection",
|
|
856
|
+
"methodName": "updateSelection"
|
|
652
857
|
}]; }
|
|
653
858
|
}
|