jmapcloud-ng-types 2.0.20-qa.1 → 2.0.20-qa.10

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.
package/index.ts CHANGED
@@ -21,7 +21,7 @@ export interface JAppState {
21
21
  dataGrid: JAppDataGridState
22
22
  }
23
23
 
24
- export type JAppActiveDataGrid = { type: "table"; id: JId } | { type: "layer"; id: JId }
24
+ export type JAppActiveDataGrid = { type: "table"; id: string } | { type: "layer"; id: string }
25
25
 
26
26
  export interface JAppDataGridState {
27
27
  activeDataGrid: JAppActiveDataGrid | undefined
@@ -34,8 +34,8 @@ export type JAppCoordinateInputMode = "project" | "web-mercator" | "wgs84-decima
34
34
  export interface JAppGeometryState {
35
35
  /** Selected CRS and format; undefined uses the project default. */
36
36
  coordinateInputMode: JAppCoordinateInputMode | undefined
37
- layerId: JId | undefined
38
- featureId: JId | undefined // needed for update
37
+ layerId: string | undefined
38
+ featureId: number | undefined // needed for update
39
39
  hasChanged: boolean
40
40
  feature: GeoJSON.Feature | undefined
41
41
  isUpdate: boolean
@@ -43,7 +43,7 @@ export interface JAppGeometryState {
43
43
  }
44
44
 
45
45
  export interface JAppFeatureState {
46
- layerId: JId | undefined
46
+ layerId: string | undefined
47
47
  isLoading: boolean
48
48
  hasLoadingError: boolean
49
49
  features: GeoJSON.Feature[]
@@ -63,11 +63,11 @@ export interface JAppLayerState {
63
63
  isLayerOrderActive: boolean
64
64
  treeFilter: JAppLayerTreeFilterState
65
65
  editionActiveTab: JAPP_LAYER_EDITION_TABS
66
- inEditionLayerId: JId | undefined
66
+ inEditionLayerId: string | undefined
67
67
  }
68
68
 
69
69
  export interface JAppTableState {
70
- inEditionTableId: JId | undefined
70
+ inEditionTableId: string | undefined
71
71
  }
72
72
 
73
73
  export interface JAppUiState {
@@ -120,7 +120,7 @@ export interface JAppAnnotationState {
120
120
  }
121
121
 
122
122
  export interface JAppSnapState {
123
- layerId: JId | undefined
123
+ layerId: string | undefined
124
124
  isEnabled: boolean
125
125
  }
126
126
 
@@ -142,9 +142,10 @@ export interface JAppPrintState {
142
142
  }
143
143
 
144
144
  export interface JAppSelectionState {
145
- displayedLayerId: JId
145
+ displayedLayerId: string | null
146
146
  isNewElement: boolean
147
147
  tableVisibility: boolean
148
+ /** @deprecated Always false. Use tableVisibility for the in-app selection table. */
148
149
  isTabOpened: boolean
149
150
  activeType: JAPP_SELECTION_TYPES
150
151
  }
@@ -172,10 +173,10 @@ export interface JAppGeometryService {
172
173
  /** @deprecated Use JMap.Draw.setSnapping("geometry", ...) instead. */
173
174
  setSnapEnabled(isEnabled: boolean): void
174
175
  /** @deprecated Use JMap.Draw.setSnapping("geometry", ...) instead. */
175
- setSnapLayerId(layerId: JId): void
176
+ setSnapLayerId(layerId: string): void
176
177
  openPanelForCreation(): void
177
178
  openPanelForUpdate(params: JAppGeometryUpdateParams): void
178
- selectLayer(layerId: JId): void
179
+ selectLayer(layerId: string): void
179
180
  startCreationDrawing(): void
180
181
  stopCreationDrawing(): void
181
182
  finishUpdate(): Promise<void>
@@ -183,14 +184,14 @@ export interface JAppGeometryService {
183
184
  }
184
185
 
185
186
  export interface JAppFeatureService {
186
- openEditMenuById(layerId: JId, featureId: JId): Promise<GeoJSON.Feature>
187
- openEditMenuByIds(layerId: JId, featureIds: JId[]): Promise<GeoJSON.Feature[]>
187
+ openEditMenuById(layerId: string, featureId: number): Promise<GeoJSON.Feature>
188
+ openEditMenuByIds(layerId: string, featureIds: number[]): Promise<GeoJSON.Feature[]>
188
189
  closeEditMenu(): void
189
- deleteByIds(layerId: JId, featureIds: JId[]): Promise<JId[]>
190
+ deleteByIds(layerId: string, featureIds: number[]): Promise<number[]>
190
191
  }
191
192
 
192
193
  export interface JAppProjectService {
193
- activateById(projectId: JId): JProject
194
+ activateById(projectId: string): JProject
194
195
  setSelectionPanelVisibility(isVisible: boolean): void
195
196
  setPresentationShowOnOpen(value: boolean): void
196
197
  }
@@ -207,7 +208,7 @@ export interface JAppAnnotationService {
207
208
  /** @deprecated Use JMap.Draw.setSnapping("annotation", ...) instead. */
208
209
  setSnapEnabled(isEnabled: boolean): void
209
210
  /** @deprecated Use JMap.Draw.setSnapping("annotation", ...) instead. */
210
- setSnapLayerId(layerId: JId): void
211
+ setSnapLayerId(layerId: string): void
211
212
  existsById(annotationId: string): boolean
212
213
  getById(annotationId: string): JAppAnnotation
213
214
  getAll(): JAppAnnotation[]
@@ -284,16 +285,19 @@ export interface JAppEventService {
284
285
  }
285
286
 
286
287
  export interface JAppSelectionService {
287
- getDisplayedLayerId(): JId
288
- setDisplayedLayerId(layerId: JId): void
288
+ getDisplayedLayerId(): string | null
289
+ setDisplayedLayerId(layerId: string | null): void
289
290
  activateSelectionType(selectionType: JAPP_SELECTION_TYPES): void
290
291
  getActiveSelectionType(): JAPP_SELECTION_TYPES
291
292
  getTableVisibility(): boolean
292
293
  setTableVisibility(tableVisibility: boolean): void
294
+ /** @deprecated Always false. Use getTableVisibility for the in-app selection table. */
293
295
  isTableDisplayedInTab(): boolean
296
+ /** @deprecated No-op that warns once. Use setTableVisibility(true) for the in-app selection table. */
294
297
  openTableInTab(): void
298
+ /** @deprecated No-op that warns once. Use setTableVisibility(false) for the in-app selection table. */
295
299
  closeTableTab(): void
296
- clearSelectionForLayer(layerId: JId): void
300
+ clearSelectionForLayer(layerId: string): void
297
301
  clearSelection(): void
298
302
  selectFromFeature(feature: GeoJSON.Feature, selectionType?: JAPP_SELECTION_TYPES): void
299
303
  exportAsExcelFile(): void
@@ -304,7 +308,7 @@ export interface JAppMeasureService {
304
308
  /** @deprecated Use JMap.Draw.setSnapping("measure", ...) instead. */
305
309
  setSnapEnabled(isEnabled: boolean): void
306
310
  /** @deprecated Use JMap.Draw.setSnapping("measure", ...) instead. */
307
- setSnapLayerId(layerId: JId): void
311
+ setSnapLayerId(layerId: string): void
308
312
  getAll(): JAppMeasure[]
309
313
  existsById(measureId: string): boolean
310
314
  getById(measureId: string): JAppMeasure
@@ -381,26 +385,26 @@ export interface JAppLayerService {
381
385
  }
382
386
 
383
387
  export interface JAppDynamicFilterService {
384
- openPanel(layerId: JId): void
388
+ openPanel(layerId: string): void
385
389
  closePanel(): void
386
390
  }
387
391
 
388
392
  export interface JAppTableService {
389
393
  Edition: {
390
394
  DynamicFilter: {
391
- openPanel(tableId: JId): void
395
+ openPanel(tableId: string): void
392
396
  closePanel(): void
393
397
  }
394
398
  }
395
399
  }
396
400
 
397
401
  export interface JAppLayerEditionInfoService {
398
- openPanel(layerId: JId): void
402
+ openPanel(layerId: string): void
399
403
  closePanel(): void
400
404
  }
401
405
 
402
406
  export interface JAppLayerEditionThematicService {
403
- openPanel(layerId: JId): void
407
+ openPanel(layerId: string): void
404
408
  closePanel(): void
405
409
  }
406
410
 
@@ -408,7 +412,7 @@ export interface JAppLayerEditionService {
408
412
  DynamicFilter: JAppDynamicFilterService
409
413
  Info: JAppLayerEditionInfoService
410
414
  Thematic: JAppLayerEditionThematicService
411
- openPanel(layerId: JId, tab: JAPP_LAYER_EDITION_TABS): void
415
+ openPanel(layerId: string, tab: JAPP_LAYER_EDITION_TABS): void
412
416
  closePanel(): void
413
417
  }
414
418
 
@@ -425,7 +429,7 @@ export interface JAppLayerTreeFilterService {
425
429
  /** @deprecated Removed API. This method now does nothing and always returns false. */
426
430
  existById(filterId: number): boolean
427
431
  /** @deprecated Removed API. This method now does nothing and always returns false. */
428
- oneFilterExistForMetadataId(metadataId: JId): boolean
432
+ oneFilterExistForMetadataId(metadataId: string): boolean
429
433
  /** @deprecated Removed API. This method now returns an empty result. */
430
434
  getAll(): JAppGetAllFiltersResult
431
435
  /** @deprecated Removed API. Filters no longer exist, so this method always throws "Filter id not found", matching the original error contract. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-types",
3
- "version": "2.0.20-qa.1",
3
+ "version": "2.0.20-qa.10",
4
4
  "description": "JMap Cloud specific version of JMap Cloud NG types and interfaces",
5
5
  "main": "src/app.ts",
6
6
  "types": "ambient.d.ts",
@@ -11,14 +11,15 @@
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git+https://github.com/k2geospatial/jmapcloud-ng-types.git"
14
+ "url": "https://github.com/k2geospatial/jmapcloud-frontend.git",
15
+ "directory": "app/jmapcloud-ng/ng-types"
15
16
  },
16
17
  "author": "K2 Geospatial",
17
18
  "license": "ISC",
18
19
  "bugs": {
19
- "url": "https://github.com/k2geospatial/jmapcloud-ng-types/issues"
20
+ "url": "https://github.com/k2geospatial/jmapcloud-frontend/issues"
20
21
  },
21
- "homepage": "https://github.com/k2geospatial/jmapcloud-ng-types#readme",
22
+ "homepage": "https://github.com/k2geospatial/jmapcloud-frontend/tree/master/app/jmapcloud-ng/ng-types#readme",
22
23
  "devDependencies": {
23
24
  "@fortawesome/fontawesome-svg-core": "7.2.0",
24
25
  "@types/react": "^19.2.17",
package/public/app.d.ts CHANGED
@@ -162,7 +162,7 @@ declare global {
162
162
  * JMap.Application.Annotation.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
163
163
  * ```
164
164
  */
165
- function setSnapLayerId(layerId: JId): void
165
+ function setSnapLayerId(layerId: string): void
166
166
 
167
167
  /**
168
168
  * **JMap.Application.Annotation.existsById**
@@ -548,7 +548,7 @@ declare global {
548
548
  * JMap.Application.Feature.openEditMenuById(5, 234)
549
549
  * ```
550
550
  */
551
- function openEditMenuById(layerId: JId, featureId: JId): Promise<GeoJSON.Feature>
551
+ function openEditMenuById(layerId: string, featureId: number): Promise<GeoJSON.Feature>
552
552
 
553
553
  /**
554
554
  * **JMap.Application.Feature.openEditMenuByIds**
@@ -563,7 +563,7 @@ declare global {
563
563
  * JMap.Application.Feature.openEditMenuByIds(5, [234, 452, 176])
564
564
  * ```
565
565
  */
566
- function openEditMenuByIds(layerId: JId, featureIds: JId[]): Promise<GeoJSON.Feature[]>
566
+ function openEditMenuByIds(layerId: string, featureIds: number[]): Promise<GeoJSON.Feature[]>
567
567
 
568
568
  /**
569
569
  * **JMap.Application.Feature.closeEditMenu**
@@ -593,7 +593,7 @@ declare global {
593
593
  * JMap.Application.Feature.deleteByIds(4, [23, 76]).then(result => console.log("Delete result", result))
594
594
  * ```
595
595
  */
596
- function deleteByIds(layerId: JId, featureIds: JId[]): Promise<JId[]>
596
+ function deleteByIds(layerId: string, featureIds: number[]): Promise<number[]>
597
597
  }
598
598
 
599
599
  /**
@@ -628,7 +628,7 @@ declare global {
628
628
  * JMap.Application.Geometry.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
629
629
  * ```
630
630
  */
631
- function setSnapLayerId(layerId: JId): void
631
+ function setSnapLayerId(layerId: string): void
632
632
 
633
633
  /**
634
634
  * **JMap.Application.Geometry.openPanelForCreation**
@@ -672,7 +672,7 @@ declare global {
672
672
  * JMap.Application.Geometry.selectLayer(3)
673
673
  * ```
674
674
  */
675
- function selectLayer(layerId: JId): void
675
+ function selectLayer(layerId: string): void
676
676
 
677
677
  /**
678
678
  * **JMap.Application.Geometry.startCreationDrawing**
@@ -761,7 +761,7 @@ declare global {
761
761
  * JMap.Application.Measure.setSnapLayerId("36885146-7eed-4071-9f86-8e29c505af91")
762
762
  * ```
763
763
  */
764
- function setSnapLayerId(layerId: JId): void
764
+ function setSnapLayerId(layerId: string): void
765
765
 
766
766
  /**
767
767
  * **JMap.Application.Measure.getAll**
@@ -1064,7 +1064,7 @@ declare global {
1064
1064
  *
1065
1065
  * The selection of only one layer can be diplayed at a time.
1066
1066
  *
1067
- * This function returns the id of the layer for which the selection is displayed.
1067
+ * This function returns the id of the layer for which the selection is displayed, or null when none is.
1068
1068
  *
1069
1069
  * @example
1070
1070
  * ```ts
@@ -1072,7 +1072,7 @@ declare global {
1072
1072
  * JMap.Application.Selection.getDisplayedLayerId()
1073
1073
  * ```
1074
1074
  */
1075
- function getDisplayedLayerId(): JId
1075
+ function getDisplayedLayerId(): string | null
1076
1076
 
1077
1077
  /**
1078
1078
  * **JMap.Application.Selection.setDisplayedLayerId**
@@ -1081,14 +1081,19 @@ declare global {
1081
1081
  *
1082
1082
  * If layer selection has no selection, hides the layer selection list.
1083
1083
  *
1084
+ * Pass null to display no layer. Passing -1 for that still works but is deprecated and logs a warning.
1085
+ *
1084
1086
  * @throws if layer not found for the given layer id
1085
1087
  * @example
1086
1088
  * ```ts
1087
- * // display the layer id=2 selection
1088
- * JMap.Application.Selection.setDisplayedLayerId(2)
1089
+ * // display the selection of the layer
1090
+ * JMap.Application.Selection.setDisplayedLayerId("f3af01ab-4042-4ccf-be04-33dc96228ce7")
1091
+ *
1092
+ * // display no layer selection
1093
+ * JMap.Application.Selection.setDisplayedLayerId(null)
1089
1094
  * ```
1090
1095
  */
1091
- function setDisplayedLayerId(layerId: JId): void
1096
+ function setDisplayedLayerId(layerId: string | null): void
1092
1097
 
1093
1098
  /**
1094
1099
  * **JMap.Application.Selection.activateSelectionType**
@@ -1148,11 +1153,12 @@ declare global {
1148
1153
  /**
1149
1154
  * **JMap.Application.Selection.isTableDisplayedInTab**
1150
1155
  *
1151
- * Returns true if the selection table is displayed in an external browser tab.
1156
+ * Always returns false; the external selection page was removed.
1152
1157
  *
1158
+ * @deprecated Use {@link JMap.Application.Selection.getTableVisibility} for the in-app selection table.
1153
1159
  * @example
1154
1160
  * ```ts
1155
- * // returns true if the selection table is displayed in an external browser tab.
1161
+ * // returns false.
1156
1162
  * JMap.Application.Selection.isTableDisplayedInTab()
1157
1163
  * ```
1158
1164
  */
@@ -1161,13 +1167,13 @@ declare global {
1161
1167
  /**
1162
1168
  * **JMap.Application.Selection.openTableInTab**
1163
1169
  *
1164
- * Displays the selection table in another tab.
1165
- *
1166
- * If the table is not visible, make it visible.
1170
+ * Does nothing and warns once per page load. The external selection page was removed.
1171
+ * Does not change the in-app table's visibility.
1167
1172
  *
1173
+ * @deprecated Use {@link JMap.Application.Selection.setTableVisibility} with true to show the in-app selection table.
1168
1174
  * @example
1169
1175
  * ```ts
1170
- * // displays the selection table in another tab.
1176
+ * // deprecated no-op; warns once.
1171
1177
  * JMap.Application.Selection.openTableInTab()
1172
1178
  * ```
1173
1179
  */
@@ -1176,15 +1182,13 @@ declare global {
1176
1182
  /**
1177
1183
  * **JMap.Application.Selection.closeTableTab**
1178
1184
  *
1179
- * Closes the selection table tab.
1180
- *
1181
- * If the table is not visible, or not opened in another tab, do nothing.
1182
- *
1183
- * If the table is opened in another tab, close the tab and display the table over the map.
1185
+ * Does nothing and warns once per page load. The external selection page was removed.
1186
+ * Does not change the in-app table's visibility.
1184
1187
  *
1188
+ * @deprecated Use {@link JMap.Application.Selection.setTableVisibility} with false to hide the in-app selection table.
1185
1189
  * @example
1186
1190
  * ```ts
1187
- * // closes the selection table tab.
1191
+ * // deprecated no-op; warns once.
1188
1192
  * JMap.Application.Selection.closeTableTab()
1189
1193
  * ```
1190
1194
  */
@@ -1202,7 +1206,7 @@ declare global {
1202
1206
  * JMap.Application.Selection.clearSelectionForLayer(2)
1203
1207
  * ```
1204
1208
  */
1205
- function clearSelectionForLayer(layerId: JId): void
1209
+ function clearSelectionForLayer(layerId: string): void
1206
1210
 
1207
1211
  /**
1208
1212
  * **JMap.Application.Selection.clearSelection**
@@ -1286,7 +1290,7 @@ declare global {
1286
1290
  * JMap.Application.Project.activateById(33)
1287
1291
  * ```
1288
1292
  */
1289
- function activateById(projectId: JId): JProject
1293
+ function activateById(projectId: string): JProject
1290
1294
 
1291
1295
  /**
1292
1296
  * **JMap.Application.Project.setSelectionPanelVisibility**
@@ -1335,7 +1339,7 @@ declare global {
1335
1339
  * JMap.Application.Table.Edition.DynamicFilter.openPanel("table-id")
1336
1340
  * ```
1337
1341
  */
1338
- function openPanel(tableId: JId): void
1342
+ function openPanel(tableId: string): void
1339
1343
 
1340
1344
  /**
1341
1345
  * Closes the table filter sub-panel and returns to the layer/table list.
@@ -1513,7 +1517,7 @@ declare global {
1513
1517
  * @param metadataId Unused
1514
1518
  * @returns Always false
1515
1519
  */
1516
- function oneFilterExistForMetadataId(metadataId: JId): boolean
1520
+ function oneFilterExistForMetadataId(metadataId: string): boolean
1517
1521
 
1518
1522
  /**
1519
1523
  * **JMap.Application.Layer.Tree.Filter.getAll**
@@ -1605,7 +1609,7 @@ declare global {
1605
1609
  * JMap.Application.Layer.Edition.DynamicFilter.openPanel(3)
1606
1610
  * ```
1607
1611
  */
1608
- function openPanel(layerId: JId): void
1612
+ function openPanel(layerId: string): void
1609
1613
 
1610
1614
  /**
1611
1615
  * **JMap.Application.Layer.Edition.DynamicFilter.closePanel**
@@ -1640,7 +1644,7 @@ declare global {
1640
1644
  * JMap.Application.Layer.Edition.Info.openPanel(3)
1641
1645
  * ```
1642
1646
  */
1643
- function openPanel(layerId: JId): void
1647
+ function openPanel(layerId: string): void
1644
1648
 
1645
1649
  /**
1646
1650
  * **JMap.Application.Layer.Edition.Info.closePanel**
@@ -1675,7 +1679,7 @@ declare global {
1675
1679
  * JMap.Application.Layer.Edition.Thematic.openPanel(3)
1676
1680
  * ```
1677
1681
  */
1678
- function openPanel(layerId: JId): void
1682
+ function openPanel(layerId: string): void
1679
1683
 
1680
1684
  /**
1681
1685
  * **JMap.Application.Layer.Edition.Thematic.closePanel**
@@ -1712,7 +1716,7 @@ declare global {
1712
1716
  * JMap.Application.Layer.Edition.openPanel(2, "dynamic-filter")
1713
1717
  * ```
1714
1718
  */
1715
- function openPanel(layerId: JId, activeTab: JAPP_LAYER_EDITION_TABS): void
1719
+ function openPanel(layerId: string, activeTab: JAPP_LAYER_EDITION_TABS): void
1716
1720
 
1717
1721
  /**
1718
1722
  * **JMap.Application.Layer.Edition.closePanel**
@@ -3520,7 +3524,7 @@ declare global {
3520
3524
  *
3521
3525
  * @param params The parameters that configure which sub-form to open:
3522
3526
  * - `dataSourceId` (string): The data source ID that provides the form.
3523
- * - For `layerUpdate`: `featureId` (JId), `isReadOnly` (boolean).
3527
+ * - For `layerUpdate`: `featureId` (number), `isReadOnly` (boolean).
3524
3528
  * - For `tableUpdate`: `rowId` (number), `isReadOnly` (boolean).
3525
3529
  * - For `tableCreate`: `isReadOnly` is always `false`.
3526
3530
  * - `onSubmit?` (() => void): (Optional) Callback invoked after submit.
package/public/form.d.ts CHANGED
@@ -3,7 +3,7 @@ export type JFormDialogParams =
3
3
  | {
4
4
  type: "layerUpdate"
5
5
  layer: JLayer
6
- featureId: JId
6
+ featureId: number
7
7
  isReadOnly: boolean
8
8
  onSubmit?: () => void
9
9
  }
@@ -33,7 +33,7 @@ export type JSubFormDialogParams =
33
33
  type: "layerUpdate"
34
34
  dataSourceId: string
35
35
  organizationId: string
36
- featureId: JId
36
+ featureId: number
37
37
  isReadOnly: boolean
38
38
  onSubmit?: () => void
39
39
  }
@@ -1,5 +1,5 @@
1
1
  export {}
2
2
  export interface JAppGeometryUpdateParams {
3
- layerId: JId
3
+ layerId: string
4
4
  feature: GeoJSON.Feature
5
5
  }
package/public/layer.d.ts CHANGED
@@ -49,8 +49,8 @@ export type JAppLayerAnyFilterOperatorType = JAPP_LAYER_DATE_FILTER_OPERATOR_TYP
49
49
  export interface JAppLayerTreeFilterState {
50
50
  active: boolean
51
51
  nameFilter: string
52
- exactlyMatchedTreeItemIds: JId[]
53
- expandedMatchedTreeItemIds: JId[]
52
+ exactlyMatchedTreeItemIds: string[]
53
+ expandedMatchedTreeItemIds: string[]
54
54
  }
55
55
 
56
56
  /** @deprecated The legacy layer dynamic-filter API was removed. */
@@ -65,7 +65,7 @@ export type JAppAnyLayerFilter = JAppNumberLayerFilter | JAppTextLayerFilter | J
65
65
  /** @deprecated The legacy layer dynamic-filter API was removed. */
66
66
  export interface JAppBaseLayerFilter {
67
67
  id: number
68
- metadataItemId: JId
68
+ metadataItemId: string
69
69
  type: JLAYER_METADATA_TYPES
70
70
  }
71
71