@itwin/map-layers 4.0.0-dev.8 → 5.0.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 (203) 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 +311 -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 +33 -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 +46 -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.d.ts.map +1 -1
  18. package/lib/cjs/ui/Interfaces.js +2 -2
  19. package/lib/cjs/ui/Interfaces.js.map +1 -1
  20. package/lib/cjs/ui/MapFeatureInfoTool.d.ts +13 -13
  21. package/lib/cjs/ui/MapFeatureInfoTool.d.ts.map +1 -1
  22. package/lib/cjs/ui/MapFeatureInfoTool.js +50 -50
  23. package/lib/cjs/ui/MapFeatureInfoTool.js.map +1 -1
  24. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts +8 -8
  25. package/lib/cjs/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  26. package/lib/cjs/ui/MapLayersUiItemsProvider.js +35 -38
  27. package/lib/cjs/ui/MapLayersUiItemsProvider.js.map +1 -1
  28. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts +13 -14
  29. package/lib/cjs/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  30. package/lib/cjs/ui/widget/AttachLayerPopupButton.js +334 -338
  31. package/lib/cjs/ui/widget/AttachLayerPopupButton.js.map +1 -1
  32. package/lib/cjs/ui/widget/BasemapPanel.d.ts +7 -8
  33. package/lib/cjs/ui/widget/BasemapPanel.d.ts.map +1 -1
  34. package/lib/cjs/ui/widget/BasemapPanel.js +151 -156
  35. package/lib/cjs/ui/widget/BasemapPanel.js.map +1 -1
  36. package/lib/cjs/ui/widget/BasemapPanel.scss +87 -87
  37. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts +20 -21
  38. package/lib/cjs/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  39. package/lib/cjs/ui/widget/ConfirmMessageDialog.js +22 -25
  40. package/lib/cjs/ui/widget/ConfirmMessageDialog.js.map +1 -1
  41. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts +35 -40
  42. package/lib/cjs/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
  43. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js +139 -139
  44. package/lib/cjs/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  45. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts +6 -7
  46. package/lib/cjs/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  47. package/lib/cjs/ui/widget/FeatureInfoWidget.js +70 -71
  48. package/lib/cjs/ui/widget/FeatureInfoWidget.js.map +1 -1
  49. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts +18 -19
  50. package/lib/cjs/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  51. package/lib/cjs/ui/widget/MapLayerDroppable.js +85 -88
  52. package/lib/cjs/ui/widget/MapLayerDroppable.js.map +1 -1
  53. package/lib/cjs/ui/widget/MapLayerManager.d.ts +26 -26
  54. package/lib/cjs/ui/widget/MapLayerManager.d.ts.map +1 -1
  55. package/lib/cjs/ui/widget/MapLayerManager.js +399 -403
  56. package/lib/cjs/ui/widget/MapLayerManager.js.map +1 -1
  57. package/lib/cjs/ui/widget/MapLayerManager.scss +409 -409
  58. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts +11 -12
  59. package/lib/cjs/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  60. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js +79 -83
  61. package/lib/cjs/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  62. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts +6 -7
  63. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  64. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js +65 -65
  65. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  66. package/lib/cjs/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  67. package/lib/cjs/ui/widget/MapLayersWidget.d.ts +10 -11
  68. package/lib/cjs/ui/widget/MapLayersWidget.d.ts.map +1 -1
  69. package/lib/cjs/ui/widget/MapLayersWidget.js +31 -31
  70. package/lib/cjs/ui/widget/MapLayersWidget.js.map +1 -1
  71. package/lib/cjs/ui/widget/MapManagerSettings.d.ts +2 -3
  72. package/lib/cjs/ui/widget/MapManagerSettings.d.ts.map +1 -1
  73. package/lib/cjs/ui/widget/MapManagerSettings.js +195 -200
  74. package/lib/cjs/ui/widget/MapManagerSettings.js.map +1 -1
  75. package/lib/cjs/ui/widget/MapManagerSettings.scss +29 -29
  76. package/lib/cjs/ui/widget/MapUrlDialog.d.ts +22 -23
  77. package/lib/cjs/ui/widget/MapUrlDialog.d.ts.map +1 -1
  78. package/lib/cjs/ui/widget/MapUrlDialog.js +528 -527
  79. package/lib/cjs/ui/widget/MapUrlDialog.js.map +1 -1
  80. package/lib/cjs/ui/widget/MapUrlDialog.scss +99 -100
  81. package/lib/cjs/ui/widget/SelectMapFormat.d.ts +17 -18
  82. package/lib/cjs/ui/widget/SelectMapFormat.d.ts.map +1 -1
  83. package/lib/cjs/ui/widget/SelectMapFormat.js +54 -59
  84. package/lib/cjs/ui/widget/SelectMapFormat.js.map +1 -1
  85. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts +18 -20
  86. package/lib/cjs/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  87. package/lib/cjs/ui/widget/SubLayersDataProvider.js +74 -76
  88. package/lib/cjs/ui/widget/SubLayersDataProvider.js.map +1 -1
  89. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts +9 -10
  90. package/lib/cjs/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  91. package/lib/cjs/ui/widget/SubLayersPopupButton.js +40 -40
  92. package/lib/cjs/ui/widget/SubLayersPopupButton.js.map +1 -1
  93. package/lib/cjs/ui/widget/SubLayersTree.d.ts +14 -15
  94. package/lib/cjs/ui/widget/SubLayersTree.d.ts.map +1 -1
  95. package/lib/cjs/ui/widget/SubLayersTree.js +408 -419
  96. package/lib/cjs/ui/widget/SubLayersTree.js.map +1 -1
  97. package/lib/cjs/ui/widget/SubLayersTree.scss +70 -69
  98. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts +13 -14
  99. package/lib/cjs/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  100. package/lib/cjs/ui/widget/TransparencyPopupButton.js +47 -47
  101. package/lib/cjs/ui/widget/TransparencyPopupButton.js.map +1 -1
  102. package/lib/cjs/ui/widget/TransparencyPopupButton.scss +35 -36
  103. package/lib/esm/MapLayerPreferences.d.ts +88 -88
  104. package/lib/esm/MapLayerPreferences.js +307 -308
  105. package/lib/esm/MapLayerPreferences.js.map +1 -1
  106. package/lib/esm/map-layers.d.ts +6 -6
  107. package/lib/esm/map-layers.js +10 -10
  108. package/lib/esm/mapLayers.d.ts +26 -44
  109. package/lib/esm/mapLayers.d.ts.map +1 -1
  110. package/lib/esm/mapLayers.js +29 -59
  111. package/lib/esm/mapLayers.js.map +1 -1
  112. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts +16 -11
  113. package/lib/esm/ui/FeatureInfoUiItemsProvider.d.ts.map +1 -1
  114. package/lib/esm/ui/FeatureInfoUiItemsProvider.js +42 -48
  115. package/lib/esm/ui/FeatureInfoUiItemsProvider.js.map +1 -1
  116. package/lib/esm/ui/Interfaces.d.ts +50 -50
  117. package/lib/esm/ui/Interfaces.d.ts.map +1 -1
  118. package/lib/esm/ui/Interfaces.js +1 -1
  119. package/lib/esm/ui/Interfaces.js.map +1 -1
  120. package/lib/esm/ui/MapFeatureInfoTool.d.ts +13 -13
  121. package/lib/esm/ui/MapFeatureInfoTool.d.ts.map +1 -1
  122. package/lib/esm/ui/MapFeatureInfoTool.js +45 -45
  123. package/lib/esm/ui/MapFeatureInfoTool.js.map +1 -1
  124. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts +8 -8
  125. package/lib/esm/ui/MapLayersUiItemsProvider.d.ts.map +1 -1
  126. package/lib/esm/ui/MapLayersUiItemsProvider.js +31 -34
  127. package/lib/esm/ui/MapLayersUiItemsProvider.js.map +1 -1
  128. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts +13 -14
  129. package/lib/esm/ui/widget/AttachLayerPopupButton.d.ts.map +1 -1
  130. package/lib/esm/ui/widget/AttachLayerPopupButton.js +330 -334
  131. package/lib/esm/ui/widget/AttachLayerPopupButton.js.map +1 -1
  132. package/lib/esm/ui/widget/BasemapPanel.d.ts +7 -8
  133. package/lib/esm/ui/widget/BasemapPanel.d.ts.map +1 -1
  134. package/lib/esm/ui/widget/BasemapPanel.js +147 -152
  135. package/lib/esm/ui/widget/BasemapPanel.js.map +1 -1
  136. package/lib/esm/ui/widget/BasemapPanel.scss +87 -87
  137. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts +20 -21
  138. package/lib/esm/ui/widget/ConfirmMessageDialog.d.ts.map +1 -1
  139. package/lib/esm/ui/widget/ConfirmMessageDialog.js +18 -21
  140. package/lib/esm/ui/widget/ConfirmMessageDialog.js.map +1 -1
  141. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts +35 -40
  142. package/lib/esm/ui/widget/FeatureInfoDataProvider.d.ts.map +1 -1
  143. package/lib/esm/ui/widget/FeatureInfoDataProvider.js +135 -135
  144. package/lib/esm/ui/widget/FeatureInfoDataProvider.js.map +1 -1
  145. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts +6 -7
  146. package/lib/esm/ui/widget/FeatureInfoWidget.d.ts.map +1 -1
  147. package/lib/esm/ui/widget/FeatureInfoWidget.js +66 -67
  148. package/lib/esm/ui/widget/FeatureInfoWidget.js.map +1 -1
  149. package/lib/esm/ui/widget/MapLayerDroppable.d.ts +18 -19
  150. package/lib/esm/ui/widget/MapLayerDroppable.d.ts.map +1 -1
  151. package/lib/esm/ui/widget/MapLayerDroppable.js +81 -84
  152. package/lib/esm/ui/widget/MapLayerDroppable.js.map +1 -1
  153. package/lib/esm/ui/widget/MapLayerManager.d.ts +26 -26
  154. package/lib/esm/ui/widget/MapLayerManager.d.ts.map +1 -1
  155. package/lib/esm/ui/widget/MapLayerManager.js +394 -398
  156. package/lib/esm/ui/widget/MapLayerManager.js.map +1 -1
  157. package/lib/esm/ui/widget/MapLayerManager.scss +409 -409
  158. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts +11 -12
  159. package/lib/esm/ui/widget/MapLayerSettingsMenu.d.ts.map +1 -1
  160. package/lib/esm/ui/widget/MapLayerSettingsMenu.js +75 -79
  161. package/lib/esm/ui/widget/MapLayerSettingsMenu.js.map +1 -1
  162. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts +6 -7
  163. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.d.ts.map +1 -1
  164. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js +61 -61
  165. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.js.map +1 -1
  166. package/lib/esm/ui/widget/MapLayerSettingsPopupButton.scss +20 -20
  167. package/lib/esm/ui/widget/MapLayersWidget.d.ts +10 -11
  168. package/lib/esm/ui/widget/MapLayersWidget.d.ts.map +1 -1
  169. package/lib/esm/ui/widget/MapLayersWidget.js +27 -27
  170. package/lib/esm/ui/widget/MapLayersWidget.js.map +1 -1
  171. package/lib/esm/ui/widget/MapManagerSettings.d.ts +2 -3
  172. package/lib/esm/ui/widget/MapManagerSettings.d.ts.map +1 -1
  173. package/lib/esm/ui/widget/MapManagerSettings.js +191 -196
  174. package/lib/esm/ui/widget/MapManagerSettings.js.map +1 -1
  175. package/lib/esm/ui/widget/MapManagerSettings.scss +29 -29
  176. package/lib/esm/ui/widget/MapUrlDialog.d.ts +22 -23
  177. package/lib/esm/ui/widget/MapUrlDialog.d.ts.map +1 -1
  178. package/lib/esm/ui/widget/MapUrlDialog.js +524 -523
  179. package/lib/esm/ui/widget/MapUrlDialog.js.map +1 -1
  180. package/lib/esm/ui/widget/MapUrlDialog.scss +99 -100
  181. package/lib/esm/ui/widget/SelectMapFormat.d.ts +17 -18
  182. package/lib/esm/ui/widget/SelectMapFormat.d.ts.map +1 -1
  183. package/lib/esm/ui/widget/SelectMapFormat.js +50 -55
  184. package/lib/esm/ui/widget/SelectMapFormat.js.map +1 -1
  185. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts +18 -20
  186. package/lib/esm/ui/widget/SubLayersDataProvider.d.ts.map +1 -1
  187. package/lib/esm/ui/widget/SubLayersDataProvider.js +70 -72
  188. package/lib/esm/ui/widget/SubLayersDataProvider.js.map +1 -1
  189. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts +9 -10
  190. package/lib/esm/ui/widget/SubLayersPopupButton.d.ts.map +1 -1
  191. package/lib/esm/ui/widget/SubLayersPopupButton.js +36 -36
  192. package/lib/esm/ui/widget/SubLayersPopupButton.js.map +1 -1
  193. package/lib/esm/ui/widget/SubLayersTree.d.ts +14 -15
  194. package/lib/esm/ui/widget/SubLayersTree.d.ts.map +1 -1
  195. package/lib/esm/ui/widget/SubLayersTree.js +403 -414
  196. package/lib/esm/ui/widget/SubLayersTree.js.map +1 -1
  197. package/lib/esm/ui/widget/SubLayersTree.scss +70 -69
  198. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts +13 -14
  199. package/lib/esm/ui/widget/TransparencyPopupButton.d.ts.map +1 -1
  200. package/lib/esm/ui/widget/TransparencyPopupButton.js +43 -43
  201. package/lib/esm/ui/widget/TransparencyPopupButton.js.map +1 -1
  202. package/lib/esm/ui/widget/TransparencyPopupButton.scss +35 -36
  203. package/package.json +39 -38
