@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
@@ -13,8 +13,8 @@ import { Slider } from '@jupyter/react-components';
13
13
  import { FormComponent } from '@jupyterlab/ui-components';
14
14
  import validatorAjv8 from '@rjsf/validator-ajv8';
15
15
  import * as React from 'react';
16
- import { deepCopy } from '../../tools';
17
- const WrappedFormComponent = (props) => {
16
+ import { deepCopy } from "../../tools";
17
+ const WrappedFormComponent = props => {
18
18
  const { fields } = props, rest = __rest(props, ["fields"]);
19
19
  return (React.createElement(FormComponent, Object.assign({}, rest, { validator: validatorAjv8, fields: Object.assign({}, fields) })));
20
20
  };
@@ -29,7 +29,7 @@ export class BaseForm extends React.Component {
29
29
  this.currentFormData = deepCopy(this.props.sourceData);
30
30
  this.state = {
31
31
  schema: props.schema,
32
- extraErrors: {}
32
+ extraErrors: {},
33
33
  };
34
34
  }
35
35
  componentDidUpdate(prevProps, prevState) {
@@ -57,13 +57,13 @@ export class BaseForm extends React.Component {
57
57
  uiSchema[k] = Object.assign({ 'ui:options': {
58
58
  orderable: false,
59
59
  removable: false,
60
- addable: false
60
+ addable: false,
61
61
  } }, uiSchema[k]);
62
62
  if (v['items']['type'] === 'array') {
63
63
  uiSchema[k] = Object.assign({ items: Object.assign({ 'ui:options': {
64
64
  orderable: false,
65
65
  removable: false,
66
- addable: false
66
+ addable: false,
67
67
  } }, uiSchema[k]['items']) }, uiSchema[k]);
68
68
  }
69
69
  }
@@ -103,9 +103,9 @@ export class BaseForm extends React.Component {
103
103
  border: '1px solid #ccc',
104
104
  borderRadius: '4px',
105
105
  padding: '4px',
106
- marginBottom: '5px'
106
+ marginBottom: '5px',
107
107
  } })));
108
- }
108
+ },
109
109
  };
110
110
  }
111
111
  // Don't show readOnly properties when it's a form for updating an object
@@ -130,7 +130,9 @@ export class BaseForm extends React.Component {
130
130
  if (data) {
131
131
  delete data[entry];
132
132
  }
133
- delete schema.properties[entry];
133
+ if (schema.properties) {
134
+ delete schema.properties[entry];
135
+ }
134
136
  delete uiSchema[entry];
135
137
  if (schema.required && schema.required.includes(entry)) {
136
138
  schema.required.splice(schema.required.indexOf(entry), 1);
@@ -151,6 +153,9 @@ export class BaseForm extends React.Component {
151
153
  const extraErrors = Object.keys(this.state.extraErrors).length > 0;
152
154
  this.props.formErrorSignal.emit(extraErrors);
153
155
  }
156
+ if (this.props.formContext === 'update') {
157
+ this.syncData(this.currentFormData);
158
+ }
154
159
  }
155
160
  onFormBlur(id, value) {
156
161
  // This is a no-op here
@@ -168,8 +173,8 @@ export class BaseForm extends React.Component {
168
173
  const uiSchema = {
169
174
  additionalProperties: {
170
175
  'ui:label': false,
171
- classNames: 'jGIS-hidden-field'
172
- }
176
+ classNames: 'jGIS-hidden-field',
177
+ },
173
178
  };
174
179
  this.processSchema(formData, schema, uiSchema);
175
180
  const submitRef = React.createRef();
@@ -186,10 +191,7 @@ export class BaseForm extends React.Component {
186
191
  (_a = submitRef.current) === null || _a === void 0 ? void 0 : _a.click();
187
192
  }
188
193
  } },
