@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.
- package/CHANGELOG.md +19 -2
- package/README.md +7 -7
- package/lib/cjs/BrowserStorage.d.ts +1 -1
- package/lib/cjs/BrowserStorage.d.ts.map +1 -1
- package/lib/cjs/BrowserStorage.js +24 -14
- package/lib/cjs/BrowserStorage.js.map +1 -1
- package/lib/cjs/CustomParamUtils.d.ts +1 -1
- package/lib/cjs/CustomParamUtils.d.ts.map +1 -1
- package/lib/cjs/CustomParamUtils.js +18 -7
- package/lib/cjs/CustomParamUtils.js.map +1 -1
- package/lib/cjs/CustomParamsMappingStorage.d.ts +1 -1
- package/lib/cjs/CustomParamsMappingStorage.d.ts.map +1 -1
- package/lib/cjs/CustomParamsMappingStorage.js +3 -3
- package/lib/cjs/CustomParamsMappingStorage.js.map +1 -1
- package/lib/cjs/CustomParamsStorage.d.ts +1 -1
- package/lib/cjs/CustomParamsStorage.d.ts.map +1 -1
- package/lib/cjs/CustomParamsStorage.js +3 -3
- package/lib/cjs/CustomParamsStorage.js.map +1 -1
- package/lib/cjs/MapLayerPreferences.d.ts +2 -1
- package/lib/cjs/MapLayerPreferences.d.ts.map +1 -1
- package/lib/cjs/MapLayerPreferences.js +50 -25
- package/lib/cjs/MapLayerPreferences.js.map +1 -1
- package/lib/cjs/MapLayersActionIds.d.ts +5 -0
- package/lib/cjs/MapLayersActionIds.d.ts.map +1 -0
- package/lib/cjs/MapLayersActionIds.js +10 -0
- package/lib/cjs/MapLayersActionIds.js.map +1 -0
- package/lib/cjs/MapLayersPrefBrowserStorage.d.ts.map +1 -1
- package/lib/cjs/MapLayersPrefBrowserStorage.js +4 -5
- package/lib/cjs/MapLayersPrefBrowserStorage.js.map +1 -1
- package/lib/cjs/PreferencesBrowserStorage.d.ts +18 -18
- package/lib/cjs/PreferencesBrowserStorage.d.ts.map +1 -1
- package/lib/cjs/PreferencesBrowserStorage.js +14 -14
- package/lib/cjs/PreferencesBrowserStorage.js.map +1 -1
- package/lib/cjs/map-layers.d.ts +1 -0
- package/lib/cjs/map-layers.d.ts.map +1 -1
- package/lib/cjs/map-layers.js +4 -3
- package/lib/cjs/map-layers.js.map +1 -1
- package/lib/cjs/mapLayers.d.ts +2 -2
- package/lib/cjs/mapLayers.d.ts.map +1 -1
- package/lib/cjs/mapLayers.js.map +1 -1
- package/lib/cjs/public/locales/en/mapLayers.json +179 -184
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts +3 -2
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +48 -16
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.js.map +1 -1
- package/lib/cjs/ui/Interfaces.d.ts +3 -3
- package/lib/cjs/ui/Interfaces.d.ts.map +1 -1
- package/lib/cjs/ui/Interfaces.js.map +1 -1
- package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +3 -2
- package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/ui/MapLayersUiItemsProvider.js +2 -6
- package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
- package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
- package/lib/cjs/ui/widget/AttachLayerPopupButton.js +81 -46
- package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/BasemapPanel.d.ts.map +1 -1
- package/lib/cjs/ui/widget/BasemapPanel.js +44 -25
- package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
- package/lib/cjs/ui/widget/BasemapPanel.scss +2 -4
- package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +1 -1
- package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
- package/lib/cjs/ui/widget/ConfirmMessageDialog.js +31 -8
- package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
- package/lib/cjs/ui/widget/CustomParamEditDialog.d.ts +1 -1
- package/lib/cjs/ui/widget/CustomParamEditDialog.d.ts.map +1 -1
- package/lib/cjs/ui/widget/CustomParamEditDialog.js +34 -20
- package/lib/cjs/ui/widget/CustomParamEditDialog.js.map +1 -1
- package/lib/cjs/ui/widget/CustomParamEditDialog.scss +1 -2
- package/lib/cjs/ui/widget/CustomParamsSettings.d.ts.map +1 -1
- package/lib/cjs/ui/widget/CustomParamsSettings.js +43 -28
- package/lib/cjs/ui/widget/CustomParamsSettings.js.map +1 -1
- package/lib/cjs/ui/widget/CustomParamsSettings.scss +7 -9
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +3 -2
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +4 -2
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
- package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +1 -1
- package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
- package/lib/cjs/ui/widget/FeatureInfoWidget.js +36 -6
- package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerActionButtons.d.ts +1 -1
- package/lib/cjs/ui/widget/MapLayerActionButtons.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapLayerActionButtons.js +30 -17
- package/lib/cjs/ui/widget/MapLayerActionButtons.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +2 -2
- package/lib/cjs/ui/widget/MapLayerDroppable.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapLayerDroppable.js +64 -50
- package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerManager.d.ts +2 -2
- package/lib/cjs/ui/widget/MapLayerManager.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapLayerManager.js +160 -86
- package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerManager.scss +3 -6
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +2 -2
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +33 -13
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +36 -14
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +5 -5
- package/lib/cjs/ui/widget/MapLayersWidget.d.ts +1 -1
- package/lib/cjs/ui/widget/MapLayersWidget.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapLayersWidget.js +34 -11
- package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
- package/lib/cjs/ui/widget/MapManagerMapLayersHeader.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapManagerMapLayersHeader.js +5 -8
- package/lib/cjs/ui/widget/MapManagerMapLayersHeader.js.map +1 -1
- package/lib/cjs/ui/widget/MapManagerSettings.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapManagerSettings.js +55 -56
- package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
- package/lib/cjs/ui/widget/MapManagerSettings.scss +1 -1
- package/lib/cjs/ui/widget/MapSelectFeaturesDialog.d.ts +2 -2
- package/lib/cjs/ui/widget/MapSelectFeaturesDialog.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapSelectFeaturesDialog.js +33 -18
- package/lib/cjs/ui/widget/MapSelectFeaturesDialog.js.map +1 -1
- package/lib/cjs/ui/widget/MapSelectFeaturesDialog.scss +1 -3
- package/lib/cjs/ui/widget/MapUrlDialog.d.ts +4 -3
- package/lib/cjs/ui/widget/MapUrlDialog.d.ts.map +1 -1
- package/lib/cjs/ui/widget/MapUrlDialog.js +125 -96
- package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
- package/lib/cjs/ui/widget/MapUrlDialog.scss +6 -7
- package/lib/cjs/ui/widget/SelectApiKey.d.ts.map +1 -1
- package/lib/cjs/ui/widget/SelectApiKey.js +38 -10
- package/lib/cjs/ui/widget/SelectApiKey.js.map +1 -1
- package/lib/cjs/ui/widget/SelectCustomParam.d.ts.map +1 -1
- package/lib/cjs/ui/widget/SelectCustomParam.js +40 -11
- package/lib/cjs/ui/widget/SelectCustomParam.js.map +1 -1
- package/lib/cjs/ui/widget/SelectMapFormat.d.ts +3 -3
- package/lib/cjs/ui/widget/SelectMapFormat.d.ts.map +1 -1
- package/lib/cjs/ui/widget/SelectMapFormat.js +35 -13
- package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +2 -2
- package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
- package/lib/cjs/ui/widget/SubLayersDataProvider.js +13 -9
- package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +1 -1
- package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
- package/lib/cjs/ui/widget/SubLayersPopupButton.js +30 -12
- package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersTree.d.ts +2 -2
- package/lib/cjs/ui/widget/SubLayersTree.d.ts.map +1 -1
- package/lib/cjs/ui/widget/SubLayersTree.js +83 -45
- package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersTree.scss +4 -7
- package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
- package/lib/cjs/ui/widget/TransparencyPopupButton.js +33 -16
- package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/TransparencyPopupButton.scss +1 -2
- package/lib/cjs/ui/widget/UserPreferencesStorageOptions.d.ts +1 -1
- package/lib/cjs/ui/widget/UserPreferencesStorageOptions.d.ts.map +1 -1
- package/lib/cjs/ui/widget/UserPreferencesStorageOptions.js +2 -8
- package/lib/cjs/ui/widget/UserPreferencesStorageOptions.js.map +1 -1
- package/lib/esm/BrowserStorage.d.ts +1 -1
- package/lib/esm/BrowserStorage.d.ts.map +1 -1
- package/lib/esm/BrowserStorage.js +24 -14
- package/lib/esm/BrowserStorage.js.map +1 -1
- package/lib/esm/CustomParamUtils.d.ts +1 -1
- package/lib/esm/CustomParamUtils.d.ts.map +1 -1
- package/lib/esm/CustomParamUtils.js +18 -7
- package/lib/esm/CustomParamUtils.js.map +1 -1
- package/lib/esm/CustomParamsMappingStorage.d.ts +1 -1
- package/lib/esm/CustomParamsMappingStorage.d.ts.map +1 -1
- package/lib/esm/CustomParamsMappingStorage.js +3 -3
- package/lib/esm/CustomParamsMappingStorage.js.map +1 -1
- package/lib/esm/CustomParamsStorage.d.ts +1 -1
- package/lib/esm/CustomParamsStorage.d.ts.map +1 -1
- package/lib/esm/CustomParamsStorage.js +3 -3
- package/lib/esm/CustomParamsStorage.js.map +1 -1
- package/lib/esm/MapLayerPreferences.d.ts +2 -1
- package/lib/esm/MapLayerPreferences.d.ts.map +1 -1
- package/lib/esm/MapLayerPreferences.js +50 -25
- package/lib/esm/MapLayerPreferences.js.map +1 -1
- package/lib/esm/MapLayersActionIds.d.ts +5 -0
- package/lib/esm/MapLayersActionIds.d.ts.map +1 -0
- package/lib/esm/MapLayersActionIds.js +7 -0
- package/lib/esm/MapLayersActionIds.js.map +1 -0
- package/lib/esm/MapLayersPrefBrowserStorage.d.ts.map +1 -1
- package/lib/esm/MapLayersPrefBrowserStorage.js +4 -5
- package/lib/esm/MapLayersPrefBrowserStorage.js.map +1 -1
- package/lib/esm/PreferencesBrowserStorage.d.ts +18 -18
- package/lib/esm/PreferencesBrowserStorage.d.ts.map +1 -1
- package/lib/esm/PreferencesBrowserStorage.js +14 -14
- package/lib/esm/PreferencesBrowserStorage.js.map +1 -1
- package/lib/esm/map-layers.d.ts +1 -0
- package/lib/esm/map-layers.d.ts.map +1 -1
- package/lib/esm/map-layers.js +4 -3
- package/lib/esm/map-layers.js.map +1 -1
- package/lib/esm/mapLayers.d.ts +2 -2
- package/lib/esm/mapLayers.d.ts.map +1 -1
- package/lib/esm/mapLayers.js.map +1 -1
- package/lib/esm/public/locales/en/mapLayers.json +179 -184
- package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +3 -2
- package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/ui/FeatureInfoUiItemsProvider.js +48 -16
- package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
- package/lib/esm/ui/Interfaces.d.ts +3 -3
- package/lib/esm/ui/Interfaces.d.ts.map +1 -1
- package/lib/esm/ui/Interfaces.js.map +1 -1
- package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +3 -2
- package/lib/esm/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/ui/MapLayersUiItemsProvider.js +2 -6
- package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
- package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
- package/lib/esm/ui/widget/AttachLayerPopupButton.js +57 -45
- package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/BasemapPanel.d.ts.map +1 -1
- package/lib/esm/ui/widget/BasemapPanel.js +19 -23
- package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
- package/lib/esm/ui/widget/BasemapPanel.scss +2 -4
- package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +1 -1
- package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
- package/lib/esm/ui/widget/ConfirmMessageDialog.js +5 -5
- package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
- package/lib/esm/ui/widget/CustomParamEditDialog.d.ts +1 -1
- package/lib/esm/ui/widget/CustomParamEditDialog.d.ts.map +1 -1
- package/lib/esm/ui/widget/CustomParamEditDialog.js +9 -18
- package/lib/esm/ui/widget/CustomParamEditDialog.js.map +1 -1
- package/lib/esm/ui/widget/CustomParamEditDialog.scss +1 -2
- package/lib/esm/ui/widget/CustomParamsSettings.d.ts.map +1 -1
- package/lib/esm/ui/widget/CustomParamsSettings.js +18 -26
- package/lib/esm/ui/widget/CustomParamsSettings.js.map +1 -1
- package/lib/esm/ui/widget/CustomParamsSettings.scss +7 -9
- package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +3 -2
- package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
- package/lib/esm/ui/widget/FeatureInfoDataProvider.js +4 -2
- package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
- package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +1 -1
- package/lib/esm/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
- package/lib/esm/ui/widget/FeatureInfoWidget.js +12 -5
- package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerActionButtons.d.ts +1 -1
- package/lib/esm/ui/widget/MapLayerActionButtons.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapLayerActionButtons.js +6 -16
- package/lib/esm/ui/widget/MapLayerActionButtons.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerDroppable.d.ts +2 -2
- package/lib/esm/ui/widget/MapLayerDroppable.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapLayerDroppable.js +38 -47
- package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerManager.d.ts +2 -2
- package/lib/esm/ui/widget/MapLayerManager.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapLayerManager.js +136 -85
- package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerManager.scss +3 -6
- package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +2 -2
- package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapLayerSettingsMenu.js +9 -12
- package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +11 -12
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +5 -5
- package/lib/esm/ui/widget/MapLayersWidget.d.ts +1 -1
- package/lib/esm/ui/widget/MapLayersWidget.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapLayersWidget.js +9 -9
- package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
- package/lib/esm/ui/widget/MapManagerMapLayersHeader.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapManagerMapLayersHeader.js +5 -8
- package/lib/esm/ui/widget/MapManagerMapLayersHeader.js.map +1 -1
- package/lib/esm/ui/widget/MapManagerSettings.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapManagerSettings.js +29 -53
- package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
- package/lib/esm/ui/widget/MapManagerSettings.scss +1 -1
- package/lib/esm/ui/widget/MapSelectFeaturesDialog.d.ts +2 -2
- package/lib/esm/ui/widget/MapSelectFeaturesDialog.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapSelectFeaturesDialog.js +7 -15
- package/lib/esm/ui/widget/MapSelectFeaturesDialog.js.map +1 -1
- package/lib/esm/ui/widget/MapSelectFeaturesDialog.scss +1 -3
- package/lib/esm/ui/widget/MapUrlDialog.d.ts +4 -3
- package/lib/esm/ui/widget/MapUrlDialog.d.ts.map +1 -1
- package/lib/esm/ui/widget/MapUrlDialog.js +100 -94
- package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
- package/lib/esm/ui/widget/MapUrlDialog.scss +6 -7
- package/lib/esm/ui/widget/SelectApiKey.d.ts.map +1 -1
- package/lib/esm/ui/widget/SelectApiKey.js +12 -7
- package/lib/esm/ui/widget/SelectApiKey.js.map +1 -1
- package/lib/esm/ui/widget/SelectCustomParam.d.ts.map +1 -1
- package/lib/esm/ui/widget/SelectCustomParam.js +14 -8
- package/lib/esm/ui/widget/SelectCustomParam.js.map +1 -1
- package/lib/esm/ui/widget/SelectMapFormat.d.ts +3 -3
- package/lib/esm/ui/widget/SelectMapFormat.d.ts.map +1 -1
- package/lib/esm/ui/widget/SelectMapFormat.js +9 -10
- package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +2 -2
- package/lib/esm/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
- package/lib/esm/ui/widget/SubLayersDataProvider.js +13 -9
- package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +1 -1
- package/lib/esm/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
- package/lib/esm/ui/widget/SubLayersPopupButton.js +6 -11
- package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersTree.d.ts +2 -2
- package/lib/esm/ui/widget/SubLayersTree.d.ts.map +1 -1
- package/lib/esm/ui/widget/SubLayersTree.js +59 -44
- package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersTree.scss +4 -7
- package/lib/esm/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
- package/lib/esm/ui/widget/TransparencyPopupButton.js +8 -14
- package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/TransparencyPopupButton.scss +1 -2
- package/lib/esm/ui/widget/UserPreferencesStorageOptions.d.ts +1 -1
- package/lib/esm/ui/widget/UserPreferencesStorageOptions.d.ts.map +1 -1
- package/lib/esm/ui/widget/UserPreferencesStorageOptions.js +2 -8
- package/lib/esm/ui/widget/UserPreferencesStorageOptions.js.map +1 -1
- package/lib/public/locales/en/mapLayers.json +179 -184
- 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
|
|
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
|
|
63
|
-
return cpMapping
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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 =
|
|
148
|
-
let 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 (
|
|
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,
|
|
223
|
+
}, [customParamNames, mapName, mapType, password, userName]);
|
|
220
224
|
const handleOk = React.useCallback(() => {
|
|
221
|
-
const
|
|
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(
|
|
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", {
|
|
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 =
|
|
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(
|
|
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
|
|
286
|
-
|
|
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
|
-
}, [
|
|
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
|
|
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
|
-
|
|
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 =
|
|
394
|
-
&&
|
|
395
|
-
|
|
396
|
-
&&
|
|
397
|
-
&&
|
|
398
|
-
|
|
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
|
-
}, [
|
|
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);
|
|
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 =
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
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
|