@esri/solutions-components 5.1.0-next.94 → 5.1.0-next.95
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/2ID55IJB.js +2 -0
- package/dist/cdn/2SGR44DX.js +2 -0
- package/dist/cdn/{C4UB6MNN.js → 3J47AYBV.js} +97 -97
- package/dist/cdn/{VOF34LDF.js → 4B7NJE47.js} +1 -1
- package/dist/cdn/{YVDSW2OQ.js → 5LTIZSXG.js} +1 -1
- package/dist/cdn/74MDW73I.js +2 -0
- package/dist/cdn/ADPYDJG6.js +2 -0
- package/dist/cdn/{FDE2V7FU.js → AJZHT4GA.js} +1 -1
- package/dist/cdn/{JQXKQHAG.js → DI7PQSFH.js} +1 -1
- package/dist/cdn/FVXS4LF5.js +2 -0
- package/dist/cdn/IRRMUFW7.js +2 -0
- package/dist/cdn/ITLTQWCX.js +2 -0
- package/dist/cdn/IYUTLV2O.js +2 -0
- package/dist/cdn/{3XGF3ZJO.js → KW6YOUWC.js} +1 -1
- package/dist/cdn/{LUZYJVG5.js → KYFNXHOH.js} +1 -1
- package/dist/cdn/{NXL2QN3P.js → R3MCMOLS.js} +1 -1
- package/dist/cdn/R4VHCXKS.js +2 -0
- package/dist/cdn/{5Z45KDQY.js → UHPN75WT.js} +1 -1
- package/dist/cdn/VESARS2D.js +7 -0
- package/dist/cdn/{D4GI6KPZ.js → WVRKV5SS.js} +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solutions-deployed-list/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/solutions-deployed-list/t9n/messages.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/converter.js +82 -86
- package/dist/chunks/get.js +387 -0
- package/dist/components/arcgis-solutions-assistant/customElement.js +5766 -5676
- package/dist/components/consent-manager/customElement.js +609 -638
- package/dist/components/solution-configure-titles/customElement.js +31 -28
- package/dist/components/solution-delete-dialog/customElement.js +57 -54
- package/dist/components/solution-deployed-card-panel/customElement.js +40 -37
- package/dist/components/solution-details-card/customElement.d.ts +4 -0
- package/dist/components/solution-details-card/customElement.js +45 -29
- package/dist/components/solution-details-card/index.js +1 -0
- package/dist/components/solution-item-accordion/customElement.d.ts +3 -2
- package/dist/components/solution-item-accordion/customElement.js +52 -35
- package/dist/components/solution-item-accordion/index.js +2 -0
- package/dist/components/solutions-all-panel/customElement.js +11 -11
- package/dist/components/solutions-deployed-list/customElement.d.ts +33 -0
- package/dist/components/solutions-deployed-list/customElement.js +38 -0
- package/dist/components/solutions-deployed-list/index.d.ts +1 -0
- package/dist/components/solutions-deployed-list/index.js +1 -0
- 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/index.d.ts +10 -0
- package/dist/loader.js +3 -2
- package/dist/solutions-components_commit.txt +7 -7
- package/dist/types/lumina.d.ts +6 -0
- package/dist/types/preact.d.ts +7 -0
- package/dist/types/react.d.ts +8 -0
- package/dist/types/stencil.d.ts +6 -0
- package/dist/utils/getRelatedInfos.d.ts +4 -0
- package/dist/utils/interfaces.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cdn/2L3RREZ4.js +0 -2
- package/dist/cdn/2WHAF4H7.js +0 -2
- package/dist/cdn/AKKTG2RD.js +0 -2
- package/dist/cdn/DLH53PYM.js +0 -7
- package/dist/cdn/P24CZ4HM.js +0 -2
- package/dist/cdn/R2G4DDRZ.js +0 -2
- package/dist/cdn/SO3S3WP4.js +0 -2
- package/dist/cdn/UBLDT5XD.js +0 -2
- package/dist/cdn/ZONXYZVU.js +0 -2
- package/dist/chunks/get-portal-url.js +0 -345
|
@@ -30,8 +30,8 @@ class N extends T {
|
|
|
30
30
|
const i = e.get("open");
|
|
31
31
|
if (this.open && !i) {
|
|
32
32
|
await this._updatePrefixSuffix(), this._templateInfos = JSON.parse(JSON.stringify(this.templateInfos)), this._originalTitles = this._templateInfos.map((t) => ({ id: t.id, title: t.title })), this._updateTemplates();
|
|
33
|
-
const
|
|
34
|
-
this._nonSolutionDependencyItems =
|
|
33
|
+
const s = await W(this._configContextConsumer.value.userSession, this.card);
|
|
34
|
+
this._nonSolutionDependencyItems = s._nonSolutionDependencyItems, await this._accordionRef?.expandFirstItem();
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -50,13 +50,16 @@ class N extends T {
|
|
|
50
50
|
}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`;
|
|
51
51
|
}
|
|
52
52
|
_getPrefixSuffixControls() {
|
|
53
|
-
const e = C(this._prefixValue), i = this._hasNameLengthError && this._prefixValue.length > 0,
|
|
54
|
-
return this._saveDisabled = !
|
|
53
|
+
const e = C(this._prefixValue), i = this._hasNameLengthError && this._prefixValue.length > 0, s = e.errorType !== "special-character", t = !i, a = s ? "display-none" : "", n = t ? "display-none" : "", d = s && t ? "valid" : "invalid", c = C(this._suffixValue), l = this._hasNameLengthError && this._suffixValue.length > 0, o = c.errorType !== "special-character", r = !l, f = o ? "display-none" : "", I = r ? "display-none" : "", y = o && r ? "valid" : "invalid";
|
|
54
|
+
return this._saveDisabled = !s || !t || !o || !r || !this._hasChanges(), h`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${d} .value=${this._prefixValue} ${p(this._prefixRef)}></calcite-input><calcite-input-message class=${u(a)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${y} .value=${this._suffixValue} ${p(this._suffixRef)}></calcite-input><calcite-input-message class=${u(f)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(I)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`;
|
|
55
55
|
}
|
|
56
56
|
_getAccordion() {
|
|
57
|
-
const e =
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
const e = new Set(this._nonSolutionDependencyItems.filter((s) => s.dependencyItemId !== this.card.id).map((s) => `${s.controlItemId}|${s.dependencyItemId}`)), i = Array.from(e).map((s) => {
|
|
58
|
+
const [t, a] = s.split("|");
|
|
59
|
+
return { controlItemId: t, dependencyItemId: a };
|
|
60
|
+
});
|
|
61
|
+
return h`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=rename ${p(async (s) => {
|
|
62
|
+
s && (this._accordionRef = s);
|
|
60
63
|
})}></solution-item-accordion></div>`;
|
|
61
64
|
}
|
|
62
65
|
_getDialogButtons() {
|
|
@@ -75,22 +78,22 @@ class N extends T {
|
|
|
75
78
|
_updateTemplates() {
|
|
76
79
|
const e = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1, i = this._configContextConsumer.value?.authentication?.PortalUserName;
|
|
77
80
|
this._templateInfos = this._templateInfos.map((t) => (this._loadingDefaultPrefix && t.title.startsWith(this._prefixValue) && (t.title = this._replaceStart(t.title, this._prefixValue, "")), this._loadingDefaultSuffix && t.title.endsWith(this._suffixValue) && (t.title = this._replaceAtEnd(t.title, this._suffixValue, "")), t));
|
|
78
|
-
const
|
|
79
|
-
this._hasNameLengthError = !1, this._displayTemplateInfos =
|
|
80
|
-
const
|
|
81
|
+
const s = JSON.parse(JSON.stringify(this._templateInfos));
|
|
82
|
+
this._hasNameLengthError = !1, this._displayTemplateInfos = s.map((t) => {
|
|
83
|
+
const a = this._prefixValue !== "", n = this._suffixValue !== "", d = this._defaultPrefix !== "", c = this._defaultSuffix !== "";
|
|
81
84
|
if (t.owner !== i && !e)
|
|
82
85
|
return t;
|
|
83
86
|
let l = t.title;
|
|
84
|
-
|
|
87
|
+
a && (d ? this._originalTitles.find((f) => f.id === t.id)?.title.startsWith(this._defaultPrefix) ? l = this._applyPrefixWithDuplicateCheck(t.title, this._prefixValue) : this._prefixValue !== this._defaultPrefix && (l = this._applyPrefixWithDuplicateCheck(t.title, this._prefixValue)) : l = this._applyPrefixWithDuplicateCheck(t.title, this._prefixValue));
|
|
85
88
|
let o = l;
|
|
86
89
|
return n && (c ? this._originalTitles.find((f) => f.id === t.id)?.title.endsWith(this._defaultSuffix) ? o = this._applySuffixWithDuplicateCheck(l, this._suffixValue) : this._suffixValue !== this._defaultSuffix && (o = this._applySuffixWithDuplicateCheck(l, this._suffixValue)) : o = this._applySuffixWithDuplicateCheck(l, this._suffixValue)), t.title = o, this._hasNameLengthError || (this._hasNameLengthError = t.title.length > P), t;
|
|
87
90
|
}), this._loadingDefaultPrefix = !1, this._loadingDefaultSuffix = !1;
|
|
88
91
|
}
|
|
89
|
-
_replaceStart(e, i,
|
|
90
|
-
return e.startsWith(i) ? `${
|
|
92
|
+
_replaceStart(e, i, s) {
|
|
93
|
+
return e.startsWith(i) ? `${s}${e.slice(i.length)}` : e;
|
|
91
94
|
}
|
|
92
|
-
_replaceAtEnd(e, i,
|
|
93
|
-
return e.endsWith(i) ? `${e.substring(0, e.length - i.length)}${
|
|
95
|
+
_replaceAtEnd(e, i, s) {
|
|
96
|
+
return e.endsWith(i) ? `${e.substring(0, e.length - i.length)}${s}` : e;
|
|
94
97
|
}
|
|
95
98
|
_applyPrefixWithDuplicateCheck(e, i) {
|
|
96
99
|
return !i || e.startsWith(i) ? e : i + e;
|
|
@@ -101,8 +104,8 @@ class N extends T {
|
|
|
101
104
|
_hasChanges() {
|
|
102
105
|
const e = this._defaultPrefix !== this._prefixValue, i = this._defaultSuffix !== this._suffixValue;
|
|
103
106
|
return this._displayTemplateInfos.some((t) => {
|
|
104
|
-
const
|
|
105
|
-
return
|
|
107
|
+
const a = this._originalTitles.find((n) => n.id === t.id);
|
|
108
|
+
return a && a.title !== t.title;
|
|
106
109
|
}) || e || i;
|
|
107
110
|
}
|
|
108
111
|
_closeDialog() {
|
|
@@ -120,37 +123,37 @@ class N extends T {
|
|
|
120
123
|
this.source
|
|
121
124
|
]
|
|
122
125
|
}), this._solutionItemsTitlesUpdating = !0;
|
|
123
|
-
const e = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1, i = this._configContextConsumer.value?.authentication?.PortalUserName,
|
|
124
|
-
if (
|
|
126
|
+
const e = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1, i = this._configContextConsumer.value?.authentication?.PortalUserName, s = this._displayTemplateInfos.reduce((t, a) => {
|
|
127
|
+
if (a.owner !== i) {
|
|
125
128
|
if (e) {
|
|
126
129
|
const n = {
|
|
127
|
-
id:
|
|
128
|
-
title:
|
|
130
|
+
id: a.id,
|
|
131
|
+
title: a.title
|
|
129
132
|
};
|
|
130
|
-
t.push(
|
|
133
|
+
t.push(a.type === "Group" ? x(n, this._configContextConsumer.value.userSession) : g(n, this._configContextConsumer.value.userSession, void 0, { solutionOwner: this.card?.owner }));
|
|
131
134
|
}
|
|
132
135
|
} else {
|
|
133
136
|
const n = {
|
|
134
|
-
id:
|
|
135
|
-
title:
|
|
137
|
+
id: a.id,
|
|
138
|
+
title: a.title
|
|
136
139
|
};
|
|
137
|
-
t.push(
|
|
140
|
+
t.push(a.type === "Group" ? x(n, this._configContextConsumer.value.userSession) : g(n, this._configContextConsumer.value.userSession, void 0, { solutionOwner: this.card?.owner }));
|
|
138
141
|
}
|
|
139
142
|
return t;
|
|
140
143
|
}, []);
|
|
141
144
|
if (this.solutionData?.templates) {
|
|
142
145
|
const t = {
|
|
143
146
|
id: this.card.id
|
|
144
|
-
},
|
|
147
|
+
}, a = {
|
|
145
148
|
...this.solutionData,
|
|
146
149
|
titles: {
|
|
147
150
|
prefix: this._prefixValue,
|
|
148
151
|
suffix: this._suffixValue
|
|
149
152
|
}
|
|
150
153
|
};
|
|
151
|
-
|
|
154
|
+
s.push(E(t, a, this._configContextConsumer.value.userSession, void 0, void 0, null, this.card?.owner));
|
|
152
155
|
}
|
|
153
|
-
await Promise.all(
|
|
156
|
+
await Promise.all(s), this._solutionItemsTitlesUpdating = !1, this.solutionItemsTitlesChanged.emit();
|
|
154
157
|
}
|
|
155
158
|
this._closeDialog();
|
|
156
159
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { u as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { useContextConsumer as
|
|
2
|
+
import { c as u } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as p, nothing as f, html as r } from "lit";
|
|
4
|
+
import { u as g } from "../../chunks/useT9n.js";
|
|
5
|
+
import { LitElement as _, createEvent as d, safeClassMap as c } from "@arcgis/lumina";
|
|
6
|
+
import { useContextConsumer as I } from "@arcgis/lumina/context";
|
|
7
7
|
import { g as D } from "../../chunks/common.js";
|
|
8
|
-
import { y
|
|
9
|
-
import { deleteSolution as
|
|
10
|
-
import { c as
|
|
11
|
-
import { createRef as
|
|
8
|
+
import { y, T as b } from "../../chunks/interfaces.js";
|
|
9
|
+
import { deleteSolution as w } from "@esri/solution-common";
|
|
10
|
+
import { c as C } from "../../chunks/deployAppContexts.js";
|
|
11
|
+
import { createRef as $, ref as m } from "lit-html/directives/ref.js";
|
|
12
12
|
import "../solution-item-accordion/customElement.js";
|
|
13
|
-
import { p as
|
|
14
|
-
const
|
|
15
|
-
class
|
|
13
|
+
import { p as v, g as x } from "../../chunks/getRelatedInfos.js";
|
|
14
|
+
const S = p`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.deletion-note-text{display:inline-block}.deletion-note-container{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-0);margin-bottom:var(--calcite-spacing-md)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.display-none{display:none}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-md);margin-bottom:var(--calcite-spacing-xl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.padding-around{padding:12px 2rem 2rem}`;
|
|
15
|
+
class T extends _ {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(), this.open = !1, this.source = "Card Dropdown", this._deletePercentage = 0, this._fetchingTemplates = !1, this._isDeleteInProgress = !1, this._nonSolutionDependencyItems = [], this._showDeleteError = !1, this._showUndeletableItems = !1, this._templateInfos = [], this._translations =
|
|
18
|
-
context:
|
|
17
|
+
super(), this.open = !1, this.source = "Card Dropdown", this._deletePercentage = 0, this._fetchingTemplates = !1, this._isDeleteInProgress = !1, this._nonSolutionDependencyItems = [], this._showDeleteError = !1, this._showUndeletableItems = !1, this._templateInfos = [], this._translations = g({ name: "solution-delete-dialog", blocking: !0 }), this._accordion = $(), this._configContextConsumer = I({
|
|
18
|
+
context: C,
|
|
19
19
|
subscribe: !0
|
|
20
|
-
}), this.solutionDeleteDialogOpen = d(), this.solutionDeleted = d(), this.solutionDeleteDialogBeforeClose = d(), this.listenOn(window, "beforeunload", (
|
|
21
|
-
this._isDeleteInProgress && (
|
|
20
|
+
}), this.solutionDeleteDialogOpen = d(), this.solutionDeleted = d(), this.solutionDeleteDialogBeforeClose = d(), this.listenOn(window, "beforeunload", (t) => {
|
|
21
|
+
this._isDeleteInProgress && (t.preventDefault(), t.returnValue = !0);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
25
|
this.properties = { card: 0, open: 5, source: 1, _deletePercentage: 16, _fetchingTemplates: 16, _isDeleteInProgress: 16, _nonSolutionDependencyItems: 16, _showDeleteError: 16, _showUndeletableItems: 16, _templateInfos: 16, _translations: 16 };
|
|
26
26
|
}
|
|
27
27
|
static {
|
|
28
|
-
this.styles =
|
|
28
|
+
this.styles = S;
|
|
29
29
|
}
|
|
30
30
|
get _hasAdminDeletePermission() {
|
|
31
|
-
return this._configContextConsumer.value?.authentication ?
|
|
31
|
+
return this._configContextConsumer.value?.authentication ? y(this._configContextConsumer.value?.authentication) : !1;
|
|
32
32
|
}
|
|
33
33
|
get _telemetry() {
|
|
34
34
|
return this._configContextConsumer.value?.telemetrySession;
|
|
@@ -38,7 +38,7 @@ class S extends g {
|
|
|
38
38
|
}
|
|
39
39
|
delete() {
|
|
40
40
|
if (this._telemetry?.logEvent({
|
|
41
|
-
category:
|
|
41
|
+
category: b.DEPLOYMENTS,
|
|
42
42
|
action: "Delete Solution",
|
|
43
43
|
dimensions: [
|
|
44
44
|
this.card?.title || "",
|
|
@@ -47,81 +47,84 @@ class S extends g {
|
|
|
47
47
|
this.source
|
|
48
48
|
]
|
|
49
49
|
}), this._isDeleteInProgress = !0, this.card) {
|
|
50
|
-
const
|
|
50
|
+
const t = [{
|
|
51
51
|
itemName: this.card.title,
|
|
52
52
|
itemType: "Solution",
|
|
53
53
|
owner: this.card.owner,
|
|
54
54
|
modified: this.card.modified
|
|
55
|
-
}],
|
|
56
|
-
progressCallback: (
|
|
57
|
-
this._deletePercentage = Math.round(
|
|
55
|
+
}], s = {
|
|
56
|
+
progressCallback: (o) => {
|
|
57
|
+
this._deletePercentage = Math.round(o);
|
|
58
58
|
},
|
|
59
59
|
solutionOwner: this.card.owner
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
if (
|
|
61
|
+
w(this.card.id, this._configContextConsumer.value.userSession, s).then((o) => {
|
|
62
|
+
const i = o[1];
|
|
63
|
+
let a;
|
|
64
|
+
if (i ? a = i.items.map((n) => ({
|
|
65
65
|
itemName: n.title,
|
|
66
66
|
itemType: n.type,
|
|
67
67
|
owner: n.owner,
|
|
68
68
|
modified: n.modified
|
|
69
|
-
})) :
|
|
69
|
+
})) : a = t, a.length === 0)
|
|
70
70
|
this.solutionDeleted.emit({ showAlert: !0, refreshSolutionsTimeout: !0, solutionTitle: this.card?.title }), this._isDeleteInProgress = !1, this.open = !1;
|
|
71
|
-
else if (
|
|
72
|
-
this.card ?
|
|
73
|
-
this._templateInfos =
|
|
71
|
+
else if (a.some((e) => e.itemType === "Solution"))
|
|
72
|
+
this.card ? v(this.card, this._configContextConsumer.value.userSession).then((e) => {
|
|
73
|
+
this._templateInfos = e, this._showDeleteError = !0, this._showUndeletableItems = !0, this._isDeleteInProgress = !1;
|
|
74
74
|
}) : (this._showDeleteError = !0, this._isDeleteInProgress = !1);
|
|
75
75
|
else if (this.card) {
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
id:
|
|
79
|
-
title:
|
|
80
|
-
type:
|
|
81
|
-
owner:
|
|
82
|
-
modified:
|
|
76
|
+
let e = [];
|
|
77
|
+
e = i.items.map((l) => ({
|
|
78
|
+
id: l.id,
|
|
79
|
+
title: l.title,
|
|
80
|
+
type: l.type,
|
|
81
|
+
owner: l.owner,
|
|
82
|
+
modified: l.modified,
|
|
83
83
|
typeKeywords: [],
|
|
84
84
|
snippet: "",
|
|
85
85
|
dependencies: [],
|
|
86
|
-
url: D(
|
|
87
|
-
})), this._templateInfos =
|
|
86
|
+
url: D(l.id, this._configContextConsumer.value.authentication)
|
|
87
|
+
})), this._templateInfos = e, this._showDeleteError = !1, this._showUndeletableItems = !0, this._isDeleteInProgress = !1;
|
|
88
88
|
} else
|
|
89
89
|
this.solutionDeleted.emit({ showAlert: !0, refreshSolutionsTimeout: !0 }), this._isDeleteInProgress = !1, this.open = !1;
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
willUpdate(
|
|
94
|
-
if (
|
|
95
|
-
const
|
|
96
|
-
this.open && !
|
|
97
|
-
this._templateInfos =
|
|
93
|
+
willUpdate(t) {
|
|
94
|
+
if (t.has("open")) {
|
|
95
|
+
const s = t.get("open");
|
|
96
|
+
this.open && !s && (this._fetchingTemplates = !0, x(this._configContextConsumer.value.userSession, this.card).then((o) => {
|
|
97
|
+
this._templateInfos = o.templateInfos, this._nonSolutionDependencyItems = o._nonSolutionDependencyItems, this._fetchingTemplates = !1;
|
|
98
98
|
}));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
|
-
const
|
|
103
|
-
|
|
102
|
+
const t = this._fetchingTemplates ? "" : "display-none", s = this._fetchingTemplates ? "display-none" : "", o = new Set(this._nonSolutionDependencyItems.filter((e) => e.dependencyItemId !== this.card.id).map((e) => `${e.controlItemId}|${e.dependencyItemId}`)), i = Array.from(o).map((e) => {
|
|
103
|
+
const [l, h] = e.split("|");
|
|
104
|
+
return { controlItemId: l, dependencyItemId: h };
|
|
105
|
+
}), a = this._templateInfos.length - this._getDependencyCount() - this._getNonOwnerCount(), n = this._translations.deletionCount.replace("{{deleteableCount}}", a.toString()).replace("{{totalCount}}", this._templateInfos.length.toString());
|
|
106
|
+
return r`<calcite-dialog class="panel-bg-color" .closeDisabled=${this._isDeleteInProgress} .escapeDisabled=${this._isDeleteInProgress} .heading=${this._translations.title.replace("{{solution}}", this.card?.title ?? "")} id=${this._translations.title.replace("{{solution}}", this.card?.title ?? "") ?? f} modal kind=danger .open=${this.open} width=l outside-close-disabled @calciteDialogBeforeClose=${() => {
|
|
104
107
|
this.solutionDeleteDialogBeforeClose.emit();
|
|
105
108
|
}} @calciteDialogClose=${() => {
|
|
106
109
|
this.open = !1, this.solutionDeleteDialogOpen.emit(!1);
|
|
107
|
-
}}>${this._isDeleteInProgress ? r`<calcite-loader .label=${this._translations.deleteInProgress} scale=l type=determinate-value .value=${this._deletePercentage}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deleteInProgress}</div>` : this._showUndeletableItems ? r`<calcite-label class=${c(
|
|
110
|
+
}}>${this._isDeleteInProgress ? r`<calcite-loader .label=${this._translations.deleteInProgress} scale=l type=determinate-value .value=${this._deletePercentage}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deleteInProgress}</div>` : this._showUndeletableItems ? r`<calcite-label class=${c(s)} layout=inline><span tabindex=0>${this._translations.failedToDeleteItems}</span></calcite-label><solution-item-accordion class=${c(s)} .itemRelationshipDependencies=${[]} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=delete ${m(this._accordion)}></solution-item-accordion><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonClose}</calcite-button>` : r`<div class="padding-around"><div class=${`deletion-note-container ${s}`}><span class="deletion-note-text" tabindex=0>${this._translations.deletionNote}</span><calcite-chip .label=${n} scale=m icon=information>${n}</calcite-chip></div><calcite-loader class=${c(t)} label></calcite-loader><solution-item-accordion class=${c(s)} .itemRelationshipDependencies=${i} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=delete ${m(this._accordion)}></solution-item-accordion></div><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonCancel}</calcite-button><calcite-button @click=${() => {
|
|
108
111
|
this.delete();
|
|
109
112
|
}} slot=footer-end kind=danger>${this._translations.buttonDelete}</calcite-button>${this._showDeleteError && r`<calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._translations.failedToDelete} @calciteAlertClose=${() => {
|
|
110
113
|
this._showDeleteError = !1;
|
|
111
114
|
}} open><div slot=message>${this._translations.failedToDelete}</div></calcite-alert>` || ""}`}</calcite-dialog>`;
|
|
112
115
|
}
|
|
113
116
|
_getDependencyCount() {
|
|
114
|
-
const
|
|
115
|
-
return new Set(
|
|
117
|
+
const t = this._nonSolutionDependencyItems.map((s) => s.controlItemId);
|
|
118
|
+
return new Set(t).size;
|
|
116
119
|
}
|
|
117
120
|
_getNonOwnerCount() {
|
|
118
121
|
if (this._templateInfos.length === 0 || this._hasAdminDeletePermission)
|
|
119
122
|
return 0;
|
|
120
|
-
const
|
|
121
|
-
return this._templateInfos.filter((
|
|
123
|
+
const t = this._nonSolutionDependencyItems.map((i) => i.controlItemId), s = new Set(t), o = this._configContextConsumer.value.userSession.username;
|
|
124
|
+
return this._templateInfos.filter((i) => !s.has(i.id)).filter((i) => i.owner !== o).length;
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
|
-
|
|
127
|
+
u("solution-delete-dialog", T);
|
|
125
128
|
export {
|
|
126
|
-
|
|
129
|
+
T as SolutionDeleteDialog
|
|
127
130
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { u
|
|
2
|
+
import { c as m } from "../../chunks/runtime.js";
|
|
3
|
+
import { u } from "../../chunks/useT9n.js";
|
|
4
4
|
import { LitElement as f, createEvent as r, safeClassMap as b, nothing as d } from "@arcgis/lumina";
|
|
5
5
|
import { useContextConsumer as g } from "@arcgis/lumina/context";
|
|
6
|
-
import { css as x, html as
|
|
6
|
+
import { css as x, html as o } from "lit";
|
|
7
7
|
import { c as _, i as v } from "../../chunks/deployAppContexts.js";
|
|
8
8
|
import { y, T as s, x as w } from "../../chunks/interfaces.js";
|
|
9
|
-
import { f as
|
|
9
|
+
import { f as $, g as p, a as C } from "../../chunks/cardsHelpers.js";
|
|
10
10
|
import { g as S } from "../../chunks/getRelatedInfos.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { d as
|
|
11
|
+
import { u as D } from "../../chunks/common.js";
|
|
12
|
+
import { d as k } from "../../chunks/helpers.js";
|
|
13
13
|
import * as h from "@esri/solution-common";
|
|
14
|
-
const
|
|
15
|
-
class
|
|
14
|
+
const I = x`.negative-tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.font-weight-med{font-weight:var(--calcite-font-weight-medium)}.font-weight-bold{font-weight:var(--calcite-font-weight-bold)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.font-1{font-size:var(--calcite-spacing-lg)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}@container (min-width: 801px){.font-size-override .display-flex.flex-direction-row>.image-width+.display-flex{flex:1;min-width:0}}.icon-color{color:var(--calcite-color-text-3)}.padding-bottom-lg{padding-bottom:var(--calcite-spacing-lg)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.align-items-center{align-items:center}.align-items-start{align-items:start}.font-size-override{--calcite-font-size--2: var(--calcite-font-size--1)}.background-color-1{background-color:var(--calcite-color-surface-2)}.background-color-2{background-color:var(--calcite-color-surface-3)}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.position-relative{position:relative}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-3)}.panel-background-1{--calcite-panel-background-color: var(--calcite-color-surface-2);--calcite-shell-panel-background-color: var(--calcite-color-surface-2)}.border-none{border:none}.font-color-1{color:var(--calcite-color-text-1)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.bottom-border{border-bottom:solid var(--calcite-spacing-px);color:var(--calcite-color-border-1)}.margin-start-end-xxl{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.margin-start-end-lg{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-top-xxl{margin-top:var(--calcite-spacing-xxl)}.justify-between{justify-content:space-between}.items-baseline{align-items:baseline}.padding-xxl{padding:var(--calcite-spacing-xxl)}.padding-lg{padding:var(--calcite-spacing-lg)}.padding-top-xxl{padding-top:var(--calcite-spacing-xxl)}.padding-top-lg{padding-top:var(--calcite-spacing-lg)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}.padding-start-sm{padding-inline-start:var(--calcite-spacing-sm)}.padding-start-xxl{padding-inline-start:var(--calcite-spacing-xxl)}.image-width{width:300px;flex-grow:0;flex-shrink:0}@container (max-width: 1280px){.image-width{flex-grow:0;flex-shrink:1}}img{max-width:100%;height:auto;overflow-clip-margin:content-box;overflow:clip;display:block}.margin-xl{margin:var(--calcite-spacing-xl)}.line-height-1{line-height:1.1}.line-height-xxl{line-height:var(--calcite-line-height-xxl)}@container (max-width: 800px){.font-size-override .display-flex.flex-direction-row{flex-direction:column!important}.image-width{width:100%!important;max-width:100%!important;margin:0!important;padding:var(--calcite-spacing-lg)!important;padding-bottom:0!important;box-sizing:border-box}.image-width img{width:100%;max-width:100%}.margin-xl{margin:0!important}.image-width+.display-flex{padding-inline-start:var(--calcite-spacing-lg)!important;padding-inline-end:var(--calcite-spacing-lg)!important}.padding-start-sm{padding-inline-start:0!important}.title-font{padding-inline-start:0!important;padding-top:var(--calcite-spacing-lg)!important;padding-bottom:var(--calcite-spacing-lg)!important}.align-items-start.padding-bottom-xxl,.padding-bottom-xxl.padding-start-sm{padding-bottom:var(--calcite-spacing-lg)!important}}calcite-shell-panel{--calcite-shell-panel-max-width: 20rem;--calcite-shell-panel-width: 24vw}calcite-shell{block-size:unset}.solution-deployed-action{--calcite-color-focus: initial}.skeleton-loader{background:linear-gradient(90deg,var(--calcite-color-foreground-1) 0%,var(--calcite-color-foreground-2) 50%,var(--calcite-color-foreground-1) 100%);background-size:200% 100%;animation:shimmer 1.5s ease-in-out infinite;border-radius:var(--calcite-border-radius)}.skeleton-folder{height:1.5rem;width:12rem;border-radius:var(--calcite-border-radius)}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}`;
|
|
15
|
+
class T extends f {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(), this.diagramKey = "", this.open = !1, this.templateInfos = [], this._accordionLoading = !1, this._configureTitlesOpen = !1, this._deleteDialogOpen = !1, this._hasNewVersion = !1, this._isDiagramOpen = !1, this._isNameConflict = !1, this._invalidNameMessage = "", this._showFailedAlert = !1, this._showItemUpdateLoading = !1, this.isMobile = !1, this._templateInfoGraph = [], this._thumbnailUrl = "", this._folderName = "", this._folderId = null, this._folderLoading = !1, this._translations =
|
|
17
|
+
super(), this.diagramKey = "", this.open = !1, this.templateInfos = [], this._accordionLoading = !1, this._configureTitlesOpen = !1, this._deleteDialogOpen = !1, this._hasNewVersion = !1, this._isDiagramOpen = !1, this._isNameConflict = !1, this._invalidNameMessage = "", this._showFailedAlert = !1, this._showItemUpdateLoading = !1, this.isMobile = !1, this._templateInfoGraph = [], this._thumbnailUrl = "", this._folderName = "", this._folderId = null, this._folderLoading = !1, this._translations = u({ name: "solution-deployed-card-panel", blocking: !0 }), this._configContextConsumer = g({
|
|
18
18
|
context: _,
|
|
19
19
|
subscribe: !0,
|
|
20
20
|
callback: async (e) => {
|
|
@@ -38,7 +38,7 @@ class I extends f {
|
|
|
38
38
|
const t = this._configContextConsumer.value?.orgUrl;
|
|
39
39
|
if (!t)
|
|
40
40
|
return;
|
|
41
|
-
const
|
|
41
|
+
const i = this._configContextConsumer.value?.userSession?.username, n = this.card?.owner === i;
|
|
42
42
|
let a;
|
|
43
43
|
if (n) {
|
|
44
44
|
const l = this._folderId || this.card?.owner;
|
|
@@ -47,7 +47,7 @@ class I extends f {
|
|
|
47
47
|
this._folderId ? a = `${t}/home/content.html?user=${this.card?.owner}&folder=${this._folderId}` : a = `${t}/home/content.html?user=${this.card?.owner}&folder=${this.card?.owner}`;
|
|
48
48
|
window.open(a, "_blank");
|
|
49
49
|
}, this.listenOn(window, "deployedCardSelected", this._deployedCardSelected), this.listenOn(window, "deployAppTabSelected", this._handleDeployAppTabSelected), this.listenOn(window, "displayDeployedCard", () => {
|
|
50
|
-
|
|
50
|
+
k({
|
|
51
51
|
kind: "success",
|
|
52
52
|
icon: "check-circle",
|
|
53
53
|
title: this._translations.deploySuccessAlert.replace("{{solutionTitle}}", this.card?.title ?? ""),
|
|
@@ -63,7 +63,7 @@ class I extends f {
|
|
|
63
63
|
this.properties = { card: 0, cardRef: 1, diagramKey: 1, open: 5, templateInfos: 0, _accordionLoading: 16, _configureTitlesOpen: 16, _deleteDialogOpen: 16, _hasNewVersion: 16, _isDiagramOpen: 16, _isNameConflict: 16, _invalidNameMessage: 16, _showFailedAlert: 16, _showItemUpdateLoading: 16, isMobile: 16, _templateInfoGraph: 16, _thumbnailUrl: 16, _folderName: 16, _folderId: 16, _folderLoading: 16, _translations: 16, _nonSolutionDependencyItems: 16 };
|
|
64
64
|
}
|
|
65
65
|
static {
|
|
66
|
-
this.styles =
|
|
66
|
+
this.styles = I;
|
|
67
67
|
}
|
|
68
68
|
get _telemetry() {
|
|
69
69
|
return this._configContextConsumer.value?.telemetrySession;
|
|
@@ -76,19 +76,19 @@ class I extends f {
|
|
|
76
76
|
}
|
|
77
77
|
willUpdate(e) {
|
|
78
78
|
if (e.has("card")) {
|
|
79
|
-
const t = this._configContextConsumer.value?.userSession,
|
|
80
|
-
this._thumbnailUrl = `${
|
|
79
|
+
const t = this._configContextConsumer.value?.userSession, i = this.card?.thumbnailUrl.replace(/w=\d+/, "w=400");
|
|
80
|
+
this._thumbnailUrl = `${i}&token=${t?.token}`, this._folderLoading = !0, this._folderName = "", this._folderId = null;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
render() {
|
|
84
|
-
return this.isMobile ?
|
|
84
|
+
return this.isMobile ? o`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="background-color-2 padding-top-lg">${this._getSolutionPanel()}</div><div class="background-color-1 margin-top-xxl">${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getFolderSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</div>${this._getSolutionContents()}</calcite-panel></calcite-shell>` : o`<calcite-shell class="position-relative background-color-2"><calcite-panel class="padding-end-xxl panel-background-2 border-none" slot=panel-bottom><div class="display-flex flex-direction-column overflow-hidden"><div class="background-color-2 padding-top-xxl">${this._getSolutionPanel()}</div>${this._getSolutionContents()}</div></calcite-panel><calcite-shell-panel class="panel-background-1" slot=panel-end>${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getFolderSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</calcite-shell-panel>${this._renderDiagramDialog()}${this._getConfigureTitlesDialog()}${this._getDeleteDialog()}</calcite-shell>`;
|
|
85
85
|
}
|
|
86
86
|
async _deployedCardSelected(e) {
|
|
87
87
|
const t = e.detail;
|
|
88
88
|
this.card = t.card, this.cardRef = t.cardRef, this.templateInfos = [], this._accordionLoading = !0, this.templateInfos = await this._getTemplates(), this._accordionLoading = !1;
|
|
89
|
-
const
|
|
90
|
-
this._nonSolutionDependencyItems =
|
|
91
|
-
const n =
|
|
89
|
+
const i = await S(this._configContextConsumer.value.userSession, this.card);
|
|
90
|
+
this._nonSolutionDependencyItems = i._nonSolutionDependencyItems;
|
|
91
|
+
const n = $(this._configContextConsumer.value?.allCards || [], this.card.deployCommonId);
|
|
92
92
|
let a = !1;
|
|
93
93
|
if (n) {
|
|
94
94
|
const l = p(n), c = p(this.card);
|
|
@@ -100,14 +100,14 @@ class I extends f {
|
|
|
100
100
|
e.detail === "deployed-card" && this.sortTypeChanged.emit("");
|
|
101
101
|
}
|
|
102
102
|
_getButtons() {
|
|
103
|
-
const e = this._configContextConsumer.value?.userSession?.username, t = this._configContextConsumer.value?.authentication?.CanUpdateSolution,
|
|
104
|
-
return
|
|
103
|
+
const e = this._configContextConsumer.value?.userSession?.username, t = this._configContextConsumer.value?.authentication?.CanUpdateSolution, i = this._configContextConsumer.value?.authentication?.CanDeleteSolution && this._configContextConsumer.value?.authentication?.CanUpdateSolution, n = this.card?.owner === e || this._isOrgAdmin || t, a = this.card?.owner === e || this._isOrgAdmin || i, l = n ? "display-none" : "", c = this.isMobile ? "padding-lg" : "padding-xxl";
|
|
104
|
+
return o`<div class=${`display-flex flex-direction-column ${c}`}>${!this.isMobile && o`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openDiagram}>${this._translations.viewTheDiagram}</calcite-button>` || ""}<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._viewDocumentation}>${this._translations.solutionDocumentation}</calcite-button><calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openItemDetails}>${this._translations.itemDetails}</calcite-button>${n && !this.isMobile && o`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" id=solution-configure-titles-button kind=neutral @click=${this._openConfigureTitlesDialog}>${this._translations.updateTitles}</calcite-button><calcite-tooltip class=${b(l)} overlay-positioning=fixed reference-element=solution-configure-titles-button><span>${this._translations.mustOwnSolution}</span></calcite-tooltip>` || ""}${a && !this.isMobile && o`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._deleteSolution}>${this._translations.deleteSolution}</calcite-button>` || ""}</div>`;
|
|
105
105
|
}
|
|
106
106
|
_openConfigureTitlesDialog() {
|
|
107
107
|
this._configureTitlesOpen = !0;
|
|
108
108
|
}
|
|
109
109
|
_getConfigureTitlesDialog() {
|
|
110
|
-
return this._configureTitlesOpen ?
|
|
110
|
+
return this._configureTitlesOpen ? o`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async () => {
|
|
111
111
|
this.templateInfos = await this._getTemplates(), this._configureTitlesOpen = !1;
|
|
112
112
|
}} @solutionItemsTitlesChanged=${async () => {
|
|
113
113
|
this.templateInfos = await this._getTemplates();
|
|
@@ -141,7 +141,7 @@ class I extends f {
|
|
|
141
141
|
if (!this._configContextConsumer?.value)
|
|
142
142
|
return;
|
|
143
143
|
const e = this.isMobile ? "margin-start-end-lg" : "margin-start-end-xxl";
|
|
144
|
-
return
|
|
144
|
+
return o`<div class=${`display-flex padding-bottom-xxl ${e} flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l tabindex=0>${this._translations.aboutYourSolutionOwner}</calcite-label></div><solution-user-avatar .fullname=${this._user?.username === this.card?.owner ? this._user?.fullName : void 0} .lookupProfile=${this._user?.username !== this.card?.owner} .thumbnailUrl=${this._user?.username === this.card?.owner ? this._user?.thumbnailUrl : void 0} .username=${this.card?.owner}></solution-user-avatar></div>`;
|
|
145
145
|
}
|
|
146
146
|
async _openDiagram(e) {
|
|
147
147
|
e.stopPropagation();
|
|
@@ -168,8 +168,8 @@ class I extends f {
|
|
|
168
168
|
return;
|
|
169
169
|
const t = await h.getItemBase(this.card.id, e);
|
|
170
170
|
if (this._folderId = t.ownerFolder ?? null, this._folderId) {
|
|
171
|
-
const
|
|
172
|
-
this._folderName =
|
|
171
|
+
const i = await h.getUserFolder(this.card.owner, this._folderId, e);
|
|
172
|
+
this._folderName = i?.currentFolder?.title || this._folderId;
|
|
173
173
|
} else
|
|
174
174
|
this._folderName = this.card.owner || "Root";
|
|
175
175
|
} catch (e) {
|
|
@@ -177,12 +177,12 @@ class I extends f {
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
_getFolderSection() {
|
|
180
|
-
const e = this.isMobile ? "padding-lg" : "padding-xxl",
|
|
181
|
-
return
|
|
180
|
+
const e = this.isMobile ? "padding-lg" : "padding-xxl", i = !this._folderId ? "home" : "folder";
|
|
181
|
+
return o`<div class=${`${e} display-flex flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.folder}</calcite-label><calcite-button appearance=transparent .disabled=${this._folderLoading} kind=neutral icon-start=launch2 @click=${this._openFolder}>${this._translations.openFolder}</calcite-button></div><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center">${this._folderLoading ? o`<div class="skeleton-loader skeleton-folder"></div>` : o`<calcite-icon class="icon-color" .icon=${i} scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${this._folderName || "Root"}</span></div>`}</div></div></div>`;
|
|
182
182
|
}
|
|
183
183
|
_getSolutionVersionCard() {
|
|
184
184
|
const e = this._hasNewVersion ? this._translations.newVersionAvailable : this._translations.youHaveTheLatestVersion, t = this.isMobile ? "padding-lg" : "padding-xxl";
|
|
185
|
-
return
|
|
185
|
+
return o`<div class=${`${t} display-flex flex-direction-column`}><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.solutionVersion.replace("{{version}}", this.card?.deployVersion || "")}</calcite-label><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center"><calcite-icon class="icon-color" icon=clock-forward scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${e}</span></div></div></div>${this._hasNewVersion ? o`<calcite-button appearance=outline class="padding-top-lg solution-deployed-action" kind=neutral @click=${this._openNewVersionSolution} width=full>${this._translations.learnMoreNewVersion}</calcite-button>` : ""}</div>`;
|
|
186
186
|
}
|
|
187
187
|
async _openNewVersionSolution(e) {
|
|
188
188
|
e.stopPropagation(), this._telemetry?.logEvent({
|
|
@@ -193,24 +193,27 @@ class I extends f {
|
|
|
193
193
|
this.card?.deployCommonId || "",
|
|
194
194
|
this.card?.deployVersion || ""
|
|
195
195
|
]
|
|
196
|
-
}), await new Promise((
|
|
197
|
-
const t =
|
|
196
|
+
}), await new Promise((i) => setTimeout(i, 100));
|
|
197
|
+
const t = C(this._configContextConsumer.value.allCards, this.card.deployCommonId);
|
|
198
198
|
t && this.forceSelectTab.emit({ tabType: "details", tabTitleOrId: t });
|
|
199
199
|
}
|
|
200
200
|
_getSolutionPanel() {
|
|
201
|
-
return
|
|
201
|
+
return o`<calcite-panel class="font-size-override panel-background-1"><div class="display-flex flex-direction-row"><div class="image-width margin-xl"><img alt=${this.card?.title ?? d} src=${this._thumbnailUrl ?? d}></div><div class="display-flex flex-direction-column"><h1 class="title-font margin-block-start-end-0 padding-end-xxl padding-start-sm padding-top-xxl padding-bottom-xxl line-height-1 negative-tabbing-offset" tabindex=0>${this.card?.title}</h1><div class="display-flex flex-direction-column padding-bottom-xxl padding-start-sm"><div class="display-flex align-items-start padding-bottom-xxl"><div class="font-1 padding-end-1 line-height-xxl negative-tabbing-offset" tabindex=0>${this.card?.snippet}</div></div><div class="display-flex"><div class="display-flex"><calcite-label class="label-override icon-color tabbing-offset" layout=inline tabindex=0><calcite-icon class="icon-color" icon=projects scale=s></calcite-icon>${this._translations.aboutYourSolutionDeployedDate.replace("{{deployedDate}}", this.card?.created || "")}</calcite-label></div></div></div></div></div></calcite-panel>`;
|
|
202
202
|
}
|
|
203
203
|
_getSolutionContents() {
|
|
204
|
-
const e =
|
|
205
|
-
|
|
204
|
+
const e = new Set(this._nonSolutionDependencyItems.filter((i) => i.dependencyItemId !== this.card.id).map((i) => `${i.controlItemId}|${i.dependencyItemId}`)), t = Array.from(e).map((i) => {
|
|
205
|
+
const [n, a] = i.split("|");
|
|
206
|
+
return { controlItemId: n, dependencyItemId: a };
|
|
207
|
+
});
|
|
208
|
+
return o`<calcite-panel class="panel-background-1 padding-top-xxl"><calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded><div class="margin-block-start-end-0 heading-font " slot=content-start>${this._translations.solutionsContentsAndCount.replace("{{numberOfSolutions}}", this.templateInfos.length.toString())}</div><div class="overflow-auto">${this._accordionLoading ? o`<calcite-loader .label=${this._translations.loadingText} scale=m></calcite-loader>` : o`<solution-item-accordion .itemRelationshipDependencies=${t} .listSelectionMode=${t.length > 0 ? "multiple" : "single"} .reuseWarning=${this._translations.itemUsedInOtherSolutions} .templateInfos=${this.templateInfos} .typeKeywords=${this.card?.typeKeywords}></solution-item-accordion>`}</div></calcite-accordion-item></calcite-accordion></calcite-panel>`;
|
|
206
209
|
}
|
|
207
210
|
_getDeleteDialog() {
|
|
208
|
-
return this._deleteDialogOpen ?
|
|
211
|
+
return this._deleteDialogOpen ? o`<solution-delete-dialog .card=${this.card} @solutionDeleted=${() => setTimeout(() => this.navTabSelected.emit({ tabType: "deployments" }), 100)} @solutionDeleteDialogBeforeClose=${() => {
|
|
209
212
|
this._deleteDialogOpen = !1;
|
|
210
213
|
}} .open=${this._deleteDialogOpen} source="Details Page"></solution-delete-dialog>` : "";
|
|
211
214
|
}
|
|
212
215
|
_renderDiagramDialog() {
|
|
213
|
-
return this._isDiagramOpen ?
|
|
216
|
+
return this._isDiagramOpen ? o`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramOfTheSolution.replace("{{solution}}", this.card?.title ?? "")} id=${this._translations.diagramOfTheSolution.replace("{{solution}}", this.card?.title ?? "") ?? d} modal .open=${this._isDiagramOpen} @calciteDialogClose=${() => {
|
|
214
217
|
this._isDiagramOpen = !1;
|
|
215
218
|
}} outside-close-disabled scale=m width=l><solution-item-diagram .diagramKey=${this.diagramKey !== "" ? this.diagramKey : this._configContextConsumer.value?.diagramKey ?? ""} .templateInfoGraph=${this._templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>` : "";
|
|
216
219
|
}
|
|
@@ -218,10 +221,10 @@ class I extends f {
|
|
|
218
221
|
this._deleteDialogOpen = !0;
|
|
219
222
|
}
|
|
220
223
|
_updateThumbnailToken(e) {
|
|
221
|
-
this._thumbnailUrl !== "" && (this._thumbnailUrl =
|
|
224
|
+
this._thumbnailUrl !== "" && (this._thumbnailUrl = D(this._thumbnailUrl, e));
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
|
-
|
|
227
|
+
m("solution-deployed-card-panel", T);
|
|
225
228
|
export {
|
|
226
|
-
|
|
229
|
+
T as SolutionDeployedCardPanel
|
|
227
230
|
};
|
|
@@ -16,12 +16,16 @@ export abstract class SolutionDetailsCard extends LitElement {
|
|
|
16
16
|
updated: string;
|
|
17
17
|
deployed: string;
|
|
18
18
|
viewDetails: string;
|
|
19
|
+
deployedTitle: string;
|
|
20
|
+
deployedPreviousTitle: string;
|
|
19
21
|
} & T9nMeta<{
|
|
20
22
|
arcgisSolutions: string;
|
|
21
23
|
newSolution: string;
|
|
22
24
|
updated: string;
|
|
23
25
|
deployed: string;
|
|
24
26
|
viewDetails: string;
|
|
27
|
+
deployedTitle: string;
|
|
28
|
+
deployedPreviousTitle: string;
|
|
25
29
|
}>;
|
|
26
30
|
/** The solutions card */
|
|
27
31
|
accessor card: ISolutionInfoCard | undefined;
|