@jupytergis/base 0.4.5 → 0.6.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 (192) hide show
  1. package/lib/annotations/components/Annotation.d.ts +2 -2
  2. package/lib/annotations/components/Annotation.js +3 -3
  3. package/lib/annotations/components/AnnotationFloater.d.ts +1 -1
  4. package/lib/annotations/components/AnnotationFloater.js +2 -2
  5. package/lib/annotations/components/Message.d.ts +2 -1
  6. package/lib/annotations/components/Message.js +3 -3
  7. package/lib/annotations/model.js +5 -5
  8. package/lib/commands/BaseCommandIDs.d.ts +32 -0
  9. package/lib/commands/BaseCommandIDs.js +43 -0
  10. package/lib/{commands.d.ts → commands/index.d.ts} +1 -1
  11. package/lib/{commands.js → commands/index.js} +76 -319
  12. package/lib/console/consoleview.d.ts +3 -3
  13. package/lib/console/consoleview.js +5 -5
  14. package/lib/constants.d.ts +2 -51
  15. package/lib/constants.js +6 -65
  16. package/lib/dialogs/ProcessingFormDialog.d.ts +4 -4
  17. package/lib/dialogs/ProcessingFormDialog.js +9 -11
  18. package/lib/dialogs/layerBrowserDialog.d.ts +1 -1
  19. package/lib/dialogs/layerBrowserDialog.js +7 -7
  20. package/lib/dialogs/layerCreationFormDialog.d.ts +4 -4
  21. package/lib/dialogs/layerCreationFormDialog.js +6 -6
  22. package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.d.ts +1 -1
  23. package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.js +3 -3
  24. package/lib/dialogs/symbology/components/color_ramp/ColorRamp.d.ts +3 -2
  25. package/lib/dialogs/symbology/components/color_ramp/ColorRamp.js +6 -7
  26. package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.d.ts +1 -1
  27. package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.js +1 -1
  28. package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.d.ts +1 -1
  29. package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.js +1 -1
  30. package/lib/dialogs/symbology/components/color_stops/StopContainer.d.ts +2 -2
  31. package/lib/dialogs/symbology/components/color_stops/StopContainer.js +4 -4
  32. package/lib/dialogs/symbology/components/color_stops/StopRow.d.ts +3 -3
  33. package/lib/dialogs/symbology/components/color_stops/StopRow.js +2 -2
  34. package/lib/dialogs/symbology/hooks/useGetBandInfo.js +5 -5
  35. package/lib/dialogs/symbology/hooks/useGetProperties.d.ts +1 -1
  36. package/lib/dialogs/symbology/hooks/useGetProperties.js +4 -4
  37. package/lib/dialogs/symbology/symbologyDialog.d.ts +8 -0
  38. package/lib/dialogs/symbology/symbologyDialog.js +1 -1
  39. package/lib/dialogs/symbology/symbologyUtils.js +38 -31
  40. package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +2 -2
  41. package/lib/dialogs/symbology/tiff_layer/TiffRendering.js +2 -2
  42. package/lib/dialogs/symbology/tiff_layer/components/BandRow.d.ts +2 -2
  43. package/lib/dialogs/symbology/tiff_layer/components/BandRow.js +4 -4
  44. package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.d.ts +2 -2
  45. package/lib/dialogs/symbology/tiff_layer/types/MultibandColor.js +30 -20
  46. package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.d.ts +2 -2
  47. package/lib/dialogs/symbology/tiff_layer/types/SingleBandPseudoColor.js +23 -21
  48. package/lib/dialogs/symbology/vector_layer/VectorRendering.d.ts +2 -2
  49. package/lib/dialogs/symbology/vector_layer/VectorRendering.js +81 -39
  50. package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +1 -1
  51. package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +1 -1
  52. package/lib/dialogs/symbology/vector_layer/types/Canonical.d.ts +4 -0
  53. package/lib/dialogs/symbology/vector_layer/types/Canonical.js +66 -0
  54. package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +2 -2
  55. package/lib/dialogs/symbology/vector_layer/types/Categorized.js +142 -47
  56. package/lib/dialogs/symbology/vector_layer/types/Graduated.d.ts +2 -2
  57. package/lib/dialogs/symbology/vector_layer/types/Graduated.js +193 -99
  58. package/lib/dialogs/symbology/vector_layer/types/Heatmap.d.ts +2 -2
  59. package/lib/dialogs/symbology/vector_layer/types/Heatmap.js +7 -6
  60. package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.d.ts +2 -2
  61. package/lib/dialogs/symbology/vector_layer/types/SimpleSymbol.js +33 -30
  62. package/lib/formbuilder/creationform.js +3 -3
  63. package/lib/formbuilder/editform.js +3 -3
  64. package/lib/formbuilder/formselectors.d.ts +1 -1
  65. package/lib/formbuilder/formselectors.js +2 -2
  66. package/lib/formbuilder/objectform/baseform.d.ts +5 -4
  67. package/lib/formbuilder/objectform/baseform.js +16 -14
  68. package/lib/formbuilder/objectform/fileselectorwidget.d.ts +1 -1
  69. package/lib/formbuilder/objectform/fileselectorwidget.js +5 -5
  70. package/lib/formbuilder/objectform/layer/heatmapLayerForm.js +2 -2
  71. package/lib/formbuilder/objectform/layer/hillshadeLayerForm.js +1 -1
  72. package/lib/formbuilder/objectform/layer/layerform.d.ts +1 -1
  73. package/lib/formbuilder/objectform/layer/layerform.js +3 -2
  74. package/lib/formbuilder/objectform/process/dissolveProcessForm.d.ts +1 -1
  75. package/lib/formbuilder/objectform/process/dissolveProcessForm.js +5 -5
  76. package/lib/formbuilder/objectform/source/geojsonsource.js +4 -4
  77. package/lib/formbuilder/objectform/source/geotiffsource.js +4 -4
  78. package/lib/formbuilder/objectform/source/pathbasedsource.js +6 -6
  79. package/lib/formbuilder/objectform/source/sourceform.d.ts +1 -1
  80. package/lib/formbuilder/objectform/source/sourceform.js +1 -1
  81. package/lib/formbuilder/objectform/source/tilesourceform.js +3 -3
  82. package/lib/gdal.js +2 -2
  83. package/lib/icons.js +29 -29
  84. package/lib/index.d.ts +4 -2
  85. package/lib/index.js +4 -2
  86. package/lib/mainview/CollaboratorPointers.d.ts +1 -1
  87. package/lib/mainview/CollaboratorPointers.js +5 -5
  88. package/lib/mainview/FollowIndicator.d.ts +2 -2
  89. package/lib/mainview/FollowIndicator.js +3 -3
  90. package/lib/mainview/TemporalSlider.d.ts +1 -1
  91. package/lib/mainview/TemporalSlider.js +7 -7
  92. package/lib/mainview/mainView.d.ts +4 -2
  93. package/lib/mainview/mainView.js +232 -137
  94. package/lib/menus.d.ts +4 -0
  95. package/lib/menus.js +45 -0
  96. package/lib/panelview/annotationPanel.d.ts +2 -2
  97. package/lib/panelview/annotationPanel.js +1 -1
  98. package/lib/panelview/components/filter-panel/Filter.d.ts +2 -2
  99. package/lib/panelview/components/filter-panel/Filter.js +5 -5
  100. package/lib/panelview/components/filter-panel/FilterRow.d.ts +2 -2
  101. package/lib/panelview/components/identify-panel/IdentifyPanel.d.ts +1 -1
  102. package/lib/panelview/components/identify-panel/IdentifyPanel.js +5 -5
  103. package/lib/panelview/components/layers.d.ts +1 -1
  104. package/lib/panelview/components/layers.js +12 -12
  105. package/lib/panelview/leftpanel.d.ts +4 -2
  106. package/lib/panelview/leftpanel.js +24 -14
  107. package/lib/panelview/model.d.ts +1 -1
  108. package/lib/panelview/objectproperties.d.ts +1 -1
  109. package/lib/panelview/objectproperties.js +3 -3
  110. package/lib/panelview/rightpanel.d.ts +2 -1
  111. package/lib/panelview/rightpanel.js +13 -5
  112. package/lib/{processing.d.ts → processing/index.d.ts} +4 -4
  113. package/lib/{processing.js → processing/index.js} +19 -24
  114. package/lib/processing/processingCommands.d.ts +6 -0
  115. package/lib/processing/processingCommands.js +47 -0
  116. package/lib/processing/processingFormToParam.d.ts +2 -0
  117. package/lib/processing/processingFormToParam.js +15 -0
  118. package/lib/shared/components/Badge.d.ts +7 -0
  119. package/lib/shared/components/Badge.js +19 -0
  120. package/lib/shared/components/Button.d.ts +9 -0
  121. package/lib/shared/components/Button.js +20 -0
  122. package/lib/shared/components/Calendar.d.ts +47 -0
  123. package/lib/shared/components/Calendar.js +184 -0
  124. package/lib/shared/components/Checkbox.d.ts +4 -0
  125. package/lib/shared/components/Checkbox.js +25 -0
  126. package/lib/shared/components/DropdownMenu.d.ts +27 -0
  127. package/lib/shared/components/DropdownMenu.js +92 -0
  128. package/lib/shared/components/Pagination.d.ts +25 -0
  129. package/lib/shared/components/Pagination.js +68 -0
  130. package/lib/shared/components/Popover.d.ts +7 -0
  131. package/lib/shared/components/Popover.js +32 -0
  132. package/lib/shared/components/Tabs.d.ts +7 -0
  133. package/lib/shared/components/Tabs.js +31 -0
  134. package/lib/shared/components/ToggleGroup.d.ts +12 -0
  135. package/lib/shared/components/ToggleGroup.js +52 -0
  136. package/lib/shared/components/loading.d.ts +12 -0
  137. package/lib/shared/components/loading.js +6 -0
  138. package/lib/shared/components/utils.d.ts +2 -0
  139. package/lib/shared/components/utils.js +4 -0
  140. package/lib/shared/hooks/useIsFirstRender.d.ts +2 -0
  141. package/lib/shared/hooks/useIsFirstRender.js +10 -0
  142. package/lib/stacBrowser/StacBrowser.d.ts +7 -0
  143. package/lib/stacBrowser/StacBrowser.js +16 -0
  144. package/lib/stacBrowser/StacPanel.d.ts +14 -0
  145. package/lib/stacBrowser/StacPanel.js +16 -0
  146. package/lib/stacBrowser/components/StacFilterSection.d.ts +23 -0
  147. package/lib/stacBrowser/components/StacFilterSection.js +49 -0
  148. package/lib/stacBrowser/components/StacPanelFilters.d.ts +14 -0
  149. package/lib/stacBrowser/components/StacPanelFilters.js +65 -0
  150. package/lib/stacBrowser/components/StacPanelResults.d.ts +13 -0
  151. package/lib/stacBrowser/components/StacPanelResults.js +48 -0
  152. package/lib/stacBrowser/components/StacPanelView.d.ts +7 -0
  153. package/lib/stacBrowser/components/StacPanelView.js +20 -0
  154. package/lib/stacBrowser/constants.d.ts +25 -0
  155. package/lib/stacBrowser/constants.js +197 -0
  156. package/lib/stacBrowser/hooks/useStacSearch.d.ts +30 -0
  157. package/lib/stacBrowser/hooks/useStacSearch.js +221 -0
  158. package/lib/stacBrowser/index.d.ts +1 -0
  159. package/lib/stacBrowser/index.js +1 -0
  160. package/lib/stacBrowser/types/types.d.ts +124 -0
  161. package/lib/stacBrowser/types/types.js +1 -0
  162. package/lib/statusbar/StatusBar.d.ts +1 -1
  163. package/lib/statusbar/StatusBar.js +3 -3
  164. package/lib/toolbar/index.d.ts +0 -1
  165. package/lib/toolbar/index.js +0 -1
  166. package/lib/toolbar/widget.js +28 -64
  167. package/lib/tools.d.ts +30 -5
  168. package/lib/tools.js +82 -69
  169. package/lib/types.d.ts +2 -0
  170. package/lib/widget.d.ts +2 -1
  171. package/lib/widget.js +8 -5
  172. package/package.json +22 -8
  173. package/style/base.css +26 -0
  174. package/style/layerBrowser.css +10 -0
  175. package/style/leftPanel.css +0 -1
  176. package/style/shared/badge.css +61 -0
  177. package/style/shared/button.css +164 -0
  178. package/style/shared/calendar.css +274 -0
  179. package/style/shared/checkbox.css +28 -0
  180. package/style/shared/dropdownMenu.css +240 -0
  181. package/style/shared/pagination.css +167 -0
  182. package/style/shared/popover.css +53 -0
  183. package/style/shared/tabs.css +57 -0
  184. package/style/shared/toggle.css +85 -0
  185. package/style/stacBrowser.css +74 -0
  186. package/style/symbologyDialog.css +0 -7
  187. package/lib/mainview/spinner.d.ts +0 -6
  188. package/lib/mainview/spinner.js +0 -5
  189. package/lib/panelview/components/sources.d.ts +0 -10
  190. package/lib/panelview/components/sources.js +0 -147
  191. package/lib/toolbar/usertoolbaritem.d.ts +0 -19
  192. package/lib/toolbar/usertoolbaritem.js +0 -59
