@luzmo/analytics-components-kit 1.2.1 → 1.4.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/README.md +8 -3
- package/angular/components/add-to-dashboard.ts +20 -6
- package/angular/components/data-fields-select.ts +5 -0
- package/angular/components/interactive-viz-item.ts +89 -24
- package/angular/components/item-grid-item-actions-menu.ts +5 -0
- package/angular/components/item-grid.ts +7 -0
- package/angular/components/item-option-color-picker.ts +28 -28
- package/angular/components/item-option-guidelines.ts +22 -1
- package/angular/components/item-option-multi-language-field.ts +7 -7
- package/angular/components/item-option-number-field.ts +14 -14
- package/angular/components/item-option-positions-number-field.ts +14 -14
- package/angular/components/item-option-radio-button-group.ts +7 -7
- package/angular/components/item-option-text-field.ts +7 -7
- package/angular/components/item-slot-picker-panel.ts +1 -1
- package/angular/components/item-slot-picker.ts +7 -7
- package/angular/esm/components/add-to-dashboard.d.ts +8 -4
- package/angular/esm/components/add-to-dashboard.js +23 -7
- package/angular/esm/components/data-fields-select.d.ts +2 -0
- package/angular/esm/components/data-fields-select.js +4 -0
- package/angular/esm/components/interactive-viz-item.d.ts +32 -11
- package/angular/esm/components/interactive-viz-item.js +99 -28
- package/angular/esm/components/item-grid-item-actions-menu.d.ts +2 -0
- package/angular/esm/components/item-grid-item-actions-menu.js +4 -0
- package/angular/esm/components/item-grid.d.ts +3 -1
- package/angular/esm/components/item-grid.js +9 -1
- package/angular/esm/components/item-option-color-picker.d.ts +10 -10
- package/angular/esm/components/item-option-color-picker.js +34 -34
- package/angular/esm/components/item-option-guidelines.d.ts +8 -2
- package/angular/esm/components/item-option-guidelines.js +26 -2
- package/angular/esm/components/item-option-multi-language-field.d.ts +3 -3
- package/angular/esm/components/item-option-multi-language-field.js +10 -10
- package/angular/esm/components/item-option-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-number-field.js +18 -18
- package/angular/esm/components/item-option-positions-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-positions-number-field.js +18 -18
- package/angular/esm/components/item-option-radio-button-group.d.ts +3 -3
- package/angular/esm/components/item-option-radio-button-group.js +10 -10
- package/angular/esm/components/item-option-text-field.d.ts +3 -3
- package/angular/esm/components/item-option-text-field.js +10 -10
- package/angular/esm/components/item-slot-picker-panel.d.ts +1 -1
- package/angular/esm/components/item-slot-picker-panel.js +1 -1
- package/angular/esm/components/item-slot-picker.d.ts +3 -3
- package/angular/esm/components/item-slot-picker.js +9 -9
- package/angular/package.json +2 -2
- package/components/add-to-dashboard/dashboard-actions.d.ts +2 -1
- package/components/add-to-dashboard/index.cjs +1 -1
- package/components/add-to-dashboard/index.js +1 -1
- package/components/{add-to-dashboard-NwsCPIlg.cjs → add-to-dashboard-BtzTZdjN.cjs} +1 -1
- package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-Bu6S3qVz.js} +125 -120
- package/components/chart-helpers-BHxQbLBw.cjs +20 -0
- package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-BKeMLhov.js} +53 -39
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/{filters-CxIzuI5q.js → filters-DEpmh9Nj.js} +113 -102
- package/components/filters-LDXhe1Bp.cjs +187 -0
- package/components/index.cjs +1 -1
- package/components/index.js +6 -6
- package/components/interactive-viz-item/helpers/chart-helpers.d.ts +2 -1
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.d.ts +1 -1
- package/components/interactive-viz-item/index.js +3 -3
- package/components/interactive-viz-item/interactive-viz-item.d.ts +47 -1
- package/components/interactive-viz-item/types.d.ts +4 -0
- package/components/interactive-viz-item-Cc3Ix95e.js +630 -0
- package/components/interactive-viz-item-SF12d97t.cjs +269 -0
- package/components/item-grid/item-grid.d.ts +1 -0
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +19 -1
- package/components/item-slot-picker-panel-Cw3UCK03.cjs +84 -0
- package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-DprM9Rli.js} +64 -33
- package/custom-elements.json +3051 -2531
- package/grid-core/item-grid-base.d.ts +5 -4
- package/package.json +2 -2
- package/react/package.json +2 -2
- package/standalone/add-to-dashboard.js +40 -40
- package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-DZsidiCl.js} +2 -2
- package/standalone/chunks/{choropleth-map-options.config-rUJsEJcm.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
- package/standalone/chunks/{color-range-utils-DxOtqAKB.js → color-range-utils-BVyHBRiq.js} +1 -1
- package/standalone/chunks/data-broker-DpSrH3IP.js +2 -0
- package/standalone/chunks/de-BkB0q1Eg.js +2 -0
- package/standalone/chunks/display-settings-binning-DhHlclWH.js +38 -0
- package/standalone/chunks/display-settings-datetime-C8xvOvi4.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-CUpigDcs.js +26 -0
- package/standalone/chunks/display-settings-numeric-BLWF54Jx.js +172 -0
- package/standalone/chunks/display-settings-period-over-period-COd4tvUw.js +209 -0
- package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
- package/standalone/chunks/en-DNsyAwgq.js +2 -0
- package/standalone/chunks/en-GB-Di3OzVdL.js +2 -0
- package/standalone/chunks/en-US-DNsyAwgq.js +2 -0
- package/standalone/chunks/es-Bo0jStZn.js +2 -0
- package/standalone/chunks/{filters-DKgJcQGP.js → filters-lhg_WVDK.js} +108 -108
- package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-DZMzLE2I.js} +17 -17
- package/standalone/chunks/fr-Co_qVhhV.js +2 -0
- package/standalone/chunks/{heat-map-options.config-D93AeYFi.js → heat-map-options.config-DDQMD38W.js} +1 -1
- package/standalone/chunks/{heat-table-options.config-ZVML76FK.js → heat-table-options.config-B4K0Ygug.js} +1 -1
- package/standalone/chunks/{is-same-option-value-Di-A7Wmg.js → is-same-option-value-7kXNF4st.js} +1 -1
- package/standalone/chunks/item-option-action-button-group-Bl1HR1JK.js +35 -0
- package/standalone/chunks/item-option-base-DF24wTyv.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-MkIIn56p.js +22 -0
- package/standalone/chunks/item-option-color-picker-CxosMo_p.js +19 -0
- package/standalone/chunks/item-option-color-range-C7C70r4J.js +83 -0
- package/standalone/chunks/item-option-guidelines-iu8yWRzr.js +120 -0
- package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-foanqCdr.js} +1 -1
- package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-ByVD4oq0.js} +1 -1
- package/standalone/chunks/item-option-panel-Bya-K7HH.js +316 -0
- package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-CqNNVIML.js} +1 -1
- package/standalone/chunks/item-option-position-picker-BjCFVtDH.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-BJJtXZL-.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-C5bxsD85.js} +1 -1
- package/standalone/chunks/item-option-slider-DUXWz70B.js +18 -0
- package/standalone/chunks/item-option-switch-BHyJuOkP.js +12 -0
- package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-rBZY9OX4.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BM82vSXi.js} +101 -99
- package/standalone/chunks/load-data-fields-for-datasets-DS9O1oyy.js +25 -0
- package/standalone/chunks/localize-DLl7tgQp.js +2 -0
- package/standalone/chunks/localized-decorator-DosMCCQo.js +2 -0
- package/standalone/chunks/{version-BW4Ixl63.js → localized-mixin-BWJj88bd.js} +1 -1
- package/standalone/chunks/nl-CQz2jrVx.js +2 -0
- package/standalone/chunks/{option-interaction-controller-BslAXAHF.js → option-interaction-controller-BuwRr21c.js} +1 -1
- package/standalone/chunks/{route-map-options.config-Dwy0JSVq.js → route-map-options.config-CGBkHnhM.js} +1 -1
- package/standalone/chunks/{spike-map-options.config-DFmuNxym.js → spike-map-options.config-CSenlJ_F.js} +1 -1
- package/standalone/interactive-viz-item.js +88 -84
- package/standalone/item-grid.js +10 -10
- package/standalone/manifest.json +46 -46
- package/types.d.ts +1 -1
- package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
- package/components/filters-BPbPFOu5.cjs +0 -187
- package/components/interactive-viz-item-CwRRaCZB.js +0 -583
- package/components/interactive-viz-item-CxdrGRKc.cjs +0 -265
- package/components/item-slot-picker-panel-BhhN54IM.cjs +0 -82
- package/standalone/chunks/data-broker-DXDyIrj_.js +0 -2
- package/standalone/chunks/de-mdZT2W1G.js +0 -2
- package/standalone/chunks/display-settings-binning-Byffw2Kl.js +0 -38
- package/standalone/chunks/display-settings-datetime-CD52d6Sv.js +0 -199
- package/standalone/chunks/display-settings-grand-totals-Cky99LX9.js +0 -26
- package/standalone/chunks/display-settings-numeric-C9ea7Tgc.js +0 -172
- package/standalone/chunks/display-settings-period-over-period-BLSGumkD.js +0 -209
- package/standalone/chunks/embed-CBu7iQRx.js +0 -231
- package/standalone/chunks/en-CSboh17P.js +0 -2
- package/standalone/chunks/en-GB-HoXKQBOY.js +0 -2
- package/standalone/chunks/en-US-CSboh17P.js +0 -2
- package/standalone/chunks/es-Di5D8JFd.js +0 -2
- package/standalone/chunks/fr-DZku7iB9.js +0 -2
- package/standalone/chunks/item-option-action-button-group-BEAwPHVw.js +0 -35
- package/standalone/chunks/item-option-base-CRUxNhJQ.js +0 -38
- package/standalone/chunks/item-option-color-palette-picker-CBz61iZb.js +0 -22
- package/standalone/chunks/item-option-color-picker-lLvBPnKA.js +0 -19
- package/standalone/chunks/item-option-color-range-BqeatOei.js +0 -83
- package/standalone/chunks/item-option-guidelines-Cop8rM8y.js +0 -120
- package/standalone/chunks/item-option-panel-CzSKFCVl.js +0 -316
- package/standalone/chunks/item-option-position-picker-Bkc4JvJX.js +0 -14
- package/standalone/chunks/item-option-positions-number-field-Dr_315TE.js +0 -31
- package/standalone/chunks/item-option-slider-K_bsNci8.js +0 -18
- package/standalone/chunks/item-option-switch-DeihDHhM.js +0 -12
- package/standalone/chunks/load-data-fields-for-datasets-ClctSj6y.js +0 -25
- package/standalone/chunks/localize-DXRmGRe-.js +0 -2
- package/standalone/chunks/localized-decorator-DJVBmJVH.js +0 -2
- package/standalone/chunks/nl-CViTevL3.js +0 -2
package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-DprM9Rli.js}
RENAMED
|
@@ -35,7 +35,7 @@ import "@luzmo/lucero/field-label";
|
|
|
35
35
|
import { ifDefined as g } from "lit/directives/if-defined.js";
|
|
36
36
|
import { Task as _ } from "@lit/task";
|
|
37
37
|
// src/components/item-slot-picker-panel/item-slot-picker-panel.module.scss?inline
|
|
38
|
-
var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzmo-font-size));font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);display:block}:host([size=s]){font-size:var(--luzmo-item-slot-picker-panel-font-size-s,var(--luzmo-font-size-s))}:host([size=l]){font-size:var(--luzmo-item-slot-picker-panel-font-size-l,var(--luzmo-font-size-l))}:host([size=xl]){font-size:var(--luzmo-item-slot-picker-panel-font-size-xl,var(--luzmo-font-size-xl))}.container{flex-direction:column;align-items:flex-start;display:flex}.dataset-picker{align-self:stretch;align-items:flex-start;gap:var(--luzmo-item-slot-picker-panel-dataset-picker-gap,var(--luzmo-spacing-2));border-bottom-style:solid;border-bottom-width:var(--luzmo-item-slot-picker-panel-dataset-picker-border-width,1px);border-bottom-color:var(--luzmo-item-slot-picker-panel-dataset-picker-border-color,var(--luzmo-border-color));flex-direction:column;flex-shrink:0;margin-block-end:var(--luzmo-item-slot-picker-panel-dataset-picker-margin-block-end,var(--luzmo-spacing-4));padding-block-end:var(--luzmo-item-slot-picker-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-4));display:flex}.slots-panel{gap:var(--luzmo-item-slot-picker-panel-gap,var(--luzmo-spacing-5));flex-direction:column;display:flex}.slot-container{gap:var(--luzmo-item-slot-picker-panel-slot-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}luzmo-field-label{margin:0}luzmo-item-slot-picker{display:block}:host([grows]) .container{align-items:stretch;width:100%}:host([grows]) .dataset-picker{align-items:stretch}:host([grows]) .dataset-picker luzmo-select{width:100%}", y, b = 50, x = (y = class extends r(t(e, {
|
|
38
|
+
var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzmo-font-size));font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);display:block}:host([size=s]){font-size:var(--luzmo-item-slot-picker-panel-font-size-s,var(--luzmo-font-size-s))}:host([size=l]){font-size:var(--luzmo-item-slot-picker-panel-font-size-l,var(--luzmo-font-size-l))}:host([size=xl]){font-size:var(--luzmo-item-slot-picker-panel-font-size-xl,var(--luzmo-font-size-xl))}.container{flex-direction:column;align-items:flex-start;display:flex}.dataset-picker{align-self:stretch;align-items:flex-start;gap:var(--luzmo-item-slot-picker-panel-dataset-picker-gap,var(--luzmo-spacing-2));border-bottom-style:solid;border-bottom-width:var(--luzmo-item-slot-picker-panel-dataset-picker-border-width,1px);border-bottom-color:var(--luzmo-item-slot-picker-panel-dataset-picker-border-color,var(--luzmo-border-color));flex-direction:column;flex-shrink:0;margin-block-end:var(--luzmo-item-slot-picker-panel-dataset-picker-margin-block-end,var(--luzmo-spacing-4));padding-block-end:var(--luzmo-item-slot-picker-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-4));display:flex}.slots-panel{gap:var(--luzmo-item-slot-picker-panel-gap,var(--luzmo-spacing-5));flex-direction:column;display:flex}.slot-container{gap:var(--luzmo-item-slot-picker-panel-slot-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}luzmo-field-label{margin:0}luzmo-item-slot-picker{display:block}:host([grows]) .container{align-items:stretch;width:100%}:host([grows]) .dataset-picker{align-items:stretch}:host([grows]) .dataset-picker luzmo-select{width:100%}", y, b = 50, x = 400, S = (y = class extends r(t(e, {
|
|
39
39
|
validSizes: [
|
|
40
40
|
"s",
|
|
41
41
|
"m",
|
|
@@ -55,7 +55,7 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
55
55
|
return this._slotsConfig;
|
|
56
56
|
},
|
|
57
57
|
args: () => [this.itemType, this.language]
|
|
58
|
-
}), this._slotsConfig = [], this._datasetListItems = [], this._datasetListRetrieving = !1, this._datasetListPending = !1, this._datasetNamesFetchAttempted = !1, this._hasMoreDatasets = !0, this._fetchedDatasetsDataFields = [], this._failedDatasetIds = /* @__PURE__ */ new Set(), this._loadDataFieldsTask = new _(this, {
|
|
58
|
+
}), this._slotsConfig = [], this._datasetListItems = [], this._datasetSearchItems = [], this._datasetSearchValue = "", this._datasetSearchRequestId = 0, this._datasetSearchDebounceTimer = null, this._datasetListRetrieving = !1, this._datasetListPending = !1, this._datasetNamesFetchAttempted = !1, this._hasMoreDatasets = !0, this._fetchedDatasetsDataFields = [], this._failedDatasetIds = /* @__PURE__ */ new Set(), this._loadDataFieldsTask = new _(this, {
|
|
59
59
|
args: () => [
|
|
60
60
|
this._currentDatasetId,
|
|
61
61
|
this.apiUrl,
|
|
@@ -90,7 +90,8 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
get _availableDatasets() {
|
|
93
|
-
|
|
93
|
+
if (this.datasetsDataFields.length > 0) return this.datasetsDataFields;
|
|
94
|
+
if (this.datasetIds.length > 0) return this.datasetIds.map((e) => {
|
|
94
95
|
let t = this._datasetListItems.find((t) => t.id === e);
|
|
95
96
|
return t ? {
|
|
96
97
|
id: t.id,
|
|
@@ -100,7 +101,9 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
100
101
|
id: e,
|
|
101
102
|
name: { en: e }
|
|
102
103
|
};
|
|
103
|
-
})
|
|
104
|
+
});
|
|
105
|
+
let e = [...this._datasetListItems, ...this._datasetSearchItems.filter((e) => !this._datasetListItems.some((t) => t.id === e.id))];
|
|
106
|
+
return e.length > 0 ? e.map((e) => ({
|
|
104
107
|
id: e.id,
|
|
105
108
|
name: e.name,
|
|
106
109
|
description: e.description
|
|
@@ -143,10 +146,13 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
143
146
|
for (let t of this._currentSlotsContents) for (let n of t.content) n.datasetId && e.add(n.datasetId);
|
|
144
147
|
return [...e];
|
|
145
148
|
}
|
|
149
|
+
disconnectedCallback() {
|
|
150
|
+
super.disconnectedCallback(), this._clearDatasetSearchTimer();
|
|
151
|
+
}
|
|
146
152
|
willUpdate(e) {
|
|
147
153
|
super.willUpdate(e), e.has("slotsContents") && (this._currentSlotsContents = structuredClone(this.slotsContents ?? []));
|
|
148
154
|
let t = e.has("selectedDatasetId"), n = e.has("datasetsDataFields"), r = e.has("datasetIds"), a = e.has("datasetPicker"), o = e.has("authKey"), s = e.has("authToken"), c = e.has("apiUrl");
|
|
149
|
-
(r || o || s || c) && (this._datasetListItems = [], this._hasMoreDatasets = !0, this._datasetNamesFetchAttempted = !1, this._fetchedDatasetsDataFields = [], this._failedDatasetIds.clear(), i.configure({
|
|
155
|
+
(r || o || s || c) && (this._datasetListItems = [], this._datasetSearchItems = [], this._datasetSearchValue = "", this._datasetSearchRequestId++, this._clearDatasetSearchTimer(), this._hasMoreDatasets = !0, this._datasetNamesFetchAttempted = !1, this._fetchedDatasetsDataFields = [], this._failedDatasetIds.clear(), i.configure({
|
|
150
156
|
apiUrl: this.apiUrl,
|
|
151
157
|
authKey: this.authKey ?? "",
|
|
152
158
|
authToken: this.authToken ?? ""
|
|
@@ -177,7 +183,10 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
177
183
|
offset: e,
|
|
178
184
|
limit: b
|
|
179
185
|
});
|
|
180
|
-
this._datasetListItems = [...this._datasetListItems, ...t.data], this._hasMoreDatasets = e + b < (t.pagination?.total ?? 0), !this._currentDatasetId
|
|
186
|
+
if (this._datasetListItems = [...this._datasetListItems, ...t.data], this._hasMoreDatasets = e + b < (t.pagination?.total ?? 0), !this._currentDatasetId) {
|
|
187
|
+
let e = this.selectedDatasetId ?? this._getUsedDatasetIds()[0];
|
|
188
|
+
e && this._datasetListItems.some((t) => t.id === e) && (this._currentDatasetId = e);
|
|
189
|
+
}
|
|
181
190
|
} catch (e) {
|
|
182
191
|
console.warn("Failed to load dataset list:", e), this._hasMoreDatasets = !1;
|
|
183
192
|
} finally {
|
|
@@ -186,20 +195,40 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
197
|
_handlePickerScrolled(e) {
|
|
189
|
-
if (this.datasetIds.length > 0) return;
|
|
198
|
+
if (this.datasetIds.length > 0 || this._datasetSearchValue) return;
|
|
190
199
|
let t = e.target, { last: n } = e.detail;
|
|
191
200
|
n >= this._datasetListItems.length - 10 && this._hasMoreDatasets && this._loadMoreDatasets(t);
|
|
192
201
|
}
|
|
193
202
|
async _handlePickerOpened(e) {
|
|
194
203
|
let t = e.target;
|
|
195
|
-
|
|
196
|
-
|
|
204
|
+
this._datasetListItems.length === 0 && this._shouldFetchDatasetList && this.datasetIds.length === 0 && this._hasMoreDatasets && await this._loadMoreDatasets(t);
|
|
205
|
+
}
|
|
206
|
+
_handleDatasetSearch(e) {
|
|
207
|
+
if (!this._shouldFetchDatasetList || this.datasetIds.length > 0) return;
|
|
208
|
+
let t = e.target, n = (e.detail?.string ?? "").trim();
|
|
209
|
+
if (n === this._datasetSearchValue) return;
|
|
210
|
+
this._datasetSearchValue = n, this._clearDatasetSearchTimer();
|
|
211
|
+
let r = ++this._datasetSearchRequestId;
|
|
212
|
+
n ? (t.retrieving = !0, this._datasetSearchDebounceTimer = window.setTimeout(async () => {
|
|
213
|
+
this._datasetSearchDebounceTimer = null;
|
|
197
214
|
try {
|
|
198
|
-
await
|
|
215
|
+
let e = await i.searchDatasets(n, { limit: b });
|
|
216
|
+
r === this._datasetSearchRequestId && (this._keepOnlySelectedSearchItem(), this._datasetSearchItems = [...this._datasetSearchItems, ...e.data.filter((e) => !this._datasetSearchItems.some((t) => t.id === e.id))]);
|
|
217
|
+
} catch (e) {
|
|
218
|
+
console.warn("Failed to search datasets:", e);
|
|
199
219
|
} finally {
|
|
200
|
-
t.
|
|
220
|
+
r === this._datasetSearchRequestId && (t.retrieving = !1);
|
|
201
221
|
}
|
|
202
|
-
}
|
|
222
|
+
}, x)) : (this._keepOnlySelectedSearchItem(), t.retrieving = !1);
|
|
223
|
+
}
|
|
224
|
+
_handleDatasetPickerClosed(e) {
|
|
225
|
+
this._clearDatasetSearchTimer(), this._datasetSearchRequestId++, this._datasetSearchValue = "", e.target.retrieving = !1, this._keepOnlySelectedSearchItem();
|
|
226
|
+
}
|
|
227
|
+
_keepOnlySelectedSearchItem() {
|
|
228
|
+
this._datasetSearchItems = this._datasetSearchItems.filter((e) => e.id === this._currentDatasetId);
|
|
229
|
+
}
|
|
230
|
+
_clearDatasetSearchTimer() {
|
|
231
|
+
this._datasetSearchDebounceTimer !== null && (clearTimeout(this._datasetSearchDebounceTimer), this._datasetSearchDebounceTimer = null);
|
|
203
232
|
}
|
|
204
233
|
_handleDatasetChange(e) {
|
|
205
234
|
let t = e.detail?.value?.[0];
|
|
@@ -306,6 +335,8 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
306
335
|
@change=${this._handleDatasetChange}
|
|
307
336
|
@luzmo-opened=${this._handlePickerOpened}
|
|
308
337
|
@luzmo-scrolled=${this._handlePickerScrolled}
|
|
338
|
+
@luzmo-search=${this._handleDatasetSearch}
|
|
339
|
+
@luzmo-closed=${this._handleDatasetPickerClosed}
|
|
309
340
|
></luzmo-select>
|
|
310
341
|
</div>
|
|
311
342
|
`;
|
|
@@ -372,71 +403,71 @@ var v = ":host{font-size:var(--luzmo-item-slot-picker-panel-font-size,var(--luzm
|
|
|
372
403
|
}
|
|
373
404
|
}, y.styles = d(v), y);
|
|
374
405
|
// src/components/item-slot-picker-panel/index.ts
|
|
375
|
-
n([p()],
|
|
406
|
+
n([p()], S.prototype, "_datasetListItems", void 0), n([p()], S.prototype, "_datasetSearchItems", void 0), n([p()], S.prototype, "_datasetListRetrieving", void 0), n([p()], S.prototype, "_datasetListPending", void 0), n([p()], S.prototype, "_currentDatasetId", void 0), n([p()], S.prototype, "_fetchedDatasetsDataFields", void 0), n([f({
|
|
376
407
|
type: String,
|
|
377
408
|
reflect: !0,
|
|
378
409
|
attribute: "item-type"
|
|
379
|
-
})],
|
|
410
|
+
})], S.prototype, "itemType", void 0), n([f({
|
|
380
411
|
type: String,
|
|
381
412
|
attribute: "content-language",
|
|
382
413
|
reflect: !0
|
|
383
|
-
})],
|
|
414
|
+
})], S.prototype, "contentLanguage", void 0), n([f({ type: Array })], S.prototype, "slotsConfiguration", void 0), n([f({ type: Array })], S.prototype, "slotsContents", void 0), n([f({
|
|
384
415
|
type: String,
|
|
385
416
|
reflect: !0
|
|
386
|
-
})],
|
|
417
|
+
})], S.prototype, "selects", void 0), n([f({
|
|
387
418
|
type: String,
|
|
388
419
|
reflect: !0,
|
|
389
420
|
attribute: "data-fields-search"
|
|
390
|
-
})],
|
|
421
|
+
})], S.prototype, "dataFieldsSearch", void 0), n([f({
|
|
391
422
|
type: String,
|
|
392
423
|
reflect: !0,
|
|
393
424
|
attribute: "dataset-search"
|
|
394
|
-
})],
|
|
425
|
+
})], S.prototype, "datasetSearch", void 0), n([f({
|
|
395
426
|
type: String,
|
|
396
427
|
reflect: !0
|
|
397
|
-
})],
|
|
428
|
+
})], S.prototype, "icons", void 0), n([f({
|
|
398
429
|
type: Array,
|
|
399
430
|
reflect: !1
|
|
400
|
-
})],
|
|
431
|
+
})], S.prototype, "datasetsDataFields", void 0), n([f({
|
|
401
432
|
type: Array,
|
|
402
433
|
attribute: "dataset-ids"
|
|
403
|
-
})],
|
|
434
|
+
})], S.prototype, "datasetIds", void 0), n([f({
|
|
404
435
|
type: String,
|
|
405
436
|
attribute: "selected-dataset-id",
|
|
406
437
|
reflect: !0
|
|
407
|
-
})],
|
|
438
|
+
})], S.prototype, "selectedDatasetId", void 0), n([f({
|
|
408
439
|
type: Boolean,
|
|
409
440
|
attribute: "dataset-picker",
|
|
410
441
|
reflect: !0
|
|
411
|
-
})],
|
|
442
|
+
})], S.prototype, "datasetPicker", void 0), n([f({
|
|
412
443
|
type: String,
|
|
413
444
|
attribute: "dataset-picker-label"
|
|
414
|
-
})],
|
|
445
|
+
})], S.prototype, "datasetPickerLabel", void 0), n([f({
|
|
415
446
|
type: String,
|
|
416
447
|
attribute: "api-url"
|
|
417
|
-
})],
|
|
448
|
+
})], S.prototype, "apiUrl", void 0), n([f({
|
|
418
449
|
type: String,
|
|
419
450
|
attribute: "auth-key"
|
|
420
|
-
})],
|
|
451
|
+
})], S.prototype, "authKey", void 0), n([f({
|
|
421
452
|
type: String,
|
|
422
453
|
attribute: "auth-token"
|
|
423
|
-
})],
|
|
454
|
+
})], S.prototype, "authToken", void 0), n([f({
|
|
424
455
|
type: String,
|
|
425
456
|
reflect: !0
|
|
426
|
-
})],
|
|
457
|
+
})], S.prototype, "placement", void 0), n([f({
|
|
427
458
|
type: String,
|
|
428
459
|
reflect: !0,
|
|
429
460
|
attribute: "slot-menu-placement"
|
|
430
|
-
})],
|
|
461
|
+
})], S.prototype, "slotMenuPlacement", void 0), n([f({
|
|
431
462
|
type: String,
|
|
432
463
|
reflect: !0,
|
|
433
464
|
attribute: "slot-menu-mode"
|
|
434
|
-
})],
|
|
465
|
+
})], S.prototype, "slotMenuMode", void 0), n([f({
|
|
435
466
|
type: String,
|
|
436
467
|
reflect: !0,
|
|
437
468
|
attribute: "constraint-mode"
|
|
438
|
-
})],
|
|
469
|
+
})], S.prototype, "constraintMode", void 0), n([f({
|
|
439
470
|
type: Boolean,
|
|
440
471
|
reflect: !0
|
|
441
|
-
})],
|
|
442
|
-
export {
|
|
472
|
+
})], S.prototype, "grows", void 0), n([p()], S.prototype, "_currentSlotsContents", void 0), S = n([m()], S), customElements.get("luzmo-item-slot-picker-panel") || customElements.define("luzmo-item-slot-picker-panel", S);
|
|
473
|
+
export { S as t };
|