@jupytergis/base 0.1.6 → 0.2.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 (96) hide show
  1. package/lib/annotations/components/Annotation.d.ts +11 -0
  2. package/lib/annotations/components/Annotation.js +61 -0
  3. package/lib/annotations/components/AnnotationFloater.d.ts +7 -0
  4. package/lib/annotations/components/AnnotationFloater.js +30 -0
  5. package/lib/annotations/components/Message.d.ts +8 -0
  6. package/lib/annotations/components/Message.js +17 -0
  7. package/lib/annotations/index.d.ts +3 -0
  8. package/lib/annotations/index.js +3 -0
  9. package/lib/annotations/model.d.ts +28 -0
  10. package/lib/annotations/model.js +67 -0
  11. package/lib/classificationModes.d.ts +13 -0
  12. package/lib/classificationModes.js +326 -0
  13. package/lib/commands.js +52 -7
  14. package/lib/constants.d.ts +2 -0
  15. package/lib/constants.js +5 -1
  16. package/lib/dialogs/symbology/classificationModes.d.ts +13 -0
  17. package/lib/dialogs/symbology/classificationModes.js +326 -0
  18. package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.d.ts +11 -0
  19. package/lib/dialogs/symbology/components/color_ramp/CanvasSelectComponent.js +119 -0
  20. package/lib/dialogs/symbology/components/color_ramp/ColorRamp.d.ts +15 -0
  21. package/lib/dialogs/symbology/components/color_ramp/ColorRamp.js +33 -0
  22. package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.d.ts +9 -0
  23. package/lib/dialogs/symbology/components/color_ramp/ColorRampEntry.js +24 -0
  24. package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.d.ts +10 -0
  25. package/lib/dialogs/symbology/components/color_ramp/ModeSelectRow.js +11 -0
  26. package/lib/dialogs/symbology/components/color_stops/StopContainer.d.ts +9 -0
  27. package/lib/dialogs/symbology/components/color_stops/StopContainer.js +28 -0
  28. package/lib/dialogs/{components/symbology → symbology/components/color_stops}/StopRow.js +9 -2
  29. package/lib/dialogs/symbology/hooks/useGetProperties.d.ts +12 -0
  30. package/lib/dialogs/symbology/hooks/useGetProperties.js +47 -0
  31. package/lib/dialogs/{symbologyDialog.js → symbology/symbologyDialog.js} +3 -3
  32. package/lib/dialogs/symbology/symbologyUtils.d.ts +9 -0
  33. package/lib/dialogs/symbology/symbologyUtils.js +94 -0
  34. package/lib/dialogs/symbology/tiff_layer/TiffRendering.d.ts +4 -0
  35. package/lib/dialogs/{components/symbology/BandRendering.js → symbology/tiff_layer/TiffRendering.js} +3 -3
  36. package/lib/dialogs/{components/symbology → symbology/tiff_layer/components}/BandRow.d.ts +1 -1
  37. package/lib/dialogs/{components/symbology → symbology/tiff_layer/types}/SingleBandPseudoColor.d.ts +9 -1
  38. package/lib/dialogs/{components/symbology → symbology/tiff_layer/types}/SingleBandPseudoColor.js +131 -83
  39. package/lib/dialogs/{components/symbology → symbology/vector_layer}/VectorRendering.d.ts +1 -1
  40. package/lib/dialogs/{components/symbology → symbology/vector_layer}/VectorRendering.js +10 -13
  41. package/lib/dialogs/symbology/vector_layer/components/ValueSelect.d.ts +8 -0
  42. package/lib/dialogs/symbology/vector_layer/components/ValueSelect.js +7 -0
  43. package/lib/dialogs/symbology/vector_layer/types/Categorized.d.ts +4 -0
  44. package/lib/dialogs/symbology/vector_layer/types/Categorized.js +94 -0
  45. package/lib/dialogs/symbology/vector_layer/types/Graduated.js +169 -0
  46. package/lib/dialogs/{components/symbology → symbology/vector_layer/types}/SimpleSymbol.js +8 -13
  47. package/lib/formbuilder/formselectors.js +4 -0
  48. package/lib/formbuilder/objectform/baseform.d.ts +1 -1
  49. package/lib/formbuilder/objectform/baseform.js +31 -42
  50. package/lib/formbuilder/objectform/geojsonsource.js +33 -30
  51. package/lib/formbuilder/objectform/geotiffsource.d.ts +16 -0
  52. package/lib/formbuilder/objectform/geotiffsource.js +71 -0
  53. package/lib/formbuilder/objectform/vectorlayerform.js +1 -0
  54. package/lib/formbuilder/objectform/webGlLayerForm.js +1 -0
  55. package/lib/index.d.ts +7 -4
  56. package/lib/index.js +7 -4
  57. package/lib/mainview/CollaboratorPointers.d.ts +17 -0
  58. package/lib/mainview/CollaboratorPointers.js +37 -0
  59. package/lib/mainview/FollowIndicator.d.ts +7 -0
  60. package/lib/mainview/FollowIndicator.js +9 -0
  61. package/lib/mainview/mainView.d.ts +39 -3
  62. package/lib/mainview/mainView.js +451 -41
  63. package/lib/mainview/mainviewmodel.d.ts +2 -1
  64. package/lib/mainview/mainviewmodel.js +5 -0
  65. package/lib/panelview/annotationPanel.d.ts +27 -0
  66. package/lib/panelview/annotationPanel.js +45 -0
  67. package/lib/panelview/components/filter-panel/Filter.d.ts +7 -2
  68. package/lib/panelview/components/filter-panel/Filter.js +1 -1
  69. package/lib/panelview/components/filter-panel/FilterRow.js +3 -3
  70. package/lib/panelview/components/identify-panel/IdentifyPanel.d.ts +15 -0
  71. package/lib/panelview/components/identify-panel/IdentifyPanel.js +108 -0
  72. package/lib/panelview/components/layers.js +4 -4
  73. package/lib/panelview/leftpanel.js +8 -0
  74. package/lib/panelview/rightpanel.d.ts +4 -1
  75. package/lib/panelview/rightpanel.js +28 -7
  76. package/lib/store.d.ts +9 -0
  77. package/lib/store.js +25 -0
  78. package/lib/toolbar/widget.js +12 -2
  79. package/lib/tools.d.ts +35 -0
  80. package/lib/tools.js +86 -0
  81. package/lib/types.d.ts +14 -0
  82. package/package.json +18 -20
  83. package/style/base.css +4 -8
  84. package/style/dialog.css +1 -1
  85. package/style/icons/logo_mini.svg +70 -148
  86. package/style/icons/nonvisibility.svg +2 -7
  87. package/style/icons/visibility.svg +2 -6
  88. package/style/leftPanel.css +5 -0
  89. package/style/symbologyDialog.css +104 -3
  90. package/lib/dialogs/components/symbology/BandRendering.d.ts +0 -4
  91. package/lib/dialogs/components/symbology/Graduated.js +0 -188
  92. /package/lib/dialogs/{components/symbology → symbology/components/color_stops}/StopRow.d.ts +0 -0
  93. /package/lib/dialogs/{symbologyDialog.d.ts → symbology/symbologyDialog.d.ts} +0 -0
  94. /package/lib/dialogs/{components/symbology → symbology/tiff_layer/components}/BandRow.js +0 -0
  95. /package/lib/dialogs/{components/symbology → symbology/vector_layer/types}/Graduated.d.ts +0 -0
  96. /package/lib/dialogs/{components/symbology → symbology/vector_layer/types}/SimpleSymbol.d.ts +0 -0
