@arcgis/common-components 4.29.0-beta.42 → 4.29.0-beta.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/arcgis-common-components/arcgis-common-components.esm.js +1 -1
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.ar.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.bg.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.bs.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.ca.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.cs.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.da.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.de.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.el.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.en.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.es.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.et.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.fi.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.fr.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.he.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.hr.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.hu.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.id.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.it.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.ja.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.ko.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.lt.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.lv.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.nb.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.nl.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.pl.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.pt-BR.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.pt-PT.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.ro.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.ru.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.sk.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.sl.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.sr.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.sv.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.th.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.tr.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.uk.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.vi.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.zh-CN.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.zh-HK.json +78 -0
- package/dist/arcgis-common-components/assets/field-info/t9n/field-info.t9n.zh-TW.json +78 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.ar.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.bg.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.bs.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.ca.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.cs.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.da.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.de.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.el.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.en.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.es.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.et.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.fi.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.fr.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.he.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.hr.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.hu.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.id.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.it.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.ja.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.ko.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.lt.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.lv.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.nb.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.nl.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.pl.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.pt-BR.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.pt-PT.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.ro.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.ru.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.sk.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.sl.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.sr.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.sv.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.th.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.tr.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.uk.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.vi.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.zh-CN.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.zh-HK.json +17 -0
- package/dist/arcgis-common-components/assets/field-pick-list/t9n/field-pick-list.t9n.zh-TW.json +17 -0
- package/dist/arcgis-common-components/p-0a9f9233.entry.js +1 -0
- package/dist/arcgis-common-components/p-19ebc914.js +1 -0
- package/dist/arcgis-common-components/p-20e63d91.entry.js +1 -0
- package/dist/arcgis-common-components/p-b23318c8.js +1 -0
- package/dist/arcgis-common-components/{p-d868f293.entry.js → p-b98229f1.entry.js} +1 -1
- package/dist/arcgis-common-components/p-bc099d11.entry.js +1 -0
- package/dist/arcgis-common-components/p-f27af39c.js +2 -0
- package/dist/cjs/arcgis-api-key.cjs.entry.js +2 -2
- package/dist/cjs/arcgis-common-components.cjs.js +2 -2
- package/dist/cjs/arcgis-field-info.cjs.entry.js +1021 -0
- package/dist/cjs/arcgis-field-pick-list.cjs.entry.js +258 -0
- package/dist/cjs/arcgis-identity.cjs.entry.js +2 -2
- package/dist/cjs/{index-9962d715.js → index-81d57760.js} +40 -0
- package/dist/cjs/{index-693a0aa8.js → index-ab5f2576.js} +870 -4
- package/dist/cjs/index-f8bf4df6.js +7 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/components/arcgis-field-info.d.ts +11 -0
- package/dist/components/arcgis-field-info.js +6 -0
- package/dist/components/arcgis-field-pick-list.d.ts +11 -0
- package/dist/components/arcgis-field-pick-list.js +314 -0
- package/dist/components/arcgis-identity.js +1 -1
- package/dist/components/field-info.js +1048 -0
- package/dist/components/index2.js +36 -1
- package/dist/esm/arcgis-api-key.entry.js +2 -2
- package/dist/esm/arcgis-common-components.js +3 -3
- package/dist/esm/arcgis-field-info.entry.js +1017 -0
- package/dist/esm/arcgis-field-pick-list.entry.js +254 -0
- package/dist/esm/arcgis-identity.entry.js +2 -2
- package/dist/esm/{index-00709df9.js → index-74897166.js} +867 -5
- package/dist/esm/index-877e3851.js +75 -0
- package/dist/esm/index-e7244815.js +3 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/field-info/field-info.d.ts +68 -0
- package/dist/types/components/field-info/t9n-types.d.ts +82 -0
- package/dist/types/components/field-info/utils/basic.d.ts +44 -0
- package/dist/types/components/field-info/utils/feature.d.ts +17 -0
- package/dist/types/components/field-info/utils/field.d.ts +25 -0
- package/dist/types/components/field-info/utils/index.d.ts +3 -0
- package/dist/types/components/field-pick-list/field-pick-list.d.ts +122 -0
- package/dist/types/components/field-pick-list/t9n-types.d.ts +17 -0
- package/dist/types/components/field-pick-list/utils/types.d.ts +25 -0
- package/dist/types/components.d.ts +270 -0
- package/package.json +9 -9
- package/dist/arcgis-common-components/p-02d347bb.entry.js +0 -1
- package/dist/arcgis-common-components/p-2a7fe37a.js +0 -2
- package/dist/arcgis-common-components/p-5d6c7dd8.js +0 -1
- package/dist/esm/index-2ba2e62a.js +0 -40
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ab5f2576.js');
|
|
6
|
+
const index$2 = require('./index-81d57760.js');
|
|
7
|
+
const index$1 = require('./index-f8bf4df6.js');
|
|
8
|
+
|
|
9
|
+
const fieldPickListScss = ".popover{z-index:100}.panel{min-height:300px}.content{max-height:60vh}.selection-button-div{padding:4px 10px}";
|
|
10
|
+
|
|
11
|
+
var FieldInfoPrefix;
|
|
12
|
+
(function (FieldInfoPrefix) {
|
|
13
|
+
FieldInfoPrefix["expression"] = "expression/";
|
|
14
|
+
FieldInfoPrefix["relationship"] = "relationships/";
|
|
15
|
+
FieldInfoPrefix["raster"] = "Raster.";
|
|
16
|
+
})(FieldInfoPrefix || (FieldInfoPrefix = {}));
|
|
17
|
+
var LastSortyBy;
|
|
18
|
+
(function (LastSortyBy) {
|
|
19
|
+
LastSortyBy["default"] = "default";
|
|
20
|
+
LastSortyBy["display"] = "display";
|
|
21
|
+
LastSortyBy["type"] = "type";
|
|
22
|
+
LastSortyBy["field"] = "field";
|
|
23
|
+
})(LastSortyBy || (LastSortyBy = {}));
|
|
24
|
+
const ArcgisFieldPickList = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
this.arcgisFieldPickListDismissed = index.createEvent(this, "arcgisFieldPickListDismissed", 7);
|
|
28
|
+
this.arcgisFieldPickListChange = index.createEvent(this, "arcgisFieldPickListChange", 7);
|
|
29
|
+
this.arcgisFieldPickListSortByChange = index.createEvent(this, "arcgisFieldPickListSortByChange", 7);
|
|
30
|
+
this.calciteValueList = (field) => (index.h("calcite-pick-list-item", { key: field.name, label: field.alias || field.name, description: (() => {
|
|
31
|
+
if (this.showFieldName) {
|
|
32
|
+
return `{${field.name}}`;
|
|
33
|
+
}
|
|
34
|
+
if (this.showDescription && field.description) {
|
|
35
|
+
return field.description;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
})(), value: field.name, selected: (!this.multiple && field.name === this.selectedFields[0]) ||
|
|
39
|
+
(this.multiple && this.selectedFields.indexOf(field.name) > -1), metadata: {
|
|
40
|
+
label: field.alias,
|
|
41
|
+
fieldName: field.name
|
|
42
|
+
} }, this.showFieldInfoCheck(field) && (index.h("calcite-action", { slot: "actions-end", text: this._t9nStrings.info, title: this._t9nStrings.info, scale: "s", icon: "information", onClick: (event) => {
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
const action = event.target;
|
|
45
|
+
const fieldInfoFlowItem = document.createElement("calcite-flow-item");
|
|
46
|
+
fieldInfoFlowItem.heading = field.alias ?? field.name;
|
|
47
|
+
fieldInfoFlowItem.description = field.name;
|
|
48
|
+
fieldInfoFlowItem.className = "panel";
|
|
49
|
+
const fieldInfo = document.createElement("arcgis-field-info");
|
|
50
|
+
fieldInfo.lang = this._lang;
|
|
51
|
+
fieldInfo.fieldName = field.name;
|
|
52
|
+
fieldInfo.layer = this.layer;
|
|
53
|
+
fieldInfo.view = this.mapView;
|
|
54
|
+
fieldInfo.classList.add("content");
|
|
55
|
+
fieldInfoFlowItem.appendChild(fieldInfo);
|
|
56
|
+
fieldInfoFlowItem.addEventListener("calciteFlowItemBack", () => setTimeout(() => requestAnimationFrame(() => action.setFocus()), 200));
|
|
57
|
+
this.flowElement.appendChild(fieldInfoFlowItem);
|
|
58
|
+
setTimeout(() => requestAnimationFrame(() => fieldInfoFlowItem.setFocus()), 200);
|
|
59
|
+
} }))));
|
|
60
|
+
this.selectedFields = [];
|
|
61
|
+
this.fields = undefined;
|
|
62
|
+
this.popoverProps = undefined;
|
|
63
|
+
this.layer = undefined;
|
|
64
|
+
this.mapView = undefined;
|
|
65
|
+
this.showFieldInfo = false;
|
|
66
|
+
this.showFieldName = false;
|
|
67
|
+
this.showDescription = false;
|
|
68
|
+
this.showSelectionAll = false;
|
|
69
|
+
this.showCancel = true;
|
|
70
|
+
this.showSort = true;
|
|
71
|
+
this.showFilterLength = 10;
|
|
72
|
+
this.multiple = false;
|
|
73
|
+
this.heading = undefined;
|
|
74
|
+
this.okBtnText = undefined;
|
|
75
|
+
this.filterPlaceholderText = undefined;
|
|
76
|
+
this.sortBy = undefined;
|
|
77
|
+
this.lastSortyBy = LastSortyBy.default;
|
|
78
|
+
this.filterFields = null;
|
|
79
|
+
this._lang = "";
|
|
80
|
+
this._t9nLocale = "";
|
|
81
|
+
this._t9nStrings = undefined;
|
|
82
|
+
}
|
|
83
|
+
// --------------------------------------------------------------------------
|
|
84
|
+
//
|
|
85
|
+
// Lifecycle
|
|
86
|
+
//
|
|
87
|
+
// --------------------------------------------------------------------------
|
|
88
|
+
async componentWillLoad() {
|
|
89
|
+
await index$1.F(this, index.getAssetPath("./assets"));
|
|
90
|
+
// in case more than 1 selected field and multiple is set to false
|
|
91
|
+
if (!this.multiple && this.selectedFields.length > 1) {
|
|
92
|
+
this.selectedFields = [this.selectedFields[0]];
|
|
93
|
+
}
|
|
94
|
+
this.lastSortyBy = this.sortBy || this.lastSortyBy;
|
|
95
|
+
}
|
|
96
|
+
async componentDidLoad() {
|
|
97
|
+
const intl = await index$2.importIntl();
|
|
98
|
+
intl.setLocale(this._lang);
|
|
99
|
+
this.setUpObserver();
|
|
100
|
+
this.popoverNode.open = true;
|
|
101
|
+
// need timeout because of re-render
|
|
102
|
+
setTimeout(() => requestAnimationFrame(() => this.panelElement.setFocus()), 200);
|
|
103
|
+
}
|
|
104
|
+
disconnectedCallback() {
|
|
105
|
+
index$1.U(this);
|
|
106
|
+
this.observer?.disconnect();
|
|
107
|
+
}
|
|
108
|
+
// --------------------------------------------------------------------------
|
|
109
|
+
//
|
|
110
|
+
// Public Methods
|
|
111
|
+
//
|
|
112
|
+
// --------------------------------------------------------------------------
|
|
113
|
+
async setFocus() {
|
|
114
|
+
setTimeout(() => requestAnimationFrame(() => this.panelElement.setFocus()), 1);
|
|
115
|
+
}
|
|
116
|
+
async reposition() {
|
|
117
|
+
this.popoverNode?.reposition();
|
|
118
|
+
}
|
|
119
|
+
// --------------------------------------------------------------------------
|
|
120
|
+
//
|
|
121
|
+
// Private Methods
|
|
122
|
+
//
|
|
123
|
+
// --------------------------------------------------------------------------
|
|
124
|
+
getSortedList() {
|
|
125
|
+
const tempSorted = [...this.fields];
|
|
126
|
+
if (this.lastSortyBy === LastSortyBy.display) {
|
|
127
|
+
tempSorted.sort((a, b) => a.alias.localeCompare(b.alias));
|
|
128
|
+
}
|
|
129
|
+
else if (this.lastSortyBy === LastSortyBy.field) {
|
|
130
|
+
tempSorted.sort((a, b) => a.name.localeCompare(b.name));
|
|
131
|
+
}
|
|
132
|
+
else if (this.lastSortyBy === LastSortyBy.type) {
|
|
133
|
+
tempSorted.sort((a, b) => a.type.localeCompare(b.type));
|
|
134
|
+
}
|
|
135
|
+
return tempSorted;
|
|
136
|
+
}
|
|
137
|
+
showFieldInfoCheck(field) {
|
|
138
|
+
if (this.showFieldInfo) {
|
|
139
|
+
// dont want info for arcade and relation fields
|
|
140
|
+
if (field.name.includes(FieldInfoPrefix.expression) || field.name.includes(FieldInfoPrefix.relationship)) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// return true for deselect all, false for select all
|
|
152
|
+
selectDeselect() {
|
|
153
|
+
return this.filterFields?.length ? this.filterContainsAll() : this.selectedFields.length === this.fields.length;
|
|
154
|
+
}
|
|
155
|
+
// check if filter has all current field info
|
|
156
|
+
filterContainsAll() {
|
|
157
|
+
return !!this.filterFields?.every((filter) => {
|
|
158
|
+
return this.selectedFields.some((curr) => {
|
|
159
|
+
return curr === filter;
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
// --------------------------------------------------------------------------
|
|
164
|
+
//
|
|
165
|
+
// Rendor Methods
|
|
166
|
+
//
|
|
167
|
+
// --------------------------------------------------------------------------
|
|
168
|
+
render() {
|
|
169
|
+
const addBtn = (index.h("calcite-button", { slot: "footer", appearance: this.showCancel ? "solid" : "outline-fill", width: this.showCancel ? "half" : "full", scale: "m", onClick: () => {
|
|
170
|
+
this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields });
|
|
171
|
+
} }, this.okBtnText || (this.multiple ? this._t9nStrings.done : this._t9nStrings.ok)));
|
|
172
|
+
const cancelBtn = (index.h("calcite-button", { slot: "footer", appearance: "outline-fill", width: this.multiple ? "half" : "full", scale: "m", onClick: () => this.arcgisFieldPickListDismissed.emit() }, this._t9nStrings.cancel));
|
|
173
|
+
const hasType = this.fields.every((field) => !!field.type);
|
|
174
|
+
const sort = (index.h("calcite-dropdown", { slot: "menu-actions", placement: "bottom-end", overlayPositioning: "fixed", ref: (node) => (this.dropdownNode = node), onCalciteDropdownOpen: () => {
|
|
175
|
+
this.observer?.disconnect();
|
|
176
|
+
this.observer?.observe(this.popoverNode, { attributes: true });
|
|
177
|
+
}, onCalciteDropdownClose: () => this.observer?.disconnect() }, index.h("calcite-action", { slot: "trigger", text: this._t9nStrings.sort, title: this._t9nStrings.sort }, index.h("calcite-icon", { scale: "s", icon: "sortDescending" })), index.h("calcite-dropdown-group", null, index.h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.default, onClick: () => {
|
|
178
|
+
this.lastSortyBy = LastSortyBy.default;
|
|
179
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
180
|
+
} }, this._t9nStrings.default), index.h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.display, onClick: () => {
|
|
181
|
+
this.lastSortyBy = LastSortyBy.display;
|
|
182
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
183
|
+
} }, this._t9nStrings.displayName), hasType && (index.h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.type, onClick: () => {
|
|
184
|
+
this.lastSortyBy = LastSortyBy.type;
|
|
185
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
186
|
+
} }, this._t9nStrings.type)), index.h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.field, onClick: () => {
|
|
187
|
+
this.lastSortyBy = LastSortyBy.field;
|
|
188
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
189
|
+
} }, this._t9nStrings.fieldName))));
|
|
190
|
+
const selectionBtn = (index.h("div", { class: "selection-button-div" }, index.h("calcite-button", { appearance: "transparent", scale: "s", width: "full", onClick: () => {
|
|
191
|
+
if (this.selectDeselect()) {
|
|
192
|
+
//deselect all
|
|
193
|
+
this.selectedFields = this.filterFields?.length
|
|
194
|
+
? this.selectedFields.filter((item) => !this.filterFields?.includes(item))
|
|
195
|
+
: [];
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
//select all
|
|
199
|
+
this.selectedFields = this.filterFields?.length
|
|
200
|
+
? [...new Set([...this.selectedFields, ...this.filterFields])]
|
|
201
|
+
: this.fields.map((field) => {
|
|
202
|
+
return field.name;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
} }, this.selectDeselect() ? this._t9nStrings.deselectAll : this._t9nStrings.selectAll)));
|
|
206
|
+
return (index.h(index.Host, { class: "js-app-flyout" }, index.h("calcite-popover", { dir: index$1.C(this._hostElement), class: "popover", placement: this.popoverProps.placement || "leading-start", open: false, pointerDisabled: true, referenceElement: this.popoverProps.refElement, offsetDistance: this.popoverProps.offsetDistance || -Math.round(this.popoverProps.refElement.getBoundingClientRect().width), offsetSkidding: this.popoverProps.offsetSkidding || 0, overlayPositioning: this.popoverProps.overlayPositioning, triggerDisabled: this.popoverProps.triggerDisabled, autoClose: this.popoverProps.autoClose, label: this.heading || (this.multiple ? this._t9nStrings.headerSelect : this._t9nStrings.header), onCalcitePopoverClose: () => this.arcgisFieldPickListDismissed.emit(), ref: (node) => (this.popoverNode = node) }, index.h("calcite-flow", { ref: (node) => {
|
|
207
|
+
this.flowElement = node;
|
|
208
|
+
}, style: {
|
|
209
|
+
width: `${this.popoverProps.popoverWidth || this.popoverProps.refElement.getBoundingClientRect().width}px`
|
|
210
|
+
} }, index.h("calcite-flow-item", { ref: (el) => (this.panelElement = el), class: "panel", heading: this.heading || (this.multiple ? this._t9nStrings.headerSelect : this._t9nStrings.header), closable: true, onCalciteFlowItemClose: () => this.arcgisFieldPickListDismissed.emit() }, this.multiple && addBtn, this.showCancel && cancelBtn, index.h("calcite-pick-list", { multiple: this.multiple, ref: (node) => {
|
|
211
|
+
this.pickListNode = node;
|
|
212
|
+
}, class: "content", filterEnabled: this.fields.length >= this.showFilterLength ? true : false, filterPlaceholder: this.filterPlaceholderText ?? this._t9nStrings.filter, onCalciteListChange: async () => {
|
|
213
|
+
// keep original order. Add addional values at the end
|
|
214
|
+
const tempSelectedFields = await this.pickListNode.getSelectedItems();
|
|
215
|
+
this.selectedFields = [
|
|
216
|
+
...new Set([
|
|
217
|
+
...this.selectedFields.filter((item) => {
|
|
218
|
+
return tempSelectedFields.has(item);
|
|
219
|
+
}),
|
|
220
|
+
...tempSelectedFields.keys()
|
|
221
|
+
])
|
|
222
|
+
];
|
|
223
|
+
this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields });
|
|
224
|
+
if (!this.multiple) {
|
|
225
|
+
this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields });
|
|
226
|
+
}
|
|
227
|
+
}, onCalciteListFilter: (event) => {
|
|
228
|
+
event.stopPropagation();
|
|
229
|
+
const node = event.target;
|
|
230
|
+
this.filterFields = node.filteredItems?.map((item) => {
|
|
231
|
+
return item.value;
|
|
232
|
+
});
|
|
233
|
+
} }, this.fields.length >= this.showFilterLength && this.showSort && sort, this.multiple && this.showSelectionAll && selectionBtn, [...this.getSortedList()].map((field) => {
|
|
234
|
+
return this.calciteValueList(field);
|
|
235
|
+
})))))));
|
|
236
|
+
}
|
|
237
|
+
// --------------------------------------------------------------------------
|
|
238
|
+
//
|
|
239
|
+
// Private Methods
|
|
240
|
+
//
|
|
241
|
+
// --------------------------------------------------------------------------
|
|
242
|
+
setUpObserver() {
|
|
243
|
+
this.observer = new MutationObserver((mutationList /* , observer */) => {
|
|
244
|
+
for (const mutation of mutationList) {
|
|
245
|
+
if (mutation.attributeName === "style") {
|
|
246
|
+
if (this.popoverNode.style.visibility === "hidden") {
|
|
247
|
+
this.dropdownNode.open = false;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
static get assetsDirs() { return ["assets"]; }
|
|
254
|
+
get _hostElement() { return index.getElement(this); }
|
|
255
|
+
};
|
|
256
|
+
ArcgisFieldPickList.style = fieldPickListScss;
|
|
257
|
+
|
|
258
|
+
exports.arcgis_field_pick_list = ArcgisFieldPickList;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index$1 = require('./index-
|
|
5
|
+
const index = require('./index-ab5f2576.js');
|
|
6
|
+
const index$1 = require('./index-81d57760.js');
|
|
7
7
|
|
|
8
8
|
const identityCss = ":host{display:none}arcgis-identity{display:none}";
|
|
9
9
|
|
|
@@ -44,6 +44,13 @@ async function newIdentityOAuthInfo(properties) {
|
|
|
44
44
|
const ModConstructor = await importIdentityOAuthInfo();
|
|
45
45
|
return new ModConstructor(properties);
|
|
46
46
|
}
|
|
47
|
+
async function importRestSupportQuery() {
|
|
48
|
+
if (amd) {
|
|
49
|
+
return requireModule("esri/rest/support/Query");
|
|
50
|
+
}
|
|
51
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/rest/support/Query.js')); });
|
|
52
|
+
return module.default;
|
|
53
|
+
}
|
|
47
54
|
async function importConfig() {
|
|
48
55
|
if (amd) {
|
|
49
56
|
return requireModule("esri/config");
|
|
@@ -51,6 +58,13 @@ async function importConfig() {
|
|
|
51
58
|
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/config.js')); });
|
|
52
59
|
return module.default;
|
|
53
60
|
}
|
|
61
|
+
async function importCoreLang() {
|
|
62
|
+
if (amd) {
|
|
63
|
+
return requireModule("esri/core/lang");
|
|
64
|
+
}
|
|
65
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/core/lang.js')); });
|
|
66
|
+
return module;
|
|
67
|
+
}
|
|
54
68
|
async function importCoreReactiveUtils() {
|
|
55
69
|
if (amd) {
|
|
56
70
|
return requireModule("esri/core/reactiveUtils");
|
|
@@ -58,8 +72,34 @@ async function importCoreReactiveUtils() {
|
|
|
58
72
|
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/core/reactiveUtils.js')); });
|
|
59
73
|
return module;
|
|
60
74
|
}
|
|
75
|
+
async function importIntl() {
|
|
76
|
+
if (amd) {
|
|
77
|
+
return requireModule("esri/intl");
|
|
78
|
+
}
|
|
79
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/intl.js')); });
|
|
80
|
+
return module;
|
|
81
|
+
}
|
|
82
|
+
async function importSmartMappingStatisticsSummaryStatistics() {
|
|
83
|
+
if (amd) {
|
|
84
|
+
return requireModule("esri/smartMapping/statistics/summaryStatistics");
|
|
85
|
+
}
|
|
86
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/smartMapping/statistics/summaryStatistics.js')); });
|
|
87
|
+
return module.default;
|
|
88
|
+
}
|
|
89
|
+
async function importSmartMappingStatisticsUniqueValues() {
|
|
90
|
+
if (amd) {
|
|
91
|
+
return requireModule("esri/smartMapping/statistics/uniqueValues");
|
|
92
|
+
}
|
|
93
|
+
const module = await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@arcgis/core/smartMapping/statistics/uniqueValues.js')); });
|
|
94
|
+
return module.default;
|
|
95
|
+
}
|
|
61
96
|
|
|
62
97
|
exports.importConfig = importConfig;
|
|
98
|
+
exports.importCoreLang = importCoreLang;
|
|
63
99
|
exports.importCoreReactiveUtils = importCoreReactiveUtils;
|
|
64
100
|
exports.importIdentityIdentityManager = importIdentityIdentityManager;
|
|
101
|
+
exports.importIntl = importIntl;
|
|
102
|
+
exports.importRestSupportQuery = importRestSupportQuery;
|
|
103
|
+
exports.importSmartMappingStatisticsSummaryStatistics = importSmartMappingStatisticsSummaryStatistics;
|
|
104
|
+
exports.importSmartMappingStatisticsUniqueValues = importSmartMappingStatisticsUniqueValues;
|
|
65
105
|
exports.newIdentityOAuthInfo = newIdentityOAuthInfo;
|