@wavemaker/app-ng-runtime 12.0.0-next.45031 → 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
@@ -1,3 +0,0 @@
1
- export * from './custom-widget.module';
2
- export * from './custom-widget-container/custom-widget-container.directive';
3
- export * from './custom-widget.directive';
@@ -1,39 +0,0 @@
1
- import { Attribute, Directive, ElementRef, Inject, Injector, Self, ViewContainerRef } from '@angular/core';
2
- import { App, ComponentType, CustomWidgetRefProvider } from '@wm/core';
3
- import { WidgetRef } from "../../framework/types";
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@wm/core";
6
- export class CustomWidgetContainerDirective {
7
- constructor(componentInstance, vcRef, elRef, inj, app, widgetname, customWidgetRefProvider) {
8
- this.componentInstance = componentInstance;
9
- this.vcRef = vcRef;
10
- this.elRef = elRef;
11
- this.inj = inj;
12
- this.app = app;
13
- this.customWidgetRefProvider = customWidgetRefProvider;
14
- const widgetnames = this.componentInstance.widgetname;
15
- this.customWidgetRefProvider.getComponentFactoryRef(widgetname, ComponentType.WIDGET).then((componentFactory) => {
16
- if (componentFactory) {
17
- const instanceRef = this.vcRef.createComponent(componentFactory, 0, this.inj);
18
- this.elRef.nativeElement.appendChild(instanceRef.location.nativeElement);
19
- }
20
- });
21
- }
22
- 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)); }; }
23
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: CustomWidgetContainerDirective, selectors: [["", "customWidgetContainer", "", "widgetname", ""]] }); }
24
- }
25
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomWidgetContainerDirective, [{
26
- type: Directive,
27
- args: [{
28
- selector: '[customWidgetContainer][widgetname]'
29
- }]
30
- }], () => [{ type: undefined, decorators: [{
31
- type: Self
32
- }, {
33
- type: Inject,
34
- args: [WidgetRef]
35
- }] }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.Injector }, { type: i1.App }, { type: undefined, decorators: [{
36
- type: Attribute,
37
- args: ['widgetname']
38
- }] }, { type: i1.CustomWidgetRefProvider }], null); })();
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLXdpZGdldC1jb250YWluZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy9iYXNlL3NyYy93aWRnZXRzL2NvbW1vbi9iYXNlL2N1c3RvbS13aWRnZXQtY29udGFpbmVyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUE0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sXG4gICAgICAgIHB1YmxpYyB2Y1JlZjogVmlld0NvbnRhaW5lclJlZixcbiAgICAgICAgcHVibGljIGVsUmVmOiBFbGVtZW50UmVmLFxuICAgICAgICBwdWJsaWMgaW5qOiBJbmplY3RvcixcbiAgICAgICAgcHJpdmF0ZSBhcHA6IEFwcCxcbiAgICAgICAgQEF0dHJpYnV0ZSgnd2lkZ2V0bmFtZScpIHdpZGdldG5hbWU6IHN0cmluZyxcbiAgICAgICAgcHJpdmF0ZSBjdXN0b21XaWRnZXRSZWZQcm92aWRlcjogQ3VzdG9tV2lkZ2V0UmVmUHJvdmlkZXJcbiAgICApIHtcbiAgICAgICAgY29uc3Qgd2lkZ2V0bmFtZXMgPSB0aGlzLmNvbXBvbmVudEluc3RhbmNlLndpZGdldG5hbWU7XG4gICAgICAgIHRoaXMuY3VzdG9tV2lkZ2V0UmVmUHJvdmlkZXIuZ2V0Q29tcG9uZW50RmFjdG9yeVJlZih3aWRnZXRuYW1lLCBDb21wb25lbnRUeXBlLldJREdFVCkudGhlbigoY29tcG9uZW50RmFjdG9yeSkgPT4ge1xuICAgICAgICAgICAgaWYgKGNvbXBvbmVudEZhY3RvcnkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpbnN0YW5jZVJlZiA9IHRoaXMudmNSZWYuY3JlYXRlQ29tcG9uZW50KGNvbXBvbmVudEZhY3RvcnksIDAsIHRoaXMuaW5qKTtcbiAgICAgICAgICAgICAgICB0aGlzLmVsUmVmLm5hdGl2ZUVsZW1lbnQuYXBwZW5kQ2hpbGQoaW5zdGFuY2VSZWYubG9jYXRpb24ubmF0aXZlRWxlbWVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn0iXX0=
@@ -1,14 +0,0 @@
1
- import { ElementRef, Injector, ViewContainerRef } from '@angular/core';
2
- import { App, CustomWidgetRefProvider } from '@wm/core';
3
- import * as i0 from "@angular/core";
4
- export declare class CustomWidgetContainerDirective {
5
- componentInstance: any;
6
- vcRef: ViewContainerRef;
7
- elRef: ElementRef;
8
- inj: Injector;
9
- private app;
10
- private customWidgetRefProvider;
11
- constructor(componentInstance: any, vcRef: ViewContainerRef, elRef: ElementRef, inj: Injector, app: App, widgetname: string, customWidgetRefProvider: CustomWidgetRefProvider);
12
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomWidgetContainerDirective, [{ self: true; }, null, null, null, null, { attribute: "widgetname"; }, null]>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<CustomWidgetContainerDirective, "[customWidgetContainer][widgetname]", never, {}, {}, never, never, false, never>;
14
- }
@@ -1,72 +0,0 @@
1
- import { AfterViewInit, Injector, OnDestroy } from '@angular/core';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
- import { Subject } from 'rxjs';
4
- import { AbstractI18nService, AbstractNavigationService, App, Viewport, ScriptLoaderService } from '@wm/core';
5
- import { PageDirective, SpaPageDirective } from '@wm/components/page';
6
- import { PrefabDirective } from '@wm/components/prefab';
7
- import { FragmentMonitor } from '../util/fragment-monitor';
8
- import { AppManagerService } from '../services/app.manager.service';
9
- import * as i0 from "@angular/core";
10
- export declare abstract class BaseCustomWidgetComponent extends FragmentMonitor implements AfterViewInit, OnDestroy {
11
- Widgets: any;
12
- BaseWidget: any;
13
- Variables: any;
14
- Actions: any;
15
- App: App;
16
- injector: Injector;
17
- customWidgetName: string;
18
- activePageName: string;
19
- route: ActivatedRoute;
20
- appManager: AppManagerService;
21
- navigationService: AbstractNavigationService;
22
- router: Router;
23
- props: any;
24
- containerWidget: any;
25
- i18nService: AbstractI18nService;
26
- appLocale: any;
27
- pageDirective: PageDirective | SpaPageDirective;
28
- Prefab: PrefabDirective;
29
- scriptLoaderService: ScriptLoaderService;
30
- Viewport: Viewport;
31
- compileContent: boolean;
32
- spa: boolean;
33
- events: any;
34
- destroy$: Subject<unknown>;
35
- viewInit$: Subject<unknown>;
36
- private viewParent;
37
- abstract evalUserScript(prefabContext: any, appContext: any, utils: any): any;
38
- abstract getVariables(): any;
39
- abstract getExpressions(): any;
40
- getContainerWidgetInjector(): any;
41
- init(): void;
42
- registerWidgets(): void;
43
- initializeComponentData(children: any): void;
44
- registerBaseWidget(): void;
45
- invokeEvent: (eventName: string) => void;
46
- registerEvents(): void;
47
- registerDestroyListener(fn: Function): void;
48
- registerChangeListeners(): void;
49
- initUserScript(): void;
50
- initVariables(): void;
51
- /**
52
- * function to register bind expressions generated in this partial instance
53
- * getExpressions function is defined in the generated page.comp.ts file
54
- * @param expressions, map of bind expression vs generated function
55
- */
56
- registerExpressions(): void;
57
- registerProps(): void;
58
- defineI18nProps(): void;
59
- invokeOnReady(): void;
60
- private loadScripts;
61
- registerPropsInContainerWidget(resolveFn: Function): void;
62
- mute(): void;
63
- unmute(): void;
64
- ngAfterViewInit(): void;
65
- ngOnDestroy(): void;
66
- ngOnAttach(refreshData: any): void;
67
- ngOnDetach(): void;
68
- onPropertyChange(): void;
69
- onReady(params?: any): void;
70
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseCustomWidgetComponent, never>;
71
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseCustomWidgetComponent, never, never, {}, {}, never, never, false, never>;
72
- }
@@ -1,288 +0,0 @@
1
- import { Directive, inject } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import { $invokeWatchers, AbstractI18nService, App, noop, Viewport, ScriptLoaderService, UtilsService, registerFnByExpr, $watch, isIE } from '@wm/core';
4
- import { WidgetRef } from '@wm/components/base';
5
- import { PageDirective, SpaPageDirective } from '@wm/components/page';
6
- import { VariablesService } from '@wm/variables';
7
- import { FragmentMonitor } from '../util/fragment-monitor';
8
- import { commonPartialWidgets } from "./base-partial.component";
9
- import { capitalize, forEach } from "lodash-es";
10
- import { CheckboxsetComponent, RadiosetComponent } from "@wm/components/input";
11
- import * as i0 from "@angular/core";
12
- // export const commonPartialWidgets = {};
13
- export class BaseCustomWidgetComponent extends FragmentMonitor {
14
- constructor() {
15
- super(...arguments);
16
- this.BaseWidget = {};
17
- this.compileContent = false;
18
- this.destroy$ = new Subject();
19
- this.viewInit$ = new Subject();
20
- this.invokeEvent = (eventName) => {
21
- this.events[eventName]();
22
- };
23
- }
24
- getContainerWidgetInjector() {
25
- return this.containerWidget.inj || this.containerWidget.injector;
26
- }
27
- init() {
28
- let resolveFn;
29
- const promise = new Promise((res) => resolveFn = res);
30
- this.App = this.injector ? this.injector.get(App) : inject(App);
31
- //making the code compatible in both the JIT and AOT modes
32
- this.containerWidget = this.injector ? this.injector.get(WidgetRef) : inject(WidgetRef);
33
- this.i18nService = this.injector ? this.injector.get(AbstractI18nService) : inject(AbstractI18nService);
34
- this.scriptLoaderService = this.injector ? this.injector.get(ScriptLoaderService) : inject(ScriptLoaderService);
35
- this.Viewport = this.injector ? this.injector.get(Viewport) : inject(Viewport);
36
- // this.viewContainerRef = this.getContainerWidgetInjector().get(ViewContainerRef);
37
- // Replacing this.getContainerWidgetInjector().view.component as viewParent
38
- // this.viewParent = (this.viewContainerRef as any).parentInjector._lView[8];
39
- this.viewParent = this.containerWidget.viewParent;
40
- if (this.viewParent.registerFragment) {
41
- this.viewParent.registerFragment();
42
- }
43
- // register functions for binding evaluation
44
- this.registerExpressions();
45
- this.initUserScript();
46
- this.registerPropsInContainerWidget(resolveFn);
47
- // Using promise to make sure the props are registered in the container widget before registering events, Otherwise no events will be registered
48
- promise.then(() => this.registerEvents());
49
- this.registerWidgets();
50
- this.initVariables();
51
- this.activePageName = this.App.activePageName; // Todo: remove this
52
- this.registerProps();
53
- this.defineI18nProps();
54
- this.viewInit$.subscribe(noop, noop, () => {
55
- this.props = this.containerWidget.props;
56
- });
57
- if (this.spa) {
58
- this.pageDirective = this.injector ? this.injector.get(SpaPageDirective) : inject(SpaPageDirective);
59
- }
60
- else {
61
- this.pageDirective = this.injector ? this.injector.get(PageDirective) : inject(PageDirective);
62
- }
63
- if (this.pageDirective) {
64
- this.registerDestroyListener(this.pageDirective.subscribe('attach', data => this.ngOnAttach(data.refreshData)));
65
- this.registerDestroyListener(this.pageDirective.subscribe('detach', () => this.ngOnDetach()));
66
- }
67
- super.init();
68
- }
69
- registerWidgets() {
70
- // common partial widgets should be accessible from page
71
- this.Widgets = Object.create(commonPartialWidgets);
72
- // expose current page widgets on app
73
- this.App.Widgets = Object.create(this.Widgets);
74
- }
75
- initializeComponentData(children) {
76
- Array.from(children).forEach((child) => {
77
- if (!child.hasAttribute('wmcustomwidget'))
78
- this.initializeComponentData(child.children);
79
- else {
80
- let baseWidget, splitArr = child.getAttribute('as').split('-'), modifiedArr = [];
81
- modifiedArr = splitArr.map((item) => {
82
- item = item !== 'wm' ? capitalize(item) : item;
83
- return item;
84
- });
85
- baseWidget = modifiedArr.join('');
86
- switch (baseWidget) {
87
- case 'wmCheckboxset':
88
- this[baseWidget] = new CheckboxsetComponent(this.injector, undefined);
89
- this[baseWidget]["_select"] = (item, $event) => {
90
- const keys = [];
91
- forEach(this[baseWidget].datasetItems, (datasetItem) => {
92
- if (datasetItem.key === item.key)
93
- datasetItem.selected = !datasetItem.selected;
94
- if (datasetItem.selected)
95
- keys.push(datasetItem.key);
96
- });
97
- this[baseWidget].triggerInvokeOnChange(keys, $event);
98
- };
99
- break;
100
- case 'wmRadioset':
101
- this[baseWidget] = new RadiosetComponent(this.injector, undefined);
102
- this[baseWidget]["_select"] = (item, $event) => {
103
- this[baseWidget].triggerInvokeOnChange(item.key, $event);
104
- };
105
- break;
106
- }
107
- for (let [key, value] of this.containerWidget.$attrs) {
108
- if (key.startsWith('base-')) {
109
- let modifiedKey = key.replace('base-', '');
110
- this[baseWidget][modifiedKey] = value;
111
- }
112
- }
113
- this[baseWidget].initDatasetItems();
114
- this.containerWidget[baseWidget] = this[baseWidget];
115
- }
116
- });
117
- }
118
- registerBaseWidget() {
119
- this.initializeComponentData(this.containerWidget.nativeElement.children);
120
- }
121
- registerEvents() {
122
- this.events = {};
123
- this.containerWidget.eventHandlers.forEach((callback, key) => {
124
- this.events[key] = (...args) => {
125
- this.containerWidget.invokeEventCallback(key, { $event: args[0], $data: args[1] });
126
- };
127
- });
128
- }
129
- registerDestroyListener(fn) {
130
- this.destroy$.subscribe(noop, noop, () => fn());
131
- }
132
- registerChangeListeners() {
133
- this.containerWidget.registerPropertyChangeListener(this.onPropertyChange);
134
- this.containerWidget.registerStyleChangeListener(this.onPropertyChange);
135
- }
136
- initUserScript() {
137
- try {
138
- // partials inside prefab should have access to Prefab properties and events
139
- if (this.viewParent.prefabName) {
140
- // for partial within partial within prefabs, just assign the parent partial's prefab object
141
- if (this.viewParent.Prefab) {
142
- this.Prefab = this.viewParent.Prefab;
143
- }
144
- else {
145
- this.Prefab = this.viewParent;
146
- }
147
- }
148
- this.evalUserScript(this, this.App, this.injector ? this.injector.get(UtilsService) : inject(UtilsService));
149
- }
150
- catch (e) {
151
- console.error(`Error in evaluating partial (${this.customWidgetName}) script\n`, e);
152
- }
153
- }
154
- initVariables() {
155
- const variablesService = this.injector ? this.injector.get(VariablesService) : inject(VariablesService);
156
- // get variables and actions instances for the page
157
- const variableCollection = variablesService.register(this.customWidgetName, this.getVariables(), this);
158
- // create namespace for Variables nad Actions on page/partial, which inherits the Variables and Actions from App instance
159
- this.Variables = Object.create(this.App.Variables);
160
- this.Actions = Object.create(this.App.Actions);
161
- this.containerWidget.Variables = this.Variables;
162
- this.containerWidget.Actions = this.Actions;
163
- // assign all the page variables to the pageInstance
164
- Object.entries(variableCollection.Variables).forEach(([name, variable]) => this.Variables[name] = variable);
165
- Object.entries(variableCollection.Actions).forEach(([name, action]) => this.Actions[name] = action);
166
- this.viewInit$.subscribe(noop, noop, () => {
167
- // TEMP: triggering watchers so variables watching over params are updated
168
- $invokeWatchers(true, true);
169
- variableCollection.callback(variableCollection.Variables).catch(noop);
170
- variableCollection.callback(variableCollection.Actions);
171
- });
172
- }
173
- /**
174
- * function to register bind expressions generated in this partial instance
175
- * getExpressions function is defined in the generated page.comp.ts file
176
- * @param expressions, map of bind expression vs generated function
177
- */
178
- registerExpressions() {
179
- const expressions = this.getExpressions();
180
- _.each(expressions, (fn, expr) => {
181
- registerFnByExpr(expr, fn[0], fn[1]);
182
- });
183
- }
184
- registerProps() {
185
- this.props = this.containerWidget.props;
186
- }
187
- defineI18nProps() {
188
- this.appLocale = this.i18nService.getAppLocale();
189
- }
190
- invokeOnReady() {
191
- let params;
192
- if (this.containerWidget.userComponentParams) {
193
- params = this.containerWidget.userComponentParams;
194
- }
195
- this.onReady(params);
196
- if (this.viewParent.resolveFragment) {
197
- this.viewParent.resolveFragment();
198
- }
199
- }
200
- loadScripts() {
201
- // return new Promise<void>((resolve) => {
202
- // const scriptsRequired = this.partialDirective.$element.attr('scripts-to-load');
203
- // if (scriptsRequired) {
204
- // this.scriptLoaderService
205
- // .load(...scriptsRequired.split(','))
206
- // .then(resolve);
207
- // } else {
208
- // resolve();
209
- // }
210
- // });
211
- }
212
- registerPropsInContainerWidget(resolveFn) {
213
- window['resourceCache'].get(`./custom-widgets/${this.customWidgetName}/page.min.json`).then(({ config }) => {
214
- if (config) {
215
- Object.entries((config.properties || {})).forEach(([key, prop]) => {
216
- let expr;
217
- const value = _.trim(prop.value);
218
- if (_.startsWith(value, 'bind:')) {
219
- expr = value.replace('bind:', '');
220
- }
221
- Object.defineProperty(this, key, {
222
- get: () => this.containerWidget[key],
223
- set: nv => this.containerWidget.widget[key] = nv
224
- });
225
- if (expr) {
226
- //[Todo-CSP]: expr will be generated with prefab.comp.expr.ts
227
- this.registerDestroyListener($watch(expr, this, {}, nv => this.containerWidget.widget[key] = nv));
228
- }
229
- });
230
- }
231
- this.containerWidget.setProps(config, resolveFn);
232
- // Reassigning the proxy handler for prefab inbound properties as we
233
- // will get them only after the prefab config call.
234
- if (isIE()) {
235
- this.containerWidget.widget = this.containerWidget.createProxy();
236
- }
237
- });
238
- }
239
- mute() {
240
- const m = o => { o && o.mute && o.mute(); };
241
- _.each(this.Widgets, m);
242
- _.each(this.Variables, m);
243
- _.each(this.Actions, m);
244
- }
245
- unmute() {
246
- const um = o => { o && o.unmute && o.unmute(); };
247
- _.each(this.Widgets, um);
248
- _.each(this.Variables, um);
249
- _.each(this.Actions, um);
250
- }
251
- // ngOnInit() {
252
- // this.init();
253
- // }
254
- ngAfterViewInit() {
255
- this.registerChangeListeners();
256
- this.registerBaseWidget();
257
- setTimeout(() => {
258
- this.viewInit$.complete();
259
- this.fragmentsLoaded$.subscribe(noop, noop, () => this.invokeOnReady());
260
- }, 100);
261
- }
262
- ngOnDestroy() {
263
- this.destroy$.complete();
264
- }
265
- ngOnAttach(refreshData) {
266
- this.unmute();
267
- if (refreshData) {
268
- const refresh = v => { v && v.startUpdate && v.invoke && v.invoke(); };
269
- _.each(this.Variables, refresh);
270
- _.each(this.Actions, refresh);
271
- }
272
- _.each(this.Widgets, w => w && w.ngOnAttach && w.ngOnAttach());
273
- }
274
- ngOnDetach() {
275
- this.mute();
276
- _.each(this.Widgets, w => w && w.ngOnDetach && w.ngOnDetach());
277
- }
278
- // user overrides this
279
- onPropertyChange() { }
280
- onReady(params) {
281
- }
282
- static { this.ɵfac = /*@__PURE__*/ (() => { let ɵBaseCustomWidgetComponent_BaseFactory; return function BaseCustomWidgetComponent_Factory(t) { return (ɵBaseCustomWidgetComponent_BaseFactory || (ɵBaseCustomWidgetComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BaseCustomWidgetComponent)))(t || BaseCustomWidgetComponent); }; })(); }
283
- static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: BaseCustomWidgetComponent, features: [i0.ɵɵInheritDefinitionFeature] }); }
284
- }
285
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseCustomWidgetComponent, [{
286
- type: Directive
287
- }], null, null); })();
288
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1jdXN0b20td2lkZ2V0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4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KHRoaXMuQXBwIGFzIGFueSkuV2lkZ2V0cyA9IE9iamVjdC5jcmVhdGUodGhpcy5XaWRnZXRzKTtcbiAgICB9XG5cbiAgICBpbml0aWFsaXplQ29tcG9uZW50RGF0YShjaGlsZHJlbikge1xuICAgICAgICBBcnJheS5mcm9tKGNoaWxkcmVuKS5mb3JFYWNoKChjaGlsZDogYW55KSA9PiB7XG4gICAgICAgICAgICBpZighY2hpbGQuaGFzQXR0cmlidXRlKCd3bWN1c3RvbXdpZGdldCcpKVxuICAgICAgICAgICAgICAgIHRoaXMuaW5pdGlhbGl6ZUNvbXBvbmVudERhdGEoY2hpbGQuY2hpbGRyZW4pO1xuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbGV0IGJhc2VXaWRnZXQsIHNwbGl0QXJyID0gY2hpbGQuZ2V0QXR0cmlidXRlKCdhcycpLnNwbGl0KCctJyksIG1vZGlmaWVkQXJyID0gW107XG4gICAgICAgICAgICAgICAgbW9kaWZpZWRBcnIgPSBzcGxpdEFyci5tYXAoKGl0ZW06IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpdGVtID0gaXRlbSAhPT0gJ3dtJyA/IGNhcGl0YWxpemUoaXRlbSkgOiBpdGVtO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBiYXNlV2lkZ2V0ID0gbW9kaWZpZWRBcnIuam9pbignJyk7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChiYXNlV2lkZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3dtQ2hlY2tib3hzZXQnOlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tiYXNlV2lkZ2V0XSA9IG5ldyBDaGVja2JveHNldENvbXBvbmVudCh0aGlzLmluamVjdG9yLCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tiYXNlV2lkZ2V0XVtcIl9zZWxlY3RcIl0gPSAoaXRlbTogYW55LCAkZXZlbnQ6IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JFYWNoKHRoaXNbYmFzZVdpZGdldF0uZGF0YXNldEl0ZW1zLCAoZGF0YXNldEl0ZW06IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhc2V0SXRlbS5rZXkgPT09IGl0ZW0ua2V5KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YXNldEl0ZW0uc2VsZWN0ZWQgPSAhZGF0YXNldEl0ZW0uc2VsZWN0ZWQ7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YXNldEl0ZW0uc2VsZWN0ZWQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzLnB1c2goZGF0YXNldEl0ZW0ua2V5KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW2Jhc2VXaWRnZXRdLnRyaWdnZXJJbnZva2VPbkNoYW5nZShrZXlzLCAkZXZlbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3dtUmFkaW9zZXQnOlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tiYXNlV2lkZ2V0XSA9IG5ldyBSYWRpb3NldENvbXBvbmVudCh0aGlzLmluamVjdG9yLCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tiYXNlV2lkZ2V0XVtcIl9zZWxlY3RcIl0gPSAoaXRlbTogYW55LCAkZXZlbnQ6IGFueSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tiYXNlV2lkZ2V0XS50cmlnZ2VySW52b2tlT25DaGFuZ2UoaXRlbS5rZXksICRldmVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvciAobGV0IFtrZXksIHZhbHVlXSBvZiB0aGlzLmNvbnRhaW5lcldpZGdldC4kYXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYoa2V5LnN0YXJ0c1dpdGgoJ2Jhc2UtJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtb2RpZmllZEtleSA9IGtleS5yZXBsYWNlKCdiYXNlLScsICcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbYmFzZVdpZGdldF1bbW9kaWZpZWRLZXldID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpc1tiYXNlV2lkZ2V0XS5pbml0RGF0YXNldEl0ZW1zKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5jb250YWluZXJXaWRnZXRbYmFzZVdpZGdldF0gPSB0aGlzW2Jhc2VXaWRnZXRdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZWdpc3RlckJhc2VXaWRnZXQoKSB7XG4gICAgICAgIHRoaXMuaW5pdGlhbGl6ZUNvbXBvbmVudERhdGEodGhpcy5jb250YWluZXJXaWRnZXQubmF0aXZlRWxlbWVudC5jaGlsZHJlbik7XG4gICAgfVxuXG4gICAgaW52b2tlRXZlbnQgPSAoZXZlbnROYW1lOiBzdHJpbmcpID0+IHtcbiAgICAgICAgdGhpcy5ldmVudHNbZXZlbnROYW1lXSgpO1xuICAgIH1cblxuICAgIHJlZ2lzdGVyRXZlbnRzKCkge1xuICAgICAgICB0aGlzLmV2ZW50cyA9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sZSgpO1xuICAgIH1cblxuICAgIGludm9rZU9uUmVhZHkoKSB7XG4gICAgICAgIGxldCBwYXJhbXM7XG4gICAgICAgIGlmICh0aGlzLmNvbnRhaW5lcldpZGdldC51c2VyQ29tcG9uZW50UGFyYW1zKSB7XG4gICAgICAgICAgICBwYXJhbXMgPSB0aGlzLmNvbnRhaW5lcldpZGdldC51c2VyQ29tcG9uZW50UGFyYW1zO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMub25SZWFkeShwYXJhbXMpO1xuICAgICAgICBpZiAodGhpcy52aWV3UGFyZW50LnJlc29sdmVGcmFnbWVudCkge1xuICAgICAgICAgICAgdGhpcy52aWV3UGFyZW50LnJlc29sdmVGcmFnbWVudCgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBsb2FkU2NyaXB0cygpIHtcbiAgICAgICAgLy8gcmV0dXJuIG5ldyBQcm9taXNlPHZvaWQ+KChyZXNvbHZlKSA9PiB7XG4gICAgICAgIC8vICAgICBjb25zdCBzY3JpcHRzUmVxdWlyZWQgPSB0aGlzLnBhcnRpYWxEaXJlY3RpdmUuJGVsZW1lbnQuYXR0cignc2NyaXB0cy10by1sb2FkJyk7XG4gICAgICAgIC8vICAgICBpZiAoc2NyaXB0c1JlcXVpcmVkKSB7XG4gICAgICAgIC8vICAgICAgICAgdGhpcy5zY3JpcHRMb2FkZXJTZXJ2aWNlXG4gICAgICAgIC8vICAgICAgICAgICAgIC5sb2FkKC4uLnNjcmlwdHNSZXF1aXJlZC5zcGxpdCgnLCcpKVxuICAgICAgICAvLyAgICAgICAgICAgICAudGhlbihyZXNvbHZlKTtcbiAgICAgICAgLy8gICAgIH0gZWxzZSB7XG4gICAgICAgIC8vICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAvLyAgICAgfVxuICAgICAgICAvLyB9KTtcbiAgICB9XG4gICAgcmVnaXN0ZXJQcm9wc0luQ29udGFpbmVyV2lkZ2V0KHJlc29sdmVGbjogRnVuY3Rpb24pIHtcbiAgICAgICAgd2luZG93WydyZXNvdXJjZUNhY2hlJ10uZ2V0KGAuL2N1c3RvbS13aWRnZXRzLyR7dGhpcy5jdXN0b21XaWRnZXROYW1lfS9wYWdlLm1pbi5qc29uYCkudGhlbigoeyBjb25maWcgfSkgPT4ge1xuICAgICAgICAgICAgaWYgKGNvbmZpZykge1xuICAgICAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKChjb25maWcucHJvcGVydGllcyB8fCB7fSkpLmZvckVhY2goKFtrZXksIHByb3BdOiBbc3RyaW5nLCBhbnldKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBleHByO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IF8udHJpbShwcm9wLnZhbHVlKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoXy5zdGFydHNXaXRoKHZhbHVlLCAnYmluZDonKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZXhwciA9IHZhbHVlLnJlcGxhY2UoJ2JpbmQ6JywgJycpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsIGtleSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0OiAoKSA9PiB0aGlzLmNvbnRhaW5lcldpZGdldFtrZXldLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0OiBudiA9PiB0aGlzLmNvbnRhaW5lcldpZGdldC53aWRnZXRba2V5XSA9IG52XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHByKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL1tUb2RvLUNTUF06IGV4cHIgd2lsbCBiZSBnZW5lcmF0ZWQgd2l0aCBwcmVmYWIuY29tcC5leHByLnRzXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlZ2lzdGVyRGVzdHJveUxpc3RlbmVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICR3YXRjaChleHByLCB0aGlzLCB7fSwgbnYgPT4gdGhpcy5jb250YWluZXJXaWRnZXQud2lkZ2V0W2tleV0gPSBudilcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb250YWluZXJXaWRnZXQuc2V0UHJvcHMoY29uZmlnLCByZXNvbHZlRm4pO1xuICAgICAgICAgICAgLy8gUmVhc3NpZ25pbmcgdGhlIHByb3h5IGhhbmRsZXIgZm9yIHByZWZhYiBpbmJvdW5kIHByb3BlcnRpZXMgYXMgd2VcbiAgICAgICAgICAgIC8vIHdpbGwgZ2V0IHRoZW0gb25seSBhZnRlciB0aGUgcHJlZmFiIGNvbmZpZyBjYWxsLlxuICAgICAgICAgICAgaWYgKGlzSUUoKSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyV2lkZ2V0LndpZGdldCA9IHRoaXMuY29udGFpbmVyV2lkZ2V0LmNyZWF0ZVByb3h5KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgfVxuXG4gICAgbXV0ZSgpIHtcbiAgICAgICAgY29uc3QgbSA9IG8gPT4geyBvICYmIG8ubXV0ZSAmJiBvLm11dGUoKTsgfTtcbiAgICAgICAgXy5lYWNoKHRoaXMuV2lkZ2V0cywgbSk7XG4gICAgICAgIF8uZWFjaCh0aGlzLlZhcmlhYmxlcywgbSk7XG4gICAgICAgIF8uZWFjaCh0aGlzLkFjdGlvbnMsIG0pO1xuICAgIH1cblxuICAgIHVubXV0ZSgpIHtcbiAgICAgICAgY29uc3QgdW0gPSBvID0+IHsgbyAmJiBvLnVubXV0ZSAmJiBvLnVubXV0ZSgpOyB9O1xuICAgICAgICBfLmVhY2godGhpcy5XaWRnZXRzLCB1bSk7XG4gICAgICAgIF8uZWFjaCh0aGlz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