pixuireactcomponents 0.0.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.
Files changed (39) hide show
  1. package/index.d.ts +17 -0
  2. package/index.js +18 -0
  3. package/package.json +11 -0
  4. package/tools/EventDispatcherJs.d.ts +10 -0
  5. package/tools/EventDispatcherJs.js +71 -0
  6. package/tools/Logger.d.ts +6 -0
  7. package/tools/Logger.js +138 -0
  8. package/ui/components/button/Button.d.ts +6 -0
  9. package/ui/components/button/Button.js +66 -0
  10. package/ui/components/carousel/Carousel.d.ts +5 -0
  11. package/ui/components/carousel/Carousel.js +226 -0
  12. package/ui/components/dropdown/Dropdown.d.ts +30 -0
  13. package/ui/components/dropdown/Dropdown.js +92 -0
  14. package/ui/components/dropdown/DropdownOptionUI.d.ts +11 -0
  15. package/ui/components/dropdown/DropdownOptionUI.js +28 -0
  16. package/ui/components/dropdown/DropdownSpreadMainUI.d.ts +9 -0
  17. package/ui/components/dropdown/DropdownSpreadMainUI.js +27 -0
  18. package/ui/components/dropdown/DropdownUnspreadMainUI.d.ts +9 -0
  19. package/ui/components/dropdown/DropdownUnspreadMainUI.js +27 -0
  20. package/ui/components/gradient/GradientText.d.ts +63 -0
  21. package/ui/components/gradient/GradientText.js +329 -0
  22. package/ui/components/imageViewer/imageViewer.d.ts +23 -0
  23. package/ui/components/imageViewer/imageViewer.js +149 -0
  24. package/ui/components/outlinetext/OutlineText.d.ts +94 -0
  25. package/ui/components/outlinetext/OutlineText.js +167 -0
  26. package/ui/components/progress/Progress.d.ts +34 -0
  27. package/ui/components/progress/Progress.js +142 -0
  28. package/ui/components/slapface/Slapface.d.ts +18 -0
  29. package/ui/components/slapface/Slapface.js +485 -0
  30. package/ui/components/slider/Slider.d.ts +57 -0
  31. package/ui/components/slider/Slider.js +289 -0
  32. package/ui/components/tab/Tab.d.ts +6 -0
  33. package/ui/components/tab/Tab.js +27 -0
  34. package/ui/components/tab/Tabs.d.ts +12 -0
  35. package/ui/components/tab/Tabs.js +54 -0
  36. package/ui/components/togglegroup/ToggleGroup.d.ts +13 -0
  37. package/ui/components/togglegroup/ToggleGroup.js +99 -0
  38. package/ui/sample/Images.d.ts +28 -0
  39. package/ui/sample/Images.js +54 -0
