@arcgis/portal-components 5.2.0-next.24 → 5.2.0-next.26

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 (63) hide show
  1. package/dist/cdn/{PZJAY7AM.js → 32CZ4VLI.js} +1 -1
  2. package/dist/cdn/{W7JNOIYK.js → 47NPIL2S.js} +1 -1
  3. package/dist/cdn/{IANXXLKE.js → BZTVED5W.js} +1 -1
  4. package/dist/cdn/{4PKNGQ3Q.js → CHSZSBO6.js} +1 -1
  5. package/dist/cdn/DY5G63YO.js +2 -0
  6. package/dist/cdn/ECNI2A4K.js +2 -0
  7. package/dist/cdn/EZ3BR2FP.js +134 -0
  8. package/dist/cdn/{IVD6XJNI.js → FRDK7SCC.js} +1 -1
  9. package/dist/cdn/{SY6RBNVT.js → GDZZCADX.js} +1 -1
  10. package/dist/cdn/GJ26ZIE5.js +2 -0
  11. package/dist/cdn/GNS7NA7V.js +2 -0
  12. package/dist/cdn/HB7GO6ST.js +2 -0
  13. package/dist/cdn/M7ABAD7K.js +2 -0
  14. package/dist/cdn/O7ICV6C7.js +2 -0
  15. package/dist/cdn/OKHKS5RH.js +2 -0
  16. package/dist/cdn/{PDL3DPMG.js → PFCDINAN.js} +1 -1
  17. package/dist/cdn/{GPGWYQ7V.js → Q4RHXODL.js} +109 -90
  18. package/dist/cdn/QOFH6DQT.js +2 -0
  19. package/dist/cdn/RJPBPB45.js +2 -0
  20. package/dist/cdn/S5XNEB7F.js +99 -0
  21. package/dist/cdn/S745KWLM.js +34 -0
  22. package/dist/cdn/ULD747OT.js +22 -0
  23. package/dist/cdn/VSKX2QMZ.js +2 -0
  24. package/dist/cdn/{GDYQWDWB.js → VTLIQOV4.js} +1 -1
  25. package/dist/cdn/{EZZ66WTI.js → YGKPNY5R.js} +1 -1
  26. package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -1
  27. package/dist/cdn/index.js +1 -1
  28. package/dist/cdn/main.css +1 -1
  29. package/dist/components/arcgis-portal-browser/customElement.d.ts +30 -0
  30. package/dist/components/arcgis-portal-browser/customElement.js +4 -1
  31. package/dist/components/arcgis-portal-browser/utils/store.d.ts +2 -0
  32. package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +57 -0
  33. package/dist/components/arcgis-portal-browser-filter/customElement.js +34 -0
  34. package/dist/components/arcgis-portal-browser-filter/index.d.ts +1 -0
  35. package/dist/components/arcgis-portal-browser-filter/index.js +4 -0
  36. package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +121 -0
  37. package/dist/components/arcgis-portal-browser-filter-date/customElement.js +117 -0
  38. package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +1 -0
  39. package/dist/components/arcgis-portal-browser-filter-date/index.js +5 -0
  40. package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +64 -8
  41. package/dist/components/arcgis-portal-browser-filter-status/customElement.js +26 -25
  42. package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +7 -0
  43. package/dist/components/arcgis-portal-browser-filters/customElement.js +29 -0
  44. package/dist/components/arcgis-portal-browser-filters/index.d.ts +1 -0
  45. package/dist/components/arcgis-portal-browser-filters/index.js +2 -0
  46. package/dist/docs/api.json +1 -1
  47. package/dist/docs/docs.json +1 -1
  48. package/dist/docs/vscode.html-custom-data.json +1 -1
  49. package/dist/docs/web-types.json +1 -1
  50. package/dist/index.d.ts +24 -0
  51. package/dist/loader.js +6 -3
  52. package/dist/types/lumina.d.ts +18 -1
  53. package/dist/types/preact.d.ts +21 -1
  54. package/dist/types/react.d.ts +24 -1
  55. package/dist/types/stencil.d.ts +18 -1
  56. package/package.json +4 -4
  57. package/dist/cdn/ANPXRYLV.js +0 -5
  58. package/dist/cdn/GAHILDQF.js +0 -45
  59. package/dist/cdn/R2ULEQSR.js +0 -2
  60. package/dist/cdn/RFZCHE7J.js +0 -2
  61. package/dist/cdn/XDMQ36GP.js +0 -2
  62. package/dist/cdn/XPYGLVPT.js +0 -2
  63. package/dist/cdn/YL7PGYWC.js +0 -5
@@ -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";
@@ -1,25 +1,81 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
3
  import type { PortalBrowserFilterDetail } from "../arcgis-portal-browser/utils/store.js";
4
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
4
5
 
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
+ }>;
6
69
  /** Pass the width of the browser from state */
7
70
  accessor browserWidth: number | undefined;
8
71
  /** Pass the width of the component container */