@@ -1,7 +1,7 @@
1
1
  import { ConsolePanel } from '@jupyterlab/console';
2
+ import { closeIcon, CommandToolbarButton, expandIcon, Toolbar, } from '@jupyterlab/ui-components';
2
3
  import { BoxPanel } from '@lumino/widgets';
3
- import { debounce } from '../tools';
4
- import { closeIcon, CommandToolbarButton, expandIcon, Toolbar } from '@jupyterlab/ui-components';
4
+ import { debounce } from "../tools";
5
5
  export class ConsoleView extends BoxPanel {
6
6
  constructor(options) {
7
7
  super({ direction: 'top-to-bottom' });
@@ -16,7 +16,7 @@ export class ConsoleView extends BoxPanel {
16
16
  contentFactory,
17
17
  mimeTypeService,
18
18
  rendermime: clonedRendermime,
19
- kernelPreference: { name: 'python3', shutdownOnDispose: true }
19
+ kernelPreference: { name: 'python3', shutdownOnDispose: true },
20
20
  });
21
21
  this._consolePanel.console.node.dataset.jpInteractionMode = 'notebook';
22
22
  this.addWidget(this._consolePanel);
@@ -26,13 +26,13 @@ export class ConsoleView extends BoxPanel {
26
26
  label: '',
27
27
  icon: expandIcon,
28
28
  id: 'jupytergis:toggleConsole',
29
- commands: options.commandRegistry
29
+ commands: options.commandRegistry,
30
30
  }));
