@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,13 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
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
+ *--------------------------------------------------------------------------------------------*/
5
6
  // cSpell:ignore Modeless WMTS
6
7
  import "./MapUrlDialog.scss";
7
8
  import * as React from "react";
8
9
  import { SpecialKey } from "@itwin/appui-abstract";
9
10
  import { BeEvent, Guid } from "@itwin/core-bentley";
10
- import { IModelApp, MapLayerSource, MapLayerSourceStatus, NotifyMessageDetails, OutputMessagePriority, } from "@itwin/core-frontend";
11
+ import { IModelApp, MapLayerSource, MapLayerSourceStatus, NotifyMessageDetails, OutputMessagePriority } from "@itwin/core-frontend";
11
12
  import { Dialog, useCrossOriginPopup } from "@itwin/core-react";
12
13
  import { SvgStatusWarning, SvgTechnicalPreviewMini } from "@itwin/itwinui-icons-color-react";
13
14
  import { Button, Icon, Input, LabeledInput, ProgressLinear } from "@itwin/itwinui-react";
@@ -26,6 +27,10 @@ export const MAP_TYPES = {
26
27
  tileUrl: "TileURL",
27
28
  arcGisFeature: "ArcGISFeature",
28
29
  };
30
+ const URL_SCHEMES = {
31
+ http: "http://",
32
+ https: "https://",
33
+ };
29
34
  // eslint-disable-next-line @typescript-eslint/naming-convention
