@acorex/layout 3.0.65 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/acorex-layout.d.ts +1 -2
  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 +441 -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 +290 -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 +1166 -0
  13. package/fesm2015/acorex-layout.mjs.map +1 -0
  14. package/fesm2020/acorex-layout.mjs +1159 -0
  15. package/fesm2020/acorex-layout.mjs.map +1 -0
  16. package/lib/widget-board/editors/widget-size-editor/widget-size.editor.d.ts +3 -0
  17. package/lib/widget-board/editors/widget-size-editor/widget-size.module.d.ts +8 -0
  18. package/lib/widget-board/widget-board.component.d.ts +3 -0
  19. package/lib/widget-board/widget-board.module.d.ts +12 -0
  20. package/lib/widget-board/widget-config.component.d.ts +3 -0
  21. package/lib/widget-board/widget-host.component.d.ts +3 -0
  22. package/lib/widget-board/widget-save.component.d.ts +3 -0
  23. package/lib/widget-board/widget.class.d.ts +3 -0
  24. package/package.json +23 -13
  25. package/acorex-layout.metadata.json +0 -1
  26. package/bundles/acorex-layout.umd.js +0 -1487
  27. package/bundles/acorex-layout.umd.js.map +0 -1
  28. package/bundles/acorex-layout.umd.min.js +0 -16
  29. package/bundles/acorex-layout.umd.min.js.map +0 -1
  30. package/esm2015/acorex-layout.js +0 -7
  31. package/esm2015/lib/widget-board/editors/widget-size-editor/widget-size.editor.js +0 -49
  32. package/esm2015/lib/widget-board/editors/widget-size-editor/widget-size.module.js +0 -19
  33. package/esm2015/lib/widget-board/widget-board.component.js +0 -468
  34. package/esm2015/lib/widget-board/widget-board.module.js +0 -67
  35. package/esm2015/lib/widget-board/widget-config.component.js +0 -86
  36. package/esm2015/lib/widget-board/widget-host.component.js +0 -323
  37. package/esm2015/lib/widget-board/widget-save.component.js +0 -79
  38. package/esm2015/lib/widget-board/widget.class.js +0 -123
  39. package/esm2015/public-api.js +0 -7
  40. package/esm5/acorex-layout.js +0 -7
  41. package/esm5/lib/widget-board/editors/widget-size-editor/widget-size.editor.js +0 -52
  42. package/esm5/lib/widget-board/editors/widget-size-editor/widget-size.module.js +0 -22
  43. package/esm5/lib/widget-board/widget-board.component.js +0 -494
  44. package/esm5/lib/widget-board/widget-board.module.js +0 -68
  45. package/esm5/lib/widget-board/widget-config.component.js +0 -90
  46. package/esm5/lib/widget-board/widget-host.component.js +0 -359
  47. package/esm5/lib/widget-board/widget-save.component.js +0 -83
  48. package/esm5/lib/widget-board/widget.class.js +0 -134
  49. package/esm5/public-api.js +0 -7
  50. package/fesm2015/acorex-layout.js +0 -1177
  51. package/fesm2015/acorex-layout.js.map +0 -1
  52. package/fesm5/acorex-layout.js +0 -1264
  53. package/fesm5/acorex-layout.js.map +0 -1
