@esri/solutions-components 0.8.23 → 0.8.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/arcgis-login.cjs.entry.js +1 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +1 -1
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{calcite-avatar.cjs.entry.js → calcite-avatar_2.cjs.entry.js} +62 -0
- package/dist/cjs/calcite-block_5.cjs.entry.js +12 -3
- package/dist/cjs/calcite-dropdown-group_2.cjs.entry.js +419 -0
- package/dist/cjs/{calcite-dropdown_4.cjs.entry.js → calcite-dropdown_2.cjs.entry.js} +12 -435
- package/dist/cjs/calcite-flow_6.cjs.entry.js +23 -27
- package/dist/cjs/card-manager_3.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +56 -36
- package/dist/cjs/feature-list.cjs.entry.js +4 -3
- package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
- package/dist/cjs/instant-apps-create.cjs.entry.js +266 -0
- package/dist/cjs/instant-apps-export.cjs.entry.js +31 -16
- package/dist/cjs/instant-apps-header.cjs.entry.js +3 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +11 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +45 -9
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +168 -0
- package/dist/cjs/{languageSwitcher-395021d6.js → languageSwitcher-b9a1485c.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/resources-fa37e40f.js +26 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/arcgis-login/arcgis-login.js +1 -1
- package/dist/collection/components/basemap-gallery/basemap-gallery.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/create-feature/create-feature.js +1 -1
- package/dist/collection/components/create-related-feature/create-related-feature.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +56 -45
- package/dist/collection/components/feature-details/feature-details.js +56 -13
- package/dist/collection/components/feature-list/feature-list.js +22 -3
- package/dist/collection/components/layer-list/layer-list.js +6 -13
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/demos/crowdsource-reporter.html +22 -15
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/components/arcgis-login.js +1 -1
- package/dist/components/basemap-gallery2.js +1 -1
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/calcite-navigation-user.js +1 -99
- package/dist/components/card-manager2.js +1 -1
- package/dist/components/create-feature2.js +1 -1
- package/dist/components/create-related-feature2.js +1 -1
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.js +57 -37
- package/dist/components/feature-details2.js +16 -12
- package/dist/components/feature-list2.js +5 -3
- package/dist/components/helpers.js +3 -2
- package/dist/components/instant-apps-ckeditor-wrapper2.js +1 -1
- package/dist/components/instant-apps-create.js +317 -0
- package/dist/components/instant-apps-export.js +32 -16
- package/dist/components/instant-apps-filter-list2.js +6 -1
- package/dist/components/instant-apps-header2.js +3 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +12 -5
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +2 -2
- package/dist/components/instant-apps-landing-page.js +91 -16
- package/dist/components/instant-apps-language-translator2.js +3 -1
- package/dist/components/instant-apps-sign-in.js +11 -0
- package/dist/components/instant-apps-sign-in2.js +243 -0
- package/dist/components/instant-apps-social-share2.js +8 -2
- package/dist/components/layer-list2.js +6 -13
- package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
- package/dist/components/public-notification.js +3 -3
- package/dist/esm/arcgis-login.entry.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +1 -1
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/{calcite-avatar.entry.js → calcite-avatar_2.entry.js} +64 -3
- package/dist/esm/calcite-block_5.entry.js +12 -3
- package/dist/esm/calcite-color-picker-hex-input_2.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +1 -1
- package/dist/esm/calcite-dropdown-group_2.entry.js +414 -0
- package/dist/esm/{calcite-dropdown_4.entry.js → calcite-dropdown_2.entry.js} +2 -423
- package/dist/esm/calcite-flow_6.entry.js +23 -27
- package/dist/esm/card-manager_3.entry.js +1 -1
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +56 -36
- package/dist/esm/feature-list.entry.js +4 -3
- package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
- package/dist/esm/instant-apps-create.entry.js +262 -0
- package/dist/esm/instant-apps-export.entry.js +31 -16
- package/dist/esm/instant-apps-header.entry.js +3 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +11 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +1 -1
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend.entry.js +1 -1
- package/dist/esm/instant-apps-landing-page.entry.js +46 -10
- package/dist/esm/instant-apps-language-switcher.entry.js +1 -1
- package/dist/esm/instant-apps-language-translator.entry.js +1 -1
- package/dist/esm/instant-apps-sign-in.entry.js +164 -0
- package/dist/esm/{languageSwitcher-a4a615e4.js → languageSwitcher-d60f03b2.js} +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/resources-16800cce.js +24 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-6419e941.js → utils-251cb6de.js} +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-create/instant-apps-create.css +150 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +16 -9
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +19 -0
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-sign-in/instant-apps-sign-in.css +98 -0
- package/dist/solutions-components/demos/crowdsource-reporter.html +22 -15
- package/dist/solutions-components/p-1251dcc6.entry.js +6 -0
- package/dist/solutions-components/{p-88495699.entry.js → p-16730f05.entry.js} +1 -1
- package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
- package/dist/solutions-components/{p-63460d51.entry.js → p-1ff9eb95.entry.js} +1 -1
- package/dist/solutions-components/{p-8f6e0ae5.entry.js → p-26eb1225.entry.js} +1 -1
- package/dist/solutions-components/{p-3a2e0188.entry.js → p-2c044250.entry.js} +2 -2
- package/dist/solutions-components/p-314dc933.entry.js +6 -0
- package/dist/solutions-components/p-50741707.entry.js +6 -0
- package/dist/solutions-components/p-614ebce7.js +6 -0
- package/dist/solutions-components/{p-df73649e.entry.js → p-77cd573b.entry.js} +1 -1
- package/dist/solutions-components/{p-c95dcdf7.entry.js → p-7883b885.entry.js} +3 -3
- package/dist/solutions-components/p-79e2e203.entry.js +6 -0
- package/dist/solutions-components/{p-968a6fd8.entry.js → p-7b17e929.entry.js} +1 -1
- package/dist/solutions-components/p-80b3eb6b.entry.js +6 -0
- package/dist/solutions-components/p-84913712.js +6 -0
- package/dist/solutions-components/p-8c500fd7.entry.js +6 -0
- package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
- package/dist/solutions-components/{p-667c022f.entry.js → p-af4be4ce.entry.js} +1 -1
- package/dist/solutions-components/p-bb2e669d.entry.js +6 -0
- package/dist/solutions-components/p-c41997d5.js +11 -0
- package/dist/solutions-components/p-c512fcfb.entry.js +6 -0
- package/dist/solutions-components/{p-21d6360a.entry.js → p-c7f0e7a8.entry.js} +1 -1
- package/dist/solutions-components/{p-64da5bb8.entry.js → p-cbf0dada.entry.js} +3 -3
- package/dist/solutions-components/{p-9c7d4343.entry.js → p-cd91c3e7.entry.js} +1 -1
- package/dist/solutions-components/p-ceba37d3.entry.js +11 -0
- package/dist/solutions-components/{p-09b769b7.entry.js → p-d8a15e32.entry.js} +1 -1
- package/dist/solutions-components/p-d8da6406.entry.js +6 -0
- package/dist/solutions-components/p-da6b3c8a.entry.js +6 -0
- package/dist/solutions-components/{p-60f1055e.entry.js → p-e2400b0d.entry.js} +1 -1
- package/dist/solutions-components/p-e78be59a.entry.js +6 -0
- package/dist/solutions-components/p-f35cc7ae.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +1 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
- package/dist/types/components/feature-details/feature-details.d.ts +13 -1
- package/dist/types/components/feature-list/feature-list.d.ts +4 -0
- package/dist/types/components/layer-list/layer-list.d.ts +1 -1
- package/dist/types/components.d.ts +25 -2
- package/dist/types/preact.d.ts +7 -2
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/calcite-navigation-user.cjs.entry.js +0 -73
- package/dist/solutions-components/p-08a1e120.js +0 -6
- package/dist/solutions-components/p-3283660c.entry.js +0 -6
- package/dist/solutions-components/p-33647277.entry.js +0 -6
- package/dist/solutions-components/p-3af0764f.entry.js +0 -6
- package/dist/solutions-components/p-41d288c0.entry.js +0 -6
- package/dist/solutions-components/p-599dcc29.js +0 -6
- package/dist/solutions-components/p-64b4b579.entry.js +0 -11
- package/dist/solutions-components/p-ab96dd27.entry.js +0 -6
- package/dist/solutions-components/p-bb0c7be3.entry.js +0 -17
- package/dist/solutions-components/p-bb8e3add.entry.js +0 -11
- package/dist/solutions-components/p-c36bb8ca.entry.js +0 -6
- package/dist/solutions-components/p-cbe166fc.entry.js +0 -6
- package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
- package/dist/solutions-components/p-f6a1673c.entry.js +0 -6
@@ -52,7 +52,7 @@ const ArcgisLogin = class {
|
|
52
52
|
//
|
53
53
|
//--------------------------------------------------------------------------
|
54
54
|
render() {
|
55
|
-
return (index.h(index.Host, { key: '
|
55
|
+
return (index.h(index.Host, { key: 'b71ecf635ef91c3604665890c3eec5c5bc51651c' }, index.h("slot", { key: '77c4af2284404bc351b1eb93a81b2151f8e8cce1' })));
|
56
56
|
}
|
57
57
|
get el() { return index.getElement(this); }
|
58
58
|
};
|
@@ -56,7 +56,7 @@ const BasemapGallery = class {
|
|
56
56
|
* StencilJS: Renders the component.
|
57
57
|
*/
|
58
58
|
render() {
|
59
|
-
return (index.h(index.Host, { key: '
|
59
|
+
return (index.h(index.Host, { key: '7fe5ef48d77de087f17498e2e1f3370a069e8629' }, index.h("div", { key: 'aca555c687352046a138343cab6f656234069644', ref: (el) => { this._basemapElement = el; } })));
|
60
60
|
}
|
61
61
|
/**
|
62
62
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -87,7 +87,7 @@ const BufferTools = class {
|
|
87
87
|
* Renders the component.
|
88
88
|
*/
|
89
89
|
render() {
|
90
|
-
return (index.h(index.Host, { key: '
|
90
|
+
return (index.h(index.Host, { key: '63b775eca8dd10785df7b58be3a79eaa6cf4c049' }, this.appearance === "text" ? this._getTextBoxDisplay() : this._getSliderDisplay()));
|
91
91
|
}
|
92
92
|
//--------------------------------------------------------------------------
|
93
93
|
//
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
11
|
const dom = require('./dom-1c78fa73.js');
|
12
12
|
const utils = require('./utils-518745e7.js');
|
13
|
+
const loadable = require('./loadable-b374ef4b.js');
|
13
14
|
require('./guid-a7528dfa.js');
|
14
15
|
require('./resources-1c0e54c1.js');
|
15
16
|
|
@@ -148,4 +149,65 @@ const Avatar = class {
|
|
148
149
|
};
|
149
150
|
Avatar.style = CalciteAvatarStyle0;
|
150
151
|
|
152
|
+
/*!
|
153
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
154
|
+
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
155
|
+
* v2.8.2
|
156
|
+
*/
|
157
|
+
const CSS = {
|
158
|
+
textContainer: "text-container",
|
159
|
+
fullName: "full-name",
|
160
|
+
username: "username",
|
161
|
+
button: "button",
|
162
|
+
};
|
163
|
+
|
164
|
+
const navigationUserCss = ":host{display:inline-flex;outline:2px solid transparent;outline-offset:2px}:host .button{background-color:transparent;border:none;margin:0px;display:flex;cursor:pointer;align-items:center;justify-content:center;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-0);line-height:1.25rem;outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end:2px solid transparent}:host(:hover) .button,:host(:focus) .button{background-color:var(--calcite-color-foreground-2)}:host(:focus) .button{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host(:active) .button{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}:host([active]) .button{border-color:var(--calcite-color-brand);color:var(--calcite-color-text-1);--calcite-ui-icon-color:var(--calcite-color-brand)}.text-container{margin-block-start:0.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}calcite-avatar{padding-inline:1rem}calcite-avatar~.text-container{padding-inline-start:0px}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.username{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host([hidden]){display:none}[hidden]{display:none}";
|
165
|
+
const CalciteNavigationUserStyle0 = navigationUserCss;
|
166
|
+
|
167
|
+
const CalciteNavigationUser = class {
|
168
|
+
constructor(hostRef) {
|
169
|
+
index.registerInstance(this, hostRef);
|
170
|
+
this.active = undefined;
|
171
|
+
this.fullName = undefined;
|
172
|
+
this.label = undefined;
|
173
|
+
this.textDisabled = false;
|
174
|
+
this.thumbnail = undefined;
|
175
|
+
this.userId = undefined;
|
176
|
+
this.username = undefined;
|
177
|
+
}
|
178
|
+
//--------------------------------------------------------------------------
|
179
|
+
//
|
180
|
+
// Public Methods
|
181
|
+
//
|
182
|
+
//--------------------------------------------------------------------------
|
183
|
+
/** Sets focus on the component. */
|
184
|
+
async setFocus() {
|
185
|
+
await loadable.componentFocusable(this);
|
186
|
+
this.el.focus();
|
187
|
+
}
|
188
|
+
//--------------------------------------------------------------------------
|
189
|
+
//
|
190
|
+
// Lifecycle
|
191
|
+
//
|
192
|
+
//--------------------------------------------------------------------------
|
193
|
+
componentWillLoad() {
|
194
|
+
loadable.setUpLoadableComponent(this);
|
195
|
+
}
|
196
|
+
componentDidLoad() {
|
197
|
+
loadable.setComponentLoaded(this);
|
198
|
+
}
|
199
|
+
// --------------------------------------------------------------------------
|
200
|
+
//
|
201
|
+
// Render Methods
|
202
|
+
//
|
203
|
+
// --------------------------------------------------------------------------
|
204
|
+
render() {
|
205
|
+
return (index.h(index.Host, { key: '869bc0b518ff407bf3f110ebda48571f456229a8' }, index.h("button", { key: '0cb5497ebcbf9fad2bfb6ffdd3bfad151594460d', "aria-label": this.label, class: CSS.button }, index.h("calcite-avatar", { key: '6de54637d077afa83f7520636037b6da33b24334', "full-name": this.fullName, label: this.label, thumbnail: this.thumbnail, "user-id": this.userId, username: this.username }), (this.fullName || this.username) && !this.textDisabled && (index.h("div", { key: '0d0be3d6ba276d6c3e24a67b7085dd75e56b3e5b', class: CSS.textContainer }, this.fullName && (index.h("span", { class: CSS.fullName, key: CSS.fullName }, this.fullName)), this.username && (index.h("span", { class: CSS.username, key: CSS.username }, this.username)))))));
|
206
|
+
}
|
207
|
+
static get delegatesFocus() { return true; }
|
208
|
+
get el() { return index.getElement(this); }
|
209
|
+
};
|
210
|
+
CalciteNavigationUser.style = CalciteNavigationUserStyle0;
|
211
|
+
|
151
212
|
exports.calcite_avatar = Avatar;
|
213
|
+
exports.calcite_navigation_user = CalciteNavigationUser;
|
@@ -2015,7 +2015,12 @@ const InstantAppsFilterList = class {
|
|
2015
2015
|
update = this.updateCodedValueExpression(expression, layerField);
|
2016
2016
|
}
|
2017
2017
|
else if (type === 'range') {
|
2018
|
-
|
2018
|
+
if (expression.displayOption === 'drop-down') {
|
2019
|
+
update = await this.updateStringExpression(layerExpression, expression);
|
2020
|
+
}
|
2021
|
+
else {
|
2022
|
+
update = this.updateRangeExpression(expression, layerField);
|
2023
|
+
}
|
2019
2024
|
}
|
2020
2025
|
else if (expression.active && (type === 'checkbox' || type == null)) {
|
2021
2026
|
update = true;
|
@@ -2555,6 +2560,8 @@ const InstantAppsSocialShare = class {
|
|
2555
2560
|
this.successMessage = '';
|
2556
2561
|
this.defaultUrlParams = null;
|
2557
2562
|
this.inlineSuccessPopoverPlacement = 'trailing';
|
2563
|
+
this.popoverPositioning = 'absolute';
|
2564
|
+
this.removePopoverOffset = false;
|
2558
2565
|
this.messages = undefined;
|
2559
2566
|
this.opened = false;
|
2560
2567
|
this.copied = false;
|
@@ -2672,9 +2679,11 @@ const InstantAppsSocialShare = class {
|
|
2672
2679
|
const content = this.copied && this.mode === 'popover' ? (this.renderSuccess()) : (index.h("div", { class: CSS.dialogContent }, this.renderOptions(), this.displayTipText ? this.renderTip() : null, this.embed ? this.renderEmbed() : null));
|
2673
2680
|
const layoutClass = this.shareIconsLayout === 'vertical' ? ` ${CSS.layout.vertical}` : ` ${CSS.layout.horizontal}`;
|
2674
2681
|
const dialogContent = (index.h("div", { ref: el => (this.dialogContentRef = el), class: `${CSS.dialog}${layoutClass}` }, content));
|
2682
|
+
const defaultOffset = 6;
|
2683
|
+
const offsetDistance = this.removePopoverOffset ? 0 : defaultOffset;
|
2675
2684
|
return (index.h(index.Host, null, this.mode === 'popover'
|
2676
2685
|
? [
|
2677
|
-
index.h("calcite-popover", { ref: (el) => (this.popoverRef = el), label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, referenceElement: "shareButton", placement: "bottom-start", scale: this.scale }, dialogContent),
|
2686
|
+
index.h("calcite-popover", { ref: (el) => (this.popoverRef = el), label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, referenceElement: "shareButton", placement: "bottom-start", scale: this.scale, "overlay-positioning": this.popoverPositioning, "offset-distance": offsetDistance, "pointer-disabled": this.removePopoverOffset }, dialogContent),
|
2678
2687
|
this.renderButton(),
|
2679
2688
|
]
|
2680
2689
|
: [
|
@@ -2726,7 +2735,7 @@ const InstantAppsSocialShare = class {
|
|
2726
2735
|
}
|
2727
2736
|
renderXIcon() {
|
2728
2737
|
const isCalciteModeDark = !!this.el.closest(CALCITE_MODE_DARK);
|
2729
|
-
return (index.h("svg", { class: isCalciteModeDark ? CSS.xLogo.dark : CSS.xLogo.light,
|
2738
|
+
return (index.h("svg", { class: isCalciteModeDark ? CSS.xLogo.dark : CSS.xLogo.light, viewBox: "0 0 1200 1227", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { height: "400", style: { fill: 'none' }, width: "400", x: "56", y: "56" }), index.h("path", { d: "M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z", fill: isCalciteModeDark ? 'white' : 'black' })));
|
2730
2739
|
}
|
2731
2740
|
renderLinkedInIcon() {
|
2732
2741
|
return (index.h("svg", { height: "100%", style: { fillRule: 'evenodd', clipRule: 'evenodd', strokeLinejoin: 'round', strokeMiterlimit: '2' }, version: "1.1", viewBox: "0 0 512 512", width: "100%", xmlns: "http://www.w3.org/2000/svg" }, index.h("g", { id: "g5891" }, index.h("path", { d: "M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z", id: "background", style: { fill: '#2867b2' } }), index.h("g", { id: "shapes" }, index.h("rect", { height: "257.962", id: "rect11", style: { fill: '#fff' }, width: "85.76", x: "61.053", y: "178.667" }), index.h("path", { d: "M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z", id: "path13-0", style: { fill: '#fff', fillRule: 'nonzero' } }), index.h("path", { d: "M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z", id: "path15", style: { fill: '#fff', fillRule: 'nonzero' } })))));
|
@@ -0,0 +1,419 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
9
|
+
|
10
|
+
const index = require('./index-79b35510.js');
|
11
|
+
const observers = require('./observers-4fa351d9.js');
|
12
|
+
const resources = require('./resources-fa37e40f.js');
|
13
|
+
const locale = require('./locale-48d76c59.js');
|
14
|
+
const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
|
15
|
+
const publicNotificationStore = require('./publicNotificationStore-3bfbbed3.js');
|
16
|
+
require('./esri-loader-fce6a9cb.js');
|
17
|
+
require('./interfaces-7cd0a48a.js');
|
18
|
+
require('./index-c078ea5f.js');
|
19
|
+
|
20
|
+
const dropdownGroupCss = ":host{position:relative;display:block}.container{text-align:start}.container--s{font-size:var(--calcite-font-size--2);line-height:1rem}.container--s .dropdown-title{padding:0.5rem}.container--m{font-size:var(--calcite-font-size--1);line-height:1rem}.container--m .dropdown-title{padding:0.75rem}.container--l{font-size:var(--calcite-font-size-0);line-height:1.25rem}.container--l .dropdown-title{padding:1rem}.dropdown-title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-color-text-2)}.dropdown-separator{display:block;block-size:1px;background-color:var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}";
|
21
|
+
const CalciteDropdownGroupStyle0 = dropdownGroupCss;
|
22
|
+
|
23
|
+
const DropdownGroup = class {
|
24
|
+
constructor(hostRef) {
|
25
|
+
index.registerInstance(this, hostRef);
|
26
|
+
this.calciteInternalDropdownItemChange = index.createEvent(this, "calciteInternalDropdownItemChange", 6);
|
27
|
+
this.updateItems = () => {
|
28
|
+
Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach((item) => (item.selectionMode = this.selectionMode));
|
29
|
+
};
|
30
|
+
this.mutationObserver = observers.createObserver("mutation", () => this.updateItems());
|
31
|
+
this.groupTitle = undefined;
|
32
|
+
this.scale = "m";
|
33
|
+
this.selectionMode = "single";
|
34
|
+
}
|
35
|
+
handlePropsChange() {
|
36
|
+
this.updateItems();
|
37
|
+
}
|
38
|
+
//--------------------------------------------------------------------------
|
39
|
+
//
|
40
|
+
// Lifecycle
|
41
|
+
//
|
42
|
+
//--------------------------------------------------------------------------
|
43
|
+
connectedCallback() {
|
44
|
+
var _a;
|
45
|
+
this.updateItems();
|
46
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
47
|
+
}
|
48
|
+
componentWillLoad() {
|
49
|
+
this.groupPosition = this.getGroupPosition();
|
50
|
+
}
|
51
|
+
disconnectedCallback() {
|
52
|
+
var _a;
|
53
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
54
|
+
}
|
55
|
+
render() {
|
56
|
+
const groupTitle = this.groupTitle ? (index.h("span", { "aria-hidden": "true", class: "dropdown-title" }, this.groupTitle)) : null;
|
57
|
+
const dropdownSeparator = this.groupPosition > 0 ? index.h("div", { class: "dropdown-separator", role: "separator" }) : null;
|
58
|
+
return (index.h(index.Host, { key: 'c1b662afcbb612d775cea66edb949d71f5f63167', "aria-label": this.groupTitle, role: "group" }, index.h("div", { key: 'cdfdb0919b1b6006f69f7fbcda0c16c2beefec5e', class: {
|
59
|
+
[resources.CSS.container]: true,
|
60
|
+
[`${resources.CSS.container}--${this.scale}`]: true,
|
61
|
+
} }, dropdownSeparator, groupTitle, index.h("slot", { key: '166c8236f3315d2f038f61b0619270d2bd9b344a' }))));
|
62
|
+
}
|
63
|
+
//--------------------------------------------------------------------------
|
64
|
+
//
|
65
|
+
// Event Listeners
|
66
|
+
//
|
67
|
+
//--------------------------------------------------------------------------
|
68
|
+
updateActiveItemOnChange(event) {
|
69
|
+
this.requestedDropdownGroup = event.detail.requestedDropdownGroup;
|
70
|
+
this.requestedDropdownItem = event.detail.requestedDropdownItem;
|
71
|
+
this.calciteInternalDropdownItemChange.emit({
|
72
|
+
requestedDropdownGroup: this.requestedDropdownGroup,
|
73
|
+
requestedDropdownItem: this.requestedDropdownItem,
|
74
|
+
});
|
75
|
+
}
|
76
|
+
//--------------------------------------------------------------------------
|
77
|
+
//
|
78
|
+
// Private Methods
|
79
|
+
//
|
80
|
+
//--------------------------------------------------------------------------
|
81
|
+
getGroupPosition() {
|
82
|
+
return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-dropdown-group"), this.el);
|
83
|
+
}
|
84
|
+
static get delegatesFocus() { return true; }
|
85
|
+
get el() { return index.getElement(this); }
|
86
|
+
static get watchers() { return {
|
87
|
+
"selectionMode": ["handlePropsChange"]
|
88
|
+
}; }
|
89
|
+
};
|
90
|
+
DropdownGroup.style = CalciteDropdownGroupStyle0;
|
91
|
+
|
92
|
+
const mapLayerPickerCss = ":host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom:0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}";
|
93
|
+
const MapLayerPickerStyle0 = mapLayerPickerCss;
|
94
|
+
|
95
|
+
const MapLayerPicker = class {
|
96
|
+
constructor(hostRef) {
|
97
|
+
index.registerInstance(this, hostRef);
|
98
|
+
this.idsFound = index.createEvent(this, "idsFound", 7);
|
99
|
+
this.noLayersFound = index.createEvent(this, "noLayersFound", 7);
|
100
|
+
this.layerSelectionChange = index.createEvent(this, "layerSelectionChange", 7);
|
101
|
+
//--------------------------------------------------------------------------
|
102
|
+
//
|
103
|
+
// Properties (protected)
|
104
|
+
//
|
105
|
+
//--------------------------------------------------------------------------
|
106
|
+
/**
|
107
|
+
* boolean: When true the default layer has been loaded once and should no longer be used
|
108
|
+
*/
|
109
|
+
this.defaultLayerHonored = false;
|
110
|
+
this.appearance = "transparent";
|
111
|
+
this.defaultLayerId = "";
|
112
|
+
this.display = "inline-block";
|
113
|
+
this.enabledLayerIds = [];
|
114
|
+
this.enabledTableIds = [];
|
115
|
+
this.height = undefined;
|
116
|
+
this.isMobile = undefined;
|
117
|
+
this.mapView = undefined;
|
118
|
+
this.onlyShowUpdatableLayers = undefined;
|
119
|
+
this.placeholderIcon = "";
|
120
|
+
this.selectedIds = [];
|
121
|
+
this.scale = "m";
|
122
|
+
this.showTables = undefined;
|
123
|
+
this.showSingleLayerAsLabel = false;
|
124
|
+
this.type = "select";
|
125
|
+
this._hasMultipleLayers = true;
|
126
|
+
this._hasValidLayers = true;
|
127
|
+
this._isDropdownOpen = undefined;
|
128
|
+
this.ids = [];
|
129
|
+
this.selectedName = "";
|
130
|
+
this._translations = undefined;
|
131
|
+
}
|
132
|
+
//--------------------------------------------------------------------------
|
133
|
+
//
|
134
|
+
// Watch handlers
|
135
|
+
//
|
136
|
+
//--------------------------------------------------------------------------
|
137
|
+
/**
|
138
|
+
* Called each time the mapView prop is changed.
|
139
|
+
*/
|
140
|
+
async mapViewWatchHandler() {
|
141
|
+
await this._setLayers();
|
142
|
+
if (this.ids.length > 0) {
|
143
|
+
this._hasValidLayers = true;
|
144
|
+
this._hasMultipleLayers = this.ids.length > 1;
|
145
|
+
this._setSelectedLayer(this.ids[0]);
|
146
|
+
}
|
147
|
+
else {
|
148
|
+
this._hasValidLayers = false;
|
149
|
+
this.noLayersFound.emit();
|
150
|
+
}
|
151
|
+
}
|
152
|
+
//--------------------------------------------------------------------------
|
153
|
+
//
|
154
|
+
// Functions (lifecycle)
|
155
|
+
//
|
156
|
+
//--------------------------------------------------------------------------
|
157
|
+
/**
|
158
|
+
* StencilJS: Called once just after the component is first connected to the DOM.
|
159
|
+
*/
|
160
|
+
async componentWillLoad() {
|
161
|
+
await this._getTranslations();
|
162
|
+
await this._setLayers();
|
163
|
+
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
164
|
+
this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
/**
|
168
|
+
* Renders the component.
|
169
|
+
*/
|
170
|
+
render() {
|
171
|
+
const id = "map-layer-picker";
|
172
|
+
let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
|
173
|
+
style = Object.assign(Object.assign({}, style), { "display": this.display });
|
174
|
+
return (index.h(index.Host, { key: 'ccb8c7d12a2e631938308380cd4ecd0a1d73c963' }, index.h("div", { key: 'aa0992de9bab1c5a555d51542c093cc7cb948200', class: "map-layer-picker-container", style: style }, index.h("div", { key: 'a03bca67eb822b492d34abe53db7d05e6fd7ebdf', class: "map-layer-picker", style: style }, !this._hasValidLayers ? this._getInvalidPlaceholder() :
|
175
|
+
!this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
|
176
|
+
this.type === "combobox" ? this._getCombobox(id) :
|
177
|
+
this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
|
178
|
+
}
|
179
|
+
/**
|
180
|
+
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
181
|
+
*/
|
182
|
+
async componentDidLoad() {
|
183
|
+
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
184
|
+
const id = this.selectedIds.length === 1 ? this.selectedIds[0] : this.ids[0];
|
185
|
+
if (this.type === "select") {
|
186
|
+
this._layerElement.value = id;
|
187
|
+
}
|
188
|
+
else if (this.type === "dropdown") {
|
189
|
+
this.selectedName = Object.keys(this._layerNameHash).indexOf(id) > -1 ?
|
190
|
+
this._layerNameHash[id].name : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
|
191
|
+
this._tableNameHash[id].name : "";
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
//--------------------------------------------------------------------------
|
196
|
+
//
|
197
|
+
// Functions (protected)
|
198
|
+
//
|
199
|
+
//--------------------------------------------------------------------------
|
200
|
+
/**
|
201
|
+
* Create a notice to inform the user that no layers were found
|
202
|
+
*
|
203
|
+
* @returns Calcite Notice component with the message
|
204
|
+
*/
|
205
|
+
_getInvalidPlaceholder() {
|
206
|
+
return (index.h("div", null, index.h("calcite-notice", { class: "height-100", icon: "exclamation-mark-triangle", id: "no-valid-layers", kind: "danger", open: true }, index.h("div", { slot: "message" }, this._translations.noLayersFound)), index.h("calcite-tooltip", { label: this._translations.enableEditUpdate, placement: "bottom", "reference-element": "no-valid-layers" }, index.h("span", null, this._translations.enableEditUpdate))));
|
207
|
+
}
|
208
|
+
/**
|
209
|
+
* Show layer name as a label with icon
|
210
|
+
*
|
211
|
+
* @returns Calcite label with the layer name and icon
|
212
|
+
*/
|
213
|
+
_getSingleLayerPlaceholder() {
|
214
|
+
return (index.h("div", { class: "layer-picker-label-container cursor-default" }, index.h("calcite-icon", { icon: "layers", scale: "s" }), index.h("calcite-label", { class: "no-bottom-margin padding-start-1" }, this.selectedName)));
|
215
|
+
}
|
216
|
+
/**
|
217
|
+
* Create a list of layers from the map
|
218
|
+
* Used for selecting a single layer.
|
219
|
+
*
|
220
|
+
* @param id the id for the select component used to support the tooltip
|
221
|
+
*
|
222
|
+
* @returns Calcite Select component with the ids of the layers from the map
|
223
|
+
*/
|
224
|
+
_getSelect(id) {
|
225
|
+
return (index.h("calcite-select", { id: id, label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this._getMapLayerOptions()));
|
226
|
+
}
|
227
|
+
/**
|
228
|
+
* Create a list of layer ids from the map
|
229
|
+
* Used for selecting multiple layers
|
230
|
+
*
|
231
|
+
* @param id the id for the combobox component used to support the tooltip
|
232
|
+
*
|
233
|
+
* @returns Calcite ComboBox component with the ids of the layers from the map
|
234
|
+
*/
|
235
|
+
_getCombobox(id) {
|
236
|
+
return (index.h("calcite-combobox", { clearDisabled: true, id: id, label: "", onCalciteComboboxChange: () => this._layerSelectionChange(), "placeholder-icon": this.placeholderIcon, ref: (el) => { this._layerElement = el; }, scale: this.scale, "selection-mode": "single" }, this._getMapLayerOptions()));
|
237
|
+
}
|
238
|
+
/**
|
239
|
+
* Hydrate a dropdown component with items to display the layer names
|
240
|
+
*
|
241
|
+
* @param id the id for the dropdown component used to support the tooltip
|
242
|
+
*
|
243
|
+
* @returns Array of Dropdown items with layer names
|
244
|
+
*/
|
245
|
+
_getDropdown(id) {
|
246
|
+
return (index.h("calcite-dropdown", { class: "layer-picker-dropdown", onCalciteDropdownBeforeClose: () => this._isDropdownOpen = false, onCalciteDropdownBeforeOpen: () => this._isDropdownOpen = true }, this.isMobile ? this._getDropdownButton() : this._getActionDropdownButton(id), index.h("calcite-dropdown-group", { "selection-mode": "single" }, this._getMapLayerOptions())));
|
247
|
+
}
|
248
|
+
/**
|
249
|
+
* Get the button that will open the dropdown list wrapped in an action
|
250
|
+
*
|
251
|
+
* @returns the node for the action and button
|
252
|
+
*/
|
253
|
+
_getActionDropdownButton(id) {
|
254
|
+
return (index.h("calcite-action", { id: id, slot: "trigger", text: "" }, this._getDropdownButton()));
|
255
|
+
}
|
256
|
+
/**
|
257
|
+
* Get the button that will open the dropdown list
|
258
|
+
*
|
259
|
+
* @returns the node for the button
|
260
|
+
*/
|
261
|
+
_getDropdownButton() {
|
262
|
+
const buttonClass = this.isMobile ? "" : "max-width-350";
|
263
|
+
const buttonSlot = this.isMobile ? "trigger" : "";
|
264
|
+
const buttonIcon = this._isDropdownOpen ? "chevron-up" : "chevron-down";
|
265
|
+
return (index.h("calcite-button", { alignment: "icon-end-space-between", appearance: this.appearance, class: buttonClass, iconEnd: buttonIcon, iconStart: "layers", kind: "neutral", slot: buttonSlot, width: "full" }, index.h("div", null, this.selectedName)));
|
266
|
+
}
|
267
|
+
/**
|
268
|
+
* Get the appropriate type of dom nodes for each valid layer or table
|
269
|
+
*
|
270
|
+
* @returns Array of dom nodes with the names of the layers and optionally of the tables
|
271
|
+
*/
|
272
|
+
_getMapLayerOptions() {
|
273
|
+
return this.ids.reduce((prev, cur) => {
|
274
|
+
if (this._validLayer(cur)) {
|
275
|
+
prev.push(this._getItem(cur, "layer"));
|
276
|
+
}
|
277
|
+
else if (this._validTable(cur)) {
|
278
|
+
prev.push(this._getItem(cur, "table"));
|
279
|
+
}
|
280
|
+
return prev;
|
281
|
+
}, []);
|
282
|
+
}
|
283
|
+
/**
|
284
|
+
* Get the appropriate type of dom node for the current layer or table id
|
285
|
+
*
|
286
|
+
* @returns A dom node with the name of the layer or table
|
287
|
+
*/
|
288
|
+
_getItem(id, itemType) {
|
289
|
+
const item = itemType === "layer" ? this._layerNameHash[id] : this._tableNameHash[id];
|
290
|
+
const disabled = this.onlyShowUpdatableLayers ? !item.supportsUpdate : false;
|
291
|
+
const name = item.name;
|
292
|
+
const selected = this.selectedIds.indexOf(id) > -1;
|
293
|
+
return this.type === "combobox" ? (index.h("calcite-combobox-item", { disabled: disabled, selected: selected, textLabel: name, value: id })) :
|
294
|
+
this.type === "select" ? (index.h("calcite-option", { disabled: disabled, label: name, selected: selected, value: id })) : (index.h("calcite-dropdown-group", { class: disabled ? "disabled" : "", selectionMode: disabled ? "none" : "single" }, index.h("calcite-dropdown-item", { onClick: disabled ? undefined : () => void this._setSelectedLayer(id), selected: selected }, name)));
|
295
|
+
}
|
296
|
+
/**
|
297
|
+
* Store the layer name based on the user selection
|
298
|
+
*/
|
299
|
+
_setSelectedLayer(id) {
|
300
|
+
let item;
|
301
|
+
const hasDefaultLayer = this.defaultLayerId && !this.defaultLayerHonored;
|
302
|
+
if (hasDefaultLayer) {
|
303
|
+
item = this._getLayerFromHash(this.defaultLayerId);
|
304
|
+
this.defaultLayerHonored = item !== undefined;
|
305
|
+
id = this.defaultLayerHonored ? this.defaultLayerId : id;
|
306
|
+
}
|
307
|
+
item = item ? item : this._getLayerFromHash(id);
|
308
|
+
this.selectedName = item === null || item === void 0 ? void 0 : item.name;
|
309
|
+
this.selectedIds = [id];
|
310
|
+
this.layerSelectionChange.emit(this.selectedIds);
|
311
|
+
}
|
312
|
+
/**
|
313
|
+
* Fetch layer hash info for the given id
|
314
|
+
*
|
315
|
+
* @returns ILayerHashInfo for the id
|
316
|
+
*/
|
317
|
+
_getLayerFromHash(id) {
|
318
|
+
return Object.keys(this._layerNameHash).indexOf(id) > -1 ?
|
319
|
+
this._layerNameHash[id] : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
|
320
|
+
this._tableNameHash[id] : undefined;
|
321
|
+
}
|
322
|
+
/**
|
323
|
+
* Fetch the ids of the layers from the map
|
324
|
+
*
|
325
|
+
* @returns Promise when the operation has completed
|
326
|
+
*/
|
327
|
+
async _setLayers() {
|
328
|
+
if (this.mapView) {
|
329
|
+
await this._initLayerTableHash();
|
330
|
+
const layerIds = this.onlyShowUpdatableLayers ?
|
331
|
+
this._getEditableIds(this._layerNameHash) : Object.keys(this._layerNameHash);
|
332
|
+
const tableIds = this.showTables ? this.onlyShowUpdatableLayers ?
|
333
|
+
this._getEditableIds(this._tableNameHash) : Object.keys(this._tableNameHash) : [];
|
334
|
+
this.ids = [
|
335
|
+
...layerIds.reverse().filter(n => { var _a; return ((_a = this.enabledLayerIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledLayerIds.reverse().indexOf(n) > -1 : true; }),
|
336
|
+
...tableIds.reverse().filter(n => { var _a; return ((_a = this.enabledTableIds) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.enabledTableIds.reverse().indexOf(n) > -1 : true; }),
|
337
|
+
];
|
338
|
+
this.idsFound.emit({
|
339
|
+
layerIds,
|
340
|
+
tableIds
|
341
|
+
});
|
342
|
+
}
|
343
|
+
}
|
344
|
+
/**
|
345
|
+
* Fetch the ids of all layers that support edits with the update capability
|
346
|
+
*
|
347
|
+
* @returns array of layer ids
|
348
|
+
*/
|
349
|
+
_getEditableIds(hash) {
|
350
|
+
return Object.keys(hash).reduce((prev, cur) => {
|
351
|
+
if (hash[cur].supportsUpdate) {
|
352
|
+
prev.push(cur);
|
353
|
+
}
|
354
|
+
return prev;
|
355
|
+
}, []);
|
356
|
+
}
|
357
|
+
/**
|
358
|
+
* Create a layer id:title hash for layer name display
|
359
|
+
*
|
360
|
+
* @returns Promise when the operation has completed
|
361
|
+
*/
|
362
|
+
async _initLayerTableHash() {
|
363
|
+
this._layerNameHash = await mapViewUtils.getMapLayerHash(this.mapView, this.onlyShowUpdatableLayers);
|
364
|
+
this._tableNameHash = this.showTables ? await mapViewUtils.getMapTableHash(this.mapView, this.onlyShowUpdatableLayers) : {};
|
365
|
+
}
|
366
|
+
/**
|
367
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
368
|
+
*
|
369
|
+
* @returns boolean when true the layer will be used in the current layer picker type
|
370
|
+
*/
|
371
|
+
_validLayer(id) {
|
372
|
+
var _a;
|
373
|
+
const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
374
|
+
return name && Object.keys(publicNotificationStore.state.managedLayers).indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
375
|
+
this.enabledLayerIds.indexOf(id) > -1 : true);
|
376
|
+
}
|
377
|
+
/**
|
378
|
+
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
379
|
+
*
|
380
|
+
* @returns boolean when true the table will be used in the current layer picker type
|
381
|
+
*/
|
382
|
+
_validTable(id) {
|
383
|
+
var _a;
|
384
|
+
const name = (_a = this._tableNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
385
|
+
const validName = name && this.showTables;
|
386
|
+
return validName ? publicNotificationStore.state.managedTables.indexOf(name) < 0 &&
|
387
|
+
(this.enabledTableIds.length > 0 ? this.enabledTableIds.indexOf(id) > -1 : true) : validName;
|
388
|
+
}
|
389
|
+
/**
|
390
|
+
* Fetch the ids of the layers from the map
|
391
|
+
*
|
392
|
+
* @returns Promise when the operation has completed
|
393
|
+
*/
|
394
|
+
_layerSelectionChange() {
|
395
|
+
const ids = Array.isArray(this._layerElement.value) ? this._layerElement.value : [this._layerElement.value];
|
396
|
+
if (JSON.stringify(ids) !== JSON.stringify([""])) {
|
397
|
+
this.selectedIds = ids;
|
398
|
+
this.layerSelectionChange.emit(this.selectedIds);
|
399
|
+
}
|
400
|
+
}
|
401
|
+
/**
|
402
|
+
* Fetches the component's translations
|
403
|
+
*
|
404
|
+
* @returns Promise when complete
|
405
|
+
* @protected
|
406
|
+
*/
|
407
|
+
async _getTranslations() {
|
408
|
+
const messages = await locale.getLocaleComponentStrings(this.el);
|
409
|
+
this._translations = messages[0];
|
410
|
+
}
|
411
|
+
get el() { return index.getElement(this); }
|
412
|
+
static get watchers() { return {
|
413
|
+
"mapView": ["mapViewWatchHandler"]
|
414
|
+
}; }
|
415
|
+
};
|
416
|
+
MapLayerPicker.style = MapLayerPickerStyle0;
|
417
|
+
|
418
|
+
exports.calcite_dropdown_group = DropdownGroup;
|
419
|
+
exports.map_layer_picker = MapLayerPicker;
|