@arcgis/portal-components 5.2.0-next.111 → 5.2.0-next.113

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 (31) hide show
  1. package/dist/cdn/2PAD5NQT.js +66 -0
  2. package/dist/cdn/AEG3QAZ2.js +2 -0
  3. package/dist/cdn/{TEJNR4L2.js → BJA2P3AN.js} +1 -1
  4. package/dist/cdn/{YVTMB4LN.js → R2D2KBV7.js} +1 -1
  5. package/dist/cdn/RTWFHVRS.js +2 -0
  6. package/dist/cdn/assets/portal-sublayer-type/t9n/messages.en.json +1 -0
  7. package/dist/cdn/index.js +1 -1
  8. package/dist/cdn/main.css +1 -1
  9. package/dist/components/arcgis-portal-group-browser/customElement.js +78 -64
  10. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +1 -1
  11. package/dist/components/arcgis-portal-navigation/index.js +1 -1
  12. package/dist/components/arcgis-portal-sublayer-type/customElement.d.ts +76 -0
  13. package/dist/components/arcgis-portal-sublayer-type/customElement.js +121 -0
  14. package/dist/components/arcgis-portal-sublayer-type/index.d.ts +1 -0
  15. package/dist/components/arcgis-portal-sublayer-type/index.js +2 -0
  16. package/dist/components/arcgis-portal-sublayer-type/utils.d.ts +30 -0
  17. package/dist/docs/api.json +1 -1
  18. package/dist/docs/docs.json +1 -1
  19. package/dist/docs/vscode.html-custom-data.json +1 -1
  20. package/dist/docs/web-types.json +1 -1
  21. package/dist/index.d.ts +4 -0
  22. package/dist/loader.js +1 -0
  23. package/dist/types/geometry.d.ts +8 -0
  24. package/dist/types/item.d.ts +6 -6
  25. package/dist/types/lumina.d.ts +5 -0
  26. package/dist/types/preact.d.ts +6 -0
  27. package/dist/types/react.d.ts +7 -0
  28. package/dist/types/stencil.d.ts +5 -0
  29. package/package.json +7 -7
  30. package/dist/cdn/5GVRBSEU.js +0 -66
  31. package/dist/cdn/AOI3RSNY.js +0 -2
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as I } from "../../chunks/runtime.js";
2
+ import { c as E } from "../../chunks/runtime.js";
3
3
  import { css as q, html as u } from "lit";
4
4
  import { keyed as D } from "lit/directives/keyed.js";
5
5
  import { substitute as f } from "@arcgis/core/intl.js";
@@ -17,20 +17,20 @@ import "../arcgis-portal-group-browser-preview/customElement.js";
17
17
  import { c as j } from "../../chunks/store.js";
18
18
  import { i as K, g as J, b as X, a as Y, c as Z, d as ee } from "../../chunks/query.js";
19
19
  import re from "@arcgis/core/portal/PortalGroup.js";
20
- import { r as te } from "../../chunks/request.js";
21
- import { a as se } from "../../chunks/portal.js";
20
+ import { r as se } from "../../chunks/request.js";
21
+ import { a as te } from "../../chunks/portal.js";
22
22
  import { g as b, a as v, d as x, w as ie } from "../../chunks/portal-browser-filter-date.js";
23
23
  import { b as O } from "../../chunks/ui.js";
24
24
  import { watch as oe } from "@arcgis/core/core/reactiveUtils.js";
25
25
  import { PortalGroupBrowserSort as ae } from "../portal-group-browser-sort/customElement.js";
26
26
  import { PortalGroupBrowserPagination as ne } from "../portal-group-browser-pagination/customElement.js";
27
27
  import { PortalGroupBrowserFilters as le } from "../portal-group-browser-filters/customElement.js";
