jmapcloud-ng-types 1.1.20 → 1.1.22
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 +3 -1
- package/package.json +3 -3
- package/public/app.d.ts +31 -1
- package/public/form.d.ts +49 -15
- package/public/global-aliases.d.ts +1 -2
package/index.ts
CHANGED
|
@@ -76,7 +76,8 @@ export interface JAppMapState {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export interface JAppFormState {
|
|
79
|
-
|
|
79
|
+
formParams: JFormDialogParams | null
|
|
80
|
+
subFormParams: JSubFormDialogParams | null
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
export interface JAppMeasureState {
|
|
@@ -422,6 +423,7 @@ export interface JAppLayerTreeFilterService {
|
|
|
422
423
|
|
|
423
424
|
export interface JAppFormService {
|
|
424
425
|
openForm(params: JFormDialogParams): void
|
|
426
|
+
openSubForm(params: JSubFormDialogParams): void
|
|
425
427
|
}
|
|
426
428
|
|
|
427
429
|
export interface JAppAppEventModule extends JEventModule {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jmapcloud-ng-types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
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",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
9
|
"update-types-bridge": "node build/moduleize-dts.js && node build/auto-add-imports.js && node build/codemod-export-globals.js && node build/generate-ambient.js",
|
|
10
|
-
"pub-github": "npm run update-types-bridge && node build/buildfile.js publish-github;",
|
|
11
|
-
"doc-test": "npm run update-types-bridge && node build/buildfile.js doc-test;"
|
|
10
|
+
"pub-github": "cd ../../.. && npm --workspace app/jmapcloud-ng/ng-core-types run doc-test && npm --workspace app/jmapcloud-ng/ng-types run update-types-bridge && node app/jmapcloud-ng/ng-types/build/buildfile.js publish-github;",
|
|
11
|
+
"doc-test": "cd ../../.. && npm --workspace app/jmapcloud-ng/ng-core-types run doc-test && npm --workspace app/jmapcloud-ng/ng-types run update-types-bridge && node app/jmapcloud-ng/ng-types/build/buildfile.js doc-test;"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
package/public/app.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JAppAnnotation } from "./annotation.d.ts"
|
|
2
2
|
import type { JAPP_DRAW_MODES, JAPP_DRAW_TYPES, JAppDrawStyle } from "./draw.d.ts"
|
|
3
3
|
import type { JAppExtension, JAppExtensionEventParams } from "./extension.d.ts"
|
|
4
|
-
import type { JFormDialogParams } from "./form.d.ts"
|
|
4
|
+
import type { JFormDialogParams, JSubFormDialogParams } from "./form.d.ts"
|
|
5
5
|
import type { JAppGeometryUpdateParams } from "./geometry.d.ts"
|
|
6
6
|
import type {
|
|
7
7
|
JAPP_LAYER_EDITION_TABS,
|
|
@@ -3503,6 +3503,36 @@ declare global {
|
|
|
3503
3503
|
* ```
|
|
3504
3504
|
*/
|
|
3505
3505
|
function openForm(params: JFormDialogParams): void
|
|
3506
|
+
|
|
3507
|
+
/**
|
|
3508
|
+
* **JMap.Application.Form.openSubForm**
|
|
3509
|
+
*
|
|
3510
|
+
* Opens a sub-form dialog for a given data source. The dialog behavior
|
|
3511
|
+
* depends on the `type` value in `params`.
|
|
3512
|
+
*
|
|
3513
|
+
* Supported shapes:
|
|
3514
|
+
* - `type: "layerUpdate"`: edit an existing layer feature
|
|
3515
|
+
* - `type: "tableUpdate"`: edit an existing table row
|
|
3516
|
+
* - `type: "tableCreate"`: create a new table row
|
|
3517
|
+
*
|
|
3518
|
+
* @param params The parameters that configure which sub-form to open:
|
|
3519
|
+
* - `dataSourceId` (string): The data source ID that provides the form.
|
|
3520
|
+
* - For `layerUpdate`: `featureId` (JId), `isReadOnly` (boolean).
|
|
3521
|
+
* - For `tableUpdate`: `rowId` (number), `isReadOnly` (boolean).
|
|
3522
|
+
* - For `tableCreate`: `isReadOnly` is always `false`.
|
|
3523
|
+
* - `onSubmit?` (() => void): (Optional) Callback invoked after submit.
|
|
3524
|
+
* @example
|
|
3525
|
+
* ```ts
|
|
3526
|
+
* // Open a sub-form for a layer feature
|
|
3527
|
+
* JMap.Application.Form.openSubForm({
|
|
3528
|
+
* type: "layerUpdate",
|
|
3529
|
+
* dataSourceId: "db4bc79b-03fe-4cf7-a4bc-fb76d69cabdf",
|
|
3530
|
+
* featureId: 3022,
|
|
3531
|
+
* isReadOnly: true
|
|
3532
|
+
* })
|
|
3533
|
+
* ```
|
|
3534
|
+
*/
|
|
3535
|
+
function openSubForm(params: JSubFormDialogParams): void
|
|
3506
3536
|
}
|
|
3507
3537
|
}
|
|
3508
3538
|
}
|
package/public/form.d.ts
CHANGED
|
@@ -1,17 +1,51 @@
|
|
|
1
1
|
export {}
|
|
2
|
-
export type JFormDialogParams =
|
|
2
|
+
export type JFormDialogParams =
|
|
3
|
+
| {
|
|
4
|
+
type: "layerUpdate"
|
|
5
|
+
layer: JLayer
|
|
6
|
+
featureId: JId
|
|
7
|
+
isReadOnly: boolean
|
|
8
|
+
onSubmit?: () => void
|
|
9
|
+
}
|
|
10
|
+
| {
|
|
11
|
+
type: "layerCreation"
|
|
12
|
+
layer: JLayer
|
|
13
|
+
feature: GeoJSON.Feature
|
|
14
|
+
isReadOnly: false
|
|
15
|
+
onSubmit?: () => void
|
|
16
|
+
}
|
|
17
|
+
| {
|
|
18
|
+
type: "tableUpdate"
|
|
19
|
+
table: JTable
|
|
20
|
+
rowId: number
|
|
21
|
+
isReadOnly: boolean
|
|
22
|
+
onSubmit?: () => void
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
type: "tableCreate"
|
|
26
|
+
table: JTable
|
|
27
|
+
isReadOnly: false
|
|
28
|
+
onSubmit?: () => void
|
|
29
|
+
}
|
|
3
30
|
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
export type JSubFormDialogParams =
|
|
32
|
+
| {
|
|
33
|
+
type: "layerUpdate"
|
|
34
|
+
dataSourceId: string
|
|
35
|
+
featureId: JId
|
|
36
|
+
isReadOnly: boolean
|
|
37
|
+
onSubmit?: () => void
|
|
38
|
+
}
|
|
39
|
+
| {
|
|
40
|
+
type: "tableUpdate"
|
|
41
|
+
dataSourceId: string
|
|
42
|
+
rowId: number
|
|
43
|
+
isReadOnly: boolean
|
|
44
|
+
onSubmit?: () => void
|
|
45
|
+
}
|
|
46
|
+
| {
|
|
47
|
+
type: "tableCreate"
|
|
48
|
+
dataSourceId: string
|
|
49
|
+
isReadOnly: false
|
|
50
|
+
onSubmit?: () => void
|
|
51
|
+
}
|
|
@@ -33,8 +33,7 @@ declare global {
|
|
|
33
33
|
/** @internal */ type JAppExtension = extensiondts.JAppExtension
|
|
34
34
|
/** @internal */ type JAppExtensionEventParams = extensiondts.JAppExtensionEventParams
|
|
35
35
|
/** @internal */ type JFormDialogParams = formdts.JFormDialogParams
|
|
36
|
-
/** @internal */ type
|
|
37
|
-
/** @internal */ type JFormDialogTableParams = formdts.JFormDialogTableParams
|
|
36
|
+
/** @internal */ type JSubFormDialogParams = formdts.JSubFormDialogParams
|
|
38
37
|
/** @internal */ type JAPP_GEOMETRY_WIZARD_STEPS = geometrydts.JAPP_GEOMETRY_WIZARD_STEPS
|
|
39
38
|
/** @internal */ const JAPP_GEOMETRY_WIZARD_STEPS: typeof geometrydts.JAPP_GEOMETRY_WIZARD_STEPS
|
|
40
39
|
/** @internal */ type JAppGeometryUpdateParams = geometrydts.JAppGeometryUpdateParams
|