@db-ux/wc-core-components 4.5.4-table-c758ae7 → 4.5.4-tailwind-inline-5d37a00
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/README.md +11 -9
- package/dist/cjs/db-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/db-accordion.cjs.entry.js +2 -2
- package/dist/cjs/db-badge.cjs.entry.js +2 -2
- package/dist/cjs/db-brand.cjs.entry.js +2 -2
- package/dist/cjs/db-button.cjs.entry.js +2 -2
- package/dist/cjs/db-card.cjs.entry.js +3 -3
- package/dist/cjs/db-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/db-custom-button.cjs.entry.js +3 -3
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +10 -10
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +3 -3
- package/dist/cjs/db-custom-select.cjs.entry.js +6 -6
- package/dist/cjs/db-divider.cjs.entry.js +2 -2
- package/dist/cjs/db-drawer.cjs.entry.js +4 -4
- package/dist/cjs/db-header.cjs.entry.js +3 -3
- package/dist/cjs/db-icon.cjs.entry.js +2 -2
- package/dist/cjs/db-infotext.cjs.entry.js +2 -2
- package/dist/cjs/{db-table-caption.cjs.entry.js → db-link.cjs.entry.js} +7 -6
- package/dist/cjs/db-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/db-navigation.cjs.entry.js +3 -3
- package/dist/cjs/db-notification.cjs.entry.js +3 -3
- package/dist/cjs/db-page.cjs.entry.js +3 -3
- package/dist/cjs/db-popover.cjs.entry.js +3 -3
- package/dist/cjs/db-radio.cjs.entry.js +2 -2
- package/dist/cjs/db-section.cjs.entry.js +3 -3
- package/dist/cjs/db-select.cjs.entry.js +3 -3
- package/dist/cjs/db-stack.cjs.entry.js +3 -3
- package/dist/cjs/db-switch.cjs.entry.js +3 -3
- package/dist/cjs/db-tab-item_3.cjs.entry.js +7 -7
- package/dist/cjs/db-tabs.cjs.entry.js +3 -3
- package/dist/cjs/db-textarea.cjs.entry.js +3 -3
- package/dist/cjs/db-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/db-ux.cjs.js +2 -2
- package/dist/cjs/{index-CSakRmZZ.js → index-EqJP9Qyt.js} +0 -21
- package/dist/cjs/index.cjs.js +1 -20
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -9
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.js +2 -2
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/brand/brand.js +2 -2
- package/dist/collection/components/button/button.js +4 -4
- package/dist/collection/components/card/card.js +2 -2
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/custom-button/custom-button.js +5 -5
- package/dist/collection/components/custom-select/custom-select.js +7 -7
- package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +2 -2
- package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +2 -2
- package/dist/collection/components/custom-select-list/custom-select-list.js +2 -2
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +2 -2
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/drawer/drawer.js +3 -3
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/icon/icon.js +2 -2
- package/dist/collection/components/infotext/infotext.js +2 -2
- package/dist/collection/components/input/input.js +6 -6
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/navigation/navigation.js +2 -2
- package/dist/collection/components/navigation-item/navigation-item.js +2 -2
- package/dist/collection/components/notification/notification.js +3 -3
- package/dist/collection/components/page/page.js +2 -2
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/radio/radio.js +1 -1
- package/dist/collection/components/section/section.js +2 -2
- package/dist/collection/components/select/select.js +4 -4
- package/dist/collection/components/stack/stack.js +2 -2
- package/dist/collection/components/switch/switch.js +6 -6
- package/dist/collection/components/tab-item/tab-item.js +5 -5
- package/dist/collection/components/tab-list/tab-list.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +2 -2
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tag/tag.js +3 -3
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/index.js +0 -16
- package/dist/collection/shared/model.js +1 -1
- package/dist/custom-elements.json +2660 -5671
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/index.esm.js +1 -1
- package/dist/db-ux/p-05e9aa2e.entry.js +1 -0
- package/dist/db-ux/{p-7387346c.entry.js → p-19ae6336.entry.js} +1 -1
- package/dist/db-ux/{p-dbdfc04a.entry.js → p-2c30a356.entry.js} +1 -1
- package/dist/db-ux/p-2ed98454.entry.js +1 -0
- package/dist/db-ux/p-33443732.entry.js +1 -0
- package/dist/db-ux/{p-150c4aeb.entry.js → p-3ca07f53.entry.js} +1 -1
- package/dist/db-ux/{p-d603dcc4.entry.js → p-4a0870fa.entry.js} +1 -1
- package/dist/db-ux/{p-8f76eea7.entry.js → p-4f519859.entry.js} +1 -1
- package/dist/db-ux/{p-0055d6ce.entry.js → p-516c3f64.entry.js} +1 -1
- package/dist/db-ux/{p-6b87f6f1.entry.js → p-56da8875.entry.js} +1 -1
- package/dist/db-ux/p-58c6c29d.entry.js +1 -0
- package/dist/db-ux/{p-7da51a4c.entry.js → p-669fe992.entry.js} +1 -1
- package/dist/db-ux/{p-19fe0672.entry.js → p-72d1ea3b.entry.js} +1 -1
- package/dist/db-ux/{p-77ee580e.entry.js → p-7f6fae6f.entry.js} +1 -1
- package/dist/db-ux/{p-10acdb01.entry.js → p-83e69c0e.entry.js} +1 -1
- package/dist/db-ux/p-85897212.entry.js +1 -0
- package/dist/db-ux/p-8a521b05.entry.js +1 -0
- package/dist/db-ux/p-974fbc69.entry.js +1 -0
- package/dist/db-ux/{p-8baf5ea2.entry.js → p-a0f6fc10.entry.js} +1 -1
- package/dist/db-ux/p-a3aef74b.entry.js +1 -0
- package/dist/db-ux/{p-e367150f.entry.js → p-a726cd18.entry.js} +1 -1
- package/dist/db-ux/{p-54d2e18d.entry.js → p-aad2d524.entry.js} +1 -1
- package/dist/db-ux/{p-5e4de899.entry.js → p-b99e76fd.entry.js} +1 -1
- package/dist/db-ux/{p-823a7488.entry.js → p-bd1b0142.entry.js} +1 -1
- package/dist/db-ux/{p-032487d0.entry.js → p-c7d1bee4.entry.js} +1 -1
- package/dist/db-ux/p-cb093137.entry.js +1 -0
- package/dist/db-ux/{p-003f3468.entry.js → p-cdef6789.entry.js} +1 -1
- package/dist/db-ux/{p-e3279b61.entry.js → p-df2b1979.entry.js} +1 -1
- package/dist/db-ux/{p-e9058123.entry.js → p-f49ed233.entry.js} +1 -1
- package/dist/db-ux/{p-50a16969.entry.js → p-fc9fb7cd.entry.js} +1 -1
- package/dist/db-ux/{p-47bd992d.entry.js → p-fdbf8d91.entry.js} +1 -1
- package/dist/db-ux/p-kHKR5QG5.js +2 -0
- package/dist/esm/db-accordion-item.entry.js +3 -3
- package/dist/esm/db-accordion.entry.js +2 -2
- package/dist/esm/db-badge.entry.js +2 -2
- package/dist/esm/db-brand.entry.js +2 -2
- package/dist/esm/db-button.entry.js +2 -2
- package/dist/esm/db-card.entry.js +3 -3
- package/dist/esm/db-checkbox.entry.js +3 -3
- package/dist/esm/db-custom-button.entry.js +3 -3
- package/dist/esm/db-custom-select-dropdown_5.entry.js +10 -10
- package/dist/esm/db-custom-select-form-field.entry.js +3 -3
- package/dist/esm/db-custom-select.entry.js +6 -6
- package/dist/esm/db-divider.entry.js +2 -2
- package/dist/esm/db-drawer.entry.js +4 -4
- package/dist/esm/db-header.entry.js +3 -3
- package/dist/esm/db-icon.entry.js +2 -2
- package/dist/esm/db-infotext.entry.js +2 -2
- package/dist/esm/{db-table-caption.entry.js → db-link.entry.js} +8 -7
- package/dist/esm/db-navigation-item.entry.js +2 -2
- package/dist/esm/db-navigation.entry.js +3 -3
- package/dist/esm/db-notification.entry.js +3 -3
- package/dist/esm/db-page.entry.js +3 -3
- package/dist/esm/db-popover.entry.js +3 -3
- package/dist/esm/db-radio.entry.js +2 -2
- package/dist/esm/db-section.entry.js +3 -3
- package/dist/esm/db-select.entry.js +3 -3
- package/dist/esm/db-stack.entry.js +3 -3
- package/dist/esm/db-switch.entry.js +3 -3
- package/dist/esm/db-tab-item_3.entry.js +7 -7
- package/dist/esm/db-tabs.entry.js +3 -3
- package/dist/esm/db-textarea.entry.js +3 -3
- package/dist/esm/db-tooltip.entry.js +3 -3
- package/dist/esm/db-ux.js +3 -3
- package/dist/esm/{index-LpjjuLKB.js → index-kHKR5QG5.js} +0 -21
- package/dist/esm/index.js +2 -13
- package/dist/esm/loader.js +3 -3
- package/dist/types/components.d.ts +0 -278
- package/dist/types/index.d.ts +0 -16
- package/dist/types/shared/model.d.ts +2 -42
- package/dist/vscode.html-custom-data.json +2 -400
- package/dist/web-types.json +4 -692
- package/package.json +3 -3
- package/dist/cjs/db-link_4.cjs.entry.js +0 -220
- package/dist/cjs/db-table-body_3.cjs.entry.js +0 -173
- package/dist/cjs/db-table.cjs.entry.js +0 -136
- package/dist/collection/components/table/examples/data.js +0 -258
- package/dist/collection/components/table/index.js +0 -2
- package/dist/collection/components/table/model.js +0 -6
- package/dist/collection/components/table/table.js +0 -456
- package/dist/collection/components/table-body/index.js +0 -2
- package/dist/collection/components/table-body/model.js +0 -1
- package/dist/collection/components/table-body/table-body.js +0 -137
- package/dist/collection/components/table-caption/index.js +0 -2
- package/dist/collection/components/table-caption/model.js +0 -1
- package/dist/collection/components/table-caption/table-caption.js +0 -109
- package/dist/collection/components/table-data-cell/index.js +0 -2
- package/dist/collection/components/table-data-cell/model.js +0 -1
- package/dist/collection/components/table-data-cell/table-data-cell.js +0 -291
- package/dist/collection/components/table-footer/index.js +0 -2
- package/dist/collection/components/table-footer/model.js +0 -1
- package/dist/collection/components/table-footer/table-footer.js +0 -137
- package/dist/collection/components/table-head/index.js +0 -2
- package/dist/collection/components/table-head/model.js +0 -1
- package/dist/collection/components/table-head/table-head.js +0 -140
- package/dist/collection/components/table-header-cell/index.js +0 -2
- package/dist/collection/components/table-header-cell/model.js +0 -1
- package/dist/collection/components/table-header-cell/table-header-cell.js +0 -369
- package/dist/collection/components/table-row/index.js +0 -2
- package/dist/collection/components/table-row/model.js +0 -1
- package/dist/collection/components/table-row/table-row.js +0 -195
- package/dist/db-ux/p-2cdc1311.entry.js +0 -1
- package/dist/db-ux/p-33ca6422.entry.js +0 -1
- package/dist/db-ux/p-42e61221.entry.js +0 -1
- package/dist/db-ux/p-68a1d35a.entry.js +0 -1
- package/dist/db-ux/p-75005663.entry.js +0 -1
- package/dist/db-ux/p-7f2eaa8b.entry.js +0 -1
- package/dist/db-ux/p-8826c7fc.entry.js +0 -1
- package/dist/db-ux/p-97f5d48e.entry.js +0 -1
- package/dist/db-ux/p-LpjjuLKB.js +0 -2
- package/dist/db-ux/p-a8368ed2.entry.js +0 -1
- package/dist/db-ux/p-c0b8571d.entry.js +0 -1
- package/dist/db-ux/p-d20bd873.entry.js +0 -1
- package/dist/db-ux/p-e9142fec.entry.js +0 -1
- package/dist/esm/db-link_4.entry.js +0 -215
- package/dist/esm/db-table-body_3.entry.js +0 -169
- package/dist/esm/db-table.entry.js +0 -134
- package/dist/types/components/table/examples/data.d.ts +0 -9
- package/dist/types/components/table/index.d.ts +0 -2
- package/dist/types/components/table/model.d.ts +0 -74
- package/dist/types/components/table/table.d.ts +0 -37
- package/dist/types/components/table-body/index.d.ts +0 -2
- package/dist/types/components/table-body/model.d.ts +0 -8
- package/dist/types/components/table-body/table-body.d.ts +0 -19
- package/dist/types/components/table-caption/index.d.ts +0 -2
- package/dist/types/components/table-caption/model.d.ts +0 -5
- package/dist/types/components/table-caption/table-caption.d.ts +0 -18
- package/dist/types/components/table-data-cell/index.d.ts +0 -2
- package/dist/types/components/table-data-cell/model.d.ts +0 -5
- package/dist/types/components/table-data-cell/table-data-cell.d.ts +0 -25
- package/dist/types/components/table-footer/index.d.ts +0 -2
- package/dist/types/components/table-footer/model.d.ts +0 -8
- package/dist/types/components/table-footer/table-footer.d.ts +0 -19
- package/dist/types/components/table-head/index.d.ts +0 -2
- package/dist/types/components/table-head/model.d.ts +0 -10
- package/dist/types/components/table-head/table-head.d.ts +0 -58
- package/dist/types/components/table-header-cell/index.d.ts +0 -2
- package/dist/types/components/table-header-cell/model.d.ts +0 -24
- package/dist/types/components/table-header-cell/table-header-cell.d.ts +0 -28
- package/dist/types/components/table-row/index.d.ts +0 -2
- package/dist/types/components/table-row/model.d.ts +0 -30
- package/dist/types/components/table-row/table-row.d.ts +0 -23
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-LpjjuLKB.js';
|
|
2
|
-
import { g as getBooleanAsString, c as cls, u as uuid, f as getNumber } from './index-xkoBSP8R.js';
|
|
3
|
-
|
|
4
|
-
const DBLink = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
10
|
-
* @param element the ref for the component
|
|
11
|
-
* @param customElementSelector the custom element like `my-component`
|
|
12
|
-
*/
|
|
13
|
-
enableAttributePassing(element, customElementSelector) {
|
|
14
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
15
|
-
if (element && parent) {
|
|
16
|
-
const attributes = parent.attributes;
|
|
17
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
18
|
-
const attr = attributes.item(i);
|
|
19
|
-
if (attr && attr.name !== 'data-density' &&
|
|
20
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
21
|
-
element.setAttribute(attr.name, attr.value);
|
|
22
|
-
parent.removeAttribute(attr.name);
|
|
23
|
-
}
|
|
24
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
25
|
-
element.setAttribute(attr.name, attr.value);
|
|
26
|
-
parent.removeAttribute(attr.name);
|
|
27
|
-
}
|
|
28
|
-
else if (attr && attr.name === "class") {
|
|
29
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
30
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
31
|
-
const currentClass = element.getAttribute("class");
|
|
32
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
33
|
-
if (isWebComponent) {
|
|
34
|
-
// Stencil is using this class for lazy loading component
|
|
35
|
-
parent.setAttribute("class", "hydrated");
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
parent.removeAttribute(attr.name);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
componentDidLoad() {
|
|
45
|
-
this.enableAttributePassing(this._ref, "db-link");
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
var _a, _b, _c, _d;
|
|
49
|
-
return (h("a", { key: '9cecd89fae35481cbc053fd253fc75140f8e57a1', class: cls("db-link", this.className), ref: (el) => {
|
|
50
|
-
this._ref = el;
|
|
51
|
-
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, href: this.href, target: this.target, rel: this.rel, role: this.role, referrerPolicy: (_c = this.referrerpolicy) !== null && _c !== void 0 ? _c : this.referrerPolicy, hrefLang: this.hreflang, "aria-disabled": getBooleanAsString(this.disabled), tabIndex: this.disabled ? -1 : 0, "data-size": this.size, "data-show-icon-trailing": getBooleanAsString((_d = this.showIcon) !== null && _d !== void 0 ? _d : true), "data-variant": this.variant, "data-content": this.content || "internal", "data-wrap": getBooleanAsString(this.wrap) }, this.text ? this.text : h("slot", null)));
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const DBTableRow = class {
|
|
56
|
-
constructor(hostRef) {
|
|
57
|
-
registerInstance(this, hostRef);
|
|
58
|
-
}
|
|
59
|
-
getHeaderCell(cell) {
|
|
60
|
-
if (cell.headerCell) {
|
|
61
|
-
return cell;
|
|
62
|
-
}
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
67
|
-
* @param element the ref for the component
|
|
68
|
-
* @param customElementSelector the custom element like `my-component`
|
|
69
|
-
*/
|
|
70
|
-
enableAttributePassing(element, customElementSelector) {
|
|
71
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
72
|
-
if (element && parent) {
|
|
73
|
-
const attributes = parent.attributes;
|
|
74
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
75
|
-
const attr = attributes.item(i);
|
|
76
|
-
if (attr && attr.name !== 'data-density' &&
|
|
77
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
78
|
-
element.setAttribute(attr.name, attr.value);
|
|
79
|
-
parent.removeAttribute(attr.name);
|
|
80
|
-
}
|
|
81
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
82
|
-
element.setAttribute(attr.name, attr.value);
|
|
83
|
-
parent.removeAttribute(attr.name);
|
|
84
|
-
}
|
|
85
|
-
else if (attr && attr.name === "class") {
|
|
86
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
87
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
88
|
-
const currentClass = element.getAttribute("class");
|
|
89
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
90
|
-
if (isWebComponent) {
|
|
91
|
-
// Stencil is using this class for lazy loading component
|
|
92
|
-
parent.setAttribute("class", "hydrated");
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
parent.removeAttribute(attr.name);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
componentDidLoad() {
|
|
102
|
-
this.enableAttributePassing(this._ref, "db-table-row");
|
|
103
|
-
}
|
|
104
|
-
render() {
|
|
105
|
-
var _a;
|
|
106
|
-
return (h("tr", { key: '0826ccfb6e11937280649f6b59263676e8f5f668', class: cls("db-table-row", this.className), ref: (el) => {
|
|
107
|
-
this._ref = el;
|
|
108
|
-
}, id: this.id, "data-interactive": getBooleanAsString(this.interactive), "data-sub-header-emphasis": this.subHeaderEmphasis }, this.cells ? ((_a = this.cells) === null || _a === void 0 ? void 0 : _a.map((cell, index) => {
|
|
109
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
|
|
110
|
-
return cell.headerCell ? (h("db-table-header-cell", { class: (_a = cell.className) !== null && _a !== void 0 ? _a : cell.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : uuid()}-table-row-header-cell-${index}`, id: cell.id, abbr: (_c = this.getHeaderCell(cell)) === null || _c === void 0 ? void 0 : _c.abbr, scope: (_d = this.getHeaderCell(cell)) === null || _d === void 0 ? void 0 : _d.scope, noText: (_e = this.getHeaderCell(cell)) === null || _e === void 0 ? void 0 : _e.noText, horizontalAlignment: cell.horizontalAlignment, verticalAlignment: cell.verticalAlignment, headers: cell.headers, colSpan: cell.colSpan, colspan: cell.colspan, rowSpan: cell.rowSpan, rowspan: cell.rowspan }, cell.link ? (h("db-link", { class: (_g = (_f = cell.link) === null || _f === void 0 ? void 0 : _f.className) !== null && _g !== void 0 ? _g : (_h = cell.link) === null || _h === void 0 ? void 0 : _h.class, content: (_j = cell.link) === null || _j === void 0 ? void 0 : _j.content, size: (_k = cell.link) === null || _k === void 0 ? void 0 : _k.size, variant: (_l = cell.link) === null || _l === void 0 ? void 0 : _l.variant, id: (_m = cell.link) === null || _m === void 0 ? void 0 : _m.id, autofocus: (_o = cell.link) === null || _o === void 0 ? void 0 : _o.autofocus, disabled: (_p = cell.link) === null || _p === void 0 ? void 0 : _p.disabled, href: (_q = cell.link) === null || _q === void 0 ? void 0 : _q.href, hreflang: (_r = cell.link) === null || _r === void 0 ? void 0 : _r.hreflang, target: (_s = cell.link) === null || _s === void 0 ? void 0 : _s.target, rel: (_t = cell.link) === null || _t === void 0 ? void 0 : _t.rel, referrerPolicy: (_u = cell.link) === null || _u === void 0 ? void 0 : _u.referrerPolicy, role: (_v = cell.link) === null || _v === void 0 ? void 0 : _v.role, showIcon: (_w = cell.link) === null || _w === void 0 ? void 0 : _w.showIcon, text: (_x = cell.link) === null || _x === void 0 ? void 0 : _x.text, wrap: (_y = cell.link) === null || _y === void 0 ? void 0 : _y.wrap }, (_z = cell.link) === null || _z === void 0 ? void 0 : _z.children)) : (cell.content))) : (h("db-table-data-cell", { class: (_0 = cell.className) !== null && _0 !== void 0 ? _0 : cell.class, key: `${(_1 = this.id) !== null && _1 !== void 0 ? _1 : uuid()}-table-row-data-cell-${index}`, id: cell.id, horizontalAlignment: cell.horizontalAlignment, verticalAlignment: cell.verticalAlignment, headers: cell.headers, colSpan: cell.colSpan, colspan: cell.colspan, rowSpan: cell.rowSpan, rowspan: cell.rowspan }, cell.link ? (h("db-link", { class: (_3 = (_2 = cell.link) === null || _2 === void 0 ? void 0 : _2.className) !== null && _3 !== void 0 ? _3 : (_4 = cell.link) === null || _4 === void 0 ? void 0 : _4.class, content: (_5 = cell.link) === null || _5 === void 0 ? void 0 : _5.content, size: (_6 = cell.link) === null || _6 === void 0 ? void 0 : _6.size, variant: (_7 = cell.link) === null || _7 === void 0 ? void 0 : _7.variant, id: (_8 = cell.link) === null || _8 === void 0 ? void 0 : _8.id, autofocus: (_9 = cell.link) === null || _9 === void 0 ? void 0 : _9.autofocus, disabled: (_10 = cell.link) === null || _10 === void 0 ? void 0 : _10.disabled, href: (_11 = cell.link) === null || _11 === void 0 ? void 0 : _11.href, hreflang: (_12 = cell.link) === null || _12 === void 0 ? void 0 : _12.hreflang, target: (_13 = cell.link) === null || _13 === void 0 ? void 0 : _13.target, rel: (_14 = cell.link) === null || _14 === void 0 ? void 0 : _14.rel, referrerPolicy: (_15 = cell.link) === null || _15 === void 0 ? void 0 : _15.referrerPolicy, role: (_16 = cell.link) === null || _16 === void 0 ? void 0 : _16.role, showIcon: (_17 = cell.link) === null || _17 === void 0 ? void 0 : _17.showIcon, text: (_18 = cell.link) === null || _18 === void 0 ? void 0 : _18.text, wrap: (_19 = cell.link) === null || _19 === void 0 ? void 0 : _19.wrap }, (_20 = cell.link) === null || _20 === void 0 ? void 0 : _20.children)) : (cell.content)));
|
|
111
|
-
})) : (h("slot", null))));
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const DBTableHeaderCell = class {
|
|
116
|
-
constructor(hostRef) {
|
|
117
|
-
registerInstance(this, hostRef);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
121
|
-
* @param element the ref for the component
|
|
122
|
-
* @param customElementSelector the custom element like `my-component`
|
|
123
|
-
*/
|
|
124
|
-
enableAttributePassing(element, customElementSelector) {
|
|
125
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
126
|
-
if (element && parent) {
|
|
127
|
-
const attributes = parent.attributes;
|
|
128
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
129
|
-
const attr = attributes.item(i);
|
|
130
|
-
if (attr && attr.name !== 'data-density' &&
|
|
131
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
132
|
-
element.setAttribute(attr.name, attr.value);
|
|
133
|
-
parent.removeAttribute(attr.name);
|
|
134
|
-
}
|
|
135
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
136
|
-
element.setAttribute(attr.name, attr.value);
|
|
137
|
-
parent.removeAttribute(attr.name);
|
|
138
|
-
}
|
|
139
|
-
else if (attr && attr.name === "class") {
|
|
140
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
141
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
142
|
-
const currentClass = element.getAttribute("class");
|
|
143
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
144
|
-
if (isWebComponent) {
|
|
145
|
-
// Stencil is using this class for lazy loading component
|
|
146
|
-
parent.setAttribute("class", "hydrated");
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
parent.removeAttribute(attr.name);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
componentDidLoad() {
|
|
156
|
-
this.enableAttributePassing(this._ref, "db-table-header-cell");
|
|
157
|
-
}
|
|
158
|
-
render() {
|
|
159
|
-
return (h("th", { key: '8e4041b823d5a1e31e92992eb9233bc75e6f0db9', class: cls("db-table-header-cell", this.className), ref: (el) => {
|
|
160
|
-
this._ref = el;
|
|
161
|
-
}, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, "data-no-text": getBooleanAsString(this.noText), scope: this.scope, colSpan: getNumber(this.colSpan, this.colspan), rowSpan: getNumber(this.rowSpan, this.rowspan), headers: this.headers, abbr: this.abbr }, h("slot", { key: 'a78d87d22ead57dbb4a97175da963028fa603a39' })));
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
const DBTableDataCell = class {
|
|
166
|
-
constructor(hostRef) {
|
|
167
|
-
registerInstance(this, hostRef);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
171
|
-
* @param element the ref for the component
|
|
172
|
-
* @param customElementSelector the custom element like `my-component`
|
|
173
|
-
*/
|
|
174
|
-
enableAttributePassing(element, customElementSelector) {
|
|
175
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
176
|
-
if (element && parent) {
|
|
177
|
-
const attributes = parent.attributes;
|
|
178
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
179
|
-
const attr = attributes.item(i);
|
|
180
|
-
if (attr && attr.name !== 'data-density' &&
|
|
181
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
182
|
-
element.setAttribute(attr.name, attr.value);
|
|
183
|
-
parent.removeAttribute(attr.name);
|
|
184
|
-
}
|
|
185
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
186
|
-
element.setAttribute(attr.name, attr.value);
|
|
187
|
-
parent.removeAttribute(attr.name);
|
|
188
|
-
}
|
|
189
|
-
else if (attr && attr.name === "class") {
|
|
190
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
191
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
192
|
-
const currentClass = element.getAttribute("class");
|
|
193
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
194
|
-
if (isWebComponent) {
|
|
195
|
-
// Stencil is using this class for lazy loading component
|
|
196
|
-
parent.setAttribute("class", "hydrated");
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
parent.removeAttribute(attr.name);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
componentDidLoad() {
|
|
206
|
-
this.enableAttributePassing(this._ref, "db-table-data-cell");
|
|
207
|
-
}
|
|
208
|
-
render() {
|
|
209
|
-
return (h("td", { key: '8274250200fc80a6dd6df6d337b397930c665e18', class: cls("db-table-data-cell", this.className), ref: (el) => {
|
|
210
|
-
this._ref = el;
|
|
211
|
-
}, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, colSpan: getNumber(this.colSpan, this.colspan), rowSpan: getNumber(this.rowSpan, this.rowspan), headers: this.headers }, h("slot", { key: '15e1f9e5492c105d953fb8f4ec272f3c8853b318' })));
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
export { DBLink as db_link, DBTableDataCell as db_table_data_cell, DBTableHeaderCell as db_table_header_cell, DBTableRow as db_table_row };
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-LpjjuLKB.js';
|
|
2
|
-
import { u as uuid, c as cls } from './index-xkoBSP8R.js';
|
|
3
|
-
|
|
4
|
-
const DBTableHead = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
}
|
|
8
|
-
getCells(cells) {
|
|
9
|
-
return cells === null || cells === void 0 ? void 0 : cells.map((cell) => (Object.assign(Object.assign({}, cell), { headerCell: true })));
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
13
|
-
* @param element the ref for the component
|
|
14
|
-
* @param customElementSelector the custom element like `my-component`
|
|
15
|
-
*/
|
|
16
|
-
enableAttributePassing(element, customElementSelector) {
|
|
17
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
18
|
-
if (element && parent) {
|
|
19
|
-
const attributes = parent.attributes;
|
|
20
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
21
|
-
const attr = attributes.item(i);
|
|
22
|
-
if (attr && attr.name !== 'data-density' &&
|
|
23
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
24
|
-
element.setAttribute(attr.name, attr.value);
|
|
25
|
-
parent.removeAttribute(attr.name);
|
|
26
|
-
}
|
|
27
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
28
|
-
element.setAttribute(attr.name, attr.value);
|
|
29
|
-
parent.removeAttribute(attr.name);
|
|
30
|
-
}
|
|
31
|
-
else if (attr && attr.name === "class") {
|
|
32
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
33
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
34
|
-
const currentClass = element.getAttribute("class");
|
|
35
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
36
|
-
if (isWebComponent) {
|
|
37
|
-
// Stencil is using this class for lazy loading component
|
|
38
|
-
parent.setAttribute("class", "hydrated");
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
parent.removeAttribute(attr.name);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
componentDidLoad() {
|
|
48
|
-
this.enableAttributePassing(this._ref, "db-table-head");
|
|
49
|
-
}
|
|
50
|
-
render() {
|
|
51
|
-
var _a;
|
|
52
|
-
return (h("thead", { key: 'fc59a3bac4953eaf10bbd04f29716804c98b05c8', class: cls("db-table-head", this.className), ref: (el) => {
|
|
53
|
-
this._ref = el;
|
|
54
|
-
}, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
|
|
55
|
-
var _a, _b;
|
|
56
|
-
return (h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : uuid()}-table-head-row-${index}`, cells: this.getCells(row.cells), subHeaderEmphasis: row.subHeaderEmphasis, id: row.id }));
|
|
57
|
-
})) : (h("slot", null))));
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const DBTableBody = class {
|
|
62
|
-
constructor(hostRef) {
|
|
63
|
-
registerInstance(this, hostRef);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
67
|
-
* @param element the ref for the component
|
|
68
|
-
* @param customElementSelector the custom element like `my-component`
|
|
69
|
-
*/
|
|
70
|
-
enableAttributePassing(element, customElementSelector) {
|
|
71
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
72
|
-
if (element && parent) {
|
|
73
|
-
const attributes = parent.attributes;
|
|
74
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
75
|
-
const attr = attributes.item(i);
|
|
76
|
-
if (attr && attr.name !== 'data-density' &&
|
|
77
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
78
|
-
element.setAttribute(attr.name, attr.value);
|
|
79
|
-
parent.removeAttribute(attr.name);
|
|
80
|
-
}
|
|
81
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
82
|
-
element.setAttribute(attr.name, attr.value);
|
|
83
|
-
parent.removeAttribute(attr.name);
|
|
84
|
-
}
|
|
85
|
-
else if (attr && attr.name === "class") {
|
|
86
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
87
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
88
|
-
const currentClass = element.getAttribute("class");
|
|
89
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
90
|
-
if (isWebComponent) {
|
|
91
|
-
// Stencil is using this class for lazy loading component
|
|
92
|
-
parent.setAttribute("class", "hydrated");
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
parent.removeAttribute(attr.name);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
componentDidLoad() {
|
|
102
|
-
this.enableAttributePassing(this._ref, "db-table-body");
|
|
103
|
-
}
|
|
104
|
-
render() {
|
|
105
|
-
var _a;
|
|
106
|
-
return (h("tbody", { key: 'f32625da9123926d08a779f2b04f907249153f8b', class: cls("db-table-body", this.className), ref: (el) => {
|
|
107
|
-
this._ref = el;
|
|
108
|
-
}, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
|
|
109
|
-
var _a, _b;
|
|
110
|
-
return (h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : uuid()}-table-body-row-${index}`, cells: row.cells, id: row.id }));
|
|
111
|
-
})) : (h("slot", null))));
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const DBTableFooter = class {
|
|
116
|
-
constructor(hostRef) {
|
|
117
|
-
registerInstance(this, hostRef);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
121
|
-
* @param element the ref for the component
|
|
122
|
-
* @param customElementSelector the custom element like `my-component`
|
|
123
|
-
*/
|
|
124
|
-
enableAttributePassing(element, customElementSelector) {
|
|
125
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
126
|
-
if (element && parent) {
|
|
127
|
-
const attributes = parent.attributes;
|
|
128
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
129
|
-
const attr = attributes.item(i);
|
|
130
|
-
if (attr && attr.name !== 'data-density' &&
|
|
131
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
132
|
-
element.setAttribute(attr.name, attr.value);
|
|
133
|
-
parent.removeAttribute(attr.name);
|
|
134
|
-
}
|
|
135
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
136
|
-
element.setAttribute(attr.name, attr.value);
|
|
137
|
-
parent.removeAttribute(attr.name);
|
|
138
|
-
}
|
|
139
|
-
else if (attr && attr.name === "class") {
|
|
140
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
141
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
142
|
-
const currentClass = element.getAttribute("class");
|
|
143
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
144
|
-
if (isWebComponent) {
|
|
145
|
-
// Stencil is using this class for lazy loading component
|
|
146
|
-
parent.setAttribute("class", "hydrated");
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
parent.removeAttribute(attr.name);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
componentDidLoad() {
|
|
156
|
-
this.enableAttributePassing(this._ref, "db-table-footer");
|
|
157
|
-
}
|
|
158
|
-
render() {
|
|
159
|
-
var _a;
|
|
160
|
-
return (h("tfoot", { key: '97d0abedb46046365f4d1a713133cd31a86c12c7', class: cls("db-table-footer", this.className), ref: (el) => {
|
|
161
|
-
this._ref = el;
|
|
162
|
-
}, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
|
|
163
|
-
var _a, _b;
|
|
164
|
-
return (h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : uuid()}-table-footer-row-${index}`, cells: row.cells, id: row.id }));
|
|
165
|
-
})) : (h("slot", null))));
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export { DBTableBody as db_table_body, DBTableFooter as db_table_footer, DBTableHead as db_table_head };
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment } from './index-LpjjuLKB.js';
|
|
2
|
-
import { d as delay, g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
3
|
-
|
|
4
|
-
const DBTable = class {
|
|
5
|
-
constructor(hostRef) {
|
|
6
|
-
registerInstance(this, hostRef);
|
|
7
|
-
this._data = undefined;
|
|
8
|
-
this._style = undefined;
|
|
9
|
-
}
|
|
10
|
-
convertData() {
|
|
11
|
-
try {
|
|
12
|
-
if (typeof this.data === "string") {
|
|
13
|
-
return JSON.parse(this.data);
|
|
14
|
-
}
|
|
15
|
-
return this.data;
|
|
16
|
-
}
|
|
17
|
-
catch (error) {
|
|
18
|
-
console.error(error);
|
|
19
|
-
}
|
|
20
|
-
return {};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
24
|
-
* @param element the ref for the component
|
|
25
|
-
* @param customElementSelector the custom element like `my-component`
|
|
26
|
-
*/
|
|
27
|
-
enableAttributePassing(element, customElementSelector) {
|
|
28
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
29
|
-
if (element && parent) {
|
|
30
|
-
const attributes = parent.attributes;
|
|
31
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
32
|
-
const attr = attributes.item(i);
|
|
33
|
-
if (attr && attr.name !== 'data-density' &&
|
|
34
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
35
|
-
element.setAttribute(attr.name, attr.value);
|
|
36
|
-
parent.removeAttribute(attr.name);
|
|
37
|
-
}
|
|
38
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
39
|
-
element.setAttribute(attr.name, attr.value);
|
|
40
|
-
parent.removeAttribute(attr.name);
|
|
41
|
-
}
|
|
42
|
-
else if (attr && attr.name === "class") {
|
|
43
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
44
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
45
|
-
const currentClass = element.getAttribute("class");
|
|
46
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
47
|
-
if (isWebComponent) {
|
|
48
|
-
// Stencil is using this class for lazy loading component
|
|
49
|
-
parent.setAttribute("class", "hydrated");
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
parent.removeAttribute(attr.name);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
watch0Fn() {
|
|
59
|
-
if (this.data) {
|
|
60
|
-
this._data = this.convertData();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
watch0() {
|
|
64
|
-
this.watch0Fn();
|
|
65
|
-
}
|
|
66
|
-
watch1Fn() {
|
|
67
|
-
if (this._ref && this.mobileVariant === "list") {
|
|
68
|
-
// Delay for angular
|
|
69
|
-
void delay(() => {
|
|
70
|
-
const table = this._ref;
|
|
71
|
-
if (!table)
|
|
72
|
-
return;
|
|
73
|
-
const headerCells = table.querySelectorAll("thead tr th");
|
|
74
|
-
if (headerCells.length) {
|
|
75
|
-
const otherRows = table.querySelectorAll(":is(tbody,tfoot) tr");
|
|
76
|
-
otherRows.forEach((row) => {
|
|
77
|
-
const cells = row.querySelectorAll(":is(td,th)");
|
|
78
|
-
cells.forEach((cell, index) => {
|
|
79
|
-
const headerCell = headerCells[index];
|
|
80
|
-
if (headerCell &&
|
|
81
|
-
headerCell.textContent &&
|
|
82
|
-
!cell.dataset["header"]) {
|
|
83
|
-
cell.dataset["header"] = headerCell.textContent.trim();
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}, 1);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
watch1() {
|
|
92
|
-
this.watch1Fn();
|
|
93
|
-
}
|
|
94
|
-
watch2Fn() {
|
|
95
|
-
if (this.columnSizes) {
|
|
96
|
-
const columnStyles = {};
|
|
97
|
-
Object.entries(this.columnSizes).forEach(([key, value]) => {
|
|
98
|
-
columnStyles[`--db-table-column-size-${key}`] = value;
|
|
99
|
-
});
|
|
100
|
-
this._style = columnStyles;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
watch2() {
|
|
104
|
-
this.watch2Fn();
|
|
105
|
-
}
|
|
106
|
-
componentDidLoad() {
|
|
107
|
-
this.enableAttributePassing(this._ref, "db-table");
|
|
108
|
-
this.watch0Fn();
|
|
109
|
-
this.watch1Fn();
|
|
110
|
-
this.watch2Fn();
|
|
111
|
-
}
|
|
112
|
-
render() {
|
|
113
|
-
var _a, _b, _c, _d, _e, _f;
|
|
114
|
-
return (h("div", { key: 'f64631aec68b83467db063e5e0923144743bce72', class: cls("db-table", this.className), style: this._style, "data-width": this.width, "data-size": this.size, "data-divider": this.divider, "data-variant": this.variant, "data-mobile-variant": this.mobileVariant, "data-show-caption": getBooleanAsString(this.showCaption), "data-sticky-header": this.stickyHeader }, h("table", { key: '6cce6265d3907c99c333d8c4d209493548f22b36', ref: (el) => {
|
|
115
|
-
this._ref = el;
|
|
116
|
-
}, id: this.id }, h("caption", { key: '3ad5a7a85bd195180b842b39a5b2aeaebdd3bee7' }, this.captionPlain ? (this.captionPlain) : (h("slot", { name: "caption" }))), this._data ? (h(Fragment, null, ((_a = this._data) === null || _a === void 0 ? void 0 : _a.header) ? (h("db-table-head", { rows: (_b = this._data) === null || _b === void 0 ? void 0 : _b.header })) : null, ((_c = this._data) === null || _c === void 0 ? void 0 : _c.body) ? (h("db-table-body", { rows: (_d = this._data) === null || _d === void 0 ? void 0 : _d.body })) : null, ((_e = this._data) === null || _e === void 0 ? void 0 : _e.footer) ? (h("db-table-footer", { rows: (_f = this._data) === null || _f === void 0 ? void 0 : _f.footer })) : null)) : (h("slot", null)))));
|
|
117
|
-
}
|
|
118
|
-
static get watchers() { return {
|
|
119
|
-
"data": [{
|
|
120
|
-
"watch0": 0
|
|
121
|
-
}],
|
|
122
|
-
"mobileVariant": [{
|
|
123
|
-
"watch1": 0
|
|
124
|
-
}],
|
|
125
|
-
"_ref": [{
|
|
126
|
-
"watch1": 0
|
|
127
|
-
}],
|
|
128
|
-
"columnSizes": [{
|
|
129
|
-
"watch2": 0
|
|
130
|
-
}]
|
|
131
|
-
}; }
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
export { DBTable as db_table };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DBTableData } from '../model';
|
|
2
|
-
export declare const defaultTable: DBTableData;
|
|
3
|
-
export declare const horizontalAlignmentStartTable: DBTableData;
|
|
4
|
-
export declare const horizontalAlignmentCenterTable: DBTableData;
|
|
5
|
-
export declare const horizontalAlignmentEndTable: DBTableData;
|
|
6
|
-
export declare const subHeaderEmphasisNoneTable: DBTableData;
|
|
7
|
-
export declare const subHeaderEmphasisWeakTable: DBTableData;
|
|
8
|
-
export declare const subHeaderEmphasisStrongTable: DBTableData;
|
|
9
|
-
export declare const overflowTable: DBTableData;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState, WidthProps } from '../../shared/model';
|
|
2
|
-
import { DBTableRowDefaultProps } from '../table-row/model';
|
|
3
|
-
export declare const DBTableRowSizeList: readonly ["x-small", "small", "medium", "large"];
|
|
4
|
-
export type DBTableRowSizeType = (typeof DBTableRowSizeList)[number];
|
|
5
|
-
export declare const DBTableVariantList: readonly ["joined", "zebra", "floating"];
|
|
6
|
-
export type DBTableVariantType = (typeof DBTableVariantList)[number];
|
|
7
|
-
export declare const DBTableDividerList: readonly ["none", "both", "horizontal", "vertical"];
|
|
8
|
-
export type DBTableDividerType = (typeof DBTableDividerList)[number];
|
|
9
|
-
export declare const DBTableMobileVariantList: readonly ["table", "list"];
|
|
10
|
-
export type DBTableMobileVariantType = (typeof DBTableMobileVariantList)[number];
|
|
11
|
-
export declare const DBTableStickHeaderList: readonly ["none", "both", "horizontal", "vertical"];
|
|
12
|
-
export type DBTableStickHederType = (typeof DBTableStickHeaderList)[number];
|
|
13
|
-
export type DBTableData = {
|
|
14
|
-
header?: DBTableRowDefaultProps[];
|
|
15
|
-
body?: DBTableRowDefaultProps[];
|
|
16
|
-
footer?: DBTableRowDefaultProps[];
|
|
17
|
-
};
|
|
18
|
-
export declare const DBTableColumnsSizeList: readonly ["auto", "1fr", "min-content", "max-content"];
|
|
19
|
-
export type DBTableColumnsSizeType = (typeof DBTableColumnsSizeList)[number];
|
|
20
|
-
export type DBTableDefaultProps = {
|
|
21
|
-
/**
|
|
22
|
-
* Slot for table caption
|
|
23
|
-
*/
|
|
24
|
-
caption?: any;
|
|
25
|
-
/**
|
|
26
|
-
* String alternative for table caption slot
|
|
27
|
-
*/
|
|
28
|
-
captionPlain?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Table data if you don't use default slot/children
|
|
31
|
-
*/
|
|
32
|
-
data?: DBTableData | string;
|
|
33
|
-
/**
|
|
34
|
-
* Show the divider between the rows and cells
|
|
35
|
-
*/
|
|
36
|
-
divider?: DBTableDividerType;
|
|
37
|
-
/**
|
|
38
|
-
* Show caption above table default is hidden
|
|
39
|
-
*/
|
|
40
|
-
showCaption?: boolean | string;
|
|
41
|
-
/**
|
|
42
|
-
* Size of the table rows
|
|
43
|
-
*/
|
|
44
|
-
size?: DBTableRowSizeType;
|
|
45
|
-
/**
|
|
46
|
-
* Change the layout of the table
|
|
47
|
-
* floating: card style table
|
|
48
|
-
* joined: classic table
|
|
49
|
-
*/
|
|
50
|
-
variant?: DBTableVariantType;
|
|
51
|
-
/**
|
|
52
|
-
* Change the layout of the table on mobile
|
|
53
|
-
* list: list style
|
|
54
|
-
* table: classic table
|
|
55
|
-
*/
|
|
56
|
-
mobileVariant?: DBTableMobileVariantType;
|
|
57
|
-
/**
|
|
58
|
-
* Change the header cells to be sticky when scrolling the table
|
|
59
|
-
*/
|
|
60
|
-
stickyHeader?: DBTableStickHederType;
|
|
61
|
-
/**
|
|
62
|
-
* Set the width of the columns based in their index.
|
|
63
|
-
* Alternative: Use `--db-table-column-size-$index` inside CSS to control it.
|
|
64
|
-
* See: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/grid-template-columns
|
|
65
|
-
*/
|
|
66
|
-
columnSizes?: Record<number, DBTableColumnsSizeType | string>;
|
|
67
|
-
};
|
|
68
|
-
export type DBTableProps = DBTableDefaultProps & GlobalProps & WidthProps;
|
|
69
|
-
export type DBTableDefaultState = {
|
|
70
|
-
_data?: DBTableData;
|
|
71
|
-
_style?: any;
|
|
72
|
-
convertData: () => DBTableData;
|
|
73
|
-
};
|
|
74
|
-
export type DBTableState = DBTableDefaultState & GlobalState;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { DBTableProps } from "./model";
|
|
2
|
-
/**
|
|
3
|
-
* @slot children - This is a default/unnamed slot
|
|
4
|
-
* @slot caption - TODO: Add description for slotCaption
|
|
5
|
-
*/
|
|
6
|
-
export declare class DBTable {
|
|
7
|
-
private _ref;
|
|
8
|
-
data: DBTableProps["data"];
|
|
9
|
-
mobileVariant: DBTableProps["mobileVariant"];
|
|
10
|
-
columnSizes: DBTableProps["columnSizes"];
|
|
11
|
-
className: DBTableProps["className"];
|
|
12
|
-
width: DBTableProps["width"];
|
|
13
|
-
size: DBTableProps["size"];
|
|
14
|
-
divider: DBTableProps["divider"];
|
|
15
|
-
variant: DBTableProps["variant"];
|
|
16
|
-
showCaption: DBTableProps["showCaption"];
|
|
17
|
-
stickyHeader: DBTableProps["stickyHeader"];
|
|
18
|
-
id: DBTableProps["id"];
|
|
19
|
-
captionPlain: DBTableProps["captionPlain"];
|
|
20
|
-
_data: any;
|
|
21
|
-
_style: any;
|
|
22
|
-
convertData(): any;
|
|
23
|
-
/**
|
|
24
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
25
|
-
* @param element the ref for the component
|
|
26
|
-
* @param customElementSelector the custom element like `my-component`
|
|
27
|
-
*/
|
|
28
|
-
private enableAttributePassing;
|
|
29
|
-
watch0Fn(): void;
|
|
30
|
-
watch0(): void;
|
|
31
|
-
watch1Fn(): void;
|
|
32
|
-
watch1(): void;
|
|
33
|
-
watch2Fn(): void;
|
|
34
|
-
watch2(): void;
|
|
35
|
-
componentDidLoad(): void;
|
|
36
|
-
render(): any;
|
|
37
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
-
import { DBTableRowProps } from '../table-row/model';
|
|
3
|
-
export type DBTableBodyDefaultProps = {
|
|
4
|
-
rows?: DBTableRowProps[];
|
|
5
|
-
};
|
|
6
|
-
export type DBTableBodyProps = DBTableBodyDefaultProps & GlobalProps;
|
|
7
|
-
export type DBTableBodyDefaultState = {};
|
|
8
|
-
export type DBTableBodyState = DBTableBodyDefaultState & GlobalState;
|