jmapcloud-ng-core-types 1.1.35 → 1.1.36

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.d.ts CHANGED
@@ -1,8 +1,26 @@
1
+ /// <reference path="./public/global-aliases.d.ts" />
1
2
  import { Feature, FeatureCollection, LineString, MultiLineString, Point, Polygon } from "geojson"
2
3
  import { JForm as JFormJMC } from "jmapcloud-types"
3
4
  import { Action, Store } from "redux"
5
+ import type { JCoreState } from "./public/state.d.ts"
4
6
 
5
7
  export type { JCoreOptions } from "./public/jmap/startup-options.d.ts"
8
+ export type {
9
+ JCoreState,
10
+ JFormState,
11
+ JGeocodingState,
12
+ JGeolocationState,
13
+ JLanguageState,
14
+ JLayerState,
15
+ JMapContextState,
16
+ JMapState,
17
+ JProjectState,
18
+ JServerState,
19
+ JSimpleSearchState,
20
+ JTableState,
21
+ JUIState,
22
+ JUserState
23
+ } from "./public/state.d.ts"
6
24
 
7
25
  export interface JCoreService extends JCoreMainService {
8
26
  Project: JProjectService
@@ -377,171 +395,6 @@ export interface JMapContextEventModule extends JEventModule {
377
395
  }
378
396
  }
379
397
 
