clickgo 3.16.26 → 3.16.28

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 (102) hide show
  1. package/README.md +1 -1
  2. package/dist/app/demo/app.js +4 -16
  3. package/dist/app/demo/config.json +4 -1
  4. package/dist/app/demo/form/control/arteditor/arteditor.js +7 -18
  5. package/dist/app/demo/form/control/button/button.js +2 -13
  6. package/dist/app/demo/form/control/check/check.js +3 -14
  7. package/dist/app/demo/form/control/content/content.js +3 -14
  8. package/dist/app/demo/form/control/daterange/daterange.js +1 -1
  9. package/dist/app/demo/form/control/delete/delete.js +3 -14
  10. package/dist/app/demo/form/control/dialog/dialog.js +2 -0
  11. package/dist/app/demo/form/control/dialog/dialog.xml +26 -12
  12. package/dist/app/demo/form/control/flow/flow.js +2 -13
  13. package/dist/app/demo/form/control/form/form.js +4 -15
  14. package/dist/app/demo/form/control/iconview/iconview.js +12 -29
  15. package/dist/app/demo/form/control/jodit/jodit.js +7 -18
  16. package/dist/app/demo/form/control/link/link.js +2 -13
  17. package/dist/app/demo/form/control/list/list.js +40 -52
  18. package/dist/app/demo/form/control/list/list.xml +20 -10
  19. package/dist/app/demo/form/control/map/map.js +17 -28
  20. package/dist/app/demo/form/control/menu/menu.js +6 -17
  21. package/dist/app/demo/form/control/mpegts/mpegts.js +1 -1
  22. package/dist/app/demo/form/control/nav/nav.js +6 -17
  23. package/dist/app/demo/form/control/novnc/novnc.js +75 -0
  24. package/dist/app/demo/form/control/novnc/novnc.xml +13 -0
  25. package/dist/app/demo/form/control/panel/panel.js +9 -20
  26. package/dist/app/demo/form/control/panel/test1.js +20 -41
  27. package/dist/app/demo/form/control/pdf/pdf.js +7 -20
  28. package/dist/app/demo/form/control/progress/progress.js +3 -12
  29. package/dist/app/demo/form/control/radio/radio.js +6 -17
  30. package/dist/app/demo/form/control/select/select.js +28 -41
  31. package/dist/app/demo/form/control/switch/switch.js +3 -14
  32. package/dist/app/demo/form/control/tab/tab.js +7 -18
  33. package/dist/app/demo/form/control/table/table.js +8 -23
  34. package/dist/app/demo/form/control/text/text.js +2 -13
  35. package/dist/app/demo/form/control/tuieditor/tuieditor.js +7 -18
  36. package/dist/app/demo/form/control/uploader/uploader.js +20 -31
  37. package/dist/app/demo/form/control/vflow/vflow.js +2 -13
  38. package/dist/app/demo/form/event/form/form.js +11 -22
  39. package/dist/app/demo/form/event/task/task.js +14 -29
  40. package/dist/app/demo/form/main.js +381 -387
  41. package/dist/app/demo/form/main.xml +3 -0
  42. package/dist/app/demo/form/method/acontrol/acontrol.js +2 -13
  43. package/dist/app/demo/form/method/aform/aform.js +41 -60
  44. package/dist/app/demo/form/method/aform/sd.js +3 -14
  45. package/dist/app/demo/form/method/core/core.js +25 -50
  46. package/dist/app/demo/form/method/dom/dom.js +35 -58
  47. package/dist/app/demo/form/method/form/form.js +106 -149
  48. package/dist/app/demo/form/method/fs/fs.js +126 -147
  49. package/dist/app/demo/form/method/native/native.js +44 -72
  50. package/dist/app/demo/form/method/storage/storage.js +9 -27
  51. package/dist/app/demo/form/method/system/system.js +16 -41
  52. package/dist/app/demo/form/method/task/task.js +18 -37
  53. package/dist/app/demo/form/method/theme/theme.js +39 -54
  54. package/dist/app/demo/form/method/tool/tool.js +22 -43
  55. package/dist/app/demo/form/method/tool/tool.xml +1 -1
  56. package/dist/app/demo/form/method/zip/zip.js +18 -29
  57. package/dist/app/demo/form/solution/backpanel/backpanel.js +10 -23
  58. package/dist/app/task/app.js +2 -13
  59. package/dist/app/task/form/bar/bar.js +32 -45
  60. package/dist/clickgo.js +1 -1
  61. package/dist/control/arteditor.cgc +0 -0
  62. package/dist/control/box.cgc +0 -0
  63. package/dist/control/captcha.cgc +0 -0
  64. package/dist/control/common.cgc +0 -0
  65. package/dist/control/desc.cgc +0 -0
  66. package/dist/control/drawer.cgc +0 -0
  67. package/dist/control/echarts.cgc +0 -0
  68. package/dist/control/form.cgc +0 -0
  69. package/dist/control/iconview.cgc +0 -0
  70. package/dist/control/jodit.cgc +0 -0
  71. package/dist/control/map.cgc +0 -0
  72. package/dist/control/monaco.cgc +0 -0
  73. package/dist/control/mpegts.cgc +0 -0
  74. package/dist/control/nav.cgc +0 -0
  75. package/dist/control/novnc.cgc +0 -0
  76. package/dist/control/page.cgc +0 -0
  77. package/dist/control/pdf.cgc +0 -0
  78. package/dist/control/property.cgc +0 -0
  79. package/dist/control/qrcode.cgc +0 -0
  80. package/dist/control/table.cgc +0 -0
  81. package/dist/control/task.cgc +0 -0
  82. package/dist/control/tplink.cgc +0 -0
  83. package/dist/control/tuieditor.cgc +0 -0
  84. package/dist/control/tuiviewer.cgc +0 -0
  85. package/dist/control/xterm.cgc +0 -0
  86. package/dist/index.js +59 -71
  87. package/dist/lib/control.js +213 -235
  88. package/dist/lib/core.js +356 -379
  89. package/dist/lib/dom.js +62 -91
  90. package/dist/lib/form.js +834 -906
  91. package/dist/lib/fs.js +834 -892
  92. package/dist/lib/native.js +32 -63
  93. package/dist/lib/storage.js +21 -33
  94. package/dist/lib/task.js +1054 -1098
  95. package/dist/lib/theme.js +102 -121
  96. package/dist/lib/tool.js +65 -98
  97. package/dist/lib/zip.js +27 -42
  98. package/dist/theme/blue.cgt +0 -0
  99. package/dist/theme/byterun.cgt +0 -0
  100. package/dist/theme/dark.cgt +0 -0
  101. package/dist/theme/light.cgt +0 -0
  102. package/package.json +1 -1
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
35
  Object.defineProperty(exports, "__esModule", { value: true });