31
31
  this._consolePanel.toolbar.addItem('close', new CommandToolbarButton({
32
32
  label: '',
33
33
  icon: closeIcon,
34
34
  id: 'jupytergis:removeConsole',
35
- commands: options.commandRegistry
35
+ commands: options.commandRegistry,
36
36
  }));
37
37
  }
38
38
  get consolePanel() {
@@ -1,58 +1,9 @@
1
+ import { IDict } from '@jupytergis/schema';
1
2
  import { LabIcon } from '@jupyterlab/ui-components';
2
3
  /**
3
4
  * The command IDs.
4
5
  */
5
- export declare namespace CommandIDs {
6
- const createNew = "jupytergis:create-new-jGIS-file";
7
- const redo = "jupytergis:redo";
8
- const undo = "jupytergis:undo";
9
- const symbology = "jupytergis:symbology";
10
- const identify = "jupytergis:identify";
11
- const temporalController = "jupytergis:temporalController";
12
- const getGeolocation = "jupytergis:getGeolocation";
13
- const openLayerBrowser = "jupytergis:openLayerBrowser";
14
- const newRasterEntry = "jupytergis:newRasterEntry";
15
- const newVectorTileEntry = "jupytergis:newVectorTileEntry";
16
- const newGeoJSONEntry = "jupytergis:newGeoJSONEntry";
17
- const newHillshadeEntry = "jupytergis:newHillshadeEntry";
18
- const newImageEntry = "jupytergis:newImageEntry";
19
- const newVideoEntry = "jupytergis:newVideoEntry";
20
- const newGeoTiffEntry = "jupytergis:newGeoTiffEntry";
21
- const buffer = "jupytergis:buffer";
22
- const dissolve = "jupytergis:dissolve";
23
- const newRasterSource = "jupytergis:newRasterSource";
24
- const newRasterDemSource = "jupytergis:newRasterDemSource";
25
- const newVectorSource = "jupytergis:newVectorSource";
26
- const newGeoJSONSource = "jupytergis:newGeoJSONSource";
27
- const newImageSource = "jupytergis:imageSource";
28
- const newVideoSource = "jupytergis:videoSource";
29
- const newShapefileSource = "jupytergis:shapefileSource";
30
- const newGeoTiffSource = "jupytergis:newGeoTiffSource";
31
- const newRasterLayer = "jupytergis:newRasterLayer";
32
- const newVectorLayer = "jupytergis:newVectorLayer";
33
- const newHillshadeLayer = "jupytergis:newHillshadeLayer";
34
- const newImageLayer = "jupytergis:newImageLayer";
35
- const newVideoLayer = "jupytergis:newVideoLayer";
36
- const newShapefileLayer = "jupytergis:newShapefileLayer";
37
- const newWebGlTileLayer = "jupytergis:newWebGlTileLayer";
38
- const newHeatmapLayer = "jupytergis:newHeatmapLayer";
39
- const renameLayer = "jupytergis:renameLayer";
40
- const removeLayer = "jupytergis:removeLayer";
41
- const renameGroup = "jupytergis:renameGroup";
42
- const removeGroup = "jupytergis:removeGroup";
43
- const moveLayersToGroup = "jupytergis:moveLayersToGroup";
44
- const moveLayerToNewGroup = "jupytergis:moveLayerToNewGroup";
45
- const renameSource = "jupytergis:renameSource";
46
- const removeSource = "jupytergis:removeSource";
47
- const toggleConsole = "jupytergis:toggleConsole";
48
- const invokeCompleter = "jupytergis:invokeConsoleCompleter";
49
- const removeConsole = "jupytergis:removeConsole";
50
- const executeConsole = "jupytergis:executeConsole";
51
- const selectCompleter = "jupytergis:selectConsoleCompleter";
52
- const addAnnotation = "jupytergis:addAnnotation";
53
- const zoomToLayer = "jupytergis:zoomToLayer";
54
- const downloadGeoJSON = "jupytergis:downloadGeoJSON";
55
- }
6
+ export declare const CommandIDs: IDict;
56
7
  interface IRegisteredIcon {
57
8
  icon?: LabIcon;
58
9
  iconClass?: string;
package/lib/constants.js CHANGED
@@ -1,70 +1,11 @@
1
+ import { ProcessingCommandIDs } from '@jupytergis/schema';
1
2
  import { redoIcon, undoIcon } from '@jupyterlab/ui-components';
2
- import { bookOpenIcon, clockIcon, geoJSONIcon, infoIcon, moundIcon, rasterIcon, vectorSquareIcon } from './icons';
3
+ import * as BaseCommandIDs from './commands/BaseCommandIDs';
4
+ import { bookOpenIcon, clockIcon, geoJSONIcon, infoIcon, moundIcon, rasterIcon, vectorSquareIcon, } from './icons';
3
5
  /**
4
6
  * The command IDs.
5
7
  */
6
- export var CommandIDs;
7
- (function (CommandIDs) {
8
- CommandIDs.createNew = 'jupytergis:create-new-jGIS-file';
9
- CommandIDs.redo = 'jupytergis:redo';
10
- CommandIDs.undo = 'jupytergis:undo';
11
- CommandIDs.symbology = 'jupytergis:symbology';
12
- CommandIDs.identify = 'jupytergis:identify';
13
- CommandIDs.temporalController = 'jupytergis:temporalController';
14
- // geolocation
15
- CommandIDs.getGeolocation = 'jupytergis:getGeolocation';
16
- // Layers and sources creation commands
17
- CommandIDs.openLayerBrowser = 'jupytergis:openLayerBrowser';
18
- // Layer and source
19
- CommandIDs.newRasterEntry = 'jupytergis:newRasterEntry';
20
- CommandIDs.newVectorTileEntry = 'jupytergis:newVectorTileEntry';
21
- CommandIDs.newGeoJSONEntry = 'jupytergis:newGeoJSONEntry';
22
- CommandIDs.newHillshadeEntry = 'jupytergis:newHillshadeEntry';
23
- CommandIDs.newImageEntry = 'jupytergis:newImageEntry';
24
- CommandIDs.newVideoEntry = 'jupytergis:newVideoEntry';
25
- CommandIDs.newGeoTiffEntry = 'jupytergis:newGeoTiffEntry';
26
- // Processing commands
27
- CommandIDs.buffer = 'jupytergis:buffer';
28
- CommandIDs.dissolve = 'jupytergis:dissolve';
29
- // Sources only commands
30
- CommandIDs.newRasterSource = 'jupytergis:newRasterSource';
31
- CommandIDs.newRasterDemSource = 'jupytergis:newRasterDemSource';
32
- CommandIDs.newVectorSource = 'jupytergis:newVectorSource';
33
- CommandIDs.newGeoJSONSource = 'jupytergis:newGeoJSONSource';
34
- CommandIDs.newImageSource = 'jupytergis:imageSource';
35
- CommandIDs.newVideoSource = 'jupytergis:videoSource';
36
- CommandIDs.newShapefileSource = 'jupytergis:shapefileSource';
37
- CommandIDs.newGeoTiffSource = 'jupytergis:newGeoTiffSource';
38
- // Layers only commands
39
- CommandIDs.newRasterLayer = 'jupytergis:newRasterLayer';
40
- CommandIDs.newVectorLayer = 'jupytergis:newVectorLayer';
41
- CommandIDs.newHillshadeLayer = 'jupytergis:newHillshadeLayer';
42
- CommandIDs.newImageLayer = 'jupytergis:newImageLayer';
43
- CommandIDs.newVideoLayer = 'jupytergis:newVideoLayer';
44
- CommandIDs.newShapefileLayer = 'jupytergis:newShapefileLayer';
45
- CommandIDs.newWebGlTileLayer = 'jupytergis:newWebGlTileLayer';
46
- CommandIDs.newHeatmapLayer = 'jupytergis:newHeatmapLayer';
47
- // Layer and group actions
48
- CommandIDs.renameLayer = 'jupytergis:renameLayer';
49
- CommandIDs.removeLayer = 'jupytergis:removeLayer';
50
- CommandIDs.renameGroup = 'jupytergis:renameGroup';
51
- CommandIDs.removeGroup = 'jupytergis:removeGroup';
52
- CommandIDs.moveLayersToGroup = 'jupytergis:moveLayersToGroup';
53
- CommandIDs.moveLayerToNewGroup = 'jupytergis:moveLayerToNewGroup';
54
- // Source actions
55
- CommandIDs.renameSource = 'jupytergis:renameSource';
56
- CommandIDs.removeSource = 'jupytergis:removeSource';
57
- // Console commands
58
- CommandIDs.toggleConsole = 'jupytergis:toggleConsole';
59
- CommandIDs.invokeCompleter = 'jupytergis:invokeConsoleCompleter';
60
- CommandIDs.removeConsole = 'jupytergis:removeConsole';
61
- CommandIDs.executeConsole = 'jupytergis:executeConsole';
62
- CommandIDs.selectCompleter = 'jupytergis:selectConsoleCompleter';
63
- // Map Commands
64
- CommandIDs.addAnnotation = 'jupytergis:addAnnotation';
65
- CommandIDs.zoomToLayer = 'jupytergis:zoomToLayer';
66
- CommandIDs.downloadGeoJSON = 'jupytergis:downloadGeoJSON';
67
- })(CommandIDs || (CommandIDs = {}));
8
+ export const CommandIDs = Object.assign(Object.assign({}, BaseCommandIDs), ProcessingCommandIDs);
68
9
  const iconObject = {
69
10
  RasterSource: { icon: rasterIcon },
70
11
  RasterDemSource: { icon: moundIcon },
@@ -87,11 +28,11 @@ const iconObject = {
87
28
  [CommandIDs.newHillshadeEntry]: { icon: moundIcon },
88
29
  [CommandIDs.newImageEntry]: { iconClass: 'fa fa-image' },
89
30
  [CommandIDs.newVideoEntry]: { iconClass: 'fa fa-video' },
90
- [CommandIDs.newShapefileLayer]: { iconClass: 'fa fa-file' },
31
+ [CommandIDs.newShapefileEntry]: { iconClass: 'fa fa-file' },
91
32
  [CommandIDs.newGeoTiffEntry]: { iconClass: 'fa fa-image' },
92
33
  [CommandIDs.symbology]: { iconClass: 'fa fa-brush' },
93
34
  [CommandIDs.identify]: { icon: infoIcon },
94
- [CommandIDs.temporalController]: { icon: clockIcon }
35
+ [CommandIDs.temporalController]: { icon: clockIcon },
95
36
  };
96
37
  /**
97
38
  * The registered icons
@@ -1,8 +1,8 @@
1
- import { IDict, IJupyterGISModel } from '@jupytergis/schema';
1
+ import { ProcessingType, IDict, IJupyterGISModel } from '@jupytergis/schema';
2
2
  import { Dialog } from '@jupyterlab/apputils';
3
- import { IBaseFormProps } from '../formbuilder/objectform/baseform';
4
- import { Signal } from '@lumino/signaling';
5
3
  import { PromiseDelegate } from '@lumino/coreutils';
4
+ import { Signal } from '@lumino/signaling';
5
+ import { IBaseFormProps } from "../formbuilder/objectform/baseform";
6
6
  export interface IProcessingFormDialogOptions extends IBaseFormProps {
7
7
  formContext: 'update' | 'create';
8
8
  schema: IDict;
@@ -11,7 +11,7 @@ export interface IProcessingFormDialogOptions extends IBaseFormProps {
11
11
  syncData: (props: IDict) => void;
12
12
  syncSelectedPropField?: (id: string | null, value: any, parentType: 'dialog' | 'panel') => void;
13
13
  model: IJupyterGISModel;
14
- processingType: 'Buffer' | 'Dissolve' | 'Export';
14
+ processingType: 'Export' | ProcessingType;
15
15
  }
16
16
  /**
17
17
  * Wrapper component to handle OK button state
@@ -1,17 +1,17 @@
1
1
  import { Dialog } from '@jupyterlab/apputils';
2
- import * as React from 'react';
3
- import { BaseForm } from '../formbuilder/objectform/baseform';
4
- import { DissolveForm } from '../formbuilder/objectform/process';
5
- import { Signal } from '@lumino/signaling';
6
2
  import { PromiseDelegate } from '@lumino/coreutils';
7
- const ProcessingFormWrapper = (props) => {
3
+ import { Signal } from '@lumino/signaling';
4
+ import * as React from 'react';
5
+ import { BaseForm, } from "../formbuilder/objectform/baseform";
6
+ import { DissolveForm } from "../formbuilder/objectform/process";
7
+ const ProcessingFormWrapper = props => {
8
8
  var _a;
9
9
  const [ready, setReady] = React.useState(false);
10
10
  const okSignal = React.useRef();
11
11
  const formErrorSignal = React.useRef();
12
12
  Promise.all([
13
13
  props.okSignalPromise.promise,
14
- (_a = props.formErrorSignalPromise) === null || _a === void 0 ? void 0 : _a.promise
14
+ (_a = props.formErrorSignalPromise) === null || _a === void 0 ? void 0 : _a.promise,
15
15
  ]).then(([ok, formChanged]) => {
16
16
  okSignal.current = ok;
17
17
  formErrorSignal.current = formChanged;
@@ -22,8 +22,6 @@ const ProcessingFormWrapper = (props) => {
22
22
  case 'Dissolve':
23
23
  FormComponent = DissolveForm;
24
24
  break;
25
- case 'Buffer':
26
- case 'Export':
27
25
  default:
28
26
  FormComponent = BaseForm;
29
27
  }
@@ -39,7 +37,7 @@ export class ProcessingFormDialog extends Dialog {
39
37
  const layers = (_a = options.model.sharedModel.layers) !== null && _a !== void 0 ? _a : {};
40
38
  const layerOptions = Object.keys(layers).map(layerId => ({
41
39
  value: layerId,
42
- label: layers[layerId].name
40
+ label: layers[layerId].name,
43
41
  }));
44
42
  // Modify schema to include layer options and layer name field
45
43
  if (options.schema) {
@@ -51,7 +49,7 @@ export class ProcessingFormDialog extends Dialog {
51
49
  if (!((_c = options.schema.properties) === null || _c === void 0 ? void 0 : _c.outputLayerName)) {
52
50
  options.schema.properties.outputLayerName = {
53
51
  type: 'string',
54
- title: 'outputLayerName'
52
+ title: 'outputLayerName',
55
53
  // default: ''
56
54
  };
57
55
  }
@@ -74,7 +72,7 @@ export class ProcessingFormDialog extends Dialog {
74
72
  super({
75
73
  title: options.title,
76
74
  body,
77
- buttons: [Dialog.cancelButton(), Dialog.okButton()]
75
+ buttons: [Dialog.cancelButton(), Dialog.okButton()],
78
76
  });
79
77
  this.okSignal = new Signal(this);
80
78
  const formErrorSignal = new Signal(this);
@@ -10,7 +10,7 @@ interface ILayerBrowserDialogProps {
10
10
  okSignalPromise: PromiseDelegate<Signal<Dialog<any>, number>>;
11
11
  cancel: () => void;
12
12
  }
13
- export declare const LayerBrowserComponent: ({ model, registry, formSchemaRegistry, okSignalPromise, cancel }: ILayerBrowserDialogProps) => React.JSX.Element;
13
+ export declare const LayerBrowserComponent: React.FC<ILayerBrowserDialogProps>;
14
14
  export interface ILayerBrowserOptions {
15
15
  model: IJupyterGISModel;
16
16
  registry: IRasterLayerGalleryEntry[];
@@ -4,9 +4,9 @@ import { Dialog } from '@jupyterlab/apputils';
4
4
  import { PromiseDelegate, UUID } from '@lumino/coreutils';
5
5
  import { Signal } from '@lumino/signaling';
6
6
  import React, { useEffect, useState } from 'react';
7
- import CUSTOM_RASTER_IMAGE from '../../rasterlayer_gallery/custom_raster.png';
8
7
  import { CreationFormWrapper } from './layerCreationFormDialog';
9
- export const LayerBrowserComponent = ({ model, registry, formSchemaRegistry, okSignalPromise, cancel }) => {
8
+ import CUSTOM_RASTER_IMAGE from '../../rasterlayer_gallery/custom_raster.png';
9
+ export const LayerBrowserComponent = ({ model, registry, formSchemaRegistry, okSignalPromise, cancel, }) => {
10
10
  const [searchTerm, setSearchTerm] = useState('');
11
11
  const [activeLayers, setActiveLayers] = useState([]);
12
12
  const [selectedCategory, setSelectedCategory] = useState();
@@ -54,15 +54,15 @@ export const LayerBrowserComponent = ({ model, registry, formSchemaRegistry, okS
54
54
  const sourceModel = {
55
55
  type: 'RasterSource',
56
56
  name: tile.name,
57
- parameters: tile.source
57
+ parameters: tile.source,
58
58
  };
59
59
  const layerModel = {
60
60
  type: 'RasterLayer',
61
61
  parameters: {
62
- source: sourceId
62
+ source: sourceId,
63
63
  },
64
64
  visible: true,
65
- name: tile.name + ' Layer'
65
+ name: tile.name + ' Layer',
66
66
  };
67
67
  model.sharedModel.addSource(sourceId, sourceModel);
68
68
  model.addLayer(UUID.uuid4(), layerModel);
@@ -74,12 +74,12 @@ export const LayerBrowserComponent = ({ model, registry, formSchemaRegistry, okS
74
74
  });
75
75
  return (React.createElement("div", { className: "jGIS-customlayer-form" },
76
76
  React.createElement(CreationFormWrapper, { model: model, formSchemaRegistry: formSchemaRegistry, createLayer: true, createSource: true, layerType: 'RasterLayer', sourceType: 'RasterSource', layerData: {
77
- name: 'Custom Raster'
77
+ name: 'Custom Raster',
78
78
  }, sourceData: {
79
79
  url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
80
80
  maxZoom: 24,
81
81
  minZoom: 0,
82
- attribution: '(C) OpenStreetMap contributors'
82
+ attribution: '(C) OpenStreetMap contributors',
83
83
  }, okSignalPromise: okSignalPromise, cancel: cancel })));
84
84
  }
85
85
  // Ok is like cancel in the case of gallery item selections
@@ -1,9 +1,9 @@
1
1
  import { IDict } from '@jupytergis/schema';
2
2
  import { Dialog } from '@jupyterlab/apputils';
3
- import * as React from 'react';
4
- import { ICreationFormProps } from '../formbuilder';
5
- import { Signal } from '@lumino/signaling';
6
3
  import { PromiseDelegate } from '@lumino/coreutils';
4
+ import { Signal } from '@lumino/signaling';
5
+ import * as React from 'react';
6
+ import { ICreationFormProps } from "../formbuilder";
7
7
  export interface ICreationFormWrapperProps extends ICreationFormProps {
8
8
  /**
9
9
  * A promise resolving when the dialog is ready.
@@ -25,7 +25,7 @@ export interface ICreationFormWrapperProps extends ICreationFormProps {
25
25
  export interface ICreationFormDialogOptions extends ICreationFormProps {
26
26
  title: string;
27
27
  }
28
- export declare const CreationFormWrapper: (props: ICreationFormWrapperProps) => false | React.JSX.Element;
28
+ export declare const CreationFormWrapper: React.FC<ICreationFormWrapperProps>;
29
29
  /**
30
30
  * Form for creating a source, a layer or both at the same time
31
31
  */
@@ -1,16 +1,16 @@
1
1
  import { Dialog } from '@jupyterlab/apputils';
2
- import * as React from 'react';
3
- import { CreationForm } from '../formbuilder';
4
- import { Signal } from '@lumino/signaling';
5
2
  import { PromiseDelegate } from '@lumino/coreutils';
6
- export const CreationFormWrapper = (props) => {
3
+ import { Signal } from '@lumino/signaling';
4
+ import * as React from 'react';
5
+ import { CreationForm } from "../formbuilder";
6
+ export const CreationFormWrapper = props => {
7
7
  var _a;
8
8
  const [ready, setReady] = React.useState(false);
9
9
  const okSignal = React.useRef();
10
10
  const formErrorSignal = React.useRef();
11
11
  Promise.all([
12
12
  props.okSignalPromise.promise,
13
- (_a = props.formErrorSignalPromise) === null || _a === void 0 ? void 0 : _a.promise
13
+ (_a = props.formErrorSignalPromise) === null || _a === void 0 ? void 0 : _a.promise,
14
14
  ]).then(([ok, formChanged]) => {
15
15
  okSignal.current = ok;
16
16
  formErrorSignal.current = formChanged;
@@ -33,7 +33,7 @@ export class LayerCreationFormDialog extends Dialog {
33
33
  super({
34
34
  title: options.title,
35
35
  body,
36
- buttons: [Dialog.cancelButton(), Dialog.okButton()]
36
+ buttons: [Dialog.cancelButton(), Dialog.okButton()],
37
37
  });
38
38
  this.okSignal = new Signal(this);
39
39
  const formErrorSignal = new Signal(this);
@@ -7,5 +7,5 @@ interface ICanvasSelectComponentProps {
7
7
  selectedRamp: string;
8
8
  setSelected: (item: any) => void;
9
9
  }
10
- declare const CanvasSelectComponent: ({ selectedRamp, setSelected }: ICanvasSelectComponentProps) => React.JSX.Element;
10
+ declare const CanvasSelectComponent: React.FC<ICanvasSelectComponentProps>;
11
11
  export default CanvasSelectComponent;
@@ -2,7 +2,7 @@ import { Button } from '@jupyterlab/ui-components';
2
2
  import colormap from 'colormap';
3
3
  import React, { useEffect, useRef, useState } from 'react';
4
4
  import ColorRampEntry from './ColorRampEntry';
5
- const CanvasSelectComponent = ({ selectedRamp, setSelected }) => {
5
+ const CanvasSelectComponent = ({ selectedRamp, setSelected, }) => {
6
6
  const colorRampNames = [
7
7
  'jet',
8
8
  // 'hsv', 11 steps min
@@ -45,7 +45,7 @@ const CanvasSelectComponent = ({ selectedRamp, setSelected }) => {
45
45
  'temperature',
46
46
  'turbidity',
47
47
  'velocity-blue',
48
- 'velocity-green'
48
+ 'velocity-green',
49
49
  // 'cubehelix' 16 steps min
50
50
  ];
51
51
  const containerRef = useRef(null);
@@ -57,7 +57,7 @@ const CanvasSelectComponent = ({ selectedRamp, setSelected }) => {
57
57
  const colorRamp = colormap({
58
58
  colormap: name,
59
59
  nshades: 255,
60
- format: 'rgbaString'
60
+ format: 'rgbaString',
61
61
  });
62
62
  const colorMap = { name: name, colors: colorRamp };
63
63
  colorMapList.push(colorMap);
@@ -1,15 +1,16 @@
1
- import React from 'react';
2
1
  import { IDict } from '@jupytergis/schema';
2
+ import React from 'react';
3
3
  interface IColorRampProps {
4
4
  modeOptions: string[];
5
5
  layerParams: IDict;
6
6
  classifyFunc: (selectedMode: string, numberOfShades: string, selectedRamp: string, setIsLoading: (isLoading: boolean) => void) => void;
7
7
  showModeRow: boolean;
8
+ showRampSelector: boolean;
8
9
  }
9
10
  export type ColorRampOptions = {
10
11
  selectedRamp: string;
11
12
  numberOfShades: string;
12
13
  selectedMode: string;
13
14
  };
14
- declare const ColorRamp: ({ layerParams, modeOptions, classifyFunc, showModeRow }: IColorRampProps) => React.JSX.Element;
15
+ declare const ColorRamp: React.FC<IColorRampProps>;
15
16
  export default ColorRamp;
@@ -1,17 +1,16 @@
1
1
  import { Button } from '@jupyterlab/ui-components';
2
2
  import React, { useEffect, useState } from 'react';
3
+ import { LoadingIcon } from "../../../../shared/components/loading";
3
4
  import CanvasSelectComponent from './CanvasSelectComponent';
4
- import { faSpinner } from '@fortawesome/free-solid-svg-icons';
5
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
6
5
  import ModeSelectRow from './ModeSelectRow';
7
- const ColorRamp = ({ layerParams, modeOptions, classifyFunc, showModeRow }) => {
6
+ const ColorRamp = ({ layerParams, modeOptions, classifyFunc, showModeRow, showRampSelector, }) => {
8
7
  const [selectedRamp, setSelectedRamp] = useState('');
9
8
  const [selectedMode, setSelectedMode] = useState('');
10
9
  const [numberOfShades, setNumberOfShades] = useState('');
11
10
  const [isLoading, setIsLoading] = useState(false);
12
11
  useEffect(() => {
13
12
  populateOptions();
14
- }, []);
13
+ }, [layerParams]);
15
14
  const populateOptions = async () => {
16
15
  let nClasses, singleBandMode, colorRamp;
17
16
  if (layerParams.symbologyState) {
@@ -24,10 +23,10 @@ const ColorRamp = ({ layerParams, modeOptions, classifyFunc, showModeRow }) => {
24
23
  setSelectedRamp(colorRamp ? colorRamp : 'cool');
25
24
  };
26
25
  return (React.createElement("div", { className: "jp-gis-color-ramp-container" },
27
- React.createElement("div", { className: "jp-gis-symbology-row" },
26
+ showRampSelector && (React.createElement("div", { className: "jp-gis-symbology-row" },
28
27
  React.createElement("label", { htmlFor: "color-ramp-select" }, "Color Ramp:"),
29
- React.createElement(CanvasSelectComponent, { selectedRamp: selectedRamp, setSelected: setSelectedRamp })),
28
+ React.createElement(CanvasSelectComponent, { selectedRamp: selectedRamp, setSelected: setSelectedRamp }))),
30
29
  showModeRow && (React.createElement(ModeSelectRow, { modeOptions: modeOptions, numberOfShades: numberOfShades, setNumberOfShades: setNumberOfShades, selectedMode: selectedMode, setSelectedMode: setSelectedMode })),
31
- isLoading ? (React.createElement(FontAwesomeIcon, { icon: faSpinner, className: "jp-gis-loading-spinner" })) : (React.createElement(Button, { className: "jp-Dialog-button jp-mod-accept jp-mod-styled", onClick: () => classifyFunc(selectedMode, numberOfShades, selectedRamp, setIsLoading) }, "Classify"))));
30
+ isLoading ? (React.createElement(LoadingIcon, null)) : (React.createElement(Button, { className: "jp-Dialog-button jp-mod-accept jp-mod-styled", onClick: () => classifyFunc(selectedMode, numberOfShades, selectedRamp, setIsLoading) }, "Classify"))));
32
31
  };
33
32
  export default ColorRamp;
@@ -5,5 +5,5 @@ interface IColorRampEntryProps {
5
5
  colorMap: IColorMap;
6
6
  onClick: (item: any) => void;
7
7
  }
8
- declare const ColorRampEntry: ({ index, colorMap, onClick }: IColorRampEntryProps) => React.JSX.Element;
8
+ declare const ColorRampEntry: React.FC<IColorRampEntryProps>;
9
9
  export default ColorRampEntry;
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from 'react';
2
- const ColorRampEntry = ({ index, colorMap, onClick }) => {
2
+ const ColorRampEntry = ({ index, colorMap, onClick, }) => {
3
3
  const canvasHeight = 30;
4
4
  useEffect(() => {
5
5
  const canvas = document.getElementById(`cv-${index}`);
@@ -6,5 +6,5 @@ interface IModeSelectRowProps {
6
6
  setSelectedMode: (value: string) => void;
7
7
  modeOptions: string[];
8
8
  }
9
- declare const ModeSelectRow: ({ numberOfShades, setNumberOfShades, selectedMode, setSelectedMode, modeOptions }: IModeSelectRowProps) => React.JSX.Element;
9
+ declare const ModeSelectRow: React.FC<IModeSelectRowProps>;
10
10
  export default ModeSelectRow;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- const ModeSelectRow = ({ numberOfShades, setNumberOfShades, selectedMode, setSelectedMode, modeOptions }) => {
2
+ const ModeSelectRow = ({ numberOfShades, setNumberOfShades, selectedMode, setSelectedMode, modeOptions, }) => {
3
3
  return (React.createElement("div", { className: "jp-gis-symbology-row" },
4
4
  React.createElement("div", { className: "jp-gis-color-ramp-div" },
5
5
  React.createElement("label", { htmlFor: "class-number-input" }, "Classes:"),
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { IStopRow } from '../../symbologyDialog';
2
+ import { IStopRow } from "../../symbologyDialog";
3
3
  interface IStopContainerProps {
4
4
  selectedMethod: string;
5
5
  stopRows: IStopRow[];
6
6
  setStopRows: (stops: IStopRow[]) => void;
7
7
  }
8
- declare const StopContainer: ({ selectedMethod, stopRows, setStopRows }: IStopContainerProps) => React.JSX.Element;
8
+ declare const StopContainer: React.FC<IStopContainerProps>;
9
9
  export default StopContainer;
@@ -1,14 +1,14 @@
1
- import React from 'react';
2
1
  import { Button } from '@jupyterlab/ui-components';
2
+ import React from 'react';
3
3
  import StopRow from './StopRow';
4
- const StopContainer = ({ selectedMethod, stopRows, setStopRows }) => {
4
+ const StopContainer = ({ selectedMethod, stopRows, setStopRows, }) => {
5
5
  const addStopRow = () => {
6
6
  setStopRows([
7
7
  {
8
8
  stop: 0,
9
- output: [0, 0, 0, 1]
9
+ output: [0, 0, 0, 1],
10
10
  },
11
- ...stopRows
11
+ ...stopRows,
12
12
  ]);
13
13
  };
14
14
  const deleteStopRow = (index) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { IStopRow } from '../../symbologyDialog';
3
- declare const StopRow: ({ index, value, outputValue, stopRows, setStopRows, deleteRow, useNumber }: {
2
+ import { IStopRow } from "../../symbologyDialog";
3
+ declare const StopRow: React.FC<{
4
4
  index: number;
5
5
  value: number;
6
6
  outputValue: number | number[];
@@ -8,5 +8,5 @@ declare const StopRow: ({ index, value, outputValue, stopRows, setStopRows, dele
8
8
  setStopRows: (stopRows: IStopRow[]) => void;
9
9
  deleteRow: () => void;
10
10
  useNumber?: boolean;
11
- }) => React.JSX.Element;
11
+ }>;
12
12
  export default StopRow;
@@ -2,7 +2,7 @@ import { faTrash } from '@fortawesome/free-solid-svg-icons';
2
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
3
  import { Button } from '@jupyterlab/ui-components';
4
4
  import React, { useEffect, useRef } from 'react';
5
- const StopRow = ({ index, value, outputValue, stopRows, setStopRows, deleteRow, useNumber }) => {
5
+ const StopRow = ({ index, value, outputValue, stopRows, setStopRows, deleteRow, useNumber, }) => {
6
6
  const inputRef = useRef(null);
7
7
  useEffect(() => {
8
8
  var _a;
@@ -32,7 +32,7 @@ const StopRow = ({ index, value, outputValue, stopRows, setStopRows, deleteRow,
32
32
  parseInt(result[1], 16),
33
33
  parseInt(result[2], 16),
34
34
  parseInt(result[3], 16),
35
- 1 // TODO: Make alpha customizable?
35
+ 1, // TODO: Make alpha customizable?
36
36
  ];
37
37
  return rgbValues;
38
38
  };
@@ -1,6 +1,6 @@
1
- import { useEffect, useState } from 'react';
2
1
  import { fromUrl, fromBlob } from 'geotiff';
3
- import { loadFile } from '../../../tools';
2
+ import { useEffect, useState } from 'react';
3
+ import { loadFile } from "../../../tools";
4
4
  const useGetBandInfo = (model, layer) => {
5
5
  const [bandRows, setBandRows] = useState([]);
6
6
  const [loading, setLoading] = useState(false);
@@ -29,7 +29,7 @@ const useGetBandInfo = (model, layer) => {
29
29
  const preloadedFile = await loadFile({
30
30
  filepath: sourceInfo.url,
31
31
  type: 'GeoTiffSource',
32
- model
32
+ model,
33
33
  });
34
34
  if (!preloadedFile.file) {
35
35
  setError('Failed to load local file.');
@@ -45,8 +45,8 @@ const useGetBandInfo = (model, layer) => {
45
45
  band: i,
46
46
  stats: {
47
47
  minimum: (_c = sourceInfo.min) !== null && _c !== void 0 ? _c : 0,
48
- maximum: (_d = sourceInfo.max) !== null && _d !== void 0 ? _d : 100
49
- }
48
+ maximum: (_d = sourceInfo.max) !== null && _d !== void 0 ? _d : 100,
49
+ },
50
50
  });
51
51
  }
52
52
  setBandRows(bandsArr);
@@ -8,5 +8,5 @@ interface IUseGetPropertiesResult {
8
8
  isLoading: boolean;
9
9
  error?: Error;
10
10
  }
11
- export declare const useGetProperties: ({ layerId, model }: IUseGetPropertiesProps) => IUseGetPropertiesResult;
11
+ export declare const useGetProperties: ({ layerId, model, }: IUseGetPropertiesProps) => IUseGetPropertiesResult;
12
12
  export {};
@@ -1,10 +1,10 @@
1
1
  // import { GeoJSONFeature } from 'geojson';
2
2
  import { useEffect, useState } from 'react';
3
- import { loadFile } from '../../../tools';
4
- export const useGetProperties = ({ layerId, model }) => {
3
+ import { loadFile } from "../../../tools";
4
+ export const useGetProperties = ({ layerId, model, }) => {
5
5
  const [featureProperties, setFeatureProperties] = useState({});
6
6
  const [isLoading, setIsLoading] = useState(true);
7
- const [error, setError] = useState(undefined);
7
+ const [error, setError] = useState();
8
8
  const getProperties = async () => {
9
9
  var _a, _b;
10
10
  if (!layerId) {
@@ -19,7 +19,7 @@ export const useGetProperties = ({ layerId, model }) => {
19
19
  const data = await loadFile({
20
20
  filepath: (_b = source.parameters) === null || _b === void 0 ? void 0 : _b.path,
21
21
  type: 'GeoJSONSource',
22
- model: model
22
+ model: model,
23
23
  });
24
24
  if (!data) {
25
25
  throw new Error('Failed to read GeoJSON data');