@itwin/map-layers 5.4.3 → 5.5.0

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 (306) hide show
  1. package/CHANGELOG.md +19 -2
  2. package/README.md +7 -7
  3. package/lib/cjs/BrowserStorage.d.ts +1 -1
  4. package/lib/cjs/BrowserStorage.d.ts.map +1 -1
  5. package/lib/cjs/BrowserStorage.js +24 -14
  6. package/lib/cjs/BrowserStorage.js.map +1 -1
  7. package/lib/cjs/CustomParamUtils.d.ts +1 -1
  8. package/lib/cjs/CustomParamUtils.d.ts.map +1 -1
  9. package/lib/cjs/CustomParamUtils.js +18 -7
  10. package/lib/cjs/CustomParamUtils.js.map +1 -1
  11. package/lib/cjs/CustomParamsMappingStorage.d.ts +1 -1
  12. package/lib/cjs/CustomParamsMappingStorage.d.ts.map +1 -1
  13. package/lib/cjs/CustomParamsMappingStorage.js +3 -3
  14. package/lib/cjs/CustomParamsMappingStorage.js.map +1 -1
  15. package/lib/cjs/CustomParamsStorage.d.ts +1 -1
  16. package/lib/cjs/CustomParamsStorage.d.ts.map +1 -1
  17. package/lib/cjs/CustomParamsStorage.js +3 -3
  18. package/lib/cjs/CustomParamsStorage.js.map +1 -1
  19. package/lib/cjs/MapLayerPreferences.d.ts +2 -1
  20. package/lib/cjs/MapLayerPreferences.d.ts.map +1 -1
  21. package/lib/cjs/MapLayerPreferences.js +50 -25
  22. package/lib/cjs/MapLayerPreferences.js.map +1 -1
  23. package/lib/cjs/MapLayersActionIds.d.ts +5 -0
  24. package/lib/cjs/MapLayersActionIds.d.ts.map +1 -0
  25. package/lib/cjs/MapLayersActionIds.js +10 -0
  26. package/lib/cjs/MapLayersActionIds.js.map +1 -0
  27. package/lib/cjs/MapLayersPrefBrowserStorage.d.ts.map +1 -1
  28. package/lib/cjs/MapLayersPrefBrowserStorage.js +4 -5
  29. package/lib/cjs/MapLayersPrefBrowserStorage.js.map +1 -1
  30. package/lib/cjs/PreferencesBrowserStorage.d.ts +18 -18
  31. package/lib/cjs/PreferencesBrowserStorage.d.ts.map +1 -1
  32. package/lib/cjs/PreferencesBrowserStorage.js +14 -14
  33. package/lib/cjs/PreferencesBrowserStorage.js.map +1 -1
  34. package/lib/cjs/map-layers.d.ts +1 -0
  35. package/lib/cjs/map-layers.d.ts.map +1 -1
  36. package/lib/cjs/map-layers.js +4 -3
  37. package/lib/cjs/map-layers.js.map +1 -1
  38. package/lib/cjs/mapLayers.d.ts +2 -2
  39. package/lib/cjs/mapLayers.d.ts.map +1 -1
  40. package/lib/cjs/mapLayers.js.map +1 -1
  41. package/lib/cjs/public/locales/en/mapLayers.json +179 -184
  42. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts +3 -2
  43. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  44. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +48 -16
  45. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  46. package/lib/cjs/ui/Interfaces.d.ts +3 -3
  47. package/lib/cjs/ui/Interfaces.d.ts.map +1 -1
  48. package/lib/cjs/ui/Interfaces.js.map +1 -1
  49. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +3 -2
  50. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  51. package/lib/cjs/ui/MapLayersUiItemsProvider.js +2 -6
  52. package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
  53. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  54. package/lib/cjs/ui/widget/AttachLayerPopupButton.js +81 -46
  55. package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
  56. package/lib/cjs/ui/widget/BasemapPanel.d.ts.map +1 -1
  57. package/lib/cjs/ui/widget/BasemapPanel.js +44 -25
  58. package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
  59. package/lib/cjs/ui/widget/BasemapPanel.scss +2 -4
  60. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +1 -1
  61. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  62. package/lib/cjs/ui/widget/ConfirmMessageDialog.js +31 -8
  63. package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
  64. package/lib/cjs/ui/widget/CustomParamEditDialog.d.ts +1 -1
  65. package/lib/cjs/ui/widget/CustomParamEditDialog.d.ts.map +1 -1
  66. package/lib/cjs/ui/widget/CustomParamEditDialog.js +34 -20
  67. package/lib/cjs/ui/widget/CustomParamEditDialog.js.map +1 -1
  68. package/lib/cjs/ui/widget/CustomParamEditDialog.scss +1 -2
  69. package/lib/cjs/ui/widget/CustomParamsSettings.d.ts.map +1 -1
  70. package/lib/cjs/ui/widget/CustomParamsSettings.js +43 -28
  71. package/lib/cjs/ui/widget/CustomParamsSettings.js.map +1 -1
  72. package/lib/cjs/ui/widget/CustomParamsSettings.scss +7 -9
  73. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +3 -2
  74. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
  75. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +4 -2
  76. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  77. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +1 -1
  78. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  79. package/lib/cjs/ui/widget/FeatureInfoWidget.js +36 -6
  80. package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
  81. package/lib/cjs/ui/widget/MapLayerActionButtons.d.ts +1 -1
  82. package/lib/cjs/ui/widget/MapLayerActionButtons.d.ts.map +1 -1
  83. package/lib/cjs/ui/widget/MapLayerActionButtons.js +30 -17
  84. package/lib/cjs/ui/widget/MapLayerActionButtons.js.map +1 -1
  85. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +2 -2
  86. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  87. package/lib/cjs/ui/widget/MapLayerDroppable.js +64 -50
  88. package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
  89. package/lib/cjs/ui/widget/MapLayerManager.d.ts +2 -2
  90. package/lib/cjs/ui/widget/MapLayerManager.d.ts.map +1 -1
  91. package/lib/cjs/ui/widget/MapLayerManager.js +160 -86
  92. package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
  93. package/lib/cjs/ui/widget/MapLayerManager.scss +3 -6
  94. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +2 -2
  95. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  96. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +33 -13
  97. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  98. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  99. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +36 -14
  100. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  101. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +5 -5
  102. package/lib/cjs/ui/widget/MapLayersWidget.d.ts +1 -1
  103. package/lib/cjs/ui/widget/MapLayersWidget.d.ts.map +1 -1
  104. package/lib/cjs/ui/widget/MapLayersWidget.js +34 -11
  105. package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
  106. package/lib/cjs/ui/widget/MapManagerMapLayersHeader.d.ts.map +1 -1
  107. package/lib/cjs/ui/widget/MapManagerMapLayersHeader.js +5 -8
  108. package/lib/cjs/ui/widget/MapManagerMapLayersHeader.js.map +1 -1
  109. package/lib/cjs/ui/widget/MapManagerSettings.d.ts.map +1 -1
  110. package/lib/cjs/ui/widget/MapManagerSettings.js +55 -56
  111. package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
  112. package/lib/cjs/ui/widget/MapManagerSettings.scss +1 -1
  113. package/lib/cjs/ui/widget/MapSelectFeaturesDialog.d.ts +2 -2
  114. package/lib/cjs/ui/widget/MapSelectFeaturesDialog.d.ts.map +1 -1
  115. package/lib/cjs/ui/widget/MapSelectFeaturesDialog.js +33 -18
  116. package/lib/cjs/ui/widget/MapSelectFeaturesDialog.js.map +1 -1
  117. package/lib/cjs/ui/widget/MapSelectFeaturesDialog.scss +1 -3
  118. package/lib/cjs/ui/widget/MapUrlDialog.d.ts +4 -3
  119. package/lib/cjs/ui/widget/MapUrlDialog.d.ts.map +1 -1
  120. package/lib/cjs/ui/widget/MapUrlDialog.js +125 -96
  121. package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
  122. package/lib/cjs/ui/widget/MapUrlDialog.scss +6 -7
  123. package/lib/cjs/ui/widget/SelectApiKey.d.ts.map +1 -1
  124. package/lib/cjs/ui/widget/SelectApiKey.js +38 -10
  125. package/lib/cjs/ui/widget/SelectApiKey.js.map +1 -1
  126. package/lib/cjs/ui/widget/SelectCustomParam.d.ts.map +1 -1
  127. package/lib/cjs/ui/widget/SelectCustomParam.js +40 -11
  128. package/lib/cjs/ui/widget/SelectCustomParam.js.map +1 -1
  129. package/lib/cjs/ui/widget/SelectMapFormat.d.ts +3 -3
  130. package/lib/cjs/ui/widget/SelectMapFormat.d.ts.map +1 -1
  131. package/lib/cjs/ui/widget/SelectMapFormat.js +35 -13
  132. package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
  133. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +2 -2
  134. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  135. package/lib/cjs/ui/widget/SubLayersDataProvider.js +13 -9
  136. package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
  137. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +1 -1
  138. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  139. package/lib/cjs/ui/widget/SubLayersPopupButton.js +30 -12
  140. package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
  141. package/lib/cjs/ui/widget/SubLayersTree.d.ts +2 -2
  142. package/lib/cjs/ui/widget/SubLayersTree.d.ts.map +1 -1
  143. package/lib/cjs/ui/widget/SubLayersTree.js +83 -45
  144. package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
  145. package/lib/cjs/ui/widget/SubLayersTree.scss +4 -7
  146. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  147. package/lib/cjs/ui/widget/TransparencyPopupButton.js +33 -16
  148. package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
  149. package/lib/cjs/ui/widget/TransparencyPopupButton.scss +1 -2
  150. package/lib/cjs/ui/widget/UserPreferencesStorageOptions.d.ts +1 -1
  151. package/lib/cjs/ui/widget/UserPreferencesStorageOptions.d.ts.map +1 -1
  152. package/lib/cjs/ui/widget/UserPreferencesStorageOptions.js +2 -8
  153. package/lib/cjs/ui/widget/UserPreferencesStorageOptions.js.map +1 -1
  154. package/lib/esm/BrowserStorage.d.ts +1 -1
  155. package/lib/esm/BrowserStorage.d.ts.map +1 -1
  156. package/lib/esm/BrowserStorage.js +24 -14
  157. package/lib/esm/BrowserStorage.js.map +1 -1
  158. package/lib/esm/CustomParamUtils.d.ts +1 -1
  159. package/lib/esm/CustomParamUtils.d.ts.map +1 -1
  160. package/lib/esm/CustomParamUtils.js +18 -7
  161. package/lib/esm/CustomParamUtils.js.map +1 -1
  162. package/lib/esm/CustomParamsMappingStorage.d.ts +1 -1
  163. package/lib/esm/CustomParamsMappingStorage.d.ts.map +1 -1
  164. package/lib/esm/CustomParamsMappingStorage.js +3 -3
  165. package/lib/esm/CustomParamsMappingStorage.js.map +1 -1
  166. package/lib/esm/CustomParamsStorage.d.ts +1 -1
  167. package/lib/esm/CustomParamsStorage.d.ts.map +1 -1
  168. package/lib/esm/CustomParamsStorage.js +3 -3
  169. package/lib/esm/CustomParamsStorage.js.map +1 -1
  170. package/lib/esm/MapLayerPreferences.d.ts +2 -1
  171. package/lib/esm/MapLayerPreferences.d.ts.map +1 -1
  172. package/lib/esm/MapLayerPreferences.js +50 -25
  173. package/lib/esm/MapLayerPreferences.js.map +1 -1
  174. package/lib/esm/MapLayersActionIds.d.ts +5 -0
  175. package/lib/esm/MapLayersActionIds.d.ts.map +1 -0
  176. package/lib/esm/MapLayersActionIds.js +7 -0
  177. package/lib/esm/MapLayersActionIds.js.map +1 -0
  178. package/lib/esm/MapLayersPrefBrowserStorage.d.ts.map +1 -1
  179. package/lib/esm/MapLayersPrefBrowserStorage.js +4 -5
  180. package/lib/esm/MapLayersPrefBrowserStorage.js.map +1 -1
  181. package/lib/esm/PreferencesBrowserStorage.d.ts +18 -18
  182. package/lib/esm/PreferencesBrowserStorage.d.ts.map +1 -1
  183. package/lib/esm/PreferencesBrowserStorage.js +14 -14
  184. package/lib/esm/PreferencesBrowserStorage.js.map +1 -1
  185. package/lib/esm/map-layers.d.ts +1 -0
  186. package/lib/esm/map-layers.d.ts.map +1 -1
  187. package/lib/esm/map-layers.js +4 -3
  188. package/lib/esm/map-layers.js.map +1 -1
  189. package/lib/esm/mapLayers.d.ts +2 -2
  190. package/lib/esm/mapLayers.d.ts.map +1 -1
  191. package/lib/esm/mapLayers.js.map +1 -1
  192. package/lib/esm/public/locales/en/mapLayers.json +179 -184
  193. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +3 -2
  194. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  195. package/lib/esm/ui/FeatureInfoUiItemsProvider.js +48 -16
  196. package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  197. package/lib/esm/ui/Interfaces.d.ts +3 -3
  198. package/lib/esm/ui/Interfaces.d.ts.map +1 -1
  199. package/lib/esm/ui/Interfaces.js.map +1 -1
  200. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +3 -2
  201. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  202. package/lib/esm/ui/MapLayersUiItemsProvider.js +2 -6
  203. package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
  204. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  205. package/lib/esm/ui/widget/AttachLayerPopupButton.js +57 -45
  206. package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
  207. package/lib/esm/ui/widget/BasemapPanel.d.ts.map +1 -1
  208. package/lib/esm/ui/widget/BasemapPanel.js +19 -23
  209. package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
  210. package/lib/esm/ui/widget/BasemapPanel.scss +2 -4
  211. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +1 -1
  212. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  213. package/lib/esm/ui/widget/ConfirmMessageDialog.js +5 -5
  214. package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
  215. package/lib/esm/ui/widget/CustomParamEditDialog.d.ts +1 -1
  216. package/lib/esm/ui/widget/CustomParamEditDialog.d.ts.map +1 -1
  217. package/lib/esm/ui/widget/CustomParamEditDialog.js +9 -18
  218. package/lib/esm/ui/widget/CustomParamEditDialog.js.map +1 -1
  219. package/lib/esm/ui/widget/CustomParamEditDialog.scss +1 -2
  220. package/lib/esm/ui/widget/CustomParamsSettings.d.ts.map +1 -1
  221. package/lib/esm/ui/widget/CustomParamsSettings.js +18 -26
  222. package/lib/esm/ui/widget/CustomParamsSettings.js.map +1 -1
  223. package/lib/esm/ui/widget/CustomParamsSettings.scss +7 -9
  224. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +3 -2
  225. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
  226. package/lib/esm/ui/widget/FeatureInfoDataProvider.js +4 -2
  227. package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  228. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +1 -1
  229. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  230. package/lib/esm/ui/widget/FeatureInfoWidget.js +12 -5
  231. package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
  232. package/lib/esm/ui/widget/MapLayerActionButtons.d.ts +1 -1
  233. package/lib/esm/ui/widget/MapLayerActionButtons.d.ts.map +1 -1
  234. package/lib/esm/ui/widget/MapLayerActionButtons.js +6 -16
  235. package/lib/esm/ui/widget/MapLayerActionButtons.js.map +1 -1
  236. package/lib/esm/ui/widget/MapLayerDroppable.d.ts +2 -2
  237. package/lib/esm/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  238. package/lib/esm/ui/widget/MapLayerDroppable.js +38 -47
  239. package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
  240. package/lib/esm/ui/widget/MapLayerManager.d.ts +2 -2
  241. package/lib/esm/ui/widget/MapLayerManager.d.ts.map +1 -1
  242. package/lib/esm/ui/widget/MapLayerManager.js +136 -85
  243. package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
  244. package/lib/esm/ui/widget/MapLayerManager.scss +3 -6
  245. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +2 -2
  246. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  247. package/lib/esm/ui/widget/MapLayerSettingsMenu.js +9 -12
  248. package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  249. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  250. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +11 -12
  251. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  252. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +5 -5
  253. package/lib/esm/ui/widget/MapLayersWidget.d.ts +1 -1
  254. package/lib/esm/ui/widget/MapLayersWidget.d.ts.map +1 -1
  255. package/lib/esm/ui/widget/MapLayersWidget.js +9 -9
  256. package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
  257. package/lib/esm/ui/widget/MapManagerMapLayersHeader.d.ts.map +1 -1
  258. package/lib/esm/ui/widget/MapManagerMapLayersHeader.js +5 -8
  259. package/lib/esm/ui/widget/MapManagerMapLayersHeader.js.map +1 -1
  260. package/lib/esm/ui/widget/MapManagerSettings.d.ts.map +1 -1
  261. package/lib/esm/ui/widget/MapManagerSettings.js +29 -53
  262. package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
  263. package/lib/esm/ui/widget/MapManagerSettings.scss +1 -1
  264. package/lib/esm/ui/widget/MapSelectFeaturesDialog.d.ts +2 -2
  265. package/lib/esm/ui/widget/MapSelectFeaturesDialog.d.ts.map +1 -1
  266. package/lib/esm/ui/widget/MapSelectFeaturesDialog.js +7 -15
  267. package/lib/esm/ui/widget/MapSelectFeaturesDialog.js.map +1 -1
  268. package/lib/esm/ui/widget/MapSelectFeaturesDialog.scss +1 -3
  269. package/lib/esm/ui/widget/MapUrlDialog.d.ts +4 -3
  270. package/lib/esm/ui/widget/MapUrlDialog.d.ts.map +1 -1
  271. package/lib/esm/ui/widget/MapUrlDialog.js +100 -94
  272. package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
  273. package/lib/esm/ui/widget/MapUrlDialog.scss +6 -7
  274. package/lib/esm/ui/widget/SelectApiKey.d.ts.map +1 -1
  275. package/lib/esm/ui/widget/SelectApiKey.js +12 -7
  276. package/lib/esm/ui/widget/SelectApiKey.js.map +1 -1
  277. package/lib/esm/ui/widget/SelectCustomParam.d.ts.map +1 -1
  278. package/lib/esm/ui/widget/SelectCustomParam.js +14 -8
  279. package/lib/esm/ui/widget/SelectCustomParam.js.map +1 -1
  280. package/lib/esm/ui/widget/SelectMapFormat.d.ts +3 -3
  281. package/lib/esm/ui/widget/SelectMapFormat.d.ts.map +1 -1
  282. package/lib/esm/ui/widget/SelectMapFormat.js +9 -10
  283. package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
  284. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +2 -2
  285. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  286. package/lib/esm/ui/widget/SubLayersDataProvider.js +13 -9
  287. package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
  288. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +1 -1
  289. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  290. package/lib/esm/ui/widget/SubLayersPopupButton.js +6 -11
  291. package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
  292. package/lib/esm/ui/widget/SubLayersTree.d.ts +2 -2
  293. package/lib/esm/ui/widget/SubLayersTree.d.ts.map +1 -1
  294. package/lib/esm/ui/widget/SubLayersTree.js +59 -44
  295. package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
  296. package/lib/esm/ui/widget/SubLayersTree.scss +4 -7
  297. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  298. package/lib/esm/ui/widget/TransparencyPopupButton.js +8 -14
  299. package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
  300. package/lib/esm/ui/widget/TransparencyPopupButton.scss +1 -2
  301. package/lib/esm/ui/widget/UserPreferencesStorageOptions.d.ts +1 -1
  302. package/lib/esm/ui/widget/UserPreferencesStorageOptions.d.ts.map +1 -1
  303. package/lib/esm/ui/widget/UserPreferencesStorageOptions.js +2 -8
  304. package/lib/esm/ui/widget/UserPreferencesStorageOptions.js.map +1 -1
  305. package/lib/public/locales/en/mapLayers.json +179 -184
  306. package/package.json +9 -21
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import "./MapUrlDialog.scss";
3
- import { ImageMapLayerSettings } from "@itwin/core-common";
4
- import { MapLayerSource, MapLayerSourceValidation, ScreenViewport } from "@itwin/core-frontend";
5
- import { MapLayerOptions } from "../Interfaces";
3
+ import { MapLayerSource } from "@itwin/core-frontend";
4
+ import type { ImageMapLayerSettings } from "@itwin/core-common";
5
+ import type { MapLayerSourceValidation, ScreenViewport } from "@itwin/core-frontend";
6
+ import type { MapLayerOptions } from "../Interfaces";
6
7
  export declare const MAP_TYPES: {
7
8
  wms: string;
8
9
  arcGis: string;
@@ -1 +1 @@
1
- {"version":3,"file":"MapUrlDialog.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/MapUrlDialog.tsx"],"names":[],"mappings":";AAMA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAC4B,cAAc,EAAwB,wBAAwB,EAC/F,cAAc,EACf,MAAM,sBAAsB,CAAC;AAS9B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKhD,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,QAAQ,GAAC,UAAU,CAAC;AACpD,UAAU,iBAAiB;IACzB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAGlC,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,qBAAqB,CAAC;QAC7B,UAAU,CAAC,EAAE,wBAAwB,CAAC;QACtC,MAAM,CAAC,EAAE,cAAc,CAAC;KACzB,CAAC;IAEF,oBAAoB,CAAC,EAAE,cAAc,CAAC;CACvC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,wBAAwB,CAAC;IACrC,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC3C,qBAAqB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACnD;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eAmnBpD"}
1
+ {"version":3,"file":"MapUrlDialog.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/MapUrlDialog.tsx"],"names":[],"mappings":";AAMA,OAAO,qBAAqB,CAAC;AAI7B,OAAO,EAAa,cAAc,EAAqE,MAAM,sBAAsB,CAAC;AAapI,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAwB,wBAAwB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AAMF,oBAAY,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAC;AACtD,UAAU,iBAAiB;IACzB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAGlC,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,qBAAqB,CAAC;QAC7B,UAAU,CAAC,EAAE,wBAAwB,CAAC;QACtC,MAAM,CAAC,EAAE,cAAc,CAAC;KACzB,CAAC;IAEF,oBAAoB,CAAC,EAAE,cAAc,CAAC;CACvC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,wBAAwB,CAAC;IACrC,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC3C,qBAAqB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACnD;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eA4rBpD"}
@@ -1,13 +1,37 @@
1
1
  "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- // cSpell:ignore Modeless WMTS
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
7
25
  Object.defineProperty(exports, "__esModule", { value: true });
