@arcgis/portal-components 5.2.0-next.3 → 5.2.0-next.30

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.
Files changed (155) hide show
  1. package/dist/cdn/25UUUQAQ.js +71 -0
  2. package/dist/cdn/2CP32LP3.js +2 -0
  3. package/dist/cdn/32CZ4VLI.js +2 -0
  4. package/dist/cdn/3BJVGCJG.js +637 -0
  5. package/dist/cdn/{AQWTJKUH.js → 3MQIRMUM.js} +9 -7
  6. package/dist/cdn/{JNRN6DTV.js → 47NPIL2S.js} +1 -1
  7. package/dist/cdn/{LQ3DMZ3K.js → 5VHBNEN3.js} +1 -1
  8. package/dist/cdn/6AGZRMJC.js +2 -0
  9. package/dist/cdn/6W2IHKCA.js +2 -0
  10. package/dist/cdn/BZTVED5W.js +65 -0
  11. package/dist/cdn/CHSZSBO6.js +2 -0
  12. package/dist/cdn/{WOZDQW3S.js → DBKSQGEI.js} +1 -1
  13. package/dist/cdn/DFTUMKSN.js +3 -0
  14. package/dist/cdn/DY5G63YO.js +2 -0
  15. package/dist/cdn/ECNI2A4K.js +2 -0
  16. package/dist/cdn/EKO6SVAF.js +2 -0
  17. package/dist/cdn/EZ3BR2FP.js +134 -0
  18. package/dist/cdn/{GHQ3ZW4U.js → FI45QCN2.js} +1 -1
  19. package/dist/cdn/FRDK7SCC.js +2 -0
  20. package/dist/cdn/GDZZCADX.js +2 -0
  21. package/dist/cdn/GEIZTD7F.js +2 -0
  22. package/dist/cdn/GJ26ZIE5.js +2 -0
  23. package/dist/cdn/GNS7NA7V.js +2 -0
  24. package/dist/cdn/HB7GO6ST.js +2 -0
  25. package/dist/cdn/{ZTHTFEYA.js → HGSK6OFA.js} +1 -1
  26. package/dist/cdn/{LAFNDBTQ.js → HIRM34QB.js} +1 -1
  27. package/dist/cdn/HMBSJR37.js +2 -0
  28. package/dist/cdn/{V2EOXGK2.js → I234NUZ5.js} +1 -1
  29. package/dist/cdn/{5DPWJ7DI.js → KZWW4BWJ.js} +1 -1
  30. package/dist/cdn/LCZTOHWB.js +2 -0
  31. package/dist/cdn/M7ABAD7K.js +2 -0
  32. package/dist/cdn/MLTQECPL.js +2 -0
  33. package/dist/cdn/NWIIOJEG.js +2 -0
  34. package/dist/cdn/O7ICV6C7.js +2 -0
  35. package/dist/cdn/OKHKS5RH.js +2 -0
  36. package/dist/cdn/{G47ZZQYL.js → OKRYML2G.js} +1 -1
  37. package/dist/cdn/PFCDINAN.js +2 -0
  38. package/dist/cdn/{QNUYUNEY.js → QJ2UHWPU.js} +1 -1
  39. package/dist/cdn/QOFH6DQT.js +2 -0
  40. package/dist/cdn/RJPBPB45.js +2 -0
  41. package/dist/cdn/S5XNEB7F.js +99 -0
  42. package/dist/cdn/S745KWLM.js +34 -0
  43. package/dist/cdn/{GT26WGJS.js → SXZRHHXC.js} +1 -1
  44. package/dist/cdn/{72N3KAXN.js → TW4LFQA5.js} +1 -1
  45. package/dist/cdn/U3FVMN32.js +2 -0
  46. package/dist/cdn/ULD747OT.js +22 -0
  47. package/dist/cdn/{7WZHZP6U.js → UR7W4CEV.js} +8 -2
  48. package/dist/cdn/{W6PSG4GX.js → VRXKORTR.js} +9 -4
  49. package/dist/cdn/VSKX2QMZ.js +2 -0
  50. package/dist/cdn/VTLIQOV4.js +2 -0
  51. package/dist/cdn/{DHHSKOUY.js → WJ2NMHDE.js} +1 -1
  52. package/dist/cdn/{2UUZHENH.js → WSNLUGEP.js} +1 -1
  53. package/dist/cdn/{53MSUMA3.js → XCZSPNKS.js} +16 -0
  54. package/dist/cdn/{K3HS2LQ7.js → YECI7XG3.js} +1 -1
  55. package/dist/cdn/YGKPNY5R.js +3 -0
  56. package/dist/cdn/ZDLFZJBT.js +2 -0
  57. package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -0
  58. package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
  59. package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
  60. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
  61. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
  62. package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
  63. package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
  64. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  65. package/dist/cdn/assets/portal-user-popup/t9n/messages.en.json +1 -0
  66. package/dist/cdn/index.js +1 -1
  67. package/dist/cdn/main.css +1 -1
  68. package/dist/chunks/dom.js +36 -0
  69. package/dist/chunks/functionalities.js +5 -4
  70. package/dist/chunks/groups.js +7 -83
  71. package/dist/chunks/item2.js +86 -0
  72. package/dist/chunks/portal.js +48 -8
  73. package/dist/chunks/ui.js +10 -0
  74. package/dist/chunks/user2.js +26 -25
  75. package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +11 -2
  76. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +4 -2
  77. package/dist/components/arcgis-portal-ai-assistant/customElement.js +797 -488
  78. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +10 -10
  79. package/dist/components/arcgis-portal-browser/customElement.d.ts +115 -0
  80. package/dist/components/arcgis-portal-browser/customElement.js +213 -0
  81. package/dist/components/arcgis-portal-browser/index.d.ts +1 -0
  82. package/dist/components/arcgis-portal-browser/index.js +6 -0
  83. package/dist/components/arcgis-portal-browser/utils/store.d.ts +31 -0
  84. package/dist/components/arcgis-portal-browser/utils/types.d.ts +12 -0
  85. package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +57 -0
  86. package/dist/components/arcgis-portal-browser-filter/customElement.js +34 -0
  87. package/dist/components/arcgis-portal-browser-filter/index.d.ts +1 -0
  88. package/dist/components/arcgis-portal-browser-filter/index.js +4 -0
  89. package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +121 -0
  90. package/dist/components/arcgis-portal-browser-filter-date/customElement.js +117 -0
  91. package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +1 -0
  92. package/dist/components/arcgis-portal-browser-filter-date/index.js +5 -0
  93. package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +81 -0
  94. package/dist/components/arcgis-portal-browser-filter-status/customElement.js +56 -0
  95. package/dist/components/arcgis-portal-browser-filter-status/index.d.ts +1 -0
  96. package/dist/components/arcgis-portal-browser-filter-status/index.js +5 -0
  97. package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +7 -0
  98. package/dist/components/arcgis-portal-browser-filters/customElement.js +29 -0
  99. package/dist/components/arcgis-portal-browser-filters/index.d.ts +1 -0
  100. package/dist/components/arcgis-portal-browser-filters/index.js +2 -0
  101. package/dist/components/arcgis-portal-group-badges/customElement.d.ts +102 -0
  102. package/dist/components/arcgis-portal-group-badges/customElement.js +50 -0
  103. package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
  104. package/dist/components/arcgis-portal-group-badges/index.js +3 -0
  105. package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
  106. package/dist/components/arcgis-portal-group-card/customElement.d.ts +167 -0
  107. package/dist/components/arcgis-portal-group-card/customElement.js +183 -0
  108. package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
  109. package/dist/components/arcgis-portal-group-card/index.js +8 -0
  110. package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
  111. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
  112. package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
  113. package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
  114. package/dist/components/arcgis-portal-item-type/customElement.d.ts +2 -0
  115. package/dist/components/arcgis-portal-item-type/customElement.js +45 -37
  116. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
  117. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -42
  118. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +111 -0
  119. package/dist/components/arcgis-portal-user-popup/customElement.js +224 -0
  120. package/dist/components/arcgis-portal-user-popup/index.d.ts +1 -0
  121. package/dist/components/arcgis-portal-user-popup/index.js +5 -0
  122. package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
  123. package/dist/docs/api.json +1 -1
  124. package/dist/docs/docs.json +1 -1
  125. package/dist/docs/vscode.html-custom-data.json +1 -1
  126. package/dist/docs/web-types.json +1 -1
  127. package/dist/index.d.ts +74 -2
  128. package/dist/loader.js +13 -4
  129. package/dist/types/group.d.ts +13 -13
  130. package/dist/types/item.d.ts +77 -2
  131. package/dist/types/lumina.d.ts +56 -1
  132. package/dist/types/preact.d.ts +65 -1
  133. package/dist/types/react.d.ts +74 -1
  134. package/dist/types/search.d.ts +27 -0
  135. package/dist/types/stencil.d.ts +56 -1
  136. package/dist/types/tracking.d.ts +10 -0
  137. package/dist/types/user.d.ts +2 -2
  138. package/package.json +7 -7
  139. package/dist/cdn/5VSDGPHH.js +0 -2
  140. package/dist/cdn/ANPXRYLV.js +0 -5
  141. package/dist/cdn/BEHLBKKM.js +0 -2
  142. package/dist/cdn/CI5ENGVT.js +0 -2
  143. package/dist/cdn/EVDOPN3G.js +0 -54
  144. package/dist/cdn/GAHILDQF.js +0 -45
  145. package/dist/cdn/GNOZCQ34.js +0 -2
  146. package/dist/cdn/KEKBRUUC.js +0 -2
  147. package/dist/cdn/N6G6Z7BF.js +0 -516
  148. package/dist/cdn/OQDPULPD.js +0 -2
  149. package/dist/cdn/RNLVNDGG.js +0 -2
  150. package/dist/cdn/SM4GWLRA.js +0 -66
  151. package/dist/cdn/TMYTUOSS.js +0 -2
  152. package/dist/cdn/YG5YYL6X.js +0 -2
  153. package/dist/cdn/YL7PGYWC.js +0 -5
  154. package/dist/cdn/YMPTDKT6.js +0 -2
  155. /package/dist/cdn/{B7633S2A.js → 5NIJVBS7.js} +0 -0
