@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/wc-core-components",
|
|
3
|
-
"version": "4.5.4-
|
|
3
|
+
"version": "4.5.4-tailwind-inline-5d37a00",
|
|
4
4
|
"description": "Stencil components for @db-ux/core-components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"web-types": "./dist/web-types.json",
|
|
49
49
|
"customElements": "dist/custom-elements.json",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@db-ux/core-components": "4.5.4-
|
|
52
|
-
"@db-ux/core-foundations": "4.5.4-
|
|
51
|
+
"@db-ux/core-components": "4.5.4-tailwind-inline-5d37a00",
|
|
52
|
+
"@db-ux/core-foundations": "4.5.4-tailwind-inline-5d37a00"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CSakRmZZ.js');
|
|
4
|
-
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
|
-
|
|
6
|
-
const DBLink = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
index.registerInstance(this, hostRef);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
12
|
-
* @param element the ref for the component
|
|
13
|
-
* @param customElementSelector the custom element like `my-component`
|
|
14
|
-
*/
|
|
15
|
-
enableAttributePassing(element, customElementSelector) {
|
|
16
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
17
|
-
if (element && parent) {
|
|
18
|
-
const attributes = parent.attributes;
|
|
19
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
20
|
-
const attr = attributes.item(i);
|
|
21
|
-
if (attr && attr.name !== 'data-density' &&
|
|
22
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
23
|
-
element.setAttribute(attr.name, attr.value);
|
|
24
|
-
parent.removeAttribute(attr.name);
|
|
25
|
-
}
|
|
26
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
27
|
-
element.setAttribute(attr.name, attr.value);
|
|
28
|
-
parent.removeAttribute(attr.name);
|
|
29
|
-
}
|
|
30
|
-
else if (attr && attr.name === "class") {
|
|
31
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
32
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
33
|
-
const currentClass = element.getAttribute("class");
|
|
34
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
35
|
-
if (isWebComponent) {
|
|
36
|
-
// Stencil is using this class for lazy loading component
|
|
37
|
-
parent.setAttribute("class", "hydrated");
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
parent.removeAttribute(attr.name);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
componentDidLoad() {
|
|
47
|
-
this.enableAttributePassing(this._ref, "db-link");
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
var _a, _b, _c, _d;
|
|
51
|
-
return (index.h("a", { key: '9cecd89fae35481cbc053fd253fc75140f8e57a1', class: index$1.cls("db-link", this.className), ref: (el) => {
|
|
52
|
-
this._ref = el;
|
|
53
|
-
}, 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": index$1.getBooleanAsString(this.disabled), tabIndex: this.disabled ? -1 : 0, "data-size": this.size, "data-show-icon-trailing": index$1.getBooleanAsString((_d = this.showIcon) !== null && _d !== void 0 ? _d : true), "data-variant": this.variant, "data-content": this.content || "internal", "data-wrap": index$1.getBooleanAsString(this.wrap) }, this.text ? this.text : index.h("slot", null)));
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const DBTableRow = class {
|
|
58
|
-
constructor(hostRef) {
|
|
59
|
-
index.registerInstance(this, hostRef);
|
|
60
|
-
}
|
|
61
|
-
getHeaderCell(cell) {
|
|
62
|
-
if (cell.headerCell) {
|
|
63
|
-
return cell;
|
|
64
|
-
}
|
|
65
|
-
return undefined;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
69
|
-
* @param element the ref for the component
|
|
70
|
-
* @param customElementSelector the custom element like `my-component`
|
|
71
|
-
*/
|
|
72
|
-
enableAttributePassing(element, customElementSelector) {
|
|
73
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
74
|
-
if (element && parent) {
|
|
75
|
-
const attributes = parent.attributes;
|
|
76
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
77
|
-
const attr = attributes.item(i);
|
|
78
|
-
if (attr && attr.name !== 'data-density' &&
|
|
79
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
80
|
-
element.setAttribute(attr.name, attr.value);
|
|
81
|
-
parent.removeAttribute(attr.name);
|
|
82
|
-
}
|
|
83
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
84
|
-
element.setAttribute(attr.name, attr.value);
|
|
85
|
-
parent.removeAttribute(attr.name);
|
|
86
|
-
}
|
|
87
|
-
else if (attr && attr.name === "class") {
|
|
88
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
89
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
90
|
-
const currentClass = element.getAttribute("class");
|
|
91
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
92
|
-
if (isWebComponent) {
|
|
93
|
-
// Stencil is using this class for lazy loading component
|
|
94
|
-
parent.setAttribute("class", "hydrated");
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
parent.removeAttribute(attr.name);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
componentDidLoad() {
|
|
104
|
-
this.enableAttributePassing(this._ref, "db-table-row");
|
|
105
|
-
}
|
|
106
|
-
render() {
|
|
107
|
-
var _a;
|
|
108
|
-
return (index.h("tr", { key: '0826ccfb6e11937280649f6b59263676e8f5f668', class: index$1.cls("db-table-row", this.className), ref: (el) => {
|
|
109
|
-
this._ref = el;
|
|
110
|
-
}, id: this.id, "data-interactive": index$1.getBooleanAsString(this.interactive), "data-sub-header-emphasis": this.subHeaderEmphasis }, this.cells ? ((_a = this.cells) === null || _a === void 0 ? void 0 : _a.map((cell, index$2) => {
|
|
111
|
-
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;
|
|
112
|
-
return cell.headerCell ? (index.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 : index$1.uuid()}-table-row-header-cell-${index$2}`, 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 ? (index.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))) : (index.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 : index$1.uuid()}-table-row-data-cell-${index$2}`, 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 ? (index.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)));
|
|
113
|
-
})) : (index.h("slot", null))));
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const DBTableHeaderCell = class {
|
|
118
|
-
constructor(hostRef) {
|
|
119
|
-
index.registerInstance(this, hostRef);
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
123
|
-
* @param element the ref for the component
|
|
124
|
-
* @param customElementSelector the custom element like `my-component`
|
|
125
|
-
*/
|
|
126
|
-
enableAttributePassing(element, customElementSelector) {
|
|
127
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
128
|
-
if (element && parent) {
|
|
129
|
-
const attributes = parent.attributes;
|
|
130
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
131
|
-
const attr = attributes.item(i);
|
|
132
|
-
if (attr && attr.name !== 'data-density' &&
|
|
133
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
134
|
-
element.setAttribute(attr.name, attr.value);
|
|
135
|
-
parent.removeAttribute(attr.name);
|
|
136
|
-
}
|
|
137
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
138
|
-
element.setAttribute(attr.name, attr.value);
|
|
139
|
-
parent.removeAttribute(attr.name);
|
|
140
|
-
}
|
|
141
|
-
else if (attr && attr.name === "class") {
|
|
142
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
143
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
144
|
-
const currentClass = element.getAttribute("class");
|
|
145
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
146
|
-
if (isWebComponent) {
|
|
147
|
-
// Stencil is using this class for lazy loading component
|
|
148
|
-
parent.setAttribute("class", "hydrated");
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
parent.removeAttribute(attr.name);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
componentDidLoad() {
|
|
158
|
-
this.enableAttributePassing(this._ref, "db-table-header-cell");
|
|
159
|
-
}
|
|
160
|
-
render() {
|
|
161
|
-
return (index.h("th", { key: '8e4041b823d5a1e31e92992eb9233bc75e6f0db9', class: index$1.cls("db-table-header-cell", this.className), ref: (el) => {
|
|
162
|
-
this._ref = el;
|
|
163
|
-
}, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, "data-no-text": index$1.getBooleanAsString(this.noText), scope: this.scope, colSpan: index$1.getNumber(this.colSpan, this.colspan), rowSpan: index$1.getNumber(this.rowSpan, this.rowspan), headers: this.headers, abbr: this.abbr }, index.h("slot", { key: 'a78d87d22ead57dbb4a97175da963028fa603a39' })));
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
const DBTableDataCell = class {
|
|
168
|
-
constructor(hostRef) {
|
|
169
|
-
index.registerInstance(this, hostRef);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
173
|
-
* @param element the ref for the component
|
|
174
|
-
* @param customElementSelector the custom element like `my-component`
|
|
175
|
-
*/
|
|
176
|
-
enableAttributePassing(element, customElementSelector) {
|
|
177
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
178
|
-
if (element && parent) {
|
|
179
|
-
const attributes = parent.attributes;
|
|
180
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
181
|
-
const attr = attributes.item(i);
|
|
182
|
-
if (attr && attr.name !== 'data-density' &&
|
|
183
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
184
|
-
element.setAttribute(attr.name, attr.value);
|
|
185
|
-
parent.removeAttribute(attr.name);
|
|
186
|
-
}
|
|
187
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
188
|
-
element.setAttribute(attr.name, attr.value);
|
|
189
|
-
parent.removeAttribute(attr.name);
|
|
190
|
-
}
|
|
191
|
-
else if (attr && attr.name === "class") {
|
|
192
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
193
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
194
|
-
const currentClass = element.getAttribute("class");
|
|
195
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
196
|
-
if (isWebComponent) {
|
|
197
|
-
// Stencil is using this class for lazy loading component
|
|
198
|
-
parent.setAttribute("class", "hydrated");
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
parent.removeAttribute(attr.name);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
componentDidLoad() {
|
|
208
|
-
this.enableAttributePassing(this._ref, "db-table-data-cell");
|
|
209
|
-
}
|
|
210
|
-
render() {
|
|
211
|
-
return (index.h("td", { key: '8274250200fc80a6dd6df6d337b397930c665e18', class: index$1.cls("db-table-data-cell", this.className), ref: (el) => {
|
|
212
|
-
this._ref = el;
|
|
213
|
-
}, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, colSpan: index$1.getNumber(this.colSpan, this.colspan), rowSpan: index$1.getNumber(this.rowSpan, this.rowspan), headers: this.headers }, index.h("slot", { key: '15e1f9e5492c105d953fb8f4ec272f3c8853b318' })));
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
exports.db_link = DBLink;
|
|
218
|
-
exports.db_table_data_cell = DBTableDataCell;
|
|
219
|
-
exports.db_table_header_cell = DBTableHeaderCell;
|
|
220
|
-
exports.db_table_row = DBTableRow;
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CSakRmZZ.js');
|
|
4
|
-
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
|
-
|
|
6
|
-
const DBTableHead = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
index.registerInstance(this, hostRef);
|
|
9
|
-
}
|
|
10
|
-
getCells(cells) {
|
|
11
|
-
return cells === null || cells === void 0 ? void 0 : cells.map((cell) => (Object.assign(Object.assign({}, cell), { headerCell: true })));
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
15
|
-
* @param element the ref for the component
|
|
16
|
-
* @param customElementSelector the custom element like `my-component`
|
|
17
|
-
*/
|
|
18
|
-
enableAttributePassing(element, customElementSelector) {
|
|
19
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
20
|
-
if (element && parent) {
|
|
21
|
-
const attributes = parent.attributes;
|
|
22
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
23
|
-
const attr = attributes.item(i);
|
|
24
|
-
if (attr && attr.name !== 'data-density' &&
|
|
25
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
26
|
-
element.setAttribute(attr.name, attr.value);
|
|
27
|
-
parent.removeAttribute(attr.name);
|
|
28
|
-
}
|
|
29
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
30
|
-
element.setAttribute(attr.name, attr.value);
|
|
31
|
-
parent.removeAttribute(attr.name);
|
|
32
|
-
}
|
|
33
|
-
else if (attr && attr.name === "class") {
|
|
34
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
35
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
36
|
-
const currentClass = element.getAttribute("class");
|
|
37
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
38
|
-
if (isWebComponent) {
|
|
39
|
-
// Stencil is using this class for lazy loading component
|
|
40
|
-
parent.setAttribute("class", "hydrated");
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
parent.removeAttribute(attr.name);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
componentDidLoad() {
|
|
50
|
-
this.enableAttributePassing(this._ref, "db-table-head");
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
var _a;
|
|
54
|
-
return (index.h("thead", { key: 'fc59a3bac4953eaf10bbd04f29716804c98b05c8', class: index$1.cls("db-table-head", this.className), ref: (el) => {
|
|
55
|
-
this._ref = el;
|
|
56
|
-
}, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index$2) => {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
return (index.h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : index$1.uuid()}-table-head-row-${index$2}`, cells: this.getCells(row.cells), subHeaderEmphasis: row.subHeaderEmphasis, id: row.id }));
|
|
59
|
-
})) : (index.h("slot", null))));
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const DBTableBody = class {
|
|
64
|
-
constructor(hostRef) {
|
|
65
|
-
index.registerInstance(this, hostRef);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
69
|
-
* @param element the ref for the component
|
|
70
|
-
* @param customElementSelector the custom element like `my-component`
|
|
71
|
-
*/
|
|
72
|
-
enableAttributePassing(element, customElementSelector) {
|
|
73
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
74
|
-
if (element && parent) {
|
|
75
|
-
const attributes = parent.attributes;
|
|
76
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
77
|
-
const attr = attributes.item(i);
|
|
78
|
-
if (attr && attr.name !== 'data-density' &&
|
|
79
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
80
|
-
element.setAttribute(attr.name, attr.value);
|
|
81
|
-
parent.removeAttribute(attr.name);
|
|
82
|
-
}
|
|
83
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
84
|
-
element.setAttribute(attr.name, attr.value);
|
|
85
|
-
parent.removeAttribute(attr.name);
|
|
86
|
-
}
|
|
87
|
-
else if (attr && attr.name === "class") {
|
|
88
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
89
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
90
|
-
const currentClass = element.getAttribute("class");
|
|
91
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
92
|
-
if (isWebComponent) {
|
|
93
|
-
// Stencil is using this class for lazy loading component
|
|
94
|
-
parent.setAttribute("class", "hydrated");
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
parent.removeAttribute(attr.name);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
componentDidLoad() {
|
|
104
|
-
this.enableAttributePassing(this._ref, "db-table-body");
|
|
105
|
-
}
|
|
106
|
-
render() {
|
|
107
|
-
var _a;
|
|
108
|
-
return (index.h("tbody", { key: 'f32625da9123926d08a779f2b04f907249153f8b', class: index$1.cls("db-table-body", this.className), ref: (el) => {
|
|
109
|
-
this._ref = el;
|
|
110
|
-
}, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index$2) => {
|
|
111
|
-
var _a, _b;
|
|
112
|
-
return (index.h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : index$1.uuid()}-table-body-row-${index$2}`, cells: row.cells, id: row.id }));
|
|
113
|
-
})) : (index.h("slot", null))));
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const DBTableFooter = class {
|
|
118
|
-
constructor(hostRef) {
|
|
119
|
-
index.registerInstance(this, hostRef);
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
123
|
-
* @param element the ref for the component
|
|
124
|
-
* @param customElementSelector the custom element like `my-component`
|
|
125
|
-
*/
|
|
126
|
-
enableAttributePassing(element, customElementSelector) {
|
|
127
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
128
|
-
if (element && parent) {
|
|
129
|
-
const attributes = parent.attributes;
|
|
130
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
131
|
-
const attr = attributes.item(i);
|
|
132
|
-
if (attr && attr.name !== 'data-density' &&
|
|
133
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
134
|
-
element.setAttribute(attr.name, attr.value);
|
|
135
|
-
parent.removeAttribute(attr.name);
|
|
136
|
-
}
|
|
137
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
138
|
-
element.setAttribute(attr.name, attr.value);
|
|
139
|
-
parent.removeAttribute(attr.name);
|
|
140
|
-
}
|
|
141
|
-
else if (attr && attr.name === "class") {
|
|
142
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
143
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
144
|
-
const currentClass = element.getAttribute("class");
|
|
145
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
146
|
-
if (isWebComponent) {
|
|
147
|
-
// Stencil is using this class for lazy loading component
|
|
148
|
-
parent.setAttribute("class", "hydrated");
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
parent.removeAttribute(attr.name);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
componentDidLoad() {
|
|
158
|
-
this.enableAttributePassing(this._ref, "db-table-footer");
|
|
159
|
-
}
|
|
160
|
-
render() {
|
|
161
|
-
var _a;
|
|
162
|
-
return (index.h("tfoot", { key: '97d0abedb46046365f4d1a713133cd31a86c12c7', class: index$1.cls("db-table-footer", this.className), ref: (el) => {
|
|
163
|
-
this._ref = el;
|
|
164
|
-
}, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index$2) => {
|
|
165
|
-
var _a, _b;
|
|
166
|
-
return (index.h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_b = this.id) !== null && _b !== void 0 ? _b : index$1.uuid()}-table-footer-row-${index$2}`, cells: row.cells, id: row.id }));
|
|
167
|
-
})) : (index.h("slot", null))));
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
exports.db_table_body = DBTableBody;
|
|
172
|
-
exports.db_table_footer = DBTableFooter;
|
|
173
|
-
exports.db_table_head = DBTableHead;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CSakRmZZ.js');
|
|
4
|
-
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
|
-
|
|
6
|
-
const DBTable = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
index.registerInstance(this, hostRef);
|
|
9
|
-
this._data = undefined;
|
|
10
|
-
this._style = undefined;
|
|
11
|
-
}
|
|
12
|
-
convertData() {
|
|
13
|
-
try {
|
|
14
|
-
if (typeof this.data === "string") {
|
|
15
|
-
return JSON.parse(this.data);
|
|
16
|
-
}
|
|
17
|
-
return this.data;
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
console.error(error);
|
|
21
|
-
}
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
26
|
-
* @param element the ref for the component
|
|
27
|
-
* @param customElementSelector the custom element like `my-component`
|
|
28
|
-
*/
|
|
29
|
-
enableAttributePassing(element, customElementSelector) {
|
|
30
|
-
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
31
|
-
if (element && parent) {
|
|
32
|
-
const attributes = parent.attributes;
|
|
33
|
-
for (let i = 0; i < attributes.length; i++) {
|
|
34
|
-
const attr = attributes.item(i);
|
|
35
|
-
if (attr && attr.name !== 'data-density' &&
|
|
36
|
-
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
37
|
-
element.setAttribute(attr.name, attr.value);
|
|
38
|
-
parent.removeAttribute(attr.name);
|
|
39
|
-
}
|
|
40
|
-
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
41
|
-
element.setAttribute(attr.name, attr.value);
|
|
42
|
-
parent.removeAttribute(attr.name);
|
|
43
|
-
}
|
|
44
|
-
else if (attr && attr.name === "class") {
|
|
45
|
-
const isWebComponent = attr.value.includes("hydrated");
|
|
46
|
-
const value = attr.value.replace("hydrated", "").trim();
|
|
47
|
-
const currentClass = element.getAttribute("class");
|
|
48
|
-
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
49
|
-
if (isWebComponent) {
|
|
50
|
-
// Stencil is using this class for lazy loading component
|
|
51
|
-
parent.setAttribute("class", "hydrated");
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
parent.removeAttribute(attr.name);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
watch0Fn() {
|
|
61
|
-
if (this.data) {
|
|
62
|
-
this._data = this.convertData();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
watch0() {
|
|
66
|
-
this.watch0Fn();
|
|
67
|
-
}
|
|
68
|
-
watch1Fn() {
|
|
69
|
-
if (this._ref && this.mobileVariant === "list") {
|
|
70
|
-
// Delay for angular
|
|
71
|
-
void index$1.delay(() => {
|
|
72
|
-
const table = this._ref;
|
|
73
|
-
if (!table)
|
|
74
|
-
return;
|
|
75
|
-
const headerCells = table.querySelectorAll("thead tr th");
|
|
76
|
-
if (headerCells.length) {
|
|
77
|
-
const otherRows = table.querySelectorAll(":is(tbody,tfoot) tr");
|
|
78
|
-
otherRows.forEach((row) => {
|
|
79
|
-
const cells = row.querySelectorAll(":is(td,th)");
|
|
80
|
-
cells.forEach((cell, index) => {
|
|
81
|
-
const headerCell = headerCells[index];
|
|
82
|
-
if (headerCell &&
|
|
83
|
-
headerCell.textContent &&
|
|
84
|
-
!cell.dataset["header"]) {
|
|
85
|
-
cell.dataset["header"] = headerCell.textContent.trim();
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}, 1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
watch1() {
|
|
94
|
-
this.watch1Fn();
|
|
95
|
-
}
|
|
96
|
-
watch2Fn() {
|
|
97
|
-
if (this.columnSizes) {
|
|
98
|
-
const columnStyles = {};
|
|
99
|
-
Object.entries(this.columnSizes).forEach(([key, value]) => {
|
|
100
|
-
columnStyles[`--db-table-column-size-${key}`] = value;
|
|
101
|
-
});
|
|
102
|
-
this._style = columnStyles;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
watch2() {
|
|
106
|
-
this.watch2Fn();
|
|
107
|
-
}
|
|
108
|
-
componentDidLoad() {
|
|
109
|
-
this.enableAttributePassing(this._ref, "db-table");
|
|
110
|
-
this.watch0Fn();
|
|
111
|
-
this.watch1Fn();
|
|
112
|
-
this.watch2Fn();
|
|
113
|
-
}
|
|
114
|
-
render() {
|
|
115
|
-
var _a, _b, _c, _d, _e, _f;
|
|
116
|
-
return (index.h("div", { key: 'f64631aec68b83467db063e5e0923144743bce72', class: index$1.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": index$1.getBooleanAsString(this.showCaption), "data-sticky-header": this.stickyHeader }, index.h("table", { key: '6cce6265d3907c99c333d8c4d209493548f22b36', ref: (el) => {
|
|
117
|
-
this._ref = el;
|
|
118
|
-
}, id: this.id }, index.h("caption", { key: '3ad5a7a85bd195180b842b39a5b2aeaebdd3bee7' }, this.captionPlain ? (this.captionPlain) : (index.h("slot", { name: "caption" }))), this._data ? (index.h(index.Fragment, null, ((_a = this._data) === null || _a === void 0 ? void 0 : _a.header) ? (index.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) ? (index.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) ? (index.h("db-table-footer", { rows: (_f = this._data) === null || _f === void 0 ? void 0 : _f.footer })) : null)) : (index.h("slot", null)))));
|
|
119
|
-
}
|
|
120
|
-
static get watchers() { return {
|
|
121
|
-
"data": [{
|
|
122
|
-
"watch0": 0
|
|
123
|
-
}],
|
|
124
|
-
"mobileVariant": [{
|
|
125
|
-
"watch1": 0
|
|
126
|
-
}],
|
|
127
|
-
"_ref": [{
|
|
128
|
-
"watch1": 0
|
|
129
|
-
}],
|
|
130
|
-
"columnSizes": [{
|
|
131
|
-
"watch2": 0
|
|
132
|
-
}]
|
|
133
|
-
}; }
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
exports.db_table = DBTable;
|