380
- export interface JCoreState {
381
- map: JMapState
382
- project: JProjectState
383
- layer: JLayerState
384
- table: JTableState
385
- user: JUserState
386
- language: JLanguageState
387
- geocoding: JGeocodingState
388
- simpleSearch: JSimpleSearchState
389
- geolocation: JGeolocationState
390
- form: JFormState
391
- server: JServerState
392
- mapContext: JMapContextState
393
- ui: JUIState
394
- external?: any
395
- }
396
-
397
- export interface JUIState {
398
- isMainLayoutVisible: boolean
399
- iframePopup: JIFramePopup
400
- }
401
-
402
- export interface JMapContextState {
403
- isInitialized: boolean
404
- isActive: boolean
405
- isLoading: boolean
406
- hasLoadingError: boolean
407
- isApplying: boolean
408
- activeTab: JMAP_CONTEXT_TABS
409
- contexts: JMapContext[]
410
- defaultContextId: string | undefined
411
- filter: string
412
- sortBy: JMAP_CONTEXT_SORT_BY_OPTIONS
413
- sortByDirection: JMAP_CONTEXT_SORT_BY_DIRECTIONS
414
- createTitle: string
415
- createDescription: string
416
- createTitleError: boolean
417
- }
418
-
419
- export interface JFormState {
420
- layerId: JId // set as "" when no layer is set
421
- formMetaDataById: JFormMetaDataById
422
- isLoadingLayer: boolean
423
- hasLoadingLayerError: boolean
424
- isSubmitting: boolean
425
- submitErrors: string[]
426
- activeTabIndex: number
427
- attributeForm: JForm | undefined
428
- externalForms: JForm[]
429
- subForms: JForm[]
430
- }
431
-
432
- export interface JGeocodingState {
433
- isAvailable: boolean
434
- isLoadPending: boolean
435
- isLoading: boolean
436
- hasLoadingError: boolean
437
- searchString: string
438
- results: JGeocodingResult[]
439
- }
440
-
441
- export interface JSimpleSearchState {
442
- isLoadPending: boolean
443
- isLoading: boolean
444
- hasLoadingError: boolean
445
- queryString: string
446
- results: JSimpleSearchResult[]
447
- }
448
-
449
- export interface JGeolocationState {
450
- isLocationDisplayed: boolean
451
- isEnabled: boolean
452
- isSupported: boolean
453
- currentLocation: JLocation | undefined
454
- }
455
-
456
- export interface JMapState {
457
- pitch: number
458
- rotation: number
459
- bearing: number
460
- isLoaded: boolean
461
- hasFirstLoaded: boolean
462
- hasLoadingError: boolean
463
- navigationHistory: JMapNavigationStep[]
464
- center: JLocation
465
- zoom: number
466
- scale: number
467
- boundaryBox: JBoundaryBox
468
- activeBasemapId: string | undefined
469
- basemaps: JBasemap[]
470
- selection: JMapSelection
471
- jmapLayerIdsSupportedByMaplibre: JId[]
472
- scaleControlPosition: JMAP_POSITIONS
473
- distanceUnit: JMAP_DISTANCE_UNITS
474
- isNavigationHistoryControlVisible: boolean
475
- isTerrainAvailable: boolean
476
- isTerrainActive: boolean
477
- isScaleControlVisible: boolean
478
- isMapRotationControlVisible: boolean
479
- isTerrainControlVisible: boolean
480
- isMapInfoControlVisible: boolean
481
- isInfoControlExpanded: boolean
482
- defaultZoomOptions: JZoomOptions
483
- containerWidth: number
484
- containerHeight: number
485
- modificationType: JMAP_MODIFICATION_TYPES
486
- attributions: JMapAttribution[]
487
- rasterOpacityByLayerId: { [id: JId]: number }
488
- projection: JProjection
489
- }
490
-
491
- export interface JProjectState {
492
- isLoading: boolean
493
- hasLoadingError: boolean
494
- allProjects: JProject[]
495
- selectedProject: JProject
496
- disableProjectChange: boolean
497
- }
498
-
499
- export interface JLayerState {
500
- isLoading: boolean
501
- hasLoadingError: boolean
502
- metadataSchema: JLayerMetadataSchemaItem[]
503
- tree: JLayerTree
504
- styleSamplesById: JLayerStyleSamplesById
505
- allById: { [treeElementId: string]: JLayerTreeElement }
506
- orderedLayerIds: JId[]
507
- vectorLayerIds: JId[]
508
- }
509
-
510
- export interface JTableState {
511
- isLoading: boolean
512
- hasLoadingError: boolean
513
- tables: JTable[]
514
- }
515
-
516
- export interface JUserState extends JTokenInfo {
517
- isAnonymous: boolean
518
- anonymousOrganizationId: string
519
- anonymousProjectId: JId
520
- isLoggingIn: boolean
521
- isLoggingIntoOrganization: boolean
522
- isReloadingSession: boolean
523
- identity: JUser
524
- currentOrganization: JOrganization // the organization in which the user is currently logged in
525
- organizationInfos: JOrganizationInfo[] // the info about all organizations the user belongs to
526
- informations: JUserInfo[]
527
- changePasswordAllowed: boolean
528
- identityProviderType: JSERVER_IDENTITY_PROVIDER_TYPES
529
- // from portal
530
- loginStatus: LOGIN_STATUS
531
- loginStatusDetailTranslationKey: string
532
- callbackAtTokenRefresh: (() => void) | null
533
- }
534
-
535
- export interface JLanguageState {
536
- locale: JLOCALES
537
- }
538
-
539
- export interface JServerState extends JServerInfo {
540
- isReady: boolean
541
- isLoading: boolean
542
- hasLoadingError: boolean
543
- }
544
-
545
398
  export type JHistoryListener = (oldValue: string | undefined, newValue: string | undefined) => void
546
399
 