@@ -0,0 +1,121 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
+ import type { PortalBrowserFilterDetail, PortalBrowserStore } from "../arcgis-portal-browser/utils/store.js";
4
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
5
+
6
+ export abstract class ArcgisPortalBrowserFilterDate extends LitElement {
7
+ /** @internal */
8
+ protected _messages: {
9
+ browser: {
10
+ refineContent: string;
11
+ close: string;
12
+ loading: string;
13
+ };
14
+ range: {
15
+ summary: string;
16
+ announcement: string;
17
+ };
18
+ filterStatus: {
19
+ filters: string;
20
+ additional: string;
21
+ clearAllFilters: string;
22
+ };
23
+ filterDate: {
24
+ title: {
25
+ created: string;
26
+ modified: string;
27
+ };
28
+ clear: string;
29
+ created: string;
30
+ modified: string;
31
+ today: string;
32
+ yesterday: string;
33
+ last7: string;
34
+ last30: string;
35
+ never: string;
36
+ custom: string;
37
+ };
38
+ } & T9nMeta<{
39
+ browser: {
40
+ refineContent: string;
41
+ close: string;
42
+ loading: string;
43
+ };
44
+ range: {
45
+ summary: string;
46
+ announcement: string;
47
+ };
48
+ filterStatus: {
49
+ filters: string;
50
+ additional: string;
51
+ clearAllFilters: string;
52
+ };
53
+ filterDate: {
54
+ title: {
55
+ created: string;
56
+ modified: string;
57
+ };
58
+ clear: string;
59
+ created: string;
60
+ modified: string;
61
+ today: string;
62
+ yesterday: string;
63
+ last7: string;
64
+ last30: string;
65
+ never: string;
66
+ custom: string;
67
+ };
68
+ }>;
69
+ /** End date for user-defined range. */
70
+ accessor end: Date | number | string | null | undefined;
71
+ /**
72
+ * Set to true to open the filter on first load.
73
+ *
74
+ * @default false
75
+ */
76
+ accessor expanded: boolean;
77
+ /**
78
+ * Set to true to include the never option.
79
+ *
80
+ * @default false
81
+ */
82
+ accessor includeNever: boolean;
83
+ /**
84
+ * Id of the date filter in the browser store.
85
+ *
86
+ * @default "created"
87
+ */
88
+ accessor property: PortalBrowserDateProperty;
89
+ /** Well known date ranges, or custom for user-defined ranges. */
90
+ accessor range: PortalBrowserDateRange;
91
+ /** Property key to use in generated query expressions. */
92
+ accessor serverProperty: string | undefined;
93
+ /** Start date for user-defined range. */
94
+ accessor start: Date | number | string | null | undefined;
95
+ /** Shared browser store used to reset this filter when removed externally. */
96
+ accessor store: PortalBrowserStore | undefined;
97
+ readonly arcgisBrowserFilter: import("@arcgis/lumina").TargetedEvent<this, PortalBrowserDateDetail>;
98
+ readonly "@eventTypes": {
99
+ arcgisBrowserFilter: ArcgisPortalBrowserFilterDate["arcgisBrowserFilter"]["detail"];
100
+ };
101
+ }
102
+
103
+ export type PortalBrowserDateProperty = "created" | "modified";
104
+
105
+ export type PortalBrowserDateRange = (typeof portalBrowserDateRanges)[number] | null;
106
+
107
+ export type PortalBrowserDateDetail = PortalBrowserFilterDetail
108
+ & {
109
+ range: PortalBrowserDateRange;
110
+ start?: Date;
111
+ end?: Date;
112
+ };
113
+
114
+ export const portalBrowserDateRanges: readonly [
115
+ "custom",
116
+ "last30",
117
+ "last7",
118
+ "never",
119
+ "today",
120
+ "yesterday"
121
+ ];
@@ -0,0 +1,117 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as u } from "../../chunks/runtime.js";
3
+ import { watch as m } from "@arcgis/core/core/reactiveUtils.js";
4
+ import { LitElement as g, createEvent as p, nothing as f } from "@arcgis/lumina";
5
+ import { debounce as v } from "@arcgis/toolkit/function";
6
+ import { css as D, html as o } from "lit";
7
+ import { createRef as y, ref as w } from "lit/directives/ref.js";
8
+ import { u as b } from "../../chunks/useT9n.js";
9
+ import "../arcgis-portal-browser-filter/customElement.js";
10
+ const n = 1440 * 60 * 1e3;
11
+ function i(a) {
12
+ const e = typeof a == "string" ? Number.parseInt(a, 10) : typeof a == "number" ? a : (a ?? /* @__PURE__ */ new Date()).valueOf(), t = new Date(e);
13
+ return t.setHours(0, 0, 0, 0), t.valueOf();
14
+ }
15
+ function h(a) {
16
+ return i(a) + n - 1;
17
+ }
18
+ const k = 7 * n, $ = D`:host{display:block}.custom-date-picker{margin-top:.5rem;margin-bottom:.5rem;margin-inline-start:1.75rem;width:12.75rem}`, d = ["custom", "last30", "last7", "never", "today", "yesterday"];
19
+ class P extends g {
20
+ constructor() {
21
+ super(...arguments), this._messages = b({ name: "portal-browser", blocking: !0 }), this._datePicker = y(), this.today = "", this.debouncedRangeChangeHandler = v(() => this.rangeChangeHandler(), 200), this.property = "created", this.range = null, this.expanded = !1, this.includeNever = !1, this.arcgisBrowserFilter = p();
22
+ }
23
+ static {
24
+ this.properties = { property: 1, serverProperty: 1, range: 1, start: 1, end: 1, store: 0, expanded: 5, includeNever: 5 };
25
+ }
26
+ static {
27
+ this.styles = $;
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback();
31
+ const e = /* @__PURE__ */ new Date();
32
+ this.today = `${e.getFullYear()}-${e.getMonth() + 1}-${e.getDate()}`, this.attachStoreWatcher(), this.range && (this.range !== "custom" || this.start && this.end) && this.arcgisBrowserFilter.emit(this.getEventDetail());
33
+ }
34
+ willUpdate(e) {
35
+ (e.has("store") || e.has("property")) && this.attachStoreWatcher(), (e.has("range") || e.has("start") || e.has("end")) && this.range === "custom" && this.setDatePickerValue();
36
+ }
37
+ disconnectedCallback() {
38
+ this.removeStoreWatcher?.(), super.disconnectedCallback();
39
+ }
40
+ attachStoreWatcher() {
41
+ if (this.removeStoreWatcher?.(), !this.store)
42
+ return;
43
+ const e = m(() => {
44
+ const t = this.store?.filters?.[this.property];
45
+ return {
46
+ value: t?.value,
47
+ additionalParams: t?.additionalParams
48
+ };
49
+ }, () => {
50
+ const t = this.store?.filters?.[this.property];
51
+ !(t?.value || t?.additionalParams) && this.isActive() && this.resetDatePicker();
52
+ });
53
+ this.removeStoreWatcher = () => e.remove();
54
+ }
55
+ resetDatePicker() {
56
+ this.range = null, this.start = null, this.end = null, this._datePicker.value && (this._datePicker.value.valueAsDate = []);
57
+ }
58
+ getValue() {
59
+ const e = i(), t = h();
60
+ switch (this.range) {
61
+ case "yesterday":
62
+ return [e - n, e - 1];
63
+ case "today":
64
+ return [e, t];
65
+ case "last7":
66
+ return [e - k, t];
67
+ case "last30":
68
+ return [e - n * 30, t];
69
+ case "never":
70
+ return [-1, -1];
71
+ case "custom": {
72
+ const s = i(this.start), r = h(this.end);
73
+ return [s, r];
74
+ }
75
+ default:
76
+ return null;
77
+ }
78
+ }
79
+ getEventDetail() {
80
+ const e = this._messages?.filterDate, t = this.getValue(), s = this.serverProperty ?? (this.property === "modified" ? "modified" : "uploaded"), r = this.range ? e?.[this.range] ?? "" : "", c = e?.[this.property] ?? "";
81
+ return {
82
+ id: this.property,
83
+ value: t ? `(${s}:[${t[0]} TO ${t[1]}])` : "",
84
+ range: this.range,
85
+ start: t ? new Date(t[0]) : void 0,
86
+ end: t ? new Date(t[1]) : void 0,
87
+ label: this.range ? c.replace("${date}", r) : ""
88
+ };
89
+ }
90
+ isActive() {
91
+ return !!(this.range && (this.range !== "custom" || this.start && this.end));
92
+ }
93
+ setDatePickerValue() {
94
+ !this._datePicker.value || this.range !== "custom" || !this.start || !this.end || (this._datePicker.value.valueAsDate = [new Date(i(this.start)), new Date(i(this.end))]);
95
+ }
96
+ rangeChangeHandler() {
97
+ const e = this._datePicker.value?.valueAsDate, [t, s] = Array.isArray(e) ? e : [];
98
+ t && s && (this.start = t, this.end = s, this.arcgisBrowserFilter.emit(this.getEventDetail()));
99
+ }
100
+ renderRange(e) {
101
+ const s = this._messages?.filterDate;
102
+ return o`<calcite-tree-item data-range=${e ?? f} .selected=${e === this.range}>${s?.[e] ?? ""}</calcite-tree-item>`;
103
+ }
104
+ render() {
105
+ const t = this._messages?.filterDate, s = this.includeNever ? d : d.filter((r) => r !== "never");
106
+ return o`<arcgis-portal-browser-filter .heading=${t?.title?.[this.property] ?? ""} .expanded=${this.expanded} .active=${this.isActive()} .clearLabel=${t?.clear ?? ""} .filterId=${this.property} @arcgisBrowserFilterRemove=${() => {
107
+ this.resetDatePicker(), this.arcgisBrowserFilter.emit(this.getEventDetail());
108
+ }}><calcite-tree selection-mode=children scale=m @calciteTreeSelect=${(r) => {
109
+ const l = r.target.selectedItems?.[0]?.dataset.range;
110
+ this.range = this.range === l ? null : l, !(this.range === "custom" && !(this.start && this.end)) && this.arcgisBrowserFilter.emit(this.getEventDetail());
111
+ }}>${s.map((r) => this.renderRange(r))}</calcite-tree>${this.range === "custom" && o`<calcite-input-date-picker class="custom-date-picker" @calciteInputDatePickerChange=${() => this.debouncedRangeChangeHandler()} scale=s .max=${this.today} calendars=1 layout=vertical month-style=abbreviated proximity-selection-disabled range ${w(this._datePicker)}></calcite-input-date-picker>` || ""}</arcgis-portal-browser-filter>`;
112
+ }
113
+ }
114
+ u("arcgis-portal-browser-filter-date", P);
115
+ export {
116
+ P as ArcgisPortalBrowserFilterDate
117
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,5 @@
1
+ import "@esri/calcite-components/components/calcite-tree-item";
2
+ import "../arcgis-portal-browser-filter/index.js";
3
+ import "@esri/calcite-components/components/calcite-tree";
4
+ import "@esri/calcite-components/components/calcite-input-date-picker";
5
+ export * from "./customElement.js";
@@ -0,0 +1,81 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
+ import type { PortalBrowserFilterDetail } from "../arcgis-portal-browser/utils/store.js";
4
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
5
+
6
+ export abstract class ArcgisPortalBrowserFilterStatus extends LitElement {
7
+ /** @internal */
8
+ protected _messages: {
9
+ browser: {
10
+ refineContent: string;
11
+ close: string;
12
+ loading: string;
13
+ };
14
+ range: {
15
+ summary: string;
16
+ announcement: string;
17
+ };
18
+ filterStatus: {
19
+ filters: string;
20
+ additional: string;
21
+ clearAllFilters: string;
22
+ };
23
+ filterDate: {
24
+ title: {
25
+ created: string;
26
+ modified: string;
27
+ };
28
+ clear: string;
29
+ created: string;
30
+ modified: string;
31
+ today: string;
32
+ yesterday: string;
33
+ last7: string;
34
+ last30: string;
35
+ never: string;
36
+ custom: string;
37
+ };
38
+ } & T9nMeta<{
39
+ browser: {
40
+ refineContent: string;
41
+ close: string;
42
+ loading: string;
43
+ };
44
+ range: {
45
+ summary: string;
46
+ announcement: string;
47
+ };
48
+ filterStatus: {
49
+ filters: string;
50
+ additional: string;
51
+ clearAllFilters: string;
52
+ };
53
+ filterDate: {
54
+ title: {
55
+ created: string;
56
+ modified: string;
57
+ };
58
+ clear: string;
59
+ created: string;
60
+ modified: string;
61
+ today: string;
62
+ yesterday: string;
63
+ last7: string;
64
+ last30: string;
65
+ never: string;
66
+ custom: string;
67
+ };
68
+ }>;
69
+ /** Pass the width of the browser from state */
70
+ accessor browserWidth: number | undefined;
71
+ /** Pass the width of the component container */
72
+ accessor componentWidth: number | undefined;
73
+ accessor filters: Record<string, PortalBrowserFilterDetail>;
74
+ accessor hiddenFilterIds: string[];
75
+ readonly arcgisBrowserFilterClear: import("@arcgis/lumina").TargetedEvent<this, null>;
76
+ readonly arcgisBrowserFilterRemove: import("@arcgis/lumina").TargetedEvent<this, string>;
77
+ readonly "@eventTypes": {
78
+ arcgisBrowserFilterClear: ArcgisPortalBrowserFilterStatus["arcgisBrowserFilterClear"]["detail"];
79
+ arcgisBrowserFilterRemove: ArcgisPortalBrowserFilterStatus["arcgisBrowserFilterRemove"]["detail"];
80
+ };
81
+ }
@@ -0,0 +1,56 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as u } from "../../chunks/runtime.js";
3
+ import { keyed as p } from "lit/directives/keyed.js";
4
+ import { LitElement as m, createEvent as d } from "@arcgis/lumina";
5
+ import { css as b, html as e } from "lit";
6
+ import { b as f } from "../../chunks/ui.js";
7
+ import { g } from "../../chunks/dom.js";
8
+ import { u as w } from "../../chunks/useT9n.js";
9
+ const B = b`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`;
10
+ class v extends m {
11
+ constructor() {
12
+ super(...arguments), this._messages = w({ name: "portal-browser", blocking: !0 }), this.inBounds = [], this.outOfBounds = [], this.filters = {}, this.hiddenFilterIds = [], this.arcgisBrowserFilterClear = d(), this.arcgisBrowserFilterRemove = d();
13
+ }
14
+ static {
15
+ this.properties = { inBounds: 16, outOfBounds: 16, filters: 0, hiddenFilterIds: 0, componentWidth: 9, browserWidth: 9 };
16
+ }
17
+ static {
18
+ this.styles = B;
19
+ }
20
+ connectedCallback() {
21
+ super.connectedCallback(), this.processValidFilters();
22
+ }
23
+ willUpdate(t) {
24
+ (t.has("filters") || t.has("hiddenFilterIds") || t.has("componentWidth") || t.has("browserWidth")) && this.processValidFilters();
25
+ }
26
+ isFilterValid(t) {
27
+ return this.hiddenFilterIds.includes(t.id) ? !1 : t.id === "collaborations" && "additionalParams" in t ? !!(t.additionalParams && t.label) : !!(t.value && t.label);
28
+ }
29
+ processValidFilters() {
30
+ const t = Object.values(this.filters).filter(this.isFilterValid.bind(this)), s = this.componentWidth ?? 0;
31
+ if ((this.browserWidth ?? window.innerWidth) < f.sm) {
32
+ this.inBounds = t, this.outOfBounds = [];
33
+ return;
34
+ }
35
+ const h = Math.max(s - 460, 0);
36
+ let a = 0;
37
+ const l = [], n = [];
38
+ t.forEach((r) => {
39
+ const c = g({ text: r.label });
40
+ !s || a + c <= h ? (l.push(r), a += c) : n.push(r);
41
+ }), this.inBounds = l, this.outOfBounds = n;
42
+ }
43
+ renderChip(t) {
44
+ return p(t.id, e`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${() => {
45
+ this.arcgisBrowserFilterRemove.emit(t.id);
46
+ }}><span class="status-chip__label">${t.label}</span></calcite-chip>`);
47
+ }
48
+ render() {
49
+ const t = this._messages.filterStatus, s = this.outOfBounds.length > 0, o = this.inBounds.length + this.outOfBounds.length;
50
+ return o ? e`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map((i) => this.renderChip(i))}${s && e`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>` || ""}</calcite-chip-group>${s && e`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map((i) => this.renderChip(i))}</calcite-chip-group></div></calcite-popover>` || ""}${o > 1 && e`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${() => this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>` || ""}</div>` : null;
51
+ }
52
+ }
53
+ u("arcgis-portal-browser-filter-status", v);
54
+ export {
55
+ v as ArcgisPortalBrowserFilterStatus
56
+ };
@@ -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-chip-group";
3
+ import "@esri/calcite-components/components/calcite-button";
4
+ import "@esri/calcite-components/components/calcite-popover";
5
+ export * from "./customElement.js";
@@ -0,0 +1,7 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
+ import type { PortalBrowserStore } from "../arcgis-portal-browser/utils/store.js";
4
+
5
+ export abstract class ArcgisPortalBrowserFilters extends LitElement {
6
+ accessor store: PortalBrowserStore | undefined;
7
+ }
@@ -0,0 +1,29 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as e } from "../../chunks/runtime.js";
3
+ import { css as o, html as r } from "lit";
4
+ import { LitElement as i, safeClassMap as l } from "@arcgis/lumina";
5
+ import { createRef as a, ref as c } from "lit/directives/ref.js";
6
+ import { b as n } from "../../chunks/ui.js";
7
+ const p = o`:host{display:block}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}`;
8
+ class d extends i {
9
+ constructor() {
10
+ super(...arguments), this._accordionRef = a();
11
+ }
12
+ static {
13
+ this.properties = { store: 0 };
14
+ }
15
+ static {
16
+ this.styles = p;
17
+ }
18
+ updated() {
19
+ this.store && this._accordionRef.value && (this.store.filterElement = this._accordionRef.value);
20
+ }
21
+ render() {
22
+ const t = this.store, s = !!t?.panel || (t?.width ?? 0) < n.sm;
23
+ return r`<div class="filters-shell" .inert=${!!t?.preview}><div class=${l({ "filters-shell__top": !0, "filters-shell__top--padded": s })}><slot name=top></slot></div><slot name=primary></slot><slot name=title></slot><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m ${c(this._accordionRef)}><slot></slot></calcite-accordion><slot name=bottom></slot></div>`;
24
+ }
25
+ }
26
+ e("arcgis-portal-browser-filters", d);
27
+ export {
28
+ d as ArcgisPortalBrowserFilters
29
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-accordion";
2
+ export * from "./customElement.js";
@@ -0,0 +1,102 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type PortalGroup from "@arcgis/core/portal/PortalGroup.js";
3
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
4
+ import type { GroupBadgesPortal } from "./types.js";
5
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
6
+ import type { Chip as Chip } from "@esri/calcite-components/components/calcite-chip";
7
+
8
+ /** Groups can have special statuses and capabilities. This component derives and renders badges for those states. */
9
+ export abstract class ArcgisPortalGroupBadges extends LitElement {
10
+ /** @internal */
11
+ protected _messages: {
12
+ Collaboration: {
13
+ title: string;
14
+ tooltip: string;
15
+ };
16
+ FeaturedContent: {
17
+ title: string;
18
+ tooltip: string;
19
+ };
20
+ Gallery: {
21
+ title: string;
22
+ tooltip: string;
23
+ };
24
+ OpenData: {
25
+ title: string;
26
+ tooltip: string;
27
+ };
28
+ SharedUpdate: {
29
+ title: string;
30
+ tooltip: string;
31
+ };
32
+ Partnered: {
33
+ title: string;
34
+ tooltip: string;
35
+ };
36
+ AnyOrg: {
37
+ title: string;
38
+ tooltip: string;
39
+ };
40
+ loading: string;
41
+ } & T9nMeta<{
42
+ Collaboration: {
43
+ title: string;
44
+ tooltip: string;
45
+ };
46
+ FeaturedContent: {
47
+ title: string;
48
+ tooltip: string;
49
+ };
50
+ Gallery: {
51
+ title: string;
52
+ tooltip: string;
53
+ };
54
+ OpenData: {
55
+ title: string;
56
+ tooltip: string;
57
+ };
58
+ SharedUpdate: {
59
+ title: string;
60
+ tooltip: string;
61
+ };
62
+ Partnered: {
63
+ title: string;
64
+ tooltip: string;
65
+ };
66
+ AnyOrg: {
67
+ title: string;
68
+ tooltip: string;
69
+ };
70
+ loading: string;
71
+ }>;
72
+ /** Appearance of the chips used for group badges. */
73
+ accessor appearance: Chip["appearance"] | undefined;
74
+ /**
75
+ * Reflected flag that indicates no badges were generated for the current input.
76
+ *
77
+ * @default false
78
+ */
79
+ accessor empty: boolean;
80
+ /** PortalGroup instance for deriving badge states from sourceJSON. */
81
+ accessor group: PortalGroup | undefined;
82
+ /** Current Portal instance. */
83
+ accessor portal: GroupBadgesPortal | undefined;
84
+ /**
85
+ * Size of each badge chip.
86
+ *
87
+ * @default "m"
88
+ */
89
+ accessor scale: Chip["scale"];
90
+ /**
91
+ * Enables tooltip text for each badge.
92
+ *
93
+ * @default false
94
+ */
95
+ accessor showTooltips: boolean;
96
+ /**
97
+ * Full width shows label text, narrow renders icon only.
98
+ *
99
+ * @default "full"
100
+ */
101
+ accessor width: "full" | "narrow";
102
+ }
@@ -0,0 +1,50 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as g } from "../../chunks/runtime.js";
3
+ import { nothing as m, safeClassMap as h, LitElement as u } from "@arcgis/lumina";
4
+ import { u as b } from "../../chunks/useT9n.js";
5
+ import { html as c, css as f } from "lit";
6
+ import { g as w, a as $, b as x, i as y, c as G, d as v } from "../../chunks/groups.js";
7
+ const O = ({ appearance: a, badgeType: t, class: e, messages: r, scale: i, showTooltip: o, width: n }) => {
8
+ const s = r[t] ?? { title: t, tooltip: "" }, d = C[t], l = n === "narrow", p = `portal-group-badge-${t}`;
9
+ return c`<calcite-chip id=${p ?? m} class=${h({
10
+ badge: !0,
11
+ "badge--red": t === "SharedUpdate",
12
+ narrow: l,
13
+ [`narrow--${i}`]: l,
14
+ [e]: !0
15
+ })} .value=${t} tabindex=0 .scale=${i} .appearance=${a} .label=${s.title} .icon=${d}>${l ? null : s.title}</calcite-chip>${o ? c`<calcite-tooltip .referenceElement=${p} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0>${l ? c`<h3 class="tooltip-title">${s.title}</h3>` : null}<p class="tooltip-text">${s.tooltip}</p></calcite-tooltip>` : null}`;
16
+ }, C = {
17
+ Collaboration: "collaboration",
18
+ FeaturedContent: "home",
19
+ Gallery: "images",
20
+ OpenData: "open-data",
21
+ SharedUpdate: "configure-editing",
22
+ Partnered: "partnered-collaboration",
23
+ AnyOrg: "zoom-to-object"
24
+ }, I = f`:host{display:flex;flex-wrap:wrap}.portal-group-badges__badge{display:inline-block;margin-inline-end:.25rem}.badge{--portal-group-badge-color: var(--calcite-color-brand);border:0}.badge--red{--portal-group-badge-color: var(--calcite-color-status-danger)}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.image{border-radius:0;display:inline-flex;align-items:center;justify-content:center;margin-inline-start:.5rem}.image svg{color:var(--portal-group-badge-color)}.narrow--s{width:1.5rem;.image{margin-inline-start:0}}.narrow--m{.image{margin-inline-start:0}}.narrow--l{width:2.75rem;.image{margin-inline-start:.25rem}}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}`;
25
+ function S(a, t) {
26
+ const e = [], r = w(a), i = $(a), o = x(a);
27
+ return t.id && (r.includes("updateitemcontrol") && e.push("SharedUpdate"), y(a) && i === t.id && e.push("OpenData"), t.featuredItemsGroupQuery === `id:${a.id}` && e.push("Gallery")), (G(a).collaborationInfo?.collaborationId || v(a)) && e.push("Collaboration"), !o && !t.isPortal && i !== "none" && e.push("AnyOrg"), o === "collaboration" && e.push("Partnered"), e.includes("SharedUpdate") && !e.includes("Partnered") && i !== t.id && e.splice(e.indexOf("SharedUpdate"), 1), e;
28
+ }
29
+ class z extends u {
30
+ constructor() {
31
+ super(...arguments), this._messages = b({ blocking: !0 }), this.badges = [], this.width = "full", this.scale = "m", this.showTooltips = !1, this.empty = !1;
32
+ }
33
+ static {
34
+ this.properties = { badges: 16, group: 0, portal: 0, width: 1, appearance: 1, scale: 1, showTooltips: 5, empty: 7 };
35
+ }
36
+ static {
37
+ this.styles = I;
38
+ }
39
+ willUpdate(t) {
40
+ (t.has("group") || t.has("portal")) && (this.badges = this.group && this.portal ? S(this.group, this.portal) : [], this.empty = this.badges.length === 0);
41
+ }
42
+ render() {
43
+ const { appearance: t, badges: e, scale: r, showTooltips: i, width: o } = this;
44
+ return e.map((n) => O({ appearance: t, badgeType: n, class: "portal-group-badges__badge", messages: this._messages, scale: r, showTooltip: i, width: o }));
45
+ }
46
+ }
47
+ g("arcgis-portal-group-badges", z);
48
+ export {
49
+ z as ArcgisPortalGroupBadges
50
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,3 @@
1
+ import "@esri/calcite-components/components/calcite-chip";
2
+ import "@esri/calcite-components/components/calcite-tooltip";
3
+ export * from "./customElement.js";
@@ -0,0 +1,3 @@
1
+ import type Portal from "@arcgis/core/portal/Portal.js";
2
+
3
+ export type GroupBadgesPortal = Partial<Pick<Portal, "featuredItemsGroupQuery" | "homePageFeaturedContent" | "id" | "isPortal">>;