jsbox-cview 1.3.4 → 1.4.0
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/components/alert/input-alert.ts +12 -6
- package/components/alert/login-alert.ts +11 -7
- package/components/alert/plain-alert.ts +9 -6
- package/components/alert/uialert.ts +3 -4
- package/components/base.ts +3 -4
- package/components/custom-navigation-bar.ts +52 -53
- package/components/dialogs/dialog-sheet.ts +10 -15
- package/components/dialogs/form-dialog.ts +5 -7
- package/components/dialogs/list-dialog.ts +9 -6
- package/components/dialogs/text-dialog.ts +7 -6
- package/components/dynamic-itemsize-matrix.ts +25 -26
- package/components/dynamic-preference-listview.ts +29 -31
- package/components/dynamic-rowheight-list.ts +10 -11
- package/components/enhanced-imageview.ts +4 -4
- package/components/flowlayout.ts +233 -0
- package/components/image-pager.ts +16 -10
- package/components/page-control.ts +16 -13
- package/components/pageviewer-titlebar.ts +15 -16
- package/components/pageviewer.ts +16 -15
- package/components/rotating-view.ts +27 -22
- package/components/searchbar.ts +30 -25
- package/components/sheet.ts +16 -17
- package/components/single-views.ts +107 -105
- package/components/spinners/loading-dual-ring.ts +15 -8
- package/components/spinners/loading-wedges.ts +8 -4
- package/components/spinners/spinner-androidstyle.ts +15 -16
- package/components/static-preference-listview.ts +94 -95
- package/components/symbol-button.ts +15 -23
- package/components/tabbar.ts +24 -25
- package/controller/base-controller.ts +57 -58
- package/controller/controller-router.ts +2 -3
- package/controller/pageviewer-controller.ts +16 -15
- package/controller/presented-page-controller.ts +14 -13
- package/controller/splitview-controller.ts +22 -13
- package/controller/tabbar-controller.ts +15 -15
- package/dist/components/alert/input-alert.js +12 -5
- package/dist/components/alert/login-alert.js +10 -5
- package/dist/components/alert/plain-alert.js +9 -5
- package/dist/components/alert/uialert.js +3 -3
- package/dist/components/base.js +4 -4
- package/dist/components/custom-navigation-bar.js +30 -30
- package/dist/components/dialogs/dialog-sheet.js +9 -12
- package/dist/components/dialogs/form-dialog.js +5 -5
- package/dist/components/dialogs/list-dialog.js +9 -5
- package/dist/components/dialogs/text-dialog.js +7 -5
- package/dist/components/dynamic-itemsize-matrix.js +15 -15
- package/dist/components/dynamic-preference-listview.js +4 -4
- package/dist/components/dynamic-rowheight-list.js +3 -3
- package/dist/components/enhanced-imageview.js +3 -3
- package/dist/components/flowlayout.js +184 -0
- package/dist/components/image-pager.js +14 -9
- package/dist/components/page-control.js +21 -18
- package/dist/components/pageviewer-titlebar.js +15 -15
- package/dist/components/pageviewer.js +16 -14
- package/dist/components/rotating-view.js +24 -19
- package/dist/components/searchbar.js +29 -24
- package/dist/components/sheet.js +13 -14
- package/dist/components/single-views.js +5 -5
- package/dist/components/spinners/loading-dual-ring.js +12 -5
- package/dist/components/spinners/loading-wedges.js +7 -3
- package/dist/components/spinners/spinner-androidstyle.js +13 -15
- package/dist/components/static-preference-listview.js +94 -94
- package/dist/components/symbol-button.js +10 -18
- package/dist/components/tabbar.js +24 -24
- package/dist/controller/base-controller.js +36 -36
- package/dist/controller/controller-router.js +2 -2
- package/dist/controller/pageviewer-controller.js +10 -8
- package/dist/controller/presented-page-controller.js +8 -6
- package/dist/controller/splitview-controller.js +19 -12
- package/dist/controller/tabbar-controller.js +3 -3
- package/dist/index.js +1 -2
- package/dist/test/flowlayout.js +74 -0
- package/index.ts +1 -2
- package/package.json +1 -1
- package/test/flowlayout.ts +77 -0
- package/components/artificial-flowlayout.ts +0 -321
- package/components/spinners/loading-double-rings.ts +0 -121
- package/dist/components/artificial-flowlayout.js +0 -258
- package/dist/components/spinners/loading-double-rings.js +0 -104
|
@@ -45,25 +45,27 @@ export class SingleView<
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export class
|
|
48
|
+
export class ClearView extends SingleView<
|
|
49
49
|
"view",
|
|
50
50
|
UIView,
|
|
51
51
|
UiTypes.BaseViewProps,
|
|
52
52
|
UiTypes.BaseViewEvents<UIView>,
|
|
53
53
|
UiTypes.ViewOptions
|
|
54
|
-
|
|
55
|
-
constructor({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
> {
|
|
55
|
+
constructor({
|
|
56
|
+
props,
|
|
57
|
+
layout = $layout.fill,
|
|
58
|
+
events,
|
|
59
|
+
views
|
|
59
60
|
}: {
|
|
61
|
+
props?: UiTypes.BaseViewProps;
|
|
60
62
|
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
61
63
|
events?: UiTypes.BaseViewEvents<UIView>;
|
|
62
64
|
views?: UiTypes.AllViewOptions[];
|
|
63
65
|
}) {
|
|
64
66
|
super({
|
|
65
67
|
type: "view",
|
|
66
|
-
props: {
|
|
68
|
+
props: { ...props },
|
|
67
69
|
layout,
|
|
68
70
|
events,
|
|
69
71
|
views
|
|
@@ -77,7 +79,7 @@ export class ContentView extends SingleView<
|
|
|
77
79
|
UiTypes.BaseViewProps,
|
|
78
80
|
UiTypes.BaseViewEvents<UIView>,
|
|
79
81
|
UiTypes.ViewOptions
|
|
80
|
-
|
|
82
|
+
> {
|
|
81
83
|
constructor({
|
|
82
84
|
props,
|
|
83
85
|
layout = $layout.fillSafeArea,
|
|
@@ -108,15 +110,15 @@ export class ContentView extends SingleView<
|
|
|
108
110
|
export class MaskView extends SingleView<
|
|
109
111
|
"view",
|
|
110
112
|
UIView,
|
|
111
|
-
UiTypes.BaseViewProps,
|
|
113
|
+
UiTypes.BaseViewProps,
|
|
112
114
|
UiTypes.BaseViewEvents<UIView>,
|
|
113
115
|
UiTypes.ViewOptions
|
|
114
|
-
|
|
115
|
-
constructor({
|
|
116
|
-
props,
|
|
117
|
-
layout = $layout.fill,
|
|
118
|
-
events,
|
|
119
|
-
views
|
|
116
|
+
> {
|
|
117
|
+
constructor({
|
|
118
|
+
props,
|
|
119
|
+
layout = $layout.fill,
|
|
120
|
+
events,
|
|
121
|
+
views
|
|
120
122
|
}: {
|
|
121
123
|
props?: UiTypes.BaseViewProps;
|
|
122
124
|
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
@@ -139,11 +141,11 @@ export class MaskView extends SingleView<
|
|
|
139
141
|
|
|
140
142
|
export class Label extends SingleView<
|
|
141
143
|
"label",
|
|
142
|
-
UILabelView,
|
|
143
|
-
UiTypes.LabelProps,
|
|
144
|
+
UILabelView,
|
|
145
|
+
UiTypes.LabelProps,
|
|
144
146
|
UiTypes.BaseViewEvents<UILabelView>,
|
|
145
147
|
UiTypes.LabelOptions
|
|
146
|
-
|
|
148
|
+
> {
|
|
147
149
|
constructor({ props, layout, events, views }: {
|
|
148
150
|
props?: UiTypes.LabelProps;
|
|
149
151
|
layout?: (make: MASConstraintMaker, view: UILabelView) => void;
|
|
@@ -162,11 +164,11 @@ export class Label extends SingleView<
|
|
|
162
164
|
|
|
163
165
|
export class Button extends SingleView<
|
|
164
166
|
"button",
|
|
165
|
-
UIButtonView,
|
|
166
|
-
UiTypes.ButtonProps,
|
|
167
|
+
UIButtonView,
|
|
168
|
+
UiTypes.ButtonProps,
|
|
167
169
|
UiTypes.BaseViewEvents<UIButtonView>,
|
|
168
170
|
UiTypes.ButtonOptions
|
|
169
|
-
|
|
171
|
+
> {
|
|
170
172
|
constructor({ props, layout, events, views }: {
|
|
171
173
|
props?: UiTypes.ButtonProps;
|
|
172
174
|
layout?: (make: MASConstraintMaker, view: UIButtonView) => void;
|
|
@@ -185,11 +187,11 @@ export class Button extends SingleView<
|
|
|
185
187
|
|
|
186
188
|
export class Input extends SingleView<
|
|
187
189
|
"input",
|
|
188
|
-
UIInputView,
|
|
189
|
-
UiTypes.InputProps,
|
|
190
|
+
UIInputView,
|
|
191
|
+
UiTypes.InputProps,
|
|
190
192
|
UiTypes.InputEvents,
|
|
191
193
|
UiTypes.InputOptions
|
|
192
|
-
|
|
194
|
+
> {
|
|
193
195
|
constructor({ props, layout, events, views }: {
|
|
194
196
|
props?: UiTypes.InputProps;
|
|
195
197
|
layout?: (make: MASConstraintMaker, view: UIInputView) => void;
|
|
@@ -208,11 +210,11 @@ export class Input extends SingleView<
|
|
|
208
210
|
|
|
209
211
|
export class Slider extends SingleView<
|
|
210
212
|
"slider",
|
|
211
|
-
UISliderView,
|
|
212
|
-
UiTypes.SliderProps,
|
|
213
|
+
UISliderView,
|
|
214
|
+
UiTypes.SliderProps,
|
|
213
215
|
UiTypes.SliderEvents,
|
|
214
216
|
UiTypes.SliderOptions
|
|
215
|
-
|
|
217
|
+
> {
|
|
216
218
|
constructor({ props, layout, events, views }: {
|
|
217
219
|
props?: UiTypes.SliderProps;
|
|
218
220
|
layout?: (make: MASConstraintMaker, view: UISliderView) => void;
|
|
@@ -231,11 +233,11 @@ export class Slider extends SingleView<
|
|
|
231
233
|
|
|
232
234
|
export class Switch extends SingleView<
|
|
233
235
|
"switch",
|
|
234
|
-
UISwitchView,
|
|
235
|
-
UiTypes.SwitchProps,
|
|
236
|
+
UISwitchView,
|
|
237
|
+
UiTypes.SwitchProps,
|
|
236
238
|
UiTypes.SwitchEvents,
|
|
237
239
|
UiTypes.SwitchOptions
|
|
238
|
-
|
|
240
|
+
> {
|
|
239
241
|
constructor({ props, layout, events, views }: {
|
|
240
242
|
props?: UiTypes.SwitchProps;
|
|
241
243
|
layout?: (make: MASConstraintMaker, view: UISwitchView) => void;
|
|
@@ -254,11 +256,11 @@ export class Switch extends SingleView<
|
|
|
254
256
|
|
|
255
257
|
export class Spinner extends SingleView<
|
|
256
258
|
"spinner",
|
|
257
|
-
UISpinnerView,
|
|
258
|
-
UiTypes.SpinnerProps,
|
|
259
|
+
UISpinnerView,
|
|
260
|
+
UiTypes.SpinnerProps,
|
|
259
261
|
UiTypes.BaseViewEvents<UISpinnerView>,
|
|
260
262
|
UiTypes.SpinnerOptions
|
|
261
|
-
|
|
263
|
+
> {
|
|
262
264
|
constructor({ props, layout, events, views }: {
|
|
263
265
|
props?: UiTypes.SpinnerProps;
|
|
264
266
|
layout?: (make: MASConstraintMaker, view: UISpinnerView) => void;
|
|
@@ -277,11 +279,11 @@ export class Spinner extends SingleView<
|
|
|
277
279
|
|
|
278
280
|
export class Progress extends SingleView<
|
|
279
281
|
"progress",
|
|
280
|
-
UIProgressView,
|
|
281
|
-
UiTypes.ProgressProps,
|
|
282
|
+
UIProgressView,
|
|
283
|
+
UiTypes.ProgressProps,
|
|
282
284
|
UiTypes.BaseViewEvents<UIProgressView>,
|
|
283
285
|
UiTypes.ProgressOptions
|
|
284
|
-
|
|
286
|
+
> {
|
|
285
287
|
constructor({ props, layout, events, views }: {
|
|
286
288
|
props?: UiTypes.ProgressProps;
|
|
287
289
|
layout?: (make: MASConstraintMaker, view: UIProgressView) => void;
|
|
@@ -300,11 +302,11 @@ export class Progress extends SingleView<
|
|
|
300
302
|
|
|
301
303
|
export class Gallery extends SingleView<
|
|
302
304
|
"gallery",
|
|
303
|
-
UIGalleryView,
|
|
304
|
-
UiTypes.GalleryProps,
|
|
305
|
+
UIGalleryView,
|
|
306
|
+
UiTypes.GalleryProps,
|
|
305
307
|
UiTypes.GalleryEvents,
|
|
306
308
|
UiTypes.GalleryOptions
|
|
307
|
-
|
|
309
|
+
> {
|
|
308
310
|
constructor({ props, layout, events, views }: {
|
|
309
311
|
props?: UiTypes.GalleryProps;
|
|
310
312
|
layout?: (make: MASConstraintMaker, view: UIGalleryView) => void;
|
|
@@ -323,11 +325,11 @@ export class Gallery extends SingleView<
|
|
|
323
325
|
|
|
324
326
|
export class Stepper extends SingleView<
|
|
325
327
|
"stepper",
|
|
326
|
-
UIStepperView,
|
|
327
|
-
UiTypes.StepperProps,
|
|
328
|
+
UIStepperView,
|
|
329
|
+
UiTypes.StepperProps,
|
|
328
330
|
UiTypes.StepperEvents,
|
|
329
331
|
UiTypes.StepperOptions
|
|
330
|
-
|
|
332
|
+
> {
|
|
331
333
|
constructor({ props, layout, events, views }: {
|
|
332
334
|
props?: UiTypes.StepperProps;
|
|
333
335
|
layout?: (make: MASConstraintMaker, view: UIStepperView) => void;
|
|
@@ -346,11 +348,11 @@ export class Stepper extends SingleView<
|
|
|
346
348
|
|
|
347
349
|
export class Text extends SingleView<
|
|
348
350
|
"text",
|
|
349
|
-
UITextView,
|
|
350
|
-
UiTypes.TextProps,
|
|
351
|
+
UITextView,
|
|
352
|
+
UiTypes.TextProps,
|
|
351
353
|
UiTypes.TextEvents,
|
|
352
354
|
UiTypes.TextOptions
|
|
353
|
-
|
|
355
|
+
> {
|
|
354
356
|
constructor({ props, layout, events, views }: {
|
|
355
357
|
props?: UiTypes.TextProps;
|
|
356
358
|
layout?: (make: MASConstraintMaker, view: UITextView) => void;
|
|
@@ -369,11 +371,11 @@ export class Text extends SingleView<
|
|
|
369
371
|
|
|
370
372
|
export class Image extends SingleView<
|
|
371
373
|
"image",
|
|
372
|
-
UIImageView,
|
|
373
|
-
UiTypes.ImageProps,
|
|
374
|
+
UIImageView,
|
|
375
|
+
UiTypes.ImageProps,
|
|
374
376
|
UiTypes.BaseViewEvents<UIImageView>,
|
|
375
377
|
UiTypes.ImageOptions
|
|
376
|
-
|
|
378
|
+
> {
|
|
377
379
|
constructor({ props, layout, events, views }: {
|
|
378
380
|
props?: UiTypes.ImageProps;
|
|
379
381
|
layout?: (make: MASConstraintMaker, view: UIImageView) => void;
|
|
@@ -392,11 +394,11 @@ export class Image extends SingleView<
|
|
|
392
394
|
|
|
393
395
|
export class Video extends SingleView<
|
|
394
396
|
"video",
|
|
395
|
-
UIVideoView,
|
|
396
|
-
UiTypes.VideoProps,
|
|
397
|
+
UIVideoView,
|
|
398
|
+
UiTypes.VideoProps,
|
|
397
399
|
UiTypes.BaseViewEvents<UIVideoView>,
|
|
398
400
|
UiTypes.VideoOptions
|
|
399
|
-
|
|
401
|
+
> {
|
|
400
402
|
constructor({ props, layout, events, views }: {
|
|
401
403
|
props?: UiTypes.VideoProps;
|
|
402
404
|
layout?: (make: MASConstraintMaker, view: UIVideoView) => void;
|
|
@@ -415,11 +417,11 @@ export class Video extends SingleView<
|
|
|
415
417
|
|
|
416
418
|
export class Scroll extends SingleView<
|
|
417
419
|
"scroll",
|
|
418
|
-
UIScrollView,
|
|
419
|
-
UiTypes.ScrollProps,
|
|
420
|
+
UIScrollView,
|
|
421
|
+
UiTypes.ScrollProps,
|
|
420
422
|
UiTypes.ScrollEvents,
|
|
421
423
|
UiTypes.ScrollOptions
|
|
422
|
-
|
|
424
|
+
> {
|
|
423
425
|
constructor({ props, layout, events, views }: {
|
|
424
426
|
props?: UiTypes.ScrollProps;
|
|
425
427
|
layout?: (make: MASConstraintMaker, view: UIScrollView) => void;
|
|
@@ -438,11 +440,11 @@ export class Scroll extends SingleView<
|
|
|
438
440
|
|
|
439
441
|
export class Stack extends SingleView<
|
|
440
442
|
"stack",
|
|
441
|
-
UIStackView,
|
|
442
|
-
UiTypes.StackProps,
|
|
443
|
+
UIStackView,
|
|
444
|
+
UiTypes.StackProps,
|
|
443
445
|
UiTypes.BaseViewEvents<UIStackView>,
|
|
444
446
|
UiTypes.StackOptions
|
|
445
|
-
|
|
447
|
+
> {
|
|
446
448
|
constructor({ props, layout, events, views }: {
|
|
447
449
|
props?: UiTypes.StackProps;
|
|
448
450
|
layout?: (make: MASConstraintMaker, view: UIStackView) => void;
|
|
@@ -461,11 +463,11 @@ export class Stack extends SingleView<
|
|
|
461
463
|
|
|
462
464
|
export class Tab extends SingleView<
|
|
463
465
|
"tab",
|
|
464
|
-
UITabView,
|
|
465
|
-
UiTypes.TabProps,
|
|
466
|
+
UITabView,
|
|
467
|
+
UiTypes.TabProps,
|
|
466
468
|
UiTypes.TabEvents,
|
|
467
469
|
UiTypes.TabOptions
|
|
468
|
-
|
|
470
|
+
> {
|
|
469
471
|
constructor({ props, layout, events, views }: {
|
|
470
472
|
props?: UiTypes.TabProps;
|
|
471
473
|
layout?: (make: MASConstraintMaker, view: UITabView) => void;
|
|
@@ -484,11 +486,11 @@ export class Tab extends SingleView<
|
|
|
484
486
|
|
|
485
487
|
export class Menu extends SingleView<
|
|
486
488
|
"menu",
|
|
487
|
-
UIMenuView,
|
|
488
|
-
UiTypes.MenuProps,
|
|
489
|
+
UIMenuView,
|
|
490
|
+
UiTypes.MenuProps,
|
|
489
491
|
UiTypes.MenuEvents,
|
|
490
492
|
UiTypes.MenuOptions
|
|
491
|
-
|
|
493
|
+
> {
|
|
492
494
|
constructor({ props, layout, events, views }: {
|
|
493
495
|
props?: UiTypes.MenuProps;
|
|
494
496
|
layout?: (make: MASConstraintMaker, view: UIMenuView) => void;
|
|
@@ -507,11 +509,11 @@ export class Menu extends SingleView<
|
|
|
507
509
|
|
|
508
510
|
export class Map extends SingleView<
|
|
509
511
|
"map",
|
|
510
|
-
UIMapView,
|
|
511
|
-
UiTypes.MapProps,
|
|
512
|
+
UIMapView,
|
|
513
|
+
UiTypes.MapProps,
|
|
512
514
|
UiTypes.BaseViewEvents<UIMapView>,
|
|
513
515
|
UiTypes.MapOptions
|
|
514
|
-
|
|
516
|
+
> {
|
|
515
517
|
constructor({ props, layout, events, views }: {
|
|
516
518
|
props?: UiTypes.MapProps;
|
|
517
519
|
layout?: (make: MASConstraintMaker, view: UIMapView) => void;
|
|
@@ -530,11 +532,11 @@ export class Map extends SingleView<
|
|
|
530
532
|
|
|
531
533
|
export class Web extends SingleView<
|
|
532
534
|
"web",
|
|
533
|
-
UIWebView,
|
|
534
|
-
UiTypes.WebProps,
|
|
535
|
+
UIWebView,
|
|
536
|
+
UiTypes.WebProps,
|
|
535
537
|
UiTypes.WebEvents,
|
|
536
538
|
UiTypes.WebOptions
|
|
537
|
-
|
|
539
|
+
> {
|
|
538
540
|
constructor({ props, layout, events, views }: {
|
|
539
541
|
props?: UiTypes.WebProps;
|
|
540
542
|
layout?: (make: MASConstraintMaker, view: UIWebView) => void;
|
|
@@ -553,11 +555,11 @@ export class Web extends SingleView<
|
|
|
553
555
|
|
|
554
556
|
export class List extends SingleView<
|
|
555
557
|
"list",
|
|
556
|
-
UIListView,
|
|
557
|
-
UiTypes.ListProps,
|
|
558
|
+
UIListView,
|
|
559
|
+
UiTypes.ListProps,
|
|
558
560
|
UiTypes.ListEvents,
|
|
559
561
|
UiTypes.ListOptions
|
|
560
|
-
|
|
562
|
+
> {
|
|
561
563
|
constructor({ props, layout, events, views }: {
|
|
562
564
|
props?: UiTypes.ListProps;
|
|
563
565
|
layout?: (make: MASConstraintMaker, view: UIListView) => void;
|
|
@@ -576,11 +578,11 @@ export class List extends SingleView<
|
|
|
576
578
|
|
|
577
579
|
export class Matrix extends SingleView<
|
|
578
580
|
"matrix",
|
|
579
|
-
UIMatrixView,
|
|
580
|
-
UiTypes.MatrixProps,
|
|
581
|
+
UIMatrixView,
|
|
582
|
+
UiTypes.MatrixProps,
|
|
581
583
|
UiTypes.MatrixEvents,
|
|
582
584
|
UiTypes.MatrixOptions
|
|
583
|
-
|
|
585
|
+
> {
|
|
584
586
|
constructor({ props, layout, events, views }: {
|
|
585
587
|
props?: UiTypes.MatrixProps;
|
|
586
588
|
layout?: (make: MASConstraintMaker, view: UIMatrixView) => void;
|
|
@@ -599,11 +601,11 @@ export class Matrix extends SingleView<
|
|
|
599
601
|
|
|
600
602
|
export class Blur extends SingleView<
|
|
601
603
|
"blur",
|
|
602
|
-
UIBlurView,
|
|
603
|
-
UiTypes.BlurProps,
|
|
604
|
+
UIBlurView,
|
|
605
|
+
UiTypes.BlurProps,
|
|
604
606
|
UiTypes.BaseViewEvents<UIBlurView>,
|
|
605
607
|
UiTypes.BlurOptions
|
|
606
|
-
|
|
608
|
+
> {
|
|
607
609
|
constructor({ props, layout, events, views }: {
|
|
608
610
|
props?: UiTypes.BlurProps;
|
|
609
611
|
layout?: (make: MASConstraintMaker, view: UIBlurView) => void;
|
|
@@ -622,11 +624,11 @@ export class Blur extends SingleView<
|
|
|
622
624
|
|
|
623
625
|
export class Gradient extends SingleView<
|
|
624
626
|
"gradient",
|
|
625
|
-
UIGradientView,
|
|
626
|
-
UiTypes.GradientProps,
|
|
627
|
+
UIGradientView,
|
|
628
|
+
UiTypes.GradientProps,
|
|
627
629
|
UiTypes.BaseViewEvents<UIGradientView>,
|
|
628
630
|
UiTypes.GradientOptions
|
|
629
|
-
|
|
631
|
+
> {
|
|
630
632
|
constructor({ props, layout, events, views }: {
|
|
631
633
|
props?: UiTypes.GradientProps;
|
|
632
634
|
layout?: (make: MASConstraintMaker, view: UIGradientView) => void;
|
|
@@ -645,11 +647,11 @@ export class Gradient extends SingleView<
|
|
|
645
647
|
|
|
646
648
|
export class DatePicker extends SingleView<
|
|
647
649
|
"date-picker",
|
|
648
|
-
UIDatePickerView,
|
|
649
|
-
UiTypes.DatePickerProps,
|
|
650
|
+
UIDatePickerView,
|
|
651
|
+
UiTypes.DatePickerProps,
|
|
650
652
|
UiTypes.DatePickerEvents,
|
|
651
653
|
UiTypes.DatePickerOptions
|
|
652
|
-
|
|
654
|
+
> {
|
|
653
655
|
constructor({ props, layout, events, views }: {
|
|
654
656
|
props?: UiTypes.DatePickerProps;
|
|
655
657
|
layout?: (make: MASConstraintMaker, view: UIDatePickerView) => void;
|
|
@@ -668,11 +670,11 @@ export class DatePicker extends SingleView<
|
|
|
668
670
|
|
|
669
671
|
export class Picker extends SingleView<
|
|
670
672
|
"picker",
|
|
671
|
-
UIPickerView,
|
|
672
|
-
UiTypes.PickerProps,
|
|
673
|
+
UIPickerView,
|
|
674
|
+
UiTypes.PickerProps,
|
|
673
675
|
UiTypes.PickerEvents,
|
|
674
676
|
UiTypes.PickerOptions
|
|
675
|
-
|
|
677
|
+
> {
|
|
676
678
|
constructor({ props, layout, events, views }: {
|
|
677
679
|
props?: UiTypes.PickerProps;
|
|
678
680
|
layout?: (make: MASConstraintMaker, view: UIPickerView) => void;
|
|
@@ -691,11 +693,11 @@ export class Picker extends SingleView<
|
|
|
691
693
|
|
|
692
694
|
export class Canvas extends SingleView<
|
|
693
695
|
"canvas",
|
|
694
|
-
UICanvasView,
|
|
695
|
-
UiTypes.BaseViewProps,
|
|
696
|
+
UICanvasView,
|
|
697
|
+
UiTypes.BaseViewProps,
|
|
696
698
|
UiTypes.CanvasEvents,
|
|
697
699
|
UiTypes.CanvasOptions
|
|
698
|
-
|
|
700
|
+
> {
|
|
699
701
|
constructor({ props, layout, events, views }: {
|
|
700
702
|
props?: UiTypes.BaseViewProps;
|
|
701
703
|
layout?: (make: MASConstraintMaker, view: UICanvasView) => void;
|
|
@@ -714,11 +716,11 @@ export class Canvas extends SingleView<
|
|
|
714
716
|
|
|
715
717
|
export class Markdown extends SingleView<
|
|
716
718
|
"markdown",
|
|
717
|
-
UIMarkdownView,
|
|
718
|
-
UiTypes.MarkdownProps,
|
|
719
|
+
UIMarkdownView,
|
|
720
|
+
UiTypes.MarkdownProps,
|
|
719
721
|
UiTypes.BaseViewEvents<UIMarkdownView>,
|
|
720
722
|
UiTypes.MarkdownOptions
|
|
721
|
-
|
|
723
|
+
> {
|
|
722
724
|
constructor({ props, layout, events, views }: {
|
|
723
725
|
props?: UiTypes.MarkdownProps;
|
|
724
726
|
layout?: (make: MASConstraintMaker, view: UIMarkdownView) => void;
|
|
@@ -737,11 +739,11 @@ export class Markdown extends SingleView<
|
|
|
737
739
|
|
|
738
740
|
export class Lottie extends SingleView<
|
|
739
741
|
"lottie",
|
|
740
|
-
UILottieView,
|
|
741
|
-
UiTypes.LottieProps,
|
|
742
|
+
UILottieView,
|
|
743
|
+
UiTypes.LottieProps,
|
|
742
744
|
UiTypes.BaseViewEvents<UILottieView>,
|
|
743
745
|
UiTypes.LottieOptions
|
|
744
|
-
|
|
746
|
+
> {
|
|
745
747
|
constructor({ props, layout, events, views }: {
|
|
746
748
|
props?: UiTypes.LottieProps;
|
|
747
749
|
layout?: (make: MASConstraintMaker, view: UILottieView) => void;
|
|
@@ -760,11 +762,11 @@ export class Lottie extends SingleView<
|
|
|
760
762
|
|
|
761
763
|
export class Chart extends SingleView<
|
|
762
764
|
"chart",
|
|
763
|
-
UIChartView,
|
|
764
|
-
UiTypes.ChartProps,
|
|
765
|
+
UIChartView,
|
|
766
|
+
UiTypes.ChartProps,
|
|
765
767
|
UiTypes.ChartEvents,
|
|
766
768
|
UiTypes.ChartOptions
|
|
767
|
-
|
|
769
|
+
> {
|
|
768
770
|
constructor({ props, layout, events, views }: {
|
|
769
771
|
props?: UiTypes.ChartProps;
|
|
770
772
|
layout?: (make: MASConstraintMaker, view: UIChartView) => void;
|
|
@@ -783,11 +785,11 @@ export class Chart extends SingleView<
|
|
|
783
785
|
|
|
784
786
|
export class Code extends SingleView<
|
|
785
787
|
"code",
|
|
786
|
-
UICodeView,
|
|
787
|
-
UiTypes.CodeProps,
|
|
788
|
+
UICodeView,
|
|
789
|
+
UiTypes.CodeProps,
|
|
788
790
|
UiTypes.BaseViewEvents<UICodeView>,
|
|
789
791
|
UiTypes.CodeOptions
|
|
790
|
-
|
|
792
|
+
> {
|
|
791
793
|
constructor({ props, layout, events, views }: {
|
|
792
794
|
props?: UiTypes.CodeProps;
|
|
793
795
|
layout?: (make: MASConstraintMaker, view: UICodeView) => void;
|
|
@@ -806,11 +808,11 @@ export class Code extends SingleView<
|
|
|
806
808
|
|
|
807
809
|
export class Runtime extends SingleView<
|
|
808
810
|
"runtime",
|
|
809
|
-
UIView,
|
|
810
|
-
UiTypes.RuntimeProps,
|
|
811
|
+
UIView,
|
|
812
|
+
UiTypes.RuntimeProps,
|
|
811
813
|
UiTypes.BaseViewEvents<UIView>,
|
|
812
814
|
UiTypes.RuntimeOptions
|
|
813
|
-
|
|
815
|
+
> {
|
|
814
816
|
constructor({ props, layout, events, views }: {
|
|
815
817
|
props?: UiTypes.RuntimeProps;
|
|
816
818
|
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* # cview LoadingDualRing
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
import { Base } from "../base";
|
|
6
2
|
|
|
7
3
|
class CanvasComponet extends Base<UICanvasView, UiTypes.CanvasOptions> {
|
|
@@ -32,7 +28,7 @@ class CanvasComponet extends Base<UICanvasView, UiTypes.CanvasOptions> {
|
|
|
32
28
|
radius / 2 - 20,
|
|
33
29
|
this.startAngle,
|
|
34
30
|
this.startAngle + (Math.PI * 2 * 1) / 4,
|
|
35
|
-
|
|
31
|
+
false
|
|
36
32
|
);
|
|
37
33
|
ctx.strokePath();
|
|
38
34
|
}
|
|
@@ -46,11 +42,22 @@ class CanvasComponet extends Base<UICanvasView, UiTypes.CanvasOptions> {
|
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
45
|
+
/**
|
|
46
|
+
* 两个圆环旋转的加载动画
|
|
47
|
+
*
|
|
48
|
+
* 这是一个示例组件,由于帧数有限而且不稳定,不建议在实际项目中使用。
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
49
51
|
export class DualRing extends Base<UIView, UiTypes.ViewOptions> {
|
|
50
52
|
_defineView: () => UiTypes.ViewOptions;
|
|
51
|
-
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @param colors 颜色(必须是2个),默认为 [$color("#f5542e"), $color("#f2c327")]
|
|
56
|
+
* @param layout 布局
|
|
57
|
+
*/
|
|
58
|
+
constructor({
|
|
52
59
|
colors = [$color("#f5542e"), $color("#f2c327")],
|
|
53
|
-
layout
|
|
60
|
+
layout
|
|
54
61
|
}: {
|
|
55
62
|
colors?: UIColor[];
|
|
56
63
|
layout: (make: MASConstraintMaker, view: UIView) => void;
|
|
@@ -60,7 +67,7 @@ export class DualRing extends Base<UIView, UiTypes.ViewOptions> {
|
|
|
60
67
|
this._defineView = () => {
|
|
61
68
|
const canvas1 = new CanvasComponet({
|
|
62
69
|
tintColor: colors[0],
|
|
63
|
-
startAngle:
|
|
70
|
+
startAngle: -Math.PI * 3 / 4
|
|
64
71
|
});
|
|
65
72
|
const canvas2 = new CanvasComponet({
|
|
66
73
|
tintColor: colors[1],
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* # cview LoadingWedges
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
import { Base } from "../base";
|
|
6
2
|
|
|
7
3
|
class CanvasComponet extends Base<UICanvasView, UiTypes.CanvasOptions> {
|
|
@@ -46,8 +42,16 @@ class CanvasComponet extends Base<UICanvasView, UiTypes.CanvasOptions> {
|
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
45
|
+
/**
|
|
46
|
+
* 饼图加载动画, 4个颜色的饼图以不同的速度旋转,产生华丽的效果
|
|
47
|
+
*/
|
|
49
48
|
export class Wedges extends Base<UIView, UiTypes.ViewOptions> {
|
|
50
49
|
_defineView: () => UiTypes.ViewOptions;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @param colors 饼图颜色(必须是4个颜色),默认为 [$color("#f5542e"), $color("#f2c327"), $color("#008b6e"), $color("#00aede")]
|
|
53
|
+
* @param layout 布局
|
|
54
|
+
*/
|
|
51
55
|
constructor({
|
|
52
56
|
colors = [
|
|
53
57
|
$color("#f5542e"),
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 安卓风格的加载指示器,基于Lottie实现
|
|
3
|
-
*
|
|
4
|
-
* Props:
|
|
5
|
-
*
|
|
6
|
-
* - id 可以重新指定 id,以供 list 或者 matrix 的 template 使用
|
|
7
|
-
* - weight = 2
|
|
8
|
-
* - diameter = 24
|
|
9
|
-
* - color = $color("gray")
|
|
10
|
-
* - bgcolor = $color("clear")
|
|
11
|
-
*
|
|
12
|
-
* Layout 默认居中
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
1
|
import { Base } from "../base";
|
|
17
2
|
|
|
18
3
|
interface AndroidStyleSpinnerProps {
|
|
4
|
+
id?: string;
|
|
19
5
|
weight: number;
|
|
20
6
|
diameter: number;
|
|
21
7
|
color: UIColor;
|
|
22
8
|
bgcolor: UIColor;
|
|
23
9
|
}
|
|
24
10
|
|
|
11
|
+
/**
|
|
12
|
+
* 安卓风格的加载指示器, 基于Lottie实现, 效果是一个圆环一边旋转一边缩放。由于帧数有限,不建议在大视图上使用。
|
|
13
|
+
*/
|
|
25
14
|
export class AndroidStyleSpinner extends Base<UILottieView, UiTypes.LottieOptions> {
|
|
26
15
|
private _props: AndroidStyleSpinnerProps;
|
|
27
16
|
_defineView: () => UiTypes.LottieOptions;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param props AndroidStyleSpinnerProps
|
|
20
|
+
* - id?: string 可以重新指定 id,以供 list 或者 matrix 的 template 使用
|
|
21
|
+
* - weight: number
|
|
22
|
+
* - diameter: number
|
|
23
|
+
* - color: UIColor, 默认 gray
|
|
24
|
+
* - bgcolor: UIColor, 默认 clear
|
|
25
|
+
* @param layout 可选布局,默认居中
|
|
26
|
+
*/
|
|
28
27
|
constructor({ props, layout }: {
|
|
29
28
|
props: Partial<AndroidStyleSpinnerProps>;
|
|
30
29
|
layout?: (make: MASConstraintMaker, view: UILottieView) => void;
|
|
@@ -249,7 +248,7 @@ export class AndroidStyleSpinner extends Base<UILottieView, UiTypes.LottieOption
|
|
|
249
248
|
circular: true,
|
|
250
249
|
json,
|
|
251
250
|
bgcolor: this._props.bgcolor,
|
|
252
|
-
id: this.id
|
|
251
|
+
id: this._props.id || this.id
|
|
253
252
|
},
|
|
254
253
|
layout: layout || ((make, view) => {
|
|
255
254
|
make.size.equalTo($size(this._props.diameter, this._props.diameter));
|