@luzmo/analytics-components-kit 1.0.1-alpha.26 → 1.0.1-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{async-directive-DWRUSKKF-CmOVMf6V.js → async-directive-DWRUSKKF-CPf9l5wJ.js} +1 -1
- package/components/{async-directive-DWRUSKKF-D4itZyzc.cjs → async-directive-DWRUSKKF-DWUZeMaj.cjs} +1 -1
- package/components/base-D76d76ww-C6YO3slp.cjs +94 -0
- package/components/base-D76d76ww-M5t7LVBG.js +758 -0
- package/components/{button-base-B7v4eeRh-D3-GH03o.js → button-base-DSHx7XO8-B_LbLx9g.js} +33 -32
- package/components/{button-base-B7v4eeRh-BKKUK3x0.cjs → button-base-DSHx7XO8-ChNRhetl.cjs} +4 -4
- package/components/{checkbox-mixin-BFGTmw17-C34LMsgu.js → checkbox-mixin-BFGTmw17-C1tjSMaa.js} +2 -2
- package/components/{checkbox-mixin-BFGTmw17-CCjGd0nS.cjs → checkbox-mixin-BFGTmw17-DF2p-vSz.cjs} +4 -4
- package/components/{directive-helpers-nlQRAaQt-3kEWF2GV.cjs → directive-helpers-nlQRAaQt-DTZp2cFt.cjs} +4 -4
- package/components/{directive-helpers-nlQRAaQt-I6T4KZKW.js → directive-helpers-nlQRAaQt-DgSC1Yr2.js} +1 -1
- package/components/display-settings/display-settings.d.ts +3 -3
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +19 -19
- package/components/display-settings-binning/display-settings-binning.d.ts +3 -3
- package/components/display-settings-binning/index.cjs +2 -2
- package/components/display-settings-binning/index.js +20 -20
- package/components/display-settings-datetime/display-settings-datetime.d.ts +3 -3
- package/components/display-settings-datetime/index.cjs +2 -2
- package/components/display-settings-datetime/index.js +22 -22
- package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +3 -3
- package/components/display-settings-grand-totals/index.cjs +2 -2
- package/components/display-settings-grand-totals/index.js +19 -19
- package/components/display-settings-numeric/display-settings-numeric.d.ts +3 -3
- package/components/display-settings-numeric/index.cjs +4 -4
- package/components/display-settings-numeric/index.js +23 -23
- package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +3 -3
- package/components/display-settings-period-over-period/index.cjs +15 -15
- package/components/display-settings-period-over-period/index.js +45 -44
- package/components/draggable-data-item/draggable-data-item.d.ts +3 -3
- package/components/draggable-data-item/index.cjs +4 -4
- package/components/draggable-data-item/index.js +6 -6
- package/components/draggable-data-item-level/draggable-data-item-level.d.ts +3 -3
- package/components/draggable-data-item-level/index.cjs +4 -4
- package/components/draggable-data-item-level/index.js +15 -15
- package/components/droppable-slot/droppable-slot.d.ts +5 -5
- package/components/droppable-slot/index.cjs +2 -2
- package/components/droppable-slot/index.js +14 -14
- package/components/edit-item/edit-item.d.ts +3 -1
- package/components/edit-item/index.cjs +17 -16
- package/components/edit-item/index.js +50 -35
- package/components/edit-option/edit-option.d.ts +1 -1
- package/components/edit-option/helpers/control-markup.d.ts +1 -1
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +1 -1
- package/components/edit-option-action-button-group/index.cjs +2 -2
- package/components/edit-option-action-button-group/index.js +6 -6
- package/components/edit-option-base/edit-option-base.d.ts +3 -3
- package/components/{edit-option-base-qePiIQWd.js → edit-option-base-C0zI8SOd.js} +4 -4
- package/components/edit-option-base-D8vs3Bty.cjs +53 -0
- package/components/edit-option-color-picker/index.cjs +24 -24
- package/components/edit-option-color-picker/index.js +42 -41
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +3 -3
- package/components/edit-option-number-field/index.cjs +2 -2
- package/components/edit-option-number-field/index.js +3 -3
- package/components/edit-option-picker/index.cjs +2 -2
- package/components/edit-option-picker/index.js +4 -4
- package/components/edit-option-position-picker/index.cjs +2 -2
- package/components/edit-option-position-picker/index.js +3 -3
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +5 -5
- package/components/edit-option-radio-button-group/index.cjs +4 -4
- package/components/edit-option-radio-button-group/index.js +4 -4
- package/components/edit-option-slider/index.cjs +3 -3
- package/components/edit-option-slider/index.js +8 -8
- package/components/edit-option-switch/index.cjs +5 -5
- package/components/edit-option-switch/index.js +11 -10
- package/components/edit-option-text-field/index.cjs +2 -2
- package/components/edit-option-text-field/index.js +3 -3
- package/components/focusable-Cu_m_GTh.cjs +42 -0
- package/components/focusable-Dw_pMNQL.js +852 -0
- package/components/focusable-cj2QhwDT-CvevSkDr.cjs +52 -0
- package/components/focusable-cj2QhwDT-DlzfnLn9.js +242 -0
- package/components/{if-defined-BSAr_4u4-4Ys8VE7T.js → if-defined-BSAr_4u4-BCnSpSsA.js} +14 -15
- package/components/{if-defined-BSAr_4u4-gECNwmTC.cjs → if-defined-BSAr_4u4-CIqREoag.cjs} +3 -3
- package/components/{if-defined-8BOch-oC.cjs → if-defined-CF8baNdl.cjs} +2 -2
- package/components/{if-defined-Bv6MRdSW.js → if-defined-DbhS35z5.js} +1 -1
- package/components/{index-Bt5nP_6w.cjs → index-9hGc0AF6.cjs} +6 -6
- package/components/{index-Bee1uunR.js → index-B2LO8M42.js} +11 -12
- package/components/{index-w3j1USKK.cjs → index-B3417kqb.cjs} +2 -2
- package/components/{index-DUO13KGl.cjs → index-BIauj-BP.cjs} +3 -3
- package/components/{index-i8GaIN7i.cjs → index-BIcAxPGg.cjs} +4 -4
- package/components/{index-Dc9c_dq-.cjs → index-BLyfPWMW.cjs} +2 -2
- package/components/index-BW6jffrL.cjs +117 -0
- package/components/{index-CXIT0cYY.js → index-BjdUsH9B.js} +11 -12
- package/components/{index-BYfDERr7.js → index-BnVt-dJY.js} +11 -12
- package/components/index-Bp6XY9q2.cjs +42 -0
- package/components/{index-CdCtJpK9.js → index-C8yP7YJD.js} +8 -9
- package/components/index-CAwT4m7K.cjs +127 -0
- package/components/{index-CfEn3fIT.js → index-CBNsaHFy.js} +7 -8
- package/components/{index-DEVOZNSc.cjs → index-CC53jnJB.cjs} +2 -2
- package/components/{index-CdUTqQ3L.cjs → index-CZUy8SUo.cjs} +4 -4
- package/components/{index-86cIx1Ql.cjs → index-Cl7wWlXl.cjs} +2 -2
- package/components/{index-ByjLd3bT.cjs → index-Cz9Cvq1K.cjs} +6 -6
- package/components/{index-B3ve6cAj.js → index-D8GVYuJ-.js} +142 -109
- package/components/{index-BH9W0QLt-DBxyzKWK.js → index-DQCvi59x.js} +92 -59
- package/components/index-DelXrrBi.js +779 -0
- package/components/{index-BUSWsm5N.js → index-Dku2WLRc.js} +7 -8
- package/components/{index-aYcu00GB.js → index-Du8Q4hhF.js} +2 -2
- package/components/{index-Dn7LyFPv.js → index-Dwp251OJ.js} +3 -3
- package/components/{index-BVX_ozT9.js → index-KY89MPqI.js} +5 -6
- package/components/{index-BJVxTeoi.cjs → index-b9OSfNB6.cjs} +7 -7
- package/components/{index-ymMEPngt.js → index-fheP_kQJ.js} +23 -23
- package/components/{index-DVAsMiOm.js → index-fzqLW5XZ.js} +7 -8
- package/components/index-hogChFy0.cjs +195 -0
- package/components/index-mB-t2zP2.cjs +217 -0
- package/components/{index-C8IL2IZ6.js → index-zFIy9Mwl.js} +14 -15
- package/components/index.cjs +1 -1
- package/components/index.js +457 -54
- package/components/{luzmo-icons-BE2T8vWu.js → luzmo-icons-CmY3chvZ.js} +16 -16
- package/components/luzmo-icons-lvebt6bp.cjs +31 -0
- package/components/{observe-slot-text-ggb4kKgY-DBVrKDBD.cjs → observe-slot-text-ggb4kKgY-5zLP4Vgh.cjs} +2 -2
- package/components/{observe-slot-text-ggb4kKgY-o5QFWUeA.js → observe-slot-text-ggb4kKgY-tm0SQCaj.js} +3 -3
- package/components/{popover-Bx4ZDHk4-BuzeOeNe.cjs → popover-Bx4ZDHk4-Cw2DKR2x.cjs} +2 -2
- package/components/{popover-Bx4ZDHk4-jZJ0Cd59.js → popover-Bx4ZDHk4-HbUSJ86p.js} +6 -7
- package/components/{query-assigned-nodes-C76XVPWY-DPC6kOmH.js → query-assigned-nodes-C76XVPWY-DON51dMU.js} +1 -1
- package/components/{query-assigned-nodes-C76XVPWY-BcyGjObB.cjs → query-assigned-nodes-C76XVPWY-DzOeAzcN.cjs} +1 -1
- package/components/sized-mixin-Cqlxwicw.cjs +20 -0
- package/components/sized-mixin-DMuOVsw0.js +65 -0
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +27 -27
- package/components/slot-menu/slot-menu.d.ts +3 -3
- package/components/slot-menu-list/index.cjs +2 -2
- package/components/slot-menu-list/index.js +14 -14
- package/components/slot-menu-list/slot-menu-list.d.ts +3 -3
- package/components/{state-BFA93Sye.cjs → state-QgHgNZLe.cjs} +2 -2
- package/components/{state-Joaryhrg.js → state-e2n-fyrr.js} +1 -1
- package/components/streaming-listener-CCalHg57-2AtO4Ho2.cjs +52 -0
- package/components/{language-resolution-8yZa5r_P-Bn0bYosv.js → streaming-listener-CCalHg57-CQgWstyf.js} +59 -59
- package/components/{task-B8yMzxui.cjs → task-fQFUVV8e.cjs} +2 -2
- package/components/{task-Cr9aRIbV.js → task-gE27tBDv.js} +1 -1
- package/components/text-field-BTnBJoP9-BuahhcXU.js +430 -0
- package/components/text-field-BTnBJoP9-CDMhK3d1.cjs +147 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +472 -54
- package/custom-elements.json +56 -292
- package/index.d.ts +1 -0
- package/item-definitions/marker-map/marker-map-options.config.d.ts +1 -1
- package/package.json +2 -2
- package/utils/base/base.d.ts +16 -0
- package/utils/base/focus-visible.d.ts +29 -0
- package/utils/base/focusable.d.ts +58 -0
- package/utils/base/index.d.ts +4 -0
- package/utils/base/sized-mixin.d.ts +17 -0
- package/utils/index.d.ts +1 -0
- package/utils/themes/index.d.ts +507 -0
- package/components/base-D76d76ww-BiajPmzU.cjs +0 -40
- package/components/base-D76d76ww-gf0ESLsU.js +0 -45
- package/components/edit-option-base-Boz7TNRZ.cjs +0 -53
- package/components/index-BH9W0QLt-Cy2sUVJ_.cjs +0 -95
- package/components/index-D5LI0odG.js +0 -44
- package/components/index-DM_2d78G.js +0 -744
- package/components/index-DrLPC6eG.cjs +0 -185
- package/components/index-eEpFkbP8.cjs +0 -195
- package/components/index-h9T5DPIm.cjs +0 -36
- package/components/index-iYpAy-Kg.cjs +0 -95
- package/components/index-zuArOtOt.cjs +0 -42
- package/components/language-resolution-8yZa5r_P-FqQChUDW.cjs +0 -52
- package/components/luzmo-icons-XsFsTAl3.cjs +0 -31
- package/components/property-0L4eB11h.cjs +0 -112
- package/components/property-B2F7x7Cz.js +0 -1481
- package/components/sized-mixin-BxMraZLS-B_y0PzR3.js +0 -82
- package/components/sized-mixin-BxMraZLS-DEFWqo8f.cjs +0 -36
- package/components/text-field-CvKSS59x-Dn0_1HO7.js +0 -412
- package/components/text-field-CvKSS59x-E9LQElL4.cjs +0 -131
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../task-B8yMzxui.cjs");require("../index-zuArOtOt.cjs");require("../index-DUO13KGl.cjs");require("../index-Bt5nP_6w.cjs");require("../index-h9T5DPIm.cjs");require("../index-iYpAy-Kg.cjs");require("../index-DrLPC6eG.cjs");require("../index-i8GaIN7i.cjs");const s=require("../property-0L4eB11h.cjs"),p=require("../sized-mixin-BxMraZLS-DEFWqo8f.cjs"),i=require("../set-locale-ByIApH40.cjs"),d=require("../luzmo-icons-XsFsTAl3.cjs"),m=require("../formatter-DiJYkB6b.cjs"),h=require("../periods.const-CDIkC5CK.cjs"),l=require("../query-D5qWDopr.cjs"),c={"~":()=>i.msg("Auto",{desc:"Automatic setting of the option"}),"/":()=>"/","-":()=>"-",".":()=>"."},f=":host{font-family:var(--luzmo-display-settings-datetime-font-family, var(--luzmo-font-family))}:host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-datetime-gap, var(--display-settings-datetime-gap))}:host .example-container{line-height:var(--luzmo-display-settings-datetime-example-height, var(--display-settings-datetime-example-height));font-size:var(--luzmo-display-settings-datetime-example-font-size, var(--display-settings-datetime-example-font-size));color:var(--luzmo-display-settings-datetime-example-color, var(--display-settings-datetime-example-color))}:host .example-container .example-label{font-weight:var(--luzmo-display-settings-datetime-example-label-font-weight, var(--display-settings-datetime-example-label-font-weight));color:var(--luzmo-display-settings-datetime-example-label-color, var(--display-settings-datetime-example-label-color))}:host .example-container .example-language{text-transform:uppercase;color:var(--luzmo-display-settings-datetime-example-language-color, var(--display-settings-datetime-example-language-color))}:host{--display-settings-datetime-example-font-size: var(--luzmo-font-size);--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)}:host{--display-settings-datetime-gap: var(--luzmo-spacing-3);--display-settings-datetime-example-height: var(--luzmo-component-height);--display-settings-datetime-example-font-size: var(--luzmo-font-size-s)}: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)}";var y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,r=(u,e,t,o)=>{for(var a=o>1?void 0:o?v(e,t):e,n=u.length-1,_;n>=0;n--)(_=u[n])&&(a=(o?_(e,t,a):_(a))||a);return o&&a&&y(e,t,a),a};exports.LuzmoDisplaySettingsDatetime=class extends p.m(s.kt,{validSizes:Object.values(p.d)}){constructor(){super(...arguments),this._loadLocaleFormatsConfig=new g.h(this,{task:async([e])=>{if(e&&e!==this._contentLanguageLoaded){const t=Object.assign({"../../utils/formatter/formats/cs.ts":()=>Promise.resolve().then(()=>require("../cs-I9E81keK.cjs")),"../../utils/formatter/formats/da.ts":()=>Promise.resolve().then(()=>require("../da-QkdvupDg.cjs")),"../../utils/formatter/formats/de.ts":()=>Promise.resolve().then(()=>require("../de-Dn5mUzha.cjs")),"../../utils/formatter/formats/en-GB.ts":()=>Promise.resolve().then(()=>require("../en-GB-Dd11ROdW.cjs")),"../../utils/formatter/formats/en-US.ts":()=>Promise.resolve().then(()=>z),"../../utils/formatter/formats/en.ts":()=>Promise.resolve().then(()=>S),"../../utils/formatter/formats/es.ts":()=>Promise.resolve().then(()=>require("../es-CwyPlN5d.cjs")),"../../utils/formatter/formats/fi.ts":()=>Promise.resolve().then(()=>require("../fi-rijeZE5V.cjs")),"../../utils/formatter/formats/fr.ts":()=>Promise.resolve().then(()=>require("../fr-BcgE-6S_.cjs")),"../../utils/formatter/formats/he.ts":()=>Promise.resolve().then(()=>require("../he-O6Ih8Bqh.cjs")),"../../utils/formatter/formats/hu.ts":()=>Promise.resolve().then(()=>require("../hu-BnZ8y3xQ.cjs")),"../../utils/formatter/formats/it.ts":()=>Promise.resolve().then(()=>require("../it-PshtLMkq.cjs")),"../../utils/formatter/formats/ja.ts":()=>Promise.resolve().then(()=>require("../ja-KIS2HdaG.cjs")),"../../utils/formatter/formats/ko.ts":()=>Promise.resolve().then(()=>require("../ko--l4qmjLV.cjs")),"../../utils/formatter/formats/mk.ts":()=>Promise.resolve().then(()=>require("../mk-DZlj-edb.cjs")),"../../utils/formatter/formats/nl.ts":()=>Promise.resolve().then(()=>require("../nl-BKlDqOXb.cjs")),"../../utils/formatter/formats/no.ts":()=>Promise.resolve().then(()=>require("../no-D_SzxhTu.cjs")),"../../utils/formatter/formats/pl.ts":()=>Promise.resolve().then(()=>require("../pl-PIK23rK_.cjs")),"../../utils/formatter/formats/pt.ts":()=>Promise.resolve().then(()=>require("../pt-Dqlu4MS5.cjs")),"../../utils/formatter/formats/ru.ts":()=>Promise.resolve().then(()=>require("../ru-zyNDTB04.cjs")),"../../utils/formatter/formats/sv.ts":()=>Promise.resolve().then(()=>require("../sv-1DPTltNQ.cjs")),"../../utils/formatter/formats/tr.ts":()=>Promise.resolve().then(()=>require("../tr-BkmWvOG2.cjs")),"../../utils/formatter/formats/zh-CN.ts":()=>Promise.resolve().then(()=>require("../zh-CN-DTZ4OmdP.cjs")),"../../utils/formatter/formats/zh-TW.ts":()=>Promise.resolve().then(()=>require("../zh-TW-DTZ4OmdP.cjs"))});if(t[`../../utils/formatter/formats/${e}.ts`]){const o=await t[`../../utils/formatter/formats/${e}.ts`]();this._localeFormats=(o==null?void 0:o.default)??{}}return this._contentLanguageLoaded=e,this._localeFormats}},args:()=>[this.contentLanguage]}),this.language="en",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("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:this._currentSlotContent}}))}}static get styles(){return[s.r$1(f)]}_parseSlotContent(){var e,t;this._dateLevel=this.slotContent.level??((e=this.slotContent)==null?void 0:e.lowestLevel)??5,this._displayAs=((t=this.slotContent)==null?void 0:t.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")}_calculateFormat(){var o;let e;const t=((o=this._localeFormats)==null?void 0:o.smartDateFormats)??m.SMART_DATE_FORMATS;this._monthName?(e=t.filter(a=>a.monthType==="name"&&a.longText===(this._monthNameFormat==="long")&&a.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(a=>a.monthType==="number"&&a.mmdd===(this._weekFormat==="mmdd"?!0:this._weekFormat==="ddmm"?!1:null)&&a.separator===this._dateSeparator):t.filter(a=>a.monthType==="number"&&a.mmdd===(this._dateFormat==="mmdd"?!0:this._dateFormat==="ddmm"?!1:null)&&a.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(){var e;this._weekDayAndMonthInYearFormat=((e=this._weekDayAndMonthInYearFormatElement.selected)==null?void 0:e[0])??"long",this._sendEvent(),this.requestUpdate()}_setMonthNameFormat(){var e;this._monthNameFormat=(e=this._monthNameFormatElement.selected)==null?void 0:e[0],this._sendEvent(),this.requestUpdate()}_setMonthName(){this._monthName=this._monthNameElement.selected,this._sendEvent(),this.requestUpdate()}_setWeekFormat(){var e;this._weekFormat=(e=this._weekFormatElement.selected)==null?void 0:e[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){e.has("slotContent")&&(this._parseSlotContent(),this._calculateSlotContent()),e.has("language")&&([...i.targetLocales].includes(this.language)||this.language==="en")&&(i.setLocale(this.language),this.requestUpdate())}_renderDisplaySettings(){var t,o;const e=(o=(t=h.DATETIME_AS_STRING_FORMATS_PER_LEVEL)==null?void 0:t[`level${this._dateLevel??0}`])==null?void 0:o.map(a=>s.x`<luzmo-menu-item value=${a.key}>
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../task-fQFUVV8e.cjs");require("../index-Bp6XY9q2.cjs");require("../index-BIauj-BP.cjs");require("../index-9hGc0AF6.cjs");require("../index-B3417kqb.cjs");require("../index-CAwT4m7K.cjs");require("../index-mB-t2zP2.cjs");require("../index-BIcAxPGg.cjs");const s=require("../focusable-Cu_m_GTh.cjs"),i=require("../set-locale-ByIApH40.cjs"),d=require("../luzmo-icons-lvebt6bp.cjs"),m=require("../formatter-DiJYkB6b.cjs"),h=require("../periods.const-CDIkC5CK.cjs"),l=require("../query-D5qWDopr.cjs"),p=require("../sized-mixin-Cqlxwicw.cjs"),c={"~":()=>i.msg("Auto",{desc:"Automatic setting of the option"}),"/":()=>"/","-":()=>"-",".":()=>"."},f=":host{font-family:var(--luzmo-display-settings-datetime-font-family, var(--luzmo-font-family))}:host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-datetime-gap, var(--display-settings-datetime-gap))}:host .example-container{line-height:var(--luzmo-display-settings-datetime-example-height, var(--display-settings-datetime-example-height));font-size:var(--luzmo-display-settings-datetime-example-font-size, var(--display-settings-datetime-example-font-size));color:var(--luzmo-display-settings-datetime-example-color, var(--display-settings-datetime-example-color))}:host .example-container .example-label{font-weight:var(--luzmo-display-settings-datetime-example-label-font-weight, var(--display-settings-datetime-example-label-font-weight));color:var(--luzmo-display-settings-datetime-example-label-color, var(--display-settings-datetime-example-label-color))}:host .example-container .example-language{text-transform:uppercase;color:var(--luzmo-display-settings-datetime-example-language-color, var(--display-settings-datetime-example-language-color))}:host{--display-settings-datetime-example-font-size: var(--luzmo-font-size);--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)}:host{--display-settings-datetime-gap: var(--luzmo-spacing-3);--display-settings-datetime-example-height: var(--luzmo-component-height);--display-settings-datetime-example-font-size: var(--luzmo-font-size-s)}: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)}";var y=Object.defineProperty,z=Object.getOwnPropertyDescriptor,r=(u,e,t,o)=>{for(var a=o>1?void 0:o?z(e,t):e,n=u.length-1,_;n>=0;n--)(_=u[n])&&(a=(o?_(e,t,a):_(a))||a);return o&&a&&y(e,t,a),a};exports.LuzmoDisplaySettingsDatetime=class extends p.SizedMixin(s.LuzmoElement,{validSizes:Object.values(p.ElementSizes)}){constructor(){super(...arguments),this._loadLocaleFormatsConfig=new g.h(this,{task:async([e])=>{if(e&&e!==this._contentLanguageLoaded){const t=Object.assign({"../../utils/formatter/formats/cs.ts":()=>Promise.resolve().then(()=>require("../cs-I9E81keK.cjs")),"../../utils/formatter/formats/da.ts":()=>Promise.resolve().then(()=>require("../da-QkdvupDg.cjs")),"../../utils/formatter/formats/de.ts":()=>Promise.resolve().then(()=>require("../de-Dn5mUzha.cjs")),"../../utils/formatter/formats/en-GB.ts":()=>Promise.resolve().then(()=>require("../en-GB-Dd11ROdW.cjs")),"../../utils/formatter/formats/en-US.ts":()=>Promise.resolve().then(()=>v),"../../utils/formatter/formats/en.ts":()=>Promise.resolve().then(()=>S),"../../utils/formatter/formats/es.ts":()=>Promise.resolve().then(()=>require("../es-CwyPlN5d.cjs")),"../../utils/formatter/formats/fi.ts":()=>Promise.resolve().then(()=>require("../fi-rijeZE5V.cjs")),"../../utils/formatter/formats/fr.ts":()=>Promise.resolve().then(()=>require("../fr-BcgE-6S_.cjs")),"../../utils/formatter/formats/he.ts":()=>Promise.resolve().then(()=>require("../he-O6Ih8Bqh.cjs")),"../../utils/formatter/formats/hu.ts":()=>Promise.resolve().then(()=>require("../hu-BnZ8y3xQ.cjs")),"../../utils/formatter/formats/it.ts":()=>Promise.resolve().then(()=>require("../it-PshtLMkq.cjs")),"../../utils/formatter/formats/ja.ts":()=>Promise.resolve().then(()=>require("../ja-KIS2HdaG.cjs")),"../../utils/formatter/formats/ko.ts":()=>Promise.resolve().then(()=>require("../ko--l4qmjLV.cjs")),"../../utils/formatter/formats/mk.ts":()=>Promise.resolve().then(()=>require("../mk-DZlj-edb.cjs")),"../../utils/formatter/formats/nl.ts":()=>Promise.resolve().then(()=>require("../nl-BKlDqOXb.cjs")),"../../utils/formatter/formats/no.ts":()=>Promise.resolve().then(()=>require("../no-D_SzxhTu.cjs")),"../../utils/formatter/formats/pl.ts":()=>Promise.resolve().then(()=>require("../pl-PIK23rK_.cjs")),"../../utils/formatter/formats/pt.ts":()=>Promise.resolve().then(()=>require("../pt-Dqlu4MS5.cjs")),"../../utils/formatter/formats/ru.ts":()=>Promise.resolve().then(()=>require("../ru-zyNDTB04.cjs")),"../../utils/formatter/formats/sv.ts":()=>Promise.resolve().then(()=>require("../sv-1DPTltNQ.cjs")),"../../utils/formatter/formats/tr.ts":()=>Promise.resolve().then(()=>require("../tr-BkmWvOG2.cjs")),"../../utils/formatter/formats/zh-CN.ts":()=>Promise.resolve().then(()=>require("../zh-CN-DTZ4OmdP.cjs")),"../../utils/formatter/formats/zh-TW.ts":()=>Promise.resolve().then(()=>require("../zh-TW-DTZ4OmdP.cjs"))});if(t[`../../utils/formatter/formats/${e}.ts`]){const o=await t[`../../utils/formatter/formats/${e}.ts`]();this._localeFormats=(o==null?void 0:o.default)??{}}return this._contentLanguageLoaded=e,this._localeFormats}},args:()=>[this.contentLanguage]}),this.language="en",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("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:this._currentSlotContent}}))}}static get styles(){return[s.r(f)]}_parseSlotContent(){var e,t;this._dateLevel=this.slotContent.level??((e=this.slotContent)==null?void 0:e.lowestLevel)??5,this._displayAs=((t=this.slotContent)==null?void 0:t.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")}_calculateFormat(){var o;let e;const t=((o=this._localeFormats)==null?void 0:o.smartDateFormats)??m.SMART_DATE_FORMATS;this._monthName?(e=t.filter(a=>a.monthType==="name"&&a.longText===(this._monthNameFormat==="long")&&a.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(a=>a.monthType==="number"&&a.mmdd===(this._weekFormat==="mmdd"?!0:this._weekFormat==="ddmm"?!1:null)&&a.separator===this._dateSeparator):t.filter(a=>a.monthType==="number"&&a.mmdd===(this._dateFormat==="mmdd"?!0:this._dateFormat==="ddmm"?!1:null)&&a.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(){var e;this._weekDayAndMonthInYearFormat=((e=this._weekDayAndMonthInYearFormatElement.selected)==null?void 0:e[0])??"long",this._sendEvent(),this.requestUpdate()}_setMonthNameFormat(){var e;this._monthNameFormat=(e=this._monthNameFormatElement.selected)==null?void 0:e[0],this._sendEvent(),this.requestUpdate()}_setMonthName(){this._monthName=this._monthNameElement.selected,this._sendEvent(),this.requestUpdate()}_setWeekFormat(){var e;this._weekFormat=(e=this._weekFormatElement.selected)==null?void 0:e[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){e.has("slotContent")&&(this._parseSlotContent(),this._calculateSlotContent()),e.has("language")&&([...i.targetLocales].includes(this.language)||this.language==="en")&&(i.setLocale(this.language),this.requestUpdate())}_renderDisplaySettings(){var t,o;const e=(o=(t=h.DATETIME_AS_STRING_FORMATS_PER_LEVEL)==null?void 0:t[`level${this._dateLevel??0}`])==null?void 0:o.map(a=>s.x`<luzmo-menu-item value=${a.key}>
|
21
21
|
${a.i18n()}
|
22
22
|
</luzmo-menu-item>`);return s.x`<div class="setting">
|
23
23
|
<luzmo-field-label for="display-as"
|
@@ -225,4 +225,4 @@
|
|
225
225
|
</div>`}render(){return this._loadLocaleFormatsConfig.render({pending:()=>s.x`<luzmo-progress-circle
|
226
226
|
indeterminate
|
227
227
|
.size=${this.size}
|
228
|
-
></luzmo-progress-circle>`,complete:()=>this._renderAllSettings(),error:()=>this._renderAllSettings()})}};r([s.n({type:String})],exports.LuzmoDisplaySettingsDatetime.prototype,"language",2);r([s.n({type:String})],exports.LuzmoDisplaySettingsDatetime.prototype,"contentLanguage",2);r([s.n({type:String})],exports.LuzmoDisplaySettingsDatetime.prototype,"size",2);r([s.n({type:Object,reflect:!1})],exports.LuzmoDisplaySettingsDatetime.prototype,"slotContent",2);r([l.e("#display-as")],exports.LuzmoDisplaySettingsDatetime.prototype,"_displayAsElement",2);r([l.e("#week-start")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekStartElement",2);r([l.e("#weekday-and-month-in-year-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekDayAndMonthInYearFormatElement",2);r([l.e("#month-name-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_monthNameFormatElement",2);r([l.e("#month-name")],exports.LuzmoDisplaySettingsDatetime.prototype,"_monthNameElement",2);r([l.e("#week-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekFormatElement",2);r([l.e("#date-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_dateFormatElement",2);r([l.e("#date-separator")],exports.LuzmoDisplaySettingsDatetime.prototype,"_dateSeparatorElement",2);r([l.e("#weekday")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekDayElement",2);r([l.e("#format-24h")],exports.LuzmoDisplaySettingsDatetime.prototype,"_format24hElement",2);exports.LuzmoDisplaySettingsDatetime=r([i.localized()],exports.LuzmoDisplaySettingsDatetime);customElements.get("luzmo-display-settings-datetime")||customElements.define("luzmo-display-settings-datetime",exports.LuzmoDisplaySettingsDatetime);const
|
228
|
+
></luzmo-progress-circle>`,complete:()=>this._renderAllSettings(),error:()=>this._renderAllSettings()})}};r([s.n({type:String})],exports.LuzmoDisplaySettingsDatetime.prototype,"language",2);r([s.n({type:String})],exports.LuzmoDisplaySettingsDatetime.prototype,"contentLanguage",2);r([s.n({type:String})],exports.LuzmoDisplaySettingsDatetime.prototype,"size",2);r([s.n({type:Object,reflect:!1})],exports.LuzmoDisplaySettingsDatetime.prototype,"slotContent",2);r([l.e("#display-as")],exports.LuzmoDisplaySettingsDatetime.prototype,"_displayAsElement",2);r([l.e("#week-start")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekStartElement",2);r([l.e("#weekday-and-month-in-year-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekDayAndMonthInYearFormatElement",2);r([l.e("#month-name-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_monthNameFormatElement",2);r([l.e("#month-name")],exports.LuzmoDisplaySettingsDatetime.prototype,"_monthNameElement",2);r([l.e("#week-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekFormatElement",2);r([l.e("#date-format")],exports.LuzmoDisplaySettingsDatetime.prototype,"_dateFormatElement",2);r([l.e("#date-separator")],exports.LuzmoDisplaySettingsDatetime.prototype,"_dateSeparatorElement",2);r([l.e("#weekday")],exports.LuzmoDisplaySettingsDatetime.prototype,"_weekDayElement",2);r([l.e("#format-24h")],exports.LuzmoDisplaySettingsDatetime.prototype,"_format24hElement",2);exports.LuzmoDisplaySettingsDatetime=r([i.localized()],exports.LuzmoDisplaySettingsDatetime);customElements.get("luzmo-display-settings-datetime")||customElements.define("luzmo-display-settings-datetime",exports.LuzmoDisplaySettingsDatetime);const v=Object.freeze(Object.defineProperty({__proto__:null,default:m.DEFAULT_LOCAL_FORMATS},Symbol.toStringTag,{value:"Module"})),S=Object.freeze(Object.defineProperty({__proto__:null,default:m.DEFAULT_LOCAL_FORMATS},Symbol.toStringTag,{value:"Module"}));
|
@@ -17,21 +17,21 @@
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
18
|
* SOFTWARE.
|
19
19
|
* */
|
20
|
-
import { h as S } from "../task-
|
21
|
-
import "../index-
|
22
|
-
import "../index-
|
23
|
-
import "../index-
|
24
|
-
import "../index-
|
25
|
-
import "../index-
|
26
|
-
import "../index-
|
27
|
-
import "../index-
|
28
|
-
import { k,
|
29
|
-
import { m as w,
|
30
|
-
import {
|
31
|
-
import { C as p, h as c } from "../luzmo-icons-BE2T8vWu.js";
|
20
|
+
import { h as S } from "../task-gE27tBDv.js";
|
21
|
+
import "../index-C8yP7YJD.js";
|
22
|
+
import "../index-B2LO8M42.js";
|
23
|
+
import "../index-BnVt-dJY.js";
|
24
|
+
import "../index-fheP_kQJ.js";
|
25
|
+
import "../index-D8GVYuJ-.js";
|
26
|
+
import "../index-DelXrrBi.js";
|
27
|
+
import "../index-CBNsaHFy.js";
|
28
|
+
import { L as k, r as x, x as a, n as d } from "../focusable-Dw_pMNQL.js";
|
29
|
+
import { m as i, t as w, s as F, l as $ } from "../set-locale-DJYT4V7U.js";
|
30
|
+
import { C as p, h as c } from "../luzmo-icons-CmY3chvZ.js";
|
32
31
|
import { S as f, f as _, D as v } from "../formatter-CQDms6fU.js";
|
33
|
-
import { a as
|
32
|
+
import { a as A, b as z, W as g } from "../periods.const-GHh5bPfs.js";
|
34
33
|
import { e as n } from "../query-Ddbd72Um.js";
|
34
|
+
import { S as L, E as D } from "../sized-mixin-DMuOVsw0.js";
|
35
35
|
const b = () => {
|
36
36
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
37
37
|
const t = document.createElement("style");
|
@@ -50,8 +50,8 @@ var M = Object.defineProperty, C = Object.getOwnPropertyDescriptor, m = (t, e, s
|
|
50
50
|
(u = t[h]) && (l = (o ? u(e, s, l) : u(l)) || l);
|
51
51
|
return o && l && M(e, s, l), l;
|
52
52
|
};
|
53
|
-
let r = class extends
|
54
|
-
validSizes: Object.values(
|
53
|
+
let r = class extends L(k, {
|
54
|
+
validSizes: Object.values(D)
|
55
55
|
}) {
|
56
56
|
constructor() {
|
57
57
|
super(...arguments), this._loadLocaleFormatsConfig = new S(this, {
|
@@ -160,11 +160,11 @@ let r = class extends w(k, {
|
|
160
160
|
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)));
|
161
161
|
}
|
162
162
|
willUpdate(t) {
|
163
|
-
t.has("slotContent") && (this._parseSlotContent(), this._calculateSlotContent()), t.has("language") && ([
|
163
|
+
t.has("slotContent") && (this._parseSlotContent(), this._calculateSlotContent()), t.has("language") && ([...w].includes(this.language) || this.language === "en") && (F(this.language), this.requestUpdate());
|
164
164
|
}
|
165
165
|
_renderDisplaySettings() {
|
166
166
|
var e, s;
|
167
|
-
const t = (s = (e =
|
167
|
+
const t = (s = (e = A) == null ? void 0 : e[`level${this._dateLevel ?? 0}`]) == null ? void 0 : s.map(
|
168
168
|
(o) => a`<luzmo-menu-item value=${o.key}>
|
169
169
|
${o.i18n()}
|
170
170
|
</luzmo-menu-item>`
|
@@ -188,9 +188,9 @@ let r = class extends w(k, {
|
|
188
188
|
}
|
189
189
|
_renderWeekDayAndMonthNameFormatSettings() {
|
190
190
|
const t = Object.keys(
|
191
|
-
|
191
|
+
z
|
192
192
|
).map((e) => a`<luzmo-action-button value=${e}>
|
193
|
-
${
|
193
|
+
${z[e]()}
|
194
194
|
</luzmo-action-button>`);
|
195
195
|
return a` <div class="setting">
|
196
196
|
<luzmo-field-label for="weekday-and-month-in-year-format"
|
@@ -288,9 +288,9 @@ let r = class extends w(k, {
|
|
288
288
|
</div>`;
|
289
289
|
}
|
290
290
|
_renderWeekStartsOnSettings() {
|
291
|
-
const t = Object.keys(
|
291
|
+
const t = Object.keys(g).map(
|
292
292
|
(e) => a`<luzmo-menu-item value=${e}>
|
293
|
-
${
|
293
|
+
${g[e]()}
|
294
294
|
</luzmo-menu-item>`
|
295
295
|
);
|
296
296
|
return a`<div class="setting">
|
@@ -524,7 +524,7 @@ m([
|
|
524
524
|
n("#format-24h")
|
525
525
|
], r.prototype, "_format24hElement", 2);
|
526
526
|
r = m([
|
527
|
-
|
527
|
+
$()
|
528
528
|
], r);
|
529
529
|
customElements.get("luzmo-display-settings-datetime") || customElements.define(
|
530
530
|
"luzmo-display-settings-datetime",
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import '@luzmo/lucero/action-button';
|
2
2
|
import '@luzmo/lucero/field-label';
|
3
3
|
import '@luzmo/lucero/icon';
|
4
|
-
import { LuzmoElement } from '@luzmo/lucero/utils';
|
5
4
|
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
5
|
+
import { LuzmoElement } from '../../utils/base';
|
6
6
|
declare const LuzmoDisplaySettingsGrandTotals_base: typeof LuzmoElement & {
|
7
|
-
new (...args: any[]): import("
|
8
|
-
prototype: import("
|
7
|
+
new (...args: any[]): import("../../utils/base/sized-mixin").SizedElementInterface;
|
8
|
+
prototype: import("../../utils/base/sized-mixin").SizedElementInterface;
|
9
9
|
};
|
10
10
|
/**
|
11
11
|
* @element luzmo-display-settings-grand-totals
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-Bp6XY9q2.cjs");require("../index-9hGc0AF6.cjs");require("../index-B3417kqb.cjs");const l=require("../focusable-Cu_m_GTh.cjs"),n=require("../set-locale-ByIApH40.cjs"),g=require("../luzmo-icons-lvebt6bp.cjs"),c=require("../state-QgHgNZLe.cjs"),p=require("../if-defined-CF8baNdl.cjs"),u=require("../sized-mixin-Cqlxwicw.cjs"),m=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-grand-totals-gap, var(--display-settings-grand-totals-gap))}:host{--display-settings-grand-totals-gap: var(--luzmo-spacing-3)}: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)}";var z=Object.defineProperty,h=Object.getOwnPropertyDescriptor,i=(o,t,a,e)=>{for(var s=e>1?void 0:e?h(t,a):t,r=o.length-1,d;r>=0;r--)(d=o[r])&&(s=(e?d(t,a,s):d(s))||s);return e&&s&&z(t,a,s),s};exports.LuzmoDisplaySettingsGrandTotals=class extends u.SizedMixin(l.LuzmoElement,{validSizes:Object.values(u.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.slotContent={}}static get styles(){return[l.r(m)]}willUpdate(t){var a,e;t.has("slotContent")&&(this._enabled=((e=(a=this.slotContent)==null?void 0:a.grandTotals)==null?void 0:e.enabled)??!1)}updated(t){t.has("language")&&([...n.targetLocales].includes(this.language??"en")||this.language==="en")&&n.setLocale(this.language)}toggleGrandTotals(){this._enabled=!this._enabled,this.sendEvent()}sendEvent(){const t={enabled:!!this._enabled};this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:{...this.slotContent,grandTotals:t}}}))}render(){return l.x`<div class="settings-container">
|
21
21
|
<div class="settings-row">
|
22
22
|
<div class="setting">
|
23
23
|
<luzmo-field-label for="grand-totals"
|
@@ -34,7 +34,7 @@
|
|
34
34
|
>
|
35
35
|
<luzmo-icon
|
36
36
|
slot="icon"
|
37
|
-
.icon=${this._enabled?
|
37
|
+
.icon=${this._enabled?g.C0:g.h0}
|
38
38
|
></luzmo-icon>
|
39
39
|
${this._enabled?n.msg("Enabled",{desc:"Option set to enabled"}):n.msg("Disabled",{desc:"Option set to disabled"})}
|
40
40
|
</luzmo-action-button>
|
@@ -17,15 +17,15 @@
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
18
|
* SOFTWARE.
|
19
19
|
* */
|
20
|
-
import "../index-
|
21
|
-
import "../index-
|
22
|
-
import "../index-
|
23
|
-
import {
|
24
|
-
import {
|
25
|
-
import {
|
26
|
-
import {
|
27
|
-
import {
|
28
|
-
import {
|
20
|
+
import "../index-C8yP7YJD.js";
|
21
|
+
import "../index-BnVt-dJY.js";
|
22
|
+
import "../index-fheP_kQJ.js";
|
23
|
+
import { L as d, r as z, x as g, n as m } from "../focusable-Dw_pMNQL.js";
|
24
|
+
import { t as p, s as b, m as u, l as f } from "../set-locale-DJYT4V7U.js";
|
25
|
+
import { C as h, h as v } from "../luzmo-icons-CmY3chvZ.js";
|
26
|
+
import { r as x } from "../state-e2n-fyrr.js";
|
27
|
+
import { o as y } from "../if-defined-DbhS35z5.js";
|
28
|
+
import { S as w, E as C } from "../sized-mixin-DMuOVsw0.js";
|
29
29
|
const c = () => {
|
30
30
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
31
31
|
const o = document.createElement("style");
|
@@ -34,13 +34,13 @@ const c = () => {
|
|
34
34
|
};
|
35
35
|
c();
|
36
36
|
const _ = ":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-grand-totals-gap, var(--display-settings-grand-totals-gap))}:host{--display-settings-grand-totals-gap: var(--luzmo-spacing-3)}: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)}";
|
37
|
-
var
|
38
|
-
for (var e = s > 1 ? void 0 : s ?
|
37
|
+
var E = Object.defineProperty, S = Object.getOwnPropertyDescriptor, a = (o, l, t, s) => {
|
38
|
+
for (var e = s > 1 ? void 0 : s ? S(l, t) : l, n = o.length - 1, i; n >= 0; n--)
|
39
39
|
(i = o[n]) && (e = (s ? i(l, t, e) : i(e)) || e);
|
40
|
-
return s && e &&
|
40
|
+
return s && e && E(l, t, e), e;
|
41
41
|
};
|
42
|
-
let r = class extends
|
43
|
-
validSizes: Object.values(
|
42
|
+
let r = class extends w(d, {
|
43
|
+
validSizes: Object.values(C)
|
44
44
|
}) {
|
45
45
|
constructor() {
|
46
46
|
super(...arguments), this.language = "en", this.slotContent = {};
|
@@ -53,7 +53,7 @@ let r = class extends p(d, {
|
|
53
53
|
o.has("slotContent") && (this._enabled = ((t = (l = this.slotContent) == null ? void 0 : l.grandTotals) == null ? void 0 : t.enabled) ?? !1);
|
54
54
|
}
|
55
55
|
updated(o) {
|
56
|
-
o.has("language") && ([...
|
56
|
+
o.has("language") && ([...p].includes(this.language ?? "en") || this.language === "en") && b(this.language);
|
57
57
|
}
|
58
58
|
toggleGrandTotals() {
|
59
59
|
this._enabled = !this._enabled, this.sendEvent();
|
@@ -91,12 +91,12 @@ let r = class extends p(d, {
|
|
91
91
|
emphasized
|
92
92
|
.size=${this.size}
|
93
93
|
?selected=${this._enabled}
|
94
|
-
class=${
|
94
|
+
class=${y(this._enabled ? "active" : "inactive")}
|
95
95
|
@click=${this.toggleGrandTotals}
|
96
96
|
>
|
97
97
|
<luzmo-icon
|
98
98
|
slot="icon"
|
99
|
-
.icon=${this._enabled ?
|
99
|
+
.icon=${this._enabled ? h : v}
|
100
100
|
></luzmo-icon>
|
101
101
|
${this._enabled ? u("Enabled", { desc: "Option set to enabled" }) : u("Disabled", { desc: "Option set to disabled" })}
|
102
102
|
</luzmo-action-button>
|
@@ -112,10 +112,10 @@ a([
|
|
112
112
|
m()
|
113
113
|
], r.prototype, "slotContent", 2);
|
114
114
|
a([
|
115
|
-
|
115
|
+
x()
|
116
116
|
], r.prototype, "_enabled", 2);
|
117
117
|
r = a([
|
118
|
-
|
118
|
+
f()
|
119
119
|
], r);
|
120
120
|
customElements.get("luzmo-display-settings-grand-totals") || customElements.define(
|
121
121
|
"luzmo-display-settings-grand-totals",
|
@@ -5,11 +5,11 @@ import '@luzmo/lucero/menu';
|
|
5
5
|
import '@luzmo/lucero/number-field';
|
6
6
|
import '@luzmo/lucero/picker';
|
7
7
|
import '@luzmo/lucero/popover';
|
8
|
-
import { LuzmoElement } from '@luzmo/lucero/utils';
|
9
8
|
import { CSSResultArray, TemplateResult } from 'lit';
|
9
|
+
import { LuzmoElement } from '../../utils/base';
|
10
10
|
declare const LuzmoDisplaySettingsNumeric_base: typeof LuzmoElement & {
|
11
|
-
new (...args: any[]): import("
|
12
|
-
prototype: import("
|
11
|
+
new (...args: any[]): import("../../utils/base/sized-mixin").SizedElementInterface;
|
12
|
+
prototype: import("../../utils/base/sized-mixin").SizedElementInterface;
|
13
13
|
};
|
14
14
|
/**
|
15
15
|
* @element luzmo-display-settings-numeric
|
@@ -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
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../set-locale-ByIApH40.cjs");require("../index-
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../set-locale-ByIApH40.cjs");require("../index-Bp6XY9q2.cjs");require("../index-BIauj-BP.cjs");require("../index-9hGc0AF6.cjs");require("../index-BW6jffrL.cjs");require("../index-CAwT4m7K.cjs");require("../index-mB-t2zP2.cjs");require("../index-BLyfPWMW.cjs");const v=require("../decompose-numeric-format-B3rVVHpO.cjs"),a=require("../focusable-Cu_m_GTh.cjs"),f=require("../luzmo-icons-lvebt6bp.cjs"),L=require("../index-b9OSfNB6.cjs"),S=require("../state-QgHgNZLe.cjs"),m=require("../query-D5qWDopr.cjs"),y=require("../sized-mixin-Cqlxwicw.cjs"),A=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap, var(--display-settings-numeric-gap))}.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))}: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 )}",D={sum:()=>s.msg("Sum",{desc:"Numeric Aggregation option"}),cumulativesum:()=>s.msg("Cumulative sum",{desc:"Numeric Aggregation option"}),average:()=>s.msg("Average",{desc:"Numeric Aggregation option"}),weightedaverage:()=>s.msg("Weighted average",{desc:"Numeric Aggregation option"}),median:()=>s.msg("Median",{desc:"Numeric Aggregation option"}),count:()=>s.msg("Count",{desc:"Numeric Aggregation option"}),distinctcount:()=>s.msg("Distinct count",{desc:"Numeric Aggregation option"}),min:()=>s.msg("Minimum",{desc:"Numeric Aggregation option"}),max:()=>s.msg("Maximum",{desc:"Numeric Aggregation option"}),stddev:()=>s.msg("Standard deviation",{desc:"Numeric Aggregation option"}),rate:()=>s.msg("Rate",{desc:"Numeric Aggregation option"})},z={general:"123",percentage:"%",scientific:"SI"},b={time:()=>s.msg("Time",{desc:"Time format option"}),short:()=>s.msg("Short",{desc:"Short format option"}),long:()=>s.msg("Long",{desc:"Long format option"})},p={Auto:{auto:!0,label:()=>s.msg("Auto",{desc:"Automatic setting of the option"})},"1,000.00":{auto:!1,label:()=>"1,000.00",thousandSeparator:",",decimalSeparator:"."},"1.000,00":{auto:!1,label:()=>"1.000,00",thousandSeparator:".",decimalSeparator:","},"1000.00":{auto:!1,label:()=>"1000.00",decimalSeparator:"."},"1000,00":{auto:!1,label:()=>"1000,00",decimalSeparator:","}},F={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 $=Object.defineProperty,N=Object.getOwnPropertyDescriptor,r=(h,t,e,i)=>{for(var n=i>1?void 0:i?N(t,e):t,o=h.length-1,l;o>=0;o--)(l=h[o])&&(n=(i?l(t,e,n):l(n))||n);return i&&n&&$(t,e,n),n};exports.LuzmoDisplaySettingsNumeric=class extends y.SizedMixin(a.LuzmoElement,{validSizes:Object.values(y.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._sendEvent=()=>{const t={...this.slotContent};t.format=this._format,t.aggregationFunc=this._aggregationFunc,this._aggregationWeightColumn?t.aggregationWeight={...this._aggregationWeightColumn}:this._aggregationFunc==="rate"&&(t.aggregationFunc="average"),this._displayMode==="duration"?(t.duration=t.duration??{},t.duration.format=this._durationFormat,t.duration.levels=this._durationLevels):delete t.duration,this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:t}}))}}static get styles(){return[a.r(A)]}_parseSavedNumericFormatSettings(){var t,e,i,n,o,l,g,c,d,_;if(this._displayMode=((t=this.slotContent)==null?void 0:t.subtype)==="duration"?((n=(i=(e=this.slotContent)==null?void 0:e.duration)==null?void 0:i.levels)==null?void 0:n.length)===1?"numeric":"duration":"numeric",this._durationFormat=((l=(o=this.slotContent)==null?void 0:o.duration)==null?void 0:l.format)??"short",this._durationLevels=((c=(g=this.slotContent)==null?void 0:g.duration)==null?void 0:c.levels)??[1],this._displayMode==="duration")this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=((d=this.slotContent)==null?void 0:d.format)??".0f";const u=v.decomposeNumericFormat(this._format??".0f");this._isAuto=((_=u.typeFormat)==null?void 0:_.includes("a"))??!1,["%","a%","y","ay"].includes(u.typeFormat)?this._displayAs="percentage":["s","as","w","aw"].includes(u.typeFormat)?this._displayAs="scientific":this._displayAs="general",this._precision=u.precision?Number.parseInt(u.precision.replace(".",""),10):this._displayAs==="scientific"?1:0,this._commaDecimals=["z","az","y","ay","w","aw"].includes(u.typeFormat),this._thousandSeparator=u.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(){var t,e;this._displayAs=((e=(t=this._displayAsElement)==null?void 0:t.selected)==null?void 0:e[0])??"general",this._displayAs==="scientific"&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(t){const e=p[(t==null?void 0:t.detail)??"Auto"];this._thousandSeparator=[",","."].includes((e==null?void 0:e.thousandSeparator)??""),this._commaDecimals=(e==null?void 0:e.decimalSeparator)===",",this._isAuto=e==null?void 0:e.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){var i;let t="f";const e=this.slotContent.subtype==="duration"?this._durationLevels&&((i=this._durationLevels)==null?void 0:i.length)===1?"numeric":"duration":"numeric";this._maxDurationLevel=Math.min(...this._durationLevels),e==="duration"?(!["time","short","long"].includes(this._durationFormat??"")||this._maxDurationLevel<6&&this._durationFormat==="time")&&(this._durationFormat="short"):(this._displayAs==="general"&&this._commaDecimals?t="z":this._displayAs==="percentage"&&this._commaDecimals?t="y":this._displayAs==="scientific"&&this._commaDecimals?t="w":this._displayAs==="percentage"?t="%":this._displayAs==="scientific"&&(t="s"),this._format=(this._thousandSeparator||this._isAuto?",":"")+"."+this._precision+(this._isAuto?"a":"")+t)}_setAggregationFunc(){const t=this._aggregationFunc,e=this.slotContent.format;if(this._aggregationElement.value!==t){if(this._aggregationFunc=this._aggregationElement.value,t==="rate"){const i=v.decomposeNumericFormat(e),n=["%","y","a%","ay"].includes(i.typeFormat);this.slotContent.subtype==="currency"&&n&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc==="rate"||t==="rate")&&this.requestUpdate()}}_setAggregationWeight(){const t=this._aggregationWeightElement.value;if(t==="none")this._aggregationWeightColumn=void 0;else{const e=this.measureColumns.find(i=>i.columnId===t);this._aggregationWeightColumn={column:e==null?void 0:e.columnId,set:e==null?void 0:e.datasetId,columnSubType:e==null?void 0:e.subtype}}this._sendEvent()}_setDurationLevels(){const t=this._durationLevels,e=this._durationLevelsElement.value.split(",").filter(i=>i!=="").map(i=>Number.parseInt(i,10));this._durationLevels=((e==null?void 0:e.length)??0)>=1?e:t,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){var t,e;this._durationFormat=(e=(t=this._durationFormatElement)==null?void 0:t.selected)==null?void 0:e[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat==="time"){const t=this._durationLevels.sort().at(-1);if([7,8,9].includes(t)){const e={lev7:[6],lev8:[6,7],lev9:[6,7,8]};for(const i of e["lev"+t])this._durationLevels.includes(i)||this._durationLevels.push(i);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(t){var e,i,n;t.has("slotContent")&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=((e=this.slotContent)==null?void 0:e.aggregationFunc)??((i=this.slotContent)==null?void 0:i.type)==="numeric"?"sum":"count",this._aggregationWeightColumn=(n=this.slotContent)==null?void 0:n.aggregationWeight),t.has("language")&&([...s.targetLocales].includes(this.language??"en")||this.language==="en")&&(s.setLocale(this.language),this.requestUpdate())}firstUpdated(){var t;(t=this.slotContent)!=null&&t.duration&&this._durationLevelsOverlay.addEventListener("slottable-request",e=>{this._renderDurationLevelMenu=e.data!==L.a})}_renderDurationLevelsSettings(){const t=F.levels.map(e=>{let i=!1;return this._durationFormat==="time"&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(i=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(i=!0),a.x`<luzmo-menu-item
|
21
21
|
value=${e.level}
|
22
22
|
?selected=${this._durationLevels.includes(e.level)}
|
23
23
|
?disabled=${i}
|
@@ -31,7 +31,7 @@
|
|
31
31
|
${this._durationLevels.length}
|
32
32
|
${this._durationLevels.length===1?"level":"levels"} active
|
33
33
|
<span class="duration-angle-down-icon">
|
34
|
-
${
|
34
|
+
${f.O2(f.T)}
|
35
35
|
</span>
|
36
36
|
</luzmo-action-button>
|
37
37
|
<luzmo-overlay
|
@@ -53,8 +53,8 @@
|
|
53
53
|
</luzmo-menu>`:""}
|
54
54
|
</luzmo-popover>
|
55
55
|
</luzmo-overlay>
|
56
|
-
</div>`}_renderDurationFormatSettings(){const t=Object.keys(
|
57
|
-
${
|
56
|
+
</div>`}_renderDurationFormatSettings(){const t=Object.keys(b).map(e=>e==="time"&&(this._maxDurationLevel??1)<6?"":a.x`<luzmo-action-button value=${e}>
|
57
|
+
${b[e]()}
|
58
58
|
</luzmo-action-button>`);return a.x` <div class="setting">
|
59
59
|
<luzmo-field-label for="duration-format">
|
60
60
|
${s.msg("Format",{desc:"Label for format setting"})}
|
@@ -18,20 +18,20 @@
|
|
18
18
|
* SOFTWARE.
|
19
19
|
* */
|
20
20
|
import { m as s, t as x, s as A, l as L } from "../set-locale-DJYT4V7U.js";
|
21
|
-
import "../index-
|
22
|
-
import "../index-
|
23
|
-
import "../index-
|
24
|
-
import "../index-
|
25
|
-
import "../index-
|
26
|
-
import "../index-
|
27
|
-
import "../index-
|
28
|
-
import { k as F, a as $, x as a, n as f } from "../property-B2F7x7Cz.js";
|
29
|
-
import { m as S, d as D } from "../sized-mixin-BxMraZLS-B_y0PzR3.js";
|
21
|
+
import "../index-C8yP7YJD.js";
|
22
|
+
import "../index-B2LO8M42.js";
|
23
|
+
import "../index-BnVt-dJY.js";
|
24
|
+
import "../index-DQCvi59x.js";
|
25
|
+
import "../index-D8GVYuJ-.js";
|
26
|
+
import "../index-DelXrrBi.js";
|
27
|
+
import "../index-Du8Q4hhF.js";
|
30
28
|
import { d as v } from "../decompose-numeric-format-BuZcjH2k.js";
|
31
|
-
import {
|
32
|
-
import {
|
33
|
-
import {
|
29
|
+
import { L as F, r as S, x as a, n as z } from "../focusable-Dw_pMNQL.js";
|
30
|
+
import { O as $, T as D } from "../luzmo-icons-CmY3chvZ.js";
|
31
|
+
import { a as w } from "../index-BjdUsH9B.js";
|
32
|
+
import { r as C } from "../state-e2n-fyrr.js";
|
34
33
|
import { e as d } from "../query-Ddbd72Um.js";
|
34
|
+
import { S as N, E } from "../sized-mixin-DMuOVsw0.js";
|
35
35
|
const y = () => {
|
36
36
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
37
37
|
const t = document.createElement("style");
|
@@ -96,8 +96,8 @@ var k = Object.defineProperty, T = Object.getOwnPropertyDescriptor, n = (t, e, o
|
|
96
96
|
(m = t[u]) && (i = (r ? m(e, o, i) : m(i)) || i);
|
97
97
|
return r && i && k(e, o, i), i;
|
98
98
|
};
|
99
|
-
let l = class extends
|
100
|
-
validSizes: Object.values(
|
99
|
+
let l = class extends N(F, {
|
100
|
+
validSizes: Object.values(E)
|
101
101
|
}) {
|
102
102
|
constructor() {
|
103
103
|
super(...arguments), this.language = "en", this.slotContent = {}, this.measureColumns = [], this._durationLevels = [], this._renderDurationLevelMenu = !1, this._sendEvent = () => {
|
@@ -115,16 +115,16 @@ let l = class extends S(F, {
|
|
115
115
|
};
|
116
116
|
}
|
117
117
|
static get styles() {
|
118
|
-
return [
|
118
|
+
return [S(O)];
|
119
119
|
}
|
120
120
|
_parseSavedNumericFormatSettings() {
|
121
|
-
var t, e, o, r, i, u, m, g, h,
|
121
|
+
var t, e, o, r, i, u, m, g, h, f;
|
122
122
|
if (this._displayMode = ((t = this.slotContent) == null ? void 0 : t.subtype) === "duration" ? ((r = (o = (e = this.slotContent) == null ? void 0 : e.duration) == null ? void 0 : o.levels) == null ? void 0 : r.length) === 1 ? "numeric" : "duration" : "numeric", this._durationFormat = ((u = (i = this.slotContent) == null ? void 0 : i.duration) == null ? void 0 : u.format) ?? "short", this._durationLevels = ((g = (m = this.slotContent) == null ? void 0 : m.duration) == null ? void 0 : g.levels) ?? [1], this._displayMode === "duration")
|
123
123
|
this._precision = 2, this._commaDecimals = !1, this._thousandSeparator = !1;
|
124
124
|
else {
|
125
125
|
this._format = ((h = this.slotContent) == null ? void 0 : h.format) ?? ".0f";
|
126
126
|
const c = v(this._format ?? ".0f");
|
127
|
-
this._isAuto = ((
|
127
|
+
this._isAuto = ((f = c.typeFormat) == null ? void 0 : f.includes("a")) ?? !1, ["%", "a%", "y", "ay"].includes(c.typeFormat) ? this._displayAs = "percentage" : ["s", "as", "w", "aw"].includes(c.typeFormat) ? this._displayAs = "scientific" : this._displayAs = "general", this._precision = c.precision ? Number.parseInt(c.precision.replace(".", ""), 10) : this._displayAs === "scientific" ? 1 : 0, this._commaDecimals = ["z", "az", "y", "ay", "w", "aw"].includes(
|
128
128
|
c.typeFormat
|
129
129
|
), this._thousandSeparator = c.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");
|
130
130
|
}
|
@@ -244,7 +244,7 @@ let l = class extends S(F, {
|
|
244
244
|
(t = this.slotContent) != null && t.duration && this._durationLevelsOverlay.addEventListener(
|
245
245
|
"slottable-request",
|
246
246
|
(e) => {
|
247
|
-
this._renderDurationLevelMenu = e.data !==
|
247
|
+
this._renderDurationLevelMenu = e.data !== w;
|
248
248
|
}
|
249
249
|
);
|
250
250
|
}
|
@@ -267,7 +267,7 @@ let l = class extends S(F, {
|
|
267
267
|
${this._durationLevels.length}
|
268
268
|
${this._durationLevels.length === 1 ? "level" : "levels"} active
|
269
269
|
<span class="duration-angle-down-icon">
|
270
|
-
${
|
270
|
+
${$(D)}
|
271
271
|
</span>
|
272
272
|
</luzmo-action-button>
|
273
273
|
<luzmo-overlay
|
@@ -433,13 +433,13 @@ let l = class extends S(F, {
|
|
433
433
|
}
|
434
434
|
};
|
435
435
|
n([
|
436
|
-
|
436
|
+
z({ type: String, reflect: !0 })
|
437
437
|
], l.prototype, "language", 2);
|
438
438
|
n([
|
439
|
-
|
439
|
+
z({ type: Object, reflect: !0 })
|
440
440
|
], l.prototype, "slotContent", 2);
|
441
441
|
n([
|
442
|
-
|
442
|
+
z({ type: Array, reflect: !1 })
|
443
443
|
], l.prototype, "measureColumns", 2);
|
444
444
|
n([
|
445
445
|
d("#display-as")
|
@@ -463,7 +463,7 @@ n([
|
|
463
463
|
d("#duration-levels-overlay")
|
464
464
|
], l.prototype, "_durationLevelsOverlay", 2);
|
465
465
|
n([
|
466
|
-
|
466
|
+
C()
|
467
467
|
], l.prototype, "_renderDurationLevelMenu", 2);
|
468
468
|
l = n([
|
469
469
|
L()
|
package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts
CHANGED
@@ -3,11 +3,11 @@ import '@luzmo/lucero/field-label';
|
|
3
3
|
import '@luzmo/lucero/menu';
|
4
4
|
import '@luzmo/lucero/number-field';
|
5
5
|
import '@luzmo/lucero/picker';
|
6
|
-
import { LuzmoElement } from '@luzmo/lucero/utils';
|
7
6
|
import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
|
7
|
+
import { LuzmoElement } from '../../utils/base';
|
8
8
|
declare const LuzmoDisplaySettingsPeriodOverPeriod_base: typeof LuzmoElement & {
|
9
|
-
new (...args: any[]): import("
|
10
|
-
prototype: import("
|
9
|
+
new (...args: any[]): import("../../utils/base/sized-mixin").SizedElementInterface;
|
10
|
+
prototype: import("../../utils/base/sized-mixin").SizedElementInterface;
|
11
11
|
};
|
12
12
|
/**
|
13
13
|
* @element luzmo-display-settings-period-over-period
|