@esri/solutions-components 0.8.23 → 0.8.25
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 +44 -34
- 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 +58 -38
- package/dist/cjs/feature-list.cjs.entry.js +5 -4
- 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 +9 -2
- package/dist/collection/components/create-related-feature/create-related-feature.js +9 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +1 -1
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +58 -47
- package/dist/collection/components/feature-details/feature-details.css +4 -4
- package/dist/collection/components/feature-details/feature-details.js +62 -18
- package/dist/collection/components/feature-list/feature-list.css +2 -0
- 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 +9 -2
- package/dist/components/create-related-feature2.js +9 -2
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/crowdsource-reporter.js +59 -39
- package/dist/components/feature-details2.js +22 -17
- package/dist/components/feature-list2.js +6 -4
- 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 +44 -34
- 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 +58 -38
- package/dist/esm/feature-list.entry.js +5 -4
- 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-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-5b817c98.entry.js +6 -0
- package/dist/solutions-components/p-614ebce7.js +6 -0
- package/dist/solutions-components/p-686fa7ce.entry.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-c2ec0dcc.entry.js +17 -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-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-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/create-feature/create-feature.d.ts +4 -0
- package/dist/types/components/create-related-feature/create-related-feature.d.ts +4 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +18 -7
- package/dist/types/components/feature-details/feature-details.d.ts +17 -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-64da5bb8.entry.js +0 -17
- 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
@@ -5,9 +5,15 @@
|
|
5
5
|
*/
|
6
6
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
7
7
|
import { g as getFontFamily } from './styles.js';
|
8
|
-
import { d as defineCustomElement$
|
9
|
-
import { d as defineCustomElement$
|
10
|
-
import { d as defineCustomElement$
|
8
|
+
import { d as defineCustomElement$a } from './avatar.js';
|
9
|
+
import { d as defineCustomElement$9 } from './button.js';
|
10
|
+
import { d as defineCustomElement$8 } from './dropdown.js';
|
11
|
+
import { d as defineCustomElement$7 } from './dropdown-group.js';
|
12
|
+
import { d as defineCustomElement$6 } from './dropdown-item.js';
|
13
|
+
import { d as defineCustomElement$5 } from './icon.js';
|
14
|
+
import { d as defineCustomElement$4 } from './loader.js';
|
15
|
+
import { d as defineCustomElement$3 } from './navigation-user.js';
|
16
|
+
import { d as defineCustomElement$2 } from './instant-apps-sign-in2.js';
|
11
17
|
|
12
18
|
var AlignmentPositions;
|
13
19
|
(function (AlignmentPositions) {
|
@@ -22,7 +28,7 @@ var AlignmentPositions;
|
|
22
28
|
AlignmentPositions["BottomRight"] = "bottom-right";
|
23
29
|
})(AlignmentPositions || (AlignmentPositions = {}));
|
24
30
|
|
25
|
-
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%}}";
|
31
|
+
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%}}";
|
26
32
|
const InstantAppsLandingPageStyle0 = instantAppsLandingPageCss;
|
27
33
|
|
28
34
|
const CSS = {
|
@@ -34,10 +40,13 @@ const CSS = {
|
|
34
40
|
closedNoTransition: 'instant-apps-landing-page--closed-no-transition',
|
35
41
|
iconImage: 'instant-apps-landing-page__icon-image',
|
36
42
|
removeTransition: 'instant-apps-landing-page__remove-transition',
|
43
|
+
removePadding: 'instant-apps-landing-page__remove-padding',
|
37
44
|
alignment: 'instant-apps-landing-page__alignment--',
|
38
45
|
entryButton: 'instant-apps-landing-page__entry-button',
|
39
46
|
contentContainer: 'instant-apps-landing-page__content-container',
|
40
47
|
buttonContainer: 'instant-apps-landing-page__button-container',
|
48
|
+
signIn: 'instant-apps-landing-page__sign-in',
|
49
|
+
signInOverlay: 'instant-apps-landing-page__sign-in--overlay',
|
41
50
|
iconImageScale: {
|
42
51
|
s: ' instant-apps-landing-page__icon-image-scale--s',
|
43
52
|
m: ' instant-apps-landing-page__icon-image-scale--m',
|
@@ -64,6 +73,9 @@ const InstantAppsLandingPage$1 = /*@__PURE__*/ proxyCustomElement(class InstantA
|
|
64
73
|
this.open = true;
|
65
74
|
this.entryButtonScale = 'l';
|
66
75
|
this.fontFamily = 'var(--calcite-sans-family);';
|
76
|
+
this.enableSignIn = undefined;
|
77
|
+
this.portal = undefined;
|
78
|
+
this.oauthappid = undefined;
|
67
79
|
}
|
68
80
|
emitToggleEvent() {
|
69
81
|
if (this.open) {
|
@@ -73,19 +85,34 @@ const InstantAppsLandingPage$1 = /*@__PURE__*/ proxyCustomElement(class InstantA
|
|
73
85
|
this.landingPageClose.emit();
|
74
86
|
}
|
75
87
|
}
|
88
|
+
componentWillLoad() {
|
89
|
+
if (this.enableSignIn) {
|
90
|
+
const signInTime = localStorage.getItem('signing-in') ? new Date(Number(localStorage.getItem('signing-in'))) : null;
|
91
|
+
if (signInTime != null) {
|
92
|
+
const minuteLimit = 2;
|
93
|
+
if ((Date.now() - signInTime.getTime()) / (60 * 1000) < minuteLimit) {
|
94
|
+
this.open = false;
|
95
|
+
}
|
96
|
+
localStorage.removeItem('signing-in');
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
76
100
|
render() {
|
77
|
-
|
101
|
+
const content = this.enableSignIn ? this.renderLandingPageSignIn() : this.renderLandingPageContent();
|
102
|
+
return h(Host, null, content);
|
78
103
|
}
|
79
104
|
renderLandingPageContent() {
|
80
105
|
const closed = !this.open ? (this.disableTransition ? ` ${CSS.closedNoTransition}` : ` ${CSS.closed}`) : '';
|
81
106
|
const alignmentClass = this.getAlignmentClass();
|
82
107
|
const removeTransition = this.disableTransition ? ` ${CSS.removeTransition}` : '';
|
83
|
-
const
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
108
|
+
const style = this.getContentStyle();
|
109
|
+
return (h("div", { style: style, class: `${CSS.BASE}${alignmentClass}${closed}${removeTransition}` }, h("div", { class: CSS.contentContainer }, this.renderIconImage(), this.renderTitleText(), this.renderSubtitleText(), this.renderDescriptionText()), h("div", { class: CSS.buttonContainer }, this.renderEntryButton(), h("slot", { name: "secondary-action" }))));
|
110
|
+
}
|
111
|
+
renderLandingPageSignIn() {
|
112
|
+
const closed = !this.open ? (this.disableTransition ? ` ${CSS.closedNoTransition}` : ` ${CSS.closed}`) : '';
|
113
|
+
const style = this.getContentStyle();
|
114
|
+
const signInClass = this.backgroundImageSrc ? `${CSS.signIn} ${CSS.signInOverlay}` : CSS.signIn;
|
115
|
+
return (h("div", { style: style, class: `${CSS.BASE}${closed} ${CSS.removePadding}` }, h("div", { class: signInClass }, 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) }))));
|
89
116
|
}
|
90
117
|
renderIconImage() {
|
91
118
|
return this.iconImage ? h("img", { class: `${CSS.iconImage}${this.getIconImageScale()}`, src: this.iconImage, alt: this.iconImageAltText }) : null;
|
@@ -100,7 +127,10 @@ const InstantAppsLandingPage$1 = /*@__PURE__*/ proxyCustomElement(class InstantA
|
|
100
127
|
return h("p", { class: CSS.descriptionText }, this.descriptionText);
|
101
128
|
}
|
102
129
|
renderEntryButton() {
|
103
|
-
return (h("calcite-button", { class: CSS.entryButton, onClick: (
|
130
|
+
return (h("calcite-button", { class: CSS.entryButton, onClick: this.closeLandingPage.bind(this), scale: this.entryButtonScale, appearance: "outline-fill" }, this.entryButtonText ? this.entryButtonText : 'Enter'));
|
131
|
+
}
|
132
|
+
closeLandingPage() {
|
133
|
+
this.open = false;
|
104
134
|
}
|
105
135
|
getAlignmentClass() {
|
106
136
|
return ` ${CSS.alignment}${this.alignment}`;
|
@@ -110,6 +140,18 @@ const InstantAppsLandingPage$1 = /*@__PURE__*/ proxyCustomElement(class InstantA
|
|
110
140
|
const { s, m, l } = CSS.iconImageScale;
|
111
141
|
return iconImageScale === 'l' ? l : iconImageScale === 's' ? s : m;
|
112
142
|
}
|
143
|
+
getContentStyle() {
|
144
|
+
const fontFamily = getFontFamily(this.fontFamily);
|
145
|
+
return this.backgroundImageSrc
|
146
|
+
? {
|
147
|
+
fontFamily,
|
148
|
+
backgroundSize: 'cover',
|
149
|
+
backgroundImage: `url("${this.backgroundImageSrc}")`,
|
150
|
+
backgroundRepeat: 'no-repeat',
|
151
|
+
backgroundPosition: 'center',
|
152
|
+
}
|
153
|
+
: { fontFamily };
|
154
|
+
}
|
113
155
|
get el() { return this; }
|
114
156
|
static get watchers() { return {
|
115
157
|
"open": ["emitToggleEvent"]
|
@@ -128,7 +170,10 @@ const InstantAppsLandingPage$1 = /*@__PURE__*/ proxyCustomElement(class InstantA
|
|
128
170
|
"backgroundImageSrc": [1, "background-image-src"],
|
129
171
|
"open": [1028],
|
130
172
|
"entryButtonScale": [1, "entry-button-scale"],
|
131
|
-
"fontFamily": [513, "font-family"]
|
173
|
+
"fontFamily": [513, "font-family"],
|
174
|
+
"enableSignIn": [4, "enable-sign-in"],
|
175
|
+
"portal": [16],
|
176
|
+
"oauthappid": [1]
|
132
177
|
}, undefined, {
|
133
178
|
"open": ["emitToggleEvent"]
|
134
179
|
}]);
|
@@ -136,24 +181,54 @@ function defineCustomElement$1() {
|
|
136
181
|
if (typeof customElements === "undefined") {
|
137
182
|
return;
|
138
183
|
}
|
139
|
-
const components = ["instant-apps-landing-page", "calcite-button", "calcite-icon", "calcite-loader"];
|
184
|
+
const components = ["instant-apps-landing-page", "calcite-avatar", "calcite-button", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-icon", "calcite-loader", "calcite-navigation-user", "instant-apps-sign-in"];
|
140
185
|
components.forEach(tagName => { switch (tagName) {
|
141
186
|
case "instant-apps-landing-page":
|
142
187
|
if (!customElements.get(tagName)) {
|
143
188
|
customElements.define(tagName, InstantAppsLandingPage$1);
|
144
189
|
}
|
145
190
|
break;
|
191
|
+
case "calcite-avatar":
|
192
|
+
if (!customElements.get(tagName)) {
|
193
|
+
defineCustomElement$a();
|
194
|
+
}
|
195
|
+
break;
|
146
196
|
case "calcite-button":
|
147
197
|
if (!customElements.get(tagName)) {
|
148
|
-
defineCustomElement$
|
198
|
+
defineCustomElement$9();
|
199
|
+
}
|
200
|
+
break;
|
201
|
+
case "calcite-dropdown":
|
202
|
+
if (!customElements.get(tagName)) {
|
203
|
+
defineCustomElement$8();
|
204
|
+
}
|
205
|
+
break;
|
206
|
+
case "calcite-dropdown-group":
|
207
|
+
if (!customElements.get(tagName)) {
|
208
|
+
defineCustomElement$7();
|
209
|
+
}
|
210
|
+
break;
|
211
|
+
case "calcite-dropdown-item":
|
212
|
+
if (!customElements.get(tagName)) {
|
213
|
+
defineCustomElement$6();
|
149
214
|
}
|
150
215
|
break;
|
151
216
|
case "calcite-icon":
|
152
217
|
if (!customElements.get(tagName)) {
|
153
|
-
defineCustomElement$
|
218
|
+
defineCustomElement$5();
|
154
219
|
}
|
155
220
|
break;
|
156
221
|
case "calcite-loader":
|
222
|
+
if (!customElements.get(tagName)) {
|
223
|
+
defineCustomElement$4();
|
224
|
+
}
|
225
|
+
break;
|
226
|
+
case "calcite-navigation-user":
|
227
|
+
if (!customElements.get(tagName)) {
|
228
|
+
defineCustomElement$3();
|
229
|
+
}
|
230
|
+
break;
|
231
|
+
case "instant-apps-sign-in":
|
157
232
|
if (!customElements.get(tagName)) {
|
158
233
|
defineCustomElement$2();
|
159
234
|
}
|
@@ -45,7 +45,9 @@ async function getPortalItemResource(portalItem) {
|
|
45
45
|
if (!portalItem)
|
46
46
|
return null;
|
47
47
|
const [PortalItemResource] = await loadModules(['esri/portal/PortalItemResource']);
|
48
|
-
const existingResourcesRes = await portalItem.fetchResources(
|
48
|
+
const existingResourcesRes = await portalItem.fetchResources({
|
49
|
+
num: 100,
|
50
|
+
});
|
49
51
|
const path = `t9n/${portalItem === null || portalItem === void 0 ? void 0 : portalItem.id}.json`;
|
50
52
|
const resource = new PortalItemResource({ path, portalItem });
|
51
53
|
const existingResourceArr = existingResourcesRes.resources.filter(resourceItem => resourceItem.resource.path === path);
|
@@ -0,0 +1,11 @@
|
|
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
|
+
import { I as InstantAppsSignIn$1, d as defineCustomElement$1 } from './instant-apps-sign-in2.js';
|
7
|
+
|
8
|
+
const InstantAppsSignIn = InstantAppsSignIn$1;
|
9
|
+
const defineCustomElement = defineCustomElement$1;
|
10
|
+
|
11
|
+
export { InstantAppsSignIn, defineCustomElement };
|
@@ -0,0 +1,243 @@
|
|
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
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
7
|
+
import { l as loadModules } from './loadModules2.js';
|
8
|
+
import { g as getMessages } from './locale3.js';
|
9
|
+
import { d as defineCustomElement$8 } from './avatar.js';
|
10
|
+
import { d as defineCustomElement$7 } from './button.js';
|
11
|
+
import { d as defineCustomElement$6 } from './dropdown.js';
|
12
|
+
import { d as defineCustomElement$5 } from './dropdown-group.js';
|
13
|
+
import { d as defineCustomElement$4 } from './dropdown-item.js';
|
14
|
+
import { d as defineCustomElement$3 } from './icon.js';
|
15
|
+
import { d as defineCustomElement$2 } from './loader.js';
|
16
|
+
import { d as defineCustomElement$1 } from './navigation-user.js';
|
17
|
+
|
18
|
+
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%}}";
|
19
|
+
const InstantAppsSignInStyle0 = instantAppsSignInCss;
|
20
|
+
|
21
|
+
const CSS = {
|
22
|
+
base: 'instant-apps-sign-in__container',
|
23
|
+
landing: 'instant-apps-sign-in__landing-page',
|
24
|
+
landingBtn: 'instant-apps-sign-in__landing-page-btns',
|
25
|
+
SignInBtn: 'instant-apps-sign-in__sign-in-btn',
|
26
|
+
};
|
27
|
+
const InstantAppsSignIn = /*@__PURE__*/ proxyCustomElement(class InstantAppsSignIn extends HTMLElement {
|
28
|
+
constructor() {
|
29
|
+
super();
|
30
|
+
this.__registerHost();
|
31
|
+
this.__attachShadow();
|
32
|
+
this.type = 'navigation';
|
33
|
+
this.portal = undefined;
|
34
|
+
this.oauthappid = undefined;
|
35
|
+
this.openInPopup = undefined;
|
36
|
+
this.landingPage = undefined;
|
37
|
+
this.isSignedIn = undefined;
|
38
|
+
this.user = undefined;
|
39
|
+
this.titleText = undefined;
|
40
|
+
this.subtitleText = undefined;
|
41
|
+
this.descriptionText = undefined;
|
42
|
+
this.closeLandingPage = undefined;
|
43
|
+
this.ready = false;
|
44
|
+
this.messages = undefined;
|
45
|
+
}
|
46
|
+
async watchPortal() {
|
47
|
+
await this.initSignIn();
|
48
|
+
}
|
49
|
+
async watchOauthappid() {
|
50
|
+
await this.initSignIn();
|
51
|
+
}
|
52
|
+
async componentWillLoad() {
|
53
|
+
getMessages(this);
|
54
|
+
await this.initSignIn();
|
55
|
+
}
|
56
|
+
render() {
|
57
|
+
const signIn = this.ready ? this.renderContent() : null;
|
58
|
+
return h(Host, null, signIn);
|
59
|
+
}
|
60
|
+
renderContent() {
|
61
|
+
return this.type === 'landingPage' ? this.renderLandingPageSignIn() : this.renderSignInContainer();
|
62
|
+
}
|
63
|
+
renderSignInContainer() {
|
64
|
+
return h("div", { class: CSS.base }, this.isSignedIn ? this.renderSignInDropdown() : this.renderSignInButton());
|
65
|
+
}
|
66
|
+
renderSignInDropdown() {
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
68
|
+
const dropdownScale = this.type === 'navigation' ? 'm' : 's';
|
69
|
+
return (h("calcite-dropdown", { placement: "bottom-end", scale: dropdownScale }, this.type === 'navigation' ? (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 })) : (h("button", { slot: "trigger" }, 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 }))), h("calcite-dropdown-group", { "selection-mode": "none" }, h("calcite-dropdown-item", { onClick: this.signOut.bind(this) }, (_g = this.messages) === null || _g === void 0 ? void 0 : _g.signOut))));
|
70
|
+
}
|
71
|
+
renderSignInButton() {
|
72
|
+
var _a;
|
73
|
+
const appearance = this.type === 'navigation' ? 'transparent' : 'brand';
|
74
|
+
const className = this.type === 'navigation' ? CSS.SignInBtn : '';
|
75
|
+
return (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));
|
76
|
+
}
|
77
|
+
renderLandingPageSignIn() {
|
78
|
+
var _a, _b;
|
79
|
+
return (h("div", { class: CSS.landing }, h("h1", null, this.titleText), h("h2", null, this.subtitleText), h("p", null, this.descriptionText), h("div", { class: CSS.landingBtn }, h("calcite-button", { onClick: this.landingPageSignIn.bind(this) }, (_a = this.messages) === null || _a === void 0 ? void 0 : _a.signIn), h("calcite-button", { onClick: this.guestOnClick.bind(this), appearance: "outline" }, (_b = this.messages) === null || _b === void 0 ? void 0 : _b.continueAsGuest))));
|
80
|
+
}
|
81
|
+
async initSignIn() {
|
82
|
+
if (this.portal == null || this.oauthappid == null)
|
83
|
+
return;
|
84
|
+
const [OAuthInfo, esriId, reactiveUtils] = await loadModules(['esri/identity/OAuthInfo', 'esri/identity/IdentityManager', 'esri/core/reactiveUtils']);
|
85
|
+
this.idManager = esriId;
|
86
|
+
this.info = new OAuthInfo({
|
87
|
+
appId: this.oauthappid,
|
88
|
+
portalUrl: this.portal.url,
|
89
|
+
flowType: 'authorization-code',
|
90
|
+
popup: this.openInPopup,
|
91
|
+
});
|
92
|
+
this.idManager.registerOAuthInfos([this.info]);
|
93
|
+
this.isSignedIn = await this.checkSignInStatus();
|
94
|
+
this.ready = true;
|
95
|
+
this.watchCredential();
|
96
|
+
reactiveUtils
|
97
|
+
.whenOnce(() => this.portal.user)
|
98
|
+
.then(() => {
|
99
|
+
this.user = this.portal.user;
|
100
|
+
this.ready = true;
|
101
|
+
});
|
102
|
+
}
|
103
|
+
signIn() {
|
104
|
+
if (this.landingPage) {
|
105
|
+
this.setSignInLocalStorage();
|
106
|
+
}
|
107
|
+
this.idManager
|
108
|
+
.getCredential(this.info.portalUrl + '/sharing', {
|
109
|
+
oAuthPopupConfirmation: false,
|
110
|
+
})
|
111
|
+
.then(async () => {
|
112
|
+
await this.checkSignInStatus();
|
113
|
+
});
|
114
|
+
}
|
115
|
+
signOut() {
|
116
|
+
this.idManager.destroyCredentials();
|
117
|
+
this.portal.authMode = 'anonymous';
|
118
|
+
localStorage.removeItem('_AGO_SESSION_');
|
119
|
+
this.isSignedIn = false;
|
120
|
+
this.portal.credential = null;
|
121
|
+
}
|
122
|
+
landingPageSignIn() {
|
123
|
+
if (!this.isSignedIn) {
|
124
|
+
this.setSignInLocalStorage();
|
125
|
+
this.signIn();
|
126
|
+
}
|
127
|
+
else if (this.closeLandingPage != null) {
|
128
|
+
this.closeLandingPage();
|
129
|
+
}
|
130
|
+
}
|
131
|
+
guestOnClick() {
|
132
|
+
this.signOut();
|
133
|
+
if (this.closeLandingPage != null) {
|
134
|
+
this.closeLandingPage();
|
135
|
+
}
|
136
|
+
}
|
137
|
+
checkSignInStatus() {
|
138
|
+
return new Promise(resolve => {
|
139
|
+
this.idManager
|
140
|
+
.checkSignInStatus(this.info.portalUrl + '/sharing')
|
141
|
+
.then(async (credential) => {
|
142
|
+
this.portal.credential = credential;
|
143
|
+
resolve(true);
|
144
|
+
})
|
145
|
+
.catch(() => {
|
146
|
+
this.portal.credential = null;
|
147
|
+
resolve(false);
|
148
|
+
});
|
149
|
+
});
|
150
|
+
}
|
151
|
+
watchCredential() {
|
152
|
+
this.portal.addHandles(this.portal.watch('credential', credential => {
|
153
|
+
this.isSignedIn = credential != null;
|
154
|
+
}));
|
155
|
+
}
|
156
|
+
setSignInLocalStorage() {
|
157
|
+
const date = new Date();
|
158
|
+
localStorage.setItem('signing-in', date.getTime().toString());
|
159
|
+
// remove from local storage if page doens't immediately redirect to sign in
|
160
|
+
setTimeout(() => {
|
161
|
+
localStorage.removeItem('signing-in');
|
162
|
+
}, 2000);
|
163
|
+
}
|
164
|
+
get el() { return this; }
|
165
|
+
static get watchers() { return {
|
166
|
+
"portal": ["watchPortal"],
|
167
|
+
"oauthappid": ["watchOauthappid"]
|
168
|
+
}; }
|
169
|
+
static get style() { return InstantAppsSignInStyle0; }
|
170
|
+
}, [1, "instant-apps-sign-in", {
|
171
|
+
"type": [1],
|
172
|
+
"portal": [16],
|
173
|
+
"oauthappid": [1],
|
174
|
+
"openInPopup": [4, "open-in-popup"],
|
175
|
+
"landingPage": [4, "landing-page"],
|
176
|
+
"titleText": [1, "title-text"],
|
177
|
+
"subtitleText": [1, "subtitle-text"],
|
178
|
+
"descriptionText": [1, "description-text"],
|
179
|
+
"closeLandingPage": [16],
|
180
|
+
"isSignedIn": [32],
|
181
|
+
"user": [32],
|
182
|
+
"ready": [32],
|
183
|
+
"messages": [32]
|
184
|
+
}, undefined, {
|
185
|
+
"portal": ["watchPortal"],
|
186
|
+
"oauthappid": ["watchOauthappid"]
|
187
|
+
}]);
|
188
|
+
function defineCustomElement() {
|
189
|
+
if (typeof customElements === "undefined") {
|
190
|
+
return;
|
191
|
+
}
|
192
|
+
const components = ["instant-apps-sign-in", "calcite-avatar", "calcite-button", "calcite-dropdown", "calcite-dropdown-group", "calcite-dropdown-item", "calcite-icon", "calcite-loader", "calcite-navigation-user"];
|
193
|
+
components.forEach(tagName => { switch (tagName) {
|
194
|
+
case "instant-apps-sign-in":
|
195
|
+
if (!customElements.get(tagName)) {
|
196
|
+
customElements.define(tagName, InstantAppsSignIn);
|
197
|
+
}
|
198
|
+
break;
|
199
|
+
case "calcite-avatar":
|
200
|
+
if (!customElements.get(tagName)) {
|
201
|
+
defineCustomElement$8();
|
202
|
+
}
|
203
|
+
break;
|
204
|
+
case "calcite-button":
|
205
|
+
if (!customElements.get(tagName)) {
|
206
|
+
defineCustomElement$7();
|
207
|
+
}
|
208
|
+
break;
|
209
|
+
case "calcite-dropdown":
|
210
|
+
if (!customElements.get(tagName)) {
|
211
|
+
defineCustomElement$6();
|
212
|
+
}
|
213
|
+
break;
|
214
|
+
case "calcite-dropdown-group":
|
215
|
+
if (!customElements.get(tagName)) {
|
216
|
+
defineCustomElement$5();
|
217
|
+
}
|
218
|
+
break;
|
219
|
+
case "calcite-dropdown-item":
|
220
|
+
if (!customElements.get(tagName)) {
|
221
|
+
defineCustomElement$4();
|
222
|
+
}
|
223
|
+
break;
|
224
|
+
case "calcite-icon":
|
225
|
+
if (!customElements.get(tagName)) {
|
226
|
+
defineCustomElement$3();
|
227
|
+
}
|
228
|
+
break;
|
229
|
+
case "calcite-loader":
|
230
|
+
if (!customElements.get(tagName)) {
|
231
|
+
defineCustomElement$2();
|
232
|
+
}
|
233
|
+
break;
|
234
|
+
case "calcite-navigation-user":
|
235
|
+
if (!customElements.get(tagName)) {
|
236
|
+
defineCustomElement$1();
|
237
|
+
}
|
238
|
+
break;
|
239
|
+
} });
|
240
|
+
}
|
241
|
+
defineCustomElement();
|
242
|
+
|
243
|
+
export { InstantAppsSignIn as I, defineCustomElement as d };
|
@@ -94,6 +94,8 @@ const InstantAppsSocialShare = /*@__PURE__*/ proxyCustomElement(class InstantApp
|
|
94
94
|
this.successMessage = '';
|
95
95
|
this.defaultUrlParams = null;
|
96
96
|
this.inlineSuccessPopoverPlacement = 'trailing';
|
97
|
+
this.popoverPositioning = 'absolute';
|
98
|
+
this.removePopoverOffset = false;
|
97
99
|
this.messages = undefined;
|
98
100
|
this.opened = false;
|
99
101
|
this.copied = false;
|
@@ -211,9 +213,11 @@ const InstantAppsSocialShare = /*@__PURE__*/ proxyCustomElement(class InstantApp
|
|
211
213
|
const content = this.copied && this.mode === 'popover' ? (this.renderSuccess()) : (h("div", { class: CSS.dialogContent }, this.renderOptions(), this.displayTipText ? this.renderTip() : null, this.embed ? this.renderEmbed() : null));
|
212
214
|
const layoutClass = this.shareIconsLayout === 'vertical' ? ` ${CSS.layout.vertical}` : ` ${CSS.layout.horizontal}`;
|
213
215
|
const dialogContent = (h("div", { ref: el => (this.dialogContentRef = el), class: `${CSS.dialog}${layoutClass}` }, content));
|
216
|
+
const defaultOffset = 6;
|
217
|
+
const offsetDistance = this.removePopoverOffset ? 0 : defaultOffset;
|
214
218
|
return (h(Host, null, this.mode === 'popover'
|
215
219
|
? [
|
216
|
-
h("calcite-popover", { ref: (el) => (this.popoverRef = el), label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, referenceElement: "shareButton", placement: "bottom-start", scale: this.scale }, dialogContent),
|
220
|
+
h("calcite-popover", { ref: (el) => (this.popoverRef = el), label: (_b = (_a = this.messages) === null || _a === void 0 ? void 0 : _a.share) === null || _b === void 0 ? void 0 : _b.label, referenceElement: "shareButton", placement: "bottom-start", scale: this.scale, "overlay-positioning": this.popoverPositioning, "offset-distance": offsetDistance, "pointer-disabled": this.removePopoverOffset }, dialogContent),
|
217
221
|
this.renderButton(),
|
218
222
|
]
|
219
223
|
: [
|
@@ -265,7 +269,7 @@ const InstantAppsSocialShare = /*@__PURE__*/ proxyCustomElement(class InstantApp
|
|
265
269
|
}
|
266
270
|
renderXIcon() {
|
267
271
|
const isCalciteModeDark = !!this.el.closest(CALCITE_MODE_DARK);
|
268
|
-
return (h("svg", { class: isCalciteModeDark ? CSS.xLogo.dark : CSS.xLogo.light,
|
272
|
+
return (h("svg", { class: isCalciteModeDark ? CSS.xLogo.dark : CSS.xLogo.light, viewBox: "0 0 1200 1227", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { height: "400", style: { fill: 'none' }, width: "400", x: "56", y: "56" }), h("path", { d: "M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z", fill: isCalciteModeDark ? 'white' : 'black' })));
|
269
273
|
}
|
270
274
|
renderLinkedInIcon() {
|
271
275
|
return (h("svg", { height: "100%", style: { fillRule: 'evenodd', clipRule: 'evenodd', strokeLinejoin: 'round', strokeMiterlimit: '2' }, version: "1.1", viewBox: "0 0 512 512", width: "100%", xmlns: "http://www.w3.org/2000/svg" }, h("g", { id: "g5891" }, h("path", { d: "M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z", id: "background", style: { fill: '#2867b2' } }), h("g", { id: "shapes" }, h("rect", { height: "257.962", id: "rect11", style: { fill: '#fff' }, width: "85.76", x: "61.053", y: "178.667" }), h("path", { d: "M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z", id: "path13-0", style: { fill: '#fff', fillRule: 'nonzero' } }), h("path", { d: "M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z", id: "path15", style: { fill: '#fff', fillRule: 'nonzero' } })))));
|
@@ -531,6 +535,8 @@ const InstantAppsSocialShare = /*@__PURE__*/ proxyCustomElement(class InstantApp
|
|
531
535
|
"successMessage": [513, "success-message"],
|
532
536
|
"defaultUrlParams": [16],
|
533
537
|
"inlineSuccessPopoverPlacement": [513, "inline-success-popover-placement"],
|
538
|
+
"popoverPositioning": [513, "popover-positioning"],
|
539
|
+
"removePopoverOffset": [516, "remove-popover-offset"],
|
534
540
|
"messages": [32],
|
535
541
|
"opened": [32],
|
536
542
|
"copied": [32],
|
@@ -78,9 +78,9 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
78
78
|
* Renders the component.
|
79
79
|
*/
|
80
80
|
render() {
|
81
|
-
return (h(Fragment, { key: '
|
82
|
-
h("calcite-notice", { key: '
|
83
|
-
h("calcite-list", { key: '
|
81
|
+
return (h(Fragment, { key: '9366302a704c1dbdd7a65aef5c43d0ad84a44b23' }, this._isLoading && h("calcite-loader", { key: '69974a23fd42bc37ef13816efbe6d06e28cb2749', label: "", scale: "m" }), !this._isLoading && this.mapView && this._noLayersToDisplay &&
|
82
|
+
h("calcite-notice", { key: 'a93abb55b4db09727b3634cb1935e482c377d662', class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { key: 'b9046685353b8894e6c6094cff47fab7a8e07ffa', slot: "title" }, this._translations.error), h("div", { key: '90a052e1d80779a09a32fdd35563a1ce21d582e0', slot: "message" }, this._translations.noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
|
83
|
+
h("calcite-list", { key: '709c1b8edd5710a2476ecef638199c2f929b4165', "selection-appearance": "border", "selection-mode": "none" }, this.renderLayerList())));
|
84
84
|
}
|
85
85
|
//--------------------------------------------------------------------------
|
86
86
|
//
|
@@ -108,10 +108,7 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
108
108
|
const allMapLayers = await getAllLayers(this.mapView);
|
109
109
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
110
110
|
allMapLayers.forEach(async (eachLayer) => {
|
111
|
-
|
112
|
-
//TODO: checking editable condition could be configurable
|
113
|
-
if ((eachLayer === null || eachLayer === void 0 ? void 0 : eachLayer.type) === "feature" && (eachLayer === null || eachLayer === void 0 ? void 0 : eachLayer.editingEnabled) && ((_b = (_a = eachLayer === null || eachLayer === void 0 ? void 0 : eachLayer.capabilities) === null || _a === void 0 ? void 0 : _a.operations) === null || _b === void 0 ? void 0 : _b.supportsAdd)) {
|
114
|
-
this._layerItemsHash[eachLayer.id].supportsAdd = true;
|
111
|
+
if ((eachLayer === null || eachLayer === void 0 ? void 0 : eachLayer.type) === "feature") {
|
115
112
|
if (this.showFeatureCount) {
|
116
113
|
const q = eachLayer.createQuery();
|
117
114
|
const result = eachLayer.queryFeatureCount(q);
|
@@ -144,7 +141,7 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
144
141
|
this.layersListLoaded.emit(this._mapLayerIds);
|
145
142
|
}
|
146
143
|
/**
|
147
|
-
* Returns the ids of
|
144
|
+
* Returns the ids of configured layers that needs to be shown in the list
|
148
145
|
* @param hash each layer item details
|
149
146
|
* @returns array of layer ids
|
150
147
|
*/
|
@@ -152,11 +149,7 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
152
149
|
var _a;
|
153
150
|
const configuredLayers = ((_a = this.layers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.layers : [];
|
154
151
|
return Object.keys(hash).reduce((prev, cur) => {
|
155
|
-
|
156
|
-
if ((configuredLayers === null || configuredLayers === void 0 ? void 0 : configuredLayers.length) > 0) {
|
157
|
-
showLayer = configuredLayers.indexOf(cur) > -1;
|
158
|
-
}
|
159
|
-
if (showLayer) {
|
152
|
+
if (configuredLayers.indexOf(cur) > -1) {
|
160
153
|
prev.push(cur);
|
161
154
|
}
|
162
155
|
return prev;
|