@@ -1,86 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild } from '@angular/core';
3
- import { AXBasePopupPageComponent, AXValidationFormComponent } from '@acorex/components';
4
- import { AXTranslator } from '@acorex/core';
5
- let AXWidgetConfigComponent = class AXWidgetConfigComponent extends AXBasePopupPageComponent {
6
- constructor(cdr) {
7
- super();
8
- this.cdr = cdr;
9
- this.props = [];
10
- this.displayProps = [];
11
- this.changes = [];
12
- this.context = {};
13
- }
14
- getFooterButtons() {
15
- return [
16
- {
17
- name: 'okay',
18
- submitBehavior: true,
19
- text: AXTranslator.get('common.confirm'),
20
- style: 'success'
21
- },
22
- {
23
- name: 'cancel',
24
- cancelBehavior: true,
25
- text: AXTranslator.get('common.cancel'),
26
- style: 'danger blank'
27
- }
28
- ];
29
- }
30
- onFooterButtonClick(e) {
31
- if (e.name === 'cancel') {
32
- this.close();
33
- }
34
- if (e.name === 'okay') {
35
- this.form.validate().then(c => {
36
- if (c.result) {
37
- this.close(this.changes);
38
- }
39
- });
40
- }
41
- }
42
- handleValueChange(e) {
43
- const prop = this.changes.find(c => c.property.name === e.property.name);
44
- if (prop) {
45
- prop.value = e.value;
46
- }
47
- else {
48
- this.changes.push({ property: e.property, value: e.value });
49
- }
50
- this.updateContext();
51
- }
52
- ngOnInit() {
53
- this.displayProps = this.props.filter(c => c.property.visible !== false).sort((a, b) => a.property.order - b.property.order);
54
- this.updateContext();
55
- }
56
- updateContext() {
57
- const ctx = {};
58
- this.props.forEach(p => {
59
- ctx[p.property.name] = p.value;
60
- });
61
- this.changes.forEach(p => {
62
- ctx[p.property.name] = p.value;
63
- });
64
- this.context = ctx;
65
- }
66
- identify(index, item) {
67
- return item.property.name;
68
- }
69
- };
70
- AXWidgetConfigComponent.ctorParameters = () => [
71
- { type: ChangeDetectorRef }
72
- ];
73
- __decorate([
74
- ViewChild(AXValidationFormComponent),
75
- __metadata("design:type", AXValidationFormComponent)
76
- ], AXWidgetConfigComponent.prototype, "form", void 0);
77
- AXWidgetConfigComponent = __decorate([
78
- Component({
79
- 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>",
80
- encapsulation: ViewEncapsulation.None,
81
- changeDetection: ChangeDetectionStrategy.OnPush
82
- }),
83
- __metadata("design:paramtypes", [ChangeDetectorRef])
84
- ], AXWidgetConfigComponent);
85
- export { AXWidgetConfigComponent };
86
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LWNvbmZpZy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWNvcmV4L2xheW91dC8iLCJzb3VyY2VzIjpbImxpYi93aWRnZXQtYm9hcmQvd2lkZ2V0LWNvbmZpZy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsaUJBQWlCLEVBQUUsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3BILE9BQU8sRUFBb0Isd0JBQXdCLEVBQXlELHlCQUF5QixFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDbEssT0FBTyxFQUFnQixZQUFZLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFVMUQsSUFBYSx1QkFBdUIsR0FBcEMsTUFBYSx1QkFBd0IsU0FBUSx3QkFBd0I7SUFJakUsWUFBb0IsR0FBc0I7UUFDdEMsS0FBSyxFQUFFLENBQUM7UUFEUSxRQUFHLEdBQUgsR0FBRyxDQUFtQjtRQU0xQyxVQUFLLEdBQXVCLEVBQUUsQ0FBQztRQUMvQixpQkFBWSxHQUF1QixFQUFFLENBQUM7UUFHdEMsWUFBTyxHQUF1QixFQUFFLENBQUM7UUFFakMsWUFBTyxHQUFRLEVBQUUsQ0FBQztJQVZsQixDQUFDO0lBYUQsZ0JBQWdCO1FBQ1osT0FBTztZQUNIO2dCQUNJLElBQUksRUFBRSxNQUFNO2dCQUNaLGNBQWMsRUFBRSxJQUFJO2dCQUNwQixJQUFJLEVBQUUsWUFBWSxDQUFDLEdBQUcsQ0FBQy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VjY2VzcydcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogJ2NhbmNlbCcsXHJcbiAgICAgICAgICAgICAgICBjYW5jZWxCZWhhdmlvcjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIHRleHQ6IEFYVHJhbnNsYXRvci5nZXQoJ2NvbW1vbi5jYW5jZWwnKSxcclxuICAgICAgICAgICAgICAgIHN0eWxlOiAnZGFuZ2VyIGJsYW5rJ1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgXTtcclxuICAgIH1cclxuXHJcblxyXG5cclxuXHJcblxyXG4gICAgb25Gb290ZXJCdXR0b25DbGljayhlOiBBWE1lbnVJdGVtQ2xpY2tFdmVudCkge1xyXG4gICAgICAgIGlmIChlLm5hbWUgPT09ICdjYW5jZWwnKSB7XHJcbiAgICAgICAgICAgIHRoaXMuY2xvc2UoKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGUubmFtZSA9PT0gJ29rYXknKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZm9ybS52YWxpZGF0ZSgpLnRoZW4oYyA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYy5yZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlKHRoaXMuY2hhbmdlcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBoYW5kbGVWYWx1ZUNoYW5nZShlOiBBWFByb3BlcnlFZGl0b3JWYWx1ZUNoYW5nZUV2ZW50KSB7XHJcbiAgICAgICAgY29uc3QgcHJvcCA9IHRoaXMuY2hhbmdlcy5maW5kKGMgPT4gYy5wcm9wZXJ0eS5uYW1lID09PSBlLnByb3BlcnR5Lm5hbWUpO1xyXG4gICAgICAgIGlmIChwcm9wKSB7XHJcbiAgICAgICAgICAgIHByb3AudmFsdWUgPSBlLnZhbHVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5jaGFuZ2VzLnB1c2goeyBwcm9wZXJ0eTogZS5wcm9wZXJ0eSwgdmFsdWU6IGUudmFsdWUgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMudXBkYXRlQ29udGV4dCgpO1xyXG4gICAgfVxyXG5cclxuICAgIG5nT25Jbml0KCkge1xyXG4gICAgICAgIHRoaXMuZGlzcGxheVByb3BzID0gdGhpcy5wcm9wcy5maWx0ZXIoYyA9PiBjLnByb3BlcnR5LnZpc2libGUgIT09IGZhbHNlKS5zb3J0KChhLCBiKSA9PiBhLnByb3BlcnR5Lm9yZGVyIC0gYi5wcm9wZXJ0eS5vcmRlcik7XHJcbiAgICAgICAgdGhpcy51cGRhdGVDb250ZXh0KCk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIHByaXZhdGUgdXBkYXRlQ29udGV4dCgpIHtcclxuICAgICAgICBjb25zdCBjdHggPSB7fTtcclxuICAgICAgICB0aGlzLnByb3BzLmZvckVhY2gocCA9PiB7XHJcbiAgICAgICAgICAgIGN0eFtwLnByb3BlcnR5Lm5hbWVdID0gcC52YWx1ZTtcclxuICAgICAgICB9KTtcclxuICAgICAgICB0aGlzLmNoYW5nZXMuZm9yRWFjaChwID0+IHtcclxuICAgICAgICAgICAgY3R4W3AucHJvcGVydHkubmFtZV0gPSBwLnZhbHVlO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHRoaXMuY29udGV4dCA9IGN0eDtcclxuICAgIH1cclxuXHJcblxyXG4gICAgaWRlbnRpZnkoaW5kZXgsIGl0ZW06IEFYUHJvcGVydHlDb25maWcpIHtcclxuICAgICAgICByZXR1cm4gaXRlbS5wcm9wZXJ0eS5uYW1lO1xyXG4gICAgfVxyXG5cclxufSJdfQ==
@@ -1,323 +0,0 @@
1
- import { __awaiter, __decorate, __metadata } from "tslib";
2
- import { Component, ViewEncapsulation, Input, ElementRef, HostBinding, ComponentFactoryResolver, ViewChild, ViewContainerRef, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, ComponentRef } from '@angular/core';
3
- import { AXObjectUtil, AXRenderService } from '@acorex/core';
4
- import { AXPopupService, AXPropertyDecorators, AXPropertyDecorator, AXLoadingService } from '@acorex/components';
5
- import { AXWidgetConfigComponent } from './widget-config.component';
6
- import { AXTranslator } from '@acorex/core';
7
- import { AXWidgetSaveComponent } from './widget-save.component';
8
- let AXWidgetHostComponent = class AXWidgetHostComponent {
9
- constructor(ref, componentFactoryResolver, rendererService, cdr, popup, loadingService) {
10
- this.ref = ref;
11
- this.componentFactoryResolver = componentFactoryResolver;
12
- this.rendererService = rendererService;
13
- this.cdr = cdr;
14
- this.popup = popup;
15
- this.loadingService = loadingService;
16
- this._hasProps = false;
17
- this._hasMenu = false;
18
- this.configMenuItem = [
19
- {
20
- icon: 'far fa-ellipsis-h',
21
- items: []
22
- }
23
- ];
24
- this.onRemove = new EventEmitter();
25
- this.onConfigChanged = new EventEmitter();
26
- this.onResized = new EventEmitter();
27
- this.onSave = new EventEmitter();
28
- this._isLoading = false;
29
- this.sizeX = 1;
30
- this.sizeY = 1;
31
- this.col = 1;
32
- this.row = 1;
33
- }
34
- get widget() {
35
- return this._widget;
36
- }
37
- get element() {
38
- return this.ref.nativeElement;
39
- }
40
- get isLoading() {
41
- return this._isLoading;
42
- }
43
- set isLoading(v) {
44
- this._isLoading = v;
45
- if (this._loadingId && !v) {
46
- this.loadingService.hide(this._loadingId);
47
- this._loadingId = null;
48
- }
49
- if (v) {
50
- this._loadingId = this.loadingService.show(this.ref.nativeElement);
51
- }
52
- }
53
- get isConfigured() {
54
- var _a;
55
- return ((_a = this._widget) === null || _a === void 0 ? void 0 : _a.isConfigured) || false;
56
- }
57
- ngOnInit() {
58
- this.isLoading = true;
59
- }
60
- ngAfterViewInit() {
61
- var _a;
62
- return __awaiter(this, void 0, void 0, function* () {
63
- let component;
64
- if (typeof this.config.component === 'string') {
65
- const route = yield this.rendererService.findLoadedComponentByRoute(this.config.component, 20);
66
- component = (_a = route) === null || _a === void 0 ? void 0 : _a.component;
67
- }
68
- else if (typeof this.config.component === 'function') {
69
- component = this.config.component;
70
- }
71
- if (component == null) {
72
- console.error(`Invalid Widget Component!`, this.config);
73
- this.onRemove.emit(this);
74
- return;
75
- }
76
- const widgetFactory = this.componentFactoryResolver.resolveComponentFactory(component);
77
- this.componentRef = this.vc.createComponent(widgetFactory);
78
- this._widget = this.componentRef.instance;
79
- this._widget.provideValue = this.provideValue;
80
- if (this._widget.onBusyChanged) {
81
- this._widget.onBusyChanged.subscribe((d) => {
82
- if (!this._widget.widgetSize) {
83
- this._widget.setValue('widgetSize', [this.sizeX, this.sizeY]);
84
- }
85
- else {
86
- this.setSizeFromOptions();
87
- }
88
- this.isLoading = d.value;
89
- this.cdr.detectChanges();
90
- });
91
- }
92
- if (this._widget.onConfiguredChanged) {
93
- this._widget.onConfiguredChanged.subscribe(() => {
94
- this.setSizeFromOptions();
95
- });
96
- }
97
- //
98
- if (this.config.options) {
99
- Object.assign(this._widget, this.config.options);
100
- }
101
- this._hasProps = AXPropertyDecorators.getProperties(this._widget).length > 0;
102
- this.isLoading = false;
103
- this.config['__meta__'].instance = this;
104
- this._widget['__meta__'] = {};
105
- this._widget['__meta__'].config = this.config;
106
- //
107
- this.configMenuItem[0].items.push({
108
- name: 'refresh',
109
- icon: 'far fa-undo',
110
- text: AXTranslator.get('common.refresh'),
111
- onClick: () => {
112
- var _a, _b;
113
- (_b = (_a = this) === null || _a === void 0 ? void 0 : _a.widget) === null || _b === void 0 ? void 0 : _b.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
- }
150
- setSizeFromOptions() {
151
- this._widget.getValue('widgetSize').then(c => {
152
- const oldSizeX = this.sizeX;
153
- const oldSizeY = this.sizeY;
154
- if (c && Array.isArray(c) && (oldSizeX !== c[0] || oldSizeY !== c[1])) {
155
- this.config.sizeX = this.sizeX = c[0];
156
- this.config.sizeY = this.sizeY = c[1];
157
- this.onResized.emit({
158
- component: this._widget,
159
- config: this.config
160
- });
161
- }
162
- this.cdr.detectChanges();
163
- });
164
- }
165
- remove(e) {
166
- e.preventDefault();
167
- e.stopPropagation();
168
- this.onRemove.emit(this);
169
- return false;
170
- }
171
- handleConfig(e) {
172
- e.preventDefault();
173
- e.stopPropagation();
174
- this.openConfigDialog();
175
- return false;
176
- }
177
- openConfigDialog() {
178
- const ppp = this.getMergedProps();
179
- this.popup.open(AXWidgetConfigComponent, {
180
- title: AXTranslator.get('common.configs'),
181
- size: 'sm',
182
- data: {
183
- props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] })),
184
- widget: this.widget
185
- }
186
- }).then(c => {
187
- if (c.data) {
188
- if (!this.config.options) {
189
- this.config.options = {};
190
- }
191
- c.data.forEach(p => {
192
- this._widget.setValue(p.property.name, p.value);
193
- this.config.options[p.property.name] = p.value;
194
- });
195
- this.emitConfigChanged();
196
- this._widget.redraw();
197
- this.cdr.detectChanges();
198
- }
199
- });
200
- }
201
- openSaveDialog() {
202
- const ppp = this.getMergedProps();
203
- this.popup.open(AXWidgetSaveComponent, {
204
- title: AXTranslator.get('common.save-as'),
205
- size: 'sm',
206
- data: {
207
- config: this.config,
208
- props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] }))
209
- }
210
- }).then(c => {
211
- if (c.data) {
212
- this.onSave.emit({
213
- component: this._widget,
214
- data: c.data
215
- });
216
- }
217
- });
218
- }
219
- handleOptionClick(e) {
220
- e.preventDefault();
221
- e.stopPropagation();
222
- this.openConfigDialog();
223
- return false;
224
- }
225
- ngOnDestroy() {
226
- this.vc.clear();
227
- if (this.componentRef) {
228
- this.componentRef.destroy();
229
- }
230
- }
231
- getMergedProps() {
232
- const ppp = AXObjectUtil.deepCopy(AXPropertyDecorators.getProperties(this._widget));
233
- for (const key in this.config.props) {
234
- if (Object.prototype.hasOwnProperty.call(this.config.props, key)) {
235
- const newP = this.config.props[key];
236
- const existPropDec = ppp.find(p => p.property === key);
237
- if (existPropDec) {
238
- Object.assign(existPropDec.options, newP);
239
- }
240
- }
241
- }
242
- return ppp;
243
- }
244
- emitConfigChanged() {
245
- this.onConfigChanged.emit({
246
- component: this._widget,
247
- config: this.config
248
- });
249
- }
250
- };
251
- AXWidgetHostComponent.ctorParameters = () => [
252
- { type: ElementRef },
253
- { type: ComponentFactoryResolver },
254
- { type: AXRenderService },
255
- { type: ChangeDetectorRef },
256
- { type: AXPopupService },
257
- { type: AXLoadingService }
258
- ];
259
- __decorate([
260
- Input(),
261
- __metadata("design:type", Function)
262
- ], AXWidgetHostComponent.prototype, "provideValue", void 0);
263
- __decorate([
264
- Output(),
265
- __metadata("design:type", EventEmitter)
266
- ], AXWidgetHostComponent.prototype, "onRemove", void 0);
267
- __decorate([
268
- Output(),
269
- __metadata("design:type", EventEmitter)
270
- ], AXWidgetHostComponent.prototype, "onConfigChanged", void 0);
271
- __decorate([
272
- Output(),
273
- __metadata("design:type", EventEmitter)
274
- ], AXWidgetHostComponent.prototype, "onResized", void 0);
275
- __decorate([
276
- Output(),
277
- __metadata("design:type", EventEmitter)
278
- ], AXWidgetHostComponent.prototype, "onSave", void 0);
279
- __decorate([
280
- Input(),
281
- __metadata("design:type", Object)
282
- ], AXWidgetHostComponent.prototype, "config", void 0);
283
- __decorate([
284
- ViewChild('vc', { read: ViewContainerRef }),
285
- __metadata("design:type", ViewContainerRef)
286
- ], AXWidgetHostComponent.prototype, "vc", void 0);
287
- __decorate([
288
- HostBinding('attr.data-size-x'),
289
- Input(),
290
- __metadata("design:type", Number)
291
- ], AXWidgetHostComponent.prototype, "sizeX", void 0);
292
- __decorate([
293
- HostBinding('attr.data-size-y'),
294
- Input(),
295
- __metadata("design:type", Number)
296
- ], AXWidgetHostComponent.prototype, "sizeY", void 0);
297
- __decorate([
298
- HostBinding('attr.data-col'),
299
- Input(),
300
- __metadata("design:type", Number)
301
- ], AXWidgetHostComponent.prototype, "col", void 0);
302
- __decorate([
303
- HostBinding('attr.data-row'),
304
- Input(),
305
- __metadata("design:type", Number)
306
- ], AXWidgetHostComponent.prototype, "row", void 0);
307
- AXWidgetHostComponent = __decorate([
308
- Component({
309
- selector: 'ax-widget-host',
310
- 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\"><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\">\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>",
311
- host: { class: 'ax widget-host', tabindex: '0' },
312
- encapsulation: ViewEncapsulation.None,
313
- changeDetection: ChangeDetectionStrategy.OnPush
314
- }),
315
- __metadata("design:paramtypes", [ElementRef,
316
- ComponentFactoryResolver,
317
- AXRenderService,
318
- ChangeDetectorRef,
319
- AXPopupService,
320
- AXLoadingService])
321
- ], AXWidgetHostComponent);
322
- export { AXWidgetHostComponent };
323
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LWhvc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGFjb3JleC9sYXlvdXQvIiwic291cmNlcyI6WyJsaWIvd2lkZ2V0LWJvYXJkL3dpZGdldC1ob3N0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUNILFNBQVMsRUFDVCxpQkFBaUIsRUFBRSxLQUFLLEVBQ3hCLFVBQVUsRUFBRSxXQUFXLEVBQUUsd0JBQXdCLEVBQUUsU0FBUyxFQUM1RCxnQkFBZ0IsRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLHVCQUF1QixFQUMvRCxpQkFBaUIsRUFBRSxZQUFZLEVBQ2xDLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxZQUFZLEVBQUUsZUFBZSxFQUFFLE1BQU0sY0FBYyxDQUFDO0FBQzdELE9BQU8sRUFBRSxjQUFjLEVBQUUsb0JBQW9CLEVBQUUsbUJBQW1CLEVBQUUsZ0JBQWdCLEVBQ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QnVzeUNoYW5nZWQuc3Vic2NyaWJlKChkKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX3dpZGdldC53aWRnZXRTaXplKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fd2lkZ2V0LnNldFZhbHVlKCd3aWRnZXRTaXplJywgW3RoaXMuc2l6ZVgsIHRoaXMuc2l6ZVldKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U2l6ZUZyb21PcHRpb25zKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLmlzTG9hZGluZyA9IGQudmFsdWU7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodGhpcy5fd2lkZ2V0Lm9uQ29uZmlndXJlZENoYW5nZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5fd2lkZ2V0Lm9uQ29uZmlndXJlZENoYW5nZWQuc3Vic2NyaWJlKCgpID0+IHtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0U2l6ZUZyb21PcHRpb25zKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvL1xyXG4gICAgICAgIGlmICh0aGlzLmNvbmZpZy5vcHRpb25zKSB7XHJcbiAgICAgICAgICAgIE9iamVjdC5hc3NpZ24odGhpcy5fd2lkZ2V0LCB0aGlzLmNvbmZpZy5vcHRpb25zKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5faGFzUHJvcHMgPSBBWFByb3BlcnR5RGVjb3JhdG9ycy5nZXRQcm9wZXJ0aWVzKHRoaXMuX3dpZGdldCkubGVuZ3RoID4gMDtcclxuXHJcbiAgICAgICAgdGhpcy5pc0xvYWRpbmcgPSBmYWxzZTtcclxuICAgICAgICB0aGlzLmNvbmZpZ1snX19tZXRhX18nXS5pbnN0YW5jZSA9IHRoaXM7XHJcbiAgICAgICAgdGhpcy5fd2lkZ2V0WydfX21ldGFfXyddID0ge307XHJcbiAgICAgICAgdGhpcy5fd2lkZ2V0WydfX21ldGFfXyddLmNvbmZpZyA9IHRoaXMuY29uZmlnO1xyXG4gICAgICAgIC8vXHJcbiAgICAgICAgdGhpcy5jb25maWdNZW51SXRlbVswXS5pdGVtcy5wdXNoKHtcclxuICAgICAgICAgICAgbmFtZTogJ3JlZnJlc2gnLFxyXG4gICAgICAgICAgICBpY29uOiAnZmFyIGZhLXVuZG8nLFxyXG4gICAgICAgICAgICB0ZXh0OiBBWFRyYW5zbGF0b3IuZ2V0KCdjb21tb24ucmVmcmVzaCcpLFxyXG4gICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICB0aGlzPy53aWRnZXQ/LnJlZnJlc2goKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIC8vXHJcbiAgICAgICAgaWYgKHRoaXMuX2hhc1Byb3BzKSB7XHJcbiAgICAgICAgICAgIHRoaXMuY29uZmlnTWVudUl0ZW1bMF0uaXRlbXMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiAnY29uZmlncycsXHJcbiAgICAgICAgICAgICAgICBpY29uOiAnZmFyIGZhLWNvZ3MnLFxyXG4gICAgICAgICAgICAgICAgdGV4dDogQVhUcmFuc2xhdG9yLmdldCgnY29tbW9uLmNvbmZpZ3MnKSxcclxuICAgICAgICAgICAgICAgIG9uQ2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wZW5Db25maWdEaWFsb2coKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuY29uZmlnTWVudUl0ZW1bMF0uaXRlbXMucHVzaCh7XHJcbiAgICAgICAgICAgIG5hbWU6ICdzYXZlJyxcclxuICAgICAgICAgICAgaWNvbjogJ2ZhciBmYS1zYXZlJyxcclxuICAgICAgICAgICAgdGV4dDogQVhUcmFuc2xhdG9yLmdldCgnY29tbW9uLnNhdmUtYXMnKSxcclxuICAgICAgICAgICAgb25DbGljazogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5vcGVuU2F2ZURpYWxvZygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgaWYgKHRydWUpIHtcclxuICAgICAgICAgICAgdGhpcy5jb25maWdNZW51SXRlbVswXS5pdGVtcy5wdXNoKHtcclxuICAgICAgICAgICAgICAgIG5hbWU6ICdyZW1vdmUnLFxyXG4gICAgICAgICAgICAgICAgaWNvbjogJ2ZhciBmYS10aW1lcycsXHJcbiAgICAgICAgICAgICAgICBzdHlsZTogJ2F4IGRhbmdlciBibGFuaycsXHJcbiAgICAgICAgICAgICAgICB0ZXh0OiBBWFRyYW5zbGF0b3IuZ2V0KCdjb21tb24ucmVtb3ZlJyksXHJcbiAgICAgICAgICAgICAgICBvbkNsaWNrOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vblJlbW92ZS5lbWl0KHRoaXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5faGFzTWVudSA9IHRoaXMuY29uZmlnTWVudUl0ZW1bMF0uaXRlbXMubGVuZ3RoID4gMDtcclxuICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICB9XHJcblxyXG4gICAgQEhvc3RCaW5kaW5nKCdhdHRyLmRhdGEtc2l6ZS14JylcclxuICAgIEBJbnB1dCgpXHJcbiAgICBzaXplWDogbnVtYmVyID0gMTtcclxuXHJcbiAgICBASG9zdEJpbmRpbmcoJ2F0dHIuZGF0YS1zaXplLXknKVxyXG4gICAgQElucHV0KClcclxuICAgIHNpemVZOiBudW1iZXIgPSAxO1xyXG5cclxuICAgIEBIb3N0QmluZGluZygnYXR0ci5kYXRhLWNvbCcpXHJcbiAgICBASW5wdXQoKVxyXG4gICAgY29sOiBudW1iZXIgPSAxO1xyXG5cclxuXHJcbiAgICBASG9zdEJpbmRpbmcoJ2F0dHIuZGF0YS1yb3cnKVxyXG4gICAgQElucHV0KClcclxuICAgIHJvdzogbnVtYmVyID0gMTtcclxuXHJcblxyXG4gICAgcHJpdmF0ZSBzZXRTaXplRnJvbU9wdGlvbnMoKSB7XHJcbiAgICAgICAgdGhpcy5fd2lkZ2V0LmdldFZhbHVlKCd3aWRnZXRTaXplJykudGhlbihjID0+IHtcclxuICAgICAgICAgICAgY29uc3Qgb2xkU2l6ZVggPSB0aGlzLnNpemVYO1xyXG4gICAgICAgICAgICBjb25zdCBvbGRTaXplWSA9IHRoaXMuc2l6ZVk7XHJcbiAgICAgICAgICAgIGlmIChjICYmIEFycmF5LmlzQXJyYXkoYykgJiYgKG9sZFNpemVYICE9PSBjWzBdIHx8IG9sZFNpemVZICE9PSBjWzFdKSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jb25maWcuc2l6ZVggPSB0aGlzLnNpemVYID0gY1swXTtcclxuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLnNpemVZID0gdGhpcy5zaXplWSA9IGNbMV07XHJcbiAgICAgICAgICAgICAgICB0aGlzLm9uUmVzaXplZC5lbWl0KHtcclxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IHRoaXMuX3dpZGdldCxcclxuICAgICAgICAgICAgICAgICAgICBjb25maWc6IHRoaXMuY29uZmlnXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgICAgICAgfSk7XHJcbi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b25maWcub3B0aW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLm9wdGlvbnMgPSB7fTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGMuZGF0YS5mb3JFYWNoKHAgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3dpZGdldC5zZXRWYWx1ZShwLnByb3BlcnR5Lm5hbWUsIHAudmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLm9wdGlvbnNbcC5wcm9wZXJ0eS5uYW1lXSA9IHAudmFsdWU7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHRoaXMuZW1pdENvbmZpZ0NoYW5nZWQoKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuX3dpZGdldC5yZWRyYXcoKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuY2RyLmRldGVjdENoYW5nZXMoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgb3BlblNhdmVEaWFsb2coKSB7XHJcbiAgICAgICAgY29uc3QgcHBwID0gdGhpcy5nZXRNZXJnZWRQcm9wcygpO1xyXG4gICAgICAgIHRoaXMucG9wdXAub3BlbihBWFdpZGdldFNhdmVDb21wb25lbnQsIHtcclxuICAgICAgICAgICAgdGl0bGU6IEFYVHJhbnNsYXRvci5nZXQoJ2NvbW1vbi5zYXZlLWFzJyksXHJcbiAgICAgICAgICAgIHNpemU6ICdzbScsXHJcbiAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgIGNvbmZpZzogdGhpcy5jb25maWcsXHJcbiAgICAgICAgICAgICAgICBwcm9wczogcHBwLm1hcChjID0+ICh7IHByb3BlcnR5OiBjLm9wdGlvbnMsIHZhbHVlOiB0aGlzLl93aWRnZXRbYy5vcHRpb25zLm5hbWVdIH0pKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSkudGhlbihjID0+IHtcclxuICAgICAgICAgICAgaWYgKGMuZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5vblNhdmUuZW1pdCh7XHJcbiAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50OiB0aGlzLl93aWRnZXQsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogYy5kYXRhXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuXHJcblxyXG4gICAgaGFuZGxlT3B0aW9uQ2xpY2soZTogTW91c2VFdmVudCkge1xyXG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xyXG4gICAgICAgIHRoaXMub3BlbkNvbmZpZ0RpYWxvZygpO1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBuZ09uRGVzdHJveSgpIHtcclxuICAgICAgICB0aGlzLnZjLmNsZWFyKCk7XHJcbiAgICAgICAgaWYgKHRoaXMuY29tcG9uZW50UmVmKSB7XHJcbiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50UmVmLmRlc3Ryb3koKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBnZXRNZXJnZWRQcm9wcygpOiBBWFByb3BlcnR5RGVjb3JhdG9yW10ge1xyXG4gICAgICAgIGNvbnN0IHBwcCA9IEFYT2JqZWN0VXRpbC5kZWVwQ29weShBWFByb3BlcnR5RGVjb3JhdG9ycy5nZXRQcm9wZXJ0aWVzKHRoaXMuX3dpZGdldCkpIGFzIEFYUHJvcGVydHlEZWNvcmF0b3JbXTtcclxuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiB0aGlzLmNvbmZpZy5wcm9wcykge1xyXG4gICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHRoaXMuY29uZmlnLnByb3BzLCBrZXkpKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBuZXdQID0gdGhpcy5jb25maWcucHJvcHNba2V5XTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGV4aXN0UHJvcERlYyA9IHBwcC5maW5kKHAgPT4gcC5wcm9wZXJ0eSA9PT0ga2V5KTtcclxuICAgICAgICAgICAgICAgIGlmIChleGlzdFByb3BEZWMpIHtcclxuICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGV4aXN0UHJvcERlYy5vcHRpb25zLCBuZXdQKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gcHBwO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZW1pdENvbmZpZ0NoYW5nZWQoKSB7XHJcbiAgICAgICAgdGhpcy5vbkNvbmZpZ0NoYW5nZWQuZW1pdCh7XHJcbiAgICAgICAgICAgIGNvbXBvbmVudDogdGhpcy5fd2lkZ2V0LFxyXG4gICAgICAgICAgICBjb25maWc6IHRoaXMuY29uZmlnXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG59Il19
@@ -1,79 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, } from '@angular/core';
3
- import { AXHtmlUtil, AXObjectUtil, AXTranslator } from '@acorex/core';
4
- import { AXBasePopupPageComponent } from '@acorex/components';
5
- let AXWidgetSaveComponent = class AXWidgetSaveComponent extends AXBasePopupPageComponent {
6
- constructor() {
7
- super(...arguments);
8
- this.props = [];
9
- }
10
- getFooterButtons() {
11
- return [
12
- {
13
- name: 'okay',
14
- submitBehavior: true,
15
- text: AXTranslator.get('common.confirm'),
16
- style: 'ax success'
17
- },
18
- {
19
- name: 'cancel',
20
- cancelBehavior: true,
21
- text: AXTranslator.get('common.cancel'),
22
- style: 'ax light'
23
- }
24
- ];
25
- }
26
- ngOnInit() {
27
- var _a, _b;
28
- const titleProp = this.props.find(c => c.property.name === 'title' || c.property.name === 'name');
29
- const title = ((_a = titleProp) === null || _a === void 0 ? void 0 : _a.value) || this.config.title;
30
- const pp = {};
31
- (_b = this.props) === null || _b === void 0 ? void 0 : _b.forEach(c => {
32
- pp[c.property.name] = c.property;
33
- });
34
- this.data = {
35
- component: this.config.component,
36
- title,
37
- uniqueName: `${this.config.uniqueName}-${AXHtmlUtil.getUID()}`,
38
- options: AXObjectUtil.deepJSONClone(this.config.options),
39
- props: AXObjectUtil.deepJSONClone(pp)
40
- };
41
- this.displayProps = this.props
42
- .filter(c => c.property.visible !== false)
43
- .sort((a, b) => a.property.order - b.property.order)
44
- .map(c => ({
45
- name: c.property.name,
46
- title: c.property.title,
47
- allow: true
48
- }));
49
- }
50
- onFooterButtonClick(e) {
51
- if (e.name === 'cancel') {
52
- this.close();
53
- }
54
- if (e.name === 'okay') {
55
- this.props.forEach(p => {
56
- const pp = this.displayProps.find(c => c.name === p.property.name);
57
- if (pp == null || !pp.allow) {
58
- let ppp = this.data.props[p.property.name];
59
- if (ppp) {
60
- ppp.visible = false;
61
- }
62
- else {
63
- ppp = { visible: false };
64
- }
65
- }
66
- });
67
- this.close(this.data);
68
- }
69
- }
70
- };
71
- AXWidgetSaveComponent = __decorate([
72
- Component({
73
- template: "<ax-page>\r\n <ax-page-content>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <ax-form-group>\r\n <ax-label>{{'common.title' | trans}}</ax-label>\r\n <ax-text-box [(value)]=\"data.title\"></ax-text-box>\r\n </ax-form-group>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <ax-form-group>\r\n <ax-label>{{'common.description' | trans}}</ax-label>\r\n <ax-text-area [(value)]=\"data.description\"></ax-text-area>\r\n </ax-form-group>\r\n </div>\r\n </div>\r\n <!-- <div class=\"row\">\r\n <div class=\"col-12\">\r\n <ax-form-group>\r\n <ax-label>{{'common.uniquename' | trans}}</ax-label>\r\n <ax-text-box></ax-text-box>\r\n </ax-form-group>\r\n </div>\r\n </div> -->\r\n <div class=\"row\" style=\"margin-block-end: var(--ax-size-md);margin-block-start: var(--ax-size-md);\">\r\n <div class=\"col-12\">\r\n <ax-fieldset caption=\"{{'widget-board.configurable-props' | trans}}\">\r\n <div class=\"row\" *ngFor=\"let prop of displayProps\">\r\n <div class=\"col-12\" style=\"margin-block-end: var(--ax-size-sm)\">\r\n <ax-check-box [(value)]=\"prop.allow\" label=\"{{ prop.title | trans }}\">\r\n\r\n </ax-check-box>\r\n </div>\r\n </div>\r\n </ax-fieldset>\r\n </div>\r\n </div>\r\n </div>\r\n </ax-page-content>\r\n</ax-page>",
74
- encapsulation: ViewEncapsulation.None,
75
- changeDetection: ChangeDetectionStrategy.OnPush
76
- })
77
- ], AXWidgetSaveComponent);
78
- export { AXWidgetSaveComponent };
79
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LXNhdmUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGFjb3JleC9sYXlvdXQvIiwic291cmNlcyI6WyJsaWIvd2lkZ2V0LWJvYXJkL3dpZGdldC1zYXZlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUNILFNBQVMsRUFDVCxpQkFBaUIsRUFDakIsdUJBQXVCLEdBRTFCLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBZ0IsVUFBVSxFQUFFLFlBQVksRUFBRSxZQUFZLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDcEYsT0FBTyxFQUEwQyx3QkFBd0IsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBU3RHLElBQWEscUJBQXFCLEdBQWxDLE1BQWEscUJBQXNCLFNBQVEsd0JBQ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xuICAgICAgICByZXR1cm4gW1xyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiAnb2theScsXHJcbiAgICAgICAgICAgICAgICBzdWJtaXRCZWhhdmlvcjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIHRleHQ6IEFYVHJhbnNsYXRvci5nZXQoJ2NvbW1vbi5jb25maXJtJyksXHJcbiAgICAgICAgICAgICAgICBzdHlsZTogJ2F4IHN1Y2Nlc3MnXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIG5hbWU6ICdjYW5jZWwnLFxyXG4gICAgICAgICAgICAgICAgY2FuY2VsQmVoYXZpb3I6IHRydWUsXHJcbiAgICAgICAgICAgICAgICB0ZXh0OiBBWFRyYW5zbGF0b3IuZ2V0KCdjb21tb24uY2FuY2VsJyksXHJcbiAgICAgICAgICAgICAgICBzdHlsZTogJ2F4IGxpZ2h0J1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgXTtcclxuICAgIH1cclxuXHJcbiAgICBuZ09uSW5pdCgpIHtcclxuICAgICAgICBjb25zdCB0aXRsZVByb3AgPSB0aGlzLnByb3BzLmZpbmQoYyA9PiBjLnByb3BlcnR5Lm5hbWUgPT09ICd0aXRsZScgfHwgYy5wcm9wZXJ0eS5uYW1lID09PSAnbmFtZScpO1xyXG4gICAgICAgIGNvbnN0IHRpdGxlID0gdGl0bGVQcm9wPy52YWx1ZSB8fCB0aGlzLmNvbmZpZy50aXRsZTtcclxuICAgICAgICBjb25zdCBwcDogYW55ID0ge307XHJcbiAgICAgICAgdGhpcy5wcm9wcz8uZm9yRWFjaChjID0+IHtcclxuICAgICAgICAgICAgcHBbYy5wcm9wZXJ0eS5uYW1lXSA9IGMucHJvcGVydHk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgdGhpcy5kYXRhID0ge1xyXG4gICAgICAgICAgICBjb21wb25lbnQ6IHRoaXMuY29uZmlnLmNvbXBvbmVudCxcclxuICAgICAgICAgICAgdGl0bGUsXHJcbiAgICAgICAgICAgIHVuaXF1ZU5hbWU6IGAke3RoaXMuY29uZmlnLnVuaXF1ZU5hbWV9LSR7QVhIdG1sVXRpbC5nZXRVSUQoKX1gLFxyXG4gICAgICAgICAgICBvcHRpb25zOiBBWE9iamVjdFV0aWwuZGVlcEpTT05DbG9uZSh0aGlzLmNvbmZpZy5vcHRpb25zKSxcclxuICAgICAgICAgICAgcHJvcHM6IEFYT2JqZWN0VXRpbC5kZWVwSlNPTkNsb25lKHBwKVxyXG4gICAgICAgIH07XHJcbiAgICAgICAgdGhpcy5kaXNwbGF5UHJvcHMgPSB0aGlzLnByb3BzXHJcbiAgICAgICAgICAgIC5maWx0ZXIoYyA9PiBjLnByb3BlcnR5LnZpc2libGUgIT09IGZhbHNlKVxyXG4gICAgICAgICAgICAuc29ydCgoYSwgYikgPT4gYS5wcm9wZXJ0eS5vcmRlciAtIGIucHJvcGVydHkub3JkZXIpXHJcbiAgICAgICAgICAgIC5tYXAoYyA9PiAoe1xyXG4gICAgICAgICAgICAgICAgbmFtZTogYy5wcm9wZXJ0eS5uYW1lLFxyXG4gICAgICAgICAgICAgICAgdGl0bGU6IGMucHJvcGVydHkudGl0bGUsXHJcbiAgICAgICAgICAgICAgICBhbGxvdzogdHJ1ZVxyXG4gICAgICAgICAgICB9KSk7XHJcbiAgICB9XHJcblxyXG5cclxuXHJcbiAgICBvbkZvb3RlckJ1dHRvbkNsaWNrKGU6IEFYTWVudUl0ZW1DbGlja0V2ZW50KSB7XHJcbiAgICAgICAgaWYgKGUubmFtZSA9PT0gJ2NhbmNlbCcpIHtcclxuICAgICAgICAgICAgdGhpcy5jbG9zZSgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZS5uYW1lID09PSAnb2theScpIHtcclxuICAgICAgICAgICAgdGhpcy5wcm9wcy5mb3JFYWNoKHAgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgcHAgPSB0aGlzLmRpc3BsYXlQcm9wcy5maW5kKGMgPT4gYy5uYW1lID09PSBwLnByb3BlcnR5Lm5hbWUpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHBwID09IG51bGwgfHwgIXBwLmFsbG93KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHBwcCA9IHRoaXMuZGF0YS5wcm9wc1twLnByb3BlcnR5Lm5hbWVdO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcHApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHBwLnZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBwcCA9IHsgdmlzaWJsZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB0aGlzLmNsb3NlKHRoaXMuZGF0YSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59Il19