@esri/solutions-components 1.2.0-next.186 → 1.2.0-next.187
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/{YBZ4RYD3.js → 4N5LEYZP.js} +1 -1
- package/dist/cdn/7BDPZCCN.js +2 -0
- package/dist/cdn/{RYK5PICU.js → RZKHWRGX.js} +1 -1
- package/dist/cdn/{EERFOEDZ.js → TA7XOCI6.js} +1 -1
- package/dist/cdn/VFROSB3U.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +57 -57
- package/dist/components/solutions-all-shell/customElement.js +2 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +7 -7
- package/package.json +1 -1
- package/dist/cdn/6TJ6HIGG.js +0 -2
- package/dist/cdn/FY4GDFB5.js +0 -2
|
@@ -5,7 +5,7 @@ import { createRef as d, ref as h } from "lit-html/directives/ref.js";
|
|
|
5
5
|
import { LitElement as C, createEvent as f, safeClassMap as u, nothing as y, safeStyleMap as D } from "@arcgis/lumina";
|
|
6
6
|
import { useContextConsumer as w } from "@arcgis/lumina/context";
|
|
7
7
|
import { c as E, i as L } from "../../chunks/deployAppContexts.js";
|
|
8
|
-
import { css as R, html as
|
|
8
|
+
import { css as R, html as a } from "lit";
|
|
9
9
|
import { request as T, getWorkflowBaseURL as P, getWorkflowManagerAuthorized as A, sanitizeHTML as _, getItemDataAsJson as O, getItem as U, getPropWithDefault as $, getProp as v, setCreateProp as N } from "@esri/solution-common";
|
|
10
10
|
import { E as m, R as F, g as x, T as g, U as b, V as H, H as I, G as V, W as z, X as B, C as Y } from "../../chunks/interfaces.js";
|
|
11
11
|
import { _findExistingItem as G } from "@esri/solution-deployer";
|
|
@@ -23,8 +23,8 @@ async function K(n, e, t) {
|
|
|
23
23
|
x.VELOCITYFEEDS,
|
|
24
24
|
x.VELOCITYBIGDATA,
|
|
25
25
|
x.VELOCITYREALTIME
|
|
26
|
-
].forEach((
|
|
27
|
-
const r = t.indexOf(
|
|
26
|
+
].forEach((l) => {
|
|
27
|
+
const r = t.indexOf(l) || -1;
|
|
28
28
|
r !== -1 && t.splice(r, 1);
|
|
29
29
|
}), i = i.concat(
|
|
30
30
|
q(
|
|
@@ -61,7 +61,7 @@ async function X(n, e) {
|
|
|
61
61
|
f: "json"
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
return T(`${t}/portals/self/servers`, i).then((s) => s?.servers?.find((
|
|
64
|
+
return T(`${t}/portals/self/servers`, i).then((s) => s?.servers?.find((o) => o.serverFunction.indexOf("NotebookServer") > -1), (s) => (console.error(s), !1));
|
|
65
65
|
}
|
|
66
66
|
function Q(n) {
|
|
67
67
|
const e = n?.PortalUserSubset?.privileges, t = [
|
|
@@ -170,15 +170,15 @@ class te extends C {
|
|
|
170
170
|
}
|
|
171
171
|
render() {
|
|
172
172
|
const e = "padding-bottom-1-5", t = this._getRelatedResources(), i = this._getYouMayAlsoLikeCards();
|
|
173
|
-
return
|
|
173
|
+
return a`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="margin-top-875 padding-1-5 back-color-override-1 margin-bottom-1-5" id=solution-details-row>${this._getSolutionRow()}</div><div class=${u(e)}>${this._getScreenshotsRow()}</div><div class=${u(e)}>${this._getOverviewRow()}</div><div class=${u(e)}>${this._getReleaseNotesRow()}</div>${t.length > 0 ? a`<div class=${u(e)}>${this._getRelatedResourcesRow(t)}</div>` : ""}${i.length > 0 ? a`<div class=${u(e)}>${this._getYouMayAlsoLikeRow(i)}</div>` : ""}<div class=${u(e)}>${this._getTermsOfUseRow()}</div>${this.isMobile ? "" : a`<solution-deploy-dialog .card=${this.card} @deployCancelled=${this._handleDeployCancelled} @deployFailed=${this._handleDeployFailed} @deployProgressEnd=${this._handleDeploySuccess} @deployProgressStart=${this._deployProgressStart} @deployProgressUpdated=${this._deployProgessUpdated} id=solutionDeployDialog .userOptions=${this._userOptions} ${h(this._deployDialogRef)}></solution-deploy-dialog>`}<solution-snapshot-gallery .card=${this.card} id=solutionSnapshotGallery .itemProperties=${this._itemProperties} ${h(this._screenshotsDialogRef)}></solution-snapshot-gallery><solution-deploying-dialog .card=${this.card} @deploymentProcessCancelled=${this._handleDeploymentProcessCancelled} ${h(this._deployingDialogRef)}></solution-deploying-dialog></calcite-panel></calcite-shell>`;
|
|
174
174
|
}
|
|
175
175
|
updated() {
|
|
176
176
|
setTimeout(() => {
|
|
177
177
|
const e = this._getYouMayAlsoLikeCards();
|
|
178
178
|
let t = 340;
|
|
179
179
|
for (let i = 0; i < e.length; i++) {
|
|
180
|
-
const s = this.el.shadowRoot?.getElementById(`you-may-also-like-${i}`),
|
|
181
|
-
|
|
180
|
+
const s = this.el.shadowRoot?.getElementById(`you-may-also-like-${i}`), o = s?.offsetHeight ? s.offsetHeight + 40 : 0;
|
|
181
|
+
o > t && (t = o);
|
|
182
182
|
}
|
|
183
183
|
this._youMayAlsoLikeBaseHeight = t, this._showYouMayAlsoLikeShowMore = (this._youMayAlsoLikeElement.value?.scrollHeight || 0) > this._youMayAlsoLikeBaseHeight;
|
|
184
184
|
}, 100);
|
|
@@ -190,41 +190,41 @@ class te extends C {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
_getSolutionRow() {
|
|
193
|
-
const e = this.card?.thumbnailUrl.replace(/w=\d+/, "w=400"), t = this._missingPrivilegeMessages?.leadingMessages || [], i = t.length > 0, s = this._missingPrivilegeMessages?.bulletedMessages || [],
|
|
194
|
-
return
|
|
193
|
+
const e = this.card?.thumbnailUrl.replace(/w=\d+/, "w=400"), t = this._missingPrivilegeMessages?.leadingMessages || [], i = t.length > 0, s = this._missingPrivilegeMessages?.bulletedMessages || [], o = s.length > 0, l = this._missingPrivilegeMessages?.trailingMessages || [], r = l.length > 0;
|
|
194
|
+
return a`<div class="display-flex flex-direction-row width-full"><div class="padding-end-1-75 image-width"><img alt=${this.card?.title ?? y} src=${e ?? y}></div><div class="display-flex flex-direction-row flex-1">${this._getTextSection(i, o, r, t, s, l)}${this._getButtons()}</div></div>`;
|
|
195
195
|
}
|
|
196
|
-
_getTextSection(e, t, i, s,
|
|
197
|
-
return
|
|
196
|
+
_getTextSection(e, t, i, s, o, l) {
|
|
197
|
+
return a`<div class="display-flex flex-direction-column padding-end-1 flex-1"><div class="display-flex flex-direction-row align-items-baseline"><h1 class="padding-top-xs title-font margin-top-0 margin-bottom-1-5 line-height-1">${this.card?.title}</h1>${this.card?.categories?.some((r) => r.includes("New Release")) && a`<calcite-chip class="margin-bottom-1-5 margin-sides-1" kind=brand .label=${this._translations.newChip} scale=m icon=star>${this._translations.newChip}</calcite-chip>` || ""}</div><div class="font-1 padding-end-1 line-height-xxl">${this.card?.snippet}</div>${this.isMobile ? "" : e || t || i ? a`<div class="display-flex flex-direction-row padding-top-1">${this._getMissingPrivilegesNotice(s, o, l)}</div>` : ""}</div>`;
|
|
198
198
|
}
|
|
199
199
|
_getButtons() {
|
|
200
200
|
const e = this._itemProperties?.demoURL || "";
|
|
201
|
-
return
|
|
201
|
+
return a`<div class="display-flex flex-direction-column button-width">${!this.isMobile && a`<calcite-button class="padding-bottom-1 solution-detail-action" .disabled=${this._isDeployDisabled} icon-flip-rtl=end @click=${() => this._checkPermissionsBeforeDeploy()} scale=m>${this._showLoader ? a`<calcite-loader inline label></calcite-loader>` : this._translations.deployButton}</calcite-button>` || ""}${!this._configContextConsumer.value?.isEnterprise && e && a`<calcite-button appearance=outline-fill kind=neutral class="padding-bottom-1 solution-detail-action" @click=${() => this._handleWatchDemoClick(e)} scale=m>${this._translations.watchDemo}</calcite-button>` || ""}<calcite-button appearance=outline-fill kind=neutral class="padding-bottom-1 solution-detail-action" @click=${() => this._handleLearnMoreClick()} scale=m>${this._translations.openHelp}</calcite-button>${!this._configContextConsumer.value?.isEnterprise && a`<solution-social-share button-appearance=outline-fill class="padding-bottom-1" share-button-kind=neutral .shareButtonText=${this._translations.share} share-button-scale=m .solutionId=${this.card?.deployCommonId || ""} .solutionTitle=${this.card?.title || ""} .solutionVersion=${this.card?.deployVersion || ""}></solution-social-share>` || ""}</div>`;
|
|
202
202
|
}
|
|
203
203
|
_getMissingPrivilegesNotice(e, t, i) {
|
|
204
|
-
const s = "solutions-missing-privileges-notice",
|
|
205
|
-
return
|
|
206
|
-
this._getSpanMessages(e, "padding-bottom-1")}<span class=${`padding-bottom-1-2 ${
|
|
204
|
+
const s = "solutions-missing-privileges-notice", o = this._translations.missingPrivilegesPopup.missingLicensingOrPrivileges, l = t.length > 0 ? "" : "display-none", r = t.length > 0 ? "padding-top-sm" : "";
|
|
205
|
+
return a`<div><calcite-notice class="margin-inline-unset" kind=info open><div slot=message>${`${o}`}</div><calcite-action icon=information id=${s} slot=actions-end .text=${o}></calcite-action></calcite-notice><calcite-popover closable label overlay-positioning=fixed placement=bottom reference-element=solutions-missing-privileges-notice ${h(this._privilegePopoverRef)}><div class="padding-1 display-flex flex-direction-column">${// Leading messages
|
|
206
|
+
this._getSpanMessages(e, "padding-bottom-1")}<span class=${`padding-bottom-1-2 ${l}`}>${this._translations.missingPrivilegesPopup.missingPrivilegesListHeading}</span>${// Bulleted messages
|
|
207
207
|
this._getBulletedMessages(t)}${// Trailing messages
|
|
208
208
|
this._getSpanMessages(i, r)}</div></calcite-popover></div>`;
|
|
209
209
|
}
|
|
210
210
|
_getSpanMessages(e, t) {
|
|
211
|
-
return e.length > 0 ? e.map((i) =>
|
|
211
|
+
return e.length > 0 ? e.map((i) => a`<span class=${u(t)}>${i}</span>`) : "";
|
|
212
212
|
}
|
|
213
213
|
_getBulletedMessages(e) {
|
|
214
|
-
return e.length > 0 ?
|
|
214
|
+
return e.length > 0 ? a`<ul>${e.map((t) => a`<li>${t}</li>`)}</ul>` : "";
|
|
215
215
|
}
|
|
216
216
|
_getScreenshotsRow() {
|
|
217
217
|
const e = this._isScreenshotsRowExpanded ? this._translations.showLess : this._translations.showMore, t = this._isScreenshotsRowExpanded ? "arrow-up" : "arrow-down", i = this._showScreenshotsShowMore ? "" : "display-none";
|
|
218
|
-
return
|
|
218
|
+
return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._screenshotsAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.solutionOverview}</div><calcite-panel><div class="display-flex flex-direction-column back-color-override-1"><div class="collapsible-div max-height-300" id=screenshots-subsection ${h(this._screenshotsElement)}>${this._getScreenshots()}</div><calcite-fab appearance=outline-fill class=${`align-self-center ${i}`} .icon=${t} kind=neutral @click=${() => {
|
|
219
219
|
this._screenshotsElement.value?.classList.toggle("expanded"), this._isScreenshotsRowExpanded = this._screenshotsElement.value.classList.contains("expanded");
|
|
220
220
|
}} .text=${e} text-enabled></calcite-fab></div></calcite-panel></calcite-accordion-item></calcite-accordion>`;
|
|
221
221
|
}
|
|
222
222
|
_getScreenshots() {
|
|
223
223
|
const e = this._itemProperties?.preview.filter((i) => i.format === "image") || [], t = this._configContextConsumer.value;
|
|
224
|
-
return
|
|
225
|
-
const
|
|
226
|
-
let
|
|
227
|
-
return t.agoBasedEnterpriseSolutionsGroupId && t.isEnterprise && (
|
|
224
|
+
return a`<calcite-card-group class="card-group" .label=${this._translations.solutionOverview}>${e.reduce((i, s) => {
|
|
225
|
+
const o = I(this.card?.id || "", s.name, t.authentication);
|
|
226
|
+
let l;
|
|
227
|
+
return t.agoBasedEnterpriseSolutionsGroupId && t.isEnterprise && (l = I(this.card?.id || "", s.name, void 0, t.agolPortalUrl)), this.card?.id ? i.push(a`<calcite-card class="cursor-pointer" .label=${s.alt} @click=${() => this._openScreenshotGallery(s)} @keydown=${(r) => V(r, () => this._openScreenshotGallery(s))}><div class="card-image-wrap" slot=thumbnail><img alt=${s.alt ?? y} class="thumbnail card-image" slot=thumbnail src=${(l || o) ?? y}><div class="hover-text">${this._translations.openInGallery}</div></div></calcite-card>`) : i.push(""), i;
|
|
228
228
|
}, [])}</calcite-card-group>`;
|
|
229
229
|
}
|
|
230
230
|
_openScreenshotGallery(e) {
|
|
@@ -241,40 +241,40 @@ class te extends C {
|
|
|
241
241
|
t && (t.screenshot = e, t.open = !0);
|
|
242
242
|
}
|
|
243
243
|
_getOverviewRow() {
|
|
244
|
-
return
|
|
244
|
+
return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._overviewAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.solutionDetails}</div>${this._getDescriptionRow()}${this._getInformationProductsRow()}</calcite-accordion-item></calcite-accordion>`;
|
|
245
245
|
}
|
|
246
246
|
_getDescriptionRow() {
|
|
247
|
-
return
|
|
247
|
+
return a`<div class="display-flex flex-direction-column"><div class="font-color-2 font-1 margin-top-0 line-height-xxl padding-bottom-xxl">${this.card?.snippet}</div><div class="font-color-2 font-1 margin-top-0 line-height-xxl padding-bottom-xxl" .innerHTML=${this.card?.description ?? ""}></div></div>`;
|
|
248
248
|
}
|
|
249
249
|
_getInformationProductsRow() {
|
|
250
|
-
return
|
|
250
|
+
return a`<div class="display-flex flex-direction-column font-1 line-height-xxl font-color-2"><span>${this.card?.title ? this._translations.informationProductsSubText.replace("{{solutionTitle}}", this.card.title) : ""}</span><calcite-table bordered caption class="padding-top-1">${this._getInformationTableHeaderRow()}${this._getInformationTableRows()}</calcite-table><p>${this._translations.informationProductsFooterText}</p></div>`;
|
|
251
251
|
}
|
|
252
252
|
_getInformationTableHeaderRow() {
|
|
253
|
-
return
|
|
253
|
+
return a`<calcite-table-row slot=table-header><calcite-table-header .heading=${this._translations.solutionItem}></calcite-table-header><calcite-table-header .heading=${this._translations.description}></calcite-table-header><calcite-table-header .heading=${this._translations.minimumUserType}></calcite-table-header></calcite-table-row>`;
|
|
254
254
|
}
|
|
255
255
|
_getInformationTableRows() {
|
|
256
|
-
return (this._itemProperties?.infoProducts || []).map((t) =>
|
|
256
|
+
return (this._itemProperties?.infoProducts || []).map((t) => a`<calcite-table-row><calcite-table-cell><p class="table-cell" .innerHTML=${_(t.item) ?? ""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(t.description) ?? ""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(t.userType) ?? ""}></p></calcite-table-cell></calcite-table-row>`);
|
|
257
257
|
}
|
|
258
258
|
_getReleaseNotesRow() {
|
|
259
|
-
return
|
|
259
|
+
return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._releaseNotesAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.releaseNotes}</div><div class="display-flex flex-direction-column"><calcite-table bordered caption>${this._getReleaseNotesTableHeaderRow()}${this._getReleaseNotesTableRows()}</calcite-table></div></calcite-accordion-item></calcite-accordion>`;
|
|
260
260
|
}
|
|
261
261
|
_getReleaseNotesTableHeaderRow() {
|
|
262
|
-
return
|
|
262
|
+
return a`<calcite-table-row slot=table-header><calcite-table-header .heading=${this._translations.version}></calcite-table-header><calcite-table-header .heading=${this._translations.description}></calcite-table-header></calcite-table-row>`;
|
|
263
263
|
}
|
|
264
264
|
_getReleaseNotesTableRows() {
|
|
265
|
-
return (this._itemProperties?.releaseNotes || [])?.map((t) =>
|
|
265
|
+
return (this._itemProperties?.releaseNotes || [])?.map((t) => a`<calcite-table-row><calcite-table-cell><p class="table-cell" .innerHTML=${_(t.version) ?? ""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(t.description) ?? ""}></p></calcite-table-cell></calcite-table-row>`);
|
|
266
266
|
}
|
|
267
267
|
_getRelatedResourcesRow(e) {
|
|
268
|
-
return
|
|
269
|
-
|
|
268
|
+
return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._relatedResourcesAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.relatedResources}</div><div class="display-flex flex-direction-row">${e.map(() => {
|
|
269
|
+
a`<solution-resource-card></solution-resource-card>`;
|
|
270
270
|
})}</div></calcite-accordion-item></calcite-accordion>`;
|
|
271
271
|
}
|
|
272
272
|
_getRelatedResources() {
|
|
273
273
|
return [];
|
|
274
274
|
}
|
|
275
275
|
_getYouMayAlsoLikeRow(e) {
|
|
276
|
-
const t = this._showYouMayAlsoLikeShowMore ? "" : "display-none", i = this._isYouMayAlsoLikeRowExpanded ? this._translations.showLess : this._translations.showMore, s = this._isYouMayAlsoLikeRowExpanded ? "arrow-up" : "arrow-down",
|
|
277
|
-
return
|
|
276
|
+
const t = this._showYouMayAlsoLikeShowMore ? "" : "display-none", i = this._isYouMayAlsoLikeRowExpanded ? this._translations.showLess : this._translations.showMore, s = this._isYouMayAlsoLikeRowExpanded ? "arrow-up" : "arrow-down", o = this._isYouMayAlsoLikeRowExpanded ? "" : { height: `${this._youMayAlsoLikeBaseHeight}px` };
|
|
277
|
+
return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._youMayAlsoLikeAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.youMayAlsoLike}</div><div class="display-flex flex-direction-column"><div class="collapsible-div" id=you-may-also-like-subsection style=${D(o)} ${h(this._youMayAlsoLikeElement)}><div class="display-flex flex-direction-row"><calcite-card-group class="card-group" .label=${this._translations.youMayAlsoLike}>${e.map((l, r) => a`<solution-details-card .id=${`you-may-also-like-${r}`} .card=${l} class="padding-2px" source=you-may-also-like .referrerSolutionId=${this.card?.deployCommonId || ""} .referrerSolutionTitle=${this.card?.title || ""} .referrerSolutionVersion=${this.card?.deployVersion || ""}></solution-details-card>`)}</calcite-card-group></div></div><calcite-fab appearance=outline-fill class=${`align-self-center ${t}`} .icon=${s} kind=inverse @click=${() => {
|
|
278
278
|
this._youMayAlsoLikeElement.value?.classList.toggle("expanded"), this._isYouMayAlsoLikeRowExpanded = this._youMayAlsoLikeElement.value.classList.contains("expanded");
|
|
279
279
|
}} .text=${i} text-enabled></calcite-fab></div></calcite-accordion-item></calcite-accordion>`;
|
|
280
280
|
}
|
|
@@ -283,7 +283,7 @@ class te extends C {
|
|
|
283
283
|
return this._allCards.filter((t) => e.indexOf(t.deployCommonId) > -1);
|
|
284
284
|
}
|
|
285
285
|
_getTermsOfUseRow() {
|
|
286
|
-
return
|
|
286
|
+
return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._termsOfUseAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.termsOfUse}</div><div class="font-color-2" .innerHTML=${(this.card?.licenseInfo || "") ?? ""}></div></calcite-accordion-item></calcite-accordion>`;
|
|
287
287
|
}
|
|
288
288
|
_openDeploy() {
|
|
289
289
|
if (this._configContextConsumer.value.authentication.IsSignedIn) {
|
|
@@ -334,25 +334,25 @@ class te extends C {
|
|
|
334
334
|
async _getItemData() {
|
|
335
335
|
const e = this._configContextConsumer.value, t = e?.agoBasedEnterpriseSolutionsGroupId && e?.isEnterprise ? e.anonAgolSession : e?.userSession, i = await O(this.card.id, t), s = await U(this.card.id, t);
|
|
336
336
|
this._itemProperties = s.properties, this.itemPropertiesFetched.emit(this._itemProperties);
|
|
337
|
-
const
|
|
338
|
-
this._privileges = t.username ?
|
|
339
|
-
const
|
|
340
|
-
this._missingPrivilegeMessages = B(this._translations,
|
|
337
|
+
const o = z(i, this.card.typeKeywords, e?.authentication);
|
|
338
|
+
this._privileges = t.username ? o : [], this._userPrivileges = e?.authentication && e?.userSession ? await K(e.authentication, e.userSession, e.authentication.PortalUserPrivileges) : [];
|
|
339
|
+
const l = this._privileges.filter((p) => !this._userPrivileges.includes(p));
|
|
340
|
+
this._missingPrivilegeMessages = B(this._translations, l), this._isDeployDisabled = this._missingPrivilegeMessages && (this._missingPrivilegeMessages.leadingMessages.length > 0 || this._missingPrivilegeMessages.bulletedMessages.length > 0 || this._missingPrivilegeMessages.trailingMessages.length > 0);
|
|
341
341
|
const r = i.params ? await this.formatParams(i.params) : [];
|
|
342
342
|
this._userOptions = r, this._templates = i.templates, this.templatesFetched.emit(i.templates), this._checkUrlParametersForAutoDeployment(), this._isLoaded = !0, this._showLoader && (this._showLoader = !1, this._isDeployDisabled || this._openDeploy());
|
|
343
343
|
}
|
|
344
344
|
formatParams(e) {
|
|
345
|
-
const t = this._configContextConsumer.value.userSession, i = [], s = e ? Object.keys(e) : [],
|
|
345
|
+
const t = this._configContextConsumer.value.userSession, i = [], s = e ? Object.keys(e) : [], o = {
|
|
346
346
|
id: "",
|
|
347
347
|
props: [],
|
|
348
348
|
accordionDisplay: !1
|
|
349
349
|
};
|
|
350
350
|
if (s.length > 0) {
|
|
351
|
-
const
|
|
351
|
+
const l = [];
|
|
352
352
|
return s.forEach((r) => {
|
|
353
353
|
const p = e[r];
|
|
354
|
-
p.valueType && p.valueType.toLowerCase() === "itemid" &&
|
|
355
|
-
}), Promise.all(
|
|
354
|
+
p.valueType && p.valueType.toLowerCase() === "itemid" && l.push(this._findExistingItem(r, "Feature Service", t.username || ""));
|
|
355
|
+
}), Promise.all(l).then((r) => {
|
|
356
356
|
const p = {};
|
|
357
357
|
return r.forEach((c) => {
|
|
358
358
|
if (c.query && c.results && c.results.length > 0) {
|
|
@@ -367,8 +367,8 @@ class te extends C {
|
|
|
367
367
|
this._configureLearnMore = e[c], alert(this._configureLearnMore), delete e[c];
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
e[c].enterpriseIDMapping && (this._customDeploymentMappings[c] = e[c].enterpriseIDMapping),
|
|
371
|
-
}), i.push(
|
|
370
|
+
e[c].enterpriseIDMapping && (this._customDeploymentMappings[c] = e[c].enterpriseIDMapping), o.id = c, p[c] && (e[c].existingItemId = p[c].resultId, this.updateUserProp(e[c], p[c].response)), this.updateOption(e[c], o, c);
|
|
371
|
+
}), i.push(o), Promise.resolve(i);
|
|
372
372
|
}).catch(() => Promise.resolve([]));
|
|
373
373
|
} else
|
|
374
374
|
return Promise.resolve([]);
|
|
@@ -378,16 +378,16 @@ class te extends C {
|
|
|
378
378
|
return G(`typekeywords:source-${e} type:${t} owner:${i}`, s);
|
|
379
379
|
}
|
|
380
380
|
updateUserProp(e, t) {
|
|
381
|
-
const i = e.itemType?.toLowerCase() === "feature service", s = new RegExp(i ? this._regexFsUrl : e.itemType, "iu"),
|
|
382
|
-
return e.responseValue =
|
|
381
|
+
const i = e.itemType?.toLowerCase() === "feature service", s = new RegExp(i ? this._regexFsUrl : e.itemType, "iu"), o = $(t, i ? "url" : "type", "") || "", l = o !== "" && s.test(o);
|
|
382
|
+
return e.responseValue = l ? o : "", e.name = l && v(t, "name") || "", e.title = l && v(t, "title") || "", e.itemType = l ? v(t, "type") : e.itemType, e.validId = l, e.itemUrl = Y(t.id, this._configContextConsumer.value.authentication), l;
|
|
383
383
|
}
|
|
384
384
|
updateOption(e, t, i) {
|
|
385
|
-
const s = e.default || "",
|
|
385
|
+
const s = e.default || "", o = typeof s, l = s.toString();
|
|
386
386
|
this._setFeatureServiceProps(e);
|
|
387
|
-
const r = this.getValidation(e,
|
|
387
|
+
const r = this.getValidation(e, l);
|
|
388
388
|
t.props.push({
|
|
389
389
|
id: i,
|
|
390
|
-
outType:
|
|
390
|
+
outType: o,
|
|
391
391
|
prop: i,
|
|
392
392
|
itemType: e.itemType || "",
|
|
393
393
|
responseValue: e.responseValue || "",
|
|
@@ -395,10 +395,10 @@ class te extends C {
|
|
|
395
395
|
choices: e.choices || [],
|
|
396
396
|
valueType: e.valueType.toLowerCase(),
|
|
397
397
|
attributes: e.attributes || {},
|
|
398
|
-
value: e.existingItemId && e.valueType.toLowerCase() === "itemid" ? e.existingItemId :
|
|
399
|
-
default:
|
|
400
|
-
srSearchText:
|
|
401
|
-
autoSelect:
|
|
398
|
+
value: e.existingItemId && e.valueType.toLowerCase() === "itemid" ? e.existingItemId : l,
|
|
399
|
+
default: l,
|
|
400
|
+
srSearchText: l,
|
|
401
|
+
autoSelect: l !== "",
|
|
402
402
|
...r,
|
|
403
403
|
loading: !1,
|
|
404
404
|
validId: !0,
|
|
@@ -412,9 +412,9 @@ class te extends C {
|
|
|
412
412
|
e.valueType && e.valueType.toLowerCase() === "itemid" && N(e, "attributes.required", "true");
|
|
413
413
|
}
|
|
414
414
|
getValidation(e, t) {
|
|
415
|
-
let i = "", s = v(e, "validation.message") || "",
|
|
416
|
-
return v(e, "attributes.required") === "true" && (i = $(e, "validation.expression", "\\S{1,}"),
|
|
417
|
-
valid:
|
|
415
|
+
let i = "", s = v(e, "validation.message") || "", o = !0;
|
|
416
|
+
return v(e, "attributes.required") === "true" && (i = $(e, "validation.expression", "\\S{1,}"), o = new RegExp(i).test(t)), e.valueType && e.valueType.toLowerCase() === "itemid" && (i = this._regexID, s = this._translations.configure.invalidID), {
|
|
417
|
+
valid: o,
|
|
418
418
|
validation: {
|
|
419
419
|
expression: i,
|
|
420
420
|
message: s
|
|
@@ -9,7 +9,7 @@ import { c as b, i as y } from "../../chunks/deployAppContexts.js";
|
|
|
9
9
|
import { e as o, d as c, T as d } from "../../chunks/interfaces.js";
|
|
10
10
|
import { createRef as h, ref as r } from "lit/directives/ref.js";
|
|
11
11
|
import "../solutions-filter-panel/customElement.js";
|
|
12
|
-
const v = m`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;padding-inline-start:var(--calcite-spacing-md);font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-lg)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@media(max-width:800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-3);--calcite-panel-background-color: var(--calcite-color-foreground-3)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs)}.position-relative{position:relative}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.padding-top-3{padding-top:3px}`;
|
|
12
|
+
const v = m`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;padding-inline-start:var(--calcite-spacing-md);font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-lg)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@media(max-width:800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-3);--calcite-panel-background-color: var(--calcite-color-foreground-3)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs)}.position-relative{position:relative}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.padding-top-3{padding-top:3px}.responsive-chip .chip-text{white-space:nowrap}@media(max-width:800px){.responsive-chip{max-width:100%}.responsive-chip .chip-text{white-space:normal;overflow-wrap:anywhere}}`;
|
|
13
13
|
class x extends g {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(), this.solutionsCount = 0, this._isLoading = !0, this._filterOpen = !0, this._filters = {
|
|
@@ -75,7 +75,7 @@ class x extends g {
|
|
|
75
75
|
if (!this._filters.categories)
|
|
76
76
|
return;
|
|
77
77
|
const e = this._filters.categories.filter((t) => t.type === "industry" || t.type === "domain");
|
|
78
|
-
return e.length > 0 ? p(e, (t) => `${t.type}:${t.value}`, (t) => s`<calcite-chip appearance=outline-fill class="padding-start" closable kind=neutral .label=${t.displayValue} @calciteChipClose=${() => this._chipClosed(t.displayValue, t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`) : void 0;
|
|
78
|
+
return e.length > 0 ? p(e, (t) => `${t.type}:${t.value}`, (t) => s`<calcite-chip appearance=outline-fill class="padding-start responsive-chip" closable kind=neutral .label=${t.displayValue} @calciteChipClose=${() => this._chipClosed(t.displayValue, t.type)} .value=${t.displayValue}><span class="chip-text">${t.displayValue}</span></calcite-chip>`) : void 0;
|
|
79
79
|
}
|
|
80
80
|
_updateSolutionCount(e) {
|
|
81
81
|
this.solutionsCount = e.detail;
|