@arcgis/map-components 5.2.0-next.11 → 5.2.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/IJZYN6XT.js +2 -0
- package/dist/cdn/KI4JUPA7.js +2 -0
- package/dist/cdn/OJIPBNXS.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-features/customElement.d.ts +15 -0
- package/dist/components/arcgis-features/customElement.js +33 -33
- package/dist/components/arcgis-features-next/customElement.d.ts +14 -0
- package/dist/components/arcgis-features-next/customElement.js +1 -1
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +2 -15
- package/dist/components/arcgis-layer-list-next/customElement.js +61 -53
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +71 -72
- package/dist/components/arcgis-layer-list-next/types.d.ts +18 -0
- package/dist/components/arcgis-map/customElement.d.ts +126 -105
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +4 -4
- package/dist/cdn/AGOMMJPB.js +0 -2
- package/dist/cdn/CTHUSEAE.js +0 -2
- package/dist/cdn/EVMYQ43N.js +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as R } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as O, html as a } from "lit";
|
|
4
|
-
import { keyed as
|
|
4
|
+
import { keyed as D } from "lit/directives/keyed.js";
|
|
5
5
|
import L from "@arcgis/core/widgets/Features/FeaturesViewModel.js";
|
|
6
6
|
import { u as B } from "../../chunks/useT9n.js";
|
|
7
|
-
import { log as
|
|
7
|
+
import { log as V } from "@arcgis/toolkit/log";
|
|
8
8
|
import { classes as A } from "@arcgis/toolkit/dom";
|
|
9
9
|
import { usePropertyChange as S, bypassReadOnly as x } from "@arcgis/lumina/controllers";
|
|
10
10
|
import { m as H } from "../../chunks/useViewModel.js";
|
|
@@ -40,7 +40,7 @@ class Q extends P {
|
|
|
40
40
|
}, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this.viewModel = J(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = this.viewModel.featureMenuOpen, this.featureMenuTitle = this.viewModel.featureMenuTitle, this.featureNavigationTop = !1, this.features = this.viewModel.features, this.featuresPerPage = this.viewModel.featuresPerPage, this.featureViewModelAbilities = this.viewModel.featureViewModelAbilities, this.goToOverride = this.viewModel.goToOverride, this.headerActions = new E(), this.heading = this.viewModel.title, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideHeading = !1, this.hideSelectFeature = !1, this.hideSpinner = !1, this.hideContent = !1, this.hideExpressionContent = !1, this.hideLastEditedInfo = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.map = this.viewModel.map, this.open = this.viewModel.visible, this.promises = this.viewModel.promises, this.responsiveActionsEnabled = !1, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.showCollapseButton = !1, this.spatialReference = this.viewModel.spatialReference, this.state = this.viewModel.state, this.timeZone = this.viewModel.timeZone, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = S()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = y(), this.arcgisClose = y(), this.arcgisTriggerAction = y();
|
|
41
41
|
}
|
|
42
42
|
static {
|
|
43
|
-
this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureViewModelAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
|
|
43
|
+
this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, collapseDirection: 1, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureViewModelAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
|
|
44
44
|
}
|
|
45
45
|
static {
|
|
46
46
|
this.styles = q;
|
|
@@ -122,22 +122,22 @@ class Q extends P {
|
|
|
122
122
|
}
|
|
123
123
|
async fetchFeatures(e, t) {
|
|
124
124
|
this._cancelFetchingFeatures();
|
|
125
|
-
const { signal: s } = t ?? {}, i = new AbortController(), { signal:
|
|
125
|
+
const { signal: s } = t ?? {}, i = new AbortController(), { signal: o } = i, n = s ? AbortSignal.any([o, s]) : o;
|
|
126
126
|
if (this._fetchFeaturesController = i, !e && this.view && this.location && (await G(this.location.spatialReference, this.view.spatialReference, null, {
|
|
127
|
-
signal:
|
|
127
|
+
signal: n
|
|
128
128
|
}), e = this.view.toScreen(this.location) ?? void 0), !e)
|
|
129
129
|
return;
|
|
130
130
|
const l = await this.viewModel.fetchFeatures(e, {
|
|
131
131
|
...t,
|
|
132
|
-
signal:
|
|
132
|
+
signal: n
|
|
133
133
|
});
|
|
134
134
|
this.location = l.location, this.promises = l.pendingFeatures;
|
|
135
135
|
}
|
|
136
136
|
async next() {
|
|
137
|
-
return
|
|
137
|
+
return V("warn", this, "The return type of FeaturesViewModel on the next() method is deprecated. At 6.0, this method will return void."), this.viewModel.next();
|
|
138
138
|
}
|
|
139
139
|
async previous() {
|
|
140
|
-
return
|
|
140
|
+
return V("warn", this, "The return type of FeaturesViewModel on the previous() method is deprecated. At 6.0, this method will return void."), this.viewModel.previous();
|
|
141
141
|
}
|
|
142
142
|
async setFocus() {
|
|
143
143
|
this._flowContainerNode.value?.setFocus();
|
|
@@ -204,8 +204,8 @@ class Q extends P {
|
|
|
204
204
|
const i = s?.graphic;
|
|
205
205
|
if (!i)
|
|
206
206
|
return;
|
|
207
|
-
const
|
|
208
|
-
t.set(
|
|
207
|
+
const o = j(i), n = X(o) ? o : null, l = t.get(n) ?? [];
|
|
208
|
+
t.set(n, [...l, s]);
|
|
209
209
|
}), t;
|
|
210
210
|
}
|
|
211
211
|
_handleCollapseToggle() {
|
|
@@ -223,11 +223,11 @@ class Q extends P {
|
|
|
223
223
|
}
|
|
224
224
|
if (this._removeFlowItems(), await this.viewModel.zoomTo({ target: i }), this._openRelatedFeatureAbortController !== t)
|
|
225
225
|
return;
|
|
226
|
-
const
|
|
226
|
+
const o = await import("@arcgis/core/geometry/operators/labelPointOperator.js");
|
|
227
227
|
if (this._openRelatedFeatureAbortController !== t)
|
|
228
228
|
return;
|
|
229
|
-
const
|
|
230
|
-
|
|
229
|
+
const n = o.execute(i);
|
|
230
|
+
n != null && (this.location = n), this.features = [s], this.open = !0, await this.setFocus(), this._openRelatedFeatureAbortController === t && (this._openRelatedFeatureAbortController = null);
|
|
231
231
|
}
|
|
232
232
|
_handlePaginationMenuButton() {
|
|
233
233
|
this._updateFeatureMenu();
|
|
@@ -270,8 +270,8 @@ class Q extends P {
|
|
|
270
270
|
this._unobserveFeatureMenuObserver(), e && this._featureMenuIntersectionObserver.observe(e), this._featureMenuIntersectionObserverNode = e;
|
|
271
271
|
}
|
|
272
272
|
_getActionTitle(e) {
|
|
273
|
-
const { messages: t, selectedFeature: s } = this, { id: i } = e,
|
|
274
|
-
return l &&
|
|
273
|
+
const { messages: t, selectedFeature: s } = this, { id: i } = e, o = s?.attributes, n = e.title ?? "", l = i === "zoom-to-feature" ? u(n, { messages: t }) : i === "remove-selected-feature" ? u(n, { messages: t }) : i === "zoom-to-clustered-features" ? u(n, { messages: t }) : i === "browse-clustered-features" ? u(n, { messages: t }) : e.title;
|
|
274
|
+
return l && o ? u(l, o) : l ?? "";
|
|
275
275
|
}
|
|
276
276
|
_onMainKeydown(e) {
|
|
277
277
|
const { key: t } = e;
|
|
@@ -348,8 +348,8 @@ class Q extends P {
|
|
|
348
348
|
})}</div>`;
|
|
349
349
|
}
|
|
350
350
|
_renderFeatureMenuButton() {
|
|
351
|
-
const { messages: e, viewModel: t } = this, { featureCount: s, selectedFeatureIndex: i, pendingPromisesCount:
|
|
352
|
-
return a`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${
|
|
351
|
+
const { messages: e, viewModel: t } = this, { featureCount: s, selectedFeatureIndex: i, pendingPromisesCount: o } = t;
|
|
352
|
+
return a`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${o > 0} @click=${this._handlePaginationMenuButton} .text=${u(e.pageText ?? "", {
|
|
353
353
|
index: C(i + 1),
|
|
354
354
|
total: C(s)
|
|
355
355
|
})} text-enabled title=${e.selectFeature ?? h}></calcite-action>`;
|
|
@@ -359,14 +359,14 @@ class Q extends P {
|
|
|
359
359
|
return a`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${e ?? ""} @click=${this._previousFeature} .text=${e ?? ""} title=${e ?? "" ?? h}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${t ?? ""} @click=${this._nextFeature} .text=${t ?? ""} title=${t ?? "" ?? h}></calcite-action></calcite-action-group></calcite-action-bar>`;
|
|
360
360
|
}
|
|
361
361
|
_renderFeatureMenuItem(e) {
|
|
362
|
-
const { initialDisplayMode: t } = this, { selectedFeatureViewModel: s, featureViewModels: i } = this.viewModel,
|
|
363
|
-
return a`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${() => this._setActiveFeature(
|
|
362
|
+
const { initialDisplayMode: t } = this, { selectedFeatureViewModel: s, featureViewModels: i } = this.viewModel, o = e === s, n = i.indexOf(e);
|
|
363
|
+
return a`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${() => this._setActiveFeature(n)} @mouseleave=${this._removeActiveFeature} @mouseover=${() => this._setActiveFeature(n)} .selected=${o} @calciteListItemSelect=${() => this._selectFeature(n)}><span .innerHTML=${(_.sanitize(e.title) || this.messages.untitled) ?? ""} slot=content></span>${t === "list" ? a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>` : null}</calcite-list-item>`;
|
|
364
364
|
}
|
|
365
365
|
_renderFeatureMenu() {
|
|
366
366
|
const { messages: e, viewModel: t } = this, s = this._groupResultsByLayer(), i = this.initialDisplayMode === "list" ? "none" : "single";
|
|
367
|
-
return t.featureViewModels.length ? a`<calcite-list display-mode=flat .label=${e?.featuresList ?? ""} selection-appearance=icon .selectionMode=${i}>${Array.from(s.keys(), (
|
|
368
|
-
const
|
|
369
|
-
return !this.hideFeatureListLayerTitle && l !== null ?
|
|
367
|
+
return t.featureViewModels.length ? a`<calcite-list display-mode=flat .label=${e?.featuresList ?? ""} selection-appearance=icon .selectionMode=${i}>${Array.from(s.keys(), (o) => {
|
|
368
|
+
const n = s.get(o)?.map((c) => this._renderFeatureMenuItem(c)), l = o ? o.title ?? this.messages.untitled : null;
|
|
369
|
+
return !this.hideFeatureListLayerTitle && l !== null ? D(o ?? "map-graphics", a`<calcite-list-item-group .heading=${l}>${n}</calcite-list-item-group>`) : n;
|
|
370
370
|
})}</calcite-list>` : null;
|
|
371
371
|
}
|
|
372
372
|
_renderHeaderAction(e) {
|
|
@@ -377,38 +377,38 @@ class Q extends P {
|
|
|
377
377
|
return this.headerActions.map((e) => this._renderHeaderAction(e)).toArray();
|
|
378
378
|
}
|
|
379
379
|
_renderContentFeature() {
|
|
380
|
-
const { headingLevel: e, hideCloseButton: t, _isCollapsed: s, _collapseEnabled: i, _featureFlowItemSelected:
|
|
380
|
+
const { headingLevel: e, hideCloseButton: t, _isCollapsed: s, _collapseEnabled: i, _featureFlowItemSelected: o, featureNavigationTop: n, flowItems: l, initialDisplayMode: c, selectedFeature: f, hideHeading: v } = this, { active: g, selectedFeatureViewModel: p, content: w } = this.viewModel, d = this._getHeading();
|
|
381
381
|
if (c === "list" && !f)
|
|
382
382
|
return null;
|
|
383
|
-
const F = l.length === 0 &&
|
|
383
|
+
const F = l.length === 0 && o, $ = p ? !p.content : !w;
|
|
384
384
|
return a`<calcite-flow-item class=${I(A({
|
|
385
385
|
"content-feature": !0,
|
|
386
386
|
"flow-item-collapsed": s
|
|
387
|
-
}))} .closable=${!t} .closed=${!g} .collapsed=${s} .collapseDirection=${
|
|
387
|
+
}))} .closable=${!t} .closed=${!g} .collapsed=${s} .collapseDirection=${this.collapseDirection ?? (n ? "down" : "up")} .collapsible=${i} .headingLevel=${e} .selected=${F} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${!v && d ? T(d) : void 0} ${m(this._rootFlowItemNode)}>${!v && d ? a`<div slot=heading><div .innerHTML=${_.sanitize(d ?? "") ?? ""}></div></div>` : null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${I(A("container", "content-container", {
|
|
388
388
|
"content-hidden": $
|
|
389
389
|
}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`;
|
|
390
390
|
}
|
|
391
391
|
_renderFeatureMenuContainer() {
|
|
392
|
-
const { viewModel: e, hideCloseButton: t, featureMenuTitle: s, messages: i, initialDisplayMode:
|
|
393
|
-
if (
|
|
392
|
+
const { viewModel: e, hideCloseButton: t, featureMenuTitle: s, messages: i, initialDisplayMode: o, featureMenuOpen: n, _featureFlowItemSelected: l, _collapseEnabled: c, _isCollapsed: f, featureNavigationTop: v, headingLevel: g } = this, { active: p, featureViewModels: w, pendingPromisesCount: d } = e, F = s ?? i.selectFeature;
|
|
393
|
+
if (o === "feature" && !n)
|
|
394
394
|
return null;
|
|
395
395
|
const $ = !l;
|
|
396
396
|
return a`<calcite-flow-item class=${I(A({
|
|
397
397
|
"flow-item-collapsed": f
|
|
398
|
-
}))} .closable=${
|
|
398
|
+
}))} .closable=${o === "list" && !t} .closed=${!p} .collapsed=${o === "list" && f} .collapseDirection=${this.collapseDirection ?? (v ? "down" : "up")} .collapsible=${o === "list" && c} .messageOverrides=${{ collapse: this.messages.collapse, expand: this.messages.expand }} .description=${this.hideFeatureMenuHeading ? void 0 : u(i.total ?? "", {
|
|
399
399
|
total: w.length
|
|
400
400
|
})} .heading=${this.hideFeatureMenuHeading ? void 0 : F} .headingLevel=${g} .loading=${e.waitingForContents} .selected=${$} @calciteFlowItemBack=${(N) => {
|
|
401
401
|
N.preventDefault(), this._handleFeatureMenuBack();
|
|
402
|
-
}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${
|
|
402
|
+
}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${o === "list" ? this._renderHeaderActions() : null}${d > 0 ? a`<calcite-loader class="loader" inline .label=${i.loading ?? ""} slot=header-actions-end></calcite-loader>` : null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${m(this._featureMenuIntersectionObserverCreated)}></div>${o === "feature" ? a`<calcite-button appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>` : null}</calcite-flow-item>`;
|
|
403
403
|
}
|
|
404
404
|
_renderFlowItem(e, t) {
|
|
405
|
-
const { messages: s, hideCloseButton: i, hideSelectFeature:
|
|
406
|
-
return a`<calcite-flow-item .closable=${!i} .closed=${!
|
|
405
|
+
const { messages: s, hideCloseButton: i, hideSelectFeature: o, active: n, hideHeading: l } = this, c = "graphic" in e && "isFeatureFromTable" in e && !e.isFeatureFromTable, f = c && !o, v = e.flowType === "feature-association", g = s.returnToInitialFeature ?? "", p = s?.selectFeature, w = this._getActionTitle(M), d = !this.hideActionBar && v && c;
|
|
406
|
+
return a`<calcite-flow-item .closable=${!i} .closed=${!n} .description=${T(this._getDrillInFlowItemDescription(e) ?? "")} .heading=${l ? void 0 : T(e.heading ?? "")} .selected=${t} @calciteFlowItemBack=${(F) => {
|
|
407
407
|
F.preventDefault(), this._handleDrillInBackClick();
|
|
408
408
|
}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l ? null : a`<div slot=heading><div .innerHTML=${_.sanitize(e.heading ?? "") ?? ""}></div></div>`}<div slot=description><div .innerHTML=${_.sanitize(this._getDrillInFlowItemDescription(e) ?? "") ?? ""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${g ?? ""} title=${g ?? "" ?? h}></calcite-action>${f ? a`<calcite-action icon=zoom-to-object @click=${() => this._openRelatedFeature(e)} slot=header-actions-end .text=${p ?? ""} title=${p ?? h}></calcite-action>` : null}${d ? a`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${M.disabled} .icon=${M.icon ?? void 0} .loading=${M.active} scale=s text-enabled .text=${w} title=${w ?? h} @click=${() => Z(this.viewModel, M, e)}></calcite-action></calcite-action-group></calcite-action-bar>` : null}<div class="container">${e}</div></calcite-flow-item>`;
|
|
409
409
|
}
|
|
410
410
|
_renderContentContainer() {
|
|
411
|
-
const e = this.flowItems?.toArray(), t = e?.map((i,
|
|
411
|
+
const e = this.flowItems?.toArray(), t = e?.map((i, o) => this._renderFlowItem(i, this._featureFlowItemSelected && o === e.length - 1)), s = this.initialDisplayMode === "list" ? [this._renderFeatureMenuContainer(), this._renderContentFeature(), t] : [this._renderContentFeature(), t, this._renderFeatureMenuContainer()];
|
|
412
412
|
return a`<calcite-flow ${m(this._flowContainerNode)}>${s}</calcite-flow>`;
|
|
413
413
|
}
|
|
414
414
|
_renderActionBar() {
|
|
@@ -423,7 +423,7 @@ class Q extends P {
|
|
|
423
423
|
}
|
|
424
424
|
_renderContent() {
|
|
425
425
|
const { content: e, selectedFeatureViewModel: t } = this.viewModel;
|
|
426
|
-
return t ? a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature>` : typeof e == "string" ?
|
|
426
|
+
return t ? a`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel + 1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature>` : typeof e == "string" ? D(e, a`<div .innerHTML=${_.sanitize(e) ?? ""}></div>`) : e ?? null;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
R("arcgis-features", Q);
|
|
@@ -82,6 +82,15 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
82
82
|
* @default false
|
|
83
83
|
*/
|
|
84
84
|
accessor collapsed: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Controls the direction the content collapses when the collapse button is used.
|
|
87
|
+
* When unset, the component chooses a direction based on the [feature navigation placement](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#featureNavigationTop).
|
|
88
|
+
*
|
|
89
|
+
* @see [showCollapseButton](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#showCollapseButton)
|
|
90
|
+
* @see [collapsed](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#collapsed)
|
|
91
|
+
* @see [featureNavigationTop](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#featureNavigationTop)
|
|
92
|
+
*/
|
|
93
|
+
accessor collapseDirection: "down" | "up" | undefined;
|
|
85
94
|
/**
|
|
86
95
|
* The content of the component. When set directly on the component, this content is static and cannot use fields to set content templates. To set a template for the content based on field or attribute names, see [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content).
|
|
87
96
|
*
|
|
@@ -125,8 +134,11 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
125
134
|
/**
|
|
126
135
|
* Indicates whether the feature navigation arrows are displayed at the top of the component.
|
|
127
136
|
* By default, the navigation arrows are displayed at the bottom of the component.
|
|
137
|
+
* This property also controls the collapse button's icon direction when the [collapseDirection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#collapseDirection) property is not set. When `featureNavigationTop` is `true`, the collapse button icon defaults to collapsing "up" and when `false` it defaults to collapsing "down".
|
|
128
138
|
*
|
|
129
139
|
* @default false
|
|
140
|
+
* @see [collapseDirection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#collapseDirection)
|
|
141
|
+
* @see [showCollapseButton](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#showCollapseButton)
|
|
130
142
|
*/
|
|
131
143
|
accessor featureNavigationTop: boolean;
|
|
132
144
|
/**
|
|
@@ -508,6 +520,8 @@ export abstract class ArcgisFeaturesNext extends LitElement {
|
|
|
508
520
|
* Indicates whether to show the collapse button in the component.
|
|
509
521
|
*
|
|
510
522
|
* @default false
|
|
523
|
+
* @see [collapsed](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#collapsed)
|
|
524
|
+
* @see [collapseDirection](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-features-next/#collapseDirection)
|
|
511
525
|
*/
|
|
512
526
|
accessor showCollapseButton: boolean;
|
|
513
527
|
/**
|
|
@@ -43,7 +43,7 @@ class Q extends P {
|
|
|
43
43
|
}, this._openRelatedFeatureAbortController = null, this.flowItems = new E(), this._aggregatedFeatureCount = 0, this._selectedAggregatedFeatureIndex = -1, this._aggregatedFeaturesLoading = !1, this._hasActionsStartSlotContent = !1, this._hasActionsEndSlotContent = !1, this.viewModel = J(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.autoDestroyDisabled = !1, this.focusTrapEnabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.effectiveHeading = this.viewModel.effectiveHeading, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = !1, this.featureNavigationTop = !1, this.features = this.viewModel.features, this.featuresPerPage = this.viewModel.featuresPerPage, this.featureItemAbilities = this.viewModel.featureItemAbilities, this.goToOverride = this.viewModel.goToOverride, this.headerActions = new E(), this.heading = this.viewModel.heading, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideHeading = !1, this.hideSelectFeature = !1, this.hideSpinner = !1, this.hideContent = !1, this.chartAnimationDisabled = this.viewModel.featureItemAbilities?.chartAnimation, this.hideAttachmentsContent = this.viewModel.featureItemAbilities?.attachmentsContent, this.hideCustomContent = this.viewModel.featureItemAbilities?.customContent, this.hideExpressionContent = !1, this.hideFieldsContent = this.viewModel.featureItemAbilities?.fieldsContent, this.hideMediaContent = this.viewModel.featureItemAbilities?.mediaContent, this.hideRelationshipContent = this.viewModel.featureItemAbilities?.relationshipContent, this.hideTextContent = this.viewModel.featureItemAbilities?.textContent, this.hideUtilityNetworkContent = this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent, this.hideLastEditedInfo = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.map = this.viewModel.map, this.open = this.viewModel.open, this.promises = this.viewModel.promises, this.responsiveActionsEnabled = !1, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.showCollapseButton = !1, this.spatialReference = this.viewModel.spatialReference, this.state = this.viewModel.state, this.timeZone = this.viewModel.timeZone, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = Z()("active", "collapsed", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "promises", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = A(), this.arcgisClose = A(), this.arcgisTriggerAction = A();
|
|
44
44
|
}
|
|
45
45
|
static {
|
|
46
|
-
this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _aggregatedFeatureCount: 16, _selectedAggregatedFeatureIndex: 16, _aggregatedFeaturesLoading: 16, _hasActionsStartSlotContent: 16, _hasActionsEndSlotContent: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, focusTrapEnabled: 5, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureItemAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
|
|
46
|
+
this.properties = { _openRelatedFeatureAbortController: 16, flowItems: 16, _aggregatedFeatureCount: 16, _selectedAggregatedFeatureIndex: 16, _aggregatedFeaturesLoading: 16, _hasActionsStartSlotContent: 16, _hasActionsEndSlotContent: 16, _hideActionText: 16, _featureNavigationVisible: 16, _isCollapsed: 16, _collapseEnabled: 16, _featureFlowItemSelected: 16, viewModel: 0, actions: 0, active: 0, autoDestroyDisabled: 5, focusTrapEnabled: 5, collapseDirection: 1, collapsed: 5, content: 1, defaultPopupTemplateEnabled: 5, effectiveHeading: 32, featureCount: 9, featureMenuOpen: 5, featureMenuTitle: 1, featureNavigationTop: 5, features: 0, featuresPerPage: 9, featureItemAbilities: 0, goToOverride: 0, headerActions: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideHeading: 5, hideSelectFeature: 5, hideSpinner: 5, hideContent: 5, chartAnimationDisabled: 5, hideAttachmentsContent: 5, hideCustomContent: 5, hideExpressionContent: 5, hideFieldsContent: 5, hideMediaContent: 5, hideRelationshipContent: 5, hideTextContent: 5, hideUtilityNetworkContent: 5, hideLastEditedInfo: 5, highlightDisabled: 5, icon: 1, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, map: 0, messageOverrides: 0, open: 5, referenceElement: 1, promises: 0, responsiveActionsEnabled: 5, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, showCollapseButton: 5, spatialReference: 0, state: 32, timeZone: 1, updateLocationEnabled: 5, view: 0 };
|
|
47
47
|
}
|
|
48
48
|
static {
|
|
49
49
|
this.styles = K;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type ListItem from "@arcgis/core/widgets/LayerList/ListItem.js";
|
|
3
3
|
import type Collection from "@arcgis/core/core/Collection.js";
|
|
4
|
-
import type CatalogLayer from "@arcgis/core/layers/CatalogLayer.js";
|
|
5
|
-
import type KnowledgeGraphLayer from "@arcgis/core/layers/KnowledgeGraphLayer.js";
|
|
6
|
-
import type MapImageLayer from "@arcgis/core/layers/MapImageLayer.js";
|
|
7
|
-
import type TileLayer from "@arcgis/core/layers/TileLayer.js";
|
|
8
4
|
import type TableListListItem from "@arcgis/core/widgets/TableList/ListItem.js";
|
|
9
5
|
import type { VisibilityAppearance } from "../../utils/action-utils.js";
|
|
10
6
|
import type { CanSortFunction, TableSupportedLayers } from "../../utils/layer-list-utils.js";
|
|
11
|
-
import type { CatalogLayerListProperties } from "@arcgis/core/widgets/CatalogLayerList.js";
|
|
12
7
|
import type { LayerListViewModelEvents } from "@arcgis/core/widgets/LayerList/LayerListViewModel.js";
|
|
13
|
-
import type { TableListProperties } from "@arcgis/core/widgets/TableList.js";
|
|
14
8
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
15
9
|
import type { ArcgisCatalogLayerList } from "../arcgis-catalog-layer-list/customElement.js";
|
|
16
10
|
import type { ArcgisTableList } from "../arcgis-table-list/customElement.js";
|
|
17
11
|
import type { ArcgisReferenceElement, HeadingLevel, IconName } from "../types.js";
|
|
12
|
+
import type { CatalogLayerListParams, FlowLayer, TableListParams } from "./types.js";
|
|
18
13
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
19
14
|
import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.js";
|
|
20
15
|
import type { ListItemModifier, State } from "@arcgis/core/widgets/LayerList/types.js";
|
|
@@ -594,12 +589,4 @@ export abstract class ArcgisLayerListNext extends LitElement {
|
|
|
594
589
|
arcgisReady: ArcgisLayerListNext["arcgisReady"]["detail"];
|
|
595
590
|
arcgisTriggerAction: ArcgisLayerListNext["arcgisTriggerAction"]["detail"];
|
|
596
591
|
};
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
export type CatalogLayerListParams = CatalogLayerListProperties;
|
|
600
|
-
|
|
601
|
-
export type TableListParams = TableListProperties;
|
|
602
|
-
|
|
603
|
-
export type FlowLayer = CatalogLayer | SubtablesLayer;
|
|
604
|
-
|
|
605
|
-
export type SubtablesLayer = KnowledgeGraphLayer | MapImageLayer | TileLayer;
|
|
592
|
+
}
|