@esri/solutions-components 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +16 -6
  2. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js.map +1 -1
  3. package/dist/cjs/solution-configuration.cjs.entry.js +1095 -4
  4. package/dist/cjs/solution-configuration.cjs.entry.js.map +1 -1
  5. package/dist/cjs/solution-contents_3.cjs.entry.js +3 -1
  6. package/dist/cjs/solution-contents_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/{solution-store-f0547fe7.js → solution-store-893499a5.js} +8 -1
  8. package/dist/cjs/solution-store-893499a5.js.map +1 -0
  9. package/dist/collection/components/solution-configuration/solution-configuration.js +14 -11
  10. package/dist/collection/components/solution-configuration/solution-configuration.js.map +1 -1
  11. package/dist/collection/components/solution-item/solution-item.js +2 -0
  12. package/dist/collection/components/solution-item/solution-item.js.map +1 -1
  13. package/dist/collection/components/solution-item-details/solution-item-details.js +15 -5
  14. package/dist/collection/components/solution-item-details/solution-item-details.js.map +1 -1
  15. package/dist/collection/utils/solution-store.js +2 -0
  16. package/dist/collection/utils/solution-store.js.map +1 -1
  17. package/dist/collection/utils/solution-store.ts +2 -0
  18. package/dist/esm/calcite-shell-panel_14.entry.js +16 -6
  19. package/dist/esm/calcite-shell-panel_14.entry.js.map +1 -1
  20. package/dist/esm/solution-configuration.entry.js +1095 -4
  21. package/dist/esm/solution-configuration.entry.js.map +1 -1
  22. package/dist/esm/solution-contents_3.entry.js +3 -1
  23. package/dist/esm/solution-contents_3.entry.js.map +1 -1
  24. package/dist/esm/{solution-store-c1f6173a.js → solution-store-0c58c852.js} +4 -2
  25. package/dist/esm/solution-store-0c58c852.js.map +1 -0
  26. package/dist/solutions-components/{p-065830b8.js → p-659edb14.js} +4 -2
  27. package/dist/solutions-components/p-659edb14.js.map +1 -0
  28. package/dist/solutions-components/{p-ee9be0ef.entry.js → p-77c75f3a.entry.js} +4 -2
  29. package/dist/solutions-components/p-77c75f3a.entry.js.map +1 -0
  30. package/dist/solutions-components/p-90629c1d.entry.js +1986 -0
  31. package/dist/solutions-components/p-90629c1d.entry.js.map +1 -0
  32. package/dist/solutions-components/{p-0e7a0839.entry.js → p-984cb687.entry.js} +17 -7
  33. package/dist/solutions-components/p-984cb687.entry.js.map +1 -0
  34. package/dist/solutions-components/solutions-components.esm.js +1 -1
  35. package/dist/solutions-components/utils/solution-store.ts +2 -0
  36. package/dist/solutions-components_commit.txt +9 -7
  37. package/dist/types/components/solution-item-details/solution-item-details.d.ts +2 -1
  38. package/package.json +1 -1
  39. package/dist/cjs/solution-store-f0547fe7.js.map +0 -1
  40. package/dist/components/ExpandToggle.js +0 -112
  41. package/dist/components/ExpandToggle.js.map +0 -1
  42. package/dist/components/Heading.js +0 -24
  43. package/dist/components/Heading.js.map +0 -1
  44. package/dist/components/_commonjsHelpers.js +0 -24
  45. package/dist/components/_commonjsHelpers.js.map +0 -1
  46. package/dist/components/action-bar.js +0 -278
  47. package/dist/components/action-bar.js.map +0 -1
  48. package/dist/components/action-group.js +0 -151
  49. package/dist/components/action-group.js.map +0 -1
  50. package/dist/components/action-menu.js +0 -358
  51. package/dist/components/action-menu.js.map +0 -1
  52. package/dist/components/action.js +0 -216
  53. package/dist/components/action.js.map +0 -1
  54. package/dist/components/array.js +0 -17
  55. package/dist/components/array.js.map +0 -1
  56. package/dist/components/buffer-tools.d.ts +0 -11
  57. package/dist/components/buffer-tools.js +0 -13
  58. package/dist/components/buffer-tools.js.map +0 -1
  59. package/dist/components/buffer-tools2.js +0 -256
  60. package/dist/components/buffer-tools2.js.map +0 -1
  61. package/dist/components/button.js +0 -265
  62. package/dist/components/button.js.map +0 -1
  63. package/dist/components/calcite-accordion-item.js +0 -246
  64. package/dist/components/calcite-accordion-item.js.map +0 -1
  65. package/dist/components/calcite-accordion.js +0 -182
  66. package/dist/components/calcite-accordion.js.map +0 -1
  67. package/dist/components/calcite-action-bar.js +0 -13
  68. package/dist/components/calcite-action-bar.js.map +0 -1
  69. package/dist/components/calcite-action-group.js +0 -13
  70. package/dist/components/calcite-action-group.js.map +0 -1
  71. package/dist/components/calcite-action-menu.js +0 -13
  72. package/dist/components/calcite-action-menu.js.map +0 -1
  73. package/dist/components/calcite-action-pad.js +0 -199
  74. package/dist/components/calcite-action-pad.js.map +0 -1
  75. package/dist/components/calcite-action.js +0 -13
  76. package/dist/components/calcite-action.js.map +0 -1
  77. package/dist/components/calcite-alert.js +0 -299
  78. package/dist/components/calcite-alert.js.map +0 -1
  79. package/dist/components/calcite-avatar.js +0 -184
  80. package/dist/components/calcite-avatar.js.map +0 -1
  81. package/dist/components/calcite-block-section.js +0 -157
  82. package/dist/components/calcite-block-section.js.map +0 -1
  83. package/dist/components/calcite-block.js +0 -277
  84. package/dist/components/calcite-block.js.map +0 -1
  85. package/dist/components/calcite-button.js +0 -13
  86. package/dist/components/calcite-button.js.map +0 -1
  87. package/dist/components/calcite-card.js +0 -189
  88. package/dist/components/calcite-card.js.map +0 -1
  89. package/dist/components/calcite-checkbox.js +0 -13
  90. package/dist/components/calcite-checkbox.js.map +0 -1
  91. package/dist/components/calcite-chip.js +0 -13
  92. package/dist/components/calcite-chip.js.map +0 -1
  93. package/dist/components/calcite-color-picker-hex-input.js +0 -13
  94. package/dist/components/calcite-color-picker-hex-input.js.map +0 -1
  95. package/dist/components/calcite-color-picker-swatch.js +0 -13
  96. package/dist/components/calcite-color-picker-swatch.js.map +0 -1
  97. package/dist/components/calcite-color-picker.js +0 -1038
  98. package/dist/components/calcite-color-picker.js.map +0 -1
  99. package/dist/components/calcite-combobox-item-group.js +0 -77
  100. package/dist/components/calcite-combobox-item-group.js.map +0 -1
  101. package/dist/components/calcite-combobox-item.js +0 -13
  102. package/dist/components/calcite-combobox-item.js.map +0 -1
  103. package/dist/components/calcite-combobox.js +0 -13
  104. package/dist/components/calcite-combobox.js.map +0 -1
  105. package/dist/components/calcite-date-picker-day.js +0 -13
  106. package/dist/components/calcite-date-picker-day.js.map +0 -1
  107. package/dist/components/calcite-date-picker-month-header.js +0 -13
  108. package/dist/components/calcite-date-picker-month-header.js.map +0 -1
  109. package/dist/components/calcite-date-picker-month.js +0 -13
  110. package/dist/components/calcite-date-picker-month.js.map +0 -1
  111. package/dist/components/calcite-date-picker.js +0 -13
  112. package/dist/components/calcite-date-picker.js.map +0 -1
  113. package/dist/components/calcite-dropdown-group.js +0 -101
  114. package/dist/components/calcite-dropdown-group.js.map +0 -1
  115. package/dist/components/calcite-dropdown-item.js +0 -237
  116. package/dist/components/calcite-dropdown-item.js.map +0 -1
  117. package/dist/components/calcite-dropdown.js +0 -13
  118. package/dist/components/calcite-dropdown.js.map +0 -1
  119. package/dist/components/calcite-fab.js +0 -146
  120. package/dist/components/calcite-fab.js.map +0 -1
  121. package/dist/components/calcite-filter.js +0 -197
  122. package/dist/components/calcite-filter.js.map +0 -1
  123. package/dist/components/calcite-flow-item.js +0 -245
  124. package/dist/components/calcite-flow-item.js.map +0 -1
  125. package/dist/components/calcite-flow.js +0 -149
  126. package/dist/components/calcite-flow.js.map +0 -1
  127. package/dist/components/calcite-graph.js +0 -13
  128. package/dist/components/calcite-graph.js.map +0 -1
  129. package/dist/components/calcite-handle.js +0 -13
  130. package/dist/components/calcite-handle.js.map +0 -1
  131. package/dist/components/calcite-icon.js +0 -13
  132. package/dist/components/calcite-icon.js.map +0 -1
  133. package/dist/components/calcite-inline-editable.js +0 -296
  134. package/dist/components/calcite-inline-editable.js.map +0 -1
  135. package/dist/components/calcite-input-date-picker.js +0 -715
  136. package/dist/components/calcite-input-date-picker.js.map +0 -1
  137. package/dist/components/calcite-input-message.js +0 -13
  138. package/dist/components/calcite-input-message.js.map +0 -1
  139. package/dist/components/calcite-input-number.js +0 -639
  140. package/dist/components/calcite-input-number.js.map +0 -1
  141. package/dist/components/calcite-input-text.js +0 -402
  142. package/dist/components/calcite-input-text.js.map +0 -1
  143. package/dist/components/calcite-input-time-picker.js +0 -436
  144. package/dist/components/calcite-input-time-picker.js.map +0 -1
  145. package/dist/components/calcite-input.js +0 -13
  146. package/dist/components/calcite-input.js.map +0 -1
  147. package/dist/components/calcite-label.js +0 -13
  148. package/dist/components/calcite-label.js.map +0 -1
  149. package/dist/components/calcite-link.js +0 -13
  150. package/dist/components/calcite-link.js.map +0 -1
  151. package/dist/components/calcite-list-item-group.js +0 -67
  152. package/dist/components/calcite-list-item-group.js.map +0 -1
  153. package/dist/components/calcite-list-item.js +0 -13
  154. package/dist/components/calcite-list-item.js.map +0 -1
  155. package/dist/components/calcite-list.js +0 -13
  156. package/dist/components/calcite-list.js.map +0 -1
  157. package/dist/components/calcite-loader.js +0 -13
  158. package/dist/components/calcite-loader.js.map +0 -1
  159. package/dist/components/calcite-modal.js +0 -500
  160. package/dist/components/calcite-modal.js.map +0 -1
  161. package/dist/components/calcite-notice.js +0 -13
  162. package/dist/components/calcite-notice.js.map +0 -1
  163. package/dist/components/calcite-option-group.js +0 -66
  164. package/dist/components/calcite-option-group.js.map +0 -1
  165. package/dist/components/calcite-option.js +0 -13
  166. package/dist/components/calcite-option.js.map +0 -1
  167. package/dist/components/calcite-pagination.js +0 -260
  168. package/dist/components/calcite-pagination.js.map +0 -1
  169. package/dist/components/calcite-panel.js +0 -13
  170. package/dist/components/calcite-panel.js.map +0 -1
  171. package/dist/components/calcite-pick-list-group.js +0 -76
  172. package/dist/components/calcite-pick-list-group.js.map +0 -1
  173. package/dist/components/calcite-pick-list-item.js +0 -13
  174. package/dist/components/calcite-pick-list-item.js.map +0 -1
  175. package/dist/components/calcite-pick-list.js +0 -175
  176. package/dist/components/calcite-pick-list.js.map +0 -1
  177. package/dist/components/calcite-popover-manager.js +0 -96
  178. package/dist/components/calcite-popover-manager.js.map +0 -1
  179. package/dist/components/calcite-popover.js +0 -13
  180. package/dist/components/calcite-popover.js.map +0 -1
  181. package/dist/components/calcite-progress.js +0 -13
  182. package/dist/components/calcite-progress.js.map +0 -1
  183. package/dist/components/calcite-radio-button-group.js +0 -134
  184. package/dist/components/calcite-radio-button-group.js.map +0 -1
  185. package/dist/components/calcite-radio-button.js +0 -312
  186. package/dist/components/calcite-radio-button.js.map +0 -1
  187. package/dist/components/calcite-radio-group-item.js +0 -13
  188. package/dist/components/calcite-radio-group-item.js.map +0 -1
  189. package/dist/components/calcite-radio-group.js +0 -13
  190. package/dist/components/calcite-radio-group.js.map +0 -1
  191. package/dist/components/calcite-rating.js +0 -203
  192. package/dist/components/calcite-rating.js.map +0 -1
  193. package/dist/components/calcite-scrim.js +0 -13
  194. package/dist/components/calcite-scrim.js.map +0 -1
  195. package/dist/components/calcite-select.js +0 -13
  196. package/dist/components/calcite-select.js.map +0 -1
  197. package/dist/components/calcite-shell-center-row.js +0 -102
  198. package/dist/components/calcite-shell-center-row.js.map +0 -1
  199. package/dist/components/calcite-shell-panel.js +0 -13
  200. package/dist/components/calcite-shell-panel.js.map +0 -1
  201. package/dist/components/calcite-shell.js +0 -13
  202. package/dist/components/calcite-shell.js.map +0 -1
  203. package/dist/components/calcite-slider.js +0 -13
  204. package/dist/components/calcite-slider.js.map +0 -1
  205. package/dist/components/calcite-sortable-list.js +0 -204
  206. package/dist/components/calcite-sortable-list.js.map +0 -1
  207. package/dist/components/calcite-split-button.js +0 -170
  208. package/dist/components/calcite-split-button.js.map +0 -1
  209. package/dist/components/calcite-stepper-item.js +0 -273
  210. package/dist/components/calcite-stepper-item.js.map +0 -1
  211. package/dist/components/calcite-stepper.js +0 -258
  212. package/dist/components/calcite-stepper.js.map +0 -1
  213. package/dist/components/calcite-switch.js +0 -13
  214. package/dist/components/calcite-switch.js.map +0 -1
  215. package/dist/components/calcite-tab-nav.js +0 -13
  216. package/dist/components/calcite-tab-nav.js.map +0 -1
  217. package/dist/components/calcite-tab-title.js +0 -13
  218. package/dist/components/calcite-tab-title.js.map +0 -1
  219. package/dist/components/calcite-tab.js +0 -13
  220. package/dist/components/calcite-tab.js.map +0 -1
  221. package/dist/components/calcite-tabs.js +0 -13
  222. package/dist/components/calcite-tabs.js.map +0 -1
  223. package/dist/components/calcite-tile-select-group.js +0 -67
  224. package/dist/components/calcite-tile-select-group.js.map +0 -1
  225. package/dist/components/calcite-tile-select.js +0 -268
  226. package/dist/components/calcite-tile-select.js.map +0 -1
  227. package/dist/components/calcite-tile.js +0 -13
  228. package/dist/components/calcite-tile.js.map +0 -1
  229. package/dist/components/calcite-time-picker.js +0 -13
  230. package/dist/components/calcite-time-picker.js.map +0 -1
  231. package/dist/components/calcite-tip-group.js +0 -43
  232. package/dist/components/calcite-tip-group.js.map +0 -1
  233. package/dist/components/calcite-tip-manager.js +0 -225
  234. package/dist/components/calcite-tip-manager.js.map +0 -1
  235. package/dist/components/calcite-tip.js +0 -164
  236. package/dist/components/calcite-tip.js.map +0 -1
  237. package/dist/components/calcite-tooltip-manager.js +0 -59
  238. package/dist/components/calcite-tooltip-manager.js.map +0 -1
  239. package/dist/components/calcite-tooltip.js +0 -13
  240. package/dist/components/calcite-tooltip.js.map +0 -1
  241. package/dist/components/calcite-tree-item.js +0 -13
  242. package/dist/components/calcite-tree-item.js.map +0 -1
  243. package/dist/components/calcite-tree.js +0 -13
  244. package/dist/components/calcite-tree.js.map +0 -1
  245. package/dist/components/calcite-value-list-item.js +0 -13
  246. package/dist/components/calcite-value-list-item.js.map +0 -1
  247. package/dist/components/calcite-value-list.js +0 -13
  248. package/dist/components/calcite-value-list.js.map +0 -1
  249. package/dist/components/check-list.d.ts +0 -11
  250. package/dist/components/check-list.js +0 -13
  251. package/dist/components/check-list.js.map +0 -1
  252. package/dist/components/check-list2.js +0 -128
  253. package/dist/components/check-list2.js.map +0 -1
  254. package/dist/components/checkbox.js +0 -167
  255. package/dist/components/checkbox.js.map +0 -1
  256. package/dist/components/chip.js +0 -172
  257. package/dist/components/chip.js.map +0 -1
  258. package/dist/components/color-picker-hex-input.js +0 -365
  259. package/dist/components/color-picker-hex-input.js.map +0 -1
  260. package/dist/components/color-picker-swatch.js +0 -2036
  261. package/dist/components/color-picker-swatch.js.map +0 -1
  262. package/dist/components/combobox-item.js +0 -184
  263. package/dist/components/combobox-item.js.map +0 -1
  264. package/dist/components/combobox.js +0 -914
  265. package/dist/components/combobox.js.map +0 -1
  266. package/dist/components/conditionalSlot.js +0 -52
  267. package/dist/components/conditionalSlot.js.map +0 -1
  268. package/dist/components/config-buffer-tools.d.ts +0 -11
  269. package/dist/components/config-buffer-tools.js +0 -185
  270. package/dist/components/config-buffer-tools.js.map +0 -1
  271. package/dist/components/config-draw-tools.d.ts +0 -11
  272. package/dist/components/config-draw-tools.js +0 -124
  273. package/dist/components/config-draw-tools.js.map +0 -1
  274. package/dist/components/config-layer-picker.d.ts +0 -11
  275. package/dist/components/config-layer-picker.js +0 -148
  276. package/dist/components/config-layer-picker.js.map +0 -1
  277. package/dist/components/config-pdf-download.d.ts +0 -11
  278. package/dist/components/config-pdf-download.js +0 -157
  279. package/dist/components/config-pdf-download.js.map +0 -1
  280. package/dist/components/date-picker-day.js +0 -113
  281. package/dist/components/date-picker-day.js.map +0 -1
  282. package/dist/components/date-picker-month-header.js +0 -226
  283. package/dist/components/date-picker-month-header.js.map +0 -1
  284. package/dist/components/date-picker-month.js +0 -346
  285. package/dist/components/date-picker-month.js.map +0 -1
  286. package/dist/components/date-picker.js +0 -577
  287. package/dist/components/date-picker.js.map +0 -1
  288. package/dist/components/date.js +0 -182
  289. package/dist/components/date.js.map +0 -1
  290. package/dist/components/debounce.js +0 -489
  291. package/dist/components/debounce.js.map +0 -1
  292. package/dist/components/dom.js +0 -233
  293. package/dist/components/dom.js.map +0 -1
  294. package/dist/components/dropdown.js +0 -507
  295. package/dist/components/dropdown.js.map +0 -1
  296. package/dist/components/filter.js +0 -765
  297. package/dist/components/filter.js.map +0 -1
  298. package/dist/components/floating-ui.js +0 -1787
  299. package/dist/components/floating-ui.js.map +0 -1
  300. package/dist/components/form.js +0 -230
  301. package/dist/components/form.js.map +0 -1
  302. package/dist/components/graph.js +0 -256
  303. package/dist/components/graph.js.map +0 -1
  304. package/dist/components/guid.js +0 -26
  305. package/dist/components/guid.js.map +0 -1
  306. package/dist/components/handle.js +0 -121
  307. package/dist/components/handle.js.map +0 -1
  308. package/dist/components/icon.js +0 -204
  309. package/dist/components/icon.js.map +0 -1
  310. package/dist/components/index.d.ts +0 -48
  311. package/dist/components/index.js +0 -190
  312. package/dist/components/index.js.map +0 -1
  313. package/dist/components/index2.js +0 -201
  314. package/dist/components/index2.js.map +0 -1
  315. package/dist/components/input-message.js +0 -103
  316. package/dist/components/input-message.js.map +0 -1
  317. package/dist/components/input.js +0 -742
  318. package/dist/components/input.js.map +0 -1
  319. package/dist/components/interactive.js +0 -53
  320. package/dist/components/interactive.js.map +0 -1
  321. package/dist/components/interfaces.js +0 -21
  322. package/dist/components/interfaces.js.map +0 -1
  323. package/dist/components/interfaces2.js +0 -23
  324. package/dist/components/interfaces2.js.map +0 -1
  325. package/dist/components/interfaces3.js +0 -72
  326. package/dist/components/interfaces3.js.map +0 -1
  327. package/dist/components/json-editor.d.ts +0 -11
  328. package/dist/components/json-editor.js +0 -13
  329. package/dist/components/json-editor.js.map +0 -1
  330. package/dist/components/json-editor2.js +0 -443
  331. package/dist/components/json-editor2.js.map +0 -1
  332. package/dist/components/key.js +0 -18
  333. package/dist/components/key.js.map +0 -1
  334. package/dist/components/label.js +0 -108
  335. package/dist/components/label.js.map +0 -1
  336. package/dist/components/label2.js +0 -133
  337. package/dist/components/label2.js.map +0 -1
  338. package/dist/components/labelFormats.js +0 -212
  339. package/dist/components/labelFormats.js.map +0 -1
  340. package/dist/components/link.js +0 -125
  341. package/dist/components/link.js.map +0 -1
  342. package/dist/components/list-item.js +0 -151
  343. package/dist/components/list-item.js.map +0 -1
  344. package/dist/components/list.js +0 -85
  345. package/dist/components/list.js.map +0 -1
  346. package/dist/components/loadModules.js +0 -30
  347. package/dist/components/loadModules.js.map +0 -1
  348. package/dist/components/loader.js +0 -118
  349. package/dist/components/loader.js.map +0 -1
  350. package/dist/components/locale.js +0 -414
  351. package/dist/components/locale.js.map +0 -1
  352. package/dist/components/locale2.js +0 -415
  353. package/dist/components/locale2.js.map +0 -1
  354. package/dist/components/map-draw-tools.d.ts +0 -11
  355. package/dist/components/map-draw-tools.js +0 -13
  356. package/dist/components/map-draw-tools.js.map +0 -1
  357. package/dist/components/map-draw-tools2.js +0 -230
  358. package/dist/components/map-draw-tools2.js.map +0 -1
  359. package/dist/components/map-layer-picker.d.ts +0 -11
  360. package/dist/components/map-layer-picker.js +0 -13
  361. package/dist/components/map-layer-picker.js.map +0 -1
  362. package/dist/components/map-layer-picker2.js +0 -190
  363. package/dist/components/map-layer-picker2.js.map +0 -1
  364. package/dist/components/map-search.d.ts +0 -11
  365. package/dist/components/map-search.js +0 -157
  366. package/dist/components/map-search.js.map +0 -1
  367. package/dist/components/map-select-tools.d.ts +0 -11
  368. package/dist/components/map-select-tools.js +0 -13
  369. package/dist/components/map-select-tools.js.map +0 -1
  370. package/dist/components/map-select-tools2.js +0 -555
  371. package/dist/components/map-select-tools2.js.map +0 -1
  372. package/dist/components/mapViewUtils.js +0 -131
  373. package/dist/components/mapViewUtils.js.map +0 -1
  374. package/dist/components/math.js +0 -26
  375. package/dist/components/math.js.map +0 -1
  376. package/dist/components/nonChromiumPlatformUtils.js +0 -505
  377. package/dist/components/nonChromiumPlatformUtils.js.map +0 -1
  378. package/dist/components/notice.js +0 -194
  379. package/dist/components/notice.js.map +0 -1
  380. package/dist/components/observers.js +0 -58
  381. package/dist/components/observers.js.map +0 -1
  382. package/dist/components/openCloseComponent.js +0 -58
  383. package/dist/components/openCloseComponent.js.map +0 -1
  384. package/dist/components/option.js +0 -111
  385. package/dist/components/option.js.map +0 -1
  386. package/dist/components/panel.js +0 -461
  387. package/dist/components/panel.js.map +0 -1
  388. package/dist/components/pdf-download.d.ts +0 -11
  389. package/dist/components/pdf-download.js +0 -13
  390. package/dist/components/pdf-download.js.map +0 -1
  391. package/dist/components/pdf-download2.js +0 -243
  392. package/dist/components/pdf-download2.js.map +0 -1
  393. package/dist/components/pick-list-item.js +0 -257
  394. package/dist/components/pick-list-item.js.map +0 -1
  395. package/dist/components/popover.js +0 -502
  396. package/dist/components/popover.js.map +0 -1
  397. package/dist/components/progress.js +0 -62
  398. package/dist/components/progress.js.map +0 -1
  399. package/dist/components/public-notification.d.ts +0 -11
  400. package/dist/components/public-notification.js +0 -784
  401. package/dist/components/public-notification.js.map +0 -1
  402. package/dist/components/publicNotificationStore.js +0 -40
  403. package/dist/components/publicNotificationStore.js.map +0 -1
  404. package/dist/components/queryUtils.js +0 -163
  405. package/dist/components/queryUtils.js.map +0 -1
  406. package/dist/components/radio-group-item.js +0 -103
  407. package/dist/components/radio-group-item.js.map +0 -1
  408. package/dist/components/radio-group.js +0 -237
  409. package/dist/components/radio-group.js.map +0 -1
  410. package/dist/components/refine-selection-tools.d.ts +0 -11
  411. package/dist/components/refine-selection-tools.js +0 -13
  412. package/dist/components/refine-selection-tools.js.map +0 -1
  413. package/dist/components/refine-selection-tools2.js +0 -500
  414. package/dist/components/refine-selection-tools2.js.map +0 -1
  415. package/dist/components/refine-selection.d.ts +0 -11
  416. package/dist/components/refine-selection.js +0 -13
  417. package/dist/components/refine-selection.js.map +0 -1
  418. package/dist/components/refine-selection2.js +0 -369
  419. package/dist/components/refine-selection2.js.map +0 -1
  420. package/dist/components/resources.js +0 -26
  421. package/dist/components/resources.js.map +0 -1
  422. package/dist/components/resources2.js +0 -23
  423. package/dist/components/resources2.js.map +0 -1
  424. package/dist/components/resources3.js +0 -40
  425. package/dist/components/resources3.js.map +0 -1
  426. package/dist/components/scrim.js +0 -85
  427. package/dist/components/scrim.js.map +0 -1
  428. package/dist/components/select.js +0 -261
  429. package/dist/components/select.js.map +0 -1
  430. package/dist/components/shared-list-render.js +0 -321
  431. package/dist/components/shared-list-render.js.map +0 -1
  432. package/dist/components/shell-panel.js +0 -283
  433. package/dist/components/shell-panel.js.map +0 -1
  434. package/dist/components/shell.js +0 -123
  435. package/dist/components/shell.js.map +0 -1
  436. package/dist/components/slider.js +0 -898
  437. package/dist/components/slider.js.map +0 -1
  438. package/dist/components/solution-configuration.d.ts +0 -11
  439. package/dist/components/solution-configuration.js +0 -1141
  440. package/dist/components/solution-configuration.js.map +0 -1
  441. package/dist/components/solution-contents.d.ts +0 -11
  442. package/dist/components/solution-contents.js +0 -13
  443. package/dist/components/solution-contents.js.map +0 -1
  444. package/dist/components/solution-contents2.js +0 -130
  445. package/dist/components/solution-contents2.js.map +0 -1
  446. package/dist/components/solution-item-details.d.ts +0 -11
  447. package/dist/components/solution-item-details.js +0 -13
  448. package/dist/components/solution-item-details.js.map +0 -1
  449. package/dist/components/solution-item-details2.js +0 -236
  450. package/dist/components/solution-item-details2.js.map +0 -1
  451. package/dist/components/solution-item-icon.d.ts +0 -11
  452. package/dist/components/solution-item-icon.js +0 -13
  453. package/dist/components/solution-item-icon.js.map +0 -1
  454. package/dist/components/solution-item-icon2.js +0 -344
  455. package/dist/components/solution-item-icon2.js.map +0 -1
  456. package/dist/components/solution-item-sharing.d.ts +0 -11
  457. package/dist/components/solution-item-sharing.js +0 -13
  458. package/dist/components/solution-item-sharing.js.map +0 -1
  459. package/dist/components/solution-item-sharing2.js +0 -169
  460. package/dist/components/solution-item-sharing2.js.map +0 -1
  461. package/dist/components/solution-item.d.ts +0 -11
  462. package/dist/components/solution-item.js +0 -13
  463. package/dist/components/solution-item.js.map +0 -1
  464. package/dist/components/solution-item2.js +0 -317
  465. package/dist/components/solution-item2.js.map +0 -1
  466. package/dist/components/solution-organization-variables.d.ts +0 -11
  467. package/dist/components/solution-organization-variables.js +0 -13
  468. package/dist/components/solution-organization-variables.js.map +0 -1
  469. package/dist/components/solution-organization-variables2.js +0 -134
  470. package/dist/components/solution-organization-variables2.js.map +0 -1
  471. package/dist/components/solution-resource-item.d.ts +0 -11
  472. package/dist/components/solution-resource-item.js +0 -13
  473. package/dist/components/solution-resource-item.js.map +0 -1
  474. package/dist/components/solution-resource-item2.js +0 -358
  475. package/dist/components/solution-resource-item2.js.map +0 -1
  476. package/dist/components/solution-spatial-ref.d.ts +0 -11
  477. package/dist/components/solution-spatial-ref.js +0 -13
  478. package/dist/components/solution-spatial-ref.js.map +0 -1
  479. package/dist/components/solution-spatial-ref2.js +0 -21448
  480. package/dist/components/solution-spatial-ref2.js.map +0 -1
  481. package/dist/components/solution-store.js +0 -4094
  482. package/dist/components/solution-store.js.map +0 -1
  483. package/dist/components/solution-template-data.d.ts +0 -11
  484. package/dist/components/solution-template-data.js +0 -13
  485. package/dist/components/solution-template-data.js.map +0 -1
  486. package/dist/components/solution-template-data2.js +0 -235
  487. package/dist/components/solution-template-data2.js.map +0 -1
  488. package/dist/components/solution-variables.d.ts +0 -11
  489. package/dist/components/solution-variables.js +0 -13
  490. package/dist/components/solution-variables.js.map +0 -1
  491. package/dist/components/solution-variables2.js +0 -152
  492. package/dist/components/solution-variables2.js.map +0 -1
  493. package/dist/components/sortable.esm.js +0 -3028
  494. package/dist/components/sortable.esm.js.map +0 -1
  495. package/dist/components/store-manager.d.ts +0 -11
  496. package/dist/components/store-manager.js +0 -85
  497. package/dist/components/store-manager.js.map +0 -1
  498. package/dist/components/switch.js +0 -141
  499. package/dist/components/switch.js.map +0 -1
  500. package/dist/components/tab-nav.js +0 -243
  501. package/dist/components/tab-nav.js.map +0 -1
  502. package/dist/components/tab-title.js +0 -278
  503. package/dist/components/tab-title.js.map +0 -1
  504. package/dist/components/tab.js +0 -156
  505. package/dist/components/tab.js.map +0 -1
  506. package/dist/components/tabs.js +0 -190
  507. package/dist/components/tabs.js.map +0 -1
  508. package/dist/components/tile.js +0 -131
  509. package/dist/components/tile.js.map +0 -1
  510. package/dist/components/time-picker.js +0 -945
  511. package/dist/components/time-picker.js.map +0 -1
  512. package/dist/components/tooltip.js +0 -401
  513. package/dist/components/tooltip.js.map +0 -1
  514. package/dist/components/tree-item.js +0 -296
  515. package/dist/components/tree-item.js.map +0 -1
  516. package/dist/components/tree.js +0 -329
  517. package/dist/components/tree.js.map +0 -1
  518. package/dist/components/utils.js +0 -121
  519. package/dist/components/utils.js.map +0 -1
  520. package/dist/components/utils2.js +0 -53
  521. package/dist/components/utils2.js.map +0 -1
  522. package/dist/components/value-list-item.js +0 -206
  523. package/dist/components/value-list-item.js.map +0 -1
  524. package/dist/components/value-list.js +0 -335
  525. package/dist/components/value-list.js.map +0 -1
  526. package/dist/esm/solution-store-c1f6173a.js.map +0 -1
  527. package/dist/solutions-components/p-065830b8.js.map +0 -1
  528. package/dist/solutions-components/p-0e7a0839.entry.js.map +0 -1
  529. package/dist/solutions-components/p-401541a5.entry.js +0 -895
  530. package/dist/solutions-components/p-401541a5.entry.js.map +0 -1
  531. package/dist/solutions-components/p-ee9be0ef.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"solution-store.js","sourceRoot":"","sources":["../../src/utils/solution-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,WAAW,EAOZ,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,OAAO,EACP,2BAA2B,EAM3B,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,UAAU,EACV,sBAAsB,EAEvB,MAAM,uBAAuB,CAAC;AA6C/B,MAAM,kBAAkB,GAAsB;EAC5C,cAAc,EAAE,EAAE;EAClB,WAAW,EAAE,SAAS;EACtB,YAAY,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;EAC7C,aAAa,EAAE,EAAE;EACjB,eAAe,EAAE,EAAE;EACnB,oBAAoB,EAAE;IACpB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,EAAE;IACZ,gBAAgB,EAAE,SAAS;GAC5B;CACF,CAAA;AAED,MAAM,aAAa;EAmBjB;;;;KAIG;EACH;IAlBU,gBAAW,GAAG,KAAK,CA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,OAAO,SAAS,CAAC;KAClB;EACH,CAAC;EAED;;;;;;;;;KASG;EACO,cAAc,CACtB,QAAgB;IAEhB,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO;MACL,MAAM,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;MACzG,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;KAChD,CAAC;EACJ,CAAC;CACF;AAED,eAAe,aAAa,CAAC,KAAK,CAAC","sourcesContent":["/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nimport { createStore } from \"@stencil/store\";\r\nimport {\r\n EUpdateType,\r\n IFeatureServiceEnabledStatus,\r\n IItemShare,\r\n IItemTemplateEdit,\r\n IResourcePath,\r\n ISolutionTemplateEdits,\r\n ISolutionSpatialReferenceInfo\r\n} from './interfaces';\r\nimport {\r\n EFileType,\r\n SolutionTemplateFormatVersion,\r\n copyFilesToStorageItem,\r\n generateStorageFilePaths,\r\n getItemDataAsJson,\r\n getProp,\r\n getThumbnailFromStorageItem,\r\n IDeployFileCopyPath,\r\n IItemTemplate,\r\n IItemUpdate,\r\n ISolutionItemData,\r\n ISourceFile,\r\n isSupportedFileType,\r\n removeItemResourceFile,\r\n setCreateProp,\r\n updateItem,\r\n updateItemResourceFile,\r\n UserSession\r\n} from '@esri/solution-common';\r\n\r\n//--------------------------------------------------------------------------------------------------------------------//\r\n//\r\n// Loads a solution's definition and shares it as state across the solution configuration package components.\r\n//\r\n// Store contents:\r\n// * solutionItemId: [string] id of the current solution\r\n// * defaultWkid: [any] value of the solution's `params.wkid.default` data property, which may be undefined\r\n// * solutionData: [ISolutionItemData] the solution's data, which is modified in-place\r\n// * featureServices: [array] a list of Feature service enablement status for SR configuration\r\n// * spatialReferenceInfo: [object] the current spatial reference (if enabled) and the services that use it\r\n// * enabled: [boolean] use the spatial reference\r\n// * services: [object] services using this spatial reference organized by the service name\r\n// * spatialReference: [object] the spatial reference display\r\n//\r\n// Store singleton method:\r\n// * Store: Creates singleton instance when accessed; default export from module.\r\n// @example\r\n// import state from \"../solution-store\";\r\n// await state.loadSolution(...);\r\n//\r\n// Store instance methods:\r\n// * getItemInfo: Returns the stored information of an item.\r\n// * getStoreInfo: Returns a top-level store property: solutionItemId, defaultWkid, etc.\r\n// * loadSolution: Loads a Solution into the store from AGO.\r\n// * replaceItemThumbnail: Replaces the thumbnail associated with a template item in the store.\r\n// * saveSolution: Writes a Solution into AGO from the store.\r\n// * setItemInfo: Stores information for item.\r\n// * setStoreInfo: Sets a top-level store property: solutionItemId, defaultWkid, etc.\r\n//\r\n// Store events:\r\n// * solutionStoreHasChanges: Event for notifying if the store has changes or not.\r\n//\r\n//--------------------------------------------------------------------------------------------------------------------//\r\n\r\ninterface SolutionStoreData {\r\n solutionItemId: string,\r\n defaultWkid: string,\r\n solutionData: ISolutionItemData,\r\n templateEdits: ISolutionTemplateEdits,\r\n featureServices: IFeatureServiceEnabledStatus[],\r\n spatialReferenceInfo: ISolutionSpatialReferenceInfo\r\n}\r\n\r\nconst EmptySolutionStore: SolutionStoreData = {\r\n solutionItemId: \"\",\r\n defaultWkid: undefined,\r\n solutionData: { metadata: {}, templates: [] },\r\n templateEdits: {},\r\n featureServices: [],\r\n spatialReferenceInfo: {\r\n enabled: false,\r\n services: {},\r\n spatialReference: undefined\r\n }\r\n}\r\n\r\nclass SolutionStore\r\n{\r\n protected static _instance: SolutionStore;\r\n\r\n protected _store: any;\r\n\r\n protected _hasChanges = false;\r\n\r\n protected _authentication: UserSession;\r\n\r\n /**\r\n * Creates singleton instance when accessed; default export from module.\r\n *\r\n * @returns Static instance of the class\r\n */\r\n public static get Store(): SolutionStore {\r\n return this._instance || (this._instance = new this());\r\n }\r\n\r\n /**\r\n * Creates an empty store.\r\n *\r\n * @protected\r\n */\r\n protected constructor() {\r\n this._store = createStore({\r\n ...EmptySolutionStore\r\n });\r\n }\r\n\r\n /**\r\n * Returns the stored information of an item.\r\n *\r\n * @param itemId Id of item to fetch\r\n *\r\n * @returns Item information or `undefined` if not found\r\n */\r\n public getItemInfo(\r\n itemId: string\r\n ): IItemTemplateEdit {\r\n const templates = this._store.get(\"solutionData\").templates as IItemTemplateEdit[];\r\n\r\n let template: IItemTemplateEdit;\r\n templates.some((t: IItemTemplateEdit) => {\r\n if (itemId == t.itemId) {\r\n template = t;\r\n return true;\r\n }\r\n return false;\r\n });\r\n\r\n return template;\r\n }\r\n\r\n /**\r\n * Returns a top-level store property: solutionItemId, defaultWkid, etc.\r\n *\r\n * @param propName Name of property\r\n *\r\n * @returns Value of property\r\n */\r\n public getStoreInfo(\r\n propName: string\r\n ): any {\r\n return this._store.get(propName);\r\n }\r\n\r\n /**\r\n * Loads a Solution into the store from AGO.\r\n *\r\n * @param solutionItemId Id of the solution represented in the store\r\n * @param authentication Credentials for fetching information to be loaded into the store\r\n *\r\n * @returns Promise that resolves when task is done\r\n */\r\n public async loadSolution(\r\n solutionItemId: string,\r\n authentication: UserSession\r\n ): Promise<void> {\r\n this._authentication = authentication;\r\n\r\n const solutionData = await getItemDataAsJson(solutionItemId, authentication);\r\n if (solutionData) {\r\n const defaultWkid: string | number = getProp(solutionData, \"params.wkid.default\");\r\n await this._prepareSolutionItemsForEditing(solutionItemId, solutionData.templates, authentication);\r\n const featureServices = this._getFeatureServices(solutionData.templates);\r\n const spatialReferenceInfo = this._getSpatialReferenceInfo(featureServices, defaultWkid);\r\n\r\n this._store.set(\"solutionItemId\", solutionItemId);\r\n this._store.set(\"defaultWkid\", defaultWkid);\r\n this._store.set(\"solutionData\", solutionData);\r\n this._store.set(\"featureServices\", featureServices);\r\n this._store.set(\"spatialReferenceInfo\", spatialReferenceInfo);\r\n }\r\n this._flagStoreHasChanges(false);\r\n }\r\n\r\n /**\r\n * Queues the replacement of the thumbnail associated with a template item in the store.\r\n *\r\n * @param itemEdit Details of the template to modify, containing the new thumbnail in the `thumbnail`\r\n * property\r\n */\r\n public replaceItemThumbnail(\r\n itemEdit: IItemTemplateEdit\r\n ): void {\r\n // Flag the current thumbnail and any replacements for removal\r\n itemEdit.resourceFilePaths.forEach((path: IResourcePath) => {\r\n if (path.type === EFileType.Thumbnail) {\r\n if (path.updateType === EUpdateType.None) {\r\n // Existing thumbnail not yet flagged for removal\r\n path.updateType = EUpdateType.Remove;\r\n } else if (path.updateType === EUpdateType.Add || path.updateType === EUpdateType.Update) {\r\n // An earlier replacement\r\n path.updateType = EUpdateType.Obsolete;\r\n }\r\n }\r\n });\r\n\r\n // Remove any replacements already queued\r\n itemEdit.resourceFilePaths =\r\n itemEdit.resourceFilePaths.filter((path: IResourcePath) => path.updateType != EUpdateType.Obsolete)\r\n\r\n // Add the new thumbnail to the store item\r\n itemEdit.resourceFilePaths.push({\r\n blob: itemEdit.thumbnail,\r\n filename: itemEdit.thumbnail.name,\r\n type: EFileType.Thumbnail,\r\n updateType: EUpdateType.Add\r\n } as IResourcePath);\r\n\r\n // Update the store\r\n this.setItemInfo(itemEdit);\r\n }\r\n\r\n /**\r\n * Writes a Solution into AGO from the store. Must use `loadSolution` to continue with solution.\r\n *\r\n * @returns Promise that resolves when task is done\r\n */\r\n public async saveSolution(\r\n ): Promise<void> {\r\n // Update the templates in the original solution item data\r\n const solutionItemId = this._store.get(\"solutionItemId\");\r\n const solutionData = this._store.get(\"solutionData\");\r\n const spatialReferenceInfo = this._store.get(\"spatialReferenceInfo\");\r\n\r\n await this._prepareSolutionItemsForStorage(solutionItemId, solutionData.templates, this._authentication);\r\n const updatedDefaultWkid = this._setSpatialReferenceInfo(spatialReferenceInfo, solutionData.templates);\r\n if (updatedDefaultWkid) {\r\n setCreateProp(solutionData, \"params.wkid\", {\r\n \"label\": \"Spatial Reference\",\r\n \"default\": updatedDefaultWkid,\r\n \"valueType\": \"spatialReference\",\r\n \"attributes\": {\r\n \"required\": \"true\"\r\n }\r\n });\r\n } else {\r\n setCreateProp(solutionData, \"params.wkid\", {});\r\n }\r\n\r\n const itemInfo: IItemUpdate = {\r\n id: solutionItemId,\r\n text: solutionData\r\n };\r\n await updateItem(itemInfo, this._authentication);\r\n }\r\n\r\n /**\r\n * Stores information for item.\r\n *\r\n * @param itemEdit Item information\r\n */\r\n public setItemInfo(\r\n itemEdit: IItemTemplateEdit\r\n ): void {\r\n const solutionData = this._store.get(\"solutionData\");\r\n const templates = solutionData.templates as IItemTemplateEdit[];\r\n\r\n templates.some((t: IItemTemplateEdit) => {\r\n if (itemEdit.itemId == t.itemId) {\r\n t = itemEdit;\r\n this._store.set(\"solutionData\", solutionData);\r\n this._flagStoreHasChanges(true);\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n /**\r\n * Sets a top-level store property: solutionItemId, defaultWkid, etc.\r\n *\r\n * @param propName Name of property\r\n * @param value Value of property\r\n */\r\n public setStoreInfo(\r\n propName: string,\r\n value: any\r\n ): void {\r\n this._store.set(propName, value);\r\n this._flagStoreHasChanges(true);\r\n}\r\n\r\n //------------------------------------------------------------------------------------------------------------------//\r\n\r\n /** Provides access to protected methods for unit testing.\r\n *\r\n * @param methodName Name of protected method to run\r\n * @param arg1 First argument to forward to method, e.g., for \"_prepareSolutionItemsForEditing\", `solutionItemId`\r\n * @param arg2 Second argument to forward to method, e.g., for \"_prepareSolutionItemsForEditing\", `templates`\r\n * @param arg3 Third argument to forward to method, e.g., for \"_prepareSolutionItemsForEditing\", `authentication`\r\n *\r\n * @returns\r\n */\r\n public _testAccess(\r\n methodName: string,\r\n arg1?: any,\r\n arg2?: any,\r\n arg3?: any\r\n ): any {\r\n switch (methodName) {\r\n case \"_emptyTheStore\":\r\n this._emptyTheStore();\r\n break;\r\n case \"_getFeatureServices\":\r\n return this._getFeatureServices(arg1);\r\n case \"_getItemsSharedWithThisGroup\":\r\n return this._getItemsSharedWithThisGroup(arg1, arg2);\r\n case \"_getResourceFilePaths\":\r\n return this._getResourceFilePaths(arg1, arg2, arg3);\r\n case \"_getResourceStorageName\":\r\n return this._getResourceStorageName(arg1, arg2);\r\n case \"_getSpatialReferenceInfo\":\r\n return this._getSpatialReferenceInfo(arg1, arg2);\r\n case \"_prepareSolutionItemsForEditing\":\r\n return this._prepareSolutionItemsForEditing(arg1, arg2, arg3);\r\n case \"_prepareSolutionItemsForStorage\":\r\n return this._prepareSolutionItemsForStorage(arg1, arg2, arg3);\r\n case \"_setSpatialReferenceInfo\":\r\n return this._setSpatialReferenceInfo(arg1, arg2);\r\n case \"_splitFilename\":\r\n return this._splitFilename(arg1);\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the store to the empty state.\r\n *\r\n * @protected\r\n */\r\n protected _emptyTheStore(): void {\r\n this._store.set(\"solutionItemId\", EmptySolutionStore.solutionItemId);\r\n this._store.set(\"defaultWkid\", EmptySolutionStore.defaultWkid);\r\n this._store.set(\"solutionData\", EmptySolutionStore.solutionData);\r\n this._store.set(\"templateEdits\", EmptySolutionStore.templateEdits);\r\n this._store.set(\"featureServices\", EmptySolutionStore.featureServices);\r\n this._store.set(\"spatialReferenceInfo\", EmptySolutionStore.spatialReferenceInfo);\r\n }\r\n\r\n /**\r\n * Sets the store's flag indicating if it has changes and dispatches an event when\r\n * the flag value changes.\r\n *\r\n * @param flagHasChanges Current state of change in the store; if it doesn't match the value saved in this\r\n * object, an event is dispatched with the new value and the saved value is updated\r\n *\r\n * @protected\r\n */\r\n protected _flagStoreHasChanges(flagHasChanges: boolean): void {\r\n // Event for notifying if the store has changes or not\r\n if (this._hasChanges !== flagHasChanges) {\r\n window.dispatchEvent(new CustomEvent(\"solutionStoreHasChanges\", {\r\n detail: flagHasChanges,\r\n bubbles: true,\r\n cancelable: false,\r\n composed: true\r\n }));\r\n }\r\n\r\n this._hasChanges = flagHasChanges;\r\n }\r\n\r\n /**\r\n * Gets a list of Feature Services that are not views.\r\n *\r\n * @param templates A list of item templates from the solution\r\n *\r\n * @returns a list of feature services\r\n *\r\n * @protected\r\n */\r\n protected _getCustomizableFeatureServices(\r\n templates: IItemTemplate[]\r\n ): IItemTemplate[] {\r\n return templates.reduce((prev, cur) => {\r\n if (cur.type === \"Feature Service\" && cur.item.typeKeywords.indexOf(\"View Service\") < 0) {\r\n prev.push(cur);\r\n }\r\n return prev;\r\n }, []);\r\n }\r\n\r\n /**\r\n * Gets a list of Feature Services that are not views along with an enabled property that indicates\r\n * if the service currently uses a spatial reference variable.\r\n *\r\n * @param templates A list of item templates from the solution\r\n *\r\n * @returns a list of feature service names and an enabled property to indicate\r\n * if they currently use a spatial reference variable.\r\n *\r\n * @protected\r\n */\r\n protected _getFeatureServices(\r\n templates: IItemTemplate[]\r\n ): IFeatureServiceEnabledStatus[] {\r\n const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);\r\n return customizeableFeatureServices.map(\r\n (fs) => {\r\n const name: string = fs.item.title || fs.item.name;\r\n const wkid = getProp(fs, \"properties.service.spatialReference.wkid\");\r\n return { name, enabled: wkid.toString().startsWith(\"{{params.wkid||\") } as IFeatureServiceEnabledStatus;\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Capture the key item details for a given group template\r\n *\r\n * @param template one of the templates from the current solution\r\n * @param templates full list of templates\r\n *\r\n * @returns a list of IItemShare objects\r\n *\r\n * @protected\r\n */\r\n protected _getItemsSharedWithThisGroup(\r\n template: IItemTemplate,\r\n templates: IItemTemplate[]\r\n ): IItemShare[] {\r\n return templates.reduce((prev, cur) => {\r\n if (cur.itemId !== template.itemId && cur.type !== \"Group\") {\r\n prev.push({\r\n id: cur.itemId,\r\n title: cur.item.name || cur.item.title,\r\n isShared: (cur.groups || []).indexOf(template.itemId) > -1,\r\n shareItem: (cur.groups || []).indexOf(template.itemId) > -1,\r\n type: cur.type,\r\n typeKeywords: cur.item.typeKeywords\r\n });\r\n }\r\n return prev;\r\n }, []);\r\n }\r\n\r\n /**\r\n * Generate storage file paths from the solution template\r\n *\r\n * @param solutionId the id of the current solution\r\n * @param template the current template from the solution\r\n * @param portal Portal where file is to be found\r\n *\r\n * @returns a list of resource file infos\r\n *\r\n * @protected\r\n */\r\n protected _getResourceFilePaths(\r\n solutionId: string,\r\n template: any,\r\n portal: string\r\n ): IResourcePath[] {\r\n const resourceFilePaths: IDeployFileCopyPath[] = generateStorageFilePaths(\r\n portal,\r\n solutionId,\r\n template.resources,\r\n SolutionTemplateFormatVersion\r\n );\r\n return resourceFilePaths.map((fp: any) => {\r\n fp.updateType = EUpdateType.None;\r\n return fp;\r\n }) as IResourcePath[];\r\n }\r\n\r\n /**\r\n * Generates a resource name from a storage file path.\r\n *\r\n * @param templateItemId The id of the template item whose resource this is; used as a prefix in the resource name\r\n * @param resourcePath Resource file infos\r\n *\r\n * @returns The resource name to use when attaching a resource to the item.\r\n *\r\n * @protected\r\n */\r\n protected _getResourceStorageName(\r\n templateItemId: string,\r\n resourcePath: IResourcePath\r\n ): string {\r\n /* Converts\r\n {\r\n \"url\": \"https://myorg.maps.arcgis.com/sharing/rest/content/items/ca924c6db7d247b9a31fa30532fb5913/resources/79036430a6274e17ae915d0278b8569c_info_metadata/metadata.xml\",\r\n \"type\": 2,\r\n \"folder\": \"\",\r\n \"filename\": \"metadata.xml\",\r\n \"updateType\": 3\r\n }\r\n to\r\n ca924c6db7d247b9a31fa30532fb5913_info_metadata/metadata.xml\r\n */\r\n let prefix = templateItemId;\r\n switch (resourcePath.type) {\r\n case EFileType.Data:\r\n prefix = `${prefix}_info_data`;\r\n break;\r\n case EFileType.Info:\r\n prefix = `${prefix}_info`;\r\n break;\r\n case EFileType.Metadata:\r\n prefix = `${prefix}_info_metadata`;\r\n break;\r\n case EFileType.Resource:\r\n break;\r\n case EFileType.Thumbnail:\r\n prefix = `${prefix}_info_thumbnail`;\r\n break;\r\n }\r\n\r\n let filenameToUse = resourcePath.filename;\r\n if (resourcePath.type == EFileType.Data && filenameToUse && !isSupportedFileType(filenameToUse)) {\r\n filenameToUse = filenameToUse + \".zip\";\r\n prefix += \"z\";\r\n }\r\n\r\n const filename = resourcePath.folder ? resourcePath.folder + \"/\" + filenameToUse : filenameToUse;\r\n\r\n return prefix + \"/\" + filename;\r\n }\r\n\r\n /**\r\n * Extracts basic spatial reference information that is used to determine if a custom spatial reference parameter will\r\n * be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be\r\n *\r\n * @param services a list of objects with service name and enabled property (indicates if they currently use a spatial reference var)\r\n * @param data the data object of a solution item\r\n *\r\n * @returns an object that stores if a custom spatial reference parameter is enabled/disabled,\r\n * a list of services and if they are enabled/disabled, and the default wkid\r\n *\r\n * @protected\r\n */\r\n protected _getSpatialReferenceInfo(\r\n services: any[],\r\n defaultWkid: string | number\r\n ): ISolutionSpatialReferenceInfo {\r\n const defaultServices: any = {};\r\n services.forEach(service => {\r\n defaultServices[service.name] = service.enabled;\r\n });\r\n\r\n return {\r\n enabled: defaultWkid !== undefined,\r\n services: defaultServices,\r\n spatialReference: defaultWkid ? defaultWkid : undefined\r\n }\r\n }\r\n\r\n /**\r\n * Create and store template items for the editor.\r\n *\r\n * @param solutionItemId Id of the solution represented in the store\r\n * @param templates A list of item templates from the solution\r\n * @param authentication Credentials for fetching information to be loaded into the store\r\n *\r\n * @returns a promise that resolves when the templates are ready\r\n *\r\n * @protected\r\n */\r\n protected async _prepareSolutionItemsForEditing(\r\n solutionItemId: string,\r\n templates: IItemTemplate[],\r\n authentication: UserSession\r\n ): Promise<void> {\r\n const thumbnailPromises = [];\r\n\r\n // Augment the template with paths to resources and group information, if relevant\r\n templates.forEach((t: IItemTemplateEdit) => {\r\n t.resourceFilePaths = this._getResourceFilePaths(\r\n solutionItemId,\r\n t,\r\n authentication.portal\r\n );\r\n thumbnailPromises.push(\r\n t.resourceFilePaths.length > 0 ?\r\n getThumbnailFromStorageItem(authentication, t.resourceFilePaths) :\r\n Promise.resolve()\r\n );\r\n\r\n t.groupDetails = t.type === \"Group\" ? this._getItemsSharedWithThisGroup(t, templates) : [];\r\n });\r\n\r\n // Augment the template with its thumbnail file\r\n const thumbnails = await Promise.all(thumbnailPromises);\r\n templates.forEach((t: IItemTemplateEdit, i: number) => {\r\n t.thumbnail = thumbnails[i] ? thumbnails[i] : undefined;\r\n });\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Prepares template items for sending to AGO by updating the resources held by the solution item.\r\n *\r\n * @param solutionItemId Id of the solution represented in the store\r\n * @param templates A list of item templates from the solution\r\n * @param authentication Credentials for fetching information to be loaded into the store\r\n *\r\n * @returns a promise that resolves when the templates are ready\r\n *\r\n * @protected\r\n */\r\n protected async _prepareSolutionItemsForStorage(\r\n solutionItemId: string,\r\n templates: IItemTemplateEdit[],\r\n authentication: UserSession\r\n ): Promise<void> {\r\n const resourceAdds: ISourceFile[] = [];\r\n\r\n // Update the resources and remove the augmentation from a template\r\n const pendingTasks: Promise<void>[] = [];\r\n templates.forEach((t) => {\r\n\r\n // Run through the resourceFilePaths for the item seeking modifications to be made to the solution item's\r\n // collection of resources; queue them for batching\r\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\r\n t.resourceFilePaths.forEach(async (path: IResourcePath): Promise<void> => {\r\n const storageName = this._getResourceStorageName(t.itemId, path);\r\n\r\n switch (path.updateType) {\r\n\r\n case EUpdateType.Add:\r\n const {prefix, suffix } = this._splitFilename(storageName);\r\n t.resources.push(storageName);\r\n resourceAdds.push({\r\n itemId: t.itemId,\r\n file: path.blob,\r\n folder: prefix,\r\n filename: suffix\r\n } as ISourceFile);\r\n break;\r\n\r\n case EUpdateType.Update:\r\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\r\n pendingTasks.push(new Promise<void>(async (resolve): Promise<void> => {\r\n try {\r\n await updateItemResourceFile(solutionItemId, storageName, path.blob, authentication);\r\n } catch (err) {\r\n console.log(\"Unable to update \" + storageName + \" for item \" + t.itemId + \": \" + JSON.stringify(err));\r\n }\r\n resolve();\r\n }));\r\n break;\r\n\r\n case EUpdateType.Remove:\r\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\r\n pendingTasks.push(new Promise<void>(async (resolve): Promise<void> => {\r\n try {\r\n await removeItemResourceFile(solutionItemId, storageName, authentication);\r\n t.resources = t.resources.filter((path: string) => path !== storageName);\r\n } catch (err) {\r\n console.log(\"Unable to remove \" + storageName + \" for item \" + t.itemId + \": \" + JSON.stringify(err));\r\n }\r\n resolve();\r\n }));\r\n break;\r\n\r\n }\r\n return Promise.resolve();\r\n });\r\n\r\n delete t.resourceFilePaths;\r\n delete t.thumbnail;\r\n delete t.groupDetails;\r\n });\r\n\r\n // Update the resources\r\n return Promise.all(pendingTasks)\r\n .then(async () => {\r\n if (resourceAdds.length > 0) {\r\n await copyFilesToStorageItem(resourceAdds, solutionItemId, authentication);\r\n }\r\n return Promise.resolve();\r\n });\r\n }\r\n\r\n /**\r\n * Stores basic spatial reference information that is used to determine if a custom spatial reference parameter will\r\n * be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be\r\n *\r\n * @param spatialReferenceInfo The configuration settings for a custom spatial reference\r\n * @param templates The templates in the current solution, which will be updated in place if\r\n * `spatialReferenceInfo.enabled` is true\r\n *\r\n * @returns The new default wkid\r\n *\r\n * @protected\r\n */\r\n protected _setSpatialReferenceInfo(\r\n spatialReferenceInfo: ISolutionSpatialReferenceInfo,\r\n templates: IItemTemplateEdit[]\r\n ): string | number {\r\n const customizingPrefix = \"{{params.wkid||\";\r\n const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);\r\n\r\n if (spatialReferenceInfo.enabled) {\r\n // Enable or disable this feature in each service\r\n customizeableFeatureServices.forEach(\r\n (fs) => {\r\n const name: string = fs.item.title || fs.item.name;\r\n let wkid: any;\r\n if (spatialReferenceInfo.services[name] ) { // enabled\r\n wkid = `{{params.wkid||${spatialReferenceInfo.spatialReference}}}`;\r\n setCreateProp(fs, \"properties.service.spatialReference.wkid\", wkid);\r\n\r\n } else { // disabled\r\n wkid = getProp(fs, \"properties.service.spatialReference.wkid\");\r\n // Remove customizing prefix if present\r\n if (wkid.toString().startsWith(customizingPrefix)) {\r\n wkid = wkid.toString().substring(customizingPrefix.length, wkid.length - 2);\r\n setCreateProp(fs, \"properties.service.spatialReference.wkid\", wkid);\r\n }\r\n }\r\n }\r\n );\r\n return spatialReferenceInfo.spatialReference;\r\n\r\n } else {\r\n // Disable this feature in each service\r\n customizeableFeatureServices.forEach(\r\n (fs) => {\r\n const wkid = getProp(fs, \"properties.service.spatialReference.wkid\");\r\n // Remove customizing prefix if present\r\n if (wkid.toString().startsWith(customizingPrefix)) {\r\n setCreateProp(fs, \"properties.service.spatialReference.wkid\",\r\n wkid.toString().substring(customizingPrefix.length, wkid.length - 2));\r\n }\r\n }\r\n );\r\n return undefined;\r\n }\r\n }\r\n\r\n /**\r\n * Splits a pathed filename into a last term and a prefix; e.g., \"a/b/c\" returns \"c\" with a prefix of \"a/b\".\r\n *\r\n * @param filename Filename with optional path\r\n *\r\n * @returns An object consisting of a `prefix` (undefined if `filename` does not contain a path) and a `suffix`--the\r\n * filename at the end of a path\r\n *\r\n * @protected\r\n */\r\n protected _splitFilename(\r\n filename: string\r\n ): { prefix: string, suffix: string } {\r\n const filenameParts = filename.split(\"/\");\r\n return {\r\n prefix: filenameParts.length > 1 ? filenameParts.slice(0, filenameParts.length - 1).join(\"/\") : undefined,\r\n suffix: filenameParts[filenameParts.length - 1]\r\n };\r\n }\r\n}\r\n\r\nexport default SolutionStore.Store;\r\n"]}
