@itwin/map-layers 4.0.0-dev.24 → 4.0.0-dev.28
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 +9 -4
- package/lib/cjs/MapLayerPreferences.d.ts +88 -88
- package/lib/cjs/MapLayerPreferences.js +311 -312
- package/lib/cjs/MapLayerPreferences.js.map +1 -1
- package/lib/cjs/map-layers.d.ts +6 -6
- package/lib/cjs/map-layers.js +22 -22
- package/lib/cjs/mapLayers.d.ts +44 -44
- package/lib/cjs/mapLayers.js +61 -63
- package/lib/cjs/mapLayers.js.map +1 -1
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts +11 -11
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +51 -52
- package/lib/cjs/ui/FeatureInfoUiItemsProvider.js.map +1 -1
- package/lib/cjs/ui/Interfaces.d.ts +50 -50
- package/lib/cjs/ui/Interfaces.js +2 -2
- package/lib/cjs/ui/Interfaces.js.map +1 -1
- package/lib/cjs/ui/MapFeatureInfoTool.d.ts +13 -13
- package/lib/cjs/ui/MapFeatureInfoTool.js +50 -50
- package/lib/cjs/ui/MapFeatureInfoTool.js.map +1 -1
- package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +8 -8
- package/lib/cjs/ui/MapLayersUiItemsProvider.js +38 -38
- package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
- package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts +14 -14
- package/lib/cjs/ui/widget/AttachLayerPopupButton.js +335 -338
- package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/BasemapPanel.d.ts +8 -8
- package/lib/cjs/ui/widget/BasemapPanel.js +156 -156
- package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
- package/lib/cjs/ui/widget/BasemapPanel.scss +87 -87
- package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +21 -21
- package/lib/cjs/ui/widget/ConfirmMessageDialog.js +22 -25
- package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +138 -139
- package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
- package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +7 -7
- package/lib/cjs/ui/widget/FeatureInfoWidget.js +65 -71
- package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +19 -19
- package/lib/cjs/ui/widget/MapLayerDroppable.js +85 -88
- package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerManager.d.ts +26 -26
- package/lib/cjs/ui/widget/MapLayerManager.js +401 -403
- package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerManager.scss +409 -409
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +12 -12
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +82 -83
- package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts +7 -7
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +65 -65
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
- package/lib/cjs/ui/widget/MapLayersWidget.d.ts +11 -11
- package/lib/cjs/ui/widget/MapLayersWidget.js +31 -31
- package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
- package/lib/cjs/ui/widget/MapManagerSettings.d.ts +3 -3
- package/lib/cjs/ui/widget/MapManagerSettings.js +200 -200
- package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
- package/lib/cjs/ui/widget/MapManagerSettings.scss +29 -29
- package/lib/cjs/ui/widget/MapUrlDialog.d.ts +23 -23
- package/lib/cjs/ui/widget/MapUrlDialog.js +524 -527
- package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
- package/lib/cjs/ui/widget/MapUrlDialog.scss +100 -100
- package/lib/cjs/ui/widget/SelectMapFormat.d.ts +18 -18
- package/lib/cjs/ui/widget/SelectMapFormat.js +54 -59
- package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +20 -20
- package/lib/cjs/ui/widget/SubLayersDataProvider.js +75 -76
- package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +10 -10
- package/lib/cjs/ui/widget/SubLayersPopupButton.js +40 -40
- package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersTree.d.ts +15 -15
- package/lib/cjs/ui/widget/SubLayersTree.js +413 -419
- package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
- package/lib/cjs/ui/widget/SubLayersTree.scss +69 -69
- package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts +14 -14
- package/lib/cjs/ui/widget/TransparencyPopupButton.js +47 -47
- package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
- package/lib/cjs/ui/widget/TransparencyPopupButton.scss +36 -36
- package/lib/esm/MapLayerPreferences.d.ts +88 -88
- package/lib/esm/MapLayerPreferences.js +307 -308
- package/lib/esm/MapLayerPreferences.js.map +1 -1
- package/lib/esm/map-layers.d.ts +6 -6
- package/lib/esm/map-layers.js +10 -10
- package/lib/esm/mapLayers.d.ts +44 -44
- package/lib/esm/mapLayers.js +57 -59
- package/lib/esm/mapLayers.js.map +1 -1
- package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +11 -11
- package/lib/esm/ui/FeatureInfoUiItemsProvider.js +47 -48
- package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
- package/lib/esm/ui/Interfaces.d.ts +50 -50
- package/lib/esm/ui/Interfaces.js +1 -1
- package/lib/esm/ui/Interfaces.js.map +1 -1
- package/lib/esm/ui/MapFeatureInfoTool.d.ts +13 -13
- package/lib/esm/ui/MapFeatureInfoTool.js +45 -45
- package/lib/esm/ui/MapFeatureInfoTool.js.map +1 -1
- package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +8 -8
- package/lib/esm/ui/MapLayersUiItemsProvider.js +34 -34
- package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
- package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts +14 -14
- package/lib/esm/ui/widget/AttachLayerPopupButton.js +331 -334
- package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/BasemapPanel.d.ts +8 -8
- package/lib/esm/ui/widget/BasemapPanel.js +152 -152
- package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
- package/lib/esm/ui/widget/BasemapPanel.scss +87 -87
- package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +21 -21
- package/lib/esm/ui/widget/ConfirmMessageDialog.js +18 -21
- package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
- package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
- package/lib/esm/ui/widget/FeatureInfoDataProvider.js +134 -135
- package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
- package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +7 -7
- package/lib/esm/ui/widget/FeatureInfoWidget.js +61 -67
- package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerDroppable.d.ts +19 -19
- package/lib/esm/ui/widget/MapLayerDroppable.js +81 -84
- package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerManager.d.ts +26 -26
- package/lib/esm/ui/widget/MapLayerManager.js +396 -398
- package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerManager.scss +409 -409
- package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +12 -12
- package/lib/esm/ui/widget/MapLayerSettingsMenu.js +78 -79
- package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts +7 -7
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +61 -61
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
- package/lib/esm/ui/widget/MapLayersWidget.d.ts +11 -11
- package/lib/esm/ui/widget/MapLayersWidget.js +27 -27
- package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
- package/lib/esm/ui/widget/MapManagerSettings.d.ts +3 -3
- package/lib/esm/ui/widget/MapManagerSettings.js +196 -196
- package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
- package/lib/esm/ui/widget/MapManagerSettings.scss +29 -29
- package/lib/esm/ui/widget/MapUrlDialog.d.ts +23 -23
- package/lib/esm/ui/widget/MapUrlDialog.js +520 -523
- package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
- package/lib/esm/ui/widget/MapUrlDialog.scss +100 -100
- package/lib/esm/ui/widget/SelectMapFormat.d.ts +18 -18
- package/lib/esm/ui/widget/SelectMapFormat.js +50 -55
- package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +20 -20
- package/lib/esm/ui/widget/SubLayersDataProvider.js +71 -72
- package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +10 -10
- package/lib/esm/ui/widget/SubLayersPopupButton.js +36 -36
- package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersTree.d.ts +15 -15
- package/lib/esm/ui/widget/SubLayersTree.js +408 -414
- package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
- package/lib/esm/ui/widget/SubLayersTree.scss +69 -69
- package/lib/esm/ui/widget/TransparencyPopupButton.d.ts +14 -14
- package/lib/esm/ui/widget/TransparencyPopupButton.js +43 -43
- package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
- package/lib/esm/ui/widget/TransparencyPopupButton.scss +36 -36
- package/package.json +14 -14
|
@@ -1,87 +1,87 @@
|
|
|
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/core-react/lib/cjs/core-react/index";
|
|
6
|
-
|
|
7
|
-
$divider-color: $buic-background-toolbutton-stroke;
|
|
8
|
-
$hovered-icon-color: $buic-foreground-primary;
|
|
9
|
-
|
|
10
|
-
.map-manager-basemap {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
width: 100%;
|
|
14
|
-
align-items: flex-start;
|
|
15
|
-
margin-bottom: 15px;
|
|
16
|
-
|
|
17
|
-
* {
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.map-manager-base-header {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
width: 100%;
|
|
25
|
-
margin-top: 5px;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.map-manager-base-label {
|
|
30
|
-
margin-left: 2px;
|
|
31
|
-
padding-right: 10px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.map-manager-base-item {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: row;
|
|
37
|
-
align-items: center;
|
|
38
|
-
width: 100%;
|
|
39
|
-
|
|
40
|
-
& .iui-select {
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.map-manager-base-item-select {
|
|
46
|
-
width: 100%; // makes the Select control fill empty space on the right
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
button.map-manager-base-settings-button {
|
|
50
|
-
border: none;
|
|
51
|
-
margin-left: 4px;
|
|
52
|
-
background-color: transparent;
|
|
53
|
-
color: $buic-foreground-body;
|
|
54
|
-
|
|
55
|
-
&:hover {
|
|
56
|
-
background-color: transparent;
|
|
57
|
-
color: $hovered-icon-color;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.uicore-reactSelectTop {
|
|
62
|
-
width: 100%;
|
|
63
|
-
line-height: inherit;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.map-manager-base-item-select {
|
|
67
|
-
height: 2.0em;
|
|
68
|
-
width: 100%;
|
|
69
|
-
min-width: 100px;
|
|
70
|
-
margin-right: 6px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.map-manager-base-item-transparency {
|
|
74
|
-
max-width: 160px;
|
|
75
|
-
width: 160px;
|
|
76
|
-
display: flex;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
margin-right: 6px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.map-manager-base-item-color.components-color-swatch {
|
|
82
|
-
margin-left: 6px;
|
|
83
|
-
width: 2em;
|
|
84
|
-
height: 2em;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
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
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@import "~@itwin/core-react/lib/cjs/core-react/index";
|
|
6
|
+
|
|
7
|
+
$divider-color: $buic-background-toolbutton-stroke;
|
|
8
|
+
$hovered-icon-color: $buic-foreground-primary;
|
|
9
|
+
|
|
10
|
+
.map-manager-basemap {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 100%;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
margin-bottom: 15px;
|
|
16
|
+
|
|
17
|
+
* {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.map-manager-base-header {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin-top: 5px;
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.map-manager-base-label {
|
|
30
|
+
margin-left: 2px;
|
|
31
|
+
padding-right: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.map-manager-base-item {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: row;
|
|
37
|
+
align-items: center;
|
|
38
|
+
width: 100%;
|
|
39
|
+
|
|
40
|
+
& .iui-select {
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.map-manager-base-item-select {
|
|
46
|
+
width: 100%; // makes the Select control fill empty space on the right
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
button.map-manager-base-settings-button {
|
|
50
|
+
border: none;
|
|
51
|
+
margin-left: 4px;
|
|
52
|
+
background-color: transparent;
|
|
53
|
+
color: $buic-foreground-body;
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
color: $hovered-icon-color;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.uicore-reactSelectTop {
|
|
62
|
+
width: 100%;
|
|
63
|
+
line-height: inherit;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.map-manager-base-item-select {
|
|
67
|
+
height: 2.0em;
|
|
68
|
+
width: 100%;
|
|
69
|
+
min-width: 100px;
|
|
70
|
+
margin-right: 6px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.map-manager-base-item-transparency {
|
|
74
|
+
max-width: 160px;
|
|
75
|
+
width: 160px;
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
margin-right: 6px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.map-manager-base-item-color.components-color-swatch {
|
|
82
|
+
margin-left: 6px;
|
|
83
|
+
width: 2em;
|
|
84
|
+
height: 2em;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CommonProps } from "@itwin/core-react";
|
|
3
|
-
import "./MapUrlDialog.scss";
|
|
4
|
-
interface ConfirmMessageDialogProps extends CommonProps {
|
|
5
|
-
/** Title to show in title bar of dialog */
|
|
6
|
-
title?: string | JSX.Element;
|
|
7
|
-
message?: string | JSX.Element;
|
|
8
|
-
onYesResult?: () => void;
|
|
9
|
-
onNoResult?: () => void;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
onEscape?: () => void;
|
|
12
|
-
minWidth?: string | number;
|
|
13
|
-
/** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */
|
|
14
|
-
minHeight?: string | number;
|
|
15
|
-
/** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */
|
|
16
|
-
maxWidth?: string | number;
|
|
17
|
-
/** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */
|
|
18
|
-
maxHeight?: string | number;
|
|
19
|
-
}
|
|
20
|
-
export declare function ConfirmMessageDialog(props: ConfirmMessageDialogProps): JSX.Element;
|
|
21
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CommonProps } from "@itwin/core-react";
|
|
3
|
+
import "./MapUrlDialog.scss";
|
|
4
|
+
interface ConfirmMessageDialogProps extends CommonProps {
|
|
5
|
+
/** Title to show in title bar of dialog */
|
|
6
|
+
title?: string | JSX.Element;
|
|
7
|
+
message?: string | JSX.Element;
|
|
8
|
+
onYesResult?: () => void;
|
|
9
|
+
onNoResult?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
onEscape?: () => void;
|
|
12
|
+
minWidth?: string | number;
|
|
13
|
+
/** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */
|
|
14
|
+
minHeight?: string | number;
|
|
15
|
+
/** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */
|
|
16
|
+
maxWidth?: string | number;
|
|
17
|
+
/** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */
|
|
18
|
+
maxHeight?: string | number;
|
|
19
|
+
}
|
|
20
|
+
export declare function ConfirmMessageDialog(props: ConfirmMessageDialogProps): JSX.Element;
|
|
21
|
+
export {};
|
|
22
22
|
//# sourceMappingURL=ConfirmMessageDialog.d.ts.map
|
|
@@ -1,22 +1,19 @@
|
|
|
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
// cSpell:ignore Modeless WMTS
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { Dialog } from "@itwin/core-react";
|
|
8
|
-
import "./MapUrlDialog.scss";
|
|
9
|
-
import { DialogButtonType } from "@itwin/appui-abstract";
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
|
-
export function ConfirmMessageDialog(props) {
|
|
12
|
-
const buttonCluster = React.useMemo(() =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (React.createElement(Dialog, { className: props.className, title: props.title, opened: true, resizable: false, movable: true, modal: true, buttonCluster: buttonCluster, onClose: props.onClose, onEscape: props.onEscape, minHeight: props.minHeight, maxHeight: props.maxHeight, minWidth: props.minWidth, maxWidth: props.maxWidth, trapFocus: false },
|
|
20
|
-
React.createElement("div", null, props.message)));
|
|
21
|
-
}
|
|
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
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
// cSpell:ignore Modeless WMTS
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { Dialog } from "@itwin/core-react";
|
|
8
|
+
import "./MapUrlDialog.scss";
|
|
9
|
+
import { DialogButtonType } from "@itwin/appui-abstract";
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
|
+
export function ConfirmMessageDialog(props) {
|
|
12
|
+
const buttonCluster = React.useMemo(() => [
|
|
13
|
+
{ type: DialogButtonType.Yes, onClick: props.onYesResult ?? (() => { }) },
|
|
14
|
+
{ type: DialogButtonType.No, onClick: props.onNoResult ?? (() => { }) },
|
|
15
|
+
], [props.onYesResult, props.onNoResult]);
|
|
16
|
+
return (React.createElement(Dialog, { className: props.className, title: props.title, opened: true, resizable: false, movable: true, modal: true, buttonCluster: buttonCluster, onClose: props.onClose, onEscape: props.onEscape, minHeight: props.minHeight, maxHeight: props.maxHeight, minWidth: props.minWidth, maxWidth: props.maxWidth, trapFocus: false },
|
|
17
|
+
React.createElement("div", null, props.message)));
|
|
18
|
+
}
|
|
22
19
|
//# sourceMappingURL=ConfirmMessageDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmMessageDialog.js","sourceRoot":"","sources":["../../../../src/ui/widget/ConfirmMessageDialog.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,8BAA8B;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAe,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAoBzD,gEAAgE;AAChE,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IAEnE,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE
|
|
1
|
+
{"version":3,"file":"ConfirmMessageDialog.js","sourceRoot":"","sources":["../../../../src/ui/widget/ConfirmMessageDialog.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,8BAA8B;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAe,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAoBzD,gEAAgE;AAChE,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IAEnE,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACxC,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,WAAW,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE;QACzE,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE;KACxE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,oBAAC,MAAM,IACL,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,KAAK,EAChB,OAAO,EAAE,IAAI,EACb,KAAK,EAAE,IAAI,EACX,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK;QAEhB,iCAAM,KAAK,CAAC,OAAO,CAAO,CACnB,CACV,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 * as React from \"react\";\nimport { CommonProps, Dialog } from \"@itwin/core-react\";\n\nimport \"./MapUrlDialog.scss\";\nimport { DialogButtonType } from \"@itwin/appui-abstract\";\n\ninterface ConfirmMessageDialogProps extends CommonProps {\n\n /** Title to show in title bar of dialog */\n title?: string | JSX.Element;\n message?: string | JSX.Element;\n onYesResult?: () => void;\n onNoResult?: () => void;\n onClose?: () => void;\n onEscape?: () => void;\n minWidth?: string | number;\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\n minHeight?: string | number;\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n maxWidth?: string | number;\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n maxHeight?: string | number;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function ConfirmMessageDialog(props: ConfirmMessageDialogProps) {\n\n const buttonCluster = React.useMemo(() => [\n { type: DialogButtonType.Yes, onClick: props.onYesResult ?? (() => { }) },\n { type: DialogButtonType.No, onClick: props.onNoResult ?? (() => { }) },\n ], [props.onYesResult, props.onNoResult]);\n\n return (\n <Dialog\n className={props.className}\n title={props.title}\n opened={true}\n resizable={false}\n movable={true}\n modal={true}\n buttonCluster={buttonCluster}\n onClose={props.onClose}\n onEscape={props.onEscape}\n minHeight={props.minHeight}\n maxHeight={props.maxHeight}\n minWidth={props.minWidth}\n maxWidth={props.maxWidth}\n trapFocus={false}\n >\n <div>{props.message}</div>\n </Dialog>\n );\n}\n"]}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
2
|
-
import { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from "@itwin/components-react";
|
|
3
|
-
import { BeEvent } from "@itwin/core-bentley";
|
|
4
|
-
import { MapHitEvent } from "../Interfaces";
|
|
5
|
-
/**
|
|
6
|
-
* Implementation of [IPropertyDataProvider] that uses an associative array.
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare enum MapFeatureInfoLoadState {
|
|
10
|
-
DataLoadStart = 0,
|
|
11
|
-
DataLoadEnd = 1
|
|
12
|
-
}
|
|
13
|
-
export declare type MapFeatureInfoLoadListener = (state: MapFeatureInfoLoadState) => void;
|
|
14
|
-
export interface MapFeatureInfoDataUpdate {
|
|
15
|
-
recordCount: number;
|
|
16
|
-
}
|
|
17
|
-
export declare type MapFeatureInfoDataUpdatedListener = (data: MapFeatureInfoDataUpdate) => void;
|
|
18
|
-
export declare class FeatureInfoDataProvider implements IPropertyDataProvider, PropertyData {
|
|
19
|
-
private _removeListener;
|
|
20
|
-
label: PropertyRecord;
|
|
21
|
-
description?: string;
|
|
22
|
-
categories: PropertyCategory[];
|
|
23
|
-
records: {
|
|
24
|
-
[categoryName: string]: PropertyRecord[];
|
|
25
|
-
};
|
|
26
|
-
onDataChanged: PropertyDataChangeEvent;
|
|
27
|
-
onDataLoadStateChanged: BeEvent<MapFeatureInfoLoadListener>;
|
|
28
|
-
onDataUpdated: BeEvent<MapFeatureInfoDataUpdatedListener>;
|
|
29
|
-
constructor(onMapHit: MapHitEvent);
|
|
30
|
-
onUnload(): void;
|
|
31
|
-
private _handleMapHit;
|
|
32
|
-
addSubCategory(categoryName: string): void;
|
|
33
|
-
addCategory(category: PropertyCategory): number;
|
|
34
|
-
findCategoryIndex(category: PropertyCategory): number;
|
|
35
|
-
findCategoryIndexByName(name: string): number;
|
|
36
|
-
addProperty(propertyRecord: PropertyRecord, categoryName: string): void;
|
|
37
|
-
removeProperty(propertyRecord: PropertyRecord, categoryIdx: number): boolean;
|
|
38
|
-
replaceProperty(propertyRecord: PropertyRecord, categoryIdx: number, newRecord: PropertyRecord): boolean;
|
|
39
|
-
getData(): Promise<PropertyData>;
|
|
40
|
-
}
|
|
1
|
+
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
2
|
+
import { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from "@itwin/components-react";
|
|
3
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
4
|
+
import { MapHitEvent } from "../Interfaces";
|
|
5
|
+
/**
|
|
6
|
+
* Implementation of [IPropertyDataProvider] that uses an associative array.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare enum MapFeatureInfoLoadState {
|
|
10
|
+
DataLoadStart = 0,
|
|
11
|
+
DataLoadEnd = 1
|
|
12
|
+
}
|
|
13
|
+
export declare type MapFeatureInfoLoadListener = (state: MapFeatureInfoLoadState) => void;
|
|
14
|
+
export interface MapFeatureInfoDataUpdate {
|
|
15
|
+
recordCount: number;
|
|
16
|
+
}
|
|
17
|
+
export declare type MapFeatureInfoDataUpdatedListener = (data: MapFeatureInfoDataUpdate) => void;
|
|
18
|
+
export declare class FeatureInfoDataProvider implements IPropertyDataProvider, PropertyData {
|
|
19
|
+
private _removeListener;
|
|
20
|
+
label: PropertyRecord;
|
|
21
|
+
description?: string;
|
|
22
|
+
categories: PropertyCategory[];
|
|
23
|
+
records: {
|
|
24
|
+
[categoryName: string]: PropertyRecord[];
|
|
25
|
+
};
|
|
26
|
+
onDataChanged: PropertyDataChangeEvent;
|
|
27
|
+
onDataLoadStateChanged: BeEvent<MapFeatureInfoLoadListener>;
|
|
28
|
+
onDataUpdated: BeEvent<MapFeatureInfoDataUpdatedListener>;
|
|
29
|
+
constructor(onMapHit: MapHitEvent);
|
|
30
|
+
onUnload(): void;
|
|
31
|
+
private _handleMapHit;
|
|
32
|
+
addSubCategory(categoryName: string): void;
|
|
33
|
+
addCategory(category: PropertyCategory): number;
|
|
34
|
+
findCategoryIndex(category: PropertyCategory): number;
|
|
35
|
+
findCategoryIndexByName(name: string): number;
|
|
36
|
+
addProperty(propertyRecord: PropertyRecord, categoryName: string): void;
|
|
37
|
+
removeProperty(propertyRecord: PropertyRecord, categoryIdx: number): boolean;
|
|
38
|
+
replaceProperty(propertyRecord: PropertyRecord, categoryIdx: number, newRecord: PropertyRecord): boolean;
|
|
39
|
+
getData(): Promise<PropertyData>;
|
|
40
|
+
}
|
|
41
41
|
//# sourceMappingURL=FeatureInfoDataProvider.d.ts.map
|
|
@@ -1,136 +1,135 @@
|
|
|
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
6
|
-
import { PropertyDataChangeEvent } from "@itwin/components-react";
|
|
7
|
-
import { BeEvent } from "@itwin/core-bentley";
|
|
8
|
-
// import { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from ""
|
|
9
|
-
/**
|
|
10
|
-
* Implementation of [IPropertyDataProvider] that uses an associative array.
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export var MapFeatureInfoLoadState;
|
|
14
|
-
(function (MapFeatureInfoLoadState) {
|
|
15
|
-
MapFeatureInfoLoadState[MapFeatureInfoLoadState["DataLoadStart"] = 0] = "DataLoadStart";
|
|
16
|
-
MapFeatureInfoLoadState[MapFeatureInfoLoadState["DataLoadEnd"] = 1] = "DataLoadEnd";
|
|
17
|
-
})(MapFeatureInfoLoadState || (MapFeatureInfoLoadState = {}));
|
|
18
|
-
export class FeatureInfoDataProvider {
|
|
19
|
-
constructor(onMapHit) {
|
|
20
|
-
this.label = PropertyRecord.fromString("");
|
|
21
|
-
this.categories = [];
|
|
22
|
-
this.records = {};
|
|
23
|
-
this.onDataChanged = new PropertyDataChangeEvent();
|
|
24
|
-
this.onDataLoadStateChanged = new BeEvent();
|
|
25
|
-
this.onDataUpdated = new BeEvent();
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
27
|
-
this._removeListener = onMapHit.addListener(this._handleMapHit, this);
|
|
28
|
-
}
|
|
29
|
-
onUnload() {
|
|
30
|
-
this._removeListener();
|
|
31
|
-
}
|
|
32
|
-
async _handleMapHit(mapHit) {
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
subLayerCategory
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.records[categoryName][idx].
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
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
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
6
|
+
import { PropertyDataChangeEvent } from "@itwin/components-react";
|
|
7
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
8
|
+
// import { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from ""
|
|
9
|
+
/**
|
|
10
|
+
* Implementation of [IPropertyDataProvider] that uses an associative array.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export var MapFeatureInfoLoadState;
|
|
14
|
+
(function (MapFeatureInfoLoadState) {
|
|
15
|
+
MapFeatureInfoLoadState[MapFeatureInfoLoadState["DataLoadStart"] = 0] = "DataLoadStart";
|
|
16
|
+
MapFeatureInfoLoadState[MapFeatureInfoLoadState["DataLoadEnd"] = 1] = "DataLoadEnd";
|
|
17
|
+
})(MapFeatureInfoLoadState || (MapFeatureInfoLoadState = {}));
|
|
18
|
+
export class FeatureInfoDataProvider {
|
|
19
|
+
constructor(onMapHit) {
|
|
20
|
+
this.label = PropertyRecord.fromString("");
|
|
21
|
+
this.categories = [];
|
|
22
|
+
this.records = {};
|
|
23
|
+
this.onDataChanged = new PropertyDataChangeEvent();
|
|
24
|
+
this.onDataLoadStateChanged = new BeEvent();
|
|
25
|
+
this.onDataUpdated = new BeEvent();
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
27
|
+
this._removeListener = onMapHit.addListener(this._handleMapHit, this);
|
|
28
|
+
}
|
|
29
|
+
onUnload() {
|
|
30
|
+
this._removeListener();
|
|
31
|
+
}
|
|
32
|
+
async _handleMapHit(mapHit) {
|
|
33
|
+
this.records = {};
|
|
34
|
+
this.categories = [];
|
|
35
|
+
let recordCount = 0;
|
|
36
|
+
if (mapHit?.isMapHit) {
|
|
37
|
+
this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadStart);
|
|
38
|
+
const mapInfo = await mapHit.viewport.getMapFeatureInfo(mapHit);
|
|
39
|
+
this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadEnd);
|
|
40
|
+
if (mapInfo.layerInfo !== undefined) {
|
|
41
|
+
for (const curLayerInfo of mapInfo.layerInfo) {
|
|
42
|
+
const layerCatIdx = this.findCategoryIndexByName(curLayerInfo.layerName);
|
|
43
|
+
let nbRecords = 0;
|
|
44
|
+
const layerCategory = (layerCatIdx === -1 ?
|
|
45
|
+
{ name: curLayerInfo.layerName, label: curLayerInfo.layerName, expand: true, childCategories: [] }
|
|
46
|
+
: this.categories[layerCatIdx]);
|
|
47
|
+
if (curLayerInfo.info && !(curLayerInfo.info instanceof HTMLElement)) {
|
|
48
|
+
// This is not an HTMLElement, so iterate over each sub-layer info
|
|
49
|
+
for (const subLayerInfo of curLayerInfo.info) {
|
|
50
|
+
nbRecords++;
|
|
51
|
+
const subCatIdx = layerCategory.childCategories?.findIndex((testCategory) => {
|
|
52
|
+
return testCategory.name === subLayerInfo.subLayerName;
|
|
53
|
+
});
|
|
54
|
+
let subLayerCategory;
|
|
55
|
+
if (subCatIdx === -1) {
|
|
56
|
+
subLayerCategory = { name: subLayerInfo.subLayerName, label: subLayerInfo.subLayerName, expand: true };
|
|
57
|
+
this.addSubCategory(subLayerCategory.name);
|
|
58
|
+
layerCategory.childCategories?.push(subLayerCategory);
|
|
59
|
+
}
|
|
60
|
+
if (subLayerInfo.records) {
|
|
61
|
+
for (const record of subLayerInfo.records) {
|
|
62
|
+
// Always use the string value for now
|
|
63
|
+
this.addProperty(record, subLayerInfo.subLayerName);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (layerCatIdx === -1 && nbRecords > 0)
|
|
69
|
+
this.addCategory(layerCategory);
|
|
70
|
+
recordCount = recordCount + nbRecords;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
this.onDataUpdated.raiseEvent({ recordCount });
|
|
75
|
+
this.onDataChanged.raiseEvent();
|
|
76
|
+
}
|
|
77
|
+
addSubCategory(categoryName) {
|
|
78
|
+
this.records[categoryName] = [];
|
|
79
|
+
}
|
|
80
|
+
addCategory(category) {
|
|
81
|
+
const categoryIdx = this.categories.push(category) - 1;
|
|
82
|
+
this.records[this.categories[categoryIdx].name] = [];
|
|
83
|
+
return categoryIdx;
|
|
84
|
+
}
|
|
85
|
+
findCategoryIndex(category) {
|
|
86
|
+
const index = this.categories.findIndex((testCategory) => {
|
|
87
|
+
return testCategory.name === category.name;
|
|
88
|
+
});
|
|
89
|
+
return index;
|
|
90
|
+
}
|
|
91
|
+
findCategoryIndexByName(name) {
|
|
92
|
+
const index = this.categories.findIndex((testCategory) => {
|
|
93
|
+
return testCategory.name === name;
|
|
94
|
+
});
|
|
95
|
+
return index;
|
|
96
|
+
}
|
|
97
|
+
addProperty(propertyRecord, categoryName) {
|
|
98
|
+
const idx = this.records[categoryName].findIndex((prop) => prop.property.name === propertyRecord.property.name);
|
|
99
|
+
if (idx === -1) {
|
|
100
|
+
this.records[categoryName].push(propertyRecord);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.records[categoryName][idx].isMerged = true;
|
|
104
|
+
this.records[categoryName][idx].isReadonly = true;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
removeProperty(propertyRecord, categoryIdx) {
|
|
108
|
+
const index = this.records[this.categories[categoryIdx].name].findIndex((record) => {
|
|
109
|
+
return record === propertyRecord;
|
|
110
|
+
});
|
|
111
|
+
let result = false;
|
|
112
|
+
if (index >= 0) {
|
|
113
|
+
this.records[this.categories[categoryIdx].name].splice(index, 1);
|
|
114
|
+
this.onDataChanged.raiseEvent();
|
|
115
|
+
result = true;
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
replaceProperty(propertyRecord, categoryIdx, newRecord) {
|
|
120
|
+
const index = this.records[this.categories[categoryIdx].name].findIndex((record) => {
|
|
121
|
+
return record === propertyRecord;
|
|
122
|
+
});
|
|
123
|
+
let result = false;
|
|
124
|
+
// istanbul ignore else
|
|
125
|
+
if (index >= 0) {
|
|
126
|
+
this.records[this.categories[categoryIdx].name].splice(index, 1, newRecord);
|
|
127
|
+
result = true;
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
async getData() {
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
136
135
|
//# sourceMappingURL=FeatureInfoDataProvider.js.map
|