@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.
@@ -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-accordion";
6
- import "@esri/calcite-components/components/calcite-accordion-item";
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 p, nothing as a, safeClassMap as s } from "@arcgis/lumina";
5
- import { css as h, html as o } from "lit";
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 g = h`.coord-field{margin-bottom:var(--calcite-spacing-sm)}.coord-label{display:block;margin-bottom:var(--calcite-spacing-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-spacing-xxxl);box-sizing:border-box;padding-inline:var(--calcite-spacing-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-spacing-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-foreground-1);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-foreground-1)}.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-spacing-sm);margin-right:var(--calcite-spacing-sm);line-height:var(--calcite-spacing-xl)}`;
8
- class v extends u {
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 = p();
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 = g;
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(r) {
28
- r.has("value") && this.validate(this.value);
27
+ willUpdate(e) {
28
+ e.has("value") && (this.validate(this.value), this.isReverting || (this.inputValue = this.value));
29
29
  }
30
- isValidCoord(r, e, i) {
31
- if (!r?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))
30
+ isValidCoord(e, t, i) {
31
+ if (!e?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))
32
32
  return !1;
33
- const t = this.parseNumber(r);
34
- return t >= e && t <= i;
33
+ const r = this.parseNumber(e);
34
+ return r >= t && r <= i;
35
35
  }
36
- validate(r) {
37
- if (this.isInvalid = !this.isValidCoord(r, this.min, this.max), this.isInvalid)
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 e = this.parseNumber(r);
40
- return this.isInvalid = !this.validateRelated(e), this.isInvalid ? (this.currentError = this.relatedErrorMessage, !1) : !0;
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(r) {
43
- const e = `-${Array.from({ length: 10 }, (t, l) => l.toString()).join("")}`;
44
- let i = r.replace(",", ".");
45
- return i = Array.from(i).filter((t) => e.includes(t) || t === ".").join(""), parseFloat(i);
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
- return o`<div class=${s({ "coord-field": !0, "is-rtl": this._direction === "rtl" })}><label class="coord-label" for=${this.inputId ?? a}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId ?? a} class=${s({
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(this.value)}`} @calciteInputNumberChange=${(r) => {
51
- this.inputValue = r.target.value, this.validate(this.inputValue) && this.arcgisCoordChange.emit(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", v);
56
+ n("arcgis-portal-extent-picker-coord-field", g);
56
57
  export {
57
- v as ArcgisPortalExtentPickerCoordField
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";