@scania/tegel 0.0.1-beta.3 → 0.0.1-beta.5
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/index-e1c79686.js +1912 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/popper-11d5f714.js +1801 -0
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +34 -0
- package/dist/cjs/sdds-accordion.cjs.entry.js +21 -0
- package/dist/cjs/sdds-badges.cjs.entry.js +55 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +173 -0
- package/dist/cjs/sdds-button.cjs.entry.js +36 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js +66 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +92 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +335 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js +141 -0
- package/dist/cjs/sdds-icon.cjs.entry.js +42 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +96 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +211 -0
- package/dist/cjs/sdds-modal.cjs.entry.js +49 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +95 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +76 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +75 -0
- package/dist/cjs/sdds-slider.cjs.entry.js +336 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js +21 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +81 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js +289 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js +165 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js +100 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +66 -0
- package/dist/cjs/sdds-table.cjs.entry.js +69 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js +61 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js +82 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js +95 -0
- package/dist/cjs/tegel.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +40 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +134 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +146 -0
- package/dist/collection/components/accordion/accordion.css +77 -0
- package/dist/collection/components/accordion/accordion.js +62 -0
- package/dist/collection/components/accordion/accordion.stories.js +91 -0
- package/dist/collection/components/badge/badge.stories.js +101 -0
- package/dist/collection/components/badge/badges.css +42 -0
- package/dist/collection/components/badge/badges.js +150 -0
- package/dist/collection/components/banner/banner.stories.js +93 -0
- package/dist/collection/components/block/block.stories.js +46 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +26 -0
- package/dist/collection/components/button/button-component.js +154 -0
- package/dist/collection/components/button/button-native.stories.js +183 -0
- package/dist/collection/components/button/button-webcomponent.stories.js +182 -0
- package/dist/collection/components/button/button.css +658 -0
- package/dist/collection/components/card/card.stories.js +181 -0
- package/dist/collection/components/checkbox/checkbox.stories.js +54 -0
- package/dist/collection/components/chips/chips.stories.js +124 -0
- package/dist/collection/components/data-table/native-table.stories.js +182 -0
- package/dist/collection/components/data-table/table/table.css +15 -0
- package/dist/collection/components/data-table/table/table.js +253 -0
- package/dist/collection/components/data-table/table-body/table-body.css +22 -0
- package/dist/collection/components/data-table/table-body/table-body.js +425 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +40 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +169 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +196 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +164 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +79 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +155 -0
- package/dist/collection/components/data-table/table-component-basic.stories.js +163 -0
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +129 -0
- package/dist/collection/components/data-table/table-component-bodydata.stories.js +58 -0
- package/dist/collection/components/data-table/table-component-custom-width.stories.js +198 -0
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +153 -0
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +137 -0
- package/dist/collection/components/data-table/table-component-filtering.stories.js +139 -0
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +160 -0
- package/dist/collection/components/data-table/table-component-pagination.stories.js +129 -0
- package/dist/collection/components/data-table/table-component-sorting.stories.js +107 -0
- package/dist/collection/components/data-table/table-footer/table-footer.css +93 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js +355 -0
- package/dist/collection/components/data-table/table-header/table-header.css +204 -0
- package/dist/collection/components/data-table/table-header/table-header.js +153 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +126 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +320 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +92 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +142 -0
- package/dist/collection/components/datetime/datetime.css +375 -0
- package/dist/collection/components/datetime/datetime.js +251 -0
- package/dist/collection/components/datetime/datetime.stories.js +149 -0
- package/dist/collection/components/divider/divider.stories.js +116 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +339 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +130 -0
- package/dist/collection/components/dropdown/dropdown-native.stories.js +90 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +185 -0
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +151 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +146 -0
- package/dist/collection/components/dropdown/dropdown.css +891 -0
- package/dist/collection/components/dropdown/dropdown.js +554 -0
- package/dist/collection/components/footer/footer.stories.js +100 -0
- package/dist/collection/components/header/header-all.stories.js +217 -0
- package/dist/collection/components/header/header-default.stories.js +47 -0
- package/dist/collection/components/header/header-inline.stories.js +113 -0
- package/dist/collection/components/header/header-search.stories.js +263 -0
- package/dist/collection/components/header/header-toolbar.stories.js +204 -0
- package/dist/collection/components/icon/icon-font.stories.js +57 -0
- package/dist/collection/components/icon/icon-web-component.stories.js +51 -0
- package/dist/collection/components/icon/icon.css +16 -0
- package/dist/collection/components/icon/icon.js +89 -0
- package/dist/collection/components/icon/iconsArray.js +2 -0
- package/dist/collection/components/link/link.stories.js +45 -0
- package/dist/collection/components/message/message.stories.js +117 -0
- package/dist/collection/components/modal/modal-native.stories.js +121 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js +78 -0
- package/dist/collection/components/modal/modal.css +324 -0
- package/dist/collection/components/modal/modal.js +146 -0
- package/dist/collection/components/popover-canvas/popover-canvas.css +20 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +190 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +87 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +132 -0
- package/dist/collection/components/popover-menu/popover-menu.css +19 -0
- package/dist/collection/components/popover-menu/popover-menu.js +189 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js +109 -0
- package/dist/collection/components/radio-button/radio-button.stories.js +68 -0
- package/dist/collection/components/side-menu/side-menu.stories.js +182 -0
- package/dist/collection/components/slider/slider.css +260 -0
- package/dist/collection/components/slider/slider.js +682 -0
- package/dist/collection/components/slider/slider.stories.js +251 -0
- package/dist/collection/components/spinner/spinner.css +79 -0
- package/dist/collection/components/spinner/spinner.js +61 -0
- package/dist/collection/components/spinner/spinner.stories.js +59 -0
- package/dist/collection/components/stepper/stepper.stories.js +139 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +159 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +302 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +65 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +172 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +126 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +43 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +153 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +103 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +32 -0
- package/dist/collection/components/textarea/textarea.css +283 -0
- package/dist/collection/components/textarea/textarea.js +336 -0
- package/dist/collection/components/textarea/textarea.stories.js +149 -0
- package/dist/collection/components/textfield/textfield.css +494 -0
- package/dist/collection/components/textfield/textfield.js +359 -0
- package/dist/collection/components/textfield/textfield.stories.js +222 -0
- package/dist/collection/components/toast/toast.stories.js +119 -0
- package/dist/collection/components/toggle/toggle.stories.js +62 -0
- package/dist/collection/components/tooltip/tooltip.css +46 -0
- package/dist/collection/components/tooltip/tooltip.js +200 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +113 -0
- package/dist/collection/components/utility/colour/background-color.stories.js +96 -0
- package/dist/collection/components/utility/colour/text-color.stories.js +94 -0
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js +38 -0
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js +71 -0
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +40 -0
- package/dist/collection/foundations-stories/grid/grid.stories.js +386 -0
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +100 -0
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +94 -0
- package/dist/collection/foundations-stories/typography/typography-body.stories.js +16 -0
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js +17 -0
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js +39 -0
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +12 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/components/dropdown-option.js +0 -1
- package/dist/components/dropdown.js +0 -1
- package/dist/components/icon.js +0 -1
- package/dist/components/sdds-accordion-item.js +0 -1
- package/dist/components/sdds-accordion.js +0 -1
- package/dist/components/sdds-badges.js +0 -1
- package/dist/components/sdds-button.js +0 -1
- package/dist/components/sdds-datetime.js +0 -1
- package/dist/components/sdds-dropdown-filter.js +0 -1
- package/dist/components/sdds-header-cell.js +0 -1
- package/dist/components/sdds-inline-tabs-fullbleed.js +0 -1
- package/dist/components/sdds-inline-tabs.js +0 -1
- package/dist/components/sdds-modal.js +0 -1
- package/dist/components/sdds-navigation-tabs.js +0 -1
- package/dist/components/sdds-popover-canvas.js +0 -1
- package/dist/components/sdds-popover-menu.js +0 -1
- package/dist/components/sdds-slider.js +0 -1
- package/dist/components/sdds-spinner.js +0 -1
- package/dist/components/sdds-table-body-row-expandable.js +0 -1
- package/dist/components/sdds-table-body.js +0 -1
- package/dist/components/sdds-table-footer.js +0 -1
- package/dist/components/sdds-table-header.js +0 -1
- package/dist/components/sdds-table-toolbar.js +0 -1
- package/dist/components/sdds-table.js +0 -1
- package/dist/components/sdds-textarea.js +0 -1
- package/dist/components/sdds-textfield.js +0 -1
- package/dist/components/sdds-tooltip.js +0 -1
- package/dist/components/table-body-cell.js +0 -1
- package/dist/components/table-body-row.js +0 -1
- package/dist/esm/index-b67b15a6.js +1884 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/popper-f860750c.js +1799 -0
- package/dist/esm/sdds-accordion-item.entry.js +30 -0
- package/dist/esm/sdds-accordion.entry.js +17 -0
- package/dist/esm/sdds-badges.entry.js +51 -0
- package/dist/esm/sdds-body-cell_2.entry.js +168 -0
- package/dist/esm/sdds-button.entry.js +32 -0
- package/dist/esm/sdds-datetime.entry.js +62 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +88 -0
- package/dist/esm/sdds-dropdown_2.entry.js +330 -0
- package/dist/esm/sdds-header-cell.entry.js +137 -0
- package/dist/esm/sdds-icon.entry.js +38 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +92 -0
- package/dist/esm/sdds-inline-tabs.entry.js +207 -0
- package/dist/esm/sdds-modal.entry.js +45 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +91 -0
- package/dist/esm/sdds-popover-canvas.entry.js +72 -0
- package/dist/esm/sdds-popover-menu.entry.js +71 -0
- package/dist/esm/sdds-slider.entry.js +332 -0
- package/dist/esm/sdds-spinner.entry.js +17 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js +77 -0
- package/dist/esm/sdds-table-body.entry.js +285 -0
- package/dist/esm/sdds-table-footer.entry.js +161 -0
- package/dist/esm/sdds-table-header.entry.js +96 -0
- package/dist/esm/sdds-table-toolbar.entry.js +62 -0
- package/dist/esm/sdds-table.entry.js +65 -0
- package/dist/esm/sdds-textarea.entry.js +57 -0
- package/dist/esm/sdds-textfield.entry.js +78 -0
- package/dist/esm/sdds-tooltip.entry.js +91 -0
- package/dist/esm/tegel.js +17 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/tegel/index.esm.js +0 -0
- package/dist/tegel/p-040efb32.entry.js +1 -0
- package/dist/tegel/p-12ca5cfa.entry.js +1 -0
- package/dist/tegel/p-157e1618.js +2 -0
- package/dist/tegel/p-1fe61cf6.entry.js +1 -0
- package/dist/tegel/p-2f376504.entry.js +1 -0
- package/dist/tegel/p-44ced895.entry.js +1 -0
- package/dist/tegel/p-4880f03d.entry.js +1 -0
- package/dist/tegel/p-4aba73a3.entry.js +1 -0
- package/dist/tegel/p-4b58a02c.entry.js +1 -0
- package/dist/tegel/p-4cb85347.entry.js +1 -0
- package/dist/tegel/p-52031b5a.entry.js +1 -0
- package/dist/tegel/p-677baf7f.entry.js +1 -0
- package/dist/tegel/p-71797eaf.entry.js +1 -0
- package/dist/tegel/p-7373284c.entry.js +1 -0
- package/dist/tegel/p-7451779b.entry.js +1 -0
- package/dist/tegel/p-77aeea3b.entry.js +1 -0
- package/dist/tegel/p-8582d6a7.entry.js +1 -0
- package/dist/tegel/p-96021bd0.entry.js +1 -0
- package/dist/tegel/p-9d8caf51.entry.js +1 -0
- package/dist/tegel/p-a5919930.entry.js +1 -0
- package/dist/tegel/p-b01cface.entry.js +1 -0
- package/dist/tegel/p-bf896643.entry.js +1 -0
- package/dist/tegel/p-c311725c.entry.js +1 -0
- package/dist/tegel/p-cf72dfd9.entry.js +1 -0
- package/dist/tegel/p-d91caec6.entry.js +1 -0
- package/dist/tegel/p-e10eec33.entry.js +1 -0
- package/dist/tegel/p-ec26fc38.js +1 -0
- package/dist/tegel/p-f2262a69.entry.js +1 -0
- package/dist/tegel/p-f2f7aa45.entry.js +1 -0
- package/dist/tegel/tegel.css +101 -0
- package/dist/tegel/tegel.esm.js +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +4 -4
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
// https://stackoverflow.com/questions/63051941/how-to-pass-data-as-array-of-object-in-stencil-js
|
|
2
|
+
// https://medium.com/@scottmgerstl/passing-an-object-or-array-to-stencil-dd62b7d92641
|
|
3
|
+
import { h, Host } from '@stencil/core';
|
|
4
|
+
export class Table {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.verticalDividers = false;
|
|
7
|
+
this.compactDesign = false;
|
|
8
|
+
this.noMinWidth = undefined;
|
|
9
|
+
this.whiteBackground = false;
|
|
10
|
+
this.enableMultiselect = false;
|
|
11
|
+
this.enableExpandableRows = false;
|
|
12
|
+
this.enableResponsive = false;
|
|
13
|
+
this.tableId = crypto.randomUUID();
|
|
14
|
+
}
|
|
15
|
+
emitTablePropsChangedEvent(changedValueName, changedValue) {
|
|
16
|
+
this.tablePropsChangedEvent.emit({
|
|
17
|
+
tableId: this.tableId,
|
|
18
|
+
changed: [changedValueName],
|
|
19
|
+
[changedValueName]: changedValue,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
enableMultiselectChanged(newValue) {
|
|
23
|
+
this.emitTablePropsChangedEvent('enableMultiselect', newValue);
|
|
24
|
+
}
|
|
25
|
+
enableExpandableRowsChanged(newValue) {
|
|
26
|
+
this.emitTablePropsChangedEvent('enableExpandableRows', newValue);
|
|
27
|
+
}
|
|
28
|
+
compactDesignChanged(newValue) {
|
|
29
|
+
this.emitTablePropsChangedEvent('compactDesign', newValue);
|
|
30
|
+
}
|
|
31
|
+
verticalDividersChanged(newValue) {
|
|
32
|
+
this.emitTablePropsChangedEvent('verticalDividers', newValue);
|
|
33
|
+
}
|
|
34
|
+
noMinWidthChanged(newValue) {
|
|
35
|
+
this.emitTablePropsChangedEvent('noMinWidth', newValue);
|
|
36
|
+
}
|
|
37
|
+
whiteBackgroundChanged(newValue) {
|
|
38
|
+
this.emitTablePropsChangedEvent('whiteBackground', newValue);
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return (h(Host, { class: { 'sdds-table--responsive': this.enableResponsive } }, h("table", { class: {
|
|
42
|
+
'sdds-table': true,
|
|
43
|
+
'sdds-table--compact': this.compactDesign,
|
|
44
|
+
'sdds-table--divider': this.verticalDividers,
|
|
45
|
+
'sdds-table--no-min-width': this.noMinWidth,
|
|
46
|
+
'sdds-table--on-white-bg': this.whiteBackground,
|
|
47
|
+
'sdds-table--responsive': this.enableResponsive,
|
|
48
|
+
} }, h("slot", null))));
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "sdds-table"; }
|
|
51
|
+
static get encapsulation() { return "shadow"; }
|
|
52
|
+
static get originalStyleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["table.scss"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get styleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["table.css"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get properties() {
|
|
63
|
+
return {
|
|
64
|
+
"verticalDividers": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "boolean",
|
|
69
|
+
"resolved": "boolean",
|
|
70
|
+
"references": {}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": false,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": "Enables style with vertical dividers between columns"
|
|
77
|
+
},
|
|
78
|
+
"attribute": "vertical-dividers",
|
|
79
|
+
"reflect": true,
|
|
80
|
+
"defaultValue": "false"
|
|
81
|
+
},
|
|
82
|
+
"compactDesign": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "boolean",
|
|
87
|
+
"resolved": "boolean",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Enables style where data-table toolbar, rows and footer are less high"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "compact-design",
|
|
97
|
+
"reflect": true,
|
|
98
|
+
"defaultValue": "false"
|
|
99
|
+
},
|
|
100
|
+
"noMinWidth": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "boolean",
|
|
105
|
+
"resolved": "boolean",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Enables to customise width on data-table columns"
|
|
113
|
+
},
|
|
114
|
+
"attribute": "no-min-width",
|
|
115
|
+
"reflect": true
|
|
116
|
+
},
|
|
117
|
+
"whiteBackground": {
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "boolean",
|
|
122
|
+
"resolved": "boolean",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "Changes a colors of data data-table when used on white background"
|
|
130
|
+
},
|
|
131
|
+
"attribute": "white-background",
|
|
132
|
+
"reflect": true,
|
|
133
|
+
"defaultValue": "false"
|
|
134
|
+
},
|
|
135
|
+
"enableMultiselect": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "boolean",
|
|
140
|
+
"resolved": "boolean",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "Enables multiselect feature of data-table"
|
|
148
|
+
},
|
|
149
|
+
"attribute": "enable-multiselect",
|
|
150
|
+
"reflect": true,
|
|
151
|
+
"defaultValue": "false"
|
|
152
|
+
},
|
|
153
|
+
"enableExpandableRows": {
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "boolean",
|
|
158
|
+
"resolved": "boolean",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "Enables extended row feature of data-table"
|
|
166
|
+
},
|
|
167
|
+
"attribute": "enable-expandable-rows",
|
|
168
|
+
"reflect": true,
|
|
169
|
+
"defaultValue": "false"
|
|
170
|
+
},
|
|
171
|
+
"enableResponsive": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "boolean",
|
|
176
|
+
"resolved": "boolean",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Enables table to take 100% available width with equal spacing of columns"
|
|
184
|
+
},
|
|
185
|
+
"attribute": "enable-responsive",
|
|
186
|
+
"reflect": true,
|
|
187
|
+
"defaultValue": "false"
|
|
188
|
+
},
|
|
189
|
+
"tableId": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "string",
|
|
194
|
+
"resolved": "string",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "ID used for internal table functionality and events, must be unique.\n\n**NOTE**: If you're listening for table events you need to set this ID yourself to identify the table, as the default ID is random and will be different every time."
|
|
202
|
+
},
|
|
203
|
+
"attribute": "table-id",
|
|
204
|
+
"reflect": false,
|
|
205
|
+
"defaultValue": "crypto.randomUUID()"
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
static get events() {
|
|
210
|
+
return [{
|
|
211
|
+
"method": "tablePropsChangedEvent",
|
|
212
|
+
"name": "tablePropsChangedEvent",
|
|
213
|
+
"bubbles": true,
|
|
214
|
+
"cancelable": true,
|
|
215
|
+
"composed": true,
|
|
216
|
+
"docs": {
|
|
217
|
+
"tags": [],
|
|
218
|
+
"text": "Broadcasts changes to the tables props"
|
|
219
|
+
},
|
|
220
|
+
"complexType": {
|
|
221
|
+
"original": "TablePropsChangedEvent",
|
|
222
|
+
"resolved": "{ tableId: string; changed: (keyof Props)[]; } & Partial<Props>",
|
|
223
|
+
"references": {
|
|
224
|
+
"TablePropsChangedEvent": {
|
|
225
|
+
"location": "local"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}];
|
|
230
|
+
}
|
|
231
|
+
static get elementRef() { return "host"; }
|
|
232
|
+
static get watchers() {
|
|
233
|
+
return [{
|
|
234
|
+
"propName": "enableMultiselect",
|
|
235
|
+
"methodName": "enableMultiselectChanged"
|
|
236
|
+
}, {
|
|
237
|
+
"propName": "enableExpandableRows",
|
|
238
|
+
"methodName": "enableExpandableRowsChanged"
|
|
239
|
+
}, {
|
|
240
|
+
"propName": "compactDesign",
|
|
241
|
+
"methodName": "compactDesignChanged"
|
|
242
|
+
}, {
|
|
243
|
+
"propName": "verticalDividers",
|
|
244
|
+
"methodName": "verticalDividersChanged"
|
|
245
|
+
}, {
|
|
246
|
+
"propName": "noMinWidth",
|
|
247
|
+
"methodName": "noMinWidthChanged"
|
|
248
|
+
}, {
|
|
249
|
+
"propName": "whiteBackground",
|
|
250
|
+
"methodName": "whiteBackgroundChanged"
|
|
251
|
+
}];
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
:host,
|
|
2
|
+
sdds-table-body {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: table-row-group;
|
|
5
|
+
}
|
|
6
|
+
:host *,
|
|
7
|
+
sdds-table-body * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
:host .sdds-table__info-message,
|
|
11
|
+
sdds-table-body .sdds-table__info-message {
|
|
12
|
+
font: var(--sdds-detail-02);
|
|
13
|
+
letter-spacing: var(--sdds-detail-02-ls);
|
|
14
|
+
display: table-cell;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
color: var(--sdds-grey-958);
|
|
17
|
+
padding: var(--sdds-spacing-element-16);
|
|
18
|
+
min-width: 192px;
|
|
19
|
+
vertical-align: top;
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
transition: background-color 200ms ease;
|
|
22
|
+
}
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { h, Host, } from '@stencil/core';
|
|
2
|
+
import dummyData from './dummy-data.json';
|
|
3
|
+
const relevantTableProps = [
|
|
4
|
+
'enableMultiselect',
|
|
5
|
+
'enableExpandableRows',
|
|
6
|
+
];
|
|
7
|
+
export class TableBody {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.uncheckAll = () => {
|
|
10
|
+
this.mainCheckboxStatus = false;
|
|
11
|
+
this.updateMainCheckboxEvent.emit([this.tableId, this.mainCheckboxStatus]);
|
|
12
|
+
this.updateBodyCheckboxesEvent.emit([this.tableId, this.mainCheckboxStatus]);
|
|
13
|
+
};
|
|
14
|
+
this.selectedDataExporter = () => {
|
|
15
|
+
const selectedRows = this.host.getElementsByClassName('sdds-table__row--selected');
|
|
16
|
+
this.multiselectArray = [];
|
|
17
|
+
for (let j = 0; j < selectedRows.length; j++) {
|
|
18
|
+
const rowCells = selectedRows[j].getElementsByTagName('sdds-body-cell');
|
|
19
|
+
const selectedObject = {};
|
|
20
|
+
for (let i = 0; i < rowCells.length; i++) {
|
|
21
|
+
const currentCellKey = rowCells[i].getAttribute('cell-key');
|
|
22
|
+
const currentCellValue = rowCells[i].getAttribute('cell-value');
|
|
23
|
+
selectedObject[currentCellKey] = currentCellValue;
|
|
24
|
+
}
|
|
25
|
+
this.multiselectArray.push(selectedObject);
|
|
26
|
+
}
|
|
27
|
+
this.multiselectArrayJSON = JSON.stringify(this.multiselectArray);
|
|
28
|
+
};
|
|
29
|
+
this.bodyCheckBoxClicked = () => {
|
|
30
|
+
const numberOfRows = this.host.getElementsByClassName('sdds-table__row').length;
|
|
31
|
+
const numberOfRowsSelected = this.host.getElementsByClassName('sdds-table__row--selected').length;
|
|
32
|
+
this.mainCheckboxStatus = numberOfRows === numberOfRowsSelected;
|
|
33
|
+
this.updateMainCheckboxEvent.emit([this.tableId, this.mainCheckboxStatus]);
|
|
34
|
+
this.selectedDataExporter();
|
|
35
|
+
};
|
|
36
|
+
this.disableFilteringFunction = false;
|
|
37
|
+
this.disableSortingFunction = false;
|
|
38
|
+
this.bodyData = undefined;
|
|
39
|
+
this.enableDummyData = false;
|
|
40
|
+
this.dummyData = JSON.stringify(dummyData);
|
|
41
|
+
this.rowsPerPage = 1;
|
|
42
|
+
this.enableMultiselect = false;
|
|
43
|
+
this.enablePaginationTableBody = false;
|
|
44
|
+
this.enableExpandableRows = true;
|
|
45
|
+
this.innerBodyData = [];
|
|
46
|
+
this.bodyDataManipulated = [];
|
|
47
|
+
this.bodyDataOriginal = [];
|
|
48
|
+
this.multiselectArray = [];
|
|
49
|
+
this.multiselectArrayJSON = undefined;
|
|
50
|
+
this.mainCheckboxStatus = false;
|
|
51
|
+
this.columnsNumber = 0;
|
|
52
|
+
this.disableAllSorting = false;
|
|
53
|
+
this.numberOfPages = 0;
|
|
54
|
+
this.paginationValue = 1;
|
|
55
|
+
this.tempPaginationDisable = false;
|
|
56
|
+
this.showNoResultsMessage = false;
|
|
57
|
+
this.tableId = '';
|
|
58
|
+
}
|
|
59
|
+
arrayDataWatcher(newValue) {
|
|
60
|
+
if (typeof newValue === 'string') {
|
|
61
|
+
this.innerBodyData = JSON.parse(newValue);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
this.innerBodyData = newValue;
|
|
65
|
+
}
|
|
66
|
+
this.bodyDataManipulated = [...this.innerBodyData];
|
|
67
|
+
this.bodyDataOriginal = [...this.innerBodyData];
|
|
68
|
+
}
|
|
69
|
+
tablePropsChangedEventListener(event) {
|
|
70
|
+
if (this.tableId === event.detail.tableId) {
|
|
71
|
+
event.detail.changed
|
|
72
|
+
.filter((changedProp) => relevantTableProps.includes(changedProp))
|
|
73
|
+
.forEach((changedProp) => {
|
|
74
|
+
if (typeof this[changedProp] === 'undefined') {
|
|
75
|
+
throw new Error(`Table prop is not supported: ${changedProp}`);
|
|
76
|
+
}
|
|
77
|
+
this[changedProp] = event.detail[changedProp];
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
static compareValues(key, order = 'asc') {
|
|
82
|
+
return function innerSort(a, b) {
|
|
83
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
84
|
+
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
85
|
+
// property doesn't exist on either object
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
88
|
+
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key];
|
|
89
|
+
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key];
|
|
90
|
+
let comparison = 0;
|
|
91
|
+
if (varA > varB) {
|
|
92
|
+
comparison = 1;
|
|
93
|
+
}
|
|
94
|
+
else if (varA < varB) {
|
|
95
|
+
comparison = -1;
|
|
96
|
+
}
|
|
97
|
+
return order === 'desc' ? comparison * -1 : comparison;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
sortData(keyValue, sortingDirection) {
|
|
101
|
+
if (!this.disableSortingFunction) {
|
|
102
|
+
if (this.enableMultiselect) {
|
|
103
|
+
// Uncheck all checkboxes as state of checkbox is lost on sorting. Do it only in case multiSelect is True.
|
|
104
|
+
this.uncheckAll();
|
|
105
|
+
}
|
|
106
|
+
// use spread operator to make enable sorting and modifying array, same as using .slice()
|
|
107
|
+
this.bodyDataManipulated = [...this.bodyDataManipulated];
|
|
108
|
+
this.bodyDataManipulated.sort(TableBody.compareValues(keyValue, sortingDirection));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Listen to sortColumnData from data-table-header-element
|
|
112
|
+
updateOptionsContent(event) {
|
|
113
|
+
const [receivedID, receivedKeyValue, receivedSortingDirection] = event.detail;
|
|
114
|
+
if (this.tableId === receivedID) {
|
|
115
|
+
this.sortData(receivedKeyValue, receivedSortingDirection);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
headCheckboxListener(event) {
|
|
119
|
+
if (this.tableId === event.detail[0]) {
|
|
120
|
+
[, this.mainCheckboxStatus] = event.detail;
|
|
121
|
+
this.selectedDataExporter();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// No need to read the value, event is here just to trigger another function
|
|
125
|
+
bodyCheckboxListener() {
|
|
126
|
+
this.bodyCheckBoxClicked();
|
|
127
|
+
}
|
|
128
|
+
searchFunction(searchTerm) {
|
|
129
|
+
if (!this.disableFilteringFunction) {
|
|
130
|
+
/*
|
|
131
|
+
// Logic for filtering JSON data on all columns
|
|
132
|
+
// Really nice solution, do not delete, might be needed in future
|
|
133
|
+
// Reason to go with upper one is not to lose selected state on checkboxes
|
|
134
|
+
if (searchTerm.length > 0) {
|
|
135
|
+
this.bodyDataManipulated = this.bodyDataOriginal.filter((option) =>
|
|
136
|
+
Object.keys(option).some(
|
|
137
|
+
(key) =>
|
|
138
|
+
String(option[key] ?? '')
|
|
139
|
+
.toLowerCase()
|
|
140
|
+
.indexOf(searchTerm) >= 0
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
} else {
|
|
144
|
+
this.bodyDataManipulated = this.bodyDataOriginal;
|
|
145
|
+
}
|
|
146
|
+
*/
|
|
147
|
+
// grab all rows in body
|
|
148
|
+
const dataRowsFiltering = this.host.querySelectorAll('sdds-table-body-row');
|
|
149
|
+
if (searchTerm.length > 0) {
|
|
150
|
+
if (this.enablePaginationTableBody) {
|
|
151
|
+
this.tempPaginationDisable = true;
|
|
152
|
+
}
|
|
153
|
+
dataRowsFiltering.forEach((item) => {
|
|
154
|
+
const cells = item.querySelectorAll('sdds-body-cell');
|
|
155
|
+
const cellValuesArray = [];
|
|
156
|
+
// go through cells and save cell-values in array
|
|
157
|
+
cells.forEach((cellItem) => {
|
|
158
|
+
const cellValue = cellItem.getAttribute('cell-value').toLowerCase();
|
|
159
|
+
cellValuesArray.push(cellValue);
|
|
160
|
+
});
|
|
161
|
+
// iterate over array of values and see if one matches search string
|
|
162
|
+
const matchCounter = cellValuesArray.find((element) => element.includes(searchTerm));
|
|
163
|
+
// if matches, show parent row, otherwise hide the row
|
|
164
|
+
if (matchCounter) {
|
|
165
|
+
item.classList.remove('sdds-table__row--hidden');
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
item.classList.add('sdds-table__row--hidden');
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
this.disableAllSorting = true;
|
|
172
|
+
this.sortingSwitcherEvent.emit([this.tableId, this.disableAllSorting]);
|
|
173
|
+
const dataRowsHidden = this.host.querySelectorAll('.sdds-table__row--hidden');
|
|
174
|
+
// If same, info message will be shown
|
|
175
|
+
this.showNoResultsMessage = dataRowsHidden.length === dataRowsFiltering.length;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
if (this.enablePaginationTableBody) {
|
|
179
|
+
this.tempPaginationDisable = false;
|
|
180
|
+
}
|
|
181
|
+
// Check if pagination is ON in order to prevent showing all rows
|
|
182
|
+
if (this.enablePaginationTableBody) {
|
|
183
|
+
// TODO: EMIT PAGINATION
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
dataRowsFiltering.forEach((item) => {
|
|
187
|
+
item.classList.remove('sdds-table__row--hidden');
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
this.disableAllSorting = false;
|
|
191
|
+
this.sortingSwitcherEvent.emit([this.tableId, this.disableAllSorting]);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Listen to tableFilteringTerm from tableToolbar component
|
|
196
|
+
tableFilteringTermListener(event) {
|
|
197
|
+
if (this.tableId === event.detail[0]) {
|
|
198
|
+
this.searchFunction(event.detail[1]);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
connectedCallback() {
|
|
202
|
+
this.tableEl = this.host.closest('sdds-table');
|
|
203
|
+
this.tableId = this.tableEl.tableId;
|
|
204
|
+
}
|
|
205
|
+
componentWillLoad() {
|
|
206
|
+
relevantTableProps.forEach((tablePropName) => {
|
|
207
|
+
this[tablePropName] = this.tableEl[tablePropName];
|
|
208
|
+
});
|
|
209
|
+
if (this.enableDummyData) {
|
|
210
|
+
this.bodyData = this.dummyData;
|
|
211
|
+
}
|
|
212
|
+
else if (this.bodyData) {
|
|
213
|
+
this.arrayDataWatcher(this.bodyData);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
componentWillRender() {
|
|
217
|
+
const headerColumnsNo = this.host.parentElement.querySelector('sdds-table-header').children.length;
|
|
218
|
+
// multiselect and expended features requires one extra column for controls...
|
|
219
|
+
if (this.enableMultiselect || this.enableExpandableRows) {
|
|
220
|
+
this.columnsNumber = headerColumnsNo + 1;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.columnsNumber = headerColumnsNo;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
render() {
|
|
227
|
+
return (h(Host, { "data-selected-rows": this.multiselectArrayJSON }, this.bodyDataManipulated.map((row) => (h("sdds-table-body-row", null, Object.keys(row).map((cellData) => (h("sdds-body-cell", { "cell-key": cellData, "cell-value": row[cellData] })))))), this.showNoResultsMessage && (h("tr", null, h("td", { class: "sdds-table__info-message", colSpan: this.columnsNumber }, "Unfortunately, no data matches your search term \uD83D\uDE15"))), h("slot", null)));
|
|
228
|
+
}
|
|
229
|
+
static get is() { return "sdds-table-body"; }
|
|
230
|
+
static get originalStyleUrls() {
|
|
231
|
+
return {
|
|
232
|
+
"$": ["table-body.scss"]
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
static get styleUrls() {
|
|
236
|
+
return {
|
|
237
|
+
"$": ["table-body.css"]
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
static get properties() {
|
|
241
|
+
return {
|
|
242
|
+
"disableFilteringFunction": {
|
|
243
|
+
"type": "boolean",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "boolean",
|
|
247
|
+
"resolved": "boolean",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Disables inbuilt filtering logic, leaving user an option to create own filter functionality while listening to events from sdds-table-toolbar component for search term"
|
|
255
|
+
},
|
|
256
|
+
"attribute": "disable-filtering-function",
|
|
257
|
+
"reflect": false,
|
|
258
|
+
"defaultValue": "false"
|
|
259
|
+
},
|
|
260
|
+
"disableSortingFunction": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "boolean",
|
|
265
|
+
"resolved": "boolean",
|
|
266
|
+
"references": {}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Disables inbuilt sorting logic, leaving user an option to create own sorting functionality while listening to events from sdds-header-cell component for sorting"
|
|
273
|
+
},
|
|
274
|
+
"attribute": "disable-sorting-function",
|
|
275
|
+
"reflect": false,
|
|
276
|
+
"defaultValue": "false"
|
|
277
|
+
},
|
|
278
|
+
"bodyData": {
|
|
279
|
+
"type": "any",
|
|
280
|
+
"mutable": false,
|
|
281
|
+
"complexType": {
|
|
282
|
+
"original": "any",
|
|
283
|
+
"resolved": "any",
|
|
284
|
+
"references": {}
|
|
285
|
+
},
|
|
286
|
+
"required": false,
|
|
287
|
+
"optional": false,
|
|
288
|
+
"docs": {
|
|
289
|
+
"tags": [],
|
|
290
|
+
"text": "Prop to pass JSON string which enables automatic rendering of table rows and cells"
|
|
291
|
+
},
|
|
292
|
+
"attribute": "body-data",
|
|
293
|
+
"reflect": false
|
|
294
|
+
},
|
|
295
|
+
"enableDummyData": {
|
|
296
|
+
"type": "boolean",
|
|
297
|
+
"mutable": false,
|
|
298
|
+
"complexType": {
|
|
299
|
+
"original": "boolean",
|
|
300
|
+
"resolved": "boolean",
|
|
301
|
+
"references": {}
|
|
302
|
+
},
|
|
303
|
+
"required": false,
|
|
304
|
+
"optional": false,
|
|
305
|
+
"docs": {
|
|
306
|
+
"tags": [],
|
|
307
|
+
"text": "Prop for showcase of rendering JSON in body-data, just for presentation purposes"
|
|
308
|
+
},
|
|
309
|
+
"attribute": "enable-dummy-data",
|
|
310
|
+
"reflect": false,
|
|
311
|
+
"defaultValue": "false"
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
static get states() {
|
|
316
|
+
return {
|
|
317
|
+
"dummyData": {},
|
|
318
|
+
"rowsPerPage": {},
|
|
319
|
+
"enableMultiselect": {},
|
|
320
|
+
"enablePaginationTableBody": {},
|
|
321
|
+
"enableExpandableRows": {},
|
|
322
|
+
"innerBodyData": {},
|
|
323
|
+
"bodyDataManipulated": {},
|
|
324
|
+
"bodyDataOriginal": {},
|
|
325
|
+
"multiselectArray": {},
|
|
326
|
+
"multiselectArrayJSON": {},
|
|
327
|
+
"mainCheckboxStatus": {},
|
|
328
|
+
"columnsNumber": {},
|
|
329
|
+
"disableAllSorting": {},
|
|
330
|
+
"numberOfPages": {},
|
|
331
|
+
"paginationValue": {},
|
|
332
|
+
"tempPaginationDisable": {},
|
|
333
|
+
"showNoResultsMessage": {},
|
|
334
|
+
"tableId": {}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
static get events() {
|
|
338
|
+
return [{
|
|
339
|
+
"method": "sortingSwitcherEvent",
|
|
340
|
+
"name": "sortingSwitcherEvent",
|
|
341
|
+
"bubbles": true,
|
|
342
|
+
"cancelable": true,
|
|
343
|
+
"composed": true,
|
|
344
|
+
"docs": {
|
|
345
|
+
"tags": [],
|
|
346
|
+
"text": "Event that sends unique table identifier and enable/disable status for sorting functionality"
|
|
347
|
+
},
|
|
348
|
+
"complexType": {
|
|
349
|
+
"original": "any",
|
|
350
|
+
"resolved": "any",
|
|
351
|
+
"references": {}
|
|
352
|
+
}
|
|
353
|
+
}, {
|
|
354
|
+
"method": "updateBodyCheckboxesEvent",
|
|
355
|
+
"name": "updateBodyCheckboxesEvent",
|
|
356
|
+
"bubbles": true,
|
|
357
|
+
"cancelable": true,
|
|
358
|
+
"composed": true,
|
|
359
|
+
"docs": {
|
|
360
|
+
"tags": [],
|
|
361
|
+
"text": "Sends unique table identifier and mainCheckbox status to all rows when multiselect feature is enabled"
|
|
362
|
+
},
|
|
363
|
+
"complexType": {
|
|
364
|
+
"original": "any",
|
|
365
|
+
"resolved": "any",
|
|
366
|
+
"references": {}
|
|
367
|
+
}
|
|
368
|
+
}, {
|
|
369
|
+
"method": "updateMainCheckboxEvent",
|
|
370
|
+
"name": "updateMainCheckboxEvent",
|
|
371
|
+
"bubbles": true,
|
|
372
|
+
"cancelable": true,
|
|
373
|
+
"composed": true,
|
|
374
|
+
"docs": {
|
|
375
|
+
"tags": [],
|
|
376
|
+
"text": "Sends unique table identifier and status if mainCheckbox should change its state based on selection status of single rows when multiselect feature is used"
|
|
377
|
+
},
|
|
378
|
+
"complexType": {
|
|
379
|
+
"original": "any",
|
|
380
|
+
"resolved": "any",
|
|
381
|
+
"references": {}
|
|
382
|
+
}
|
|
383
|
+
}];
|
|
384
|
+
}
|
|
385
|
+
static get elementRef() { return "host"; }
|
|
386
|
+
static get watchers() {
|
|
387
|
+
return [{
|
|
388
|
+
"propName": "bodyData",
|
|
389
|
+
"methodName": "arrayDataWatcher"
|
|
390
|
+
}];
|
|
391
|
+
}
|
|
392
|
+
static get listeners() {
|
|
393
|
+
return [{
|
|
394
|
+
"name": "tablePropsChangedEvent",
|
|
395
|
+
"method": "tablePropsChangedEventListener",
|
|
396
|
+
"target": "body",
|
|
397
|
+
"capture": false,
|
|
398
|
+
"passive": false
|
|
399
|
+
}, {
|
|
400
|
+
"name": "sortColumnDataEvent",
|
|
401
|
+
"method": "updateOptionsContent",
|
|
402
|
+
"target": "body",
|
|
403
|
+
"capture": false,
|
|
404
|
+
"passive": false
|
|
405
|
+
}, {
|
|
406
|
+
"name": "mainCheckboxSelectedEvent",
|
|
407
|
+
"method": "headCheckboxListener",
|
|
408
|
+
"target": "body",
|
|
409
|
+
"capture": false,
|
|
410
|
+
"passive": false
|
|
411
|
+
}, {
|
|
412
|
+
"name": "bodyRowToTable",
|
|
413
|
+
"method": "bodyCheckboxListener",
|
|
414
|
+
"target": "body",
|
|
415
|
+
"capture": false,
|
|
416
|
+
"passive": false
|
|
417
|
+
}, {
|
|
418
|
+
"name": "tableFilteringTerm",
|
|
419
|
+
"method": "tableFilteringTermListener",
|
|
420
|
+
"target": "body",
|
|
421
|
+
"capture": false,
|
|
422
|
+
"passive": false
|
|
423
|
+
}];
|
|
424
|
+
}
|
|
425
|
+
}
|