8
26
  exports.MapUrlDialog = exports.MAP_TYPES = void 0;
27
+ const jsx_runtime_1 = require("react/jsx-runtime");
28
+ /*---------------------------------------------------------------------------------------------
29
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
30
+ * See LICENSE.md in the project root for license terms and full copyright notice.
31
+ *--------------------------------------------------------------------------------------------*/
32
+ // cSpell:ignore Modeless WMTS
9
33
  require("./MapUrlDialog.scss");
10
- const React = require("react");
34
+ const React = __importStar(require("react"));
11
35
  const appui_abstract_1 = require("@itwin/appui-abstract");
12
36
  const core_bentley_1 = require("@itwin/core-bentley");
13
37
  const core_frontend_1 = require("@itwin/core-frontend");
@@ -29,6 +53,10 @@ exports.MAP_TYPES = {
29
53
  tileUrl: "TileURL",
30
54
  arcGisFeature: "ArcGISFeature",
31
55
  };
56
+ const URL_SCHEMES = {
57
+ http: "http://",
58
+ https: "https://",
59
+ };
32
60
  // eslint-disable-next-line @typescript-eslint/naming-convention
33
61
  function MapUrlDialog(props) {
34
62
  const { onOkResult, mapLayerOptions } = props;
@@ -62,8 +90,9 @@ function MapUrlDialog(props) {
62
90
  const getCustomParamsMapping = React.useCallback((url) => {
63
91
  const cpMappingStorage = new CustomParamsMappingStorage_1.CustomParamsMappingStorage();
64
92
  const cpMapping = cpMappingStorage.get(url.toLowerCase());
65
- if (cpMapping && cpMapping.length > 0)
66
- return cpMapping[0].customParamNames;
93
+ if (cpMapping && !Array.isArray(cpMapping)) {
94
+ return cpMapping.customParamNames;
95
+ }
67
96
  return [];
68
97
  }, []);
69
98
  const [dialogTitle] = React.useState(mapLayers_1.MapLayersUI.localization.getLocalizedString(props.signInModeArgs || props.mapLayerSourceToEdit ? "mapLayers:CustomAttach.EditCustomLayer" : "mapLayers:CustomAttach.AttachCustomLayer"));
@@ -104,8 +133,9 @@ function MapUrlDialog(props) {
104
133
  const [mapType, setMapType] = React.useState(getFormatFromProps() ?? "ArcGIS");
105
134
  const [customParamNamesChangedByUser, SetCustomParamNamesChangedByUser] = React.useState(false);
106
135
  const [customParamNames, setCustomParamNames] = React.useState(() => {
107
- if (mapUrl)
136
+ if (mapUrl) {
108
137
  return getCustomParamsMapping(mapUrl);
138
+ }
109
139
  return undefined;
110
140
  });
111
141
  // 'isMounted' is used to prevent any async operation once the hook has been
@@ -118,10 +148,10 @@ function MapUrlDialog(props) {
118
148
  };
119
149
  }, []);
120
150
  const [isSettingsStorageAvailable] = React.useState(mapLayers_1.MapLayersUI.iTwinConfig && props?.activeViewport?.iModel?.iTwinId);
121
- const [hasImodelContext] = React.useState(props?.activeViewport?.iModel?.iTwinId !== undefined
122
- && props.activeViewport.iModel.iTwinId !== core_bentley_1.Guid.empty
123
- && props?.activeViewport?.iModel?.iModelId !== undefined
124
- && props?.activeViewport.iModel.iModelId !== core_bentley_1.Guid.empty);
151
+ const [hasImodelContext] = React.useState(props?.activeViewport?.iModel?.iTwinId !== undefined &&
152
+ props.activeViewport.iModel.iTwinId !== core_bentley_1.Guid.empty &&
153
+ props?.activeViewport?.iModel?.iModelId !== undefined &&
154
+ props?.activeViewport.iModel.iModelId !== core_bentley_1.Guid.empty);
125
155
  const handleCancel = React.useCallback(() => {
126
156
  if (props.onCancelResult) {
127
157
  props.onCancelResult();
@@ -130,13 +160,15 @@ function MapUrlDialog(props) {
130
160
  }, [props]);
131
161
  const onUsernameChange = React.useCallback((event) => {
132
162
  setUserName(event.target.value);
133
- if (invalidCredentialsProvided)
163
+ if (invalidCredentialsProvided) {
134
164
  setInvalidCredentialsProvided(false);
165
+ }
135
166
  }, [setUserName, invalidCredentialsProvided, setInvalidCredentialsProvided]);
136
167
  const onPasswordChange = React.useCallback((event) => {
137
168
  setPassword(event.target.value);
138
- if (invalidCredentialsProvided)
169
+ if (invalidCredentialsProvided) {
139
170
  setInvalidCredentialsProvided(false);
171
+ }
140
172
  }, [setPassword, invalidCredentialsProvided, setInvalidCredentialsProvided]);
141
173
  const handleArcGisLogin = React.useCallback(() => {
142
174
  setLayerAuthPending(true);
@@ -147,8 +179,8 @@ function MapUrlDialog(props) {
147
179
  }, [oauthProcessSucceeded]);
148
180
  // return true if authorization is needed
149
181
  const updateAuthState = React.useCallback(async (source, sourceValidation) => {
150
- const sourceRequireAuth = (sourceValidation.status === core_frontend_1.MapLayerSourceStatus.RequireAuth);
151
- let invalidCredentials = (sourceValidation.status === core_frontend_1.MapLayerSourceStatus.InvalidCredentials);
182
+ const sourceRequireAuth = sourceValidation.status === core_frontend_1.MapLayerSourceStatus.RequireAuth;
183
+ let invalidCredentials = sourceValidation.status === core_frontend_1.MapLayerSourceStatus.InvalidCredentials;
152
184
  if (sourceRequireAuth) {
153
185
  let hasTokenEndPoint = false;
154
186
  const settings = source.toLayerSettings();
@@ -161,8 +193,7 @@ function MapUrlDialog(props) {
161
193
  hasTokenEndPoint = true;
162
194
  }
163
195
  }
164
- catch (_error) {
165
- }
196
+ catch (_error) { }
166
197
  }
167
198
  else if (userName.length > 0 || password.length > 0) {
168
199
  // This is a patch until @itwin\core-frontend return the expected 'InvalidCredentials' status.
@@ -201,14 +232,10 @@ function MapUrlDialog(props) {
201
232
  }
202
233
  }
203
234
  }, [getCustomParamsMapping, customParamNamesChangedByUser]);
204
- const createSource = React.useCallback(() => {
235
+ const createSource = React.useCallback((url) => {
205
236
  let source;
206
- if (mapUrl && mapName) {
207
- source = core_frontend_1.MapLayerSource.fromJSON({
208
- url: mapUrl,
209
- name: mapName,
210
- formatId: mapType,
211
- });
237
+ if (url && mapName) {
238
+ source = core_frontend_1.MapLayerSource.fromJSON({ url, name: mapName, formatId: mapType });
212
239
  // Set credentials separately since they are not part of JSON
213
240
  if (source) {
214
241
  source.userName = userName || undefined; // When there is no value, empty string is always returned, in this case force it to undefined,
@@ -219,9 +246,16 @@ function MapUrlDialog(props) {
219
246
  }
220
247
  }
221
248
  return source;
222
- }, [customParamNames, mapName, mapType, mapUrl, password, userName]);
249
+ }, [customParamNames, mapName, mapType, password, userName]);
223
250
  const handleOk = React.useCallback(() => {
224
- const source = createSource();
251
+ const mapUrlLow = mapUrl.toLowerCase();
252
+ // Append 'https://' if url is missing scheme
253
+ let url = mapUrl;
254
+ if (!mapUrlLow.startsWith(URL_SCHEMES.http) && !mapUrlLow.startsWith(URL_SCHEMES.https)) {
255
+ url = `${URL_SCHEMES.https}${mapUrl}`;
256
+ setMapUrl(url);
257
+ }
258
+ const source = createSource(url);
225
259
  if (source === undefined || props.mapLayerSourceToEdit) {
226
260
  onOkResult();
227
261
  if (source === undefined) {
@@ -234,7 +268,7 @@ function MapUrlDialog(props) {
234
268
  // Store custom params mapping
235
269
  if (customParamNames) {
236
270
  const cpmStorage = new CustomParamsMappingStorage_1.CustomParamsMappingStorage();
237
- cpmStorage.save(mapUrl.toLowerCase(), { customParamNames });
271
+ cpmStorage.save(url.toLowerCase(), { customParamNames });
238
272
  }
239
273
  // Simply change the source definition in the setting service
240
274
  if (props.mapLayerSourceToEdit !== undefined) {
@@ -248,7 +282,9 @@ function MapUrlDialog(props) {
248
282
  await MapLayerPreferences_1.MapLayerPreferences.replaceSource(props.mapLayerSourceToEdit, source, vp.iModel.iTwinId, vp?.iModel.iModelId);
249
283
  }
250
284
  catch (err) {
251
- const errorMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:Messages.MapLayerEditError", { layerName: props.mapLayerSourceToEdit?.name });
285
+ const errorMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:Messages.MapLayerEditError", {
286
+ layerName: props.mapLayerSourceToEdit?.name,
287
+ });
252
288
  core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, errorMessage));
253
289
  return;
254
290
  }
@@ -268,7 +304,7 @@ function MapUrlDialog(props) {
268
304
  if (validation.status === core_frontend_1.MapLayerSourceStatus.Valid) {
269
305
  // Update service settings if storage is available and we are not prompting user for credentials
270
306
  if (isSettingsStorageAvailable && !props.signInModeArgs) {
271
- const storeOnIModel = (hasImodelContext ? "Model" === settingsStorage : undefined);
307
+ const storeOnIModel = hasImodelContext ? "Model" === settingsStorage : undefined;
272
308
  const vp = props.activeViewport;
273
309
  if (vp?.iModel.iTwinId && !(await MapLayerPreferences_1.MapLayerPreferences.storeSource(source, vp.iModel.iTwinId, vp.iModel.iModelId, storeOnIModel))) {
274
310
  const msgError = mapLayers_1.MapLayersUI.localization.getLocalizedString("mapLayers:Messages.MapLayerPreferencesStoreFailed");
@@ -281,13 +317,12 @@ function MapUrlDialog(props) {
281
317
  if (customParamNames && customParamNames.length > 0) {
282
318
  // Link the map-layers URL custom params.
283
319
  const cpmStorage = new CustomParamsMappingStorage_1.CustomParamsMappingStorage();
284
- cpmStorage.save(mapUrl.toLowerCase(), { customParamNames });
320
+ cpmStorage.save(url.toLowerCase(), { customParamNames });
285
321
  const cpStorage = new CustomParamsStorage_1.CustomParamsStorage();
286
322
  customParamNames.forEach((customParamName) => {
287
323
  const items = cpStorage.get(customParamName);
288
- if (items && items.length > 0) {
289
- const item = items[0];
290
- (item.secret ? privateCustomParamIdx : customParamIdx)[item.key] = item.value;
324
+ if (items && !Array.isArray(items)) {
325
+ (items.secret ? privateCustomParamIdx : customParamIdx)[items.key] = items.value;
291
326
  }
292
327
  });
293
328
  }
@@ -316,14 +351,27 @@ function MapUrlDialog(props) {
316
351
  onOkResult();
317
352
  }
318
353
  })();
319
- }, [createSource, props.mapLayerSourceToEdit, props.activeViewport, props.signInModeArgs, onOkResult, customParamNames, mapName, mapUrl, isSettingsStorageAvailable, hasImodelContext, settingsStorage, updateAuthState]);
354
+ }, [
355
+ mapUrl,
356
+ createSource,
357
+ props.mapLayerSourceToEdit,
358
+ props.activeViewport,
359
+ props.signInModeArgs,
360
+ onOkResult,
361
+ customParamNames,
362
+ mapName,
363
+ isSettingsStorageAvailable,
364
+ hasImodelContext,
365
+ settingsStorage,
366
+ updateAuthState,
367
+ ]);
320
368
  React.useEffect(() => {
321
369
  const handleOAuthProcessEnd = (success, _state) => {
322
370
  onOauthProcessEnd.raiseEvent(success, _state);
323
371
  };
324
372
  const ac = core_frontend_1.IModelApp.mapLayerFormatRegistry.getAccessClient(mapType);
325
373
  if (ac?.onOAuthProcessEnd) {
326
- setAccessClient(ac); // cache it, so we dont need to make another lookup;
374
+ setAccessClient(ac); // cache it, so we don't need to make another lookup;
327
375
  ac.onOAuthProcessEnd.addListener(handleOAuthProcessEnd);
328
376
  }
329
377
  setAccessClientInitialized(true);
@@ -356,9 +404,7 @@ function MapUrlDialog(props) {
356
404
  React.useEffect(() => {
357
405
  // Attach source asynchronously.
358
406
  void (async () => {
359
- if (isAccessClientInitialized
360
- && shouldAutoAttachSource
361
- && props.signInModeArgs !== undefined) {
407
+ if (isAccessClientInitialized && shouldAutoAttachSource && props.signInModeArgs !== undefined) {
362
408
  try {
363
409
  let source = props.signInModeArgs.source;
364
410
  let validation = props.signInModeArgs.validation;
@@ -370,10 +416,12 @@ function MapUrlDialog(props) {
370
416
  formatId: props.signInModeArgs.layer.formatId,
371
417
  });
372
418
  if (source !== undefined) {
373
- if (props.signInModeArgs.layer.savedQueryParams)
419
+ if (props.signInModeArgs.layer.savedQueryParams) {
374
420
  source.savedQueryParams = { ...props.signInModeArgs.layer.savedQueryParams };
375
- if (props.signInModeArgs.layer.unsavedQueryParams)
421
+ }
422
+ if (props.signInModeArgs.layer.unsavedQueryParams) {
376
423
  source.unsavedQueryParams = { ...props.signInModeArgs.layer.unsavedQueryParams };
424
+ }
377
425
  setLayerAttachPending(true);
378
426
  validation = await source.validateSource(true);
379
427
  if (isMounted.current) {
@@ -393,19 +441,32 @@ function MapUrlDialog(props) {
393
441
  const dialogContainer = React.useRef(null);
394
442
  const readyToSave = React.useCallback(() => {
395
443
  const credentialsSet = !!userName && !!password;
396
- const ready = (!!mapUrl && !!mapName)
397
- && !layerAttachPending
398
- && (!serverRequireCredentials || credentialsSet)
399
- && !invalidCredentialsProvided
400
- && !incompatibleFormat
401
- && (externalLoginUrl === undefined || (externalLoginUrl !== undefined && oauthProcessSucceeded));
444
+ const ready = !!mapUrl &&
445
+ !!mapName &&
446
+ !layerAttachPending &&
447
+ (!serverRequireCredentials || credentialsSet) &&
448
+ !invalidCredentialsProvided &&
449
+ !incompatibleFormat &&
450
+ (externalLoginUrl === undefined || (externalLoginUrl !== undefined && oauthProcessSucceeded));
402
451
  return ready;
403
- }, [userName, password, mapUrl, mapName, layerAttachPending, serverRequireCredentials, invalidCredentialsProvided, incompatibleFormat, externalLoginUrl, oauthProcessSucceeded]);
452
+ }, [
453
+ userName,
454
+ password,
455
+ mapUrl,
456
+ mapName,
457
+ layerAttachPending,
458
+ serverRequireCredentials,
459
+ invalidCredentialsProvided,
460
+ incompatibleFormat,
461
+ externalLoginUrl,
462
+ oauthProcessSucceeded,
463
+ ]);
404
464
  const handleOnKeyDown = React.useCallback((event) => {
405
465
  // eslint-disable-next-line deprecation/deprecation
406
466
  if (event.key === appui_abstract_1.SpecialKey.Enter) {
407
- if (readyToSave())
467
+ if (readyToSave()) {
408
468
  handleOk();
469
+ }
409
470
  }
410
471
  }, [handleOk, readyToSave]);
411
472
  // onOauthProcessEnd events handler
@@ -440,8 +501,9 @@ function MapUrlDialog(props) {
440
501
  const handleOAuthPopupClose = React.useCallback(() => {
441
502
  setShowOauthPopup(false);
442
503
  setLayerAuthPending(false);
443
- if (oauthProcessSucceeded === undefined)
444
- setOAuthProcessSucceeded(false); // indicates there was a failed attempt
504
+ if (oauthProcessSucceeded === undefined) {
505
+ setOAuthProcessSucceeded(false);
506
+ } // indicates there was a failed attempt
445
507
  }, [oauthProcessSucceeded]);
446
508
  // Utility function to get warning message section
447
509
  function renderWarningMessage() {
@@ -465,61 +527,28 @@ function MapUrlDialog(props) {
465
527
  // Sometimes we want to add an extra node, such as a button
466
528
  let extraNode;
467
529
  if (oauthProcessSucceeded === false) {
468
- extraNode = React.createElement("div", null,
469
- React.createElement(itwinui_react_1.Button, { onClick: handleArcGisLogin }, externalLoginTryAgainLabel));
530
+ extraNode = ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(itwinui_react_1.Button, { onClick: handleArcGisLogin, children: externalLoginTryAgainLabel }) }));
470
531
  }
471
532
  if (warningMessage !== undefined) {
472
- return (React.createElement("div", { className: "map-layer-source-warnMessage" },
473
- React.createElement(itwinui_react_1.Icon, { size: "small" },
474
- React.createElement(itwinui_icons_color_react_1.SvgStatusWarning, null)),
475
- React.createElement("span", { className: "map-layer-source-warnMessage-label" }, warningMessage),
476
- extraNode));
533
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "map-layer-source-warnMessage", children: [(0, jsx_runtime_1.jsx)(itwinui_react_1.Icon, { size: "small", children: (0, jsx_runtime_1.jsx)(itwinui_icons_color_react_1.SvgStatusWarning, {}) }), (0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-warnMessage-label", children: warningMessage }), extraNode] }));
477
534
  }
478
535
  else {
479
- return (React.createElement("span", { className: "map-layer-source-placeholder" }, "\u00A0"));
536
+ return (0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-placeholder", children: "\u00A0" });
480
537
  }
481
538
  }
482
539
  // Use a hook to display the popup.
483
540
  // The display of the popup is controlled by the 'showOauthPopup' state variable.
484
541
  (0, core_react_1.useCrossOriginPopup)(showOauthPopup, externalLoginUrl, externalLoginTitle, 450, 450, handleOAuthPopupClose);
485
542
  function getFooter() {
486
- return (React.createElement("div", { className: "map-layer-source-footer" },
487
- React.createElement("div", { className: "map-layer-source-footer-status" }),
488
- React.createElement("div", null,
489
- React.createElement(itwinui_react_1.Button, { className: "map-layer-features-footer-button", styleType: 'high-visibility', onClick: handleOk, disabled: !readyToSave() }, props?.mapLayerSourceToEdit ? mapLayers_1.MapLayersUI.translate("Dialog.Edit") : mapLayers_1.MapLayersUI.translate("Dialog.Add")),
490
- React.createElement(itwinui_react_1.Button, { className: "map-layer-source-footer-button", styleType: 'default', onClick: handleCancel }, mapLayers_1.MapLayersUI.translate("Dialog.Cancel")))));
543
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "map-layer-source-footer", children: [(0, jsx_runtime_1.jsx)("div", { className: "map-layer-source-footer-status" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(itwinui_react_1.Button, { className: "map-layer-features-footer-button", styleType: "high-visibility", onClick: handleOk, disabled: !readyToSave(), children: props?.mapLayerSourceToEdit ? mapLayers_1.MapLayersUI.translate("Dialog.Edit") : mapLayers_1.MapLayersUI.translate("Dialog.Add") }), (0, jsx_runtime_1.jsx)(itwinui_react_1.Button, { className: "map-layer-source-footer-button", styleType: "default", onClick: handleCancel, children: mapLayers_1.MapLayersUI.translate("Dialog.Cancel") })] })] }));
491
544
  }
492
- return (React.createElement("div", { ref: dialogContainer },
493
- React.createElement(core_react_1.Dialog, { className: "map-layer-url-dialog", title: dialogTitle, opened: true, resizable: true, movable: true, modal: true, footer: getFooter(), onClose: handleCancel, onEscape: handleCancel, minHeight: 120, maxWidth: 600, titleStyle: { paddingLeft: "10px" }, footerStyle: { paddingBottom: "10px", paddingRight: "10px" }, trapFocus: false },
494
- React.createElement("div", { className: "map-layer-url-dialog-content" },
495
- React.createElement("div", { className: "map-layer-source-url" },
496
- React.createElement("span", { className: "map-layer-source-label" }, typeLabel),
497
- React.createElement(SelectMapFormat_1.SelectMapFormat, { value: mapType, disabled: props.signInModeArgs !== undefined || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, onChange: setMapType, mapTypesOptions: mapLayerOptions?.mapTypeOptions, status: incompatibleFormat ? "warning" : undefined, message: incompatibleFormat ? mapLayers_1.MapLayersUI.translate("CustomAttach.InvalidType") : undefined }),
498
- React.createElement("span", { className: "map-layer-source-label" }, nameLabel),
499
- React.createElement(itwinui_react_1.Input, { className: "map-layer-source-input", placeholder: nameInputPlaceHolder, onChange: onNameChange, value: mapName, disabled: !!props.signInModeArgs || layerAttachPending || layerAuthPending }),
500
- React.createElement("span", { className: "map-layer-source-label" }, urlLabel),
501
- React.createElement(itwinui_react_1.Input, { className: "map-layer-source-input", placeholder: urlInputPlaceHolder, onKeyPress: handleOnKeyDown, onChange: onUrlChange, disabled: !!props.signInModeArgs || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, value: mapUrl }),
502
- React.createElement("span", { className: "map-layer-source-label" },
503
- mapLayers_1.MapLayersUI.translate("CustomAttach.CustomParamsLabel"),
504
- React.createElement("div", { title: mapLayers_1.MapLayersUI.translate("Labels.TechPreviewBadgeTooltip"), className: "map-layer-source-previewBadge-icon" },
505
- React.createElement(itwinui_react_1.Icon, { size: "small" },
506
- React.createElement(itwinui_icons_color_react_1.SvgTechnicalPreviewMini, null)))),
507
- React.createElement(SelectCustomParam_1.SelectCustomParam, { value: customParamNames, disabled: layerAttachPending || layerAuthPending, onChange: (paramNames) => { setCustomParamNames(paramNames); SetCustomParamNamesChangedByUser(true); resetSignInState(); } }),
508
- serverRequireCredentials
509
- && externalLoginUrl === undefined // external login is handled in popup
510
- && props.mapLayerSourceToEdit === undefined &&
511
- React.createElement(React.Fragment, null,
512
- React.createElement("span", { className: "map-layer-source-label" }, userNameLabel),
513
- React.createElement(itwinui_react_1.LabeledInput, { className: "map-layer-source-input", displayStyle: "inline", placeholder: serverRequireCredentials ? userNameRequiredLabel : userNameLabel, status: (!userName && serverRequireCredentials) || invalidCredentialsProvided ? "warning" : undefined, disabled: layerAttachPending || layerAuthPending, onChange: onUsernameChange, value: userName, size: "small" }),
514
- React.createElement("span", { className: "map-layer-source-label" }, passwordLabel),
515
- React.createElement(itwinui_react_1.LabeledInput, { className: "map-layer-source-input", displayStyle: "inline", type: "password", placeholder: serverRequireCredentials ? passwordRequiredLabel : passwordLabel, status: (!password && serverRequireCredentials) || invalidCredentialsProvided ? "warning" : undefined, disabled: layerAttachPending || layerAuthPending, onChange: onPasswordChange, onKeyPress: handleOnKeyDown, value: password, size: "small" })),
516
- !props.signInModeArgs
517
- && !props.mapLayerSourceToEdit
518
- && React.createElement("div", { title: !isSettingsStorageAvailable ? noSaveSettingsWarning : "" }, hasImodelContext && mapLayerOptions?.showUserPreferencesStorageOptions && (React.createElement(UserPreferencesStorageOptions_1.UserPreferencesStorageOptions, { disabled: !isSettingsStorageAvailable, itwinChecked: settingsStorage === "iTwin", modelChecked: settingsStorage === "Model", onChange: onRadioChange }))))),
519
- renderWarningMessage(),
520
- (layerAttachPending || layerAuthPending) &&
521
- React.createElement("div", { className: "map-layer-source-progressBar" },
522
- React.createElement(itwinui_react_1.ProgressLinear, { indeterminate: true })))));
545
+ return ((0, jsx_runtime_1.jsx)("div", { ref: dialogContainer, children: (0, jsx_runtime_1.jsxs)(core_react_1.Dialog, { className: "map-layer-url-dialog", title: dialogTitle, opened: true, resizable: true, movable: true, modal: true, footer: getFooter(), onClose: handleCancel, onEscape: handleCancel, minHeight: 120, maxWidth: 600, titleStyle: { paddingLeft: "10px" }, footerStyle: { paddingBottom: "10px", paddingRight: "10px" }, trapFocus: false, children: [(0, jsx_runtime_1.jsx)("div", { className: "map-layer-url-dialog-content", children: (0, jsx_runtime_1.jsxs)("div", { className: "map-layer-source-url", children: [(0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-label", children: typeLabel }), (0, jsx_runtime_1.jsx)(SelectMapFormat_1.SelectMapFormat, { value: mapType, disabled: props.signInModeArgs !== undefined || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, onChange: setMapType, mapTypesOptions: mapLayerOptions?.mapTypeOptions, status: incompatibleFormat ? "warning" : undefined, message: incompatibleFormat ? mapLayers_1.MapLayersUI.translate("CustomAttach.InvalidType") : undefined }), (0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-label", children: nameLabel }), (0, jsx_runtime_1.jsx)(itwinui_react_1.Input, { className: "map-layer-source-input", placeholder: nameInputPlaceHolder, onChange: onNameChange, value: mapName, disabled: !!props.signInModeArgs || layerAttachPending || layerAuthPending }), (0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-label", children: urlLabel }), (0, jsx_runtime_1.jsx)(itwinui_react_1.Input, { className: "map-layer-source-input", placeholder: urlInputPlaceHolder, onKeyPress: handleOnKeyDown, onChange: onUrlChange, disabled: !!props.signInModeArgs || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, value: mapUrl }), (0, jsx_runtime_1.jsxs)("span", { className: "map-layer-source-label", children: [mapLayers_1.MapLayersUI.translate("CustomAttach.CustomParamsLabel"), (0, jsx_runtime_1.jsx)("div", { title: mapLayers_1.MapLayersUI.translate("Labels.TechPreviewBadgeTooltip"), className: "map-layer-source-previewBadge-icon", children: (0, jsx_runtime_1.jsx)(itwinui_react_1.Icon, { size: "small", children: (0, jsx_runtime_1.jsx)(itwinui_icons_color_react_1.SvgTechnicalPreviewMini, {}) }) })] }), (0, jsx_runtime_1.jsx)(SelectCustomParam_1.SelectCustomParam, { value: customParamNames, disabled: layerAttachPending || layerAuthPending, onChange: (paramNames) => {
546
+ setCustomParamNames(paramNames);
547
+ SetCustomParamNamesChangedByUser(true);
548
+ resetSignInState();
549
+ } }), serverRequireCredentials &&
550
+ externalLoginUrl === undefined && // external login is handled in popup
551
+ props.mapLayerSourceToEdit === undefined && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-label", children: userNameLabel }), (0, jsx_runtime_1.jsx)(itwinui_react_1.LabeledInput, { className: "map-layer-source-input", displayStyle: "inline", placeholder: serverRequireCredentials ? userNameRequiredLabel : userNameLabel, status: (!userName && serverRequireCredentials) || invalidCredentialsProvided ? "warning" : undefined, disabled: layerAttachPending || layerAuthPending, onChange: onUsernameChange, value: userName, size: "small" }), (0, jsx_runtime_1.jsx)("span", { className: "map-layer-source-label", children: passwordLabel }), (0, jsx_runtime_1.jsx)(itwinui_react_1.LabeledInput, { className: "map-layer-source-input", displayStyle: "inline", type: "password", placeholder: serverRequireCredentials ? passwordRequiredLabel : passwordLabel, status: (!password && serverRequireCredentials) || invalidCredentialsProvided ? "warning" : undefined, disabled: layerAttachPending || layerAuthPending, onChange: onPasswordChange, onKeyPress: handleOnKeyDown, value: password, size: "small" })] })), !props.signInModeArgs && !props.mapLayerSourceToEdit && ((0, jsx_runtime_1.jsx)("div", { title: !isSettingsStorageAvailable ? noSaveSettingsWarning : "", children: hasImodelContext && mapLayerOptions?.showUserPreferencesStorageOptions && ((0, jsx_runtime_1.jsx)(UserPreferencesStorageOptions_1.UserPreferencesStorageOptions, { disabled: !isSettingsStorageAvailable, itwinChecked: settingsStorage === "iTwin", modelChecked: settingsStorage === "Model", onChange: onRadioChange })) }))] }) }), renderWarningMessage(), (layerAttachPending || layerAuthPending) && ((0, jsx_runtime_1.jsx)("div", { className: "map-layer-source-progressBar", children: (0, jsx_runtime_1.jsx)(itwinui_react_1.ProgressLinear, { indeterminate: true }) }))] }) }));
523
552
  }
524
553
  exports.MapUrlDialog = MapUrlDialog;
525
554
  //# sourceMappingURL=MapUrlDialog.js.map