@wavemaker/app-ng-runtime 12.0.0-next.45190 → 12.0.0-next.45196

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 (106) hide show
  1. app-ng-runtime/build-task/bundles/index.umd.js +7 -7
  2. app-ng-runtime/build-task/esm2022/containers/accordion/accordion-pane/accordion-pane.build.mjs +2 -2
  3. app-ng-runtime/build-task/esm2022/containers/accordion/accordion.build.mjs +3 -3
  4. app-ng-runtime/build-task/esm2022/containers/wizard/wizard.build.mjs +2 -2
  5. app-ng-runtime/build-task/esm2022/data/form/form-field/form-field.build.mjs +3 -3
  6. app-ng-runtime/build-task/esm2022/input/chips/chips.build.mjs +2 -2
  7. app-ng-runtime/build-task/esm2022/input/file-upload/file-upload.build.mjs +2 -2
  8. app-ng-runtime/build-task/fesm2022/index.mjs +7 -7
  9. app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
  10. app-ng-runtime/components/advanced/custom/bundles/index.umd.js +6 -1
  11. app-ng-runtime/components/advanced/custom/custom-widget-container/custom-widget-container.directive.d.ts +1 -0
  12. app-ng-runtime/components/advanced/custom/esm2022/custom-widget-container/custom-widget-container.directive.mjs +7 -2
  13. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs +6 -1
  14. app-ng-runtime/components/advanced/custom/fesm2022/index.mjs.map +1 -1
  15. app-ng-runtime/components/base/bundles/index.umd.js +0 -5
  16. app-ng-runtime/components/base/esm2022/widgets/common/base/base.component.mjs +1 -6
  17. app-ng-runtime/components/base/fesm2022/index.mjs +0 -5
  18. app-ng-runtime/components/base/fesm2022/index.mjs.map +1 -1
  19. app-ng-runtime/components/basic/default/audio/audio.component.d.ts +2 -0
  20. app-ng-runtime/components/basic/default/bundles/index.umd.js +18 -7
  21. app-ng-runtime/components/basic/default/esm2022/audio/audio.component.mjs +13 -5
  22. app-ng-runtime/components/basic/default/esm2022/video/video.component.mjs +7 -4
  23. app-ng-runtime/components/basic/default/fesm2022/index.mjs +18 -7
  24. app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
  25. app-ng-runtime/components/basic/default/video/video.component.d.ts +1 -0
  26. app-ng-runtime/components/basic/progress/bundles/index.umd.js +7 -3
  27. app-ng-runtime/components/basic/progress/esm2022/progress-bar/progress-bar.component.mjs +8 -4
  28. app-ng-runtime/components/basic/progress/fesm2022/index.mjs +7 -3
  29. app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
  30. app-ng-runtime/components/basic/progress/progress-bar/progress-bar.component.d.ts +1 -0
  31. app-ng-runtime/components/basic/search/bundles/index.umd.js +7 -2
  32. app-ng-runtime/components/basic/search/esm2022/search.component.mjs +8 -3
  33. app-ng-runtime/components/basic/search/fesm2022/index.mjs +7 -2
  34. app-ng-runtime/components/basic/search/fesm2022/index.mjs.map +1 -1
  35. app-ng-runtime/components/basic/search/search.component.d.ts +3 -2
  36. app-ng-runtime/components/chart/bundles/index.umd.js +2 -1
  37. app-ng-runtime/components/chart/esm2022/chart.utils.mjs +3 -2
  38. app-ng-runtime/components/chart/fesm2022/index.mjs +2 -1
  39. app-ng-runtime/components/chart/fesm2022/index.mjs.map +1 -1
  40. app-ng-runtime/components/containers/accordion/accordion-pane/accordion-pane.component.d.ts +1 -0
  41. app-ng-runtime/components/containers/accordion/bundles/index.umd.js +15 -9
  42. app-ng-runtime/components/containers/accordion/esm2022/accordion-pane/accordion-pane.component.mjs +13 -10
  43. app-ng-runtime/components/containers/accordion/esm2022/accordion.directive.mjs +4 -1
  44. app-ng-runtime/components/containers/accordion/fesm2022/index.mjs +15 -9
  45. app-ng-runtime/components/containers/accordion/fesm2022/index.mjs.map +1 -1
  46. app-ng-runtime/components/containers/wizard/bundles/index.umd.js +6 -6
  47. app-ng-runtime/components/containers/wizard/esm2022/wizard.component.mjs +7 -7
  48. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs +6 -6
  49. app-ng-runtime/components/containers/wizard/fesm2022/index.mjs.map +1 -1
  50. app-ng-runtime/components/data/list/bundles/index.umd.js +20 -12
  51. app-ng-runtime/components/data/list/esm2022/list-item.directive.mjs +10 -1
  52. app-ng-runtime/components/data/list/esm2022/list.component.mjs +13 -13
  53. app-ng-runtime/components/data/list/fesm2022/index.mjs +21 -13
  54. app-ng-runtime/components/data/list/fesm2022/index.mjs.map +1 -1
  55. app-ng-runtime/components/input/chips/bundles/index.umd.js +24 -7
  56. app-ng-runtime/components/input/chips/esm2022/chips.component.mjs +25 -8
  57. app-ng-runtime/components/input/chips/fesm2022/index.mjs +24 -7
  58. app-ng-runtime/components/input/chips/fesm2022/index.mjs.map +1 -1
  59. app-ng-runtime/components/input/default/bundles/index.umd.js +21 -5
  60. app-ng-runtime/components/input/default/esm2022/base-form.component.mjs +3 -3
  61. app-ng-runtime/components/input/default/esm2022/text/locale/number-locale.mjs +20 -4
  62. app-ng-runtime/components/input/default/fesm2022/index.mjs +21 -5
  63. app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
  64. app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +3 -1
  65. app-ng-runtime/components/input/epoch/bundles/index.umd.js +22 -14
  66. app-ng-runtime/components/input/epoch/esm2022/base-date-time.component.mjs +13 -6
  67. app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +4 -4
  68. app-ng-runtime/components/input/epoch/esm2022/date/date.props.mjs +2 -1
  69. app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +4 -4
  70. app-ng-runtime/components/input/epoch/fesm2022/index.mjs +19 -11
  71. app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
  72. app-ng-runtime/components/input/file-upload/bundles/index.umd.js +80 -64
  73. app-ng-runtime/components/input/file-upload/esm2022/file-upload.component.mjs +80 -65
  74. app-ng-runtime/components/input/file-upload/esm2022/file-upload.props.mjs +3 -2
  75. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs +81 -65
  76. app-ng-runtime/components/input/file-upload/fesm2022/index.mjs.map +1 -1
  77. app-ng-runtime/components/input/file-upload/file-upload.component.d.ts +7 -2
  78. app-ng-runtime/components/input/rating/bundles/index.umd.js +2 -2
  79. app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +3 -3
  80. app-ng-runtime/components/input/rating/fesm2022/index.mjs +2 -2
  81. app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
  82. app-ng-runtime/components/navigation/breadcrumb/bundles/index.umd.js +6 -6
  83. app-ng-runtime/components/navigation/breadcrumb/esm2022/breadcrumb.component.mjs +7 -7
  84. app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs +6 -6
  85. app-ng-runtime/components/navigation/breadcrumb/fesm2022/index.mjs.map +1 -1
  86. app-ng-runtime/components/page/left-panel/bundles/index.umd.js +10 -3
  87. app-ng-runtime/components/page/left-panel/esm2022/left-panel.directive.mjs +11 -4
  88. app-ng-runtime/components/page/left-panel/fesm2022/index.mjs +10 -3
  89. app-ng-runtime/components/page/left-panel/fesm2022/index.mjs.map +1 -1
  90. app-ng-runtime/components/page/left-panel/left-panel.directive.d.ts +2 -2
  91. app-ng-runtime/components/page/right-panel/bundles/index.umd.js +2 -2
  92. app-ng-runtime/components/page/right-panel/esm2022/right-panel.directive.mjs +3 -3
  93. app-ng-runtime/components/page/right-panel/fesm2022/index.mjs +2 -2
  94. app-ng-runtime/components/page/right-panel/fesm2022/index.mjs.map +1 -1
  95. app-ng-runtime/components/page/right-panel/right-panel.directive.d.ts +1 -1
  96. app-ng-runtime/package.json +1 -1
  97. app-ng-runtime/runtime/base/bundles/index.umd.js +4 -0
  98. app-ng-runtime/runtime/base/esm2022/components/base-custom-widget.component.mjs +5 -1
  99. app-ng-runtime/runtime/base/fesm2022/index.mjs +4 -0
  100. app-ng-runtime/runtime/base/fesm2022/index.mjs.map +1 -1
  101. app-ng-runtime/scripts/datatable/datatable.js +9 -5
  102. app-ng-runtime/variables/bundles/index.umd.js +34 -16
  103. app-ng-runtime/variables/esm2022/manager/variable/web-socket-variable.manager.mjs +35 -17
  104. app-ng-runtime/variables/fesm2022/index.mjs +34 -16
  105. app-ng-runtime/variables/fesm2022/index.mjs.map +1 -1
  106. app-ng-runtime/variables/manager/variable/web-socket-variable.manager.d.ts +0 -4
