@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
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { u
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { useContextConsumer as
|
|
7
|
-
import { c as
|
|
8
|
-
import { T as
|
|
9
|
-
import { c as
|
|
10
|
-
import { h as
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { c as p } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as m, html as r } from "lit";
|
|
4
|
+
import { u } from "../../chunks/useT9n.js";
|
|
5
|
+
import { LitElement as f, createEvent as g, nothing as n, safeClassMap as y } from "@arcgis/lumina";
|
|
6
|
+
import { useContextConsumer as v } from "@arcgis/lumina/context";
|
|
7
|
+
import { c as b } from "../../chunks/deployAppContexts.js";
|
|
8
|
+
import { T as x } from "../../chunks/interfaces.js";
|
|
9
|
+
import { c as $ } from "../../chunks/cardsHelpers.js";
|
|
10
|
+
import { h as C } from "../../chunks/helpers.js";
|
|
11
|
+
import * as _ from "@esri/solution-common";
|
|
12
|
+
const S = m`calcite-card{height:100%;padding-bottom:2px;border:2px solid transparent;transition:border-color .1s ease;box-sizing:border-box}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{border-color:var(--calcite-color-brand);cursor:pointer}.chip-status{--calcite-chip-icon-color: var(--calcite-color-brand);cursor:pointer}.chip-deployed{--calcite-chip-icon-color: var(--calcite-color-status-success)}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:1.2rem}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:.5rem;margin-bottom:.7rem}.info-icon{--calcite-icon-color: var(--calcite-color-text-inverse);padding-inline-end:.3rem}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}a{text-decoration:none;color:inherit;outline:0;padding:0;margin:0;display:inherit;height:100%}`;
|
|
13
|
+
class w extends f {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(...arguments), this.referrerSolutionId = "", this.referrerSolutionTitle = "", this.referrerSolutionVersion = "", this.source = "all-solutions", this._translations =
|
|
15
|
-
context:
|
|
15
|
+
super(...arguments), this.referrerSolutionId = "", this.referrerSolutionTitle = "", this.referrerSolutionVersion = "", this.source = "all-solutions", this._deployedTooltipContent = "", this._translations = u({ name: "solution-details-card", blocking: !0 }), this._configContextConsumer = v({
|
|
16
|
+
context: b,
|
|
16
17
|
subscribe: !0
|
|
17
|
-
}), this.detailsCardSelected =
|
|
18
|
+
}), this.detailsCardSelected = g();
|
|
18
19
|
}
|
|
19
20
|
static {
|
|
20
|
-
this.properties = { card: 0, referrerSolutionId: 1, referrerSolutionTitle: 1, referrerSolutionVersion: 1, source: 1, _translations: 16 };
|
|
21
|
+
this.properties = { card: 0, referrerSolutionId: 1, referrerSolutionTitle: 1, referrerSolutionVersion: 1, source: 1, _deployedTooltipContent: 16, _translations: 16 };
|
|
21
22
|
}
|
|
22
23
|
static {
|
|
23
|
-
this.styles =
|
|
24
|
+
this.styles = S;
|
|
24
25
|
}
|
|
25
26
|
get _telemetry() {
|
|
26
27
|
return this._configContextConsumer.value?.telemetrySession;
|
|
27
28
|
}
|
|
28
29
|
render() {
|
|
29
|
-
const e =
|
|
30
|
-
return
|
|
30
|
+
const e = $(this.card.title);
|
|
31
|
+
return r`<a href=${e ?? n} @click=${this._anchorClick} tabindex=-1 .title=${`${this._translations.arcgisSolutions} | ${this.card.title}`}>${this._renderCard()}</a>`;
|
|
31
32
|
}
|
|
32
33
|
_anchorClick(e) {
|
|
33
34
|
e.preventDefault();
|
|
34
35
|
}
|
|
35
36
|
_cardSelected() {
|
|
36
37
|
if (this.source === "you-may-also-like") {
|
|
37
|
-
const
|
|
38
|
+
const i = [
|
|
38
39
|
this.referrerSolutionTitle,
|
|
39
40
|
this.referrerSolutionId,
|
|
40
41
|
this.referrerSolutionVersion,
|
|
@@ -43,26 +44,41 @@ class C extends u {
|
|
|
43
44
|
this.card?.deployVersion || ""
|
|
44
45
|
];
|
|
45
46
|
this._telemetry?.logEvent({
|
|
46
|
-
category:
|
|
47
|
+
category: x.SOLUTION_DETAILS,
|
|
47
48
|
action: "Related Solution",
|
|
48
|
-
dimensions:
|
|
49
|
+
dimensions: i
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
this.detailsCardSelected.emit(this.card);
|
|
52
53
|
}
|
|
53
54
|
_renderChips(e) {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
}),
|
|
55
|
+
const i = e.filter((t) => t === "deployed" || t === "deployedOlderVersion"), d = e.filter((t) => t !== "deployed" && t !== "deployedOlderVersion"), c = [];
|
|
56
|
+
return d.forEach((t) => {
|
|
57
|
+
const l = "chip-status", o = `solution-details-card-chip-${t}`, a = t === "new" ? "star" : "mega-phone", s = t === "new" ? this._translations.newSolution : this._translations.updated;
|
|
58
|
+
c.push(r`<calcite-chip class=${y(l)} .icon=${a} id=${o ?? n} .label=${s} .value=${s} scale=s></calcite-chip><calcite-tooltip .referenceElement=${o}><span>${s}</span></calcite-tooltip>`);
|
|
59
|
+
}), i.length > 0 && c.push(r`<calcite-chip class="chip-deployed" .icon=${i[0] === "deployedOlderVersion" ? "recent" : "check-circle"} id=solution-details-card-chip-deployed .label=${this._translations.deployed} .value=${this._translations.deployed} scale=s></calcite-chip><calcite-tooltip placement=bottom reference-element=solution-details-card-chip-deployed @calciteTooltipBeforeOpen=${async () => {
|
|
60
|
+
const t = {
|
|
61
|
+
q: `${this.card?.deployCommonId} and owner:${this._configContextConsumer.value?.userSession?.username}`,
|
|
62
|
+
authentication: this._configContextConsumer.value?.userSession,
|
|
63
|
+
pagingParam: { start: 1, num: 100 }
|
|
64
|
+
}, l = await _.searchItems(t);
|
|
65
|
+
console.log(l), this._deployedTooltipContent = r`<solutions-deployed-list .cards=${l.results.map((o) => {
|
|
66
|
+
const a = o.typeKeywords?.find((h) => h.startsWith("solutionversion-")), s = a ? a.split("-")[1] : "unknown";
|
|
67
|
+
return {
|
|
68
|
+
id: o.id,
|
|
69
|
+
title: o.title,
|
|
70
|
+
deployVersion: s,
|
|
71
|
+
created: o.created
|
|
72
|
+
};
|
|
73
|
+
})} .listTitle=${i[0] === "deployedOlderVersion" ? this._translations.deployedPreviousTitle : this._translations.deployedTitle}></solutions-deployed-list>`;
|
|
74
|
+
}}>${this._deployedTooltipContent}</calcite-tooltip>`), c;
|
|
59
75
|
}
|
|
60
76
|
_renderCard() {
|
|
61
77
|
const e = this.card;
|
|
62
|
-
return
|
|
78
|
+
return r`<calcite-card .label=${e.snippet} @click=${this._cardSelected} @keydown=${(i) => C(i, () => this._cardSelected())}><div class="card-image-wrap" slot=thumbnail><img alt=${e.title ?? n} class="thumbnail card-image" src=${e.thumbnailUrl ?? n}><div class="hover-text">${this._translations.viewDetails}</div></div><calcite-label slot=heading class="header-line-height" scale=l>${e.title}</calcite-label><p slot=description class="font-color-text-2 font-line-height font-size-size--1">${e.snippet}</p>${e.chips && e.chips.length > 0 ? r`<div slot=footer-end style="display: flex; gap: 0.5rem; justify-content: flex-end;">${this._renderChips(e.chips)}</div>` : void 0}<div slot=footer-start></div></calcite-card>`;
|
|
63
79
|
}
|
|
64
80
|
}
|
|
65
|
-
|
|
81
|
+
p("solution-details-card", w);
|
|
66
82
|
export {
|
|
67
|
-
|
|
83
|
+
w as SolutionDetailsCard
|
|
68
84
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@esri/calcite-components/components/calcite-chip";
|
|
2
2
|
import "@esri/calcite-components/components/calcite-tooltip";
|
|
3
|
+
import "../solutions-deployed-list/index.js";
|
|
3
4
|
import "@esri/calcite-components/components/calcite-card";
|
|
4
5
|
import "@esri/calcite-components/components/calcite-label";
|
|
5
6
|
export * from "./customElement.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { ISolutionItemHover, ISolutionItemSelected, ISolutionTypeHover, ITemplateInfo } from "../../utils/interfaces.js";
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
|
+
import type { DependencyItem } from "../../utils/getRelatedInfos.js";
|
|
4
5
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
6
|
|
|
6
7
|
export abstract class SolutionItemAccordion extends LitElement {
|
|
@@ -23,8 +24,8 @@ export abstract class SolutionItemAccordion extends LitElement {
|
|
|
23
24
|
solutionsTemplates: string;
|
|
24
25
|
usedInAnotherSolution: string;
|
|
25
26
|
}>;
|
|
26
|
-
/**
|
|
27
|
-
accessor itemRelationshipDependencies:
|
|
27
|
+
/** DependencyItem[]: List of items that have relationship dependencies outside of this solution */
|
|
28
|
+
accessor itemRelationshipDependencies: DependencyItem[];
|
|
28
29
|
/**
|
|
29
30
|
* 'action' | 'item': Specifies the type of link that will be used for deployed items.
|
|
30
31
|
* 'item' the items title will be underlined and clicking anywhere on the list item will open the items details page
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as
|
|
4
|
-
import { css as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { c as
|
|
7
|
-
import { useContextConsumer as
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { c as m } from "../../chunks/runtime.js";
|
|
3
|
+
import { u as g } from "../../chunks/useT9n.js";
|
|
4
|
+
import { css as y, html as o, nothing as f } from "lit";
|
|
5
|
+
import { LitElement as _, createEvent as r, safeStyleMap as T } from "@arcgis/lumina";
|
|
6
|
+
import { c as v } from "../../chunks/deployAppContexts.js";
|
|
7
|
+
import { useContextConsumer as x } from "@arcgis/lumina/context";
|
|
8
|
+
import * as w from "@esri/solution-common";
|
|
9
|
+
const $ = y`: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)}`;
|
|
10
|
+
class S extends _ {
|
|
10
11
|
constructor() {
|
|
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 =
|
|
12
|
-
context:
|
|
12
|
+
super(...arguments), this.itemRelationshipDependencies = [], this.linkType = "item", this.listSelectionMode = "none", this.reuseWarning = "", this.templateInfos = [], this.typeKeywords = [], this.usageContext = "content", this._canDeletePermission = !1, this._dependencyTooltipContent = "", this._sortedTemplateInfos = [], this._translations = g({ name: "solution-item-accordion", blocking: !0 }), this._configContextConsumer = x({
|
|
13
|
+
context: v,
|
|
13
14
|
subscribe: !0
|
|
14
15
|
}), this._sortOrder = [
|
|
15
16
|
"Hub Site Application",
|
|
@@ -44,13 +45,13 @@ class y extends p {
|
|
|
44
45
|
"Report Template",
|
|
45
46
|
"Rule Package",
|
|
46
47
|
"Group"
|
|
47
|
-
], this.solutionItemHover =
|
|
48
|
+
], this.solutionItemHover = r(), this.solutionItemSelect = r(), this.solutionTypeHover = r();
|
|
48
49
|
}
|
|
49
50
|
static {
|
|
50
|
-
this.properties = { itemRelationshipDependencies: 0, linkType: 1, listSelectionMode: 1, reuseWarning: 1, templateInfos: 0, typeKeywords: 0, usageContext: 1, _canDeletePermission: 16, _sortedTemplateInfos: 16, _translations: 16 };
|
|
51
|
+
this.properties = { itemRelationshipDependencies: 0, linkType: 1, listSelectionMode: 1, reuseWarning: 1, templateInfos: 0, typeKeywords: 0, usageContext: 1, _canDeletePermission: 16, _dependencyTooltipContent: 16, _sortedTemplateInfos: 16, _translations: 16 };
|
|
51
52
|
}
|
|
52
53
|
static {
|
|
53
|
-
this.styles =
|
|
54
|
+
this.styles = $;
|
|
54
55
|
}
|
|
55
56
|
willUpdate(e) {
|
|
56
57
|
e.has("templateInfos") && (this.hasUpdated || this.templateInfos?.length > 0) && this.templateInfosWatchHandler();
|
|
@@ -124,7 +125,7 @@ class y extends p {
|
|
|
124
125
|
}
|
|
125
126
|
_getListItem(e) {
|
|
126
127
|
const i = this.typeKeywords.includes("Deployed") && e.url, t = this.linkType === "action";
|
|
127
|
-
return o`<calcite-list-item id=${e.id ??
|
|
128
|
+
return o`<calcite-list-item id=${e.id ?? f} @mouseenter=${() => this.solutionItemHover.emit({ itemId: e.id, entering: !0 })} @mouseleave=${() => this.solutionItemHover.emit({ itemId: e.id, entering: !1 })} @calciteListItemSelect=${() => {
|
|
128
129
|
this._deselectOthers(e.id), this.solutionItemSelect.emit({ itemId: e.id, selected: !0 }), i && !t && window.open(e.url, "_blank");
|
|
129
130
|
}} .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
131
|
}
|
|
@@ -133,8 +134,8 @@ class y extends p {
|
|
|
133
134
|
}
|
|
134
135
|
_sortTemplates() {
|
|
135
136
|
return this.templateInfos.sort((e, i) => {
|
|
136
|
-
const t = this._getTypeForSort(e), s = this._getTypeForSort(i), n = this._sortOrder.indexOf(t),
|
|
137
|
-
return n -
|
|
137
|
+
const t = this._getTypeForSort(e), s = this._getTypeForSort(i), n = this._sortOrder.indexOf(t), a = this._sortOrder.indexOf(s);
|
|
138
|
+
return n - a;
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
_getTypeForSort(e) {
|
|
@@ -149,38 +150,54 @@ class y extends p {
|
|
|
149
150
|
}
|
|
150
151
|
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
152
|
}
|
|
152
|
-
_getWarningChip(e, i) {
|
|
153
|
-
|
|
153
|
+
_getWarningChip(e, i, t, s) {
|
|
154
|
+
const n = i === "info" ? "var(--calcite-color-status-info)" : "var(--calcite-color-status-danger)";
|
|
155
|
+
return o`<div slot=actions-end><calcite-chip .icon=${i === "info" ? "information" : "exclamation-mark-triangle"} .id=${t + "-warning"} kind=neutral .label=${e} scale=s style=${T({ "--calcite-chip-icon-color": n, cursor: s && s.length > 0 ? "pointer" : "default" })}>${e}</calcite-chip>${s && s.length > 0 ? o`<calcite-popover auto-close class=solution-list-item-content .label=${`${t}-warning`} placement=bottom .referenceElement=${`${t}-warning`} scale=s @calcitePopoverBeforeOpen=${async () => {
|
|
156
|
+
const p = {
|
|
157
|
+
q: s.map((l) => `id:${l.dependencyItemId}`).join(" OR "),
|
|
158
|
+
authentication: this._configContextConsumer.value?.userSession,
|
|
159
|
+
pagingParam: { start: 1, num: 100 }
|
|
160
|
+
}, c = await w.searchItems(p);
|
|
161
|
+
console.log(c), this._dependencyTooltipContent = o`<solutions-deployed-list .cards=${c.results.map((l) => {
|
|
162
|
+
const d = l.typeKeywords?.find((u) => u.startsWith("solutionversion-")), h = d ? d.split("-")[1] : "unknown";
|
|
163
|
+
return {
|
|
164
|
+
id: l.id,
|
|
165
|
+
title: l.title,
|
|
166
|
+
deployVersion: h,
|
|
167
|
+
created: l.created
|
|
168
|
+
};
|
|
169
|
+
})}></solutions-deployed-list>`;
|
|
170
|
+
}}>${this._dependencyTooltipContent}</calcite-popover>` : null}</div>`;
|
|
154
171
|
}
|
|
155
172
|
_checkUsageForWarnings(e) {
|
|
156
|
-
const i = this._configContextConsumer.value?.userSession?.username ?? null, t = this.itemRelationshipDependencies.
|
|
157
|
-
if (this.usageContext === "content" &&
|
|
158
|
-
return this._getWarningChip(this.reuseWarning, "info");
|
|
173
|
+
const i = this._configContextConsumer.value?.userSession?.username ?? null, t = this.itemRelationshipDependencies.filter((n) => n.controlItemId === e.id), s = t.length > 0;
|
|
174
|
+
if (this.usageContext === "content" && s && this.reuseWarning)
|
|
175
|
+
return this._getWarningChip(this.reuseWarning, "info", e.id, t);
|
|
159
176
|
if (this.usageContext === "rename") {
|
|
160
|
-
const
|
|
177
|
+
const n = this._configContextConsumer.value?.authentication?.CanUpdateSolution ?? !1;
|
|
161
178
|
if (e.owner !== i)
|
|
162
|
-
if (
|
|
163
|
-
if (
|
|
164
|
-
return this._getWarningChip(this.reuseWarning, "info");
|
|
179
|
+
if (n) {
|
|
180
|
+
if (s && this.reuseWarning)
|
|
181
|
+
return this._getWarningChip(this.reuseWarning, "info", e.id, t);
|
|
165
182
|
} else
|
|
166
|
-
return this._getWarningChip(this._translations?.noPrivilegeToManage || "", "warn");
|
|
167
|
-
else if (
|
|
168
|
-
return this._getWarningChip(this.reuseWarning, "info");
|
|
183
|
+
return this._getWarningChip(this._translations?.noPrivilegeToManage || "", "warn", e.id);
|
|
184
|
+
else if (s && this.reuseWarning)
|
|
185
|
+
return this._getWarningChip(this.reuseWarning, "info", e.id, t);
|
|
169
186
|
}
|
|
170
187
|
if (this.usageContext === "delete") {
|
|
171
188
|
if (e.owner !== i)
|
|
172
189
|
if (this._canDeletePermission) {
|
|
173
|
-
if (
|
|
174
|
-
return this._getWarningChip(this._translations?.usedInOtherSolutionsDeleteWarning || "", "info");
|
|
190
|
+
if (s)
|
|
191
|
+
return this._getWarningChip(this._translations?.usedInOtherSolutionsDeleteWarning || "", "info", e.id);
|
|
175
192
|
} else
|
|
176
|
-
return this._getWarningChip(this._translations?.noPrivilegeToManage || "", "warn");
|
|
177
|
-
else if (
|
|
178
|
-
return this._getWarningChip(this.reuseWarning, "info");
|
|
193
|
+
return this._getWarningChip(this._translations?.noPrivilegeToManage || "", "warn", e.id);
|
|
194
|
+
else if (s)
|
|
195
|
+
return this._getWarningChip(this.reuseWarning, "info", e.id, t);
|
|
179
196
|
}
|
|
180
197
|
return "";
|
|
181
198
|
}
|
|
182
199
|
}
|
|
183
|
-
|
|
200
|
+
m("solution-item-accordion", S);
|
|
184
201
|
export {
|
|
185
|
-
|
|
202
|
+
S as SolutionItemAccordion
|
|
186
203
|
};
|
|
@@ -6,4 +6,6 @@ import "@esri/calcite-components/components/calcite-list-item";
|
|
|
6
6
|
import "@esri/calcite-components/components/calcite-action";
|
|
7
7
|
import "@esri/calcite-components/components/calcite-tooltip";
|
|
8
8
|
import "@esri/calcite-components/components/calcite-chip";
|
|
9
|
+
import "../solutions-deployed-list/index.js";
|
|
10
|
+
import "@esri/calcite-components/components/calcite-popover";
|
|
9
11
|
export * from "./customElement.js";
|
|
@@ -100,24 +100,24 @@ class F extends S {
|
|
|
100
100
|
} else if (this.sortType === "suggested" && this._relatedSolutions.size > 0 && this._deployedSolutions?.cards?.length) {
|
|
101
101
|
const s = /* @__PURE__ */ new Map();
|
|
102
102
|
for (const o of t) {
|
|
103
|
-
const
|
|
104
|
-
(!
|
|
103
|
+
const n = s.get(o.deployCommonId), r = Number(o.deployVersion);
|
|
104
|
+
(!n || r > n) && s.set(o.deployCommonId, r);
|
|
105
105
|
}
|
|
106
106
|
const a = this._deployedSolutions.cards.filter((o) => {
|
|
107
|
-
const
|
|
108
|
-
return
|
|
107
|
+
const n = s.get(o.deployCommonId);
|
|
108
|
+
return n !== void 0 && Number(o.deployVersion) >= n;
|
|
109
109
|
}), l = new Set(a.map((o) => o.deployCommonId));
|
|
110
|
-
this._relatedSolutions = new Set([...this._relatedSolutions].filter((o) => !l.has(o))), t.sort((o,
|
|
111
|
-
const
|
|
112
|
-
return
|
|
110
|
+
this._relatedSolutions = new Set([...this._relatedSolutions].filter((o) => !l.has(o))), t.sort((o, n) => {
|
|
111
|
+
const r = this._relatedSolutions.has(o.deployCommonId), h = this._relatedSolutions.has(n.deployCommonId);
|
|
112
|
+
return r && !h ? -1 : !r && h ? 1 : 0;
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
const i = t.map((s) => {
|
|
116
116
|
const a = s.categories.indexOf("/Categories/New Release") > -1, l = s.categories.indexOf("/Categories/Updated") > -1;
|
|
117
|
-
let o = !1,
|
|
118
|
-
this._deployedSolutions && (o = this._isSolutionDeployed(s.deployCommonId),
|
|
119
|
-
const
|
|
120
|
-
return a ?
|
|
117
|
+
let o = !1, n = !0;
|
|
118
|
+
this._deployedSolutions && (o = this._isSolutionDeployed(s.deployCommonId), n = this._isLatestVersion(s));
|
|
119
|
+
const r = [];
|
|
120
|
+
return a ? r.push("new") : l && r.push("updated"), o && (n ? r.push("deployed") : r.push("deployedOlderVersion")), s.chips = r.length > 0 ? r : void 0, s.supportReuse = o ? !!(o && !n) : !0, s;
|
|
121
121
|
});
|
|
122
122
|
return this._allCards.length === 0 && e?.cards && (this._allCards = e?.cards, this._deployedSolutions && (this._relatedSolutions = b(this._deployedSolutions.cards, this._allCards))), this.cardsFetched.emit(i.length), this._isLoading = !1, i;
|
|
123
123
|
} else
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
|
+
|
|
5
|
+
export abstract class SolutionsDeployedList extends LitElement {
|
|
6
|
+
/**
|
|
7
|
+
* Contains the translations for this component.
|
|
8
|
+
* All UI strings should be defined here.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
protected _translations: { deployedVersion: string; } & T9nMeta<{ deployedVersion: string; }>;
|
|
13
|
+
/** All the solution cards */
|
|
14
|
+
accessor cards: SolutionItemMiniContext[];
|
|
15
|
+
/**
|
|
16
|
+
* The title to display
|
|
17
|
+
*
|
|
18
|
+
* @default ''
|
|
19
|
+
*/
|
|
20
|
+
accessor listTitle: string;
|
|
21
|
+
/** Emitted on demand when cards are fetched */
|
|
22
|
+
readonly deployedCardsClicked: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
23
|
+
readonly "@eventTypes": {
|
|
24
|
+
deployedCardsClicked: SolutionsDeployedList["deployedCardsClicked"]["detail"];
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type SolutionItemMiniContext = {
|
|
29
|
+
id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
deployVersion: string;
|
|
32
|
+
created: number;
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import { c as i } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as s, html as t, svg as a } from "lit";
|
|
4
|
+
import { u as l } from "../../chunks/useT9n.js";
|
|
5
|
+
import { LitElement as n, createEvent as o } from "@arcgis/lumina";
|
|
6
|
+
import { c as r } from "../../chunks/deployAppContexts.js";
|
|
7
|
+
import { useContextConsumer as d } from "@arcgis/lumina/context";
|
|
8
|
+
const c = s`.text-center{text-align:center}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex;align-items:center}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.padding-10{padding:10px}.padding-y-10{padding-top:10px;padding-bottom:10px}.subnote{font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}`;
|
|
9
|
+
class h extends n {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this.cards = [], this.listTitle = "", this._translations = l({ name: "solutions-deployed-list", blocking: !0 }), this._configContextConsumer = d({
|
|
12
|
+
context: r,
|
|
13
|
+
subscribe: !0
|
|
14
|
+
}), this.deployedCardsClicked = o();
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.properties = { cards: 0, listTitle: 1, _translations: 16 };
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.styles = c;
|
|
21
|
+
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
super.disconnectedCallback();
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return this.cards.length ? t`${this.listTitle !== "" && t`<div>${this.listTitle}</div>` || ""}${this._renderCards()}` : t`<div class="no-solutions"></div>`;
|
|
27
|
+
}
|
|
28
|
+
_renderCards() {
|
|
29
|
+
return this.cards.map((e) => t`<div class="display-flex flex-direction-row"><div class=padding-10>${this._getSolutionsBriefcase()}</div><div class=padding-10><div><a href=${"/apps/solutions/deployments/" + e.id} target="=_blank">${e.title}</a></div><div class="subnote">${`${this._translations.deployedVersion} ${e.deployVersion} - ${new Date(e.created).toLocaleDateString(this._configContextConsumer.value?.locale, { year: "numeric", month: "long", day: "numeric" })}`}</div></div></div>`);
|
|
30
|
+
}
|
|
31
|
+
_getSolutionsBriefcase() {
|
|
32
|
+
return t`<div slot=header-actions-start><svg viewBox="0 0 64 64" width=24 height=24 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-1)>${a`<path d="M10.723 54.9h6.409a7.896 7.896 0 0 0 13.736 0h23.896a4.137 4.137 0 0 0 4.136-4.136l-.004-32.446a3.222 3.222 0 0 0-3.217-3.219l-10.779.064V9.836A3.741 3.741 0 0 0 41.163 6.1H23.837A3.741 3.741 0 0 0 20.1 9.836l.067 5.264-10.8.004A3.275 3.275 0 0 0 6.1 18.37L6.096 26a.893.893 0 0 0 .263.636.907.907 0 0 0 .638.263l5.902-.014.013-5.985 38.781.01a.407.407 0 0 1 .407.407l.008 22.925a2.858 2.858 0 0 1-2.857 2.858H30.868a7.896 7.896 0 0 0-13.736 0H12.9v-5.2a.801.801 0 0 0-.8-.8H6.9a.801.801 0 0 0-.8.8l-.001 8.375a4.59 4.59 0 0 0 1.353 3.27 4.658 4.658 0 0 0 3.27 1.355zM6.9 41.9h5.2v6h5.51l.112-.213a7.098 7.098 0 0 1 12.556 0l.113.213h18.86a3.683 3.683 0 0 0 2.587-1.071 3.635 3.635 0 0 0 1.071-2.587L52.9 21.317a1.208 1.208 0 0 0-1.207-1.207l-38.867-.01a.714.714 0 0 0-.714.712l-.011 5.275-5.106.012.001.4-.1-.499.003-7.628a2.471 2.471 0 0 1 2.468-2.469l10.8-.003a.734.734 0 0 0 .733-.733v-5.33A2.94 2.94 0 0 1 23.837 6.9h17.326A2.94 2.94 0 0 1 44.1 9.836v5.327a.734.734 0 0 0 .733.733l10.846.003a2.421 2.421 0 0 1 2.417 2.419l.004 32.446a3.337 3.337 0 0 1-3.336 3.336H30.39l-.113.213a7.098 7.098 0 0 1-12.556 0l-.113-.213h-6.886a3.85 3.85 0 0 1-2.704-1.12 3.796 3.796 0 0 1-1.12-2.705zm17.1 13a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm10-6a7.918 7.918 0 0 0 7.349-5h4.818a.734.734 0 0 0 .733-.733v-4.334a.734.734 0 0 0-.733-.733h-4.818a7.9 7.9 0 0 0-14.698 0H5.833a.734.734 0 0 0-.733.733v4.334a.734.734 0 0 0 .733.733h20.818a7.918 7.918 0 0 0 7.349 5zm-28.167-10h21.378l.095-.266a7.1 7.1 0 0 1 13.388 0l.095.266 5.31-.066.068 4.266h-5.378l-.095.266a7.1 7.1 0 0 1-13.388 0l-.095-.266-21.31.066zM34 37.9a3.9 3.9 0 1 0-3.9-3.9 3.905 3.905 0 0 0 3.9 3.9zm0-7a3.1 3.1 0 1 1-3.1 3.1 3.103 3.103 0 0 1 3.1-3.1zm5.658-20.8H25.342a1.244 1.244 0 0 0-1.242 1.242V15.9h16.8v-4.558a1.244 1.244 0 0 0-1.242-1.242zm.442 5H24.9v-3.758a.443.443 0 0 1 .442-.442h14.316a.443.443 0 0 1 .442.442z" />`}</svg></div>`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
i("solutions-deployed-list", h);
|
|
36
|
+
export {
|
|
37
|
+
h as SolutionsDeployedList
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|