@luzmo/analytics-components-kit 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.md +10 -2
  2. package/angular/components/interactive-viz-item.ts +41 -4
  3. package/angular/components/item-option-color-picker.ts +30 -3
  4. package/angular/components/item-option-color-range.ts +30 -3
  5. package/angular/components/item-option-guidelines.ts +31 -4
  6. package/angular/components/item-option-panel.ts +41 -4
  7. package/angular/components/item-option-slider.ts +41 -4
  8. package/angular/components/item-option.ts +41 -4
  9. package/angular/esm/components/interactive-viz-item.d.ts +14 -5
  10. package/angular/esm/components/interactive-viz-item.js +30 -4
  11. package/angular/esm/components/item-option-color-picker.d.ts +11 -4
  12. package/angular/esm/components/item-option-color-picker.js +23 -3
  13. package/angular/esm/components/item-option-color-range.d.ts +11 -4
  14. package/angular/esm/components/item-option-color-range.js +23 -3
  15. package/angular/esm/components/item-option-guidelines.d.ts +11 -4
  16. package/angular/esm/components/item-option-guidelines.js +24 -4
  17. package/angular/esm/components/item-option-panel.d.ts +13 -4
  18. package/angular/esm/components/item-option-panel.js +30 -4
  19. package/angular/esm/components/item-option-slider.d.ts +13 -4
  20. package/angular/esm/components/item-option-slider.js +30 -4
  21. package/angular/esm/components/item-option.d.ts +13 -4
  22. package/angular/esm/components/item-option.js +30 -4
  23. package/angular/package.json +2 -2
  24. package/angular/utils/option-interaction/index.d.ts +2 -0
  25. package/angular/utils/option-interaction/is-same-option-value.d.ts +10 -0
  26. package/angular/utils/option-interaction/option-interaction-controller.d.ts +54 -0
  27. package/angular/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
  28. package/angular/utils/store/base-store.d.ts +9 -0
  29. package/angular/utils/store/tests/store-base-history.test.d.ts +1 -0
  30. package/components/add-to-dashboard/index.cjs +1 -1
  31. package/components/add-to-dashboard/index.js +1 -1
  32. package/components/{add-to-dashboard-NwsCPIlg.cjs → add-to-dashboard-CzIuDtAq.cjs} +1 -1
  33. package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-DGC0_hRB.js} +1 -1
  34. package/components/{base-store-SgJsjLap.cjs → base-store-D3whjduR.cjs} +1 -1
  35. package/components/{base-store-g0dt7ru7.js → base-store-DQYj8A1W.js} +3 -0
  36. package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-Cbl3sRra.js} +3 -2
  37. package/components/chart-helpers-fMnqHRzC.cjs +20 -0
  38. package/components/{choropleth-map-options.config-D9-u-NwX.js → choropleth-map-options.config-Blu0Z2tR.js} +1 -1
  39. package/components/{choropleth-map-options.config-CXDGMiSJ.cjs → choropleth-map-options.config-DwFJ00CS.cjs} +1 -1
  40. package/components/{color-range-utils-CUCTsRXM.js → color-range-utils-CgwRGUkg.js} +18 -18
  41. package/components/{color-range-utils-BCFQAeY1.cjs → color-range-utils-D8uygiMe.cjs} +1 -1
  42. package/components/{heat-map-options.config-ChZeslEy.js → heat-map-options.config-BQkhkLPb.js} +16 -16
  43. package/components/{heat-map-options.config-DiNa8NnG.cjs → heat-map-options.config-DjQkB039.cjs} +1 -1
  44. package/components/{heat-table-options.config-BPCszrFn.js → heat-table-options.config-CMWWTeyo.js} +1 -1
  45. package/components/{heat-table-options.config-BvE6coaV.cjs → heat-table-options.config-D21xtaIk.cjs} +1 -1
  46. package/components/index.cjs +1 -1
  47. package/components/index.js +9 -9
  48. package/components/interactive-viz-item/index.cjs +1 -1
  49. package/components/interactive-viz-item/index.d.ts +2 -1
  50. package/components/interactive-viz-item/index.js +2 -2
  51. package/components/interactive-viz-item/interactive-viz-item.d.ts +34 -2
  52. package/components/interactive-viz-item/types.d.ts +17 -0
  53. package/components/{interactive-viz-item-CofUkpP6.js → interactive-viz-item-BKLOmawA.js} +166 -100
  54. package/components/interactive-viz-item-ojdH1uk0.cjs +268 -0
  55. package/components/is-same-option-value-B2oyvEqT.js +42 -0
  56. package/components/is-same-option-value-Cf6BQcs7.cjs +20 -0
  57. package/components/item-option/helpers/control-markup.d.ts +7 -0
  58. package/components/item-option/index.cjs +1 -1
  59. package/components/item-option/index.d.ts +1 -1
  60. package/components/item-option/index.js +1 -1
  61. package/components/item-option/item-option.d.ts +23 -2
  62. package/components/item-option/types.d.ts +19 -0
  63. package/components/{item-option-Cgx3c08E.js → item-option-DKLRnicU.js} +182 -136
  64. package/components/item-option-DpLdospV.cjs +285 -0
  65. package/components/item-option-color-picker/index.cjs +1 -1
  66. package/components/item-option-color-picker/index.d.ts +1 -1
  67. package/components/item-option-color-picker/index.js +1 -1
  68. package/components/item-option-color-picker/item-option-color-picker.d.ts +17 -1
  69. package/components/item-option-color-picker-CNW7GsCO.cjs +37 -0
  70. package/components/item-option-color-picker-DDvsY7hV.js +129 -0
  71. package/components/item-option-color-range/index.cjs +1 -1
  72. package/components/item-option-color-range/index.d.ts +1 -1
  73. package/components/item-option-color-range/index.js +1 -1
  74. package/components/item-option-color-range/item-option-color-range.d.ts +20 -1
  75. package/components/item-option-color-range-BqSbuSZh.cjs +101 -0
  76. package/components/item-option-color-range-FQduqtz3.js +265 -0
  77. package/components/item-option-guidelines/index.cjs +1 -1
  78. package/components/item-option-guidelines/index.d.ts +1 -1
  79. package/components/item-option-guidelines/index.js +1 -1
  80. package/components/item-option-guidelines/item-option-guidelines.d.ts +16 -1
  81. package/components/{item-option-guidelines-DNJevmVD.js → item-option-guidelines-k5DwMONo.js} +132 -104
  82. package/components/item-option-guidelines-z9BsGR-l.cjs +138 -0
  83. package/components/item-option-panel/index.cjs +1 -1
  84. package/components/item-option-panel/index.d.ts +1 -1
  85. package/components/item-option-panel/index.js +1 -1
  86. package/components/item-option-panel/item-option-panel.d.ts +12 -1
  87. package/components/{item-option-panel-DHdnisRb.js → item-option-panel-BLXWIbjX.js} +18 -6
  88. package/components/{item-option-panel-Dl3aYBNe.cjs → item-option-panel-CU51qvgV.cjs} +6 -4
  89. package/components/item-option-slider/index.cjs +1 -1
  90. package/components/item-option-slider/index.d.ts +1 -1
  91. package/components/item-option-slider/index.js +1 -1
  92. package/components/item-option-slider/item-option-slider.d.ts +15 -2
  93. package/components/item-option-slider-BKtJfL3D.js +119 -0
  94. package/components/item-option-slider-Kz2eFBql.cjs +36 -0
  95. package/components/item-options-configs.cjs +1 -1
  96. package/components/item-options-configs.js +5 -5
  97. package/components/option-interaction-controller-B8S1N_Oo.js +90 -0
  98. package/components/option-interaction-controller-D0U-CTpZ.cjs +20 -0
  99. package/components/{route-map-options.config-DdCaVtIF.cjs → route-map-options.config-DER6ENky.cjs} +1 -1
  100. package/components/{route-map-options.config-B7vT6KG_.js → route-map-options.config-DTcS47fW.js} +1 -1
  101. package/components/{spike-map-options.config-DkmRZ1JZ.js → spike-map-options.config-CPYfKWoF.js} +1 -1
  102. package/components/{spike-map-options.config-B3hDh2qU.cjs → spike-map-options.config-DeF1Whq5.cjs} +1 -1
  103. package/components/utils/store.cjs +1 -1
  104. package/components/utils/store.js +1 -1
  105. package/custom-elements.json +418 -104
  106. package/package.json +2 -2
  107. package/react/components/interactive-viz-item.component.ts +11 -2
  108. package/react/components/item-option-color-picker.component.ts +9 -3
  109. package/react/components/item-option-color-range.component.ts +9 -3
  110. package/react/components/item-option-guidelines.component.ts +9 -3
  111. package/react/components/item-option-panel.component.ts +12 -3
  112. package/react/components/item-option-slider.component.ts +12 -3
  113. package/react/components/item-option.component.ts +12 -3
  114. package/react/esm/components/interactive-viz-item.component.d.ts +8 -2
  115. package/react/esm/components/interactive-viz-item.component.js +7 -1
  116. package/react/esm/components/item-option-color-picker.component.d.ts +6 -2
  117. package/react/esm/components/item-option-color-picker.component.js +6 -2
  118. package/react/esm/components/item-option-color-range.component.d.ts +6 -2
  119. package/react/esm/components/item-option-color-range.component.js +6 -2
  120. package/react/esm/components/item-option-guidelines.component.d.ts +6 -2
  121. package/react/esm/components/item-option-guidelines.component.js +6 -2
  122. package/react/esm/components/item-option-panel.component.d.ts +8 -2
  123. package/react/esm/components/item-option-panel.component.js +8 -2
  124. package/react/esm/components/item-option-slider.component.d.ts +8 -2
  125. package/react/esm/components/item-option-slider.component.js +8 -2
  126. package/react/esm/components/item-option.component.d.ts +8 -2
  127. package/react/esm/components/item-option.component.js +8 -2
  128. package/react/luzmo-stub.d.ts +7 -0
  129. package/react/package.json +2 -2
  130. package/standalone/add-to-dashboard.js +40 -40
  131. package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-CR-EUEPf.js} +2 -2
  132. package/standalone/chunks/{choropleth-map-options.config-Cs4Kvr9h.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
  133. package/standalone/chunks/{color-range-utils-CKDpd3gZ.js → color-range-utils-BVyHBRiq.js} +1 -1
  134. package/standalone/chunks/de-BkB0q1Eg.js +2 -0
  135. package/standalone/chunks/display-settings-binning-BeLLxd3i.js +38 -0
  136. package/standalone/chunks/display-settings-datetime-BkeiKIVV.js +199 -0
  137. package/standalone/chunks/display-settings-grand-totals-BuhpQKJ6.js +26 -0
  138. package/standalone/chunks/display-settings-numeric-m30IYI7I.js +172 -0
  139. package/standalone/chunks/display-settings-period-over-period-CqDlOSRn.js +209 -0
  140. package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
  141. package/standalone/chunks/en-63f7j4v7.js +2 -0
  142. package/standalone/chunks/en-GB-QAmXQf8W.js +2 -0
  143. package/standalone/chunks/en-US-63f7j4v7.js +2 -0
  144. package/standalone/chunks/es-Bo0jStZn.js +2 -0
  145. package/standalone/chunks/{filters-DKgJcQGP.js → filters-CxgBXUF1.js} +61 -61
  146. package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-Cq94j3-f.js} +17 -17
  147. package/standalone/chunks/fr-Co_qVhhV.js +2 -0
  148. package/standalone/chunks/{heat-map-options.config-DF5kjOOe.js → heat-map-options.config-DDQMD38W.js} +1 -1
  149. package/standalone/chunks/{heat-table-options.config-DaePzfHG.js → heat-table-options.config-B4K0Ygug.js} +1 -1
  150. package/standalone/chunks/is-same-option-value-7kXNF4st.js +2 -0
  151. package/standalone/chunks/item-option-action-button-group-BoyqF9vt.js +35 -0
  152. package/standalone/chunks/item-option-base-CBcDT8MX.js +38 -0
  153. package/standalone/chunks/item-option-color-palette-picker-C9PGAv4V.js +22 -0
  154. package/standalone/chunks/item-option-color-picker-D4fVJlqF.js +19 -0
  155. package/standalone/chunks/item-option-color-range-BlAdTguE.js +83 -0
  156. package/standalone/chunks/item-option-guidelines-DMsYsHDu.js +120 -0
  157. package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-NUbm1drg.js} +1 -1
  158. package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-DRp7kbHL.js} +1 -1
  159. package/standalone/chunks/item-option-panel-cXrRclzM.js +316 -0
  160. package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-Ba09L4Cs.js} +1 -1
  161. package/standalone/chunks/item-option-position-picker-GEGTnhjw.js +14 -0
  162. package/standalone/chunks/item-option-positions-number-field-n44s1k5v.js +31 -0
  163. package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-3s_b1NvR.js} +1 -1
  164. package/standalone/chunks/item-option-slider-DtY65Gxk.js +18 -0
  165. package/standalone/chunks/item-option-switch-4sJaI0mx.js +12 -0
  166. package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-Bt6Lj6kh.js} +1 -1
  167. package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BOSVFBIy.js} +43 -43
  168. package/standalone/chunks/load-data-fields-for-datasets-CDlut-6S.js +25 -0
  169. package/standalone/chunks/localized-decorator-DosMCCQo.js +2 -0
  170. package/standalone/chunks/{version-BW4Ixl63.js → localized-mixin-BWJj88bd.js} +1 -1
  171. package/standalone/chunks/nl-CQz2jrVx.js +2 -0
  172. package/standalone/chunks/option-interaction-controller-BuwRr21c.js +2 -0
  173. package/standalone/chunks/{route-map-options.config-D7FfzIiU.js → route-map-options.config-CGBkHnhM.js} +1 -1
  174. package/standalone/chunks/{spike-map-options.config-CZiFzDm9.js → spike-map-options.config-CSenlJ_F.js} +1 -1
  175. package/standalone/interactive-viz-item.js +62 -55
  176. package/standalone/item-grid.js +10 -10
  177. package/standalone/manifest.json +44 -43
  178. package/utils/option-interaction/index.d.ts +2 -0
  179. package/utils/option-interaction/is-same-option-value.d.ts +10 -0
  180. package/utils/option-interaction/option-interaction-controller.d.ts +54 -0
  181. package/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
  182. package/utils/store/base-store.d.ts +9 -0
  183. package/utils/store/tests/store-base-history.test.d.ts +1 -0
  184. package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
  185. package/components/interactive-viz-item-D537mo3l.cjs +0 -261
  186. package/components/item-option-CqGDFdPj.cjs +0 -269
  187. package/components/item-option-color-picker-BpPoOO2b.cjs +0 -34
  188. package/components/item-option-color-picker-cojuCvu5.js +0 -84
  189. package/components/item-option-color-range-CMBEx1fi.cjs +0 -98
  190. package/components/item-option-color-range-Dt7Bv06p.js +0 -217
  191. package/components/item-option-guidelines-Beh0DlG0.cjs +0 -135
  192. package/components/item-option-slider-Bo5vs6nr.js +0 -89
  193. package/components/item-option-slider-CyWKWr5D.cjs +0 -33
  194. package/standalone/chunks/color-7IgCGZKz.js +0 -2
  195. package/standalone/chunks/de-mdZT2W1G.js +0 -2
  196. package/standalone/chunks/display-settings-binning-Byffw2Kl.js +0 -38
  197. package/standalone/chunks/display-settings-datetime-CD52d6Sv.js +0 -199
  198. package/standalone/chunks/display-settings-grand-totals-Cky99LX9.js +0 -26
  199. package/standalone/chunks/display-settings-numeric-C9ea7Tgc.js +0 -172
  200. package/standalone/chunks/display-settings-period-over-period-BLSGumkD.js +0 -209
  201. package/standalone/chunks/embed-BfHBKhIe.js +0 -231
  202. package/standalone/chunks/en-CSboh17P.js +0 -2
  203. package/standalone/chunks/en-GB-HoXKQBOY.js +0 -2
  204. package/standalone/chunks/en-US-CSboh17P.js +0 -2
  205. package/standalone/chunks/es-Di5D8JFd.js +0 -2
  206. package/standalone/chunks/fr-DZku7iB9.js +0 -2
  207. package/standalone/chunks/item-option-action-button-group-BEAwPHVw.js +0 -35
  208. package/standalone/chunks/item-option-base-CRUxNhJQ.js +0 -38
  209. package/standalone/chunks/item-option-color-palette-picker-CBz61iZb.js +0 -22
  210. package/standalone/chunks/item-option-color-picker-Cr7ujQNO.js +0 -16
  211. package/standalone/chunks/item-option-color-range-CyJd1LZ_.js +0 -80
  212. package/standalone/chunks/item-option-guidelines-6NjpzS6b.js +0 -117
  213. package/standalone/chunks/item-option-panel-VxvWU56c.js +0 -298
  214. package/standalone/chunks/item-option-position-picker-Bkc4JvJX.js +0 -14
  215. package/standalone/chunks/item-option-positions-number-field-Dr_315TE.js +0 -31
  216. package/standalone/chunks/item-option-slider-l9wt7_0c.js +0 -15
  217. package/standalone/chunks/item-option-switch-DeihDHhM.js +0 -12
  218. package/standalone/chunks/load-data-fields-for-datasets-ClctSj6y.js +0 -25
  219. package/standalone/chunks/localized-decorator-DJVBmJVH.js +0 -2
  220. package/standalone/chunks/nl-CViTevL3.js +0 -2