1
+ {"version":3,"file":"solution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GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;MACzG,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;KAChD,CAAC;EACJ,CAAC;CACF;AAED,eAAe,aAAa,CAAC,KAAK,CAAC","sourcesContent":["/** @license\r\n * Copyright 2022 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\nimport { createStore } from \"@stencil/store\";\r\nimport {\r\n EUpdateType,\r\n IFeatureServiceEnabledStatus,\r\n IItemShare,\r\n IItemTemplateEdit,\r\n IResourcePath,\r\n ISolutionTemplateEdits,\r\n ISolutionSpatialReferenceInfo\r\n} from './interfaces';\r\nimport {\r\n EFileType,\r\n SolutionTemplateFormatVersion,\r\n copyFilesToStorageItem,\r\n generateStorageFilePaths,\r\n getItemDataAsJson,\r\n getProp,\r\n getThumbnailFromStorageItem,\r\n IDeployFileCopyPath,\r\n IItemTemplate,\r\n IItemUpdate,\r\n ISolutionItemData,\r\n ISourceFile,\r\n isSupportedFileType,\r\n removeItemResourceFile,\r\n setCreateProp,\r\n updateItem,\r\n updateItemResourceFile,\r\n UserSession\r\n} from '@esri/solution-common';\r\n\r\n//--------------------------------------------------------------------------------------------------------------------//\r\n//\r\n// Loads a solution's definition and shares it as state across the solution configuration package components.\r\n//\r\n// Store contents:\r\n// * solutionItemId: [string] id of the current solution\r\n// * defaultWkid: [any] value of the solution's `params.wkid.default` data property, which may be undefined\r\n// * solutionData: [ISolutionItemData] the solution's data, which is modified in-place\r\n// * featureServices: [array] a list of Feature service enablement status for SR configuration\r\n// * spatialReferenceInfo: [object] the current spatial reference (if enabled) and the services that use it\r\n// * enabled: [boolean] use the spatial reference\r\n// * services: [object] services using this spatial reference organized by the service name\r\n// * spatialReference: [object] the spatial reference display\r\n//\r\n// Store singleton method:\r\n// * Store: Creates singleton instance when accessed; default export from module.\r\n// @example\r\n// import state from \"../solution-store\";\r\n// await state.loadSolution(...);\r\n//\r\n// Store instance methods:\r\n// * getItemInfo: Returns the stored information of an item.\r\n// * getStoreInfo: Returns a top-level store property: solutionItemId, defaultWkid, etc.\r\n// * loadSolution: Loads a Solution into the store from AGO.\r\n// * replaceItemThumbnail: Replaces the thumbnail associated with a template item in the store.\r\n// * saveSolution: Writes a Solution into AGO from the store.\r\n// * setItemInfo: Stores information for item.\r\n// * setStoreInfo: Sets a top-level store property: solutionItemId, defaultWkid, etc.\r\n//\r\n// Store events:\r\n// * solutionStoreHasChanges: Event for notifying if the store has changes or not.\r\n//\r\n//--------------------------------------------------------------------------------------------------------------------//\r\n\r\ninterface SolutionStoreData {\r\n solutionItemId: string,\r\n defaultWkid: string,\r\n solutionData: ISolutionItemData,\r\n templateEdits: ISolutionTemplateEdits,\r\n featureServices: IFeatureServiceEnabledStatus[],\r\n spatialReferenceInfo: ISolutionSpatialReferenceInfo\r\n}\r\n\r\nconst EmptySolutionStore: SolutionStoreData = {\r\n solutionItemId: \"\",\r\n defaultWkid: undefined,\r\n solutionData: { metadata: {}, templates: [] },\r\n templateEdits: {},\r\n featureServices: [],\r\n spatialReferenceInfo: {\r\n enabled: false,\r\n services: {},\r\n spatialReference: undefined\r\n }\r\n}\r\n\r\nclass SolutionStore\r\n{\r\n protected static _instance: SolutionStore;\r\n\r\n protected _store: any;\r\n\r\n protected _hasChanges = false;\r\n\r\n protected _authentication: UserSession;\r\n\r\n /**\r\n * Creates singleton instance when accessed; default export from module.\r\n *\r\n * @returns Static instance of the class\r\n */\r\n public static get Store(): SolutionStore {\r\n return this._instance || (this._instance = new this());\r\n }\r\n\r\n /**\r\n * Creates an empty store.\r\n *\r\n * @protected\r\n */\r\n protected constructor() {\r\n this._store = createStore({\r\n ...EmptySolutionStore\r\n });\r\n }\r\n\r\n /**\r\n * Returns the stored information of an item.\r\n *\r\n * @param itemId Id of item to fetch\r\n *\r\n * @returns Item information or `undefined` if not found\r\n */\r\n public getItemInfo(\r\n itemId: string\r\n ): IItemTemplateEdit {\r\n console.log(\"getItemInfo for \" + itemId);//???\r\n const templates = this._store.get(\"solutionData\").templates as IItemTemplateEdit[];\r\n\r\n let template: IItemTemplateEdit;\r\n templates.some((t: IItemTemplateEdit) => {\r\n if (itemId == t.itemId) {\r\n template = t;\r\n return true;\r\n }\r\n return false;\r\n });\r\n\r\n return template;\r\n }\r\n\r\n /**\r\n * Returns a top-level store property: solutionItemId, defaultWkid, etc.\r\n *\r\n * @param propName Name of property\r\n *\r\n * @returns Value of property\r\n */\r\n public getStoreInfo(\r\n propName: string\r\n ): any {\r\n return this._store.get(propName);\r\n }\r\n\r\n /**\r\n * Loads a Solution into the store from AGO.\r\n *\r\n * @param solutionItemId Id of the solution represented in the store\r\n * @param authentication Credentials for fetching information to be loaded into the store\r\n *\r\n * @returns Promise that resolves when task is done\r\n */\r\n public async loadSolution(\r\n solutionItemId: string,\r\n authentication: UserSession\r\n ): Promise<void> {\r\n this._authentication = authentication;\r\n console.log(\"load solution \" + solutionItemId);//???\r\n\r\n const solutionData = await getItemDataAsJson(solutionItemId, authentication);\r\n if (solutionData) {\r\n const defaultWkid: string | number = getProp(solutionData, \"params.wkid.default\");\r\n await this._prepareSolutionItemsForEditing(solutionItemId, solutionData.templates, authentication);\r\n const featureServices = this._getFeatureServices(solutionData.templates);\r\n const spatialReferenceInfo = this._getSpatialReferenceInfo(featureServices, defaultWkid);\r\n\r\n this._store.set(\"solutionItemId\", solutionItemId);\r\n this._store.set(\"defaultWkid\", defaultWkid);\r\n this._store.set(\"solutionData\", solutionData);\r\n this._store.set(\"featureServices\", featureServices);\r\n this._store.set(\"spatialReferenceInfo\", spatialReferenceInfo);\r\n }\r\n this._flagStoreHasChanges(false);\r\n }\r\n\r\n /**\r\n * Queues the replacement of the thumbnail associated with a template item in the store.\r\n *\r\n * @param itemEdit Details of the template to modify, containing the new thumbnail in the `thumbnail`\r\n * property\r\n */\r\n public replaceItemThumbnail(\r\n itemEdit: IItemTemplateEdit\r\n ): void {\r\n // Flag the current thumbnail and any replacements for removal\r\n itemEdit.resourceFilePaths.forEach((path: IResourcePath) => {\r\n if (path.type === EFileType.Thumbnail) {\r\n if (path.updateType === EUpdateType.None) {\r\n // Existing thumbnail not yet flagged for removal\r\n path.updateType = EUpdateType.Remove;\r\n } else if (path.updateType === EUpdateType.Add || path.updateType === EUpdateType.Update) {\r\n // An earlier replacement\r\n path.updateType = EUpdateType.Obsolete;\r\n }\r\n }\r\n });\r\n\r\n // Remove any replacements already queued\r\n itemEdit.resourceFilePaths =\r\n itemEdit.resourceFilePaths.filter((path: IResourcePath) => path.updateType != EUpdateType.Obsolete)\r\n\r\n // Add the new thumbnail to the store item\r\n itemEdit.resourceFilePaths.push({\r\n blob: itemEdit.thumbnail,\r\n filename: itemEdit.thumbnail.name,\r\n type: EFileType.Thumbnail,\r\n updateType: EUpdateType.Add\r\n } as IResourcePath);\r\n\r\n // Update the store\r\n this.setItemInfo(itemEdit);\r\n }\r\n\r\n /**\r\n * Writes a Solution into AGO from the store. Must use `loadSolution` to continue with solution.\r\n *\r\n * @returns Promise that resolves when task is done\r\n */\r\n public async saveSolution(\r\n ): Promise<void> {\r\n // Update the templates in the original solution item data\r\n const solutionItemId = this._store.get(\"solutionItemId\");\r\n const solutionData = this._store.get(\"solutionData\");\r\n const spatialReferenceInfo = this._store.get(\"spatialReferenceInfo\");\r\n\r\n await this._prepareSolutionItemsForStorage(solutionItemId, solutionData.templates, this._authentication);\r\n const updatedDefaultWkid = this._setSpatialReferenceInfo(spatialReferenceInfo, solutionData.templates);\r\n if (updatedDefaultWkid) {\r\n setCreateProp(solutionData, \"params.wkid\", {\r\n \"label\": \"Spatial Reference\",\r\n \"default\": updatedDefaultWkid,\r\n \"valueType\": \"spatialReference\",\r\n \"attributes\": {\r\n \"required\": \"true\"\r\n }\r\n });\r\n } else {\r\n setCreateProp(solutionData, \"params.wkid\", {});\r\n }\r\n\r\n const itemInfo: IItemUpdate = {\r\n id: solutionItemId,\r\n text: solutionData\r\n };\r\n await updateItem(itemInfo, this._authentication);\r\n }\r\n\r\n /**\r\n * Stores information for item.\r\n *\r\n * @param itemEdit Item information\r\n */\r\n public setItemInfo(\r\n itemEdit: IItemTemplateEdit\r\n ): void {\r\n const solutionData = this._store.get(\"solutionData\");\r\n const templates = solutionData.templates as IItemTemplateEdit[];\r\n\r\n templates.some((t: IItemTemplateEdit) => {\r\n if (itemEdit.itemId == t.itemId) {\r\n t = itemEdit;\r\n this._store.set(\"solutionData\", solutionData);\r\n this._flagStoreHasChanges(true);\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n /**\r\n * Sets a top-level store property: solutionItemId, defaultWkid, etc.\r\n *\r\n * @param propName Name of property\r\n * @param value Value of property\r\n */\r\n public setStoreInfo(\r\n propName: string,\r\n value: any\r\n ): void {\r\n this._store.set(propName, value);\r\n this._flagStoreHasChanges(true);\r\n}\r\n\r\n //------------------------------------------------------------------------------------------------------------------//\r\n\r\n /** Provides access to protected methods for unit testing.\r\n *\r\n * @param methodName Name of protected method to run\r\n * @param arg1 First argument to forward to method, e.g., for \"_prepareSolutionItemsForEditing\", `solutionItemId`\r\n * @param arg2 Second argument to forward to method, e.g., for \"_prepareSolutionItemsForEditing\", `templates`\r\n * @param arg3 Third argument to forward to method, e.g., for \"_prepareSolutionItemsForEditing\", `authentication`\r\n *\r\n * @returns\r\n */\r\n public _testAccess(\r\n methodName: string,\r\n arg1?: any,\r\n arg2?: any,\r\n arg3?: any\r\n ): any {\r\n switch (methodName) {\r\n case \"_emptyTheStore\":\r\n this._emptyTheStore();\r\n break;\r\n case \"_getFeatureServices\":\r\n return this._getFeatureServices(arg1);\r\n case \"_getItemsSharedWithThisGroup\":\r\n return this._getItemsSharedWithThisGroup(arg1, arg2);\r\n case \"_getResourceFilePaths\":\r\n return this._getResourceFilePaths(arg1, arg2, arg3);\r\n case \"_getResourceStorageName\":\r\n return this._getResourceStorageName(arg1, arg2);\r\n case \"_getSpatialReferenceInfo\":\r\n return this._getSpatialReferenceInfo(arg1, arg2);\r\n case \"_prepareSolutionItemsForEditing\":\r\n return this._prepareSolutionItemsForEditing(arg1, arg2, arg3);\r\n case \"_prepareSolutionItemsForStorage\":\r\n return this._prepareSolutionItemsForStorage(arg1, arg2, arg3);\r\n case \"_setSpatialReferenceInfo\":\r\n return this._setSpatialReferenceInfo(arg1, arg2);\r\n case \"_splitFilename\":\r\n return this._splitFilename(arg1);\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the store to the empty state.\r\n *\r\n * @protected\r\n */\r\n protected _emptyTheStore(): void {\r\n this._store.set(\"solutionItemId\", EmptySolutionStore.solutionItemId);\r\n this._store.set(\"defaultWkid\", EmptySolutionStore.defaultWkid);\r\n this._store.set(\"solutionData\", EmptySolutionStore.solutionData);\r\n this._store.set(\"templateEdits\", EmptySolutionStore.templateEdits);\r\n this._store.set(\"featureServices\", EmptySolutionStore.featureServices);\r\n this._store.set(\"spatialReferenceInfo\", EmptySolutionStore.spatialReferenceInfo);\r\n }\r\n\r\n /**\r\n * Sets the store's flag indicating if it has changes and dispatches an event when\r\n * the flag value changes.\r\n *\r\n * @param flagHasChanges Current state of change in the store; if it doesn't match the value saved in this\r\n * object, an event is dispatched with the new value and the saved value is updated\r\n *\r\n * @protected\r\n */\r\n protected _flagStoreHasChanges(flagHasChanges: boolean): void {\r\n // Event for notifying if the store has changes or not\r\n if (this._hasChanges !== flagHasChanges) {\r\n window.dispatchEvent(new CustomEvent(\"solutionStoreHasChanges\", {\r\n detail: flagHasChanges,\r\n bubbles: true,\r\n cancelable: false,\r\n composed: true\r\n }));\r\n }\r\n\r\n this._hasChanges = flagHasChanges;\r\n }\r\n\r\n /**\r\n * Gets a list of Feature Services that are not views.\r\n *\r\n * @param templates A list of item templates from the solution\r\n *\r\n * @returns a list of feature services\r\n *\r\n * @protected\r\n */\r\n protected _getCustomizableFeatureServices(\r\n templates: IItemTemplate[]\r\n ): IItemTemplate[] {\r\n return templates.reduce((prev, cur) => {\r\n if (cur.type === \"Feature Service\" && cur.item.typeKeywords.indexOf(\"View Service\") < 0) {\r\n prev.push(cur);\r\n }\r\n return prev;\r\n }, []);\r\n }\r\n\r\n /**\r\n * Gets a list of Feature Services that are not views along with an enabled property that indicates\r\n * if the service currently uses a spatial reference variable.\r\n *\r\n * @param templates A list of item templates from the solution\r\n *\r\n * @returns a list of feature service names and an enabled property to indicate\r\n * if they currently use a spatial reference variable.\r\n *\r\n * @protected\r\n */\r\n protected _getFeatureServices(\r\n templates: IItemTemplate[]\r\n ): IFeatureServiceEnabledStatus[] {\r\n const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);\r\n return customizeableFeatureServices.map(\r\n (fs) => {\r\n const name: string = fs.item.title || fs.item.name;\r\n const wkid = getProp(fs, \"properties.service.spatialReference.wkid\");\r\n return { name, enabled: wkid.toString().startsWith(\"{{params.wkid||\") } as IFeatureServiceEnabledStatus;\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Capture the key item details for a given group template\r\n *\r\n * @param template one of the templates from the current solution\r\n * @param templates full list of templates\r\n *\r\n * @returns a list of IItemShare objects\r\n *\r\n * @protected\r\n */\r\n protected _getItemsSharedWithThisGroup(\r\n template: IItemTemplate,\r\n templates: IItemTemplate[]\r\n ): IItemShare[] {\r\n return templates.reduce((prev, cur) => {\r\n if (cur.itemId !== template.itemId && cur.type !== \"Group\") {\r\n prev.push({\r\n id: cur.itemId,\r\n title: cur.item.name || cur.item.title,\r\n isShared: (cur.groups || []).indexOf(template.itemId) > -1,\r\n shareItem: (cur.groups || []).indexOf(template.itemId) > -1,\r\n type: cur.type,\r\n typeKeywords: cur.item.typeKeywords\r\n });\r\n }\r\n return prev;\r\n }, []);\r\n }\r\n\r\n /**\r\n * Generate storage file paths from the solution template\r\n *\r\n * @param solutionId the id of the current solution\r\n * @param template the current template from the solution\r\n * @param portal Portal where file is to be found\r\n *\r\n * @returns a list of resource file infos\r\n *\r\n * @protected\r\n */\r\n protected _getResourceFilePaths(\r\n solutionId: string,\r\n template: any,\r\n portal: string\r\n ): IResourcePath[] {\r\n const resourceFilePaths: IDeployFileCopyPath[] = generateStorageFilePaths(\r\n portal,\r\n solutionId,\r\n template.resources,\r\n SolutionTemplateFormatVersion\r\n );\r\n return resourceFilePaths.map((fp: any) => {\r\n fp.updateType = EUpdateType.None;\r\n return fp;\r\n }) as IResourcePath[];\r\n }\r\n\r\n /**\r\n * Generates a resource name from a storage file path.\r\n *\r\n * @param templateItemId The id of the template item whose resource this is; used as a prefix in the resource name\r\n * @param resourcePath Resource file infos\r\n *\r\n * @returns The resource name to use when attaching a resource to the item.\r\n *\r\n * @protected\r\n */\r\n protected _getResourceStorageName(\r\n templateItemId: string,\r\n resourcePath: IResourcePath\r\n ): string {\r\n /* Converts\r\n {\r\n \"url\": \"https://myorg.maps.arcgis.com/sharing/rest/content/items/ca924c6db7d247b9a31fa30532fb5913/resources/79036430a6274e17ae915d0278b8569c_info_metadata/metadata.xml\",\r\n \"type\": 2,\r\n \"folder\": \"\",\r\n \"filename\": \"metadata.xml\",\r\n \"updateType\": 3\r\n }\r\n to\r\n ca924c6db7d247b9a31fa30532fb5913_info_metadata/metadata.xml\r\n */\r\n let prefix = templateItemId;\r\n switch (resourcePath.type) {\r\n case EFileType.Data:\r\n prefix = `${prefix}_info_data`;\r\n break;\r\n case EFileType.Info:\r\n prefix = `${prefix}_info`;\r\n break;\r\n case EFileType.Metadata:\r\n prefix = `${prefix}_info_metadata`;\r\n break;\r\n case EFileType.Resource:\r\n break;\r\n case EFileType.Thumbnail:\r\n prefix = `${prefix}_info_thumbnail`;\r\n break;\r\n }\r\n\r\n let filenameToUse = resourcePath.filename;\r\n if (resourcePath.type == EFileType.Data && filenameToUse && !isSupportedFileType(filenameToUse)) {\r\n filenameToUse = filenameToUse + \".zip\";\r\n prefix += \"z\";\r\n }\r\n\r\n const filename = resourcePath.folder ? resourcePath.folder + \"/\" + filenameToUse : filenameToUse;\r\n\r\n return prefix + \"/\" + filename;\r\n }\r\n\r\n /**\r\n * Extracts basic spatial reference information that is used to determine if a custom spatial reference parameter will\r\n * be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be\r\n *\r\n * @param services a list of objects with service name and enabled property (indicates if they currently use a spatial reference var)\r\n * @param data the data object of a solution item\r\n *\r\n * @returns an object that stores if a custom spatial reference parameter is enabled/disabled,\r\n * a list of services and if they are enabled/disabled, and the default wkid\r\n *\r\n * @protected\r\n */\r\n protected _getSpatialReferenceInfo(\r\n services: any[],\r\n defaultWkid: string | number\r\n ): ISolutionSpatialReferenceInfo {\r\n const defaultServices: any = {};\r\n services.forEach(service => {\r\n defaultServices[service.name] = service.enabled;\r\n });\r\n\r\n return {\r\n enabled: defaultWkid !== undefined,\r\n services: defaultServices,\r\n spatialReference: defaultWkid ? defaultWkid : undefined\r\n }\r\n }\r\n\r\n /**\r\n * Create and store template items for the editor.\r\n *\r\n * @param solutionItemId Id of the solution represented in the store\r\n * @param templates A list of item templates from the solution\r\n * @param authentication Credentials for fetching information to be loaded into the store\r\n *\r\n * @returns a promise that resolves when the templates are ready\r\n *\r\n * @protected\r\n */\r\n protected async _prepareSolutionItemsForEditing(\r\n solutionItemId: string,\r\n templates: IItemTemplate[],\r\n authentication: UserSession\r\n ): Promise<void> {\r\n const thumbnailPromises = [];\r\n\r\n // Augment the template with paths to resources and group information, if relevant\r\n templates.forEach((t: IItemTemplateEdit) => {\r\n t.resourceFilePaths = this._getResourceFilePaths(\r\n solutionItemId,\r\n t,\r\n authentication.portal\r\n );\r\n thumbnailPromises.push(\r\n t.resourceFilePaths.length > 0 ?\r\n getThumbnailFromStorageItem(authentication, t.resourceFilePaths) :\r\n Promise.resolve()\r\n );\r\n\r\n t.groupDetails = t.type === \"Group\" ? this._getItemsSharedWithThisGroup(t, templates) : [];\r\n });\r\n\r\n // Augment the template with its thumbnail file\r\n const thumbnails = await Promise.all(thumbnailPromises);\r\n templates.forEach((t: IItemTemplateEdit, i: number) => {\r\n t.thumbnail = thumbnails[i] ? thumbnails[i] : undefined;\r\n });\r\n\r\n return Promise.resolve();\r\n }\r\n\r\n /**\r\n * Prepares template items for sending to AGO by updating the resources held by the solution item.\r\n *\r\n * @param solutionItemId Id of the solution represented in the store\r\n * @param templates A list of item templates from the solution\r\n * @param authentication Credentials for fetching information to be loaded into the store\r\n *\r\n * @returns a promise that resolves when the templates are ready\r\n *\r\n * @protected\r\n */\r\n protected async _prepareSolutionItemsForStorage(\r\n solutionItemId: string,\r\n templates: IItemTemplateEdit[],\r\n authentication: UserSession\r\n ): Promise<void> {\r\n const resourceAdds: ISourceFile[] = [];\r\n\r\n // Update the resources and remove the augmentation from a template\r\n const pendingTasks: Promise<void>[] = [];\r\n templates.forEach((t) => {\r\n\r\n // Run through the resourceFilePaths for the item seeking modifications to be made to the solution item's\r\n // collection of resources; queue them for batching\r\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\r\n t.resourceFilePaths.forEach(async (path: IResourcePath): Promise<void> => {\r\n const storageName = this._getResourceStorageName(t.itemId, path);\r\n\r\n switch (path.updateType) {\r\n\r\n case EUpdateType.Add:\r\n const {prefix, suffix } = this._splitFilename(storageName);\r\n t.resources.push(storageName);\r\n resourceAdds.push({\r\n itemId: t.itemId,\r\n file: path.blob,\r\n folder: prefix,\r\n filename: suffix\r\n } as ISourceFile);\r\n break;\r\n\r\n case EUpdateType.Update:\r\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\r\n pendingTasks.push(new Promise<void>(async (resolve): Promise<void> => {\r\n try {\r\n await updateItemResourceFile(solutionItemId, storageName, path.blob, authentication);\r\n } catch (err) {\r\n console.log(\"Unable to update \" + storageName + \" for item \" + t.itemId + \": \" + JSON.stringify(err));\r\n }\r\n resolve();\r\n }));\r\n break;\r\n\r\n case EUpdateType.Remove:\r\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\r\n pendingTasks.push(new Promise<void>(async (resolve): Promise<void> => {\r\n try {\r\n await removeItemResourceFile(solutionItemId, storageName, authentication);\r\n t.resources = t.resources.filter((path: string) => path !== storageName);\r\n } catch (err) {\r\n console.log(\"Unable to remove \" + storageName + \" for item \" + t.itemId + \": \" + JSON.stringify(err));\r\n }\r\n resolve();\r\n }));\r\n break;\r\n\r\n }\r\n return Promise.resolve();\r\n });\r\n\r\n delete t.resourceFilePaths;\r\n delete t.thumbnail;\r\n delete t.groupDetails;\r\n });\r\n\r\n // Update the resources\r\n return Promise.all(pendingTasks)\r\n .then(async () => {\r\n if (resourceAdds.length > 0) {\r\n await copyFilesToStorageItem(resourceAdds, solutionItemId, authentication);\r\n }\r\n return Promise.resolve();\r\n });\r\n }\r\n\r\n /**\r\n * Stores basic spatial reference information that is used to determine if a custom spatial reference parameter will\r\n * be exposed while deploying this solution and if so what feature services will support it and what will the default wkid be\r\n *\r\n * @param spatialReferenceInfo The configuration settings for a custom spatial reference\r\n * @param templates The templates in the current solution, which will be updated in place if\r\n * `spatialReferenceInfo.enabled` is true\r\n *\r\n * @returns The new default wkid\r\n *\r\n * @protected\r\n */\r\n protected _setSpatialReferenceInfo(\r\n spatialReferenceInfo: ISolutionSpatialReferenceInfo,\r\n templates: IItemTemplateEdit[]\r\n ): string | number {\r\n const customizingPrefix = \"{{params.wkid||\";\r\n const customizeableFeatureServices = this._getCustomizableFeatureServices(templates);\r\n\r\n if (spatialReferenceInfo.enabled) {\r\n // Enable or disable this feature in each service\r\n customizeableFeatureServices.forEach(\r\n (fs) => {\r\n const name: string = fs.item.title || fs.item.name;\r\n let wkid: any;\r\n if (spatialReferenceInfo.services[name] ) { // enabled\r\n wkid = `{{params.wkid||${spatialReferenceInfo.spatialReference}}}`;\r\n setCreateProp(fs, \"properties.service.spatialReference.wkid\", wkid);\r\n\r\n } else { // disabled\r\n wkid = getProp(fs, \"properties.service.spatialReference.wkid\");\r\n // Remove customizing prefix if present\r\n if (wkid.toString().startsWith(customizingPrefix)) {\r\n wkid = wkid.toString().substring(customizingPrefix.length, wkid.length - 2);\r\n setCreateProp(fs, \"properties.service.spatialReference.wkid\", wkid);\r\n }\r\n }\r\n }\r\n );\r\n return spatialReferenceInfo.spatialReference;\r\n\r\n } else {\r\n // Disable this feature in each service\r\n customizeableFeatureServices.forEach(\r\n (fs) => {\r\n const wkid = getProp(fs, \"properties.service.spatialReference.wkid\");\r\n // Remove customizing prefix if present\r\n if (wkid.toString().startsWith(customizingPrefix)) {\r\n setCreateProp(fs, \"properties.service.spatialReference.wkid\",\r\n wkid.toString().substring(customizingPrefix.length, wkid.length - 2));\r\n }\r\n }\r\n );\r\n return undefined;\r\n }\r\n }\r\n\r\n /**\r\n * Splits a pathed filename into a last term and a prefix; e.g., \"a/b/c\" returns \"c\" with a prefix of \"a/b\".\r\n *\r\n * @param filename Filename with optional path\r\n *\r\n * @returns An object consisting of a `prefix` (undefined if `filename` does not contain a path) and a `suffix`--the\r\n * filename at the end of a path\r\n *\r\n * @protected\r\n */\r\n protected _splitFilename(\r\n filename: string\r\n ): { prefix: string, suffix: string } {\r\n const filenameParts = filename.split(\"/\");\r\n return {\r\n prefix: filenameParts.length > 1 ? filenameParts.slice(0, filenameParts.length - 1).join(\"/\") : undefined,\r\n suffix: filenameParts[filenameParts.length - 1]\r\n };\r\n }\r\n}\r\n\r\nexport default SolutionStore.Store;\r\n"]}
@@ -141,6 +141,7 @@ class SolutionStore
141
141
  public getItemInfo(
142
142
  itemId: string
143
143
  ): IItemTemplateEdit {
144
+ console.log("getItemInfo for " + itemId);//???
144
145
  const templates = this._store.get("solutionData").templates as IItemTemplateEdit[];
145
146
 
146
147
  let template: IItemTemplateEdit;
@@ -181,6 +182,7 @@ class SolutionStore
181
182
  authentication: UserSession
182
183
  ): Promise<void> {
183
184
  this._authentication = authentication;
185
+ console.log("load solution " + solutionItemId);//???
184
186
 
185
187
  const solutionData = await getItemDataAsJson(solutionItemId, authentication);
186
188
  if (solutionData) {
@@ -15,7 +15,7 @@ import { o as getItemIndex, m as mutationObserverCallback, d as deselectRemovedI
15
15
  import { I as ICON_TYPES$1 } from './resources-2235e4ff.js';
16
16
  import { C as CSS$2, S as SLOTS$3 } from './resources-e3a5cf27.js';
17
17
  import { g as getLocaleComponentStrings } from './locale-0e10d7e5.js';
18
- import { s as state, E as EFileType } from './solution-store-c1f6173a.js';
18
+ import { s as state, E as EFileType } from './solution-store-0c58c852.js';
19
19
  import { c as EUpdateType } from './interfaces-e2a2064d.js';
20
20
  import './resources-436ae282.js';
21
21
  import './array-2ab3b18f.js';
@@ -1810,9 +1810,7 @@ const SolutionItemDetails = class {
1810
1810
  this.thumbnailContainer = undefined;
1811
1811
  }
1812
1812
  itemIdWatchHandler() {
1813
- this.itemEdit = state.getItemInfo(this.itemId);
1814
- this.itemDetails = this.itemEdit.item;
1815
- this.itemType = this.itemDetails.type;
1813
+ console.log("update item details; id " + this.itemId); //???
1816
1814
  }
1817
1815
  //--------------------------------------------------------------------------
1818
1816
  //
@@ -1825,15 +1823,27 @@ const SolutionItemDetails = class {
1825
1823
  async componentWillLoad() {
1826
1824
  return this._getTranslations();
1827
1825
  }
1828
- componentDidRender() {
1829
- this._loadThumb();
1826
+ async componentWillRender() {
1827
+ console.log("update item details " + this.itemId); //???
1828
+ this.itemEdit = state.getItemInfo(this.itemId);
1829
+ if (this.itemEdit) {
1830
+ this.itemDetails = this.itemEdit.item;
1831
+ this.itemType = this.itemDetails.type;
1832
+ }
1833
+ return Promise.resolve();
1830
1834
  }
1831
1835
  /**
1832
1836
  * Renders the component.
1833
1837
  */
1834
1838
  render() {
1839
+ console.log("render item details " + this.itemId); //???
1840
+ console.log(" title " + this.itemDetails.title); //???
1841
+ console.log(" snippet " + this.itemDetails.snippet); //???
1835
1842
  return (h(Host, null, h("div", { class: "parent-container" }, h("div", { class: "inputBottomSeparation" }, h("calcite-input", { id: "item-title", value: this.itemDetails.title })), h("div", { class: "inputBottomSeparation" }, h("input", { accept: ".jpg,.gif,.png,image/jpg,image/gif,image/png", class: "display-none", onChange: (event) => (this._updateThumbnail(event)), ref: (el) => (this.browseForThumbnail = el), type: "file" }), h("button", { class: "font-size--3 btn-link inline-block trailer-quarter", onClick: () => this._getThumbnail() }, h("svg", { class: "icon-inline icon-inline--on-left", height: "16", viewBox: "0 0 16 16", width: "16" }, h("path", { d: "M14.792 2.666l-1.414-1.413a.965.965 0 0 0-1.385-.03l-1.444 1.444-8.763 8.72L.03 15.481a.371.371 0 0 0 .488.488l4.096-1.756 8.763-8.72-.001-.001.002.002 1.443-1.444a.965.965 0 0 0-.03-1.385zM1.569 14.431l.554-1.293.74.739zm2.338-.924l-1.414-1.414 7.963-7.92 1.414 1.415zm8.67-8.626l-1.413-1.414 1.29-1.29a.306.306 0 0 1 .433 0l.981.98a.306.306 0 0 1 0 .433z" })), this._translations.editThumbnail), h("div", { class: "flex" }, h("div", { class: "img-container", ref: (el) => (this.thumbnailContainer = el) }, h("img", { class: "scale-down", height: "133", id: "item-thumbnail", ref: (el) => (this.thumbnail = el), width: "200" })), h("div", { class: "snippet-count-container" }, h("calcite-input", { id: "item-snippet", maxlength: 250, type: "textarea", value: this.itemDetails.snippet }), h("label", { class: "font-size--3", id: "item-snippet-count", ref: (el) => (this.itemSnippetCount = el) })))), h("calcite-label", null, this._translations.description, h("label", { id: "item-description-label" }, h("calcite-input", { id: "item-description", type: "textarea", value: this.itemDetails.description }))), h("calcite-label", null, this._translations.tags, h("label", { id: "item-tags-label" }, h("calcite-input", { id: "item-tags", value: (this.itemDetails.tags && Array.isArray(this.itemDetails.tags) ? this.itemDetails.tags : [this.itemDetails.tags]).join(",") }))), this.itemType !== "Group" ? h("calcite-label", null, this._translations.credits, h("label", { id: "item-credits-label" }, h("calcite-input", { id: "item-credits", value: this.itemDetails.accessInformation }))) : null, this.itemType !== "Group" ? h("calcite-label", null, h("label", { id: "item-terms-label" }, this._translations.termsOfUse, h("calcite-input", { id: "item-terms", type: "textarea", value: this.itemDetails.licenseInfo }))) : null)));
1836
1843
  }
1844
+ componentDidRender() {
1845
+ this._loadThumb();
1846
+ }
1837
1847
  //--------------------------------------------------------------------------
1838
1848
  //
1839
1849
  // Event Listeners