28
- const k = {
28
+ const M = {
29
29
  select: "arcgisGroupCardSelect",
30
30
  preview: "arcgisGroupBrowserCardPreview"
31
31
  }, ce = q`:host{position:relative;background-color:var(--calcite-color-background);display:flex;flex-direction:column;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;--portal-group-browser-max-width: var(--group-browser-max-width, 100%);--portal-group-browser-pane-width: 18.75rem;--portal-group-browser-pane-z-index: 11;container-type:inline-size;container-name:portal-group-browser}arcgis-portal-browser{--arcgis-browser-max-width: var(--portal-group-browser-max-width);--arcgis-browser-pane-width: var(--portal-group-browser-pane-width);--arcgis-browser-pane-z-index: var(--portal-group-browser-pane-z-index)}.filters-title__heading{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1.2;margin:0;padding:1rem .5rem}.filters-title:has(>slot[name=before-filters][data-has-before-filters=true]) .filters-title__heading{border-bottom:1px solid var(--calcite-color-border-2)}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}.filter__accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.filter__actions-slot{display:flex;align-self:center;align-items:center;line-height:0}.filter__content{margin:0}.filter__content--padded{margin:-.75rem .5rem 0}.filter__content>calcite-tree>calcite-tree-item>a{padding-block:.25rem}.clear-button{line-height:1;margin-inline:.25rem}.custom-date-picker{margin-block:.5rem;margin-inline-start:1.75rem;width:12.75rem}.groups-by-user__label{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.special-groups-settings-option{display:inline-flex;align-items:center;gap:.25rem}.special-groups-settings-icon{display:inline-flex;align-items:center}.group-browser__results{display:grid;gap:.5rem}.group-browser__results--compact{gap:0}.group-browser__result-card{margin:0}@container portal-group-browser (max-width: 640px){arcgis-portal-browser{--portal-group-browser-pane-width: 100%}}.empty-text-slot{width:100%;height:100%;display:flex;justify-content:center}.empty-text-slot__default{@apply max-w-lg mx-auto px-6 pb-16;max-width:32rem;margin-inline:auto;padding-inline:1.5rem;padding-bottom:4rem;margin-top:min(8rem,30vh)}`;
32
32
  async function he(t, e) {
33
- const r = `${se(t)}community/groups`, s = me(e), i = ue(e), n = !!e.searchUser?.trim();
33
+ const r = `${te(t)}community/groups`, s = me(e), i = ue(e), n = !!e.searchUser?.trim();
34
34
  if (!s.trim() && !n)
35
35
  return {
36
36
  nextStart: -1,
@@ -41,7 +41,7 @@ async function he(t, e) {
41
41
  start: 0,
42
42
  total: 0
43
43
  };
44
- const a = { ...i, q: s }, o = await te({
44
+ const a = { ...i, q: s }, o = await se({
45
45
  url: r,
46
46
  portal: t,
47
47
  params: a
@@ -125,7 +125,7 @@ function y(t) {
125
125
  const e = Number.parseInt(t, 10);
126
126
  return Number.isFinite(e) && e > 0 ? e : void 0;
127
127
  }
128
- function M(t, e) {
128
+ function k(t, e) {
129
129
  const r = t.get(e);
130
130
  if (!w(be, r))
131
131
  return;
@@ -138,8 +138,8 @@ function M(t, e) {
138
138
  function W(t, e, r) {
139
139
  r?.range && (t.set(e, r.range), r.range === "custom" && (r.start && t.set(`${e}_from`, `${b(r.start)}`), r.end && t.set(`${e}_to`, `${v(r.end)}`)));
140
140
  }
141
- function E(t) {
142
- const e = t.get("searchTerm")?.trim() || t.get("q")?.trim() || void 0, r = t.get("sortField"), s = t.get("sortOrder"), i = y(t.get("start")), n = y(t.get("num")), a = t.get("access"), o = t.get("memberorgids"), c = t.get("membershipaccess"), l = t.get("owner"), p = t.get("specialGroups"), h = M(t, "created"), m = M(t, "modified");
141
+ function I(t) {
142
+ const e = t.get("searchTerm")?.trim() || t.get("q")?.trim() || void 0, r = t.get("sortField"), s = t.get("sortOrder"), i = y(t.get("start")), n = y(t.get("num")), a = t.get("access"), o = t.get("memberorgids"), c = t.get("membershipaccess"), l = t.get("owner"), p = t.get("specialGroups"), h = k(t, "created"), m = k(t, "modified");
143
143
  return {
144
144
  ...e ? { searchTerm: e } : {},
145
145
  ...w(we, r) ? { sortField: r } : {},
@@ -158,7 +158,7 @@ function E(t) {
158
158
  };
159
159
  }
160
160
  function B(t) {
161
- const e = E(t), { filters: r, num: s, sortField: i, sortOrder: n, start: a } = e, { access: o, created: c, memberOrg: l, membership: p, modified: h, owner: m, specialGroups: P } = r, d = {}, C = t.get("searchTerm")?.trim() || void 0, _ = t.get("q")?.trim() || void 0;
161
+ const e = I(t), { filters: r, num: s, sortField: i, sortOrder: n, start: a } = e, { access: o, created: c, memberOrg: l, membership: p, modified: h, owner: m, specialGroups: P } = r, d = {}, C = t.get("searchTerm")?.trim() || void 0, _ = t.get("q")?.trim() || void 0;
162
162
  return C && (d.searchTerm = C), _ && (d.q = _), i && (d.sortField = i), n && (d.sortOrder = n), a && (d.start = a), s && (d.num = s), o && (d.access = o), m && (d.owner = m), p && (d.membershipAccess = p), l && (d.memberOrgIds = l), P && (d.specialGroups = P), c?.range && (d.created = c.range), c?.start && (d.createdFrom = c.start.getTime()), c?.end && (d.createdTo = c.end.getTime()), h?.range && (d.modified = h.range), h?.start && (d.modifiedFrom = h.start.getTime()), h?.end && (d.modifiedTo = h.end.getTime()), d;
163
163
  }
164
164
  function Be(t) {
@@ -208,6 +208,35 @@ function F(t, e = "desc") {
208
208
  }
209
209
  }
210
210
  function $e(t) {
211
+ return !t || !(t instanceof HTMLElement) ? null : t;
212
+ }
213
+ async function Pe(t) {
214
+ if (t) {
215
+ if (t.restoreFocus) {
216
+ await t.restoreFocus();
217
+ return;
218
+ }
219
+ if (t.setFocus) {
220
+ await t.setFocus();
221
+ return;
222
+ }
223
+ t.focus?.();
224
+ }
225
+ }
226
+ function Ce(t) {
227
+ let e = null;
228
+ const r = async (i = {}) => {
229
+ t.onClose(), i.restoreFocus && await Pe(e);
230
+ };
231
+ return { handlePreview: (i, n) => {
232
+ if (!i?.id) {
233
+ r();
234
+ return;
235
+ }
236
+ e = $e(n), t.onOpen({ preview: i });
237
+ }, closePreview: r };
238
+ }
239
+ function _e(t) {
211
240
  let e, r, s;
212
241
  const i = () => {
213
242
  e?.();
@@ -258,7 +287,7 @@ function $e(t) {
258
287
  updateResponsiveLayout: n
259
288
  };
260
289
  }
261
- function Pe(t) {
290
+ function Ue(t) {
262
291
  let e = !1;
263
292
  const r = () => !!t.getSearchParamInteraction()?.read, s = () => !!t.getSearchParamInteraction()?.write;
264
293
  return { hydrateFromLocation: async () => {
@@ -304,9 +333,9 @@ const G = ["title", "relevance", "modified"], S = {
304
333
  "admin",
305
334
  "settings"
306
335
  ];
307
- class Ce extends L {
336
+ class Re extends L {
308
337
  constructor() {
309
- super(), this._messages = R({ name: "portal-group-browser", blocking: !0 }), this._browserMessages = R({ name: "portal-browser", blocking: !0 }), this.responsiveLayoutController = $e({
338
+ super(), this._messages = R({ name: "portal-group-browser", blocking: !0 }), this._browserMessages = R({ name: "portal-browser", blocking: !0 }), this.responsiveLayoutController = _e({
310
339
  el: this.el,
311
340
  getStore: () => this.store,
312
341
  getViewportWidth: () => this.viewportWidth,
@@ -321,7 +350,14 @@ class Ce extends L {
321
350
  setResponsiveFormFactor: (e) => {
322
351
  this.responsiveFormFactor = e;
323
352
  }
324
- }), this.restoreFocusTarget = null, this.browserResponse = this.getBrowserResponseFromQueryResponse(S), this.searchParamController = Pe({
353
+ }), this.previewSessionController = Ce({
354
+ onOpen: ({ preview: e }) => {
355
+ this.store.preview = e.id, this.arcgisGroupBrowserPreview.emit(e);
356
+ },
357
+ onClose: () => {
358
+ this.store.preview = null, this.arcgisGroupBrowserPreview.emit(null), this.arcgisGroupBrowserSublayerPreview.emit(null);
359
+ }
360
+ }), this.browserResponse = this.getBrowserResponseFromQueryResponse(S), this.previewGroupsById = /* @__PURE__ */ new Map(), this.searchParamController = Ue({
325
361
  applySearchParams: async (e) => {
326
362
  await this.applySearchParams(e);
327
363
  },
@@ -338,7 +374,7 @@ class Ce extends L {
338
374
  this.handleGroupCardSelect(e);
339
375
  }, this.onDelegatedGroupCardPreview = (e) => {
340
376
  this.handleGroupCardPreview(e);
341
- }, this.selectedOwner = null, this.selectedMembership = null, this.selectedMemberOrg = null, this.selectedSpecialGroup = null, this.selectedAccess = null, this.selectedGroups = [], this.previewGroup = null, this.queryResponse = S, this.specialGroupOptions = A, this.responsiveFormFactor = "large", this.viewportWidth = typeof window > "u" ? O.lg : window.innerWidth, this.hostWidth = 0, this.store = j({
377
+ }, this.selectedOwner = null, this.selectedMembership = null, this.selectedMemberOrg = null, this.selectedSpecialGroup = null, this.selectedAccess = null, this.selectedGroups = [], this.queryResponse = S, this.specialGroupOptions = A, this.responsiveFormFactor = "large", this.viewportWidth = typeof window > "u" ? O.lg : window.innerWidth, this.hostWidth = 0, this.store = j({
342
378
  type: "group-browser",
343
379
  width: window?.innerWidth ?? O.lg,
344
380
  hiddenFilters: [],
@@ -356,10 +392,10 @@ class Ce extends L {
356
392
  }, this.searchParamInteraction = {
357
393
  read: !1,
358
394
  write: !1
359
- }, this.selection = "none", this.alwaysShowSelection = !1, this.hidePreviewFooter = !1, this.hidePreviewBadges = !1, this.hasIndoorsSpaces = !1, this.arcgisGroupBrowserLoading = g(), this.arcgisGroupBrowserPreview = g(), this.arcgisGroupBrowserSelect = g(), this.arcgisGroupBrowserSublayerPreview = g(), this.arcgisGroupBrowserUpdate = g(), this.arcgisGroupBrowserInternalUIAction = g(), this.arcgisGroupBrowserUserFilterChange = g(), this.arcgisGroupBrowserSearchParamsUpdate = g(), this.arcgisAriaUpdate = g(), this.listen(k.select, this.onDelegatedGroupCardSelect), this.listen(k.preview, this.onDelegatedGroupCardPreview);
395
+ }, this.selection = "none", this.alwaysShowSelection = !1, this.hidePreviewFooter = !1, this.hidePreviewBadges = !1, this.hasIndoorsSpaces = !1, this.arcgisGroupBrowserLoading = g(), this.arcgisGroupBrowserPreview = g(), this.arcgisGroupBrowserSelect = g(), this.arcgisGroupBrowserSublayerPreview = g(), this.arcgisGroupBrowserUpdate = g(), this.arcgisGroupBrowserInternalUIAction = g(), this.arcgisGroupBrowserUserFilterChange = g(), this.arcgisGroupBrowserSearchParamsUpdate = g(), this.arcgisAriaUpdate = g(), this.listen(M.select, this.onDelegatedGroupCardSelect), this.listen(M.preview, this.onDelegatedGroupCardPreview);
360
396
  }
361
397
  static {
362
- this.properties = { selectedGroupsByUser: 16, selectedOwner: 16, selectedMembership: 16, selectedMemberOrg: 16, selectedSpecialGroup: 16, selectedAccess: 16, selectedGroups: 16, previewGroup: 16, queryResponse: 16, specialGroupOptions: 16, sortField: 16, sortOrder: 16, responsiveFormFactor: 16, viewportWidth: 16, hostWidth: 16, store: 0, filters: 0, loading: 5, formFactor: 1, height: 3, searchTerm: 1, messageOverrides: 0, hideTopBar: 5, selected: 0, view: 1, cards: 0, preview: 1, q: 1, portal: 0, num: 9, sort: 0, fetch: 0, preflight: 0, searchUser: 1, searchParamInteraction: 0, selection: 1, alwaysShowSelection: 5, hidePreviewFooter: 5, hidePreviewBadges: 5, hasIndoorsSpaces: 5 };
398
+ this.properties = { selectedGroupsByUser: 16, selectedOwner: 16, selectedMembership: 16, selectedMemberOrg: 16, selectedSpecialGroup: 16, selectedAccess: 16, selectedGroups: 16, queryResponse: 16, specialGroupOptions: 16, sortField: 16, sortOrder: 16, responsiveFormFactor: 16, viewportWidth: 16, hostWidth: 16, store: 0, filters: 0, loading: 5, formFactor: 1, height: 3, searchTerm: 1, messageOverrides: 0, hideTopBar: 5, selected: 0, view: 1, cards: 0, preview: 1, q: 1, portal: 0, num: 9, sort: 0, fetch: 0, preflight: 0, searchUser: 1, searchParamInteraction: 0, selection: 1, alwaysShowSelection: 5, hidePreviewFooter: 5, hidePreviewBadges: 5, hasIndoorsSpaces: 5 };
363
399
  }
364
400
  static {
365
401
  this.styles = ce;
@@ -486,7 +522,7 @@ class Ce extends L {
486
522
  }
487
523
  }
488
524
  async applySearchParams(e) {
489
- const r = E(e);
525
+ const r = I(e);
490
526
  if (!this.searchTerm && r.searchTerm && (this.searchTerm = r.searchTerm), this.sort.enabled) {
491
527
  const s = this.sort.props?.options ?? G;
492
528
  r.sortField && this.sort.props?.field === void 0 && s.includes(r.sortField) && (this.sortField = r.sortField), r.sortOrder && this.sort.props?.order === void 0 ? this.sortOrder = r.sortOrder : r.sortField && this.sort.props?.order === void 0 && (this.sortOrder = F(r.sortField, this.sortOrder));
@@ -636,32 +672,10 @@ class Ce extends L {
636
672
  this.arcgisGroupBrowserSelect.emit(this.selectedGroups);
637
673
  }
638
674
  handleGroupCardPreview(e) {
639
- const r = e.detail;
640
- if (this.store.filtersExpanded = !1, !r || this.store.preview === r.id) {
641
- this.closePreview();
642
- return;
643
- }
644
- this.restoreFocusTarget = this.getRestoreFocusTarget(e.target), this.store.preview = r.id, this.previewGroup = r, this.arcgisGroupBrowserPreview.emit(r);
645
- }
646
- getRestoreFocusTarget(e) {
647
- return !e || !(e instanceof HTMLElement) ? null : e;
675
+ this.store.filtersExpanded = !1, this.previewSessionController.handlePreview(e.detail, e.target);
648
676
  }
649
677
  closePreview(e = {}) {
650
- this.store.preview = null, this.previewGroup = null, this.arcgisGroupBrowserPreview.emit(null), this.arcgisGroupBrowserSublayerPreview.emit(null), e.restoreFocus && this.restorePreviewFocus();
651
- }
652
- async restorePreviewFocus() {
653
- const e = this.restoreFocusTarget;
654
- if (e) {
655
- if (e.restoreFocus) {
656
- await e.restoreFocus();
657
- return;
658
- }
659
- if (e.setFocus) {
660
- await e.setFocus();
661
- return;
662
- }
663
- e.focus?.();
664
- }
678
+ this.previewSessionController.closePreview(e);
665
679
  }
666
680
  async handleSortFieldChange(e) {
667
681
  this.sortField = e, this.sortOrder = F(e, this.sortOrder), this.loading = !0, this.arcgisGroupBrowserLoading.emit();
@@ -691,7 +705,7 @@ class Ce extends L {
691
705
  async fetchAndEmit(e, r) {
692
706
  this.preflight && (e = await this.preflight(e));
693
707
  const s = await this.queryGroups(e);
694
- this.queryResponse = s, this.browserResponse = this.getBrowserResponseFromQueryResponse(s), this.loading = !1, this.emitUpdate(s, r);
708
+ this.store.preview && !s.results.some((i) => i.id === this.store.preview) && this.closePreview(), this.queryResponse = s, this.previewGroupsById = new Map(s.results.filter((i) => !!i.id).map((i) => [i.id, i])), this.browserResponse = this.getBrowserResponseFromQueryResponse(s), this.loading = !1, this.emitUpdate(s, r);
695
709
  }
696
710
  createQuery(e = {}) {
697
711
  return {
@@ -757,31 +771,31 @@ class Ce extends L {
757
771
  })}</slot>`}</div>`;
758
772
  }
759
773
  render() {
760
- const e = this.responsiveFormFactor === "small" ? "small" : this.formFactor;
761
- return u`<arcgis-portal-browser .store=${this.store} .response=${this.browserResponse} .loading=${this.loading} .formFactor=${e} .height=${this.height} .searchTerm=${this.searchTerm} .rangeFormatter=${this.formatRange} .selected=${this.selectedGroups} .alwaysShowSelection=${this.alwaysShowSelection} @arcgisBrowserFilterClear=${this.handleBrowserFilterClear} @arcgisBrowserFilterRemove=${this.handleBrowserFilterRemove} @arcgisAriaUpdate=${(r) => {
762
- this.arcgisAriaUpdate.emit(r.detail);
763
- }}>${!this.hideTopBar && u`<slot name=top-bar slot=top-bar>${this.renderTopBar()}</slot>` || ""}<slot name=content-start slot=content-start></slot><slot name=selection slot=selection></slot><slot name=actions slot=actions></slot><slot name=view slot=view></slot>${ae({ slot: "sort", sort: this.sort, formFactor: e, sortField: this.sortField, sortOrder: this.sortOrder, onSortFieldChange: (r) => {
764
- this.handleSortFieldChange(r);
765
- }, onSortOrderChange: (r) => {
766
- this.handleSortOrderChange(r);
767
- } })}${this.renderDefaultContent()}${ne({ slot: "pagination", store: this.store, total: this.queryResponse.total, start: this.queryResponse?.queryParams?.start ?? 1, num: this.queryResponse?.queryParams?.num ?? this.num, onPage: (r) => {
768
- this.handlePage(r);
769
- } })}<slot name=content-end slot=content-end></slot><slot name=preview slot=preview>${this.previewGroup && u`<arcgis-portal-group-browser-preview .group=${this.previewGroup} .portal=${this.portal} .user=${this.portal.user ?? void 0} .hideBadges=${this.hidePreviewBadges} .hidePreviewFooter=${this.hidePreviewFooter} .currentResponse=${this.queryResponse} .previewFooterActionsSpaced=${!this.getPreviewFooterActionsEmpty()} @arcgisGroupBrowserInternalUIAction=${(r) => {
770
- this.arcgisGroupBrowserInternalUIAction.emit(r.detail);
774
+ const e = this.responsiveFormFactor === "small" ? "small" : this.formFactor, r = this.previewGroupsById.get(this.store.preview ?? "");
775
+ return u`<arcgis-portal-browser .store=${this.store} .response=${this.browserResponse} .loading=${this.loading} .formFactor=${e} .height=${this.height} .searchTerm=${this.searchTerm} .rangeFormatter=${this.formatRange} .selected=${this.selectedGroups} .alwaysShowSelection=${this.alwaysShowSelection} @arcgisBrowserFilterClear=${this.handleBrowserFilterClear} @arcgisBrowserFilterRemove=${this.handleBrowserFilterRemove} @arcgisAriaUpdate=${(s) => {
776
+ this.arcgisAriaUpdate.emit(s.detail);
777
+ }}>${!this.hideTopBar && u`<slot name=top-bar slot=top-bar>${this.renderTopBar()}</slot>` || ""}<slot name=content-start slot=content-start></slot><slot name=selection slot=selection></slot><slot name=actions slot=actions></slot><slot name=view slot=view></slot>${ae({ slot: "sort", sort: this.sort, formFactor: e, sortField: this.sortField, sortOrder: this.sortOrder, onSortFieldChange: (s) => {
778
+ this.handleSortFieldChange(s);
779
+ }, onSortOrderChange: (s) => {
780
+ this.handleSortOrderChange(s);
781
+ } })}${this.renderDefaultContent()}${ne({ slot: "pagination", store: this.store, total: this.queryResponse.total, start: this.queryResponse?.queryParams?.start ?? 1, num: this.queryResponse?.queryParams?.num ?? this.num, onPage: (s) => {
782
+ this.handlePage(s);
783
+ } })}<slot name=content-end slot=content-end></slot><slot name=preview slot=preview>${r && u`<arcgis-portal-group-browser-preview .group=${r} .portal=${this.portal} .user=${this.portal.user ?? void 0} .hideBadges=${this.hidePreviewBadges} .hidePreviewFooter=${this.hidePreviewFooter} .currentResponse=${this.queryResponse} .previewFooterActionsSpaced=${!this.getPreviewFooterActionsEmpty()} @arcgisGroupBrowserInternalUIAction=${(s) => {
784
+ this.arcgisGroupBrowserInternalUIAction.emit(s.detail);
771
785
  }} @arcgisGroupBrowserPreviewClose=${() => {
772
786
  this.closePreview({ restoreFocus: !0 });
773
- }}><slot name=preview-footer-action slot=footer-action></slot></arcgis-portal-group-browser-preview>` || ""}</slot>${this.renderEmptyTextSlot("no-results", this._messages.content.noResults)}${this.renderEmptyTextSlot("no-content", this._messages.content.noContent)}<slot name=scroll-end slot=scroll-end></slot>${le({ slot: "filters", filters: this.filters, messages: this._messages, browserMessages: this._browserMessages, store: this.store, portal: this.portal, hasIndoorsSpaces: this.hasIndoorsSpaces, selectedGroupsByUser: this.selectedGroupsByUser, selectedOwner: this.selectedOwner, selectedMembership: this.selectedMembership, selectedMemberOrg: this.selectedMemberOrg, selectedSpecialGroup: this.selectedSpecialGroup, specialGroupOptions: this.specialGroupOptions, selectedAccess: this.selectedAccess, isFilterActive: (r) => this.isFilterActive(r), handleSelect: (r) => {
774
- this.setFilterSelection(r);
775
- }, handleUserFilterChange: (r) => {
776
- this.arcgisGroupBrowserUserFilterChange.emit(r);
777
- }, handleRemove: (r) => {
778
- this.removeFilter(r);
779
- }, handleUpsert: (r) => {
780
- this.store.filters = { ...this.store.filters, [r.id]: r }, this.publishFilterStateChange(), this.fetchGroups();
787
+ }}><slot name=preview-footer-action slot=footer-action></slot></arcgis-portal-group-browser-preview>` || ""}</slot>${this.renderEmptyTextSlot("no-results", this._messages.content.noResults)}${this.renderEmptyTextSlot("no-content", this._messages.content.noContent)}<slot name=scroll-end slot=scroll-end></slot>${le({ slot: "filters", filters: this.filters, messages: this._messages, browserMessages: this._browserMessages, store: this.store, portal: this.portal, hasIndoorsSpaces: this.hasIndoorsSpaces, selectedGroupsByUser: this.selectedGroupsByUser, selectedOwner: this.selectedOwner, selectedMembership: this.selectedMembership, selectedMemberOrg: this.selectedMemberOrg, selectedSpecialGroup: this.selectedSpecialGroup, specialGroupOptions: this.specialGroupOptions, selectedAccess: this.selectedAccess, isFilterActive: (s) => this.isFilterActive(s), handleSelect: (s) => {
788
+ this.setFilterSelection(s);
789
+ }, handleUserFilterChange: (s) => {
790
+ this.arcgisGroupBrowserUserFilterChange.emit(s);
791
+ }, handleRemove: (s) => {
792
+ this.removeFilter(s);
793
+ }, handleUpsert: (s) => {
794
+ this.store.filters = { ...this.store.filters, [s.id]: s }, this.publishFilterStateChange(), this.fetchGroups();
781
795
  } })}</arcgis-portal-browser>`;
782
796
  }
783
797
  }
784
- I("arcgis-portal-group-browser", Ce);
798
+ E("arcgis-portal-group-browser", Re);
785
799
  export {
786
- Ce as ArcgisPortalGroupBrowser
800
+ Re as ArcgisPortalGroupBrowser
787
801
  };
@@ -55,7 +55,7 @@ class E extends b {
55
55
  super.connectedCallback(), this.loadPreviewData();
56
56
  }
57
57
  willUpdate(e) {
58
- e.has("group") && this.loadPreviewData();
58
+ (e.has("group") || e.has("portal")) && this.loadPreviewData();
59
59
  }
60
60
  getGroupSummary(e) {
61
61
  return G(e.snippet || "");
@@ -2,13 +2,13 @@ import "@esri/calcite-components/components/calcite-chip";
2
2
  import "@esri/calcite-components/components/calcite-tooltip";
3
3
  import "@esri/calcite-components/components/calcite-list-item";
4
4
  import "@esri/calcite-components/components/calcite-action";
5
+ import "@esri/calcite-components/components/calcite-dropdown-item";
5
6
  import "@esri/calcite-components/components/calcite-icon";
6
7
  import "@esri/calcite-components/components/calcite-popover";
7
8
  import "@esri/calcite-components/components/calcite-list";
8
9
  import "../arcgis-portal-item-type/index.js";
9
10
  import "@esri/calcite-components/components/calcite-loader";
10
11
  import "@esri/calcite-components/components/calcite-button";
11
- import "@esri/calcite-components/components/calcite-dropdown-item";
12
12
  import "@esri/calcite-components/components/calcite-input";
13
13
  import "@esri/calcite-components/components/calcite-dropdown";
14
14
  import "../arcgis-portal-user-avatar/index.js";
@@ -0,0 +1,76 @@
1
+ /// <reference path="../../index.d.ts" />
2
+ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
+ import type { PortalGeometryType } from "../../types/geometry.js";
4
+ import type { SublayerTypeRenderer } from "./utils.js";
5
+ import type { T9nMeta } from "@arcgis/lumina/controllers";
6
+ import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
7
+
8
+ /** Displays the icon and label used to represent a sublayer type. */
9
+ export abstract class ArcgisPortalSublayerType extends LitElement {
10
+ /** Geometry type of the layer or table. */
11
+ accessor geometry: PortalGeometryType | undefined;
12
+ /**
13
+ * Set to true to hide the layer icon.
14
+ *
15
+ * @default false
16
+ */
17
+ accessor hideIcon: boolean;
18
+ /**
19
+ * Set to true to hide the layer name.
20
+ *
21
+ * @default false
22
+ */
23
+ accessor hideName: boolean;
24
+ /**
25
+ * Set to true to hide the type text.
26
+ *
27
+ * @default false
28
+ */
29
+ accessor hideType: boolean;
30
+ /** @internal */
31
+ protected messages: {
32
+ point: string;
33
+ line: string;
34
+ polygon: string;
35
+ multipatch: string;
36
+ multipoint: string;
37
+ table: string;
38
+ annotation: string;
39
+ catalog: string;
40
+ dimension: string;
41
+ "oriented imagery": string;
42
+ parcel: string;
43
+ "utility network": string;
44
+ topology: string;
45
+ "trace network": string;
46
+ } & T9nMeta<{
47
+ point: string;
48
+ line: string;
49
+ polygon: string;
50
+ multipatch: string;
51
+ multipoint: string;
52
+ table: string;
53
+ annotation: string;
54
+ catalog: string;
55
+ dimension: string;
56
+ "oriented imagery": string;
57
+ parcel: string;
58
+ "utility network": string;
59
+ topology: string;
60
+ "trace network": string;
61
+ }>;
62
+ /** Layer or table name. */
63
+ accessor name: string | undefined;
64
+ /** Custom renderer function that receives the resolved type information. */
65
+ accessor renderer: SublayerTypeRenderer | undefined;
66
+ /** Desired size. */
67
+ accessor scale: Icon["scale"] | undefined;
68
+ /** Type of the layer or table. */
69
+ accessor type: string | undefined;
70
+ /**
71
+ * Underline the layer name. Primarily used to denote links.
72
+ *
73
+ * @default false
74
+ */
75
+ accessor underline: boolean;
76
+ }
@@ -0,0 +1,121 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as o } from "../../chunks/runtime.js";
3
+ import { css as l, html as t } from "lit";
4
+ import { LitElement as y, safeClassMap as c } from "@arcgis/lumina";
5
+ import { u as m } from "../../chunks/useT9n.js";
6
+ const u = l`:host{display:inline-flex;align-items:center;line-height:1.35;--sublayer-type-font-size: var(--calcite-font-size--1)}.sublayer-type{display:inline-flex;align-items:center;max-width:100%;min-width:0}.text{flex:1 1 0%;margin-inline-start:.5rem;color:inherit}.name{font-weight:500;font-size:var(--sublayer-type-font-size);overflow-wrap:anywhere;white-space:normal}.name--underline{text-decoration:underline}.type{font-weight:400;color:var(--calcite-color-text-2);font-size:var(--sublayer-type-font-size)}`;
7
+ function p({ geometry: n, type: e }) {
8
+ if (e !== void 0)
9
+ switch (e) {
10
+ case "Annotation Layer":
11
+ return {
12
+ icon: "layer-annotation",
13
+ type: "annotation",
14
+ isGeometry: !1
15
+ };
16
+ case "Dimension Layer":
17
+ return {
18
+ icon: "layer-dimension",
19
+ type: "dimension",
20
+ isGeometry: !1
21
+ };
22
+ case "Utility Network Layer":
23
+ return {
24
+ icon: "utility-network-layer",
25
+ type: "utility network",
26
+ isGeometry: !1
27
+ };
28
+ case "Catalog Layer":
29
+ return {
30
+ icon: "catalog-dataset",
31
+ type: "catalog",
32
+ isGeometry: !1
33
+ };
34
+ case "Parcel Layer":
35
+ return {
36
+ icon: "parcel-layer",
37
+ type: "parcel",
38
+ isGeometry: !1
39
+ };
40
+ case "Oriented Imagery Layer":
41
+ return {
42
+ icon: "oriented-imagery-layer",
43
+ type: "oriented imagery",
44
+ isGeometry: !1
45
+ };
46
+ case "Table":
47
+ return {
48
+ icon: "table",
49
+ type: "table",
50
+ isGeometry: !0
51
+ };
52
+ }
53
+ switch (n) {
54
+ case "point":
55
+ case "esriGeometryPoint":
56
+ return {
57
+ type: "point",
58
+ icon: "point",
59
+ isGeometry: !0
60
+ };
61
+ case "esriGeometryMultipoint":
62
+ case "multipoint":
63
+ return {
64
+ type: "multipoint",
65
+ icon: "layer-points",
66
+ isGeometry: !0
67
+ };
68
+ case "line":
69
+ case "polyline":
70
+ case "esriGeometryPolyline":
71
+ return {
72
+ type: "line",
73
+ icon: "line",
74
+ isGeometry: !0
75
+ };
76
+ case "polygon":
77
+ case "esriGeometryPolygon":
78
+ return {
79
+ type: "polygon",
80
+ icon: "polygon",
81
+ isGeometry: !0
82
+ };
83
+ case "multipatch":
84
+ case "esriGeometryMultiPatch":
85
+ return {
86
+ type: "multipatch",
87
+ icon: "cube",
88
+ isGeometry: !0
89
+ };
90
+ default:
91
+ return {
92
+ type: "table",
93
+ icon: "table",
94
+ isGeometry: !0
95
+ };
96
+ }
97
+ }
98
+ class h extends y {
99
+ constructor() {
100
+ super(...arguments), this.messages = m({ blocking: !0 }), this.hideName = !1, this.hideIcon = !1, this.hideType = !1, this.underline = !1;
101
+ }
102
+ static {
103
+ this.properties = { geometry: 1, type: 1, scale: 3, name: 1, hideName: 5, hideIcon: 5, hideType: 5, underline: 5, renderer: 0 };
104
+ }
105
+ static {
106
+ this.styles = u;
107
+ }
108
+ render() {
109
+ if (!this.messages._lang)
110
+ return null;
111
+ const e = p({ type: this.type, geometry: this.geometry });
112
+ if (this.renderer)
113
+ return this.renderer({ ...e, name: this.name ?? "" });
114
+ const { hideIcon: s, hideName: i, hideType: r, underline: a } = this;
115
+ return i && s && r ? null : t`<div class="sublayer-type">${!s && t`<calcite-icon .icon=${e.icon} .scale=${this.scale}></calcite-icon>` || ""}${(!i || !r) && t`<div class="text">${!i && t`<div class=${c({ name: !0, "name--underline": a })}>${this.name ?? ""}</div>` || ""}${!r && t`<div class="type">${this.messages[e.type]}</div>` || ""}</div>` || ""}</div>`;
116
+ }
117
+ }
118
+ o("arcgis-portal-sublayer-type", h);
119
+ export {
120
+ h as ArcgisPortalSublayerType
121
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-icon";
2
+ export * from "./customElement.js";
@@ -0,0 +1,30 @@
1
+ import type { JsxNode } from "@arcgis/lumina";
2
+ import type { Icon as Icon } from "@esri/calcite-components/components/calcite-icon";
3
+
4
+ /** @param args */
5
+ export type SublayerTypeRenderer = (args: SublayerTypeRendererArguments) => JsxNode;
6
+
7
+ export interface SublayerTypeRendererArguments extends SublayerTypeInfo {
8
+ name: string;
9
+ }
10
+
11
+ export interface SublayerTypeInfo {
12
+ icon: Icon["icon"];
13
+ type: keyof {
14
+ point: string;
15
+ line: string;
16
+ polygon: string;
17
+ multipatch: string;
18
+ multipoint: string;
19
+ table: string;
20
+ annotation: string;
21
+ catalog: string;
22
+ dimension: string;
23
+ "oriented imagery": string;
24
+ parcel: string;
25
+ "utility network": string;
26
+ topology: string;
27
+ "trace network": string;
28
+ };
29
+ isGeometry: boolean;
30
+ }