@luzmo/analytics-components-kit 1.0.1-alpha.146 → 1.0.1-alpha.147
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/index.cjs +1 -1
- package/components/ai-chat/index.js +5 -5
- package/components/{ai-chat-BEjlRutF.js → ai-chat-C2NIaBZt.js} +2 -1
- package/components/{ai-chat-BH0PuNwY.cjs → ai-chat-DRFkGM62.cjs} +2 -1
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +3 -3
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +3 -3
- package/components/{data-fields-select-CHOKEMb2.js → data-fields-select-CT_nHj54.js} +1 -1
- package/components/{data-fields-select-_WjjNpcl.cjs → data-fields-select-cqu8GYXD.cjs} +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +2 -2
- package/components/{dataset-selector-list-DYsi3LBF.cjs → dataset-selector-list-BWe9GmlS.cjs} +1 -1
- package/components/{dataset-selector-list-C5FvwP-r.js → dataset-selector-list-CA7bLSQv.js} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +3 -3
- package/components/{dataset-selector-row-Qwz9WmR4.cjs → dataset-selector-row-DvzyItQS.cjs} +1 -1
- package/components/{dataset-selector-row-BKIFTyJl.js → dataset-selector-row-a5GXd9bd.js} +1 -1
- package/components/de-Bf2VFw-x.cjs +20 -0
- package/components/{de-DOhCpte6.js → de-DvNwu9VQ.js} +2 -2
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +2 -2
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +3 -3
- package/components/{display-settings-binning-B58LCqmn.js → display-settings-binning-C2r57Fry.js} +1 -1
- package/components/{display-settings-binning-Bte25mmH.cjs → display-settings-binning-CnJWueZx.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +3 -3
- package/components/{display-settings-datetime-DAL8zjtk.cjs → display-settings-datetime-C6_LixJp.cjs} +1 -1
- package/components/{display-settings-datetime-DxSNsem7.js → display-settings-datetime-qmiiKrhJ.js} +1 -1
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +3 -3
- package/components/{display-settings-grand-totals-Poa2qL3U.js → display-settings-grand-totals-BwiU3Vh8.js} +1 -1
- package/components/{display-settings-grand-totals-NWow1vhX.cjs → display-settings-grand-totals-hWqhOTEC.cjs} +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +3 -3
- package/components/{display-settings-numeric-CTaS1NhY.js → display-settings-numeric-B5uxkOuA.js} +1 -1
- package/components/{display-settings-numeric-eG0gr9Jn.cjs → display-settings-numeric-CBpDIbbq.cjs} +1 -1
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +3 -3
- package/components/{display-settings-period-over-period-DjB0K-Zj.cjs → display-settings-period-over-period-B6tX8meQ.cjs} +1 -1
- package/components/{display-settings-period-over-period-D9r-6vbW.js → display-settings-period-over-period-CcYF-Mes.js} +1 -1
- package/components/draggable-data-field/index.cjs +1 -1
- package/components/draggable-data-field/index.js +3 -3
- package/components/{draggable-data-field-BIWzuhyP.js → draggable-data-field-BGzTMUzr.js} +1 -1
- package/components/{draggable-data-field-Cez4-c6O.cjs → draggable-data-field-Du-icp82.cjs} +1 -1
- package/components/draggable-data-field-level/index.cjs +1 -1
- package/components/draggable-data-field-level/index.js +2 -2
- package/components/draggable-data-fields-panel/index.cjs +1 -1
- package/components/draggable-data-fields-panel/index.js +4 -4
- package/components/{draggable-data-fields-panel-B0DzaGsv.cjs → draggable-data-fields-panel-Bv-gHe79.cjs} +1 -1
- package/components/{draggable-data-fields-panel-C3IwyVQh.js → draggable-data-fields-panel-DDE9erKq.js} +1 -1
- package/components/droppable-slot/index.cjs +1 -1
- package/components/droppable-slot/index.js +3 -3
- package/components/{droppable-slot-BEKnuzJd.js → droppable-slot-9CuoBcbh.js} +1 -1
- package/components/{droppable-slot-CHtF9RZo.cjs → droppable-slot-DccN0H1v.cjs} +1 -1
- package/components/edit-filters/index.cjs +1 -1
- package/components/edit-filters/index.js +10 -10
- package/components/{edit-filters-CoVNGAfA.cjs → edit-filters-Bl_Irma5.cjs} +1 -1
- package/components/{edit-filters-BHiGSnrn.js → edit-filters-DMH_g3eh.js} +1 -1
- package/components/edit-item/index.cjs +1 -1
- package/components/edit-item/index.js +2 -2
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +2 -2
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +2 -2
- package/components/edit-option-color-palette-picker/index.cjs +1 -1
- package/components/edit-option-color-palette-picker/index.js +2 -2
- package/components/edit-option-color-picker/index.cjs +1 -1
- package/components/edit-option-color-picker/index.js +2 -2
- package/components/edit-option-color-range/index.cjs +1 -1
- package/components/edit-option-color-range/index.js +2 -2
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +2 -2
- package/components/edit-option-number-field/index.cjs +1 -1
- package/components/edit-option-number-field/index.js +2 -2
- package/components/edit-option-picker/index.cjs +1 -1
- package/components/edit-option-picker/index.js +2 -2
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +2 -2
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +2 -2
- package/components/edit-option-radio-button-group/index.cjs +1 -1
- package/components/edit-option-radio-button-group/index.js +2 -2
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +2 -2
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +2 -2
- package/components/edit-option-text-field/index.cjs +1 -1
- package/components/edit-option-text-field/index.js +2 -2
- package/components/{es-CjgYaJJY.js → es-CHCcffu5.js} +2 -3
- package/components/es-mqakqfBn.cjs +20 -0
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +3 -3
- package/components/{filter-expression-picker-Dc3K44W0.cjs → filter-expression-picker-jVPy4hoa.cjs} +1 -1
- package/components/{filter-expression-picker-Bbu8Bd25.js → filter-expression-picker-jsFVpFSa.js} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +9 -9
- package/components/{filter-item-DmzZL5Wr.js → filter-item-CHA0kiOl.js} +2 -2
- package/components/{filter-item-C7i8LLr-.cjs → filter-item-TEM132hc.cjs} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +6 -6
- package/components/{filter-value-picker-Vq-PfjoU.js → filter-value-picker-CC1KB3EX.js} +1 -1
- package/components/{filter-value-picker-CwQLOgTl.cjs → filter-value-picker-Crzom8wH.cjs} +1 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +3 -3
- package/components/{filter-value-picker-datetime-Cf60JAgg.js → filter-value-picker-datetime--nJbTOa9.js} +1 -1
- package/components/{filter-value-picker-datetime-By3czRqA.cjs → filter-value-picker-datetime-C9LXVlCP.cjs} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +3 -3
- package/components/{filter-value-picker-hierarchy-CpvItjbb.cjs → filter-value-picker-hierarchy-CfaoAjt6.cjs} +1 -1
- package/components/{filter-value-picker-hierarchy-CL1YmeY9.js → filter-value-picker-hierarchy-DtX9lkDz.js} +1 -1
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +3 -3
- package/components/{filter-value-picker-numeric-CDUGCKAy.js → filter-value-picker-numeric-BWPRd3Tt.js} +1 -1
- package/components/{filter-value-picker-numeric-Dq143AGo.cjs → filter-value-picker-numeric-B_z8opAd.cjs} +1 -1
- package/components/{fr-x3aFvlKk.js → fr-DHdsJZjA.js} +2 -2
- package/components/fr-bekEvx07.cjs +20 -0
- package/components/grid/index.cjs +1 -1
- package/components/grid/index.js +3 -3
- package/components/{grid-DN9I7DDY.js → grid-BchmSCUT.js} +1 -1
- package/components/{grid-By5MAIqI.cjs → grid-NxMxZ8L7.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +26 -26
- package/components/item-data-drop-panel/index.cjs +1 -1
- package/components/item-data-drop-panel/index.js +4 -4
- package/components/{item-data-drop-panel-hXvAIkBq.js → item-data-drop-panel-BgQiFBID.js} +1 -1
- package/components/{item-data-drop-panel-jxlsaggu.cjs → item-data-drop-panel-DgwTr9fZ.cjs} +1 -1
- package/components/item-data-picker-panel/index.cjs +1 -1
- package/components/item-data-picker-panel/index.js +5 -5
- package/components/{item-data-picker-panel-C7wyaWko.js → item-data-picker-panel-BY8jVlsO.js} +1 -1
- package/components/{item-data-picker-panel-sWJGFZ7e.cjs → item-data-picker-panel-D2cWbl99.cjs} +1 -1
- package/components/{localized-mixin-BhUvOsd7.cjs → localized-mixin-DD2Hm1jz.cjs} +1 -1
- package/components/{localized-mixin-HngLqDZn.js → localized-mixin-rjHF23Hg.js} +1 -1
- package/components/{nl-Cv7QXh6s.js → nl-BiJX3XhO.js} +2 -2
- package/components/nl-DQy1RZ0M.cjs +20 -0
- package/components/{set-locale-CdlBx8s9.cjs → set-locale-C9s0jVjQ.cjs} +1 -1
- package/components/{set-locale-C3o6ooUV.js → set-locale-CgsoV0B9.js} +4 -4
- package/components/slot-contents-picker/index.cjs +1 -1
- package/components/slot-contents-picker/index.js +4 -4
- package/components/{slot-contents-picker-CBxXz7nw.cjs → slot-contents-picker-CmG--h6p.cjs} +1 -1
- package/components/{slot-contents-picker-DrDo62G7.js → slot-contents-picker-DOyN6E7t.js} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +2 -2
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +2 -2
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +3 -3
- package/components/{viz-item-menu-CGhptlJg.cjs → viz-item-menu-BWKYWbgZ.cjs} +1 -1
- package/components/{viz-item-menu-BX_S-XUm.js → viz-item-menu-Jqo0-TiF.js} +1 -1
- package/package.json +2 -2
- package/components/de-DR0saUbU.cjs +0 -20
- package/components/es-D8zLt69A.cjs +0 -20
- package/components/fr-DKJHfJgy.cjs +0 -20
- package/components/nl-DtxDWOXH.cjs +0 -20
package/components/{display-settings-binning-B58LCqmn.js → display-settings-binning-C2r57Fry.js}
RENAMED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin, t as ElementSizes } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { luzmoCheckbox, luzmoCheckboxChecked } from "@luzmo/icons";
|
|
24
24
|
import { html, unsafeCSS } from "lit";
|
|
25
25
|
import { property, query, state } from "lit/decorators.js";
|
package/components/{display-settings-binning-Bte25mmH.cjs → display-settings-binning-CnJWueZx.cjs}
RENAMED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`);let i=require(`@luzmo/icons`),a=require(`lit`),o=require(`lit/decorators.js`),s=require(`@lit/localize`);require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/number-field`);var c=`: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-binning-gap,var(--display-settings-binning-gap));display:flex}:host,:host([size=s]){--display-settings-binning-gap:var(--luzmo-spacing-3)}:host([size=l]){--display-settings-binning-gap:var(--luzmo-spacing-4)}:host([size=xl]){--display-settings-binning-gap:var(--luzmo-spacing-5)}`,l=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this.slotContent={},this._enabled=!1,this._binWidth=10}static get styles(){return[(0,a.unsafeCSS)(c)]}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._enabled=this.slotContent?.bins?.enabled??!1,this._binWidth=this.slotContent?.bins?.number??10)}toggleBinning(){this._enabled=!this._enabled,this.sendEvent()}setBinning(){this._binWidth=this.binWidthElement.value,this.sendEvent()}sendEvent(){let e={enabled:!!this._enabled,number:this._binWidth??10};this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this.slotContent,bins:e}}}))}renderBinWidth(){return a.html`<div class="setting">
|
|
21
21
|
<luzmo-field-label for="bin-width"
|
|
22
22
|
>${(0,s.msg)(`Bin width`,{desc:`The width of each bin in the histogram`})}</luzmo-field-label
|
|
23
23
|
>
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`),require(`../formatter-CWhf4xbq.cjs`);const e=require(`../display-settings-datetime-C6_LixJp.cjs`);require(`../periods.const-CX2ZWWrf.cjs`),Object.defineProperty(exports,`LuzmoDisplaySettingsDatetime`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
})();
|
|
26
26
|
import "../base-rg2x95aL.js";
|
|
27
27
|
import "../focus-visible-D1pJhWEh.js";
|
|
28
|
-
import "../set-locale-
|
|
29
|
-
import "../localized-mixin-
|
|
28
|
+
import "../set-locale-CgsoV0B9.js";
|
|
29
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
30
30
|
import "../formatter-B21Tb3sf.js";
|
|
31
|
-
import { t as LuzmoDisplaySettingsDatetime } from "../display-settings-datetime-
|
|
31
|
+
import { t as LuzmoDisplaySettingsDatetime } from "../display-settings-datetime-qmiiKrhJ.js";
|
|
32
32
|
import "../periods.const-Ch6SfeaG.js";
|
|
33
33
|
export { LuzmoDisplaySettingsDatetime };
|
package/components/{display-settings-datetime-DAL8zjtk.cjs → display-settings-datetime-C6_LixJp.cjs}
RENAMED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-BhUvOsd7.cjs`),i=require(`./formatter-CWhf4xbq.cjs`),a=require(`./periods.const-CX2ZWWrf.cjs`);let o=require(`@luzmo/icons`),s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`),u=require(`@lit/task`);require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/progress-circle`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/number-field`),require(`@luzmo/lucero/action-group`),require(`@luzmo/lucero/picker`);const d={"~":()=>(0,l.msg)(`Auto`,{desc:`Automatic setting of the option`}),"/":()=>`/`,"-":()=>`-`,".":()=>`.`};var f=`: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)}`,p=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this._loadLocaleFormatsConfig=new u.Task(this,{task:async([e])=>{if(e&&e!==this._contentLanguageLoaded){let t=Object.assign({"../../utils/formatter/formats/cs.ts":()=>Promise.resolve().then(()=>require(`./cs-BAmKPXV0.cjs`)),"../../utils/formatter/formats/da.ts":()=>Promise.resolve().then(()=>require(`./da-DHl8PzfU.cjs`)),"../../utils/formatter/formats/de.ts":()=>Promise.resolve().then(()=>require(`./de-CQMDOcBQ.cjs`)),"../../utils/formatter/formats/en-GB.ts":()=>Promise.resolve().then(()=>require(`./en-GB-CLevdvMs.cjs`)),"../../utils/formatter/formats/en-US.ts":()=>Promise.resolve().then(()=>require(`./en-US-Hj9Lh0Yh.cjs`)),"../../utils/formatter/formats/en.ts":()=>Promise.resolve().then(()=>require(`./en-jIqxZyQr.cjs`)),"../../utils/formatter/formats/es.ts":()=>Promise.resolve().then(()=>require(`./es-DS-aph2K.cjs`)),"../../utils/formatter/formats/fi.ts":()=>Promise.resolve().then(()=>require(`./fi-DbXbnIlF.cjs`)),"../../utils/formatter/formats/fr.ts":()=>Promise.resolve().then(()=>require(`./fr-CUzKlf1c.cjs`)),"../../utils/formatter/formats/he.ts":()=>Promise.resolve().then(()=>require(`./he-Bxmbik6g.cjs`)),"../../utils/formatter/formats/hu.ts":()=>Promise.resolve().then(()=>require(`./hu-CCt14ec_.cjs`)),"../../utils/formatter/formats/it.ts":()=>Promise.resolve().then(()=>require(`./it-Czry5-br.cjs`)),"../../utils/formatter/formats/ja.ts":()=>Promise.resolve().then(()=>require(`./ja-DLYEeBwD.cjs`)),"../../utils/formatter/formats/ko.ts":()=>Promise.resolve().then(()=>require(`./ko-Cq3bNSoY.cjs`)),"../../utils/formatter/formats/mk.ts":()=>Promise.resolve().then(()=>require(`./mk-CX6tWFGL.cjs`)),"../../utils/formatter/formats/nl.ts":()=>Promise.resolve().then(()=>require(`./nl-CC5UMR5B.cjs`)),"../../utils/formatter/formats/no.ts":()=>Promise.resolve().then(()=>require(`./no-CRcBAcaW.cjs`)),"../../utils/formatter/formats/pl.ts":()=>Promise.resolve().then(()=>require(`./pl-Cy4MfWob.cjs`)),"../../utils/formatter/formats/pt.ts":()=>Promise.resolve().then(()=>require(`./pt-BmXZldF9.cjs`)),"../../utils/formatter/formats/ru.ts":()=>Promise.resolve().then(()=>require(`./ru-fWz2GIGG.cjs`)),"../../utils/formatter/formats/sv.ts":()=>Promise.resolve().then(()=>require(`./sv-BJHpfzAX.cjs`)),"../../utils/formatter/formats/tr.ts":()=>Promise.resolve().then(()=>require(`./tr-Ctcalxbu.cjs`)),"../../utils/formatter/formats/zh-CN.ts":()=>Promise.resolve().then(()=>require(`./zh-CN-B77UpR2K.cjs`)),"../../utils/formatter/formats/zh-TW.ts":()=>Promise.resolve().then(()=>require(`./zh-TW-BsHHLnIy.cjs`))});return t[`../../utils/formatter/formats/${e}.ts`]&&(this._localeFormats=(await t[`../../utils/formatter/formats/${e}.ts`]())?.default??{}),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[(0,s.unsafeCSS)(f)]}_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??i.r;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`?!0:this._weekFormat===`ddmm`?!1:null)&&e.separator===this._dateSeparator):t.filter(e=>e.monthType===`number`&&e.mmdd===(this._dateFormat===`mmdd`?!0:this._dateFormat===`ddmm`?!1: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=a.t?.[`level${this._dateLevel??0}`]?.map(e=>s.html`<luzmo-menu-item value=${e.key}>
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`),i=require(`./formatter-CWhf4xbq.cjs`),a=require(`./periods.const-CX2ZWWrf.cjs`);let o=require(`@luzmo/icons`),s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`),u=require(`@lit/task`);require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/progress-circle`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/number-field`),require(`@luzmo/lucero/action-group`),require(`@luzmo/lucero/picker`);const d={"~":()=>(0,l.msg)(`Auto`,{desc:`Automatic setting of the option`}),"/":()=>`/`,"-":()=>`-`,".":()=>`.`};var f=`: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)}`,p=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this._loadLocaleFormatsConfig=new u.Task(this,{task:async([e])=>{if(e&&e!==this._contentLanguageLoaded){let t=Object.assign({"../../utils/formatter/formats/cs.ts":()=>Promise.resolve().then(()=>require(`./cs-BAmKPXV0.cjs`)),"../../utils/formatter/formats/da.ts":()=>Promise.resolve().then(()=>require(`./da-DHl8PzfU.cjs`)),"../../utils/formatter/formats/de.ts":()=>Promise.resolve().then(()=>require(`./de-CQMDOcBQ.cjs`)),"../../utils/formatter/formats/en-GB.ts":()=>Promise.resolve().then(()=>require(`./en-GB-CLevdvMs.cjs`)),"../../utils/formatter/formats/en-US.ts":()=>Promise.resolve().then(()=>require(`./en-US-Hj9Lh0Yh.cjs`)),"../../utils/formatter/formats/en.ts":()=>Promise.resolve().then(()=>require(`./en-jIqxZyQr.cjs`)),"../../utils/formatter/formats/es.ts":()=>Promise.resolve().then(()=>require(`./es-DS-aph2K.cjs`)),"../../utils/formatter/formats/fi.ts":()=>Promise.resolve().then(()=>require(`./fi-DbXbnIlF.cjs`)),"../../utils/formatter/formats/fr.ts":()=>Promise.resolve().then(()=>require(`./fr-CUzKlf1c.cjs`)),"../../utils/formatter/formats/he.ts":()=>Promise.resolve().then(()=>require(`./he-Bxmbik6g.cjs`)),"../../utils/formatter/formats/hu.ts":()=>Promise.resolve().then(()=>require(`./hu-CCt14ec_.cjs`)),"../../utils/formatter/formats/it.ts":()=>Promise.resolve().then(()=>require(`./it-Czry5-br.cjs`)),"../../utils/formatter/formats/ja.ts":()=>Promise.resolve().then(()=>require(`./ja-DLYEeBwD.cjs`)),"../../utils/formatter/formats/ko.ts":()=>Promise.resolve().then(()=>require(`./ko-Cq3bNSoY.cjs`)),"../../utils/formatter/formats/mk.ts":()=>Promise.resolve().then(()=>require(`./mk-CX6tWFGL.cjs`)),"../../utils/formatter/formats/nl.ts":()=>Promise.resolve().then(()=>require(`./nl-CC5UMR5B.cjs`)),"../../utils/formatter/formats/no.ts":()=>Promise.resolve().then(()=>require(`./no-CRcBAcaW.cjs`)),"../../utils/formatter/formats/pl.ts":()=>Promise.resolve().then(()=>require(`./pl-Cy4MfWob.cjs`)),"../../utils/formatter/formats/pt.ts":()=>Promise.resolve().then(()=>require(`./pt-BmXZldF9.cjs`)),"../../utils/formatter/formats/ru.ts":()=>Promise.resolve().then(()=>require(`./ru-fWz2GIGG.cjs`)),"../../utils/formatter/formats/sv.ts":()=>Promise.resolve().then(()=>require(`./sv-BJHpfzAX.cjs`)),"../../utils/formatter/formats/tr.ts":()=>Promise.resolve().then(()=>require(`./tr-Ctcalxbu.cjs`)),"../../utils/formatter/formats/zh-CN.ts":()=>Promise.resolve().then(()=>require(`./zh-CN-B77UpR2K.cjs`)),"../../utils/formatter/formats/zh-TW.ts":()=>Promise.resolve().then(()=>require(`./zh-TW-BsHHLnIy.cjs`))});return t[`../../utils/formatter/formats/${e}.ts`]&&(this._localeFormats=(await t[`../../utils/formatter/formats/${e}.ts`]())?.default??{}),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[(0,s.unsafeCSS)(f)]}_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??i.r;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`?!0:this._weekFormat===`ddmm`?!1:null)&&e.separator===this._dateSeparator):t.filter(e=>e.monthType===`number`&&e.mmdd===(this._dateFormat===`mmdd`?!0:this._dateFormat===`ddmm`?!1: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=a.t?.[`level${this._dateLevel??0}`]?.map(e=>s.html`<luzmo-menu-item value=${e.key}>
|
|
21
21
|
${e.i18n()}
|
|
22
22
|
</luzmo-menu-item>`);return s.html`<div class="setting">
|
|
23
23
|
<luzmo-field-label for="display-as"
|
package/components/{display-settings-datetime-DxSNsem7.js → display-settings-datetime-qmiiKrhJ.js}
RENAMED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin, t as ElementSizes } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { n as DEFAULT_DATETIME_FORMAT, r as SMART_DATE_FORMATS, t as formatter } from "./formatter-B21Tb3sf.js";
|
|
24
24
|
import { i as WEEK_STARTS_ON, r as DATETIME_WEEKDAY_AND_MONTH_STRING_FORMATS, t as DATETIME_AS_STRING_FORMATS_PER_LEVEL } from "./periods.const-Ch6SfeaG.js";
|
|
25
25
|
import { luzmoCheckbox, luzmoCheckboxChecked } from "@luzmo/icons";
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`);const e=require(`../display-settings-grand-totals-hWqhOTEC.cjs`);Object.defineProperty(exports,`LuzmoDisplaySettingsGrandTotals`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
})();
|
|
26
26
|
import "../base-rg2x95aL.js";
|
|
27
27
|
import "../focus-visible-D1pJhWEh.js";
|
|
28
|
-
import "../set-locale-
|
|
29
|
-
import "../localized-mixin-
|
|
30
|
-
import { t as LuzmoDisplaySettingsGrandTotals } from "../display-settings-grand-totals-
|
|
28
|
+
import "../set-locale-CgsoV0B9.js";
|
|
29
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
30
|
+
import { t as LuzmoDisplaySettingsGrandTotals } from "../display-settings-grand-totals-BwiU3Vh8.js";
|
|
31
31
|
export { LuzmoDisplaySettingsGrandTotals };
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin, t as ElementSizes } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { luzmoCheckbox, luzmoCheckboxChecked } from "@luzmo/icons";
|
|
24
24
|
import { html, unsafeCSS } from "lit";
|
|
25
25
|
import { property, state } from "lit/decorators.js";
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`);let i=require(`@luzmo/icons`),a=require(`lit`),o=require(`lit/decorators.js`),s=require(`@lit/localize`);require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/action-button`);let c=require(`lit/directives/if-defined.js`);var l=`: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)}`,u=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this.slotContent={}}static get styles(){return[(0,a.unsafeCSS)(l)]}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 a.html`<div class="settings-container">
|
|
21
21
|
<div class="settings-row">
|
|
22
22
|
<div class="setting">
|
|
23
23
|
<luzmo-field-label for="grand-totals"
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`),require(`../calculate-data-field-icon-BhiGlh0u.cjs`);const e=require(`../display-settings-numeric-CBpDIbbq.cjs`);Object.defineProperty(exports,`LuzmoDisplaySettingsNumeric`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
})();
|
|
26
26
|
import "../base-rg2x95aL.js";
|
|
27
27
|
import "../focus-visible-D1pJhWEh.js";
|
|
28
|
-
import "../set-locale-
|
|
29
|
-
import "../localized-mixin-
|
|
28
|
+
import "../set-locale-CgsoV0B9.js";
|
|
29
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
30
30
|
import "../calculate-data-field-icon-CY7Y6fn1.js";
|
|
31
|
-
import { t as LuzmoDisplaySettingsNumeric } from "../display-settings-numeric-
|
|
31
|
+
import { t as LuzmoDisplaySettingsNumeric } from "../display-settings-numeric-B5uxkOuA.js";
|
|
32
32
|
export { LuzmoDisplaySettingsNumeric };
|
package/components/{display-settings-numeric-CTaS1NhY.js → display-settings-numeric-B5uxkOuA.js}
RENAMED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin, t as ElementSizes } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { t as localize } from "./localize-Dlt3EN5i.js";
|
|
24
24
|
import { t as decomposeNumericFormat } from "./decompose-numeric-format-zrP4WxE7.js";
|
|
25
25
|
import { t as calculateDataFieldIcon } from "./calculate-data-field-icon-CY7Y6fn1.js";
|
package/components/{display-settings-numeric-eG0gr9Jn.cjs → display-settings-numeric-CBpDIbbq.cjs}
RENAMED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-BhUvOsd7.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./decompose-numeric-format-Bp_e62qP.cjs`),o=require(`./calculate-data-field-icon-BhiGlh0u.cjs`);let s=require(`@luzmo/icons`),c=require(`lit`),l=require(`lit/decorators.js`),u=require(`@lit/localize`),d=require(`@luzmo/lucero/overlay`);require(`@luzmo/lucero/popover`),require(`@luzmo/lucero/tooltip`),require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/number-field`),require(`@luzmo/lucero/action-group`),require(`@luzmo/lucero/picker`),require(`@luzmo/lucero/menu`);var f=`: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)}`;const p={sum:()=>(0,u.msg)(`Sum`,{desc:`Numeric Aggregation option`}),cumulativesum:()=>(0,u.msg)(`Cumulative sum`,{desc:`Numeric Aggregation option`}),average:()=>(0,u.msg)(`Average`,{desc:`Numeric Aggregation option`}),median:()=>(0,u.msg)(`Median`,{desc:`Numeric Aggregation option`}),count:()=>(0,u.msg)(`Count rows`,{desc:`Numeric Aggregation option`}),distinctcount:()=>(0,u.msg)(`Count distinct`,{desc:`Numeric Aggregation option`}),min:()=>(0,u.msg)(`Minimum`,{desc:`Numeric Aggregation option`}),max:()=>(0,u.msg)(`Maximum`,{desc:`Numeric Aggregation option`}),stddev:()=>(0,u.msg)(`Standard deviation`,{desc:`Numeric Aggregation option`}),rate:()=>(0,u.msg)(`Rate`,{desc:`Numeric Aggregation option`})},m={general:`123`,percentage:`%`,scientific:`SI`},h={time:()=>(0,u.msg)(`Time`,{desc:`Time format option`}),short:()=>(0,u.msg)(`Short`,{desc:`Short format option`}),long:()=>(0,u.msg)(`Long`,{desc:`Long format option`})},g={Auto:{auto:!0,label:()=>(0,u.msg)(`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:`,`}},_={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`}]};var v=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._handleSlottableRequest=e=>{this._renderDurationLevelMenu=e.data!==d.removeSlottableRequest},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[(0,c.unsafeCSS)(f)]}_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=a.t(this._format??`.0f`);this._isAuto=e.typeFormat?.includes(`a`)??!1,[`%`,`a%`,`y`,`ay`].includes(e.typeFormat)?this._displayAs=`percentage`:[`s`,`as`,`w`,`aw`].includes(e.typeFormat)?this._displayAs=`scientific`:this._displayAs=`general`,this._precision=e.precision?Number.parseInt(e.precision.replace(`.`,``),10):this._displayAs===`scientific`?1:0,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=g[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`?1:0),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=a.t(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=_.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),c.html`<luzmo-menu-item
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./decompose-numeric-format-Bp_e62qP.cjs`),o=require(`./calculate-data-field-icon-BhiGlh0u.cjs`);let s=require(`@luzmo/icons`),c=require(`lit`),l=require(`lit/decorators.js`),u=require(`@lit/localize`),d=require(`@luzmo/lucero/overlay`);require(`@luzmo/lucero/popover`),require(`@luzmo/lucero/tooltip`),require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/number-field`),require(`@luzmo/lucero/action-group`),require(`@luzmo/lucero/picker`),require(`@luzmo/lucero/menu`);var f=`: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)}`;const p={sum:()=>(0,u.msg)(`Sum`,{desc:`Numeric Aggregation option`}),cumulativesum:()=>(0,u.msg)(`Cumulative sum`,{desc:`Numeric Aggregation option`}),average:()=>(0,u.msg)(`Average`,{desc:`Numeric Aggregation option`}),median:()=>(0,u.msg)(`Median`,{desc:`Numeric Aggregation option`}),count:()=>(0,u.msg)(`Count rows`,{desc:`Numeric Aggregation option`}),distinctcount:()=>(0,u.msg)(`Count distinct`,{desc:`Numeric Aggregation option`}),min:()=>(0,u.msg)(`Minimum`,{desc:`Numeric Aggregation option`}),max:()=>(0,u.msg)(`Maximum`,{desc:`Numeric Aggregation option`}),stddev:()=>(0,u.msg)(`Standard deviation`,{desc:`Numeric Aggregation option`}),rate:()=>(0,u.msg)(`Rate`,{desc:`Numeric Aggregation option`})},m={general:`123`,percentage:`%`,scientific:`SI`},h={time:()=>(0,u.msg)(`Time`,{desc:`Time format option`}),short:()=>(0,u.msg)(`Short`,{desc:`Short format option`}),long:()=>(0,u.msg)(`Long`,{desc:`Long format option`})},g={Auto:{auto:!0,label:()=>(0,u.msg)(`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:`,`}},_={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`}]};var v=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._handleSlottableRequest=e=>{this._renderDurationLevelMenu=e.data!==d.removeSlottableRequest},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[(0,c.unsafeCSS)(f)]}_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=a.t(this._format??`.0f`);this._isAuto=e.typeFormat?.includes(`a`)??!1,[`%`,`a%`,`y`,`ay`].includes(e.typeFormat)?this._displayAs=`percentage`:[`s`,`as`,`w`,`aw`].includes(e.typeFormat)?this._displayAs=`scientific`:this._displayAs=`general`,this._precision=e.precision?Number.parseInt(e.precision.replace(`.`,``),10):this._displayAs===`scientific`?1:0,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=g[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`?1:0),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=a.t(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=_.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),c.html`<luzmo-menu-item
|
|
21
21
|
value=${e.level}
|
|
22
22
|
?selected=${this._durationLevels.includes(e.level)}
|
|
23
23
|
?disabled=${t}
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`);const e=require(`../display-settings-period-over-period-B6tX8meQ.cjs`);Object.defineProperty(exports,`LuzmoDisplaySettingsPeriodOverPeriod`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
})();
|
|
26
26
|
import "../base-rg2x95aL.js";
|
|
27
27
|
import "../focus-visible-D1pJhWEh.js";
|
|
28
|
-
import "../set-locale-
|
|
29
|
-
import "../localized-mixin-
|
|
30
|
-
import { t as LuzmoDisplaySettingsPeriodOverPeriod } from "../display-settings-period-over-period-
|
|
28
|
+
import "../set-locale-CgsoV0B9.js";
|
|
29
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
30
|
+
import { t as LuzmoDisplaySettingsPeriodOverPeriod } from "../display-settings-period-over-period-CcYF-Mes.js";
|
|
31
31
|
export { LuzmoDisplaySettingsPeriodOverPeriod };
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./decompose-numeric-format-Bp_e62qP.cjs`),o=require(`./period-over-period-condition.const-wVwKUthh.cjs`);let s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`);require(`@luzmo/lucero/field-label`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/number-field`),require(`@luzmo/lucero/action-group`),require(`@luzmo/lucero/picker`),require(`@luzmo/lucero/menu`),require(`@luzmo/lucero/accordion`),require(`@luzmo/lucero/checkbox`);const u={none:()=>(0,l.msg)(`None`),past:()=>(0,l.msg)(`Past value`,{desc:`Period option`}),absoluteChange:()=>(0,l.msg)(`Absolute change`,{desc:`Period option`}),percentageChange:()=>(0,l.msg)(`% change`,{desc:`Period option`})},d=[{key:`periods`,i18n:()=>(0,l.msg)(`Periods`,{desc:`Period option`})},{key:`years`,i18n:()=>(0,l.msg)(`Years`,{desc:`Period option`})},{key:`quarters`,i18n:()=>(0,l.msg)(`Quarters`,{desc:`Period option`})},{key:`months`,i18n:()=>(0,l.msg)(`Months`,{desc:`Period option`})},{key:`weeks`,i18n:()=>(0,l.msg)(`Weeks`,{desc:`Period option`})},{key:`days`,i18n:()=>(0,l.msg)(`Days`,{desc:`Period option`})},{key:`hours`,i18n:()=>(0,l.msg)(`Hours`,{desc:`Period option`})},{key:`minutes`,i18n:()=>(0,l.msg)(`Minutes`,{desc:`Period option`})},{key:`seconds`,i18n:()=>(0,l.msg)(`Seconds`,{desc:`Period option`})}];let f=function(e){return e.Relative=`relative`,e.UserDefined=`user-defined`,e}({});const p=[{key:f.Relative,i18n:()=>(0,l.msg)(`Relative`,{desc:`Range type option`})},{key:f.UserDefined,i18n:()=>(0,l.msg)(`User-defined`,{desc:`Range type option`})}];var m=`:host{font-family:var(--luzmo-display-settings-period-over-period-font-family,var(--luzmo-font-family));font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));color:var(--luzmo-display-settings-period-over-period-color,var(--luzmo-font-color))}:host .settings-container{gap:var(--luzmo-display-settings-vertical-gap,0);flex-direction:column;display:flex}:host .settings-container:first-of-type{margin-right:var(--luzmo-spacing-4)}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-period-over-period-gap,var(--display-settings-period-over-period-gap));display:flex}:host .wrap{flex-wrap:wrap}:host .setting.period-number-setting{align-items:center;display:flex}:host .dynamic-settings-container{max-width:var(--luzmo-display-setting-period-over-period-dynamic-max-width,var(--display-setting-period-over-period-dynamic-max-width))}:host luzmo-accordion{--luzmo-accordion-item-content-area-top-to-content:0;--luzmo-accordion-item-content-padding-left:var(--luzmo-spacing-1);--luzmo-accordion-item-header-bottom-margin:0;--luzmo-accordion-item-content-area-bottom-to-content:var(--luzmo-spacing-2);--accordion-item-header-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));--accordion-item-content-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));--field-label-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}:host .label-container{align-items:center;gap:var(--luzmo-spacing-2);display:flex}:host .academy-link{color:var(--luzmo-link-color);font-size:var(--luzmo-font-size-s);margin-left:var(--luzmo-spacing-2);text-decoration:none}:host .academy-link:hover{color:var(--luzmo-link-color-hover)}:host(:focus){--luzmo-menu-item-label-icon-color-focus:var(--luzmo-menu-item-label-icon-color-focus,var(--luzmo-font-color))}luzmo-menu-item{--luzmo-menu-item-tooltip-font-size:var(--luzmo-display-settings-tooltip-font-size)}luzmo-field-label{--field-label-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}luzmo-checkbox{--checkbox-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}luzmo-picker{--picker-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}luzmo-number-field{--text-field-placeholder-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size));--stepper-button-font-size:var(--luzmo-display-settings-period-over-period-font-size,var(--display-settings-period-over-period-font-size))}:host{--display-settings-period-over-period-gap:var(--luzmo-spacing-3);--display-settings-period-over-period-font-size:var(--luzmo-font-size);--display-setting-period-over-period-dynamic-max-width:22rem}:host([size=xs]){--display-settings-period-over-period-gap:var(--luzmo-spacing-2);--display-settings-period-over-period-font-size:var(--luzmo-font-size-xs);--display-setting-period-over-period-dynamic-max-width:17rem}:host([size=s]){--display-settings-period-over-period-gap:var(--luzmo-spacing-3);--display-settings-period-over-period-font-size:var(--luzmo-font-size-s);--display-setting-period-over-period-dynamic-max-width:19rem}:host([size=l]){--display-settings-period-over-period-gap:var(--luzmo-spacing-4);--display-settings-period-over-period-font-size:var(--luzmo-font-size-l);--display-setting-period-over-period-dynamic-max-width:26rem}:host([size=xl]){--display-settings-period-over-period-gap:var(--luzmo-spacing-5);--display-settings-period-over-period-font-size:var(--luzmo-font-size-xl);--display-setting-period-over-period-dynamic-max-width:30rem}`,h=class extends r.t(t.n(t.i,{validSizes:Object.values(t.t)})){constructor(...e){super(...e),this.slotContent={},this.linkedDatasetDatetimeColumns=[],this.needsOffsetDatetimeColumn=()=>this.periodOverPeriodUiType===o.t.NoDatetimeColumnButComparisonFilters||this.periodOverPeriodUiType===o.t.NoDatetimeColumnAndNoComparisonFilters}static get styles(){return[(0,s.unsafeCSS)(m)]}willUpdate(e){if(super.willUpdate(e),e.has(`slotContent`)){this._periodComparison=this.slotContent?.periodOverPeriod?.type,this._numberPeriods=this.slotContent?.periodOverPeriod?.quantity;let e=this.slotContent?.periodOverPeriod?.level;this._periodLevel=typeof e==`number`&&e>=0&&e<d.length?d[e].key:this.slotContent?.periodOverPeriod?.level||`periods`,this._incompletePeriods=this.slotContent?.periodOverPeriod?.periodToDate,this._offsetDateColumn=this.slotContent?.periodOverPeriod?.offsetDateColumn,this._minLevel=this.slotContent?.periodOverPeriod?.minLevel??this.slotContent?.periodOverPeriod?.offsetDateColumn?.lowestLevel??this.slotContent?.lowestLevel??(this.slotContent?.subtype===`date`?5:9),this._rangeType=this.slotContent?.periodOverPeriod?.rangeType}this._periodComparison=this._periodComparison??`none`,this._numberPeriods=this._numberPeriods??1,this._periodLevel=this._periodLevel??`periods`,this._incompletePeriods=this._incompletePeriods??!1,this._minLevel=this._minLevel??9,this._rangeType=this._rangeType??f.Relative,this._offsetDateColumn=this._offsetDateColumn||void 0}setPeriodComparison(){let e={...this.slotContent};this.setInitialOffsetDateColumn(e),this._periodComparison=this._periodComparisonElement.value;let t=a.t(this.slotContent?.format),n=[`%`,`y`,`a%`,`ay`].includes(t.typeFormat),r=t.typeFormat.includes(`a`),i=r?`a`:``,o=t.comma===`,`||r?`,`:``,s=t.precision?Number.parseInt(t.precision.replace(`.`,``),10):0,c=[`z`,`az`,`y`,`ay`,`w`,`aw`].includes(t.typeFormat);this._periodComparison===`percentageChange`&&n&&(e.format=`${o}.${s}${i}${c?`z`:`f`}`),this.sendEvent(e)}setNumberOfPeriods(){this._numberPeriods=Number.parseInt(this._numberPeriodsElement.value,10);let e={...this.slotContent};this.sendEvent(e)}setPeriodLevel(){this._periodLevel=this._periodLevelElement.value;let e={...this.slotContent};this.sendEvent(e)}setOffsetDateColumn(){this._offsetDateColumn=this.linkedDatasetDatetimeColumns.find(e=>e.id===this._offsetDateColumnElement.value);let e={...this.slotContent};this.sendEvent(e)}setIncompletePeriods(){this._incompletePeriods=this._incompletePeriodsElement.checked;let e={...this.slotContent};this.sendEvent(e)}setRangeType(e){this._rangeType=e;let t={...this.slotContent};this.setInitialOffsetDateColumn(t),this.sendEvent(t)}sendEvent(e){let t={...e},n=d.findIndex(e=>e.key===this._periodLevel);t.periodOverPeriod={...e.periodOverPeriod,type:this._periodComparison,level:Math.max(n,0),quantity:this._numberPeriods,periodToDate:this._incompletePeriods,minLevel:this._minLevel,rangeType:this._rangeType,offsetDateColumn:this._offsetDateColumn},this._periodComparison===`none`&&delete t.periodOverPeriod,this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:t}}))}incompletePeriodsSetting(){return s.html`
|
|
21
21
|
<div class="settings-row">
|
|
22
22
|
<div class="setting">
|
|
23
23
|
<luzmo-checkbox
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin, t as ElementSizes } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { t as localize } from "./localize-Dlt3EN5i.js";
|
|
24
24
|
import { t as decomposeNumericFormat } from "./decompose-numeric-format-zrP4WxE7.js";
|
|
25
25
|
import { t as PeriodOverPeriodCondition } from "./period-over-period-condition.const-DasWQHju.js";
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`),require(`../periods.const-CX2ZWWrf.cjs`),require(`../calculate-data-field-icon-BhiGlh0u.cjs`),require(`../get-css-variable-D9AU2CIU.cjs`),require(`../draggable-data-field-level-CI1No5x8.cjs`);const e=require(`../draggable-data-field-Du-icp82.cjs`);Object.defineProperty(exports,`LuzmoDraggableDataField`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
import "../get-css-variable-DpEed5QG.js";
|
|
27
27
|
import "../base-rg2x95aL.js";
|
|
28
28
|
import "../focus-visible-D1pJhWEh.js";
|
|
29
|
-
import "../set-locale-
|
|
30
|
-
import "../localized-mixin-
|
|
29
|
+
import "../set-locale-CgsoV0B9.js";
|
|
30
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
31
31
|
import "../periods.const-Ch6SfeaG.js";
|
|
32
32
|
import "../calculate-data-field-icon-CY7Y6fn1.js";
|
|
33
33
|
import "../draggable-data-field-level-BQBMnApS.js";
|
|
34
|
-
import { t as LuzmoDraggableDataField } from "../draggable-data-field-
|
|
34
|
+
import { t as LuzmoDraggableDataField } from "../draggable-data-field-BGzTMUzr.js";
|
|
35
35
|
export { LuzmoDraggableDataField };
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { n as DATETIME_LEVELS } from "./periods.const-Ch6SfeaG.js";
|
|
24
24
|
import { html, unsafeCSS } from "lit";
|
|
25
25
|
import { property } from "lit/decorators.js";
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`),i=require(`./periods.const-CX2ZWWrf.cjs`);let a=require(`lit`),o=require(`lit/decorators.js`),s=require(`@lit/localize`);var c=`:host{--draggable-data-field-sublevels-margin-vertical:var(--luzmo-spacing-1);--draggable-data-field-sublevels-gap:0}:host([size=s]){--draggable-data-field-sublevels-margin-vertical:var(--luzmo-spacing-1)}:host([size=l]){--draggable-data-field-sublevels-margin-vertical:var(--luzmo-spacing-2)}:host([size=xl]){--draggable-data-field-sublevels-margin-vertical:var(--luzmo-spacing-3)}:host{display:block}.draggable-data-field-sublevels{gap:var(--luzmo-draggable-data-field-sublevels-gap,var(--draggable-data-field-sublevels-gap));margin:var(--luzmo-draggable-data-field-sublevels-margin-vertical,var(--draggable-data-field-sublevels-margin-vertical))0;flex-direction:column;display:flex}:host{box-sizing:border-box}`,l=e=>`formulaId`in e,u=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this.variant=`normal`,this.data={}}static{this.styles=(0,a.unsafeCSS)(c)}renderSublevels(){if(!this.data)return a.html`
|
|
21
21
|
|
|
22
22
|
`;let e=this.data?.type,t=e===`datetime`||e===`array[datetime]`,n=[];if(`hierarchyLevels`in this.data&&Array.isArray(this.data.hierarchyLevels)&&this.data.hierarchyLevels.length>2&&this.data.hierarchy_enabled&&n.push(...this.data.hierarchyLevels.filter(e=>e?.level>=1).map(e=>a.html`<luzmo-draggable-data-field-level
|
|
23
23
|
sublevel
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`),require(`../calculate-data-field-icon-BhiGlh0u.cjs`),require(`../get-css-variable-D9AU2CIU.cjs`);const e=require(`../draggable-data-field-level-CI1No5x8.cjs`);exports.LuzmoDraggableDataFieldLevel=e.t;
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
import "../get-css-variable-DpEed5QG.js";
|
|
27
27
|
import "../base-rg2x95aL.js";
|
|
28
28
|
import "../focus-visible-D1pJhWEh.js";
|
|
29
|
-
import "../set-locale-
|
|
30
|
-
import "../localized-mixin-
|
|
29
|
+
import "../set-locale-CgsoV0B9.js";
|
|
30
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
31
31
|
import "../calculate-data-field-icon-CY7Y6fn1.js";
|
|
32
32
|
import { t as LuzmoDraggableDataFieldLevel } from "../draggable-data-field-level-BQBMnApS.js";
|
|
33
33
|
export { LuzmoDraggableDataFieldLevel };
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`),require(`../data-broker-BUIUM5hr.cjs`),require(`../periods.const-CX2ZWWrf.cjs`),require(`../calculate-data-field-icon-BhiGlh0u.cjs`),require(`../get-css-variable-D9AU2CIU.cjs`),require(`../draggable-data-field-level-CI1No5x8.cjs`),require(`../draggable-data-field-Du-icp82.cjs`),require(`../load-data-fields-for-datasets-B6cGgPld.cjs`);const e=require(`../draggable-data-fields-panel-Bv-gHe79.cjs`);Object.defineProperty(exports,`LuzmoDraggableDataFieldsPanel`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
import "../get-css-variable-DpEed5QG.js";
|
|
27
27
|
import "../base-rg2x95aL.js";
|
|
28
28
|
import "../focus-visible-D1pJhWEh.js";
|
|
29
|
-
import "../set-locale-
|
|
30
|
-
import "../localized-mixin-
|
|
29
|
+
import "../set-locale-CgsoV0B9.js";
|
|
30
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
31
31
|
import "../data-broker-cLR-t5LM.js";
|
|
32
32
|
import "../periods.const-Ch6SfeaG.js";
|
|
33
33
|
import "../calculate-data-field-icon-CY7Y6fn1.js";
|
|
34
34
|
import "../draggable-data-field-level-BQBMnApS.js";
|
|
35
|
-
import "../draggable-data-field-
|
|
35
|
+
import "../draggable-data-field-BGzTMUzr.js";
|
|
36
36
|
import "../load-data-fields-for-datasets-CW4n0Pvf.js";
|
|
37
|
-
import { t as LuzmoDraggableDataFieldsPanel } from "../draggable-data-fields-panel-
|
|
37
|
+
import { t as LuzmoDraggableDataFieldsPanel } from "../draggable-data-fields-panel-DDE9erKq.js";
|
|
38
38
|
export { LuzmoDraggableDataFieldsPanel };
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-BhUvOsd7.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./data-broker-BUIUM5hr.cjs`),o=require(`./load-data-fields-for-datasets-B6cGgPld.cjs`);let s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`),u=require(`lit/directives/repeat.js`),d=require(`@lit/task`);require(`@luzmo/lucero/progress-circle`),require(`@luzmo/lucero/search`),require(`@luzmo/lucero/select`);var f=`:host{--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-5);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=s]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-1);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-4);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-s) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-2)}:host([size=l]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=xl]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-3);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-xl) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-4)}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-margin-bottom:0}:host{box-sizing:border-box;height:100%;font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);flex-direction:column;display:flex}.container{flex-direction:column;height:100%;display:flex}.dataset-picker{border-bottom-style:solid;border-bottom-width:var(--draggable-data-fields-panel-dataset-picker-divider-height,1px);border-bottom-color:var(--luzmo-draggable-data-fields-panel-dataset-picker-divider-color,var(--draggable-data-fields-panel-dataset-picker-divider-color,var(--luzmo-border-color)));flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-margin-block-end,var(--draggable-data-fields-panel-dataset-picker-margin-bottom));padding-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-3))}.dataset-picker luzmo-select{width:100%}.search-container{width:100%;flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-search-margin-block-end,var(--luzmo-spacing-3,.75rem))}.search-container luzmo-search{--luzmo-search-edge-to-visual:var(--luzmo-draggable-data-fields-panel-search-edge-to-visual,var(--draggable-data-fields-panel-search-edge-to-visual));--luzmo-search-text-to-icon:var(--luzmo-draggable-data-fields-panel-search-text-to-icon,var(--draggable-data-fields-panel-search-text-to-icon));width:100%}.data-fields-list{gap:var(--luzmo-draggable-data-fields-panel-data-fields-gap,var(--draggable-data-fields-panel-items-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden auto}.data-fields-list::-webkit-scrollbar{width:var(--luzmo-draggable-data-fields-panel-scrollbar-width,var(--luzmo-scrollbar-size))}.data-fields-list::-webkit-scrollbar-track{background:var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background));border-radius:var(--luzmo-scrollbar-track-border-radius)}.data-fields-list::-webkit-scrollbar-thumb{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background));border-radius:var(--luzmo-scrollbar-thumb-border-radius)}.data-fields-list::-webkit-scrollbar-thumb:hover{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-hover-background),var(--luzmo-scrollbar-thumb-hover-background)}.data-fields-list{scrollbar-width:var(--luzmo-scrollbar-width);scrollbar-color:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background))var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background))}.empty-state{color:var(--luzmo-font-color-tertiary,#999);font-size:var(--luzmo-font-size);text-align:center;padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}.pending-state{padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}:host([search-quiet]){--luzmo-search-block-size:var(--luzmo-draggable-data-fields-panel-search-quiet-block-size,var(--draggable-data-fields-panel-search-quiet-block-size))}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-divider-color:transparent;--draggable-data-fields-panel-dataset-picker-divider-height:1px}`,p=50,m=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this._handleDataFieldDropped=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-dropped`,{bubbles:!0,composed:!0,detail:e.detail})))},this._handleDataFieldDragStarted=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-drag-started`,{bubbles:!0,composed:!0,detail:e.detail})))},this.datasetIds=[],this.datasetsDataFields=[],this.datasetPicker=!1,this.disabled=!1,this.pending=!1,this.draggableDataFieldVariant=`highlight`,this.searchQuiet=!1,this.hideTypeIcon=!1,this.hideSublevels=!1,this.apiUrl=`https://api.luzmo.com`,this.search=`auto`,this.searchThreshold=20,this._searchQuery=``,this._failedDatasetIds=new Set,this._loadDataFieldsTask=new d.Task(this,{args:()=>[this._currentDatasetId,this.apiUrl,this.authKey,this.authToken,this.datasetsDataFields.length],task:async([e,t,n,r,i])=>{if(i>0||!e||this._failedDatasetIds.has(e))return null;let a=await o.t([e],{dataBrokerConfig:{apiUrl:t,authKey:n,authToken:r}});return a.length===0?(this._failedDatasetIds.add(e),null):a[0]}}),this._datasetListItems=[],this._datasetListRetrieving=!1,this._datasetListPending=!1,this._datasetNamesFetchAttempted=!1,this._hasMoreDatasets=!0}static{this.styles=(0,s.unsafeCSS)(f)}connectedCallback(){super.connectedCallback(),this.addEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.addEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.removeEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}get _isDataFieldsPending(){return this.pending||this._loadDataFieldsTask.status===d.TaskStatus.PENDING}get _error(){if(this._loadDataFieldsTask.status===d.TaskStatus.ERROR){let e=this._loadDataFieldsTask.error,t=e instanceof Error?e.message:`Unknown error`;return`${(0,l.msg)(`Could not retrieve data`)}: ${t}`}}get _availableDatasets(){return this.datasetsDataFields.length>0?this.datasetsDataFields:this.datasetIds.length>0?this.datasetIds.map(e=>{let t=this._datasetListItems.find(t=>t.id===e);return t?{id:t.id,name:t.name,description:t.description,dataFields:[]}:{id:e,name:{en:e},dataFields:[]}}):this._datasetListItems.length>0?this._datasetListItems.map(e=>({id:e.id,name:e.name,description:e.description,dataFields:[]})):[]}get _selectedDataset(){return this._availableDatasets.find(e=>e.id===this._currentDatasetId)}get _dataFields(){let e=this._loadDataFieldsTask.value;if(e&&e.dataFields?.length>0)return e.dataFields;let t=this._selectedDataset;if(!t)return[];if(`dataFields`in t&&Array.isArray(t.dataFields)&&t.dataFields.length>0)return t.dataFields;let n=[];if(`columns`in t&&Array.isArray(t.columns))for(let e of t.columns)n.push({...e,datasetId:t.id});if(`formulas`in t&&Array.isArray(t.formulas))for(let e of t.formulas)n.push({...e,datasetId:t.id});return n}get _shouldFetchDatasetList(){return this.datasetPicker&&this.datasetsDataFields.length===0}get _showSearch(){return this.search===`off`?!1:this.search===`on`?!0:this._dataFields.length>this.searchThreshold}get _filteredDataFields(){let e=this._dataFields;if(!this._searchQuery.trim())return e;let t=this._searchQuery.toLowerCase().trim();return e.filter(e=>(i.t(e.name,this.language)||``).toLowerCase().includes(t))}willUpdate(e){super.willUpdate(e);let t=e.has(`selectedDatasetId`),n=e.has(`datasetsDataFields`),r=e.has(`datasetIds`),i=e.has(`datasetPicker`),o=e.has(`authKey`),s=e.has(`authToken`),c=e.has(`apiUrl`);(r||o||s||c)&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear(),this._datasetNamesFetchAttempted=!1,a.t.configure({apiUrl:this.apiUrl,authKey:this.authKey??``,authToken:this.authToken??``})),n&&this.datasetsDataFields.length>0&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear()),(t||n||r)&&this._updateCurrentDatasetId(),(r||o||s||c||i)&&this.datasetIds.length>0&&this.datasetPicker&&this.datasetsDataFields.length===0&&this._datasetListItems.length===0&&this._fetchDatasetNamesForPicker()}async _fetchDatasetNamesForPicker(){if(this.datasetIds.length!==0){this._datasetListPending=!0;try{this._datasetListItems=await a.t.fetchDatasetNames(this.datasetIds)}catch(e){console.warn(`Failed to fetch dataset names:`,e)}finally{this._datasetListPending=!1,this._datasetNamesFetchAttempted=!0}}}async _loadMoreDatasets(e){if(!(this._datasetListRetrieving||!this._hasMoreDatasets)){this._datasetListRetrieving=!0,e&&(e.retrieving=!0);try{let e=this._datasetListItems.length,t=await a.t.fetchAllDatasets({offset:e,limit:p});this._datasetListItems=[...this._datasetListItems,...t.data],this._hasMoreDatasets=e+p<(t.pagination?.total??0),!this._currentDatasetId&&this._datasetListItems.length>0&&this._updateCurrentDatasetId()}catch(e){console.warn(`Failed to load dataset list:`,e),this._hasMoreDatasets=!1}finally{this._datasetListRetrieving=!1,e&&(e.retrieving=!1)}}}_handlePickerScrolled(e){if(this.datasetIds.length>0)return;let t=e.target,{last:n}=e.detail;n>=this._datasetListItems.length-10&&this._hasMoreDatasets&&this._loadMoreDatasets(t)}async _handlePickerOpened(e){let t=e.target;if(this._datasetListItems.length===0&&this._shouldFetchDatasetList&&this.datasetIds.length===0&&this._hasMoreDatasets){t.pending=!0;try{await this._loadMoreDatasets(t)}finally{t.pending=!1}}}_updateCurrentDatasetId(){let e=this._availableDatasets;if(this.selectedDatasetId&&e.some(e=>e.id===this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}if(this.selectedDatasetId&&this.datasetIds.includes(this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}this._currentDatasetId=e.length>0?e[0].id:void 0}_handleDatasetChange(e){let t=e.detail?.value?.[0];t&&t!==this._currentDatasetId&&(this._currentDatasetId=t,this._searchQuery=``,this.dispatchEvent(new CustomEvent(`luzmo-dataset-changed`,{bubbles:!0,composed:!0,detail:{datasetId:t}})))}_getDataFieldKey(e){return`columnId`in e&&e.columnId?`col-${e.columnId}`:`formulaId`in e&&e.formulaId?`formula-${e.formulaId}`:`formula`in e&&e.formula?`adhoc-${e.formula}`:`field-${e.datasetId}-${Math.random().toString(36).slice(2,11)}`}_handleSearchInput(e){this._searchQuery=e.target.value}_renderDatasetPicker(){if(!this.datasetPicker)return s.nothing;let e=this._availableDatasets,t=e.length>1,n=this.datasetIds.length>0,r=this._shouldFetchDatasetList;if(!t&&!n&&!r)return s.nothing;let a=this._datasetListPending||this.datasetIds.length>0&&this._datasetListItems.length===0&&this.datasetsDataFields.length===0&&!this._datasetNamesFetchAttempted,o=a?[]:e.map(e=>({value:e.id,label:i.t(e.name,this.language)||e.id})),c=a?[]:this._currentDatasetId?[this._currentDatasetId]:[],u=a?(0,l.msg)(`Loading datasets...`):this.datasetPickerPlaceholder??(0,l.msg)(`Select dataset...`);return s.html`
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DD2Hm1jz.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./data-broker-BUIUM5hr.cjs`),o=require(`./load-data-fields-for-datasets-B6cGgPld.cjs`);let s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`),u=require(`lit/directives/repeat.js`),d=require(`@lit/task`);require(`@luzmo/lucero/progress-circle`),require(`@luzmo/lucero/search`),require(`@luzmo/lucero/select`);var f=`:host{--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-5);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=s]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-1);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-4);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-s) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-2)}:host([size=l]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=xl]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-3);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-xl) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-4)}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-margin-bottom:0}:host{box-sizing:border-box;height:100%;font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);flex-direction:column;display:flex}.container{flex-direction:column;height:100%;display:flex}.dataset-picker{border-bottom-style:solid;border-bottom-width:var(--draggable-data-fields-panel-dataset-picker-divider-height,1px);border-bottom-color:var(--luzmo-draggable-data-fields-panel-dataset-picker-divider-color,var(--draggable-data-fields-panel-dataset-picker-divider-color,var(--luzmo-border-color)));flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-margin-block-end,var(--draggable-data-fields-panel-dataset-picker-margin-bottom));padding-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-3))}.dataset-picker luzmo-select{width:100%}.search-container{width:100%;flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-search-margin-block-end,var(--luzmo-spacing-3,.75rem))}.search-container luzmo-search{--luzmo-search-edge-to-visual:var(--luzmo-draggable-data-fields-panel-search-edge-to-visual,var(--draggable-data-fields-panel-search-edge-to-visual));--luzmo-search-text-to-icon:var(--luzmo-draggable-data-fields-panel-search-text-to-icon,var(--draggable-data-fields-panel-search-text-to-icon));width:100%}.data-fields-list{gap:var(--luzmo-draggable-data-fields-panel-data-fields-gap,var(--draggable-data-fields-panel-items-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden auto}.data-fields-list::-webkit-scrollbar{width:var(--luzmo-draggable-data-fields-panel-scrollbar-width,var(--luzmo-scrollbar-size))}.data-fields-list::-webkit-scrollbar-track{background:var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background));border-radius:var(--luzmo-scrollbar-track-border-radius)}.data-fields-list::-webkit-scrollbar-thumb{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background));border-radius:var(--luzmo-scrollbar-thumb-border-radius)}.data-fields-list::-webkit-scrollbar-thumb:hover{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-hover-background),var(--luzmo-scrollbar-thumb-hover-background)}.data-fields-list{scrollbar-width:var(--luzmo-scrollbar-width);scrollbar-color:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background))var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background))}.empty-state{color:var(--luzmo-font-color-tertiary,#999);font-size:var(--luzmo-font-size);text-align:center;padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}.pending-state{padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}:host([search-quiet]){--luzmo-search-block-size:var(--luzmo-draggable-data-fields-panel-search-quiet-block-size,var(--draggable-data-fields-panel-search-quiet-block-size))}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-divider-color:transparent;--draggable-data-fields-panel-dataset-picker-divider-height:1px}`,p=50,m=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this._handleDataFieldDropped=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-dropped`,{bubbles:!0,composed:!0,detail:e.detail})))},this._handleDataFieldDragStarted=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-drag-started`,{bubbles:!0,composed:!0,detail:e.detail})))},this.datasetIds=[],this.datasetsDataFields=[],this.datasetPicker=!1,this.disabled=!1,this.pending=!1,this.draggableDataFieldVariant=`highlight`,this.searchQuiet=!1,this.hideTypeIcon=!1,this.hideSublevels=!1,this.apiUrl=`https://api.luzmo.com`,this.search=`auto`,this.searchThreshold=20,this._searchQuery=``,this._failedDatasetIds=new Set,this._loadDataFieldsTask=new d.Task(this,{args:()=>[this._currentDatasetId,this.apiUrl,this.authKey,this.authToken,this.datasetsDataFields.length],task:async([e,t,n,r,i])=>{if(i>0||!e||this._failedDatasetIds.has(e))return null;let a=await o.t([e],{dataBrokerConfig:{apiUrl:t,authKey:n,authToken:r}});return a.length===0?(this._failedDatasetIds.add(e),null):a[0]}}),this._datasetListItems=[],this._datasetListRetrieving=!1,this._datasetListPending=!1,this._datasetNamesFetchAttempted=!1,this._hasMoreDatasets=!0}static{this.styles=(0,s.unsafeCSS)(f)}connectedCallback(){super.connectedCallback(),this.addEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.addEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.removeEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}get _isDataFieldsPending(){return this.pending||this._loadDataFieldsTask.status===d.TaskStatus.PENDING}get _error(){if(this._loadDataFieldsTask.status===d.TaskStatus.ERROR){let e=this._loadDataFieldsTask.error,t=e instanceof Error?e.message:`Unknown error`;return`${(0,l.msg)(`Could not retrieve data`)}: ${t}`}}get _availableDatasets(){return this.datasetsDataFields.length>0?this.datasetsDataFields:this.datasetIds.length>0?this.datasetIds.map(e=>{let t=this._datasetListItems.find(t=>t.id===e);return t?{id:t.id,name:t.name,description:t.description,dataFields:[]}:{id:e,name:{en:e},dataFields:[]}}):this._datasetListItems.length>0?this._datasetListItems.map(e=>({id:e.id,name:e.name,description:e.description,dataFields:[]})):[]}get _selectedDataset(){return this._availableDatasets.find(e=>e.id===this._currentDatasetId)}get _dataFields(){let e=this._loadDataFieldsTask.value;if(e&&e.dataFields?.length>0)return e.dataFields;let t=this._selectedDataset;if(!t)return[];if(`dataFields`in t&&Array.isArray(t.dataFields)&&t.dataFields.length>0)return t.dataFields;let n=[];if(`columns`in t&&Array.isArray(t.columns))for(let e of t.columns)n.push({...e,datasetId:t.id});if(`formulas`in t&&Array.isArray(t.formulas))for(let e of t.formulas)n.push({...e,datasetId:t.id});return n}get _shouldFetchDatasetList(){return this.datasetPicker&&this.datasetsDataFields.length===0}get _showSearch(){return this.search===`off`?!1:this.search===`on`?!0:this._dataFields.length>this.searchThreshold}get _filteredDataFields(){let e=this._dataFields;if(!this._searchQuery.trim())return e;let t=this._searchQuery.toLowerCase().trim();return e.filter(e=>(i.t(e.name,this.language)||``).toLowerCase().includes(t))}willUpdate(e){super.willUpdate(e);let t=e.has(`selectedDatasetId`),n=e.has(`datasetsDataFields`),r=e.has(`datasetIds`),i=e.has(`datasetPicker`),o=e.has(`authKey`),s=e.has(`authToken`),c=e.has(`apiUrl`);(r||o||s||c)&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear(),this._datasetNamesFetchAttempted=!1,a.t.configure({apiUrl:this.apiUrl,authKey:this.authKey??``,authToken:this.authToken??``})),n&&this.datasetsDataFields.length>0&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear()),(t||n||r)&&this._updateCurrentDatasetId(),(r||o||s||c||i)&&this.datasetIds.length>0&&this.datasetPicker&&this.datasetsDataFields.length===0&&this._datasetListItems.length===0&&this._fetchDatasetNamesForPicker()}async _fetchDatasetNamesForPicker(){if(this.datasetIds.length!==0){this._datasetListPending=!0;try{this._datasetListItems=await a.t.fetchDatasetNames(this.datasetIds)}catch(e){console.warn(`Failed to fetch dataset names:`,e)}finally{this._datasetListPending=!1,this._datasetNamesFetchAttempted=!0}}}async _loadMoreDatasets(e){if(!(this._datasetListRetrieving||!this._hasMoreDatasets)){this._datasetListRetrieving=!0,e&&(e.retrieving=!0);try{let e=this._datasetListItems.length,t=await a.t.fetchAllDatasets({offset:e,limit:p});this._datasetListItems=[...this._datasetListItems,...t.data],this._hasMoreDatasets=e+p<(t.pagination?.total??0),!this._currentDatasetId&&this._datasetListItems.length>0&&this._updateCurrentDatasetId()}catch(e){console.warn(`Failed to load dataset list:`,e),this._hasMoreDatasets=!1}finally{this._datasetListRetrieving=!1,e&&(e.retrieving=!1)}}}_handlePickerScrolled(e){if(this.datasetIds.length>0)return;let t=e.target,{last:n}=e.detail;n>=this._datasetListItems.length-10&&this._hasMoreDatasets&&this._loadMoreDatasets(t)}async _handlePickerOpened(e){let t=e.target;if(this._datasetListItems.length===0&&this._shouldFetchDatasetList&&this.datasetIds.length===0&&this._hasMoreDatasets){t.pending=!0;try{await this._loadMoreDatasets(t)}finally{t.pending=!1}}}_updateCurrentDatasetId(){let e=this._availableDatasets;if(this.selectedDatasetId&&e.some(e=>e.id===this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}if(this.selectedDatasetId&&this.datasetIds.includes(this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}this._currentDatasetId=e.length>0?e[0].id:void 0}_handleDatasetChange(e){let t=e.detail?.value?.[0];t&&t!==this._currentDatasetId&&(this._currentDatasetId=t,this._searchQuery=``,this.dispatchEvent(new CustomEvent(`luzmo-dataset-changed`,{bubbles:!0,composed:!0,detail:{datasetId:t}})))}_getDataFieldKey(e){return`columnId`in e&&e.columnId?`col-${e.columnId}`:`formulaId`in e&&e.formulaId?`formula-${e.formulaId}`:`formula`in e&&e.formula?`adhoc-${e.formula}`:`field-${e.datasetId}-${Math.random().toString(36).slice(2,11)}`}_handleSearchInput(e){this._searchQuery=e.target.value}_renderDatasetPicker(){if(!this.datasetPicker)return s.nothing;let e=this._availableDatasets,t=e.length>1,n=this.datasetIds.length>0,r=this._shouldFetchDatasetList;if(!t&&!n&&!r)return s.nothing;let a=this._datasetListPending||this.datasetIds.length>0&&this._datasetListItems.length===0&&this.datasetsDataFields.length===0&&!this._datasetNamesFetchAttempted,o=a?[]:e.map(e=>({value:e.id,label:i.t(e.name,this.language)||e.id})),c=a?[]:this._currentDatasetId?[this._currentDatasetId]:[],u=a?(0,l.msg)(`Loading datasets...`):this.datasetPickerPlaceholder??(0,l.msg)(`Select dataset...`);return s.html`
|
|
21
21
|
<div class="dataset-picker" part="dataset-picker">
|
|
22
22
|
<luzmo-select
|
|
23
23
|
selects="single"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* */
|
|
20
20
|
import { i as LuzmoElement, n as SizedMixin } from "./base-rg2x95aL.js";
|
|
21
21
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
22
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
22
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
23
23
|
import { t as localize } from "./localize-Dlt3EN5i.js";
|
|
24
24
|
import { t as dataBroker } from "./data-broker-cLR-t5LM.js";
|
|
25
25
|
import { t as loadDataFieldsForDatasets } from "./load-data-fields-for-datasets-CW4n0Pvf.js";
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-C9s0jVjQ.cjs`),require(`../localized-mixin-DD2Hm1jz.cjs`),require(`../data-broker-BUIUM5hr.cjs`),require(`../formatter-CWhf4xbq.cjs`),require(`../display-settings-Sh4LWJgN.cjs`),require(`../get-css-variable-D9AU2CIU.cjs`),require(`../slot-menu-DIQ6h6Dz.cjs`),require(`../slot-menu-list-CFCvrPVt.cjs`);const e=require(`../droppable-slot-DccN0H1v.cjs`);require(`../slot-labels.config-BdrqhsYJ.cjs`),Object.defineProperty(exports,`LuzmoDroppableSlot`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
import "../get-css-variable-DpEed5QG.js";
|
|
27
27
|
import "../base-rg2x95aL.js";
|
|
28
28
|
import "../focus-visible-D1pJhWEh.js";
|
|
29
|
-
import "../set-locale-
|
|
30
|
-
import "../localized-mixin-
|
|
29
|
+
import "../set-locale-CgsoV0B9.js";
|
|
30
|
+
import "../localized-mixin-rjHF23Hg.js";
|
|
31
31
|
import "../data-broker-cLR-t5LM.js";
|
|
32
32
|
import "../formatter-B21Tb3sf.js";
|
|
33
33
|
import "../display-settings-C_ubOOoF.js";
|
|
34
34
|
import "../slot-menu-B3L8YEnv.js";
|
|
35
35
|
import "../slot-menu-list-BLJxoLeI.js";
|
|
36
|
-
import { t as LuzmoDroppableSlot } from "../droppable-slot-
|
|
36
|
+
import { t as LuzmoDroppableSlot } from "../droppable-slot-9CuoBcbh.js";
|
|
37
37
|
import "../slot-labels.config-BNi-I1ba.js";
|
|
38
38
|
export { LuzmoDroppableSlot };
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { i as dropTargetForElements } from "./get-css-variable-DpEed5QG.js";
|
|
21
21
|
import { i as LuzmoElement, n as SizedMixin } from "./base-rg2x95aL.js";
|
|
22
22
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
23
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
23
|
+
import { t as LocalizedMixin } from "./localized-mixin-rjHF23Hg.js";
|
|
24
24
|
import { t as localize } from "./localize-Dlt3EN5i.js";
|
|
25
25
|
import { t as dataBroker } from "./data-broker-cLR-t5LM.js";
|
|
26
26
|
import { n as slotContext } from "./display-settings-C_ubOOoF.js";
|