@itwin/map-layers 4.0.0-dev.7 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/CHANGELOG.md +746 -848
  2. package/README.md +32 -32
  3. package/lib/cjs/MapLayerPreferences.d.ts +88 -88
  4. package/lib/cjs/MapLayerPreferences.js +312 -312
  5. package/lib/cjs/MapLayerPreferences.js.map +1 -1
  6. package/lib/cjs/map-layers.d.ts +6 -6
  7. package/lib/cjs/map-layers.js +22 -22
  8. package/lib/cjs/mapLayers.d.ts +26 -44
  9. package/lib/cjs/mapLayers.d.ts.map +1 -1
  10. package/lib/cjs/mapLayers.js +34 -63
  11. package/lib/cjs/mapLayers.js.map +1 -1
  12. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts +16 -11
  13. package/lib/cjs/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  14. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js +47 -52
  15. package/lib/cjs/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  16. package/lib/cjs/ui/Interfaces.d.ts +50 -50
  17. package/lib/cjs/ui/Interfaces.js +2 -2
  18. package/lib/cjs/ui/Interfaces.js.map +1 -1
  19. package/lib/cjs/ui/MapFeatureInfoTool.d.ts +13 -13
  20. package/lib/cjs/ui/MapFeatureInfoTool.d.ts.map +1 -1
  21. package/lib/cjs/ui/MapFeatureInfoTool.js +50 -50
  22. package/lib/cjs/ui/MapFeatureInfoTool.js.map +1 -1
  23. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +8 -8
  24. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  25. package/lib/cjs/ui/MapLayersUiItemsProvider.js +35 -38
  26. package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
  27. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts +13 -14
  28. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  29. package/lib/cjs/ui/widget/AttachLayerPopupButton.js +338 -338
  30. package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
  31. package/lib/cjs/ui/widget/BasemapPanel.d.ts +7 -8
  32. package/lib/cjs/ui/widget/BasemapPanel.d.ts.map +1 -1
  33. package/lib/cjs/ui/widget/BasemapPanel.js +156 -156
  34. package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
  35. package/lib/cjs/ui/widget/BasemapPanel.scss +87 -87
  36. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +20 -21
  37. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  38. package/lib/cjs/ui/widget/ConfirmMessageDialog.js +25 -25
  39. package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
  40. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +35 -40
  41. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
  42. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +140 -139
  43. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  44. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +6 -7
  45. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  46. package/lib/cjs/ui/widget/FeatureInfoWidget.js +76 -71
  47. package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
  48. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +18 -19
  49. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  50. package/lib/cjs/ui/widget/MapLayerDroppable.js +88 -88
  51. package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
  52. package/lib/cjs/ui/widget/MapLayerManager.d.ts +26 -26
  53. package/lib/cjs/ui/widget/MapLayerManager.js +403 -403
  54. package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
  55. package/lib/cjs/ui/widget/MapLayerManager.scss +409 -409
  56. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +11 -12
  57. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  58. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +83 -83
  59. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  60. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts +6 -7
  61. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  62. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +65 -65
  63. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  64. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  65. package/lib/cjs/ui/widget/MapLayersWidget.d.ts +10 -11
  66. package/lib/cjs/ui/widget/MapLayersWidget.d.ts.map +1 -1
  67. package/lib/cjs/ui/widget/MapLayersWidget.js +31 -31
  68. package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
  69. package/lib/cjs/ui/widget/MapManagerSettings.d.ts +2 -3
  70. package/lib/cjs/ui/widget/MapManagerSettings.d.ts.map +1 -1
  71. package/lib/cjs/ui/widget/MapManagerSettings.js +200 -200
  72. package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
  73. package/lib/cjs/ui/widget/MapManagerSettings.scss +29 -29
  74. package/lib/cjs/ui/widget/MapUrlDialog.d.ts +22 -23
  75. package/lib/cjs/ui/widget/MapUrlDialog.d.ts.map +1 -1
  76. package/lib/cjs/ui/widget/MapUrlDialog.js +533 -527
  77. package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
  78. package/lib/cjs/ui/widget/MapUrlDialog.scss +99 -100
  79. package/lib/cjs/ui/widget/SelectMapFormat.d.ts +17 -18
  80. package/lib/cjs/ui/widget/SelectMapFormat.d.ts.map +1 -1
  81. package/lib/cjs/ui/widget/SelectMapFormat.js +59 -59
  82. package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
  83. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +18 -20
  84. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  85. package/lib/cjs/ui/widget/SubLayersDataProvider.js +75 -76
  86. package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
  87. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +9 -10
  88. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  89. package/lib/cjs/ui/widget/SubLayersPopupButton.js +40 -40
  90. package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
  91. package/lib/cjs/ui/widget/SubLayersTree.d.ts +14 -15
  92. package/lib/cjs/ui/widget/SubLayersTree.d.ts.map +1 -1
  93. package/lib/cjs/ui/widget/SubLayersTree.js +419 -419
  94. package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
  95. package/lib/cjs/ui/widget/SubLayersTree.scss +70 -69
  96. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts +13 -14
  97. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  98. package/lib/cjs/ui/widget/TransparencyPopupButton.js +47 -47
  99. package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
  100. package/lib/cjs/ui/widget/TransparencyPopupButton.scss +35 -36
  101. package/lib/esm/MapLayerPreferences.d.ts +88 -88
  102. package/lib/esm/MapLayerPreferences.js +308 -308
  103. package/lib/esm/MapLayerPreferences.js.map +1 -1
  104. package/lib/esm/map-layers.d.ts +6 -6
  105. package/lib/esm/map-layers.js +10 -10
  106. package/lib/esm/mapLayers.d.ts +26 -44
  107. package/lib/esm/mapLayers.d.ts.map +1 -1
  108. package/lib/esm/mapLayers.js +30 -59
  109. package/lib/esm/mapLayers.js.map +1 -1
  110. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +16 -11
  111. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  112. package/lib/esm/ui/FeatureInfoUiItemsProvider.js +43 -48
  113. package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  114. package/lib/esm/ui/Interfaces.d.ts +50 -50
  115. package/lib/esm/ui/Interfaces.js +1 -1
  116. package/lib/esm/ui/Interfaces.js.map +1 -1
  117. package/lib/esm/ui/MapFeatureInfoTool.d.ts +13 -13
  118. package/lib/esm/ui/MapFeatureInfoTool.d.ts.map +1 -1
  119. package/lib/esm/ui/MapFeatureInfoTool.js +45 -45
  120. package/lib/esm/ui/MapFeatureInfoTool.js.map +1 -1
  121. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +8 -8
  122. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  123. package/lib/esm/ui/MapLayersUiItemsProvider.js +31 -34
  124. package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
  125. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts +13 -14
  126. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  127. package/lib/esm/ui/widget/AttachLayerPopupButton.js +334 -334
  128. package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
  129. package/lib/esm/ui/widget/BasemapPanel.d.ts +7 -8
  130. package/lib/esm/ui/widget/BasemapPanel.d.ts.map +1 -1
  131. package/lib/esm/ui/widget/BasemapPanel.js +152 -152
  132. package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
  133. package/lib/esm/ui/widget/BasemapPanel.scss +87 -87
  134. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +20 -21
  135. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  136. package/lib/esm/ui/widget/ConfirmMessageDialog.js +21 -21
  137. package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
  138. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +35 -40
  139. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
  140. package/lib/esm/ui/widget/FeatureInfoDataProvider.js +136 -135
  141. package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  142. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +6 -7
  143. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  144. package/lib/esm/ui/widget/FeatureInfoWidget.js +72 -67
  145. package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
  146. package/lib/esm/ui/widget/MapLayerDroppable.d.ts +18 -19
  147. package/lib/esm/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  148. package/lib/esm/ui/widget/MapLayerDroppable.js +84 -84
  149. package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
  150. package/lib/esm/ui/widget/MapLayerManager.d.ts +26 -26
  151. package/lib/esm/ui/widget/MapLayerManager.js +398 -398
  152. package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
  153. package/lib/esm/ui/widget/MapLayerManager.scss +409 -409
  154. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +11 -12
  155. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  156. package/lib/esm/ui/widget/MapLayerSettingsMenu.js +79 -79
  157. package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  158. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts +6 -7
  159. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  160. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +61 -61
  161. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  162. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  163. package/lib/esm/ui/widget/MapLayersWidget.d.ts +10 -11
  164. package/lib/esm/ui/widget/MapLayersWidget.d.ts.map +1 -1
  165. package/lib/esm/ui/widget/MapLayersWidget.js +27 -27
  166. package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
  167. package/lib/esm/ui/widget/MapManagerSettings.d.ts +2 -3
  168. package/lib/esm/ui/widget/MapManagerSettings.d.ts.map +1 -1
  169. package/lib/esm/ui/widget/MapManagerSettings.js +196 -196
  170. package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
  171. package/lib/esm/ui/widget/MapManagerSettings.scss +29 -29
  172. package/lib/esm/ui/widget/MapUrlDialog.d.ts +22 -23
  173. package/lib/esm/ui/widget/MapUrlDialog.d.ts.map +1 -1
  174. package/lib/esm/ui/widget/MapUrlDialog.js +529 -523
  175. package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
  176. package/lib/esm/ui/widget/MapUrlDialog.scss +99 -100
  177. package/lib/esm/ui/widget/SelectMapFormat.d.ts +17 -18
  178. package/lib/esm/ui/widget/SelectMapFormat.d.ts.map +1 -1
  179. package/lib/esm/ui/widget/SelectMapFormat.js +55 -55
  180. package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
  181. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +18 -20
  182. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  183. package/lib/esm/ui/widget/SubLayersDataProvider.js +71 -72
  184. package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
  185. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +9 -10
  186. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  187. package/lib/esm/ui/widget/SubLayersPopupButton.js +36 -36
  188. package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
  189. package/lib/esm/ui/widget/SubLayersTree.d.ts +14 -15
  190. package/lib/esm/ui/widget/SubLayersTree.d.ts.map +1 -1
  191. package/lib/esm/ui/widget/SubLayersTree.js +414 -414
  192. package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
  193. package/lib/esm/ui/widget/SubLayersTree.scss +70 -69
  194. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts +13 -14
  195. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  196. package/lib/esm/ui/widget/TransparencyPopupButton.js +43 -43
  197. package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
  198. package/lib/esm/ui/widget/TransparencyPopupButton.scss +35 -36
  199. package/package.json +39 -38
