@arcgis/portal-components 4.34.0-next.144

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