@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,347 @@
1
+ import * as I from "@arcgis/core/layers/support/fieldUtils.js";
2
+ import Q from "@arcgis/core/layers/support/FeatureReductionBinning.js";
3
+ import K from "@arcgis/core/layers/support/FeatureReductionCluster.js";
4
+ import * as T from "@arcgis/core/renderers/support/jsonUtils.js";
5
+ import v from "@arcgis/core/request.js";
6
+ import * as L from "@arcgis/core/core/sql.js";
7
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
9
+ v4.33.24 */
10
+ var b = /* @__PURE__ */ ((e) => (e.expression = "expression/", e.raster = "Raster.", e.relationship = "relationships/", e))(b || {});
11
+ function x(e) {
12
+ return e != null;
13
+ }
14
+ function ge(e, t) {
15
+ const r = e.fieldName;
16
+ if (r.includes(b.expression)) {
17
+ const i = t.get(r);
18
+ return i?.title ? i.title : r;
19
+ } else
20
+ return e.label ? e.label : r;
21
+ }
22
+ function ve(e, t, r) {
23
+ let i = "";
24
+ if (/^raster.(?:item|service)pixelvalue/iu.test(e))
25
+ i = "number";
26
+ else if (t.has(e)) {
27
+ const s = t.get(e);
28
+ i = s.type ? s.type.toLowerCase() : "";
29
+ } else if (r.has(e)) {
30
+ const s = r.get(e);
31
+ i = s.returnType ? s.returnType.toLowerCase() : "";
32
+ } else
33
+ i = "number";
34
+ return i;
35
+ }
36
+ async function Le(e) {
37
+ return new Map(
38
+ (await _(e)).filter((t) => t.visible).map((t) => [t.name, t])
39
+ );
40
+ }
41
+ function Oe(e) {
42
+ const t = /* @__PURE__ */ new Map();
43
+ return e?.expressionInfos && e.expressionInfos.forEach((r) => {
44
+ const i = `${b.expression}${r.name}`;
45
+ t.set(i, r);
46
+ }), t;
47
+ }
48
+ async function _(e) {
49
+ return await new Promise((t, r) => {
50
+ switch (e.type) {
51
+ case "feature":
52
+ case "ogc-feature":
53
+ case "stream":
54
+ t(e.fields);
55
+ break;
56
+ case "sublayer": {
57
+ const i = e, s = i?.layer;
58
+ s?.portalItem && s.url.includes("https://demographics") && s.url.includes(".arcgis.com") ? s.portalItem?.fetchData().then((n) => {
59
+ if (n?.thematicGroup) {
60
+ const a = new Map(
61
+ i.fields.map((l) => [l.name, l])
62
+ ), u = n.thematicGroup.fieldNames, c = [];
63
+ u.forEach((l) => {
64
+ a.has(l) && c.push(a.get(l));
65
+ }), t(c);
66
+ } else
67
+ t(i.fields);
68
+ }).catch((n) => {
69
+ r(new Error(n));
70
+ }) : t(i.fields);
71
+ break;
72
+ }
73
+ case "imagery":
74
+ case "imagery-tile":
75
+ case "wcs":
76
+ t(e.rasterFields);
77
+ break;
78
+ default:
79
+ t("fields" in e ? e.fields ?? [] : []);
80
+ }
81
+ });
82
+ }
83
+ const H = (e) => e && !e.endsWith("/") ? `${e}/` : e;
84
+ function O(e) {
85
+ return H(e.restUrl);
86
+ }
87
+ function P(e, t) {
88
+ return J(e, t) || z(e, t);
89
+ }
90
+ function J(e, t) {
91
+ return e.owner === t.username;
92
+ }
93
+ function z(e, t) {
94
+ const r = e.owner, i = e.itemControl === "admin", s = ["esri_livingatlas", "esri_demographics", "esri_boundaries"];
95
+ return e.portal?.isPortal && !J(e, t) && i && r?.includes("esri_") && // portal incorrectly returns "itemControl="admin" for esri owned items
96
+ !s.includes(r) ? !1 : i;
97
+ }
98
+ function X(e) {
99
+ return e.typeKeywords?.includes("Spatiotemporal");
100
+ }
101
+ function N(e) {
102
+ return e.typeKeywords?.includes("View Service");
103
+ }
104
+ function E(e) {
105
+ return e.typeKeywords?.includes("Hosted Service");
106
+ }
107
+ function V(e) {
108
+ return e.typeKeywords?.includes("Multi Services View");
109
+ }
110
+ function D(e) {
111
+ return e?.hasViews && !e.sourceSchemaChangesAllowed;
112
+ }
113
+ async function G(e) {
114
+ const t = e?.portalItem;
115
+ if (!t)
116
+ return await Promise.resolve(null);
117
+ const r = t.portal;
118
+ if (r?.user) {
119
+ const i = `${O(r)}community/users/${r.user.username}`;
120
+ return await v(i, {
121
+ query: {
122
+ f: "json",
123
+ token: t.portal.credential?.token
124
+ },
125
+ responseType: "json"
126
+ }).then(
127
+ async (s) => {
128
+ const n = s.data?.groups ?? [];
129
+ return await Promise.resolve(n);
130
+ },
131
+ async () => await Promise.reject(new Error("Failed to fetch user groups"))
132
+ );
133
+ }
134
+ return await Promise.resolve(null);
135
+ }
136
+ async function k(e) {
137
+ const t = e?.portalItem;
138
+ if (!t)
139
+ return await Promise.resolve(null);
140
+ const r = t.portal, i = `${O(r)}content/items/${t.id}/groups`;
141
+ return await v(i, {
142
+ query: {
143
+ f: "json",
144
+ token: t.portal.credential?.token
145
+ },
146
+ responseType: "json"
147
+ }).then(
148
+ async (s) => {
149
+ const n = s.data?.admin ?? [], a = s.data?.member ?? [], u = s.data?.other ?? [], c = [...n, ...a, ...u];
150
+ return await Promise.resolve(c);
151
+ },
152
+ async () => await Promise.reject(new Error("Failed to fetch item groups"))
153
+ );
154
+ }
155
+ async function j(e, t, { relationshipType: r, direction: i }) {
156
+ const s = `${O(t)}content/items/${e}/relatedItems`;
157
+ return await v(s, {
158
+ query: { f: "json", relationshipType: r, direction: i },
159
+ responseType: "json"
160
+ });
161
+ }
162
+ function A(e, t) {
163
+ return e?.some(
164
+ (r) => t?.some(
165
+ (i) => r.id === i.id && r.capabilities.includes("updateitemcontrol")
166
+ )
167
+ );
168
+ }
169
+ function o(e, t) {
170
+ return !e || !t ? !1 : e.toLocaleLowerCase() === t.toLocaleLowerCase();
171
+ }
172
+ async function be(e) {
173
+ const t = ["feature", "oriented-imagery"].includes(e.type), r = e?.portalItem, i = e.sourceJSON;
174
+ if (!t || !r)
175
+ return !1;
176
+ const s = r.portal;
177
+ if (!s?.user || N(r) || !E(r) || V(r) || D(i))
178
+ return !1;
179
+ const l = P(r, s.user), w = await G(e) ?? [], F = await k(e) ?? [], f = A(w, F);
180
+ if (!l && !f)
181
+ return !1;
182
+ const m = await j(r.id, s, {
183
+ relationshipType: "Service2Service"
184
+ });
185
+ return !(m?.data?.relatedItems && m.data.relatedItems.some(
186
+ (S) => ["WMTS", "Map Service", "Vector Tile Service"].includes(S.type)
187
+ ));
188
+ }
189
+ async function Re(e, t, r, i) {
190
+ if (!r)
191
+ return !1;
192
+ const s = ["feature", "oriented-imagery"].includes(t.type), n = i?.item ?? t.portalItem, a = t.sourceJSON;
193
+ if (!s || !n || !n.portal.user || !E(n) || N(n) || V(n) || D(a) || n.portal.isPortal && X(n) || ["oid", "global-id", "geometry"].includes(r.type))
194
+ return !1;
195
+ const m = t.sourceJSON.geometryProperties, y = m?.shapeLengthFieldName, S = m?.shapeAreaFieldName;
196
+ if (o(y, r.name) || o(S, r.name))
197
+ return !1;
198
+ const g = t.editFieldsInfo;
199
+ if (g && (o(g.creationDateField, r.name) || o(g.creatorField, r.name) || o(g.editDateField, r.name) || o(g.editorField, r.name)) || o(t.objectIdField, r.name) || o(t.displayField, r.name) || o(t.typeIdField, r.name) || o(t.subtypeField, r.name) || t.timeInfo && (o(t.timeInfo.startField, r.name) || o(t.timeInfo.endField, r.name) || o(t.timeInfo.trackIdField, r.name)))
200
+ return !1;
201
+ if (!i?.ignoreLayerRenderer && t.featureReduction) {
202
+ const d = /* @__PURE__ */ new Set();
203
+ if (await I.collectFeatureReductionFields(
204
+ d,
205
+ t,
206
+ t.featureReduction
207
+ ), Array.from(d).some(
208
+ (h) => o(h, r.name)
209
+ ))
210
+ return !1;
211
+ }
212
+ if (!i?.ignoreLayerRenderer && (await I.getRendererFields(t.renderer, t.fieldsIndex)).some((h) => o(h, r.name)))
213
+ return !1;
214
+ if (!i?.ignoreLayerLabelingInfo) {
215
+ const d = t.labelingInfo?.map(
216
+ (p) => p.labelExpressionInfo?.expression
217
+ );
218
+ if (d && ((await I.getExpressionFields(t, d)).some((q) => o(q, r.name)) || await U(t, r, "layer")))
219
+ return !1;
220
+ }
221
+ if (!i?.ignoreLayerDefinitionExpression && t.definitionExpression && (await L.parseWhereClause(t.definitionExpression, t.fieldsIndex)).fieldNames.some((h) => o(h, r.name)) || await Z(t, r, i) || await ee(t, r))
222
+ return !1;
223
+ if (await te(t, r))
224
+ return await Promise.resolve(!1);
225
+ if (await re(t, r))
226
+ return await Promise.resolve(!1);
227
+ if (Y(e, t, r) || t.relationships?.map((d) => d.keyField)?.some((d) => o(d, r.name)))
228
+ return !1;
229
+ const C = P(n, n.portal.user), $ = i?.userItemInfo?.userGroups ?? await G(t) ?? [], W = i?.userItemInfo?.itemGroups ?? await k(t) ?? [], B = A($, W);
230
+ if (!C && !B)
231
+ return !1;
232
+ const R = i?.userItemInfo?.relatedItems ?? await j(n.id, n.portal, {
233
+ relationshipType: "Service2Service"
234
+ });
235
+ return !(R?.data?.relatedItems && R.data.relatedItems.some(
236
+ (p) => ["WMTS", "Map Service", "Vector Tile Service"].includes(p.type)
237
+ ));
238
+ }
239
+ function Y(e, t, r) {
240
+ if (!e)
241
+ return !1;
242
+ const i = e.map?.applicationProperties?.viewing?.search;
243
+ if (i) {
244
+ const s = i.layers?.find((n) => n.id === t.id);
245
+ if (s) {
246
+ const n = s?.field?.name;
247
+ if (n)
248
+ return o(n, r.name);
249
+ }
250
+ }
251
+ return !1;
252
+ }
253
+ async function U(e, t, r) {
254
+ const i = r === "layer" ? e.labelingInfo?.filter((a) => x(a.where)) : e.sourceJSON?.drawingInfo?.labelingInfo?.filter((a) => x(a.where));
255
+ if (!i?.length)
256
+ return !1;
257
+ const s = [
258
+ ...await Promise.all(
259
+ i.map(
260
+ async (a) => await L.parseWhereClause(a.where, e.fieldsIndex)
261
+ )
262
+ )
263
+ ];
264
+ let n = !1;
265
+ for (let a = 0; a < s.length; a++) {
266
+ const u = s[a].fieldNames?.some((c) => o(c, t.name));
267
+ if (!n && u) {
268
+ n = !0;
269
+ break;
270
+ }
271
+ }
272
+ return await Promise.resolve(n);
273
+ }
274
+ async function Z(e, t, r) {
275
+ const i = e.portalItem;
276
+ if (!i)
277
+ return !1;
278
+ const s = `${O(i.portal)}content/items/${i.id}/data`, a = (r?.userItemInfo?.itemData ?? await v(s, {
279
+ query: { f: "json" },
280
+ responseType: "json"
281
+ }))?.data;
282
+ if (!a)
283
+ return !1;
284
+ if (a?.layers) {
285
+ const c = a.layers.find((f) => f.id === e.layerId), l = c?.layerDefinition?.drawingInfo?.renderer, w = c?.layerDefinition?.featureReduction, F = c?.layerDefinition?.definitionExpression;
286
+ if (!l && !w && !F)
287
+ return !1;
288
+ if (!r?.ignoreItemRenderer && l) {
289
+ const f = T.fromJSON(l);
290
+ if ((await I.getRendererFields(f, e.fieldsIndex)).some((S) => o(S, t.name)))
291
+ return !0;
292
+ }
293
+ if (!r?.ignoreItemFeatureReduction && w && await M(e, t, w) || F && (await L.parseWhereClause(F, e.fieldsIndex)).fieldNames.some((y) => o(y, t.name)))
294
+ return !0;
295
+ }
296
+ return !1;
297
+ }
298
+ async function ee(e, t) {
299
+ const r = e.sourceJSON, i = r?.drawingInfo?.renderer, s = r?.featureReduction;
300
+ if (!i && !s)
301
+ return !1;
302
+ if (i) {
303
+ const n = T.fromJSON(i);
304
+ if ((await I.getRendererFields(n, e.fieldsIndex)).some((c) => o(c, t.name)))
305
+ return !0;
306
+ }
307
+ return !!(s && await M(
308
+ e,
309
+ t,
310
+ s
311
+ ));
312
+ }
313
+ async function te(e, t) {
314
+ const i = e.sourceJSON?.drawingInfo?.labelingInfo;
315
+ if (!i)
316
+ return await Promise.resolve(!1);
317
+ const s = i?.map(
318
+ (n) => n.labelExpressionInfo?.expression
319
+ );
320
+ if (s) {
321
+ if ((await I.getExpressionFields(e, s)).some((c) => o(c, t.name)))
322
+ return await Promise.resolve(!0);
323
+ if (await U(e, t, "service"))
324
+ return await Promise.resolve(!0);
325
+ }
326
+ return await Promise.resolve(!1);
327
+ }
328
+ async function re(e, t) {
329
+ const i = e.sourceJSON?.definitionQuery;
330
+ return i ? (await L.parseWhereClause(i, e.fieldsIndex)).fieldNames.some((a) => o(a, t.name)) ? await Promise.resolve(!0) : await Promise.resolve(!1) : await Promise.resolve(!1);
331
+ }
332
+ async function M(e, t, r) {
333
+ const i = r.type === "binning" ? Q.fromJSON(r) : K.fromJSON(r), s = /* @__PURE__ */ new Set();
334
+ return await I.collectFeatureReductionFields(s, e, i), !!Array.from(s).some(
335
+ (a) => o(a, t.name)
336
+ );
337
+ }
338
+ export {
339
+ Re as a,
340
+ Oe as b,
341
+ be as c,
342
+ ge as d,
343
+ O as e,
344
+ ve as f,
345
+ Le as g,
346
+ x as i
347
+ };
@@ -0,0 +1,115 @@
1
+ import d from "@arcgis/core/core/Accessor.js";
2
+ import { property as n, subclass as p } from "@arcgis/core/core/accessorSupport/decorators.js";
3
+ import { a as m, v as u } from "./requests.js";
4
+ import { Deferred as h } from "@arcgis/components-utils";
5
+ import { makeAccessorController as C } from "@arcgis/lumina/controllers/accessor";
6
+ import { Task as v } from "@lit/task";
7
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
9
+ v4.33.24 */
10
+ var w = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (i, a, s, t) => {
11
+ for (var r = t > 1 ? void 0 : t ? g(a, s) : a, l = i.length - 1, c; l >= 0; l--)
12
+ (c = i[l]) && (r = (t ? c(a, s, r) : c(r)) || r);
13
+ return t && r && w(a, s, r), r;
14
+ };
15
+ let o = class extends d {
16
+ constructor() {
17
+ super(...arguments), this.fetching = !1, this.status = "idle", this.error = void 0, this.portalUrl = void 0, this._itemClassificationValidationErrors = /* @__PURE__ */ new Map(), this.fetchingPromise = new h();
18
+ }
19
+ // #endregion
20
+ // #region Accessors
21
+ /**
22
+ * The primary attribute of the classification schema metadata.
23
+ */
24
+ get primaryAttribute() {
25
+ return this.portalClassificationSchema?.classificationMetadata.primaryAttribute;
26
+ }
27
+ // #endregion
28
+ // #region Methods
29
+ /**
30
+ * Sets the portal classification schema and updates the portal URL.
31
+ */
32
+ setPortalClassificationData({
33
+ portalUrl: i,
34
+ schema: a
35
+ }) {
36
+ this.portalUrl = i, this.portalClassificationSchema = a, this.status = "loaded", this.fetchingPromise.resolve(!0);
37
+ }
38
+ /**
39
+ * Sets the fetching state.
40
+ */
41
+ setFetching(i) {
42
+ this.fetching = i;
43
+ }
44
+ /**
45
+ * Loads and sets the classification schema from the portal.
46
+ */
47
+ async loadPortalClassificationData(i, { signal: a }) {
48
+ this.status = "loading";
49
+ const { result: s, error: t } = await m(i, a);
50
+ if (t) {
51
+ t.name === "AbortError" ? console.log("Request aborted.") : (this.error = t, this.status = "error", this.fetchingPromise.reject(t));
52
+ return;
53
+ } else
54
+ this.setPortalClassificationData({ schema: s, portalUrl: i });
55
+ }
56
+ async validateClassification(i, a, s, t) {
57
+ if (!a)
58
+ return "";
59
+ const r = i ? this._itemClassificationValidationErrors.get(i) : void 0;
60
+ if (r)
61
+ return await r;
62
+ const l = (async () => {
63
+ const { error: c } = await u(s, a, t ?? {});
64
+ return c ? c?.details.raw.messages.join(", ") : "";
65
+ })();
66
+ return i && this._itemClassificationValidationErrors.set(i, l), i ? await this._itemClassificationValidationErrors.get(i) : await l;
67
+ }
68
+ // #endregion
69
+ };
70
+ e([
71
+ n()
72
+ ], o.prototype, "portalClassificationSchema", 2);
73
+ e([
74
+ n()
75
+ ], o.prototype, "fetching", 2);
76
+ e([
77
+ n()
78
+ ], o.prototype, "status", 2);
79
+ e([
80
+ n()
81
+ ], o.prototype, "error", 2);
82
+ e([
83
+ n()
84
+ ], o.prototype, "portalUrl", 2);
85
+ e([
86
+ n()
87
+ ], o.prototype, "_itemClassificationValidationErrors", 2);
88
+ o = e([
89
+ p("custom.ClassificationModel")
90
+ ], o);
91
+ let f;
92
+ function P(i) {
93
+ return f ??= new o(i), f;
94
+ }
95
+ const A = C(P), S = (i) => new v(i, {
96
+ task: async ([a], { signal: s }) => {
97
+ if (!a)
98
+ throw new Error("Portal item is required to load classification data");
99
+ if (a.loaded || await a.load({ signal: s }), i.itemClassification = a.classification, i.classificationModel.status === "loading" && await i.classificationModel.fetchingPromise.promise, !i.portalItem?.portal.hasClassificationSchema) {
100
+ i.classificationModel.setPortalClassificationData({
101
+ portalUrl: a.portal.restUrl,
102
+ schema: void 0
103
+ });
104
+ return;
105
+ }
106
+ // Only fetch if the data has not been fetched
107
+ (i.classificationModel.status === "idle" || // or if the portal url changes
108
+ i.classificationModel.status === "loaded" && i.classificationModel.portalUrl !== a.portal.restUrl) && await i.classificationModel.loadPortalClassificationData(a.portal.restUrl, { signal: s });
109
+ },
110
+ args: () => [i.portalItem]
111
+ });
112
+ export {
113
+ S as c,
114
+ A as u
115
+ };
@@ -0,0 +1,71 @@
1
+ import n from "@arcgis/core/request.js";
2
+ import { once as c } from "@arcgis/core/core/reactiveUtils.js";
3
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
5
+ v4.33.24 */
6
+ async function f(s, t) {
7
+ const i = `${s}/portals/self/classification/classificationSchema`, e = {};
8
+ try {
9
+ const a = (await n(i, { query: { f: "json" }, signal: t })).data;
10
+ if (typeof a == "object" && a !== null && "classificationSchema" in a)
11
+ e.result = a.classificationSchema;
12
+ else
13
+ throw new Error("Invalid response format received from the classification schema endpoint");
14
+ } catch (r) {
15
+ e.error = r;
16
+ }
17
+ return e;
18
+ }
19
+ async function d(s, t, i) {
20
+ const e = `${s}/portals/self/classification/validateClassification`, r = { classificationValue: JSON.stringify(t), f: "json" }, a = {};
21
+ try {
22
+ const o = await n(e, { query: r, method: "post", signal: i.signal });
23
+ a.result = o.data;
24
+ } catch (o) {
25
+ console.error(o), a.error = o;
26
+ }
27
+ return a;
28
+ }
29
+ async function y(s) {
30
+ if (!s)
31
+ return;
32
+ s.loaded || await s.load();
33
+ const t = s.portal.user ?? await c(() => s?.portal.user);
34
+ if (!t)
35
+ return;
36
+ const i = `${s.portal.restUrl}/community/users/${t.username}/resources/classification_favorites`, e = {};
37
+ try {
38
+ const r = await n(i, { query: { f: "json" } });
39
+ e.result = r.data;
40
+ } catch (r) {
41
+ console.error(r), e.error = r;
42
+ }
43
+ return e;
44
+ }
45
+ async function v(s, t) {
46
+ if (!s)
47
+ return;
48
+ s.loaded || await s.load();
49
+ const i = s.portal.user ?? await c(() => s?.portal.user);
50
+ if (!i)
51
+ return;
52
+ const e = `${s.portal.restUrl}/community/users/${i.username}/addResource`, r = {}, a = {
53
+ f: "json",
54
+ key: "classification_favorites",
55
+ text: JSON.stringify({ favorites: t }),
56
+ access: "UserPrivateAllApps"
57
+ };
58
+ try {
59
+ const o = await n(e, { query: a, method: "post" });
60
+ r.result = o.data.success;
61
+ } catch (o) {
62
+ console.error("error: ", o), r.error = o;
63
+ }
64
+ return r;
65
+ }
66
+ export {
67
+ f as a,
68
+ y as r,
69
+ v as u,
70
+ d as v
71
+ };
@@ -0,0 +1,16 @@
1
+ import { makeRuntime as e } from "@arcgis/lumina";
2
+ import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
3
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
5
+ v4.33.24 */
6
+ const t = e({ defaultAssetPath: "https://js.arcgis.com/4.33/portal-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: i, setAssetPath: d } = t;
7
+ t.t = s;
8
+ t.o = r;
9
+ t.c = a;
10
+ t.r = c;
11
+ export {
12
+ n as c,
13
+ i as g,
14
+ t as r,
15
+ d as s
16
+ };
@@ -0,0 +1,9 @@
1
+ import { makeT9nController as o } from "@arcgis/lumina/controllers";
2
+ import { g as t } from "./runtime.js";
3
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
4
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
5
+ v4.33.24 */
6
+ const s = o(t);
7
+ export {
8
+ s as u
9
+ };
@@ -0,0 +1,36 @@
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 { Use } from '@arcgis/lumina/controllers';
5
+ import { useClassificationModel } from '../../controllers/useClassificationModel';
6
+ import { PropertyValues } from 'lit';
7
+
8
+ /** @internal The new portal components now includes `<arcgis-portal-classification-banner/>`. */
9
+ export declare class ArcgisPortalClassificationBanner extends LitElement {
10
+ /** The portal item to display the classification banner for. */
11
+ portalItem?: __esri.PortalItem;
12
+ /**
13
+ *
14
+ * If the portal item has a classification previously
15
+ *
16
+ * @default false
17
+ */
18
+ missingExistingClassification: boolean;
19
+ /**
20
+ * The size of the banner to display.
21
+ *
22
+ * - `"full"`: Used when the banner is displayed at the top and bottom of a page. This is the default mode cached for performance.
23
+ * - `"preview"`: Used when the banner is rendered inside a configuration component. This mode is not cached and is used to display a preview of the classification.
24
+ *
25
+ * @default "full"
26
+ */
27
+ variant: "full" | "preview";
28
+ /**
29
+ * The classification validation error - validate the classification value against the classification schema.
30
+ *
31
+ * @default ""
32
+ */
33
+ validationErrors: string;
34
+ /** Permanently destroy the component */
35
+ destroy(): Promise<void>;
36
+ }
@@ -0,0 +1,63 @@
1
+ import { c as e } from "../../chunks/runtime.js";
2
+ import { LitElement as r, safeStyleMap as l } from "@arcgis/lumina";
3
+ import { u as c, c as n } from "../../chunks/loadClassificationData.js";
4
+ import { u as f } from "../../chunks/useT9n.js";
5
+ import { css as d } from "@lit/reactive-element/css-tag.js";
6
+ import { html as t } from "lit";
7
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
8
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
9
+ v4.33.24 */
10
+ const m = d`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-ui-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`;
11
+ class h extends r {
12
+ constructor() {
13
+ super(...arguments), this.classificationModel = c(this), this.messages = f(), this._classificationDataTask = n(this), this.portalClassificationSchema = this.classificationModel.portalClassificationSchema, this.status = this.classificationModel.status, this.missingExistingClassification = !1, this.variant = "full", this.autoDestroyDisabled = !1, this.validationErrors = "";
14
+ }
15
+ static {
16
+ this.properties = { portalClassificationSchema: 16, status: 16, itemClassification: 16, portalItem: 0, missingExistingClassification: 5, variant: 1, autoDestroyDisabled: 5, validationErrors: 1 };
17
+ }
18
+ static {
19
+ this.styles = m;
20
+ }
21
+ async destroy() {
22
+ await this.manager.destroy();
23
+ }
24
+ willUpdate(a) {
25
+ if (a.has("portalItem")) {
26
+ const { portalItem: i } = this;
27
+ i?.load().then(() => {
28
+ i?.id && i?.loaded && i?.classification && !this.missingExistingClassification ? this.classificationModel.validateClassification(
29
+ /** don't utilize the cache if preview */
30
+ this.variant === "preview" ? null : i.id,
31
+ i.classification,
32
+ i?.portal.restUrl
33
+ ).catch(console.error).then((s) => {
34
+ this.validationErrors = s ?? "";
35
+ }) : this.validationErrors = "";
36
+ }).catch(console.error);
37
+ }
38
+ }
39
+ getStyle() {
40
+ const a = {};
41
+ if (this.variant === "preview" && (a.fontSize = "var(--calcite-font-size-sm)", a.padding = "var(--calcite-spacing-xs)"), this.itemClassification && this.portalClassificationSchema) {
42
+ const i = this.itemClassification.classification, s = this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({ value: o }) => o === i);
43
+ s?.backgroundColor && (a.backgroundColor = s.backgroundColor), s?.textColor && (a.color = s.textColor);
44
+ }
45
+ return a;
46
+ }
47
+ render() {
48
+ return this._classificationDataTask.render({
49
+ /** Do not render anything while fetching */
50
+ pending: void 0,
51
+ /** Do not render anything if there is an error, TODO: confirm error handling case */
52
+ error: void 0,
53
+ complete: () => (
54
+ /** Only render the banner if the portal has a classification schema and it's accessed not anonymously */
55
+ this.portalClassificationSchema && this.portalItem?.portal.authMode !== "anonymous" ? this.validationErrors && this.variant === "full" ? t`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>` : t`<div class="banner" style=${l(this.getStyle())}>${this.itemClassification?.banner ?? this.messages.notyetclassified ?? "Not yet classified"}</div>` : ""
56
+ )
57
+ });
58
+ }
59
+ }
60
+ e("arcgis-portal-classification-banner", h);
61
+ export {
62
+ h as ArcgisPortalClassificationBanner
63
+ };
@@ -0,0 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-icon";
2
+ export * from "./customElement.js";
@@ -0,0 +1,2 @@
1
+ import "@esri/calcite-components/components/calcite-icon";
2
+ export * from "./customElement.js";