@arcgis/portal-components 5.0.0-next.1 → 5.0.0-next.100

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 (147) hide show
  1. package/dist/cdn/3BOLT543.js +4 -0
  2. package/dist/cdn/5SZ4BUDH.js +4 -0
  3. package/dist/cdn/65ROHP2V.js +4 -0
  4. package/dist/cdn/6TKNVPCV.js +4 -0
  5. package/dist/cdn/{YKLWML27.js → BGIDIIMY.js} +2 -2
  6. package/dist/cdn/BSK7ZXY7.js +6 -0
  7. package/dist/cdn/J27ARXGH.js +4 -0
  8. package/dist/cdn/JM7MX5TZ.js +4 -0
  9. package/dist/cdn/LJ3I2F7B.js +4 -0
  10. package/dist/cdn/PDSESC3R.js +4 -0
  11. package/dist/cdn/PJNXGCYW.js +4 -0
  12. package/dist/cdn/PUEIILLK.js +4 -0
  13. package/dist/cdn/VQFGIEOF.js +4 -0
  14. package/dist/cdn/{36SCONH7.js → WJNAR5WR.js} +1 -1
  15. package/dist/cdn/YJPLZKMU.js +4 -0
  16. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ar.json +1 -1
  17. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bg.json +1 -1
  18. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bs.json +1 -1
  19. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ca.json +1 -1
  20. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.cs.json +1 -1
  21. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.da.json +1 -1
  22. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.de.json +1 -1
  23. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.el.json +1 -1
  24. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.es.json +1 -1
  25. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.et.json +1 -1
  26. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fi.json +1 -1
  27. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fr.json +1 -1
  28. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.he.json +1 -1
  29. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hr.json +1 -1
  30. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hu.json +1 -1
  31. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.id.json +1 -1
  32. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.it.json +1 -1
  33. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ja.json +1 -1
  34. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ko.json +1 -1
  35. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lt.json +1 -1
  36. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lv.json +1 -1
  37. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.nl.json +1 -1
  38. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.no.json +1 -1
  39. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pl.json +1 -1
  40. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-BR.json +1 -1
  41. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-PT.json +1 -1
  42. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ro.json +1 -1
  43. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ru.json +1 -1
  44. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sk.json +1 -1
  45. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sl.json +1 -1
  46. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sr.json +1 -1
  47. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sv.json +1 -1
  48. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.th.json +1 -1
  49. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.tr.json +1 -1
  50. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.uk.json +1 -1
  51. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.vi.json +1 -1
  52. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-CN.json +1 -1
  53. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-HK.json +1 -1
  54. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-TW.json +1 -1
  55. package/dist/cdn/assets/portal-extent-picker/t9n/messages.ar.json +1 -0
  56. package/dist/cdn/assets/portal-extent-picker/t9n/messages.bg.json +1 -0
  57. package/dist/cdn/assets/portal-extent-picker/t9n/messages.bs.json +1 -0
  58. package/dist/cdn/assets/portal-extent-picker/t9n/messages.ca.json +1 -0
  59. package/dist/cdn/assets/portal-extent-picker/t9n/messages.cs.json +1 -0
  60. package/dist/cdn/assets/portal-extent-picker/t9n/messages.da.json +1 -0
  61. package/dist/cdn/assets/portal-extent-picker/t9n/messages.de.json +1 -0
  62. package/dist/cdn/assets/portal-extent-picker/t9n/messages.el.json +1 -0
  63. package/dist/cdn/assets/portal-extent-picker/t9n/messages.en.json +1 -0
  64. package/dist/cdn/assets/portal-extent-picker/t9n/messages.es.json +1 -0
  65. package/dist/cdn/assets/portal-extent-picker/t9n/messages.et.json +1 -0
  66. package/dist/cdn/assets/portal-extent-picker/t9n/messages.fi.json +1 -0
  67. package/dist/cdn/assets/portal-extent-picker/t9n/messages.fr.json +1 -0
  68. package/dist/cdn/assets/portal-extent-picker/t9n/messages.he.json +1 -0
  69. package/dist/cdn/assets/portal-extent-picker/t9n/messages.hr.json +1 -0
  70. package/dist/cdn/assets/portal-extent-picker/t9n/messages.hu.json +1 -0
  71. package/dist/cdn/assets/portal-extent-picker/t9n/messages.id.json +1 -0
  72. package/dist/cdn/assets/portal-extent-picker/t9n/messages.it.json +1 -0
  73. package/dist/cdn/assets/portal-extent-picker/t9n/messages.ja.json +1 -0
  74. package/dist/cdn/assets/portal-extent-picker/t9n/messages.ko.json +1 -0
  75. package/dist/cdn/assets/portal-extent-picker/t9n/messages.lt.json +1 -0
  76. package/dist/cdn/assets/portal-extent-picker/t9n/messages.lv.json +1 -0
  77. package/dist/cdn/assets/portal-extent-picker/t9n/messages.nb.json +1 -0
  78. package/dist/cdn/assets/portal-extent-picker/t9n/messages.nl.json +1 -0
  79. package/dist/cdn/assets/portal-extent-picker/t9n/messages.no.json +1 -0
  80. package/dist/cdn/assets/portal-extent-picker/t9n/messages.pl.json +1 -0
  81. package/dist/cdn/assets/portal-extent-picker/t9n/messages.pt-BR.json +1 -0
  82. package/dist/cdn/assets/portal-extent-picker/t9n/messages.pt-PT.json +1 -0
  83. package/dist/cdn/assets/portal-extent-picker/t9n/messages.ro.json +1 -0
  84. package/dist/cdn/assets/portal-extent-picker/t9n/messages.ru.json +1 -0
  85. package/dist/cdn/assets/portal-extent-picker/t9n/messages.sk.json +1 -0
  86. package/dist/cdn/assets/portal-extent-picker/t9n/messages.sl.json +1 -0
  87. package/dist/cdn/assets/portal-extent-picker/t9n/messages.sr.json +1 -0
  88. package/dist/cdn/assets/portal-extent-picker/t9n/messages.sv.json +1 -0
  89. package/dist/cdn/assets/portal-extent-picker/t9n/messages.th.json +1 -0
  90. package/dist/cdn/assets/portal-extent-picker/t9n/messages.tr.json +1 -0
  91. package/dist/cdn/assets/portal-extent-picker/t9n/messages.uk.json +1 -0
  92. package/dist/cdn/assets/portal-extent-picker/t9n/messages.vi.json +1 -0
  93. package/dist/cdn/assets/portal-extent-picker/t9n/messages.zh-CN.json +1 -0
  94. package/dist/cdn/assets/portal-extent-picker/t9n/messages.zh-HK.json +1 -0
  95. package/dist/cdn/assets/portal-extent-picker/t9n/messages.zh-TW.json +1 -0
  96. package/dist/cdn/index.js +2 -2
  97. package/dist/cdn/main.css +1 -1
  98. package/dist/chunks/common.js +1 -1
  99. package/dist/chunks/fieldAddDelete.js +71 -67
  100. package/dist/chunks/loadClassificationData.js +1 -1
  101. package/dist/chunks/requests.js +2 -2
  102. package/dist/chunks/runtime.js +2 -2
  103. package/dist/chunks/useT9n.js +1 -1
  104. package/dist/components/arcgis-portal-classification-banner/customElement.js +18 -17
  105. package/dist/components/arcgis-portal-classification-config/customElement.js +111 -103
  106. package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
  107. package/dist/components/arcgis-portal-classification-form-element/customElement.d.ts +2 -1
  108. package/dist/components/arcgis-portal-classification-form-element/customElement.js +15 -15
  109. package/dist/components/arcgis-portal-extent-picker/customElement.d.ts +51 -0
  110. package/dist/components/arcgis-portal-extent-picker/customElement.js +553 -0
  111. package/dist/components/arcgis-portal-extent-picker/index.d.ts +8 -0
  112. package/dist/components/arcgis-portal-extent-picker/index.js +8 -0
  113. package/dist/components/arcgis-portal-extent-picker/mask-layer.d.ts +28 -0
  114. package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.d.ts +26 -0
  115. package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +60 -0
  116. package/dist/components/arcgis-portal-extent-picker-coord-field/index.d.ts +3 -0
  117. package/dist/components/arcgis-portal-extent-picker-coord-field/index.js +3 -0
  118. package/dist/components/arcgis-portal-field-delete/customElement.d.ts +4 -2
  119. package/dist/components/arcgis-portal-field-delete/customElement.js +82 -75
  120. package/dist/docs/api.json +316 -38
  121. package/dist/docs/docs.json +310 -9
  122. package/dist/docs/vscode.html-custom-data.json +33 -1
  123. package/dist/docs/web-types.json +133 -2
  124. package/dist/index.d.ts +27 -5
  125. package/dist/index.js +1 -1
  126. package/dist/loader.d.ts +1 -1
  127. package/dist/loader.js +7 -5
  128. package/dist/types/classification.d.ts +1 -1
  129. package/dist/types/components.d.ts +1 -1
  130. package/dist/types/lumina.d.ts +15 -6
  131. package/dist/types/preact.d.ts +16 -6
  132. package/dist/types/preact10.d.ts +17 -6
  133. package/dist/types/react.d.ts +17 -6
  134. package/dist/types/stencil.d.ts +15 -6
  135. package/dist/utils/commonFunctions.d.ts +2 -1
  136. package/dist/utils/style.d.ts +1 -0
  137. package/package.json +6 -6
  138. package/dist/cdn/3C7EKA4P.js +0 -4
  139. package/dist/cdn/M5TSWZEI.js +0 -4
  140. package/dist/cdn/MMZ2SLQM.js +0 -4
  141. package/dist/cdn/OHA5XBKC.js +0 -4
  142. package/dist/cdn/QXPXCLIB.js +0 -4
  143. package/dist/cdn/TBZVZ3NK.js +0 -4
  144. package/dist/cdn/UAMIU7I6.js +0 -4
  145. package/dist/cdn/UYHDCO7W.js +0 -4
  146. package/dist/cdn/VUHRSXSV.js +0 -4
  147. package/dist/cdn/YXRYHZH5.js +0 -6
package/dist/loader.js CHANGED
@@ -1,15 +1,17 @@
1
- import { r as i } from "./chunks/runtime.js";
1
+ import { r as e } from "./chunks/runtime.js";
2
2
  import { makeDefineCustomElements as t } from "@arcgis/lumina";
