@arcgis/common-components 5.1.0-next.7 → 5.1.0-next.71
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 +24 -1
- package/dist/cdn/5NETUOXN.js +2 -0
- package/dist/cdn/{4DCAUWTC.js → A2WIET6Z.js} +1 -1
- package/dist/cdn/{AXTSUI2Q.js → A4VSQVM4.js} +1 -1
- package/dist/cdn/{3O7GAC23.js → EAHF3DLH.js} +1 -1
- package/dist/cdn/EAZTXSEK.js +2 -0
- package/dist/cdn/{C6JAR4IN.js → HLEA6ABY.js} +1 -1
- package/dist/cdn/{7CI55VCH.js → HYLC5GEB.js} +1 -1
- package/dist/cdn/I57JIY65.js +2 -0
- package/dist/cdn/{4CW7U27R.js → IUOLWTBW.js} +1 -1
- package/dist/cdn/{7HQMPKZO.js → IYWMY52R.js} +1 -1
- package/dist/cdn/{7Y42J3JI.js → JAL7MAFZ.js} +1 -1
- package/dist/cdn/{23DDMSOB.js → KVH5TABZ.js} +1 -1
- package/dist/cdn/{XEB2RUND.js → L5OS6JT2.js} +1 -1
- package/dist/cdn/{J5X5TNVW.js → LQ7GSW6L.js} +1 -1
- package/dist/cdn/MB7UDGWW.js +2 -0
- package/dist/cdn/MQGZ7W5O.js +2 -0
- package/dist/cdn/NMW4NOC2.js +2 -0
- package/dist/cdn/NRTJ53CF.js +4 -0
- package/dist/cdn/{YVSTPEPS.js → OXVPCZE7.js} +1 -1
- package/dist/cdn/{7PB2GGQH.js → UDUEUE6K.js} +1 -1
- package/dist/cdn/{ZLXAKPUH.js → W745RNPU.js} +1 -1
- package/dist/cdn/WNPCATBU.js +2 -0
- package/dist/cdn/{ZOWIFVL3.js → Y32JMGYR.js} +1 -1
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.en-US.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/spatial-reference-picker/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/commonFunctions.js +7 -3
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +1 -0
- package/dist/components/arcgis-ckeditor5/customElement.js +7 -7
- package/dist/components/arcgis-ckeditor5/types.d.ts +9 -0
- package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +1 -0
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-field-info/customElement.d.ts +3 -2
- package/dist/components/arcgis-field-info/utils/basic.d.ts +21 -2
- package/dist/components/arcgis-field-pick-list/customElement.d.ts +4 -3
- package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
- package/dist/components/arcgis-field-pick-list/utils/types.d.ts +25 -3
- package/dist/components/arcgis-histogram/customElement.d.ts +21 -21
- package/dist/components/arcgis-histogram/customElement.js +81 -90
- package/dist/components/arcgis-histogram/types.d.ts +1 -3
- package/dist/components/arcgis-label-input/customElement.d.ts +6 -6
- package/dist/components/arcgis-label-input/customElement.js +22 -17
- package/dist/components/arcgis-picker-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-picker-input/customElement.js +11 -11
- package/dist/components/arcgis-ramp-color/customElement.d.ts +2 -0
- package/dist/components/arcgis-ramp-color-break/customElement.d.ts +2 -0
- package/dist/components/arcgis-ramp-opacity/customElement.d.ts +1 -0
- package/dist/components/arcgis-slider/customElement.d.ts +72 -67
- package/dist/components/arcgis-slider/customElement.js +349 -304
- package/dist/components/arcgis-slider-input/customElement.d.ts +1 -0
- package/dist/components/arcgis-spatial-reference-picker/customElement.d.ts +327 -0
- package/dist/components/arcgis-spatial-reference-picker/customElement.js +7702 -0
- package/dist/components/arcgis-spatial-reference-picker/index.d.ts +1 -0
- package/dist/components/arcgis-spatial-reference-picker/index.js +3 -0
- package/dist/components/arcgis-spatial-reference-picker-tree/customElement.d.ts +35 -0
- package/dist/components/arcgis-spatial-reference-picker-tree/customElement.js +77 -0
- package/dist/components/arcgis-spatial-reference-picker-tree/index.d.ts +1 -0
- package/dist/components/arcgis-spatial-reference-picker-tree/index.js +3 -0
- package/dist/components/arcgis-ticks/customElement.d.ts +21 -24
- package/dist/components/arcgis-ticks/customElement.js +1 -1
- package/dist/components/arcgis-ticks/types.d.ts +23 -0
- package/dist/components/arcgis-unique-values-list/customElement.d.ts +14 -5
- package/dist/components/arcgis-unique-values-list/customElement.js +158 -151
- package/dist/components/arcgis-unique-values-list/utils/basic.d.ts +14 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/loader.js +3 -1
- package/dist/types/lumina.d.ts +13 -1
- package/dist/types/preact.d.ts +15 -1
- package/dist/types/react.d.ts +17 -1
- package/dist/types/stencil.d.ts +13 -1
- package/dist/utils/spatial-references.d.ts +1 -0
- package/dist/utils/types.d.ts +24 -7
- package/package.json +5 -6
- package/dist/cdn/2BDHDUXG.js +0 -2
- package/dist/cdn/57I35HLF.js +0 -2
- package/dist/cdn/6DQVLQL6.js +0 -2
- package/dist/cdn/EKKJN7WZ.js +0 -2
- package/dist/cdn/UTXWKXMT.js +0 -4
- package/dist/cdn/ZL3E4ZGE.js +0 -2
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { formatNumber as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { createRef as
|
|
6
|
-
import { css as
|
|
7
|
-
const
|
|
8
|
-
class
|
|
2
|
+
import { c as o } from "../../chunks/runtime.js";
|
|
3
|
+
import { formatNumber as u } from "@arcgis/core/intl.js";
|
|
4
|
+
import { LitElement as c, createEvent as h, safeClassMap as d } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as s, ref as l } from "lit/directives/ref.js";
|
|
6
|
+
import { css as p, html as n } from "lit";
|
|
7
|
+
const m = p`:host{display:block}:host([hidden]){display:none}.content{display:flex;flex-direction:column}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:var(--calcite-font-line-height-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.content{align-items:start}.readOnlyLabel{text-align:start}}:host([alignment="end"]){.content{align-items:end}.readOnlyLabel{text-align:end}}:host([alignment="center"]){.content{align-items:center}.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`;
|
|
8
|
+
class f extends c {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this._buttonRef =
|
|
10
|
+
super(...arguments), this._buttonRef = s(), this._inputRef = s(), this._labelRef = s(), this._formatOptions = {
|
|
11
11
|
style: "decimal",
|
|
12
12
|
useGrouping: !0,
|
|
13
13
|
minimumFractionDigits: 0,
|
|
14
14
|
maximumFractionDigits: 2
|
|
15
|
-
}, this._formatValue = (t) =>
|
|
15
|
+
}, this._formatValue = (t) => u(t, this._formatOptions), this._pointerDownPosition = null, this._displayedValue = "", this._editing = !1, this.alignment = "center", this.readOnly = !1, this.value = 0, this.arcgisChange = h({ cancelable: !1 });
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.properties = { _displayedValue: 16, _editing: 16, alignment: 3, editing: 39, labelFormatter: 0, readOnly: 7, value: 11 };
|
|
19
19
|
}
|
|
20
20
|
static {
|
|
21
|
-
this.styles =
|
|
21
|
+
this.styles = m;
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
24
|
this.shadowRootOptions = { mode: "open", delegatesFocus: !0 };
|
|
@@ -39,8 +39,11 @@ class d extends o {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
updated(t) {
|
|
42
|
-
const e = this._inputRef.value, i = this.renderRoot.querySelector(".readOnlyLabel");
|
|
43
|
-
e && i &&
|
|
42
|
+
const e = this._inputRef.value, i = this._buttonRef.value, a = this.renderRoot.querySelector(".readOnlyLabel");
|
|
43
|
+
if (e && i && a) {
|
|
44
|
+
const r = a.offsetWidth;
|
|
45
|
+
i.style.width = `${r}px`, e.style.width = `${r}px`;
|
|
46
|
+
}
|
|
44
47
|
}
|
|
45
48
|
_enterEdit() {
|
|
46
49
|
this._editing || this.readOnly || (this._editing = !0, this.requestUpdate("editing", !1), this.updateComplete.then(async () => {
|
|
@@ -49,7 +52,7 @@ class d extends o {
|
|
|
49
52
|
}));
|
|
50
53
|
}
|
|
51
54
|
_exitEdit(t, e = !1) {
|
|
52
|
-
this._editing && (t
|
|
55
|
+
this._editing && (t && this._commitValue(this._inputRef.value), this._displayedValue = this._internalLabelFormatter(this.value), this._inputRef.value && (this._inputRef.value.value = `${this.value}`), this._editing = !1, this.requestUpdate("editing", !0), e || this.updateComplete.then(async () => {
|
|
53
56
|
await this._buttonRef.value?.setFocus();
|
|
54
57
|
}));
|
|
55
58
|
}
|
|
@@ -100,12 +103,14 @@ class d extends o {
|
|
|
100
103
|
}
|
|
101
104
|
render() {
|
|
102
105
|
const { alignment: t, _displayedValue: e } = this, i = [
|
|
103
|
-
|
|
106
|
+
n`<span class="readOnlyLabel"><span ${l(this._labelRef)}>${e}</span></span>`
|
|
104
107
|
];
|
|
105
|
-
return this.readOnly || i.push(
|
|
108
|
+
return this.readOnly || i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} kind=neutral @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${l(this._buttonRef)}>${e}</calcite-button>`, n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${l(this._inputRef)}></calcite-input-number>`), n`<div class=${d({
|
|
109
|
+
content: !0
|
|
110
|
+
})}>${i}</div>`;
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
|
-
|
|
113
|
+
o("arcgis-label-input", f);
|
|
109
114
|
export {
|
|
110
|
-
|
|
115
|
+
f as ArcgisLabelInput
|
|
111
116
|
};
|
|
@@ -3,6 +3,7 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
3
3
|
import type { IPopoverProps } from "../../utils/types.js";
|
|
4
4
|
import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
|
|
5
5
|
|
|
6
|
+
/** @internal */
|
|
6
7
|
export abstract class ArcgisPickerInput extends LitElement {
|
|
7
8
|
/**
|
|
8
9
|
* If true, disables the component.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { createRef as
|
|
6
|
-
const
|
|
7
|
-
class
|
|
2
|
+
import { c as n } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as l, html as o } from "lit";
|
|
4
|
+
import { LitElement as a, createEvent as i, safeStyleMap as r } from "@arcgis/lumina";
|
|
5
|
+
import { createRef as c, ref as t } from "lit/directives/ref.js";
|
|
6
|
+
const p = l`:host{display:flex}:host([disabled]){opacity:.25;pointer-events:none}button{overflow:hidden;background-color:transparent;align-items:center;border:none;border-radius:0;box-sizing:border-box;cursor:pointer;display:flex;font-family:inherit;gap:var(--calcite-space-sm);height:100%;justify-content:center;outline-color:transparent;outline-offset:0;padding:3px 0;padding-inline:3px var(--calcite-space-sm);position:relative;text-decoration:none;user-select:none;text-align:center;-webkit-appearance:none;width:100%;&:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}&:hover{text-decoration:none}}.preview{border:var(--calcite-border-width-sm) solid #949494;display:flex;align-items:center;flex-grow:1}.container{display:flex;gap:5px;width:100%}::slotted([slot="preview"]){flex-grow:1;display:flex}calcite-icon{color:var(--calcite-color-text-3)}`;
|
|
7
|
+
class d extends a {
|
|
8
8
|
constructor() {
|
|
9
|
-
super(), this.panelEl =
|
|
9
|
+
super(), this.panelEl = c(), this.open = !1, this.disabled = !1, this.iconEnd = "pencil", this.label = "", this.arcgisPopoverOpen = i(), this.arcgisPopoverClose = i(), this.listenOn(document.body, "arcgisPopoverOpen", this.onPopoverOpen);
|
|
10
10
|
}
|
|
11
11
|
static {
|
|
12
12
|
this.properties = { open: 16, disabled: 7, heading: 1, iconEnd: 1, intlDone: 1, label: 1, popoverProps: 0 };
|
|
13
13
|
}
|
|
14
14
|
static {
|
|
15
|
-
this.styles =
|
|
15
|
+
this.styles = p;
|
|
16
16
|
}
|
|
17
17
|
async close() {
|
|
18
18
|
this.onPopoverClose();
|
|
@@ -48,10 +48,10 @@ class p extends l {
|
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
50
|
const { popoverProps: e } = this;
|
|
51
|
-
return o`<calcite-popover pointer-disabled trigger-disabled @keyup=${this.handlePopoverKeyUp} .label=${this.label} .offsetDistance=${e?.offsetDistance ?? 0} .offsetSkidding=${e?.offsetSkidding ?? 0} .flipDisabled=${e?.flipDisabled ?? !1} .open=${this.disabled ? !1 : this.open} .overlayPositioning=${e?.overlayPositioning ?? "fixed"} .placement=${e?.placement ?? "bottom"} @calcitePopoverOpen=${this.handlePopoverOpen} .referenceElement=${e?.refElement ?? this.previewContainerEl}><calcite-panel closable .heading=${this.heading} style=${
|
|
51
|
+
return o`<calcite-popover pointer-disabled trigger-disabled @keyup=${this.handlePopoverKeyUp} .label=${this.label} .offsetDistance=${e?.offsetDistance ?? 0} .offsetSkidding=${e?.offsetSkidding ?? 0} .flipDisabled=${e?.flipDisabled ?? !1} .open=${this.disabled ? !1 : this.open} .overlayPositioning=${e?.overlayPositioning ?? "fixed"} .placement=${e?.placement ?? "bottom"} @calcitePopoverOpen=${this.handlePopoverOpen} @calcitePopoverClose=${(s) => s.stopPropagation()} .referenceElement=${e?.refElement ?? this.previewContainerEl}><calcite-panel closable .heading=${this.heading} style=${r(e?.maxHeight ? { maxHeight: e.maxHeight } : void 0)} @calcitePanelClose=${this.handlePanelClose} ${t(this.panelEl)}><slot name=content></slot><calcite-button appearance=solid slot=footer width=full .label=${this.intlDone} @click=${this.onPopoverClose}>${this.intlDone}</calcite-button></calcite-panel></calcite-popover><div class="container"><div class="preview" ${t(this.setPreviewContainerRef)}><button .disabled=${this.disabled} @click=${this.handleButtonClick} type=button .ariaLabel=${this.label} ${t(this.setButtonRef)}><slot name=preview></slot>${this.iconEnd ? o`<calcite-icon .icon=${this.iconEnd} scale=s></calcite-icon>` : null}</button></div><slot name=content-end></slot></div>`;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
n("arcgis-picker-input", d);
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
d as ArcgisPickerInput
|
|
57
57
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type Color from "@arcgis/core/Color.js";
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
4
|
|
|
5
|
+
/** @internal */
|
|
5
6
|
export abstract class ArcgisRampColor extends LitElement {
|
|
6
7
|
/** @default "horizontal" */
|
|
7
8
|
accessor layout: "horizontal" | "vertical";
|
|
@@ -12,6 +13,7 @@ export abstract class ArcgisRampColor extends LitElement {
|
|
|
12
13
|
accessor stops: ColorStop[];
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
/** @internal */
|
|
15
17
|
export interface ColorStop {
|
|
16
18
|
color: Color | string;
|
|
17
19
|
value: number;
|
|
@@ -3,6 +3,7 @@ import type Color from "@arcgis/core/Color.js";
|
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
4
|
import type { ArcgisRampColor } from "../arcgis-ramp-color/customElement.js";
|
|
5
5
|
|
|
6
|
+
/** @internal */
|
|
6
7
|
export abstract class ArcgisRampColorBreak extends LitElement {
|
|
7
8
|
/** @default "horizontal" */
|
|
8
9
|
accessor layout: ArcgisRampColor["layout"];
|
|
@@ -13,6 +14,7 @@ export abstract class ArcgisRampColorBreak extends LitElement {
|
|
|
13
14
|
accessor stops: ColorBreak[];
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
/** @internal */
|
|
16
18
|
export interface ColorBreak {
|
|
17
19
|
color: Color | string;
|
|
18
20
|
max: number;
|
|
@@ -3,6 +3,7 @@ import type Color from "@arcgis/core/Color.js";
|
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
4
|
import type { ArcgisRampColor } from "../arcgis-ramp-color/customElement.js";
|
|
5
5
|
|
|
6
|
+
/** @internal */
|
|
6
7
|
export abstract class ArcgisRampOpacity extends LitElement {
|
|
7
8
|
accessor fillColor: Color | string;
|
|
8
9
|
/** @default "horizontal" */
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
|
-
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
3
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
3
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
4
|
import type { Popover as Popover } from "@esri/calcite-components/components/calcite-popover";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
|
-
* The
|
|
9
|
-
* [values](
|
|
10
|
-
* configurable value [precision](
|
|
7
|
+
* The slider component is used to filter data or collect numeric input from users. It supports single or multiple thumbs, configured via the
|
|
8
|
+
* [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#values) property. The slider can be displayed in a horizontal or vertical [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#layout), and it supports snapping to defined [steps](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#steps),
|
|
9
|
+
* configurable value [precision](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#precision), and a custom [labelFormatter](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#labelFormatter). It also includes keyboard interaction,
|
|
11
10
|
* optional editable labels, and customizable popover content.
|
|
12
11
|
*
|
|
13
12
|
* The slider component can be set up with the [arcgis-ticks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/) component. See the example below:
|
|
@@ -18,17 +17,17 @@ import type { Popover as Popover } from "@esri/calcite-components/components/cal
|
|
|
18
17
|
* </arcgis-slider>
|
|
19
18
|
* ```
|
|
20
19
|
*
|
|
21
|
-
*
|
|
20
|
+
* > [!TIP]
|
|
21
|
+
* > Which slider should you use: `arcgis-slider` or `calcite-slider`?
|
|
22
22
|
* >
|
|
23
|
-
* >
|
|
24
|
-
* > It covers common slider use cases and works well in most scenarios.
|
|
23
|
+
* > Use [calcite-slider](https://developers.arcgis.com/calcite-design-system/components/slider/) by default. It provides a consistent UI/UX and supports most common slider use cases.
|
|
25
24
|
* >
|
|
26
|
-
* >
|
|
27
|
-
* >
|
|
28
|
-
* > *
|
|
29
|
-
* >
|
|
30
|
-
* > *
|
|
31
|
-
* > *
|
|
25
|
+
* > Choose `arcgis-slider` when you need more advanced behavior, such as:
|
|
26
|
+
* >
|
|
27
|
+
* > * A vertical slider via [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#layout).
|
|
28
|
+
* > * More than two [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#values) in a single slider.
|
|
29
|
+
* > * A display range that extends beyond the interactive range using [fullRangeMin](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMin) and [fullRangeMax](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMax).
|
|
30
|
+
* > * Additional slotted content using the `content-start`, `content-end`, or `popover` [slots](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#slots).
|
|
32
31
|
*
|
|
33
32
|
* @slot [content-start] - A slot for elements before the track.
|
|
34
33
|
* @slot [content-end] - A slot for elements after the track.
|
|
@@ -41,14 +40,14 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
41
40
|
* so it may reflect the thumb’s last set position.
|
|
42
41
|
*
|
|
43
42
|
*
|
|
44
|
-
* It returns
|
|
43
|
+
* It returns:
|
|
45
44
|
* - `undefined` when no value is active
|
|
46
45
|
* - a `number` when a single value is active
|
|
47
46
|
* - `"all"` when the range (segment) is active
|
|
48
47
|
*
|
|
49
|
-
* Listen to [arcgisActiveValueChange](
|
|
48
|
+
* Listen to [@arcgisActiveValueChange](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#event-arcgisActiveValueChange) to be notified when a value becomes active or inactive.
|
|
50
49
|
*
|
|
51
|
-
* @see [arcgisActiveValueChange](
|
|
50
|
+
* @see [@arcgisActiveValueChange](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#event-arcgisActiveValueChange)
|
|
52
51
|
*/
|
|
53
52
|
get activeValue(): number | "all" | undefined;
|
|
54
53
|
/**
|
|
@@ -82,13 +81,13 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
82
81
|
*/
|
|
83
82
|
accessor fillPlacement: "end" | "none" | "start";
|
|
84
83
|
/**
|
|
85
|
-
* Sets the maximum value of the slider
|
|
86
|
-
* When specified, the slider track is scaled from [fullRangeMin](
|
|
87
|
-
* the thumbs remain constrained to the interactive range defined by [min](
|
|
84
|
+
* Sets the maximum value of the slider's displayed range.
|
|
85
|
+
* When specified, the slider track is scaled from [fullRangeMin](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMin) to `fullRangeMax`, while
|
|
86
|
+
* the thumbs remain constrained to the interactive range defined by [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max).
|
|
88
87
|
*
|
|
89
|
-
* The `fullRangeMax` must be greater than or equal to [max](
|
|
88
|
+
* The `fullRangeMax` must be greater than or equal to [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) property of the slider.
|
|
90
89
|
*
|
|
91
|
-
* @see [fullRangeMin](
|
|
90
|
+
* @see [fullRangeMin](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMin)
|
|
92
91
|
* @example
|
|
93
92
|
* ```html
|
|
94
93
|
* <!-- Slider with a full range from 0 to 100, while only allowing thumb values between 25 and 75. -->
|
|
@@ -97,13 +96,13 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
97
96
|
*/
|
|
98
97
|
accessor fullRangeMax: number | undefined;
|
|
99
98
|
/**
|
|
100
|
-
* Sets the minimum value of the slider
|
|
101
|
-
* When specified, the slider track is scaled from `fullRangeMin` to [fullRangeMax](
|
|
102
|
-
* the thumbs remain constrained to the range defined by [min](
|
|
99
|
+
* Sets the minimum value of the slider's displayed range.
|
|
100
|
+
* When specified, the slider track is scaled from `fullRangeMin` to [fullRangeMax](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMax), while
|
|
101
|
+
* the thumbs remain constrained to the range defined by [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max).
|
|
103
102
|
*
|
|
104
|
-
* The `fullRangeMin` must be less than or equal to [min](
|
|
103
|
+
* The `fullRangeMin` must be less than or equal to [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) property of the slider.
|
|
105
104
|
*
|
|
106
|
-
* @see [fullRangeMax](
|
|
105
|
+
* @see [fullRangeMax](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMax)
|
|
107
106
|
* @example
|
|
108
107
|
* ```html
|
|
109
108
|
* <!-- Slider with a full range from 0 to 100, while only allowing thumb values between 25 and 75. -->
|
|
@@ -123,7 +122,7 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
123
122
|
*/
|
|
124
123
|
accessor keyboardLargeStep: number;
|
|
125
124
|
/**
|
|
126
|
-
* Allows customizing how slider labels are formatted for [min](
|
|
125
|
+
* Allows customizing how slider labels are formatted for [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min), [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max), and thumb values.
|
|
127
126
|
* The formatted value is used for the visible labels and for the thumb’s accessible value text via `aria-valuetext`.
|
|
128
127
|
* Return `null` or `undefined` to use the default formatting.
|
|
129
128
|
*
|
|
@@ -150,24 +149,24 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
150
149
|
* };
|
|
151
150
|
* ```
|
|
152
151
|
*/
|
|
153
|
-
accessor labelFormatter: (
|
|
152
|
+
accessor labelFormatter: (value: number, type: "max" | "min" | "value", defaultFormatter: (value: number) => string) => string | null | undefined;
|
|
154
153
|
/**
|
|
155
154
|
* Determines the layout/orientation of the Slider component. By default, the slider will render horizontally with the min value on the left side
|
|
156
155
|
* of the track.
|
|
157
156
|
*
|
|
158
157
|
* @default "horizontal"
|
|
159
|
-
* @see [mirrored](
|
|
158
|
+
* @see [mirrored](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#mirrored)
|
|
160
159
|
*/
|
|
161
160
|
accessor layout: "horizontal" | "vertical";
|
|
162
161
|
/**
|
|
163
162
|
* The maximum value for the slider thumbs. Thumbs will not move past this value.
|
|
164
163
|
*
|
|
165
|
-
* To display the `max` label on the slider, set [showRangeLabels](
|
|
166
|
-
* To allow the end user to modify the `max` value, set [rangeLabelsEditingEnabled](
|
|
164
|
+
* To display the `max` label on the slider, set [showRangeLabels](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#showRangeLabels) to `true`.
|
|
165
|
+
* To allow the end user to modify the `max` value, set [rangeLabelsEditingEnabled](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#rangeLabelsEditingEnabled) to `true`.
|
|
167
166
|
*
|
|
168
|
-
* @see [rangeLabelsEditingEnabled](
|
|
169
|
-
* @see [showRangeLabels](
|
|
170
|
-
* @see [fullRangeMax](
|
|
167
|
+
* @see [rangeLabelsEditingEnabled](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#rangeLabelsEditingEnabled)
|
|
168
|
+
* @see [showRangeLabels](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#showRangeLabels)
|
|
169
|
+
* @see [fullRangeMax](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#fullRangeMax)
|
|
171
170
|
*/
|
|
172
171
|
accessor max: number;
|
|
173
172
|
/**
|
|
@@ -201,18 +200,18 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
201
200
|
}>;
|
|
202
201
|
/**
|
|
203
202
|
* The minimum value for the slider thumbs. Thumbs will not move past this value.
|
|
204
|
-
* To display the `min` label on the slider, set [showRangeLabels](
|
|
205
|
-
* To allow the end user to modify the `min` value, set [rangeLabelsEditingEnabled](
|
|
203
|
+
* To display the `min` label on the slider, set [showRangeLabels](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#showRangeLabels) to `true`.
|
|
204
|
+
* To allow the end user to modify the `min` value, set [rangeLabelsEditingEnabled](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#rangeLabelsEditingEnabled) to `true`.
|
|
206
205
|
*
|
|
207
|
-
* @see [rangeLabelsEditingEnabled](
|
|
208
|
-
* @see [showRangeLabels](
|
|
206
|
+
* @see [rangeLabelsEditingEnabled](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#rangeLabelsEditingEnabled)
|
|
207
|
+
* @see [showRangeLabels](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#showRangeLabels)
|
|
209
208
|
*/
|
|
210
209
|
accessor min: number;
|
|
211
210
|
/**
|
|
212
211
|
* When `true`, the slider will display values from high to low. This inverts the direction of the slider.
|
|
213
212
|
*
|
|
214
213
|
* @default false
|
|
215
|
-
* @see [layout](
|
|
214
|
+
* @see [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#layout)
|
|
216
215
|
*/
|
|
217
216
|
accessor mirrored: boolean;
|
|
218
217
|
/**
|
|
@@ -268,8 +267,8 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
268
267
|
* The labels of the thumbs will display two decimal places, but the precision of the actual
|
|
269
268
|
* thumb values will not be lost even when the user slides or moves the thumb.
|
|
270
269
|
*
|
|
271
|
-
* Keep in mind this property rounds thumb [values](
|
|
272
|
-
* for formatting purposes. To format thumb `labels`, use the [labelFormatter](
|
|
270
|
+
* Keep in mind this property rounds thumb [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#values) and shouldn't be used exclusively
|
|
271
|
+
* for formatting purposes. To format thumb `labels`, use the [labelFormatter](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#labelFormatter)
|
|
273
272
|
* property.
|
|
274
273
|
*
|
|
275
274
|
* @default 4
|
|
@@ -282,18 +281,18 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
282
281
|
*/
|
|
283
282
|
accessor precision: number;
|
|
284
283
|
/**
|
|
285
|
-
* When `true`, users can edit the [min](
|
|
284
|
+
* When `true`, users can edit the [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) range labels via keyboard input.
|
|
286
285
|
* Editing these labels updates the slider’s interactive range.
|
|
287
286
|
*
|
|
288
287
|
* @default false
|
|
289
288
|
*/
|
|
290
289
|
accessor rangeLabelsEditingEnabled: boolean;
|
|
291
290
|
/**
|
|
292
|
-
* Controls where the [min](
|
|
293
|
-
* This property only affects the slider when [layout](
|
|
291
|
+
* Controls where the [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) range labels are positioned relative to the track.
|
|
292
|
+
* This property only affects the slider when [layout](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#layout) is `"horizontal"`.
|
|
294
293
|
*
|
|
295
|
-
* - `"center"` (default): Places the [min](
|
|
296
|
-
* - `"end"`: Places the range labels below the
|
|
294
|
+
* - `"center"` (default): Places the [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) labels aligned with the track.
|
|
295
|
+
* - `"end"`: Places the range labels below the track.
|
|
297
296
|
*
|
|
298
297
|
* @default "center"
|
|
299
298
|
*/
|
|
@@ -305,34 +304,36 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
305
304
|
*/
|
|
306
305
|
accessor segmentsDraggingDisabled: boolean;
|
|
307
306
|
/**
|
|
308
|
-
* Indicates whether
|
|
307
|
+
* Indicates whether [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) range labels are visible on the slider.
|
|
309
308
|
*
|
|
310
309
|
* @default false
|
|
311
310
|
*/
|
|
312
311
|
accessor showRangeLabels: boolean;
|
|
313
312
|
/**
|
|
314
|
-
* Sets
|
|
313
|
+
* Sets intervals on the slider that restrict user
|
|
315
314
|
* input to specific values. If an array of numbers is passed to this
|
|
316
315
|
* property, the slider thumbs may only be moved to the positions
|
|
317
316
|
* specified in the array.
|
|
318
317
|
*
|
|
318
|
+
* This can be set as comma-separated numbers in the attribute (e.g., `<arcgis-slider steps="10, 20, 30"></arcgis-slider>`)
|
|
319
|
+
* or programmatically as either a single number or an array of numbers (e.g., `slider.steps = 10`, `slider.steps = [10, 20, 30]`).
|
|
320
|
+
*
|
|
319
321
|
* If a single number is set, then steps are set along the entire
|
|
320
|
-
* slider range at an interval of the provided value.
|
|
321
|
-
*
|
|
322
|
-
* For example, if a value of `0.5` is set
|
|
323
|
-
* [min](
|
|
324
|
-
* only be able to update the thumbs to values of 0, 0.5, 1.0, 1.5, 2.0
|
|
322
|
+
* slider range at an interval of the provided value. The user may
|
|
323
|
+
* only slide the thumbs to values at the provided interval.
|
|
324
|
+
* For example, if a value of `0.5` is set and the slider
|
|
325
|
+
* [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) is `0` and [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) is `2`, then the user will
|
|
326
|
+
* only be able to update the thumbs to values of 0, 0.5, 1.0, 1.5, and 2.0.
|
|
325
327
|
*
|
|
326
328
|
* @example
|
|
327
329
|
* ```html
|
|
328
|
-
* <!--
|
|
329
|
-
* <!-- slider thumb snaps at values of 0.5, 1.0, 1.5, etc. -->
|
|
330
|
+
* <!-- In this example, the thumb snaps to every value evenly divisible by 0.5 between 0 and 10. -->
|
|
330
331
|
* <arcgis-slider min="0" max="10" steps="0.5" values="5"></arcgis-slider>
|
|
331
332
|
* ```
|
|
332
333
|
* @example
|
|
333
334
|
* ```html
|
|
334
|
-
* <!--
|
|
335
|
-
* <arcgis-slider min="0" max="
|
|
335
|
+
* <!-- In this example, the thumb snaps to the specified values in the steps array (2, 4, 6, and 8). -->
|
|
336
|
+
* <arcgis-slider min="0" max="10" steps="2, 4, 6, 8" values="4"></arcgis-slider>
|
|
336
337
|
* ```
|
|
337
338
|
*/
|
|
338
339
|
accessor steps: number[] | number | undefined;
|
|
@@ -352,7 +353,7 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
352
353
|
* when the user clicks a thumb value label. This allows the user to move the slider
|
|
353
354
|
* thumb to precise values without sliding the thumbs.
|
|
354
355
|
*
|
|
355
|
-
* 
|
|
356
357
|
*
|
|
357
358
|
* @default false
|
|
358
359
|
*/
|
|
@@ -363,14 +364,18 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
363
364
|
* @default "start"
|
|
364
365
|
*/
|
|
365
366
|
accessor valueLabelsPlacement: "end" | "start";
|
|
366
|
-
/**
|
|
367
|
+
/**
|
|
368
|
+
* An array of numbers representing absolute thumb positions on the slider. This can be set as comma-separated
|
|
369
|
+
* numbers in the attribute (e.g., `<arcgis-slider values="10, 20, 30"></arcgis-slider>`) or programmatically as an
|
|
370
|
+
* array of numbers (e.g., `slider.values = [10, 20, 30]`).
|
|
371
|
+
*/
|
|
367
372
|
accessor values: number[];
|
|
368
373
|
/** Permanently destroys the component. */
|
|
369
374
|
destroy(): Promise<void>;
|
|
370
375
|
/**
|
|
371
|
-
* Fires when the [activeValue](
|
|
372
|
-
* This event does not fire when [values](
|
|
373
|
-
* [arcgisChange](
|
|
376
|
+
* Fires when the [activeValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#activeValue) changes as a thumb or the range gains or loses focus.
|
|
377
|
+
* This event does not fire when [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#values) change. Use [@arcgisInput](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#event-arcgisInput) for continuous updates or
|
|
378
|
+
* [@arcgisChange](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#event-arcgisChange) when the interaction is committed.
|
|
374
379
|
*
|
|
375
380
|
* @example
|
|
376
381
|
* ```js
|
|
@@ -396,13 +401,13 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
396
401
|
*
|
|
397
402
|
* renderActive();
|
|
398
403
|
* ```
|
|
399
|
-
* @see [activeValue](
|
|
404
|
+
* @see [activeValue](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#activeValue)
|
|
400
405
|
*/
|
|
401
406
|
readonly arcgisActiveValueChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
402
407
|
/**
|
|
403
|
-
* Fires when the thumb or range is released on the
|
|
408
|
+
* Fires when the thumb or range is released on the slider.
|
|
404
409
|
*
|
|
405
|
-
* Use [arcgisInput](
|
|
410
|
+
* Use [@arcgisInput](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#event-arcgisInput) for continuous updates during a drag.
|
|
406
411
|
*
|
|
407
412
|
* @example
|
|
408
413
|
* ```js
|
|
@@ -450,8 +455,8 @@ export abstract class ArcgisSlider extends LitElement {
|
|
|
450
455
|
*/
|
|
451
456
|
readonly arcgisInput: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
452
457
|
/**
|
|
453
|
-
* Fires when the slider's
|
|
454
|
-
* This occurs when the user edits the [min](
|
|
458
|
+
* Fires when the slider's range changes.
|
|
459
|
+
* This occurs when the user edits the [min](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#min) or [max](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider/#max) range labels (when enabled).
|
|
455
460
|
*
|
|
456
461
|
* @example
|
|
457
462
|
* ```js
|