@esri/solutions-components 5.1.0-next.92 → 5.1.0-next.94
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/{DJOOB7YP.js → 2B2ANB2N.js} +1 -1
- package/dist/cdn/{PP2SFAFD.js → 2L3RREZ4.js} +1 -1
- package/dist/cdn/{OV4IBBDL.js → 2O3HAXKG.js} +1 -1
- package/dist/cdn/2VXTMCRJ.js +2 -0
- package/dist/cdn/2WHAF4H7.js +2 -0
- package/dist/cdn/{BBNWDMCK.js → 3XGF3ZJO.js} +1 -1
- package/dist/cdn/{4LXH3MTT.js → 3ZZ726LQ.js} +1 -1
- package/dist/cdn/{PHIGRQ7V.js → 4HPFDUTJ.js} +1 -1
- package/dist/cdn/{VPDMT4CY.js → 4QZ7WHXA.js} +1 -1
- package/dist/cdn/{SGBMDDAS.js → 55NRVFJ5.js} +1 -1
- package/dist/cdn/{5RTR3NSC.js → 5BU6XZAD.js} +1 -1
- package/dist/cdn/{4ZKGHGGU.js → 5OF3YOO7.js} +1 -1
- package/dist/cdn/5Z45KDQY.js +2 -0
- package/dist/cdn/AKKTG2RD.js +2 -0
- package/dist/cdn/{5A7H4LVR.js → AY6K2SJI.js} +1 -1
- package/dist/cdn/{JDX6K42U.js → C4UB6MNN.js} +115 -115
- package/dist/cdn/{5NPISZEN.js → C6KN2U7N.js} +1 -1
- package/dist/cdn/{XN2JVOOR.js → C7ASL3A4.js} +1 -1
- package/dist/cdn/{I33B45EZ.js → CHZWEULM.js} +1 -1
- package/dist/cdn/{NV3RC3FX.js → CWXOH2PC.js} +1 -1
- package/dist/cdn/{32YZXXMV.js → D4GI6KPZ.js} +1 -1
- package/dist/cdn/{DUZ4KXB3.js → FDE2V7FU.js} +1 -1
- package/dist/cdn/{6DCCVJMZ.js → GJTXLQOS.js} +1 -1
- package/dist/cdn/{UJLDLGTN.js → IEKNRCBC.js} +1 -1
- package/dist/cdn/{SWWDYNJE.js → IGSOHYV3.js} +1 -1
- package/dist/cdn/{KEZAVYJU.js → JJ7JB2ZP.js} +1 -1
- package/dist/cdn/{NSJAGP7T.js → JQXKQHAG.js} +2 -2
- package/dist/cdn/{FN2NSVLO.js → K6WLYYPH.js} +1 -1
- package/dist/cdn/LUZYJVG5.js +2 -0
- package/dist/cdn/{WEAC3FS7.js → NBPM6OJQ.js} +1 -1
- package/dist/cdn/{ET32EBBO.js → NXL2QN3P.js} +1 -1
- package/dist/cdn/{VHOYM5MD.js → O3SWSZQE.js} +1 -1
- package/dist/cdn/{VWPOKKOE.js → P24CZ4HM.js} +1 -1
- package/dist/cdn/{LDK4C3VJ.js → R2G4DDRZ.js} +1 -1
- package/dist/cdn/RG2D7ZRS.js +3 -0
- package/dist/cdn/{WQGGCG6M.js → SJCXI4TB.js} +1 -1
- package/dist/cdn/{QO2RC46D.js → SO3S3WP4.js} +1 -1
- package/dist/cdn/{LCERYSRG.js → U77O2MIG.js} +1 -1
- package/dist/cdn/UBLDT5XD.js +2 -0
- package/dist/cdn/VOF34LDF.js +2 -0
- package/dist/cdn/{K6PW4IX6.js → WRSVJIPA.js} +1 -1
- package/dist/cdn/{N3F6RUT6.js → X23TE3BV.js} +1 -1
- package/dist/cdn/{73YLLTLN.js → XAW6KPKL.js} +1 -1
- package/dist/cdn/YVDSW2OQ.js +2 -0
- package/dist/cdn/{B7AQR2UD.js → ZGEMIOB5.js} +1 -1
- package/dist/cdn/{JWGDDEVT.js → ZP6VPBP4.js} +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.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.en.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.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/index.js +1 -1
- package/dist/chunks/converter.js +624 -0
- package/dist/chunks/interfaces.js +22 -21
- package/dist/chunks/solution-deploy-dialog.js +91 -76
- package/dist/components/arcgis-solutions-assistant/customElement.js +7701 -8269
- package/dist/components/solution-builder-assistant/customElement.d.ts +2 -0
- package/dist/components/solution-builder-assistant/customElement.js +119 -79
- package/dist/components/solution-builder-assistant/index.js +2 -0
- package/dist/components/solution-configure-titles/customElement.js +73 -59
- package/dist/components/solution-delete-dialog/customElement.js +1 -1
- package/dist/components/solution-deploy-dialog/customElement.d.ts +3 -1
- package/dist/components/solution-deploy-dialog/customElement.js +3 -2
- package/dist/components/solution-item-accordion/customElement.d.ts +8 -2
- package/dist/components/solution-item-accordion/customElement.js +52 -25
- 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.js +25 -24
- package/dist/loader.js +2 -2
- package/dist/solutions-components_commit.txt +6 -6
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/interfaces.d.ts +4 -0
- package/package.json +1 -1
- package/dist/cdn/3O5CKVIA.js +0 -2
- package/dist/cdn/A7PEA2YP.js +0 -2
- package/dist/cdn/BRQJSGIX.js +0 -2
- package/dist/cdn/DWEIHGFT.js +0 -2
- package/dist/cdn/DX56I3QB.js +0 -3
- package/dist/cdn/EMZJJYGC.js +0 -2
- package/dist/cdn/SW3IJGVE.js +0 -2
- package/dist/cdn/ZBET72YB.js +0 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-panel";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-chip";
|
|
3
3
|
import "@esri/calcite-components/components/calcite-action";
|
|
4
|
+
import "../solution-deploy-dialog/index.js";
|
|
5
|
+
import "../solution-deploying-dialog/index.js";
|
|
4
6
|
import "@esri/calcite-components/components/calcite-icon";
|
|
5
7
|
import "@esri/calcite-components/components/calcite-table-row";
|
|
6
8
|
import "@esri/calcite-components/components/calcite-table-cell";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as
|
|
4
|
-
import { LitElement as T, createEvent as
|
|
5
|
-
import { useContextConsumer as
|
|
6
|
-
import { css as
|
|
7
|
-
import { I as
|
|
8
|
-
import { createRef as
|
|
9
|
-
import { c as
|
|
10
|
-
import * as
|
|
11
|
-
import { updateGroup as
|
|
12
|
-
import { v as
|
|
2
|
+
import { c as S } from "../../chunks/runtime.js";
|
|
3
|
+
import { u as v } from "../../chunks/useT9n.js";
|
|
4
|
+
import { LitElement as T, createEvent as m, safeClassMap as u } from "@arcgis/lumina";
|
|
5
|
+
import { useContextConsumer as D } from "@arcgis/lumina/context";
|
|
6
|
+
import { css as $, html as h } from "lit";
|
|
7
|
+
import { I as P, T as b } from "../../chunks/interfaces.js";
|
|
8
|
+
import { createRef as _, ref as p } from "lit-html/directives/ref.js";
|
|
9
|
+
import { c as V } from "../../chunks/deployAppContexts.js";
|
|
10
|
+
import * as w from "@esri/solution-common";
|
|
11
|
+
import { updateGroup as x, updateItem as g, updateItemExtended as E } from "@esri/solution-common";
|
|
12
|
+
import { v as C } from "../../chunks/validators.js";
|
|
13
13
|
import { g as W } from "../../chunks/getRelatedInfos.js";
|
|
14
|
-
const L =
|
|
14
|
+
const L = $`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`;
|
|
15
15
|
class N extends T {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(...arguments), this.open = !1, this.source = "Card Dropdown", this.solutionData = {}, this.templateInfos = [], this._saveDisabled = !1, this._displayTemplateInfos = [], this._hasNameLengthError = !1, this._nonSolutionDependencyItems = [], this._solutionItemsTitlesUpdating = !1, this._translations =
|
|
18
|
-
context:
|
|
17
|
+
super(...arguments), this.open = !1, this.source = "Card Dropdown", this.solutionData = {}, this.templateInfos = [], this._saveDisabled = !1, this._displayTemplateInfos = [], this._hasNameLengthError = !1, this._nonSolutionDependencyItems = [], this._solutionItemsTitlesUpdating = !1, this._translations = v({ name: "solution-configure-titles", blocking: !0 }), this._configContextConsumer = D({
|
|
18
|
+
context: V,
|
|
19
19
|
subscribe: !0
|
|
20
|
-
}), this._defaultPrefix = "", this._defaultSuffix = "", this._loadingDefaultPrefix = !1, this._loadingDefaultSuffix = !1, this._prefixRef =
|
|
20
|
+
}), this._defaultPrefix = "", this._defaultSuffix = "", this._loadingDefaultPrefix = !1, this._loadingDefaultSuffix = !1, this._prefixRef = _(), this._prefixValue = "", this._suffixRef = _(), this._suffixValue = "", this._templateInfos = [], this._originalTitles = [], this.solutionConfigureTitlesBeforeClose = m(), this.solutionItemsTitlesChanged = m();
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.properties = { card: 0, open: 5, source: 1, solutionData: 1, templateInfos: 0, _saveDisabled: 16, _displayTemplateInfos: 16, _hasNameLengthError: 16, _nonSolutionDependencyItems: 16, _solutionItemsTitlesUpdating: 16, _translations: 16 };
|
|
@@ -27,11 +27,11 @@ class N extends T {
|
|
|
27
27
|
}
|
|
28
28
|
async willUpdate(e) {
|
|
29
29
|
if (e.has("templateInfos") && (this._templateInfos = JSON.parse(JSON.stringify(this.templateInfos)), this._updateTemplates()), e.has("open")) {
|
|
30
|
-
const
|
|
31
|
-
if (this.open && !
|
|
32
|
-
await this._updatePrefixSuffix(), this._templateInfos = JSON.parse(JSON.stringify(this.templateInfos)), this._originalTitles = this._templateInfos.map((
|
|
33
|
-
const
|
|
34
|
-
this._nonSolutionDependencyItems =
|
|
30
|
+
const i = e.get("open");
|
|
31
|
+
if (this.open && !i) {
|
|
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 a = await W(this._configContextConsumer.value.userSession, this.card);
|
|
34
|
+
this._nonSolutionDependencyItems = a._nonSolutionDependencyItems, await this._accordionRef?.expandFirstItem();
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -42,25 +42,25 @@ class N extends T {
|
|
|
42
42
|
this._updateTemplates(), await this._updatePrefixSuffix();
|
|
43
43
|
}
|
|
44
44
|
async _updatePrefixSuffix() {
|
|
45
|
-
this.solutionData = await
|
|
45
|
+
this.solutionData = await w.getItemDataAsJson(this.card.id, this._configContextConsumer.value.userSession), this.solutionData.titles?.prefix && (this._loadingDefaultPrefix = !0, this._defaultPrefix = this.solutionData.titles.prefix, this._prefixValue = this.solutionData.titles.prefix), this.solutionData.titles?.suffix && (this._loadingDefaultSuffix = !0, this._defaultSuffix = this.solutionData.titles.suffix, this._suffixValue = this.solutionData.titles.suffix);
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return
|
|
48
|
+
return h`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${() => {
|
|
49
49
|
this.solutionConfigureTitlesBeforeClose.emit();
|
|
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 =
|
|
54
|
-
return this._saveDisabled = !
|
|
53
|
+
const e = C(this._prefixValue), i = this._hasNameLengthError && this._prefixValue.length > 0, a = e.errorType !== "special-character", t = !i, s = a ? "display-none" : "", n = t ? "display-none" : "", d = a && 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 = !a || !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(s)} 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 = [...new Set(this._nonSolutionDependencyItems.map((
|
|
58
|
-
return
|
|
59
|
-
|
|
57
|
+
const e = [...new Set(this._nonSolutionDependencyItems.map((i) => i.controlItemId))];
|
|
58
|
+
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=${e} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=rename ${p(async (i) => {
|
|
59
|
+
i && (this._accordionRef = i);
|
|
60
60
|
})}></solution-item-accordion></div>`;
|
|
61
61
|
}
|
|
62
62
|
_getDialogButtons() {
|
|
63
|
-
return
|
|
63
|
+
return h`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`;
|
|
64
64
|
}
|
|
65
65
|
_prefixInput() {
|
|
66
66
|
clearTimeout(this._textInputTimeout), this._textInputTimeout = setTimeout(() => {
|
|
@@ -73,34 +73,37 @@ class N extends T {
|
|
|
73
73
|
}, 500);
|
|
74
74
|
}
|
|
75
75
|
_updateTemplates() {
|
|
76
|
+
const e = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1, i = this._configContextConsumer.value?.authentication?.PortalUserName;
|
|
76
77
|
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));
|
|
77
|
-
const
|
|
78
|
-
this._hasNameLengthError = !1, this._displayTemplateInfos =
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
|
|
78
|
+
const a = JSON.parse(JSON.stringify(this._templateInfos));
|
|
79
|
+
this._hasNameLengthError = !1, this._displayTemplateInfos = a.map((t) => {
|
|
80
|
+
const s = this._prefixValue !== "", n = this._suffixValue !== "", d = this._defaultPrefix !== "", c = this._defaultSuffix !== "";
|
|
81
|
+
if (t.owner !== i && !e)
|
|
82
|
+
return t;
|
|
83
|
+
let l = t.title;
|
|
84
|
+
s && (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
|
+
let o = l;
|
|
86
|
+
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;
|
|
84
87
|
}), this._loadingDefaultPrefix = !1, this._loadingDefaultSuffix = !1;
|
|
85
88
|
}
|
|
86
|
-
_replaceStart(e,
|
|
87
|
-
return e.startsWith(
|
|
89
|
+
_replaceStart(e, i, a) {
|
|
90
|
+
return e.startsWith(i) ? `${a}${e.slice(i.length)}` : e;
|
|
88
91
|
}
|
|
89
|
-
_replaceAtEnd(e,
|
|
90
|
-
return e.endsWith(
|
|
92
|
+
_replaceAtEnd(e, i, a) {
|
|
93
|
+
return e.endsWith(i) ? `${e.substring(0, e.length - i.length)}${a}` : e;
|
|
91
94
|
}
|
|
92
|
-
_applyPrefixWithDuplicateCheck(e,
|
|
93
|
-
return !
|
|
95
|
+
_applyPrefixWithDuplicateCheck(e, i) {
|
|
96
|
+
return !i || e.startsWith(i) ? e : i + e;
|
|
94
97
|
}
|
|
95
|
-
_applySuffixWithDuplicateCheck(e,
|
|
96
|
-
return !
|
|
98
|
+
_applySuffixWithDuplicateCheck(e, i) {
|
|
99
|
+
return !i || e.endsWith(i) ? e : e + i;
|
|
97
100
|
}
|
|
98
101
|
_hasChanges() {
|
|
99
|
-
const e = this._defaultPrefix !== this._prefixValue,
|
|
100
|
-
return this._displayTemplateInfos.some((
|
|
101
|
-
const
|
|
102
|
-
return
|
|
103
|
-
}) || e ||
|
|
102
|
+
const e = this._defaultPrefix !== this._prefixValue, i = this._defaultSuffix !== this._suffixValue;
|
|
103
|
+
return this._displayTemplateInfos.some((t) => {
|
|
104
|
+
const s = this._originalTitles.find((n) => n.id === t.id);
|
|
105
|
+
return s && s.title !== t.title;
|
|
106
|
+
}) || e || i;
|
|
104
107
|
}
|
|
105
108
|
_closeDialog() {
|
|
106
109
|
this.open = !1;
|
|
@@ -108,7 +111,7 @@ class N extends T {
|
|
|
108
111
|
async _commitNameChanges() {
|
|
109
112
|
if (this._hasChanges()) {
|
|
110
113
|
this._telemetry?.logEvent({
|
|
111
|
-
category:
|
|
114
|
+
category: b.DEPLOYMENTS,
|
|
112
115
|
action: "Rename Items",
|
|
113
116
|
dimensions: [
|
|
114
117
|
this.card?.title || "",
|
|
@@ -117,31 +120,42 @@ class N extends T {
|
|
|
117
120
|
this.source
|
|
118
121
|
]
|
|
119
122
|
}), this._solutionItemsTitlesUpdating = !0;
|
|
120
|
-
const e = this._displayTemplateInfos.reduce((t,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
const e = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1, i = this._configContextConsumer.value?.authentication?.PortalUserName, a = this._displayTemplateInfos.reduce((t, s) => {
|
|
124
|
+
if (s.owner !== i) {
|
|
125
|
+
if (e) {
|
|
126
|
+
const n = {
|
|
127
|
+
id: s.id,
|
|
128
|
+
title: s.title
|
|
129
|
+
};
|
|
130
|
+
t.push(s.type === "Group" ? x(n, this._configContextConsumer.value.userSession) : g(n, this._configContextConsumer.value.userSession, void 0, { solutionOwner: this.card?.owner }));
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
const n = {
|
|
134
|
+
id: s.id,
|
|
135
|
+
title: s.title
|
|
136
|
+
};
|
|
137
|
+
t.push(s.type === "Group" ? x(n, this._configContextConsumer.value.userSession) : g(n, this._configContextConsumer.value.userSession, void 0, { solutionOwner: this.card?.owner }));
|
|
138
|
+
}
|
|
139
|
+
return t;
|
|
126
140
|
}, []);
|
|
127
141
|
if (this.solutionData?.templates) {
|
|
128
142
|
const t = {
|
|
129
143
|
id: this.card.id
|
|
130
|
-
},
|
|
144
|
+
}, s = {
|
|
131
145
|
...this.solutionData,
|
|
132
146
|
titles: {
|
|
133
147
|
prefix: this._prefixValue,
|
|
134
148
|
suffix: this._suffixValue
|
|
135
149
|
}
|
|
136
150
|
};
|
|
137
|
-
|
|
151
|
+
a.push(E(t, s, this._configContextConsumer.value.userSession, void 0, void 0, null, this.card?.owner));
|
|
138
152
|
}
|
|
139
|
-
await Promise.all(
|
|
153
|
+
await Promise.all(a), this._solutionItemsTitlesUpdating = !1, this.solutionItemsTitlesChanged.emit();
|
|
140
154
|
}
|
|
141
155
|
this._closeDialog();
|
|
142
156
|
}
|
|
143
157
|
}
|
|
144
|
-
|
|
158
|
+
S("solution-configure-titles", N);
|
|
145
159
|
export {
|
|
146
160
|
N as SolutionConfigureTitles
|
|
147
161
|
};
|
|
@@ -104,7 +104,7 @@ class S extends g {
|
|
|
104
104
|
this.solutionDeleteDialogBeforeClose.emit();
|
|
105
105
|
}} @calciteDialogClose=${() => {
|
|
106
106
|
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(t)} layout=inline><span tabindex=0>${this._translations.failedToDeleteItems}</span></calcite-label><solution-item-accordion class=${c(t)} .itemRelationshipDependencies=${[]} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${h(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 ${t}`}><span class="deletion-note-text" tabindex=0>${this._translations.deletionNote}</span><calcite-chip .label=${o} scale=m icon=information>${o}</calcite-chip></div><calcite-loader class=${c(e)} label></calcite-loader><solution-item-accordion class=${c(t)} .itemRelationshipDependencies=${i} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${h(this._accordion)}></solution-item-accordion></div><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonCancel}</calcite-button><calcite-button @click=${() => {
|
|
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(t)} layout=inline><span tabindex=0>${this._translations.failedToDeleteItems}</span></calcite-label><solution-item-accordion class=${c(t)} .itemRelationshipDependencies=${[]} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=delete ${h(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 ${t}`}><span class="deletion-note-text" tabindex=0>${this._translations.deletionNote}</span><calcite-chip .label=${o} scale=m icon=information>${o}</calcite-chip></div><calcite-loader class=${c(e)} label></calcite-loader><solution-item-accordion class=${c(t)} .itemRelationshipDependencies=${i} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} usage-context=delete ${h(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
108
|
this.delete();
|
|
109
109
|
}} 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
110
|
this._showDeleteError = !1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { IDeployFailed, IDeployProgressUpdate, ISolutionInfoCard, IUserOption } from "../../utils/interfaces.js";
|
|
3
|
+
import type { IDeployFailed, IDeployProgressUpdate, ISolutionDesign, ISolutionInfoCard, IUserOption } from "../../utils/interfaces.js";
|
|
4
4
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
5
|
|
|
6
6
|
export abstract class SolutionDeployDialog extends LitElement {
|
|
@@ -59,6 +59,8 @@ export abstract class SolutionDeployDialog extends LitElement {
|
|
|
59
59
|
* @default false
|
|
60
60
|
*/
|
|
61
61
|
accessor debugFailDeployment: boolean;
|
|
62
|
+
/** Builder design payload to convert into buildSolution deploy params */
|
|
63
|
+
accessor design: ISolutionDesign | null;
|
|
62
64
|
/**
|
|
63
65
|
* When true the dialog will be shown
|
|
64
66
|
*
|
|
@@ -3,8 +3,9 @@ import "../../chunks/runtime.js";
|
|
|
3
3
|
import "../../chunks/useT9n.js";
|
|
4
4
|
import "@arcgis/lumina";
|
|
5
5
|
import "@arcgis/lumina/context";
|
|
6
|
-
import { S as
|
|
6
|
+
import { S as s } from "../../chunks/solution-deploy-dialog.js";
|
|
7
7
|
import "@esri/solution-common";
|
|
8
|
+
import "../../chunks/converter.js";
|
|
8
9
|
import "../../chunks/deployAppContexts.js";
|
|
9
10
|
import "@esri/solution-deployer";
|
|
10
11
|
import "../../chunks/helpers.js";
|
|
@@ -12,5 +13,5 @@ import "../../chunks/validators.js";
|
|
|
12
13
|
import "lit";
|
|
13
14
|
import "lit/directives/ref.js";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
s as SolutionDeployDialog
|
|
16
17
|
};
|
|
@@ -11,13 +11,17 @@ export abstract class SolutionItemAccordion extends LitElement {
|
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
13
|
protected _translations: {
|
|
14
|
-
|
|
14
|
+
usedInOtherSolutionsDeleteWarning: string;
|
|
15
|
+
noPrivilegeToManage: string;
|
|
15
16
|
openDetails: string;
|
|
16
17
|
solutionsTemplates: string;
|
|
18
|
+
usedInAnotherSolution: string;
|
|
17
19
|
} & T9nMeta<{
|
|
18
|
-
|
|
20
|
+
usedInOtherSolutionsDeleteWarning: string;
|
|
21
|
+
noPrivilegeToManage: string;
|
|
19
22
|
openDetails: string;
|
|
20
23
|
solutionsTemplates: string;
|
|
24
|
+
usedInAnotherSolution: string;
|
|
21
25
|
}>;
|
|
22
26
|
/** string[]: List of items that have relationship dependencies outside of this solution */
|
|
23
27
|
accessor itemRelationshipDependencies: string[];
|
|
@@ -49,6 +53,8 @@ export abstract class SolutionItemAccordion extends LitElement {
|
|
|
49
53
|
accessor templateInfos: ITemplateInfo[];
|
|
50
54
|
/** string[]: Collection of the solutions typeKeywords */
|
|
51
55
|
accessor typeKeywords: string[];
|
|
56
|
+
/** @default 'content' */
|
|
57
|
+
accessor usageContext: "content" | "rename" | "delete";
|
|
52
58
|
/** Collapses all items in the accordion. */
|
|
53
59
|
collapseAll(): Promise<void>;
|
|
54
60
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
3
|
import { u as c } from "../../chunks/useT9n.js";
|
|
4
|
-
import { css as d, html as
|
|
5
|
-
import { LitElement as
|
|
4
|
+
import { css as d, html as o, nothing as h } from "lit";
|
|
5
|
+
import { LitElement as p, createEvent as l, safeStyleMap as u } from "@arcgis/lumina";
|
|
6
6
|
import { c as m } from "../../chunks/deployAppContexts.js";
|
|
7
|
-
import { useContextConsumer as
|
|
8
|
-
const
|
|
9
|
-
class
|
|
7
|
+
import { useContextConsumer as f } from "@arcgis/lumina/context";
|
|
8
|
+
const g = d`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`;
|
|
9
|
+
class y extends p {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.itemRelationshipDependencies = [], this.linkType = "item", this.listSelectionMode = "none", this.reuseWarning = "", this.templateInfos = [], this.typeKeywords = [], this._canDeletePermission = !1, this._sortedTemplateInfos = [], this._translations = c({ name: "solution-item-accordion", blocking: !0 }), this._configContextConsumer =
|
|
11
|
+
super(...arguments), this.itemRelationshipDependencies = [], this.linkType = "item", this.listSelectionMode = "none", this.reuseWarning = "", this.templateInfos = [], this.typeKeywords = [], this.usageContext = "content", this._canDeletePermission = !1, this._sortedTemplateInfos = [], this._translations = c({ name: "solution-item-accordion", blocking: !0 }), this._configContextConsumer = f({
|
|
12
12
|
context: m,
|
|
13
13
|
subscribe: !0
|
|
14
14
|
}), this._sortOrder = [
|
|
@@ -44,13 +44,13 @@ class f extends h {
|
|
|
44
44
|
"Report Template",
|
|
45
45
|
"Rule Package",
|
|
46
46
|
"Group"
|
|
47
|
-
], this.solutionItemHover =
|
|
47
|
+
], this.solutionItemHover = l(), this.solutionItemSelect = l(), this.solutionTypeHover = l();
|
|
48
48
|
}
|
|
49
49
|
static {
|
|
50
|
-
this.properties = { itemRelationshipDependencies: 0, linkType: 1, listSelectionMode: 1, reuseWarning: 1, templateInfos: 0, typeKeywords: 0, _canDeletePermission: 16, _sortedTemplateInfos: 16, _translations: 16 };
|
|
50
|
+
this.properties = { itemRelationshipDependencies: 0, linkType: 1, listSelectionMode: 1, reuseWarning: 1, templateInfos: 0, typeKeywords: 0, usageContext: 1, _canDeletePermission: 16, _sortedTemplateInfos: 16, _translations: 16 };
|
|
51
51
|
}
|
|
52
52
|
static {
|
|
53
|
-
this.styles =
|
|
53
|
+
this.styles = g;
|
|
54
54
|
}
|
|
55
55
|
willUpdate(e) {
|
|
56
56
|
e.has("templateInfos") && (this.hasUpdated || this.templateInfos?.length > 0) && this.templateInfosWatchHandler();
|
|
@@ -109,32 +109,32 @@ class f extends h {
|
|
|
109
109
|
}
|
|
110
110
|
_getAccordion() {
|
|
111
111
|
const e = [], i = this._sortedTemplateInfos.reduce((t, s) => {
|
|
112
|
-
const
|
|
113
|
-
return e.indexOf(
|
|
112
|
+
const n = this._getTypeForDisplay(s.type, s.typeKeywords);
|
|
113
|
+
return e.indexOf(n) < 0 && (e.push(n), t.push(this._getAccordionItem(s))), t;
|
|
114
114
|
}, []);
|
|
115
|
-
return
|
|
115
|
+
return o`<calcite-accordion class="border-override" selection-mode=single>${i}</calcite-accordion>`;
|
|
116
116
|
}
|
|
117
117
|
_getAccordionItem(e) {
|
|
118
118
|
const i = this._getTypeForDisplay(e.type, e.typeKeywords), t = this._sortedTemplateInfos.filter((s) => this._getTypeForDisplay(s.type, s.typeKeywords) === i);
|
|
119
|
-
return
|
|
119
|
+
return o`<calcite-accordion-item .heading=${`${i} (${t.length})`} @mouseenter=${() => this.solutionTypeHover.emit({ itemType: i, entering: !0 })} @mouseleave=${() => this.solutionTypeHover.emit({ itemType: i, entering: !1 })}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(t)}</calcite-accordion-item>`;
|
|
120
120
|
}
|
|
121
121
|
_getList(e) {
|
|
122
122
|
const i = this._sortTemplatesByTitle(e);
|
|
123
|
-
return
|
|
123
|
+
return o`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${i.map((t) => this._getListItem(t))}</calcite-list>`;
|
|
124
124
|
}
|
|
125
125
|
_getListItem(e) {
|
|
126
|
-
const i = this.typeKeywords.includes("Deployed") && e.url, t = this.linkType === "action"
|
|
127
|
-
return
|
|
126
|
+
const i = this.typeKeywords.includes("Deployed") && e.url, t = this.linkType === "action";
|
|
127
|
+
return o`<calcite-list-item id=${e.id ?? h} @mouseenter=${() => this.solutionItemHover.emit({ itemId: e.id, entering: !0 })} @mouseleave=${() => this.solutionItemHover.emit({ itemId: e.id, entering: !1 })} @calciteListItemSelect=${() => {
|
|
128
128
|
this._deselectOthers(e.id), this.solutionItemSelect.emit({ itemId: e.id, selected: !0 }), i && !t && window.open(e.url, "_blank");
|
|
129
|
-
}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${i && !t ? "underline" : ""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${
|
|
129
|
+
}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${i && !t ? "underline" : ""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this._checkUsageForWarnings(e)}${i && t ? o`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} @click=${() => window.open(e.url, "_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>` : null}</calcite-list-item>`;
|
|
130
130
|
}
|
|
131
131
|
_sortTemplatesByTitle(e) {
|
|
132
132
|
return e.sort((i, t) => i.title < t.title ? -1 : i.title > t.title ? 1 : 0);
|
|
133
133
|
}
|
|
134
134
|
_sortTemplates() {
|
|
135
135
|
return this.templateInfos.sort((e, i) => {
|
|
136
|
-
const t = this._getTypeForSort(e), s = this._getTypeForSort(i),
|
|
137
|
-
return
|
|
136
|
+
const t = this._getTypeForSort(e), s = this._getTypeForSort(i), n = this._sortOrder.indexOf(t), r = this._sortOrder.indexOf(s);
|
|
137
|
+
return n - r;
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
_getTypeForSort(e) {
|
|
@@ -144,16 +144,43 @@ class f extends h {
|
|
|
144
144
|
_getTypeForDisplay(e, i) {
|
|
145
145
|
let t = e;
|
|
146
146
|
if (e === "Feature Service") {
|
|
147
|
-
const s = i.indexOf("View Service") > -1,
|
|
148
|
-
t = s &&
|
|
147
|
+
const s = i.indexOf("View Service") > -1, n = i.indexOf("Table") > -1;
|
|
148
|
+
t = s && n ? "Table (hosted, view)" : n ? "Table (hosted)" : s ? "Feature Layer (hosted, view)" : "Feature Layer (hosted)";
|
|
149
149
|
}
|
|
150
150
|
return e === "Web Mapping Application" && (t = i.indexOf("configurableApp") > -1 ? "Instant App" : t), t = e === "Geoprocessing Service" ? "Tool" : t, t = e === "Feed" ? "Feed (hosted)" : t, t = e === "Real Time Analytic" ? "Real Time Analytic (hosted)" : t, t = e === "Big Data Analytic" ? "Big Data Analytic (hosted)" : t, t = e === "Vector Tile Service" ? "Tile Layer" : t, t;
|
|
151
151
|
}
|
|
152
|
-
_getWarningChip(e) {
|
|
153
|
-
return
|
|
152
|
+
_getWarningChip(e, i) {
|
|
153
|
+
return o`<calcite-chip .icon=${i === "info" ? "information" : "exclamation-mark-triangle"} kind=neutral .label=${e} scale=s slot=actions-end style=${u({ "--calcite-chip-icon-color": i === "info" ? "var(--calcite-color-status-info)" : "var(--calcite-color-status-danger)" })}>${e}</calcite-chip>`;
|
|
154
|
+
}
|
|
155
|
+
_checkUsageForWarnings(e) {
|
|
156
|
+
const i = this._configContextConsumer.value?.userSession?.username ?? null, t = this.itemRelationshipDependencies.some((s) => s === e.id);
|
|
157
|
+
if (this.usageContext === "content" && t && this.reuseWarning)
|
|
158
|
+
return this._getWarningChip(this.reuseWarning, "info");
|
|
159
|
+
if (this.usageContext === "rename") {
|
|
160
|
+
const s = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1;
|
|
161
|
+
if (e.owner !== i)
|
|
162
|
+
if (s) {
|
|
163
|
+
if (t && this.reuseWarning)
|
|
164
|
+
return this._getWarningChip(this.reuseWarning, "info");
|
|
165
|
+
} else
|
|
166
|
+
return this._getWarningChip(this._translations?.noPrivilegeToManage || "", "warn");
|
|
167
|
+
else if (t && this.reuseWarning)
|
|
168
|
+
return this._getWarningChip(this.reuseWarning, "info");
|
|
169
|
+
}
|
|
170
|
+
if (this.usageContext === "delete") {
|
|
171
|
+
if (e.owner !== i)
|
|
172
|
+
if (this._canDeletePermission) {
|
|
173
|
+
if (t)
|
|
174
|
+
return this._getWarningChip(this._translations?.usedInOtherSolutionsDeleteWarning || "", "info");
|
|
175
|
+
} else
|
|
176
|
+
return this._getWarningChip(this._translations?.noPrivilegeToManage || "", "warn");
|
|
177
|
+
else if (t)
|
|
178
|
+
return this._getWarningChip(this.reuseWarning, "info");
|
|
179
|
+
}
|
|
180
|
+
return "";
|
|
154
181
|
}
|
|
155
182
|
}
|
|
156
|
-
a("solution-item-accordion",
|
|
183
|
+
a("solution-item-accordion", y);
|
|
157
184
|
export {
|
|
158
|
-
|
|
185
|
+
y as SolutionItemAccordion
|
|
159
186
|
};
|