snice 1.14.2 → 2.1.0
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/bin/templates/base/tsconfig.json +5 -4
- package/components/accordion/demo.html +403 -0
- package/components/alert/demo.html +445 -0
- package/components/avatar/demo.html +598 -0
- package/components/badge/demo.html +523 -0
- package/components/breadcrumbs/demo.html +404 -0
- package/components/button/demo.html +42 -0
- package/components/card/demo.html +525 -0
- package/components/checkbox/demo.html +253 -0
- package/components/chip/demo.html +383 -0
- package/components/date-picker/demo.html +191 -0
- package/components/divider/demo.html +233 -0
- package/components/drawer/demo.html +328 -0
- package/components/input/demo.html +303 -0
- package/components/input/test.html +77 -0
- package/components/layout/demo.html +538 -0
- package/components/login/demo-auth-controller.ts +185 -0
- package/components/login/demo.html +470 -0
- package/components/login/snice-login.ts +2 -2
- package/components/modal/demo.html +291 -0
- package/components/pagination/demo.html +395 -0
- package/components/progress/demo.html +510 -0
- package/components/radio/demo.html +287 -0
- package/components/select/demo.html +511 -0
- package/components/skeleton/demo.html +514 -0
- package/components/switch/demo.html +284 -0
- package/components/table/demo-table-controller.ts +100 -0
- package/components/table/demo.html +480 -0
- package/components/table/snice-table.ts +2 -2
- package/components/tabs/demo.html +487 -0
- package/components/toast/demo.html +329 -0
- package/components/tooltip/demo.html +350 -0
- package/dist/index.cjs +441 -329
- package/dist/index.cjs.map +1 -1
- package/dist/index.cjs.min.map +1 -1
- package/dist/index.esm.js +441 -329
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +3 -3
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +441 -329
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +3 -3
- package/dist/index.iife.min.js.map +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.esm.js +1 -1
- package/dist/types/controller.d.ts +1 -1
- package/dist/types/element.d.ts +10 -10
- package/dist/types/events.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/observe.d.ts +1 -1
- package/dist/types/request-response.d.ts +2 -3
- package/dist/types/router.d.ts +1 -1
- package/package.json +9 -10
- package/dist/components/accordion/snice-accordion-item.d.ts +0 -25
- package/dist/components/accordion/snice-accordion-item.js +0 -260
- package/dist/components/accordion/snice-accordion-item.js.map +0 -1
- package/dist/components/accordion/snice-accordion.d.ts +0 -28
- package/dist/components/accordion/snice-accordion.js +0 -221
- package/dist/components/accordion/snice-accordion.js.map +0 -1
- package/dist/components/accordion/snice-accordion.types.d.ts +0 -29
- package/dist/components/accordion/snice-accordion.types.js +0 -2
- package/dist/components/accordion/snice-accordion.types.js.map +0 -1
- package/dist/components/alert/snice-alert.d.ts +0 -26
- package/dist/components/alert/snice-alert.js +0 -191
- package/dist/components/alert/snice-alert.js.map +0 -1
- package/dist/components/alert/snice-alert.types.d.ts +0 -11
- package/dist/components/alert/snice-alert.types.js +0 -2
- package/dist/components/alert/snice-alert.types.js.map +0 -1
- package/dist/components/avatar/snice-avatar.d.ts +0 -24
- package/dist/components/avatar/snice-avatar.js +0 -177
- package/dist/components/avatar/snice-avatar.js.map +0 -1
- package/dist/components/avatar/snice-avatar.types.d.ts +0 -12
- package/dist/components/avatar/snice-avatar.types.js +0 -2
- package/dist/components/avatar/snice-avatar.types.js.map +0 -1
- package/dist/components/badge/snice-badge.d.ts +0 -25
- package/dist/components/badge/snice-badge.js +0 -157
- package/dist/components/badge/snice-badge.js.map +0 -1
- package/dist/components/badge/snice-badge.types.d.ts +0 -15
- package/dist/components/badge/snice-badge.types.js +0 -2
- package/dist/components/badge/snice-badge.types.js.map +0 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +0 -27
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +0 -212
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +0 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.d.ts +0 -23
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.js +0 -2
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.js.map +0 -1
- package/dist/components/breadcrumbs/snice-crumb.d.ts +0 -9
- package/dist/components/breadcrumbs/snice-crumb.js +0 -50
- package/dist/components/breadcrumbs/snice-crumb.js.map +0 -1
- package/dist/components/button/snice-button.d.ts +0 -32
- package/dist/components/button/snice-button.js +0 -212
- package/dist/components/button/snice-button.js.map +0 -1
- package/dist/components/button/snice-button.types.d.ts +0 -23
- package/dist/components/button/snice-button.types.js +0 -2
- package/dist/components/button/snice-button.types.js.map +0 -1
- package/dist/components/card/snice-card.d.ts +0 -19
- package/dist/components/card/snice-card.js +0 -132
- package/dist/components/card/snice-card.js.map +0 -1
- package/dist/components/card/snice-card.types.d.ts +0 -9
- package/dist/components/card/snice-card.types.js +0 -2
- package/dist/components/card/snice-card.types.js.map +0 -1
- package/dist/components/checkbox/snice-checkbox.d.ts +0 -34
- package/dist/components/checkbox/snice-checkbox.js +0 -289
- package/dist/components/checkbox/snice-checkbox.js.map +0 -1
- package/dist/components/checkbox/snice-checkbox.types.d.ts +0 -20
- package/dist/components/checkbox/snice-checkbox.types.js +0 -2
- package/dist/components/checkbox/snice-checkbox.types.js.map +0 -1
- package/dist/components/chip/snice-chip.d.ts +0 -28
- package/dist/components/chip/snice-chip.js +0 -203
- package/dist/components/chip/snice-chip.js.map +0 -1
- package/dist/components/chip/snice-chip.types.d.ts +0 -14
- package/dist/components/chip/snice-chip.types.js +0 -2
- package/dist/components/chip/snice-chip.types.js.map +0 -1
- package/dist/components/date-picker/snice-date-picker.d.ts +0 -82
- package/dist/components/date-picker/snice-date-picker.js +0 -880
- package/dist/components/date-picker/snice-date-picker.js.map +0 -1
- package/dist/components/date-picker/snice-date-picker.types.d.ts +0 -71
- package/dist/components/date-picker/snice-date-picker.types.js +0 -2
- package/dist/components/date-picker/snice-date-picker.types.js.map +0 -1
- package/dist/components/divider/snice-divider.d.ts +0 -17
- package/dist/components/divider/snice-divider.js +0 -111
- package/dist/components/divider/snice-divider.js.map +0 -1
- package/dist/components/divider/snice-divider.types.d.ts +0 -14
- package/dist/components/divider/snice-divider.types.js +0 -2
- package/dist/components/divider/snice-divider.types.js.map +0 -1
- package/dist/components/drawer/snice-drawer.d.ts +0 -37
- package/dist/components/drawer/snice-drawer.js +0 -335
- package/dist/components/drawer/snice-drawer.js.map +0 -1
- package/dist/components/drawer/snice-drawer.types.d.ts +0 -16
- package/dist/components/drawer/snice-drawer.types.js +0 -2
- package/dist/components/drawer/snice-drawer.types.js.map +0 -1
- package/dist/components/input/snice-input.d.ts +0 -65
- package/dist/components/input/snice-input.js +0 -603
- package/dist/components/input/snice-input.js.map +0 -1
- package/dist/components/input/snice-input.types.d.ts +0 -53
- package/dist/components/input/snice-input.types.js +0 -2
- package/dist/components/input/snice-input.types.js.map +0 -1
- package/dist/components/layout/snice-layout-blog.d.ts +0 -4
- package/dist/components/layout/snice-layout-blog.js +0 -56
- package/dist/components/layout/snice-layout-blog.js.map +0 -1
- package/dist/components/layout/snice-layout-card.d.ts +0 -6
- package/dist/components/layout/snice-layout-card.js +0 -53
- package/dist/components/layout/snice-layout-card.js.map +0 -1
- package/dist/components/layout/snice-layout-centered.d.ts +0 -5
- package/dist/components/layout/snice-layout-centered.js +0 -38
- package/dist/components/layout/snice-layout-centered.js.map +0 -1
- package/dist/components/layout/snice-layout-dashboard.d.ts +0 -4
- package/dist/components/layout/snice-layout-dashboard.js +0 -53
- package/dist/components/layout/snice-layout-dashboard.js.map +0 -1
- package/dist/components/layout/snice-layout-fullscreen.d.ts +0 -5
- package/dist/components/layout/snice-layout-fullscreen.js +0 -50
- package/dist/components/layout/snice-layout-fullscreen.js.map +0 -1
- package/dist/components/layout/snice-layout-landing.d.ts +0 -4
- package/dist/components/layout/snice-layout-landing.js +0 -55
- package/dist/components/layout/snice-layout-landing.js.map +0 -1
- package/dist/components/layout/snice-layout-minimal.d.ts +0 -4
- package/dist/components/layout/snice-layout-minimal.js +0 -27
- package/dist/components/layout/snice-layout-minimal.js.map +0 -1
- package/dist/components/layout/snice-layout-sidebar.d.ts +0 -5
- package/dist/components/layout/snice-layout-sidebar.js +0 -64
- package/dist/components/layout/snice-layout-sidebar.js.map +0 -1
- package/dist/components/layout/snice-layout-split.d.ts +0 -6
- package/dist/components/layout/snice-layout-split.js +0 -47
- package/dist/components/layout/snice-layout-split.js.map +0 -1
- package/dist/components/layout/snice-layout.d.ts +0 -4
- package/dist/components/layout/snice-layout.js +0 -43
- package/dist/components/layout/snice-layout.js.map +0 -1
- package/dist/components/layout/snice-layout.types.d.ts +0 -3
- package/dist/components/layout/snice-layout.types.js +0 -2
- package/dist/components/layout/snice-layout.types.js.map +0 -1
- package/dist/components/login/snice-login.d.ts +0 -45
- package/dist/components/login/snice-login.js +0 -385
- package/dist/components/login/snice-login.js.map +0 -1
- package/dist/components/login/snice-login.types.d.ts +0 -31
- package/dist/components/login/snice-login.types.js +0 -2
- package/dist/components/login/snice-login.types.js.map +0 -1
- package/dist/components/modal/snice-modal.d.ts +0 -32
- package/dist/components/modal/snice-modal.js +0 -288
- package/dist/components/modal/snice-modal.js.map +0 -1
- package/dist/components/modal/snice-modal.types.d.ts +0 -18
- package/dist/components/modal/snice-modal.types.js +0 -2
- package/dist/components/modal/snice-modal.types.js.map +0 -1
- package/dist/components/pagination/snice-pagination.d.ts +0 -26
- package/dist/components/pagination/snice-pagination.js +0 -373
- package/dist/components/pagination/snice-pagination.js.map +0 -1
- package/dist/components/pagination/snice-pagination.types.d.ts +0 -18
- package/dist/components/pagination/snice-pagination.types.js +0 -2
- package/dist/components/pagination/snice-pagination.types.js.map +0 -1
- package/dist/components/progress/snice-progress.d.ts +0 -35
- package/dist/components/progress/snice-progress.js +0 -295
- package/dist/components/progress/snice-progress.js.map +0 -1
- package/dist/components/progress/snice-progress.types.d.ts +0 -18
- package/dist/components/progress/snice-progress.types.js +0 -2
- package/dist/components/progress/snice-progress.types.js.map +0 -1
- package/dist/components/radio/snice-radio.d.ts +0 -33
- package/dist/components/radio/snice-radio.js +0 -286
- package/dist/components/radio/snice-radio.js.map +0 -1
- package/dist/components/radio/snice-radio.types.d.ts +0 -19
- package/dist/components/radio/snice-radio.types.js +0 -2
- package/dist/components/radio/snice-radio.types.js.map +0 -1
- package/dist/components/select/snice-option.d.ts +0 -17
- package/dist/components/select/snice-option.js +0 -77
- package/dist/components/select/snice-option.js.map +0 -1
- package/dist/components/select/snice-option.types.d.ts +0 -14
- package/dist/components/select/snice-option.types.js +0 -2
- package/dist/components/select/snice-option.types.js.map +0 -1
- package/dist/components/select/snice-select.d.ts +0 -89
- package/dist/components/select/snice-select.js +0 -900
- package/dist/components/select/snice-select.js.map +0 -1
- package/dist/components/select/snice-select.types.d.ts +0 -49
- package/dist/components/select/snice-select.types.js +0 -2
- package/dist/components/select/snice-select.types.js.map +0 -1
- package/dist/components/skeleton/snice-skeleton.d.ts +0 -16
- package/dist/components/skeleton/snice-skeleton.js +0 -159
- package/dist/components/skeleton/snice-skeleton.js.map +0 -1
- package/dist/components/skeleton/snice-skeleton.types.d.ts +0 -10
- package/dist/components/skeleton/snice-skeleton.types.js +0 -2
- package/dist/components/skeleton/snice-skeleton.types.js.map +0 -1
- package/dist/components/switch/snice-switch.d.ts +0 -38
- package/dist/components/switch/snice-switch.js +0 -309
- package/dist/components/switch/snice-switch.js.map +0 -1
- package/dist/components/switch/snice-switch.types.d.ts +0 -21
- package/dist/components/switch/snice-switch.types.js +0 -2
- package/dist/components/switch/snice-switch.types.js.map +0 -1
- package/dist/components/symbols.d.ts +0 -1
- package/dist/components/symbols.js +0 -20
- package/dist/components/symbols.js.map +0 -1
- package/dist/components/table/snice-cell-boolean.d.ts +0 -21
- package/dist/components/table/snice-cell-boolean.js +0 -152
- package/dist/components/table/snice-cell-boolean.js.map +0 -1
- package/dist/components/table/snice-cell-date.d.ts +0 -24
- package/dist/components/table/snice-cell-date.js +0 -240
- package/dist/components/table/snice-cell-date.js.map +0 -1
- package/dist/components/table/snice-cell-duration.d.ts +0 -16
- package/dist/components/table/snice-cell-duration.js +0 -123
- package/dist/components/table/snice-cell-duration.js.map +0 -1
- package/dist/components/table/snice-cell-filesize.d.ts +0 -16
- package/dist/components/table/snice-cell-filesize.js +0 -119
- package/dist/components/table/snice-cell-filesize.js.map +0 -1
- package/dist/components/table/snice-cell-number.d.ts +0 -23
- package/dist/components/table/snice-cell-number.js +0 -202
- package/dist/components/table/snice-cell-number.js.map +0 -1
- package/dist/components/table/snice-cell-progress.d.ts +0 -17
- package/dist/components/table/snice-cell-progress.js +0 -114
- package/dist/components/table/snice-cell-progress.js.map +0 -1
- package/dist/components/table/snice-cell-rating.d.ts +0 -17
- package/dist/components/table/snice-cell-rating.js +0 -113
- package/dist/components/table/snice-cell-rating.js.map +0 -1
- package/dist/components/table/snice-cell-sparkline.d.ts +0 -29
- package/dist/components/table/snice-cell-sparkline.js +0 -290
- package/dist/components/table/snice-cell-sparkline.js.map +0 -1
- package/dist/components/table/snice-cell-text.d.ts +0 -19
- package/dist/components/table/snice-cell-text.js +0 -153
- package/dist/components/table/snice-cell-text.js.map +0 -1
- package/dist/components/table/snice-cell.d.ts +0 -32
- package/dist/components/table/snice-cell.js +0 -451
- package/dist/components/table/snice-cell.js.map +0 -1
- package/dist/components/table/snice-column.d.ts +0 -62
- package/dist/components/table/snice-column.js +0 -440
- package/dist/components/table/snice-column.js.map +0 -1
- package/dist/components/table/snice-header.d.ts +0 -33
- package/dist/components/table/snice-header.js +0 -303
- package/dist/components/table/snice-header.js.map +0 -1
- package/dist/components/table/snice-progress.d.ts +0 -10
- package/dist/components/table/snice-progress.js +0 -91
- package/dist/components/table/snice-progress.js.map +0 -1
- package/dist/components/table/snice-rating.d.ts +0 -9
- package/dist/components/table/snice-rating.js +0 -68
- package/dist/components/table/snice-rating.js.map +0 -1
- package/dist/components/table/snice-row.d.ts +0 -43
- package/dist/components/table/snice-row.js +0 -365
- package/dist/components/table/snice-row.js.map +0 -1
- package/dist/components/table/snice-table.d.ts +0 -69
- package/dist/components/table/snice-table.js +0 -814
- package/dist/components/table/snice-table.js.map +0 -1
- package/dist/components/table/snice-table.types.d.ts +0 -137
- package/dist/components/table/snice-table.types.js +0 -2
- package/dist/components/table/snice-table.types.js.map +0 -1
- package/dist/components/tabs/snice-tab-panel.d.ts +0 -12
- package/dist/components/tabs/snice-tab-panel.js +0 -78
- package/dist/components/tabs/snice-tab-panel.js.map +0 -1
- package/dist/components/tabs/snice-tab.d.ts +0 -13
- package/dist/components/tabs/snice-tab.js +0 -90
- package/dist/components/tabs/snice-tab.js.map +0 -1
- package/dist/components/tabs/snice-tabs.d.ts +0 -34
- package/dist/components/tabs/snice-tabs.js +0 -367
- package/dist/components/tabs/snice-tabs.js.map +0 -1
- package/dist/components/tabs/snice-tabs.types.d.ts +0 -23
- package/dist/components/tabs/snice-tabs.types.js +0 -2
- package/dist/components/tabs/snice-tabs.types.js.map +0 -1
- package/dist/components/toast/snice-toast-container.d.ts +0 -25
- package/dist/components/toast/snice-toast-container.js +0 -251
- package/dist/components/toast/snice-toast-container.js.map +0 -1
- package/dist/components/toast/snice-toast.d.ts +0 -23
- package/dist/components/toast/snice-toast.js +0 -316
- package/dist/components/toast/snice-toast.js.map +0 -1
- package/dist/components/toast/snice-toast.types.d.ts +0 -30
- package/dist/components/toast/snice-toast.types.js +0 -2
- package/dist/components/toast/snice-toast.types.js.map +0 -1
- package/dist/components/tooltip/snice-tooltip.d.ts +0 -50
- package/dist/components/tooltip/snice-tooltip.js +0 -656
- package/dist/components/tooltip/snice-tooltip.js.map +0 -1
- package/dist/components/tooltip/snice-tooltip.types.d.ts +0 -18
- package/dist/components/tooltip/snice-tooltip.types.js +0 -2
- package/dist/components/tooltip/snice-tooltip.types.js.map +0 -1
- package/dist/components/transitions.d.ts +0 -11
- package/dist/components/transitions.js +0 -69
- package/dist/components/transitions.js.map +0 -1
- package/dist/index.cjs.min +0 -15
- package/dist/symbols.cjs +0 -103
- package/dist/transitions.cjs +0 -219
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { element, property, watch } from 'snice';
|
|
11
|
-
let SniceColumn = class SniceColumn extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.key = '';
|
|
15
|
-
this.label = '';
|
|
16
|
-
this.type = 'text';
|
|
17
|
-
this.align = 'left';
|
|
18
|
-
this.width = '';
|
|
19
|
-
this.sortable = true;
|
|
20
|
-
this.filterable = true;
|
|
21
|
-
this.wrap = false;
|
|
22
|
-
this.ellipsis = true;
|
|
23
|
-
this.tooltip = false;
|
|
24
|
-
this.conditionalFormats = [];
|
|
25
|
-
}
|
|
26
|
-
html() {
|
|
27
|
-
return `<slot></slot>`;
|
|
28
|
-
}
|
|
29
|
-
// Set custom formatter function
|
|
30
|
-
setFormatter(formatter) {
|
|
31
|
-
this.formatter = formatter;
|
|
32
|
-
this.notifyTableOfChange();
|
|
33
|
-
}
|
|
34
|
-
// Add conditional formatting rule
|
|
35
|
-
addConditionalFormat(format) {
|
|
36
|
-
this.conditionalFormats.push(format);
|
|
37
|
-
this.notifyTableOfChange();
|
|
38
|
-
}
|
|
39
|
-
// Remove conditional formatting rule
|
|
40
|
-
removeConditionalFormat(index) {
|
|
41
|
-
this.conditionalFormats.splice(index, 1);
|
|
42
|
-
this.notifyTableOfChange();
|
|
43
|
-
}
|
|
44
|
-
// Clear all conditional formatting
|
|
45
|
-
clearConditionalFormats() {
|
|
46
|
-
this.conditionalFormats = [];
|
|
47
|
-
this.notifyTableOfChange();
|
|
48
|
-
}
|
|
49
|
-
// Get the complete column definition for the table
|
|
50
|
-
getColumnDefinition() {
|
|
51
|
-
const definition = {
|
|
52
|
-
key: this.key,
|
|
53
|
-
label: this.label,
|
|
54
|
-
type: this.type,
|
|
55
|
-
align: this.align,
|
|
56
|
-
width: this.width,
|
|
57
|
-
sortable: this.sortable,
|
|
58
|
-
filterable: this.filterable,
|
|
59
|
-
wrap: this.wrap,
|
|
60
|
-
ellipsis: this.ellipsis,
|
|
61
|
-
tooltip: this.tooltip,
|
|
62
|
-
formatter: this.formatter,
|
|
63
|
-
conditionalFormats: this.conditionalFormats
|
|
64
|
-
};
|
|
65
|
-
// Add type-specific formatting
|
|
66
|
-
if (this.type === 'number' || this.type === 'currency' || this.type === 'percent' ||
|
|
67
|
-
this.type === 'accounting' || this.type === 'scientific' || this.type === 'fraction') {
|
|
68
|
-
const numberFormat = {};
|
|
69
|
-
if (this.decimals !== undefined)
|
|
70
|
-
numberFormat.decimals = this.decimals;
|
|
71
|
-
if (this.thousandsSeparator !== undefined)
|
|
72
|
-
numberFormat.thousandsSeparator = this.thousandsSeparator;
|
|
73
|
-
if (this.numberPrefix)
|
|
74
|
-
numberFormat.prefix = this.numberPrefix;
|
|
75
|
-
if (this.numberSuffix)
|
|
76
|
-
numberFormat.suffix = this.numberSuffix;
|
|
77
|
-
if (this.negativeStyle)
|
|
78
|
-
numberFormat.negativeStyle = this.negativeStyle;
|
|
79
|
-
if (Object.keys(numberFormat).length > 0) {
|
|
80
|
-
definition.numberFormat = numberFormat;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (this.type === 'date') {
|
|
84
|
-
const dateFormat = {};
|
|
85
|
-
if (this.dateFormat)
|
|
86
|
-
dateFormat.format = this.dateFormat;
|
|
87
|
-
if (this.customDateFormat)
|
|
88
|
-
dateFormat.customFormat = this.customDateFormat;
|
|
89
|
-
if (this.dateLocale)
|
|
90
|
-
dateFormat.locale = this.dateLocale;
|
|
91
|
-
if (Object.keys(dateFormat).length > 0) {
|
|
92
|
-
definition.dateFormat = dateFormat;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (this.type === 'boolean') {
|
|
96
|
-
const booleanFormat = {};
|
|
97
|
-
if (this.trueValue)
|
|
98
|
-
booleanFormat.trueValue = this.trueValue;
|
|
99
|
-
if (this.falseValue)
|
|
100
|
-
booleanFormat.falseValue = this.falseValue;
|
|
101
|
-
if (this.useSymbols !== undefined)
|
|
102
|
-
booleanFormat.useSymbols = this.useSymbols;
|
|
103
|
-
if (this.trueSymbol)
|
|
104
|
-
booleanFormat.trueSymbol = this.trueSymbol;
|
|
105
|
-
if (this.falseSymbol)
|
|
106
|
-
booleanFormat.falseSymbol = this.falseSymbol;
|
|
107
|
-
if (Object.keys(booleanFormat).length > 0) {
|
|
108
|
-
definition.booleanFormat = booleanFormat;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (this.type === 'rating') {
|
|
112
|
-
const ratingFormat = {};
|
|
113
|
-
if (this.ratingMax !== undefined)
|
|
114
|
-
ratingFormat.max = this.ratingMax;
|
|
115
|
-
if (this.ratingSymbol)
|
|
116
|
-
ratingFormat.symbol = this.ratingSymbol;
|
|
117
|
-
if (this.ratingEmptySymbol)
|
|
118
|
-
ratingFormat.emptySymbol = this.ratingEmptySymbol;
|
|
119
|
-
if (this.ratingColor)
|
|
120
|
-
ratingFormat.color = this.ratingColor;
|
|
121
|
-
if (Object.keys(ratingFormat).length > 0) {
|
|
122
|
-
definition.ratingFormat = ratingFormat;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (this.type === 'progress') {
|
|
126
|
-
const progressFormat = {};
|
|
127
|
-
if (this.progressMax !== undefined)
|
|
128
|
-
progressFormat.max = this.progressMax;
|
|
129
|
-
if (this.showPercentage !== undefined)
|
|
130
|
-
progressFormat.showPercentage = this.showPercentage;
|
|
131
|
-
if (this.progressColor)
|
|
132
|
-
progressFormat.color = this.progressColor;
|
|
133
|
-
if (this.progressBgColor)
|
|
134
|
-
progressFormat.backgroundColor = this.progressBgColor;
|
|
135
|
-
if (this.progressHeight)
|
|
136
|
-
progressFormat.height = this.progressHeight;
|
|
137
|
-
if (Object.keys(progressFormat).length > 0) {
|
|
138
|
-
definition.progressFormat = progressFormat;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (this.type === 'sparkline') {
|
|
142
|
-
const sparklineFormat = {};
|
|
143
|
-
if (this.sparklineType)
|
|
144
|
-
sparklineFormat.type = this.sparklineType;
|
|
145
|
-
if (this.sparklineColor)
|
|
146
|
-
sparklineFormat.color = this.sparklineColor;
|
|
147
|
-
if (this.sparklineWidth !== undefined)
|
|
148
|
-
sparklineFormat.width = this.sparklineWidth;
|
|
149
|
-
if (this.sparklineHeight !== undefined)
|
|
150
|
-
sparklineFormat.height = this.sparklineHeight;
|
|
151
|
-
if (Object.keys(sparklineFormat).length > 0) {
|
|
152
|
-
definition.sparklineFormat = sparklineFormat;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
// Add cell style if any style properties are set
|
|
156
|
-
const cellStyle = {};
|
|
157
|
-
if (this.cellBgColor)
|
|
158
|
-
cellStyle.backgroundColor = this.cellBgColor;
|
|
159
|
-
if (this.cellColor)
|
|
160
|
-
cellStyle.color = this.cellColor;
|
|
161
|
-
if (this.cellFontWeight)
|
|
162
|
-
cellStyle.fontWeight = this.cellFontWeight;
|
|
163
|
-
if (this.cellFontStyle)
|
|
164
|
-
cellStyle.fontStyle = this.cellFontStyle;
|
|
165
|
-
if (this.cellFontSize)
|
|
166
|
-
cellStyle.fontSize = this.cellFontSize;
|
|
167
|
-
if (this.cellTextDecoration)
|
|
168
|
-
cellStyle.textDecoration = this.cellTextDecoration;
|
|
169
|
-
if (Object.keys(cellStyle).length > 0) {
|
|
170
|
-
definition.style = cellStyle;
|
|
171
|
-
}
|
|
172
|
-
return definition;
|
|
173
|
-
}
|
|
174
|
-
handleBasicPropsChange() {
|
|
175
|
-
this.notifyTableOfChange();
|
|
176
|
-
}
|
|
177
|
-
handleNumberFormatChange() {
|
|
178
|
-
if (this.type === 'number' || this.type === 'currency' || this.type === 'percent' ||
|
|
179
|
-
this.type === 'accounting' || this.type === 'scientific' || this.type === 'fraction') {
|
|
180
|
-
this.notifyTableOfChange();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
handleDateFormatChange() {
|
|
184
|
-
if (this.type === 'date') {
|
|
185
|
-
this.notifyTableOfChange();
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
handleBooleanFormatChange() {
|
|
189
|
-
if (this.type === 'boolean') {
|
|
190
|
-
this.notifyTableOfChange();
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
handleRatingFormatChange() {
|
|
194
|
-
if (this.type === 'rating') {
|
|
195
|
-
this.notifyTableOfChange();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
handleProgressFormatChange() {
|
|
199
|
-
if (this.type === 'progress') {
|
|
200
|
-
this.notifyTableOfChange();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
handleSparklineFormatChange() {
|
|
204
|
-
if (this.type === 'sparkline') {
|
|
205
|
-
this.notifyTableOfChange();
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
handleStyleChange() {
|
|
209
|
-
this.notifyTableOfChange();
|
|
210
|
-
}
|
|
211
|
-
notifyTableOfChange() {
|
|
212
|
-
// Dispatch event to parent table to notify of column definition change
|
|
213
|
-
this.dispatchEvent(new CustomEvent('@snice/column-changed', {
|
|
214
|
-
detail: { column: this.getColumnDefinition() },
|
|
215
|
-
bubbles: true,
|
|
216
|
-
composed: true
|
|
217
|
-
}));
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
__decorate([
|
|
221
|
-
property({ reflect: true }),
|
|
222
|
-
__metadata("design:type", String)
|
|
223
|
-
], SniceColumn.prototype, "key", void 0);
|
|
224
|
-
__decorate([
|
|
225
|
-
property({ reflect: true }),
|
|
226
|
-
__metadata("design:type", String)
|
|
227
|
-
], SniceColumn.prototype, "label", void 0);
|
|
228
|
-
__decorate([
|
|
229
|
-
property({ reflect: true }),
|
|
230
|
-
__metadata("design:type", String)
|
|
231
|
-
], SniceColumn.prototype, "type", void 0);
|
|
232
|
-
__decorate([
|
|
233
|
-
property({ reflect: true }),
|
|
234
|
-
__metadata("design:type", String)
|
|
235
|
-
], SniceColumn.prototype, "align", void 0);
|
|
236
|
-
__decorate([
|
|
237
|
-
property({ reflect: true }),
|
|
238
|
-
__metadata("design:type", String)
|
|
239
|
-
], SniceColumn.prototype, "width", void 0);
|
|
240
|
-
__decorate([
|
|
241
|
-
property({ type: Boolean, reflect: true }),
|
|
242
|
-
__metadata("design:type", Boolean)
|
|
243
|
-
], SniceColumn.prototype, "sortable", void 0);
|
|
244
|
-
__decorate([
|
|
245
|
-
property({ type: Boolean, reflect: true }),
|
|
246
|
-
__metadata("design:type", Boolean)
|
|
247
|
-
], SniceColumn.prototype, "filterable", void 0);
|
|
248
|
-
__decorate([
|
|
249
|
-
property({ type: Boolean, reflect: true }),
|
|
250
|
-
__metadata("design:type", Boolean)
|
|
251
|
-
], SniceColumn.prototype, "wrap", void 0);
|
|
252
|
-
__decorate([
|
|
253
|
-
property({ type: Boolean, reflect: true }),
|
|
254
|
-
__metadata("design:type", Boolean)
|
|
255
|
-
], SniceColumn.prototype, "ellipsis", void 0);
|
|
256
|
-
__decorate([
|
|
257
|
-
property({ type: Boolean, reflect: true }),
|
|
258
|
-
__metadata("design:type", Boolean)
|
|
259
|
-
], SniceColumn.prototype, "tooltip", void 0);
|
|
260
|
-
__decorate([
|
|
261
|
-
property({ type: Number, attribute: 'decimals' }),
|
|
262
|
-
__metadata("design:type", Number)
|
|
263
|
-
], SniceColumn.prototype, "decimals", void 0);
|
|
264
|
-
__decorate([
|
|
265
|
-
property({ type: Boolean, attribute: 'thousands-separator' }),
|
|
266
|
-
__metadata("design:type", Boolean)
|
|
267
|
-
], SniceColumn.prototype, "thousandsSeparator", void 0);
|
|
268
|
-
__decorate([
|
|
269
|
-
property({ attribute: 'number-prefix' }),
|
|
270
|
-
__metadata("design:type", String)
|
|
271
|
-
], SniceColumn.prototype, "numberPrefix", void 0);
|
|
272
|
-
__decorate([
|
|
273
|
-
property({ attribute: 'number-suffix' }),
|
|
274
|
-
__metadata("design:type", String)
|
|
275
|
-
], SniceColumn.prototype, "numberSuffix", void 0);
|
|
276
|
-
__decorate([
|
|
277
|
-
property({ attribute: 'negative-style' }),
|
|
278
|
-
__metadata("design:type", String)
|
|
279
|
-
], SniceColumn.prototype, "negativeStyle", void 0);
|
|
280
|
-
__decorate([
|
|
281
|
-
property({ attribute: 'date-format' }),
|
|
282
|
-
__metadata("design:type", String)
|
|
283
|
-
], SniceColumn.prototype, "dateFormat", void 0);
|
|
284
|
-
__decorate([
|
|
285
|
-
property({ attribute: 'custom-date-format' }),
|
|
286
|
-
__metadata("design:type", String)
|
|
287
|
-
], SniceColumn.prototype, "customDateFormat", void 0);
|
|
288
|
-
__decorate([
|
|
289
|
-
property({ attribute: 'date-locale' }),
|
|
290
|
-
__metadata("design:type", String)
|
|
291
|
-
], SniceColumn.prototype, "dateLocale", void 0);
|
|
292
|
-
__decorate([
|
|
293
|
-
property({ attribute: 'true-value' }),
|
|
294
|
-
__metadata("design:type", String)
|
|
295
|
-
], SniceColumn.prototype, "trueValue", void 0);
|
|
296
|
-
__decorate([
|
|
297
|
-
property({ attribute: 'false-value' }),
|
|
298
|
-
__metadata("design:type", String)
|
|
299
|
-
], SniceColumn.prototype, "falseValue", void 0);
|
|
300
|
-
__decorate([
|
|
301
|
-
property({ type: Boolean, attribute: 'use-symbols' }),
|
|
302
|
-
__metadata("design:type", Boolean)
|
|
303
|
-
], SniceColumn.prototype, "useSymbols", void 0);
|
|
304
|
-
__decorate([
|
|
305
|
-
property({ attribute: 'true-symbol' }),
|
|
306
|
-
__metadata("design:type", String)
|
|
307
|
-
], SniceColumn.prototype, "trueSymbol", void 0);
|
|
308
|
-
__decorate([
|
|
309
|
-
property({ attribute: 'false-symbol' }),
|
|
310
|
-
__metadata("design:type", String)
|
|
311
|
-
], SniceColumn.prototype, "falseSymbol", void 0);
|
|
312
|
-
__decorate([
|
|
313
|
-
property({ type: Number, attribute: 'rating-max' }),
|
|
314
|
-
__metadata("design:type", Number)
|
|
315
|
-
], SniceColumn.prototype, "ratingMax", void 0);
|
|
316
|
-
__decorate([
|
|
317
|
-
property({ attribute: 'rating-symbol' }),
|
|
318
|
-
__metadata("design:type", String)
|
|
319
|
-
], SniceColumn.prototype, "ratingSymbol", void 0);
|
|
320
|
-
__decorate([
|
|
321
|
-
property({ attribute: 'rating-empty-symbol' }),
|
|
322
|
-
__metadata("design:type", String)
|
|
323
|
-
], SniceColumn.prototype, "ratingEmptySymbol", void 0);
|
|
324
|
-
__decorate([
|
|
325
|
-
property({ attribute: 'rating-color' }),
|
|
326
|
-
__metadata("design:type", String)
|
|
327
|
-
], SniceColumn.prototype, "ratingColor", void 0);
|
|
328
|
-
__decorate([
|
|
329
|
-
property({ type: Number, attribute: 'progress-max' }),
|
|
330
|
-
__metadata("design:type", Number)
|
|
331
|
-
], SniceColumn.prototype, "progressMax", void 0);
|
|
332
|
-
__decorate([
|
|
333
|
-
property({ type: Boolean, attribute: 'show-percentage' }),
|
|
334
|
-
__metadata("design:type", Boolean)
|
|
335
|
-
], SniceColumn.prototype, "showPercentage", void 0);
|
|
336
|
-
__decorate([
|
|
337
|
-
property({ attribute: 'progress-color' }),
|
|
338
|
-
__metadata("design:type", String)
|
|
339
|
-
], SniceColumn.prototype, "progressColor", void 0);
|
|
340
|
-
__decorate([
|
|
341
|
-
property({ attribute: 'progress-bg-color' }),
|
|
342
|
-
__metadata("design:type", String)
|
|
343
|
-
], SniceColumn.prototype, "progressBgColor", void 0);
|
|
344
|
-
__decorate([
|
|
345
|
-
property({ attribute: 'progress-height' }),
|
|
346
|
-
__metadata("design:type", String)
|
|
347
|
-
], SniceColumn.prototype, "progressHeight", void 0);
|
|
348
|
-
__decorate([
|
|
349
|
-
property({ attribute: 'sparkline-type' }),
|
|
350
|
-
__metadata("design:type", String)
|
|
351
|
-
], SniceColumn.prototype, "sparklineType", void 0);
|
|
352
|
-
__decorate([
|
|
353
|
-
property({ attribute: 'sparkline-color' }),
|
|
354
|
-
__metadata("design:type", String)
|
|
355
|
-
], SniceColumn.prototype, "sparklineColor", void 0);
|
|
356
|
-
__decorate([
|
|
357
|
-
property({ type: Number, attribute: 'sparkline-width' }),
|
|
358
|
-
__metadata("design:type", Number)
|
|
359
|
-
], SniceColumn.prototype, "sparklineWidth", void 0);
|
|
360
|
-
__decorate([
|
|
361
|
-
property({ type: Number, attribute: 'sparkline-height' }),
|
|
362
|
-
__metadata("design:type", Number)
|
|
363
|
-
], SniceColumn.prototype, "sparklineHeight", void 0);
|
|
364
|
-
__decorate([
|
|
365
|
-
property({ attribute: 'cell-bg-color' }),
|
|
366
|
-
__metadata("design:type", String)
|
|
367
|
-
], SniceColumn.prototype, "cellBgColor", void 0);
|
|
368
|
-
__decorate([
|
|
369
|
-
property({ attribute: 'cell-color' }),
|
|
370
|
-
__metadata("design:type", String)
|
|
371
|
-
], SniceColumn.prototype, "cellColor", void 0);
|
|
372
|
-
__decorate([
|
|
373
|
-
property({ attribute: 'cell-font-weight' }),
|
|
374
|
-
__metadata("design:type", String)
|
|
375
|
-
], SniceColumn.prototype, "cellFontWeight", void 0);
|
|
376
|
-
__decorate([
|
|
377
|
-
property({ attribute: 'cell-font-style' }),
|
|
378
|
-
__metadata("design:type", String)
|
|
379
|
-
], SniceColumn.prototype, "cellFontStyle", void 0);
|
|
380
|
-
__decorate([
|
|
381
|
-
property({ attribute: 'cell-font-size' }),
|
|
382
|
-
__metadata("design:type", String)
|
|
383
|
-
], SniceColumn.prototype, "cellFontSize", void 0);
|
|
384
|
-
__decorate([
|
|
385
|
-
property({ attribute: 'cell-text-decoration' }),
|
|
386
|
-
__metadata("design:type", String)
|
|
387
|
-
], SniceColumn.prototype, "cellTextDecoration", void 0);
|
|
388
|
-
__decorate([
|
|
389
|
-
watch('key', 'label', 'type', 'align', 'width', 'sortable', 'filterable', 'wrap', 'ellipsis', 'tooltip'),
|
|
390
|
-
__metadata("design:type", Function),
|
|
391
|
-
__metadata("design:paramtypes", []),
|
|
392
|
-
__metadata("design:returntype", void 0)
|
|
393
|
-
], SniceColumn.prototype, "handleBasicPropsChange", null);
|
|
394
|
-
__decorate([
|
|
395
|
-
watch('decimals', 'thousandsSeparator', 'numberPrefix', 'numberSuffix', 'negativeStyle'),
|
|
396
|
-
__metadata("design:type", Function),
|
|
397
|
-
__metadata("design:paramtypes", []),
|
|
398
|
-
__metadata("design:returntype", void 0)
|
|
399
|
-
], SniceColumn.prototype, "handleNumberFormatChange", null);
|
|
400
|
-
__decorate([
|
|
401
|
-
watch('dateFormat', 'customDateFormat', 'dateLocale'),
|
|
402
|
-
__metadata("design:type", Function),
|
|
403
|
-
__metadata("design:paramtypes", []),
|
|
404
|
-
__metadata("design:returntype", void 0)
|
|
405
|
-
], SniceColumn.prototype, "handleDateFormatChange", null);
|
|
406
|
-
__decorate([
|
|
407
|
-
watch('trueValue', 'falseValue', 'useSymbols', 'trueSymbol', 'falseSymbol'),
|
|
408
|
-
__metadata("design:type", Function),
|
|
409
|
-
__metadata("design:paramtypes", []),
|
|
410
|
-
__metadata("design:returntype", void 0)
|
|
411
|
-
], SniceColumn.prototype, "handleBooleanFormatChange", null);
|
|
412
|
-
__decorate([
|
|
413
|
-
watch('ratingMax', 'ratingSymbol', 'ratingEmptySymbol', 'ratingColor'),
|
|
414
|
-
__metadata("design:type", Function),
|
|
415
|
-
__metadata("design:paramtypes", []),
|
|
416
|
-
__metadata("design:returntype", void 0)
|
|
417
|
-
], SniceColumn.prototype, "handleRatingFormatChange", null);
|
|
418
|
-
__decorate([
|
|
419
|
-
watch('progressMax', 'showPercentage', 'progressColor', 'progressBgColor', 'progressHeight'),
|
|
420
|
-
__metadata("design:type", Function),
|
|
421
|
-
__metadata("design:paramtypes", []),
|
|
422
|
-
__metadata("design:returntype", void 0)
|
|
423
|
-
], SniceColumn.prototype, "handleProgressFormatChange", null);
|
|
424
|
-
__decorate([
|
|
425
|
-
watch('sparklineType', 'sparklineColor', 'sparklineWidth', 'sparklineHeight'),
|
|
426
|
-
__metadata("design:type", Function),
|
|
427
|
-
__metadata("design:paramtypes", []),
|
|
428
|
-
__metadata("design:returntype", void 0)
|
|
429
|
-
], SniceColumn.prototype, "handleSparklineFormatChange", null);
|
|
430
|
-
__decorate([
|
|
431
|
-
watch('cellBgColor', 'cellColor', 'cellFontWeight', 'cellFontStyle', 'cellFontSize', 'cellTextDecoration'),
|
|
432
|
-
__metadata("design:type", Function),
|
|
433
|
-
__metadata("design:paramtypes", []),
|
|
434
|
-
__metadata("design:returntype", void 0)
|
|
435
|
-
], SniceColumn.prototype, "handleStyleChange", null);
|
|
436
|
-
SniceColumn = __decorate([
|
|
437
|
-
element('snice-column')
|
|
438
|
-
], SniceColumn);
|
|
439
|
-
export { SniceColumn };
|
|
440
|
-
//# sourceMappingURL=snice-column.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snice-column.js","sourceRoot":"","sources":["../../../components/table/snice-column.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAiB1C,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,WAAW;IAArC;;QAEL,QAAG,GAAW,EAAE,CAAC;QAGjB,UAAK,GAAW,EAAE,CAAC;QAGnB,SAAI,GAAe,MAAM,CAAC;QAG1B,UAAK,GAAgB,MAAM,CAAC;QAG5B,UAAK,GAAW,EAAE,CAAC;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,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,CAAC;;;;4DAK3E;AAGO;IADP,KAAK,CAAC,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,aAAa,CAAC;;;;2DAKtE;AAGO;IADP,KAAK,CAAC,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;;;;6DAK5F;AAGO;IADP,KAAK,CAAC,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,CAAC;;;;8DAK7E;AAGO;IADP,KAAK,CAAC,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,oBAAoB,CAAC;;;;oDAG1G;AArUU,WAAW;IADvB,OAAO,CAAC,cAAc,CAAC;GACX,WAAW,CA+UvB"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { SniceHeaderElement, ColumnDefinition, TableSort, SortDirection } from './snice-table.types';
|
|
2
|
-
export declare class SniceHeader extends HTMLElement implements SniceHeaderElement {
|
|
3
|
-
sticky: boolean;
|
|
4
|
-
columns: ColumnDefinition[];
|
|
5
|
-
selectable: boolean;
|
|
6
|
-
sortable: boolean;
|
|
7
|
-
currentSort: TableSort;
|
|
8
|
-
allSelected: boolean;
|
|
9
|
-
someSelected: boolean;
|
|
10
|
-
html(): string;
|
|
11
|
-
init(): void;
|
|
12
|
-
updateHeaderAttributes(): void;
|
|
13
|
-
updateHeaderCells(): void;
|
|
14
|
-
updateSelectAllCheckbox(): void;
|
|
15
|
-
handleSort(e: MouseEvent): void;
|
|
16
|
-
handleSelectAll(e: Event): void;
|
|
17
|
-
handleKeyDown(e: KeyboardEvent): void;
|
|
18
|
-
private renderSelectAllCheckbox;
|
|
19
|
-
private renderHeaderCells;
|
|
20
|
-
private renderHeaderCell;
|
|
21
|
-
private renderSortIndicator;
|
|
22
|
-
private renderFilterButton;
|
|
23
|
-
private getHeaderCellStyles;
|
|
24
|
-
private getAriaSortValue;
|
|
25
|
-
private dispatchSort;
|
|
26
|
-
private dispatchSelectAll;
|
|
27
|
-
private dispatchFilter;
|
|
28
|
-
setSortState(column: string, direction: SortDirection): void;
|
|
29
|
-
setSelectionState(allSelected: boolean, someSelected?: boolean): void;
|
|
30
|
-
getColumnElement(columnKey: string): HTMLElement | null;
|
|
31
|
-
updateColumns(columns: ColumnDefinition[]): void;
|
|
32
|
-
highlightColumn(columnKey: string, duration?: number): void;
|
|
33
|
-
}
|