@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.
Files changed (158) hide show
  1. package/CHANGELOG.md +9 -4
  2. package/lib/cjs/MapLayerPreferences.d.ts +88 -88
  3. package/lib/cjs/MapLayerPreferences.js +311 -312
  4. package/lib/cjs/MapLayerPreferences.js.map +1 -1
  5. package/lib/cjs/map-layers.d.ts +6 -6
  6. package/lib/cjs/map-layers.js +22 -22
  7. package/lib/cjs/mapLayers.d.ts +44 -44
  8. package/lib/cjs/mapLayers.js +61 -63
  9. package/lib/cjs/mapLayers.js.map +1 -1
  10. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts +11 -11
  11. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +51 -52
  12. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  13. package/lib/cjs/ui/Interfaces.d.ts +50 -50
  14. package/lib/cjs/ui/Interfaces.js +2 -2
  15. package/lib/cjs/ui/Interfaces.js.map +1 -1
  16. package/lib/cjs/ui/MapFeatureInfoTool.d.ts +13 -13
  17. package/lib/cjs/ui/MapFeatureInfoTool.js +50 -50
  18. package/lib/cjs/ui/MapFeatureInfoTool.js.map +1 -1
  19. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +8 -8
  20. package/lib/cjs/ui/MapLayersUiItemsProvider.js +38 -38
  21. package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
  22. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts +14 -14
  23. package/lib/cjs/ui/widget/AttachLayerPopupButton.js +335 -338
  24. package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
  25. package/lib/cjs/ui/widget/BasemapPanel.d.ts +8 -8
  26. package/lib/cjs/ui/widget/BasemapPanel.js +156 -156
  27. package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
  28. package/lib/cjs/ui/widget/BasemapPanel.scss +87 -87
  29. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +21 -21
  30. package/lib/cjs/ui/widget/ConfirmMessageDialog.js +22 -25
  31. package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
  32. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
  33. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +138 -139
  34. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  35. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +7 -7
  36. package/lib/cjs/ui/widget/FeatureInfoWidget.js +65 -71
  37. package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
  38. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +19 -19
  39. package/lib/cjs/ui/widget/MapLayerDroppable.js +85 -88
  40. package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
  41. package/lib/cjs/ui/widget/MapLayerManager.d.ts +26 -26
  42. package/lib/cjs/ui/widget/MapLayerManager.js +401 -403
  43. package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
  44. package/lib/cjs/ui/widget/MapLayerManager.scss +409 -409
  45. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +12 -12
  46. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +82 -83
  47. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  48. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts +7 -7
  49. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +65 -65
  50. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  51. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  52. package/lib/cjs/ui/widget/MapLayersWidget.d.ts +11 -11
  53. package/lib/cjs/ui/widget/MapLayersWidget.js +31 -31
  54. package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
  55. package/lib/cjs/ui/widget/MapManagerSettings.d.ts +3 -3
  56. package/lib/cjs/ui/widget/MapManagerSettings.js +200 -200
  57. package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
  58. package/lib/cjs/ui/widget/MapManagerSettings.scss +29 -29
  59. package/lib/cjs/ui/widget/MapUrlDialog.d.ts +23 -23
  60. package/lib/cjs/ui/widget/MapUrlDialog.js +524 -527
  61. package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
  62. package/lib/cjs/ui/widget/MapUrlDialog.scss +100 -100
  63. package/lib/cjs/ui/widget/SelectMapFormat.d.ts +18 -18
  64. package/lib/cjs/ui/widget/SelectMapFormat.js +54 -59
  65. package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
  66. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +20 -20
  67. package/lib/cjs/ui/widget/SubLayersDataProvider.js +75 -76
  68. package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
  69. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +10 -10
  70. package/lib/cjs/ui/widget/SubLayersPopupButton.js +40 -40
  71. package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
  72. package/lib/cjs/ui/widget/SubLayersTree.d.ts +15 -15
  73. package/lib/cjs/ui/widget/SubLayersTree.js +413 -419
  74. package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
  75. package/lib/cjs/ui/widget/SubLayersTree.scss +69 -69
  76. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts +14 -14
  77. package/lib/cjs/ui/widget/TransparencyPopupButton.js +47 -47
  78. package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
  79. package/lib/cjs/ui/widget/TransparencyPopupButton.scss +36 -36
  80. package/lib/esm/MapLayerPreferences.d.ts +88 -88
  81. package/lib/esm/MapLayerPreferences.js +307 -308
  82. package/lib/esm/MapLayerPreferences.js.map +1 -1
  83. package/lib/esm/map-layers.d.ts +6 -6
  84. package/lib/esm/map-layers.js +10 -10
  85. package/lib/esm/mapLayers.d.ts +44 -44
  86. package/lib/esm/mapLayers.js +57 -59
  87. package/lib/esm/mapLayers.js.map +1 -1
  88. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +11 -11
  89. package/lib/esm/ui/FeatureInfoUiItemsProvider.js +47 -48
  90. package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  91. package/lib/esm/ui/Interfaces.d.ts +50 -50
  92. package/lib/esm/ui/Interfaces.js +1 -1
  93. package/lib/esm/ui/Interfaces.js.map +1 -1
  94. package/lib/esm/ui/MapFeatureInfoTool.d.ts +13 -13
  95. package/lib/esm/ui/MapFeatureInfoTool.js +45 -45
  96. package/lib/esm/ui/MapFeatureInfoTool.js.map +1 -1
  97. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +8 -8
  98. package/lib/esm/ui/MapLayersUiItemsProvider.js +34 -34
  99. package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
  100. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts +14 -14
  101. package/lib/esm/ui/widget/AttachLayerPopupButton.js +331 -334
  102. package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
  103. package/lib/esm/ui/widget/BasemapPanel.d.ts +8 -8
  104. package/lib/esm/ui/widget/BasemapPanel.js +152 -152
  105. package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
  106. package/lib/esm/ui/widget/BasemapPanel.scss +87 -87
  107. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +21 -21
  108. package/lib/esm/ui/widget/ConfirmMessageDialog.js +18 -21
  109. package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
  110. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
  111. package/lib/esm/ui/widget/FeatureInfoDataProvider.js +134 -135
  112. package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  113. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +7 -7
  114. package/lib/esm/ui/widget/FeatureInfoWidget.js +61 -67
  115. package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
  116. package/lib/esm/ui/widget/MapLayerDroppable.d.ts +19 -19
  117. package/lib/esm/ui/widget/MapLayerDroppable.js +81 -84
  118. package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
  119. package/lib/esm/ui/widget/MapLayerManager.d.ts +26 -26
  120. package/lib/esm/ui/widget/MapLayerManager.js +396 -398
  121. package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
  122. package/lib/esm/ui/widget/MapLayerManager.scss +409 -409
  123. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +12 -12
  124. package/lib/esm/ui/widget/MapLayerSettingsMenu.js +78 -79
  125. package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  126. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts +7 -7
  127. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +61 -61
  128. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  129. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  130. package/lib/esm/ui/widget/MapLayersWidget.d.ts +11 -11
  131. package/lib/esm/ui/widget/MapLayersWidget.js +27 -27
  132. package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
  133. package/lib/esm/ui/widget/MapManagerSettings.d.ts +3 -3
  134. package/lib/esm/ui/widget/MapManagerSettings.js +196 -196
  135. package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
  136. package/lib/esm/ui/widget/MapManagerSettings.scss +29 -29
  137. package/lib/esm/ui/widget/MapUrlDialog.d.ts +23 -23
  138. package/lib/esm/ui/widget/MapUrlDialog.js +520 -523
  139. package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
  140. package/lib/esm/ui/widget/MapUrlDialog.scss +100 -100
  141. package/lib/esm/ui/widget/SelectMapFormat.d.ts +18 -18
  142. package/lib/esm/ui/widget/SelectMapFormat.js +50 -55
  143. package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
  144. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +20 -20
  145. package/lib/esm/ui/widget/SubLayersDataProvider.js +71 -72
  146. package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
  147. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +10 -10
  148. package/lib/esm/ui/widget/SubLayersPopupButton.js +36 -36
  149. package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
  150. package/lib/esm/ui/widget/SubLayersTree.d.ts +15 -15
  151. package/lib/esm/ui/widget/SubLayersTree.js +408 -414
  152. package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
  153. package/lib/esm/ui/widget/SubLayersTree.scss +69 -69
  154. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts +14 -14
  155. package/lib/esm/ui/widget/TransparencyPopupButton.js +43 -43
  156. package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
  157. package/lib/esm/ui/widget/TransparencyPopupButton.scss +36 -36
  158. 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