@@ -0,0 +1,485 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
+ return new (P || (P = Promise))(function (resolve, reject) {
30
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
34
+ });
35
+ };
36
+ var __generator = (this && this.__generator) || function (thisArg, body) {
37
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
38
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
39
+ function verb(n) { return function (v) { return step([n, v]); }; }
40
+ function step(op) {
41
+ if (f) throw new TypeError("Generator is already executing.");
42
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
43
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
44
+ if (y = 0, t) op = [op[0] & 2, t.value];
45
+ switch (op[0]) {
46
+ case 0: case 1: t = op; break;
47
+ case 4: _.label++; return { value: op[1], done: false };
48
+ case 5: _.label++; y = op[1]; op = [0]; continue;
49
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
50
+ default:
51
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
53
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
54
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
55
+ if (t[2]) _.ops.pop();
56
+ _.trys.pop(); continue;
57
+ }
58
+ op = body.call(thisArg, _);
59
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
60
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
61
+ }
62
+ };
63
+ import { h, Component } from '../../../../../lib/preact/src';
64
+ import { platformAPI } from '../../../../common/frame/platform-api';
65
+ //@ts-ignore
66
+ import SlapfaceLess from './Slapface.less';
67
+ import { Images } from '../../sample/Images';
68
+ //默认配置项
69
+ var switchItems = {
70
+ ani_switch: false,
71
+ is_mask: false,
72
+ control_show_today: false,
73
+ };
74
+ //默认无跳转按钮
75
+ var jumpButton = {
76
+ pic_changtai: '',
77
+ pic_yaxia: '',
78
+ pic_xuanfu: '',
79
+ right_pos: 0,
80
+ bottom_pos: 0,
81
+ };
82
+ var slapfaceNode = /** @class */ (function () {
83
+ function slapfaceNode(par_index) {
84
+ if (par_index == undefined)
85
+ this.index = -1;
86
+ else
87
+ this.index = par_index;
88
+ this.next = null;
89
+ }
90
+ return slapfaceNode;
91
+ }());
92
+ var slapfaceNodeList = /** @class */ (function () {
93
+ function slapfaceNodeList(groupArr) {
94
+ this.head = new slapfaceNode();
95
+ var cur = this.head;
96
+ this.size = 0;
97
+ if (groupArr) {
98
+ for (var i = 0; i < groupArr.length; i++) {
99
+ cur.next = new slapfaceNode(i);
100
+ cur = cur.next;
101
+ }
102
+ this.groupArr = groupArr;
103
+ this.size += groupArr.length;
104
+ }
105
+ this.tail = cur;
106
+ }
107
+ slapfaceNodeList.prototype.Add = function (index, next) {
108
+ this.tail.next = new slapfaceNode(index);
109
+ this.tail = this.tail.next;
110
+ ++this.size;
111
+ return this.tail;
112
+ };
113
+ slapfaceNodeList.prototype.DeleteNext = function (curParam) {
114
+ if (curParam.next == null)
115
+ return;
116
+ else {
117
+ curParam.next = curParam.next.next;
118
+ }
119
+ --this.size;
120
+ };
121
+ slapfaceNodeList.prototype.CheckReady = function () {
122
+ var cur = this.head;
123
+ while (cur.next != null) {
124
+ if (this.groupArr[cur.next.index].isLoadDone) {
125
+ this.DeleteNext(cur);
126
+ }
127
+ else {
128
+ var retIndex = cur.next.index;
129
+ this.DeleteNext(cur);
130
+ return retIndex;
131
+ }
132
+ }
133
+ return -1;
134
+ };
135
+ return slapfaceNodeList;
136
+ }());
137
+ var Slapface = /** @class */ (function (_super) {
138
+ __extends(Slapface, _super);
139
+ function Slapface(props) {
140
+ var _this = _super.call(this, props) || this;
141
+ _this.closeAct = function () {
142
+ _this.actDisplay = 'none';
143
+ _this.forceUpdate();
144
+ };
145
+ _this.loadGroup = props.load_group;
146
+ for (var i = 0; i < _this.loadGroup.length; i++) {
147
+ _this.loadGroup[i].isLoadDone = false;
148
+ }
149
+ _this.switchItems = props.switch_items ? props.switch_items : switchItems;
150
+ _this.btn_closeButton = props.btn_closeButton ? props.btn_closeButton : '';
151
+ _this.pic_loading = props.pic_loading;
152
+ _this.actDisplay = 'flex';
153
+ _this.JumpFun = props.jump_fun;
154
+ _this.controlShowToday = _this.switchItems.control_show_today;
155
+ _this.nextDayTime = props.next_day_time ? props.next_day_time : '00:00';
156
+ _this.cstRightPos = _this.props.cst_right_pos ? _this.props.cst_right_pos : 10;
157
+ _this.cstBottomPos = _this.props.cst_bottom_pos ? _this.props.cst_bottom_pos : 10;
158
+ return _this;
159
+ }
160
+ Slapface.prototype.componentWillMount = function () {
161
+ return __awaiter(this, void 0, void 0, function () {
162
+ var oldYear, oldMonth, oldDay, oldDate, year, month, day, hour, minute, oldHour, oldMinute, i;
163
+ return __generator(this, function (_a) {
164
+ switch (_a.label) {
165
+ case 0: return [4 /*yield*/, platformAPI.readCookie('oldDate.txt')];
166
+ case 1:
167
+ oldDate = _a.sent();
168
+ if (oldDate == '') {
169
+ oldYear = new Date().getFullYear();
170
+ oldMonth = new Date().getMonth() + 1;
171
+ oldDay = new Date().getDate();
172
+ oldDate += oldYear.toString();
173
+ if (oldMonth < 10)
174
+ oldDate += '0' + oldMonth.toString();
175
+ else
176
+ oldDate += oldMonth.toString();
177
+ if (oldDay < 10)
178
+ oldDate += '0' + oldDay.toString();
179
+ else
180
+ oldDate += oldDay.toString();
181
+ this.isNewDay = true;
182
+ }
183
+ else {
184
+ oldYear = parseInt(oldDate.slice(0, 4), 10);
185
+ oldMonth = parseInt(oldDate.slice(4, 6), 10);
186
+ oldDay = parseInt(oldDate.slice(6, 8), 10);
187
+ year = new Date().getFullYear();
188
+ month = new Date().getMonth() + 1;
189
+ day = new Date().getDate();
190
+ oldDate = '';
191
+ oldDate += year.toString();
192
+ if (month < 10)
193
+ oldDate += '0' + month.toString();
194
+ else
195
+ oldDate += month.toString();
196
+ if (day < 10)
197
+ oldDate += '0' + day.toString();
198
+ else
199
+ oldDate += day.toString();
200
+ if (year != oldYear || month != oldMonth) {
201
+ this.isNewDay = true;
202
+ }
203
+ else if (day != oldDay) {
204
+ if (day - oldDay > 1)
205
+ this.isNewDay = true;
206
+ else {
207
+ hour = new Date().getHours();
208
+ minute = new Date().getMinutes();
209
+ oldHour = parseInt(this.nextDayTime.slice(0, 2), 10);
210
+ oldMinute = parseInt(this.nextDayTime.slice(3, 5), 10);
211
+ if (hour > oldHour)
212
+ this.isNewDay = true;
213
+ else if (hour == oldHour) {
214
+ if (minute >= oldMinute)
215
+ this.isNewDay = true;
216
+ else
217
+ this.isNewDay = false;
218
+ }
219
+ else
220
+ this.isNewDay = false;
221
+ }
222
+ }
223
+ else
224
+ this.isNewDay = false;
225
+ }
226
+ if (!this.isNewDay) return [3 /*break*/, 3];
227
+ return [4 /*yield*/, platformAPI.writeCookie('oldDate.txt', oldDate)];
228
+ case 2:
229
+ _a.sent();
230
+ _a.label = 3;
231
+ case 3:
232
+ i = 0;
233
+ _a.label = 4;
234
+ case 4:
235
+ if (!(i < this.loadGroup.length)) return [3 /*break*/, 9];
236
+ if (!!this.isNewDay) return [3 /*break*/, 6];
237
+ return [4 /*yield*/, platformAPI.readCookie("".concat(i + 1, "log"))];
238
+ case 5:
239
+ if ((_a.sent()) == 'do_not_show')
240
+ this.loadGroup[i].isLoadDone = true;
241
+ return [3 /*break*/, 8];
242
+ case 6: return [4 /*yield*/, platformAPI.writeCookie("".concat(i + 1, "log"), 'show')];
243
+ case 7:
244
+ _a.sent();
245
+ _a.label = 8;
246
+ case 8:
247
+ i++;
248
+ return [3 /*break*/, 4];
249
+ case 9:
250
+ this.forceUpdate();
251
+ return [2 /*return*/];
252
+ }
253
+ });
254
+ });
255
+ };
256
+ Slapface.prototype.render = function () {
257
+ var slapfaceinfo = {
258
+ loadGroup: this.loadGroup,
259
+ switchItems: this.switchItems,
260
+ btn_closeButton: this.btn_closeButton,
261
+ pic_loading: this.pic_loading,
262
+ };
263
+ return (h("div", { style: { display: this.actDisplay, width: '100%', height: '100%' } },
264
+ h("div", { style: { width: '100%', height: '100%', backgroundColor: 'rgba(0,0,0,0.5)' } }, h(Group, __assign({}, slapfaceinfo, { closeAct: this.closeAct, JumpFun: this.JumpFun, controlShowToday: this.controlShowToday, cstRightPos: this.cstRightPos, cstBottomPos: this.cstBottomPos })))));
265
+ };
266
+ return Slapface;
267
+ }(Component));
268
+ export { Slapface };
269
+ var Group = /** @class */ (function (_super) {
270
+ __extends(Group, _super);
271
+ function Group(props) {
272
+ var _this = _super.call(this, props) || this;
273
+ _this.setShowToday = function () {
274
+ _this.isShowToday = !_this.isShowToday;
275
+ };
276
+ var emptyGroup = [
277
+ {
278
+ isLoadDone: false,
279
+ picture: '',
280
+ width: 0,
281
+ height: 0,
282
+ jumpButton: jumpButton,
283
+ },
284
+ ];
285
+ _this.groupArr = emptyGroup.concat(_this.props.loadGroup);
286
+ _this.groupIndexList = new slapfaceNodeList(_this.groupArr);
287
+ _this.JumpFun = props.JumpFun;
288
+ _this.loadDisplay = 'hidden';
289
+ _this.elseDisplay = 'visible';
290
+ _this.firstFrameDisplay = 'none';
291
+ _this.isShowToday = true;
292
+ _this.controlShowToday = props.controlShowToday;
293
+ _this.cstRightPos = props.cstRightPos;
294
+ _this.cstBottomPos = props.cstBottomPos;
295
+ _this.firstRefresh = true;
296
+ _this.state = {
297
+ curIndex: _this.groupIndexList.CheckReady(),
298
+ };
299
+ return _this;
300
+ }
301
+ Group.prototype.componentDidMount = function () {
302
+ var _this = this;
303
+ setTimeout(function () {
304
+ _this.forceUpdate();
305
+ }, 300);
306
+ };
307
+ Group.prototype.componentDidUpdate = function () {
308
+ var _this = this;
309
+ if (this.firstRefresh) {
310
+ this.firstRefresh = false;
311
+ this.loadDisplay = 'hidden';
312
+ if (this.firstFrameDisplay == 'none') {
313
+ this.firstFrameDisplay = 'flex';
314
+ this.closeClick();
315
+ }
316
+ }
317
+ else {
318
+ var curIndex_1 = this.state.curIndex;
319
+ setTimeout(function () {
320
+ if (!_this.groupArr[curIndex_1].isLoadDone) {
321
+ _this.groupArr[curIndex_1].isLoadDone = true;
322
+ _this.closeClick();
323
+ }
324
+ }, 1000);
325
+ }
326
+ };
327
+ Group.prototype.closeClick = function (e) {
328
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
329
+ if (!this.isShowToday) {
330
+ platformAPI.writeCookie("".concat(this.state.curIndex, "log"), 'do_not_show');
331
+ this.isShowToday = true;
332
+ }
333
+ var nextIndex = this.groupIndexList.CheckReady();
334
+ this.loadDisplay = 'visible';
335
+ this.elseDisplay = 'hidden';
336
+ if (nextIndex != -1) {
337
+ if (this.props.switchItems.ani_switch) {
338
+ this.picBack.className = SlapfaceLess.groupbackTemp;
339
+ }
340
+ this.setState({ curIndex: nextIndex });
341
+ }
342
+ else {
343
+ this.props.closeAct();
344
+ }
345
+ };
346
+ Group.prototype.render = function () {
347
+ var _this = this;
348
+ if (this.state.curIndex == -1) {
349
+ this.setState({ curIndex: this.groupIndexList.CheckReady() });
350
+ }
351
+ return (h("div", { style: { width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center' } },
352
+ h("div", { onClick: function () {
353
+ if (_this.props.switchItems.is_mask == false)
354
+ return;
355
+ _this.closeClick();
356
+ }, style: { position: 'absolute', width: '100%', height: '100%' } }),
357
+ h("div", { ref: function (div) {
358
+ _this.picBack = div;
359
+ }, onAnimationStart: function () {
360
+ if (_this.picBack.className == SlapfaceLess.groupBack)
361
+ _this.forceUpdate();
362
+ }, style: { position: 'relative' } },
363
+ h("img", { src: this.groupArr[this.state.curIndex].picture, style: {
364
+ visibility: this.elseDisplay,
365
+ width: this.groupArr[this.state.curIndex].width,
366
+ height: this.groupArr[this.state.curIndex].height,
367
+ }, onLoad: function () {
368
+ var curIndex = _this.state.curIndex;
369
+ if (!_this.groupArr[curIndex].isLoadDone) {
370
+ _this.groupArr[curIndex].isLoadDone = true;
371
+ _this.loadDisplay = 'hidden';
372
+ _this.elseDisplay = 'visible';
373
+ if (_this.props.switchItems.ani_switch)
374
+ _this.picBack.className = SlapfaceLess.groupBack;
375
+ else
376
+ _this.forceUpdate();
377
+ }
378
+ } }),
379
+ h(CloseButton, { firstFrameDisplay: this.firstFrameDisplay, btn_closeButton: this.props.btn_closeButton, elseDisplay: this.elseDisplay, onClick: function (e) {
380
+ _this.closeClick(e);
381
+ } }),
382
+ h(JumpButton, { firstFrameDisplay: this.firstFrameDisplay, elseDisplay: this.elseDisplay, jumpButton: this.groupArr[this.state.curIndex].jumpButton, JumpFun: function () {
383
+ _this.JumpFun(_this.state.curIndex);
384
+ } }),
385
+ h(JumpTodayToggle, { setShowToday: this.setShowToday, firstFrameDisplay: this.firstFrameDisplay, elseDisplay: this.elseDisplay, controlShowToday: this.controlShowToday, cstRightPos: this.cstRightPos, cstBottomPos: this.cstBottomPos })),
386
+ h("div", { className: SlapfaceLess.loading_anim, style: {
387
+ backgroundImage: "url(".concat(this.props.pic_loading, ")"),
388
+ width: '300px',
389
+ height: '300px',
390
+ position: 'absolute',
391
+ visibility: this.loadDisplay,
392
+ } }, ' ')));
393
+ };
394
+ return Group;
395
+ }(Component));
396
+ var CloseButton = /** @class */ (function (_super) {
397
+ __extends(CloseButton, _super);
398
+ function CloseButton() {
399
+ return _super !== null && _super.apply(this, arguments) || this;
400
+ }
401
+ CloseButton.prototype.render = function () {
402
+ return (h("button", { className: SlapfaceLess.closeButton, style: {
403
+ display: this.props.firstFrameDisplay,
404
+ visibility: this.props.elseDisplay,
405
+ backgroundImage: "url(".concat(this.props.btn_closeButton, ")"),
406
+ }, onClick: this.props.onClick }));
407
+ };
408
+ return CloseButton;
409
+ }(Component));
410
+ var JumpButton = /** @class */ (function (_super) {
411
+ __extends(JumpButton, _super);
412
+ function JumpButton(props) {
413
+ return _super.call(this, props) || this;
414
+ }
415
+ JumpButton.prototype.render = function () {
416
+ var _this = this;
417
+ if (!this.props.jumpButton)
418
+ return;
419
+ return (h("div", { onClick: function () {
420
+ _this.props.JumpFun();
421
+ }, style: {
422
+ display: this.props.firstFrameDisplay,
423
+ visibility: this.props.elseDisplay,
424
+ position: 'absolute',
425
+ bottom: "".concat(this.props.jumpButton.bottom_pos, "px"),
426
+ right: "".concat(this.props.jumpButton.right_pos, "px"),
427
+ }, onMouseDown: function () {
428
+ _this.jumpbtnImg.src = _this.props.jumpButton.pic_yaxia;
429
+ _this.forceUpdate();
430
+ }, onMouseUp: function () {
431
+ _this.jumpbtnImg.src = _this.props.jumpButton.pic_changtai;
432
+ _this.forceUpdate();
433
+ } },
434
+ h("img", { ref: function (img) {
435
+ _this.jumpbtnImg = img;
436
+ }, src: this.props.jumpButton.pic_changtai })));
437
+ };
438
+ return JumpButton;
439
+ }(Component));
440
+ var JumpTodayToggle = /** @class */ (function (_super) {
441
+ __extends(JumpTodayToggle, _super);
442
+ function JumpTodayToggle(props) {
443
+ var _this = _super.call(this, props) || this;
444
+ _this.selected_pic = Images.checkbox1;
445
+ _this.not_selected_pic = Images.checkbox0;
446
+ _this.isSelected = false;
447
+ _this.toggleText = '今日不再弹出';
448
+ _this.index = props.index;
449
+ _this.isClick = false;
450
+ _this.cstRightPos = props.cstRightPos;
451
+ _this.cstBottomPos = props.cstBottomPos;
452
+ return _this;
453
+ }
454
+ JumpTodayToggle.prototype.componentWillUpdate = function () {
455
+ if (!this.isClick)
456
+ this.isSelected = false;
457
+ this.isClick = false;
458
+ };
459
+ JumpTodayToggle.prototype.render = function (props) {
460
+ var _this = this;
461
+ return (h("div", { style: {
462
+ display: props.controlShowToday ? props.firstFrameDisplay : 'none',
463
+ visibility: props.elseDisplay,
464
+ position: 'absolute',
465
+ right: "".concat(this.cstRightPos, "px"),
466
+ bottom: "".concat(this.cstBottomPos, "px"),
467
+ alignItems: 'center',
468
+ flexDirection: 'row',
469
+ } },
470
+ h("div", { style: {
471
+ width: '36px',
472
+ height: '36px',
473
+ backgroundSize: 'contain',
474
+ backgroundImage: "url(".concat(this.isSelected ? this.selected_pic : this.not_selected_pic, ")"),
475
+ }, onClick: function () {
476
+ _this.props.setShowToday();
477
+ _this.isClick = true;
478
+ _this.isSelected = !_this.isSelected;
479
+ _this.forceUpdate();
480
+ } }),
481
+ h("div", null,
482
+ h("text", null, "".concat(this.toggleText)))));
483
+ };
484
+ return JumpTodayToggle;
485
+ }(Component));
@@ -0,0 +1,57 @@
1
+ import { Component, h } from 'preact';
2
+ export interface SliderProps {
3
+ percent: number;
4
+ wrapperWidth: number;
5
+ wrapperHeight: number;
6
+ height: number;
7
+ innerHeight?: number;
8
+ dotWidth: number;
9
+ dotHeight: number;
10
+ dotWrapperWidth: number;
11
+ dotWrapperHeight: number;
12
+ outerBg: string;
13
+ innerBg: string;
14
+ dotBg: string;
15
+ onDragStart: Function | null;
16
+ onDrag: Function | null;
17
+ onDragEnd: Function | null;
18
+ isDiscrete: boolean | null;
19
+ discrete?: number;
20
+ maxDiscrete?: number;
21
+ hasIncDecButton: boolean | null;
22
+ incButtonWidth?: number;
23
+ incButtonHeight?: number;
24
+ decButtonWidth?: number;
25
+ decButtonHeight?: number;
26
+ incButtonBg?: string;
27
+ decButtonBg?: string;
28
+ overallWidth?: number;
29
+ onIncClick?: Function | null;
30
+ onDecClick?: Function | null;
31
+ rangeControl?: boolean;
32
+ startRange?: number;
33
+ endRange?: number;
34
+ }
35
+ export declare class Slider extends Component<SliderProps, {
36
+ percent: number;
37
+ }> {
38
+ discrete: number;
39
+ private refWrapper;
40
+ constructor(props: any);
41
+ componentDidMount(): void;
42
+ componentWillReceiveProps(nextProps: any): void;
43
+ onDragStart: (event: any) => void;
44
+ onDrag: (event: any) => void;
45
+ onDragEnd: (event: any) => void;
46
+ onDecClick: () => void;
47
+ onIncClick: () => void;
48
+ computeWrapperStyle: () => void;
49
+ computeOuterStyle: () => void;
50
+ computeInnerStyle: () => void;
51
+ computeDotWrapperStyle: () => void;
52
+ computeDotStyle: () => void;
53
+ computeIncButtonStyle: () => void;
54
+ computeDecButtonStyle: () => void;
55
+ computeWithButtonStyle: () => void;
56
+ render(): h.JSX.Element;
57
+ }