@@ -49,6 +49,7 @@
49
49
  this.baseWidget = {};
50
50
  this.propsReady = resolveFn;
51
51
  this.configSubject = new rxjs.Subject();
52
+ this.onErroSubject = new rxjs.Subject();
52
53
  this.widgetType = widgetType;
53
54
  this.name = elRef.nativeElement.getAttribute('name');
54
55
  base.styler(this.nativeElement, this);
@@ -128,8 +129,12 @@
128
129
  return propsMap;
129
130
  }
130
131
  updateDataValue(value) {
131
- if (this.formControl && this.formControl.control && value !== this.formControl.control.value)
132
+ if (this.formControl && this.formControl.control && value !== this.formControl.control.value) {
132
133
  this.formControl.control.setValue(value);
134
+ if (this.formControl.control.invalid) {
135
+ this.onErroSubject.next();
136
+ }
137
+ }
133
138
  }
134
139
  updateData(key, value) {
135
140
  let modifiedKey = key.replace('base-', '');
@@ -14,6 +14,7 @@ export declare class CustomWidgetContainerDirective extends DatasetAwareFormComp
14
14
  baseWidget: any;
15
15
  asAttr: boolean;
16
16
  configSubject: Subject<any>;
17
+ onErroSubject: Subject<any>;
17
18
  constructor(inj: Injector, elRef: ElementRef, widgetname: string, explicitContext: any);
18
19
  get datavalue(): any;
19
20
  set datavalue(value: any);
@@ -22,6 +22,7 @@ export class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
22
22
  this.baseWidget = {};
23
23
  this.propsReady = resolveFn;
24
24
  this.configSubject = new Subject();
25
+ this.onErroSubject = new Subject();
25
26
  this.widgetType = widgetType;
26
27
  this.name = elRef.nativeElement.getAttribute('name');
27
28
  styler(this.nativeElement, this);
@@ -101,8 +102,12 @@ export class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
101
102
  return propsMap;
102
103
  }
103
104
  updateDataValue(value) {
104
- if (this.formControl && this.formControl.control && value !== this.formControl.control.value)
105
+ if (this.formControl && this.formControl.control && value !== this.formControl.control.value) {
105
106
  this.formControl.control.setValue(value);
107
+ if (this.formControl.control.invalid) {
108
+ this.onErroSubject.next();
109
+ }
110
+ }
106
111
  }
107
112
  updateData(key, value) {
108
113
  let modifiedKey = key.replace('base-', '');
@@ -146,4 +151,4 @@ export class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
146
151
  }, {
147
152
  type: Optional
148
153
  }] }], null); })();
149
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy93aWRnZXRzL2FkdmFuY2VkL2N1c3RvbS9zcmMvY3VzdG9tLXdpZGdldC1jb250YWluZXIvY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFVLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUVuRyxPQUFPLEVBQUUsUUFBUSxFQUFFLElBQUksRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUMxQyxPQUFPLEVBQUMsU0FBUyxFQUFFLFNBQVMsRUFBRSxrQkFBa0IsRUFBRSxRQUFRLEVBQXFCLE1BQU0sRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBRWxILE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQzFELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxnREFBZ0QsQ0FBQztBQUMvRSxPQUFPLEVBQUMsVUFBVSxFQUFFLFNBQVMsRUFBQyxNQUFNLFdBQVcsQ0FBQztBQUNoRCxPQUFPL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xuXG4gICAgdXBkYXRlRGF0YShrZXk6IHN0cmluZywgdmFsdWU6IGFueSkge1xuICAgICAgICBsZXQgbW9kaWZpZWRLZXkgPSBrZXkucmVwbGFjZSgnYmFzZS0nLCAnJyk7XG4gICAgICAgIGlmKHRoaXMuYXNBdHRyKSB7XG4gICAgICAgICAgICB0aGlzW3RoaXMuYmFzZVdpZGdldE5hbWVdW21vZGlmaWVkS2V5XSA9IHZhbHVlO1xuICAgICAgICAgICAgdGhpcy5uYXRpdmVFbGVtZW50LmNoaWxkcmVuWzBdLmNoaWxkcmVuWzBdWyd3aWRnZXQnXS52aWV3UGFyZW50W3RoaXMuYmFzZVdpZGdldE5hbWVdW21vZGlmaWVkS2V5XSA9IHZhbHVlO1xuICAgICAgICAgICAgdGhpc1t0aGlzLmJhc2VXaWRnZXROYW1lXS5pbml0RGF0YXNldEl0ZW1zKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzW21vZGlmaWVkS2V5XSA9IHZhbHVlO1xuICAgICAgICAgICAgdGhpcy5uYXRpdmVFbGVtZW50LmNoaWxkcmVuWzBdLmNoaWxkcmVuWzBdWyd3aWRnZXQnXS52aWV3UGFyZW50W21vZGlmaWVkS2V5XSA9IHZhbHVlO1xuICAgICAgICB9XG4gICAgICAgIGlmKHRoaXMuZm9ybUNvbnRyb2wgJiYgbW9kaWZpZWRLZXkgPT09ICdkYXRhdmFsdWUnKXtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlRGF0YVZhbHVlKHZhbHVlKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
154
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy93aWRnZXRzL2FkdmFuY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IGxldCB0eXBlID0gUFJPUF9UWVBFLlNUUklORztcblxuICAgICAgICAgICAgaWYgKHYudHlwZSA9PT0gJ2Jvb2xlYW4nKSB7XG4gICAgICAgICAgICAgICAgdHlwZSA9IFBST1BfVFlQRS5CT09MRUFOO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnR5cGUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgICAgdHlwZSA9IFBST1BfVFlQRS5OVU1CRVI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudHlwZSAhPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICB0eXBlID0gdi50eXBlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBEbyBub3Qgc2V0IHRoZSAnYmluZDoqJyB2YWx1ZXNcbiAgICAgICAgICAgIHByb3BzTWFwLnNldChgcHJvcC0ke2t9YCwgeyB0eXBlLCB2YWx1ZTogXy5zdGFydHNXaXRoKHYudmFsdWUsICdiaW5kOicpID8gdW5kZWZpbmVkIDogdi52YWx1ZSB9KTtcbiAgICAgICAgICAgIHRoaXMucHJvcHNba10gPSB2LnZhbHVlO1xuICAgICAgICB9KTtcblxuICAgICAgICByZWdpc3RlcmVkUHJvcHNTZXQuYWRkKHRoaXMud2lkZ2V0VHlwZSk7XG4gICAgICAgIGN1c3RvbVdpZGdldFByb3BzTWFwW3RoaXMud2lkZ2V0VHlwZV0gPSB0aGlzLnByb3BzXG5cbiAgICAgICAgcmV0dXJuIHByb3BzTWFwO1xuICAgIH1cblxuICAgIHVwZGF0ZURhdGFWYWx1ZSh2YWx1ZSkge1xuICAgICAgICBpZih0aGlzLmZvcm1Db250cm9sICYmIHRoaXMuZm9ybUNvbnRyb2wuY29udHJvbCAmJiB2YWx1ZSAhPT0gdGhpcy5mb3JtQ29udHJvbC5jb250cm9sLnZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLmZvcm1Db250cm9sLmNvbnRyb2wuc2V0VmFsdWUodmFsdWUpO1xuICAgICAgICAgICAgaWYgKHRoaXMuZm9ybUNvbnRyb2wuY29udHJvbC5pbnZhbGlkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vbkVycm9TdWJqZWN0Lm5leHQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHVwZGF0ZURhdGEoa2V5OiBzdHJpbmcsIHZhbHVlOiBhbnkpIHtcbiAgICAgICAgbGV0IG1vZGlmaWVkS2V5ID0ga2V5LnJlcGxhY2UoJ2Jhc2UtJywgJycpO1xuICAgICAgICBpZih0aGlzLmFzQXR0cikge1xuICAgICAgICAgICAgdGhpc1t0aGlzLmJhc2VXaWRnZXROYW1lXVttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXS5jaGlsZHJlblswXVsnd2lkZ2V0J10udmlld1BhcmVudFt0aGlzLmJhc2VXaWRnZXROYW1lXVttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXNbdGhpcy5iYXNlV2lkZ2V0TmFtZV0uaW5pdERhdGFzZXRJdGVtcygpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpc1ttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5jaGlsZHJlblswXS5jaGlsZHJlblswXVsnd2lkZ2V0J10udmlld1BhcmVudFttb2RpZmllZEtleV0gPSB2YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBpZih0aGlzLmZvcm1Db250cm9sICYmIG1vZGlmaWVkS2V5ID09PSAnZGF0YXZhbHVlJyl7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZURhdGFWYWx1ZSh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
@@ -34,6 +34,7 @@ class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
34
34
  this.baseWidget = {};