@@ -0,0 +1,199 @@
1
+
2
+ import{n as e,r as t,t as n}from"./localized-mixin-BWJj88bd.js";import{t as r}from"./localized-decorator-DosMCCQo.js";import{i,o as a,s as o}from"./load-data-fields-for-datasets-CDlut-6S.js";import{n as s,t as c}from"./luzmoCheckbox-BksyONqE.js";import{d as l,f as u,p as d}from"./chart-helpers-CR-EUEPf.js";import{t as f}from"./task-BlhDPTQS.js";import{g as p,m}from"./item-slot-picker-panel-BOSVFBIy.js";import{html as h,property as g,query as _,unsafeCSS as v}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/picker.js";var y={"~":()=>t(`Auto`,{desc:`Automatic setting of the option`}),"/":()=>`/`,"-":()=>`-`,".":()=>`.`},b=`:host{font-family:var(--luzmo-display-settings-datetime-font-family,var(--luzmo-font-family))}:host .settings-container{gap:var(--luzmo-display-settings-vertical-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-datetime-gap,var(--display-settings-datetime-gap));display:flex}:host{--display-settings-datetime-example-font-size:var(--luzmo-font-size-s);--display-settings-datetime-example-color:var(--luzmo-font-color);--display-settings-datetime-example-label-font-weight:bold;--display-settings-datetime-example-label-color:var(--luzmo-primary);--display-settings-datetime-example-language-color:var(--luzmo-primary);--display-settings-datetime-gap:var(--luzmo-spacing-3);--display-settings-datetime-example-height:var(--luzmo-component-height)}:host([size=s]){--display-settings-datetime-gap:var(--luzmo-spacing-3);--display-settings-datetime-example-height:var(--luzmo-component-height-s);--display-settings-datetime-example-font-size:var(--luzmo-font-size-s)}:host([size=l]){--display-settings-datetime-gap:var(--luzmo-spacing-4);--display-settings-datetime-example-height:var(--luzmo-component-height-l);--display-settings-datetime-example-font-size:var(--luzmo-font-size)}:host([size=xl]){--display-settings-datetime-gap:var(--luzmo-spacing-5);--display-settings-datetime-example-height:var(--luzmo-component-height-xl);--display-settings-datetime-example-font-size:var(--luzmo-font-size-l)}`,x=class extends n(u(d,{validSizes:Object.values(l)})){constructor(...e){super(...e),this._loadLocaleFormatsConfig=new f(this,{task:async([e])=>{if(e&&e!==this._contentLanguageLoaded){let t=/* #__PURE__ */ Object.assign({"../../utils/formatter/formats/cs.ts":()=>import(`./cs-DLnr3a23.js`),"../../utils/formatter/formats/da.ts":()=>import(`./da-BJgbo0uE.js`),"../../utils/formatter/formats/de.ts":()=>import(`./de-DPgYMyja.js`),"../../utils/formatter/formats/en-GB.ts":()=>import(`./en-GB-QAmXQf8W.js`),"../../utils/formatter/formats/en-US.ts":()=>import(`./en-US-63f7j4v7.js`),"../../utils/formatter/formats/en.ts":()=>import(`./en-63f7j4v7.js`),"../../utils/formatter/formats/es.ts":()=>import(`./es-Dp1UuDDz.js`),"../../utils/formatter/formats/fi.ts":()=>import(`./fi-CLQ6vC7V.js`),"../../utils/formatter/formats/fr.ts":()=>import(`./fr-D8xrUEX4.js`),"../../utils/formatter/formats/he.ts":()=>import(`./he-DHPb0VBo.js`),"../../utils/formatter/formats/hu.ts":()=>import(`./hu-BpaYooip.js`),"../../utils/formatter/formats/it.ts":()=>import(`./it-DWTvD2Xn.js`),"../../utils/formatter/formats/ja.ts":()=>import(`./ja-CtDlXHD1.js`),"../../utils/formatter/formats/ko.ts":()=>import(`./ko-CekuHU50.js`),"../../utils/formatter/formats/mk.ts":()=>import(`./mk-Dq3YK4jD.js`),"../../utils/formatter/formats/nl.ts":()=>import(`./nl-7csxtU-I.js`),"../../utils/formatter/formats/no.ts":()=>import(`./no-DJNRx8au.js`),"../../utils/formatter/formats/pl.ts":()=>import(`./pl-zDnuk9Gd.js`),"../../utils/formatter/formats/pt.ts":()=>import(`./pt-BEVAH5AJ.js`),"../../utils/formatter/formats/ru.ts":()=>import(`./ru-Ceji1Fqk.js`),"../../utils/formatter/formats/sv.ts":()=>import(`./sv-CgssnOqA.js`),"../../utils/formatter/formats/tr.ts":()=>import(`./tr-i3G2sFi4.js`),"../../utils/formatter/formats/zh-CN.ts":()=>import(`./zh-CN-NVnv57dz.js`),"../../utils/formatter/formats/zh-TW.ts":()=>import(`./zh-TW-NVnv57dz.js`)});if(t[`../../utils/formatter/formats/${e}.ts`]){let n=await t[`../../utils/formatter/formats/${e}.ts`]();this._localeFormats=n?.default??{}}return this._contentLanguageLoaded=e,this._localeFormats}},args:()=>[this.contentLanguage]}),this.contentLanguage=`en`,this.size=`m`,this.slotContent={},this._dateLevel=5,this._displayAs=`default`,this._weekStart=`monday`,this._weekDayAndMonthInYearFormat=`long`,this._dateFormat=`auto`,this._dateSeparator=`~`,this._sendEvent=()=>{this._calculateSlotContent(),this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:this._currentSlotContent}}))}}static get styles(){return[v(b)]}_parseSlotContent(){this._dateLevel=this.slotContent?.level??this.slotContent?.lowestLevel??5,this._displayAs=this.slotContent?.datetimeDisplayMode??`default`,this._displayAs===`weekday_number`&&(this._displayAs=`day_in_week`,this._weekDayAndMonthInYearFormat=`number`),this._displayAs===`weekday_name`&&(this._displayAs=`day_in_week`),this._displayAs===`month_number`&&(this._displayAs=`month_in_year`,this._weekDayAndMonthInYearFormat=`number`),this._displayAs===`month_name`&&(this._displayAs=`month_in_year`),this._parseSavedFormat()}_parseSavedFormat(){let e=this.slotContent?.format??`%d-%m-%Y`,t=e.match(/[./-]/);if(this._dateSeparator=e.includes(`~`)?`~`:t?.[0]??`~`,e.includes(`%amd`))this._dateFormat=`auto`;else{let t=e.indexOf(`%d`),n=e.indexOf(`%m`);t!==-1&&n!==-1&&(this._dateFormat=t<n?`ddmm`:`mmdd`)}this._24hFormat=e.includes(`%H`),this._monthName=/%B|%b/.test(e),this._weekDay=/%a|%A/.test(e),this._monthName&&(this._monthNameFormat=e.includes(`%b`)?`short`:`long`),this._weekDay&&(this._weekDayAndMonthInYearFormat=e.includes(`%a`)?`short`:`long`);let n=this._dateLevel===5&&this.slotContent?.weekDayNameFormat||this._dateLevel===3&&this.slotContent?.monthNameFormat;n&&(this._weekDayAndMonthInYearFormat=n)}_calculateFormat(){let e,t=this._localeFormats?.smartDateFormats??p;this._monthName?(e=t.filter(e=>e.monthType===`name`&&e.longText===(this._monthNameFormat===`long`)&&e.weekday===this._weekDay),e.length>0?this._format=e[0].key:(this._weekDayAndMonthInYearFormat=`short`,this._weekDay=!0,this._format=`%a %e %B %Y`)):(e=this._dateLevel&&this._dateLevel===4?t.filter(e=>e.monthType===`number`&&e.mmdd===(this._weekFormat===`mmdd`||this._weekFormat!==`ddmm`&&null)&&e.separator===this._dateSeparator):t.filter(e=>e.monthType===`number`&&e.mmdd===(this._dateFormat===`mmdd`||this._dateFormat!==`ddmm`&&null)&&e.separator===this._dateSeparator),this._dateFormat===`auto`&&this._dateLevel&&this._dateLevel!==4?this._format=`%amd`+this._dateSeparator+`%Y`:e.length>0?this._format=e[0].key:(this._dateFormat=`ddmm`,this._dateSeparator=`/`,this._format=`%d/%m/%Y`)),this._dateLevel&&this._dateLevel>5&&(this._format+=this._24hFormat?` %H:%M:%S.%L`:` %I:%M:%S.%L %p`)}_setWeekStartsOn(){this._weekStart=this._weekStartElement.value,this._sendEvent(),this.requestUpdate()}_setDisplayAs(){this._displayAs=this._displayAsElement.value,this._sendEvent(),this.requestUpdate()}_setWeekdayAndMonthInYearFormat(){this._weekDayAndMonthInYearFormat=this._weekDayAndMonthInYearFormatElement.selected?.[0]??`long`,this._sendEvent(),this.requestUpdate()}_setMonthNameFormat(){this._monthNameFormat=this._monthNameFormatElement.selected?.[0],this._sendEvent(),this.requestUpdate()}_setMonthName(){this._monthName=this._monthNameElement.selected,this._sendEvent(),this.requestUpdate()}_setWeekFormat(){this._weekFormat=this._weekFormatElement.selected?.[0],this._sendEvent(),this.requestUpdate()}_setDateFormat(){this._dateFormat=this._dateFormatElement.value,this._sendEvent(),this.requestUpdate()}_setDateSeparator(){this._dateSeparator=this._dateSeparatorElement.value,this._sendEvent(),this.requestUpdate()}_set24hFormat(){this._24hFormat=this._format24hElement.selected,this._sendEvent(),this.requestUpdate()}_setWeekday(){this._weekDay=this._weekDayElement.selected,this._sendEvent(),this.requestUpdate()}_calculateSlotContent(){this._currentSlotContent={...this.slotContent},this._calculateFormat(),this._currentSlotContent.format=this._format,this._displayAs==="default"?delete this._currentSlotContent.datetimeDisplayMode:(this._currentSlotContent.datetimeDisplayMode=this._displayAs,this._displayAs===`week_in_year`?this._currentSlotContent.datetimeDisplayMode=this._weekDayAndMonthInYearFormat===`number`?`week_number`:`week_name`:this._displayAs===`month_in_year`?this._currentSlotContent.datetimeDisplayMode=this._weekDayAndMonthInYearFormat===`number`?`month_number`:`month_name`:this._displayAs===`day_in_week`&&(this._currentSlotContent.datetimeDisplayMode=this._weekDayAndMonthInYearFormat===`number`?`weekday_number`:`weekday_name`,this._currentSlotContent.weekStart=this._weekStart),this._weekDayAndMonthInYearFormat&&(this._dateLevel===3?this._currentSlotContent.monthNameFormat=this._weekDayAndMonthInYearFormat:this._dateLevel===5&&(this._currentSlotContent.weekDayNameFormat=this._weekDayAndMonthInYearFormat)))}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._parseSlotContent(),this._calculateSlotContent())}_renderDisplaySettings(){let e=i?.[`level${this._dateLevel??0}`]?.map(e=>h`<luzmo-menu-item value=${e.key}>
3
+ ${e.i18n()}
4
+ </luzmo-menu-item>`);return h`<div class="setting">
5
+ <luzmo-field-label .size=${this.size} for="display-as"
6
+ >${t(`Display`,{desc:`Label for display setting`})}</luzmo-field-label
7
+ >
8
+ <luzmo-picker
9
+ id="display-as"
10
+ size=${this.size}
11
+ variant="highlight"
12
+ value=${this._displayAs??`default`}
13
+ @change=${this._setDisplayAs}
14
+ >
15
+ ${e}
16
+ </luzmo-picker>
17
+ </div>`}_renderWeekDayAndMonthNameFormatSettings(){let e=Object.keys(a).map(e=>h`<luzmo-action-button value=${e}>
18
+ ${a[e]()}
19
+ </luzmo-action-button>`);return h` <div class="setting">
20
+ <luzmo-field-label .size=${this.size} for="weekday-and-month-in-year-format"
21
+ >${t(`Format`,{desc:`Label for format setting`})}</luzmo-field-label
22
+ >
23
+ <luzmo-action-group
24
+ emphasized
25
+ id="weekday-and-month-in-year-format"
26
+ size=${this.size}
27
+ compact
28
+ .selected=${[this._weekDayAndMonthInYearFormat??`short`]}
29
+ selects="single"
30
+ @change=${this._setWeekdayAndMonthInYearFormat}
31
+ >
32
+ ${e}
33
+ </luzmo-action-group>
34
+ </div>`}_renderMonthNameFormatSettings(){return h` <div class="setting">
35
+ <luzmo-field-label .size=${this.size} for="month-name-format"
36
+ >${t(`Format`,{desc:`Label for format setting`})}</luzmo-field-label
37
+ >
38
+ <luzmo-action-group
39
+ emphasized
40
+ id="month-name-format"
41
+ size=${this.size}
42
+ compact
43
+ .selected=${[this._monthNameFormat??`long`]}
44
+ selects="single"
45
+ @change=${this._setMonthNameFormat}
46
+ >
47
+ <luzmo-action-button value="short">
48
+ ${t(`Short`,{desc:`Short format option`})}
49
+ </luzmo-action-button>
50
+ <luzmo-action-button value="long">
51
+ ${t(`Long`,{desc:`Long format option`})}
52
+ </luzmo-action-button>
53
+ </luzmo-action-group>
54
+ </div>`}_renderWeekFormatSettings(){let e=this._localeFormats?.smartDateFormats??p,n=e.find(e=>e.mmdd===!0&&e.separator===this._dateSeparator&&e.monthType===`number`),r=e.find(e=>e.mmdd===!1&&e.separator===this._dateSeparator&&e.monthType===`number`);return h` <div class="setting">
55
+ <luzmo-field-label .size=${this.size} for="week-format"
56
+ >${t(`Format`,{desc:`Label for format setting`})}</luzmo-field-label
57
+ >
58
+ <luzmo-action-group
59
+ emphasized
60
+ id="week-format"
61
+ size=${this.size}
62
+ compact
63
+ .selected=${[this._weekFormat??`ddmm`]}
64
+ selects="single"
65
+ @change=${this._setWeekFormat}
66
+ >
67
+ <luzmo-action-button value="ddmm">
68
+ ${m({...this._currentSlotContent,type:`datetime`,format:r?.key},{localFormats:this._localeFormats,level:this._dateLevel})(/* @__PURE__ */ new Date)}
69
+ </luzmo-action-button>
70
+ <luzmo-action-button value="mmdd"
71
+ >${m({...this._currentSlotContent,type:`datetime`,format:n?.key},{localFormats:this._localeFormats,level:this._dateLevel})(/* @__PURE__ */ new Date)}</luzmo-action-button
72
+ >
73
+ </luzmo-action-group>
74
+ </div>`}_renderWeekStartsOnSettings(){let e=Object.keys(o).map(e=>h`<luzmo-menu-item value=${e}>
75
+ ${o[e]()}
76
+ </luzmo-menu-item>`);return h`<div class="setting">
77
+ <luzmo-field-label .size=${this.size} for="week-start"
78
+ >${t(`Week starts on`,{desc:`Label for week start setting`})}</luzmo-field-label
79
+ >
80
+ <luzmo-picker
81
+ id="week-start"
82
+ size=${this.size}
83
+ variant="highlight"
84
+ value=${this._weekStart??`Auto`}
85
+ @change=${this._setWeekStartsOn}
86
+ >
87
+ ${e}
88
+ </luzmo-picker>
89
+ </div>`}_renderMonthNameSettings(){return h`<div class="settings-">
90
+ <luzmo-field-label .size=${this.size} for="month-name"
91
+ >${t(`Month`,{desc:`Time unit`})}</luzmo-field-label
92
+ >
93
+ <luzmo-action-button
94
+ id="month-name"
95
+ emphasized
96
+ toggles
97
+ .size=${this.size}
98
+ ?selected=${this._monthName}
99
+ @change=${this._setMonthName}
100
+ >
101
+ <luzmo-icon
102
+ slot="icon"
103
+ .size=${this.size}
104
+ .icon=${this._monthName?s:c}
105
+ ></luzmo-icon>
106
+ ${t(`Name`)}
107
+ </luzmo-action-button>
108
+ </div>`}_renderDateFormatSettings(){let e=this._dateSeparator===`~`?`/`:this._dateSeparator;return h`<div class="setting">
109
+ <luzmo-field-label .size=${this.size} for="date-format"
110
+ >${t(`Format`,{desc:`Label for format setting`})}</luzmo-field-label
111
+ >
112
+ <luzmo-picker
113
+ id="date-format"
114
+ size=${this.size}
115
+ variant="highlight"
116
+ value=${this._dateFormat??`Auto`}
117
+ @change=${this._setDateFormat}
118
+ >
119
+ <luzmo-menu-item value="auto">
120
+ ${t(`Auto`,{desc:`Automatic setting of the option`})}
121
+ </luzmo-menu-item>
122
+ <luzmo-menu-item value="mmdd">12${e}31</luzmo-menu-item>
123
+ <luzmo-menu-item value="ddmm">31${e}12</luzmo-menu-item>
124
+ </luzmo-picker>
125
+ </div>`}_renderSeparatorSettings(){let e=Object.keys(y).map(e=>h`<luzmo-menu-item value=${e}>
126
+ ${y[e]()}
127
+ </luzmo-menu-item>`);return h`<div class="setting">
128
+ <luzmo-field-label .size=${this.size} for="date-separator"
129
+ >${t(`Separator`,{desc:`Label for date separator setting`})}</luzmo-field-label
130
+ >
131
+ <luzmo-picker
132
+ id="date-separator"
133
+ size=${this.size}
134
+ variant="highlight"
135
+ value=${this._dateSeparator??`~`}
136
+ @change=${this._setDateSeparator}
137
+ >
138
+ ${e}
139
+ </luzmo-picker>
140
+ </div>`}_render24hFormatSettings(){return h`<div class="settings-">
141
+ <luzmo-field-label .size=${this.size} for="format-24h"
142
+ >${t(`24h`,{desc:`Label for 24h format setting`})}</luzmo-field-label
143
+ >
144
+ <luzmo-action-button
145
+ id="format-24h"
146
+ emphasized
147
+ toggles
148
+ .size=${this.size}
149
+ .label=${t(`Show`)}
150
+ ?selected=${this._24hFormat}
151
+ @change=${this._set24hFormat}
152
+ >
153
+ <luzmo-icon
154
+ slot="icon"
155
+ .size=${this.size}
156
+ .icon=${this._24hFormat?s:c}
157
+ ></luzmo-icon>
158
+ </luzmo-action-button>
159
+ </div>`}_renderWeekdaySettings(){return h`<div class="settings-">
160
+ <luzmo-field-label .size=${this.size} for="weekday"
161
+ >${t(`Weekday`,{desc:`Label for weekday setting`})}</luzmo-field-label
162
+ >
163
+ <luzmo-action-button
164
+ id="weekday"
165
+ emphasized
166
+ toggles
167
+ .size=${this.size}
168
+ ?selected=${this._weekDay}
169
+ @change=${this._setWeekday}
170
+ >
171
+ <luzmo-icon
172
+ slot="icon"
173
+ .size=${this.size}
174
+ .icon=${this._weekDay?s:c}
175
+ ></luzmo-icon>
176
+ ${t(`Show`)}
177
+ </luzmo-action-button>
178
+ </div>`}_renderAllSettings(){return h`<div class="settings-container">
179
+ ${this._dateLevel&&![1,9].includes(this._dateLevel)?h` <div class="settings-row">
180
+ ${this._renderDisplaySettings()}
181
+ ${this._dateLevel&&this._dateLevel>=5&&this._displayAs===`day_in_week`?this._renderWeekStartsOnSettings():``}
182
+ </div>`:``}
183
+ ${[`month_in_year`,`day_in_week`].includes(this._displayAs??``)?h` <div class="settings-row">
184
+ ${this._renderWeekDayAndMonthNameFormatSettings()}
185
+ </div>`:``}
186
+ ${this._dateLevel&&this._dateLevel>1&&this._displayAs==="default"?h` <div class="settings-row">
187
+ ${this._dateLevel&&this._dateLevel!==4&&this._dateLevel!==2?this._renderMonthNameSettings():``}
188
+ ${this._dateLevel&&this._dateLevel!==4&&this._dateLevel>2&&this._monthName?this._renderMonthNameFormatSettings():``}
189
+ ${this._dateLevel&&this._dateLevel===4&&!this._monthName?this._renderWeekFormatSettings():``}
190
+ ${this._dateLevel&&this._dateLevel>=5&&!this._monthName?this._renderDateFormatSettings():``}
191
+ ${this._dateLevel&&this._dateLevel>1&&!this._monthName?this._renderSeparatorSettings():``}
192
+ ${this._dateLevel&&this._dateLevel>=5&&this._monthName?this._renderWeekdaySettings():``}
193
+ ${this._dateLevel&&this._dateLevel>5?this._render24hFormatSettings():``}
194
+ </div>`:``}
195
+ </div>`}render(){return this._loadLocaleFormatsConfig.render({pending:()=>h`<luzmo-progress-circle
196
+ indeterminate
197
+ .label=${t(`Loading`,{desc:`Loading spinner label`})}
198
+ .size=${this.size}
199
+ ></luzmo-progress-circle>`,complete:()=>this._renderAllSettings(),error:()=>this._renderAllSettings()})}};e([g({type:String})],x.prototype,`contentLanguage`,void 0),e([g({type:String})],x.prototype,`size`,void 0),e([g({type:Object,reflect:!1})],x.prototype,`slotContent`,void 0),e([_(`#display-as`)],x.prototype,`_displayAsElement`,void 0),e([_(`#week-start`)],x.prototype,`_weekStartElement`,void 0),e([_(`#weekday-and-month-in-year-format`)],x.prototype,`_weekDayAndMonthInYearFormatElement`,void 0),e([_(`#month-name-format`)],x.prototype,`_monthNameFormatElement`,void 0),e([_(`#month-name`)],x.prototype,`_monthNameElement`,void 0),e([_(`#week-format`)],x.prototype,`_weekFormatElement`,void 0),e([_(`#date-format`)],x.prototype,`_dateFormatElement`,void 0),e([_(`#date-separator`)],x.prototype,`_dateSeparatorElement`,void 0),e([_(`#weekday`)],x.prototype,`_weekDayElement`,void 0),e([_(`#format-24h`)],x.prototype,`_format24hElement`,void 0),x=e([r()],x),customElements.get(`luzmo-display-settings-datetime`)||customElements.define(`luzmo-display-settings-datetime`,x);
@@ -0,0 +1,26 @@
1
+
2
+ import{n as e,r as t,t as n}from"./localized-mixin-BWJj88bd.js";import{t as r}from"./localized-decorator-DosMCCQo.js";import{n as i,t as a}from"./luzmoCheckbox-BksyONqE.js";import{d as o,f as s,p as c}from"./chart-helpers-CR-EUEPf.js";import{html as l,ifDefined as u,property as d,state as f,unsafeCSS as p}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/field-label.js";var m=`:host .settings-container{gap:var(--luzmo-display-settings-vertical-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-grand-totals-gap,var(--display-settings-grand-totals-gap));display:flex}:host,:host([size=s]){--display-settings-grand-totals-gap:var(--luzmo-spacing-3)}:host([size=l]){--display-settings-grand-totals-gap:var(--luzmo-spacing-4)}:host([size=xl]){--display-settings-grand-totals-gap:var(--luzmo-spacing-5)}`,h=class extends n(s(c,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.slotContent={}}static get styles(){return[p(m)]}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._enabled=this.slotContent?.grandTotals?.enabled??!1)}toggleGrandTotals(){this._enabled=!this._enabled,this.sendEvent()}sendEvent(){let e={enabled:!!this._enabled};this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this.slotContent,grandTotals:e}}}))}render(){return l`<div class="settings-container">
3
+ <div class="settings-row">
4
+ <div class="setting">
5
+ <luzmo-field-label .size=${this.size} for="grand-totals"
6
+ >${t(`Grand totals`,{desc:`Label for grand totals setting in a table`})}</luzmo-field-label
7
+ >
8
+ <luzmo-action-button
9
+ id="grand-totals"
10
+ toggles
11
+ emphasized
12
+ .size=${this.size}
13
+ ?selected=${this._enabled}
14
+ class=${u(this._enabled?`active`:`inactive`)}
15
+ @click=${this.toggleGrandTotals}
16
+ >
17
+ <luzmo-icon
18
+ slot="icon"
19
+ .size=${this.size}
20
+ .icon=${this._enabled?i:a}
21
+ ></luzmo-icon>
22
+ ${this._enabled?t(`Enabled`,{desc:`Option set to enabled`}):t(`Disabled`,{desc:`Option set to disabled`})}
23
+ </luzmo-action-button>
24
+ </div>
25
+ </div>
26
+ </div>`}};e([d()],h.prototype,`slotContent`,void 0),e([f()],h.prototype,`_enabled`,void 0),h=e([r()],h),customElements.get(`luzmo-display-settings-grand-totals`)||customElements.define(`luzmo-display-settings-grand-totals`,h);
@@ -0,0 +1,172 @@
1
+
2
+ import{n as e,r as t,t as n}from"./localized-mixin-BWJj88bd.js";import{t as r}from"./localized-decorator-DosMCCQo.js";import{t as i}from"./luzmoAngleDown-PNrItYzK.js";import{n as a,u as o}from"./load-data-fields-for-datasets-CDlut-6S.js";import{t as s}from"./luzmo-icon-markup-ByaNI6dg.js";import{d as c,f as l,p as u}from"./chart-helpers-CR-EUEPf.js";import{t as d}from"./localize-DXRmGRe-.js";import{v as f}from"./item-slot-picker-panel-BOSVFBIy.js";import{html as p,nothing as m,property as h,query as g,state as _,unsafeCSS as v}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/menu.js";import{removeSlottableRequest as y}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/tooltip.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/picker.js";var b=`:host .settings-container{gap:var(--luzmo-display-settings-vertical-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap,var(--display-settings-numeric-gap));display:flex}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start,var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;max-width:100%;color:var(--luzmo-font-color);white-space:nowrap;cursor:default;margin:.5rem 1rem;font-weight:600;overflow:hidden}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{width:auto;font-size:.75em;line-height:1;position:absolute;bottom:45%;left:60%}.data-icon-type{text-align:center;width:1.5rem;display:inline-block;position:relative}:host{--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-2)}:host([size=s]){--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-1)}:host([size=l]){--display-settings-numeric-gap:var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-3)}:host([size=xl]){--display-settings-numeric-gap:var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-4)}`,x={sum:()=>t(`Sum`,{desc:`Aggregation label`}),cumulativesum:()=>t(`Cumulative sum`,{desc:`Aggregation label`}),average:()=>t(`Average`,{desc:`Aggregation label`}),median:()=>t(`Median`,{desc:`Aggregation label`}),count:()=>t(`Count rows`,{desc:`Aggregation label`}),distinctcount:()=>t(`Count distinct`,{desc:`Aggregation label`}),min:()=>t(`Minimum`,{desc:`Aggregation label`}),max:()=>t(`Maximum`,{desc:`Aggregation label`}),stddev:()=>t(`Standard deviation`,{desc:`Aggregation label`}),rate:()=>t(`Rate`,{desc:`Aggregation label`})},S={general:`123`,percentage:`%`,scientific:`SI`},C={time:()=>t(`Time`,{desc:`Time format option`}),short:()=>t(`Short`,{desc:`Short format option`}),long:()=>t(`Long`,{desc:`Long format option`})},w={Auto:{auto:!0,label:()=>t(`Auto`,{desc:`Automatic setting of the option`})},"1,000.00":{auto:!1,label:()=>`1,000.00`,thousandSeparator:`,`,decimalSeparator:`.`,hiddenFor:`scientific`},"1.000,00":{auto:!1,label:()=>`1.000,00`,thousandSeparator:`.`,decimalSeparator:`,`,hiddenFor:`scientific`},"1000.00":{auto:!1,label:()=>`1000.00`,decimalSeparator:`.`},"1000,00":{auto:!1,label:()=>`1000,00`,decimalSeparator:`,`}},T={levels:[{level:1,label:`years`},{level:2,label:`quarters`},{level:3,label:`months`},{level:4,label:`weeks`},{level:5,label:`days`},{level:6,label:`hours`},{level:7,label:`minutes`},{level:8,label:`seconds`},{level:9,label:`milliseconds`}]},E=class extends n(l(u,{validSizes:Object.values(c)})){constructor(...e){super(...e),this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._handleSlottableRequest=e=>{this._renderDurationLevelMenu=e.data!==y},this._sendEvent=()=>{let e={...this.slotContent,format:this._format,aggregationFunc:this._aggregationFunc};this._aggregationWeightColumn?e.aggregationWeight={...this._aggregationWeightColumn}:delete e.aggregationWeight,this._displayMode===`duration`?(e.duration=e.duration??{},e.duration.format=this._durationFormat,e.duration.levels=this._durationLevels):delete e.duration,this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:e}}))}}static get styles(){return[v(b)]}_parseSavedNumericFormatSettings(){if(this._displayMode=this.slotContent?.subtype===`duration`?`duration`:`numeric`,this._durationFormat=this.slotContent?.duration?.format??`short`,this._durationLevels=this.slotContent?.duration?.levels??[1],this._displayMode===`duration`)this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=this.slotContent?.format??`.0f`;let e=f(this._format??`.0f`);this._isAuto=e.typeFormat?.includes(`a`)??!1,this._displayAs=[`%`,`a%`,`y`,`ay`].includes(e.typeFormat)?`percentage`:[`s`,`as`,`w`,`aw`].includes(e.typeFormat)?`scientific`:`general`,this._precision=e.precision?Number.parseInt(e.precision.replace(`.`,``),10):+(this._displayAs===`scientific`),this._commaDecimals=[`z`,`az`,`y`,`ay`,`w`,`aw`].includes(e.typeFormat),this._thousandSeparator=e.comma===`,`,this._isAuto?this._numericFormatGroup=`Auto`:this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1.000,00`:!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1,000.00`:this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup=`1000,00`:!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup=`1000.00`)}}_setNumericDisplayAs(){this._displayAs=this._displayAsElement?.selected?.[0]??`general`,this._displayAs===`scientific`&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(e){let t=w[e?.detail??`Auto`];this._thousandSeparator=[`,`,`.`].includes(t?.thousandSeparator??``),this._commaDecimals=t?.decimalSeparator===`,`,this._isAuto=t?.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){Number.isNaN(this._precisionElement.value)&&(this._precisionElement.value=+(this._displayAs===`scientific`)),this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){let e=`f`,t=this.slotContent.subtype===`duration`?this._durationLevels&&this._durationLevels?.length===1?`numeric`:`duration`:`numeric`;if(this._maxDurationLevel=Math.min(...this._durationLevels),t===`duration`)(![`time`,`short`,`long`].includes(this._durationFormat??``)||this._maxDurationLevel<6&&this._durationFormat===`time`)&&(this._durationFormat=`short`);else{let t=this._displayAs??`general`;t===`general`&&this._commaDecimals?e=`z`:t===`percentage`&&this._commaDecimals?e=`y`:t===`scientific`&&this._commaDecimals?e=`w`:t===`percentage`?e=`%`:t===`scientific`&&(e=`s`),this._format=(this._thousandSeparator||this._isAuto?`,`:``)+`.`+this._precision+(this._isAuto?`a`:``)+e}}_setAggregationFunc(){let e=this._aggregationElement.value,t=this._aggregationFunc,n=this.slotContent.format;if(e!==(t===`weightedaverage`?`average`:t)){if(this._aggregationFunc=e===`average`&&this._aggregationWeightColumn?.column?`weightedaverage`:e,t===`rate`){let e=f(n),t=[`%`,`y`,`a%`,`ay`].includes(e.typeFormat);this.slotContent.subtype===`currency`&&t&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc===`rate`||t===`rate`)&&this.requestUpdate()}}_setAggregationWeight(){let e=this._aggregationWeightElement.value,t=this._aggregationFunc;if(e===`none`)this._aggregationWeightColumn=void 0,this._aggregationFunc===`weightedaverage`&&(this._aggregationFunc=`average`);else{let t,n;for(let r of this.measureColumns??[]){let i=r.columns?.find(t=>t.id===e);if(i){t=i,n=r.datasetId;break}}t&&(this._aggregationWeightColumn={column:t.id,set:n,columnSubType:t.subtype}),this._aggregationFunc===`average`&&(this._aggregationFunc=`weightedaverage`)}this._sendEvent(),this.requestUpdate(),(t===`weightedaverage`&&this._aggregationFunc===`average`||t===`average`&&this._aggregationFunc===`weightedaverage`)&&this.requestUpdate()}_setDurationLevels(){let e=this._durationLevels,t=this._durationLevelsElement.value.split(`,`).filter(e=>e!==``).map(e=>Number.parseInt(e,10));this._durationLevels=(t?.length??0)>=1?t:e,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){this._durationFormat=this._durationFormatElement?.selected?.[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat===`time`){let e=this._durationLevels.sort().at(-1);if([7,8,9].includes(e)){for(let t of{lev7:[6],lev8:[6,7],lev9:[6,7,8]}[`lev`+e])this._durationLevels.includes(t)||this._durationLevels.push(t);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=this.slotContent?.aggregationFunc??(this.slotContent?.type===`numeric`?`sum`:`count`),this._aggregationWeightColumn=this.slotContent?.aggregationWeight,this._isFormula=this.slotContent?.formula||this.slotContent?.formulaId)}_renderDurationLevelsSettings(){let e=T.levels.map(e=>{let t=!1;return this._durationFormat===`time`&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(t=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(t=!0),p`<luzmo-menu-item
3
+ value=${e.level}
4
+ ?selected=${this._durationLevels.includes(e.level)}
5
+ ?disabled=${t}
6
+ >
7
+ ${e.label}
8
+ </luzmo-menu-item>`});return p` <div class="setting">
9
+ <luzmo-field-label .size=${this.size} for="duration-levels">
10
+ ${t(`Duration levels`,{desc:`Label for duration levels setting`})}
11
+ </luzmo-field-label>
12
+ <luzmo-action-button id="duration-levels-trigger" size=${this.size} aria-haspopup="true" aria-expanded=${this._renderDurationLevelMenu?`true`:`false`}>
13
+ ${this._durationLevels.length}
14
+ ${this._durationLevels.length===1?t(`level`,{desc:`Singular form of level for duration levels`}):t(`levels`,{desc:`Plural form of level for duration levels`})} ${t(`active`,{desc:`Active suffix for duration levels count`})}
15
+ <span class="duration-angle-down-icon">
16
+ ${s(i)}
17
+ </span>
18
+ </luzmo-action-button>
19
+ <luzmo-overlay
20
+ id="duration-levels-overlay"
21
+ trigger="duration-levels-trigger@click"
22
+ type="auto"
23
+ placement="bottom-start"
24
+ type="page"
25
+ @slottable-request=${this._handleSlottableRequest}
26
+ >
27
+ <luzmo-popover style="position: relative">
28
+ ${this._renderDurationLevelMenu?p` <luzmo-menu
29
+ id="duration-levels"
30
+ size=${this.size}
31
+ selects="multiple"
32
+ .value=${this._durationLevels.join(`,`)}
33
+ @change=${this._setDurationLevels}
34
+ >
35
+ ${e}
36
+ </luzmo-menu>`:``}
37
+ </luzmo-popover>
38
+ </luzmo-overlay>
39
+ </div>`}_renderDurationFormatSettings(){let e=Object.keys(C).map(e=>e===`time`&&(this._maxDurationLevel??1)<6?``:p`<luzmo-action-button value=${e}>
40
+ ${C[e]()}
41
+ </luzmo-action-button>`);return p` <div class="setting">
42
+ <luzmo-field-label .size=${this.size} for="duration-format">
43
+ ${t(`Format`,{desc:`Label for format setting`})}
44
+ </luzmo-field-label>
45
+ <luzmo-action-group
46
+ emphasized
47
+ id="duration-format"
48
+ size=${this.size}
49
+ compact=""
50
+ .selected=${[this._durationFormat??`short`]}
51
+ selects="single"
52
+ @change=${this._setDurationFormat}
53
+ >
54
+ ${e}
55
+ </luzmo-action-group>
56
+ </div>`}_renderNumericDisplayAsSettings(){let e=Object.keys(S).filter(e=>e!==`percentage`||(this.slotContent.subtype!==`currency`||this.slotContent.aggregationFunc===`rate`)&&this.slotContent.periodOverPeriod?.type!==`percentageChange`).map(e=>p`<luzmo-action-button value=${e}
57
+ >${S[e]}</luzmo-action-button
58
+ >`);return p`<div class="setting">
59
+ <luzmo-field-label .size=${this.size} for="display-as">
60
+ ${t(`Display as`,{desc:`Label for display as setting for the datetime field`})}
61
+ </luzmo-field-label>
62
+ <luzmo-action-group
63
+ emphasized
64
+ id="display-as"
65
+ size=${this.size}
66
+ compact=""
67
+ .selected=${[this._displayAs]}
68
+ selects="single"
69
+ @change=${this._setNumericDisplayAs}
70
+ >
71
+ ${e}
72
+ </luzmo-action-group>
73
+ </div>`}_renderNumericFormatSettings(){let e=Object.entries(w).filter(([,{hiddenFor:e}])=>!e||e!==this._displayAs).map(([e,{label:t}])=>p`<luzmo-menu-item value=${e}>${t()}</luzmo-menu-item>`);return p` <div class="setting">
74
+ <luzmo-field-label .size=${this.size} for="format">
75
+ ${t(`Format`,{desc:`Label for format setting`})}
76
+ </luzmo-field-label>
77
+ <luzmo-picker
78
+ id="format"
79
+ size=${this.size}
80
+ variant="highlight"
81
+ value=${this._numericFormatGroup??`Auto`}
82
+ @change=${this._setNumericSeparators}
83
+ >
84
+ ${e}
85
+ </luzmo-picker>
86
+ </div>
87
+ <div class="setting">
88
+ <luzmo-field-label .size=${this.size} for="precision" id="precision-label">
89
+ ${this._displayAs===`scientific`?t(`Precision`,{desc:`Label for precision setting`}):t(`Decimals`,{desc:`Label for decimals setting`})}
90
+ </luzmo-field-label>
91
+ <luzmo-number-field
92
+ id="precision"
93
+ label=${this._displayAs===`scientific`?t(`Precision`,{desc:`Label for precision setting`}):t(`Decimals`,{desc:`Label for decimals setting`})}
94
+ min=${+(this._displayAs===`scientific`)}
95
+ max="22"
96
+ size=${this.size}
97
+ value=${this._precision??+(this._displayAs===`scientific`)}
98
+ @change=${this._setPrecision}
99
+ ></luzmo-number-field>
100
+ </div>`}_renderAggregationSettings(){let e=Object.entries(x).filter(([e])=>[`count`,`distinctcount`].includes(e)||this.slotContent?.type===`numeric`).filter(([e])=>e!==`cumulativesum`||this.isCumulativeSumEnabled).map(([e,t])=>p`<luzmo-menu-item value=${e}>${t()}</luzmo-menu-item>`),n=[p`
101
+ <luzmo-menu-item
102
+ value="none"
103
+ class="no-weight"
104
+ >
105
+ <span class="no-weight-label">${t(`No weight`,{desc:`Label for no weight option`})}</span>
106
+ </luzmo-menu-item>
107
+ `,...(this.measureColumns??[]).flatMap(e=>{let t=typeof e.datasetName==`object`?d(e.datasetName,this.language):e.datasetName;return[p`<div class="dataset-header" role="group" aria-label=${t}>
108
+ ${t}
109
+ <luzmo-tooltip self-managed placement="right" size=${this.size}>
110
+ ${t}
111
+ </luzmo-tooltip>
112
+ </div>`,...(e.columns??[]).map(e=>{let t=typeof e.name==`object`?d(e.name,this.language):e.name,n=s(a(e,`s`)),r=e.expression?o:void 0,i=!!r,c=i?p`<span class="secondary-icon"
113
+ >${s(r)}</span
114
+ >`:m;return p`<luzmo-menu-item value=${e.id}>
115
+ <span class="data-icon-type" slot="icon">
116
+ <span class=${i?`with-secondary-icon`:``}
117
+ >${n}</span
118
+ >
119
+ ${c}
120
+ </span>
121
+ <span class="column-label text-truncate">${t}</span>
122
+ <luzmo-tooltip self-managed placement="right" size=${this.size}>
123
+ ${t}
124
+ </luzmo-tooltip>
125
+ </luzmo-menu-item>`})]})];return p`<div class="settings-row">
126
+ <div class="setting">
127
+ <luzmo-field-label .size=${this.size} for="aggregation">
128
+ ${t(`Aggregation`,{desc:`Label for aggregation setting`})}
129
+ </luzmo-field-label>
130
+ <luzmo-picker
131
+ id="aggregation"
132
+ size=${this.size}
133
+ variant="highlight"
134
+ value=${(()=>{let e=this.slotContent?.type===`numeric`?`sum`:`count`;return this._aggregationFunc===`weightedaverage`?`average`:this._aggregationFunc??e})()}
135
+ @change=${this._setAggregationFunc}
136
+ >
137
+ ${e}
138
+ </luzmo-picker>
139
+ </div>
140
+ ${[`rate`,`average`,`weightedaverage`].includes(this._aggregationFunc??``)?p`<div class="setting">
141
+ <luzmo-field-label .size=${this.size} for="weighting-column">
142
+ ${this._aggregationFunc===`rate`?t(`Denominator`,{desc:`Label for denominator field`}):t(`Weight`,{desc:`Label for weight field`})}
143
+ </luzmo-field-label>
144
+ ${this.measureColumns.length>0?p`
145
+ <luzmo-picker
146
+ id="weighting-column"
147
+ size=${this.size}
148
+ variant="highlight"
149
+ icons="none"
150
+ value=${this._aggregationWeightColumn?.column??`none`}
151
+ @change=${this._setAggregationWeight}
152
+ >
153
+ ${n}
154
+ </luzmo-picker>
155
+ `:p`<luzmo-picker
156
+ id="weighting-column"
157
+ size=${this.size}
158
+ variant="highlight"
159
+ icons="none"
160
+ value="none"
161
+ >
162
+ <luzmo-menu-item value="none">${t(`No weight`,{desc:`Label for no weight option`})}</luzmo-menu-item>
163
+ </luzmo-picker>`}
164
+ </div>`:``}
165
+ </div>`}render(){return p`<div class="settings-container">
166
+ <div class="settings-row">
167
+ ${this._displayMode===`duration`?this._renderDurationLevelsSettings():this._renderNumericDisplayAsSettings()}
168
+ ${this._durationLevels?.length>1?this._renderDurationFormatSettings():this._renderNumericFormatSettings()}
169
+ </div>
170
+ ${this._isFormula||this.isAggregationDisabled?m:this._renderAggregationSettings()}
171
+ </div>
172
+ </div>`}};e([h({type:Object,attribute:!1})],E.prototype,`slotContent`,void 0),e([h({type:Array,reflect:!1})],E.prototype,`measureColumns`,void 0),e([h({type:Boolean})],E.prototype,`isAggregationDisabled`,void 0),e([h({type:Boolean})],E.prototype,`isCumulativeSumEnabled`,void 0),e([g(`#display-as`)],E.prototype,`_displayAsElement`,void 0),e([g(`#precision`)],E.prototype,`_precisionElement`,void 0),e([g(`#aggregation`)],E.prototype,`_aggregationElement`,void 0),e([g(`#weighting-column`)],E.prototype,`_aggregationWeightElement`,void 0),e([g(`#duration-levels`)],E.prototype,`_durationLevelsElement`,void 0),e([g(`#duration-format`)],E.prototype,`_durationFormatElement`,void 0),e([_()],E.prototype,`_renderDurationLevelMenu`,void 0),E=e([r()],E),customElements.get(`luzmo-display-settings-numeric`)||customElements.define(`luzmo-display-settings-numeric`,E);