3
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
5
- v5.0.0-next.1 */
6
- const s = t(i, {
5
+ v5.0.0-next.100 */
6
+ const r = t(e, {
7
7
  "arcgis-portal-classification-banner": [() => import("./components/arcgis-portal-classification-banner/customElement.js"), "autoDestroyDisabled,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],
8
8
  "arcgis-portal-classification-config": [() => import("./components/arcgis-portal-classification-config/customElement.js"), "autoDestroyDisabled,portalItem:,status,valid,values;destroy,resetForm,validateForm"],
9
9
  "arcgis-portal-classification-favorite": [() => import("./components/arcgis-portal-classification-favorite/customElement.js"), "attributeExpressionResults:,classificationValue:,favoriteClassifications:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],
10
- "arcgis-portal-classification-form-element": [() => import("./components/arcgis-portal-classification-form-element/customElement.js"), "attribute:,attributeKey,renderingInfo:,value:"],
10
+ "arcgis-portal-classification-form-element": [() => import("./components/arcgis-portal-classification-form-element/customElement.js"), "attribute:,attributeKey,isRequiredErrors:,renderingInfo:,value:"],
11
+ "arcgis-portal-extent-picker": [() => import("./components/arcgis-portal-extent-picker/customElement.js"), "active,contentOnly,extentService,extentValue:,isArea,itemId,portal:;;getExtent"],
12
+ "arcgis-portal-extent-picker-coord-field": [() => import("./components/arcgis-portal-extent-picker-coord-field/customElement.js"), "errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],
11
13
  "arcgis-portal-field-delete": [() => import("./components/arcgis-portal-field-delete/customElement.js"), "config:,fieldNames:,layer:,mapView:,options:"]
12
14
  });
13
15
  export {
14
- s as defineCustomElements
16
+ r as defineCustomElements
15
17
  };
@@ -183,7 +183,7 @@ export interface FavoriteClassificationResult {
183
183
  }
184
184
  export interface ClassificationAlertIndicator {
185
185
  alertIndicatorType?: HTMLCalciteAlertElement["kind"];
186
- alertIndicatorIcon?: string;
186
+ alertIndicatorIcon?: HTMLCalciteIconElement["icon"];
187
187
  alertIndicatorInfo: string;
188
188
  }
189
189
  export interface AddFavoriteClassificationResult {
@@ -1 +1 @@
1
- export * from "./stencil";
1
+ export * from "./stencil.js";
@@ -1,9 +1,10 @@
1
1
  /// <reference types="../index.d.ts" />
2
- import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner";
3
- import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config";
4
- import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite";
5
- import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element";
6
- import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete";
2
+ import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner/index.js";
3
+ import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config/index.js";
4
+ import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite/index.js";
5
+ import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element/index.js";
6
+ import type { ArcgisPortalExtentPicker } from "../components/arcgis-portal-extent-picker/index.js";
7
+ import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete/index.js";
7
8
  import type { h, EventHandler } from "@arcgis/lumina";
8
9
 
9
10
  interface LuminaArcgisPortalClassificationBanner extends Partial<Pick<ArcgisPortalClassificationBanner, 'missingExistingClassification' | 'portalItem' | 'validationErrors' | 'variant'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalClassificationBannerElement> {
@@ -16,11 +17,18 @@ interface LuminaArcgisPortalClassificationConfig extends Required<Pick<ArcgisPor
16
17
  interface LuminaArcgisPortalClassificationFavorite extends Partial<Pick<ArcgisPortalClassificationFavorite, 'attributeExpressionResults' | 'classificationValue' | 'favoriteClassifications' | 'portalItem' | 'resetFavoriteClassification' | 'selectedFavoriteClassificationName' | 'updateClassificationData'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalClassificationFavoriteElement> {
17
18
  }
18
19
 
19
- interface LuminaArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'renderingInfo' | 'value'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
20
+ interface LuminaArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'isRequiredErrors' | 'renderingInfo' | 'value'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
20
21
  onarcgisAttributeValueChange?: EventHandler<HTMLArcgisPortalClassificationFormElementElement["arcgisAttributeValueChange"]>;
21
22
  }
22
23
 
24
+ interface LuminaArcgisPortalExtentPicker extends Partial<Pick<ArcgisPortalExtentPicker, 'active' | 'contentOnly' | 'extentService' | 'extentValue' | 'isArea' | 'itemId' | 'portal'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalExtentPickerElement> {
25
+ onarcgisExtentPickerChange?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerChange"]>;
26
+ onarcgisExtentPickerClose?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerClose"]>;
27
+ onarcgisExtentPickerSave?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerSave"]>;
28
+ }
29
+
23
30
  interface LuminaArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDelete, 'config' | 'fieldNames' | 'layer' | 'mapView' | 'options'>>, h.JSX.HTMLAttributes<HTMLArcgisPortalFieldDeleteElement> {
31
+ onarcgisBeforeDelete?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeDelete"]>;
24
32
  onarcgisBeforeModalClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeModalClose"]>;
25
33
  onarcgisClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisClose"]>;
26
34
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
@@ -33,6 +41,7 @@ declare module "@arcgis/lumina" {
33
41
  "arcgis-portal-classification-config": LuminaArcgisPortalClassificationConfig;
34
42
  "arcgis-portal-classification-favorite": LuminaArcgisPortalClassificationFavorite;
35
43
  "arcgis-portal-classification-form-element": LuminaArcgisPortalClassificationFormElement;
44
+ "arcgis-portal-extent-picker": LuminaArcgisPortalExtentPicker;
36
45
  "arcgis-portal-field-delete": LuminaArcgisPortalFieldDelete;
37
46
  }
38
47
  }
@@ -1,9 +1,10 @@
1
1
  /// <reference types="../index.d.ts" />
2
- import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner";
3
- import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config";
4
- import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite";
5
- import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element";
6
- import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete";
2
+ import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner/index.js";
3
+ import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config/index.js";
4
+ import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite/index.js";
5
+ import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element/index.js";
6
+ import type { ArcgisPortalExtentPicker } from "../components/arcgis-portal-extent-picker/index.js";
7
+ import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete/index.js";
7
8
  import { HTMLAttributes } from "preact";
8
9
  import type { EventHandler } from "@arcgis/lumina";
9
10
 
@@ -17,11 +18,18 @@ interface PreactArcgisPortalClassificationConfig extends Required<Pick<ArcgisPor
17
18
  interface PreactArcgisPortalClassificationFavorite extends Partial<Pick<ArcgisPortalClassificationFavorite, 'attributeExpressionResults' | 'classificationValue' | 'favoriteClassifications' | 'portalItem' | 'resetFavoriteClassification' | 'selectedFavoriteClassificationName' | 'updateClassificationData'>>, HTMLAttributes<HTMLArcgisPortalClassificationFavoriteElement> {
18
19
  }
19
20
 
20
- interface PreactArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'renderingInfo' | 'value'>>, HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
21
+ interface PreactArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'isRequiredErrors' | 'renderingInfo' | 'value'>>, HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
21
22
  onarcgisAttributeValueChange?: EventHandler<HTMLArcgisPortalClassificationFormElementElement["arcgisAttributeValueChange"]>;
22
23
  }
23
24
 
25
+ interface PreactArcgisPortalExtentPicker extends Partial<Pick<ArcgisPortalExtentPicker, 'active' | 'contentOnly' | 'extentService' | 'extentValue' | 'isArea' | 'itemId' | 'portal'>>, HTMLAttributes<HTMLArcgisPortalExtentPickerElement> {
26
+ onarcgisExtentPickerChange?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerChange"]>;
27
+ onarcgisExtentPickerClose?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerClose"]>;
28
+ onarcgisExtentPickerSave?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerSave"]>;
29
+ }
30
+
24
31
  interface PreactArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDelete, 'config' | 'fieldNames' | 'layer' | 'mapView' | 'options'>>, HTMLAttributes<HTMLArcgisPortalFieldDeleteElement> {
32
+ onarcgisBeforeDelete?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeDelete"]>;
25
33
  onarcgisBeforeModalClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeModalClose"]>;
26
34
  onarcgisClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisClose"]>;
27
35
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
@@ -34,6 +42,7 @@ declare module 'preact' {
34
42
  "arcgis-portal-classification-config": PreactArcgisPortalClassificationConfig;
35
43
  "arcgis-portal-classification-favorite": PreactArcgisPortalClassificationFavorite;
36
44
  "arcgis-portal-classification-form-element": PreactArcgisPortalClassificationFormElement;
45
+ "arcgis-portal-extent-picker": PreactArcgisPortalExtentPicker;
37
46
  "arcgis-portal-field-delete": PreactArcgisPortalFieldDelete;
38
47
  }
39
48
  }
@@ -43,6 +52,7 @@ declare module 'preact' {
43
52
  "arcgis-portal-classification-config": PreactArcgisPortalClassificationConfig;
44
53
  "arcgis-portal-classification-favorite": PreactArcgisPortalClassificationFavorite;
45
54
  "arcgis-portal-classification-form-element": PreactArcgisPortalClassificationFormElement;
55
+ "arcgis-portal-extent-picker": PreactArcgisPortalExtentPicker;
46
56
  "arcgis-portal-field-delete": PreactArcgisPortalFieldDelete;
47
57
  }
48
58
  }
@@ -1,9 +1,10 @@
1
1
  /// <reference types="../index.d.ts" />
2
- import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner";
3
- import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config";
4
- import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite";
5
- import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element";
6
- import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete";
2
+ import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner/index.js";
3
+ import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config/index.js";
4
+ import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite/index.js";
5
+ import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element/index.js";
6
+ import type { ArcgisPortalExtentPicker } from "../components/arcgis-portal-extent-picker/index.js";
7
+ import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete/index.js";
7
8
  import { JSX as PreactJsx } from "preact";
8
9
  import type { EventHandler } from "@arcgis/lumina";
9
10
 
@@ -21,12 +22,20 @@ interface PreactArcgisPortalClassificationFavorite extends Partial<Pick<ArcgisPo
21
22
  }
22
23
 
23
24
  /** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
24
- interface PreactArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'renderingInfo' | 'value'>>, PreactJsx.HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
25
+ interface PreactArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'isRequiredErrors' | 'renderingInfo' | 'value'>>, PreactJsx.HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
25
26
  onarcgisAttributeValueChange?: EventHandler<HTMLArcgisPortalClassificationFormElementElement["arcgisAttributeValueChange"]>;
26
27
  }
27
28
 
29
+ /** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
30
+ interface PreactArcgisPortalExtentPicker extends Partial<Pick<ArcgisPortalExtentPicker, 'active' | 'contentOnly' | 'extentService' | 'extentValue' | 'isArea' | 'itemId' | 'portal'>>, PreactJsx.HTMLAttributes<HTMLArcgisPortalExtentPickerElement> {
31
+ onarcgisExtentPickerChange?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerChange"]>;
32
+ onarcgisExtentPickerClose?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerClose"]>;
33
+ onarcgisExtentPickerSave?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerSave"]>;
34
+ }
35
+
28
36
  /** @deprecated Update to Preact 10.27.2+ or 11+ and consume types/preact file over types/preact10 */
29
37
  interface PreactArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDelete, 'config' | 'fieldNames' | 'layer' | 'mapView' | 'options'>>, PreactJsx.HTMLAttributes<HTMLArcgisPortalFieldDeleteElement> {
38
+ onarcgisBeforeDelete?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeDelete"]>;
30
39
  onarcgisBeforeModalClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeModalClose"]>;
31
40
  onarcgisClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisClose"]>;
32
41
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
@@ -39,6 +48,7 @@ declare module 'preact' {
39
48
  "arcgis-portal-classification-config": PreactArcgisPortalClassificationConfig;
40
49
  "arcgis-portal-classification-favorite": PreactArcgisPortalClassificationFavorite;
41
50
  "arcgis-portal-classification-form-element": PreactArcgisPortalClassificationFormElement;
51
+ "arcgis-portal-extent-picker": PreactArcgisPortalExtentPicker;
42
52
  "arcgis-portal-field-delete": PreactArcgisPortalFieldDelete;
43
53
  }
44
54
  }
@@ -48,6 +58,7 @@ declare module 'preact' {
48
58
  "arcgis-portal-classification-config": PreactArcgisPortalClassificationConfig;
49
59
  "arcgis-portal-classification-favorite": PreactArcgisPortalClassificationFavorite;
50
60
  "arcgis-portal-classification-form-element": PreactArcgisPortalClassificationFormElement;
61
+ "arcgis-portal-extent-picker": PreactArcgisPortalExtentPicker;
51
62
  "arcgis-portal-field-delete": PreactArcgisPortalFieldDelete;
52
63
  }
53
64
  }
@@ -1,9 +1,10 @@
1
1
  /// <reference types="../index.d.ts" />
2
- import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner";
3
- import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config";
4
- import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite";
5
- import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element";
6
- import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete";
2
+ import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner/index.js";
3
+ import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config/index.js";
4
+ import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite/index.js";
5
+ import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element/index.js";
6
+ import type { ArcgisPortalExtentPicker } from "../components/arcgis-portal-extent-picker/index.js";
7
+ import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete/index.js";
7
8
  import type { HTMLProps } from 'react';
8
9
  import type { EventHandler } from "@arcgis/lumina";
9
10
 
@@ -17,11 +18,18 @@ interface ReactArcgisPortalClassificationConfig extends Required<Pick<ArcgisPort
17
18
  interface ReactArcgisPortalClassificationFavorite extends Partial<Pick<ArcgisPortalClassificationFavorite, 'attributeExpressionResults' | 'classificationValue' | 'favoriteClassifications' | 'portalItem' | 'resetFavoriteClassification' | 'selectedFavoriteClassificationName' | 'updateClassificationData'>>, HTMLProps<HTMLArcgisPortalClassificationFavoriteElement> {
18
19
  }
19
20
 
20
- interface ReactArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'renderingInfo' | 'value'>>, HTMLProps<HTMLArcgisPortalClassificationFormElementElement> {
21
+ interface ReactArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'isRequiredErrors' | 'renderingInfo' | 'value'>>, HTMLProps<HTMLArcgisPortalClassificationFormElementElement> {
21
22
  onarcgisAttributeValueChange?: EventHandler<HTMLArcgisPortalClassificationFormElementElement["arcgisAttributeValueChange"]>;
22
23
  }
23
24
 
25
+ interface ReactArcgisPortalExtentPicker extends Partial<Pick<ArcgisPortalExtentPicker, 'active' | 'contentOnly' | 'extentService' | 'extentValue' | 'isArea' | 'itemId' | 'portal'>>, HTMLProps<HTMLArcgisPortalExtentPickerElement> {
26
+ onarcgisExtentPickerChange?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerChange"]>;
27
+ onarcgisExtentPickerClose?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerClose"]>;
28
+ onarcgisExtentPickerSave?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerSave"]>;
29
+ }
30
+
24
31
  interface ReactArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDelete, 'config' | 'fieldNames' | 'layer' | 'mapView' | 'options'>>, HTMLProps<HTMLArcgisPortalFieldDeleteElement> {
32
+ onarcgisBeforeDelete?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeDelete"]>;
25
33
  onarcgisBeforeModalClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeModalClose"]>;
26
34
  onarcgisClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisClose"]>;
27
35
  onarcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
@@ -34,6 +42,7 @@ declare module "react" {
34
42
  "arcgis-portal-classification-config": ReactArcgisPortalClassificationConfig;
35
43
  "arcgis-portal-classification-favorite": ReactArcgisPortalClassificationFavorite;
36
44
  "arcgis-portal-classification-form-element": ReactArcgisPortalClassificationFormElement;
45
+ "arcgis-portal-extent-picker": ReactArcgisPortalExtentPicker;
37
46
  "arcgis-portal-field-delete": ReactArcgisPortalFieldDelete;
38
47
  }
39
48
  }
@@ -45,6 +54,7 @@ declare module "react/jsx-runtime" {
45
54
  "arcgis-portal-classification-config": ReactArcgisPortalClassificationConfig;
46
55
  "arcgis-portal-classification-favorite": ReactArcgisPortalClassificationFavorite;
47
56
  "arcgis-portal-classification-form-element": ReactArcgisPortalClassificationFormElement;
57
+ "arcgis-portal-extent-picker": ReactArcgisPortalExtentPicker;
48
58
  "arcgis-portal-field-delete": ReactArcgisPortalFieldDelete;
49
59
  }
50
60
  }
@@ -56,6 +66,7 @@ declare module "react/jsx-dev-runtime" {
56
66
  "arcgis-portal-classification-config": ReactArcgisPortalClassificationConfig;
57
67
  "arcgis-portal-classification-favorite": ReactArcgisPortalClassificationFavorite;
58
68
  "arcgis-portal-classification-form-element": ReactArcgisPortalClassificationFormElement;
69
+ "arcgis-portal-extent-picker": ReactArcgisPortalExtentPicker;
59
70
  "arcgis-portal-field-delete": ReactArcgisPortalFieldDelete;
60
71
  }
61
72
  }
@@ -1,9 +1,10 @@
1
1
  /// <reference types="../index.d.ts" />
2
- import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner";
3
- import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config";
4
- import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite";
5
- import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element";
6
- import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete";
2
+ import type { ArcgisPortalClassificationBanner } from "../components/arcgis-portal-classification-banner/index.js";
3
+ import type { ArcgisPortalClassificationConfig } from "../components/arcgis-portal-classification-config/index.js";
4
+ import type { ArcgisPortalClassificationFavorite } from "../components/arcgis-portal-classification-favorite/index.js";
5
+ import type { ArcgisPortalClassificationFormElement } from "../components/arcgis-portal-classification-form-element/index.js";
6
+ import type { ArcgisPortalExtentPicker } from "../components/arcgis-portal-extent-picker/index.js";
7
+ import type { ArcgisPortalFieldDelete } from "../components/arcgis-portal-field-delete/index.js";
7
8
  import { JSXBase as StencilJsx } from "@stencil/core/internal";
8
9
  import type { EventHandler } from "@arcgis/lumina";
9
10
 
@@ -17,11 +18,18 @@ interface StencilArcgisPortalClassificationConfig extends Required<Pick<ArcgisPo
17
18
  interface StencilArcgisPortalClassificationFavorite extends Partial<Pick<ArcgisPortalClassificationFavorite, 'attributeExpressionResults' | 'classificationValue' | 'favoriteClassifications' | 'portalItem' | 'resetFavoriteClassification' | 'selectedFavoriteClassificationName' | 'updateClassificationData'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalClassificationFavoriteElement> {
18
19
  }
19
20
 
20
- interface StencilArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'renderingInfo' | 'value'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
21
+ interface StencilArcgisPortalClassificationFormElement extends Partial<Pick<ArcgisPortalClassificationFormElement, 'attribute' | 'attributeKey' | 'isRequiredErrors' | 'renderingInfo' | 'value'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalClassificationFormElementElement> {
21
22
  onArcgisAttributeValueChange?: EventHandler<HTMLArcgisPortalClassificationFormElementElement["arcgisAttributeValueChange"]>;
22
23
  }
23
24
 
25
+ interface StencilArcgisPortalExtentPicker extends Partial<Pick<ArcgisPortalExtentPicker, 'active' | 'contentOnly' | 'extentService' | 'extentValue' | 'isArea' | 'itemId' | 'portal'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalExtentPickerElement> {
26
+ onArcgisExtentPickerChange?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerChange"]>;
27
+ onArcgisExtentPickerClose?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerClose"]>;
28
+ onArcgisExtentPickerSave?: EventHandler<HTMLArcgisPortalExtentPickerElement["arcgisExtentPickerSave"]>;
29
+ }
30
+
24
31
  interface StencilArcgisPortalFieldDelete extends Partial<Pick<ArcgisPortalFieldDelete, 'config' | 'fieldNames' | 'layer' | 'mapView' | 'options'>>, StencilJsx.HTMLAttributes<HTMLArcgisPortalFieldDeleteElement> {
32
+ onArcgisBeforeDelete?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeDelete"]>;
25
33
  onArcgisBeforeModalClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisBeforeModalClose"]>;
26
34
  onArcgisClose?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisClose"]>;
27
35
  onArcgisFieldsDeleted?: EventHandler<HTMLArcgisPortalFieldDeleteElement["arcgisFieldsDeleted"]>;
@@ -32,6 +40,7 @@ interface ExposedElements {
32
40
  "arcgis-portal-classification-config": StencilArcgisPortalClassificationConfig;
33
41
  "arcgis-portal-classification-favorite": StencilArcgisPortalClassificationFavorite;
34
42
  "arcgis-portal-classification-form-element": StencilArcgisPortalClassificationFormElement;
43
+ "arcgis-portal-extent-picker": StencilArcgisPortalExtentPicker;
35
44
  "arcgis-portal-field-delete": StencilArcgisPortalFieldDelete;
36
45
  }
37
46
 
@@ -1,10 +1,11 @@
1
1
  /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ export declare function supportsFieldConfigurations(layer: any): boolean;
2
3
  /**
3
4
  * Returns true if the value is defined
4
5
  * @param value - value to check
5
6
  */
6
7
  export declare function isDefined<T>(value?: T | null): value is T;
7
- export declare function getFieldDisplayName(field: __esri.FieldInfo, arcadeMap: Map<string, __esri.ExpressionInfo>): string;
8
+ export declare function getFieldDisplayName(layer: any, field: __esri.FieldInfo, arcadeMap: Map<string, __esri.ExpressionInfo>): string;
8
9
  export declare function getFieldType(fieldName: string, layerFieldsMap: Map<string, __esri.Field>, arcadeExpMap: Map<string, __esri.ExpressionInfo>): string;
9
10
  export declare function generateLayerFieldsMap(layer: any): Promise<Map<string, __esri.Field>>;
10
11
  export declare function generateArcadeExpressionMap(popupTemplate: __esri.PopupTemplate): Map<string, __esri.ExpressionInfo>;
@@ -0,0 +1 @@
1
+ export declare function insertJsApiStylesheet(shadowRoot: ShadowRoot | null): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/portal-components",
3
- "version": "5.0.0-next.1",
3
+ "version": "5.0.0-next.100",
4
4
  "description": "ArcGIS Portal Components",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -38,15 +38,15 @@
38
38
  ],
39
39
  "license": "SEE LICENSE IN LICENSE.md",
40
40
  "dependencies": {
41
- "@arcgis/lumina": "5.0.0-next.1",
42
- "@arcgis/toolkit": "5.0.0-next.1",
43
- "@lit/task": "^1.0.2",
41
+ "@arcgis/lumina": "5.0.0-next.100",
42
+ "@arcgis/toolkit": "5.0.0-next.100",
43
+ "@lit/task": "^1.0.3",
44
44
  "lit": "^3.3.0",
45
45
  "tslib": "^2.8.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@arcgis/core": ">=4.34.0-next.43 <4.35",
49
- "@esri/calcite-components": "^3.3.0"
48
+ "@arcgis/core": ">=5.0.0-next.62 <5.1",
49
+ "@esri/calcite-components": "^5.0.0-next.28"
50
50
  },
51
51
  "css.customData": [
52
52
  "dist/docs/vscode.css-custom-data.json"
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import{b as J}from"./M5TSWZEI.js";import{d as B}from"./UYHDCO7W.js";import{B as D,C as A,D as j,G as S,I as R,h as M,j as y,p as P}from"./YXRYHZH5.js";export default $arcgis.t(([ge,we,be,E,I,Y,Q,k,T,$])=>{var L=(s=>(s.expression="expression/",s.raster="Raster.",s.relationship="relationships/",s))(L||{});function N(s){return s!=null}function q(s,e){let t=s.fieldName;if(t.includes(L.expression)){let i=e.get(t);return i?.title?i.title:t}else return s.label?s.label:t}function W(s,e,t){let i="";if(/^raster.(?:item|service)pixelvalue/iu.test(s))i="number";else if(e.has(s)){let r=e.get(s);i=r.type?r.type.toLowerCase():""}else if(t.has(s)){let r=t.get(s);i=r.returnType?r.returnType.toLowerCase():""}else i="number";return i}async function V(s){return new Map((await X(s)).filter(e=>e.visible).map(e=>[e.name,e]))}function G(s){let e=new Map;return s?.expressionInfos&&s.expressionInfos.forEach(t=>{let i=`${L.expression}${t.name}`;e.set(i,t)}),e}async function X(s){return await new Promise((e,t)=>{switch(s.type){case"feature":case"ogc-feature":case"stream":e(s.fields);break;case"sublayer":{let i=s,r=i?.layer;r?.portalItem&&r.url.includes("https://demographics")&&r.url.includes(".arcgis.com")?r.portalItem?.fetchData().then(a=>{if(a?.thematicGroup){let n=new Map(i.fields.map(o=>[o.name,o])),c=a.thematicGroup.fieldNames,p=[];c.forEach(o=>{n.has(o)&&p.push(n.get(o))}),e(p)}else e(i.fields)}).catch(a=>{t(new Error(a))}):e(i.fields);break}case"imagery":case"imagery-tile":case"wcs":e(s.rasterFields);break;default:e("fields"in s?s.fields??[]:[])}})}var Z=s=>s&&!s.endsWith("/")?`${s}/`:s;function F(s){return Z(s.restUrl)}function ee(s,e){return _(s,e)||te(s,e)}function _(s,e){return s.owner===e.username}function te(s,e){let t=s.owner,i=s.itemControl==="admin",r=["esri_livingatlas","esri_demographics","esri_boundaries"];return s.portal?.isPortal&&!_(s,e)&&i&&t?.includes("esri_")&&!r.includes(t)?!1:i}function se(s){return s.typeKeywords?.includes("Spatiotemporal")}function ie(s){return s.typeKeywords?.includes("View Service")}function re(s){return s.typeKeywords?.includes("Hosted Service")}function ae(s){return s.typeKeywords?.includes("Multi Services View")}function ne(s){return s?.hasViews&&!s.sourceSchemaChangesAllowed}async function oe(s){let e=s?.portalItem;if(!e)return await Promise.resolve(null);let t=e.portal;if(t?.user){let i=`${F(t)}community/users/${t.user.username}`;return await T(i,{query:{f:"json",token:e.portal.credential?.token},responseType:"json"}).then(async r=>{let a=r.data?.groups??[];return await Promise.resolve(a)},async()=>await Promise.reject(new Error("Failed to fetch user groups")))}return await Promise.resolve(null)}async function le(s){let e=s?.portalItem;if(!e)return await Promise.resolve(null);let t=e.portal,i=`${F(t)}content/items/${e.id}/groups`;return await T(i,{query:{f:"json",token:e.portal.credential?.token},responseType:"json"}).then(async r=>{let a=r.data?.admin??[],n=r.data?.member??[],c=r.data?.other??[],p=[...a,...n,...c];return await Promise.resolve(p)},async()=>await Promise.reject(new Error("Failed to fetch item groups")))}async function de(s,e,{relationshipType:t,direction:i}){let r=`${F(e)}content/items/${s}/relatedItems`;return await T(r,{query:{f:"json",relationshipType:t,direction:i},responseType:"json"})}function ce(s,e){return s?.some(t=>e?.some(i=>t.id===i.id&&t.capabilities.includes("updateitemcontrol")))}function d(s,e){return!s||!e?!1:s.toLocaleLowerCase()===e.toLocaleLowerCase()}async function z(s,e,t,i){if(!t)return!1;let r=["feature","oriented-imagery"].includes(e.type),a=i?.item??e.portalItem,n=e.sourceJSON;if(!r||!a||!a.portal.user||!re(a)||ie(a)||ae(a)||ne(n)||a.portal.isPortal&&se(a)||["oid","global-id","geometry"].includes(t.type)||await pe(e,t.name,i))return!1;let c=e.sourceJSON.geometryProperties,p=c?.shapeLengthFieldName,o=c?.shapeAreaFieldName;if(d(p,t.name)||d(o,t.name))return!1;let l=e.editFieldsInfo;if(l&&(d(l.creationDateField,t.name)||d(l.creatorField,t.name)||d(l.editDateField,t.name)||d(l.editorField,t.name))||d(e.objectIdField,t.name)||d(e.displayField,t.name)||d(e.typeIdField,t.name)||d(e.subtypeField,t.name)||e.timeInfo&&(d(e.timeInfo.startField,t.name)||d(e.timeInfo.endField,t.name)||d(e.timeInfo.trackIdField,t.name)))return!1;if(!i?.ignoreLayerRenderer&&e.featureReduction){let u=new Set;if(await I.collectFeatureReductionFields(u,e,e.featureReduction),Array.from(u).some(b=>d(b,t.name)))return!1}if(!i?.ignoreLayerRenderer&&(await I.getRendererFields(e.renderer,e.fieldsIndex)).some(u=>d(u,t.name)))return!1;if(!i?.ignoreLayerLabelingInfo){let u=e.labelingInfo?.map(b=>b.labelExpressionInfo?.expression);if(u&&((await I.getExpressionFields(e,u)).some(b=>d(b,t.name))||await U(e,t,"layer")))return!1}if(!i?.ignoreLayerDefinitionExpression&&e.definitionExpression&&(await $.parseWhereClause(e.definitionExpression,e.fieldsIndex)).fieldNames.some(u=>d(u,t.name))||await ue(e,t,i)||await me(e,t))return!1;if(await he(e,t))return await Promise.resolve(!1);if(await ye(e,t))return await Promise.resolve(!1);if(fe(s,e,t)||e.relationships?.map(u=>u.keyField)?.some(u=>d(u,t.name)))return!1;let f=ee(a,a.portal.user),v=i?.userItemInfo?.userGroups??await oe(e)??[],h=i?.userItemInfo?.itemGroups??await le(e)??[],w=ce(v,h);if(!f&&!w)return!1;let g=i?.userItemInfo?.relatedItems??await de(a.id,a.portal,{relationshipType:"Service2Service"});return!(g?.data?.relatedItems&&g.data.relatedItems.some(u=>["WMTS","Map Service","Vector Tile Service"].includes(u.type)))}async function pe(s,e,t){let i=`${s.url}/${s.layerId}/fieldGroups`,r=t?.userItemInfo?.fieldGroups??(await T(i,{query:{f:"json"},responseType:"json"}))?.data?.fieldGroups;return r?r.some(a=>a.fields.some(n=>d(n,e))):!1}function fe(s,e,t){if(!s)return!1;let i=s.map?.applicationProperties?.viewing?.search;if(i){let r=i.layers?.find(a=>a.id===e.id);if(r){let a=r?.field?.name;if(a)return d(a,t.name)}}return!1}async function U(s,e,t){let i=t==="layer"?s.labelingInfo?.filter(n=>N(n.where)):s.sourceJSON?.drawingInfo?.labelingInfo?.filter(n=>N(n.where));if(!i?.length)return!1;let r=[...await Promise.all(i.map(async n=>await $.parseWhereClause(n.where,s.fieldsIndex)))],a=!1;for(let n=0;n<r.length;n++){let c=r[n].fieldNames?.some(p=>d(p,e.name));if(!a&&c){a=!0;break}}return await Promise.resolve(a)}async function ue(s,e,t){let i=s.portalItem;if(!i)return!1;let r=`${F(i.portal)}content/items/${i.id}/data`,a=(t?.userItemInfo?.itemData??await T(r,{query:{f:"json"},responseType:"json"}))?.data;if(!a)return!1;if(a?.layers){let n=a.layers.find(l=>l.id===s.layerId),c=n?.layerDefinition?.drawingInfo?.renderer,p=n?.layerDefinition?.featureReduction,o=n?.layerDefinition?.definitionExpression;if(!c&&!p&&!o)return!1;if(!t?.ignoreItemRenderer&&c){let l=k.fromJSON(c);if((await I.getRendererFields(l,s.fieldsIndex)).some(f=>d(f,e.name)))return!0}if(!t?.ignoreItemFeatureReduction&&p&&await K(s,e,p)||o&&(await $.parseWhereClause(o,s.fieldsIndex)).fieldNames.some(l=>d(l,e.name)))return!0}return!1}async function me(s,e){let t=s.sourceJSON,i=t?.drawingInfo?.renderer,r=t?.featureReduction;if(!i&&!r)return!1;if(i){let a=k.fromJSON(i);if((await I.getRendererFields(a,s.fieldsIndex)).some(n=>d(n,e.name)))return!0}return!!(r&&await K(s,e,r))}async function he(s,e){let t=s.sourceJSON?.drawingInfo?.labelingInfo;if(!t)return await Promise.resolve(!1);let i=t?.map(r=>r.labelExpressionInfo?.expression);if(i){if((await I.getExpressionFields(s,i)).some(r=>d(r,e.name)))return await Promise.resolve(!0);if(await U(s,e,"service"))return await Promise.resolve(!0)}return await Promise.resolve(!1)}async function ye(s,e){let t=s.sourceJSON?.definitionQuery;return t?(await $.parseWhereClause(t,s.fieldsIndex)).fieldNames.some(i=>d(i,e.name))?await Promise.resolve(!0):await Promise.resolve(!1):await Promise.resolve(!1)}async function K(s,e,t){let i=t.type==="binning"?Y.fromJSON(t):Q.fromJSON(t),r=new Set;return await I.collectFeatureReductionFields(r,s,i),!!Array.from(r).some(a=>d(a,e.name))}var m=new Map;m.set("oid","key");m.set("guid","key");m.set("global-id","key");m.set("blob","binary");m.set("integer","integer");m.set("small-integer","integer");m.set("big-integer","integer");m.set("single","number");m.set("double","number");m.set("long","number");m.set("number","number");m.set("date","date-time");m.set("date-only","calendar");m.set("time-only","clock");m.set("timestamp-offset","time-zone");m.set("string","string");var Ie=({fieldType:s})=>y`<calcite-icon scale=s .icon=${m.get(s)}></calcite-icon>`,ve=M`.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}`,C=class extends j{constructor(){super(...arguments),this.arcadeExpMap=new Map,this.cancelNode=D(),this.dialogNode=D(),this.layerFields=[],this.layerFieldsMap=new Map,this.messages=B({blocking:!0}),this._propWatcherTask=new J(this,{task:async([e,t])=>{if(!(N(e)&&N(t)))throw console.error("Required properties are missing."),new Error;this._propWatcherTask.autoRun=!1,await this.processProps()},args:()=>[this.layer,this.fieldNames]}),this.deleteInProgress=!1,this.fieldsAreDeletable=!1,this.arcgisFieldsDeleted=P(),this.arcgisBeforeModalClose=P(),this.arcgisClose=P()}static{this.properties={currentLayerInfo:16,deleteInProgress:16,fieldsAreDeletable:16,config:0,fieldNames:0,layer:0,mapView:0,options:0}}static{this.styles=ve}async processProps(){let{layer:e,mapView:t,fieldNames:i}=this;if(!e||!i){this.fieldsAreDeletable=!1;return}e.loaded||await e.load(),this.layerFields=e.fields.filter(a=>i.includes(a.name));let r=i.some(a=>!e.fields.find(n=>n.name===a));if(!this.layerFields?.length||r)this.fieldsAreDeletable=!1;else{let a=await Promise.all(this.layerFields.map(async n=>await z(t,e,n,this.options)));if(this.fieldsAreDeletable=a.every(n=>n),!this.fieldsAreDeletable)return}if(this.layerFieldsMap=await V(e),this.options?.ignorePopupTemplate||(this.arcadeExpMap=G(e.popupTemplate)),this.portal=e.portalItem?.portal??this.options?.portal,this.item=e.portalItem??this.options?.item,!this.item){this.fieldsAreDeletable=!1;return}await be.getCredential(this.item.url.replace("rest/services","rest/admin/services"))}getFieldLabel(e){let{layer:t,arcadeExpMap:i}=this;if(this.options?.ignorePopupTemplate)return this.getFieldDisplayNameFromLayerFields(e);{let r=(t.popupTemplate??t.createPopupTemplate()).fieldInfos?.find(a=>a.fieldName===e);return r?q(r,i):this.getFieldDisplayNameFromLayerFields(e)}}getFieldDisplayNameFromLayerFields(e){let t=this.layerFieldsMap.get(e);return t.alias??t.name}async deleteFields(){let{layer:e,fieldNames:t}=this,i=`${e.url.replace("/rest/services","/rest/admin/services")}/${e.layerId}/deleteFromDefinition`,r={fields:t.map(n=>({name:n}))},a={deleteFromDefinition:JSON.stringify(r)};await E(i,{query:{...a,f:"json",async:!1},method:"post",responseType:"json"}).then(async n=>{if(n.data?.success){let c=`${e.url}/${e.layerId}`;t.forEach(o=>{e.type==="feature"&&e.floorInfo?.floorField===o&&(e.floorInfo=null)});let p=await E(c,{query:{f:"json"},responseType:"json"});if(p){let o=p.data;this.currentLayerInfo=p.data,o&&(this.updateTypesAndTemplatesOnLayer(),t.forEach(l=>{o.templates?.length?o.templates.forEach(f=>delete f.prototype.attributes[l]):o.types?.forEach(f=>{f.templates.forEach(v=>delete v.prototype.attributes[l])})}),this.updateFeatureService(o))}else this.handleError()}},()=>this.handleError())}updateTypesAndTemplatesOnLayer(){let{currentLayerInfo:e}=this,t=e;if(t.templates?.length){let i=this.updateTemplatesList(t.templates);t.templates=i}else if(t.types){let i=t.types;t.types=[],i.forEach(r=>{r.templates=this.updateTemplatesList(r.templates),this.addType(t,r)})}}updateTemplatesList(e){let{currentLayerInfo:t,messages:i}=this,r=[];return(e??[]).forEach(a=>{let n=new ge;n.description=a.description??"",n.name=a.name||i.newFeature,n.drawingTool=a.drawingTool||"point";let c={};t.fields.forEach(o=>{let l=!1;for(let f=0;f<a.prototype.attributes.length;f++)if(a.prototype.attributes[f]===o.name){l=!0,c[o.name]=a.prototype.attributes[o.name];break}!l&&o.editable&&(c[o.name]=o.defaultValue||null)});let p=new we({attributes:c});n.prototype=p,r.push(n)}),r}addType(e,t){e.types?e.types.some(i=>i.id===t.id)||e.types.push(t):e.types=[t]}async updateFeatureService(e){let{layer:t,fieldNames:i}=this,r={templates:e.templates,types:e.types},a=`${t.url.replace("/rest/services","/rest/admin/services")}/${t.layerId}/updateDefinition`,n={f:"json",updateDefinition:JSON.stringify(r)};await E(a,{query:{...n,f:"json"},method:"post",responseType:"json"}).then(async c=>{if(c.data?.success){let p=`${F(this.portal)}content/items/${this.item.id}/data`;if(this.options?.ignorePopupTemplate||i.forEach(o=>{t.popupTemplate?.fieldInfos&&(t.popupTemplate.fieldInfos=t.popupTemplate.fieldInfos.filter(l=>l.fieldName!==o)),t.popupTemplate?.content?.forEach((l,f)=>{l.type==="fields"&&l.fieldInfos&&((t.popupTemplate?.content)[f].fieldInfos=(t.popupTemplate?.content)[f].fieldInfos?.filter(v=>v.fieldName!==o))})}),t.attributeTableTemplate){let o=t.attributeTableTemplate.clone();o.elements=o.elements.filter(l=>!(l.type==="field"&&i.includes(l.fieldName))),o.orderByFields=o.orderByFields.filter(l=>!i.includes(l.field)),t.attributeTableTemplate=o}await E(p,{query:{f:"json"},responseType:"json"}).then(async o=>{let l=o.data;if(l?.layers||l?.tables){let f=t.isTable,v=f?l.tables:l.layers,h=v?.find(w=>w.id===t.layerId);if(i.forEach(w=>{h?.attributeTableInfo?.attributeTableElements&&(h.attributeTableInfo.attributeTableElements=h.attributeTableInfo.attributeTableElements.filter(g=>!(g.type==="field"&&g.fieldName===w)),h.attributeTableInfo.orderByFields=h.attributeTableInfo.orderByFields.filter(g=>g.field!==w))}),h?.fieldConfiguration&&(h.fieldConfiguration=h.fieldConfiguration.filter(w=>!i.includes(w.name))),h?.popupInfo){i.forEach(b=>{h.popupInfo.fieldInfos=h.popupInfo.fieldInfos.filter(x=>x.fieldName!==b),h.popupInfo.popupElements?.forEach((x,O)=>{x.type==="fields"&&x.fieldInfos&&(h.popupInfo.popupElements[O].fieldInfos=h.popupInfo.popupElements[O].fieldInfos.filter(H=>H.fieldName!==b))})});let w=`${F(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`,g={};f?(g.tables=v,l.layers&&(g.layers=l.layers)):(g.layers=v,l.tables&&(g.tables=l.tables));let u={f:"json",text:JSON.stringify(g)};await E(w,{query:{...u},method:"post",responseType:"json"}).then(b=>{b.data?.success?this.handleSuccess():this.handleError()},()=>this.handleError())}else this.handleSuccess()}else o.httpStatus===200&&(!o.data||JSON.stringify(o.data)==="{}")?this.handleSuccess():this.handleError()},()=>this.handleError())}},()=>this.handleError())}handleSuccess(){this.arcgisFieldsDeleted.emit(),this.dialogNode?.value&&(this.dialogNode.value.open=!1),this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("success"):this.displaySuccessAlert()}handleError(e){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()}displaySuccessAlert(){let{messages:e,fieldNames:t}=this;this.successAlertNode&&(this.successAlertNode.parentElement?.removeChild(this.successAlertNode),this.successAlertNode=void 0),this.successAlertNode=S(y`<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)}displayErrorAlert(){let{messages:e}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=S(y`<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)}displayReadOnlyErrorAlert(){let{messages:e,portal:t}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=S(y`<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&&y`<calcite-link slot=link target=_blank href=https://status.arcgis.com>${e.healthDashboard}</calcite-link>`||""}</calcite-alert>`),document.body.append(this.errorAlertNode)}render(){let{messages:e,fieldsAreDeletable:t,fieldNames:i,deleteInProgress:r}=this;return this._propWatcherTask.render({complete:()=>(t||(i?.length?i?.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.")),y`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${()=>this.arcgisClose.emit()} .heading=${i?.length===1?e.deleteField:e.deleteFields} ${A(this.dialogNode)}>${t?y`<div class=${`dialog-content-wrapper ${r?"hide-overflow":""}`}>${this.renderDeleteLoader()}<calcite-label>${i.length===1?e.deletePrompt:e.deleteMultiplePrompt}</calcite-label>${this.renderFieldsPreview()}</div>${this.renderCancelButton()}${this.renderDeleteButton()}`:this.renderError()}</calcite-dialog>`)})}renderError(){let{messages:e}=this;return y`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`}renderDeleteLoader(){let{messages:e,fieldNames:t,deleteInProgress:i}=this;return y`<div class=${`loader-container ${i?"active":""}`}><calcite-loader class="loader" .label=${t.length===1?e.deletingField:e.deletingFields} .hidden=${!i}></calcite-loader><div class="loader-text">${t.length===1?e.deletingField:e.deletingFields}</div></div>`}renderFieldsPreview(){let{fieldNames:e,layerFields:t,layerFieldsMap:i,arcadeExpMap:r,messages:a}=this;return y`<calcite-list .label=${a.fields}>${e.map(n=>{let c=t.find(p=>p.name===n);return y`<calcite-list-item .label=${this.getFieldLabel(n)} .description=${`{${n}}`} .value=${n} .disabled=${!c.editable}><div slot=actions-end class="field-icons">${Ie({fieldType:W(n,i,r)})}</div></calcite-list-item>`})}</calcite-list>`}renderCancelButton(){let{messages:e}=this;return y`<calcite-button @click=${()=>this.dialogNode.value.open=!1} slot=footer-end appearance=outline ${A(this.cancelNode)}>${e.cancel}</calcite-button>`}renderDeleteButton(){let{messages:e,fieldNames:t}=this;return y`<calcite-button kind=danger slot=footer-end @click=${async i=>{let{portal:r}=this;i.currentTarget.disabled=!0,this.cancelNode.value.disabled=!0,this.dialogNode.value.closeDisabled=!0,r.sourceJSON?.isReadOnly?this.handleError(!0):(this.deleteInProgress=!0,await this.deleteFields())}}>${t.length===1?e.deleteField:e.deleteFieldsWithNumber.replace("${number}",`${t.length}`)}</calcite-button>`}};R("arcgis-portal-field-delete",C);return C},"layers/support/FeatureTemplate","Graphic","identity/IdentityManager","request","layers/support/fieldUtils","layers/support/FeatureReductionBinning","layers/support/FeatureReductionCluster","renderers/support/jsonUtils","request","core/sql")
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import{i as o}from"./YXRYHZH5.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise((t,s)=>{this.o=t,this.h=s}):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask(()=>this._.requestUpdate()):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every((s,r)=>!o(s,t[r]));export{c as a,e as b};
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import{a as m}from"./TBZVZ3NK.js";import{d as h}from"./UYHDCO7W.js";import{D as b,F as a,I as d,h as c,j as i,p as u}from"./YXRYHZH5.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function l(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0}}static{this.styles=g}willUpdate(e){e.has("renderingInfo")&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.attribute.isRequired&&!this.value)return this.messages.requiredfield??"This is a required field."}renderCheckbox(){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}renderDateInput(){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}renderTextInput(){if(!l(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;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=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.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>`}renderSingleSelect(){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.attribute.description??this.messages.selectanoption} .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}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo.valueExpressionResult))return;let e=this.value;return m(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>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo.valueExpressionResult))return;let e=this.value;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>`)}renderMultiSelect(){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=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .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}_renderGroupedComboboxOptions(){if(!this.renderingInfo.valueExpressionResult||Array.isArray(this.renderingInfo.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} text-label=${t??a} .value=${t}>${r.map(s=>i`<calcite-combobox-item .selected=${e?.includes(s.value)} text-label=${s.label??a} .value=${s.value} data-testid=${`grouped-combobox-item-${s.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){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=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .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}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import b from"./UAMIU7I6.js";import a from"./YKLWML27.js";import"./M5TSWZEI.js";import{d}from"./UYHDCO7W.js";import{D as r,E as n,I as c,h as e,j as s}from"./YXRYHZH5.js";export default $arcgis.t(([,{a:l,b:f}])=>{var h=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-ui-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,o=class extends r{constructor(){super(...arguments),this.classificationModel=l(this),this.messages=d(),this._classificationDataTask=f(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=h}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(console.error).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(console.error)}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${n(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};c("arcgis-portal-classification-banner",o);return o},a,b)
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import b from"./36SCONH7.js";import a from"./YKLWML27.js";import{a as o}from"./TBZVZ3NK.js";import{d as h}from"./UYHDCO7W.js";import{D as n,I as r,h as c,j as e}from"./YXRYHZH5.js";export default $arcgis.t(([{c:f,d:d},{f:v}])=>{var C=c`.select-favorite-label{display:flex;justify-content:space-between;align-items:center}.favorite-actions{display:flex;justify-content:flex-end;gap:1.5rem;align-items:center}.classification-favorite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: "var(--calcite-color-foreground-2)"}.save-new-favorite-button{display:flex;justify-content:flex-end;margin-top:.25rem;margin-bottom:1rem}.classification-favorite-item{display:flex;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem;border-bottom:1px solid var(--calcite-color-border-1)}.classification-favorite-list,.classification-favorite-input-section{margin:1.75rem 1rem}`,l=class extends n{constructor(){super(...arguments),this.messages=h(),this.selectFavoriteClassification=i=>{let a=i.target.value;if(a){this.hasUpdateError=!1;let t=this.favoriteClassifications.find(({name:s})=>s===a);t&&this.updateClassificationData(t)}},this.uploadFavoriteClassificationValueHandle=async i=>{let a=await d(this.portalItem,this.favoriteClassifications);if(this.renderFavoriteClassificationError({alertIndicatorType:"success",alertIndicatorIcon:"check",alertIndicatorInfo:i}),a){let{result:t,error:s}=a;if(s){console.error(s),this.renderFavoriteClassificationError({alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:this.messages.uploadClassificationFavoriteError??"Failed to upload classification favorites"});return}t&&this.renderFavoriteClassificationError({alertIndicatorType:"success",alertIndicatorIcon:"check",alertIndicatorInfo:i})}},this.retrieveFavoriteClassificationHandle=async()=>{let i=await f(this.portalItem);if(i){let{result:a,error:t}=i;if(t){console.error(t),this.renderFavoriteClassificationError({alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:this.messages.retrieveClassificationFavoriteError??"Failed to retrieve classification favorites"});return}a&&this.resetFavoriteClassification(a.favorites)}},this.changeFavoriteClassificationName=i=>{let a=i.target.value;this.newFavoriteClassificationName=a,this.hasDuplicatedClassificationError=this.favoriteClassifications.some(t=>t.name===a)},this.saveNewFavoriteClassification=async()=>{let i=this.newFavoriteClassificationName;if(this.favoriteClassifications.some(s=>s.name===i)){this.hasDuplicatedClassificationError=!0;return}if(!i)return;let a=this.deleteNonEnabledAttributes(),t={name:i,classification:a};this.favoriteClassifications=[...this.favoriteClassifications,t],await this.uploadFavoriteClassificationValueHandle(this.messages.addClassificationFavoriteSuccessMessage??"Classification Favorite added successfully"),await this.retrieveFavoriteClassificationHandle(),this.showSaveClassificationDialog=!1},this.updateFavoriteClassification=async()=>{if(!this.selectedFavoriteClassificationName){this.hasUpdateError=!0;return}await this.addFavoriteClassification(this.selectedFavoriteClassificationName),await this.retrieveFavoriteClassificationHandle()},this.deleteNonEnabledAttributes=()=>{let i=structuredClone(this.portalItem?.classification??{}),a=Object.fromEntries(Object.entries(i).filter(([t])=>this.attributeExpressionResults?.get(t)?.enabled!==!1));return{...a,...v(this.portalItem,a)}},this.addFavoriteClassification=async i=>{let a=this.deleteNonEnabledAttributes(),t={name:i,classification:a},s=this.favoriteClassifications.findIndex(m=>m.name===i);s>=0?this.favoriteClassifications[s].classification=a:this.favoriteClassifications=[...this.favoriteClassifications,t],await this.uploadFavoriteClassificationValueHandle(this.messages.updateClassificationFavoriteSuccessMessage??"Classification Favorite updated successfully")},this.removeFavoriteClassification=async i=>{this.favoriteClassifications=this.favoriteClassifications.filter(a=>a.name!==i),this.favoriteClassifications.length===0&&(this.showManageClassificationDialog=!1),await this.uploadFavoriteClassificationValueHandle(this.messages.removeClassificationFavoriteSuccessMessage??"Classification Favorite removed successfully"),await this.retrieveFavoriteClassificationHandle()},this.newFavoriteClassificationName="",this.showManageClassificationDialog=!1,this.showSaveClassificationDialog=!1,this.hasDuplicatedClassificationError=!1,this.hasUpdateError=!1,this.alertIndicator={alertIndicatorType:"danger",alertIndicatorIcon:"exclamation-mark-triangle",alertIndicatorInfo:""},this.isNotificationModalActive=!1,this.favoriteClassifications=[],this.selectedFavoriteClassificationName="",this.resetFavoriteClassification=()=>{},this.updateClassificationData=()=>{},this.renderFavoriteClassificationError=i=>{let{alertIndicatorType:a,alertIndicatorIcon:t,alertIndicatorInfo:s}=i;return e`<calcite-alert .icon=${t} .label=${this.messages.classificationNotificationHandler??"Classification notification handler"} auto-close-duration=medium open .kind=${a} @calciteAlertClose=${()=>this.alertIndicator===null}><div slot=message>${s}</div></calcite-alert>`}}static{this.properties={newFavoriteClassificationName:16,showManageClassificationDialog:16,showSaveClassificationDialog:16,hasDuplicatedClassificationError:16,hasUpdateError:16,alertIndicator:16,isNotificationModalActive:16,portalItem:0,classificationValue:0,favoriteClassifications:0,selectedFavoriteClassificationName:1,attributeExpressionResults:0,resetFavoriteClassification:0,updateClassificationData:0}}static{this.styles=C}load(){this.newFavoriteClassificationName=this.classificationValue?.banner??""}onOpenFavoriteClassificationModal(){this.newFavoriteClassificationName=this.classificationValue?.banner??"",this.showSaveClassificationDialog=!0}getValidationMessage(){return this.newFavoriteClassificationName?this.hasDuplicatedClassificationError?this.messages.duplicatedClassificationError:"":this.messages.emptyFavoriteError}render(){return e`<div>${this.favoriteClassifications.length>0?e`<div><calcite-label><div class="select-favorite-label">${this.messages.applyClassificationFavoriteLabel}<calcite-link @click=${()=>this.showManageClassificationDialog=!0}>${this.messages.manageClassificationFavoriteBtn}</calcite-link></div><calcite-combobox label=select-calcite-combobox selection-mode=single .placeholder=${this.messages.selectFavoritePlaceholder} placeholder-icon=folder-star @calciteComboboxChange=${this.selectFavoriteClassification} .status=${this.hasUpdateError?"invalid":"idle"} .validationIcon=${this.hasUpdateError?"exclamation-mark-triangle":""} .validationMessage=${this.hasUpdateError?this.messages.updateWarning:""}>${o(this.favoriteClassifications,({name:i})=>i,({name:i})=>e`<calcite-combobox-item .selected=${this.selectedFavoriteClassificationName===i} icon=folder-star .value=${i} .textLabel=${i}></calcite-combobox-item>`)}</calcite-combobox></calcite-label><div class="favorite-actions"><calcite-link icon-start=refresh @click=${this.updateFavoriteClassification}>${this.messages.updateClassificationFavoriteBtn}</calcite-link><calcite-link icon-start=star @click=${this.onOpenFavoriteClassificationModal}>${this.messages.saveNewClassificationBtn}</calcite-link></div></div>`:e`<div class="save-new-favorite-button"><calcite-link icon-start=folder-star @click=${this.onOpenFavoriteClassificationModal}>${this.messages.saveNewClassificationFavoriteBtn}</calcite-link></div>`}<calcite-dialog class="classification-favorite-dialog" overlay-positioning=fixed .heading=${this.messages.manageClassificationFavoriteLabel} .open=${this.showManageClassificationDialog} modal placement=center scale=m outside-close-disabled @calciteDialogClose=${()=>this.showManageClassificationDialog=!1}><calcite-list class="classification-favorite-list" .label=${this.messages.classificationFavoriteListLabel??"Classification Favorite list label"} selection-appearance=border selection-mode=single-persist>${o(this.favoriteClassifications,({name:i})=>i,({name:i})=>e`<calcite-list-item .label=${i} .value=${i} class="classification-favorite-item"><div slot=content-end><calcite-icon icon=trash scale=s @click=${async()=>await this.removeFavoriteClassification(i)}></calcite-icon></div></calcite-list-item>`)}</calcite-list><calcite-button slot=footer-end scale=l @click=${()=>this.showManageClassificationDialog=!1}><div>${this.messages.favoriteClassificationBtnDone}</div></calcite-button></calcite-dialog><calcite-dialog class="classification-favorite-dialog" overlay-positioning=fixed .heading=${this.messages.addFavoriteDialogHeading} .open=${this.showSaveClassificationDialog} modal placement=center scale=m outside-close-disabled @calciteDialogClose=${()=>this.showSaveClassificationDialog=!1}><calcite-label class="classification-favorite-input-section">${this.messages.addClassificationFavorite}<calcite-input id=classification-favorite-name name=classification-favorite-name scale=m .value=${this.newFavoriteClassificationName} @calciteInputInput=${this.changeFavoriteClassificationName} .status=${!this.newFavoriteClassificationName||this.hasDuplicatedClassificationError?"invalid":"idle"} validation-icon=exclamation-mark-triangle .validationMessage=${this.getValidationMessage()}></calcite-input></calcite-label><calcite-button scale=l slot=footer-end @click=${this.saveNewFavoriteClassification}>${this.messages.favoriteClassificationBtnDone}</calcite-button></calcite-dialog></div>`}};r("arcgis-portal-classification-favorite",l);return l},a,b)
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import{A as y,k as P,t as k,u as w,v as V,w as m,x as h,y as A,z as D}from"./YXRYHZH5.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import a from"./YKLWML27.js";import{b as P}from"./M5TSWZEI.js";import{a as b}from"./UYHDCO7W.js";import{l as v,m as g,n as C,r as w}from"./YXRYHZH5.js";export default $arcgis.t(([j,{property:p,subclass:I},{on:G,watch:M},{createObservable:D,trackAccess:O},{property:X,subclass:z},ot,{a:E,b:x}])=>{var A=(t,o)=>i=>U(i,t),u=class extends w{constructor(o,i){super(o),this.Y=new Map,this.A=void 0,this.#e=D();let e=this;e.#t=i,e.Z(),e.setProvisionalExports(S(o,new WeakRef(e),o.M.length-1,e.instance,e.Y),!1),g(o,r=>{if(r){let n=M(()=>o[r],s=>{if(s===e.instance)return;let c=e.instance;e.exports=s,e.instance=s,e.Y.forEach((d,m)=>o.requestUpdate(d,c[m])),e.#o&&c.destroy(),e.#o=!1},{sync:!0});e.onDestroy(n.remove)}},e.exports)}#o;#e;#t;get exports(){return O(this.#e),super.exports}set exports(o){super.exports=o,this.#e.notify()}Z(){let o=this;o.instance="prototype"in o.#t&&"declaredClass"in o.#t.prototype?new o.#t:o.#t(),o.#o=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#o&&this.instance.destroy?.()}},U=b(u),S=(t,o,i,e,r)=>new Proxy(e,{get:(n,s)=>{let c=n[s];if(typeof s=="symbol"||r.has(s))return c;let d=t.M[i];return d.A=s,C(t,m=>{if(d.A=void 0,m!==void 0){let f=m.key;r.set(s,f);let h=t.constructor.getPropertyOptions(f),y=s!==f&&f.toLowerCase().includes("disable");$(o,h,s,f,y),h.i===void 0&&N(h,i,s,y)}},c)}}),$=(t,o,i,e,r,n)=>n=M(()=>{let s=t.deref();return s===void 0||s.component.manager.destroyed?n=n.remove():s.exports[i]},(s,c)=>{if(!n)return;t.deref().component?.requestUpdate(e,r?!c:c),o.c=!1},{sync:!0}),N=(t,o,i,e)=>{t.d.get=function(){let r=this.M[o]?.exports[i];return e?!r:r},t.d.set=function(r){let n=this.M[o];n.A!==i&&(n.exports[i]=e?!r:r)}};var L=Object.defineProperty,V=Object.getOwnPropertyDescriptor,l=(t,o,i,e)=>{for(var r=e>1?void 0:e?V(o,i):o,n=t.length-1,s;n>=0;n--)(s=t[n])&&(r=(e?s(o,i,r):s(r))||r);return e&&r&&L(o,i,r),r},a=class extends j{constructor(){super(...arguments),this.fetching=!1,this.status="idle",this.error=void 0,this.portalUrl=void 0,this._itemClassificationValidationErrors=new Map,this.fetchingPromise=new v}get primaryAttribute(){return this.portalClassificationSchema?.classificationMetadata.primaryAttribute}setPortalClassificationData({portalUrl:t,schema:o}){this.portalUrl=t,this.portalClassificationSchema=o,this.status="loaded",this.fetchingPromise.resolve(!0)}setFetching(t){this.fetching=t}async loadPortalClassificationData(t,{signal:o}){this.status="loading";let{result:i,error:e}=await E(t,o);if(e){e.name==="AbortError"?console.log("Request aborted."):(this.error=e,this.status="error",this.fetchingPromise.reject(e));return}else this.setPortalClassificationData({schema:i,portalUrl:t})}async validateClassification(t,o,i,e){if(!o)return"";let r=t?this._itemClassificationValidationErrors.get(t):void 0;if(r)return await r;let n=(async()=>{let{error:s}=await x(i,o,e??{});return s?s?.details.raw.messages.join(", "):""})();return t&&this._itemClassificationValidationErrors.set(t,n),t?await this._itemClassificationValidationErrors.get(t):await n}};l([p()],a.prototype,"portalClassificationSchema",2);l([p()],a.prototype,"fetching",2);l([p()],a.prototype,"status",2);l([p()],a.prototype,"error",2);l([p()],a.prototype,"portalUrl",2);l([p()],a.prototype,"_itemClassificationValidationErrors",2);a=l([I("custom.ClassificationModel")],a);var k;function _(t){return k??=new a(t),k}var lt=A(_),pt=t=>new P(t,{task:async([o],{signal:i})=>{if(!o)throw new Error("Portal item is required to load classification data");if(o.loaded||await o.load({signal:i}),t.itemClassification=o.classification,t.classificationModel.status==="loading"&&await t.classificationModel.fetchingPromise.promise,!t.portalItem?.portal.hasClassificationSchema){t.classificationModel.setPortalClassificationData({portalUrl:o.portal.restUrl,schema:void 0});return}(t.classificationModel.status==="idle"||t.classificationModel.status==="loaded"&&t.classificationModel.portalUrl!==o.portal.restUrl)&&await t.classificationModel.loadPortalClassificationData(o.portal.restUrl,{signal:i})},args:()=>[t.portalItem]});return{a:lt,b:pt}},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor",a)
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import{J as T,a as L,b as P,c as w,d as f,e as m,f as N,g,n as v,o as O,q as A}from"./YXRYHZH5.js";var V=(e,n)=>{let t=e;for(;t;){if(t===n)return!0;if(!t.parentNode)return!1;t.parentNode instanceof ShadowRoot?t=t.parentNode.host:t=t.parentNode}return!1},k=(e,n,t)=>{let o=z(n).subscribe;return o(s=>{s.some(i=>V(e,i.target))&&t()})},b={},z=e=>{let n=e.join(","),t=b[n];if(t!==void 0)return t;let o=new Set,s=new MutationObserver(i=>o.forEach(a=>a(i)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});let r={subscribe:i=>(o.add(i),()=>{o.delete(i),o.size===0&&(s.disconnect(),b[n]=void 0)})};return b[n]=r,r},R=(e,n)=>{let t=e;for(;t;){let o=t.closest?.(n);if(o)return o;let s=t.getRootNode?.();if(s===globalThis.document)return;t=s.host}};var M=(e,n,t)=>R(e,`[${n}]`)?.getAttribute(n)??t;var _=e=>(...n)=>{let t=m(),o=new e(...n),s=o.exports;f(t.at(-1));let r=o.component.manager;r.W(o,s),o.watchExports(r.W.bind(r,o)),N(o);let i=[o.component,...t].reverse();return v(i,a=>a===void 0?void 0:U(o,a,s),s)},U=(e,{host:n,key:t,isReactive:o},s)=>{let r=n,i=r[t]!==e.exports,a=r[t]!==s,c=s!==e.exports;if(i&&!a&&c&&(r[t]=e.exports),n===e.component){if(o){let l=e.component.manager;a&&l.W(e,r[t]),e.onUpdate(d=>{if(d.has(t)){let x=r[t];x!==e.exports&&l.W(e,x)}})}e.O=o?void 0:t}let u=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{r[t]!==e.exports&&(u?g(()=>{r[t]=e.exports}):r[t]=e.exports)})};var G="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),W=new Set(G),h="en",H={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},K=async(e,n,t="")=>{let o=`${n}/${t}`,s=`${o}${e}.json`;return E[s]??(E[s]=$(e,o)),await E[s]},E={},$=async(e,n)=>{let t=`${n}${e}.json`;try{let o=await fetch(t);if(o.ok)return await o.json()}catch(o){return console.error(o),{}}return e===h?{}:await $(h,n)},y=e=>{let n=M(e,"lang",globalThis.navigator?.language||h);return{lang:n,t9nLocale:S(n)}},S=e=>{let[n,t]=e.split("-"),o=n.toLowerCase(),s=o;return t&&(s=`${o}-${t.toUpperCase()}`),s=H[s]??s,W.has(s)?s:t?S(o):h},j=(e,n,t,o)=>{let s,r=()=>I(e,n(),o).then(i=>{(s?.lang!==i.lang||s.t9nLocale!==i.t9nLocale||s.t9nStrings!==i.t9nStrings)&&t(i),s=i}).catch(console.error);return queueMicrotask(r),k(e,["lang"],r)},I=async(e,n,t=e.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:s}=y(e),r=`${n}/${t}/t9n`,a=t===null?{}:await K(s,r,"messages.");return{lang:o,t9nLocale:s,t9nStrings:a}};var q=e=>B(void 0,e);var C=class extends A{constructor(n,t){super(n);let o=this.exports;try{P(this.component);let s=t(this.component,this),r=this.exports!==o;if(L(s)){r||this.setProvisionalExports(s);let i=s.then(a=>{this.exports=a,super.catchUpLifecycle()}).catch(a=>{this.P.reject(a),console.error(a)});this.onLoad(async()=>await i)}else(!r||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this.P.reject(s),console.error(s)}}catchUpLifecycle(){}},B=_(C);var F=e=>(n={})=>q((t,o)=>{let s=y(t.el),r={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},i=t;o.onLifecycle(()=>j(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:p,lang:u})=>{let l={...p,_lang:u,_t9nLocale:c,_loading:!1};o.exports=l;let d=p.componentLabel;typeof d=="string"&&"label"in t&&t.label==null&&(t.label??=d),a(i.messageOverrides)},n.name));let a=c=>{let p=o.exports,u=p._original??p,l=D(u,c);c&&(l._original=u),o.exports=l};return"messageOverrides"in i&&o.onUpdate(c=>{c.has("messageOverrides")&&a(i.messageOverrides)}),n.blocking?(o.setProvisionalExports(r,!1),o.ready):r}),D=(e,n)=>{if(!n)return e;let t={...e};return Object.entries(n).forEach(([o,s])=>{typeof s=="object"?t[o]=D(e[o],s):t[o]=s??e[o]}),t},Et=e=>X,J="arcgisPropertyChange",X=(...e)=>{let n=w(),t=O(J,void 0,n),o=!0;return n.manager.onUpdated(s=>{if(o||!n.el.isConnected){o=!1;return}for(let r of e)s.has(r)&&t.emit({name:r})}),t};var Lt=F(T);export{_ as a,R as b,Et as c,Lt as d};
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.1 */
4
- import d from"./UAMIU7I6.js";import c from"./36SCONH7.js";import a from"./YKLWML27.js";import{a as E,b as I}from"./M5TSWZEI.js";import{b as x,c as P,d as $}from"./UYHDCO7W.js";import{B as u,C as g,D as b,F as C,I as v,h as p,j as n}from"./YXRYHZH5.js";export default $arcgis.t(([{createArcadeExecutor:F},{watch:k},{c:y},{a:m,b:c,c:d,d:O,e:_,f:V},{a:S,b:w}])=>{async function T({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await j(e,r,t);return{[e]:{enabled:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function j(r,t,i){let a=t?.attributes?.[r];if(!a)return!1;let{isAttributeEnabled:e}=a;return e?await h(e,JSON.stringify(t),i):!0}async function N({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await M(e,r,t);return{[e]:{valueExpressionResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function M(r,t,i){let a=t.attributes[r];if(!a)throw Error(`Attribute ${r} not found in schema`);let e=a.valueExpression,s=a.validValues,o=a.validValuesMap;return s?.length?s:o&&Object.keys(o)?.length?o:e?await h(e,t,i,r):null}async function q({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await H(e,r,t);return{[e]:{attributeValidationResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function H(r,t,i){let a=t?.attributes?.[r];if(!a)return null;let e=a?.attributeValidation;return e?await h(e,JSON.stringify(t),i,r):null}var R=async(r,t)=>{let i=r?.bannerExpression;return i?.length?await h(i,r,t):U(r,t)},U=(r,t)=>{let i=Object.entries(r.attributes).sort(([,s],[,o])=>(s?.bannerOrder??0)-(o?.bannerOrder??0)),a=[],e=[];return i.forEach(([s,o])=>{let l=t?.[s];l&&o.bannerOrder&&(a.push(J({elementType:o.uiElement??"",selectionDisplayLabel:o.bannerLabel??"",labelDelimiter:o.labelDelimiter??"",classificationProp:l,valueDelimiter:o.valueDelimiter??""})),e.push(o.attributeDelimiter??""))}),a.length>0?a.reduce((s,o,l)=>l===0?o:`${s}${e[l-1]}${o}`,""):""},J=({elementType:r,selectionDisplayLabel:t,labelDelimiter:i,classificationProp:a,valueDelimiter:e})=>{let s=r.includes("multi")&&a?a.split("").join(e):a;return`${t}${i}${s}`};async function h(r,t,i,a=""){let e={schemaJsonString:typeof t=="string"?t:JSON.stringify(t),valueJsonString:JSON.stringify(i),attributeId:a};return(await L(r)).execute(e)}async function L(r){return await F(r,{variables:[{name:"schemaJsonString",type:"text"},{name:"valueJsonString",type:"text"},{name:"attributeId",type:"text"}]})}var W=p`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`,f=class extends b{constructor(){super(),this.classificationModel=S(this),this.messages=$(),this.formMainContentRef=u(),this._classificationDataTask=w(this),this._formCreationTask=new I(this,{task:async()=>{if(await this._classificationDataTask.taskComplete,!this.portalClassificationSchema||!this.portalItem)throw new Error("Portal item and classification schema are required to render the form");let t=this.portalItem.clone();if(await t.load(),!this.primaryAttribute)throw new Error("primaryAttribute is required but was undefined.");this.existingClassification=!!t.classification,t.classification=m(t.classification,this.primaryAttribute,this.portalClassificationSchema),t.classification&&(t.classification.banner=await R(this.portalClassificationSchema,t.classification)),this.pendingPortalItem=t,this._itemClassificationWatchHandle&&(this._itemClassificationWatchHandle.remove(),this.portalItem.removeHandles("arcgis-classification-config"),this._itemClassificationWatchHandle=void 0),this._itemClassificationWatchHandle=k(()=>this.portalItem.classification,i=>{if(this.pendingPortalItem){let a=this.pendingPortalItem.clone();a.load().then(()=>{a.classification=i,this.pendingPortalItem=a}).catch(e=>{console.error(e)})}}),this.portalItem.addHandles(this._itemClassificationWatchHandle,"arcgis-classification-config"),await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.existingClassification&&this.validateForm()},args:()=>[this.portalItem,this.portalClassificationSchema]}),this.getFormDisplayOrder=t=>this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder??0,this.addEditInfoAttributes=()=>{if(!this.pendingPortalItem?.classification)return{};let t=structuredClone(this.pendingPortalItem.classification),i=V(this.pendingPortalItem,t);return{...t,...i}},this.updateFavoriteClassification=t=>{this.favoriteClassifications=t},this.updateClassificationData=async t=>{let i=t.classification;if(this.selectedFavoriteClassificationName=t.name,this.pendingPortalItem){let a=this.pendingPortalItem.clone();if(await a.load(),a.classification=d(this.portalClassificationSchema,i),!this.portalClassificationSchema)return;await this.evaluateAttributeExpressions(this.portalClassificationSchema,a),a.classification=c(a.classification,this.attributeExpressionResults),this.pendingPortalItem=a}},this.existingClassification=!1,this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.primaryAttribute=this.classificationModel.primaryAttribute,this.attributeExpressionResults=new Map,this.formValidationErrors=[],this.remoteValidationErrors="",this.canUserConfigureClassification=!0,this.favoriteClassifications=[],this.status=this.classificationModel.status,this.values={},this.valid=!1,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=P()("status","values","valid")}static{this.properties={existingClassification:16,portalClassificationSchema:16,primaryAttribute:16,attributeExpressionResults:16,formValidationErrors:16,itemClassification:16,pendingPortalItem:16,selectedCategory:16,remoteValidationErrors:16,canUserConfigureClassification:16,favoriteClassifications:16,selectedFavoriteClassificationName:16,portalItem:0,status:35,values:[1,{type:Object}],valid:7,autoDestroyDisabled:5}}static{this.styles=W}async destroy(){await this.manager.destroy()}async resetForm(){if(this.existingClassification)this.pendingPortalItem=this.portalItem?.clone(),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.validateForm());else if(this.portalItem&&this.primaryAttribute&&this.portalClassificationSchema){let t=this.portalItem.clone();await t.load(),this.pendingPortalItem=this.portalItem?.clone(),this.pendingPortalItem.classification=m(t.classification,this.primaryAttribute,this.portalClassificationSchema),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults))}}async validateForm(){this.updateFormValidationErrors(),await this.updateRemoteValidationErrors()}async load(){try{await _(this.portalItem)||(this.canUserConfigureClassification=!1);let t=await y(this.portalItem);if(t){let{result:i,error:a}=t;if(a&&a.details.raw.messageCode!=="COM_1177"){console.error(a);return}i&&(this.favoriteClassifications=i.favorites)}}catch(t){console.error("Error occured while loading arcgis-classification-config:",t)}}willUpdate(t){if(t.has("pendingPortalItem")){let i=this.addEditInfoAttributes();this.values=i}(t.has("formValidationErrors")||t.has("remoteValidationErrors"))&&(this.valid=!this.formValidationErrors.length&&!this.remoteValidationErrors)}loaded(){let t=x(this.el,"form");t&&(this.listenOn(t,"formdata",this.updateFormData),this.listenOn(t,"submit",this.handleFormSubmit)),this.listen("submit",this.handleFormSubmit)}async updateClassificationProperty(t){if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let i=this.pendingPortalItem.clone();await i.load(),Object.entries(t??{}).forEach(([a,e])=>{if(a===this.primaryAttribute){let s=O(e,i.classification,this.primaryAttribute);s=d(this.portalClassificationSchema,s),i.classification=s}else{let s=new Map(Object.entries(i.classification??{}));if(e===void 0||e===""||Array.isArray(e)&&e.length===0)s.delete(a);else if(s.set(a,e),a==="fgi"&&!s.has("fgiOptions")){let o=this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue??[];s.set("fgiOptions",Array.isArray(o)?o:[o])}i.classification=Object.fromEntries(s)}}),i.classification&&!i.classification.fgi&&delete i.classification.fgiOptions,await this.evaluateAttributeExpressions(this.portalClassificationSchema,i),i.classification=c(i.classification,this.attributeExpressionResults),i.classification&&(i.classification.banner=await R(this.portalClassificationSchema,i.classification)),this.pendingPortalItem=i,this.existingClassification&&this.validateForm()}handleCategorySelectChange(t){this.selectedCategory=t.target.selectedItems[0].value}async evaluateAttributeExpressions(t,i){let a=await T({portalClassificationSchema:t,itemClassification:i.classification}),e=await N({portalClassificationSchema:t,itemClassification:i.classification}),s=await q({portalClassificationSchema:t,itemClassification:i.classification});Object.keys(t.attributes).forEach(o=>{let l=a[o]?.enabled??!0,A=e[o]?.valueExpressionResult,D=s[o]?.attributeValidationResult;this.attributeExpressionResults.set(o,{enabled:l,valueExpressionResult:A,attributeValidationResult:D})})}updateFormValidationErrors(){let t=[];Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([i,a])=>{a.isRequired&&!this.pendingPortalItem?.classification?.[i]&&this.pendingPortalItem?.classification?.[i]!==0&&t.push({attribute:a.label,reason:this.messages.isrequired??"is required",category:a.attributeCategory}),this.attributeExpressionResults.get(i)?.attributeValidationResult&&t.push({attribute:a.label,reason:this.attributeExpressionResults.get(i)?.attributeValidationResult??"",category:a.attributeCategory})}),this.formValidationErrors=t}async updateRemoteValidationErrors(){if(!this.pendingPortalItem?.classification)return;let t=await this.classificationModel.validateClassification(void 0,this.pendingPortalItem?.classification,this.pendingPortalItem.portal.restUrl);this.remoteValidationErrors=t}async handleFormSubmit(t){this.validateForm(),this.formMainContentRef.value?.scrollIntoView()}updateFormData(t){let i=t.formData,a=this.addEditInfoAttributes();a=c(a,this.attributeExpressionResults),Object.entries(a??{}).forEach(([e,s])=>{i.set(e,s)})}renderCategoryTabs(){return this._classificationDataTask.render({complete:()=>{if(this.portalClassificationSchema?.attributeCategories?.length)return this.selectedCategory||(this.selectedCategory=this.portalClassificationSchema?.attributeCategories[0]),n`<calcite-list .label=${this.messages.selectcategory??"select category"} selection-appearance=border selection-mode=single-persist @calciteListChange=${this.handleCategorySelectChange}>${this.portalClassificationSchema.attributeCategories.map(t=>{let i=this.formValidationErrors.filter(a=>a.category===t).length;return n`<calcite-list-item .label=${t} .value=${t} .selected=${this.selectedCategory===t} .description=${i?`${i} ${i>1?this.messages.errors:this.messages.error}`:void 0}>${i&&n`<div slot=content-end class="danger"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon></div>`||""}</calcite-list-item>`})}</calcite-list>`}})}renderValidationErrors(){return this.formValidationErrors.length&&(!this.selectedCategory||this.formValidationErrors.some(t=>this.selectedCategory===t.category))?n`<calcite-notice open icon=exclamation-mark-triangle class="spacing-y" kind=danger><div slot=message>${this.messages.bannererror??"Some fields are incomplete or contain errors. Check the highlighted fields for details."}</div></calcite-notice>`:null}renderFavoriteClassification(){let t=this.portalClassificationSchema?.attributeCategories?.[0]??"Default";return this.selectedCategory=this.portalClassificationSchema?.attributeCategories?.length?this.selectedCategory:"Default",this.selectedCategory===t?n`<arcgis-portal-classification-favorite .portalItem=${this.pendingPortalItem??this.portalItem} .classificationValue=${this.pendingPortalItem?.classification} .favoriteClassifications=${this.favoriteClassifications} .selectedFavoriteClassificationName=${this.selectedFavoriteClassificationName} .attributeExpressionResults=${this.attributeExpressionResults} .resetFavoriteClassification=${i=>this.updateFavoriteClassification(i)} .updateClassificationData=${async i=>{await this.updateClassificationData(i),this.updateFormValidationErrors()}}></arcgis-portal-classification-favorite>`:null}renderForm(){return this._formCreationTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,complete:()=>{if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let t=Object.entries(this.portalClassificationSchema.attributes).sort(([i],[a])=>this.getFormDisplayOrder(i)-this.getFormDisplayOrder(a));return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([,{attributeCategory:i}])=>this.selectedCategory===i||!i).map(([i,a])=>{if(this.attributeExpressionResults.get(i)?.enabled===!1)return null;let e=this.pendingPortalItem?.classification?.[i];return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${a} .value=${e} @arcgisAttributeValueChange=${s=>void this.updateClassificationProperty(s.detail)} .renderingInfo=${this.attributeExpressionResults.get(i)}></arcgis-portal-classification-form-element>`})}`}})}renderNotice(t,i="warning"){return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`}renderHelpTooltip(){return this.portalClassificationSchema?.helpTooltip?n`<calcite-action id=portal-classification-config-tooltip-button .text=${this.portalClassificationSchema?.helpTooltip} icon=information></calcite-action><calcite-popover .label=${this.portalClassificationSchema?.helpTooltip} reference-element=portal-classification-config-tooltip-button placement=bottom-end overlay-positioning=fixed auto-close><div class="header-section__title-popover"><calcite-link .href=${this.portalClassificationSchema?.helpUrl} target=_blank id=portal-classification-config-tooltip-button>${this.portalClassificationSchema?.helpTooltip}</calcite-link></div></calcite-popover>`:null}render(){return this.portalItem?this._classificationDataTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,error:()=>this.renderNotice(this.messages.anerroroccurred??"An error has occurred.","danger"),complete:()=>this.portalItem?this.canUserConfigureClassification?this.portalItem.portal.hasClassificationSchema?n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview??"documentbannerpreview"??C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview??"documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status===E.COMPLETE&&n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem??this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification}></arcgis-portal-classification-banner>`||""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length&&n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>`||""}<div class="form-section__main-content" ${g(this.formMainContentRef)}>${this.renderForm()}</div></div>`:this.renderNotice(this.messages.missingclassificationschema??"Portal is missing classification schema."):this.renderNotice(this.messages.userconfigurepermissionrequired??"User configuration permission is required."):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}};v("arcgis-portal-classification-config",f);return f},"arcade","core/reactiveUtils",a,c,d)