@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
@@ -8,11 +8,11 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
|
-
const locale = require('./locale-3fd260e3.js');
|
12
11
|
const loadModules = require('./loadModules-b28900c2.js');
|
12
|
+
const locale = require('./locale-3fd260e3.js');
|
13
13
|
const mode = require('./mode-d6c12b38.js');
|
14
|
-
require('./languageUtil-da436671.js');
|
15
14
|
require('./esri-loader-fce6a9cb.js');
|
15
|
+
require('./languageUtil-da436671.js');
|
16
16
|
|
17
17
|
const printStyling = `
|
18
18
|
@media print {
|
@@ -386,23 +386,22 @@ const InstantAppsExport = class {
|
|
386
386
|
this.updateLegend();
|
387
387
|
}
|
388
388
|
}
|
389
|
-
|
389
|
+
watchView() {
|
390
|
+
this.handleIncludePopup();
|
391
|
+
}
|
392
|
+
async componentWillLoad() {
|
390
393
|
this.baseClass = mode.getMode(this.el) === 'dark' ? CSS.baseDark : CSS.baseLight;
|
391
394
|
locale.getMessages(this);
|
392
|
-
this.initializeModules();
|
395
|
+
await this.initializeModules();
|
393
396
|
}
|
394
397
|
componentDidLoad() {
|
395
398
|
this.printContainerEl.prepend(this.printEl);
|
396
|
-
|
397
|
-
disconnectedCallback() {
|
398
|
-
var _a, _b;
|
399
|
-
(_a = this.handles) === null || _a === void 0 ? void 0 : _a.removeAll();
|
400
|
-
(_b = this.handles) === null || _b === void 0 ? void 0 : _b.destroy();
|
401
|
-
this.handles = null;
|
399
|
+
this.handleIncludePopup();
|
402
400
|
}
|
403
401
|
async initializeModules() {
|
404
|
-
const [Handles] = await loadModules.loadModules(['esri/core/Handles']);
|
402
|
+
const [Handles, reactiveUtils] = await loadModules.loadModules(['esri/core/Handles', 'esri/core/reactiveUtils']);
|
405
403
|
this.handles = new Handles();
|
404
|
+
this.reactiveUtils = reactiveUtils;
|
406
405
|
return Promise.resolve();
|
407
406
|
}
|
408
407
|
render() {
|
@@ -604,12 +603,27 @@ const InstantAppsExport = class {
|
|
604
603
|
}
|
605
604
|
}
|
606
605
|
handleWidgetCreation() {
|
607
|
-
this.
|
608
|
-
|
606
|
+
if (this.includeMap) {
|
607
|
+
this.handleLegendCreation();
|
608
|
+
this.handleCompassCreation();
|
609
|
+
}
|
610
|
+
}
|
611
|
+
handleIncludePopup() {
|
612
|
+
var _a, _b;
|
613
|
+
if (this.showIncludePopup) {
|
614
|
+
const handleId = 'includePopup';
|
615
|
+
(_a = this.handles) === null || _a === void 0 ? void 0 : _a.remove(handleId);
|
616
|
+
(_b = this.reactiveUtils) === null || _b === void 0 ? void 0 : _b.whenOnce(() => { var _a; return (_a = this.view) === null || _a === void 0 ? void 0 : _a.ready; }).then(() => {
|
617
|
+
var _a;
|
618
|
+
(_a = this.handles) === null || _a === void 0 ? void 0 : _a.add(this.reactiveUtils.watch(() => { var _a, _b; return (_b = (_a = this.view) === null || _a === void 0 ? void 0 : _a.popup) === null || _b === void 0 ? void 0 : _b.visible; }, (visible) => {
|
619
|
+
this.includePopup = visible;
|
620
|
+
}), handleId);
|
621
|
+
});
|
622
|
+
}
|
609
623
|
}
|
610
624
|
handleLegendCreation() {
|
611
625
|
var _a, _b, _c, _d, _e;
|
612
|
-
if (this.
|
626
|
+
if (this.view != null && this.showIncludeLegend && this.legendContainerEl != null) {
|
613
627
|
const map = this.view.map;
|
614
628
|
const legendMap = (_b = (_a = this.legend) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.map;
|
615
629
|
const checkId = ((_c = map === null || map === void 0 ? void 0 : map.portalItem) === null || _c === void 0 ? void 0 : _c.id) != null && ((_d = map === null || map === void 0 ? void 0 : map.portalItem) === null || _d === void 0 ? void 0 : _d.id) === ((_e = legendMap === null || legendMap === void 0 ? void 0 : legendMap.portalItem) === null || _e === void 0 ? void 0 : _e.id);
|
@@ -643,7 +657,7 @@ const InstantAppsExport = class {
|
|
643
657
|
}
|
644
658
|
handleCompassCreation() {
|
645
659
|
var _a, _b, _c, _d;
|
646
|
-
if (this.
|
660
|
+
if (this.view != null && this.compassContainerEl != null) {
|
647
661
|
const map = this.view.map;
|
648
662
|
const compassMap = (_b = (_a = this.compass) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.map;
|
649
663
|
const checkId = ((_c = map === null || map === void 0 ? void 0 : map.portalItem) === null || _c === void 0 ? void 0 : _c.id) === ((_d = compassMap === null || compassMap === void 0 ? void 0 : compassMap.portalItem) === null || _d === void 0 ? void 0 : _d.id);
|
@@ -884,7 +898,8 @@ const InstantAppsExport = class {
|
|
884
898
|
}
|
885
899
|
get el() { return index.getElement(this); }
|
886
900
|
static get watchers() { return {
|
887
|
-
"includeMap": ["watchIncludeMap"]
|
901
|
+
"includeMap": ["watchIncludeMap"],
|
902
|
+
"view": ["watchView"]
|
888
903
|
}; }
|
889
904
|
};
|
890
905
|
InstantAppsExport.style = InstantAppsExportStyle0;
|
@@ -14,7 +14,7 @@ const breakpoints = require('./breakpoints-fcd0f2a0.js');
|
|
14
14
|
const styles = require('./styles-c9e1375a.js');
|
15
15
|
require('./esri-loader-fce6a9cb.js');
|
16
16
|
|
17
|
-
const instantAppsHeaderCss = ":host{--instant-apps-header-height:auto;--instant-apps-header-min-height:50px;--instant-apps-header-title-text-link-decoration:underline;--instant-apps-header-height--logo-scale--s:55px;--instant-apps-header-logo-width--logo-scale--s:35px;--instant-apps-header-logo-height--logo-scale--s:35px;--instant-apps-header-height--logo-scale--m:70px;--instant-apps-header-logo-width--logo-scale--m:50px;--instant-apps-header-logo-height--logo-scale--m:50px;--instant-apps-header-height--logo-scale--l:80px;--instant-apps-header-logo-width--logo-scale--l:60px;--instant-apps-header-logo-height--logo-scale--l:60px;width:100%}:host .image.image_resized img{width:100%}:host .instant-apps-header--standard{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family);min-height:var(--instant-apps-header-min-height)}:host .instant-apps-header--standard .instant-apps-header__header-container{display:flex;align-items:center;width:100%;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container slot{display:flex;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*){display:flex;min-height:var(--instant-apps-header-min-height);height:var(--instant-apps-header-height)}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*) calcite-button{height:100%}:host .instant-apps-header--standard .instant-apps-header__header-content{box-sizing:border-box;display:flex;align-items:center;width:100%;min-width:0;height:inherit;padding:5px 10px}:host .instant-apps-header--standard .instant-apps-header__header-content a{display:flex;align-items:center;-webkit-text-decoration:var(--instant-apps-header-title-text-link-decoration);text-decoration:var(--instant-apps-header-title-text-link-decoration)}:host .instant-apps-header--standard .instant-apps-header__header-content a img{padding-right:0}:host .instant-apps-header--standard .instant-apps-header__header-content img{margin:10px}:host .instant-apps-header--standard .instant-apps-header__header-content h1{margin:0;font-size:1.25rem;color:var(--calcite-color-text-1);font-weight:430;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .instant-apps-header--standard .instant-apps-header__header-content #infoButton{margin-inline-start:10px}:host .instant-apps-header--standard .instant-apps-header__header-content--center{justify-content:center}:host .instant-apps-header--standard .instant-apps-header__header-content--right{justify-content:end}:host .instant-apps-header__logo-height--s{height:var(--instant-apps-header-height--logo-scale--s)}:host .instant-apps-header__logo-height--s .instant-apps-header__header-content h1{font-size:1.125rem}:host .instant-apps-header__logo-scale--s{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}:host .instant-apps-header__logo-height--m{height:var(--instant-apps-header-height--logo-scale--m)}:host .instant-apps-header__logo-scale--m{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}:host .instant-apps-header__logo-height--l{height:var(--instant-apps-header-height--logo-scale--l)}:host .instant-apps-header__logo-height--l .instant-apps-header__header-content h1{font-size:1.375rem}:host .instant-apps-header__logo-scale--l{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}:host .instant-apps-
|
17
|
+
const instantAppsHeaderCss = ":host{--instant-apps-header-height:auto;--instant-apps-header-min-height:50px;--instant-apps-header-title-text-link-decoration:underline;--instant-apps-header-height--logo-scale--s:55px;--instant-apps-header-logo-width--logo-scale--s:35px;--instant-apps-header-logo-height--logo-scale--s:35px;--instant-apps-header-height--logo-scale--m:70px;--instant-apps-header-logo-width--logo-scale--m:50px;--instant-apps-header-logo-height--logo-scale--m:50px;--instant-apps-header-height--logo-scale--l:80px;--instant-apps-header-logo-width--logo-scale--l:60px;--instant-apps-header-logo-height--logo-scale--l:60px;width:100%}:host .image.image_resized img{width:100%}:host .instant-apps-header--standard{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;height:var(--instant-apps-header-height);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);font-family:var(--calcite-sans-family);min-height:var(--instant-apps-header-min-height)}:host .instant-apps-header--standard .instant-apps-header__header-container{display:flex;align-items:center;width:100%;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container slot{display:flex;height:inherit}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*){display:flex;min-height:var(--instant-apps-header-min-height);height:var(--instant-apps-header-height)}:host .instant-apps-header--standard .instant-apps-header__header-container ::slotted(*) calcite-button{height:100%}:host .instant-apps-header--standard .instant-apps-header__header-content{box-sizing:border-box;display:flex;align-items:center;width:100%;min-width:0;height:inherit;padding:5px 10px}:host .instant-apps-header--standard .instant-apps-header__header-content a{display:flex;align-items:center;-webkit-text-decoration:var(--instant-apps-header-title-text-link-decoration);text-decoration:var(--instant-apps-header-title-text-link-decoration)}:host .instant-apps-header--standard .instant-apps-header__header-content a img{padding-right:0}:host .instant-apps-header--standard .instant-apps-header__header-content img{margin:10px}:host .instant-apps-header--standard .instant-apps-header__header-content h1{margin:0;font-size:1.25rem;color:var(--calcite-color-text-1);font-weight:430;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .instant-apps-header--standard .instant-apps-header__header-content #infoButton{margin-inline-start:10px}:host .instant-apps-header--standard .instant-apps-header__header-content--center{justify-content:center}:host .instant-apps-header--standard .instant-apps-header__header-content--right{justify-content:end}:host .instant-apps-header__logo-height--s{height:var(--instant-apps-header-height--logo-scale--s)}:host .instant-apps-header__logo-height--s .instant-apps-header__header-content h1{font-size:1.125rem}:host .instant-apps-header__logo-scale--s{width:var(--instant-apps-header-logo-width--logo-scale--s);height:var(--instant-apps-header-logo-height--logo-scale--s)}:host .instant-apps-header__logo-height--m{height:var(--instant-apps-header-height--logo-scale--m)}:host .instant-apps-header__logo-scale--m{width:var(--instant-apps-header-logo-width--logo-scale--m);height:var(--instant-apps-header-logo-height--logo-scale--m)}:host .instant-apps-header__logo-height--l{height:var(--instant-apps-header-height--logo-scale--l)}:host .instant-apps-header__logo-height--l .instant-apps-header__header-content h1{font-size:1.375rem}:host .instant-apps-header__logo-scale--l{width:var(--instant-apps-header-logo-width--logo-scale--l);height:var(--instant-apps-header-logo-height--logo-scale--l)}:host .instant-apps-header__actions-end-container{display:flex}:host .instant-apps-header__sign-in-container{height:inherit;display:flex;align-items:center}:host .instant-apps-header__sign-in-container calcite-dropdown,:host .instant-apps-header__sign-in-container calcite-navigation-user{height:100%}:host .instant-apps-header__sign-in-container calcite-button{margin:0 10px}:host .instant-apps-header__sign-in-container calcite-dropdown-group{min-width:140px}";
|
18
18
|
const InstantAppsHeaderStyle0 = instantAppsHeaderCss;
|
19
19
|
|
20
20
|
const CSS = {
|
@@ -25,6 +25,7 @@ const CSS = {
|
|
25
25
|
logoScale: 'instant-apps-header__logo-scale--',
|
26
26
|
logoHeight: 'instant-apps-header__logo-height--',
|
27
27
|
standardHeight: 'instant-apps-header__standard-height',
|
28
|
+
actionsEndContainer: 'instant-apps-header__actions-end-container',
|
28
29
|
alignment: {
|
29
30
|
center: 'instant-apps-header__header-content--center',
|
30
31
|
right: 'instant-apps-header__header-content--right',
|
@@ -86,7 +87,7 @@ const InstantAppsHeader = class {
|
|
86
87
|
const title = this.renderTitle();
|
87
88
|
const headerContentClass = this.headerAlignment === 'right' || this.headerAlignment === 'center' ? CSS.headerContent.concat(' ', CSS.alignment[this.headerAlignment]) : CSS.headerContent;
|
88
89
|
const fontFamily = styles.getFontFamily(this.fontFamily);
|
89
|
-
return (index.h(index.Host, null, this.customHeaderHtml ? ([index.h("style", null, this.customHeaderCss), index.h("div", { id: "customHeader", innerHTML: this.customHeaderHtml })]) : (index.h("header", { class: `${CSS.base}${this.dir === 'rtl' ? ` ${CSS.flipRtl}` : ''}${this.logoImage && !hasEmptyLogo ? ` ${CSS.logoHeight}${this.logoScale}` : ` ${CSS.standardHeight}`}`, style: { backgroundColor: this.backgroundColor, fontFamily } }, index.h("div", { class: CSS.headerContainer }, index.h("span", { class: headerContentClass }, logo, title, this.infoButton ? (index.h("calcite-button", { style: { '--calcite-color-text-1': this.textColor }, id: "infoButton", alignment: "start", appearance: "transparent", kind: "neutral", "icon-start": "information-f", scale: "s", label: this.infoTitleText, title: this.infoTitleText, onClick: this.toggleInfo.bind(this) })) : null), index.h("slot", { name: "actions-end" }))))));
|
90
|
+
return (index.h(index.Host, null, this.customHeaderHtml ? ([index.h("style", null, this.customHeaderCss), index.h("div", { id: "customHeader", innerHTML: this.customHeaderHtml })]) : (index.h("header", { class: `${CSS.base}${this.dir === 'rtl' ? ` ${CSS.flipRtl}` : ''}${this.logoImage && !hasEmptyLogo ? ` ${CSS.logoHeight}${this.logoScale}` : ` ${CSS.standardHeight}`}`, style: { backgroundColor: this.backgroundColor, fontFamily } }, index.h("div", { class: CSS.headerContainer }, index.h("span", { class: headerContentClass }, logo, title, this.infoButton ? (index.h("calcite-button", { style: { '--calcite-color-text-1': this.textColor }, id: "infoButton", alignment: "start", appearance: "transparent", kind: "neutral", "icon-start": "information-f", scale: "s", label: this.infoTitleText, title: this.infoTitleText, onClick: this.toggleInfo.bind(this) })) : null), index.h("div", { class: CSS.actionsEndContainer }, index.h("slot", { name: "actions-end" })))))));
|
90
91
|
}
|
91
92
|
renderLogo(hasEmptyLogo) {
|
92
93
|
return hasEmptyLogo ? ('') : this.logoImage && this.logoLink ? (index.h("a", { href: `${this.logoLink}`, target: "_blank" }, index.h("img", { class: `${CSS.logoScale}${this.logoScale}`, src: `${this.logoImage}`, alt: `${this.logoImageAltText}` }))) : this.logoImage ? (index.h("img", { class: `${CSS.logoScale}${this.logoScale}`, src: `${this.logoImage}`, alt: this.logoImageAltText })) : ('');
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
|
-
const helpers = require('./helpers-
|
11
|
+
const helpers = require('./helpers-618a3f7d.js');
|
12
12
|
const esriLoader = require('./esri-loader-fce6a9cb.js');
|
13
13
|
const loadModules = require('./loadModules-b28900c2.js');
|
14
14
|
require('./index-c078ea5f.js');
|
@@ -1190,7 +1190,7 @@ const InstantAppsInteractiveLegendClassic = class {
|
|
1190
1190
|
async initLegend() {
|
1191
1191
|
try {
|
1192
1192
|
await this.reactiveUtils.whenOnce(() => { var _a; return (_a = this.legendvm) === null || _a === void 0 ? void 0 : _a.view; });
|
1193
|
-
|
1193
|
+
const initLegendCallback = async () => {
|
1194
1194
|
var _a, _b, _c, _d;
|
1195
1195
|
try {
|
1196
1196
|
// Initial data setup
|
@@ -1223,7 +1223,9 @@ const InstantAppsInteractiveLegendClassic = class {
|
|
1223
1223
|
console.error(err);
|
1224
1224
|
this.isLoading = false;
|
1225
1225
|
}
|
1226
|
-
}
|
1226
|
+
};
|
1227
|
+
this.legendvm.view.when(initLegendCallback);
|
1228
|
+
this.legendvm.view.map.layers.on('after-changes', initLegendCallback);
|
1227
1229
|
}
|
1228
1230
|
catch (_a) {
|
1229
1231
|
this.isLoading = false;
|
@@ -1522,7 +1524,7 @@ const InstantAppsInteractiveLegendClassic = class {
|
|
1522
1524
|
}
|
1523
1525
|
setupWatchersAndListeners() {
|
1524
1526
|
// Refreshes interactive legend data on active layer info update
|
1525
|
-
var _a, _b, _c, _d, _e, _f;
|
1527
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
1526
1528
|
const featureLayers = (_d = (_c = (_b = (_a = this.legendvm) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.allLayers) === null || _d === void 0 ? void 0 : _d.filter(layer => (layer === null || layer === void 0 ? void 0 : layer.type) === 'feature');
|
1527
1529
|
featureLayers.forEach(async (fLayer) => {
|
1528
1530
|
var _a, _b, _c, _d;
|
@@ -1568,6 +1570,11 @@ const InstantAppsInteractiveLegendClassic = class {
|
|
1568
1570
|
index.forceUpdate(this.el);
|
1569
1571
|
}));
|
1570
1572
|
}));
|
1573
|
+
(_g = this.handles) === null || _g === void 0 ? void 0 : _g.add(this.reactiveUtils.on(() => { var _a, _b, _c; return (_c = (_b = (_a = this.legendvm) === null || _a === void 0 ? void 0 : _a.view) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.layers; }, 'after-changes', async () => {
|
1574
|
+
const data = await helpers.handleFeatureCount(this.legendvm, helpers.interactiveLegendState.data);
|
1575
|
+
helpers.store.set('data', Object.assign(Object.assign({}, helpers.interactiveLegendState.data), data));
|
1576
|
+
this.calculatingFeatureCount = false;
|
1577
|
+
}));
|
1571
1578
|
}
|
1572
1579
|
async createDataForLayer(fLayer) {
|
1573
1580
|
var _a, _b;
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
9
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
11
|
const loadModules = require('./loadModules-b28900c2.js');
|
12
|
-
const helpers = require('./helpers-
|
12
|
+
const helpers = require('./helpers-618a3f7d.js');
|
13
13
|
require('./esri-loader-fce6a9cb.js');
|
14
14
|
require('./index-c078ea5f.js');
|
15
15
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
|
-
const helpers = require('./helpers-
|
11
|
+
const helpers = require('./helpers-618a3f7d.js');
|
12
12
|
require('./loadModules-b28900c2.js');
|
13
13
|
require('./esri-loader-fce6a9cb.js');
|
14
14
|
require('./index-c078ea5f.js');
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Object.defineProperty(exports, '__esModule', { value: true });
|
9
9
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
|
-
const helpers = require('./helpers-
|
11
|
+
const helpers = require('./helpers-618a3f7d.js');
|
12
12
|
const loadModules = require('./loadModules-b28900c2.js');
|
13
13
|
require('./index-c078ea5f.js');
|
14
14
|
require('./esri-loader-fce6a9cb.js');
|
@@ -170,7 +170,7 @@ const InstantAppsInteractiveLegendLegendElementCaption = class {
|
|
170
170
|
const isNestedUniqueSymbols = helpers.checkNestedUniqueSymbolLegendElement(this.activeLayerInfo);
|
171
171
|
const isRelationship = helpers.checkRelationshipRamp(this.activeLayerInfo);
|
172
172
|
const { expanded } = this;
|
173
|
-
return isNestedUniqueSymbols && !this.titleText ? null : (index.h("div", { class: CSS$1.layerCaption }, index.h("calcite-action", { onClick: this.toggleExpanded(), icon: expanded === false ? 'chevron-up' : 'chevron-down', appearance: "transparent", text: expanded === false ? (_a = this.messages) === null || _a === void 0 ? void 0 : _a.expand : (_b = this.messages) === null || _b === void 0 ? void 0 : _b.collapse, label: expanded === false ? (_c = this.messages) === null || _c === void 0 ? void 0 : _c.expand : (_d = this.messages) === null || _d === void 0 ? void 0 : _d.collapse, scale: "s" }), this.isInteractive || isRelationship ? this.renderLegendElementCaptionControls() : null, this.titleText ? index.h("span", { class: CSS$1.layerCaptionText }, this.titleText) : null));
|
173
|
+
return isNestedUniqueSymbols && !this.titleText ? null : (index.h("div", { class: CSS$1.layerCaption }, index.h("calcite-action", { onClick: this.toggleExpanded(), icon: expanded === false ? 'chevron-up' : 'chevron-down', appearance: "transparent", text: expanded === false ? (_a = this.messages) === null || _a === void 0 ? void 0 : _a.expand : (_b = this.messages) === null || _b === void 0 ? void 0 : _b.collapse, label: expanded === false ? (_c = this.messages) === null || _c === void 0 ? void 0 : _c.expand : (_d = this.messages) === null || _d === void 0 ? void 0 : _d.collapse, scale: "s" }), this.isInteractive || isRelationship ? this.renderLegendElementCaptionControls() : null, this.titleText ? index.h("span", { class: CSS$1.layerCaptionText, title: this.titleText }, this.titleText) : null));
|
174
174
|
}
|
175
175
|
renderLegendElementCaptionControls() {
|
176
176
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
10
|
const index = require('./index-79b35510.js');
|
11
11
|
const loadModules = require('./loadModules-b28900c2.js');
|
12
12
|
const locale = require('./locale-3fd260e3.js');
|
13
|
-
const helpers = require('./helpers-
|
13
|
+
const helpers = require('./helpers-618a3f7d.js');
|
14
14
|
require('./esri-loader-fce6a9cb.js');
|
15
15
|
require('./languageUtil-da436671.js');
|
16
16
|
require('./index-c078ea5f.js');
|
@@ -23,7 +23,7 @@ var AlignmentPositions;
|
|
23
23
|
AlignmentPositions["BottomRight"] = "bottom-right";
|
24
24
|
})(AlignmentPositions || (AlignmentPositions = {}));
|
25
25
|
|
26
|
-
const instantAppsLandingPageCss = ":host{--instant-apps-landing-page-background-color:var(--calcite-color-brand);--instant-apps-landing-page-text-color:var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color:var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size:var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size:var(--calcite-font-size-3);--instant-apps-landing-page-description-text-font-size:var(--calcite-font-size-0);--instant-apps-landing-page-icon-image-scale--s:100px;--instant-apps-landing-page-icon-image-scale--m:250px;--instant-apps-landing-page-icon-image-scale--l:500px;--instant-apps-landing-page-entry-button-margin:0}:host .instant-apps-landing-page{box-sizing:border-box;position:absolute;top:0;left:0;z-index:9000;display:flex;flex-direction:column;width:100%;height:100%;padding:2.5%;transition:top 0.5s ease-in-out;background-color:var(--instant-apps-landing-page-background-color);color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:0}:host .instant-apps-landing-page__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);text-align:center}:host .instant-apps-landing-page__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text{text-shadow:0px 4px 3px rgba(0, 0, 0, 0.4), 0px 8px 13px rgba(0, 0, 0, 0.1), 0px 18px 23px rgba(0, 0, 0, 0.1)}:host .instant-apps-landing-page__icon-image{margin-bottom:5px;max-width:50%}:host .instant-apps-landing-page__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container{display:flex}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button{--calcite-color-brand:var(--instant-apps-landing-page-entry-button-color);--calcite-color-brand-hover:var(--instant-apps-landing-page-entry-button-color);--calcite-color-brand-press:var(--instant-apps-landing-page-entry-button-color)}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__description-text{text-align:right}@media only screen and (max-width: 768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}}@media only screen and (max-width: 896px) and (orientation: landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}";
|
26
|
+
const instantAppsLandingPageCss = ":host{--instant-apps-landing-page-background-color:var(--calcite-color-brand);--instant-apps-landing-page-text-color:var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color:var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size:var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size:var(--calcite-font-size-3);--instant-apps-landing-page-description-text-font-size:var(--calcite-font-size-0);--instant-apps-landing-page-icon-image-scale--s:100px;--instant-apps-landing-page-icon-image-scale--m:250px;--instant-apps-landing-page-icon-image-scale--l:500px;--instant-apps-landing-page-entry-button-margin:0}:host .instant-apps-landing-page{box-sizing:border-box;position:absolute;top:0;left:0;z-index:9000;display:flex;flex-direction:column;width:100%;height:100%;padding:2.5%;transition:top 0.5s ease-in-out;background-color:var(--instant-apps-landing-page-background-color);color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:0}:host .instant-apps-landing-page__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);text-align:center}:host .instant-apps-landing-page__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text{text-shadow:0px 4px 3px rgba(0, 0, 0, 0.4), 0px 8px 13px rgba(0, 0, 0, 0.1), 0px 18px 23px rgba(0, 0, 0, 0.1)}:host .instant-apps-landing-page__icon-image{margin-bottom:5px;max-width:50%}:host .instant-apps-landing-page__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container{display:flex}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button{--calcite-color-brand:var(--instant-apps-landing-page-entry-button-color);--calcite-color-brand-hover:var(--instant-apps-landing-page-entry-button-color);--calcite-color-brand-press:var(--instant-apps-landing-page-entry-button-color)}:host .instant-apps-landing-page instant-apps-sign-in{height:100%;width:100%;display:flex;align-items:center;justify-content:center}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__description-text{text-align:right}.instant-apps-landing-page__sign-in{width:100%;height:100%}.instant-apps-landing-page__sign-in--overlay{background:rgba(0, 0, 0, 0.6)}@media only screen and (max-width: 768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}}@media only screen and (max-width: 896px) and (orientation: landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}";
|
27
27
|
const InstantAppsLandingPageStyle0 = instantAppsLandingPageCss;
|
28
28
|
|
29
29
|
const CSS = {
|
@@ -35,10 +35,13 @@ const CSS = {
|
|
35
35
|
closedNoTransition: 'instant-apps-landing-page--closed-no-transition',
|
36
36
|
iconImage: 'instant-apps-landing-page__icon-image',
|
37
37
|
removeTransition: 'instant-apps-landing-page__remove-transition',
|
38
|
+
removePadding: 'instant-apps-landing-page__remove-padding',
|
38
39
|
alignment: 'instant-apps-landing-page__alignment--',
|
39
40
|
entryButton: 'instant-apps-landing-page__entry-button',
|
40
41
|
contentContainer: 'instant-apps-landing-page__content-container',
|
41
42
|
buttonContainer: 'instant-apps-landing-page__button-container',
|
43
|
+
signIn: 'instant-apps-landing-page__sign-in',
|
44
|
+
signInOverlay: 'instant-apps-landing-page__sign-in--overlay',
|
42
45
|
iconImageScale: {
|
43
46
|
s: ' instant-apps-landing-page__icon-image-scale--s',
|
44
47
|
m: ' instant-apps-landing-page__icon-image-scale--m',
|
@@ -63,6 +66,9 @@ const InstantAppsLandingPage = class {
|
|
63
66
|
this.open = true;
|
64
67
|
this.entryButtonScale = 'l';
|
65
68
|
this.fontFamily = 'var(--calcite-sans-family);';
|
69
|
+
this.enableSignIn = undefined;
|
70
|
+
this.portal = undefined;
|
71
|
+
this.oauthappid = undefined;
|
66
72
|
}
|
67
73
|
emitToggleEvent() {
|
68
74
|
if (this.open) {
|
@@ -72,19 +78,34 @@ const InstantAppsLandingPage = class {
|
|
72
78
|
this.landingPageClose.emit();
|
73
79
|
}
|
74
80
|
}
|
81
|
+
componentWillLoad() {
|
82
|
+
if (this.enableSignIn) {
|
83
|
+
const signInTime = localStorage.getItem('signing-in') ? new Date(Number(localStorage.getItem('signing-in'))) : null;
|
84
|
+
if (signInTime != null) {
|
85
|
+
const minuteLimit = 2;
|
86
|
+
if ((Date.now() - signInTime.getTime()) / (60 * 1000) < minuteLimit) {
|
87
|
+
this.open = false;
|
88
|
+
}
|
89
|
+
localStorage.removeItem('signing-in');
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
75
93
|
render() {
|
76
|
-
|
94
|
+
const content = this.enableSignIn ? this.renderLandingPageSignIn() : this.renderLandingPageContent();
|
95
|
+
return index.h(index.Host, null, content);
|
77
96
|
}
|
78
97
|
renderLandingPageContent() {
|
79
98
|
const closed = !this.open ? (this.disableTransition ? ` ${CSS.closedNoTransition}` : ` ${CSS.closed}`) : '';
|
80
99
|
const alignmentClass = this.getAlignmentClass();
|
81
100
|
const removeTransition = this.disableTransition ? ` ${CSS.removeTransition}` : '';
|
82
|
-
const
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
101
|
+
const style = this.getContentStyle();
|
102
|
+
return (index.h("div", { style: style, class: `${CSS.BASE}${alignmentClass}${closed}${removeTransition}` }, index.h("div", { class: CSS.contentContainer }, this.renderIconImage(), this.renderTitleText(), this.renderSubtitleText(), this.renderDescriptionText()), index.h("div", { class: CSS.buttonContainer }, this.renderEntryButton(), index.h("slot", { name: "secondary-action" }))));
|
103
|
+
}
|
104
|
+
renderLandingPageSignIn() {
|
105
|
+
const closed = !this.open ? (this.disableTransition ? ` ${CSS.closedNoTransition}` : ` ${CSS.closed}`) : '';
|
106
|
+
const style = this.getContentStyle();
|
107
|
+
const signInClass = this.backgroundImageSrc ? `${CSS.signIn} ${CSS.signInOverlay}` : CSS.signIn;
|
108
|
+
return (index.h("div", { style: style, class: `${CSS.BASE}${closed} ${CSS.removePadding}` }, index.h("div", { class: signInClass }, index.h("instant-apps-sign-in", { type: "landingPage", landingPage: true, portal: this.portal, oauthappid: this.oauthappid, titleText: this.titleText, subtitleText: this.subtitleText, descriptionText: this.descriptionText, closeLandingPage: this.closeLandingPage.bind(this) }))));
|
88
109
|
}
|
89
110
|
renderIconImage() {
|
90
111
|
return this.iconImage ? index.h("img", { class: `${CSS.iconImage}${this.getIconImageScale()}`, src: this.iconImage, alt: this.iconImageAltText }) : null;
|
@@ -99,7 +120,10 @@ const InstantAppsLandingPage = class {
|
|
99
120
|
return index.h("p", { class: CSS.descriptionText }, this.descriptionText);
|
100
121
|
}
|
101
122
|
renderEntryButton() {
|
102
|
-
return (index.h("calcite-button", { class: CSS.entryButton, onClick: (
|
123
|
+
return (index.h("calcite-button", { class: CSS.entryButton, onClick: this.closeLandingPage.bind(this), scale: this.entryButtonScale, appearance: "outline-fill" }, this.entryButtonText ? this.entryButtonText : 'Enter'));
|
124
|
+
}
|
125
|
+
closeLandingPage() {
|
126
|
+
this.open = false;
|
103
127
|
}
|
104
128
|
getAlignmentClass() {
|
105
129
|
return ` ${CSS.alignment}${this.alignment}`;
|
@@ -109,6 +133,18 @@ const InstantAppsLandingPage = class {
|
|
109
133
|
const { s, m, l } = CSS.iconImageScale;
|
110
134
|
return iconImageScale === 'l' ? l : iconImageScale === 's' ? s : m;
|
111
135
|
}
|
136
|
+
getContentStyle() {
|
137
|
+
const fontFamily = styles.getFontFamily(this.fontFamily);
|
138
|
+
return this.backgroundImageSrc
|
139
|
+
? {
|
140
|
+
fontFamily,
|
141
|
+
backgroundSize: 'cover',
|
142
|
+
backgroundImage: `url("${this.backgroundImageSrc}")`,
|
143
|
+
backgroundRepeat: 'no-repeat',
|
144
|
+
backgroundPosition: 'center',
|
145
|
+
}
|
146
|
+
: { fontFamily };
|
147
|
+
}
|
112
148
|
get el() { return index.getElement(this); }
|
113
149
|
static get watchers() { return {
|
114
150
|
"open": ["emitToggleEvent"]
|
@@ -11,7 +11,7 @@ const index = require('./index-79b35510.js');
|
|
11
11
|
const utils = require('./utils-f3710824.js');
|
12
12
|
const loadModules = require('./loadModules-b28900c2.js');
|
13
13
|
const locale = require('./locale-3fd260e3.js');
|
14
|
-
const languageSwitcher = require('./languageSwitcher-
|
14
|
+
const languageSwitcher = require('./languageSwitcher-b9a1485c.js');
|
15
15
|
require('./index-c078ea5f.js');
|
16
16
|
require('./esri-loader-fce6a9cb.js');
|
17
17
|
require('./languageUtil-da436671.js');
|
@@ -11,7 +11,7 @@ const index = require('./index-79b35510.js');
|
|
11
11
|
const utils = require('./utils-f3710824.js');
|
12
12
|
const loadModules = require('./loadModules-b28900c2.js');
|
13
13
|
const locale = require('./locale-3fd260e3.js');
|
14
|
-
const languageSwitcher = require('./languageSwitcher-
|
14
|
+
const languageSwitcher = require('./languageSwitcher-b9a1485c.js');
|
15
15
|
require('./index-c078ea5f.js');
|
16
16
|
require('./esri-loader-fce6a9cb.js');
|
17
17
|
require('./languageUtil-da436671.js');
|
@@ -0,0 +1,168 @@
|
|
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 loadModules = require('./loadModules-b28900c2.js');
|
12
|
+
const locale = require('./locale-3fd260e3.js');
|
13
|
+
require('./esri-loader-fce6a9cb.js');
|
14
|
+
require('./languageUtil-da436671.js');
|
15
|
+
|
16
|
+
const instantAppsSignInCss = ":host{display:block;box-shadow:none !important}:host .instant-apps-sign-in__container{height:inherit;display:flex;align-items:center}:host .instant-apps-sign-in__container calcite-dropdown,:host .instant-apps-sign-in__container calcite-navigation-user{height:100%}:host .instant-apps-sign-in__container .instant-apps-sign-in__sign-in-btn{margin:10px}:host .instant-apps-sign-in__container calcite-dropdown[scale=m] calcite-dropdown-group{min-width:140px}:host .instant-apps-sign-in__container calcite-dropdown[scale=s] calcite-dropdown-group{min-width:100px}:host .instant-apps-sign-in__container calcite-dropdown-item{--calcite-color-text-1:#d83020;--calcite-color-text-3:#d83020}:host .instant-apps-sign-in__container button{height:32px;width:32px;padding:0;box-sizing:border-box;display:flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;-webkit-text-decoration-line:none;text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;border:none;border-radius:50%;background:#000}:host .instant-apps-sign-in__container button:hover calcite-avatar{opacity:0.7;transition:0.3s}:host .instant-apps-sign-in__landing-page{display:flex;flex-direction:column;justify-content:center;padding:40px;width:50%;min-height:30%;background:rgba(255, 255, 255, 0.8);color:#151515;text-align:center}:host .instant-apps-sign-in__landing-page h1{font-size:22px;margin:10px 0}:host .instant-apps-sign-in__landing-page h2{font-size:16px;margin:0 0 10px}:host .instant-apps-sign-in__landing-page p{font-size:16px;margin:0}:host .instant-apps-sign-in__landing-page-btns{display:flex;justify-content:space-between;margin-top:40px}:host .instant-apps-sign-in__landing-page-btns calcite-button{width:calc(50% - 5px);--calcite-color-brand:var(--instant-apps-landing-page-entry-button-color);--calcite-color-brand-hover:var(--instant-apps-landing-page-entry-button-color);--calcite-color-brand-press:var(--instant-apps-landing-page-entry-button-color)}:host .instant-apps-sign-in__landing-page-btns calcite-button:hover{filter:contrast(0.8)}@media screen and (max-width: 767px){:host .instant-apps-sign-in__landing-page-btns{flex-direction:column;width:100%;align-items:center;height:76px}:host .instant-apps-sign-in__landing-page-btns calcite-button{width:100%}}";
|
17
|
+
const InstantAppsSignInStyle0 = instantAppsSignInCss;
|
18
|
+
|
19
|
+
const CSS = {
|
20
|
+
base: 'instant-apps-sign-in__container',
|
21
|
+
landing: 'instant-apps-sign-in__landing-page',
|
22
|
+
landingBtn: 'instant-apps-sign-in__landing-page-btns',
|
23
|
+
SignInBtn: 'instant-apps-sign-in__sign-in-btn',
|
24
|
+
};
|
25
|
+
const InstantAppsSignIn = class {
|
26
|
+
constructor(hostRef) {
|
27
|
+
index.registerInstance(this, hostRef);
|
28
|
+
this.type = 'navigation';
|
29
|
+
this.portal = undefined;
|
30
|
+
this.oauthappid = undefined;
|
31
|
+
this.openInPopup = undefined;
|
32
|
+
this.landingPage = undefined;
|
33
|
+
this.isSignedIn = undefined;
|
34
|
+
this.user = undefined;
|
35
|
+
this.titleText = undefined;
|
36
|
+
this.subtitleText = undefined;
|
37
|
+
this.descriptionText = undefined;
|
38
|
+
this.closeLandingPage = undefined;
|
39
|
+
this.ready = false;
|
40
|
+
this.messages = undefined;
|
41
|
+
}
|
42
|
+
async watchPortal() {
|
43
|
+
await this.initSignIn();
|
44
|
+
}
|
45
|
+
async watchOauthappid() {
|
46
|
+
await this.initSignIn();
|
47
|
+
}
|
48
|
+
async componentWillLoad() {
|
49
|
+
locale.getMessages(this);
|
50
|
+
await this.initSignIn();
|
51
|
+
}
|
52
|
+
render() {
|
53
|
+
const signIn = this.ready ? this.renderContent() : null;
|
54
|
+
return index.h(index.Host, null, signIn);
|
55
|
+
}
|
56
|
+
renderContent() {
|
57
|
+
return this.type === 'landingPage' ? this.renderLandingPageSignIn() : this.renderSignInContainer();
|
58
|
+
}
|
59
|
+
renderSignInContainer() {
|
60
|
+
return index.h("div", { class: CSS.base }, this.isSignedIn ? this.renderSignInDropdown() : this.renderSignInButton());
|
61
|
+
}
|
62
|
+
renderSignInDropdown() {
|
63
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
64
|
+
const dropdownScale = this.type === 'navigation' ? 'm' : 's';
|
65
|
+
return (index.h("calcite-dropdown", { placement: "bottom-end", scale: dropdownScale }, this.type === 'navigation' ? (index.h("calcite-navigation-user", { slot: "trigger", thumbnail: (_a = this.user) === null || _a === void 0 ? void 0 : _a.thumbnailUrl, "full-name": (_b = this.user) === null || _b === void 0 ? void 0 : _b.fullName, username: (_c = this.user) === null || _c === void 0 ? void 0 : _c.username, textDisabled: true })) : (index.h("button", { slot: "trigger" }, index.h("calcite-avatar", { thumbnail: (_d = this.user) === null || _d === void 0 ? void 0 : _d.thumbnailUrl, "full-name": (_e = this.user) === null || _e === void 0 ? void 0 : _e.fullName, username: (_f = this.user) === null || _f === void 0 ? void 0 : _f.username }))), index.h("calcite-dropdown-group", { "selection-mode": "none" }, index.h("calcite-dropdown-item", { onClick: this.signOut.bind(this) }, (_g = this.messages) === null || _g === void 0 ? void 0 : _g.signOut))));
|
66
|
+
}
|
67
|
+
renderSignInButton() {
|
68
|
+
var _a;
|
69
|
+
const appearance = this.type === 'navigation' ? 'transparent' : 'brand';
|
70
|
+
const className = this.type === 'navigation' ? CSS.SignInBtn : '';
|
71
|
+
return (index.h("calcite-button", { class: className, onClick: this.signIn.bind(this), scale: "s", "icon-start": "sign-in", appearance: appearance }, (_a = this.messages) === null || _a === void 0 ? void 0 : _a.signIn));
|
72
|
+
}
|
73
|
+
renderLandingPageSignIn() {
|
74
|
+
var _a, _b;
|
75
|
+
return (index.h("div", { class: CSS.landing }, index.h("h1", null, this.titleText), index.h("h2", null, this.subtitleText), index.h("p", null, this.descriptionText), index.h("div", { class: CSS.landingBtn }, index.h("calcite-button", { onClick: this.landingPageSignIn.bind(this) }, (_a = this.messages) === null || _a === void 0 ? void 0 : _a.signIn), index.h("calcite-button", { onClick: this.guestOnClick.bind(this), appearance: "outline" }, (_b = this.messages) === null || _b === void 0 ? void 0 : _b.continueAsGuest))));
|
76
|
+
}
|
77
|
+
async initSignIn() {
|
78
|
+
if (this.portal == null || this.oauthappid == null)
|
79
|
+
return;
|
80
|
+
const [OAuthInfo, esriId, reactiveUtils] = await loadModules.loadModules(['esri/identity/OAuthInfo', 'esri/identity/IdentityManager', 'esri/core/reactiveUtils']);
|
81
|
+
this.idManager = esriId;
|
82
|
+
this.info = new OAuthInfo({
|
83
|
+
appId: this.oauthappid,
|
84
|
+
portalUrl: this.portal.url,
|
85
|
+
flowType: 'authorization-code',
|
86
|
+
popup: this.openInPopup,
|
87
|
+
});
|
88
|
+
this.idManager.registerOAuthInfos([this.info]);
|
89
|
+
this.isSignedIn = await this.checkSignInStatus();
|
90
|
+
this.ready = true;
|
91
|
+
this.watchCredential();
|
92
|
+
reactiveUtils
|
93
|
+
.whenOnce(() => this.portal.user)
|
94
|
+
.then(() => {
|
95
|
+
this.user = this.portal.user;
|
96
|
+
this.ready = true;
|
97
|
+
});
|
98
|
+
}
|
99
|
+
signIn() {
|
100
|
+
if (this.landingPage) {
|
101
|
+
this.setSignInLocalStorage();
|
102
|
+
}
|
103
|
+
this.idManager
|
104
|
+
.getCredential(this.info.portalUrl + '/sharing', {
|
105
|
+
oAuthPopupConfirmation: false,
|
106
|
+
})
|
107
|
+
.then(async () => {
|
108
|
+
await this.checkSignInStatus();
|
109
|
+
});
|
110
|
+
}
|
111
|
+
signOut() {
|
112
|
+
this.idManager.destroyCredentials();
|
113
|
+
this.portal.authMode = 'anonymous';
|
114
|
+
localStorage.removeItem('_AGO_SESSION_');
|
115
|
+
this.isSignedIn = false;
|
116
|
+
this.portal.credential = null;
|
117
|
+
}
|
118
|
+
landingPageSignIn() {
|
119
|
+
if (!this.isSignedIn) {
|
120
|
+
this.setSignInLocalStorage();
|
121
|
+
this.signIn();
|
122
|
+
}
|
123
|
+
else if (this.closeLandingPage != null) {
|
124
|
+
this.closeLandingPage();
|
125
|
+
}
|
126
|
+
}
|
127
|
+
guestOnClick() {
|
128
|
+
this.signOut();
|
129
|
+
if (this.closeLandingPage != null) {
|
130
|
+
this.closeLandingPage();
|
131
|
+
}
|
132
|
+
}
|
133
|
+
checkSignInStatus() {
|
134
|
+
return new Promise(resolve => {
|
135
|
+
this.idManager
|
136
|
+
.checkSignInStatus(this.info.portalUrl + '/sharing')
|
137
|
+
.then(async (credential) => {
|
138
|
+
this.portal.credential = credential;
|
139
|
+
resolve(true);
|
140
|
+
})
|
141
|
+
.catch(() => {
|
142
|
+
this.portal.credential = null;
|
143
|
+
resolve(false);
|
144
|
+
});
|
145
|
+
});
|
146
|
+
}
|
147
|
+
watchCredential() {
|
148
|
+
this.portal.addHandles(this.portal.watch('credential', credential => {
|
149
|
+
this.isSignedIn = credential != null;
|
150
|
+
}));
|
151
|
+
}
|
152
|
+
setSignInLocalStorage() {
|
153
|
+
const date = new Date();
|
154
|
+
localStorage.setItem('signing-in', date.getTime().toString());
|
155
|
+
// remove from local storage if page doens't immediately redirect to sign in
|
156
|
+
setTimeout(() => {
|
157
|
+
localStorage.removeItem('signing-in');
|
158
|
+
}, 2000);
|
159
|
+
}
|
160
|
+
get el() { return index.getElement(this); }
|
161
|
+
static get watchers() { return {
|
162
|
+
"portal": ["watchPortal"],
|
163
|
+
"oauthappid": ["watchOauthappid"]
|
164
|
+
}; }
|
165
|
+
};
|
166
|
+
InstantAppsSignIn.style = InstantAppsSignInStyle0;
|
167
|
+
|
168
|
+
exports.instant_apps_sign_in = InstantAppsSignIn;
|
@@ -28,7 +28,9 @@ async function getPortalItemResource(portalItem) {
|
|
28
28
|
if (!portalItem)
|
29
29
|
return null;
|
30
30
|
const [PortalItemResource] = await loadModules.loadModules(['esri/portal/PortalItemResource']);
|
31
|
-
const existingResourcesRes = await portalItem.fetchResources(
|
31
|
+
const existingResourcesRes = await portalItem.fetchResources({
|
32
|
+
num: 100,
|
33
|
+
});
|
32
34
|
const path = `t9n/${portalItem === null || portalItem === void 0 ? void 0 : portalItem.id}.json`;
|
33
35
|
const resource = new PortalItemResource({ path, portalItem });
|
34
36
|
const existingResourceArr = existingResourcesRes.resources.filter(resourceItem => resourceItem.resource.path === path);
|