189
- React.createElement(WrappedFormComponent, { schema: schema, uiSchema: uiSchema, formData: formData, onSubmit: this.onFormSubmit.bind(this), onChange: this.onFormChange.bind(this), onBlur: this.onFormBlur.bind(this), ok: this.props.ok, cancel: this.props.cancel, liveValidate: true, children: React.createElement("button", { ref: submitRef, type: "submit", style: { display: 'none' } }), extraErrors: this.state.extraErrors })),
190
- !this.props.ok && (React.createElement("div", { className: "jGIS-property-buttons" },
191
- React.createElement("button", { className: "jp-Dialog-button jp-mod-accept jp-mod-styled", onClick: () => { var _a; return (_a = submitRef.current) === null || _a === void 0 ? void 0 : _a.click(); } },
192
- React.createElement("div", { className: "jp-Dialog-buttonLabel" }, "Ok"))))));
194
+ React.createElement(WrappedFormComponent, { schema: schema, uiSchema: uiSchema, formData: formData, onSubmit: this.onFormSubmit.bind(this), onChange: this.onFormChange.bind(this), onBlur: this.onFormBlur.bind(this), ok: this.props.ok, cancel: this.props.cancel, liveValidate: true, children: React.createElement("button", { ref: submitRef, type: "submit", style: { display: 'none' } }), extraErrors: this.state.extraErrors }))));
193
195
  }
194
196
  }
195
197
  }
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const FileSelectorWidget: (props: any) => React.JSX.Element;
2
+ export declare const FileSelectorWidget: React.FC<any>;
@@ -1,9 +1,9 @@
1
- import React, { useState, useEffect, useRef } from 'react';
2
- import { FileDialog } from '@jupyterlab/filebrowser';
3
1
  import { Dialog } from '@jupyterlab/apputils';
4
- import { LayerCreationFormDialog } from '../../dialogs/layerCreationFormDialog';
5
2
  import { PathExt } from '@jupyterlab/coreutils';
