@orangelogic/design-system 2.131.0 → 2.133.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.D_VITxRH.js → asset.CcxcYY9d.js} +2 -2
- package/library/chunks/{button.DcInI7IV.js → button.DYoFn504.js} +1 -1
- package/library/chunks/calendar-grid.CvdcwfTo.js +34 -0
- package/library/chunks/checkbox.uH0uF0OV.js +198 -0
- package/library/chunks/{color-swatch-group.Cy-M_lbx.js → color-swatch-group.DlTVQ3Ul.js} +3 -3
- package/library/chunks/{color-swatch.U-wztpLf.js → color-swatch.0zyBEfL_.js} +1 -1
- package/library/chunks/{confirm-popover.DfAd2F8S.js → confirm-popover.DpVYvK20.js} +3 -3
- package/library/chunks/{date-picker.D0SJADN6.js → date-picker.DTUICGb9.js} +2 -2
- package/library/chunks/date.dSYNLBVO.js +77 -0
- package/library/chunks/{dialog.BlKHLwFx.js → dialog.BwBD_hJi.js} +2 -2
- package/library/chunks/{document-viewer.Dn_vUYCW.js → document-viewer.BM716ovi.js} +6 -6
- package/library/chunks/{dot-pagination.CNJWQ4zf.js → dot-pagination.B70lV5Av.js} +1 -1
- package/library/chunks/{file-on-demand.Dr05DdkU.js → file-on-demand.D-Ectby2.js} +9 -9
- package/library/chunks/{folder-select.DMpO7oQF.js → folder-select.DHV6f6TA.js} +48 -48
- package/library/chunks/{header.WRWyUU36.js → header.BMGvKrdP.js} +1 -1
- package/library/chunks/{i18n.NAH4U8Lw.js → i18n.DoMIwXr2.js} +61 -45
- package/library/chunks/{icon-button.COTH_z-J.js → icon-button.B-Jf9W3v.js} +1 -1
- package/library/chunks/{iframe.DvBR4KYU.js → iframe.Cdv6esyS.js} +1 -1
- package/library/chunks/image.BzmclWBR.js +150 -0
- package/library/chunks/{image.BC_hwk-b.js → image.SLqIVjqc.js} +1 -1
- package/library/chunks/{input.BRgVRr2i.js → input.CQNhMu4z.js} +1 -1
- package/library/chunks/{list-editor.CdMU7vNF.js → list-editor.BXY4UIAI.js} +9 -9
- package/library/chunks/{option.BH13eKSl.js → option.SCVixE2L.js} +1 -1
- package/library/chunks/{pagination.tSkuYrqk.js → pagination.BFE6Nk3_.js} +5 -5
- package/library/chunks/{tab-group.GA4X3LL2.js → tab-group.C-p2Dljr.js} +3 -3
- package/library/chunks/{table.C6YsaNOh.js → table.DuP4v5FN.js} +3581 -2656
- package/library/chunks/{tree.CbeHY8pn.js → tree.9PK8ifJd.js} +2 -2
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +8 -8
- package/library/components/atoms.js +22 -22
- package/library/components/audio.js +2 -2
- 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/checkbox.js +18 -195
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +4 -4
- 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/cropper.js +1 -1
- package/library/components/date-calendar.js +10 -9
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +77 -51
- 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 +2 -2
- 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 +38 -23
- 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/list-editor.js +7 -7
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +1 -1
- package/library/components/molecules.js +4 -4
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- 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/table.js +16 -16
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +3 -3
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +38201 -38461
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +3 -0
- package/library/packages/atoms/src/components/diff/utils/diff-worker-client.d.ts +2 -1
- package/library/packages/atoms/src/components/format-date/format-date.d.ts +8 -0
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
- package/library/packages/atoms/src/components/table/components/table-toolbar/table-dropdown-filter.d.ts +1 -1
- package/library/packages/atoms/src/components/table/components/table-toolbar/table-group-by-dropdown.d.ts +44 -0
- package/library/packages/atoms/src/components/table/components/table-toolbar/table-saved-search-dropdown.d.ts +1 -1
- package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +33 -1
- package/library/packages/atoms/src/components/table/controllers/ajax-facets/ajax-facet-data-controller.d.ts +39 -0
- package/library/packages/atoms/src/components/table/controllers/ajax-facets/ajax-facet-filter-controller.d.ts +27 -0
- package/library/packages/atoms/src/components/table/{filter-controller.d.ts → controllers/filter-controller.d.ts} +24 -3
- package/library/packages/atoms/src/components/table/controllers/select-all-controller.d.ts +55 -0
- package/library/packages/atoms/src/components/table/table.d.ts +70 -1
- package/library/packages/events/src/cx-table-dropdown-filter-change.d.ts +1 -1
- package/library/packages/events/src/cx-table-export.d.ts +1 -1
- package/library/packages/events/src/cx-table-group-by-change.d.ts +8 -0
- package/library/packages/events/src/cx-table-select-all-change.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +2 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/core/TabulatorFull.d.ts +1 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/avatar.d.ts +5 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/date.d.ts +12 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/diff.d.ts +2 -1
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters.d.ts +4 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/GroupRows/Group.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/GroupRows/GroupRows.d.ts +7 -0
- package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRow/extensions/formatters/rowSelection.d.ts +1 -1
- package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +2 -0
- package/library/packages/types/src/faceted-filter.d.ts +11 -0
- package/library/packages/types/src/format-date.d.ts +12 -0
- package/library/packages/types/src/table.d.ts +40 -21
- package/library/packages/utils/src/custom-element/i18n-utils.d.ts +7 -0
- package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
- package/library/react-web-component.d.ts +278 -246
- package/library/utils.js +86 -85
- package/package.json +1 -1
- package/library/assets/diff.worker-ClilI1xm.js +0 -1
- package/library/chunks/calendar-grid.CXYoS6VA.js +0 -108
- package/library/chunks/image.9qwbjGNb.js +0 -150
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { C as Y } from "./icon.DnBh6-56.js";
|
|
2
|
-
import { C as de } from "./input.
|
|
2
|
+
import { C as de } from "./input.CQNhMu4z.js";
|
|
3
3
|
import ee from "../components/line-clamp.js";
|
|
4
4
|
import pe from "../components/select.js";
|
|
5
5
|
import ue from "../components/tag.js";
|
|
6
|
-
import { C as
|
|
6
|
+
import { C as $, a as fe } from "./tree.9PK8ifJd.js";
|
|
7
7
|
import { n as l, C as B } from "./lib-cortex-element.CVMmyPMC.js";
|
|
8
8
|
import { h as L, F as me, c as ye } from "./endpoints.6E17hFiK.js";
|
|
9
9
|
import { M as P } from "./asset-link-format.QzzboHHE.js";
|
|
10
10
|
import { c as te } from "./component.styles.CRO4Odto.js";
|
|
11
11
|
import { c as W } from "./custom-element.L4WJXn1j.js";
|
|
12
|
-
import { L as q } from "./i18n.
|
|
12
|
+
import { L as q } from "./i18n.DoMIwXr2.js";
|
|
13
13
|
import { w as f } from "./watch.CThbualB.js";
|
|
14
14
|
import { x as m, i as xe } from "./lit-element.jLBm65_O.js";
|
|
15
15
|
import { r as x } from "./state.CSDxrqLd.js";
|
|
16
16
|
import { e as re } from "./query.BBf1UFkC.js";
|
|
17
17
|
import { r as ge } from "./choose.BTbF6BAn.js";
|
|
18
|
-
import { C as se } from "./button.
|
|
18
|
+
import { C as se } from "./button.DYoFn504.js";
|
|
19
19
|
import { d as be } from "./debounce.DaHuiSGU.js";
|
|
20
20
|
import { g as G, p as Z, e as $e } from "./string.CbnVBzsd.js";
|
|
21
21
|
import { o as y } from "./if-defined.BRoBj_Rp.js";
|
|
@@ -25,7 +25,7 @@ import { n as w } from "./when.Dr1es41R.js";
|
|
|
25
25
|
import ve from "../components/space.js";
|
|
26
26
|
import { g as Fe } from "./template.ClovJacp.js";
|
|
27
27
|
import { e as Te } from "./class-map.BiVq-cVR.js";
|
|
28
|
-
var
|
|
28
|
+
var S = /* @__PURE__ */ ((e) => (e.CortexPath = "Document.CortexPath", e.DocType = "CoreField.DocType", e.HasBrowserChildren = "Document.HasBrowserChildren", e.RepresentativeAssetId = "Document.DocumentDirectRepresentativeRID", e.TitleWithFallback = "CoreField.TitleWithFallback", e.rawDocSubtype = "Document.RawDocSubType", e))(S || {});
|
|
29
29
|
const Ie = 50;
|
|
30
30
|
async function H({
|
|
31
31
|
allowedFolders: e,
|
|
@@ -36,12 +36,12 @@ async function H({
|
|
|
36
36
|
includeDirectChild: p,
|
|
37
37
|
limit: u = Ie,
|
|
38
38
|
searchTerm: g,
|
|
39
|
-
self:
|
|
39
|
+
self: I,
|
|
40
40
|
start: N = 0,
|
|
41
41
|
token: ne
|
|
42
42
|
}) {
|
|
43
43
|
let O = [], Q = p ?? !0;
|
|
44
|
-
e && e.length > 0 && !s ? (O = e,
|
|
44
|
+
e && e.length > 0 && !s ? (O = e, I = !0, Q = !1) : s && (O = [s]);
|
|
45
45
|
try {
|
|
46
46
|
return (await L.request({
|
|
47
47
|
baseURL: t,
|
|
@@ -55,7 +55,7 @@ async function H({
|
|
|
55
55
|
Limit: u,
|
|
56
56
|
ObjectRecordIDs: O,
|
|
57
57
|
SeeThru: !!g,
|
|
58
|
-
Self:
|
|
58
|
+
Self: I,
|
|
59
59
|
Start: N,
|
|
60
60
|
Text: g || void 0,
|
|
61
61
|
Token: ne || void 0
|
|
@@ -66,32 +66,32 @@ async function H({
|
|
|
66
66
|
responseType: "json",
|
|
67
67
|
transformResponse: [
|
|
68
68
|
...Array.isArray(L.defaults.transformResponse) ? L.defaults.transformResponse : [],
|
|
69
|
-
(
|
|
69
|
+
(v, Re, R) => {
|
|
70
70
|
if (R !== void 0 && (R < 200 || R >= 300))
|
|
71
71
|
return {
|
|
72
72
|
data: [],
|
|
73
73
|
hasMore: !1,
|
|
74
74
|
totalCount: 0
|
|
75
75
|
};
|
|
76
|
-
if (!
|
|
76
|
+
if (!v || typeof v != "object")
|
|
77
77
|
throw new Error("Invalid response format");
|
|
78
|
-
const he =
|
|
78
|
+
const he = v.contentItems?.length ?? 0;
|
|
79
79
|
return {
|
|
80
|
-
data:
|
|
81
|
-
const E = b.fields[
|
|
80
|
+
data: v.contentItems?.map((b) => {
|
|
81
|
+
const E = b.fields[S.DocType] ?? "", U = b.fields[S.TitleWithFallback] ?? "", k = b.fields[S.CortexPath] ?? "", M = k.endsWith("/") && k.length > 1 ? k.slice(0, -1) : k;
|
|
82
82
|
let j = M;
|
|
83
83
|
return (E === P.Album || E === P.ProjectDocument) && (j = M ? `${M}/${U}` : U), {
|
|
84
84
|
docType: E,
|
|
85
85
|
fullPath: j,
|
|
86
|
-
hasChildren: b.fields[
|
|
86
|
+
hasChildren: b.fields[S.HasBrowserChildren] === "1",
|
|
87
87
|
id: b.recordID,
|
|
88
|
-
isShared: b.fields[
|
|
89
|
-
representativeAssetId: b.fields[
|
|
88
|
+
isShared: b.fields[S.rawDocSubtype] === "DO_OR1ND000001913488",
|
|
89
|
+
representativeAssetId: b.fields[S.RepresentativeAssetId] ?? "",
|
|
90
90
|
title: U
|
|
91
91
|
};
|
|
92
92
|
}) ?? [],
|
|
93
|
-
hasMore: N + he <
|
|
94
|
-
totalCount:
|
|
93
|
+
hasMore: N + he < v.totalCount,
|
|
94
|
+
totalCount: v.totalCount
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
],
|
|
@@ -105,7 +105,7 @@ async function H({
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
var
|
|
108
|
+
var C = /* @__PURE__ */ ((e) => (e.Input = "input", e.Select = "select", e))(C || {}), Ce = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, d = (e, t, r, a) => {
|
|
109
109
|
for (var s = a > 1 ? void 0 : a ? _e(t, r) : t, p = e.length - 1, u; p >= 0; p--)
|
|
110
110
|
(u = e[p]) && (s = (a ? u(t, r, s) : u(s)) || s);
|
|
111
111
|
return a && s && Ce(t, r, s), s;
|
|
@@ -190,8 +190,8 @@ let o = class extends B {
|
|
|
190
190
|
const g = $e(u);
|
|
191
191
|
if (!g.path.trim() || !g.id.trim())
|
|
192
192
|
continue;
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
193
|
+
const I = Z(g.path);
|
|
194
|
+
if (I.startsWith(r) && I !== r) {
|
|
195
195
|
s = !0;
|
|
196
196
|
break;
|
|
197
197
|
}
|
|
@@ -222,7 +222,7 @@ o.dependencies = {
|
|
|
222
222
|
"cx-icon": Y,
|
|
223
223
|
"cx-line-clamp": ee,
|
|
224
224
|
"cx-space": ve,
|
|
225
|
-
"cx-tree-item":
|
|
225
|
+
"cx-tree-item": $
|
|
226
226
|
};
|
|
227
227
|
d([
|
|
228
228
|
re("cx-tree-item")
|
|
@@ -316,10 +316,10 @@ var De = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, le = (e) =
|
|
|
316
316
|
for (var s = a > 1 ? void 0 : a ? ke(t, r) : t, p = e.length - 1, u; p >= 0; p--)
|
|
317
317
|
(u = e[p]) && (s = (a ? u(t, r, s) : u(s)) || s);
|
|
318
318
|
return a && s && De(t, r, s), s;
|
|
319
|
-
}, ae = (e, t, r) => t.has(e) || le("Cannot " + r),
|
|
319
|
+
}, ae = (e, t, r) => t.has(e) || le("Cannot " + r), F = (e, t, r) => (ae(e, t, "read from private field"), t.get(e)), z = (e, t, r) => t.has(e) ? le("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), J = (e, t, r, a) => (ae(e, t, "write to private field"), t.set(e, r), r), _, V, D;
|
|
320
320
|
let n = class extends B {
|
|
321
321
|
constructor() {
|
|
322
|
-
super(...arguments), this.localize = new q(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.seeThru = !1, this.extraFolderData = null, this.api = H, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.autoPageSize = !1, this.data = [], this.hasMore = !1, this.loading = !1, this.preloadedFolders = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], z(this,
|
|
322
|
+
super(...arguments), this.localize = new q(this), this.minQueryLength = 1, this.selection = "single", this.searchTerm = "", this.selectedValue = "", this.token = "", this.bearerToken = "", this.baseUrl = "", this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.seeThru = !1, this.extraFolderData = null, this.api = H, this.excludeVirtualFolders = !1, this.firstFetchCallback = null, this.autoPageSize = !1, this.data = [], this.hasMore = !1, this.loading = !1, this.preloadedFolders = [], this.currentRootIDsSet = /* @__PURE__ */ new Set(), this.removedIDs = [], z(this, _, !1), z(this, V, 10), z(this, D, /* @__PURE__ */ new Set());
|
|
323
323
|
}
|
|
324
324
|
get empty() {
|
|
325
325
|
return !this.loading && this.data.length === 0;
|
|
@@ -406,10 +406,10 @@ let n = class extends B {
|
|
|
406
406
|
}
|
|
407
407
|
async handleFetchFolders() {
|
|
408
408
|
const { data: e, hasMore: t } = await this.fetchFolders();
|
|
409
|
-
|
|
409
|
+
F(this, _) || (e.length > 0 && this.firstFetchCallback?.(e), J(this, _, !0)), this.data = e, this.hasMore = t, this.loading = !1, this.seedSelectionFromValue(e), this.removePreloadedFolders(e), await this.preloadSelectedFolders();
|
|
410
410
|
}
|
|
411
411
|
async handleSelectedValueChange() {
|
|
412
|
-
if (
|
|
412
|
+
if (!F(this, _))
|
|
413
413
|
return;
|
|
414
414
|
const e = new Set(
|
|
415
415
|
this.selectedValue.split(/[\s,]+/).filter(Boolean)
|
|
@@ -433,7 +433,7 @@ let n = class extends B {
|
|
|
433
433
|
bearerToken: this.bearerToken,
|
|
434
434
|
excludeVirtualFolders: this.excludeVirtualFolders,
|
|
435
435
|
folderId: "",
|
|
436
|
-
limit:
|
|
436
|
+
limit: F(this, V),
|
|
437
437
|
searchTerm: this.searchTerm,
|
|
438
438
|
seeThru: this.seeThru,
|
|
439
439
|
start: 0,
|
|
@@ -462,7 +462,7 @@ let n = class extends B {
|
|
|
462
462
|
...this.data.map((s) => s.id),
|
|
463
463
|
...this.extraFolderData ? [this.extraFolderData.id] : [],
|
|
464
464
|
...this.preloadedFolders.map((s) => s.id),
|
|
465
|
-
|
|
465
|
+
...F(this, D),
|
|
466
466
|
...[
|
|
467
467
|
...this.querySelectorAll(
|
|
468
468
|
"cx-folder-select-tree-item"
|
|
@@ -473,7 +473,7 @@ let n = class extends B {
|
|
|
473
473
|
);
|
|
474
474
|
if (r.length === 0)
|
|
475
475
|
return;
|
|
476
|
-
r.forEach((s) =>
|
|
476
|
+
r.forEach((s) => F(this, D).add(s));
|
|
477
477
|
const a = [];
|
|
478
478
|
if (await Promise.all(
|
|
479
479
|
r.map(async (s) => {
|
|
@@ -495,7 +495,7 @@ let n = class extends B {
|
|
|
495
495
|
} catch {
|
|
496
496
|
}
|
|
497
497
|
})
|
|
498
|
-
), r.forEach((s) =>
|
|
498
|
+
), r.forEach((s) => F(this, D).delete(s)), a.length > 0) {
|
|
499
499
|
const s = new Set(this.preloadedFolders.map((u) => u.id)), p = a.filter((u) => !s.has(u.id));
|
|
500
500
|
p.length > 0 && (this.preloadedFolders = [...this.preloadedFolders, ...p].sort(
|
|
501
501
|
(u, g) => u.title.localeCompare(g.title)
|
|
@@ -543,7 +543,7 @@ let n = class extends B {
|
|
|
543
543
|
)}`;
|
|
544
544
|
}
|
|
545
545
|
};
|
|
546
|
-
|
|
546
|
+
_ = /* @__PURE__ */ new WeakMap();
|
|
547
547
|
V = /* @__PURE__ */ new WeakMap();
|
|
548
548
|
D = /* @__PURE__ */ new WeakMap();
|
|
549
549
|
n.dependencies = {
|
|
@@ -644,17 +644,17 @@ var Ve = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, ie = (e) =
|
|
|
644
644
|
for (var s = a > 1 ? void 0 : a ? Pe(t, r) : t, p = e.length - 1, u; p >= 0; p--)
|
|
645
645
|
(u = e[p]) && (s = (a ? u(t, r, s) : u(s)) || s);
|
|
646
646
|
return a && s && Ve(t, r, s), s;
|
|
647
|
-
}, oe = (e, t, r) => t.has(e) || ie("Cannot " + r), K = (e, t, r) => (oe(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Oe = (e, t, r) => t.has(e) ? ie("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), X = (e, t, r, a) => (oe(e, t, "write to private field"), t.set(e, r), r),
|
|
647
|
+
}, oe = (e, t, r) => t.has(e) || ie("Cannot " + r), K = (e, t, r) => (oe(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Oe = (e, t, r) => t.has(e) ? ie("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), X = (e, t, r, a) => (oe(e, t, "write to private field"), t.set(e, r), r), T;
|
|
648
648
|
let i = class extends B {
|
|
649
649
|
constructor() {
|
|
650
|
-
super(), this.localize = new q(this), this.minQueryLength = 1, this.selection = "single", this.variant =
|
|
650
|
+
super(), this.localize = new q(this), this.minQueryLength = 1, this.selection = "single", this.variant = C.Input, this.value = "", this.name = "", this.selectedLabel = "", this.baseUrl = "", this.open = !1, this.token = "", this.bearerToken = "", this.seeThru = !1, this.api = H, this.required = !1, this.form = void 0, this.excludeVirtualFolders = !1, this.extraFolderId = "", this.extraFolderTitle = "", this.extraFolderIcon = "", this.autoPageSize = !1, this.firstFetchCallback = null, this.searchTerm = "", Oe(this, T), this.selectGetOptionValue = this.selectGetOptionValue.bind(this), this.selectGetOptionLabel = this.selectGetOptionLabel.bind(this), this.selectGetOptionSelected = this.selectGetOptionSelected.bind(this), this.selectFilterCallback = this.selectFilterCallback.bind(this), this.selectSetOptionSelected = this.selectSetOptionSelected.bind(this), this.selectGetTag = this.selectGetTag.bind(this), this.updateWrappedApi();
|
|
651
651
|
}
|
|
652
652
|
updateWrappedApi() {
|
|
653
653
|
if (!this.api) {
|
|
654
|
-
X(this,
|
|
654
|
+
X(this, T, void 0);
|
|
655
655
|
return;
|
|
656
656
|
}
|
|
657
|
-
X(this,
|
|
657
|
+
X(this, T, async (e) => {
|
|
658
658
|
try {
|
|
659
659
|
return await this.api(e);
|
|
660
660
|
} catch (t) {
|
|
@@ -696,17 +696,17 @@ let i = class extends B {
|
|
|
696
696
|
), this.selectEl.handleDefaultSlotChange(), await this.selectEl.updateComplete, this.selectEl.displayLabel = this.searchTerm);
|
|
697
697
|
}
|
|
698
698
|
selectGetOptionValue(e) {
|
|
699
|
-
return !e || !(e instanceof
|
|
699
|
+
return !e || !(e instanceof $) ? this.value : e.dataset.id || this.value;
|
|
700
700
|
}
|
|
701
701
|
selectGetOptionLabel(e) {
|
|
702
|
-
return !e || !(e instanceof
|
|
702
|
+
return !e || !(e instanceof $) ? this.selectedLabel : e.dataset.name || this.selectedLabel;
|
|
703
703
|
}
|
|
704
704
|
selectGetOptionSelected(e) {
|
|
705
|
-
if (!(!e || !(e instanceof
|
|
705
|
+
if (!(!e || !(e instanceof $)))
|
|
706
706
|
return e.selected;
|
|
707
707
|
}
|
|
708
708
|
selectFilterCallback(e) {
|
|
709
|
-
return !(!e || !(e instanceof
|
|
709
|
+
return !(!e || !(e instanceof $));
|
|
710
710
|
}
|
|
711
711
|
/**
|
|
712
712
|
* Custom tag renderer for cx-select multi mode. Identical visuals to the
|
|
@@ -723,11 +723,11 @@ let i = class extends B {
|
|
|
723
723
|
remove-button:tag__remove-button,
|
|
724
724
|
remove-button__base:tag__remove-button__base
|
|
725
725
|
" removable @cx-remove=${(r) => {
|
|
726
|
-
r.stopPropagation(), e instanceof
|
|
726
|
+
r.stopPropagation(), e instanceof $ && (e.selected = !1);
|
|
727
727
|
}}><cx-line-clamp lines="1">${this.selectGetOptionLabel(e)}</cx-line-clamp></cx-tag>`;
|
|
728
728
|
}
|
|
729
729
|
selectSetOptionSelected(e, t) {
|
|
730
|
-
if (!(!e || !(e instanceof
|
|
730
|
+
if (!(!e || !(e instanceof $)) && this.selection !== "multiple") {
|
|
731
731
|
if (t === void 0) {
|
|
732
732
|
e.selected = !e.selected;
|
|
733
733
|
return;
|
|
@@ -748,7 +748,7 @@ let i = class extends B {
|
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
async handleVariantChange() {
|
|
751
|
-
this.variant ===
|
|
751
|
+
this.variant === C.Select && (await this.updateComplete, this.updateFunctionProps());
|
|
752
752
|
}
|
|
753
753
|
handleValueChange() {
|
|
754
754
|
this.selectEl && (this.searchTerm = "", this.selectEl.getOptionValue = this.selectGetOptionValue, this.selectEl.getOptionLabel = this.selectGetOptionLabel, this.selectEl.getOptionSelected = this.selectGetOptionSelected, this.selectEl.filterCallback = this.selectFilterCallback, this.selectEl.setOptionSelected = this.selectSetOptionSelected, this.selectEl.getTag = this.selectGetTag, this.selectEl.handleDefaultSlotChange());
|
|
@@ -756,17 +756,17 @@ let i = class extends B {
|
|
|
756
756
|
render() {
|
|
757
757
|
return m`<div class="folder-select">${ge(this.variant, [
|
|
758
758
|
[
|
|
759
|
-
|
|
760
|
-
() => m`<cx-input class="folder-select__search" aria-label=${this.localize.term("searchFolders")} placeholder=${`${this.localize.term("searchFolders")}...`} value=${this.searchTerm} clearable @cx-input=${this.handleSearchTermInputChange}><cx-icon name="search" slot="prefix"></cx-icon></cx-input><cx-folder-select-tree class="folder-select__tree" base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .api=${K(this,
|
|
759
|
+
C.Input,
|
|
760
|
+
() => m`<cx-input class="folder-select__search" aria-label=${this.localize.term("searchFolders")} placeholder=${`${this.localize.term("searchFolders")}...`} value=${this.searchTerm} clearable @cx-input=${this.handleSearchTermInputChange}><cx-icon name="search" slot="prefix"></cx-icon></cx-input><cx-folder-select-tree class="folder-select__tree" base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .api=${K(this, T)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree>`
|
|
761
761
|
],
|
|
762
762
|
[
|
|
763
|
-
|
|
764
|
-
() => m`<cx-select clearable hoist lazy name=${this.name} value=${this.value} .form=${this.form} ?required=${this.required} ?multiple=${this.selection === "multiple"} @input=${this.handleSearchTermSelectChange} @cx-clear=${this.handleSelectClear} @cx-selected-change=${this.handleTreeSelectedChange} allow-freetext><cx-folder-select-tree base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .api=${K(this,
|
|
763
|
+
C.Select,
|
|
764
|
+
() => m`<cx-select clearable hoist lazy name=${this.name} value=${this.value} .form=${this.form} ?required=${this.required} ?multiple=${this.selection === "multiple"} @input=${this.handleSearchTermSelectChange} @cx-clear=${this.handleSelectClear} @cx-selected-change=${this.handleTreeSelectedChange} allow-freetext><cx-folder-select-tree base-url=${this.baseUrl} extra-folder-id=${this.extraFolderId} extra-folder-title=${this.extraFolderTitle} extra-folder-icon=${this.extraFolderIcon} min-query-length=${this.minQueryLength} search-term=${this.searchTerm} selected-value=${this.value} selection=${this.selection} token=${this.token} bearer-token=${this.bearerToken} ?exclude-virtual-folders=${this.excludeVirtualFolders} ?see-thru=${this.seeThru} ?auto-page-size=${this.autoPageSize} .api=${K(this, T)} .firstFetchCallback=${this.firstFetchCallback}></cx-folder-select-tree></cx-select>`
|
|
765
765
|
]
|
|
766
766
|
])}</div>`;
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
|
-
|
|
769
|
+
T = /* @__PURE__ */ new WeakMap();
|
|
770
770
|
i.styles = [te, we];
|
|
771
771
|
i.dependencies = {
|
|
772
772
|
"cx-folder-select-tree": n,
|
|
@@ -879,6 +879,6 @@ i = c([
|
|
|
879
879
|
], i);
|
|
880
880
|
export {
|
|
881
881
|
i as C,
|
|
882
|
-
|
|
882
|
+
C as F,
|
|
883
883
|
H as a
|
|
884
884
|
};
|
|
@@ -3,7 +3,7 @@ import { n as c, C as b } from "./lib-cortex-element.CVMmyPMC.js";
|
|
|
3
3
|
import { c as k } from "./component.styles.CRO4Odto.js";
|
|
4
4
|
import { i as p } from "./lit-element.jLBm65_O.js";
|
|
5
5
|
import { c as v } from "./custom-element.L4WJXn1j.js";
|
|
6
|
-
import { L as y } from "./i18n.
|
|
6
|
+
import { L as y } from "./i18n.DoMIwXr2.js";
|
|
7
7
|
import { w } from "./watch.CThbualB.js";
|
|
8
8
|
import { e as m } from "./query.BBf1UFkC.js";
|
|
9
9
|
import { e as u } from "./class-map.BiVq-cVR.js";
|
|
@@ -1,119 +1,134 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
const
|
|
3
|
-
let
|
|
4
|
-
|
|
1
|
+
import { p as v } from "./purify.es.BIuh5IAZ.js";
|
|
2
|
+
const A = /* @__PURE__ */ new Set(["weekday", "era", "year", "month", "day"]), T = /* @__PURE__ */ new Set(["hour", "minute", "second", "dayPeriod", "timeZoneName"]), u = /* @__PURE__ */ new Set(), C = new MutationObserver(y), n = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
3
|
+
let h = document.documentElement.dir || "ltr", f = document.documentElement.lang || navigator.language, r;
|
|
4
|
+
C.observe(document.documentElement, {
|
|
5
5
|
attributeFilter: ["dir", "lang"],
|
|
6
6
|
attributes: !0
|
|
7
7
|
});
|
|
8
|
-
function
|
|
9
|
-
return `${e.dir ||
|
|
8
|
+
function k(e) {
|
|
9
|
+
return `${e.dir || h}`.toLowerCase();
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function m(...e) {
|
|
12
12
|
e.map((t) => {
|
|
13
13
|
const o = t.$code.toLowerCase();
|
|
14
14
|
n.has(o) ? n.set(o, { ...n.get(o), ...t }) : n.set(o, t), r || (r = t);
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
17
|
+
function w(...e) {
|
|
18
|
+
if (m(...e), globalThis.WC_TRANSLATION) {
|
|
19
19
|
const t = { ...globalThis.WC_TRANSLATION };
|
|
20
|
-
typeof t.$code == "string" &&
|
|
20
|
+
typeof t.$code == "string" && m(t);
|
|
21
21
|
}
|
|
22
22
|
if (globalThis.LANGUAGE_NAMES) {
|
|
23
23
|
const t = { ...globalThis.LANGUAGE_NAMES };
|
|
24
|
-
Object.entries(t).forEach(([o,
|
|
25
|
-
|
|
24
|
+
Object.entries(t).forEach(([o, i]) => {
|
|
25
|
+
g.set(o.replace(/_/g, "-").toLowerCase(), i);
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
y();
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
30
|
+
function y() {
|
|
31
|
+
h = document.documentElement.dir || "ltr", f = document.documentElement.lang || navigator.language, [...u.keys()].forEach((e) => {
|
|
32
32
|
typeof e.requestUpdate == "function" && e.requestUpdate();
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
let
|
|
35
|
+
let S = class {
|
|
36
36
|
constructor(t) {
|
|
37
37
|
this.host = t, this.host.addController(this);
|
|
38
38
|
}
|
|
39
39
|
hostConnected() {
|
|
40
|
-
|
|
40
|
+
u.add(this.host);
|
|
41
41
|
}
|
|
42
42
|
hostDisconnected() {
|
|
43
|
-
|
|
43
|
+
u.delete(this.host);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Gets the host element's directionality as determined by the `dir` attribute. The return value is transformed to
|
|
47
47
|
* lowercase.
|
|
48
48
|
*/
|
|
49
49
|
dir() {
|
|
50
|
-
return `${this.host.dir ||
|
|
50
|
+
return `${this.host.dir || h}`.toLowerCase();
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Gets the host element's language as determined by the `lang` attribute. The return value is transformed to
|
|
54
54
|
* lowercase.
|
|
55
55
|
*/
|
|
56
56
|
lang() {
|
|
57
|
-
return `${this.host.lang ||
|
|
57
|
+
return `${this.host.lang || f}`.toLowerCase();
|
|
58
58
|
}
|
|
59
59
|
getTranslationData(t) {
|
|
60
|
-
let o,
|
|
60
|
+
let o, i = "", a = "";
|
|
61
61
|
try {
|
|
62
|
-
o = new Intl.Locale(t.replace(/_/g, "-")),
|
|
62
|
+
o = new Intl.Locale(t.replace(/_/g, "-")), i = o?.language?.toLowerCase() ?? "", a = o?.region?.toLowerCase() ?? "";
|
|
63
63
|
} catch {
|
|
64
|
-
const [
|
|
65
|
-
|
|
64
|
+
const [l, p] = t.replace(/_/g, "-").split("-");
|
|
65
|
+
i = l ? l.toLowerCase() : "", a = p ? p.toLowerCase() : "", o = { language: i, region: a };
|
|
66
66
|
}
|
|
67
|
-
const s =
|
|
68
|
-
return { language:
|
|
67
|
+
const s = a && n.get(`${i}-${a}`) ? n.get(`${i}-${a}`) : void 0, d = n.get(i);
|
|
68
|
+
return { language: i, locale: o, primary: s, region: a, secondary: d };
|
|
69
69
|
}
|
|
70
70
|
/** Determines if the specified term exists, optionally checking the fallback translation. */
|
|
71
71
|
exists(t, o) {
|
|
72
|
-
const { primary:
|
|
72
|
+
const { primary: i, secondary: a } = this.getTranslationData(
|
|
73
73
|
o.lang ?? this.lang()
|
|
74
74
|
);
|
|
75
75
|
return o = {
|
|
76
76
|
includeFallback: !1,
|
|
77
77
|
...o
|
|
78
|
-
}, !!(
|
|
78
|
+
}, !!(i && i[t] || a && a[t] || o.includeFallback && r && r[t]);
|
|
79
79
|
}
|
|
80
80
|
/** Outputs a translated term. */
|
|
81
81
|
term(t, ...o) {
|
|
82
|
-
const { primary:
|
|
82
|
+
const { primary: i, secondary: a } = this.getTranslationData(this.lang());
|
|
83
83
|
let s;
|
|
84
|
-
if (
|
|
85
|
-
s = a[t];
|
|
86
|
-
else if (i && i[t])
|
|
84
|
+
if (i && i[t])
|
|
87
85
|
s = i[t];
|
|
86
|
+
else if (a && a[t])
|
|
87
|
+
s = a[t];
|
|
88
88
|
else if (r && r[t])
|
|
89
89
|
s = r[t];
|
|
90
90
|
else
|
|
91
91
|
return String(t);
|
|
92
|
-
return typeof s == "function" ?
|
|
92
|
+
return typeof s == "function" ? v.sanitize(s(...o)) : s;
|
|
93
93
|
}
|
|
94
94
|
languageName(t) {
|
|
95
|
-
return String(
|
|
95
|
+
return String(g.get(t) ?? "");
|
|
96
96
|
}
|
|
97
97
|
/** Outputs a localized date in the specified format. */
|
|
98
98
|
date(t, o) {
|
|
99
99
|
return t = new Date(t), new Intl.DateTimeFormat(this.lang(), o).format(t);
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Outputs a localized date/time without the locale connector literal
|
|
103
|
+
* (e.g. " at " in en-US) that Intl.DateTimeFormat inserts between date and
|
|
104
|
+
* time parts when both are present. Uses formatToParts() and replaces the
|
|
105
|
+
* connector literal with a plain space.
|
|
106
|
+
*/
|
|
107
|
+
dateWithoutConnector(t, o) {
|
|
108
|
+
const i = new Date(t), a = new Intl.DateTimeFormat(this.lang(), o).formatToParts(i);
|
|
109
|
+
return a.map((s, d) => {
|
|
110
|
+
if (s.type !== "literal")
|
|
111
|
+
return s.value;
|
|
112
|
+
const c = a[d - 1], l = a[d + 1];
|
|
113
|
+
return c != null && A.has(c.type) && l != null && T.has(l.type) ? " " : s.value;
|
|
114
|
+
}).join("");
|
|
115
|
+
}
|
|
101
116
|
/** Outputs a localized number in the specified format. */
|
|
102
117
|
number(t, o) {
|
|
103
118
|
return t = Number(t), isNaN(t) ? "" : new Intl.NumberFormat(this.lang(), o).format(t);
|
|
104
119
|
}
|
|
105
120
|
/** Outputs a localized time in relative format. */
|
|
106
|
-
relativeTime(t, o,
|
|
121
|
+
relativeTime(t, o, i) {
|
|
107
122
|
if (t === 0 || o === "second" && t < 0 && t > -10)
|
|
108
123
|
return "Just now";
|
|
109
|
-
const
|
|
124
|
+
const a = new Intl.RelativeTimeFormat(this.lang(), i).format(
|
|
110
125
|
t,
|
|
111
126
|
o
|
|
112
127
|
);
|
|
113
|
-
return t > 0 ?
|
|
128
|
+
return t > 0 ? a.replace("in ", "").concat(" left") : a;
|
|
114
129
|
}
|
|
115
130
|
};
|
|
116
|
-
const
|
|
131
|
+
const b = {
|
|
117
132
|
$code: "en-us",
|
|
118
133
|
$dir: "ltr",
|
|
119
134
|
$name: "English",
|
|
@@ -518,6 +533,7 @@ const w = {
|
|
|
518
533
|
expo: "Expo",
|
|
519
534
|
export: "Export",
|
|
520
535
|
exportAsCsv: "Export as CSV",
|
|
536
|
+
exportAsPdf: "Export as PDF",
|
|
521
537
|
exportAsXml: "Export as XML",
|
|
522
538
|
extension: "Extension",
|
|
523
539
|
externalLink: "External link",
|
|
@@ -557,7 +573,7 @@ const w = {
|
|
|
557
573
|
fontColor: "Font color",
|
|
558
574
|
fontKit: "Font kit",
|
|
559
575
|
fontKitPreview: "Font kit preview",
|
|
560
|
-
fontNthOfTotalFonts: (e, t, o,
|
|
576
|
+
fontNthOfTotalFonts: (e, t, o, i, a) => `Font ${t} of ${e}: ${o} ${i} ${a}`,
|
|
561
577
|
fontShowcase: "Font showcase",
|
|
562
578
|
fontSize: "Font size",
|
|
563
579
|
fontSizes: "Font sizes",
|
|
@@ -1154,12 +1170,12 @@ const w = {
|
|
|
1154
1170
|
zoomOut: "Zoom out",
|
|
1155
1171
|
zoomToFit: "Zoom to fit"
|
|
1156
1172
|
};
|
|
1157
|
-
|
|
1158
|
-
class
|
|
1173
|
+
w(b);
|
|
1174
|
+
class F extends S {
|
|
1159
1175
|
}
|
|
1160
|
-
|
|
1176
|
+
w(b);
|
|
1161
1177
|
export {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1178
|
+
F as L,
|
|
1179
|
+
k as d,
|
|
1180
|
+
w as r
|
|
1165
1181
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as r, C as g } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as p } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as h } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as m } from "./i18n.
|
|
4
|
+
import { L as m } from "./i18n.DoMIwXr2.js";
|
|
5
5
|
import { r as f } from "./state.CSDxrqLd.js";
|
|
6
6
|
import { e as v } from "./query.BBf1UFkC.js";
|
|
7
7
|
import { e as y } from "./class-map.BiVq-cVR.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as r, C as d } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as h } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as y } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as u } from "./i18n.
|
|
4
|
+
import { L as u } from "./i18n.DoMIwXr2.js";
|
|
5
5
|
import { w as g } from "./watch.CThbualB.js";
|
|
6
6
|
import { i as v, x as p } from "./lit-element.jLBm65_O.js";
|
|
7
7
|
import { e as b } from "./query.BBf1UFkC.js";
|