@arcgis/common-components 4.29.0-beta.41 → 4.29.0-beta.43
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-17c2d70f.js +1 -0
- package/dist/arcgis-common-components/p-1c5290e5.entry.js +1 -0
- package/dist/arcgis-common-components/p-4b73c2b4.entry.js +1 -0
- package/dist/arcgis-common-components/p-9109c91f.entry.js +1 -0
- package/dist/arcgis-common-components/p-b23318c8.js +1 -0
- package/dist/arcgis-common-components/{p-50b351b8.entry.js → p-c2d3283c.entry.js} +1 -1
- 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-693a0aa8.js → index-ab5f2576.js} +870 -4
- package/dist/cjs/{index-f93ca465.js → index-b1be8f83.js} +40 -0
- 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-dbc88bff.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 +8 -8
- package/dist/arcgis-common-components/p-2a7fe37a.js +0 -2
- package/dist/arcgis-common-components/p-a39b4556.entry.js +0 -1
- package/dist/arcgis-common-components/p-b4629d3e.js +0 -1
- package/dist/esm/index-6dce2d84.js +0 -40
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function T(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let i of o)S(e,i.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function E(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function C(e){return f(e,"dir","ltr")}function f(e,t,n){return E(e,`[${t}]`)?.getAttribute(t)??n}var x=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function N(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let s=await o.json();return a.set(r,s),s}if(e==="en"){a.set(r,void 0);return}let i=await N("en",t,n);return a.set(r,i),i}catch{a.set(r,void 0);return}}function R(e){let t=f(e,"lang",navigator?.language||"en");if(x.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:x.has(n)?n:"en"}}var m=new WeakMap,h=new WeakMap,_=new WeakMap;async function F(e,t,n){h.set(e,t),m.set(e,T(e._hostElement,["lang"],()=>{b(e,n);})),await b(e,n);}function U(e){m.get(e)?.disconnect(),m.delete(e),h.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=R(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=_.get(e);if(!o){let i=h.get(e)??"",s=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),u=`${i}/${s}/t9n`,l=`${s}.t9n.`;o=await N(r,u,l);}e._t9nLocale=r,e._t9nStrings=o,await t?.call(e);}
|
|
4
|
+
|
|
5
|
+
exports.C = C;
|
|
6
|
+
exports.F = F;
|
|
7
|
+
exports.U = U;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ab5f2576.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
|
-
return index.bootstrapLazy([["arcgis-api-key.cjs",[[0,"arcgis-api-key",{"apiKey":[1,"api-key"]},null,{"apiKey":["apiKeyWatcher"]}]]],["arcgis-identity.cjs",[[0,"arcgis-identity",{"identity":[1040],"appId":[1,"app-id"],"credential":[1040],"expiration":[1026],"locale":[1],"usePopup":[4,"use-popup"],"popupCallbackUrl":[1,"popup-callback-url"],"portalUrl":[1,"portal-url"],"preserveUrlHash":[4,"preserve-url-hash"],"signIn":[64],"signOut":[64]},null,{"appId":["appIdWatcher"]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["arcgis-field-pick-list.cjs",[[1,"arcgis-field-pick-list",{"selectedFields":[1040],"fields":[16],"popoverProps":[16],"layer":[16],"mapView":[16],"showFieldInfo":[4,"show-field-info"],"showFieldName":[4,"show-field-name"],"showDescription":[4,"show-description"],"showSelectionAll":[4,"show-selection-all"],"showCancel":[4,"show-cancel"],"showSort":[4,"show-sort"],"showFilterLength":[2,"show-filter-length"],"multiple":[4],"heading":[1],"okBtnText":[1,"ok-btn-text"],"filterPlaceholderText":[1,"filter-placeholder-text"],"sortBy":[1,"sort-by"],"lastSortyBy":[32],"filterFields":[32],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32],"setFocus":[64],"reposition":[64]}]]],["arcgis-api-key.cjs",[[0,"arcgis-api-key",{"apiKey":[1,"api-key"]},null,{"apiKey":["apiKeyWatcher"]}]]],["arcgis-identity.cjs",[[0,"arcgis-identity",{"identity":[1040],"appId":[1,"app-id"],"credential":[1040],"expiration":[1026],"locale":[1],"usePopup":[4,"use-popup"],"popupCallbackUrl":[1,"popup-callback-url"],"portalUrl":[1,"portal-url"],"preserveUrlHash":[4,"preserve-url-hash"],"signIn":[64],"signOut":[64]},null,{"appId":["appIdWatcher"]}]]],["arcgis-field-info.cjs",[[1,"arcgis-field-info",{"view":[16],"layer":[16],"fieldName":[1,"field-name"],"hideStatistics":[4,"hide-statistics"],"oneFeatureResponse":[32],"oneFeatureResponseStatus":[32],"statistics":[32],"statisticsStatus":[32],"uniqueValues":[32],"uniqueValuesStatus":[32],"_lang":[32],"_t9nLocale":[32],"_t9nStrings":[32]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ArcgisFieldInfo extends Components.ArcgisFieldInfo, HTMLElement {}
|
|
4
|
+
export const ArcgisFieldInfo: {
|
|
5
|
+
prototype: ArcgisFieldInfo;
|
|
6
|
+
new (): ArcgisFieldInfo;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ArcgisFieldPickList extends Components.ArcgisFieldPickList, HTMLElement {}
|
|
4
|
+
export const ArcgisFieldPickList: {
|
|
5
|
+
prototype: ArcgisFieldPickList;
|
|
6
|
+
new (): ArcgisFieldPickList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, getAssetPath, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { b as importIntl } from './index2.js';
|
|
3
|
+
import { F, U, C, d as defineCustomElement$2 } from './field-info.js';
|
|
4
|
+
import '@esri/calcite-components/dist/components/calcite-pick-list-item.js';
|
|
5
|
+
import '@esri/calcite-components/dist/components/calcite-action.js';
|
|
6
|
+
import '@esri/calcite-components/dist/components/calcite-button.js';
|
|
7
|
+
import '@esri/calcite-components/dist/components/calcite-dropdown.js';
|
|
8
|
+
import '@esri/calcite-components/dist/components/calcite-icon.js';
|
|
9
|
+
import '@esri/calcite-components/dist/components/calcite-dropdown-group.js';
|
|
10
|
+
import '@esri/calcite-components/dist/components/calcite-dropdown-item.js';
|
|
11
|
+
import '@esri/calcite-components/dist/components/calcite-popover.js';
|
|
12
|
+
import '@esri/calcite-components/dist/components/calcite-flow.js';
|
|
13
|
+
import '@esri/calcite-components/dist/components/calcite-flow-item.js';
|
|
14
|
+
import '@esri/calcite-components/dist/components/calcite-pick-list.js';
|
|
15
|
+
|
|
16
|
+
const fieldPickListScss = ".popover{z-index:100}.panel{min-height:300px}.content{max-height:60vh}.selection-button-div{padding:4px 10px}";
|
|
17
|
+
|
|
18
|
+
var FieldInfoPrefix;
|
|
19
|
+
(function (FieldInfoPrefix) {
|
|
20
|
+
FieldInfoPrefix["expression"] = "expression/";
|
|
21
|
+
FieldInfoPrefix["relationship"] = "relationships/";
|
|
22
|
+
FieldInfoPrefix["raster"] = "Raster.";
|
|
23
|
+
})(FieldInfoPrefix || (FieldInfoPrefix = {}));
|
|
24
|
+
var LastSortyBy;
|
|
25
|
+
(function (LastSortyBy) {
|
|
26
|
+
LastSortyBy["default"] = "default";
|
|
27
|
+
LastSortyBy["display"] = "display";
|
|
28
|
+
LastSortyBy["type"] = "type";
|
|
29
|
+
LastSortyBy["field"] = "field";
|
|
30
|
+
})(LastSortyBy || (LastSortyBy = {}));
|
|
31
|
+
const ArcgisFieldPickList$1 = /*@__PURE__*/ proxyCustomElement(class ArcgisFieldPickList extends HTMLElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
this.__registerHost();
|
|
35
|
+
this.__attachShadow();
|
|
36
|
+
this.arcgisFieldPickListDismissed = createEvent(this, "arcgisFieldPickListDismissed", 7);
|
|
37
|
+
this.arcgisFieldPickListChange = createEvent(this, "arcgisFieldPickListChange", 7);
|
|
38
|
+
this.arcgisFieldPickListSortByChange = createEvent(this, "arcgisFieldPickListSortByChange", 7);
|
|
39
|
+
this.calciteValueList = (field) => (h("calcite-pick-list-item", { key: field.name, label: field.alias || field.name, description: (() => {
|
|
40
|
+
if (this.showFieldName) {
|
|
41
|
+
return `{${field.name}}`;
|
|
42
|
+
}
|
|
43
|
+
if (this.showDescription && field.description) {
|
|
44
|
+
return field.description;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
})(), value: field.name, selected: (!this.multiple && field.name === this.selectedFields[0]) ||
|
|
48
|
+
(this.multiple && this.selectedFields.indexOf(field.name) > -1), metadata: {
|
|
49
|
+
label: field.alias,
|
|
50
|
+
fieldName: field.name
|
|
51
|
+
} }, this.showFieldInfoCheck(field) && (h("calcite-action", { slot: "actions-end", text: this._t9nStrings.info, title: this._t9nStrings.info, scale: "s", icon: "information", onClick: (event) => {
|
|
52
|
+
event.stopPropagation();
|
|
53
|
+
const action = event.target;
|
|
54
|
+
const fieldInfoFlowItem = document.createElement("calcite-flow-item");
|
|
55
|
+
fieldInfoFlowItem.heading = field.alias ?? field.name;
|
|
56
|
+
fieldInfoFlowItem.description = field.name;
|
|
57
|
+
fieldInfoFlowItem.className = "panel";
|
|
58
|
+
const fieldInfo = document.createElement("arcgis-field-info");
|
|
59
|
+
fieldInfo.lang = this._lang;
|
|
60
|
+
fieldInfo.fieldName = field.name;
|
|
61
|
+
fieldInfo.layer = this.layer;
|
|
62
|
+
fieldInfo.view = this.mapView;
|
|
63
|
+
fieldInfo.classList.add("content");
|
|
64
|
+
fieldInfoFlowItem.appendChild(fieldInfo);
|
|
65
|
+
fieldInfoFlowItem.addEventListener("calciteFlowItemBack", () => setTimeout(() => requestAnimationFrame(() => action.setFocus()), 200));
|
|
66
|
+
this.flowElement.appendChild(fieldInfoFlowItem);
|
|
67
|
+
setTimeout(() => requestAnimationFrame(() => fieldInfoFlowItem.setFocus()), 200);
|
|
68
|
+
} }))));
|
|
69
|
+
this.selectedFields = [];
|
|
70
|
+
this.fields = undefined;
|
|
71
|
+
this.popoverProps = undefined;
|
|
72
|
+
this.layer = undefined;
|
|
73
|
+
this.mapView = undefined;
|
|
74
|
+
this.showFieldInfo = false;
|
|
75
|
+
this.showFieldName = false;
|
|
76
|
+
this.showDescription = false;
|
|
77
|
+
this.showSelectionAll = false;
|
|
78
|
+
this.showCancel = true;
|
|
79
|
+
this.showSort = true;
|
|
80
|
+
this.showFilterLength = 10;
|
|
81
|
+
this.multiple = false;
|
|
82
|
+
this.heading = undefined;
|
|
83
|
+
this.okBtnText = undefined;
|
|
84
|
+
this.filterPlaceholderText = undefined;
|
|
85
|
+
this.sortBy = undefined;
|
|
86
|
+
this.lastSortyBy = LastSortyBy.default;
|
|
87
|
+
this.filterFields = null;
|
|
88
|
+
this._lang = "";
|
|
89
|
+
this._t9nLocale = "";
|
|
90
|
+
this._t9nStrings = undefined;
|
|
91
|
+
}
|
|
92
|
+
// --------------------------------------------------------------------------
|
|
93
|
+
//
|
|
94
|
+
// Lifecycle
|
|
95
|
+
//
|
|
96
|
+
// --------------------------------------------------------------------------
|
|
97
|
+
async componentWillLoad() {
|
|
98
|
+
await F(this, getAssetPath("./assets"));
|
|
99
|
+
// in case more than 1 selected field and multiple is set to false
|
|
100
|
+
if (!this.multiple && this.selectedFields.length > 1) {
|
|
101
|
+
this.selectedFields = [this.selectedFields[0]];
|
|
102
|
+
}
|
|
103
|
+
this.lastSortyBy = this.sortBy || this.lastSortyBy;
|
|
104
|
+
}
|
|
105
|
+
async componentDidLoad() {
|
|
106
|
+
const intl = await importIntl();
|
|
107
|
+
intl.setLocale(this._lang);
|
|
108
|
+
this.setUpObserver();
|
|
109
|
+
this.popoverNode.open = true;
|
|
110
|
+
// need timeout because of re-render
|
|
111
|
+
setTimeout(() => requestAnimationFrame(() => this.panelElement.setFocus()), 200);
|
|
112
|
+
}
|
|
113
|
+
disconnectedCallback() {
|
|
114
|
+
U(this);
|
|
115
|
+
this.observer?.disconnect();
|
|
116
|
+
}
|
|
117
|
+
// --------------------------------------------------------------------------
|
|
118
|
+
//
|
|
119
|
+
// Public Methods
|
|
120
|
+
//
|
|
121
|
+
// --------------------------------------------------------------------------
|
|
122
|
+
async setFocus() {
|
|
123
|
+
setTimeout(() => requestAnimationFrame(() => this.panelElement.setFocus()), 1);
|
|
124
|
+
}
|
|
125
|
+
async reposition() {
|
|
126
|
+
this.popoverNode?.reposition();
|
|
127
|
+
}
|
|
128
|
+
// --------------------------------------------------------------------------
|
|
129
|
+
//
|
|
130
|
+
// Private Methods
|
|
131
|
+
//
|
|
132
|
+
// --------------------------------------------------------------------------
|
|
133
|
+
getSortedList() {
|
|
134
|
+
const tempSorted = [...this.fields];
|
|
135
|
+
if (this.lastSortyBy === LastSortyBy.display) {
|
|
136
|
+
tempSorted.sort((a, b) => a.alias.localeCompare(b.alias));
|
|
137
|
+
}
|
|
138
|
+
else if (this.lastSortyBy === LastSortyBy.field) {
|
|
139
|
+
tempSorted.sort((a, b) => a.name.localeCompare(b.name));
|
|
140
|
+
}
|
|
141
|
+
else if (this.lastSortyBy === LastSortyBy.type) {
|
|
142
|
+
tempSorted.sort((a, b) => a.type.localeCompare(b.type));
|
|
143
|
+
}
|
|
144
|
+
return tempSorted;
|
|
145
|
+
}
|
|
146
|
+
showFieldInfoCheck(field) {
|
|
147
|
+
if (this.showFieldInfo) {
|
|
148
|
+
// dont want info for arcade and relation fields
|
|
149
|
+
if (field.name.includes(FieldInfoPrefix.expression) || field.name.includes(FieldInfoPrefix.relationship)) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// return true for deselect all, false for select all
|
|
161
|
+
selectDeselect() {
|
|
162
|
+
return this.filterFields?.length ? this.filterContainsAll() : this.selectedFields.length === this.fields.length;
|
|
163
|
+
}
|
|
164
|
+
// check if filter has all current field info
|
|
165
|
+
filterContainsAll() {
|
|
166
|
+
return !!this.filterFields?.every((filter) => {
|
|
167
|
+
return this.selectedFields.some((curr) => {
|
|
168
|
+
return curr === filter;
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
// --------------------------------------------------------------------------
|
|
173
|
+
//
|
|
174
|
+
// Rendor Methods
|
|
175
|
+
//
|
|
176
|
+
// --------------------------------------------------------------------------
|
|
177
|
+
render() {
|
|
178
|
+
const addBtn = (h("calcite-button", { slot: "footer", appearance: this.showCancel ? "solid" : "outline-fill", width: this.showCancel ? "half" : "full", scale: "m", onClick: () => {
|
|
179
|
+
this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields });
|
|
180
|
+
} }, this.okBtnText || (this.multiple ? this._t9nStrings.done : this._t9nStrings.ok)));
|
|
181
|
+
const cancelBtn = (h("calcite-button", { slot: "footer", appearance: "outline-fill", width: this.multiple ? "half" : "full", scale: "m", onClick: () => this.arcgisFieldPickListDismissed.emit() }, this._t9nStrings.cancel));
|
|
182
|
+
const hasType = this.fields.every((field) => !!field.type);
|
|
183
|
+
const sort = (h("calcite-dropdown", { slot: "menu-actions", placement: "bottom-end", overlayPositioning: "fixed", ref: (node) => (this.dropdownNode = node), onCalciteDropdownOpen: () => {
|
|
184
|
+
this.observer?.disconnect();
|
|
185
|
+
this.observer?.observe(this.popoverNode, { attributes: true });
|
|
186
|
+
}, onCalciteDropdownClose: () => this.observer?.disconnect() }, h("calcite-action", { slot: "trigger", text: this._t9nStrings.sort, title: this._t9nStrings.sort }, h("calcite-icon", { scale: "s", icon: "sortDescending" })), h("calcite-dropdown-group", null, h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.default, onClick: () => {
|
|
187
|
+
this.lastSortyBy = LastSortyBy.default;
|
|
188
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
189
|
+
} }, this._t9nStrings.default), h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.display, onClick: () => {
|
|
190
|
+
this.lastSortyBy = LastSortyBy.display;
|
|
191
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
192
|
+
} }, this._t9nStrings.displayName), hasType && (h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.type, onClick: () => {
|
|
193
|
+
this.lastSortyBy = LastSortyBy.type;
|
|
194
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
195
|
+
} }, this._t9nStrings.type)), h("calcite-dropdown-item", { selected: this.lastSortyBy === LastSortyBy.field, onClick: () => {
|
|
196
|
+
this.lastSortyBy = LastSortyBy.field;
|
|
197
|
+
this.arcgisFieldPickListSortByChange.emit(this.lastSortyBy);
|
|
198
|
+
} }, this._t9nStrings.fieldName))));
|
|
199
|
+
const selectionBtn = (h("div", { class: "selection-button-div" }, h("calcite-button", { appearance: "transparent", scale: "s", width: "full", onClick: () => {
|
|
200
|
+
if (this.selectDeselect()) {
|
|
201
|
+
//deselect all
|
|
202
|
+
this.selectedFields = this.filterFields?.length
|
|
203
|
+
? this.selectedFields.filter((item) => !this.filterFields?.includes(item))
|
|
204
|
+
: [];
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
//select all
|
|
208
|
+
this.selectedFields = this.filterFields?.length
|
|
209
|
+
? [...new Set([...this.selectedFields, ...this.filterFields])]
|
|
210
|
+
: this.fields.map((field) => {
|
|
211
|
+
return field.name;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
} }, this.selectDeselect() ? this._t9nStrings.deselectAll : this._t9nStrings.selectAll)));
|
|
215
|
+
return (h(Host, { class: "js-app-flyout" }, h("calcite-popover", { dir: 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) }, h("calcite-flow", { ref: (node) => {
|
|
216
|
+
this.flowElement = node;
|
|
217
|
+
}, style: {
|
|
218
|
+
width: `${this.popoverProps.popoverWidth || this.popoverProps.refElement.getBoundingClientRect().width}px`
|
|
219
|
+
} }, 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, h("calcite-pick-list", { multiple: this.multiple, ref: (node) => {
|
|
220
|
+
this.pickListNode = node;
|
|
221
|
+
}, class: "content", filterEnabled: this.fields.length >= this.showFilterLength ? true : false, filterPlaceholder: this.filterPlaceholderText ?? this._t9nStrings.filter, onCalciteListChange: async () => {
|
|
222
|
+
// keep original order. Add addional values at the end
|
|
223
|
+
const tempSelectedFields = await this.pickListNode.getSelectedItems();
|
|
224
|
+
this.selectedFields = [
|
|
225
|
+
...new Set([
|
|
226
|
+
...this.selectedFields.filter((item) => {
|
|
227
|
+
return tempSelectedFields.has(item);
|
|
228
|
+
}),
|
|
229
|
+
...tempSelectedFields.keys()
|
|
230
|
+
])
|
|
231
|
+
];
|
|
232
|
+
this.arcgisFieldPickListChange.emit({ selectedFields: this.selectedFields });
|
|
233
|
+
if (!this.multiple) {
|
|
234
|
+
this.arcgisFieldPickListDismissed.emit({ selectedFields: this.selectedFields });
|
|
235
|
+
}
|
|
236
|
+
}, onCalciteListFilter: (event) => {
|
|
237
|
+
event.stopPropagation();
|
|
238
|
+
const node = event.target;
|
|
239
|
+
this.filterFields = node.filteredItems?.map((item) => {
|
|
240
|
+
return item.value;
|
|
241
|
+
});
|
|
242
|
+
} }, this.fields.length >= this.showFilterLength && this.showSort && sort, this.multiple && this.showSelectionAll && selectionBtn, [...this.getSortedList()].map((field) => {
|
|
243
|
+
return this.calciteValueList(field);
|
|
244
|
+
})))))));
|
|
245
|
+
}
|
|
246
|
+
// --------------------------------------------------------------------------
|
|
247
|
+
//
|
|
248
|
+
// Private Methods
|
|
249
|
+
//
|
|
250
|
+
// --------------------------------------------------------------------------
|
|
251
|
+
setUpObserver() {
|
|
252
|
+
this.observer = new MutationObserver((mutationList /* , observer */) => {
|
|
253
|
+
for (const mutation of mutationList) {
|
|
254
|
+
if (mutation.attributeName === "style") {
|
|
255
|
+
if (this.popoverNode.style.visibility === "hidden") {
|
|
256
|
+
this.dropdownNode.open = false;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
static get assetsDirs() { return ["assets"]; }
|
|
263
|
+
get _hostElement() { return this; }
|
|
264
|
+
static get style() { return fieldPickListScss; }
|
|
265
|
+
}, [1, "arcgis-field-pick-list", {
|
|
266
|
+
"selectedFields": [1040],
|
|
267
|
+
"fields": [16],
|
|
268
|
+
"popoverProps": [16],
|
|
269
|
+
"layer": [16],
|
|
270
|
+
"mapView": [16],
|
|
271
|
+
"showFieldInfo": [4, "show-field-info"],
|
|
272
|
+
"showFieldName": [4, "show-field-name"],
|
|
273
|
+
"showDescription": [4, "show-description"],
|
|
274
|
+
"showSelectionAll": [4, "show-selection-all"],
|
|
275
|
+
"showCancel": [4, "show-cancel"],
|
|
276
|
+
"showSort": [4, "show-sort"],
|
|
277
|
+
"showFilterLength": [2, "show-filter-length"],
|
|
278
|
+
"multiple": [4],
|
|
279
|
+
"heading": [1],
|
|
280
|
+
"okBtnText": [1, "ok-btn-text"],
|
|
281
|
+
"filterPlaceholderText": [1, "filter-placeholder-text"],
|
|
282
|
+
"sortBy": [1, "sort-by"],
|
|
283
|
+
"lastSortyBy": [32],
|
|
284
|
+
"filterFields": [32],
|
|
285
|
+
"_lang": [32],
|
|
286
|
+
"_t9nLocale": [32],
|
|
287
|
+
"_t9nStrings": [32],
|
|
288
|
+
"setFocus": [64],
|
|
289
|
+
"reposition": [64]
|
|
290
|
+
}]);
|
|
291
|
+
function defineCustomElement$1() {
|
|
292
|
+
if (typeof customElements === "undefined") {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const components = ["arcgis-field-pick-list", "arcgis-field-info"];
|
|
296
|
+
components.forEach(tagName => { switch (tagName) {
|
|
297
|
+
case "arcgis-field-pick-list":
|
|
298
|
+
if (!customElements.get(tagName)) {
|
|
299
|
+
customElements.define(tagName, ArcgisFieldPickList$1);
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
302
|
+
case "arcgis-field-info":
|
|
303
|
+
if (!customElements.get(tagName)) {
|
|
304
|
+
defineCustomElement$2();
|
|
305
|
+
}
|
|
306
|
+
break;
|
|
307
|
+
} });
|
|
308
|
+
}
|
|
309
|
+
defineCustomElement$1();
|
|
310
|
+
|
|
311
|
+
const ArcgisFieldPickList = ArcgisFieldPickList$1;
|
|
312
|
+
const defineCustomElement = defineCustomElement$1;
|
|
313
|
+
|
|
314
|
+
export { ArcgisFieldPickList, defineCustomElement };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { f as importCoreReactiveUtils, n as newIdentityOAuthInfo, g as importIdentityIdentityManager } from './index2.js';
|
|
3
3
|
|
|
4
4
|
const identityCss = ":host{display:none}arcgis-identity{display:none}";
|
|
5
5
|
|