6
- export const FileSelectorWidget = (props) => {
3
+ import { FileDialog } from '@jupyterlab/filebrowser';
4
+ import React, { useState, useEffect, useRef } from 'react';
5
+ import { LayerCreationFormDialog } from "../../dialogs/layerCreationFormDialog";
6
+ export const FileSelectorWidget = props => {
7
7
  const { options } = props;
8
8
  const { docManager, formOptions } = options;
9
9
  const [serverFilePath, setServerFilePath] = useState('');
@@ -36,7 +36,7 @@ export const FileSelectorWidget = (props) => {
36
36
  }
37
37
  const output = await FileDialog.getOpenFiles({
38
38
  title: `Select ${formOptions.sourceType.split('Source')[0]} File`,
39
- manager: docManager
39
+ manager: docManager,
40
40
  });
41
41
  if (output.value && output.value.length > 0) {
42
42
  const selectedFilePath = output.value[0].path;
@@ -1,4 +1,4 @@
1
- import { loadFile } from '../../../tools';
1
+ import { loadFile } from "../../../tools";
2
2
  import { LayerPropertiesForm } from './layerform';
3
3
  export class HeatmapLayerPropertiesForm extends LayerPropertiesForm {
4
4
  constructor(props) {
@@ -51,7 +51,7 @@ export class HeatmapLayerPropertiesForm extends LayerPropertiesForm {
51
51
  const jsonData = await loadFile({
52
52
  filepath: source.parameters.path,
53
53
  type: 'GeoJSONSource',
54
- model: this.props.model
54
+ model: this.props.model,
55
55
  });
56
56
  const featureProps = jsonData.features[0].properties;
57
57
  this.features = Object.keys(featureProps);
@@ -6,7 +6,7 @@ export class HillshadeLayerPropertiesForm extends LayerPropertiesForm {
6
6
  processSchema(data, schema, uiSchema) {
7
7
  super.processSchema(data, schema, uiSchema);
8
8
  uiSchema['shadowColor'] = {
9
- 'ui:widget': 'color'
9
+ 'ui:widget': 'color',
10
10
  };
11
11
  }
12
12
  }
@@ -1,7 +1,7 @@
1
1
  import { IDict, SourceType } from '@jupytergis/schema';
2
- import { BaseForm, IBaseFormProps } from '../baseform';
3
2
  import { Signal } from '@lumino/signaling';
4
3
  import { IChangeEvent } from '@rjsf/core';
4
+ import { BaseForm, IBaseFormProps } from "../baseform";
5
5
  export interface ILayerProps extends IBaseFormProps {
6
6
  /**
7
7
  * The source type for the layer
@@ -1,12 +1,13 @@
1
- import { BaseForm } from '../baseform';
1
+ import { BaseForm, } from "../baseform";
2
2
  export class LayerPropertiesForm extends BaseForm {
3
3
  constructor(props) {
4
4
  super(props);
5
5
  this.sourceFormChangedSignal = props.sourceFormChangedSignal;
6
6
  }
7
7
  processSchema(data, schema, uiSchema) {
8
+ var _a;
8
9
  super.processSchema(data, schema, uiSchema);
9
- if (!schema.properties.source) {
10
+ if (!((_a = schema.properties) === null || _a === void 0 ? void 0 : _a.source)) {
10
11
  return;
11
12
  }
12
13
  // Replace the source text box by a dropdown menu
@@ -1,6 +1,6 @@
1
- import { BaseForm, IBaseFormProps } from '../baseform';
2
1
  import { IDict, IJupyterGISModel } from '@jupytergis/schema';
3
2
  import { IChangeEvent } from '@rjsf/core';
3
+ import { BaseForm, IBaseFormProps } from "../baseform";
4
4
  interface IDissolveFormOptions extends IBaseFormProps {
5
5
  schema: IDict;
6
6
  sourceData: IDict;
@@ -1,5 +1,5 @@
1
- import { BaseForm } from '../baseform'; // Ensure BaseForm imports states
2
- import { loadFile } from '../../../tools';
1
+ import { BaseForm, } from "../baseform"; // Ensure BaseForm imports states
2
+ import { loadFile } from "../../../tools";
3
3
  export class DissolveForm extends BaseForm {
4
4
  constructor(options) {
5
5
  var _a;
@@ -8,7 +8,7 @@ export class DissolveForm extends BaseForm {
8
8
  this.model = options.model;
9
9
  // Ensure initial state matches IBaseFormStates
10
10
  this.state = {
11
- schema: (_a = options.schema) !== null && _a !== void 0 ? _a : {} // Ensure schema is never undefined
11
+ schema: (_a = options.schema) !== null && _a !== void 0 ? _a : {}, // Ensure schema is never undefined
12
12
  };
13
13
  this.onFormChange = this.handleFormChange.bind(this);
14
14
  this.fetchFieldNames(options.sourceData.inputLayer);
@@ -31,7 +31,7 @@ export class DissolveForm extends BaseForm {
31
31
  const jsonData = await loadFile({
32
32
  filepath: sourceData.path,
33
33
  type: 'GeoJSONSource',
34
- model: this.model
34
+ model: this.model,
35
35
  });
36
36
  if (!((_b = jsonData === null || jsonData === void 0 ? void 0 : jsonData.features) === null || _b === void 0 ? void 0 : _b.length)) {
37
37
  return;
@@ -53,7 +53,7 @@ export class DissolveForm extends BaseForm {
53
53
  this.setState((prevState) => {
54
54
  var _a, _b, _c;
55
55
  return ({
56
- schema: Object.assign(Object.assign({}, prevState.schema), { properties: Object.assign(Object.assign({}, (_a = prevState.schema) === null || _a === void 0 ? void 0 : _a.properties), { dissolveField: Object.assign(Object.assign({}, (_c = (_b = prevState.schema) === null || _b === void 0 ? void 0 : _b.properties) === null || _c === void 0 ? void 0 : _c.dissolveField), { enum: [...this.features] }) }) })
56
+ schema: Object.assign(Object.assign({}, prevState.schema), { properties: Object.assign(Object.assign({}, (_a = prevState.schema) === null || _a === void 0 ? void 0 : _a.properties), { dissolveField: Object.assign(Object.assign({}, (_c = (_b = prevState.schema) === null || _b === void 0 ? void 0 : _b.properties) === null || _c === void 0 ? void 0 : _c.dissolveField), { enum: [...this.features] }) }) }),
57
57
  });
58
58
  }, () => {
59
59
  this.forceUpdate();
@@ -1,7 +1,7 @@
1
- import { Ajv } from 'ajv';
2
1
  import * as geojson from '@jupytergis/schema/src/schema/geojson.json';
2
+ import { Ajv } from 'ajv';
3
+ import { loadFile } from "../../../tools";
3
4
  import { PathBasedSourcePropertiesForm } from './pathbasedsource';
4
- import { loadFile } from '../../../tools';
5
5
  /**
6
6
  * The form to modify a GeoJSON source.
7
7
  */
@@ -34,7 +34,7 @@ export class GeoJSONSourcePropertiesForm extends PathBasedSourcePropertiesForm {
34
34
  const geoJSONData = await loadFile({
35
35
  filepath: path,
36
36
  type: this.props.sourceType,
37
- model: this.props.model
37
+ model: this.props.model,
38
38
  });
39
39
  valid = this._validate(geoJSONData);
40
40
  if (!valid) {
@@ -50,7 +50,7 @@ export class GeoJSONSourcePropertiesForm extends PathBasedSourcePropertiesForm {
50
50
  }
51
51
  if (!valid) {
52
52
  extraErrors.path = {
53
- __errors: [error]
53
+ __errors: [error],
54
54
  };
55
55
  (_a = this._validate.errors) === null || _a === void 0 ? void 0 : _a.reverse().forEach(error => {
56
56
  extraErrors.path.__errors.push(error.message);
@@ -1,7 +1,7 @@
1
1
  import { showErrorMessage } from '@jupyterlab/apputils';
2
- import { getMimeType } from '../../../tools';
2
+ import { FileSelectorWidget } from "../fileselectorwidget";
3
+ import { getMimeType } from "../../../tools";
3
4
  import { SourcePropertiesForm } from './sourceform';
4
- import { FileSelectorWidget } from '../fileselectorwidget';
5
5
  /**
6
6
  * The form to modify a GeoTiff source.
7
7
  */
@@ -25,8 +25,8 @@ export class GeoTiffSourcePropertiesForm extends SourcePropertiesForm {
25
25
  'ui:widget': FileSelectorWidget,
26
26
  'ui:options': {
27
27
  docManager,
28
- formOptions: this.props
29
- }
28
+ formOptions: this.props,
29
+ },
30
30
  } }) });
31
31
  }
32
32
  // This is not user-editable
@@ -1,6 +1,6 @@
1
1
  import { showErrorMessage } from '@jupyterlab/apputils';
2
- import { loadFile } from '../../../tools';
3
- import { FileSelectorWidget } from '../fileselectorwidget';
2
+ import { FileSelectorWidget } from "../fileselectorwidget";
3
+ import { loadFile } from "../../../tools";
4
4
  import { SourcePropertiesForm } from './sourceform';
5
5
  /**
6
6
  * The form to modify a PathBasedSource source.
@@ -26,8 +26,8 @@ export class PathBasedSourcePropertiesForm extends SourcePropertiesForm {
26
26
  'ui:widget': FileSelectorWidget,
27
27
  'ui:options': {
28
28
  docManager,
29
- formOptions: this.props
30
- }
29
+ formOptions: this.props,
30
+ },
31
31
  };
32
32
  }
33
33
  // This is not user-editable
@@ -74,7 +74,7 @@ export class PathBasedSourcePropertiesForm extends SourcePropertiesForm {
74
74
  await loadFile({
75
75
  filepath: path,
76
76
  type: this.props.sourceType,
77
- model: this.props.model
77
+ model: this.props.model,
78
78
  });
79
79
  }
80
80
  catch (e) {
@@ -84,7 +84,7 @@ export class PathBasedSourcePropertiesForm extends SourcePropertiesForm {
84
84
  }
85
85
  if (!valid) {
86
86
  extraErrors.path = {
87
- __errors: [error]
87
+ __errors: [error],
88
88
  };
89
89
  this.setState(old => (Object.assign(Object.assign({}, old), { extraErrors })));
90
90
  }
@@ -1,7 +1,7 @@
1
1
  import { IDict, SourceType } from '@jupytergis/schema';
2
- import { BaseForm, IBaseFormProps } from '../baseform';
3
2
  import { Signal } from '@lumino/signaling';
4
3
  import { IChangeEvent } from '@rjsf/core';
4
+ import { BaseForm, IBaseFormProps } from "../baseform";
5
5
  export interface ISourceFormProps extends IBaseFormProps {
6
6
  /**
7
7
  * The source type for this form.
@@ -1,4 +1,4 @@
1
- import { BaseForm } from '../baseform';
1
+ import { BaseForm, } from "../baseform";
2
2
  export class SourcePropertiesForm extends BaseForm {
3
3
  constructor(props) {
4
4
  super(props);
@@ -29,7 +29,7 @@ export class TileSourcePropertiesForm extends SourcePropertiesForm {
29
29
  schema.properties.urlParameters = {
30
30
  type: 'object',
31
31
  required: this._urlParameters,
32
- properties: propertiesSchema
32
+ properties: propertiesSchema,
33
33
  };
34
34
  for (const parameterName of this._urlParameters) {
35
35
  switch (parameterName) {
@@ -37,12 +37,12 @@ export class TileSourcePropertiesForm extends SourcePropertiesForm {
37
37
  case 'time':
38
38
  propertiesSchema[parameterName] = {
39
39
  type: 'string',
40
- format: 'date'
40
+ format: 'date',
41
41
  };
42
42
  break;
43
43
  default:
44
44
  propertiesSchema[parameterName] = {
45
- type: 'string'
45
+ type: 'string',
46
46
  };
47
47
  break;
48
48
  }
package/lib/gdal.js CHANGED
@@ -6,9 +6,9 @@ export async function getGdal() {
6
6
  return await initGdalJs({
7
7
  paths: {
8
8
  wasm: wasmurl.href,
9
- data: dataurl.href
9
+ data: dataurl.href,
10
10
  },
11
- useWorker: false
11
+ useWorker: false,
12
12
  });
13
13
  }
14
14
  // Early load gdal
package/lib/icons.js CHANGED
@@ -4,88 +4,88 @@
4
4
  */
5
5
  // This file is based on iconimports.ts in @jupyterlab/ui-components, but is manually generated.
6
6
  import { LabIcon } from '@jupyterlab/ui-components';
7
+ import bookOpenSvgStr from '../style/icons/book_open.svg';
8
+ import clockSvgStr from '../style/icons/clock-solid.svg';
9
+ import geoJsonSvgStr from '../style/icons/geojson.svg';
10
+ import geolocationSvgStr from '../style/icons/geolocation.svg';
11
+ import infoSvgStr from '../style/icons/info-solid.svg';
7
12
  import logoSvgStr from '../style/icons/logo.svg';
8
13
  import logoMiniSvgStr from '../style/icons/logo_mini.svg';
9
14
  import logoMiniAlternativeSvgStr from '../style/icons/logo_mini_alternative.svg';
10
- import rasterSvgStr from '../style/icons/raster.svg';
11
- import visibilitySvgStr from '../style/icons/visibility.svg';
12
- import nonVisibilitySvgStr from '../style/icons/nonvisibility.svg';
13
- import geoJsonSvgStr from '../style/icons/geojson.svg';
14
- import moundSvgStr from '../style/icons/mound.svg';
15
15
  import logoMiniQGZ from '../style/icons/logo_mini_qgz.svg';
16
- import bookOpenSvgStr from '../style/icons/book_open.svg';
17
- import vectorSquareSvgStr from '../style/icons/vector_square.svg';
18
- import infoSvgStr from '../style/icons/info-solid.svg';
19
- import clockSvgStr from '../style/icons/clock-solid.svg';
20
- import terminalToolbarSvgStr from '../style/icons/terminal_toolbar.svg';
21
- import geolocationSvgStr from '../style/icons/geolocation.svg';
22
- import targetWithoutCenterSvgStr from '../style/icons/target_without_center.svg';
16
+ import moundSvgStr from '../style/icons/mound.svg';
17
+ import nonVisibilitySvgStr from '../style/icons/nonvisibility.svg';
18
+ import rasterSvgStr from '../style/icons/raster.svg';
23
19
  import targetWithCenterSvgStr from '../style/icons/target_with_center.svg';
20
+ import targetWithoutCenterSvgStr from '../style/icons/target_without_center.svg';
21
+ import terminalToolbarSvgStr from '../style/icons/terminal_toolbar.svg';
22
+ import vectorSquareSvgStr from '../style/icons/vector_square.svg';
23
+ import visibilitySvgStr from '../style/icons/visibility.svg';
24
24
  export const logoIcon = new LabIcon({
25
25
  name: 'jupytergis::logo',
26
- svgstr: logoSvgStr
26
+ svgstr: logoSvgStr,
27
27
  });
28
28
  export const logoMiniIcon = new LabIcon({
29
29
  name: 'jupytergis::logoMini',
30
- svgstr: logoMiniSvgStr
30
+ svgstr: logoMiniSvgStr,
31
31
  });
32
32
  export const logoMiniAlternativeIcon = new LabIcon({
33
33
  name: 'jupytergis::logoMiniAlternative',
34
- svgstr: logoMiniAlternativeSvgStr
34
+ svgstr: logoMiniAlternativeSvgStr,
35
35
  });
36
36
  export const rasterIcon = new LabIcon({
37
37
  name: 'jupytergis::raster',
38
- svgstr: rasterSvgStr
38
+ svgstr: rasterSvgStr,
39
39
  });
40
40
  export const visibilityIcon = new LabIcon({
41
41
  name: 'jupytergis::visibility',
42
- svgstr: visibilitySvgStr
42
+ svgstr: visibilitySvgStr,
43
43
  });
44
44
  export const nonVisibilityIcon = new LabIcon({
45
45
  name: 'jupytergis::nonVisibility',
46
- svgstr: nonVisibilitySvgStr
46
+ svgstr: nonVisibilitySvgStr,
47
47
  });
48
48
  export const geoJSONIcon = new LabIcon({
49
49
  name: 'jupytergis::geoJSON',
50
- svgstr: geoJsonSvgStr
50
+ svgstr: geoJsonSvgStr,
51
51
  });
52
52
  export const moundIcon = new LabIcon({
53
53
  name: 'jupytergis::mound',
54
- svgstr: moundSvgStr
54
+ svgstr: moundSvgStr,
55
55
  });
56
56
  export const logoMiniIconQGZ = new LabIcon({
57
57
  name: 'jupytergis::logoQGZ',
58
- svgstr: logoMiniQGZ
58
+ svgstr: logoMiniQGZ,
59
59
  });
60
60
  export const bookOpenIcon = new LabIcon({
61
61
  name: 'jupytergis::bookOpen',
62
- svgstr: bookOpenSvgStr
62
+ svgstr: bookOpenSvgStr,
63
63
  });
64
64
  export const vectorSquareIcon = new LabIcon({
65
65
  name: 'jupytergis::vectorSquare',
66
- svgstr: vectorSquareSvgStr
66
+ svgstr: vectorSquareSvgStr,
67
67
  });
68
68
  export const infoIcon = new LabIcon({
69
69
  name: 'jupytergis::info',
70
- svgstr: infoSvgStr
70
+ svgstr: infoSvgStr,
71
71
  });
72
72
  export const clockIcon = new LabIcon({
73
73
  name: 'jupytergis::clock',
74
- svgstr: clockSvgStr
74
+ svgstr: clockSvgStr,
75
75
  });
76
76
  export const terminalToolbarIcon = new LabIcon({
77
77
  name: 'jupytergis::terminalToolbar',
78
- svgstr: terminalToolbarSvgStr
78
+ svgstr: terminalToolbarSvgStr,
79
79
  });
80
80
  export const geolocationIcon = new LabIcon({
81
81
  name: 'jupytergis::geolocation',
82
- svgstr: geolocationSvgStr
82
+ svgstr: geolocationSvgStr,
83
83
  });
84
84
  export const targetWithoutCenterIcon = new LabIcon({
85
85
  name: 'jupytergis::targetWithCenter',
86
- svgstr: targetWithCenterSvgStr
86
+ svgstr: targetWithCenterSvgStr,
87
87
  });
88
88
  export const targetWithCenterIcon = new LabIcon({
89
89
  name: 'jupytergis::targetWithoutCenter',
90
- svgstr: targetWithoutCenterSvgStr
90
+ svgstr: targetWithoutCenterSvgStr,
91
91
  });
package/lib/index.d.ts CHANGED
@@ -1,14 +1,16 @@
1
+ export * from './annotations';
1
2
  export * from './classificationModes';
2
- export * from './commands';
3
+ export * from './commands/index';
3
4
  export * from './constants';
4
5
  export * from './dialogs/layerCreationFormDialog';
5
6
  export * from './formbuilder/objectform/baseform';
6
7
  export * from './icons';
7
8
  export * from './mainview';
9
+ export * from './menus';
8
10
  export * from './panelview';
11
+ export * from './stacBrowser';
9
12
  export * from './store';
10
13
  export * from './toolbar';
11
14
  export * from './tools';
12
15
  export * from './types';
13
16
  export * from './widget';
14
- export * from './annotations';
package/lib/index.js CHANGED
@@ -1,14 +1,16 @@
1
+ export * from './annotations';
1
2
  export * from './classificationModes';
2
- export * from './commands';
3
+ export * from './commands/index';
3
4
  export * from './constants';
4
5
  export * from './dialogs/layerCreationFormDialog';
5
6
  export * from './formbuilder/objectform/baseform';
6
7
  export * from './icons';
7
8
  export * from './mainview';
9
+ export * from './menus';
8
10
  export * from './panelview';
11
+ export * from './stacBrowser';
9
12
  export * from './store';
10
13
  export * from './toolbar';
11
14
  export * from './tools';
12
15
  export * from './types';
13
16
  export * from './widget';
14
- export * from './annotations';
@@ -13,5 +13,5 @@ export type ClientPointer = {
13
13
  longitude: number;
14
14
  };
15
15
  };
16
- declare const CollaboratorPointers: ({ clients }: ICollaboratorPointersProps) => React.JSX.Element;
16
+ declare const CollaboratorPointers: React.FC<ICollaboratorPointersProps>;
17
17
  export default CollaboratorPointers;
@@ -1,23 +1,23 @@
1
- import { faArrowPointer, faWindowMinimize } from '@fortawesome/free-solid-svg-icons';
1
+ import { faArrowPointer, faWindowMinimize, } from '@fortawesome/free-solid-svg-icons';
2
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
3
  import React, { useState } from 'react';
4
- const CollaboratorPointers = ({ clients }) => {
4
+ const CollaboratorPointers = ({ clients, }) => {
5
5
  const [isOpen, setIsOpen] = useState(false);
6
6
  return (React.createElement(React.Fragment, null, clients &&
7
7
  Object.values(clients).map(client => (React.createElement("div", { className: "jGIS-Popup-Wrapper", style: {
8
8
  left: `${client.coordinates.x}px`,
9
- top: `${client.coordinates.y}px`
9
+ top: `${client.coordinates.y}px`,
10
10
  } },
11
11
  React.createElement("div", { key: client.username, className: "jGIS-Remote-Pointer", style: {
12
12
  color: client.color,
13
- cursor: 'pointer'
13
+ cursor: 'pointer',
14
14
  }, onClick: () => {
15
15
  setIsOpen(!isOpen);
16
16
  } },
17
17
  React.createElement(FontAwesomeIcon, { icon: faArrowPointer, className: "jGIS-Remote-Pointer-Icon" })),
18
18
  React.createElement("div", { style: {
19
19
  visibility: isOpen ? 'visible' : 'hidden',
20
- background: client.color
20
+ background: client.color,
21
21
  }, className: "jGIS-Remote-Pointer-Popup jGIS-Floating-Pointer-Popup" },
22
22
  React.createElement("div", { className: "jGIS-Popup-Topbar", onClick: () => {
23
23
  setIsOpen(false);
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
1
  import { User } from '@jupyterlab/services';
2
+ import React from 'react';
3
3
  interface IFollowIndicatorProps {
4
4
  remoteUser: User.IIdentity | null | undefined;
5
5
  }
6
- export declare function FollowIndicator({ remoteUser }: IFollowIndicatorProps): React.JSX.Element | null;
6
+ export declare const FollowIndicator: React.FC<IFollowIndicatorProps>;
7
7
  export {};
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- export function FollowIndicator({ remoteUser }) {
2
+ export const FollowIndicator = ({ remoteUser, }) => {
3
3
  return (remoteUser === null || remoteUser === void 0 ? void 0 : remoteUser.display_name) ? (React.createElement("div", { style: {
4
4
  position: 'absolute',
5
5
  top: 1,
6
6
  right: 3,
7
- background: remoteUser.color
7
+ background: remoteUser.color,
8
8
  } }, `Following ${remoteUser.display_name}`)) : null;
9
- }
9
+ };
@@ -4,5 +4,5 @@ interface ITemporalSliderProps {
4
4
  model: IJupyterGISModel;
5
5
  filterStates: IDict<IJGISFilterItem | undefined>;
6
6
  }
7
- declare const TemporalSlider: ({ model, filterStates }: ITemporalSliderProps) => React.JSX.Element;
7
+ declare const TemporalSlider: React.FC<ITemporalSliderProps>;
8
8
  export default TemporalSlider;
@@ -2,9 +2,9 @@ import { faPause, faPlay } from '@fortawesome/free-solid-svg-icons';
2
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
3
  import { Button, Slider } from '@jupyter/react-components';
4
4
  import { format, isValid, parse } from 'date-fns';
5
- import { daysInYear, millisecondsInDay, millisecondsInHour, millisecondsInMinute, millisecondsInSecond, millisecondsInWeek, minutesInMonth } from 'date-fns/constants';
5
+ import { daysInYear, millisecondsInDay, millisecondsInHour, millisecondsInMinute, millisecondsInSecond, millisecondsInWeek, minutesInMonth, } from 'date-fns/constants';
6
6
  import React, { useEffect, useRef, useState } from 'react';
7
- import { useGetProperties } from '../dialogs/symbology/hooks/useGetProperties';
7
+ import { useGetProperties } from "../dialogs/symbology/hooks/useGetProperties";
8
8
  // List of common date formats to try
9
9
  // TODO: Not even close to every valid format
10
10
  const commonDateFormats = [
@@ -16,7 +16,7 @@ const commonDateFormats = [
16
16
  'MM-dd-yyyy', // US format with hyphens (e.g., 10-05-2023)
17
17
  'yyyy/MM/dd', // ISO format with slashes (e.g., 2023/10/05)
18
18
  'dd.MM.yyyy', // European format with dots (e.g., 05.10.2023)
19
- 'MM.dd.yyyy' // US format with dots (e.g., 10.05.2023)
19
+ 'MM.dd.yyyy', // US format with dots (e.g., 10.05.2023)
20
20
  ];
21
21
  // Time steps in milliseconds
22
22
  const stepMap = {
@@ -27,9 +27,9 @@ const stepMap = {
27
27
  day: millisecondsInDay,
28
28
  week: millisecondsInWeek,
29
29
  month: minutesInMonth * millisecondsInMinute,
30
- year: millisecondsInDay * daysInYear
30
+ year: millisecondsInDay * daysInYear,
31
31
  };
32
- const TemporalSlider = ({ model, filterStates }) => {
32
+ const TemporalSlider = ({ model, filterStates, }) => {
33
33
  const [layerId, setLayerId] = useState('');
34
34
  const [selectedFeature, setSelectedFeature] = useState('');
35
35
  const [range, setRange] = useState({ start: 0, end: 1 }); // min/max of current range being displayed
@@ -153,7 +153,7 @@ const TemporalSlider = ({ model, filterStates }) => {
153
153
  setMinMax({ min, max });
154
154
  setRange({
155
155
  start: (_b = currentState === null || currentState === void 0 ? void 0 : currentState.betweenMin) !== null && _b !== void 0 ? _b : min,
156
- end: (_c = currentState === null || currentState === void 0 ? void 0 : currentState.betweenMax) !== null && _c !== void 0 ? _c : min + step
156
+ end: (_c = currentState === null || currentState === void 0 ? void 0 : currentState.betweenMax) !== null && _c !== void 0 ? _c : min + step,
157
157
  });
158
158
  model.addFeatureAsMs(layerId, selectedFeature);
159
159
  }, [selectedFeature]);
@@ -189,7 +189,7 @@ const TemporalSlider = ({ model, filterStates }) => {
189
189
  operator: 'between',
190
190
  value: value,
191
191
  betweenMin: value,
192
- betweenMax: value + step
192
+ betweenMax: value + step,
193
193
  };
194
194
  const layer = model.getLayer(layerId);
195
195
  if (!layer) {