30
35
  export function MapUrlDialog(props) {
31
36
  const { onOkResult, mapLayerOptions } = props;
@@ -59,8 +64,9 @@ export function MapUrlDialog(props) {
59
64
  const getCustomParamsMapping = React.useCallback((url) => {
60
65
  const cpMappingStorage = new CustomParamsMappingStorage();
61
66
  const cpMapping = cpMappingStorage.get(url.toLowerCase());
62
- if (cpMapping && cpMapping.length > 0)
63
- return cpMapping[0].customParamNames;
67
+ if (cpMapping && !Array.isArray(cpMapping)) {
68
+ return cpMapping.customParamNames;
69
+ }
64
70
  return [];
65
71
  }, []);
66
72
  const [dialogTitle] = React.useState(MapLayersUI.localization.getLocalizedString(props.signInModeArgs || props.mapLayerSourceToEdit ? "mapLayers:CustomAttach.EditCustomLayer" : "mapLayers:CustomAttach.AttachCustomLayer"));
@@ -101,8 +107,9 @@ export function MapUrlDialog(props) {
101
107
  const [mapType, setMapType] = React.useState(getFormatFromProps() ?? "ArcGIS");
102
108
  const [customParamNamesChangedByUser, SetCustomParamNamesChangedByUser] = React.useState(false);
103
109
  const [customParamNames, setCustomParamNames] = React.useState(() => {
104
- if (mapUrl)
110
+ if (mapUrl) {
105
111
  return getCustomParamsMapping(mapUrl);
112
+ }
106
113
  return undefined;
107
114
  });
108
115
  // 'isMounted' is used to prevent any async operation once the hook has been
@@ -115,10 +122,10 @@ export function MapUrlDialog(props) {
115
122
  };
116
123
  }, []);
117
124
  const [isSettingsStorageAvailable] = React.useState(MapLayersUI.iTwinConfig && props?.activeViewport?.iModel?.iTwinId);
118
- const [hasImodelContext] = React.useState(props?.activeViewport?.iModel?.iTwinId !== undefined
119
- && props.activeViewport.iModel.iTwinId !== Guid.empty
120
- && props?.activeViewport?.iModel?.iModelId !== undefined
121
- && props?.activeViewport.iModel.iModelId !== Guid.empty);
125
+ const [hasImodelContext] = React.useState(props?.activeViewport?.iModel?.iTwinId !== undefined &&
126
+ props.activeViewport.iModel.iTwinId !== Guid.empty &&
127
+ props?.activeViewport?.iModel?.iModelId !== undefined &&
128
+ props?.activeViewport.iModel.iModelId !== Guid.empty);
122
129
  const handleCancel = React.useCallback(() => {
123
130
  if (props.onCancelResult) {
124
131
  props.onCancelResult();
@@ -127,13 +134,15 @@ export function MapUrlDialog(props) {
127
134
  }, [props]);
128
135
  const onUsernameChange = React.useCallback((event) => {
129
136
  setUserName(event.target.value);
130
- if (invalidCredentialsProvided)
137
+ if (invalidCredentialsProvided) {
131
138
  setInvalidCredentialsProvided(false);
139
+ }
132
140
  }, [setUserName, invalidCredentialsProvided, setInvalidCredentialsProvided]);
133
141
  const onPasswordChange = React.useCallback((event) => {
134
142
  setPassword(event.target.value);
135
- if (invalidCredentialsProvided)
143
+ if (invalidCredentialsProvided) {
136
144
  setInvalidCredentialsProvided(false);
145
+ }
137
146
  }, [setPassword, invalidCredentialsProvided, setInvalidCredentialsProvided]);
138
147
  const handleArcGisLogin = React.useCallback(() => {
139
148
  setLayerAuthPending(true);
@@ -144,8 +153,8 @@ export function MapUrlDialog(props) {
144
153
  }, [oauthProcessSucceeded]);
145
154
  // return true if authorization is needed
146
155
  const updateAuthState = React.useCallback(async (source, sourceValidation) => {
147
- const sourceRequireAuth = (sourceValidation.status === MapLayerSourceStatus.RequireAuth);
148
- let invalidCredentials = (sourceValidation.status === MapLayerSourceStatus.InvalidCredentials);
156
+ const sourceRequireAuth = sourceValidation.status === MapLayerSourceStatus.RequireAuth;
157
+ let invalidCredentials = sourceValidation.status === MapLayerSourceStatus.InvalidCredentials;
149
158
  if (sourceRequireAuth) {
150
159
  let hasTokenEndPoint = false;
151
160
  const settings = source.toLayerSettings();
@@ -158,8 +167,7 @@ export function MapUrlDialog(props) {
158
167
  hasTokenEndPoint = true;
159
168
  }
160
169
  }
161
- catch (_error) {
162
- }
170
+ catch (_error) { }
163
171
  }
164
172
  else if (userName.length > 0 || password.length > 0) {
165
173
  // This is a patch until @itwin\core-frontend return the expected 'InvalidCredentials' status.
@@ -198,14 +206,10 @@ export function MapUrlDialog(props) {
198
206
  }
199
207
  }
200
208
  }, [getCustomParamsMapping, customParamNamesChangedByUser]);
201
- const createSource = React.useCallback(() => {
209
+ const createSource = React.useCallback((url) => {
202
210
  let source;
203
- if (mapUrl && mapName) {
204
- source = MapLayerSource.fromJSON({
205
- url: mapUrl,
206
- name: mapName,
207
- formatId: mapType,
208
- });
211
+ if (url && mapName) {
212
+ source = MapLayerSource.fromJSON({ url, name: mapName, formatId: mapType });
209
213
  // Set credentials separately since they are not part of JSON
210
214
  if (source) {
211
215
  source.userName = userName || undefined; // When there is no value, empty string is always returned, in this case force it to undefined,
@@ -216,9 +220,16 @@ export function MapUrlDialog(props) {
216
220
  }
217
221
  }
218
222
  return source;
219
- }, [customParamNames, mapName, mapType, mapUrl, password, userName]);
223
+ }, [customParamNames, mapName, mapType, password, userName]);
220
224
  const handleOk = React.useCallback(() => {
221
- const source = createSource();
225
+ const mapUrlLow = mapUrl.toLowerCase();
226
+ // Append 'https://' if url is missing scheme
227
+ let url = mapUrl;
228
+ if (!mapUrlLow.startsWith(URL_SCHEMES.http) && !mapUrlLow.startsWith(URL_SCHEMES.https)) {
229
+ url = `${URL_SCHEMES.https}${mapUrl}`;
230
+ setMapUrl(url);
231
+ }
232
+ const source = createSource(url);
222
233
  if (source === undefined || props.mapLayerSourceToEdit) {
223
234
  onOkResult();
224
235
  if (source === undefined) {
@@ -231,7 +242,7 @@ export function MapUrlDialog(props) {
231
242
  // Store custom params mapping
232
243
  if (customParamNames) {
233
244
  const cpmStorage = new CustomParamsMappingStorage();
234
- cpmStorage.save(mapUrl.toLowerCase(), { customParamNames });
245
+ cpmStorage.save(url.toLowerCase(), { customParamNames });
235
246
  }
236
247
  // Simply change the source definition in the setting service
237
248
  if (props.mapLayerSourceToEdit !== undefined) {
@@ -245,7 +256,9 @@ export function MapUrlDialog(props) {
245
256
  await MapLayerPreferences.replaceSource(props.mapLayerSourceToEdit, source, vp.iModel.iTwinId, vp?.iModel.iModelId);
246
257
  }
247
258
  catch (err) {
248
- const errorMessage = IModelApp.localization.getLocalizedString("mapLayers:Messages.MapLayerEditError", { layerName: props.mapLayerSourceToEdit?.name });
259
+ const errorMessage = IModelApp.localization.getLocalizedString("mapLayers:Messages.MapLayerEditError", {
260
+ layerName: props.mapLayerSourceToEdit?.name,
261
+ });
249
262
  IModelApp.notifications.outputMessage(new NotifyMessageDetails(OutputMessagePriority.Error, errorMessage));
250
263
  return;
251
264
  }
@@ -265,7 +278,7 @@ export function MapUrlDialog(props) {
265
278
  if (validation.status === MapLayerSourceStatus.Valid) {
266
279
  // Update service settings if storage is available and we are not prompting user for credentials
267
280
  if (isSettingsStorageAvailable && !props.signInModeArgs) {
268
- const storeOnIModel = (hasImodelContext ? "Model" === settingsStorage : undefined);
281
+ const storeOnIModel = hasImodelContext ? "Model" === settingsStorage : undefined;
269
282
  const vp = props.activeViewport;
270
283
  if (vp?.iModel.iTwinId && !(await MapLayerPreferences.storeSource(source, vp.iModel.iTwinId, vp.iModel.iModelId, storeOnIModel))) {
271
284
  const msgError = MapLayersUI.localization.getLocalizedString("mapLayers:Messages.MapLayerPreferencesStoreFailed");
@@ -278,13 +291,12 @@ export function MapUrlDialog(props) {
278
291
  if (customParamNames && customParamNames.length > 0) {
279
292
  // Link the map-layers URL custom params.
280
293
  const cpmStorage = new CustomParamsMappingStorage();
281
- cpmStorage.save(mapUrl.toLowerCase(), { customParamNames });
294
+ cpmStorage.save(url.toLowerCase(), { customParamNames });
282
295
  const cpStorage = new CustomParamsStorage();
283
296
  customParamNames.forEach((customParamName) => {
284
297
  const items = cpStorage.get(customParamName);
285
- if (items && items.length > 0) {
286
- const item = items[0];
287
- (item.secret ? privateCustomParamIdx : customParamIdx)[item.key] = item.value;
298
+ if (items && !Array.isArray(items)) {
299
+ (items.secret ? privateCustomParamIdx : customParamIdx)[items.key] = items.value;
288
300
  }
289
301
  });
290
302
  }
@@ -313,14 +325,27 @@ export function MapUrlDialog(props) {
313
325
  onOkResult();
314
326
  }
315
327
  })();
316
- }, [createSource, props.mapLayerSourceToEdit, props.activeViewport, props.signInModeArgs, onOkResult, customParamNames, mapName, mapUrl, isSettingsStorageAvailable, hasImodelContext, settingsStorage, updateAuthState]);
328
+ }, [
329
+ mapUrl,
330
+ createSource,
331
+ props.mapLayerSourceToEdit,
332
+ props.activeViewport,
333
+ props.signInModeArgs,
334
+ onOkResult,
335
+ customParamNames,
336
+ mapName,
337
+ isSettingsStorageAvailable,
338
+ hasImodelContext,
339
+ settingsStorage,
340
+ updateAuthState,
341
+ ]);
317
342
  React.useEffect(() => {
318
343
  const handleOAuthProcessEnd = (success, _state) => {
319
344
  onOauthProcessEnd.raiseEvent(success, _state);
320
345
  };
321
346
  const ac = IModelApp.mapLayerFormatRegistry.getAccessClient(mapType);
322
347
  if (ac?.onOAuthProcessEnd) {
323
- setAccessClient(ac); // cache it, so we dont need to make another lookup;
348
+ setAccessClient(ac); // cache it, so we don't need to make another lookup;
324
349
  ac.onOAuthProcessEnd.addListener(handleOAuthProcessEnd);
325
350
  }
326
351
  setAccessClientInitialized(true);
@@ -353,9 +378,7 @@ export function MapUrlDialog(props) {
353
378
  React.useEffect(() => {
354
379
  // Attach source asynchronously.
355
380
  void (async () => {
356
- if (isAccessClientInitialized
357
- && shouldAutoAttachSource
358
- && props.signInModeArgs !== undefined) {
381
+ if (isAccessClientInitialized && shouldAutoAttachSource && props.signInModeArgs !== undefined) {
359
382
  try {
360
383
  let source = props.signInModeArgs.source;
361
384
  let validation = props.signInModeArgs.validation;
@@ -367,10 +390,12 @@ export function MapUrlDialog(props) {
367
390
  formatId: props.signInModeArgs.layer.formatId,
368
391
  });
369
392
  if (source !== undefined) {
370
- if (props.signInModeArgs.layer.savedQueryParams)
393
+ if (props.signInModeArgs.layer.savedQueryParams) {
371
394
  source.savedQueryParams = { ...props.signInModeArgs.layer.savedQueryParams };
372
- if (props.signInModeArgs.layer.unsavedQueryParams)
395
+ }
396
+ if (props.signInModeArgs.layer.unsavedQueryParams) {
373
397
  source.unsavedQueryParams = { ...props.signInModeArgs.layer.unsavedQueryParams };
398
+ }
374
399
  setLayerAttachPending(true);
375
400
  validation = await source.validateSource(true);
376
401
  if (isMounted.current) {
@@ -390,19 +415,32 @@ export function MapUrlDialog(props) {
390
415
  const dialogContainer = React.useRef(null);
391
416
  const readyToSave = React.useCallback(() => {
392
417
  const credentialsSet = !!userName && !!password;
393
- const ready = (!!mapUrl && !!mapName)
394
- && !layerAttachPending
395
- && (!serverRequireCredentials || credentialsSet)
396
- && !invalidCredentialsProvided
397
- && !incompatibleFormat
398
- && (externalLoginUrl === undefined || (externalLoginUrl !== undefined && oauthProcessSucceeded));
418
+ const ready = !!mapUrl &&
419
+ !!mapName &&
420
+ !layerAttachPending &&
421
+ (!serverRequireCredentials || credentialsSet) &&
422
+ !invalidCredentialsProvided &&
423
+ !incompatibleFormat &&
424
+ (externalLoginUrl === undefined || (externalLoginUrl !== undefined && oauthProcessSucceeded));
399
425
  return ready;
400
- }, [userName, password, mapUrl, mapName, layerAttachPending, serverRequireCredentials, invalidCredentialsProvided, incompatibleFormat, externalLoginUrl, oauthProcessSucceeded]);
426
+ }, [
427
+ userName,
428
+ password,
429
+ mapUrl,
430
+ mapName,
431
+ layerAttachPending,
432
+ serverRequireCredentials,
433
+ invalidCredentialsProvided,
434
+ incompatibleFormat,
435
+ externalLoginUrl,
436
+ oauthProcessSucceeded,
437
+ ]);
401
438
  const handleOnKeyDown = React.useCallback((event) => {
402
439
  // eslint-disable-next-line deprecation/deprecation
403
440
  if (event.key === SpecialKey.Enter) {
404
- if (readyToSave())
441
+ if (readyToSave()) {
405
442
  handleOk();
443
+ }
406
444
  }
407
445
  }, [handleOk, readyToSave]);
408
446
  // onOauthProcessEnd events handler
@@ -437,8 +475,9 @@ export function MapUrlDialog(props) {
437
475
  const handleOAuthPopupClose = React.useCallback(() => {
438
476
  setShowOauthPopup(false);
439
477
  setLayerAuthPending(false);
440
- if (oauthProcessSucceeded === undefined)
441
- setOAuthProcessSucceeded(false); // indicates there was a failed attempt
478
+ if (oauthProcessSucceeded === undefined) {
479
+ setOAuthProcessSucceeded(false);
480
+ } // indicates there was a failed attempt
442
481
  }, [oauthProcessSucceeded]);
443
482
  // Utility function to get warning message section
444
483
  function renderWarningMessage() {
@@ -462,60 +501,27 @@ export function MapUrlDialog(props) {
462
501
  // Sometimes we want to add an extra node, such as a button
463
502
  let extraNode;
464
503
  if (oauthProcessSucceeded === false) {
465
- extraNode = React.createElement("div", null,
466
- React.createElement(Button, { onClick: handleArcGisLogin }, externalLoginTryAgainLabel));
504
+ extraNode = (_jsx("div", { children: _jsx(Button, { onClick: handleArcGisLogin, children: externalLoginTryAgainLabel }) }));
467
505
  }
468
506
  if (warningMessage !== undefined) {
469
- return (React.createElement("div", { className: "map-layer-source-warnMessage" },
470
- React.createElement(Icon, { size: "small" },
471
- React.createElement(SvgStatusWarning, null)),
472
- React.createElement("span", { className: "map-layer-source-warnMessage-label" }, warningMessage),
473
- extraNode));
507
+ return (_jsxs("div", { className: "map-layer-source-warnMessage", children: [_jsx(Icon, { size: "small", children: _jsx(SvgStatusWarning, {}) }), _jsx("span", { className: "map-layer-source-warnMessage-label", children: warningMessage }), extraNode] }));
474
508
  }
475
509
  else {
476
- return (React.createElement("span", { className: "map-layer-source-placeholder" }, "\u00A0"));
510
+ return _jsx("span", { className: "map-layer-source-placeholder", children: "\u00A0" });
477
511
  }
478
512
  }
479
513
  // Use a hook to display the popup.
480
514
  // The display of the popup is controlled by the 'showOauthPopup' state variable.
481
515
  useCrossOriginPopup(showOauthPopup, externalLoginUrl, externalLoginTitle, 450, 450, handleOAuthPopupClose);
482
516
  function getFooter() {
483
- return (React.createElement("div", { className: "map-layer-source-footer" },
484
- React.createElement("div", { className: "map-layer-source-footer-status" }),
485
- React.createElement("div", null,
486
- React.createElement(Button, { className: "map-layer-features-footer-button", styleType: 'high-visibility', onClick: handleOk, disabled: !readyToSave() }, props?.mapLayerSourceToEdit ? MapLayersUI.translate("Dialog.Edit") : MapLayersUI.translate("Dialog.Add")),
487
- React.createElement(Button, { className: "map-layer-source-footer-button", styleType: 'default', onClick: handleCancel }, MapLayersUI.translate("Dialog.Cancel")))));
517
+ return (_jsxs("div", { className: "map-layer-source-footer", children: [_jsx("div", { className: "map-layer-source-footer-status" }), _jsxs("div", { children: [_jsx(Button, { className: "map-layer-features-footer-button", styleType: "high-visibility", onClick: handleOk, disabled: !readyToSave(), children: props?.mapLayerSourceToEdit ? MapLayersUI.translate("Dialog.Edit") : MapLayersUI.translate("Dialog.Add") }), _jsx(Button, { className: "map-layer-source-footer-button", styleType: "default", onClick: handleCancel, children: MapLayersUI.translate("Dialog.Cancel") })] })] }));
488
518
  }
489
- return (React.createElement("div", { ref: dialogContainer },
490
- React.createElement(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 },
491
- React.createElement("div", { className: "map-layer-url-dialog-content" },
492
- React.createElement("div", { className: "map-layer-source-url" },
493
- React.createElement("span", { className: "map-layer-source-label" }, typeLabel),
494
- React.createElement(SelectMapFormat, { value: mapType, disabled: props.signInModeArgs !== undefined || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, onChange: setMapType, mapTypesOptions: mapLayerOptions?.mapTypeOptions, status: incompatibleFormat ? "warning" : undefined, message: incompatibleFormat ? MapLayersUI.translate("CustomAttach.InvalidType") : undefined }),
495
- React.createElement("span", { className: "map-layer-source-label" }, nameLabel),
496
- React.createElement(Input, { className: "map-layer-source-input", placeholder: nameInputPlaceHolder, onChange: onNameChange, value: mapName, disabled: !!props.signInModeArgs || layerAttachPending || layerAuthPending }),
497
- React.createElement("span", { className: "map-layer-source-label" }, urlLabel),
498
- React.createElement(Input, { className: "map-layer-source-input", placeholder: urlInputPlaceHolder, onKeyPress: handleOnKeyDown, onChange: onUrlChange, disabled: !!props.signInModeArgs || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, value: mapUrl }),
499
- React.createElement("span", { className: "map-layer-source-label" },
500
- MapLayersUI.translate("CustomAttach.CustomParamsLabel"),
501
- React.createElement("div", { title: MapLayersUI.translate("Labels.TechPreviewBadgeTooltip"), className: "map-layer-source-previewBadge-icon" },
502
- React.createElement(Icon, { size: "small" },
503
- React.createElement(SvgTechnicalPreviewMini, null)))),
504
- React.createElement(SelectCustomParam, { value: customParamNames, disabled: layerAttachPending || layerAuthPending, onChange: (paramNames) => { setCustomParamNames(paramNames); SetCustomParamNamesChangedByUser(true); resetSignInState(); } }),
505
- serverRequireCredentials
506
- && externalLoginUrl === undefined // external login is handled in popup
507
- && props.mapLayerSourceToEdit === undefined &&
508
- React.createElement(React.Fragment, null,
509
- React.createElement("span", { className: "map-layer-source-label" }, userNameLabel),
510
- React.createElement(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" }),
511
- React.createElement("span", { className: "map-layer-source-label" }, passwordLabel),
512
- React.createElement(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" })),
513
- !props.signInModeArgs
514
- && !props.mapLayerSourceToEdit
515
- && React.createElement("div", { title: !isSettingsStorageAvailable ? noSaveSettingsWarning : "" }, hasImodelContext && mapLayerOptions?.showUserPreferencesStorageOptions && (React.createElement(UserPreferencesStorageOptions, { disabled: !isSettingsStorageAvailable, itwinChecked: settingsStorage === "iTwin", modelChecked: settingsStorage === "Model", onChange: onRadioChange }))))),
516
- renderWarningMessage(),
517
- (layerAttachPending || layerAuthPending) &&
518
- React.createElement("div", { className: "map-layer-source-progressBar" },
519
- React.createElement(ProgressLinear, { indeterminate: true })))));
519
+ return (_jsx("div", { ref: dialogContainer, children: _jsxs(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: [_jsx("div", { className: "map-layer-url-dialog-content", children: _jsxs("div", { className: "map-layer-source-url", children: [_jsx("span", { className: "map-layer-source-label", children: typeLabel }), _jsx(SelectMapFormat, { value: mapType, disabled: props.signInModeArgs !== undefined || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, onChange: setMapType, mapTypesOptions: mapLayerOptions?.mapTypeOptions, status: incompatibleFormat ? "warning" : undefined, message: incompatibleFormat ? MapLayersUI.translate("CustomAttach.InvalidType") : undefined }), _jsx("span", { className: "map-layer-source-label", children: nameLabel }), _jsx(Input, { className: "map-layer-source-input", placeholder: nameInputPlaceHolder, onChange: onNameChange, value: mapName, disabled: !!props.signInModeArgs || layerAttachPending || layerAuthPending }), _jsx("span", { className: "map-layer-source-label", children: urlLabel }), _jsx(Input, { className: "map-layer-source-input", placeholder: urlInputPlaceHolder, onKeyPress: handleOnKeyDown, onChange: onUrlChange, disabled: !!props.signInModeArgs || props.mapLayerSourceToEdit !== undefined || layerAttachPending || layerAuthPending, value: mapUrl }), _jsxs("span", { className: "map-layer-source-label", children: [MapLayersUI.translate("CustomAttach.CustomParamsLabel"), _jsx("div", { title: MapLayersUI.translate("Labels.TechPreviewBadgeTooltip"), className: "map-layer-source-previewBadge-icon", children: _jsx(Icon, { size: "small", children: _jsx(SvgTechnicalPreviewMini, {}) }) })] }), _jsx(SelectCustomParam, { value: customParamNames, disabled: layerAttachPending || layerAuthPending, onChange: (paramNames) => {
520
+ setCustomParamNames(paramNames);
521
+ SetCustomParamNamesChangedByUser(true);
522
+ resetSignInState();
523
+ } }), serverRequireCredentials &&
524
+ externalLoginUrl === undefined && // external login is handled in popup
525
+ props.mapLayerSourceToEdit === undefined && (_jsxs(_Fragment, { children: [_jsx("span", { className: "map-layer-source-label", children: userNameLabel }), _jsx(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" }), _jsx("span", { className: "map-layer-source-label", children: passwordLabel }), _jsx(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 && (_jsx("div", { title: !isSettingsStorageAvailable ? noSaveSettingsWarning : "", children: hasImodelContext && mapLayerOptions?.showUserPreferencesStorageOptions && (_jsx(UserPreferencesStorageOptions, { disabled: !isSettingsStorageAvailable, itwinChecked: settingsStorage === "iTwin", modelChecked: settingsStorage === "Model", onChange: onRadioChange })) }))] }) }), renderWarningMessage(), (layerAttachPending || layerAuthPending) && (_jsx("div", { className: "map-layer-source-progressBar", children: _jsx(ProgressLinear, { indeterminate: true }) }))] }) }));
520
526
  }
521
527
  //# sourceMappingURL=MapUrlDialog.js.map