@arcgis/common-components 6.0.0-next.4 → 6.0.0-next.41
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/{B33S3YBM.js → 24FE5GMT.js} +1 -1
- package/dist/cdn/2XTXXTEZ.js +2 -0
- package/dist/cdn/3QTMLOOM.js +2 -0
- package/dist/cdn/4X2SOHYB.js +2 -0
- package/dist/cdn/{OTWADB4M.js → 4ZVHN3V7.js} +1 -1
- package/dist/cdn/55VDXBLV.js +2 -0
- package/dist/cdn/5YQK5TCH.js +2 -0
- package/dist/cdn/{EB5MDEWF.js → 7S4ZZPSA.js} +1 -1
- package/dist/cdn/7VGSZDT7.js +2 -0
- package/dist/cdn/ABDFJWQO.js +2 -0
- package/dist/cdn/BAMK6STW.js +2 -0
- package/dist/cdn/CC74AHNF.js +2 -0
- package/dist/cdn/CCJ7MF3B.js +2 -0
- package/dist/cdn/{TO3YFXVJ.js → EYOJNGUG.js} +1 -1
- package/dist/cdn/{MFGUTQRR.js → F5IBLVYU.js} +1 -1
- package/dist/cdn/HMGFS4YI.js +2 -0
- package/dist/cdn/HYR5WUUX.js +2 -0
- package/dist/cdn/JAMYEW7N.js +2 -0
- package/dist/cdn/JCWKK6FB.js +2 -0
- package/dist/cdn/LIFJOO55.js +2 -0
- package/dist/cdn/{LNXO5YIS.js → LPKRIISW.js} +1 -1
- package/dist/cdn/LRP7XW5X.js +2 -0
- package/dist/cdn/{KDCSDIUQ.js → LZPZYGFW.js} +1 -1
- package/dist/cdn/{JTQN5KMG.js → MWQVR7SB.js} +1 -1
- package/dist/cdn/N5YNSPMD.js +2 -0
- package/dist/cdn/NEJQBOXB.js +8207 -0
- package/dist/cdn/NSTQTWS5.js +2 -0
- package/dist/cdn/ONYZMGVN.js +2 -0
- package/dist/cdn/OQRMI3K5.js +2 -0
- package/dist/cdn/{34AP2EEB.js → OVW45JGX.js} +1 -1
- package/dist/cdn/Q73UFMJY.js +4 -0
- package/dist/cdn/{BZFAYVKR.js → RBTFN5SR.js} +1 -1
- package/dist/cdn/RU4PILTH.js +2 -0
- package/dist/cdn/RU722XDV.js +2 -0
- package/dist/cdn/S2EORL4N.js +2 -0
- package/dist/cdn/S3GK6UB7.js +2 -0
- package/dist/cdn/T7LZIFNY.js +2 -0
- package/dist/cdn/TZBDDGN3.js +2 -0
- package/dist/cdn/UOXUUCE7.js +3 -0
- package/dist/cdn/VLVINHT3.js +2 -0
- package/dist/cdn/WDQV5Y4K.js +2 -0
- package/dist/cdn/{OMROUY3L.js → X44CHGA6.js} +1 -1
- package/dist/cdn/XMMFL5H3.js +2 -0
- package/dist/cdn/{IECXEZNI.js → Y72KV72H.js} +1 -1
- package/dist/cdn/{D4UHHQ35.js → YOPZGJMF.js} +1 -1
- package/dist/cdn/ZJMMAZFG.js +2 -0
- package/dist/cdn/assets/layer-replace/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/sharedCacheDirective.js +74 -0
- package/dist/chunks/utils.js +75 -37
- package/dist/chunks/utils2.js +9 -14
- package/dist/chunks/well-known-sizes-controller.js +42 -0
- package/dist/components/arcgis-ckeditor5/customElement.d.ts +0 -9
- package/dist/components/arcgis-ckeditor5/customElement.js +1336 -1339
- package/dist/components/arcgis-ckeditor5-popover/customElement.d.ts +0 -6
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +14 -17
- package/dist/components/arcgis-color-input/customElement.d.ts +0 -20
- package/dist/components/arcgis-color-input/customElement.js +33 -33
- package/dist/components/arcgis-color-input/index.js +2 -1
- package/dist/components/arcgis-field-info/customElement.d.ts +0 -3
- package/dist/components/arcgis-field-info/customElement.js +41 -41
- package/dist/components/arcgis-field-pick-list/customElement.d.ts +0 -28
- package/dist/components/arcgis-field-pick-list/customElement.js +114 -127
- package/dist/components/arcgis-field-pick-list/index.js +1 -1
- package/dist/components/arcgis-html-content/customElement.d.ts +42 -0
- package/dist/components/arcgis-html-content/customElement.js +71 -0
- package/dist/components/arcgis-html-content/index.d.ts +1 -0
- package/dist/components/arcgis-html-content/index.js +1 -0
- package/dist/components/arcgis-label-input/customElement.js +1 -1
- package/dist/components/arcgis-layer-replace/customElement.d.ts +437 -0
- package/dist/components/arcgis-layer-replace/customElement.js +376 -0
- package/dist/components/arcgis-layer-replace/index.d.ts +1 -0
- package/dist/components/arcgis-layer-replace/index.js +7 -0
- package/dist/components/arcgis-slider/customElement.js +546 -451
- package/dist/components/arcgis-slider-field/customElement.d.ts +43 -41
- package/dist/components/arcgis-slider-field/customElement.js +45 -39
- package/dist/components/arcgis-slider-histogram-range/customElement.d.ts +21 -19
- package/dist/components/arcgis-slider-histogram-range/customElement.js +28 -22
- package/dist/components/arcgis-slider-input/customElement.d.ts +0 -3
- package/dist/components/arcgis-slider-input/customElement.js +13 -13
- package/dist/components/arcgis-ticks/customElement.js +8 -8
- package/dist/components/arcgis-toolbar/customElement.d.ts +25 -2
- package/dist/components/arcgis-toolbar/customElement.js +55 -46
- package/dist/components/arcgis-toolbar/types.d.ts +21 -1
- package/dist/components/arcgis-toolbar-action/customElement.js +17 -18
- package/dist/components/arcgis-toolbar-group/customElement.js +20 -17
- package/dist/components/arcgis-toolbar-item/customElement.d.ts +2 -2
- package/dist/components/arcgis-toolbar-item/customElement.js +14 -14
- package/dist/components/arcgis-toolbar-more-button/customElement.js +28 -26
- package/dist/components/arcgis-toolbar-split-button/customElement.js +34 -34
- package/dist/components/arcgis-toolbar-stack/customElement.d.ts +9 -2
- package/dist/components/arcgis-toolbar-stack/customElement.js +63 -125
- package/dist/components/arcgis-unique-values-list/customElement.js +11 -11
- package/dist/components/arcgis-unique-values-list/index.js +1 -1
- package/dist/components/arcgis-value-picker/customElement.js +22 -26
- package/dist/components/arcgis-value-picker-combobox/customElement.js +4 -4
- package/dist/components/arcgis-value-picker-label/customElement.js +5 -5
- package/dist/components/arcgis-value-picker-slider/customElement.d.ts +12 -19
- package/dist/components/arcgis-value-picker-slider/customElement.js +17 -17
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.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 +15 -20
- package/dist/index.js +8 -5
- package/dist/loader.js +10 -8
- package/dist/types/lumina.d.ts +17 -19
- package/dist/types/preact.d.ts +19 -19
- package/dist/types/react.d.ts +21 -19
- package/dist/types/stencil.d.ts +17 -19
- package/dist/utils/sharedCacheDirective.d.ts +68 -0
- package/dist/utils/types.d.ts +0 -12
- package/package.json +7 -7
- package/dist/cdn/32MHBJSZ.js +0 -2
- package/dist/cdn/3AFEXHZ5.js +0 -2
- package/dist/cdn/5EA7SGHX.js +0 -2
- package/dist/cdn/5XRYXPOX.js +0 -2
- package/dist/cdn/735FTIBP.js +0 -2
- package/dist/cdn/ATLXGXTH.js +0 -2
- package/dist/cdn/BCN6LPOG.js +0 -4
- package/dist/cdn/CKGWDI7B.js +0 -2
- package/dist/cdn/DPJGC3YQ.js +0 -2
- package/dist/cdn/DR2THZQU.js +0 -8208
- package/dist/cdn/EM4OQXFS.js +0 -2
- package/dist/cdn/GDRW3MIZ.js +0 -2
- package/dist/cdn/HJ3EJZFF.js +0 -2
- package/dist/cdn/HYFFUYAU.js +0 -2
- package/dist/cdn/LLATF73T.js +0 -2
- package/dist/cdn/M2J3GPM4.js +0 -2
- package/dist/cdn/M3SFEFPX.js +0 -2
- package/dist/cdn/OIGA7XBZ.js +0 -2
- package/dist/cdn/QCUF7B3I.js +0 -2
- package/dist/cdn/S4XOD4YS.js +0 -2
- package/dist/cdn/TXQKK4DJ.js +0 -2
- package/dist/cdn/UIBTY5FF.js +0 -2
- package/dist/cdn/X6DNIKWY.js +0 -2
- package/dist/cdn/XUPA27AW.js +0 -2
- package/dist/cdn/XX2ZCFWI.js +0 -2
- package/dist/cdn/YEFEVEP6.js +0 -2
- package/dist/cdn/ZCVP2N2O.js +0 -2
- package/dist/cdn/ZGYD3GAS.js +0 -2
- package/dist/chunks/toolbar.js +0 -9
|
@@ -73,13 +73,6 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
73
73
|
accessor filterNoResultsText: string | undefined;
|
|
74
74
|
/** Filter placeholder text. */
|
|
75
75
|
accessor filterPlaceholderText: string | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* @deprecated
|
|
78
|
-
* Pass in grouped lists of fields instead. Removal target v6.0.0.
|
|
79
|
-
* If true, fields and expressions are placed in separate groups.
|
|
80
|
-
* @default false
|
|
81
|
-
*/
|
|
82
|
-
accessor groupFieldsAndExpressions: boolean | undefined;
|
|
83
76
|
/** Heading text. Valid only if listOnly is not set to true. */
|
|
84
77
|
accessor heading: string | undefined;
|
|
85
78
|
/**
|
|
@@ -102,8 +95,6 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
102
95
|
* @default false
|
|
103
96
|
*/
|
|
104
97
|
accessor listOnly: boolean;
|
|
105
|
-
/** @deprecated use view instead. Removal target v6.0.0. */
|
|
106
|
-
accessor mapView: View | undefined;
|
|
107
98
|
/**
|
|
108
99
|
* If true, allows for multiple selection. If false, the
|
|
109
100
|
* popover will close once an item has been selected.
|
|
@@ -117,11 +108,6 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
117
108
|
accessor popoverProps: PopoverProps | undefined;
|
|
118
109
|
/** The initially selected fields. Will use selectedFields[0] when multiple is set to false. */
|
|
119
110
|
accessor selectedFields: string[];
|
|
120
|
-
/**
|
|
121
|
-
* @deprecated use hideCancel instead. Removal target v6.0.0.
|
|
122
|
-
* @default true
|
|
123
|
-
*/
|
|
124
|
-
accessor showCancel: boolean;
|
|
125
111
|
/**
|
|
126
112
|
* If true, displays description. By default only displays field alias.
|
|
127
113
|
*
|
|
@@ -159,11 +145,6 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
159
145
|
* @default false
|
|
160
146
|
*/
|
|
161
147
|
accessor showSelectionAll: boolean;
|
|
162
|
-
/**
|
|
163
|
-
* @deprecated use hideSort instead. Removal target v6.0.0.
|
|
164
|
-
* @default true
|
|
165
|
-
*/
|
|
166
|
-
accessor showSort: boolean;
|
|
167
148
|
/**
|
|
168
149
|
* The initial sort order. Sort order applies directly to any sub-fields.
|
|
169
150
|
*
|
|
@@ -190,12 +171,6 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
190
171
|
readonly arcgisDeleteField: import("@arcgis/lumina").TargetedEvent<this, { fieldName: string; }>;
|
|
191
172
|
/** Emitted when the edit icon of a field has been clicked. The field must have PickListFieldInfo.showEditAction set to true. */
|
|
192
173
|
readonly arcgisEditField: import("@arcgis/lumina").TargetedEvent<this, { fieldName: string; }>;
|
|
193
|
-
/** @deprecated use arcgisChange instead. Removal target v6.0.0. */
|
|
194
|
-
readonly arcgisFieldPickListChange: import("@arcgis/lumina").TargetedEvent<this, { selectedFields: string[]; }>;
|
|
195
|
-
/** @deprecated use arcgisClose instead. Removal target v6.0.0. */
|
|
196
|
-
readonly arcgisFieldPickListDismissed: import("@arcgis/lumina").TargetedEvent<this, { selectedFields: string[]; } | void>;
|
|
197
|
-
/** @deprecated use arcgisSortByChange instead. Removal target v6.0.0. */
|
|
198
|
-
readonly arcgisFieldPickListSortByChange: import("@arcgis/lumina").TargetedEvent<this, LastSortBy>;
|
|
199
174
|
/** Emitted when the field pick list sort order has changed. */
|
|
200
175
|
readonly arcgisSortByChange: import("@arcgis/lumina").TargetedEvent<this, LastSortBy>;
|
|
201
176
|
readonly "@eventTypes": {
|
|
@@ -203,9 +178,6 @@ export abstract class ArcgisFieldPickList extends LitElement {
|
|
|
203
178
|
arcgisClose: ArcgisFieldPickList["arcgisClose"]["detail"];
|
|
204
179
|
arcgisDeleteField: ArcgisFieldPickList["arcgisDeleteField"]["detail"];
|
|
205
180
|
arcgisEditField: ArcgisFieldPickList["arcgisEditField"]["detail"];
|
|
206
|
-
arcgisFieldPickListChange: ArcgisFieldPickList["arcgisFieldPickListChange"]["detail"];
|
|
207
|
-
arcgisFieldPickListDismissed: ArcgisFieldPickList["arcgisFieldPickListDismissed"]["detail"];
|
|
208
|
-
arcgisFieldPickListSortByChange: ArcgisFieldPickList["arcgisFieldPickListSortByChange"]["detail"];
|
|
209
181
|
arcgisSortByChange: ArcgisFieldPickList["arcgisSortByChange"]["detail"];
|
|
210
182
|
};
|
|
211
183
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as I } from "../../chunks/runtime.js";
|
|
3
3
|
import { keyed as v } from "lit/directives/keyed.js";
|
|
4
4
|
import { repeat as y } from "lit/directives/repeat.js";
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { createRef as
|
|
7
|
-
import { html as
|
|
5
|
+
import { LitElement as C, createEvent as f, renderElement as S, nothing as p, safeStyleMap as $, safeClassMap as b } from "@arcgis/lumina";
|
|
6
|
+
import { createRef as h, ref as d } from "lit/directives/ref.js";
|
|
7
|
+
import { html as o, css as x } from "lit";
|
|
8
8
|
import { Task as T } from "@lit/task";
|
|
9
|
-
import { log as w, composeMissingPropertyMessage as
|
|
10
|
-
import { F as
|
|
11
|
-
import { i as
|
|
12
|
-
import { u as
|
|
9
|
+
import { log as w, composeMissingPropertyMessage as B } from "@arcgis/toolkit/log";
|
|
10
|
+
import { F as L } from "../../chunks/internal-types.js";
|
|
11
|
+
import { i as E } from "../../chunks/general.js";
|
|
12
|
+
import { u as k } from "../../chunks/useT9n.js";
|
|
13
13
|
const r = /* @__PURE__ */ new Map();
|
|
14
14
|
r.set("oid", "key");
|
|
15
15
|
r.set("guid", "key");
|
|
@@ -27,57 +27,57 @@ r.set("date-only", "calendar");
|
|
|
27
27
|
r.set("time-only", "clock");
|
|
28
28
|
r.set("timestamp-offset", "time-zone");
|
|
29
29
|
r.set("string", "string");
|
|
30
|
-
const N = ({ fieldType:
|
|
31
|
-
function
|
|
32
|
-
return !!
|
|
30
|
+
const N = ({ fieldType: n }) => o`<calcite-icon scale=s .icon=${r.get(n)}></calcite-icon>`;
|
|
31
|
+
function _(n) {
|
|
32
|
+
return !!n.length && "fields" in n[0];
|
|
33
33
|
}
|
|
34
|
-
function u(
|
|
35
|
-
return !!
|
|
34
|
+
function u(n) {
|
|
35
|
+
return !!n.length && "subFieldInfos" in n[0];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
37
|
+
function O(n) {
|
|
38
|
+
return n.filter((e) => u(e.fields));
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
40
|
+
function M(n) {
|
|
41
|
+
return n.flatMap((e) => e.fields);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function A(n) {
|
|
44
|
+
return n.flatMap((e) => u(e.fields) ? [] : e.fields);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function m(n) {
|
|
47
|
+
return n.flatMap(
|
|
48
48
|
(e) => u(e.fields) ? e.fields.flatMap((t) => t.subFieldInfos) : e.fields
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
53
|
-
(
|
|
54
|
-
) : t.fields.filter((
|
|
51
|
+
function H(n, e) {
|
|
52
|
+
return n.flatMap((t) => u(t.fields) ? t.fields.flatMap(
|
|
53
|
+
(s) => s.subFieldInfos.filter((i) => g(i, e, !0))
|
|
54
|
+
) : t.fields.filter((s) => F(s, e)));
|
|
55
55
|
}
|
|
56
|
-
function F(
|
|
57
|
-
return e ? "subFieldInfos" in
|
|
56
|
+
function F(n, e) {
|
|
57
|
+
return e ? "subFieldInfos" in n ? g(n, e) || n.subFieldInfos.some((t) => g(t, e, !0)) : g(n, e) : !0;
|
|
58
58
|
}
|
|
59
|
-
function g(
|
|
60
|
-
return [t ?
|
|
61
|
-
(
|
|
59
|
+
function g(n, e, t = !1) {
|
|
60
|
+
return [t ? n.name.split("/").pop() : n.name, n.alias, n.description].some(
|
|
61
|
+
(i) => i?.toLocaleLowerCase().includes(e.toLocaleLowerCase())
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
class
|
|
64
|
+
const D = x`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`;
|
|
65
|
+
class P extends C {
|
|
66
66
|
constructor() {
|
|
67
|
-
super(...arguments), this._messages =
|
|
67
|
+
super(...arguments), this._messages = k({ blocking: !0 }), this.popoverNode = h(), this.listWrapper = h(), this.listNode = h(), this.flowElement = h(), this.panelElement = h(), this.dropdownNode = h(), this.fieldInfoFlowItemEl = h(), this.allLists = [], this.filterText = "", this.panelCutOffHeight = 0, this.initialized = !1, this._propWatcherTask = new T(this, {
|
|
68
68
|
task: async ([e]) => {
|
|
69
|
-
if (!this.listOnly && !
|
|
70
|
-
throw w("error", this,
|
|
69
|
+
if (!this.listOnly && !E(e?.refElement))
|
|
70
|
+
throw w("error", this, B("popoverProps")), new Error();
|
|
71
71
|
this._propWatcherTask.autoRun = !1;
|
|
72
72
|
},
|
|
73
73
|
args: () => [this.popoverProps]
|
|
74
|
-
}), this.fields = [], this.selectedFields = [], this.listOnly = !1, this.showFieldInfo = !1, this.showFieldTypeIcon = !1, this.showFieldName = !1, this.showDescription = !1, this.showSelectionAll = !1, this.
|
|
74
|
+
}), this.fields = [], this.selectedFields = [], this.listOnly = !1, this.showFieldInfo = !1, this.showFieldTypeIcon = !1, this.showFieldName = !1, this.showDescription = !1, this.showSelectionAll = !1, this.hideCancel = !1, this.hideSort = !1, this.showFilterLength = 10, this.multiple = !1, this.sortBy = "default", this.arcgisChange = f(), this.arcgisClose = f(), this.arcgisDeleteField = f(), this.arcgisEditField = f(), this.arcgisSortByChange = f();
|
|
75
75
|
}
|
|
76
76
|
static {
|
|
77
|
-
this.properties = { lastSortBy: 16, filterFields: 16,
|
|
77
|
+
this.properties = { lastSortBy: 16, filterFields: 16, view: 0, layer: 0, fields: 0, selectedFields: 0, listOnly: 5, popoverProps: 0, showFieldInfo: 5, showFieldTypeIcon: 5, showFieldName: 5, showDescription: 5, showSelectionAll: 5, hideCancel: 5, hideSort: 5, showFilterLength: 9, multiple: 5, heading: 1, okBtnText: 1, filterPlaceholderText: 1, filterNoResultsText: 1, sortBy: 1, fieldsGroupHeading: 1, expressionsGroupHeading: 1, customExpressionCheck: 0 };
|
|
78
78
|
}
|
|
79
79
|
static {
|
|
80
|
-
this.styles =
|
|
80
|
+
this.styles = D;
|
|
81
81
|
}
|
|
82
82
|
async reposition() {
|
|
83
83
|
await this.popoverNode.value?.reposition();
|
|
@@ -91,7 +91,7 @@ class H extends I {
|
|
|
91
91
|
}), 1);
|
|
92
92
|
}
|
|
93
93
|
load() {
|
|
94
|
-
|
|
94
|
+
this.listOnly && this.showFieldInfo && (this.showFieldInfo = !1, w("info", this, "showFieldInfo is not supported if listOnly is true.")), !this.multiple && this.selectedFields.length > 1 && (this.selectedFields = [this.selectedFields[0]]), this.lastSortBy = this.sortBy ?? this.lastSortBy, this.updateGroupedLists(), this.initialized = !0;
|
|
95
95
|
}
|
|
96
96
|
willUpdate(e) {
|
|
97
97
|
this.initialized && (e.has("fields") || e.has("sortBy") || e.has("lastSortBy") || e.has("customExpressionCheck")) && (e.has("sortBy") && (this.lastSortBy = this.sortBy ?? this.lastSortBy), this.updateGroupedLists());
|
|
@@ -123,14 +123,14 @@ class H extends I {
|
|
|
123
123
|
}
|
|
124
124
|
getSortedList(e) {
|
|
125
125
|
let t = [...e];
|
|
126
|
-
const
|
|
127
|
-
return t = t.filter((
|
|
126
|
+
const s = t.filter((i) => i.type === "none");
|
|
127
|
+
return t = t.filter((i) => i.type !== "none"), this.lastSortBy === "display" ? t.sort((i, l) => i.alias.localeCompare(l.alias)) : this.lastSortBy === "field" ? t.sort((i, l) => i.name.localeCompare(l.name)) : this.lastSortBy === "type" && t.sort((i, l) => i.type.localeCompare(l.type)), t = t.concat(s), t;
|
|
128
128
|
}
|
|
129
129
|
isExpression(e) {
|
|
130
|
-
return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(
|
|
130
|
+
return this.customExpressionCheck ? this.customExpressionCheck(e) : e.name.includes(L.expression);
|
|
131
131
|
}
|
|
132
132
|
canDeselectAll() {
|
|
133
|
-
const e =
|
|
133
|
+
const e = m(this.allLists);
|
|
134
134
|
return this.filterFields?.length ? this.filterContainsAll() : this.selectedFields.length === e.length;
|
|
135
135
|
}
|
|
136
136
|
filterContainsAll() {
|
|
@@ -138,11 +138,11 @@ class H extends I {
|
|
|
138
138
|
}
|
|
139
139
|
showFieldInfoCheck(e) {
|
|
140
140
|
const { layer: t } = this;
|
|
141
|
-
return this.showFieldInfo ? !(!t || this.isExpression(e) || e.name.includes(
|
|
141
|
+
return this.showFieldInfo ? !(!t || this.isExpression(e) || e.name.includes(L.relationship) || e.type === "none") : !1;
|
|
142
142
|
}
|
|
143
143
|
updateGroupedLists() {
|
|
144
144
|
if (this.fields)
|
|
145
|
-
if (this.allLists = [],
|
|
145
|
+
if (this.allLists = [], _(this.fields))
|
|
146
146
|
for (const e of this.fields) {
|
|
147
147
|
if (this.listOnly && u(e.fields)) {
|
|
148
148
|
w("error", this, "subFieldInfos are not supported if listOnly is true.");
|
|
@@ -154,16 +154,7 @@ class H extends I {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
else
|
|
157
|
-
this.allLists =
|
|
158
|
-
{
|
|
159
|
-
title: this.expressionsGroupHeading,
|
|
160
|
-
fields: [...this.getSortedList(this.fields)].filter((e) => this.isExpression(e))
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
title: this.fieldsGroupHeading,
|
|
164
|
-
fields: [...this.getSortedList(this.fields)].filter((e) => !this.isExpression(e))
|
|
165
|
-
}
|
|
166
|
-
] : [
|
|
157
|
+
this.allLists = [
|
|
167
158
|
{
|
|
168
159
|
title: void 0,
|
|
169
160
|
fields: this.getSortedList(this.fields)
|
|
@@ -173,32 +164,32 @@ class H extends I {
|
|
|
173
164
|
getSortedGroupFields(e) {
|
|
174
165
|
return u(e) ? this.getSortedList(e).map((t) => ({
|
|
175
166
|
...t,
|
|
176
|
-
subFieldInfos: this.getSortedList(t.subFieldInfos).map((
|
|
177
|
-
...
|
|
167
|
+
subFieldInfos: this.getSortedList(t.subFieldInfos).map((s) => ({
|
|
168
|
+
...s,
|
|
178
169
|
// ensure uniqueness
|
|
179
|
-
name: `${t.name}/${
|
|
170
|
+
name: `${t.name}/${s.name}`
|
|
180
171
|
}))
|
|
181
172
|
})) : this.getSortedList(e);
|
|
182
173
|
}
|
|
183
174
|
addFieldInfoFlowItem(e, t) {
|
|
184
|
-
const
|
|
175
|
+
const s = this.flowElement.value, i = S(o`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.name} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(l) => {
|
|
185
176
|
l.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
|
|
186
177
|
t.setFocus();
|
|
187
178
|
}, 300);
|
|
188
|
-
}} ${d(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ??
|
|
189
|
-
|
|
179
|
+
}} ${d(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang ?? p} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);
|
|
180
|
+
s.appendChild(i), this.panelElement.value.selected = !1, setTimeout(() => {
|
|
190
181
|
this.fieldInfoFlowItemEl?.value.setFocus();
|
|
191
182
|
}, 1);
|
|
192
183
|
}
|
|
193
184
|
addSubFieldInfoFlowItem(e, t) {
|
|
194
|
-
const
|
|
185
|
+
const s = this.flowElement.value, i = e.subFieldInfos.filter((a) => g(a, this.filterText, !0)), l = S(o`<calcite-flow-item selected .heading=${e.alias ?? e.name} .description=${e.description ?? void 0} class="panel" style=${$(this.panelCutOffHeight > 0 ? `max-height: ${this.panelCutOffHeight}px` : "max-height: 50vh")} @calciteFlowItemBack=${(a) => {
|
|
195
186
|
a.currentTarget.remove(), this.fieldInfoFlowItemEl.value.selected = !1, this.panelElement.value.selected = !0, setTimeout(() => {
|
|
196
187
|
t.setFocus();
|
|
197
188
|
}, 300);
|
|
198
189
|
}} ${d(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias ?? e.name} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${(a) => {
|
|
199
|
-
this.updateSelectedFieldsForList(a.currentTarget, e.subFieldInfos), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.
|
|
200
|
-
}}>${
|
|
201
|
-
|
|
190
|
+
this.updateSelectedFieldsForList(a.currentTarget, e.subFieldInfos), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.multiple || this.arcgisClose.emit({ selectedFields: this.selectedFields });
|
|
191
|
+
}}>${i.map((a) => this.renderCalciteListItem(a, !1))}</calcite-list>${this.filterText && !i.length && this.filterNoResultsText?.length !== 0 ? o`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}</calcite-flow-item>`);
|
|
192
|
+
s.appendChild(l), this.panelElement.value.selected = !1, setTimeout(() => {
|
|
202
193
|
this.fieldInfoFlowItemEl.value?.setFocus();
|
|
203
194
|
}, 1);
|
|
204
195
|
}
|
|
@@ -206,24 +197,24 @@ class H extends I {
|
|
|
206
197
|
return this.multiple && this.showSelectionAll && (!e || !this.filterText || !!this.filterFields?.length);
|
|
207
198
|
}
|
|
208
199
|
handleListSelectionChange(e) {
|
|
209
|
-
this.updateSelectedFieldsForList(this.listNode.value, e), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.
|
|
200
|
+
this.updateSelectedFieldsForList(this.listNode.value, e), this.arcgisChange.emit({ selectedFields: this.selectedFields }), this.multiple || this.arcgisClose.emit({ selectedFields: this.selectedFields });
|
|
210
201
|
}
|
|
211
202
|
updateSelectedFieldsForList(e, t) {
|
|
212
|
-
const
|
|
213
|
-
this.selectedFields = this.multiple ? [.../* @__PURE__ */ new Set([...l, ...a])] :
|
|
203
|
+
const s = new Set(t.map((c) => c.name)), i = e.selectedItems.map((c) => c.value), l = this.selectedFields.filter((c) => !s.has(c) || i.includes(c)), a = i.filter((c) => !this.selectedFields.includes(c));
|
|
204
|
+
this.selectedFields = this.multiple ? [.../* @__PURE__ */ new Set([...l, ...a])] : i, this.reorderSelectedFieldsByCurrentListOrder();
|
|
214
205
|
}
|
|
215
206
|
setSortBy(e) {
|
|
216
|
-
this.lastSortBy = e, this.updateGroupedLists(), this.arcgisSortByChange.emit(this.lastSortBy), this.
|
|
207
|
+
this.lastSortBy = e, this.updateGroupedLists(), this.arcgisSortByChange.emit(this.lastSortBy), this.reorderSelectedFieldsByCurrentListOrder() && this.arcgisChange.emit({ selectedFields: this.selectedFields });
|
|
217
208
|
}
|
|
218
209
|
reorderSelectedFieldsByCurrentListOrder() {
|
|
219
210
|
if (!this.selectedFields.length)
|
|
220
211
|
return !1;
|
|
221
|
-
const e =
|
|
212
|
+
const e = m(this.allLists).map((l) => l.name), t = new Set(this.selectedFields), s = e.filter((l) => t.has(l)), i = (
|
|
222
213
|
// adding/removing fields
|
|
223
|
-
|
|
224
|
-
|
|
214
|
+
s.length !== this.selectedFields.length || // reordering fields
|
|
215
|
+
s.some((l, a) => l !== this.selectedFields[a])
|
|
225
216
|
);
|
|
226
|
-
return
|
|
217
|
+
return i && (this.selectedFields = [...s]), i;
|
|
227
218
|
}
|
|
228
219
|
render() {
|
|
229
220
|
return this._propWatcherTask.render({
|
|
@@ -231,80 +222,76 @@ class H extends I {
|
|
|
231
222
|
if (this.listOnly)
|
|
232
223
|
return this.renderList();
|
|
233
224
|
const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = this.popoverProps;
|
|
234
|
-
return this.el.classList.add("js-app-flyout"), v(`${t.autoClose}`,
|
|
235
|
-
this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
|
|
236
|
-
}} ${d(this.popoverNode)}><calcite-flow style=${$({
|
|
225
|
+
return this.el.classList.add("js-app-flyout"), v(`${t.autoClose}`, o`<calcite-popover .placement=${t.placement ?? "leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance ?? -Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding ?? 0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading ?? (this.multiple ? this._messages.headerSelect : this._messages.header) ?? ""} @calcitePopoverClose=${() => this.arcgisClose.emit()} ${d(this.popoverNode)}><calcite-flow style=${$({
|
|
237
226
|
width: `${t.popoverWidth ?? t.refElement.getBoundingClientRect().width}px`,
|
|
238
227
|
...t.maxHeight && { maxHeight: t.maxHeight }
|
|
239
|
-
})} ${d(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${() => {
|
|
240
|
-
this.arcgisClose.emit(), this.arcgisFieldPickListDismissed.emit();
|
|
241
|
-
}} ${d(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple || !this.hideCancel) && n`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple && !this.hideCancel ? n`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>` : n`${this.renderAddButton()}${this.renderCancelButton()}`}</div>` || ""}</calcite-flow-item></calcite-flow></calcite-popover>`);
|
|
228
|
+
})} ${d(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${() => this.arcgisClose.emit()} ${d(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple || !this.hideCancel) && o`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple && !this.hideCancel ? o`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>` : o`${this.renderAddButton()}${this.renderCancelButton()}`}</div>` || ""}</calcite-flow-item></calcite-flow></calcite-popover>`);
|
|
242
229
|
},
|
|
243
230
|
error: () => ""
|
|
244
231
|
});
|
|
245
232
|
}
|
|
246
233
|
renderList() {
|
|
247
|
-
const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t =
|
|
248
|
-
return t.length ||
|
|
234
|
+
const e = this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header), t = A(this.allLists), s = O(this.allLists), i = m(this.allLists).length >= this.showFilterLength;
|
|
235
|
+
return t.length || s.length ? s.length ? this.renderSplitLists(t, s, i) : this.renderTopLevelOnlyFieldList(e, t, i) : o`<slot name=no-fields></slot>`;
|
|
249
236
|
}
|
|
250
|
-
renderSplitLists(e, t,
|
|
251
|
-
const
|
|
252
|
-
return
|
|
253
|
-
this.filterText = a.currentTarget.value, this.filterFields = this.filterText ?
|
|
254
|
-
}}></calcite-filter>${this.renderSortButton()}</div>` : null}<div class=${
|
|
237
|
+
renderSplitLists(e, t, s) {
|
|
238
|
+
const i = m(this.allLists), l = M(this.allLists).some((a) => F(a, this.filterText));
|
|
239
|
+
return o`${s ? o`<div class="list-controls"><calcite-filter .items=${i} .filterProps=${["name", "alias", "description"]} .placeholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteFilterChange=${(a) => {
|
|
240
|
+
this.filterText = a.currentTarget.value, this.filterFields = this.filterText ? H(this.allLists, this.filterText).map((c) => c.name) : void 0;
|
|
241
|
+
}}></calcite-filter>${this.renderSortButton()}</div>` : null}<div class=${b(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}>${this.shouldRenderSelectionButton(s) ? this.renderSelectionButton() : null}${this.renderSplitSubFieldLists(t)}${e.length ? this.renderSplitTopLevelFieldList(e, !0) : null}</div>${this.filterText && !l && this.filterNoResultsText?.length !== 0 ? o`<div class="no-match-text">${this.filterNoResultsText ?? this._messages.noMatches}</div>` : null}`;
|
|
255
242
|
}
|
|
256
243
|
renderSplitSubFieldLists(e) {
|
|
257
|
-
const t = e.map((
|
|
258
|
-
...
|
|
259
|
-
fields:
|
|
260
|
-
})).filter((
|
|
261
|
-
return y(t, (
|
|
262
|
-
l.key === "Enter" && this.addSubFieldInfoFlowItem(
|
|
244
|
+
const t = e.map((s) => ({
|
|
245
|
+
...s,
|
|
246
|
+
fields: s.fields.filter((i) => F(i, this.filterText))
|
|
247
|
+
})).filter((s) => !!s.fields.length);
|
|
248
|
+
return y(t, (s) => s.title, (s) => o`<calcite-list selection-mode=none .label=${s.title ?? this.heading ?? ""}><calcite-list-item-group .heading=${s.title}>${y(s.fields, (i) => i.name, (i) => o`<calcite-list-item .label=${i.alias || i.name} .description=${this.multiple ? this._messages.subFieldsSelected.replace("${count}", `${i.subFieldInfos.filter((l) => this.selectedFields.includes(l.name)).length}`) : void 0} .value=${i.name} @click=${(l) => this.addSubFieldInfoFlowItem(i, l.currentTarget)} @keydown=${(l) => {
|
|
249
|
+
l.key === "Enter" && this.addSubFieldInfoFlowItem(i, l.currentTarget);
|
|
263
250
|
}}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`);
|
|
264
251
|
}
|
|
265
252
|
renderSplitTopLevelFieldList(e, t) {
|
|
266
|
-
return
|
|
253
|
+
return o`<calcite-list .label=${this.heading || (this.multiple ? this._messages.headerSelect : this._messages.header)} .selectionMode=${this.multiple ? "multiple" : "single"} @calciteListChange=${() => this.handleListSelectionChange(e)} ${d(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`;
|
|
267
254
|
}
|
|
268
|
-
renderTopLevelOnlyFieldList(e, t,
|
|
269
|
-
return
|
|
270
|
-
|
|
271
|
-
}} ${d(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(
|
|
255
|
+
renderTopLevelOnlyFieldList(e, t, s) {
|
|
256
|
+
return o`<div class=${b(this.listOnly ? "" : "list-wrapper")} ${d(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple ? "multiple" : "single"} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText ?? this._messages.filter} @calciteListChange=${() => this.handleListSelectionChange(t)} @calciteListFilter=${(i) => {
|
|
257
|
+
i.stopPropagation(), this.filterFields = this.listNode.value.filteredItems?.map((l) => l.value), this.filterText = this.listNode.value.filterText;
|
|
258
|
+
}} ${d(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(s) ? this.renderSelectionButton() : null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`;
|
|
272
259
|
}
|
|
273
260
|
renderSortButton(e) {
|
|
274
|
-
const t =
|
|
261
|
+
const t = m(this.allLists);
|
|
275
262
|
if (!(t.length >= this.showFilterLength && !this.hideSort))
|
|
276
263
|
return "";
|
|
277
|
-
const
|
|
278
|
-
return
|
|
264
|
+
const i = t.every((l) => !!l.type);
|
|
265
|
+
return o`<calcite-action id=sort-action slot=${e ?? p} .text=${this._messages.sort ?? ""} title=${this._messages.sort ?? p}><calcite-icon scale=s icon=sort-descending flip-rtl></calcite-icon></calcite-action><calcite-dropdown placement=bottom-end overlay-positioning=fixed reference-element=sort-action @calciteDropdownOpen=${() => {
|
|
279
266
|
this.observer?.disconnect(), this.popoverNode.value && this.observer?.observe(this.popoverNode.value, { attributes: !0 });
|
|
280
|
-
}} @calciteDropdownClose=${() => this.observer?.disconnect()} ${d(this.dropdownNode)}><calcite-
|
|
267
|
+
}} @calciteDropdownClose=${() => this.observer?.disconnect()} ${d(this.dropdownNode)}><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy === "default"} @calciteDropdownItemSelect=${() => this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy === "display"} @calciteDropdownItemSelect=${() => this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${i && o`<calcite-dropdown-item .selected=${this.lastSortBy === "type"} @calciteDropdownItemSelect=${() => this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>` || ""}<calcite-dropdown-item .selected=${this.lastSortBy === "field"} @calciteDropdownItemSelect=${() => this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`;
|
|
281
268
|
}
|
|
282
269
|
renderSelectionButton() {
|
|
283
|
-
return
|
|
270
|
+
return o`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${() => {
|
|
284
271
|
if (this.canDeselectAll())
|
|
285
272
|
this.selectedFields = this.filterFields?.length ? this.selectedFields.filter((e) => !this.filterFields?.includes(e)) : [];
|
|
286
273
|
else if (this.filterFields?.length)
|
|
287
274
|
this.selectedFields = [.../* @__PURE__ */ new Set([...this.selectedFields, ...this.filterFields])];
|
|
288
275
|
else {
|
|
289
|
-
const t =
|
|
290
|
-
this.selectedFields = t.map((
|
|
276
|
+
const t = m(this.allLists);
|
|
277
|
+
this.selectedFields = t.map((s) => s.name);
|
|
291
278
|
}
|
|
292
|
-
this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields })
|
|
279
|
+
this.reorderSelectedFieldsByCurrentListOrder(), this.arcgisChange.emit({ selectedFields: this.selectedFields });
|
|
293
280
|
}}>${this.canDeselectAll() ? this._messages.deselectAll : this._messages.selectAll}</calcite-button></div>`;
|
|
294
281
|
}
|
|
295
282
|
renderGroupedListItems(e) {
|
|
296
|
-
const t = this.allLists.filter((
|
|
297
|
-
...
|
|
298
|
-
fields: e ?
|
|
299
|
-
})).filter((
|
|
300
|
-
return t.length === 1 && !t[0].title ? this.renderListItems(t[0].fields) : t.map((
|
|
283
|
+
const t = this.allLists.filter((s) => !!s.fields.length && !u(s.fields)).map((s) => ({
|
|
284
|
+
...s,
|
|
285
|
+
fields: e ? s.fields.filter((i) => F(i, this.filterText)) : s.fields
|
|
286
|
+
})).filter((s) => !!s.fields.length);
|
|
287
|
+
return t.length === 1 && !t[0].title ? this.renderListItems(t[0].fields) : t.map((i) => o`<calcite-list-item-group .heading=${i.title}>${this.renderListItems(i.fields)}</calcite-list-item-group>`);
|
|
301
288
|
}
|
|
302
289
|
renderListItems(e) {
|
|
303
290
|
return e.map((t) => this.renderCalciteListItem(t));
|
|
304
291
|
}
|
|
305
292
|
renderCalciteListItem(e, t = !0) {
|
|
306
|
-
const
|
|
307
|
-
return v(e.name,
|
|
293
|
+
const s = t && this.showFieldInfoCheck(e), i = this.showFieldTypeIcon && !!e.type;
|
|
294
|
+
return v(e.name, o`<calcite-list-item .label=${e.alias || e.name} .description=${(() => {
|
|
308
295
|
if (this.showFieldName && e.hideFieldName !== !0)
|
|
309
296
|
return `{${e.name}}`;
|
|
310
297
|
if (this.showDescription && e.hideDescription !== !0 && e.description)
|
|
@@ -312,40 +299,40 @@ class H extends I {
|
|
|
312
299
|
})()} .value=${e.name} .selected=${!this.multiple && e.name === this.selectedFields[0] || this.multiple && this.selectedFields.includes(e.name)} .metadata=${{
|
|
313
300
|
label: e.alias,
|
|
314
301
|
fieldName: e.name
|
|
315
|
-
}}>${
|
|
302
|
+
}}>${i && o`<div slot=actions-end class="field-icons">${N({ fieldType: e.type })}</div>` || ""}${this.renderInfoAction(e, s)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`);
|
|
316
303
|
}
|
|
317
304
|
renderInfoAction(e, t) {
|
|
318
|
-
const { _messages:
|
|
319
|
-
return t ?
|
|
320
|
-
|
|
321
|
-
const l =
|
|
305
|
+
const { _messages: s } = this;
|
|
306
|
+
return t ? o`<calcite-action slot=actions-end .text=${s.info} title=${s.info ?? p} scale=s icon=information @click=${(i) => {
|
|
307
|
+
i.stopPropagation();
|
|
308
|
+
const l = i.currentTarget;
|
|
322
309
|
this.addFieldInfoFlowItem(e, l);
|
|
323
310
|
}}></calcite-action>` : "";
|
|
324
311
|
}
|
|
325
312
|
renderEditAction(e) {
|
|
326
313
|
const { _messages: t } = this;
|
|
327
|
-
return e.showEditAction ?
|
|
328
|
-
|
|
314
|
+
return e.showEditAction ? o`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit ?? p} scale=s icon=pencil @click=${(s) => {
|
|
315
|
+
s.stopPropagation(), this.arcgisEditField.emit({ fieldName: e.name });
|
|
329
316
|
}}></calcite-action>` : "";
|
|
330
317
|
}
|
|
331
318
|
renderDeleteAction(e) {
|
|
332
319
|
const { _messages: t } = this;
|
|
333
|
-
return e.showDeleteAction ?
|
|
334
|
-
|
|
320
|
+
return e.showDeleteAction ? o`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete ?? p} scale=s icon=trash @click=${(s) => {
|
|
321
|
+
s.stopPropagation(), this.arcgisDeleteField.emit({ fieldName: e.name });
|
|
335
322
|
}}></calcite-action>` : "";
|
|
336
323
|
}
|
|
337
324
|
renderAddButton() {
|
|
338
|
-
return this.multiple ?
|
|
339
|
-
this.arcgisClose.emit({ selectedFields: this.selectedFields })
|
|
325
|
+
return this.multiple ? o`<calcite-button .appearance=${this.hideCancel ? "outline-fill" : "solid"} .width=${this.hideCancel ? "full" : "half"} @click=${() => {
|
|
326
|
+
this.arcgisClose.emit({ selectedFields: this.selectedFields });
|
|
340
327
|
}}>${this.okBtnText || (this.multiple ? this._messages.done : this._messages.ok)}</calcite-button>` : "";
|
|
341
328
|
}
|
|
342
329
|
renderCancelButton() {
|
|
343
|
-
return this.hideCancel ? "" :
|
|
344
|
-
this.arcgisClose.emit()
|
|
330
|
+
return this.hideCancel ? "" : o`<calcite-button appearance=outline-fill .width=${this.multiple ? "half" : "full"} @click=${() => {
|
|
331
|
+
this.arcgisClose.emit();
|
|
345
332
|
}}>${this._messages.cancel}</calcite-button>`;
|
|
346
333
|
}
|
|
347
334
|
}
|
|
348
|
-
|
|
335
|
+
I("arcgis-field-pick-list", P);
|
|
349
336
|
export {
|
|
350
|
-
|
|
337
|
+
P as ArcgisFieldPickList
|
|
351
338
|
};
|
|
@@ -7,8 +7,8 @@ import "@esri/calcite-components/components/calcite-flow";
|
|
|
7
7
|
import "@esri/calcite-components/components/calcite-filter";
|
|
8
8
|
import "@esri/calcite-components/components/calcite-list-item-group";
|
|
9
9
|
import "@esri/calcite-components/components/calcite-list-item";
|
|
10
|
-
import "@esri/calcite-components/components/calcite-dropdown";
|
|
11
10
|
import "@esri/calcite-components/components/calcite-action";
|
|
11
|
+
import "@esri/calcite-components/components/calcite-dropdown";
|
|
12
12
|
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
13
13
|
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
14
14
|
import "@esri/calcite-components/components/calcite-button";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component to render html content. The content will be sanitized before rendering to prevent XSS attack.
|
|
6
|
+
* The default sanitizer will remove all tags not in the whitelist and also remove the content in script tag.
|
|
7
|
+
* The default sanitizer will allow certain classes for img and figure tags to support html content generated from CKEditor, but it can be customized by passing in sanitizerOptions.
|
|
8
|
+
* More info about the default whitelist of arcgis-html-sanitizer can be found at https://github.com/Esri/arcgis-html-sanitizer/blob/master/src/index.ts
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export abstract class ArcgisHtmlContent extends LitElement {
|
|
13
|
+
/**
|
|
14
|
+
* Html fragment to be rendered in the component. It will be sanitized before rendering.
|
|
15
|
+
* The default sanitizer will remove all tags not in the whitelist and also remove the content in script tag.
|
|
16
|
+
* The default sanitizer will allow certain classes for img and figure tags to support html content generated from CKEditor, but it can be customized by passing in sanitizerOptions.
|
|
17
|
+
*
|
|
18
|
+
* @default ""
|
|
19
|
+
*/
|
|
20
|
+
accessor content: string;
|
|
21
|
+
/**
|
|
22
|
+
* The options to create the sanitizer. It can be used to customize the sanitizer behavior, for example, allowing some tags or attributes that are not in the default whitelist.
|
|
23
|
+
* For more details of the options, please refer to the XSS.IFilterXSSOptions documentation.
|
|
24
|
+
*/
|
|
25
|
+
accessor sanitizerOptions: IFilterXSSOptions | undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type IFilterXSSOptions = {
|
|
30
|
+
onTagAttr?: OnTagAttrHandler;
|
|
31
|
+
stripIgnoreTag?: boolean;
|
|
32
|
+
stripIgnoreTagBody?: string[] | boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param tag
|
|
37
|
+
* @param name
|
|
38
|
+
* @param value
|
|
39
|
+
* @param isWhiteAttr
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export type OnTagAttrHandler = (tag: string, name: string, value: string, isWhiteAttr: boolean) => string | void;
|