@acorex/layout 5.1.6 → 5.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/acorex-layout.d.ts +5 -0
  2. package/esm2020/acorex-layout.mjs +5 -0
  3. package/esm2020/lib/widget-board/editors/widget-size-editor/widget-size.editor.mjs +46 -0
  4. package/esm2020/lib/widget-board/editors/widget-size-editor/widget-size.module.mjs +21 -0
  5. package/esm2020/lib/widget-board/widget-board.component.mjs +444 -0
  6. package/esm2020/lib/widget-board/widget-board.module.mjs +111 -0
  7. package/esm2020/lib/widget-board/widget-config.component.mjs +82 -0
  8. package/esm2020/lib/widget-board/widget-host.component.mjs +295 -0
  9. package/esm2020/lib/widget-board/widget-save.component.mjs +79 -0
  10. package/esm2020/lib/widget-board/widget.class.mjs +127 -0
  11. package/esm2020/public-api.mjs +7 -0
  12. package/fesm2015/acorex-layout.mjs +1174 -0
  13. package/fesm2015/acorex-layout.mjs.map +1 -0
  14. package/fesm2020/acorex-layout.mjs +1167 -0
  15. package/fesm2020/acorex-layout.mjs.map +1 -0
  16. package/lib/widget-board/editors/widget-size-editor/widget-size.editor.d.ts +19 -0
  17. package/lib/widget-board/editors/widget-size-editor/widget-size.module.d.ts +10 -0
  18. package/lib/widget-board/widget-board.component.d.ts +62 -0
  19. package/lib/widget-board/widget-board.module.d.ts +18 -0
  20. package/lib/widget-board/widget-config.component.d.ts +23 -0
  21. package/lib/widget-board/widget-host.component.d.ts +52 -0
  22. package/lib/widget-board/widget-save.component.d.ts +19 -0
  23. package/lib/widget-board/widget.class.d.ts +57 -0
  24. package/package.json +31 -11
  25. package/{src/public-api.ts → public-api.d.ts} +0 -0
  26. package/karma.conf.js +0 -32
  27. package/ng-package.json +0 -9
  28. package/src/lib/widget-board/editors/widget-size-editor/widget-size.editor.html +0 -6
  29. package/src/lib/widget-board/editors/widget-size-editor/widget-size.editor.ts +0 -55
  30. package/src/lib/widget-board/editors/widget-size-editor/widget-size.module.ts +0 -19
  31. package/src/lib/widget-board/widget-board.component.html +0 -7
  32. package/src/lib/widget-board/widget-board.component.scss +0 -198
  33. package/src/lib/widget-board/widget-board.component.ts +0 -514
  34. package/src/lib/widget-board/widget-board.module.ts +0 -74
  35. package/src/lib/widget-board/widget-config.component.html +0 -16
  36. package/src/lib/widget-board/widget-config.component.ts +0 -99
  37. package/src/lib/widget-board/widget-host.component.html +0 -30
  38. package/src/lib/widget-board/widget-host.component.ts +0 -350
  39. package/src/lib/widget-board/widget-save.component.html +0 -43
  40. package/src/lib/widget-board/widget-save.component.ts +0 -88
  41. package/src/lib/widget-board/widget.class.ts +0 -179
  42. package/src/test.ts +0 -28
  43. package/tsconfig.lib.json +0 -23
  44. package/tsconfig.lib.prod.json +0 -6
  45. package/tsconfig.spec.json +0 -17
  46. package/tslint.json +0 -17
