@esri/solutions-components 0.8.22 → 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-alert_4.cjs.entry.js +12 -11
- 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 +25 -29
- package/dist/cjs/card-manager_3.cjs.entry.js +9 -3
- package/dist/cjs/crowdsource-manager.cjs.entry.js +12 -4
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +57 -37
- package/dist/cjs/{downloadUtils-2e36a300.js → downloadUtils-5349717a.js} +2 -1
- package/dist/cjs/feature-list.cjs.entry.js +11 -6
- package/dist/cjs/{helpers-9347ad83.js → helpers-618a3f7d.js} +2 -1
- package/dist/cjs/{index.es-56415e48.js → index.es-aa69b58b.js} +1 -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/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/{popupUtils-500c1544.js → popupUtils-3e65296c.js} +17 -2
- package/dist/cjs/public-notification.cjs.entry.js +4 -4
- 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 +30 -8
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +57 -46
- package/dist/collection/components/feature-details/feature-details.css +2 -2
- package/dist/collection/components/feature-details/feature-details.js +56 -13
- package/dist/collection/components/feature-list/feature-list.css +1 -1
- package/dist/collection/components/feature-list/feature-list.js +23 -4
- package/dist/collection/components/info-card/info-card.js +7 -27
- package/dist/collection/components/layer-list/layer-list.js +7 -14
- package/dist/collection/components/layer-table/layer-table.js +7 -1
- package/dist/collection/components/public-notification/public-notification.js +3 -3
- package/dist/collection/demos/crowdsource-manager.html +10 -2
- package/dist/collection/demos/crowdsource-reporter.html +22 -15
- package/dist/collection/utils/interfaces.ts +1 -0
- package/dist/collection/utils/popupUtils.js +17 -2
- package/dist/collection/utils/popupUtils.ts +23 -3
- 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/consent-manager.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 +13 -5
- package/dist/components/crowdsource-reporter.js +58 -38
- package/dist/components/downloadUtils.js +1 -1
- package/dist/components/esri-loader.js +1 -1
- package/dist/components/feature-details2.js +17 -13
- package/dist/components/feature-list2.js +7 -5
- package/dist/components/helpers.js +3 -2
- package/dist/components/html2canvas.js +1 -1
- package/dist/components/index.es.js +2 -2
- package/dist/components/info-card2.js +7 -11
- 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 +13 -6
- 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 +7 -14
- package/dist/components/layer-table2.js +7 -1
- package/dist/{esm/calcite-navigation-user.entry.js → components/navigation-user.js} +46 -9
- package/dist/components/popupUtils.js +17 -2
- package/dist/components/public-notification.js +3 -3
- package/dist/components/purify.js +1 -1
- package/dist/components/solution-resource.js +1 -1
- 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-alert_4.entry.js +12 -11
- 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 +25 -29
- package/dist/esm/card-manager_3.entry.js +9 -3
- package/dist/esm/crowdsource-manager.entry.js +12 -4
- package/dist/esm/crowdsource-reporter.entry.js +57 -37
- package/dist/esm/{downloadUtils-aab31bfe.js → downloadUtils-5fa0d437.js} +2 -2
- package/dist/esm/feature-list.entry.js +11 -6
- package/dist/esm/{helpers-a5a81b9d.js → helpers-61b05164.js} +3 -2
- package/dist/esm/{index.es-43ba3006.js → index.es-57c15c9b.js} +1 -1
- 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/map-select-tools_3.entry.js +1 -1
- package/dist/esm/{popupUtils-2cc3c366.js → popupUtils-650b6bba.js} +17 -2
- package/dist/esm/public-notification.entry.js +4 -4
- 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-manager.html +10 -2
- 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-16730f05.entry.js +6 -0
- package/dist/solutions-components/p-1ae3b886.entry.js +17 -0
- package/dist/solutions-components/p-1ff9eb95.entry.js +6 -0
- package/dist/solutions-components/{p-667caa6b.js → p-24bf45b7.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-37fc92db.js → p-6f69de4d.js} +2 -2
- package/dist/solutions-components/{p-8cff32bd.entry.js → p-72317f8e.entry.js} +2 -2
- 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-54324eaa.entry.js → p-97e343df.entry.js} +1 -1
- package/dist/solutions-components/{p-fe9d6d06.js → p-9f56c02c.js} +1 -1
- package/dist/solutions-components/p-a1037b19.js +21 -0
- 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-f6668347.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/solutions-components/utils/popupUtils.ts +23 -3
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +14 -6
- 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/info-card/info-card.d.ts +0 -4
- package/dist/types/components/layer-list/layer-list.d.ts +1 -1
- package/dist/types/components.d.ts +36 -16
- package/dist/types/preact.d.ts +10 -4
- package/dist/types/utils/interfaces.d.ts +1 -0
- package/dist/types/utils/popupUtils.d.ts +4 -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-48c99a48.entry.js +0 -6
- package/dist/solutions-components/p-599dcc29.js +0 -6
- package/dist/solutions-components/p-5a740f6c.entry.js +0 -6
- package/dist/solutions-components/p-64779bb2.entry.js +0 -6
- package/dist/solutions-components/p-64b4b579.entry.js +0 -11
- package/dist/solutions-components/p-88f73319.entry.js +0 -6
- 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-cbe166fc.entry.js +0 -6
- package/dist/solutions-components/p-eab95aa4.entry.js +0 -6
- package/dist/solutions-components/p-ebf82ce0.js +0 -21
- package/dist/solutions-components/p-f43d6a86.entry.js +0 -6
@@ -17,15 +17,10 @@ const loadable = require('./loadable-b374ef4b.js');
|
|
17
17
|
const observers = require('./observers-4fa351d9.js');
|
18
18
|
const openCloseComponent = require('./openCloseComponent-6a283ac3.js');
|
19
19
|
const component = require('./component-d48747c9.js');
|
20
|
-
const
|
21
|
-
const mapViewUtils = require('./mapViewUtils-6e46ba33.js');
|
22
|
-
const publicNotificationStore = require('./publicNotificationStore-3bfbbed3.js');
|
20
|
+
const resources = require('./resources-fa37e40f.js');
|
23
21
|
require('./resources-1c0e54c1.js');
|
24
22
|
require('./debounce-7f1e04d6.js');
|
25
23
|
require('./browser-a96d0614.js');
|
26
|
-
require('./esri-loader-fce6a9cb.js');
|
27
|
-
require('./interfaces-7cd0a48a.js');
|
28
|
-
require('./index-c078ea5f.js');
|
29
24
|
|
30
25
|
/*!
|
31
26
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
@@ -431,96 +426,6 @@ const Dropdown = class {
|
|
431
426
|
};
|
432
427
|
Dropdown.style = CalciteDropdownStyle0;
|
433
428
|
|
434
|
-
/*!
|
435
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
436
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
437
|
-
* v2.8.2
|
438
|
-
*/
|
439
|
-
const CSS = {
|
440
|
-
container: "container",
|
441
|
-
containerLink: "container--link",
|
442
|
-
containerMulti: "container--multi-selection",
|
443
|
-
containerSingle: "container--single-selection",
|
444
|
-
containerNone: "container--none-selection",
|
445
|
-
icon: "dropdown-item-icon",
|
446
|
-
iconEnd: "dropdown-item-icon-end",
|
447
|
-
iconStart: "dropdown-item-icon-start",
|
448
|
-
itemContent: "dropdown-item-content",
|
449
|
-
link: "dropdown-link",
|
450
|
-
};
|
451
|
-
|
452
|
-
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}";
|
453
|
-
const CalciteDropdownGroupStyle0 = dropdownGroupCss;
|
454
|
-
|
455
|
-
const DropdownGroup = class {
|
456
|
-
constructor(hostRef) {
|
457
|
-
index.registerInstance(this, hostRef);
|
458
|
-
this.calciteInternalDropdownItemChange = index.createEvent(this, "calciteInternalDropdownItemChange", 6);
|
459
|
-
this.updateItems = () => {
|
460
|
-
Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach((item) => (item.selectionMode = this.selectionMode));
|
461
|
-
};
|
462
|
-
this.mutationObserver = observers.createObserver("mutation", () => this.updateItems());
|
463
|
-
this.groupTitle = undefined;
|
464
|
-
this.scale = "m";
|
465
|
-
this.selectionMode = "single";
|
466
|
-
}
|
467
|
-
handlePropsChange() {
|
468
|
-
this.updateItems();
|
469
|
-
}
|
470
|
-
//--------------------------------------------------------------------------
|
471
|
-
//
|
472
|
-
// Lifecycle
|
473
|
-
//
|
474
|
-
//--------------------------------------------------------------------------
|
475
|
-
connectedCallback() {
|
476
|
-
var _a;
|
477
|
-
this.updateItems();
|
478
|
-
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
|
479
|
-
}
|
480
|
-
componentWillLoad() {
|
481
|
-
this.groupPosition = this.getGroupPosition();
|
482
|
-
}
|
483
|
-
disconnectedCallback() {
|
484
|
-
var _a;
|
485
|
-
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
486
|
-
}
|
487
|
-
render() {
|
488
|
-
const groupTitle = this.groupTitle ? (index.h("span", { "aria-hidden": "true", class: "dropdown-title" }, this.groupTitle)) : null;
|
489
|
-
const dropdownSeparator = this.groupPosition > 0 ? index.h("div", { class: "dropdown-separator", role: "separator" }) : null;
|
490
|
-
return (index.h(index.Host, { key: 'c1b662afcbb612d775cea66edb949d71f5f63167', "aria-label": this.groupTitle, role: "group" }, index.h("div", { key: 'cdfdb0919b1b6006f69f7fbcda0c16c2beefec5e', class: {
|
491
|
-
[CSS.container]: true,
|
492
|
-
[`${CSS.container}--${this.scale}`]: true,
|
493
|
-
} }, dropdownSeparator, groupTitle, index.h("slot", { key: '166c8236f3315d2f038f61b0619270d2bd9b344a' }))));
|
494
|
-
}
|
495
|
-
//--------------------------------------------------------------------------
|
496
|
-
//
|
497
|
-
// Event Listeners
|
498
|
-
//
|
499
|
-
//--------------------------------------------------------------------------
|
500
|
-
updateActiveItemOnChange(event) {
|
501
|
-
this.requestedDropdownGroup = event.detail.requestedDropdownGroup;
|
502
|
-
this.requestedDropdownItem = event.detail.requestedDropdownItem;
|
503
|
-
this.calciteInternalDropdownItemChange.emit({
|
504
|
-
requestedDropdownGroup: this.requestedDropdownGroup,
|
505
|
-
requestedDropdownItem: this.requestedDropdownItem,
|
506
|
-
});
|
507
|
-
}
|
508
|
-
//--------------------------------------------------------------------------
|
509
|
-
//
|
510
|
-
// Private Methods
|
511
|
-
//
|
512
|
-
//--------------------------------------------------------------------------
|
513
|
-
getGroupPosition() {
|
514
|
-
return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-dropdown-group"), this.el);
|
515
|
-
}
|
516
|
-
static get delegatesFocus() { return true; }
|
517
|
-
get el() { return index.getElement(this); }
|
518
|
-
static get watchers() { return {
|
519
|
-
"selectionMode": ["handlePropsChange"]
|
520
|
-
}; }
|
521
|
-
};
|
522
|
-
DropdownGroup.style = CalciteDropdownGroupStyle0;
|
523
|
-
|
524
429
|
const dropdownItemCss = ":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.container--s{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-inline-end:0.5rem;padding-inline-start:1.5rem}.container--m{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-inline-end:0.75rem;padding-inline-start:2rem}.container--l{padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-inline-end:1rem;padding-inline-start:2.5rem}.container--s.container--none-selection{padding-inline-start:0.25rem}.container--s.container--none-selection .dropdown-link{padding-inline-start:0px}.container--m.container--none-selection{padding-inline-start:0.5rem}.container--m.container--none-selection .dropdown-link{padding-inline-start:0px}.container--l.container--none-selection{padding-inline-start:0.75rem}.container--l.container--none-selection .dropdown-link{padding-inline-start:0px}:host{position:relative;display:flex;flex-grow:1;align-items:center}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;color:var(--calcite-color-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);text-align:start}.dropdown-item-content{flex:1 1 auto;padding-block:0.125rem;padding-inline-end:auto;padding-inline-start:0.25rem}:host,.container--link a{outline-color:transparent}:host(:focus){outline:2px solid transparent;outline-offset:2px;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 )}.container--link{padding:0px}.container--link a{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;color:var(--calcite-color-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.container--s .dropdown-link{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-inline-end:0.5rem;padding-inline-start:1.5rem}.container--m .dropdown-link{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-inline-end:0.75rem;padding-inline-start:2rem}.container--l .dropdown-link{padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;padding-inline-end:1rem;padding-inline-start:2.5rem}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host(:hover:not([disabled])) .container--link .dropdown-link,:host(:active:not([disabled])) .container--link .dropdown-link{color:var(--calcite-color-text-1)}:host(:active:not([disabled])) .container{background-color:var(--calcite-color-foreground-3)}:host(:focus) .container{color:var(--calcite-color-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host([selected]) .container:not(.container--none-selection),:host([selected]) .container--link .dropdown-link{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}:host([selected]) .container:not(.container--none-selection) calcite-icon,:host([selected]) .container--link .dropdown-link calcite-icon{color:var(--calcite-color-brand)}.dropdown-item-icon{position:absolute;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:scale(0.9)}.container--s .dropdown-item-icon{inset-inline-start:0.25rem}.container--m .dropdown-item-icon{inset-inline-start:0.5rem}.container--l .dropdown-item-icon{inset-inline-start:0.75rem}:host(:hover:not([disabled])) .dropdown-item-icon{color:var(--calcite-color-border-1);opacity:1}:host([selected]) .dropdown-item-icon{color:var(--calcite-color-brand);opacity:1}.container--s .dropdown-item-icon-start{margin-inline-end:0.5rem;margin-inline-start:0.25rem}.container--s .dropdown-item-icon-end{margin-inline-start:0.5rem}.container--m .dropdown-item-icon-start{margin-inline-end:0.75rem;margin-inline-start:0.25rem}.container--m .dropdown-item-icon-end{margin-inline-start:0.75rem}.container--l .dropdown-item-icon-start{margin-inline-end:1rem;margin-inline-start:0.25rem}.container--l .dropdown-item-icon-end{margin-inline-start:1rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}";
|
525
430
|
const CalciteDropdownItemStyle0 = dropdownItemCss;
|
526
431
|
|
@@ -574,9 +479,9 @@ const DropdownItem = class {
|
|
574
479
|
}
|
575
480
|
render() {
|
576
481
|
const { href, selectionMode, label, iconFlipRtl, scale } = this;
|
577
|
-
const iconStartEl = (index.h("calcite-icon", { key: '10985dba962cc1582cc6b2896e1c274b21e1dc20', class: CSS.iconStart, flipRtl: iconFlipRtl === "start" || iconFlipRtl === "both", icon: this.iconStart, scale: component.getIconScale(this.scale) }));
|
578
|
-
const contentNode = (index.h("span", { key: 'e72a06cc3d3f325ec8e0e8eff407dc9149b29b14', class: CSS.itemContent }, index.h("slot", { key: 'e8d4e201f5903a2811c642d441d4b33d20abd7b2' })));
|
579
|
-
const iconEndEl = (index.h("calcite-icon", { key: 'fd15f4aea96916ffa674591adc6887dafccc8218', class: CSS.iconEnd, flipRtl: iconFlipRtl === "end" || iconFlipRtl === "both", icon: this.iconEnd, scale: component.getIconScale(this.scale) }));
|
482
|
+
const iconStartEl = (index.h("calcite-icon", { key: '10985dba962cc1582cc6b2896e1c274b21e1dc20', class: resources.CSS.iconStart, flipRtl: iconFlipRtl === "start" || iconFlipRtl === "both", icon: this.iconStart, scale: component.getIconScale(this.scale) }));
|
483
|
+
const contentNode = (index.h("span", { key: 'e72a06cc3d3f325ec8e0e8eff407dc9149b29b14', class: resources.CSS.itemContent }, index.h("slot", { key: 'e8d4e201f5903a2811c642d441d4b33d20abd7b2' })));
|
484
|
+
const iconEndEl = (index.h("calcite-icon", { key: 'fd15f4aea96916ffa674591adc6887dafccc8218', class: resources.CSS.iconEnd, flipRtl: iconFlipRtl === "end" || iconFlipRtl === "both", icon: this.iconEnd, scale: component.getIconScale(this.scale) }));
|
580
485
|
const slottedContent = this.iconStart && this.iconEnd
|
581
486
|
? [iconStartEl, contentNode, iconEndEl]
|
582
487
|
: this.iconStart
|
@@ -584,7 +489,7 @@ const DropdownItem = class {
|
|
584
489
|
: this.iconEnd
|
585
490
|
? [contentNode, iconEndEl]
|
586
491
|
: contentNode;
|
587
|
-
const contentEl = !href ? (slottedContent) : (index.h("a", { "aria-label": label, class: CSS.link, href: href, rel: this.rel, tabIndex: -1, target: this.target,
|
492
|
+
const contentEl = !href ? (slottedContent) : (index.h("a", { "aria-label": label, class: resources.CSS.link, href: href, rel: this.rel, tabIndex: -1, target: this.target,
|
588
493
|
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
|
589
494
|
ref: (el) => (this.childLink = el) }, slottedContent));
|
590
495
|
const itemRole = href
|
@@ -597,13 +502,13 @@ const DropdownItem = class {
|
|
597
502
|
const itemAria = selectionMode !== "none" ? dom.toAriaBoolean(this.selected) : null;
|
598
503
|
const { disabled } = this;
|
599
504
|
return (index.h(index.Host, { key: '6cdbba40456cde099120c69e8b743db43a044279', "aria-checked": itemAria, "aria-label": !href ? label : "", role: itemRole, tabIndex: disabled ? -1 : 0 }, index.h(interactive.InteractiveContainer, { key: 'ad9f797dba175a65095cb209f0230043ca19247c', disabled: disabled }, index.h("div", { key: '6380f6b0db4dfada44886e8e003d6d973598b252', class: {
|
600
|
-
[CSS.container]: true,
|
601
|
-
[CSS.containerLink]: !!href,
|
602
|
-
[`${CSS.container}--${scale}`]: true,
|
603
|
-
[CSS.containerMulti]: selectionMode === "multiple",
|
604
|
-
[CSS.containerSingle]: selectionMode === "single",
|
605
|
-
[CSS.containerNone]: selectionMode === "none",
|
606
|
-
} }, selectionMode !== "none" ? (index.h("calcite-icon", { class: CSS.icon, icon: selectionMode === "multiple" ? "check" : "bullet-point", scale: component.getIconScale(this.scale) })) : null, contentEl))));
|
505
|
+
[resources.CSS.container]: true,
|
506
|
+
[resources.CSS.containerLink]: !!href,
|
507
|
+
[`${resources.CSS.container}--${scale}`]: true,
|
508
|
+
[resources.CSS.containerMulti]: selectionMode === "multiple",
|
509
|
+
[resources.CSS.containerSingle]: selectionMode === "single",
|
510
|
+
[resources.CSS.containerNone]: selectionMode === "none",
|
511
|
+
} }, selectionMode !== "none" ? (index.h("calcite-icon", { class: resources.CSS.icon, icon: selectionMode === "multiple" ? "check" : "bullet-point", scale: component.getIconScale(this.scale) })) : null, contentEl))));
|
607
512
|
}
|
608
513
|
//--------------------------------------------------------------------------
|
609
514
|
//
|
@@ -690,333 +595,5 @@ const DropdownItem = class {
|
|
690
595
|
};
|
691
596
|
DropdownItem.style = CalciteDropdownItemStyle0;
|
692
597
|
|
693
|
-
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}";
|
694
|
-
const MapLayerPickerStyle0 = mapLayerPickerCss;
|
695
|
-
|
696
|
-
const MapLayerPicker = class {
|
697
|
-
constructor(hostRef) {
|
698
|
-
index.registerInstance(this, hostRef);
|
699
|
-
this.idsFound = index.createEvent(this, "idsFound", 7);
|
700
|
-
this.noLayersFound = index.createEvent(this, "noLayersFound", 7);
|
701
|
-
this.layerSelectionChange = index.createEvent(this, "layerSelectionChange", 7);
|
702
|
-
//--------------------------------------------------------------------------
|
703
|
-
//
|
704
|
-
// Properties (protected)
|
705
|
-
//
|
706
|
-
//--------------------------------------------------------------------------
|
707
|
-
/**
|
708
|
-
* boolean: When true the default layer has been loaded once and should no longer be used
|
709
|
-
*/
|
710
|
-
this.defaultLayerHonored = false;
|
711
|
-
this.appearance = "transparent";
|
712
|
-
this.defaultLayerId = "";
|
713
|
-
this.display = "inline-block";
|
714
|
-
this.enabledLayerIds = [];
|
715
|
-
this.enabledTableIds = [];
|
716
|
-
this.height = undefined;
|
717
|
-
this.isMobile = undefined;
|
718
|
-
this.mapView = undefined;
|
719
|
-
this.onlyShowUpdatableLayers = undefined;
|
720
|
-
this.placeholderIcon = "";
|
721
|
-
this.selectedIds = [];
|
722
|
-
this.scale = "m";
|
723
|
-
this.showTables = undefined;
|
724
|
-
this.showSingleLayerAsLabel = false;
|
725
|
-
this.type = "select";
|
726
|
-
this._hasMultipleLayers = true;
|
727
|
-
this._hasValidLayers = true;
|
728
|
-
this._isDropdownOpen = undefined;
|
729
|
-
this.ids = [];
|
730
|
-
this.selectedName = "";
|
731
|
-
this._translations = undefined;
|
732
|
-
}
|
733
|
-
//--------------------------------------------------------------------------
|
734
|
-
//
|
735
|
-
// Watch handlers
|
736
|
-
//
|
737
|
-
//--------------------------------------------------------------------------
|
738
|
-
/**
|
739
|
-
* Called each time the mapView prop is changed.
|
740
|
-
*/
|
741
|
-
async mapViewWatchHandler() {
|
742
|
-
await this._setLayers();
|
743
|
-
if (this.ids.length > 0) {
|
744
|
-
this._hasValidLayers = true;
|
745
|
-
this._hasMultipleLayers = this.ids.length > 1;
|
746
|
-
this._setSelectedLayer(this.ids[0]);
|
747
|
-
}
|
748
|
-
else {
|
749
|
-
this._hasValidLayers = false;
|
750
|
-
this.noLayersFound.emit();
|
751
|
-
}
|
752
|
-
}
|
753
|
-
//--------------------------------------------------------------------------
|
754
|
-
//
|
755
|
-
// Functions (lifecycle)
|
756
|
-
//
|
757
|
-
//--------------------------------------------------------------------------
|
758
|
-
/**
|
759
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
760
|
-
*/
|
761
|
-
async componentWillLoad() {
|
762
|
-
await this._getTranslations();
|
763
|
-
await this._setLayers();
|
764
|
-
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
765
|
-
this.layerSelectionChange.emit(this.selectedIds.length === 1 ? [this.selectedIds[0]] : [this.ids[0]]);
|
766
|
-
}
|
767
|
-
}
|
768
|
-
/**
|
769
|
-
* Renders the component.
|
770
|
-
*/
|
771
|
-
render() {
|
772
|
-
const id = "map-layer-picker";
|
773
|
-
let style = this.height > 0 ? { "height": `${this.height.toString()}px` } : {};
|
774
|
-
style = Object.assign(Object.assign({}, style), { "display": this.display });
|
775
|
-
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() :
|
776
|
-
!this._hasMultipleLayers && this.showSingleLayerAsLabel ? this._getSingleLayerPlaceholder() :
|
777
|
-
this.type === "combobox" ? this._getCombobox(id) :
|
778
|
-
this.type === "select" ? this._getSelect(id) : this._getDropdown(id)))));
|
779
|
-
}
|
780
|
-
/**
|
781
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
782
|
-
*/
|
783
|
-
async componentDidLoad() {
|
784
|
-
if (this.ids.length > 0 || this.selectedIds.length === 1) {
|
785
|
-
const id = this.selectedIds.length === 1 ? this.selectedIds[0] : this.ids[0];
|
786
|
-
if (this.type === "select") {
|
787
|
-
this._layerElement.value = id;
|
788
|
-
}
|
789
|
-
else if (this.type === "dropdown") {
|
790
|
-
this.selectedName = Object.keys(this._layerNameHash).indexOf(id) > -1 ?
|
791
|
-
this._layerNameHash[id].name : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
|
792
|
-
this._tableNameHash[id].name : "";
|
793
|
-
}
|
794
|
-
}
|
795
|
-
}
|
796
|
-
//--------------------------------------------------------------------------
|
797
|
-
//
|
798
|
-
// Functions (protected)
|
799
|
-
//
|
800
|
-
//--------------------------------------------------------------------------
|
801
|
-
/**
|
802
|
-
* Create a notice to inform the user that no layers were found
|
803
|
-
*
|
804
|
-
* @returns Calcite Notice component with the message
|
805
|
-
*/
|
806
|
-
_getInvalidPlaceholder() {
|
807
|
-
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))));
|
808
|
-
}
|
809
|
-
/**
|
810
|
-
* Show layer name as a label with icon
|
811
|
-
*
|
812
|
-
* @returns Calcite label with the layer name and icon
|
813
|
-
*/
|
814
|
-
_getSingleLayerPlaceholder() {
|
815
|
-
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)));
|
816
|
-
}
|
817
|
-
/**
|
818
|
-
* Create a list of layers from the map
|
819
|
-
* Used for selecting a single layer.
|
820
|
-
*
|
821
|
-
* @param id the id for the select component used to support the tooltip
|
822
|
-
*
|
823
|
-
* @returns Calcite Select component with the ids of the layers from the map
|
824
|
-
*/
|
825
|
-
_getSelect(id) {
|
826
|
-
return (index.h("calcite-select", { id: id, label: "", onCalciteSelectChange: () => this._layerSelectionChange(), ref: (el) => { this._layerElement = el; }, scale: this.scale }, this._getMapLayerOptions()));
|
827
|
-
}
|
828
|
-
/**
|
829
|
-
* Create a list of layer ids from the map
|
830
|
-
* Used for selecting multiple layers
|
831
|
-
*
|
832
|
-
* @param id the id for the combobox component used to support the tooltip
|
833
|
-
*
|
834
|
-
* @returns Calcite ComboBox component with the ids of the layers from the map
|
835
|
-
*/
|
836
|
-
_getCombobox(id) {
|
837
|
-
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()));
|
838
|
-
}
|
839
|
-
/**
|
840
|
-
* Hydrate a dropdown component with items to display the layer names
|
841
|
-
*
|
842
|
-
* @param id the id for the dropdown component used to support the tooltip
|
843
|
-
*
|
844
|
-
* @returns Array of Dropdown items with layer names
|
845
|
-
*/
|
846
|
-
_getDropdown(id) {
|
847
|
-
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())));
|
848
|
-
}
|
849
|
-
/**
|
850
|
-
* Get the button that will open the dropdown list wrapped in an action
|
851
|
-
*
|
852
|
-
* @returns the node for the action and button
|
853
|
-
*/
|
854
|
-
_getActionDropdownButton(id) {
|
855
|
-
return (index.h("calcite-action", { id: id, slot: "trigger", text: "" }, this._getDropdownButton()));
|
856
|
-
}
|
857
|
-
/**
|
858
|
-
* Get the button that will open the dropdown list
|
859
|
-
*
|
860
|
-
* @returns the node for the button
|
861
|
-
*/
|
862
|
-
_getDropdownButton() {
|
863
|
-
const buttonClass = this.isMobile ? "" : "max-width-350";
|
864
|
-
const buttonSlot = this.isMobile ? "trigger" : "";
|
865
|
-
const buttonIcon = this._isDropdownOpen ? "chevron-up" : "chevron-down";
|
866
|
-
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)));
|
867
|
-
}
|
868
|
-
/**
|
869
|
-
* Get the appropriate type of dom nodes for each valid layer or table
|
870
|
-
*
|
871
|
-
* @returns Array of dom nodes with the names of the layers and optionally of the tables
|
872
|
-
*/
|
873
|
-
_getMapLayerOptions() {
|
874
|
-
return this.ids.reduce((prev, cur) => {
|
875
|
-
if (this._validLayer(cur)) {
|
876
|
-
prev.push(this._getItem(cur, "layer"));
|
877
|
-
}
|
878
|
-
else if (this._validTable(cur)) {
|
879
|
-
prev.push(this._getItem(cur, "table"));
|
880
|
-
}
|
881
|
-
return prev;
|
882
|
-
}, []);
|
883
|
-
}
|
884
|
-
/**
|
885
|
-
* Get the appropriate type of dom node for the current layer or table id
|
886
|
-
*
|
887
|
-
* @returns A dom node with the name of the layer or table
|
888
|
-
*/
|
889
|
-
_getItem(id, itemType) {
|
890
|
-
const item = itemType === "layer" ? this._layerNameHash[id] : this._tableNameHash[id];
|
891
|
-
const disabled = this.onlyShowUpdatableLayers ? !item.supportsUpdate : false;
|
892
|
-
const name = item.name;
|
893
|
-
const selected = this.selectedIds.indexOf(id) > -1;
|
894
|
-
return this.type === "combobox" ? (index.h("calcite-combobox-item", { disabled: disabled, selected: selected, textLabel: name, value: id })) :
|
895
|
-
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)));
|
896
|
-
}
|
897
|
-
/**
|
898
|
-
* Store the layer name based on the user selection
|
899
|
-
*/
|
900
|
-
_setSelectedLayer(id) {
|
901
|
-
let item;
|
902
|
-
const hasDefaultLayer = this.defaultLayerId && !this.defaultLayerHonored;
|
903
|
-
if (hasDefaultLayer) {
|
904
|
-
item = this._getLayerFromHash(this.defaultLayerId);
|
905
|
-
this.defaultLayerHonored = item !== undefined;
|
906
|
-
id = this.defaultLayerHonored ? this.defaultLayerId : id;
|
907
|
-
}
|
908
|
-
item = item ? item : this._getLayerFromHash(id);
|
909
|
-
this.selectedName = item === null || item === void 0 ? void 0 : item.name;
|
910
|
-
this.selectedIds = [id];
|
911
|
-
this.layerSelectionChange.emit(this.selectedIds);
|
912
|
-
}
|
913
|
-
/**
|
914
|
-
* Fetch layer hash info for the given id
|
915
|
-
*
|
916
|
-
* @returns ILayerHashInfo for the id
|
917
|
-
*/
|
918
|
-
_getLayerFromHash(id) {
|
919
|
-
return Object.keys(this._layerNameHash).indexOf(id) > -1 ?
|
920
|
-
this._layerNameHash[id] : Object.keys(this._tableNameHash).indexOf(id) > -1 ?
|
921
|
-
this._tableNameHash[id] : undefined;
|
922
|
-
}
|
923
|
-
/**
|
924
|
-
* Fetch the ids of the layers from the map
|
925
|
-
*
|
926
|
-
* @returns Promise when the operation has completed
|
927
|
-
*/
|
928
|
-
async _setLayers() {
|
929
|
-
if (this.mapView) {
|
930
|
-
await this._initLayerTableHash();
|
931
|
-
const layerIds = this.onlyShowUpdatableLayers ?
|
932
|
-
this._getEditableIds(this._layerNameHash) : Object.keys(this._layerNameHash);
|
933
|
-
const tableIds = this.showTables ? this.onlyShowUpdatableLayers ?
|
934
|
-
this._getEditableIds(this._tableNameHash) : Object.keys(this._tableNameHash) : [];
|
935
|
-
this.ids = [
|
936
|
-
...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; }),
|
937
|
-
...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; }),
|
938
|
-
];
|
939
|
-
this.idsFound.emit({
|
940
|
-
layerIds,
|
941
|
-
tableIds
|
942
|
-
});
|
943
|
-
}
|
944
|
-
}
|
945
|
-
/**
|
946
|
-
* Fetch the ids of all layers that support edits with the update capability
|
947
|
-
*
|
948
|
-
* @returns array of layer ids
|
949
|
-
*/
|
950
|
-
_getEditableIds(hash) {
|
951
|
-
return Object.keys(hash).reduce((prev, cur) => {
|
952
|
-
if (hash[cur].supportsUpdate) {
|
953
|
-
prev.push(cur);
|
954
|
-
}
|
955
|
-
return prev;
|
956
|
-
}, []);
|
957
|
-
}
|
958
|
-
/**
|
959
|
-
* Create a layer id:title hash for layer name display
|
960
|
-
*
|
961
|
-
* @returns Promise when the operation has completed
|
962
|
-
*/
|
963
|
-
async _initLayerTableHash() {
|
964
|
-
this._layerNameHash = await mapViewUtils.getMapLayerHash(this.mapView, this.onlyShowUpdatableLayers);
|
965
|
-
this._tableNameHash = this.showTables ? await mapViewUtils.getMapTableHash(this.mapView, this.onlyShowUpdatableLayers) : {};
|
966
|
-
}
|
967
|
-
/**
|
968
|
-
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
969
|
-
*
|
970
|
-
* @returns boolean when true the layer will be used in the current layer picker type
|
971
|
-
*/
|
972
|
-
_validLayer(id) {
|
973
|
-
var _a;
|
974
|
-
const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
975
|
-
return name && Object.keys(publicNotificationStore.state.managedLayers).indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
976
|
-
this.enabledLayerIds.indexOf(id) > -1 : true);
|
977
|
-
}
|
978
|
-
/**
|
979
|
-
* Evaluate if the id exists in the current hash and verify if it should be excluded
|
980
|
-
*
|
981
|
-
* @returns boolean when true the table will be used in the current layer picker type
|
982
|
-
*/
|
983
|
-
_validTable(id) {
|
984
|
-
var _a;
|
985
|
-
const name = (_a = this._tableNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
986
|
-
const validName = name && this.showTables;
|
987
|
-
return validName ? publicNotificationStore.state.managedTables.indexOf(name) < 0 &&
|
988
|
-
(this.enabledTableIds.length > 0 ? this.enabledTableIds.indexOf(id) > -1 : true) : validName;
|
989
|
-
}
|
990
|
-
/**
|
991
|
-
* Fetch the ids of the layers from the map
|
992
|
-
*
|
993
|
-
* @returns Promise when the operation has completed
|
994
|
-
*/
|
995
|
-
_layerSelectionChange() {
|
996
|
-
const ids = Array.isArray(this._layerElement.value) ? this._layerElement.value : [this._layerElement.value];
|
997
|
-
if (JSON.stringify(ids) !== JSON.stringify([""])) {
|
998
|
-
this.selectedIds = ids;
|
999
|
-
this.layerSelectionChange.emit(this.selectedIds);
|
1000
|
-
}
|
1001
|
-
}
|
1002
|
-
/**
|
1003
|
-
* Fetches the component's translations
|
1004
|
-
*
|
1005
|
-
* @returns Promise when complete
|
1006
|
-
* @protected
|
1007
|
-
*/
|
1008
|
-
async _getTranslations() {
|
1009
|
-
const messages = await locale.getLocaleComponentStrings(this.el);
|
1010
|
-
this._translations = messages[0];
|
1011
|
-
}
|
1012
|
-
get el() { return index.getElement(this); }
|
1013
|
-
static get watchers() { return {
|
1014
|
-
"mapView": ["mapViewWatchHandler"]
|
1015
|
-
}; }
|
1016
|
-
};
|
1017
|
-
MapLayerPicker.style = MapLayerPickerStyle0;
|
1018
|
-
|
1019
598
|
exports.calcite_dropdown = Dropdown;
|
1020
|
-
exports.calcite_dropdown_group = DropdownGroup;
|
1021
599
|
exports.calcite_dropdown_item = DropdownItem;
|
1022
|
-
exports.map_layer_picker = MapLayerPicker;
|