@arcgis/map-components 5.2.0-next.23 → 5.2.0-next.24

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 (66) hide show
  1. package/dist/cdn/{BXK5DVDN.js → 4BJSMXKG.js} +1 -1
  2. package/dist/cdn/5RXWVXJA.js +2 -0
  3. package/dist/cdn/BGWYOIKY.js +2 -0
  4. package/dist/cdn/BV6DN77M.js +2 -0
  5. package/dist/cdn/CXHORYLL.js +2 -0
  6. package/dist/cdn/{MJ2AUX7N.js → F7ZQA7S5.js} +1 -1
  7. package/dist/cdn/{HFDHHI2B.js → FHL4L2ZY.js} +1 -1
  8. package/dist/cdn/{2BESNRQI.js → FPX4MV2U.js} +1 -1
  9. package/dist/cdn/KLKFMZ7U.js +2 -0
  10. package/dist/cdn/NR6V3DTH.js +2 -0
  11. package/dist/cdn/P3U6DQN6.js +2 -0
  12. package/dist/cdn/{UA3OPWND.js → PGCAY24R.js} +1 -1
  13. package/dist/cdn/{T5KVNE3U.js → PKBVONJW.js} +1 -1
  14. package/dist/cdn/{Z257GCMR.js → Q4PNCUBK.js} +1 -1
  15. package/dist/cdn/{XVNU3EUN.js → UCEBZVNP.js} +1 -1
  16. package/dist/cdn/{XPD6NXPE.js → UGOZSFW2.js} +1 -1
  17. package/dist/cdn/VRWFDVP6.js +2 -0
  18. package/dist/cdn/VZVNKP6W.js +2 -0
  19. package/dist/cdn/ZAYZVEUD.js +2 -0
  20. package/dist/cdn/assets/basemap-layer-list-next/t9n/messages.en.json +1 -0
  21. package/dist/cdn/assets/catalog-layer-list-next/t9n/messages.en.json +1 -0
  22. package/dist/cdn/assets/table-list-next/t9n/messages.en.json +1 -0
  23. package/dist/cdn/index.js +1 -1
  24. package/dist/cdn/main.css +1 -1
  25. package/dist/chunks/layer-list-item-indicator.js +1 -1
  26. package/dist/chunks/layer-list-item.js +6 -0
  27. package/dist/chunks/layer-list-utils.js +6 -6
  28. package/dist/chunks/slots.js +1 -1
  29. package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +241 -0
  30. package/dist/components/arcgis-basemap-layer-list-next/customElement.js +329 -0
  31. package/dist/components/arcgis-basemap-layer-list-next/index.d.ts +1 -0
  32. package/dist/components/arcgis-basemap-layer-list-next/index.js +14 -0
  33. package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +179 -0
  34. package/dist/components/arcgis-catalog-layer-list-next/customElement.js +263 -0
  35. package/dist/components/arcgis-catalog-layer-list-next/index.d.ts +1 -0
  36. package/dist/components/arcgis-catalog-layer-list-next/index.js +10 -0
  37. package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +6 -0
  38. package/dist/components/arcgis-expand/customElement.js +1 -1
  39. package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
  40. package/dist/components/arcgis-layer-list-next/customElement.js +67 -66
  41. package/dist/components/arcgis-layer-list-next/index.js +2 -2
  42. package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +1 -1
  43. package/dist/components/arcgis-presentation/customElement.d.ts +18 -0
  44. package/dist/components/arcgis-presentation/customElement.js +90 -88
  45. package/dist/components/arcgis-table-list-next/customElement.d.ts +235 -0
  46. package/dist/components/arcgis-table-list-next/customElement.js +200 -0
  47. package/dist/components/arcgis-table-list-next/index.d.ts +1 -0
  48. package/dist/components/arcgis-table-list-next/index.js +7 -0
  49. package/dist/docs/api.json +1 -1
  50. package/dist/docs/docs.json +1 -1
  51. package/dist/docs/vscode.html-custom-data.json +1 -1
  52. package/dist/docs/web-types.json +1 -1
  53. package/dist/index.d.ts +30 -0
  54. package/dist/loader.js +3 -0
  55. package/dist/types/lumina.d.ts +28 -0
  56. package/dist/types/preact.d.ts +31 -0
  57. package/dist/types/react.d.ts +34 -0
  58. package/dist/types/stencil.d.ts +28 -0
  59. package/dist/utils/layer-list-utils.d.ts +10 -0
  60. package/package.json +4 -4
  61. package/dist/cdn/BMJ6NYIZ.js +0 -2
  62. package/dist/cdn/QJSXXDUJ.js +0 -2
  63. package/dist/cdn/SFSNTAYE.js +0 -2
  64. package/dist/cdn/WLMFCIBM.js +0 -2
  65. package/dist/cdn/XTGCV3LY.js +0 -2
  66. /package/dist/cdn/{T4OPNOZJ.js → OTZMVWAB.js} +0 -0
