snice 1.13.2 → 1.13.4
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/README.md +1 -1
- package/dist/components/accordion/snice-accordion-item.d.ts +25 -0
- package/dist/components/accordion/snice-accordion-item.js +260 -0
- package/dist/components/accordion/snice-accordion-item.js.map +1 -0
- package/dist/components/accordion/snice-accordion.d.ts +28 -0
- package/dist/components/accordion/snice-accordion.js +221 -0
- package/dist/components/accordion/snice-accordion.js.map +1 -0
- package/dist/components/accordion/snice-accordion.types.d.ts +29 -0
- package/dist/components/accordion/snice-accordion.types.js +2 -0
- package/dist/components/accordion/snice-accordion.types.js.map +1 -0
- package/dist/components/alert/snice-alert.d.ts +26 -0
- package/dist/components/alert/snice-alert.js +191 -0
- package/dist/components/alert/snice-alert.js.map +1 -0
- package/dist/components/alert/snice-alert.types.d.ts +11 -0
- package/dist/components/alert/snice-alert.types.js +2 -0
- package/dist/components/alert/snice-alert.types.js.map +1 -0
- package/dist/components/avatar/snice-avatar.d.ts +24 -0
- package/dist/components/avatar/snice-avatar.js +177 -0
- package/dist/components/avatar/snice-avatar.js.map +1 -0
- package/dist/components/avatar/snice-avatar.types.d.ts +12 -0
- package/dist/components/avatar/snice-avatar.types.js +2 -0
- package/dist/components/avatar/snice-avatar.types.js.map +1 -0
- package/dist/components/badge/snice-badge.d.ts +25 -0
- package/dist/components/badge/snice-badge.js +157 -0
- package/dist/components/badge/snice-badge.js.map +1 -0
- package/dist/components/badge/snice-badge.types.d.ts +15 -0
- package/dist/components/badge/snice-badge.types.js +2 -0
- package/dist/components/badge/snice-badge.types.js.map +1 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +27 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +212 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.d.ts +23 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.js +2 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.js.map +1 -0
- package/dist/components/breadcrumbs/snice-crumb.d.ts +9 -0
- package/dist/components/breadcrumbs/snice-crumb.js +50 -0
- package/dist/components/breadcrumbs/snice-crumb.js.map +1 -0
- package/dist/components/button/snice-button.d.ts +32 -0
- package/dist/components/button/snice-button.js +212 -0
- package/dist/components/button/snice-button.js.map +1 -0
- package/dist/components/button/snice-button.types.d.ts +23 -0
- package/dist/components/button/snice-button.types.js +2 -0
- package/dist/components/button/snice-button.types.js.map +1 -0
- package/dist/components/card/snice-card.d.ts +19 -0
- package/dist/components/card/snice-card.js +132 -0
- package/dist/components/card/snice-card.js.map +1 -0
- package/dist/components/card/snice-card.types.d.ts +9 -0
- package/dist/components/card/snice-card.types.js +2 -0
- package/dist/components/card/snice-card.types.js.map +1 -0
- package/dist/components/checkbox/snice-checkbox.d.ts +34 -0
- package/dist/components/checkbox/snice-checkbox.js +289 -0
- package/dist/components/checkbox/snice-checkbox.js.map +1 -0
- package/dist/components/checkbox/snice-checkbox.types.d.ts +20 -0
- package/dist/components/checkbox/snice-checkbox.types.js +2 -0
- package/dist/components/checkbox/snice-checkbox.types.js.map +1 -0
- package/dist/components/chip/snice-chip.d.ts +28 -0
- package/dist/components/chip/snice-chip.js +203 -0
- package/dist/components/chip/snice-chip.js.map +1 -0
- package/dist/components/chip/snice-chip.types.d.ts +14 -0
- package/dist/components/chip/snice-chip.types.js +2 -0
- package/dist/components/chip/snice-chip.types.js.map +1 -0
- package/dist/components/date-picker/snice-date-picker.d.ts +82 -0
- package/dist/components/date-picker/snice-date-picker.js +880 -0
- package/dist/components/date-picker/snice-date-picker.js.map +1 -0
- package/dist/components/date-picker/snice-date-picker.types.d.ts +71 -0
- package/dist/components/date-picker/snice-date-picker.types.js +2 -0
- package/dist/components/date-picker/snice-date-picker.types.js.map +1 -0
- package/dist/components/divider/snice-divider.d.ts +17 -0
- package/dist/components/divider/snice-divider.js +111 -0
- package/dist/components/divider/snice-divider.js.map +1 -0
- package/dist/components/divider/snice-divider.types.d.ts +14 -0
- package/dist/components/divider/snice-divider.types.js +2 -0
- package/dist/components/divider/snice-divider.types.js.map +1 -0
- package/dist/components/drawer/snice-drawer.d.ts +37 -0
- package/dist/components/drawer/snice-drawer.js +335 -0
- package/dist/components/drawer/snice-drawer.js.map +1 -0
- package/dist/components/drawer/snice-drawer.types.d.ts +16 -0
- package/dist/components/drawer/snice-drawer.types.js +2 -0
- package/dist/components/drawer/snice-drawer.types.js.map +1 -0
- package/dist/components/input/snice-input.d.ts +65 -0
- package/dist/components/input/snice-input.js +603 -0
- package/dist/components/input/snice-input.js.map +1 -0
- package/dist/components/input/snice-input.types.d.ts +53 -0
- package/dist/components/input/snice-input.types.js +2 -0
- package/dist/components/input/snice-input.types.js.map +1 -0
- package/dist/components/layout/snice-layout-blog.d.ts +4 -0
- package/dist/components/layout/snice-layout-blog.js +56 -0
- package/dist/components/layout/snice-layout-blog.js.map +1 -0
- package/dist/components/layout/snice-layout-card.d.ts +6 -0
- package/dist/components/layout/snice-layout-card.js +53 -0
- package/dist/components/layout/snice-layout-card.js.map +1 -0
- package/dist/components/layout/snice-layout-centered.d.ts +5 -0
- package/dist/components/layout/snice-layout-centered.js +38 -0
- package/dist/components/layout/snice-layout-centered.js.map +1 -0
- package/dist/components/layout/snice-layout-dashboard.d.ts +4 -0
- package/dist/components/layout/snice-layout-dashboard.js +53 -0
- package/dist/components/layout/snice-layout-dashboard.js.map +1 -0
- package/dist/components/layout/snice-layout-fullscreen.d.ts +5 -0
- package/dist/components/layout/snice-layout-fullscreen.js +50 -0
- package/dist/components/layout/snice-layout-fullscreen.js.map +1 -0
- package/dist/components/layout/snice-layout-landing.d.ts +4 -0
- package/dist/components/layout/snice-layout-landing.js +55 -0
- package/dist/components/layout/snice-layout-landing.js.map +1 -0
- package/dist/components/layout/snice-layout-minimal.d.ts +4 -0
- package/dist/components/layout/snice-layout-minimal.js +27 -0
- package/dist/components/layout/snice-layout-minimal.js.map +1 -0
- package/dist/components/layout/snice-layout-sidebar.d.ts +5 -0
- package/dist/components/layout/snice-layout-sidebar.js +64 -0
- package/dist/components/layout/snice-layout-sidebar.js.map +1 -0
- package/dist/components/layout/snice-layout-split.d.ts +6 -0
- package/dist/components/layout/snice-layout-split.js +47 -0
- package/dist/components/layout/snice-layout-split.js.map +1 -0
- package/dist/components/layout/snice-layout.d.ts +4 -0
- package/dist/components/layout/snice-layout.js +43 -0
- package/dist/components/layout/snice-layout.js.map +1 -0
- package/dist/components/layout/snice-layout.types.d.ts +3 -0
- package/dist/components/layout/snice-layout.types.js +2 -0
- package/dist/components/layout/snice-layout.types.js.map +1 -0
- package/dist/components/login/snice-login.d.ts +45 -0
- package/dist/components/login/snice-login.js +385 -0
- package/dist/components/login/snice-login.js.map +1 -0
- package/dist/components/login/snice-login.types.d.ts +31 -0
- package/dist/components/login/snice-login.types.js +2 -0
- package/dist/components/login/snice-login.types.js.map +1 -0
- package/dist/components/modal/snice-modal.d.ts +32 -0
- package/dist/components/modal/snice-modal.js +288 -0
- package/dist/components/modal/snice-modal.js.map +1 -0
- package/dist/components/modal/snice-modal.types.d.ts +18 -0
- package/dist/components/modal/snice-modal.types.js +2 -0
- package/dist/components/modal/snice-modal.types.js.map +1 -0
- package/dist/components/pagination/snice-pagination.d.ts +26 -0
- package/dist/components/pagination/snice-pagination.js +373 -0
- package/dist/components/pagination/snice-pagination.js.map +1 -0
- package/dist/components/pagination/snice-pagination.types.d.ts +18 -0
- package/dist/components/pagination/snice-pagination.types.js +2 -0
- package/dist/components/pagination/snice-pagination.types.js.map +1 -0
- package/dist/components/progress/snice-progress.d.ts +35 -0
- package/dist/components/progress/snice-progress.js +295 -0
- package/dist/components/progress/snice-progress.js.map +1 -0
- package/dist/components/progress/snice-progress.types.d.ts +18 -0
- package/dist/components/progress/snice-progress.types.js +2 -0
- package/dist/components/progress/snice-progress.types.js.map +1 -0
- package/dist/components/radio/snice-radio.d.ts +33 -0
- package/dist/components/radio/snice-radio.js +286 -0
- package/dist/components/radio/snice-radio.js.map +1 -0
- package/dist/components/radio/snice-radio.types.d.ts +19 -0
- package/dist/components/radio/snice-radio.types.js +2 -0
- package/dist/components/radio/snice-radio.types.js.map +1 -0
- package/dist/components/select/snice-option.d.ts +17 -0
- package/dist/components/select/snice-option.js +77 -0
- package/dist/components/select/snice-option.js.map +1 -0
- package/dist/components/select/snice-option.types.d.ts +14 -0
- package/dist/components/select/snice-option.types.js +2 -0
- package/dist/components/select/snice-option.types.js.map +1 -0
- package/dist/components/select/snice-select.d.ts +89 -0
- package/dist/components/select/snice-select.js +900 -0
- package/dist/components/select/snice-select.js.map +1 -0
- package/dist/components/select/snice-select.types.d.ts +49 -0
- package/dist/components/select/snice-select.types.js +2 -0
- package/dist/components/select/snice-select.types.js.map +1 -0
- package/dist/components/skeleton/snice-skeleton.d.ts +16 -0
- package/dist/components/skeleton/snice-skeleton.js +159 -0
- package/dist/components/skeleton/snice-skeleton.js.map +1 -0
- package/dist/components/skeleton/snice-skeleton.types.d.ts +10 -0
- package/dist/components/skeleton/snice-skeleton.types.js +2 -0
- package/dist/components/skeleton/snice-skeleton.types.js.map +1 -0
- package/dist/components/switch/snice-switch.d.ts +38 -0
- package/dist/components/switch/snice-switch.js +309 -0
- package/dist/components/switch/snice-switch.js.map +1 -0
- package/dist/components/switch/snice-switch.types.d.ts +21 -0
- package/dist/components/switch/snice-switch.types.js +2 -0
- package/dist/components/switch/snice-switch.types.js.map +1 -0
- package/dist/components/symbols.d.ts +1 -0
- package/dist/components/symbols.js +20 -0
- package/dist/components/symbols.js.map +1 -0
- package/dist/components/table/snice-cell-boolean.d.ts +21 -0
- package/dist/components/table/snice-cell-boolean.js +152 -0
- package/dist/components/table/snice-cell-boolean.js.map +1 -0
- package/dist/components/table/snice-cell-date.d.ts +24 -0
- package/dist/components/table/snice-cell-date.js +240 -0
- package/dist/components/table/snice-cell-date.js.map +1 -0
- package/dist/components/table/snice-cell-duration.d.ts +16 -0
- package/dist/components/table/snice-cell-duration.js +123 -0
- package/dist/components/table/snice-cell-duration.js.map +1 -0
- package/dist/components/table/snice-cell-filesize.d.ts +16 -0
- package/dist/components/table/snice-cell-filesize.js +119 -0
- package/dist/components/table/snice-cell-filesize.js.map +1 -0
- package/dist/components/table/snice-cell-number.d.ts +23 -0
- package/dist/components/table/snice-cell-number.js +202 -0
- package/dist/components/table/snice-cell-number.js.map +1 -0
- package/dist/components/table/snice-cell-progress.d.ts +17 -0
- package/dist/components/table/snice-cell-progress.js +114 -0
- package/dist/components/table/snice-cell-progress.js.map +1 -0
- package/dist/components/table/snice-cell-rating.d.ts +17 -0
- package/dist/components/table/snice-cell-rating.js +113 -0
- package/dist/components/table/snice-cell-rating.js.map +1 -0
- package/dist/components/table/snice-cell-sparkline.d.ts +29 -0
- package/dist/components/table/snice-cell-sparkline.js +290 -0
- package/dist/components/table/snice-cell-sparkline.js.map +1 -0
- package/dist/components/table/snice-cell-text.d.ts +19 -0
- package/dist/components/table/snice-cell-text.js +153 -0
- package/dist/components/table/snice-cell-text.js.map +1 -0
- package/dist/components/table/snice-cell.d.ts +32 -0
- package/dist/components/table/snice-cell.js +451 -0
- package/dist/components/table/snice-cell.js.map +1 -0
- package/dist/components/table/snice-column.d.ts +62 -0
- package/dist/components/table/snice-column.js +440 -0
- package/dist/components/table/snice-column.js.map +1 -0
- package/dist/components/table/snice-header.d.ts +33 -0
- package/dist/components/table/snice-header.js +303 -0
- package/dist/components/table/snice-header.js.map +1 -0
- package/dist/components/table/snice-progress.d.ts +10 -0
- package/dist/components/table/snice-progress.js +91 -0
- package/dist/components/table/snice-progress.js.map +1 -0
- package/dist/components/table/snice-rating.d.ts +9 -0
- package/dist/components/table/snice-rating.js +68 -0
- package/dist/components/table/snice-rating.js.map +1 -0
- package/dist/components/table/snice-row.d.ts +43 -0
- package/dist/components/table/snice-row.js +365 -0
- package/dist/components/table/snice-row.js.map +1 -0
- package/dist/components/table/snice-table.d.ts +69 -0
- package/dist/components/table/snice-table.js +814 -0
- package/dist/components/table/snice-table.js.map +1 -0
- package/dist/components/table/snice-table.types.d.ts +137 -0
- package/dist/components/table/snice-table.types.js +2 -0
- package/dist/components/table/snice-table.types.js.map +1 -0
- package/dist/components/tabs/snice-tab-panel.d.ts +12 -0
- package/dist/components/tabs/snice-tab-panel.js +78 -0
- package/dist/components/tabs/snice-tab-panel.js.map +1 -0
- package/dist/components/tabs/snice-tab.d.ts +13 -0
- package/dist/components/tabs/snice-tab.js +90 -0
- package/dist/components/tabs/snice-tab.js.map +1 -0
- package/dist/components/tabs/snice-tabs.d.ts +34 -0
- package/dist/components/tabs/snice-tabs.js +367 -0
- package/dist/components/tabs/snice-tabs.js.map +1 -0
- package/dist/components/tabs/snice-tabs.types.d.ts +23 -0
- package/dist/components/tabs/snice-tabs.types.js +2 -0
- package/dist/components/tabs/snice-tabs.types.js.map +1 -0
- package/dist/components/toast/snice-toast-container.d.ts +25 -0
- package/dist/components/toast/snice-toast-container.js +251 -0
- package/dist/components/toast/snice-toast-container.js.map +1 -0
- package/dist/components/toast/snice-toast.d.ts +23 -0
- package/dist/components/toast/snice-toast.js +316 -0
- package/dist/components/toast/snice-toast.js.map +1 -0
- package/dist/components/toast/snice-toast.types.d.ts +30 -0
- package/dist/components/toast/snice-toast.types.js +2 -0
- package/dist/components/toast/snice-toast.types.js.map +1 -0
- package/dist/components/tooltip/snice-tooltip.d.ts +50 -0
- package/dist/components/tooltip/snice-tooltip.js +656 -0
- package/dist/components/tooltip/snice-tooltip.js.map +1 -0
- package/dist/components/tooltip/snice-tooltip.types.d.ts +18 -0
- package/dist/components/tooltip/snice-tooltip.types.js +2 -0
- package/dist/components/tooltip/snice-tooltip.types.js.map +1 -0
- package/dist/components/transitions.d.ts +11 -0
- package/dist/components/transitions.js +69 -0
- package/dist/components/transitions.js.map +1 -0
- package/dist/src/controller.d.ts +61 -0
- package/dist/src/controller.js +297 -0
- package/dist/src/controller.js.map +1 -0
- package/dist/src/element.d.ts +77 -0
- package/dist/src/element.js +805 -0
- package/dist/src/element.js.map +1 -0
- package/dist/src/events.d.ts +37 -0
- package/dist/src/events.js +289 -0
- package/dist/src/events.js.map +1 -0
- package/dist/src/global.d.ts +7 -0
- package/dist/src/global.js +23 -0
- package/dist/src/global.js.map +1 -0
- package/{src/index.ts → dist/src/index.d.ts} +1 -1
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/observe.d.ts +26 -0
- package/dist/src/observe.js +329 -0
- package/dist/src/observe.js.map +1 -0
- package/dist/src/request-response.d.ts +46 -0
- package/dist/src/request-response.js +267 -0
- package/dist/src/request-response.js.map +1 -0
- package/dist/src/router.d.ts +87 -0
- package/dist/src/router.js +375 -0
- package/dist/src/router.js.map +1 -0
- package/dist/src/symbols.d.ts +29 -0
- package/{src/symbols.ts → dist/src/symbols.js} +2 -12
- package/dist/src/symbols.js.map +1 -0
- package/dist/src/transitions.d.ts +50 -0
- package/dist/src/transitions.js +199 -0
- package/dist/src/transitions.js.map +1 -0
- package/package.json +6 -8
- package/src/controller.ts +0 -347
- package/src/element.ts +0 -897
- package/src/events.ts +0 -349
- package/src/global.ts +0 -31
- package/src/observe.ts +0 -414
- package/src/request-response.ts +0 -336
- package/src/router.ts +0 -552
- package/src/transitions.ts +0 -264
|
@@ -0,0 +1,440 @@
|
|
|
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 '../../src/index';
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,iBAAiB,CAAC;AAiBpD,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;QAGnB,aAAQ,GAAY,IAAI,CAAC;QAGzB,eAAU,GAAY,IAAI,CAAC;QAG3B,SAAI,GAAY,KAAK,CAAC;QAGtB,aAAQ,GAAY,IAAI,CAAC;QAGzB,YAAO,GAAY,KAAK,CAAC;QA0GjB,uBAAkB,GAAwB,EAAE,CAAC;IAwMvD,CAAC;IAtMC,IAAI;QACF,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,gCAAgC;IAChC,YAAY,CAAC,SAA4C;QACvD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,mBAAmB,EAAE,CA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EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,oBAAoB,CAAC;;;;oDAG1G;AArUU,WAAW;IADvB,OAAO,CAAC,cAAc,CAAC;GACX,WAAW,CA+UvB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
}
|