jsbox-cview 1.0.0 → 1.1.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/dist/components/alert/input-alert.js +39 -0
- package/dist/components/alert/login-alert.js +45 -0
- package/dist/components/alert/plain-alert.js +25 -0
- package/dist/components/alert/uialert.js +89 -0
- package/dist/components/artificial-flowlayout.js +258 -0
- package/dist/components/base.js +43 -0
- package/dist/components/custom-navigation-bar.js +519 -0
- package/dist/components/dialogs/dialog-sheet.js +67 -0
- package/dist/components/dialogs/form-dialog.js +24 -0
- package/dist/components/dialogs/list-dialog.js +87 -0
- package/dist/components/dialogs/text-dialog.js +31 -0
- package/dist/components/dynamic-itemsize-matrix.js +129 -0
- package/dist/components/dynamic-preference-listview.js +557 -0
- package/dist/components/dynamic-rowheight-list.js +44 -0
- package/dist/components/enhanced-imageview.js +114 -0
- package/dist/components/image-pager.js +157 -0
- package/dist/components/page-control.js +76 -0
- package/dist/components/pageviewer-titlebar.js +143 -0
- package/dist/components/pageviewer.js +96 -0
- package/dist/components/rotating-view.js +102 -0
- package/dist/components/searchbar.js +322 -0
- package/dist/components/sheet.js +82 -0
- package/dist/components/single-views.js +429 -0
- package/dist/components/spinners/loading-double-rings.js +104 -0
- package/dist/components/spinners/loading-dual-ring.js +82 -0
- package/dist/components/spinners/loading-wedges.js +104 -0
- package/dist/components/spinners/spinner-androidstyle.js +248 -0
- package/dist/components/static-preference-listview.js +798 -0
- package/dist/components/symbol-button.js +79 -0
- package/dist/components/tabbar.js +357 -0
- package/dist/controller/base-controller.js +178 -0
- package/dist/controller/controller-router.js +68 -0
- package/dist/controller/pageviewer-controller.js +63 -0
- package/dist/controller/presented-page-controller.js +48 -0
- package/dist/controller/splitview-controller.js +252 -0
- package/dist/controller/tabbar-controller.js +74 -0
- package/dist/index.js +58 -0
- package/dist/test.js +1 -0
- package/dist/utils/colors.js +15 -0
- package/dist/utils/cvid.js +28 -0
- package/dist/utils/l10n.js +44 -0
- package/dist/utils/path.js +107 -0
- package/dist/utils/rect.js +72 -0
- package/dist/utils/uitools.js +95 -0
- package/index.ts +42 -0
- package/package.json +4 -3
- package/tsconfig.json +5 -3
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 安卓风格的加载指示器,基于Lottie实现
|
|
4
|
+
*
|
|
5
|
+
* Props:
|
|
6
|
+
*
|
|
7
|
+
* - id 可以重新指定 id,以供 list 或者 matrix 的 template 使用
|
|
8
|
+
* - weight = 2
|
|
9
|
+
* - diameter = 24
|
|
10
|
+
* - color = $color("gray")
|
|
11
|
+
* - bgcolor = $color("clear")
|
|
12
|
+
*
|
|
13
|
+
* Layout 默认居中
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AndroidStyleSpinner = void 0;
|
|
18
|
+
const base_1 = require("../base");
|
|
19
|
+
class AndroidStyleSpinner extends base_1.Base {
|
|
20
|
+
constructor({ props, layout }) {
|
|
21
|
+
super();
|
|
22
|
+
this._props = Object.assign({ weight: 2, diameter: 24, color: $color("gray"), bgcolor: $color("clear") }, props);
|
|
23
|
+
this._defineView = () => {
|
|
24
|
+
const weight = this._props.weight;
|
|
25
|
+
const color = this._props.color;
|
|
26
|
+
const r = color.components.red / 255;
|
|
27
|
+
const g = color.components.green / 255;
|
|
28
|
+
const b = color.components.blue / 255;
|
|
29
|
+
const a = color.components.alpha;
|
|
30
|
+
const json = {
|
|
31
|
+
v: "5.5.7",
|
|
32
|
+
fr: 60,
|
|
33
|
+
ip: 0,
|
|
34
|
+
op: 120,
|
|
35
|
+
w: 24,
|
|
36
|
+
h: 24,
|
|
37
|
+
nm: "spinner",
|
|
38
|
+
ddd: 0,
|
|
39
|
+
assets: [],
|
|
40
|
+
layers: [
|
|
41
|
+
{
|
|
42
|
+
ddd: 0,
|
|
43
|
+
ind: 1,
|
|
44
|
+
ty: 4,
|
|
45
|
+
nm: "circle",
|
|
46
|
+
sr: 1,
|
|
47
|
+
ks: {
|
|
48
|
+
o: { a: 0, k: 100, ix: 11 },
|
|
49
|
+
r: {
|
|
50
|
+
a: 1,
|
|
51
|
+
k: [
|
|
52
|
+
{
|
|
53
|
+
i: { x: [0.833], y: [0.833] },
|
|
54
|
+
o: { x: [0.167], y: [0.167] },
|
|
55
|
+
t: 0,
|
|
56
|
+
s: [0]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
t: 119,
|
|
60
|
+
s: [720]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
ix: 10
|
|
64
|
+
},
|
|
65
|
+
p: { a: 0, k: [12, 12, 0], ix: 2 },
|
|
66
|
+
a: { a: 0, k: [1, 1, 0], ix: 1 },
|
|
67
|
+
s: { a: 0, k: [100, 100, 100], ix: 6 }
|
|
68
|
+
},
|
|
69
|
+
ao: 0,
|
|
70
|
+
shapes: [
|
|
71
|
+
{
|
|
72
|
+
ty: "gr",
|
|
73
|
+
it: [
|
|
74
|
+
{
|
|
75
|
+
ind: 0,
|
|
76
|
+
ty: "sh",
|
|
77
|
+
ix: 1,
|
|
78
|
+
ks: {
|
|
79
|
+
a: 0,
|
|
80
|
+
k: {
|
|
81
|
+
i: [
|
|
82
|
+
[0, -5.523],
|
|
83
|
+
[5.523, 0],
|
|
84
|
+
[0, 5.523],
|
|
85
|
+
[-5.523, 0]
|
|
86
|
+
],
|
|
87
|
+
o: [
|
|
88
|
+
[0, 5.523],
|
|
89
|
+
[-5.523, 0],
|
|
90
|
+
[0, -5.523],
|
|
91
|
+
[5.523, 0]
|
|
92
|
+
],
|
|
93
|
+
v: [
|
|
94
|
+
[11, 1],
|
|
95
|
+
[1, 11],
|
|
96
|
+
[-9, 1],
|
|
97
|
+
[1, -9]
|
|
98
|
+
],
|
|
99
|
+
c: true
|
|
100
|
+
},
|
|
101
|
+
ix: 2
|
|
102
|
+
},
|
|
103
|
+
nm: "Path 1",
|
|
104
|
+
mn: "ADBE Vector Shape - Group",
|
|
105
|
+
hd: false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
ty: "mm",
|
|
109
|
+
mm: 3,
|
|
110
|
+
nm: "Merge Paths 1",
|
|
111
|
+
mn: "ADBE Vector Filter - Merge",
|
|
112
|
+
hd: false
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
ty: "tm",
|
|
116
|
+
s: {
|
|
117
|
+
a: 1,
|
|
118
|
+
k: [
|
|
119
|
+
{
|
|
120
|
+
i: { x: [0.833], y: [0.833] },
|
|
121
|
+
o: { x: [0.167], y: [0.167] },
|
|
122
|
+
t: 0,
|
|
123
|
+
s: [0]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
i: { x: [0.833], y: [0.833] },
|
|
127
|
+
o: { x: [0.167], y: [0.167] },
|
|
128
|
+
t: 60,
|
|
129
|
+
s: [0]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
i: { x: [0.833], y: [0.833] },
|
|
133
|
+
o: { x: [0.167], y: [0.167] },
|
|
134
|
+
t: 90,
|
|
135
|
+
s: [60]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
t: 119,
|
|
139
|
+
s: [100]
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
ix: 1
|
|
143
|
+
},
|
|
144
|
+
e: {
|
|
145
|
+
a: 1,
|
|
146
|
+
k: [
|
|
147
|
+
{
|
|
148
|
+
i: { x: [0.833], y: [0.833] },
|
|
149
|
+
o: { x: [0.167], y: [0.167] },
|
|
150
|
+
t: 0,
|
|
151
|
+
s: [0]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
i: { x: [0.833], y: [0.833] },
|
|
155
|
+
o: { x: [0.167], y: [0.167] },
|
|
156
|
+
t: 30,
|
|
157
|
+
s: [70]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
i: { x: [0.833], y: [0.833] },
|
|
161
|
+
o: { x: [0.167], y: [0.167] },
|
|
162
|
+
t: 60,
|
|
163
|
+
s: [90]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
i: { x: [0.833], y: [0.833] },
|
|
167
|
+
o: { x: [0.167], y: [0.167] },
|
|
168
|
+
t: 90,
|
|
169
|
+
s: [90]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
t: 119,
|
|
173
|
+
s: [99]
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
ix: 2
|
|
177
|
+
},
|
|
178
|
+
o: { a: 0, k: 0, ix: 3 },
|
|
179
|
+
m: 1,
|
|
180
|
+
ix: 3,
|
|
181
|
+
nm: "Trim Paths 1",
|
|
182
|
+
mn: "ADBE Vector Filter - Trim",
|
|
183
|
+
hd: false
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
ty: "st",
|
|
187
|
+
c: { a: 0, k: [r, g, b, a], ix: 3 },
|
|
188
|
+
o: { a: 0, k: 100, ix: 4 },
|
|
189
|
+
w: { a: 0, k: weight, ix: 5 },
|
|
190
|
+
lc: 2,
|
|
191
|
+
lj: 1,
|
|
192
|
+
ml: 4,
|
|
193
|
+
bm: 0,
|
|
194
|
+
nm: "Stroke 1",
|
|
195
|
+
mn: "ADBE Vector Graphic - Stroke",
|
|
196
|
+
hd: false
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
ty: "tr",
|
|
200
|
+
p: { a: 0, k: [0, 0], ix: 2 },
|
|
201
|
+
a: { a: 0, k: [0, 0], ix: 1 },
|
|
202
|
+
s: { a: 0, k: [100, 100], ix: 3 },
|
|
203
|
+
r: { a: 0, k: 0, ix: 6 },
|
|
204
|
+
o: { a: 0, k: 100, ix: 7 },
|
|
205
|
+
sk: { a: 0, k: 0, ix: 4 },
|
|
206
|
+
sa: { a: 0, k: 0, ix: 5 },
|
|
207
|
+
nm: "Transform"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
nm: "circle",
|
|
211
|
+
np: 4,
|
|
212
|
+
cix: 2,
|
|
213
|
+
bm: 0,
|
|
214
|
+
ix: 1,
|
|
215
|
+
mn: "ADBE Vector Group",
|
|
216
|
+
hd: false
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
ip: 0,
|
|
220
|
+
op: 120,
|
|
221
|
+
st: 0,
|
|
222
|
+
bm: 0
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
markers: []
|
|
226
|
+
};
|
|
227
|
+
return {
|
|
228
|
+
type: "lottie",
|
|
229
|
+
props: {
|
|
230
|
+
loop: true,
|
|
231
|
+
contentMode: 1,
|
|
232
|
+
circular: true,
|
|
233
|
+
json,
|
|
234
|
+
bgcolor: this._props.bgcolor,
|
|
235
|
+
id: this.id
|
|
236
|
+
},
|
|
237
|
+
layout: layout || ((make, view) => {
|
|
238
|
+
make.size.equalTo($size(this._props.diameter, this._props.diameter));
|
|
239
|
+
make.center.equalTo(view.super);
|
|
240
|
+
}),
|
|
241
|
+
events: {
|
|
242
|
+
ready: sender => sender.play({})
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
exports.AndroidStyleSpinner = AndroidStyleSpinner;
|