@luzmo/analytics-components-kit 1.0.1-alpha.11 → 1.0.1-alpha.13
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/area-chart.config-Ba68ZiSX.js +198 -0
- package/components/area-chart.config-Vo0u3UK8.cjs +20 -0
- package/components/{column-chart.config-BYIX4E6J.js → bar-chart.config-CF1i1Imw.js} +41 -14
- package/components/bar-chart.config-YLP38HOE.cjs +20 -0
- package/components/bubble-chart.config-1MrC55Nb.js +142 -0
- package/components/bubble-chart.config-bQBq1s3C.cjs +20 -0
- package/components/circle-pack-chart.config-BOlrxRJA.cjs +20 -0
- package/components/circle-pack-chart.config-Bbm2bTgy.js +110 -0
- package/components/{bar-chart.config-BYIX4E6J.js → column-chart.config-BT1QH4BI.js} +40 -14
- package/components/column-chart.config-CppyNukh.cjs +20 -0
- package/components/display-settings-datetime/index.cjs +25 -25
- package/components/display-settings-datetime/index.js +66 -59
- package/components/donut-chart.config-B_38UAqp.cjs +20 -0
- package/components/{donut-chart.config-3DhKiSSM.js → donut-chart.config-DuJFyp4z.js} +4 -2
- package/components/dropdown-filter.config-BPBxTuLQ.cjs +20 -0
- package/components/dropdown-filter.config-Drv-A4zw.js +163 -0
- package/components/edit-item/index.cjs +11 -16
- package/components/edit-item/index.js +103 -87
- package/components/edit-option/index.cjs +108 -100
- package/components/edit-option/index.js +330 -294
- package/components/edit-option/item-configs/area-chart.config.d.ts +146 -0
- package/components/edit-option/item-configs/bar-chart.config.d.ts +23 -2
- package/components/edit-option/item-configs/bubble-chart.config.d.ts +90 -0
- package/components/edit-option/item-configs/circle-pack-chart.config.d.ts +35 -0
- package/components/edit-option/item-configs/column-chart.config.d.ts +17 -2
- package/components/edit-option/item-configs/donut-chart.config.d.ts +4 -0
- package/components/edit-option/item-configs/dropdown-filter.config.d.ts +74 -0
- package/components/edit-option/item-configs/line-chart.config.d.ts +16 -0
- package/components/edit-option/item-configs/ohlc-chart.config.d.ts +37 -0
- package/components/edit-option/item-configs/radar-chart.config.d.ts +122 -0
- package/components/edit-option/item-configs/sankey-diagram.config.d.ts +46 -0
- package/components/edit-option/item-configs/search-filter.config.d.ts +40 -0
- package/components/edit-option/item-configs/slicer-filter.config.d.ts +136 -0
- package/components/edit-option/item-configs/slider-filter.config.d.ts +45 -0
- package/components/edit-option/item-configs/sunburst-chart.config.d.ts +51 -0
- package/components/edit-option/item-configs/treemap-chart.config.d.ts +103 -0
- package/components/edit-option/item-configs/wordcloud-chart.config.d.ts +46 -0
- package/components/{en-GB-C9t4MSgD.js → en-GB-BtLbN8o_.js} +1 -1
- package/components/{en-GB-D5Tvhki6.cjs → en-GB-Dd11ROdW.cjs} +1 -1
- package/components/{en-DlRadzUI.js → formatter-CQDms6fU.js} +258 -267
- package/components/{en-BnVnZvpC.cjs → formatter-DiJYkB6b.cjs} +1 -1
- package/components/index-DXyAeBh6.cjs +20 -0
- package/components/index-Di00QW2f.js +113 -0
- package/components/index.cjs +1 -1
- package/components/index.js +8 -6
- package/components/{line-chart.config-DBw4A3Rf.js → line-chart.config-BB_thZtA.js} +3 -2
- package/components/line-chart.config-i2233s5F.cjs +20 -0
- package/components/ohlc-chart.config-BLlRV_bs.cjs +20 -0
- package/components/ohlc-chart.config-D9npwajt.js +75 -0
- package/components/radar-chart.config-DPPlIptA.cjs +20 -0
- package/components/radar-chart.config-DfID1TZ-.js +164 -0
- package/components/sankey-diagram.config-BVjCEw5M.js +138 -0
- package/components/sankey-diagram.config-CG5S1OI3.cjs +20 -0
- package/components/search-filter.config-C9CoGS9f.cjs +20 -0
- package/components/search-filter.config-baX2Vdul.js +111 -0
- package/components/slicer-filter.config-A3YK_KZn.js +211 -0
- package/components/slicer-filter.config-DQunaj8q.cjs +20 -0
- package/components/slider-filter.config-C-zvfTNl.js +98 -0
- package/components/slider-filter.config-DF_sAElS.cjs +20 -0
- package/components/sunburst-chart.config-CEfAd1RQ.cjs +20 -0
- package/components/sunburst-chart.config-VZqDthcz.js +139 -0
- package/components/treemap-chart.config-BalwwrhW.js +214 -0
- package/components/treemap-chart.config-D6H5Hf2B.cjs +20 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +69 -6
- package/components/wordcloud-chart.config-BLvcDvxT.cjs +20 -0
- package/components/wordcloud-chart.config-CQs8YFfd.js +89 -0
- package/custom-elements.json +182 -0
- package/package.json +4 -9
- package/utils/index.d.ts +1 -0
- package/utils/switch-item/index.d.ts +18 -0
- package/components/bar-chart.config--VDhFN4d.cjs +0 -20
- package/components/column-chart.config-BmhmcBZJ.cjs +0 -20
- package/components/donut-chart.config-DLWJUlHx.cjs +0 -20
- package/components/line-chart.config-cvwDhvSq.cjs +0 -20
- /package/components/{slot-configs.cjs → item-slots-configs.cjs} +0 -0
- /package/components/{slot-configs.js → item-slots-configs.js} +0 -0
@@ -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
|
-
const
|
21
|
-
var r, n, o,
|
20
|
+
const t = (l, e) => {
|
21
|
+
var r, n, o, a;
|
22
22
|
if (e && e.length > 0)
|
23
|
-
return ((n = (r = e == null ? void 0 : e.find((
|
24
|
-
},
|
25
|
-
var r, n, o,
|
23
|
+
return ((n = (r = e == null ? void 0 : e.find((i) => (i == null ? void 0 : i.name) === "legend")) == null ? void 0 : r.content) == null ? void 0 : n.length) > 0 || ((a = (o = e == null ? void 0 : e.find((i) => (i == null ? void 0 : i.name) === "measure")) == null ? void 0 : o.content) == null ? void 0 : a.length) > 1;
|
24
|
+
}, c = (l, e) => {
|
25
|
+
var r, n, o, a;
|
26
26
|
if (e && e.length > 0)
|
27
|
-
return ((n = (r = e == null ? void 0 : e.find((
|
28
|
-
},
|
27
|
+
return ((n = (r = e == null ? void 0 : e.find((i) => (i == null ? void 0 : i.name) === "legend")) == null ? void 0 : r.content) == null ? void 0 : n.length) === 0 && ((a = (o = e == null ? void 0 : e.find((i) => (i == null ? void 0 : i.name) === "measure")) == null ? void 0 : o.content) == null ? void 0 : a.length) <= 1;
|
28
|
+
}, u = [
|
29
29
|
{
|
30
30
|
key: "general",
|
31
31
|
type: "group",
|
@@ -38,11 +38,11 @@ const c = (l, e) => {
|
|
38
38
|
default: "grouped",
|
39
39
|
enum: ["grouped", "stacked", "100"]
|
40
40
|
},
|
41
|
-
visibleIf:
|
41
|
+
visibleIf: t
|
42
42
|
},
|
43
43
|
{
|
44
44
|
type: "divider",
|
45
|
-
visibleIf:
|
45
|
+
visibleIf: t
|
46
46
|
},
|
47
47
|
{
|
48
48
|
key: "display.title",
|
@@ -57,7 +57,7 @@ const c = (l, e) => {
|
|
57
57
|
type: "switch",
|
58
58
|
default: !0
|
59
59
|
},
|
60
|
-
visibleIf:
|
60
|
+
visibleIf: t
|
61
61
|
},
|
62
62
|
{
|
63
63
|
key: "display.modeOption",
|
@@ -65,7 +65,7 @@ const c = (l, e) => {
|
|
65
65
|
type: "switch",
|
66
66
|
default: !1
|
67
67
|
},
|
68
|
-
visibleIf:
|
68
|
+
visibleIf: t
|
69
69
|
},
|
70
70
|
{
|
71
71
|
key: "bars.label",
|
@@ -87,7 +87,7 @@ const c = (l, e) => {
|
|
87
87
|
type: "switch",
|
88
88
|
default: !1
|
89
89
|
},
|
90
|
-
visibleIf:
|
90
|
+
visibleIf: c
|
91
91
|
},
|
92
92
|
{
|
93
93
|
key: "bars.roundedCorners",
|
@@ -144,11 +144,37 @@ const c = (l, e) => {
|
|
144
144
|
};
|
145
145
|
}
|
146
146
|
},
|
147
|
-
visibleIf:
|
147
|
+
visibleIf: c
|
148
148
|
}
|
149
149
|
]
|
150
|
+
},
|
151
|
+
{
|
152
|
+
key: "legend",
|
153
|
+
type: "group",
|
154
|
+
open: !1,
|
155
|
+
children: [
|
156
|
+
{
|
157
|
+
key: "legend.position",
|
158
|
+
control: {
|
159
|
+
label: "Position",
|
160
|
+
type: "position-picker",
|
161
|
+
default: "top-right",
|
162
|
+
enum: [
|
163
|
+
"top-left",
|
164
|
+
"top",
|
165
|
+
"top-right",
|
166
|
+
"right",
|
167
|
+
"bottom-right",
|
168
|
+
"bottom",
|
169
|
+
"bottom-left",
|
170
|
+
"left"
|
171
|
+
]
|
172
|
+
}
|
173
|
+
}
|
174
|
+
],
|
175
|
+
visibleIf: t
|
150
176
|
}
|
151
177
|
];
|
152
178
|
export {
|
153
|
-
|
179
|
+
u as default
|
154
180
|
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
2
|
+
*
|
3
|
+
* Copyright © 2024 Luzmo
|
4
|
+
* All rights reserved.
|
5
|
+
* Luzmo web components (“Luzmo Web Components”)
|
6
|
+
* must be used according to the Luzmo Terms of Service.
|
7
|
+
* This license allows users with a current active Luzmo account
|
8
|
+
* to use the Luzmo Web Components. This license terminates
|
9
|
+
* automatically if a user no longer has an active Luzmo account.
|
10
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
11
|
+
*
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
14
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
15
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
16
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
17
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
18
|
+
* SOFTWARE.
|
19
|
+
* */
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=(l,n)=>{var r,e,o,t;if(n&&n.length>0)return((e=(r=n==null?void 0:n.find(i=>(i==null?void 0:i.name)==="legend"))==null?void 0:r.content)==null?void 0:e.length)>0||((t=(o=n==null?void 0:n.find(i=>(i==null?void 0:i.name)==="measure"))==null?void 0:o.content)==null?void 0:t.length)>1},c=(l,n)=>{var r,e,o,t;if(n&&n.length>0)return((e=(r=n==null?void 0:n.find(i=>(i==null?void 0:i.name)==="legend"))==null?void 0:r.content)==null?void 0:e.length)===0&&((t=(o=n==null?void 0:n.find(i=>(i==null?void 0:i.name)==="measure"))==null?void 0:o.content)==null?void 0:t.length)<=1},u=[{key:"general",type:"group",open:!0,children:[{key:"mode",control:{type:"picker",default:"grouped",enum:["grouped","stacked","100"]},visibleIf:a},{type:"divider",visibleIf:a},{key:"display.title",control:{type:"switch",default:!0}},{key:"display.legend",control:{type:"switch",default:!0},visibleIf:a},{key:"display.modeOption",control:{type:"switch",default:!1},visibleIf:a},{key:"bars.label",control:{type:"picker",default:"none",enum:["none","percentage","percentageLegend","percentageCategory","percentageMax"]}},{key:"categories.colored",control:{type:"switch",default:!1},visibleIf:c},{key:"bars.roundedCorners",control:{type:"slider",default:(l,n,r)=>{var e;return(e=r==null?void 0:r.itemSpecific)==null?void 0:e.rounding},min:0,max:20,step:1,extraLabel:(l,n,r)=>{var e,o;if(typeof((e=r==null?void 0:r.itemSpecific)==null?void 0:e.rounding)=="number")return typeof((o=l==null?void 0:l.bars)==null?void 0:o.roundedCorners)!="number"?"auto":"reset"},extraLabelHasClickAction:(l,n,r)=>{var e,o;return!(typeof((e=r==null?void 0:r.itemSpecific)==null?void 0:e.rounding)!="number"||typeof((o=l==null?void 0:l.bars)==null?void 0:o.roundedCorners)!="number")},extraLabelClickAction:(l,n,r)=>{var o;const e={...l};return(o=e==null?void 0:e.bars)==null||delete o.roundedCorners,{value:null,options:e}}}},{key:"color",control:{type:"color-picker",default:(l,n,r)=>{var e;return(r==null?void 0:r.mainColor)??((e=r==null?void 0:r.colors)==null?void 0:e[0])},extraLabel:(l,n,r)=>{var o;const e=(r==null?void 0:r.mainColor)??((o=r==null?void 0:r.colors)==null?void 0:o[0]);if(e&&l.color!==e)return"reset"},extraLabelHasClickAction:(l,n,r)=>{var o;const e=(r==null?void 0:r.mainColor)??((o=r==null?void 0:r.colors)==null?void 0:o[0]);return!!(e&&l.color!==e)},extraLabelClickAction:(l,n,r)=>{var o;const e={...l};return e.color=(r==null?void 0:r.mainColor)??((o=r==null?void 0:r.colors)==null?void 0:o[0]),{value:e.color,options:e}}},visibleIf:c}]},{key:"legend",type:"group",open:!1,children:[{key:"legend.position",control:{label:"Position",type:"position-picker",default:"top-right",enum:["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"]}}],visibleIf:a}];exports.default=u;
|
@@ -17,11 +17,11 @@
|
|
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-BrEDK88k.cjs");require("../index-i8GaIN7i.cjs");const s=require("../property-0L4eB11h.cjs"),p=require("../sized-mixin-BxMraZLS-DEFWqo8f.cjs"),o=require("../set-locale-ByIApH40.cjs"),m=require("../luzmo-icons-XsFsTAl3.cjs"),d=require("../en-BnVnZvpC.cjs"),h=require("../periods.const-CDIkC5CK.cjs"),l=require("../query-D5qWDopr.cjs"),c={"~":()=>o.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,i)=>{for(var a=i>1?void 0:i?v(e,t):e,n=u.length-1,_;n>=0;n--)(_=u[n])&&(a=(i?_(e,t,a):_(a))||a);return i&&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-D5Tvhki6.cjs")),"../../utils/formatter/formats/en-US.ts":()=>Promise.resolve().then(()=>require("../en-BnVnZvpC.cjs")).then(i=>i.enUS),"../../utils/formatter/formats/en.ts":()=>Promise.resolve().then(()=>require("../en-BnVnZvpC.cjs")).then(i=>i.en),"../../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 i=await t[`../../utils/formatter/formats/${e}.ts`]();this._localeFormats=(i==null?void 0:i.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 i;let e;const t=((i=this._localeFormats)==null?void 0:i.smartDateFormats)??d.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")&&([...o.targetLocales].includes(this.language)||this.language==="en")&&(o.setLocale(this.language),this.requestUpdate())}_renderDisplaySettings(){var t,i;const e=(i=(t=h.DATETIME_AS_STRING_FORMATS_PER_LEVEL)==null?void 0:t[`level${this._dateLevel??0}`])==null?void 0:i.map(a=>s.x`<luzmo-menu-item value=${a.key}>
|
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-BrEDK88k.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}>
|
21
21
|
${a.i18n()}
|
22
22
|
</luzmo-menu-item>`);return s.x`<div class="setting">
|
23
23
|
<luzmo-field-label for="display-as"
|
24
|
-
>${
|
24
|
+
>${i.msg("Display",{desc:"Label for display setting"})}</luzmo-field-label
|
25
25
|
>
|
26
26
|
<luzmo-picker
|
27
27
|
id="display-as"
|
@@ -36,7 +36,7 @@
|
|
36
36
|
${h.DATETIME_WEEKDAY_AND_MONTH_STRING_FORMATS[t]()}
|
37
37
|
</luzmo-action-button>`);return s.x` <div class="setting">
|
38
38
|
<luzmo-field-label for="weekday-and-month-in-year-format"
|
39
|
-
>${
|
39
|
+
>${i.msg("Format",{desc:"Label for format setting"})}</luzmo-field-label
|
40
40
|
>
|
41
41
|
<luzmo-action-group
|
42
42
|
emphasized
|
@@ -51,7 +51,7 @@
|
|
51
51
|
</luzmo-action-group>
|
52
52
|
</div>`}_renderMonthNameFormatSettings(){return s.x` <div class="setting">
|
53
53
|
<luzmo-field-label for="month-name-format"
|
54
|
-
>${
|
54
|
+
>${i.msg("Format",{desc:"Label for format setting"})}</luzmo-field-label
|
55
55
|
>
|
56
56
|
<luzmo-action-group
|
57
57
|
emphasized
|
@@ -63,15 +63,15 @@
|
|
63
63
|
@change=${this._setMonthNameFormat}
|
64
64
|
>
|
65
65
|
<luzmo-action-button value="short">
|
66
|
-
${
|
66
|
+
${i.msg("Short",{desc:"Short format option"})}
|
67
67
|
</luzmo-action-button>
|
68
68
|
<luzmo-action-button value="long">
|
69
|
-
${
|
69
|
+
${i.msg("Long",{desc:"Long format option"})}
|
70
70
|
</luzmo-action-button>
|
71
71
|
</luzmo-action-group>
|
72
|
-
</div>`}_renderWeekFormatSettings(){var a;const e=((a=this._localeFormats)==null?void 0:a.smartDateFormats)??
|
72
|
+
</div>`}_renderWeekFormatSettings(){var a;const e=((a=this._localeFormats)==null?void 0:a.smartDateFormats)??m.SMART_DATE_FORMATS,t=e.find(n=>n.mmdd===!0&&n.separator===this._dateSeparator&&n.monthType==="number"),o=e.find(n=>n.mmdd===!1&&n.separator===this._dateSeparator&&n.monthType==="number");return s.x` <div class="setting">
|
73
73
|
<luzmo-field-label for="week-format"
|
74
|
-
>${
|
74
|
+
>${i.msg("Format",{desc:"Label for format setting"})}</luzmo-field-label
|
75
75
|
>
|
76
76
|
<luzmo-action-group
|
77
77
|
emphasized
|
@@ -83,17 +83,17 @@
|
|
83
83
|
@change=${this._setWeekFormat}
|
84
84
|
>
|
85
85
|
<luzmo-action-button value="ddmm">
|
86
|
-
${
|
86
|
+
${m.formatter({...this._currentSlotContent,type:"datetime",format:o==null?void 0:o.key},{localFormats:this._localeFormats,level:this._dateLevel})(new Date)}
|
87
87
|
</luzmo-action-button>
|
88
88
|
<luzmo-action-button value="mmdd"
|
89
|
-
>${
|
89
|
+
>${m.formatter({...this._currentSlotContent,type:"datetime",format:t==null?void 0:t.key},{localFormats:this._localeFormats,level:this._dateLevel})(new Date)}</luzmo-action-button
|
90
90
|
>
|
91
91
|
</luzmo-action-group>
|
92
92
|
</div>`}_renderWeekStartsOnSettings(){const e=Object.keys(h.WEEK_STARTS_ON).map(t=>s.x`<luzmo-menu-item value=${t}>
|
93
93
|
${h.WEEK_STARTS_ON[t]()}
|
94
94
|
</luzmo-menu-item>`);return s.x`<div class="setting">
|
95
95
|
<luzmo-field-label for="week-start"
|
96
|
-
>${
|
96
|
+
>${i.msg("Week starts on",{desc:"Label for week start setting"})}</luzmo-field-label
|
97
97
|
>
|
98
98
|
<luzmo-picker
|
99
99
|
id="week-start"
|
@@ -106,7 +106,7 @@
|
|
106
106
|
</luzmo-picker>
|
107
107
|
</div>`}_renderMonthNameSettings(){return s.x`<div class="settings-">
|
108
108
|
<luzmo-field-label for="month-name"
|
109
|
-
>${
|
109
|
+
>${i.msg("Month",{desc:"Month format setting"})}</luzmo-field-label
|
110
110
|
>
|
111
111
|
<luzmo-action-button
|
112
112
|
id="month-name"
|
@@ -119,13 +119,13 @@
|
|
119
119
|
<luzmo-icon
|
120
120
|
slot="icon"
|
121
121
|
.size=${this.size}
|
122
|
-
.icon=${this._monthName?
|
122
|
+
.icon=${this._monthName?d.C0:d.h0}
|
123
123
|
></luzmo-icon>
|
124
|
-
${
|
124
|
+
${i.msg("Name")}
|
125
125
|
</luzmo-action-button>
|
126
126
|
</div>`}_renderDateFormatSettings(){const e=this._dateSeparator==="~"?"/":this._dateSeparator;return s.x`<div class="setting">
|
127
127
|
<luzmo-field-label for="date-format"
|
128
|
-
>${
|
128
|
+
>${i.msg("Format",{desc:"Label for format setting"})}</luzmo-field-label
|
129
129
|
>
|
130
130
|
<luzmo-picker
|
131
131
|
id="date-format"
|
@@ -135,7 +135,7 @@
|
|
135
135
|
@change=${this._setDateFormat}
|
136
136
|
>
|
137
137
|
<luzmo-menu-item value="auto">
|
138
|
-
${
|
138
|
+
${i.msg("Auto",{desc:"Automatic setting of the option"})}
|
139
139
|
</luzmo-menu-item>
|
140
140
|
<luzmo-menu-item value="mmdd">12${e}31</luzmo-menu-item>
|
141
141
|
<luzmo-menu-item value="ddmm">31${e}12</luzmo-menu-item>
|
@@ -144,7 +144,7 @@
|
|
144
144
|
${c[t]()}
|
145
145
|
</luzmo-menu-item>`);return s.x`<div class="setting">
|
146
146
|
<luzmo-field-label for="date-separator"
|
147
|
-
>${
|
147
|
+
>${i.msg("Separator",{desc:"Label for date separator setting"})}</luzmo-field-label
|
148
148
|
>
|
149
149
|
<luzmo-picker
|
150
150
|
id="date-separator"
|
@@ -157,7 +157,7 @@
|
|
157
157
|
</luzmo-picker>
|
158
158
|
</div>`}_render24hFormatSettings(){return s.x`<div class="settings-">
|
159
159
|
<luzmo-field-label for="format-24h"
|
160
|
-
>${
|
160
|
+
>${i.msg("24h",{desc:"Label for 24h format setting"})}</luzmo-field-label
|
161
161
|
>
|
162
162
|
<luzmo-action-button
|
163
163
|
id="format-24h"
|
@@ -170,12 +170,12 @@
|
|
170
170
|
<luzmo-icon
|
171
171
|
slot="icon"
|
172
172
|
.size=${this.size}
|
173
|
-
.icon=${this._24hFormat?
|
173
|
+
.icon=${this._24hFormat?d.C0:d.h0}
|
174
174
|
></luzmo-icon>
|
175
175
|
</luzmo-action-button>
|
176
176
|
</div>`}_renderWeekdaySettings(){return s.x`<div class="settings-">
|
177
177
|
<luzmo-field-label for="weekday"
|
178
|
-
>${
|
178
|
+
>${i.msg("Weekday",{desc:"Label for weekday setting"})}</luzmo-field-label
|
179
179
|
>
|
180
180
|
<luzmo-action-button
|
181
181
|
id="weekday"
|
@@ -188,12 +188,12 @@
|
|
188
188
|
<luzmo-icon
|
189
189
|
slot="icon"
|
190
190
|
.size=${this.size}
|
191
|
-
.icon=${this._weekDay?
|
191
|
+
.icon=${this._weekDay?d.C0:d.h0}
|
192
192
|
></luzmo-icon>
|
193
|
-
${
|
193
|
+
${i.msg("Show")}
|
194
194
|
</luzmo-action-button>
|
195
195
|
</div>`}_renderExampleFormat(){return s.x`<span class="example">
|
196
|
-
${
|
196
|
+
${m.formatter({...this._currentSlotContent,type:"datetime"},{localFormats:this._localeFormats,level:this._dateLevel})(!this._displayAs||this._displayAs==="default"?new Date:1)}
|
197
197
|
</span>
|
198
198
|
${(this._dateSeparator==="~"||this._dateFormat==="auto")&&!this._monthName?s.x`<span class="example-language">
|
199
199
|
(${this.contentLanguage})
|
@@ -217,7 +217,7 @@
|
|
217
217
|
<div class="settings-row">
|
218
218
|
<div class="example-container">
|
219
219
|
<span class="example-label"
|
220
|
-
>${
|
220
|
+
>${i.msg("Example:",{desc:"Label for example format"})}</span
|
221
221
|
>
|
222
222
|
${this._renderExampleFormat()}
|
223
223
|
</div>
|
@@ -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([
|
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 z=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"}));
|