547
400
  export interface JFormJMCService {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-core-types",
3
- "version": "1.1.35",
3
+ "version": "1.1.36",
4
4
  "description": "JMap Cloud specific version of JMap Cloud NG Core types and interfaces",
5
5
  "main": "index.js",
6
6
  "types": "ambient.d.ts",
package/public/core.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /// <reference path="./global-aliases.d.ts" />
2
2
 
3
3
  import type { Action, Store } from "redux"
4
+ import type { JCoreState } from "./state.d.ts"
4
5
  import type { JRequestConfig } from "./jmap/ajax.d.ts"
5
6
  import type {
6
7
  JAttachment,
@@ -159,7 +160,6 @@ import type {
159
160
  JProjectEventParams,
160
161
  JProjectLoadThumbnailsParams
161
162
  } from "./jmap/project.d.ts"
162
- import type { JCoreState } from "../index"
163
163
  import type { JMapSelectionParams, JSelectionSetLayersSelectionParams } from "./jmap/selection.d.ts"
164
164
  import type {
165
165
  JServerAnyIdentityProvider,
@@ -0,0 +1,194 @@
1
+ import type { JForm, JFormMetaDataById } from "./jmap/form.d.ts"
2
+ import type { JGeocodingResult } from "./jmap/geocoding.d.ts"
3
+ import type { JBoundaryBox, JLocation } from "./jmap/geometry.d.ts"
4
+ import type { JLOCALES } from "./jmap/language.d.ts"
5
+ import type { JLayerMetadataSchemaItem, JLayerStyleSamplesById, JLayerTree, JLayerTreeElement } from "./jmap/layer.d.ts"
6
+ import type { JId } from "./jmap/main.d.ts"
7
+ import type {
8
+ JMAP_CONTEXT_SORT_BY_DIRECTIONS,
9
+ JMAP_CONTEXT_SORT_BY_OPTIONS,
10
+ JMAP_CONTEXT_TABS,
11
+ JMapContext
12
+ } from "./jmap/map-context.d.ts"
13
+ import type {
14
+ JBasemap,
15
+ JMAP_DISTANCE_UNITS,
16
+ JMAP_MODIFICATION_TYPES,
17
+ JMAP_POSITIONS,
18
+ JMapAttribution,
19
+ JMapNavigationStep,
20
+ JMapSelection,
21
+ JProjection,
22
+ JZoomOptions
23
+ } from "./jmap/map.d.ts"
24
+ import type { JProject } from "./jmap/project.d.ts"
25
+ import type { JSERVER_IDENTITY_PROVIDER_TYPES, JServerInfo } from "./jmap/server.d.ts"
26
+ import type { JSimpleSearchResult } from "./jmap/simple-search.d.ts"
27
+ import type { JTable } from "./jmap/table.d.ts"
28
+ import type { JIFramePopup } from "./jmap/ui.d.ts"
29
+ import type { JOrganization, JOrganizationInfo, JTokenInfo, JUser, JUserInfo, LOGIN_STATUS } from "./jmap/user.d.ts"
30
+ export {}
31
+
32
+ export interface JCoreState {
33
+ map: JMapState
34
+ project: JProjectState
35
+ layer: JLayerState
36
+ table: JTableState
37
+ user: JUserState
38
+ language: JLanguageState
39
+ geocoding: JGeocodingState
40
+ simpleSearch: JSimpleSearchState
41
+ geolocation: JGeolocationState
42
+ form: JFormState
43
+ server: JServerState
44
+ mapContext: JMapContextState
45
+ ui: JUIState
46
+ external?: any
47
+ }
48
+
49
+ export interface JUIState {
50
+ isMainLayoutVisible: boolean
51
+ iframePopup: JIFramePopup
52
+ }
53
+
54
+ export interface JMapContextState {
55
+ isInitialized: boolean
56
+ isActive: boolean
57
+ isLoading: boolean
58
+ hasLoadingError: boolean
59
+ isApplying: boolean
60
+ activeTab: JMAP_CONTEXT_TABS
61
+ contexts: JMapContext[]
62
+ defaultContextId: string | undefined
63
+ filter: string
64
+ sortBy: JMAP_CONTEXT_SORT_BY_OPTIONS
65
+ sortByDirection: JMAP_CONTEXT_SORT_BY_DIRECTIONS
66
+ createTitle: string
67
+ createDescription: string
68
+ createTitleError: boolean
69
+ }
70
+
71
+ export interface JFormState {
72
+ layerId: JId // set as "" when no layer is set
73
+ formMetaDataById: JFormMetaDataById
74
+ isLoadingLayer: boolean
75
+ hasLoadingLayerError: boolean
76
+ isSubmitting: boolean
77
+ submitErrors: string[]
78
+ activeTabIndex: number
79
+ attributeForm: JForm | undefined
80
+ externalForms: JForm[]
81
+ subForms: JForm[]
82
+ }
83
+
84
+ export interface JGeocodingState {
85
+ isAvailable: boolean
86
+ isLoadPending: boolean
87
+ isLoading: boolean
88
+ hasLoadingError: boolean
89
+ searchString: string
90
+ results: JGeocodingResult[]
91
+ }
92
+
93
+ export interface JSimpleSearchState {
94
+ isLoadPending: boolean
95
+ isLoading: boolean
96
+ hasLoadingError: boolean
97
+ queryString: string
98
+ results: JSimpleSearchResult[]
99
+ }
100
+
101
+ export interface JGeolocationState {
102
+ isLocationDisplayed: boolean
103
+ isEnabled: boolean
104
+ isSupported: boolean
105
+ currentLocation: JLocation | undefined
106
+ }
107
+
108
+ export interface JMapState {
109
+ pitch: number
110
+ rotation: number
111
+ bearing: number
112
+ isLoaded: boolean
113
+ hasFirstLoaded: boolean
114
+ hasLoadingError: boolean
115
+ navigationHistory: JMapNavigationStep[]
116
+ center: JLocation
117
+ zoom: number
118
+ scale: number
119
+ boundaryBox: JBoundaryBox
120
+ activeBasemapId: string | undefined
121
+ basemaps: JBasemap[]
122
+ selection: JMapSelection
123
+ jmapLayerIdsSupportedByMaplibre: JId[]
124
+ scaleControlPosition: JMAP_POSITIONS
125
+ distanceUnit: JMAP_DISTANCE_UNITS
126
+ isNavigationHistoryControlVisible: boolean
127
+ isTerrainAvailable: boolean
128
+ isTerrainActive: boolean
129
+ isScaleControlVisible: boolean
130
+ isMapRotationControlVisible: boolean
131
+ isTerrainControlVisible: boolean
132
+ isMapInfoControlVisible: boolean
133
+ isInfoControlExpanded: boolean
134
+ defaultZoomOptions: JZoomOptions
135
+ containerWidth: number
136
+ containerHeight: number
137
+ modificationType: JMAP_MODIFICATION_TYPES
138
+ attributions: JMapAttribution[]
139
+ rasterOpacityByLayerId: { [id: JId]: number }
140
+ projection: JProjection
141
+ }
142
+
143
+ export interface JProjectState {
144
+ isLoading: boolean
145
+ hasLoadingError: boolean
146
+ allProjects: JProject[]
147
+ selectedProject: JProject
148
+ disableProjectChange: boolean
149
+ }
150
+
151
+ export interface JLayerState {
152
+ isLoading: boolean
153
+ hasLoadingError: boolean
154
+ metadataSchema: JLayerMetadataSchemaItem[]
155
+ tree: JLayerTree
156
+ styleSamplesById: JLayerStyleSamplesById
157
+ allById: { [treeElementId: string]: JLayerTreeElement }
158
+ orderedLayerIds: JId[]
159
+ vectorLayerIds: JId[]
160
+ }
161
+
162
+ export interface JTableState {
163
+ isLoading: boolean
164
+ hasLoadingError: boolean
165
+ tables: JTable[]
166
+ }
167
+
168
+ export interface JUserState extends JTokenInfo {
169
+ isAnonymous: boolean
170
+ anonymousOrganizationId: string
171
+ anonymousProjectId: JId
172
+ isLoggingIn: boolean
173
+ isLoggingIntoOrganization: boolean
174
+ isReloadingSession: boolean
175
+ identity: JUser
176
+ currentOrganization: JOrganization
177
+ organizationInfos: JOrganizationInfo[]
178
+ informations: JUserInfo[]
179
+ changePasswordAllowed: boolean
180
+ identityProviderType: JSERVER_IDENTITY_PROVIDER_TYPES
181
+ loginStatus: LOGIN_STATUS
182
+ loginStatusDetailTranslationKey: string
183
+ callbackAtTokenRefresh: (() => void) | null
184
+ }
185
+
186
+ export interface JLanguageState {
187
+ locale: JLOCALES
188
+ }
189
+
190
+ export interface JServerState extends JServerInfo {
191
+ isReady: boolean
192
+ isLoading: boolean
193
+ hasLoadingError: boolean
194
+ }