@xplortech/apollo-core 2.7.0 → 2.7.1
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/.typings/apollo-components.html-data.json +97 -180
- package/build/style.css +220 -951
- package/dist/apollo-core/apollo-core.css +5 -35
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-6c956d4e.entry.js → p-0bf50890.entry.js} +1 -1
- package/dist/apollo-core/p-1947e7a8.entry.js +1 -0
- package/dist/apollo-core/p-27928cb0.entry.js +1 -0
- package/dist/apollo-core/p-34438721.entry.js +1 -0
- package/dist/apollo-core/p-35c2f72d.entry.js +1 -0
- package/dist/apollo-core/p-368c81f1.entry.js +1 -0
- package/dist/apollo-core/p-36ba29da.entry.js +1 -0
- package/dist/apollo-core/p-406b27a8.entry.js +1 -0
- package/dist/apollo-core/p-5d63b4ce.entry.js +1 -0
- package/dist/apollo-core/{p-7eb86c63.entry.js → p-6a15f1e0.entry.js} +1 -1
- package/dist/apollo-core/p-8d692d05.entry.js +1 -0
- package/dist/apollo-core/{p-28d12fd3.entry.js → p-b61d7952.entry.js} +1 -1
- package/dist/apollo-core/{p-084d26ed.entry.js → p-ca127ee8.entry.js} +1 -1
- package/dist/apollo-core/p-d1c9c233.entry.js +1 -0
- package/dist/apollo-core/p-dc205893.entry.js +1 -0
- package/dist/apollo-core/p-e2a5d41c.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +1 -1
- package/dist/cjs/index-BQ97-AWw.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xpl-accordion.cjs.entry.js +2 -2
- package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
- package/dist/cjs/{xpl-avatar_61.cjs.entry.js → xpl-avatar_54.cjs.entry.js} +238 -1683
- package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
- package/dist/cjs/xpl-calendar.cjs.entry.js +1 -1
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-large-card.cjs.entry.js +1 -1
- package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-table-header-cell.cjs.entry.js +57 -0
- package/dist/cjs/xpl-table-header.cjs.entry.js +14 -0
- package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
- package/dist/cjs/xpl-toolbar.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -7
- package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
- package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
- package/dist/collection/components/xpl-button/xpl-button.js +1 -1
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
- package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +25 -25
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
- package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +77 -7
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +1 -1
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +53 -46
- package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
- package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +4 -4
- package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +5 -5
- package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
- package/dist/collection/components/xpl-input/xpl-input.js +2 -2
- package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
- package/dist/collection/components/xpl-modal/xpl-modal.js +1 -1
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
- package/dist/collection/components/xpl-pagination/pagination.stories.js +18 -0
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +7 -3
- package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
- package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
- package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +2 -2
- package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +1 -1
- package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
- package/dist/collection/components/xpl-select/xpl-select.js +58 -6
- package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +2 -2
- package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +2 -2
- package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +1 -1
- package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
- package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
- package/dist/collection/components/xpl-table/table.stories.js +67 -319
- package/dist/collection/components/xpl-table/xpl-table.js +151 -1456
- package/dist/collection/components/xpl-table-header/table-header.stories.js +126 -0
- package/dist/collection/components/xpl-table-header/xpl-table-header.js +7 -0
- package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +75 -0
- package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +188 -0
- package/dist/collection/components/xpl-tabs/xpl-tabs.js +5 -5
- package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
- package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
- package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
- package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
- package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
- package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/xpl-accordion.js +1 -1
- package/dist/components/xpl-application-shell.js +1 -1
- package/dist/components/xpl-backdrop2.js +1 -1
- package/dist/components/xpl-badge2.js +1 -1
- package/dist/components/xpl-banner.js +1 -1
- package/dist/components/xpl-breadcrumb-item.js +1 -1
- package/dist/components/xpl-breadcrumbs.js +1 -1
- package/dist/components/xpl-button-row.js +1 -1
- package/dist/components/xpl-button2.js +1 -1
- package/dist/components/xpl-calendar.js +1 -1
- package/dist/components/xpl-checkbox2.js +1 -1
- package/dist/components/xpl-choicelist.js +1 -1
- package/dist/components/xpl-content-area.js +1 -1
- package/dist/components/xpl-dashboard.js +1 -1
- package/dist/components/xpl-data-card.js +1 -1
- package/dist/components/xpl-divider2.js +1 -1
- package/dist/components/xpl-dropdown-group2.js +1 -1
- package/dist/components/xpl-dropdown-heading2.js +1 -1
- package/dist/components/xpl-dropdown-option2.js +1 -1
- package/dist/components/xpl-dropdown2.js +1 -1
- package/dist/components/xpl-dynamic-table-cell.js +1 -1
- package/dist/components/xpl-dynamic-table-row.js +1 -1
- package/dist/components/xpl-dynamic-table.js +1 -1
- package/dist/components/xpl-grid-item.js +1 -1
- package/dist/components/xpl-grid.js +1 -1
- package/dist/components/xpl-header-accordion.js +1 -1
- package/dist/components/xpl-icon2.js +1 -1
- package/dist/components/xpl-input-date2.js +1 -1
- package/dist/components/xpl-input-file2.js +1 -1
- package/dist/components/xpl-input-search2.js +1 -1
- package/dist/components/xpl-input2.js +1 -1
- package/dist/components/xpl-large-card.js +1 -1
- package/dist/components/xpl-list.js +1 -1
- package/dist/components/xpl-main-nav.js +1 -1
- package/dist/components/xpl-modal.js +1 -1
- package/dist/components/xpl-nav-header-menu.js +1 -1
- package/dist/components/xpl-nav-item.js +1 -1
- package/dist/components/xpl-pagination.js +1 -1
- package/dist/components/xpl-panel.js +1 -1
- package/dist/components/xpl-popover2.js +1 -1
- package/dist/components/xpl-progress-bar.js +1 -1
- package/dist/components/xpl-progress-indicator.js +1 -1
- package/dist/components/xpl-radio2.js +1 -1
- package/dist/components/xpl-secondary-nav.js +1 -1
- package/dist/components/xpl-select2.js +1 -1
- package/dist/components/xpl-side-nav-item.js +1 -1
- package/dist/components/xpl-side-nav.js +1 -1
- package/dist/components/xpl-skeleton.js +1 -1
- package/dist/components/xpl-slideout.js +1 -1
- package/dist/components/xpl-tab-panel.js +1 -1
- package/dist/components/xpl-table-header-cell.js +1 -1
- package/dist/components/xpl-table-header.js +1 -1
- package/dist/components/xpl-table.js +1 -1
- package/dist/components/xpl-tabs.js +1 -1
- package/dist/components/xpl-tag2.js +1 -1
- package/dist/components/xpl-toast.js +1 -1
- package/dist/components/xpl-toggle.js +1 -1
- package/dist/components/xpl-toolbar.js +1 -1
- package/dist/components/xpl-tooltip2.js +1 -1
- package/dist/components/xpl-top-nav-item2.js +1 -1
- package/dist/components/xpl-top-nav.js +1 -1
- package/dist/components/xpl-utility-bar.js +1 -1
- package/dist/docs/xpl-checkbox/readme.md +5 -7
- package/dist/docs/xpl-dropdown/readme.md +13 -11
- package/dist/docs/xpl-dynamic-table/readme.md +19 -22
- package/dist/docs/xpl-dynamic-table-cell/readme.md +18 -20
- package/dist/docs/xpl-dynamic-table-row/readme.md +19 -21
- package/dist/docs/xpl-icon/readme.md +1 -1
- package/dist/docs/xpl-select/readme.md +17 -15
- package/dist/docs/xpl-table/readme.md +46 -110
- package/dist/docs/{xpl-table/xpl-table-header → xpl-table-header}/readme.md +13 -13
- package/dist/docs/xpl-table-header-cell/readme.md +47 -0
- package/dist/esm/apollo-core.js +1 -1
- package/dist/esm/index-C7bgJs6C.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xpl-accordion.entry.js +2 -2
- package/dist/esm/xpl-application-shell.entry.js +1 -1
- package/dist/esm/{xpl-avatar_61.entry.js → xpl-avatar_54.entry.js} +239 -1677
- package/dist/esm/xpl-button-row.entry.js +1 -1
- package/dist/esm/xpl-calendar.entry.js +1 -1
- package/dist/esm/xpl-dynamic-table-cell.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table-row.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table.entry.js +1 -1
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-large-card.entry.js +1 -1
- package/dist/esm/xpl-main-nav.entry.js +1 -1
- package/dist/esm/xpl-table-header-cell.entry.js +55 -0
- package/dist/esm/xpl-table-header.entry.js +12 -0
- package/dist/esm/xpl-toggle.entry.js +3 -3
- package/dist/esm/xpl-toolbar.entry.js +2 -2
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +2 -2
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +5 -0
- package/dist/types/components/xpl-header-accordion/xpl-header-accordion.d.ts +10 -9
- package/dist/types/components/xpl-pagination/pagination.stories.d.ts +13 -0
- package/dist/types/components/xpl-select/xpl-select.d.ts +3 -0
- package/dist/types/components/xpl-table/table.stories.d.ts +19 -161
- package/dist/types/components/xpl-table/xpl-table.d.ts +21 -123
- package/dist/types/components/{xpl-table/xpl-table-header → xpl-table-header}/table-header.stories.d.ts +16 -13
- package/dist/types/components/{xpl-table/xpl-table-header-cell → xpl-table-header-cell}/table-header-cell.stories.d.ts +20 -24
- package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +13 -0
- package/dist/types/components.d.ts +89 -391
- package/package.json +10 -1
- package/dist/apollo-core/p-146d5d55.entry.js +0 -1
- package/dist/apollo-core/p-16742606.entry.js +0 -1
- package/dist/apollo-core/p-3eb5eb7c.entry.js +0 -1
- package/dist/apollo-core/p-4882f0bd.entry.js +0 -1
- package/dist/apollo-core/p-64b34268.entry.js +0 -1
- package/dist/apollo-core/p-71b75f36.entry.js +0 -1
- package/dist/apollo-core/p-84254a24.entry.js +0 -1
- package/dist/apollo-core/p-9f2a0321.entry.js +0 -1
- package/dist/apollo-core/p-cde83ab0.entry.js +0 -1
- package/dist/apollo-core/p-e7363036.entry.js +0 -1
- package/dist/collection/components/xpl-table/utils/move-row-dom.js +0 -50
- package/dist/collection/components/xpl-table/utils/table-internal.js +0 -58
- package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +0 -7
- package/dist/collection/components/xpl-table/xpl-table-cell/xpl-table-cell.js +0 -155
- package/dist/collection/components/xpl-table/xpl-table-footer/xpl-table-footer.js +0 -7
- package/dist/collection/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.js +0 -37
- package/dist/collection/components/xpl-table/xpl-table-header/table-header.stories.js +0 -131
- package/dist/collection/components/xpl-table/xpl-table-header/xpl-table-header.js +0 -7
- package/dist/collection/components/xpl-table/xpl-table-header-cell/table-header-cell.stories.js +0 -105
- package/dist/collection/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.js +0 -402
- package/dist/collection/components/xpl-table/xpl-table-row/xpl-table-row.js +0 -121
- package/dist/components/lifecycle.js +0 -1
- package/dist/components/xpl-table-body.d.ts +0 -11
- package/dist/components/xpl-table-body.js +0 -1
- package/dist/components/xpl-table-cell.d.ts +0 -11
- package/dist/components/xpl-table-cell.js +0 -1
- package/dist/components/xpl-table-cell2.js +0 -1
- package/dist/components/xpl-table-footer-cell.d.ts +0 -11
- package/dist/components/xpl-table-footer-cell.js +0 -1
- package/dist/components/xpl-table-footer-cell2.js +0 -1
- package/dist/components/xpl-table-footer.d.ts +0 -11
- package/dist/components/xpl-table-footer.js +0 -1
- package/dist/components/xpl-table-header-cell2.js +0 -1
- package/dist/components/xpl-table-row.d.ts +0 -11
- package/dist/components/xpl-table-row.js +0 -1
- package/dist/docs/xpl-table/xpl-table-body/readme.md +0 -10
- package/dist/docs/xpl-table/xpl-table-cell/readme.md +0 -33
- package/dist/docs/xpl-table/xpl-table-footer/readme.md +0 -10
- package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +0 -30
- package/dist/docs/xpl-table/xpl-table-header-cell/readme.md +0 -66
- package/dist/docs/xpl-table/xpl-table-row/readme.md +0 -19
- package/dist/types/components/xpl-table/utils/move-row-dom.d.ts +0 -3
- package/dist/types/components/xpl-table/utils/table-internal.d.ts +0 -8
- package/dist/types/components/xpl-table/xpl-table-body/xpl-table-body.d.ts +0 -3
- package/dist/types/components/xpl-table/xpl-table-cell/xpl-table-cell.d.ts +0 -11
- package/dist/types/components/xpl-table/xpl-table-footer/xpl-table-footer.d.ts +0 -3
- package/dist/types/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.d.ts +0 -4
- package/dist/types/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.d.ts +0 -32
- package/dist/types/components/xpl-table/xpl-table-row/xpl-table-row.d.ts +0 -13
- /package/dist/types/components/{xpl-table/xpl-table-header → xpl-table-header}/xpl-table-header.d.ts +0 -0
|
@@ -167,7 +167,7 @@ const Backdrop = class {
|
|
|
167
167
|
this.relative = false;
|
|
168
168
|
}
|
|
169
169
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: '072fedf411c5d8671ec2d8a6ff639e5adf93e15c', class: {
|
|
171
171
|
'xpl-backdrop': true,
|
|
172
172
|
'xpl-backdrop--fixed': !this.relative,
|
|
173
173
|
'xpl-backdrop--relative': this.relative,
|
|
@@ -204,7 +204,7 @@ const Badge = class {
|
|
|
204
204
|
[`xpl-badge--size-${this.size}`]: !!this.size,
|
|
205
205
|
[`xpl-badge--shape-${this.shape}`]: !this.dotOnly && !!this.shape,
|
|
206
206
|
};
|
|
207
|
-
return (h(Host, { key: '
|
|
207
|
+
return (h(Host, { key: 'f1a45af398443a5330afe856ac2442aa34cadf24' }, h("div", { key: 'fecb691b2b11414de0a03e119dd63332ade79a3c', class: className }, h("span", { key: '6c4169ea3d4f0f7cdaa03841ec72ac15f9e209f3', class: "xpl-badge__label" }, h("slot", { key: 'c7d96b70e9bcd161c279bf943c2cbc7248e2a53e' })))));
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
|
|
@@ -269,13 +269,13 @@ const Banner = class {
|
|
|
269
269
|
const actionState = this.getActionButtonState();
|
|
270
270
|
const isHeadingPresent = !!((_c = this.heading) === null || _c === void 0 ? void 0 : _c.trim());
|
|
271
271
|
const isDescPresent = !!((_d = this.description) === null || _d === void 0 ? void 0 : _d.trim());
|
|
272
|
-
return (h(Host, { key: '
|
|
272
|
+
return (h(Host, { key: '373b38c40719c248968ed93381309584f24697a9', class: {
|
|
273
273
|
'xpl-banner': true,
|
|
274
274
|
'xpl-banner--section': this.isSection,
|
|
275
275
|
[`xpl-banner--${this.appearance}`]: true,
|
|
276
276
|
'xpl-banner--truncate-desc': this.truncateDesc,
|
|
277
277
|
'xpl-banner--no-icon': this.isSection && !this.hasIcon,
|
|
278
|
-
}, role: "region", "aria-label": this.getAriaLabel() }, (!this.isSection || this.hasIcon) && (h("div", { key: '
|
|
278
|
+
}, role: "region", "aria-label": this.getAriaLabel() }, (!this.isSection || this.hasIcon) && (h("div", { key: 'b12f8facbdad390e2069374163048099a33aa309', class: "xpl-banner__icon", "aria-hidden": "true" }, h("xpl-icon", { key: '35ee47db756bc0f6b6cd0a2b0cd890a4ec10ff7c', icon: this.getIcon(), size: 24 }))), h("div", { key: '8aaca62cbd7b3cf353bfb35fc2f679932f2b0ade', class: "xpl-banner__body" }, isHeadingPresent && h("p", { key: 'fded85ef43b5186704195312621a33b7b823d19d', class: "xpl-banner__heading" }, this.heading), isDescPresent && (h("p", { key: '1b7386b32891789f8cc425da922f7c3ee60fe5a6', class: "xpl-banner__description", title: this.truncateDesc ? this.description : undefined }, this.description))), (hasAction || hasSecondaryAction) && (h("div", { key: '0b4b8e89db7cc6c4a55e207cf0be1b36956fe243', class: "xpl-banner__actions" }, hasAction && (h("xpl-button", { key: 'c15e5cb0ff332f2ca809dcf912fc7a4c68d47538', size: "xs", variant: actionVariant, state: actionState, onClick: () => this.action.emit() }, this.actionText)), hasSecondaryAction && (h("xpl-button", { key: '6f20f721df8eb994ef9935d2c6f634b3460d9d77', size: "xs", variant: actionVariant, state: actionState, onClick: () => this.secondaryAction.emit() }, this.secondaryActionText)))), this.isDismissible && (h("button", { key: '2fab1fec767aaed2bb36ee2b40bcf84a48ad6ead', class: "xpl-banner__dismiss", type: "button", "aria-label": `Dismiss ${this.isSection ? 'section ' : ''}banner`, onClick: () => this.dismiss.emit() }, h("xpl-icon", { key: '7747d3e4aae5426d0e3344fb7aab92a4f003cf4e', icon: "xmark", size: 24, "aria-hidden": "true" })))));
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
|
|
@@ -288,7 +288,7 @@ const BreadcrumbItem = class {
|
|
|
288
288
|
`;
|
|
289
289
|
}
|
|
290
290
|
render() {
|
|
291
|
-
return (h(Host, { key: '
|
|
291
|
+
return (h(Host, { key: '98314b8841ba9d900dbba227363865efb26faf4c', class: "xpl-breadcrumb-item", role: "listitem" }, h("li", { key: '26bf86067dc2348b6ca96243bd1f9513ca187a00', role: "none" }, h("slot", { key: '802b606cce1052ea7fb859260627d6c6801ed78f' })), h("span", { key: '22de35338bf4439a23f8c08a7ea46d1d4f2b68e8', innerHTML: this.chevron })));
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
|
|
@@ -297,7 +297,7 @@ const Breadcrumbs = class {
|
|
|
297
297
|
registerInstance(this, hostRef);
|
|
298
298
|
}
|
|
299
299
|
render() {
|
|
300
|
-
return (h(Host, { key: '
|
|
300
|
+
return (h(Host, { key: '36533f6524e01aed62e293ebe93d8eea34b6b59a' }, h("nav", { key: '6a5562e639044f9d9d12a6365df69c5181f5bbba', class: "xpl-breadcrumbs", "aria-label": "Breadcrumb" }, h("ol", { key: '99463e4808425aa8478a5e8fa2a113831eae1ecf', role: "list" }, h("slot", { key: 'f4d20df3a834f100663786d47881f742c9691969' })))));
|
|
301
301
|
}
|
|
302
302
|
};
|
|
303
303
|
|
|
@@ -348,7 +348,7 @@ const Button = class {
|
|
|
348
348
|
}
|
|
349
349
|
render() {
|
|
350
350
|
var _a;
|
|
351
|
-
return (h(Host, { key: '
|
|
351
|
+
return (h(Host, { key: 'fc2207b2f07ecccd8c076846406b7c5d2ed6854d', class: {
|
|
352
352
|
'xpl-button': true,
|
|
353
353
|
[`xpl-button--${this.size}`]: true,
|
|
354
354
|
[`xpl-button--${this.variant}`]: true,
|
|
@@ -386,14 +386,14 @@ const Checkbox = class {
|
|
|
386
386
|
}
|
|
387
387
|
render() {
|
|
388
388
|
var _a;
|
|
389
|
-
return (h(Host, { key: '
|
|
389
|
+
return (h(Host, { key: 'a73acf5a3394c8f1060f9095682093a1db3b09db', class: {
|
|
390
390
|
'xpl-checkbox-radio-container': true,
|
|
391
391
|
styled: this.styled,
|
|
392
392
|
disabled: this.disabled,
|
|
393
|
-
} }, h("input", { key: '
|
|
393
|
+
} }, h("input", { key: '7da5f17d827bfb6d63a4933977daee75c9845899', class: "xpl-checkbox", type: "checkbox", "aria-label": ((_a = this.ariaLabel) !== null && _a !== void 0 ? _a : '').trim() || undefined, checked: this.checked, "data-id": this.dataId, disabled: this.disabled, id: this.id, indeterminate: this.indeterminate, onChange: this.onChange, name: this.name, required: this.required, value: this.value }), h("label", { key: '86669521b030289b55279bd6fceecb5d060c7138', class: {
|
|
394
394
|
'xpl-label': true,
|
|
395
395
|
'xpl-label--disabled': this.disabled,
|
|
396
|
-
}, htmlFor: this.id }, h("slot", { key: '
|
|
396
|
+
}, htmlFor: this.id }, h("slot", { key: 'b40aafb664cbac2092938afd45683cfc0313beac' }), this.description && (h("small", { key: '06e2245639b577f5d09afdf9000e43d076758e80', class: {
|
|
397
397
|
'xpl-description': true,
|
|
398
398
|
'xpl-description--disabled': this.disabled,
|
|
399
399
|
} }, this.description)))));
|
|
@@ -438,7 +438,7 @@ const Choicelist = class {
|
|
|
438
438
|
this.onChoicesPropChange(this.choices);
|
|
439
439
|
}
|
|
440
440
|
render() {
|
|
441
|
-
return (h(Host, { key: '
|
|
441
|
+
return (h(Host, { key: '003270ebbe4ccd9c204774f2c41302e64697a358', class: "xpl-choicelist-container" }, this.heading !== undefined || this.description !== undefined ? (h("div", { class: "xpl-choicelist-heading" }, this.heading && h("h3", null, this.heading), this.description && h("p", null, this.description))) : null, this.choices && (h("ul", { key: '388763663e1e9dc48f53b4e8569c3c58942fb631', class: {
|
|
442
442
|
'xpl-choicelist': true,
|
|
443
443
|
'xpl-choicelist--styled': this.styled,
|
|
444
444
|
} }, this.choices.map((choice, i) => {
|
|
@@ -467,7 +467,7 @@ const ContentArea = class {
|
|
|
467
467
|
this.size = 'wide';
|
|
468
468
|
}
|
|
469
469
|
render() {
|
|
470
|
-
return (h(Host, { key: '
|
|
470
|
+
return (h(Host, { key: '2fe4c1c077c12e47600c737cc9266ae2eff8aaec' }, h("main", { key: '2e6c6f4b83cea96d629bb5af65c4ce6a4d20570e', class: `xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}` }, h("div", { key: '033e707fbc48ae523fafb25dd2952d3de9214908', class: "xpl-content-area" }, h("slot", { key: '04afc15969c2b1fb7e2feb3d8ae46248ee0f6e31' })))));
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
473
|
|
|
@@ -476,7 +476,7 @@ const Dashboard = class {
|
|
|
476
476
|
registerInstance(this, hostRef);
|
|
477
477
|
}
|
|
478
478
|
render() {
|
|
479
|
-
return (h(Host, { key: '
|
|
479
|
+
return (h(Host, { key: 'ceeb8b27d9537c70e88360de21238c9ce2a3f90b' }, h("dl", { key: '3c4fcb92f472f14885053a1cb1db893618a6d8a8', class: "xpl-dashboard" }, h("slot", { key: 'fe4fa8fdec2ce84bdedc7aa404ab647abd189d11' }))));
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
|
|
@@ -513,8 +513,8 @@ const DataCard = class {
|
|
|
513
513
|
: this.smallStatVariant === 'negative'
|
|
514
514
|
? 'arrow-down-right'
|
|
515
515
|
: 'dash';
|
|
516
|
-
return (h(Host, { key: '
|
|
517
|
-
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: '
|
|
516
|
+
return (h(Host, { key: '917b6ae82a30b849b100e878dc6be08eb4171214', role: "group", class: `xpl-data-card ${this.link ? 'xpl-data-card__link' : ''}`, tabindex: "0" }, h("dt", { key: '21573d19d14f861eea6562529f78e93affc1e5d2', class: headerClasses }, h("header", { key: '1af52bd082f4d12239db85e78eaf74ed2eb7e027' }, !!this.leadingIcon && this.icon && (h("span", { key: 'dfdcc25ae67fdc766ee3075a479fbfeeac2561ab', class: `xpl-data-card__icon--${this.variant}` }, h("xpl-icon", { key: '4072018714c05bd5bae20bfb9e5b6a04561474da', icon: this.icon, "background-color": bgColorHue, size: 20 }))), h("slot", { key: 'f81204887ad6c229cb50e8d3ff654c1aa4703368', name: "title" }, this.name)), this.link && (h("span", { key: '6d8d61f8611fdbc5cd09fc20ba15194e0e1e7b56', class: "xpl-data-card__header-arrow" }, h("xpl-icon", { key: '863e66734bbbd6aa178f140b22f8afb3dd401127', icon: "chevron-right", size: 16 })))), h("dd", { key: '08a5e4af6873c267336f7daff6d3455e75a2883e', class: "xpl-data-card__body" }, h("div", { key: 'ec8ff889fb93d99e7ef51361e041edbaaaf5cd62', class: "xpl-data-card__left" }, h("span", { key: '4787e6aadc3832830fe707ffc08e5614a7abde7b', class: "xpl-data-card-stat xpl-data-card-stat--long" }, this.stat), this.tooltipTextStat ? (h("xpl-tooltip", { text: this.tooltipTextStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, this.shortStat ? this.shortStat : this.stat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, h("abbr", { title: this.stat }, this.shortStat ? this.shortStat : this.stat))), this.smallStatVariant ? (this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (this.smallStatIcon &&
|
|
517
|
+
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: '2060dba53f12917e37747a6bc52c7f03fe4dadc7', class: "xpl-data-card__detail" }, this.detail)), hasContentSlot && (h("div", { key: '7a091cce8bc0abae2af7b15d6d1a63acd16854c5', class: "xpl-data-card__right" }, h("slot", { key: 'd83790136435a0d5427fd746d2cba5a08cf914eb', name: contentSlot }))))));
|
|
518
518
|
}
|
|
519
519
|
get el() { return getElement(this); }
|
|
520
520
|
static get watchers() { return {
|
|
@@ -534,7 +534,7 @@ const Divider = class {
|
|
|
534
534
|
render() {
|
|
535
535
|
let className = 'xpl-divider';
|
|
536
536
|
className += ` xpl-divider--${this.tier}`;
|
|
537
|
-
return (h(Host, { key: '
|
|
537
|
+
return (h(Host, { key: '213dc1893d64e06256ef2958b59b8377428d81d4', class: className }, h("span", { key: '2e03654076b9b76f2ce9e8475bb44068170c8a80' }, h("slot", { key: '5af40b6963beddbd0d1fe5fd05a9e62274ce3418' }))));
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
|
|
@@ -2263,16 +2263,19 @@ const Dropdown = class {
|
|
|
2263
2263
|
this.closeOnSelect = true;
|
|
2264
2264
|
this.mode = 'single';
|
|
2265
2265
|
this.anchorToTrigger = false;
|
|
2266
|
+
this.placement = 'bottom-start';
|
|
2266
2267
|
this.selectOnFocus = false;
|
|
2267
2268
|
this.cleanupAutoUpdate = null;
|
|
2268
2269
|
this.updateDropdownPosition = async (triggerEl) => {
|
|
2269
|
-
var _a;
|
|
2270
|
+
var _a, _b;
|
|
2270
2271
|
const { x, y, placement, middlewareData } = await computePosition(triggerEl, this.hostElement, {
|
|
2271
2272
|
strategy: 'fixed',
|
|
2272
|
-
placement:
|
|
2273
|
+
placement: this.placement,
|
|
2273
2274
|
middleware: [
|
|
2274
2275
|
offset(4),
|
|
2275
|
-
flip()
|
|
2276
|
+
flip(((_a = this.flipFallbackPlacements) === null || _a === void 0 ? void 0 : _a.length)
|
|
2277
|
+
? { fallbackPlacements: this.flipFallbackPlacements }
|
|
2278
|
+
: {}),
|
|
2276
2279
|
size({
|
|
2277
2280
|
apply: ({ availableHeight, rects }) => {
|
|
2278
2281
|
const listEl = this.hostElement.querySelector('.xpl-dropdown-list');
|
|
@@ -2308,7 +2311,7 @@ const Dropdown = class {
|
|
|
2308
2311
|
});
|
|
2309
2312
|
if (!this.cleanupAutoUpdate)
|
|
2310
2313
|
return;
|
|
2311
|
-
if ((
|
|
2314
|
+
if ((_b = middlewareData.hide) === null || _b === void 0 ? void 0 : _b.referenceHidden) {
|
|
2312
2315
|
this.isOpen = false;
|
|
2313
2316
|
return;
|
|
2314
2317
|
}
|
|
@@ -2340,6 +2343,16 @@ const Dropdown = class {
|
|
|
2340
2343
|
this.startPositioning();
|
|
2341
2344
|
}
|
|
2342
2345
|
}
|
|
2346
|
+
onFlipFallbackPlacementsChanged() {
|
|
2347
|
+
if (this.isOpen && this.anchorToTrigger) {
|
|
2348
|
+
this.startPositioning();
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
onPlacementChanged() {
|
|
2352
|
+
if (this.isOpen && this.anchorToTrigger) {
|
|
2353
|
+
this.startPositioning();
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2343
2356
|
onTriggerIdChanged() {
|
|
2344
2357
|
if (this.isOpen) {
|
|
2345
2358
|
this.startPositioning();
|
|
@@ -2467,18 +2480,24 @@ const Dropdown = class {
|
|
|
2467
2480
|
var { groupName, options: opts, subtitle } = _a, properties = __rest$1(_a, ["groupName", "options", "subtitle"]);
|
|
2468
2481
|
return groupName ? (h("xpl-dropdown-group", Object.assign({ groupName: groupName, options: opts }, properties))) : (h("xpl-dropdown-option", Object.assign({ subtitle: subtitle }, properties)));
|
|
2469
2482
|
});
|
|
2470
|
-
return (h(Host, { key: '
|
|
2483
|
+
return (h(Host, { key: '1ef465611f9a8501af41c17523352714a7921f29', "aria-expanded": isOpen ? 'true' : 'false', class: {
|
|
2471
2484
|
'xpl-dropdown': true,
|
|
2472
2485
|
'xpl-dropdown--multi': mode === 'multi',
|
|
2473
2486
|
'xpl-dropdown--open': isOpen,
|
|
2474
2487
|
'xpl-dropdown--anchor-to-trigger': this.anchorToTrigger,
|
|
2475
|
-
}, role: "listbox" }, h("slot", { key: '
|
|
2488
|
+
}, role: "listbox" }, h("slot", { key: '118c8b34e72aa6ab018e6fa9ff29a18ae540b89e', name: "header" }), h("ul", { key: '01544e6aa8d785c48b4f677de102efe4ecc7b53a', class: "xpl-dropdown-list" }, mappedOptions || h("slot", { key: 'f70619995bed02540cef11deaeb6c3e5704165ff', name: "options" }))));
|
|
2476
2489
|
}
|
|
2477
2490
|
get hostElement() { return getElement(this); }
|
|
2478
2491
|
static get watchers() { return {
|
|
2479
2492
|
"anchorToTrigger": [{
|
|
2480
2493
|
"onAnchorToTriggerChanged": 0
|
|
2481
2494
|
}],
|
|
2495
|
+
"flipFallbackPlacements": [{
|
|
2496
|
+
"onFlipFallbackPlacementsChanged": 0
|
|
2497
|
+
}],
|
|
2498
|
+
"placement": [{
|
|
2499
|
+
"onPlacementChanged": 0
|
|
2500
|
+
}],
|
|
2482
2501
|
"triggerId": [{
|
|
2483
2502
|
"onTriggerIdChanged": 0
|
|
2484
2503
|
}],
|
|
@@ -2515,7 +2534,7 @@ const DropdownGroup = class {
|
|
|
2515
2534
|
var { groupName: optsGroupName } = _a, properties = __rest(_a, ["groupName"]);
|
|
2516
2535
|
return optsGroupName ? (h("xpl-dropdown-group", Object.assign({ label: optsGroupName }, properties))) : (h("xpl-dropdown-option", Object.assign({}, properties)));
|
|
2517
2536
|
});
|
|
2518
|
-
return (h(Host, { key: '
|
|
2537
|
+
return (h(Host, { key: 'b872cfc0a8eb2e3542f07f6ae17ebc15b6f965ab', role: "group", "aria-label": groupName }, h("li", { key: '8e475e45b5040bd78c7d37f8c58b0689a508f067', class: "xpl-dropdown-list-item" }, h("xpl-dropdown-heading", { key: '3b7b984646bdcc502aca2260a0b59494e0884f6c', label: groupName }), h("ul", { key: 'c75e710ebe06a23aacca57f34ce286516c98a8c5', class: "xpl-dropdown-list" }, mappedOptions || h("slot", { key: '6b72762b22f316561f7614e4841018c019a60681', name: "options" })))));
|
|
2519
2538
|
}
|
|
2520
2539
|
};
|
|
2521
2540
|
|
|
@@ -2524,7 +2543,7 @@ const DropdownHeading = class {
|
|
|
2524
2543
|
registerInstance(this, hostRef);
|
|
2525
2544
|
}
|
|
2526
2545
|
render() {
|
|
2527
|
-
return (h(Host, { key: '
|
|
2546
|
+
return (h(Host, { key: '70e5556188bd87fe5842256e4e145c3585f73409', class: { 'xpl-dropdown-heading': true }, role: "presentation" }, h("span", { key: '2d45f0191d9b158641da794ee1b9f246f9659717' }, this.label || h("slot", { key: '21cc81673e6a37f4b7ff896d12bd94916c3a92e7', name: "heading" }))));
|
|
2528
2547
|
}
|
|
2529
2548
|
};
|
|
2530
2549
|
|
|
@@ -2581,11 +2600,11 @@ const DropdownOptionCpnt = class {
|
|
|
2581
2600
|
}
|
|
2582
2601
|
render() {
|
|
2583
2602
|
const { label, isSelected, isDisabled, value, subtitle, icon } = this;
|
|
2584
|
-
return (h(Host, { key: '
|
|
2603
|
+
return (h(Host, { key: '838f64dba15bc8d6c2f65a8685365c5618c24d5f', class: {
|
|
2585
2604
|
'xpl-dropdown-option': true,
|
|
2586
2605
|
'xpl-dropdown-option--disabled': isDisabled,
|
|
2587
2606
|
'xpl-dropdown-option--selected': isSelected,
|
|
2588
|
-
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: '
|
|
2607
|
+
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: 'bc4b23054cd73a95ff5cf167c4195563a9e318ec', class: "xpl-dropdown-list-item" }, icon && (h("xpl-icon", { key: '797d92d1d80cb8c33500d8dfe8b1bf9396c767ca', class: "xpl-dropdown-list-item__icon", icon: icon, size: 20 })), label || h("slot", { key: '7a590a3abae38e7934f703929895be152b01816d', name: "option" }), subtitle && h("span", { key: '465fb73335df17864cd21e067f26cdba85d8135c', class: "xpl-dropdown-list-item__subtitle" }, subtitle))));
|
|
2589
2608
|
}
|
|
2590
2609
|
get hostElement() { return getElement(this); }
|
|
2591
2610
|
};
|
|
@@ -2593,13 +2612,13 @@ const DropdownOptionCpnt = class {
|
|
|
2593
2612
|
const HeaderAccordion = class {
|
|
2594
2613
|
constructor(hostRef) {
|
|
2595
2614
|
registerInstance(this, hostRef);
|
|
2596
|
-
this.expanded = false;
|
|
2597
|
-
this.parentChecked = false;
|
|
2598
|
-
this.parentIndeterminate = false;
|
|
2599
|
-
this.disabled = false;
|
|
2600
|
-
this.hasCheckbox = true;
|
|
2601
2615
|
this.initialExpanded = false;
|
|
2616
|
+
this.disabled = false;
|
|
2602
2617
|
this.selectedCount = -1;
|
|
2618
|
+
this.hasCheckbox = true;
|
|
2619
|
+
this.expanded = this.initialExpanded;
|
|
2620
|
+
this.parentChecked = false;
|
|
2621
|
+
this.parentIndeterminate = false;
|
|
2603
2622
|
this.toggleAccordion = () => {
|
|
2604
2623
|
this.expanded = !this.expanded;
|
|
2605
2624
|
};
|
|
@@ -2613,24 +2632,19 @@ const HeaderAccordion = class {
|
|
|
2613
2632
|
});
|
|
2614
2633
|
};
|
|
2615
2634
|
}
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2635
|
+
applyBorderRadiusToLastRow() {
|
|
2636
|
+
var _a;
|
|
2637
|
+
if (this.expanded) {
|
|
2638
|
+
const rows = (_a = this.el) === null || _a === void 0 ? void 0 : _a.querySelectorAll('xpl-dynamic-table-row');
|
|
2639
|
+
const lastRow = rows[rows.length - 1];
|
|
2640
|
+
const cells = lastRow === null || lastRow === void 0 ? void 0 : lastRow.querySelectorAll('xpl-dynamic-table-cell');
|
|
2641
|
+
cells[0].style.borderBottomLeftRadius = '0.5rem';
|
|
2642
|
+
cells[cells.length - 1].style.borderBottomRightRadius = '0.5rem';
|
|
2619
2643
|
}
|
|
2620
2644
|
}
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
componentDidLoad() {
|
|
2625
|
-
const initialCheckboxesValue = this.selectedCount > -1 ? this.selectedCount : 0;
|
|
2626
|
-
this.updateParentCheckbox(initialCheckboxesValue);
|
|
2627
|
-
}
|
|
2628
|
-
handleChildCheckboxChange() {
|
|
2629
|
-
var _a;
|
|
2630
|
-
if (this.selectedCount === -1) {
|
|
2631
|
-
const childCheckboxes = (_a = this.el) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[role="region"] xpl-checkbox input:not([disabled])');
|
|
2632
|
-
const checkedCount = Array.from(childCheckboxes).filter((checkbox) => checkbox.checked).length;
|
|
2633
|
-
this.updateParentCheckbox(checkedCount);
|
|
2645
|
+
watchSelectedCount(selectedCount, _previousCount) {
|
|
2646
|
+
if (selectedCount > -1) {
|
|
2647
|
+
this.updateParentCheckbox(selectedCount);
|
|
2634
2648
|
}
|
|
2635
2649
|
}
|
|
2636
2650
|
updateParentCheckbox(selectedCount) {
|
|
@@ -2649,11 +2663,23 @@ const HeaderAccordion = class {
|
|
|
2649
2663
|
this.parentIndeterminate = true;
|
|
2650
2664
|
}
|
|
2651
2665
|
}
|
|
2666
|
+
handleChildCheckboxChange() {
|
|
2667
|
+
var _a;
|
|
2668
|
+
if (this.selectedCount === -1) {
|
|
2669
|
+
const childCheckboxes = (_a = this.el) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[role="region"] xpl-checkbox input:not([disabled])');
|
|
2670
|
+
const checkedCount = Array.from(childCheckboxes).filter((checkbox) => checkbox.checked).length;
|
|
2671
|
+
this.updateParentCheckbox(checkedCount);
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
componentDidLoad() {
|
|
2675
|
+
const initialCheckoxesValue = this.selectedCount > -1 ? this.selectedCount : 0;
|
|
2676
|
+
this.updateParentCheckbox(initialCheckoxesValue);
|
|
2677
|
+
}
|
|
2678
|
+
componentWillRender() {
|
|
2679
|
+
this.applyBorderRadiusToLastRow();
|
|
2680
|
+
}
|
|
2652
2681
|
render() {
|
|
2653
|
-
return (h(Host, { key: '
|
|
2654
|
-
'xpl-header-accordion': true,
|
|
2655
|
-
'xpl-header-accordion--expanded': this.expanded,
|
|
2656
|
-
} }, h("div", { key: '41cbb9358a5d76f44f135d76c945fe801cafc474', class: `header-accordion header-accordion--${this.expanded ? 'expanded' : 'collapsed'}` }, this.hasCheckbox && (h("xpl-checkbox", { key: 'c939d100f687b14455424ee3f0b6bdfd7de785bb', class: "xpl-header-accordion__parent-checkbox", checked: this.parentChecked, disabled: this.disabled, indeterminate: this.parentIndeterminate, onCheckboxChange: (event) => this.handleParentCheckboxChange(event.detail) })), h("button", { key: '4d98d8d75b4c7c7ba8e50ce6d43ed3b83919d624', "aria-expanded": this.expanded, "aria-controls": this.contentId, class: "toggle-area", onClick: this.toggleAccordion, type: "button" }, h("slot", { key: 'd9c993b7e8e6cf0b46014d6c535a52c84386b8ed', name: "title" }), h("xpl-icon", { key: '58d114ae4dd93c9ec15e3d74cfb2d33c6c1b57cb', size: 20, icon: "chevron-down", class: this.expanded && 'rotate' }))), h("div", { key: '46a98c094621ec02c9416bcfa7a2d33e6ce468d4', id: this.contentId, role: "region", class: !this.expanded ? 'content--hidden' : 'content--shown' }, h("slot", { key: '7966e352ec17125afa59a7590dbc8e9372a39f41', name: "content" }))));
|
|
2682
|
+
return (h(Host, { key: '33b59f238ef5eabce7a83dec5e189459038ac2e0', class: "xpl-header-accordion" }, h("div", { key: '1269fe93be898a0300a1c840ad8919608c86bbff', class: `header-accordion header-accordion--${this.expanded ? 'expanded' : 'collapsed'}` }, this.hasCheckbox && (h("xpl-checkbox", { key: '16a93cbaab64072990502ed7d1bc2a496ad31425', class: "xpl-header-accordion__parent-checkbox", checked: this.parentChecked, disabled: this.disabled, indeterminate: this.parentIndeterminate, onCheckboxChange: (event) => this.handleParentCheckboxChange(event.detail) })), h("button", { key: '00e7024adcd3c8cef52cc5d11be8e4dc6319c1a8', "aria-expanded": this.expanded, "aria-controls": this.contentId, class: "toggle-area", onClick: this.toggleAccordion, type: "button" }, h("slot", { key: '16fc847fff7d27f73c589bff9670fdbdec9f58cc', name: "title" }), h("xpl-icon", { key: '44e27d19feb130c0903949d24a9c71f19f8475b6', size: 16, icon: "chevron-down", class: this.expanded && 'rotate' }))), h("div", { key: 'aa8bd514da7666ed09c72c5b271ea0eeda729ef8', id: this.contentId, role: "region", class: !this.expanded ? 'content--hidden' : 'content--shown' }, h("slot", { key: 'b8adf0af8ea58edad1036fc45277ef6621bc8fbb', name: "content" }))));
|
|
2657
2683
|
}
|
|
2658
2684
|
get el() { return getElement(this); }
|
|
2659
2685
|
static get watchers() { return {
|
|
@@ -15559,10 +15585,10 @@ const Icon = class {
|
|
|
15559
15585
|
let wrapperClasses = 'xpl-icon__wrapper ';
|
|
15560
15586
|
if (this.backgroundColor)
|
|
15561
15587
|
wrapperClasses += `xpl-icon__wrapper--with-background xpl-icon__wrapper--with-background--${this.backgroundColor}`;
|
|
15562
|
-
return (h(Host, { key: '
|
|
15588
|
+
return (h(Host, { key: '07522771501e6e67b0ae91bbee9cc8699d79fb8b' }, h("figure", { key: '2acf41e3e20ff3998050c948fcae5d0990cb706a', class: wrapperClasses }, h("span", { key: '560b2e62366ee0842442c29280a7e37b53edf2be', "aria-label": this.icon, role: "img", class: "xpl-icon", style: {
|
|
15563
15589
|
width: `${options.width}px`,
|
|
15564
15590
|
height: `${options.height}px`,
|
|
15565
|
-
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: '
|
|
15591
|
+
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: '256c0d05be8026b24a139f8bfff4f00c65112030' }, this.icon, " icon"))));
|
|
15566
15592
|
}
|
|
15567
15593
|
};
|
|
15568
15594
|
Icon.style = xplIconCss();
|
|
@@ -15716,13 +15742,13 @@ const Input = class {
|
|
|
15716
15742
|
this.characterCount > this.maxCharacterCount) {
|
|
15717
15743
|
hasError = true;
|
|
15718
15744
|
}
|
|
15719
|
-
return (h(Host, { key: '
|
|
15745
|
+
return (h(Host, { key: '4b60d50e8b88f905777d76197afe181026ae5a94', class: {
|
|
15720
15746
|
'xpl-input': true,
|
|
15721
15747
|
'xpl-input--disabled': this.disabled,
|
|
15722
15748
|
'xpl-input--error': hasError,
|
|
15723
15749
|
'xpl-input--readonly': this.readonly,
|
|
15724
15750
|
[`xpl-input--${this.type}`]: true,
|
|
15725
|
-
} }, this.label && (h("label", { key: '
|
|
15751
|
+
} }, this.label && (h("label", { key: '8b0dc01150607c2943ccc541b9acd3a7fa5d2143', class: "xpl-input-label", htmlFor: this._id }, this.label, this.description && h("small", { key: '8d1f988983fd54e3bc231c0a8091b4fe83ed8ab8' }, this.description))), this.renderInput(), ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("label", { key: '349492ed192e6105dd549634da1ce2c0371f5b9d', class: "xpl-input-error", htmlFor: this._id, id: `${this._id}-error` }, h("xpl-icon", { key: '7903d2f35033ceefcf94eff8081997b4aec3c1a9', icon: "alert-circle", size: 16 }), h("span", { key: 'e3d557f705647eb304b4bf38151dcf01c17fce15' }, this.error)))));
|
|
15726
15752
|
}
|
|
15727
15753
|
get el() { return getElement(this); }
|
|
15728
15754
|
};
|
|
@@ -16090,16 +16116,16 @@ const InputColor = class {
|
|
|
16090
16116
|
top: `${y}px`,
|
|
16091
16117
|
background: `rgb(${r}, ${g}, ${b})`,
|
|
16092
16118
|
};
|
|
16093
|
-
return (h(Host, { key: '
|
|
16119
|
+
return (h(Host, { key: 'f665a747f8938212d0c9ada4f251a9fc880ba82c', class: "xpl-input-color" }, h("xpl-popover", { key: 'eac77d1e9f350b3b0dd66001a7a596d156a75a53', disabled: this.disabled, display: "menu" }, h("div", { key: '73d1468c4261fd9a8e957189129cc660757d849f', slot: "trigger" }, h("div", { key: 'fa098788863247a7c87e4efe628b5b47f0bb3113', class: {
|
|
16094
16120
|
'xpl-input-color__display': true,
|
|
16095
16121
|
'xpl-input-color__display--disabled': this.disabled,
|
|
16096
16122
|
'xpl-input-color__display--error': !!this.hasErrorState,
|
|
16097
|
-
} }, h("span", { key: '
|
|
16123
|
+
} }, h("span", { key: 'd471146ff3ba7b026dba1424599361d0aa0fe49c', class: "xpl-input-color__color", style: {
|
|
16098
16124
|
background: objectToStringColor(this.colorValues),
|
|
16099
|
-
} }), this.colorValues.hex ? (h("span", { class: "xpl-input-color__value" }, objectToStringColor(this.colorValues))) : (h("span", { class: "xpl-input-color__placeholder" }, this.placeholder)), this.eyeDropperSupported && !this.hideEyeDropper && (h("xpl-icon", { key: '
|
|
16125
|
+
} }), this.colorValues.hex ? (h("span", { class: "xpl-input-color__value" }, objectToStringColor(this.colorValues))) : (h("span", { class: "xpl-input-color__placeholder" }, this.placeholder)), this.eyeDropperSupported && !this.hideEyeDropper && (h("xpl-icon", { key: '5cd87456ef093611b6be8906c24b235ea7f19524', size: 20, icon: "eye-dropper", class: "xpl-input-color__icon", onClick: (e) => {
|
|
16100
16126
|
e.stopPropagation();
|
|
16101
16127
|
this.openEyeDropper();
|
|
16102
|
-
} })))), h("div", { key: '
|
|
16128
|
+
} })))), h("div", { key: 'df7bdf567c9a697f8a5e737e5a8cb1b1b962dbb9', class: "xpl-input-color__menu" }, h("div", { key: 'ae630752b48e9d211273da6f3dadda8ace603ba2', class: "xpl-input-color__sl-grid", ref: (el) => {
|
|
16103
16129
|
this.colorInputElements.slGrid = el;
|
|
16104
16130
|
}, style: {
|
|
16105
16131
|
background: [
|
|
@@ -16107,9 +16133,9 @@ const InputColor = class {
|
|
|
16107
16133
|
`linear-gradient(to right, #fff, #fff0)`,
|
|
16108
16134
|
`rgb(${hueBaseColor.r} ${hueBaseColor.g} ${hueBaseColor.b})`,
|
|
16109
16135
|
].join(', '),
|
|
16110
|
-
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '
|
|
16136
|
+
}, onMouseDown: this.startDrag, onTouchStart: this.startDrag }, h("div", { key: '25ffc6bb94f0e861a3bc5a6da5c01e0901d1779e', class: "xpl-input-color__sl-thumb", style: slThumbStyle })), h("div", { key: '7d256baab084f96c56724b4eede835a13bee7055', class: "xpl-input-color__grid" }, h("input", { key: '227309d4590722c24c2d053c013a6d473e44a3ee', type: "range", min: "0", max: "360", value: this.hue, class: "xpl-input-color__slider xpl-input-color__hue", name: "color-hue-slider", ref: (el) => {
|
|
16111
16137
|
this.colorInputElements.hue = el;
|
|
16112
|
-
} }), h("input", { key: '
|
|
16138
|
+
} }), h("input", { key: '2d43e7c9f98fd5cdcccde7206c0cf4e5ae6bde6d', type: "range", min: "0", max: "1", step: "0.01", value: a, class: "xpl-input-color__slider xpl-input-color__alpha", name: "color-alpha-slider", ref: (el) => {
|
|
16113
16139
|
this.colorInputElements.alpha = el;
|
|
16114
16140
|
}, style: {
|
|
16115
16141
|
backgroundImage: [
|
|
@@ -16119,9 +16145,9 @@ const InputColor = class {
|
|
|
16119
16145
|
`linear-gradient(45deg, transparent 75%, #ccc 75%)`,
|
|
16120
16146
|
`linear-gradient(-45deg, transparent 75%, #ccc 75%)`,
|
|
16121
16147
|
].join(', '),
|
|
16122
|
-
} }), h("div", { key: '
|
|
16148
|
+
} }), h("div", { key: '26a562a220b2458e0ee99906d27d8a11e38f2d02', class: "xpl-input-color__preview", style: {
|
|
16123
16149
|
background: `rgba(${r}, ${g}, ${b}, ${a})`,
|
|
16124
|
-
} })), h("div", { key: '
|
|
16150
|
+
} })), h("div", { key: 'a77a7325f72ef73e6aa2d6968ae4afd1e010cf2c', class: "xpl-input-color__inputs" }, Object.entries(this.colorInputElements)
|
|
16125
16151
|
.filter(([key]) => ['hex', 'r', 'g', 'b', 'a'].includes(key))
|
|
16126
16152
|
.map(([key]) => (h("xpl-input", { key: key, label: key.toLocaleUpperCase(), name: `color-${key}-input`, placeholder: key === 'hex' ? '793EF7' : '0', value: this.colorValues[key], ref: (elRef) => {
|
|
16127
16153
|
this.colorInputElements[key] = elRef;
|
|
@@ -16244,16 +16270,16 @@ const InputDate = class {
|
|
|
16244
16270
|
parent.removeChild(wrapper);
|
|
16245
16271
|
}
|
|
16246
16272
|
render() {
|
|
16247
|
-
return (h(Host, { key: '
|
|
16273
|
+
return (h(Host, { key: '35b39ed37afa33603772cdd0dce79cf7533d36ec', class: {
|
|
16248
16274
|
'xpl-input-date': true,
|
|
16249
16275
|
[`xpl-input-date--mode-${this.mode}`]: true,
|
|
16250
16276
|
'xpl-input-date--error': !!this.hasErrorState,
|
|
16251
16277
|
'xpl-input-date--flatpickr-static': this.flatpickrStaticLayout,
|
|
16252
|
-
} }, h("div", { key: '
|
|
16278
|
+
} }, h("div", { key: '14940421a3f9fb4e7a5acbd5abb222d927a701cf', class: "xpl-input-wrapper" }, this.pre && (h("label", { key: '108b33b4f0a87bacff90480633327dd221f6b1d4', class: "xpl-input-pre", htmlFor: this.inputId }, this.pre)), h("input", { key: '00633c5b69d25a94d7cd8501bde70459e8ebf2ce', type: "date", id: this.inputId, disabled: this.disabled, name: this.name, required: this.required, readonly: this.readonly, placeholder: this.placeholder, max: this.max, min: this.min, ref: (el) => {
|
|
16253
16279
|
this.input = el;
|
|
16254
16280
|
}, onChange: (event) => {
|
|
16255
16281
|
this.valueChanged(event);
|
|
16256
|
-
} }), h("xpl-icon", { key: '
|
|
16282
|
+
} }), h("xpl-icon", { key: 'ba0d694b7ace1359d6901c0110dce40a78805f74', class: "xpl-input-calendar", icon: "calendar-month", size: 24 }), this.post && (h("label", { key: '5ca7564e2096b697a75ebfb573654c0c23125245', class: "xpl-input-post", htmlFor: this.inputId }, this.post)))));
|
|
16257
16283
|
}
|
|
16258
16284
|
get el() { return getElement(this); }
|
|
16259
16285
|
static get watchers() { return {
|
|
@@ -16302,18 +16328,18 @@ const InputFile = class {
|
|
|
16302
16328
|
}
|
|
16303
16329
|
render() {
|
|
16304
16330
|
var _a, _b;
|
|
16305
|
-
return (h(Host, { key: '
|
|
16331
|
+
return (h(Host, { key: 'ec1645e7d48cf2b146727a6c131dbd7572468f17', class: {
|
|
16306
16332
|
'xpl-input-file': true,
|
|
16307
16333
|
'xpl-input-file--hide-trigger-on-select': this.hideTriggerOnSelect,
|
|
16308
16334
|
'xpl-input-file--disabled': this.disabled,
|
|
16309
|
-
} }, h("span", { key: '
|
|
16335
|
+
} }, h("span", { key: '8dc3e290dcddba706316ec41443e2e87aa82f79f', class: {
|
|
16310
16336
|
'xpl-input-file__trigger-wrapper': true,
|
|
16311
16337
|
'xpl-input-file__trigger-wrapper--hidden': this.hideTriggerOnSelect && ((_a = this.files) === null || _a === void 0 ? void 0 : _a.length) > 0,
|
|
16312
|
-
}, role: "button", tabIndex: 0, onClick: this.openFileDialog }, h("slot", { key: '
|
|
16338
|
+
}, role: "button", tabIndex: 0, onClick: this.openFileDialog }, h("slot", { key: '2d2391a2ccca22170bfa0b9ace50a42fdba54284', name: "trigger" })), ((_b = this.files) === null || _b === void 0 ? void 0 : _b.length) > 0 && !this.hideFileNames && (h("ul", { key: 'c302bbbb5c1977c513dba82db70da1615f39a217', class: "xpl-input-file__file-list" }, this.files.map((file, fileIndex) => (h("li", { class: "xpl-input-file__file-item" }, h("span", { class: "xpl-text-callout" }, file.name), h("xpl-icon", { icon: "x-circle", size: 24, onClick: (e) => {
|
|
16313
16339
|
e.preventDefault();
|
|
16314
16340
|
e.stopPropagation();
|
|
16315
16341
|
this.onRemoveFileByIndex(fileIndex);
|
|
16316
|
-
}, class: "xpl-input-file__remove-icon" })))))), this.accept && !this.hideAcceptText && (h("span", { key: '
|
|
16342
|
+
}, class: "xpl-input-file__remove-icon" })))))), this.accept && !this.hideAcceptText && (h("span", { key: '9252c5450f32e8d2ed478af9f84eef4a26cee49f', class: "xpl-input-file__accept xpl-text-caption" }, "Accepted file types: ", this.accept)), h("input", { key: 'd44213b6fd075bfb12c7857d3a56e06f78ef0fdc', onChange: this.handleFileChange, type: "file", ref: (el) => {
|
|
16317
16343
|
this.fileInput = el;
|
|
16318
16344
|
}, hidden: true, accept: this.accept, multiple: this.multiple, name: this.name })));
|
|
16319
16345
|
}
|
|
@@ -16801,21 +16827,21 @@ const InputPhone = class {
|
|
|
16801
16827
|
}
|
|
16802
16828
|
render() {
|
|
16803
16829
|
var _a;
|
|
16804
|
-
return (h(Host, { key: '
|
|
16830
|
+
return (h(Host, { key: '4a55afb3d85dc5882eca2cab0a23b11374cc053e', class: {
|
|
16805
16831
|
'xpl-input-phone': true,
|
|
16806
16832
|
'xpl-input-phone--error': !!this.hasErrorState,
|
|
16807
16833
|
'xpl-input-phone--open': this.dropdownOpen,
|
|
16808
16834
|
'xpl-input-phone--domestic': !this.isInternational,
|
|
16809
|
-
} }, h("div", { key: '
|
|
16835
|
+
} }, h("div", { key: 'c7e46df1b58b6e76dda47b3b32f5a6abe29f048c', class: "xpl-input-wrapper" }, this.isInternational && (h("button", { key: 'ef1bedb4bad96760c81ad4dbf2cadb5a29d4abb9', type: "button", id: this.triggerId, class: "xpl-input-phone__trigger", disabled: this.disabled, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpen ? 'true' : 'false', "aria-label": "Select country", onClick: this.handleTriggerClick }, ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.name) && (h("xpl-icon", { key: 'a307f620c2815d63b17dbeb6c270d2972884e9d9', class: "xpl-input-phone__flag", icon: getCountryIconName(this.selectedCountry.name), size: 24, "aria-hidden": "true" })), h("xpl-icon", { key: 'c16e66d315877cec35e322a1164f765cd387931f', class: "xpl-input-phone__trigger-icon", icon: "chevron-down", size: 20, "aria-hidden": "true" }))), h("div", { key: '7a33b994588e4c5ea868a4e092709b8acd50a36f', class: "xpl-input-phone__input-wrap" }, this.isInternational && (h("span", { key: '5a39cfd472f5287fc8cf0648ce618e21dabf5e97', class: "xpl-input-phone__dial-code" }, this.effectiveDialCode)), h("input", { key: 'dfb25910769594bc9b9d1c861049605d7bdd9d0e', ref: (el) => {
|
|
16810
16836
|
this.inputEl = el;
|
|
16811
|
-
}, type: "tel", id: this.inputId, class: "xpl-input-phone__input", name: this.name, disabled: this.disabled, readonly: this.readonly, required: this.required, "aria-invalid": this.hasErrorState ? 'true' : 'false', placeholder: this.effectivePlaceholder, autocomplete: this.isInternational ? 'tel-national' : 'tel', inputmode: "numeric", maxlength: this.maxInputLength, value: this.displayValue, onInput: this.handleNumberInput }), this.nationalNumber && this.isEditable && (h("button", { key: '
|
|
16837
|
+
}, type: "tel", id: this.inputId, class: "xpl-input-phone__input", name: this.name, disabled: this.disabled, readonly: this.readonly, required: this.required, "aria-invalid": this.hasErrorState ? 'true' : 'false', placeholder: this.effectivePlaceholder, autocomplete: this.isInternational ? 'tel-national' : 'tel', inputmode: "numeric", maxlength: this.maxInputLength, value: this.displayValue, onInput: this.handleNumberInput }), this.nationalNumber && this.isEditable && (h("button", { key: '8db932d94550aa6d947e2564d8a94a12bef43bce', type: "button", class: "xpl-input-phone__clear", "aria-label": "Clear phone number", onClick: this.handleClear }, h("xpl-icon", { key: '87e55c3a5ae6b8774d3ce64af843b7e63448fe25', icon: "x-circle", size: 16 }))))), this.isInternational && this.isEditable && (h("xpl-dropdown", { key: '467b0e2fde23a45b2c36138affa26467e0b6c9d0', ref: (el) => {
|
|
16812
16838
|
this.dropdownRef = el;
|
|
16813
16839
|
}, isOpen: this.dropdownOpen, triggerId: this.triggerId, anchorToTrigger: true, closeOnSelect: true, mode: "single", options: this.dropdownOptions, update: this.handleDropdownUpdate, onIsOpenChange: (e) => {
|
|
16814
16840
|
this.dropdownOpen = e.detail;
|
|
16815
|
-
}, "aria-label": "Country" }, h("div", { key: '
|
|
16841
|
+
}, "aria-label": "Country" }, h("div", { key: 'f4f3665ab8286faed45c3a3a510bd247c7a31842', slot: "header", class: "xpl-input-phone__search-wrap" }, h("xpl-input", { key: '659875e60e85bac085deb8f6648623eccc76d560', class: "xpl-input-phone__search", type: "text", label: "", placeholder: "Search", value: this.searchQuery, autocomplete: "off", onInputEvent: (e) => {
|
|
16816
16842
|
var _a;
|
|
16817
16843
|
this.searchQuery = (_a = e.detail) !== null && _a !== void 0 ? _a : '';
|
|
16818
|
-
} }, h("xpl-icon", { key: '
|
|
16844
|
+
} }, h("xpl-icon", { key: '987941768e8494d9c898fc93e531da03bd57ad71', slot: "pre", class: "xpl-input-phone__search-icon", icon: "magnifier", size: 20 })))))));
|
|
16819
16845
|
}
|
|
16820
16846
|
get el() { return getElement(this); }
|
|
16821
16847
|
static get watchers() { return {
|
|
@@ -16934,7 +16960,7 @@ const InputSearch = class {
|
|
|
16934
16960
|
return shell;
|
|
16935
16961
|
}
|
|
16936
16962
|
render() {
|
|
16937
|
-
return (h(Host, { key: '
|
|
16963
|
+
return (h(Host, { key: 'c8f0c2b1c96cc8c6d9a2c390e791977b031adb9b', class: {
|
|
16938
16964
|
'xpl-input-search': true,
|
|
16939
16965
|
'xpl-input-search--disabled': this.disabled,
|
|
16940
16966
|
'xpl-input-search--error': this.hasError,
|
|
@@ -17118,11 +17144,11 @@ const InputTime = class {
|
|
|
17118
17144
|
}));
|
|
17119
17145
|
}
|
|
17120
17146
|
render() {
|
|
17121
|
-
return (h(Host, { key: '
|
|
17147
|
+
return (h(Host, { key: 'a48ebfd7cd0578b33bd11059f9bebb342bf954f7', class: {
|
|
17122
17148
|
'xpl-input-time': true,
|
|
17123
17149
|
[`xpl-input-time--mode-${this.mode}`]: true,
|
|
17124
17150
|
'xpl-input-time--error': !!this.hasErrorState,
|
|
17125
|
-
} }, h("xpl-input", { key: '
|
|
17151
|
+
} }, h("xpl-input", { key: '68089e0bd5b0ed7d88917094eafe529637947380', pre: h("xpl-icon", { class: "xpl-input-time__clock-icon", icon: "clock", size: 24 }), post: this.timeFormat === '12h' ? this.amPm || 'AM' : null, type: "text", _id: this.inputId, disabled: this.disabled, name: this.name, required: this.required, readonly: this.readonly, placeholder: this.placeholder, max: this.max, min: this.min, onInput: this.handleInput, value: this.formattedValue, onFocusEvent: this.handleFocus, onBlurEvent: this.handleBlur, onClick: this.handleClick }), !this.readonly && !this.disabled && (h("xpl-dropdown", { key: '1bbe4a3a42c02ff985a26e7547c54f0bbdc92ce0', options: this.options, isOpen: this.showOptions, ref: (el) => {
|
|
17126
17152
|
this.dropdown = el;
|
|
17127
17153
|
}, class: "xpl-input-time__dropdown" }))));
|
|
17128
17154
|
}
|
|
@@ -17556,12 +17582,12 @@ const List = class {
|
|
|
17556
17582
|
var _a, _b, _c;
|
|
17557
17583
|
const ariaLabelledBy = ((_a = this.labelledBy) === null || _a === void 0 ? void 0 : _a.trim()) ? this.labelledBy.trim() : undefined;
|
|
17558
17584
|
const ariaLabel = !ariaLabelledBy && ((_b = this.label) === null || _b === void 0 ? void 0 : _b.trim()) ? this.label.trim() : undefined;
|
|
17559
|
-
return (h(Host, { key: '
|
|
17585
|
+
return (h(Host, { key: 'aaa6e1cfa2d87e61b239d9aa59c9e4647f05aade', role: "list", class: { 'xpl-list': true }, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }, (_c = this.items) === null || _c === void 0 ? void 0 :
|
|
17560
17586
|
_c.map((item, index) => {
|
|
17561
17587
|
var _a;
|
|
17562
17588
|
const legacyRowId = (_a = item.id) !== null && _a !== void 0 ? _a : `item-${index}`;
|
|
17563
17589
|
return (h("xpl-list-item", { key: `legacy-item-${legacyRowId}`, item: item, href: item.href, itemId: legacyRowId }));
|
|
17564
|
-
}), h("slot", { key: '
|
|
17590
|
+
}), h("slot", { key: '89eb57b654baf9efbfd021e8c8db1fe074daa6d1' }), this.reorderable ? (h("div", { class: "xpl-list__reorder-live", "aria-live": "assertive", "aria-atomic": "true" }, this.reorderLiveMessage)) : null));
|
|
17565
17591
|
}
|
|
17566
17592
|
get el() { return getElement(this); }
|
|
17567
17593
|
static get watchers() { return {
|
|
@@ -18084,7 +18110,7 @@ const Modal = class {
|
|
|
18084
18110
|
}
|
|
18085
18111
|
}
|
|
18086
18112
|
render() {
|
|
18087
|
-
return (h(Host, { key: '
|
|
18113
|
+
return (h(Host, { key: '310913d620acf72531ecb06aa6cd2180bb58d13b', class: "xpl-modal" }, this.isOpen && h("xpl-backdrop", { key: 'd95693fd09c2f0a8024f3cb69a021f0bd79f7916' }), h("dialog", { key: '5cffd3cfdcc6033baa1d9e3e5fdf56b8411a8975', class: `xpl-modal__dialog xpl-modal-size--${this.size} xpl-modal--${this.isOpen ? 'is-open' : 'is-closed'}` }, h("div", { key: '2d0be8e91065d464797d85cd1b98272292eacb09', class: "xpl-modal__header" }, h("div", { key: 'cb7d8594ed217599bcf0e2efa88d72afe0fff758', class: "xpl-modal__title" }, this.variant === 'warning' && (h("xpl-icon", { key: 'fb7dd69369accc0c98ef8762ca457b6368ca0036', size: 20, icon: "alert-triangle", class: "xpl-modal__alert-icon" })), h("slot", { key: '36a6d3d38d35064f81740504090fbbcdf2125097', name: "title" }), h("xpl-button", { key: 'db84ecf685afec8d0d783b433f8aa030acc436bb', type: "button", class: "xpl-modal__close-button", "icon-only": true, size: "sm", variant: "tertiary", onClick: this.handleDialogClose }, h("xpl-icon", { key: 'bf241c6636ace6e182bf259bd24754646dc7f151', icon: "x" }))), h("div", { key: '105fa1a5b9d927bda5ca5521bbb8211cb07ab8e8', class: "xpl-modal__subtitle" }, h("slot", { key: 'd25d6d8bb95cd51f075dd7f9b5e1e199dac3efb0', name: "subtitle" }))), h("div", { key: '3b194a36ad0f4446149027544c16a25ba27f2cec', class: "xpl-modal__body" }, h("slot", { key: '077e5b70115e3e906cd9ea7181c51615799c77e8', name: "body" })), h("div", { key: '687bd9ca45af20945ab5461ceb68ec099a30c50b', class: "xpl-modal__footer" }, h("slot", { key: '73d5884708efd296a701c37e02663668fcfd37d8', name: "tertiary" }), h("slot", { key: 'bad90d2355b8c015e19b1e450b5a2ce96e5ad55d', name: "secondary" }), h("slot", { key: 'c601b66edc9fb2c082ccc713d6df95f15bd604ef', name: "primary" })))));
|
|
18088
18114
|
}
|
|
18089
18115
|
get element() { return getElement(this); }
|
|
18090
18116
|
static get watchers() { return {
|
|
@@ -18160,11 +18186,11 @@ const NavHeaderMenu = class {
|
|
|
18160
18186
|
}
|
|
18161
18187
|
render() {
|
|
18162
18188
|
const hasProfile = !!this.username || !!this.email;
|
|
18163
|
-
return (h(Host, { key: '
|
|
18189
|
+
return (h(Host, { key: '451149dc9d73f705492fc65bf4f014b8efa4ee8a', class: {
|
|
18164
18190
|
'xpl-nav-header-menu': true,
|
|
18165
18191
|
'xpl-nav-header-menu--has-right-aside-mobile': this.rightAsideMobilePresent,
|
|
18166
18192
|
dark: true,
|
|
18167
|
-
} }, hasProfile && (h("div", { key: '
|
|
18193
|
+
} }, hasProfile && (h("div", { key: 'f42b560492c110644d52b10f708a3ed650833861', class: "xpl-nav-header-menu__profile" }, h("div", { key: '6d98f720af85cbf8164bea7500175d6bfbb9465b', class: "xpl-nav-header-menu__info" }, this.username && (h("div", { key: '9d52880dc41c11e71ac3cc107d8009eccb787bac', class: "xpl-nav-header-menu__username" }, this.username)), this.email && (h("div", { key: 'd1b71ac2c4f6aaf5efd7b1910b8848f97ab08bf0', class: "xpl-nav-header-menu__email" }, this.email))))), h("div", { key: 'e1b298c39ccbe0f68b8d60fa82714572f656ab1e', class: "xpl-nav-header-menu__right-aside-mobile" }, h("slot", { key: 'fbb8d26c38a4a50568e8836ac3af4409fe6c93c0', name: "right-aside-mobile" })), h("div", { key: 'cbe858338ec04cdd3b74285f95b0466432924be2', class: "xpl-nav-header-menu__slot", role: "list" }, h("slot", { key: 'b47ccc7f955a30d8b9d9b884fa3d920d45958f7c' }))));
|
|
18168
18194
|
}
|
|
18169
18195
|
get el() { return getElement(this); }
|
|
18170
18196
|
};
|
|
@@ -18181,11 +18207,11 @@ const NavItem = class {
|
|
|
18181
18207
|
}
|
|
18182
18208
|
}
|
|
18183
18209
|
render() {
|
|
18184
|
-
return (h(Host, { key: '
|
|
18210
|
+
return (h(Host, { key: 'b3a214a57ad57e9db1bbfd6a1809999ce0575a82', class: "xpl-nav-item", role: "listitem", onClick: () => {
|
|
18185
18211
|
if (this.navControl) {
|
|
18186
18212
|
this.onNavToggle();
|
|
18187
18213
|
}
|
|
18188
|
-
} }, h("slot", { key: '
|
|
18214
|
+
} }, h("slot", { key: '0f2a74dc4fd6f419a01106d872a5f6b5066a21a8', name: "link" }, h("slot", { key: '234b41ca18d65ec3423ff580d983d24b483641cf', name: "icon" }), h("slot", { key: 'cdb0ac59997cd1c557b05c6c8d8f60ae78d28a4d' }))));
|
|
18189
18215
|
}
|
|
18190
18216
|
};
|
|
18191
18217
|
|
|
@@ -18252,19 +18278,23 @@ const Pagination = class {
|
|
|
18252
18278
|
render() {
|
|
18253
18279
|
const disablePrev = this.currentPage <= 1;
|
|
18254
18280
|
const disableNext = this.currentPage >= this.totalPages;
|
|
18255
|
-
return (h(Host, { key: '
|
|
18281
|
+
return (h(Host, { key: 'fad9cdff4010b4b5ac842633bf7daf09b4dbd5d4', class: {
|
|
18282
|
+
'xpl-pagination': true,
|
|
18283
|
+
'xpl-pagination__with-page-control': this.withPageControl,
|
|
18284
|
+
'xpl-pagination__no-page-control': !this.withPageControl,
|
|
18285
|
+
} }, this.withPageControl && (h("div", { key: 'eb125851b89aa1422ec3e5d5e336fcbecd07489e', class: "xpl-pagination__rows-per-page" }, h("label", { key: '5f2aa4c45d183827317a74cf4700981b6b0e7f2b', class: "xpl-pagination__rows-label" }, "Rows per page:"), h("xpl-select", { key: '7ba2987a24b3228d9b59320f29b22b5819f85546', class: "xpl-pagination__rows-per-page-select", dropdownFlipFallbackPlacements: ['bottom-start'], dropdownPlacement: "top-start", choices: this.rowsPerPageOptionsArray.map((option) => ({
|
|
18256
18286
|
label: option.toString(),
|
|
18257
18287
|
value: option.toString(),
|
|
18258
18288
|
isSelected: option === this.selectedRowsPerPage,
|
|
18259
18289
|
})), ref: (el) => {
|
|
18260
18290
|
this.rowsPerPageSelectRef = el;
|
|
18261
|
-
} }))), h("div", { key: '
|
|
18291
|
+
} }))), h("div", { key: '8bab9db1cecfdaeeb760b0e4e1afb393ff3a3fe7', class: "xpl-pagination__pager" }, h("button", { key: '19efd8a9aee2b05f875d2db34c7cdd174c845f60', class: "xpl-pagination__pager-button xpl-pagination__pager-button-prev", disabled: disablePrev, onClick: this.handlePrevPage, "aria-label": "Previous Page", tabindex: "0" }, h("xpl-icon", { key: 'a77a15c649a6f2c86b100d1687b4a099acc18602', icon: "arrow-left", size: 20 })), h("xpl-select", { key: '5778cad67d3a4b930b1f89b0e49c30e941e23259', class: "xpl-pagination__page-select", dropdownFlipFallbackPlacements: ['bottom-start'], dropdownPlacement: "top-start", choices: Array.from({ length: this.totalPages }, (_, index) => ({
|
|
18262
18292
|
label: `Page ${index + 1}`,
|
|
18263
18293
|
value: (index + 1).toString(),
|
|
18264
18294
|
isSelected: index + 1 === this.currentPage,
|
|
18265
18295
|
})), "custom-display-value": true, ref: (el) => {
|
|
18266
18296
|
this.pageSelectRef = el;
|
|
18267
|
-
} }, h("div", { key: '
|
|
18297
|
+
} }, h("div", { key: 'd0ae655a0100c2e81c8f7bdc2c8d3072f00cc7c9', slot: "custom-display-value" }, `${this.currentPage} of ${this.totalPages}`)), h("button", { key: 'ca6c7eb4fd277344f340b83673f1e43cb0c9fe99', class: "xpl-pagination__pager-button xpl-pagination__pager-button-next", disabled: disableNext, onClick: this.handleNextPage, "aria-label": "Next Page", tabindex: "0" }, h("xpl-icon", { key: 'd18efdcb7e67ab908fbf79fc475993cf656b150c', icon: "arrow-right", size: 20 })))));
|
|
18268
18298
|
}
|
|
18269
18299
|
static get watchers() { return {
|
|
18270
18300
|
"currentPage": [{
|
|
@@ -18284,11 +18314,11 @@ const XplPanel = class {
|
|
|
18284
18314
|
}
|
|
18285
18315
|
render() {
|
|
18286
18316
|
const hasAccent = this.accent !== 'none';
|
|
18287
|
-
return (h(Host, { key: '
|
|
18317
|
+
return (h(Host, { key: 'e9a747ba679f6f9f907d13217f329947bff93e31', class: {
|
|
18288
18318
|
'xpl-panel': true,
|
|
18289
18319
|
[`xpl-panel--accent-${this.accent}`]: hasAccent,
|
|
18290
18320
|
[`xpl-panel--padding-${this.padding}`]: true,
|
|
18291
|
-
} }, hasAccent && h("div", { key: '
|
|
18321
|
+
} }, hasAccent && h("div", { key: 'b777fd4a81574ff9276582b256b673cccfc63a34', "aria-hidden": "true", class: "xpl-panel__accent" }), h("div", { key: '5fa5ba4c2bfa13d7dcaee603e96ec9b77d103b13', class: "xpl-panel__content" }, h("slot", { key: 'c99b797e076c2641ae205181479dabb38f9ea009' }))));
|
|
18292
18322
|
}
|
|
18293
18323
|
};
|
|
18294
18324
|
|
|
@@ -18951,16 +18981,16 @@ const Popover = class {
|
|
|
18951
18981
|
});
|
|
18952
18982
|
}
|
|
18953
18983
|
render() {
|
|
18954
|
-
return (h(Host, { key: '
|
|
18984
|
+
return (h(Host, { key: '6fe479a39ee565772785c7b540c4e0915c5403e4' }, h("div", { key: '350452ca097bab13e7f06b3d1aa5e2774d80104b', class: {
|
|
18955
18985
|
'xpl-popover': true,
|
|
18956
18986
|
[`xpl-popover--${this.actualPosition}`]: true,
|
|
18957
18987
|
'xpl-popover--is-open': this.isOpenState,
|
|
18958
|
-
} }, h("span", { key: '
|
|
18988
|
+
} }, h("span", { key: '0a9365be21ef70855bd7d304a77fc80d19ba16d3', role: "button", tabindex: "0", "aria-haspopup": "dialog", "aria-expanded": this.isOpenState ? 'true' : 'false', onClick: this.togglePopover, ref: (el) => {
|
|
18959
18989
|
this.triggerRef = el;
|
|
18960
|
-
} }, h("slot", { key: '
|
|
18990
|
+
} }, h("slot", { key: 'df227b5bb7683599b4f82ef2a8c9d840b4920a61', name: "trigger" })), this.display === 'arrow' && (h("div", { key: 'dbf0b6998b3aa6ae40089e13bef86878037bbe24', class: "xpl-popover__arrow" }, h("svg", { key: '2bf57b69abc556ba9a86b59f6347a2c8d81a67c3', width: "17", height: "14", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '36fef83ea3e2d3d4b388f5bdfe74d0bdc034be9d', d: "M0 5h15l-7.5 7.5L0 5Z", fill: "white", stroke: "none", class: "arrow-fill" }), h("path", { key: '1187a6ec22457ab6086753cf199398705541b1b4', d: "M0 5 L7.5 12.5 L15 5", fill: "none", stroke: "black", "stroke-width": "1", class: "arrow-stroke" })))), h("div", { key: '7c6f063094de1462629a0db380597374c4231855', class: {
|
|
18961
18991
|
'xpl-popover__content': true,
|
|
18962
18992
|
[`xpl-popover__content--display-${this.display}`]: true,
|
|
18963
|
-
}, ref: (el) => (this.contentRef = el) }, h("slot", { key: '
|
|
18993
|
+
}, ref: (el) => (this.contentRef = el) }, h("slot", { key: '41062b776eed58b98452bb5a8d3b7099ac1138d2' })))));
|
|
18964
18994
|
}
|
|
18965
18995
|
get el() { return getElement(this); }
|
|
18966
18996
|
static get watchers() { return {
|
|
@@ -19000,12 +19030,12 @@ const ProgressBar = class {
|
|
|
19000
19030
|
return this.variant === 'indeterminate';
|
|
19001
19031
|
}
|
|
19002
19032
|
render() {
|
|
19003
|
-
return (h(Host, { key: '
|
|
19033
|
+
return (h(Host, { key: 'e5cc7a2231ed74242241723c9f0a57444a8000bb', class: {
|
|
19004
19034
|
'xpl-progress-bar': true,
|
|
19005
19035
|
[`xpl-progress-bar--${this.size}`]: true,
|
|
19006
19036
|
[`xpl-progress-bar--${this.variant}`]: true,
|
|
19007
19037
|
'xpl-progress-bar--complete': this.isComplete,
|
|
19008
|
-
} }, h("div", { key: '
|
|
19038
|
+
} }, h("div", { key: '3212fdea66e2cd3edffc36f99c9edc197f15bcee', class: "xpl-progress-bar__wrapper" }, (this.label || this.showStatusIcon) && (h("div", { key: '004c0b9203df13c6818fdbb8c928a47d86e7388e', class: "xpl-progress-bar__header" }, this.label && h("div", { key: 'ce735edff19cc004f979a582618c968260cd23c3', class: "xpl-progress-bar__label" }, this.label), this.showStatusIcon && (h("div", { key: '3a9f143b79152aa3208593c9249a62d819c2967a', class: "xpl-progress-bar__icon" }, this.isError ? (h("xpl-icon", { icon: "circle-xmark-1" })) : (h("xpl-icon", { icon: "circle-check-1" })))))), h("div", { key: '517787d0ff39c082a3d4763b78b16a9ce9235b4b', class: "xpl-progress-bar__row" }, this.isIndeterminate ? (h("div", { class: "xpl-progress-bar__track xpl-progress-bar__track--indeterminate", role: "progressbar", "aria-label": this.label || 'Progress' }, h("div", { class: "xpl-progress-bar__indeterminate" }))) : (h("progress", { class: "xpl-progress-bar__progress", value: this.clampedValue, max: this.max, "aria-label": this.label || 'Progress' }))), this.helperText && (h("div", { key: '488c5092b96a1e9a5a08f9b090f94fe66f6f1490', class: "xpl-progress-bar__helper" }, this.helperText)))));
|
|
19009
19039
|
}
|
|
19010
19040
|
};
|
|
19011
19041
|
|
|
@@ -19066,7 +19096,7 @@ const ProgressIndicator = class {
|
|
|
19066
19096
|
? `Progress: all ${totalSteps} ${totalSteps === 1 ? 'step' : 'steps'} complete`
|
|
19067
19097
|
: `Progress: step ${currentStepNumber} of ${totalSteps}`
|
|
19068
19098
|
: 'Progress';
|
|
19069
|
-
return (h(Host, { key: '
|
|
19099
|
+
return (h(Host, { key: '3a6f253693fd47f982541099a1729ca36d0ce64a', class: hostClasses, role: "group", "aria-label": ariaLabel }, h("div", { key: 'c25b47994c43135ed3147ca579bdc3d8124d7c8a', class: "xpl-progress-indicator-container", role: "list" }, steps.map((step, index) => this.renderStep(step, index)))));
|
|
19070
19100
|
}
|
|
19071
19101
|
static get watchers() { return {
|
|
19072
19102
|
"steps": [{
|
|
@@ -19094,14 +19124,14 @@ const Radio = class {
|
|
|
19094
19124
|
};
|
|
19095
19125
|
}
|
|
19096
19126
|
render() {
|
|
19097
|
-
return (h(Host, { key: '
|
|
19127
|
+
return (h(Host, { key: '959940093b1988f6e362c17e463fe2139cd828c5', class: {
|
|
19098
19128
|
'xpl-checkbox-radio-container': true,
|
|
19099
19129
|
styled: this.styled,
|
|
19100
19130
|
disabled: this.disabled,
|
|
19101
|
-
} }, h("input", { key: '
|
|
19131
|
+
} }, h("input", { key: 'cccccd581ee84a2c5c39a625565877cc080e9702', class: "xpl-radio", type: "radio", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name, required: this.required, onChange: this.onChange, value: this.value }), h("label", { key: '3dd39b409818d7f2921c6dc7dc2c3d790a088833', class: {
|
|
19102
19132
|
'xpl-label': true,
|
|
19103
19133
|
'xpl-label--disabled': this.disabled,
|
|
19104
|
-
}, htmlFor: this.id }, h("slot", { key: '
|
|
19134
|
+
}, htmlFor: this.id }, h("slot", { key: '0e0af25e2b1679bef0aa053d20df8f0ec7390d18' }), this.description && (h("small", { key: 'dcc8791c823ec66dcdb806ae4aeaf7daf6c72298', class: {
|
|
19105
19135
|
'xpl-description': true,
|
|
19106
19136
|
'xpl-description--disabled': this.disabled,
|
|
19107
19137
|
} }, this.description)))));
|
|
@@ -19113,7 +19143,7 @@ const SecondaryNav = class {
|
|
|
19113
19143
|
registerInstance(this, hostRef);
|
|
19114
19144
|
}
|
|
19115
19145
|
render() {
|
|
19116
|
-
return (h(Host, { key: '
|
|
19146
|
+
return (h(Host, { key: 'f4fdd93b13c1dc779c84e8b00b12caeff58df960', class: "xpl-secondary-nav" }, h("nav", { key: '4092d23357761026ad5fddfbc32a221d957cce1e', "aria-label": "Secondary Nav" }, h("slot", { key: 'c3ae9f1821a6d22babece27971cc1faf15037cdb' }))));
|
|
19117
19147
|
}
|
|
19118
19148
|
};
|
|
19119
19149
|
|
|
@@ -19137,6 +19167,7 @@ const Select = class {
|
|
|
19137
19167
|
this.triggerDropdown = createEvent(this, "triggerDropdown", 7);
|
|
19138
19168
|
this.choices = [];
|
|
19139
19169
|
this.selectIcon = 'chevron-down';
|
|
19170
|
+
this.dropdownPlacement = 'bottom-start';
|
|
19140
19171
|
this.mode = 'single';
|
|
19141
19172
|
this.truncate = true;
|
|
19142
19173
|
this.active = false;
|
|
@@ -19343,21 +19374,21 @@ const Select = class {
|
|
|
19343
19374
|
this.truncate &&
|
|
19344
19375
|
!this.customDisplayValue;
|
|
19345
19376
|
const truncatedText = `+ ${Math.abs(this.choicesState.filter((a) => a.isSelected).length - this.visibleChoices)} more`;
|
|
19346
|
-
return (h(Host, { key: '
|
|
19377
|
+
return (h(Host, { key: '09d3587fa268cb0621ea293d246e23cde93d75df', class: {
|
|
19347
19378
|
'xpl-select': true,
|
|
19348
19379
|
'xpl-select--disabled': this.disabled,
|
|
19349
19380
|
'xpl-select--no-truncate': !this.truncate,
|
|
19350
19381
|
[(_c = this.classNames) !== null && _c !== void 0 ? _c : '']: !!this.classNames,
|
|
19351
19382
|
}, onKeyDown: this.handleTabKeyDown, ref: (el) => {
|
|
19352
19383
|
this.container = el;
|
|
19353
|
-
} }, this.renderLabel(), h("div", { key: '
|
|
19384
|
+
} }, this.renderLabel(), h("div", { key: '007a61cc60c948d0691d6983cb197652084e417d', class: {
|
|
19354
19385
|
'xpl-input': true,
|
|
19355
19386
|
'xpl-input--disabled': this.disabled,
|
|
19356
19387
|
'xpl-input--error': ((_d = this.error) === null || _d === void 0 ? void 0 : _d.length) >= 0,
|
|
19357
|
-
} }, h("div", { key: '
|
|
19388
|
+
} }, h("div", { key: 'e1edfe6e4b205bd6332f07031ee51ef7f9f6ac91', class: "xpl-input-wrapper" }, h("button", { key: '53d079f28b8a1bcdd5498287dfd88bb7a3ba7b50', class: "xpl-select__trigger", disabled: this.disabled, id: this.id, onKeyDown: this.handleTabKeyDown, onClick: (e) => {
|
|
19358
19389
|
e.preventDefault();
|
|
19359
19390
|
this.handleDropdownTrigger();
|
|
19360
|
-
}, type: "button" }, h("div", { key: '
|
|
19391
|
+
}, type: "button" }, h("div", { key: '5cfec98b2e829ea48e96b373e09e740d5bf02ef6', class: {
|
|
19361
19392
|
'xpl-select-value': true,
|
|
19362
19393
|
'xpl-select-value--active': this.mode === 'multi' && this.value.length > 0,
|
|
19363
19394
|
'has-value': this.value.length > 0,
|
|
@@ -19377,7 +19408,7 @@ const Select = class {
|
|
|
19377
19408
|
return this.renderSelectedTags();
|
|
19378
19409
|
}
|
|
19379
19410
|
return this.placeholder;
|
|
19380
|
-
})(), isTextTruncated && truncatedText), h("xpl-icon", { key: '
|
|
19411
|
+
})(), isTextTruncated && truncatedText), h("xpl-icon", { key: '8bb01d1e8b206fb3c1963cdebcd293eeb2277e05', class: "xpl-select__chevron-down", icon: this.selectIcon }))), !this.disabled && (h("xpl-dropdown", { key: 'f5e770c4b26449f3025d172d768d6df69bd0ae03', ref: (el) => {
|
|
19381
19412
|
this.dropdown = el;
|
|
19382
19413
|
}, isOpen: this.dropdownOpenState, options: this.choicesState, selectedValues: this.selectedValues, mode: this.mode, triggerId: this.id, update: (_e, { component }) => {
|
|
19383
19414
|
const { options } = component;
|
|
@@ -19386,7 +19417,7 @@ const Select = class {
|
|
|
19386
19417
|
}
|
|
19387
19418
|
}, onIsOpenChange: (e) => {
|
|
19388
19419
|
this.dropdownOpenState = e.detail;
|
|
19389
|
-
}, onWheel: this.handleDropdownScroll, anchorToTrigger: true })), this.renderError()), h("input", { key: '
|
|
19420
|
+
}, onWheel: this.handleDropdownScroll, anchorToTrigger: true, flipFallbackPlacements: this.dropdownFlipFallbackPlacements, placement: this.dropdownPlacement })), this.renderError()), h("input", { key: 'fe84c16780622e730100a58a948fc4fe27f6ddb5', type: "hidden", name: this.name, value: this.value })));
|
|
19390
19421
|
}
|
|
19391
19422
|
static get watchers() { return {
|
|
19392
19423
|
"choices": [{
|
|
@@ -19412,9 +19443,9 @@ const SideNav = class {
|
|
|
19412
19443
|
registerInstance(this, hostRef);
|
|
19413
19444
|
}
|
|
19414
19445
|
render() {
|
|
19415
|
-
return (h(Host, { key: '
|
|
19446
|
+
return (h(Host, { key: 'd01e8e27671eabc92613a803818b4351334011ac', class: {
|
|
19416
19447
|
'xpl-side-nav': true,
|
|
19417
|
-
} }, h("div", { key: '
|
|
19448
|
+
} }, h("div", { key: '92c9f31fa0d9d564164cde99d17e30562c30abb7', class: "xpl-side-nav__wrapper" }, h("nav", { key: '5ddd8b18d4f74bb752b747ec4e1c48780a0738de', class: "xpl-side-nav__content", "aria-label": this.label }, h("div", { key: '8b830945bf6ec1da8ab2e2c955c10a1077652590', class: "xpl-side-nav__section" }, h("slot", { key: '66e5cd33c23bdc8963d661e0741d34f80a0640fb', name: "section" })), h("div", { key: 'f0da4e3c25822453efcbfb3c6f8ea7ec328e717d', class: "xpl-side-nav__footer" }, h("slot", { key: '76b829e978361be9fd62bd412489ea4559852c3f', name: "nav-footer" }))))));
|
|
19418
19449
|
}
|
|
19419
19450
|
};
|
|
19420
19451
|
|
|
@@ -19467,10 +19498,10 @@ const SideNavItem = class {
|
|
|
19467
19498
|
expanded: this.expanded,
|
|
19468
19499
|
selected: this.selected,
|
|
19469
19500
|
};
|
|
19470
|
-
return (h(Host, { key: '
|
|
19501
|
+
return (h(Host, { key: 'a621f4f9c04d79de708a34a4f4eab06e523a299a', class: {
|
|
19471
19502
|
'xpl-side-nav-item': true,
|
|
19472
19503
|
'xpl-side-nav-item--link-disabled': this.link && this.disabled,
|
|
19473
|
-
} }, this.link ? (h("slot", null)) : (h("button", { type: "button", class: linkClass, "aria-current": this.selected ? 'page' : undefined, "aria-expanded": this.hasChildren ? (this.expanded ? 'true' : 'false') : undefined, onClick: this.handleClick, disabled: this.disabled }, this.hasChildren && (h("span", { class: `xpl-side-nav-item__arrow ${this.expanded ? 'expanded' : ''}` }, h("xpl-icon", { icon: "chevron-down", size: 16 }))), !this.hasChildren && (h("span", { class: "xpl-side-nav-item__icon" }, h("slot", { name: "icon" }, this.icon ? (h("xpl-icon", { icon: this.icon, size: 16 })) : null))), h("span", { class: "xpl-side-nav-item__label" }, (_a = this.label) !== null && _a !== void 0 ? _a : ''))), this.hasChildren && !this.link && (h("div", { key: '
|
|
19504
|
+
} }, this.link ? (h("slot", null)) : (h("button", { type: "button", class: linkClass, "aria-current": this.selected ? 'page' : undefined, "aria-expanded": this.hasChildren ? (this.expanded ? 'true' : 'false') : undefined, onClick: this.handleClick, disabled: this.disabled }, this.hasChildren && (h("span", { class: `xpl-side-nav-item__arrow ${this.expanded ? 'expanded' : ''}` }, h("xpl-icon", { icon: "chevron-down", size: 16 }))), !this.hasChildren && (h("span", { class: "xpl-side-nav-item__icon" }, h("slot", { name: "icon" }, this.icon ? (h("xpl-icon", { icon: this.icon, size: 16 })) : null))), h("span", { class: "xpl-side-nav-item__label" }, (_a = this.label) !== null && _a !== void 0 ? _a : ''))), this.hasChildren && !this.link && (h("div", { key: '3e22894c0bd9427f568b86bba00cdab822921997', class: `xpl-side-nav-item__children ${this.expanded ? 'expanded' : ''}`, inert: !this.expanded ? true : undefined }, h("div", { key: '41486a4241e4402232531d140e972b39d863ffd9', class: "xpl-side-nav-item__children-inner" }, h("slot", { key: 'd334c6ecac7dd1dd12602a461db444cd1ccefc86' }))))));
|
|
19474
19505
|
}
|
|
19475
19506
|
get el() { return getElement(this); }
|
|
19476
19507
|
static get watchers() { return {
|
|
@@ -19490,7 +19521,7 @@ const Skeleton = class {
|
|
|
19490
19521
|
this.size = 'custom';
|
|
19491
19522
|
}
|
|
19492
19523
|
render() {
|
|
19493
|
-
return (h(Host, { key: '
|
|
19524
|
+
return (h(Host, { key: '0ac86ae7bf109ea51bca36ac502d506ac7d0b66e', class: {
|
|
19494
19525
|
'xpl-skeleton': true,
|
|
19495
19526
|
[`xpl-skeleton--shape-${this.shape}`]: true,
|
|
19496
19527
|
[`xpl-skeleton--size-${this.size}`]: true,
|
|
@@ -19533,7 +19564,7 @@ const Slideout = class {
|
|
|
19533
19564
|
this.handleScroll();
|
|
19534
19565
|
}
|
|
19535
19566
|
render() {
|
|
19536
|
-
return (h(Host, { key: '
|
|
19567
|
+
return (h(Host, { key: '8a3f7af854b35469bf4a383cc4cb1fcfcaa15748', class: "xpl-slideout" }, this.backdrop && this.isOpen && (h("xpl-backdrop", { key: '7033d78efa9ac2642a99d2b2dca278a3e9a44368', onClick: this.handleClose })), h("aside", { key: '2999e4119a0dbaac5125c7a1ef5f03761f445a0e', class: `slideout slideout--${!this.isOpen && 'closed'}` }, h("header", { key: '5e6bcf1284c2b2a4fbc05dd8e5100a33fa7597b4', class: "header" }, h("div", { key: '88172efe113b56a533761b975605a44ef52c5174', class: "title" }, h("slot", { key: 'c8f13168f62f96374250b11814ace756fa680503', name: "title" }), h("xpl-button", { key: '8e0e29a8ad2a5f45b250f9d563886fe7ad2a7cb8', class: "close-button", "icon-only": true, size: "sm", variant: "tertiary", onClick: this.handleClose }, h("xpl-icon", { key: '110cbd50e31b51319745d6fed61188c1c885b8b3', icon: "x" }))), h("div", { key: '96e6cddf4b078736201116f220f27ddf34b90b44', class: "subtitle" }, h("slot", { key: 'eb02b4fce6ff5e658ec51c83819a5257f452d3a1', name: "subtitle" })), h("div", { key: 'ac8dfe1f99428cdf728027aa5a04d58d497f34f0', class: "search" }, h("slot", { key: '28deb70ef99f4880fba55beb2d2b4b1d3136a240', name: "search" }))), h("xpl-divider", { key: '928d20ef8e74eed4e06351c5dab0c0af9934d2b8', tier: 0, class: "divider top" }), h("article", { key: 'd6460cb29abb33f6676d2e4f517c1f2befa57148', class: "content", tabIndex: 0 }, h("slot", { key: 'b415af9cadedc61407623773fd6b2b1130caf5df', name: "content" })), this.showFooter && (h("footer", { key: 'db6a58277112f134dc150266446cc67c79bc6bc5' }, h("xpl-divider", { key: '129a61ba1a8a588e94d710b7e7fb1059c4b7f5e6', tier: 0, class: "divider bottom" }), h("div", { key: '6c81348acf8ee2bb4c12c2f3207daae564e78aa2', class: "footer" }, h("slot", { key: '8c9a6d4c215154bb2e66d62aa462b3b085ef0f5b', name: "tertiary" }), h("slot", { key: 'e66e45e2d090f45305f818c6496541b737c96aeb', name: "secondary" }), h("slot", { key: '8892bdf075a38237a5c858bfd951e1203fc3c892', name: "primary" })))))));
|
|
19537
19568
|
}
|
|
19538
19569
|
get el() { return getElement(this); }
|
|
19539
19570
|
static get watchers() { return {
|
|
@@ -20361,62 +20392,14 @@ const TabPanel = class {
|
|
|
20361
20392
|
const t = (_a = this.target) !== null && _a !== void 0 ? _a : '';
|
|
20362
20393
|
const panelId = tabPanelDomId(groupId, t);
|
|
20363
20394
|
const labelledBy = tabTriggerId(groupId, t);
|
|
20364
|
-
return (h(Host, { key: '
|
|
20395
|
+
return (h(Host, { key: '4c4a86dda347872ea6b1c4569f8424bd6cac7bd9', "aria-labelledby": labelledBy, class: {
|
|
20365
20396
|
'xpl-tab-panel': true,
|
|
20366
20397
|
'xpl-tab-panel--selected': this.selected,
|
|
20367
|
-
}, id: panelId, role: "tabpanel" }, h("slot", { key: '
|
|
20398
|
+
}, id: panelId, role: "tabpanel" }, h("slot", { key: '30c9ae6f3748dc02a73da7535443266b1043d61b' })));
|
|
20368
20399
|
}
|
|
20369
20400
|
get el() { return getElement(this); }
|
|
20370
20401
|
};
|
|
20371
20402
|
|
|
20372
|
-
const XPL_TABLE_COLUMN_WIDTHS_CHANGE_EVENT = 'xplTableColumnWidthsChange';
|
|
20373
|
-
const TABLE_HEADER_CELL_MIN_WIDTH_PX = 48;
|
|
20374
|
-
const getGridColumnWidthFromHeaderCell = (cell) => {
|
|
20375
|
-
var _a, _b;
|
|
20376
|
-
if (cell.tagName.toLowerCase() !== 'xpl-table-header-cell') {
|
|
20377
|
-
return 'auto';
|
|
20378
|
-
}
|
|
20379
|
-
const host = cell;
|
|
20380
|
-
const fromProp = typeof host.columnWidth === 'string' ? host.columnWidth.trim() : '';
|
|
20381
|
-
const fromAttr = (_b = (_a = cell.getAttribute('column-width')) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
|
|
20382
|
-
const columnTrack = fromProp || fromAttr;
|
|
20383
|
-
if (columnTrack.length > 0) {
|
|
20384
|
-
return columnTrack;
|
|
20385
|
-
}
|
|
20386
|
-
const w = host.width;
|
|
20387
|
-
if (typeof w === 'number' && Number.isFinite(w) && w > 0) {
|
|
20388
|
-
return `${Math.max(TABLE_HEADER_CELL_MIN_WIDTH_PX, w)}px`;
|
|
20389
|
-
}
|
|
20390
|
-
const raw = cell.getAttribute('width');
|
|
20391
|
-
if (raw === null || raw === '') {
|
|
20392
|
-
return 'auto';
|
|
20393
|
-
}
|
|
20394
|
-
if (/^\s*\d+(\.\d+)?\s*$/.test(raw)) {
|
|
20395
|
-
const n = Number.parseFloat(raw);
|
|
20396
|
-
if (Number.isFinite(n) && n > 0) {
|
|
20397
|
-
return `${Math.max(TABLE_HEADER_CELL_MIN_WIDTH_PX, n)}px`;
|
|
20398
|
-
}
|
|
20399
|
-
return 'auto';
|
|
20400
|
-
}
|
|
20401
|
-
return raw.trim();
|
|
20402
|
-
};
|
|
20403
|
-
const SELECTION_MARK = 'data-xpl-selection-managed';
|
|
20404
|
-
const ROW_REORDER_MARK = 'data-xpl-row-reorder-managed';
|
|
20405
|
-
const getSortAffordanceIconName = (sortDirection) => {
|
|
20406
|
-
if (sortDirection === 'asc')
|
|
20407
|
-
return 'arrow-up';
|
|
20408
|
-
return 'arrow-down';
|
|
20409
|
-
};
|
|
20410
|
-
const cycleSortDirection = (current) => {
|
|
20411
|
-
switch (current) {
|
|
20412
|
-
case 'asc':
|
|
20413
|
-
return 'desc';
|
|
20414
|
-
case 'desc':
|
|
20415
|
-
return null;
|
|
20416
|
-
default:
|
|
20417
|
-
return 'asc';
|
|
20418
|
-
}
|
|
20419
|
-
};
|
|
20420
20403
|
const getIconType = (sortType) => {
|
|
20421
20404
|
switch (sortType) {
|
|
20422
20405
|
case 'asc':
|
|
@@ -20427,104 +20410,18 @@ const getIconType = (sortType) => {
|
|
|
20427
20410
|
return 'dash';
|
|
20428
20411
|
}
|
|
20429
20412
|
};
|
|
20430
|
-
|
|
20431
|
-
function getNearestTableBodyRowFromNode(node) {
|
|
20432
|
-
const el = node instanceof HTMLElement ? node : null;
|
|
20433
|
-
if (!el) {
|
|
20434
|
-
return null;
|
|
20435
|
-
}
|
|
20436
|
-
const row = el.closest('xpl-table-row');
|
|
20437
|
-
return row != null ? row : null;
|
|
20438
|
-
}
|
|
20439
|
-
function getNextVisibleTableBodyRowAfter(element) {
|
|
20440
|
-
const parent = element.parentElement;
|
|
20441
|
-
if (!parent)
|
|
20442
|
-
return null;
|
|
20443
|
-
const siblings = Array.from(parent.children);
|
|
20444
|
-
const idx = siblings.indexOf(element);
|
|
20445
|
-
if (idx === -1)
|
|
20446
|
-
return null;
|
|
20447
|
-
for (let i = idx + 1; i < siblings.length; i += 1) {
|
|
20448
|
-
const n = siblings[i];
|
|
20449
|
-
if (n.tagName.toLowerCase() === 'xpl-table-row' && !n.hasAttribute('hidden')) {
|
|
20450
|
-
return n;
|
|
20451
|
-
}
|
|
20452
|
-
}
|
|
20453
|
-
return null;
|
|
20454
|
-
}
|
|
20455
|
-
function moveRowInTableBody(body, draggedRow, dropTargetRow) {
|
|
20456
|
-
if (draggedRow === dropTargetRow || draggedRow.parentElement !== body) {
|
|
20457
|
-
return;
|
|
20458
|
-
}
|
|
20459
|
-
if (dropTargetRow.parentElement !== body) {
|
|
20460
|
-
return;
|
|
20461
|
-
}
|
|
20462
|
-
const visible = Array.from(body.children).filter((c) => c.tagName.toLowerCase() === 'xpl-table-row' && !c.hasAttribute('hidden'));
|
|
20463
|
-
const fromIndex = visible.indexOf(draggedRow);
|
|
20464
|
-
const toIndex = visible.indexOf(dropTargetRow);
|
|
20465
|
-
if (fromIndex === -1 || toIndex === -1 || fromIndex === toIndex) {
|
|
20466
|
-
return;
|
|
20467
|
-
}
|
|
20468
|
-
if (fromIndex < toIndex) {
|
|
20469
|
-
const nextVisible = getNextVisibleTableBodyRowAfter(dropTargetRow);
|
|
20470
|
-
if (nextVisible) {
|
|
20471
|
-
body.insertBefore(draggedRow, nextVisible);
|
|
20472
|
-
}
|
|
20473
|
-
else {
|
|
20474
|
-
body.insertBefore(draggedRow, null);
|
|
20475
|
-
}
|
|
20476
|
-
}
|
|
20477
|
-
else {
|
|
20478
|
-
body.insertBefore(draggedRow, dropTargetRow);
|
|
20479
|
-
}
|
|
20480
|
-
}
|
|
20481
|
-
|
|
20482
|
-
function bodyRowFromDragTarget(target) {
|
|
20483
|
-
return getNearestTableBodyRowFromNode(target);
|
|
20484
|
-
}
|
|
20485
|
-
function tableBodyRowFromEvent(ev) {
|
|
20486
|
-
const path = typeof ev.composedPath === 'function' ? ev.composedPath() : [];
|
|
20487
|
-
const row = path.find((n) => n instanceof HTMLElement && n.tagName.toLowerCase() === 'xpl-table-row');
|
|
20488
|
-
return row !== null && row !== void 0 ? row : bodyRowFromDragTarget(ev.target);
|
|
20489
|
-
}
|
|
20490
|
-
function reorderDragHandleFromEvent(ev) {
|
|
20491
|
-
const path = typeof ev.composedPath === 'function' ? ev.composedPath() : [];
|
|
20492
|
-
const handle = path.find((n) => n instanceof HTMLElement && n.classList.contains('xpl-table__row-drag-handle'));
|
|
20493
|
-
return handle !== null && handle !== void 0 ? handle : null;
|
|
20494
|
-
}
|
|
20495
20413
|
const Table = class {
|
|
20496
20414
|
constructor(hostRef) {
|
|
20497
20415
|
registerInstance(this, hostRef);
|
|
20498
|
-
this.rowOrderChange = createEvent(this, "rowOrderChange", 3);
|
|
20499
|
-
this.rowSelectionChange = createEvent(this, "rowSelectionChange", 3);
|
|
20500
|
-
this.sortChanged = createEvent(this, "sortChanged", 3);
|
|
20501
20416
|
this.tableSelect = createEvent(this, "tableSelect", 7);
|
|
20502
|
-
this.
|
|
20503
|
-
this.
|
|
20504
|
-
this.
|
|
20505
|
-
this.
|
|
20506
|
-
this.pendingDragRow = null;
|
|
20507
|
-
this.pointerUpClearPending = null;
|
|
20508
|
-
this.reorderKeyboardTimers = new TimerManager();
|
|
20509
|
-
this.onReorderHandleKeydown = (ev) => {
|
|
20510
|
-
this.handleReorderHandleKeyDown(ev);
|
|
20511
|
-
};
|
|
20417
|
+
this.sortChanged = createEvent(this, "sortChanged", 3);
|
|
20418
|
+
this.selectedValues = [];
|
|
20419
|
+
this.isSortable = false;
|
|
20420
|
+
this.sortableColumns = [];
|
|
20512
20421
|
this.areAllSelected = false;
|
|
20513
|
-
this.colCount = 0;
|
|
20514
20422
|
this.hasScrolled = false;
|
|
20515
|
-
this.keyboardReorderRowId = null;
|
|
20516
|
-
this.reorderLiveMessage = '';
|
|
20517
|
-
this.rowData = [];
|
|
20518
|
-
this.rowFooterData = [];
|
|
20519
|
-
this.selected = [];
|
|
20520
|
-
this.selectedRowIds = [];
|
|
20521
20423
|
this.sortTypeArray = [];
|
|
20522
|
-
this.
|
|
20523
|
-
this.selectedValues = [];
|
|
20524
|
-
this.sortableColumns = [];
|
|
20525
|
-
this.onGridScroll = (e) => {
|
|
20526
|
-
this.hasScrolled = e.target.scrollLeft > 0;
|
|
20527
|
-
};
|
|
20424
|
+
this.selectAllValue = Math.random().toString(36).slice(2);
|
|
20528
20425
|
this.selectAll = (e) => {
|
|
20529
20426
|
const { target } = e;
|
|
20530
20427
|
if (!(target instanceof HTMLInputElement))
|
|
@@ -20533,9 +20430,10 @@ const Table = class {
|
|
|
20533
20430
|
this.areAllSelected = checked;
|
|
20534
20431
|
this.selected =
|
|
20535
20432
|
this.selectedValues.length > 0
|
|
20536
|
-
?
|
|
20433
|
+
?
|
|
20434
|
+
Array.from(this.el.querySelectorAll('tbody td:first-child input')).map((input) => checked ? input === null || input === void 0 ? void 0 : input.value : checked)
|
|
20537
20435
|
: this.selected.map(() => checked);
|
|
20538
|
-
this.
|
|
20436
|
+
this.onChange();
|
|
20539
20437
|
};
|
|
20540
20438
|
this.selectOne = (e, checkboxIdx) => {
|
|
20541
20439
|
const { target } = e;
|
|
@@ -20548,23 +20446,25 @@ const Table = class {
|
|
|
20548
20446
|
return v;
|
|
20549
20447
|
return this.selectedValues.length > 0 ? (checked ? value : checked) : checked;
|
|
20550
20448
|
});
|
|
20551
|
-
this.
|
|
20449
|
+
this.onChange();
|
|
20552
20450
|
};
|
|
20553
|
-
this.
|
|
20451
|
+
this.onChange = () => {
|
|
20554
20452
|
this.tableSelect.emit({
|
|
20555
20453
|
selected: this.selected,
|
|
20556
20454
|
areAllSelected: this.areAllSelected,
|
|
20557
20455
|
});
|
|
20558
20456
|
};
|
|
20559
|
-
this.
|
|
20457
|
+
this.onScroll = () => {
|
|
20560
20458
|
this.hasScrolled = this.container.scrollLeft > 0;
|
|
20561
20459
|
};
|
|
20562
20460
|
this.sortBy = (col, sortTypeArray) => {
|
|
20563
20461
|
const handleSort = (a, b) => {
|
|
20564
|
-
if (a[col].toLocaleLowerCase() < b[col].toLocaleLowerCase())
|
|
20462
|
+
if (a[col].toLocaleLowerCase() < b[col].toLocaleLowerCase()) {
|
|
20565
20463
|
return -1;
|
|
20566
|
-
|
|
20464
|
+
}
|
|
20465
|
+
if (a[col].toLocaleLowerCase() > b[col].toLocaleLowerCase()) {
|
|
20567
20466
|
return 1;
|
|
20467
|
+
}
|
|
20568
20468
|
return 0;
|
|
20569
20469
|
};
|
|
20570
20470
|
switch (sortTypeArray[col]) {
|
|
@@ -20580,6 +20480,7 @@ const Table = class {
|
|
|
20580
20480
|
break;
|
|
20581
20481
|
}
|
|
20582
20482
|
this.rowData = Array.from(this.rowData);
|
|
20483
|
+
this.render();
|
|
20583
20484
|
};
|
|
20584
20485
|
this.setData = () => {
|
|
20585
20486
|
this.rowData = this.data !== undefined ? Array.from(this.data) : [];
|
|
@@ -20588,8 +20489,30 @@ const Table = class {
|
|
|
20588
20489
|
this.rowFooterData = this.footer !== undefined ? Array.from(this.footer) : [];
|
|
20589
20490
|
};
|
|
20590
20491
|
}
|
|
20591
|
-
|
|
20592
|
-
|
|
20492
|
+
handleSort(clickEvt, isColumnSortable, colNum, colName) {
|
|
20493
|
+
clickEvt.preventDefault();
|
|
20494
|
+
clickEvt.stopPropagation();
|
|
20495
|
+
if (!isColumnSortable)
|
|
20496
|
+
return;
|
|
20497
|
+
this.sortTypeArray = this.sortTypeArray.map((val, i) => {
|
|
20498
|
+
if (i !== colNum)
|
|
20499
|
+
return null;
|
|
20500
|
+
switch (val) {
|
|
20501
|
+
case 'asc':
|
|
20502
|
+
return 'desc';
|
|
20503
|
+
case 'desc':
|
|
20504
|
+
return null;
|
|
20505
|
+
default:
|
|
20506
|
+
return 'asc';
|
|
20507
|
+
}
|
|
20508
|
+
});
|
|
20509
|
+
const evt = this.sortChanged.emit({
|
|
20510
|
+
colNum,
|
|
20511
|
+
colName,
|
|
20512
|
+
sortTypeArr: this.sortTypeArray,
|
|
20513
|
+
});
|
|
20514
|
+
if (!evt.defaultPrevented)
|
|
20515
|
+
this.sortBy(colNum, this.sortTypeArray);
|
|
20593
20516
|
}
|
|
20594
20517
|
watchData() {
|
|
20595
20518
|
this.setData();
|
|
@@ -20597,1415 +20520,54 @@ const Table = class {
|
|
|
20597
20520
|
watchFooterData() {
|
|
20598
20521
|
this.setFooterData();
|
|
20599
20522
|
}
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
return;
|
|
20603
|
-
this.syncInjectedReorderHandleIcons();
|
|
20604
|
-
}
|
|
20605
|
-
watchReorderHandleIconKeyboard() {
|
|
20606
|
-
if (this.isLegacyMode || !this.rowReorderable)
|
|
20607
|
-
return;
|
|
20608
|
-
this.syncInjectedReorderHandleIcons();
|
|
20609
|
-
}
|
|
20610
|
-
watchRowReorderable(next) {
|
|
20611
|
-
if (this.isLegacyMode)
|
|
20612
|
-
return;
|
|
20613
|
-
if (!next) {
|
|
20614
|
-
this.keyboardReorderRowId = null;
|
|
20615
|
-
this.syncReorderHandleKeyboardA11y(null);
|
|
20616
|
-
this.removeManagedReorderCells();
|
|
20617
|
-
this.draggedRow = null;
|
|
20618
|
-
this.pendingDragRow = null;
|
|
20619
|
-
this.clearPendingDragListeners();
|
|
20620
|
-
this.reorderLiveMessage = '';
|
|
20621
|
-
this.queryBodyRows().forEach((r) => {
|
|
20622
|
-
var _a;
|
|
20623
|
-
r.removeAttribute('draggable');
|
|
20624
|
-
(_a = r.querySelector('.xpl-table__row-drag-handle')) === null || _a === void 0 ? void 0 : _a.removeAttribute('draggable');
|
|
20625
|
-
r.classList.remove('xpl-table-row--dragging', 'xpl-table-row--drag-over');
|
|
20626
|
-
});
|
|
20627
|
-
this.colCount = 0;
|
|
20628
|
-
this.columnWidthsToken = '';
|
|
20629
|
-
}
|
|
20630
|
-
}
|
|
20631
|
-
watchSelectable(next) {
|
|
20632
|
-
if (this.isLegacyMode)
|
|
20633
|
-
return;
|
|
20634
|
-
if (!next) {
|
|
20635
|
-
this.selectedRowIds = [];
|
|
20636
|
-
this.lastEmittedRowSelectionKey = '';
|
|
20637
|
-
this.colCount = 0;
|
|
20638
|
-
this.columnWidthsToken = '';
|
|
20639
|
-
this.syncRowSelectedProps();
|
|
20640
|
-
}
|
|
20523
|
+
watchColumns() {
|
|
20524
|
+
this.sortTypeArray = this.columns ? this.columns.map(() => null) : [];
|
|
20641
20525
|
}
|
|
20642
20526
|
componentWillLoad() {
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
this.sortTypeArray = this.columns ? this.columns.map(() => null) : [];
|
|
20649
|
-
}
|
|
20650
|
-
}
|
|
20651
|
-
componentDidLoad() {
|
|
20652
|
-
if (!this.isLegacyMode) {
|
|
20653
|
-
this.syncCompositionalLayout();
|
|
20654
|
-
}
|
|
20655
|
-
}
|
|
20656
|
-
componentDidUpdate() {
|
|
20657
|
-
if (!this.isLegacyMode) {
|
|
20658
|
-
this.syncCompositionalLayout();
|
|
20659
|
-
}
|
|
20660
|
-
}
|
|
20661
|
-
disconnectedCallback() {
|
|
20662
|
-
this.clearPendingDragListeners();
|
|
20663
|
-
this.detachReorderHandleKeydownListeners();
|
|
20664
|
-
this.reorderKeyboardTimers.dispose();
|
|
20665
|
-
if (this.reorderAnnounceRaf !== undefined) {
|
|
20666
|
-
cancelAnimationFrame(this.reorderAnnounceRaf);
|
|
20667
|
-
this.reorderAnnounceRaf = undefined;
|
|
20668
|
-
}
|
|
20669
|
-
}
|
|
20670
|
-
handleHeaderCellColumnWidthsChange(ev) {
|
|
20671
|
-
if (this.isLegacyMode)
|
|
20672
|
-
return;
|
|
20673
|
-
const t = ev.target;
|
|
20674
|
-
if (!(t instanceof Node) || !this.el.contains(t))
|
|
20675
|
-
return;
|
|
20676
|
-
this.updateColumnWidths();
|
|
20677
|
-
}
|
|
20678
|
-
handleCompositionalCheckboxChange(ev) {
|
|
20679
|
-
var _a, _b;
|
|
20680
|
-
if (this.isLegacyMode || !this.selectable)
|
|
20681
|
-
return;
|
|
20682
|
-
if (!this.isEventFromThisTable(ev.target))
|
|
20683
|
-
return;
|
|
20684
|
-
const path = (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)) !== null && _b !== void 0 ? _b : [];
|
|
20685
|
-
let checkboxHost = (path.length > 0 ? path : [ev.target].filter((n) => n != null)).find((n) => n instanceof HTMLElement && n.tagName.toLowerCase() === 'xpl-checkbox');
|
|
20686
|
-
if (!checkboxHost &&
|
|
20687
|
-
ev.target &&
|
|
20688
|
-
typeof ev.target.closest === 'function') {
|
|
20689
|
-
checkboxHost = ev.target.closest('xpl-checkbox');
|
|
20690
|
-
}
|
|
20691
|
-
if (!checkboxHost || !this.el.contains(checkboxHost))
|
|
20692
|
-
return;
|
|
20693
|
-
const row = checkboxHost.closest('xpl-table-row');
|
|
20694
|
-
if (!row || !this.isDirectChildBodyRow(row))
|
|
20695
|
-
return;
|
|
20696
|
-
const cell = checkboxHost.closest('xpl-table-cell');
|
|
20697
|
-
if (!cell)
|
|
20698
|
-
return;
|
|
20699
|
-
const selectionIdx = this.getSelectionColumnIndex();
|
|
20700
|
-
if (selectionIdx === null)
|
|
20701
|
-
return;
|
|
20702
|
-
const bodyCells = Table.getBodyRowCells(row);
|
|
20703
|
-
const colIdx = bodyCells.indexOf(cell);
|
|
20704
|
-
if (colIdx !== selectionIdx)
|
|
20705
|
-
return;
|
|
20706
|
-
ev.stopPropagation();
|
|
20707
|
-
const rowId = Table.getRowIdForRow(row);
|
|
20708
|
-
if (!rowId || row.disabled)
|
|
20709
|
-
return;
|
|
20710
|
-
const input = checkboxHost.querySelector('input[type="checkbox"]');
|
|
20711
|
-
if (!input)
|
|
20712
|
-
return;
|
|
20713
|
-
const { checked } = input;
|
|
20714
|
-
if (checked) {
|
|
20715
|
-
if (!this.selectedRowIds.includes(rowId)) {
|
|
20716
|
-
this.selectedRowIds = [...this.selectedRowIds, rowId];
|
|
20717
|
-
}
|
|
20718
|
-
}
|
|
20719
|
-
else {
|
|
20720
|
-
this.selectedRowIds = this.selectedRowIds.filter((id) => id !== rowId);
|
|
20721
|
-
}
|
|
20722
|
-
this.applyHeaderCheckboxState();
|
|
20723
|
-
this.syncRowSelectedProps();
|
|
20724
|
-
this.emitCompositionalSelection();
|
|
20725
|
-
}
|
|
20726
|
-
handleCompositionalHeaderCheckboxChange(ev) {
|
|
20727
|
-
var _a, _b;
|
|
20728
|
-
if (this.isLegacyMode || !this.selectable)
|
|
20729
|
-
return;
|
|
20730
|
-
if (!this.isEventFromThisTable(ev.target))
|
|
20731
|
-
return;
|
|
20732
|
-
const path = (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)) !== null && _b !== void 0 ? _b : [];
|
|
20733
|
-
let headerCell = (path.length > 0 ? path : [ev.target].filter((n) => n != null)).find((n) => n instanceof HTMLElement &&
|
|
20734
|
-
n.tagName.toLowerCase() === 'xpl-table-header-cell' &&
|
|
20735
|
-
n.getAttribute('type') === 'checkbox');
|
|
20736
|
-
if (!headerCell && ev.target && typeof ev.target.closest === 'function') {
|
|
20737
|
-
headerCell = ev.target.closest('xpl-table-header-cell[type="checkbox"]');
|
|
20738
|
-
}
|
|
20739
|
-
if (!headerCell || !this.el.contains(headerCell))
|
|
20740
|
-
return;
|
|
20741
|
-
if (!this.isCellInOurCompositionalHeader(headerCell))
|
|
20742
|
-
return;
|
|
20743
|
-
const headerCells = this.getCompositionalHeaderCells();
|
|
20744
|
-
if (!headerCells.includes(headerCell))
|
|
20745
|
-
return;
|
|
20746
|
-
const checked = !!ev.detail;
|
|
20747
|
-
const selectableRows = this.querySelectableBodyRows();
|
|
20748
|
-
const ids = selectableRows
|
|
20749
|
-
.map((r) => Table.getRowIdForRow(r))
|
|
20750
|
-
.filter((id) => !!id);
|
|
20751
|
-
if (checked) {
|
|
20752
|
-
this.selectedRowIds = [...ids];
|
|
20753
|
-
}
|
|
20754
|
-
else {
|
|
20755
|
-
this.selectedRowIds = [];
|
|
20756
|
-
}
|
|
20757
|
-
this.applyBodyCheckboxStates();
|
|
20758
|
-
this.syncRowSelectedProps();
|
|
20759
|
-
this.emitCompositionalSelection();
|
|
20760
|
-
}
|
|
20761
|
-
handlePointerDownExitKeyboardReorder(ev) {
|
|
20762
|
-
if (this.isLegacyMode || !this.rowReorderable || this.keyboardReorderRowId === null) {
|
|
20763
|
-
return;
|
|
20764
|
-
}
|
|
20765
|
-
const t = ev.target;
|
|
20766
|
-
if (!(t instanceof Node) || !this.el.contains(t)) {
|
|
20767
|
-
return;
|
|
20768
|
-
}
|
|
20769
|
-
const row = t instanceof Element ? t.closest('xpl-table-row') : null;
|
|
20770
|
-
if (!row || !this.isDirectChildBodyRow(row)) {
|
|
20771
|
-
return;
|
|
20772
|
-
}
|
|
20773
|
-
this.keyboardReorderRowId = null;
|
|
20774
|
-
this.syncReorderHandleKeyboardA11y(null);
|
|
20775
|
-
}
|
|
20776
|
-
handleReorderHandleKeyDown(ev) {
|
|
20777
|
-
var _a;
|
|
20778
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
20779
|
-
return;
|
|
20780
|
-
}
|
|
20781
|
-
const rawPath = typeof ev.composedPath === 'function' ? ev.composedPath() : [];
|
|
20782
|
-
const path = rawPath.length > 0 ? rawPath : ev.target ? [ev.target] : [];
|
|
20783
|
-
let handle = path.find((n) => n instanceof HTMLElement && n.classList.contains('xpl-table__row-drag-handle'));
|
|
20784
|
-
if (!handle &&
|
|
20785
|
-
ev.target instanceof HTMLElement &&
|
|
20786
|
-
ev.target.classList.contains('xpl-table__row-drag-handle')) {
|
|
20787
|
-
handle = ev.target;
|
|
20788
|
-
}
|
|
20789
|
-
if (!handle || !this.el.contains(handle)) {
|
|
20790
|
-
return;
|
|
20791
|
-
}
|
|
20792
|
-
const row = handle.closest('xpl-table-row');
|
|
20793
|
-
if (!row || !this.isDirectChildBodyRow(row)) {
|
|
20794
|
-
return;
|
|
20795
|
-
}
|
|
20796
|
-
const rowId = (_a = Table.getRowIdForRow(row)) !== null && _a !== void 0 ? _a : '';
|
|
20797
|
-
if (!rowId) {
|
|
20798
|
-
return;
|
|
20799
|
-
}
|
|
20800
|
-
const isKbd = this.keyboardReorderRowId === rowId;
|
|
20801
|
-
const isEscapeKey = ev.key === 'Escape' ||
|
|
20802
|
-
ev.key === 'Esc' ||
|
|
20803
|
-
ev.code === 'Escape' ||
|
|
20804
|
-
ev.keyCode === 27;
|
|
20805
|
-
if (row.disabled) {
|
|
20806
|
-
if (isEscapeKey && isKbd) {
|
|
20807
|
-
ev.preventDefault();
|
|
20808
|
-
this.keyboardReorderRowId = null;
|
|
20809
|
-
this.syncReorderHandleKeyboardA11y(null);
|
|
20810
|
-
}
|
|
20811
|
-
return;
|
|
20812
|
-
}
|
|
20813
|
-
if (isEscapeKey) {
|
|
20814
|
-
if (isKbd) {
|
|
20815
|
-
ev.preventDefault();
|
|
20816
|
-
this.keyboardReorderRowId = null;
|
|
20817
|
-
this.syncReorderHandleKeyboardA11y(null);
|
|
20818
|
-
}
|
|
20819
|
-
return;
|
|
20820
|
-
}
|
|
20821
|
-
if (!isKbd) {
|
|
20822
|
-
if (ev.key === 'Enter' || ev.key === ' ') {
|
|
20823
|
-
ev.preventDefault();
|
|
20824
|
-
this.keyboardReorderRowId = rowId;
|
|
20825
|
-
this.syncReorderHandleKeyboardA11y(rowId);
|
|
20826
|
-
}
|
|
20827
|
-
return;
|
|
20828
|
-
}
|
|
20829
|
-
if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {
|
|
20830
|
-
ev.preventDefault();
|
|
20831
|
-
const dir = ev.key === 'ArrowUp' ? 'up' : 'down';
|
|
20832
|
-
this.performKeyboardRowReorder(rowId, dir);
|
|
20833
|
-
}
|
|
20834
|
-
}
|
|
20835
|
-
handleRowReorderPointerDown(ev) {
|
|
20836
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
20837
|
-
return;
|
|
20838
|
-
}
|
|
20839
|
-
const handle = reorderDragHandleFromEvent(ev);
|
|
20840
|
-
if (!handle) {
|
|
20841
|
-
return;
|
|
20842
|
-
}
|
|
20843
|
-
const table = handle.closest('xpl-table');
|
|
20844
|
-
if (table !== this.el) {
|
|
20845
|
-
return;
|
|
20846
|
-
}
|
|
20847
|
-
const row = bodyRowFromDragTarget(handle);
|
|
20848
|
-
if (!row || row.disabled) {
|
|
20849
|
-
return;
|
|
20850
|
-
}
|
|
20851
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
20852
|
-
if (!body || row.parentElement !== body) {
|
|
20853
|
-
return;
|
|
20854
|
-
}
|
|
20855
|
-
this.clearPendingDragListeners();
|
|
20856
|
-
this.pendingDragRow = row;
|
|
20857
|
-
const onPointerEnd = () => {
|
|
20858
|
-
this.clearPendingDragListeners();
|
|
20859
|
-
this.pendingDragRow = null;
|
|
20860
|
-
};
|
|
20861
|
-
document.addEventListener('pointerup', onPointerEnd, true);
|
|
20862
|
-
document.addEventListener('pointercancel', onPointerEnd, true);
|
|
20863
|
-
this.pointerUpClearPending = () => {
|
|
20864
|
-
document.removeEventListener('pointerup', onPointerEnd, true);
|
|
20865
|
-
document.removeEventListener('pointercancel', onPointerEnd, true);
|
|
20866
|
-
};
|
|
20527
|
+
this.areAllSelected = false;
|
|
20528
|
+
this.setData();
|
|
20529
|
+
this.setFooterData();
|
|
20530
|
+
this.selected = new Array(this.rowData.length).fill(false);
|
|
20531
|
+
this.sortTypeArray = this.columns ? this.columns.map(() => null) : [];
|
|
20867
20532
|
}
|
|
20868
|
-
|
|
20533
|
+
render() {
|
|
20869
20534
|
var _a;
|
|
20870
|
-
if (this.
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
const row = tableBodyRowFromEvent(ev);
|
|
20874
|
-
if (!row) {
|
|
20875
|
-
return;
|
|
20876
|
-
}
|
|
20877
|
-
if (row.closest('xpl-table') !== this.el) {
|
|
20878
|
-
return;
|
|
20879
|
-
}
|
|
20880
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
20881
|
-
if (!body || row.parentElement !== body) {
|
|
20882
|
-
return;
|
|
20883
|
-
}
|
|
20884
|
-
if (row.disabled || this.pendingDragRow !== row) {
|
|
20885
|
-
ev.preventDefault();
|
|
20886
|
-
return;
|
|
20887
|
-
}
|
|
20888
|
-
this.keyboardReorderRowId = null;
|
|
20889
|
-
this.syncReorderHandleKeyboardA11y(null);
|
|
20890
|
-
this.clearPendingDragListeners();
|
|
20891
|
-
this.pendingDragRow = null;
|
|
20892
|
-
this.draggedRow = row;
|
|
20893
|
-
if (ev.dataTransfer) {
|
|
20894
|
-
ev.dataTransfer.effectAllowed = 'move';
|
|
20895
|
-
ev.dataTransfer.setData('text/plain', (_a = Table.getRowIdForRow(row)) !== null && _a !== void 0 ? _a : '');
|
|
20896
|
-
}
|
|
20897
|
-
row.classList.add('xpl-table-row--dragging');
|
|
20898
|
-
}
|
|
20899
|
-
handleRowReorderDragEnd(ev) {
|
|
20900
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
20901
|
-
return;
|
|
20902
|
-
}
|
|
20903
|
-
const row = tableBodyRowFromEvent(ev);
|
|
20904
|
-
if (!row || row.closest('xpl-table') !== this.el) {
|
|
20905
|
-
return;
|
|
20535
|
+
if (this.columns &&
|
|
20536
|
+
(!this.sortTypeArray || this.sortTypeArray.length !== this.columns.length)) {
|
|
20537
|
+
this.sortTypeArray = this.columns.map(() => null);
|
|
20906
20538
|
}
|
|
20907
|
-
|
|
20908
|
-
|
|
20909
|
-
|
|
20910
|
-
|
|
20911
|
-
|
|
20912
|
-
|
|
20913
|
-
|
|
20914
|
-
|
|
20915
|
-
|
|
20916
|
-
|
|
20917
|
-
|
|
20918
|
-
|
|
20919
|
-
|
|
20920
|
-
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
|
|
20928
|
-
handleRowReorderDragEnter(ev) {
|
|
20929
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
20930
|
-
return;
|
|
20931
|
-
}
|
|
20932
|
-
const row = tableBodyRowFromEvent(ev);
|
|
20933
|
-
if (!row || row.closest('xpl-table') !== this.el) {
|
|
20934
|
-
return;
|
|
20935
|
-
}
|
|
20936
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
20937
|
-
if (!body || row.parentElement !== body || row.disabled) {
|
|
20938
|
-
return;
|
|
20939
|
-
}
|
|
20940
|
-
ev.preventDefault();
|
|
20941
|
-
row.classList.add('xpl-table-row--drag-over');
|
|
20942
|
-
}
|
|
20943
|
-
handleRowReorderDragLeave(ev) {
|
|
20944
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
20945
|
-
return;
|
|
20946
|
-
}
|
|
20947
|
-
const row = tableBodyRowFromEvent(ev);
|
|
20948
|
-
if (!row || row.closest('xpl-table') !== this.el) {
|
|
20949
|
-
return;
|
|
20950
|
-
}
|
|
20951
|
-
const related = ev.relatedTarget;
|
|
20952
|
-
if (related && row.contains(related)) {
|
|
20953
|
-
return;
|
|
20954
|
-
}
|
|
20955
|
-
row.classList.remove('xpl-table-row--drag-over');
|
|
20956
|
-
}
|
|
20957
|
-
handleRowReorderDrop(ev) {
|
|
20958
|
-
var _a;
|
|
20959
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
20960
|
-
return;
|
|
20961
|
-
}
|
|
20962
|
-
ev.preventDefault();
|
|
20963
|
-
const dropRow = tableBodyRowFromEvent(ev);
|
|
20964
|
-
if (!dropRow || dropRow.closest('xpl-table') !== this.el) {
|
|
20965
|
-
return;
|
|
20966
|
-
}
|
|
20967
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
20968
|
-
if (!body || dropRow.parentElement !== body || dropRow.disabled) {
|
|
20969
|
-
return;
|
|
20970
|
-
}
|
|
20971
|
-
const source = this.draggedRow;
|
|
20972
|
-
if (!source || source.disabled) {
|
|
20973
|
-
this.draggedRow = null;
|
|
20974
|
-
this.clearReorderDragOverClasses();
|
|
20975
|
-
return;
|
|
20976
|
-
}
|
|
20977
|
-
if (source === dropRow) {
|
|
20978
|
-
this.clearReorderDragOverClasses();
|
|
20979
|
-
return;
|
|
20980
|
-
}
|
|
20981
|
-
const visible = this.getVisibleBodyRowsForReorder();
|
|
20982
|
-
const fromIndex = visible.indexOf(source);
|
|
20983
|
-
const toIndex = visible.indexOf(dropRow);
|
|
20984
|
-
if (fromIndex === -1 || toIndex === -1) {
|
|
20985
|
-
this.clearReorderDragOverClasses();
|
|
20986
|
-
return;
|
|
20987
|
-
}
|
|
20988
|
-
const direction = fromIndex > toIndex ? 'up' : 'down';
|
|
20989
|
-
const rowId = (_a = Table.getRowIdForRow(source)) !== null && _a !== void 0 ? _a : '';
|
|
20990
|
-
const runMove = () => {
|
|
20991
|
-
moveRowInTableBody(body, source, dropRow);
|
|
20992
|
-
};
|
|
20993
|
-
runMove();
|
|
20994
|
-
const orderedRowIds = this.getVisibleBodyRowsForReorder().map((r) => { var _a; return (_a = Table.getRowIdForRow(r)) !== null && _a !== void 0 ? _a : ''; });
|
|
20995
|
-
this.rowOrderChange.emit({
|
|
20996
|
-
rowId,
|
|
20997
|
-
direction,
|
|
20998
|
-
orderedRowIds,
|
|
20999
|
-
fromIndex,
|
|
21000
|
-
toIndex,
|
|
21001
|
-
});
|
|
21002
|
-
this.announceRowReorder(rowId, orderedRowIds);
|
|
21003
|
-
this.clearReorderDragOverClasses();
|
|
21004
|
-
if (this.selectable) {
|
|
21005
|
-
this.applyBodyCheckboxStates();
|
|
21006
|
-
this.applyHeaderCheckboxState();
|
|
21007
|
-
this.syncRowSelectedProps();
|
|
21008
|
-
}
|
|
21009
|
-
this.updateColumnWidths();
|
|
21010
|
-
}
|
|
21011
|
-
get isLegacyMode() {
|
|
21012
|
-
return this.columns !== undefined || this.data !== undefined || this.footer !== undefined;
|
|
21013
|
-
}
|
|
21014
|
-
ensureTableInstanceId() {
|
|
21015
|
-
if (this.tableInstanceId)
|
|
21016
|
-
return;
|
|
21017
|
-
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
|
|
21018
|
-
this.tableInstanceId = crypto.randomUUID();
|
|
21019
|
-
}
|
|
21020
|
-
else {
|
|
21021
|
-
this.tableInstanceId = Math.random().toString(36).slice(2);
|
|
21022
|
-
}
|
|
21023
|
-
}
|
|
21024
|
-
generateRowId() {
|
|
21025
|
-
this.ensureTableInstanceId();
|
|
21026
|
-
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
|
|
21027
|
-
return `${this.tableInstanceId}-${crypto.randomUUID()}`;
|
|
21028
|
-
}
|
|
21029
|
-
return `${this.tableInstanceId}-${Math.random().toString(36).slice(2)}`;
|
|
21030
|
-
}
|
|
21031
|
-
syncCompositionalLayout() {
|
|
21032
|
-
if (this.isLegacyMode)
|
|
21033
|
-
return;
|
|
21034
|
-
if (this.rowReorderable) {
|
|
21035
|
-
this.syncReorderColumn();
|
|
21036
|
-
}
|
|
21037
|
-
else {
|
|
21038
|
-
this.removeManagedReorderCells();
|
|
21039
|
-
}
|
|
21040
|
-
if (this.selectable) {
|
|
21041
|
-
this.ensureTableInstanceId();
|
|
21042
|
-
this.pruneStaleSelectedRowIds();
|
|
21043
|
-
this.ensureBodyRowIds();
|
|
21044
|
-
this.applyBodyCheckboxStates();
|
|
21045
|
-
this.applyHeaderCheckboxState();
|
|
21046
|
-
this.syncRowSelectedProps();
|
|
21047
|
-
}
|
|
21048
|
-
if (this.rowReorderable && this.selectable) {
|
|
21049
|
-
this.normalizeManagedColumnsOrder();
|
|
21050
|
-
}
|
|
21051
|
-
this.updateColumnWidths();
|
|
21052
|
-
}
|
|
21053
|
-
getDirectChildTableSection(tag) {
|
|
21054
|
-
var _a;
|
|
21055
|
-
const el = Array.from(this.el.children).find((c) => c.tagName.toLowerCase() === tag);
|
|
21056
|
-
return (_a = el) !== null && _a !== void 0 ? _a : null;
|
|
21057
|
-
}
|
|
21058
|
-
isDirectChildBodyRow(row) {
|
|
21059
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
21060
|
-
return body !== null && row.parentElement === body;
|
|
21061
|
-
}
|
|
21062
|
-
isCellInOurCompositionalHeader(cell) {
|
|
21063
|
-
const header = cell.closest('xpl-table-header');
|
|
21064
|
-
return header !== null && header.parentElement === this.el;
|
|
21065
|
-
}
|
|
21066
|
-
getSelectionColumnIndex() {
|
|
21067
|
-
const headerCells = this.getCompositionalHeaderCells();
|
|
21068
|
-
const idx = headerCells.findIndex((c) => c.getAttribute('type') === 'checkbox');
|
|
21069
|
-
return idx >= 0 ? idx : null;
|
|
21070
|
-
}
|
|
21071
|
-
static getBodyRowCells(row) {
|
|
21072
|
-
return Array.from(row.children).filter((c) => c.tagName.toLowerCase() === 'xpl-table-cell');
|
|
21073
|
-
}
|
|
21074
|
-
queryBodyRows() {
|
|
21075
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
21076
|
-
if (!body)
|
|
21077
|
-
return [];
|
|
21078
|
-
return Array.from(body.children).filter((c) => c.tagName.toLowerCase() === 'xpl-table-row');
|
|
21079
|
-
}
|
|
21080
|
-
querySelectableBodyRows() {
|
|
21081
|
-
return this.queryBodyRows().filter((row) => !row.disabled);
|
|
21082
|
-
}
|
|
21083
|
-
static getRowIdForRow(row) {
|
|
21084
|
-
var _a;
|
|
21085
|
-
const id = (_a = row.getAttribute('row-id')) === null || _a === void 0 ? void 0 : _a.trim();
|
|
21086
|
-
return id || null;
|
|
21087
|
-
}
|
|
21088
|
-
ensureBodyRowIds() {
|
|
21089
|
-
this.queryBodyRows().forEach((row) => {
|
|
21090
|
-
if (Table.getRowIdForRow(row))
|
|
21091
|
-
return;
|
|
21092
|
-
row.setAttribute('row-id', this.generateRowId());
|
|
21093
|
-
});
|
|
21094
|
-
}
|
|
21095
|
-
removeManagedReorderCells() {
|
|
21096
|
-
this.el.querySelectorAll(`[${ROW_REORDER_MARK}]`).forEach((node) => {
|
|
21097
|
-
var _a;
|
|
21098
|
-
if (!(node instanceof Element))
|
|
21099
|
-
return;
|
|
21100
|
-
if (node.closest('xpl-table') !== this.el)
|
|
21101
|
-
return;
|
|
21102
|
-
(_a = node.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(node);
|
|
21103
|
-
});
|
|
21104
|
-
}
|
|
21105
|
-
getSelectionSlotCellForReorderOrder(row) {
|
|
21106
|
-
const idx = this.getSelectionColumnIndex();
|
|
21107
|
-
if (idx === null) {
|
|
21108
|
-
return null;
|
|
21109
|
-
}
|
|
21110
|
-
const cells = Array.from(row.children);
|
|
21111
|
-
const cell = cells[idx];
|
|
21112
|
-
if (!cell) {
|
|
21113
|
-
return null;
|
|
21114
|
-
}
|
|
21115
|
-
const tag = cell.tagName.toLowerCase();
|
|
21116
|
-
if (tag === 'xpl-table-header-cell') {
|
|
21117
|
-
return cell.getAttribute('type') === 'checkbox' ? cell : null;
|
|
21118
|
-
}
|
|
21119
|
-
if (tag === 'xpl-table-cell') {
|
|
21120
|
-
if (cell.hasAttribute(SELECTION_MARK)) {
|
|
21121
|
-
return cell;
|
|
21122
|
-
}
|
|
21123
|
-
return cell.querySelector('xpl-checkbox') ? cell : null;
|
|
21124
|
-
}
|
|
21125
|
-
if (tag === 'xpl-table-footer-cell') {
|
|
21126
|
-
return cell;
|
|
21127
|
-
}
|
|
21128
|
-
return null;
|
|
21129
|
-
}
|
|
21130
|
-
normalizeManagedColumnsOrder() {
|
|
21131
|
-
var _a;
|
|
21132
|
-
const fix = (row) => {
|
|
21133
|
-
const re = row.querySelector(`:scope > [${ROW_REORDER_MARK}]`);
|
|
21134
|
-
const se = this.getSelectionSlotCellForReorderOrder(row);
|
|
21135
|
-
if (!re || !se) {
|
|
21136
|
-
return;
|
|
21137
|
-
}
|
|
21138
|
-
const siblings = Array.from(row.children);
|
|
21139
|
-
const iRe = siblings.indexOf(re);
|
|
21140
|
-
const iSe = siblings.indexOf(se);
|
|
21141
|
-
if (iRe > iSe) {
|
|
21142
|
-
row.insertBefore(re, se);
|
|
21143
|
-
}
|
|
21144
|
-
};
|
|
21145
|
-
const header = (_a = Array.from(this.el.children).find((c) => c.tagName.toLowerCase() === 'xpl-table-header')) !== null && _a !== void 0 ? _a : null;
|
|
21146
|
-
if (header) {
|
|
21147
|
-
const firstRow = Array.from(header.children).find((c) => c.tagName.toLowerCase() === 'xpl-table-row');
|
|
21148
|
-
const container = firstRow !== null && firstRow !== void 0 ? firstRow : header;
|
|
21149
|
-
fix(container);
|
|
21150
|
-
}
|
|
21151
|
-
this.queryBodyRows().forEach((row) => fix(row));
|
|
21152
|
-
const footer = this.getDirectChildTableSection('xpl-table-footer');
|
|
21153
|
-
if (footer) {
|
|
21154
|
-
Array.from(footer.children)
|
|
21155
|
-
.filter((c) => c.tagName.toLowerCase() === 'xpl-table-row')
|
|
21156
|
-
.forEach((row) => fix(row));
|
|
21157
|
-
}
|
|
21158
|
-
}
|
|
21159
|
-
syncReorderColumn() {
|
|
21160
|
-
if (!this.rowReorderable || this.isLegacyMode)
|
|
21161
|
-
return;
|
|
21162
|
-
this.ensureBodyRowIds();
|
|
21163
|
-
this.ensureHeaderReorderCell();
|
|
21164
|
-
this.ensureBodyReorderCells();
|
|
21165
|
-
this.ensureFooterReorderCells();
|
|
21166
|
-
this.applyReorderRowDraggableState();
|
|
21167
|
-
}
|
|
21168
|
-
ensureHeaderReorderCell() {
|
|
21169
|
-
var _a;
|
|
21170
|
-
const header = (_a = Array.from(this.el.children).find((c) => c.tagName.toLowerCase() === 'xpl-table-header')) !== null && _a !== void 0 ? _a : null;
|
|
21171
|
-
if (!header)
|
|
21172
|
-
return;
|
|
21173
|
-
const firstRow = Array.from(header.children).find((c) => c.tagName.toLowerCase() === 'xpl-table-row');
|
|
21174
|
-
const container = firstRow !== null && firstRow !== void 0 ? firstRow : header;
|
|
21175
|
-
if (Array.from(container.children).some((c) => c.tagName.toLowerCase() === 'xpl-table-header-cell' &&
|
|
21176
|
-
c.hasAttribute(ROW_REORDER_MARK))) {
|
|
21177
|
-
return;
|
|
21178
|
-
}
|
|
21179
|
-
const cell = document.createElement('xpl-table-header-cell');
|
|
21180
|
-
cell.setAttribute(ROW_REORDER_MARK, '');
|
|
21181
|
-
cell.setAttribute('type', 'empty');
|
|
21182
|
-
cell.setAttribute('width', '48');
|
|
21183
|
-
cell.setAttribute('align', 'center');
|
|
21184
|
-
container.insertBefore(cell, container.firstChild);
|
|
21185
|
-
}
|
|
21186
|
-
ensureBodyReorderCells() {
|
|
21187
|
-
this.queryBodyRows().forEach((row) => {
|
|
21188
|
-
var _a;
|
|
21189
|
-
const managed = Array.from(row.children).filter((c) => c.tagName.toLowerCase() === 'xpl-table-cell' &&
|
|
21190
|
-
c.hasAttribute(ROW_REORDER_MARK));
|
|
21191
|
-
if (managed.length > 1) {
|
|
21192
|
-
for (let i = 1; i < managed.length; i += 1) {
|
|
21193
|
-
managed[i].remove();
|
|
21194
|
-
}
|
|
21195
|
-
}
|
|
21196
|
-
let cell = managed[0];
|
|
21197
|
-
if (!cell) {
|
|
21198
|
-
const newCell = document.createElement('xpl-table-cell');
|
|
21199
|
-
newCell.setAttribute(ROW_REORDER_MARK, '');
|
|
21200
|
-
newCell.setAttribute('width', '48');
|
|
21201
|
-
newCell.setAttribute('align', 'center');
|
|
21202
|
-
const btn = document.createElement('button');
|
|
21203
|
-
btn.type = 'button';
|
|
21204
|
-
btn.className = 'xpl-table__row-drag-handle';
|
|
21205
|
-
btn.setAttribute('aria-label', 'Reorder row');
|
|
21206
|
-
btn.setAttribute('aria-pressed', 'false');
|
|
21207
|
-
const iconName = this.getResolvedIconForRow((_a = Table.getRowIdForRow(row)) !== null && _a !== void 0 ? _a : '');
|
|
21208
|
-
if (iconName) {
|
|
21209
|
-
const icon = document.createElement('xpl-icon');
|
|
21210
|
-
icon.setAttribute('icon', iconName);
|
|
21211
|
-
icon.setAttribute('size', '16');
|
|
21212
|
-
btn.appendChild(icon);
|
|
21213
|
-
}
|
|
21214
|
-
newCell.appendChild(btn);
|
|
21215
|
-
row.insertBefore(newCell, row.firstChild);
|
|
21216
|
-
cell = newCell;
|
|
21217
|
-
}
|
|
21218
|
-
else {
|
|
21219
|
-
cell.setAttribute('align', 'center');
|
|
21220
|
-
}
|
|
21221
|
-
const btn = cell.querySelector('.xpl-table__row-drag-handle');
|
|
21222
|
-
if (btn) {
|
|
21223
|
-
btn.disabled = row.disabled;
|
|
21224
|
-
}
|
|
21225
|
-
});
|
|
21226
|
-
this.syncInjectedReorderHandleIcons();
|
|
21227
|
-
this.attachReorderHandleKeydownListeners();
|
|
21228
|
-
}
|
|
21229
|
-
getResolvedIconForRow(rowId) {
|
|
21230
|
-
var _a, _b;
|
|
21231
|
-
const inKeyboardMode = this.keyboardReorderRowId !== null &&
|
|
21232
|
-
rowId !== '' &&
|
|
21233
|
-
rowId === this.keyboardReorderRowId;
|
|
21234
|
-
if (inKeyboardMode) {
|
|
21235
|
-
if (this.reorderHandleIconKeyboard === '') {
|
|
21236
|
-
return null;
|
|
21237
|
-
}
|
|
21238
|
-
return (_a = this.reorderHandleIconKeyboard) !== null && _a !== void 0 ? _a : 'caret-expand-y';
|
|
21239
|
-
}
|
|
21240
|
-
if (this.reorderHandleIcon === '') {
|
|
21241
|
-
return null;
|
|
21242
|
-
}
|
|
21243
|
-
return (_b = this.reorderHandleIcon) !== null && _b !== void 0 ? _b : 'grip-dots-vertical';
|
|
21244
|
-
}
|
|
21245
|
-
syncInjectedReorderHandleIcons() {
|
|
21246
|
-
this.queryBodyRows().forEach((row) => {
|
|
21247
|
-
var _a;
|
|
21248
|
-
const btn = row.querySelector('.xpl-table__row-drag-handle');
|
|
21249
|
-
if (!btn) {
|
|
21250
|
-
return;
|
|
21251
|
-
}
|
|
21252
|
-
const rowId = (_a = Table.getRowIdForRow(row)) !== null && _a !== void 0 ? _a : '';
|
|
21253
|
-
const iconName = this.getResolvedIconForRow(rowId);
|
|
21254
|
-
btn.querySelectorAll('xpl-icon').forEach((n) => n.remove());
|
|
21255
|
-
if (iconName) {
|
|
21256
|
-
const icon = document.createElement('xpl-icon');
|
|
21257
|
-
icon.setAttribute('icon', iconName);
|
|
21258
|
-
icon.setAttribute('size', '16');
|
|
21259
|
-
btn.appendChild(icon);
|
|
21260
|
-
}
|
|
21261
|
-
});
|
|
21262
|
-
}
|
|
21263
|
-
syncReorderHandleKeyboardA11y(activeId) {
|
|
21264
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
21265
|
-
return;
|
|
21266
|
-
}
|
|
21267
|
-
this.queryBodyRows().forEach((row) => {
|
|
21268
|
-
var _a;
|
|
21269
|
-
const btn = row.querySelector('.xpl-table__row-drag-handle');
|
|
21270
|
-
if (!btn) {
|
|
21271
|
-
return;
|
|
21272
|
-
}
|
|
21273
|
-
const rid = (_a = Table.getRowIdForRow(row)) !== null && _a !== void 0 ? _a : '';
|
|
21274
|
-
const isActive = activeId !== null && rid === activeId;
|
|
21275
|
-
btn.classList.toggle('xpl-table__row-drag-handle--keyboard-mode', isActive);
|
|
21276
|
-
btn.setAttribute('aria-pressed', isActive ? 'true' : 'false');
|
|
21277
|
-
btn.setAttribute('aria-label', isActive
|
|
21278
|
-
? 'Press arrow up or down to reorder, Escape to exit'
|
|
21279
|
-
: 'Press Enter or Space to activate keyboard reorder mode, or drag to reorder');
|
|
21280
|
-
});
|
|
21281
|
-
this.syncInjectedReorderHandleIcons();
|
|
21282
|
-
}
|
|
21283
|
-
attachReorderHandleKeydownListeners() {
|
|
21284
|
-
if (this.isLegacyMode || !this.rowReorderable) {
|
|
21285
|
-
return;
|
|
21286
|
-
}
|
|
21287
|
-
this.queryBodyRows().forEach((row) => {
|
|
21288
|
-
const btn = row.querySelector('.xpl-table__row-drag-handle');
|
|
21289
|
-
if (!btn || btn.dataset.xplReorderKbdBound === 'true') {
|
|
21290
|
-
return;
|
|
21291
|
-
}
|
|
21292
|
-
btn.dataset.xplReorderKbdBound = 'true';
|
|
21293
|
-
btn.addEventListener('keydown', this.onReorderHandleKeydown);
|
|
21294
|
-
});
|
|
21295
|
-
}
|
|
21296
|
-
detachReorderHandleKeydownListeners() {
|
|
21297
|
-
if (!this.el) {
|
|
21298
|
-
return;
|
|
21299
|
-
}
|
|
21300
|
-
this.el
|
|
21301
|
-
.querySelectorAll('.xpl-table__row-drag-handle[data-xpl-reorder-kbd-bound="true"]')
|
|
21302
|
-
.forEach((btn) => {
|
|
21303
|
-
btn.removeEventListener('keydown', this.onReorderHandleKeydown);
|
|
21304
|
-
delete btn.dataset.xplReorderKbdBound;
|
|
21305
|
-
});
|
|
21306
|
-
}
|
|
21307
|
-
performKeyboardRowReorder(rowId, direction) {
|
|
21308
|
-
const body = this.getDirectChildTableSection('xpl-table-body');
|
|
21309
|
-
if (!body) {
|
|
21310
|
-
return false;
|
|
21311
|
-
}
|
|
21312
|
-
const visible = this.getVisibleBodyRowsForReorder();
|
|
21313
|
-
const itemIndex = visible.findIndex((r) => Table.getRowIdForRow(r) === rowId);
|
|
21314
|
-
if (itemIndex === -1) {
|
|
21315
|
-
return false;
|
|
21316
|
-
}
|
|
21317
|
-
const targetIndex = direction === 'up' ? itemIndex - 1 : itemIndex + 1;
|
|
21318
|
-
if (targetIndex < 0 || targetIndex >= visible.length) {
|
|
21319
|
-
return false;
|
|
21320
|
-
}
|
|
21321
|
-
const fromIndex = itemIndex;
|
|
21322
|
-
const item = visible[itemIndex];
|
|
21323
|
-
const targetItem = visible[targetIndex];
|
|
21324
|
-
if (direction === 'up') {
|
|
21325
|
-
body.insertBefore(item, targetItem);
|
|
21326
|
-
}
|
|
21327
|
-
else {
|
|
21328
|
-
const nextVisible = getNextVisibleTableBodyRowAfter(targetItem);
|
|
21329
|
-
if (nextVisible) {
|
|
21330
|
-
body.insertBefore(item, nextVisible);
|
|
21331
|
-
}
|
|
21332
|
-
else {
|
|
21333
|
-
body.appendChild(item);
|
|
21334
|
-
}
|
|
21335
|
-
}
|
|
21336
|
-
const orderedRowIds = this.getVisibleBodyRowsForReorder().map((r) => { var _a; return (_a = Table.getRowIdForRow(r)) !== null && _a !== void 0 ? _a : ''; });
|
|
21337
|
-
const toIndex = orderedRowIds.indexOf(rowId);
|
|
21338
|
-
this.rowOrderChange.emit({
|
|
21339
|
-
rowId,
|
|
21340
|
-
direction,
|
|
21341
|
-
orderedRowIds,
|
|
21342
|
-
fromIndex,
|
|
21343
|
-
toIndex,
|
|
21344
|
-
});
|
|
21345
|
-
this.announceRowReorder(rowId, orderedRowIds);
|
|
21346
|
-
this.clearReorderDragOverClasses();
|
|
21347
|
-
if (this.selectable) {
|
|
21348
|
-
this.applyBodyCheckboxStates();
|
|
21349
|
-
this.applyHeaderCheckboxState();
|
|
21350
|
-
this.syncRowSelectedProps();
|
|
21351
|
-
}
|
|
21352
|
-
this.updateColumnWidths();
|
|
21353
|
-
this.reorderKeyboardTimers.requestAnimationFrame(() => {
|
|
21354
|
-
if (!this.el.isConnected) {
|
|
21355
|
-
return;
|
|
21356
|
-
}
|
|
21357
|
-
const moved = this.getVisibleBodyRowsForReorder().find((r) => Table.getRowIdForRow(r) === rowId);
|
|
21358
|
-
const btn = moved === null || moved === void 0 ? void 0 : moved.querySelector('.xpl-table__row-drag-handle');
|
|
21359
|
-
btn === null || btn === void 0 ? void 0 : btn.focus();
|
|
21360
|
-
});
|
|
21361
|
-
return true;
|
|
21362
|
-
}
|
|
21363
|
-
ensureFooterReorderCells() {
|
|
21364
|
-
const footer = this.getDirectChildTableSection('xpl-table-footer');
|
|
21365
|
-
if (!footer)
|
|
21366
|
-
return;
|
|
21367
|
-
Array.from(footer.children)
|
|
21368
|
-
.filter((c) => c.tagName.toLowerCase() === 'xpl-table-row')
|
|
21369
|
-
.forEach((row) => {
|
|
21370
|
-
if (Array.from(row.children).some((c) => c.tagName.toLowerCase() === 'xpl-table-footer-cell' &&
|
|
21371
|
-
c.hasAttribute(ROW_REORDER_MARK))) {
|
|
21372
|
-
return;
|
|
21373
|
-
}
|
|
21374
|
-
const cell = document.createElement('xpl-table-footer-cell');
|
|
21375
|
-
cell.setAttribute(ROW_REORDER_MARK, '');
|
|
21376
|
-
cell.setAttribute('width', '48');
|
|
21377
|
-
cell.setAttribute('align', 'center');
|
|
21378
|
-
row.insertBefore(cell, row.firstChild);
|
|
21379
|
-
});
|
|
21380
|
-
}
|
|
21381
|
-
static supportsSubgridBodyRow() {
|
|
21382
|
-
return (typeof CSS !== 'undefined' &&
|
|
21383
|
-
typeof CSS.supports === 'function' &&
|
|
21384
|
-
CSS.supports('grid-template-columns', 'subgrid'));
|
|
21385
|
-
}
|
|
21386
|
-
applyReorderRowDraggableState() {
|
|
21387
|
-
const useRowDrag = Table.supportsSubgridBodyRow();
|
|
21388
|
-
this.queryBodyRows().forEach((row) => {
|
|
21389
|
-
const btn = row.querySelector('.xpl-table__row-drag-handle');
|
|
21390
|
-
btn === null || btn === void 0 ? void 0 : btn.removeAttribute('draggable');
|
|
21391
|
-
row.removeAttribute('draggable');
|
|
21392
|
-
if (!this.rowReorderable || row.disabled) {
|
|
21393
|
-
return;
|
|
21394
|
-
}
|
|
21395
|
-
if (!btn) {
|
|
21396
|
-
return;
|
|
21397
|
-
}
|
|
21398
|
-
if (useRowDrag) {
|
|
21399
|
-
row.setAttribute('draggable', 'true');
|
|
21400
|
-
}
|
|
21401
|
-
else {
|
|
21402
|
-
btn.setAttribute('draggable', 'true');
|
|
21403
|
-
}
|
|
21404
|
-
});
|
|
21405
|
-
}
|
|
21406
|
-
getVisibleBodyRowsForReorder() {
|
|
21407
|
-
return this.queryBodyRows().filter((r) => !r.hasAttribute('hidden'));
|
|
21408
|
-
}
|
|
21409
|
-
clearReorderDragOverClasses() {
|
|
21410
|
-
this.queryBodyRows().forEach((r) => r.classList.remove('xpl-table-row--drag-over'));
|
|
21411
|
-
}
|
|
21412
|
-
clearPendingDragListeners() {
|
|
21413
|
-
if (this.pointerUpClearPending) {
|
|
21414
|
-
this.pointerUpClearPending();
|
|
21415
|
-
this.pointerUpClearPending = null;
|
|
21416
|
-
}
|
|
21417
|
-
}
|
|
21418
|
-
announceRowReorder(movedRowId, orderedRowIds) {
|
|
21419
|
-
if (!this.rowReorderable || !movedRowId) {
|
|
21420
|
-
return;
|
|
21421
|
-
}
|
|
21422
|
-
const index = orderedRowIds.indexOf(movedRowId);
|
|
21423
|
-
if (index < 0) {
|
|
21424
|
-
return;
|
|
21425
|
-
}
|
|
21426
|
-
this.reorderLiveMessage = '';
|
|
21427
|
-
if (this.reorderAnnounceRaf !== undefined) {
|
|
21428
|
-
cancelAnimationFrame(this.reorderAnnounceRaf);
|
|
21429
|
-
}
|
|
21430
|
-
this.reorderAnnounceRaf = requestAnimationFrame(() => {
|
|
21431
|
-
this.reorderAnnounceRaf = undefined;
|
|
21432
|
-
if (!this.el.isConnected) {
|
|
21433
|
-
return;
|
|
21434
|
-
}
|
|
21435
|
-
this.reorderLiveMessage = `Row ${movedRowId}, now position ${index + 1} of ${orderedRowIds.length}`;
|
|
21436
|
-
});
|
|
21437
|
-
}
|
|
21438
|
-
pruneStaleSelectedRowIds() {
|
|
21439
|
-
const validIds = new Set(this.queryBodyRows()
|
|
21440
|
-
.map((r) => Table.getRowIdForRow(r))
|
|
21441
|
-
.filter((id) => !!id));
|
|
21442
|
-
const next = this.selectedRowIds.filter((id) => validIds.has(id));
|
|
21443
|
-
if (next.length === this.selectedRowIds.length)
|
|
21444
|
-
return;
|
|
21445
|
-
this.selectedRowIds = next;
|
|
21446
|
-
this.applyBodyCheckboxStates();
|
|
21447
|
-
this.applyHeaderCheckboxState();
|
|
21448
|
-
this.syncRowSelectedProps();
|
|
21449
|
-
this.emitCompositionalSelection();
|
|
21450
|
-
}
|
|
21451
|
-
static getBodyRowCheckboxAriaLabel(row, selectionColIndex) {
|
|
21452
|
-
var _a, _b;
|
|
21453
|
-
const cells = Table.getBodyRowCells(row);
|
|
21454
|
-
const labelCell = cells.find((c, i) => (selectionColIndex === null || i !== selectionColIndex) &&
|
|
21455
|
-
!c.hasAttribute(ROW_REORDER_MARK));
|
|
21456
|
-
const first = labelCell !== null && labelCell !== void 0 ? labelCell : cells[0];
|
|
21457
|
-
if (!first)
|
|
21458
|
-
return 'Select row';
|
|
21459
|
-
const raw = (_b = (_a = first.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, ' ').trim()) !== null && _b !== void 0 ? _b : '';
|
|
21460
|
-
if (!raw)
|
|
21461
|
-
return 'Select row';
|
|
21462
|
-
const truncated = raw.length > 100 ? `${raw.slice(0, 100)}…` : raw;
|
|
21463
|
-
return `Select row, ${truncated}`;
|
|
21464
|
-
}
|
|
21465
|
-
applyBodyCheckboxStates() {
|
|
21466
|
-
const selectionIdx = this.getSelectionColumnIndex();
|
|
21467
|
-
if (selectionIdx === null)
|
|
21468
|
-
return;
|
|
21469
|
-
this.queryBodyRows().forEach((row) => {
|
|
21470
|
-
const rowId = Table.getRowIdForRow(row);
|
|
21471
|
-
const cells = Table.getBodyRowCells(row);
|
|
21472
|
-
const cell = cells[selectionIdx];
|
|
21473
|
-
const cb = cell === null || cell === void 0 ? void 0 : cell.querySelector('xpl-checkbox');
|
|
21474
|
-
if (!cb || !rowId)
|
|
21475
|
-
return;
|
|
21476
|
-
cb.checked = this.selectedRowIds.includes(rowId);
|
|
21477
|
-
cb.disabled = row.disabled;
|
|
21478
|
-
cb.value = rowId;
|
|
21479
|
-
cb.setAttribute('aria-label', Table.getBodyRowCheckboxAriaLabel(row, selectionIdx));
|
|
21480
|
-
});
|
|
21481
|
-
}
|
|
21482
|
-
getHeaderCheckboxCell() {
|
|
21483
|
-
const idx = this.getSelectionColumnIndex();
|
|
21484
|
-
if (idx === null)
|
|
21485
|
-
return null;
|
|
21486
|
-
const cells = this.getCompositionalHeaderCells();
|
|
21487
|
-
const cell = cells[idx];
|
|
21488
|
-
if (!cell || cell.getAttribute('type') !== 'checkbox')
|
|
21489
|
-
return null;
|
|
21490
|
-
return cell;
|
|
21491
|
-
}
|
|
21492
|
-
applyHeaderCheckboxState() {
|
|
21493
|
-
const cell = this.getHeaderCheckboxCell();
|
|
21494
|
-
if (!cell)
|
|
21495
|
-
return;
|
|
21496
|
-
const selectableRows = this.querySelectableBodyRows();
|
|
21497
|
-
const ids = selectableRows
|
|
21498
|
-
.map((r) => Table.getRowIdForRow(r))
|
|
21499
|
-
.filter((id) => !!id);
|
|
21500
|
-
const selectedCount = ids.filter((id) => this.selectedRowIds.includes(id)).length;
|
|
21501
|
-
const allSelected = ids.length > 0 && selectedCount === ids.length;
|
|
21502
|
-
const indeterminate = selectedCount > 0 && !allSelected;
|
|
21503
|
-
cell.checked = allSelected;
|
|
21504
|
-
cell.indeterminate = indeterminate;
|
|
21505
|
-
}
|
|
21506
|
-
syncRowSelectedProps() {
|
|
21507
|
-
this.queryBodyRows().forEach((row) => {
|
|
21508
|
-
const id = Table.getRowIdForRow(row);
|
|
21509
|
-
const selected = id ? this.selectedRowIds.includes(id) : false;
|
|
21510
|
-
row.selected = selected;
|
|
21511
|
-
});
|
|
21512
|
-
}
|
|
21513
|
-
emitCompositionalSelection() {
|
|
21514
|
-
const ids = this.selectedRowIds;
|
|
21515
|
-
const key = ids.join('\u0001');
|
|
21516
|
-
if (key === this.lastEmittedRowSelectionKey) {
|
|
21517
|
-
return;
|
|
21518
|
-
}
|
|
21519
|
-
this.lastEmittedRowSelectionKey = key;
|
|
21520
|
-
this.rowSelectionChange.emit({ selectedRowIds: [...ids] });
|
|
21521
|
-
}
|
|
21522
|
-
isEventFromThisTable(target) {
|
|
21523
|
-
if (target == null || typeof target !== 'object')
|
|
21524
|
-
return false;
|
|
21525
|
-
const t = target;
|
|
21526
|
-
const start = 'closest' in t && typeof t.closest === 'function'
|
|
21527
|
-
? t
|
|
21528
|
-
: 'parentElement' in t
|
|
21529
|
-
? t.parentElement
|
|
21530
|
-
: null;
|
|
21531
|
-
if (!start)
|
|
21532
|
-
return false;
|
|
21533
|
-
const nearest = start.closest('xpl-table');
|
|
21534
|
-
return nearest === this.el;
|
|
21535
|
-
}
|
|
21536
|
-
static sortKeyFromHeaderCell(cell, columnIndex) {
|
|
21537
|
-
var _a, _b;
|
|
21538
|
-
const c = cell;
|
|
21539
|
-
const raw = ((_b = (_a = c.sortKey) !== null && _a !== void 0 ? _a : c.label) !== null && _b !== void 0 ? _b : '').trim();
|
|
21540
|
-
if (raw.length > 0) {
|
|
21541
|
-
return raw.replace(/ /g, '-').toLowerCase();
|
|
21542
|
-
}
|
|
21543
|
-
return `column-${columnIndex}`;
|
|
21544
|
-
}
|
|
21545
|
-
handleCompositionalHeaderSort(ev) {
|
|
21546
|
-
var _a;
|
|
21547
|
-
if (this.isLegacyMode)
|
|
21548
|
-
return;
|
|
21549
|
-
if (!this.isEventFromThisTable(ev.target))
|
|
21550
|
-
return;
|
|
21551
|
-
const source = ev.target;
|
|
21552
|
-
const headerRow = (_a = source.closest('xpl-table-header xpl-table-row')) !== null && _a !== void 0 ? _a : source.closest('xpl-table-row');
|
|
21553
|
-
if (!headerRow || !this.el.contains(headerRow))
|
|
21554
|
-
return;
|
|
21555
|
-
const cells = Array.from(headerRow.querySelectorAll('xpl-table-header-cell'));
|
|
21556
|
-
const { columnIndex } = ev.detail;
|
|
21557
|
-
const target = cells[columnIndex];
|
|
21558
|
-
if (!(target === null || target === void 0 ? void 0 : target.sortable))
|
|
21559
|
-
return;
|
|
21560
|
-
const next = cycleSortDirection(target.sortDirection);
|
|
21561
|
-
cells.forEach((cell, i) => {
|
|
21562
|
-
const hc = cell;
|
|
21563
|
-
if (!hc.sortable)
|
|
21564
|
-
return;
|
|
21565
|
-
hc.sortDirection = i === columnIndex ? next : null;
|
|
21566
|
-
});
|
|
21567
|
-
const sortState = {};
|
|
21568
|
-
cells.forEach((cell, i) => {
|
|
21569
|
-
var _a;
|
|
21570
|
-
const hc = cell;
|
|
21571
|
-
if (!hc.sortable)
|
|
21572
|
-
return;
|
|
21573
|
-
sortState[Table.sortKeyFromHeaderCell(hc, i)] = (_a = hc.sortDirection) !== null && _a !== void 0 ? _a : null;
|
|
21574
|
-
});
|
|
21575
|
-
const sortTypeArr = cells.map((cell) => {
|
|
21576
|
-
var _a;
|
|
21577
|
-
const hc = cell;
|
|
21578
|
-
return hc.sortable ? ((_a = hc.sortDirection) !== null && _a !== void 0 ? _a : null) : null;
|
|
21579
|
-
});
|
|
21580
|
-
const colName = Table.sortKeyFromHeaderCell(cells[columnIndex], columnIndex);
|
|
21581
|
-
const detail = Object.assign(Object.assign({}, sortState), { colNum: columnIndex, colName,
|
|
21582
|
-
sortTypeArr });
|
|
21583
|
-
this.sortChanged.emit(detail);
|
|
21584
|
-
}
|
|
21585
|
-
legacySortStatePayload() {
|
|
21586
|
-
var _a;
|
|
21587
|
-
const out = {};
|
|
21588
|
-
if (!((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length))
|
|
21589
|
-
return out;
|
|
21590
|
-
this.columns.forEach((col, i) => {
|
|
21591
|
-
var _a;
|
|
21592
|
-
const key = col.replace(/ /g, '-').toLowerCase();
|
|
21593
|
-
out[key] = (_a = this.sortTypeArray[i]) !== null && _a !== void 0 ? _a : null;
|
|
21594
|
-
});
|
|
21595
|
-
return out;
|
|
21596
|
-
}
|
|
21597
|
-
legacySortChangedDetail(colNum) {
|
|
21598
|
-
var _a, _b;
|
|
21599
|
-
const base = this.legacySortStatePayload();
|
|
21600
|
-
const title = (_b = (_a = this.columns) === null || _a === void 0 ? void 0 : _a[colNum]) !== null && _b !== void 0 ? _b : '';
|
|
21601
|
-
const colName = title.replace(/ /g, '-').toLowerCase();
|
|
21602
|
-
return Object.assign(Object.assign({}, base), { colNum,
|
|
21603
|
-
colName, sortTypeArr: [...this.sortTypeArray] });
|
|
21604
|
-
}
|
|
21605
|
-
getCompositionalHeaderCells() {
|
|
21606
|
-
var _a;
|
|
21607
|
-
const header = (_a = Array.from(this.el.children).find((c) => c.tagName.toLowerCase() === 'xpl-table-header')) !== null && _a !== void 0 ? _a : null;
|
|
21608
|
-
if (!header)
|
|
21609
|
-
return [];
|
|
21610
|
-
const firstRow = Array.from(header.children).find((c) => c.tagName.toLowerCase() === 'xpl-table-row');
|
|
21611
|
-
const container = firstRow !== null && firstRow !== void 0 ? firstRow : header;
|
|
21612
|
-
return Array.from(container.children).filter((c) => c.tagName.toLowerCase() === 'xpl-table-header-cell');
|
|
21613
|
-
}
|
|
21614
|
-
updateColumnWidths() {
|
|
21615
|
-
const headerCells = this.getCompositionalHeaderCells();
|
|
21616
|
-
const columnWidths = headerCells.map((cell) => getGridColumnWidthFromHeaderCell(cell));
|
|
21617
|
-
const next = columnWidths.join(' ');
|
|
21618
|
-
const n = headerCells.length;
|
|
21619
|
-
if (n === this.colCount && this.colCount > 0 && this.columnWidthsToken === next) {
|
|
21620
|
-
return;
|
|
21621
|
-
}
|
|
21622
|
-
this.el.style.setProperty('--column-widths', next);
|
|
21623
|
-
this.colCount = n;
|
|
21624
|
-
this.columnWidthsToken = next;
|
|
21625
|
-
}
|
|
21626
|
-
handleSort(clickEvt, isColumnSortable, colNum) {
|
|
21627
|
-
clickEvt.preventDefault();
|
|
21628
|
-
clickEvt.stopPropagation();
|
|
21629
|
-
if (!isColumnSortable)
|
|
21630
|
-
return;
|
|
21631
|
-
this.sortTypeArray = this.sortTypeArray.map((val, i) => {
|
|
21632
|
-
if (i !== colNum)
|
|
21633
|
-
return null;
|
|
21634
|
-
switch (val) {
|
|
21635
|
-
case 'asc':
|
|
21636
|
-
return 'desc';
|
|
21637
|
-
case 'desc':
|
|
21638
|
-
return null;
|
|
21639
|
-
default:
|
|
21640
|
-
return 'asc';
|
|
21641
|
-
}
|
|
21642
|
-
});
|
|
21643
|
-
const evt = this.sortChanged.emit(this.legacySortChangedDetail(colNum));
|
|
21644
|
-
if (!evt.defaultPrevented)
|
|
21645
|
-
this.sortBy(colNum, this.sortTypeArray);
|
|
21646
|
-
}
|
|
21647
|
-
renderLegacy() {
|
|
21648
|
-
var _a;
|
|
21649
|
-
if (this.columns &&
|
|
21650
|
-
(!this.sortTypeArray || this.sortTypeArray.length !== this.columns.length)) {
|
|
21651
|
-
this.sortTypeArray = this.columns.map(() => null);
|
|
21652
|
-
}
|
|
21653
|
-
return (h(Host, null, h("div", { class: "xpl-table-container", onScroll: this.onLegacyScroll, ref: (el) => {
|
|
21654
|
-
this.container = el;
|
|
21655
|
-
} }, h("table", { class: {
|
|
21656
|
-
'xpl-table': true,
|
|
21657
|
-
'xpl-table--legacy': true,
|
|
21658
|
-
'xpl-table--striped': this.striped,
|
|
21659
|
-
'xpl-table--freeze': this.freeze,
|
|
21660
|
-
'xpl-table--has-scrolled': this.hasScrolled,
|
|
21661
|
-
} }, this.columns && (h("thead", null, this.columns.map((column, i) => {
|
|
21662
|
-
var _a, _b;
|
|
21663
|
-
const iconType = getIconType((_b = (_a = this.sortTypeArray) === null || _a === void 0 ? void 0 : _a[i]) !== null && _b !== void 0 ? _b : null);
|
|
21664
|
-
const isColumnSortable = !!(this.isSortable && this.sortableColumns[i]);
|
|
21665
|
-
return (h("th", null, h("label", { onClick: (e) => this.handleSort(e, isColumnSortable, i), class: isColumnSortable ? 'cursor-pointer' : '' }, this.multiselect && i === 0 && (h("input", { checked: this.areAllSelected, id: "__xpl-table-th", indeterminate: !this.areAllSelected &&
|
|
21666
|
-
this.selected.some((a) => a), onClick: (e) => {
|
|
21667
|
-
e.stopPropagation();
|
|
21668
|
-
this.selectAll(e);
|
|
21669
|
-
}, type: "checkbox", value: `select-all-${this.selectAllValue}` })), column, isColumnSortable && !!this.sortTypeArray[i] && (h("xpl-icon", { icon: iconType, size: 16 })))));
|
|
21670
|
-
}))), h("tbody", null, this.rowData.map((row, rowNum) => (h("tr", { class: this.selected && this.selected[rowNum]
|
|
21671
|
-
? 'xpl-table-row-selected'
|
|
21672
|
-
: '' }, row.map((cell, i) => (h("td", null, this.multiselect && i === 0 ? (h("label", { htmlFor: `__xpl-table-row-${rowNum}` }, h("input", { id: `__xpl-table-row-${rowNum}`, checked: !!this.selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum), value: this.selectedValues.length > 0
|
|
21673
|
-
? this.selectedValues[rowNum]
|
|
21674
|
-
: `xpl-table-checkbox-${rowNum}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))))))))), ((_a = this.rowFooterData) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("tfoot", null, this.rowFooterData.map((row) => (h("tr", null, row.map((cell) => (h("td", null, h("div", { innerHTML: cell })))))))))))));
|
|
21675
|
-
}
|
|
21676
|
-
renderCompositional() {
|
|
21677
|
-
const selectionToolbarCount = this.selectedRowIds.length;
|
|
21678
|
-
return (h(Host, { role: "grid", "aria-label": this.label, "aria-colcount": this.colCount > 0 ? this.colCount : undefined, class: {
|
|
21679
|
-
'xpl-table': true,
|
|
21680
|
-
'xpl-table--striped': this.striped,
|
|
21681
|
-
'xpl-table--freeze': this.freeze,
|
|
21682
|
-
'xpl-table--has-scrolled': this.hasScrolled,
|
|
21683
|
-
'xpl-table--selectable': !!this.selectable,
|
|
21684
|
-
'xpl-table--selection-active': !!this.selectable && this.selectedRowIds.length > 0,
|
|
21685
|
-
'xpl-table--row-reorderable': !!this.rowReorderable,
|
|
21686
|
-
}, onScroll: this.onGridScroll }, this.rowReorderable && (h("div", { class: "xpl-table__reorder-live", "aria-live": "assertive", "aria-atomic": "true" }, this.reorderLiveMessage)), this.selectable && (h("div", { class: {
|
|
21687
|
-
'xpl-toolbar': true,
|
|
21688
|
-
hidden: selectionToolbarCount === 0,
|
|
21689
|
-
'xpl-table__toolbar': true,
|
|
21690
|
-
} }, h("div", { class: "toolbar" }, h("p", { class: "selected-item-count" }, selectionToolbarCount, " Selected"), h("div", { class: "actions" }, h("slot", { name: "toolbar-actions-left" }), h("slot", { name: "toolbar-actions-right" }))))), h("slot", null)));
|
|
21691
|
-
}
|
|
21692
|
-
render() {
|
|
21693
|
-
return this.isLegacyMode ? this.renderLegacy() : this.renderCompositional();
|
|
20539
|
+
return (h(Host, { key: '10b0bfd08e28fada9a2c8509d405c5314cce1689' }, h("div", { key: '8e5b4fe928618b175a58f858f6cfd65f4bd29c53', class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => {
|
|
20540
|
+
this.container = el;
|
|
20541
|
+
} }, h("table", { key: 'a6df646737b9a1d5e67cebe9eaad41911ab606ca', class: {
|
|
20542
|
+
'xpl-table': true,
|
|
20543
|
+
'xpl-table--striped': this.striped,
|
|
20544
|
+
'xpl-table--freeze': this.freeze,
|
|
20545
|
+
'xpl-table--has-scrolled': this.hasScrolled,
|
|
20546
|
+
} }, this.columns && (h("thead", { key: '5f14766107d69f26b865f63c323d417f43260267' }, this.columns.map((column, i) => {
|
|
20547
|
+
var _a;
|
|
20548
|
+
const iconType = getIconType((_a = this.sortTypeArray) === null || _a === void 0 ? void 0 : _a[i]);
|
|
20549
|
+
const isColumnSortable = !!(this.isSortable && this.sortableColumns[i]);
|
|
20550
|
+
return (h("th", null, h("label", { onClick: (e) => this.handleSort(e, isColumnSortable, i, column.replace(/ /g, '-').toLowerCase()), class: isColumnSortable ? 'cursor-pointer' : '' }, this.multiselect && i === 0 && (h("input", { checked: this.areAllSelected, id: "__xpl-table-th", indeterminate: !this.areAllSelected &&
|
|
20551
|
+
this.selected.some((a) => a), onClick: (e) => {
|
|
20552
|
+
e.stopPropagation();
|
|
20553
|
+
this.selectAll(e);
|
|
20554
|
+
}, type: "checkbox", value: `select-all-${this.selectAllValue}` })), column, isColumnSortable && !!this.sortTypeArray[i] && (h("xpl-icon", { icon: iconType, size: 16 })))));
|
|
20555
|
+
}))), h("tbody", { key: 'b13ca1d1a738de189d4f040dfd309187671b341d' }, this.rowData.map((row, rowNum) => (h("tr", { class: this.selected && this.selected[rowNum]
|
|
20556
|
+
? 'xpl-table-row-selected'
|
|
20557
|
+
: '' }, row.map((cell, i) => (h("td", null, this.multiselect && i === 0 ? (h("label", { htmlFor: `__xpl-table-row-${rowNum}` }, h("input", { id: `__xpl-table-row-${rowNum}`, checked: !!this.selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum), value: this.selectedValues.length > 0
|
|
20558
|
+
? this.selectedValues[rowNum]
|
|
20559
|
+
: `xpl-table-checkbox-${rowNum}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))))))))), ((_a = this.rowFooterData) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("tfoot", { key: '5d45854ba21aa7e0bfaaf3b8a537e0c121538ac9' }, this.rowFooterData.map((row) => (h("tr", null, row.map((cell) => (h("td", null, h("div", { innerHTML: cell })))))))))))));
|
|
21694
20560
|
}
|
|
21695
20561
|
get el() { return getElement(this); }
|
|
21696
20562
|
static get watchers() { return {
|
|
21697
|
-
"columns": [{
|
|
21698
|
-
"watchColumns": 0
|
|
21699
|
-
}],
|
|
21700
20563
|
"data": [{
|
|
21701
20564
|
"watchData": 0
|
|
21702
20565
|
}],
|
|
21703
20566
|
"footer": [{
|
|
21704
20567
|
"watchFooterData": 0
|
|
21705
20568
|
}],
|
|
21706
|
-
"
|
|
21707
|
-
"
|
|
21708
|
-
}],
|
|
21709
|
-
"reorderHandleIconKeyboard": [{
|
|
21710
|
-
"watchReorderHandleIconKeyboard": 0
|
|
21711
|
-
}],
|
|
21712
|
-
"rowReorderable": [{
|
|
21713
|
-
"watchRowReorderable": 0
|
|
21714
|
-
}],
|
|
21715
|
-
"selectable": [{
|
|
21716
|
-
"watchSelectable": 0
|
|
21717
|
-
}]
|
|
21718
|
-
}; }
|
|
21719
|
-
};
|
|
21720
|
-
|
|
21721
|
-
const XplTableBody = class {
|
|
21722
|
-
constructor(hostRef) {
|
|
21723
|
-
registerInstance(this, hostRef);
|
|
21724
|
-
}
|
|
21725
|
-
render() {
|
|
21726
|
-
return (h(Host, { key: '7320d9e105bbd49c3ce38b8c199b965a3863440c', role: "rowgroup", class: "xpl-table-body" }, h("slot", { key: '3df8f5a49bca0c8b50126cb41e59e1209e57fc6b' })));
|
|
21727
|
-
}
|
|
21728
|
-
};
|
|
21729
|
-
|
|
21730
|
-
function isDisablableControl(el) {
|
|
21731
|
-
switch (el.tagName) {
|
|
21732
|
-
case 'BUTTON':
|
|
21733
|
-
case 'INPUT':
|
|
21734
|
-
case 'SELECT':
|
|
21735
|
-
case 'TEXTAREA':
|
|
21736
|
-
case 'FIELDSET':
|
|
21737
|
-
case 'OPTGROUP':
|
|
21738
|
-
case 'OPTION':
|
|
21739
|
-
return true;
|
|
21740
|
-
default:
|
|
21741
|
-
return false;
|
|
21742
|
-
}
|
|
21743
|
-
}
|
|
21744
|
-
const XplTableCell = class {
|
|
21745
|
-
constructor(hostRef) {
|
|
21746
|
-
registerInstance(this, hostRef);
|
|
21747
|
-
this.align = 'left';
|
|
21748
|
-
this.bold = false;
|
|
21749
|
-
this.disabled = false;
|
|
21750
|
-
this.underline = false;
|
|
21751
|
-
}
|
|
21752
|
-
onDisabledChange() {
|
|
21753
|
-
this.propagateDisabledToSlotted();
|
|
21754
|
-
}
|
|
21755
|
-
componentDidLoad() {
|
|
21756
|
-
this.propagateDisabledToSlotted();
|
|
21757
|
-
}
|
|
21758
|
-
propagateDisabledToSlotted() {
|
|
21759
|
-
const setControlDisabled = (element) => {
|
|
21760
|
-
if (!isDisablableControl(element)) {
|
|
21761
|
-
return;
|
|
21762
|
-
}
|
|
21763
|
-
const control = element;
|
|
21764
|
-
control.disabled = this.disabled;
|
|
21765
|
-
if (this.disabled) {
|
|
21766
|
-
control.setAttribute('disabled', '');
|
|
21767
|
-
}
|
|
21768
|
-
else {
|
|
21769
|
-
control.removeAttribute('disabled');
|
|
21770
|
-
}
|
|
21771
|
-
};
|
|
21772
|
-
const walk = (parent) => {
|
|
21773
|
-
Array.from(parent.children).forEach((child) => {
|
|
21774
|
-
if (child.tagName === 'XPL-TABLE') {
|
|
21775
|
-
return;
|
|
21776
|
-
}
|
|
21777
|
-
setControlDisabled(child);
|
|
21778
|
-
walk(child);
|
|
21779
|
-
});
|
|
21780
|
-
};
|
|
21781
|
-
walk(this.el);
|
|
21782
|
-
}
|
|
21783
|
-
render() {
|
|
21784
|
-
return (h(Host, { key: '91700fc89eff07fc5c54474c12e3a02eb602c6c3', role: "gridcell", class: {
|
|
21785
|
-
'xpl-table-cell': true,
|
|
21786
|
-
[`xpl-table-cell--align-${this.align}`]: true,
|
|
21787
|
-
'xpl-table-cell--bold': this.bold,
|
|
21788
|
-
'xpl-table-cell--underline': this.underline,
|
|
21789
|
-
'xpl-table-cell--disabled': this.disabled,
|
|
21790
|
-
} }, h("slot", { key: '5e956de9f694db16d9f5ea89bda1ff05a15e9efa' })));
|
|
21791
|
-
}
|
|
21792
|
-
get el() { return getElement(this); }
|
|
21793
|
-
static get watchers() { return {
|
|
21794
|
-
"disabled": [{
|
|
21795
|
-
"onDisabledChange": 0
|
|
21796
|
-
}]
|
|
21797
|
-
}; }
|
|
21798
|
-
};
|
|
21799
|
-
|
|
21800
|
-
const XplTableFooter = class {
|
|
21801
|
-
constructor(hostRef) {
|
|
21802
|
-
registerInstance(this, hostRef);
|
|
21803
|
-
}
|
|
21804
|
-
render() {
|
|
21805
|
-
return (h(Host, { key: '891052963f727f283783138363c9a925cb59140b', role: "rowgroup", class: "xpl-table-footer" }, h("slot", { key: 'df01f64a46ecd29380df26e053c2a6c246a22556' })));
|
|
21806
|
-
}
|
|
21807
|
-
};
|
|
21808
|
-
|
|
21809
|
-
const XplTableFooterCell = class {
|
|
21810
|
-
constructor(hostRef) {
|
|
21811
|
-
registerInstance(this, hostRef);
|
|
21812
|
-
this.align = 'left';
|
|
21813
|
-
}
|
|
21814
|
-
render() {
|
|
21815
|
-
return (h(Host, { key: '452cb6ac0333ca57329341404343c290c63fc508', role: "gridcell", class: {
|
|
21816
|
-
'xpl-table-footer-cell': true,
|
|
21817
|
-
[`xpl-table-footer-cell--align-${this.align}`]: true,
|
|
21818
|
-
} }, h("slot", { key: 'db6d5848f2aa009437317b9e71a47f0ca9245161' })));
|
|
21819
|
-
}
|
|
21820
|
-
};
|
|
21821
|
-
|
|
21822
|
-
const TableHeader = class {
|
|
21823
|
-
constructor(hostRef) {
|
|
21824
|
-
registerInstance(this, hostRef);
|
|
21825
|
-
}
|
|
21826
|
-
render() {
|
|
21827
|
-
return (h(Host, { key: '70eac99819cc3acbbfb54607fc657fb27bd26b4b', role: "rowgroup", class: "xpl-table-header" }, h("slot", { key: '9c46b25d247603f8c87a3994615bd45c617d9bb9' })));
|
|
21828
|
-
}
|
|
21829
|
-
};
|
|
21830
|
-
|
|
21831
|
-
const TableHeaderCell = class {
|
|
21832
|
-
constructor(hostRef) {
|
|
21833
|
-
registerInstance(this, hostRef);
|
|
21834
|
-
this.headerCheckboxChange = createEvent(this, "headerCheckboxChange", 7);
|
|
21835
|
-
this.headerSortChange = createEvent(this, "headerSortChange", 7);
|
|
21836
|
-
this.align = 'left';
|
|
21837
|
-
this.checked = false;
|
|
21838
|
-
this.indeterminate = false;
|
|
21839
|
-
this.label = '';
|
|
21840
|
-
this.sortable = false;
|
|
21841
|
-
this.type = 'label';
|
|
21842
|
-
this.onHeaderInnerCheckboxChange = (ev) => {
|
|
21843
|
-
const { detail } = ev;
|
|
21844
|
-
const checked = typeof detail === 'boolean' ? detail : Boolean(detail);
|
|
21845
|
-
this.headerCheckboxChange.emit(checked);
|
|
21846
|
-
};
|
|
21847
|
-
this.onSortActivate = (event) => {
|
|
21848
|
-
event.preventDefault();
|
|
21849
|
-
event.stopPropagation();
|
|
21850
|
-
if (!this.sortable || this.type !== 'label')
|
|
21851
|
-
return;
|
|
21852
|
-
const columnIndex = this.getColumnIndex0();
|
|
21853
|
-
const sortKey = this.getSortKeySlug();
|
|
21854
|
-
if (!this.el.closest('xpl-table')) {
|
|
21855
|
-
this.sortDirection = cycleSortDirection(this.sortDirection);
|
|
21856
|
-
}
|
|
21857
|
-
this.headerSortChange.emit({
|
|
21858
|
-
columnIndex,
|
|
21859
|
-
sortKey,
|
|
21860
|
-
});
|
|
21861
|
-
};
|
|
21862
|
-
}
|
|
21863
|
-
watchColumnWidth() {
|
|
21864
|
-
this.notifyColumnWidthsChange();
|
|
21865
|
-
}
|
|
21866
|
-
watchWidth() {
|
|
21867
|
-
this.notifyColumnWidthsChange();
|
|
21868
|
-
}
|
|
21869
|
-
componentDidLoad() {
|
|
21870
|
-
this.notifyColumnWidthsChange();
|
|
21871
|
-
}
|
|
21872
|
-
notifyColumnWidthsChange() {
|
|
21873
|
-
this.el.dispatchEvent(new CustomEvent(XPL_TABLE_COLUMN_WIDTHS_CHANGE_EVENT, {
|
|
21874
|
-
bubbles: true,
|
|
21875
|
-
composed: true,
|
|
21876
|
-
}));
|
|
21877
|
-
}
|
|
21878
|
-
getColumnIndex0() {
|
|
21879
|
-
var _a, _b;
|
|
21880
|
-
return Array.from((_b = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []).indexOf(this.el);
|
|
21881
|
-
}
|
|
21882
|
-
getSortKeySlug() {
|
|
21883
|
-
var _a, _b;
|
|
21884
|
-
const raw = ((_b = (_a = this.sortKey) !== null && _a !== void 0 ? _a : this.label) !== null && _b !== void 0 ? _b : '').trim();
|
|
21885
|
-
if (raw.length > 0) {
|
|
21886
|
-
return raw.replace(/ /g, '-').toLowerCase();
|
|
21887
|
-
}
|
|
21888
|
-
return `column-${this.getColumnIndex0()}`;
|
|
21889
|
-
}
|
|
21890
|
-
renderLabelContent() {
|
|
21891
|
-
if (this.sortable) {
|
|
21892
|
-
const iconName = getSortAffordanceIconName(this.sortDirection);
|
|
21893
|
-
const sortActive = this.sortDirection === 'asc' || this.sortDirection === 'desc';
|
|
21894
|
-
return (h("button", { type: "button", class: "xpl-table-header-cell__sort", onClick: this.onSortActivate }, h("span", { class: "xpl-table-header-cell__text" }, h("slot", null, this.label)), h("xpl-icon", { class: {
|
|
21895
|
-
'xpl-table-header-cell__sort-icon': true,
|
|
21896
|
-
'xpl-table-header-cell__sort-icon--active': sortActive,
|
|
21897
|
-
'xpl-table-header-cell__sort-icon--default': !sortActive,
|
|
21898
|
-
}, icon: iconName, size: 16 })));
|
|
21899
|
-
}
|
|
21900
|
-
return (h("span", { class: "xpl-table-header-cell__text" }, h("slot", null, this.label)));
|
|
21901
|
-
}
|
|
21902
|
-
render() {
|
|
21903
|
-
const colIndex = this.getColumnIndex0() + 1;
|
|
21904
|
-
const renderContent = () => {
|
|
21905
|
-
var _a;
|
|
21906
|
-
switch (this.type) {
|
|
21907
|
-
case 'label':
|
|
21908
|
-
return this.renderLabelContent();
|
|
21909
|
-
case 'checkbox':
|
|
21910
|
-
return (h("xpl-checkbox", { ariaLabel: (_a = this.checkboxAriaLabel) !== null && _a !== void 0 ? _a : 'Select all rows', checked: this.checked, indeterminate: this.indeterminate, onCheckboxChange: this.onHeaderInnerCheckboxChange }));
|
|
21911
|
-
case 'icon':
|
|
21912
|
-
return h("xpl-icon", { icon: this.icon, size: 20 });
|
|
21913
|
-
case 'empty':
|
|
21914
|
-
return null;
|
|
21915
|
-
default:
|
|
21916
|
-
return '';
|
|
21917
|
-
}
|
|
21918
|
-
};
|
|
21919
|
-
const effectiveAlign = (this.type === 'checkbox' || this.type === 'icon') && this.align === 'left'
|
|
21920
|
-
? 'center'
|
|
21921
|
-
: this.align;
|
|
21922
|
-
const alignClass = `xpl-table-header-cell--align-${effectiveAlign}`;
|
|
21923
|
-
const ariaSort = this.type === 'label' && this.sortable
|
|
21924
|
-
? this.sortDirection === 'asc'
|
|
21925
|
-
? 'ascending'
|
|
21926
|
-
: this.sortDirection === 'desc'
|
|
21927
|
-
? 'descending'
|
|
21928
|
-
: 'none'
|
|
21929
|
-
: undefined;
|
|
21930
|
-
return (h(Host, { role: "columnheader", "aria-colindex": colIndex, class: {
|
|
21931
|
-
'xpl-table-header-cell': true,
|
|
21932
|
-
[alignClass]: true,
|
|
21933
|
-
'xpl-table-header-cell--checkbox': this.type === 'checkbox',
|
|
21934
|
-
'xpl-table-header-cell--icon': this.type === 'icon',
|
|
21935
|
-
'xpl-table-header-cell--empty': this.type === 'empty',
|
|
21936
|
-
'xpl-table-header-cell--sortable': this.sortable && this.type === 'label',
|
|
21937
|
-
}, "aria-checked": this.type === 'checkbox'
|
|
21938
|
-
? this.indeterminate
|
|
21939
|
-
? 'mixed'
|
|
21940
|
-
: this.checked
|
|
21941
|
-
? 'true'
|
|
21942
|
-
: 'false'
|
|
21943
|
-
: undefined, "aria-sort": ariaSort }, this.type === 'empty' ? null : renderContent()));
|
|
21944
|
-
}
|
|
21945
|
-
get el() { return getElement(this); }
|
|
21946
|
-
static get watchers() { return {
|
|
21947
|
-
"columnWidth": [{
|
|
21948
|
-
"watchColumnWidth": 0
|
|
21949
|
-
}],
|
|
21950
|
-
"width": [{
|
|
21951
|
-
"watchWidth": 0
|
|
21952
|
-
}]
|
|
21953
|
-
}; }
|
|
21954
|
-
};
|
|
21955
|
-
|
|
21956
|
-
function isTableCell(node) {
|
|
21957
|
-
return node.nodeName === 'XPL-TABLE-CELL';
|
|
21958
|
-
}
|
|
21959
|
-
const XplTableRow = class {
|
|
21960
|
-
constructor(hostRef) {
|
|
21961
|
-
registerInstance(this, hostRef);
|
|
21962
|
-
this.disabled = false;
|
|
21963
|
-
this.selected = false;
|
|
21964
|
-
}
|
|
21965
|
-
onDisabledChange() {
|
|
21966
|
-
this.propagateDisabledToCells();
|
|
21967
|
-
}
|
|
21968
|
-
connectedCallback() {
|
|
21969
|
-
if (typeof MutationObserver === 'undefined')
|
|
21970
|
-
return;
|
|
21971
|
-
this.cellObserver = new MutationObserver((mutations) => {
|
|
21972
|
-
mutations.forEach((mutation) => {
|
|
21973
|
-
if (mutation.type !== 'childList')
|
|
21974
|
-
return;
|
|
21975
|
-
mutation.addedNodes.forEach((node) => {
|
|
21976
|
-
if (isTableCell(node)) {
|
|
21977
|
-
node.disabled = this.disabled;
|
|
21978
|
-
}
|
|
21979
|
-
});
|
|
21980
|
-
});
|
|
21981
|
-
});
|
|
21982
|
-
this.cellObserver.observe(this.el, { childList: true });
|
|
21983
|
-
}
|
|
21984
|
-
disconnectedCallback() {
|
|
21985
|
-
var _a;
|
|
21986
|
-
(_a = this.cellObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
21987
|
-
this.cellObserver = undefined;
|
|
21988
|
-
}
|
|
21989
|
-
componentDidLoad() {
|
|
21990
|
-
this.propagateDisabledToCells();
|
|
21991
|
-
}
|
|
21992
|
-
propagateDisabledToCells() {
|
|
21993
|
-
const cells = Array.from(this.el.children).filter(isTableCell);
|
|
21994
|
-
cells.forEach((cell) => {
|
|
21995
|
-
cell.disabled = this.disabled;
|
|
21996
|
-
});
|
|
21997
|
-
}
|
|
21998
|
-
render() {
|
|
21999
|
-
return (h(Host, { key: '4abcdcd80a317aec5d2a131d9e8d0331f434e989', role: "row", class: {
|
|
22000
|
-
'xpl-table-row': true,
|
|
22001
|
-
'xpl-table-row--disabled': this.disabled,
|
|
22002
|
-
'xpl-table-row--selected': this.selected,
|
|
22003
|
-
} }, h("slot", { key: 'b2530a240b2e4c7eb4fb4a7691a86242eb9aee16' })));
|
|
22004
|
-
}
|
|
22005
|
-
get el() { return getElement(this); }
|
|
22006
|
-
static get watchers() { return {
|
|
22007
|
-
"disabled": [{
|
|
22008
|
-
"onDisabledChange": 0
|
|
20569
|
+
"columns": [{
|
|
20570
|
+
"watchColumns": 0
|
|
22009
20571
|
}]
|
|
22010
20572
|
}; }
|
|
22011
20573
|
};
|
|
@@ -22330,11 +20892,11 @@ const Tabs = class {
|
|
|
22330
20892
|
}
|
|
22331
20893
|
render() {
|
|
22332
20894
|
const isSegment = this.type === 'segment';
|
|
22333
|
-
return (h(Host, { key: '
|
|
20895
|
+
return (h(Host, { key: '9998ae067e13e7c08338ae29bfe05bc3adacaa87', class: {
|
|
22334
20896
|
'xpl-tabs': true,
|
|
22335
20897
|
'xpl-tabs--full-width': this.fullWidth,
|
|
22336
20898
|
'xpl-tabs--segment': isSegment,
|
|
22337
|
-
}, "data-choices-tick": this.choicesTick }, h("xpl-select", { key: '
|
|
20899
|
+
}, "data-choices-tick": this.choicesTick }, h("xpl-select", { key: '18209c354e77267a13ce0c7380df0e419595cca7', classNames: this.mobileSelectClassNames(), choices: this.renderChoices(), disabled: this.disabled, selectedValues: this.selectedValue, onDropdownStateChange: (event) => {
|
|
22338
20900
|
if (event.detail) {
|
|
22339
20901
|
this.isMobileSelectChange = true;
|
|
22340
20902
|
}
|
|
@@ -22345,17 +20907,17 @@ const Tabs = class {
|
|
|
22345
20907
|
this.tabChange.emit(selectedValue);
|
|
22346
20908
|
this.isMobileSelectChange = false;
|
|
22347
20909
|
}
|
|
22348
|
-
} }), h("nav", { key: '
|
|
20910
|
+
} }), h("nav", { key: 'cf1bf2ec95fbbe7f0a6b8774cc5ce26928c7d6ca', "aria-orientation": "horizontal", class: "xpl-tabs__headings", role: "tablist", ref: (el) => {
|
|
22349
20911
|
this.headingsContainerRef = el;
|
|
22350
20912
|
}, onTabChange: (event) => {
|
|
22351
20913
|
event.stopPropagation();
|
|
22352
20914
|
this.isMobileSelectChange = false;
|
|
22353
20915
|
this.handleTabChange(event.detail);
|
|
22354
20916
|
this.tabChange.emit(event.detail);
|
|
22355
|
-
} }, !isSegment && (h("div", { key: '
|
|
20917
|
+
} }, !isSegment && (h("div", { key: '5bfd13566a17723ec166a934bc72e59307eacb8c', class: "xpl-tabs__active-bar", style: {
|
|
22356
20918
|
transform: `translateX(${this.activeBarPosition.left}px)`,
|
|
22357
20919
|
width: `${this.activeBarPosition.width}px`,
|
|
22358
|
-
} })), h("slot", { key: '
|
|
20920
|
+
} })), h("slot", { key: '52baf508a46759fe908f8721b3089d3db0189383', name: "heading" })), h("div", { key: '363fe87f244eace0dc0af0903e0b8c25da3a613f', class: "xpl-tabs__panels" }, h("slot", { key: 'f3872844f486cf831bca26a228eba88fa18b42c3', name: "panel" }))));
|
|
22359
20921
|
}
|
|
22360
20922
|
get el() { return getElement(this); }
|
|
22361
20923
|
static get watchers() { return {
|
|
@@ -22501,7 +21063,7 @@ const Tag = class {
|
|
|
22501
21063
|
}
|
|
22502
21064
|
render() {
|
|
22503
21065
|
const dragEnabled = this.isDraggable && !this.disabled;
|
|
22504
|
-
return (h(Host, { key: '
|
|
21066
|
+
return (h(Host, { key: '7e85098bb9f5e8c0fceee3e7947337e0799c4de8', class: {
|
|
22505
21067
|
'xpl-tag': true,
|
|
22506
21068
|
'xpl-tag-container': true,
|
|
22507
21069
|
'xpl-tag--disabled': this.disabled,
|
|
@@ -22509,7 +21071,7 @@ const Tag = class {
|
|
|
22509
21071
|
'xpl-tag--dragging': this.isDragging,
|
|
22510
21072
|
'xpl-tag--draggable': dragEnabled,
|
|
22511
21073
|
'xpl-tag--sm': this.size === 'sm',
|
|
22512
|
-
}, onDragOver: dragEnabled ? this.handleDragOver : undefined, onDragEnter: dragEnabled ? this.handleDragEnter : undefined, onDragStart: this.isDraggable ? this.handleHostDragStart : undefined }, dragEnabled ? (h("div", { class: "xpl-tag__content xpl-tag", role: "button", tabIndex: 0, draggable: true, "aria-grabbed": String(this.isDragging), onClick: this.handleTagClick, onKeyDown: this.handleContentKeyDown, onDragStart: this.handleDragStart, onDragEnd: this.handleDragEnd }, h("slot", null))) : (h("button", { class: "xpl-tag__content xpl-tag", type: "button", disabled: this.disabled, onClick: this.handleTagClick }, h("slot", null))), this.dismissible && (h("button", { key: '
|
|
21074
|
+
}, onDragOver: dragEnabled ? this.handleDragOver : undefined, onDragEnter: dragEnabled ? this.handleDragEnter : undefined, onDragStart: this.isDraggable ? this.handleHostDragStart : undefined }, dragEnabled ? (h("div", { class: "xpl-tag__content xpl-tag", role: "button", tabIndex: 0, draggable: true, "aria-grabbed": String(this.isDragging), onClick: this.handleTagClick, onKeyDown: this.handleContentKeyDown, onDragStart: this.handleDragStart, onDragEnd: this.handleDragEnd }, h("slot", null))) : (h("button", { class: "xpl-tag__content xpl-tag", type: "button", disabled: this.disabled, onClick: this.handleTagClick }, h("slot", null))), this.dismissible && (h("button", { key: 'cb875506819a0a58d42add85a1a09e95e4786eba', class: "xpl-tag__dismiss xpl-tag__close", type: "button", draggable: false, disabled: this.disabled, "aria-label": `Dismiss ${this.dismissAriaLabelSuffix}`, onClick: this.handleDismissClick }, h("xpl-icon", { key: '431f061a4c96dacb9dc76a753c9d2de01491b2be', icon: "xmark", size: 10 })))));
|
|
22513
21075
|
}
|
|
22514
21076
|
get el() { return getElement(this); }
|
|
22515
21077
|
static get watchers() { return {
|
|
@@ -22559,9 +21121,9 @@ const Toast = class {
|
|
|
22559
21121
|
}
|
|
22560
21122
|
render() {
|
|
22561
21123
|
var _a;
|
|
22562
|
-
return (h(Host, { key: '
|
|
21124
|
+
return (h(Host, { key: '4f470ceb525c35a86ddbf65365fac1674ebe7033', class: `xpl-toast xpl-toast--${this.variant}`, onAnimationEnd: this.handleAnimationEnd }, h("div", { key: '04da6ca2777ceb222da2f4fd831d8aef5101a667', class: "xpl-toast__left" }, this.showIcon && (h("div", { key: '0e5e75aa05e96361700c0c7b9eccbc4c5b75a00c', class: `xpl-toast__icon xpl-toast__icon--${this.variant}` }, this.getIcon())), h("div", { key: 'f1ccc651318b6d7128255918bdd68ef36a249e9f', class: "xpl-toast__notification" }, h("p", { key: '1ae879d8a670a0f1a4928bfa2a0692581040dca1', class: "xpl-toast__title" }, h("slot", { key: 'b819a773c11b88cb00f8638db8a960de55ce6508', name: "title" })), this.caption !== '' && (h("p", { key: '8f6eb8dd769e4aaf5b16b3caafd9e9ec5408a7e1', class: "xpl-toast__caption" }, (_a = this.caption) === null || _a === void 0 ? void 0 : _a.substring(0, 85))))), h("div", { key: '46ae2f04fa38b50d2a07082b6972590f6bd28005', class: "xpl-toast__action", ref: (el) => {
|
|
22563
21125
|
this.actionSlot = el;
|
|
22564
|
-
} }, h("slot", { key: '
|
|
21126
|
+
} }, h("slot", { key: '69512a9b482bb54252527d798dfa2884a19b7d8c', name: "action" })), this.dismissable && (h("div", { key: '818a5f9dde1a9c9b7ab3cd62cd807200e3687af6', class: "xpl-toast__close" }, h("button", { key: '3a617189f8f031e119a125efce0ab35a7f5cf31f', tabIndex: 0, onClick: this.dismiss }, h("xpl-icon", { key: 'd86187aed0665da278f953be5ab92f7051f44438', icon: "x" }))))));
|
|
22565
21127
|
}
|
|
22566
21128
|
get el() { return getElement(this); }
|
|
22567
21129
|
};
|
|
@@ -22575,7 +21137,7 @@ const Tooltip = class {
|
|
|
22575
21137
|
this.hideArrow = false;
|
|
22576
21138
|
}
|
|
22577
21139
|
render() {
|
|
22578
|
-
return (h(Host, { key: '
|
|
21140
|
+
return (h(Host, { key: 'a118d629923a433680360f746e063ca94d5f1c6a' }, h("div", { key: 'cfd9742ee2cebd56994480bd2a601cb4e93b12a9', class: "xpl-tooltip-container" }, h("slot", { key: '8aae99e1a187f8f737e896ccfd00d67f1cfeb3b3' }), h("div", { key: '4b418074b2ac7f8760f09e3af033ea93f7a0012e', class: `xpl-tooltip xpl-tooltip--${this.position}` }, this.text), !this.hideArrow && (h("div", { key: 'ef6a166f78250f1f98eae41661fd7020b36eeaae', class: "xpl-tooltip-arrow" }, h(TooltipArrow, { key: '7baecae00ab178f715c89443d250b068861afe5f' }))))));
|
|
22579
21141
|
}
|
|
22580
21142
|
};
|
|
22581
21143
|
|
|
@@ -22819,7 +21381,7 @@ const TopNav = class {
|
|
|
22819
21381
|
}
|
|
22820
21382
|
render() {
|
|
22821
21383
|
var _a, _b, _c, _d;
|
|
22822
|
-
return (h(Host, { key: '
|
|
21384
|
+
return (h(Host, { key: '9f65d609c6b4cf08b2899216fe8bc70fe0e12db9', class: {
|
|
22823
21385
|
'xpl-top-nav': true,
|
|
22824
21386
|
'xpl-top-nav--nav-control': Boolean(this.navControl),
|
|
22825
21387
|
'xpl-top-nav--open': this.open,
|
|
@@ -22827,15 +21389,15 @@ const TopNav = class {
|
|
|
22827
21389
|
'xpl-top-nav--has-brand': this.hasBrand,
|
|
22828
21390
|
'xpl-top-nav--has-user-menu': this.hasUserMenu,
|
|
22829
21391
|
dark: true,
|
|
22830
|
-
} }, h("nav", { key: '
|
|
21392
|
+
} }, h("nav", { key: 'a3d613acbe13866886bca363372127e8e869ec2c', "aria-label": (_a = this.label) !== null && _a !== void 0 ? _a : 'top-navigation-bar', class: "xpl-top-nav__bar" }, h("div", { key: 'b7057ef80f36e98def53bbfc2a39bd30bacd9b4c', class: "xpl-top-nav__inner-left" }, this.navControl && (h("button", { key: '3c4091842c7e4c1a62fea5446f6e29486617b11a', type: "button", class: "xpl-top-nav__nav-control", "aria-expanded": this.open ? 'true' : 'false', "aria-label": this.open ? 'Close navigation menu' : 'Open navigation menu', onClick: this.onNavToggle }, h("xpl-icon", { key: 'cd5fd2cd1cf1dae5c765b63678e14cb87588c3b2', class: "xpl-top-nav__control-icon", icon: "menu", size: 20 }))), this.hasBrand && (h("div", { key: '3cabfe3ce8ff58d9aed0ed9b4adccd896f6cad08', class: "xpl-top-nav__brand-bar" }, h("xpl-top-nav-item", { key: 'bca3924f36affd16b6c17d0d8cc1ccc57c488ef6', class: "xpl-top-nav__brand", href: this.brandHref, onNavItemClick: this.onBrandNavItemClick }, ((_b = this.brandLogo) === null || _b === void 0 ? void 0 : _b.trim()) ? (h("img", { class: "xpl-top-nav__brand-logo", src: this.brandLogo, alt: ((_c = this.brandName) === null || _c === void 0 ? void 0 : _c.trim())
|
|
22831
21393
|
? this.brandName.trim()
|
|
22832
|
-
: 'Brand' })) : this.brandLogoSlotPresent ? (h("span", { class: "xpl-top-nav__brand-logo-slot" }, h("slot", { name: "brand-logo" }))) : null, ((_d = this.brandName) === null || _d === void 0 ? void 0 : _d.trim()) ? (h("span", { class: "xpl-top-nav__brand-name" }, this.brandName.trim())) : null))), h("div", { key: '
|
|
21394
|
+
: 'Brand' })) : this.brandLogoSlotPresent ? (h("span", { class: "xpl-top-nav__brand-logo-slot" }, h("slot", { name: "brand-logo" }))) : null, ((_d = this.brandName) === null || _d === void 0 ? void 0 : _d.trim()) ? (h("span", { class: "xpl-top-nav__brand-name" }, this.brandName.trim())) : null))), h("div", { key: '1e9a1af5fbeca22c0f440556c121c38b8528d9ba', class: {
|
|
22833
21395
|
'xpl-top-nav__aside': true,
|
|
22834
21396
|
'xpl-nav-left': true,
|
|
22835
|
-
} }, h("div", { key: '
|
|
21397
|
+
} }, h("div", { key: 'b5d67e1adf5bc6a751be3d8bfa448bdb682039bc', class: "xpl-top-nav__left-primary", role: "list" }, h("slot", { key: 'c738eb6fbda41c8320fa2645fb88f43ef11731b6', name: "left-aside" })))), h("div", { key: '8573832a3922746b2301f9bc8b4fa6ab7e1ac441', class: {
|
|
22836
21398
|
'xpl-top-nav__aside': true,
|
|
22837
21399
|
'xpl-nav-right': true,
|
|
22838
|
-
} }, h("div", { key: '
|
|
21400
|
+
} }, h("div", { key: 'a21b318496a47000cde7a0346d3376999e7893ea', class: "xpl-nav-right__list" }, h("div", { key: '5934e7d3976b13abba77b4361b4fe1c6f49bcc2e', class: "xpl-top-nav__right-rail" }, h("div", { key: '49b44ea3d59eec32d6859978754e81ce6acc1bec', class: "xpl-top-nav__right-lead" }, h("slot", { key: '054671b75354700b873a85f08998a14d7fc7073b', name: "right-aside" })), this.hasUserMenu ? (h("div", { class: "xpl-top-nav__right-user" }, h("xpl-popover", { class: "xpl-top-nav__user-popover dark", position: "bottom-end", display: "menu" }, this.userMenuTriggerSlotPresent ? (h("slot", { name: "user-menu-trigger", slot: "trigger" })) : this.usesBuiltInChildAccountTrigger ? (h("xpl-button", { slot: "trigger", class: "xpl-top-nav__child-account-trigger", type: "button", variant: "tertiary", icon: "chevron-down", iconPosition: "end", iconOnly: this.childAccountLabelText.length === 0, "aria-haspopup": "dialog", "aria-label": this.childAccountLabelText.length > 0
|
|
22839
21401
|
? undefined
|
|
22840
21402
|
: 'Open account menu' }, this.childAccountLabelText.length > 0
|
|
22841
21403
|
? this.childAccountLabelText
|
|
@@ -23153,14 +21715,14 @@ const TopNavItem = class {
|
|
|
23153
21715
|
return (h("div", Object.assign({}, shared, { role: "button" }), this.icon && h("xpl-icon", { size: 16, icon: this.icon }), this.label ? (h("span", { class: "xpl-top-nav-item__label", title: this.label }, this.label)) : (h("slot", null)), this.hasDropdown && h("xpl-icon", { icon: "chevron-down" })));
|
|
23154
21716
|
}
|
|
23155
21717
|
render() {
|
|
23156
|
-
return (h(Host, Object.assign({ key: '
|
|
21718
|
+
return (h(Host, Object.assign({ key: '4758b54726318591f140bcfea8d4db22c70c96ff', class: {
|
|
23157
21719
|
'xpl-top-nav-item': true,
|
|
23158
21720
|
'xpl-top-nav-item--active': this.active,
|
|
23159
21721
|
'xpl-top-nav-item--dropdown-open': this.open,
|
|
23160
21722
|
'xpl-top-nav-item--has-dropdown': this.hasDropdown,
|
|
23161
21723
|
'xpl-top-nav-item--selected': this.selected,
|
|
23162
21724
|
dark: true,
|
|
23163
|
-
} }, (this.hostListitemRole ? { role: 'listitem' } : {})), this.renderInner(), this.hasDropdown && (h("div", { key: '
|
|
21725
|
+
} }, (this.hostListitemRole ? { role: 'listitem' } : {})), this.renderInner(), this.hasDropdown && (h("div", { key: '65f53889e4815fb974d7abe12d13dd8be19c1943', class: "xpl-top-nav-item__dropdown" }, h("slot", { key: '2f4f164deaec561be73a13e2303cc13e037699bb', name: "dropdown" })))));
|
|
23164
21726
|
}
|
|
23165
21727
|
get el() { return getElement(this); }
|
|
23166
21728
|
static get watchers() { return {
|
|
@@ -23184,8 +21746,8 @@ const UtilityBar = class {
|
|
|
23184
21746
|
this.open = this.isNavOpenAtStartup !== undefined ? this.isNavOpenAtStartup : this.open;
|
|
23185
21747
|
}
|
|
23186
21748
|
render() {
|
|
23187
|
-
return (h(Host, { key: '
|
|
21749
|
+
return (h(Host, { key: '2af96247c611b67255b7f285dfb2b8b1dada47cc' }, h("nav", { key: '135186097dd0d8f308a1a08b5fbf4a5537c10f25', "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { class: "xpl-utility-bar__nav-control", onClick: () => this.onNavToggle() }, h("xpl-icon", { class: "xpl-utility-nav__bars", icon: "three-bars" })), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { key: '3346444f9813b20d8c4ed13b5a0784205dcfbbb1', name: "main" }))));
|
|
23188
21750
|
}
|
|
23189
21751
|
};
|
|
23190
21752
|
|
|
23191
|
-
export { Avatar as xpl_avatar, Backdrop as xpl_backdrop, Badge as xpl_badge, Banner as xpl_banner, BreadcrumbItem as xpl_breadcrumb_item, Breadcrumbs as xpl_breadcrumbs, Button as xpl_button, Checkbox as xpl_checkbox, Choicelist as xpl_choicelist, ContentArea as xpl_content_area, Dashboard as xpl_dashboard, DataCard as xpl_data_card, Divider as xpl_divider, Dropdown as xpl_dropdown, DropdownGroup as xpl_dropdown_group, DropdownHeading as xpl_dropdown_heading, DropdownOptionCpnt as xpl_dropdown_option, HeaderAccordion as xpl_header_accordion, Icon as xpl_icon, Input as xpl_input, InputColor as xpl_input_color, InputDate as xpl_input_date, InputFile as xpl_input_file, InputPhone as xpl_input_phone, InputSearch as xpl_input_search, InputTime as xpl_input_time, List as xpl_list, XplListItem as xpl_list_item, Modal as xpl_modal, NavHeaderMenu as xpl_nav_header_menu, NavItem as xpl_nav_item, Pagination as xpl_pagination, XplPanel as xpl_panel, Popover as xpl_popover, ProgressBar as xpl_progress_bar, ProgressIndicator as xpl_progress_indicator, Radio as xpl_radio, SecondaryNav as xpl_secondary_nav, Select as xpl_select, SideNav as xpl_side_nav, SideNavItem as xpl_side_nav_item, Skeleton as xpl_skeleton, Slideout as xpl_slideout, Spotlight as xpl_spotlight, Tab as xpl_tab, TabPanel as xpl_tab_panel, Table as xpl_table,
|
|
21753
|
+
export { Avatar as xpl_avatar, Backdrop as xpl_backdrop, Badge as xpl_badge, Banner as xpl_banner, BreadcrumbItem as xpl_breadcrumb_item, Breadcrumbs as xpl_breadcrumbs, Button as xpl_button, Checkbox as xpl_checkbox, Choicelist as xpl_choicelist, ContentArea as xpl_content_area, Dashboard as xpl_dashboard, DataCard as xpl_data_card, Divider as xpl_divider, Dropdown as xpl_dropdown, DropdownGroup as xpl_dropdown_group, DropdownHeading as xpl_dropdown_heading, DropdownOptionCpnt as xpl_dropdown_option, HeaderAccordion as xpl_header_accordion, Icon as xpl_icon, Input as xpl_input, InputColor as xpl_input_color, InputDate as xpl_input_date, InputFile as xpl_input_file, InputPhone as xpl_input_phone, InputSearch as xpl_input_search, InputTime as xpl_input_time, List as xpl_list, XplListItem as xpl_list_item, Modal as xpl_modal, NavHeaderMenu as xpl_nav_header_menu, NavItem as xpl_nav_item, Pagination as xpl_pagination, XplPanel as xpl_panel, Popover as xpl_popover, ProgressBar as xpl_progress_bar, ProgressIndicator as xpl_progress_indicator, Radio as xpl_radio, SecondaryNav as xpl_secondary_nav, Select as xpl_select, SideNav as xpl_side_nav, SideNavItem as xpl_side_nav_item, Skeleton as xpl_skeleton, Slideout as xpl_slideout, Spotlight as xpl_spotlight, Tab as xpl_tab, TabPanel as xpl_tab_panel, Table as xpl_table, Tabs as xpl_tabs, Tag as xpl_tag, Toast as xpl_toast, Tooltip as xpl_tooltip, TopNav as xpl_top_nav, TopNavItem as xpl_top_nav_item, UtilityBar as xpl_utility_bar };
|