@esri/solutions-components 1.2.0-next.184 → 1.2.0-next.186
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/{T4BABRET.js → 2Z4TOYVC.js} +1 -1
- package/dist/cdn/{UJRIZPZV.js → 3A7PC2RZ.js} +1 -1
- package/dist/cdn/{AHSUDDTV.js → 3HWKU2CT.js} +1 -1
- package/dist/cdn/{3OBXQOE4.js → 4CPDEFIT.js} +1 -1
- package/dist/cdn/{GXGL7E5C.js → 6TJ6HIGG.js} +1 -1
- package/dist/cdn/{2J5B4RQM.js → 7M3GJY6J.js} +1 -1
- package/dist/cdn/AS6FGEVT.js +2 -0
- package/dist/cdn/BEC6A65P.js +2 -0
- package/dist/cdn/BHSNNVIL.js +2 -0
- package/dist/cdn/{FYIT6WMR.js → BT66JT22.js} +1 -1
- package/dist/cdn/{WSU4ELZX.js → C7DWPTJL.js} +1 -1
- package/dist/cdn/{HUWZTPMY.js → CN4TSLTZ.js} +1 -1
- package/dist/cdn/{IZAAOTKA.js → DOFNBU4Q.js} +1 -1
- package/dist/cdn/{D4YDAIIJ.js → EERFOEDZ.js} +1 -1
- package/dist/cdn/{RSJOED5F.js → FP5UBHCW.js} +1 -1
- package/dist/cdn/{KNOAIRGH.js → FWFL23CM.js} +1 -1
- package/dist/cdn/FY4GDFB5.js +2 -0
- package/dist/cdn/{YUXRMEUI.js → HEW273HR.js} +1 -1
- package/dist/cdn/{G7PIGNB5.js → I3ERNQTX.js} +1 -1
- package/dist/cdn/{TQ6UUSC6.js → LN36O3EB.js} +1 -1
- package/dist/cdn/MVNKOMSZ.js +2 -0
- package/dist/cdn/OQVULF2Q.js +2 -0
- package/dist/cdn/{UPCW6ZJC.js → OUH4HVG4.js} +28 -24
- package/dist/cdn/{YJCIONLF.js → PFQDRDKQ.js} +1 -1
- package/dist/cdn/{FQDOIGWN.js → PJ2IZ77K.js} +1 -1
- package/dist/cdn/{DPOINX2J.js → QPEQNTE2.js} +1 -1
- package/dist/cdn/{6KZ7BPYY.js → R6QJKOAM.js} +1 -1
- package/dist/cdn/RG6FVRCW.js +2 -0
- package/dist/cdn/RYK5PICU.js +2 -0
- package/dist/cdn/{G6YTMDRE.js → U3MPHGGT.js} +1 -1
- package/dist/cdn/{VCNW2JFC.js → V25NUVVQ.js} +1 -1
- package/dist/cdn/{VWSBR3EG.js → VHA56S7W.js} +1 -1
- package/dist/cdn/{JZEB6HZ4.js → W4DGTEPL.js} +1 -1
- package/dist/cdn/{YN3QQTPJ.js → WI7VFPQ3.js} +1 -1
- package/dist/cdn/Y2S3AB43.js +2 -0
- package/dist/cdn/{YOUPERBP.js → YBZ4RYD3.js} +1 -1
- package/dist/cdn/{SYHSZMOM.js → ZVLL5DZC.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/cardFetchingUtils.js +66 -58
- package/dist/chunks/cardsHelpers.js +2 -2
- package/dist/chunks/interfaces.js +295 -293
- package/dist/chunks/solutions-deploy-app-nav.js +10 -10
- package/dist/components/arcgis-solutions-assistant/customElement.js +79 -69
- package/dist/components/solution-details-card/customElement.js +8 -8
- package/dist/components/solution-details-panel/customElement.js +50 -50
- package/dist/components/solution-resource-card/customElement.js +11 -11
- package/dist/components/solution-snapshot-gallery/customElement.js +17 -17
- package/dist/components/solution-social-share/customElement.js +5 -5
- package/dist/components/solutions-all-panel/customElement.js +22 -21
- package/dist/components/solutions-deploy-app/customElement.js +12 -11
- package/dist/components/solutions-deployed-panel/customElement.d.ts +2 -2
- package/dist/components/solutions-deployed-panel/customElement.js +42 -27
- 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/solutions-components_commit.txt +7 -7
- package/dist/utils/interfaces.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cdn/5HY4G5MJ.js +0 -2
- package/dist/cdn/7QFCHNYA.js +0 -2
- package/dist/cdn/BU24GNCR.js +0 -2
- package/dist/cdn/EMCLBWJH.js +0 -2
- package/dist/cdn/ETZI55AM.js +0 -2
- package/dist/cdn/EVTIE353.js +0 -2
- package/dist/cdn/K3V6XHE4.js +0 -2
- package/dist/cdn/LEBOMHXU.js +0 -2
- package/dist/cdn/QAT4TZD4.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as m } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as f, html as _ } from "lit";
|
|
4
4
|
import { u as v } from "../../chunks/useT9n.js";
|
|
5
5
|
import { LitElement as C, createEvent as n, safeClassMap as p } from "@arcgis/lumina";
|
|
@@ -14,12 +14,12 @@ import "@esri/solution-common";
|
|
|
14
14
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
15
15
|
import "@arcgis/core/identity/OAuthInfo.js";
|
|
16
16
|
import "@arcgis/core/portal/Portal.js";
|
|
17
|
-
import { _ as
|
|
17
|
+
import { _ as A } from "../../chunks/solution-deploy-dialog.js";
|
|
18
18
|
import "../solutions-all-shell/customElement.js";
|
|
19
19
|
import "../solutions-deployed-shell/customElement.js";
|
|
20
20
|
import "../solution-details-panel/customElement.js";
|
|
21
21
|
import "../solution-deployed-card-panel/customElement.js";
|
|
22
|
-
const
|
|
22
|
+
const M = f`.back-color-override{background-color:var(--calcite-color-foreground-2);--calcite-tab-border-color: var(--calcite-color-foreground-3)}.display-none{display:none!important}.height-100{height:100%}calcite-tab-nav{padding-bottom:6px;padding-top:6px}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-border-3);height:100%}.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-resources-shell,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-3);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}`;
|
|
23
23
|
class L extends C {
|
|
24
24
|
constructor() {
|
|
25
25
|
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 = `${S}`, this._allCards = [], this._allShell = o(), this._allTab = o(), this._allTabTitle = o(), this._resourcesTab = o(), this._resourcesTabTitle = o(), this._categories = [], this._configContextProvider = T({ context: O }), 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._isMobileContextProvider = T({ context: x }), this._mySolutionsShell = o(), this._mySolutionsTab = o(), this._mySolutionsTabTitle = o(), this._sortField = "relevance", this._sortOrder = "desc", this._telemetryManager = new b(), this.deployAppTabSelected = n(), this.deployedCardFetchFailed = n(), this.detailsCardSelected = n(), this.deployedCardSelected = n(), this.metaTagStringsReady = n(), this.sessionRefreshed = n(), this.tabChanged = n(), 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._mediaQueryChange = this._mediaQueryChange.bind(this);
|
|
@@ -28,7 +28,7 @@ class L extends C {
|
|
|
28
28
|
this.properties = { appConfig: 1, initTab: 1, initTitleOrId: 1, sortType: 1, useLocalAppConfig: 5, authentication: 16, _isLoaded: 16, isMobile: 16, _activeTab: 16, _showDeployedCardFetchFailed: 16, _translations: 16 };
|
|
29
29
|
}
|
|
30
30
|
static {
|
|
31
|
-
this.styles =
|
|
31
|
+
this.styles = M;
|
|
32
32
|
}
|
|
33
33
|
get _telemetry() {
|
|
34
34
|
return this._configContextProvider.value?.telemetrySession;
|
|
@@ -63,7 +63,7 @@ class L extends C {
|
|
|
63
63
|
}
|
|
64
64
|
break;
|
|
65
65
|
case "deployments":
|
|
66
|
-
this._mySolutionsTab.value.selected = !0, this._mySolutionsTabTitle.value.selected = !0, this._searchSortToolbar && i
|
|
66
|
+
this._mySolutionsTab.value.selected = !0, this._mySolutionsTabTitle.value.selected = !0, this._searchSortToolbar && i?.filter && this._searchSortToolbar.changeOwnerFilter(i.filter !== "Organization"), i && await this._mySolutionsShell.value?.searchSolutions(i);
|
|
67
67
|
break;
|
|
68
68
|
}
|
|
69
69
|
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;
|
|
@@ -74,7 +74,7 @@ class L extends C {
|
|
|
74
74
|
super.connectedCallback(), this._mediaQuery = window.matchMedia("(max-width: 800px)"), this._mediaQuery.addEventListener("change", this._mediaQueryChange), this._mediaQueryChange(this._mediaQuery);
|
|
75
75
|
}
|
|
76
76
|
async load() {
|
|
77
|
-
this.useLocalAppConfig && (this.appConfig =
|
|
77
|
+
this.useLocalAppConfig && (this.appConfig = A);
|
|
78
78
|
}
|
|
79
79
|
render() {
|
|
80
80
|
const t = this._isLoaded ? "display-none" : "", e = this._isLoaded ? "" : "display-none";
|
|
@@ -196,7 +196,7 @@ class L extends C {
|
|
|
196
196
|
async _getSolutions(t, e) {
|
|
197
197
|
if (this._isDisconnectedEnvironment)
|
|
198
198
|
return [];
|
|
199
|
-
this._abortController ? this._abortController.abort() : this._abortController = new AbortController();
|
|
199
|
+
this._abortController ? (this._abortController.abort(), this._abortController = new AbortController()) : this._abortController = new AbortController();
|
|
200
200
|
const i = await this._cardsFetcher?.requestAvailableSolutionCards({
|
|
201
201
|
q: this._agoTerms,
|
|
202
202
|
filter: "type:Solution",
|
|
@@ -216,9 +216,10 @@ class L extends C {
|
|
|
216
216
|
async _getDeployedSolution(t) {
|
|
217
217
|
const e = this._configContextProvider.value.authentication, i = this._configContextProvider.value.userSession;
|
|
218
218
|
if (e && i && e.IsSignedIn) {
|
|
219
|
+
this._abortControllerDeployed ? (this._abortControllerDeployed.abort(), this._abortControllerDeployed = new AbortController()) : this._abortControllerDeployed = new AbortController();
|
|
219
220
|
const s = w(e);
|
|
220
221
|
try {
|
|
221
|
-
const a = await F(e, i, this._cardsFetcher, this._cardFetcherDeployed, D, "created", "desc", !1, [], [], s ? "My organization's solutions" : "My solutions", t);
|
|
222
|
+
const a = await F(e, i, this._cardsFetcher, this._cardFetcherDeployed, D, "created", "desc", !1, [], [], this._abortControllerDeployed.signal, s ? "My organization's solutions" : "My solutions", t);
|
|
222
223
|
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;
|
|
223
224
|
} catch (a) {
|
|
224
225
|
const r = a.message;
|
|
@@ -235,12 +236,12 @@ class L extends C {
|
|
|
235
236
|
_getDefaultSearchOptions(t) {
|
|
236
237
|
let e;
|
|
237
238
|
if (t) {
|
|
238
|
-
const i = t.domain, s = t.industry === "AEC" ? I.AEC : t.industry, a = t.offerType, r = t.searchTerm,
|
|
239
|
+
const i = t.domain, s = t.industry === "AEC" ? I.AEC : t.industry, a = t.offerType, r = t.searchTerm, g = "";
|
|
239
240
|
let d = t.sortField;
|
|
240
241
|
const h = t.owner, u = t.filter;
|
|
241
242
|
e = i || s ? {
|
|
242
243
|
type: i ? "domain" : s ? "industry" : ""
|
|
243
|
-
} : void 0, i && (e = e ? { ...e, domain: i } : { domain: i }), s && (e = e ? { ...e, industry: s } : { industry: s }), r && (e = e ? { ...e, searchTerm: r } : { searchTerm: r }), e && (e = { ...e, displayValue:
|
|
244
|
+
} : void 0, i && (e = e ? { ...e, domain: i } : { domain: i }), s && (e = e ? { ...e, industry: s } : { industry: s }), r && (e = e ? { ...e, searchTerm: r } : { searchTerm: r }), e && (e = { ...e, displayValue: g }), d && (e = e ? { ...e, sortType: d } : { sortType: d }), a && (d = a.toLowerCase(), e = e ? { ...e, sortType: d } : { sortType: d }), h && (e = e ? { ...e, owner: h } : { owner: h }), u && (e = e ? { ...e, filter: u } : { filter: u });
|
|
244
245
|
}
|
|
245
246
|
return e;
|
|
246
247
|
}
|
|
@@ -260,7 +261,7 @@ class L extends C {
|
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
|
-
|
|
264
|
+
m("solutions-deploy-app", L);
|
|
264
265
|
export {
|
|
265
266
|
L as SolutionsDeployApp
|
|
266
267
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { IFilterOption, ISearchOption, ISearchTerm, ISortOption, ISortType, SortType } from "../../utils/interfaces.js";
|
|
3
|
+
import type { IFilterOption, IQueryParams, ISearchOption, ISearchTerm, ISortOption, ISortType, SortType } from "../../utils/interfaces.js";
|
|
4
4
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
5
|
|
|
6
6
|
export abstract class SolutionsDeployedPanel extends LitElement {
|
|
@@ -45,7 +45,7 @@ export abstract class SolutionsDeployedPanel extends LitElement {
|
|
|
45
45
|
*
|
|
46
46
|
* @param searchOptions - the key criteria to search with
|
|
47
47
|
*/
|
|
48
|
-
searchSolutions(searchOptions?: IFilterOption | ISearchOption | ISortOption): Promise<void>;
|
|
48
|
+
searchSolutions(searchOptions?: IFilterOption | ISearchOption | ISortOption | IQueryParams): Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Set key properties for solution search
|
|
51
51
|
* This is used for handeling multiple options from url params
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
|
|
2
2
|
import { c as _ } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as u, html as o, svg as f } from "lit";
|
|
4
|
-
import { ref as
|
|
5
|
-
import { u as
|
|
4
|
+
import { ref as y } from "lit/directives/ref.js";
|
|
5
|
+
import { u as g } from "../../chunks/useT9n.js";
|
|
6
6
|
import { LitElement as w, createEvent as l, nothing as C } from "@arcgis/lumina";
|
|
7
7
|
import { useContextConsumer as T } from "@arcgis/lumina/context";
|
|
8
8
|
import { C as d, g as x } from "../../chunks/cardFetchingUtils.js";
|
|
9
9
|
import { c as v } from "../../chunks/deployAppContexts.js";
|
|
10
|
-
import { B as c, T as n, K as S } from "../../chunks/interfaces.js";
|
|
11
|
-
const
|
|
10
|
+
import { B as c, T as n, K as S, c as D } from "../../chunks/interfaces.js";
|
|
11
|
+
const b = u`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-foreground-2)}.card-group{overflow:hidden;padding-inline-start:var(--calcite-spacing-base);padding-top:var(--calcite-spacing-base);padding-bottom: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)}@media(max-width:1280px){solution-deployed-card{width:calc(25% - .75rem)}}@media(max-width:1010px){solution-deployed-card{width:calc(33.333% - .75rem)}}@media(max-width:740px){solution-deployed-card{width:calc(50% - .75rem)}}@media(max-width:440px){solution-deployed-card{width:calc(100% - .75rem)}}.margin-top-half{margin-top:.5rem}`, h = 5;
|
|
12
12
|
class E extends w {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(), this.sortType = "created", this._cards = [], this._cardsFetching = !1, this._modifiedCheckTry = 0, this._newId = "", this._refs = {}, this._showDeleteCompleteAlert = !1, this._deletedSolutionName = "", this._translations =
|
|
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 = c, this._allCards = [], this._baseAgoTerms = c, this._categories = [], this._configContextConsumer = T({
|
|
15
15
|
context: v,
|
|
16
16
|
subscribe: !0,
|
|
17
17
|
callback: async (e) => {
|
|
@@ -41,34 +41,45 @@ 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 = b;
|
|
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 && (this._showDeleteCompleteAlert = !0, this._deletedSolutionName =
|
|
49
|
+
async reload(e = !0, t = !0, r) {
|
|
50
|
+
this._initCardsFetchers(), e && (this._showDeleteCompleteAlert = !0, this._deletedSolutionName = r || this._translations.solution), t ? setTimeout(() => {
|
|
51
51
|
(async () => {
|
|
52
52
|
try {
|
|
53
53
|
await this._getDeployedSolutions();
|
|
54
|
-
} catch (
|
|
55
|
-
console.error("Error getting deployed solutions:",
|
|
54
|
+
} catch (a) {
|
|
55
|
+
console.error("Error getting deployed solutions:", a);
|
|
56
56
|
}
|
|
57
57
|
})();
|
|
58
58
|
}, 500) : await this._getDeployedSolutions();
|
|
59
59
|
}
|
|
60
60
|
async searchSolutions(e) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
if (e) {
|
|
62
|
+
if ("searchTerm" in e && this._setSearchTerm(e.searchTerm || ""), "sortType" in e && this._setSortOptions(e), Object.keys(e).indexOf("type") > -1) {
|
|
63
|
+
const t = e;
|
|
64
|
+
this._owner = t.value, this._telemetry?.logEvent({
|
|
65
|
+
category: n.DEPLOYMENTS,
|
|
66
|
+
action: "Filter",
|
|
67
|
+
dimensions: [t.value === "My solutions" ? "My content" : "Organization"]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (Object.keys(e).indexOf("filter") > -1) {
|
|
71
|
+
const t = e;
|
|
72
|
+
this._owner = t.filter === D.ORG ? "My organization's solutions" : "My solutions";
|
|
73
|
+
}
|
|
74
|
+
} else
|
|
75
|
+
this._agoTerms = this._baseAgoTerms, this._clearFilterCategories();
|
|
76
|
+
await this._getDeployedSolutions();
|
|
66
77
|
}
|
|
67
78
|
async setSearchOptions(e) {
|
|
68
|
-
e && ("searchTerm" in e && (this.
|
|
79
|
+
e && ("searchTerm" in e && (this._setSearchTerm(e.searchTerm), this.searchTermSet.emit({
|
|
69
80
|
searchTerm: e.searchTerm,
|
|
70
81
|
scope: "deployments"
|
|
71
|
-
})), "sortType" in e && (this.
|
|
82
|
+
})), "sortType" in e && (this._setSortOptions(e), this.sortTypeSet.emit({
|
|
72
83
|
sortType: e.sortType,
|
|
73
84
|
scope: "deployments"
|
|
74
85
|
})));
|
|
@@ -85,7 +96,7 @@ class E extends w {
|
|
|
85
96
|
}
|
|
86
97
|
}
|
|
87
98
|
_renderCards() {
|
|
88
|
-
return this._refs = {}, this._cards.map((e) => o`<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} ${
|
|
99
|
+
return this._refs = {}, this._cards.map((e) => o`<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} ${y(this._handleRefs)}></solution-deployed-card>`);
|
|
89
100
|
}
|
|
90
101
|
_handleRefs(e) {
|
|
91
102
|
e && (this._refs[e.id] = e);
|
|
@@ -93,18 +104,22 @@ class E extends w {
|
|
|
93
104
|
async _getDeployedSolutions() {
|
|
94
105
|
const e = this._configContextConsumer.value.authentication;
|
|
95
106
|
if (e.IsSignedIn) {
|
|
96
|
-
this._cardsFetching = !0;
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
this._abortController ? (this._abortController.abort("redundant request"), this._abortController = new AbortController()) : this._abortController = new AbortController(), this._cardsFetching = !0;
|
|
108
|
+
try {
|
|
109
|
+
const t = await x(e, this._configContextConsumer.value.userSession, this._cardsFetcher, this._cardsFetcherDeployed, this._agoTerms, this._sortField, this._sortOrder, this._delay, this._categories, this._allCards, this._abortController.signal, this._owner);
|
|
110
|
+
this._abortController = void 0, this._modifiedCheckTry > 0 && (this._cards?.length === t?.cards?.length ? (this._modifiedCheckTry--, this._getDeployedSolutions()) : this._modifiedCheckTry = 0), this._cards = t?.cards ?? [], this.deployedCardsFetched.emit(this._cards.length), this._cardsFetching = !1;
|
|
111
|
+
} catch (t) {
|
|
112
|
+
t.message !== "redundant request" && console.warn(t);
|
|
113
|
+
}
|
|
99
114
|
}
|
|
100
115
|
}
|
|
101
116
|
_getSolutionsBriefcase() {
|
|
102
117
|
return o`<div><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${f`<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>`;
|
|
103
118
|
}
|
|
104
|
-
|
|
119
|
+
_setSearchTerm(e) {
|
|
105
120
|
this._agoTerms = this._baseAgoTerms + ` ${e}`;
|
|
106
121
|
}
|
|
107
|
-
|
|
122
|
+
_setSortOptions(e) {
|
|
108
123
|
const t = e.sortType;
|
|
109
124
|
t === "relevance" || t === "title" ? (t === "title" && (this._sortOrder = "asc"), this._sortField = t) : (t === "updated" || t === "created") && (this._sortOrder = "desc", this._sortField = t), this.sortType = t;
|
|
110
125
|
}
|
|
@@ -114,12 +129,12 @@ class E extends w {
|
|
|
114
129
|
async _refreshAfterDeploy(e) {
|
|
115
130
|
if (e) {
|
|
116
131
|
this._newId = e;
|
|
117
|
-
const t = 10,
|
|
132
|
+
const t = 10, r = 500;
|
|
118
133
|
for (let s = 0; s < t && (await this._getDeployedSolutions(), !this._cards.some((i) => i.id === e)); s++)
|
|
119
|
-
s < t - 1 && await new Promise((i) => setTimeout(i,
|
|
134
|
+
s < t - 1 && await new Promise((i) => setTimeout(i, r));
|
|
120
135
|
await this.updateComplete;
|
|
121
|
-
const
|
|
122
|
-
for (let s = 0; s <
|
|
136
|
+
const a = 10, m = 100;
|
|
137
|
+
for (let s = 0; s < a; s++) {
|
|
123
138
|
if (this._refs[e]) {
|
|
124
139
|
const i = this._cards.find((p) => p.id === e);
|
|
125
140
|
window.dispatchEvent(new CustomEvent("deployedCardReady", {
|