@@ -1,136 +1,137 @@
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
+ /**
9
+ * Implementation of [IPropertyDataProvider] that uses an associative array.
10
+ * @public
11
+ */
12
+ export var MapFeatureInfoLoadState;
13
+ (function (MapFeatureInfoLoadState) {
14
+ MapFeatureInfoLoadState[MapFeatureInfoLoadState["DataLoadStart"] = 0] = "DataLoadStart";
15
+ MapFeatureInfoLoadState[MapFeatureInfoLoadState["DataLoadEnd"] = 1] = "DataLoadEnd";
16
+ })(MapFeatureInfoLoadState || (MapFeatureInfoLoadState = {}));
17
+ class SimplePropertyData {
18
+ constructor() {
19
+ this.label = PropertyRecord.fromString("");
20
+ this.categories = [];
21
+ this.records = {};
22
+ }
23
+ }
24
+ export class FeatureInfoDataProvider {
25
+ constructor(onMapHit) {
26
+ this.onDataChanged = new PropertyDataChangeEvent();
27
+ this.onDataLoadStateChanged = new BeEvent();
28
+ this.onDataUpdated = new BeEvent();
29
+ this._data = new SimplePropertyData();
30
+ this._removeListener = onMapHit.addListener(this._handleMapHit, this);
31
+ }
32
+ onUnload() {
33
+ this._removeListener();
34
+ }
35
+ async _handleMapHit(mapHit) {
36
+ var _a, _b;
37
+ this._data = new SimplePropertyData();
38
+ let recordCount = 0;
39
+ if (mapHit === null || mapHit === void 0 ? void 0 : mapHit.isMapHit) {
40
+ this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadStart);
41
+ const mapInfo = await mapHit.viewport.getMapFeatureInfo(mapHit);
42
+ this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadEnd);
43
+ if (mapInfo.layerInfo !== undefined) {
44
+ for (const curLayerInfo of mapInfo.layerInfo) {
45
+ const layerCatIdx = this.findCategoryIndexByName(curLayerInfo.layerName);
46
+ let nbRecords = 0;
47
+ const layerCategory = (layerCatIdx === -1 ?
48
+ { name: curLayerInfo.layerName, label: curLayerInfo.layerName, expand: true, childCategories: [] }
49
+ : this._data.categories[layerCatIdx]);
50
+ if (curLayerInfo.info && !(curLayerInfo.info instanceof HTMLElement)) {
51
+ // This is not an HTMLElement, so iterate over each sub-layer info
52
+ for (const subLayerInfo of curLayerInfo.info) {
53
+ nbRecords++;
54
+ const subCatIdx = (_a = layerCategory.childCategories) === null || _a === void 0 ? void 0 : _a.findIndex((testCategory) => {
55
+ return testCategory.name === subLayerInfo.subLayerName;
56
+ });
57
+ let subLayerCategory;
58
+ if (subCatIdx === -1) {
59
+ subLayerCategory = { name: subLayerInfo.subLayerName, label: subLayerInfo.subLayerName, expand: true };
60
+ this.addSubCategory(subLayerCategory.name);
61
+ (_b = layerCategory.childCategories) === null || _b === void 0 ? void 0 : _b.push(subLayerCategory);
62
+ }
63
+ if (subLayerInfo.records) {
64
+ for (const record of subLayerInfo.records) {
65
+ // Always use the string value for now
66
+ this.addProperty(record, subLayerInfo.subLayerName);
67
+ }
68
+ }
69
+ }
70
+ }
71
+ if (layerCatIdx === -1 && nbRecords > 0)
72
+ this.addCategory(layerCategory);
73
+ recordCount = recordCount + nbRecords;
74
+ }
75
+ }
76
+ }
77
+ this.onDataUpdated.raiseEvent({ recordCount });
78
+ this.onDataChanged.raiseEvent();
79
+ }
80
+ addSubCategory(categoryName) {
81
+ this._data.records[categoryName] = [];
82
+ }
83
+ addCategory(category) {
84
+ const categoryIdx = this._data.categories.push(category) - 1;
85
+ this._data.records[this._data.categories[categoryIdx].name] = [];
86
+ return categoryIdx;
87
+ }
88
+ findCategoryIndex(category) {
89
+ const index = this._data.categories.findIndex((testCategory) => {
90
+ return testCategory.name === category.name;
91
+ });
92
+ return index;
93
+ }
94
+ findCategoryIndexByName(name) {
95
+ const index = this._data.categories.findIndex((testCategory) => {
96
+ return testCategory.name === name;
97
+ });
98
+ return index;
99
+ }
100
+ addProperty(propertyRecord, categoryName) {
101
+ const idx = this._data.records[categoryName].findIndex((prop) => prop.property.name === propertyRecord.property.name);
102
+ if (idx === -1) {
103
+ this._data.records[categoryName].push(propertyRecord);
104
+ }
105
+ else {
106
+ this._data.records[categoryName][idx].isMerged = true;
107
+ this._data.records[categoryName][idx].isReadonly = true;
108
+ }
109
+ }
110
+ removeProperty(propertyRecord, categoryIdx) {
111
+ const index = this._data.records[this._data.categories[categoryIdx].name].findIndex((record) => {
112
+ return record === propertyRecord;
113
+ });
114
+ let result = false;
115
+ if (index >= 0) {
116
+ this._data.records[this._data.categories[categoryIdx].name].splice(index, 1);
117
+ this.onDataChanged.raiseEvent();
118
+ result = true;
119
+ }
120
+ return result;
121
+ }
122
+ replaceProperty(propertyRecord, categoryIdx, newRecord) {
123
+ const index = this._data.records[this._data.categories[categoryIdx].name].findIndex((record) => {
124
+ return record === propertyRecord;
125
+ });
126
+ let result = false;
127
+ if (index >= 0) {
128
+ this._data.records[this._data.categories[categoryIdx].name].splice(index, 1, newRecord);
129
+ result = true;
130
+ }
131
+ return result;
132
+ }
133
+ async getData() {
134
+ return this._data;
135
+ }
136
+ }
136
137
  //# sourceMappingURL=FeatureInfoDataProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureInfoDataProvider.js","sourceRoot":"","sources":["../../../../src/ui/widget/FeatureInfoDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAG,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAyD,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACzH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,oGAAoG;AAEpG;;;GAGG;AAEH,MAAM,CAAN,IAAY,uBAAoD;AAAhE,WAAY,uBAAuB;IAAE,uFAAa,CAAA;IAAE,mFAAW,CAAA;AAAA,CAAC,EAApD,uBAAuB,KAAvB,uBAAuB,QAA6B;AAQhE,MAAM,OAAO,uBAAuB;IASlC,YAAY,QAAqB;QAP1B,UAAK,GAAmB,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAEtD,eAAU,GAAuB,EAAE,CAAC;QACpC,YAAO,GAAiD,EAAE,CAAC;QAC3D,kBAAa,GAAG,IAAI,uBAAuB,EAAE,CAAC;QAC9C,2BAAsB,GAAG,IAAI,OAAO,EAA8B,CAAC;QACnE,kBAAa,GAAG,IAAI,OAAO,EAAqC,CAAC;QAEtE,6DAA6D;QAC7D,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,eAAe,EAAE,CA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,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YACjG,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACjE,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;YAChC,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,eAAe,CAAC,cAA8B,EAAE,WAAmB,EAAE,SAAyB;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YACjG,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,uBAAuB;QACvB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YAC5E,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;CACF","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\r\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\r\nimport { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"@itwin/components-react\";\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { HitDetail } from \"@itwin/core-frontend\";\r\nimport { MapHitEvent } from \"../Interfaces\";\r\n// import { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"\"\r\n\r\n/**\r\n * Implementation of [IPropertyDataProvider] that uses an associative array.\r\n * @public\r\n */\r\n\r\nexport enum MapFeatureInfoLoadState {DataLoadStart, DataLoadEnd}\r\nexport declare type MapFeatureInfoLoadListener = (state: MapFeatureInfoLoadState) => void;\r\n\r\nexport interface MapFeatureInfoDataUpdate {\r\n recordCount: number;\r\n}\r\nexport declare type MapFeatureInfoDataUpdatedListener = (data: MapFeatureInfoDataUpdate) => void;\r\n\r\nexport class FeatureInfoDataProvider implements IPropertyDataProvider, PropertyData {\r\n private _removeListener: () => void;\r\n public label: PropertyRecord = PropertyRecord.fromString(\"\");\r\n public description?: string;\r\n public categories: PropertyCategory[] = [];\r\n public records: { [categoryName: string]: PropertyRecord[] } = {};\r\n public onDataChanged = new PropertyDataChangeEvent();\r\n public onDataLoadStateChanged = new BeEvent<MapFeatureInfoLoadListener>();\r\n public onDataUpdated = new BeEvent<MapFeatureInfoDataUpdatedListener>();\r\n constructor(onMapHit: MapHitEvent) {\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n this._removeListener = onMapHit.addListener(this._handleMapHit, this);\r\n }\r\n\r\n public onUnload() {\r\n this._removeListener();\r\n }\r\n\r\n private async _handleMapHit(mapHit: HitDetail) {\r\n this.records = {};\r\n this.categories = [];\r\n let recordCount = 0;\r\n if (mapHit?.isMapHit) {\r\n this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadStart);\r\n const mapInfo = await mapHit.viewport.getMapFeatureInfo(mapHit);\r\n this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadEnd);\r\n if (mapInfo.layerInfo !== undefined ) {\r\n for (const curLayerInfo of mapInfo.layerInfo) {\r\n const layerCatIdx = this.findCategoryIndexByName(curLayerInfo.layerName);\r\n let nbRecords = 0;\r\n const layerCategory = (\r\n layerCatIdx === -1 ?\r\n {name:curLayerInfo.layerName, label:curLayerInfo.layerName, expand:true, childCategories:[]}\r\n : this.categories[layerCatIdx] );\r\n\r\n if (curLayerInfo.info && !(curLayerInfo.info instanceof HTMLElement)) {\r\n // This is not an HTMLElement, so iterate over each sub-layer info\r\n for (const subLayerInfo of curLayerInfo.info) {\r\n nbRecords++;\r\n const subCatIdx = layerCategory.childCategories?.findIndex((testCategory: PropertyCategory) => {\r\n return testCategory.name === subLayerInfo.subLayerName;\r\n });\r\n let subLayerCategory;\r\n if (subCatIdx === -1) {\r\n subLayerCategory = {name:subLayerInfo.subLayerName, label:subLayerInfo.subLayerName, expand:true};\r\n this.addSubCategory(subLayerCategory.name);\r\n layerCategory.childCategories?.push(subLayerCategory);\r\n }\r\n if (subLayerInfo.records) {\r\n for (const record of subLayerInfo.records) {\r\n // Always use the string value for now\r\n this.addProperty(record, subLayerInfo.subLayerName);\r\n\r\n }\r\n }\r\n }\r\n }\r\n if (layerCatIdx === -1 && nbRecords>0)\r\n this.addCategory(layerCategory);\r\n\r\n recordCount = recordCount + nbRecords;\r\n }\r\n }\r\n }\r\n this.onDataUpdated.raiseEvent({recordCount});\r\n this.onDataChanged.raiseEvent();\r\n }\r\n\r\n public addSubCategory(categoryName: string) {\r\n this.records[categoryName] = [];\r\n }\r\n public addCategory(category: PropertyCategory): number {\r\n const categoryIdx = this.categories.push(category) - 1;\r\n this.records[this.categories[categoryIdx].name] = [];\r\n return categoryIdx;\r\n }\r\n\r\n public findCategoryIndex(category: PropertyCategory): number {\r\n const index = this.categories.findIndex((testCategory: PropertyCategory) => {\r\n return testCategory.name === category.name;\r\n });\r\n return index;\r\n }\r\n public findCategoryIndexByName(name: string): number {\r\n const index = this.categories.findIndex((testCategory: PropertyCategory) => {\r\n return testCategory.name === name;\r\n });\r\n return index;\r\n }\r\n\r\n public addProperty(propertyRecord: PropertyRecord, categoryName: string): void {\r\n const idx = this.records[categoryName].findIndex((prop)=> prop.property.name === propertyRecord.property.name);\r\n if (idx === -1) {\r\n this.records[categoryName].push(propertyRecord);\r\n } else {\r\n this.records[categoryName][idx].isMerged = true;\r\n this.records[categoryName][idx].isReadonly = true;\r\n }\r\n }\r\n\r\n public removeProperty(propertyRecord: PropertyRecord, categoryIdx: number): boolean {\r\n const index = this.records[this.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\r\n return record === propertyRecord;\r\n });\r\n\r\n let result = false;\r\n\r\n if (index >= 0) {\r\n this.records[this.categories[categoryIdx].name].splice(index, 1);\r\n this.onDataChanged.raiseEvent();\r\n result = true;\r\n }\r\n return result;\r\n }\r\n\r\n public replaceProperty(propertyRecord: PropertyRecord, categoryIdx: number, newRecord: PropertyRecord): boolean {\r\n const index = this.records[this.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\r\n return record === propertyRecord;\r\n });\r\n\r\n let result = false;\r\n\r\n // istanbul ignore else\r\n if (index >= 0) {\r\n this.records[this.categories[categoryIdx].name].splice(index, 1, newRecord);\r\n result = true;\r\n }\r\n return result;\r\n }\r\n\r\n public async getData(): Promise<PropertyData> {\r\n return this;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureInfoDataProvider.js","sourceRoot":"","sources":["../../../../src/ui/widget/FeatureInfoDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAyD,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACzH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C;;;GAGG;AAEH,MAAM,CAAN,IAAY,uBAAsD;AAAlE,WAAY,uBAAuB;IAAG,uFAAa,CAAA;IAAE,mFAAW,CAAA;AAAC,CAAC,EAAtD,uBAAuB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AK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,MAAsB,EAAE,EAAE;YAC7G,OAAO,MAAM,KAAK,cAAc,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YACxF,MAAM,GAAG,IAAI,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { PropertyRecord } from \"@itwin/appui-abstract\";\nimport { IPropertyDataProvider, PropertyCategory, PropertyData, PropertyDataChangeEvent } from \"@itwin/components-react\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { HitDetail } from \"@itwin/core-frontend\";\nimport { MapHitEvent } from \"../Interfaces\";\n\n/**\n * Implementation of [IPropertyDataProvider] that uses an associative array.\n * @public\n */\n\nexport enum MapFeatureInfoLoadState { DataLoadStart, DataLoadEnd }\nexport declare type MapFeatureInfoLoadListener = (state: MapFeatureInfoLoadState) => void;\n\nexport interface MapFeatureInfoDataUpdate {\n recordCount: number;\n}\nexport declare type MapFeatureInfoDataUpdatedListener = (data: MapFeatureInfoDataUpdate) => void;\n\nclass SimplePropertyData implements PropertyData {\n public label: PropertyRecord = PropertyRecord.fromString(\"\");\n public description?: string;\n public categories: PropertyCategory[] = [];\n public records: { [categoryName: string]: PropertyRecord[] } = {};\n}\n\nexport class FeatureInfoDataProvider implements IPropertyDataProvider {\n private _removeListener: () => void;\n public onDataChanged = new PropertyDataChangeEvent();\n public onDataLoadStateChanged = new BeEvent<MapFeatureInfoLoadListener>();\n public onDataUpdated = new BeEvent<MapFeatureInfoDataUpdatedListener>();\n private _data = new SimplePropertyData();\n constructor(onMapHit: MapHitEvent) {\n this._removeListener = onMapHit.addListener(this._handleMapHit, this);\n }\n\n public onUnload() {\n this._removeListener();\n }\n\n private async _handleMapHit(mapHit: HitDetail) {\n this._data = new SimplePropertyData();\n\n let recordCount = 0;\n if (mapHit?.isMapHit) {\n this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadStart);\n const mapInfo = await mapHit.viewport.getMapFeatureInfo(mapHit);\n this.onDataLoadStateChanged.raiseEvent(MapFeatureInfoLoadState.DataLoadEnd);\n if (mapInfo.layerInfo !== undefined) {\n for (const curLayerInfo of mapInfo.layerInfo) {\n const layerCatIdx = this.findCategoryIndexByName(curLayerInfo.layerName);\n let nbRecords = 0;\n const layerCategory = (\n layerCatIdx === -1 ?\n { name: curLayerInfo.layerName, label: curLayerInfo.layerName, expand: true, childCategories: [] }\n : this._data.categories[layerCatIdx]);\n\n if (curLayerInfo.info && !(curLayerInfo.info instanceof HTMLElement)) {\n // This is not an HTMLElement, so iterate over each sub-layer info\n for (const subLayerInfo of curLayerInfo.info) {\n nbRecords++;\n const subCatIdx = layerCategory.childCategories?.findIndex((testCategory: PropertyCategory) => {\n return testCategory.name === subLayerInfo.subLayerName;\n });\n let subLayerCategory;\n if (subCatIdx === -1) {\n subLayerCategory = { name: subLayerInfo.subLayerName, label: subLayerInfo.subLayerName, expand: true };\n this.addSubCategory(subLayerCategory.name);\n layerCategory.childCategories?.push(subLayerCategory);\n }\n if (subLayerInfo.records) {\n for (const record of subLayerInfo.records) {\n // Always use the string value for now\n this.addProperty(record, subLayerInfo.subLayerName);\n\n }\n }\n }\n }\n if (layerCatIdx === -1 && nbRecords > 0)\n this.addCategory(layerCategory);\n\n recordCount = recordCount + nbRecords;\n }\n }\n }\n this.onDataUpdated.raiseEvent({ recordCount });\n this.onDataChanged.raiseEvent();\n }\n\n public addSubCategory(categoryName: string) {\n this._data.records[categoryName] = [];\n }\n public addCategory(category: PropertyCategory): number {\n\n const categoryIdx = this._data.categories.push(category) - 1;\n this._data.records[this._data.categories[categoryIdx].name] = [];\n return categoryIdx;\n }\n\n public findCategoryIndex(category: PropertyCategory): number {\n const index = this._data.categories.findIndex((testCategory: PropertyCategory) => {\n return testCategory.name === category.name;\n });\n return index;\n }\n public findCategoryIndexByName(name: string): number {\n const index = this._data.categories.findIndex((testCategory: PropertyCategory) => {\n return testCategory.name === name;\n });\n return index;\n }\n\n public addProperty(propertyRecord: PropertyRecord, categoryName: string): void {\n const idx = this._data.records[categoryName].findIndex((prop) => prop.property.name === propertyRecord.property.name);\n if (idx === -1) {\n this._data.records[categoryName].push(propertyRecord);\n } else {\n this._data.records[categoryName][idx].isMerged = true;\n this._data.records[categoryName][idx].isReadonly = true;\n }\n }\n\n public removeProperty(propertyRecord: PropertyRecord, categoryIdx: number): boolean {\n const index = this._data.records[this._data.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\n return record === propertyRecord;\n });\n\n let result = false;\n\n if (index >= 0) {\n this._data.records[this._data.categories[categoryIdx].name].splice(index, 1);\n this.onDataChanged.raiseEvent();\n result = true;\n }\n return result;\n }\n\n public replaceProperty(propertyRecord: PropertyRecord, categoryIdx: number, newRecord: PropertyRecord): boolean {\n const index = this._data.records[this._data.categories[categoryIdx].name].findIndex((record: PropertyRecord) => {\n return record === propertyRecord;\n });\n\n let result = false;\n\n if (index >= 0) {\n this._data.records[this._data.categories[categoryIdx].name].splice(index, 1, newRecord);\n result = true;\n }\n return result;\n }\n\n public async getData(): Promise<PropertyData> {\n return this._data;\n }\n}\n"]}
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
- import { MapFeatureInfoOptions } from "../Interfaces";
3
- interface MapFeatureInfoWidgetProps {
4
- featureInfoOpts: MapFeatureInfoOptions;
5
- }
6
- export declare function MapFeatureInfoWidget({ featureInfoOpts }: MapFeatureInfoWidgetProps): JSX.Element;
7
- export {};
1
+ import { MapFeatureInfoOptions } from "../Interfaces";
2
+ interface MapFeatureInfoWidgetProps {
3
+ featureInfoOpts: MapFeatureInfoOptions;
4
+ }
5
+ export declare function MapFeatureInfoWidget({ featureInfoOpts }: MapFeatureInfoWidgetProps): JSX.Element;
6
+ export {};
8
7
  //# sourceMappingURL=FeatureInfoWidget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureInfoWidget.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/FeatureInfoWidget.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,UAAU,yBAAyB;IACjC,eAAe,EAAE,qBAAqB,CAAC;CACxC;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,eAAe,EAAE,EAAE,yBAAyB,eAsDlF"}
