@orangelogic/design-system 2.138.0 → 2.140.0
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/library/chunks/{asset-link-format.Cj3Jb2A9.js → asset-link-format.CoMUMoyK.js} +546 -491
- package/library/chunks/{button.C8bgBiYj.js → button.J4LDuhyW.js} +1 -1
- package/library/chunks/{color-swatch-group.CtRKXJDT.js → color-swatch-group.DedQQk4J.js} +203 -166
- package/library/chunks/{color-swatch.BPKlNXIX.js → color-swatch.DimFgBSf.js} +1 -1
- package/library/chunks/{confirm-popover.CgXY2_uO.js → confirm-popover.DV5q0KyE.js} +3 -3
- package/library/chunks/{dialog.Bs7RQgSa.js → dialog.C79Kd2S4.js} +2 -2
- package/library/chunks/{document-viewer.Bs3U0_wd.js → document-viewer.NA5cS7qW.js} +3912 -3812
- package/library/chunks/{dot-pagination.t0VzNnjC.js → dot-pagination.CoG0XmAq.js} +1 -1
- package/library/chunks/{file-on-demand.BWrBwTOn.js → file-on-demand.C3ib6J00.js} +9 -9
- package/library/chunks/focus-when-visible.jWSw9ks0.js +21 -0
- package/library/chunks/{folder-select.CItC06TB.js → folder-select.BQXuKb-8.js} +4 -4
- package/library/chunks/{header.D_TqvPdB.js → header.zCbb-t6m.js} +1 -1
- package/library/chunks/{i18n.BlLEIqQ0.js → i18n.DeUAP8n2.js} +1 -0
- package/library/chunks/{icon-button.D5sM02Cd.js → icon-button.LhIEmHNF.js} +1 -1
- package/library/chunks/{iframe.D3PpeqXx.js → iframe.c0IPEUiJ.js} +1 -1
- package/library/chunks/{image.qP6cTWCN.js → image.u2nQNoZ8.js} +1 -1
- package/library/chunks/{input.B8CV80Da.js → input.DID1aXiO.js} +1 -1
- package/library/chunks/{option.D9SqVdjL.js → option.n6PDuSs1.js} +1 -1
- package/library/chunks/{pagination.DAI32_PA.js → pagination.BNU2UmTy.js} +5 -5
- package/library/chunks/{tab-group.e83Yy-jY.js → tab-group.5O3lqvyG.js} +3 -3
- package/library/chunks/{tree.D7eyb405.js → tree.CbwFiRJI.js} +1 -1
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +3 -3
- package/library/components/atoms.js +13 -13
- package/library/components/audio.js +23 -20
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +4 -4
- package/library/components/color-swatch-group.js +3 -3
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +33 -32
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +10 -10
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +202 -150
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +3 -3
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +3 -3
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +4 -4
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +16830 -16924
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/audio/audio.d.ts +5 -0
- package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -1
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
- package/library/packages/atoms/src/components/menu-item/submenu-controller.d.ts +28 -0
- package/library/packages/hybrid/book-reader/src/react/constant.d.ts +1 -0
- package/library/packages/hybrid/book-reader/src/react/hooks/useDrawer.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/table/components/table-toolbar/table-toolbar.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +16 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Validate/Validate.d.ts +10 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +9 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +0 -4
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-quality/asset-link-format-quality.d.ts +0 -4
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +0 -4
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +5 -2
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +8 -0
- package/library/packages/types/src/table.d.ts +8 -0
- package/library/packages/utils/src/custom-element/focus-when-visible.d.ts +14 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/packages/utils/src/index.d.ts +1 -0
- package/library/react-web-component.d.ts +7 -3
- package/library/utils.js +133 -131
- package/package.json +1 -1
- package/library/packages/organisms/src/_v1/comment-v1/extensions/time.d.ts +0 -63
- /package/library/packages/organisms/src/{annotator-comment → comment}/extensions/time.d.ts +0 -0
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import si from "../components/space.js";
|
|
2
|
-
import { C as hr, T as
|
|
2
|
+
import { C as hr, T as Vr } from "./typography.DJC_UXgs.js";
|
|
3
3
|
import { n as g, C as tt } from "./lib-cortex-element.CVMmyPMC.js";
|
|
4
|
-
import { C as cr, a as _i } from "./color-swatch.
|
|
4
|
+
import { C as cr, a as _i } from "./color-swatch.DimFgBSf.js";
|
|
5
5
|
import { c as ht } from "./component.styles.CRO4Odto.js";
|
|
6
6
|
import { c as it } from "./custom-element.L4WJXn1j.js";
|
|
7
|
-
import { i as Z, x as S, E as pt, B as
|
|
8
|
-
import { C as Rt } from "./button.
|
|
7
|
+
import { i as Z, x as S, E as pt, B as Ir } from "./lit-element.jLBm65_O.js";
|
|
8
|
+
import { C as Rt } from "./button.J4LDuhyW.js";
|
|
9
9
|
import { C as oi } from "./icon.DnBh6-56.js";
|
|
10
10
|
import ri from "../components/tooltip.js";
|
|
11
|
-
import { r as
|
|
11
|
+
import { r as Br } from "./choose.BTbF6BAn.js";
|
|
12
12
|
import { o as Q } from "./if-defined.BRoBj_Rp.js";
|
|
13
13
|
import { c as je } from "./repeat.CFjcER6_.js";
|
|
14
14
|
import { o as Ze } from "./style-map.llVFPd__.js";
|
|
15
15
|
import Bt from "../components/dropdown.js";
|
|
16
16
|
import ni from "../components/menu.js";
|
|
17
17
|
import ai from "../components/menu-item.js";
|
|
18
|
-
import
|
|
19
|
-
import { g as
|
|
20
|
-
import { L as zt } from "./i18n.
|
|
18
|
+
import Wr from "../components/menu-section.js";
|
|
19
|
+
import { g as $r, t as jr, a as Gr, b as Ur } from "./toast.Bz-j7zP2.js";
|
|
20
|
+
import { L as zt } from "./i18n.DeUAP8n2.js";
|
|
21
21
|
import { w as K } from "./watch.CThbualB.js";
|
|
22
22
|
import { r as ce } from "./state.CSDxrqLd.js";
|
|
23
|
-
import { n as
|
|
24
|
-
import { C as dr, a as
|
|
25
|
-
import { C as Is } from "./icon-button.
|
|
26
|
-
import { C as
|
|
27
|
-
import { C as
|
|
28
|
-
import { H as
|
|
23
|
+
import { n as X } from "./when.Dr1es41R.js";
|
|
24
|
+
import { C as dr, a as Kr } from "./checkbox.Cjcht4xR.js";
|
|
25
|
+
import { C as Is } from "./icon-button.LhIEmHNF.js";
|
|
26
|
+
import { C as qr } from "./input.DID1aXiO.js";
|
|
27
|
+
import { C as Xr, P as Jr } from "./pagination.BNU2UmTy.js";
|
|
28
|
+
import { H as ur } from "./slot.j5oheLJC.js";
|
|
29
29
|
import { e as ct } from "./query.BBf1UFkC.js";
|
|
30
30
|
import { e as at } from "./class-map.BiVq-cVR.js";
|
|
31
31
|
import { g as V, a as wo } from "./dom.acWb8KCK.js";
|
|
32
32
|
import "./browser.BHOCIF_A.js";
|
|
33
33
|
import "./form.K1XOtu3S.js";
|
|
34
34
|
import "./purify.es.BIuh5IAZ.js";
|
|
35
|
-
import { D as
|
|
35
|
+
import { D as pr, a as Yr } from "./date-picker.DTUICGb9.js";
|
|
36
36
|
import { D as ci } from "./content-builder.BGzxZUgi.js";
|
|
37
37
|
import "./unsafe-html.Dff7-rCx.js";
|
|
38
38
|
import { s as A, b as Ti, c as Bs } from "./string.CjJ09HK3.js";
|
|
@@ -41,7 +41,7 @@ import { d as Zr } from "./debounce.C_J-9zJi.js";
|
|
|
41
41
|
import en from "../components/divider.js";
|
|
42
42
|
import tn from "../components/format-number.js";
|
|
43
43
|
import sn from "../components/select.js";
|
|
44
|
-
import
|
|
44
|
+
import fr from "../components/spinner.js";
|
|
45
45
|
import on from "../components/badge.js";
|
|
46
46
|
import rn from "../components/details.js";
|
|
47
47
|
import nn from "../components/tag.js";
|
|
@@ -54,7 +54,7 @@ var ki = /* @__PURE__ */ ((n) => (n.BottomCenter = "bottom-center", n.BottomEnd
|
|
|
54
54
|
const $i = 36;
|
|
55
55
|
var qt = /* @__PURE__ */ ((n) => (n.IsoDate = "iso-date", n.IsoDateTime = "iso-datetime", n.Timestamp = "timestamp", n))(qt || {});
|
|
56
56
|
const dn = Z`:host{align-items:center;width:100%;display:flex}:host([pagination-placement=bottom-start]){justify-content:flex-start}:host([pagination-placement=bottom-center]){justify-content:center}:host([pagination-placement=bottom-end]){justify-content:flex-end}`;
|
|
57
|
-
var un = Object.defineProperty, pn = Object.getOwnPropertyDescriptor,
|
|
57
|
+
var un = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, gr = (n, e, t, i) => {
|
|
58
58
|
for (var s = i > 1 ? void 0 : i ? pn(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
59
59
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
60
60
|
return i && s && un(e, t, s), s;
|
|
@@ -68,10 +68,10 @@ let ti = class extends tt {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
ti.styles = [ht, dn];
|
|
71
|
-
|
|
71
|
+
gr([
|
|
72
72
|
g({ attribute: "pagination-placement", reflect: !0, type: String })
|
|
73
73
|
], ti.prototype, "paginationPlacement", 2);
|
|
74
|
-
ti =
|
|
74
|
+
ti = gr([
|
|
75
75
|
it("cx-table-footer")
|
|
76
76
|
], ti);
|
|
77
77
|
const fn = Z`.table-row-actions__button::part(label),.table-row-actions__dropdown__trigger::part(label){padding:0 var(--cx-spacing-x-small)}.table-row-actions__menu-item::part(checked-icon){display:none}`;
|
|
@@ -88,7 +88,7 @@ let et = class extends tt {
|
|
|
88
88
|
return this;
|
|
89
89
|
}
|
|
90
90
|
handleActionChange() {
|
|
91
|
-
this.groupedDropdownItems =
|
|
91
|
+
this.groupedDropdownItems = $r(
|
|
92
92
|
this.action?.options?.dropdownItems ?? [],
|
|
93
93
|
"section"
|
|
94
94
|
), this.sections = Object.keys(this.groupedDropdownItems);
|
|
@@ -107,7 +107,7 @@ let et = class extends tt {
|
|
|
107
107
|
return je(
|
|
108
108
|
n,
|
|
109
109
|
(e) => e.name,
|
|
110
|
-
(e) => S`<cx-menu-item class="table-row-actions__menu-item" data-action=${e.name} style=${Ze(e.style ?? {})} @click=${this.handleActionClick}>${
|
|
110
|
+
(e) => S`<cx-menu-item class="table-row-actions__menu-item" data-action=${e.name} style=${Ze(e.style ?? {})} @click=${this.handleActionClick}>${X(
|
|
111
111
|
e.prefixIcon,
|
|
112
112
|
() => S`<cx-icon name=${e.prefixIcon} slot="prefix"></cx-icon>`
|
|
113
113
|
)}
|
|
@@ -138,7 +138,7 @@ et.dependencies = {
|
|
|
138
138
|
"cx-icon": oi,
|
|
139
139
|
"cx-menu": ni,
|
|
140
140
|
"cx-menu-item": ai,
|
|
141
|
-
"cx-menu-section":
|
|
141
|
+
"cx-menu-section": Wr,
|
|
142
142
|
"cx-tooltip": ri
|
|
143
143
|
};
|
|
144
144
|
Ot([
|
|
@@ -197,7 +197,7 @@ let Et = class extends tt {
|
|
|
197
197
|
return S`<cx-space spacing="2x-small">${je(
|
|
198
198
|
this.actions,
|
|
199
199
|
(n) => n.name,
|
|
200
|
-
(n) =>
|
|
200
|
+
(n) => Br(n.type ?? "button", [
|
|
201
201
|
[
|
|
202
202
|
"button",
|
|
203
203
|
() => this.renderButton(n)
|
|
@@ -362,11 +362,11 @@ let xt = class extends tt {
|
|
|
362
362
|
}
|
|
363
363
|
render() {
|
|
364
364
|
const n = this.groupByOptionIdSet.has(this.groupByValue) ? this.groupByValue : null;
|
|
365
|
-
return S`<cx-dropdown hoist class="header-actions__group-by"><cx-button slot="trigger" caret ?outline=${!(n !== null)}>${this.localize.term("groupBy")}</cx-button><cx-menu @cx-select=${this.handleMenuSelect}>${
|
|
365
|
+
return S`<cx-dropdown hoist class="header-actions__group-by"><cx-button slot="trigger" caret ?outline=${!(n !== null)}>${this.localize.term("groupBy")}</cx-button><cx-menu @cx-select=${this.handleMenuSelect}>${X(
|
|
366
366
|
!this.groupByOptions.length,
|
|
367
367
|
() => S`<cx-menu-item disabled=disabled>${this.localize.term("noDataAvailable")}</cx-menu-item>`
|
|
368
368
|
)}
|
|
369
|
-
${
|
|
369
|
+
${X(
|
|
370
370
|
this.groupByOptions.length,
|
|
371
371
|
() => this.renderOffOption(n)
|
|
372
372
|
)}
|
|
@@ -454,7 +454,7 @@ let Oe = class extends tt {
|
|
|
454
454
|
t && this.emit("cx-table-save-search-select", { detail: { id: t } });
|
|
455
455
|
}
|
|
456
456
|
render() {
|
|
457
|
-
return S`<cx-dropdown hoist class="header-actions__saved-search"><cx-button slot="trigger" caret>${this.localize.term("savedSearches")}</cx-button><cx-menu @cx-select=${this.handleSavedSearchItemSelect}>${
|
|
457
|
+
return S`<cx-dropdown hoist class="header-actions__saved-search"><cx-button slot="trigger" caret>${this.localize.term("savedSearches")}</cx-button><cx-menu @cx-select=${this.handleSavedSearchItemSelect}>${X(
|
|
458
458
|
this.savedSearchItems.length === 0 && !this.loading,
|
|
459
459
|
() => S`<cx-menu-item disabled=disabled>${this.localize.term("noSavedSearch")}</cx-menu-item>`
|
|
460
460
|
)}
|
|
@@ -463,7 +463,7 @@ let Oe = class extends tt {
|
|
|
463
463
|
(n) => n.recordID,
|
|
464
464
|
(n) => S`<cx-menu-item data-id=${n.recordID}><cx-icon name="search" slot="prefix"></cx-icon>${n.name}</cx-menu-item>`
|
|
465
465
|
)}
|
|
466
|
-
${
|
|
466
|
+
${X(
|
|
467
467
|
this.hasMore,
|
|
468
468
|
() => S`<cx-button class="header-actions__saved-search__load-more" variant="text" @click=${this.handleLoadMore} ?loading=${this.loading}>${this.localize.term("more")}</cx-button>`
|
|
469
469
|
)}</cx-menu></cx-dropdown>`;
|
|
@@ -515,7 +515,7 @@ var Tn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, te = (n, e
|
|
|
515
515
|
};
|
|
516
516
|
let q = class extends tt {
|
|
517
517
|
constructor() {
|
|
518
|
-
super(...arguments), this.localize = new zt(this), this.hasSlotController = new
|
|
518
|
+
super(...arguments), this.localize = new zt(this), this.hasSlotController = new ur(
|
|
519
519
|
this,
|
|
520
520
|
"label",
|
|
521
521
|
"pagination"
|
|
@@ -562,7 +562,7 @@ let q = class extends tt {
|
|
|
562
562
|
return S`<form class="search" id="search-form" @submit=${this.handleSearchSubmit}><cx-input class="search__input" placeholder=${this.localize.term("typeYourSearchHere")} value=${this.searchValue} clearable @cx-clear=${this.handleClearSearch}><cx-icon-button class=${at({
|
|
563
563
|
search__icon: !0,
|
|
564
564
|
"search__icon--search": !0
|
|
565
|
-
})} name="search" slot="prefix" size="small"></cx-icon-button>${
|
|
565
|
+
})} name="search" slot="prefix" size="small"></cx-icon-button>${X(
|
|
566
566
|
!this.noAdvancedSearch,
|
|
567
567
|
() => S`<cx-tooltip slot="suffix" hoist content=${this.localize.term("advancedSearch")}><cx-icon-button class=${at({
|
|
568
568
|
search__icon: !0,
|
|
@@ -580,23 +580,23 @@ let q = class extends tt {
|
|
|
580
580
|
return S`<cx-table-group-by-dropdown .groupByOptions=${this.groupByOptions} group-by-value=${this.groupByValue}></cx-table-group-by-dropdown>`;
|
|
581
581
|
}
|
|
582
582
|
renderExportDropdown() {
|
|
583
|
-
return S`<cx-dropdown hoist placement="bottom-end" distance="4" class="header-actions__dropdown"><cx-icon-button name="more_horiz" slot="trigger" outline></cx-icon-button><cx-menu>${
|
|
583
|
+
return S`<cx-dropdown hoist placement="bottom-end" distance="4" class="header-actions__dropdown"><cx-icon-button name="more_horiz" slot="trigger" outline></cx-icon-button><cx-menu>${X(
|
|
584
584
|
this.canExportCsv,
|
|
585
585
|
() => S`<cx-menu-item @click=${this.handleExportCsv}>${this.localize.term("exportAsCsv")}</cx-menu-item>`
|
|
586
586
|
)}
|
|
587
|
-
${
|
|
587
|
+
${X(
|
|
588
588
|
this.canExportXml,
|
|
589
589
|
() => S`<cx-menu-item @click=${this.handleExportXml}>${this.localize.term("exportAsXml")}</cx-menu-item>`
|
|
590
590
|
)}
|
|
591
|
-
${
|
|
591
|
+
${X(
|
|
592
592
|
this.canExportPdf,
|
|
593
593
|
() => S`<cx-menu-item @click=${this.handleExportPdf}>${this.localize.term("exportAsPdf")}</cx-menu-item>`
|
|
594
594
|
)}
|
|
595
|
-
${
|
|
595
|
+
${X(
|
|
596
596
|
this.canExportCustom,
|
|
597
597
|
() => S`<cx-menu-item @click=${this.handleExportCustom}>${this.localize.term("customExport")}</cx-menu-item>`
|
|
598
598
|
)}
|
|
599
|
-
${
|
|
599
|
+
${X(
|
|
600
600
|
this.canSaveReport,
|
|
601
601
|
() => S`<cx-menu-item data-testid="save-report-menu-item" @click=${this.handleSaveReport}>${this.localize.term("saveReport")}</cx-menu-item>`
|
|
602
602
|
)}</cx-menu></cx-dropdown>`;
|
|
@@ -614,33 +614,32 @@ let q = class extends tt {
|
|
|
614
614
|
header: !0,
|
|
615
615
|
"header--has-label": n,
|
|
616
616
|
"header--has-pagination": e
|
|
617
|
-
})}><div class="header__label"><slot name="label">${
|
|
617
|
+
})}><div class="header__label"><slot name="label">${X(
|
|
618
618
|
this.label,
|
|
619
619
|
() => S`<cx-typography variant="h3">${this.label}</cx-typography>`
|
|
620
620
|
)}</slot></div><div class="header__pagination"><slot name="pagination"></slot></div></div>`;
|
|
621
621
|
}
|
|
622
622
|
render() {
|
|
623
623
|
const n = this.canExportCsv || this.canExportXml || this.canExportPdf || this.canExportCustom || this.canSaveReport;
|
|
624
|
-
return S`<cx-space class="container" direction="vertical">${this.renderPagination()}<cx-space class="header-actions" justify-content="space-between" align-items="center"><cx-space class="header-actions__left" align-items="center" spacing="x-small">${
|
|
625
|
-
${
|
|
624
|
+
return S`<cx-space class="container" direction="vertical">${this.renderPagination()}<cx-space class="header-actions" justify-content="space-between" align-items="center"><cx-space class="header-actions__left" align-items="center" spacing="x-small">${X(this.selectAllState !== null, () => this.renderSelectAll())}
|
|
625
|
+
${X(
|
|
626
626
|
this.selectAllState !== null && this.selectAllState.count > 0,
|
|
627
627
|
() => S`<slot name="select-all-actions"></slot>`,
|
|
628
628
|
() => S`
|
|
629
|
-
${
|
|
630
|
-
${
|
|
629
|
+
${X(this.canSearch, () => this.renderSearch())}
|
|
630
|
+
${X(
|
|
631
631
|
this.dropdownFilters.length,
|
|
632
632
|
() => this.renderDropdownFilters()
|
|
633
633
|
)}
|
|
634
|
-
${
|
|
634
|
+
${X(
|
|
635
635
|
this.showSavedSearch,
|
|
636
636
|
() => this.renderSavedSearchDropdown()
|
|
637
637
|
)}<slot name="dialog-dynamic-filter"></slot>`
|
|
638
|
-
)}</cx-space><cx-space class="header-actions__right" align-items="center" spacing="x-small">${
|
|
639
|
-
${J(
|
|
638
|
+
)}</cx-space><cx-space class="header-actions__right" align-items="center" spacing="x-small"><slot name="add-action">${X(this.canAdd, () => this.renderAddButton())}</slot>${X(
|
|
640
639
|
this.groupByOptions.length,
|
|
641
640
|
() => this.renderGroupByDropdown()
|
|
642
641
|
)}
|
|
643
|
-
${
|
|
642
|
+
${X(n, () => this.renderExportDropdown())}</cx-space></cx-space></cx-space>`;
|
|
644
643
|
}
|
|
645
644
|
};
|
|
646
645
|
q.styles = [ht, Sn];
|
|
@@ -650,10 +649,10 @@ q.dependencies = {
|
|
|
650
649
|
"cx-dropdown": Bt,
|
|
651
650
|
"cx-icon": oi,
|
|
652
651
|
"cx-icon-button": Is,
|
|
653
|
-
"cx-input":
|
|
652
|
+
"cx-input": qr,
|
|
654
653
|
"cx-menu": ni,
|
|
655
654
|
"cx-menu-item": ai,
|
|
656
|
-
"cx-pagination":
|
|
655
|
+
"cx-pagination": Xr,
|
|
657
656
|
"cx-space": si,
|
|
658
657
|
"cx-table-dropdown-filter": lt,
|
|
659
658
|
"cx-table-group-by-dropdown": xt,
|
|
@@ -917,7 +916,7 @@ class U {
|
|
|
917
916
|
}
|
|
918
917
|
}
|
|
919
918
|
const Co = process.env.NODE_ENV === "development";
|
|
920
|
-
let Mn = class
|
|
919
|
+
let Mn = class mr extends Ce {
|
|
921
920
|
constructor(e, t, i = null) {
|
|
922
921
|
super(e), this.reversedX = !1, this.childPopup = null, this.blurable = !1, this.blurCallback = null, this.blurEventsBound = !1, this.renderedCallback = null, this.visible = !1, this.hideable = !0, this.destroyed = !1, this.element = t, this.container = this._lookupContainer(), this.parent = i, this.element.classList.add("tabulator-popup-container"), this.blurEvent = this.hide.bind(this, !1), this.escEvent = this._escapeCheck.bind(this), this.destroyBinding = this.tableDestroyed.bind(this);
|
|
923
922
|
}
|
|
@@ -1040,7 +1039,7 @@ let Mn = class gr extends Ce {
|
|
|
1040
1039
|
), this.unsubscribe("cell-editing", this.blurEvent), this.blurEventsBound = !1), this.childPopup && this.childPopup.hide(), this.parent && (this.parent.childPopup = null), this.element.parentNode && this.element.parentNode.removeChild(this.element), this.visible = !1, this.blurCallback && !e && this.blurCallback(), this.unsubscribe("table-destroy", this.destroyBinding)), this;
|
|
1041
1040
|
}
|
|
1042
1041
|
child(e) {
|
|
1043
|
-
return this.childPopup && this.childPopup.hide(), this.childPopup = new
|
|
1042
|
+
return this.childPopup && this.childPopup.hide(), this.childPopup = new mr(this.table, e, this), this.childPopup;
|
|
1044
1043
|
}
|
|
1045
1044
|
};
|
|
1046
1045
|
const Dn = process.env.NODE_ENV === "development";
|
|
@@ -1412,7 +1411,7 @@ let Ki = Nt;
|
|
|
1412
1411
|
const Pn = {
|
|
1413
1412
|
method: "GET"
|
|
1414
1413
|
};
|
|
1415
|
-
function
|
|
1414
|
+
function br(n) {
|
|
1416
1415
|
return n instanceof File || n instanceof Blob;
|
|
1417
1416
|
}
|
|
1418
1417
|
function qi(n, e = "") {
|
|
@@ -1426,7 +1425,7 @@ function qi(n, e = "") {
|
|
|
1426
1425
|
)
|
|
1427
1426
|
);
|
|
1428
1427
|
});
|
|
1429
|
-
else if (
|
|
1428
|
+
else if (br(n))
|
|
1430
1429
|
t.push({ key: e, value: n });
|
|
1431
1430
|
else if (typeof n == "object" && n !== null)
|
|
1432
1431
|
for (const i in n)
|
|
@@ -1447,7 +1446,7 @@ const Hn = {
|
|
|
1447
1446
|
return i.forEach((o) => {
|
|
1448
1447
|
s.append(
|
|
1449
1448
|
o.key,
|
|
1450
|
-
|
|
1449
|
+
br(o.value) ? o.value : String(o.value)
|
|
1451
1450
|
);
|
|
1452
1451
|
}), s;
|
|
1453
1452
|
},
|
|
@@ -1493,7 +1492,7 @@ function Nn(n) {
|
|
|
1493
1492
|
);
|
|
1494
1493
|
}), t.join("&");
|
|
1495
1494
|
}
|
|
1496
|
-
const
|
|
1495
|
+
const wr = function(n, e, t) {
|
|
1497
1496
|
if (n && t && Object.keys(t).length && (!e.method || e.method.toLowerCase() === "get")) {
|
|
1498
1497
|
e.method = "get";
|
|
1499
1498
|
const [i, s] = n.split("#", 2), o = Nn(t);
|
|
@@ -1557,7 +1556,7 @@ const br = function(n, e, t) {
|
|
|
1557
1556
|
)), s)) : Promise.reject();
|
|
1558
1557
|
}
|
|
1559
1558
|
};
|
|
1560
|
-
$e.moduleName = "ajax", $e.defaultConfig = Pn, $e.defaultURLGenerator =
|
|
1559
|
+
$e.moduleName = "ajax", $e.defaultConfig = Pn, $e.defaultURLGenerator = wr, $e.contentTypeFormatters = Hn, $e.defaultLoaderPromise = function(e, t, i) {
|
|
1561
1560
|
let s;
|
|
1562
1561
|
return new Promise((o, r) => {
|
|
1563
1562
|
if (!this.urlGenerator) {
|
|
@@ -1609,7 +1608,7 @@ function Ws(n) {
|
|
|
1609
1608
|
}), t = t.parent;
|
|
1610
1609
|
return e;
|
|
1611
1610
|
}
|
|
1612
|
-
function
|
|
1611
|
+
function vr(n) {
|
|
1613
1612
|
return JSON.stringify(n);
|
|
1614
1613
|
}
|
|
1615
1614
|
function Vn(n, e) {
|
|
@@ -1619,11 +1618,11 @@ function In(n) {
|
|
|
1619
1618
|
const e = Ws(n);
|
|
1620
1619
|
return {
|
|
1621
1620
|
path: e,
|
|
1622
|
-
pathKey:
|
|
1621
|
+
pathKey: vr(e),
|
|
1623
1622
|
rowCount: n.getRowCount()
|
|
1624
1623
|
};
|
|
1625
1624
|
}
|
|
1626
|
-
class
|
|
1625
|
+
class yr {
|
|
1627
1626
|
constructor(e) {
|
|
1628
1627
|
return this._group = e, this.type = "GroupComponent", new Proxy(this, {
|
|
1629
1628
|
get: function(t, i) {
|
|
@@ -1956,7 +1955,7 @@ const gt = class gt extends P {
|
|
|
1956
1955
|
"clipboard"
|
|
1957
1956
|
), i = this.table.modules.export?.generateHTMLTable(s), t = i ? this.generatePlainContent(s) : "", this.table.options.clipboardCopyFormatter && typeof this.table.options.clipboardCopyFormatter == "function" && (t = this.table.options.clipboardCopyFormatter("plain", t), i = this.table.options.clipboardCopyFormatter("html", i ?? "")));
|
|
1958
1957
|
const o = Ro(e);
|
|
1959
|
-
o?.setData && (o.setData("text/plain", t), i && o.setData("text/html", i),
|
|
1958
|
+
o?.setData && (o.setData("text/plain", t), i && o.setData("text/html", i), jr("Copied to clipboard", {
|
|
1960
1959
|
notificationType: "success"
|
|
1961
1960
|
})), this.dispatchExternal("clipboardCopied", t, i), this.reset();
|
|
1962
1961
|
}
|
|
@@ -1987,7 +1986,7 @@ const gt = class gt extends P {
|
|
|
1987
1986
|
const s = [];
|
|
1988
1987
|
i.columns.forEach((o) => {
|
|
1989
1988
|
let r = "";
|
|
1990
|
-
o && (i.type === "group" && (o.value = o.component instanceof
|
|
1989
|
+
o && (i.type === "group" && (o.value = o.component instanceof yr ? o.component.getKey() : ""), typeof o.value == "object" ? r = JSON.stringify(o.value) : o.value != null && (r = String(o.value))), s.push(r);
|
|
1991
1990
|
}), t.push(s.join(" "));
|
|
1992
1991
|
}), t.join(`
|
|
1993
1992
|
`);
|
|
@@ -2280,7 +2279,7 @@ class hi extends Ce {
|
|
|
2280
2279
|
return this.component ??= new $s(this), this.component;
|
|
2281
2280
|
}
|
|
2282
2281
|
}
|
|
2283
|
-
const
|
|
2282
|
+
const Cr = {
|
|
2284
2283
|
columns: void 0,
|
|
2285
2284
|
cssClass: void 0,
|
|
2286
2285
|
editableTitle: void 0,
|
|
@@ -2778,7 +2777,7 @@ const yr = {
|
|
|
2778
2777
|
return this.parent instanceof ve ? this.parent.getComponent() : !1;
|
|
2779
2778
|
}
|
|
2780
2779
|
};
|
|
2781
|
-
ve.defaultOptionList =
|
|
2780
|
+
ve.defaultOptionList = Cr;
|
|
2782
2781
|
let ze = ve;
|
|
2783
2782
|
class js {
|
|
2784
2783
|
constructor(e) {
|
|
@@ -4405,9 +4404,9 @@ const Ca = function(n, e, t, i, s) {
|
|
|
4405
4404
|
}
|
|
4406
4405
|
}), s.mask && Gs(r, s), r;
|
|
4407
4406
|
}, Ea = process.env.NODE_ENV === "development";
|
|
4408
|
-
let
|
|
4407
|
+
let Er = null;
|
|
4409
4408
|
function xa(n) {
|
|
4410
|
-
|
|
4409
|
+
Er = n;
|
|
4411
4410
|
}
|
|
4412
4411
|
const Ra = {
|
|
4413
4412
|
/**
|
|
@@ -4415,7 +4414,7 @@ const Ra = {
|
|
|
4415
4414
|
* by {@link setDefaultFormattersRegistry}
|
|
4416
4415
|
*/
|
|
4417
4416
|
lookupFormatter(n, e) {
|
|
4418
|
-
const t = e ??
|
|
4417
|
+
const t = e ?? Er;
|
|
4419
4418
|
if (!t)
|
|
4420
4419
|
throw new Error(
|
|
4421
4420
|
"defaultFormatterRegistry is not initialized; ensure ./defaults/formatters has finished loading."
|
|
@@ -5057,7 +5056,7 @@ function Sl(n, e) {
|
|
|
5057
5056
|
return;
|
|
5058
5057
|
const i = e ?? {};
|
|
5059
5058
|
let s;
|
|
5060
|
-
i.getVariant && (s = i.getVariant(t)), !s && i.variantMap && (s = i.variantMap[t]), !s && i.variant && (s = i.variant), s ??=
|
|
5059
|
+
i.getVariant && (s = i.getVariant(t)), !s && i.variantMap && (s = i.variantMap[t]), !s && i.variant && (s = i.variant), s ??= Vr.Body1;
|
|
5061
5060
|
const o = S`<cx-line-clamp lines="1"><cx-typography style=${Ze(i.style ?? {})}></cx-typography></cx-line-clamp>`, r = V(o), a = r.querySelector(
|
|
5062
5061
|
"cx-typography"
|
|
5063
5062
|
);
|
|
@@ -5065,7 +5064,7 @@ function Sl(n, e) {
|
|
|
5065
5064
|
let l = String(t);
|
|
5066
5065
|
return i.prefix && (l = i.prefix + l), i.suffix && (l = l + i.suffix), a.textContent = l, r;
|
|
5067
5066
|
}
|
|
5068
|
-
const
|
|
5067
|
+
const xr = {
|
|
5069
5068
|
adaptable: Sa,
|
|
5070
5069
|
array: Ta,
|
|
5071
5070
|
avatar: ka,
|
|
@@ -5099,7 +5098,7 @@ const Er = {
|
|
|
5099
5098
|
traffic: Rl,
|
|
5100
5099
|
typography: Sl
|
|
5101
5100
|
};
|
|
5102
|
-
xa(
|
|
5101
|
+
xa(xr);
|
|
5103
5102
|
const bt = class bt extends P {
|
|
5104
5103
|
constructor(e) {
|
|
5105
5104
|
super(e), this.registerColumnOption("formatter"), this.registerColumnOption("formatterParams"), this.registerColumnOption("formatterPrint"), this.registerColumnOption("formatterPrintParams"), this.registerColumnOption("formatterClipboard"), this.registerColumnOption("formatterClipboardParams"), this.registerColumnOption("formatterHtmlOutput"), this.registerColumnOption("formatterHtmlOutputParams"), this.registerColumnOption("titleFormatter"), this.registerColumnOption("titleFormatterParams"), this.registerColumnOption("textFormatParams"), this.registerColumnOption("cellClass"), this.registerColumnOption("cellStyle");
|
|
@@ -5202,7 +5201,7 @@ const bt = class bt extends P {
|
|
|
5202
5201
|
return this.formatValue(e);
|
|
5203
5202
|
}
|
|
5204
5203
|
};
|
|
5205
|
-
bt.moduleName = "format", bt.formatters =
|
|
5204
|
+
bt.moduleName = "format", bt.formatters = xr;
|
|
5206
5205
|
let Ci = bt;
|
|
5207
5206
|
const Xe = process.env.NODE_ENV === "development", Tl = S`<cx-option></cx-option>`, kl = S`<cx-divider></cx-divider>`;
|
|
5208
5207
|
class Ml {
|
|
@@ -5366,7 +5365,7 @@ class Ml {
|
|
|
5366
5365
|
}
|
|
5367
5366
|
async _ajaxRequest(e, t) {
|
|
5368
5367
|
const { ajaxResponse: i, filterRemote: s } = this.params, o = s ? { term: t } : {};
|
|
5369
|
-
e =
|
|
5368
|
+
e = wr(e, {}, o);
|
|
5370
5369
|
let r = [];
|
|
5371
5370
|
try {
|
|
5372
5371
|
if (!this.fetchApi)
|
|
@@ -6094,7 +6093,7 @@ const Dl = function(n, e, t, i, s) {
|
|
|
6094
6093
|
textarea: _l,
|
|
6095
6094
|
tickCross: Al,
|
|
6096
6095
|
time: Hl
|
|
6097
|
-
}, di = process.env.NODE_ENV === "development",
|
|
6096
|
+
}, di = process.env.NODE_ENV === "development", Rr = "tabulator-edit-list-trigger", Vl = "tabulator-edit-list-trigger-caret", Il = S`<button aria-label="Open list editor" class=${Rr} tabindex="-1" type="button"><cx-icon aria-hidden="true" class=${Vl} name="arrow_drop_down"></cx-icon></button>`, Jt = class Jt extends P {
|
|
6098
6097
|
constructor(e) {
|
|
6099
6098
|
super(e), this.currentCell = !1, this.mouseClick = !1, this.recursionBlock = !1, this.invalidEdit = !1, this.editedCells = [], this.convertEmptyValues = !1, this.editors = Jt.editors, this.registerTableOption("editTriggerEvent", "focus"), this.registerTableOption("editorEmptyValue"), this.registerTableOption(
|
|
6100
6099
|
"editorEmptyValueFunc",
|
|
@@ -6351,7 +6350,7 @@ const Dl = function(n, e, t, i, s) {
|
|
|
6351
6350
|
if (e.column.definition.editor !== "list")
|
|
6352
6351
|
return;
|
|
6353
6352
|
const t = e.getElement(!0);
|
|
6354
|
-
if (!t || t.classList.contains("tabulator-editing") || t.querySelector(`.${
|
|
6353
|
+
if (!t || t.classList.contains("tabulator-editing") || t.querySelector(`.${Rr}`))
|
|
6355
6354
|
return;
|
|
6356
6355
|
const i = V(
|
|
6357
6356
|
Il
|
|
@@ -7060,10 +7059,10 @@ function ke(n) {
|
|
|
7060
7059
|
return;
|
|
7061
7060
|
}
|
|
7062
7061
|
}
|
|
7063
|
-
const
|
|
7062
|
+
const Sr = Symbol("skip-composite-element");
|
|
7064
7063
|
function Kl(n, e, t, i, s) {
|
|
7065
7064
|
if (typeof n?.getValue == "function")
|
|
7066
|
-
return
|
|
7065
|
+
return Sr;
|
|
7067
7066
|
if (n?.value !== void 0)
|
|
7068
7067
|
return n.value;
|
|
7069
7068
|
const o = n?.field;
|
|
@@ -7087,7 +7086,7 @@ function Xl(n, e) {
|
|
|
7087
7086
|
s,
|
|
7088
7087
|
o
|
|
7089
7088
|
);
|
|
7090
|
-
if (c ===
|
|
7089
|
+
if (c === Sr)
|
|
7091
7090
|
continue;
|
|
7092
7091
|
let d = c;
|
|
7093
7092
|
const p = h?.valueMap;
|
|
@@ -7220,36 +7219,36 @@ function ih(n) {
|
|
|
7220
7219
|
const o = ke(() => s.format(i));
|
|
7221
7220
|
return o ? [o] : [];
|
|
7222
7221
|
}
|
|
7223
|
-
function
|
|
7222
|
+
function Tr(n) {
|
|
7224
7223
|
return n?.dependencyRegistry?.lookup?.(
|
|
7225
7224
|
["luxon", "DateTime"],
|
|
7226
7225
|
"DateTime"
|
|
7227
7226
|
);
|
|
7228
7227
|
}
|
|
7229
|
-
function
|
|
7228
|
+
function kr(n, e, t) {
|
|
7230
7229
|
return n.isDateTime(e) ? e : t === "iso" ? n.fromISO(String(e)) : n.fromFormat(String(e), t);
|
|
7231
7230
|
}
|
|
7232
7231
|
function bi(n, e) {
|
|
7233
7232
|
return typeof n == "string" && n.length > 0 && n !== e ? [n] : [];
|
|
7234
7233
|
}
|
|
7235
7234
|
function sh(n) {
|
|
7236
|
-
const { formatterParams: e, rawValue: t, table: i } = n, s =
|
|
7235
|
+
const { formatterParams: e, rawValue: t, table: i } = n, s = Tr(i), o = e ?? {}, r = o.invalidPlaceholder ?? "";
|
|
7237
7236
|
if (!s)
|
|
7238
7237
|
return [];
|
|
7239
|
-
const a = o.inputFormat ?? "yyyy-MM-dd HH:mm:ss", l = o.outputFormat ?? "dd/MM/yyyy HH:mm:ss", h = ke(() =>
|
|
7238
|
+
const a = o.inputFormat ?? "yyyy-MM-dd HH:mm:ss", l = o.outputFormat ?? "dd/MM/yyyy HH:mm:ss", h = ke(() => kr(s, t, a));
|
|
7240
7239
|
if (!h?.isValid)
|
|
7241
7240
|
return bi(r, t);
|
|
7242
7241
|
const c = o.timezone ? ke(() => h.setZone(o.timezone)) ?? h : h, d = ke(() => c.toFormat(l));
|
|
7243
7242
|
return d ? [d] : [];
|
|
7244
7243
|
}
|
|
7245
7244
|
function oh(n) {
|
|
7246
|
-
const { formatterParams: e, rawValue: t, table: i } = n, s =
|
|
7245
|
+
const { formatterParams: e, rawValue: t, table: i } = n, s = Tr(i), o = e ?? {}, r = o.invalidPlaceholder ?? "";
|
|
7247
7246
|
if (!s)
|
|
7248
7247
|
return bi(r, t);
|
|
7249
7248
|
const a = o.inputFormat ?? "yyyy-MM-dd HH:mm:ss", l = o.suffix === void 0 || o.suffix === null ? !1 : o.suffix, h = o.unit === void 0 || o.unit === null ? "days" : o.unit, c = o.humanize === void 0 || o.humanize === null ? !1 : o.humanize, d = o.date === void 0 || o.date === null ? ke(() => s.now()) : o.date;
|
|
7250
7249
|
if (!d)
|
|
7251
7250
|
return bi(r, t);
|
|
7252
|
-
const p = ke(() =>
|
|
7251
|
+
const p = ke(() => kr(s, t, a));
|
|
7253
7252
|
if (!p?.isValid)
|
|
7254
7253
|
return bi(r, t);
|
|
7255
7254
|
const u = ke(() => c ? p.diff(d, h).toHuman() + (l ? " " + l : "") : Number.parseInt(String(p.diff(d, h)[h]), 10) + (l ? " " + l : ""));
|
|
@@ -7262,21 +7261,21 @@ function rh(n, e) {
|
|
|
7262
7261
|
const i = e?.prefix, s = e?.suffix;
|
|
7263
7262
|
return typeof i == "string" && i.length > 0 && (t = i + t), typeof s == "string" && s.length > 0 && (t = t + s), t;
|
|
7264
7263
|
}
|
|
7265
|
-
function
|
|
7264
|
+
function Mr(n) {
|
|
7266
7265
|
const { formatterParams: e, rawValue: t } = n, i = rh(t, e);
|
|
7267
7266
|
return i === void 0 || i === String(t) ? [] : [i];
|
|
7268
7267
|
}
|
|
7269
7268
|
function nh(n) {
|
|
7270
|
-
return
|
|
7269
|
+
return Mr(n);
|
|
7271
7270
|
}
|
|
7272
|
-
function
|
|
7271
|
+
function Dr(n) {
|
|
7273
7272
|
if (typeof n.rawValue != "string" || !n.rawValue.includes("<"))
|
|
7274
7273
|
return [];
|
|
7275
7274
|
const e = Ul(n.rawValue);
|
|
7276
7275
|
return !e || e === n.rawValue ? [] : [e];
|
|
7277
7276
|
}
|
|
7278
7277
|
function ah(n) {
|
|
7279
|
-
return
|
|
7278
|
+
return Dr(n);
|
|
7280
7279
|
}
|
|
7281
7280
|
function lh(n) {
|
|
7282
7281
|
const { formatterParams: e, rawValue: t } = n, i = e ?? {}, s = i.indent ?? " ", o = i.replacer ?? null, r = ke(() => JSON.stringify(t, o, s));
|
|
@@ -7323,13 +7322,13 @@ const ch = {
|
|
|
7323
7322
|
array: Yl,
|
|
7324
7323
|
datetime: sh,
|
|
7325
7324
|
datetimediff: oh,
|
|
7326
|
-
html:
|
|
7325
|
+
html: Dr,
|
|
7327
7326
|
json: lh,
|
|
7328
7327
|
link: Zl,
|
|
7329
7328
|
lookup: Jl,
|
|
7330
7329
|
money: eh,
|
|
7331
7330
|
number: ih,
|
|
7332
|
-
plaintext:
|
|
7331
|
+
plaintext: Mr,
|
|
7333
7332
|
tag: Ql,
|
|
7334
7333
|
textarea: ah,
|
|
7335
7334
|
typography: nh
|
|
@@ -8345,7 +8344,7 @@ class Pt {
|
|
|
8345
8344
|
this.groups[t] && (delete this.groups[t], i = this.groupList.indexOf(e), i > -1 && this.groupList.splice(i, 1), this.groupList.length || (this.parent ? this.parent.removeGroup(this) : this.groupManager.removeGroup(this)));
|
|
8346
8345
|
}
|
|
8347
8346
|
getPathKey() {
|
|
8348
|
-
return
|
|
8347
|
+
return vr(Ws(this));
|
|
8349
8348
|
}
|
|
8350
8349
|
getLoadMoreState() {
|
|
8351
8350
|
return Vn(
|
|
@@ -8597,7 +8596,7 @@ class Pt {
|
|
|
8597
8596
|
}
|
|
8598
8597
|
// ////////////// Object Generation /////////////////
|
|
8599
8598
|
getComponent() {
|
|
8600
|
-
return this.component ??= new
|
|
8599
|
+
return this.component ??= new yr(this), this.component;
|
|
8601
8600
|
}
|
|
8602
8601
|
}
|
|
8603
8602
|
const Hi = process.env.NODE_ENV === "development", eo = class eo extends P {
|
|
@@ -12355,7 +12354,7 @@ const jh = S`<cx-checkbox></cx-checkbox>`;
|
|
|
12355
12354
|
function Gh(n, e, t) {
|
|
12356
12355
|
const i = V(jh);
|
|
12357
12356
|
let s = i, o = !1;
|
|
12358
|
-
i.setAttribute("aria-label", "Select Row"), i.size =
|
|
12357
|
+
i.setAttribute("aria-label", "Select Row"), i.size = Kr.Small;
|
|
12359
12358
|
const r = this.table;
|
|
12360
12359
|
if (r.modExists("selectRow", !0)) {
|
|
12361
12360
|
i.addEventListener("click", (l) => {
|
|
@@ -13942,7 +13941,7 @@ class gc {
|
|
|
13942
13941
|
this.columnCount = e;
|
|
13943
13942
|
}
|
|
13944
13943
|
}
|
|
13945
|
-
class
|
|
13944
|
+
class Lr {
|
|
13946
13945
|
constructor(e) {
|
|
13947
13946
|
return this._sheet = e, new Proxy(this, {
|
|
13948
13947
|
get: function(t, i) {
|
|
@@ -14048,7 +14047,7 @@ class Ko extends Ce {
|
|
|
14048
14047
|
}
|
|
14049
14048
|
// #region Helper Functions
|
|
14050
14049
|
getComponent() {
|
|
14051
|
-
return new
|
|
14050
|
+
return new Lr(this);
|
|
14052
14051
|
}
|
|
14053
14052
|
getDefinition() {
|
|
14054
14053
|
return {
|
|
@@ -14194,7 +14193,7 @@ Data: `,
|
|
|
14194
14193
|
this.sheets.length > 1 ? t > -1 && (this.sheets.splice(t, 1), e.destroy(), this.activeSheet === e && (i = this.sheets[t - 1] || this.sheets[0], i ? this.loadSheet(i) : this.activeSheet = null)) : ut && console.warn("Unable to remove sheet, at least one sheet must be active");
|
|
14195
14194
|
}
|
|
14196
14195
|
lookupSheet(e) {
|
|
14197
|
-
return e ? e instanceof Ko ? e : e instanceof
|
|
14196
|
+
return e ? e instanceof Ko ? e : e instanceof Lr ? e._sheet : this.sheets.find((t) => t.key === e) ?? null : this.activeSheet;
|
|
14198
14197
|
}
|
|
14199
14198
|
/**
|
|
14200
14199
|
* Public Functions
|
|
@@ -14323,7 +14322,7 @@ function Ni(n, e) {
|
|
|
14323
14322
|
function Vi(n) {
|
|
14324
14323
|
return n instanceof Date ? n.getTime() : typeof n == "number" ? Number.isFinite(n) ? n : NaN : typeof n == "string" ? Date.parse(n) : NaN;
|
|
14325
14324
|
}
|
|
14326
|
-
const
|
|
14325
|
+
const Fr = {
|
|
14327
14326
|
// must be alphanumeric
|
|
14328
14327
|
alphanumeric(n) {
|
|
14329
14328
|
return we(n) ? !0 : /^[a-z0-9]+$/i.test(String(n));
|
|
@@ -14438,7 +14437,7 @@ const Lr = {
|
|
|
14438
14437
|
};
|
|
14439
14438
|
function Re(n) {
|
|
14440
14439
|
return function(e, t, i) {
|
|
14441
|
-
return
|
|
14440
|
+
return Fr[n](t, i);
|
|
14442
14441
|
};
|
|
14443
14442
|
}
|
|
14444
14443
|
const mc = {
|
|
@@ -14465,7 +14464,7 @@ const mc = {
|
|
|
14465
14464
|
return this.table.rowManager?.rows.forEach((r) => {
|
|
14466
14465
|
const a = r.getData();
|
|
14467
14466
|
a !== i && o.push(s.getFieldValue(a));
|
|
14468
|
-
}),
|
|
14467
|
+
}), Fr.unique(e, t, { columnValues: o });
|
|
14469
14468
|
}
|
|
14470
14469
|
};
|
|
14471
14470
|
function bc(n) {
|
|
@@ -14512,7 +14511,7 @@ function Ec(n, e) {
|
|
|
14512
14511
|
}
|
|
14513
14512
|
const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "data-validation-message", Zt = class Zt extends P {
|
|
14514
14513
|
constructor(e) {
|
|
14515
|
-
super(e), this.invalidState = /* @__PURE__ */ new Map(), this.validationGeneration = 0, this.suppressValidationChanged = !1, this.registerTableOption("validationMode", "blocking"), this.registerTableOption("validateOnLoad", !1), this.registerTableOption("validationWorkerThreshold", Yo), this.registerColumnOption("validator"), this.registerTableFunction(
|
|
14514
|
+
super(e), this.invalidState = /* @__PURE__ */ new Map(), this.mutateOnValidateColumns = /* @__PURE__ */ new Set(), this.validationGeneration = 0, this.suppressValidationChanged = !1, this.registerTableOption("validationMode", "blocking"), this.registerTableOption("validateOnLoad", !1), this.registerTableOption("validationWorkerThreshold", Yo), this.registerColumnOption("validator"), this.registerColumnOption("mutateOnValidate"), this.registerTableFunction(
|
|
14516
14515
|
"getInvalidCells",
|
|
14517
14516
|
this.getInvalidCells.bind(this)
|
|
14518
14517
|
), this.registerTableFunction(
|
|
@@ -14533,6 +14532,10 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14533
14532
|
"cell",
|
|
14534
14533
|
"validate",
|
|
14535
14534
|
this.cellValidate.bind(this)
|
|
14535
|
+
), this.registerComponentFunction(
|
|
14536
|
+
"cell",
|
|
14537
|
+
"getValidationErrors",
|
|
14538
|
+
this.getCellValidationErrors.bind(this)
|
|
14536
14539
|
), this.registerComponentFunction(
|
|
14537
14540
|
"column",
|
|
14538
14541
|
"validate",
|
|
@@ -14592,7 +14595,7 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14592
14595
|
}
|
|
14593
14596
|
columnDeleted(e) {
|
|
14594
14597
|
let t = !1;
|
|
14595
|
-
this.invalidState.forEach((i, s) => {
|
|
14598
|
+
this.mutateOnValidateColumns.delete(e), this.invalidState.forEach((i, s) => {
|
|
14596
14599
|
i.delete(e) && (t = !0, i.size === 0 && this.invalidState.delete(s));
|
|
14597
14600
|
}), t && this.dispatchValidationChanged();
|
|
14598
14601
|
}
|
|
@@ -14620,6 +14623,10 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14620
14623
|
cellValidate(e) {
|
|
14621
14624
|
return this.validate(e.column.modules.validate, e, e.getValue());
|
|
14622
14625
|
}
|
|
14626
|
+
/** Current validation failures for this cell — empty when the cell is valid or unvalidated. */
|
|
14627
|
+
getCellValidationErrors(e) {
|
|
14628
|
+
return Array.isArray(e.modules.validate?.invalid) ? e.modules.validate.invalid : [];
|
|
14629
|
+
}
|
|
14623
14630
|
// /////////////////////////////////
|
|
14624
14631
|
// /////// Column Functions ////////
|
|
14625
14632
|
// /////////////////////////////////
|
|
@@ -14656,7 +14663,7 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14656
14663
|
return this.runSuppressed(() => {
|
|
14657
14664
|
this.table.rowManager && this.table.rowManager.rows.forEach((i) => {
|
|
14658
14665
|
const o = i.getComponent().validate();
|
|
14659
|
-
o !== !0 && t.push(...Array.isArray(o) ? o : [o]);
|
|
14666
|
+
this.refreshMutateOnValidateColumns(i), o !== !0 && t.push(...Array.isArray(o) ? o : [o]);
|
|
14660
14667
|
});
|
|
14661
14668
|
}), this.dispatchValidationChanged(), t.length ? t : !0;
|
|
14662
14669
|
}
|
|
@@ -14701,7 +14708,7 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14701
14708
|
// /////// Internal Logic //////////
|
|
14702
14709
|
// /////////////////////////////////
|
|
14703
14710
|
initializeColumnCheck(e) {
|
|
14704
|
-
e.definition.validator !== void 0 && e.definition.validator !== null && this.initializeColumn(e);
|
|
14711
|
+
e.definition.validator !== void 0 && e.definition.validator !== null && this.initializeColumn(e), e.definition.mutateOnValidate && this.mutateOnValidateColumns.add(e);
|
|
14705
14712
|
}
|
|
14706
14713
|
// validate
|
|
14707
14714
|
initializeColumn(e) {
|
|
@@ -14744,14 +14751,25 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14744
14751
|
parameters: r.params,
|
|
14745
14752
|
type: r.type
|
|
14746
14753
|
});
|
|
14747
|
-
}), t.modules.validate || (t.modules.validate = {}), s.length ? (t.modules.validate.invalid = s, this.table.options.validationMode !== "manual" && this.applyCellInvalidState(t), this.registerInvalidCell(t, s)) : (t.modules.validate.invalid = !1, this.clearCellInvalidState(t), this.unregisterInvalidCell(t)), o !== s.length > 0 && this.dispatchValidationChanged(), s.length ? s : !0;
|
|
14754
|
+
}), t.modules.validate || (t.modules.validate = {}), s.length ? (t.modules.validate.invalid = s, this.table.options.validationMode !== "manual" && this.applyCellInvalidState(t), this.registerInvalidCell(t, s)) : (t.modules.validate.invalid = !1, this.clearCellInvalidState(t), this.unregisterInvalidCell(t)), this.suppressValidationChanged || this.refreshMutateOnValidateColumns(t.row), o !== s.length > 0 && this.dispatchValidationChanged(), s.length ? s : !0;
|
|
14748
14755
|
}
|
|
14749
14756
|
getInvalidCells() {
|
|
14750
14757
|
return this.invalidCells.map((e) => e.getComponent());
|
|
14751
14758
|
}
|
|
14752
14759
|
clearValidation(e) {
|
|
14753
14760
|
const t = this.unregisterInvalidCell(e), i = !!e.modules.validate?.invalid;
|
|
14754
|
-
!t && !i || (this.clearCellInvalidState(e), e.modules.validate && (e.modules.validate.invalid = !1), this.dispatchValidationChanged());
|
|
14761
|
+
!t && !i || (this.clearCellInvalidState(e), e.modules.validate && (e.modules.validate.invalid = !1), this.refreshMutateOnValidateColumns(e.row), this.dispatchValidationChanged());
|
|
14762
|
+
}
|
|
14763
|
+
/**
|
|
14764
|
+
* Forces every `mutateOnValidate` column to re-run its mutator (and re-render) for this row —
|
|
14765
|
+
* called after this row's validation state changes, so a column aggregating row-level errors
|
|
14766
|
+
* (e.g. via `getValidationErrors()` on sibling cells) stays in sync. No-op when no column opts in.
|
|
14767
|
+
*/
|
|
14768
|
+
refreshMutateOnValidateColumns(e) {
|
|
14769
|
+
this.mutateOnValidateColumns.size && this.mutateOnValidateColumns.forEach((t) => {
|
|
14770
|
+
const i = e.getCell(t);
|
|
14771
|
+
i && i.setValue(i.getValue(), !0, !0);
|
|
14772
|
+
});
|
|
14755
14773
|
}
|
|
14756
14774
|
// /////////////////////////////////
|
|
14757
14775
|
// //// Invalid state registry /////
|
|
@@ -14803,14 +14821,14 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14803
14821
|
});
|
|
14804
14822
|
}
|
|
14805
14823
|
applyWorkerResults(e, t, i) {
|
|
14806
|
-
const s = new Set(this.table.rowManager?.rows ?? []);
|
|
14807
|
-
e.forEach((
|
|
14808
|
-
const
|
|
14809
|
-
if (!
|
|
14824
|
+
const s = new Set(this.table.rowManager?.rows ?? []), o = /* @__PURE__ */ new Set();
|
|
14825
|
+
e.forEach((r) => {
|
|
14826
|
+
const a = t[r.rowIndex], l = i[r.fieldIndex];
|
|
14827
|
+
if (!a || !l || !s.has(a))
|
|
14810
14828
|
return;
|
|
14811
|
-
const
|
|
14812
|
-
|
|
14813
|
-
});
|
|
14829
|
+
const h = a.getCell(l);
|
|
14830
|
+
h && (this.applyBatchFailures(h, r.failures), o.add(a));
|
|
14831
|
+
}), o.forEach((r) => this.refreshMutateOnValidateColumns(r));
|
|
14814
14832
|
}
|
|
14815
14833
|
applyBatchFailures(e, t) {
|
|
14816
14834
|
e.modules.validate || (e.modules.validate = {}), e.modules.validate.invalid = t, this.table.options.validationMode !== "manual" && this.applyCellInvalidState(e), this.registerInvalidCell(e, t);
|
|
@@ -14831,7 +14849,7 @@ const Jo = process.env.NODE_ENV === "development", Yo = 2e3, Qo = 1e3, Xt = "dat
|
|
|
14831
14849
|
e.forEach((l) => {
|
|
14832
14850
|
const h = a.getCell(l);
|
|
14833
14851
|
h && this.validate(l.modules.validate, h, h.getValue());
|
|
14834
|
-
});
|
|
14852
|
+
}), this.refreshMutateOnValidateColumns(a);
|
|
14835
14853
|
}
|
|
14836
14854
|
}), o < t.length && await new Promise((r) => setTimeout(r));
|
|
14837
14855
|
}
|
|
@@ -15231,7 +15249,7 @@ class Rc extends Li {
|
|
|
15231
15249
|
}
|
|
15232
15250
|
}
|
|
15233
15251
|
const Sc = process.env.NODE_ENV === "development";
|
|
15234
|
-
class
|
|
15252
|
+
class zr {
|
|
15235
15253
|
constructor(e, t, i = {}) {
|
|
15236
15254
|
this.registeredDefaults = {}, this.table = e, this.msgType = t, this.registeredDefaults = { ...i };
|
|
15237
15255
|
}
|
|
@@ -15251,10 +15269,10 @@ class Fr {
|
|
|
15251
15269
|
const Zo = process.env.NODE_ENV === "development";
|
|
15252
15270
|
class Tc extends Ce {
|
|
15253
15271
|
constructor(e) {
|
|
15254
|
-
super(e), this.blockHozScrollEvent = !1, this.headersElement = null, this.contentsElement = null, this.rowHeader = null, this.columns = [], this.columnsByIndex = [], this.columnsByField = {}, this.scrollLeft = 0, this.optionsList = new
|
|
15272
|
+
super(e), this.blockHozScrollEvent = !1, this.headersElement = null, this.contentsElement = null, this.rowHeader = null, this.columns = [], this.columnsByIndex = [], this.columnsByField = {}, this.scrollLeft = 0, this.optionsList = new zr(
|
|
15255
15273
|
this.table,
|
|
15256
15274
|
"column definition",
|
|
15257
|
-
|
|
15275
|
+
Cr
|
|
15258
15276
|
), this.redrawBlock = !1, this.redrawBlockUpdate = null, this.renderer = null;
|
|
15259
15277
|
}
|
|
15260
15278
|
// //////////// Setup Functions /////////////////
|
|
@@ -17496,16 +17514,16 @@ Ie.registry = {
|
|
|
17496
17514
|
tables: []
|
|
17497
17515
|
};
|
|
17498
17516
|
let Hs = Ie;
|
|
17499
|
-
const gi = process.env.NODE_ENV === "development",
|
|
17517
|
+
const gi = process.env.NODE_ENV === "development", J = class J extends Hs {
|
|
17500
17518
|
constructor() {
|
|
17501
17519
|
super(), this.modulesCore = [], this.modulesRegular = [];
|
|
17502
17520
|
}
|
|
17503
17521
|
static initializeModuleBinder(e) {
|
|
17504
|
-
|
|
17522
|
+
J.modulesRegistered || (J.modulesRegistered = !0, J._registerModules(Xc, !0), e && J._registerModules(e));
|
|
17505
17523
|
}
|
|
17506
17524
|
static _extendModule(e, t, i) {
|
|
17507
|
-
if (
|
|
17508
|
-
const s =
|
|
17525
|
+
if (J.moduleBindings[e]) {
|
|
17526
|
+
const s = J.moduleBindings[e][t];
|
|
17509
17527
|
if (s)
|
|
17510
17528
|
if (typeof i == "object")
|
|
17511
17529
|
for (const o in i)
|
|
@@ -17520,15 +17538,15 @@ const gi = process.env.NODE_ENV === "development", X = class X extends Hs {
|
|
|
17520
17538
|
const i = Object.values(e);
|
|
17521
17539
|
t && i.forEach((s) => {
|
|
17522
17540
|
s.prototype.moduleCore = !0;
|
|
17523
|
-
}),
|
|
17541
|
+
}), J._registerModule(i);
|
|
17524
17542
|
}
|
|
17525
17543
|
static _registerModule(e) {
|
|
17526
17544
|
(Array.isArray(e) ? e : [e]).forEach((i) => {
|
|
17527
|
-
|
|
17545
|
+
J._registerModuleBinding(i), J._registerModuleExtensions(i);
|
|
17528
17546
|
});
|
|
17529
17547
|
}
|
|
17530
17548
|
static _registerModuleBinding(e) {
|
|
17531
|
-
e.moduleName ?
|
|
17549
|
+
e.moduleName ? J.moduleBindings[e.moduleName] = e : gi && console.error(
|
|
17532
17550
|
"Unable to bind module, no moduleName defined",
|
|
17533
17551
|
e.moduleName
|
|
17534
17552
|
);
|
|
@@ -17538,25 +17556,25 @@ const gi = process.env.NODE_ENV === "development", X = class X extends Hs {
|
|
|
17538
17556
|
if (e.moduleExtensions)
|
|
17539
17557
|
for (const i in t) {
|
|
17540
17558
|
const s = t[i];
|
|
17541
|
-
if (
|
|
17559
|
+
if (J.moduleBindings[i])
|
|
17542
17560
|
for (const o in s)
|
|
17543
|
-
|
|
17561
|
+
J._extendModule(i, o, s[o]);
|
|
17544
17562
|
else {
|
|
17545
|
-
|
|
17563
|
+
J.moduleExtensions[i] || (J.moduleExtensions[i] = {});
|
|
17546
17564
|
for (const o in s)
|
|
17547
|
-
|
|
17548
|
-
|
|
17565
|
+
J.moduleExtensions[i][o] || (J.moduleExtensions[i][o] = {}), Object.assign(
|
|
17566
|
+
J.moduleExtensions[i][o],
|
|
17549
17567
|
s[o]
|
|
17550
17568
|
);
|
|
17551
17569
|
}
|
|
17552
17570
|
}
|
|
17553
|
-
|
|
17571
|
+
J._extendModuleFromQueue(e);
|
|
17554
17572
|
}
|
|
17555
17573
|
static _extendModuleFromQueue(e) {
|
|
17556
|
-
const t =
|
|
17574
|
+
const t = J.moduleExtensions[e.moduleName];
|
|
17557
17575
|
if (t)
|
|
17558
17576
|
for (const i in t)
|
|
17559
|
-
|
|
17577
|
+
J._extendModule(
|
|
17560
17578
|
e.moduleName,
|
|
17561
17579
|
i,
|
|
17562
17580
|
t[i]
|
|
@@ -17566,8 +17584,8 @@ const gi = process.env.NODE_ENV === "development", X = class X extends Hs {
|
|
|
17566
17584
|
_bindModules() {
|
|
17567
17585
|
const e = [], t = [], i = [];
|
|
17568
17586
|
this.modules = {};
|
|
17569
|
-
for (const s in
|
|
17570
|
-
const o =
|
|
17587
|
+
for (const s in J.moduleBindings) {
|
|
17588
|
+
const o = J.moduleBindings[s], r = new o(this);
|
|
17571
17589
|
this.modules[s] = r, o.prototype.moduleCore ? this.modulesCore.push(r) : o.moduleInitOrder === void 0 || o.moduleInitOrder === null ? i.push(r) : o.moduleInitOrder < 0 ? e.push(r) : t.push(r);
|
|
17572
17590
|
}
|
|
17573
17591
|
e.sort((s, o) => {
|
|
@@ -17581,8 +17599,8 @@ const gi = process.env.NODE_ENV === "development", X = class X extends Hs {
|
|
|
17581
17599
|
);
|
|
17582
17600
|
}
|
|
17583
17601
|
};
|
|
17584
|
-
|
|
17585
|
-
let Ns =
|
|
17602
|
+
J.moduleBindings = {}, J.moduleExtensions = {}, J.modulesRegistered = !1, J.defaultModules = !1;
|
|
17603
|
+
let Ns = J;
|
|
17586
17604
|
const re = process.env.NODE_ENV === "development", nt = class nt extends Ns {
|
|
17587
17605
|
static extendModule(...e) {
|
|
17588
17606
|
nt.initializeModuleBinder(), nt._extendModule(...e);
|
|
@@ -17591,7 +17609,7 @@ const re = process.env.NODE_ENV === "development", nt = class nt extends Ns {
|
|
|
17591
17609
|
nt.initializeModuleBinder(), nt._registerModule(...e);
|
|
17592
17610
|
}
|
|
17593
17611
|
constructor(e, t, i) {
|
|
17594
|
-
super(), nt.initializeModuleBinder(i), this.options = {}, this.columnManager = null, this.rowManager = null, this.footerManager = null, this.alertManager = null, this.vdomHoz = null, this.externalEvents = null, this.eventBus = null, this.interactionMonitor = !1, this.browser = "", this.browserSlow = !1, this.browserMobile = !1, this.rtl = !1, this.originalElement = null, this.componentFunctionBinder = new _c(this), this.dataLoader = null, this.modules = {}, this.modulesCore = [], this.modulesRegular = [], this.deprecationAdvisor = new Nc(this), this.optionsList = new
|
|
17612
|
+
super(), nt.initializeModuleBinder(i), this.options = {}, this.columnManager = null, this.rowManager = null, this.footerManager = null, this.alertManager = null, this.vdomHoz = null, this.externalEvents = null, this.eventBus = null, this.interactionMonitor = !1, this.browser = "", this.browserSlow = !1, this.browserMobile = !1, this.rtl = !1, this.originalElement = null, this.componentFunctionBinder = new _c(this), this.dataLoader = null, this.modules = {}, this.modulesCore = [], this.modulesRegular = [], this.deprecationAdvisor = new Nc(this), this.optionsList = new zr(this, "table constructor"), this.dependencyRegistry = new Pc(this), this.initialized = !1, this.destroyed = !1, this.initializeElement(e) && (this.initializeCoreSystems(t), setTimeout(() => {
|
|
17595
17613
|
this._create();
|
|
17596
17614
|
})), this.constructor.registry.register(this);
|
|
17597
17615
|
}
|
|
@@ -17996,7 +18014,7 @@ class Yc extends yt {
|
|
|
17996
18014
|
// #endregion
|
|
17997
18015
|
}
|
|
17998
18016
|
var Ct = /* @__PURE__ */ ((n) => (n.Multiple = "multiple", n.Single = "single", n))(Ct || {}), Ge = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.DatePicker = "date-picker", n.DateRange = "date-range", n))(Ge || {}), vi = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.DatePicker = "datePicker", n.DateRangePicker = "dateRangePicker", n))(vi || {}), yi = /* @__PURE__ */ ((n) => (n.ShowPreset = "showPreset", n.ShowTime = "showTime", n))(yi || {});
|
|
17999
|
-
class
|
|
18017
|
+
class Or {
|
|
18000
18018
|
#e;
|
|
18001
18019
|
#i;
|
|
18002
18020
|
#s = /* @__PURE__ */ new Set();
|
|
@@ -18067,11 +18085,11 @@ function Qc(n, e) {
|
|
|
18067
18085
|
}
|
|
18068
18086
|
function Zc(n, e) {
|
|
18069
18087
|
const t = n.facetDetails;
|
|
18070
|
-
return S`<cx-facet-date-picker field=${t.facetFieldName} display-name=${t.displayName} value=${e.dateRange?.fromDate ?? ""} from-time=${e.dateRange?.fromTime ??
|
|
18088
|
+
return S`<cx-facet-date-picker field=${t.facetFieldName} display-name=${t.displayName} value=${e.dateRange?.fromDate ?? ""} from-time=${e.dateRange?.fromTime ?? pr} min=${t.min ?? ""} max=${t.max ?? ""} ?show-time=${t.showTime ?? !1}></cx-facet-date-picker>`;
|
|
18071
18089
|
}
|
|
18072
18090
|
function ed(n, e) {
|
|
18073
18091
|
const t = n.facetDetails;
|
|
18074
|
-
return S`<cx-facet-date-range field=${t.facetFieldName} display-name=${t.displayName} from-date=${e.dateRange?.fromDate ?? ""} to-date=${e.dateRange?.toDate ?? ""} from-time=${e.dateRange?.fromTime ??
|
|
18092
|
+
return S`<cx-facet-date-range field=${t.facetFieldName} display-name=${t.displayName} from-date=${e.dateRange?.fromDate ?? ""} to-date=${e.dateRange?.toDate ?? ""} from-time=${e.dateRange?.fromTime ?? pr} to-time=${e.dateRange?.toTime ?? Yr} preset=${e.dateRange?.preset ?? ""} min=${t.min ?? ""} max=${t.max ?? ""} ?show-time=${t.showTime ?? !1} ?show-preset=${t.showPreset ?? !1}></cx-facet-date-range>`;
|
|
18075
18093
|
}
|
|
18076
18094
|
const td = {
|
|
18077
18095
|
[Ge.Checkbox]: Qc,
|
|
@@ -18085,7 +18103,7 @@ var sd = Object.defineProperty, od = Object.getOwnPropertyDescriptor, De = (n, e
|
|
|
18085
18103
|
};
|
|
18086
18104
|
let ge = class extends tt {
|
|
18087
18105
|
constructor() {
|
|
18088
|
-
super(...arguments), this.localize = new zt(this), this.shadowRootAutoloader = new
|
|
18106
|
+
super(...arguments), this.localize = new zt(this), this.shadowRootAutoloader = new Or(
|
|
18089
18107
|
this
|
|
18090
18108
|
), this.facets = [], this.availableFacets = [], this.selectedFacets = {}, this.selectedDateRanges = {}, this.selection = Ct.Single, this.loading = !1, this.appliedFiltersCount = 0, this.internalSelection = {}, this.internalDateRanges = {}, this.mappedDisplayNames = {};
|
|
18091
18109
|
}
|
|
@@ -18195,7 +18213,7 @@ let ge = class extends tt {
|
|
|
18195
18213
|
return S`<cx-details open aria-busy=${this.loading ? "true" : "false"} class=${at({
|
|
18196
18214
|
"applied-filters": !0,
|
|
18197
18215
|
"applied-filters--empty": this.appliedFiltersCount === 0
|
|
18198
|
-
})}><span slot="summary" class="applied-filters__summary"><span class="applied-filters__title">${this.localize.term("appliedFilters")}${this.appliedFiltersCount > 0 ? ` (${this.appliedFiltersCount})` : pt}</span>${
|
|
18216
|
+
})}><span slot="summary" class="applied-filters__summary"><span class="applied-filters__title">${this.localize.term("appliedFilters")}${this.appliedFiltersCount > 0 ? ` (${this.appliedFiltersCount})` : pt}</span>${X(
|
|
18199
18217
|
this.loading,
|
|
18200
18218
|
() => S`<span class="applied-filters__loading" role="status" aria-label=${this.localize.term("loading")}><cx-spinner></cx-spinner></span>`,
|
|
18201
18219
|
() => pt
|
|
@@ -18228,18 +18246,18 @@ let ge = class extends tt {
|
|
|
18228
18246
|
);
|
|
18229
18247
|
}
|
|
18230
18248
|
renderFooter() {
|
|
18231
|
-
return
|
|
18249
|
+
return X(
|
|
18232
18250
|
this.appliedFiltersCount > 0,
|
|
18233
18251
|
() => S`<div class="panel__footer"><cx-button variant="text" @click=${this.handleClearAllClick} size="small" class="panel__clear-all-button">${this.localize.term("clear")}</cx-button></div>`,
|
|
18234
18252
|
() => pt
|
|
18235
18253
|
);
|
|
18236
18254
|
}
|
|
18237
18255
|
render() {
|
|
18238
|
-
return S`<cx-dropdown stay-open-on-select placement="bottom-start" distance="4" hoist @cx-selection-change=${this.handleSelectionChange} @cx-facet-change=${this.handleFacetChange} @cx-remove=${this.handleRemove}><div slot="trigger" class="faceted-filter__trigger-wrapper"><cx-icon-button name="filter_alt" label=${this.localize.term("filter")} class="faceted-filter__trigger"></cx-icon-button>${
|
|
18256
|
+
return S`<cx-dropdown stay-open-on-select placement="bottom-start" distance="4" hoist @cx-selection-change=${this.handleSelectionChange} @cx-facet-change=${this.handleFacetChange} @cx-remove=${this.handleRemove}><div slot="trigger" class="faceted-filter__trigger-wrapper"><cx-icon-button name="filter_alt" label=${this.localize.term("filter")} class="faceted-filter__trigger"></cx-icon-button>${X(
|
|
18239
18257
|
this.appliedFiltersCount > 0,
|
|
18240
18258
|
() => S`<cx-badge class="faceted-filter__trigger-badge" pill size="small">${this.appliedFiltersCount}</cx-badge>`,
|
|
18241
18259
|
() => pt
|
|
18242
|
-
)}</div><div class="panel"><div class="panel__content"><div class="panel__header">${this.renderAppliedFilters()}</div><div class="panel__body">${
|
|
18260
|
+
)}</div><div class="panel"><div class="panel__content"><div class="panel__header">${this.renderAppliedFilters()}</div><div class="panel__body">${X(
|
|
18243
18261
|
this.availableFacets.length > 0,
|
|
18244
18262
|
() => S`<div>${je(
|
|
18245
18263
|
this.availableFacets,
|
|
@@ -18273,7 +18291,7 @@ ge.dependencies = {
|
|
|
18273
18291
|
"cx-icon": oi,
|
|
18274
18292
|
"cx-icon-button": Is,
|
|
18275
18293
|
"cx-space": si,
|
|
18276
|
-
"cx-spinner":
|
|
18294
|
+
"cx-spinner": fr,
|
|
18277
18295
|
"cx-tag": nn,
|
|
18278
18296
|
"cx-tooltip": ri
|
|
18279
18297
|
};
|
|
@@ -18899,7 +18917,7 @@ function Vd(n, e, t, i = 500) {
|
|
|
18899
18917
|
async function Id(n, e, t, i = 500) {
|
|
18900
18918
|
if (!Number.isInteger(i) || i < 1)
|
|
18901
18919
|
throw new RangeError("chunkSize must be a positive integer");
|
|
18902
|
-
const { columns: s, rows: o } =
|
|
18920
|
+
const { columns: s, rows: o } = Ar(n);
|
|
18903
18921
|
e(s);
|
|
18904
18922
|
for (let r = 0; r < o.length; r += i)
|
|
18905
18923
|
await t(o.slice(r, r + i));
|
|
@@ -18908,7 +18926,7 @@ async function Id(n, e, t, i = 500) {
|
|
|
18908
18926
|
async function Bd(n, e, t, i = 500) {
|
|
18909
18927
|
if (!Number.isInteger(i) || i < 1)
|
|
18910
18928
|
throw new RangeError("chunkSize must be a positive integer");
|
|
18911
|
-
const s = JSON.parse(n), { columns: o, rows: r } =
|
|
18929
|
+
const s = JSON.parse(n), { columns: o, rows: r } = _r(s);
|
|
18912
18930
|
e(o);
|
|
18913
18931
|
for (let a = 0; a < r.length; a += i)
|
|
18914
18932
|
await t(r.slice(a, a + i));
|
|
@@ -18917,7 +18935,7 @@ async function Bd(n, e, t, i = 500) {
|
|
|
18917
18935
|
function or(n) {
|
|
18918
18936
|
return typeof n == "object" && n !== null && !Array.isArray(n);
|
|
18919
18937
|
}
|
|
18920
|
-
function
|
|
18938
|
+
function _r(n) {
|
|
18921
18939
|
if (Array.isArray(n)) {
|
|
18922
18940
|
if (n.length === 0)
|
|
18923
18941
|
return { columns: [], rows: [] };
|
|
@@ -18958,14 +18976,14 @@ function $d(n) {
|
|
|
18958
18976
|
return Wd(e.data);
|
|
18959
18977
|
}
|
|
18960
18978
|
function jd(n) {
|
|
18961
|
-
const e = JSON.parse(n), { columns: t, rows: i } =
|
|
18979
|
+
const e = JSON.parse(n), { columns: t, rows: i } = _r(e);
|
|
18962
18980
|
return { columns: t, data: i };
|
|
18963
18981
|
}
|
|
18964
18982
|
function Gd(n) {
|
|
18965
|
-
const { columns: e, rows: t } =
|
|
18983
|
+
const { columns: e, rows: t } = Ar(n);
|
|
18966
18984
|
return { columns: e, data: t };
|
|
18967
18985
|
}
|
|
18968
|
-
function
|
|
18986
|
+
function Ar(n) {
|
|
18969
18987
|
const e = new DOMParser().parseFromString(n, "text/xml"), t = e.querySelector("parsererror");
|
|
18970
18988
|
if (t)
|
|
18971
18989
|
throw new Error(`XML parse error: ${t.textContent?.trim() ?? "unknown error"}`);
|
|
@@ -19033,18 +19051,18 @@ function Kd(n, e) {
|
|
|
19033
19051
|
function qd(n, e, t) {
|
|
19034
19052
|
return n !== Te.Auto ? n : Kd(e, t);
|
|
19035
19053
|
}
|
|
19036
|
-
var Xd = Object.defineProperty, Jd = Object.getOwnPropertyDescriptor,
|
|
19054
|
+
var Xd = Object.defineProperty, Jd = Object.getOwnPropertyDescriptor, Pr = (n) => {
|
|
19037
19055
|
throw TypeError(n);
|
|
19038
19056
|
}, v = (n, e, t, i) => {
|
|
19039
19057
|
for (var s = i > 1 ? void 0 : i ? Jd(e, t) : e, o = n.length - 1, r; o >= 0; o--)
|
|
19040
19058
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
19041
19059
|
return i && s && Xd(e, t, s), s;
|
|
19042
|
-
}, Yd = (n, e, t) => e.has(n) ||
|
|
19060
|
+
}, Yd = (n, e, t) => e.has(n) || Pr("Cannot " + t), Qd = (n, e, t) => (Yd(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Zd = (n, e, t) => e.has(n) ? Pr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Vs, Hr;
|
|
19043
19061
|
let b = class extends tt {
|
|
19044
19062
|
constructor() {
|
|
19045
|
-
super(), Zd(this, Vs), this.localize = new zt(this), this.verticalOsInstance = null, this.horizontalOsInstance = null, this.resizeObserver = null, this.overflowObserver = null, this.ajaxFacetsController = new rd(this), this.filterController = new cd(this), this.ajaxFacetFilterController = new hd(this, this.filterController), this.selectAllController = new dd(this), this.shadowRootAutoloader = new
|
|
19063
|
+
super(), Zd(this, Vs), this.localize = new zt(this), this.hasSlotController = new ur(this, "add-action"), this.verticalOsInstance = null, this.horizontalOsInstance = null, this.resizeObserver = null, this.overflowObserver = null, this.ajaxFacetsController = new rd(this), this.filterController = new cd(this), this.ajaxFacetFilterController = new hd(this, this.filterController), this.selectAllController = new dd(this), this.shadowRootAutoloader = new Or(
|
|
19046
19064
|
this
|
|
19047
|
-
), this.validationTooltipAnchor = null, this.validationTooltipHidePromise = null, this.movableRows = !1, this.movableColumns = !1, this.data = void 0, this.rowHeight = 48, this.layout = "fitColumns", this.columns = [], this.footerElement = void 0, this.responsiveLayout = !1, this.responsiveLayoutCollapseFormatter = void 0, this.responsiveLayoutCollapseUseFormatters = void 0, this.rowHeader = void 0, this.noHeader = !1, this.textDirection = void 0, this.responsiveLayoutCollapseStartOpen = void 0, this.renderVerticalBuffer = void 0, this.renderVertical = "virtual", this.validateOnLoad = !1, this.validationWorkerThreshold = void 0, this.columnDefaults = {}, this.canSearch = !1, this.noAdvancedSearch = !1, this.showSavedSearch = !1, this.searchFields = [], this.searchMatchAnyKeyword = !1, this.canAdd = !1, this.addLabel = this.localize.term("add"), this.canExportCsv = !1, this.canExportXml = !1, this.canExportPdf = !1, this.canExportCustom = !1, this.canSaveReport = !1, this.savedSearchURL = "", this.savedSearchItems = [], this.savedSearchPageSizeParam = "PageSize", this.savedSearchPageSize = 10, this.savedSearchPageNumberParam = "PageNumber", this.dropdownFilters = [], this.groupByOptions = [], this.ajaxURL = void 0, this.ajaxMethod = "GET", this.ajaxURLGenerator = void 0, this.ajaxParams = void 0, this.ajaxResponse = void 0, this.facetConfig = void 0, this.dataSendParams = void 0, this.dataReceiveParams = void 0, this.noAutoResize = !1, this.resizableRows = !1, this.resizableColumnFit = !1, this.resizableColumnGuide = !1, this.resizableRowGuide = !1, this.frozenRows = void 0, this.frozenRowsField = "id", this.placeholder = this.localize.term("noData"), this.groupBy = void 0, this.groupHeader = void 0, this.groupHeaderCount = !1, this.groupHeaderUseFormatter = !1, this.groupIndent = 36, this.groupHeaderPrint = void 0, this.groupHeaderClipboard = void 0, this.groupHeaderDownload = void 0, this.groupHeaderHtmlOutput = void 0, this.groupStartOpen = !1, this.groupStartOpenValues = void 0, this.groupToggleElement = "arrow", this.groupValues = [], this.groupUpdateOnCellEdit = !1, this.groupLoadMoreMeta = {}, this.dataTree = !1, this.dataTreeChildField = "_children", this.dataTreeLoadingField = "loading", this.dataTreeHasMoreField = "hasMore", this.dataTreeFilter = !1, this.dataTreeSort = !1, this.dataTreeElementColumn = void 0, this.dataTreeChildIndent = 9, this.dataTreeStartExpanded = !1, this.dataTreeSelectPropagate = !1, this.dataTreeExpandElement = void 0, this.dataTreeCollapseElement = void 0, this.spreadsheet = !1, this.spreadsheetColumns = 50, this.spreadsheetRows = 50, this.spreadsheetColumnDefinition = void 0, this.spreadsheetOutputFull = !1, this.editorEmptyValue = "", this.spreadsheetSheets = void 0, this.spreadsheetSheetTabs = !1, this.spreadsheetData = void 0, this.selectableRange = 1, this.noSelectable = !1, this.selectableRangeColumns = !1, this.selectableRangeRows = !1, this.selectableRangeClearCells = !1, this.editTriggerEvent = "dblclick", this.selectableRangeAutoFocus = !1, this.noClipboard = !1, this.clipboardAction = Kt.Both, this.clipboardCopyRowRange = "range", this.clipboardPasteParser = void 0, this.clipboardPasteAction = "insert", this.clipboardCopyConfig = { columnHeaders: !1 }, this.clipboardNoCopyStyled = !1, this.pagination = !1, this.paginationMode = Qe.Local, this.paginationSize = void 0, this.paginationInitialPage = 1, this.paginationButtonCount = 5, this.showPaginationButtons = !1, this.hidePaginationInput = !1, this.pageSizeOptions = void 0, this.paginationAddRow = "page", this.paginationCounter =
|
|
19065
|
+
), this.validationTooltipAnchor = null, this.validationTooltipHidePromise = null, this.movableRows = !1, this.movableColumns = !1, this.data = void 0, this.rowHeight = 48, this.layout = "fitColumns", this.columns = [], this.footerElement = void 0, this.responsiveLayout = !1, this.responsiveLayoutCollapseFormatter = void 0, this.responsiveLayoutCollapseUseFormatters = void 0, this.rowHeader = void 0, this.noHeader = !1, this.textDirection = void 0, this.responsiveLayoutCollapseStartOpen = void 0, this.renderVerticalBuffer = void 0, this.renderVertical = "virtual", this.validateOnLoad = !1, this.validationWorkerThreshold = void 0, this.columnDefaults = {}, this.canSearch = !1, this.noAdvancedSearch = !1, this.showSavedSearch = !1, this.searchFields = [], this.searchMatchAnyKeyword = !1, this.canAdd = !1, this.addLabel = this.localize.term("add"), this.canExportCsv = !1, this.canExportXml = !1, this.canExportPdf = !1, this.canExportCustom = !1, this.canSaveReport = !1, this.savedSearchURL = "", this.savedSearchItems = [], this.savedSearchPageSizeParam = "PageSize", this.savedSearchPageSize = 10, this.savedSearchPageNumberParam = "PageNumber", this.dropdownFilters = [], this.groupByOptions = [], this.ajaxURL = void 0, this.ajaxMethod = "GET", this.ajaxURLGenerator = void 0, this.ajaxParams = void 0, this.ajaxResponse = void 0, this.facetConfig = void 0, this.dataSendParams = void 0, this.dataReceiveParams = void 0, this.noAutoResize = !1, this.resizableRows = !1, this.resizableColumnFit = !1, this.resizableColumnGuide = !1, this.resizableRowGuide = !1, this.frozenRows = void 0, this.frozenRowsField = "id", this.placeholder = this.localize.term("noData"), this.groupBy = void 0, this.groupHeader = void 0, this.groupHeaderCount = !1, this.groupHeaderUseFormatter = !1, this.groupIndent = 36, this.groupHeaderPrint = void 0, this.groupHeaderClipboard = void 0, this.groupHeaderDownload = void 0, this.groupHeaderHtmlOutput = void 0, this.groupStartOpen = !1, this.groupStartOpenValues = void 0, this.groupToggleElement = "arrow", this.groupValues = [], this.groupUpdateOnCellEdit = !1, this.groupLoadMoreMeta = {}, this.dataTree = !1, this.dataTreeChildField = "_children", this.dataTreeLoadingField = "loading", this.dataTreeHasMoreField = "hasMore", this.dataTreeFilter = !1, this.dataTreeSort = !1, this.dataTreeElementColumn = void 0, this.dataTreeChildIndent = 9, this.dataTreeStartExpanded = !1, this.dataTreeSelectPropagate = !1, this.dataTreeExpandElement = void 0, this.dataTreeCollapseElement = void 0, this.spreadsheet = !1, this.spreadsheetColumns = 50, this.spreadsheetRows = 50, this.spreadsheetColumnDefinition = void 0, this.spreadsheetOutputFull = !1, this.editorEmptyValue = "", this.spreadsheetSheets = void 0, this.spreadsheetSheetTabs = !1, this.spreadsheetData = void 0, this.selectableRange = 1, this.noSelectable = !1, this.selectableRangeColumns = !1, this.selectableRangeRows = !1, this.selectableRangeClearCells = !1, this.editTriggerEvent = "dblclick", this.selectableRangeAutoFocus = !1, this.noClipboard = !1, this.clipboardAction = Kt.Both, this.clipboardCopyRowRange = "range", this.clipboardPasteParser = void 0, this.clipboardPasteAction = "insert", this.clipboardCopyConfig = { columnHeaders: !1 }, this.clipboardNoCopyStyled = !1, this.pagination = !1, this.paginationMode = Qe.Local, this.paginationSize = void 0, this.paginationInitialPage = 1, this.paginationButtonCount = 5, this.showPaginationButtons = !1, this.hidePaginationInput = !1, this.pageSizeOptions = void 0, this.paginationAddRow = "page", this.paginationCounter = Jr.Both, this.paginationShowFirst = !1, this.paginationShowLast = !1, this.paginationPlacement = ki.TopEnd, this.hoverMenu = void 0, this.label = "", this.tabulatorRole = "grid", this.columnGroupRole = "columngroup", this.columnHeaderRole = "columnheader", this.rowRole = "row", this.rowGroupRole = "rowgroup", this.cellRole = "gridcell", this.filterMode = Qe.Local, this.placeholderHeaderFilter = "No matching data", this.noColumnPlaceholderText = this.localize.term("noColumnsVisible"), this.useOverlayScrollbar = !1, this.loading = !1, this.canSelectAll = !1, this.rowIdField = "id", this.dataUrl = "", this.dateFilterCompareFormat = qt.IsoDateTime, this.dataFormat = Te.Auto, this.preserveColumnsOnLoad = !1, this.tabulatorInstance = null, this.watchedEvents = /* @__PURE__ */ new Set(), this.activeSearchValue = "", this.dataUrlRequestId = 0, this.hasFacets = !1, this.handleTableBuilt = () => {
|
|
19048
19066
|
this.useOverlayScrollbar ? this.initVerticalScrollbar() : this.verticalOsInstance?.destroy(), this.initHorizontalScrollbar(), this.initOverflowObserver(), this.filterController.syncDropdownFilterSources(this.dropdownFilters), this.handleSearch(), this.filterController.applyFilters(), this.placePaginator(), this.dataUrl && this.loadFromDataUrl();
|
|
19049
19067
|
}, this.handleValidationChanged = (t) => {
|
|
19050
19068
|
this.validationTooltipAnchor && !this.validationTooltipAnchor.isConnected && this.hideValidationTooltip(), this.emit("cx-table-validation-change", { detail: t });
|
|
@@ -19081,8 +19099,12 @@ let b = class extends tt {
|
|
|
19081
19099
|
get showPaginationFooter() {
|
|
19082
19100
|
return this.pagination && this.isBottomPlacement;
|
|
19083
19101
|
}
|
|
19102
|
+
/** True when either the default add button or a custom `add-action` slot should render. */
|
|
19103
|
+
get hasAddAction() {
|
|
19104
|
+
return this.canAdd || this.hasSlotController.test("add-action");
|
|
19105
|
+
}
|
|
19084
19106
|
get showTableToolbar() {
|
|
19085
|
-
return this.pagination || this.label || this.canSearch || this.showSavedSearch || this.canSaveReport || this.canSelectAll || this.groupByOptions.length > 0 || this.hasFacets;
|
|
19107
|
+
return this.pagination || this.label || this.hasAddAction || this.canSearch || this.showSavedSearch || this.canSaveReport || this.canSelectAll || this.groupByOptions.length > 0 || this.hasFacets;
|
|
19086
19108
|
}
|
|
19087
19109
|
/** True when all active enabled rows are selected (local) or select-all mode with no exclusions (remote). */
|
|
19088
19110
|
get selectAllActive() {
|
|
@@ -19185,7 +19207,7 @@ let b = class extends tt {
|
|
|
19185
19207
|
groupHeaderUseFormatter: this.groupHeaderUseFormatter,
|
|
19186
19208
|
groupIndent: this.groupIndent,
|
|
19187
19209
|
groupLoadMoreMeta: this.groupLoadMoreMeta,
|
|
19188
|
-
groupStartOpen: Qd(this, Vs,
|
|
19210
|
+
groupStartOpen: Qd(this, Vs, Hr),
|
|
19189
19211
|
groupToggleElement: this.groupToggleElement,
|
|
19190
19212
|
groupUpdateOnCellEdit: this.groupUpdateOnCellEdit,
|
|
19191
19213
|
groupValues: this.groupValues,
|
|
@@ -19489,12 +19511,20 @@ let b = class extends tt {
|
|
|
19489
19511
|
handleSelectAllChange(e) {
|
|
19490
19512
|
this.selectAllController.handleSelectAllChange(e.detail.checked);
|
|
19491
19513
|
}
|
|
19514
|
+
/**
|
|
19515
|
+
* Controlled by `preserveColumnsOnLoad`: when enabled and the consumer already defined
|
|
19516
|
+
* `columns` (e.g. a custom column with its own `mutator`), a `dataUrl` load keeps them as-is.
|
|
19517
|
+
* Otherwise columns are auto-detected from the loaded data's headers, same as before.
|
|
19518
|
+
*/
|
|
19519
|
+
resolveColumnsAfterLoad(e) {
|
|
19520
|
+
return this.preserveColumnsOnLoad && this.columns && this.columns.length > 0 ? this.columns : e;
|
|
19521
|
+
}
|
|
19492
19522
|
async streamCsvData(e, t) {
|
|
19493
19523
|
let i = !0;
|
|
19494
19524
|
const o = await Vd(
|
|
19495
19525
|
e,
|
|
19496
19526
|
(r) => {
|
|
19497
|
-
t === this.dataUrlRequestId && (this.columns = r);
|
|
19527
|
+
t === this.dataUrlRequestId && (this.columns = this.resolveColumnsAfterLoad(r));
|
|
19498
19528
|
},
|
|
19499
19529
|
async (r) => {
|
|
19500
19530
|
t === this.dataUrlRequestId && (i ? (await this.tabulatorInstance?.setData(r), i = !1) : await this.tabulatorInstance?.addData(r), await new Promise((a) => requestAnimationFrame(() => a())));
|
|
@@ -19515,7 +19545,7 @@ let b = class extends tt {
|
|
|
19515
19545
|
r = await Bd(
|
|
19516
19546
|
e,
|
|
19517
19547
|
(a) => {
|
|
19518
|
-
t === this.dataUrlRequestId && (this.columns = a);
|
|
19548
|
+
t === this.dataUrlRequestId && (this.columns = this.resolveColumnsAfterLoad(a));
|
|
19519
19549
|
},
|
|
19520
19550
|
o
|
|
19521
19551
|
);
|
|
@@ -19539,7 +19569,7 @@ let b = class extends tt {
|
|
|
19539
19569
|
r = await Id(
|
|
19540
19570
|
e,
|
|
19541
19571
|
(a) => {
|
|
19542
|
-
t === this.dataUrlRequestId && (this.columns = a);
|
|
19572
|
+
t === this.dataUrlRequestId && (this.columns = this.resolveColumnsAfterLoad(a));
|
|
19543
19573
|
},
|
|
19544
19574
|
o
|
|
19545
19575
|
);
|
|
@@ -19612,22 +19642,26 @@ let b = class extends tt {
|
|
|
19612
19642
|
return S`<cx-space part="base" direction="vertical" spacing="large" wrap="nowrap" class=${at({
|
|
19613
19643
|
container: !0,
|
|
19614
19644
|
"container--overlay-scrollbar": this.useOverlayScrollbar
|
|
19615
|
-
})}>${
|
|
19645
|
+
})}>${X(
|
|
19616
19646
|
this.showTableToolbar,
|
|
19617
19647
|
() => S`<cx-table-toolbar label=${this.label} ?pagination=${this.pagination} pagination-placement=${Q(
|
|
19618
19648
|
this.pagination ? this.paginationPlacement : void 0
|
|
19619
|
-
)} ?can-search=${this.canSearch} search-value=${this.searchValue} ?can-add=${this.canAdd} add-label=${this.addLabel} ?can-export-csv=${this.canExportCsv} ?can-export-xml=${this.canExportXml} ?can-export-pdf=${this.canExportPdf} ?can-export-custom=${this.canExportCustom} ?can-save-report=${this.canSaveReport} ?show-saved-search=${this.showSavedSearch} ?no-advanced-search=${this.noAdvancedSearch} .dropdownFilters=${this.dropdownFilters} .groupByOptions=${this.groupByOptions} group-by-value=${typeof this.groupBy == "string" ? this.groupBy : ""} saved-search-url=${this.savedSearchURL} .savedSearchItems=${this.savedSearchItems} saved-search-page-size-param=${this.savedSearchPageSizeParam} saved-search-page-size=${this.savedSearchPageSize} saved-search-page-number-param=${this.savedSearchPageNumberParam} .selectAllState=${this.canSelectAll ? this.selectAllController.state : null} @cx-search=${this.handleSearch} @cx-table-export=${this.handleTableExport} @cx-table-dropdown-filter-change=${this.handleDropdownFilterChange} @cx-table-group-by-change=${this.handleTableGroupByChange} @cx-table-select-all-change=${this.handleSelectAllChange}><slot name="select-all-actions" slot="select-all-actions"></slot>${
|
|
19649
|
+
)} ?can-search=${this.canSearch} search-value=${this.searchValue} ?can-add=${this.canAdd} add-label=${this.addLabel} ?can-export-csv=${this.canExportCsv} ?can-export-xml=${this.canExportXml} ?can-export-pdf=${this.canExportPdf} ?can-export-custom=${this.canExportCustom} ?can-save-report=${this.canSaveReport} ?show-saved-search=${this.showSavedSearch} ?no-advanced-search=${this.noAdvancedSearch} .dropdownFilters=${this.dropdownFilters} .groupByOptions=${this.groupByOptions} group-by-value=${typeof this.groupBy == "string" ? this.groupBy : ""} saved-search-url=${this.savedSearchURL} .savedSearchItems=${this.savedSearchItems} saved-search-page-size-param=${this.savedSearchPageSizeParam} saved-search-page-size=${this.savedSearchPageSize} saved-search-page-number-param=${this.savedSearchPageNumberParam} .selectAllState=${this.canSelectAll ? this.selectAllController.state : null} @cx-search=${this.handleSearch} @cx-table-export=${this.handleTableExport} @cx-table-dropdown-filter-change=${this.handleDropdownFilterChange} @cx-table-group-by-change=${this.handleTableGroupByChange} @cx-table-select-all-change=${this.handleSelectAllChange}><slot name="select-all-actions" slot="select-all-actions"></slot>${X(
|
|
19620
19650
|
this.hasFacets,
|
|
19621
19651
|
() => S`<cx-faceted-filter slot="dialog-dynamic-filter" .facets=${this.ajaxFacetsController.facets} .availableFacets=${this.ajaxFacetsController.availableFacets}></cx-faceted-filter>`
|
|
19652
|
+
)}
|
|
19653
|
+
${X(
|
|
19654
|
+
this.hasSlotController.test("add-action"),
|
|
19655
|
+
() => S`<slot name="add-action" slot="add-action"></slot>`
|
|
19622
19656
|
)}</cx-table-toolbar>`
|
|
19623
|
-
)}<div part="table" class="table" @mouseover=${this.handleValidationMouseOver} @mouseout=${this.handleValidationMouseOut}></div>${
|
|
19657
|
+
)}<div part="table" class="table" @mouseover=${this.handleValidationMouseOver} @mouseout=${this.handleValidationMouseOut}></div>${X(
|
|
19624
19658
|
this.showPaginationFooter,
|
|
19625
19659
|
() => S`<cx-table-footer part="pagination-footer" pagination-placement=${this.paginationPlacement}></cx-table-footer>`
|
|
19626
19660
|
)}</cx-space><cx-tooltip class="validation-tooltip" trigger="manual" disabled-hover-bridge></cx-tooltip>`;
|
|
19627
19661
|
}
|
|
19628
19662
|
};
|
|
19629
19663
|
Vs = /* @__PURE__ */ new WeakSet();
|
|
19630
|
-
|
|
19664
|
+
Hr = function() {
|
|
19631
19665
|
return this.groupStartOpenValues !== void 0 && this.groupStartOpenValues !== null ? (n) => this.groupStartOpenValues?.includes(n) ?? !1 : this.groupStartOpen;
|
|
19632
19666
|
};
|
|
19633
19667
|
b.styles = [
|
|
@@ -19644,7 +19678,7 @@ b.dependencies = {
|
|
|
19644
19678
|
"cx-icon-button": Is,
|
|
19645
19679
|
"cx-select": sn,
|
|
19646
19680
|
"cx-space": si,
|
|
19647
|
-
"cx-spinner":
|
|
19681
|
+
"cx-spinner": fr,
|
|
19648
19682
|
"cx-table-footer": ti,
|
|
19649
19683
|
"cx-table-row-actions": Et,
|
|
19650
19684
|
"cx-table-toolbar": q,
|
|
@@ -20495,6 +20529,9 @@ v([
|
|
|
20495
20529
|
v([
|
|
20496
20530
|
g({ attribute: "data-format", type: String })
|
|
20497
20531
|
], b.prototype, "dataFormat", 2);
|
|
20532
|
+
v([
|
|
20533
|
+
g({ attribute: "preserve-columns-on-load", type: Boolean })
|
|
20534
|
+
], b.prototype, "preserveColumnsOnLoad", 2);
|
|
20498
20535
|
v([
|
|
20499
20536
|
ce()
|
|
20500
20537
|
], b.prototype, "tabulatorInstance", 2);
|
|
@@ -20675,7 +20712,7 @@ const eu = b;
|
|
|
20675
20712
|
var Ve = /* @__PURE__ */ ((n) => (n.Circles = "circles", n.Grid = "grid", n.Table = "table", n))(Ve || {});
|
|
20676
20713
|
const ar = 165, tu = ["HEX", "RGB", "CMYK", "PMS"], iu = {
|
|
20677
20714
|
resizable: !1
|
|
20678
|
-
},
|
|
20715
|
+
}, Nr = [
|
|
20679
20716
|
{
|
|
20680
20717
|
field: "hex",
|
|
20681
20718
|
formatter: (n) => {
|
|
@@ -20748,10 +20785,10 @@ function mi(n, e, t) {
|
|
|
20748
20785
|
verticalAlign: "middle",
|
|
20749
20786
|
whiteSpace: "nowrap"
|
|
20750
20787
|
})}>${i}</span></cx-copy-button>`, o = document.createDocumentFragment();
|
|
20751
|
-
return
|
|
20788
|
+
return Ir(s, o), o.firstElementChild;
|
|
20752
20789
|
}
|
|
20753
20790
|
const su = (n, e) => [
|
|
20754
|
-
...
|
|
20791
|
+
...Nr.slice(0, 2),
|
|
20755
20792
|
{
|
|
20756
20793
|
field: "hex",
|
|
20757
20794
|
formatter: (t) => mi(n, t, e),
|
|
@@ -20803,7 +20840,7 @@ let de = class extends tt {
|
|
|
20803
20840
|
this.setAttribute("role", "region"), this.setAttribute("aria-label", this.localize.term("colorSwatches")), this.setAttribute(
|
|
20804
20841
|
"aria-roledescription",
|
|
20805
20842
|
this.localize.term("colorSwatches")
|
|
20806
|
-
), this.breakpoints =
|
|
20843
|
+
), this.breakpoints = Gr(this, this.breakpoints), this.handleResize();
|
|
20807
20844
|
}
|
|
20808
20845
|
runConnectedCallback() {
|
|
20809
20846
|
window.addEventListener("resize", this.handleWindowResize);
|
|
@@ -20827,7 +20864,7 @@ let de = class extends tt {
|
|
|
20827
20864
|
break;
|
|
20828
20865
|
}
|
|
20829
20866
|
case Ve.Circles: {
|
|
20830
|
-
this.deviceType =
|
|
20867
|
+
this.deviceType = Ur(this.breakpoints);
|
|
20831
20868
|
break;
|
|
20832
20869
|
}
|
|
20833
20870
|
}
|
|
@@ -20849,7 +20886,7 @@ let de = class extends tt {
|
|
|
20849
20886
|
* Filter out the columns that are not in the showCodes
|
|
20850
20887
|
*/
|
|
20851
20888
|
getTableColumns(n) {
|
|
20852
|
-
const e = this.canCopy ? su(this.localize, n) :
|
|
20889
|
+
const e = this.canCopy ? su(this.localize, n) : Nr;
|
|
20853
20890
|
return [
|
|
20854
20891
|
...e.slice(0, 2),
|
|
20855
20892
|
...e.slice(2).filter(
|
|
@@ -20899,7 +20936,7 @@ let de = class extends tt {
|
|
|
20899
20936
|
render() {
|
|
20900
20937
|
const n = this.currentDirection, e = this.localize.lang();
|
|
20901
20938
|
return S`
|
|
20902
|
-
${
|
|
20939
|
+
${X(
|
|
20903
20940
|
this.variant === Ve.Table,
|
|
20904
20941
|
() => S`<cx-space class="color-swatch-group__swatches" direction="vertical" spacing="2x-small">${yo(
|
|
20905
20942
|
[this.data, this.canCopy],
|