This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
637 lines (537 loc) · 15.4 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
import esri = __esri;
interface Hash<T> {
[key: string]: T;
}
declare namespace __cov {
///////////////////////////////////////////////////////////////////
// popups
///////////////////////////////////////////////////////////////////
export class TaxLotPopup extends esri.PopupTemplate {}
export class WaterMeterPopup extends esri.PopupTemplate {}
export interface TaxMapPopupProperties extends esri.PopupTemplateProperties {
/**
* Layer with tax map images.
*/
taxMapsLayer: esri.MapImageLayer;
}
export class TaxMapPopup extends esri.PopupTemplate {
constructor(properties: TaxMapPopupProperties);
taxMapsLayer: esri.MapImageLayer;
}
///////////////////////////////////////////////////////////////////
// view models
///////////////////////////////////////////////////////////////////
export interface OAuthViewModelProperties extends Object {
/**
* esri.portal.Portal instance to sign into.
*/
portal: esri.Portal;
/**
* esri.identity.OAuthInfo instance to perform authentication against.
*/
oAuthInfo: esri.OAuthInfo;
/**
* Alternate sign in url.
*
* Overrides default `${portal.url}/sharing/rest`.
*/
signInUrl?: string;
}
export class OAuthViewModel extends esri.Accessor {
constructor(properties: OAuthViewModelProperties);
portal: esri.Portal;
oAuthInfo: esri.OAuthInfo;
signInUrl: string;
credential: esri.Credential;
user: esri.PortalUser;
name: string;
username: string;
signedIn: boolean;
load(): Promise<boolean>;
signIn(): void;
signOut(): void;
}
export interface UnitsViewModelProperties extends Object {
/**
* CSS class string for <select>s.
*
* @default 'esri-select'
*/
selectClass: string;
/**
* Current location unit.
*/
locationUnit: string;
/**
* Available location unit and display text key/value pairs.
*/
locationUnits: Hash<string>;
/**
* Current length unit.
*/
lengthUnit: esri.LinearUnits;
/**
* Available length unit and display text key/value pairs.
*/
lengthUnits: Hash<string>;
/**
* Current area unit.
*/
areaUnit: esri.ArealUnits;
/**
* Available area unit and display text key/value pairs.
*/
areaUnits: Hash<string>;
/**
* Current elevation unit.
*/
elevationUnit: string;
/**
* Available elevation unit and display text key/value pairs.
*/
elevationUnits: Hash<string>;
}
export class UnitsViewModel extends esri.Accessor {
constructor(properties?: UnitsViewModelProperties);
selectClass: string;
locationUnit: string;
locationUnits: Hash<string>;
lengthUnit: esri.LinearUnits;
lengthUnits: Hash<string>;
areaUnit: esri.ArealUnits;
areaUnits: Hash<string>;
elevationUnit: string;
elevationUnits: Hash<string>;
locationSelect(name?: null | string, title?: null | string): tsx.JSX.Element;
lengthSelect(name?: null | string, title?: null | string): tsx.JSX.Element;
areaSelect(name?: null | string, title?: null | string): tsx.JSX.Element;
elevationSelect(name?: null | string, title?: null | string): tsx.JSX.Element;
}
///////////////////////////////////////////////////////////////////
// widgets
///////////////////////////////////////////////////////////////////
export interface DisclaimerProperties extends esri.WidgetProperties {
/**
* Disclaimer title (usually the application title).
*
* @default 'Disclaimer'
*/
title?: string;
/**
* Disclaimer text.
*
* @default 'There are no warranties, expressed or implied, including the warranty of merchantability or fitness for a particular purpose, accompanying this application.'
*/
disclaimer?: string;
}
export class Disclaimer extends esri.Widget {
constructor(properties?: DisclaimerProperties);
title: string;
disclaimer: string;
static isAccepted(): boolean;
on(type: 'accepted', listener: () => void): IHandle;
}
export interface LayerListLegendProperties extends esri.WidgetProperties {
/**
* Map or scene view.
*/
view?: esri.MapView | esri.SceneView;
/**
* Any and all LayerList widget properties.
*/
layerListProperties?: esri.LayerListProperties;
/**
* Any and all Legend widget properties.
*/
legendProperties?: esri.LegendProperties;
}
export class LayerListLegend extends esri.Widget {
constructor(properties?: LayerListLegendProperties);
view: esri.MapView | esri.SceneView;
layerListProperties: esri.LayerListProperties;
legendProperties: esri.LegendProperties;
}
export interface PrintSnapshotProperties extends esri.WidgetProperties {
/**
* Map view.
*/
view?: esri.MapView;
/**
* URL of print service.
*/
printServiceUrl: string;
/**
* Default title for title input.
*/
defaultTitle?: string;
/**
* Array of available print service layouts in layout select.
*/
layouts?: string[];
/**
* Array of available file formats in format select.
*/
formats?: string[];
/**
* Any additional layout options to mix into print template.
*/
layoutOptions?: esri.PrintTemplateLayoutOptions;
/**
* Copyright right text to add to snapshot images.
*/
copyrightText?: string;
}
export class PrintSnapshot extends esri.Widget {
constructor(properties: PrintSnapshotProperties);
view: esri.MapView;
printServiceUrl: string;
defaultTitle: string;
layouts: string[];
formats: string[];
layoutOptions: esri.PrintTemplateLayoutOptions;
copyrightText: string;
}
export interface SymbolEditorProperties extends esri.WidgetProperties {
/**
* The graphic for which to edit the symbol of.
*/
graphic: esri.Graphic;
}
class SymbolEditor extends esri.Widget {
constructor(properties: SymbolEditorProperties);
graphic: esri.Graphic;
symbol: esri.Symbol;
setSymbolProperty(property: string, evt?: Event, value?: string | number): void;
}
export class SimpleMarkerEditor extends SymbolEditor {
symbol: esri.SimpleMarkerSymbol;
}
export class SimpleLineEditor extends SymbolEditor {
symbol: esri.SimpleLineSymbol;
}
export class SimpleFillEditor extends SymbolEditor {
symbol: esri.SimpleFillSymbol;
}
export interface ColorPickerProperties extends esri.WidgetProperties {
/**
* Array of hex colors to display.
*
* @default [https://clrs.cc/]
*/
palette?: string[];
/**
* Number of colors per row.
*
* @default 8
*/
colorsPerRow?: number;
/**
* `esri/Color` value to init widget with.
*/
value?: esri.Color;
}
export class ColorPicker extends esri.Widget {
constructor(properties: ColorPickerProperties);
palette: string[];
colorsPerRow: number;
value: esri.Color;
on(type: 'accepted', listener: () => esri.Color): IHandle;
}
export interface OAuthSignInProperties extends esri.WidgetProperties {
/**
* OAuthViewModel to handle sign in.
*/
oAuthViewModel: OAuthViewModel;
/**
* Message text.
*/
message?: string;
/**
* Button text.
*/
buttonText?: string;
}
export class OAuthSignIn extends esri.Widget {
constructor(properties: OAuthSignInProperties);
message: string;
buttonText: string;
}
export interface MapNavigationProperties extends esri.WidgetProperties {
/**
* Map view.
*/
view?: esri.MapView | esri.SceneView;
/**
* Include compass.
*
* @default true
*/
compass?: boolean;
/**
* Include home.
*
* @default true
*/
home?: boolean;
/**
* Include locate.
*
* @default true
*/
locate?: boolean;
/**
* Include fullscreen.
*
* @default true
*/
fullscreen?: boolean;
/**
* Fullscreen HTML element.
* An element or a querySelector string.
*/
fullscreenElement?: string | HTMLElement;
/**
* Include button to switch between 2D/3D.
*
* @default false
*/
viewSwitcher?: boolean;
/**
* Function to go 2D.
*/
go2D?: () => void;
/**
* Function to go 23D.
*/
go3D?: () => void;
}
export class MapNavigation extends esri.Widget {
constructor(properties: MapNavigationProperties);
view: esri.MapView | esri.SceneView;
compass: boolean;
home: boolean;
locate: boolean;
fullscreen: boolean;
fullscreenElement: string | HTMLElement;
viewSwitcher: boolean;
go2D: () => void;
go3D: () => void;
on(type: 'view-switch', listener: (viewSwitch: '2d' | '3d') => void): IHandle;
protected zoomViewModel: esri.ZoomViewModel;
protected homeViewModel: esri.HomeViewModel;
protected locateViewModel: esri.LocateViewModel;
protected fullscreenViewModel: esri.FullscreenViewModel;
}
export interface WidgetSwitcherWidgetProperties {
/**
* Any esri or esri.Widget declared widget.
*/
widget: esri.Widget | any;
/**
* Esri icon font class for button.
*/
iconClass: string;
/**
* Tooltip and fallback text for button.
*/
title: string;
/**
* Do not add `esri-panel` class to widget.
*/
nonPanel?: boolean;
}
export interface WidgetSwitcherProperties extends esri.WidgetProperties {
view: esri.MapView;
widgets?: WidgetSwitcherWidgetProperties[];
}
export class WidgetSwitcher extends esri.Widget {
constructor(properties: WidgetSwitcherProperties);
view: esri.MapView;
widgets: WidgetSwitcherWidgetProperties[];
}
export interface MeasureProperties extends esri.WidgetProperties {
/**
* Map view.
*/
view?: esri.MapView;
/**
* An elevation layer instance or elevation service URL.
*/
elevationLayer: ElevationLayer | string;
}
export class Measure extends esri.Widget {
constructor(properties: MeasureProperties);
view: esri.MapView;
elevationLayer: ElevationLayer | string;
}
export interface BasemapImagerySelectorBasemap extends Object {
layer: esri.ImageryLayer | esri.ImageryTileLayer | esri.TileLayer | esri.BingMapsLayer;
title: string;
}
export interface BasemapImagerySelectorProperties extends esri.WidgetProperties {
/**
* Map or scene view;
*/
view?: esri.MapView | esri.SceneView;
/**
* The basemap to switch imagery layer.
*/
basemap: esri.Basemap;
/**
* BasemapToggle instance to check for nextBasemap.
*/
basemapToggle?: esri.BasemapToggle;
/**
* The index of the imagery layer to swap out.
* @default 0 (assumes imagery is first layer)
*/
imageryLayerIndex?: number;
/**
* Title for the imagery layer loaded in the basemap by default.
* @default Imagery
*/
defaultImageryTitle?: string;
/**
* Imagery layers to choose from.
* The default imagery layer will be added to collection by the widget.
*/
basemaps?: BasemapImagerySelectorBasemap[] | esri.Collection<BasemapImagerySelectorBasemap>;
}
export class BasemapImagerySelector extends esri.Widget {
constructor(properties: BasemapImagerySelectorProperties);
view: esri.MapView | esri.SceneView;
basemap: esri.Basemap;
basemapToggle: esri.BasemapToggle;
imageryLayerIndex: number;
defaultImageryTitle: string;
basemaps: esri.Collection<BasemapImagerySelectorBasemap>;
}
export interface MarkupProperties extends esri.WidgetProperties {
/**
* Map or scene view.
*/
view?: esri.MapView | esri.SceneView;
/**
* Default text symbol.
*/
textSymbol?: TextSymbol;
/**
* Sketch view model.
* Provide to set any non-SVM properties, most notably default symbols.
*/
sketchViewModel?: SketchViewModel;
/**
* Wkid to project polylines for offsetting.
*/
offsetProjectionWkid?: number;
/**
* Widget to manage markup projects.
* Not ready for production!!!
*/
projectsWidget?: any;
}
export class Markup extends esri.Widget {
constructor(properties?: MarkupProperties);
view: esri.MapView | esri.SceneView;
textSymbol: TextSymbol;
sketchViewModel: SketchViewModel;
offsetProjectionWkid: number;
projectsWidget: any;
addGraphicToMarkup(graphic?: esri.Graphic): () => void;
onHide(): () => void;
readonly layers: esri.GroupLayer;
readonly text: esri.GraphicsLayer;
readonly point: esri.GraphicsLayer;
readonly polyline: esri.GraphicsLayer;
readonly polygon: esri.GraphicsLayer;
readonly sketch: esri.GraphicsLayer;
}
///////////////////////////////////////////////////////////////////
// apps
///////////////////////////////////////////////////////////////////
export interface WaterMeterEditorProperties extends esri.WidgetProperties {
layerPortalItemId: string;
parcelLink: string;
meterLink: string;
layers?: esri.FeatureLayer[];
}
export class WaterMeterEditor extends esri.Widget {
constructor(properties: WaterMeterEditorProperties);
layerPortalItemId: string;
parcelLink: string;
meterLink: string;
layers: esri.FeatureLayer[];
}
}
declare module 'cov/popups/TaxLotPopup' {
import TaxLotPopup = __cov.TaxLotPopup;
export = TaxLotPopup;
}
declare module 'cov/popups/TaxMapPopup' {
import TaxMapPopup = __cov.TaxMapPopup;
export = TaxMapPopup;
}
declare module 'cov/popups/WaterMeterPopup' {
import WaterMeterPopup = __cov.WaterMeterPopup;
export = WaterMeterPopup;
}
declare module 'cov/viewModels/OAuthViewModel' {
import OAuthViewModel = __cov.OAuthViewModel;
export = OAuthViewModel;
}
declare module 'cov/viewModels/UnitsViewModel' {
import UnitsViewModel = __cov.UnitsViewModel;
export = UnitsViewModel;
}
declare module 'cov/widgets/Disclaimer' {
import Disclaimer = __cov.Disclaimer;
export = Disclaimer;
}
declare module 'cov/widgets/LayerListLegend' {
import LayerListLegend = __cov.LayerListLegend;
export = LayerListLegend;
}
declare module 'cov/widgets/PrintSnapshot' {
import PrintSnapshot = __cov.PrintSnapshot;
export = PrintSnapshot;
}
declare module 'cov/widgets/symbolEditors/SimpleMarkerEditor' {
import SimpleMarkerEditor = __cov.SimpleMarkerEditor;
export = SimpleMarkerEditor;
}
declare module 'cov/widgets/symbolEditors/SimpleLineEditor' {
import SimpleLineEditor = __cov.SimpleLineEditor;
export = SimpleLineEditor;
}
declare module 'cov/widgets/symbolEditors/SimpleFillEditor' {
import SimpleFillEditor = __cov.SimpleFillEditor;
export = SimpleFillEditor;
}
declare module 'cov/widgets/OAuthSignIn' {
import OAuthSignIn = __cov.OAuthSignIn;
export = OAuthSignIn;
}
declare module 'cov/widgets/MapNavigation' {
import MapNavigation = __cov.MapNavigation;
export = MapNavigation;
}
declare module 'cov/widgets/WidgetSwitcher' {
import WidgetSwitcher = __cov.WidgetSwitcher;
export = WidgetSwitcher;
}
declare module 'cov/widgets/Measure' {
import Measure = __cov.Measure;
export = Measure;
}
declare module 'cov/widgets/Markup' {
import Markup = __cov.Markup;
export = Markup;
}
declare module 'cov/widgets/BasemapImagerySelector' {
import BasemapImagerySelector = __cov.BasemapImagerySelector;
export = BasemapImagerySelector;
}
declare module 'cov/apps/WaterMeterEditor' {
import WaterMeterEditor = __cov.WaterMeterEditor;
export = WaterMeterEditor;
}