jmapcloud-ng-core-types 2.0.19 → 2.0.20-qa.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all-enums.ts +2 -0
- package/index.d.ts +6 -4
- package/package.json +1 -1
- package/public/core.d.ts +9 -6
- package/public/jmap/layer.d.ts +13 -4
- package/public/jmap/table.d.ts +7 -3
package/all-enums.ts
CHANGED
|
@@ -67,6 +67,7 @@ export const ALL_LAYER_GEOMETRIES: JLAYER_GEOMETRIES[] = [
|
|
|
67
67
|
JLAYER_GEOMETRIES.NONE
|
|
68
68
|
]
|
|
69
69
|
|
|
70
|
+
/** @deprecated Legacy categories. New consumers read the SQL `type` (AttributeType) of JLayer.attributes. */
|
|
70
71
|
export const ALL_LAYER_ATTRIBUTE_TYPES: JLAYER_ATTRIBUTE_TYPES[] = [
|
|
71
72
|
JLAYER_ATTRIBUTE_TYPES.STRING,
|
|
72
73
|
JLAYER_ATTRIBUTE_TYPES.NUMBER,
|
|
@@ -178,6 +179,7 @@ export const ALL_MEMBER_ROLES: MEMBER_ROLES[] = [ROLES.ORG_ADMIN, ROLES.ORG_EDIT
|
|
|
178
179
|
|
|
179
180
|
export const ALL_APP_MESSAGE_SEVERITIES: JAPP_MESSAGE_SEVERITIES[] = [JAPP_MESSAGE_SEVERITIES.SUCCESS, JAPP_MESSAGE_SEVERITIES.INFO, JAPP_MESSAGE_SEVERITIES.WARNING, JAPP_MESSAGE_SEVERITIES.ERROR]
|
|
180
181
|
|
|
182
|
+
/** @deprecated Legacy categories. New consumers read the SQL `type` (AttributeType) of JTable.attributes. */
|
|
181
183
|
export const ALL_TABLE_ATTRIBUTE_TYPES: JTABLE_ATTRIBUTE_TYPES[] = [
|
|
182
184
|
JTABLE_ATTRIBUTE_TYPES.BINARY,
|
|
183
185
|
JTABLE_ATTRIBUTE_TYPES.BOOLEAN,
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="./public/global-aliases.d.ts" />
|
|
2
2
|
import type { JLocalDynamicFilter, JLocalDynamicFilterCreateParams, JLocalDynamicFilterUpdateParams } from "./public/jmap/dynamic-filter.d.ts"
|
|
3
3
|
import { Feature, FeatureCollection, LineString, MultiLineString, Point, Polygon } from "geojson"
|
|
4
|
-
import {
|
|
4
|
+
import { DataSourceAttribute, JDataSource, JDataSourceType, JForm, JRelationship } from "jmapcloud-types"
|
|
5
5
|
import type * as maplibregl from "maplibre-gl"
|
|
6
6
|
import { Action, Store } from "redux"
|
|
7
7
|
import { JDataSourceData, JDataSourceDataParams, JDataSourcePermissions } from "./public/jmap/datasource.ts"
|
|
@@ -686,7 +686,9 @@ export interface JLayerService {
|
|
|
686
686
|
setLayersMapOrder(layerIds: JId[]): void
|
|
687
687
|
getVectorLayers(): JLayer[]
|
|
688
688
|
getVectorLayerIds(): JId[]
|
|
689
|
+
/** @deprecated Returns legacy views. Use the layer's attributes for the shared model. */
|
|
689
690
|
getLayerAttributes(layerId: JId): JLayerAttribute[]
|
|
691
|
+
/** @deprecated Returns a legacy view. Use the layer's attributes for the shared model. */
|
|
690
692
|
getLayerAttribute(layerId: JId, attributeName: string): JLayerAttribute
|
|
691
693
|
exists(layerId: JId): boolean
|
|
692
694
|
attributeExists(layerId: JId, attributeName: string): boolean
|
|
@@ -708,11 +710,11 @@ export interface JLayerService {
|
|
|
708
710
|
setLayerGroupExpansion(layerGroupId: JId, isExpanded: boolean): void
|
|
709
711
|
setLayerGroupsExpansion(params: JLayerSetLayerGroupsExpansionParams[]): void
|
|
710
712
|
deleteLayer(layerId: JId): void
|
|
711
|
-
getDataSourceAttributes(layerId: JId): Promise<
|
|
713
|
+
getDataSourceAttributes(layerId: JId): Promise<DataSourceAttribute[]>
|
|
712
714
|
}
|
|
713
715
|
|
|
714
716
|
export interface JDataSourceService {
|
|
715
|
-
getAttributes(dataSourceId: JId, dataSourceOrganizationId: string): Promise<
|
|
717
|
+
getAttributes(dataSourceId: JId, dataSourceOrganizationId: string): Promise<DataSourceAttribute[]>
|
|
716
718
|
getById(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JDataSource>
|
|
717
719
|
getData(dataSourceId: JId, dataSourceOrganizationId: string, params: JDataSourceDataParams, dataSourceType?: JDataSourceType): Promise<JDataSourceData>
|
|
718
720
|
getPermissions(dataSourceId: JId, dataSourceOrganizationId: string): Promise<JDataSourcePermissions>
|
|
@@ -734,7 +736,7 @@ export interface JTableService {
|
|
|
734
736
|
createRow(tableId: JId, row: { [key: string]: any }): Promise<{ id: JId; links: Array<any> }>
|
|
735
737
|
updateRow(tableId: JId, rowId: number, row: { [key: string]: any }): Promise<void>
|
|
736
738
|
deleteRow(tableId: JId, rowId: number): Promise<void>
|
|
737
|
-
getDataSourceAttributes(tableId: JId): Promise<
|
|
739
|
+
getDataSourceAttributes(tableId: JId): Promise<DataSourceAttribute[]>
|
|
738
740
|
/** @deprecated Use DynamicFilter.setIsActive instead. */
|
|
739
741
|
setDynamicFilterActive(tableId: JId, filterId: string, isActive: boolean): void
|
|
740
742
|
}
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JLocalDynamicFilter, JLocalDynamicFilterCreateParams, JLocalDynamicFilterUpdateParams } from "./jmap/dynamic-filter.d.ts"
|
|
2
|
-
import {
|
|
2
|
+
import { DataSourceAttribute, JDataSource, JRelationship } from "jmapcloud-types"
|
|
3
3
|
import type { Action, Store } from "redux"
|
|
4
4
|
import type { JRequestConfig } from "./jmap/ajax.d.ts"
|
|
5
5
|
import type { JAttachment, JAttachmentFile, JCreateAttachmentParams, JUpdateAttachmentParams } from "./jmap/attachment.d.ts"
|
|
@@ -1017,10 +1017,11 @@ export namespace JMap {
|
|
|
1017
1017
|
* if (!layer) {
|
|
1018
1018
|
* return
|
|
1019
1019
|
* }
|
|
1020
|
-
*
|
|
1021
|
-
* if (!layerAttribute) {
|
|
1020
|
+
* if (!layer.attributes.some(la => la.name === "nom_qr")) {
|
|
1022
1021
|
* return
|
|
1023
1022
|
* }
|
|
1023
|
+
* // condition expressions take the legacy attribute view, not a layer.attributes element
|
|
1024
|
+
* const layerAttribute = JMap.Layer.getLayerAttribute(layer.id, "nom_qr")
|
|
1024
1025
|
* const layerId = layer.id
|
|
1025
1026
|
* const styles = []
|
|
1026
1027
|
* const condition1StyleId = "8ae59ba6-0b0b-4a5e-8f8e-5b138bd53767"
|
|
@@ -1701,6 +1702,7 @@ export namespace JMap {
|
|
|
1701
1702
|
* // returns the layer attribute descriptor
|
|
1702
1703
|
* JMap.Layer.getLayerAttribute(4, "SPECIES")
|
|
1703
1704
|
* ```
|
|
1705
|
+
* @deprecated Returns a legacy compatibility view. Use getById(layerId)'s attributes for the shared model.
|
|
1704
1706
|
*/
|
|
1705
1707
|
function getLayerAttribute(layerId: JId, attributeName: string): JLayerAttribute
|
|
1706
1708
|
/**
|
|
@@ -1714,6 +1716,7 @@ export namespace JMap {
|
|
|
1714
1716
|
* ```ts
|
|
1715
1717
|
* JMap.Layer.getLayerAttributes(4)
|
|
1716
1718
|
* ```
|
|
1719
|
+
* @deprecated Returns legacy compatibility views. Use getById(layerId)'s attributes for the shared model.
|
|
1717
1720
|
*/
|
|
1718
1721
|
function getLayerAttributes(layerId: JId): JLayerAttribute[]
|
|
1719
1722
|
/**
|
|
@@ -2067,7 +2070,7 @@ export namespace JMap {
|
|
|
2067
2070
|
* .getDataSourceAttributes(3)
|
|
2068
2071
|
* ```
|
|
2069
2072
|
**/
|
|
2070
|
-
function getDataSourceAttributes(layerId: JId): Promise<
|
|
2073
|
+
function getDataSourceAttributes(layerId: JId): Promise<DataSourceAttribute[]>
|
|
2071
2074
|
}
|
|
2072
2075
|
/**
|
|
2073
2076
|
* **JMap.Geometry**
|
|
@@ -9619,7 +9622,7 @@ export namespace JMap {
|
|
|
9619
9622
|
* JMap.DataSource.getAttributes("be4552e1-d89d-48ec-a417-7b99d14b4d7b")
|
|
9620
9623
|
* ```
|
|
9621
9624
|
**/
|
|
9622
|
-
function getAttributes(dataSourceId: JId, dataSourceOrganizationId: string): Promise<
|
|
9625
|
+
function getAttributes(dataSourceId: JId, dataSourceOrganizationId: string): Promise<DataSourceAttribute[]>
|
|
9623
9626
|
|
|
9624
9627
|
/**
|
|
9625
9628
|
* **JMap.DataSource.getById**
|
|
@@ -11304,7 +11307,7 @@ export namespace JMap {
|
|
|
11304
11307
|
* JMap.Table.getDataSourceAttributes("be4552e1-d89d-48ec-a417-7b99d14b4d7b")
|
|
11305
11308
|
* ```
|
|
11306
11309
|
**/
|
|
11307
|
-
function getDataSourceAttributes(tableId: JId): Promise<
|
|
11310
|
+
function getDataSourceAttributes(tableId: JId): Promise<DataSourceAttribute[]>
|
|
11308
11311
|
/**
|
|
11309
11312
|
* **JMap.Table.DynamicFilter**
|
|
11310
11313
|
*
|
package/public/jmap/layer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JLocalDynamicFilter } from "./dynamic-filter.d.ts"
|
|
2
|
-
import type { JAnyFilterCondition,
|
|
2
|
+
import type { DataSourceAttribute, JAnyFilterCondition, LayerAttribute, UserMetadata } from "jmapcloud-types"
|
|
3
3
|
import type { JBoundaryBox } from "./geometry.d.ts"
|
|
4
4
|
import type { JId } from "./main.d.ts"
|
|
5
5
|
import type { JMapMouseOver } from "./mouseover.d.ts"
|
|
@@ -45,6 +45,7 @@ export enum JLAYER_GEOMETRIES {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// ALL_LAYER_ATTRIBUTE_TYPES in all-enum.ts
|
|
48
|
+
/** @deprecated Simplified legacy categories. New consumers read the SQL `type` (AttributeType) of JLayer.attributes. */
|
|
48
49
|
export enum JLAYER_ATTRIBUTE_TYPES {
|
|
49
50
|
STRING = "string",
|
|
50
51
|
NUMBER = "number",
|
|
@@ -256,8 +257,8 @@ export interface JLayer extends JLayerTreeElement {
|
|
|
256
257
|
defaultMetadatas: JLayerMetadata[]
|
|
257
258
|
metadataSections: JLayerMetadataSection[]
|
|
258
259
|
userMetadata: UserMetadata<string>[]
|
|
259
|
-
attributes
|
|
260
|
-
|
|
260
|
+
/** Canonical target attributes, in configured order, including hidden attributes. Titles are localized. */
|
|
261
|
+
attributes: LayerAttribute<string>[]
|
|
261
262
|
mouseOver: JMapMouseOver
|
|
262
263
|
minimumZoom: number | undefined
|
|
263
264
|
maximumZoom: number | undefined
|
|
@@ -274,7 +275,7 @@ export interface JLayer extends JLayerTreeElement {
|
|
|
274
275
|
forms: JLayerForm[]
|
|
275
276
|
spatialDataSourceId: string
|
|
276
277
|
spatialDataSourceOrganizationId: string
|
|
277
|
-
spatialDataSourceAttributes:
|
|
278
|
+
spatialDataSourceAttributes: DataSourceAttribute[] | null
|
|
278
279
|
selectionStyleId: string
|
|
279
280
|
dynamicFilters: JLocalDynamicFilter[]
|
|
280
281
|
allowClientSideEditing: boolean
|
|
@@ -287,12 +288,14 @@ export interface JLayerForm {
|
|
|
287
288
|
name: string
|
|
288
289
|
}
|
|
289
290
|
|
|
291
|
+
/** @deprecated Legacy public view; use the shared LayerAttribute model for new consumers. */
|
|
290
292
|
export interface JLayerAttribute {
|
|
291
293
|
id: string
|
|
292
294
|
name: string
|
|
293
295
|
label: string
|
|
294
296
|
indexed: boolean
|
|
295
297
|
type: JLAYER_ATTRIBUTE_TYPES
|
|
298
|
+
visible: boolean
|
|
296
299
|
}
|
|
297
300
|
|
|
298
301
|
export interface JLayerTreeElement {
|
|
@@ -415,6 +418,11 @@ export interface JLayerStyleRuleConditionExpression {
|
|
|
415
418
|
id: string
|
|
416
419
|
operator: JLAYER_STYLE_RULE_CONDITION_EXPRESSION_OPERATORS
|
|
417
420
|
value: any
|
|
421
|
+
/**
|
|
422
|
+
* @deprecated Legacy style-rule input, retained for existing public callers.
|
|
423
|
+
* New metadata consumers should read LayerAttribute from JLayer.attributes;
|
|
424
|
+
* this input still requires the compatibility view returned by Layer.getLayerAttribute.
|
|
425
|
+
*/
|
|
418
426
|
attribute: JLayerAttribute
|
|
419
427
|
}
|
|
420
428
|
|
|
@@ -528,6 +536,7 @@ export interface JLayerSetLayerGroupsExpansionParams {
|
|
|
528
536
|
open: boolean
|
|
529
537
|
}
|
|
530
538
|
|
|
539
|
+
/** @deprecated Legacy SQL enum subset. Use the shared AttributeType SQL union for new consumers. */
|
|
531
540
|
export enum ATTRIBUTE_TYPES {
|
|
532
541
|
TINYINT = "TINYINT",
|
|
533
542
|
SMALLINT = "SMALLINT",
|
package/public/jmap/table.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { JLocalDynamicFilter } from "./dynamic-filter.d.ts"
|
|
2
|
-
import type {
|
|
2
|
+
import type { AttributeType, DataSourceAttribute, JAnyFilterCondition, TableAttribute } from "jmapcloud-types"
|
|
3
3
|
import type { JLocaleTranslation } from "./language.d.ts"
|
|
4
4
|
export {}
|
|
5
5
|
// ALL_TABLE_ATTRIBUTE_TYPES in all-enum.ts
|
|
6
|
+
/** @deprecated Simplified legacy categories. New consumers read the SQL `type` (AttributeType) of JTable.attributes. */
|
|
6
7
|
export enum JTABLE_ATTRIBUTE_TYPES {
|
|
7
8
|
STRING = "string",
|
|
8
9
|
NUMBER = "number",
|
|
@@ -20,8 +21,9 @@ export interface JTable {
|
|
|
20
21
|
id: string
|
|
21
22
|
projectId: string
|
|
22
23
|
name: string
|
|
23
|
-
attributes
|
|
24
|
-
|
|
24
|
+
/** Canonical target attributes, in configured order, including hidden attributes. Titles are localized. */
|
|
25
|
+
attributes: TableAttribute<string>[]
|
|
26
|
+
dataSourceAttributes: DataSourceAttribute[] | null
|
|
25
27
|
listed: boolean
|
|
26
28
|
description: JLocaleTranslation
|
|
27
29
|
dataSourceId: string
|
|
@@ -32,6 +34,7 @@ export interface JTable {
|
|
|
32
34
|
dynamicFilters: JLocalDynamicFilter[]
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
/** @deprecated Legacy public view; use the shared TableAttribute model for new consumers. */
|
|
35
38
|
export interface JTableAttribute {
|
|
36
39
|
id: string
|
|
37
40
|
name: string
|
|
@@ -39,6 +42,7 @@ export interface JTableAttribute {
|
|
|
39
42
|
label: string
|
|
40
43
|
type: AttributeType
|
|
41
44
|
indexed: boolean
|
|
45
|
+
visible: boolean
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
export interface JTableData {
|