jmapcloud-ng-core-types 1.0.36 → 1.0.38

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
@@ -477,7 +477,7 @@ export interface JSimpleSearchState {
477
477
  isLoading: boolean
478
478
  hasLoadingError: boolean
479
479
  queryString: string
480
- results: JSimpleSearchResult
480
+ results: JSimpleSearchResult[]
481
481
  }
482
482
 
483
483
  export interface JGeolocationState {
@@ -585,8 +585,8 @@ export interface JServerState extends JServerInfo {
585
585
  export type JHistoryListener = (oldValue: string | undefined, newValue: string | undefined) => void
586
586
 
587
587
  export interface JFormJMCService {
588
- getJsonForm(layerId: string): any
589
- getForm(layerId: string): any
588
+ getJsonForm(layerId: string): JJsonFormSchemas
589
+ getForm(layerId: string): Promise<JFormJMC>
590
590
  }
591
591
 
592
592
  export interface JFormService {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-core-types",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "JMap Cloud specific version of JMap Cloud NG Core types and interfaces",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/core.d.ts CHANGED
@@ -7036,7 +7036,7 @@ declare namespace JMap {
7036
7036
  *
7037
7037
  * All query_string reserved characters are escaped, and the following characters can't be used: "<>"
7038
7038
  *
7039
- * This method will fetch a result object indicating all matches found.
7039
+ * This method will fetch an array of result object indicating all matches found.
7040
7040
  *
7041
7041
  * @throws if no project is loaded, if the passed search string is not a string or if it contains invalid characters.
7042
7042
  * @param queryString the search string to be used
@@ -10262,7 +10262,7 @@ declare namespace JMap {
10262
10262
  * .catch(error => console.error("An error occurred when getting jsonForm schema", error))
10263
10263
  * ```
10264
10264
  */
10265
- function getJsonForm(layerId: JId): any
10265
+ function getJsonForm(layerId: JId): JJsonFormSchemas
10266
10266
 
10267
10267
  /**
10268
10268
  * ***JMap.FormJMC.getForm***
@@ -10281,7 +10281,7 @@ declare namespace JMap {
10281
10281
  * .catch(error => console.error("An error occurred when getting the form for layer f47ac10b-58cc-4372-a567-0e02b2c3d479", error))
10282
10282
  * ```
10283
10283
  */
10284
- function getForm(layerId: JId): any
10284
+ function getForm(layerId: JId): Promise<JFormJMC>
10285
10285
  }
10286
10286
  /**
10287
10287
  * **JMap.Form**
@@ -1,25 +1,24 @@
1
1
  declare interface JJsonFormSchemas {
2
- schema: JJsonFormSchema | null
3
- uiSchema: JJsonFormUISchema | null
2
+ schema: JFormSchemaJMC | null
3
+ uiSchema: FormNodeVertical | null
4
4
  }
5
5
 
6
- declare interface JJsonFormSchema {
6
+ declare interface JFormSchemaJMC {
7
7
  type: "object"
8
8
  properties: {
9
- [key: string]: {
10
- type: string
11
- format?: string
12
- }
9
+ [key: string]: JFormSchemaPropertyJMC
13
10
  }
14
11
  required: string[]
15
12
  }
16
- declare interface JJsonFormControlElement {
17
- type: "Control"
18
- scope: string
19
- label: string
20
- options?: {
21
- [key: string]: any
22
- }
13
+
14
+ declare interface JFormSchemaPropertyJMC {
15
+ type: string
16
+ format?: string
17
+ title?: string
18
+ default?: any
19
+ minimum?: number
20
+ maximum?: number
21
+ enum?: any[]
23
22
  }
24
23
 
25
24
  declare interface JFormJMC {
@@ -36,11 +35,6 @@ declare interface JFormJMC {
36
35
  dataSourceId: string
37
36
  }
38
37
 
39
- declare interface JJsonFormUISchema {
40
- type: "VerticalLayout"
41
- elements: JJsonFormControlElement[]
42
- }
43
-
44
38
  interface FormNodeBase {
45
39
  type: string
46
40
  designComponent: string
@@ -48,7 +42,7 @@ interface FormNodeBase {
48
42
  icon: any
49
43
  }
50
44
 
51
- export interface FormNodeControl extends FormNodeBase {
45
+ declare interface FormNodeControl extends FormNodeBase {
52
46
  type: "Control"
53
47
  title?: string
54
48
  scope: string
@@ -56,25 +50,25 @@ export interface FormNodeControl extends FormNodeBase {
56
50
  readonly: boolean
57
51
  }
58
52
  }
59
- export interface FormNodeLabel extends FormNodeBase {
53
+ declare interface FormNodeLabel extends FormNodeBase {
60
54
  designComponent: "Label"
61
55
  type: "Label"
62
56
  text?: string
63
57
  }
64
58
 
65
- export interface FormNodeText extends FormNodeControl {
59
+ declare interface FormNodeText extends FormNodeControl {
66
60
  designComponent: "Text"
67
61
  options: FormNodeControl["options"] & {
68
62
  multi: boolean
69
63
  }
70
64
  }
71
- export interface FormNodeNumber extends FormNodeControl {
65
+ declare interface FormNodeNumber extends FormNodeControl {
72
66
  designComponent: "Number"
73
67
  options: FormNodeControl["options"] & {
74
68
  slider: boolean
75
69
  }
76
70
  }
77
- export interface FormNodeBoolean extends FormNodeControl {
71
+ declare interface FormNodeBoolean extends FormNodeControl {
78
72
  designComponent: "Boolean"
79
73
  options: FormNodeControl["options"] & {
80
74
  toggle: boolean
@@ -83,49 +77,49 @@ export interface FormNodeBoolean extends FormNodeControl {
83
77
  uncheckedValue: string | number
84
78
  }
85
79
  }
86
- export interface FormNodeDate extends FormNodeControl {
80
+ declare interface FormNodeDate extends FormNodeControl {
87
81
  designComponent: "Date"
88
82
  }
89
- export interface FormNodeList extends FormNodeControl {
83
+ declare interface FormNodeList extends FormNodeControl {
90
84
  designComponent: "List"
91
85
  options: FormNodeControl["options"] & {
92
86
  format?: string
93
87
  }
94
88
  }
95
89
 
96
- export interface FormNodeLayout extends FormNodeBase {
90
+ declare interface FormNodeLayout extends FormNodeBase {
97
91
  type: string
98
92
  elements: FormNode[]
99
93
  }
100
94
 
101
- export interface FormNodeVertical extends FormNodeLayout {
95
+ declare interface FormNodeVertical extends FormNodeLayout {
102
96
  type: "VerticalLayout"
103
97
  designComponent: "VerticalLayout"
104
98
  isRoot?: boolean
105
99
  }
106
100
 
107
- export interface FormNodeHorizontal extends FormNodeLayout {
101
+ declare interface FormNodeHorizontal extends FormNodeLayout {
108
102
  type: "HorizontalLayout"
109
103
  designComponent: "HorizontalLayout"
110
104
  }
111
- export interface FormNodeGroup extends FormNodeLayout {
105
+ declare interface FormNodeGroup extends FormNodeLayout {
112
106
  type: "Group"
113
107
  designComponent: "Group"
114
108
  label?: string
115
109
  }
116
110
 
117
- export interface FormNodeTabs extends FormNodeLayout {
111
+ declare interface FormNodeTabs extends FormNodeLayout {
118
112
  type: "Categorization"
119
113
  designComponent: "Tabs"
120
114
  }
121
115
 
122
- export interface FormNodeTab extends FormNodeLayout {
116
+ declare interface FormNodeTab extends FormNodeLayout {
123
117
  type: "Category"
124
118
  designComponent: "Category"
125
119
  label?: string
126
120
  }
127
121
 
128
- export type FormNodesControl = FormNodeText | FormNodeNumber | FormNodeBoolean | FormNodeDate | FormNodeList
129
- export type FormNodesLayout = FormNodeVertical | FormNodeHorizontal | FormNodeGroup | FormNodeTabs | FormNodeTab
122
+ declare type FormNodesControl = FormNodeText | FormNodeNumber | FormNodeBoolean | FormNodeDate | FormNodeList
123
+ declare type FormNodesLayout = FormNodeVertical | FormNodeHorizontal | FormNodeGroup | FormNodeTabs | FormNodeTab
130
124
 
131
- export type FormNode = FormNodesControl | FormNodesLayout | FormNodeLabel
125
+ declare type FormNode = FormNodesControl | FormNodesLayout | FormNodeLabel
@@ -34,7 +34,7 @@ declare interface JSimpleSearchResultHit {
34
34
  }
35
35
 
36
36
  declare interface JSimpleSearchSuccessEventParams {
37
- result: JSimpleSearchResult
37
+ result: JSimpleSearchResult[]
38
38
  }
39
39
 
40
40
  declare interface JSimpleSearchErrorEventParams {