@taicode/common-web 1.1.17 → 1.1.19

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 (78) hide show
  1. package/output/signin/context.d.ts +15 -0
  2. package/output/signin/context.d.ts.map +1 -0
  3. package/output/signin/context.js +13 -0
  4. package/output/signin/index.d.ts +58 -0
  5. package/output/signin/index.d.ts.map +1 -0
  6. package/output/signin/index.js +117 -0
  7. package/output/signin/service.d.ts +92 -0
  8. package/output/signin/service.d.ts.map +1 -0
  9. package/output/signin/service.js +520 -0
  10. package/output/signin/service.test.d.ts +2 -0
  11. package/output/signin/service.test.d.ts.map +1 -0
  12. package/output/signin/service.test.js +207 -0
  13. package/output/signin/types.d.ts +63 -0
  14. package/output/signin/types.d.ts.map +1 -0
  15. package/output/signin/types.js +1 -0
  16. package/package.json +7 -2
  17. package/output/catalyst/alert.jsx +0 -55
  18. package/output/catalyst/auth-layout.jsx +0 -7
  19. package/output/catalyst/avatar.jsx +0 -45
  20. package/output/catalyst/badge.jsx +0 -53
  21. package/output/catalyst/button.jsx +0 -187
  22. package/output/catalyst/checkbox.jsx +0 -105
  23. package/output/catalyst/combobox.jsx +0 -120
  24. package/output/catalyst/description-list.jsx +0 -24
  25. package/output/catalyst/dialog.jsx +0 -55
  26. package/output/catalyst/divider.jsx +0 -16
  27. package/output/catalyst/dropdown.jsx +0 -102
  28. package/output/catalyst/fieldset.jsx +0 -41
  29. package/output/catalyst/heading.jsx +0 -22
  30. package/output/catalyst/input.jsx +0 -73
  31. package/output/catalyst/link.jsx +0 -14
  32. package/output/catalyst/listbox.jsx +0 -120
  33. package/output/catalyst/navbar.jsx +0 -67
  34. package/output/catalyst/pagination.jsx +0 -52
  35. package/output/catalyst/radio.jsx +0 -103
  36. package/output/catalyst/select.jsx +0 -59
  37. package/output/catalyst/sidebar-layout.jsx +0 -58
  38. package/output/catalyst/sidebar.jsx +0 -85
  39. package/output/catalyst/stacked-layout.jsx +0 -55
  40. package/output/catalyst/switch.jsx +0 -161
  41. package/output/catalyst/table.jsx +0 -68
  42. package/output/catalyst/text.jsx +0 -29
  43. package/output/catalyst/textarea.jsx +0 -49
  44. package/output/helpers/cache-api/cache-api.d.ts +0 -13
  45. package/output/helpers/cache-api/cache-api.d.ts.map +0 -1
  46. package/output/helpers/cache-api/cache-api.js +0 -114
  47. package/output/helpers/cache-api/cache-api.test.d.ts +0 -2
  48. package/output/helpers/cache-api/cache-api.test.d.ts.map +0 -1
  49. package/output/helpers/cache-api/cache-api.test.js +0 -348
  50. package/output/helpers/cache-api/index.d.ts +0 -2
  51. package/output/helpers/cache-api/index.d.ts.map +0 -1
  52. package/output/helpers/cache-api/index.js +0 -1
  53. package/output/helpers/service/index.d.ts +0 -1
  54. package/output/helpers/service/index.d.ts.map +0 -1
  55. package/output/helpers/service/index.js +0 -1
  56. package/output/helpers/service/service.d.ts +0 -5
  57. package/output/helpers/service/service.d.ts.map +0 -1
  58. package/output/helpers/service/service.js +0 -2
  59. package/output/helpers/side-cache/index.d.ts +0 -2
  60. package/output/helpers/side-cache/index.d.ts.map +0 -1
  61. package/output/helpers/side-cache/index.js +0 -1
  62. package/output/helpers/side-cache/side-cache.d.ts +0 -10
  63. package/output/helpers/side-cache/side-cache.d.ts.map +0 -1
  64. package/output/helpers/side-cache/side-cache.js +0 -137
  65. package/output/helpers/side-cache/side-cache.test.d.ts +0 -2
  66. package/output/helpers/side-cache/side-cache.test.d.ts.map +0 -1
  67. package/output/helpers/side-cache/side-cache.test.js +0 -179
  68. package/output/helpers/use-observer/index.d.ts +0 -2
  69. package/output/helpers/use-observer/index.d.ts.map +0 -1
  70. package/output/helpers/use-observer/index.js +0 -1
  71. package/output/helpers/use-observer/use-observer.d.ts +0 -3
  72. package/output/helpers/use-observer/use-observer.d.ts.map +0 -1
  73. package/output/helpers/use-observer/use-observer.js +0 -16
  74. package/output/helpers/use-observer/use-observer.test.d.ts +0 -2
  75. package/output/helpers/use-observer/use-observer.test.d.ts.map +0 -1
  76. package/output/helpers/use-observer/use-observer.test.jsx +0 -134
  77. package/output/service/service.test.jsx +0 -367
  78. package/output/use-observer/use-observer.test.jsx +0 -134
