@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
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Change Log - @itwin/map-layers
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 11 Sep 2024 19:11:41 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 5.5.0
|
|
8
|
+
|
|
9
|
+
Wed, 11 Sep 2024 19:11:41 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Hide map layer info tool when map layers is off or no arcgis feature layers exist ([#1016](https://github.com/iTwin/viewer-components-react/pull/1016))
|
|
14
|
+
|
|
15
|
+
## 5.4.4
|
|
16
|
+
|
|
17
|
+
Tue, 21 May 2024 13:26:35 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Url scheme validation when adding a new map layer and fix an issue with usersPreferences and browser storage. ([#836](https://github.com/iTwin/viewer-components-react/pull/836))
|
|
22
|
+
- Added copy property value button in Map Layers Info widget ([#834](https://github.com/iTwin/viewer-components-react/pull/834))
|
|
23
|
+
|
|
7
24
|
## 5.4.3
|
|
8
25
|
|
|
9
|
-
Thu, 04 Apr 2024 14:19:
|
|
26
|
+
Thu, 04 Apr 2024 14:19:35 GMT
|
|
10
27
|
|
|
11
28
|
### Patches
|
|
12
29
|
|
package/README.md
CHANGED
|
@@ -15,17 +15,17 @@ This package can also be installed into an application and the method MapLayersU
|
|
|
15
15
|
2. The dependencies are installed as part of "rush install" in the iTwin.js repository.
|
|
16
16
|
3. Build the extension as part of the "rush build" in the iTwin.js repository, or separately build using the npm build command.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
```sh
|
|
19
|
+
npm run build
|
|
20
|
+
```
|
|
21
21
|
|
|
22
22
|
4. Start the host application - go to its directory and run:
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
```sh
|
|
25
|
+
npm run start:servers
|
|
26
|
+
```
|
|
27
27
|
|
|
28
|
-
5. Open a web browser (e.g., Chrome), and browse to http://localhost:3000.
|
|
28
|
+
5. Open a web browser (e.g., Chrome), and browse to http://localhost:3000.
|
|
29
29
|
|
|
30
30
|
## Contributing
|
|
31
31
|
|
|
@@ -15,7 +15,7 @@ export declare class BrowserStorage<Type> {
|
|
|
15
15
|
private readonly _throwOnDeleteMissingKey;
|
|
16
16
|
constructor(opts: BrowserStorageOptions);
|
|
17
17
|
private loadFromStorage;
|
|
18
|
-
get(key: string | undefined): Type[] | undefined;
|
|
18
|
+
get(key: string | undefined): Type | Type[] | undefined;
|
|
19
19
|
getContent(): KeyContentProps<Type> | undefined;
|
|
20
20
|
delete(key: string): void;
|
|
21
21
|
deleteMatchingContent(content: Type): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserStorage.d.ts","sourceRoot":"","sources":["../../src/BrowserStorage.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,UAAU,eAAe,CAAC,IAAI;IAC5B,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,yGAAyG;IACzG,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,cAAc,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"BrowserStorage.d.ts","sourceRoot":"","sources":["../../src/BrowserStorage.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,UAAU,eAAe,CAAC,IAAI;IAC5B,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,yGAAyG;IACzG,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,cAAc,CAAC,IAAI;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC9B,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC;gBAE9B,IAAI,EAAE,qBAAqB;IAKvC,OAAO,CAAC,eAAe;IAgBhB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS;IAkB3B,UAAU;IAIV,MAAM,CAAC,GAAG,EAAE,MAAM;IAqBlB,qBAAqB,CAAC,OAAO,EAAE,IAAI;IAenC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI;CAWvC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
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
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.BrowserStorage = void 0;
|
|
8
8
|
class BrowserStorage {
|
|
@@ -17,21 +17,25 @@ class BrowserStorage {
|
|
|
17
17
|
if (itemStr === null) {
|
|
18
18
|
return undefined;
|
|
19
19
|
}
|
|
20
|
-
if (!itemStr || itemStr === "{}")
|
|
20
|
+
if (!itemStr || itemStr === "{}") {
|
|
21
21
|
return map;
|
|
22
|
+
}
|
|
22
23
|
map = JSON.parse(itemStr);
|
|
23
24
|
return map;
|
|
24
25
|
}
|
|
25
26
|
get(key) {
|
|
26
27
|
const map = this.loadFromStorage();
|
|
27
|
-
if (map === undefined)
|
|
28
|
+
if (map === undefined) {
|
|
28
29
|
return undefined;
|
|
30
|
+
}
|
|
29
31
|
if (key) {
|
|
30
|
-
if (!Object.keys(map).includes(key))
|
|
32
|
+
if (!Object.keys(map).includes(key)) {
|
|
31
33
|
return undefined;
|
|
32
|
-
|
|
34
|
+
}
|
|
35
|
+
return map[key];
|
|
33
36
|
}
|
|
34
|
-
else {
|
|
37
|
+
else {
|
|
38
|
+
// No key provided, return all objects
|
|
35
39
|
return Object.entries(map).map(([_key, value]) => value);
|
|
36
40
|
}
|
|
37
41
|
}
|
|
@@ -41,16 +45,20 @@ class BrowserStorage {
|
|
|
41
45
|
delete(key) {
|
|
42
46
|
const map = this.loadFromStorage();
|
|
43
47
|
if (map === undefined) {
|
|
44
|
-
if (this._throwOnDeleteMissingKey)
|
|
48
|
+
if (this._throwOnDeleteMissingKey) {
|
|
45
49
|
throw new Error("Could not find key from storage.");
|
|
46
|
-
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
47
52
|
return;
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
if (!Object.keys(map).includes(key)) {
|
|
50
|
-
if (this._throwOnDeleteMissingKey)
|
|
56
|
+
if (this._throwOnDeleteMissingKey) {
|
|
51
57
|
throw Error("Could not find key from storage.");
|
|
52
|
-
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
53
60
|
return;
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
63
|
delete map[key];
|
|
56
64
|
window.localStorage.setItem(this._itemKeyName, JSON.stringify(map));
|
|
@@ -62,15 +70,17 @@ class BrowserStorage {
|
|
|
62
70
|
}
|
|
63
71
|
const contentJson = JSON.stringify(content);
|
|
64
72
|
for (const [key, value] of Object.entries(map)) {
|
|
65
|
-
if (JSON.stringify(value) === contentJson)
|
|
73
|
+
if (JSON.stringify(value) === contentJson) {
|
|
66
74
|
delete map[key];
|
|
75
|
+
}
|
|
67
76
|
}
|
|
68
77
|
window.localStorage.setItem(this._itemKeyName, JSON.stringify(map));
|
|
69
78
|
}
|
|
70
79
|
save(key, content) {
|
|
71
80
|
let map = this.loadFromStorage();
|
|
72
|
-
if (map === undefined)
|
|
81
|
+
if (map === undefined) {
|
|
73
82
|
map = {};
|
|
83
|
+
}
|
|
74
84
|
map[key] = content;
|
|
75
85
|
const itemValue = JSON.stringify(map);
|
|
76
86
|
window.localStorage.setItem(this._itemKeyName, itemValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserStorage.js","sourceRoot":"","sources":["../../src/BrowserStorage.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"BrowserStorage.js","sourceRoot":"","sources":["../../src/BrowserStorage.ts"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** Index signature holding preferences content\n *\n * @internal\n */\ninterface KeyContentProps<Type> {\n [preferenceKey: string]: Type;\n}\n\nexport interface BrowserStorageOptions {\n /** indicate whether or not delete function should throw an error if the provided key cannot be found. */\n throwOnDeleteMissingKey?: boolean;\n itemKeyName: string;\n}\n\nexport class BrowserStorage<Type> {\n private readonly _itemKeyName;\n private readonly _throwOnDeleteMissingKey;\n\n constructor(opts: BrowserStorageOptions) {\n this._itemKeyName = opts.itemKeyName;\n this._throwOnDeleteMissingKey = opts.throwOnDeleteMissingKey ?? true;\n }\n\n private loadFromStorage() {\n const storage = window.localStorage;\n\n let map: KeyContentProps<Type> = {};\n const itemStr = storage.getItem(this._itemKeyName);\n if (itemStr === null) {\n return undefined;\n }\n if (!itemStr || itemStr === \"{}\") {\n return map;\n }\n\n map = JSON.parse(itemStr);\n return map;\n }\n\n public get(key: string | undefined) {\n const map = this.loadFromStorage();\n if (map === undefined) {\n return undefined;\n }\n\n if (key) {\n if (!Object.keys(map).includes(key)) {\n return undefined;\n }\n\n return map[key];\n } else {\n // No key provided, return all objects\n return Object.entries(map).map(([_key, value]) => value);\n }\n }\n\n public getContent() {\n return this.loadFromStorage();\n }\n\n public delete(key: string) {\n const map = this.loadFromStorage();\n if (map === undefined) {\n if (this._throwOnDeleteMissingKey) {\n throw new Error(\"Could not find key from storage.\");\n } else {\n return;\n }\n }\n\n if (!Object.keys(map).includes(key)) {\n if (this._throwOnDeleteMissingKey) {\n throw Error(\"Could not find key from storage.\");\n } else {\n return;\n }\n }\n delete map[key];\n window.localStorage.setItem(this._itemKeyName, JSON.stringify(map));\n }\n\n public deleteMatchingContent(content: Type) {\n const map = this.loadFromStorage();\n if (map === undefined) {\n return;\n }\n const contentJson = JSON.stringify(content);\n for (const [key, value] of Object.entries(map)) {\n if (JSON.stringify(value) === contentJson) {\n delete map[key];\n }\n }\n\n window.localStorage.setItem(this._itemKeyName, JSON.stringify(map));\n }\n\n public save(key: string, content: Type) {\n let map = this.loadFromStorage();\n if (map === undefined) {\n map = {};\n }\n\n map[key] = content;\n\n const itemValue = JSON.stringify(map);\n window.localStorage.setItem(this._itemKeyName, itemValue);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomParamUtils.d.ts","sourceRoot":"","sources":["../../src/CustomParamUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomParamUtils.d.ts","sourceRoot":"","sources":["../../src/CustomParamUtils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAI3D,qBAAa,gBAAgB;WACb,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE;CA4BvF"}
|
|
@@ -6,17 +6,28 @@ class CustomParamUtils {
|
|
|
6
6
|
static setSourceCustomParams(source, customParamNames) {
|
|
7
7
|
const cpStorage = new CustomParamsStorage_1.CustomParamsStorage();
|
|
8
8
|
customParamNames.forEach((paramName) => {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const paramFromStorage = cpStorage.get(paramName);
|
|
10
|
+
let customParam;
|
|
11
|
+
if (Array.isArray(paramFromStorage)) {
|
|
12
|
+
if (paramFromStorage.length > 0) {
|
|
13
|
+
customParam = paramFromStorage[0];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
customParam = paramFromStorage;
|
|
18
|
+
}
|
|
19
|
+
if (customParam && source) {
|
|
20
|
+
if (customParam.secret) {
|
|
21
|
+
if (!source.unsavedQueryParams) {
|
|
13
22
|
source.unsavedQueryParams = {};
|
|
14
|
-
|
|
23
|
+
}
|
|
24
|
+
source.unsavedQueryParams[customParam.key] = customParam.value;
|
|
15
25
|
}
|
|
16
26
|
else {
|
|
17
|
-
if (!source.savedQueryParams)
|
|
27
|
+
if (!source.savedQueryParams) {
|
|
18
28
|
source.savedQueryParams = {};
|
|
19
|
-
|
|
29
|
+
}
|
|
30
|
+
source.savedQueryParams[customParam.key] = customParam.value;
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomParamUtils.js","sourceRoot":"","sources":["../../src/CustomParamUtils.ts"],"names":[],"mappings":";;;AAKA,+DAA4D;
|
|
1
|
+
{"version":3,"file":"CustomParamUtils.js","sourceRoot":"","sources":["../../src/CustomParamUtils.ts"],"names":[],"mappings":";;;AAKA,+DAA4D;AAG5D,MAAa,gBAAgB;IACpB,MAAM,CAAC,qBAAqB,CAAC,MAAsB,EAAE,gBAA0B;QACpF,MAAM,SAAS,GAAG,IAAI,yCAAmB,EAAE,CAAC;QAC5C,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YACrC,MAAM,gBAAgB,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAClD,IAAI,WAAwC,CAAC;YAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;gBACnC,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;oBAC/B,WAAW,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;iBACnC;aACF;iBAAM;gBACL,WAAW,GAAG,gBAAgB,CAAC;aAChC;YAED,IAAI,WAAW,IAAI,MAAM,EAAE;gBACzB,IAAI,WAAW,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;wBAC9B,MAAM,CAAC,kBAAkB,GAAG,EAAE,CAAC;qBAChC;oBACD,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC;iBAChE;qBAAM;oBACL,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE;wBAC5B,MAAM,CAAC,gBAAgB,GAAG,EAAE,CAAC;qBAC9B;oBACD,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC;iBAC9D;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,4CA6BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport type { MapLayerSource } from \"@itwin/core-frontend\";\nimport { CustomParamsStorage } from \"./CustomParamsStorage\";\nimport type { CustomParamItem } from \"./ui/Interfaces\";\n\nexport class CustomParamUtils {\n public static setSourceCustomParams(source: MapLayerSource, customParamNames: string[]) {\n const cpStorage = new CustomParamsStorage();\n customParamNames.forEach((paramName) => {\n const paramFromStorage = cpStorage.get(paramName);\n let customParam: CustomParamItem | undefined;\n if (Array.isArray(paramFromStorage)) {\n if (paramFromStorage.length > 0) {\n customParam = paramFromStorage[0];\n }\n } else {\n customParam = paramFromStorage;\n }\n\n if (customParam && source) {\n if (customParam.secret) {\n if (!source.unsavedQueryParams) {\n source.unsavedQueryParams = {};\n }\n source.unsavedQueryParams[customParam.key] = customParam.value;\n } else {\n if (!source.savedQueryParams) {\n source.savedQueryParams = {};\n }\n source.savedQueryParams[customParam.key] = customParam.value;\n }\n }\n });\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BrowserStorage } from "./BrowserStorage";
|
|
2
|
-
import { CustomParamsMappingItem } from "./ui/Interfaces";
|
|
2
|
+
import type { CustomParamsMappingItem } from "./ui/Interfaces";
|
|
3
3
|
export declare class CustomParamsMappingStorage extends BrowserStorage<CustomParamsMappingItem> {
|
|
4
4
|
constructor();
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomParamsMappingStorage.d.ts","sourceRoot":"","sources":["../../src/CustomParamsMappingStorage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomParamsMappingStorage.d.ts","sourceRoot":"","sources":["../../src/CustomParamsMappingStorage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,qBAAa,0BAA2B,SAAQ,cAAc,CAAC,uBAAuB,CAAC;;CAItF"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CustomParamsMappingStorage = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
8
|
const BrowserStorage_1 = require("./BrowserStorage");
|
|
9
9
|
class CustomParamsMappingStorage extends BrowserStorage_1.BrowserStorage {
|
|
10
10
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomParamsMappingStorage.js","sourceRoot":"","sources":["../../src/CustomParamsMappingStorage.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"CustomParamsMappingStorage.js","sourceRoot":"","sources":["../../src/CustomParamsMappingStorage.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,qDAAkD;AAGlD,MAAa,0BAA2B,SAAQ,+BAAuC;IACrF;QACE,KAAK,CAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAJD,gEAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { BrowserStorage } from \"./BrowserStorage\";\nimport type { CustomParamsMappingItem } from \"./ui/Interfaces\";\n\nexport class CustomParamsMappingStorage extends BrowserStorage<CustomParamsMappingItem> {\n constructor() {\n super({ itemKeyName: \"itwinjs.mapLayers.customParamsMapping\" });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomParamsStorage.d.ts","sourceRoot":"","sources":["../../src/CustomParamsStorage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomParamsStorage.d.ts","sourceRoot":"","sources":["../../src/CustomParamsStorage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,eAAe,CAAC;;CAIvE"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CustomParamsStorage = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
8
|
const BrowserStorage_1 = require("./BrowserStorage");
|
|
9
9
|
class CustomParamsStorage extends BrowserStorage_1.BrowserStorage {
|
|
10
10
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomParamsStorage.js","sourceRoot":"","sources":["../../src/CustomParamsStorage.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"CustomParamsStorage.js","sourceRoot":"","sources":["../../src/CustomParamsStorage.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,qDAAkD;AAGlD,MAAa,mBAAoB,SAAQ,+BAA+B;IACtE;QACE,KAAK,CAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF;AAJD,kDAIC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nimport { BrowserStorage } from \"./BrowserStorage\";\nimport type { CustomParamItem } from \"./ui/Interfaces\";\n\nexport class CustomParamsStorage extends BrowserStorage<CustomParamItem> {\n constructor() {\n super({ itemKeyName: \"itwinjs.mapLayers.customParams\" });\n }\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MapLayerSource } from "@itwin/core-frontend";
|
|
2
|
-
import {
|
|
2
|
+
import type { GuidString } from "@itwin/core-bentley";
|
|
3
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
3
4
|
/** @internal */
|
|
4
5
|
export interface MapLayerPreferencesContent {
|
|
5
6
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapLayerPreferences.d.ts","sourceRoot":"","sources":["../../src/MapLayerPreferences.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,cAAc,EAA+C,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MapLayerPreferences.d.ts","sourceRoot":"","sources":["../../src/MapLayerPreferences.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,cAAc,EAA+C,MAAM,sBAAsB,CAAC;AAC9G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,gBAAgB;AAChB,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5C;AAED,gBAAgB;AAChB,oBAAY,wBAAwB;IAClC,KAAK,IAAI;IACT,OAAO,IAAI;IACX,QAAQ,IAAI;CACb;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;CAC/B;AAED;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;OAMG;IACH,gBAAuB,oBAAoB,uBAC5B,wBAAwB,qFAA6D,IAAI,EACpG;IAEJ;;;;;;OAMG;WACiB,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAkC9I;;;;;;;;OAQG;WACiB,aAAa,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA4ClJ;;;;;OAKG;WACiB,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BnH;;;;;;;;;;;OAWG;mBACkB,MAAM;IA8F3B;;;;OAIG;WACiB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;IA4B9H;;;;OAIG;WACiB,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAiDrG,OAAO,CAAC,MAAM,KAAK,oBAAoB,GAEtC;CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
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
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.MapLayerPreferences = exports.MapLayerSourceChangeType = void 0;
|
|
8
8
|
const core_frontend_1 = require("@itwin/core-frontend");
|
|
@@ -30,12 +30,14 @@ class MapLayerPreferences {
|
|
|
30
30
|
* @param storeOnIModel if true store the settings object on the model, if false store it on the project
|
|
31
31
|
*/
|
|
32
32
|
static async storeSource(source, iTwinId, iModelId, storeOnIModel) {
|
|
33
|
-
if (!mapLayers_1.MapLayersUI.iTwinConfig)
|
|
33
|
+
if (!mapLayers_1.MapLayersUI.iTwinConfig) {
|
|
34
34
|
return false;
|
|
35
|
-
|
|
35
|
+
}
|
|
36
|
+
const accessToken = undefined !== core_frontend_1.IModelApp.authorizationClient ? await core_frontend_1.IModelApp.authorizationClient.getAccessToken() : undefined;
|
|
36
37
|
const sourceJSON = source.toJSON();
|
|
37
|
-
if (!sourceJSON.formatId)
|
|
38
|
+
if (!sourceJSON.formatId) {
|
|
38
39
|
return false;
|
|
40
|
+
}
|
|
39
41
|
const mapLayerSetting = {
|
|
40
42
|
url: sourceJSON.url,
|
|
41
43
|
name: sourceJSON.name,
|
|
@@ -69,9 +71,10 @@ class MapLayerPreferences {
|
|
|
69
71
|
* @param iModelId
|
|
70
72
|
*/
|
|
71
73
|
static async replaceSource(oldSource, newSource, iTwinId, iModelId) {
|
|
72
|
-
if (!mapLayers_1.MapLayersUI.iTwinConfig)
|
|
74
|
+
if (!mapLayers_1.MapLayersUI.iTwinConfig) {
|
|
73
75
|
return;
|
|
74
|
-
|
|
76
|
+
}
|
|
77
|
+
const accessToken = undefined !== core_frontend_1.IModelApp.authorizationClient ? await core_frontend_1.IModelApp.authorizationClient.getAccessToken() : undefined;
|
|
75
78
|
let storeOnIModel = false;
|
|
76
79
|
try {
|
|
77
80
|
await mapLayers_1.MapLayersUI.iTwinConfig.delete({
|
|
@@ -114,9 +117,10 @@ class MapLayerPreferences {
|
|
|
114
117
|
* @param iModelId
|
|
115
118
|
*/
|
|
116
119
|
static async deleteByName(source, iTwinId, iModelId) {
|
|
117
|
-
if (!mapLayers_1.MapLayersUI.iTwinConfig)
|
|
120
|
+
if (!mapLayers_1.MapLayersUI.iTwinConfig) {
|
|
118
121
|
return;
|
|
119
|
-
|
|
122
|
+
}
|
|
123
|
+
const accessToken = undefined !== core_frontend_1.IModelApp.authorizationClient ? await core_frontend_1.IModelApp.authorizationClient.getAccessToken() : undefined;
|
|
120
124
|
try {
|
|
121
125
|
await mapLayers_1.MapLayersUI.iTwinConfig.delete({
|
|
122
126
|
accessToken,
|
|
@@ -150,9 +154,10 @@ class MapLayerPreferences {
|
|
|
150
154
|
* @param storeOnIModel
|
|
151
155
|
*/
|
|
152
156
|
static async delete(url, name, iTwinId, iModelId, storeOnIModel) {
|
|
153
|
-
if (!mapLayers_1.MapLayersUI.iTwinConfig)
|
|
157
|
+
if (!mapLayers_1.MapLayersUI.iTwinConfig) {
|
|
154
158
|
return true;
|
|
155
|
-
|
|
159
|
+
}
|
|
160
|
+
const accessToken = undefined !== core_frontend_1.IModelApp.authorizationClient ? await core_frontend_1.IModelApp.authorizationClient.getAccessToken() : undefined;
|
|
156
161
|
const iTwinPreferenceByName = await mapLayers_1.MapLayersUI.iTwinConfig.get({
|
|
157
162
|
accessToken,
|
|
158
163
|
namespace: MapLayerPreferences._preferenceNamespace,
|
|
@@ -160,7 +165,9 @@ class MapLayerPreferences {
|
|
|
160
165
|
iTwinId,
|
|
161
166
|
});
|
|
162
167
|
if (undefined !== iTwinPreferenceByName && storeOnIModel) {
|
|
163
|
-
const errorMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerExistsAsProjectSetting", {
|
|
168
|
+
const errorMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerExistsAsProjectSetting", {
|
|
169
|
+
layer: iTwinPreferenceByName.name,
|
|
170
|
+
});
|
|
164
171
|
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, errorMessage));
|
|
165
172
|
return false;
|
|
166
173
|
}
|
|
@@ -177,12 +184,19 @@ class MapLayerPreferences {
|
|
|
177
184
|
// check if setting with url already exists, if it does, delete it
|
|
178
185
|
const settingFromUrl = await MapLayerPreferences.getByUrl(url, iTwinId, undefined);
|
|
179
186
|
if (settingFromUrl && storeOnIModel) {
|
|
180
|
-
const errorMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerWithUrlExistsAsProjectSetting", {
|
|
187
|
+
const errorMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerWithUrlExistsAsProjectSetting", {
|
|
188
|
+
url: settingFromUrl.url,
|
|
189
|
+
name: settingFromUrl.name,
|
|
190
|
+
});
|
|
181
191
|
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Error, errorMessage));
|
|
182
192
|
return false;
|
|
183
193
|
}
|
|
184
194
|
else if (settingFromUrl) {
|
|
185
|
-
const infoMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerWithUrlExistsOverwriting", {
|
|
195
|
+
const infoMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerWithUrlExistsOverwriting", {
|
|
196
|
+
url: settingFromUrl.url,
|
|
197
|
+
oldName: settingFromUrl.name,
|
|
198
|
+
newName: name,
|
|
199
|
+
});
|
|
186
200
|
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, infoMessage));
|
|
187
201
|
await mapLayers_1.MapLayersUI.iTwinConfig.delete({
|
|
188
202
|
accessToken,
|
|
@@ -191,7 +205,8 @@ class MapLayerPreferences {
|
|
|
191
205
|
iTwinId,
|
|
192
206
|
});
|
|
193
207
|
}
|
|
194
|
-
if (iModelId) {
|
|
208
|
+
if (iModelId) {
|
|
209
|
+
// delete any settings on model so user can update them if theres collisions
|
|
195
210
|
const settingOnIModelFromName = await mapLayers_1.MapLayersUI.iTwinConfig.get({
|
|
196
211
|
accessToken,
|
|
197
212
|
namespace: MapLayerPreferences._preferenceNamespace,
|
|
@@ -212,7 +227,11 @@ class MapLayerPreferences {
|
|
|
212
227
|
});
|
|
213
228
|
}
|
|
214
229
|
if (settingFromUrlOnIModel) {
|
|
215
|
-
const infoMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerWithUrlExistsOverwriting", {
|
|
230
|
+
const infoMessage = core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.LayerWithUrlExistsOverwriting", {
|
|
231
|
+
url: settingFromUrlOnIModel.url,
|
|
232
|
+
oldName: settingFromUrlOnIModel.name,
|
|
233
|
+
newName: name,
|
|
234
|
+
});
|
|
216
235
|
core_frontend_1.IModelApp.notifications.outputMessage(new core_frontend_1.NotifyMessageDetails(core_frontend_1.OutputMessagePriority.Info, infoMessage));
|
|
217
236
|
await mapLayers_1.MapLayersUI.iTwinConfig.delete({
|
|
218
237
|
accessToken,
|
|
@@ -231,9 +250,10 @@ class MapLayerPreferences {
|
|
|
231
250
|
* @param iModelId
|
|
232
251
|
*/
|
|
233
252
|
static async getByUrl(url, iTwinId, iModelId) {
|
|
234
|
-
if (!mapLayers_1.MapLayersUI.iTwinConfig)
|
|
253
|
+
if (!mapLayers_1.MapLayersUI.iTwinConfig) {
|
|
235
254
|
return undefined;
|
|
236
|
-
|
|
255
|
+
}
|
|
256
|
+
const accessToken = undefined !== core_frontend_1.IModelApp.authorizationClient ? await core_frontend_1.IModelApp.authorizationClient.getAccessToken() : undefined;
|
|
237
257
|
const settingResponse = await mapLayers_1.MapLayersUI.iTwinConfig.get({
|
|
238
258
|
accessToken,
|
|
239
259
|
namespace: MapLayerPreferences._preferenceNamespace,
|
|
@@ -241,8 +261,9 @@ class MapLayerPreferences {
|
|
|
241
261
|
iTwinId,
|
|
242
262
|
iModelId,
|
|
243
263
|
});
|
|
244
|
-
if (undefined === settingResponse || 0 === settingResponse.length)
|
|
264
|
+
if (undefined === settingResponse || 0 === settingResponse.length) {
|
|
245
265
|
return undefined;
|
|
266
|
+
}
|
|
246
267
|
let savedMapLayer;
|
|
247
268
|
settingResponse.settingsMap?.forEach((savedLayer) => {
|
|
248
269
|
if (savedLayer.url === url) {
|
|
@@ -257,9 +278,10 @@ class MapLayerPreferences {
|
|
|
257
278
|
* @throws if any of the calls to grab settings fail.
|
|
258
279
|
*/
|
|
259
280
|
static async getSources(iTwinId, iModelId) {
|
|
260
|
-
if (!mapLayers_1.MapLayersUI.iTwinConfig)
|
|
281
|
+
if (!mapLayers_1.MapLayersUI.iTwinConfig) {
|
|
261
282
|
return [];
|
|
262
|
-
|
|
283
|
+
}
|
|
284
|
+
const accessToken = undefined !== core_frontend_1.IModelApp.authorizationClient ? await core_frontend_1.IModelApp.authorizationClient.getAccessToken() : undefined;
|
|
263
285
|
const mapLayerList = [];
|
|
264
286
|
try {
|
|
265
287
|
const userResultByProject = await mapLayers_1.MapLayersUI.iTwinConfig.get({
|
|
@@ -268,8 +290,9 @@ class MapLayerPreferences {
|
|
|
268
290
|
key: "",
|
|
269
291
|
iTwinId,
|
|
270
292
|
});
|
|
271
|
-
if (undefined !== userResultByProject)
|
|
293
|
+
if (undefined !== userResultByProject) {
|
|
272
294
|
mapLayerList.push(userResultByProject);
|
|
295
|
+
}
|
|
273
296
|
}
|
|
274
297
|
catch (err) {
|
|
275
298
|
throw new Error(core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.ErrorRetrieveUserProject", { errorMessage: err }));
|
|
@@ -282,8 +305,9 @@ class MapLayerPreferences {
|
|
|
282
305
|
iTwinId,
|
|
283
306
|
iModelId,
|
|
284
307
|
});
|
|
285
|
-
if (undefined !== userResultByIModel)
|
|
308
|
+
if (undefined !== userResultByIModel) {
|
|
286
309
|
mapLayerList.push(userResultByIModel);
|
|
310
|
+
}
|
|
287
311
|
}
|
|
288
312
|
catch (err) {
|
|
289
313
|
throw new Error(core_frontend_1.IModelApp.localization.getLocalizedString("mapLayers:CustomAttach.ErrorRetrieveUserProject", { errorMessage: err }));
|
|
@@ -292,8 +316,9 @@ class MapLayerPreferences {
|
|
|
292
316
|
for (const mapLayer of mapLayerList) {
|
|
293
317
|
mapLayer.forEach((savedLayer) => {
|
|
294
318
|
const mapLayerSource = core_frontend_1.MapLayerSource.fromJSON(savedLayer);
|
|
295
|
-
if (mapLayerSource)
|
|
319
|
+
if (mapLayerSource) {
|
|
296
320
|
savedMapLayerSources.push(mapLayerSource);
|
|
321
|
+
}
|
|
297
322
|
});
|
|
298
323
|
}
|
|
299
324
|
return savedMapLayerSources;
|