@luzmo/analytics-components-kit 1.0.1-alpha.31 → 1.0.1-alpha.32
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/components/{async-directive-C_bp5UcZ-B5_19oN_.js → async-directive-BfcqVjDp-BCT-lA4F.js} +8 -8
- package/components/{async-directive-C_bp5UcZ-mUPcBvyn.cjs → async-directive-BfcqVjDp-C8C45jl6.cjs} +3 -3
- package/components/{base-D76d76ww-D0dTUBua.js → base-D76d76ww-BGkuhs54.js} +59 -47
- package/components/{base-D76d76ww-BEIhYtgV.cjs → base-D76d76ww-tT6yr8eb.cjs} +9 -9
- package/components/{button-base-WsJSnMie-B1TLbPwk.cjs → button-base-DbkDzb71-CY6MJGqE.cjs} +2 -2
- package/components/{button-base-WsJSnMie-CyGPs7kd.js → button-base-DbkDzb71-R8oqSqlY.js} +4 -4
- package/components/calculate-data-item-icon-BtUWtDx3.cjs +20 -0
- package/components/calculate-data-item-icon-DauSiV8c.js +97 -0
- package/components/{checkbox-mixin-CmeCReJh-wY0R8cuc.cjs → checkbox-mixin-Do7EgtpQ-D3m-dMTI.cjs} +3 -3
- package/components/{checkbox-mixin-CmeCReJh-C94-rm4F.js → checkbox-mixin-Do7EgtpQ-hne79zc-.js} +2 -2
- package/components/{de-BaTUIQk1.js → de-CCq00pbq.js} +55 -1
- package/components/de-DcZysUyZ.cjs +20 -0
- package/components/{directive-helpers-Bx_ey3Gk-BxvL9t9F.cjs → directive-helpers-Cm6gitnu-BeggOiwf.cjs} +4 -4
- package/components/{directive-helpers-Bx_ey3Gk-Csi4AxXe.js → directive-helpers-Cm6gitnu-CeYtlPO9.js} +53 -19
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +18 -17
- package/components/display-settings-binning/display-settings-binning.d.ts +0 -1
- package/components/display-settings-binning/index.cjs +3 -2
- package/components/display-settings-binning/index.js +21 -21
- package/components/display-settings-datetime/index.cjs +2 -2
- package/components/display-settings-datetime/index.js +37 -35
- package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +0 -1
- package/components/display-settings-grand-totals/index.cjs +4 -3
- package/components/display-settings-grand-totals/index.js +21 -21
- package/components/display-settings-numeric/index.cjs +14 -14
- package/components/display-settings-numeric/index.js +32 -30
- package/components/display-settings-period-over-period/index.cjs +6 -6
- package/components/display-settings-period-over-period/index.js +36 -34
- package/components/draggable-data-item/index.cjs +3 -3
- package/components/draggable-data-item/index.js +15 -13
- package/components/draggable-data-item-level/index.cjs +9 -9
- package/components/draggable-data-item-level/index.js +96 -167
- package/components/droppable-slot/index.cjs +2 -2
- package/components/droppable-slot/index.js +21 -19
- package/components/edit-item/index.cjs +11 -11
- package/components/edit-item/index.js +13 -12
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +1 -1
- package/components/edit-option-action-button-group/index.cjs +2 -1
- package/components/edit-option-action-button-group/index.js +44 -43
- package/components/edit-option-base-CSJNbo2E.cjs +53 -0
- package/components/{edit-option-base-DOezOLDd.js → edit-option-base-DeQjGX4i.js} +5 -4
- package/components/edit-option-color-picker/index.cjs +23 -23
- package/components/edit-option-color-picker/index.js +50 -50
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +3 -3
- package/components/edit-option-number-field/index.cjs +2 -2
- package/components/edit-option-number-field/index.js +3 -3
- package/components/edit-option-picker/index.cjs +2 -2
- package/components/edit-option-picker/index.js +4 -4
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +3 -3
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +7 -7
- package/components/edit-option-radio-button-group/index.cjs +4 -4
- package/components/edit-option-radio-button-group/index.js +4 -4
- package/components/edit-option-slider/index.cjs +2 -2
- package/components/edit-option-slider/index.js +27 -27
- package/components/edit-option-switch/index.cjs +3 -3
- package/components/edit-option-switch/index.js +5 -5
- package/components/edit-option-text-field/index.cjs +2 -2
- package/components/edit-option-text-field/index.js +3 -3
- package/components/es-CGiBfBKJ.cjs +20 -0
- package/components/{es-D37mTCZB.js → es-DBmbFw-L.js} +55 -1
- package/components/filter-data-item-picker/filter-data-item-picker.d.ts +88 -0
- package/components/filter-data-item-picker/index.cjs +47 -0
- package/components/filter-data-item-picker/index.d.ts +7 -0
- package/components/filter-data-item-picker/index.js +193 -0
- package/components/filter-expression-picker/filter-expression-picker.d.ts +74 -0
- package/components/filter-expression-picker/index.cjs +20 -0
- package/components/filter-expression-picker/index.d.ts +7 -0
- package/components/filter-expression-picker/index.js +30 -0
- package/components/filter-group/filter-group.d.ts +26 -0
- package/components/filter-group/index.d.ts +7 -0
- package/components/filter-item/filter-item.d.ts +76 -0
- package/components/filter-item/index.cjs +52 -0
- package/components/filter-item/index.d.ts +7 -0
- package/components/filter-item/index.js +271 -0
- package/components/filter-parameter-picker/filter-parameter-picker.d.ts +25 -0
- package/components/filter-parameter-picker/index.d.ts +7 -0
- package/components/filter-value-picker/filter-value-picker.d.ts +65 -0
- package/components/filter-value-picker/index.cjs +51 -0
- package/components/filter-value-picker/index.d.ts +7 -0
- package/components/filter-value-picker/index.js +149 -0
- package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +43 -0
- package/components/filter-value-picker-datetime/index.cjs +288 -0
- package/components/filter-value-picker-datetime/index.d.ts +7 -0
- package/components/filter-value-picker-datetime/index.js +2820 -0
- package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +82 -0
- package/components/filter-value-picker-hierarchy/index.cjs +46 -0
- package/components/filter-value-picker-hierarchy/index.d.ts +7 -0
- package/components/filter-value-picker-hierarchy/index.js +278 -0
- package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +83 -0
- package/components/filter-value-picker-numeric/index.cjs +46 -0
- package/components/filter-value-picker-numeric/index.d.ts +7 -0
- package/components/filter-value-picker-numeric/index.js +274 -0
- package/components/flow-D-0MTYCm-BOBCoA5Z.js +546 -0
- package/components/flow-D-0MTYCm-BW5krWol.cjs +48 -0
- package/components/{focusable-BNESohBR-DbTLvYXr.cjs → focusable-BxtpnzWp-CkK9AeMt.cjs} +2 -2
- package/components/{focusable-BNESohBR-DYvAZYXL.js → focusable-BxtpnzWp-DJQkL8Zv.js} +1 -1
- package/components/focusable-DB6Uhr-C.js +275 -0
- package/components/focusable-_wp5pWO-.cjs +20 -0
- package/components/{fr-BWJHvkss.js → fr-BOwMikLT.js} +55 -1
- package/components/fr-DZbYwMlh.cjs +20 -0
- package/components/{get-css-variable-Bhbr-Kr1.js → get-css-variable-YlLiVgo8.js} +2 -2
- package/components/{if-defined-DbhS35z5.js → if-defined-B4gwZxx6.js} +1 -1
- package/components/{if-defined-D-1p2bLN-Bn-33APC.js → if-defined-DOaE2coe-CNT45Xcl.js} +1 -1
- package/components/{if-defined-D-1p2bLN-0_AoRnT2.cjs → if-defined-DOaE2coe-Cvlu5s9n.cjs} +1 -1
- package/components/{if-defined-CF8baNdl.cjs → if-defined-DqthfJme.cjs} +2 -2
- package/components/{index-Dwp251OJ.js → index-5mZhN-HJ.js} +7 -6
- package/components/{index-B3jkBlKY.js → index-BC1LV3vH.js} +3 -3
- package/components/{index-BXMPi13W.js → index-BCBLJ-ei.js} +82 -82
- package/components/{index-B9dQtvu7.js → index-BHJH1eGn.js} +3 -3
- package/components/index-BHXq1-M1.cjs +195 -0
- package/components/{index-C2-2RrwB.cjs → index-BKwbYw6x.cjs} +3 -3
- package/components/index-BOqSYlku.cjs +38 -0
- package/components/{index-D5rT-qy9.cjs → index-Bafc5poK.cjs} +12 -28
- package/components/{index-CqFCIIIl.js → index-BbuNpVBr.js} +3 -3
- package/components/{index-CRx2nPkq.js → index-Bmpw4rGV.js} +3 -3
- package/components/{index-D8Na-686.cjs → index-BoXbQm2o.cjs} +1 -1
- package/components/{index-uRWe553S.cjs → index-BtIWR_s6.cjs} +4 -4
- package/components/index-BwsEWpIS.js +494 -0
- package/components/{index-CF84gqsb.cjs → index-C2PPSv8E.cjs} +4 -4
- package/components/{index-CbeVu32V.js → index-C3N6qTxJ.js} +3 -3
- package/components/index-C5m9vRp5.js +598 -0
- package/components/{index-bZQXFqxv.cjs → index-CBOAQ3-E.cjs} +10 -10
- package/components/{index-_McOOiwL.cjs → index-CSm0I7Gz.cjs} +4 -4
- package/components/index-CTHlwZ9E.cjs +274 -0
- package/components/{index-Brg_sVUg.js → index-CTVNGPeT.js} +1 -1
- package/components/{index-Rjoe8cIs.js → index-Cb5l6iK_.js} +110 -173
- package/components/{index-BkCJwWm3.cjs → index-CeENkpNK.cjs} +3 -3
- package/components/{index-BnbhRpm9.js → index-CnRQGFHT.js} +3 -3
- package/components/{index-BKcvEgWr.cjs → index-CnpJUw_z.cjs} +3 -3
- package/components/{index-DJik7S7b.js → index-CsDgk_sj.js} +2 -2
- package/components/{index-fl13NYnO.js → index-CskV_bXp.js} +2 -2
- package/components/index-CyWwLYEO.js +1789 -0
- package/components/index-D9yzIoGv.js +1666 -0
- package/components/{index-Bwxvaqxq.cjs → index-DF-s3cEL.cjs} +11 -11
- package/components/{index-CVuJ-LUO.cjs → index-DSQyBS9Z.cjs} +2 -2
- package/components/{index-Bb8vxGZY.js → index-Desl7GJ0.js} +19 -15
- package/components/{index-0HUnZcem.cjs → index-DtohCwyO.cjs} +2 -2
- package/components/index-TQG9Xdxu.cjs +20 -0
- package/components/index-c2uKLWDt.cjs +157 -0
- package/components/{index-C9-QEfA9.cjs → index-j8UKjHqY.cjs} +4 -4
- package/components/{index-DZZMSlYS.js → index-rQxtPaJl.js} +6 -6
- package/components/index.cjs +1 -1
- package/components/index.js +41 -27
- package/components/localized-decorator-ClAOFk8M.cjs +28 -0
- package/components/localized-decorator-DGnMToFa.js +48 -0
- package/components/{luzmo-icons-U09GB75o.js → luzmo-icons-CPucBq6e.js} +89 -89
- package/components/luzmo-icons-DbwDQtuO-DSQ-uVxy.cjs +47 -0
- package/components/{luzmo-icons-BLN3xVgr-Tz5XXgbL.js → luzmo-icons-DbwDQtuO-QG0fLECn.js} +67 -25
- package/components/luzmo-icons-Nyf1P71v.cjs +31 -0
- package/components/nl-0V96M02q.cjs +20 -0
- package/components/nl-CY0iO3Ch.js +158 -0
- package/components/observe-slot-presence-CmVi0zTc-B4M1Mze7.cjs +36 -0
- package/components/observe-slot-presence-CmVi0zTc-DCFuXW7v.js +87 -0
- package/components/{observe-slot-text-CVKLDesL-BB2RmFgc.cjs → observe-slot-text-BPfIQQtz-DHOh38Ve.cjs} +4 -4
- package/components/{observe-slot-text-CVKLDesL-CXUeCmXW.js → observe-slot-text-BPfIQQtz-v6B-1BYh.js} +5 -5
- package/components/pending-state-DTX7ggyF-BQGaWUEI.cjs +80 -0
- package/components/pending-state-DTX7ggyF-KolnwUB7.js +321 -0
- package/components/{periods.const-CDIkC5CK.cjs → periods.const-BbgInj9J.cjs} +1 -1
- package/components/{periods.const-GHh5bPfs.js → periods.const-D2cMP5hH.js} +1 -1
- package/components/{popover-DRyjN9y_-w1zh4tvw.js → popover-DjX0aAnY-B_ujTfos.js} +2 -2
- package/components/{popover-DRyjN9y_-7mF_fAOh.cjs → popover-DjX0aAnY-CSUMV_Ay.cjs} +3 -3
- package/components/property-CxtZroGf.js +600 -0
- package/components/property-Dlf9S6Jz.cjs +42 -0
- package/components/{query-assigned-nodes-C76XVPWY-k1jDPyUQ.cjs → query-assigned-nodes-C76XVPWY-BW2w3V7-.cjs} +1 -1
- package/components/{query-assigned-nodes-C76XVPWY-BWouxGZs.js → query-assigned-nodes-C76XVPWY-DxNwGHfW.js} +1 -1
- package/components/scatter-plot-options.config-CFfGJXsV.cjs +20 -0
- package/components/{scatter-plot-options.config-lrkd9qj4.js → scatter-plot-options.config-Corlzno1.js} +78 -48
- package/components/set-locale-5FFfQpVQ.cjs +52 -0
- package/components/set-locale-DAGnJZD8.js +188 -0
- package/components/{sized-mixin-DMuOVsw0.js → sized-mixin-C7R5uRbF.js} +1 -1
- package/components/sized-mixin-ZTphZKLm.cjs +20 -0
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +12 -11
- package/components/slot-menu-list/index.cjs +3 -3
- package/components/slot-menu-list/index.js +15 -14
- package/components/{state-e2n-fyrr.js → state-BVYsk_HZ.js} +1 -1
- package/components/{state-QgHgNZLe.cjs → state-CrfOw8Zp.cjs} +2 -2
- package/components/{streaming-listener-C8Ctj0Q6-lanbGKR9.js → streaming-listener-CP-JE6Fa-9MH0gENR.js} +3 -3
- package/components/{streaming-listener-C8Ctj0Q6-BhMxS69F.cjs → streaming-listener-CP-JE6Fa-DMzr1X1m.cjs} +3 -3
- package/components/{task-fQFUVV8e.cjs → task-CdvrMX8r.cjs} +2 -2
- package/components/{task-gE27tBDv.js → task-DH8UFyxP.js} +1 -1
- package/components/{text-field-C0pFjPG1-BCVbGXp7.cjs → text-field-BIADXoLC-B8w9TVmS.cjs} +8 -8
- package/components/{text-field-C0pFjPG1-B4TRivuD.js → text-field-BIADXoLC-B9oE05VF.js} +11 -10
- package/custom-elements.json +1891 -34
- package/index.d.ts +7 -0
- package/item-definitions/scatter-plot/scatter-plot-options.config.d.ts +3 -0
- package/package.json +46 -1
- package/utils/data-broker/index.d.ts +179 -0
- package/utils/data-item-types/calculate-data-item-icon.d.ts +3 -0
- package/utils/filters/expressions.d.ts +15 -0
- package/utils/filters/index.d.ts +1 -0
- package/utils/localize/set-locale.d.ts +4 -2
- package/utils/types/column.types.d.ts +1 -1
- package/components/de-DgHoh7KS.cjs +0 -20
- package/components/draggable-data-item-level/helpers/calculate-type-icon.d.ts +0 -2
- package/components/edit-option-base-jkkFevzT.cjs +0 -53
- package/components/es-ByW01bzN.cjs +0 -20
- package/components/focusable-Cu_m_GTh.cjs +0 -42
- package/components/focusable-Dw_pMNQL.js +0 -852
- package/components/fr-DnFUAglm.cjs +0 -20
- package/components/index-CqynTbW1.cjs +0 -217
- package/components/index-DFnzlbHX.js +0 -779
- package/components/index-hogChFy0.cjs +0 -195
- package/components/luzmo-icons-BDClm1AE.cjs +0 -31
- package/components/luzmo-icons-BLN3xVgr-Cr3OrsqW.cjs +0 -47
- package/components/nl-CWxJcTNT.js +0 -104
- package/components/nl-CpfDNK5c.cjs +0 -20
- package/components/scatter-plot-options.config-DkJLutNb.cjs +0 -20
- package/components/set-locale-ByIApH40.cjs +0 -60
- package/components/set-locale-DJYT4V7U.js +0 -212
- package/components/sized-mixin-Cqlxwicw.cjs +0 -20
- /package/components/{divider.module-DwOuLGU3-B19eHVg2.js → divider.module-DoQWQEIJ-B19eHVg2.js} +0 -0
- /package/components/{divider.module-DwOuLGU3-Bg8RrFkc.cjs → divider.module-DoQWQEIJ-Bg8RrFkc.cjs} +0 -0
@@ -0,0 +1,82 @@
|
|
1
|
+
import '@luzmo/lucero/select';
|
2
|
+
import '@luzmo/lucero/text-field';
|
3
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
4
|
+
import { LuzmoElement } from '@luzmo/lucero/utils';
|
5
|
+
declare const LuzmoFilterValuePickerHierarchy_base: typeof LuzmoElement & {
|
6
|
+
new (...args: any[]): import("@luzmo/lucero").SizedElementInterface;
|
7
|
+
prototype: import("@luzmo/lucero").SizedElementInterface;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* @element luzmo-filter-value-picker-hierarchy
|
11
|
+
*/
|
12
|
+
export declare class LuzmoFilterValuePickerHierarchy extends LuzmoFilterValuePickerHierarchy_base {
|
13
|
+
static get styles(): CSSResultArray;
|
14
|
+
/**
|
15
|
+
* The API URL of the databroker
|
16
|
+
* @default https://api.luzmo.com
|
17
|
+
* @description The URL of the databroker API
|
18
|
+
*/
|
19
|
+
apiUrl?: string;
|
20
|
+
/**
|
21
|
+
* The auth key of the databroker
|
22
|
+
*/
|
23
|
+
authKey?: string;
|
24
|
+
/**
|
25
|
+
* The auth token of the databroker
|
26
|
+
*/
|
27
|
+
authToken?: string;
|
28
|
+
/**
|
29
|
+
* The cache time of the databroker
|
30
|
+
* @default 30000
|
31
|
+
* @description The time to cache the data in milliseconds
|
32
|
+
*/
|
33
|
+
cacheTime?: number;
|
34
|
+
/**
|
35
|
+
* The language of the settings interface
|
36
|
+
*/
|
37
|
+
language: string;
|
38
|
+
/**
|
39
|
+
* The language to use for locale-aware formatting and labels
|
40
|
+
*/
|
41
|
+
contentLanguage: string;
|
42
|
+
/**
|
43
|
+
* The filter used to retrieve the value
|
44
|
+
*/
|
45
|
+
filter?: any;
|
46
|
+
/**
|
47
|
+
* Stores the hierarchy values fetched from the databroker
|
48
|
+
*/
|
49
|
+
private _hierarchyValues;
|
50
|
+
/**
|
51
|
+
* Loading state for hierarchy values
|
52
|
+
*/
|
53
|
+
private _retrieving;
|
54
|
+
/**
|
55
|
+
* Search state for hierarchy values
|
56
|
+
*/
|
57
|
+
private _search;
|
58
|
+
/**
|
59
|
+
* Error state for hierarchy values fetching
|
60
|
+
*/
|
61
|
+
private _error;
|
62
|
+
private _value;
|
63
|
+
private _searchQueryTimeout;
|
64
|
+
private _allValuesRetrieved;
|
65
|
+
private _runningQueries;
|
66
|
+
connectedCallback(): void;
|
67
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
68
|
+
/**
|
69
|
+
* Fetches hierarchy values from the databroker
|
70
|
+
*/
|
71
|
+
private _fetchHierarchyValues;
|
72
|
+
private _sendChangeEvent;
|
73
|
+
private setHierarchy;
|
74
|
+
private onScrolled;
|
75
|
+
private renderTextField;
|
76
|
+
private setSearchString;
|
77
|
+
private resetSearchString;
|
78
|
+
private onOpened;
|
79
|
+
private renderHierarchyPicker;
|
80
|
+
protected render(): TemplateResult;
|
81
|
+
}
|
82
|
+
export {};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2025 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-CTHlwZ9E.cjs");require("../index-CSm0I7Gz.cjs");const u=require("../property-Dlf9S6Jz.cjs"),_=require("../set-locale-5FFfQpVQ.cjs"),$=require("../localized-decorator-ClAOFk8M.cjs"),L=require("../base-D76d76ww-tT6yr8eb.cjs");require("../focusable-BxtpnzWp-CkK9AeMt.cjs");const z=require("../index-TQG9Xdxu.cjs"),k=require("../localize-r7ALOUy_.cjs"),y=require("../state-CrfOw8Zp.cjs"),T=".missing-value{opacity:.4}:host{--var: blue}";var x=Object.defineProperty,F=Object.getOwnPropertyDescriptor,h=(b,e,r,t)=>{for(var i=t>1?void 0:t?F(e,r):e,l=b.length-1,n;l>=0;l--)(n=b[l])&&(i=(t?n(e,r,i):n(i))||i);return t&&i&&x(e,r,i),i};const H=5e3;exports.LuzmoFilterValuePickerHierarchy=class extends L.m(L.It,{validSizes:Object.values(L.d$1)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this._hierarchyValues=[],this._retrieving=!0,this._search="",this._error=null,this._allValuesRetrieved=!1,this._runningQueries=[]}static get styles(){return[u.r(T)]}connectedCallback(){super.connectedCallback();const e={};this.apiUrl&&(e.apiUrl=this.apiUrl),this.cacheTime&&(e.staleTime=this.cacheTime,e.gcTime=this.cacheTime*2),this.authKey&&this.authToken&&(e.authKey=this.authKey,e.authToken=this.authToken),z.dataBroker.configure(e)}willUpdate(e){var t,i,l,n,m,d,o,f,g,p,s,a,c,V;if(e.has("language")&&this.language!==_.getLocale()&&([..._.targetLocales].includes(this.language??"en")||this.language==="en")&&_.setLocale(this.language),e.has("filter")&&this.filter){const v=(t=e.get("filter"))==null?void 0:t.expression,P=((n=(l=(i=e.get("filter"))==null?void 0:i.parameters)==null?void 0:l[0])==null?void 0:n.columnId)||((o=(d=(m=e.get("filter"))==null?void 0:m.parameters)==null?void 0:d[0])==null?void 0:o.formulaId),S=((p=(g=(f=this.filter)==null?void 0:f.parameters)==null?void 0:g[0])==null?void 0:p.columnId)||((c=(a=(s=this.filter)==null?void 0:s.parameters)==null?void 0:a[0])==null?void 0:c.formulaId);P!==S&&(["? in ?","? not in ?","? = ?","? != ?"].includes((V=this.filter)==null?void 0:V.expression)||!["? in ?","? not in ?","? = ?","? != ?"].includes(v))&&(this._hierarchyValues=[],this._allValuesRetrieved=!1,this._retrieving=!0)}}async _fetchHierarchyValues(e=0){var g,p;if(this._allValuesRetrieved){this._retrieving=!1;return}if(!((p=(g=this.filter)==null?void 0:g.parameters)!=null&&p[0])){this._retrieving=!1,this._error="Missing column parameters";return}const r=this.filter.parameters[0],t=r.columnId,i=r.formulaId,l=r.datasetId;if(!t&&!i){this._retrieving=!1,this._error="Missing column id or formula id";return}else if(!l){this._retrieving=!1,this._error="Missing dataset id";return}this._retrieving=!0,this._error=null;const n={expression:"? like ?",parameters:[{column_id:t,formula_id:i,dataset_id:l},this._search]},m={dimensions:[{column_id:t,formula_id:i,dataset_id:l}],where:[],order:[{column_id:t,formula_id:i,dataset_id:l,order:"asc"}],limit:{by:H,offset:e}};this._search&&this._allValuesRetrieved&&m.where.push(n);const d=new AbortController,o=new Promise((s,a)=>{z.dataBroker.fetchData(m).then(s).catch(a),d.signal.addEventListener("abort",()=>{console.warn("Request aborted"),a({status:"aborted"})})}),f={promise:o,abortController:d};this._runningQueries.push(f);try{const s=await o,a=s&&Array.isArray(s.data)?s.data.map(c=>c[0]):[];this._search||(this._allValuesRetrieved=a.length<H),this._hierarchyValues=e>0?[...this._hierarchyValues,...a]:a}catch(s){if((s==null?void 0:s.status)==="aborted")return;this._error=s instanceof Error?s.message:"Unknown error",this._hierarchyValues=[]}finally{this._runningQueries=this._runningQueries.filter(s=>s.promise!==o),this._retrieving=!1}}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("filter-value-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setHierarchy(e){var t,i,l,n,m,d,o,f;let r;["? in ?","? not in ?"].includes((t=this.filter)==null?void 0:t.expression)?r=(i=e==null?void 0:e.detail)==null?void 0:i.value:["? = ?","? != ?"].includes((l=this.filter)==null?void 0:l.expression)?r=(m=(n=e==null?void 0:e.detail)==null?void 0:n.value)==null?void 0:m[0]:r=(d=e==null?void 0:e.target)==null?void 0:d.value,this._value!==r&&(this._value=r,this.filter={...this.filter,parameters:[{...(f=(o=this.filter)==null?void 0:o.parameters)==null?void 0:f[0]},this._value]},this._sendChangeEvent())}onScrolled(e){var r;!this._retrieving&&!this._allValuesRetrieved&&((r=e==null?void 0:e.detail)==null?void 0:r.last)===this._hierarchyValues.length-1&&this._fetchHierarchyValues(this._hierarchyValues.length)}renderTextField(){var e,r;return u.x`<luzmo-text-field
|
21
|
+
.size=${this.size}
|
22
|
+
@change=${this.setHierarchy}
|
23
|
+
@input=${this.setHierarchy}
|
24
|
+
.value=${((r=(e=this.filter)==null?void 0:e.parameters)==null?void 0:r[1])??""}
|
25
|
+
></luzmo-text-field>`}setSearchString(e){var r;this._search=((r=e==null?void 0:e.detail)==null?void 0:r.string)??"",this._allValuesRetrieved||(this._searchQueryTimeout&&(this._runningQueries.forEach(t=>{t!=null&&t.abortController&&t.abortController.abort()}),this._runningQueries=[],clearTimeout(this._searchQueryTimeout)),this._searchQueryTimeout=setTimeout(()=>{this._fetchHierarchyValues()},500))}resetSearchString(){this._search=""}onOpened(){this._fetchHierarchyValues()}renderHierarchyPicker(){var o,f,g,p,s;if(this._error)return u.x`<div class="error">Error: ${this._error}</div>`;const e=(this._search?this._hierarchyValues.filter(a=>{var c;return((c=k.localize(a.name,this.contentLanguage,{allowEmpty:!0}))==null?void 0:c.toLowerCase().includes(this._search.toLowerCase()))||a.toString().toLowerCase().includes(this._search.toLowerCase())}):this._hierarchyValues).map(a=>{let c=k.localize(a==null?void 0:a.name,this.contentLanguage)??"N/A";return typeof c!="string"&&(c="N/A"),{value:a==null?void 0:a.id,label:c}}),r=(o=this.filter)==null?void 0:o.expression,t=["? = ?","? != ?"].includes(r),i=_.msg("Selected {count} items"),l=_.msg("Search"),n=_.msg("No data"),m=_.msg("No results"),d=_.msg("Select...");return u.x`<luzmo-select
|
26
|
+
.size=${this.size}
|
27
|
+
.label=${d}
|
28
|
+
.retrieving=${this._retrieving}
|
29
|
+
.selects=${t?"single":"multiple"}
|
30
|
+
.variant=${t?"highlight":"checkboxes"}
|
31
|
+
emphasized
|
32
|
+
no-wrap
|
33
|
+
?invalid=${!!this._error}
|
34
|
+
.multipleLabelTemplate=${i}
|
35
|
+
.searchLabel=${l}
|
36
|
+
.noDataLabel=${n}
|
37
|
+
.noResultsLabel=${m}
|
38
|
+
@change=${this.setHierarchy}
|
39
|
+
@luzmo-search=${this.setSearchString}
|
40
|
+
@luzmo-opened=${this.onOpened}
|
41
|
+
@luzmo-closed=${this.resetSearchString}
|
42
|
+
@luzmo-scrolled=${this.onScrolled}
|
43
|
+
.options=${e}
|
44
|
+
.value=${t?[(g=(f=this.filter)==null?void 0:f.parameters)==null?void 0:g[1]]:(s=(p=this.filter)==null?void 0:p.parameters)==null?void 0:s[1]}
|
45
|
+
>
|
46
|
+
</luzmo-select>`}render(){var r;const e=(r=this.filter)==null?void 0:r.expression;return["? in ?","? not in ?","? = ?","? != ?"].includes(e)?this.renderHierarchyPicker():this.renderTextField()}};h([u.n({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoFilterValuePickerHierarchy.prototype,"apiUrl",2);h([u.n({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoFilterValuePickerHierarchy.prototype,"authKey",2);h([u.n({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoFilterValuePickerHierarchy.prototype,"authToken",2);h([u.n({type:Number,attribute:"cache-time",reflect:!0})],exports.LuzmoFilterValuePickerHierarchy.prototype,"cacheTime",2);h([u.n({type:String,reflect:!0})],exports.LuzmoFilterValuePickerHierarchy.prototype,"language",2);h([u.n({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterValuePickerHierarchy.prototype,"contentLanguage",2);h([u.n({type:Object,reflect:!1})],exports.LuzmoFilterValuePickerHierarchy.prototype,"filter",2);h([y.r()],exports.LuzmoFilterValuePickerHierarchy.prototype,"_hierarchyValues",2);h([y.r()],exports.LuzmoFilterValuePickerHierarchy.prototype,"_retrieving",2);h([y.r()],exports.LuzmoFilterValuePickerHierarchy.prototype,"_search",2);h([y.r()],exports.LuzmoFilterValuePickerHierarchy.prototype,"_error",2);exports.LuzmoFilterValuePickerHierarchy=h([$.localized()],exports.LuzmoFilterValuePickerHierarchy);customElements.get("luzmo-filter-value-picker-hierarchy")||customElements.define("luzmo-filter-value-picker-hierarchy",exports.LuzmoFilterValuePickerHierarchy);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LuzmoFilterValuePickerHierarchy } from './filter-value-picker-hierarchy';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'luzmo-filter-value-picker-hierarchy': LuzmoFilterValuePickerHierarchy;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export { LuzmoFilterValuePickerHierarchy } from './filter-value-picker-hierarchy';
|
@@ -0,0 +1,278 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2025 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
import "../index-CyWwLYEO.js";
|
21
|
+
import "../index-BbuNpVBr.js";
|
22
|
+
import { r as T, x as y, n as z } from "../property-CxtZroGf.js";
|
23
|
+
import { g as C, t as I, s as E, m as b } from "../set-locale-DAGnJZD8.js";
|
24
|
+
import { l as H } from "../localized-decorator-DGnMToFa.js";
|
25
|
+
import { m as R, b as O, I as D } from "../base-D76d76ww-BGkuhs54.js";
|
26
|
+
import "../focusable-BxtpnzWp-DJQkL8Zv.js";
|
27
|
+
import { d as v } from "../index-D9yzIoGv.js";
|
28
|
+
import { l as w } from "../localize-BX7q0S0M.js";
|
29
|
+
import { r as _ } from "../state-BVYsk_HZ.js";
|
30
|
+
const $ = () => {
|
31
|
+
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
32
|
+
const e = document.createElement("style");
|
33
|
+
e.setAttribute("data-luzmo-vars", ""), e.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(e);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
$();
|
37
|
+
const P = ".missing-value{opacity:.4}:host{--var: blue}";
|
38
|
+
var Q = Object.defineProperty, U = Object.getOwnPropertyDescriptor, m = (e, r, o, s) => {
|
39
|
+
for (var t = s > 1 ? void 0 : s ? U(r, o) : r, u = e.length - 1, a; u >= 0; u--)
|
40
|
+
(a = e[u]) && (t = (s ? a(r, o, t) : a(t)) || t);
|
41
|
+
return s && t && Q(r, o, t), t;
|
42
|
+
};
|
43
|
+
const S = 5e3;
|
44
|
+
let n = class extends R(D, {
|
45
|
+
validSizes: Object.values(O)
|
46
|
+
}) {
|
47
|
+
constructor() {
|
48
|
+
super(...arguments), this.language = "en", this.contentLanguage = "en", this._hierarchyValues = [], this._retrieving = !0, this._search = "", this._error = null, this._allValuesRetrieved = !1, this._runningQueries = [];
|
49
|
+
}
|
50
|
+
static get styles() {
|
51
|
+
return [T(P)];
|
52
|
+
}
|
53
|
+
connectedCallback() {
|
54
|
+
super.connectedCallback();
|
55
|
+
const e = {};
|
56
|
+
this.apiUrl && (e.apiUrl = this.apiUrl), this.cacheTime && (e.staleTime = this.cacheTime, e.gcTime = this.cacheTime * 2), this.authKey && this.authToken && (e.authKey = this.authKey, e.authToken = this.authToken), v.configure(e);
|
57
|
+
}
|
58
|
+
willUpdate(e) {
|
59
|
+
var o, s, t, u, a, d, c, f, g, p, i, l, h, x;
|
60
|
+
if (e.has("language") && this.language !== C() && ([...I].includes(this.language ?? "en") || this.language === "en") && E(this.language), e.has("filter") && this.filter) {
|
61
|
+
const L = (o = e.get("filter")) == null ? void 0 : o.expression, k = ((u = (t = (s = e.get("filter")) == null ? void 0 : s.parameters) == null ? void 0 : t[0]) == null ? void 0 : u.columnId) || ((c = (d = (a = e.get("filter")) == null ? void 0 : a.parameters) == null ? void 0 : d[0]) == null ? void 0 : c.formulaId), V = ((p = (g = (f = this.filter) == null ? void 0 : f.parameters) == null ? void 0 : g[0]) == null ? void 0 : p.columnId) || ((h = (l = (i = this.filter) == null ? void 0 : i.parameters) == null ? void 0 : l[0]) == null ? void 0 : h.formulaId);
|
62
|
+
k !== V && (["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
|
63
|
+
(x = this.filter) == null ? void 0 : x.expression
|
64
|
+
) || !["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
|
65
|
+
L
|
66
|
+
)) && (this._hierarchyValues = [], this._allValuesRetrieved = !1, this._retrieving = !0);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* Fetches hierarchy values from the databroker
|
71
|
+
*/
|
72
|
+
async _fetchHierarchyValues(e = 0) {
|
73
|
+
var g, p;
|
74
|
+
if (this._allValuesRetrieved) {
|
75
|
+
this._retrieving = !1;
|
76
|
+
return;
|
77
|
+
}
|
78
|
+
if (!((p = (g = this.filter) == null ? void 0 : g.parameters) != null && p[0])) {
|
79
|
+
this._retrieving = !1, this._error = "Missing column parameters";
|
80
|
+
return;
|
81
|
+
}
|
82
|
+
const r = this.filter.parameters[0], o = r.columnId, s = r.formulaId, t = r.datasetId;
|
83
|
+
if (!o && !s) {
|
84
|
+
this._retrieving = !1, this._error = "Missing column id or formula id";
|
85
|
+
return;
|
86
|
+
} else if (!t) {
|
87
|
+
this._retrieving = !1, this._error = "Missing dataset id";
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
this._retrieving = !0, this._error = null;
|
91
|
+
const u = {
|
92
|
+
expression: "? like ?",
|
93
|
+
parameters: [
|
94
|
+
{
|
95
|
+
column_id: o,
|
96
|
+
formula_id: s,
|
97
|
+
dataset_id: t
|
98
|
+
},
|
99
|
+
this._search
|
100
|
+
]
|
101
|
+
}, a = {
|
102
|
+
dimensions: [
|
103
|
+
{
|
104
|
+
column_id: o,
|
105
|
+
formula_id: s,
|
106
|
+
dataset_id: t
|
107
|
+
}
|
108
|
+
],
|
109
|
+
where: [],
|
110
|
+
order: [
|
111
|
+
{
|
112
|
+
column_id: o,
|
113
|
+
formula_id: s,
|
114
|
+
dataset_id: t,
|
115
|
+
order: "asc"
|
116
|
+
}
|
117
|
+
],
|
118
|
+
limit: {
|
119
|
+
by: S,
|
120
|
+
offset: e
|
121
|
+
}
|
122
|
+
};
|
123
|
+
this._search && this._allValuesRetrieved && a.where.push(u);
|
124
|
+
const d = new AbortController(), c = new Promise((i, l) => {
|
125
|
+
v.fetchData(a).then(i).catch(l), d.signal.addEventListener("abort", () => {
|
126
|
+
console.warn("Request aborted"), l({ status: "aborted" });
|
127
|
+
});
|
128
|
+
}), f = {
|
129
|
+
promise: c,
|
130
|
+
abortController: d
|
131
|
+
};
|
132
|
+
this._runningQueries.push(f);
|
133
|
+
try {
|
134
|
+
const i = await c, l = i && Array.isArray(i.data) ? i.data.map((h) => h[0]) : [];
|
135
|
+
this._search || (this._allValuesRetrieved = l.length < S), this._hierarchyValues = e > 0 ? [...this._hierarchyValues, ...l] : l;
|
136
|
+
} catch (i) {
|
137
|
+
if ((i == null ? void 0 : i.status) === "aborted")
|
138
|
+
return;
|
139
|
+
this._error = i instanceof Error ? i.message : "Unknown error", this._hierarchyValues = [];
|
140
|
+
} finally {
|
141
|
+
this._runningQueries = this._runningQueries.filter(
|
142
|
+
(i) => i.promise !== c
|
143
|
+
), this._retrieving = !1;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
_sendChangeEvent() {
|
147
|
+
this.dispatchEvent(
|
148
|
+
new CustomEvent("filter-value-changed", {
|
149
|
+
bubbles: !0,
|
150
|
+
composed: !0,
|
151
|
+
cancelable: !0,
|
152
|
+
detail: {
|
153
|
+
value: this._value
|
154
|
+
}
|
155
|
+
})
|
156
|
+
);
|
157
|
+
}
|
158
|
+
setHierarchy(e) {
|
159
|
+
var o, s, t, u, a, d, c, f;
|
160
|
+
let r;
|
161
|
+
["? in ?", "? not in ?"].includes((o = this.filter) == null ? void 0 : o.expression) ? r = (s = e == null ? void 0 : e.detail) == null ? void 0 : s.value : ["? = ?", "? != ?"].includes((t = this.filter) == null ? void 0 : t.expression) ? r = (a = (u = e == null ? void 0 : e.detail) == null ? void 0 : u.value) == null ? void 0 : a[0] : r = (d = e == null ? void 0 : e.target) == null ? void 0 : d.value, this._value !== r && (this._value = r, this.filter = {
|
162
|
+
...this.filter,
|
163
|
+
parameters: [{ ...(f = (c = this.filter) == null ? void 0 : c.parameters) == null ? void 0 : f[0] }, this._value]
|
164
|
+
}, this._sendChangeEvent());
|
165
|
+
}
|
166
|
+
onScrolled(e) {
|
167
|
+
var r;
|
168
|
+
!this._retrieving && !this._allValuesRetrieved && ((r = e == null ? void 0 : e.detail) == null ? void 0 : r.last) === this._hierarchyValues.length - 1 && this._fetchHierarchyValues(this._hierarchyValues.length);
|
169
|
+
}
|
170
|
+
renderTextField() {
|
171
|
+
var e, r;
|
172
|
+
return y`<luzmo-text-field
|
173
|
+
.size=${this.size}
|
174
|
+
@change=${this.setHierarchy}
|
175
|
+
@input=${this.setHierarchy}
|
176
|
+
.value=${((r = (e = this.filter) == null ? void 0 : e.parameters) == null ? void 0 : r[1]) ?? ""}
|
177
|
+
></luzmo-text-field>`;
|
178
|
+
}
|
179
|
+
setSearchString(e) {
|
180
|
+
var r;
|
181
|
+
this._search = ((r = e == null ? void 0 : e.detail) == null ? void 0 : r.string) ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((o) => {
|
182
|
+
o != null && o.abortController && o.abortController.abort();
|
183
|
+
}), this._runningQueries = [], clearTimeout(this._searchQueryTimeout)), this._searchQueryTimeout = setTimeout(() => {
|
184
|
+
this._fetchHierarchyValues();
|
185
|
+
}, 500));
|
186
|
+
}
|
187
|
+
resetSearchString() {
|
188
|
+
this._search = "";
|
189
|
+
}
|
190
|
+
onOpened() {
|
191
|
+
this._fetchHierarchyValues();
|
192
|
+
}
|
193
|
+
renderHierarchyPicker() {
|
194
|
+
var c, f, g, p, i;
|
195
|
+
if (this._error)
|
196
|
+
return y`<div class="error">Error: ${this._error}</div>`;
|
197
|
+
const e = (this._search ? this._hierarchyValues.filter((l) => {
|
198
|
+
var h;
|
199
|
+
return ((h = w(l.name, this.contentLanguage, { allowEmpty: !0 })) == null ? void 0 : h.toLowerCase().includes(this._search.toLowerCase())) || l.toString().toLowerCase().includes(this._search.toLowerCase());
|
200
|
+
}) : this._hierarchyValues).map((l) => {
|
201
|
+
let h = w(l == null ? void 0 : l.name, this.contentLanguage) ?? "N/A";
|
202
|
+
return typeof h != "string" && (h = "N/A"), {
|
203
|
+
value: l == null ? void 0 : l.id,
|
204
|
+
label: h
|
205
|
+
};
|
206
|
+
}), r = (c = this.filter) == null ? void 0 : c.expression, o = ["? = ?", "? != ?"].includes(r), s = b("Selected {count} items"), t = b("Search"), u = b("No data"), a = b("No results"), d = b("Select...");
|
207
|
+
return y`<luzmo-select
|
208
|
+
.size=${this.size}
|
209
|
+
.label=${d}
|
210
|
+
.retrieving=${this._retrieving}
|
211
|
+
.selects=${o ? "single" : "multiple"}
|
212
|
+
.variant=${o ? "highlight" : "checkboxes"}
|
213
|
+
emphasized
|
214
|
+
no-wrap
|
215
|
+
?invalid=${!!this._error}
|
216
|
+
.multipleLabelTemplate=${s}
|
217
|
+
.searchLabel=${t}
|
218
|
+
.noDataLabel=${u}
|
219
|
+
.noResultsLabel=${a}
|
220
|
+
@change=${this.setHierarchy}
|
221
|
+
@luzmo-search=${this.setSearchString}
|
222
|
+
@luzmo-opened=${this.onOpened}
|
223
|
+
@luzmo-closed=${this.resetSearchString}
|
224
|
+
@luzmo-scrolled=${this.onScrolled}
|
225
|
+
.options=${e}
|
226
|
+
.value=${o ? [(g = (f = this.filter) == null ? void 0 : f.parameters) == null ? void 0 : g[1]] : (i = (p = this.filter) == null ? void 0 : p.parameters) == null ? void 0 : i[1]}
|
227
|
+
>
|
228
|
+
</luzmo-select>`;
|
229
|
+
}
|
230
|
+
render() {
|
231
|
+
var r;
|
232
|
+
const e = (r = this.filter) == null ? void 0 : r.expression;
|
233
|
+
return ["? in ?", "? not in ?", "? = ?", "? != ?"].includes(e) ? this.renderHierarchyPicker() : this.renderTextField();
|
234
|
+
}
|
235
|
+
};
|
236
|
+
m([
|
237
|
+
z({ type: String, attribute: "api-url", reflect: !0 })
|
238
|
+
], n.prototype, "apiUrl", 2);
|
239
|
+
m([
|
240
|
+
z({ type: String, attribute: "auth-key", reflect: !0 })
|
241
|
+
], n.prototype, "authKey", 2);
|
242
|
+
m([
|
243
|
+
z({ type: String, attribute: "auth-token", reflect: !0 })
|
244
|
+
], n.prototype, "authToken", 2);
|
245
|
+
m([
|
246
|
+
z({ type: Number, attribute: "cache-time", reflect: !0 })
|
247
|
+
], n.prototype, "cacheTime", 2);
|
248
|
+
m([
|
249
|
+
z({ type: String, reflect: !0 })
|
250
|
+
], n.prototype, "language", 2);
|
251
|
+
m([
|
252
|
+
z({ type: String, attribute: "content-language", reflect: !0 })
|
253
|
+
], n.prototype, "contentLanguage", 2);
|
254
|
+
m([
|
255
|
+
z({ type: Object, reflect: !1 })
|
256
|
+
], n.prototype, "filter", 2);
|
257
|
+
m([
|
258
|
+
_()
|
259
|
+
], n.prototype, "_hierarchyValues", 2);
|
260
|
+
m([
|
261
|
+
_()
|
262
|
+
], n.prototype, "_retrieving", 2);
|
263
|
+
m([
|
264
|
+
_()
|
265
|
+
], n.prototype, "_search", 2);
|
266
|
+
m([
|
267
|
+
_()
|
268
|
+
], n.prototype, "_error", 2);
|
269
|
+
n = m([
|
270
|
+
H()
|
271
|
+
], n);
|
272
|
+
customElements.get("luzmo-filter-value-picker-hierarchy") || customElements.define(
|
273
|
+
"luzmo-filter-value-picker-hierarchy",
|
274
|
+
n
|
275
|
+
);
|
276
|
+
export {
|
277
|
+
n as LuzmoFilterValuePickerHierarchy
|
278
|
+
};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import '@luzmo/lucero/number-field';
|
2
|
+
import '@luzmo/lucero/select';
|
3
|
+
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
4
|
+
import { LuzmoElement } from '@luzmo/lucero/utils';
|
5
|
+
declare const LuzmoFilterValuePickerNumeric_base: typeof LuzmoElement & {
|
6
|
+
new (...args: any[]): import("@luzmo/lucero").SizedElementInterface;
|
7
|
+
prototype: import("@luzmo/lucero").SizedElementInterface;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* @element luzmo-filter-value-picker-numeric
|
11
|
+
*/
|
12
|
+
export declare class LuzmoFilterValuePickerNumeric extends LuzmoFilterValuePickerNumeric_base {
|
13
|
+
static get styles(): CSSResultArray;
|
14
|
+
/**
|
15
|
+
* The API URL of the databroker
|
16
|
+
* @default https://api.luzmo.com
|
17
|
+
* @description The URL of the databroker API
|
18
|
+
*/
|
19
|
+
apiUrl?: string;
|
20
|
+
/**
|
21
|
+
* The auth key of the databroker
|
22
|
+
*/
|
23
|
+
authKey?: string;
|
24
|
+
/**
|
25
|
+
* The auth token of the databroker
|
26
|
+
*/
|
27
|
+
authToken?: string;
|
28
|
+
/**
|
29
|
+
* The cache time of the databroker
|
30
|
+
* @default 30000
|
31
|
+
* @description The time to cache the data in milliseconds
|
32
|
+
*/
|
33
|
+
cacheTime?: number;
|
34
|
+
/**
|
35
|
+
* The language of the settings interface
|
36
|
+
*/
|
37
|
+
language: string;
|
38
|
+
/**
|
39
|
+
* The language to use for locale-aware formatting and labels
|
40
|
+
*/
|
41
|
+
contentLanguage: string;
|
42
|
+
/**
|
43
|
+
* The filter used to retrieve the value
|
44
|
+
*/
|
45
|
+
filter?: any;
|
46
|
+
/**
|
47
|
+
* Stores the hierarchy values fetched from the databroker
|
48
|
+
*/
|
49
|
+
private _numericValues;
|
50
|
+
/**
|
51
|
+
* Loading state for hierarchy values
|
52
|
+
*/
|
53
|
+
private _retrieving;
|
54
|
+
/**
|
55
|
+
* Search state for hierarchy values
|
56
|
+
*/
|
57
|
+
private _search;
|
58
|
+
/**
|
59
|
+
* Error state for hierarchy values fetching
|
60
|
+
*/
|
61
|
+
private _error;
|
62
|
+
private _value;
|
63
|
+
private _searchQueryTimeout;
|
64
|
+
private _allValuesRetrieved;
|
65
|
+
private _runningQueries;
|
66
|
+
connectedCallback(): void;
|
67
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
68
|
+
/**
|
69
|
+
* Fetches numeric values from the databroker
|
70
|
+
*/
|
71
|
+
private _fetchNumericValues;
|
72
|
+
private _sendChangeEvent;
|
73
|
+
private setValue;
|
74
|
+
private selectValue;
|
75
|
+
private onScrolled;
|
76
|
+
private renderNumberField;
|
77
|
+
private setSearchString;
|
78
|
+
private resetSearchString;
|
79
|
+
private onOpened;
|
80
|
+
private renderValuePicker;
|
81
|
+
protected render(): TemplateResult;
|
82
|
+
}
|
83
|
+
export {};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2025 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-CBOAQ3-E.cjs");require("../index-CTHlwZ9E.cjs");const c=require("../property-Dlf9S6Jz.cjs"),d=require("../set-locale-5FFfQpVQ.cjs"),F=require("../localized-decorator-ClAOFk8M.cjs"),v=require("../base-D76d76ww-tT6yr8eb.cjs");require("../focusable-BxtpnzWp-CkK9AeMt.cjs");const z=require("../index-TQG9Xdxu.cjs"),b=require("../state-CrfOw8Zp.cjs"),T=".missing-value{opacity:.4}:host{--var: blue}";var I=Object.defineProperty,w=Object.getOwnPropertyDescriptor,n=(V,e,t,r)=>{for(var i=r>1?void 0:r?w(e,t):e,s=V.length-1,a;s>=0;s--)(a=V[s])&&(i=(r?a(e,t,i):a(i))||i);return r&&i&&I(e,t,i),i};const k=5e3;exports.LuzmoFilterValuePickerNumeric=class extends v.m(v.It,{validSizes:Object.values(v.d$1)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this._numericValues=[],this._retrieving=!0,this._search="",this._error=null,this._allValuesRetrieved=!1,this._runningQueries=[]}static get styles(){return[c.r(T)]}connectedCallback(){super.connectedCallback();const e={};this.apiUrl&&(e.apiUrl=this.apiUrl),this.cacheTime&&(e.staleTime=this.cacheTime,e.gcTime=this.cacheTime*2),this.authKey&&this.authToken&&(e.authKey=this.authKey,e.authToken=this.authToken),z.dataBroker.configure(e)}willUpdate(e){var i,s,a,u,m,o,_,p,f,l,h,g,L,y;const t=e.has("filter");if(e.has("language")&&this.language!==d.getLocale()&&([...d.targetLocales].includes(this.language??"en")||this.language==="en")&&d.setLocale(this.language),t&&this.filter){const N=(i=e.get("filter"))==null?void 0:i.expression,S=(s=this.filter)==null?void 0:s.expression,P=((m=(u=(a=e.get("filter"))==null?void 0:a.parameters)==null?void 0:u[0])==null?void 0:m.columnId)||((p=(_=(o=e.get("filter"))==null?void 0:o.parameters)==null?void 0:_[0])==null?void 0:p.formulaId),$=((h=(l=(f=this.filter)==null?void 0:f.parameters)==null?void 0:l[0])==null?void 0:h.columnId)||((y=(L=(g=this.filter)==null?void 0:g.parameters)==null?void 0:L[0])==null?void 0:y.formulaId);(P!==$||!["? in ?","? not in ?"].includes(N))&&["? in ?","? not in ?"].includes(S)&&(this._numericValues=[],this._allValuesRetrieved=!1,this._retrieving=!0)}}async _fetchNumericValues(e=0){var p,f;if(this._allValuesRetrieved){this._retrieving=!1;return}if(!((f=(p=this.filter)==null?void 0:p.parameters)!=null&&f[0])){this._retrieving=!1,this._error="Missing column parameters";return}const t=this.filter.parameters[0],r=t.columnId,i=t.formulaId,s=t.datasetId;if(!r&&!i){this._retrieving=!1,this._error="Missing column id or formula id";return}else if(!s){this._retrieving=!1,this._error="Missing dataset id";return}this._retrieving=!0,this._error=null;const a={expression:"? like ?",parameters:[{dataset_id:s,expression:`CAST({${s}:${r??i}},hierarchy)`},this._search]},u={dimensions:[{column_id:r,formula_id:i,dataset_id:s}],where:[],order:[{column_id:r,formula_id:i,dataset_id:s,order:"asc"}],limit:{by:k,offset:e}};this._search&&!this._allValuesRetrieved&&u.where.push(a);const m=new AbortController,o=new Promise((l,h)=>{z.dataBroker.fetchData(u).then(l).catch(h),m.signal.addEventListener("abort",()=>{console.warn("Request aborted"),h({status:"aborted"})})}),_={promise:o,abortController:m};this._runningQueries.push(_);try{const l=await o,h=l&&Array.isArray(l.data)?l.data.map(g=>g[0]):[];this._search||(this._allValuesRetrieved=h.length<k),this._numericValues=e>0?[...this._numericValues,...h]:h}catch(l){if((l==null?void 0:l.status)==="aborted")return;this._error=l instanceof Error?l.message:"Unknown error",this._numericValues=[]}finally{this._runningQueries=this._runningQueries.filter(l=>l.promise!==o),this._retrieving=!1}}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("filter-value-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setValue(e){var r,i,s,a,u;const t=["? in ?","? not in ?"].includes((r=this.filter)==null?void 0:r.expression)?(i=e==null?void 0:e.detail)==null?void 0:i.value:(s=e==null?void 0:e.target)==null?void 0:s.value;this._value!==t&&(this._value=t,this.filter={...this.filter,parameters:[{...(u=(a=this.filter)==null?void 0:a.parameters)==null?void 0:u[0]},t]},this._sendChangeEvent())}selectValue(e){var i,s,a;const r=(((i=e.detail)==null?void 0:i.value)??"").map(u=>Number.parseFloat(u));this.filter={...this.filter,parameters:[{...(a=(s=this.filter)==null?void 0:s.parameters)==null?void 0:a[0]},r]},this._value=r,this._sendChangeEvent()}onScrolled(e){var t;!this._retrieving&&!this._allValuesRetrieved&&((t=e==null?void 0:e.detail)==null?void 0:t.last)===this._numericValues.length-1&&this._fetchNumericValues(this._numericValues.length)}renderNumberField(){var e,t;return c.x`<luzmo-number-field
|
21
|
+
.size=${this.size}
|
22
|
+
@change=${this.setValue}
|
23
|
+
@input=${this.setValue}
|
24
|
+
.value=${(t=(e=this.filter)==null?void 0:e.parameters)==null?void 0:t[1]}
|
25
|
+
></luzmo-number-field>`}setSearchString(e){var t;this._search=((t=e==null?void 0:e.detail)==null?void 0:t.string)??"",this._allValuesRetrieved||(this._searchQueryTimeout&&(this._runningQueries.forEach(r=>{r!=null&&r.abortController&&r.abortController.abort()}),this._runningQueries=[],clearTimeout(this._searchQueryTimeout)),this._searchQueryTimeout=setTimeout(()=>{this._fetchNumericValues()},500))}resetSearchString(){this._search=""}onOpened(){this._fetchNumericValues()}renderValuePicker(){var u,m;this._error&&console.error(`Numeric value retrieve error: ${this._error}`);const e=this._numericValues.filter(o=>o.toString().toLowerCase().includes(this._search.toLowerCase())).map(o=>({value:o,label:o})),t=d.msg("Selected {count} items"),r=d.msg("Search"),i=d.msg("No data"),s=d.msg("No results"),a=d.msg("Select...");return c.x`<luzmo-select
|
26
|
+
.size=${this.size}
|
27
|
+
.label=${a}
|
28
|
+
.retrieving=${this._retrieving}
|
29
|
+
selects="multiple"
|
30
|
+
variant="checkboxes"
|
31
|
+
emphasized
|
32
|
+
no-wrap
|
33
|
+
?invalid=${!!this._error}
|
34
|
+
.multipleLabelTemplate=${t}
|
35
|
+
.searchLabel=${r}
|
36
|
+
.noDataLabel=${i}
|
37
|
+
.noResultsLabel=${s}
|
38
|
+
@change=${this.selectValue}
|
39
|
+
@luzmo-search=${this.setSearchString}
|
40
|
+
@luzmo-opened=${this.onOpened}
|
41
|
+
@luzmo-closed=${this.resetSearchString}
|
42
|
+
@luzmo-scrolled=${this.onScrolled}
|
43
|
+
.options=${e}
|
44
|
+
.value=${(m=(u=this.filter)==null?void 0:u.parameters)==null?void 0:m[1]}
|
45
|
+
>
|
46
|
+
</luzmo-select>`}render(){var t;const e=(t=this.filter)==null?void 0:t.expression;return["? in ?","? not in ?"].includes(e)?this.renderValuePicker():this.renderNumberField()}};n([c.n({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"apiUrl",2);n([c.n({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authKey",2);n([c.n({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authToken",2);n([c.n({type:Number,attribute:"cache-time",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"cacheTime",2);n([c.n({type:String,reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"language",2);n([c.n({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"contentLanguage",2);n([c.n({type:Object,reflect:!1})],exports.LuzmoFilterValuePickerNumeric.prototype,"filter",2);n([b.r()],exports.LuzmoFilterValuePickerNumeric.prototype,"_numericValues",2);n([b.r()],exports.LuzmoFilterValuePickerNumeric.prototype,"_retrieving",2);n([b.r()],exports.LuzmoFilterValuePickerNumeric.prototype,"_search",2);n([b.r()],exports.LuzmoFilterValuePickerNumeric.prototype,"_error",2);exports.LuzmoFilterValuePickerNumeric=n([F.localized()],exports.LuzmoFilterValuePickerNumeric);customElements.get("luzmo-filter-value-picker-numeric")||customElements.define("luzmo-filter-value-picker-numeric",exports.LuzmoFilterValuePickerNumeric);
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LuzmoFilterValuePickerNumeric } from './filter-value-picker-numeric';
|
2
|
+
declare global {
|
3
|
+
interface HTMLElementTagNameMap {
|
4
|
+
'luzmo-filter-value-picker-numeric': LuzmoFilterValuePickerNumeric;
|
5
|
+
}
|
6
|
+
}
|
7
|
+
export { LuzmoFilterValuePickerNumeric } from './filter-value-picker-numeric';
|