@wavemaker/app-ng-runtime 12.0.0-next.45032 → 12.0.0-next.45501

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +405 -451
  2. app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +2 -3
  3. app-ng-runtime/build-task/esm2022/public_api.mjs +1 -3
  4. app-ng-runtime/build-task/fesm2022/index.mjs +406 -454
  5. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  6. app-ng-runtime/build-task/public_api.d.ts +0 -2
  7. app-ng-runtime/components/base/bundles/index.umd.js +14 -62
  8. app-ng-runtime/components/base/components.module.d.ts +11 -12
  9. app-ng-runtime/components/base/esm2022/components.module.mjs +1 -5
  10. app-ng-runtime/components/base/esm2022/public_api.mjs +1 -2
  11. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +15 -25
  12. app-ng-runtime/components/base/fesm2022/index.mjs +15 -62
  13. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  14. app-ng-runtime/components/base/public_api.d.ts +0 -1
  15. app-ng-runtime/components/base/widgets/common/base/base.component.d.ts +5 -10
  16. app-ng-runtime/components/containers/wizard/bundles/index.umd.js +17 -0
  17. app-ng-runtime/components/containers/wizard/esm2022/wizard.component.mjs +18 -1
  18. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs +17 -0
  19. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  20. app-ng-runtime/components/containers/wizard/wizard.component.d.ts +1 -0
  21. app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +1 -3
  22. app-ng-runtime/components/data/form/fesm2022/index.mjs +0 -2
  23. app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
  24. app-ng-runtime/components/dialogs/default/bundles/index.umd.js +11 -0
  25. app-ng-runtime/components/dialogs/default/esm2022/base-dialog.mjs +12 -1
  26. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs +11 -0
  27. app-ng-runtime/components/dialogs/default/fesm2022/index.mjs.map +1 -1
  28. app-ng-runtime/components/input/default/bundles/index.umd.js +63 -39
  29. app-ng-runtime/components/input/default/checkboxset/checkboxset.component.d.ts +0 -1
  30. app-ng-runtime/components/input/default/esm2022/checkboxset/checkboxset.component.mjs +5 -8
  31. app-ng-runtime/components/input/default/esm2022/radioset/radioset.component.mjs +5 -8
  32. app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +57 -29
  33. app-ng-runtime/components/input/default/esm2022/text/base/base-input.mjs +1 -4
  34. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +2 -2
  35. app-ng-runtime/components/input/default/esm2022/textarea/textarea.component.mjs +4 -1
  36. app-ng-runtime/components/input/default/fesm2022/index.mjs +63 -39
  37. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  38. app-ng-runtime/components/input/default/radioset/radioset.component.d.ts +0 -1
  39. app-ng-runtime/components/input/default/select/select.component.d.ts +2 -4
  40. app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +3 -2
  41. app-ng-runtime/components/input/epoch/bundles/index.umd.js +3 -0
  42. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +4 -1
  43. app-ng-runtime/components/input/epoch/fesm2022/index.mjs +3 -0
  44. app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
  45. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +31 -5
  46. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +34 -8
  47. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +32 -6
  48. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  49. app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +6 -2
  50. app-ng-runtime/components/navigation/menu/bundles/index.umd.js +2 -2
  51. app-ng-runtime/components/navigation/menu/esm2022/menu.component.mjs +2 -2
  52. app-ng-runtime/components/navigation/menu/esm2022/nav/nav.component.mjs +2 -2
  53. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs +2 -2
  54. app-ng-runtime/components/navigation/menu/fesm2022/index.mjs.map +1 -1
  55. app-ng-runtime/core/bundles/index.umd.js +6 -16
  56. app-ng-runtime/core/enums/enums.d.ts +1 -2
  57. app-ng-runtime/core/esm2022/enums/enums.mjs +1 -2
  58. app-ng-runtime/core/esm2022/types/types.mjs +1 -4
  59. app-ng-runtime/core/esm2022/utils/build-utils.mjs +1 -6
  60. app-ng-runtime/core/esm2022/utils/utils.mjs +4 -3
  61. app-ng-runtime/core/fesm2022/index.mjs +4 -12
  62. app-ng-runtime/core/fesm2022/index.mjs.map +1 -1
  63. app-ng-runtime/core/types/types.d.ts +1 -5
  64. app-ng-runtime/core/utils/utils.d.ts +1 -0
  65. app-ng-runtime/mobile/core/bundles/index.umd.js +18 -2
  66. app-ng-runtime/mobile/core/esm2022/native.xhr.mjs +19 -3
  67. app-ng-runtime/mobile/core/fesm2022/index.mjs +18 -2
  68. app-ng-runtime/mobile/core/fesm2022/index.mjs.map +1 -1
  69. app-ng-runtime/package.json +1 -1
  70. app-ng-runtime/runtime/base/bundles/index.umd.js +5 -288
  71. app-ng-runtime/runtime/base/esm2022/public_api.mjs +1 -2
  72. app-ng-runtime/runtime/base/esm2022/runtime-base.module.mjs +1 -6
  73. app-ng-runtime/runtime/base/esm2022/services/i18n.service.mjs +2 -2
  74. app-ng-runtime/runtime/base/esm2022/types/types.mjs +1 -2
  75. app-ng-runtime/runtime/base/fesm2022/index.mjs +4 -287
  76. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
  77. app-ng-runtime/runtime/base/public_api.d.ts +0 -1
  78. app-ng-runtime/runtime/base/runtime-base.module.d.ts +8 -9
  79. app-ng-runtime/runtime/base/types/types.d.ts +1 -2
  80. app-ng-runtime/runtime/dynamic/bundles/index.umd.js +9 -27
  81. app-ng-runtime/runtime/dynamic/esm2022/app/app.module.mjs +2 -5
  82. app-ng-runtime/runtime/dynamic/esm2022/app/services/component-ref-provider.service.mjs +7 -23
  83. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs +7 -26
  84. app-ng-runtime/runtime/dynamic/fesm2022/index.mjs.map +1 -1
  85. app-ng-runtime/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -1
  86. app-ng-runtime/scripts/datatable/datatable.js +6 -3
  87. app-ng-runtime/scripts/summernote/dist/summernote-lite.min.js +2 -3
  88. app-ng-runtime/transpiler/bundles/index.umd.js +0 -5
  89. app-ng-runtime/transpiler/esm2022/build.mjs +1 -4
  90. app-ng-runtime/transpiler/esm2022/imports.mjs +1 -3
  91. app-ng-runtime/transpiler/fesm2022/index.mjs +0 -5
  92. app-ng-runtime/transpiler/fesm2022/index.mjs.map +1 -1
  93. app-ng-runtime/build-task/advanced/custom-widget-container/custom-widget-container.build.d.ts +0 -2
  94. app-ng-runtime/build-task/advanced/custom-widget-wrapper/custom-widget-wrapper.build.d.ts +0 -2
  95. app-ng-runtime/build-task/esm2022/advanced/custom-widget-container/custom-widget-container.build.mjs +0 -15
  96. app-ng-runtime/build-task/esm2022/advanced/custom-widget-wrapper/custom-widget-wrapper.build.mjs +0 -26
  97. app-ng-runtime/components/advanced/custom/.npmignore +0 -2
  98. app-ng-runtime/components/advanced/custom/bundles/index.umd.js +0 -232
  99. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +0 -19
  100. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget.props.d.ts +0 -2
  101. app-ng-runtime/components/advanced/custom/custom-widget-prop.d.ts +0 -1
  102. app-ng-runtime/components/advanced/custom/custom-widget.directive.d.ts +0 -19
  103. app-ng-runtime/components/advanced/custom/custom-widget.module.d.ts +0 -10
  104. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +0 -102
  105. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget.props.mjs +0 -12
  106. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-prop.mjs +0 -8
  107. app-ng-runtime/components/advanced/custom/esm2022/custom-widget.directive.mjs +0 -68
  108. app-ng-runtime/components/advanced/custom/esm2022/custom-widget.module.mjs +0 -32
  109. app-ng-runtime/components/advanced/custom/esm2022/index.mjs +0 -5
  110. app-ng-runtime/components/advanced/custom/esm2022/public_api.mjs +0 -4
  111. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +0 -215
  112. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +0 -1
  113. app-ng-runtime/components/advanced/custom/index.d.ts +0 -5
  114. app-ng-runtime/components/advanced/custom/package.json +0 -23
  115. app-ng-runtime/components/advanced/custom/public_api.d.ts +0 -3
  116. app-ng-runtime/components/base/esm2022/widgets/common/base/custom-widget-container.directive.mjs +0 -39
  117. app-ng-runtime/components/base/widgets/common/base/custom-widget-container.directive.d.ts +0 -14
  118. app-ng-runtime/runtime/base/components/base-custom-widget.component.d.ts +0 -72
  119. app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +0 -288