@@ -1,51 +1,51 @@
1
- import { BeEvent } from "@itwin/core-bentley";
2
- import { MapSubLayerProps } from "@itwin/core-common";
3
- import { HitDetail, MapLayerImageryProvider, MapTileTreeScaleRangeVisibility } from "@itwin/core-frontend";
4
- export interface StyleMapLayerSettings {
5
- /** Name */
6
- name: string;
7
- /** source (i.URL for ImageMapLayerSettings or modelId for ModelMapLayerSettings) */
8
- source: string;
9
- /** Controls visibility of layer */
10
- visible: boolean;
11
- treeVisibility: MapTileTreeScaleRangeVisibility;
12
- /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */
13
- transparency: number;
14
- /** Transparent background */
15
- transparentBackground: boolean;
16
- /** set map as underlay or overlay */
17
- isOverlay: boolean;
18
- /** layer index in the viewport */
19
- layerIndex: number;
20
- /** Available map sub-layer */
21
- subLayers?: MapSubLayerProps[];
22
- /** sub-layer panel displayed. */
23
- showSubLayers: boolean;
24
- /** Some format can publish only a single layer at a time (i.e WMTS) */
25
- provider?: MapLayerImageryProvider;
26
- }
27
- export interface MapTypesOptions {
28
- readonly supportTileUrl: boolean;
29
- readonly supportWmsAuthentication: boolean;
30
- }
31
- export interface MapLayerOptions {
32
- hideExternalMapLayers?: boolean;
33
- fetchPublicMapLayerSources?: boolean;
34
- mapTypeOptions?: MapTypesOptions;
35
- }
36
- export interface MapFeatureInfoPropertyGridOptions {
37
- isPropertySelectionEnabled?: boolean;
38
- }
39
- export declare type MapHitEvent = BeEvent<(hit: HitDetail) => void>;
40
- export interface MapFeatureInfoOptions {
41
- /**
42
- * HitDetail Event whenever the map is clicked.
43
- * Typically the HitDetail object is provided by ElementLocateManager.doLocate.
44
- * Every time this event is raised, FeatureInfoWidget will attempt to retrieve data from MapLayerImageryProviders.
45
- */
46
- onMapHit: MapHitEvent;
47
- disableDefaultFeatureInfoTool?: boolean;
48
- showLoadProgressAnimation?: boolean;
49
- propertyGridOptions?: MapFeatureInfoPropertyGridOptions;
50
- }
1
+ import { BeEvent } from "@itwin/core-bentley";
2
+ import { MapSubLayerProps } from "@itwin/core-common";
3
+ import { HitDetail, MapLayerImageryProvider, MapTileTreeScaleRangeVisibility } from "@itwin/core-frontend";
4
+ export interface StyleMapLayerSettings {
5
+ /** Name */
6
+ name: string;
7
+ /** source (i.URL for ImageMapLayerSettings or modelId for ModelMapLayerSettings) */
8
+ source: string;
9
+ /** Controls visibility of layer */
10
+ visible: boolean;
11
+ treeVisibility: MapTileTreeScaleRangeVisibility;
12
+ /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */
13
+ transparency: number;
14
+ /** Transparent background */
15
+ transparentBackground: boolean;
16
+ /** set map as underlay or overlay */
17
+ isOverlay: boolean;
18
+ /** layer index in the viewport */
19
+ layerIndex: number;
20
+ /** Available map sub-layer */
21
+ subLayers?: MapSubLayerProps[];
22
+ /** sub-layer panel displayed. */
23
+ showSubLayers: boolean;
24
+ /** Some format can publish only a single layer at a time (i.e WMTS) */
25
+ provider?: MapLayerImageryProvider;
26
+ }
27
+ export interface MapTypesOptions {
28
+ readonly supportTileUrl: boolean;
29
+ readonly supportWmsAuthentication: boolean;
30
+ }
31
+ export interface MapLayerOptions {
32
+ hideExternalMapLayers?: boolean;
33
+ fetchPublicMapLayerSources?: boolean;
34
+ mapTypeOptions?: MapTypesOptions;
35
+ }
36
+ export interface MapFeatureInfoPropertyGridOptions {
37
+ isPropertySelectionEnabled?: boolean;
38
+ }
39
+ export declare type MapHitEvent = BeEvent<(hit: HitDetail) => void>;
40
+ export interface MapFeatureInfoOptions {
41
+ /**
42
+ * HitDetail Event whenever the map is clicked.
43
+ * Typically the HitDetail object is provided by ElementLocateManager.doLocate.
44
+ * Every time this event is raised, FeatureInfoWidget will attempt to retrieve data from MapLayerImageryProviders.
45
+ */
46
+ onMapHit: MapHitEvent;
47
+ disableDefaultFeatureInfoTool?: boolean;
48
+ showLoadProgressAnimation?: boolean;
49
+ propertyGridOptions?: MapFeatureInfoPropertyGridOptions;
50
+ }
51
51
  //# sourceMappingURL=Interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Interfaces.d.ts","sourceRoot":"","sources":["../../../src/ui/Interfaces.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAG,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAG,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAE5G,MAAM,WAAW,qBAAqB;IACpC,WAAW;IACX,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,+BAA+B,CAAC;IAChD,2MAA2M;IAC3M,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,iCAAiC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,uBAAuB,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;CAC5C;AAED,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,iCAAiC;IAChD,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,oBAAY,WAAW,GAAG,OAAO,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC;IACtB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,iCAAiC,CAAC;CACzD"}
