@itwin/map-layers 3.6.1 → 3.7.0-dev.2

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 (160) hide show
  1. package/CHANGELOG.md +5 -10
  2. package/lib/cjs/MapLayerPreferences.d.ts +88 -88
  3. package/lib/cjs/MapLayerPreferences.js +312 -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 +63 -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 +52 -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.d.ts.map +1 -1
  18. package/lib/cjs/ui/MapFeatureInfoTool.js +50 -50
  19. package/lib/cjs/ui/MapFeatureInfoTool.js.map +1 -1
  20. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +8 -8
  21. package/lib/cjs/ui/MapLayersUiItemsProvider.js +38 -38
  22. package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
  23. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts +14 -14
  24. package/lib/cjs/ui/widget/AttachLayerPopupButton.js +338 -338
  25. package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
  26. package/lib/cjs/ui/widget/BasemapPanel.d.ts +8 -8
  27. package/lib/cjs/ui/widget/BasemapPanel.js +156 -156
  28. package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
  29. package/lib/cjs/ui/widget/BasemapPanel.scss +87 -87
  30. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +21 -21
  31. package/lib/cjs/ui/widget/ConfirmMessageDialog.js +25 -25
  32. package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
  33. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
  34. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +139 -139
  35. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  36. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +7 -7
  37. package/lib/cjs/ui/widget/FeatureInfoWidget.js +71 -71
  38. package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
  39. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +19 -19
  40. package/lib/cjs/ui/widget/MapLayerDroppable.js +88 -88
  41. package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
  42. package/lib/cjs/ui/widget/MapLayerManager.d.ts +26 -26
  43. package/lib/cjs/ui/widget/MapLayerManager.js +403 -403
  44. package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
  45. package/lib/cjs/ui/widget/MapLayerManager.scss +409 -409
  46. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +12 -12
  47. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +83 -83
  48. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  49. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts +7 -7
  50. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +65 -65
  51. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  52. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  53. package/lib/cjs/ui/widget/MapLayersWidget.d.ts +11 -11
  54. package/lib/cjs/ui/widget/MapLayersWidget.js +31 -31
  55. package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
  56. package/lib/cjs/ui/widget/MapManagerSettings.d.ts +3 -3
  57. package/lib/cjs/ui/widget/MapManagerSettings.js +200 -200
  58. package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
  59. package/lib/cjs/ui/widget/MapManagerSettings.scss +29 -29
  60. package/lib/cjs/ui/widget/MapUrlDialog.d.ts +23 -23
  61. package/lib/cjs/ui/widget/MapUrlDialog.js +527 -527
  62. package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
  63. package/lib/cjs/ui/widget/MapUrlDialog.scss +100 -100
  64. package/lib/cjs/ui/widget/SelectMapFormat.d.ts +18 -18
  65. package/lib/cjs/ui/widget/SelectMapFormat.js +59 -59
  66. package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
  67. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +20 -20
  68. package/lib/cjs/ui/widget/SubLayersDataProvider.js +76 -76
  69. package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
  70. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +10 -10
  71. package/lib/cjs/ui/widget/SubLayersPopupButton.js +40 -40
  72. package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
  73. package/lib/cjs/ui/widget/SubLayersTree.d.ts +15 -15
  74. package/lib/cjs/ui/widget/SubLayersTree.js +419 -419
  75. package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
  76. package/lib/cjs/ui/widget/SubLayersTree.scss +69 -69
  77. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts +14 -14
  78. package/lib/cjs/ui/widget/TransparencyPopupButton.js +47 -47
  79. package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
  80. package/lib/cjs/ui/widget/TransparencyPopupButton.scss +36 -36
  81. package/lib/esm/MapLayerPreferences.d.ts +88 -88
  82. package/lib/esm/MapLayerPreferences.js +308 -308
  83. package/lib/esm/MapLayerPreferences.js.map +1 -1
  84. package/lib/esm/map-layers.d.ts +6 -6
  85. package/lib/esm/map-layers.js +10 -10
  86. package/lib/esm/mapLayers.d.ts +44 -44
  87. package/lib/esm/mapLayers.js +59 -59
  88. package/lib/esm/mapLayers.js.map +1 -1
  89. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +11 -11
  90. package/lib/esm/ui/FeatureInfoUiItemsProvider.js +48 -48
  91. package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  92. package/lib/esm/ui/Interfaces.d.ts +50 -50
  93. package/lib/esm/ui/Interfaces.js +1 -1
  94. package/lib/esm/ui/Interfaces.js.map +1 -1
  95. package/lib/esm/ui/MapFeatureInfoTool.d.ts +13 -13
  96. package/lib/esm/ui/MapFeatureInfoTool.d.ts.map +1 -1
  97. package/lib/esm/ui/MapFeatureInfoTool.js +45 -45
  98. package/lib/esm/ui/MapFeatureInfoTool.js.map +1 -1
  99. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +8 -8
  100. package/lib/esm/ui/MapLayersUiItemsProvider.js +34 -34
  101. package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
  102. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts +14 -14
  103. package/lib/esm/ui/widget/AttachLayerPopupButton.js +334 -334
  104. package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
  105. package/lib/esm/ui/widget/BasemapPanel.d.ts +8 -8
  106. package/lib/esm/ui/widget/BasemapPanel.js +152 -152
  107. package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
  108. package/lib/esm/ui/widget/BasemapPanel.scss +87 -87
  109. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +21 -21
  110. package/lib/esm/ui/widget/ConfirmMessageDialog.js +21 -21
  111. package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
  112. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +40 -40
  113. package/lib/esm/ui/widget/FeatureInfoDataProvider.js +135 -135
  114. package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  115. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +7 -7
  116. package/lib/esm/ui/widget/FeatureInfoWidget.js +67 -67
  117. package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
  118. package/lib/esm/ui/widget/MapLayerDroppable.d.ts +19 -19
  119. package/lib/esm/ui/widget/MapLayerDroppable.js +84 -84
  120. package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
  121. package/lib/esm/ui/widget/MapLayerManager.d.ts +26 -26
  122. package/lib/esm/ui/widget/MapLayerManager.js +398 -398
  123. package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
  124. package/lib/esm/ui/widget/MapLayerManager.scss +409 -409
  125. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +12 -12
  126. package/lib/esm/ui/widget/MapLayerSettingsMenu.js +79 -79
  127. package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  128. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts +7 -7
  129. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +61 -61
  130. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  131. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  132. package/lib/esm/ui/widget/MapLayersWidget.d.ts +11 -11
  133. package/lib/esm/ui/widget/MapLayersWidget.js +27 -27
  134. package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
  135. package/lib/esm/ui/widget/MapManagerSettings.d.ts +3 -3
  136. package/lib/esm/ui/widget/MapManagerSettings.js +196 -196
  137. package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
  138. package/lib/esm/ui/widget/MapManagerSettings.scss +29 -29
  139. package/lib/esm/ui/widget/MapUrlDialog.d.ts +23 -23
  140. package/lib/esm/ui/widget/MapUrlDialog.js +523 -523
  141. package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
  142. package/lib/esm/ui/widget/MapUrlDialog.scss +100 -100
  143. package/lib/esm/ui/widget/SelectMapFormat.d.ts +18 -18
  144. package/lib/esm/ui/widget/SelectMapFormat.js +55 -55
  145. package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
  146. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +20 -20
  147. package/lib/esm/ui/widget/SubLayersDataProvider.js +72 -72
  148. package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
  149. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +10 -10
  150. package/lib/esm/ui/widget/SubLayersPopupButton.js +36 -36
  151. package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
  152. package/lib/esm/ui/widget/SubLayersTree.d.ts +15 -15
  153. package/lib/esm/ui/widget/SubLayersTree.js +414 -414
  154. package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
  155. package/lib/esm/ui/widget/SubLayersTree.scss +69 -69
  156. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts +14 -14
  157. package/lib/esm/ui/widget/TransparencyPopupButton.js +43 -43
  158. package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
  159. package/lib/esm/ui/widget/TransparencyPopupButton.scss +36 -36
  160. package/package.json +26 -26
@@ -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,22 @@
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
+ 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
+ }
22
22
  //# 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;;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":["/*---------------------------------------------------------------------------------------------\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,136 @@
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
+ 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
+ }
136
136
  //# sourceMappingURL=FeatureInfoDataProvider.js.map