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