@arcgis/portal-components 4.34.0-next.144
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/LICENSE.md +17 -0
- package/README.md +13 -0
- package/dist/cdn/4QZMQUTI.js +4 -0
- package/dist/cdn/A4CN3WPS.js +4 -0
- package/dist/cdn/B2A72CP3.js +4 -0
- package/dist/cdn/HCE5UPEA.js +4 -0
- package/dist/cdn/IKS25FUY.js +4 -0
- package/dist/cdn/OVVWFCQE.js +4 -0
- package/dist/cdn/QZPEKD2K.js +4 -0
- package/dist/cdn/RBLSBJE2.js +4 -0
- package/dist/cdn/RMZQPAZG.js +4 -0
- package/dist/cdn/SD5OOOBX.js +6 -0
- package/dist/cdn/UQX7FBXV.js +4 -0
- package/dist/cdn/XXY7LPWR.js +4 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/portal-classification-banner/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/portal-classification-config/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/portal-classification-form-element/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.nb.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/portal-field-delete/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +4 -0
- package/dist/cdn/main.css +1 -0
- package/dist/chunks/common.js +130 -0
- package/dist/chunks/fieldAddDelete.js +356 -0
- package/dist/chunks/loadClassificationData.js +115 -0
- package/dist/chunks/requests.js +71 -0
- package/dist/chunks/runtime.js +17 -0
- package/dist/chunks/useT9n.js +9 -0
- package/dist/components/arcgis-portal-classification-banner/customElement.d.ts +36 -0
- package/dist/components/arcgis-portal-classification-banner/customElement.js +62 -0
- package/dist/components/arcgis-portal-classification-banner/index.d.ts +2 -0
- package/dist/components/arcgis-portal-classification-banner/index.js +2 -0
- package/dist/components/arcgis-portal-classification-config/customElement.d.ts +45 -0
- package/dist/components/arcgis-portal-classification-config/customElement.js +364 -0
- package/dist/components/arcgis-portal-classification-config/index.d.ts +12 -0
- package/dist/components/arcgis-portal-classification-config/index.js +12 -0
- package/dist/components/arcgis-portal-classification-favorite/customElement.d.ts +18 -0
- package/dist/components/arcgis-portal-classification-favorite/customElement.js +120 -0
- package/dist/components/arcgis-portal-classification-favorite/index.d.ts +12 -0
- package/dist/components/arcgis-portal-classification-favorite/index.js +12 -0
- package/dist/components/arcgis-portal-classification-form-element/customElement.d.ts +18 -0
- package/dist/components/arcgis-portal-classification-form-element/customElement.js +103 -0
- package/dist/components/arcgis-portal-classification-form-element/index.d.ts +9 -0
- package/dist/components/arcgis-portal-classification-form-element/index.js +9 -0
- package/dist/components/arcgis-portal-field-delete/customElement.d.ts +23 -0
- package/dist/components/arcgis-portal-field-delete/customElement.js +263 -0
- package/dist/components/arcgis-portal-field-delete/index.d.ts +10 -0
- package/dist/components/arcgis-portal-field-delete/index.js +10 -0
- package/dist/components/arcgis-portal-field-delete/types.d.ts +5 -0
- package/dist/controllers/loadClassificationData.d.ts +11 -0
- package/dist/controllers/useClassificationModel.d.ts +9 -0
- package/dist/controllers/useT9n.d.ts +1 -0
- package/dist/docs/api.json +1158 -0
- package/dist/docs/docs.json +1054 -0
- package/dist/docs/vscode.css-custom-data.json +6 -0
- package/dist/docs/vscode.html-custom-data.json +98 -0
- package/dist/docs/web-types.json +309 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +11 -0
- package/dist/loader.d.ts +2 -0
- package/dist/loader.js +15 -0
- package/dist/models/classificationModel.d.ts +68 -0
- package/dist/runtime.d.ts +6 -0
- package/dist/types/classification.d.ts +214 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/lumina.d.ts +39 -0
- package/dist/types/preact.d.ts +49 -0
- package/dist/types/preact10.d.ts +54 -0
- package/dist/types/react.d.ts +62 -0
- package/dist/types/stencil.d.ts +46 -0
- package/dist/utils/arcade.d.ts +27 -0
- package/dist/utils/common.d.ts +29 -0
- package/dist/utils/commonEnums.d.ts +5 -0
- package/dist/utils/commonFunctions.d.ts +11 -0
- package/dist/utils/fieldAddDelete.d.ts +4 -0
- package/dist/utils/functionalComponents/FieldIcons.d.ts +6 -0
- package/dist/utils/item.d.ts +21 -0
- package/dist/utils/portal.d.ts +2 -0
- package/dist/utils/requests.d.ts +15 -0
- package/dist/utils/types.d.ts +30 -0
- package/dist/utils/url.d.ts +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { c as o } from "../../chunks/runtime.js";
|
|
2
|
+
import { repeat as c } from "lit/directives/repeat.js";
|
|
3
|
+
import { LitElement as u, createEvent as b, nothing as a } from "@arcgis/lumina";
|
|
4
|
+
import { css as d, html as i } from "lit";
|
|
5
|
+
import { u as h } from "../../chunks/useT9n.js";
|
|
6
|
+
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
7
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
8
|
+
v4.34.0-next.144 */
|
|
9
|
+
const m = d`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;
|
|
10
|
+
function l(n, e) {
|
|
11
|
+
return n.uiElement === e;
|
|
12
|
+
}
|
|
13
|
+
class v extends u {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.messages = h(), this.arcgisAttributeValueChange = b();
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.properties = { validationMsg: 16, attributeKey: 1, attribute: 0, value: 0, renderingInfo: 0 };
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.styles = m;
|
|
22
|
+
}
|
|
23
|
+
willUpdate(e) {
|
|
24
|
+
e.has("renderingInfo") && (this.validationMsg = this._getValidationMessage());
|
|
25
|
+
}
|
|
26
|
+
_getValidationMessage() {
|
|
27
|
+
if (this.renderingInfo.attributeValidationResult)
|
|
28
|
+
return this.renderingInfo.attributeValidationResult;
|
|
29
|
+
if (this.attribute.isRequired && !this.value)
|
|
30
|
+
return this.messages.requiredfield ?? "This is a required field.";
|
|
31
|
+
}
|
|
32
|
+
renderCheckbox() {
|
|
33
|
+
return l(this.attribute, "checkbox") ? i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey ?? a} @calciteCheckboxChange=${(e) => this.arcgisAttributeValueChange.emit({ [this.attributeKey]: e.target.checked })} .required=${this.attribute.isRequired ?? !1} .status=${this.validationMsg ? "invalid" : "valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>` : null;
|
|
34
|
+
}
|
|
35
|
+
renderDateInput() {
|
|
36
|
+
return l(this.attribute, "date") ? i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey ?? a} .name=${this.attribute.label} @calciteInputDatePickerChange=${(e) => this.isConnected && this.arcgisAttributeValueChange.emit({ [this.attributeKey]: e.target.value })} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg ? "invalid" : "valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>` : null;
|
|
37
|
+
}
|
|
38
|
+
renderTextInput() {
|
|
39
|
+
if (!l(this.attribute, "text"))
|
|
40
|
+
return null;
|
|
41
|
+
const e = this.attribute.label, t = this.attribute.description;
|
|
42
|
+
return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip && i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information ?? "Information" ?? a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>` || ""}</div><calcite-input-text id=${this.attributeKey ?? a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${(s) => this.arcgisAttributeValueChange.emit({ [this.attributeKey]: s.target.value })} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg ? "invalid" : "valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`;
|
|
43
|
+
}
|
|
44
|
+
renderSingleSelect() {
|
|
45
|
+
return l(this.attribute, "single-select") ? i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey ?? a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${(e) => this.arcgisAttributeValueChange.emit({ [this.attributeKey]: e.target.value })} .placeholder=${this.messages.selectanoption ?? "Select an option"} .required=${this.attribute.isRequired} .status=${this.validationMsg ? "invalid" : "valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>` : null;
|
|
46
|
+
}
|
|
47
|
+
_renderSingleSelectComboboxOptions() {
|
|
48
|
+
if (!Array.isArray(this.renderingInfo.valueExpressionResult))
|
|
49
|
+
return;
|
|
50
|
+
const e = this.value;
|
|
51
|
+
return c(this.renderingInfo.valueExpressionResult, (t) => t.label, (t) => i`<calcite-combobox-item .selected=${e === t.value} text-label=${t.label ?? a} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`);
|
|
52
|
+
}
|
|
53
|
+
_renderComboboxOptions() {
|
|
54
|
+
if (!Array.isArray(this.renderingInfo.valueExpressionResult))
|
|
55
|
+
return;
|
|
56
|
+
const e = this.value;
|
|
57
|
+
return this.renderingInfo.valueExpressionResult.map((t) => i`<calcite-combobox-item .selected=${e?.includes(t.value)} text-label=${t.label ?? a} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`);
|
|
58
|
+
}
|
|
59
|
+
renderMultiSelect() {
|
|
60
|
+
return l(this.attribute, "multi-select") ? i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey ?? a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${(e) => {
|
|
61
|
+
const t = e.target.value;
|
|
62
|
+
this.arcgisAttributeValueChange.emit({
|
|
63
|
+
[this.attributeKey]: t ? Array.isArray(t) ? t : [t] : void 0
|
|
64
|
+
});
|
|
65
|
+
}} .placeholder=${this.messages.selectoptions ?? "Select option(s)"} .required=${this.attribute.isRequired} .status=${this.validationMsg ? "invalid" : "valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>` : null;
|
|
66
|
+
}
|
|
67
|
+
_renderGroupedComboboxOptions() {
|
|
68
|
+
if (!this.renderingInfo.valueExpressionResult || Array.isArray(this.renderingInfo.valueExpressionResult))
|
|
69
|
+
return;
|
|
70
|
+
const e = this.value;
|
|
71
|
+
return Object.entries(this.renderingInfo.valueExpressionResult).map(([t, s]) => i`<calcite-combobox-item .selected=${e?.includes(t)} text-label=${t ?? a} .value=${t}>${s.map((r) => i`<calcite-combobox-item .selected=${e?.includes(r.value)} text-label=${r.label ?? a} .value=${r.value} data-testid=${`grouped-combobox-item-${r.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`);
|
|
72
|
+
}
|
|
73
|
+
renderMultiGroupedSelectNested() {
|
|
74
|
+
return l(this.attribute, "multi-grouped-select-nested") ? i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey ?? a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${(e) => {
|
|
75
|
+
const t = e.target.value;
|
|
76
|
+
this.arcgisAttributeValueChange.emit({
|
|
77
|
+
[this.attributeKey]: t ? Array.isArray(t) ? t : [t] : void 0
|
|
78
|
+
});
|
|
79
|
+
}} .placeholder=${this.messages.selectoptions ?? "Select option(s)"} .required=${this.attribute.isRequired} .status=${this.validationMsg ? "invalid" : "valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>` : null;
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
switch (this.attribute.uiElement) {
|
|
83
|
+
case "checkbox":
|
|
84
|
+
return this.renderCheckbox();
|
|
85
|
+
case "date":
|
|
86
|
+
return this.renderDateInput();
|
|
87
|
+
case "multi-select":
|
|
88
|
+
return this.renderMultiSelect();
|
|
89
|
+
case "multi-grouped-select-nested":
|
|
90
|
+
return this.renderMultiGroupedSelectNested();
|
|
91
|
+
case "single-select":
|
|
92
|
+
return this.renderSingleSelect();
|
|
93
|
+
case "text":
|
|
94
|
+
return this.renderTextInput();
|
|
95
|
+
default:
|
|
96
|
+
return i`<div>Not Implemented Yet.</div>`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
o("arcgis-portal-classification-form-element", v);
|
|
101
|
+
export {
|
|
102
|
+
v as ArcgisPortalClassificationFormElement
|
|
103
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-label";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-checkbox";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-input-date-picker";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-input-text";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-combobox";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-combobox-item";
|
|
9
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-label";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-checkbox";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-input-date-picker";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-tooltip";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-input-text";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-combobox";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-combobox-item";
|
|
9
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
|
+
/// <reference path="../../index.d.ts" />
|
|
3
|
+
import { PublicLitElement as LitElement, TargetedEvent, JsxNode } from '@arcgis/lumina';
|
|
4
|
+
import { FieldDeleteOptions, IConfig } from '../../utils/types';
|
|
5
|
+
|
|
6
|
+
export declare class ArcgisPortalFieldDelete extends LitElement {
|
|
7
|
+
/** For documentation links. */
|
|
8
|
+
config?: IConfig;
|
|
9
|
+
/** The fields to delete. */
|
|
10
|
+
fieldNames?: string[];
|
|
11
|
+
/** The layer whose field is being deleted. */
|
|
12
|
+
layer?: __esri.FeatureLayer | __esri.OrientedImageryLayer;
|
|
13
|
+
/** The MapView instance. */
|
|
14
|
+
mapView?: __esri.MapView;
|
|
15
|
+
/** Properties that may need to be passed in case values differ from what is available on Map Viewer. */
|
|
16
|
+
options?: FieldDeleteOptions;
|
|
17
|
+
/** Emitted when the field is successfully deleted. */
|
|
18
|
+
readonly arcgisFieldsDeleted: TargetedEvent<this, void>;
|
|
19
|
+
/** Emitted before the modal is closed if the alert is handled in consumer. */
|
|
20
|
+
readonly arcgisBeforeModalClose: TargetedEvent<this, string>;
|
|
21
|
+
/** Emitted when the component is closed for any reason. */
|
|
22
|
+
readonly arcgisClose: TargetedEvent<this, void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { c as C } from "../../chunks/runtime.js";
|
|
2
|
+
import { html as p, css as P } from "lit";
|
|
3
|
+
import { LitElement as M, createEvent as F, renderElement as T } from "@arcgis/lumina";
|
|
4
|
+
import { createRef as E, ref as N } from "lit/directives/ref.js";
|
|
5
|
+
import { Task as O } from "@lit/task";
|
|
6
|
+
import x from "@arcgis/core/layers/support/FeatureTemplate.js";
|
|
7
|
+
import L from "@arcgis/core/Graphic.js";
|
|
8
|
+
import S from "@arcgis/core/identity/IdentityManager.js";
|
|
9
|
+
import y from "@arcgis/core/request.js";
|
|
10
|
+
import { a as j, g as B, b as U, d as q, e as w, f as R, i as D } from "../../chunks/fieldAddDelete.js";
|
|
11
|
+
import { u as J } from "../../chunks/useT9n.js";
|
|
12
|
+
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
13
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
14
|
+
v4.34.0-next.144 */
|
|
15
|
+
const n = /* @__PURE__ */ new Map();
|
|
16
|
+
n.set("oid", "key");
|
|
17
|
+
n.set("guid", "key");
|
|
18
|
+
n.set("global-id", "key");
|
|
19
|
+
n.set("blob", "binary");
|
|
20
|
+
n.set("integer", "integer");
|
|
21
|
+
n.set("small-integer", "integer");
|
|
22
|
+
n.set("big-integer", "integer");
|
|
23
|
+
n.set("single", "number");
|
|
24
|
+
n.set("double", "number");
|
|
25
|
+
n.set("long", "number");
|
|
26
|
+
n.set("number", "number");
|
|
27
|
+
n.set("date", "date-time");
|
|
28
|
+
n.set("date-only", "calendar");
|
|
29
|
+
n.set("time-only", "clock");
|
|
30
|
+
n.set("timestamp-offset", "time-zone");
|
|
31
|
+
n.set("string", "string");
|
|
32
|
+
const z = ({ fieldType: $ }) => p`<calcite-icon scale=s .icon=${n.get($)}></calcite-icon>`, W = P`.dialog{--calcite-dialog-max-size-y: 60%}.dialog-content-wrapper{position:relative;min-height:100px}.hide-overflow{overflow:hidden}.field-icons{padding:0 var(--calcite-spacing-lg);display:flex;align-items:center}.warning{border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);margin-bottom:var(--calcite-spacing-md)}.warning-message{font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold)}.loader-container{position:absolute;height:100%;width:100%;top:0;right:0;display:none;z-index:40;overflow:hidden;background:#fffffff2;padding:0}.active{display:flex;flex-direction:column;align-items:center;justify-content:center}.loader{padding:0}.loader-text{font-weight:var(--calcite-font-weight-medium);text-align:center;margin-right:6.25rem;margin-left:6.25rem}`;
|
|
33
|
+
class _ extends M {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(...arguments), this.arcadeExpMap = /* @__PURE__ */ new Map(), this.cancelNode = E(), this.dialogNode = E(), this.layerFields = [], this.layerFieldsMap = /* @__PURE__ */ new Map(), this.messages = J({ blocking: !0 }), this._propWatcherTask = new O(this, {
|
|
36
|
+
task: async ([e, t]) => {
|
|
37
|
+
if (!(D(e) && D(t)))
|
|
38
|
+
throw console.error("Required properties are missing."), new Error();
|
|
39
|
+
this._propWatcherTask.autoRun = !1, await this.processProps();
|
|
40
|
+
},
|
|
41
|
+
args: () => [this.layer, this.fieldNames]
|
|
42
|
+
}), this.deleteInProgress = !1, this.fieldsAreDeletable = !1, this.arcgisFieldsDeleted = F(), this.arcgisBeforeModalClose = F(), this.arcgisClose = F();
|
|
43
|
+
}
|
|
44
|
+
static {
|
|
45
|
+
this.properties = { currentLayerInfo: 16, deleteInProgress: 16, fieldsAreDeletable: 16, config: 0, fieldNames: 0, layer: 0, mapView: 0, options: 0 };
|
|
46
|
+
}
|
|
47
|
+
static {
|
|
48
|
+
this.styles = W;
|
|
49
|
+
}
|
|
50
|
+
async processProps() {
|
|
51
|
+
const { layer: e, mapView: t, fieldNames: s } = this;
|
|
52
|
+
if (!e || !s) {
|
|
53
|
+
this.fieldsAreDeletable = !1;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
e.loaded || await e.load(), this.layerFields = e.fields.filter((o) => s.includes(o.name));
|
|
57
|
+
const a = s.some((o) => !e.fields.find((l) => l.name === o));
|
|
58
|
+
if (!this.layerFields?.length || a)
|
|
59
|
+
this.fieldsAreDeletable = !1;
|
|
60
|
+
else {
|
|
61
|
+
const o = await Promise.all(this.layerFields.map(async (l) => await j(t, e, l, this.options)));
|
|
62
|
+
if (this.fieldsAreDeletable = o.every((l) => l), !this.fieldsAreDeletable)
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (this.layerFieldsMap = await B(e), this.options?.ignorePopupTemplate || (this.arcadeExpMap = U(e.popupTemplate)), this.portal = e.portalItem?.portal ?? this.options?.portal, this.item = e.portalItem ?? this.options?.item, !this.item) {
|
|
66
|
+
this.fieldsAreDeletable = !1;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
await S.getCredential(this.item.url.replace("rest/services", "rest/admin/services"));
|
|
70
|
+
}
|
|
71
|
+
getFieldLabel(e) {
|
|
72
|
+
const { layer: t, arcadeExpMap: s } = this;
|
|
73
|
+
if (this.options?.ignorePopupTemplate)
|
|
74
|
+
return this.getFieldDisplayNameFromLayerFields(e);
|
|
75
|
+
{
|
|
76
|
+
const o = (t.popupTemplate ?? t.createPopupTemplate()).fieldInfos?.find((l) => l.fieldName === e);
|
|
77
|
+
return o ? q(o, s) : this.getFieldDisplayNameFromLayerFields(e);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
getFieldDisplayNameFromLayerFields(e) {
|
|
81
|
+
const t = this.layerFieldsMap.get(e);
|
|
82
|
+
return t.alias ?? t.name;
|
|
83
|
+
}
|
|
84
|
+
async deleteFields() {
|
|
85
|
+
const { layer: e, fieldNames: t } = this, s = `${e.url.replace("/rest/services", "/rest/admin/services")}/${e.layerId}/deleteFromDefinition`, a = {
|
|
86
|
+
fields: t.map((l) => ({
|
|
87
|
+
name: l
|
|
88
|
+
}))
|
|
89
|
+
}, o = {
|
|
90
|
+
deleteFromDefinition: JSON.stringify(a)
|
|
91
|
+
};
|
|
92
|
+
await y(s, {
|
|
93
|
+
query: { ...o, f: "json", async: !1 },
|
|
94
|
+
method: "post",
|
|
95
|
+
responseType: "json"
|
|
96
|
+
}).then(async (l) => {
|
|
97
|
+
if (l.data?.success) {
|
|
98
|
+
const h = `${e.url}/${e.layerId}`;
|
|
99
|
+
t.forEach((i) => {
|
|
100
|
+
e.type === "feature" && e.floorInfo?.floorField === i && (e.floorInfo = null);
|
|
101
|
+
});
|
|
102
|
+
const m = await y(h, { query: { f: "json" }, responseType: "json" });
|
|
103
|
+
if (m) {
|
|
104
|
+
const i = m.data;
|
|
105
|
+
this.currentLayerInfo = m.data, i && (this.updateTypesAndTemplatesOnLayer(), t.forEach((r) => {
|
|
106
|
+
i.templates?.length ? i.templates.forEach((c) => delete c.prototype.attributes[r]) : i.types?.forEach((c) => {
|
|
107
|
+
c.templates.forEach((u) => delete u.prototype.attributes[r]);
|
|
108
|
+
});
|
|
109
|
+
}), this.updateFeatureService(i));
|
|
110
|
+
} else
|
|
111
|
+
this.handleError();
|
|
112
|
+
}
|
|
113
|
+
}, () => this.handleError());
|
|
114
|
+
}
|
|
115
|
+
updateTypesAndTemplatesOnLayer() {
|
|
116
|
+
const { currentLayerInfo: e } = this, t = e;
|
|
117
|
+
if (t.templates?.length) {
|
|
118
|
+
const s = this.updateTemplatesList(t.templates);
|
|
119
|
+
t.templates = s;
|
|
120
|
+
} else if (t.types) {
|
|
121
|
+
const s = t.types;
|
|
122
|
+
t.types = [], s.forEach((a) => {
|
|
123
|
+
a.templates = this.updateTemplatesList(a.templates), this.addType(t, a);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
updateTemplatesList(e) {
|
|
128
|
+
const { currentLayerInfo: t, messages: s } = this, a = [];
|
|
129
|
+
return (e ?? []).forEach((o) => {
|
|
130
|
+
const l = new x();
|
|
131
|
+
l.description = o.description ?? "", l.name = o.name || s.newFeature, l.drawingTool = o.drawingTool || "point";
|
|
132
|
+
const h = {};
|
|
133
|
+
t.fields.forEach((i) => {
|
|
134
|
+
let r = !1;
|
|
135
|
+
for (let c = 0; c < o.prototype.attributes.length; c++)
|
|
136
|
+
if (o.prototype.attributes[c] === i.name) {
|
|
137
|
+
r = !0, h[i.name] = o.prototype.attributes[i.name];
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
!r && i.editable && (h[i.name] = i.defaultValue || null);
|
|
141
|
+
});
|
|
142
|
+
const m = new L({ attributes: h });
|
|
143
|
+
l.prototype = m, a.push(l);
|
|
144
|
+
}), a;
|
|
145
|
+
}
|
|
146
|
+
addType(e, t) {
|
|
147
|
+
e.types ? e.types.some((a) => a.id === t.id) || e.types.push(t) : e.types = [t];
|
|
148
|
+
}
|
|
149
|
+
async updateFeatureService(e) {
|
|
150
|
+
const { layer: t, fieldNames: s } = this, a = {
|
|
151
|
+
templates: e.templates,
|
|
152
|
+
types: e.types
|
|
153
|
+
}, o = `${t.url.replace("/rest/services", "/rest/admin/services")}/${t.layerId}/updateDefinition`, l = {
|
|
154
|
+
f: "json",
|
|
155
|
+
updateDefinition: JSON.stringify(a)
|
|
156
|
+
};
|
|
157
|
+
await y(o, {
|
|
158
|
+
query: { ...l, f: "json" },
|
|
159
|
+
method: "post",
|
|
160
|
+
responseType: "json"
|
|
161
|
+
}).then(async (h) => {
|
|
162
|
+
if (h.data?.success) {
|
|
163
|
+
const m = `${w(this.portal)}content/items/${this.item.id}/data`;
|
|
164
|
+
if (this.options?.ignorePopupTemplate || s.forEach((i) => {
|
|
165
|
+
t.popupTemplate?.fieldInfos && (t.popupTemplate.fieldInfos = t.popupTemplate.fieldInfos.filter((r) => r.fieldName !== i)), t.popupTemplate?.content?.forEach((r, c) => {
|
|
166
|
+
r.type === "fields" && r.fieldInfos && ((t.popupTemplate?.content)[c].fieldInfos = (t.popupTemplate?.content)[c].fieldInfos?.filter((u) => u.fieldName !== i));
|
|
167
|
+
});
|
|
168
|
+
}), t.attributeTableTemplate) {
|
|
169
|
+
const i = t.attributeTableTemplate.clone();
|
|
170
|
+
i.elements = i.elements.filter((r) => !(r.type === "field" && s.includes(r.fieldName))), i.orderByFields = i.orderByFields.filter((r) => !s.includes(r.field)), t.attributeTableTemplate = i;
|
|
171
|
+
}
|
|
172
|
+
await y(m, {
|
|
173
|
+
query: { f: "json" },
|
|
174
|
+
responseType: "json"
|
|
175
|
+
}).then(async (i) => {
|
|
176
|
+
const r = i.data;
|
|
177
|
+
if (r?.layers || r?.tables) {
|
|
178
|
+
const c = t.isTable, u = c ? r.tables : r.layers, d = u?.find((g) => g.id === t.layerId);
|
|
179
|
+
if (s.forEach((g) => {
|
|
180
|
+
d?.attributeTableInfo?.attributeTableElements && (d.attributeTableInfo.attributeTableElements = d.attributeTableInfo.attributeTableElements.filter((f) => !(f.type === "field" && f.fieldName === g)), d.attributeTableInfo.orderByFields = d.attributeTableInfo.orderByFields.filter((f) => f.field !== g));
|
|
181
|
+
}), d?.fieldConfiguration && (d.fieldConfiguration = d.fieldConfiguration.filter((g) => !s.includes(g.name))), d?.popupInfo) {
|
|
182
|
+
s.forEach((b) => {
|
|
183
|
+
d.popupInfo.fieldInfos = d.popupInfo.fieldInfos.filter((v) => v.fieldName !== b), d.popupInfo.popupElements?.forEach((v, I) => {
|
|
184
|
+
v.type === "fields" && v.fieldInfos && (d.popupInfo.popupElements[I].fieldInfos = d.popupInfo.popupElements[I].fieldInfos.filter((k) => k.fieldName !== b));
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
const g = `${w(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`, f = {};
|
|
188
|
+
c ? (f.tables = u, r.layers && (f.layers = r.layers)) : (f.layers = u, r.tables && (f.tables = r.tables));
|
|
189
|
+
const A = {
|
|
190
|
+
f: "json",
|
|
191
|
+
text: JSON.stringify(f)
|
|
192
|
+
};
|
|
193
|
+
await y(g, {
|
|
194
|
+
query: {
|
|
195
|
+
...A
|
|
196
|
+
},
|
|
197
|
+
method: "post",
|
|
198
|
+
responseType: "json"
|
|
199
|
+
}).then((b) => {
|
|
200
|
+
b.data?.success ? this.handleSuccess() : this.handleError();
|
|
201
|
+
}, () => this.handleError());
|
|
202
|
+
} else
|
|
203
|
+
this.handleSuccess();
|
|
204
|
+
} else i.httpStatus === 200 && (!i.data || JSON.stringify(i.data) === "{}") ? this.handleSuccess() : this.handleError();
|
|
205
|
+
}, () => this.handleError());
|
|
206
|
+
}
|
|
207
|
+
}, () => this.handleError());
|
|
208
|
+
}
|
|
209
|
+
handleSuccess() {
|
|
210
|
+
this.arcgisFieldsDeleted.emit(), this.dialogNode?.value && (this.dialogNode.value.open = !1), this.options?.handleCloseOnConsumer ? this.arcgisBeforeModalClose.emit("success") : this.displaySuccessAlert();
|
|
211
|
+
}
|
|
212
|
+
handleError(e) {
|
|
213
|
+
this.dialogNode?.value && (this.dialogNode.value.open = !1), e ? this.options?.handleCloseOnConsumer ? this.arcgisBeforeModalClose.emit("read-only-error") : this.displayReadOnlyErrorAlert() : this.options?.handleCloseOnConsumer ? this.arcgisBeforeModalClose.emit("error") : this.displayErrorAlert();
|
|
214
|
+
}
|
|
215
|
+
displaySuccessAlert() {
|
|
216
|
+
const { messages: e, fieldNames: t } = this;
|
|
217
|
+
this.successAlertNode && (this.successAlertNode.parentElement?.removeChild(this.successAlertNode), this.successAlertNode = void 0), this.successAlertNode = T(p`<calcite-alert .label=${t.length === 1 ? e.fieldDeleted : e.fieldsDeleted} kind=success icon=check-circle auto-close open><div slot=message>${t.length === 1 ? e.fieldDeleted : e.fieldsDeleted}</div></calcite-alert>`), document.body.append(this.successAlertNode);
|
|
218
|
+
}
|
|
219
|
+
displayErrorAlert() {
|
|
220
|
+
const { messages: e } = this;
|
|
221
|
+
this.errorAlertNode && (this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode), this.errorAlertNode = void 0), this.errorAlertNode = T(p`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close open><div slot=message>${e.fieldDeletionUnsuccessful}</div></calcite-alert>`), document.body.append(this.errorAlertNode);
|
|
222
|
+
}
|
|
223
|
+
displayReadOnlyErrorAlert() {
|
|
224
|
+
const { messages: e, portal: t } = this;
|
|
225
|
+
this.errorAlertNode && (this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode), this.errorAlertNode = void 0), this.errorAlertNode = T(p`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close auto-close-duration=slow open><div slot=title>${e.error}</div><div slot=message>${t.isPortal ? e.readOnlyErrorMessageEnterprise : e.readOnlyErrorMessage}</div>${!t.isPortal && p`<calcite-link slot=link target=_blank href=https://status.arcgis.com>${e.healthDashboard}</calcite-link>` || ""}</calcite-alert>`), document.body.append(this.errorAlertNode);
|
|
226
|
+
}
|
|
227
|
+
render() {
|
|
228
|
+
const { messages: e, fieldsAreDeletable: t, fieldNames: s, deleteInProgress: a } = this;
|
|
229
|
+
return this._propWatcherTask.render({
|
|
230
|
+
complete: () => (t || (s?.length ? s?.length === 1 ? console.error("Field cannot be deleted") : console.error("One or more fields cannot be deleted") : console.error("You must select at least one field.")), p`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${() => this.arcgisClose.emit()} .heading=${s?.length === 1 ? e.deleteField : e.deleteFields} ${N(this.dialogNode)}>${t ? p`<div class=${`dialog-content-wrapper ${a ? "hide-overflow" : ""}`}>${this.renderDeleteLoader()}<calcite-label>${s.length === 1 ? e.deletePrompt : e.deleteMultiplePrompt}</calcite-label>${this.renderFieldsPreview()}</div>${this.renderCancelButton()}${this.renderDeleteButton()}` : this.renderError()}</calcite-dialog>`)
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
renderError() {
|
|
234
|
+
const { messages: e } = this;
|
|
235
|
+
return p`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`;
|
|
236
|
+
}
|
|
237
|
+
renderDeleteLoader() {
|
|
238
|
+
const { messages: e, fieldNames: t, deleteInProgress: s } = this;
|
|
239
|
+
return p`<div class=${`loader-container ${s ? "active" : ""}`}><calcite-loader class="loader" .label=${t.length === 1 ? e.deletingField : e.deletingFields} .hidden=${!s}></calcite-loader><div class="loader-text">${t.length === 1 ? e.deletingField : e.deletingFields}</div></div>`;
|
|
240
|
+
}
|
|
241
|
+
renderFieldsPreview() {
|
|
242
|
+
const { fieldNames: e, layerFields: t, layerFieldsMap: s, arcadeExpMap: a, messages: o } = this;
|
|
243
|
+
return p`<calcite-list .label=${o.fields}>${e.map((l) => {
|
|
244
|
+
const h = t.find((m) => m.name === l);
|
|
245
|
+
return p`<calcite-list-item .label=${this.getFieldLabel(l)} .description=${`{${l}}`} .value=${l} .disabled=${!h.editable}><div slot=actions-end class="field-icons">${z({ fieldType: R(l, s, a) })}</div></calcite-list-item>`;
|
|
246
|
+
})}</calcite-list>`;
|
|
247
|
+
}
|
|
248
|
+
renderCancelButton() {
|
|
249
|
+
const { messages: e } = this;
|
|
250
|
+
return p`<calcite-button @click=${() => this.dialogNode.value.open = !1} slot=footer-end appearance=outline ${N(this.cancelNode)}>${e.cancel}</calcite-button>`;
|
|
251
|
+
}
|
|
252
|
+
renderDeleteButton() {
|
|
253
|
+
const { messages: e, fieldNames: t } = this;
|
|
254
|
+
return p`<calcite-button kind=danger slot=footer-end @click=${async (s) => {
|
|
255
|
+
const { portal: a } = this;
|
|
256
|
+
s.currentTarget.disabled = !0, this.cancelNode.value.disabled = !0, this.dialogNode.value.closeDisabled = !0, a.sourceJSON?.isReadOnly ? this.handleError(!0) : (this.deleteInProgress = !0, await this.deleteFields());
|
|
257
|
+
}}>${t.length === 1 ? e.deleteField : e.deleteFieldsWithNumber.replace("${number}", `${t.length}`)}</calcite-button>`;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
C("arcgis-portal-field-delete", _);
|
|
261
|
+
export {
|
|
262
|
+
_ as ArcgisPortalFieldDelete
|
|
263
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-alert";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-link";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-dialog";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-label";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-list";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-list-item";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
10
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-alert";
|
|
3
|
+
import "@esri/calcite-components/components/calcite-link";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-dialog";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-label";
|
|
6
|
+
import "@esri/calcite-components/components/calcite-loader";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-list";
|
|
8
|
+
import "@esri/calcite-components/components/calcite-list-item";
|
|
9
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
10
|
+
export * from "./customElement.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
|
+
import { ReactiveControllerHost } from 'lit';
|
|
3
|
+
import { Task } from '@lit/task';
|
|
4
|
+
import { ClassificationModel } from '../models/classificationModel';
|
|
5
|
+
interface ExtendedReactiveControllerHost extends ReactiveControllerHost {
|
|
6
|
+
portalItem?: __esri.PortalItem;
|
|
7
|
+
itemClassification?: __esri.PortalItem["classification"];
|
|
8
|
+
classificationModel: ClassificationModel;
|
|
9
|
+
}
|
|
10
|
+
export declare const createLoadClassificationDataTask: (host: ExtendedReactiveControllerHost) => Task;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A controller that provides access to the classification model.
|
|
3
|
+
* Use this controller to access and update shared classification info
|
|
4
|
+
* between multiple instances of the classification banner.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useClassificationModel: (component: import('@arcgis/lumina').LitElement & Omit<Pick<import('../models/classificationModel').ClassificationModel, "portalClassificationSchema">, "set" | "addHandles" | "declaredClass" | "destroyed" | "hasHandles" | "initialized" | "removeHandles" | "watch"> & {
|
|
7
|
+
autoDestroyDisabled: boolean;
|
|
8
|
+
destroy: () => Promise<void>;
|
|
9
|
+
}) => import('../models/classificationModel').ClassificationModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useT9n: import('@arcgis/lumina/controllers').UseT9n;
|