@@ -1,8 +1,9 @@
1
- import { IJGISLayer, IJGISSource } from '@jupytergis/schema';
1
+ import { IAnnotation, IDict, IJGISLayer, IJGISSource } from '@jupytergis/schema';
2
2
  import { User } from '@jupyterlab/services';
3
3
  import BaseLayer from 'ol/layer/Base';
4
4
  import * as React from 'react';
5
5
  import { MainViewModel } from './mainviewmodel';
6
+ import { ClientPointer } from './CollaboratorPointers';
6
7
  interface IProps {
7
8
  viewModel: MainViewModel;
8
9
  }
@@ -12,20 +13,24 @@ interface IStates {
12
13
  lightTheme: boolean;
13
14
  remoteUser?: User.IIdentity | null;
14
15
  firstLoad: boolean;
16
+ annotations: IDict<IAnnotation>;
17
+ clientPointers: IDict<ClientPointer>;
15
18
  }
16
19
  export declare class MainView extends React.Component<IProps, IStates> {
17
20
  constructor(props: IProps);
18
21
  componentDidMount(): Promise<void>;
19
22
  componentWillUnmount(): void;
20
23
  generateScene(): Promise<void>;
24
+ addContextMenu: () => void;
21
25
  private _loadShapefileAsGeoJSON;
26
+ private _loadGeoTIFFWithCache;
22
27
  /**
23
28
  * Add a source in the map.
24
29
  *
25
30
  * @param id - the source id.
26
31
  * @param source - the source object.
27
32
  */
28
- addSource(id: string, source: IJGISSource): Promise<void>;
33
+ addSource(id: string, source: IJGISSource, layerId?: string): Promise<void>;
29
34
  private computeSourceUrl;
30
35
  /**
31
36
  * Update a source in the map.
@@ -46,6 +51,12 @@ export declare class MainView extends React.Component<IProps, IStates> {
46
51
  * @param layerIds - the list of layers in the depth order (beneath first).
47
52
  */
48
53
  updateLayers(layerIds: string[]): void;
54
+ /**
55
+ * Updates the position and existence of layers in the OL map based on the layer IDs.
56
+ *
57
+ * @param layerIds - An array of layer IDs that should be present on the map.
58
+ * @returns {} Nothing is returned.
59
+ */
49
60
  private _updateLayersImpl;
50
61
  /**
51
62
  * Build the map layer.
@@ -95,16 +106,39 @@ export declare class MainView extends React.Component<IProps, IStates> {
95
106
  * @param id Layer to retrieve
96
107
  */
97
108
  private getLayer;
109
+ /**
110
+ * Convenience method to get a specific layer index from OpenLayers Map
111
+ * @param id Layer to retrieve
112
+ */
113
+ private getLayerIndex;
98
114
  /**
99
115
  * Convenience method to get list layer IDs from the OpenLayers Map
100
116
  */
101
- private getLayers;
117
+ private getLayerIDs;
118
+ /**
119
+ * Move layer `id` in the stack to `index`.
120
+ *
121
+ * @param id - id of the layer.
122
+ * @param index - expected index of the layer.
123
+ */
124
+ moveLayer(id: string, index: number): void;
102
125
  private _onLayersChanged;
103
126
  private _onLayerTreeChange;
104
127
  private _onSourcesChange;
128
+ private _onSharedModelStateChange;
129
+ private _onSharedMetadataChanged;
130
+ private _computeAnnotationPosition;
131
+ private _updateAnnotation;
132
+ private _onZoomToAnnotation;
133
+ private _moveToPosition;
134
+ private _onPointerMove;
135
+ private _syncPointer;
136
+ private _identifyFeature;
105
137
  private _handleThemeChange;
106
138
  private _handleWindowResize;
107
139
  render(): JSX.Element;
140
+ private _clickCoords;
141
+ private _commands;
108
142
  private _initializedPosition;
109
143
  private divRef;
110
144
  private _Map;
@@ -113,5 +147,7 @@ export declare class MainView extends React.Component<IProps, IStates> {
113
147
  private _ready;
114
148
  private _sources;
115
149
  private _sourceToLayerMap;
150
+ private _documentPath?;
151
+ private _contextMenu;
116
152
  }
117
153
  export {};