- var _a, _b;
14
- return [
15
- { type: DialogButtonType.Yes, onClick: (_a = props.onYesResult) !== null && _a !== void 0 ? _a : (() => { }) },
16
- { type: DialogButtonType.No, onClick: (_b = props.onNoResult) !== null && _b !== void 0 ? _b : (() => { }) },
17
- ];
18
- }, [props.onYesResult, props.onNoResult]);
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;;QAAC,OAAA;YACxC,EAAE,IAAI,EAAE,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE;YACzE,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE;SACxE,CAAA;KAAA,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":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n// cSpell:ignore Modeless WMTS\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps, Dialog } from \"@itwin/core-react\";\r\n\r\nimport \"./MapUrlDialog.scss\";\r\nimport { DialogButtonType } from \"@itwin/appui-abstract\";\r\n\r\ninterface ConfirmMessageDialogProps extends CommonProps {\r\n\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n message?: string | JSX.Element;\r\n onYesResult?: () => void;\r\n onNoResult?: () => void;\r\n onClose?: () => void;\r\n onEscape?: () => void;\r\n minWidth?: string | number;\r\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 */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function ConfirmMessageDialog(props: ConfirmMessageDialogProps) {\r\n\r\n const buttonCluster = React.useMemo(() => [\r\n { type: DialogButtonType.Yes, onClick: props.onYesResult ?? (() => { }) },\r\n { type: DialogButtonType.No, onClick: props.onNoResult ?? (() => { }) },\r\n ], [props.onYesResult, props.onNoResult]);\r\n\r\n return (\r\n <Dialog\r\n className={props.className}\r\n title={props.title}\r\n opened={true}\r\n resizable={false}\r\n movable={true}\r\n modal={true}\r\n buttonCluster={buttonCluster}\r\n onClose={props.onClose}\r\n onEscape={props.onEscape}\r\n minHeight={props.minHeight}\r\n maxHeight={props.maxHeight}\r\n minWidth={props.minWidth}\r\n maxWidth={props.maxWidth}\r\n trapFocus={false}\r\n >\r\n <div>{props.message}</div>\r\n </Dialog>\r\n );\r\n}\r\n"]}
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
- var _a, _b;
34
- this.records = {};
35
- this.categories = [];
36
- let recordCount = 0;
37
- if (mapHit === null || mapHit === void 0 ? void 0 : mapHit.isMapHit) {
38
- this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadStart);
39
- const mapInfo = await mapHit.viewport.getMapFeatureInfo(mapHit);
40
- this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadEnd);
41
- if (mapInfo.layerInfo !== undefined) {
42
- for (const curLayerInfo of mapInfo.layerInfo) {
43
- const layerCatIdx = this.findCategoryIndexByName(curLayerInfo.layerName);
44
- let nbRecords = 0;
45
- const layerCategory = (layerCatIdx === -1 ?
46
- { name: curLayerInfo.layerName, label: curLayerInfo.layerName, expand: true, childCategories: [] }
47
- : this.categories[layerCatIdx]);
48
- if (curLayerInfo.info && !(curLayerInfo.info instanceof HTMLElement)) {
49
- // This is not an HTMLElement, so iterate over each sub-layer info
50
- for (const subLayerInfo of curLayerInfo.info) {
51
- nbRecords++;
52
- const subCatIdx = (_a = layerCategory.childCategories) === null || _a === void 0 ? void 0 : _a.findIndex((testCategory) => {
53
- return testCategory.name === subLayerInfo.subLayerName;
54
- });
55
- let subLayerCategory;
56
- if (subCatIdx === -1) {
57
- subLayerCategory = { name: subLayerInfo.subLayerName, label: subLayerInfo.subLayerName, expand: true };
58
- this.addSubCategory(subLayerCategory.name);
59
- (_b = layerCategory.childCategories) === null || _b === void 0 ? void 0 : _b.push(subLayerCategory);
60
- }
61
- if (subLayerInfo.records) {
62
- for (const record of subLayerInfo.records) {
63
- // Always use the string value for now
64
- this.addProperty(record, subLayerInfo.subLayerName);
65
- }
66
- }
67
- }
68
- }
69
- if (layerCatIdx === -1 && nbRecords > 0)
70
- this.addCategory(layerCategory);
71
- recordCount = recordCount + nbRecords;
72
- }
73
- }
74
- }
75
- this.onDataUpdated.raiseEvent({ recordCount });
76
- this.onDataChanged.raiseEvent();
77
- }
78
- addSubCategory(categoryName) {
79
- this.records[categoryName] = [];
80
- }
81
- addCategory(category) {
82
- const categoryIdx = this.categories.push(category) - 1;
83
- this.records[this.categories[categoryIdx].name] = [];
84
- return categoryIdx;
85
- }
86
- findCategoryIndex(category) {
87
- const index = this.categories.findIndex((testCategory) => {
88
- return testCategory.name === category.name;
89
- });
90
- return index;
91
- }
92
- findCategoryIndexByName(name) {
93
- const index = this.categories.findIndex((testCategory) => {
94
- return testCategory.name === name;
95
- });
96
- return index;
97
- }
98
- addProperty(propertyRecord, categoryName) {
99
- const idx = this.records[categoryName].findIndex((prop) => prop.property.name === propertyRecord.property.name);
100
- if (idx === -1) {
101
- this.records[categoryName].push(propertyRecord);
102
- }
103
- else {
104
- this.records[categoryName][idx].isMerged = true;
105
- this.records[categoryName][idx].isReadonly = true;
106
- }
107
- }
108
- removeProperty(propertyRecord, categoryIdx) {
109
- const index = this.records[this.categories[categoryIdx].name].findIndex((record) => {
110
- return record === propertyRecord;
111
- });
112
- let result = false;
113
- if (index >= 0) {
114
- this.records[this.categories[categoryIdx].name].splice(index, 1);
115
- this.onDataChanged.raiseEvent();
116
- result = true;
117
- }
118
- return result;
119
- }
120
- replaceProperty(propertyRecord, categoryIdx, newRecord) {
121
- const index = this.records[this.categories[categoryIdx].name].findIndex((record) => {
122
- return record === propertyRecord;
123
- });
124
- let result = false;
125
- // istanbul ignore else
126
- if (index >= 0) {
127
- this.records[this.categories[categoryIdx].name].splice(index, 1, newRecord);
128
- result = true;
129
- }
130
- return result;
131
- }
132
- async getData() {
133
- return this;
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