@itwin/map-layers 5.4.4 → 5.6.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 +18 -2
- package/README.md +7 -7
- package/lib/cjs/BrowserStorage.d.ts.map +1 -1
- package/lib/cjs/BrowserStorage.js +23 -13
- 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 +6 -3
- 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 +17 -17
- 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 -4
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +48 -18
- 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 +42 -27
- 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 +34 -15
- 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 +158 -84
- 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 +104 -81
- 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 +36 -16
- 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.map +1 -1
- package/lib/esm/BrowserStorage.js +23 -13
- 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 +6 -3
- 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 +17 -17
- 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 -4
- package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
- package/lib/esm/ui/FeatureInfoUiItemsProvider.js +48 -18
- 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 +17 -25
- 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 +10 -14
- 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 +134 -83
- 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 +79 -79
- 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 +11 -14
- 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
|
@@ -9,7 +9,7 @@ $hovered-icon-color: $buic-foreground-primary-tone;
|
|
|
9
9
|
$default-font-size: --iui-font-size-1;
|
|
10
10
|
|
|
11
11
|
.map-layer-url-dialog {
|
|
12
|
-
z-
|
|
12
|
+
z-index: 21000;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.map-layer-url-dialog-content {
|
|
@@ -19,7 +19,7 @@ $default-font-size: --iui-font-size-1;
|
|
|
19
19
|
|
|
20
20
|
.map-layer-source-previewBadge-icon {
|
|
21
21
|
margin-left: 4px;
|
|
22
|
-
display:inline;
|
|
22
|
+
display: inline;
|
|
23
23
|
vertical-align: middle;
|
|
24
24
|
}
|
|
25
25
|
.map-layer-source-select-previewBadge {
|
|
@@ -102,7 +102,7 @@ $default-font-size: --iui-font-size-1;
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.map-layer-features-footer {
|
|
105
|
-
display: flex;
|
|
105
|
+
display: flex;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
.map-layer-features-footer-buttons {
|
|
@@ -111,16 +111,15 @@ display: flex;
|
|
|
111
111
|
|
|
112
112
|
.map-layer-features-footer-button {
|
|
113
113
|
margin-left: 5px;
|
|
114
|
-
|
|
114
|
+
}
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
.map-layer-features-footer-warnMessage {
|
|
117
117
|
flex: 1 1;
|
|
118
118
|
margin-left: 2px;
|
|
119
119
|
height: 3rem;
|
|
120
|
-
|
|
120
|
+
}
|
|
121
121
|
|
|
122
122
|
.map-layer-source-warnMessage {
|
|
123
|
-
|
|
124
123
|
.map-layer-source-warnMessage-label {
|
|
125
124
|
margin-left: 5px;
|
|
126
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectApiKey.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SelectApiKey.tsx"],"names":[],"mappings":";AASA,OAAO,qBAAqB,CAAC;AAC7B,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SelectApiKey.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SelectApiKey.tsx"],"names":[],"mappings":";AASA,OAAO,qBAAqB,CAAC;AAC7B,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,eA6CpD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } 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 { Select } from "@itwin/itwinui-react";
|
|
7
8
|
import * as React from "react";
|
|
@@ -13,8 +14,11 @@ export function SelectApiKey(props) {
|
|
|
13
14
|
const [apiKeys] = React.useState(() => {
|
|
14
15
|
const storage = new CustomParamsStorage();
|
|
15
16
|
const keys = storage.get(undefined);
|
|
16
|
-
if (keys && Array.isArray(keys))
|
|
17
|
-
return keys.map((keyItem) => {
|
|
17
|
+
if (keys && Array.isArray(keys)) {
|
|
18
|
+
return keys.map((keyItem) => {
|
|
19
|
+
return { value: keyItem.name, label: keyItem.name };
|
|
20
|
+
});
|
|
21
|
+
}
|
|
18
22
|
return [];
|
|
19
23
|
});
|
|
20
24
|
React.useEffect(() => {
|
|
@@ -22,14 +26,15 @@ export function SelectApiKey(props) {
|
|
|
22
26
|
}, [props.value]);
|
|
23
27
|
const handleOnChange = React.useCallback((value) => {
|
|
24
28
|
setKeyValue(value);
|
|
25
|
-
if (props.onChange)
|
|
29
|
+
if (props.onChange) {
|
|
26
30
|
props.onChange(value);
|
|
31
|
+
}
|
|
27
32
|
}, [props]);
|
|
28
33
|
const handleKeyDown = React.useCallback((e) => {
|
|
29
34
|
if (e.code === "Delete" || e.key === "Backspace") {
|
|
30
35
|
setKeyValue(undefined);
|
|
31
36
|
}
|
|
32
37
|
}, []);
|
|
33
|
-
return (
|
|
38
|
+
return (_jsx(Select, { className: "map-layer-source-select", options: apiKeys, value: keyValue, disabled: props.disabled, onChange: handleOnChange, size: "small", onKeyDown: handleKeyDown }));
|
|
34
39
|
}
|
|
35
40
|
//# sourceMappingURL=SelectApiKey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectApiKey.js","sourceRoot":"","sources":["../../../../src/ui/widget/SelectApiKey.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SelectApiKey.js","sourceRoot":"","sources":["../../../../src/ui/widget/SelectApiKey.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,8BAA8B;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,qBAAqB,CAAC;AAO7B,gEAAgE;AAChE,MAAM,UAAU,YA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,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,MAAM,IACL,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,aAAa,GACxB,CACH,CAAC;AACJ,CAAC","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// cSpell:ignore Modeless WMTS\n\nimport { Select } from \"@itwin/itwinui-react\";\nimport * as React from \"react\";\nimport { CustomParamsStorage } from \"../../CustomParamsStorage\";\nimport \"./MapUrlDialog.scss\";\ninterface SelectApiKeyProps {\n value?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function SelectApiKey(props: SelectApiKeyProps) {\n const [keyValue, setKeyValue] = React.useState<string | undefined>(props.value);\n\n const [apiKeys] = React.useState(() => {\n const storage = new CustomParamsStorage();\n const keys = storage.get(undefined);\n if (keys && Array.isArray(keys)) {\n return keys.map((keyItem) => {\n return { value: keyItem.name, label: keyItem.name };\n });\n }\n return [];\n });\n\n React.useEffect(() => {\n setKeyValue(props.value);\n }, [props.value]);\n\n const handleOnChange = React.useCallback(\n (value: string) => {\n setKeyValue(value);\n if (props.onChange) {\n props.onChange(value);\n }\n },\n [props],\n );\n\n const handleKeyDown = React.useCallback((e) => {\n if (e.code === \"Delete\" || e.key === \"Backspace\") {\n setKeyValue(undefined);\n }\n }, []);\n\n return (\n <Select\n className=\"map-layer-source-select\"\n options={apiKeys}\n value={keyValue}\n disabled={props.disabled}\n onChange={handleOnChange}\n size=\"small\"\n onKeyDown={handleKeyDown}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectCustomParam.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SelectCustomParam.tsx"],"names":[],"mappings":";AASA,OAAO,qBAAqB,CAAC;AAE7B,UAAU,sBAAsB;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC;AAGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"SelectCustomParam.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SelectCustomParam.tsx"],"names":[],"mappings":";AASA,OAAO,qBAAqB,CAAC;AAE7B,UAAU,sBAAsB;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC;AAGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eA6D9D"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } 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 { Select } from "@itwin/itwinui-react";
|
|
7
8
|
import * as React from "react";
|
|
@@ -14,7 +15,11 @@ export function SelectCustomParam(props) {
|
|
|
14
15
|
const [paramValues, setParamValues] = React.useState(props.value);
|
|
15
16
|
const getCustomParamsFromStorage = React.useCallback(() => {
|
|
16
17
|
const params = storage.get(undefined);
|
|
17
|
-
return
|
|
18
|
+
return params && Array.isArray(params)
|
|
19
|
+
? params.map((item) => {
|
|
20
|
+
return { value: item.name, label: item.name };
|
|
21
|
+
})
|
|
22
|
+
: [];
|
|
18
23
|
}, [storage]);
|
|
19
24
|
const [customParams] = React.useState(() => getCustomParamsFromStorage());
|
|
20
25
|
React.useEffect(() => {
|
|
@@ -23,13 +28,15 @@ export function SelectCustomParam(props) {
|
|
|
23
28
|
const handleOnChange = React.useCallback((val, event) => {
|
|
24
29
|
const stateSetter = (prev) => {
|
|
25
30
|
const getValue = () => {
|
|
26
|
-
if (!prev)
|
|
31
|
+
if (!prev) {
|
|
27
32
|
return [val];
|
|
33
|
+
}
|
|
28
34
|
return event === "removed" ? prev.filter((v) => val !== v) : [...prev, val];
|
|
29
35
|
};
|
|
30
36
|
const value = getValue();
|
|
31
|
-
if (props.onChange)
|
|
37
|
+
if (props.onChange) {
|
|
32
38
|
props.onChange(value);
|
|
39
|
+
}
|
|
33
40
|
return value;
|
|
34
41
|
};
|
|
35
42
|
setParamValues(stateSetter);
|
|
@@ -39,7 +46,6 @@ export function SelectCustomParam(props) {
|
|
|
39
46
|
setParamValues(undefined);
|
|
40
47
|
}
|
|
41
48
|
}, []);
|
|
42
|
-
return (
|
|
43
|
-
React.createElement(Select, { className: "map-layer-source-select", options: customParams, value: paramValues, disabled: props.disabled || customParams.length === 0, onChange: handleOnChange, size: "small", onKeyDown: handleKeyDown, multiple: true })));
|
|
49
|
+
return (_jsx("div", { className: "map-layer-custom-param-select", title: customParams.length === 0 ? MapLayersUI.translate("CustomParamSelect.DisabledTitle") : undefined, children: _jsx(Select, { className: "map-layer-source-select", options: customParams, value: paramValues, disabled: props.disabled || customParams.length === 0, onChange: handleOnChange, size: "small", onKeyDown: handleKeyDown, multiple: true }) }));
|
|
44
50
|
}
|
|
45
51
|
//# sourceMappingURL=SelectCustomParam.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectCustomParam.js","sourceRoot":"","sources":["../../../../src/ui/widget/SelectCustomParam.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SelectCustomParam.js","sourceRoot":"","sources":["../../../../src/ui/widget/SelectCustomParam.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,8BAA8B;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;IAElE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAuB,KAAK,CAAC,KAAK,CAAC,CAAC;IAExF,MAAM,0BAA0B,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACxD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtC,OAAO,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YACpC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBAClB,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;YAChD,CAAC,CAAC;YACJ,CAAC,CAAC,EAAE,CAAC;IACT,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,M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BAA+B,EAAC,KAAK,EAAE,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC,SAAS,YACpJ,KAAC,MAAM,IACL,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EACrD,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,aAAa,EACxB,QAAQ,SACA,GACN,CACP,CAAC;AACJ,CAAC","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// cSpell:ignore Modeless WMTS\n\nimport { Select } from \"@itwin/itwinui-react\";\nimport * as React from \"react\";\nimport { CustomParamsStorage } from \"../../CustomParamsStorage\";\nimport \"./MapUrlDialog.scss\";\nimport { MapLayersUI } from \"../../mapLayers\";\ninterface SelectCustomParamProps {\n value?: string[];\n disabled?: boolean;\n onChange?: (value: string[]) => void;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function SelectCustomParam(props: SelectCustomParamProps) {\n const [storage] = React.useState(() => new CustomParamsStorage());\n\n const [paramValues, setParamValues] = React.useState<string[] | undefined>(props.value);\n\n const getCustomParamsFromStorage = React.useCallback(() => {\n const params = storage.get(undefined);\n return params && Array.isArray(params)\n ? params.map((item) => {\n return { value: item.name, label: item.name };\n })\n : [];\n }, [storage]);\n\n const [customParams] = React.useState(() => getCustomParamsFromStorage());\n\n React.useEffect(() => {\n setParamValues(props.value);\n }, [props.value]);\n\n const handleOnChange = React.useCallback(\n (val, event) => {\n const stateSetter = (prev: string[] | undefined) => {\n const getValue = (): string[] => {\n if (!prev) {\n return [val];\n }\n\n return event === \"removed\" ? prev.filter((v) => val !== v) : [...prev, val];\n };\n const value = getValue();\n if (props.onChange) {\n props.onChange(value);\n }\n return value;\n };\n setParamValues(stateSetter);\n },\n [props],\n );\n\n const handleKeyDown = React.useCallback((e) => {\n if (e.code === \"Delete\" || e.key === \"Backspace\") {\n setParamValues(undefined);\n }\n }, []);\n\n return (\n <div className=\"map-layer-custom-param-select\" title={customParams.length === 0 ? MapLayersUI.translate(\"CustomParamSelect.DisabledTitle\") : undefined}>\n <Select<string>\n className=\"map-layer-source-select\"\n options={customParams}\n value={paramValues}\n disabled={props.disabled || customParams.length === 0}\n onChange={handleOnChange}\n size=\"small\"\n onKeyDown={handleKeyDown}\n multiple\n ></Select>\n </div>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./MapUrlDialog.scss";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { MapTypesOptions } from "../Interfaces";
|
|
3
|
+
import type { MapTypesOptions } from "../Interfaces";
|
|
4
4
|
export declare const MAP_TYPES: {
|
|
5
5
|
wms: string;
|
|
6
6
|
arcGis: string;
|
|
@@ -14,8 +14,8 @@ interface SelectMapFormatProps {
|
|
|
14
14
|
mapTypesOptions?: MapTypesOptions;
|
|
15
15
|
onChange?: (mapType: string) => void;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Message below the select. Does not apply to 'inline' select.
|
|
18
|
+
*/
|
|
19
19
|
message?: React.ReactNode;
|
|
20
20
|
/**
|
|
21
21
|
* Status of the select.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMapFormat.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SelectMapFormat.tsx"],"names":[],"mappings":"AAMA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectMapFormat.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SelectMapFormat.tsx"],"names":[],"mappings":"AAMA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAMrD,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AAEF,UAAU,oBAAoB;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;CAC9C;AAGD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAyC1D"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } 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 { IModelApp } from "@itwin/core-frontend";
|
|
9
|
-
import {
|
|
10
|
-
import { Icon, LabeledSelect, MenuItem } from "@itwin/itwinui-react";
|
|
11
|
-
import { MapLayersUI } from "../../mapLayers";
|
|
10
|
+
import { LabeledSelect, MenuItem } from "@itwin/itwinui-react";
|
|
12
11
|
// TODO:
|
|
13
12
|
// Remove this structure and iterate over the registry's active formats.
|
|
14
13
|
// Still need a proper way to exclude some format, like we currently do with
|
|
@@ -29,10 +28,12 @@ export function SelectMapFormat(props) {
|
|
|
29
28
|
{ value: MAP_TYPES.wms, label: MAP_TYPES.wms },
|
|
30
29
|
{ value: MAP_TYPES.wmts, label: MAP_TYPES.wmts },
|
|
31
30
|
];
|
|
32
|
-
if (props.mapTypesOptions?.supportTileUrl)
|
|
31
|
+
if (props.mapTypesOptions?.supportTileUrl) {
|
|
33
32
|
formats.push({ value: MAP_TYPES.tileUrl, label: MAP_TYPES.tileUrl });
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
}
|
|
34
|
+
if (IModelApp.mapLayerFormatRegistry.isRegistered(MAP_TYPES.arcGisFeature)) {
|
|
35
|
+
formats.push({ value: MAP_TYPES.arcGisFeature, label: MAP_TYPES.arcGisFeature });
|
|
36
|
+
}
|
|
36
37
|
return formats;
|
|
37
38
|
});
|
|
38
39
|
const handleOnChange = React.useCallback((value) => {
|
|
@@ -41,10 +42,6 @@ export function SelectMapFormat(props) {
|
|
|
41
42
|
props.onChange(value);
|
|
42
43
|
}
|
|
43
44
|
}, [props]);
|
|
44
|
-
return (
|
|
45
|
-
React.createElement("div", { title: MapLayersUI.translate("Labels.TechPreviewBadgeTooltip"), className: "map-layer-source-select-previewBadge" },
|
|
46
|
-
React.createElement(Icon, { size: "small" },
|
|
47
|
-
React.createElement(SvgTechnicalPreviewMini, null)))
|
|
48
|
-
: undefined }, option.label)) }));
|
|
45
|
+
return (_jsx(LabeledSelect, { className: "map-layer-source-select", options: mapFormats, value: mapFormat, disabled: props.disabled, onChange: handleOnChange, size: "small", itemRenderer: (option) => _jsx(MenuItem, { children: option.label }) }));
|
|
49
46
|
}
|
|
50
47
|
//# sourceMappingURL=SelectMapFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMapFormat.js","sourceRoot":"","sources":["../../../../src/ui/widget/Sel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OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;SACtE;QAED,IAAI,SAAS,CAAC,sBAAsB,CAAC,YAAY,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE;YAC1E,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;SAClF;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CACtC,CAAC,KAAa,EAAE,EAAE;QAChB,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,IAAI,KAAK,CAAC,QAAQ,EAAE;YAClB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACvB;IACH,CAAC,EACD,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,OAAO,CACL,KAAC,aAAa,IACZ,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAC,OAAO,EACZ,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,KAAC,QAAQ,cAAE,MAAM,CAAC,KAAK,GAAY,GAC7D,CACH,CAAC;AACJ,CAAC","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// cSpell:ignore Modeless WMTS\n\nimport \"./MapUrlDialog.scss\";\nimport * as React from \"react\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { SelectOption } from \"@itwin/itwinui-react\";\nimport { LabeledSelect, MenuItem } from \"@itwin/itwinui-react\";\nimport type { MapTypesOptions } from \"../Interfaces\";\n\n// TODO:\n// Remove this structure and iterate over the registry's active formats.\n// Still need a proper way to exclude some format, like we currently do with\n// 'TileUrl' without the need to hardcode any format Id.\nexport const MAP_TYPES = {\n wms: \"WMS\",\n arcGis: \"ArcGIS\",\n wmts: \"WMTS\",\n tileUrl: \"TileURL\",\n arcGisFeature: \"ArcGISFeature\",\n};\n\ninterface SelectMapFormatProps {\n value?: string;\n disabled?: boolean;\n mapTypesOptions?: MapTypesOptions;\n onChange?: (mapType: string) => void;\n /**\n * Message below the select. Does not apply to 'inline' select.\n */\n message?: React.ReactNode;\n /**\n * Status of the select.\n * @default ''\n */\n status?: \"positive\" | \"warning\" | \"negative\";\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function SelectMapFormat(props: SelectMapFormatProps) {\n const [mapFormat, setMapFormat] = React.useState(props.value ?? MAP_TYPES.arcGis);\n\n const [mapFormats] = React.useState((): SelectOption<string>[] => {\n const formats: SelectOption<string>[] = [\n { value: MAP_TYPES.arcGis, label: MAP_TYPES.arcGis },\n { value: MAP_TYPES.wms, label: MAP_TYPES.wms },\n { value: MAP_TYPES.wmts, label: MAP_TYPES.wmts },\n ];\n if (props.mapTypesOptions?.supportTileUrl) {\n formats.push({ value: MAP_TYPES.tileUrl, label: MAP_TYPES.tileUrl });\n }\n\n if (IModelApp.mapLayerFormatRegistry.isRegistered(MAP_TYPES.arcGisFeature)) {\n formats.push({ value: MAP_TYPES.arcGisFeature, label: MAP_TYPES.arcGisFeature });\n }\n\n return formats;\n });\n\n const handleOnChange = React.useCallback(\n (value: string) => {\n setMapFormat(value);\n if (props.onChange) {\n props.onChange(value);\n }\n },\n [props],\n );\n\n return (\n <LabeledSelect\n className=\"map-layer-source-select\"\n options={mapFormats}\n value={mapFormat}\n disabled={props.disabled}\n onChange={handleOnChange}\n size=\"small\"\n itemRenderer={(option) => <MenuItem>{option.label}</MenuItem>}\n />\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MapSubLayerProps } from "@itwin/core-common";
|
|
2
|
-
import { ITreeDataProvider, TreeNodeItem } from "@itwin/components-react";
|
|
1
|
+
import type { MapSubLayerProps } from "@itwin/core-common";
|
|
2
|
+
import type { ITreeDataProvider, TreeNodeItem } from "@itwin/components-react";
|
|
3
3
|
export declare type SubLayersTreeExpandMode = "full" | "rootGroupOnly";
|
|
4
4
|
/**
|
|
5
5
|
* Data provider that returns some fake nodes to show in tree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubLayersDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersDataProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAc,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SubLayersDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersDataProvider.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,oBAAoB,CAAC;AAEvE,OAAO,KAAK,EAA2B,iBAAiB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGxG,oBAAY,uBAAuB,GAAG,MAAM,GAAG,eAAe,CAAC;AAE/D;;GAEG;AACH,qBAAa,qBAAsB,YAAW,iBAAiB;IAC7D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAC9D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;gBAEjB,SAAS,EAAE,gBAAgB,EAAE,EAAE,UAAU,GAAE,uBAAyC;WAKlF,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,SAAS,GAAG,OAAO;IAQ7E,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,cAAc;IAwBtB,OAAO,CAAC,SAAS;IAOJ,aAAa,CAAC,MAAM,CAAC,EAAE,YAAY;IASnC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY;CAQ5C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
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
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { compareStringsOrUndefined } from "@itwin/core-bentley";
|
|
6
6
|
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
7
7
|
import { CheckBoxState } from "@itwin/core-react";
|
|
@@ -15,9 +15,10 @@ export class SubLayersDataProvider {
|
|
|
15
15
|
this.loadNodes(subLayers);
|
|
16
16
|
}
|
|
17
17
|
static isUnnamedGroup(subLayer) {
|
|
18
|
-
if (!subLayer)
|
|
18
|
+
if (!subLayer) {
|
|
19
19
|
return false;
|
|
20
|
-
|
|
20
|
+
}
|
|
21
|
+
return (!subLayer.name || subLayer.name.length === 0) && subLayer.children !== undefined && subLayer.children.length > 0;
|
|
21
22
|
}
|
|
22
23
|
createId(props) {
|
|
23
24
|
return undefined !== props.id ? `${props.id}` : props.name ? props.name : "no-id";
|
|
@@ -41,9 +42,10 @@ export class SubLayersDataProvider {
|
|
|
41
42
|
filteredProps?.sort((a, b) => compareStringsOrUndefined(a.title, b.title));
|
|
42
43
|
const treeNodes = [];
|
|
43
44
|
filteredProps.forEach((props) => {
|
|
44
|
-
treeNodes.push(this.createNode(props,
|
|
45
|
-
if (props.children)
|
|
45
|
+
treeNodes.push(this.createNode(props, this._expandMode === "full" ? true : !parentId && props?.children !== undefined ? true : undefined, undefined, SubLayersDataProvider.isUnnamedGroup(props) ? "icon-folder" : "icon-layers"));
|
|
46
|
+
if (props.children) {
|
|
46
47
|
this.loadChildNodes(allSubLayers, props.id);
|
|
48
|
+
}
|
|
47
49
|
});
|
|
48
50
|
this._nodeMap.set(undefined !== parentId ? `${parentId}` : "", treeNodes);
|
|
49
51
|
}
|
|
@@ -56,14 +58,16 @@ export class SubLayersDataProvider {
|
|
|
56
58
|
}
|
|
57
59
|
async getNodesCount(parent) {
|
|
58
60
|
const nodeArray = parent ? this._nodeMap.get(parent.id) : this._nodeMap.get("");
|
|
59
|
-
if (nodeArray)
|
|
61
|
+
if (nodeArray) {
|
|
60
62
|
return nodeArray.length;
|
|
63
|
+
}
|
|
61
64
|
return 0;
|
|
62
65
|
}
|
|
63
66
|
async getNodes(parent) {
|
|
64
67
|
const nodeArray = parent ? this._nodeMap.get(parent.id) : this._nodeMap.get("");
|
|
65
|
-
if (nodeArray)
|
|
68
|
+
if (nodeArray) {
|
|
66
69
|
return nodeArray;
|
|
70
|
+
}
|
|
67
71
|
return [];
|
|
68
72
|
}
|
|
69
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubLayersDataProvider.js","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersDataProvider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SubLayersDataProvider.js","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersDataProvider.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAIhC,YAAY,SAA6B,EAAE,aAAsC,eAAe;QAH/E,aAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;QAI5D,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,QAAsC;QACjE,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO,KAAK,CAAC;SACd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AM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5G,IAAI,SAAS,EAAE;YACb,OAAO,SAAS,CAAC,MAAM,CAAC;SACzB;QAED,OAAO,CAAC,CAAC;IACX,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,MAAqB;QACzC,MAAM,SAAS,GAA+B,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5G,IAAI,SAAS,EAAE;YACb,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF","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 { compareStringsOrUndefined } from \"@itwin/core-bentley\";\nimport type { MapSubLayerProps, SubLayerId } from \"@itwin/core-common\";\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport type { DelayLoadedTreeNodeItem, ITreeDataProvider, TreeNodeItem } from \"@itwin/components-react\";\nimport { CheckBoxState } from \"@itwin/core-react\";\n\nexport type SubLayersTreeExpandMode = \"full\" | \"rootGroupOnly\";\n\n/**\n * Data provider that returns some fake nodes to show in tree.\n */\nexport class SubLayersDataProvider implements ITreeDataProvider {\n private readonly _nodeMap = new Map<string, TreeNodeItem[]>();\n private readonly _expandMode;\n\n constructor(subLayers: MapSubLayerProps[], expandMode: SubLayersTreeExpandMode = \"rootGroupOnly\") {\n this._expandMode = expandMode;\n this.loadNodes(subLayers);\n }\n\n public static isUnnamedGroup(subLayer: MapSubLayerProps | undefined): boolean {\n if (!subLayer) {\n return false;\n }\n\n return (!subLayer.name || subLayer.name.length === 0) && subLayer.children !== undefined && subLayer.children.length > 0;\n }\n\n private createId(props: MapSubLayerProps): string {\n return undefined !== props.id ? `${props.id}` : props.name ? props.name : \"no-id\";\n }\n\n private createNode(props: MapSubLayerProps, expanded?: boolean, isCheckboxDisabled?: boolean, icon?: string): DelayLoadedTreeNodeItem {\n return {\n id: this.createId(props),\n label: PropertyRecord.fromString(props.title ?? props.name ?? \"unknown\"),\n hasChildren: !!props.children,\n isCheckboxVisible: true,\n checkBoxState: props.visible && !isCheckboxDisabled ? CheckBoxState.On : CheckBoxState.Off,\n extendedData: { subLayerId: props.id },\n isCheckboxDisabled,\n autoExpand: expanded,\n icon,\n };\n }\n\n private loadChildNodes(allSubLayers: MapSubLayerProps[], parentId?: SubLayerId) {\n const filteredProps = allSubLayers.filter((props) => parentId === props.parent);\n if (filteredProps.length) {\n filteredProps?.sort((a: MapSubLayerProps, b: MapSubLayerProps) => compareStringsOrUndefined(a.title, b.title));\n const treeNodes: TreeNodeItem[] = [];\n\n filteredProps.forEach((props) => {\n treeNodes.push(\n this.createNode(\n props,\n this._expandMode === \"full\" ? true : !parentId && props?.children !== undefined ? true : undefined,\n undefined,\n SubLayersDataProvider.isUnnamedGroup(props) ? \"icon-folder\" : \"icon-layers\",\n ),\n );\n if (props.children) {\n this.loadChildNodes(allSubLayers, props.id);\n }\n });\n\n this._nodeMap.set(undefined !== parentId ? `${parentId}` : \"\", treeNodes);\n }\n }\n\n private loadNodes(subLayerNodes: MapSubLayerProps[] | undefined) {\n subLayerNodes?.sort((a: MapSubLayerProps, b: MapSubLayerProps) => compareStringsOrUndefined(a.title, b.title));\n if (subLayerNodes) {\n this.loadChildNodes(subLayerNodes, undefined);\n }\n }\n\n public async getNodesCount(parent?: TreeNodeItem) {\n const nodeArray: TreeNodeItem[] | undefined = parent ? this._nodeMap.get(parent.id) : this._nodeMap.get(\"\");\n if (nodeArray) {\n return nodeArray.length;\n }\n\n return 0;\n }\n\n public async getNodes(parent?: TreeNodeItem) {\n const nodeArray: TreeNodeItem[] | undefined = parent ? this._nodeMap.get(parent.id) : this._nodeMap.get(\"\");\n if (nodeArray) {\n return nodeArray;\n }\n\n return [];\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubLayersPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersPopupButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SubLayersPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersPopupButton.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAO3D,gBAAgB;AAEhB,oBAAY,yBAAyB,GAAG,mBAAmB,CAAC;AAE5D,gBAAgB;AAEhB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,eA0CpE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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
|
import * as React from "react";
|
|
6
7
|
import { RelativePosition } from "@itwin/appui-abstract";
|
|
7
8
|
import { Popup, useOnOutsideClick, WebFontIcon } from "@itwin/core-react";
|
|
@@ -23,15 +24,9 @@ export function SubLayersPopupButton(props) {
|
|
|
23
24
|
}, []);
|
|
24
25
|
const isOutsideEvent = React.useCallback((e) => {
|
|
25
26
|
// if clicking on button that open panel - don't trigger outside click processing
|
|
26
|
-
return !!buttonRef.current &&
|
|
27
|
+
return !!buttonRef.current && e.target instanceof Node && !buttonRef.current.contains(e.target);
|
|
27
28
|
}, []);
|
|
28
29
|
const panelRef = useOnOutsideClick(onOutsideClick, isOutsideEvent);
|
|
29
|
-
return (
|
|
30
|
-
React.createElement(Button, { size: "small", styleType: "borderless", ref: buttonRef, className: "map-manager-item-sub-layer-button", title: popupOpen ? hideSubLayersLabel : showSubLayersLabel, onClick: togglePopup },
|
|
31
|
-
React.createElement(WebFontIcon, { iconName: "icon-layers" })),
|
|
32
|
-
React.createElement(Popup, { isOpen: popupOpen, position: RelativePosition.BottomRight, onClose: onOutsideClick, target: buttonRef.current },
|
|
33
|
-
React.createElement("div", { className: "map-transparency-popup-panel" },
|
|
34
|
-
React.createElement("div", { ref: panelRef, className: "map-manager-sublayer-panel" },
|
|
35
|
-
React.createElement(SubLayersPanel, { ...props, width: 390, height: 350 }))))));
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { size: "small", styleType: "borderless", ref: buttonRef, className: "map-manager-item-sub-layer-button", title: popupOpen ? hideSubLayersLabel : showSubLayersLabel, onClick: togglePopup, children: _jsx(WebFontIcon, { iconName: "icon-layers" }) }), _jsx(Popup, { isOpen: popupOpen, position: RelativePosition.BottomRight, onClose: onOutsideClick, target: buttonRef.current, children: _jsx("div", { className: "map-transparency-popup-panel", children: _jsx("div", { ref: panelRef, className: "map-manager-sublayer-panel", children: _jsx(SubLayersPanel, { ...props, width: 390, height: 350 }) }) }) })] }));
|
|
36
31
|
}
|
|
37
32
|
//# sourceMappingURL=SubLayersPopupButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubLayersPopupButton.js","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersPopupButton.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SubLayersPopupButton.js","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersPopupButton.tsx"],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CAAC,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,YAAY,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAClG,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,QAAQ,GAAG,iBAAiB,CAAiB,cAAc,EAAE,cAAc,CAAC,CAAC;IAEnF,OAAO,CACL,8BACE,KAAC,MAAM,IACL,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,YAAY,EACtB,GAAG,EAAE,SAAS,EACd,SAAS,EAAC,mCAAmC,EAC7C,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,OAAO,EAAE,WAAW,YAEpB,KAAC,WAAW,IAAC,QAAQ,EAAC,aAAa,GAAG,GAC/B,EACT,KAAC,KAAK,IAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,CAAC,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,OAAO,YAClH,cAAK,SAAS,EAAC,8BAA8B,YAC3C,cAAK,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,4BAA4B,YACxD,KAAC,cAAc,OAAK,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAI,GAClD,GACF,GACA,IACP,CACJ,CAAC;AACJ,CAAC","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 * as React from \"react\";\n\nimport { RelativePosition } from \"@itwin/appui-abstract\";\nimport type { OutsideClickEvent } from \"@itwin/core-react\";\nimport { Popup, useOnOutsideClick, WebFontIcon } from \"@itwin/core-react\";\nimport type { SubLayersPanelProps } from \"./SubLayersTree\";\nimport { SubLayersPanel } from \"./SubLayersTree\";\nimport { MapLayersUI } from \"../../mapLayers\";\nimport { Button } from \"@itwin/itwinui-react\";\n\n// cSpell:ignore droppable Sublayer\n\n/** @internal */\n\nexport type SubLayersPopupButtonProps = SubLayersPanelProps;\n\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function SubLayersPopupButton(props: SubLayersPopupButtonProps) {\n const [showSubLayersLabel] = React.useState(MapLayersUI.localization.getLocalizedString(\"mapLayers:SubLayers.Show\"));\n const [hideSubLayersLabel] = React.useState(MapLayersUI.localization.getLocalizedString(\"mapLayers:SubLayers.Hide\"));\n const [popupOpen, setPopupOpen] = React.useState(false);\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n\n const togglePopup = React.useCallback(() => {\n setPopupOpen(!popupOpen);\n }, [popupOpen]);\n\n const onOutsideClick = React.useCallback(() => {\n setPopupOpen(false);\n }, []);\n\n const isOutsideEvent = React.useCallback((e: OutsideClickEvent) => {\n // if clicking on button that open panel - don't trigger outside click processing\n return !!buttonRef.current && e.target instanceof Node && !buttonRef.current.contains(e.target);\n }, []);\n\n const panelRef = useOnOutsideClick<HTMLDivElement>(onOutsideClick, isOutsideEvent);\n\n return (\n <>\n <Button\n size=\"small\"\n styleType=\"borderless\"\n ref={buttonRef}\n className=\"map-manager-item-sub-layer-button\"\n title={popupOpen ? hideSubLayersLabel : showSubLayersLabel}\n onClick={togglePopup}\n >\n <WebFontIcon iconName=\"icon-layers\" />\n </Button>\n <Popup isOpen={popupOpen} position={RelativePosition.BottomRight} onClose={onOutsideClick} target={buttonRef.current}>\n <div className=\"map-transparency-popup-panel\">\n <div ref={panelRef} className=\"map-manager-sublayer-panel\">\n <SubLayersPanel {...props} width={390} height={350} />\n </div>\n </div>\n </Popup>\n </>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MapSubLayerProps, SubLayerId } from "@itwin/core-common";
|
|
3
|
-
import { SubLayersTreeExpandMode } from "./SubLayersDataProvider";
|
|
2
|
+
import type { MapSubLayerProps, SubLayerId } from "@itwin/core-common";
|
|
3
|
+
import type { SubLayersTreeExpandMode } from "./SubLayersDataProvider";
|
|
4
4
|
import "./SubLayersTree.scss";
|
|
5
5
|
export declare type OnSubLayerStateChangeType = (subLayerId: SubLayerId, isSelected: boolean) => void;
|
|
6
6
|
export interface SubLayersPanelProps extends Omit<SubLayersTreeProps, "subLayers"> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubLayersTree.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersTree.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SubLayersTree.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/SubLayersTree.tsx"],"names":[],"mappings":";AA+BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,sBAAsB,CAAC;AAmB9B,oBAAY,yBAAyB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;AAC9F,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC;IAChF,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAChC;AAGD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eAWxD;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,UAAU,GAAG,KAAK,CAAC;IAClC,UAAU,EAAE,uBAAuB,CAAC;IACpC,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qBAAqB,CAAC,EAAE,yBAAyB,CAAC;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AAEH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eAwHtD"}
|