@arcgis/portal-components 6.0.0-next.43 → 6.0.0-next.44
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/FFTXNKIV.js +2 -0
- package/dist/cdn/K3Z2K3M4.js +100 -0
- package/dist/cdn/LH47JYFW.js +2 -0
- package/dist/cdn/assets/portal-extent-picker/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/createPortalTool.js +32 -12
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +446 -403
- package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +38 -5
- package/dist/components/arcgis-portal-extent-picker/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-extent-picker/customElement.js +288 -236
- package/dist/components/arcgis-portal-extent-picker/index.js +3 -2
- package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +28 -27
- package/dist/components/arcgis-portal-navigation/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +69 -69
- package/dist/loader.js +1 -1
- package/package.json +8 -8
- package/dist/cdn/OXF2WDSW.js +0 -2
- package/dist/cdn/QKRLO5CJ.js +0 -2
- package/dist/cdn/SCIZKRKA.js +0 -93
|
@@ -2,10 +2,11 @@ import "@esri/calcite-components/components/calcite-dialog";
|
|
|
2
2
|
import "@esri/calcite-components/components/calcite-button";
|
|
3
3
|
import "@arcgis/map-components/components/arcgis-search";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-action";
|
|
5
|
-
import "@esri/calcite-components/components/calcite-
|
|
6
|
-
import "@esri/calcite-components/components/calcite-
|
|
5
|
+
import "@esri/calcite-components/components/calcite-block-group";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-block";
|
|
7
7
|
import "../arcgis-portal-extent-picker-coord-field/index.js";
|
|
8
8
|
import "@esri/calcite-components/components/calcite-loader";
|
|
9
9
|
import "@arcgis/map-components/components/arcgis-zoom";
|
|
10
10
|
import "@arcgis/map-components/components/arcgis-sketch";
|
|
11
|
+
import "@arcgis/map-components/components/arcgis-map";
|
|
11
12
|
export * from "./customElement.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import { c as n } from "../../chunks/runtime.js";
|
|
3
3
|
import { createRef as c, ref as d } from "lit/directives/ref.js";
|
|
4
|
-
import { LitElement as u, createEvent as
|
|
5
|
-
import { css as
|
|
4
|
+
import { LitElement as u, createEvent as h, nothing as s, safeClassMap as a } from "@arcgis/lumina";
|
|
5
|
+
import { css as p, html as o } from "lit";
|
|
6
6
|
import { useDirection as m } from "@arcgis/lumina/controllers";
|
|
7
|
-
const
|
|
8
|
-
class
|
|
7
|
+
const v = p`.coord-field{margin-bottom:var(--calcite-space-sm)}.coord-label{display:block;margin-bottom:var(--calcite-space-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-space-3xl);box-sizing:border-box;padding-inline:var(--calcite-space-md);font-size:14px;color:var(--calcite-color-text-3);outline-color:var(--calcite-color-brand)}.coordinate-input--error{border:1px solid var(--calcite-color-status-danger)}.coord-error-message{position:relative;max-width:100%;margin:var(--calcite-space-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-surface-2);border:1px solid var(--calcite-color-status-danger);box-shadow:0 1px 2px #00000054}.coord-error-message:before{pointer-events:none;content:"";position:absolute;left:11px;top:-16px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-status-danger)}.coord-error-message:after{position:absolute;pointer-events:none;content:"";left:11px;top:-15px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-surface-2)}.is-rtl .coord-error-message:before,.is-rtl .coord-error-message:after{left:initial;right:11px}.coord-error-message calcite-icon{color:var(--calcite-color-status-danger)}.coord-error-message__text{margin-left:var(--calcite-space-sm);margin-right:var(--calcite-space-sm);line-height:var(--calcite-space-xl)}`;
|
|
8
|
+
class g extends u {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this._direction = m(), this.inputEl = c(), this.isInvalid = !1, this.currentError = "", this.inputValue = "", this.label = "", this.value = "", this.errorMessage = "", this.min = -180, this.max = 180, this.validateRelated = () => !0, this.relatedErrorMessage = "", this.inputId = "", this.arcgisCoordChange =
|
|
10
|
+
super(...arguments), this._direction = m(), this.inputEl = c(), this.isInvalid = !1, this.currentError = "", this.inputValue = "", this.label = "", this.value = "", this.errorMessage = "", this.min = -180, this.max = 180, this.validateRelated = () => !0, this.relatedErrorMessage = "", this.inputId = "", this.isReverting = !1, this.arcgisCoordChange = h();
|
|
11
11
|
}
|
|
12
12
|
static {
|
|
13
|
-
this.properties = { isInvalid: 16, currentError: 16, inputValue: 16, label: 1, value: 1, errorMessage: 1, min: 9, max: 9, validateRelated: 0, relatedErrorMessage: 1, inputId: 1 };
|
|
13
|
+
this.properties = { isInvalid: 16, currentError: 16, inputValue: 16, label: 1, value: 1, errorMessage: 1, min: 9, max: 9, validateRelated: 0, relatedErrorMessage: 1, inputId: 1, isReverting: 5 };
|
|
14
14
|
}
|
|
15
15
|
static {
|
|
16
|
-
this.styles =
|
|
16
|
+
this.styles = v;
|
|
17
17
|
}
|
|
18
18
|
checkRelatedField() {
|
|
19
19
|
return !this.inputValue || !this.isInvalid || !this.validate(this.inputValue) ? "" : this.inputValue;
|
|
@@ -24,35 +24,36 @@ class v extends u {
|
|
|
24
24
|
setFocus() {
|
|
25
25
|
this.inputEl.value?.focus();
|
|
26
26
|
}
|
|
27
|
-
willUpdate(
|
|
28
|
-
|
|
27
|
+
willUpdate(e) {
|
|
28
|
+
e.has("value") && (this.validate(this.value), this.isReverting || (this.inputValue = this.value));
|
|
29
29
|
}
|
|
30
|
-
isValidCoord(
|
|
31
|
-
if (!
|
|
30
|
+
isValidCoord(e, t, i) {
|
|
31
|
+
if (!e?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))
|
|
32
32
|
return !1;
|
|
33
|
-
const
|
|
34
|
-
return
|
|
33
|
+
const r = this.parseNumber(e);
|
|
34
|
+
return r >= t && r <= i;
|
|
35
35
|
}
|
|
36
|
-
validate(
|
|
37
|
-
if (this.isInvalid = !this.isValidCoord(
|
|
36
|
+
validate(e) {
|
|
37
|
+
if (this.isInvalid = !this.isValidCoord(e, this.min, this.max), this.isInvalid)
|
|
38
38
|
return this.currentError = this.errorMessage, !1;
|
|
39
|
-
const
|
|
40
|
-
return this.isInvalid = !this.validateRelated(
|
|
39
|
+
const t = this.parseNumber(e);
|
|
40
|
+
return this.isInvalid = !this.validateRelated(t), this.isInvalid ? (this.currentError = this.relatedErrorMessage, !1) : !0;
|
|
41
41
|
}
|
|
42
|
-
parseNumber(
|
|
43
|
-
const
|
|
44
|
-
let i =
|
|
45
|
-
return i = Array.from(i).filter((
|
|
42
|
+
parseNumber(e) {
|
|
43
|
+
const t = `-${Array.from({ length: 10 }, (r, l) => l.toString()).join("")}`;
|
|
44
|
+
let i = e.replace(",", ".");
|
|
45
|
+
return i = Array.from(i).filter((r) => t.includes(r) || r === ".").join(""), parseFloat(i);
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
|
|
48
|
+
const e = this.isReverting ? this.inputValue : this.value;
|
|
49
|
+
return o`<div class=${a({ "coord-field": !0, "is-rtl": this._direction === "rtl" })}><label class="coord-label" for=${this.inputId ?? s}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId ?? s} class=${a({
|
|
49
50
|
"coordinate-input": !0
|
|
50
|
-
})} .value=${`${this.parseNumber(
|
|
51
|
-
this.inputValue =
|
|
52
|
-
}} .status=${this.isInvalid ? "invalid" : "valid"} ${d(this.inputEl)}></calcite-input-number>${this.isInvalid && o`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>` || ""}</div>`;
|
|
51
|
+
})} .value=${`${this.parseNumber(e)}`} @calciteInputNumberChange=${(t) => {
|
|
52
|
+
this.inputValue = t.target.value, this.validate(this.inputValue) && this.arcgisCoordChange.emit(this.inputValue);
|
|
53
|
+
}} .status=${this.isInvalid && !this.isReverting ? "invalid" : "valid"} ${d(this.inputEl)}></calcite-input-number>${this.isInvalid && !this.isReverting && o`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>` || ""}</div>`;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
n("arcgis-portal-extent-picker-coord-field",
|
|
56
|
+
n("arcgis-portal-extent-picker-coord-field", g);
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
g as ArcgisPortalExtentPickerCoordField
|
|
58
59
|
};
|
|
@@ -2,13 +2,13 @@ import "@esri/calcite-components/components/calcite-chip";
|
|
|
2
2
|
import "@esri/calcite-components/components/calcite-tooltip";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
4
4
|
import "@esri/calcite-components/components/calcite-action";
|
|
5
|
-
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
6
5
|
import "@esri/calcite-components/components/calcite-icon";
|
|
7
6
|
import "@esri/calcite-components/components/calcite-popover";
|
|
8
7
|
import "@esri/calcite-components/components/calcite-list";
|
|
9
8
|
import "../arcgis-portal-item-type/index.js";
|
|
10
9
|
import "@esri/calcite-components/components/calcite-loader";
|
|
11
10
|
import "@esri/calcite-components/components/calcite-button";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
12
12
|
import "@esri/calcite-components/components/calcite-input";
|
|
13
13
|
import "@esri/calcite-components/components/calcite-dropdown";
|
|
14
14
|
import "../arcgis-portal-user-avatar/index.js";
|