@esri/solutions-components 5.1.0-next.65 → 5.1.0-next.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{KXQ6EA36.js → 33OQKT4F.js} +1 -1
- package/dist/cdn/{GRBH2MOX.js → 3XPKAEMR.js} +1 -1
- package/dist/cdn/{5PIM2BOZ.js → 3XX5UDIU.js} +1 -1
- package/dist/cdn/{IU6ZANQW.js → 42WASQMZ.js} +1 -1
- package/dist/cdn/{2GS5DXMX.js → 43HTXWT4.js} +1 -1
- package/dist/cdn/{CPKTXSK2.js → 4NCV4IWX.js} +1 -1
- package/dist/cdn/4WTAL6YU.js +2 -0
- package/dist/cdn/{3KVDFRXD.js → 4YB7FA37.js} +1 -1
- package/dist/cdn/5TPLPDK2.js +2 -0
- package/dist/cdn/{NFRTFOHF.js → 65Q3GK3L.js} +1 -1
- package/dist/cdn/{ZSJ55A7H.js → 6LHM6EFD.js} +1 -1
- package/dist/cdn/7EEAVPTU.js +2 -0
- package/dist/cdn/{JSI6JODX.js → 7WQMX5XY.js} +1 -1
- package/dist/cdn/{CLF2PJYC.js → BF6NM5HV.js} +1 -1
- package/dist/cdn/BIYG7PA2.js +2 -0
- package/dist/cdn/{H2PJ6QZT.js → BWTBRONP.js} +1 -1
- package/dist/cdn/{GQWWZGLF.js → BXXN7BIC.js} +1 -1
- package/dist/cdn/{4Y4JREZI.js → CACSAX3Q.js} +1 -1
- package/dist/cdn/{NH3ESMSN.js → COTZWDC3.js} +1 -1
- package/dist/cdn/CR2XUUG5.js +2 -0
- package/dist/cdn/{BMOMM64K.js → E7RDA5B4.js} +1 -1
- package/dist/cdn/EUY3GSFI.js +2 -0
- package/dist/cdn/{ONSABHYA.js → GUKPMOPC.js} +1 -1
- package/dist/cdn/{IMN5BMIM.js → GYQ22PJ6.js} +1 -1
- package/dist/cdn/{UQTAX7HB.js → I2AQZTRJ.js} +1 -1
- package/dist/cdn/{FLRIF3C7.js → JCTGE6OA.js} +1 -1
- package/dist/cdn/LCBZNTKI.js +2 -0
- package/dist/cdn/{BK7LW2RY.js → LE6OUXPN.js} +1 -1
- package/dist/cdn/M6ZFMO6K.js +2 -0
- package/dist/cdn/{A6HMNEQC.js → N73GF6WL.js} +1 -1
- package/dist/cdn/{MAUD35WR.js → OPJPVHX6.js} +1 -1
- package/dist/cdn/{7ZN2BMYK.js → PBWC3QFN.js} +1 -1
- package/dist/cdn/{KRWRWUTJ.js → QF3LZFWW.js} +1 -1
- package/dist/cdn/{PTWSYW3E.js → QX7YHRF5.js} +2 -2
- package/dist/cdn/{5TB2UXTT.js → SUN2LQ7K.js} +1 -1
- package/dist/cdn/{DYJGZIDV.js → TYSZL2RK.js} +1 -1
- package/dist/cdn/UHVBUHU3.js +2 -0
- package/dist/cdn/{CWGUKAP6.js → V7UWSW6U.js} +1 -1
- package/dist/cdn/{U4EZHJYT.js → WR3YNDFH.js} +1 -1
- package/dist/cdn/XEQSHS4A.js +2 -0
- package/dist/cdn/{YNERGBJG.js → XY4HNUJE.js} +1 -1
- package/dist/cdn/ZSPRUX4H.js +2 -0
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/cardFetchingUtils.js +12 -12
- package/dist/chunks/helpers.js +44 -38
- package/dist/chunks/solution-deploy-dialog.js +1 -1
- package/dist/chunks/solutions-deploy-app-nav.js +35 -36
- package/dist/components/arcgis-solutions-assistant/customElement.d.ts +4 -0
- package/dist/components/arcgis-solutions-assistant/customElement.js +8 -8
- package/dist/components/arcgis-solutions-assistant/index.js +3 -1
- package/dist/components/solution-deployed-card/customElement.js +1 -1
- package/dist/components/solution-deployed-card-panel/customElement.d.ts +4 -0
- package/dist/components/solution-deployed-card-panel/customElement.js +103 -57
- package/dist/components/solution-deployed-card-panel/index.js +0 -1
- package/dist/components/solution-details-card/customElement.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +6 -6
- package/dist/components/solution-item-accordion/customElement.d.ts +4 -2
- package/dist/components/solution-item-accordion/customElement.js +3 -3
- package/dist/components/solution-resource-card/customElement.js +1 -1
- package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
- package/dist/components/solution-social-share/customElement.js +1 -1
- package/dist/components/solution-user-avatar/customElement.js +1 -1
- package/dist/components/solutions-all-panel/customElement.js +6 -6
- package/dist/components/solutions-all-shell/customElement.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.d.ts +2 -0
- package/dist/components/solutions-deploy-app/customElement.js +117 -95
- package/dist/components/solutions-deploy-app/index.js +4 -0
- package/dist/components/solutions-deploy-app-nav/customElement.d.ts +6 -0
- package/dist/components/solutions-deploy-app-nav/customElement.js +2 -4
- package/dist/components/solutions-deployed-panel/customElement.js +35 -26
- package/dist/components/solutions-deployed-panel/index.js +0 -1
- package/dist/components/solutions-deployed-shell/customElement.js +25 -21
- package/dist/components/solutions-deployed-shell/index.js +0 -1
- package/dist/components/solutions-filter-panel/customElement.d.ts +0 -6
- package/dist/components/solutions-filter-panel/customElement.js +46 -61
- package/dist/components/solutions-filter-panel/index.js +0 -3
- package/dist/components/solutions-resources-shell/customElement.d.ts +6 -0
- package/dist/components/solutions-resources-shell/customElement.js +9 -9
- package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +5 -5
- package/dist/solutions-components_commit.txt +8 -5
- package/dist/types/lumina.d.ts +3 -3
- package/dist/types/preact.d.ts +3 -3
- package/dist/types/react.d.ts +3 -3
- package/dist/types/stencil.d.ts +3 -3
- package/dist/utils/interfaces.d.ts +10 -0
- package/package.json +1 -1
- package/dist/cdn/BDCGPJPJ.js +0 -2
- package/dist/cdn/BFKX5BLC.js +0 -2
- package/dist/cdn/CF6JSZPY.js +0 -2
- package/dist/cdn/DIUHLPYD.js +0 -2
- package/dist/cdn/GFW4PBUK.js +0 -2
- package/dist/cdn/HUJNR7CU.js +0 -2
- package/dist/cdn/N3EAHFBX.js +0 -2
- package/dist/cdn/O3A436MI.js +0 -2
- package/dist/cdn/PQIJUUY3.js +0 -2
- package/dist/cdn/V66MBBFA.js +0 -2
- package/dist/cdn/ZMQ6KCYQ.js +0 -2
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as g } from "../../chunks/runtime.js";
|
|
3
|
-
import {
|
|
3
|
+
import { repeat as m } from "lit/directives/repeat.js";
|
|
4
4
|
import { u as v } from "../../chunks/useT9n.js";
|
|
5
|
-
import { LitElement as C, createEvent as d, safeClassMap as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { LitElement as C, createEvent as d, safeClassMap as _, nothing as S } from "@arcgis/lumina";
|
|
6
|
+
import { css as w, html as h } from "lit";
|
|
7
|
+
import { T as u } from "../../chunks/solutions-deploy-app-nav.js";
|
|
8
|
+
import { a as x, T as c, F as O, B as A, e as F } from "../../chunks/helpers.js";
|
|
8
9
|
import { createRef as o, ref as l } from "lit-html/directives/ref.js";
|
|
9
|
-
import { C as
|
|
10
|
-
import { useContextProvider as
|
|
11
|
-
import { c as
|
|
12
|
-
import { h as
|
|
10
|
+
import { C as T, g as D } from "../../chunks/cardFetchingUtils.js";
|
|
11
|
+
import { useContextProvider as y } from "@arcgis/lumina/context";
|
|
12
|
+
import { c as I, i as $ } from "../../chunks/deployAppContexts.js";
|
|
13
|
+
import { h as k, f as E } from "../../chunks/cardsHelpers.js";
|
|
13
14
|
import "@esri/solution-common";
|
|
14
15
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
15
16
|
import "@arcgis/core/identity/OAuthInfo.js";
|
|
16
17
|
import "@arcgis/core/portal/Portal.js";
|
|
17
18
|
import "@arcgis/core/intl.js";
|
|
18
|
-
import { _ as
|
|
19
|
+
import { _ as M } from "../../chunks/solution-deploy-dialog.js";
|
|
19
20
|
import "../solutions-all-shell/customElement.js";
|
|
20
21
|
import "../solutions-deployed-shell/customElement.js";
|
|
21
22
|
import "../solution-details-panel/customElement.js";
|
|
22
23
|
import "../solution-deployed-card-panel/customElement.js";
|
|
23
|
-
const
|
|
24
|
-
class
|
|
24
|
+
const R = w`.back-color-override{background-color:var(--calcite-color-surface-3);--calcite-tab-border-color: var(--calcite-color-surface-4)}:host{--assistant-panel-width: 420px}.display-none{display:none!important}.height-100{height:100%}calcite-tab-nav{padding-bottom:6px;padding-top:6px}calcite-tab{--calcite-color-focus: transparent}calcite-tab>*{--calcite-color-focus: initial}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-border-2);flex:1;min-height:0}.tab-space-0{--calcite-tab-content-space-y: var(--calcite-spacing-none)}.tab-space-md{--calcite-tab-content-space-y: var(--calcite-spacing-md)}solutions-searchsort-toolbar,solutions-deploy-app-nav,solution-details-panel,solutions-deployed-shell,solutions-all-shell,calcite-tab-nav,solution-deployed-card-panel{width:1440px;display:block;max-width:96vw;padding-right:var(--calcite-spacing-none);padding-left:var(--calcite-spacing-none);margin-left:auto;margin-right:auto;box-sizing:border-box}.border{height:var(--calcite-spacing-px);border-bottom-color:var(--calcite-color-border-2);border-bottom-style:solid;border-bottom-width:var(--calcite-border-width-sm);box-sizing:border-box}.overflow-auto{overflow:auto}solution-details-panel{scroll-margin-top:3rem}.main-content{container-type:inline-size;display:flex;flex-direction:column;height:100%;overflow:hidden}.main-content.assistant-open{margin-right:var(--assistant-panel-width)}.assistant-open solutions-searchsort-toolbar,.assistant-open solution-details-panel,.assistant-open solutions-deployed-shell,.assistant-open solutions-all-shell,.assistant-open calcite-tab-nav,.assistant-open solution-deployed-card-panel{margin-left:max(2vw,calc((100vw - 1440px)/2));margin-right:0;width:auto;max-width:1440px}.assistant-panel{position:fixed;top:65px;right:0;bottom:0;width:var(--assistant-panel-width);z-index:400;display:flex;flex-direction:column;box-shadow:-6px 0 8px -4px #00000026}@media(max-width:800px){.assistant-panel{width:100%;box-shadow:none}.main-content.assistant-open{margin-right:0}}.assistant-fab{position:fixed;bottom:var(--calcite-spacing-xxl);right:var(--calcite-spacing-xxl);z-index:500}calcite-tooltip{--calcite-tooltip-max-size-x: 16rem}`;
|
|
25
|
+
class P extends C {
|
|
25
26
|
constructor() {
|
|
26
|
-
super(), this.initTitleOrId = "", this.sortType = "relevance", this.useLocalAppConfig = !1, this.authentication = void 0, this._isLoaded = !1, this.isMobile = !1, this._activeTab = "all-solutions", this._showDeployedCardFetchFailed = !1, this._translations = v({ name: "solutions-deploy-app", blocking: !0 }), this._agoTerms = `${
|
|
27
|
+
super(), this.initTitleOrId = "", this.sortType = "relevance", this.useLocalAppConfig = !1, this.authentication = void 0, this._isLoaded = !1, this.isMobile = !1, this._isAssistantOpen = !1, this._showFabTooltip = !0, this._activeTab = "all-solutions", this._showDeployedCardFetchFailed = !1, this._globalAlerts = [], this._translations = v({ name: "solutions-deploy-app", blocking: !0 }), this._agoTerms = `${x}`, this._allCards = [], this._allShell = o(), this._allTab = o(), this._allTabTitle = o(), this._resourcesTab = o(), this._resourcesTabTitle = o(), this._categories = [], this._configContextProvider = y({ context: I }), this._delay = !1, this._deployAppNav = o(), this._deployedCardPanel = o(), this._deployCardFetchFailedMessage = "", this._deployedCardTab = o(), this._deployedCardTabTitle = o(), this._detailsShell = o(), this._detailsTab = o(), this._detailsTabTitle = o(), this._forceInit = !1, this._getSuggested = !1, this._tabpanelsFixed = !1, this._isMobileContextProvider = y({ context: $ }), this._mainContentRef = o(), this._mySolutionsShell = o(), this._mySolutionsTab = o(), this._mySolutionsTabTitle = o(), this._sortField = "relevance", this._sortOrder = "desc", this._telemetryManager = new u(), this.deployAppTabSelected = d(), this.deployedCardFetchFailed = d(), this.detailsCardSelected = d(), this.deployedCardSelected = d(), this.metaTagStringsReady = d(), this.sessionRefreshed = d(), this.tabChanged = d(), this.listenOn(window, "detailsCardSelected", this._detailsCardSelected), this.listenOn(window, "deployedCardSelected", this._deployedCardSelected), this.listenOn(window, "displayDeployedCard", this._handleDeployedCardDisplay), this.listenOn(window, "navTabSelected", this._setActiveTab), this.listenOn(window, "forceSelectTab", (t) => this.selectTab(t.detail, {})), this.listenOn(window, "showGlobalAlert", this._handleShowGlobalAlert), this.listenOn(window, "openAssistant", () => {
|
|
28
|
+
this._openAssistant();
|
|
29
|
+
}), this.listenOn(window, "closeAssistant", () => {
|
|
30
|
+
this._isAssistantOpen = !1;
|
|
31
|
+
});
|
|
27
32
|
}
|
|
28
33
|
static {
|
|
29
|
-
this.properties = { appConfig: 1, initTab: 1, initTitleOrId: 1, sortType: 1, useLocalAppConfig: 5, authentication: 16, _isLoaded: 16, isMobile: 16, _activeTab: 16, _showDeployedCardFetchFailed: 16, _translations: 16 };
|
|
34
|
+
this.properties = { appConfig: 1, initTab: 1, initTitleOrId: 1, sortType: 1, useLocalAppConfig: 5, authentication: 16, _isLoaded: 16, isMobile: 16, _isAssistantOpen: 16, _showFabTooltip: 16, _activeTab: 16, _showDeployedCardFetchFailed: 16, _globalAlerts: 16, _translations: 16 };
|
|
30
35
|
}
|
|
31
36
|
static {
|
|
32
|
-
this.styles =
|
|
37
|
+
this.styles = R;
|
|
33
38
|
}
|
|
34
39
|
get _telemetry() {
|
|
35
40
|
return this._configContextProvider.value?.telemetrySession;
|
|
@@ -37,12 +42,18 @@ class L extends C {
|
|
|
37
42
|
get _isDisconnectedEnvironment() {
|
|
38
43
|
return this._configContextProvider.value?.isEnterprise === !0 && this._configContextProvider.value?.authentication?.CanSearchArcGISOnline === !1;
|
|
39
44
|
}
|
|
45
|
+
_openAssistant() {
|
|
46
|
+
this._telemetry?.logEvent({
|
|
47
|
+
category: c.ASSISTANT,
|
|
48
|
+
action: "Open"
|
|
49
|
+
}), this._isAssistantOpen = !0;
|
|
50
|
+
}
|
|
40
51
|
async selectTab(t, e) {
|
|
41
52
|
if (this._isLoaded || this._forceInit) {
|
|
42
|
-
const
|
|
53
|
+
const s = this._getDefaultSearchOptions(e);
|
|
43
54
|
switch (this._searchSortToolbar && (this._searchSortToolbar.scope = t.tabType), t.tabType) {
|
|
44
55
|
case "all-solutions":
|
|
45
|
-
this._allTab.value.selected = !0, this._allTabTitle.value.selected = !0,
|
|
56
|
+
this._allTab.value.selected = !0, this._allTabTitle.value.selected = !0, s && await this._allShell.value?.searchSolutions(s);
|
|
46
57
|
break;
|
|
47
58
|
case "resources":
|
|
48
59
|
this._resourcesTab.value.selected = !0, this._resourcesTabTitle.value.selected = !0;
|
|
@@ -50,8 +61,8 @@ class L extends C {
|
|
|
50
61
|
case "deployed-card":
|
|
51
62
|
if (this.authentication?.IsSignedIn) {
|
|
52
63
|
if (this._forceInit = !0, this._isLoaded = !1, this._cardFetcherDeployed && await this._getDeployedSolution(t.tabTitleOrId), this._deployedSolutions?.cards?.length > 0) {
|
|
53
|
-
let
|
|
54
|
-
this._deployedSolutions.cards.some((a) => a.id === t.tabTitleOrId ? (
|
|
64
|
+
let i;
|
|
65
|
+
this._deployedSolutions.cards.some((a) => a.id === t.tabTitleOrId ? (i = a, this.deployedCardSelected.emit({ card: i }), !0) : !1), this._isLoaded = !0, this._forceInit = !1;
|
|
55
66
|
} else
|
|
56
67
|
return this._isLoaded = !0, this._forceInit = !1, this.selectTab({ tabTitleOrId: "", tabType: "deployments" }, e);
|
|
57
68
|
break;
|
|
@@ -59,32 +70,34 @@ class L extends C {
|
|
|
59
70
|
await this.authentication?.signIn();
|
|
60
71
|
case "details":
|
|
61
72
|
if (this._allCards) {
|
|
62
|
-
let
|
|
63
|
-
|
|
73
|
+
let i = k(this._allCards, t.tabTitleOrId);
|
|
74
|
+
i = i || E(this._allCards, t.tabTitleOrId), i ? (this._detailsTab.value.selected = !0, this._detailsTabTitle.value.selected = !0, this.detailsCardSelected.emit(i)) : (t.tabType = "all-solutions", this._allTab.value.selected = !0, this._allTabTitle.value.selected = !0);
|
|
64
75
|
}
|
|
65
76
|
break;
|
|
66
77
|
case "deployments":
|
|
67
|
-
this._mySolutionsTab.value.selected = !0, this._mySolutionsTabTitle.value.selected = !0, this._searchSortToolbar &&
|
|
78
|
+
this._mySolutionsTab.value.selected = !0, this._mySolutionsTabTitle.value.selected = !0, this._searchSortToolbar && s?.filter && this._searchSortToolbar.changeOwnerFilter(s.filter !== "Organization"), s && await this._mySolutionsShell.value?.searchSolutions(s);
|
|
68
79
|
break;
|
|
69
80
|
}
|
|
70
81
|
return this._setActiveTab(new CustomEvent("setActiveTab", { detail: t })), this._blurTabs(), this._showDeployedCardFetchFailed && (this.deployedCardFetchFailed.emit({ message: this._deployCardFetchFailedMessage, title: this._translations.failedToOpen }), this._showDeployedCardFetchFailed = !1), !0;
|
|
71
82
|
} else
|
|
72
83
|
return this._initTab = t, this._initFilters = e, !1;
|
|
73
84
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
updated(t) {
|
|
86
|
+
this._fixTabpanelFocus(), t.has("_isAssistantOpen") && this._setScrollbarGutters(this._isAssistantOpen ? "stable" : "stable both-edges"), !this._resizeObserver && this._mainContentRef.value && (this._resizeObserver = new ResizeObserver((e) => {
|
|
87
|
+
for (const s of e) {
|
|
88
|
+
const a = s.contentRect.width <= 800;
|
|
89
|
+
this.isMobile !== a && (this.isMobile = a, this._isMobileContextProvider.setValue(a));
|
|
90
|
+
}
|
|
91
|
+
}), this._resizeObserver.observe(this._mainContentRef.value));
|
|
79
92
|
}
|
|
80
93
|
_fixTabpanelFocus() {
|
|
81
94
|
if (!this._tabpanelsFixed && this._allTab.value) {
|
|
82
95
|
const t = [this._allTab, this._mySolutionsTab, this._resourcesTab, this._detailsTab, this._deployedCardTab];
|
|
83
96
|
Promise.all(t.map(async (e) => {
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
|
|
97
|
+
const s = e.value;
|
|
98
|
+
if (s && (await s.componentOnReady?.(), s.shadowRoot)) {
|
|
99
|
+
const i = s.shadowRoot.querySelector('[role="tabpanel"]');
|
|
100
|
+
i && (i.tabIndex = -1);
|
|
88
101
|
}
|
|
89
102
|
})).then(() => {
|
|
90
103
|
this._tabpanelsFixed = !0, this._setupTabpanelObserver();
|
|
@@ -97,45 +110,47 @@ class L extends C {
|
|
|
97
110
|
if (this._tabpanelObserver)
|
|
98
111
|
return;
|
|
99
112
|
this._tabpanelObserver = new MutationObserver((e) => {
|
|
100
|
-
e.forEach((
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
|
|
113
|
+
e.forEach((s) => {
|
|
114
|
+
if (s.type === "attributes" && s.attributeName === "tabindex") {
|
|
115
|
+
const i = s.target;
|
|
116
|
+
i.getAttribute("role") === "tabpanel" && i.tabIndex === 0 && (i.tabIndex = -1);
|
|
104
117
|
}
|
|
105
118
|
});
|
|
106
119
|
}), [this._allTab, this._mySolutionsTab, this._resourcesTab, this._detailsTab, this._deployedCardTab].forEach((e) => {
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
110
|
-
|
|
120
|
+
const s = e.value;
|
|
121
|
+
if (s?.shadowRoot) {
|
|
122
|
+
const i = s.shadowRoot.querySelector('[role="tabpanel"]');
|
|
123
|
+
i && this._tabpanelObserver.observe(i, { attributes: !0, attributeFilter: ["tabindex"] });
|
|
111
124
|
}
|
|
112
125
|
});
|
|
113
126
|
}
|
|
114
127
|
async load() {
|
|
115
|
-
this.useLocalAppConfig && (this.appConfig =
|
|
128
|
+
this.useLocalAppConfig && (this.appConfig = M);
|
|
116
129
|
}
|
|
117
130
|
render() {
|
|
118
131
|
const t = this._isLoaded ? "display-none" : "", e = this._isLoaded ? "" : "display-none";
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
})}></solutions-searchsort-toolbar><calcite-loader class=${
|
|
132
|
+
return h`<calcite-shell><solutions-deploy-app-nav .appConfig=${this.appConfig} .assistantOpen=${this._isAssistantOpen} .initTab=${this.initTab} @authInit=${this._handleAuthInit} slot=header ${l(this._deployAppNav)}></solutions-deploy-app-nav><div class=${`main-content${this._isAssistantOpen ? " assistant-open" : ""}`} ${l(this._mainContentRef)}>${this._isSearchToolbarShowing() && h`<div class="border"></div>` || ""}<solutions-searchsort-toolbar ${l(async (s) => {
|
|
133
|
+
s && (await this._deployAppNav.value?.componentOnReady(), this._searchSortToolbar = s);
|
|
134
|
+
})}></solutions-searchsort-toolbar><calcite-loader class=${_(t)} id=solutions-loader .label=${this._translations.fetchingAllSolutions}></calcite-loader>${this._renderGlobalAlerts()}<calcite-tabs class=${_(e)} scale=l><calcite-tab-nav class="display-none" @calciteTabChange=${this._handleCalciteTabChanged} slot=title-group><calcite-tab-title ${l(this._allTabTitle)}>${this._translations.allSolutions}</calcite-tab-title><calcite-tab-title ${l(this._mySolutionsTabTitle)}>${this._translations.mySolutions}</calcite-tab-title><calcite-tab-title ${l(this._resourcesTabTitle)}>${this._translations.solutionResources}</calcite-tab-title><calcite-tab-title class="display-none" ${l(this._detailsTabTitle)}></calcite-tab-title><calcite-tab-title class="display-none" ${l(this._deployedCardTabTitle)}></calcite-tab-title></calcite-tab-nav><calcite-tab class="back-color-override tab-space-0" selected ${l(this._allTab)}><solutions-all-shell class="height-100" ${l(this._allShell)}></solutions-all-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${l(this._mySolutionsTab)}><solutions-deployed-shell class="height-100" ${l(this._mySolutionsShell)}></solutions-deployed-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${l(this._resourcesTab)}><solutions-resources-shell .assistantOpen=${this._isAssistantOpen} class="height-100"></solutions-resources-shell></calcite-tab><calcite-tab class="back-color-override" ${l(this._detailsTab)}><solution-details-panel class="height-100" ${l(this._detailsShell)}></solution-details-panel></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${l(this._deployedCardTab)}><solution-deployed-card-panel class="shell-container height-100" ${l(this._deployedCardPanel)}></solution-deployed-card-panel></calcite-tab></calcite-tabs></div>${!this._configContextProvider.value?.isEnterprise && h`<div class=${`assistant-panel${this._isAssistantOpen ? "" : " display-none"}`}><arcgis-solutions-assistant class="height-100"></arcgis-solutions-assistant></div><calcite-fab aria-label=${this._translations.assistantFabTooltip ?? S} class=${`assistant-fab${this._isAssistantOpen ? " display-none" : ""}`} icon=effects id=assistant-fab-button @click=${() => {
|
|
135
|
+
this._openAssistant(), this._showFabTooltip = !1;
|
|
136
|
+
}} scale=l></calcite-fab><calcite-tooltip class=${_(this._isAssistantOpen ? "display-none" : "")} .open=${this._showFabTooltip && !this._isAssistantOpen} placement=leading reference-element=assistant-fab-button><span>${this._translations.assistantFabTooltip}</span></calcite-tooltip>` || ""}</calcite-shell>`;
|
|
122
137
|
}
|
|
123
138
|
loaded() {
|
|
124
139
|
this._setScrollbarGutters();
|
|
125
140
|
}
|
|
126
141
|
disconnectedCallback() {
|
|
127
|
-
super.disconnectedCallback(), this.
|
|
142
|
+
super.disconnectedCallback(), this._resizeObserver?.disconnect(), this._tabpanelObserver?.disconnect();
|
|
143
|
+
}
|
|
144
|
+
_renderGlobalAlerts() {
|
|
145
|
+
return m(this._globalAlerts, (t) => t.id, (t) => h`<calcite-alert .autoClose=${t.autoClose} .autoCloseDuration=${t.autoCloseDuration} .icon=${t.icon} .kind=${t.kind} .label=${t.title || ""} @calciteAlertClose=${() => this._removeGlobalAlert(t.id)} open>${t.title && h`<div slot=title>${t.title}</div>` || ""}<div slot=message>${t.message}</div></calcite-alert>`);
|
|
128
146
|
}
|
|
129
147
|
async _handleAuthInit(t) {
|
|
130
148
|
const e = t.detail;
|
|
131
|
-
e.telemetrySession || (e.telemetrySession =
|
|
132
|
-
}
|
|
133
|
-
_mediaQueryChange(t) {
|
|
134
|
-
this.isMobile = t.matches, this._isMobileContextProvider.setValue(this.isMobile);
|
|
149
|
+
e.telemetrySession || (e.telemetrySession = u.getDisabledSession()), this._configContextProvider.setValue(e), e.authentication && (this.authentication = e.authentication), this._cardFetcherDeployed = new T(e.locale, e.orgUrl, e.portalURL), this._cardsFetcher = new T(e.locale, e.orgUrl, e.portalURL), this._isDisconnectedEnvironment || await this._getSolutions(e.primarySolutionsGroupId, e.agoBasedEnterpriseSolutionsGroupId), this._configContextProvider.value.allCards = this._allCards, this._configContextProvider.value.anonAgolSession = this._cardsFetcher.anonAgolSession, this._configContextProvider.value.agolPortalUrl = this._cardsFetcher.agolPortalUrl, await this._initializeTelemetry(), this._isLoaded = !0, this._setRefreshInterval(), this._initTab ? (this.selectTab(this._initTab, this._initFilters), this._logTabViewTelemetry(this._initTab.tabType), this._initTab = void 0, this._initFilters = void 0) : this.authentication?.IsSignedIn && (this.initTab === "details" || this.initTab === "deployed-card" || (this._logTabViewTelemetry(this._activeTab), this._emitMetaTagStrings(this._activeTab)));
|
|
135
150
|
}
|
|
136
151
|
_setActiveTab(t) {
|
|
137
|
-
const
|
|
138
|
-
switch (this._activeTab =
|
|
152
|
+
const s = t.detail.tabType, i = this._activeTab !== s;
|
|
153
|
+
switch (this._activeTab = s, i && this._logTabViewTelemetry(s), s) {
|
|
139
154
|
case "all-solutions":
|
|
140
155
|
this._allTabTitle.value?.click();
|
|
141
156
|
break;
|
|
@@ -152,62 +167,62 @@ class L extends C {
|
|
|
152
167
|
this._detailsTabTitle.value?.click();
|
|
153
168
|
break;
|
|
154
169
|
}
|
|
155
|
-
|
|
170
|
+
s !== "details" && s !== "deployed-card" && (this._deployAppNav.value.activateMenuItem(s), this.deployAppTabSelected.emit(s), this._emitMetaTagStrings(s));
|
|
156
171
|
}
|
|
157
172
|
_logTabViewTelemetry(t, e) {
|
|
158
|
-
let
|
|
173
|
+
let s;
|
|
159
174
|
switch (t) {
|
|
160
175
|
case "all-solutions":
|
|
161
|
-
|
|
176
|
+
s = c.ALL_SOLUTIONS;
|
|
162
177
|
break;
|
|
163
178
|
case "deployments":
|
|
164
|
-
|
|
179
|
+
s = c.DEPLOYMENTS;
|
|
165
180
|
break;
|
|
166
181
|
case "resources":
|
|
167
|
-
|
|
182
|
+
s = c.RESOURCES;
|
|
168
183
|
break;
|
|
169
184
|
case "details":
|
|
170
|
-
|
|
185
|
+
s = c.SOLUTION_DETAILS;
|
|
171
186
|
break;
|
|
172
187
|
case "deployed-card":
|
|
173
|
-
|
|
188
|
+
s = c.DEPLOYMENTS;
|
|
174
189
|
break;
|
|
175
190
|
}
|
|
176
|
-
if (!((t === "details" || t === "deployed-card") && !e) &&
|
|
177
|
-
const
|
|
191
|
+
if (!((t === "details" || t === "deployed-card") && !e) && s) {
|
|
192
|
+
const i = [];
|
|
178
193
|
if ((t === "details" || t === "deployed-card") && e) {
|
|
179
|
-
const
|
|
180
|
-
|
|
194
|
+
const n = e;
|
|
195
|
+
i.push(n.title || ""), i.push(n.deployCommonId || ""), i.push(n.deployVersion || "");
|
|
181
196
|
}
|
|
182
197
|
const a = t === "deployed-card" ? "Open" : "View";
|
|
183
198
|
this._telemetry?.logEvent({
|
|
184
|
-
category:
|
|
199
|
+
category: s,
|
|
185
200
|
action: a,
|
|
186
|
-
dimensions:
|
|
201
|
+
dimensions: i.length > 0 ? i : void 0
|
|
187
202
|
});
|
|
188
203
|
}
|
|
189
204
|
}
|
|
190
205
|
_emitMetaTagStrings(t, e) {
|
|
191
|
-
let
|
|
206
|
+
let s = "", i = "";
|
|
192
207
|
switch (t) {
|
|
193
208
|
case "all-solutions":
|
|
194
|
-
|
|
209
|
+
s = this._translations.metaAllSolutionsTitle, i = this._translations.metaAllSolutionsDescription;
|
|
195
210
|
break;
|
|
196
211
|
case "deployments":
|
|
197
212
|
case "deployed-card":
|
|
198
|
-
|
|
213
|
+
s = this._translations.metaDeploymentsTitle, i = this._translations.metaDeploymentsDescription;
|
|
199
214
|
break;
|
|
200
215
|
case "resources":
|
|
201
|
-
|
|
216
|
+
s = this._translations.metaResourcesTitle, i = this._translations.metaResourcesDescription;
|
|
202
217
|
break;
|
|
203
218
|
case "details":
|
|
204
|
-
e && (
|
|
219
|
+
e && (s = this._translations.metaDetailsTitle.replace("{title}", e.title), i = e.snippet);
|
|
205
220
|
break;
|
|
206
221
|
}
|
|
207
222
|
this.metaTagStringsReady.emit({
|
|
208
223
|
pageType: t,
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
224
|
+
title: s,
|
|
225
|
+
description: i,
|
|
211
226
|
detailTemplate: e
|
|
212
227
|
});
|
|
213
228
|
}
|
|
@@ -221,8 +236,15 @@ class L extends C {
|
|
|
221
236
|
this._activeTab = "deployed-card", this._deployedCardTabTitle.value.selected = !0, this._deployedCardTab.value.selected = !0, this._deployAppNav.value.clearMenuItems(), t?.detail?.card && (this._selectedDeployedCard = t.detail.card), this._logTabViewTelemetry("deployed-card", this._selectedDeployedCard), this._emitMetaTagStrings("deployed-card");
|
|
222
237
|
}
|
|
223
238
|
_handleDeployedCardDisplay(t) {
|
|
224
|
-
const { card: e, cardRef:
|
|
225
|
-
this.deployedCardSelected.emit({ card: e, cardRef:
|
|
239
|
+
const { card: e, cardRef: s } = t.detail;
|
|
240
|
+
this.deployedCardSelected.emit({ card: e, cardRef: s });
|
|
241
|
+
}
|
|
242
|
+
_handleShowGlobalAlert(t) {
|
|
243
|
+
const e = t.detail, s = e.id || `alert-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
244
|
+
this._globalAlerts = [...this._globalAlerts, { ...e, id: s }];
|
|
245
|
+
}
|
|
246
|
+
_removeGlobalAlert(t) {
|
|
247
|
+
this._globalAlerts = this._globalAlerts.filter((e) => e.id !== t);
|
|
226
248
|
}
|
|
227
249
|
async _initializeTelemetry() {
|
|
228
250
|
const t = this._configContextProvider.value;
|
|
@@ -235,7 +257,7 @@ class L extends C {
|
|
|
235
257
|
if (this._isDisconnectedEnvironment)
|
|
236
258
|
return [];
|
|
237
259
|
this._abortController ? (this._abortController.abort(), this._abortController = new AbortController()) : this._abortController = new AbortController();
|
|
238
|
-
const
|
|
260
|
+
const s = await this._cardsFetcher?.requestAvailableSolutionCards({
|
|
239
261
|
q: this._agoTerms,
|
|
240
262
|
filter: "type:Solution",
|
|
241
263
|
sortField: this._sortField,
|
|
@@ -249,19 +271,19 @@ class L extends C {
|
|
|
249
271
|
}, t, e, this._configContextProvider.value.userSession, this._configContextProvider.value.isEnterprise, this._abortController.signal, {
|
|
250
272
|
num: 1e3
|
|
251
273
|
});
|
|
252
|
-
return this._abortController = void 0, this._allCards.length === 0 &&
|
|
274
|
+
return this._abortController = void 0, this._allCards.length === 0 && s?.cards && (this._allCards = s?.cards), this._allCards;
|
|
253
275
|
}
|
|
254
276
|
async _getDeployedSolution(t) {
|
|
255
|
-
const e = this._configContextProvider.value.authentication,
|
|
256
|
-
if (e &&
|
|
277
|
+
const e = this._configContextProvider.value.authentication, s = this._configContextProvider.value.userSession;
|
|
278
|
+
if (e && s && e.IsSignedIn) {
|
|
257
279
|
this._abortControllerDeployed ? (this._abortControllerDeployed.abort(), this._abortControllerDeployed = new AbortController()) : this._abortControllerDeployed = new AbortController();
|
|
258
|
-
const
|
|
280
|
+
const i = O(e);
|
|
259
281
|
try {
|
|
260
|
-
const a = await
|
|
282
|
+
const a = await D(e, s, this._cardsFetcher, this._cardFetcherDeployed, A, "created", "desc", !1, [], [], this._abortControllerDeployed.signal, i ? "My organization's solutions" : "My solutions", t);
|
|
261
283
|
a.cards.length === 0 || a.cards[0].typeKeywords.indexOf("Deployed") < 0 ? (this._deployCardFetchFailedMessage = this._translations.failedToFetchNotSolution.replace("{{ITEMID}}", t), this._showDeployedCardFetchFailed = !0) : this._deployedSolutions = a;
|
|
262
284
|
} catch (a) {
|
|
263
|
-
const
|
|
264
|
-
|
|
285
|
+
const n = a.message;
|
|
286
|
+
n.indexOf("CONT_0001") > -1 || n.indexOf("Item does not exist or is inaccessible.") > -1 ? (this._deployCardFetchFailedMessage = this._translations.failedToFetchWrongId.replace("{{ITEMID}}", t), this._showDeployedCardFetchFailed = !0) : n.indexOf("GWM_0003") > -1 || n.indexOf("You do not have permissions to access this resource or perform this operation.") > -1 ? (this._deployCardFetchFailedMessage = this._translations.failedToFetchWrongPermissions.replace("{{ITEMID}}", t), this._showDeployedCardFetchFailed = !0) : (this._showDeployedCardFetchFailed = !0, this._deployCardFetchFailedMessage = ""), console.warn(a);
|
|
265
287
|
}
|
|
266
288
|
}
|
|
267
289
|
}
|
|
@@ -274,36 +296,36 @@ class L extends C {
|
|
|
274
296
|
_getDefaultSearchOptions(t) {
|
|
275
297
|
let e;
|
|
276
298
|
if (t) {
|
|
277
|
-
const
|
|
278
|
-
let
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
type:
|
|
282
|
-
} : void 0,
|
|
299
|
+
const s = t.domain, i = t.industry === "AEC" ? F.AEC : t.industry, a = t.offerType, n = t.searchTerm, f = "";
|
|
300
|
+
let r = t.sortField;
|
|
301
|
+
const p = t.owner, b = t.filter;
|
|
302
|
+
r === "suggested" && !this.authentication?.IsSignedIn && (r = this.sortType), e = s || i ? {
|
|
303
|
+
type: s ? "domain" : i ? "industry" : ""
|
|
304
|
+
} : void 0, s && (e = e ? { ...e, domain: s } : { domain: s }), i && (e = e ? { ...e, industry: i } : { industry: i }), n && (e = e ? { ...e, searchTerm: n } : { searchTerm: n }), e && (e = { ...e, displayValue: f }), r && (e = e ? { ...e, sortType: r } : { sortType: r }), a && (r = a.toLowerCase(), e = e ? { ...e, sortType: r } : { sortType: r }), p && (e = e ? { ...e, owner: p } : { owner: p }), b && (e = e ? { ...e, filter: b } : { filter: b });
|
|
283
305
|
}
|
|
284
306
|
return e;
|
|
285
307
|
}
|
|
286
|
-
_setScrollbarGutters() {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
308
|
+
_setScrollbarGutters(t = "stable both-edges") {
|
|
309
|
+
[this._allTab, this._mySolutionsTab, this._resourcesTab, this._detailsTab, this._deployedCardTab].forEach((s) => {
|
|
310
|
+
const i = s.value?.shadowRoot?.firstElementChild;
|
|
311
|
+
i?.style && (i.style.scrollbarGutter = t);
|
|
312
|
+
});
|
|
291
313
|
}
|
|
292
314
|
_setRefreshInterval() {
|
|
293
315
|
const { userSession: t, authentication: e } = this._configContextProvider.value;
|
|
294
316
|
if (t && t.tokenDuration && e?.IsSignedIn) {
|
|
295
|
-
const
|
|
317
|
+
const s = Date.now(), a = (e.Credential?.expires - s) * 0.95;
|
|
296
318
|
setInterval(async () => {
|
|
297
319
|
if (e.Credential && e.Credential.expires) {
|
|
298
320
|
await e.Credential?.refreshToken();
|
|
299
|
-
const
|
|
300
|
-
t.updateToken(e.Credential.token,
|
|
321
|
+
const n = new Date(e.Credential.expires);
|
|
322
|
+
t.updateToken(e.Credential.token, n), this.sessionRefreshed.emit(t.token);
|
|
301
323
|
}
|
|
302
324
|
}, a);
|
|
303
325
|
}
|
|
304
326
|
}
|
|
305
327
|
}
|
|
306
|
-
g("solutions-deploy-app",
|
|
328
|
+
g("solutions-deploy-app", P);
|
|
307
329
|
export {
|
|
308
|
-
|
|
330
|
+
P as SolutionsDeployApp
|
|
309
331
|
};
|
|
@@ -11,4 +11,8 @@ import "../solutions-deployed-shell/index.js";
|
|
|
11
11
|
import "../solutions-resources-shell/index.js";
|
|
12
12
|
import "../solution-details-panel/index.js";
|
|
13
13
|
import "../solution-deployed-card-panel/index.js";
|
|
14
|
+
import "../arcgis-solutions-assistant/index.js";
|
|
15
|
+
import "@esri/calcite-components/components/calcite-fab";
|
|
16
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
17
|
+
import "@esri/calcite-components/components/calcite-alert";
|
|
14
18
|
export * from "./customElement.js";
|
|
@@ -35,6 +35,12 @@ export abstract class SolutionsDeployAppNav extends LitElement {
|
|
|
35
35
|
}>;
|
|
36
36
|
/** App config */
|
|
37
37
|
accessor appConfig: any;
|
|
38
|
+
/**
|
|
39
|
+
* When true the assistant panel is open and the sub-nav should be constrained
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
accessor assistantOpen: boolean;
|
|
38
44
|
/** When defined this is the tab that should be loaded by default */
|
|
39
45
|
accessor initTab: DeployAppTab | undefined;
|
|
40
46
|
/**
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
import "../../chunks/runtime.js";
|
|
3
3
|
import "../../chunks/useT9n.js";
|
|
4
4
|
import "@arcgis/lumina";
|
|
5
|
-
import { S
|
|
5
|
+
import { S } from "../../chunks/solutions-deploy-app-nav.js";
|
|
6
6
|
import "../../chunks/Auth.js";
|
|
7
7
|
import "../../chunks/helpers.js";
|
|
8
8
|
import "lit-html/directives/ref.js";
|
|
9
9
|
import "@esri/solution-common";
|
|
10
|
-
import "../../chunks/deployAppContexts.js";
|
|
11
|
-
import "@arcgis/lumina/context";
|
|
12
10
|
import "lit";
|
|
13
11
|
export {
|
|
14
|
-
|
|
12
|
+
S as SolutionsDeployAppNav
|
|
15
13
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
2
|
+
import { c as f } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as u, html as a, svg as y } from "lit";
|
|
4
4
|
import { u as g } from "../../chunks/useT9n.js";
|
|
5
5
|
import { LitElement as w, createEvent as l, nothing as C } from "@arcgis/lumina";
|
|
6
6
|
import { useContextConsumer as x } from "@arcgis/lumina/context";
|
|
7
7
|
import { createRef as T, ref as d } from "lit/directives/ref.js";
|
|
8
8
|
import { C as c, g as v } from "../../chunks/cardFetchingUtils.js";
|
|
9
9
|
import { c as b } from "../../chunks/deployAppContexts.js";
|
|
10
|
-
import { B as h, T as n,
|
|
11
|
-
const
|
|
12
|
-
class
|
|
10
|
+
import { B as h, T as n, N as S, H as F, c as D } from "../../chunks/helpers.js";
|
|
11
|
+
const E = u`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-surface-3)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-xxs) var(--calcite-spacing-md)}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}h1{font-weight:unset;margin:0;padding:0}solution-deployed-card{width:calc(20% - .75rem)}@container (max-width: 1280px){solution-deployed-card{width:calc(25% - .75rem)}}@container (max-width: 1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@container (max-width: 740px){solution-deployed-card{width:calc(50% - .75rem)}}@container (max-width: 440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`, m = 5;
|
|
12
|
+
class R extends w {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(), this.sortType = "created", this._cards = [], this._cardsFetching = !1, this._modifiedCheckTry = 0, this._newId = "", this._refs = {}, this._showDeleteCompleteAlert = !1, this._deletedSolutionName = "", this._translations = g({ name: "solutions-deployed-panel", blocking: !0 }), this._agoTerms = h, this._allCards = [], this._baseAgoTerms = h, this._categories = [], this._mainPanelRef = T(), this._panelFixed = !1, this._configContextConsumer = x({
|
|
15
15
|
context: b,
|
|
@@ -41,18 +41,29 @@ class E extends w {
|
|
|
41
41
|
this.properties = { sortType: 1, _cards: 16, _cardsFetching: 16, _modifiedCheckTry: 16, _newId: 16, _refs: 16, _showDeleteCompleteAlert: 16, _deletedSolutionName: 16, _translations: 16 };
|
|
42
42
|
}
|
|
43
43
|
static {
|
|
44
|
-
this.styles =
|
|
44
|
+
this.styles = E;
|
|
45
45
|
}
|
|
46
46
|
get _telemetry() {
|
|
47
47
|
return this._configContextConsumer.value?.telemetrySession;
|
|
48
48
|
}
|
|
49
|
-
async reload(e = !0, t = !0,
|
|
50
|
-
this._initCardsFetchers(), e
|
|
49
|
+
async reload(e = !0, t = !0, s) {
|
|
50
|
+
if (this._initCardsFetchers(), e) {
|
|
51
|
+
const i = s || this._translations.solution;
|
|
52
|
+
F({
|
|
53
|
+
kind: "success",
|
|
54
|
+
icon: "check-circle",
|
|
55
|
+
title: this._translations.deleteComplete.replace("{{solutionName}}", i),
|
|
56
|
+
message: "",
|
|
57
|
+
autoClose: !0,
|
|
58
|
+
autoCloseDuration: "fast"
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
t ? setTimeout(() => {
|
|
51
62
|
(async () => {
|
|
52
63
|
try {
|
|
53
64
|
await this._getDeployedSolutions();
|
|
54
|
-
} catch (
|
|
55
|
-
console.error("Error getting deployed solutions:",
|
|
65
|
+
} catch (i) {
|
|
66
|
+
console.error("Error getting deployed solutions:", i);
|
|
56
67
|
}
|
|
57
68
|
})();
|
|
58
69
|
}, 500) : await this._getDeployedSolutions();
|
|
@@ -104,10 +115,10 @@ class E extends w {
|
|
|
104
115
|
if (this._panelObserver)
|
|
105
116
|
return;
|
|
106
117
|
this._panelObserver = new MutationObserver((t) => {
|
|
107
|
-
t.forEach((
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
110
|
-
|
|
118
|
+
t.forEach((s) => {
|
|
119
|
+
if (s.type === "attributes" && s.attributeName === "tabindex") {
|
|
120
|
+
const i = s.target;
|
|
121
|
+
i.classList.contains("content-wrapper") && i.tabIndex === 0 && (i.tabIndex = -1);
|
|
111
122
|
}
|
|
112
123
|
});
|
|
113
124
|
});
|
|
@@ -121,9 +132,7 @@ class E extends w {
|
|
|
121
132
|
super.disconnectedCallback(), this._panelObserver?.disconnect();
|
|
122
133
|
}
|
|
123
134
|
render() {
|
|
124
|
-
return this._cardsFetching ?
|
|
125
|
-
this._showDeleteCompleteAlert = !1;
|
|
126
|
-
}}><div slot=title>${this._translations.deleteComplete.replace("{{solutionName}}", this._deletedSolutionName)}</div></calcite-alert></calcite-panel>` : r`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`;
|
|
135
|
+
return this._cardsFetching ? a`<calcite-loader .label=${this._translations.fetchingDeployedSolutions}></calcite-loader>` : this._cards.length ? a`<calcite-panel ${d(this._mainPanelRef)}><calcite-card-group class="card-group" .label=${this._translations.allDeployed}>${this._renderCards()}</calcite-card-group></calcite-panel>` : a`<div class="no-solutions">${this._getSolutionsBriefcase()}<div class="text-center leader-1 warning-text trailer-1 display-flex flex-direction-column"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${this._translations.noSolutionsInstruction}</div></div></div>`;
|
|
127
136
|
}
|
|
128
137
|
_initCardsFetchers() {
|
|
129
138
|
if (this._configContextConsumer.value) {
|
|
@@ -132,7 +141,7 @@ class E extends w {
|
|
|
132
141
|
}
|
|
133
142
|
}
|
|
134
143
|
_renderCards() {
|
|
135
|
-
return this._refs = {}, this._cards.map((e) =>
|
|
144
|
+
return this._refs = {}, this._cards.map((e) => a`<solution-deployed-card .card=${e} .deployedDate=${e.created} .description=${e.snippet} .diagramKey=${this._configContextConsumer.value?.diagramKey} .heading=${e.title} id=${e.id ?? C} .itemId=${e.id} .owner=${this._owner === "My solutions" ? "" : e.owner} .thumbnail=${e.thumbnailUrl} ${d(this._handleRefs)}></solution-deployed-card>`);
|
|
136
145
|
}
|
|
137
146
|
_handleRefs(e) {
|
|
138
147
|
e && (this._refs[e.id] = e);
|
|
@@ -150,7 +159,7 @@ class E extends w {
|
|
|
150
159
|
}
|
|
151
160
|
}
|
|
152
161
|
_getSolutionsBriefcase() {
|
|
153
|
-
return
|
|
162
|
+
return a`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${y`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`;
|
|
154
163
|
}
|
|
155
164
|
_setSearchTerm(e) {
|
|
156
165
|
this._agoTerms = this._baseAgoTerms + ` ${e}`;
|
|
@@ -165,12 +174,12 @@ class E extends w {
|
|
|
165
174
|
async _refreshAfterDeploy(e) {
|
|
166
175
|
if (e) {
|
|
167
176
|
this._newId = e;
|
|
168
|
-
const t = 10,
|
|
169
|
-
for (let
|
|
170
|
-
|
|
177
|
+
const t = 10, s = 500;
|
|
178
|
+
for (let r = 0; r < t && (await this._getDeployedSolutions(), !this._cards.some((o) => o.id === e)); r++)
|
|
179
|
+
r < t - 1 && await new Promise((o) => setTimeout(o, s));
|
|
171
180
|
await this.updateComplete;
|
|
172
|
-
const
|
|
173
|
-
for (let
|
|
181
|
+
const i = 10, p = 100;
|
|
182
|
+
for (let r = 0; r < i; r++) {
|
|
174
183
|
if (this._refs[e]) {
|
|
175
184
|
const o = this._cards.find((_) => _.id === e);
|
|
176
185
|
window.dispatchEvent(new CustomEvent("deployedCardReady", {
|
|
@@ -186,7 +195,7 @@ class E extends w {
|
|
|
186
195
|
}
|
|
187
196
|
}
|
|
188
197
|
}
|
|
189
|
-
|
|
198
|
+
f("solutions-deployed-panel", R);
|
|
190
199
|
export {
|
|
191
|
-
|
|
200
|
+
R as SolutionsDeployedPanel
|
|
192
201
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-loader";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-panel";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-card-group";
|
|
4
|
-
import "@esri/calcite-components/components/calcite-alert";
|
|
5
4
|
import "../solution-deployed-card/index.js";
|
|
6
5
|
export * from "./customElement.js";
|