@@ -0,0 +1,111 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { AXWidgetBoardComponent } from './widget-board.component';
3
+ import { CommonModule } from '@angular/common';
4
+ import { AXWidgetHostComponent } from './widget-host.component';
5
+ import { AXSearchBoxModule, AXLoadingModule, AXProppertyEditorModule, AXPageModule, AXLabelModule, AXToolbarModule, AXTabStripModule, AXMenuModule, AXFormGroupModule, AXTextAreaModule, AXTextBoxModule, AXFieldsetModule, AXCheckBoxModule, AXValidationModule } from '@acorex/components';
6
+ import { RouterModule } from '@angular/router';
7
+ import { AXWidgetConfigComponent } from './widget-config.component';
8
+ import { AXTranslator, AXTranslatorModule } from '@acorex/core';
9
+ import { AXWidgetSizePropertyEditorComponent } from './editors/widget-size-editor/widget-size.editor';
10
+ import { AXWidgetSaveComponent } from './widget-save.component';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "@angular/router";
13
+ export class AXWidgetBoardModule {
14
+ /**
15
+ *
16
+ */
17
+ constructor() {
18
+ AXTranslator.load('en', {
19
+ 'widget-board': {
20
+ 'configurable-props': 'Configurable Properties',
21
+ configure: 'Configure Widget'
22
+ }
23
+ });
24
+ AXTranslator.load('fa', {
25
+ 'widget-board': {
26
+ 'configurable-props': 'ویژگی های قابل تنظیم',
27
+ configure: 'پیکر بندی ابزارک'
28
+ }
29
+ });
30
+ }
31
+ }
32
+ AXWidgetBoardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
33
+ AXWidgetBoardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, declarations: [AXWidgetBoardComponent, AXWidgetHostComponent, AXWidgetConfigComponent, AXWidgetSaveComponent], imports: [CommonModule,
34
+ AXSearchBoxModule,
35
+ AXLoadingModule,
36
+ RouterModule,
37
+ AXProppertyEditorModule,
38
+ AXPageModule,
39
+ AXToolbarModule,
40
+ AXTranslatorModule,
41
+ AXLabelModule,
42
+ AXTextAreaModule,
43
+ AXFieldsetModule,
44
+ AXTextBoxModule,
45
+ AXFormGroupModule,
46
+ AXTabStripModule,
47
+ AXCheckBoxModule,
48
+ AXMenuModule,
49
+ AXTranslatorModule,
50
+ AXValidationModule, i1.RouterModule], exports: [AXWidgetBoardComponent, AXProppertyEditorModule] });
51
+ AXWidgetBoardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, providers: [], imports: [[
52
+ CommonModule,
53
+ AXSearchBoxModule,
54
+ AXLoadingModule,
55
+ RouterModule,
56
+ AXProppertyEditorModule,
57
+ AXPageModule,
58
+ AXToolbarModule,
59
+ AXTranslatorModule,
60
+ AXLabelModule,
61
+ AXTextAreaModule,
62
+ AXFieldsetModule,
63
+ AXTextBoxModule,
64
+ AXFormGroupModule,
65
+ AXTabStripModule,
66
+ AXCheckBoxModule,
67
+ AXMenuModule,
68
+ AXTranslatorModule,
69
+ AXValidationModule,
70
+ RouterModule.forChild([
71
+ {
72
+ component: AXWidgetSizePropertyEditorComponent,
73
+ path: 'ax/editors/widget-size'
74
+ },
75
+ ])
76
+ ], AXProppertyEditorModule] });
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, decorators: [{
78
+ type: NgModule,
79
+ args: [{
80
+ imports: [
81
+ CommonModule,
82
+ AXSearchBoxModule,
83
+ AXLoadingModule,
84
+ RouterModule,
85
+ AXProppertyEditorModule,
86
+ AXPageModule,
87
+ AXToolbarModule,
88
+ AXTranslatorModule,
89
+ AXLabelModule,
90
+ AXTextAreaModule,
91
+ AXFieldsetModule,
92
+ AXTextBoxModule,
93
+ AXFormGroupModule,
94
+ AXTabStripModule,
95
+ AXCheckBoxModule,
96
+ AXMenuModule,
97
+ AXTranslatorModule,
98
+ AXValidationModule,
99
+ RouterModule.forChild([
100
+ {
101
+ component: AXWidgetSizePropertyEditorComponent,
102
+ path: 'ax/editors/widget-size'
103
+ },
104
+ ])
105
+ ],
106
+ exports: [AXWidgetBoardComponent, AXProppertyEditorModule],
107
+ declarations: [AXWidgetBoardComponent, AXWidgetHostComponent, AXWidgetConfigComponent, AXWidgetSaveComponent],
108
+ providers: []
109
+ }]
110
+ }], ctorParameters: function () { return []; } });
111
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LWJvYXJkLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Fjb3JleC9sYXlvdXQvc3JjL2xpYi93aWRnZXQtYm9hcmQvd2lkZ2V0LWJvYXJkLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ2xFLE9BQU8sRUFBRSxZQUFZ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wgQVhXaWRnZXRTYXZlQ29tcG9uZW50XSxcclxuICAgIHByb3ZpZGVyczogW11cclxufSlcclxuZXhwb3J0IGNsYXNzIEFYV2lkZ2V0Qm9hcmRNb2R1bGUge1xyXG4gICAgLyoqXHJcbiAgICAgKlxyXG4gICAgICovXHJcbiAgICBjb25zdHJ1Y3RvcigpIHtcclxuICAgICAgICBBWFRyYW5zbGF0b3IubG9hZCgnZW4nLCB7XHJcbiAgICAgICAgICAgICd3aWRnZXQtYm9hcmQnOiB7XHJcbiAgICAgICAgICAgICAgICAnY29uZmlndXJhYmxlLXByb3BzJzogJ0NvbmZpZ3VyYWJsZSBQcm9wZXJ0aWVzJyxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyZTogJ0NvbmZpZ3VyZSBXaWRnZXQnXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgICBBWFRyYW5zbGF0b3IubG9hZCgnZmEnLCB7XHJcbiAgICAgICAgICAgICd3aWRnZXQtYm9hcmQnOiB7XHJcbiAgICAgICAgICAgICAgICAnY29uZmlndXJhYmxlLXByb3BzJzogJ9mI24zamNqv24wg2YfYp9uMINmC2KfYqNmEINiq2YbYuNuM2YUnLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJlOiAn2b7bjNqp2LEg2KjZhtiv24wg2KfYqNiy2KfYsdqpJ1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgfVxyXG5cclxufVxyXG4iXX0=
@@ -0,0 +1,82 @@
1
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild } from '@angular/core';
2
+ import { AXBasePopupPageComponent, AXValidationFormComponent } from '@acorex/components';
3
+ import { AXTranslator } from '@acorex/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@acorex/components";
6
+ import * as i2 from "@angular/common";
7
+ import * as i3 from "@acorex/core";
8
+ export class AXWidgetConfigComponent extends AXBasePopupPageComponent {
9
+ constructor(cdr) {
10
+ super();
11
+ this.cdr = cdr;
12
+ this.props = [];
13
+ this.displayProps = [];
14
+ this.changes = [];
15
+ this.context = {};
16
+ }
17
+ getFooterButtons() {
18
+ return [
19
+ {
20
+ name: 'okay',
21
+ submitBehavior: true,
22
+ text: AXTranslator.get('common.confirm'),
23
+ style: 'success'
24
+ },
25
+ {
26
+ name: 'cancel',
27
+ cancelBehavior: true,
28
+ text: AXTranslator.get('common.cancel'),
29
+ style: 'danger blank'
30
+ }
31
+ ];
32
+ }
33
+ onFooterButtonClick(e) {
34
+ if (e.name === 'cancel') {
35
+ this.close();
36
+ }
37
+ if (e.name === 'okay') {
38
+ this.form.validate().then(c => {
39
+ if (c.result) {
40
+ this.close(this.changes);
41
+ }
42
+ });
43
+ }
44
+ }
45
+ handleValueChange(e) {
46
+ const prop = this.changes.find(c => c.property.name === e.property.name);
47
+ if (prop) {
48
+ prop.value = e.value;
49
+ }
50
+ else {
51
+ this.changes.push({ property: e.property, value: e.value });
52
+ }
53
+ this.updateContext();
54
+ }
55
+ ngOnInit() {
56
+ this.displayProps = this.props.filter(c => c.property.visible !== false).sort((a, b) => a.property.order - b.property.order);
57
+ this.updateContext();
58
+ }
59
+ updateContext() {
60
+ const ctx = {};
61
+ this.props.forEach(p => {
62
+ ctx[p.property.name] = p.value;
63
+ });
64
+ this.changes.forEach(p => {
65
+ ctx[p.property.name] = p.value;
66
+ });
67
+ this.context = ctx;
68
+ }
69
+ identify(index, item) {
70
+ return item.property.name;
71
+ }
72
+ }
73
+ AXWidgetConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetConfigComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
74
+ AXWidgetConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXWidgetConfigComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: AXValidationFormComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-page>\r\n <ax-page-content>\r\n <div class=\"container\">\r\n <ax-validation-form #form>\r\n <div class=\"row\" *ngFor=\"let p of displayProps; trackBy: identify\">\r\n <div class=\"col-12\">\r\n <ax-label>{{p.property.title | trans}}</ax-label>\r\n <ng-container ax-property-editor-renderer [property]=\"p\" [context]=\"context\" [host]=\"widget\" [validationForm]=\"form\"\r\n (onValueChange)=\"handleValueChange($event)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ax-validation-form>\r\n </div>\r\n </ax-page-content>\r\n</ax-page>", components: [{ type: i1.AXPageComponent, selector: "ax-page" }, { type: i1.AXPageContentComponent, selector: "ax-page-content" }, { type: i1.AXValidationFormComponent, selector: "ax-validation-form", inputs: ["validateOn"], outputs: ["onInit"] }, { type: i1.AXLabelComponent, selector: "ax-label", inputs: ["size"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.AXPropertyEditorRendererDirective, selector: "[ax-property-editor-renderer]", inputs: ["property", "validationForm", "context", "host", "groupId"], outputs: ["onValueChange"] }], pipes: { "trans": i3.AXTranslatorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetConfigComponent, decorators: [{
76
+ type: Component,
77
+ args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ax-page>\r\n <ax-page-content>\r\n <div class=\"container\">\r\n <ax-validation-form #form>\r\n <div class=\"row\" *ngFor=\"let p of displayProps; trackBy: identify\">\r\n <div class=\"col-12\">\r\n <ax-label>{{p.property.title | trans}}</ax-label>\r\n <ng-container ax-property-editor-renderer [property]=\"p\" [context]=\"context\" [host]=\"widget\" [validationForm]=\"form\"\r\n (onValueChange)=\"handleValueChange($event)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ax-validation-form>\r\n </div>\r\n </ax-page-content>\r\n</ax-page>" }]
78
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { form: [{
79
+ type: ViewChild,
80
+ args: [AXValidationFormComponent]
81
+ }] } });
82
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LWNvbmZpZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hY29yZXgvbGF5b3V0L3NyYy9saWIvd2lkZ2V0LWJvYXJkL3dpZGdldC1jb25maWcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2xheW91dC9zcmMvbGliL3dpZGdldC1ib2FyZC93aWRnZXQtY29uZmlnLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsaUJBQWlCLEVBQUUsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3BILE9BQU8sRUFBb0Isd0JBQXdCLEVBQXlELHlCQUF5QixFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDbEssT0FBTyxFQUFnQixZQUFZLEVBQUUsTUFBTSxjQUFjLENBQUM7Ozs7O0FBVTFELE1BQU0sT0FBTyx1QkFBd0IsU0FBUSx3QkFBd0I7SUFJakUsWUFBb0IsR0FBc0I7UUFDdEMsS0FBSyxFQUFFLENBQUM7UUFEUSxRQUFHLEdBQUgsR0FBRyxDQUFtQjtRQU0xQyxVQUFLLEdBQXVCLEVBQUUsQ0FBQztRQUMvQixpQkFBWSxHQUF1QixFQUFFLENBQUM7UUFHdEMsWUFB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Zpb3I6IHRydWUsXHJcbiAgICAgICAgICAgICAgICB0ZXh0OiBBWFRyYW5zbGF0b3IuZ2V0KCdjb21tb24uY29uZmlybScpLFxyXG4gICAgICAgICAgICAgICAgc3R5bGU6ICdzdWNjZXNzJ1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiAnY2FuY2VsJyxcclxuICAgICAgICAgICAgICAgIGNhbmNlbEJlaGF2aW9yOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgdGV4dDogQVhUcmFuc2xhdG9yLmdldCgnY29tbW9uLmNhbmNlbCcpLFxyXG4gICAgICAgICAgICAgICAgc3R5bGU6ICdkYW5nZXIgYmxhbmsnXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICBdO1xyXG4gICAgfVxyXG5cclxuXHJcblxyXG5cclxuXHJcbiAgICBvbkZvb3RlckJ1dHRvbkNsaWNrKGU6IEFYTWVudUl0ZW1DbGlja0V2ZW50KSB7XHJcbiAgICAgICAgaWYgKGUubmFtZSA9PT0gJ2NhbmNlbCcpIHtcclxuICAgICAgICAgICAgdGhpcy5jbG9zZSgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZS5uYW1lID09PSAnb2theScpIHtcclxuICAgICAgICAgICAgdGhpcy5mb3JtLnZhbGlkYXRlKCkudGhlbihjID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChjLnJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2xvc2UodGhpcy5jaGFuZ2VzKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGhhbmRsZVZhbHVlQ2hhbmdlKGU6IEFYUHJvcGVyeUVkaXRvclZhbHVlQ2hhbmdlRXZlbnQpIHtcclxuICAgICAgICBjb25zdCBwcm9wID0gdGhpcy5jaGFuZ2VzLmZpbmQoYyA9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IHJldHVybiBpdGVtLnByb3BlcnR5Lm5hbWU7XHJcbiAgICB9XHJcblxyXG59IiwiPGF4LXBhZ2U+XHJcbiAgICA8YXgtcGFnZS1jb250ZW50PlxyXG4gICAgICAgIDxkaXYgY2xhc3M9XCJjb250YWluZXJcIj5cclxuICAgICAgICAgICAgPGF4LXZhbGlkYXRpb24tZm9ybSAjZm9ybT5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJyb3dcIiAqbmdGb3I9XCJsZXQgcCBvZiBkaXNwbGF5UHJvcHM7IHRyYWNrQnk6IGlkZW50aWZ5XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNvbC0xMlwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8YXgtbGFiZWw+e3twLnByb3BlcnR5LnRpdGxlIHwgdHJhbnN9fTwvYXgtbGFiZWw+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgYXgtcHJvcGVydHktZWRpdG9yLXJlbmRlcmVyIFtwcm9wZXJ0eV09XCJwXCIgW2NvbnRleHRdPVwiY29udGV4dFwiIFtob3N0XT1cIndpZGdldFwiICBbdmFsaWRhdGlvbkZvcm1dPVwiZm9ybVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAob25WYWx1ZUNoYW5nZSk9XCJoYW5kbGVWYWx1ZUNoYW5nZSgkZXZlbnQpXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvYXgtdmFsaWRhdGlvbi1mb3JtPlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9heC1wYWdlLWNvbnRlbnQ+XHJcbjwvYXgtcGFnZT4iXX0=
@@ -0,0 +1,295 @@
1
+ import { Component, ViewEncapsulation, Input, ElementRef, HostBinding, ComponentFactoryResolver, ViewChild, ViewContainerRef, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
2
+ import { AXObjectUtil, AXRenderService } from '@acorex/core';
3
+ import { AXPopupService, AXPropertyDecorators, AXLoadingService } from '@acorex/components';
4
+ import { AXWidgetConfigComponent } from './widget-config.component';
5
+ import { AXTranslator } from '@acorex/core';
6
+ import { AXWidgetSaveComponent } from './widget-save.component';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@acorex/core";
9
+ import * as i2 from "@acorex/components";
10
+ import * as i3 from "@angular/common";
11
+ export class AXWidgetHostComponent {
12
+ constructor(ref, componentFactoryResolver, rendererService, cdr, popup, loadingService) {
13
+ this.ref = ref;
14
+ this.componentFactoryResolver = componentFactoryResolver;
15
+ this.rendererService = rendererService;
16
+ this.cdr = cdr;
17
+ this.popup = popup;
18
+ this.loadingService = loadingService;
19
+ this._hasProps = false;
20
+ this._hasMenu = false;
21
+ this.configMenuItem = [
22
+ {
23
+ icon: 'far fa-ellipsis-h',
24
+ items: []
25
+ }
26
+ ];
27
+ this.onRemove = new EventEmitter();
28
+ this.onConfigChanged = new EventEmitter();
29
+ this.onResized = new EventEmitter();
30
+ this.onSave = new EventEmitter();
31
+ this.readonly = false;
32
+ this._isLoading = false;
33
+ this.sizeX = 1;
34
+ this.sizeY = 1;
35
+ this.col = 1;
36
+ this.row = 1;
37
+ }
38
+ get widget() {
39
+ return this._widget;
40
+ }
41
+ get element() {
42
+ return this.ref.nativeElement;
43
+ }
44
+ get isLoading() {
45
+ return this._isLoading;
46
+ }
47
+ set isLoading(v) {
48
+ this._isLoading = v;
49
+ if (this._loadingId && !v) {
50
+ this.loadingService.hide(this._loadingId);
51
+ this._loadingId = null;
52
+ }
53
+ if (v) {
54
+ this._loadingId = this.loadingService.show(this.ref.nativeElement);
55
+ }
56
+ }
57
+ get isConfigured() {
58
+ return this._widget?.isConfigured || false;
59
+ }
60
+ ngOnInit() {
61
+ this.isLoading = true;
62
+ }
63
+ async ngAfterViewInit() {
64
+ let component;
65
+ if (typeof this.config.component === 'string') {
66
+ const route = await this.rendererService.findLoadedComponentByRoute(this.config.component, 20);
67
+ component = route?.component;
68
+ }
69
+ else if (typeof this.config.component === 'function') {
70
+ component = this.config.component;
71
+ }
72
+ if (component == null) {
73
+ console.error(`Invalid Widget Component!`, this.config);
74
+ this.onRemove.emit(this);
75
+ return;
76
+ }
77
+ const widgetFactory = this.componentFactoryResolver.resolveComponentFactory(component);
78
+ this.componentRef = this.vc.createComponent(widgetFactory);
79
+ this._widget = this.componentRef.instance;
80
+ this._widget.provideValue = this.provideValue;
81
+ if (this._widget.onBusyChanged) {
82
+ this._widget.onBusyChanged.subscribe((d) => {
83
+ if (!this._widget.widgetSize) {
84
+ this._widget.setValue('widgetSize', [this.sizeX, this.sizeY]);
85
+ }
86
+ else {
87
+ this.setSizeFromOptions();
88
+ }
89
+ this.isLoading = d.value;
90
+ this.cdr.detectChanges();
91
+ });
92
+ }
93
+ if (this._widget.onConfiguredChanged) {
94
+ this._widget.onConfiguredChanged.subscribe(() => {
95
+ this.setSizeFromOptions();
96
+ });
97
+ }
98
+ //
99
+ if (this.config.options) {
100
+ Object.assign(this._widget, this.config.options);
101
+ }
102
+ this._hasProps = AXPropertyDecorators.getProperties(this._widget).length > 0;
103
+ this.isLoading = false;
104
+ this.config['__meta__'].instance = this;
105
+ this._widget['__meta__'] = {};
106
+ this._widget['__meta__'].config = this.config;
107
+ //
108
+ this.configMenuItem[0].items.push({
109
+ name: 'refresh',
110
+ icon: 'far fa-undo',
111
+ text: AXTranslator.get('common.refresh'),
112
+ onClick: () => {
113
+ this?.widget?.refresh();
114
+ }
115
+ });
116
+ //
117
+ if (this._hasProps) {
118
+ this.configMenuItem[0].items.push({
119
+ name: 'configs',
120
+ icon: 'far fa-cogs',
121
+ text: AXTranslator.get('common.configs'),
122
+ onClick: () => {
123
+ this.openConfigDialog();
124
+ }
125
+ });
126
+ }
127
+ this.configMenuItem[0].items.push({
128
+ name: 'save',
129
+ icon: 'far fa-save',
130
+ text: AXTranslator.get('common.save-as'),
131
+ onClick: () => {
132
+ this.openSaveDialog();
133
+ }
134
+ });
135
+ if (true) {
136
+ this.configMenuItem[0].items.push({
137
+ name: 'remove',
138
+ icon: 'far fa-times',
139
+ style: 'ax danger blank',
140
+ text: AXTranslator.get('common.remove'),
141
+ onClick: () => {
142
+ this.onRemove.emit(this);
143
+ }
144
+ });
145
+ }
146
+ this._hasMenu = this.configMenuItem[0].items.length > 0;
147
+ this.cdr.detectChanges();
148
+ }
149
+ setSizeFromOptions() {
150
+ this._widget.getValue('widgetSize').then(c => {
151
+ const oldSizeX = this.sizeX;
152
+ const oldSizeY = this.sizeY;
153
+ if (c && Array.isArray(c) && (oldSizeX !== c[0] || oldSizeY !== c[1])) {
154
+ this.config.sizeX = this.sizeX = c[0];
155
+ this.config.sizeY = this.sizeY = c[1];
156
+ this.onResized.emit({
157
+ component: this._widget,
158
+ config: this.config
159
+ });
160
+ }
161
+ this.cdr.detectChanges();
162
+ });
163
+ }
164
+ remove(e) {
165
+ e.preventDefault();
166
+ e.stopPropagation();
167
+ if (!this.readonly)
168
+ this.onRemove.emit(this);
169
+ return false;
170
+ }
171
+ handleConfig(e) {
172
+ e.preventDefault();
173
+ e.stopPropagation();
174
+ if (!this.readonly)
175
+ this.openConfigDialog();
176
+ return false;
177
+ }
178
+ openConfigDialog() {
179
+ const ppp = this.getMergedProps();
180
+ this.popup.open(AXWidgetConfigComponent, {
181
+ title: AXTranslator.get('common.configs'),
182
+ size: 'sm',
183
+ data: {
184
+ props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] })),
185
+ widget: this.widget
186
+ }
187
+ }).then(c => {
188
+ if (c.data) {
189
+ if (!this.config.options) {
190
+ this.config.options = {};
191
+ }
192
+ c.data.forEach(p => {
193
+ this._widget.setValue(p.property.name, p.value);
194
+ this.config.options[p.property.name] = p.value;
195
+ });
196
+ this.emitConfigChanged();
197
+ this._widget.redraw();
198
+ this.cdr.detectChanges();
199
+ }
200
+ });
201
+ }
202
+ openSaveDialog() {
203
+ const ppp = this.getMergedProps();
204
+ this.popup.open(AXWidgetSaveComponent, {
205
+ title: AXTranslator.get('common.save-as'),
206
+ size: 'sm',
207
+ data: {
208
+ config: this.config,
209
+ props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] }))
210
+ }
211
+ }).then(c => {
212
+ if (c.data) {
213
+ this.onSave.emit({
214
+ component: this._widget,
215
+ data: c.data
216
+ });
217
+ }
218
+ });
219
+ }
220
+ handleOptionClick(e) {
221
+ e.preventDefault();
222
+ e.stopPropagation();
223
+ this.openConfigDialog();
224
+ return false;
225
+ }
226
+ ngOnDestroy() {
227
+ this.vc.clear();
228
+ if (this.componentRef) {
229
+ this.componentRef.destroy();
230
+ }
231
+ }
232
+ getMergedProps() {
233
+ const ppp = AXObjectUtil.deepCopy(AXPropertyDecorators.getProperties(this._widget));
234
+ for (const key in this.config.props) {
235
+ if (Object.prototype.hasOwnProperty.call(this.config.props, key)) {
236
+ const newP = this.config.props[key];
237
+ const existPropDec = ppp.find(p => p.property === key);
238
+ if (existPropDec) {
239
+ Object.assign(existPropDec.options, newP);
240
+ }
241
+ }
242
+ }
243
+ return ppp;
244
+ }
245
+ emitConfigChanged() {
246
+ this.onConfigChanged.emit({
247
+ component: this._widget,
248
+ config: this.config
249
+ });
250
+ }
251
+ }
252
+ AXWidgetHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetHostComponent, deps: [{ token: i0.ElementRef }, { token: i0.ComponentFactoryResolver }, { token: i1.AXRenderService }, { token: i0.ChangeDetectorRef }, { token: i2.AXPopupService }, { token: i2.AXLoadingService }], target: i0.ɵɵFactoryTarget.Component });
253
+ AXWidgetHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXWidgetHostComponent, selector: "ax-widget-host", inputs: { provideValue: "provideValue", config: "config", readonly: "readonly", sizeX: "sizeX", sizeY: "sizeY", col: "col", row: "row" }, outputs: { onRemove: "onRemove", onConfigChanged: "onConfigChanged", onResized: "onResized", onSave: "onSave" }, host: { attributes: { "tabindex": "0" }, properties: { "attr.data-size-x": "this.sizeX", "attr.data-size-y": "this.sizeY", "attr.data-col": "this.col", "attr.data-row": "this.row" }, classAttribute: "ax widget-host" }, viewQueries: [{ propertyName: "vc", first: true, predicate: ["vc"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class='widget-container'>\r\n <div class=\"widget-config-overlay\" *ngIf=\"!isConfigured\" (click)=\"handleConfig($event)\">\r\n <div class=\"widget-title\">{{config.title}}</div>\r\n <div class=\"widget-config-box\">\r\n <div class=\"config-title\">{{ 'widget-board.configure' | trans}}</div>\r\n <div class=\"config-icon\" *ngIf=\"!readonly\"><i class=\"fas fa-cogs fa-5x\" aria-hidden=\"true\"></i></div>\r\n </div>\r\n </div>\r\n <div class='widget-edit-overlay' >\r\n <div class='widget-edit-menu'>\r\n <button class=\"widget-edit-menu-button\" (click)=\"handleConfig($event)\"\r\n (mousedown)=\"$event.stopPropagation()\" *ngIf=\"_hasProps\" (mouseup)=\"$event.stopPropagation()\">\r\n <i class=\"far fa-cogs\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button class=\"widget-edit-menu-button\" (click)=\"remove($event)\" (mousedown)=\"$event.stopPropagation()\"\r\n (mouseup)=\"$event.stopPropagation()\">\r\n <i class=\"far fa-times\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n <div class=\"widget-options-menu\" *ngIf=\"_hasMenu && !readonly\">\r\n <ax-menu [items]='configMenuItem' direction=\"horizontal\"></ax-menu>\r\n </div>\r\n <!-- <ax-loading-panel [visible]=\"isBusy\">\r\n </ax-loading-panel> -->\r\n <div class=\"widget-content\">\r\n <ng-container #vc></ng-container>\r\n </div>\r\n</div>", components: [{ type: i2.AXMenuComponent, selector: "ax-menu", inputs: ["menuTemplate", "rtl", "size", "selection", "mode", "target", "floatAlignment", "floatPlacemnet", "direction", "items"], outputs: ["onItemClick"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "trans": i1.AXTranslatorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetHostComponent, decorators: [{
255
+ type: Component,
256
+ args: [{ selector: 'ax-widget-host', host: { class: 'ax widget-host', tabindex: '0' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='widget-container'>\r\n <div class=\"widget-config-overlay\" *ngIf=\"!isConfigured\" (click)=\"handleConfig($event)\">\r\n <div class=\"widget-title\">{{config.title}}</div>\r\n <div class=\"widget-config-box\">\r\n <div class=\"config-title\">{{ 'widget-board.configure' | trans}}</div>\r\n <div class=\"config-icon\" *ngIf=\"!readonly\"><i class=\"fas fa-cogs fa-5x\" aria-hidden=\"true\"></i></div>\r\n </div>\r\n </div>\r\n <div class='widget-edit-overlay' >\r\n <div class='widget-edit-menu'>\r\n <button class=\"widget-edit-menu-button\" (click)=\"handleConfig($event)\"\r\n (mousedown)=\"$event.stopPropagation()\" *ngIf=\"_hasProps\" (mouseup)=\"$event.stopPropagation()\">\r\n <i class=\"far fa-cogs\" aria-hidden=\"true\"></i>\r\n </button>\r\n <button class=\"widget-edit-menu-button\" (click)=\"remove($event)\" (mousedown)=\"$event.stopPropagation()\"\r\n (mouseup)=\"$event.stopPropagation()\">\r\n <i class=\"far fa-times\" aria-hidden=\"true\"></i>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n <div class=\"widget-options-menu\" *ngIf=\"_hasMenu && !readonly\">\r\n <ax-menu [items]='configMenuItem' direction=\"horizontal\"></ax-menu>\r\n </div>\r\n <!-- <ax-loading-panel [visible]=\"isBusy\">\r\n </ax-loading-panel> -->\r\n <div class=\"widget-content\">\r\n <ng-container #vc></ng-container>\r\n </div>\r\n</div>" }]
257
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ComponentFactoryResolver }, { type: i1.AXRenderService }, { type: i0.ChangeDetectorRef }, { type: i2.AXPopupService }, { type: i2.AXLoadingService }]; }, propDecorators: { provideValue: [{
258
+ type: Input
259
+ }], onRemove: [{
260
+ type: Output
261
+ }], onConfigChanged: [{
262
+ type: Output
263
+ }], onResized: [{
264
+ type: Output
265
+ }], onSave: [{
266
+ type: Output
267
+ }], config: [{
268
+ type: Input
269
+ }], vc: [{
270
+ type: ViewChild,
271
+ args: ['vc', { read: ViewContainerRef }]
272
+ }], readonly: [{
273
+ type: Input
274
+ }], sizeX: [{
275
+ type: HostBinding,
276
+ args: ['attr.data-size-x']
277
+ }, {
278
+ type: Input
279
+ }], sizeY: [{
280
+ type: HostBinding,
281
+ args: ['attr.data-size-y']
282
+ }, {
283
+ type: Input
284
+ }], col: [{
285
+ type: HostBinding,
286
+ args: ['attr.data-col']
287
+ }, {
288
+ type: Input
289
+ }], row: [{
290
+ type: HostBinding,
291
+ args: ['attr.data-row']
292
+ }, {
293
+ type: Input
294
+ }] } });
295
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2xheW91dC9zcmMvbGliL3dpZGdldC1ib2FyZC93aWRnZXQtaG9zdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hY29yZXgvbGF5b3V0L3NyYy9saWIvd2lkZ2V0LWJvYXJkL3dpZGdldC1ob3N0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFB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gpIHtcclxuICAgICAgICBsZXQgY29tcG9uZW50OiBhbnk7XHJcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmNvbmZpZy5jb21wb25lbnQgPT09ICdzdHJpbmcnKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHJvdXRlID0gYXdhaXQgdGhpcy5yZW5kZXJlclNlcnZpY2UuZmluZExvYWRlZENvbXBvbmVudEJ5Um91dGUodGhpcy5jb25maWcuY29tcG9uZW50LCAyMCk7XHJcbiAgICAgICAgICAgIGNvbXBvbmVudCA9IHJvdXRlPy5jb21wb25lbnQ7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKHR5cGVvZiB0aGlzLmNvbmZpZy5jb21wb25lbnQgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgY29tcG9uZW50ID0gdGhpcy5jb25maWcuY29tcG9uZW50O1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcG9uZW50ID09IG51bGwpIHtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihgSW52YWxpZCBXaWRnZXQgQ29tcG9uZW50IWAsIHRoaXMuY29uZmlnKTtcclxuICAgICAgICAgICAgdGhpcy5vblJlbW92ZS5lbWl0KHRoaXMpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCB3aWRnZXRGYWN0b3J5ID0gdGhpcy5jb21wb25lbnRGYWN0b3J5UmVzb2x2ZXIucmVzb2x2ZUNvbXBvbmVudEZhY3RvcnkoY29tcG9uZW50KTtcclxuICAgICAgICB0aGlzLmNvbXBvbmVudFJlZiA9IHRoaXMudmMuY3JlYXRlQ29tcG9uZW50KHdpZGdldEZhY3RvcnkpO1xyXG4gICAgICAgIHRoaXMuX3dpZGdldCA9IHRoaXMuY29tcG9uZW50UmVmLmluc3RhbmNlIGFzIEFYV2lkZ2V0Q29tcG9uZW50O1xyXG4gICAgICAgIHRoaXMuX3dpZGdldC5wcm92aWRlVmFsdWUgPSB0aGlzLnByb3ZpZGVWYWx1ZTtcclxuICAgICAgICBpZiAodGhpcy5fd2lkZ2V0Lm9uQnVzeUNoYW5nZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5fd2lkZ2V0Lm9uQnVzeUNoYW5nZWQuc3Vic2NyaWJlKChkKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3dpZGdldC53aWRnZXRTaXplKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fd2lkZ2V0LnNldFZhbHVlKCd3aWRnZXRTaXplJywgW3RoaXMuc2l6ZVgsIHRoaXMuc2l6ZVldKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U2l6ZUZyb21PcHRpb25zKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLmlzTG9hZGluZyA9IGQudmFsdWU7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5fd2lkZ2V0Lm9uQ29uZmlndXJlZENoYW5nZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5fd2lkZ2V0Lm9uQ29uZmlndXJlZENoYW5nZWQuc3Vic2NyaWJlKCgpID0+IHtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0U2l6ZUZyb21PcHRpb25zKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvL1xyXG4gICAgICAgIGlmICh0aGlzLmNvbmZpZy5vcHRpb25zKSB7XHJcbiAgICAgICAgICAgIE9iamVjdC5hc3NpZ24odGhpcy5fd2lkZ2V0LCB0aGlzLmNvbmZpZy5vcHRpb25zKTtcclxuICAgICAgICB9XHJ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cclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wZW5Db25maWdEaWFsb2coKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuY29uZmlnTWVudUl0ZW1bMF0uaXRlbXMucHVzaCh7XHJcbiAgICAgICAgICAgIG5hbWU6ICdzYXZlJyxcclxuICAgICAgICAgICAgaWNvbjogJ2ZhciBmYS1zYXZlJyxcclxuICAgICAgICAgICAgdGV4dDogQVhUcmFuc2xhdG9yLmdldCgnY29tbW9uLnNhdmUtYXMnKSxcclxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5vcGVuU2F2ZURpYWxvZygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgaWYgKHRydWUpIHtcclxuICAgICAgICAgICAgdGhpcy5jb25maWdNZW51SXRlbVswXS5pdGVtcy5wdXNoKHtcclxuICAgICAgICAgICAgICAgIG5hbWU6ICdyZW1vdmUnLFxyXG4gICAgICAgICAgICAgICAgaWNvbjogJ2ZhciBmYS10aW1lcycsXHJcbiAgICAgICAgICAgICAgICBzdHlsZTogJ2F4IGRhbmdlciBibGFuaycsXHJcbiAgICAgICAgICAgICAgICB0ZXh0OiBBWFRyYW5zbGF0b3IuZ2V0KCdjb21tb24ucmVtb3ZlJyksXHJcbiAgICAgICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vblJlbW92ZS5lbWl0KHRoaXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5faGFzTWVudSA9IHRoaXMuY29uZmlnTWVudUl0ZW1bMF0uaXRlbXMubGVuZ3RoID4gMDtcclxuICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICB9XHJcblxyXG4gICAgQEhvc3RCaW5kaW5nKCdhdHRyLmRhdGEtc2l6ZS14JylcclxuICAgIEBJbnB1dCgpXHJcbiAgICBzaXplWDogbnVtYmVyID0gMTtcclxuXHJcbiAgICBASG9zdEJpbmRpbmcoJ2F0dHIuZGF0YS1zaXplLXknKVxyXG4gICAgQElucHV0KClcclxuICAgIHNpemVZOiBudW1iZXIgPSAxO1xyXG5cclxuICAgIEBIb3N0QmluZGluZygnYXR0ci5kYXRhLWNvbCcpXHJcbiAgICBASW5wdXQoKVxyXG4gICAgY29sOiBudW1iZXIgPSAxO1xyXG5cclxuXHJcbiAgICBASG9zdEJpbmRpbmcoJ2F0dHIuZGF0YS1yb3cnKVxyXG4gICAgQElucHV0KClcclxuICAgIHJvdzogbnVtYmVyID0gMTtcclxuXHJcblxyXG4gICAgcHJpdmF0ZSBzZXRTaXplRnJvbU9wdGlvbnMoKSB7XHJcbiAgICAgICAgdGhpcy5fd2lkZ2V0LmdldFZhbHVlKCd3aWRnZXRTaXplJykudGhlbihjID0+IHtcclxuICAgICAgICAgICAgY29uc3Qgb2xkU2l6ZVggPSB0aGlzLnNpemVYO1xyXG4gICAgICAgICAgICBjb25zdCBvbGRTaXplWSA9IHRoaXMuc2l6ZVk7XHJcbiAgICAgICAgICAgIGlmIChjICYmIEFycmF5LmlzQXJyYXkoYykgJiYgKG9sZFNpemVYICE9PSBjWzBdIHx8IG9sZFNpemVZICE9PSBjWzFdKSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jb25maWcuc2l6ZVggPSB0aGlzLnNpemVYID0gY1swXTtcclxuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLnNpemVZID0gdGhpcy5zaXplWSA9IGNbMV07XHJcbiAgICAgICAgICAgICAgICB0aGlzLm9uUmVzaXplZC5lbWl0KHtcclxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IHRoaXMuX3dpZGdldCxcclxuICAgICAgICAgICAgICAgICAgICBjb25maWc6IHRoaXMuY29uZmlnXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcmVtb3ZlKGU6IE1vdXNlRXZlbnQpIHtcclxuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICBpZiAoIXRoaXMucmVhZG9ubHkpXHJcbiAgICAgICAgICAgIHRoaXMub25SZW1vdmUuZW1pdCh0aGlzKTtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgaGFuZGxlQ29uZmlnKGU6IE1vdXNlRXZlbnQpIHtcclxuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICBpZiAoIXRoaXMucmVhZG9ubHkpXHJcbiAgICAgICAgICAgIHRoaXMub3BlbkNvbmZpZ0RpYWxvZygpO1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIG9wZW5Db25maWdEaWFsb2coKSB7XHJcbiAgICAgICAgY29uc3QgcHBwID0gdGhpcy5nZXRNZXJnZWRQcm9wcygpO1xyXG4gICAgICAgIHRoaXMucG9wdXAub3BlbihBWFdpZGdldENvbmZpZ0NvbXBvbmVudCwge1xyXG4gICAgICAgICAgICB0aXRsZTogQVhUcmFuc2xhdG9yLmdldCgnY29tbW9uLmNvbmZpZ3MnKSxcclxuICAgICAgICAgICAgc2l6ZTogJ3NtJyxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgcHJvcHM6IHBwcC5tYXAoYyA9PiAoeyBwcm9wZXJ0eTogYy5vcHRpb25zLCB2YWx1ZTogdGhpcy5fd2lkZ2V0W2Mub3B0aW9ucy5uYW1lXSB9KSksXHJcbiAgICAgICAgICAgICAgICB3aWRnZXQ6IHRoaXMud2lkZ2V0XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KS50aGVuKGMgPT4ge1xyXG4gICAgICAgICAgICBpZiAoYy5kYXRhKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuY29uZmlnLm9wdGlvbnMpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5vcHRpb25zID0ge307XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjLmRhdGEuZm9yRWFjaChwID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLl93aWRnZXQuc2V0VmFsdWUocC5wcm9wZXJ0eS5uYW1lLCBwLnZhbHVlKTtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5vcHRpb25zW3AucHJvcGVydHkubmFtZV0gPSBwLnZhbHVlO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXRDb25maWdDaGFuZ2VkKCk7XHJcbiAgICAgICAgICAgICAgICB0aGlzLl93aWRnZXQucmVkcmF3KCk7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIG9wZW5TYXZlRGlhbG9nKCkge1xyXG4gICAgICAgIGNvbnN0IHBwcCA9IHRoaXMuZ2V0TWVyZ2VkUHJvcHMoKTtcclxuICAgICAgICB0aGlzLnBvcHVwLm9wZW4oQVhXaWRnZXRTYXZlQ29tcG9uZW50LCB7XHJcbiAgICAgICAgICAgIHRpdGxlOiBBWFRyYW5zbGF0b3IuZ2V0KCdjb21tb24uc2F2ZS1hcycpLFxyXG4gICAgICAgICAgICBzaXplOiAnc20nLFxyXG4gICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICBjb25maWc6IHRoaXMuY29uZmlnLFxyXG4gICAgICAgICAgICAgICAgcHJvcHM6IHBwcC5tYXAoYyA9PiAoeyBwcm9wZXJ0eTogYy5vcHRpb25zLCB2YWx1ZTogdGhpcy5fd2lkZ2V0W2Mub3B0aW9ucy5uYW1lXSB9KSlcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pLnRoZW4oYyA9PiB7XHJcbiAgICAgICAgICAgIGlmIChjLmRhdGEpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMub25TYXZlLmVtaXQoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudDogdGhpcy5fd2lkZ2V0LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IGMuZGF0YVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG5cclxuICAgIGhhbmRsZU9wdGlvbkNsaWNrKGU6IE1vdXNlRXZlbnQpIHtcclxuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICB0aGlzLm9wZW5Db25maWdEaWFsb2coKTtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgbmdPbkRlc3Ryb3koKSB7XHJcbiAgICAgICAgdGhpcy52Yy5jbGVhcigpO1xyXG4gICAgICAgIGlmICh0aGlzLmNvbXBvbmVudFJlZikge1xyXG4gICAgICAgICAgICB0aGlzLmNvbXBvbmVudFJlZi5kZXN0cm95KCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZ2V0TWVyZ2VkUHJvcHMoKTogQVhQcm9wZXJ0eURlY29yYXRvcltdIHtcclxuICAgICAgICBjb25zdCBwcHAgPSBBWE9iamVjdFV0aWwuZGVlcENvcHkoQVhQcm9wZXJ0eURlY29yYXRvcnMuZ2V0UHJvcGVydGllcyh0aGlzLl93aWRnZXQpKSBhcyBBWFByb3BlcnR5RGVjb3JhdG9yW107XHJcbiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gdGhpcy5jb25maWcucHJvcHMpIHtcclxuICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbCh0aGlzLmNvbmZpZy5wcm9wcywga2V5KSkge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgbmV3UCA9IHRoaXMuY29uZmlnLnByb3BzW2tleV07XHJcbiAgICAgICAgICAgICAgICBjb25zdCBleGlzdFByb3BEZWMgPSBwcHAuZmluZChwID0+IHAucHJvcGVydHkgPT09IGtleSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoZXhpc3RQcm9wRGVjKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihleGlzdFByb3BEZWMub3B0aW9ucywgbmV3UCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHBwcDtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGVtaXRDb25maWdDaGFuZ2VkKCkge1xyXG4gICAgICAgIHRoaXMub25Db25maWdDaGFuZ2VkLmVtaXQoe1xyXG4gICAgICAgICAgICBjb21wb25lbnQ6IHRoaXMuX3dpZGdldCxcclxuICAgICAgICAgICAgY29uZmlnOiB0aGlzLmNvbmZpZ1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxufSIsIjxkaXYgY2xhc3M9J3dpZGdldC1jb250YWluZXInPlxyXG4gICAgPGRpdiBjbGFzcz1cIndpZGdldC1jb25maWctb3ZlcmxheVwiICpuZ0lmPVwiIWlzQ29uZmlndXJlZFwiIChjbGljayk9XCJoYW5kbGVD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