@luzmo/analytics-components-kit 1.0.9-beta.3 → 1.0.9-beta.5
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/README.md +1 -1
- package/package.json +2 -2
- package/react/package.json +2 -2
- package/standalone/chunks/base-Cgmw1Vq_.js +2 -0
- package/standalone/chunks/display-settings-binning-CxpvhW7Y.js +38 -0
- package/standalone/chunks/display-settings-datetime-Cqptoxuq.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-BJp7zJPj.js +26 -0
- package/standalone/chunks/display-settings-numeric-BskLgQmz.js +172 -0
- package/standalone/chunks/{display-settings-period-over-period-Bwjoji3a.js → display-settings-period-over-period-CbUd7uc9.js} +1 -1
- package/standalone/chunks/embed-EnSdYTW8.js +228 -0
- package/standalone/chunks/{filters-C1yU7w2V.js → filters-CTsIpQ2T.js} +68 -68
- package/standalone/chunks/{formula-codemirror-BAlhe79s.js → formula-codemirror-4wlUAHrO.js} +1 -1
- package/standalone/chunks/item-option-action-button-group-DZW0HRGd.js +35 -0
- package/standalone/chunks/item-option-base-BlSnktzl.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-jnEt02PP.js +22 -0
- package/standalone/chunks/{item-option-color-picker-59il-pkm.js → item-option-color-picker-CcElYCgD.js} +1 -1
- package/standalone/chunks/item-option-color-range-DTFbs7JK.js +80 -0
- package/standalone/chunks/item-option-guidelines-DFlj41ZE.js +117 -0
- package/standalone/chunks/{item-option-multi-language-field-BNn4WFUG.js → item-option-multi-language-field-DVc8-FVc.js} +1 -1
- package/standalone/chunks/{item-option-number-field-_lCPA_qC.js → item-option-number-field-B1V-8Nq-.js} +1 -1
- package/standalone/chunks/item-option-panel-CpyguQjh.js +298 -0
- package/standalone/chunks/{item-option-picker-CeK7QDTm.js → item-option-picker-BCrQSP1O.js} +1 -1
- package/standalone/chunks/item-option-position-picker-CLiGzaZ1.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-DmFdahh8.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-DR7gdaTr.js → item-option-radio-button-group-nioc7wyo.js} +1 -1
- package/standalone/chunks/item-option-slider-BfXB8U09.js +15 -0
- package/standalone/chunks/{item-option-switch-DJfnhpf_.js → item-option-switch-DPF9lIX0.js} +1 -1
- package/standalone/chunks/{item-option-text-field-DNqL7Evw.js → item-option-text-field-CRbhs_g4.js} +1 -1
- package/standalone/chunks/item-slot-picker-panel-B_7VXYPs.js +439 -0
- package/standalone/chunks/load-data-fields-for-datasets-fBp1YEFi.js +25 -0
- package/standalone/chunks/{load-formula-codemirror-Cyqo4LoE.js → load-formula-codemirror-DcjxFIW6.js} +1 -1
- package/standalone/chunks/localized-mixin-YSDMfLKU.js +2 -0
- package/standalone/chunks/{luzmo-icon-markup-GqF25og5.js → luzmo-icon-markup-JO3eup7O.js} +1 -1
- package/standalone/chunks/luzmoCog-C4v4vc5N.js +2 -0
- package/standalone/chunks/luzmoLockOutline-Dctb86HR.js +2 -0
- package/standalone/chunks/luzmoTable-BYeZ8pW6.js +2 -0
- package/standalone/chunks/task-CTUsEtxU.js +2 -0
- package/standalone/chunks/themes-BD5sKr3j.js +2 -0
- package/standalone/chunks/v4-CI0qP0ur.js +2 -0
- package/standalone/interactive-viz-item.js +20 -246
- package/standalone/item-grid.js +115 -0
- package/standalone/manifest.json +40 -33
- package/standalone/chunks/base-DOKoeL4P.js +0 -2
- package/standalone/chunks/display-settings-binning-CTWsdo0F.js +0 -38
- package/standalone/chunks/display-settings-datetime-CdxMI-9Q.js +0 -199
- package/standalone/chunks/display-settings-grand-totals-BCW8hefp.js +0 -26
- package/standalone/chunks/display-settings-numeric-D04OO7n9.js +0 -172
- package/standalone/chunks/item-option-action-button-group-B3cugMc_.js +0 -35
- package/standalone/chunks/item-option-base-R8-N5_rE.js +0 -38
- package/standalone/chunks/item-option-color-palette-picker-CMZyo1NH.js +0 -22
- package/standalone/chunks/item-option-color-range-BWaElfwS.js +0 -80
- package/standalone/chunks/item-option-guidelines-BzvrNruz.js +0 -117
- package/standalone/chunks/item-option-panel-CyE_83Hf.js +0 -298
- package/standalone/chunks/item-option-position-picker-BAWZpDBA.js +0 -14
- package/standalone/chunks/item-option-positions-number-field-DjhFmMAp.js +0 -31
- package/standalone/chunks/item-option-slider-C_jierlR.js +0 -15
- package/standalone/chunks/item-slot-picker-panel-Bqmx51Yb.js +0 -439
- package/standalone/chunks/load-data-fields-for-datasets-_VJWUFPO.js +0 -25
- package/standalone/chunks/localized-mixin-BEfBwOPN.js +0 -2
- package/standalone/chunks/task-C3c3OWyi.js +0 -2
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{n as e,t}from"./localized-mixin-BEfBwOPN.js";import{n}from"./lit-localize-CIGP-NUw.js";import{t as r}from"./localized-decorator-Buib6Rq1.js";import{t as i}from"./luzmoAngleDown-PNrItYzK.js";import{a,t as o}from"./calculate-data-field-icon-CrEVAfzJ.js";import{t as s}from"./luzmo-icon-markup-GqF25og5.js";import{n as c,r as l,t as u}from"./base-DOKoeL4P.js";import{t as d}from"./decompose-numeric-format-BXLQ97e2.js";import{t as f}from"./localize-BXHWaHdZ.js";import{html as p,nothing as m,property as h,query as g,state as _,unsafeCSS as v}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/number-field.js";import{removeSlottableRequest as y}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/menu.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/tooltip.js";var b=`:host .settings-container{gap:var(--luzmo-display-settings-vertical-gap,var(--luzmo-spacing-2));flex-direction:column;display:flex}:host .settings-row{justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap,var(--display-settings-numeric-gap));display:flex}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start,var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{white-space:nowrap;text-overflow:ellipsis;text-transform:uppercase;max-width:100%;color:var(--luzmo-font-color);white-space:nowrap;cursor:default;margin:.5rem 1rem;font-weight:600;overflow:hidden}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{width:auto;font-size:.75em;line-height:1;position:absolute;bottom:45%;left:60%}.data-icon-type{text-align:center;width:1.5rem;display:inline-block;position:relative}:host{--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-2)}:host([size=s]){--display-settings-numeric-gap:var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-1)}:host([size=l]){--display-settings-numeric-gap:var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-3)}:host([size=xl]){--display-settings-numeric-gap:var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start:var(--luzmo-spacing-4)}`,x={sum:()=>n(`Sum`,{desc:`Aggregation label`}),cumulativesum:()=>n(`Cumulative sum`,{desc:`Aggregation label`}),average:()=>n(`Average`,{desc:`Aggregation label`}),median:()=>n(`Median`,{desc:`Aggregation label`}),count:()=>n(`Count rows`,{desc:`Aggregation label`}),distinctcount:()=>n(`Count distinct`,{desc:`Aggregation label`}),min:()=>n(`Minimum`,{desc:`Aggregation label`}),max:()=>n(`Maximum`,{desc:`Aggregation label`}),stddev:()=>n(`Standard deviation`,{desc:`Aggregation label`}),rate:()=>n(`Rate`,{desc:`Aggregation label`})},S={general:`123`,percentage:`%`,scientific:`SI`},C={time:()=>n(`Time`,{desc:`Time format option`}),short:()=>n(`Short`,{desc:`Short format option`}),long:()=>n(`Long`,{desc:`Long format option`})},w={Auto:{auto:!0,label:()=>n(`Auto`,{desc:`Automatic setting of the option`})},"1,000.00":{auto:!1,label:()=>`1,000.00`,thousandSeparator:`,`,decimalSeparator:`.`,hiddenFor:`scientific`},"1.000,00":{auto:!1,label:()=>`1.000,00`,thousandSeparator:`.`,decimalSeparator:`,`,hiddenFor:`scientific`},"1000.00":{auto:!1,label:()=>`1000.00`,decimalSeparator:`.`},"1000,00":{auto:!1,label:()=>`1000,00`,decimalSeparator:`,`}},T={levels:[{level:1,label:`years`},{level:2,label:`quarters`},{level:3,label:`months`},{level:4,label:`weeks`},{level:5,label:`days`},{level:6,label:`hours`},{level:7,label:`minutes`},{level:8,label:`seconds`},{level:9,label:`milliseconds`}]},E=class extends t(c(l,{validSizes:Object.values(u)})){constructor(...e){super(...e),this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._handleSlottableRequest=e=>{this._renderDurationLevelMenu=e.data!==y},this._sendEvent=()=>{let e={...this.slotContent,format:this._format,aggregationFunc:this._aggregationFunc};this._aggregationWeightColumn?e.aggregationWeight={...this._aggregationWeightColumn}:delete e.aggregationWeight,this._displayMode===`duration`?(e.duration=e.duration??{},e.duration.format=this._durationFormat,e.duration.levels=this._durationLevels):delete e.duration,this.dispatchEvent(new CustomEvent(`luzmo-slot-content-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:e}}))}}static get styles(){return[v(b)]}_parseSavedNumericFormatSettings(){if(this._displayMode=this.slotContent?.subtype===`duration`?`duration`:`numeric`,this._durationFormat=this.slotContent?.duration?.format??`short`,this._durationLevels=this.slotContent?.duration?.levels??[1],this._displayMode===`duration`)this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=this.slotContent?.format??`.0f`;let e=d(this._format??`.0f`);this._isAuto=e.typeFormat?.includes(`a`)??!1,[`%`,`a%`,`y`,`ay`].includes(e.typeFormat)?this._displayAs=`percentage`:[`s`,`as`,`w`,`aw`].includes(e.typeFormat)?this._displayAs=`scientific`:this._displayAs=`general`,this._precision=e.precision?Number.parseInt(e.precision.replace(`.`,``),10):+(this._displayAs===`scientific`),this._commaDecimals=[`z`,`az`,`y`,`ay`,`w`,`aw`].includes(e.typeFormat),this._thousandSeparator=e.comma===`,`,this._isAuto?this._numericFormatGroup=`Auto`:this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1.000,00`:!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup=`1,000.00`:this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup=`1000,00`:!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup=`1000.00`)}}_setNumericDisplayAs(){this._displayAs=this._displayAsElement?.selected?.[0]??`general`,this._displayAs===`scientific`&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(e){let t=w[e?.detail??`Auto`];this._thousandSeparator=[`,`,`.`].includes(t?.thousandSeparator??``),this._commaDecimals=t?.decimalSeparator===`,`,this._isAuto=t?.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){Number.isNaN(this._precisionElement.value)&&(this._precisionElement.value=+(this._displayAs===`scientific`)),this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){let e=`f`,t=this.slotContent.subtype===`duration`?this._durationLevels&&this._durationLevels?.length===1?`numeric`:`duration`:`numeric`;if(this._maxDurationLevel=Math.min(...this._durationLevels),t===`duration`)(![`time`,`short`,`long`].includes(this._durationFormat??``)||this._maxDurationLevel<6&&this._durationFormat===`time`)&&(this._durationFormat=`short`);else{let t=this._displayAs??`general`;t===`general`&&this._commaDecimals?e=`z`:t===`percentage`&&this._commaDecimals?e=`y`:t===`scientific`&&this._commaDecimals?e=`w`:t===`percentage`?e=`%`:t===`scientific`&&(e=`s`),this._format=(this._thousandSeparator||this._isAuto?`,`:``)+`.`+this._precision+(this._isAuto?`a`:``)+e}}_setAggregationFunc(){let e=this._aggregationElement.value,t=this._aggregationFunc,n=this.slotContent.format;if(e!==(t===`weightedaverage`?`average`:t)){if(this._aggregationFunc=e===`average`&&this._aggregationWeightColumn?.column?`weightedaverage`:e,t===`rate`){let e=d(n),t=[`%`,`y`,`a%`,`ay`].includes(e.typeFormat);this.slotContent.subtype===`currency`&&t&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc===`rate`||t===`rate`)&&this.requestUpdate()}}_setAggregationWeight(){let e=this._aggregationWeightElement.value,t=this._aggregationFunc;if(e===`none`)this._aggregationWeightColumn=void 0,this._aggregationFunc===`weightedaverage`&&(this._aggregationFunc=`average`);else{let t,n;for(let r of this.measureColumns??[]){let i=r.columns?.find(t=>t.id===e);if(i){t=i,n=r.datasetId;break}}t&&(this._aggregationWeightColumn={column:t.id,set:n,columnSubType:t.subtype}),this._aggregationFunc===`average`&&(this._aggregationFunc=`weightedaverage`)}this._sendEvent(),this.requestUpdate(),(t===`weightedaverage`&&this._aggregationFunc===`average`||t===`average`&&this._aggregationFunc===`weightedaverage`)&&this.requestUpdate()}_setDurationLevels(){let e=this._durationLevels,t=this._durationLevelsElement.value.split(`,`).filter(e=>e!==``).map(e=>Number.parseInt(e,10));this._durationLevels=(t?.length??0)>=1?t:e,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){this._durationFormat=this._durationFormatElement?.selected?.[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat===`time`){let e=this._durationLevels.sort().at(-1);if([7,8,9].includes(e)){for(let t of{lev7:[6],lev8:[6,7],lev9:[6,7,8]}[`lev`+e])this._durationLevels.includes(t)||this._durationLevels.push(t);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(e){super.willUpdate(e),e.has(`slotContent`)&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=this.slotContent?.aggregationFunc??(this.slotContent?.type===`numeric`?`sum`:`count`),this._aggregationWeightColumn=this.slotContent?.aggregationWeight,this._isFormula=this.slotContent?.formula||this.slotContent?.formulaId)}_renderDurationLevelsSettings(){let e=T.levels.map(e=>{let t=!1;return this._durationFormat===`time`&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(t=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(t=!0),p`<luzmo-menu-item
|
|
3
|
-
value=${e.level}
|
|
4
|
-
?selected=${this._durationLevels.includes(e.level)}
|
|
5
|
-
?disabled=${t}
|
|
6
|
-
>
|
|
7
|
-
${e.label}
|
|
8
|
-
</luzmo-menu-item>`});return p` <div class="setting">
|
|
9
|
-
<luzmo-field-label .size=${this.size} for="duration-levels">
|
|
10
|
-
${n(`Duration levels`,{desc:`Label for duration levels setting`})}
|
|
11
|
-
</luzmo-field-label>
|
|
12
|
-
<luzmo-action-button id="duration-levels-trigger" size=${this.size} aria-haspopup="true" aria-expanded=${this._renderDurationLevelMenu?`true`:`false`}>
|
|
13
|
-
${this._durationLevels.length}
|
|
14
|
-
${this._durationLevels.length===1?n(`level`,{desc:`Singular form of level for duration levels`}):n(`levels`,{desc:`Plural form of level for duration levels`})} ${n(`active`,{desc:`Active suffix for duration levels count`})}
|
|
15
|
-
<span class="duration-angle-down-icon">
|
|
16
|
-
${s(i)}
|
|
17
|
-
</span>
|
|
18
|
-
</luzmo-action-button>
|
|
19
|
-
<luzmo-overlay
|
|
20
|
-
id="duration-levels-overlay"
|
|
21
|
-
trigger="duration-levels-trigger@click"
|
|
22
|
-
type="auto"
|
|
23
|
-
placement="bottom-start"
|
|
24
|
-
type="page"
|
|
25
|
-
@slottable-request=${this._handleSlottableRequest}
|
|
26
|
-
>
|
|
27
|
-
<luzmo-popover style="position: relative">
|
|
28
|
-
${this._renderDurationLevelMenu?p` <luzmo-menu
|
|
29
|
-
id="duration-levels"
|
|
30
|
-
size=${this.size}
|
|
31
|
-
selects="multiple"
|
|
32
|
-
.value=${this._durationLevels.join(`,`)}
|
|
33
|
-
@change=${this._setDurationLevels}
|
|
34
|
-
>
|
|
35
|
-
${e}
|
|
36
|
-
</luzmo-menu>`:``}
|
|
37
|
-
</luzmo-popover>
|
|
38
|
-
</luzmo-overlay>
|
|
39
|
-
</div>`}_renderDurationFormatSettings(){let e=Object.keys(C).map(e=>e===`time`&&(this._maxDurationLevel??1)<6?``:p`<luzmo-action-button value=${e}>
|
|
40
|
-
${C[e]()}
|
|
41
|
-
</luzmo-action-button>`);return p` <div class="setting">
|
|
42
|
-
<luzmo-field-label .size=${this.size} for="duration-format">
|
|
43
|
-
${n(`Format`,{desc:`Label for format setting`})}
|
|
44
|
-
</luzmo-field-label>
|
|
45
|
-
<luzmo-action-group
|
|
46
|
-
emphasized
|
|
47
|
-
id="duration-format"
|
|
48
|
-
size=${this.size}
|
|
49
|
-
compact=""
|
|
50
|
-
.selected=${[this._durationFormat??`short`]}
|
|
51
|
-
selects="single"
|
|
52
|
-
@change=${this._setDurationFormat}
|
|
53
|
-
>
|
|
54
|
-
${e}
|
|
55
|
-
</luzmo-action-group>
|
|
56
|
-
</div>`}_renderNumericDisplayAsSettings(){let e=Object.keys(S).filter(e=>e!==`percentage`||(this.slotContent.subtype!==`currency`||this.slotContent.aggregationFunc===`rate`)&&this.slotContent.periodOverPeriod?.type!==`percentageChange`).map(e=>p`<luzmo-action-button value=${e}
|
|
57
|
-
>${S[e]}</luzmo-action-button
|
|
58
|
-
>`);return p`<div class="setting">
|
|
59
|
-
<luzmo-field-label .size=${this.size} for="display-as">
|
|
60
|
-
${n(`Display as`,{desc:`Label for display as setting for the datetime field`})}
|
|
61
|
-
</luzmo-field-label>
|
|
62
|
-
<luzmo-action-group
|
|
63
|
-
emphasized
|
|
64
|
-
id="display-as"
|
|
65
|
-
size=${this.size}
|
|
66
|
-
compact=""
|
|
67
|
-
.selected=${[this._displayAs]}
|
|
68
|
-
selects="single"
|
|
69
|
-
@change=${this._setNumericDisplayAs}
|
|
70
|
-
>
|
|
71
|
-
${e}
|
|
72
|
-
</luzmo-action-group>
|
|
73
|
-
</div>`}_renderNumericFormatSettings(){let e=Object.entries(w).filter(([,{hiddenFor:e}])=>!e||e!==this._displayAs).map(([e,{label:t}])=>p`<luzmo-menu-item value=${e}>${t()}</luzmo-menu-item>`);return p` <div class="setting">
|
|
74
|
-
<luzmo-field-label .size=${this.size} for="format">
|
|
75
|
-
${n(`Format`,{desc:`Label for format setting`})}
|
|
76
|
-
</luzmo-field-label>
|
|
77
|
-
<luzmo-picker
|
|
78
|
-
id="format"
|
|
79
|
-
size=${this.size}
|
|
80
|
-
variant="highlight"
|
|
81
|
-
value=${this._numericFormatGroup??`Auto`}
|
|
82
|
-
@change=${this._setNumericSeparators}
|
|
83
|
-
>
|
|
84
|
-
${e}
|
|
85
|
-
</luzmo-picker>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="setting">
|
|
88
|
-
<luzmo-field-label .size=${this.size} for="precision" id="precision-label">
|
|
89
|
-
${this._displayAs===`scientific`?n(`Precision`,{desc:`Label for precision setting`}):n(`Decimals`,{desc:`Label for decimals setting`})}
|
|
90
|
-
</luzmo-field-label>
|
|
91
|
-
<luzmo-number-field
|
|
92
|
-
id="precision"
|
|
93
|
-
label=${this._displayAs===`scientific`?n(`Precision`,{desc:`Label for precision setting`}):n(`Decimals`,{desc:`Label for decimals setting`})}
|
|
94
|
-
min=${+(this._displayAs===`scientific`)}
|
|
95
|
-
max="22"
|
|
96
|
-
size=${this.size}
|
|
97
|
-
value=${this._precision??+(this._displayAs===`scientific`)}
|
|
98
|
-
@change=${this._setPrecision}
|
|
99
|
-
></luzmo-number-field>
|
|
100
|
-
</div>`}_renderAggregationSettings(){let e=Object.entries(x).filter(([e])=>[`count`,`distinctcount`].includes(e)||this.slotContent?.type===`numeric`).filter(([e])=>e!==`cumulativesum`||this.isCumulativeSumEnabled).map(([e,t])=>p`<luzmo-menu-item value=${e}>${t()}</luzmo-menu-item>`),t=[p`
|
|
101
|
-
<luzmo-menu-item
|
|
102
|
-
value="none"
|
|
103
|
-
class="no-weight"
|
|
104
|
-
>
|
|
105
|
-
<span class="no-weight-label">${n(`No weight`,{desc:`Label for no weight option`})}</span>
|
|
106
|
-
</luzmo-menu-item>
|
|
107
|
-
`,...(this.measureColumns??[]).flatMap(e=>{let t=typeof e.datasetName==`object`?f(e.datasetName,this.language):e.datasetName;return[p`<div class="dataset-header" role="group" aria-label=${t}>
|
|
108
|
-
${t}
|
|
109
|
-
<luzmo-tooltip self-managed placement="right" size=${this.size}>
|
|
110
|
-
${t}
|
|
111
|
-
</luzmo-tooltip>
|
|
112
|
-
</div>`,...(e.columns??[]).map(e=>{let t=typeof e.name==`object`?f(e.name,this.language):e.name,n=s(o(e,`s`)),r=e.expression?a:void 0,i=!!r,c=i?p`<span class="secondary-icon"
|
|
113
|
-
>${s(r)}</span
|
|
114
|
-
>`:m;return p`<luzmo-menu-item value=${e.id}>
|
|
115
|
-
<span class="data-icon-type" slot="icon">
|
|
116
|
-
<span class=${i?`with-secondary-icon`:``}
|
|
117
|
-
>${n}</span
|
|
118
|
-
>
|
|
119
|
-
${c}
|
|
120
|
-
</span>
|
|
121
|
-
<span class="column-label text-truncate">${t}</span>
|
|
122
|
-
<luzmo-tooltip self-managed placement="right" size=${this.size}>
|
|
123
|
-
${t}
|
|
124
|
-
</luzmo-tooltip>
|
|
125
|
-
</luzmo-menu-item>`})]})];return p`<div class="settings-row">
|
|
126
|
-
<div class="setting">
|
|
127
|
-
<luzmo-field-label .size=${this.size} for="aggregation">
|
|
128
|
-
${n(`Aggregation`,{desc:`Label for aggregation setting`})}
|
|
129
|
-
</luzmo-field-label>
|
|
130
|
-
<luzmo-picker
|
|
131
|
-
id="aggregation"
|
|
132
|
-
size=${this.size}
|
|
133
|
-
variant="highlight"
|
|
134
|
-
value=${(()=>{let e=this.slotContent?.type===`numeric`?`sum`:`count`;return this._aggregationFunc===`weightedaverage`?`average`:this._aggregationFunc??e})()}
|
|
135
|
-
@change=${this._setAggregationFunc}
|
|
136
|
-
>
|
|
137
|
-
${e}
|
|
138
|
-
</luzmo-picker>
|
|
139
|
-
</div>
|
|
140
|
-
${[`rate`,`average`,`weightedaverage`].includes(this._aggregationFunc??``)?p`<div class="setting">
|
|
141
|
-
<luzmo-field-label .size=${this.size} for="weighting-column">
|
|
142
|
-
${this._aggregationFunc===`rate`?n(`Denominator`,{desc:`Label for denominator field`}):n(`Weight`,{desc:`Label for weight field`})}
|
|
143
|
-
</luzmo-field-label>
|
|
144
|
-
${this.measureColumns.length>0?p`
|
|
145
|
-
<luzmo-picker
|
|
146
|
-
id="weighting-column"
|
|
147
|
-
size=${this.size}
|
|
148
|
-
variant="highlight"
|
|
149
|
-
icons="none"
|
|
150
|
-
value=${this._aggregationWeightColumn?.column??`none`}
|
|
151
|
-
@change=${this._setAggregationWeight}
|
|
152
|
-
>
|
|
153
|
-
${t}
|
|
154
|
-
</luzmo-picker>
|
|
155
|
-
`:p`<luzmo-picker
|
|
156
|
-
id="weighting-column"
|
|
157
|
-
size=${this.size}
|
|
158
|
-
variant="highlight"
|
|
159
|
-
icons="none"
|
|
160
|
-
value="none"
|
|
161
|
-
>
|
|
162
|
-
<luzmo-menu-item value="none">${n(`No weight`,{desc:`Label for no weight option`})}</luzmo-menu-item>
|
|
163
|
-
</luzmo-picker>`}
|
|
164
|
-
</div>`:``}
|
|
165
|
-
</div>`}render(){return p`<div class="settings-container">
|
|
166
|
-
<div class="settings-row">
|
|
167
|
-
${this._displayMode===`duration`?this._renderDurationLevelsSettings():this._renderNumericDisplayAsSettings()}
|
|
168
|
-
${this._durationLevels?.length>1?this._renderDurationFormatSettings():this._renderNumericFormatSettings()}
|
|
169
|
-
</div>
|
|
170
|
-
${this._isFormula||this.isAggregationDisabled?m:this._renderAggregationSettings()}
|
|
171
|
-
</div>
|
|
172
|
-
</div>`}};e([h({type:Object,attribute:!1})],E.prototype,`slotContent`,void 0),e([h({type:Array,reflect:!1})],E.prototype,`measureColumns`,void 0),e([h({type:Boolean})],E.prototype,`isAggregationDisabled`,void 0),e([h({type:Boolean})],E.prototype,`isCumulativeSumEnabled`,void 0),e([g(`#display-as`)],E.prototype,`_displayAsElement`,void 0),e([g(`#precision`)],E.prototype,`_precisionElement`,void 0),e([g(`#aggregation`)],E.prototype,`_aggregationElement`,void 0),e([g(`#weighting-column`)],E.prototype,`_aggregationWeightElement`,void 0),e([g(`#duration-levels`)],E.prototype,`_durationLevelsElement`,void 0),e([g(`#duration-format`)],E.prototype,`_durationFormatElement`,void 0),e([_()],E.prototype,`_renderDurationLevelMenu`,void 0),E=e([r()],E),customElements.get(`luzmo-display-settings-numeric`)||customElements.define(`luzmo-display-settings-numeric`,E);
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{n as e}from"./localized-mixin-BEfBwOPN.js";import{t}from"./luzmoAlignLeft-HA-XKPHy.js";import{n,r,t as i}from"./luzmoBorderDotted-CWXwQ_Hm.js";import{t as a}from"./item-option-base-R8-N5_rE.js";import{html as o,property as s,query as c,unsafeCSS as l}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/icon.js";var u={icon:[32,32,`M1 2C-.3 2-.3 4 1 4h30c1.3 0 1.3-2 0-2zm14.3 4.3-5 5c-1 1 .5 2.3 1.4 1.4L15 9.4V18c0 1.3 2 1.3 2 0V9.4l3.3 3.3c1 1 2.3-.5 1.4-1.4l-5-5a1 1 0 0 0-1.4 0z`],name:`align-top`},d={icon:[32,32,`m10.3 4.7 5 5c.4.4 1 .4 1.4 0l5-5c1-1-.5-2.3-1.4-1.4L16 7.6l-4.3-4.3c-.9-1-2.4.5-1.4 1.4ZM1 14c-1.3 0-1.3 2 0 2h30c1.3 0 1.3-2 0-2zm14.3 6.3-5 5c-1 1 .5 2.3 1.4 1.4l4.3-4.3 4.3 4.3c1 1 2.3-.5 1.4-1.4l-5-5a1 1 0 0 0-1.4 0z`],name:`align-middle`},f={icon:[32,32,`M1 30c-1.3 0-1.3-2 0-2h30c1.3 0 1.3 2 0 2zm14.3-4.3-5-5c-1-1 .5-2.3 1.4-1.4l3.3 3.3V14c0-1.3 2-1.3 2 0v8.6l3.3-3.3c1-1 2.3.5 1.4 1.4l-5 5a1 1 0 0 1-1.4 0z`],name:`align-bottom`},p={icon:[32,32,`M1 2C-.3 2-.3 4 1 4h30c1.3 0 1.3-2 0-2zm5 12c-1.3 0-1.3 2 0 2h20c1.3 0 1.3-2 0-2zm5 12c-1.3 0-1.3 2 0 2h10c1.3 0 1.3-2 0-2z`],name:`align-center`},m={icon:[32,32,`M1 2C-.3 2-.3 4 1 4h30c1.3 0 1.3-2 0-2zm10 12c-1.3 0-1.3 2 0 2h20c1.3 0 1.3-2 0-2zm10 12c-1.3 0-1.3 2 0 2h10c1.3 0 1.3-2 0-2z`],name:`align-right`},h={icon:[32,32,`m15 2a1 1 0 0 0-0.7 0.3l-4 4a1 1 0 0 0 0 1.4 1 1 0 0 0 1.4 0L15 4.4 18.3 7.7a1 1 0 0 0 1.4 0 1 1 0 0 0 0-1.4l-4-4A1 1 0 0 0 15 2Zm-4 22a1 1 0 0 0-0.7 0.3 1 1 0 0 0 0 1.4l4 4a1 1 0 0 0 1.4 0l4-4a1 1 0 0 0 0-1.4 1 1 0 0 0-1.4 0L15 27.6 11.7 24.3A1 1 0 0 0 11 24ZM15 2a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1 1 1 0 0 0 1-1V3A1 1 0 0 0 15 2Z`],name:`arrows-vertical`},g={icon:[32,32,`m2 17a1 1 0 0 0 0.3 0.7l4 4a1 1 0 0 0 1.4 0 1 1 0 0 0 0-1.4L4.4 17 7.7 13.7a1 1 0 0 0 0-1.4 1 1 0 0 0-1.4 0l-4 4a1 1 0 0 0-0.3 0.7zm22 4a1 1 0 0 0 0.3 0.7 1 1 0 0 0 1.4 0l4-4a1 1 0 0 0 0-1.4l-4-4a1 1 0 0 0-1.4 0 1 1 0 0 0 0 1.4l3.3 3.3-3.3 3.3a1 1 0 0 0-0.3 0.7zM2 17a1 1 0 0 0 1 1H29a1 1 0 0 0 1-1 1 1 0 0 0-1-1H3a1 1 0 0 0-1 1z`],name:`arrows-horizontal`},_={icon:[32,32,`M28.3 2.3 20 10.6V7c0-1.3-2-1.3-2 0v6c0 .6.4 1 1 1h6c1.3 0 1.3-2 0-2h-3.6l8.3-8.3c1-1-.5-2.3-1.4-1.4ZM7 18c-1.3 0-1.3 2 0 2h3.6l-8.3 8.3a1 1 0 0 0 1.4 1.4l8.3-8.3V25c0 1.3 2 1.3 2 0v-6c0-.6-.5-1-1-1Z`],name:`compress`},v={icon:[32,32,`M23 2c-1.3 0-1.3 2 0 2h3.6l-8.3 8.3c-1 1 .5 2.3 1.4 1.4L28 5.4V9c0 1.3 2 1.3 2 0V3c0-.5-.4-1-1-1ZM12.3 18.3 4 26.6V23a1 1 0 1 0-2 0v6c0 .6.4 1 1 1h6a1 1 0 1 0 0-2H5.4l8.3-8.3c1-1-.5-2.3-1.4-1.4z`],name:`expand`},y={icon:[32,32,`M3 2a1 1 0 0 0-1 1v6c0 1.3 2 1.3 2 0V5.4L14.6 16 4 26.6V23c0-1.3-2-1.3-2 0v6c0 .6.4 1 1 1h6c1.3 0 1.3-2 0-2H5.4L16 17.4 26.6 28H23c-1.3 0-1.3 2 0 2h6c.8 0 1-.8 1-1v-6c0-1.3-2-1.3-2 0v3.6L17.4 16 28 5.4V9c0 1.3 2 1.3 2 0V3c0-.5-.4-1-1-1h-6c-1.3 0-1.3 2 0 2h3.6L16 14.6 5.4 4H9c1.3 0 1.3-2 0-2z`],name:`arrows-expand`},b={icon:[32,32,`M15.99 2C8.27 2 1.99 8.3 2 16.01c0 7.72 6.29 14 14 13.99 7.72 0 14-6.28 14-14a1 1 0 0 0 0-.01 1 1 0 0 0 0-.01A14.01 14.01 0 0 0 15.99 2zm0 2c6.64 0 12 5.34 12.01 11.98a1 1 0 0 0 0 .02c0 2.96-1.07 5.66-2.83 7.75L8.25 6.83A11.96 11.96 0 0 1 15.99 4zM6.83 8.25l16.92 16.92A11.99 11.99 0 0 1 6.83 8.25z`],name:`ban`},x={icon:[32,32,`M 2,2 V 4 H 30 V 2 Z m -1,9 v 2 h 30 v -2 z m 0,10 v 2 H 31 V 21 Z M 20,1 v 30 h 2 V 1 Z M 10,1 v 30 h 2 V 1 Z M 5,0 C 2.2,0 0,2.2 0,5 v 22 c 0,2.8 2.2,5 5,5 h 22 c 2.8,0 5,-2.2 5,-5 V 5 C 32,2.2 29.8,0 27,0 Z m 0,2 h 22 c 1.7,0 3,1.3 3,3 v 22 c 0,1.7 -1.3,3 -3,3 H 5 C 3.3,30 2,28.7 2,27 V 5 C 2,3.3 3.3,2 5,2 Z`],name:`table`},S={icon:[28,32,`m7 13a2 2 0 0 0-2 2 2 2 0 0 0 2 2h9.5c4.1 0 5.5 2.3 5.5 4.5 0 2.2-1.4 4.5-5.5 4.5H4a2 2 0 0 0-2 2 2 2 0 0 0 2 2H16.5C22.4 30 26 25.8 26 21.5 26 17.2 22.4 13 16.5 13ZM4 2A2 2 0 0 0 2 4 2 2 0 0 0 4 6h11c3.1 0 4 1.7 4 3.5 0 1.8-0.9 3.5-4 3.5H7a2 2 0 0 0-2 2 2 2 0 0 0 2 2h8c4.9 0 8-3.8 8-7.5C23 5.8 19.9 2 15 2ZM7 3A2 2 0 0 0 5 5v22.5a2 2 0 0 0 2 2 2 2 0 0 0 2-2V5A2 2 0 0 0 7 3Z`],name:`bold`},C={icon:[24,32,`m11 2a1 1 0 0 0-1 1 1 1 0 0 0 1 1H21A1 1 0 0 0 22 3 1 1 0 0 0 21 2Zm5 0A1 1 0 0 0 15 2.7L7.3 28H3a1 1 0 0 0 0 2h5 5a1 1 0 0 0 1-1 1 1 0 0 0-1-1H9.4L17 3.3a1 1 0 0 0-0.7-1.2A1 1 0 0 0 16 2Z`],name:`italic`},w={icon:[32,32,`M7 0C6.4 0 6 0.4 6 1v13c0 3.3 1.3 5.8 3.1 7.5 1.9 1.7 4.4 2.5 6.9 2.5 2.5 0 5-0.8 6.9-2.5C24.7 19.8 26 17.3 26 14V1C26 0.4 25.6 0 25 0 24.4 0 24 0.4 24 1v13c0 2.8-1 4.7-2.5 6-1.5 1.3-3.5 2-5.5 2-2 0-4-0.7-5.5-2C9 18.7 8 16.8 8 14V1C8 0.4 7.6 0 7 0Zm16 0c-0.6 0-1 0.4-1 1 0 0.6 0.4 1 1 1h4C27.6 2 28 1.6 28 1 28 0.4 27.6 0 27 0ZM5 0C4.4 0 4 0.4 4 1 4 1.6 4.4 2 5 2H9C9.6 2 10 1.6 10 1 10 0.4 9.6 0 9 0ZM3 30c-0.6 0-1 0.4-1 1 0 0.6 0.4 1 1 1h26c0.6 0 1-0.4 1-1 0-0.6-0.4-1-1-1z`],name:`underline`},T={icon:[32,32,`M 2,2 V 4 H 30 V 2 Z m -1,9 v 2 h 30 v -2 z m 0,9 v 2 H 31 V 20 Z M 5,0 C 2.2,0 0,2.2 0,5 v 22 c 0,2.8 2.2,5 5,5 h 22 c 2.8,0 5,-2.2 5,-5 V 5 C 32,2.2 29.8,0 27,0 Z m 0,2 h 22 c 1.7,0 3,1.3 3,3 v 22 c 0,1.7 -1.3,3 -3,3 H 5 C 3.3,30 2,28.7 2,27 V 5 C 2,3.3 3.3,2 5,2 Z`],name:`rows`},E={icon:[32,32,`M 2,2 V 4 H 28 V 2 Z M 14,1 v 30 h 2 V 1 Z M 5,0 C 2.2,0 0,2.2 0,5 v 22 c 0,2.8 2.2,5 5,5 h 20 c 2.8,0 5,-2.2 5,-5 V 5 C 30,2.2 27.8,0 25,0 Z m 0,2 h 20 c 1.7,0 3,1.3 3,3 v 22 c 0,1.7 -1.3,3 -3,3 H 5 C 3.3,30 2,28.7 2,27 V 5 C 2,3.3 3.3,2 5,2 Z`],name:`columns`},D=`luzmo-action-group{--luzmo-item-option-action-button-group-button-background-hover:rgba(var(--luzmo-primary-rgb), .1);--luzmo-item-option-action-button-group-button-background-down:rgba(var(--luzmo-primary-rgb), .2);--luzmo-item-option-action-button-group-button-background-focus:rgba(var(--luzmo-primary-rgb), .1);--luzmo-item-option-action-button-group-button-content-color-default:var(--luzmo-font-color-disabled);--luzmo-item-option-action-button-group-button-content-color-hover:var(--luzmo-font-color-hover);--luzmo-item-option-action-button-group-button-content-color-down:var(--luzmo-font-color-down);--luzmo-item-option-action-button-group-button-content-color-focus:var(--luzmo-font-color-focus)}luzmo-action-group[compact][quiet][emphasized],luzmo-action-group[compact][quiet][emphasized][size=s]{--luzmo-action-group-gap-size-compact:var(--luzmo-spacing-1)}luzmo-action-group[compact][quiet][emphasized][size=l]{--luzmo-action-group-gap-size-compact:var(--luzmo-spacing-2)}luzmo-action-group[compact][quiet][emphasized][size=xl]{--luzmo-action-group-gap-size-compact:var(--luzmo-spacing-3)}luzmo-action-group[compact][quiet][emphasized] luzmo-action-button{--luzmo-action-button-background-color-hover:var(--luzmo-item-option-action-button-group-button-background-hover);--luzmo-action-button-background-color-down:var(--luzmo-item-option-action-button-group-button-background-down);--luzmo-action-button-background-color-focus:var(--luzmo-item-option-action-button-group-button-background-focus);--luzmo-action-button-content-color-default:var(--luzmo-item-option-action-button-group-button-content-color-default);--luzmo-action-button-content-color-hover:var(--luzmo-item-option-action-button-group-button-content-color-hover);--luzmo-action-button-content-color-down:var(--luzmo-item-option-action-button-group-button-content-color-down);--luzmo-action-button-content-color-focus:var(--luzmo-item-option-action-button-group-button-content-color-focus)}luzmo-action-group[compact][quiet][emphasized] luzmo-action-button[selected]:hover,luzmo-action-group[compact][quiet][emphasized] luzmo-action-button[selected]{--luzmo-action-button-background-color-hover:var(--luzmo-item-option-action-button-group-button-background-down);--luzmo-action-button-background-color-default:var(--luzmo-item-option-action-button-group-button-background-down);--luzmo-action-button-content-color-default:var(--luzmo-item-option-action-button-group-button-content-color-down);--luzmo-action-button-content-color-hover:var(--luzmo-item-option-action-button-group-button-content-color-down);--luzmo-action-button-content-color-down:var(--luzmo-item-option-action-button-group-button-content-color-down)}`,O={alignBottom:f,alignMiddle:d,alignTop:u,alignLeft:t,alignCenter:p,alignRight:m,ban:b,borderSolid:r,borderDashed:n,borderDotted:i,compress:_,expand:v,arrowsExpand:y,arrowsHorizontal:g,arrowsVertical:h,italic:C,bold:S,underline:w,rows:T,columns:E,table:x},k=class extends a{constructor(...e){super(...e),this.values={},this.disabled=!1}static{this.styles=[...super.styles,l(D)]}_handleEvent(){let e=this.selects===`multiple`?this.actionGroup?.selected:this.actionGroup?.selected?.[0];this.dispatchEvent(new CustomEvent(`luzmo-option-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}}))}_generateButtonContents(e){return typeof e==`string`?o`${e}`:e.iconName||e.icon?o`
|
|
3
|
-
<luzmo-icon
|
|
4
|
-
slot="icon"
|
|
5
|
-
.size=${this.size}
|
|
6
|
-
.icon=${e.icon??O[e.iconName]}
|
|
7
|
-
.label=${e.label??``}
|
|
8
|
-
></luzmo-icon>
|
|
9
|
-
${e.buttonText??``}
|
|
10
|
-
`:o`${e.buttonText??``}`}_generateActionButtons(){return Object.entries(this.values).map(([e,t])=>o`
|
|
11
|
-
<luzmo-action-button value=${e} ?disabled=${this.disabled}>
|
|
12
|
-
${this._generateButtonContents(t)}
|
|
13
|
-
${t.label?o`<luzmo-tooltip
|
|
14
|
-
self-managed
|
|
15
|
-
placement="top"
|
|
16
|
-
size=${this.size}
|
|
17
|
-
>
|
|
18
|
-
${t.label}
|
|
19
|
-
</luzmo-tooltip>`:``}
|
|
20
|
-
</luzmo-action-button>
|
|
21
|
-
`)}renderController(){let e=this._generateActionButtons();return o`
|
|
22
|
-
<luzmo-action-group
|
|
23
|
-
id="luzmo-item-option-control"
|
|
24
|
-
compact
|
|
25
|
-
quiet
|
|
26
|
-
emphasized
|
|
27
|
-
.selects=${this.selects??`single`}
|
|
28
|
-
.size=${this.size}
|
|
29
|
-
.selected=${this.value||this.default||[]}
|
|
30
|
-
@change=${this._handleEvent}
|
|
31
|
-
.disabled=${this.disabled}
|
|
32
|
-
>
|
|
33
|
-
${e}
|
|
34
|
-
</luzmo-action-group>
|
|
35
|
-
`}};e([s({type:Array})],k.prototype,`values`,void 0),e([s({type:Boolean,reflect:!0})],k.prototype,`disabled`,void 0),e([s({type:String})],k.prototype,`selects`,void 0),e([s({type:Array})],k.prototype,`value`,void 0),e([s({type:Array})],k.prototype,`default`,void 0),e([c(`luzmo-action-group`)],k.prototype,`actionGroup`,void 0),customElements.get(`luzmo-item-option-action-button-group`)||customElements.define(`luzmo-item-option-action-button-group`,k);export{k as LuzmoItemOptionActionButtonGroup};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{n as e}from"./localized-mixin-BEfBwOPN.js";import{n as t,r as n}from"./base-DOKoeL4P.js";import{html as r,nothing as i,property as a,unsafeCSS as o}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/tooltip.js";var s=`:host{font-family:var(--luzmo-item-option-component-font-family,var(--luzmo-font-family))}.luzmo-item-option{height:var(--luzmo-item-option-component-height,var(--item-option-component-height));justify-content:space-between;align-items:center;gap:var(--luzmo-spacing-3);width:100%;color:var(--luzmo-font-color);font-size:var(--luzmo-font-size-s);display:flex}.control-container{align-items:center;gap:var(--luzmo-item-option-control-container-gap,var(--item-option-control-container-gap));flex:1;justify-content:end;display:flex}.extra-label{padding-left:var(--luzmo-item-option-extra-label-padding-left,var(--item-option-extra-label-padding-left));padding-right:var(--luzmo-item-option-extra-label-padding-right,var(--item-option-extra-label-padding-right));font-size:var(--luzmo-item-option-extra-label-font-size,var(--item-option-extra-label-font-size))}.extra-link{text-align:right;cursor:pointer;text-decoration:underline}.extra-link:hover{color:var(--luzmo-font-color-hover)}.extra-link.disabled{opacity:.65;cursor:not-allowed}.extra-link.disabled:hover{color:var(--luzmo-font-color-disabled)}:host{--item-option-component-height:var(--luzmo-component-height);--item-option-extra-label-padding-right:var(--luzmo-spacing-4);--item-option-extra-label-padding-left:var(--luzmo-spacing-5);--item-option-control-container-gap:var(--luzmo-spacing-2);--item-option-extra-label-font-size:var(--luzmo-font-size-s)}:host([size=s]){--item-option-component-height:var(--luzmo-component-height-s);--item-option-extra-label-padding-right:var(--luzmo-spacing-3);--item-option-extra-label-padding-left:var(--luzmo-spacing-4);--item-option-control-container-gap:var(--luzmo-spacing-2);--item-option-extra-label-font-size:var(--luzmo-font-size-xs)}:host([size=l]){--item-option-component-height:var(--luzmo-component-height-l);--item-option-extra-label-padding-right:var(--luzmo-spacing-4);--item-option-extra-label-padding-left:var(--luzmo-spacing-5);--item-option-control-container-gap:var(--luzmo-spacing-3);--item-option-extra-label-font-size:var(--luzmo-font-size)}:host([size=xl]){--item-option-component-height:var(--luzmo-component-height-xl);--item-option-extra-label-padding-right:var(--luzmo-spacing-5);--item-option-extra-label-padding-left:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--item-option-control-container-gap:var(--luzmo-spacing-4);--item-option-extra-label-font-size:var(--luzmo-font-size-l)}:host{display:block;overflow:hidden}`,c=class extends t(n,{defaultSize:`s`,validSizes:[`s`,`m`,`l`,`xl`]}){constructor(...e){super(...e),this.disabled=!1,this.hideLabel=!1,this.label=``,this.tooltip=``,this.extraLabel=``,this.extraLabelHasClickAction=!1,this.extraLabelTooltip=``}static{this.styles=[o(s)]}handleExtraLabelClick(e){if(this.extraLabelHasClickAction&&typeof this.extraLabelClickAction==`function`){let{value:e}=this.extraLabelClickAction();this.dispatchEvent(new CustomEvent(`luzmo-option-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}}))}e?.preventDefault(),this.dispatchEvent(new CustomEvent(`luzmo-extra-label-click`,{bubbles:!0,composed:!0}))}render(){return r`
|
|
3
|
-
<div class="luzmo-item-option">
|
|
4
|
-
${this.label&&!this.hideLabel?r`
|
|
5
|
-
<luzmo-field-label
|
|
6
|
-
.size=${this.size}
|
|
7
|
-
for="luzmo-item-option-control"
|
|
8
|
-
side-aligned="start"
|
|
9
|
-
>
|
|
10
|
-
${this.label}
|
|
11
|
-
${this.tooltip?r`
|
|
12
|
-
*<luzmo-tooltip
|
|
13
|
-
self-managed
|
|
14
|
-
placement="top"
|
|
15
|
-
size=${this.size}
|
|
16
|
-
>
|
|
17
|
-
${this.tooltip}
|
|
18
|
-
</luzmo-tooltip>
|
|
19
|
-
`:i}
|
|
20
|
-
</luzmo-field-label>
|
|
21
|
-
`:i}
|
|
22
|
-
|
|
23
|
-
<div class="control-container">
|
|
24
|
-
${this.extraLabel?r`
|
|
25
|
-
<div
|
|
26
|
-
class="extra-label ${this.extraLabelHasClickAction?`extra-link`:``}"
|
|
27
|
-
role=${this.extraLabelHasClickAction?`button`:i}
|
|
28
|
-
tabindex=${this.extraLabelHasClickAction?`0`:i}
|
|
29
|
-
@click=${this.handleExtraLabelClick}
|
|
30
|
-
@keydown=${this.extraLabelHasClickAction?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.handleExtraLabelClick(e))}:i}
|
|
31
|
-
>
|
|
32
|
-
<span class=""> ${this.extraLabel} </span>
|
|
33
|
-
</div>
|
|
34
|
-
`:i}
|
|
35
|
-
${this.renderController()}
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
`}};e([a({type:Boolean,reflect:!0})],c.prototype,`disabled`,void 0),e([a({type:Boolean,reflect:!0,attribute:`hide-label`})],c.prototype,`hideLabel`,void 0),e([a({type:String,reflect:!0})],c.prototype,`label`,void 0),e([a({type:String,reflect:!0})],c.prototype,`tooltip`,void 0),e([a({type:String,attribute:`extra-label`})],c.prototype,`extraLabel`,void 0),e([a({type:Boolean,attribute:`extra-label-has-click-action`})],c.prototype,`extraLabelHasClickAction`,void 0),e([a()],c.prototype,`extraLabelClickAction`,void 0),e([a({type:String,attribute:`extra-label-tooltip`})],c.prototype,`extraLabelTooltip`,void 0);export{c as t};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{n as e}from"./localized-mixin-BEfBwOPN.js";import{t}from"./item-option-base-R8-N5_rE.js";import{html as n,property as r,unsafeCSS as i}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/color-palette.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/color-palette-group.js";function a(){return{Spectral:{colors3:[`rgb(252,141,89)`,`rgb(255,255,191)`,`rgb(153,213,148)`],colors4:[`rgb(215,25,28)`,`rgb(253,174,97)`,`rgb(171,221,164)`,`rgb(43,131,186)`],colors5:[`rgb(215,25,28)`,`rgb(253,174,97)`,`rgb(255,255,191)`,`rgb(171,221,164)`,`rgb(43,131,186)`],colors6:[`rgb(213,62,79)`,`rgb(252,141,89)`,`rgb(254,224,139)`,`rgb(230,245,152)`,`rgb(153,213,148)`,`rgb(50,136,189)`],colors7:[`rgb(213,62,79)`,`rgb(252,141,89)`,`rgb(254,224,139)`,`rgb(255,255,191)`,`rgb(230,245,152)`,`rgb(153,213,148)`,`rgb(50,136,189)`],colors8:[`rgb(213,62,79)`,`rgb(244,109,67)`,`rgb(253,174,97)`,`rgb(254,224,139)`,`rgb(230,245,152)`,`rgb(171,221,164)`,`rgb(102,194,165)`,`rgb(50,136,189)`],colors9:[`rgb(213,62,79)`,`rgb(244,109,67)`,`rgb(253,174,97)`,`rgb(254,224,139)`,`rgb(255,255,191)`,`rgb(230,245,152)`,`rgb(171,221,164)`,`rgb(102,194,165)`,`rgb(50,136,189)`],type:`divergent`},RdYlGn:{colors3:[`rgb(252,141,89)`,`rgb(255,255,191)`,`rgb(145,207,96)`],colors4:[`rgb(215,25,28)`,`rgb(253,174,97)`,`rgb(166,217,106)`,`rgb(26,150,65)`],colors5:[`rgb(215,25,28)`,`rgb(253,174,97)`,`rgb(255,255,191)`,`rgb(166,217,106)`,`rgb(26,150,65)`],colors6:[`rgb(215,48,39)`,`rgb(252,141,89)`,`rgb(254,224,139)`,`rgb(217,239,139)`,`rgb(145,207,96)`,`rgb(26,152,80)`],colors7:[`rgb(215,48,39)`,`rgb(252,141,89)`,`rgb(254,224,139)`,`rgb(255,255,191)`,`rgb(217,239,139)`,`rgb(145,207,96)`,`rgb(26,152,80)`],colors8:[`rgb(215,48,39)`,`rgb(244,109,67)`,`rgb(253,174,97)`,`rgb(254,224,139)`,`rgb(217,239,139)`,`rgb(166,217,106)`,`rgb(102,189,99)`,`rgb(26,152,80)`],colors9:[`rgb(215,48,39)`,`rgb(244,109,67)`,`rgb(253,174,97)`,`rgb(254,224,139)`,`rgb(255,255,191)`,`rgb(217,239,139)`,`rgb(166,217,106)`,`rgb(102,189,99)`,`rgb(26,152,80)`],type:`divergent`},RdBu:{colors3:[`rgb(239,138,98)`,`rgb(247,247,247)`,`rgb(103,169,207)`],colors4:[`rgb(202,0,32)`,`rgb(244,165,130)`,`rgb(146,197,222)`,`rgb(5,113,176)`],colors5:[`rgb(202,0,32)`,`rgb(244,165,130)`,`rgb(247,247,247)`,`rgb(146,197,222)`,`rgb(5,113,176)`],colors6:[`rgb(178,24,43)`,`rgb(239,138,98)`,`rgb(253,219,199)`,`rgb(209,229,240)`,`rgb(103,169,207)`,`rgb(33,102,172)`],colors7:[`rgb(178,24,43)`,`rgb(239,138,98)`,`rgb(253,219,199)`,`rgb(247,247,247)`,`rgb(209,229,240)`,`rgb(103,169,207)`,`rgb(33,102,172)`],colors8:[`rgb(178,24,43)`,`rgb(214,96,77)`,`rgb(244,165,130)`,`rgb(253,219,199)`,`rgb(209,229,240)`,`rgb(146,197,222)`,`rgb(67,147,195)`,`rgb(33,102,172)`],colors9:[`rgb(178,24,43)`,`rgb(214,96,77)`,`rgb(244,165,130)`,`rgb(253,219,199)`,`rgb(247,247,247)`,`rgb(209,229,240)`,`rgb(146,197,222)`,`rgb(67,147,195)`,`rgb(33,102,172)`],type:`divergent`},PiYG:{colors3:[`rgb(233,163,201)`,`rgb(247,247,247)`,`rgb(161,215,106)`],colors4:[`rgb(208,28,139)`,`rgb(241,182,218)`,`rgb(184,225,134)`,`rgb(77,172,38)`],colors5:[`rgb(208,28,139)`,`rgb(241,182,218)`,`rgb(247,247,247)`,`rgb(184,225,134)`,`rgb(77,172,38)`],colors6:[`rgb(197,27,125)`,`rgb(233,163,201)`,`rgb(253,224,239)`,`rgb(230,245,208)`,`rgb(161,215,106)`,`rgb(77,146,33)`],colors7:[`rgb(197,27,125)`,`rgb(233,163,201)`,`rgb(253,224,239)`,`rgb(247,247,247)`,`rgb(230,245,208)`,`rgb(161,215,106)`,`rgb(77,146,33)`],colors8:[`rgb(197,27,125)`,`rgb(222,119,174)`,`rgb(241,182,218)`,`rgb(253,224,239)`,`rgb(230,245,208)`,`rgb(184,225,134)`,`rgb(127,188,65)`,`rgb(77,146,33)`],colors9:[`rgb(197,27,125)`,`rgb(222,119,174)`,`rgb(241,182,218)`,`rgb(253,224,239)`,`rgb(247,247,247)`,`rgb(230,245,208)`,`rgb(184,225,134)`,`rgb(127,188,65)`,`rgb(77,146,33)`],type:`divergent`},PRGn:{colors3:[`rgb(175,141,195)`,`rgb(247,247,247)`,`rgb(127,191,123)`],colors4:[`rgb(123,50,148)`,`rgb(194,165,207)`,`rgb(166,219,160)`,`rgb(0,136,55)`],colors5:[`rgb(123,50,148)`,`rgb(194,165,207)`,`rgb(247,247,247)`,`rgb(166,219,160)`,`rgb(0,136,55)`],colors6:[`rgb(118,42,131)`,`rgb(175,141,195)`,`rgb(231,212,232)`,`rgb(217,240,211)`,`rgb(127,191,123)`,`rgb(27,120,55)`],colors7:[`rgb(118,42,131)`,`rgb(175,141,195)`,`rgb(231,212,232)`,`rgb(247,247,247)`,`rgb(217,240,211)`,`rgb(127,191,123)`,`rgb(27,120,55)`],colors8:[`rgb(118,42,131)`,`rgb(153,112,171)`,`rgb(194,165,207)`,`rgb(231,212,232)`,`rgb(217,240,211)`,`rgb(166,219,160)`,`rgb(90,174,97)`,`rgb(27,120,55)`],colors9:[`rgb(118,42,131)`,`rgb(153,112,171)`,`rgb(194,165,207)`,`rgb(231,212,232)`,`rgb(247,247,247)`,`rgb(217,240,211)`,`rgb(166,219,160)`,`rgb(90,174,97)`,`rgb(27,120,55)`],type:`divergent`},RdYlBu:{colors3:[`rgb(252,141,89)`,`rgb(255,255,191)`,`rgb(145,191,219)`],colors4:[`rgb(215,25,28)`,`rgb(253,174,97)`,`rgb(171,217,233)`,`rgb(44,123,182)`],colors5:[`rgb(215,25,28)`,`rgb(253,174,97)`,`rgb(255,255,191)`,`rgb(171,217,233)`,`rgb(44,123,182)`],colors6:[`rgb(215,48,39)`,`rgb(252,141,89)`,`rgb(254,224,144)`,`rgb(224,243,248)`,`rgb(145,191,219)`,`rgb(69,117,180)`],colors7:[`rgb(215,48,39)`,`rgb(252,141,89)`,`rgb(254,224,144)`,`rgb(255,255,191)`,`rgb(224,243,248)`,`rgb(145,191,219)`,`rgb(69,117,180)`],colors8:[`rgb(215,48,39)`,`rgb(244,109,67)`,`rgb(253,174,97)`,`rgb(254,224,144)`,`rgb(224,243,248)`,`rgb(171,217,233)`,`rgb(116,173,209)`,`rgb(69,117,180)`],colors9:[`rgb(215,48,39)`,`rgb(244,109,67)`,`rgb(253,174,97)`,`rgb(254,224,144)`,`rgb(255,255,191)`,`rgb(224,243,248)`,`rgb(171,217,233)`,`rgb(116,173,209)`,`rgb(69,117,180)`],type:`divergent`},BrBG:{colors3:[`rgb(216,179,101)`,`rgb(245,245,245)`,`rgb(90,180,172)`],colors4:[`rgb(166,97,26)`,`rgb(223,194,125)`,`rgb(128,205,193)`,`rgb(1,133,113)`],colors5:[`rgb(166,97,26)`,`rgb(223,194,125)`,`rgb(245,245,245)`,`rgb(128,205,193)`,`rgb(1,133,113)`],colors6:[`rgb(140,81,10)`,`rgb(216,179,101)`,`rgb(246,232,195)`,`rgb(199,234,229)`,`rgb(90,180,172)`,`rgb(1,102,94)`],colors7:[`rgb(140,81,10)`,`rgb(216,179,101)`,`rgb(246,232,195)`,`rgb(245,245,245)`,`rgb(199,234,229)`,`rgb(90,180,172)`,`rgb(1,102,94)`],colors8:[`rgb(140,81,10)`,`rgb(191,129,45)`,`rgb(223,194,125)`,`rgb(246,232,195)`,`rgb(199,234,229)`,`rgb(128,205,193)`,`rgb(53,151,143)`,`rgb(1,102,94)`],colors9:[`rgb(140,81,10)`,`rgb(191,129,45)`,`rgb(223,194,125)`,`rgb(246,232,195)`,`rgb(245,245,245)`,`rgb(199,234,229)`,`rgb(128,205,193)`,`rgb(53,151,143)`,`rgb(1,102,94)`],type:`divergent`},RdGy:{colors3:[`rgb(239,138,98)`,`rgb(255,255,255)`,`rgb(153,153,153)`],colors4:[`rgb(202,0,32)`,`rgb(244,165,130)`,`rgb(186,186,186)`,`rgb(64,64,64)`],colors5:[`rgb(202,0,32)`,`rgb(244,165,130)`,`rgb(255,255,255)`,`rgb(186,186,186)`,`rgb(64,64,64)`],colors6:[`rgb(178,24,43)`,`rgb(239,138,98)`,`rgb(253,219,199)`,`rgb(224,224,224)`,`rgb(153,153,153)`,`rgb(77,77,77)`],colors7:[`rgb(178,24,43)`,`rgb(239,138,98)`,`rgb(253,219,199)`,`rgb(255,255,255)`,`rgb(224,224,224)`,`rgb(153,153,153)`,`rgb(77,77,77)`],colors8:[`rgb(178,24,43)`,`rgb(214,96,77)`,`rgb(244,165,130)`,`rgb(253,219,199)`,`rgb(224,224,224)`,`rgb(186,186,186)`,`rgb(135,135,135)`,`rgb(77,77,77)`],colors9:[`rgb(178,24,43)`,`rgb(214,96,77)`,`rgb(244,165,130)`,`rgb(253,219,199)`,`rgb(255,255,255)`,`rgb(224,224,224)`,`rgb(186,186,186)`,`rgb(135,135,135)`,`rgb(77,77,77)`],type:`divergent`},PuOr:{colors3:[`rgb(241,163,64)`,`rgb(247,247,247)`,`rgb(153,142,195)`],colors4:[`rgb(230,97,1)`,`rgb(253,184,99)`,`rgb(178,171,210)`,`rgb(94,60,153)`],colors5:[`rgb(230,97,1)`,`rgb(253,184,99)`,`rgb(247,247,247)`,`rgb(178,171,210)`,`rgb(94,60,153)`],colors6:[`rgb(179,88,6)`,`rgb(241,163,64)`,`rgb(254,224,182)`,`rgb(216,218,235)`,`rgb(153,142,195)`,`rgb(84,39,136)`],colors7:[`rgb(179,88,6)`,`rgb(241,163,64)`,`rgb(254,224,182)`,`rgb(247,247,247)`,`rgb(216,218,235)`,`rgb(153,142,195)`,`rgb(84,39,136)`],colors8:[`rgb(179,88,6)`,`rgb(224,130,20)`,`rgb(253,184,99)`,`rgb(254,224,182)`,`rgb(216,218,235)`,`rgb(178,171,210)`,`rgb(128,115,172)`,`rgb(84,39,136)`],colors9:[`rgb(179,88,6)`,`rgb(224,130,20)`,`rgb(253,184,99)`,`rgb(254,224,182)`,`rgb(247,247,247)`,`rgb(216,218,235)`,`rgb(178,171,210)`,`rgb(128,115,172)`,`rgb(84,39,136)`],type:`divergent`},Paired:{colors3:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`],colors4:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`],colors5:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`],colors6:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`],colors7:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`,`rgb(253,191,111)`],colors8:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`,`rgb(253,191,111)`,`rgb(255,127,0)`],colors9:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`,`rgb(253,191,111)`,`rgb(255,127,0)`,`rgb(202,178,214)`],colors10:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`,`rgb(253,191,111)`,`rgb(255,127,0)`,`rgb(202,178,214)`,`rgb(106,61,154)`],colors11:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`,`rgb(253,191,111)`,`rgb(255,127,0)`,`rgb(202,178,214)`,`rgb(106,61,154)`,`rgb(255,255,153)`],colors12:[`rgb(166,206,227)`,`rgb(31,120,180)`,`rgb(178,223,138)`,`rgb(51,160,44)`,`rgb(251,154,153)`,`rgb(227,26,28)`,`rgb(253,191,111)`,`rgb(255,127,0)`,`rgb(202,178,214)`,`rgb(106,61,154)`,`rgb(255,255,153)`,`rgb(177,89,40)`],type:`qualitative`},Set1:{colors3:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`],colors4:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`,`rgb(152,78,163)`],colors5:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`,`rgb(152,78,163)`,`rgb(255,127,0)`],colors6:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`,`rgb(152,78,163)`,`rgb(255,127,0)`,`rgb(255,255,51)`],colors7:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`,`rgb(152,78,163)`,`rgb(255,127,0)`,`rgb(255,255,51)`,`rgb(166,86,40)`],colors8:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`,`rgb(152,78,163)`,`rgb(255,127,0)`,`rgb(255,255,51)`,`rgb(166,86,40)`,`rgb(247,129,191)`],colors9:[`rgb(228,26,28)`,`rgb(55,126,184)`,`rgb(77,175,74)`,`rgb(152,78,163)`,`rgb(255,127,0)`,`rgb(255,255,51)`,`rgb(166,86,40)`,`rgb(247,129,191)`,`rgb(153,153,153)`],type:`qualitative`},Set3:{colors3:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`],colors4:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`],colors5:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`],colors6:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`],colors7:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`,`rgb(179,222,105)`],colors8:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`,`rgb(179,222,105)`,`rgb(252,205,229)`],colors9:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`,`rgb(179,222,105)`,`rgb(252,205,229)`,`rgb(217,217,217)`],colors10:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`,`rgb(179,222,105)`,`rgb(252,205,229)`,`rgb(217,217,217)`,`rgb(188,128,189)`],colors11:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`,`rgb(179,222,105)`,`rgb(252,205,229)`,`rgb(217,217,217)`,`rgb(188,128,189)`,`rgb(204,235,197)`],colors12:[`rgb(141,211,199)`,`rgb(255,255,179)`,`rgb(190,186,218)`,`rgb(251,128,114)`,`rgb(128,177,211)`,`rgb(253,180,98)`,`rgb(179,222,105)`,`rgb(252,205,229)`,`rgb(217,217,217)`,`rgb(188,128,189)`,`rgb(204,235,197)`,`rgb(255,237,111)`],type:`qualitative`},PuBu:{colors3:[`rgb(236,231,242)`,`rgb(166,189,219)`,`rgb(43,140,190)`],colors4:[`rgb(241,238,246)`,`rgb(189,201,225)`,`rgb(116,169,207)`,`rgb(5,112,176)`],colors5:[`rgb(241,238,246)`,`rgb(189,201,225)`,`rgb(116,169,207)`,`rgb(43,140,190)`,`rgb(4,90,141)`],colors6:[`rgb(241,238,246)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(116,169,207)`,`rgb(43,140,190)`,`rgb(4,90,141)`],colors7:[`rgb(241,238,246)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(116,169,207)`,`rgb(54,144,192)`,`rgb(5,112,176)`,`rgb(3,78,123)`],colors8:[`rgb(255,247,251)`,`rgb(236,231,242)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(116,169,207)`,`rgb(54,144,192)`,`rgb(5,112,176)`,`rgb(3,78,123)`],colors9:[`rgb(255,247,251)`,`rgb(236,231,242)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(116,169,207)`,`rgb(54,144,192)`,`rgb(5,112,176)`,`rgb(4,90,141)`,`rgb(2,56,88)`],type:`sequential`},OrRd:{colors3:[`rgb(254,232,200)`,`rgb(253,187,132)`,`rgb(227,74,51)`],colors4:[`rgb(254,240,217)`,`rgb(253,204,138)`,`rgb(252,141,89)`,`rgb(215,48,31)`],colors5:[`rgb(254,240,217)`,`rgb(253,204,138)`,`rgb(252,141,89)`,`rgb(227,74,51)`,`rgb(179,0,0)`],colors6:[`rgb(254,240,217)`,`rgb(253,212,158)`,`rgb(253,187,132)`,`rgb(252,141,89)`,`rgb(227,74,51)`,`rgb(179,0,0)`],colors7:[`rgb(254,240,217)`,`rgb(253,212,158)`,`rgb(253,187,132)`,`rgb(252,141,89)`,`rgb(239,101,72)`,`rgb(215,48,31)`,`rgb(153,0,0)`],colors8:[`rgb(255,247,236)`,`rgb(254,232,200)`,`rgb(253,212,158)`,`rgb(253,187,132)`,`rgb(252,141,89)`,`rgb(239,101,72)`,`rgb(215,48,31)`,`rgb(153,0,0)`],colors9:[`rgb(255,247,236)`,`rgb(254,232,200)`,`rgb(253,212,158)`,`rgb(253,187,132)`,`rgb(252,141,89)`,`rgb(239,101,72)`,`rgb(215,48,31)`,`rgb(179,0,0)`,`rgb(127,0,0)`],type:`sequential`},BuPu:{colors3:[`rgb(224,236,244)`,`rgb(158,188,218)`,`rgb(136,86,167)`],colors4:[`rgb(237,248,251)`,`rgb(179,205,227)`,`rgb(140,150,198)`,`rgb(136,65,157)`],colors5:[`rgb(237,248,251)`,`rgb(179,205,227)`,`rgb(140,150,198)`,`rgb(136,86,167)`,`rgb(129,15,124)`],colors6:[`rgb(237,248,251)`,`rgb(191,211,230)`,`rgb(158,188,218)`,`rgb(140,150,198)`,`rgb(136,86,167)`,`rgb(129,15,124)`],colors7:[`rgb(237,248,251)`,`rgb(191,211,230)`,`rgb(158,188,218)`,`rgb(140,150,198)`,`rgb(140,107,177)`,`rgb(136,65,157)`,`rgb(110,1,107)`],colors8:[`rgb(247,252,253)`,`rgb(224,236,244)`,`rgb(191,211,230)`,`rgb(158,188,218)`,`rgb(140,150,198)`,`rgb(140,107,177)`,`rgb(136,65,157)`,`rgb(110,1,107)`],colors9:[`rgb(247,252,253)`,`rgb(224,236,244)`,`rgb(191,211,230)`,`rgb(158,188,218)`,`rgb(140,150,198)`,`rgb(140,107,177)`,`rgb(136,65,157)`,`rgb(129,15,124)`,`rgb(77,0,75)`],type:`sequential`},Oranges:{colors3:[`rgb(254,230,206)`,`rgb(253,174,107)`,`rgb(230,85,13)`],colors4:[`rgb(254,237,222)`,`rgb(253,190,133)`,`rgb(253,141,60)`,`rgb(217,71,1)`],colors5:[`rgb(254,237,222)`,`rgb(253,190,133)`,`rgb(253,141,60)`,`rgb(230,85,13)`,`rgb(166,54,3)`],colors6:[`rgb(254,237,222)`,`rgb(253,208,162)`,`rgb(253,174,107)`,`rgb(253,141,60)`,`rgb(230,85,13)`,`rgb(166,54,3)`],colors7:[`rgb(254,237,222)`,`rgb(253,208,162)`,`rgb(253,174,107)`,`rgb(253,141,60)`,`rgb(241,105,19)`,`rgb(217,72,1)`,`rgb(140,45,4)`],colors8:[`rgb(255,245,235)`,`rgb(254,230,206)`,`rgb(253,208,162)`,`rgb(253,174,107)`,`rgb(253,141,60)`,`rgb(241,105,19)`,`rgb(217,72,1)`,`rgb(140,45,4)`],colors9:[`rgb(255,245,235)`,`rgb(254,230,206)`,`rgb(253,208,162)`,`rgb(253,174,107)`,`rgb(253,141,60)`,`rgb(241,105,19)`,`rgb(217,72,1)`,`rgb(166,54,3)`,`rgb(127,39,4)`],type:`sequential`},BuGn:{colors3:[`rgb(229,245,249)`,`rgb(153,216,201)`,`rgb(44,162,95)`],colors4:[`rgb(237,248,251)`,`rgb(178,226,226)`,`rgb(102,194,164)`,`rgb(35,139,69)`],colors5:[`rgb(237,248,251)`,`rgb(178,226,226)`,`rgb(102,194,164)`,`rgb(44,162,95)`,`rgb(0,109,44)`],colors6:[`rgb(237,248,251)`,`rgb(204,236,230)`,`rgb(153,216,201)`,`rgb(102,194,164)`,`rgb(44,162,95)`,`rgb(0,109,44)`],colors7:[`rgb(237,248,251)`,`rgb(204,236,230)`,`rgb(153,216,201)`,`rgb(102,194,164)`,`rgb(65,174,118)`,`rgb(35,139,69)`,`rgb(0,88,36)`],colors8:[`rgb(247,252,253)`,`rgb(229,245,249)`,`rgb(204,236,230)`,`rgb(153,216,201)`,`rgb(102,194,164)`,`rgb(65,174,118)`,`rgb(35,139,69)`,`rgb(0,88,36)`],colors9:[`rgb(247,252,253)`,`rgb(229,245,249)`,`rgb(204,236,230)`,`rgb(153,216,201)`,`rgb(102,194,164)`,`rgb(65,174,118)`,`rgb(35,139,69)`,`rgb(0,109,44)`,`rgb(0,68,27)`],type:`sequential`},YlOrBr:{colors3:[`rgb(255,247,188)`,`rgb(254,196,79)`,`rgb(217,95,14)`],colors4:[`rgb(255,255,212)`,`rgb(254,217,142)`,`rgb(254,153,41)`,`rgb(204,76,2)`],colors5:[`rgb(255,255,212)`,`rgb(254,217,142)`,`rgb(254,153,41)`,`rgb(217,95,14)`,`rgb(153,52,4)`],colors6:[`rgb(255,255,212)`,`rgb(254,227,145)`,`rgb(254,196,79)`,`rgb(254,153,41)`,`rgb(217,95,14)`,`rgb(153,52,4)`],colors7:[`rgb(255,255,212)`,`rgb(254,227,145)`,`rgb(254,196,79)`,`rgb(254,153,41)`,`rgb(236,112,20)`,`rgb(204,76,2)`,`rgb(140,45,4)`],colors8:[`rgb(255,255,229)`,`rgb(255,247,188)`,`rgb(254,227,145)`,`rgb(254,196,79)`,`rgb(254,153,41)`,`rgb(236,112,20)`,`rgb(204,76,2)`,`rgb(140,45,4)`],colors9:[`rgb(255,255,229)`,`rgb(255,247,188)`,`rgb(254,227,145)`,`rgb(254,196,79)`,`rgb(254,153,41)`,`rgb(236,112,20)`,`rgb(204,76,2)`,`rgb(153,52,4)`,`rgb(102,37,6)`],type:`sequential`},YlGn:{colors3:[`rgb(247,252,185)`,`rgb(173,221,142)`,`rgb(49,163,84)`],colors4:[`rgb(255,255,204)`,`rgb(194,230,153)`,`rgb(120,198,121)`,`rgb(35,132,67)`],colors5:[`rgb(255,255,204)`,`rgb(194,230,153)`,`rgb(120,198,121)`,`rgb(49,163,84)`,`rgb(0,104,55)`],colors6:[`rgb(255,255,204)`,`rgb(217,240,163)`,`rgb(173,221,142)`,`rgb(120,198,121)`,`rgb(49,163,84)`,`rgb(0,104,55)`],colors7:[`rgb(255,255,204)`,`rgb(217,240,163)`,`rgb(173,221,142)`,`rgb(120,198,121)`,`rgb(65,171,93)`,`rgb(35,132,67)`,`rgb(0,90,50)`],colors8:[`rgb(255,255,229)`,`rgb(247,252,185)`,`rgb(217,240,163)`,`rgb(173,221,142)`,`rgb(120,198,121)`,`rgb(65,171,93)`,`rgb(35,132,67)`,`rgb(0,90,50)`],colors9:[`rgb(255,255,229)`,`rgb(247,252,185)`,`rgb(217,240,163)`,`rgb(173,221,142)`,`rgb(120,198,121)`,`rgb(65,171,93)`,`rgb(35,132,67)`,`rgb(0,104,55)`,`rgb(0,69,41)`],type:`sequential`},Reds:{colors3:[`rgb(254,224,210)`,`rgb(252,146,114)`,`rgb(222,45,38)`],colors4:[`rgb(254,229,217)`,`rgb(252,174,145)`,`rgb(251,106,74)`,`rgb(203,24,29)`],colors5:[`rgb(254,229,217)`,`rgb(252,174,145)`,`rgb(251,106,74)`,`rgb(222,45,38)`,`rgb(165,15,21)`],colors6:[`rgb(254,229,217)`,`rgb(252,187,161)`,`rgb(252,146,114)`,`rgb(251,106,74)`,`rgb(222,45,38)`,`rgb(165,15,21)`],colors7:[`rgb(254,229,217)`,`rgb(252,187,161)`,`rgb(252,146,114)`,`rgb(251,106,74)`,`rgb(239,59,44)`,`rgb(203,24,29)`,`rgb(153,0,13)`],colors8:[`rgb(255,245,240)`,`rgb(254,224,210)`,`rgb(252,187,161)`,`rgb(252,146,114)`,`rgb(251,106,74)`,`rgb(239,59,44)`,`rgb(203,24,29)`,`rgb(153,0,13)`],colors9:[`rgb(255,245,240)`,`rgb(254,224,210)`,`rgb(252,187,161)`,`rgb(252,146,114)`,`rgb(251,106,74)`,`rgb(239,59,44)`,`rgb(203,24,29)`,`rgb(165,15,21)`,`rgb(103,0,13)`],type:`sequential`},RdPu:{colors3:[`rgb(253,224,221)`,`rgb(250,159,181)`,`rgb(197,27,138)`],colors4:[`rgb(254,235,226)`,`rgb(251,180,185)`,`rgb(247,104,161)`,`rgb(174,1,126)`],colors5:[`rgb(254,235,226)`,`rgb(251,180,185)`,`rgb(247,104,161)`,`rgb(197,27,138)`,`rgb(122,1,119)`],colors6:[`rgb(254,235,226)`,`rgb(252,197,192)`,`rgb(250,159,181)`,`rgb(247,104,161)`,`rgb(197,27,138)`,`rgb(122,1,119)`],colors7:[`rgb(254,235,226)`,`rgb(252,197,192)`,`rgb(250,159,181)`,`rgb(247,104,161)`,`rgb(221,52,151)`,`rgb(174,1,126)`,`rgb(122,1,119)`],colors8:[`rgb(255,247,243)`,`rgb(253,224,221)`,`rgb(252,197,192)`,`rgb(250,159,181)`,`rgb(247,104,161)`,`rgb(221,52,151)`,`rgb(174,1,126)`,`rgb(122,1,119)`],colors9:[`rgb(255,247,243)`,`rgb(253,224,221)`,`rgb(252,197,192)`,`rgb(250,159,181)`,`rgb(247,104,161)`,`rgb(221,52,151)`,`rgb(174,1,126)`,`rgb(122,1,119)`,`rgb(73,0,106)`],type:`sequential`},Greens:{colors3:[`rgb(229,245,224)`,`rgb(161,217,155)`,`rgb(49,163,84)`],colors4:[`rgb(237,248,233)`,`rgb(186,228,179)`,`rgb(116,196,118)`,`rgb(35,139,69)`],colors5:[`rgb(237,248,233)`,`rgb(186,228,179)`,`rgb(116,196,118)`,`rgb(49,163,84)`,`rgb(0,109,44)`],colors6:[`rgb(237,248,233)`,`rgb(199,233,192)`,`rgb(161,217,155)`,`rgb(116,196,118)`,`rgb(49,163,84)`,`rgb(0,109,44)`],colors7:[`rgb(237,248,233)`,`rgb(199,233,192)`,`rgb(161,217,155)`,`rgb(116,196,118)`,`rgb(65,171,93)`,`rgb(35,139,69)`,`rgb(0,90,50)`],colors8:[`rgb(247,252,245)`,`rgb(229,245,224)`,`rgb(199,233,192)`,`rgb(161,217,155)`,`rgb(116,196,118)`,`rgb(65,171,93)`,`rgb(35,139,69)`,`rgb(0,90,50)`],colors9:[`rgb(247,252,245)`,`rgb(229,245,224)`,`rgb(199,233,192)`,`rgb(161,217,155)`,`rgb(116,196,118)`,`rgb(65,171,93)`,`rgb(35,139,69)`,`rgb(0,109,44)`,`rgb(0,68,27)`],type:`sequential`},YlGnBu:{colors3:[`rgb(237,248,177)`,`rgb(127,205,187)`,`rgb(44,127,184)`],colors4:[`rgb(255,255,204)`,`rgb(161,218,180)`,`rgb(65,182,196)`,`rgb(34,94,168)`],colors5:[`rgb(255,255,204)`,`rgb(161,218,180)`,`rgb(65,182,196)`,`rgb(44,127,184)`,`rgb(37,52,148)`],colors6:[`rgb(255,255,204)`,`rgb(199,233,180)`,`rgb(127,205,187)`,`rgb(65,182,196)`,`rgb(44,127,184)`,`rgb(37,52,148)`],colors7:[`rgb(255,255,204)`,`rgb(199,233,180)`,`rgb(127,205,187)`,`rgb(65,182,196)`,`rgb(29,145,192)`,`rgb(34,94,168)`,`rgb(12,44,132)`],colors8:[`rgb(255,255,217)`,`rgb(237,248,177)`,`rgb(199,233,180)`,`rgb(127,205,187)`,`rgb(65,182,196)`,`rgb(29,145,192)`,`rgb(34,94,168)`,`rgb(12,44,132)`],colors9:[`rgb(255,255,217)`,`rgb(237,248,177)`,`rgb(199,233,180)`,`rgb(127,205,187)`,`rgb(65,182,196)`,`rgb(29,145,192)`,`rgb(34,94,168)`,`rgb(37,52,148)`,`rgb(8,29,88)`],type:`sequential`},Purples:{colors3:[`rgb(239,237,245)`,`rgb(188,189,220)`,`rgb(117,107,177)`],colors4:[`rgb(242,240,247)`,`rgb(203,201,226)`,`rgb(158,154,200)`,`rgb(106,81,163)`],colors5:[`rgb(242,240,247)`,`rgb(203,201,226)`,`rgb(158,154,200)`,`rgb(117,107,177)`,`rgb(84,39,143)`],colors6:[`rgb(242,240,247)`,`rgb(218,218,235)`,`rgb(188,189,220)`,`rgb(158,154,200)`,`rgb(117,107,177)`,`rgb(84,39,143)`],colors7:[`rgb(242,240,247)`,`rgb(218,218,235)`,`rgb(188,189,220)`,`rgb(158,154,200)`,`rgb(128,125,186)`,`rgb(106,81,163)`,`rgb(74,20,134)`],colors8:[`rgb(252,251,253)`,`rgb(239,237,245)`,`rgb(218,218,235)`,`rgb(188,189,220)`,`rgb(158,154,200)`,`rgb(128,125,186)`,`rgb(106,81,163)`,`rgb(74,20,134)`],colors9:[`rgb(252,251,253)`,`rgb(239,237,245)`,`rgb(218,218,235)`,`rgb(188,189,220)`,`rgb(158,154,200)`,`rgb(128,125,186)`,`rgb(106,81,163)`,`rgb(84,39,143)`,`rgb(63,0,125)`],type:`sequential`},GnBu:{colors3:[`rgb(224,243,219)`,`rgb(168,221,181)`,`rgb(67,162,202)`],colors4:[`rgb(240,249,232)`,`rgb(186,228,188)`,`rgb(123,204,196)`,`rgb(43,140,190)`],colors5:[`rgb(240,249,232)`,`rgb(186,228,188)`,`rgb(123,204,196)`,`rgb(67,162,202)`,`rgb(8,104,172)`],colors6:[`rgb(240,249,232)`,`rgb(204,235,197)`,`rgb(168,221,181)`,`rgb(123,204,196)`,`rgb(67,162,202)`,`rgb(8,104,172)`],colors7:[`rgb(240,249,232)`,`rgb(204,235,197)`,`rgb(168,221,181)`,`rgb(123,204,196)`,`rgb(78,179,211)`,`rgb(43,140,190)`,`rgb(8,88,158)`],colors8:[`rgb(247,252,240)`,`rgb(224,243,219)`,`rgb(204,235,197)`,`rgb(168,221,181)`,`rgb(123,204,196)`,`rgb(78,179,211)`,`rgb(43,140,190)`,`rgb(8,88,158)`],colors9:[`rgb(247,252,240)`,`rgb(224,243,219)`,`rgb(204,235,197)`,`rgb(168,221,181)`,`rgb(123,204,196)`,`rgb(78,179,211)`,`rgb(43,140,190)`,`rgb(8,104,172)`,`rgb(8,64,129)`],type:`sequential`},Greys:{colors3:[`rgb(240,240,240)`,`rgb(189,189,189)`,`rgb(99,99,99)`],colors4:[`rgb(247,247,247)`,`rgb(204,204,204)`,`rgb(150,150,150)`,`rgb(82,82,82)`],colors5:[`rgb(247,247,247)`,`rgb(204,204,204)`,`rgb(150,150,150)`,`rgb(99,99,99)`,`rgb(37,37,37)`],colors6:[`rgb(247,247,247)`,`rgb(217,217,217)`,`rgb(189,189,189)`,`rgb(150,150,150)`,`rgb(99,99,99)`,`rgb(37,37,37)`],colors7:[`rgb(247,247,247)`,`rgb(217,217,217)`,`rgb(189,189,189)`,`rgb(150,150,150)`,`rgb(115,115,115)`,`rgb(82,82,82)`,`rgb(37,37,37)`],colors8:[`rgb(255,255,255)`,`rgb(240,240,240)`,`rgb(217,217,217)`,`rgb(189,189,189)`,`rgb(150,150,150)`,`rgb(115,115,115)`,`rgb(82,82,82)`,`rgb(37,37,37)`],colors9:[`rgb(255,255,255)`,`rgb(240,240,240)`,`rgb(217,217,217)`,`rgb(189,189,189)`,`rgb(150,150,150)`,`rgb(115,115,115)`,`rgb(82,82,82)`,`rgb(37,37,37)`,`rgb(0,0,0)`],type:`sequential`},YlOrRd:{colors3:[`rgb(255,237,160)`,`rgb(254,178,76)`,`rgb(240,59,32)`],colors4:[`rgb(255,255,178)`,`rgb(254,204,92)`,`rgb(253,141,60)`,`rgb(227,26,28)`],colors5:[`rgb(255,255,178)`,`rgb(254,204,92)`,`rgb(253,141,60)`,`rgb(240,59,32)`,`rgb(189,0,38)`],colors6:[`rgb(255,255,178)`,`rgb(254,217,118)`,`rgb(254,178,76)`,`rgb(253,141,60)`,`rgb(240,59,32)`,`rgb(189,0,38)`],colors7:[`rgb(255,255,178)`,`rgb(254,217,118)`,`rgb(254,178,76)`,`rgb(253,141,60)`,`rgb(252,78,42)`,`rgb(227,26,28)`,`rgb(177,0,38)`],colors8:[`rgb(255,255,204)`,`rgb(255,237,160)`,`rgb(254,217,118)`,`rgb(254,178,76)`,`rgb(253,141,60)`,`rgb(252,78,42)`,`rgb(227,26,28)`,`rgb(177,0,38)`],colors9:[`rgb(255,255,204)`,`rgb(255,237,160)`,`rgb(254,217,118)`,`rgb(254,178,76)`,`rgb(253,141,60)`,`rgb(252,78,42)`,`rgb(227,26,28)`,`rgb(189,0,38)`,`rgb(128,0,38)`],type:`sequential`},PuRd:{colors3:[`rgb(231,225,239)`,`rgb(201,148,199)`,`rgb(221,28,119)`],colors4:[`rgb(241,238,246)`,`rgb(215,181,216)`,`rgb(223,101,176)`,`rgb(206,18,86)`],colors5:[`rgb(241,238,246)`,`rgb(215,181,216)`,`rgb(223,101,176)`,`rgb(221,28,119)`,`rgb(152,0,67)`],colors6:[`rgb(241,238,246)`,`rgb(212,185,218)`,`rgb(201,148,199)`,`rgb(223,101,176)`,`rgb(221,28,119)`,`rgb(152,0,67)`],colors7:[`rgb(241,238,246)`,`rgb(212,185,218)`,`rgb(201,148,199)`,`rgb(223,101,176)`,`rgb(231,41,138)`,`rgb(206,18,86)`,`rgb(145,0,63)`],colors8:[`rgb(247,244,249)`,`rgb(231,225,239)`,`rgb(212,185,218)`,`rgb(201,148,199)`,`rgb(223,101,176)`,`rgb(231,41,138)`,`rgb(206,18,86)`,`rgb(145,0,63)`],colors9:[`rgb(247,244,249)`,`rgb(231,225,239)`,`rgb(212,185,218)`,`rgb(201,148,199)`,`rgb(223,101,176)`,`rgb(231,41,138)`,`rgb(206,18,86)`,`rgb(152,0,67)`,`rgb(103,0,31)`],type:`sequential`},Blues:{colors3:[`rgb(222,235,247)`,`rgb(158,202,225)`,`rgb(49,130,189)`],colors4:[`rgb(239,243,255)`,`rgb(189,215,231)`,`rgb(107,174,214)`,`rgb(33,113,181)`],colors5:[`rgb(239,243,255)`,`rgb(189,215,231)`,`rgb(107,174,214)`,`rgb(49,130,189)`,`rgb(8,81,156)`],colors6:[`rgb(239,243,255)`,`rgb(198,219,239)`,`rgb(158,202,225)`,`rgb(107,174,214)`,`rgb(49,130,189)`,`rgb(8,81,156)`],colors7:[`rgb(239,243,255)`,`rgb(198,219,239)`,`rgb(158,202,225)`,`rgb(107,174,214)`,`rgb(66,146,198)`,`rgb(33,113,181)`,`rgb(8,69,148)`],colors8:[`rgb(247,251,255)`,`rgb(222,235,247)`,`rgb(198,219,239)`,`rgb(158,202,225)`,`rgb(107,174,214)`,`rgb(66,146,198)`,`rgb(33,113,181)`,`rgb(8,69,148)`],colors9:[`rgb(247,251,255)`,`rgb(222,235,247)`,`rgb(198,219,239)`,`rgb(158,202,225)`,`rgb(107,174,214)`,`rgb(66,146,198)`,`rgb(33,113,181)`,`rgb(8,81,156)`,`rgb(8,48,107)`],type:`sequential`},PuBuGn:{colors3:[`rgb(236,226,240)`,`rgb(166,189,219)`,`rgb(28,144,153)`],colors4:[`rgb(246,239,247)`,`rgb(189,201,225)`,`rgb(103,169,207)`,`rgb(2,129,138)`],colors5:[`rgb(246,239,247)`,`rgb(189,201,225)`,`rgb(103,169,207)`,`rgb(28,144,153)`,`rgb(1,108,89)`],colors6:[`rgb(246,239,247)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(103,169,207)`,`rgb(28,144,153)`,`rgb(1,108,89)`],colors7:[`rgb(246,239,247)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(103,169,207)`,`rgb(54,144,192)`,`rgb(2,129,138)`,`rgb(1,100,80)`],colors8:[`rgb(255,247,251)`,`rgb(236,226,240)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(103,169,207)`,`rgb(54,144,192)`,`rgb(2,129,138)`,`rgb(1,100,80)`],colors9:[`rgb(255,247,251)`,`rgb(236,226,240)`,`rgb(208,209,230)`,`rgb(166,189,219)`,`rgb(103,169,207)`,`rgb(54,144,192)`,`rgb(2,129,138)`,`rgb(1,108,89)`,`rgb(1,70,54)`],type:`sequential`},Spectrum:{colors5:[`rgb(0,0,255)`,`rgb(0,255,255)`,`rgb(0,255,0)`,`rgb(255,255,0)`,`rgb(255,0,0)`],type:`heat`},BlueRed:{colors5:[`rgb(0,0,255)`,`rgb(64,0,191)`,`rgb(128,0,128)`,`rgb(191,0,64)`,`rgb(255,0,0)`],type:`heat`},Plasma:{colors5:[`rgb(0,0,140)`,`rgb(140,0,160)`,`rgb(200,80,110)`,`rgb(255,160,60)`,`rgb(255,255,0)`],type:`heat`},Viris:{colors5:[`rgb(80,0,80)`,`rgb(60,80,140)`,`rgb(30,140,140)`,`rgb(80,200,100)`,`rgb(255,255,0)`],type:`heat`},Incan:{colors5:[`rgb(0,0,0)`,`rgb(100, 0, 0)`,`rgb(200, 150, 0)`,`rgb(255, 255, 70)`,`rgb(255,255,255)`],type:`heat`},Fire:{colors5:[`rgb(0,0,0)`,`rgb(128,0,128)`,`rgb(255,0,0)`,`rgb(255,255,0)`,`rgb(255,255,255)`],type:`heat`},Inferno:{colors5:[`rgb(0,0,0)`,`rgb(80,20,110)`,`rgb(190,60,80)`,`rgb(255,140,0)`,`rgb(255,255,160)`],type:`heat`},Ocean:{colors5:[`rgb(0,0,0)`,`rgb(25,50,100)`,`rgb(50,100,160)`,`rgb(20,170,200)`,`rgb(0,255,255)`],type:`heat`},Sunrise:{colors5:[`rgb(255,0,0)`,`rgb(255,80,0)`,`rgb(255,180,0)`,`rgb(255,255,20)`,`rgb(255,255,255)`],type:`heat`}}}var o=`.luzmo-item-option{align-items:start;height:fit-content}.control-container{align-items:start}.color-classes{gap:var(--luzmo-spacing-2);flex-flow:wrap;display:flex}.extra-label{height:var(--luzmo-item-option-component-height,var(--item-option-component-height));align-items:center;display:flex}`,s=class extends t{constructor(...e){super(...e),this.default=`OrRd`,this.values=[],this.disabled=!1,this.horizontal=!1,this.numberOfColors=5}static{this.styles=[super.styles,i(o)]}_setColorPalette(e){let t=e.target.selected;this.value=t,this.dispatchEvent(new CustomEvent(`luzmo-option-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:typeof this.toValue==`function`?this.toValue(t??``):t}}))}generateColorsClasses(e){let t=a(),r=(e,t)=>n`
|
|
3
|
-
<luzmo-color-palette
|
|
4
|
-
.size=${this.size}
|
|
5
|
-
.value=${e}
|
|
6
|
-
aria-label=${e}
|
|
7
|
-
?disabled=${this.disabled}
|
|
8
|
-
?horizontal=${this.horizontal}
|
|
9
|
-
.colors=${t}
|
|
10
|
-
></luzmo-color-palette>
|
|
11
|
-
`,i=(this.values??[]).map(e=>{let n=`colors${this.numberOfColors??5}`,i=t[e][n];return r(e,Array.isArray(i)?i:[])});return n`
|
|
12
|
-
<luzmo-color-palette-group
|
|
13
|
-
id="luzmo-item-option-control"
|
|
14
|
-
role="radiogroup"
|
|
15
|
-
.size=${this.size}
|
|
16
|
-
?disabled=${this.disabled}
|
|
17
|
-
?horizontal=${this.horizontal}
|
|
18
|
-
.selected=${e}
|
|
19
|
-
@change=${this._setColorPalette.bind(this)}
|
|
20
|
-
>${i}</luzmo-color-palette-group
|
|
21
|
-
>
|
|
22
|
-
`}renderController(){let e=typeof this.parseValue==`function`?this.parseValue(this.value):this.value,t=typeof this.parseValue==`function`?this.parseValue(this.default):this.default;return this.generateColorsClasses(e??t??`OrRd`)}};e([r({type:String,reflect:!0})],s.prototype,`value`,void 0),e([r({type:String,reflect:!0})],s.prototype,`default`,void 0),e([r({type:Array,attribute:`values`})],s.prototype,`values`,void 0),e([r({type:Boolean,reflect:!0})],s.prototype,`disabled`,void 0),e([r({type:Boolean,reflect:!0})],s.prototype,`horizontal`,void 0),e([r()],s.prototype,`parseValue`,void 0),e([r()],s.prototype,`toValue`,void 0),e([r({type:Number,attribute:`number-of-colors`})],s.prototype,`numberOfColors`,void 0),customElements.get(`luzmo-item-option-color-palette-picker`)||customElements.define(`luzmo-item-option-color-palette-picker`,s);export{s as LuzmoItemOptionColorPalettePicker};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{n as e}from"./localized-mixin-BEfBwOPN.js";import{n as t}from"./lit-localize-CIGP-NUw.js";import{t as n}from"./color-DaeCRJ5Q.js";import{t as r}from"./luzmoTrashOutline-DXZpJx7f.js";import{t as i}from"./item-option-base-R8-N5_rE.js";import{html as a,property as o,queryAll as s,state as c,unsafeCSS as l}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/text-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/color-picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/color-field.js";var u=(e,t=.1)=>{if(e.length<2)return`#AAAAAA`;let r=e.length,i=new n(e[r-2]).to(`oklab`),a=new n(e[r-1]).to(`oklab`),o=i.coords[0],s=a.coords[0];return new n(`oklab`,[Math.min(1,Math.max(0,s+(s>o?1:-1)*t)),a.coords[1],a.coords[2]],a.alpha).to(`srgb`).toString({format:`hex`,precision:0})},d=`:host{--luzmo-swatch-size:14px}.luzmo-item-option{align-items:start;height:fit-content}.control-container{flex-grow:1;align-items:start}.color-range-line{align-items:center;display:flex}luzmo-color-field,luzmo-number-field{flex-grow:1}.color-range-lines-container,.color-range-lines{gap:var(--luzmo-item-option-color-range-ranges-gap,var(--color-ranges-gap));flex-direction:column;flex-grow:1;display:flex}.color-range-lines{width:100%}.extra-label{height:var(--item-option-component-height);align-items:center;display:flex}.color-range-percentage-value{padding-inline-start:var(--luzmo-item-option-color-range-color-swatch-to-percentage,var(--color-swatch-to-percentage));padding-inline-end:var(--luzmo-item-option-color-range-percentage-to-input-field,var(--percentage-to-input-field))}luzmo-color-picker{position:relative}luzmo-color-picker:not(:has(+.color-range-percentage-value)){padding-inline-end:var(--luzmo-item-option-color-range-color-swatch-to-input-field,var(--color-swatch-to-input-field))}:is(luzmo-number-field:has(+luzmo-action-button),luzmo-color-field:has(+luzmo-action-button)){padding-inline-end:var(--luzmo-item-option-color-range-input-field-to-button,var(--input-field-to-button))}luzmo-color-picker:before{box-sizing:border-box;content:"";top:var(--color-range-connector-top);left:var(--color-range-connector-left);height:var(--color-range-connector-height);width:var(--color-range-connector-width);background:var(--range-color);border:var(--luzmo-item-option-color-range-connector-border-width,var(--luzmo-border-width)) solid var(--luzmo-item-option-color-range-connector-border-color,var(--luzmo-border-color));z-index:-1;border-top:0;border-bottom:0;position:absolute}:host([reverse]) luzmo-color-picker:before{top:var(--color-range-reverse-connector-top)}.color-range-lines:not(.edit-range-size) .color-range-line:last-child luzmo-color-picker:before{display:none}.color-range-add-value-container{height:var(--color-range-input-field-height);justify-content:start;align-items:center;display:flex}.color-range-add-value{box-sizing:border-box;width:var(--luzmo-item-option-color-range-add-value-width,var(--luzmo-swatch-size));height:var(--luzmo-item-option-color-range-add-value-height,var(--luzmo-swatch-size));border-width:var(--luzmo-item-option-color-range-add-value-border-width,var(--luzmo-border-width));border-style:solid;border-color:var(--luzmo-item-option-color-range-add-value-border-color,var(--luzmo-primary));border-radius:var(--luzmo-item-option-color-range-add-value-border-radius,50%);background-color:var(--luzmo-item-option-color-range-add-value-background-color,var(--luzmo-background-color));cursor:pointer;color:var(--luzmo-item-option-color-range-add-value-color,var(--luzmo-primary));justify-content:center;align-items:center;display:flex;position:relative}.color-range-add-value .plus-sign{width:100%;height:100%;position:absolute;top:0;left:0}.color-range-add-value .plus-sign:before{content:" ";background-color:var(--luzmo-item-option-color-range-add-value-color,var(--luzmo-primary));height:var(--add-color-range-plus-size);width:var(--luzmo-item-option-color-range-add-color-range-plus-sign-border-width,var(--add-color-range-plus-sign-border-width));top:calc((var(--luzmo-item-option-color-range-add-color-range-size,var(--add-color-range-size)) - var(--add-color-range-plus-size)) / 2 - var(--luzmo-item-option-color-range-add-value-border-width,var(--luzmo-border-width)));left:calc((var(--luzmo-item-option-color-range-add-color-range-size,var(--add-color-range-size)) - var(--luzmo-item-option-color-range-add-color-range-plus-sign-border-width,var(--add-color-range-plus-sign-border-width))) / 2 - var(--luzmo-item-option-color-range-add-value-border-width,var(--luzmo-border-width)));z-index:1;display:block;position:absolute}.color-range-add-value .plus-sign:after{content:" ";background-color:var(--luzmo-item-option-color-range-add-value-color,var(--luzmo-primary));width:var(--add-color-range-plus-size);height:var(--luzmo-item-option-color-range-add-color-range-plus-sign-border-width,var(--add-color-range-plus-sign-border-width));left:calc((var(--luzmo-item-option-color-range-add-color-range-size,var(--add-color-range-size)) - var(--add-color-range-plus-size)) / 2 - var(--luzmo-item-option-color-range-add-value-border-width,var(--luzmo-border-width)));top:calc((var(--luzmo-item-option-color-range-add-color-range-size,var(--add-color-range-size)) - var(--luzmo-item-option-color-range-add-color-range-plus-sign-border-width,var(--add-color-range-plus-sign-border-width))) / 2 - var(--luzmo-item-option-color-range-add-value-border-width,var(--luzmo-border-width)));z-index:1;display:block;position:absolute}.color-range-add-value:hover{background-color:var(--luzmo-item-option-color-range-add-value-background-color-hover,var(--luzmo-background-color-hover));color:var(--luzmo-item-option-color-range-add-value-color-hover,var(--luzmo-primary-hover))}.color-range-add-value[focused],.color-range-add-value:focus-visible{background-color:var(--luzmo-item-option-color-range-add-value-background-color-focus,var(--luzmo-background-color-focus));color:var(--luzmo-item-option-color-range-add-value-color-focus,var(--luzmo-primary-focus));outline:none}.color-range-add-value[focused]:after,.color-range-add-value:focus-visible:after{content:"";inset:calc(var(--luzmo-item-option-color-range-add-value-focus-indicator-gap,var(--add-value-focus-indicator-gap)) * -2);background-color:var(--luzmo-item-option-color-range-add-value-focus-indicator-background-color,var(--luzmo-background-color));border-width:var(--luzmo-item-option-color-range-add-value-focus-indicator-width,var(--add-value-focus-indicator-width));border-style:solid;border-color:var(--highcontrast-swatch-focus-indicator-color,var(--luzmo-item-option-color-range-add-value-focus-indicator-color,var(--add-value-focus-indicator-color)));border-radius:var(--luzmo-item-option-color-range-add-value-focus-indicator-border-radius,var(--add-value-focus-indicator-border-radius));transition:opacity var(--luzmo-animation-duration) ease-in-out;z-index:-1;position:absolute}:host{--luzmo-swatch-size:var(--color-range-swatch-size);--color-range-swatch-size:16px;--color-ranges-gap:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--color-range-connector-width:.25rem;--color-range-connector-height:calc(var(--color-range-input-field-height) + var(--color-ranges-gap) - var(--color-range-swatch-size) + var(--color-range-connector-width));--color-range-connector-top:calc(var(--color-range-swatch-size) - (var(--color-range-connector-width) / 2));--color-range-reverse-connector-top:calc(-1 * var(--color-range-connector-height) + (var(--color-range-connector-width) / 2));--color-range-connector-left:calc((var(--color-range-swatch-size) - var(--color-range-connector-width)) / 2);--color-range-input-field-height:var(--luzmo-component-height);--add-color-range-size:var(--color-range-swatch-size);--add-color-range-plus-size:8px;--add-color-range-plus-sign-border-width:2px;--add-value-focus-indicator-border-radius:50%;--add-value-focus-indicator-gap:3px;--add-value-focus-indicator-width:1px;--add-value-focus-indicator-color:var(--luzmo-primary);--color-swatch-to-percentage:var(--luzmo-spacing-4);--color-swatch-to-input-field:var(--luzmo-spacing-4);--percentage-to-input-field:var(--luzmo-spacing-4);--input-field-to-button:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1))}:host([size=s]){--color-range-swatch-size:14px;--color-range-input-field-height:var(--luzmo-component-height-s);--color-ranges-gap:var(--luzmo-spacing-2);--add-color-range-plus-size:6px;--add-color-range-plus-sign-border-width:2px;--color-swatch-to-percentage:var(--luzmo-spacing-3);--color-swatch-to-input-field:var(--luzmo-spacing-3);--percentage-to-input-field:var(--luzmo-spacing-3);--input-field-to-button:var(--luzmo-spacing-2)}:host([size=l]){--color-range-swatch-size:18px;--color-range-input-field-height:var(--luzmo-component-height-l);--color-ranges-gap:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--add-color-range-plus-size:10px;--color-swatch-to-percentage:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--color-swatch-to-input-field:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--percentage-to-input-field:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--input-field-to-button:var(--luzmo-spacing-3)}:host([size=xl]){--color-range-swatch-size:20px;--color-range-input-field-height:var(--luzmo-component-height-xl);--color-ranges-gap:var(--luzmo-spacing-3);--add-color-range-plus-size:10px;--color-swatch-to-percentage:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--color-swatch-to-input-field:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--percentage-to-input-field:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--input-field-to-button:var(--luzmo-spacing-4)}`,f=class extends i{constructor(...e){super(...e),this.disabled=!1,this.percentage=!1,this.noAlphaChannel=!1,this.editRangeSize=!1,this.noValues=!1,this.minimumRangeSize=2,this.negativeInfinityValue=!1,this.readOnlyColorPicker=!1,this.reverse=!1,this.debounce=100,this._ranges=[]}static{this.styles=[super.styles,l(d)]}willUpdate(e){super.willUpdate(e),e.has(`value`)&&(this._ranges=typeof this.parseValue==`function`?this.parseValue(this.value??this.default??[]):this.value??this.default??[]),this.negativeInfinityValue&&(this._ranges=[{color:this._ranges[0].color,value:-1/0},...this._ranges.slice(1)])}_handleChangeEvent(){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.dispatchEvent(new CustomEvent(`luzmo-option-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:typeof this.toValue==`function`?this.toValue(this._ranges):this._ranges}}))},this.debounce??200)}_getIndex(e){let t=[...this.colorRangeLines].indexOf((e?.target)?.closest(`.color-range-line`));return this.reverse&&(t=(this._ranges?.length??0)-1-t),t}_extrapolateNewValue(e){if(e.length<2)return 0;let t=e.at(-1),n=e.at(-2),r=(t??0)-(n??0);return(t??0)+r}_setColor(e){let t=this._getIndex(e),n=e.target.color??e.target.value;this._ranges?.[t]&&(this._ranges[t].color=String(n)),this._ranges=structuredClone(this._ranges),this._handleChangeEvent()}_setNumber(e){let t=this._getIndex(e),n=e.target.value;this._ranges?.[t]&&(this._ranges[t].value=n),this._ranges=structuredClone(this._ranges.sort((e,t)=>(e?.value??0)-(t?.value??0))),this._handleChangeEvent()}_removeRangeValue(e){let t=this._getIndex(e);this._ranges?.splice(t,1),this._ranges=structuredClone(this._ranges),this._handleChangeEvent()}_addRangeValue(){let e=u(this._ranges?.map(e=>e.color)??[]),t=this._extrapolateNewValue(this._ranges?.map(e=>e.value??0)??[]);this._ranges?.push({color:e,value:t}),this._ranges=structuredClone(this._ranges),this._handleChangeEvent()}renderRangeValues(){let e=(e,n,i,o)=>a`
|
|
3
|
-
<div class="color-range-line" style="--range-color: ${e}">
|
|
4
|
-
<luzmo-color-picker
|
|
5
|
-
.color=${e}
|
|
6
|
-
.debounce=${this.debounce}
|
|
7
|
-
?disabled=${this.disabled}
|
|
8
|
-
?no-alpha-channel=${this.noAlphaChannel}
|
|
9
|
-
?read-only=${this.readOnlyColorPicker}
|
|
10
|
-
@change=${this._setColor}
|
|
11
|
-
></luzmo-color-picker>
|
|
12
|
-
${this.percentage?a`
|
|
13
|
-
<div class="color-range-percentage-value">%</div>
|
|
14
|
-
`:a`
|
|
15
|
-
|
|
16
|
-
`}
|
|
17
|
-
${this.noValues?a` <luzmo-color-field
|
|
18
|
-
.value=${e}
|
|
19
|
-
.size=${this.size}
|
|
20
|
-
.debounce=${this.debounce}
|
|
21
|
-
?no-alpha-channel=${this.noAlphaChannel}
|
|
22
|
-
?disabled=${this.disabled}
|
|
23
|
-
@change=${this._setColor}
|
|
24
|
-
></luzmo-color-field>`:i?a` <luzmo-text-field
|
|
25
|
-
.value=${`< `+(o??0)}
|
|
26
|
-
.size=${this.size}
|
|
27
|
-
readonly
|
|
28
|
-
></luzmo-text-field>`:a` <luzmo-number-field
|
|
29
|
-
.value=${n??0}
|
|
30
|
-
.size=${this.size}
|
|
31
|
-
.debounce=${this.debounce}
|
|
32
|
-
?disabled=${this.disabled}
|
|
33
|
-
@change=${this._setNumber}
|
|
34
|
-
></luzmo-number-field>`}
|
|
35
|
-
${this.editRangeSize&&!this.disabled&&!i&&(this._ranges?.length??0)>this.minimumRangeSize?a`<luzmo-action-button
|
|
36
|
-
quiet
|
|
37
|
-
.size=${this.size}
|
|
38
|
-
.label=${t(`Remove color stop`,{desc:`Aria label for remove color stop button`})}
|
|
39
|
-
@click=${this._removeRangeValue}
|
|
40
|
-
>
|
|
41
|
-
<luzmo-icon
|
|
42
|
-
slot="icon"
|
|
43
|
-
.size=${this.size}
|
|
44
|
-
.icon=${r}
|
|
45
|
-
></luzmo-icon>
|
|
46
|
-
</luzmo-action-button>`:a`
|
|
47
|
-
|
|
48
|
-
`}
|
|
49
|
-
</div>
|
|
50
|
-
`,n=this._ranges??this.default??[];this.reverse&&(n=[...n].reverse());let i=n.map(({color:t,value:r},i)=>e(t,r,i===0&&this.negativeInfinityValue,i===0&&this.negativeInfinityValue?n[1]?.value:void 0));return a`
|
|
51
|
-
<div id="luzmo-item-option-control" class="color-range-lines-container" role="group" aria-label=${this.label||t(`Color range`,{desc:`Accessible label for color range control`})}>
|
|
52
|
-
${this.editRangeSize&&!this.disabled&&this.reverse?a`<div class="color-range-add-value-container">
|
|
53
|
-
<button
|
|
54
|
-
class="color-range-add-value"
|
|
55
|
-
aria-label=${t(`Add color stop`,{desc:`Aria label for add color stop button`})}
|
|
56
|
-
@click=${this._addRangeValue}
|
|
57
|
-
>
|
|
58
|
-
<div class="plus-sign"></div>
|
|
59
|
-
</button>
|
|
60
|
-
</div>`:a`
|
|
61
|
-
|
|
62
|
-
`}
|
|
63
|
-
<div
|
|
64
|
-
class="color-range-lines ${this.editRangeSize&&!this.disabled?`edit-range-size`:``}"
|
|
65
|
-
>
|
|
66
|
-
${i}
|
|
67
|
-
</div>
|
|
68
|
-
${this.editRangeSize&&!this.disabled&&!this.reverse?a`<div class="color-range-add-value-container">
|
|
69
|
-
<button
|
|
70
|
-
class="color-range-add-value"
|
|
71
|
-
aria-label=${t(`Add color stop`,{desc:`Aria label for add color stop button`})}
|
|
72
|
-
@click=${this._addRangeValue}
|
|
73
|
-
>
|
|
74
|
-
<div class="plus-sign"></div>
|
|
75
|
-
</button>
|
|
76
|
-
</div>`:a`
|
|
77
|
-
|
|
78
|
-
`}
|
|
79
|
-
</div>
|
|
80
|
-
`}renderController(){return this.renderRangeValues()}};e([o({type:Array,reflect:!0})],f.prototype,`value`,void 0),e([o({type:Array,reflect:!0})],f.prototype,`default`,void 0),e([o({type:Boolean,reflect:!0})],f.prototype,`disabled`,void 0),e([o({type:Boolean})],f.prototype,`percentage`,void 0),e([o({type:Boolean,attribute:`no-alpha-channel`})],f.prototype,`noAlphaChannel`,void 0),e([o({type:Boolean,attribute:`edit-range-size`})],f.prototype,`editRangeSize`,void 0),e([o({type:Boolean,attribute:`no-values`})],f.prototype,`noValues`,void 0),e([o({type:Number,reflect:!0,attribute:`minimum-range-size`})],f.prototype,`minimumRangeSize`,void 0),e([o({type:Boolean,reflect:!0,attribute:`negative-infinity-value`})],f.prototype,`negativeInfinityValue`,void 0),e([o({type:Boolean,attribute:`read-only-color-picker`})],f.prototype,`readOnlyColorPicker`,void 0),e([o({type:Boolean})],f.prototype,`reverse`,void 0),e([o({type:Number,reflect:!0})],f.prototype,`debounce`,void 0),e([o()],f.prototype,`parseValue`,void 0),e([o()],f.prototype,`toValue`,void 0),e([s(`.color-range-line`)],f.prototype,`colorRangeLines`,void 0),e([c()],f.prototype,`_ranges`,void 0),customElements.get(`luzmo-item-option-color-range`)||customElements.define(`luzmo-item-option-color-range`,f);export{f as LuzmoItemOptionColorRange};
|