@@ -0,0 +1,200 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import { c as x } from "../../chunks/runtime.js";
3
+ import { repeat as I } from "lit/directives/repeat.js";
4
+ import { keyed as w } from "lit/directives/keyed.js";
5
+ import k from "@arcgis/core/core/Collection.js";
6
+ import { watch as u, on as C } from "@arcgis/core/core/reactiveUtils.js";
7
+ import M from "@arcgis/core/widgets/TableList/TableListViewModel.js";
8
+ import { LitElement as $, createEvent as v, safeClassMap as _, nothing as L } from "@arcgis/lumina";
9
+ import { usePropertyChange as E } from "@arcgis/lumina/controllers";
10
+ import { reEmitEvent as T } from "@arcgis/lumina/controllers/accessor";
11
+ import { classes as D } from "@arcgis/toolkit/dom";
12
+ import "@arcgis/toolkit/function";
13
+ import { generateGuid as F } from "@arcgis/toolkit/string";
14
+ import { createRef as P, ref as z } from "lit/directives/ref.js";
15
+ import { css as A, html as l } from "lit";
16
+ import { u as U } from "../../chunks/useT9n.js";
17
+ import { g as h } from "../../chunks/globalCss.js";
18
+ import { m as B, b as G, r as N, e as R } from "../../chunks/layer-list-utils.js";
19
+ import { ArcgisLayerListItem as S } from "../arcgis-layer-list-next/layer-list-item/customElement.js";
20
+ import { s as O } from "../../chunks/layer-list-item.js";
21
+ import "../../chunks/layer-list-item-indicator.js";
22
+ import "../arcgis-layer-list-item-panel/customElement.js";
23
+ import { m as Y } from "../../chunks/useViewModel.js";
24
+ const b = {
25
+ actionMenu: "action-menu",
26
+ actionGroup: "action-group",
27
+ filterNoResults: "filter-no-results",
28
+ item: "item",
29
+ itemActive: "active",
30
+ itemContentBottom: "content-bottom",
31
+ itemMessage: "message",
32
+ itemActionIcon: "action-icon",
33
+ itemActionImage: "action-image",
34
+ itemTemporaryIcon: "temporary-icon",
35
+ itemTableIcon: "table-icon",
36
+ itemCatalogIcon: "catalog-icon",
37
+ statusIndicator: "status-indicator",
38
+ publishing: "publishing",
39
+ updating: "updating",
40
+ connectionStatus: "connection-status",
41
+ connectionStatusConnected: "connection-status--connected",
42
+ visibleToggle: "visible-toggle",
43
+ visibleIcon: "visible-icon"
44
+ }, j = A`@keyframes esri-basemap-slide{0%{opacity:0;margin-top:0;margin-left:0}75%{opacity:0;margin-top:0;margin-left:0}to{opacity:1;margin-top:5px;margin-left:5px}}@keyframes esri-docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes popup-intro-animation-up{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted #000}}@keyframes esri-spinner--start-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes esri-spinner--finish-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@keyframes esri-spinner--rotate-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion){.esri-utility-network-trace__reset-prompt{animation:none!important}}@media(prefers-reduced-motion){.esri-popup--aligned-top-center,.esri-popup--aligned-top-left,.esri-popup--aligned-top-right,.esri-popup--aligned-bottom-center,.esri-popup--aligned-bottom-left,.esri-popup--aligned-bottom-right,.esri-popup--is-docked{animation:none!important}}@media(prefers-reduced-motion:reduce){.esri-fov-overlay{animation:none!important}}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex;min-height:var(--calcite-space-3xl);transition:max-height .25s ease-in-out;overflow-y:auto}:host>div{display:flex;width:100%}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-space-md-plus)}.item{--calcite-list-item-icon-center: var(--calcite-space-sm)}.status-indicator{visibility:hidden;color:var(--calcite-color-text-1);margin-inline:0}.action-image{text-align:center;background-position:50%;background-repeat:no-repeat;background-size:contain;flex:0 0 var(--calcite-spacing-xl);width:var(--calcite-spacing-xl);height:var(--calcite-spacing-xl);font-size:var(--calcite-font-size)}.action-menu .action-group{display:none}.action-menu[open] .action-group{display:flex}.publishing{visibility:visible;color:var(--calcite-color-text-3);animation:2s infinite esri-table-list__publishing-anim}.content-bottom,.message{margin:var(--calcite-spacing-md) var(--calcite-space-md-plus)}@keyframes esri-table-list__publishing-anim{0%,20%{transform:rotate(45deg)}80%,to{transform:rotate(135deg)}}`, y = "nested", V = Y(M);
45
+ class q extends $ {
46
+ constructor() {
47
+ super(...arguments), this._lastDragDetail = null, this._rootGroupUid = `table-${F()}`, this._rootListRef = P(), this._selectedDragItemLayerUid = null, this.messages = U(), this.viewModel = V(this), this._canMove = ({ dragEl: e, fromEl: t, toEl: i }, r) => {
48
+ const o = r === "pull" ? this.listItemCanGiveFunction : this.listItemCanReceiveFunction, a = this._getItem(e);
49
+ if (!a || !("sortable" in a) || !a.sortable)
50
+ return !1;
51
+ const d = this._getItem(t), c = this._getLayerType(t), n = this._getItem(i), m = this._getLayerType(i), g = !!c && !!m && c === m, p = { selected: a, from: d, to: n }, f = t?.group, s = i?.group;
52
+ return f && s && typeof o == "function" ? o(p) : g;
53
+ }, this._onPanelOpen = () => {
54
+ this.requestUpdate();
55
+ }, this._onSelectedDragItemLayerUidChange = (e) => {
56
+ this._selectedDragItemLayerUid = e;
57
+ }, this._onTriggerAction = (e, t) => {
58
+ this.triggerAction(e, t);
59
+ }, this.autoDestroyDisabled = !1, this.closed = !1, this.collapsed = !1, this.dragEnabled = !1, this.filterPlaceholder = "", this.filterText = "", this.headingLevel = 2, this.icon = "table", this.listItemCreatedFunction = this.viewModel.listItemCreatedFunction, this.map = this.viewModel.map, this.minDragEnabledItems = B, this.minFilterItems = G, this.selectedItems = new k(), this.selectionMode = "none", this.tables = this.viewModel.tables, this.showCloseButton = !1, this.showCollapseButton = !1, this.showErrors = !1, this.showFilter = !1, this.showHeading = !1, this.hideStatusIndicators = !1, this.showTemporaryTableIndicators = !1, this.arcgisClose = v(), this.arcgisPropertyChange = E()("state"), this.arcgisReady = v(), this.arcgisTriggerAction = T(() => this.viewModel, "trigger-action");
60
+ }
61
+ static {
62
+ this.properties = { _visibleItems: 16, _openedPanelItems: 16, _dragEnabled: 16, _filterEnabled: 16, view: 0, autoDestroyDisabled: 5, closed: 5, referenceElement: 1, collapsed: 7, dragEnabled: 5, filterPlaceholder: 1, filterPredicate: 0, filterText: 1, headingLevel: 9, icon: 1, label: 1, listItemCanGiveFunction: 0, listItemCanReceiveFunction: 0, listItemCreatedFunction: 0, map: 0, minDragEnabledItems: 9, minFilterItems: 9, selectedItems: 0, selectionMode: 1, state: 32, tableItems: 32, tables: 0, showCloseButton: 5, showCollapseButton: 5, showErrors: 5, showFilter: 5, showHeading: 5, hideStatusIndicators: 5, showTemporaryTableIndicators: 5, messageOverrides: 0 };
63
+ }
64
+ static {
65
+ this.styles = [j, O];
66
+ }
67
+ get _visibleItems() {
68
+ return this.tableItems?.filter((e) => !e.hidden && (this.showErrors || !e.error));
69
+ }
70
+ get _openedPanelItems() {
71
+ return this._visibleItems.filter(({ hidden: e, panel: t }) => !e && t?.open && !t.disabled && t.flowEnabled);
72
+ }
73
+ get _dragEnabled() {
74
+ return this.viewModel.totalItems >= this.minDragEnabledItems && this.dragEnabled;
75
+ }
76
+ get _filterEnabled() {
77
+ return this.viewModel.totalItems >= this.minFilterItems && this.showFilter;
78
+ }
79
+ get state() {
80
+ return this.viewModel.state;
81
+ }
82
+ get tableItems() {
83
+ return this.viewModel.tableItems;
84
+ }
85
+ async destroy() {
86
+ await this.manager.destroy();
87
+ }
88
+ willUpdate(e) {
89
+ e.has("map") && (this.viewModel.map = this.map), e.has("tables") && (this.viewModel.tables = this.tables), e.has("listItemCreatedFunction") && (this.viewModel.listItemCreatedFunction = this.listItemCreatedFunction);
90
+ }
91
+ loaded() {
92
+ this.manager.onLifecycle(() => [
93
+ u(() => this.view?.map, (e) => {
94
+ this.map || (this.viewModel.map = e);
95
+ }, { initial: !0 }),
96
+ C(() => this.viewModel.tableItems, "change", () => {
97
+ N(this.selectedItems), this.requestUpdate();
98
+ }, { initial: !0 }),
99
+ u(() => [this.viewModel.state, this.viewModel.totalItems], () => this.requestUpdate(), { initial: !0 }),
100
+ u(() => [this.filterPredicate, this._rootListRef.value], () => this._setFilterPredicate())
101
+ ]);
102
+ }
103
+ triggerAction(e, t) {
104
+ return this.viewModel.triggerAction(e, t);
105
+ }
106
+ _getItem(e) {
107
+ if (e?.tagName.toLowerCase() === "calcite-list-item")
108
+ return e.value;
109
+ const t = e?.getAttribute("data-item");
110
+ return t ? this._findItemByUid(t) : null;
111
+ }
112
+ _findItemByUid(e) {
113
+ const t = this.tableItems?.toArray() ?? [];
114
+ for (; t.length; ) {
115
+ const i = t.shift();
116
+ if (i) {
117
+ if (i.uid === e)
118
+ return i;
119
+ t.push(...i.children?.toArray() ?? []);
120
+ }
121
+ }
122
+ return null;
123
+ }
124
+ _getLayerType(e) {
125
+ return e?.getAttribute("data-layer-type") ?? null;
126
+ }
127
+ _setFilterPredicate() {
128
+ const e = this._rootListRef.value;
129
+ e && (e.filterPredicate = this.filterPredicate ? (t) => {
130
+ const i = this._getItem(t);
131
+ return i ? this.filterPredicate(i) : !1;
132
+ } : void 0);
133
+ }
134
+ _handlePanelFlowItemBack(e) {
135
+ e.open = !1;
136
+ }
137
+ _sortTablesToIds(e, t) {
138
+ e?.sort((i, r) => {
139
+ const o = i.uid != null ? t.indexOf(i.uid) : -1, a = r.uid != null ? t.indexOf(r.uid) : -1;
140
+ return o > a ? -1 : o < a ? 1 : 0;
141
+ });
142
+ }
143
+ _handleCalciteListDragEnd(e) {
144
+ const { fromEl: t, dragEl: i, oldIndex: r } = e;
145
+ r == null || !t || !i || t.insertBefore(i, t.children[r]);
146
+ }
147
+ _onCalciteListOrderChange(e) {
148
+ const { _lastDragDetail: t } = this, { toEl: i, fromEl: r, dragEl: o, newIndex: a } = e, d = t?.newIndex === a && t?.dragEl === o && t?.toEl === i && t?.fromEl === r;
149
+ if (!r || !i || d)
150
+ return;
151
+ this._lastDragDetail = e, this._selectedDragItemLayerUid = o.value;
152
+ const c = Array.from(r.children).filter((n) => n?.matches("calcite-list-item")).map((n) => n.value.layer?.uid ?? "");
153
+ this._sortTablesToIds(this.viewModel.tables, c);
154
+ }
155
+ _handleCalciteListChange(e) {
156
+ const { selectionMode: t, selectedItems: i } = this;
157
+ if (t === "none")
158
+ return;
159
+ const r = e.target.selectedItems.map((o) => this._getItem(o)).filter(Boolean);
160
+ i.removeAll(), i.addMany(r);
161
+ }
162
+ _handleFlowItemClose() {
163
+ this.closed = !0, this.arcgisClose.emit(), this.autoDestroyDisabled || this.destroy();
164
+ }
165
+ render() {
166
+ const { _visibleItems: e, state: t } = this, i = {
167
+ [h.hidden]: t === "loading",
168
+ [h.disabled]: t === "disabled"
169
+ };
170
+ return l`<div class=${_(D(h.widget, h.panel, i))}>${e?.length ? this._renderItems() : this._renderNoItems()}</div>`;
171
+ }
172
+ _renderNoItemsMessage() {
173
+ return l`<div slot=message>${this.messages.noItemsToDisplay}</div>`;
174
+ }
175
+ _renderNoItems() {
176
+ return l`<div class=${_(b.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`;
177
+ }
178
+ _renderPanelFlowItems() {
179
+ return I(this._openedPanelItems.toArray(), (e) => e.uid, (e, t) => {
180
+ const { panel: i, title: r } = e, o = () => this._handlePanelFlowItemBack(i);
181
+ return l`<calcite-flow-item .description=${r} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t === this._openedPanelItems.length - 1} @calciteFlowItemBack=${(a) => {
182
+ a.preventDefault(), o();
183
+ }}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${o} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`;
184
+ });
185
+ }
186
+ _renderItems() {
187
+ const { collapsed: e, _visibleItems: t, _filterEnabled: i, _rootGroupUid: r, showCloseButton: o, showCollapseButton: a, showHeading: d, _dragEnabled: c, selectionMode: n, filterText: m, filterPlaceholder: g, messages: p } = this, f = [
188
+ l`<calcite-flow-item .closable=${o} .closed=${this.closed} .collapsed=${e} .collapsible=${a} .heading=${d ? this.label ?? p.componentLabel : void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${() => this._handleFlowItemClose()}><calcite-list .canPull=${(s) => this._canMove(s, "pull")} .canPut=${(s) => this._canMove(s, "put")} data-layer-type=${r ?? L} .displayMode=${y} .dragEnabled=${c} .filterEnabled=${i} .filterPlaceholder=${g} .filterProps=${R} .filterText=${i ? m : ""} .group=${r} .label=${this.label ?? p.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${(s) => this._handleCalciteListDragEnd(s.detail)} @calciteListFilter=${(s) => this.filterText = s.currentTarget?.filterText ?? ""} @calciteListOrderChange=${(s) => this._onCalciteListOrderChange(s.detail)} ${z(this._rootListRef)}>${t?.toArray().map((s) => this._renderItem(s)) ?? []}${i ? l`<div class=${_(b.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>` : null}</calcite-list></calcite-flow-item>`,
189
+ this._renderPanelFlowItems()
190
+ ];
191
+ return this.closed ? null : w("root-flow", l`<calcite-flow>${f}</calcite-flow>`);
192
+ }
193
+ _renderItem(e) {
194
+ return w(e.uid, S({ canMove: this._canMove, css: b, displayMode: y, dragEnabled: this.dragEnabled, hideStatusIndicators: this.hideStatusIndicators, item: e, listModeDisabled: this.viewModel.listModeDisabled, messages: this.messages, rootGroupUid: this._rootGroupUid, selectedDragItemLayerUid: this._selectedDragItemLayerUid, selectedItems: this.selectedItems, selectionMode: this.selectionMode, showErrors: this.showErrors, showFilter: this.showFilter, showTemporaryTableIndicators: this.showTemporaryTableIndicators, handleAction: (t, i) => this._onTriggerAction(t, i), handlePanelOpen: this._onPanelOpen, handleSelectedDragItemLayerUidChange: this._onSelectedDragItemLayerUidChange, view: this.view }));
195
+ }
196
+ }
197
+ x("arcgis-table-list-next", q);
198
+ export {
199
+ q as ArcgisTableListNext
200
+ };
@@ -0,0 +1 @@
1
+ export * from "./customElement.js";
@@ -0,0 +1,7 @@
1
+ import "@esri/calcite-components/components/calcite-notice";
2
+ import "@esri/calcite-components/components/calcite-flow-item";
3
+ import "../arcgis-layer-list-item-panel/index.js";
4
+ import "@esri/calcite-components/components/calcite-button";
5
+ import "@esri/calcite-components/components/calcite-list";
6
+ import "@esri/calcite-components/components/calcite-flow";
7
+ export * from "./customElement.js";