@arcgis/portal-components 5.2.0-next.64 → 5.2.0-next.66
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/2BUE3JLM.js +2 -0
- package/dist/cdn/{Y7FCEDRU.js → 2OU5PLGU.js} +1 -1
- package/dist/cdn/2WI5FBDF.js +2 -0
- package/dist/cdn/3VHBMKYX.js +2 -0
- package/dist/cdn/64DIXKV3.js +2 -0
- package/dist/cdn/6KVA4AKM.js +2 -0
- package/dist/cdn/6TO2BYXU.js +2 -0
- package/dist/cdn/AR6YIWRX.js +2 -0
- package/dist/cdn/{7YQTBSDS.js → ASLLZOUG.js} +109 -84
- package/dist/cdn/CYCKQHLO.js +2 -0
- package/dist/cdn/{ZV4GLQQG.js → D4VYYWA6.js} +1 -1
- package/dist/cdn/DEOAKHYN.js +2 -0
- package/dist/cdn/FKVT4PNP.js +2 -0
- package/dist/cdn/GC6YLNZF.js +2 -0
- package/dist/cdn/{VD6VGWCQ.js → JMEXULSL.js} +1 -1
- package/dist/cdn/KTBQ26TD.js +2 -0
- package/dist/cdn/LRADZ46B.js +2 -0
- package/dist/cdn/NWT7EITA.js +2 -0
- package/dist/cdn/{EE7XFMJG.js → O5AP2PN5.js} +1 -1
- package/dist/cdn/OUNIRHWU.js +2 -0
- package/dist/cdn/{XW42SAEJ.js → QFI3ZPNB.js} +1 -1
- package/dist/cdn/QMFRNHQJ.js +2 -0
- package/dist/cdn/QNA62UMC.js +2 -0
- package/dist/cdn/{6RLJVPF6.js → QWMWVF47.js} +1 -1
- package/dist/cdn/RWQL7W3X.js +2 -0
- package/dist/cdn/T6Z7IFG2.js +2 -0
- package/dist/cdn/USQ4RJYL.js +2 -0
- package/dist/cdn/{Q7SDLUZ6.js → V257KGGO.js} +1 -1
- package/dist/cdn/XSUV6RLR.js +2 -0
- package/dist/cdn/XTTOOMCY.js +66 -0
- package/dist/cdn/{CG4WYBHN.js → XUIVR4NX.js} +1 -1
- package/dist/cdn/{SOJU4OFZ.js → ZMTS73PF.js} +1 -1
- package/dist/cdn/ZSNLY6QY.js +2 -0
- package/dist/cdn/assets/portal-item-badges/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-card/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-favorite/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-item-type/icons/applicationtheme16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/applicationtheme32.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/layout16.svg +1 -0
- package/dist/cdn/assets/portal-item-type/icons/layout32.svg +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/fieldAddDelete.js +1 -1
- package/dist/chunks/info.js +179 -0
- package/dist/chunks/item.js +8 -8
- package/dist/chunks/items.js +16 -0
- package/dist/chunks/portal-item-badge.js +346 -0
- package/dist/chunks/portal.js +3 -3
- package/dist/chunks/portal2.js +3 -3
- package/dist/chunks/query.js +4 -4
- package/dist/chunks/string.js +2 -2
- package/dist/chunks/users.js +7 -0
- package/dist/chunks/utils.js +75 -636
- package/dist/chunks/utils2.js +653 -0
- package/dist/chunks/verified.js +40 -0
- package/dist/components/arcgis-portal-account-switcher/customElement.js +58 -72
- package/dist/components/arcgis-portal-account-switcher-list/customElement.js +6 -6
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +9 -7
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +944 -775
- package/dist/components/arcgis-portal-field-delete/customElement.js +2 -1
- package/dist/components/arcgis-portal-group-browser/customElement.js +3 -3
- package/dist/components/arcgis-portal-group-browser/types.d.ts +6 -2
- package/dist/components/arcgis-portal-group-browser-preview/customElement.d.ts +9 -9
- package/dist/components/arcgis-portal-group-browser-preview/customElement.js +16 -16
- package/dist/components/arcgis-portal-group-browser-preview-card/customElement.d.ts +18 -18
- package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +31 -30
- package/dist/components/arcgis-portal-group-card/customElement.d.ts +25 -25
- package/dist/components/arcgis-portal-group-card/customElement.js +7 -7
- package/dist/components/arcgis-portal-item-actions/customElement.d.ts +74 -0
- package/dist/components/arcgis-portal-item-actions/customElement.js +89 -0
- package/dist/components/arcgis-portal-item-actions/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-actions/index.js +5 -0
- package/dist/components/arcgis-portal-item-badge/customElement.d.ts +260 -0
- package/dist/components/arcgis-portal-item-badge/customElement.js +9 -0
- package/dist/components/arcgis-portal-item-badge/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-badge/index.js +5 -0
- package/dist/components/arcgis-portal-item-badges/customElement.d.ts +48 -0
- package/dist/components/arcgis-portal-item-badges/customElement.js +35 -0
- package/dist/components/arcgis-portal-item-badges/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-badges/index.js +2 -0
- package/dist/components/arcgis-portal-item-badges/types.d.ts +1 -0
- package/dist/components/arcgis-portal-item-card/customElement.d.ts +215 -0
- package/dist/components/arcgis-portal-item-card/customElement.js +190 -0
- package/dist/components/arcgis-portal-item-card/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-card/index.js +10 -0
- package/dist/components/arcgis-portal-item-favorite/customElement.d.ts +36 -0
- package/dist/components/arcgis-portal-item-favorite/customElement.js +66 -0
- package/dist/components/arcgis-portal-item-favorite/index.d.ts +1 -0
- package/dist/components/arcgis-portal-item-favorite/index.js +3 -0
- package/dist/components/arcgis-portal-item-favorite/utils.d.ts +4 -0
- package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
- package/dist/components/arcgis-portal-navigation/customElement.js +40 -40
- package/dist/components/arcgis-portal-navigation/index.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +42 -214
- package/dist/components/arcgis-portal-user-popup/customElement.js +66 -100
- package/dist/components/portal-group-browser-filters/customElement.js +71 -73
- 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 +38 -0
- package/dist/loader.js +9 -4
- package/dist/types/item.d.ts +5 -1
- package/dist/types/lumina.d.ts +38 -4
- package/dist/types/preact.d.ts +43 -4
- package/dist/types/react.d.ts +48 -4
- package/dist/types/stencil.d.ts +38 -4
- package/package.json +6 -6
- package/dist/cdn/332KSPIN.js +0 -2
- package/dist/cdn/7PPA7V23.js +0 -2
- package/dist/cdn/DML7662F.js +0 -2
- package/dist/cdn/FF24VDOG.js +0 -65
- package/dist/cdn/G2NXASJO.js +0 -2
- package/dist/cdn/JZTBGLFH.js +0 -2
- package/dist/cdn/PP7GTURX.js +0 -2
- package/dist/cdn/QQ432AB6.js +0 -2
- package/dist/cdn/RKWOBE3M.js +0 -2
- package/dist/cdn/V4IAC7WR.js +0 -2
- package/dist/cdn/WEJQVIN4.js +0 -2
- package/dist/cdn/ZK2VXTNX.js +0 -2
- package/dist/components/portal-browser/components/portal-browser-filter-date/portal-browser-filter-date.d.ts +0 -122
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as w } from "../../chunks/runtime.js";
|
|
3
|
+
import { repeat as f } from "lit/directives/repeat.js";
|
|
4
|
+
import { keyed as p } from "lit/directives/keyed.js";
|
|
5
|
+
import { LitElement as u, createEvent as l, nothing as a } from "@arcgis/lumina";
|
|
6
|
+
import { css as g, html as h } from "lit";
|
|
7
|
+
import { createRef as m, ref as v } from "lit/directives/ref.js";
|
|
8
|
+
import { u as F } from "../../chunks/useT9n.js";
|
|
9
|
+
import { t as $ } from "../../chunks/functionalities.js";
|
|
10
|
+
import { g as I, i as b, t as y } from "../../chunks/utils.js";
|
|
11
|
+
const k = g`:host{display:inline-flex}.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}`;
|
|
12
|
+
class x extends u {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(), this.messages = F({ name: "portal-item-favorite", blocking: !0 }), this.actionRef = m(), this.dropdownRef = m(), this.favoriteRequestId = 0, this.didWarnEmptyActions = !1, this.handleFavoriteUpdate = (e) => {
|
|
15
|
+
const i = I(e, this.item.id ?? void 0);
|
|
16
|
+
i && (this.isFavorite = i.favorite);
|
|
17
|
+
}, this.isFavorite = !1, this.actions = [], this.showFavorite = !1, this.showPreview = !1, this.arcgisItemActionClick = l(), this.arcgisItemActionsOpen = l(), this.arcgisItemFavoriteUpdate = l(), this.arcgisItemActions = l(), this.listenOn(window, "arcgisItemFavoriteUpdate", this.handleFavoriteUpdate);
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.properties = { isFavorite: 16, item: 0, portal: 0, user: 0, actions: 0, keyHandler: 0, label: 1, showFavorite: 5, showPreview: 5, previewText: 1, tabIndexOverride: 9 };
|
|
21
|
+
}
|
|
22
|
+
static {
|
|
23
|
+
this.styles = k;
|
|
24
|
+
}
|
|
25
|
+
async setFocus() {
|
|
26
|
+
await this.actionRef.value?.setFocus();
|
|
27
|
+
}
|
|
28
|
+
willUpdate(e) {
|
|
29
|
+
(e.has("item") || e.has("portal") || e.has("user")) && this.refreshFavorite();
|
|
30
|
+
}
|
|
31
|
+
async refreshFavorite() {
|
|
32
|
+
if (!this.item.id || !this.portal || !this.user) {
|
|
33
|
+
this.isFavorite = !1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const e = ++this.favoriteRequestId, i = await b(this.item.id, this.portal, this.user);
|
|
37
|
+
e === this.favoriteRequestId && (this.isFavorite = i);
|
|
38
|
+
}
|
|
39
|
+
async handleToggleFavorite(e) {
|
|
40
|
+
e.preventDefault(), e.stopPropagation();
|
|
41
|
+
const { item: i, portal: n, user: c, isFavorite: o } = this;
|
|
42
|
+
if (!i.id || !n || !c)
|
|
43
|
+
return;
|
|
44
|
+
const r = {
|
|
45
|
+
id: i.id,
|
|
46
|
+
access: i.access
|
|
47
|
+
}, { updated: s } = await y({
|
|
48
|
+
currentFavorite: o,
|
|
49
|
+
item: r,
|
|
50
|
+
portal: n,
|
|
51
|
+
user: c
|
|
52
|
+
});
|
|
53
|
+
s && (await $(300), this.isFavorite = !o, this.arcgisItemFavoriteUpdate.emit({
|
|
54
|
+
id: i.id,
|
|
55
|
+
favorite: this.isFavorite
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
handleActionClick(e, i) {
|
|
59
|
+
i.stopPropagation(), this.arcgisItemActionClick.emit(e.id || e.text), e.action && (i.preventDefault(), e.action());
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
const { item: e, actions: i, label: n, previewText: c } = this, o = i.length > 0, r = this.showFavorite && !!this.user;
|
|
63
|
+
if (!o && !r && !this.showPreview && !this.didWarnEmptyActions && (console.warn("[arcgis-portal-item-actions] The actions menu is hidden because no actions were provided and both showFavorite/showPreview are disabled."), this.didWarnEmptyActions = !0), !o && !r && !this.showPreview)
|
|
64
|
+
return null;
|
|
65
|
+
const s = `${e.id}-title`;
|
|
66
|
+
return h`<span class="screen-readers-only" id=${s ?? a}>${e.title}</span><calcite-dropdown overlay-positioning=fixed placement=bottom-end close-on-select-disabled @click=${(t) => {
|
|
67
|
+
t.stopPropagation();
|
|
68
|
+
}} ${v(this.dropdownRef)}><calcite-action scale=s slot=trigger alignment=center .text=${n} icon=ellipsis tabindex=${this.tabIndexOverride ?? a} @click=${(t) => {
|
|
69
|
+
this.arcgisItemActionsOpen.emit({
|
|
70
|
+
el: t.currentTarget
|
|
71
|
+
});
|
|
72
|
+
}} @keydown=${(t) => {
|
|
73
|
+
const d = this.dropdownRef.value;
|
|
74
|
+
this.keyHandler && d && this.keyHandler(t, d);
|
|
75
|
+
}} ${v(this.actionRef)}></calcite-action><calcite-dropdown-group selection-mode=none>${f(i, (t) => t.id || t.text, (t) => h`<calcite-dropdown-item aria-describedby=${s ?? a} .href=${t.link} .target=${t.newTab ? "_blank" : void 0} .rel=${t.newTab ? "noopener noreferrer" : void 0} .innerHTML=${t.text ?? ""} @calciteDropdownItemSelect=${(d) => {
|
|
76
|
+
this.handleActionClick(t, d);
|
|
77
|
+
}}></calcite-dropdown-item>`)}${r && p("favorites", h`<calcite-dropdown-item aria-describedby=${s ?? a} @calciteDropdownItemSelect=${(t) => {
|
|
78
|
+
this.handleToggleFavorite(t);
|
|
79
|
+
}} @click=${(t) => {
|
|
80
|
+
t.preventDefault(), t.stopPropagation();
|
|
81
|
+
}}>${this.isFavorite ? this.messages.remove : this.messages.add}</calcite-dropdown-item>`) || ""}${this.showPreview && p("preview", h`<calcite-dropdown-item id=item-preview aria-describedby=${s ?? a} @calciteDropdownItemSelect=${(t) => {
|
|
82
|
+
t.stopPropagation(), this.arcgisItemActionClick.emit("preview");
|
|
83
|
+
}}>${c}</calcite-dropdown-item>`) || ""}</calcite-dropdown-group></calcite-dropdown>`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
w("arcgis-portal-item-actions", x);
|
|
87
|
+
export {
|
|
88
|
+
x as ArcgisPortalItemActions
|
|
89
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-dropdown";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-dropdown-group";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-dropdown-item";
|
|
5
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
3
|
+
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
+
import type PortalUser from "@arcgis/core/portal/PortalUser.js";
|
|
5
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
|
+
import type { ItemBadge } from "../arcgis-portal-item-badges/types.js";
|
|
7
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
8
|
+
import type { Chip as Chip } from "@esri/calcite-components/components/calcite-chip";
|
|
9
|
+
|
|
10
|
+
export abstract class ArcgisPortalItemBadge extends LitElement {
|
|
11
|
+
/** @internal */
|
|
12
|
+
protected _messages: {
|
|
13
|
+
Authoritative: {
|
|
14
|
+
title: string;
|
|
15
|
+
tooltip: {
|
|
16
|
+
org: string;
|
|
17
|
+
public: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
Beta: {
|
|
21
|
+
title: string;
|
|
22
|
+
tooltip: string;
|
|
23
|
+
};
|
|
24
|
+
Deprecated: {
|
|
25
|
+
title: string;
|
|
26
|
+
tooltip: string;
|
|
27
|
+
};
|
|
28
|
+
"Has Replacement": {
|
|
29
|
+
title: string;
|
|
30
|
+
tooltip: string;
|
|
31
|
+
itemPageTooltip: string;
|
|
32
|
+
link: string;
|
|
33
|
+
};
|
|
34
|
+
DeprecatedItemType: {
|
|
35
|
+
title: string;
|
|
36
|
+
tooltip: {
|
|
37
|
+
general: string;
|
|
38
|
+
webAppBuilder: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
"Living Atlas": {
|
|
42
|
+
title: string;
|
|
43
|
+
tooltip: string;
|
|
44
|
+
};
|
|
45
|
+
Subscriber: {
|
|
46
|
+
title: string;
|
|
47
|
+
tooltip: {
|
|
48
|
+
org: string;
|
|
49
|
+
public: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
Premium: {
|
|
53
|
+
title: string;
|
|
54
|
+
tooltip: {
|
|
55
|
+
org: string;
|
|
56
|
+
public: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
"Open Data": {
|
|
60
|
+
title: string;
|
|
61
|
+
tooltip: string;
|
|
62
|
+
};
|
|
63
|
+
Marketplace: {
|
|
64
|
+
title: string;
|
|
65
|
+
tooltip: string;
|
|
66
|
+
};
|
|
67
|
+
Collaboration: {
|
|
68
|
+
title: string;
|
|
69
|
+
tooltip: string;
|
|
70
|
+
};
|
|
71
|
+
Retired: {
|
|
72
|
+
title: string;
|
|
73
|
+
tooltip: {
|
|
74
|
+
general: string;
|
|
75
|
+
classicStoryMap: string;
|
|
76
|
+
classicStoryMapGeneric: string;
|
|
77
|
+
cityEngine: string;
|
|
78
|
+
app: string;
|
|
79
|
+
webAppBuilder: string;
|
|
80
|
+
bdfs: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
"Public Data Collection": {
|
|
84
|
+
title: string;
|
|
85
|
+
tooltip: string;
|
|
86
|
+
};
|
|
87
|
+
Solution: {
|
|
88
|
+
title: string;
|
|
89
|
+
tooltip: string;
|
|
90
|
+
};
|
|
91
|
+
Registered: {
|
|
92
|
+
title: string;
|
|
93
|
+
tooltip: {
|
|
94
|
+
online: string;
|
|
95
|
+
enterprise: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
"Registered API Key Credentials (Standard)": {
|
|
99
|
+
title: {
|
|
100
|
+
online: string;
|
|
101
|
+
enterprise: string;
|
|
102
|
+
};
|
|
103
|
+
tooltip: string;
|
|
104
|
+
};
|
|
105
|
+
"Registered API Key Credentials (Personal)": {
|
|
106
|
+
title: string;
|
|
107
|
+
tooltip: string;
|
|
108
|
+
};
|
|
109
|
+
"Registered OAuth 2.0 Credentials (Standard)": {
|
|
110
|
+
title: {
|
|
111
|
+
online: string;
|
|
112
|
+
enterprise: string;
|
|
113
|
+
};
|
|
114
|
+
tooltip: string;
|
|
115
|
+
};
|
|
116
|
+
"Registered OAuth 2.0 Credentials (Personal)": {
|
|
117
|
+
title: string;
|
|
118
|
+
tooltip: string;
|
|
119
|
+
};
|
|
120
|
+
"Registered Application": {
|
|
121
|
+
title: string;
|
|
122
|
+
tooltip: string;
|
|
123
|
+
};
|
|
124
|
+
"Personal credential": {
|
|
125
|
+
title: string;
|
|
126
|
+
tooltip: string;
|
|
127
|
+
};
|
|
128
|
+
loading: string;
|
|
129
|
+
} & T9nMeta<{
|
|
130
|
+
Authoritative: {
|
|
131
|
+
title: string;
|
|
132
|
+
tooltip: {
|
|
133
|
+
org: string;
|
|
134
|
+
public: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
Beta: {
|
|
138
|
+
title: string;
|
|
139
|
+
tooltip: string;
|
|
140
|
+
};
|
|
141
|
+
Deprecated: {
|
|
142
|
+
title: string;
|
|
143
|
+
tooltip: string;
|
|
144
|
+
};
|
|
145
|
+
"Has Replacement": {
|
|
146
|
+
title: string;
|
|
147
|
+
tooltip: string;
|
|
148
|
+
itemPageTooltip: string;
|
|
149
|
+
link: string;
|
|
150
|
+
};
|
|
151
|
+
DeprecatedItemType: {
|
|
152
|
+
title: string;
|
|
153
|
+
tooltip: {
|
|
154
|
+
general: string;
|
|
155
|
+
webAppBuilder: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
"Living Atlas": {
|
|
159
|
+
title: string;
|
|
160
|
+
tooltip: string;
|
|
161
|
+
};
|
|
162
|
+
Subscriber: {
|
|
163
|
+
title: string;
|
|
164
|
+
tooltip: {
|
|
165
|
+
org: string;
|
|
166
|
+
public: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
Premium: {
|
|
170
|
+
title: string;
|
|
171
|
+
tooltip: {
|
|
172
|
+
org: string;
|
|
173
|
+
public: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
"Open Data": {
|
|
177
|
+
title: string;
|
|
178
|
+
tooltip: string;
|
|
179
|
+
};
|
|
180
|
+
Marketplace: {
|
|
181
|
+
title: string;
|
|
182
|
+
tooltip: string;
|
|
183
|
+
};
|
|
184
|
+
Collaboration: {
|
|
185
|
+
title: string;
|
|
186
|
+
tooltip: string;
|
|
187
|
+
};
|
|
188
|
+
Retired: {
|
|
189
|
+
title: string;
|
|
190
|
+
tooltip: {
|
|
191
|
+
general: string;
|
|
192
|
+
classicStoryMap: string;
|
|
193
|
+
classicStoryMapGeneric: string;
|
|
194
|
+
cityEngine: string;
|
|
195
|
+
app: string;
|
|
196
|
+
webAppBuilder: string;
|
|
197
|
+
bdfs: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
"Public Data Collection": {
|
|
201
|
+
title: string;
|
|
202
|
+
tooltip: string;
|
|
203
|
+
};
|
|
204
|
+
Solution: {
|
|
205
|
+
title: string;
|
|
206
|
+
tooltip: string;
|
|
207
|
+
};
|
|
208
|
+
Registered: {
|
|
209
|
+
title: string;
|
|
210
|
+
tooltip: {
|
|
211
|
+
online: string;
|
|
212
|
+
enterprise: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
"Registered API Key Credentials (Standard)": {
|
|
216
|
+
title: {
|
|
217
|
+
online: string;
|
|
218
|
+
enterprise: string;
|
|
219
|
+
};
|
|
220
|
+
tooltip: string;
|
|
221
|
+
};
|
|
222
|
+
"Registered API Key Credentials (Personal)": {
|
|
223
|
+
title: string;
|
|
224
|
+
tooltip: string;
|
|
225
|
+
};
|
|
226
|
+
"Registered OAuth 2.0 Credentials (Standard)": {
|
|
227
|
+
title: {
|
|
228
|
+
online: string;
|
|
229
|
+
enterprise: string;
|
|
230
|
+
};
|
|
231
|
+
tooltip: string;
|
|
232
|
+
};
|
|
233
|
+
"Registered OAuth 2.0 Credentials (Personal)": {
|
|
234
|
+
title: string;
|
|
235
|
+
tooltip: string;
|
|
236
|
+
};
|
|
237
|
+
"Registered Application": {
|
|
238
|
+
title: string;
|
|
239
|
+
tooltip: string;
|
|
240
|
+
};
|
|
241
|
+
"Personal credential": {
|
|
242
|
+
title: string;
|
|
243
|
+
tooltip: string;
|
|
244
|
+
};
|
|
245
|
+
loading: string;
|
|
246
|
+
}>;
|
|
247
|
+
accessor appearance: Chip["appearance"] | undefined;
|
|
248
|
+
accessor badgeType: ItemBadge;
|
|
249
|
+
accessor item: PortalItem;
|
|
250
|
+
accessor portal: Portal;
|
|
251
|
+
/** @default "m" */
|
|
252
|
+
accessor scale: Chip["scale"];
|
|
253
|
+
/** @default false */
|
|
254
|
+
accessor showTooltip: boolean;
|
|
255
|
+
/** @default false */
|
|
256
|
+
accessor useProduction: boolean | undefined;
|
|
257
|
+
accessor user: PortalUser | undefined;
|
|
258
|
+
/** @default "full" */
|
|
259
|
+
accessor width: "full" | "narrow";
|
|
260
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import "../../chunks/runtime.js";
|
|
3
|
+
import "@arcgis/lumina";
|
|
4
|
+
import "lit";
|
|
5
|
+
import "../../chunks/useT9n.js";
|
|
6
|
+
import { A as a } from "../../chunks/portal-item-badge.js";
|
|
7
|
+
export {
|
|
8
|
+
a as ArcgisPortalItemBadge
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-chip";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-link";
|
|
5
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
3
|
+
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
+
import type PortalUser from "@arcgis/core/portal/PortalUser.js";
|
|
5
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
|
+
import type { Chip as Chip } from "@esri/calcite-components/components/calcite-chip";
|
|
7
|
+
|
|
8
|
+
/** Derives and renders portal item badges that represent status, capabilities, and lifecycle states. */
|
|
9
|
+
export abstract class ArcgisPortalItemBadges extends LitElement {
|
|
10
|
+
/** Appearance of the chips used for item badges. */
|
|
11
|
+
accessor appearance: Chip["appearance"] | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Reflected flag that indicates no badges were generated for the current input.
|
|
14
|
+
*
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
accessor empty: boolean;
|
|
18
|
+
/** Portal item to inspect for badges. */
|
|
19
|
+
accessor item: PortalItem;
|
|
20
|
+
/** Portal instance used for organization and environment-specific badge behavior. */
|
|
21
|
+
accessor portal: Portal;
|
|
22
|
+
/**
|
|
23
|
+
* Size of each badge chip.
|
|
24
|
+
*
|
|
25
|
+
* @default "m"
|
|
26
|
+
*/
|
|
27
|
+
accessor scale: Chip["scale"];
|
|
28
|
+
/**
|
|
29
|
+
* Enables tooltip text for each badge.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
accessor showTooltips: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Optional mode for enterprise contexts that should resolve online tooltip content.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
accessor useProduction: boolean | undefined;
|
|
40
|
+
/** Optional current user, used for user-dependent badge logic. */
|
|
41
|
+
accessor user: PortalUser | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Full width shows label text, narrow renders icon only.
|
|
44
|
+
*
|
|
45
|
+
* @default "full"
|
|
46
|
+
*/
|
|
47
|
+
accessor width: "full" | "narrow";
|
|
48
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { c as o } from "../../chunks/runtime.js";
|
|
3
|
+
import { LitElement as l } from "@arcgis/lumina";
|
|
4
|
+
import { css as p, html as m } from "lit";
|
|
5
|
+
import { g as h } from "../../chunks/portal-item-badge.js";
|
|
6
|
+
const d = p`:host{display:flex;flex-wrap:wrap;align-items:center}.portal-item-badges__badge{display:inline-block;margin-inline-end:.25rem}.portal-item-badges__badge:last-of-type{margin-inline-end:0}`;
|
|
7
|
+
class n extends l {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.badges = [], this.width = "full", this.scale = "m", this.showTooltips = !1, this.empty = !1;
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.properties = { badges: 16, item: 0, portal: 0, user: 0, width: 1, appearance: 1, scale: 1, showTooltips: 5, useProduction: 5, empty: 7 };
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.styles = d;
|
|
16
|
+
}
|
|
17
|
+
willUpdate(t) {
|
|
18
|
+
if (t.has("item") || t.has("portal") || t.has("user")) {
|
|
19
|
+
if (!this.item || !this.portal) {
|
|
20
|
+
this.badges = [], this.empty = !0;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const s = h(this.item, this.portal, this.user);
|
|
24
|
+
this.badges = s, this.empty = s.length === 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const { appearance: t, badges: s, scale: e, showTooltips: i, width: a } = this;
|
|
29
|
+
return s.map((r) => m`<arcgis-portal-item-badge .appearance=${t} .badgeType=${r} class="portal-item-badges__badge" .item=${this.item} .portal=${this.portal} .user=${this.user} .scale=${e} .showTooltip=${i} .useProduction=${this.useProduction} .width=${a}></arcgis-portal-item-badge>`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
o("arcgis-portal-item-badges", n);
|
|
33
|
+
export {
|
|
34
|
+
n as ArcgisPortalItemBadges
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ItemBadge = "Authoritative" | "Beta" | "Collaboration" | "Deprecated" | "DeprecatedItemType" | "Has Replacement" | "Living Atlas" | "Marketplace" | "Open Data" | "Personal credential" | "Premium" | "Public Data Collection" | "Registered API Key Credentials (Personal)" | "Registered API Key Credentials (Standard)" | "Registered Application" | "Registered OAuth 2.0 Credentials (Personal)" | "Registered OAuth 2.0 Credentials (Standard)" | "Registered" | "Retired" | "Solution" | "Subscriber";
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/// <reference path="../../index.d.ts" />
|
|
2
|
+
import type Portal from "@arcgis/core/portal/Portal.js";
|
|
3
|
+
import type PortalItem from "@arcgis/core/portal/PortalItem.js";
|
|
4
|
+
import type PortalUser from "@arcgis/core/portal/PortalUser.js";
|
|
5
|
+
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
|
+
import type { InternalUIAction } from "../../types/tracking.js";
|
|
7
|
+
import type { PortalItemAction } from "../arcgis-portal-item-actions/customElement.js";
|
|
8
|
+
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A card for displaying portal item information.
|
|
12
|
+
*
|
|
13
|
+
* @slot [content-top] - Inserted content appears above the card body.
|
|
14
|
+
* @slot [content-end] - Inserted content appears beneath the card details.
|
|
15
|
+
* @slot [sharing-summary] - Custom sharing summary content.
|
|
16
|
+
* @slot [share-summary] - Legacy alias for sharing-summary.
|
|
17
|
+
* @slot [actions-start] - Inserted content appears in the footer before owner information.
|
|
18
|
+
* @slot [actions-end] - Inserted content appears in the footer end area.
|
|
19
|
+
*/
|
|
20
|
+
export abstract class ArcgisPortalItemCard extends LitElement {
|
|
21
|
+
/** Pass a set of actions to appear inside an ellipsis menu. */
|
|
22
|
+
accessor actions: PortalItemAction[];
|
|
23
|
+
/**
|
|
24
|
+
* Disable interaction when true.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
accessor disabled: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Disable selection controls.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
accessor disableSelection: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @default false
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
accessor hideActionsStart: boolean | undefined;
|
|
40
|
+
/** Item data from search results or a loaded PortalItem instance. */
|
|
41
|
+
accessor item: PortalItem;
|
|
42
|
+
/** Making this non-empty turns the top section into a link. */
|
|
43
|
+
accessor link: string | undefined;
|
|
44
|
+
/** Optional callback that runs when the link is activated. */
|
|
45
|
+
accessor linkHandler: ((item: PortalItem) => void) | undefined;
|
|
46
|
+
/** @internal */
|
|
47
|
+
protected messages: {
|
|
48
|
+
select: string;
|
|
49
|
+
lastUpdated: string;
|
|
50
|
+
viewItemDetails: string;
|
|
51
|
+
preview: string;
|
|
52
|
+
closePreview: string;
|
|
53
|
+
everyone: string;
|
|
54
|
+
organization: string;
|
|
55
|
+
group: string;
|
|
56
|
+
owner: string;
|
|
57
|
+
favorite: string;
|
|
58
|
+
deprecated: string;
|
|
59
|
+
itemActions: string;
|
|
60
|
+
} & T9nMeta<{
|
|
61
|
+
select: string;
|
|
62
|
+
lastUpdated: string;
|
|
63
|
+
viewItemDetails: string;
|
|
64
|
+
preview: string;
|
|
65
|
+
closePreview: string;
|
|
66
|
+
everyone: string;
|
|
67
|
+
organization: string;
|
|
68
|
+
group: string;
|
|
69
|
+
owner: string;
|
|
70
|
+
favorite: string;
|
|
71
|
+
deprecated: string;
|
|
72
|
+
itemActions: string;
|
|
73
|
+
}>;
|
|
74
|
+
/** Name of the radio button control for accessibility. */
|
|
75
|
+
accessor name: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Open link in new tab when true.
|
|
78
|
+
*
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
accessor newTab: boolean;
|
|
82
|
+
/** Current portal instance. */
|
|
83
|
+
accessor portal: Portal;
|
|
84
|
+
/** Optionally emit preview behavior on click of card. */
|
|
85
|
+
accessor preview: ItemCardPreview | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Whether this card is currently previewed by parent browser state.
|
|
88
|
+
*
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
accessor previewed: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Set to true to disable preview actions for recycle bin contexts.
|
|
94
|
+
*
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
accessor recycleBin: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Set to true to mark item as selected.
|
|
100
|
+
*
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
accessor selected: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Type of selection behavior.
|
|
106
|
+
*
|
|
107
|
+
* @default "none"
|
|
108
|
+
*/
|
|
109
|
+
accessor selection: ItemCardSelection;
|
|
110
|
+
/**
|
|
111
|
+
* Show item sharing access detail.
|
|
112
|
+
*
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
accessor showAccess: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Show item status badges.
|
|
118
|
+
*
|
|
119
|
+
* @default true
|
|
120
|
+
*/
|
|
121
|
+
accessor showBadges: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Show tooltip content for item badges.
|
|
124
|
+
*
|
|
125
|
+
* @default true
|
|
126
|
+
*/
|
|
127
|
+
accessor showBadgeTooltips: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Show last-updated detail.
|
|
130
|
+
*
|
|
131
|
+
* @default true
|
|
132
|
+
*/
|
|
133
|
+
accessor showDateUpdated: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Allow user to favorite an item.
|
|
136
|
+
*
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
accessor showFavorite: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Set to true to show favorites within the actions menu, rather than on the card itself.
|
|
142
|
+
*
|
|
143
|
+
* @default false
|
|
144
|
+
*/
|
|
145
|
+
accessor showFavoriteInActionsMenu: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Show item type in card details.
|
|
148
|
+
*
|
|
149
|
+
* @default true
|
|
150
|
+
*/
|
|
151
|
+
accessor showItemType: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Show hosted information in item type text when available.
|
|
154
|
+
*
|
|
155
|
+
* @default false
|
|
156
|
+
*/
|
|
157
|
+
accessor showItemTypeHosted: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Show the owner information in the card footer.
|
|
160
|
+
*
|
|
161
|
+
* @default true
|
|
162
|
+
*/
|
|
163
|
+
accessor showOwner: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Show item summary text in card body.
|
|
166
|
+
*
|
|
167
|
+
* @default false
|
|
168
|
+
*/
|
|
169
|
+
accessor showSummary: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Show item thumbnail.
|
|
172
|
+
*
|
|
173
|
+
* @default true
|
|
174
|
+
*/
|
|
175
|
+
accessor showThumbnail: boolean;
|
|
176
|
+
/** Current signed-in portal user. */
|
|
177
|
+
accessor user: PortalUser | undefined;
|
|
178
|
+
/** The z-index of the owner popup. */
|
|
179
|
+
accessor userPopupZIndex: number | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Select which view to use for the card.
|
|
182
|
+
*
|
|
183
|
+
* @default "list"
|
|
184
|
+
*/
|
|
185
|
+
accessor view: ItemCardView;
|
|
186
|
+
restoreFocus(): Promise<void>;
|
|
187
|
+
/** Emitted when preview is requested from card interaction. */
|
|
188
|
+
readonly arcgisItemBrowserCardPreview: import("@arcgis/lumina").TargetedEvent<this, PortalItem | null>;
|
|
189
|
+
/** Emitted when the actions menu is opened. */
|
|
190
|
+
readonly arcgisItemCardActionsOpen: import("@arcgis/lumina").TargetedEvent<this, PortalItemCardActionsOpenDetail>;
|
|
191
|
+
/** Fires on internal component interaction for telemetry. */
|
|
192
|
+
readonly arcgisItemCardInternalUIAction: import("@arcgis/lumina").TargetedEvent<this, InternalUIAction>;
|
|
193
|
+
/** Emitted when the item is selected or deselected. */
|
|
194
|
+
readonly arcgisItemCardSelect: import("@arcgis/lumina").TargetedEvent<this, {
|
|
195
|
+
item: PortalItem;
|
|
196
|
+
selected: boolean;
|
|
197
|
+
}>;
|
|
198
|
+
readonly "@eventTypes": {
|
|
199
|
+
arcgisItemBrowserCardPreview: ArcgisPortalItemCard["arcgisItemBrowserCardPreview"]["detail"];
|
|
200
|
+
arcgisItemCardActionsOpen: ArcgisPortalItemCard["arcgisItemCardActionsOpen"]["detail"];
|
|
201
|
+
arcgisItemCardInternalUIAction: ArcgisPortalItemCard["arcgisItemCardInternalUIAction"]["detail"];
|
|
202
|
+
arcgisItemCardSelect: ArcgisPortalItemCard["arcgisItemCardSelect"]["detail"];
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type ItemCardView = "grid" | "list";
|
|
207
|
+
|
|
208
|
+
export type ItemCardSelection = "multiple" | "none" | "single";
|
|
209
|
+
|
|
210
|
+
export type ItemCardPreview = "action" | "top";
|
|
211
|
+
|
|
212
|
+
export interface PortalItemCardActionsOpenDetail {
|
|
213
|
+
actions: PortalItemAction[];
|
|
214
|
+
el: Element | HTMLButtonElement;
|
|
215
|
+
}
|