1
+ {"version":3,"file":"FeatureInfoWidget.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/FeatureInfoWidget.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,UAAU,yBAAyB;IACjC,eAAe,EAAE,qBAAqB,CAAC;CACxC;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,eAAe,EAAE,EAAE,yBAAyB,eAoElF"}
@@ -1,68 +1,73 @@
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 * as React from "react";
6
- import { PropertyGrid } from "@itwin/components-react";
7
- import { FillCentered, Orientation } from "@itwin/core-react";
8
- import { FeatureInfoDataProvider, MapFeatureInfoLoadState } from "./FeatureInfoDataProvider";
9
- import { ProgressRadial } from "@itwin/itwinui-react";
10
- import { MapLayersUI } from "../../mapLayers";
11
- // eslint-disable-next-line @typescript-eslint/naming-convention
12
- export function MapFeatureInfoWidget({ featureInfoOpts }) {
13
- var _a;
14
- const dataProvider = React.useRef();
15
- const [loadingData, setLoadingData] = React.useState(false);
16
- const [hasData, setHasData] = React.useState(false);
17
- const [noRecordsMessage] = React.useState(MapLayersUI.localization.getLocalizedString("mapLayers:FeatureInfoWidget.NoRecords"));
18
- const handleLoadStateChange = (state) => {
19
- setLoadingData(state === MapFeatureInfoLoadState.DataLoadStart);
20
- };
21
- const handleDataUpdated = (state) => {
22
- setHasData(state.recordCount !== 0);
23
- };
24
- React.useEffect(() => {
25
- if (featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.onMapHit) {
26
- dataProvider.current = new FeatureInfoDataProvider(featureInfoOpts.onMapHit);
27
- }
28
- return () => {
29
- var _a;
30
- (_a = dataProvider === null || dataProvider === void 0 ? void 0 : dataProvider.current) === null || _a === void 0 ? void 0 : _a.onUnload();
31
- };
32
- }, [featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.onMapHit]);
33
- React.useEffect(() => {
34
- var _a;
35
- (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataUpdated.addListener(handleDataUpdated);
36
- return () => {
37
- var _a;
38
- (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataUpdated.removeListener(handleDataUpdated);
39
- };
40
- }, []);
41
- React.useEffect(() => {
42
- var _a;
43
- if (featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.showLoadProgressAnimation) {
44
- (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataLoadStateChanged.addListener(handleLoadStateChange);
45
- return () => {
46
- var _a;
47
- (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataLoadStateChanged.removeListener(handleLoadStateChange);
48
- };
49
- }
50
- return;
51
- }, [featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.showLoadProgressAnimation]);
52
- if (loadingData) {
53
- return (React.createElement(FillCentered, null,
54
- React.createElement(ProgressRadial, { indeterminate: true })));
55
- }
56
- else if (!hasData) {
57
- return (React.createElement(FillCentered, null,
58
- React.createElement("span", null,
59
- React.createElement("i", null, noRecordsMessage))));
60
- }
61
- else {
62
- if (dataProvider.current)
63
- return (React.createElement(PropertyGrid, { dataProvider: dataProvider.current, orientation: Orientation.Vertical, isPropertySelectionEnabled: (_a = featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.propertyGridOptions) === null || _a === void 0 ? void 0 : _a.isPropertySelectionEnabled }));
64
- else
65
- return (React.createElement(React.Fragment, null));
66
- }
67
- }
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 * as React from "react";
6
+ import { VirtualizedPropertyGridWithDataProvider } from "@itwin/components-react";
7
+ import { FillCentered, Orientation, ResizableContainerObserver } from "@itwin/core-react";
8
+ import { FeatureInfoDataProvider, MapFeatureInfoLoadState } from "./FeatureInfoDataProvider";
9
+ import { ProgressRadial } from "@itwin/itwinui-react";
10
+ import { MapLayersUI } from "../../mapLayers";
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
12
+ export function MapFeatureInfoWidget({ featureInfoOpts }) {
13
+ var _a;
14
+ const dataProvider = React.useRef();
15
+ const [loadingData, setLoadingData] = React.useState(false);
16
+ const [hasData, setHasData] = React.useState(false);
17
+ const [noRecordsMessage] = React.useState(MapLayersUI.localization.getLocalizedString("mapLayers:FeatureInfoWidget.NoRecords"));
18
+ const [{ width, height }, setSize] = React.useState({ width: 0, height: 0 });
19
+ const handleLoadStateChange = (state) => {
20
+ setLoadingData(state === MapFeatureInfoLoadState.DataLoadStart);
21
+ };
22
+ const handleDataUpdated = (state) => {
23
+ setHasData(state.recordCount !== 0);
24
+ };
25
+ React.useEffect(() => {
26
+ if (featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.onMapHit) {
27
+ dataProvider.current = new FeatureInfoDataProvider(featureInfoOpts.onMapHit);
28
+ }
29
+ return () => {
30
+ var _a;
31
+ (_a = dataProvider === null || dataProvider === void 0 ? void 0 : dataProvider.current) === null || _a === void 0 ? void 0 : _a.onUnload();
32
+ };
33
+ }, [featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.onMapHit]);
34
+ React.useEffect(() => {
35
+ var _a;
36
+ (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataUpdated.addListener(handleDataUpdated);
37
+ return () => {
38
+ var _a;
39
+ (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataUpdated.removeListener(handleDataUpdated);
40
+ };
41
+ }, []);
42
+ React.useEffect(() => {
43
+ var _a;
44
+ if (featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.showLoadProgressAnimation) {
45
+ (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataLoadStateChanged.addListener(handleLoadStateChange);
46
+ return () => {
47
+ var _a;
48
+ (_a = dataProvider.current) === null || _a === void 0 ? void 0 : _a.onDataLoadStateChanged.removeListener(handleLoadStateChange);
49
+ };
50
+ }
51
+ return;
52
+ }, [featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.showLoadProgressAnimation]);
53
+ const handleResize = React.useCallback((w, h) => {
54
+ setSize({ width: w, height: h });
55
+ }, []);
56
+ if (loadingData) {
57
+ return (React.createElement(FillCentered, null,
58
+ React.createElement(ProgressRadial, { indeterminate: true })));
59
+ }
60
+ else if (!hasData) {
61
+ return (React.createElement(FillCentered, null,
62
+ React.createElement("span", null,
63
+ React.createElement("i", null, noRecordsMessage))));
64
+ }
65
+ else {
66
+ if (dataProvider.current)
67
+ return (React.createElement(ResizableContainerObserver, { onResize: handleResize },
68
+ React.createElement(VirtualizedPropertyGridWithDataProvider, { width: width, height: height, dataProvider: dataProvider.current, orientation: Orientation.Vertical, isPropertySelectionEnabled: (_a = featureInfoOpts === null || featureInfoOpts === void 0 ? void 0 : featureInfoOpts.propertyGridOptions) === null || _a === void 0 ? void 0 : _a.isPropertySelectionEnabled })));
69
+ else
70
+ return (React.createElement(React.Fragment, null));
71
+ }
72
+ }
68
73
  //# sourceMappingURL=FeatureInfoWidget.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureInfoWidget.js","sourceRoot":"","sources":["../../../../src/ui/widget/FeatureInfoWidget.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAA4B,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C,gEAAgE;AAChE,MAAM,UAAU,oBAAoB,CAAC,EAAE,eAAe,EAA6B;;IAEjF,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,EAA2B,CAAC;IAC7D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC7D,MAAM,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,uCAAuC,CAAC,CAAC,CAAC;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Ac,CAAC,qBAAqB,CAAC,CAAC;YACrF,CAAC,CAAC;SACH;QACD,OAAO;IAET,CAAC,EAAE,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,yBAAyB,CAAC,CAAC,CAAC;IAEjD,IAAI,WAAW,EAAE;QACf,OAAO,CAAC,oBAAC,YAAY;YAAC,oBAAC,cAAc,IAAC,aAAa,EAAE,IAAI,GAAmB,CAAe,CAAC,CAAC;KAC9F;SAAM,IAAI,CAAC,OAAO,EAAE;QACnB,OAAO,CAAC,oBAAC,YAAY;YAAC;gBAAM,+BAAI,gBAAgB,CAAK,CAAO,CAAe,CAAC,CAAC;KAC9E;SAAM;QACL,IAAI,YAAY,CAAC,OAAO;YACtB,OAAO,CAAC,oBAAC,YAAY,IAAC,YAAY,EAAE,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,QAAQ,EACzF,0BAA0B,EAAE,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,mBAAmB,0CAAE,0BAA0B,GAAI,CAAC,CAAC;;YAEpG,OAAO,CAAC,yCAAK,CAAC,CAAC;KAClB;AACH,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\nimport * as React from \"react\";\r\n\r\nimport { PropertyGrid } from \"@itwin/components-react\";\r\nimport { FillCentered, Orientation } from \"@itwin/core-react\";\r\n\r\nimport { FeatureInfoDataProvider, MapFeatureInfoDataUpdate, MapFeatureInfoLoadState } from \"./FeatureInfoDataProvider\";\r\nimport { ProgressRadial } from \"@itwin/itwinui-react\";\r\nimport { MapFeatureInfoOptions } from \"../Interfaces\";\r\nimport { MapLayersUI } from \"../../mapLayers\";\r\n\r\ninterface MapFeatureInfoWidgetProps {\r\n featureInfoOpts: MapFeatureInfoOptions;\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function MapFeatureInfoWidget({ featureInfoOpts }: MapFeatureInfoWidgetProps) {\r\n\r\n const dataProvider = React.useRef<FeatureInfoDataProvider>();\r\n const [loadingData, setLoadingData] = React.useState<boolean>(false);\r\n const [hasData, setHasData] = React.useState<boolean>(false);\r\n const [noRecordsMessage] = React.useState(MapLayersUI.localization.getLocalizedString(\"mapLayers:FeatureInfoWidget.NoRecords\"));\r\n\r\n const handleLoadStateChange = (state: MapFeatureInfoLoadState) => {\r\n setLoadingData(state === MapFeatureInfoLoadState.DataLoadStart);\r\n };\r\n const handleDataUpdated = (state: MapFeatureInfoDataUpdate) => {\r\n setHasData(state.recordCount !== 0);\r\n };\r\n\r\n React.useEffect(() => {\r\n if (featureInfoOpts?.onMapHit) {\r\n dataProvider.current = new FeatureInfoDataProvider(featureInfoOpts.onMapHit);\r\n }\r\n return () => {\r\n dataProvider?.current?.onUnload();\r\n };\r\n }, [featureInfoOpts?.onMapHit]);\r\n\r\n React.useEffect(() => {\r\n\r\n dataProvider.current?.onDataUpdated.addListener(handleDataUpdated);\r\n return () => {\r\n dataProvider.current?.onDataUpdated.removeListener(handleDataUpdated);\r\n };\r\n\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (featureInfoOpts?.showLoadProgressAnimation) {\r\n dataProvider.current?.onDataLoadStateChanged.addListener(handleLoadStateChange);\r\n return () => {\r\n dataProvider.current?.onDataLoadStateChanged.removeListener(handleLoadStateChange);\r\n };\r\n }\r\n return;\r\n\r\n }, [featureInfoOpts?.showLoadProgressAnimation]);\r\n\r\n if (loadingData) {\r\n return (<FillCentered><ProgressRadial indeterminate={true}></ProgressRadial></FillCentered>);\r\n } else if (!hasData) {\r\n return (<FillCentered><span><i>{noRecordsMessage}</i></span></FillCentered>);\r\n } else {\r\n if (dataProvider.current)\r\n return (<PropertyGrid dataProvider={dataProvider.current} orientation={Orientation.Vertical} // eslint-disable-line deprecation/deprecation\r\n isPropertySelectionEnabled={featureInfoOpts?.propertyGridOptions?.isPropertySelectionEnabled} />);\r\n else\r\n return (<></>);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureInfoWidget.js","sourceRoot":"","sources":["../../../../src/ui/widget/FeatureInfoWidget.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,uCAAuC,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE1F,OAAO,EAAE,uBAAuB,EAA4B,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C,gEAAgE;AAChE,MAAM,UAAU,oBAAoB,CAAC,EAAE,eAAe,EAA6B;;IAEjF,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,EAA2B,CAAC;IAC7D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC7D,MAAM,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,uCAAuC,CAAC,CAAC,CAAC;IAEhI,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAE7E,MAAM,qBAAqB,GAAG,CAAC,KAA8B,EAAE,EAAE;QAC/D,cAAc,CAAC,KAAK,KAAK,uBAAuB,CAAC,aAAa,C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BAAf,eAAe,CAAE,yBAAyB,CAAC,CAAC,CAAC;IAEjD,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE;QAC9D,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,WAAW,EAAE;QACf,OAAO,CAAC,oBAAC,YAAY;YAAC,oBAAC,cAAc,IAAC,aAAa,EAAE,IAAI,GAAmB,CAAe,CAAC,CAAC;KAC9F;SAAM,IAAI,CAAC,OAAO,EAAE;QACnB,OAAO,CAAC,oBAAC,YAAY;YAAC;gBAAM,+BAAI,gBAAgB,CAAK,CAAO,CAAe,CAAC,CAAC;KAC9E;SAAM;QACL,IAAI,YAAY,CAAC,OAAO;YACtB,OAAO,CACL,oBAAC,0BAA0B,IAAC,QAAQ,EAAE,YAAY;gBAChD,oBAAC,uCAAuC,IACtC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,CAAC,OAAO,EAClC,WAAW,EAAE,WAAW,CAAC,QAAQ,EACjC,0BAA0B,EAAE,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,mBAAmB,0CAAE,0BAA0B,GAAI,CACvE,CAC9B,CAAC;;YAEF,OAAO,CAAC,yCAAK,CAAC,CAAC;KAClB;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport * as React from \"react\";\n\nimport { VirtualizedPropertyGridWithDataProvider } from \"@itwin/components-react\";\nimport { FillCentered, Orientation, ResizableContainerObserver } from \"@itwin/core-react\";\n\nimport { FeatureInfoDataProvider, MapFeatureInfoDataUpdate, MapFeatureInfoLoadState } from \"./FeatureInfoDataProvider\";\nimport { ProgressRadial } from \"@itwin/itwinui-react\";\nimport { MapFeatureInfoOptions } from \"../Interfaces\";\nimport { MapLayersUI } from \"../../mapLayers\";\n\ninterface MapFeatureInfoWidgetProps {\n featureInfoOpts: MapFeatureInfoOptions;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function MapFeatureInfoWidget({ featureInfoOpts }: MapFeatureInfoWidgetProps) {\n\n const dataProvider = React.useRef<FeatureInfoDataProvider>();\n const [loadingData, setLoadingData] = React.useState<boolean>(false);\n const [hasData, setHasData] = React.useState<boolean>(false);\n const [noRecordsMessage] = React.useState(MapLayersUI.localization.getLocalizedString(\"mapLayers:FeatureInfoWidget.NoRecords\"));\n\n const [{ width, height }, setSize] = React.useState({ width: 0, height: 0 });\n\n const handleLoadStateChange = (state: MapFeatureInfoLoadState) => {\n setLoadingData(state === MapFeatureInfoLoadState.DataLoadStart);\n };\n const handleDataUpdated = (state: MapFeatureInfoDataUpdate) => {\n setHasData(state.recordCount !== 0);\n };\n\n React.useEffect(() => {\n if (featureInfoOpts?.onMapHit) {\n dataProvider.current = new FeatureInfoDataProvider(featureInfoOpts.onMapHit);\n }\n return () => {\n dataProvider?.current?.onUnload();\n };\n }, [featureInfoOpts?.onMapHit]);\n\n React.useEffect(() => {\n\n dataProvider.current?.onDataUpdated.addListener(handleDataUpdated);\n return () => {\n dataProvider.current?.onDataUpdated.removeListener(handleDataUpdated);\n };\n\n }, []);\n\n React.useEffect(() => {\n if (featureInfoOpts?.showLoadProgressAnimation) {\n dataProvider.current?.onDataLoadStateChanged.addListener(handleLoadStateChange);\n return () => {\n dataProvider.current?.onDataLoadStateChanged.removeListener(handleLoadStateChange);\n };\n }\n return;\n\n }, [featureInfoOpts?.showLoadProgressAnimation]);\n\n const handleResize = React.useCallback((w: number, h: number) => {\n setSize({ width: w, height: h });\n }, []);\n\n if (loadingData) {\n return (<FillCentered><ProgressRadial indeterminate={true}></ProgressRadial></FillCentered>);\n } else if (!hasData) {\n return (<FillCentered><span><i>{noRecordsMessage}</i></span></FillCentered>);\n } else {\n if (dataProvider.current)\n return (\n <ResizableContainerObserver onResize={handleResize}>\n <VirtualizedPropertyGridWithDataProvider\n width={width}\n height={height}\n dataProvider={dataProvider.current}\n orientation={Orientation.Vertical}\n isPropertySelectionEnabled={featureInfoOpts?.propertyGridOptions?.isPropertySelectionEnabled} />\n </ResizableContainerObserver>\n );\n else\n return (<></>);\n }\n}\n"]}
@@ -1,20 +1,19 @@
1
- /// <reference types="react" />
2
- import { ScreenViewport } from "@itwin/core-frontend";
3
- import { MapTypesOptions, StyleMapLayerSettings } from "../Interfaces";
4
- import "./MapLayerManager.scss";
5
- /** @internal */
6
- interface MapLayerDroppableProps {
7
- isOverlay: boolean;
8
- layersList?: StyleMapLayerSettings[];
9
- mapTypesOptions?: MapTypesOptions;
10
- getContainerForClone: () => HTMLElement;
11
- activeViewport: ScreenViewport;
12
- onMenuItemSelected: (action: string, mapLayerSettings: StyleMapLayerSettings) => void;
13
- onItemVisibilityToggleClicked: (mapLayerSettings: StyleMapLayerSettings) => void;
14
- onItemEdited: () => void;
15
- disabled?: boolean;
16
- }
17
- /** @internal */
18
- export declare function MapLayerDroppable(props: MapLayerDroppableProps): JSX.Element;
19
- export {};
1
+ import { ScreenViewport } from "@itwin/core-frontend";
2
+ import { MapTypesOptions, StyleMapLayerSettings } from "../Interfaces";
3
+ import "./MapLayerManager.scss";
4
+ /** @internal */
5
+ interface MapLayerDroppableProps {
6
+ isOverlay: boolean;
7
+ layersList?: StyleMapLayerSettings[];
8
+ mapTypesOptions?: MapTypesOptions;
9
+ getContainerForClone: () => HTMLElement;
10
+ activeViewport: ScreenViewport;
11
+ onMenuItemSelected: (action: string, mapLayerSettings: StyleMapLayerSettings) => void;
12
+ onItemVisibilityToggleClicked: (mapLayerSettings: StyleMapLayerSettings) => void;
13
+ onItemEdited: () => void;
14
+ disabled?: boolean;
15
+ }
16
+ /** @internal */
17
+ export declare function MapLayerDroppable(props: MapLayerDroppableProps): JSX.Element;
18
+ export {};
20
19
  //# sourceMappingURL=MapLayerDroppable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayerDroppable.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/MapLayerDroppable.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAkE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAOtH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGvE,OAAO,wBAAwB,CAAC;AAIhC,gBAAgB;AAChB,UAAU,sBAAsB;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,oBAAoB,EAAE,MAAM,WAAW,CAAC;IACxC,cAAc,EAAE,cAAc,CAAC;IAC/B,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACtF,6BAA6B,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjF,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gBAAgB;AAEhB,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAmH9D"}
1
+ {"version":3,"file":"MapLayerDroppable.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/MapLayerDroppable.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAkE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAOtH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGvE,OAAO,wBAAwB,CAAC;AAIhC,gBAAgB;AAChB,UAAU,sBAAsB;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,eAAe,CAA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