@luzmo/analytics-components-kit 1.0.3-beta.4 → 1.0.3-beta.6
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/ai-chat/ai-chat-request.d.ts +11 -0
- package/components/ai-chat/ai-chat.d.ts +59 -54
- package/components/ai-chat/ai-prompt-types.d.ts +93 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.d.ts +9 -4
- package/components/ai-chat/index.js +2 -2
- package/components/ai-chat/session/ai-chat-session-controller.d.ts +51 -0
- package/components/ai-chat/session/ai-chat-session-types.d.ts +86 -0
- package/components/ai-chat/session/ai-chat-session.d.ts +81 -0
- package/components/ai-chat/session/index.d.ts +2 -0
- package/components/ai-chat/{ai-chat-streaming.d.ts → stream/ai-chat-streaming.d.ts} +6 -0
- package/components/ai-chat/stream/analyst-handler.d.ts +3 -0
- package/components/ai-chat/stream/dashboard-handler.d.ts +4 -0
- package/components/ai-chat/stream/index.d.ts +8 -0
- package/components/ai-chat/stream/item-handler.d.ts +2 -0
- package/components/ai-chat/stream/registry.d.ts +5 -0
- package/components/ai-chat/stream/shared.d.ts +10 -0
- package/components/ai-chat/stream/types.d.ts +26 -0
- package/components/ai-chat-CY73iYCg.cjs +154 -0
- package/components/ai-chat-DVU9XiA2.js +1788 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +1 -1
- package/components/{ai-interaction-textarea-BJHzUcBF.js → ai-interaction-textarea-DI98QoMZ.js} +3 -3
- package/components/{ai-interaction-textarea-Bd1AGBmB.cjs → ai-interaction-textarea-DqWt823F.cjs} +1 -1
- package/components/{base-BAzY-whv.js → base-D3ehdFno.js} +1 -1
- package/components/{base-CbpjVnVy.cjs → base-HUGXYn6t.cjs} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +1 -1
- package/components/{data-field-97uH3l6o.cjs → data-field-DSzU9Apl.cjs} +1 -1
- package/components/{data-field-tfAMLb-d.js → data-field-DwSYggPc.js} +3 -3
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +1 -1
- package/components/{data-field-level-BsDTHrJ6.js → data-field-level-BquNqRm1.js} +1 -1
- package/components/{data-field-level-6npuFtQo.cjs → data-field-level-CYUtLiIi.cjs} +1 -1
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +1 -1
- package/components/{data-field-panel-Dv5nfM0z.cjs → data-field-panel-B_83HNyI.cjs} +1 -1
- package/components/{data-field-panel-P2t8d6sG.js → data-field-panel-Bqslx0EB.js} +3 -3
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +1 -1
- package/components/{data-fields-select-B7vJTdZO.cjs → data-fields-select-BZj1cpL5.cjs} +1 -1
- package/components/{data-fields-select-DHnnYhbr.js → data-fields-select-t1ikPTLw.js} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +1 -1
- package/components/{dataset-selector-list-DbCmavOc.cjs → dataset-selector-list-Bta-CGoN.cjs} +1 -1
- package/components/{dataset-selector-list-CXnDkIe2.js → dataset-selector-list-Ho8JnQp7.js} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +1 -1
- package/components/{dataset-selector-row-HFt4sJN8.js → dataset-selector-row-8hgsmMRg.js} +4 -2
- package/components/{dataset-selector-row-D1U4ltKv.cjs → dataset-selector-row-CKhHK1H5.cjs} +2 -2
- package/components/{de-B8ds_DbE.cjs → de-CVLDoWlp.cjs} +1 -1
- package/components/{de-DMnvmNFg.js → de-D2bZwq4D.js} +6 -1
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/{display-settings-BLf7lBww.cjs → display-settings-Bmb0HUlu.cjs} +1 -1
- package/components/{display-settings-BLMrlvMS.js → display-settings-Di9dXtUM.js} +1 -1
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/{display-settings-binning-hCJ0qkt5.js → display-settings-binning-B8qUIt6T.js} +2 -2
- package/components/{display-settings-binning-BAg6FoqJ.cjs → display-settings-binning-CpwCqvwm.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/{display-settings-datetime-BzeNlKLC.cjs → display-settings-datetime-3M3DvzTN.cjs} +1 -1
- package/components/{display-settings-datetime-CCxok7d7.js → display-settings-datetime-C8JfjDJK.js} +2 -2
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/{display-settings-grand-totals-HDpr3IJ5.cjs → display-settings-grand-totals-DMDa6C5k.cjs} +1 -1
- package/components/{display-settings-grand-totals-C1N1cehl.js → display-settings-grand-totals-kyfMh55D.js} +2 -2
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +1 -1
- package/components/{display-settings-numeric-DSs20wUu.cjs → display-settings-numeric-B51KddXI.cjs} +1 -1
- package/components/{display-settings-numeric-oyCfBAGV.js → display-settings-numeric-Cw8Nx5s9.js} +2 -2
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +1 -1
- package/components/{display-settings-period-over-period-h8bA3V5C.js → display-settings-period-over-period-B2AN0rwz.js} +2 -2
- package/components/{display-settings-period-over-period-CcX7vQnt.cjs → display-settings-period-over-period-CjjA2NqZ.cjs} +1 -1
- package/components/{es-Cc258uTs.js → es-9-jszdOJ.js} +6 -1
- package/components/{es-DGC51Dm9.cjs → es-Byjf7YBI.cjs} +1 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/{filter-expression-picker-DQP5lkn4.js → filter-expression-picker-Brn-vNUd.js} +1 -1
- package/components/{filter-expression-picker-BMJkgHu9.cjs → filter-expression-picker-DCFZKpBE.cjs} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +1 -1
- package/components/{filter-item-BXcYNAAm.js → filter-item-BlSQe2nu.js} +4 -4
- package/components/{filter-item-D9m378Qo.cjs → filter-item-Cjrhb1RR.cjs} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/{filter-value-picker-YIkbsWDP.cjs → filter-value-picker-BCckBdal.cjs} +1 -1
- package/components/{filter-value-picker-B-dzcjEo.js → filter-value-picker-CBetCjIs.js} +4 -4
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +1 -1
- package/components/{filter-value-picker-datetime-BJMcnoKH.js → filter-value-picker-datetime-CT63jJDI.js} +1 -1
- package/components/{filter-value-picker-datetime-BrrmcjIE.cjs → filter-value-picker-datetime-CxM6HXe3.cjs} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +1 -1
- package/components/{filter-value-picker-hierarchy-B9gDxYna.cjs → filter-value-picker-hierarchy-C5QZXiQz.cjs} +1 -1
- package/components/{filter-value-picker-hierarchy-UdDq0CZG.js → filter-value-picker-hierarchy-CAORy2A-.js} +2 -2
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +1 -1
- package/components/{filter-value-picker-numeric-D_dgITCq.cjs → filter-value-picker-numeric-CtOfHaJR.cjs} +1 -1
- package/components/{filter-value-picker-numeric-EK515Z-Y.js → filter-value-picker-numeric-Fao-PKN7.js} +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/{filters-H2scDNLi.js → filters-CtWut3ce.js} +2 -2
- package/components/{filters-8ehwgopC.cjs → filters-DI0GTL9k.cjs} +1 -1
- package/components/{fr-BoZFY3Qe.cjs → fr-BVxPTfyF.cjs} +1 -1
- package/components/{fr-B32d4zcX.js → fr-DLf99-F8.js} +6 -1
- package/components/{get-dataset-name-CrWWViwN.cjs → get-dataset-name-CvZduuOo.cjs} +1 -1
- package/components/{get-dataset-name-7FdLQo10.js → get-dataset-name-EKmxKZU9.js} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +58 -58
- package/components/item-grid/helpers/grid-item-popover.d.ts +7 -1
- package/components/item-grid/helpers/grid-rendering.d.ts +7 -1
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +1 -1
- package/components/item-grid/item-grid.d.ts +8 -0
- package/components/{item-grid-CxblVEy3.cjs → item-grid-Bcez8lwg.cjs} +7 -7
- package/components/{item-grid-B-IFwriA.js → item-grid-DgxtJ0eX.js} +574 -564
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +1 -1
- package/components/{item-option-ChsD18x9.cjs → item-option-BgYyAKSW.cjs} +1 -1
- package/components/{item-option-Buxnv89s.js → item-option-DjiTHr0r.js} +1 -1
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +1 -1
- package/components/{item-option-action-button-group-Cw9EDbG-.cjs → item-option-action-button-group-DdqzgR08.cjs} +1 -1
- package/components/{item-option-action-button-group-QO_darH9.js → item-option-action-button-group-U5GCtFjg.js} +1 -1
- package/components/{item-option-base-DjQ5poaH.cjs → item-option-base-BeIdCZMp.cjs} +1 -1
- package/components/{item-option-base-DMmga0dv.js → item-option-base-DM3U9dbW.js} +1 -1
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +1 -1
- package/components/{item-option-color-palette-picker-CiE_aWRI.js → item-option-color-palette-picker-BsMZ3IUR.js} +1 -1
- package/components/{item-option-color-palette-picker-gZvk4ODA.cjs → item-option-color-palette-picker-oj8nSb-q.cjs} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/{item-option-color-picker-DCnGqBgT.cjs → item-option-color-picker-BJKGTrIi.cjs} +1 -1
- package/components/{item-option-color-picker-CUskqN3R.js → item-option-color-picker-B_pemZKJ.js} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/{item-option-color-range-B24EAbUi.cjs → item-option-color-range-BOegJZim.cjs} +1 -1
- package/components/{item-option-color-range-BgHXTDvx.js → item-option-color-range-DW3rdMt5.js} +1 -1
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +1 -1
- package/components/{item-option-multi-language-field-DDIu7Hns.cjs → item-option-multi-language-field-BQZ4Lmiy.cjs} +1 -1
- package/components/{item-option-multi-language-field-qngZBXHT.js → item-option-multi-language-field-CeYgkRzs.js} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +1 -1
- package/components/{item-option-number-field-Cd-cfpaq.js → item-option-number-field-CFQyJG_w.js} +1 -1
- package/components/{item-option-number-field-CqrO1Xu0.cjs → item-option-number-field-T2L2jFCf.cjs} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/{item-option-panel-B26_sDcj.cjs → item-option-panel-BOJmKPgY.cjs} +1 -1
- package/components/{item-option-panel-DZiOx_sn.js → item-option-panel-ChOItFmc.js} +2 -2
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +1 -1
- package/components/{item-option-picker-B86AqAWp.cjs → item-option-picker-3krQktmk.cjs} +1 -1
- package/components/{item-option-picker-LRahjZUz.js → item-option-picker-IBP7QFLA.js} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +1 -1
- package/components/{item-option-position-picker-Cbi2OygH.cjs → item-option-position-picker-BiLRWUWK.cjs} +1 -1
- package/components/{item-option-position-picker-NUpUlyPV.js → item-option-position-picker-DF54K_Mw.js} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +1 -1
- package/components/{item-option-positions-number-field-BbIkX6wM.cjs → item-option-positions-number-field-B6qxN1x7.cjs} +1 -1
- package/components/{item-option-positions-number-field-ClPil6MM.js → item-option-positions-number-field-Dchzu5NS.js} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +1 -1
- package/components/{item-option-radio-button-group-Bdd9sU4p.js → item-option-radio-button-group-BiOpqNXX.js} +1 -1
- package/components/{item-option-radio-button-group-BtYYhQyI.cjs → item-option-radio-button-group-DzI_2jB3.cjs} +1 -1
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/{item-option-slider-32oGS1fd.cjs → item-option-slider-6E4VgJpv.cjs} +1 -1
- package/components/{item-option-slider-BJ7gVQXP.js → item-option-slider-Dba7mmcA.js} +1 -1
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +1 -1
- package/components/{item-option-switch-BMVlfdx5.js → item-option-switch-BAYX5lTr.js} +1 -1
- package/components/{item-option-switch-BFk3biK9.cjs → item-option-switch-Dt4pzFNi.cjs} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +1 -1
- package/components/{item-option-text-field-CWvgQ3pJ.cjs → item-option-text-field-BLOz4LvH.cjs} +1 -1
- package/components/{item-option-text-field-BoXwVo-B.js → item-option-text-field-CHalqTt1.js} +1 -1
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +1 -1
- package/components/{item-slot-drop-CYRVCWF0.cjs → item-slot-drop-CNeF_Qmg.cjs} +1 -1
- package/components/{item-slot-drop-C0GmOMQY.js → item-slot-drop-n6UHgA-Q.js} +4 -4
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +1 -1
- package/components/{item-slot-drop-panel-CoRFds3a.cjs → item-slot-drop-panel-Bh6PlCJx.cjs} +1 -1
- package/components/{item-slot-drop-panel-Ci3Soo16.js → item-slot-drop-panel-Hhp9_pDd.js} +3 -3
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +1 -1
- package/components/{item-slot-picker-CmnJSYIF.cjs → item-slot-picker-7oF3vLwb.cjs} +1 -1
- package/components/{item-slot-picker-D1_NbL1A.js → item-slot-picker-BAMVwHtd.js} +5 -5
- 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-B8VvKhRF.js → item-slot-picker-panel-BYCDx6Hk.js} +3 -3
- package/components/{item-slot-picker-panel-DzKodYTM.cjs → item-slot-picker-panel-C6mMlurQ.cjs} +1 -1
- package/components/{localized-mixin-DZuGq2Fm.js → localized-mixin-CpYxJczB.js} +1 -1
- package/components/{localized-mixin-Dujo7nlJ.cjs → localized-mixin-CxGNXOcg.cjs} +1 -1
- package/components/{nl-C9Ad2LdA.cjs → nl-D4uOyZ6h.cjs} +1 -1
- package/components/{nl-hCQgb1fB.js → nl-QLEhlKsI.js} +6 -1
- package/components/{set-locale-CXnxhP_B.js → set-locale-wsrhUZVV.js} +4 -4
- package/components/{set-locale-MCuEsOOu.cjs → set-locale-xSK2Wd4D.cjs} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +1 -1
- package/components/{slot-menu-CYNYwJnU.js → slot-menu-B431N66z.js} +3 -3
- package/components/{slot-menu-CDAAPyFj.cjs → slot-menu-CIQRPLvx.cjs} +1 -1
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +1 -1
- package/components/{slot-menu-list-DbWiuJDF.cjs → slot-menu-list-BROocU0s.cjs} +1 -1
- package/components/{slot-menu-list-DL-x5Ggl.js → slot-menu-list-Cdh09ie0.js} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-BACUV6sE.js → utils-CJ3Vy98n.js} +1 -1
- package/components/{utils-DKSE_5u1.cjs → utils-iY1cKQaF.cjs} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +1 -1
- package/components/{viz-item-menu-DXoKwAhV.js → viz-item-menu--FyB_XCf.js} +1 -1
- package/components/{viz-item-menu-yr7TQY8-.cjs → viz-item-menu-D20StIE_.cjs} +1 -1
- package/custom-elements.json +1460 -157
- package/package.json +2 -2
- package/react/components/ai-chat/stream/index.ts +1 -0
- package/react/components/ai-chat/stream/types.ts +29 -0
- package/react/components/ai-chat.component.ts +12 -12
- package/react/esm/components/ai-chat/stream/index.d.ts +1 -0
- package/react/esm/components/ai-chat/stream/index.js +1 -0
- package/react/esm/components/ai-chat/stream/types.d.ts +26 -0
- package/react/esm/components/ai-chat/stream/types.js +1 -0
- package/react/esm/components/ai-chat.component.d.ts +8 -8
- package/react/esm/components/ai-chat.component.js +8 -8
- package/types/ai-chat.types.d.ts +1 -1
- package/components/ai-chat/request-contract.d.ts +0 -56
- package/components/ai-chat-D2L9_kci.js +0 -1258
- package/components/ai-chat-O_MP_k1b.cjs +0 -151
|
@@ -18,56 +18,56 @@
|
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
20
|
import { t as e } from "./decorate-DKLaHs_w.js";
|
|
21
|
-
import { t } from "./localized-mixin-
|
|
21
|
+
import { t } from "./localized-mixin-CpYxJczB.js";
|
|
22
22
|
import { t as n } from "./color-DAdZX4rn.js";
|
|
23
23
|
import { n as r, t as i } from "./themes-CzAQg_23.js";
|
|
24
24
|
import { itemTypes as a } from "./item-list.js";
|
|
25
25
|
import { luzmoArrows as o, luzmoCircle as s, luzmoClone as c, luzmoCog as l, luzmoFilterOutline as u, luzmoLockOutline as d, luzmoPencil as f, luzmoTable as p, luzmoTrashOutline as m } from "@luzmo/icons";
|
|
26
|
-
import { LitElement as h, css as g, html as _,
|
|
27
|
-
import { property as
|
|
28
|
-
import { localized as
|
|
26
|
+
import { LitElement as h, css as g, html as _, nothing as v, render as y, unsafeCSS as b } from "lit";
|
|
27
|
+
import { property as x, query as ee, queryAll as te, state as S } from "lit/decorators.js";
|
|
28
|
+
import { localized as ne, msg as C } from "@lit/localize";
|
|
29
29
|
import "@luzmo/lucero/icon";
|
|
30
30
|
import "@luzmo/lucero/tooltip";
|
|
31
|
-
import { repeat as
|
|
31
|
+
import { repeat as re } from "lit/directives/repeat.js";
|
|
32
32
|
import "@luzmo/lucero/action-button";
|
|
33
33
|
import "@luzmo/lucero/action-group";
|
|
34
|
-
import { guard as
|
|
35
|
-
import { LuzmoElement as
|
|
36
|
-
import { styleMap as
|
|
34
|
+
import { guard as ie } from "lit/directives/guard.js";
|
|
35
|
+
import { LuzmoElement as ae } from "@luzmo/lucero/utils";
|
|
36
|
+
import { styleMap as oe } from "lit/directives/style-map.js";
|
|
37
37
|
//#region node_modules/uuid/dist/stringify.js
|
|
38
38
|
var w = [];
|
|
39
39
|
for (let e = 0; e < 256; ++e) w.push((e + 256).toString(16).slice(1));
|
|
40
|
-
function
|
|
40
|
+
function se(e, t = 0) {
|
|
41
41
|
return (w[e[t + 0]] + w[e[t + 1]] + w[e[t + 2]] + w[e[t + 3]] + "-" + w[e[t + 4]] + w[e[t + 5]] + "-" + w[e[t + 6]] + w[e[t + 7]] + "-" + w[e[t + 8]] + w[e[t + 9]] + "-" + w[e[t + 10]] + w[e[t + 11]] + w[e[t + 12]] + w[e[t + 13]] + w[e[t + 14]] + w[e[t + 15]]).toLowerCase();
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region node_modules/uuid/dist/rng.js
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return crypto.getRandomValues(
|
|
45
|
+
var ce = new Uint8Array(16);
|
|
46
|
+
function le() {
|
|
47
|
+
return crypto.getRandomValues(ce);
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region node_modules/uuid/dist/v4.js
|
|
51
|
-
function le(e, t, n) {
|
|
52
|
-
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : ue(e, t, n);
|
|
53
|
-
}
|
|
54
51
|
function ue(e, t, n) {
|
|
52
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : de(e, t, n);
|
|
53
|
+
}
|
|
54
|
+
function de(e, t, n) {
|
|
55
55
|
e ||= {};
|
|
56
|
-
let r = e.random ?? e.rng?.() ??
|
|
56
|
+
let r = e.random ?? e.rng?.() ?? le();
|
|
57
57
|
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
58
58
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
59
59
|
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
60
60
|
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
61
61
|
return t;
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return se(r);
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region node_modules/@luzmo/shared-embed/src/lib/helpers/error.js
|
|
67
|
-
var
|
|
67
|
+
var fe = (e, t) => {
|
|
68
68
|
let n = "The dashboard component encountered an error";
|
|
69
69
|
typeof t?.dashboardId == "string" && (n += ` for dashboard with id ${t.dashboardId}`), typeof t?.dashboardSlug == "string" && (n += ` for dashboard with slug ${t.dashboardSlug}`), typeof t?.container == "string" && (n += ` in container ${t.container}`), e && (n += `:\n${e}`, console.warn(n));
|
|
70
|
-
},
|
|
70
|
+
}, pe = (e) => {
|
|
71
71
|
let t = !1, n = "", r = (document.body || document.documentElement).style, i = {
|
|
72
72
|
svg: !!("createElementNS" in document && document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect),
|
|
73
73
|
flexbox: r.webkitFlexWrap === "" || r.flexWrap === "",
|
|
@@ -79,7 +79,7 @@ var de = (e, t) => {
|
|
|
79
79
|
"postMessage"
|
|
80
80
|
]) i[r] || (t = !0, e.browserNotSupported = e.browserNotSupported || [], e.browserNotSupported.push(r), n += `Your browser does not support: ${r}\n`);
|
|
81
81
|
let a = window.navigator.userAgent, o = a.includes("MSIE"), s = a.includes("Trident/");
|
|
82
|
-
(o || s) && (t = !0, n = "IE is not supported."), t &&
|
|
82
|
+
(o || s) && (t = !0, n = "IE is not supported."), t && fe(n);
|
|
83
83
|
}, T = {
|
|
84
84
|
appServer: "https://app.luzmo.com/",
|
|
85
85
|
apiHost: "https://api.luzmo.com/",
|
|
@@ -108,7 +108,7 @@ var de = (e, t) => {
|
|
|
108
108
|
loaderSpinnerBackground: "rgba(169, 169, 169, 0.14)",
|
|
109
109
|
timezoneId: null,
|
|
110
110
|
contextId: null
|
|
111
|
-
},
|
|
111
|
+
}, me = [
|
|
112
112
|
{
|
|
113
113
|
mode: "mobile",
|
|
114
114
|
width: [150, 767]
|
|
@@ -129,7 +129,7 @@ var de = (e, t) => {
|
|
|
129
129
|
mode: "fixed",
|
|
130
130
|
width: []
|
|
131
131
|
}
|
|
132
|
-
],
|
|
132
|
+
], he = {
|
|
133
133
|
initializing: {
|
|
134
134
|
en: "Initializing...",
|
|
135
135
|
nl: "Laden...",
|
|
@@ -151,7 +151,7 @@ var de = (e, t) => {
|
|
|
151
151
|
de: "Hoppla, wir konnten dieses Diagramm nicht laden!",
|
|
152
152
|
es: "¡Ups! No pudimos cargar este elemento."
|
|
153
153
|
}
|
|
154
|
-
},
|
|
154
|
+
}, ge = (e) => e ? e.endsWith("/") ? e : `${e}/` : "", _e = (e) => e ? e.endsWith("/") ? e.slice(0, -1) : e : "", ve = (e, t, n, r) => {
|
|
155
155
|
let i = (e, t) => {
|
|
156
156
|
let n = e.users.find((e) => e.id === t.id), r = n && n.userAccessRight ? {
|
|
157
157
|
flagRead: n.userAccessRight.flagRead,
|
|
@@ -209,7 +209,7 @@ var de = (e, t) => {
|
|
|
209
209
|
], o.push(e);
|
|
210
210
|
}
|
|
211
211
|
return o;
|
|
212
|
-
},
|
|
212
|
+
}, ye = (e) => {
|
|
213
213
|
let t = /^(%20|\s)*(javascript|data)/im, n = /[^\u0020-\u007E]/gim, r = /^([^:]+):/gm, i = new Set([".", "/"]), a = (e) => i.has(e[0]);
|
|
214
214
|
if (!e) return "about:blank";
|
|
215
215
|
let o = e.replaceAll(n, "").trim();
|
|
@@ -218,20 +218,20 @@ var de = (e, t) => {
|
|
|
218
218
|
if (!s) return o;
|
|
219
219
|
let c = s[0];
|
|
220
220
|
return t.test(c) ? "about:blank" : o;
|
|
221
|
-
},
|
|
222
|
-
t in e ? e[t] === void 0 ? e[t] = n : e[t] =
|
|
223
|
-
}), e),
|
|
221
|
+
}, be = (e) => JSON.parse(JSON.stringify(e)), xe = (e) => e && typeof e == "object", Se = (e, t) => (Object.entries(t).forEach(([t, n]) => {
|
|
222
|
+
t in e ? e[t] === void 0 ? e[t] = n : e[t] = xe(n) ? Se(e[t], n) : e[t] : e[t] = n;
|
|
223
|
+
}), e), Ce = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g, function(e) {
|
|
224
224
|
let t = Math.random() * 16 | 0;
|
|
225
225
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
226
|
-
}),
|
|
226
|
+
}), we = (e) => {
|
|
227
227
|
let t = [], { appServer: n, language: r, editorLanguage: i, qeVersion: a, loaderBackground: o, loaderSpinnerColor: s, loaderSpinnerBackground: c, loaderFontColor: l, screenMode: u, key: d, token: f, timezoneId: p, itemEmbedding: m, itemDimensions: h, dashboardId: g, dashboardSlug: _, itemId: v, theme: y, mainColor: b, accentColor: x, editMode: ee } = e.params;
|
|
228
228
|
r && r !== "auto" && t.push(`language=${r}`), i && i !== "auto" && t.push(`editorLanguage=${i}`), a && t.push(`qe_version=${a}`), o && t.push(`ldrbg=${o}`), l && t.push(`ldrftclr=${l}`), s && t.push(`ldrspclr=${s}`), c && t.push(`ldrspbg=${c}`), y && t.push(`theme=${y}`), b && t.push(`mainColor=${b}`), x && t.push(`accentColor=${x}`), u && u !== "auto" && t.push("screenMode=&{screenMode}"), p && t.push("timezoneId=" + p), m && h && h.width && t.push("width=" + h.width), m && h && h.height && t.push("height=" + h.height), ee && t.push("editMode=" + ee);
|
|
229
|
-
let
|
|
230
|
-
return t.push("version=" + (e.libVersion || "0.0.0-unknown-luzmo")),
|
|
231
|
-
},
|
|
229
|
+
let te = d && f ? "#" + d + ":" + f : "";
|
|
230
|
+
return t.push("version=" + (e.libVersion || "0.0.0-unknown-luzmo")), ye(m ? `${n}i/${g || _}/${v}?${encodeURIComponent(t.join("&"))}${te}` : `${n}i/${g || _}?${encodeURIComponent(t.join("&"))}${te}`);
|
|
231
|
+
}, Te = (e) => {
|
|
232
232
|
let t;
|
|
233
233
|
(e.params.error || e.browserNotSupported.length > 0) && (e.params.error = !0, e.browserNotSupported && (t = "Browser is not supported."));
|
|
234
|
-
let n =
|
|
234
|
+
let n = he.initializing[e.params.language] || he.initializing.en;
|
|
235
235
|
return e.browserNotSupported || e.params.error ? {
|
|
236
236
|
loadingMsg: n,
|
|
237
237
|
errorMsg: t
|
|
@@ -242,26 +242,26 @@ var de = (e, t) => {
|
|
|
242
242
|
};
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region node_modules/@luzmo/shared-embed/src/lib/helpers/promise-dispatch.js
|
|
245
|
-
function
|
|
245
|
+
function Ee(e, t, n) {
|
|
246
246
|
e.promises[t] && (e.promises[t].resolve(n), delete e.promises[t]);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function De(e, t, n) {
|
|
249
249
|
e.promises[t] && (e.promises[t].reject(n), delete e.promises[t]);
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region node_modules/@luzmo/shared-embed/src/lib/helpers/styles.js
|
|
253
|
-
function
|
|
253
|
+
function Oe(e) {
|
|
254
254
|
let t = {};
|
|
255
255
|
return e.params.loaderBackground && !e.iframeLoaded && (t.background = e.params.loaderBackground), t;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function ke(e) {
|
|
258
258
|
let t = e.params.itemDimensions?.height || T.itemDimensions.height, n = e.params.itemEmbedding && t !== "auto";
|
|
259
259
|
return {
|
|
260
260
|
display: e.iframeLoaded ? "none" : "",
|
|
261
261
|
height: `${n ? t : e.minHeight}px`
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Ae(e) {
|
|
265
265
|
let t = e.params.loaderBackground || T.loaderBackground;
|
|
266
266
|
if (e.params.itemEmbedding) {
|
|
267
267
|
e.loaderSize = 24, e.borderWidth = 4, e.minHeight = 200;
|
|
@@ -275,8 +275,8 @@ function ke(e) {
|
|
|
275
275
|
}
|
|
276
276
|
return { background: t };
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
let { loaderSpinnerColor: t, loaderSpinnerBackground: n } = T, r =
|
|
278
|
+
function je(e) {
|
|
279
|
+
let { loaderSpinnerColor: t, loaderSpinnerBackground: n } = T, r = Pe(e.borderWidth, e.params.loaderSpinnerColor || t), i = Pe(e.borderWidth, e.params.loaderSpinnerBackground || n), a = `${e.loaderSize}px`;
|
|
280
280
|
return {
|
|
281
281
|
"border-top": r,
|
|
282
282
|
"border-right": r,
|
|
@@ -286,11 +286,11 @@ function Ae(e) {
|
|
|
286
286
|
height: a
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Me(e) {
|
|
290
290
|
let t = e.params.itemDimensions?.height || T.itemDimensions.height, n = e.params.itemEmbedding && t !== "auto";
|
|
291
291
|
return { padding: `${e.params.itemId ? ((t) => `${(t - e.loaderSize - 32) / 2}px`)(n ? Number.parseInt(`${t}`, 10) : e.minHeight) : "128px"} 16px` };
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Ne(e) {
|
|
294
294
|
let t = e.params.itemDimensions?.height || T.itemDimensions.height, n = e.params.itemDimensions?.width || T.itemDimensions.width;
|
|
295
295
|
e.params.itemEmbedding && t !== "auto" ? e.iframeHeight = `${t}px` : e.params.itemEmbedding ? e.iframeHeight = "200px" : ["editFull", "editLimited"].includes(e.params.editMode) ? e.iframeHeight = "100%" : e.iframeHeight = "400px", e.iframeWidth = e.params.itemEmbedding && n !== "auto" ? `${n}px` : "100%";
|
|
296
296
|
let r = {
|
|
@@ -299,15 +299,15 @@ function Me(e) {
|
|
|
299
299
|
};
|
|
300
300
|
return e.iframeLoaded ? r.opacity = 1 : e.error ? (r.opacity = 1, r.width = "100%", r.height = "400px") : r.opacity = 0, r;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Pe(e, t) {
|
|
303
303
|
return `${e}px solid ${t}`;
|
|
304
304
|
}
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region node_modules/@luzmo/shared-embed/src/lib/helpers/update-iframe-url.js
|
|
307
|
-
var
|
|
307
|
+
var Fe = (e, t) => {
|
|
308
308
|
e?.contentWindow && e.contentWindow.location.replace(t);
|
|
309
|
-
},
|
|
310
|
-
let r =
|
|
309
|
+
}, Ie = (e, t, n) => {
|
|
310
|
+
let r = Ce();
|
|
311
311
|
return t?.contentWindow ? (t.contentWindow.postMessage({
|
|
312
312
|
action: "exportDashboard",
|
|
313
313
|
format: n || "png",
|
|
@@ -321,12 +321,12 @@ var Pe = (e, t) => {
|
|
|
321
321
|
e.promises[r] && (e.promises[r].reject(/* @__PURE__ */ Error("exportDashboard request timed out.")), delete e.promises[r]);
|
|
322
322
|
}, 12e5);
|
|
323
323
|
})) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow."));
|
|
324
|
-
},
|
|
324
|
+
}, Le = async (e) => {
|
|
325
325
|
if (await e.updateComplete, (e.currentAuthKey ?? e.authKey) && (e.currentAuthToken ?? e.authToken)) {
|
|
326
326
|
let t = new Promise((t, n) => {
|
|
327
327
|
(() => {
|
|
328
328
|
try {
|
|
329
|
-
window.fetch(`${
|
|
329
|
+
window.fetch(`${ge(e.params.apiHost)}0.1.0/authorization`, {
|
|
330
330
|
method: "POST",
|
|
331
331
|
mode: "cors",
|
|
332
332
|
cache: "no-cache",
|
|
@@ -365,7 +365,7 @@ var Pe = (e, t) => {
|
|
|
365
365
|
return new Promise((n, r) => void (() => {
|
|
366
366
|
try {
|
|
367
367
|
t.then((t) => {
|
|
368
|
-
window.fetch(`${
|
|
368
|
+
window.fetch(`${ge(e.params.apiHost)}0.1.0/securable`, {
|
|
369
369
|
method: "POST",
|
|
370
370
|
mode: "cors",
|
|
371
371
|
cache: "no-cache",
|
|
@@ -412,7 +412,7 @@ var Pe = (e, t) => {
|
|
|
412
412
|
}
|
|
413
413
|
})
|
|
414
414
|
}).then((e) => e.json()).then((r) => {
|
|
415
|
-
n(r.rows.length > 0 ?
|
|
415
|
+
n(r.rows.length > 0 ? ve(r.rows, t.integrationId, t.user, e) : []);
|
|
416
416
|
});
|
|
417
417
|
}).catch((e) => {
|
|
418
418
|
r(e);
|
|
@@ -423,9 +423,9 @@ var Pe = (e, t) => {
|
|
|
423
423
|
})());
|
|
424
424
|
}
|
|
425
425
|
throw Error("No authKey or authToken found in the luzmo-dashboard component.");
|
|
426
|
-
},
|
|
426
|
+
}, Re = (e, t, n) => {
|
|
427
427
|
if (t?.contentWindow) {
|
|
428
|
-
let r =
|
|
428
|
+
let r = Ce();
|
|
429
429
|
return t.contentWindow.postMessage({
|
|
430
430
|
action: "getData",
|
|
431
431
|
id: n,
|
|
@@ -441,9 +441,9 @@ var Pe = (e, t) => {
|
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
return Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow."));
|
|
444
|
-
},
|
|
444
|
+
}, ze = (e, t) => {
|
|
445
445
|
if (t?.contentWindow) {
|
|
446
|
-
let n =
|
|
446
|
+
let n = Ce();
|
|
447
447
|
return t.contentWindow.postMessage({
|
|
448
448
|
action: "getFilters",
|
|
449
449
|
_version: e.libVersion,
|
|
@@ -458,27 +458,27 @@ var Pe = (e, t) => {
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
return Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow."));
|
|
461
|
-
},
|
|
461
|
+
}, Be = (e, t, n) => t ? (t.contentWindow.postMessage({
|
|
462
462
|
action: "refreshData",
|
|
463
463
|
id: n ?? null,
|
|
464
464
|
_version: e.libVersion
|
|
465
|
-
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")),
|
|
465
|
+
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")), Ve = (e, t) => t ? (t.contentWindow.postMessage({
|
|
466
466
|
action: "reloadDashboard",
|
|
467
467
|
_version: e.libVersion
|
|
468
|
-
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")),
|
|
468
|
+
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")), He = (e, t, n, r, i) => t ? (t.contentWindow.postMessage({
|
|
469
469
|
action: "sendExportEmail",
|
|
470
470
|
type: n || "once",
|
|
471
471
|
subject: r,
|
|
472
472
|
message: i,
|
|
473
473
|
_version: e.libVersion
|
|
474
|
-
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")),
|
|
474
|
+
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")), Ue = (e, t, n, r) => t ? (t.contentWindow.postMessage({
|
|
475
475
|
action: "setAuthorization",
|
|
476
476
|
key: n,
|
|
477
477
|
token: r,
|
|
478
478
|
_version: e.libVersion
|
|
479
|
-
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")),
|
|
479
|
+
}, "*"), Promise.resolve()) : Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow.")), We = (e, t, n) => {
|
|
480
480
|
if (t && t.contentWindow) {
|
|
481
|
-
let r =
|
|
481
|
+
let r = Ce();
|
|
482
482
|
return e.params.editMode === n ? Promise.reject(/* @__PURE__ */ Error("editMode parameter is currently already set to " + n)) : n !== "editFull" && n !== "editLimited" && n !== "view" ? Promise.reject(/* @__PURE__ */ Error("The editMode parameter must be one of the following values: 'editFull', 'editLimited' or 'view'.")) : (t.contentWindow.postMessage({
|
|
483
483
|
action: "setEditMode",
|
|
484
484
|
editMode: n,
|
|
@@ -492,9 +492,9 @@ var Pe = (e, t) => {
|
|
|
492
492
|
}));
|
|
493
493
|
}
|
|
494
494
|
return Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow."));
|
|
495
|
-
},
|
|
495
|
+
}, Ge = (e, t, n) => {
|
|
496
496
|
if (t) {
|
|
497
|
-
let r =
|
|
497
|
+
let r = Ce();
|
|
498
498
|
return t.contentWindow.postMessage({
|
|
499
499
|
action: "setPreview",
|
|
500
500
|
preview: n,
|
|
@@ -510,9 +510,9 @@ var Pe = (e, t) => {
|
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
512
|
return Promise.reject(/* @__PURE__ */ Error("Cannot retrieve contentWindow."));
|
|
513
|
-
},
|
|
513
|
+
}, Ke = (e, t, n, r) => {
|
|
514
514
|
if (t) {
|
|
515
|
-
let i =
|
|
515
|
+
let i = Ce();
|
|
516
516
|
return t.contentWindow.postMessage({
|
|
517
517
|
action: "setSelectedData",
|
|
518
518
|
itemId: n,
|
|
@@ -529,9 +529,9 @@ var Pe = (e, t) => {
|
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
return Promise.reject();
|
|
532
|
-
},
|
|
532
|
+
}, qe = (e) => {
|
|
533
533
|
if (!e.dimensions) {
|
|
534
|
-
e.params.error = !0,
|
|
534
|
+
e.params.error = !0, fe("Got no valid dimensions.", e.params);
|
|
535
535
|
return;
|
|
536
536
|
}
|
|
537
537
|
let t = Object.keys(e.dimensions), n = [], r, i = 0, a = 0;
|
|
@@ -544,14 +544,14 @@ var Pe = (e, t) => {
|
|
|
544
544
|
"largeScreen"
|
|
545
545
|
];
|
|
546
546
|
if (e.params.itemEmbedding) {
|
|
547
|
-
let [n] = t, r =
|
|
547
|
+
let [n] = t, r = be(n);
|
|
548
548
|
for (let n of o) {
|
|
549
549
|
let i = t.find((e) => e === n);
|
|
550
|
-
i ? r =
|
|
550
|
+
i ? r = be(i) : e.dimensions[n] = e.dimensions[r];
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
for (let r of t) if (o.includes(r)) {
|
|
554
|
-
let t =
|
|
554
|
+
let t = me.find((e) => e.mode === r);
|
|
555
555
|
n.push({
|
|
556
556
|
...t,
|
|
557
557
|
height: e.dimensions[r][1] || 50
|
|
@@ -579,7 +579,7 @@ var Pe = (e, t) => {
|
|
|
579
579
|
opacity: 1
|
|
580
580
|
};
|
|
581
581
|
["editFull", "editLimited"].includes(e.params.editMode) ? (o.height = "100%", o.width = "100%") : e.params.itemEmbedding && e.params.itemDimensions ? (o.height = e.params.itemDimensions.height === "auto" ? o.height : `${String(e.params.itemDimensions.height).replace("px", "")}px`, o.width = e.params.itemDimensions.width === "auto" ? o.width : `${String(e.params.itemDimensions.width).replace("px", "")}px`) : (o.height = a === 0 ? "100%" : `${String(a)}px`, o.width = i === 0 ? "100%" : `${String(i)}px`), e.currentScreenMode = r, e.iframeStyle = o;
|
|
582
|
-
},
|
|
582
|
+
}, Je = (e) => {
|
|
583
583
|
let t = Object.keys(T), n = [], r = [
|
|
584
584
|
"appServer",
|
|
585
585
|
"language",
|
|
@@ -604,7 +604,7 @@ var Pe = (e, t) => {
|
|
|
604
604
|
"auto"
|
|
605
605
|
];
|
|
606
606
|
for (let n of t) e.params[n] === null && delete e.params[n];
|
|
607
|
-
e.params =
|
|
607
|
+
e.params = Se(e.params, T), (!e.params.dashboardId || typeof e.params.dashboardId != "string") && (!e.params.dashboardSlug || typeof e.params.dashboardSlug != "string") && (delete e.params.dashboardId, delete e.params.dashboardSlug);
|
|
608
608
|
for (let t of r) typeof e.params[t] != "string" && (delete e.params[t], n.push(`${t} needs to be of type string.`));
|
|
609
609
|
for (let t of i) typeof e.params[t] != "string" && e.params[t] !== null && e.params[t] !== void 0 && (delete e.params[t], n.push(`${t} needs to be of type string or empty.`));
|
|
610
610
|
if (e.params.screenMode && !o.includes(e.params.screenMode)) {
|
|
@@ -614,8 +614,8 @@ var Pe = (e, t) => {
|
|
|
614
614
|
e.params.itemId && (e.params.itemEmbedding = !0);
|
|
615
615
|
for (let t of a) typeof e.params[t] != "object" && e.params[t] !== null && (delete e.params[t], n.push(`${t} needs to be of type object or empty.`));
|
|
616
616
|
if (typeof e.params.switchScreenModeOnResize != "boolean" && (n.push("switchScreenModeOnResize needs to be of type boolean."), e.params.switchScreenModeOnResize = !0), e.params.itemDimensions) for (let t of ["width", "height"]) !["string", "number"].includes(typeof e.params.itemDimensions[t]) && e.params.itemDimensions[t] !== null && n.push(`itemDimensions ${t} needs to be of type string, number or empty.`);
|
|
617
|
-
e.params =
|
|
618
|
-
},
|
|
617
|
+
e.params = Se(e.params, T), e.params.screenMode && e.params.screenMode !== "auto" && (e.params.switchScreenModeOnResize = !1), e.params.itemDimensions.width !== "auto" && (e.params.itemDimensions.width = Number.parseInt(`${e.params.itemDimensions.width}`.replace("px", ""), 10) || "auto"), e.params.itemDimensions.height !== "auto" && (e.params.itemDimensions.height = Number.parseInt(`${e.params.itemDimensions.height}`.replace("px", ""), 10) || "auto"), e.params.itemEmbedding = !!e.params.itemId, (e.params.error || n.length > 0) && fe(n.join("\n"), e.params);
|
|
618
|
+
}, Ye = {
|
|
619
619
|
type: "type",
|
|
620
620
|
slots: "slots",
|
|
621
621
|
options: "options",
|
|
@@ -630,16 +630,16 @@ var Pe = (e, t) => {
|
|
|
630
630
|
itemId: "item-id",
|
|
631
631
|
dashboardContentsVersion: "dashboard-contents-version",
|
|
632
632
|
libVersion: "lib-version"
|
|
633
|
-
},
|
|
633
|
+
}, Xe = "luzmo-embed-container", Ze = "FEDERATION_DEBUG", E = {
|
|
634
634
|
AT: "@",
|
|
635
635
|
HYPHEN: "-",
|
|
636
636
|
SLASH: "/"
|
|
637
637
|
}, Qe = {
|
|
638
|
-
[
|
|
639
|
-
[
|
|
640
|
-
[
|
|
638
|
+
[E.AT]: "scope_",
|
|
639
|
+
[E.HYPHEN]: "_",
|
|
640
|
+
[E.SLASH]: "__"
|
|
641
641
|
};
|
|
642
|
-
Qe[
|
|
642
|
+
Qe[E.AT], E.AT, Qe[E.HYPHEN], E.HYPHEN, Qe[E.SLASH], E.SLASH;
|
|
643
643
|
var $e = /* @__PURE__ */ function(e) {
|
|
644
644
|
return e[e.UNKNOWN = 1] = "UNKNOWN", e[e.CALCULATED = 2] = "CALCULATED", e[e.NO_USE = 0] = "NO_USE", e;
|
|
645
645
|
}({}), et = typeof ENV_TARGET < "u" ? ENV_TARGET === "web" : typeof window < "u" && window.document !== void 0;
|
|
@@ -651,7 +651,7 @@ function nt() {
|
|
|
651
651
|
}
|
|
652
652
|
function rt() {
|
|
653
653
|
try {
|
|
654
|
-
if (tt() && window.localStorage) return !!localStorage.getItem(
|
|
654
|
+
if (tt() && window.localStorage) return !!localStorage.getItem(Ze);
|
|
655
655
|
} catch {
|
|
656
656
|
return !1;
|
|
657
657
|
}
|
|
@@ -1081,10 +1081,10 @@ function It(e, t, n, r, i, a) {
|
|
|
1081
1081
|
//#endregion
|
|
1082
1082
|
//#region node_modules/@module-federation/runtime-core/dist/utils/logger.js
|
|
1083
1083
|
var Lt = "[ Federation Runtime ]", Rt = yt(Lt);
|
|
1084
|
-
function E(e, t, n, r, i) {
|
|
1085
|
-
e || (n === void 0 ? D(t) : D(t, n, r, void 0, i));
|
|
1086
|
-
}
|
|
1087
1084
|
function D(e, t, n, r, i) {
|
|
1085
|
+
e || (n === void 0 ? O(t) : O(t, n, r, void 0, i));
|
|
1086
|
+
}
|
|
1087
|
+
function O(e, t, n, r, i) {
|
|
1088
1088
|
if (t !== void 0) return It(e, t, n ?? {}, (e) => {
|
|
1089
1089
|
throw Error(`${Lt}: ${e}`);
|
|
1090
1090
|
}, r, i);
|
|
@@ -1137,13 +1137,13 @@ function Jt(e) {
|
|
|
1137
1137
|
var Yt = (e, t) => {
|
|
1138
1138
|
let n;
|
|
1139
1139
|
return n = e.endsWith("/") ? e.slice(0, -1) : e, t.startsWith(".") && (t = t.slice(1)), n += t, n;
|
|
1140
|
-
},
|
|
1140
|
+
}, k = typeof globalThis == "object" ? globalThis : window, A = (() => {
|
|
1141
1141
|
try {
|
|
1142
1142
|
return document.defaultView;
|
|
1143
1143
|
} catch {
|
|
1144
|
-
return
|
|
1144
|
+
return k;
|
|
1145
1145
|
}
|
|
1146
|
-
})(), Xt =
|
|
1146
|
+
})(), Xt = A;
|
|
1147
1147
|
function Zt(e, t, n) {
|
|
1148
1148
|
Object.defineProperty(e, t, {
|
|
1149
1149
|
value: n,
|
|
@@ -1154,8 +1154,8 @@ function Zt(e, t, n) {
|
|
|
1154
1154
|
function Qt(e, t) {
|
|
1155
1155
|
return Object.hasOwnProperty.call(e, t);
|
|
1156
1156
|
}
|
|
1157
|
-
Qt(
|
|
1158
|
-
var $t =
|
|
1157
|
+
Qt(k, "__GLOBAL_LOADING_REMOTE_ENTRY__") || Zt(k, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
|
|
1158
|
+
var $t = k.__GLOBAL_LOADING_REMOTE_ENTRY__;
|
|
1159
1159
|
function en(e) {
|
|
1160
1160
|
Qt(e, "__VMOK__") && !Qt(e, "__FEDERATION__") && Zt(e, "__FEDERATION__", e.__VMOK__), Qt(e, "__FEDERATION__") || (Zt(e, "__FEDERATION__", {
|
|
1161
1161
|
__GLOBAL_PLUGIN__: [],
|
|
@@ -1166,15 +1166,15 @@ function en(e) {
|
|
|
1166
1166
|
__PRELOADED_MAP__: /* @__PURE__ */ new Map()
|
|
1167
1167
|
}), Zt(e, "__VMOK__", e.__FEDERATION__)), e.__FEDERATION__.__GLOBAL_PLUGIN__ ??= [], e.__FEDERATION__.__INSTANCES__ ??= [], e.__FEDERATION__.moduleInfo ??= {}, e.__FEDERATION__.__SHARE__ ??= {}, e.__FEDERATION__.__MANIFEST_LOADING__ ??= {}, e.__FEDERATION__.__PRELOADED_MAP__ ??= /* @__PURE__ */ new Map();
|
|
1168
1168
|
}
|
|
1169
|
-
en(
|
|
1169
|
+
en(k), en(A);
|
|
1170
1170
|
function tn(e) {
|
|
1171
|
-
|
|
1171
|
+
k.__FEDERATION__.__INSTANCES__.push(e);
|
|
1172
1172
|
}
|
|
1173
1173
|
function nn() {
|
|
1174
|
-
return
|
|
1174
|
+
return k.__FEDERATION__.__DEBUG_CONSTRUCTOR__;
|
|
1175
1175
|
}
|
|
1176
1176
|
function rn(e, t = it()) {
|
|
1177
|
-
t && (
|
|
1177
|
+
t && (k.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, k.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.3.3");
|
|
1178
1178
|
}
|
|
1179
1179
|
function an(e, t) {
|
|
1180
1180
|
if (typeof t == "string") {
|
|
@@ -1196,44 +1196,44 @@ function an(e, t) {
|
|
|
1196
1196
|
key: t
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
} else
|
|
1199
|
+
} else O(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
|
|
1200
1200
|
}
|
|
1201
|
-
var on = () =>
|
|
1201
|
+
var on = () => A.__FEDERATION__.moduleInfo, sn = (e, t) => {
|
|
1202
1202
|
let n = an(t, Vt(e)).value;
|
|
1203
1203
|
if (n && !n.version && "version" in e && e.version && (n.version = e.version), n) return n;
|
|
1204
1204
|
if ("version" in e && e.version) {
|
|
1205
|
-
let { version: t, ...n } = e, r = Vt(n), i = an(
|
|
1205
|
+
let { version: t, ...n } = e, r = Vt(n), i = an(A.__FEDERATION__.moduleInfo, r).value;
|
|
1206
1206
|
if (i?.version === t) return i;
|
|
1207
1207
|
}
|
|
1208
|
-
}, cn = (e) => sn(e,
|
|
1208
|
+
}, cn = (e) => sn(e, A.__FEDERATION__.moduleInfo), ln = (e, t) => {
|
|
1209
1209
|
let n = Vt(e);
|
|
1210
|
-
return
|
|
1211
|
-
}, un = (e) => (
|
|
1212
|
-
...
|
|
1210
|
+
return A.__FEDERATION__.moduleInfo[n] = t, A.__FEDERATION__.moduleInfo;
|
|
1211
|
+
}, un = (e) => (A.__FEDERATION__.moduleInfo = {
|
|
1212
|
+
...A.__FEDERATION__.moduleInfo,
|
|
1213
1213
|
...e
|
|
1214
1214
|
}, () => {
|
|
1215
1215
|
let t = Object.keys(e);
|
|
1216
|
-
for (let e of t) delete
|
|
1216
|
+
for (let e of t) delete A.__FEDERATION__.moduleInfo[e];
|
|
1217
1217
|
}), dn = (e, t) => {
|
|
1218
1218
|
let n = t || `__FEDERATION_${e}:custom__`;
|
|
1219
1219
|
return {
|
|
1220
1220
|
remoteEntryKey: n,
|
|
1221
|
-
entryExports:
|
|
1221
|
+
entryExports: k[n]
|
|
1222
1222
|
};
|
|
1223
|
-
}, fn = () =>
|
|
1223
|
+
}, fn = () => A.__FEDERATION__.__GLOBAL_PLUGIN__, pn = (e) => k.__FEDERATION__.__PRELOADED_MAP__.get(e), mn = (e) => k.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), hn = "[0-9A-Za-z-]+", gn = `(?:\\+(${hn}(?:\\.${hn})*))`, _n = "0|[1-9]\\d*", vn = "[0-9]+", yn = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", bn = `(?:${vn}|${yn})`, xn = `(?:-?(${bn}(?:\\.${bn})*))`, Sn = `(?:${_n}|${yn})`, Cn = `(?:-(${Sn}(?:\\.${Sn})*))`, wn = `${_n}|x|X|\\*`, Tn = `[v=\\s]*(${wn})(?:\\.(${wn})(?:\\.(${wn})(?:${Cn})?${gn}?)?)?`, En = `^\\s*(${Tn})\\s+-\\s+(${Tn})\\s*$`, Dn = `[v=\\s]*${`(${vn})\\.(${vn})\\.(${vn})`}${xn}?${gn}?`, On = "((?:<|>)?=?)", kn = `(\\s*)${On}\\s*(${Dn}|${Tn})`, An = "(?:~>?)", jn = `(\\s*)${An}\\s+`, Mn = "(?:\\^)", Nn = `(\\s*)${Mn}\\s+`, Pn = "(<|>)?=?\\s*\\*", Fn = `^${Mn}${Tn}$`, In = `v?${`(${_n})\\.(${_n})\\.(${_n})`}${Cn}?${gn}?`, Ln = `^${An}${Tn}$`, Rn = `^${On}\\s*${Tn}$`, zn = `^${On}\\s*(${In})$|^$`, Bn = "^\\s*>=\\s*0.0.0\\s*$";
|
|
1224
1224
|
//#endregion
|
|
1225
1225
|
//#region node_modules/@module-federation/runtime-core/dist/utils/semver/utils.js
|
|
1226
|
-
function
|
|
1226
|
+
function j(e) {
|
|
1227
1227
|
return new RegExp(e);
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function M(e) {
|
|
1230
1230
|
return !e || e.toLowerCase() === "x" || e === "*";
|
|
1231
1231
|
}
|
|
1232
1232
|
function Vn(...e) {
|
|
1233
1233
|
return (t) => e.reduce((e, t) => t(e), t);
|
|
1234
1234
|
}
|
|
1235
1235
|
function Hn(e) {
|
|
1236
|
-
return e.match(
|
|
1236
|
+
return e.match(j(zn));
|
|
1237
1237
|
}
|
|
1238
1238
|
function Un(e, t, n, r) {
|
|
1239
1239
|
let i = `${e}.${t}.${n}`;
|
|
@@ -1242,34 +1242,34 @@ function Un(e, t, n, r) {
|
|
|
1242
1242
|
//#endregion
|
|
1243
1243
|
//#region node_modules/@module-federation/runtime-core/dist/utils/semver/parser.js
|
|
1244
1244
|
function Wn(e) {
|
|
1245
|
-
return e.replace(
|
|
1245
|
+
return e.replace(j(En), (e, t, n, r, i, a, o, s, c, l, u, d) => (t = M(n) ? "" : M(r) ? `>=${n}.0.0` : M(i) ? `>=${n}.${r}.0` : `>=${t}`, s = M(c) ? "" : M(l) ? `<${Number(c) + 1}.0.0-0` : M(u) ? `<${c}.${Number(l) + 1}.0-0` : d ? `<=${c}.${l}.${u}-${d}` : `<=${s}`, `${t} ${s}`.trim()));
|
|
1246
1246
|
}
|
|
1247
1247
|
function Gn(e) {
|
|
1248
|
-
return e.replace(
|
|
1248
|
+
return e.replace(j(kn), "$1$2$3");
|
|
1249
1249
|
}
|
|
1250
1250
|
function Kn(e) {
|
|
1251
|
-
return e.replace(
|
|
1251
|
+
return e.replace(j(jn), "$1~");
|
|
1252
1252
|
}
|
|
1253
1253
|
function qn(e) {
|
|
1254
|
-
return e.replace(
|
|
1254
|
+
return e.replace(j(Nn), "$1^");
|
|
1255
1255
|
}
|
|
1256
1256
|
function Jn(e) {
|
|
1257
|
-
return e.trim().split(/\s+/).map((e) => e.replace(
|
|
1257
|
+
return e.trim().split(/\s+/).map((e) => e.replace(j(Fn), (e, t, n, r, i) => M(t) ? "" : M(n) ? `>=${t}.0.0 <${Number(t) + 1}.0.0-0` : M(r) ? t === "0" ? `>=${t}.${n}.0 <${t}.${Number(n) + 1}.0-0` : `>=${t}.${n}.0 <${Number(t) + 1}.0.0-0` : i ? t === "0" ? n === "0" ? `>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r) + 1}-0` : `>=${t}.${n}.${r}-${i} <${t}.${Number(n) + 1}.0-0` : `>=${t}.${n}.${r}-${i} <${Number(t) + 1}.0.0-0` : t === "0" ? n === "0" ? `>=${t}.${n}.${r} <${t}.${n}.${Number(r) + 1}-0` : `>=${t}.${n}.${r} <${t}.${Number(n) + 1}.0-0` : `>=${t}.${n}.${r} <${Number(t) + 1}.0.0-0`)).join(" ");
|
|
1258
1258
|
}
|
|
1259
1259
|
function Yn(e) {
|
|
1260
|
-
return e.trim().split(/\s+/).map((e) => e.replace(
|
|
1260
|
+
return e.trim().split(/\s+/).map((e) => e.replace(j(Ln), (e, t, n, r, i) => M(t) ? "" : M(n) ? `>=${t}.0.0 <${Number(t) + 1}.0.0-0` : M(r) ? `>=${t}.${n}.0 <${t}.${Number(n) + 1}.0-0` : i ? `>=${t}.${n}.${r}-${i} <${t}.${Number(n) + 1}.0-0` : `>=${t}.${n}.${r} <${t}.${Number(n) + 1}.0-0`)).join(" ");
|
|
1261
1261
|
}
|
|
1262
1262
|
function Xn(e) {
|
|
1263
|
-
return e.split(/\s+/).map((e) => e.trim().replace(
|
|
1264
|
-
let o =
|
|
1263
|
+
return e.split(/\s+/).map((e) => e.trim().replace(j(Rn), (e, t, n, r, i, a) => {
|
|
1264
|
+
let o = M(n), s = o || M(r), c = s || M(i);
|
|
1265
1265
|
return t === "=" && c && (t = ""), a = "", o ? t === ">" || t === "<" ? "<0.0.0-0" : "*" : t && c ? (s && (r = 0), i = 0, t === ">" ? (t = ">=", s ? (n = Number(n) + 1, r = 0, i = 0) : (r = Number(r) + 1, i = 0)) : t === "<=" && (t = "<", s ? n = Number(n) + 1 : r = Number(r) + 1), t === "<" && (a = "-0"), `${t + n}.${r}.${i}${a}`) : s ? `>=${n}.0.0${a} <${Number(n) + 1}.0.0-0` : c ? `>=${n}.${r}.0${a} <${n}.${Number(r) + 1}.0-0` : e;
|
|
1266
1266
|
})).join(" ");
|
|
1267
1267
|
}
|
|
1268
1268
|
function Zn(e) {
|
|
1269
|
-
return e.trim().replace(
|
|
1269
|
+
return e.trim().replace(j(Pn), "");
|
|
1270
1270
|
}
|
|
1271
1271
|
function Qn(e) {
|
|
1272
|
-
return e.trim().replace(
|
|
1272
|
+
return e.trim().replace(j(Bn), "");
|
|
1273
1273
|
}
|
|
1274
1274
|
//#endregion
|
|
1275
1275
|
//#region node_modules/@module-federation/runtime-core/dist/utils/semver/compare.js
|
|
@@ -1371,8 +1371,8 @@ var sr = "default", cr = "global";
|
|
|
1371
1371
|
function lr(e, t, n, r) {
|
|
1372
1372
|
let i;
|
|
1373
1373
|
return i = "get" in e ? e.get : "lib" in e ? () => Promise.resolve(e.lib) : () => Promise.resolve(() => {
|
|
1374
|
-
|
|
1375
|
-
}), e.shareConfig?.eager && e.treeShaking?.mode &&
|
|
1374
|
+
O(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
|
|
1375
|
+
}), e.shareConfig?.eager && e.treeShaking?.mode && O(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
|
|
1376
1376
|
deps: [],
|
|
1377
1377
|
useIn: [],
|
|
1378
1378
|
from: t,
|
|
@@ -1498,7 +1498,7 @@ function xr(e, t, n, r) {
|
|
|
1498
1498
|
if (i.singleton) {
|
|
1499
1499
|
if (typeof c == "string" && !or(l, c)) {
|
|
1500
1500
|
let e = `Version ${l} from ${l && r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;
|
|
1501
|
-
i.strictVersion ?
|
|
1501
|
+
i.strictVersion ? O(e) : zt(e);
|
|
1502
1502
|
}
|
|
1503
1503
|
return {
|
|
1504
1504
|
shared: r,
|
|
@@ -1595,7 +1595,7 @@ function Dr(e, t) {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
//#endregion
|
|
1597
1597
|
//#region node_modules/@module-federation/error-codes/dist/error-codes.mjs
|
|
1598
|
-
var Or = "RUNTIME-001", kr = "RUNTIME-002", Ar = "RUNTIME-003", jr = "RUNTIME-004", Mr = "RUNTIME-005", Nr = "RUNTIME-006", Pr = "RUNTIME-007", Fr = "RUNTIME-008", Ir = "RUNTIME-009", Lr = "RUNTIME-010", Rr = "RUNTIME-011", zr = "RUNTIME-012", Br = "TYPE-001", Vr = "BUILD-001", Hr = "BUILD-002",
|
|
1598
|
+
var Or = "RUNTIME-001", kr = "RUNTIME-002", Ar = "RUNTIME-003", jr = "RUNTIME-004", Mr = "RUNTIME-005", Nr = "RUNTIME-006", Pr = "RUNTIME-007", Fr = "RUNTIME-008", Ir = "RUNTIME-009", Lr = "RUNTIME-010", Rr = "RUNTIME-011", zr = "RUNTIME-012", Br = "TYPE-001", Vr = "BUILD-001", Hr = "BUILD-002", N = {
|
|
1599
1599
|
[Or]: "Failed to get remoteEntry exports.",
|
|
1600
1600
|
[kr]: "The remote entry interface does not contain \"init\"",
|
|
1601
1601
|
[Ar]: "Failed to get manifest.",
|
|
@@ -1613,7 +1613,7 @@ var Or = "RUNTIME-001", kr = "RUNTIME-002", Ar = "RUNTIME-003", jr = "RUNTIME-00
|
|
|
1613
1613
|
[Hr]: "PublicPath is required in prod mode."
|
|
1614
1614
|
};
|
|
1615
1615
|
({
|
|
1616
|
-
...
|
|
1616
|
+
...N,
|
|
1617
1617
|
...Ur,
|
|
1618
1618
|
...Wr
|
|
1619
1619
|
});
|
|
@@ -1629,7 +1629,7 @@ async function Kr({ entry: e, remoteEntryExports: t }) {
|
|
|
1629
1629
|
e
|
|
1630
1630
|
).then(n).catch(r);
|
|
1631
1631
|
} catch (t) {
|
|
1632
|
-
|
|
1632
|
+
O(`Failed to load ESM entry from "${e}". ${t instanceof Error ? t.message : String(t)}`);
|
|
1633
1633
|
}
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
@@ -1638,13 +1638,13 @@ async function qr({ entry: e, remoteEntryExports: t }) {
|
|
|
1638
1638
|
try {
|
|
1639
1639
|
t ? n(t) : typeof __system_context__ > "u" ? System.import(e).then(n).catch(r) : Function("callbacks", `System.import("${e}")${Gr}`)([n, r]);
|
|
1640
1640
|
} catch (t) {
|
|
1641
|
-
|
|
1641
|
+
O(`Failed to load SystemJS entry from "${e}". ${t instanceof Error ? t.message : String(t)}`);
|
|
1642
1642
|
}
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
1645
|
function Jr(e, t, n) {
|
|
1646
1646
|
let { remoteEntryKey: r, entryExports: i } = dn(e, t);
|
|
1647
|
-
return i ||
|
|
1647
|
+
return i || O(Or, N, {
|
|
1648
1648
|
remoteName: e,
|
|
1649
1649
|
remoteEntryUrl: n,
|
|
1650
1650
|
remoteEntryKey: r
|
|
@@ -1666,7 +1666,7 @@ async function Yr({ name: e, globalName: t, entry: n, remoteInfo: r, loaderHook:
|
|
|
1666
1666
|
}
|
|
1667
1667
|
}).then(() => Jr(e, t, n), (t) => {
|
|
1668
1668
|
let n = t instanceof Error ? t.message : String(t);
|
|
1669
|
-
|
|
1669
|
+
O(Fr, N, {
|
|
1670
1670
|
remoteName: e,
|
|
1671
1671
|
resourceUrl: s
|
|
1672
1672
|
}, n);
|
|
@@ -1711,7 +1711,7 @@ async function Zr({ remoteInfo: e, loaderHook: t }) {
|
|
|
1711
1711
|
if (i && "url" in i) return i;
|
|
1712
1712
|
} }
|
|
1713
1713
|
}).then(() => Jr(i, r, n)).catch((e) => {
|
|
1714
|
-
|
|
1714
|
+
O(`Failed to load Node.js entry for remote "${i}" from "${n}". ${e instanceof Error ? e.message : String(e)}`);
|
|
1715
1715
|
});
|
|
1716
1716
|
}
|
|
1717
1717
|
function Qr(e) {
|
|
@@ -1840,7 +1840,7 @@ function ai(e) {
|
|
|
1840
1840
|
function oi(e, t) {
|
|
1841
1841
|
return t.map((t) => {
|
|
1842
1842
|
let n = Dr(e, t.nameOrAlias);
|
|
1843
|
-
return
|
|
1843
|
+
return D(n, `Unable to preload ${t.nameOrAlias} as it is not included in ${!n && lt({
|
|
1844
1844
|
remoteInfo: n,
|
|
1845
1845
|
remotes: e
|
|
1846
1846
|
})}`), {
|
|
@@ -1987,7 +1987,7 @@ var ui = class {
|
|
|
1987
1987
|
remoteInfo: this.remoteInfo,
|
|
1988
1988
|
remoteEntryExports: this.remoteEntryExports
|
|
1989
1989
|
});
|
|
1990
|
-
return
|
|
1990
|
+
return D(e, `remoteEntryExports is undefined \n ${lt(this.remoteInfo)}`), this.remoteEntryExports = e, this.remoteEntryExports;
|
|
1991
1991
|
}
|
|
1992
1992
|
async init(e, t, n) {
|
|
1993
1993
|
let r = await this.getEntry();
|
|
@@ -2001,7 +2001,7 @@ var ui = class {
|
|
|
2001
2001
|
remoteInfo: this.remoteInfo,
|
|
2002
2002
|
origin: this.host
|
|
2003
2003
|
});
|
|
2004
|
-
r?.init === void 0 &&
|
|
2004
|
+
r?.init === void 0 && O(kr, N, {
|
|
2005
2005
|
hostName: this.host.name,
|
|
2006
2006
|
remoteName: this.remoteInfo.name,
|
|
2007
2007
|
remoteEntryUrl: this.remoteInfo.entry,
|
|
@@ -2028,7 +2028,7 @@ var ui = class {
|
|
|
2028
2028
|
remoteEntryExports: a,
|
|
2029
2029
|
expose: t,
|
|
2030
2030
|
moduleInfo: this.remoteInfo
|
|
2031
|
-
}), o ||= await a.get(t),
|
|
2031
|
+
}), o ||= await a.get(t), D(o, `${Vt(this.remoteInfo)} remote don't export ${t}.`);
|
|
2032
2032
|
let s = Yt(this.remoteInfo.name, t), c = this.wraperFactory(o, s);
|
|
2033
2033
|
return i ? await c() : c;
|
|
2034
2034
|
}
|
|
@@ -2047,7 +2047,7 @@ var ui = class {
|
|
|
2047
2047
|
return n(r, t), r;
|
|
2048
2048
|
};
|
|
2049
2049
|
}
|
|
2050
|
-
},
|
|
2050
|
+
}, P = class {
|
|
2051
2051
|
constructor(e) {
|
|
2052
2052
|
this.type = "", this.listeners = /* @__PURE__ */ new Set(), e && (this.type = e);
|
|
2053
2053
|
}
|
|
@@ -2072,7 +2072,7 @@ var ui = class {
|
|
|
2072
2072
|
removeAll() {
|
|
2073
2073
|
this.listeners.clear();
|
|
2074
2074
|
}
|
|
2075
|
-
},
|
|
2075
|
+
}, F = class extends P {
|
|
2076
2076
|
emit(...e) {
|
|
2077
2077
|
let t, n = Array.from(this.listeners);
|
|
2078
2078
|
if (n.length > 0) {
|
|
@@ -2091,12 +2091,12 @@ function di(e, t) {
|
|
|
2091
2091
|
}
|
|
2092
2092
|
return !0;
|
|
2093
2093
|
}
|
|
2094
|
-
var fi = class extends
|
|
2094
|
+
var fi = class extends P {
|
|
2095
2095
|
constructor(e) {
|
|
2096
|
-
super(), this.onerror =
|
|
2096
|
+
super(), this.onerror = O, this.type = e;
|
|
2097
2097
|
}
|
|
2098
2098
|
emit(e) {
|
|
2099
|
-
Wt(e) ||
|
|
2099
|
+
Wt(e) || O(`The data for the "${this.type}" hook should be an object.`);
|
|
2100
2100
|
for (let t of this.listeners) try {
|
|
2101
2101
|
let n = t(e);
|
|
2102
2102
|
if (di(e, n)) e = n;
|
|
@@ -2109,12 +2109,12 @@ var fi = class extends N {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
return e;
|
|
2111
2111
|
}
|
|
2112
|
-
}, pi = class extends
|
|
2112
|
+
}, pi = class extends P {
|
|
2113
2113
|
constructor(e) {
|
|
2114
|
-
super(), this.onerror =
|
|
2114
|
+
super(), this.onerror = O, this.type = e;
|
|
2115
2115
|
}
|
|
2116
2116
|
emit(e) {
|
|
2117
|
-
Wt(e) ||
|
|
2117
|
+
Wt(e) || O(`The response data for the "${this.type}" hook must be an object.`);
|
|
2118
2118
|
let t = Array.from(this.listeners);
|
|
2119
2119
|
if (t.length > 0) {
|
|
2120
2120
|
let n = 0, r = (t) => (zt(t), this.onerror(t), e), i = (a) => {
|
|
@@ -2136,17 +2136,17 @@ var fi = class extends N {
|
|
|
2136
2136
|
this.registerPlugins = {}, this.lifecycle = e, this.lifecycleKeys = Object.keys(e);
|
|
2137
2137
|
}
|
|
2138
2138
|
applyPlugin(e, t) {
|
|
2139
|
-
|
|
2139
|
+
D(Kt(e), "Plugin configuration is invalid.");
|
|
2140
2140
|
let n = e.name;
|
|
2141
|
-
|
|
2141
|
+
D(n, "A name must be provided by the plugin."), this.registerPlugins[n] || (this.registerPlugins[n] = e, e.apply?.(t), Object.keys(this.lifecycle).forEach((t) => {
|
|
2142
2142
|
let n = e[t];
|
|
2143
2143
|
n && this.lifecycle[t].on(n);
|
|
2144
2144
|
}));
|
|
2145
2145
|
}
|
|
2146
2146
|
removePlugin(e) {
|
|
2147
|
-
|
|
2147
|
+
D(e, "A name is required.");
|
|
2148
2148
|
let t = this.registerPlugins[e];
|
|
2149
|
-
|
|
2149
|
+
D(t, `The plugin "${e}" is not registered.`), Object.keys(t).forEach((e) => {
|
|
2150
2150
|
e !== "name" && this.lifecycle[e].remove(t[e]);
|
|
2151
2151
|
});
|
|
2152
2152
|
}
|
|
@@ -2155,7 +2155,7 @@ var fi = class extends N {
|
|
|
2155
2155
|
//#region node_modules/@module-federation/runtime-core/dist/plugins/snapshot/index.js
|
|
2156
2156
|
function hi(e, t) {
|
|
2157
2157
|
let n = Jt(t);
|
|
2158
|
-
n.url ||
|
|
2158
|
+
n.url || O(Rr, N, { remoteName: e.name });
|
|
2159
2159
|
let r = st(t, n.url);
|
|
2160
2160
|
!et && !r.startsWith("http") && (r = `https:${r}`), e.type = n.type, e.entryGlobalName = n.globalName, e.entry = r, e.version = t.version, e.buildVersion = t.buildVersion;
|
|
2161
2161
|
}
|
|
@@ -2349,7 +2349,7 @@ function Si(e, t) {
|
|
|
2349
2349
|
var Ci = class {
|
|
2350
2350
|
constructor(e) {
|
|
2351
2351
|
this.loadingHostSnapshot = null, this.manifestCache = /* @__PURE__ */ new Map(), this.hooks = new mi({
|
|
2352
|
-
beforeLoadRemoteSnapshot: new
|
|
2352
|
+
beforeLoadRemoteSnapshot: new F("beforeLoadRemoteSnapshot"),
|
|
2353
2353
|
loadSnapshot: new pi("loadGlobalSnapshot"),
|
|
2354
2354
|
loadRemoteSnapshot: new pi("loadRemoteSnapshot"),
|
|
2355
2355
|
afterLoadSnapshot: new pi("afterLoadSnapshot")
|
|
@@ -2403,7 +2403,7 @@ var Ci = class {
|
|
|
2403
2403
|
from: "global"
|
|
2404
2404
|
});
|
|
2405
2405
|
u = r, d = n;
|
|
2406
|
-
} else
|
|
2406
|
+
} else O(Pr, N, {
|
|
2407
2407
|
remoteName: e.name,
|
|
2408
2408
|
remoteVersion: e.version,
|
|
2409
2409
|
hostName: this.HostInstance.options.name,
|
|
@@ -2437,13 +2437,13 @@ var Ci = class {
|
|
|
2437
2437
|
from: "runtime",
|
|
2438
2438
|
lifecycle: "afterResolve",
|
|
2439
2439
|
origin: this.HostInstance
|
|
2440
|
-
}), n || (delete this.manifestLoading[e],
|
|
2440
|
+
}), n || (delete this.manifestLoading[e], O(Ar, N, {
|
|
2441
2441
|
manifestUrl: e,
|
|
2442
2442
|
moduleName: t.name,
|
|
2443
2443
|
hostName: this.HostInstance.options.name
|
|
2444
2444
|
}, `${r}`, ii(this.HostInstance.options)));
|
|
2445
2445
|
}
|
|
2446
|
-
return
|
|
2446
|
+
return D(n.metaData && n.exposes && n.shared, `"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[
|
|
2447
2447
|
!n.metaData && "metaData",
|
|
2448
2448
|
!n.exposes && "exposes",
|
|
2449
2449
|
!n.shared && "shared"
|
|
@@ -2467,7 +2467,7 @@ var Ci = class {
|
|
|
2467
2467
|
beforeRegisterShare: new fi("beforeRegisterShare"),
|
|
2468
2468
|
afterResolve: new pi("afterResolve"),
|
|
2469
2469
|
beforeLoadShare: new pi("beforeLoadShare"),
|
|
2470
|
-
loadShare: new
|
|
2470
|
+
loadShare: new F(),
|
|
2471
2471
|
resolveShare: new fi("resolveShare"),
|
|
2472
2472
|
initContainerShareScopeMap: new fi("initContainerShareScopeMap")
|
|
2473
2473
|
}), this.host = e, this.shareScopeMap = {}, this.initTokens = {}, this._setGlobalShareScopeMap(e.options);
|
|
@@ -2511,7 +2511,7 @@ var Ci = class {
|
|
|
2511
2511
|
shared: n.options.shared,
|
|
2512
2512
|
origin: n
|
|
2513
2513
|
});
|
|
2514
|
-
|
|
2514
|
+
D(i, `Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);
|
|
2515
2515
|
let { shared: a, useTreesShaking: o } = xr(this.shareScopeMap, e, i, this.hooks.lifecycle.resolveShare) || {};
|
|
2516
2516
|
if (a) {
|
|
2517
2517
|
let t = Tr(a, o);
|
|
@@ -2623,7 +2623,7 @@ var Ci = class {
|
|
|
2623
2623
|
if (r.lib) return r.loaded ||= !0, r.lib;
|
|
2624
2624
|
if (r.get) {
|
|
2625
2625
|
let i = r.get();
|
|
2626
|
-
return i instanceof Promise &&
|
|
2626
|
+
return i instanceof Promise && O(t?.from === "build" ? Mr : Nr, N, {
|
|
2627
2627
|
hostName: n.options.name,
|
|
2628
2628
|
sharedPkgName: e
|
|
2629
2629
|
}, void 0, ii(n.options)), r.lib = i, this.setShared({
|
|
@@ -2634,7 +2634,7 @@ var Ci = class {
|
|
|
2634
2634
|
shared: r
|
|
2635
2635
|
}), r.lib;
|
|
2636
2636
|
}
|
|
2637
|
-
|
|
2637
|
+
O(Nr, N, {
|
|
2638
2638
|
hostName: n.options.name,
|
|
2639
2639
|
sharedPkgName: e
|
|
2640
2640
|
}, void 0, ii(n.options));
|
|
@@ -2677,13 +2677,13 @@ var Ci = class {
|
|
|
2677
2677
|
beforeRegisterRemote: new fi("beforeRegisterRemote"),
|
|
2678
2678
|
registerRemote: new fi("registerRemote"),
|
|
2679
2679
|
beforeRequest: new pi("beforeRequest"),
|
|
2680
|
-
onLoad: new
|
|
2681
|
-
handlePreloadModule: new
|
|
2682
|
-
errorLoadRemote: new
|
|
2683
|
-
beforePreloadRemote: new
|
|
2684
|
-
generatePreloadAssets: new
|
|
2685
|
-
afterPreloadRemote: new
|
|
2686
|
-
loadEntry: new
|
|
2680
|
+
onLoad: new F("onLoad"),
|
|
2681
|
+
handlePreloadModule: new P("handlePreloadModule"),
|
|
2682
|
+
errorLoadRemote: new F("errorLoadRemote"),
|
|
2683
|
+
beforePreloadRemote: new F("beforePreloadRemote"),
|
|
2684
|
+
generatePreloadAssets: new F("generatePreloadAssets"),
|
|
2685
|
+
afterPreloadRemote: new F(),
|
|
2686
|
+
loadEntry: new F()
|
|
2687
2687
|
}), this.host = e, this.idToRemoteMap = {};
|
|
2688
2688
|
}
|
|
2689
2689
|
formatAndRegisterRemote(e, t) {
|
|
@@ -2782,7 +2782,7 @@ var Ci = class {
|
|
|
2782
2782
|
}), !r) throw e;
|
|
2783
2783
|
}
|
|
2784
2784
|
let { id: i } = r, a = Er(t.options.remotes, i);
|
|
2785
|
-
a ||
|
|
2785
|
+
a || O(jr, N, {
|
|
2786
2786
|
hostName: t.options.name,
|
|
2787
2787
|
requestId: i
|
|
2788
2788
|
}, void 0, ii(t.options));
|
|
@@ -2793,7 +2793,7 @@ var Ci = class {
|
|
|
2793
2793
|
origin: t,
|
|
2794
2794
|
remoteInfo: s
|
|
2795
2795
|
}), { remote: l, expose: u } = c;
|
|
2796
|
-
|
|
2796
|
+
D(l && u, `The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);
|
|
2797
2797
|
let d = t.moduleCache.get(l.name), f = {
|
|
2798
2798
|
host: t,
|
|
2799
2799
|
remoteInfo: s
|
|
@@ -2808,7 +2808,7 @@ var Ci = class {
|
|
|
2808
2808
|
let { host: r } = this, i = () => {
|
|
2809
2809
|
if (e.alias) {
|
|
2810
2810
|
let n = t.find((t) => e.alias && (t.name.startsWith(e.alias) || t.alias?.startsWith(e.alias)));
|
|
2811
|
-
|
|
2811
|
+
D(!n, `The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n && n.name} name or alias`);
|
|
2812
2812
|
}
|
|
2813
2813
|
"entry" in e && et && typeof window < "u" && !e.entry.startsWith("http") && (e.entry = new URL(e.entry, window.location.origin).href), e.shareScope ||= sr, e.type ||= cr;
|
|
2814
2814
|
};
|
|
@@ -2836,12 +2836,12 @@ var Ci = class {
|
|
|
2836
2836
|
let i = t.moduleCache.get(e.name);
|
|
2837
2837
|
if (i) {
|
|
2838
2838
|
let n = i.remoteInfo, r = n.entryGlobalName;
|
|
2839
|
-
|
|
2839
|
+
k[r] && (Object.getOwnPropertyDescriptor(k, r)?.configurable ? delete k[r] : k[r] = void 0);
|
|
2840
2840
|
let a = Qr(i.remoteInfo);
|
|
2841
2841
|
$t[a] && delete $t[a], t.snapshotHandler.manifestCache.delete(n.entry);
|
|
2842
|
-
let o = n.buildVersion ? ot(n.name, n.buildVersion) : n.name, s =
|
|
2842
|
+
let o = n.buildVersion ? ot(n.name, n.buildVersion) : n.name, s = k.__FEDERATION__.__INSTANCES__.findIndex((e) => n.buildVersion ? e.options.id === o : e.name === o);
|
|
2843
2843
|
if (s !== -1) {
|
|
2844
|
-
let e =
|
|
2844
|
+
let e = k.__FEDERATION__.__INSTANCES__[s];
|
|
2845
2845
|
o = e.options.id || o;
|
|
2846
2846
|
let t = Sr(), r = !0, i = [];
|
|
2847
2847
|
Object.keys(t).forEach((e) => {
|
|
@@ -2868,7 +2868,7 @@ var Ci = class {
|
|
|
2868
2868
|
});
|
|
2869
2869
|
}), r && (e.shareScopeMap = {}, delete t[o]), i.forEach(([e, n, r, i]) => {
|
|
2870
2870
|
delete t[e]?.[n]?.[r]?.[i];
|
|
2871
|
-
}),
|
|
2871
|
+
}), k.__FEDERATION__.__INSTANCES__.splice(s, 1);
|
|
2872
2872
|
}
|
|
2873
2873
|
let { hostGlobalSnapshot: c } = Si(e, t);
|
|
2874
2874
|
if (c) {
|
|
@@ -2885,21 +2885,21 @@ var Ci = class {
|
|
|
2885
2885
|
constructor(e) {
|
|
2886
2886
|
this.hooks = new mi({
|
|
2887
2887
|
beforeInit: new fi("beforeInit"),
|
|
2888
|
-
init: new
|
|
2888
|
+
init: new P(),
|
|
2889
2889
|
beforeInitContainer: new pi("beforeInitContainer"),
|
|
2890
2890
|
initContainer: new pi("initContainer")
|
|
2891
2891
|
}), this.version = "2.3.3", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new mi({
|
|
2892
|
-
getModuleInfo: new
|
|
2893
|
-
createScript: new
|
|
2894
|
-
createLink: new
|
|
2895
|
-
fetch: new
|
|
2896
|
-
loadEntryError: new
|
|
2897
|
-
getModuleFactory: new
|
|
2892
|
+
getModuleInfo: new P(),
|
|
2893
|
+
createScript: new P(),
|
|
2894
|
+
createLink: new P(),
|
|
2895
|
+
fetch: new F(),
|
|
2896
|
+
loadEntryError: new F(),
|
|
2897
|
+
getModuleFactory: new F()
|
|
2898
2898
|
}), this.bridgeHook = new mi({
|
|
2899
|
-
beforeBridgeRender: new
|
|
2900
|
-
afterBridgeRender: new
|
|
2901
|
-
beforeBridgeDestroy: new
|
|
2902
|
-
afterBridgeDestroy: new
|
|
2899
|
+
beforeBridgeRender: new P(),
|
|
2900
|
+
afterBridgeRender: new P(),
|
|
2901
|
+
beforeBridgeDestroy: new P(),
|
|
2902
|
+
afterBridgeDestroy: new P()
|
|
2903
2903
|
});
|
|
2904
2904
|
let t = Ei ? [gi(), xi()] : [], n = {
|
|
2905
2905
|
id: ti(),
|
|
@@ -2912,7 +2912,7 @@ var Ci = class {
|
|
|
2912
2912
|
this.name = e.name, this.options = n, this.snapshotHandler = new Ci(this), this.sharedHandler = new wi(this), this.remoteHandler = new Ti(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...n.plugins, ...e.plugins || []]), this.options = this.formatOptions(n, e);
|
|
2913
2913
|
}
|
|
2914
2914
|
initOptions(e) {
|
|
2915
|
-
e.name && e.name !== this.options.name &&
|
|
2915
|
+
e.name && e.name !== this.options.name && O(Ft(Lr, N)), this.registerPlugins(e.plugins);
|
|
2916
2916
|
let t = this.formatOptions(this.options, e);
|
|
2917
2917
|
return this.options = t, t;
|
|
2918
2918
|
}
|
|
@@ -2997,7 +2997,7 @@ function Ni(e) {
|
|
|
2997
2997
|
if (typeof document > "u") return;
|
|
2998
2998
|
let t;
|
|
2999
2999
|
try {
|
|
3000
|
-
t = new URL(
|
|
3000
|
+
t = new URL(_e(e)).origin;
|
|
3001
3001
|
} catch {
|
|
3002
3002
|
return;
|
|
3003
3003
|
}
|
|
@@ -3007,7 +3007,7 @@ function Ni(e) {
|
|
|
3007
3007
|
n.rel = "preconnect", n.href = t, n.crossOrigin = "anonymous", (document.head ?? document.documentElement).append(n);
|
|
3008
3008
|
}
|
|
3009
3009
|
function Pi(e, t) {
|
|
3010
|
-
let n =
|
|
3010
|
+
let n = _e(e);
|
|
3011
3011
|
if (e.startsWith("http://localhost")) return `${n}/mf-manifest.json`;
|
|
3012
3012
|
switch (t) {
|
|
3013
3013
|
case "DashboardApp":
|
|
@@ -3043,7 +3043,7 @@ function Li(e, t = "DashboardApp") {
|
|
|
3043
3043
|
}
|
|
3044
3044
|
//#endregion
|
|
3045
3045
|
//#region node_modules/@luzmo/embed/index.js
|
|
3046
|
-
var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor,
|
|
3046
|
+
var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, I = (e, t, n, r) => {
|
|
3047
3047
|
for (var i = r > 1 ? void 0 : r ? zi(t, n) : t, a = e.length - 1, o; a >= 0; a--) (o = e[a]) && (i = (r ? o(t, n, i) : o(i)) || i);
|
|
3048
3048
|
return r && i && Ri(t, n, i), i;
|
|
3049
3049
|
}, Bi = "6.13.0", Vi = new class {
|
|
@@ -3061,19 +3061,19 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3061
3061
|
t.dashboardError = !0, t._loadTimeoutHandle &&= (clearTimeout(t._loadTimeoutHandle), void 0), t.iframeLoaded = !0, t._displayError(), console.error("Dashboard error:", e.data.errorMsg ?? e.data.error?.msg);
|
|
3062
3062
|
break;
|
|
3063
3063
|
case "data":
|
|
3064
|
-
|
|
3064
|
+
Ee(t, e.data.requestId, e.data.data);
|
|
3065
3065
|
break;
|
|
3066
3066
|
case "filters":
|
|
3067
|
-
|
|
3067
|
+
Ee(t, e.data.requestId, e.data.filters);
|
|
3068
3068
|
break;
|
|
3069
3069
|
case "getAccessibleDashboards":
|
|
3070
|
-
|
|
3070
|
+
Ee(t, e.data.requestId, e.data.accessibleDashboards);
|
|
3071
3071
|
break;
|
|
3072
3072
|
case "dashboardAction":
|
|
3073
3073
|
t.dispatchEvent(new CustomEvent("dashboardAction", { detail: { data: e.data } }));
|
|
3074
3074
|
break;
|
|
3075
3075
|
case "export":
|
|
3076
|
-
e.data.error ?
|
|
3076
|
+
e.data.error ? De(t, e.data.requestId, e.data) : (t.dispatchEvent(new CustomEvent("exported", { detail: { data: e.data } })), Ee(t, e.data.requestId, e.data));
|
|
3077
3077
|
break;
|
|
3078
3078
|
case "changedFilters":
|
|
3079
3079
|
t.dispatchEvent(new CustomEvent("changedFilters", { detail: { data: e.data } }));
|
|
@@ -3086,17 +3086,17 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3086
3086
|
e.data.type = "itemsRendered", t.dispatchEvent(new CustomEvent("itemsRendered", { detail: { data: e.data } }));
|
|
3087
3087
|
break;
|
|
3088
3088
|
case "setEditMode":
|
|
3089
|
-
e.data.error ?
|
|
3089
|
+
e.data.error ? De(t, e.data.requestId, e.data) : (Ee(t, e.data.requestId, e.data), t.params.editMode = e.data.editMode, t._containerStyle = Oe(t), t.dimensions && qe(t));
|
|
3090
3090
|
break;
|
|
3091
3091
|
case "calculatedDimensions":
|
|
3092
|
-
t.dimensions = e.data.dimensions,
|
|
3092
|
+
t.dimensions = e.data.dimensions, qe(t);
|
|
3093
3093
|
break;
|
|
3094
3094
|
case "setSelectedData":
|
|
3095
3095
|
case "setFilters":
|
|
3096
|
-
e.data.error ?
|
|
3096
|
+
e.data.error ? De(t, e.data.requestId, e.data) : Ee(t, e.data.requestId, e.data);
|
|
3097
3097
|
break;
|
|
3098
3098
|
case "setPreview":
|
|
3099
|
-
e.data.error ?
|
|
3099
|
+
e.data.error ? De(t, e.data.requestId, e.data) : Ee(t, e.data.requestId, e.data);
|
|
3100
3100
|
break;
|
|
3101
3101
|
}
|
|
3102
3102
|
}, window.addEventListener("message", window.__luzmoMessageHandler, !1));
|
|
@@ -3213,7 +3213,7 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3213
3213
|
position: absolute;
|
|
3214
3214
|
transition-duration: 0.3s;
|
|
3215
3215
|
}
|
|
3216
|
-
`, Wi = "DashboardApp",
|
|
3216
|
+
`, Wi = "DashboardApp", L = class extends h {
|
|
3217
3217
|
constructor() {
|
|
3218
3218
|
super(), this.language = "auto", this.editorLanguage = "auto", this.screenMode = "auto", this.switchScreenModeOnResize = !0, this.editMode = "view", this.embedMode = "iframe", this.iframeStyle = {}, this._containerStyle = {}, this._loaderStyle = {}, this._lcStyle = {}, this._loadingCircleStyle = {}, this._containerLoaderStyle = {}, this._loaderMsg = "", this._itemEmbedding = !1, this.browserError = !1, this.browserErrorMsg = "", this.dashboardError = !1, this.browserNotSupported = [], this.libVersion = Bi + "-wc-luzmo", this.isLibraryLoaded = !1, this.currentAuthKey = null, this.currentAuthToken = null, this.isInitCalled = !1, this.attributesMap = {
|
|
3219
3219
|
dashboardId: "dashboard-id",
|
|
@@ -3238,10 +3238,10 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3238
3238
|
apiHost: "api-host",
|
|
3239
3239
|
itemDimensions: "item-dimensions",
|
|
3240
3240
|
timezoneId: "timezone-id"
|
|
3241
|
-
}, this.loaderSize = 32, this.borderWidth = 3, this.minHeight = 400, this._containerId =
|
|
3241
|
+
}, this.loaderSize = 32, this.borderWidth = 3, this.minHeight = 400, this._containerId = Ce(), this._iframeId = `luzmo-dashboard-${this._containerId}`, this.iframeLoaded = !1, this.promises = {}, this.params = this._setOptions(), this._onResize = () => {
|
|
3242
3242
|
if (this.shadowRoot?.querySelector(".dashboard-container")) {
|
|
3243
|
-
if (this.containerWidth = this.luzmoEmbedContainer.offsetWidth, this.params.switchScreenModeOnResize && this.params.screenMode === "auto") for (let e of
|
|
3244
|
-
this.iframeLoaded ? this._calculateDimAfterDashboardLoaded() : this.dimensions && (this.containerWidth = this.luzmoEmbedContainer.offsetWidth,
|
|
3243
|
+
if (this.containerWidth = this.luzmoEmbedContainer.offsetWidth, this.params.switchScreenModeOnResize && this.params.screenMode === "auto") for (let e of me) e.width[0] <= window.innerWidth && window.innerWidth <= e.width[1] && (this.currentScreenMode = e.mode);
|
|
3244
|
+
this.iframeLoaded ? this._calculateDimAfterDashboardLoaded() : this.dimensions && (this.containerWidth = this.luzmoEmbedContainer.offsetWidth, qe(this));
|
|
3245
3245
|
}
|
|
3246
3246
|
}, this._resizeObserver = new ResizeObserver((e) => {
|
|
3247
3247
|
window.requestAnimationFrame(() => {
|
|
@@ -3257,16 +3257,16 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3257
3257
|
for (let e of Object.keys(this.promises)) this.promises[e].reject(/* @__PURE__ */ Error("Dashboard component was removed"));
|
|
3258
3258
|
}
|
|
3259
3259
|
firstUpdated() {
|
|
3260
|
-
this._loaderMsg =
|
|
3260
|
+
this._loaderMsg = Te(this)?.loadingMsg, this._loaderStyles(), Vi._dashboardComponents.push(this), this.luzmoEmbedContainer && this._resizeObserver.observe(this.luzmoEmbedContainer);
|
|
3261
3261
|
}
|
|
3262
3262
|
initComponent() {
|
|
3263
3263
|
this.params = this._setOptions(), this.isWebComponentViewMode() ? Li(this.params.appServer, Wi).then(async () => {
|
|
3264
3264
|
this.isLibraryLoaded = !0, await this.updateComplete;
|
|
3265
3265
|
let e = this.renderRoot.querySelector("dashboard-component");
|
|
3266
3266
|
this.dashboardReference = e.cloneNode(!0), e.replaceWith(this.dashboardReference), this.dashboardReference.addEventListener("load", (e) => {
|
|
3267
|
-
this.containerWidth = this.dashboardReference.offsetWidth, this.dimensions = e.detail.dimensions,
|
|
3267
|
+
this.containerWidth = this.dashboardReference.offsetWidth, this.dimensions = e.detail.dimensions, qe(this), window.dispatchEvent(new Event("resize")), this.dispatchEvent(new CustomEvent("load", e));
|
|
3268
3268
|
}), this.dashboardReference.addEventListener("itemsRendered", (e) => this.dispatchEvent(new CustomEvent("itemsRendered", e))), this.dashboardReference.addEventListener("customEvent", (e) => this.dispatchEvent(new CustomEvent("customEvent", e))), this.dashboardReference.addEventListener("changedFilters", (e) => this.dispatchEvent(new CustomEvent("changedFilters", e))), this.dashboardReference.addEventListener("dashboardAction", (e) => this.dispatchEvent(new CustomEvent("dashboardAction", e))), this.dashboardReference.addEventListener("export", (e) => this.dispatchEvent(new CustomEvent("exported", e))), this.setAllAttributes();
|
|
3269
|
-
}) : (this.containerWidth = this.container?.clientWidth,
|
|
3269
|
+
}) : (this.containerWidth = this.container?.clientWidth, Je(this), pe(this), this._setupLoader(), this.params.error || (this._loaderStyles(), Hi(), this._iframeUrl = we(this), this.iframe?.setAttribute("src", this._iframeUrl), this.iframeStyle = Ne(this)));
|
|
3270
3270
|
}
|
|
3271
3271
|
setAllAttributes() {
|
|
3272
3272
|
if (this.dashboardReference) {
|
|
@@ -3276,7 +3276,7 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3276
3276
|
"apiHost",
|
|
3277
3277
|
"itemDimensions"
|
|
3278
3278
|
].includes(e) && this.params[e] && this.dashboardReference.setAttribute(this.attributesMap[e], this.params[e]);
|
|
3279
|
-
this.params.itemDimensions && this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions)), this.params.apiHost && this.dashboardReference.setAttribute("api-host",
|
|
3279
|
+
this.params.itemDimensions && this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions)), this.params.apiHost && this.dashboardReference.setAttribute("api-host", _e(this.params.apiHost)), this.params.key && this.dashboardReference.setAttribute("auth-key", this.params.key), this.params.token && this.dashboardReference.setAttribute("auth-token", this.params.token);
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
3282
|
updated(e) {
|
|
@@ -3319,30 +3319,30 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3319
3319
|
}
|
|
3320
3320
|
} else for (let [n] of e.entries()) t.has(n) && n !== "editMode" ? (this.iframeLoaded = !1, this._loadTimeoutHandle && clearTimeout(this._loadTimeoutHandle), this._loadTimeoutHandle = setTimeout(() => {
|
|
3321
3321
|
console.warn("Failed to load dashboard, appServer is likely down or unreachable.");
|
|
3322
|
-
}, 15 * 1e3), this.params = this._setOptions(),
|
|
3322
|
+
}, 15 * 1e3), this.params = this._setOptions(), Je(this), this._setupLoader(), this._loaderStyles(), this._iframeUrl = we(this), this.iframe && this._updateIframeUrl(), this.iframeStyle = Ne(this)) : t.has(n) && n === "editMode" && (this.iframeLoaded && this.setEditMode(this.editMode), this.params = this._setOptions());
|
|
3323
3323
|
}
|
|
3324
3324
|
_setOptions() {
|
|
3325
3325
|
let e = {
|
|
3326
3326
|
dashboardId: this.dashboardId,
|
|
3327
3327
|
dashboardSlug: this.dashboardSlug
|
|
3328
3328
|
};
|
|
3329
|
-
return this.itemId ? (e.itemId = this.itemId, this._itemEmbedding = !0) : this._itemEmbedding = !1, this.language && (e.language = this.language), this.editorLanguage && (e.editorLanguage = this.editorLanguage), this.qeVersion && (e.qeVersion = this.qeVersion), this.screenMode && (e.screenMode = this.screenMode), e.switchScreenModeOnResize = this.switchScreenModeOnResize, this.authToken && (e.token = this.authToken), this.authKey && (e.key = this.authKey), this.editMode && (e.editMode = this.editMode), this.theme && (e.theme = this.theme), this.mainColor && (e.mainColor = this.mainColor), this.accentColor && (e.accentColor = this.accentColor), this.loaderBackground && (e.loaderBackground = this.loaderBackground), this.loaderFontColor && (e.loaderFontColor = this.loaderFontColor), this.loaderSpinnerColor && (e.loaderSpinnerColor = this.loaderSpinnerColor), this.loaderSpinnerBackground && (e.loaderSpinnerBackground = this.loaderSpinnerBackground), this.timezoneId && (e.timezoneId = this.timezoneId), this.itemDimensions && (e.itemDimensions = this.itemDimensions), this.appServer ? (this.appServer = this.isWebComponentViewMode() ?
|
|
3329
|
+
return this.itemId ? (e.itemId = this.itemId, this._itemEmbedding = !0) : this._itemEmbedding = !1, this.language && (e.language = this.language), this.editorLanguage && (e.editorLanguage = this.editorLanguage), this.qeVersion && (e.qeVersion = this.qeVersion), this.screenMode && (e.screenMode = this.screenMode), e.switchScreenModeOnResize = this.switchScreenModeOnResize, this.authToken && (e.token = this.authToken), this.authKey && (e.key = this.authKey), this.editMode && (e.editMode = this.editMode), this.theme && (e.theme = this.theme), this.mainColor && (e.mainColor = this.mainColor), this.accentColor && (e.accentColor = this.accentColor), this.loaderBackground && (e.loaderBackground = this.loaderBackground), this.loaderFontColor && (e.loaderFontColor = this.loaderFontColor), this.loaderSpinnerColor && (e.loaderSpinnerColor = this.loaderSpinnerColor), this.loaderSpinnerBackground && (e.loaderSpinnerBackground = this.loaderSpinnerBackground), this.timezoneId && (e.timezoneId = this.timezoneId), this.itemDimensions && (e.itemDimensions = this.itemDimensions), this.appServer ? (this.appServer = this.isWebComponentViewMode() ? _e(this.appServer) : ge(this.appServer), e.appServer = this.appServer) : (this.appServer = ge(T.appServer), e.appServer = this.appServer), this.apiHost ? (this.apiHost = this.isWebComponentViewMode() ? _e(this.apiHost) : ge(this.apiHost), e.apiHost = this.apiHost) : (this.apiHost = this.appServer.includes("luzmo.com") ? this.appServer.replace("app", "api") : this.appServer, e.apiHost = this.apiHost), this.currentAuthKey = this.authKey, this.currentAuthToken = this.authToken, e;
|
|
3330
3330
|
}
|
|
3331
3331
|
_updateIframeUrl() {
|
|
3332
|
-
|
|
3332
|
+
Fe(this.iframe, this._iframeUrl);
|
|
3333
3333
|
}
|
|
3334
3334
|
_setupLoader() {
|
|
3335
|
-
let e =
|
|
3335
|
+
let e = Te(this);
|
|
3336
3336
|
this._loaderMsg = e.loadingMsg, e.errorMsg && (this.browserError = !0, this.browserErrorMsg = e.errorMsg, this._displayError());
|
|
3337
3337
|
}
|
|
3338
3338
|
_displayError() {
|
|
3339
3339
|
this.dashboardError && (this._loaderStyles(), this.iframeStyle.opacity = 1), this.browserError && (this._containerStyle.display = "none");
|
|
3340
3340
|
}
|
|
3341
3341
|
_calculateDimAfterDashboardLoaded() {
|
|
3342
|
-
this.dashboardError = !1, this._loaderStyles(),
|
|
3342
|
+
this.dashboardError = !1, this._loaderStyles(), qe(this);
|
|
3343
3343
|
}
|
|
3344
3344
|
_loaderStyles() {
|
|
3345
|
-
this._containerStyle =
|
|
3345
|
+
this._containerStyle = Oe(this), this._loaderStyle = Ae(this), this._loadingCircleStyle = je(this), this._containerLoaderStyle = ke(this), this._lcStyle = Me(this);
|
|
3346
3346
|
}
|
|
3347
3347
|
static get styles() {
|
|
3348
3348
|
return [Ui];
|
|
@@ -3352,25 +3352,25 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3352
3352
|
<div
|
|
3353
3353
|
class="luzmo-container-loader"
|
|
3354
3354
|
id="luzmo-container-loader-${this._containerId}"
|
|
3355
|
-
style=${
|
|
3355
|
+
style=${oe(this._containerLoaderStyle)}
|
|
3356
3356
|
>
|
|
3357
3357
|
<div
|
|
3358
3358
|
class="luzmo-loader"
|
|
3359
3359
|
id="luzmo-loader-${this._containerId}"
|
|
3360
|
-
style=${
|
|
3360
|
+
style=${oe(this._loaderStyle)}
|
|
3361
3361
|
>
|
|
3362
3362
|
<div
|
|
3363
3363
|
class="luzmo-lc"
|
|
3364
|
-
style=${
|
|
3364
|
+
style=${oe(this._lcStyle)}
|
|
3365
3365
|
>
|
|
3366
3366
|
<div
|
|
3367
3367
|
class="luzmo-loading-circle"
|
|
3368
|
-
style=${
|
|
3368
|
+
style=${oe(this._loadingCircleStyle)}
|
|
3369
3369
|
></div>
|
|
3370
3370
|
${this._itemEmbedding ? "" : _`
|
|
3371
3371
|
<div
|
|
3372
3372
|
class="luzmo-loading-message"
|
|
3373
|
-
style=${
|
|
3373
|
+
style=${oe({ color: this.loaderFontColor })}
|
|
3374
3374
|
>
|
|
3375
3375
|
${this._loaderMsg}
|
|
3376
3376
|
</div>
|
|
@@ -3395,7 +3395,7 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3395
3395
|
class="luzmo-embed-dashboard ${this.isWebComponentViewMode() ? "" : "luzmo-embed-dashboard-ede"}"
|
|
3396
3396
|
id="${this._iframeId}"
|
|
3397
3397
|
name="${this._iframeId}"
|
|
3398
|
-
style=${
|
|
3398
|
+
style=${oe(this.iframeStyle)}
|
|
3399
3399
|
src="${this._iframeUrl}"
|
|
3400
3400
|
frameborder="0"
|
|
3401
3401
|
></iframe>
|
|
@@ -3406,10 +3406,10 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3406
3406
|
</div>
|
|
3407
3407
|
` : ""}
|
|
3408
3408
|
`, _`
|
|
3409
|
-
<div class="${
|
|
3409
|
+
<div class="${Xe} ${this.isWebComponentViewMode() ? "" : `${Xe}-ede`}">
|
|
3410
3410
|
<div
|
|
3411
3411
|
class="dashboard-container"
|
|
3412
|
-
style=${
|
|
3412
|
+
style=${oe(Object.assign({}, this._containerStyle, {
|
|
3413
3413
|
width: this.iframeStyle.width ?? "100%",
|
|
3414
3414
|
height: this.iframeStyle.height ?? "100%"
|
|
3415
3415
|
}))}
|
|
@@ -3424,28 +3424,28 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3424
3424
|
return new Promise((e) => e(Vi._dashboardComponents));
|
|
3425
3425
|
}
|
|
3426
3426
|
getData(e) {
|
|
3427
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.getData(e) : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3427
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.getData(e) : this.isWebComponentViewMode() ? Promise.reject() : Re(this, this.iframe, e);
|
|
3428
3428
|
}
|
|
3429
3429
|
getFilters() {
|
|
3430
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.getFilters() : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3430
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.getFilters() : this.isWebComponentViewMode() ? Promise.reject() : ze(this, this.iframe);
|
|
3431
3431
|
}
|
|
3432
3432
|
setSelectedData(e, t) {
|
|
3433
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setSelectedData(e, t) : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3433
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setSelectedData(e, t) : this.isWebComponentViewMode() ? Promise.reject() : Ke(this, this.iframe, e, t);
|
|
3434
3434
|
}
|
|
3435
3435
|
setAuthorization(e, t) {
|
|
3436
|
-
return this.currentAuthKey = e, this.currentAuthToken = t, this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setAuthorization(e, t) : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3436
|
+
return this.currentAuthKey = e, this.currentAuthToken = t, this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setAuthorization(e, t) : this.isWebComponentViewMode() ? Promise.reject() : Ue(this, this.iframe, e, t);
|
|
3437
3437
|
}
|
|
3438
3438
|
refreshData(e) {
|
|
3439
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.refreshData(e) : this.isWebComponentViewMode() ? Promise.reject() : e ?
|
|
3439
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.refreshData(e) : this.isWebComponentViewMode() ? Promise.reject() : e ? Be(this, this.iframe, e) : Be(this, this.iframe);
|
|
3440
3440
|
}
|
|
3441
3441
|
reloadDashboard() {
|
|
3442
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.reloadDashboard() : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3442
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.reloadDashboard() : this.isWebComponentViewMode() ? Promise.reject() : Ve(this, this.iframe);
|
|
3443
3443
|
}
|
|
3444
3444
|
exportDashboard(e) {
|
|
3445
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.exportDashboard(e) : this.isWebComponentViewMode() ? Promise.reject() : e ?
|
|
3445
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.exportDashboard(e) : this.isWebComponentViewMode() ? Promise.reject() : e ? Ie(this, this.iframe, e) : Ie(this, this.iframe);
|
|
3446
3446
|
}
|
|
3447
3447
|
getAccessibleDashboards() {
|
|
3448
|
-
return
|
|
3448
|
+
return Le(this);
|
|
3449
3449
|
}
|
|
3450
3450
|
addFilters(e, t) {
|
|
3451
3451
|
return this.dashboardReference.addFilters(e, t);
|
|
@@ -3457,25 +3457,25 @@ var Ri = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, F = (e, t,
|
|
|
3457
3457
|
})) : this.dashboardReference && ["editFull", "editLimited"].includes(e) ? (this.editMode = e, this.params.editMode = e, this.initComponent(), Promise.resolve({
|
|
3458
3458
|
type: "setEditMode",
|
|
3459
3459
|
editMode: e
|
|
3460
|
-
})) : this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setEditMode(e) : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3460
|
+
})) : this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setEditMode(e) : this.isWebComponentViewMode() ? Promise.reject() : We(this, this.iframe, e);
|
|
3461
3461
|
}
|
|
3462
3462
|
setPreview(e) {
|
|
3463
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setPreview(e) :
|
|
3463
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.setPreview(e) : Ge(this, this.iframe, e);
|
|
3464
3464
|
}
|
|
3465
3465
|
sendExportEmail(e, t, n) {
|
|
3466
|
-
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.sendExportEmail(e, t, n) : this.isWebComponentViewMode() ? Promise.reject() :
|
|
3466
|
+
return this.isWebComponentViewMode() && this.dashboardReference ? this.dashboardReference.sendExportEmail(e, t, n) : this.isWebComponentViewMode() ? Promise.reject() : He(this, this.iframe, e, t, n);
|
|
3467
3467
|
}
|
|
3468
3468
|
isWebComponentViewMode() {
|
|
3469
3469
|
return this.embedMode === "webComponent" && (this.params.editMode === "view" || this.params.editMode === void 0);
|
|
3470
3470
|
}
|
|
3471
3471
|
};
|
|
3472
|
-
|
|
3472
|
+
I([ee(".dashboard-container")], L.prototype, "container", 2), I([ee(`.${Xe}`)], L.prototype, "luzmoEmbedContainer", 2), I([ee("iframe")], L.prototype, "iframe", 2), I([x()], L.prototype, "dashboardId", 2), I([x()], L.prototype, "dashboardSlug", 2), I([x()], L.prototype, "itemId", 2), I([x()], L.prototype, "language", 2), I([x()], L.prototype, "editorLanguage", 2), I([x()], L.prototype, "qeVersion", 2), I([x()], L.prototype, "screenMode", 2), I([x({ converter: {
|
|
3473
3473
|
fromAttribute: (e) => e === "true",
|
|
3474
3474
|
toAttribute: String
|
|
3475
|
-
} })],
|
|
3476
|
-
var Gi = class extends
|
|
3475
|
+
} })], L.prototype, "switchScreenModeOnResize", 2), I([x()], L.prototype, "editMode", 2), I([x()], L.prototype, "theme", 2), I([x()], L.prototype, "mainColor", 2), I([x()], L.prototype, "accentColor", 2), I([x()], L.prototype, "authToken", 2), I([x()], L.prototype, "authKey", 2), I([x()], L.prototype, "loaderBackground", 2), I([x()], L.prototype, "loaderFontColor", 2), I([x()], L.prototype, "loaderSpinnerColor", 2), I([x()], L.prototype, "loaderSpinnerBackground", 2), I([x()], L.prototype, "appServer", 2), I([x()], L.prototype, "timezoneId", 2), I([x()], L.prototype, "apiHost", 2), I([x({ type: Object })], L.prototype, "itemDimensions", 2), I([x()], L.prototype, "embedMode", 2), I([x({ attribute: !1 })], L.prototype, "_containerId", 2), I([x({ attribute: !1 })], L.prototype, "_iframeId", 2), I([x({ attribute: !1 })], L.prototype, "params", 2), I([x({ attribute: !1 })], L.prototype, "_iframeUrl", 2), I([x({ attribute: !1 })], L.prototype, "iframeLoaded", 2), I([x({ attribute: !1 })], L.prototype, "promises", 2), I([x({ attribute: !1 })], L.prototype, "iframeStyle", 2), I([x({ attribute: !1 })], L.prototype, "_containerStyle", 2), I([x({ attribute: !1 })], L.prototype, "_loaderStyle", 2), I([x({ attribute: !1 })], L.prototype, "_lcStyle", 2), I([x({ attribute: !1 })], L.prototype, "_loadingCircleStyle", 2), I([x({ attribute: !1 })], L.prototype, "_containerLoaderStyle", 2), I([x({ attribute: !1 })], L.prototype, "_loaderMsg", 2), I([x({ attribute: !1 })], L.prototype, "containerWidth", 2), I([x({ attribute: !1 })], L.prototype, "dimensions", 2), I([x({ attribute: !1 })], L.prototype, "currentScreenMode", 2), I([x({ attribute: !1 })], L.prototype, "_itemEmbedding", 2), I([x({ attribute: !1 })], L.prototype, "browserError", 2), I([x({ attribute: !1 })], L.prototype, "browserErrorMsg", 2), I([x({ attribute: !1 })], L.prototype, "dashboardError", 2), I([x({ attribute: !1 })], L.prototype, "browserNotSupported", 2), I([x()], L.prototype, "libVersion", 2), I([S()], L.prototype, "isLibraryLoaded", 2), I([S()], L.prototype, "dashboardReference", 2), I([S()], L.prototype, "currentAuthKey", 2), I([S()], L.prototype, "currentAuthToken", 2), I([S()], L.prototype, "isInitCalled", 2);
|
|
3476
|
+
var Gi = class extends L {};
|
|
3477
3477
|
customElements.get("luzmo-embed-dashboard") || customElements.define("luzmo-embed-dashboard", Gi);
|
|
3478
|
-
var Ki = "0.1.99", qi = "VizItemApp",
|
|
3478
|
+
var Ki = "0.1.99", qi = "VizItemApp", R = class extends h {
|
|
3479
3479
|
constructor() {
|
|
3480
3480
|
super(...arguments), this.appServer = "https://app.luzmo.com", this.apiHost = "https://api.luzmo.com", this.slots = [], this.version = Bi + "-wc-luzmo", this.dashboardContentsVersion = Ki, this.libVersion = Bi + "-wc-luzmo", this.postInitCallQueue = [];
|
|
3481
3481
|
}
|
|
@@ -3532,17 +3532,17 @@ var Ki = "0.1.99", qi = "VizItemApp", L = class extends h {
|
|
|
3532
3532
|
}), this.chartElement.addEventListener("changedFilters", (e) => this.dispatchEvent(new CustomEvent("changedFilters", e))), this.chartElement.addEventListener("exported", (e) => this.dispatchEvent(new CustomEvent("exported", e))), this.chartElement.addEventListener("customEvent", (e) => this.dispatchEvent(new CustomEvent("customEvent", e))), this.chartElement.addEventListener("authorizationExpired", (e) => this.dispatchEvent(new CustomEvent("authorizationExpired", e))), this.updateVizItemProperties(), this.renderRoot.append(this.chartElement));
|
|
3533
3533
|
}
|
|
3534
3534
|
updateVizItemProperties() {
|
|
3535
|
-
if (this.chartElement) for (let e in
|
|
3535
|
+
if (this.chartElement) for (let e in Ye) {
|
|
3536
3536
|
let t = this[e];
|
|
3537
3537
|
if (t) {
|
|
3538
|
-
let n = ["appServer", "apiHost"].includes(e) ?
|
|
3539
|
-
this.chartElement.setAttribute(
|
|
3538
|
+
let n = ["appServer", "apiHost"].includes(e) ? _e(t) : t;
|
|
3539
|
+
this.chartElement.setAttribute(Ye[e], typeof n == "object" ? JSON.stringify(n) : n);
|
|
3540
3540
|
}
|
|
3541
3541
|
}
|
|
3542
3542
|
}
|
|
3543
3543
|
async updated(e) {
|
|
3544
3544
|
if (this.chartElement) for (let [t] of e.entries()) {
|
|
3545
|
-
let e =
|
|
3545
|
+
let e = Ye[t] ?? t, n = typeof this[t] == "object" ? JSON.stringify(this[t]) : this[t]?.toString() ?? this[t];
|
|
3546
3546
|
this.chartElement.setAttribute(e, n);
|
|
3547
3547
|
}
|
|
3548
3548
|
else this.canInitializeVizItem() && (await Li(this.appServer, qi), this.createAndAppendElement());
|
|
@@ -3551,14 +3551,14 @@ var Ki = "0.1.99", qi = "VizItemApp", L = class extends h {
|
|
|
3551
3551
|
return _` `;
|
|
3552
3552
|
}
|
|
3553
3553
|
};
|
|
3554
|
-
|
|
3554
|
+
I([x()], R.prototype, "appServer", 2), I([x()], R.prototype, "apiHost", 2), I([x({ type: Array })], R.prototype, "slots", 2), I([x({ type: Object })], R.prototype, "options", 2), I([x()], R.prototype, "type", 2), I([x()], R.prototype, "authKey", 2), I([x()], R.prototype, "authToken", 2), I([x()], R.prototype, "version", 2), I([x()], R.prototype, "contextId", 2), I([x({ converter: (e) => {
|
|
3555
3555
|
try {
|
|
3556
3556
|
return JSON.parse(e);
|
|
3557
3557
|
} catch {
|
|
3558
3558
|
return e;
|
|
3559
3559
|
}
|
|
3560
|
-
} })],
|
|
3561
|
-
var Ji = class extends
|
|
3560
|
+
} })], R.prototype, "canFilter", 2), I([x({ type: Array })], R.prototype, "filters", 2), I([x()], R.prototype, "dashboardId", 2), I([x()], R.prototype, "itemId", 2), I([x({ type: Object })], R.prototype, "selectedData", 2), I([x()], R.prototype, "dashboardContentsVersion", 2), I([x()], R.prototype, "libVersion", 2);
|
|
3561
|
+
var Ji = class extends R {};
|
|
3562
3562
|
customElements.get("luzmo-embed-viz-item") || customElements.define("luzmo-embed-viz-item", Ji);
|
|
3563
3563
|
var Yi = {
|
|
3564
3564
|
aiEndpoint: "ai-endpoint",
|
|
@@ -3572,7 +3572,7 @@ var Yi = {
|
|
|
3572
3572
|
libVersion: "lib-version",
|
|
3573
3573
|
aydHost: "ayd-host",
|
|
3574
3574
|
availableDatasets: "available-datasets"
|
|
3575
|
-
}, Xi = "luzmo-iq-embed-chat", Zi = "luzmo-iq-chat-component",
|
|
3575
|
+
}, Xi = "luzmo-iq-embed-chat", Zi = "luzmo-iq-chat-component", z = class extends h {
|
|
3576
3576
|
constructor() {
|
|
3577
3577
|
super(...arguments), this.appServer = "https://app.luzmo.com", this.apiHost = "https://api.luzmo.com", this.version = Bi + "-wc-luzmo", this.libVersion = Bi + "-wc-luzmo", this.remoteEntryServer = "http://localhost:4202/", this.aydHost = "https://ayd.luzmo.com/";
|
|
3578
3578
|
}
|
|
@@ -3605,7 +3605,7 @@ var Yi = {
|
|
|
3605
3605
|
"appServer",
|
|
3606
3606
|
"apiHost",
|
|
3607
3607
|
"aydHost"
|
|
3608
|
-
].includes(e) ?
|
|
3608
|
+
].includes(e) ? _e(t) : t;
|
|
3609
3609
|
this.chartElement.setAttribute(Yi[e], typeof n == "object" ? JSON.stringify(n) : n);
|
|
3610
3610
|
}
|
|
3611
3611
|
}
|
|
@@ -3636,7 +3636,7 @@ var Yi = {
|
|
|
3636
3636
|
});
|
|
3637
3637
|
}
|
|
3638
3638
|
};
|
|
3639
|
-
|
|
3639
|
+
I([x()], z.prototype, "appServer", 2), I([x()], z.prototype, "apiHost", 2), I([x({ type: Object })], z.prototype, "options", 2), I([x({ type: String })], z.prototype, "initialSuggestionsDatasetId", 2), I([x()], z.prototype, "aiEndpoint", 2), I([x()], z.prototype, "authKey", 2), I([x()], z.prototype, "authToken", 2), I([x()], z.prototype, "version", 2), I([x()], z.prototype, "libVersion", 2), I([x()], z.prototype, "remoteEntryServer", 2), I([x()], z.prototype, "aydHost", 2), I([x({ type: Array })], z.prototype, "availableDatasets", 2), customElements.get(Xi) || customElements.define(Xi, z);
|
|
3640
3640
|
var Qi = {
|
|
3641
3641
|
aiEndPoint: "ai-end-point",
|
|
3642
3642
|
appServer: "app-server",
|
|
@@ -3647,7 +3647,7 @@ var Qi = {
|
|
|
3647
3647
|
version: "version",
|
|
3648
3648
|
libVersion: "lib-version",
|
|
3649
3649
|
messages: "messages"
|
|
3650
|
-
}, $i = "luzmo-iq-embed-answer",
|
|
3650
|
+
}, $i = "luzmo-iq-embed-answer", B = class extends h {
|
|
3651
3651
|
constructor() {
|
|
3652
3652
|
super(...arguments), this.appServer = "https://app.luzmo.com", this.apiHost = "https://api.luzmo.com", this.version = Bi + "-wc-luzmo", this.libVersion = Bi + "-wc-luzmo", this.remoteEntryServer = "http://localhost:4202";
|
|
3653
3653
|
}
|
|
@@ -3676,7 +3676,7 @@ var Qi = {
|
|
|
3676
3676
|
if (this.chartElement) for (let e in Qi) {
|
|
3677
3677
|
let t = this[e];
|
|
3678
3678
|
if (t) {
|
|
3679
|
-
let n = ["appServer", "apiHost"].includes(e) ?
|
|
3679
|
+
let n = ["appServer", "apiHost"].includes(e) ? _e(t) : t;
|
|
3680
3680
|
this.chartElement.setAttribute(Qi[e], typeof n == "object" ? JSON.stringify(n) : n);
|
|
3681
3681
|
}
|
|
3682
3682
|
}
|
|
@@ -3692,7 +3692,7 @@ var Qi = {
|
|
|
3692
3692
|
return _` `;
|
|
3693
3693
|
}
|
|
3694
3694
|
};
|
|
3695
|
-
|
|
3695
|
+
I([x()], B.prototype, "appServer", 2), I([x()], B.prototype, "apiHost", 2), I([x({ type: Object })], B.prototype, "options", 2), I([x()], B.prototype, "aiEndPoint", 2), I([x()], B.prototype, "authKey", 2), I([x()], B.prototype, "authToken", 2), I([x()], B.prototype, "messages", 2), I([x()], B.prototype, "version", 2), I([x()], B.prototype, "libVersion", 2), I([x()], B.prototype, "remoteEntryServer", 2), customElements.get($i) || customElements.define($i, B), h.disableWarning?.("change-in-update");
|
|
3696
3696
|
//#endregion
|
|
3697
3697
|
//#region node_modules/gridstack/dist/gridstack.min.css?inline
|
|
3698
3698
|
var ea = ".grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;width:auto;margin:0;position:absolute;z-index:0!important}.grid-stack>.grid-stack-item{width:var(--gs-column-width);height:var(--gs-cell-height);padding:0;position:absolute;top:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{width:auto;margin:0;position:absolute;overflow:hidden auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item{right:0}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{-ms-touch-action:none;touch-action:none;font-size:.1px;display:block;position:absolute}.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url(\"data:image/svg+xml;utf8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"none\\\" stroke=\\\"%23666\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"m10 3 2 2H8l2-2v14l-2-2h4l-2 2\\\"/></svg>\");background-position:50%;background-repeat:no-repeat}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,right,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{opacity:.8;box-shadow:1px 4px 6px #0003}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,right .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing{transition:left,right,top,height,width}.grid-stack>.grid-stack-item[gs-y=\"0\"]{top:0}.grid-stack:not(.grid-stack-rtl)>.grid-stack-item[gs-x=\"0\"]{left:0}.grid-stack.grid-stack-rtl>.grid-stack-item[gs-x=\"0\"]{right:0}", ta = (e, t) => {
|
|
@@ -3735,7 +3735,7 @@ var ea = ".grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stac
|
|
|
3735
3735
|
composed: !0,
|
|
3736
3736
|
cancelable: !0
|
|
3737
3737
|
}));
|
|
3738
|
-
},
|
|
3738
|
+
}, V = ({ target: e, itemStates: t, updatedItemStates: n, changedItemStates: r }) => {
|
|
3739
3739
|
e.dispatchEvent(new CustomEvent("luzmo-item-grid-item-states-changed", {
|
|
3740
3740
|
detail: {
|
|
3741
3741
|
itemStates: t,
|
|
@@ -3909,7 +3909,7 @@ var ea = ".grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stac
|
|
|
3909
3909
|
excludeNodeId: e
|
|
3910
3910
|
});
|
|
3911
3911
|
return r.map((t) => t.id === e ? a : o.find((e) => e.id === t.id) ?? t);
|
|
3912
|
-
}, wa = (e) => ya(e, e.id), Ta = Math.min, Ea = Math.max, Da = Math.round, Oa = Math.floor,
|
|
3912
|
+
}, wa = (e) => ya(e, e.id), Ta = Math.min, Ea = Math.max, Da = Math.round, Oa = Math.floor, H = (e) => ({
|
|
3913
3913
|
x: e,
|
|
3914
3914
|
y: e
|
|
3915
3915
|
}), ka = {
|
|
@@ -4128,27 +4128,27 @@ var Qa = 50, $a = async (e, t, n) => {
|
|
|
4128
4128
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
4129
4129
|
let g = ja(r), _ = Fa(o), v = ja(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Ka(o)] : Ra(o)), x = p !== "none";
|
|
4130
4130
|
!d && x && b.push(...Ga(o, m, p, y));
|
|
4131
|
-
let ee = [o, ...b],
|
|
4132
|
-
if (l &&
|
|
4131
|
+
let ee = [o, ...b], te = await s.detectOverflow(t, h), S = [], ne = i.flip?.overflows || [];
|
|
4132
|
+
if (l && S.push(te[g]), u) {
|
|
4133
4133
|
let e = La(r, a, y);
|
|
4134
|
-
|
|
4134
|
+
S.push(te[e[0]], te[e[1]]);
|
|
4135
4135
|
}
|
|
4136
|
-
if (
|
|
4136
|
+
if (ne = [...ne, {
|
|
4137
4137
|
placement: r,
|
|
4138
|
-
overflows:
|
|
4139
|
-
}], !
|
|
4138
|
+
overflows: S
|
|
4139
|
+
}], !S.every((e) => e <= 0)) {
|
|
4140
4140
|
let e = (i.flip?.index || 0) + 1, t = ee[e];
|
|
4141
|
-
if (t && (!(u === "alignment" && _ !== Fa(t)) ||
|
|
4141
|
+
if (t && (!(u === "alignment" && _ !== Fa(t)) || ne.every((e) => Fa(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
4142
4142
|
data: {
|
|
4143
4143
|
index: e,
|
|
4144
|
-
overflows:
|
|
4144
|
+
overflows: ne
|
|
4145
4145
|
},
|
|
4146
4146
|
reset: { placement: t }
|
|
4147
4147
|
};
|
|
4148
|
-
let n =
|
|
4148
|
+
let n = ne.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
4149
4149
|
if (!n) switch (f) {
|
|
4150
4150
|
case "bestFit": {
|
|
4151
|
-
let e =
|
|
4151
|
+
let e = ne.filter((e) => {
|
|
4152
4152
|
if (x) {
|
|
4153
4153
|
let t = Fa(e.placement);
|
|
4154
4154
|
return t === _ || t === "y";
|
|
@@ -4212,33 +4212,33 @@ function io() {
|
|
|
4212
4212
|
function ao(e) {
|
|
4213
4213
|
return oo(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
4214
4214
|
}
|
|
4215
|
-
function
|
|
4215
|
+
function U(e) {
|
|
4216
4216
|
var t;
|
|
4217
4217
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
4218
4218
|
}
|
|
4219
|
-
function
|
|
4219
|
+
function W(e) {
|
|
4220
4220
|
return ((oo(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
4221
4221
|
}
|
|
4222
4222
|
function oo(e) {
|
|
4223
|
-
return io() ? e instanceof Node || e instanceof
|
|
4224
|
-
}
|
|
4225
|
-
function W(e) {
|
|
4226
|
-
return io() ? e instanceof Element || e instanceof H(e).Element : !1;
|
|
4223
|
+
return io() ? e instanceof Node || e instanceof U(e).Node : !1;
|
|
4227
4224
|
}
|
|
4228
4225
|
function G(e) {
|
|
4229
|
-
return io() ? e instanceof
|
|
4226
|
+
return io() ? e instanceof Element || e instanceof U(e).Element : !1;
|
|
4230
4227
|
}
|
|
4231
4228
|
function so(e) {
|
|
4232
|
-
return
|
|
4229
|
+
return io() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
|
|
4233
4230
|
}
|
|
4234
4231
|
function co(e) {
|
|
4232
|
+
return !io() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
4233
|
+
}
|
|
4234
|
+
function lo(e) {
|
|
4235
4235
|
let { overflow: t, overflowX: n, overflowY: r, display: i } = K(e);
|
|
4236
4236
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
4237
4237
|
}
|
|
4238
|
-
function
|
|
4238
|
+
function uo(e) {
|
|
4239
4239
|
return /^(table|td|th)$/.test(ao(e));
|
|
4240
4240
|
}
|
|
4241
|
-
function
|
|
4241
|
+
function fo(e) {
|
|
4242
4242
|
try {
|
|
4243
4243
|
if (e.matches(":popover-open")) return !0;
|
|
4244
4244
|
} catch {}
|
|
@@ -4248,31 +4248,31 @@ function uo(e) {
|
|
|
4248
4248
|
return !1;
|
|
4249
4249
|
}
|
|
4250
4250
|
}
|
|
4251
|
-
var
|
|
4252
|
-
function go(e) {
|
|
4253
|
-
let t = W(e) ? K(e) : e;
|
|
4254
|
-
return mo(t.transform) || mo(t.translate) || mo(t.scale) || mo(t.rotate) || mo(t.perspective) || !vo() && (mo(t.backdropFilter) || mo(t.filter)) || fo.test(t.willChange || "") || po.test(t.contain || "");
|
|
4255
|
-
}
|
|
4251
|
+
var po = /transform|translate|scale|rotate|perspective|filter/, mo = /paint|layout|strict|content/, ho = (e) => !!e && e !== "none", go;
|
|
4256
4252
|
function _o(e) {
|
|
4257
|
-
let t =
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4253
|
+
let t = G(e) ? K(e) : e;
|
|
4254
|
+
return ho(t.transform) || ho(t.translate) || ho(t.scale) || ho(t.rotate) || ho(t.perspective) || !yo() && (ho(t.backdropFilter) || ho(t.filter)) || po.test(t.willChange || "") || mo.test(t.contain || "");
|
|
4255
|
+
}
|
|
4256
|
+
function vo(e) {
|
|
4257
|
+
let t = So(e);
|
|
4258
|
+
for (; so(t) && !bo(t);) {
|
|
4259
|
+
if (_o(t)) return t;
|
|
4260
|
+
if (fo(t)) return null;
|
|
4261
|
+
t = So(t);
|
|
4262
4262
|
}
|
|
4263
4263
|
return null;
|
|
4264
4264
|
}
|
|
4265
|
-
function
|
|
4266
|
-
return
|
|
4265
|
+
function yo() {
|
|
4266
|
+
return go ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), go;
|
|
4267
4267
|
}
|
|
4268
|
-
function
|
|
4268
|
+
function bo(e) {
|
|
4269
4269
|
return /^(html|body|#document)$/.test(ao(e));
|
|
4270
4270
|
}
|
|
4271
4271
|
function K(e) {
|
|
4272
|
-
return
|
|
4272
|
+
return U(e).getComputedStyle(e);
|
|
4273
4273
|
}
|
|
4274
|
-
function
|
|
4275
|
-
return
|
|
4274
|
+
function xo(e) {
|
|
4275
|
+
return G(e) ? {
|
|
4276
4276
|
scrollLeft: e.scrollLeft,
|
|
4277
4277
|
scrollTop: e.scrollTop
|
|
4278
4278
|
} : {
|
|
@@ -4280,69 +4280,69 @@ function bo(e) {
|
|
|
4280
4280
|
scrollTop: e.scrollY
|
|
4281
4281
|
};
|
|
4282
4282
|
}
|
|
4283
|
-
function
|
|
4283
|
+
function So(e) {
|
|
4284
4284
|
if (ao(e) === "html") return e;
|
|
4285
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
4286
|
-
return
|
|
4285
|
+
let t = e.assignedSlot || e.parentNode || co(e) && e.host || W(e);
|
|
4286
|
+
return co(t) ? t.host : t;
|
|
4287
4287
|
}
|
|
4288
|
-
function
|
|
4289
|
-
let t =
|
|
4290
|
-
return
|
|
4288
|
+
function Co(e) {
|
|
4289
|
+
let t = So(e);
|
|
4290
|
+
return bo(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : so(t) && lo(t) ? t : Co(t);
|
|
4291
4291
|
}
|
|
4292
|
-
function
|
|
4292
|
+
function wo(e, t, n) {
|
|
4293
4293
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
4294
|
-
let r =
|
|
4294
|
+
let r = Co(e), i = r === e.ownerDocument?.body, a = U(r);
|
|
4295
4295
|
if (i) {
|
|
4296
|
-
let e =
|
|
4297
|
-
return t.concat(a, a.visualViewport || [],
|
|
4298
|
-
} else return t.concat(r,
|
|
4296
|
+
let e = To(a);
|
|
4297
|
+
return t.concat(a, a.visualViewport || [], lo(r) ? r : [], e && n ? wo(e) : []);
|
|
4298
|
+
} else return t.concat(r, wo(r, [], n));
|
|
4299
4299
|
}
|
|
4300
|
-
function
|
|
4300
|
+
function To(e) {
|
|
4301
4301
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
4302
4302
|
}
|
|
4303
4303
|
//#endregion
|
|
4304
4304
|
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
4305
|
-
function
|
|
4306
|
-
let t = K(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i =
|
|
4305
|
+
function Eo(e) {
|
|
4306
|
+
let t = K(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = so(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Da(n) !== a || Da(r) !== o;
|
|
4307
4307
|
return s && (n = a, r = o), {
|
|
4308
4308
|
width: n,
|
|
4309
4309
|
height: r,
|
|
4310
4310
|
$: s
|
|
4311
4311
|
};
|
|
4312
4312
|
}
|
|
4313
|
-
function Eo(e) {
|
|
4314
|
-
return W(e) ? e : e.contextElement;
|
|
4315
|
-
}
|
|
4316
4313
|
function Do(e) {
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4314
|
+
return G(e) ? e : e.contextElement;
|
|
4315
|
+
}
|
|
4316
|
+
function Oo(e) {
|
|
4317
|
+
let t = Do(e);
|
|
4318
|
+
if (!so(t)) return H(1);
|
|
4319
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Eo(t), o = (a ? Da(n.width) : n.width) / r, s = (a ? Da(n.height) : n.height) / i;
|
|
4320
4320
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
4321
4321
|
x: o,
|
|
4322
4322
|
y: s
|
|
4323
4323
|
};
|
|
4324
4324
|
}
|
|
4325
|
-
var
|
|
4326
|
-
function
|
|
4327
|
-
let t =
|
|
4328
|
-
return !
|
|
4325
|
+
var ko = /* @__PURE__ */ H(0);
|
|
4326
|
+
function Ao(e) {
|
|
4327
|
+
let t = U(e);
|
|
4328
|
+
return !yo() || !t.visualViewport ? ko : {
|
|
4329
4329
|
x: t.visualViewport.offsetLeft,
|
|
4330
4330
|
y: t.visualViewport.offsetTop
|
|
4331
4331
|
};
|
|
4332
4332
|
}
|
|
4333
|
-
function
|
|
4334
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
4333
|
+
function jo(e, t, n) {
|
|
4334
|
+
return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
|
|
4335
4335
|
}
|
|
4336
|
-
function
|
|
4336
|
+
function Mo(e, t, n, r) {
|
|
4337
4337
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
4338
|
-
let i = e.getBoundingClientRect(), a =
|
|
4339
|
-
t && (r ?
|
|
4340
|
-
let s =
|
|
4338
|
+
let i = e.getBoundingClientRect(), a = Do(e), o = H(1);
|
|
4339
|
+
t && (r ? G(r) && (o = Oo(r)) : o = Oo(e));
|
|
4340
|
+
let s = jo(a, n, r) ? Ao(a) : H(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
4341
4341
|
if (a) {
|
|
4342
|
-
let e =
|
|
4342
|
+
let e = U(a), t = r && G(r) ? U(r) : r, n = e, i = To(n);
|
|
4343
4343
|
for (; i && r && t !== n;) {
|
|
4344
|
-
let e =
|
|
4345
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n =
|
|
4344
|
+
let e = Oo(i), t = i.getBoundingClientRect(), r = K(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
4345
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = U(i), i = To(n);
|
|
4346
4346
|
}
|
|
4347
4347
|
}
|
|
4348
4348
|
return Ya({
|
|
@@ -4352,29 +4352,29 @@ function jo(e, t, n, r) {
|
|
|
4352
4352
|
y: l
|
|
4353
4353
|
});
|
|
4354
4354
|
}
|
|
4355
|
-
function Mo(e, t) {
|
|
4356
|
-
let n = bo(e).scrollLeft;
|
|
4357
|
-
return t ? t.left + n : jo(U(e)).left + n;
|
|
4358
|
-
}
|
|
4359
4355
|
function No(e, t) {
|
|
4356
|
+
let n = xo(e).scrollLeft;
|
|
4357
|
+
return t ? t.left + n : Mo(W(e)).left + n;
|
|
4358
|
+
}
|
|
4359
|
+
function Po(e, t) {
|
|
4360
4360
|
let n = e.getBoundingClientRect();
|
|
4361
4361
|
return {
|
|
4362
|
-
x: n.left + t.scrollLeft -
|
|
4362
|
+
x: n.left + t.scrollLeft - No(e, n),
|
|
4363
4363
|
y: n.top + t.scrollTop
|
|
4364
4364
|
};
|
|
4365
4365
|
}
|
|
4366
|
-
function
|
|
4367
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
4366
|
+
function Fo(e) {
|
|
4367
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = W(r), s = t ? fo(t.floating) : !1;
|
|
4368
4368
|
if (r === o || s && a) return n;
|
|
4369
4369
|
let c = {
|
|
4370
4370
|
scrollLeft: 0,
|
|
4371
4371
|
scrollTop: 0
|
|
4372
|
-
}, l =
|
|
4373
|
-
if ((d || !d && !a) && ((ao(r) !== "body" ||
|
|
4374
|
-
let e =
|
|
4375
|
-
l =
|
|
4372
|
+
}, l = H(1), u = H(0), d = so(r);
|
|
4373
|
+
if ((d || !d && !a) && ((ao(r) !== "body" || lo(o)) && (c = xo(r)), d)) {
|
|
4374
|
+
let e = Mo(r);
|
|
4375
|
+
l = Oo(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
4376
4376
|
}
|
|
4377
|
-
let f = o && !d && !a ?
|
|
4377
|
+
let f = o && !d && !a ? Po(o, c) : H(0);
|
|
4378
4378
|
return {
|
|
4379
4379
|
width: n.width * l.x,
|
|
4380
4380
|
height: n.height * l.y,
|
|
@@ -4382,11 +4382,11 @@ function Po(e) {
|
|
|
4382
4382
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
4383
4383
|
};
|
|
4384
4384
|
}
|
|
4385
|
-
function
|
|
4385
|
+
function Io(e) {
|
|
4386
4386
|
return Array.from(e.getClientRects());
|
|
4387
4387
|
}
|
|
4388
|
-
function
|
|
4389
|
-
let t =
|
|
4388
|
+
function Lo(e) {
|
|
4389
|
+
let t = W(e), n = xo(e), r = e.ownerDocument.body, i = Ea(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = Ea(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + No(e), s = -n.scrollTop;
|
|
4390
4390
|
return K(r).direction === "rtl" && (o += Ea(t.clientWidth, r.clientWidth) - i), {
|
|
4391
4391
|
width: i,
|
|
4392
4392
|
height: a,
|
|
@@ -4394,19 +4394,19 @@ function Io(e) {
|
|
|
4394
4394
|
y: s
|
|
4395
4395
|
};
|
|
4396
4396
|
}
|
|
4397
|
-
var
|
|
4398
|
-
function
|
|
4399
|
-
let n =
|
|
4397
|
+
var Ro = 25;
|
|
4398
|
+
function zo(e, t) {
|
|
4399
|
+
let n = U(e), r = W(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
4400
4400
|
if (i) {
|
|
4401
4401
|
a = i.width, o = i.height;
|
|
4402
|
-
let e =
|
|
4402
|
+
let e = yo();
|
|
4403
4403
|
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
4404
4404
|
}
|
|
4405
|
-
let l =
|
|
4405
|
+
let l = No(r);
|
|
4406
4406
|
if (l <= 0) {
|
|
4407
4407
|
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
4408
|
-
o <=
|
|
4409
|
-
} else l <=
|
|
4408
|
+
o <= Ro && (a -= o);
|
|
4409
|
+
} else l <= Ro && (a += l);
|
|
4410
4410
|
return {
|
|
4411
4411
|
width: a,
|
|
4412
4412
|
height: o,
|
|
@@ -4414,8 +4414,8 @@ function Ro(e, t) {
|
|
|
4414
4414
|
y: c
|
|
4415
4415
|
};
|
|
4416
4416
|
}
|
|
4417
|
-
function
|
|
4418
|
-
let n =
|
|
4417
|
+
function Bo(e, t) {
|
|
4418
|
+
let n = Mo(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = so(e) ? Oo(e) : H(1);
|
|
4419
4419
|
return {
|
|
4420
4420
|
width: e.clientWidth * a.x,
|
|
4421
4421
|
height: e.clientHeight * a.y,
|
|
@@ -4423,13 +4423,13 @@ function zo(e, t) {
|
|
|
4423
4423
|
y: r * a.y
|
|
4424
4424
|
};
|
|
4425
4425
|
}
|
|
4426
|
-
function
|
|
4426
|
+
function Vo(e, t, n) {
|
|
4427
4427
|
let r;
|
|
4428
|
-
if (t === "viewport") r =
|
|
4429
|
-
else if (t === "document") r =
|
|
4430
|
-
else if (
|
|
4428
|
+
if (t === "viewport") r = zo(e, n);
|
|
4429
|
+
else if (t === "document") r = Lo(W(e));
|
|
4430
|
+
else if (G(t)) r = Bo(t, n);
|
|
4431
4431
|
else {
|
|
4432
|
-
let n =
|
|
4432
|
+
let n = Ao(e);
|
|
4433
4433
|
r = {
|
|
4434
4434
|
x: t.x - n.x,
|
|
4435
4435
|
y: t.y - n.y,
|
|
@@ -4439,24 +4439,24 @@ function Bo(e, t, n) {
|
|
|
4439
4439
|
}
|
|
4440
4440
|
return Ya(r);
|
|
4441
4441
|
}
|
|
4442
|
-
function Vo(e, t) {
|
|
4443
|
-
let n = xo(e);
|
|
4444
|
-
return n === t || !W(n) || yo(n) ? !1 : K(n).position === "fixed" || Vo(n, t);
|
|
4445
|
-
}
|
|
4446
4442
|
function Ho(e, t) {
|
|
4443
|
+
let n = So(e);
|
|
4444
|
+
return n === t || !G(n) || bo(n) ? !1 : K(n).position === "fixed" || Ho(n, t);
|
|
4445
|
+
}
|
|
4446
|
+
function Uo(e, t) {
|
|
4447
4447
|
let n = t.get(e);
|
|
4448
4448
|
if (n) return n;
|
|
4449
|
-
let r =
|
|
4450
|
-
for (;
|
|
4451
|
-
let t = K(o), n =
|
|
4452
|
-
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") ||
|
|
4449
|
+
let r = wo(e, [], !1).filter((e) => G(e) && ao(e) !== "body"), i = null, a = K(e).position === "fixed", o = a ? So(e) : e;
|
|
4450
|
+
for (; G(o) && !bo(o);) {
|
|
4451
|
+
let t = K(o), n = _o(o);
|
|
4452
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || lo(o) && !n && Ho(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = So(o);
|
|
4453
4453
|
}
|
|
4454
4454
|
return t.set(e, r), r;
|
|
4455
4455
|
}
|
|
4456
|
-
function
|
|
4457
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
4456
|
+
function Wo(e) {
|
|
4457
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? fo(t) ? [] : Uo(t, this._c) : [].concat(n), r], o = Vo(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
4458
4458
|
for (let e = 1; e < a.length; e++) {
|
|
4459
|
-
let n =
|
|
4459
|
+
let n = Vo(t, a[e], i);
|
|
4460
4460
|
s = Ea(n.top, s), c = Ta(n.right, c), l = Ta(n.bottom, l), u = Ea(n.left, u);
|
|
4461
4461
|
}
|
|
4462
4462
|
return {
|
|
@@ -4466,27 +4466,27 @@ function Uo(e) {
|
|
|
4466
4466
|
y: s
|
|
4467
4467
|
};
|
|
4468
4468
|
}
|
|
4469
|
-
function
|
|
4470
|
-
let { width: t, height: n } =
|
|
4469
|
+
function Go(e) {
|
|
4470
|
+
let { width: t, height: n } = Eo(e);
|
|
4471
4471
|
return {
|
|
4472
4472
|
width: t,
|
|
4473
4473
|
height: n
|
|
4474
4474
|
};
|
|
4475
4475
|
}
|
|
4476
|
-
function
|
|
4477
|
-
let r =
|
|
4476
|
+
function Ko(e, t, n) {
|
|
4477
|
+
let r = so(t), i = W(t), a = n === "fixed", o = Mo(e, !0, a, t), s = {
|
|
4478
4478
|
scrollLeft: 0,
|
|
4479
4479
|
scrollTop: 0
|
|
4480
|
-
}, c =
|
|
4480
|
+
}, c = H(0);
|
|
4481
4481
|
function l() {
|
|
4482
|
-
c.x =
|
|
4482
|
+
c.x = No(i);
|
|
4483
4483
|
}
|
|
4484
|
-
if (r || !r && !a) if ((ao(t) !== "body" ||
|
|
4485
|
-
let e =
|
|
4484
|
+
if (r || !r && !a) if ((ao(t) !== "body" || lo(i)) && (s = xo(t)), r) {
|
|
4485
|
+
let e = Mo(t, !0, a, t);
|
|
4486
4486
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
4487
4487
|
} else i && l();
|
|
4488
4488
|
a && !r && i && l();
|
|
4489
|
-
let u = i && !r && !a ?
|
|
4489
|
+
let u = i && !r && !a ? Po(i, s) : H(0);
|
|
4490
4490
|
return {
|
|
4491
4491
|
x: o.left + s.scrollLeft - c.x - u.x,
|
|
4492
4492
|
y: o.top + s.scrollTop - c.y - u.y,
|
|
@@ -4494,34 +4494,34 @@ function Go(e, t, n) {
|
|
|
4494
4494
|
height: o.height
|
|
4495
4495
|
};
|
|
4496
4496
|
}
|
|
4497
|
-
function
|
|
4497
|
+
function qo(e) {
|
|
4498
4498
|
return K(e).position === "static";
|
|
4499
4499
|
}
|
|
4500
|
-
function
|
|
4501
|
-
if (!
|
|
4500
|
+
function Jo(e, t) {
|
|
4501
|
+
if (!so(e) || K(e).position === "fixed") return null;
|
|
4502
4502
|
if (t) return t(e);
|
|
4503
4503
|
let n = e.offsetParent;
|
|
4504
|
-
return
|
|
4504
|
+
return W(e) === n && (n = n.ownerDocument.body), n;
|
|
4505
4505
|
}
|
|
4506
|
-
function
|
|
4507
|
-
let n =
|
|
4508
|
-
if (
|
|
4509
|
-
if (!
|
|
4510
|
-
let t =
|
|
4511
|
-
for (; t && !
|
|
4512
|
-
if (
|
|
4513
|
-
t =
|
|
4506
|
+
function Yo(e, t) {
|
|
4507
|
+
let n = U(e);
|
|
4508
|
+
if (fo(e)) return n;
|
|
4509
|
+
if (!so(e)) {
|
|
4510
|
+
let t = So(e);
|
|
4511
|
+
for (; t && !bo(t);) {
|
|
4512
|
+
if (G(t) && !qo(t)) return t;
|
|
4513
|
+
t = So(t);
|
|
4514
4514
|
}
|
|
4515
4515
|
return n;
|
|
4516
4516
|
}
|
|
4517
|
-
let r =
|
|
4518
|
-
for (; r &&
|
|
4519
|
-
return r &&
|
|
4517
|
+
let r = Jo(e, t);
|
|
4518
|
+
for (; r && uo(r) && qo(r);) r = Jo(r, t);
|
|
4519
|
+
return r && bo(r) && qo(r) && !_o(r) ? n : r || vo(e) || n;
|
|
4520
4520
|
}
|
|
4521
|
-
var
|
|
4522
|
-
let t = this.getOffsetParent ||
|
|
4521
|
+
var Xo = async function(e) {
|
|
4522
|
+
let t = this.getOffsetParent || Yo, n = this.getDimensions, r = await n(e.floating);
|
|
4523
4523
|
return {
|
|
4524
|
-
reference:
|
|
4524
|
+
reference: Ko(e.reference, await t(e.floating), e.strategy),
|
|
4525
4525
|
floating: {
|
|
4526
4526
|
x: 0,
|
|
4527
4527
|
y: 0,
|
|
@@ -4530,26 +4530,26 @@ var Yo = async function(e) {
|
|
|
4530
4530
|
}
|
|
4531
4531
|
};
|
|
4532
4532
|
};
|
|
4533
|
-
function
|
|
4533
|
+
function Zo(e) {
|
|
4534
4534
|
return K(e).direction === "rtl";
|
|
4535
4535
|
}
|
|
4536
|
-
var
|
|
4537
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
4538
|
-
getDocumentElement:
|
|
4539
|
-
getClippingRect:
|
|
4540
|
-
getOffsetParent:
|
|
4541
|
-
getElementRects:
|
|
4542
|
-
getClientRects:
|
|
4543
|
-
getDimensions:
|
|
4544
|
-
getScale:
|
|
4545
|
-
isElement:
|
|
4546
|
-
isRTL:
|
|
4536
|
+
var Qo = {
|
|
4537
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Fo,
|
|
4538
|
+
getDocumentElement: W,
|
|
4539
|
+
getClippingRect: Wo,
|
|
4540
|
+
getOffsetParent: Yo,
|
|
4541
|
+
getElementRects: Xo,
|
|
4542
|
+
getClientRects: Io,
|
|
4543
|
+
getDimensions: Go,
|
|
4544
|
+
getScale: Oo,
|
|
4545
|
+
isElement: G,
|
|
4546
|
+
isRTL: Zo
|
|
4547
4547
|
};
|
|
4548
|
-
function
|
|
4548
|
+
function $o(e, t) {
|
|
4549
4549
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
4550
4550
|
}
|
|
4551
|
-
function
|
|
4552
|
-
let n = null, r, i =
|
|
4551
|
+
function es(e, t) {
|
|
4552
|
+
let n = null, r, i = W(e);
|
|
4553
4553
|
function a() {
|
|
4554
4554
|
var e;
|
|
4555
4555
|
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
@@ -4570,7 +4570,7 @@ function $o(e, t) {
|
|
|
4570
4570
|
o(!1, 1e-7);
|
|
4571
4571
|
}, 1e3);
|
|
4572
4572
|
}
|
|
4573
|
-
n === 1 &&
|
|
4573
|
+
n === 1 && !$o(l, e.getBoundingClientRect()) && o(), y = !1;
|
|
4574
4574
|
}
|
|
4575
4575
|
try {
|
|
4576
4576
|
n = new IntersectionObserver(b, {
|
|
@@ -4584,13 +4584,13 @@ function $o(e, t) {
|
|
|
4584
4584
|
}
|
|
4585
4585
|
return o(!0), a;
|
|
4586
4586
|
}
|
|
4587
|
-
function
|
|
4587
|
+
function ts(e, t, n, r) {
|
|
4588
4588
|
r === void 0 && (r = {});
|
|
4589
|
-
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l =
|
|
4589
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Do(e), u = i || a ? [...l ? wo(l) : [], ...t ? wo(t) : []] : [];
|
|
4590
4590
|
u.forEach((e) => {
|
|
4591
4591
|
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
4592
4592
|
});
|
|
4593
|
-
let d = l && s ?
|
|
4593
|
+
let d = l && s ? es(l, n) : null, f = -1, p = null;
|
|
4594
4594
|
o && (p = new ResizeObserver((e) => {
|
|
4595
4595
|
let [r] = e;
|
|
4596
4596
|
r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -4598,11 +4598,11 @@ function es(e, t, n, r) {
|
|
|
4598
4598
|
(e = p) == null || e.observe(t);
|
|
4599
4599
|
})), n();
|
|
4600
4600
|
}), l && !c && p.observe(l), t && p.observe(t));
|
|
4601
|
-
let m, h = c ?
|
|
4601
|
+
let m, h = c ? Mo(e) : null;
|
|
4602
4602
|
c && g();
|
|
4603
4603
|
function g() {
|
|
4604
|
-
let t =
|
|
4605
|
-
h &&
|
|
4604
|
+
let t = Mo(e);
|
|
4605
|
+
h && !$o(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
4606
4606
|
}
|
|
4607
4607
|
return n(), () => {
|
|
4608
4608
|
var e;
|
|
@@ -4611,9 +4611,9 @@ function es(e, t, n, r) {
|
|
|
4611
4611
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
4612
4612
|
};
|
|
4613
4613
|
}
|
|
4614
|
-
var
|
|
4614
|
+
var ns = ro, rs = eo, is = (e, t, n) => {
|
|
4615
4615
|
let r = /* @__PURE__ */ new Map(), i = {
|
|
4616
|
-
platform:
|
|
4616
|
+
platform: Qo,
|
|
4617
4617
|
...n
|
|
4618
4618
|
}, a = {
|
|
4619
4619
|
...i.platform,
|
|
@@ -4623,29 +4623,30 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4623
4623
|
...i,
|
|
4624
4624
|
platform: a
|
|
4625
4625
|
});
|
|
4626
|
-
},
|
|
4627
|
-
|
|
4628
|
-
},
|
|
4629
|
-
let t =
|
|
4630
|
-
t && (t(),
|
|
4631
|
-
},
|
|
4632
|
-
let
|
|
4633
|
-
if (t && t.length > 0 &&
|
|
4626
|
+
}, as = /* @__PURE__ */ new WeakMap(), os = (e, t) => {
|
|
4627
|
+
ss(e), as.set(e, t);
|
|
4628
|
+
}, ss = (e) => {
|
|
4629
|
+
let t = as.get(e);
|
|
4630
|
+
t && (t(), as.delete(e));
|
|
4631
|
+
}, cs = ({ element: e, activeActions: t, getGridItemById: n, placementItemActionsMenu: r, renderOverlayContent: i, removeItemActionsMenuPopover: a, itemActionsDocumentPopover: o = !0 }) => {
|
|
4632
|
+
let s = e.querySelector(".grid-item-actions-popover"), c = e.querySelector(".grid-stack-item-content"), l = n(e.getAttribute("gs-id") ?? "");
|
|
4633
|
+
if (t && t.length > 0 && s && (a(e), s = null), !s) {
|
|
4634
4634
|
let n = document.createDocumentFragment();
|
|
4635
|
-
|
|
4635
|
+
y(i(l?.item, t), n), s = n.querySelector(".grid-item-actions-popover"), e.append(s);
|
|
4636
4636
|
}
|
|
4637
|
-
let
|
|
4638
|
-
let { x: e, y: t } = await
|
|
4639
|
-
placement:
|
|
4640
|
-
|
|
4637
|
+
let u = o ? "absolute" : "fixed", d = ts(c, s, async () => {
|
|
4638
|
+
let { x: e, y: t } = await is(c, s, {
|
|
4639
|
+
placement: l?.item?.placementActionsMenu ?? r ?? "right-start",
|
|
4640
|
+
strategy: u,
|
|
4641
|
+
middleware: [ns(0), rs({ crossAxis: !1 })]
|
|
4641
4642
|
});
|
|
4642
|
-
|
|
4643
|
+
s.style.left = `${e}px`, s.style.top = `${t}px`, o || (s.style.position = "fixed", s.style.right = "auto", s.style.bottom = "auto", s.style.margin = "0");
|
|
4643
4644
|
});
|
|
4644
|
-
|
|
4645
|
-
},
|
|
4645
|
+
os(s, d), o && s.isConnected && !s.matches(":popover-open") && s.showPopover();
|
|
4646
|
+
}, ls = (e) => {
|
|
4646
4647
|
let t = e.querySelector(".grid-item-actions-popover");
|
|
4647
|
-
t && (
|
|
4648
|
-
},
|
|
4648
|
+
t && (ss(t), t.hasAttribute("popover") && t.matches(":popover-open") && t.hidePopover(), t.remove());
|
|
4649
|
+
}, us = (e) => e === "ArrowLeft" || e === "ArrowRight" || e === "ArrowUp" || e === "ArrowDown", ds = ({ key: e, node: t, maxColumns: n, shiftKey: r, ctrlKey: i, metaKey: a }) => {
|
|
4649
4650
|
let o = {
|
|
4650
4651
|
ArrowLeft: {
|
|
4651
4652
|
move: { x: t.x - 1 },
|
|
@@ -4695,7 +4696,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4695
4696
|
if (r && o.canResize) return o.resize;
|
|
4696
4697
|
if ((i || a) && o.canShrink) return o.shrink;
|
|
4697
4698
|
if (o.canMove) return o.move;
|
|
4698
|
-
},
|
|
4699
|
+
}, fs = ({ event: e, viewMode: t, focusedItemElement: n, activeItemElement: r, gridElement: i, grid: a, columns: o, onDeleteRequest: s, removeItemActionsMenuPopover: c, createItemActionsMenuPopover: l }) => {
|
|
4699
4700
|
if (t) return {
|
|
4700
4701
|
focusedItemElement: n,
|
|
4701
4702
|
activeItemElement: r
|
|
@@ -4711,14 +4712,14 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4711
4712
|
let e = n.querySelector("luzmo-item-grid-item-actions-menu");
|
|
4712
4713
|
e && e.focus();
|
|
4713
4714
|
});
|
|
4714
|
-
else if (n && a &&
|
|
4715
|
+
else if (n && a && us(e.key)) {
|
|
4715
4716
|
e.preventDefault(), e.stopPropagation();
|
|
4716
4717
|
let t = n.gridstackNode;
|
|
4717
4718
|
if (!t) return {
|
|
4718
4719
|
focusedItemElement: u,
|
|
4719
4720
|
activeItemElement: d
|
|
4720
4721
|
};
|
|
4721
|
-
let r =
|
|
4722
|
+
let r = ds({
|
|
4722
4723
|
key: e.key,
|
|
4723
4724
|
node: t,
|
|
4724
4725
|
maxColumns: o,
|
|
@@ -4732,7 +4733,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4732
4733
|
focusedItemElement: u,
|
|
4733
4734
|
activeItemElement: d
|
|
4734
4735
|
};
|
|
4735
|
-
},
|
|
4736
|
+
}, ps = {
|
|
4736
4737
|
lock: {
|
|
4737
4738
|
icon: d,
|
|
4738
4739
|
label: "Lock",
|
|
@@ -4782,37 +4783,37 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4782
4783
|
action: "delete",
|
|
4783
4784
|
type: "button"
|
|
4784
4785
|
}
|
|
4785
|
-
},
|
|
4786
|
+
}, ms = (e) => {
|
|
4786
4787
|
if (e) return structuredClone(e).map((e) => {
|
|
4787
4788
|
if (e.type === "group") return e.actions = e.actions ?? [], e.actions = e.actions.map((e) => {
|
|
4788
|
-
if (typeof e == "string" && Object.hasOwn(
|
|
4789
|
+
if (typeof e == "string" && Object.hasOwn(ps, e)) return { ...ps[e] };
|
|
4789
4790
|
if (typeof e == "object") return e.icon = e.icon ?? s, e.label = e.label ?? e.action, e.tooltip = e.tooltip ?? e.label ?? e.action, e.type = ["toggle", "button"].includes(e.type ?? "") ? e.type : "button", e;
|
|
4790
4791
|
}).filter(Boolean), e;
|
|
4791
4792
|
}).filter(Boolean);
|
|
4792
|
-
},
|
|
4793
|
+
}, hs = () => [{
|
|
4793
4794
|
type: "group",
|
|
4794
4795
|
actions: [
|
|
4795
|
-
{ ...
|
|
4796
|
-
{ ...
|
|
4797
|
-
{ ...
|
|
4796
|
+
{ ...ps["edit-data"] },
|
|
4797
|
+
{ ...ps["item-options"] },
|
|
4798
|
+
{ ...ps.clone }
|
|
4798
4799
|
]
|
|
4799
4800
|
}, {
|
|
4800
4801
|
type: "group",
|
|
4801
|
-
actions: [{ ...
|
|
4802
|
-
}],
|
|
4802
|
+
actions: [{ ...ps.delete }]
|
|
4803
|
+
}], gs = 16, _s = 10, vs = (e, t) => t >= 1 ? `rgba(${e.r},${e.g},${e.b},1)` : t <= 0 ? `rgba(${e.r},${e.g},${e.b},0)` : `rgba(${e.r},${e.g},${e.b},${t})`, ys = async ({ theme: e, currentTheme: t }) => e?.type === "custom" ? structuredClone(e) : e?.id && r.includes(e.id) && t?.id !== e.id ? {
|
|
4803
4804
|
...await i(e.id),
|
|
4804
4805
|
id: e.id
|
|
4805
|
-
} : e?.id && t?.id !== e.id || !e && t ? t : await i("default"),
|
|
4806
|
+
} : e?.id && t?.id !== e.id || !e && t ? t : await i("default"), bs = (e) => [(e?.margins?.[0] ?? gs) / 2, (e?.margins?.[1] ?? gs) / 2], xs = (e) => _s - (e?.margins?.[0] ?? _s), Ss = (e) => {
|
|
4806
4807
|
let t = e?.boxShadow;
|
|
4807
4808
|
if (!t) return "";
|
|
4808
4809
|
let r = new n(t.color), i = {
|
|
4809
4810
|
r: Math.round(r.srgb.r * 255),
|
|
4810
4811
|
g: Math.round(r.srgb.g * 255),
|
|
4811
4812
|
b: Math.round(r.srgb.b * 255)
|
|
4812
|
-
}, a = e?.margins?.[0] ??
|
|
4813
|
-
return t.size === "none" ? "none" : t.size === "S" ? `0 ${o * 2}px ${o * 4}px ${
|
|
4814
|
-
},
|
|
4815
|
-
let t =
|
|
4813
|
+
}, a = e?.margins?.[0] ?? gs, o = Math.min(a / 10, 2);
|
|
4814
|
+
return t.size === "none" ? "none" : t.size === "S" ? `0 ${o * 2}px ${o * 4}px ${vs(i, .16)}, 0 ${o * 2}px ${o * 4}px ${vs(i, .23)}` : t.size === "M" ? `0 ${o * 8}px ${o * 16}px ${vs(i, .19)}, 0 ${o * 4}px ${o * 4}px ${vs(i, .23)}` : t.size === "L" ? `0 ${o * 12}px ${o * 24}px ${vs(i, .25)}, 0 ${o * 8}px ${o * 8}px ${vs(i, .22)}` : "";
|
|
4815
|
+
}, Cs = (e) => {
|
|
4816
|
+
let t = Ss(e);
|
|
4816
4817
|
return new Map([
|
|
4817
4818
|
["--grid-font-family", e?.font?.fontFamily],
|
|
4818
4819
|
["--grid-background", e?.background],
|
|
@@ -4827,15 +4828,15 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4827
4828
|
["--grid-item-border-bottom-width", e?.borders?.["border-bottom-width"]],
|
|
4828
4829
|
["--grid-item-border-left-width", e?.borders?.["border-left-width"]]
|
|
4829
4830
|
]);
|
|
4830
|
-
},
|
|
4831
|
+
}, ws = (e) => {
|
|
4831
4832
|
let t = e?.itemsBackground ?? e?.background;
|
|
4832
4833
|
return t ? new n(t).luminance < .5 : !1;
|
|
4833
|
-
},
|
|
4834
|
-
t &&
|
|
4834
|
+
}, Ts = (e, t) => {
|
|
4835
|
+
t && Cs(t).forEach((t, n) => {
|
|
4835
4836
|
t ? e.setProperty(n, t) : e.removeProperty(n);
|
|
4836
4837
|
});
|
|
4837
|
-
},
|
|
4838
|
-
let r =
|
|
4838
|
+
}, Es = ({ item: e, defaultItemActionsMenu: t, activeActions: n }) => {
|
|
4839
|
+
let r = ms(e?.actionsMenu) ?? ms(t) ?? hs();
|
|
4839
4840
|
if (!a.find((t) => t.type === e?.type)?.containsData && !e?.actionsMenu && !t && (r = r.map((e) => ({
|
|
4840
4841
|
...e,
|
|
4841
4842
|
actions: e.actions?.filter((e) => e.action !== "edit-data")
|
|
@@ -4850,21 +4851,24 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4850
4851
|
}));
|
|
4851
4852
|
}
|
|
4852
4853
|
return r;
|
|
4853
|
-
},
|
|
4854
|
-
|
|
4854
|
+
}, Ds = ({ item: e, activeActions: t, defaultItemActionsMenu: n, placementItemActionsMenu: r, language: i, handleAction: a, itemActionsDocumentPopover: o = !0 }) => {
|
|
4855
|
+
let s = Es({
|
|
4856
|
+
item: e,
|
|
4857
|
+
defaultItemActionsMenu: n,
|
|
4858
|
+
activeActions: t
|
|
4859
|
+
});
|
|
4860
|
+
return _`
|
|
4861
|
+
<div class="grid-item-actions-popover" popover=${o ? "manual" : v}>
|
|
4855
4862
|
<luzmo-item-grid-item-actions-menu
|
|
4856
|
-
.actions=${
|
|
4857
|
-
item: e,
|
|
4858
|
-
defaultItemActionsMenu: n,
|
|
4859
|
-
activeActions: t
|
|
4860
|
-
})}
|
|
4863
|
+
.actions=${s}
|
|
4861
4864
|
placement=${e?.placementActionsMenu ?? r ?? "right-start"}
|
|
4862
4865
|
.language=${i}
|
|
4863
4866
|
@luzmo-item-grid-item-action=${a}
|
|
4864
4867
|
>
|
|
4865
4868
|
</luzmo-item-grid-item-actions-menu>
|
|
4866
4869
|
</div>
|
|
4867
|
-
|
|
4870
|
+
`;
|
|
4871
|
+
}, Os = ({ item: e, index: t, initialized: n, viewMode: r, contentLanguage: i, fullTheme: a, appServer: s, apiHost: c, authKey: l, authToken: u, handleMouseover: d, handleMouseout: f, handleFocus: p, handleBlur: m }) => {
|
|
4868
4872
|
let h = {
|
|
4869
4873
|
...e.options,
|
|
4870
4874
|
locale: i
|
|
@@ -4912,7 +4916,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4912
4916
|
</div>
|
|
4913
4917
|
</div>
|
|
4914
4918
|
`;
|
|
4915
|
-
},
|
|
4919
|
+
}, ks = ({ items: e, initialized: t, viewMode: n, contentLanguage: r, fullTheme: i, appServer: a, apiHost: o, authKey: s, authToken: c, renderItem: l }) => re(e, (e) => e.id, (e, u) => ie([
|
|
4916
4920
|
e,
|
|
4917
4921
|
t,
|
|
4918
4922
|
n,
|
|
@@ -4922,11 +4926,11 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4922
4926
|
o,
|
|
4923
4927
|
s,
|
|
4924
4928
|
c
|
|
4925
|
-
], () => l(e, u))),
|
|
4929
|
+
], () => l(e, u))), As = ({ items: e, initialized: t, viewMode: n, contentLanguage: r, fullTheme: i, appServer: a, apiHost: o, authKey: s, authToken: c, columns: l, ensureGridItemId: u, handleMouseover: d, handleMouseout: f, handleFocus: p, handleBlur: m }) => {
|
|
4926
4930
|
e.forEach((e) => {
|
|
4927
4931
|
u(e);
|
|
4928
4932
|
});
|
|
4929
|
-
let h =
|
|
4933
|
+
let h = ks({
|
|
4930
4934
|
items: e,
|
|
4931
4935
|
initialized: t,
|
|
4932
4936
|
viewMode: n,
|
|
@@ -4936,7 +4940,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4936
4940
|
apiHost: o,
|
|
4937
4941
|
authKey: s,
|
|
4938
4942
|
authToken: c,
|
|
4939
|
-
renderItem: (e, l) =>
|
|
4943
|
+
renderItem: (e, l) => Os({
|
|
4940
4944
|
item: e,
|
|
4941
4945
|
index: l,
|
|
4942
4946
|
initialized: t,
|
|
@@ -4955,7 +4959,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
4955
4959
|
});
|
|
4956
4960
|
return _`
|
|
4957
4961
|
<div
|
|
4958
|
-
?dark-background=${t ?
|
|
4962
|
+
?dark-background=${t ? ws(i) : !1}
|
|
4959
4963
|
class="grid-stack"
|
|
4960
4964
|
data-grid-columns=${l}
|
|
4961
4965
|
role="grid"
|
|
@@ -5215,7 +5219,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
5215
5219
|
static canBeRotated(e) {
|
|
5216
5220
|
return !(!e || e.w === e.h || e.locked || e.noResize || e.grid?.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
|
|
5217
5221
|
}
|
|
5218
|
-
},
|
|
5222
|
+
}, js = class e {
|
|
5219
5223
|
constructor(e = {}) {
|
|
5220
5224
|
this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
|
|
5221
5225
|
}
|
|
@@ -5615,7 +5619,7 @@ var ts = ro, ns = eo, rs = (e, t, n) => {
|
|
|
5615
5619
|
return this;
|
|
5616
5620
|
}
|
|
5617
5621
|
};
|
|
5618
|
-
|
|
5622
|
+
js._idSeq = 0;
|
|
5619
5623
|
//#endregion
|
|
5620
5624
|
//#region node_modules/gridstack/dist/types.js
|
|
5621
5625
|
var J = {
|
|
@@ -5646,38 +5650,38 @@ var J = {
|
|
|
5646
5650
|
resizable: { handles: "se" },
|
|
5647
5651
|
rtl: "auto"
|
|
5648
5652
|
}, Y = class {}, X = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0), Z = class {};
|
|
5649
|
-
function
|
|
5653
|
+
function Ms(e, t) {
|
|
5650
5654
|
e.touches.length > 1 || (e.cancelable && e.preventDefault(), q.simulateMouseEvent(e.changedTouches[0], t));
|
|
5651
5655
|
}
|
|
5652
|
-
function
|
|
5656
|
+
function Ns(e, t) {
|
|
5653
5657
|
e.cancelable && e.preventDefault(), q.simulateMouseEvent(e, t);
|
|
5654
5658
|
}
|
|
5655
|
-
function Ns(e) {
|
|
5656
|
-
Z.touchHandled || (Z.touchHandled = !0, js(e, "mousedown"));
|
|
5657
|
-
}
|
|
5658
5659
|
function Ps(e) {
|
|
5659
|
-
Z.touchHandled
|
|
5660
|
+
Z.touchHandled || (Z.touchHandled = !0, Ms(e, "mousedown"));
|
|
5660
5661
|
}
|
|
5661
5662
|
function Fs(e) {
|
|
5663
|
+
Z.touchHandled && Ms(e, "mousemove");
|
|
5664
|
+
}
|
|
5665
|
+
function Is(e) {
|
|
5662
5666
|
if (!Z.touchHandled) return;
|
|
5663
5667
|
Z.pointerLeaveTimeout && (window.clearTimeout(Z.pointerLeaveTimeout), delete Z.pointerLeaveTimeout);
|
|
5664
5668
|
let t = !!Y.dragElement;
|
|
5665
|
-
|
|
5666
|
-
}
|
|
5667
|
-
function Is(e) {
|
|
5668
|
-
e.pointerType !== "mouse" && e.target.releasePointerCapture(e.pointerId);
|
|
5669
|
+
Ms(e, "mouseup"), t || Ms(e, "click"), Z.touchHandled = !1;
|
|
5669
5670
|
}
|
|
5670
5671
|
function Ls(e) {
|
|
5671
|
-
|
|
5672
|
+
e.pointerType !== "mouse" && e.target.releasePointerCapture(e.pointerId);
|
|
5672
5673
|
}
|
|
5673
5674
|
function Rs(e) {
|
|
5675
|
+
Y.dragElement && e.pointerType !== "mouse" && Ns(e, "mouseenter");
|
|
5676
|
+
}
|
|
5677
|
+
function zs(e) {
|
|
5674
5678
|
Y.dragElement && e.pointerType !== "mouse" && (Z.pointerLeaveTimeout = window.setTimeout(() => {
|
|
5675
|
-
delete Z.pointerLeaveTimeout,
|
|
5679
|
+
delete Z.pointerLeaveTimeout, Ns(e, "mouseleave");
|
|
5676
5680
|
}, 10));
|
|
5677
5681
|
}
|
|
5678
5682
|
//#endregion
|
|
5679
5683
|
//#region node_modules/gridstack/dist/dd-resizable-handle.js
|
|
5680
|
-
var
|
|
5684
|
+
var Bs = class e {
|
|
5681
5685
|
constructor(e, t, n) {
|
|
5682
5686
|
this.host = e, this.dir = t, this.option = n, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
|
|
5683
5687
|
}
|
|
@@ -5687,23 +5691,23 @@ var zs = class e {
|
|
|
5687
5691
|
} catch (e) {
|
|
5688
5692
|
this.option.element = void 0, console.error("Query for resizeable handle failed, falling back", e);
|
|
5689
5693
|
}
|
|
5690
|
-
return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${e.prefix}${this.dir}`), this.el.style.zIndex = "100", this.el.style.userSelect = "none", this.el.addEventListener("mousedown", this._mouseDown), X && (this.el.addEventListener("touchstart",
|
|
5694
|
+
return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${e.prefix}${this.dir}`), this.el.style.zIndex = "100", this.el.style.userSelect = "none", this.el.addEventListener("mousedown", this._mouseDown), X && (this.el.addEventListener("touchstart", Ps), this.el.addEventListener("pointerdown", Ls)), this;
|
|
5691
5695
|
}
|
|
5692
5696
|
destroy() {
|
|
5693
|
-
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), X && (this.el.removeEventListener("touchstart",
|
|
5697
|
+
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), X && (this.el.removeEventListener("touchstart", Ps), this.el.removeEventListener("pointerdown", Ls)), this.option.element || this.host.removeChild(this.el), delete this.el, delete this.host, this;
|
|
5694
5698
|
}
|
|
5695
5699
|
_mouseDown(e) {
|
|
5696
5700
|
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, {
|
|
5697
5701
|
capture: !0,
|
|
5698
5702
|
passive: !0
|
|
5699
|
-
}), document.addEventListener("mouseup", this._mouseUp, !0), X && (this.el.addEventListener("touchmove",
|
|
5703
|
+
}), document.addEventListener("mouseup", this._mouseUp, !0), X && (this.el.addEventListener("touchmove", Fs), this.el.addEventListener("touchend", Is)), e.stopPropagation(), e.preventDefault();
|
|
5700
5704
|
}
|
|
5701
5705
|
_mouseMove(e) {
|
|
5702
5706
|
let t = this.mouseDownEvent;
|
|
5703
5707
|
this.moving ? this._triggerEvent("move", e) : Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 2 && (this.moving = !0, this._triggerEvent("start", this.mouseDownEvent), this._triggerEvent("move", e), document.addEventListener("keydown", this._keyEvent)), e.stopPropagation();
|
|
5704
5708
|
}
|
|
5705
5709
|
_mouseUp(e) {
|
|
5706
|
-
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), X && (this.el.removeEventListener("touchmove",
|
|
5710
|
+
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), X && (this.el.removeEventListener("touchmove", Fs), this.el.removeEventListener("touchend", Is)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
|
|
5707
5711
|
}
|
|
5708
5712
|
_keyEvent(e) {
|
|
5709
5713
|
e.key === "Escape" && (this.host.gridstackNode?.grid?.engine.restoreInitial(), this._mouseUp(this.mouseDownEvent));
|
|
@@ -5712,10 +5716,10 @@ var zs = class e {
|
|
|
5712
5716
|
return this.option[e] && this.option[e](t), this;
|
|
5713
5717
|
}
|
|
5714
5718
|
};
|
|
5715
|
-
|
|
5719
|
+
Bs.prefix = "ui-resizable-";
|
|
5716
5720
|
//#endregion
|
|
5717
5721
|
//#region node_modules/gridstack/dist/dd-base-impl.js
|
|
5718
|
-
var
|
|
5722
|
+
var Vs = class {
|
|
5719
5723
|
constructor() {
|
|
5720
5724
|
this._eventRegister = {};
|
|
5721
5725
|
}
|
|
@@ -5740,7 +5744,7 @@ var Bs = class {
|
|
|
5740
5744
|
triggerEvent(e, t) {
|
|
5741
5745
|
if (!this.disabled && this._eventRegister && this._eventRegister[e]) return this._eventRegister[e](t);
|
|
5742
5746
|
}
|
|
5743
|
-
},
|
|
5747
|
+
}, Hs = class e extends Vs {
|
|
5744
5748
|
constructor(e, t = {}) {
|
|
5745
5749
|
super(), this.el = e, this.option = t, this.rectScale = {
|
|
5746
5750
|
x: 1,
|
|
@@ -5794,7 +5798,7 @@ var Bs = class {
|
|
|
5794
5798
|
Y.overResizeElement === this && (delete Y.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
|
|
5795
5799
|
}
|
|
5796
5800
|
_setupHandlers() {
|
|
5797
|
-
return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new
|
|
5801
|
+
return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new Bs(this.el, e, {
|
|
5798
5802
|
element: this.option.element,
|
|
5799
5803
|
start: (e) => this._resizeStart(e),
|
|
5800
5804
|
stop: (e) => this._resizeStop(e),
|
|
@@ -5884,7 +5888,7 @@ var Bs = class {
|
|
|
5884
5888
|
return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
|
|
5885
5889
|
}
|
|
5886
5890
|
};
|
|
5887
|
-
|
|
5891
|
+
Hs._originStyleProp = [
|
|
5888
5892
|
"width",
|
|
5889
5893
|
"height",
|
|
5890
5894
|
"position",
|
|
@@ -5896,7 +5900,7 @@ Vs._originStyleProp = [
|
|
|
5896
5900
|
];
|
|
5897
5901
|
//#endregion
|
|
5898
5902
|
//#region node_modules/gridstack/dist/dd-draggable.js
|
|
5899
|
-
var
|
|
5903
|
+
var Us = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-resizable-handle", Ws = class e extends Vs {
|
|
5900
5904
|
constructor(e, t = {}) {
|
|
5901
5905
|
super(), this.el = e, this.option = t, this.dragTransform = {
|
|
5902
5906
|
xScale: 1,
|
|
@@ -5943,12 +5947,12 @@ var Hs = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-res
|
|
|
5943
5947
|
}
|
|
5944
5948
|
enable() {
|
|
5945
5949
|
this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
|
|
5946
|
-
e.addEventListener("mousedown", this._mouseDown), X && (e.addEventListener("touchstart",
|
|
5950
|
+
e.addEventListener("mousedown", this._mouseDown), X && (e.addEventListener("touchstart", Ps), e.addEventListener("pointerdown", Ls));
|
|
5947
5951
|
}), this.el.classList.remove("ui-draggable-disabled"));
|
|
5948
5952
|
}
|
|
5949
5953
|
disable(e = !1) {
|
|
5950
5954
|
this.disabled !== !0 && (super.disable(), this.dragEls.forEach((e) => {
|
|
5951
|
-
e.removeEventListener("mousedown", this._mouseDown), X && (e.removeEventListener("touchstart",
|
|
5955
|
+
e.removeEventListener("mousedown", this._mouseDown), X && (e.removeEventListener("touchstart", Ps), e.removeEventListener("pointerdown", Ls));
|
|
5952
5956
|
}), e || this.el.classList.add("ui-draggable-disabled"));
|
|
5953
5957
|
}
|
|
5954
5958
|
destroy() {
|
|
@@ -5958,10 +5962,10 @@ var Hs = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-res
|
|
|
5958
5962
|
return Object.keys(e).forEach((t) => this.option[t] = e[t]), this;
|
|
5959
5963
|
}
|
|
5960
5964
|
_mouseDown(e) {
|
|
5961
|
-
if (Z.touchHandled && e.isTrusted && (Z.touchHandled = !1), !Y.mouseHandled) return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
5965
|
+
if (Z.touchHandled && e.isTrusted && (Z.touchHandled = !1), !Y.mouseHandled) return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Us) || this.option.cancel && e.target.closest(this.option.cancel) ? !0 : (this.mouseDownEvent = e, delete this.dragging, delete Y.dragElement, delete Y.dropElement, delete this._autoScrollMaxSpeed, delete this._autoScrollContainer, document.addEventListener("mousemove", this._mouseMove, {
|
|
5962
5966
|
capture: !0,
|
|
5963
5967
|
passive: !0
|
|
5964
|
-
}), document.addEventListener("mouseup", this._mouseUp, !0), X && (e.currentTarget.addEventListener("touchmove",
|
|
5968
|
+
}), document.addEventListener("mouseup", this._mouseUp, !0), X && (e.currentTarget.addEventListener("touchmove", Fs), e.currentTarget.addEventListener("touchend", Is)), e.preventDefault(), document.activeElement && document.activeElement.blur(), Y.mouseHandled = !0, !0);
|
|
5965
5969
|
}
|
|
5966
5970
|
_callDrag(e) {
|
|
5967
5971
|
if (!this.dragging) return;
|
|
@@ -5990,7 +5994,7 @@ var Hs = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-res
|
|
|
5990
5994
|
return !0;
|
|
5991
5995
|
}
|
|
5992
5996
|
_mouseUp(e) {
|
|
5993
|
-
if (this._stopScrolling(), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), X && e.currentTarget && (e.currentTarget.removeEventListener("touchmove",
|
|
5997
|
+
if (this._stopScrolling(), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), X && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Fs, !0), e.currentTarget.removeEventListener("touchend", Is, !0)), this.dragging) {
|
|
5994
5998
|
delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), Y.dropElement?.el === this.el.parentElement && delete Y.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
|
|
5995
5999
|
let t = q.initEvent(e, {
|
|
5996
6000
|
target: this.el,
|
|
@@ -6069,7 +6073,7 @@ var Hs = "input,textarea,button,select,option,[contenteditable=\"true\"],.ui-res
|
|
|
6069
6073
|
} };
|
|
6070
6074
|
}
|
|
6071
6075
|
};
|
|
6072
|
-
|
|
6076
|
+
Ws.originStyleProp = [
|
|
6073
6077
|
"width",
|
|
6074
6078
|
"height",
|
|
6075
6079
|
"transform",
|
|
@@ -6085,7 +6089,7 @@ Us.originStyleProp = [
|
|
|
6085
6089
|
];
|
|
6086
6090
|
//#endregion
|
|
6087
6091
|
//#region node_modules/gridstack/dist/dd-droppable.js
|
|
6088
|
-
var
|
|
6092
|
+
var Gs = class extends Vs {
|
|
6089
6093
|
constructor(e, t = {}) {
|
|
6090
6094
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
6091
6095
|
}
|
|
@@ -6096,10 +6100,10 @@ var Ws = class extends Bs {
|
|
|
6096
6100
|
super.off(e);
|
|
6097
6101
|
}
|
|
6098
6102
|
enable() {
|
|
6099
|
-
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), X && (this.el.addEventListener("pointerenter",
|
|
6103
|
+
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), X && (this.el.addEventListener("pointerenter", Rs), this.el.addEventListener("pointerleave", zs)));
|
|
6100
6104
|
}
|
|
6101
6105
|
disable(e = !1) {
|
|
6102
|
-
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), X && (this.el.removeEventListener("pointerenter",
|
|
6106
|
+
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), X && (this.el.removeEventListener("pointerenter", Rs), this.el.removeEventListener("pointerleave", zs)));
|
|
6103
6107
|
}
|
|
6104
6108
|
destroy() {
|
|
6105
6109
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -6149,7 +6153,7 @@ var Ws = class extends Bs {
|
|
|
6149
6153
|
...e.ui()
|
|
6150
6154
|
};
|
|
6151
6155
|
}
|
|
6152
|
-
},
|
|
6156
|
+
}, Ks = class e {
|
|
6153
6157
|
static init(t) {
|
|
6154
6158
|
return t.ddElement ||= new e(t), t.ddElement;
|
|
6155
6159
|
}
|
|
@@ -6187,19 +6191,19 @@ var Ws = class extends Bs {
|
|
|
6187
6191
|
].indexOf(e) > -1 && this.ddResizable.off(e), this;
|
|
6188
6192
|
}
|
|
6189
6193
|
setupDraggable(e) {
|
|
6190
|
-
return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new
|
|
6194
|
+
return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new Ws(this.el, e), this;
|
|
6191
6195
|
}
|
|
6192
6196
|
cleanDraggable() {
|
|
6193
6197
|
return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
|
|
6194
6198
|
}
|
|
6195
6199
|
setupResizable(e) {
|
|
6196
|
-
return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new
|
|
6200
|
+
return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new Hs(this.el, e), this;
|
|
6197
6201
|
}
|
|
6198
6202
|
cleanResizable() {
|
|
6199
6203
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
6200
6204
|
}
|
|
6201
6205
|
setupDroppable(e) {
|
|
6202
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
6206
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Gs(this.el, e), this;
|
|
6203
6207
|
}
|
|
6204
6208
|
cleanDroppable() {
|
|
6205
6209
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
@@ -6270,9 +6274,9 @@ var Ws = class extends Bs {
|
|
|
6270
6274
|
}
|
|
6271
6275
|
_getDDElements(e, t) {
|
|
6272
6276
|
let n = e.gridstack || t !== "destroy" && t !== "disable", r = q.getElements(e);
|
|
6273
|
-
return r.length ? r.map((e) => e.ddElement || (n ?
|
|
6277
|
+
return r.length ? r.map((e) => e.ddElement || (n ? Ks.init(e) : null)).filter((e) => e) : [];
|
|
6274
6278
|
}
|
|
6275
|
-
}(),
|
|
6279
|
+
}(), qs = class e {
|
|
6276
6280
|
static init(t = {}, n = ".grid-stack") {
|
|
6277
6281
|
if (typeof document > "u") return null;
|
|
6278
6282
|
let r = e.getGridElement(n);
|
|
@@ -6347,7 +6351,7 @@ var Ws = class extends Bs {
|
|
|
6347
6351
|
delete n.cellHeight, this.cellHeight(e);
|
|
6348
6352
|
}
|
|
6349
6353
|
n.alwaysShowResizeHandle === "mobile" && (n.alwaysShowResizeHandle = X), this._setStaticClass();
|
|
6350
|
-
let s = n.engineClass || e.engineClass ||
|
|
6354
|
+
let s = n.engineClass || e.engineClass || js;
|
|
6351
6355
|
if (this.engine = new s({
|
|
6352
6356
|
column: this.getColumn(),
|
|
6353
6357
|
float: n.float,
|
|
@@ -7120,13 +7124,13 @@ var Ws = class extends Bs {
|
|
|
7120
7124
|
r._isExternal && this.engine.cleanupNode(r), r._sidebarOrig = i, this.opts.removable === !0 && e._itemRemoving(t, !0), t._gridstackNodeOrig ? (t.gridstackNode = t._gridstackNodeOrig, delete t._gridstackNodeOrig) : r._isExternal && this.engine.restoreInitial();
|
|
7121
7125
|
}
|
|
7122
7126
|
};
|
|
7123
|
-
|
|
7127
|
+
qs.renderCB = (e, t) => {
|
|
7124
7128
|
e && t?.content && (e.textContent = t.content);
|
|
7125
|
-
},
|
|
7129
|
+
}, qs.resizeToContentParent = ".grid-stack-item-content", qs.Utils = q, qs.Engine = js, qs.GDRev = "12.6.0";
|
|
7126
7130
|
//#endregion
|
|
7127
7131
|
//#region src/components/item-grid/helpers/grid-stack-lifecycle.ts
|
|
7128
|
-
var
|
|
7129
|
-
let [u, d] =
|
|
7132
|
+
var Js = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight: i, viewMode: a, fullTheme: o, onCreateOrUpdateDimensionsHint: s, onRemoveDimensionsHint: c, onChange: l }) => {
|
|
7133
|
+
let [u, d] = bs(o), f = {
|
|
7130
7134
|
column: r,
|
|
7131
7135
|
cellHeight: i,
|
|
7132
7136
|
marginTop: u,
|
|
@@ -7152,7 +7156,7 @@ var qs = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight
|
|
|
7152
7156
|
"nw"
|
|
7153
7157
|
].join(", ") },
|
|
7154
7158
|
handle: ".grid-item-drag-handle"
|
|
7155
|
-
}, p =
|
|
7159
|
+
}, p = qs.init(f, e);
|
|
7156
7160
|
return p.batchUpdate(), t.forEach((e) => {
|
|
7157
7161
|
let t = e.getAttribute("luzmo-item-grid-item-id"), r = va(n.find((e) => e.id === t), t ?? void 0);
|
|
7158
7162
|
p.makeWidget(e, r);
|
|
@@ -7165,7 +7169,7 @@ var qs = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight
|
|
|
7165
7169
|
}), p.on("change", (e, t) => {
|
|
7166
7170
|
l(t);
|
|
7167
7171
|
}), p;
|
|
7168
|
-
},
|
|
7172
|
+
}, Ys = (e, t) => {
|
|
7169
7173
|
let n = new Map(t.filter((e) => e.id).map((e) => [e.id, e]));
|
|
7170
7174
|
return e.map((e) => {
|
|
7171
7175
|
let t = e.id ? n.get(e.id) : void 0;
|
|
@@ -7179,29 +7183,29 @@ var qs = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight
|
|
|
7179
7183
|
}
|
|
7180
7184
|
} : e;
|
|
7181
7185
|
});
|
|
7182
|
-
},
|
|
7186
|
+
}, Xs = ({ element: e, numberOfColumns: t, numberOfRows: n, offsetHint: r }) => {
|
|
7183
7187
|
let i = e.querySelector(".dimensions-hint-popover");
|
|
7184
7188
|
if (i) {
|
|
7185
7189
|
i.style.display = t.length > 0 && n.length > 0 ? "block" : "none", i.textContent = `${t} × ${n}`;
|
|
7186
7190
|
return;
|
|
7187
7191
|
}
|
|
7188
7192
|
let a = document.createElement("div");
|
|
7189
|
-
a.className = "dimensions-hint-popover", a.setAttribute("popover", "hint"), a.style.display = t.length > 0 && n.length > 0 ? "block" : "none", a.textContent = `${t} × ${n}`, e.append(a),
|
|
7190
|
-
let { x: t, y: n } = await
|
|
7193
|
+
a.className = "dimensions-hint-popover", a.setAttribute("popover", "hint"), a.style.display = t.length > 0 && n.length > 0 ? "block" : "none", a.textContent = `${t} × ${n}`, e.append(a), os(a, ts(e, a, async () => {
|
|
7194
|
+
let { x: t, y: n } = await is(e, a, {
|
|
7191
7195
|
placement: "bottom",
|
|
7192
|
-
middleware: [
|
|
7196
|
+
middleware: [ns(r), rs()]
|
|
7193
7197
|
});
|
|
7194
7198
|
a.style.left = `${t}px`, a.style.top = `${n}px`;
|
|
7195
7199
|
})), a.matches(":popover-open") || a.showPopover();
|
|
7196
|
-
},
|
|
7200
|
+
}, Zs = (e) => {
|
|
7197
7201
|
let t = e.querySelector(".dimensions-hint-popover");
|
|
7198
|
-
t && (
|
|
7199
|
-
},
|
|
7202
|
+
t && (ss(t), t.matches(":popover-open") && t.hidePopover(), t.remove());
|
|
7203
|
+
}, Qs = ({ initialized: e, grid: t, hasItemsChanged: n, gridItemElements: r, items: i }) => {
|
|
7200
7204
|
!e || !t || !n || (t.setAnimation(!1), t.batchUpdate(), t.removeAll(!1), i.forEach((e) => {
|
|
7201
7205
|
let n = ba(r, e.id);
|
|
7202
7206
|
n && t.makeWidget(n, va(e, e.id));
|
|
7203
7207
|
}), t.batchUpdate(!1), t.setAnimation(!0));
|
|
7204
|
-
},
|
|
7208
|
+
}, $s = ({ initialized: e, grid: t, hasViewModeChanged: n, viewMode: r, previousViewMode: i, activeItemElement: a, gridElement: o, cleanupActiveItem: s }) => {
|
|
7205
7209
|
if (!e || !t || !n || r === i) return a;
|
|
7206
7210
|
if (r) {
|
|
7207
7211
|
if (t.disable(), a) {
|
|
@@ -7211,12 +7215,12 @@ var qs = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight
|
|
|
7211
7215
|
return a;
|
|
7212
7216
|
}
|
|
7213
7217
|
return t.enable(), a;
|
|
7214
|
-
},
|
|
7218
|
+
}, ec = ":host{--luzmo-action-button-content-color-default:var(--luzmo-item-grid-item-action-button-content-color-default,#fff);--luzmo-action-button-content-color-hover:var(--luzmo-item-grid-item-action-button-content-color-hover,#fff);--luzmo-action-button-content-color-down:var(--luzmo-item-grid-item-action-button-content-color-down,#fff);--luzmo-action-button-content-color-focus:var(--luzmo-item-grid-item-action-button-content-color-focus,#fff);--luzmo-action-button-background-color-default:var(--luzmo-item-grid-item-action-button-background-color-default,#333);--luzmo-action-button-background-color-hover:var(--luzmo-item-grid-item-action-button-background-color-hover,#444);--luzmo-action-button-background-color-down:var(--luzmo-item-grid-item-action-button-background-color-down,#555);--luzmo-action-button-background-color-focus:var(--luzmo-item-grid-item-action-button-background-color-focus,#666);--grid-item-actions-flex-direction:column;display:block}.action-buttons{gap:var(--luzmo-item-grid-item-action-group-gap,.5rem);flex-direction:var(--luzmo-item-grid-item-actions-flex-direction,var(--grid-item-actions-flex-direction));outline:none;display:flex}.action-button[selected]{--luzmo-action-button-background-color-default:var(--luzmo-primary);--luzmo-action-button-background-color-hover:var(--luzmo-primary-hover);--luzmo-action-button-background-color-down:var(--luzmo-primary-down);--luzmo-action-button-background-color-focus:var(--luzmo-primary-focus);--luzmo-action-button-content-color-default:var(--luzmo-primary-inverse-color);--luzmo-action-button-content-color-hover:var(--luzmo-primary-inverse-color);--luzmo-action-button-content-color-down:var(--luzmo-primary-inverse-color);--luzmo-action-button-content-color-focus:var(--luzmo-primary-inverse-color)}:host .action-buttons{--luzmo-action-button-content-color-default:var(--luzmo-item-grid-item-action-button-content-color-default,#fff);--luzmo-action-button-content-color-hover:var(--luzmo-item-grid-item-action-button-content-color-hover,#fff);--luzmo-action-button-content-color-down:var(--luzmo-item-grid-item-action-button-content-color-down,#fff);--luzmo-action-button-content-color-focus:var(--luzmo-item-grid-item-action-button-content-color-focus,#fff);--luzmo-action-button-background-color-default:var(--luzmo-item-grid-item-action-button-background-color-default,#333);--luzmo-action-button-background-color-hover:var(--luzmo-item-grid-item-action-button-background-color-hover,#444);--luzmo-action-button-background-color-down:var(--luzmo-item-grid-item-action-button-background-color-down,#555);--luzmo-action-button-background-color-focus:var(--luzmo-item-grid-item-action-button-background-color-focus,#666)}.delete-button{--luzmo-action-button-background-color-hover:var(--luzmo-item-grid-item-delete-button-background-color-hover,var(--luzmo-negative-color));--luzmo-action-button-content-color-hover:var(--luzmo-item-grid-item-delete-button-content-color-hover,#fff);--luzmo-action-button-background-color-focus:var(--luzmo-item-grid-item-delete-button-background-color-focus,var(--luzmo-negative-color-focus));--luzmo-action-button-content-color-focus:var(--luzmo-item-grid-item-delete-button-content-color-focus,#fff);--luzmo-action-button-background-color-down:var(--luzmo-item-grid-item-delete-button-background-color-down,var(--luzmo-negative-color-down));--luzmo-action-button-content-color-down:var(--luzmo-item-grid-item-delete-button-content-color-down,#fff)}:host([placement=top-start]),:host([placement=top]),:host([placement=top-end]),:host([placement=bottom-start]),:host([placement=bottom]),:host([placement=bottom-end]){--grid-item-actions-flex-direction:row}", tc = class extends t(ae) {
|
|
7215
7219
|
constructor(...e) {
|
|
7216
|
-
super(...e), this.placement = "right-start", this.actions =
|
|
7220
|
+
super(...e), this.placement = "right-start", this.actions = hs();
|
|
7217
7221
|
}
|
|
7218
7222
|
static get styles() {
|
|
7219
|
-
return [
|
|
7223
|
+
return [b(ec)];
|
|
7220
7224
|
}
|
|
7221
7225
|
get isVertical() {
|
|
7222
7226
|
return this.placement.includes("left") || this.placement.includes("right");
|
|
@@ -7297,15 +7301,15 @@ var qs = ({ gridElement: e, gridItemElements: t, items: n, columns: r, rowHeight
|
|
|
7297
7301
|
`;
|
|
7298
7302
|
}
|
|
7299
7303
|
};
|
|
7300
|
-
e([
|
|
7304
|
+
e([x({
|
|
7301
7305
|
type: String,
|
|
7302
7306
|
reflect: !0
|
|
7303
|
-
})],
|
|
7307
|
+
})], tc.prototype, "placement", void 0), e([x({ type: Array })], tc.prototype, "actions", void 0), tc = e([ne()], tc);
|
|
7304
7308
|
//#endregion
|
|
7305
7309
|
//#region src/components/item-grid/item-grid.module.scss?inline
|
|
7306
|
-
var
|
|
7310
|
+
var nc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(--luzmo-item-grid-min-height);background:var(--luzmo-item-grid-background,var(--grid-background,var(--luzmo-background-color)));position:relative}.grid-stack[has-active-item] .grid-stack-item:not([active])>.grid-stack-item-content,.grid-stack[has-active-item] .grid-stack-item:not([active])>.grid-item-actions-popover{opacity:.5}.grid-stack .grid-stack-item[active]>.ui-resizable-handle,.grid-stack .grid-stack-item[active].ui-resizable-autohide>.ui-resizable-handle{display:block}.grid-stack .grid-stack-item.ui-resizable-resizing,.grid-stack .grid-stack-item.ui-resizable-resizing>.grid-stack-item-content{opacity:var(--luzmo-item-grid-item-resizing-opacity,.8)!important}.grid-item-drag-handle{color:var(--luzmo-item-grid-item-drag-handle-color,#000);top:var(--luzmo-item-grid-item-drag-handle-position-top,0);left:var(--luzmo-item-grid-item-drag-handle-position-left,0);right:var(--luzmo-item-grid-item-drag-handle-position-right,auto);bottom:var(--luzmo-item-grid-item-drag-handle-position-bottom,auto);padding:var(--luzmo-item-grid-item-drag-handle-padding,.5rem);z-index:var(--luzmo-item-grid-item-drag-handle-z-index,3);cursor:var(--luzmo-item-grid-item-drag-handle-cursor,move);position:absolute}.grid-stack[dark-background] .grid-item-drag-handle{color:var(--luzmo-item-grid-item-drag-handle-color,#fff)}.grid-stack .grid-stack-item .grid-stack-item-content{border-radius:var(--luzmo-item-grid-item-border-radius,var(--grid-item-border-radius,4px));background:var(--luzmo-item-grid-item-background,var(--grid-item-background,transparent));box-shadow:var(--luzmo-item-grid-item-box-shadow,var(--grid-item-box-shadow,none));border-style:var(--luzmo-item-grid-item-border-style,none);border-color:var(--luzmo-item-grid-item-border-color,transparent);-webkit-backdrop-filter:var(--luzmo-item-grid-item-backdrop-filter,none);backdrop-filter:var(--luzmo-item-grid-item-backdrop-filter,none);overflow:hidden}.grid-stack .grid-stack-item:not(.has-luzmo-viz-item) .grid-stack-item-content{border-style:var(--luzmo-item-grid-item-border-style,var(--grid-item-border-style,none));border-color:var(--luzmo-item-grid-item-border-color,var(--grid-item-border-color,transparent));border-width:var(--luzmo-item-grid-item-border-width,var(--grid-item-border-width,0));border-top-width:var(--luzmo-item-grid-item-border-top-width,var(--grid-item-border-top-width,0));border-right-width:var(--luzmo-item-grid-item-border-right-width,var(--grid-item-border-right-width,0));border-bottom-width:var(--luzmo-item-grid-item-border-bottom-width,var(--grid-item-border-bottom-width,0));border-left-width:var(--luzmo-item-grid-item-border-left-width,var(--grid-item-border-left-width,0))}.grid-stack .grid-stack-placeholder>.placeholder-content{border-radius:var(--grid-item-border-radius,4px)}:host .grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack-item:hover>.ui-resizable-handle{z-index:var(--luzmo-item-grid-resize-handle-z-index,100);background:var(--luzmo-item-grid-resize-handle-background,#fff);border-radius:var(--luzmo-item-grid-resize-handle-border-radius,3px);opacity:var(--luzmo-item-grid-resize-handle-opacity,0);transition:var(--luzmo-item-grid-resize-handle-transition,opacity .2s ease);box-shadow:0 0 6px #0000001a,0 0 2px #000000bf;display:block!important;position:absolute!important}:host .grid-stack[dark-background]>.grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack[dark-background]>.grid-stack-item:hover>.ui-resizable-handle{background:var(--luzmo-item-grid-resize-handle-background,#333);box-shadow:0 0 6px #ffffff1a,0 0 2px #ffffffbf}:host .grid-stack-item[active]>.ui-resizable-handle,:host .grid-stack-item:hover>.ui-resizable-handle{opacity:var(--luzmo-item-grid-resize-handle-opacity-hover,1)}:host .grid-stack-item>.ui-resizable-handle:hover{opacity:var(--luzmo-item-grid-resize-handle-opacity-active,1);background:var(--luzmo-item-grid-resize-handle-background-hover,var(--luzmo-background-color-highlight))}:host .grid-stack-item>.ui-resizable-n,:host .grid-stack-item>.ui-resizable-s{height:var(--luzmo-item-grid-resize-handle-edge-size,8px);width:var(--luzmo-item-grid-resize-handle-side-size,18px);left:calc(50% - var(--luzmo-item-grid-resize-handle-side-size,18px) / 2)}:host .grid-stack-item>.ui-resizable-n{cursor:n-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-top,0px))}:host .grid-stack-item>.ui-resizable-s{cursor:s-resize;bottom:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-e,:host .grid-stack-item>.ui-resizable-w{width:var(--luzmo-item-grid-resize-handle-edge-size,8px);height:var(--luzmo-item-grid-resize-handle-side-size,18px);top:calc(50% - var(--luzmo-item-grid-resize-handle-side-size,18px) / 2)}:host .grid-stack-item>.ui-resizable-e{cursor:e-resize;right:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-right,0px))}:host .grid-stack-item>.ui-resizable-w{cursor:w-resize;left:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-4px) + var(--gs-item-margin-left,0px))}:host .grid-stack-item>.ui-resizable-ne,:host .grid-stack-item>.ui-resizable-nw,:host .grid-stack-item>.ui-resizable-se,:host .grid-stack-item>.ui-resizable-sw{width:var(--luzmo-item-grid-resize-handle-corner-size,12px);height:var(--luzmo-item-grid-resize-handle-corner-size,12px);background-image:none;transform:none}:host .grid-stack-item>.ui-resizable-ne{cursor:ne-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-top,0px));right:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-right,0px))}:host .grid-stack-item>.ui-resizable-nw{cursor:nw-resize;top:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-top,0px));left:calc(var(--luzmo-item-grid-resize-handle-edge-offset,-6px) + var(--gs-item-margin-left,0px))}:host .grid-stack-item>.ui-resizable-se{cursor:se-resize;right:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-right,0px));bottom:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-sw{cursor:sw-resize;left:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-left,0px));bottom:calc(var(--luzmo-item-grid-resize-handle-corner-offset,-4px) + var(--gs-item-margin-bottom,0px))}:host .grid-stack-item>.ui-resizable-resizing .ui-resizable-handle{background:var(--luzmo-item-grid-resize-handle-background-active,var(--luzmo-background-color-highlight));opacity:1!important}.grid-item-actions-popover{z-index:2;background:0 0;border:none;outline:none;margin:0;padding:0;position:absolute;overflow:visible}.grid-item-actions-popover:not([popover]){z-index:var(--luzmo-item-grid-item-actions-in-tree-z-index,50);position:fixed}luzmo-item-grid-item-actions-menu{padding:var(--luzmo-item-grid-item-actions-padding,var(--grid-item-actions-padding))}.dimensions-hint-popover{font-size:var(--luzmo-item-grid-item-dimensions-hint-font-size,var(--luzmo-font-size-xs,10px));font-family:var(--luzmo-item-grid-item-dimensions-hint-font-family,var(--luzmo-font-family,inherit));border-width:var(--luzmo-item-grid-item-dimensions-hint-border-width,var(--luzmo-border-width));border-style:solid;border-color:var(--luzmo-item-grid-item-dimensions-hint-border-color,var(--luzmo-border-color));border-radius:var(--luzmo-item-grid-item-dimensions-hint-border-radius,var(--luzmo-border-radius));padding:var(--luzmo-item-grid-item-dimensions-hint-padding,var(--luzmo-spacing-1) var(--luzmo-spacing-2));z-index:3;background:var(--luzmo-item-grid-item-dimensions-hint-background,var(--luzmo-background-color));color:var(--luzmo-item-grid-item-dimensions-hint-color,var(--luzmo-font-color));pointer-events:none;outline:none;margin:0;position:absolute;overflow:visible}luzmo-item-grid-item-actions-menu{--grid-item-actions-padding:0 .75rem}luzmo-item-grid-item-actions-menu[placement=top-start],luzmo-item-grid-item-actions-menu[placement=top],luzmo-item-grid-item-actions-menu[placement=top-end],luzmo-item-grid-item-actions-menu[placement=bottom-start],luzmo-item-grid-item-actions-menu[placement=bottom],luzmo-item-grid-item-actions-menu[placement=bottom-end]{--grid-item-actions-padding:.75rem 0}.grid-stack-item:focus-visible{outline:none}.grid-stack-item:focus-visible .grid-stack-item-content:after{content:\"\";border:var(--luzmo-indicator-width) solid var(--luzmo-indicator-color,var(--luzmo-primary));box-sizing:border-box;border-radius:var(--luzmo-item-grid-item-border-radius,var(--grid-item-border-radius,4px));z-index:2;width:100%;height:100%;position:absolute;top:0;left:0}", $ = class extends ae {
|
|
7307
7311
|
constructor(...e) {
|
|
7308
|
-
super(...e), this.appServer = "https://app.luzmo.com/", this.apiHost = "https://api.luzmo.com", this.language = "en", this.contentLanguage = "en", this.columns = 48, this.rowHeight = 16, this.viewMode = !1, this.placementItemActionsMenu = "right-start", this.clonedItemPositioning = "below-item", this._items = [], this._hasControlledItems = !1, this._initialItems = [], this.renderers = {}, this._initialized = !1, this.defaultRenderer = (e) => _`
|
|
7312
|
+
super(...e), this.appServer = "https://app.luzmo.com/", this.apiHost = "https://api.luzmo.com", this.language = "en", this.contentLanguage = "en", this.columns = 48, this.rowHeight = 16, this.viewMode = !1, this.itemActionsDocumentPopover = !0, this.placementItemActionsMenu = "right-start", this.clonedItemPositioning = "below-item", this._items = [], this._hasControlledItems = !1, this._initialItems = [], this.renderers = {}, this._initialized = !1, this.defaultRenderer = (e) => _`
|
|
7309
7313
|
<div class="grid-item-content">
|
|
7310
7314
|
<div class="grid-item-type">${e.type}</div>
|
|
7311
7315
|
</div>
|
|
@@ -7317,7 +7321,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7317
7321
|
gridItem: t
|
|
7318
7322
|
}) && this._removeItemActionsMenuPopover(t);
|
|
7319
7323
|
}, this._handleKeyDown = (e) => {
|
|
7320
|
-
let t =
|
|
7324
|
+
let t = fs({
|
|
7321
7325
|
event: e,
|
|
7322
7326
|
viewMode: this.viewMode,
|
|
7323
7327
|
focusedItemElement: this._focusedItemElement,
|
|
@@ -7404,7 +7408,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7404
7408
|
} else {
|
|
7405
7409
|
let e = {
|
|
7406
7410
|
...structuredClone(a),
|
|
7407
|
-
id:
|
|
7411
|
+
id: ue()
|
|
7408
7412
|
}, r = this._simulateCloneLayout(e, a), o = r.find((t) => t.id === e.id) ?? e;
|
|
7409
7413
|
ra({
|
|
7410
7414
|
target: this,
|
|
@@ -7426,7 +7430,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7426
7430
|
let i = this.items.find((e) => e.id === r);
|
|
7427
7431
|
if (t.type === "toggle") {
|
|
7428
7432
|
let e = this._effectiveItemStates, n = t.active, i = this._computeNextItemStates(r, t.action, n);
|
|
7429
|
-
|
|
7433
|
+
V({
|
|
7430
7434
|
target: this,
|
|
7431
7435
|
itemStates: e,
|
|
7432
7436
|
updatedItemStates: i,
|
|
@@ -7460,7 +7464,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7460
7464
|
});
|
|
7461
7465
|
if (this._suppressItemStatesEvent = !1, this._activeItemElement = i.activeItemElement, this._activeItemActionToggle = i.activeItemActionToggle, t.type === "toggle" && r) {
|
|
7462
7466
|
let e = this._effectiveItemStates, a = i.activeItemElement === n && i.activeItemActionToggle === t.action, o = this._computeNextItemStates(r, t.action, a);
|
|
7463
|
-
this._internalItemStates = o,
|
|
7467
|
+
this._internalItemStates = o, V({
|
|
7464
7468
|
target: this,
|
|
7465
7469
|
itemStates: e,
|
|
7466
7470
|
updatedItemStates: o,
|
|
@@ -7470,7 +7474,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7470
7474
|
};
|
|
7471
7475
|
}
|
|
7472
7476
|
static get styles() {
|
|
7473
|
-
return [
|
|
7477
|
+
return [b(ea), b(nc)];
|
|
7474
7478
|
}
|
|
7475
7479
|
set items(e) {
|
|
7476
7480
|
let t = this._items, n = structuredClone(e ?? []);
|
|
@@ -7510,15 +7514,15 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7510
7514
|
}
|
|
7511
7515
|
async _loadTheme(e) {
|
|
7512
7516
|
let t = this._initialized;
|
|
7513
|
-
if (this._fullTheme = await
|
|
7517
|
+
if (this._fullTheme = await ys({
|
|
7514
7518
|
theme: e,
|
|
7515
7519
|
currentTheme: this._fullTheme
|
|
7516
|
-
}), this._initialized &&
|
|
7520
|
+
}), this._initialized && Ts(this.style, this._fullTheme), !this._initialized && this._gridElement && await new Promise((e) => {
|
|
7517
7521
|
requestAnimationFrame(() => {
|
|
7518
7522
|
this._initializeGrid(), e();
|
|
7519
7523
|
});
|
|
7520
7524
|
}), this._grid) {
|
|
7521
|
-
let [e, t] =
|
|
7525
|
+
let [e, t] = bs(this.theme);
|
|
7522
7526
|
this._grid.margin([e, t].join(" "));
|
|
7523
7527
|
}
|
|
7524
7528
|
t && this.requestUpdate();
|
|
@@ -7530,21 +7534,21 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7530
7534
|
super.disconnectedCallback(), this._cleanup(), document.removeEventListener("click", this._handleGridClick), this.removeEventListener("keydown", this._handleKeyDown);
|
|
7531
7535
|
}
|
|
7532
7536
|
willUpdate(e) {
|
|
7533
|
-
if (super.willUpdate(e), e.has("_initialized") && (
|
|
7534
|
-
let [e, t] =
|
|
7537
|
+
if (super.willUpdate(e), e.has("_initialized") && (Ts(this.style, this._fullTheme), this._initialized && this._grid && this._fullTheme?.margins)) {
|
|
7538
|
+
let [e, t] = bs(this._fullTheme);
|
|
7535
7539
|
this._grid.margin([e, t].join(" "));
|
|
7536
7540
|
}
|
|
7537
7541
|
}
|
|
7538
7542
|
updated(e) {
|
|
7539
7543
|
super.updated(e);
|
|
7540
7544
|
let t = e.has("contentLanguage"), n = e.has("viewMode"), r = e.has("items"), i = e.has("initialItems"), a = r || e.has("_internalItemsVersion"), o = e.has("theme"), s = e.has("itemStates");
|
|
7541
|
-
this._isItemsControlled && this.initialItems && this.initialItems.length > 0 ? this._hasWarnedControlledAndInitialItems ||= (console.warn("luzmo-item-grid: Both items and initialItems are set. The component will be treated as controlled (initialItems is ignored)."), !0) : this._hasWarnedControlledAndInitialItems = !1, !this._initialItemsApplied && !this._isItemsControlled && this._initialItems.length > 0 ? (this._setInternalItems(this._initialItems, { reconcileStates: !0 }), this._initialItemsApplied = !0) : i && !this._isItemsControlled && this._initialItems.length === 0 && !this._initialItemsApplied && (this._setInternalItems([], { reconcileStates: !0 }), this._initialItemsApplied = !0), this.itemStates !== void 0 && this.initialItemStates !== void 0 ? this._hasWarnedControlledAndInitialStates ||= (console.warn("luzmo-item-grid: Both itemStates and initialItemStates are set. The component will be treated as controlled (initialItemStates is ignored)."), !0) : this._hasWarnedControlledAndInitialStates = !1, !this._initialItemStatesApplied && this.initialItemStates && !this._isControlled && (this._internalItemStates = this._sanitizeInitialItemStates(this.initialItemStates), this._initialItemStatesApplied = !0), ga(this._effectiveItems),
|
|
7545
|
+
this._isItemsControlled && this.initialItems && this.initialItems.length > 0 ? this._hasWarnedControlledAndInitialItems ||= (console.warn("luzmo-item-grid: Both items and initialItems are set. The component will be treated as controlled (initialItems is ignored)."), !0) : this._hasWarnedControlledAndInitialItems = !1, !this._initialItemsApplied && !this._isItemsControlled && this._initialItems.length > 0 ? (this._setInternalItems(this._initialItems, { reconcileStates: !0 }), this._initialItemsApplied = !0) : i && !this._isItemsControlled && this._initialItems.length === 0 && !this._initialItemsApplied && (this._setInternalItems([], { reconcileStates: !0 }), this._initialItemsApplied = !0), this.itemStates !== void 0 && this.initialItemStates !== void 0 ? this._hasWarnedControlledAndInitialStates ||= (console.warn("luzmo-item-grid: Both itemStates and initialItemStates are set. The component will be treated as controlled (initialItemStates is ignored)."), !0) : this._hasWarnedControlledAndInitialStates = !1, !this._initialItemStatesApplied && this.initialItemStates && !this._isControlled && (this._internalItemStates = this._sanitizeInitialItemStates(this.initialItemStates), this._initialItemStatesApplied = !0), ga(this._effectiveItems), Qs({
|
|
7542
7546
|
initialized: this._initialized,
|
|
7543
7547
|
grid: this._grid,
|
|
7544
7548
|
hasItemsChanged: a,
|
|
7545
7549
|
gridItemElements: this._gridItemElements,
|
|
7546
7550
|
items: this._effectiveItems
|
|
7547
|
-
}), r && this._reconcileStaleItemStates(), t && ta(this._gridItemElements, this.contentLanguage), this._activeItemElement =
|
|
7551
|
+
}), r && this._reconcileStaleItemStates(), t && ta(this._gridItemElements, this.contentLanguage), this._activeItemElement = $s({
|
|
7548
7552
|
initialized: this._initialized,
|
|
7549
7553
|
grid: this._grid,
|
|
7550
7554
|
hasViewModeChanged: n,
|
|
@@ -7580,7 +7584,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7580
7584
|
for (let n of t) a = this._computeNextItemStates(e, n, !1, a);
|
|
7581
7585
|
i[e] = [...t];
|
|
7582
7586
|
}
|
|
7583
|
-
|
|
7587
|
+
V({
|
|
7584
7588
|
target: this,
|
|
7585
7589
|
itemStates: t,
|
|
7586
7590
|
updatedItemStates: a,
|
|
@@ -7612,7 +7616,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7612
7616
|
originalElement: s
|
|
7613
7617
|
}), t === "toggle" && !this._suppressItemStatesEvent) {
|
|
7614
7618
|
let t = this._effectiveItemStates, r = this._computeNextItemStates(i, e, n);
|
|
7615
|
-
this._isControlled || (this._internalItemStates = r),
|
|
7619
|
+
this._isControlled || (this._internalItemStates = r), V({
|
|
7616
7620
|
target: this,
|
|
7617
7621
|
itemStates: t,
|
|
7618
7622
|
updatedItemStates: r,
|
|
@@ -7660,7 +7664,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7660
7664
|
_reconcileStaleItemStates() {
|
|
7661
7665
|
let e = this._isControlled ? this._effectiveItemStates : this._internalItemStates, t = this._filterItemStatesToExistingItems(e), n = {};
|
|
7662
7666
|
for (let [r, i] of Object.entries(e)) !t[r] && i.length > 0 && (n[r] = [...i]);
|
|
7663
|
-
Object.keys(n).length > 0 &&
|
|
7667
|
+
Object.keys(n).length > 0 && V({
|
|
7664
7668
|
target: this,
|
|
7665
7669
|
itemStates: e,
|
|
7666
7670
|
updatedItemStates: t,
|
|
@@ -7723,7 +7727,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7723
7727
|
}
|
|
7724
7728
|
}
|
|
7725
7729
|
_initializeGrid() {
|
|
7726
|
-
this._initialized || !this._gridElement || (this._grid =
|
|
7730
|
+
this._initialized || !this._gridElement || (this._grid = Js({
|
|
7727
7731
|
gridElement: this._gridElement,
|
|
7728
7732
|
gridItemElements: this._gridItemElements,
|
|
7729
7733
|
items: this._effectiveItems,
|
|
@@ -7738,7 +7742,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7738
7742
|
this._suppressNextLayoutChangedEvent = !1;
|
|
7739
7743
|
return;
|
|
7740
7744
|
}
|
|
7741
|
-
let t = this._effectiveItems, n =
|
|
7745
|
+
let t = this._effectiveItems, n = Ys(t, e);
|
|
7742
7746
|
this._isItemsControlled || this._setInternalItems(n, { reconcileStates: !0 }), ia({
|
|
7743
7747
|
target: this,
|
|
7744
7748
|
eventName: "luzmo-item-grid-layout-changed",
|
|
@@ -7788,15 +7792,15 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7788
7792
|
n.length === 1 ? (this._activeItemElement = n[0].element, this._activeItemActionToggle = n[0].action) : (this._activeItemElement = void 0, this._activeItemActionToggle = void 0);
|
|
7789
7793
|
}
|
|
7790
7794
|
_createOrUpdateDimensionsHint(e, t, n) {
|
|
7791
|
-
|
|
7795
|
+
Xs({
|
|
7792
7796
|
element: e,
|
|
7793
7797
|
numberOfColumns: t,
|
|
7794
7798
|
numberOfRows: n,
|
|
7795
|
-
offsetHint:
|
|
7799
|
+
offsetHint: xs(this.theme)
|
|
7796
7800
|
});
|
|
7797
7801
|
}
|
|
7798
7802
|
_removeDimensionsHint(e) {
|
|
7799
|
-
|
|
7803
|
+
Zs(e);
|
|
7800
7804
|
}
|
|
7801
7805
|
get grid() {
|
|
7802
7806
|
return this._grid;
|
|
@@ -7811,27 +7815,29 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7811
7815
|
};
|
|
7812
7816
|
}
|
|
7813
7817
|
_renderOverlayContent(e, t) {
|
|
7814
|
-
return
|
|
7818
|
+
return Ds({
|
|
7815
7819
|
item: e,
|
|
7816
7820
|
activeActions: t,
|
|
7817
7821
|
defaultItemActionsMenu: this.defaultItemActionsMenu,
|
|
7818
7822
|
placementItemActionsMenu: this.placementItemActionsMenu,
|
|
7819
7823
|
language: this.language,
|
|
7820
|
-
handleAction: this._handleAction
|
|
7824
|
+
handleAction: this._handleAction,
|
|
7825
|
+
itemActionsDocumentPopover: this.itemActionsDocumentPopover
|
|
7821
7826
|
});
|
|
7822
7827
|
}
|
|
7823
7828
|
_createItemActionsMenuPopover(e, t) {
|
|
7824
|
-
|
|
7829
|
+
cs({
|
|
7825
7830
|
element: e,
|
|
7826
7831
|
activeActions: t,
|
|
7827
7832
|
getGridItemById: this.getGridItemById.bind(this),
|
|
7828
7833
|
placementItemActionsMenu: this.placementItemActionsMenu,
|
|
7829
7834
|
renderOverlayContent: this._renderOverlayContent.bind(this),
|
|
7830
|
-
removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this)
|
|
7835
|
+
removeItemActionsMenuPopover: this._removeItemActionsMenuPopover.bind(this),
|
|
7836
|
+
itemActionsDocumentPopover: this.itemActionsDocumentPopover
|
|
7831
7837
|
});
|
|
7832
7838
|
}
|
|
7833
7839
|
_removeItemActionsMenuPopover(e) {
|
|
7834
|
-
|
|
7840
|
+
ls(e);
|
|
7835
7841
|
}
|
|
7836
7842
|
getGridItemById(e) {
|
|
7837
7843
|
return this.gridItems.find((t) => t.item.id === e);
|
|
@@ -7961,7 +7967,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
7961
7967
|
cloneGridItem(e) {
|
|
7962
7968
|
let t = this._effectiveItems, n = this._requireGridItem(e), r = {
|
|
7963
7969
|
...structuredClone(n),
|
|
7964
|
-
id:
|
|
7970
|
+
id: ue()
|
|
7965
7971
|
}, i = this._simulateCloneLayout(r, n), a = i.find((e) => e.id === r.id) ?? r;
|
|
7966
7972
|
return ra({
|
|
7967
7973
|
target: this,
|
|
@@ -8043,7 +8049,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
8043
8049
|
});
|
|
8044
8050
|
if (this._suppressItemStatesEvent = !1, this._activeItemElement = i.state.activeItemElement, this._activeItemActionToggle = i.state.activeItemActionToggle, i.result !== void 0) {
|
|
8045
8051
|
let n = this._effectiveItemStates, r = this._computeNextItemStates(e, t, i.result);
|
|
8046
|
-
this._internalItemStates = r,
|
|
8052
|
+
this._internalItemStates = r, V({
|
|
8047
8053
|
target: this,
|
|
8048
8054
|
itemStates: n,
|
|
8049
8055
|
updatedItemStates: r,
|
|
@@ -8059,7 +8065,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
8059
8065
|
let r = (this._effectiveItemStates[e] ?? []).includes(t), i = n?.active ?? !r;
|
|
8060
8066
|
if (n?.active !== void 0 && i === r) return r;
|
|
8061
8067
|
let a = this._effectiveItemStates, o = this._computeNextItemStates(e, t, i);
|
|
8062
|
-
return
|
|
8068
|
+
return V({
|
|
8063
8069
|
target: this,
|
|
8064
8070
|
itemStates: a,
|
|
8065
8071
|
updatedItemStates: o,
|
|
@@ -8075,7 +8081,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
8075
8081
|
if (t.length === 0) return 0;
|
|
8076
8082
|
let n = {}, r = { ...e };
|
|
8077
8083
|
for (let e of t) r = this._computeNextItemStates(e.itemId, e.action, !1, r), n[e.itemId] = [...n[e.itemId] ?? [], e.action];
|
|
8078
|
-
return
|
|
8084
|
+
return V({
|
|
8079
8085
|
target: this,
|
|
8080
8086
|
itemStates: e,
|
|
8081
8087
|
updatedItemStates: r,
|
|
@@ -8100,7 +8106,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
8100
8106
|
if (this._suppressItemStatesEvent = !1, this._activeItemElement = n.state.activeItemElement, this._activeItemActionToggle = n.state.activeItemActionToggle, this._isControlled || (this._internalItemStates = {}), t.length > 0) {
|
|
8101
8107
|
let n = {};
|
|
8102
8108
|
for (let e of t) n[e.itemId] = [...n[e.itemId] ?? [], e.action];
|
|
8103
|
-
|
|
8109
|
+
V({
|
|
8104
8110
|
target: this,
|
|
8105
8111
|
itemStates: e,
|
|
8106
8112
|
updatedItemStates: {},
|
|
@@ -8110,7 +8116,7 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
8110
8116
|
return n.deactivatedCount;
|
|
8111
8117
|
}
|
|
8112
8118
|
_renderGrid() {
|
|
8113
|
-
return
|
|
8119
|
+
return As({
|
|
8114
8120
|
items: this.items,
|
|
8115
8121
|
initialized: this._initialized,
|
|
8116
8122
|
viewMode: this.viewMode,
|
|
@@ -8132,77 +8138,81 @@ var tc = ":host{width:100%;display:block}.grid-stack{width:100%;min-height:var(-
|
|
|
8132
8138
|
return this._renderGrid();
|
|
8133
8139
|
}
|
|
8134
8140
|
};
|
|
8135
|
-
e([
|
|
8141
|
+
e([x({
|
|
8136
8142
|
type: String,
|
|
8137
8143
|
attribute: "app-server",
|
|
8138
8144
|
reflect: !0
|
|
8139
|
-
})], $.prototype, "appServer", void 0), e([
|
|
8145
|
+
})], $.prototype, "appServer", void 0), e([x({
|
|
8140
8146
|
type: String,
|
|
8141
8147
|
attribute: "api-host",
|
|
8142
8148
|
reflect: !0
|
|
8143
|
-
})], $.prototype, "apiHost", void 0), e([
|
|
8149
|
+
})], $.prototype, "apiHost", void 0), e([x({
|
|
8144
8150
|
type: String,
|
|
8145
8151
|
attribute: "auth-key",
|
|
8146
8152
|
reflect: !0
|
|
8147
|
-
})], $.prototype, "authKey", void 0), e([
|
|
8153
|
+
})], $.prototype, "authKey", void 0), e([x({
|
|
8148
8154
|
type: String,
|
|
8149
8155
|
attribute: "auth-token",
|
|
8150
8156
|
reflect: !0
|
|
8151
|
-
})], $.prototype, "authToken", void 0), e([
|
|
8157
|
+
})], $.prototype, "authToken", void 0), e([x({
|
|
8152
8158
|
type: Number,
|
|
8153
8159
|
attribute: "cache-time",
|
|
8154
8160
|
reflect: !0
|
|
8155
|
-
})], $.prototype, "cacheTime", void 0), e([
|
|
8161
|
+
})], $.prototype, "cacheTime", void 0), e([x({
|
|
8156
8162
|
type: String,
|
|
8157
8163
|
reflect: !0
|
|
8158
|
-
})], $.prototype, "language", void 0), e([
|
|
8164
|
+
})], $.prototype, "language", void 0), e([x({
|
|
8159
8165
|
type: String,
|
|
8160
8166
|
attribute: "content-language",
|
|
8161
8167
|
reflect: !0
|
|
8162
|
-
})], $.prototype, "contentLanguage", void 0), e([
|
|
8168
|
+
})], $.prototype, "contentLanguage", void 0), e([x({
|
|
8163
8169
|
type: Number,
|
|
8164
8170
|
reflect: !0
|
|
8165
|
-
})], $.prototype, "columns", void 0), e([
|
|
8171
|
+
})], $.prototype, "columns", void 0), e([x({
|
|
8166
8172
|
type: Number,
|
|
8167
8173
|
reflect: !0,
|
|
8168
8174
|
attribute: "row-height"
|
|
8169
|
-
})], $.prototype, "rowHeight", void 0), e([
|
|
8175
|
+
})], $.prototype, "rowHeight", void 0), e([x({
|
|
8170
8176
|
type: Boolean,
|
|
8171
8177
|
reflect: !0,
|
|
8172
8178
|
attribute: "view-mode"
|
|
8173
|
-
})], $.prototype, "viewMode", void 0), e([
|
|
8179
|
+
})], $.prototype, "viewMode", void 0), e([x({
|
|
8180
|
+
type: Boolean,
|
|
8181
|
+
reflect: !0,
|
|
8182
|
+
attribute: "item-actions-document-popover"
|
|
8183
|
+
})], $.prototype, "itemActionsDocumentPopover", void 0), e([x({
|
|
8174
8184
|
type: String,
|
|
8175
8185
|
reflect: !0,
|
|
8176
8186
|
attribute: "placement-item-actions-menu"
|
|
8177
|
-
})], $.prototype, "placementItemActionsMenu", void 0), e([
|
|
8187
|
+
})], $.prototype, "placementItemActionsMenu", void 0), e([x({
|
|
8178
8188
|
type: Array,
|
|
8179
8189
|
reflect: !0,
|
|
8180
8190
|
attribute: "default-item-actions-menu"
|
|
8181
|
-
})], $.prototype, "defaultItemActionsMenu", void 0), e([
|
|
8191
|
+
})], $.prototype, "defaultItemActionsMenu", void 0), e([x({
|
|
8182
8192
|
type: String,
|
|
8183
8193
|
reflect: !0,
|
|
8184
8194
|
attribute: "cloned-item-positioning"
|
|
8185
|
-
})], $.prototype, "clonedItemPositioning", void 0), e([
|
|
8195
|
+
})], $.prototype, "clonedItemPositioning", void 0), e([x({
|
|
8186
8196
|
type: Object,
|
|
8187
8197
|
reflect: !0
|
|
8188
|
-
})], $.prototype, "theme", void 0), e([
|
|
8198
|
+
})], $.prototype, "theme", void 0), e([x({
|
|
8189
8199
|
type: Array,
|
|
8190
8200
|
reflect: !1
|
|
8191
|
-
})], $.prototype, "items", null), e([
|
|
8201
|
+
})], $.prototype, "items", null), e([x({
|
|
8192
8202
|
type: Array,
|
|
8193
8203
|
reflect: !1,
|
|
8194
8204
|
attribute: "initial-items"
|
|
8195
|
-
})], $.prototype, "initialItems", null), e([
|
|
8205
|
+
})], $.prototype, "initialItems", null), e([x({
|
|
8196
8206
|
type: Object,
|
|
8197
8207
|
reflect: !1
|
|
8198
|
-
})], $.prototype, "renderers", void 0), e([
|
|
8208
|
+
})], $.prototype, "renderers", void 0), e([x({
|
|
8199
8209
|
type: Object,
|
|
8200
8210
|
reflect: !1,
|
|
8201
8211
|
attribute: "item-states"
|
|
8202
|
-
})], $.prototype, "itemStates", null), e([
|
|
8212
|
+
})], $.prototype, "itemStates", null), e([x({
|
|
8203
8213
|
type: Object,
|
|
8204
8214
|
reflect: !1,
|
|
8205
8215
|
attribute: "initial-item-states"
|
|
8206
|
-
})], $.prototype, "initialItemStates", void 0), e([S()], $.prototype, "_initialized", void 0), e([
|
|
8216
|
+
})], $.prototype, "initialItemStates", void 0), e([S()], $.prototype, "_initialized", void 0), e([ee(".grid-stack")], $.prototype, "_gridElement", void 0), e([te(".luzmo-item-grid-item")], $.prototype, "_gridItemElements", void 0), e([S()], $.prototype, "_internalItemsVersion", void 0), customElements.get("luzmo-item-grid") || customElements.define("luzmo-item-grid", $), customElements.get("luzmo-item-grid-item-actions-menu") || customElements.define("luzmo-item-grid-item-actions-menu", tc);
|
|
8207
8217
|
//#endregion
|
|
8208
|
-
export {
|
|
8218
|
+
export { tc as n, $ as t };
|