1
+ {"version":3,"file":"Interfaces.d.ts","sourceRoot":"","sources":["../../../src/ui/Interfaces.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAG,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAE3G,MAAM,WAAW,qBAAqB;IACpC,WAAW;IACX,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,+BAA+B,CAAC;IAChD,2MAA2M;IAC3M,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,iCAAiC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,uBAAuB,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;CAC5C;AAED,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,iCAAiC;IAChD,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,oBAAY,WAAW,GAAG,OAAO,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC;IACtB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,iCAAiC,CAAC;CACzD"}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../src/ui/Interfaces.ts"],"names":[],"mappings":"","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 { BeEvent } from \"@itwin/core-bentley\";\r\nimport { MapSubLayerProps } from \"@itwin/core-common\";\r\nimport { HitDetail, MapLayerImageryProvider, MapTileTreeScaleRangeVisibility } from \"@itwin/core-frontend\";\r\n\r\nexport interface StyleMapLayerSettings {\r\n /** Name */\r\n name: string;\r\n /** source (i.URL for ImageMapLayerSettings or modelId for ModelMapLayerSettings) */\r\n source: string;\r\n /** Controls visibility of layer */\r\n visible: boolean;\r\n treeVisibility: MapTileTreeScaleRangeVisibility;\r\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\r\n transparency: number;\r\n /** Transparent background */\r\n transparentBackground: boolean;\r\n /** set map as underlay or overlay */\r\n isOverlay: boolean;\r\n /** layer index in the viewport */\r\n layerIndex: number;\r\n /** Available map sub-layer */\r\n subLayers?: MapSubLayerProps[];\r\n /** sub-layer panel displayed. */\r\n showSubLayers: boolean;\r\n /** Some format can publish only a single layer at a time (i.e WMTS) */\r\n provider?: MapLayerImageryProvider;\r\n}\r\n\r\nexport interface MapTypesOptions {\r\n readonly supportTileUrl: boolean;\r\n readonly supportWmsAuthentication: boolean;\r\n}\r\n\r\nexport interface MapLayerOptions {\r\n hideExternalMapLayers?: boolean;\r\n fetchPublicMapLayerSources?: boolean;\r\n mapTypeOptions?: MapTypesOptions;\r\n}\r\n\r\nexport interface MapFeatureInfoPropertyGridOptions {\r\n isPropertySelectionEnabled?: boolean;\r\n}\r\n\r\nexport type MapHitEvent = BeEvent<(hit: HitDetail) => void>;\r\n\r\nexport interface MapFeatureInfoOptions {\r\n /**\r\n * HitDetail Event whenever the map is clicked.\r\n * Typically the HitDetail object is provided by ElementLocateManager.doLocate.\r\n * Every time this event is raised, FeatureInfoWidget will attempt to retrieve data from MapLayerImageryProviders.\r\n */\r\n onMapHit: MapHitEvent;\r\n disableDefaultFeatureInfoTool?: boolean;\r\n showLoadProgressAnimation?: boolean;\r\n propertyGridOptions?: MapFeatureInfoPropertyGridOptions;\r\n}\r\n"]}
1
+ {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../src/ui/Interfaces.ts"],"names":[],"mappings":"","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 { BeEvent } from \"@itwin/core-bentley\";\nimport { MapSubLayerProps } from \"@itwin/core-common\";\nimport { HitDetail, MapLayerImageryProvider, MapTileTreeScaleRangeVisibility } from \"@itwin/core-frontend\";\n\nexport interface StyleMapLayerSettings {\n /** Name */\n name: string;\n /** source (i.URL for ImageMapLayerSettings or modelId for ModelMapLayerSettings) */\n source: string;\n /** Controls visibility of layer */\n visible: boolean;\n treeVisibility: MapTileTreeScaleRangeVisibility;\n /** A transparency value from 0.0 (fully opaque) to 1.0 (fully transparent) to apply to map graphics when drawing, or false to indicate the transparency should not be overridden. Default value: false. */\n transparency: number;\n /** Transparent background */\n transparentBackground: boolean;\n /** set map as underlay or overlay */\n isOverlay: boolean;\n /** layer index in the viewport */\n layerIndex: number;\n /** Available map sub-layer */\n subLayers?: MapSubLayerProps[];\n /** sub-layer panel displayed. */\n showSubLayers: boolean;\n /** Some format can publish only a single layer at a time (i.e WMTS) */\n provider?: MapLayerImageryProvider;\n}\n\nexport interface MapTypesOptions {\n readonly supportTileUrl: boolean;\n readonly supportWmsAuthentication: boolean;\n}\n\nexport interface MapLayerOptions {\n hideExternalMapLayers?: boolean;\n fetchPublicMapLayerSources?: boolean;\n mapTypeOptions?: MapTypesOptions;\n}\n\nexport interface MapFeatureInfoPropertyGridOptions {\n isPropertySelectionEnabled?: boolean;\n}\n\nexport type MapHitEvent = BeEvent<(hit: HitDetail) => void>;\n\nexport interface MapFeatureInfoOptions {\n /**\n * HitDetail Event whenever the map is clicked.\n * Typically the HitDetail object is provided by ElementLocateManager.doLocate.\n * Every time this event is raised, FeatureInfoWidget will attempt to retrieve data from MapLayerImageryProviders.\n */\n onMapHit: MapHitEvent;\n disableDefaultFeatureInfoTool?: boolean;\n showLoadProgressAnimation?: boolean;\n propertyGridOptions?: MapFeatureInfoPropertyGridOptions;\n}\n"]}
@@ -1,14 +1,14 @@
1
- import { BeButtonEvent, EventHandled, HitDetail, PrimitiveTool } from "@itwin/core-frontend";
2
- import { ToolItemDef } from "@itwin/appui-react";
3
- import { BeEvent } from "@itwin/core-bentley";
4
- export declare const getDefaultMapFeatureInfoToolItemDef: () => ToolItemDef;
5
- export declare class DefaultMapFeatureInfoTool extends PrimitiveTool {
6
- static readonly onMapHit: BeEvent<(hit: HitDetail) => void>;
7
- static toolId: string;
8
- static iconSpec: string;
9
- requireWriteableTarget(): boolean;
10
- onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
11
- onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled>;
12
- onRestartTool(): Promise<void>;
13
- }
1
+ import { BeButtonEvent, EventHandled, HitDetail, PrimitiveTool } from "@itwin/core-frontend";
2
+ import { ToolItemDef } from "@itwin/appui-react";
3
+ import { BeEvent } from "@itwin/core-bentley";
4
+ export declare const getDefaultMapFeatureInfoToolItemDef: () => ToolItemDef;
5
+ export declare class DefaultMapFeatureInfoTool extends PrimitiveTool {
6
+ static readonly onMapHit: BeEvent<(hit: HitDetail) => void>;
7
+ static toolId: string;
8
+ static iconSpec: string;
9
+ requireWriteableTarget(): boolean;
10
+ onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
11
+ onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled>;
12
+ onRestartTool(): Promise<void>;
13
+ }
14
14
  //# sourceMappingURL=MapFeatureInfoTool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapFeatureInfoTool.d.ts","sourceRoot":"","sources":["../../../src/ui/MapFeatureInfoTool.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,SAAS,EAGT,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAqB,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,eAAO,MAAM,mCAAmC,QAAO,WAOnD,CAAC;AAEL,qBAAa,yBAA0B,SAAQ,aAAa;IAC1D,gBAAuB,QAAQ,gBAAqB,SAAS,KAAK,IAAI,EAAI;IAC1E,OAAuB,MAAM,SAAwB;IACrD,OAAuB,QAAQ,SAAc;IAE7B,sBAAsB,IAAI,OAAO;IAI3B,gBAAgB,CACpC,EAAE,EAAE,aAAa,GAChB,OAAO,CAAC,YAAY,CAAC;IAsBF,eAAe,CACnC,GAAG,EAAE,aAAa,GACjB,OAAO,CAAC,YAAY,CAAC;IAMX,aAAa;CAK3B"}