35
35
  this.propsReady = resolveFn;
36
36
  this.configSubject = new Subject();
37
+ this.onErroSubject = new Subject();
37
38
  this.widgetType = widgetType;
38
39
  this.name = elRef.nativeElement.getAttribute('name');
39
40
  styler(this.nativeElement, this);
@@ -113,8 +114,12 @@ class CustomWidgetContainerDirective extends DatasetAwareFormComponent {
113
114
  return propsMap;
114
115
  }
115
116
  updateDataValue(value) {
116
- if (this.formControl && this.formControl.control && value !== this.formControl.control.value)
117
+ if (this.formControl && this.formControl.control && value !== this.formControl.control.value) {
117
118
  this.formControl.control.setValue(value);
119
+ if (this.formControl.control.invalid) {
120
+ this.onErroSubject.next();
121
+ }
122
+ }
118
123
  }
119
124
  updateData(key, value) {
120
125
  let modifiedKey = key.replace('base-', '');
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget.props.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget-container.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-prop.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.module.ts","../../../../../projects/components/widgets/advanced/custom/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const customWidgetProps =\n new Map(\n [\n ['class', PROP_STRING],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['widgetname', PROP_STRING],\n ['show', { value: true, ...PROP_BOOLEAN }]\n ]\n )\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget',\n customWidgetProps\n );\n};\n","import {Attribute, Directive, ElementRef, Inject, Injector, OnInit, Optional} from '@angular/core';\n\nimport { addClass, noop } from '@wm/core';\nimport {PROP_TYPE, provideAs, provideAsWidgetRef, register, StylableComponent, styler} from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\nimport { registerProps } from \"../custom-widget-container/custom-widget.props\";\nimport {capitalize, cloneDeep} from 'lodash-es';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR} from \"@angular/forms\";\nimport {DatasetAwareFormComponent} from \"@wm/components/input\";\nimport {Subject} from \"rxjs\";\n\nconst registeredPropsSet = new Set<string>();\n\nlet customWidgetPropsMap: { [key: string]: any } = {};\n\nconst DEFAULT_CLS = 'app-html-container';\n\ndeclare const _;\n\n@Directive({\n selector: '[wmWidgetContainer]',\n providers: [\n provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),\n provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends DatasetAwareFormComponent implements OnInit {\n static initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n config: any;\n private props: any = {};\n private baseWidgetName: string;\n baseWidget: any = {};\n asAttr: boolean;\n configSubject: Subject<any>;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n const widgetType = `wm-custom-${widgetname}`;\n const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };\n let resolveFn: Function = noop;\n\n super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.configSubject = new Subject();\n this.widgetType = widgetType;\n this.name = elRef.nativeElement.getAttribute('name');\n\n styler(this.nativeElement, this);\n\n // Call on property change on name to set name attribute on element.\n this.registerReadyStateListener(() => {\n super.onPropertyChange('name', this.name);\n });\n\n this.registerPropertyChangeListener(((key: string, nv: any, ov?: any) => {\n if (!key.startsWith('prop-')) return;\n const propName = key.slice(5)\n if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {\n this.props[propName] = nv;\n }\n }))\n }\n\n get datavalue() {\n if(this.nativeElement.children.length) {\n let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;\n this.updateDataValue(value);\n return value;\n }\n }\n\n set datavalue(value) {\n if(this.nativeElement.children.length)\n this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;\n }\n\n setBaseWidgetName(baseWidgetType: string) {\n let splitArr = baseWidgetType.split('-'), modifiedArr = [];\n modifiedArr = splitArr.map((item: any) => {\n item = item !== 'wm' ? capitalize(item) : item;\n return item;\n });\n this.baseWidgetName = modifiedArr.join('');\n }\n\n public setProps(config, resolveFn: Function) {\n this.config = config;\n this.baseWidgetName = this.config.projectPropsOn || this.config.widgetType.split('wm-')[1];\n this.configSubject.next();\n if(config.customClasses){\n addClass(this.nativeElement, config.customClasses);\n }\n this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');\n\n this.baseWidget = (this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`) as any)?.widget; \n // if(this.asAttr)\n // this.setBaseWidgetName(config.widgetType);\n if (!config || !config.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }else{\n this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]))\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props = {}) {\n const propsMap = new Map(customWidgetProps);\n Object.entries(props).forEach(([k, v]: [string, any]) => {\n let type = PROP_TYPE.STRING;\n\n if (v.type === 'boolean') {\n type = PROP_TYPE.BOOLEAN;\n } else if (v.type === 'number') {\n type = PROP_TYPE.NUMBER;\n } else if (v.type !== 'string') {\n type = v.type;\n }\n\n // Do not set the 'bind:*' values\n propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n this.props[k] = v.value;\n });\n\n registeredPropsSet.add(this.widgetType);\n customWidgetPropsMap[this.widgetType] = this.props\n\n return propsMap;\n }\n\n updateDataValue(value) {\n if(this.formControl && this.formControl.control && value !== this.formControl.control.value)\n this.formControl.control.setValue(value);\n }\n\n updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n if(this.asAttr) {\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\n } else {\n this[modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;\n }\n if(this.formControl && modifiedKey === 'datavalue'){\n this.updateDataValue(value);\n }\n }\n}\n","import {PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget-container',\n new Map(\n [\n ['name', PROP_STRING],\n ['class', PROP_STRING]\n ]\n )\n );\n};\n","import { AfterContentInit, Directive, ElementRef, Injector, OnDestroy, Optional } from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { registerProps } from './custom-widget-prop';\nimport { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';\n\nconst DEFAULT_CLS = 'app-custom-widget-container clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS};\ndeclare const _;\n\n@Directive({\n selector: '[wmCustomWidget]',\n providers: [\n provideAsWidgetRef(CustomWidgetDirective)\n ]\n})\nexport class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private viewport: Viewport) {\n super(inj, WIDGET_CONFIG);\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n ngAfterContentInit() {\n let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'),\n inheritedProps = {},\n customWidgetProps = Array.from(getWidgetPropsByType(\"wm-custom-widget-container\").keys());\n for(let i = 0; i < customWidget.attributes.length; i++) {\n let attr = customWidget.attributes.item(i);\n if(attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))\n inheritedProps[attr.name] = attr.value;\n }\n this.processChildren(this.nativeElement.children, inheritedProps);\n }\n\n processChildren(children: any, inheritedProps: { [key: string]: string }) {\n let baseWidgetName = this.$element.attr('base');\n Array.from(children).forEach((child: any) => {\n if(child.getAttribute('name') !== baseWidgetName)\n this.processChildren(child.children, inheritedProps);\n else {\n for (const [key, value] of Object.entries(inheritedProps)) {\n if(key.includes(\".event\") || key.includes('.bind'))\n this.processAttr(key, value, {widget: child.widget, nativeElement: child});\n else\n child.widget[key] = value;\n }\n }\n });\n }\n\n private callback(eventName, locals?: object) {\n locals = _.assign({ widget: this }, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { CustomWidgetContainerDirective } from './custom-widget-container/custom-widget-container.directive';\nimport { CustomWidgetDirective } from './custom-widget.directive'\nconst components = [\n CustomWidgetContainerDirective,\n CustomWidgetDirective\n];\n\n@NgModule({\n imports: [\n CommonModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class CustomModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["registerProps","DEFAULT_CLS"],"mappings":";;;;;;;;;;;AAEO,MAAM,iBAAiB,GAC1B,IAAI,GAAG,CACH;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EA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AkB;AAC5B,gBAAA,SAAS,EAAE;AACP,oBAAA,kBAAkB,CAAuB,qBAAA,CAAA;AAC5C,iBAAA;AACJ,aAAA,CAAA;;;ACRD,MAAM,UAAU,GAAG;IACf,8BAA8B;IAC9B,qBAAqB;CACxB,CAAC;MAUW,YAAY,CAAA;6EAAZ,YAAY,GAAA,CAAA,EAAA,CAAA,EAAA;mEAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;uEANjB,YAAY;YACZ,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;;iFAKb,YAAY,EAAA,CAAA;cARxB,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE;oBACL,YAAY;oBACZ,kBAAkB;AACrB,iBAAA;AACD,gBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,gBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAC3B,aAAA,CAAA;;AACY,CAAA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,YAAY,mBAZrB,8BAA8B;AAC9B,QAAA,qBAAqB,aAKjB,YAAY;AACZ,QAAA,kBAAkB,aAPtB,8BAA8B;QAC9B,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTzB;;AAEG;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget.props.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-container/custom-widget-container.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget-prop.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.directive.ts","../../../../../projects/components/widgets/advanced/custom/src/custom-widget.module.ts","../../../../../projects/components/widgets/advanced/custom/src/index.ts"],"sourcesContent":["import {PROP_BOOLEAN, PROP_STRING, register} from '@wm/components/base';\n\nexport const customWidgetProps =\n new Map(\n [\n ['class', PROP_STRING],\n ['hint', PROP_STRING],\n ['name', PROP_STRING],\n ['widgetname', PROP_STRING],\n ['show', { value: true, ...PROP_BOOLEAN }]\n ]\n )\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget',\n customWidgetProps\n );\n};\n","import {Attribute, Directive, ElementRef, Inject, Injector, OnInit, Optional} from '@angular/core';\n\nimport { addClass, noop } from '@wm/core';\nimport {PROP_TYPE, provideAs, provideAsWidgetRef, register, StylableComponent, styler} from '@wm/components/base';\n\nimport { customWidgetProps } from './custom-widget.props';\nimport { registerProps } from \"../custom-widget-container/custom-widget.props\";\nimport {capitalize, cloneDeep} from 'lodash-es';\nimport {NG_VALIDATORS, NG_VALUE_ACCESSOR} from \"@angular/forms\";\nimport {DatasetAwareFormComponent} from \"@wm/components/input\";\nimport {Subject} from \"rxjs\";\n\nconst registeredPropsSet = new Set<string>();\n\nlet customWidgetPropsMap: { [key: string]: any } = {};\n\nconst DEFAULT_CLS = 'app-html-container';\n\ndeclare const _;\n\n@Directive({\n selector: '[wmWidgetContainer]',\n providers: [\n provideAs(CustomWidgetContainerDirective, NG_VALUE_ACCESSOR, true),\n provideAs(CustomWidgetContainerDirective, NG_VALIDATORS, true),\n provideAsWidgetRef(CustomWidgetContainerDirective)\n ],\n exportAs: 'wmWidgetContainer'\n})\nexport class CustomWidgetContainerDirective extends DatasetAwareFormComponent implements OnInit {\n static initializeProps = registerProps();\n\n widgetType: string;\n name: string;\n propsReady: Function;\n widgetName: string;\n config: any;\n private props: any = {};\n private baseWidgetName: string;\n baseWidget: any = {};\n asAttr: boolean;\n configSubject: Subject<any>;\n onErroSubject: Subject<any>;\n\n constructor(\n inj: Injector, elRef: ElementRef,\n @Attribute('widgetname') widgetname: string,\n @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any\n ) {\n const widgetType = `wm-custom-${widgetname}`;\n const WIDGET_CONFIG = { widgetType, hostClass: DEFAULT_CLS };\n let resolveFn: Function = noop;\n\n super(inj, WIDGET_CONFIG, explicitContext, undefined, new Promise(res => resolveFn = res));\n this.propsReady = resolveFn;\n this.configSubject = new Subject();\n this.onErroSubject = new Subject();\n this.widgetType = widgetType;\n this.name = elRef.nativeElement.getAttribute('name');\n\n styler(this.nativeElement, this);\n\n // Call on property change on name to set name attribute on element.\n this.registerReadyStateListener(() => {\n super.onPropertyChange('name', this.name);\n });\n\n this.registerPropertyChangeListener(((key: string, nv: any, ov?: any) => {\n if (!key.startsWith('prop-')) return;\n const propName = key.slice(5)\n if (this.props.hasOwnProperty(propName) && this.props[propName] !== nv) {\n this.props[propName] = nv;\n }\n }))\n }\n\n get datavalue() {\n if(this.nativeElement.children.length) {\n let value = this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue;\n this.updateDataValue(value);\n return value;\n }\n }\n\n set datavalue(value) {\n if(this.nativeElement.children.length)\n this.nativeElement.children[0].children[0]['widget'].viewParent.datavalue = value;\n }\n\n setBaseWidgetName(baseWidgetType: string) {\n let splitArr = baseWidgetType.split('-'), modifiedArr = [];\n modifiedArr = splitArr.map((item: any) => {\n item = item !== 'wm' ? capitalize(item) : item;\n return item;\n });\n this.baseWidgetName = modifiedArr.join('');\n }\n\n public setProps(config, resolveFn: Function) {\n this.config = config;\n this.baseWidgetName = this.config.projectPropsOn || this.config.widgetType.split('wm-')[1];\n this.configSubject.next();\n if(config.customClasses){\n addClass(this.nativeElement, config.customClasses);\n }\n this.asAttr = this.nativeElement.children[0].children[0].hasAttribute('as');\n\n this.baseWidget = (this.nativeElement.children[0].children[0].querySelector(`[name=${this.baseWidgetName}]`) as any)?.widget; \n // if(this.asAttr)\n // this.setBaseWidgetName(config.widgetType);\n if (!config || !config.properties) {\n return;\n }\n if (!registeredPropsSet.has(this.widgetType)) {\n register(this.widgetType, this.prepareProps(config.properties));\n }else{\n this.props = Object.assign(this.props, cloneDeep(customWidgetPropsMap[this.widgetType]))\n }\n\n this.propsReady(resolveFn);\n }\n\n private prepareProps(props = {}) {\n const propsMap = new Map(customWidgetProps);\n Object.entries(props).forEach(([k, v]: [string, any]) => {\n let type = PROP_TYPE.STRING;\n\n if (v.type === 'boolean') {\n type = PROP_TYPE.BOOLEAN;\n } else if (v.type === 'number') {\n type = PROP_TYPE.NUMBER;\n } else if (v.type !== 'string') {\n type = v.type;\n }\n\n // Do not set the 'bind:*' values\n propsMap.set(`prop-${k}`, { type, value: _.startsWith(v.value, 'bind:') ? undefined : v.value });\n this.props[k] = v.value;\n });\n\n registeredPropsSet.add(this.widgetType);\n customWidgetPropsMap[this.widgetType] = this.props\n\n return propsMap;\n }\n\n updateDataValue(value) {\n if(this.formControl && this.formControl.control && value !== this.formControl.control.value) {\n this.formControl.control.setValue(value);\n if (this.formControl.control.invalid) {\n this.onErroSubject.next();\n }\n }\n }\n\n updateData(key: string, value: any) {\n let modifiedKey = key.replace('base-', '');\n if(this.asAttr) {\n this[this.baseWidgetName][modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[this.baseWidgetName][modifiedKey] = value;\n this[this.baseWidgetName].initDatasetItems();\n } else {\n this[modifiedKey] = value;\n this.nativeElement.children[0].children[0]['widget'].viewParent[modifiedKey] = value;\n }\n if(this.formControl && modifiedKey === 'datavalue'){\n this.updateDataValue(value);\n }\n }\n}\n","import {PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-custom-widget-container',\n new Map(\n [\n ['name', PROP_STRING],\n ['class', PROP_STRING]\n ]\n )\n );\n};\n","import { AfterContentInit, Directive, ElementRef, Injector, OnDestroy, Optional } from '@angular/core';\n\nimport {Viewport, ViewportEvent} from '@wm/core';\nimport { registerProps } from './custom-widget-prop';\nimport { StylableComponent, provideAsWidgetRef, getWidgetPropsByType } from '@wm/components/base';\n\nconst DEFAULT_CLS = 'app-custom-widget-container clearfix';\nconst WIDGET_CONFIG = {widgetType: 'wm-custom-widget-container', hostClass: DEFAULT_CLS};\ndeclare const _;\n\n@Directive({\n selector: '[wmCustomWidget]',\n providers: [\n provideAsWidgetRef(CustomWidgetDirective)\n ]\n})\nexport class CustomWidgetDirective extends StylableComponent implements OnDestroy, AfterContentInit {\n static initializeProps = registerProps();\n\n constructor(inj: Injector, private viewport: Viewport) {\n super(inj, WIDGET_CONFIG);\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.RESIZE, data => this.callback('resize', data)));\n this.registerDestroyListener(this.viewport.subscribe(ViewportEvent.ORIENTATION_CHANGE, data => this.callback('orientationchange', data)));\n }\n ngAfterContentInit() {\n let customWidget = this.nativeElement.closest('[customwidgetcontainer]') || this.nativeElement.closest('[wmwidgetcontainer]'),\n inheritedProps = {},\n customWidgetProps = Array.from(getWidgetPropsByType(\"wm-custom-widget-container\").keys());\n for(let i = 0; i < customWidget.attributes.length; i++) {\n let attr = customWidget.attributes.item(i);\n if(attr.value && attr.value !== '' && !customWidgetProps.includes(attr.name))\n inheritedProps[attr.name] = attr.value;\n }\n this.processChildren(this.nativeElement.children, inheritedProps);\n }\n\n processChildren(children: any, inheritedProps: { [key: string]: string }) {\n let baseWidgetName = this.$element.attr('base');\n Array.from(children).forEach((child: any) => {\n if(child.getAttribute('name') !== baseWidgetName)\n this.processChildren(child.children, inheritedProps);\n else {\n for (const [key, value] of Object.entries(inheritedProps)) {\n if(key.includes(\".event\") || key.includes('.bind'))\n this.processAttr(key, value, {widget: child.widget, nativeElement: child});\n else\n child.widget[key] = value;\n }\n }\n });\n }\n\n private callback(eventName, locals?: object) {\n locals = _.assign({ widget: this }, locals);\n this.invokeEventCallback(eventName, locals);\n }\n\n public ngOnAttach() {\n this.callback('attach');\n }\n\n public ngOnDetach() {\n this.callback('detach');\n }\n\n public ngOnDestroy() {\n this.callback('destroy');\n super.ngOnDestroy();\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { CustomWidgetContainerDirective } from './custom-widget-container/custom-widget-container.directive';\nimport { CustomWidgetDirective } from './custom-widget.directive'\nconst components = [\n CustomWidgetContainerDirective,\n CustomWidgetDirective\n];\n\n@NgModule({\n imports: [\n CommonModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class CustomModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["registerProps","DEFAULT_CLS"],"mappings":";;;;;;;;;;;AAEO,MAAM,iBAAiB,GAC1B,IAAI,GAAG,CACH;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC;AAC7C,CAAA,CACJ,CAAA;AAEE,MAAMA,eAAa,GAAG,MAAK;AAC9B,IAAA,QAAQ,CACJ,kBAAkB,EAClB,iBAAiB,CACpB,CAAC;AACN,CAAC;;ACND,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAE7C,IAAI,oBAAoB,GAA2B,EAAE,CAAC;AAEtD,MAAMC,aAAW,GAAG,oBAAoB,CAAC;AAanC,MAAO,8BAA+B,SAAQ,yBAAyB,CAAA;AAClE,IAAA,SAAA,IAAA,CAAA,eAAe,GAAGD,eAAa,EAAhB,CAAmB,EAAA;AAczC,IAAA,WAAA,CACI,GAAa,EAAE,KAAiB,EACP,UAAkB,EACH,eAAoB,EAAA;AAE5D,QAAA,MAAM,UAAU,GAAG,CAAa,UAAA,EAAA,UAAU,EAAE,CAAC;QAC7C,MAAM,aAAa,GAAG,EAAE,UAAU,EAAE,SAAS,EAAEC,aAAW,EAAE,CAAC;QAC7D,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,OAAO,CAAC,GAAG,IAAI,SAAS,GAAG,GAAG,CAAC,CAAC,CA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AA,YAAA,EAAA,CAAA,OAAA,SAAA,KAAA,WAAA,IAAA,SAAA,KAAA,EAAA,CAAA,kBAAA,CAAA,YAAY,mBAZrB,8BAA8B;AAC9B,QAAA,qBAAqB,aAKjB,YAAY;AACZ,QAAA,kBAAkB,aAPtB,8BAA8B;QAC9B,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTzB;;AAEG;;;;"}
@@ -1167,11 +1167,6 @@
1167
1167
  }
1168
1168
  else if (key === 'class') {
1169
1169
  i1.switchClass(this.nativeElement, nv, ov);
1170
- let result = nv.match(/(\W|^)(h([0-6]))(?=\s|$)/);
1171
- if (result) {
1172
- i1.setAttr(this.nativeElement, 'role', 'heading');
1173
- i1.setAttr(this.nativeElement, 'aria-level', result[3]);
1174
- }
1175
1170
  }
1176
1171
  else if (key === 'name' || key === 'tabindex') {
1177
1172
  i1.setAttr(this.nativeElement, key, nv);
@@ -280,11 +280,6 @@ export class BaseComponent {
280
280
  }
281
281
  else if (key === 'class') {
282
282
  switchClass(this.nativeElement, nv, ov);
283
- let result = nv.match(/(\W|^)(h([0-6]))(?=\s|$)/);
284
- if (result) {
285
- setAttr(this.nativeElement, 'role', 'heading');
286
- setAttr(this.nativeElement, 'aria-level', result[3]);
287
- }
288
283
  }
289
284
  else if (key === 'name' || key === 'tabindex') {
290
285
  setAttr(this.nativeElement, key, nv);
@@ -657,4 +652,4 @@ export class BaseComponent {
657
652
  }, {
658
653
  type: Optional
659
654
  }] }, { type: Promise }], null); })();
660
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL2Jhc2Uvc3JjL3dpZGdldHMvY29tbW9uL2Jhc2UvYmFzZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5nc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IHt9O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHBhcmVudENvbnRleHRzKSB7XG4gICAgICAgICAgICBsZXQgcGFyZW50Q29udGV4dE9iaiA9IHt9O1xuICAgICAgICAgICAgaWYgKGlzQXJyYXkocGFyZW50Q29udGV4dHMpKSB7XG4gICAgICAgICAgICAgICAgZm9yRWFjaChwYXJlbnRDb250ZXh0cywgKGNvbnRleHRPYmopID0+IHtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihwYXJlbnRDb250ZXh0T2JqLCBjb250ZXh0T2JqKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Q29udGV4dE9iaiA9IHBhcmVudENvbnRleHRzO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0gT2JqZWN0LmFzc2lnbih7fSwgcGFyZW50Q29udGV4dE9iaiwgdGhpcy5jb250ZXh0KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHNldCB0aGUgdmFsdWUgb24gdGhlIHByb3h5IG9iamVjdCBpZSwgd2lkZ2V0XG4gICAgICogc2V0dGluZyB0aGUgcHJvcGVydHkgb24gdGhlIHByb3h5IHdpbGwgaW52b2tlIHRoZSBjaGFuZ2UgbGlzdGVuZXJzXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IGtleVxuICAgICAqIEBwYXJhbSB2YWx1ZVxuICAgICAqL1xuICAgIHB1YmxpYyBzZXRXaWRnZXRQcm9wZXJ0eShrZXk6IHN0cmluZywgdmFsdWU6IGFueSkge1xuICAgICAgICB0aGlzLndpZGdldFtrZXldID0gdmFsdWU7XG4gICAgfVxuXG4gICAgcHVibGljIGdldEF0dHIoYXR0ck5hbWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLiRhdHRycy5nZXQoYXR0ck5hbWUpO1xuICAgI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hvdycpIHtcbiAgICAgICAgICAgIHRoaXMubmF0aXZlRWxlbWVudC5oaWRkZW4gPSAhbnY7XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnaGludCcpIHtcbiAgICAgICAgICAgIGlmICghaXNNb2JpbGVBcHAoKSkge1xuICAgICAgICAgICAgICAgIHNldEF0dHIodGhpcy5uYXRpdmVFbGVtZW50LCAndGl0bGUnLCBudik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnY2xhc3MnKSB7XG4gICAgICAgICAgICBzd2l0Y2hDbGFzcyh0aGlzLm5hdGl2ZUVsZW1lbnQsIG52LCBvdik7XG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gbnYubWF0Y2goLyhcXFd8XikoaChbMC02XSkpKD89XFxzfCQpLyk7XG4gICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgc2V0QXR0cih0aGlzLm5hdGl2ZUVsZW1lbnQsICdyb2xlJywgJ2hlYWRpbmcnKTtcbiAgICAgICAgICAgICAgICBzZXRBdHRyKHRoaXMubmF0aXZlRWxlbWVudCwgJ2FyaWEtbGV2ZWwnLCByZXN1bHRbM10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gJ25hbWUnIHx8IGtleSA9PT0gJ3RhYmluZGV4Jykge1xuICAgICAgICAgICAgc2V0QXR0cih0aGlzLm5hdGl2ZUVsZW1lbnQsIGtleSwgbnYpO1xuICAgICAgICAgICAgaWYgKGtleSA9PT0gJ25hbWUnICYmIG52KSB7XG4gICAgICAgICAgICAgICAgcmVuYW1lV2lkZ2V0KHRoaXMudmlld1BhcmVudCwgdGhpcy53aWRnZXQsIG52LCBvdik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnY29uZGl0aW9uYWxjbGFzcycpIHtcbiAgICAgICAgICAgIC8vIHVwZGF0ZSBjbGF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ZSBjdXN0b20gbG9naWMgYmVmb3JlIGludm9raW5nIHRoZSB1c2VyIGNhbGxiYWNrXG4gICAgICovXG4gICAgcHJvdGVjdGVkIGhhbmRsZUV2ZW50KG5vZGU6IEhUTUxFbGVtZW50LCBldmVudE5hbWU6IHN0cmluZywgZXZlbnRDYWxsYmFjazogRnVuY3Rpb24sIGxvY2FsczogYW55LCBtZXRhPzogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMuZXZlbnRNYW5hZ2VyLmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICBub2RlLFxuICAgICAgICAgICAgZXZlbnROYW1lLFxuICAgICAgICAgICAgZSA9PiB7XG4gICAgICAgICAgICAgICAgbG9jYWxzLiRldmVudCA9IGU7XG4gICAgICAgICAgICAgICAgaWYgKG1ldGEgPT09ICdkZWxheWVkJykge1xuICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gZXZlbnRDYWxsYmFjaygpLCAxNTApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBldmVudENhbGxiYWNrKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICApO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIHBhcnNlIHRoZSBldmVudCBleHByZXNzaW9uIGFuZCBzYXZlIHJlZmVyZW5jZSB0byB0aGUgZnVuY3Rpb24gaW5zaWRlIGV2ZW50SGFuZGxlcnMgbWFwXG4gICAgICogSWYgdGhlIGNvbXBvbmVudCBwcm92aWRlcyBhIG92ZXJyaWRlIGZvciBhbiBldmVudCB0aHJvdWdoIEBFdmVudCBkZWNvcmF0b3IgaW52b2tlIHRoYXRcbiAgICAgKiBlbHNlIGludm9rZSB0aGUgcmVzb2x2ZWQgZnVuY3Rpb25cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSBldmVudE5hbWVcbiAgICAgKiBAcGFyYW0ge3N0cmluZ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gcHJvbWlzZSByZXR1cm5lZCBieSB0aGUgdmFyaWFibGUgY2FsbC5cbiAgICAgICAgICAgICAgICBib3VuZEZuVmFsID0gYm91bmRGbigpO1xuICAgICAgICAgICAgICAgIGlmIChib3VuZEZuVmFsIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgICAgICAgICBib3VuZEZuVmFsLnRoZW4oIHJlc3BvbnNlID0+IHJlc3BvbnNlLCBlcnIgPT4gZXJyKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYm91bmRGblZhbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgaWYoY2hpbGQgJiYgIWNoaWxkLndpZGdldC5ldmVudEhhbmRsZXJzKVxuICAgICAgICAgICAgY2hpbGQud2lkZ2V0LmV2ZW50SGFuZGxlcnMgPSBuZXcgTWFwPHN0cmluZywge2NhbGxiYWNrOiBGdW5jdGlvbiwgbG9jYWxzOiBhbnl9PigpXG5cbiAgICAgICAgd2lkZ2V0LmV2ZW50SGFuZGxlcnMuc2V0KHRoaXMuZ2V0TWFwcGVkRXZlbnROYW1lKGV2ZW50TmFtZSksIHtjYWxsYmFjazogZXZlbnRDYWxsYmFjaywgbG9jYWxzfSk7XG4gICAgICAgIC8vIHByZXBlbmQgZXZlbnROYW1lIHdpdGggb24gYW5kIGNvbnZlcnQgaXQgdG8gY2FtZWxjYXNlLlxuICAgICAgICAvLyBlZywgXCJjbGlja1wiIC0tLT4gb25DbGlja1xuICAgICAgICBjb25zdCBvbkV2ZW50TmFtZSA9IGNhbWVsQ2FzZShgb24tJHtldmVudE5hbWV9YCk7XG4gICAgICAgIC8vIHNhdmUgdGhlIGV2ZW50Q2FsbGJhY2sgaW4gd2lkZ2V0U2Nvc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gICAgICAgd2lkZ2V0UHJvcHMgPSBjaGlsZCA/IGNoaWxkLndpZGdldC53aWRnZXRQcm9wcyA6IHRoaXMud2lkZ2V0UHJvcHMsXG4gICAgICAgICAgICB3aWRnZXRJZCAgICA9IGNoaWxkID8gY2hpbGQud2lkZ2V0LndpZGdldElkIDogdGhpcy53aWRnZXRJZDtcbiAgICAgICAgdGhpcy5yZWdpc3RlckRlc3Ryb3lMaXN0ZW5lcihcbiAgICAgICAgICAgICR3YXRjaChcbiAgICAgICAgICAgICAgICBleHByLFxuICAgICAgICAgICAgICAgIHZpZXdQYXJlbnQsXG4gICAgICAgICAgICAgICAgY29udGV4dCxcbiAgICAgICAgICAgICAgICBudiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmKHByb3BOYW1lLnN0YXJ0c1dpdGgoJ2Jhc2UtJykgJiYgd2lkZ2V0LnVwZGF0ZURhdGEpXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWRnZXQudXBkYXRlRGF0YShwcm9wTmFtZSwgbnYpO1xuICAgICAgICAgICAgICAgICAgICB3aWRnZXRbcHJvcE5hbWVdID0gbnZcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdldFdhdGNoSWRlbnRpZmllcih3aWRnZXRJZCwgcHJvcE5hbWUpLFxuICAgICAgICAgICAgICAgIHByb3BOYW1lID09PSAnZGF0YXNvdXJjZScsXG4gICAgICAgICAgICAgICAgd2lkZ2V0UHJvcHMuZ2V0KHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICAoKSA9PiBpc011dGVkXG4gICAgICAgICAgICApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVtb3ZlIHdhdGNoIG9uIHRoZSBib3VuZCBwcm9wZXJ0eVxuICAgICAqL1xuICAgIHByb3RlY3RlZCByZW1vdmVQcm9wZXJ0eUJpbmRpbmcocHJvcE5hbWU6IHN0cmluZykge1xuICAgICAgICAkdW53YXRjaChnZXRXYXRjaEl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VnaXN0ZXIgdGhlIGV2ZW50c1xuICAgICAqL1xuICAgIG5nQWZ0ZXJWaWV3SW5pdCgpIHtcbiAgICAgICAgaWYgKHRoaXMudG9CZVNldHVwRXZlbnRzUXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGZuIG9mIHRoaXMudG9CZVNldHVwRXZlbnRzUXVldWUpIHtcbiAgICAgICAgICAgICAgICBmbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMudG9CZVNldHVwRXZlbnRzUXVldWUubGVuZ3RoID0gMDtcbiAgICAgICAgdGhpcy5pc0F0dGFjaGVkID0gdHJ1ZTtcbiAgICB9XG5cbiAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7fVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuaXNEZXN0cm95ZWQgPSB0cnVlO1xuICAgICAgICB0aGlzLndpZGdldCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gICAgICAgIHRoaXMuc3R5bGVDaGFuZ2UuY29tcGxldGUoKTtcbiAgICAgICAgdGhpcy5wcm9wZXJ0eUNoYW5nZS5jb21wbGV0ZSgpO1xuICAgICAgICB0aGlzLmRlc3Ryb3kuY29tcGxldGUoKTtcbiAgICAgICAgdGhpcy5pc0F0dGFjaGVkID0gZmFsc2U7XG4gICAgfVxufVxuIl19
655
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL2Jhc2Uvc3JjL3dpZGdldHMvY29tbW9uL2Jhc2UvYmFzZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUdILFVBQVUsRUFDVixNQUFNLEVBQ04s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IHdpZGdldCBpbml0aWFsaXphdGlvblxuICAgICAgICBpZiAoIWluaXRQcm9taXNlKSB7XG4gICAgICAgICAgICB0aGlzLmluaXRXaWRnZXQoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuZGVsYXllZEluaXQgPSB0cnVlO1xuICAgICAgICAgICAgaW5pdFByb21pc2UudGhlbigocmVzb2x2ZUZuKSA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IGZvcm1GaWVsZENXID0gdGhpcy53aWRnZXRTdWJUeXBlID09PSAnd20tZm9ybS1maWVsZC1jdXN0b20td2lkZ2V0JyxcbiAgICAgICAgICAgICAgICAgICAgY3cgICAgICAgICAgPSB0aGlzLndpZGdldFN1YlR5cGUuc3RhcnRzV2l0aCgnd20tY3VzdG9tLScpO1xuICAgICAgICAgICAgICAgIGlmKCBmb3JtRmllbGRDVyB8fCBjdyApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXN0b21XaWRnZXRTdWJUeXBlID0gZm9ybUZpZWxkQ1cgPyAnd20tZm9ybS1maWVsZC0nICsgbGFzdCh0aGlzW1wiZm9ybVdpZGdldFwiXS5jb25maWcud2lkZ2V0VHlwZS5zcGxpdCgnLScpKSA6IHRoaXNbXCJjb25maWdcIl0ud2lkZ2V0VHlwZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aGlzLmluaXRXaWRnZXQoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldEluaXRQcm9wcygpO1xuICAgICAgICAgICAgICAgIHJlc29sdmVGbiAmJiByZXNvbHZlRm4oKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYoZXhwbGljaXRDb250ZXh0KSB7XG4gICAgICAgICAgICBleHRlbmQodGhpcy5jb250ZXh0LCBleHBsaWNpdENvbnRleHQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIGdldE5hdGl2ZUVsZW1lbnQoKT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BlKCk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiB0aGlzLmRpc3BsYXlUeXBlO1xuICAgIH1cblxuICAgIHByb3RlY3RlZCBjcmVhdGVQcm94eSgpOiBhbnkge1xuICAgICAgICByZXR1cm4gV2lkZ2V0UHJveHlQcm92aWRlci5jcmVhdGUodGhpcywgdGhpcy53aWRnZXRTdWJUeXBlLCBnZXRXaWRnZXRQcm9wc0J5VHlwZSh0aGlzLndpZGdldFN1YlR5cGUpKTtcbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgaW5pdENvbnRleHQoKSB7XG4gICAgICAgIC8vIGNvbnN0IGNvbnRleHQgPSAodGhpcy5pbmogYXMgYW55KS52aWV3LmNvbnRleHQ7XG4gICAgICAgIGNvbnN0IGNvbnRleHQgPSB0aGlzLmNvbnRleHQgfHwge307XG5cbiAgICAgICAgY29uc3QgcGFyZW50Q29udGV4dHMgPSB0aGlzLmluai5nZXQoQ29udGV4dCwge30pO1xuXG4gICAgICAgIC8vIGFzc2lnbiB0aGUgY29udGV4dCBwcm9wZXJ0eSBhY2NvcmRpbmdseVxuICAgICAgICBpZiAodGhpcy52aWV3UGFyZW50ICE9PSBjb250ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSBjb250ZXh0O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jb250ZXh0ID0ge307XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocGFyZW50Q29udGV4dHMpIHtcbiAgICAgICAgICAgIGxldCBwYXJlbnRDb250ZXh0T2JqID0ge307XG4gICAgICAgICAgICBpZiAoaXNBcnJheShwYXJlbnRDb250ZXh0cykpIHtcbiAgICAgICAgICAgICAgICBmb3JFYWNoKHBhcmVudENvbnRleHRzLCAoY29udGV4dE9iaikgPT4ge1xuICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKHBhcmVudENvbnRleHRPYmosIGNvbnRleHRPYmopO1xuICAgICAgICAgICAgICAgIH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MaXN0ZW5lcihyZWdpc3Rlcih0aGlzLndpZGdldCwgdGhpcy52aWV3UGFyZW50LCB0aGlzLndpZGdldElkLCB3aWRnZXROYW1lKSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogb3ZlcnJpZGUgdGhlXG4gICAgICovXG4gICAgcHJvdGVjdGVkIGdldE1hcHBlZEV2ZW50TmFtZShldmVudE5hbWUpIHtcbiAgICAgICAgcmV0dXJuIEVWRU5UU19NQVAuZ2V0KGV2ZW50TmFtZSkgfHwgZXZlbnROYW1lO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIGludm9rZSB0aGUgZXZlbnQgaGFuZGxlclxuICAgICAqIENvbXBvbmVudHMgY2FuIG92ZXJyaWRlIHRoaXMgbWV0aG9kIHRvIGV4ZWN1dGUgY3VzdG9tIGxvZ2ljIGJlZm9yZSBpbnZva2luZyB0aGUgdXNlciBjYWxsYmFja1xuICAgICAqL1xuICAgIHByb3RlY3RlZCBoYW5kbGVFdmVudChub2RlOiBIVE1MRWxlbWVudCwgZXZlbnROYW1lOiBzdHJpbmcsIGV2ZW50Q2FsbGJhY2s6IEZ1bmN0aW9uLCBsb2NhbHM6IGFueSwgbWV0YT86IHN0cmluZykge1xuICAgICAgICB0aGlzLmV2ZW50TWFuYWdlci5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIGV2ZW50TmFtZSxcbiAgICAgICAgICAgIGUgPT4ge1xuICAgICAgICAgICAgICAgIGxvY2Fscy4kZXZlbnQgPSBlO1xuICAgICAgICAgICAgICAgIGlmIChtZXRhID09PSAnZGVsYXllZCcpIHtcbiAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IGV2ZW50Q2FsbGJhY2soKSwgMTUwKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZlbnRDYWxsYmFjaygpO1xuICAgICAgICAgICAgICAgIH1c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uYXRpdmVFbGVtZW50O1xuXG4gICAgICAgIGNvbnN0IGV2ZW50Q2FsbGJhY2sgPSAoKSA9PiB7XG4gICAgICAgICAgICBsZXQgYm91bmRGblZhbDtcbiAgICAgICAgICAgICRpbnZva2VXYXRjaGVycyh0cnVlKTtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgbG9jYWxzLiRldmVudCA9IGxvY2Fscy4kZXZlbnQgfHwgbmV3IHdpbmRvdy5DdXN0b21FdmVudChldmVudE5hbWUpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBldmVudCBpcyBib3VuZCBkaXJlY3RseSB0byB0aGUgdmFyaWFibGUgdGhlbiB3ZSBuZWVkIHRvIGludGVybmFsbHkgaGFuZGxlXG4gICAgICAgICAgICAgICAgLy8gdGhlIHByb21pc2UgcmV0dXJuZWQgYnkgdGhlIHZhcmlhYmxlIGNhbGwuXG4gICAgICAgICAgICAgICAgYm91bmRGblZhbCA9IGJvdW5kRm4oKTtcbiAgICAgICAgICAgICAgICBpZiAoYm91bmRGblZhbCBpbnN0YW5jZW9mIFByb21pc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgYm91bmRGblZhbC50aGVuKCByZXNwb25zZSA9PiByZXNwb25zZSwgZXJyID0+IGVycik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJvdW5kRm5WYWw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGlmKGNoaWxkICYmICFjaGlsZC53aWRnZXQuZXZlbnRIYW5kbGVycylcbiAgICAgICAgICAgIGNoaWxkLndpZGdldC5ldmVudEhhbmRsZXJzID0gbmV3IE1hcDxzdHJpbmcsIHtjYWxsYmFjazogRnVuY3Rpb24sIGxvY2Fsczog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gICAgICAgIHRoaXMuaW5pdFN0YXRlLmRlbGV0ZShwcm9wTmFtZSk7XG4gICAgICAgIGxldCB2aWV3UGFyZW50ICA9IGNoaWxkID8gY2hpbGQud2lkZ2V0LnZpZXdQYXJlbnQudmlld1BhcmVudCA6IHRoaXMudmlld1BhcmVudCxcbiAgICAgICAgICAgIGNvbnRleHQgICAgID0gY2hpbGQgPyBjaGlsZC53aWRnZXQuY29udGV4dCA6IHRoaXMuY29udGV4dCxcbiAgICAgICAgICAgIHdpZGdldCAgICAgID0gY2hpbGQgPyBjaGlsZC53aWRnZXQgOiB0aGlzLndpZGdldCxcbiAgICAgICAgICAgIGlzTXV0ZWQgICAgID0gY2hpbGQgPyBjaGlsZC53aWRnZXQuaXNNdXRlZCA6IHRoaXMuaXNNdXRlZCxcbiAgICAgICAgICAgIHdpZGdldFByb3BzID0gY2hpbGQgPyBjaGlsZC53aWRnZXQud2lkZ2V0UHJvcHMgOiB0aGlzLndpZGdldFByb3BzLFxuICAgICAgICAgICAgd2lkZ2V0SWQgICAgPSBjaGlsZCA/IGNoaWxkLndpZGdldC53aWRnZXRJZCA6IHRoaXMud2lkZ2V0SWQ7XG4gICAgICAgIHRoaXMucmVnaXN0ZXJEZXN0cm95TGlzdGVuZXIoXG4gICAgICAgICAgICAkd2F0Y2goXG4gICAgICAgICAgICAgICAgZXhwcixcbiAgICAgICAgICAgICAgICB2aWV3UGFyZW50LFxuICAgICAgICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgICAgICAgbnYgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZihwcm9wTmFtZS5zdGFydHNXaXRoKCdiYXNlLScpICYmIHdpZGdldC51cGRhdGVEYXRhKVxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkZ2V0LnVwZGF0ZURhdGEocHJvcE5hbWUsIG52KTtcbiAgICAgICAgICAgICAgICAgICAgd2lkZ2V0W3Byb3BOYW1lXSA9IG52XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBnZXRXYXRjaElkZW50aWZpZXIod2lkZ2V0SWQsIHByb3BOYW1lKSxcbiAgICAgICAgICAgICAgICBwcm9wTmFtZSA9PT0gJ2RhdGFzb3VyY2UnLFxuICAgICAgICAgICAgICAgIHdpZGdldFByb3BzLmdldChwcm9wTmFtZSksXG4gICAgICAgICAgICAgICAgKCkgPT4gaXNNdXRlZFxuICAgICAgICAgICAgKVxuICAgICAgICApO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFJlbW92ZSB3YXRjaCBvbiB0aGUgYm91bmQgcHJvcGVydHlcbiAgICAgKi9cbiAgICBwcm90ZWN0ZWQgcmVtb3ZlUHJvcGVydHlCaW5kaW5nKHByb3BOYW1lOiBzdHJpbmcpIHtcbiAgICAgICAgJHVud2F0Y2goZ2V0V2F0Y2hJZGVudGlmaWVyKHRoaXMud2lkZ2V0SWQsIHByb3BOYW1lKSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogaW52b2tlIHRoZSBldmVudCBjYWxsYmFjayBtZXRob2RcbiAgICAgKiBAcGFyYW0ge3N0cmluZ30gZXZlbnROYW1lXG4gICAgICogQHBhcmFtIGV4dHJhTG9jYWxzXG4gICAgICovXG4gICAgcHVibGljIGludm9rZUV2ZW50Q2FsbGJhY2soZXZlbnROYW1lOiBzdHJpbmcsIGV4dHJhTG9jYWxzPzogYW55KSB7XG4gICAgICAgIGNvbnN0IGNhbGxiYWNrSW5mbyA9IHRoaXMuZXZlbnRIYW5kbGVycy5nZXQoZXZlbnROYW1lKTtcbiAgICAgICAgaWYgKGNhbGxiYWNrSW5mbykge1xuICAgICAgICAgICAgY29uc3QgZm4gPSBjYWxsYmFja0luZm8uY2FsbGJhY2s7XG4gICAgICAgICAgICBjb25zdCBsb2NhbHMgPSBjYWxsYmFja0luZm8ubG9jYWxzIHx8IHt9O1xuXG4gICAgICAgICAgICBpZiAoZm4pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4oT2JqZWN0LmFzc2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