@@ -0,0 +1,520 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
8
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
+ var _, done = false;
14
+ for (var i = decorators.length - 1; i >= 0; i--) {
15
+ var context = {};
16
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
+ if (kind === "accessor") {
21
+ if (result === void 0) continue;
22
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
+ if (_ = accept(result.get)) descriptor.get = _;
24
+ if (_ = accept(result.set)) descriptor.set = _;
25
+ if (_ = accept(result.init)) initializers.unshift(_);
26
+ }
27
+ else if (_ = accept(result)) {
28
+ if (kind === "field") initializers.unshift(_);
29
+ else descriptor[key] = _;
30
+ }
31
+ }
32
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
+ done = true;
34
+ };
35
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
36
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
37
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
38
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
39
+ };
40
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
41
+ if (kind === "m") throw new TypeError("Private method is not writable");
42
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
43
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
44
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
45
+ };
46
+ import { computed, observable, runInAction, reaction } from 'mobx';
47
+ import { Service, debounce, Disposer } from '@taicode/common-base';
48
+ const DEFAULT_CONFIG = {
49
+ pollInterval: 2000,
50
+ errorAutoCloseDelay: 3000,
51
+ successDisplayDuration: 1500
52
+ };
53
+ const STORAGE_KEY = '__signin_service_state__';
54
+ let SigninService = (() => {
55
+ var _a, _SigninService_inited_accessor_storage, _SigninService_check_accessor_storage, _SigninService_ticket_accessor_storage, _SigninService_dialogStatus_accessor_storage, _SigninService_errorMessage_accessor_storage;
56
+ var _b, _c;
57
+ let _classSuper = Service;
58
+ let _instanceExtraInitializers = [];
59
+ let _inited_decorators;
60
+ let _inited_initializers = [];
61
+ let _inited_extraInitializers = [];
62
+ let _check_decorators;
63
+ let _check_initializers = [];
64
+ let _check_extraInitializers = [];
65
+ let _ticket_decorators;
66
+ let _ticket_initializers = [];
67
+ let _ticket_extraInitializers = [];
68
+ let _dialogStatus_decorators;
69
+ let _dialogStatus_initializers = [];
70
+ let _dialogStatus_extraInitializers = [];
71
+ let _errorMessage_decorators;
72
+ let _errorMessage_initializers = [];
73
+ let _errorMessage_extraInitializers = [];
74
+ let _get_status_decorators;
75
+ let _get_signinUrl_decorators;
76
+ let _get_isDialogOpen_decorators;
77
+ let _get_hasActiveTicket_decorators;
78
+ let _start_decorators;
79
+ let _closeDialog_decorators;
80
+ let _cancel_decorators;
81
+ let _init_decorators;
82
+ return _a = class SigninService extends _classSuper {
83
+ get inited() { return __classPrivateFieldGet(this, _SigninService_inited_accessor_storage, "f"); }
84
+ set inited(value) { __classPrivateFieldSet(this, _SigninService_inited_accessor_storage, value, "f"); }
85
+ get check() { return __classPrivateFieldGet(this, _SigninService_check_accessor_storage, "f"); }
86
+ set check(value) { __classPrivateFieldSet(this, _SigninService_check_accessor_storage, value, "f"); }
87
+ get ticket() { return __classPrivateFieldGet(this, _SigninService_ticket_accessor_storage, "f"); }
88
+ set ticket(value) { __classPrivateFieldSet(this, _SigninService_ticket_accessor_storage, value, "f"); }
89
+ // UI 状态管理
90
+ get dialogStatus() { return __classPrivateFieldGet(this, _SigninService_dialogStatus_accessor_storage, "f"); }
91
+ set dialogStatus(value) { __classPrivateFieldSet(this, _SigninService_dialogStatus_accessor_storage, value, "f"); }
92
+ get errorMessage() { return __classPrivateFieldGet(this, _SigninService_errorMessage_accessor_storage, "f"); }
93
+ set errorMessage(value) { __classPrivateFieldSet(this, _SigninService_errorMessage_accessor_storage, value, "f"); }
94
+ constructor(apiConfig, config = {}) {
95
+ super();
96
+ _SigninService_inited_accessor_storage.set(this, (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _inited_initializers, false)));
97
+ this.isPolling = (__runInitializers(this, _inited_extraInitializers), false);
98
+ this.disposer = new Disposer();
99
+ this.pollingTimer = null;
100
+ _SigninService_check_accessor_storage.set(this, __runInitializers(this, _check_initializers, null));
101
+ _SigninService_ticket_accessor_storage.set(this, (__runInitializers(this, _check_extraInitializers), __runInitializers(this, _ticket_initializers, null
102
+ // UI 状态管理
103
+ )));
104
+ _SigninService_dialogStatus_accessor_storage.set(this, (__runInitializers(this, _ticket_extraInitializers), __runInitializers(this, _dialogStatus_initializers, 'idle')));
105
+ _SigninService_errorMessage_accessor_storage.set(this, (__runInitializers(this, _dialogStatus_extraInitializers), __runInitializers(this, _errorMessage_initializers, '')));
106
+ __runInitializers(this, _errorMessage_extraInitializers);
107
+ this.apiConfig = apiConfig;
108
+ this.config = Object.assign(Object.assign({}, DEFAULT_CONFIG), config);
109
+ }
110
+ get status() {
111
+ if (this.ticket == null)
112
+ return null;
113
+ if (this.check == null)
114
+ return null;
115
+ return this.check.status;
116
+ }
117
+ get signinUrl() {
118
+ var _b, _c;
119
+ return (_c = (_b = this.ticket) === null || _b === void 0 ? void 0 : _b.signinUrl) !== null && _c !== void 0 ? _c : null;
120
+ }
121
+ get isDialogOpen() {
122
+ return this.dialogStatus !== 'idle';
123
+ }
124
+ get hasActiveTicket() {
125
+ return this.ticket != null;
126
+ }
127
+ /**
128
+ * 检查票据是否过期
129
+ */
130
+ isTicketExpired(ticket) {
131
+ const expiredTime = new Date(ticket.expiredTime);
132
+ return new Date() > expiredTime;
133
+ }
134
+ /**
135
+ * 保存状态到 localStorage
136
+ */
137
+ saveState() {
138
+ if (typeof window === 'undefined' || !window.localStorage)
139
+ return;
140
+ try {
141
+ const state = {
142
+ ticket: this.ticket,
143
+ dialogStatus: this.dialogStatus,
144
+ errorMessage: this.errorMessage,
145
+ timestamp: Date.now()
146
+ };
147
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(state));
148
+ }
149
+ catch (error) {
150
+ console.warn('Failed to save signin state:', error);
151
+ }
152
+ }
153
+ /**
154
+ * 从 localStorage 恢复状态
155
+ */
156
+ restoreState() {
157
+ if (typeof window === 'undefined' || !window.localStorage)
158
+ return false;
159
+ try {
160
+ const data = localStorage.getItem(STORAGE_KEY);
161
+ if (!data)
162
+ return false;
163
+ const state = JSON.parse(data);
164
+ // 检查票据是否存在且未过期(使用票据本身的过期时间)
165
+ if (state.ticket && !this.isTicketExpired(state.ticket)) {
166
+ runInAction(() => {
167
+ this.ticket = state.ticket;
168
+ this.dialogStatus = state.dialogStatus;
169
+ this.errorMessage = state.errorMessage;
170
+ });
171
+ // 如果是等待或打开中状态,恢复轮询并显示弹窗
172
+ if (state.dialogStatus === 'waiting' || state.dialogStatus === 'opening') {
173
+ // 确保弹窗显示
174
+ runInAction(() => {
175
+ this.dialogStatus = 'waiting';
176
+ });
177
+ this.watchTicketStatus();
178
+ }
179
+ return true;
180
+ }
181
+ // 票据无效或过期,清理状态
182
+ this.clearPersistedState();
183
+ return false;
184
+ }
185
+ catch (error) {
186
+ console.warn('Failed to restore signin state:', error);
187
+ this.clearPersistedState();
188
+ return false;
189
+ }
190
+ }
191
+ /**
192
+ * 清理持久化状态
193
+ */
194
+ clearPersistedState() {
195
+ if (typeof window === 'undefined' || !window.localStorage)
196
+ return;
197
+ try {
198
+ localStorage.removeItem(STORAGE_KEY);
199
+ }
200
+ catch (error) {
201
+ console.warn('Failed to clear signin state:', error);
202
+ }
203
+ }
204
+ /**
205
+ * 设置错误状态
206
+ */
207
+ setError(message, autoClose = true) {
208
+ runInAction(() => {
209
+ this.dialogStatus = 'error';
210
+ this.errorMessage = message;
211
+ });
212
+ if (autoClose) {
213
+ setTimeout(() => {
214
+ if (this.dialogStatus === 'error') {
215
+ runInAction(() => this.dialogStatus = 'idle');
216
+ }
217
+ }, this.config.errorAutoCloseDelay);
218
+ }
219
+ }
220
+ /**
221
+ * 停止票据状态轮询
222
+ */
223
+ stopPolling() {
224
+ this.isPolling = false;
225
+ if (this.pollingTimer) {
226
+ clearTimeout(this.pollingTimer);
227
+ this.pollingTimer = null;
228
+ }
229
+ }
230
+ /**
231
+ * 处理认证成功
232
+ */
233
+ async handleAuthSuccess(token) {
234
+ try {
235
+ runInAction(() => {
236
+ this.ticket = null;
237
+ this.dialogStatus = 'success';
238
+ });
239
+ this.clearPersistedState();
240
+ // 显示成功状态一段时间
241
+ await new Promise(resolve => setTimeout(resolve, this.config.successDisplayDuration));
242
+ if (this.apiConfig.onSuccess) {
243
+ await this.apiConfig.onSuccess(token);
244
+ }
245
+ runInAction(() => {
246
+ this.dialogStatus = 'idle';
247
+ this.errorMessage = '';
248
+ });
249
+ }
250
+ catch (error) {
251
+ console.error('Auth success handler failed:', error);
252
+ this.setError('Failed to complete authentication');
253
+ }
254
+ }
255
+ /**
256
+ * 轮询检查票据状态
257
+ */
258
+ async watchTicketStatus() {
259
+ if (!this.ticket || this.isPolling)
260
+ return;
261
+ this.isPolling = true;
262
+ const poll = async () => {
263
+ if (!this.ticket || !this.isPolling) {
264
+ this.stopPolling();
265
+ return;
266
+ }
267
+ try {
268
+ // 检查票据是否过期
269
+ if (this.isTicketExpired(this.ticket)) {
270
+ this.stopPolling();
271
+ this.setError('Ticket expired');
272
+ return;
273
+ }
274
+ // 调用外部提供的检查方法
275
+ const result = await this.apiConfig.checkStatus(this.ticket.ticket);
276
+ // 检查是否有错误
277
+ if (result.isError()) {
278
+ console.error('Check ticket failed:', result.error);
279
+ // API 调用失败,继续轮询
280
+ this.scheduleNextPoll(poll);
281
+ return;
282
+ }
283
+ const check = result.value;
284
+ // 更新检查结果
285
+ runInAction(() => this.check = check);
286
+ // 根据状态处理
287
+ switch (check.status) {
288
+ case 'Finished':
289
+ this.stopPolling();
290
+ if (check.token) {
291
+ await this.handleAuthSuccess(check.token);
292
+ }
293
+ else {
294
+ this.setError('Authentication completed but no token received');
295
+ }
296
+ break;
297
+ case 'Cancelled':
298
+ this.stopPolling();
299
+ runInAction(() => {
300
+ this.dialogStatus = 'cancelled';
301
+ this.ticket = null;
302
+ });
303
+ this.clearPersistedState();
304
+ // 调用 onCancel 回调
305
+ if (this.apiConfig.onCancel) {
306
+ try {
307
+ await this.apiConfig.onCancel();
308
+ }
309
+ catch (error) {
310
+ console.error('Cancel handler error:', error);
311
+ }
312
+ }
313
+ // 显示取消状态后自动关闭
314
+ setTimeout(() => {
315
+ if (this.dialogStatus === 'cancelled') {
316
+ runInAction(() => this.dialogStatus = 'idle');
317
+ }
318
+ }, this.config.errorAutoCloseDelay);
319
+ break;
320
+ case 'Expired':
321
+ this.stopPolling();
322
+ runInAction(() => {
323
+ this.dialogStatus = 'expired';
324
+ this.ticket = null;
325
+ });
326
+ this.clearPersistedState();
327
+ // 显示过期状态后自动关闭
328
+ setTimeout(() => {
329
+ if (this.dialogStatus === 'expired') {
330
+ runInAction(() => this.dialogStatus = 'idle');
331
+ }
332
+ }, this.config.errorAutoCloseDelay);
333
+ break;
334
+ case 'Pending':
335
+ // 继续轮询
336
+ this.scheduleNextPoll(poll);
337
+ break;
338
+ default:
339
+ // 未知状态,继续轮询
340
+ this.scheduleNextPoll(poll);
341
+ }
342
+ }
343
+ catch (error) {
344
+ console.error('Ticket polling error:', error);
345
+ // 出错继续轮询,避免暂时性网络问题导致整个流程中断
346
+ this.scheduleNextPoll(poll);
347
+ }
348
+ };
349
+ // 开始轮询
350
+ poll();
351
+ }
352
+ /**
353
+ * 安排下一次轮询
354
+ */
355
+ scheduleNextPoll(pollFn) {
356
+ if (!this.isPolling)
357
+ return;
358
+ this.pollingTimer = setTimeout(() => {
359
+ pollFn();
360
+ }, this.config.pollInterval);
361
+ }
362
+ /**
363
+ * 开始登录流程
364
+ */
365
+ async start() {
366
+ // 防止重复启动
367
+ if (this.dialogStatus !== 'idle') {
368
+ console.warn('Login already in progress');
369
+ return null;
370
+ }
371
+ runInAction(() => {
372
+ this.dialogStatus = 'opening';
373
+ this.errorMessage = '';
374
+ });
375
+ try {
376
+ // 调用外部提供的申请票据方法
377
+ const result = await this.apiConfig.applySignin();
378
+ // 检查是否有错误
379
+ if (result.isError()) {
380
+ this.setError(result.error.message || 'Failed to get signin ticket');
381
+ return null;
382
+ }
383
+ const ticket = result.value;
384
+ // 验证票据有效性
385
+ if (this.isTicketExpired(ticket)) {
386
+ this.setError('Received expired ticket');
387
+ return null;
388
+ }
389
+ runInAction(() => {
390
+ this.check = null;
391
+ this.ticket = ticket;
392
+ this.dialogStatus = 'waiting';
393
+ });
394
+ // 开始轮询
395
+ this.watchTicketStatus();
396
+ return this.signinUrl;
397
+ }
398
+ catch (error) {
399
+ const message = error instanceof Error ? error.message : 'Unknown error';
400
+ this.setError(message);
401
+ return null;
402
+ }
403
+ }
404
+ /**
405
+ * 关闭对话框
406
+ */
407
+ async closeDialog() {
408
+ this.stopPolling();
409
+ this.clearPersistedState();
410
+ runInAction(() => {
411
+ this.dialogStatus = 'idle';
412
+ this.errorMessage = '';
413
+ });
414
+ }
415
+ /**
416
+ * 取消登录流程
417
+ */
418
+ async cancel() {
419
+ this.stopPolling();
420
+ // 调用 onCancel 回调
421
+ if (this.apiConfig.onCancel) {
422
+ try {
423
+ await this.apiConfig.onCancel();
424
+ }
425
+ catch (error) {
426
+ console.error('Cancel handler error:', error);
427
+ }
428
+ }
429
+ this.clearPersistedState();
430
+ runInAction(() => {
431
+ this.ticket = null;
432
+ this.check = null;
433
+ this.dialogStatus = 'idle';
434
+ this.errorMessage = '';
435
+ });
436
+ }
437
+ /**
438
+ * 初始化服务
439
+ */
440
+ async init() {
441
+ this.disposer.addDisposer(() => this.cleanup());
442
+ // 监听状态变化并自动保存
443
+ this.disposer.addDisposer(reaction(() => ({
444
+ ticket: this.ticket,
445
+ dialogStatus: this.dialogStatus,
446
+ errorMessage: this.errorMessage
447
+ }), () => {
448
+ // 只在有活跃票据或等待状态时保存
449
+ if (this.ticket || this.dialogStatus !== 'idle') {
450
+ this.saveState();
451
+ }
452
+ }, { delay: 100 } // 防抖,避免过于频繁的保存
453
+ ));
454
+ // 尝试恢复持久化状态
455
+ const restored = this.restoreState();
456
+ if (restored) {
457
+ console.log('Signin state restored from localStorage');
458
+ }
459
+ return true;
460
+ }
461
+ /**
462
+ * 清理资源
463
+ */
464
+ cleanup() {
465
+ this.stopPolling();
466
+ this.clearPersistedState();
467
+ runInAction(() => {
468
+ this.ticket = null;
469
+ this.check = null;
470
+ this.dialogStatus = 'idle';
471
+ this.errorMessage = '';
472
+ });
473
+ }
474
+ /**
475
+ * 销毁服务
476
+ */
477
+ dispose() {
478
+ this.cleanup();
479
+ this.disposer.dispose();
480
+ }
481
+ },
482
+ _SigninService_inited_accessor_storage = new WeakMap(),
483
+ _SigninService_check_accessor_storage = new WeakMap(),
484
+ _SigninService_ticket_accessor_storage = new WeakMap(),
485
+ _SigninService_dialogStatus_accessor_storage = new WeakMap(),
486
+ _SigninService_errorMessage_accessor_storage = new WeakMap(),
487
+ (() => {
488
+ var _b;
489
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_b = _classSuper[Symbol.metadata]) !== null && _b !== void 0 ? _b : null) : void 0;
490
+ _inited_decorators = [observable];
491
+ _check_decorators = [(_b = observable).ref.bind(_b)];
492
+ _ticket_decorators = [(_c = observable).ref.bind(_c)];
493
+ _dialogStatus_decorators = [observable];
494
+ _errorMessage_decorators = [observable];
495
+ _get_status_decorators = [computed];
496
+ _get_signinUrl_decorators = [computed];
497
+ _get_isDialogOpen_decorators = [computed];
498
+ _get_hasActiveTicket_decorators = [computed];
499
+ _start_decorators = [debounce(100)];
500
+ _closeDialog_decorators = [debounce(100)];
501
+ _cancel_decorators = [debounce(100)];
502
+ _init_decorators = [debounce(100)];
503
+ __esDecorate(_a, null, _inited_decorators, { kind: "accessor", name: "inited", static: false, private: false, access: { has: obj => "inited" in obj, get: obj => obj.inited, set: (obj, value) => { obj.inited = value; } }, metadata: _metadata }, _inited_initializers, _inited_extraInitializers);
504
+ __esDecorate(_a, null, _check_decorators, { kind: "accessor", name: "check", static: false, private: false, access: { has: obj => "check" in obj, get: obj => obj.check, set: (obj, value) => { obj.check = value; } }, metadata: _metadata }, _check_initializers, _check_extraInitializers);
505
+ __esDecorate(_a, null, _ticket_decorators, { kind: "accessor", name: "ticket", static: false, private: false, access: { has: obj => "ticket" in obj, get: obj => obj.ticket, set: (obj, value) => { obj.ticket = value; } }, metadata: _metadata }, _ticket_initializers, _ticket_extraInitializers);
506
+ __esDecorate(_a, null, _dialogStatus_decorators, { kind: "accessor", name: "dialogStatus", static: false, private: false, access: { has: obj => "dialogStatus" in obj, get: obj => obj.dialogStatus, set: (obj, value) => { obj.dialogStatus = value; } }, metadata: _metadata }, _dialogStatus_initializers, _dialogStatus_extraInitializers);
507
+ __esDecorate(_a, null, _errorMessage_decorators, { kind: "accessor", name: "errorMessage", static: false, private: false, access: { has: obj => "errorMessage" in obj, get: obj => obj.errorMessage, set: (obj, value) => { obj.errorMessage = value; } }, metadata: _metadata }, _errorMessage_initializers, _errorMessage_extraInitializers);
508
+ __esDecorate(_a, null, _get_status_decorators, { kind: "getter", name: "status", static: false, private: false, access: { has: obj => "status" in obj, get: obj => obj.status }, metadata: _metadata }, null, _instanceExtraInitializers);
509
+ __esDecorate(_a, null, _get_signinUrl_decorators, { kind: "getter", name: "signinUrl", static: false, private: false, access: { has: obj => "signinUrl" in obj, get: obj => obj.signinUrl }, metadata: _metadata }, null, _instanceExtraInitializers);
510
+ __esDecorate(_a, null, _get_isDialogOpen_decorators, { kind: "getter", name: "isDialogOpen", static: false, private: false, access: { has: obj => "isDialogOpen" in obj, get: obj => obj.isDialogOpen }, metadata: _metadata }, null, _instanceExtraInitializers);
511
+ __esDecorate(_a, null, _get_hasActiveTicket_decorators, { kind: "getter", name: "hasActiveTicket", static: false, private: false, access: { has: obj => "hasActiveTicket" in obj, get: obj => obj.hasActiveTicket }, metadata: _metadata }, null, _instanceExtraInitializers);
512
+ __esDecorate(_a, null, _start_decorators, { kind: "method", name: "start", static: false, private: false, access: { has: obj => "start" in obj, get: obj => obj.start }, metadata: _metadata }, null, _instanceExtraInitializers);
513
+ __esDecorate(_a, null, _closeDialog_decorators, { kind: "method", name: "closeDialog", static: false, private: false, access: { has: obj => "closeDialog" in obj, get: obj => obj.closeDialog }, metadata: _metadata }, null, _instanceExtraInitializers);
514
+ __esDecorate(_a, null, _cancel_decorators, { kind: "method", name: "cancel", static: false, private: false, access: { has: obj => "cancel" in obj, get: obj => obj.cancel }, metadata: _metadata }, null, _instanceExtraInitializers);
515
+ __esDecorate(_a, null, _init_decorators, { kind: "method", name: "init", static: false, private: false, access: { has: obj => "init" in obj, get: obj => obj.init }, metadata: _metadata }, null, _instanceExtraInitializers);
516
+ if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
517
+ })(),
518
+ _a;
519
+ })();
520
+ export { SigninService };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=service.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.test.d.ts","sourceRoot":"","sources":["../../source/signin/service.test.ts"],"names":[],"mappings":""}