45
36
  exports.AbstractControl = void 0;
46
37
  exports.read = read;
@@ -91,8 +82,7 @@ class AbstractControl {
91
82
  return this._rootControl;
92
83
  }
93
84
  get formFocus() {
94
- var _a, _b;
95
- return (_b = (_a = this.rootForm) === null || _a === void 0 ? void 0 : _a.formFocus) !== null && _b !== void 0 ? _b : false;
85
+ return this.rootForm?.formFocus ?? false;
96
86
  }
97
87
  get path() {
98
88
  return '';
@@ -105,8 +95,7 @@ class AbstractControl {
105
95
  }
106
96
  get l() {
107
97
  return (key, data) => {
108
- var _a, _b;
109
- const loc = (_b = (_a = this.localeData) === null || _a === void 0 ? void 0 : _a[this.locale][key]) !== null && _b !== void 0 ? _b : '[LocaleError]' + key;
98
+ const loc = this.localeData?.[this.locale][key] ?? '[LocaleError]' + key;
110
99
  if (!data) {
111
100
  return loc;
112
101
  }
@@ -284,227 +273,223 @@ class AbstractControl {
284
273
  }
285
274
  }
286
275
  exports.AbstractControl = AbstractControl;
287
- function read(blob) {
288
- return __awaiter(this, void 0, void 0, function* () {
289
- const z = yield zip.get(blob);
290
- if (!z) {
291
- return false;
276
+ async function read(blob) {
277
+ const z = await zip.get(blob);
278
+ if (!z) {
279
+ return false;
280
+ }
281
+ const controlPkg = {};
282
+ const list = z.readDir('/');
283
+ for (const sub of list) {
284
+ if (sub.isFile) {
285
+ continue;
292
286
  }
293
- const controlPkg = {};
294
- const list = z.readDir('/');
295
- for (const sub of list) {
296
- if (sub.isFile) {
297
- continue;
298
- }
299
- const configContent = yield z.getContent('/' + sub.name + '/config.json');
300
- if (!configContent) {
301
- form.notify({
302
- 'title': 'Error',
303
- 'content': `Control file not found.\nFile: "${'/' + sub.name + '/config.json'}".`,
304
- 'type': 'danger'
305
- });
306
- continue;
307
- }
308
- const config = JSON.parse(configContent);
309
- controlPkg[config.name] = {
310
- 'type': 'control',
311
- 'config': config,
312
- 'files': {}
313
- };
314
- const list = z.readDir('/' + sub.name + '/', {
315
- 'hasChildren': true
287
+ const configContent = await z.getContent('/' + sub.name + '/config.json');
288
+ if (!configContent) {
289
+ form.notify({
290
+ 'title': 'Error',
291
+ 'content': `Control file not found.\nFile: "${'/' + sub.name + '/config.json'}".`,
292
+ 'type': 'danger'
316
293
  });
317
- for (const file of list) {
318
- const pre = file.path.slice(config.name.length + 1);
319
- const mime = tool.getMimeByPath(file.name);
320
- if (['txt', 'json', 'js', 'css', 'xml', 'html'].includes(mime.ext)) {
321
- const fab = yield z.getContent(file.path + file.name, 'string');
322
- if (!fab) {
323
- continue;
324
- }
325
- controlPkg[config.name].files[pre + file.name] = fab.replace(/^\ufeff/, '');
294
+ continue;
295
+ }
296
+ const config = JSON.parse(configContent);
297
+ controlPkg[config.name] = {
298
+ 'type': 'control',
299
+ 'config': config,
300
+ 'files': {}
301
+ };
302
+ const list = z.readDir('/' + sub.name + '/', {
303
+ 'hasChildren': true
304
+ });
305
+ for (const file of list) {
306
+ const pre = file.path.slice(config.name.length + 1);
307
+ const mime = tool.getMimeByPath(file.name);
308
+ if (['txt', 'json', 'js', 'css', 'xml', 'html'].includes(mime.ext)) {
309
+ const fab = await z.getContent(file.path + file.name, 'string');
310
+ if (!fab) {
311
+ continue;
326
312
  }
327
- else {
328
- const fab = yield z.getContent(file.path + file.name, 'arraybuffer');
329
- if (!fab) {
330
- continue;
331
- }
332
- controlPkg[config.name].files[pre + file.name] = new Blob([fab], {
333
- 'type': mime.mime
334
- });
313
+ controlPkg[config.name].files[pre + file.name] = fab.replace(/^\ufeff/, '');
314
+ }
315
+ else {
316
+ const fab = await z.getContent(file.path + file.name, 'arraybuffer');
317
+ if (!fab) {
318
+ continue;
335
319
  }
320
+ controlPkg[config.name].files[pre + file.name] = new Blob([fab], {
321
+ 'type': mime.mime
322
+ });
336
323
  }
337
324
  }
338
- return controlPkg;
339
- });
325
+ }
326
+ return controlPkg;
340
327
  }
341
- function init(taskId, invoke, cache) {
342
- return __awaiter(this, void 0, void 0, function* () {
343
- const t = task.list[taskId];
344
- if (!t) {
345
- return -1;
328
+ async function init(taskId, invoke, cache) {
329
+ const t = task.list[taskId];
330
+ if (!t) {
331
+ return -1;
332
+ }
333
+ for (let path of t.app.config.controls) {
334
+ if (!path.endsWith('.cgc')) {
335
+ path += '.cgc';
346
336
  }
347
- for (let path of t.app.config.controls) {
348
- if (!path.endsWith('.cgc')) {
349
- path += '.cgc';
350
- }
351
- path = tool.urlResolve('/', path);
352
- const file = yield fs.getContent(path, {
353
- 'cache': cache
354
- }, taskId);
355
- if (file && typeof file !== 'string') {
356
- const c = yield read(file);
357
- if (c) {
358
- for (const name in c) {
359
- const item = c[name];
360
- let prep = '';
361
- t.controls[name] = {
362
- 'layout': '',
363
- 'files': item.files,
364
- 'props': {},
365
- 'emits': {},
366
- 'data': {},
367
- 'access': {},
368
- 'methods': {},
369
- 'computed': {}
370
- };
371
- t.controls[name].layout = item.files[item.config.layout + '.html'];
372
- if (t.controls[name].layout === undefined) {
373
- return -2;
374
- }
375
- t.controls[name].layout = t.controls[name].layout.replace(/^(<[a-zA-Z0-9-]+)( |>)/, '$1 data-cg-control="' + name + '"$2');
376
- const style = item.files[item.config.style + '.css'];
377
- if (style) {
378
- const r = tool.stylePrepend(style);
379
- prep = r.prep;
380
- dom.pushStyle(t.id, yield tool.styleUrl2DataUrl(item.config.style, r.style, item.files), 'control', name);
381
- }
382
- const prepList = [
383
- 'cg-theme-task' + t.id.toString() + '-' + name + '_'
384
- ];
385
- if (prep !== '') {
386
- prepList.push(prep);
387
- }
388
- t.controls[name].layout = tool.layoutAddTagClassAndReTagName(t.controls[name].layout, false);
389
- t.controls[name].layout = tool.layoutClassPrepend(t.controls[name].layout, prepList);
390
- t.controls[name].layout = tool.eventsAttrWrap(t.controls[name].layout);
391
- if (t.controls[name].layout.includes('<teleport')) {
392
- t.controls[name].layout = tool.teleportGlue(t.controls[name].layout, '{{{formId}}}');
393
- }
394
- t.controls[name].access['cgPCMap'] = tool.random(8, tool.RANDOM_LUNS, '"<>$');
395
- t.controls[name].layout = t.controls[name].layout.replace(/(<cg-[a-zA-Z0-9-_]+)/g, `$1 data-cg-rootcontrol="${t.controls[name].access['cgPCMap']}"`);
396
- let cls;
397
- if (item.files[item.config.code + '.js']) {
398
- item.files['/invoke/clickgo.js'] = `module.exports = invokeClickgo;`;
399
- let expo = [];
400
- try {
401
- expo = loader.require(item.config.code, item.files, {
402
- 'dir': '/',
403
- 'invoke': invoke,
404
- 'preprocess': function (code, path) {
405
- const exec = /eval\W/.exec(code);
406
- if (exec) {
407
- form.notify({
408
- 'title': 'Error',
409
- 'content': `The "eval" is prohibited.\nFile: "${path}".`,
410
- 'type': 'danger'
411
- });
412
- return '';
413
- }
414
- code = code.replace(/extends[\s\S]+?\.\s*AbstractControl\s*{/, (t) => {
415
- return t + 'get filename() {return __filename;}';
337
+ path = tool.urlResolve('/', path);
338
+ const file = await fs.getContent(path, {
339
+ 'cache': cache
340
+ }, taskId);
341
+ if (file && typeof file !== 'string') {
342
+ const c = await read(file);
343
+ if (c) {
344
+ for (const name in c) {
345
+ const item = c[name];
346
+ let prep = '';
347
+ t.controls[name] = {
348
+ 'layout': '',
349
+ 'files': item.files,
350
+ 'props': {},
351
+ 'emits': {},
352
+ 'data': {},
353
+ 'access': {},
354
+ 'methods': {},
355
+ 'computed': {}
356
+ };
357
+ t.controls[name].layout = item.files[item.config.layout + '.html'];
358
+ if (t.controls[name].layout === undefined) {
359
+ return -2;
360
+ }
361
+ t.controls[name].layout = t.controls[name].layout.replace(/^(<[a-zA-Z0-9-]+)( |>)/, '$1 data-cg-control="' + name + '"$2');
362
+ const style = item.files[item.config.style + '.css'];
363
+ if (style) {
364
+ const r = tool.stylePrepend(style);
365
+ prep = r.prep;
366
+ dom.pushStyle(t.id, await tool.styleUrl2DataUrl(item.config.style, r.style, item.files), 'control', name);
367
+ }
368
+ const prepList = [
369
+ 'cg-theme-task' + t.id.toString() + '-' + name + '_'
370
+ ];
371
+ if (prep !== '') {
372
+ prepList.push(prep);
373
+ }
374
+ t.controls[name].layout = tool.layoutAddTagClassAndReTagName(t.controls[name].layout, false);
375
+ t.controls[name].layout = tool.layoutClassPrepend(t.controls[name].layout, prepList);
376
+ t.controls[name].layout = tool.eventsAttrWrap(t.controls[name].layout);
377
+ if (t.controls[name].layout.includes('<teleport')) {
378
+ t.controls[name].layout = tool.teleportGlue(t.controls[name].layout, '{{{formId}}}');
379
+ }
380
+ t.controls[name].access['cgPCMap'] = tool.random(8, tool.RANDOM_LUNS, '"<>$');
381
+ t.controls[name].layout = t.controls[name].layout.replace(/(<cg-[a-zA-Z0-9-_]+)/g, `$1 data-cg-rootcontrol="${t.controls[name].access['cgPCMap']}"`);
382
+ let cls;
383
+ if (item.files[item.config.code + '.js']) {
384
+ item.files['/invoke/clickgo.js'] = `module.exports = invokeClickgo;`;
385
+ let expo = [];
386
+ try {
387
+ expo = loader.require(item.config.code, item.files, {
388
+ 'dir': '/',
389
+ 'invoke': invoke,
390
+ 'preprocess': function (code, path) {
391
+ const exec = /eval\W/.exec(code);
392
+ if (exec) {
393
+ form.notify({
394
+ 'title': 'Error',
395
+ 'content': `The "eval" is prohibited.\nFile: "${path}".`,
396
+ 'type': 'danger'
416
397
  });
417
- return code;
418
- },
419
- 'map': {
420
- 'clickgo': '/invoke/clickgo'
398
+ return '';
421
399
  }
422
- })[0];
423
- }
424
- catch (e) {
425
- core.trigger('error', taskId, 0, e, e.message + '(-4)');
426
- return -3;
427
- }
428
- if (!(expo === null || expo === void 0 ? void 0 : expo.default)) {
429
- const msg = '"default" not found on "' + item.config.code + '" of "' + name + '" control.';
430
- core.trigger('error', taskId, 0, new Error(msg), msg);
431
- return -4;
432
- }
433
- cls = new expo.default();
434
- }
435
- else {
436
- cls = new (class extends AbstractControl {
437
- get taskId() {
438
- return taskId;
400
+ code = code.replace(/extends[\s\S]+?\.\s*AbstractControl\s*{/, (t) => {
401
+ return t + 'get filename() {return __filename;}';
402
+ });
403
+ return code;
404
+ },
405
+ 'map': {
406
+ 'clickgo': '/invoke/clickgo'
439
407
  }
440
- })();
408
+ })[0];
441
409
  }
442
- if (cls.props) {
443
- for (const key in cls.props) {
444
- t.controls[name].props[key] = {
445
- 'default': cls.props[key]
446
- };
447
- }
410
+ catch (e) {
411
+ core.trigger('error', taskId, 0, e, e.message + '(-4)');
412
+ return -3;
448
413
  }
449
- if (cls.emits) {
450
- for (const key in cls.emits) {
451
- t.controls[name].emits[key] = cls.emits[key];
452
- }
414
+ if (!expo?.default) {
415
+ const msg = '"default" not found on "' + item.config.code + '" of "' + name + '" control.';
416
+ core.trigger('error', taskId, 0, new Error(msg), msg);
417
+ return -4;
453
418
  }
454
- const cdata = Object.entries(cls);
455
- for (const item of cdata) {
456
- if (item[0] === 'files') {
457
- continue;
458
- }
459
- if (item[0] === 'access') {
460
- t.controls[name].access = item[1];
461
- continue;
419
+ cls = new expo.default();
420
+ }
421
+ else {
422
+ cls = new (class extends AbstractControl {
423
+ get taskId() {
424
+ return taskId;
462
425
  }
463
- t.controls[name].data[item[0]] = item[1];
426
+ })();
427
+ }
428
+ if (cls.props) {
429
+ for (const key in cls.props) {
430
+ t.controls[name].props[key] = {
431
+ 'default': cls.props[key]
432
+ };
464
433
  }
465
- const prot = tool.getClassPrototype(cls);
466
- t.controls[name].methods = prot.method;
467
- Object.assign(t.controls[name].computed, prot.access);
468
- t.controls[name].computed.controlName = {
469
- get: function () {
470
- return name;
471
- },
472
- set: function () {
473
- form.notify({
474
- 'title': 'Error',
475
- 'content': `The software tries to modify the system variable "controlName".\nControl: ${name}`,
476
- 'type': 'danger'
477
- });
478
- return;
479
- }
480
- };
481
- t.controls[name].computed.prep = {
482
- get: function () {
483
- return prep;
484
- },
485
- set: function () {
486
- form.notify({
487
- 'title': 'Error',
488
- 'content': `The software tries to modify the system variable "prep".\nControl: ${name}`,
489
- 'type': 'danger'
490
- });
491
- return;
492
- }
493
- };
494
434
  }
435
+ if (cls.emits) {
436
+ for (const key in cls.emits) {
437
+ t.controls[name].emits[key] = cls.emits[key];
438
+ }
439
+ }
440
+ const cdata = Object.entries(cls);
441
+ for (const item of cdata) {
442
+ if (item[0] === 'files') {
443
+ continue;
444
+ }
445
+ if (item[0] === 'access') {
446
+ t.controls[name].access = item[1];
447
+ continue;
448
+ }
449
+ t.controls[name].data[item[0]] = item[1];
450
+ }
451
+ const prot = tool.getClassPrototype(cls);
452
+ t.controls[name].methods = prot.method;
453
+ Object.assign(t.controls[name].computed, prot.access);
454
+ t.controls[name].computed.controlName = {
455
+ get: function () {
456
+ return name;
457
+ },
458
+ set: function () {
459
+ form.notify({
460
+ 'title': 'Error',
461
+ 'content': `The software tries to modify the system variable "controlName".\nControl: ${name}`,
462
+ 'type': 'danger'
463
+ });
464
+ return;
465
+ }
466
+ };
467
+ t.controls[name].computed.prep = {
468
+ get: function () {
469
+ return prep;
470
+ },
471
+ set: function () {
472
+ form.notify({
473
+ 'title': 'Error',
474
+ 'content': `The software tries to modify the system variable "prep".\nControl: ${name}`,
475
+ 'type': 'danger'
476
+ });
477
+ return;
478
+ }
479
+ };
495
480
  }
496
- else {
497
- form.notify({
498
- 'title': 'Error',
499
- 'content': 'Control failed to load.\nTask id: ' + t.id.toString() + '\nPath: ' + path,
500
- 'type': 'danger'
501
- });
502
- return -5;
503
- }
481
+ }
482
+ else {
483
+ form.notify({
484
+ 'title': 'Error',
485
+ 'content': 'Control failed to load.\nTask id: ' + t.id.toString() + '\nPath: ' + path,
486
+ 'type': 'danger'
487
+ });
488
+ return -5;
504
489
  }
505
490
  }
506
- return 1;
507
- });
491
+ }
492
+ return 1;
508
493
  }
509
494
  function buildComponents(taskId, formId, path) {
510
495
  const t = task.list[taskId];
@@ -569,36 +554,29 @@ function buildComponents(taskId, formId, path) {
569
554
  beforeMount: function () {
570
555
  this.onBeforeMount();
571
556
  },
572
- mounted: function () {
573
- return __awaiter(this, void 0, void 0, function* () {
574
- var _a;
575
- if (((_a = this.element.dataset) === null || _a === void 0 ? void 0 : _a.cgRootcontrol) !== undefined) {
576
- const rc = this.parentByAccess('cgPCMap', this.element.dataset.cgRootcontrol);
577
- if (rc) {
578
- this._rootControl = rc;
579
- }
557
+ mounted: async function () {
558
+ if (this.element.dataset?.cgRootcontrol !== undefined) {
559
+ const rc = this.parentByAccess('cgPCMap', this.element.dataset.cgRootcontrol);
560
+ if (rc) {
561
+ this._rootControl = rc;
580
562
  }
581
- yield this.$nextTick();
582
- this.onMounted();
583
- });
563
+ }
564
+ await this.$nextTick();
565
+ this.onMounted();
584
566
  },
585
567
  beforeUpdate: function () {
586
568
  this.onBeforeUpdate();
587
569
  },
588
- updated: function () {
589
- return __awaiter(this, void 0, void 0, function* () {
590
- yield this.$nextTick();
591
- this.onUpdated();
592
- });
570
+ updated: async function () {
571
+ await this.$nextTick();
572
+ this.onUpdated();
593
573
  },
594
574
  beforeUnmount: function () {
595
575
  this.onBeforeUnmount();
596
576
  },
597
- unmounted: function () {
598
- return __awaiter(this, void 0, void 0, function* () {
599
- yield this.$nextTick();
600
- this.onUnmounted();
601
- });
577
+ unmounted: async function () {
578
+ await this.$nextTick();
579
+ this.onUnmounted();
602
580
  }
603
581
  };
604
582
  }