@arcgis/portal-components 6.0.0-next.40 → 6.0.0-next.41
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/{GG6U75ZA.js → 2GIECQ25.js} +1 -1
- package/dist/cdn/{75CT6IMW.js → 2N6K2UUQ.js} +1 -1
- package/dist/cdn/{RTZ2TKM5.js → 36DGXQLJ.js} +1 -1
- package/dist/cdn/{47DKAGRV.js → 3HXQ5Z4C.js} +1 -1
- package/dist/cdn/{KPZGBBDG.js → 3SG67WP5.js} +1 -1
- package/dist/cdn/3ZVDEJPF.js +2 -0
- package/dist/cdn/42AN66SK.js +2 -0
- package/dist/cdn/{6APPSZ7E.js → 4E354KKM.js} +1 -1
- package/dist/cdn/{4VLEUN7I.js → 67FEZD25.js} +1 -1
- package/dist/cdn/{7J22VLBO.js → 6GPAZV4Z.js} +1 -1
- package/dist/cdn/{DT4HGMLS.js → 6XDKSVRF.js} +1 -1
- package/dist/cdn/{N3WRMPM6.js → 6ZYYG64M.js} +1 -1
- package/dist/cdn/{SYXCSFIA.js → 7AG3E7K6.js} +1 -1
- package/dist/cdn/7JDXAVUG.js +2 -0
- package/dist/cdn/{3KGSWW6B.js → 7JKFWVCY.js} +1 -1
- package/dist/cdn/{AZTAWZI5.js → AJEQETRW.js} +1 -1
- package/dist/cdn/{W3JJBZYX.js → AP7UWD4P.js} +1 -1
- package/dist/cdn/CERDMRFQ.js +2 -0
- package/dist/cdn/{UIK6LPA7.js → DFECUYNW.js} +1 -1
- package/dist/cdn/{2574FNAZ.js → DGWOMELT.js} +1 -1
- package/dist/cdn/{LEESUFWE.js → DIWTHL4N.js} +1 -1
- package/dist/cdn/{FFL2L4X5.js → DKUOQCHO.js} +1 -1
- package/dist/cdn/{FIAEPK5L.js → DQL2JT6K.js} +1 -1
- package/dist/cdn/{RKHNP3KL.js → EETYTFHH.js} +1 -1
- package/dist/cdn/FINVGL3V.js +2 -0
- package/dist/cdn/{RXMM6CFK.js → FXXFSYNB.js} +1 -1
- package/dist/cdn/{6AHPTR2E.js → GA4OWLSO.js} +1 -1
- package/dist/cdn/{43A74S72.js → GHDMQJG4.js} +1 -1
- package/dist/cdn/{GZ4ONSFV.js → GY4SY4XC.js} +1 -1
- package/dist/cdn/{OQ2JULON.js → H4TPPTVB.js} +1 -1
- package/dist/cdn/{TP7V25GT.js → IQPJOVDL.js} +1 -1
- package/dist/cdn/{IAWL475A.js → IWPJEUHY.js} +1 -1
- package/dist/cdn/{XVV75AX3.js → JDW7ECBF.js} +1 -1
- package/dist/cdn/{DENQY4OE.js → JGTBDGJ7.js} +1 -1
- package/dist/cdn/{SLK7PV62.js → LVWAYUYZ.js} +1 -1
- package/dist/cdn/{YYVLFAFT.js → ME6XACY6.js} +1 -1
- package/dist/cdn/{P3FFM322.js → N5AG34NK.js} +1 -1
- package/dist/cdn/{JIU6MBGB.js → ODYYTLLQ.js} +1 -1
- package/dist/cdn/{XCOP6QHA.js → OQBLBDR5.js} +1 -1
- package/dist/cdn/{ZG7OW456.js → OWODUQF2.js} +1 -1
- package/dist/cdn/{W6WVMRGQ.js → PM33STYQ.js} +1 -1
- package/dist/cdn/{XE3DCC5D.js → PUHZVFK7.js} +1 -1
- package/dist/cdn/{SUN4MBT3.js → QXPDVHB5.js} +1 -1
- package/dist/cdn/{ZLNBCJE4.js → R45EMSQJ.js} +1 -1
- package/dist/cdn/{RJXIU4GH.js → RDRSZQAR.js} +1 -1
- package/dist/cdn/{X7W4VJO7.js → SGV47YVU.js} +1 -1
- package/dist/cdn/{C7SNE6YG.js → TQX5BOZG.js} +1 -1
- package/dist/cdn/{FTKSVLDI.js → U2J4ST45.js} +1 -1
- package/dist/cdn/{5M25PCH2.js → U3V7PPC2.js} +1 -1
- package/dist/cdn/{LTD5KLLE.js → UCHX4CBR.js} +1 -1
- package/dist/cdn/{5RBH3LGK.js → UCTXRTQZ.js} +1 -1
- package/dist/cdn/UWB23CG4.js +2 -0
- package/dist/cdn/{IOF72CDU.js → VABNHOVG.js} +1 -1
- package/dist/cdn/{OPI4P6VO.js → W6U2HMEK.js} +1 -1
- package/dist/cdn/{LUJGCYQY.js → XSEFGIVV.js} +1 -1
- package/dist/cdn/{7ZU43BL6.js → YCMZ3RVZ.js} +1 -1
- package/dist/cdn/{ZDH4KVAV.js → ZOOEWYFB.js} +1 -1
- package/dist/cdn/assets/portal-item-card/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/portal.js +12 -8
- package/dist/chunks/query.js +1 -1
- package/dist/components/arcgis-portal-item-card/customElement.d.ts +11 -0
- package/dist/components/arcgis-portal-item-card/customElement.js +81 -52
- package/dist/components/arcgis-portal-item-card/index.js +2 -0
- package/dist/components/arcgis-portal-navigation/customElement.d.ts +4 -0
- package/dist/components/arcgis-portal-navigation/customElement.js +265 -264
- package/dist/components/arcgis-portal-navigation/index.js +4 -4
- package/dist/components/arcgis-portal-navigation/types.d.ts +3 -0
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
- package/dist/components/arcgis-portal-review-layer-sharing/customElement.js +1 -1
- 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/loader.js +1 -1
- package/dist/types/item.d.ts +4 -0
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +8 -8
- package/dist/cdn/3DOZPC3W.js +0 -2
- package/dist/cdn/46MYBPSS.js +0 -2
- package/dist/cdn/66VV7NHO.js +0 -2
- package/dist/cdn/A5QLPZ57.js +0 -2
- package/dist/cdn/G272JPUS.js +0 -2
- package/dist/cdn/IGLODZPX.js +0 -2
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { formatDate as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { createRef as
|
|
7
|
-
import { u as
|
|
2
|
+
import { c as R } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as U, html as r } from "lit";
|
|
4
|
+
import { formatDate as I, substitute as v } from "@arcgis/core/intl.js";
|
|
5
|
+
import { LitElement as B, createEvent as h, safeClassMap as l, nothing as u } from "@arcgis/lumina";
|
|
6
|
+
import { createRef as S, ref as T } from "lit/directives/ref.js";
|
|
7
|
+
import { u as F } from "../../chunks/useT9n.js";
|
|
8
8
|
import { b as C } from "../../chunks/ui.js";
|
|
9
9
|
import { a as E } from "../../chunks/functionalities.js";
|
|
10
|
-
import { g as
|
|
10
|
+
import { g as N } from "../../chunks/items.js";
|
|
11
|
+
import { c as D } from "../../chunks/portal.js";
|
|
11
12
|
import { g as z } from "../../chunks/url.js";
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
function M(f) {
|
|
14
|
+
return {
|
|
15
|
+
"10.7": "1.0",
|
|
16
|
+
"10.7.0": "1.0",
|
|
17
|
+
"10.7.1": "2.0",
|
|
18
|
+
"10.8": "3.0",
|
|
19
|
+
"10.8.0": "3.0",
|
|
20
|
+
"10.8.1": "4.0"
|
|
21
|
+
}[f] || f;
|
|
22
|
+
}
|
|
23
|
+
const O = U`:host{display:block;min-width:0;container-type:inline-size;container-name:portal-item-card}.item-card{position:relative;display:flex;min-height:100%;flex-direction:column;color:var(--calcite-color-text-1);opacity:0;box-shadow:none;transition-duration:.15s;outline-color:transparent;background-color:var(--calcite-color-foreground-1);transition-property:background-color,outline,outline-offset,opacity;border:1px solid var(--calcite-color-border-3);&:focus{z-index:10;outline:2px solid var(--calcite-color-brand);outline-offset:-2px}}.item-card--loaded{opacity:1}.item-card--selected{border-color:var(--calcite-color-brand)}.item-card--previewed{outline:1px solid var(--calcite-color-brand);outline-offset:-2px}.item-card--hoverable{cursor:pointer}.item-card--disabled{opacity:.5;pointer-events:none}.item-card__upper{flex:1 1 0%;background-color:var(--calcite-color-foreground-1);transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s}.item-card__upper:hover{background-color:var(--calcite-color-background)}.item-card__upper--link{color:var(--calcite-color-text-1);text-decoration-line:none;outline-color:transparent;&:focus{z-index:10;outline:2px solid var(--calcite-color-brand);outline-offset:2px}}.item-card__upper:hover .item-card__hover-text,.item-card:focus .item-card__hover-text{opacity:1}.item-card__top{padding:.75rem}.item-card__content{display:flex;min-width:0;flex:1 1 0%;flex-direction:column}.item-card__content-end{min-width:0;margin-block-start:.25rem}.item-card__title{margin:0;overflow-wrap:break-word;padding:0;font-size:.875rem;font-weight:500;line-height:1.375}.item-card__title--grid{font-size:.875rem}.item-card__title--padded{margin-bottom:.25rem}.item-card__title__span{position:relative;display:inline;border-style:none;background-color:transparent;padding:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;background-image:linear-gradient(transparent,transparent);background-position-x:0%,100%;background-position-y:min(1.25em,100%);background-repeat:no-repeat,no-repeat;background-size:100% 1px,100% 1px}.item-card--previewed .item-card__title__span,.item-card__upper--link:hover .item-card__title__span{background-image:linear-gradient(var(--calcite-color-text-3),var(--calcite-color-text-3))}.item-card__summary{margin:0;flex:1 1 0%;color:var(--calcite-color-text-2);display:none;overflow-wrap:break-word;padding:0;font-size:.875rem;line-height:1.25}.item-card__detail--updated-full.item-card__divider{display:none}.item-card__details{margin-block-start:.25rem;display:flex;flex-direction:row}.item-card__detail{font-size:.75rem;line-height:1.35;color:var(--calcite-color-text-2)}.item-card__divider{display:flex;align-items:center;flex:0 0 auto}.item-card__divider:not([empty]):before{content:"";height:1.25rem;width:1px;background-color:var(--calcite-color-border-1);margin-inline:.75rem}.item-card__divider:first-child:before{display:none}.item-card__thumbnail{margin:0;width:5rem;height:3.5rem;margin-inline-start:.5rem;flex:0 0 auto;overflow:hidden;border-radius:.125rem}.item-card__thumbnail--grid{position:relative;width:100%;height:auto;aspect-ratio:16 / 9;margin:0;margin-inline-start:0;border-radius:0;border-bottom:1px solid var(--calcite-color-foreground-2)}.item-card__thumbnail-image{width:100%;height:100%;object-fit:cover;display:block}.item-card__thumbnail-media{display:block;width:100%;height:100%}.item-card__thumbnail-fallback{width:100%;height:100%;background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-3);display:flex;align-items:center;justify-content:center}.item-card__hover-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;color:var(--calcite-color-foreground-1);background-color:var(--calcite-color-transparent-scrim);font-size:.75rem;font-weight:500;text-align:center;transition:opacity var(--calcite-animation-timing) ease-in-out}.item-card__badges{display:flex;flex-wrap:wrap}.item-card__badges--compact{max-width:100%}.item-card__badges--responsive{display:none}.item-card__notebook-runtime-wrap{margin-block-start:.375rem;display:flex;gap:var(--calcite-space-sm);align-items:center}.item-card__notebook-runtime-info{font-size:.875rem;line-height:1rem}.item-card__notebook-runtime-retired-warning{--calcite-icon-color: var(--calcite-color-status-danger)}.item-card__notebook-runtime-outdated-warning{--calcite-icon-color: var(--calcite-color-status-warning)}.item-card__footer{margin-top:auto;display:flex;align-items:center;background-color:var(--calcite-color-foreground-1);padding:.25rem .75rem;border-top:1px solid var(--calcite-color-border-3)}.item-card__footer__start{display:flex;min-width:0;flex:1 1 0%;align-items:center;overflow:hidden;width:100%;margin-inline-end:.75rem}.item-card__footer__start--owner{margin-inline-start:-.25rem}.item-card__profile-wrap{max-width:100%;padding:.25rem}.item-card__owner{min-width:0}.item-card__footer-divider{height:1.25rem;width:1px;margin-inline:.75rem;background-color:var(--calcite-color-border-input)}.item-card__preview-button{margin-inline-end:.5rem}.item-card__footer arcgis-portal-item-favorite,.item-card__footer arcgis-portal-item-actions{display:inline-flex;align-items:center}.item-card__access-wrap{display:flex;align-items:center}.item-card-flex{display:flex}.item-card-flex-1{min-width:0;flex:1 1 0%}.item-card__input{margin-inline-end:1rem;margin-top:.125rem}.item-card__title+.item-card__input{margin-inline-start:1rem;margin-inline-end:0}.item-card__input--compact{height:100%;display:flex;align-items:center}.item-card-item-type{min-width:0}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}@container portal-item-card (max-width: 320px){.item-card__title,.item-card__title--grid{font-size:.75rem}.item-card:not(.item-card--grid) .item-card__thumbnail{width:3.4375rem;margin-inline-start:.75rem}.item-card__footer__start{margin-inline-end:.5rem}.item-card__detail--updated-short{display:none}}@container portal-item-card (min-width: 321px) and (max-width: 480px){.item-card__title{font-size:.875rem}}@container portal-item-card (min-width: 481px){.item-card__top{padding:1rem}.item-card__title{font-size:1.125rem}.item-card__title--padded{margin-bottom:.5rem}.item-card__detail{font-size:.875rem}.item-card__footer{padding:.5rem 1rem}.item-card:not(.item-card--grid) .item-card__thumbnail{width:8rem;margin-inline-start:2rem}.item-card__summary{display:block}}@container portal-item-card (min-width: 641px){.item-card__badges--compact{display:none}.item-card__badges--responsive{display:flex}.item-card__summary{display:block}.item-card__footer{flex-wrap:nowrap;gap:0}.item-card__footer__start{width:auto;margin-inline-end:.75rem}.item-card__detail--updated-short{display:none}.item-card__detail--updated-full.item-card__divider{display:flex}.item-card:not(.item-card--grid) .item-card__thumbnail{height:4rem}}`;
|
|
24
|
+
class W extends B {
|
|
14
25
|
constructor() {
|
|
15
|
-
super(), this.messages =
|
|
26
|
+
super(), this.messages = F({ blocking: !0 }), this.sectionEl = S(), this.linkEl = S(), this.notebookRuntimeTooltipId = `portal-item-card-runtime-${Math.random().toString(36).slice(2, 10)}`, this.handleCardClick = (e) => {
|
|
16
27
|
if (!(this.link || this.disabled || e?.target?.closest(".item-card__footer"))) {
|
|
17
28
|
if (this.preview === "top" && !this.recycleBin) {
|
|
18
29
|
this.arcgisItemBrowserCardPreview.emit(this.item);
|
|
@@ -26,11 +37,11 @@ class H extends U {
|
|
|
26
37
|
}
|
|
27
38
|
}, this.isLoaded = !1, this.cardWidth = 0, this.selected = !1, this.selection = "none", this.selectedItems = [], this.allowedGeometries = [], this.view = "list", this.previewed = !1, this.showOwner = !0, this.showDateUpdated = !0, this.showItemType = !0, this.showItemTypeHosted = !1, this.showSummary = !1, this.showBadges = !0, this.showBadgeTooltips = !0, this.showFavorite = !1, this.showFavoriteInActionsMenu = !1, this.showAccess = !1, this.showThumbnail = !0, this.useProduction = !1, this.newTab = !1, this.disableSelection = !1, this.disabled = !1, this.actions = [], this.recycleBin = !1, this.arcgisItemBrowserCardPreview = h(), this.arcgisItemCardActionsOpen = h(), this.arcgisItemCardInternalUIAction = h(), this.arcgisItemCardSelect = h(), this.arcgisItemCardSelectError = h(), this.manager.onLifecycle(() => {
|
|
28
39
|
let e;
|
|
29
|
-
const i = new ResizeObserver(([
|
|
40
|
+
const i = new ResizeObserver(([a]) => {
|
|
30
41
|
e !== void 0 && (cancelAnimationFrame(e), e = void 0);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
e = void 0, this.cardWidth =
|
|
42
|
+
const o = a.contentRect.width;
|
|
43
|
+
o > 0 && o !== this.cardWidth && (e = requestAnimationFrame(() => {
|
|
44
|
+
e = void 0, this.cardWidth = o;
|
|
34
45
|
}));
|
|
35
46
|
});
|
|
36
47
|
return i.observe(this.el), () => {
|
|
@@ -39,13 +50,13 @@ class H extends U {
|
|
|
39
50
|
});
|
|
40
51
|
}
|
|
41
52
|
static {
|
|
42
|
-
this.properties = { isLoaded: 16, cardWidth: 16, item: 0, user: 0, portal: 0, selected: 7, selection: 1, selectedItems: 0, allowedGeometries: 0, view: 1, preview: 1, previewed: 5, name: 1, showOwner: 5, showDateUpdated: 5, showItemType: 5, showItemTypeHosted: 5, showSummary: 5, showBadges: 5, showBadgeTooltips: 5, showFavorite: 5, showFavoriteInActionsMenu: 5, showAccess: 5, groups: 0, userGroups: 0, showThumbnail: 5, useProduction: 5, link: 1, linkHandler: 0, newTab: 5, disableSelection: 5, disabled: 7, userPopupZIndex: 9, actions: 0, recycleBin: 5, hideActionsStart: 5 };
|
|
53
|
+
this.properties = { isLoaded: 16, cardWidth: 16, item: 0, user: 0, portal: 0, selected: 7, selection: 1, selectedItems: 0, allowedGeometries: 0, view: 1, preview: 1, previewed: 5, name: 1, showOwner: 5, showDateUpdated: 5, showItemType: 5, showItemTypeHosted: 5, showSummary: 5, showBadges: 5, showBadgeTooltips: 5, notebookRuntimeStatus: 1, showFavorite: 5, showFavoriteInActionsMenu: 5, showAccess: 5, groups: 0, userGroups: 0, showThumbnail: 5, useProduction: 5, link: 1, linkHandler: 0, newTab: 5, disableSelection: 5, disabled: 7, userPopupZIndex: 9, actions: 0, recycleBin: 5, hideActionsStart: 5 };
|
|
43
54
|
}
|
|
44
55
|
static {
|
|
45
56
|
this.styles = O;
|
|
46
57
|
}
|
|
47
58
|
get sourceJSON() {
|
|
48
|
-
return
|
|
59
|
+
return N(this.item);
|
|
49
60
|
}
|
|
50
61
|
get sublayerSelection() {
|
|
51
62
|
return this.selection === "multiple-sublayer" ? "multiple" : this.selection === "single-sublayer" ? "single" : void 0;
|
|
@@ -63,8 +74,8 @@ class H extends U {
|
|
|
63
74
|
});
|
|
64
75
|
}
|
|
65
76
|
getMessage(e, i = "") {
|
|
66
|
-
const
|
|
67
|
-
return typeof
|
|
77
|
+
const a = this.messages[e];
|
|
78
|
+
return typeof a == "string" ? a : i;
|
|
68
79
|
}
|
|
69
80
|
getResolvedBaseUrl() {
|
|
70
81
|
return this.portal ? z({ portal: this.portal }) : "";
|
|
@@ -73,25 +84,25 @@ class H extends U {
|
|
|
73
84
|
this.requestUpdate();
|
|
74
85
|
}
|
|
75
86
|
renderUpdatedDetails(e) {
|
|
76
|
-
return r`<span class="item-card__detail item-card__detail--updated-short item-card__divider">${
|
|
77
|
-
date:
|
|
87
|
+
return r`<span class="item-card__detail item-card__detail--updated-short item-card__divider">${I(e, { dateStyle: "medium" })}</span><span class="item-card__detail item-card__detail--updated-full item-card__divider">${v(this.messages.lastUpdated ?? "", {
|
|
88
|
+
date: I(e, { dateStyle: "medium" })
|
|
78
89
|
})}</span>`;
|
|
79
90
|
}
|
|
80
91
|
renderSelectionInput(e, i = !1) {
|
|
81
|
-
const { selection:
|
|
92
|
+
const { selection: a, disableSelection: o, name: w, messages: _, item: c } = this, d = {
|
|
82
93
|
"item-card__input": !0,
|
|
83
94
|
"item-card__input--compact": i
|
|
84
95
|
};
|
|
85
|
-
switch (
|
|
96
|
+
switch (a) {
|
|
86
97
|
case "single":
|
|
87
|
-
return r`<calcite-radio-button class=${d
|
|
88
|
-
|
|
98
|
+
return r`<calcite-radio-button class=${l(d)} .checked=${e} .disabled=${o} .value=${c.title ?? ""} .name=${w} @click=${(s) => {
|
|
99
|
+
s.stopPropagation();
|
|
89
100
|
}} @calciteRadioButtonChange=${() => {
|
|
90
101
|
this.selected = !0, this.arcgisItemCardSelect.emit({ item: c, selected: !0 });
|
|
91
|
-
}}><span class="screen-readers-only">${v(
|
|
102
|
+
}}><span class="screen-readers-only">${v(_.select ?? "", { title: c.title ?? "" })}</span></calcite-radio-button>`;
|
|
92
103
|
case "multiple":
|
|
93
|
-
return r`<calcite-checkbox class=${d
|
|
94
|
-
|
|
104
|
+
return r`<calcite-checkbox class=${l(d)} .checked=${e} .disabled=${o} @click=${(s) => {
|
|
105
|
+
s.stopPropagation(), s.preventDefault();
|
|
95
106
|
}} @calciteCheckboxChange=${() => {
|
|
96
107
|
this.selected = !e, this.arcgisItemCardSelect.emit({ item: c, selected: !e });
|
|
97
108
|
}}><span class="screen-readers-only">${c.title ?? ""}</span></calcite-checkbox>`;
|
|
@@ -100,7 +111,7 @@ class H extends U {
|
|
|
100
111
|
case "single-sublayer":
|
|
101
112
|
return null;
|
|
102
113
|
default:
|
|
103
|
-
return E(
|
|
114
|
+
return E(a);
|
|
104
115
|
}
|
|
105
116
|
}
|
|
106
117
|
renderThumbnail(e, i) {
|
|
@@ -119,54 +130,72 @@ class H extends U {
|
|
|
119
130
|
renderBadges() {
|
|
120
131
|
return !this.showBadges || !this.item || !this.portal ? null : this.view === "grid" ? r`<arcgis-portal-item-badges class="item-card__badges item-card__divider" .item=${this.item} .portal=${this.portal} .user=${this.user} scale=s appearance=outline-fill .showTooltips=${this.showBadgeTooltips} width=narrow></arcgis-portal-item-badges>` : r`<arcgis-portal-item-badges class="item-card__badges item-card__badges--compact item-card__divider" .item=${this.item} .portal=${this.portal} .user=${this.user} scale=s appearance=outline-fill .showTooltips=${this.showBadgeTooltips} width=narrow></arcgis-portal-item-badges><arcgis-portal-item-badges class="item-card__badges item-card__badges--responsive item-card__divider" .item=${this.item} .portal=${this.portal} .user=${this.user} scale=s appearance=outline-fill .showTooltips=${this.showBadgeTooltips} width=full></arcgis-portal-item-badges>`;
|
|
121
132
|
}
|
|
133
|
+
renderNotebookRuntime() {
|
|
134
|
+
const e = this.sourceJSON, i = e?.properties?.notebookRuntimeName, a = e?.properties?.notebookRuntimeVersion, o = [
|
|
135
|
+
i,
|
|
136
|
+
a ? M(a) : void 0
|
|
137
|
+
].filter(Boolean).join(" - ");
|
|
138
|
+
return o ? r`<span class="item-card__notebook-runtime-info">${o}</span>` : null;
|
|
139
|
+
}
|
|
140
|
+
renderNotebookRuntimeWarning() {
|
|
141
|
+
const { notebookRuntimeStatus: e } = this;
|
|
142
|
+
if (e !== "retired" && e !== "outdated")
|
|
143
|
+
return null;
|
|
144
|
+
const i = e === "retired", a = this.portal.isPortal && D(this.portal), o = i ? this.getMessage("retiredRuntimeWarning", "This notebook uses a retired runtime. Update the runtime before opening.") : this.getMessage(a ? "outdatedRuntimeWarningK8s" : "outdatedRuntimeWarning", a ? "This notebook uses a runtime that is no longer in general availability and will not receive further software updates or patches. Update the runtime before opening." : "New runtimes are available. Update notebook runtime to access the latest features and improvements.");
|
|
145
|
+
return r`<calcite-tooltip placement=top class="calcite-mode-dark" .referenceElement=${this.notebookRuntimeTooltipId}>${o}</calcite-tooltip><calcite-icon class=${l({
|
|
146
|
+
"item-card__notebook-runtime-warning": !0,
|
|
147
|
+
"item-card__notebook-runtime-retired-warning": i,
|
|
148
|
+
"item-card__notebook-runtime-outdated-warning": !i
|
|
149
|
+
})} icon=exclamation-mark-triangle id=${this.notebookRuntimeTooltipId ?? u} scale=s .textLabel=${o}></calcite-icon>`;
|
|
150
|
+
}
|
|
122
151
|
render() {
|
|
123
|
-
const { item: e, portal: i, user:
|
|
152
|
+
const { item: e, portal: i, user: a, selection: o, isLoaded: w, disabled: _, link: c, newTab: d } = this;
|
|
124
153
|
if (!e || !i || !this.messages._lang)
|
|
125
154
|
return;
|
|
126
|
-
const
|
|
127
|
-
return r`<section class=${
|
|
155
|
+
const s = this.sourceJSON, g = s.modified || e.modified, n = this.view === "grid", b = this.sublayerSelection, m = b ? this.selectedItems.some((t) => ("item" in t ? t.item.id : t.id) === e.id) : this.selected, $ = this.preview === "action" && !this.recycleBin, y = this.actions.length > 0 || this.showFavoriteInActionsMenu, k = this.showFavorite && !this.showFavoriteInActionsMenu && !this.useProduction && !!a, A = y || k || $, P = (this.showAccess || n && this.showOwner) && A, p = this.preview === "top" && !c;
|
|
156
|
+
return r`<section class=${l({
|
|
128
157
|
"item-card": !0,
|
|
129
|
-
"item-card--grid":
|
|
130
|
-
"item-card--hoverable":
|
|
158
|
+
"item-card--grid": n,
|
|
159
|
+
"item-card--hoverable": o !== "none",
|
|
131
160
|
"item-card--selected": m,
|
|
132
|
-
"item-card--disabled":
|
|
133
|
-
"item-card--loaded":
|
|
161
|
+
"item-card--disabled": _,
|
|
162
|
+
"item-card--loaded": w,
|
|
134
163
|
"item-card--previewed": this.previewed && p
|
|
135
|
-
})} @click=${c ? void 0 : this.handleCardClick} .tabIndex=${p ? 0 : -1} .role=${p ? "button" : void 0} aria-haspopup=${(p ? "dialog" : void 0) ??
|
|
164
|
+
})} @click=${c ? void 0 : this.handleCardClick} .tabIndex=${p ? 0 : -1} .role=${p ? "button" : void 0} aria-haspopup=${(p ? "dialog" : void 0) ?? u} @keydown=${(t) => {
|
|
136
165
|
!p || t.target !== t.currentTarget || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.handleCardClick());
|
|
137
|
-
}} ${
|
|
166
|
+
}} ${T(this.sectionEl)}><slot name=content-top></slot>${c ? r`<a class="item-card__upper item-card__upper--link" href=${c ?? u} target=${(d ? "_blank" : void 0) ?? u} rel=${(d ? "noopener noreferrer" : void 0) ?? u} @click=${(t) => {
|
|
138
167
|
if (this.linkHandler && !t.ctrlKey && !t.metaKey) {
|
|
139
168
|
t.preventDefault(), this.linkHandler(this.item);
|
|
140
169
|
return;
|
|
141
170
|
}
|
|
142
171
|
const x = t.target;
|
|
143
172
|
x instanceof HTMLElement && x.closest(".item-card__footer") && t.preventDefault();
|
|
144
|
-
}} ${
|
|
173
|
+
}} ${T(this.linkEl)}>${r`${n && this.renderThumbnail(e, !0) || ""}<div class="item-card-flex item-card__top">${!n && this.renderSelectionInput(m, !0) || ""}<div class="item-card-flex-1"><div class="item-card-flex"><div class="item-card__content"><div class="item-card-flex"><h3 class=${l({
|
|
145
174
|
"item-card__title": !0,
|
|
146
|
-
"item-card__title--grid":
|
|
147
|
-
"item-card__title--padded": this.showItemType || this.showSummary && !!
|
|
175
|
+
"item-card__title--grid": n,
|
|
176
|
+
"item-card__title--padded": this.showItemType || this.showSummary && !!s.snippet,
|
|
148
177
|
"item-card-flex-1": !0
|
|
149
|
-
})}><span class="item-card__title__span">${
|
|
178
|
+
})}><span class="item-card__title__span">${s.title ?? e.title ?? ""}</span></h3>${n && this.renderSelectionInput(m) || ""}</div>${this.showSummary && !!s.snippet && r`<p class="item-card__summary">${s.snippet.length > 250 ? `${s.snippet.substring(0, 250)}...` : s.snippet}</p>` || ""}<div class="item-card__details">${this.showItemType && r`<arcgis-portal-item-type class="item-card__divider item-card-item-type" ellipsis .user=${a} .showHosted=${this.showItemTypeHosted} scale=s .item=${e} .portal=${i}></arcgis-portal-item-type>` || ""}${this.showDateUpdated && !!g && this.renderUpdatedDetails(g) || ""}${this.renderBadges()}</div>${e.type === "Notebook" && r`<div class="item-card__notebook-runtime-wrap">${this.renderNotebookRuntime()}${this.renderNotebookRuntimeWarning()}</div>` || ""}</div>${!n && this.renderThumbnail(e, !1) || ""}</div><div class="item-card__content-end"><slot name=content-end></slot></div></div></div>`}</a>` : r`<div class="item-card__upper">${n && this.renderThumbnail(e, !0) || ""}<div class="item-card-flex item-card__top">${!n && this.renderSelectionInput(m, !0) || ""}<div class="item-card-flex-1"><div class="item-card-flex"><div class="item-card__content"><div class="item-card-flex"><h3 class=${l({
|
|
150
179
|
"item-card__title": !0,
|
|
151
|
-
"item-card__title--grid":
|
|
152
|
-
"item-card__title--padded": this.showItemType || this.showSummary && !!
|
|
180
|
+
"item-card__title--grid": n,
|
|
181
|
+
"item-card__title--padded": this.showItemType || this.showSummary && !!s.snippet,
|
|
153
182
|
"item-card-flex-1": !0
|
|
154
|
-
})}><span class="item-card__title__span">${
|
|
183
|
+
})}><span class="item-card__title__span">${s.title ?? e.title ?? ""}</span></h3>${n && this.renderSelectionInput(m) || ""}</div>${this.showSummary && !!s.snippet && r`<p class="item-card__summary">${s.snippet.length > 250 ? `${s.snippet.substring(0, 250)}...` : s.snippet}</p>` || ""}<div class="item-card__details">${this.showItemType && r`<arcgis-portal-item-type class="item-card__divider item-card-item-type" ellipsis .user=${a} .showHosted=${this.showItemTypeHosted} scale=s .item=${e} .portal=${i}></arcgis-portal-item-type>` || ""}${this.showDateUpdated && !!g && this.renderUpdatedDetails(g) || ""}${this.renderBadges()}</div>${e.type === "Notebook" && r`<div class="item-card__notebook-runtime-wrap">${this.renderNotebookRuntime()}${this.renderNotebookRuntimeWarning()}</div>` || ""}</div>${!n && this.renderThumbnail(e, !1) || ""}</div><div class="item-card__content-end"><slot name=content-end></slot></div></div></div></div>`}<div class="item-card__footer"><div class=${l({ "item-card__footer__start": !0, "item-card__footer__start--owner": this.showOwner })}>${!this.hideActionsStart && r`<slot name=actions-start></slot>` || ""}${this.showOwner && !!s.owner && r`<div class="item-card__profile-wrap"><arcgis-portal-user-popup class="item-card__owner" .portal=${i} .username=${s.owner} .baseUrl=${this.getResolvedBaseUrl()} underline .zIndex=${this.userPopupZIndex} @arcgisUserPopupInternalUIAction=${(t) => {
|
|
155
184
|
t.stopPropagation(), this.arcgisItemCardInternalUIAction.emit(t.detail);
|
|
156
|
-
}}></arcgis-portal-user-popup></div>` || ""}</div>${this.renderAccess()}${
|
|
185
|
+
}}></arcgis-portal-user-popup></div>` || ""}</div>${this.renderAccess()}${P && r`<span class="item-card__footer-divider"></span>` || ""}${k && r`<slot name=favorite-action><arcgis-portal-item-favorite .item=${e} .portal=${i} .user=${a} icon-only scale=s show-tooltip @arcgisItemFavoriteUpdate=${() => {
|
|
157
186
|
this.arcgisItemCardInternalUIAction.emit({
|
|
158
187
|
category: "card action",
|
|
159
188
|
action: "favorite"
|
|
160
189
|
});
|
|
161
|
-
}}></arcgis-portal-item-favorite></slot>` || ""}${
|
|
190
|
+
}}></arcgis-portal-item-favorite></slot>` || ""}${$ && r`<calcite-button scale=s class="item-card__preview-button" .appearance=${this.previewed ? "solid" : "outline"} kind=neutral @click=${(t) => {
|
|
162
191
|
t.preventDefault(), t.stopPropagation(), this.arcgisItemBrowserCardPreview.emit(this.item);
|
|
163
|
-
}}>${this.messages.preview}</calcite-button>` || ""}${
|
|
192
|
+
}}>${this.messages.preview}</calcite-button>` || ""}${b && r`<arcgis-portal-item-card-sublayer-select .item=${e} .portal=${i} .selection=${b} .selectedItems=${this.selectedItems} .allowedGeometries=${this.allowedGeometries} .disabled=${_ || this.disableSelection} @arcgisItemCardSelect=${(t) => {
|
|
164
193
|
t.stopPropagation(), this.arcgisItemCardSelect.emit(t.detail);
|
|
165
194
|
}} @arcgisItemCardSelectError=${(t) => {
|
|
166
195
|
t.stopPropagation(), this.arcgisItemCardSelectError.emit(t.detail);
|
|
167
|
-
}}></arcgis-portal-item-card-sublayer-select>` || ""}${
|
|
168
|
-
title:
|
|
169
|
-
})} .showFavorite=${this.showFavoriteInActionsMenu && !!
|
|
196
|
+
}}></arcgis-portal-item-card-sublayer-select>` || ""}${y && r`<arcgis-portal-item-actions .item=${e} .portal=${i} .user=${a} .actions=${this.actions} .label=${v(this.getMessage("itemActions", "Item actions for {title}"), {
|
|
197
|
+
title: s.title ?? e.title ?? ""
|
|
198
|
+
})} .showFavorite=${this.showFavoriteInActionsMenu && !!a} @arcgisItemActionsOpen=${(t) => {
|
|
170
199
|
t.stopPropagation(), this.arcgisItemCardActionsOpen.emit({
|
|
171
200
|
actions: this.actions,
|
|
172
201
|
el: t.detail.el
|
|
@@ -187,7 +216,7 @@ class H extends U {
|
|
|
187
216
|
}}><slot name=actions-end></slot></div></div></section>`;
|
|
188
217
|
}
|
|
189
218
|
}
|
|
190
|
-
|
|
219
|
+
R("arcgis-portal-item-card", W);
|
|
191
220
|
export {
|
|
192
|
-
|
|
221
|
+
W as ArcgisPortalItemCard
|
|
193
222
|
};
|
|
@@ -3,6 +3,8 @@ import "@esri/calcite-components/components/calcite-checkbox";
|
|
|
3
3
|
import "../arcgis-portal-item-thumbnail/index.js";
|
|
4
4
|
import "../arcgis-portal-item-share-summary/index.js";
|
|
5
5
|
import "../arcgis-portal-item-badges/index.js";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
6
8
|
import "../arcgis-portal-item-type/index.js";
|
|
7
9
|
import "../arcgis-portal-user-popup/index.js";
|
|
8
10
|
import "../arcgis-portal-item-favorite/index.js";
|
|
@@ -248,9 +248,11 @@ export abstract class ArcGISPortalNavigation extends LitElement {
|
|
|
248
248
|
keywordTitle: string;
|
|
249
249
|
keywordDescription: string;
|
|
250
250
|
keywordPlaceholder: string;
|
|
251
|
+
keywordPlaceholderEnterprise: string;
|
|
251
252
|
semanticTitle: string;
|
|
252
253
|
semanticDescription: string;
|
|
253
254
|
semanticPlaceholder: string;
|
|
255
|
+
semanticPlaceholderEnterprise: string;
|
|
254
256
|
};
|
|
255
257
|
};
|
|
256
258
|
notifications: {
|
|
@@ -446,9 +448,11 @@ export abstract class ArcGISPortalNavigation extends LitElement {
|
|
|
446
448
|
keywordTitle: string;
|
|
447
449
|
keywordDescription: string;
|
|
448
450
|
keywordPlaceholder: string;
|
|
451
|
+
keywordPlaceholderEnterprise: string;
|
|
449
452
|
semanticTitle: string;
|
|
450
453
|
semanticDescription: string;
|
|
451
454
|
semanticPlaceholder: string;
|
|
455
|
+
semanticPlaceholderEnterprise: string;
|
|
452
456
|
};
|
|
453
457
|
};
|
|
454
458
|
notifications: {
|