1
+ {"version":3,"file":"MapFeatureInfoTool.d.ts","sourceRoot":"","sources":["../../../src/ui/MapFeatureInfoTool.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,SAAS,EAGT,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAe,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,eAAO,MAAM,mCAAmC,QAAO,WAOnD,CAAC;AAEL,qBAAa,yBAA0B,SAAQ,aAAa;IAC1D,gBAAuB,QAAQ,gBAAqB,SAAS,KAAK,IAAI,EAAI;IAC1E,OAAuB,MAAM,SAAwB;IACrD,OAAuB,QAAQ,SAAc;IAE7B,sBAAsB,IAAI,OAAO;IAI3B,gBAAgB,CACpC,EAAE,EAAE,aAAa,GAChB,OAAO,CAAC,YAAY,CAAC;IAsBF,eAAe,CACnC,GAAG,EAAE,aAAa,GACjB,OAAO,CAAC,YAAY,CAAC;IAMX,aAAa;CAK3B"}
@@ -1,46 +1,46 @@
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 { EventHandled, IModelApp, LocateResponse, PrimitiveTool, } from "@itwin/core-frontend";
6
- import { WidgetState } from "@itwin/appui-abstract";
7
- import { FrontstageManager, ToolItemDef } from "@itwin/appui-react";
8
- import { BeEvent } from "@itwin/core-bentley";
9
- import { FeatureInfoUiItemsProvider } from "./FeatureInfoUiItemsProvider";
10
- export const getDefaultMapFeatureInfoToolItemDef = () => new ToolItemDef({
11
- toolId: DefaultMapFeatureInfoTool.toolId,
12
- iconSpec: DefaultMapFeatureInfoTool.iconSpec,
13
- label: () => DefaultMapFeatureInfoTool.flyover,
14
- description: () => DefaultMapFeatureInfoTool.description,
15
- execute: async () => { await IModelApp.tools.run(DefaultMapFeatureInfoTool.toolId); },
16
- });
17
- export class DefaultMapFeatureInfoTool extends PrimitiveTool {
18
- requireWriteableTarget() {
19
- return false;
20
- }
21
- async onDataButtonDown(ev) {
22
- const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
23
- if (hit !== undefined) {
24
- const widgetDef = FrontstageManager.findWidget(FeatureInfoUiItemsProvider.widgetId);
25
- if (widgetDef && widgetDef.state !== WidgetState.Open) // eslint-disable-line deprecation/deprecation
26
- widgetDef.setWidgetState(WidgetState.Open); // eslint-disable-line deprecation/deprecation
27
- DefaultMapFeatureInfoTool.onMapHit.raiseEvent(hit);
28
- return EventHandled.Yes;
29
- }
30
- return EventHandled.No;
31
- }
32
- async onResetButtonUp(_ev) {
33
- /* Common reset behavior for primitive tools is calling onReinitialize to restart or exitTool to terminate. */
34
- await this.onReinitialize();
35
- return EventHandled.No;
36
- }
37
- async onRestartTool() {
38
- const tool = new DefaultMapFeatureInfoTool();
39
- if (!(await tool.run()))
40
- return this.exitTool();
41
- }
42
- }
43
- DefaultMapFeatureInfoTool.onMapHit = new BeEvent();
44
- DefaultMapFeatureInfoTool.toolId = "MapFeatureInfoTool";
45
- DefaultMapFeatureInfoTool.iconSpec = "icon-map";
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 { EventHandled, IModelApp, LocateResponse, PrimitiveTool, } from "@itwin/core-frontend";
6
+ import { WidgetState } from "@itwin/appui-abstract";
7
+ import { ToolItemDef, UiFramework } from "@itwin/appui-react";
8
+ import { BeEvent } from "@itwin/core-bentley";
9
+ import { FeatureInfoUiItemsProvider } from "./FeatureInfoUiItemsProvider";
10
+ export const getDefaultMapFeatureInfoToolItemDef = () => new ToolItemDef({
11
+ toolId: DefaultMapFeatureInfoTool.toolId,
12
+ iconSpec: DefaultMapFeatureInfoTool.iconSpec,
13
+ label: () => DefaultMapFeatureInfoTool.flyover,
14
+ description: () => DefaultMapFeatureInfoTool.description,
15
+ execute: async () => { await IModelApp.tools.run(DefaultMapFeatureInfoTool.toolId); },
16
+ });
17
+ export class DefaultMapFeatureInfoTool extends PrimitiveTool {
18
+ requireWriteableTarget() {
19
+ return false;
20
+ }
21
+ async onDataButtonDown(ev) {
22
+ const hit = await IModelApp.locateManager.doLocate(new LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
23
+ if (hit !== undefined) {
24
+ const widgetDef = UiFramework.frontstages.findWidget(FeatureInfoUiItemsProvider.widgetId);
25
+ if (widgetDef && widgetDef.state !== WidgetState.Open) // eslint-disable-line deprecation/deprecation
26
+ widgetDef.setWidgetState(WidgetState.Open); // eslint-disable-line deprecation/deprecation
27
+ DefaultMapFeatureInfoTool.onMapHit.raiseEvent(hit);
28
+ return EventHandled.Yes;
29
+ }
30
+ return EventHandled.No;
31
+ }
32
+ async onResetButtonUp(_ev) {
33
+ /* Common reset behavior for primitive tools is calling onReinitialize to restart or exitTool to terminate. */
34
+ await this.onReinitialize();
35
+ return EventHandled.No;
36
+ }
37
+ async onRestartTool() {
38
+ const tool = new DefaultMapFeatureInfoTool();
39
+ if (!(await tool.run()))
40
+ return this.exitTool();
41
+ }
42
+ }
43
+ DefaultMapFeatureInfoTool.onMapHit = new BeEvent();
44
+ DefaultMapFeatureInfoTool.toolId = "MapFeatureInfoTool";
45
+ DefaultMapFeatureInfoTool.iconSpec = "icon-map";
46
46
  //# sourceMappingURL=MapFeatureInfoTool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapFeatureInfoTool.js","sourceRoot":"","sources":["../../../src/ui/MapFeatureInfoTool.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAEL,YAAY,EAEZ,SAAS,EACT,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAgB,EAAE,CACnE,IAAI,WAAW,CAAC;IACd,MAAM,EAAE,yBAAyB,CAAC,MAAM;IACxC,QAAQ,EAAE,yBAAyB,CAAC,QAAQ;IAC5C,KAAK,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,OAAO;IAC9C,WAAW,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,WAAW;IACxD,OAAO,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACtF,CAAC,CAAC;AAEL,MAAM,OAAO,yBAA0B,SAAQ,aAAa;IAK1C,sBAAsB;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAEe,KAAK,CAAC,gBAAgB,CACpC,EAAiB;QAEjB,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,aAAa,CAAC,QAAQ,CAChD,IAAI,cAAc,EAAE,EACpB,IAAI,EACJ,EAAE,CAAC,KAAK,EACR,EAAE,CAAC,QAAQ,EACX,EAAE,CAAC,WAAW,CACf,CAAC;QACF,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,MAAM,SAAS,GAAG,iBAAiB,CAAC,UAAU,CAC5C,0BAA0B,CAAC,QAAQ,CACpC,CAAC;YACF,IAAI,SAAS,IAAI,SAAS,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE,8CAA8C;gBACnG,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,8CAA8C;YAE5F,yBAAyB,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACnD,OAAO,YAAY,CAAC,GAAG,CAAC;SACzB;QAED,OAAO,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAEe,KAAK,CAAC,eAAe,CACnC,GAAkB;QAElB,8GAA8G;QAC9G,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,aAAa;QACxB,MAAM,IAAI,GAAG,IAAI,yBAAyB,EAAE,CAAC;QAC7C,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;;AA5CsB,kCAAQ,GAAG,IAAI,OAAO,EAA4B,CAAC;AACnD,gCAAM,GAAG,oBAAoB,CAAC;AAC9B,kCAAQ,GAAG,UAAU,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\r\nimport {\r\n BeButtonEvent,\r\n EventHandled,\r\n HitDetail,\r\n IModelApp,\r\n LocateResponse,\r\n PrimitiveTool,\r\n} from \"@itwin/core-frontend\";\r\nimport { WidgetState } from \"@itwin/appui-abstract\";\r\nimport { FrontstageManager, ToolItemDef } from \"@itwin/appui-react\";\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { FeatureInfoUiItemsProvider } from \"./FeatureInfoUiItemsProvider\";\r\n\r\nexport const getDefaultMapFeatureInfoToolItemDef = (): ToolItemDef =>\r\n new ToolItemDef({\r\n toolId: DefaultMapFeatureInfoTool.toolId,\r\n iconSpec: DefaultMapFeatureInfoTool.iconSpec,\r\n label: () => DefaultMapFeatureInfoTool.flyover,\r\n description: () => DefaultMapFeatureInfoTool.description,\r\n execute: async () => { await IModelApp.tools.run(DefaultMapFeatureInfoTool.toolId); },\r\n });\r\n\r\nexport class DefaultMapFeatureInfoTool extends PrimitiveTool {\r\n public static readonly onMapHit = new BeEvent<(hit: HitDetail) => void>();\r\n public static override toolId = \"MapFeatureInfoTool\";\r\n public static override iconSpec = \"icon-map\";\r\n\r\n public override requireWriteableTarget(): boolean {\r\n return false;\r\n }\r\n\r\n public override async onDataButtonDown(\r\n ev: BeButtonEvent\r\n ): Promise<EventHandled> {\r\n const hit = await IModelApp.locateManager.doLocate(\r\n new LocateResponse(),\r\n true,\r\n ev.point,\r\n ev.viewport,\r\n ev.inputSource\r\n );\r\n if (hit !== undefined) {\r\n const widgetDef = FrontstageManager.findWidget(\r\n FeatureInfoUiItemsProvider.widgetId\r\n );\r\n if (widgetDef && widgetDef.state !== WidgetState.Open) // eslint-disable-line deprecation/deprecation\r\n widgetDef.setWidgetState(WidgetState.Open); // eslint-disable-line deprecation/deprecation\r\n\r\n DefaultMapFeatureInfoTool.onMapHit.raiseEvent(hit);\r\n return EventHandled.Yes;\r\n }\r\n\r\n return EventHandled.No;\r\n }\r\n\r\n public override async onResetButtonUp(\r\n _ev: BeButtonEvent\r\n ): Promise<EventHandled> {\r\n /* Common reset behavior for primitive tools is calling onReinitialize to restart or exitTool to terminate. */\r\n await this.onReinitialize();\r\n return EventHandled.No;\r\n }\r\n\r\n public async onRestartTool() {\r\n const tool = new DefaultMapFeatureInfoTool();\r\n if (!(await tool.run()))\r\n return this.exitTool();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MapFeatureInfoTool.js","sourceRoot":"","sources":["../../../src/ui/MapFeatureInfoTool.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAEL,YAAY,EAEZ,SAAS,EACT,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAgB,EAAE,CACnE,IAAI,WAAW,CAAC;IACd,MAAM,EAAE,yBAAyB,CAAC,MAAM;IACxC,QAAQ,EAAE,yBAAyB,CAAC,QAAQ;IAC5C,KAAK,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,OAAO;IAC9C,WAAW,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,WAAW;IACxD,OAAO,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACtF,CAAC,CAAC;AAEL,MAAM,OAAO,yBAA0B,SAAQ,aAAa;IAK1C,sBAAsB;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAEe,KAAK,CAAC,gBAAgB,CACpC,EAAiB;QAEjB,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,aAAa,CAAC,QAAQ,CAChD,IAAI,cAAc,EAAE,EACpB,IAAI,EACJ,EAAE,CAAC,KAAK,EACR,EAAE,CAAC,QAAQ,EACX,EAAE,CAAC,WAAW,CACf,CAAC;QACF,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,CAAC,UAAU,CAClD,0BAA0B,CAAC,QAAQ,CACpC,CAAC;YACF,IAAI,SAAS,IAAI,SAAS,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE,8CAA8C;gBACnG,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,8CAA8C;YAE5F,yBAAyB,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACnD,OAAO,YAAY,CAAC,GAAG,CAAC;SACzB;QAED,OAAO,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAEe,KAAK,CAAC,eAAe,CACnC,GAAkB;QAElB,8GAA8G;QAC9G,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC,EAAE,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,aAAa;QACxB,MAAM,IAAI,GAAG,IAAI,yBAAyB,EAAE,CAAC;QAC7C,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;;AA5CsB,kCAAQ,GAAG,IAAI,OAAO,EAA4B,CAAC;AACnD,gCAAM,GAAG,oBAAoB,CAAC;AAC9B,kCAAQ,GAAG,UAAU,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\nimport {\n BeButtonEvent,\n EventHandled,\n HitDetail,\n IModelApp,\n LocateResponse,\n PrimitiveTool,\n} from \"@itwin/core-frontend\";\nimport { WidgetState } from \"@itwin/appui-abstract\";\nimport { ToolItemDef, UiFramework } from \"@itwin/appui-react\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { FeatureInfoUiItemsProvider } from \"./FeatureInfoUiItemsProvider\";\n\nexport const getDefaultMapFeatureInfoToolItemDef = (): ToolItemDef =>\n new ToolItemDef({\n toolId: DefaultMapFeatureInfoTool.toolId,\n iconSpec: DefaultMapFeatureInfoTool.iconSpec,\n label: () => DefaultMapFeatureInfoTool.flyover,\n description: () => DefaultMapFeatureInfoTool.description,\n execute: async () => { await IModelApp.tools.run(DefaultMapFeatureInfoTool.toolId); },\n });\n\nexport class DefaultMapFeatureInfoTool extends PrimitiveTool {\n public static readonly onMapHit = new BeEvent<(hit: HitDetail) => void>();\n public static override toolId = \"MapFeatureInfoTool\";\n public static override iconSpec = \"icon-map\";\n\n public override requireWriteableTarget(): boolean {\n return false;\n }\n\n public override async onDataButtonDown(\n ev: BeButtonEvent\n ): Promise<EventHandled> {\n const hit = await IModelApp.locateManager.doLocate(\n new LocateResponse(),\n true,\n ev.point,\n ev.viewport,\n ev.inputSource\n );\n if (hit !== undefined) {\n const widgetDef = UiFramework.frontstages.findWidget(\n FeatureInfoUiItemsProvider.widgetId\n );\n if (widgetDef && widgetDef.state !== WidgetState.Open) // eslint-disable-line deprecation/deprecation\n widgetDef.setWidgetState(WidgetState.Open); // eslint-disable-line deprecation/deprecation\n\n DefaultMapFeatureInfoTool.onMapHit.raiseEvent(hit);\n return EventHandled.Yes;\n }\n\n return EventHandled.No;\n }\n\n public override async onResetButtonUp(\n _ev: BeButtonEvent\n ): Promise<EventHandled> {\n /* Common reset behavior for primitive tools is calling onReinitialize to restart or exitTool to terminate. */\n await this.onReinitialize();\n return EventHandled.No;\n }\n\n public async onRestartTool() {\n const tool = new DefaultMapFeatureInfoTool();\n if (!(await tool.run()))\n return this.exitTool();\n }\n}\n"]}
@@ -1,9 +1,9 @@
1
- import { AbstractWidgetProps, AbstractZoneLocation, StagePanelLocation, StagePanelSection, UiItemsProvider } from "@itwin/appui-abstract";
2
- import { MapLayerOptions } from "./Interfaces";
3
- export declare class MapLayersUiItemsProvider implements UiItemsProvider {
4
- readonly id = "MapLayersUiItemsProvider";
5
- private _mapLayerOptions?;
6
- constructor(mapLayerOptions?: MapLayerOptions);
7
- provideWidgets(_stageId: string, stageUsage: string, location: StagePanelLocation, section: StagePanelSection | undefined, zoneLocation?: AbstractZoneLocation): ReadonlyArray<AbstractWidgetProps>;
8
- }
1
+ import { StagePanelLocation, StagePanelSection, UiItemsProvider, Widget } from "@itwin/appui-react";
2
+ import { MapLayerOptions } from "./Interfaces";
3
+ export declare class MapLayersUiItemsProvider implements UiItemsProvider {
4
+ readonly id = "MapLayersUiItemsProvider";
5
+ private _mapLayerOptions?;
6
+ constructor(mapLayerOptions?: MapLayerOptions);
7
+ provideWidgets(_stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection): Widget[];
8
+ }
9
9
  //# sourceMappingURL=MapLayersUiItemsProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayersUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../src/ui/MapLayersUiItemsProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAc,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGtJ,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,qBAAa,wBAAyB,YAAW,eAAe;IAC9D,SAAgB,EAAE,8BAA8B;IAChD,OAAO,CAAC,gBAAgB,CAAC,CAAkB;gBAExB,eAAe,CAAC,EAAE,eAAe;IAS7C,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,iBAAiB,GAAG,SAAS,EAAE,YAAY,CAAC,EAAE,oBAAoB,GAAG,aAAa,CAAC,mBAAmB,CAAC;CAgB3M"}
1
+ {"version":3,"file":"MapLayersUiItemsProvider.d.ts","sourceRoot":"","sources":["../../../src/ui/MapLayersUiItemsProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAc,eAAe,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEhH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,qBAAa,wBAAyB,YAAW,eAAe;IAC9D,SAAgB,EAAE,8BAA8B;IAChD,OAAO,CAAC,gBAAgB,CAAC,CAAkB;gBAExB,eAAe,CAAC,EAAE,eAAe;IAQ7C,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,iBAAiB;CAatH"}
@@ -1,35 +1,32 @@
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 { AbstractZoneLocation, StagePanelLocation, StagePanelSection, StageUsage } from "@itwin/appui-abstract";
7
- import { MapLayersWidget } from "./widget/MapLayersWidget";
8
- import { UiFramework } from "@itwin/appui-react";
9
- import { MapLayersUI } from "../mapLayers";
10
- export class MapLayersUiItemsProvider {
11
- constructor(mapLayerOptions) {
12
- this.id = "MapLayersUiItemsProvider";
13
- this._mapLayerOptions = mapLayerOptions !== null && mapLayerOptions !== void 0 ? mapLayerOptions : {
14
- hideExternalMapLayers: false,
15
- mapTypeOptions: { supportTileUrl: false, supportWmsAuthentication: true },
16
- fetchPublicMapLayerSources: false,
17
- };
18
- }
19
- // eslint-disable-next-line deprecation/deprecation
20
- provideWidgets(_stageId, stageUsage, location, section, zoneLocation) {
21
- const widgets = []; // eslint-disable-line deprecation/deprecation
22
- // eslint-disable-next-line deprecation/deprecation
23
- if ((undefined === section && stageUsage === StageUsage.General && zoneLocation === AbstractZoneLocation.CenterRight) ||
24
- (stageUsage === StageUsage.General && location === StagePanelLocation.Right && section === StagePanelSection.Start && "1" !== UiFramework.uiVersion)) { // eslint-disable-line deprecation/deprecation
25
- widgets.push({
26
- id: "map-layers:mapLayersWidget",
27
- label: MapLayersUI.localization.getLocalizedString("mapLayers:Widget.Label"),
28
- icon: "icon-map",
29
- getWidgetContent: () => React.createElement(MapLayersWidget, { mapLayerOptions: this._mapLayerOptions }), // eslint-disable-line react/display-name
30
- });
31
- }
32
- return widgets;
33
- }
34
- }
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 { StagePanelLocation, StagePanelSection, StageUsage } from "@itwin/appui-react";
7
+ import { MapLayersWidget } from "./widget/MapLayersWidget";
8
+ import { MapLayersUI } from "../mapLayers";
9
+ export class MapLayersUiItemsProvider {
10
+ constructor(mapLayerOptions) {
11
+ this.id = "MapLayersUiItemsProvider";
12
+ this._mapLayerOptions = mapLayerOptions ?? {
13
+ hideExternalMapLayers: false,
14
+ mapTypeOptions: { supportTileUrl: false, supportWmsAuthentication: true },
15
+ fetchPublicMapLayerSources: false,
16
+ };
17
+ }
18
+ provideWidgets(_stageId, stageUsage, location, section) {
19
+ const widgets = [];
20
+ const tmpSection = section ?? StagePanelSection.Start;
21
+ if (stageUsage === StageUsage.General && location === StagePanelLocation.Right && tmpSection === StagePanelSection.Start) {
22
+ widgets.push({
23
+ id: "map-layers:mapLayersWidget",
24
+ label: MapLayersUI.localization.getLocalizedString("mapLayers:Widget.Label"),
25
+ icon: "icon-map",
26
+ content: React.createElement(MapLayersWidget, { mapLayerOptions: this._mapLayerOptions }),
27
+ });
28
+ }
29
+ return widgets;
30
+ }
31
+ }
35
32
  //# sourceMappingURL=MapLayersUiItemsProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapLayersUiItemsProvider.js","sourceRoot":"","sources":["../../../src/ui/MapLayersUiItemsProvider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAC;AACtJ,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,OAAO,wBAAwB;IAInC,YAAmB,eAAiC;QAHpC,OAAE,GAAG,0BAA0B,CAAC;QAI9C,IAAI,CAAC,gBAAgB,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI;YACzC,qBAAqB,EAAE,KAAK;YAC5B,cAAc,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE;YACzE,0BAA0B,EAAE,KAAK;SAClC,CAAC;IACJ,CAAC;IAED,mDAAmD;IAC5C,cAAc,CAAC,QAAgB,EAAE,UAAkB,EAAE,QAA4B,EAAE,OAAsC,EAAE,YAAmC;QACnK,MAAM,OAAO,GAA0B,EAAE,CAAC,CAAC,8CAA8C;QAEzF,mDAAmD;QACnD,IAAI,CAAC,SAAS,KAAK,OAAO,IAAI,UAAU,KAAK,UAAU,CAAC,OAAO,IAAI,YAAY,KAAK,oBAAoB,CAAC,WAAW,CAAC;YACnH,CAAC,UAAU,KAAK,UAAU,CAAC,OAAO,IAAI,QAAQ,KAAK,kBAAkB,CAAC,KAAK,IAAI,OAAO,KAAK,iBAAiB,CAAC,KAAK,IAAI,GAAG,KAAK,WAAW,CAAC,SAAS,CAAC,EAAE,EAAE,8CAA8C;YACtM,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,4BAA4B;gBAChC,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,wBAAwB,CAAC;gBAC5E,IAAI,EAAE,UAAU;gBAChB,gBAAgB,EAAE,GAAG,EAAE,CAAC,oBAAC,eAAe,IAAC,eAAe,EAAE,IAAI,CAAC,gBAAgB,GAAI,EAAE,yCAAyC;aAC/H,CAAC,CAAC;SACJ;QAED,OAAO,OAAO,CAAC;IACjB,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 * as React from \"react\";\r\nimport { AbstractWidgetProps, AbstractZoneLocation, StagePanelLocation, StagePanelSection, StageUsage, UiItemsProvider } from \"@itwin/appui-abstract\";\r\nimport { MapLayersWidget } from \"./widget/MapLayersWidget\";\r\nimport { UiFramework } from \"@itwin/appui-react\";\r\nimport { MapLayerOptions } from \"./Interfaces\";\r\nimport { MapLayersUI } from \"../mapLayers\";\r\n\r\nexport class MapLayersUiItemsProvider implements UiItemsProvider { // eslint-disable-line deprecation/deprecation\r\n public readonly id = \"MapLayersUiItemsProvider\";\r\n private _mapLayerOptions?: MapLayerOptions;\r\n\r\n public constructor(mapLayerOptions?: MapLayerOptions) {\r\n this._mapLayerOptions = mapLayerOptions ?? {\r\n hideExternalMapLayers: false,\r\n mapTypeOptions: { supportTileUrl: false, supportWmsAuthentication: true },\r\n fetchPublicMapLayerSources: false,\r\n };\r\n }\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n public provideWidgets(_stageId: string, stageUsage: string, location: StagePanelLocation, section: StagePanelSection | undefined, zoneLocation?: AbstractZoneLocation): ReadonlyArray<AbstractWidgetProps> {\r\n const widgets: AbstractWidgetProps[] = []; // eslint-disable-line deprecation/deprecation\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n if ((undefined === section && stageUsage === StageUsage.General && zoneLocation === AbstractZoneLocation.CenterRight) ||\r\n (stageUsage === StageUsage.General && location === StagePanelLocation.Right && section === StagePanelSection.Start && \"1\" !== UiFramework.uiVersion)) { // eslint-disable-line deprecation/deprecation\r\n widgets.push({\r\n id: \"map-layers:mapLayersWidget\",\r\n label: MapLayersUI.localization.getLocalizedString(\"mapLayers:Widget.Label\"),\r\n icon: \"icon-map\",\r\n getWidgetContent: () => <MapLayersWidget mapLayerOptions={this._mapLayerOptions} />, // eslint-disable-line react/display-name\r\n });\r\n }\r\n\r\n return widgets;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MapLayersUiItemsProvider.js","sourceRoot":"","sources":["../../../src/ui/MapLayersUiItemsProvider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,UAAU,EAA2B,MAAM,oBAAoB,CAAC;AAChH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,OAAO,wBAAwB;IAInC,YAAmB,eAAiC;QAHpC,OAAE,GAAG,0BAA0B,CAAC;QAI9C,IAAI,CAAC,gBAAgB,GAAG,eAAe,IAAI;YACzC,qBAAqB,EAAE,KAAK;YAC5B,cAAc,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE;YACzE,0BAA0B,EAAE,KAAK;SAClC,CAAC;IACJ,CAAC;IAEM,cAAc,CAAC,QAAgB,EAAE,UAAkB,EAAE,QAA4B,EAAE,OAA2B;QACnH,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,OAAO,IAAI,iBAAiB,CAAC,KAAK,CAAC;QACtD,IAAI,UAAU,KAAK,UAAU,CAAC,OAAO,IAAI,QAAQ,KAAK,kBAAkB,CAAC,KAAK,IAAI,UAAU,KAAK,iBAAiB,CAAC,KAAK,EAAE;YACxH,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,4BAA4B;gBAChC,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,wBAAwB,CAAC;gBAC5E,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,oBAAC,eAAe,IAAC,eAAe,EAAE,IAAI,CAAC,gBAAgB,GAAI;aACrE,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,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 * as React from \"react\";\nimport { StagePanelLocation, StagePanelSection, StageUsage, UiItemsProvider, Widget } from \"@itwin/appui-react\";\nimport { MapLayersWidget } from \"./widget/MapLayersWidget\";\nimport { MapLayerOptions } from \"./Interfaces\";\nimport { MapLayersUI } from \"../mapLayers\";\n\nexport class MapLayersUiItemsProvider implements UiItemsProvider {\n public readonly id = \"MapLayersUiItemsProvider\";\n private _mapLayerOptions?: MapLayerOptions;\n\n public constructor(mapLayerOptions?: MapLayerOptions) {\n this._mapLayerOptions = mapLayerOptions ?? {\n hideExternalMapLayers: false,\n mapTypeOptions: { supportTileUrl: false, supportWmsAuthentication: true },\n fetchPublicMapLayerSources: false,\n };\n }\n\n public provideWidgets(_stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection) {\n const widgets: Widget[] = [];\n const tmpSection = section ?? StagePanelSection.Start;\n if (stageUsage === StageUsage.General && location === StagePanelLocation.Right && tmpSection === StagePanelSection.Start) {\n widgets.push({\n id: \"map-layers:mapLayersWidget\",\n label: MapLayersUI.localization.getLocalizedString(\"mapLayers:Widget.Label\"),\n icon: \"icon-map\",\n content: <MapLayersWidget mapLayerOptions={this._mapLayerOptions} />,\n });\n }\n return widgets;\n }\n}\n"]}
@@ -1,15 +1,14 @@
1
- /// <reference types="react" />
2
- /** @internal */
3
- export declare enum AttachLayerButtonType {
4
- Primary = 0,
5
- Blue = 1,
6
- Icon = 2
7
- }
8
- export interface AttachLayerPopupButtonProps {
9
- isOverlay: boolean;
10
- buttonType?: AttachLayerButtonType;
11
- disabled?: boolean;
12
- }
13
- /** @internal */
14
- export declare function AttachLayerPopupButton(props: AttachLayerPopupButtonProps): JSX.Element;
1
+ /** @internal */
2
+ export declare enum AttachLayerButtonType {
3
+ Primary = 0,
4
+ Blue = 1,
5
+ Icon = 2
6
+ }
7
+ export interface AttachLayerPopupButtonProps {
8
+ isOverlay: boolean;
9
+ buttonType?: AttachLayerButtonType;
10
+ disabled?: boolean;
11
+ }
12
+ /** @internal */
13
+ export declare function AttachLayerPopupButton(props: AttachLayerPopupButtonProps): JSX.Element;
15
14
  //# sourceMappingURL=AttachLayerPopupButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachLayerPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/AttachLayerPopupButton.tsx"],"names":[],"mappings":";AA2WA,gBAAgB;AAChB,oBAAY,qBAAqB;IAC/B,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,IAAI,IAAA;CACL;AACD,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gBAAgB;AAEhB,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,eAiHxE"}
1
+ {"version":3,"file":"AttachLayerPopupButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/widget/AttachLayerPopupButton.tsx"],"names":[],"mappings":"AAyWA,gBAAgB;AAChB,oBAAY,qBAAqB;IAC/B,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,IAAI,IAAA;CACL;AACD,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,gBAAgB;AAEhB,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,eAiHxE"}