@arcgis/portal-components 4.33.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/LICENSE.md +13 -0
  2. package/README.md +21 -0
  3. package/dist/cdn/35BP2SHK.js +4 -0
  4. package/dist/cdn/36Q7YYGI.js +4 -0
  5. package/dist/cdn/4CNGEWBF.js +4 -0
  6. package/dist/cdn/72MNXP3Y.js +4 -0
  7. package/dist/cdn/COVOJ6P4.js +4 -0
  8. package/dist/cdn/DVE4JMTL.js +4 -0
  9. package/dist/cdn/QTLH5UTZ.js +4 -0
  10. package/dist/cdn/RQR3TGUH.js +4 -0
  11. package/dist/cdn/TVD7CLRH.js +6 -0
  12. package/dist/cdn/TX7OGGNH.js +4 -0
  13. package/dist/cdn/UNNIXGUO.js +4 -0
  14. package/dist/cdn/ZD5UK6DF.js +4 -0
  15. package/dist/cdn/ZEXD6FIR.js +4 -0
  16. package/dist/cdn/assets/portal-classification-banner/t9n/messages.ar.json +1 -0
  17. package/dist/cdn/assets/portal-classification-banner/t9n/messages.bg.json +1 -0
  18. package/dist/cdn/assets/portal-classification-banner/t9n/messages.bs.json +1 -0
  19. package/dist/cdn/assets/portal-classification-banner/t9n/messages.ca.json +1 -0
  20. package/dist/cdn/assets/portal-classification-banner/t9n/messages.cs.json +1 -0
  21. package/dist/cdn/assets/portal-classification-banner/t9n/messages.da.json +1 -0
  22. package/dist/cdn/assets/portal-classification-banner/t9n/messages.de.json +1 -0
  23. package/dist/cdn/assets/portal-classification-banner/t9n/messages.el.json +1 -0
  24. package/dist/cdn/assets/portal-classification-banner/t9n/messages.en.json +1 -0
  25. package/dist/cdn/assets/portal-classification-banner/t9n/messages.es.json +1 -0
  26. package/dist/cdn/assets/portal-classification-banner/t9n/messages.et.json +1 -0
  27. package/dist/cdn/assets/portal-classification-banner/t9n/messages.fi.json +1 -0
  28. package/dist/cdn/assets/portal-classification-banner/t9n/messages.fr.json +1 -0
  29. package/dist/cdn/assets/portal-classification-banner/t9n/messages.he.json +1 -0
  30. package/dist/cdn/assets/portal-classification-banner/t9n/messages.hr.json +1 -0
  31. package/dist/cdn/assets/portal-classification-banner/t9n/messages.hu.json +1 -0
  32. package/dist/cdn/assets/portal-classification-banner/t9n/messages.id.json +1 -0
  33. package/dist/cdn/assets/portal-classification-banner/t9n/messages.it.json +1 -0
  34. package/dist/cdn/assets/portal-classification-banner/t9n/messages.ja.json +1 -0
  35. package/dist/cdn/assets/portal-classification-banner/t9n/messages.ko.json +1 -0
  36. package/dist/cdn/assets/portal-classification-banner/t9n/messages.lt.json +1 -0
  37. package/dist/cdn/assets/portal-classification-banner/t9n/messages.lv.json +1 -0
  38. package/dist/cdn/assets/portal-classification-banner/t9n/messages.nl.json +1 -0
  39. package/dist/cdn/assets/portal-classification-banner/t9n/messages.no.json +1 -0
  40. package/dist/cdn/assets/portal-classification-banner/t9n/messages.pl.json +1 -0
  41. package/dist/cdn/assets/portal-classification-banner/t9n/messages.pt-BR.json +1 -0
  42. package/dist/cdn/assets/portal-classification-banner/t9n/messages.pt-PT.json +1 -0
  43. package/dist/cdn/assets/portal-classification-banner/t9n/messages.ro.json +1 -0
  44. package/dist/cdn/assets/portal-classification-banner/t9n/messages.ru.json +1 -0
  45. package/dist/cdn/assets/portal-classification-banner/t9n/messages.sk.json +1 -0
  46. package/dist/cdn/assets/portal-classification-banner/t9n/messages.sl.json +1 -0
  47. package/dist/cdn/assets/portal-classification-banner/t9n/messages.sr.json +1 -0
  48. package/dist/cdn/assets/portal-classification-banner/t9n/messages.sv.json +1 -0
  49. package/dist/cdn/assets/portal-classification-banner/t9n/messages.th.json +1 -0
  50. package/dist/cdn/assets/portal-classification-banner/t9n/messages.tr.json +1 -0
  51. package/dist/cdn/assets/portal-classification-banner/t9n/messages.uk.json +1 -0
  52. package/dist/cdn/assets/portal-classification-banner/t9n/messages.vi.json +1 -0
  53. package/dist/cdn/assets/portal-classification-banner/t9n/messages.zh-CN.json +1 -0
  54. package/dist/cdn/assets/portal-classification-banner/t9n/messages.zh-HK.json +1 -0
  55. package/dist/cdn/assets/portal-classification-banner/t9n/messages.zh-TW.json +1 -0
  56. package/dist/cdn/assets/portal-classification-config/t9n/messages.ar.json +1 -0
  57. package/dist/cdn/assets/portal-classification-config/t9n/messages.bg.json +1 -0
  58. package/dist/cdn/assets/portal-classification-config/t9n/messages.bs.json +1 -0
  59. package/dist/cdn/assets/portal-classification-config/t9n/messages.ca.json +1 -0
  60. package/dist/cdn/assets/portal-classification-config/t9n/messages.cs.json +1 -0
  61. package/dist/cdn/assets/portal-classification-config/t9n/messages.da.json +1 -0
  62. package/dist/cdn/assets/portal-classification-config/t9n/messages.de.json +1 -0
  63. package/dist/cdn/assets/portal-classification-config/t9n/messages.el.json +1 -0
  64. package/dist/cdn/assets/portal-classification-config/t9n/messages.en.json +1 -0
  65. package/dist/cdn/assets/portal-classification-config/t9n/messages.es.json +1 -0
  66. package/dist/cdn/assets/portal-classification-config/t9n/messages.et.json +1 -0
  67. package/dist/cdn/assets/portal-classification-config/t9n/messages.fi.json +1 -0
  68. package/dist/cdn/assets/portal-classification-config/t9n/messages.fr.json +1 -0
  69. package/dist/cdn/assets/portal-classification-config/t9n/messages.he.json +1 -0
  70. package/dist/cdn/assets/portal-classification-config/t9n/messages.hr.json +1 -0
  71. package/dist/cdn/assets/portal-classification-config/t9n/messages.hu.json +1 -0
  72. package/dist/cdn/assets/portal-classification-config/t9n/messages.id.json +1 -0
  73. package/dist/cdn/assets/portal-classification-config/t9n/messages.it.json +1 -0
  74. package/dist/cdn/assets/portal-classification-config/t9n/messages.ja.json +1 -0
  75. package/dist/cdn/assets/portal-classification-config/t9n/messages.ko.json +1 -0
  76. package/dist/cdn/assets/portal-classification-config/t9n/messages.lt.json +1 -0
  77. package/dist/cdn/assets/portal-classification-config/t9n/messages.lv.json +1 -0
  78. package/dist/cdn/assets/portal-classification-config/t9n/messages.nl.json +1 -0
  79. package/dist/cdn/assets/portal-classification-config/t9n/messages.no.json +1 -0
  80. package/dist/cdn/assets/portal-classification-config/t9n/messages.pl.json +1 -0
  81. package/dist/cdn/assets/portal-classification-config/t9n/messages.pt-BR.json +1 -0
  82. package/dist/cdn/assets/portal-classification-config/t9n/messages.pt-PT.json +1 -0
  83. package/dist/cdn/assets/portal-classification-config/t9n/messages.ro.json +1 -0
  84. package/dist/cdn/assets/portal-classification-config/t9n/messages.ru.json +1 -0
  85. package/dist/cdn/assets/portal-classification-config/t9n/messages.sk.json +1 -0
  86. package/dist/cdn/assets/portal-classification-config/t9n/messages.sl.json +1 -0
  87. package/dist/cdn/assets/portal-classification-config/t9n/messages.sr.json +1 -0
  88. package/dist/cdn/assets/portal-classification-config/t9n/messages.sv.json +1 -0
  89. package/dist/cdn/assets/portal-classification-config/t9n/messages.th.json +1 -0
  90. package/dist/cdn/assets/portal-classification-config/t9n/messages.tr.json +1 -0
  91. package/dist/cdn/assets/portal-classification-config/t9n/messages.uk.json +1 -0
  92. package/dist/cdn/assets/portal-classification-config/t9n/messages.vi.json +1 -0
  93. package/dist/cdn/assets/portal-classification-config/t9n/messages.zh-CN.json +1 -0
  94. package/dist/cdn/assets/portal-classification-config/t9n/messages.zh-HK.json +1 -0
  95. package/dist/cdn/assets/portal-classification-config/t9n/messages.zh-TW.json +1 -0
  96. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ar.json +1 -0
  97. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bg.json +1 -0
  98. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.bs.json +1 -0
  99. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ca.json +1 -0
  100. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.cs.json +1 -0
  101. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.da.json +1 -0
  102. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.de.json +1 -0
  103. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.el.json +1 -0
  104. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.en.json +1 -0
  105. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.es.json +1 -0
  106. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.et.json +1 -0
  107. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fi.json +1 -0
  108. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.fr.json +1 -0
  109. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.he.json +1 -0
  110. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hr.json +1 -0
  111. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.hu.json +1 -0
  112. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.id.json +1 -0
  113. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.it.json +1 -0
  114. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ja.json +1 -0
  115. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ko.json +1 -0
  116. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lt.json +1 -0
  117. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.lv.json +1 -0
  118. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.nl.json +1 -0
  119. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.no.json +1 -0
  120. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pl.json +1 -0
  121. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-BR.json +1 -0
  122. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.pt-PT.json +1 -0
  123. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ro.json +1 -0
  124. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.ru.json +1 -0
  125. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sk.json +1 -0
  126. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sl.json +1 -0
  127. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sr.json +1 -0
  128. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.sv.json +1 -0
  129. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.th.json +1 -0
  130. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.tr.json +1 -0
  131. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.uk.json +1 -0
  132. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.vi.json +1 -0
  133. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-CN.json +1 -0
  134. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-HK.json +1 -0
  135. package/dist/cdn/assets/portal-classification-favorite/t9n/messages.zh-TW.json +1 -0
  136. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ar.json +1 -0
  137. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.bg.json +1 -0
  138. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.bs.json +1 -0
  139. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ca.json +1 -0
  140. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.cs.json +1 -0
  141. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.da.json +1 -0
  142. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.de.json +1 -0
  143. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.el.json +1 -0
  144. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.en.json +1 -0
  145. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.es.json +1 -0
  146. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.et.json +1 -0
  147. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.fi.json +1 -0
  148. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.fr.json +1 -0
  149. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.he.json +1 -0
  150. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.hr.json +1 -0
  151. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.hu.json +1 -0
  152. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.id.json +1 -0
  153. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.it.json +1 -0
  154. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ja.json +1 -0
  155. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ko.json +1 -0
  156. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.lt.json +1 -0
  157. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.lv.json +1 -0
  158. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.nl.json +1 -0
  159. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.no.json +1 -0
  160. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.pl.json +1 -0
  161. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.pt-BR.json +1 -0
  162. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.pt-PT.json +1 -0
  163. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ro.json +1 -0
  164. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.ru.json +1 -0
  165. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sk.json +1 -0
  166. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sl.json +1 -0
  167. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sr.json +1 -0
  168. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.sv.json +1 -0
  169. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.th.json +1 -0
  170. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.tr.json +1 -0
  171. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.uk.json +1 -0
  172. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.vi.json +1 -0
  173. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.zh-CN.json +1 -0
  174. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.zh-HK.json +1 -0
  175. package/dist/cdn/assets/portal-classification-form-element/t9n/messages.zh-TW.json +1 -0
  176. package/dist/cdn/assets/portal-field-delete/t9n/messages.ar.json +1 -0
  177. package/dist/cdn/assets/portal-field-delete/t9n/messages.bg.json +1 -0
  178. package/dist/cdn/assets/portal-field-delete/t9n/messages.bs.json +1 -0
  179. package/dist/cdn/assets/portal-field-delete/t9n/messages.ca.json +1 -0
  180. package/dist/cdn/assets/portal-field-delete/t9n/messages.cs.json +1 -0
  181. package/dist/cdn/assets/portal-field-delete/t9n/messages.da.json +1 -0
  182. package/dist/cdn/assets/portal-field-delete/t9n/messages.de.json +1 -0
  183. package/dist/cdn/assets/portal-field-delete/t9n/messages.el.json +1 -0
  184. package/dist/cdn/assets/portal-field-delete/t9n/messages.en.json +1 -0
  185. package/dist/cdn/assets/portal-field-delete/t9n/messages.es.json +1 -0
  186. package/dist/cdn/assets/portal-field-delete/t9n/messages.et.json +1 -0
  187. package/dist/cdn/assets/portal-field-delete/t9n/messages.fi.json +1 -0
  188. package/dist/cdn/assets/portal-field-delete/t9n/messages.fr.json +1 -0
  189. package/dist/cdn/assets/portal-field-delete/t9n/messages.he.json +1 -0
  190. package/dist/cdn/assets/portal-field-delete/t9n/messages.hr.json +1 -0
  191. package/dist/cdn/assets/portal-field-delete/t9n/messages.hu.json +1 -0
  192. package/dist/cdn/assets/portal-field-delete/t9n/messages.id.json +1 -0
  193. package/dist/cdn/assets/portal-field-delete/t9n/messages.it.json +1 -0
  194. package/dist/cdn/assets/portal-field-delete/t9n/messages.ja.json +1 -0
  195. package/dist/cdn/assets/portal-field-delete/t9n/messages.ko.json +1 -0
  196. package/dist/cdn/assets/portal-field-delete/t9n/messages.lt.json +1 -0
  197. package/dist/cdn/assets/portal-field-delete/t9n/messages.lv.json +1 -0
  198. package/dist/cdn/assets/portal-field-delete/t9n/messages.nb.json +1 -0
  199. package/dist/cdn/assets/portal-field-delete/t9n/messages.nl.json +1 -0
  200. package/dist/cdn/assets/portal-field-delete/t9n/messages.no.json +1 -0
  201. package/dist/cdn/assets/portal-field-delete/t9n/messages.pl.json +1 -0
  202. package/dist/cdn/assets/portal-field-delete/t9n/messages.pt-BR.json +1 -0
  203. package/dist/cdn/assets/portal-field-delete/t9n/messages.pt-PT.json +1 -0
  204. package/dist/cdn/assets/portal-field-delete/t9n/messages.ro.json +1 -0
  205. package/dist/cdn/assets/portal-field-delete/t9n/messages.ru.json +1 -0
  206. package/dist/cdn/assets/portal-field-delete/t9n/messages.sk.json +1 -0
  207. package/dist/cdn/assets/portal-field-delete/t9n/messages.sl.json +1 -0
  208. package/dist/cdn/assets/portal-field-delete/t9n/messages.sr.json +1 -0
  209. package/dist/cdn/assets/portal-field-delete/t9n/messages.sv.json +1 -0
  210. package/dist/cdn/assets/portal-field-delete/t9n/messages.th.json +1 -0
  211. package/dist/cdn/assets/portal-field-delete/t9n/messages.tr.json +1 -0
  212. package/dist/cdn/assets/portal-field-delete/t9n/messages.uk.json +1 -0
  213. package/dist/cdn/assets/portal-field-delete/t9n/messages.vi.json +1 -0
  214. package/dist/cdn/assets/portal-field-delete/t9n/messages.zh-CN.json +1 -0
  215. package/dist/cdn/assets/portal-field-delete/t9n/messages.zh-HK.json +1 -0
  216. package/dist/cdn/assets/portal-field-delete/t9n/messages.zh-TW.json +1 -0
  217. package/dist/cdn/index.js +4 -0
  218. package/dist/cdn/main.css +1 -0
  219. package/dist/chunks/common.js +130 -0
  220. package/dist/chunks/fieldAddDelete.js +347 -0
  221. package/dist/chunks/loadClassificationData.js +115 -0
  222. package/dist/chunks/requests.js +71 -0
  223. package/dist/chunks/runtime.js +16 -0
  224. package/dist/chunks/useT9n.js +9 -0
  225. package/dist/components/arcgis-portal-classification-banner/customElement.d.ts +36 -0
  226. package/dist/components/arcgis-portal-classification-banner/customElement.js +63 -0
  227. package/dist/components/arcgis-portal-classification-banner/index.d.ts +2 -0
  228. package/dist/components/arcgis-portal-classification-banner/index.js +2 -0
  229. package/dist/components/arcgis-portal-classification-config/customElement.d.ts +45 -0
  230. package/dist/components/arcgis-portal-classification-config/customElement.js +375 -0
  231. package/dist/components/arcgis-portal-classification-config/index.d.ts +12 -0
  232. package/dist/components/arcgis-portal-classification-config/index.js +12 -0
  233. package/dist/components/arcgis-portal-classification-favorite/customElement.d.ts +18 -0
  234. package/dist/components/arcgis-portal-classification-favorite/customElement.js +124 -0
  235. package/dist/components/arcgis-portal-classification-favorite/index.d.ts +12 -0
  236. package/dist/components/arcgis-portal-classification-favorite/index.js +12 -0
  237. package/dist/components/arcgis-portal-classification-form-element/customElement.d.ts +19 -0
  238. package/dist/components/arcgis-portal-classification-form-element/customElement.js +104 -0
  239. package/dist/components/arcgis-portal-classification-form-element/index.d.ts +9 -0
  240. package/dist/components/arcgis-portal-classification-form-element/index.js +9 -0
  241. package/dist/components/arcgis-portal-field-delete/customElement.d.ts +23 -0
  242. package/dist/components/arcgis-portal-field-delete/customElement.js +263 -0
  243. package/dist/components/arcgis-portal-field-delete/index.d.ts +10 -0
  244. package/dist/components/arcgis-portal-field-delete/index.js +10 -0
  245. package/dist/components/arcgis-portal-field-delete/types.d.ts +5 -0
  246. package/dist/controllers/loadClassificationData.d.ts +11 -0
  247. package/dist/controllers/useClassificationModel.d.ts +9 -0
  248. package/dist/controllers/useT9n.d.ts +1 -0
  249. package/dist/docs/api.json +1174 -0
  250. package/dist/docs/docs.json +1076 -0
  251. package/dist/docs/vscode.css-custom-data.json +6 -0
  252. package/dist/docs/vscode.html-custom-data.json +98 -0
  253. package/dist/docs/web-types.json +313 -0
  254. package/dist/index.d.ts +87 -0
  255. package/dist/index.js +11 -0
  256. package/dist/loader.d.ts +2 -0
  257. package/dist/loader.js +15 -0
  258. package/dist/models/classificationModel.d.ts +64 -0
  259. package/dist/runtime.d.ts +6 -0
  260. package/dist/types/classification.d.ts +214 -0
  261. package/dist/types/components.d.ts +1 -0
  262. package/dist/types/lumina.d.ts +39 -0
  263. package/dist/types/preact.d.ts +49 -0
  264. package/dist/types/react.d.ts +62 -0
  265. package/dist/types/stencil.d.ts +46 -0
  266. package/dist/utils/arcade.d.ts +27 -0
  267. package/dist/utils/common.d.ts +29 -0
  268. package/dist/utils/commonEnums.d.ts +5 -0
  269. package/dist/utils/commonFunctions.d.ts +11 -0
  270. package/dist/utils/fieldAddDelete.d.ts +4 -0
  271. package/dist/utils/functionalComponents/FieldIcons.d.ts +6 -0
  272. package/dist/utils/item.d.ts +21 -0
  273. package/dist/utils/portal.d.ts +2 -0
  274. package/dist/utils/requests.d.ts +15 -0
  275. package/dist/utils/types.d.ts +29 -0
  276. package/dist/utils/url.d.ts +1 -0
  277. package/package.json +58 -0
