@arcgis/common-components 5.1.0-next.67 → 5.1.0-next.69
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/dist/cdn/2KFZW4EW.js +2 -0
- package/dist/cdn/5KT42AWR.js +2 -0
- package/dist/cdn/{AQWVYBZF.js → 6TGOOBJD.js} +1 -1
- package/dist/cdn/{ALWVIWUC.js → BHPGI62V.js} +1 -1
- package/dist/cdn/{N4R5SMWN.js → C2F4DDGS.js} +1 -1
- package/dist/cdn/{3B5FXQSX.js → FW4U3Z6R.js} +1 -1
- package/dist/cdn/{7AMLQYVM.js → HVM3TDF3.js} +1 -1
- package/dist/cdn/{MPLWDVLG.js → HZGVP2AP.js} +1 -1
- package/dist/cdn/{IQXW4J56.js → IHNUOURR.js} +1 -1
- package/dist/cdn/{QH2547O7.js → J7KPCIGL.js} +1 -1
- package/dist/cdn/{7OF5SF2A.js → KNSXCHXU.js} +1 -1
- package/dist/cdn/{SF2NJOD3.js → KQGWJ6JT.js} +1 -1
- package/dist/cdn/{DX3WIISQ.js → NSF4UW6W.js} +1 -1
- package/dist/cdn/{YOEHJTF2.js → Q3ICSGFX.js} +1 -1
- package/dist/cdn/{NHRIURQU.js → QYCHZ4TZ.js} +1 -1
- package/dist/cdn/{E4EVLDYS.js → RUM55GN4.js} +1 -1
- package/dist/cdn/{ZCGHCFFN.js → TNIYIWBB.js} +1 -1
- package/dist/cdn/{IRXTWEQW.js → V5BLUHTV.js} +1 -1
- package/dist/cdn/{7JIHCVH3.js → WKRHTPC5.js} +1 -1
- package/dist/cdn/{HEQCNDQR.js → YG2INAZ4.js} +1 -1
- package/dist/cdn/{QLSLMEU5.js → ZNUFIFOE.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/components/arcgis-ckeditor5/customElement.js +7 -7
- package/dist/components/arcgis-slider/customElement.d.ts +24 -17
- 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 +6 -4
- 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 +2 -0
- package/dist/types/lumina.d.ts +12 -0
- package/dist/types/preact.d.ts +14 -0
- package/dist/types/react.d.ts +16 -0
- package/dist/types/stencil.d.ts +12 -0
- package/dist/utils/spatial-references.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { NestedObject } from "../../utils/spatial-references.js";
|
|
4
|
+
|
|
5
|
+
/** @internal */
|
|
6
|
+
export abstract class ArcgisSpatialReferencePickerTree extends LitElement {
|
|
7
|
+
/**
|
|
8
|
+
* The data to display in the tree. Supports nested data.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* data = {
|
|
12
|
+
* "parent item": {
|
|
13
|
+
* "child item": "child item value",
|
|
14
|
+
* "sub-parent child item": {
|
|
15
|
+
* "child item of nested parent key": "child item of nested parent value"
|
|
16
|
+
* },
|
|
17
|
+
* "child item 2 key": "child item 2 value"
|
|
18
|
+
* },
|
|
19
|
+
* "item 2": "item 2 value",
|
|
20
|
+
* ...
|
|
21
|
+
* };
|
|
22
|
+
* Keys of parent items are displayed as the item's label.
|
|
23
|
+
* Values of elements without children are displayed as the item's label.
|
|
24
|
+
* In this case, "sub-parent child item" is displayed as the label for that item and
|
|
25
|
+
* "child item of nested parent value" is displayed as the label for it's child.
|
|
26
|
+
*/
|
|
27
|
+
accessor data: NestedObject;
|
|
28
|
+
/** The key of the selected item. (Wkid when used as spatial reference selection) */
|
|
29
|
+
accessor value: string | undefined;
|
|
30
|
+
/** Emitted when the selected value of the tree changes. */
|
|
31
|
+
readonly arcgisChange: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
32
|
+
readonly "@eventTypes": {
|
|
33
|
+
arcgisChange: ArcgisSpatialReferencePickerTree["arcgisChange"]["detail"];
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { c as h } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as n } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as d, createEvent as l, nothing as p } from "@arcgis/lumina";
|
|
5
|
+
import { css as m, html as a } from "lit";
|
|
6
|
+
const u = m`:host{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth;height:100%;width:100%}`;
|
|
7
|
+
class v extends d {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.treeItemsOpen = /* @__PURE__ */ new Set(), this.handleMutations = (e) => {
|
|
10
|
+
e.forEach((s) => {
|
|
11
|
+
if (s.type === "attributes" && s.attributeName === "expanded") {
|
|
12
|
+
const t = s.target;
|
|
13
|
+
"key" in t.dataset && t.dataset.key !== void 0 && this.treeItemsOpen.has(t.dataset.key) !== t.expanded && this.toggleTreeItem(t.dataset.key);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}, this.renderedTree = [], this.data = {}, this.arcgisChange = l();
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
this.properties = { renderedTree: 16, data: 0, value: 1 };
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.styles = u;
|
|
23
|
+
}
|
|
24
|
+
load() {
|
|
25
|
+
this.setupComponent();
|
|
26
|
+
}
|
|
27
|
+
willUpdate(e) {
|
|
28
|
+
e.has("data") && (this.hasUpdated || Object.keys(this.data ?? {}).length > 0) && this.setupComponent();
|
|
29
|
+
}
|
|
30
|
+
loaded() {
|
|
31
|
+
this.manager.onLifecycle(() => {
|
|
32
|
+
this.observer = new MutationObserver(this.handleMutations);
|
|
33
|
+
const e = this.el.shadowRoot ?? this.el;
|
|
34
|
+
return this.observer.observe(e, {
|
|
35
|
+
attributes: !0,
|
|
36
|
+
subtree: !0,
|
|
37
|
+
attributeFilter: ["expanded"]
|
|
38
|
+
}), () => {
|
|
39
|
+
this.observer?.disconnect(), this.observer = void 0;
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
setupComponent() {
|
|
44
|
+
this.treeItemsOpen.clear(), this.buildJSXTree();
|
|
45
|
+
}
|
|
46
|
+
buildJSXTree() {
|
|
47
|
+
const e = (s) => {
|
|
48
|
+
const t = [];
|
|
49
|
+
for (const r of Object.keys(s)) {
|
|
50
|
+
const i = s[r];
|
|
51
|
+
let o;
|
|
52
|
+
typeof i == "object" && (o = this.treeItemsOpen.has(r) ? e(i) : []);
|
|
53
|
+
const c = typeof i == "object" ? r : i;
|
|
54
|
+
t.push(this.createTreeItem(r, c, o));
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
58
|
+
this.renderedTree = e(this.data);
|
|
59
|
+
}
|
|
60
|
+
toggleTreeItem(e) {
|
|
61
|
+
this.treeItemsOpen.has(e) ? this.treeItemsOpen.delete(e) : this.treeItemsOpen.add(e), this.buildJSXTree();
|
|
62
|
+
}
|
|
63
|
+
createTreeItem(e, s, t) {
|
|
64
|
+
return a`<calcite-tree-item data-key=${e ?? p} .selected=${this.value === e} .expanded=${this.treeItemsOpen.has(e)}>${s}${t !== void 0 && n(`${e}-child-tree`, a`<calcite-tree slot=children>${t}</calcite-tree>`) || ""}</calcite-tree-item>`;
|
|
65
|
+
}
|
|
66
|
+
handleTreeSelect(e) {
|
|
67
|
+
const t = e.currentTarget?.selectedItems[0]?.dataset.key;
|
|
68
|
+
t !== void 0 && (this.value = t, this.arcgisChange.emit());
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
return n("base-tree", a`<calcite-tree scale=s @calciteTreeSelect=${this.handleTreeSelect}>${this.renderedTree}</calcite-tree>`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
h("arcgis-spatial-reference-picker-tree", v);
|
|
75
|
+
export {
|
|
76
|
+
v as ArcgisSpatialReferencePickerTree
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -17,7 +17,7 @@ import type { Layout, TickMode, TickValues } from "./types.js";
|
|
|
17
17
|
* @cssproperty [--arcgis-ticks-gap] - Specifies the gap between the ticks and labels.
|
|
18
18
|
* @since 5.0
|
|
19
19
|
* @example
|
|
20
|
-
* The following example creates a vertical slider
|
|
20
|
+
* The following example creates a vertical slider with ticks.
|
|
21
21
|
* The ticks are positioned at the end of the slider and displayed every 10 units from 0 to 100.
|
|
22
22
|
* ```html
|
|
23
23
|
* <arcgis-slider id="sliderComponent" min="0" max="100" show-range-labels values="50" layout="vertical">
|
|
@@ -119,8 +119,8 @@ export abstract class ArcgisTicks extends LitElement {
|
|
|
119
119
|
* </arcgis-slider>
|
|
120
120
|
* ```
|
|
121
121
|
* @example
|
|
122
|
-
* In count mode, values specifies the number of ticks to render (not a list of tick values).
|
|
123
|
-
* For example, use `11` ticks to show 0–100 in
|
|
122
|
+
* In count mode, the [values](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#values) property specifies the number of ticks to render (not a list of tick values).
|
|
123
|
+
* For example, use `11` ticks to show 0–100 in intervals of 10 (0, 10, 20, ..., 100).
|
|
124
124
|
* ```html
|
|
125
125
|
* <!-- 11 ticks from 0 to 100 -->
|
|
126
126
|
* <arcgis-slider min="0" max="100" show-range-labels values="20, 50">
|
|
@@ -164,7 +164,9 @@ export abstract class ArcgisTicks extends LitElement {
|
|
|
164
164
|
*/
|
|
165
165
|
accessor showLabels: boolean;
|
|
166
166
|
/**
|
|
167
|
-
* Indicates where ticks
|
|
167
|
+
* Indicates where ticks are rendered along the component. This can be set as comma-separated
|
|
168
|
+
* numbers in the attribute (e.g., `<arcgis-ticks values="10, 20, 30"></arcgis-ticks>`) or programmatically as
|
|
169
|
+
* either a single number or an array of numbers (e.g., `ticks.values = 10`, `ticks.values = [10, 20, 30]`).
|
|
168
170
|
* See the description for [mode](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#mode) for more information about how this property is interpreted by each mode.
|
|
169
171
|
*
|
|
170
172
|
* @see [mode](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/#mode)
|