9
72
  accessor componentWidth: number | undefined;
10
73
  accessor filters: Record<string, PortalBrowserFilterDetail>;
11
74
  accessor hiddenFilterIds: string[];
12
- accessor t9n: FilterStatusT9n;
13
75
  readonly arcgisBrowserFilterClear: import("@arcgis/lumina").TargetedEvent<this, null>;
14
76
  readonly arcgisBrowserFilterRemove: import("@arcgis/lumina").TargetedEvent<this, string>;
15
77
  readonly "@eventTypes": {
16
78
  arcgisBrowserFilterClear: ArcgisPortalBrowserFilterStatus["arcgisBrowserFilterClear"]["detail"];
17
79
  arcgisBrowserFilterRemove: ArcgisPortalBrowserFilterStatus["arcgisBrowserFilterRemove"]["detail"];
18
80
  };
19
- }
20
-
21
- export type FilterStatusT9n = {
22
- filters: string;
23
- additional: string;
24
- clearAllFilters: string;
25
- };
81
+ }
@@ -1,20 +1,21 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as h } from "../../chunks/runtime.js";
3
- import { keyed as u } from "lit/directives/keyed.js";
4
- import { LitElement as p, createEvent as c } from "@arcgis/lumina";
5
- import { css as m, html as s } from "lit";
6
- import { b } from "../../chunks/ui.js";
7
- import { g as f } from "../../chunks/dom.js";
8
- const w = m`: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}`;
9
- class B extends p {
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 {
10
11
  constructor() {
11
- super(...arguments), this.inBounds = [], this.outOfBounds = [], this.filters = {}, this.hiddenFilterIds = [], this.arcgisBrowserFilterClear = c(), this.arcgisBrowserFilterRemove = c();
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();
12
13
  }
13
14
  static {
14
- this.properties = { inBounds: 16, outOfBounds: 16, filters: 0, hiddenFilterIds: 0, t9n: 0, componentWidth: 9, browserWidth: 9 };
15
+ this.properties = { inBounds: 16, outOfBounds: 16, filters: 0, hiddenFilterIds: 0, componentWidth: 9, browserWidth: 9 };
15
16
  }
16
17
  static {
17
- this.styles = w;
18
+ this.styles = B;
18
19
  }
19
20
  connectedCallback() {
20
21
  super.connectedCallback(), this.processValidFilters();
@@ -26,30 +27,30 @@ class B extends p {
26
27
  return this.hiddenFilterIds.includes(t.id) ? !1 : t.id === "collaborations" && "additionalParams" in t ? !!(t.additionalParams && t.label) : !!(t.value && t.label);
27
28
  }
28
29
  processValidFilters() {
29
- const t = Object.values(this.filters).filter(this.isFilterValid.bind(this)), i = this.componentWidth ?? 0;
30
- if ((this.browserWidth ?? window.innerWidth) < b.sm) {
30
+ const t = Object.values(this.filters).filter(this.isFilterValid.bind(this)), s = this.componentWidth ?? 0;
31
+ if ((this.browserWidth ?? window.innerWidth) < f.sm) {
31
32
  this.inBounds = t, this.outOfBounds = [];
32
33
  return;
33
34
  }
34
- const d = Math.max(i - 460, 0);
35
- let r = 0;
36
- const a = [], l = [];
37
- t.forEach((o) => {
38
- const n = f({ text: o.label ?? "" });
39
- !i || r + n <= d ? (a.push(o), r += n) : l.push(o);
40
- }), this.inBounds = a, this.outOfBounds = l;
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;
41
42
  }
42
43
  renderChip(t) {
43
- return u(t.id, s`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${() => {
44
+ return p(t.id, e`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${() => {
44
45
  this.arcgisBrowserFilterRemove.emit(t.id);
45
46
  }}><span class="status-chip__label">${t.label}</span></calcite-chip>`);
46
47
  }
47
48
  render() {
48
- const t = this.outOfBounds.length > 0, i = this.inBounds.length + this.outOfBounds.length;
49
- return i ? s`<div class="status-list"><calcite-chip-group class="chip-group" .label=${this.t9n.filters} scale=s>${this.inBounds.map((e) => this.renderChip(e))}${t && s`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>` || ""}</calcite-chip-group>${t && s`<calcite-popover .label=${this.t9n.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${this.t9n.additional} scale=s>${this.outOfBounds.map((e) => this.renderChip(e))}</calcite-chip-group></div></calcite-popover>` || ""}${i > 1 && s`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${() => this.arcgisBrowserFilterClear.emit(null)}>${this.t9n.clearAllFilters}</calcite-button>` || ""}</div>` : null;
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;
50
51
  }
51
52
  }
52
- h("arcgis-portal-browser-filter-status", B);
53
+ u("arcgis-portal-browser-filter-status", v);
53
54
  export {
54
- B as ArcgisPortalBrowserFilterStatus
55
+ v as ArcgisPortalBrowserFilterStatus
55
56
  };
@@ -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";