@@ -0,0 +1,45 @@
1
+ /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ /// <reference types="../../index.d.ts" />
3
+ import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
4
+ import { PropertyValues } from 'lit';
5
+ import { Use } from '@arcgis/lumina/controllers';
6
+ import { useClassificationModel } from '../../controllers/useClassificationModel';
7
+ import { AttributeExpressionResults, FavoriteClassification } from '../../types/classification';
8
+
9
+ /**
10
+ * The `arcgis-portal-classification-config` component enables users to edit or provide a classification schema to a portal item through a user-friendly form. The schema is saved to the associated portal item.
11
+ *
12
+ * @internal
13
+ */
14
+ export declare class ArcgisPortalClassificationConfig extends LitElement {
15
+ /**
16
+ * The portal item to display the classification banner for.
17
+ *
18
+ * @required
19
+ */
20
+ portalItem?: __esri.PortalItem;
21
+ /**
22
+ * The loading status of the component, will be set to "loaded" when the classification schema is loaded.
23
+ *
24
+ * @default "idle"
25
+ */
26
+ readonly status: "loading" | "loaded" | "error" | "idle";
27
+ /** The edited classification values of the portal item. */
28
+ values: __esri.PortalItem["classification"];
29
+ /**
30
+ * The validity of the form values against the Portal's classification schema.
31
+ *
32
+ * @default false
33
+ */
34
+ valid: boolean;
35
+ /** Permanently destroy the component. */
36
+ destroy(): Promise<void>;
37
+ /** Reset the form to the initial classification values from the portalItem */
38
+ resetForm(): Promise<void>;
39
+ /** Validates the form and sets the formValidationErrors state. */
40
+ validateForm(): Promise<void>;
41
+ /** Event emitted when component property values status, values, or valid change. */
42
+ readonly arcgisPropertyChange: TargetedEvent<this, {
43
+ name: "values" | "valid" | "status";
44
+ }>;
45
+ }
@@ -0,0 +1,375 @@
1
+ import { c as g } from "../../chunks/runtime.js";
2
+ import { LitElement as b, nothing as C } from "@arcgis/lumina";
3
+ import { html as n } from "lit";
4
+ import { Task as v, TaskStatus as E } from "@lit/task";
5
+ import { createRef as I, ref as y } from "lit/directives/ref.js";
6
+ import { usePropertyChange as x } from "@arcgis/lumina/controllers";
7
+ import { closestElement as w } from "@arcgis/components-utils";
8
+ import { u as R, c as $ } from "../../chunks/loadClassificationData.js";
9
+ import { createArcadeExecutor as S } from "@arcgis/core/arcade.js";
10
+ import { u as P } from "../../chunks/useT9n.js";
11
+ import { d as f, a as d, g as V, r as u, c as O, b as A } from "../../chunks/common.js";
12
+ import { watch as F } from "@arcgis/core/core/reactiveUtils.js";
13
+ import { css as _ } from "@lit/reactive-element/css-tag.js";
14
+ import { r as D } from "../../chunks/requests.js";
15
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
16
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
17
+ v4.33.24 */
18
+ async function T({
19
+ portalClassificationSchema: a,
20
+ itemClassification: t
21
+ }) {
22
+ const i = Object.entries(a.attributes).map(async ([s]) => {
23
+ const r = await q(s, a, t);
24
+ return { [s]: { enabled: r } };
25
+ }), e = await Promise.all(i);
26
+ return Object.assign({}, ...e);
27
+ }
28
+ async function q(a, t, i) {
29
+ const e = t?.attributes?.[a];
30
+ if (!e)
31
+ return !1;
32
+ const { isAttributeEnabled: s } = e;
33
+ return s ? await h(
34
+ s,
35
+ JSON.stringify(t),
36
+ i
37
+ ) : !0;
38
+ }
39
+ async function j({
40
+ portalClassificationSchema: a,
41
+ itemClassification: t
42
+ }) {
43
+ const i = Object.entries(a.attributes).map(async ([s]) => {
44
+ const r = await M(s, a, t);
45
+ return { [s]: { valueExpressionResult: r } };
46
+ }), e = await Promise.all(i);
47
+ return Object.assign({}, ...e);
48
+ }
49
+ async function M(a, t, i) {
50
+ const e = t.attributes[a];
51
+ if (!e)
52
+ throw Error(`Attribute ${a} not found in schema`);
53
+ const s = e.valueExpression, r = e.validValues, o = e.validValuesMap;
54
+ return r?.length ? r : o && Object.keys(o)?.length ? o : s ? await h(
55
+ s,
56
+ t,
57
+ i,
58
+ a
59
+ ) : null;
60
+ }
61
+ async function N({
62
+ portalClassificationSchema: a,
63
+ itemClassification: t
64
+ }) {
65
+ const i = Object.entries(a.attributes).map(async ([s]) => {
66
+ const r = await H(
67
+ s,
68
+ a,
69
+ t
70
+ );
71
+ return { [s]: { attributeValidationResult: r } };
72
+ }), e = await Promise.all(i);
73
+ return Object.assign({}, ...e);
74
+ }
75
+ async function H(a, t, i) {
76
+ const e = t?.attributes?.[a];
77
+ if (!e)
78
+ return null;
79
+ const s = e?.attributeValidation;
80
+ return s ? await h(
81
+ s,
82
+ JSON.stringify(t),
83
+ i,
84
+ a
85
+ ) : null;
86
+ }
87
+ const m = async (a, t) => {
88
+ const i = a?.bannerExpression;
89
+ return i?.length ? await h(
90
+ i,
91
+ a,
92
+ t
93
+ ) : U(a, t);
94
+ }, U = (a, t) => {
95
+ const i = Object.entries(a.attributes).sort(
96
+ ([, o], [, l]) => (o?.bannerOrder ?? 0) - (l?.bannerOrder ?? 0)
97
+ ), e = [], s = [];
98
+ return i.forEach(([o, l]) => {
99
+ const c = t?.[o];
100
+ c && l.bannerOrder && (e.push(
101
+ L({
102
+ elementType: l.uiElement ?? "",
103
+ selectionDisplayLabel: l.bannerLabel ?? "",
104
+ labelDelimiter: l.labelDelimiter ?? "",
105
+ classificationProp: c,
106
+ valueDelimiter: l.valueDelimiter ?? ""
107
+ })
108
+ ), s.push(l.attributeDelimiter ?? ""));
109
+ }), e.length > 0 ? e.reduce(
110
+ (o, l, c) => c === 0 ? l : `${o}${s[c - 1]}${l}`,
111
+ // avoiding to have delimiter at the start
112
+ ""
113
+ ) : "";
114
+ }, L = ({
115
+ elementType: a,
116
+ selectionDisplayLabel: t,
117
+ labelDelimiter: i,
118
+ classificationProp: e,
119
+ valueDelimiter: s
120
+ }) => {
121
+ const r = a.includes("multi") && e ? e.split("").join(s) : e;
122
+ return `${t}${i}${r}`;
123
+ };
124
+ async function h(a, t, i, e = "") {
125
+ const s = {
126
+ schemaJsonString: typeof t == "string" ? t : JSON.stringify(t),
127
+ valueJsonString: JSON.stringify(i),
128
+ attributeId: e
129
+ };
130
+ return (await B(a)).execute(s);
131
+ }
132
+ async function B(a) {
133
+ return await S(a, {
134
+ variables: [
135
+ {
136
+ name: "schemaJsonString",
137
+ type: "text"
138
+ },
139
+ {
140
+ name: "valueJsonString",
141
+ type: "text"
142
+ },
143
+ {
144
+ name: "attributeId",
145
+ type: "text"
146
+ }
147
+ ]
148
+ });
149
+ }
150
+ const J = _`: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}`;
151
+ class W extends b {
152
+ constructor() {
153
+ super(), this.classificationModel = R(this), this.messages = P(), this.formMainContentRef = I(), this._classificationDataTask = $(this), this._formCreationTask = new v(this, {
154
+ task: async () => {
155
+ if (await this._classificationDataTask.taskComplete, !this.portalClassificationSchema || !this.portalItem)
156
+ throw new Error("Portal item and classification schema are required to render the form");
157
+ const t = this.portalItem.clone();
158
+ if (await t.load(), !this.primaryAttribute)
159
+ throw new Error("primaryAttribute is required but was undefined.");
160
+ this.existingClassification = !!t.classification, t.classification = f(t.classification, this.primaryAttribute, this.portalClassificationSchema), t.classification && (t.classification.banner = await m(this.portalClassificationSchema, t.classification)), this.pendingPortalItem = t, this._itemClassificationWatchHandle && (this._itemClassificationWatchHandle.remove(), this.portalItem.removeHandles("arcgis-classification-config"), this._itemClassificationWatchHandle = void 0), this._itemClassificationWatchHandle = F(() => this.portalItem.classification, (i) => {
161
+ if (this.pendingPortalItem) {
162
+ const e = this.pendingPortalItem.clone();
163
+ e.load().then(() => {
164
+ e.classification = i, this.pendingPortalItem = e;
165
+ }).catch((s) => {
166
+ console.error(s);
167
+ });
168
+ }
169
+ }), this.portalItem.addHandles(this._itemClassificationWatchHandle, "arcgis-classification-config"), await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults), this.existingClassification && this.validateForm();
170
+ },
171
+ args: () => [this.portalItem, this.portalClassificationSchema]
172
+ }), this.getFormDisplayOrder = (t) => this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder ?? 0, this.addEditInfoAttributes = () => {
173
+ if (!this.pendingPortalItem?.classification)
174
+ return {};
175
+ const t = structuredClone(this.pendingPortalItem.classification), i = V(this.pendingPortalItem, t);
176
+ return { ...t, ...i };
177
+ }, this.updateFavoriteClassification = (t) => {
178
+ this.favoriteClassifications = t;
179
+ }, this.updateClassificationData = async (t) => {
180
+ const i = t.classification;
181
+ if (this.selectedFavoriteClassificationName = t.name, this.pendingPortalItem) {
182
+ const e = this.pendingPortalItem.clone();
183
+ if (await e.load(), e.classification = u(this.portalClassificationSchema, i), !this.portalClassificationSchema)
184
+ return;
185
+ await this.evaluateAttributeExpressions(this.portalClassificationSchema, e), e.classification = d(e.classification, this.attributeExpressionResults), this.pendingPortalItem = e;
186
+ }
187
+ }, this.existingClassification = !1, this.portalClassificationSchema = this.classificationModel.portalClassificationSchema, this.primaryAttribute = this.classificationModel.primaryAttribute, this.attributeExpressionResults = /* @__PURE__ */ new Map(), this.formValidationErrors = [], this.remoteValidationErrors = "", this.canUserConfigureClassification = !0, this.favoriteClassifications = [], this.isRequiredErrors = /* @__PURE__ */ new Set(), this.status = this.classificationModel.status, this.values = {}, this.valid = !1, this.autoDestroyDisabled = !1, this.arcgisPropertyChange = x()("status", "values", "valid");
188
+ }
189
+ static {
190
+ 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, isRequiredErrors: 16, portalItem: 0, status: 35, values: [1, { type: Object }], valid: 7, autoDestroyDisabled: 5 };
191
+ }
192
+ static {
193
+ this.styles = J;
194
+ }
195
+ async destroy() {
196
+ await this.manager.destroy();
197
+ }
198
+ async resetForm() {
199
+ if (this.existingClassification)
200
+ this.pendingPortalItem = this.portalItem?.clone(), this.portalClassificationSchema && this.pendingPortalItem && (await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults), this.validateForm());
201
+ else if (this.portalItem && this.primaryAttribute && this.portalClassificationSchema) {
202
+ const t = this.portalItem.clone();
203
+ await t.load(), this.pendingPortalItem = this.portalItem?.clone(), this.pendingPortalItem.classification = f(t.classification, this.primaryAttribute, this.portalClassificationSchema), this.portalClassificationSchema && this.pendingPortalItem && (await this.evaluateAttributeExpressions(this.portalClassificationSchema, this.pendingPortalItem), this.pendingPortalItem.classification = d(this.pendingPortalItem.classification, this.attributeExpressionResults));
204
+ }
205
+ }
206
+ async validateForm() {
207
+ this.updateFormValidationErrors(), await this.updateRemoteValidationErrors();
208
+ }
209
+ async load() {
210
+ try {
211
+ await O(this.portalItem) || (this.canUserConfigureClassification = !1);
212
+ const t = await D(this.portalItem);
213
+ if (t) {
214
+ const { result: i, error: e } = t;
215
+ if (e && e.details.raw.messageCode !== "COM_1177") {
216
+ console.error(e);
217
+ return;
218
+ }
219
+ i && (this.favoriteClassifications = i.favorites);
220
+ }
221
+ } catch (t) {
222
+ console.error("Error occured while loading arcgis-classification-config:", t);
223
+ }
224
+ }
225
+ willUpdate(t) {
226
+ if (t.has("pendingPortalItem")) {
227
+ const i = this.addEditInfoAttributes();
228
+ this.values = i;
229
+ }
230
+ (t.has("formValidationErrors") || t.has("remoteValidationErrors")) && (this.valid = !this.formValidationErrors.length && !this.remoteValidationErrors);
231
+ }
232
+ loaded() {
233
+ const t = w(this.el, "form");
234
+ t && (this.listenOn(t, "formdata", this.updateFormData), this.listenOn(t, "submit", this.handleFormSubmit)), this.listen("submit", this.handleFormSubmit);
235
+ }
236
+ async updateClassificationProperty(t) {
237
+ if (!this.pendingPortalItem || !this.portalClassificationSchema)
238
+ return;
239
+ const i = this.pendingPortalItem.clone();
240
+ await i.load(), Object.entries(t ?? {}).forEach(([e, s]) => {
241
+ if (e === this.primaryAttribute) {
242
+ let r = A(s, i.classification, this.primaryAttribute);
243
+ r = u(this.portalClassificationSchema, r), i.classification = r;
244
+ } else {
245
+ const r = new Map(Object.entries(i.classification ?? {}));
246
+ if (s === void 0 || s === "" || Array.isArray(s) && s.length === 0)
247
+ r.delete(e);
248
+ else if (r.set(e, s), e === "fgi" && !r.has("fgiOptions")) {
249
+ const o = this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue ?? [];
250
+ r.set("fgiOptions", Array.isArray(o) ? o : [o]);
251
+ }
252
+ i.classification = Object.fromEntries(r);
253
+ }
254
+ }), i.classification && !i.classification.fgi && delete i.classification.fgiOptions, await this.evaluateAttributeExpressions(this.portalClassificationSchema, i), i.classification = d(i.classification, this.attributeExpressionResults), i.classification && (i.classification.banner = await m(this.portalClassificationSchema, i.classification)), this.pendingPortalItem = i, this.existingClassification && this.validateForm(), t && "classification" in t && this.updateIsRequiredErrors();
255
+ }
256
+ handleCategorySelectChange(t) {
257
+ this.selectedCategory = t.target.selectedItems[0].value;
258
+ }
259
+ async evaluateAttributeExpressions(t, i) {
260
+ const e = await T({
261
+ portalClassificationSchema: t,
262
+ itemClassification: i.classification
263
+ }), s = await j({
264
+ portalClassificationSchema: t,
265
+ itemClassification: i.classification
266
+ }), r = await N({
267
+ portalClassificationSchema: t,
268
+ itemClassification: i.classification
269
+ });
270
+ Object.keys(t.attributes).forEach((o) => {
271
+ const l = e[o]?.enabled ?? !0, c = s[o]?.valueExpressionResult, p = r[o]?.attributeValidationResult;
272
+ this.attributeExpressionResults.set(o, { enabled: l, valueExpressionResult: c, attributeValidationResult: p });
273
+ });
274
+ }
275
+ updateIsRequiredErrors() {
276
+ const t = /* @__PURE__ */ new Set();
277
+ Object.entries(this.portalClassificationSchema?.attributes ?? {})?.forEach(([i, e]) => {
278
+ e.isRequired && !this.pendingPortalItem?.classification?.[i] && this.pendingPortalItem?.classification?.[i] !== 0 && t.add(i);
279
+ }), this.isRequiredErrors = t;
280
+ }
281
+ updateFormValidationErrors(t = !1) {
282
+ const i = [];
283
+ Object.entries(this.portalClassificationSchema?.attributes ?? {})?.forEach(([e, s]) => {
284
+ s.isRequired && /**
285
+ * Because of the logic in updateClassificationProperty (we delete keys instead of setting falsy values),
286
+ * we can assume that the classification property will not have valid falsy values beyond zero.
287
+ */
288
+ !this.pendingPortalItem?.classification?.[e] && this.pendingPortalItem?.classification?.[e] !== 0 && (!t || this.isRequiredErrors.has(e)) && i.push({
289
+ attribute: s.label,
290
+ reason: this.messages.isrequired ?? "is required",
291
+ category: s.attributeCategory
292
+ }), this.attributeExpressionResults.get(e)?.attributeValidationResult && i.push({
293
+ attribute: s.label,
294
+ reason: this.attributeExpressionResults.get(e)?.attributeValidationResult ?? "",
295
+ category: s.attributeCategory
296
+ });
297
+ }), this.formValidationErrors = i;
298
+ }
299
+ async updateRemoteValidationErrors() {
300
+ if (!this.pendingPortalItem?.classification)
301
+ return;
302
+ const t = await this.classificationModel.validateClassification(
303
+ // do not pass a key so that the validation is not cached while editing the item
304
+ void 0,
305
+ this.pendingPortalItem?.classification,
306
+ this.pendingPortalItem.portal.restUrl
307
+ );
308
+ this.remoteValidationErrors = t;
309
+ }
310
+ async handleFormSubmit(t) {
311
+ this.validateForm(), this.updateIsRequiredErrors(), this.formMainContentRef.value?.scrollIntoView();
312
+ }
313
+ updateFormData(t) {
314
+ const i = t.formData;
315
+ let e = this.addEditInfoAttributes();
316
+ e = d(e, this.attributeExpressionResults), Object.entries(e ?? {}).forEach(([s, r]) => {
317
+ i.set(s, r);
318
+ });
319
+ }
320
+ renderCategoryTabs() {
321
+ return this._classificationDataTask.render({
322
+ complete: () => {
323
+ if (this.portalClassificationSchema?.attributeCategories?.length)
324
+ 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) => {
325
+ const i = this.formValidationErrors.filter((e) => e.category === t).length;
326
+ 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>`;
327
+ })}</calcite-list>`;
328
+ }
329
+ });
330
+ }
331
+ renderValidationErrors() {
332
+ 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;
333
+ }
334
+ renderFavoriteClassification() {
335
+ const t = this.portalClassificationSchema?.attributeCategories?.[0] ?? "Default";
336
+ 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) => {
337
+ await this.updateClassificationData(i), this.updateFormValidationErrors(), this.updateIsRequiredErrors();
338
+ }}></arcgis-portal-classification-favorite>` : null;
339
+ }
340
+ renderForm() {
341
+ return this._formCreationTask.render({
342
+ pending: () => n`<calcite-loader .label=${this.messages.loading ?? "loading"}></calcite-loader>`,
343
+ complete: () => {
344
+ if (!this.pendingPortalItem || !this.portalClassificationSchema)
345
+ return;
346
+ const t = Object.entries(this.portalClassificationSchema.attributes).sort(([i], [e]) => this.getFormDisplayOrder(i) - this.getFormDisplayOrder(e));
347
+ return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([, { attributeCategory: i }]) => this.selectedCategory === i || !i).map(([i, e]) => {
348
+ if (this.attributeExpressionResults.get(i)?.enabled === !1)
349
+ return null;
350
+ const s = this.pendingPortalItem?.classification?.[i];
351
+ return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${e} .value=${s} @arcgisAttributeValueChange=${async (r) => {
352
+ await this.updateClassificationProperty(r.detail), e.isRequired && !r.detail[i] ? this.isRequiredErrors.add(i) : this.isRequiredErrors = new Set(Array.from(this.isRequiredErrors).filter((o) => o !== i)), this.updateFormValidationErrors(!0);
353
+ }} .renderingInfo=${this.attributeExpressionResults.get(i)} .isRequiredErrors=${this.isRequiredErrors}></arcgis-portal-classification-form-element>`;
354
+ })}`;
355
+ }
356
+ });
357
+ }
358
+ renderNotice(t, i = "warning") {
359
+ return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`;
360
+ }
361
+ renderHelpTooltip() {
362
+ 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;
363
+ }
364
+ render() {
365
+ return this.portalItem ? this._classificationDataTask.render({
366
+ pending: () => n`<calcite-loader .label=${this.messages.loading ?? "loading"}></calcite-loader>`,
367
+ error: () => this.renderNotice(this.messages.anerroroccurred ?? "An error has occurred.", "danger"),
368
+ 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" ${y(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.")
369
+ }) : this.renderNotice(this.messages.portalitemrequired ?? "Portal item is required.");
370
+ }
371
+ }
372
+ g("arcgis-portal-classification-config", W);
373
+ export {
374
+ W as ArcgisPortalClassificationConfig
375
+ };
@@ -0,0 +1,12 @@
1
+ import "@esri/calcite-components/components/calcite-list";
2
+ import "@esri/calcite-components/components/calcite-list-item";
3
+ import "@esri/calcite-components/components/calcite-icon";
4
+ import "@esri/calcite-components/components/calcite-notice";
5
+ import "../arcgis-portal-classification-favorite/index.js";
6
+ import "@esri/calcite-components/components/calcite-loader";
7
+ import "../arcgis-portal-classification-form-element/index.js";
8
+ import "@esri/calcite-components/components/calcite-action";
9
+ import "@esri/calcite-components/components/calcite-popover";
10
+ import "@esri/calcite-components/components/calcite-link";
11
+ import "../arcgis-portal-classification-banner/index.js";
12
+ export * from "./customElement.js";
@@ -0,0 +1,12 @@
1
+ import "@esri/calcite-components/components/calcite-list";
2
+ import "@esri/calcite-components/components/calcite-list-item";
3
+ import "@esri/calcite-components/components/calcite-icon";
4
+ import "@esri/calcite-components/components/calcite-notice";
5
+ import "../arcgis-portal-classification-favorite/index.js";
6
+ import "@esri/calcite-components/components/calcite-loader";
7
+ import "../arcgis-portal-classification-form-element/index.js";
8
+ import "@esri/calcite-components/components/calcite-action";
9
+ import "@esri/calcite-components/components/calcite-popover";
10
+ import "@esri/calcite-components/components/calcite-link";
11
+ import "../arcgis-portal-classification-banner/index.js";
12
+ export * from "./customElement.js";
@@ -0,0 +1,18 @@
1
+ /// <reference types="@arcgis/core/interfaces.d.ts" />
2
+ /// <reference types="../../index.d.ts" />
3
+ import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
4
+ import { FavoriteClassification, ClassificationAlertIndicator, AttributeExpressionResults } from '../../types/classification';
5
+
6
+ export declare class ArcgisPortalClassificationFavorite extends LitElement {
7
+ /** The portal item to display the classification banner for. */
8
+ portalItem?: __esri.PortalItem;
9
+ /** Current classification value */
10
+ classificationValue?: __esri.PortalItem["classification"];
11
+ /** List of favorite classifications */
12
+ favoriteClassifications: FavoriteClassification[];
13
+ /** @default "" */
14
+ selectedFavoriteClassificationName: string;
15
+ attributeExpressionResults?: AttributeExpressionResults;
16
+ resetFavoriteClassification: (favoriteClassifications: FavoriteClassification[]) => void;
17
+ updateClassificationData: (selectedClassification: FavoriteClassification) => void;
18
+ }
@@ -0,0 +1,124 @@
1
+ import { c } from "../../chunks/runtime.js";
2
+ import { html as e } from "lit-html";
3
+ import { repeat as o } from "lit-html/directives/repeat.js";
4
+ import { LitElement as r } from "@arcgis/lumina";
5
+ import { css as n } from "@lit/reactive-element/css-tag.js";
6
+ import { u as f } from "../../chunks/useT9n.js";
7
+ import { u as d, r as v } from "../../chunks/requests.js";
8
+ import { g as h } from "../../chunks/common.js";
9
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
10
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
11
+ v4.33.24 */
12
+ const m = n`.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}`;
13
+ class C extends r {
14
+ constructor() {
15
+ super(...arguments), this.messages = f(), this.selectFavoriteClassification = (i) => {
16
+ const a = i.target.value;
17
+ if (a) {
18
+ this.hasUpdateError = !1;
19
+ const t = this.favoriteClassifications.find(({ name: s }) => s === a);
20
+ t && this.updateClassificationData(t);
21
+ }
22
+ }, this.uploadFavoriteClassificationValueHandle = async (i) => {
23
+ const a = await d(this.portalItem, this.favoriteClassifications);
24
+ if (this.renderFavoriteClassificationError({
25
+ alertIndicatorType: "success",
26
+ alertIndicatorIcon: "check",
27
+ alertIndicatorInfo: i
28
+ }), a) {
29
+ const { result: t, error: s } = a;
30
+ if (s) {
31
+ console.error(s), this.renderFavoriteClassificationError({
32
+ alertIndicatorType: "danger",
33
+ alertIndicatorIcon: "exclamation-mark-triangle",
34
+ alertIndicatorInfo: this.messages.uploadClassificationFavoriteError ?? "Failed to upload classification favorites"
35
+ });
36
+ return;
37
+ }
38
+ t && this.renderFavoriteClassificationError({
39
+ alertIndicatorType: "success",
40
+ alertIndicatorIcon: "check",
41
+ alertIndicatorInfo: i
42
+ });
43
+ }
44
+ }, this.retrieveFavoriteClassificationHandle = async () => {
45
+ const i = await v(this.portalItem);
46
+ if (i) {
47
+ const { result: a, error: t } = i;
48
+ if (t) {
49
+ console.error(t), this.renderFavoriteClassificationError({
50
+ alertIndicatorType: "danger",
51
+ alertIndicatorIcon: "exclamation-mark-triangle",
52
+ alertIndicatorInfo: this.messages.retrieveClassificationFavoriteError ?? "Failed to retrieve classification favorites"
53
+ });
54
+ return;
55
+ }
56
+ a && this.resetFavoriteClassification(a.favorites);
57
+ }
58
+ }, this.changeFavoriteClassificationName = (i) => {
59
+ const a = i.target.value;
60
+ this.newFavoriteClassificationName = a, this.hasDuplicatedClassificationError = this.favoriteClassifications.some((t) => t.name === a);
61
+ }, this.saveNewFavoriteClassification = async () => {
62
+ const i = this.newFavoriteClassificationName;
63
+ if (this.favoriteClassifications.some((s) => s.name === i)) {
64
+ this.hasDuplicatedClassificationError = !0;
65
+ return;
66
+ }
67
+ if (!i)
68
+ return;
69
+ const a = this.deleteNonEnabledAttributes(), t = { name: i, classification: a };
70
+ this.favoriteClassifications = [...this.favoriteClassifications, t], await this.uploadFavoriteClassificationValueHandle(this.messages.addClassificationFavoriteSuccessMessage ?? "Classification Favorite added successfully"), await this.retrieveFavoriteClassificationHandle(), this.showSaveClassificationDialog = !1;
71
+ }, this.updateFavoriteClassification = async () => {
72
+ if (!this.selectedFavoriteClassificationName) {
73
+ this.hasUpdateError = !0;
74
+ return;
75
+ }
76
+ await this.addFavoriteClassification(this.selectedFavoriteClassificationName), await this.retrieveFavoriteClassificationHandle();
77
+ }, this.deleteNonEnabledAttributes = () => {
78
+ const i = structuredClone(this.portalItem?.classification ?? {}), a = Object.fromEntries(Object.entries(i).filter(([t]) => (
79
+ // don't return attributes that are not enabled
80
+ this.attributeExpressionResults?.get(t)?.enabled !== !1
81
+ )));
82
+ return {
83
+ ...a,
84
+ ...h(this.portalItem, a)
85
+ };
86
+ }, this.addFavoriteClassification = async (i) => {
87
+ const a = this.deleteNonEnabledAttributes(), t = { name: i, classification: a }, s = this.favoriteClassifications.findIndex((l) => l.name === i);
88
+ s >= 0 ? this.favoriteClassifications[s].classification = a : this.favoriteClassifications = [...this.favoriteClassifications, t], await this.uploadFavoriteClassificationValueHandle(this.messages.updateClassificationFavoriteSuccessMessage ?? "Classification Favorite updated successfully");
89
+ }, this.removeFavoriteClassification = async (i) => {
90
+ 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();
91
+ }, this.newFavoriteClassificationName = "", this.showManageClassificationDialog = !1, this.showSaveClassificationDialog = !1, this.hasDuplicatedClassificationError = !1, this.hasUpdateError = !1, this.alertIndicator = {
92
+ alertIndicatorType: "danger",
93
+ alertIndicatorIcon: "exclamation-mark-triangle",
94
+ alertIndicatorInfo: ""
95
+ }, this.isNotificationModalActive = !1, this.favoriteClassifications = [], this.selectedFavoriteClassificationName = "", this.resetFavoriteClassification = () => {
96
+ }, this.updateClassificationData = () => {
97
+ }, this.renderFavoriteClassificationError = (i) => {
98
+ const { alertIndicatorType: a, alertIndicatorIcon: t, alertIndicatorInfo: s } = i;
99
+ 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>`;
100
+ };
101
+ }
102
+ static {
103
+ 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 };
104
+ }
105
+ static {
106
+ this.styles = m;
107
+ }
108
+ load() {
109
+ this.newFavoriteClassificationName = this.classificationValue?.banner ?? "";
110
+ }
111
+ onOpenFavoriteClassificationModal() {
112
+ this.newFavoriteClassificationName = this.classificationValue?.banner ?? "", this.showSaveClassificationDialog = !0;
113
+ }
114
+ getValidationMessage() {
115
+ return this.newFavoriteClassificationName ? this.hasDuplicatedClassificationError ? this.messages.duplicatedClassificationError : "" : this.messages.emptyFavoriteError;
116
+ }
117
+ render() {
118
+ 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>`;
119
+ }
120
+ }
121
+ c("arcgis-portal-classification-favorite", C);
122
+ export {
123
+ C as ArcgisPortalClassificationFavorite
124
+ };
@@ -0,0 +1,12 @@
1
+ import "@esri/calcite-components/components/calcite-alert";
2
+ import "@esri/calcite-components/components/calcite-label";
3
+ import "@esri/calcite-components/components/calcite-link";
4
+ import "@esri/calcite-components/components/calcite-combobox";
5
+ import "@esri/calcite-components/components/calcite-combobox-item";
6
+ import "@esri/calcite-components/components/calcite-dialog";
7
+ import "@esri/calcite-components/components/calcite-list";
8
+ import "@esri/calcite-components/components/calcite-list-item";
9
+ import "@esri/calcite-components/components/calcite-icon";
10
+ import "@esri/calcite-components/components/calcite-button";
11
+ import "@esri/calcite-components/components/calcite-input";
12
+ export * from "./customElement.js";
@@ -0,0 +1,12 @@
1
+ import "@esri/calcite-components/components/calcite-alert";
2
+ import "@esri/calcite-components/components/calcite-label";
3
+ import "@esri/calcite-components/components/calcite-link";
4
+ import "@esri/calcite-components/components/calcite-combobox";
5
+ import "@esri/calcite-components/components/calcite-combobox-item";
6
+ import "@esri/calcite-components/components/calcite-dialog";
7
+ import "@esri/calcite-components/components/calcite-list";
8
+ import "@esri/calcite-components/components/calcite-list-item";
9
+ import "@esri/calcite-components/components/calcite-icon";
10
+ import "@esri/calcite-components/components/calcite-button";
11
+ import "@esri/calcite-components/components/calcite-input";
12
+ export * from "./customElement.js";
@@ -0,0 +1,19 @@
1
+ /// <reference types="../../index.d.ts" />
2
+ import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
3
+ import { ClassificationSchema, AttributeExpressionResults } from '../../types/classification';
4
+ import { PropertyValues } from 'lit';
5
+
6
+ /**
7
+ * A web component that renders form elements for a classification schema attribute.
8
+ *
9
+ * @internal
10
+ */
11
+ export declare class ArcgisPortalClassificationFormElement extends LitElement {
12
+ attributeKey: string;
13
+ attribute: ClassificationSchema["attributes"][string];
14
+ value: unknown;
15
+ renderingInfo?: Pick<NonNullable<ReturnType<AttributeExpressionResults["get"]>>, "attributeValidationResult" | "valueExpressionResult">;
16
+ isRequiredErrors: Set<string>;
17
+ /** The attribute value has changed. */
18
+ readonly arcgisAttributeValueChange: TargetedEvent<this, Record<string, unknown>>;
19
+ }