@@ -136,10 +136,9 @@ export class BaseComponent {
136
136
  }
137
137
  else {
138
138
  this.delayedInit = true;
139
- initPromise.then((resolveFn) => {
139
+ initPromise.then(() => {
140
140
  this.initWidget();
141
141
  this.setInitProps();
142
- resolveFn && resolveFn();
143
142
  });
144
143
  }
145
144
  if (explicitContext) {
@@ -349,12 +348,11 @@ export class BaseComponent {
349
348
  * @param {string} eventName
350
349
  * @param {string} expr
351
350
  */
352
- processEventAttr(eventName, expr, meta, child) {
351
+ processEventAttr(eventName, expr, meta) {
353
352
  const fn = $parseEvent(expr);
354
353
  const locals = this.context;
355
- locals.widget = child ? child.widget : this.widget;
356
- const boundFn = fn.bind(undefined, child ? this.viewParent.viewParent : this.viewParent, locals);
357
- let widget = child ? child.widget : this, nativeElement = child ? child.nativeElement : this.nativeElement;
354
+ locals.widget = this.widget;
355
+ const boundFn = fn.bind(undefined, this.viewParent, locals);
358
356
  const eventCallback = () => {
359
357
  let boundFnVal;
360
358
  $invokeWatchers(true);
@@ -374,32 +372,24 @@ export class BaseComponent {
374
372
  console.error(e);
375
373
  }
376
374
  };
377
- if (child && !child.widget.eventHandlers)
378
- child.widget.eventHandlers = new Map();
379
- widget.eventHandlers.set(this.getMappedEventName(eventName), { callback: eventCallback, locals });
375
+ this.eventHandlers.set(this.getMappedEventName(eventName), { callback: eventCallback, locals });
380
376
  // prepend eventName with on and convert it to camelcase.
381
377
  // eg, "click" ---> onClick
382
378
  const onEventName = camelCase(`on-${eventName}`);
383
379
  // save the eventCallback in widgetScope.
384
- widget[onEventName] = eventCallback;
380
+ this[onEventName] = eventCallback;
385
381
  // events needs to be setup after viewInit
386
382
  this.toBeSetupEventsQueue.push(() => {
387
- this.handleEvent(nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);
383
+ this.handleEvent(this.nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);
388
384
  });
389
385
  }
390
386
  /**
391
387
  * Process the bound property
392
388
  * Register a watch on the bound expression
393
389
  */
394
- processBindAttr(propName, expr, child) {
395
- if (!child)
396
- this.initState.delete(propName);
397
- let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent, context = child ? child.widget.context : this.context, widget = child ? child.widget : this.widget, isMuted = child ? child.widget.isMuted : this.isMuted, widgetProps = child ? child.widget.widgetProps : this.widgetProps, widgetId = child ? child.widget.widgetId : this.widgetId;
398
- this.registerDestroyListener($watch(expr, viewParent, context, nv => {
399
- if (propName.startsWith('base-'))
400
- widget.updateData(propName, nv);
401
- widget[propName] = nv;
402
- }, getWatchIdentifier(widgetId, propName), propName === 'datasource', widgetProps.get(propName), () => isMuted));
390
+ processBindAttr(propName, expr) {
391
+ this.initState.delete(propName);
392
+ this.registerDestroyListener($watch(expr, this.viewParent, this.context, nv => this.widget[propName] = nv, getWatchIdentifier(this.widgetId, propName), propName === 'datasource', this.widgetProps.get(propName), () => this.isMuted));
403
393
  }
404
394
  /**
405
395
  * Remove watch on the bound property
@@ -428,7 +418,7 @@ export class BaseComponent {
428
418
  * and keep in eventHandlers
429
419
  * If the attribute is a bound expression, register a watch on the expression
430
420
  */
431
- processAttr(attrName, attrValue, child) {
421
+ processAttr(attrName, attrValue) {
432
422
  // console.log("====attrName=====", attrName, "=====typeof attrname=====", typeof attrName, "-----attrValue----", attrValue);
433
423
  const { 0: propName, 1: type, 2: meta, length } = attrName.split('.');
434
424
  if (type === 'bind') {
@@ -436,10 +426,10 @@ export class BaseComponent {
436
426
  if (propName === 'show') {
437
427
  this.nativeElement.hidden = true;
438
428
  }
439
- this.processBindAttr(propName, attrValue, child);
429
+ this.processBindAttr(propName, attrValue);
440
430
  }
441
- else if (type === 'event' && !this.nativeElement.hasAttribute('customwidgetcontainer')) {
442
- this.processEventAttr(propName, attrValue, meta, child);
431
+ else if (type === 'event') {
432
+ this.processEventAttr(propName, attrValue, meta);
443
433
  }
444
434
  else if (length === 1) {
445
435
  // remove class and name attributes. Component will set them on the proper node
@@ -647,4 +637,4 @@ export class BaseComponent {
647
637
  }, {
648
638
  type: Optional
649
639
  }] }, { type: Promise }], null); })();
650
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL2Jhc2Uvc3JjL3dpZGdldHMvY29tbW9uL2Jhc2UvYmFzZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUdILFVBQVUsRUFDVixNQUFNLEVBQ04sTUFBTSxFQUNOLFVBQVUsRUFDVixRQUFRLEVBR1IsUUFBUSxFQUNSLGdCQUFnQixFQUNuQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sMkJBQTJCLENBQUM7QUFFdkQsT0FBTyxFQUFDLGFBQWEsRUFBRSxPQUFPLEVBQUMsTUF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RoaXMudmlld1BhcmVudC53aWRnZXRUeXBlICE9PSAnd20tcGFydGlhbGRpYWxvZycpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdQYXJlbnQgPSB0aGlzLnZpZXdQYXJlbnQudmlld1BhcmVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIWhhc0ltcGxpY2l0Q29udGV4dCB8fCAoIXRoaXMudmlld1BhcmVudC53aWRnZXRUeXBlKSkge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gKHRoaXMudmlld0NvbnRhaW5lclJlZiBhcyBhbnkpLl9ob3N0TFZpZXcuZmluZCh0ID0+IHQgJiYgISF0LiRpbXBsaWNpdCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSAodGhpcy52aWV3Q29udGFpbmVyUmVmIGFzIGFueSkucGFyZW50SW5qZWN0b3IuX2xWaWV3WzhdO1xuICAgICAgICB9Ki9cblxuICAgICAgICAvKmlmKF92aWV3UGFyZW50ICYmICFoYXNJbXBsaWNpdENvbnRleHQpIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9ICh0aGlzLnZpZXdDb250YWluZXJSZWYgYXMgYW55KS5faG9zdExWaWV3WzhdO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gaGFzSW1wbGljaXRDb250ZXh0O1xuICAgICAgICB9Ki9cbiAgICAgICAgLy8gaWYgKFsnd20tbGlzdCcsICd3bS1uYXYnXS5pbmNsdWRlcyh0aGlzLnZpZXdQYXJlbnQud2lkZ2V0VHlwZSkgfHwgWyd3bS1jYXJvdXNlbC10ZW1wbGF0ZScsICd3bS1jYXJkJ10uaW5jbHVkZXModGhpcy53aWRnZXRUeXBlKSkge1xuICAgICAgICAvLyAgICAgdGhpcy5jb250ZXh0ID0gKHRoaXMudmlld0NvbnRhaW5lclJlZiBhcyBhbnkpLl9ob3N0TF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ICAgdGhpcy5yZWdpc3RlclByb3BlcnR5Q2hhbmdlTGlzdGVuZXIodGhpcy5vblByb3BlcnR5Q2hhbmdlLCB0aGlzKTtcblxuICAgICAgICAvLyBpZiB0aGUgaW5pdFByb21pc2UgaXMgcHJvdmlkZWQsIHdhaXQgdGlsbCB0aGUgcHJvbWlzZSBpcyByZXNvbHZlZCB0byBwcm9jZWVkIHdpdGggdGhlIHdpZGdldCBpbml0aWFsaXphdGlvblxuICAgICAgICBpZiAoIWluaXRQcm9taXNlKSB7XG4gICAgICAgICAgICB0aGlzLmluaXRXaWRnZXQoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuZGVsYXllZEluaXQgPSB0cnVlO1xuICAgICAgICAgICAgaW5pdFByb21pc2UudGhlbigocmVzb2x2ZUZuKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5pbml0V2lkZ2V0KCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRJbml0UHJvcHMoKTtcbiAgICAgICAgICAgICAgICByZXNvbHZlRm4gJiYgcmVzb2x2ZUZuKClcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGlmKGV4cGxpY2l0Q29udGV4dCkge1xuICAgICAgICAgICAgZXh0ZW5kKHRoaXMuY29udGV4dCwgZXhwbGljaXRDb250ZXh0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHB1YmxpYyBnZXROYXRpdmVFbGVtZW50KCk6IEhUTUxFbGVtZW50IHtcbiAgICAgICAgcmV0dXJuIHRoaXMubmF0aXZlRWxlbWVudDtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0V2lkZ2V0VHlwZSgpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy53aWRnZXRUeXBlO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRXaWRnZXRTdWJUeXBlKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLndpZGdldFN1YlR5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AgfVxuXG4gICAgcHJvdGVjdGVkIGluaXRDb250ZXh0KCkge1xuICAgICAgICAvLyBjb25zdCBjb250ZXh0ID0gKHRoaXMuaW5qIGFzIGFueSkudmlldy5jb250ZXh0O1xuICAgICAgICBjb25zdCBjb250ZXh0ID0gdGhpcy5jb250ZXh0IHx8IHt9O1xuXG4gICAgICAgIGNvbnN0IHBhcmVudENvbnRleHRzID0gdGhpcy5pbmouZ2V0KENvbnRleHQsIHt9KTtcblxuICAgICAgICAvLyBhc3NpZ24gdGhlIGNvbnRleHQgcHJvcGVydHkgYWNjb3JkaW5nbHlcbiAgICAgICAgaWYgKHRoaXMudmlld1BhcmVudCAhPT0gY29udGV4dCkge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gY29udGV4dDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHBhcmVudENvbnRleHRzKSB7XG4gICAgICAgICAgICBsZXQgcGFyZW50Q29udGV4dE9iaiA9IHt9O1xuICAgICAgICAgICAgaWYgKGlzQXJyYXkocGFyZW50Q29udGV4dHMpKSB7XG4gICAgICAgICAgICAgICAgZm9yRWFjaChwYXJlbnRDb250ZXh0cywgKGNvbnRleHRPYmopID0+IHtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihwYXJlbnRDb250ZXh0T2JqLCBjb250ZXh0T2JqKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Q29udGV4dE9iaiA9IHBhcmVudENvbnRleHRzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gT2JqZWN0LmFzc2lnbih7fSwgcGFyZW50Q29udGV4dE9iaiwgdGhpcy5jb250ZXh0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHNld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NvbW1vbiBmdW5jdGlvbmFsaXR5IGFjcm9zcyB0aGUgY29tcG9uZW50c1xuICAgICAqIGVnLFxuICAgICAqICAxLiB2YWx1ZSBvZiB0aGUgY2xhc3MgcHJvcGVydHkgd2lsbCBiZSBhcHBsaWVkIG9uIHRoZSBob3N0IGVsZW1lbnRcbiAgICAgKiAgMi4gYmFzZWQgb24gdGhlIHZhbHVlIG9mIHNob3cgcHJvcGVydHkgY29tcG9uZW50IGlzIHNob3duL2hpZGRlblxuICAgICAqXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IGtleVxuICAgICAqIEBwYXJhbSBudlxuICAgICAqIEBwYXJhbSBvdlxuICAgICAqL1xuICAgIHByb3RlY3RlZCBvblByb3BlcnR5Q2hhbmdlKGtleTogc3RyaW5nLCBudjogYW55LCBvdj86IGFueSkge1xuICAgICAgICBpZiAoa2V5ID09PSAnc2hvdycpIHtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5oaWRkZW4gPSAhbnY7XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnaGludCcpIHtcbiAgICAgICAgICAgIGlmICghaXNNb2JpbGVBcHAoKSkge1xuICAgICAgICAgICAgICAgIHNldEF0dHIodGhpcy5uYXRpdmVFbGVtZW50LCAndGl0bGUnLCBudik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnY2xhc3MnKSB7XG4gICAgICAgICAgICBzd2l0Y2hDbGFzcyh0aGlzLm5hdGl2ZUVsZW1lbnQsIG52LCBvdik7XG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gbnYubWF0Y2goLyhcXFd8XikoaChbMC02XSkpKD89XFxzfCQpLyk7XG4gICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgc2V0QXR0cih0aGlzLm5hdGl2ZUVsZW1lbnQsICdyb2xlJywgJ2hlYWRpbmcnKTtcbiAgICAgICAgICAgICAgICBzZXRBdHR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ge1xuICAgICAgICB0aGlzLnJlZ2lzdGVyRGVzdHJveUxpc3RlbmVyKHJlZ2lzdGVyKHRoaXMud2lkZ2V0LCB0aGlzLnZpZXdQYXJlbnQsIHRoaXMud2lkZ2V0SWQsIHdpZGdldE5hbWUpKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBvdmVycmlkZSB0aGVcbiAgICAgKi9cbiAgICBwcm90ZWN0ZWQgZ2V0TWFwcGVkRXZlbnROYW1lKGV2ZW50TmFtZSkge1xuICAgICAgICByZXR1cm4gRVZFTlRTX01BUC5nZXQoZXZlbnROYW1lKSB8fCBldmVudE5hbWU7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogaW52b2tlIHRoZSBldmVudCBoYW5kbGVyXG4gICAgICogQ29tcG9uZW50cyBjYW4gb3ZlcnJpZGUgdGhpcyBtZXRob2QgdG8gZXhlY3V0ZSBjdXN0b20gbG9naWMgYmVmb3JlIGludm9raW5nIHRoZSB1c2VyIGNhbGxiYWNrXG4gICAgICovXG4gICAgcHJvdGVjdGVkIGhhbmRsZUV2ZW50KG5vZGU6IEhUTUxFbGVtZW50LCBldmVudE5hbWU6IHN0cmluZywgZXZlbnRDYWxsYmFjazogRnVuY3Rpb24sIGxvY2FsczogYW55LCBtZXRhPzogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMuZXZlbnRNYW5hZ2VyLmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgZXZlbnROYW1lLFxuICAgICAgICAgICAgZSA9PiB7XG4gICAgICAgICAgICAgICAgbG9jYWxzLiRldmVudCA9IGU7XG4gICAgICAgICAgICAgICAgaWYgKG1ldGEgPT09ICdkZWxheWVkJykge1xuICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gZXZlbnRDYWxsYmFjaygpLCAxNTApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBldmV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hdGl2ZUVsZW1lbnQgOiB0aGlzLm5hdGl2ZUVsZW1lbnQ7XG5cbiAgICAgICAgY29uc3QgZXZlbnRDYWxsYmFjayA9ICgpID0+IHtcbiAgICAgICAgICAgIGxldCBib3VuZEZuVmFsO1xuICAgICAgICAgICAgJGludm9rZVdhdGNoZXJzKHRydWUpO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBsb2NhbHMuJGV2ZW50ID0gbG9jYWxzLiRldmVudCB8fCBuZXcgd2luZG93LkN1c3RvbUV2ZW50KGV2ZW50TmFtZSk7XG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlIGV2ZW50IGlzIGJvdW5kIGRpcmVjdGx5IHRvIHRoZSB2YXJpYWJsZSB0aGVuIHdlIG5lZWQgdG8gaW50ZXJuYWxseSBoYW5kbGVcbiAgICAgICAgICAgICAgICAvLyB0aGUgcHJvbWlzZSByZXR1cm5lZCBieSB0aGUgdmFyaWFibGUgY2FsbC5cbiAgICAgICAgICAgICAgICBib3VuZEZuVmFsID0gYm91bmRGbigpO1xuICAgICAgICAgICAgICAgIGlmIChib3VuZEZuVmFsIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICBib3VuZEZuVmFsLnRoZW4oIHJlc3BvbnNlID0+IHJlc3BvbnNlLCBlcnIgPT4gZXJyKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYm91bmRGblZhbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgaWYoY2hpbGQgJiYgIWNoaWxkLndpZGdldC5ldmVudEhhbmRsZXJzKVxuICAgICAgICAgICAgY2hpbGQud2lkZ2V0LmV2ZW50SGFuZGxlcnMgPSBuZXcgTWFwPHN0c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ZCA/OiBhbnkpIHtcbiAgICAgICAgaWYoIWNoaWxkKVxuICAgICAgICAgICAgdGhpcy5pbml0U3RhdGUuZGVsZXRlKHByb3BOYW1lKTtcbiAgICAgICAgbGV0IHZpZXdQYXJlbnQgID0gY2hpbGQgPyBjaGlsZC53aWRnZXQudmlld1BhcmVudC52aWV3UGFyZW50IDogdGhpcy52aWV3UGFyZW50LFxuICAgICAgICAgICAgY29udGV4dCAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldC5jb250ZXh0IDogdGhpcy5jb250ZXh0LFxuICAgICAgICAgICAgd2lkZ2V0ICAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldCA6IHRoaXMud2lkZ2V0LFxuICAgICAgICAgICAgaXNNdXRlZCAgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldC5pc011dGVkIDogdGhpcy5pc011dGVkLFxuICAgICAgICAgICAgd2lkZ2V0UHJvcHMgPSBjaGlsZCA/IGNoaWxkLndpZGdldC53aWRnZXRQcm9wcyA6IHRoaXMud2lkZ2V0UHJvcHMsXG4gICAgICAgICAgICB3aWRnZXRJZCAgICA9IGNoaWxkID8gY2hpbGQud2lkZ2V0LndpZGdldElkIDogdGhpcy53aWRnZXRJZDtcbiAgICAgICAgdGhpcy5yZWdpc3RlckRlc3Ryb3lMaXN0ZW5lcihcbiAgICAgICAgICAgICR3YXRjaChcbiAgICAgICAgICAgICAgICBleHByLFxuICAgICAgICAgICAgICAgIHZpZXdQYXJlbnQsXG4gICAgICAgICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICAgICAgICBudiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmKHByb3BOYW1lLnN0YXJ0c1dpdGgoJ2Jhc2UtJykpXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWRnZXQudXBkYXRlRGF0YShwcm9wTmFtZSwgbnYpO1xuICAgICAgICAgICAgICAgICAgICB3aWRnZXRbcHJvcE5hbWVdID0gbnZcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdldFdhdGNoSWRlbnRpZmllcih3aWRnZXRJZCwgcHJvcE5hbWUpLFxuICAgICAgICAgICAgICAgIHByb3BOYW1lID09PSAnZGF0YXNvdXJjZScsXG4gICAgICAgICAgICAgICAgd2lkZ2V0UHJvcHMuZ2V0KHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICAoKSA9PiBpc011dGVkXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVtb3ZlIHdhdGNoIG9uIHRoZSBib3VuZCBwcm9wZXJ0eVxuICAgICAqL1xuICAgIHByb3RlY3RlZCByZW1vdmVQcm9wZXJ0eUJpbmRpbmcocHJvcE5hbWU6IHN0cmluZykge1xuICAgICAgICAkdW53YXRjaChnZXRXYXRjaElkZW50aWZpZXIodGhpcy53aWRnZXRJZCwgcHJvcE5hbWUpKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBpbnZva2UgdGhlIGV2ZW50IGNhbGxiYWNrIG1ldGhvZFxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldmVudE5hbWVcbiAgICAgKiBAcGFyYW0gZXh0cmFMb2NhbHNcbiAgICAgKi9cbiAgICBwdWJsaWMgaW52b2tlRXZlbnRDYWxsYmFjayhldmVudE5hbWU6IHN0cmluZywgZXh0cmFMb2NhbHM/OiBhbnkpIHtcbiAgICAgICAgY29uc3QgY2FsbGJhY2tJbmZvID0gdGhpcy5ldmVudEhhbmRsZXJzLmdldChldmVudE5hbWUpO1xuICAgICAgICBpZiAoY2FsbGJhY2tJbmZvKSB7XG4gICAgICAgICAgICBjb25zdCBmbiA9IGNhbGxiYWNrSW5mby5jYWxsYmFjaztcbiAgICAgICAgICAgIGNvbnN0IGxvY2FscyA9IGNhbGxiYWNrSW5mby5sb2NhbHMgfHwge307XG5cbiAgICAgICAgICAgIGlmIChmbikge1xuICAgICAgICAgICAgICAgIHJldHVybiBmbihPYmplY3QuYXNz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AgICAgICAgdGhpcy5zZXRJbml0UHJvcHMoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJlZ2lzdGVyIHRoZSBldmVudHNcbiAgICAgKi9cbiAgICBuZ0FmdGVyVmlld0luaXQoKSB7XG4gICAgICAgIGlmICh0aGlzLnRvQmVTZXR1cEV2ZW50c1F1ZXVlLmxlbmd0aCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBmbiBvZiB0aGlzLnRvQmVTZXR1cEV2ZW50c1F1ZXVlKSB7XG4gICAgICAgICAgICAgICAgZm4oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnRvQmVTZXR1cEV2ZW50c1F1ZXVlLmxlbmd0aCA9IDA7XG4gICAgICAgIHRoaXMuaXNBdHRhY2hlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgbmdBZnRlckNvbnRlbnRJbml0KCkge31cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLmlzRGVzdHJveWVkID0gdHJ1ZTtcbiAgICAgICAgdGhpcy53aWRnZXQgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgICB0aGlzLnN0eWxlQ2hhbmdlLmNvbXBsZXRlKCk7XG4gICAgICAgIHRoaXMucHJvcGVydHlDaGFuZ2UuY29tcGxldGUoKTtcbiAgICAgICAgdGhpcy5kZXN0cm95LmNvbXBsZXRlKCk7XG4gICAgICAgIHRoaXMuaXNBdHRhY2hlZCA9IGZhbHNlO1xuICAgIH1cbn1cbiJdfQ==
640
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL2Jhc2Uvc3JjL3dpZGdldHMvY29tbW9uL2Jhc2UvYmFzZS5jb21wb25l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5faG9zdExWaWV3LmZpbmQodCA9PiB0ICYmICEhdC4kaW1wbGljaXQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gKHRoaXMudmlld0NvbnRhaW5lclJlZiBhcyBhbnkpLnBhcmVudEluamVjdG9yLl9sVmlld1s4XTtcbiAgICAgICAgfSovXG5cbiAgICAgICAgLyppZihfdmlld1BhcmVudCAmJiAhaGFzSW1wbGljaXRDb250ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSAodGhpcy52aWV3Q29udGFpbmVyUmVmIGFzIGFueSkuX2hvc3RMVmlld1s4XTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IGhhc0ltcGxpY2l0Q29udGV4dDtcbiAgICAgICAgfSovXG4gICAgICAgIC8vIGlmIChbJ3dtLWxpc3QnLCAnd20tbmF2J10uaW5jbHVkZXModGhpcy52aWV3UGFyZW50LndpZGdldFR5cGUpIHx8IFsnd20tY2Fyb3VzZWwtdGVtcGxhdGUnLCAnd20tY2FyZCddLmluY2x1ZGVzKHRoaXMud2lkZ2V0VHlwZSkpIHtcbiAgICAgICAgLy8gICAgIHRoaXMuY29udGV4dCA9ICh0aGlzLnZpZXdDb250YWluZXJSZWYgYXMgYW55KS5faG9zdExWaWV3LmRlYnVnLmNvbnRleHQ7XG4gICAgICAgIC8vIH0gZWxzZSB7XG4gICAgICAgIC8vICAgICB0aGlzLmNvbnRleHQgPSAodGhpcy52aWV3Q29udGFpbmVyUmVmIGFzIGFueSkucGFyZW50SW5qZWN0b3IuX2xWaWV3WzhdO1xuICAgICAgICAvLyB9XG4gICAgICAgIHRoaXMud2lkZ2V0ID0gdGhpcy5jcmVhdGVQcm94eSgpO1xuICAgICAgICB0aGlzLmV2ZW50TWFuYWdlciA9IGluai5nZXQoRXZlbnRNYW5hZ2VyKTtcbiAgICAgICAgKHRoaXMubmF0aXZlRWxlbWVudCBhc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V4dCA9IGNvbnRleHQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSB7fTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChwYXJlbnRDb250ZXh0cykge1xuICAgICAgICAgICAgbGV0IHBhcmVudENvbnRleHRPYmogPSB7fTtcbiAgICAgICAgICAgIGlmIChpc0FycmF5KHBhcmVudENvbnRleHRzKSkge1xuICAgICAgICAgICAgICAgIGZvckVhY2gocGFyZW50Q29udGV4dHMsIChjb250ZXh0T2JqKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24ocGFyZW50Q29udGV4dE9iaiwgY29udGV4dE9iaik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHBhcmVudENvbnRleHRPYmogPSBwYXJlbnRDb250ZXh0cztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY29udGV4dCA9IE9iamVjdC5hc3NpZ24oe30sIHBhcmVudENvbnRleHRPYmosIHRoaXMuY29udGV4dCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBzZXQgdGhlIHZhbHVlIG9uIHRoZSBwcm94eSBvYmplY3QgaWUsIHdpZGdldFxuICAgICAqIHNldHRpbmcgdGhlIHByb3BlcnR5IG9uIHRoZSBwcm94eSB3aWxsIGludm9rZSB0aGUgY2hhbmdlIGxpc3RlbmVyc1xuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXlcbiAgICAgKiBAcGFyYW0gdmFsdWVcbiAgICAgKi9cbiAgICBwdWJsaWMgc2V0V2lkZ2V0UHJvcGVydHkoa2V5OiBzdHJpbmcsIHZhbHVlOiBhbnkpIHtcbiAgICAgICAgdGhpcy53aWRnZXRba2V5XSA9IHZhbHVlO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRBdHRyKGF0dHJOYW1lOiBzdHJpb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25Qcm9wZXJ0eUNoYW5nZShrZXk6IHN0cmluZywgbnY6IGFueSwgb3Y/OiBhbnkpIHtcbiAgICAgICAgaWYgKGtleSA9PT0gJ3Nob3cnKSB7XG4gICAgICAgICAgICB0aGlzLm5hdGl2ZUVsZW1lbnQuaGlkZGVuID0gIW52O1xuICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gJ2hpbnQnKSB7XG4gICAgICAgICAgICBpZiAoIWlzTW9iaWxlQXBwKCkpIHtcbiAgICAgICAgICAgICAgICBzZXRBdHRyKHRoaXMubmF0aXZlRWxlbWVudCwgJ3RpdGxlJywgbnYpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gJ2NsYXNzJykge1xuICAgICAgICAgICAgc3dpdGNoQ2xhc3ModGhpcy5uYXRpdmVFbGVtZW50LCBudiwgb3YpO1xuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IG52Lm1hdGNoKC8oXFxXfF4pKGgoWzAtNl0pKSg/PVxcc3wkKS8pO1xuICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIHNldEF0dHIodGhpcy5uYXRpdmVFbGVtZW50LCAncm9sZScsICdoZWFkaW5nJyk7XG4gICAgICAgICAgICAgICAgc2V0QXR0cih0aGlzLm5hdGl2ZUVsZW1lbnQsICdhcmlhLWxldmVsJywgcmVzdWx0WzNdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChrZXkgPT09ICduYW1lJyB8fCBrZXkgPT09ICd0YWJpbmRleCcpIHtcbiAgICAgICAgICAgIHNldEF0dHIodGhpcy5uYXRpdmVFbGVtZW50LCBrZXksIG52KTtcbiAgICAgICAgICAgIGlmIChrZXkgPT09ICduYW1lJyAmJiBudikge1xuICAgICAgICAgICAgICAgIHJlbmFtZVdpZGdldCh0aGlzLnZpZXdQYXJlbnQsIHRoaXMud2lkZ2V0LCBudiwgb3YpO1xuICAgICAgICAgICAgf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H0pO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFByb2Nlc3MgdGhlIGJvdW5kIHByb3BlcnR5XG4gICAgICogUmVnaXN0ZXIgYSB3YXRjaCBvbiB0aGUgYm91bmQgZXhwcmVzc2lvblxuICAgICAqL1xuICAgIHByb3RlY3RlZCBwcm9jZXNzQmluZEF0dHIocHJvcE5hbWU6IHN0cmluZywgZXhwcjogc3RyaW5nKSB7XG5cbiAgICAgICAgdGhpcy5pbml0U3RhdGUuZGVsZXRlKHByb3BOYW1lKTtcbiAgICAgICAgdGhpcy5yZWdpc3RlckRlc3Ryb3lMaXN0ZW5lcihcbiAgICAgICAgICAgICR3YXRjaChcbiAgICAgICAgICAgICAgICBleHByLFxuICAgICAgICAgICAgICAgIHRoaXMudmlld1BhcmVudCxcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRleHQsXG4gICAgICAgICAgICAgICAgbnYgPT4gdGhpcy53aWRnZXRbcHJvcE5hbWVdID0gbnYsXG4gICAgICAgICAgICAgICAgZ2V0V2F0Y2hJZGVudGlmaWVyKHRoaXMud2lkZ2V0SWQsIHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICBwcm9wTmFtZSA9PT0gJ2RhdGFzb3VyY2UnLFxuICAgICAgICAgICAgICAgIHRoaXMud2lkZ2V0UHJvcHMuZ2V0KHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICAoKSA9PiB0aGlzLmlzTXV0ZWRcbiAgICAgICAgICAgIClcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZW1vdmUgd2F0Y2ggb24gdGhlIGJvdW5kIHByb3BlcnR5XG4gICAgICovXG4gICAgcHJvdGVjdGVkIHJlbW92ZVByb3BlcnR5QmluZGluZyhwcm9wTmFtZTogc3RyaW5nKSB7XG4gICAgICAgICR1bndhdGNoKGdldFdhdGNoSWRlbnRpZmllcih0aGlzLndpZGdldElkLCBwcm9wTmFtZSkpO1xuICAgIH1cblxuICAgIC8qK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lbiBpbmRleDoga2V5LCBvZGQgaW5kZXg6IHZhbHVlKVxuICAgICAqL1xuICAgIHByaXZhdGUgZ2V0QXR0cmlidXRlcygpIHtcbiAgICAgICAgbGV0IF90Tm9kZUF0dHJzID0gKHRoaXMuaW5qIGFzIGFueSkuX3ROb2RlLmF0dHJzLCBhY3R1YWxBdHRycyA9IEFycmF5LmZyb20odGhpcy5uYXRpdmVFbGVtZW50LmF0dHJpYnV0ZXMpLm1hcChhdHRyID0+IGF0dHIubmFtZSk7XG4gICAgICAgIGlmKF90Tm9kZUF0dHJzID09PSBudWxsKSB7XG4gICAgICAgICAgICByZXR1cm4gYWN0dWFsQXR0cnMuc29ydCgpO1xuICAgICAgICB9XG4gICAgICAgIGZvckVhY2goX3ROb2RlQXR0cnMsIChhdHRyLCBpOiBhbnkpID0+IHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgYXR0ciA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZih0eXBlb2YgYXR0ciA9PT0gJ3N0cmluZycgJiYgaSAlIDIgPT0gMCkge1xuICAgICAgICAgICAgICAgIGxldCBsb3dlckNhc2VBdHRyID0gYXR0ci50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgICAgIGlmIChhY3R1YWxBdHRycy5pbmNsdWRlcyhsb3dlckNhc2VBdHRyKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBhY3R1YWxBdHRycy5pbmRleE9mKGxvd2VyQ2FzZUF0dHIpXG4gICAgICAgICAgICAgICAgICAgIGFjdHVhbEF0dHJzW2luZGV4XSA9IGF0dHI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICAvKlxuICAgICAgICBTb3J0aW5nIGF0dHJpYnV0ZXMgYXMgcHJvcGVydGllcyBsaWtlIHBsYWNlaG9sZGVyIGlzI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oYW5nZS5jb21wbGV0ZSgpO1xuICAgICAgICB0aGlzLnByb3BlcnR5Q2hhbmdlLmNvbXBsZXRlKCk7XG4gICAgICAgIHRoaXMuZGVzdHJveS5jb21wbGV0ZSgpO1xuICAgICAgICB0aGlzLmlzQXR0YWNoZWQgPSBmYWxzZTtcbiAgICB9XG59XG4iXX0=
@@ -1016,10 +1016,9 @@ class BaseComponent {
1016
1016
  }
1017
1017
  else {
1018
1018
  this.delayedInit = true;
1019
- initPromise.then((resolveFn) => {
1019
+ initPromise.then(() => {
1020
1020
  this.initWidget();
1021
1021
  this.setInitProps();
1022
- resolveFn && resolveFn();
1023
1022
  });
1024
1023
  }
1025
1024
  if (explicitContext) {
@@ -1229,12 +1228,11 @@ class BaseComponent {
1229
1228
  * @param {string} eventName
1230
1229
  * @param {string} expr
1231
1230
  */
1232
- processEventAttr(eventName, expr, meta, child) {
1231
+ processEventAttr(eventName, expr, meta) {
1233
1232
  const fn = $parseEvent(expr);
1234
1233
  const locals = this.context;
1235
- locals.widget = child ? child.widget : this.widget;
1236
- const boundFn = fn.bind(undefined, child ? this.viewParent.viewParent : this.viewParent, locals);
1237
- let widget = child ? child.widget : this, nativeElement = child ? child.nativeElement : this.nativeElement;
1234
+ locals.widget = this.widget;
1235
+ const boundFn = fn.bind(undefined, this.viewParent, locals);
1238
1236
  const eventCallback = () => {
1239
1237
  let boundFnVal;
1240
1238
  $invokeWatchers(true);
@@ -1254,32 +1252,24 @@ class BaseComponent {
1254
1252
  console.error(e);
1255
1253
  }
1256
1254
  };
1257
- if (child && !child.widget.eventHandlers)
1258
- child.widget.eventHandlers = new Map();
1259
- widget.eventHandlers.set(this.getMappedEventName(eventName), { callback: eventCallback, locals });
1255
+ this.eventHandlers.set(this.getMappedEventName(eventName), { callback: eventCallback, locals });
1260
1256
  // prepend eventName with on and convert it to camelcase.
1261
1257
  // eg, "click" ---> onClick
1262
1258
  const onEventName = camelCase(`on-${eventName}`);
1263
1259
  // save the eventCallback in widgetScope.
1264
- widget[onEventName] = eventCallback;
1260
+ this[onEventName] = eventCallback;
1265
1261
  // events needs to be setup after viewInit
1266
1262
  this.toBeSetupEventsQueue.push(() => {
1267
- this.handleEvent(nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);
1263
+ this.handleEvent(this.nativeElement, this.getMappedEventName(eventName), eventCallback, locals, meta);
1268
1264
  });
1269
1265
  }
1270
1266
  /**
1271
1267
  * Process the bound property
1272
1268
  * Register a watch on the bound expression
1273
1269
  */
1274
- processBindAttr(propName, expr, child) {
1275
- if (!child)
1276
- this.initState.delete(propName);
1277
- let viewParent = child ? child.widget.viewParent.viewParent : this.viewParent, context = child ? child.widget.context : this.context, widget = child ? child.widget : this.widget, isMuted = child ? child.widget.isMuted : this.isMuted, widgetProps = child ? child.widget.widgetProps : this.widgetProps, widgetId = child ? child.widget.widgetId : this.widgetId;
1278
- this.registerDestroyListener($watch(expr, viewParent, context, nv => {
1279
- if (propName.startsWith('base-'))
1280
- widget.updateData(propName, nv);
1281
- widget[propName] = nv;
1282
- }, getWatchIdentifier(widgetId, propName), propName === 'datasource', widgetProps.get(propName), () => isMuted));
1270
+ processBindAttr(propName, expr) {
1271
+ this.initState.delete(propName);
1272
+ this.registerDestroyListener($watch(expr, this.viewParent, this.context, nv => this.widget[propName] = nv, getWatchIdentifier(this.widgetId, propName), propName === 'datasource', this.widgetProps.get(propName), () => this.isMuted));
1283
1273
  }
1284
1274
  /**
1285
1275
  * Remove watch on the bound property
@@ -1308,7 +1298,7 @@ class BaseComponent {
1308
1298
  * and keep in eventHandlers
1309
1299
  * If the attribute is a bound expression, register a watch on the expression
1310
1300
  */
1311
- processAttr(attrName, attrValue, child) {
1301
+ processAttr(attrName, attrValue) {
1312
1302
  // console.log("====attrName=====", attrName, "=====typeof attrname=====", typeof attrName, "-----attrValue----", attrValue);
1313
1303
  const { 0: propName, 1: type, 2: meta, length } = attrName.split('.');
1314
1304
  if (type === 'bind') {
@@ -1316,10 +1306,10 @@ class BaseComponent {
1316
1306
  if (propName === 'show') {
1317
1307
  this.nativeElement.hidden = true;
1318
1308
  }
1319
- this.processBindAttr(propName, attrValue, child);
1309
+ this.processBindAttr(propName, attrValue);
1320
1310
  }
1321
- else if (type === 'event' && !this.nativeElement.hasAttribute('customwidgetcontainer')) {
1322
- this.processEventAttr(propName, attrValue, meta, child);
1311
+ else if (type === 'event') {
1312
+ this.processEventAttr(propName, attrValue, meta);
1323
1313
  }
1324
1314
  else if (length === 1) {
1325
1315
  // remove class and name attributes. Component will set them on the proper node
@@ -2100,40 +2090,6 @@ class PartialContainerDirective {
2100
2090
  args: ['content']
2101
2091
  }] }, { type: i0.ComponentFactoryResolver }, { type: i1.PartialRefProvider }], null); })();
2102
2092
 
2103
- class CustomWidgetContainerDirective {
2104
- constructor(componentInstance, vcRef, elRef, inj, app, widgetname, customWidgetRefProvider) {
2105
- this.componentInstance = componentInstance;
2106
- this.vcRef = vcRef;
2107
- this.elRef = elRef;
2108
- this.inj = inj;
2109
- this.app = app;
2110
- this.customWidgetRefProvider = customWidgetRefProvider;
2111
- const widgetnames = this.componentInstance.widgetname;
2112
- this.customWidgetRefProvider.getComponentFactoryRef(widgetname, ComponentType.WIDGET).then((componentFactory) => {
2113
- if (componentFactory) {
2114
- const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);
2115
- this.elRef.nativeElement.appendChild(instanceRef.location.nativeElement);
2116
- }
2117
- });
2118
- }
2119
- static { this.ɵfac = function CustomWidgetContainerDirective_Factory(t) { return new (t || CustomWidgetContainerDirective)(i0.ɵɵdirectiveInject(WidgetRef, 2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1.App), i0.ɵɵinjectAttribute('widgetname'), i0.ɵɵdirectiveInject(i1.CustomWidgetRefProvider)); }; }
2120
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetContainerDirective, selectors: [["", "customWidgetContainer", "", "widgetname", ""]] }); }
2121
- }
2122
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetContainerDirective, [{
2123
- type: Directive,
2124
- args: [{
2125
- selector: '[customWidgetContainer][widgetname]'
2126
- }]
2127
- }], () => [{ type: undefined, decorators: [{
2128
- type: Self
2129
- }, {
2130
- type: Inject,
2131
- args: [WidgetRef]
2132
- }] }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.Injector }, { type: i1.App }, { type: undefined, decorators: [{
2133
- type: Attribute,
2134
- args: ['widgetname']
2135
- }] }, { type: i1.CustomWidgetRefProvider }], null); })();
2136
-
2137
2093
  class ShowInDeviceDirective {
2138
2094
  constructor(viewContainerRef, inj, templateRef, explicitContext) {
2139
2095
  this.viewContainerRef = viewContainerRef;
@@ -3140,7 +3096,6 @@ const wmComponents = [
3140
3096
  PartialParamHandlerDirective,
3141
3097
  PartialParamDirective,
3142
3098
  PartialContainerDirective,
3143
- CustomWidgetContainerDirective,
3144
3099
  RedrawableDirective,
3145
3100
  ShowInDeviceDirective,
3146
3101
  SmoothScrollDirective,
@@ -3208,7 +3163,6 @@ class WmComponentsModule {
3208
3163
  PartialParamHandlerDirective,
3209
3164
  PartialParamDirective,
3210
3165
  PartialContainerDirective,
3211
- CustomWidgetContainerDirective,
3212
3166
  RedrawableDirective,
3213
3167
  ShowInDeviceDirective,
3214
3168
  SmoothScrollDirective,
@@ -3239,7 +3193,6 @@ class WmComponentsModule {
3239
3193
  PartialParamHandlerDirective,
3240
3194
  PartialParamDirective,
3241
3195
  PartialContainerDirective,
3242
- CustomWidgetContainerDirective,
3243
3196
  RedrawableDirective,
3244
3197
  ShowInDeviceDirective,
3245
3198
  SmoothScrollDirective,
@@ -5293,5 +5246,5 @@ const updateDeviceView = (element, isTablet = false) => {
5293
5246
  * Generated bundle index. Do not edit.
5294
5247
  */
5295
5248
 
5296
- export { ALLFIELDS, APPLY_STYLES_TYPE, AUTOCLOSE_TYPE, BaseComponent, BaseContainerComponent, BaseFieldValidations, ContainerDirective, Context, CustomPipe, CustomWidgetContainerDirective, DEBOUNCE_TIMES, DISPLAY_TYPE, DataSetItem, DatasetAwareNavComponent, DialogRef, DialogServiceImpl, EDIT_MODE, EVENTS_MAP, FileExtensionFromMimePipe, FileIconClassPipe, FileSizePipe, FilterPipe, INPUTMODE, ImagePipe, ItemTemplateDirective, LIVE_CONSTANTS, LazyLoadDirective, Live_Operations, MessageComponent, NAVIGATION_TYPE, NumberToStringPipe, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, PROP_TYPE, PartialContainerDirective, PartialDirective, PartialParamDirective, PartialParamHandlerDirective, PrefixPipe, PullToRefresh, RedrawableDirective, RepeatTemplateDirective, SanitizePipe, ShowInDeviceDirective, SmoothScrollDirective, StateClassPipe, StringToNumberPipe, StylableComponent, SuffixPipe, TextContentDirective, TimeFromNowPipe, ToCurrencyPipe, ToDatePipe, ToNumberPipe, TrailingZeroDecimalPipe, TrustAsPipe, WidgetConfig, WidgetRef, WmComponentsModule, applyFilterOnField, configureDnD, convertDataToObject, createArrayFrom, extractDataAsArray, extractDataSourceName, fetchDistinctValues, fetchRelatedFieldData, filterDate, getBackGroundImageUrl, getConditionalClasses, getContainerTargetClass, getDataTableFilterWidget, getDefaultValue, getDefaultViewModeWidget, getDistinctFieldProperties, getDistinctValues, getDistinctValuesForField, getEditModeWidget, getEmptyMatchMode, getEnableEmptyFilter, getEvaluatedData, getFieldLayoutConfig, getFieldTypeWidgetTypesMap, getImageUrl, getKeyboardFocusableElements, getMatchModeMsgs, getMatchModeTypesMap, getObjValueByKey, getOrderByExpr, getOrderedDataset, getRangeFieldValue, getRangeMatchMode, getRowOperationsColumn, getUniqObjsByDataField, getWatchIdentifier, getWidgetPropsByType, groupData, handleHeaderClick, hasLinkToCurrentPage, interpolateBindExpressions, isActiveNavItem, isBooleanAttr, isDataSetWidget, isDimensionProp, isStyle, parseValueByType, performDataOperation, prepareFieldDefs, propNameCSSKeyMap, provideAs, provideAsDialogRef, provideAsWidgetRef, refreshDataSource, register$1 as register, registerFormWidget, setFocusTrap, setHeaderConfig, setHeaderConfigForTable, setItemByCompare, styler, toggleAllHeaders, transformData, transformDataWithKeys, transformFormData, unsupportedStatePersistenceTypes, updateDeviceView, widgetIdGenerator };
5249
+ export { ALLFIELDS, APPLY_STYLES_TYPE, AUTOCLOSE_TYPE, BaseComponent, BaseContainerComponent, BaseFieldValidations, ContainerDirective, Context, CustomPipe, DEBOUNCE_TIMES, DISPLAY_TYPE, DataSetItem, DatasetAwareNavComponent, DialogRef, DialogServiceImpl, EDIT_MODE, EVENTS_MAP, FileExtensionFromMimePipe, FileIconClassPipe, FileSizePipe, FilterPipe, INPUTMODE, ImagePipe, ItemTemplateDirective, LIVE_CONSTANTS, LazyLoadDirective, Live_Operations, MessageComponent, NAVIGATION_TYPE, NumberToStringPipe, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, PROP_TYPE, PartialContainerDirective, PartialDirective, PartialParamDirective, PartialParamHandlerDirective, PrefixPipe, PullToRefresh, RedrawableDirective, RepeatTemplateDirective, SanitizePipe, ShowInDeviceDirective, SmoothScrollDirective, StateClassPipe, StringToNumberPipe, StylableComponent, SuffixPipe, TextContentDirective, TimeFromNowPipe, ToCurrencyPipe, ToDatePipe, ToNumberPipe, TrailingZeroDecimalPipe, TrustAsPipe, WidgetConfig, WidgetRef, WmComponentsModule, applyFilterOnField, configureDnD, convertDataToObject, createArrayFrom, extractDataAsArray, extractDataSourceName, fetchDistinctValues, fetchRelatedFieldData, filterDate, getBackGroundImageUrl, getConditionalClasses, getContainerTargetClass, getDataTableFilterWidget, getDefaultValue, getDefaultViewModeWidget, getDistinctFieldProperties, getDistinctValues, getDistinctValuesForField, getEditModeWidget, getEmptyMatchMode, getEnableEmptyFilter, getEvaluatedData, getFieldLayoutConfig, getFieldTypeWidgetTypesMap, getImageUrl, getKeyboardFocusableElements, getMatchModeMsgs, getMatchModeTypesMap, getObjValueByKey, getOrderByExpr, getOrderedDataset, getRangeFieldValue, getRangeMatchMode, getRowOperationsColumn, getUniqObjsByDataField, getWatchIdentifier, getWidgetPropsByType, groupData, handleHeaderClick, hasLinkToCurrentPage, interpolateBindExpressions, isActiveNavItem, isBooleanAttr, isDataSetWidget, isDimensionProp, isStyle, parseValueByType, performDataOperation, prepareFieldDefs, propNameCSSKeyMap, provideAs, provideAsDialogRef, provideAsWidgetRef, refreshDataSource, register$1 as register, registerFormWidget, setFocusTrap, setHeaderConfig, setHeaderConfigForTable, setItemByCompare, styler, toggleAllHeaders, transformData, transformDataWithKeys, transformFormData, unsupportedStatePersistenceTypes, updateDeviceView, widgetIdGenerator };
5297
5250
  //# sourceMappingURL=index.mjs.map