jmapcloud-ng-core-types 0.0.4

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.
@@ -0,0 +1,591 @@
1
+ // ALL_LAYER_LAYER_TYPES in all-enum.ts
2
+ declare const enum JLAYER_LAYER_TYPES {
3
+ VECTOR = "VECTOR",
4
+ RASTER = "RASTER",
5
+ OGC_API_FEATURES = "OGC_API_FEATURES"
6
+ }
7
+
8
+ // ALL_LAYER_ELEMENT_TYPES in all-enum.ts
9
+ declare const enum JLAYER_ELEMENT_TYPES {
10
+ POINT = "POINT",
11
+ LINE = "LINE",
12
+ POLYGON = "POLYGON",
13
+ TEXT = "TEXT",
14
+ IMAGE = "IMAGE",
15
+ LABEL = "LABEL",
16
+ ELLIPSE = "ELLIPSE",
17
+ MIXED = "MIXED"
18
+ }
19
+
20
+ // ALL_LAYER_GEOMETRIES in all-enum.ts
21
+ declare const enum JLAYER_GEOMETRIES {
22
+ ANNOTATION = "ANNOTATION",
23
+ CURVE = "CURVE",
24
+ COMPLEX = "COMPLEX",
25
+ POINT = "POINT",
26
+ RASTER = "RASTER",
27
+ SURFACE = "SURFACE",
28
+ ELLIPSE = "ELLIPSE",
29
+ NONE = "NONE"
30
+ }
31
+
32
+ // ALL_LAYER_ATTRIBUTE_TYPES in all-enum.ts
33
+ declare const enum JLAYER_ATTRIBUTE_TYPES {
34
+ STRING = "string",
35
+ NUMBER = "number",
36
+ DATE = "date",
37
+ DATETIME = "datetime",
38
+ BOOLEAN = "boolean",
39
+ BINARY = "binary"
40
+ }
41
+
42
+ // ALL_LAYER_THEMATIC_TYPES in all-enum.ts
43
+ declare const enum JLAYER_THEMATIC_TYPES {
44
+ INDIVIDUAL = "INDIVIDUAL_VALUES",
45
+ GRADUATED = "GRADUATED_STYLE",
46
+ STYLE_RULE = "STYLE_RULE",
47
+ OTHER = "OTHER"
48
+ }
49
+
50
+ // ALL_LAYER_THEMATIC_FAMILY_TYPES in all-enum.ts
51
+ declare const enum JLAYER_THEMATIC_FAMILY_TYPES {
52
+ CLASSIFICATION = "Classification",
53
+ PROPORTIONAL_SYMBOL = "ProportionalSymbol",
54
+ STYLE_RULE = "StyleRule",
55
+ OTHER = "Other"
56
+ }
57
+
58
+ // ALL_LAYER_STYLE_TYPES in all-enum.ts
59
+ declare const enum JLAYER_STYLE_TYPES {
60
+ POINT = "POINT",
61
+ LINE = "LINE",
62
+ SURFACE = "SURFACE",
63
+ ANNOTATION = "ANNOTATION",
64
+ IMAGE = "IMAGE",
65
+ MIXED = "MIXED"
66
+ }
67
+
68
+ // ALL_LAYER_STYLE_ARROWS in all-enum.ts
69
+ declare const enum JLAYER_STYLE_ARROWS {
70
+ NONE = "NONE",
71
+ FORWARD = "FORWARD",
72
+ BACKWARD = "BACKWARD"
73
+ }
74
+
75
+ // ALL_LAYER_INFORMATION_REPORT_TYPES in all-enum.ts
76
+ declare const enum JLAYER_INFORMATION_REPORT_TYPES {
77
+ JSP = "JSP",
78
+ BIRT = "BIRT",
79
+ BIRT_HTML = "BIRT_HTML",
80
+ BIRT_PDF = "BIRT_PDF",
81
+ WMS = "WMS",
82
+ CUSTOM = "CUSTOM"
83
+ }
84
+
85
+ // ALL_LAYER_STYLE_RULE_CONDITION_EXPRESSION_OPERATORS in all-enum.ts
86
+ declare const enum JLAYER_STYLE_RULE_CONDITION_EXPRESSION_OPERATORS {
87
+ EMPTY = "EMPTY",
88
+ NOT_EMPTY = "NOT_EMPTY",
89
+ IS_NULL = "IS_NULL",
90
+ IS_NOT_NULL = "IS_NOT_NULL",
91
+ EQUALS = "EQUALS",
92
+ NOT_EQUALS = "NOT_EQUALS",
93
+ GREATER_THAN = "GREATER_THAN",
94
+ LOWER_THAN = "LOWER_THAN",
95
+ GREATER_OR_EQUALS_TO = "GREATER_OR_EQUALS_TO",
96
+ LOWER_OR_EQUALS_TO = "LOWER_OR_EQUALS_TO"
97
+ }
98
+
99
+ // ALL_LAYER_DYNAMIC_FILTER_OPERATORS in all-enum.ts
100
+ declare const enum JLAYER_DYNAMIC_FILTER_OPERATORS {
101
+ EQUALS = "EQUALS",
102
+ NOT_EQUALS = "NOT_EQUALS",
103
+ GREATER_THAN = "GREATER_THAN",
104
+ GREATER_OR_EQUALS_TO = "GREATER_OR_EQUALS_TO",
105
+ LESS_THAN = "LESS_THAN",
106
+ LESS_OR_EQUALS_TO = "LESS_OR_EQUALS_TO",
107
+ CONTAINS = "CONTAINS",
108
+ NOT_CONTAINS = "NOT_CONTAINS",
109
+ IS_EMPTY = "IS_EMPTY",
110
+ IS_NOT_EMPTY = "IS_NOT_EMPTY",
111
+ IS_NULL = "IS_NULL",
112
+ IS_NOT_NULL = "IS_NOT_NULL",
113
+ IS_IN_RANGE = "IS_IN_RANGE",
114
+ IS_NOT_IN_RANGE = "IS_NOT_IN_RANGE",
115
+ LAST = "LAST",
116
+ INTERVAL = "INTERVAL"
117
+ }
118
+
119
+ // ALL_LAYER_STYLE_LINE_STROKE_CAP in all-enum.ts
120
+ declare const enum JLAYER_STYLE_LINE_STROKE_CAP {
121
+ BUTT = "BUTT",
122
+ ROUND = "ROUND",
123
+ SQUARE = "SQUARE"
124
+ }
125
+
126
+ // ALL_LAYER_STYLE_LINE_STROKE_JOIN in all-enum.ts
127
+ declare const enum JLAYER_STYLE_LINE_STROKE_JOIN {
128
+ MITER = "MITER",
129
+ ROUND = "ROUND",
130
+ BEVEL = "BEVEL"
131
+ }
132
+
133
+ // ALL_LAYER_METADATA_TYPES in all-enum.ts
134
+ declare const enum JLAYER_METADATA_TYPES {
135
+ DATE = "date",
136
+ TEXT = "text",
137
+ NUMBER = "number",
138
+ TEXTAREA = "textarea",
139
+ URL = "url"
140
+ }
141
+
142
+ declare type JLayerMetaDataValue = string | number | Date
143
+
144
+ declare interface JLayerBaseMetadata {
145
+ id: JId
146
+ }
147
+
148
+ declare interface JLayerMetadataSchemaItem extends JLayerBaseMetadata {
149
+ type: JLAYER_METADATA_TYPES
150
+ label: string
151
+ allowMultiple: boolean
152
+ }
153
+
154
+ declare interface JLayerStyleSamplesById {
155
+ [styleId: string]: string
156
+ }
157
+
158
+ declare interface JLayersConfiguration {
159
+ metadataSchema: JLayerMetadataSchemaItem[]
160
+ layerTree: JLayerTree
161
+ styleSamples: JLayerStyleSamplesById
162
+ }
163
+
164
+ declare interface JLayerMetadata extends JLayerBaseMetadata {
165
+ value: JLayerMetaDataValue
166
+ label: string
167
+ type: JLAYER_METADATA_TYPES
168
+ }
169
+
170
+ interface JLayerMetadataSection {
171
+ id: JId
172
+ title: string
173
+ metadatas: JLayerMetadata[]
174
+ }
175
+
176
+ declare interface JLayerEventChangeParams {
177
+ layerTree: JLayerTree
178
+ }
179
+
180
+ declare interface JLayerEventThematicCategoryVisibilityParams {
181
+ layerId: JId
182
+ thematicId: JId
183
+ hiddenCategoryIndexes: number[]
184
+ }
185
+
186
+ declare interface JLayerEventThematicConditionVisibilityParams {
187
+ layerId: JId
188
+ thematicId: JId
189
+ hiddenConditionIds: string[]
190
+ }
191
+
192
+ declare interface JLayerEventThematicVisibilityParams {
193
+ layerId: JId
194
+ thematicId: JId
195
+ visibility: boolean
196
+ hiddenCategoryIndexes?: number[]
197
+ hiddenConditionIds?: string[]
198
+ }
199
+
200
+ declare interface JLayerEventVisibilityParams {
201
+ layerId: JId
202
+ visibility: boolean
203
+ areAllParentsVisible: boolean
204
+ }
205
+
206
+ declare interface JLayerEventRasterTransparencyParams {
207
+ layerId: JId
208
+ transparency: number
209
+ }
210
+
211
+ declare interface JLayerEventSelectabilityParams {
212
+ layerId: JId
213
+ selectability: boolean
214
+ }
215
+
216
+ declare interface JLayerEventParams {
217
+ layerId: JId
218
+ }
219
+
220
+ declare interface JLayerInitialSearchEventParams extends JLayerEventParams {
221
+ features: GeoJSON.Feature[]
222
+ }
223
+
224
+ declare interface JLayerDynamicFilterSetParams {
225
+ filters: JDynamicFilter[]
226
+ }
227
+
228
+ declare interface JLayerDynamicFilterActivationParams extends JLayerEventParams {
229
+ isActivation: boolean
230
+ }
231
+
232
+ declare interface JLayerDynamicFilterConditionCreated extends JLayerEventParams {
233
+ filter: JDynamicFilter
234
+ condition: JDynamicFilterCondition
235
+ }
236
+
237
+ declare interface JLayerDynamicFilterConditionUpdated extends JLayerEventParams {
238
+ filter: JDynamicFilter
239
+ condition: JDynamicFilterCondition
240
+ }
241
+
242
+ declare interface JLayerDynamicFilterConditionsRemoved extends JLayerEventParams {
243
+ filter: JDynamicFilter
244
+ conditionIds: number[]
245
+ }
246
+
247
+ declare interface JMapEventLoadedParams {
248
+ map: mapboxgl.Map
249
+ }
250
+
251
+ declare interface JLayerGeometry {
252
+ type: JLAYER_GEOMETRIES
253
+ editable: boolean
254
+ }
255
+
256
+ declare interface JLayerPermissions {
257
+ ADD: boolean
258
+ DELETE: boolean
259
+ DUPLICATE: boolean
260
+ EDIT_ATTRIBUTE_VALUES: boolean
261
+ EDIT_GEOMETRY: boolean
262
+ EDIT_ONLY_OWN: boolean
263
+ }
264
+
265
+ declare interface JLayerGroup extends JLayerTreeElement {
266
+ open: boolean
267
+ image: string | null
268
+ children: JLayerTreeElement[]
269
+ }
270
+
271
+ declare interface JLayer extends JLayerTreeElement {
272
+ geometry: JLayerGeometry
273
+ elementType: JLAYER_ELEMENT_TYPES
274
+ layerType: JLAYER_LAYER_TYPES
275
+ defaultMetadatas: JLayerMetadata[]
276
+ metadataSections: JLayerMetadataSection[]
277
+ attributes: JLayerAttribute[]
278
+ mouseOver: JMapMouseOver
279
+ minimumVisibleMapboxZoom: number | undefined
280
+ maximumVisibleMapboxZoom: number | undefined
281
+ styleRules: JLayerStyleRule[]
282
+ defaultStyleRule: JLayerStyleRule | undefined
283
+ thematics: JLayerThematic[]
284
+ queries: JQuery[]
285
+ extent: JBoundaryBox | null
286
+ permissions: JLayerPermissions
287
+ canEditGeometry: boolean
288
+ hasAttributeForm: boolean
289
+ hasExternalForms: boolean
290
+ selectable: boolean
291
+ listedInTree: boolean
292
+ authorPropertyName: string
293
+ lowercasedAttributeNames: string[]
294
+ forms: JLayerForm[]
295
+ hasInformationReport: boolean
296
+ informationReports: JLayerInformationReport[]
297
+ spatialDataSourceId: string // For JMap Cloud only
298
+ dynamicFilter: JDynamicFilter
299
+ }
300
+
301
+ declare interface JLayerInformationReport {
302
+ type: JLAYER_INFORMATION_REPORT_TYPES
303
+ title: string
304
+ preFormatted: boolean
305
+ singlePresentationPage: string
306
+ multiplePresentationPage: string
307
+ }
308
+
309
+ declare interface JDynamicFilter {
310
+ layerId: JId
311
+ isAvailable: boolean // false means no dynamic filter for layer, ex: IMAGE layers
312
+ isActive: boolean
313
+ intervalOperatorDisabled: boolean // true if layer has less than 2 date attributes
314
+ conditions: JDynamicFilterCondition[]
315
+ }
316
+
317
+ declare interface JDynamicFilterCondition {
318
+ layerId: JId
319
+ id: number
320
+ attributeName: string
321
+ endAttributeName?: string // used for INTERVAL operator
322
+ filterOperator: JLAYER_DYNAMIC_FILTER_OPERATORS
323
+ value: any | any[] // 2 items array for between
324
+ }
325
+
326
+ declare interface JDynamicFilterSetParams {
327
+ layerId: JId
328
+ conditions: JDynamicFilterCondition[]
329
+ isActive?: boolean
330
+ }
331
+
332
+ declare interface JLayerForm {
333
+ id: JId
334
+ name: string
335
+ type: JFORM_TYPES
336
+ }
337
+
338
+ declare interface JLayerAttribute {
339
+ id: string
340
+ name: string
341
+ label: string
342
+ type: JLAYER_ATTRIBUTE_TYPES
343
+ }
344
+
345
+ declare interface JLayerTreeElement {
346
+ id: JId
347
+ name: string
348
+ description: string
349
+ initialVisibility: boolean
350
+ visible: boolean
351
+ isGroup: boolean
352
+ path: string
353
+ }
354
+
355
+ declare type JLayerTree = JLayerTreeElement[]
356
+
357
+ declare interface JLayerThematic {
358
+ id: JId
359
+ enabled: boolean // initial visibility
360
+ isVisible: boolean // user visibility
361
+ name: string
362
+ description: string
363
+ type: JLAYER_THEMATIC_TYPES
364
+ title: string
365
+ subTitle: string
366
+ dynamicLegend: boolean
367
+ }
368
+
369
+ declare interface JLayerThematicClassification extends JLayerThematic {
370
+ categoryCount: number
371
+ colorPaletteName: string
372
+ attribute: string
373
+ nullValueSupported: boolean
374
+ outOfSampleDataIgnored: boolean
375
+ categories: JLayerThematicCategory[]
376
+ hiddenCategoryIndexes: number[]
377
+ }
378
+
379
+ declare interface JLayerThematicStyleRule extends JLayerThematic {
380
+ conditions: JLayerThematicCondition[]
381
+ hiddenConditionIds: string[]
382
+ }
383
+
384
+ declare interface JLayerThematicCondition {
385
+ id: string
386
+ title: string
387
+ scaledStyles: JLayerThematicConditionScaledStyle[]
388
+ }
389
+
390
+ declare interface JLayerThematicConditionScaledStyle {
391
+ minZoom: number
392
+ maxZoom: number
393
+ styleId: string
394
+ }
395
+
396
+ declare interface JLayerThematicCategory {
397
+ title: string
398
+ style: JLayerStyle
399
+ enabled: boolean
400
+ nullValueCategory: boolean
401
+ index: number
402
+ }
403
+
404
+ declare interface JLayerThematicCategoryIndividual extends JLayerThematicCategory {
405
+ type: JLAYER_THEMATIC_TYPES.INDIVIDUAL
406
+ value: any
407
+ }
408
+
409
+ declare interface JLayerThematicCategoryRange extends JLayerThematicCategory {
410
+ minimum: number
411
+ maximum: number
412
+ includeMax: boolean
413
+ includeMin: boolean
414
+ percentMinimum: number
415
+ percentMaximum: number
416
+ }
417
+
418
+ declare interface JLayerSearchByAttributesParams {
419
+ layerId: JId
420
+ attributeName: string
421
+ attributeValue: any | any[]
422
+ projectionCode?: string
423
+ }
424
+
425
+ declare interface JLayerStyleRule {
426
+ id: string
427
+ layerId: string
428
+ active: boolean
429
+ defaultRule: boolean
430
+ name: string
431
+ conditions: JLayerStyleRuleCondition[]
432
+ }
433
+
434
+ declare interface JLayerStyleRuleCondition {
435
+ id: string
436
+ name: string
437
+ styleMapScales: JLayerStyleScaled[]
438
+ }
439
+
440
+ declare interface JLayerStyleScaled {
441
+ id: string
442
+ styleId: string
443
+ minimumVisibleMapboxZoom: number
444
+ maximumVisibleMapboxZoom: number
445
+ }
446
+
447
+ declare interface JLayerStyleSample {
448
+ styleId: string
449
+ imageSampleInBase64: string
450
+ }
451
+
452
+ // @TODO we probably don't need this interface anymore
453
+ declare interface JLayerStyleRuleConditionExpression {
454
+ operator: JLAYER_STYLE_RULE_CONDITION_EXPRESSION_OPERATORS
455
+ value: any
456
+ attribute: JLayerAttribute
457
+ }
458
+
459
+ declare interface JLayerStyle {
460
+ styleType: JLAYER_STYLE_TYPES
461
+ imageSampleInBase64: string
462
+ transparencyPerCent: number
463
+ }
464
+
465
+ declare interface JLayerStyleVector extends JLayerStyle {
466
+ antiAliasing: boolean
467
+ }
468
+
469
+ declare interface JLayerStylePoint extends JLayerStyleVector {
470
+ styleType: JLAYER_STYLE_TYPES.POINT
471
+ symbolScale: number
472
+ symbolRotationInDegree: number
473
+ symbolProportionalSizeEnabled: boolean
474
+ symbolProportionalSize: number
475
+ symbolRotateWithMapEnabled: boolean
476
+ symbolOffsetX: number
477
+ symbolOffsetY: number
478
+ symbolVector: JLayerStyleSymbolVector | null
479
+ symbolImage: JLayerStyleSymbolImage | null
480
+ }
481
+
482
+ declare interface JLayerStyleLineStroke {
483
+ width: number
484
+ cap: JLAYER_STYLE_LINE_STROKE_CAP
485
+ join: JLAYER_STYLE_LINE_STROKE_JOIN
486
+ }
487
+
488
+ declare interface JLayerStyleLineStrokeBasic extends JLayerStyleLineStroke {
489
+ miterLimit: number
490
+ dash: number[]
491
+ dash_phase: number
492
+ }
493
+
494
+ declare interface JLayerStyleLine extends JLayerStyleVector {
495
+ styleType: JLAYER_STYLE_TYPES.LINE
496
+ lineColor: JRGBColor
497
+ lineThickness: number
498
+ arrowType: JLAYER_STYLE_ARROWS
499
+ arrowPositionFromLeftInPerCent: number
500
+ stroke: JLayerStyleLineStroke
501
+ }
502
+
503
+ declare interface JLayerStyleSurface extends JLayerStyleVector {
504
+ styleType: JLAYER_STYLE_TYPES.SURFACE
505
+ fillColor: JRGBColor
506
+ transparentFill: boolean
507
+ borderColor: JRGBColor
508
+ borderTransparencyInPercent: number
509
+ borderThickness: number
510
+ surfacePattern: string
511
+ patternColor: JRGBColor
512
+ patternTransparentFill: boolean
513
+ }
514
+
515
+ declare interface JLayerStyleAnnotation extends JLayerStyleVector {
516
+ styleType: JLAYER_STYLE_TYPES.ANNOTATION
517
+ textFont: string
518
+ textColor: JRGBColor
519
+ textBold: boolean
520
+ textItalic: boolean
521
+ textUnderlined: boolean
522
+ textStrikeThrough: boolean
523
+ textOutlined: boolean
524
+ textOutlineColor: JRGBColor
525
+ }
526
+
527
+ declare interface JLayerStyleMixed extends JLayerStyleVector {
528
+ styleType: JLAYER_STYLE_TYPES.MIXED
529
+ point: JLayerStylePoint
530
+ line: JLayerStyleLine
531
+ surface: JLayerStyleSurface
532
+ text: JLayerStyleAnnotation
533
+ }
534
+
535
+ declare interface JLayerStyleSymbolImage {
536
+ absoluteFilePath: string
537
+ }
538
+
539
+ declare interface JLayerStyleSymbolVector {
540
+ vectorSymbol: string
541
+ borderThickness: number
542
+ borderColor: JRGBColor
543
+ transparentFill: boolean
544
+ fillColor: JRGBColor
545
+ }
546
+
547
+ declare interface JRGBColor {
548
+ red: number
549
+ green: number
550
+ blue: number
551
+ alpha: number
552
+ hexa: string
553
+ }
554
+
555
+ declare interface JLayerSetLayersVisibilityParams {
556
+ layerId: JId
557
+ visibility: boolean
558
+ }
559
+
560
+ declare interface JLayerSetLayersSelectabilityParams {
561
+ layerId: JId
562
+ selectability: boolean
563
+ ignoreVisibility?: boolean
564
+ }
565
+
566
+ declare interface JLayerThematicSetVisibilityParams {
567
+ layerId: JId
568
+ thematicId: JId
569
+ visibility: boolean
570
+ hiddenCategoryIndexes?: number[]
571
+ hiddenConditionIds?: string[]
572
+ }
573
+
574
+ declare interface JLayerThematicSetCategoryVisibilityParams {
575
+ layerId: JId
576
+ thematicId: JId
577
+ categoryIndex: number
578
+ visibility: boolean
579
+ }
580
+
581
+ declare interface JLayerThematicSetConditionVisibilityParams {
582
+ layerId: JId
583
+ thematicId: string
584
+ conditionId: string
585
+ visibility: boolean
586
+ }
587
+
588
+ declare interface JLayerSetLayerGroupsExpansionParams {
589
+ layerGroupId: JId
590
+ open: boolean
591
+ }
@@ -0,0 +1,30 @@
1
+ // ALL_OPERATING_SYSTEMS in all-enum.ts
2
+ declare const enum JOPERATING_SYSTEMS {
3
+ UNKNOWN = "",
4
+ MAC = "mac",
5
+ WINDOWS = "windows",
6
+ IOS = "ios",
7
+ ANDROID = "android",
8
+ LINUX = "linux"
9
+ }
10
+
11
+ // ALL_FATAL_ERROR_CONTEXTS in all-enum.ts
12
+ declare const enum JFATAL_ERROR_CONTEXTS {
13
+ FORM = "FORM",
14
+ LAYER = "LAYER",
15
+ MAP = "MAP",
16
+ PROJECT = "PROJECT"
17
+ }
18
+
19
+ declare type JId = string | number
20
+
21
+ declare interface JSize {
22
+ width: number
23
+ height: number
24
+ }
25
+
26
+ declare interface JMainFatalErrorEventParams {
27
+ context: JFATAL_ERROR_CONTEXTS
28
+ source: string
29
+ action: string
30
+ }