@acorex/layout 5.1.6 → 5.1.7

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,1174 @@
1
+ import { __decorate, __metadata, __awaiter } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { EventEmitter, Injectable, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ViewContainerRef, Input, Output, HostBinding, ViewChildren, NgModule } from '@angular/core';
4
+ import * as i1 from '@acorex/components';
5
+ import { propertyEditor, AXBasePopupPageComponent, AXValidationFormComponent, AXPropertyDecorators, AXProperyEditorComponent, AXSearchBoxModule, AXLoadingModule, AXProppertyEditorModule, AXPageModule, AXToolbarModule, AXLabelModule, AXTextAreaModule, AXFieldsetModule, AXTextBoxModule, AXFormGroupModule, AXTabStripModule, AXCheckBoxModule, AXMenuModule, AXValidationModule, AXNumberBoxModule } from '@acorex/components';
6
+ import * as i1$1 from '@acorex/core';
7
+ import { AXHtmlUtil, AXTranslator, AXObjectUtil, AXClientRec, AXTranslatorModule } from '@acorex/core';
8
+ import * as i2 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import { Observable } from 'rxjs';
11
+ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
12
+ import * as i1$2 from '@angular/router';
13
+ import { RouterModule } from '@angular/router';
14
+ import { FormsModule } from '@angular/forms';
15
+
16
+ // @dynamic
17
+ // TODO: Add Angular decorator.
18
+ class AXWidgetComponent {
19
+ constructor() {
20
+ this.uid = AXHtmlUtil.getUID();
21
+ this.onBusyChanged = new EventEmitter();
22
+ this._isBusy = true;
23
+ this.refreshRate = [{
24
+ id: 60000 * 5,
25
+ text: AXTranslator.get('dateTime.duration.format_minute').replace('{0}', '5')
26
+ }];
27
+ this.onConfiguredChanged = new EventEmitter();
28
+ this.onConfiguredChanged.subscribe(() => {
29
+ if (this.isConfigured === true && this.getRefreshRate()) {
30
+ this.restartRefreshTimer();
31
+ }
32
+ else {
33
+ this.stopRefreshTimer();
34
+ }
35
+ });
36
+ }
37
+ get isBusy() {
38
+ return this._isBusy;
39
+ }
40
+ set isBusy(v) {
41
+ if (v !== this._isBusy) {
42
+ const eventData = {
43
+ component: this,
44
+ oldValue: this._isBusy,
45
+ value: v
46
+ };
47
+ this._isBusy = v;
48
+ this.onBusyChanged.emit(eventData);
49
+ }
50
+ }
51
+ // ???
52
+ getRefreshRate() {
53
+ return Array.isArray(this.refreshRate) && this.refreshRate.length ? this.refreshRate[0].id : this.refreshRate;
54
+ }
55
+ startRefreshTimer() {
56
+ this.intervalId = window.setInterval(this.refresh.bind(this), this.getRefreshRate());
57
+ }
58
+ stopRefreshTimer() {
59
+ window.clearInterval(this.intervalId);
60
+ }
61
+ restartRefreshTimer() {
62
+ this.stopRefreshTimer();
63
+ this.startRefreshTimer();
64
+ }
65
+ ngOnDestroy() {
66
+ this.stopRefreshTimer();
67
+ }
68
+ redraw() {
69
+ }
70
+ refresh() {
71
+ this.restartRefreshTimer();
72
+ }
73
+ get isConfigured() {
74
+ return true;
75
+ }
76
+ setValue(name, value) {
77
+ this[name] = value;
78
+ this.onConfiguredChanged.emit();
79
+ }
80
+ getValue(name) {
81
+ var _a;
82
+ const val = this[name];
83
+ const config = this['__meta__'].config;
84
+ const runtime = (_a = config.props[name]) === null || _a === void 0 ? void 0 : _a.runtime;
85
+ if (runtime && this.provideValue) {
86
+ const res = this.provideValue({
87
+ name,
88
+ value: val,
89
+ uniqueName: config.uniqueName,
90
+ options: config.options,
91
+ });
92
+ if (this.provideValue instanceof Promise) {
93
+ return res;
94
+ }
95
+ else {
96
+ return Promise.resolve(res);
97
+ }
98
+ }
99
+ return Promise.resolve(val);
100
+ }
101
+ }
102
+ AXWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
103
+ AXWidgetComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetComponent });
104
+ __decorate([
105
+ propertyEditor({
106
+ editorClass: 'ax/editors/widget-size',
107
+ title: 'common.size',
108
+ visible: false,
109
+ order: -99,
110
+ }),
111
+ __metadata("design:type", Array)
112
+ ], AXWidgetComponent.prototype, "widgetSize", void 0);
113
+ __decorate([
114
+ propertyEditor({
115
+ editorClass: 'ax/editors/select',
116
+ title: 'common.refresh-rate',
117
+ visible: true,
118
+ order: -98,
119
+ editorOptions: {
120
+ items: () => {
121
+ return [1, 2, 3, 5, 10, 20, 30, 60].map(c => ({
122
+ id: 60000 * c,
123
+ text: AXTranslator.get('dateTime.duration.format_minute').replace('{0}', c.toString())
124
+ }));
125
+ },
126
+ allowNull: false,
127
+ allowSearch: false,
128
+ selectionDataMode: 'value',
129
+ selectionMode: 'single',
130
+ valueField: 'id',
131
+ }
132
+ }),
133
+ __metadata("design:type", Object)
134
+ ], AXWidgetComponent.prototype, "refreshRate", void 0);
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetComponent, decorators: [{
136
+ type: Injectable
137
+ }], ctorParameters: function () { return []; }, propDecorators: { widgetSize: [], refreshRate: [] } });
138
+
139
+ class AXWidgetConfigComponent extends AXBasePopupPageComponent {
140
+ constructor(cdr) {
141
+ super();
142
+ this.cdr = cdr;
143
+ this.props = [];
144
+ this.displayProps = [];
145
+ this.changes = [];
146
+ this.context = {};
147
+ }
148
+ getFooterButtons() {
149
+ return [
150
+ {
151
+ name: 'okay',
152
+ submitBehavior: true,
153
+ text: AXTranslator.get('common.confirm'),
154
+ style: 'success'
155
+ },
156
+ {
157
+ name: 'cancel',
158
+ cancelBehavior: true,
159
+ text: AXTranslator.get('common.cancel'),
160
+ style: 'danger blank'
161
+ }
162
+ ];
163
+ }
164
+ onFooterButtonClick(e) {
165
+ if (e.name === 'cancel') {
166
+ this.close();
167
+ }
168
+ if (e.name === 'okay') {
169
+ this.form.validate().then(c => {
170
+ if (c.result) {
171
+ this.close(this.changes);
172
+ }
173
+ });
174
+ }
175
+ }
176
+ handleValueChange(e) {
177
+ const prop = this.changes.find(c => c.property.name === e.property.name);
178
+ if (prop) {
179
+ prop.value = e.value;
180
+ }
181
+ else {
182
+ this.changes.push({ property: e.property, value: e.value });
183
+ }
184
+ this.updateContext();
185
+ }
186
+ ngOnInit() {
187
+ this.displayProps = this.props.filter(c => c.property.visible !== false).sort((a, b) => a.property.order - b.property.order);
188
+ this.updateContext();
189
+ }
190
+ updateContext() {
191
+ const ctx = {};
192
+ this.props.forEach(p => {
193
+ ctx[p.property.name] = p.value;
194
+ });
195
+ this.changes.forEach(p => {
196
+ ctx[p.property.name] = p.value;
197
+ });
198
+ this.context = ctx;
199
+ }
200
+ identify(index, item) {
201
+ return item.property.name;
202
+ }
203
+ }
204
+ AXWidgetConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetConfigComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
205
+ 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": i1$1.AXTranslatorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetConfigComponent, decorators: [{
207
+ type: Component,
208
+ 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>" }]
209
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { form: [{
210
+ type: ViewChild,
211
+ args: [AXValidationFormComponent]
212
+ }] } });
213
+
214
+ class AXWidgetSaveComponent extends AXBasePopupPageComponent {
215
+ constructor() {
216
+ super(...arguments);
217
+ this.props = [];
218
+ }
219
+ getFooterButtons() {
220
+ return [
221
+ {
222
+ name: 'okay',
223
+ submitBehavior: true,
224
+ text: AXTranslator.get('common.confirm'),
225
+ style: 'ax success'
226
+ },
227
+ {
228
+ name: 'cancel',
229
+ cancelBehavior: true,
230
+ text: AXTranslator.get('common.cancel'),
231
+ style: 'ax light'
232
+ }
233
+ ];
234
+ }
235
+ ngOnInit() {
236
+ var _a;
237
+ const titleProp = this.props.find(c => c.property.name === 'title' || c.property.name === 'name');
238
+ const title = (titleProp === null || titleProp === void 0 ? void 0 : titleProp.value) || this.config.title;
239
+ const pp = {};
240
+ (_a = this.props) === null || _a === void 0 ? void 0 : _a.forEach(c => {
241
+ pp[c.property.name] = c.property;
242
+ });
243
+ this.data = {
244
+ component: this.config.component,
245
+ title,
246
+ uniqueName: `${this.config.uniqueName}-${AXHtmlUtil.getUID()}`,
247
+ options: AXObjectUtil.deepJSONClone(this.config.options),
248
+ props: AXObjectUtil.deepJSONClone(pp)
249
+ };
250
+ this.displayProps = this.props
251
+ .filter(c => c.property.visible !== false)
252
+ .sort((a, b) => a.property.order - b.property.order)
253
+ .map(c => ({
254
+ name: c.property.name,
255
+ title: c.property.title,
256
+ allow: true
257
+ }));
258
+ }
259
+ onFooterButtonClick(e) {
260
+ if (e.name === 'cancel') {
261
+ this.close();
262
+ }
263
+ if (e.name === 'okay') {
264
+ this.props.forEach(p => {
265
+ const pp = this.displayProps.find(c => c.name === p.property.name);
266
+ if (pp == null || !pp.allow) {
267
+ let ppp = this.data.props[p.property.name];
268
+ if (ppp) {
269
+ ppp.visible = false;
270
+ }
271
+ else {
272
+ ppp = { visible: false };
273
+ }
274
+ }
275
+ });
276
+ this.close(this.data);
277
+ }
278
+ }
279
+ }
280
+ AXWidgetSaveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSaveComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
281
+ AXWidgetSaveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXWidgetSaveComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, 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>", components: [{ type: i1.AXPageComponent, selector: "ax-page" }, { type: i1.AXPageContentComponent, selector: "ax-page-content" }, { type: i1.AXFormGroupComponent, selector: "ax-form-group", inputs: ["size"] }, { type: i1.AXLabelComponent, selector: "ax-label", inputs: ["size"] }, { type: i1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "type", "showMask", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions"] }, { type: i1.AXTextAreaComponent, selector: "ax-text-area", inputs: ["rows", "cols", "maxLength"] }, { type: i1.AXFieldsetComponent, selector: "ax-fieldset", inputs: ["size", "caption", "allowCollapse"] }, { type: i1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["readonly", "disabled", "size", "label", "tabIndex", "indeterminate", "value"], outputs: ["onValueChanged", "valueChange", "onClick"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "trans": i1$1.AXTranslatorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSaveComponent, decorators: [{
283
+ type: Component,
284
+ args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
285
+ }] });
286
+
287
+ class AXWidgetHostComponent {
288
+ constructor(ref, componentFactoryResolver, rendererService, cdr, popup, loadingService) {
289
+ this.ref = ref;
290
+ this.componentFactoryResolver = componentFactoryResolver;
291
+ this.rendererService = rendererService;
292
+ this.cdr = cdr;
293
+ this.popup = popup;
294
+ this.loadingService = loadingService;
295
+ this._hasProps = false;
296
+ this._hasMenu = false;
297
+ this.configMenuItem = [
298
+ {
299
+ icon: 'far fa-ellipsis-h',
300
+ items: []
301
+ }
302
+ ];
303
+ this.onRemove = new EventEmitter();
304
+ this.onConfigChanged = new EventEmitter();
305
+ this.onResized = new EventEmitter();
306
+ this.onSave = new EventEmitter();
307
+ this.readonly = false;
308
+ this._isLoading = false;
309
+ this.sizeX = 1;
310
+ this.sizeY = 1;
311
+ this.col = 1;
312
+ this.row = 1;
313
+ }
314
+ get widget() {
315
+ return this._widget;
316
+ }
317
+ get element() {
318
+ return this.ref.nativeElement;
319
+ }
320
+ get isLoading() {
321
+ return this._isLoading;
322
+ }
323
+ set isLoading(v) {
324
+ this._isLoading = v;
325
+ if (this._loadingId && !v) {
326
+ this.loadingService.hide(this._loadingId);
327
+ this._loadingId = null;
328
+ }
329
+ if (v) {
330
+ this._loadingId = this.loadingService.show(this.ref.nativeElement);
331
+ }
332
+ }
333
+ get isConfigured() {
334
+ var _a;
335
+ return ((_a = this._widget) === null || _a === void 0 ? void 0 : _a.isConfigured) || false;
336
+ }
337
+ ngOnInit() {
338
+ this.isLoading = true;
339
+ }
340
+ ngAfterViewInit() {
341
+ return __awaiter(this, void 0, void 0, function* () {
342
+ let component;
343
+ if (typeof this.config.component === 'string') {
344
+ const route = yield this.rendererService.findLoadedComponentByRoute(this.config.component, 20);
345
+ component = route === null || route === void 0 ? void 0 : route.component;
346
+ }
347
+ else if (typeof this.config.component === 'function') {
348
+ component = this.config.component;
349
+ }
350
+ if (component == null) {
351
+ console.error(`Invalid Widget Component!`, this.config);
352
+ this.onRemove.emit(this);
353
+ return;
354
+ }
355
+ const widgetFactory = this.componentFactoryResolver.resolveComponentFactory(component);
356
+ this.componentRef = this.vc.createComponent(widgetFactory);
357
+ this._widget = this.componentRef.instance;
358
+ this._widget.provideValue = this.provideValue;
359
+ if (this._widget.onBusyChanged) {
360
+ this._widget.onBusyChanged.subscribe((d) => {
361
+ if (!this._widget.widgetSize) {
362
+ this._widget.setValue('widgetSize', [this.sizeX, this.sizeY]);
363
+ }
364
+ else {
365
+ this.setSizeFromOptions();
366
+ }
367
+ this.isLoading = d.value;
368
+ this.cdr.detectChanges();
369
+ });
370
+ }
371
+ if (this._widget.onConfiguredChanged) {
372
+ this._widget.onConfiguredChanged.subscribe(() => {
373
+ this.setSizeFromOptions();
374
+ });
375
+ }
376
+ //
377
+ if (this.config.options) {
378
+ Object.assign(this._widget, this.config.options);
379
+ }
380
+ this._hasProps = AXPropertyDecorators.getProperties(this._widget).length > 0;
381
+ this.isLoading = false;
382
+ this.config['__meta__'].instance = this;
383
+ this._widget['__meta__'] = {};
384
+ this._widget['__meta__'].config = this.config;
385
+ //
386
+ this.configMenuItem[0].items.push({
387
+ name: 'refresh',
388
+ icon: 'far fa-undo',
389
+ text: AXTranslator.get('common.refresh'),
390
+ onClick: () => {
391
+ var _a;
392
+ (_a = this === null || this === void 0 ? void 0 : this.widget) === null || _a === void 0 ? void 0 : _a.refresh();
393
+ }
394
+ });
395
+ //
396
+ if (this._hasProps) {
397
+ this.configMenuItem[0].items.push({
398
+ name: 'configs',
399
+ icon: 'far fa-cogs',
400
+ text: AXTranslator.get('common.configs'),
401
+ onClick: () => {
402
+ this.openConfigDialog();
403
+ }
404
+ });
405
+ }
406
+ this.configMenuItem[0].items.push({
407
+ name: 'save',
408
+ icon: 'far fa-save',
409
+ text: AXTranslator.get('common.save-as'),
410
+ onClick: () => {
411
+ this.openSaveDialog();
412
+ }
413
+ });
414
+ if (true) {
415
+ this.configMenuItem[0].items.push({
416
+ name: 'remove',
417
+ icon: 'far fa-times',
418
+ style: 'ax danger blank',
419
+ text: AXTranslator.get('common.remove'),
420
+ onClick: () => {
421
+ this.onRemove.emit(this);
422
+ }
423
+ });
424
+ }
425
+ this._hasMenu = this.configMenuItem[0].items.length > 0;
426
+ this.cdr.detectChanges();
427
+ });
428
+ }
429
+ setSizeFromOptions() {
430
+ this._widget.getValue('widgetSize').then(c => {
431
+ const oldSizeX = this.sizeX;
432
+ const oldSizeY = this.sizeY;
433
+ if (c && Array.isArray(c) && (oldSizeX !== c[0] || oldSizeY !== c[1])) {
434
+ this.config.sizeX = this.sizeX = c[0];
435
+ this.config.sizeY = this.sizeY = c[1];
436
+ this.onResized.emit({
437
+ component: this._widget,
438
+ config: this.config
439
+ });
440
+ }
441
+ this.cdr.detectChanges();
442
+ });
443
+ }
444
+ remove(e) {
445
+ e.preventDefault();
446
+ e.stopPropagation();
447
+ if (!this.readonly)
448
+ this.onRemove.emit(this);
449
+ return false;
450
+ }
451
+ handleConfig(e) {
452
+ e.preventDefault();
453
+ e.stopPropagation();
454
+ if (!this.readonly)
455
+ this.openConfigDialog();
456
+ return false;
457
+ }
458
+ openConfigDialog() {
459
+ const ppp = this.getMergedProps();
460
+ this.popup.open(AXWidgetConfigComponent, {
461
+ title: AXTranslator.get('common.configs'),
462
+ size: 'sm',
463
+ data: {
464
+ props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] })),
465
+ widget: this.widget
466
+ }
467
+ }).then(c => {
468
+ if (c.data) {
469
+ if (!this.config.options) {
470
+ this.config.options = {};
471
+ }
472
+ c.data.forEach(p => {
473
+ this._widget.setValue(p.property.name, p.value);
474
+ this.config.options[p.property.name] = p.value;
475
+ });
476
+ this.emitConfigChanged();
477
+ this._widget.redraw();
478
+ this.cdr.detectChanges();
479
+ }
480
+ });
481
+ }
482
+ openSaveDialog() {
483
+ const ppp = this.getMergedProps();
484
+ this.popup.open(AXWidgetSaveComponent, {
485
+ title: AXTranslator.get('common.save-as'),
486
+ size: 'sm',
487
+ data: {
488
+ config: this.config,
489
+ props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] }))
490
+ }
491
+ }).then(c => {
492
+ if (c.data) {
493
+ this.onSave.emit({
494
+ component: this._widget,
495
+ data: c.data
496
+ });
497
+ }
498
+ });
499
+ }
500
+ handleOptionClick(e) {
501
+ e.preventDefault();
502
+ e.stopPropagation();
503
+ this.openConfigDialog();
504
+ return false;
505
+ }
506
+ ngOnDestroy() {
507
+ this.vc.clear();
508
+ if (this.componentRef) {
509
+ this.componentRef.destroy();
510
+ }
511
+ }
512
+ getMergedProps() {
513
+ const ppp = AXObjectUtil.deepCopy(AXPropertyDecorators.getProperties(this._widget));
514
+ for (const key in this.config.props) {
515
+ if (Object.prototype.hasOwnProperty.call(this.config.props, key)) {
516
+ const newP = this.config.props[key];
517
+ const existPropDec = ppp.find(p => p.property === key);
518
+ if (existPropDec) {
519
+ Object.assign(existPropDec.options, newP);
520
+ }
521
+ }
522
+ }
523
+ return ppp;
524
+ }
525
+ emitConfigChanged() {
526
+ this.onConfigChanged.emit({
527
+ component: this._widget,
528
+ config: this.config
529
+ });
530
+ }
531
+ }
532
+ 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$1.AXRenderService }, { token: i0.ChangeDetectorRef }, { token: i1.AXPopupService }, { token: i1.AXLoadingService }], target: i0.ɵɵFactoryTarget.Component });
533
+ 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: i1.AXMenuComponent, selector: "ax-menu", inputs: ["menuTemplate", "rtl", "size", "selection", "mode", "target", "floatAlignment", "floatPlacemnet", "direction", "items"], outputs: ["onItemClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "trans": i1$1.AXTranslatorPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetHostComponent, decorators: [{
535
+ type: Component,
536
+ 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>" }]
537
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ComponentFactoryResolver }, { type: i1$1.AXRenderService }, { type: i0.ChangeDetectorRef }, { type: i1.AXPopupService }, { type: i1.AXLoadingService }]; }, propDecorators: { provideValue: [{
538
+ type: Input
539
+ }], onRemove: [{
540
+ type: Output
541
+ }], onConfigChanged: [{
542
+ type: Output
543
+ }], onResized: [{
544
+ type: Output
545
+ }], onSave: [{
546
+ type: Output
547
+ }], config: [{
548
+ type: Input
549
+ }], vc: [{
550
+ type: ViewChild,
551
+ args: ['vc', { read: ViewContainerRef }]
552
+ }], readonly: [{
553
+ type: Input
554
+ }], sizeX: [{
555
+ type: HostBinding,
556
+ args: ['attr.data-size-x']
557
+ }, {
558
+ type: Input
559
+ }], sizeY: [{
560
+ type: HostBinding,
561
+ args: ['attr.data-size-y']
562
+ }, {
563
+ type: Input
564
+ }], col: [{
565
+ type: HostBinding,
566
+ args: ['attr.data-col']
567
+ }, {
568
+ type: Input
569
+ }], row: [{
570
+ type: HostBinding,
571
+ args: ['attr.data-row']
572
+ }, {
573
+ type: Input
574
+ }] } });
575
+
576
+ class AXWidgetBoardComponent {
577
+ constructor(ref, zone, cdr) {
578
+ this.ref = ref;
579
+ this.zone = zone;
580
+ this.cdr = cdr;
581
+ this.widgets = [];
582
+ this.galleryItems = [];
583
+ this.tileSize = 80;
584
+ this.gapSize = 5;
585
+ this.readonly = false;
586
+ this.newWidget = null;
587
+ this._isInEditing = false;
588
+ this.isDragging = false;
589
+ this.DATA_COL = 'data-col';
590
+ this.DATA_ROW = 'data-row';
591
+ this.DATA_SIZE_X = 'data-size-x';
592
+ this.DATA_SIZE_Y = 'data-size-y';
593
+ this.DATA_OLD_COL = 'data-old-col';
594
+ this.DATA_OLD_ROW = 'data-old-row';
595
+ this.onConfigChanged = new EventEmitter();
596
+ this.onWidgetSave = new EventEmitter();
597
+ }
598
+ isInEditing() {
599
+ return this._isInEditing;
600
+ }
601
+ ngOnInit() {
602
+ if (this.rtl == null) {
603
+ this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
604
+ }
605
+ }
606
+ ngAfterViewInit() {
607
+ this.zone.runOutsideAngular((c) => {
608
+ const style = document.createElement('style');
609
+ style.type = 'text/css';
610
+ this.ref.nativeElement.appendChild(style);
611
+ // add css data classes
612
+ for (let i = 1; i <= 50; i++) {
613
+ style.innerHTML += `[${this.DATA_COL}="${i}"] { ${this.rtl ? 'right' : 'left'}: ${(i - 1) * (this.tileSize + this.gapSize)}px; }`;
614
+ style.innerHTML += `[${this.DATA_ROW}="${i}"] { top: ${(i - 1) * (this.tileSize + this.gapSize)}px; }`;
615
+ style.innerHTML += `[${this.DATA_SIZE_X}="${i}"] { width: ${(i * this.tileSize) + ((i - 1) * this.gapSize)}px; }`;
616
+ style.innerHTML += `[${this.DATA_SIZE_Y}="${i}"] { height: ${(i * this.tileSize) + ((i - 1) * this.gapSize)}px; }`;
617
+ }
618
+ });
619
+ }
620
+ calcGridSize() {
621
+ this.zone.runOutsideAngular(() => {
622
+ const width = (Math.max(...this.widgets.map((c) => c.col + c.sizeX - 1))) * (this.tileSize + this.gapSize);
623
+ const height = (Math.max(...this.widgets.map((c) => c.row + c.sizeY - 1))) * (this.tileSize + this.gapSize);
624
+ this.container.nativeElement.style.width = width + 'px';
625
+ this.container.nativeElement.style.height = height + 'px';
626
+ });
627
+ }
628
+ toggleEdit() {
629
+ this._isInEditing ? this.finishEdit() : this.startEdit();
630
+ }
631
+ dragStart(e) {
632
+ e.preventDefault();
633
+ e.stopPropagation();
634
+ this.zone.runOutsideAngular(() => {
635
+ if (this._isInEditing && e.which === 1) {
636
+ this.dragItem = e.currentTarget;
637
+ this.dragItem.setAttribute('data-x-offset', (this.dragItem.offsetLeft - e.clientX).toString());
638
+ //
639
+ this.dragItem.setAttribute('data-y-offset', (this.dragItem.offsetTop - e.clientY).toString());
640
+ this.dragItem.classList.add('widget-dragging');
641
+ this.dragItem.classList.remove('animate__animated', 'animate__pulse');
642
+ }
643
+ });
644
+ return false;
645
+ }
646
+ removePositionData() {
647
+ this.zone.runOutsideAngular(() => {
648
+ if (this.dragItem && this._isInEditing && this.dragItem.getAttribute(this.DATA_OLD_COL) == null) {
649
+ this.dragItem.setAttribute(this.DATA_OLD_COL, this.dragItem.getAttribute(this.DATA_COL));
650
+ this.dragItem.setAttribute(this.DATA_OLD_ROW, this.dragItem.getAttribute(this.DATA_ROW));
651
+ this.dragItem.removeAttribute(this.DATA_COL);
652
+ this.dragItem.removeAttribute(this.DATA_ROW);
653
+ }
654
+ });
655
+ }
656
+ resetPositionData() {
657
+ this.zone.runOutsideAngular(() => {
658
+ if (this.dragItem && this._isInEditing) {
659
+ this.setPosition(this.dragItem, this.dragItem.getAttribute(this.DATA_OLD_COL), this.dragItem.getAttribute(this.DATA_OLD_ROW));
660
+ }
661
+ });
662
+ }
663
+ setPosition(element, col, row) {
664
+ this.zone.runOutsideAngular(() => {
665
+ element.setAttribute(this.DATA_COL, col);
666
+ element.setAttribute(this.DATA_ROW, row);
667
+ element.removeAttribute(this.DATA_OLD_COL);
668
+ element.removeAttribute(this.DATA_OLD_ROW);
669
+ element.style.removeProperty('top');
670
+ element.style.removeProperty('left');
671
+ const widget = this.widgets.find(c => c['__meta__'].instance.element === element);
672
+ widget.col = Number(col);
673
+ widget.row = Number(row);
674
+ });
675
+ }
676
+ drag(e) {
677
+ e.preventDefault();
678
+ e.stopPropagation();
679
+ this.zone.runOutsideAngular(() => {
680
+ if (this.dragItem && this._isInEditing) {
681
+ this.isDragging = true;
682
+ this.addPlaceholder();
683
+ const xOffset = Number(this.dragItem.getAttribute('data-x-offset'));
684
+ const yOffset = Number(this.dragItem.getAttribute('data-y-offset'));
685
+ this.dragItem.style.left = e.clientX + xOffset + 'px';
686
+ this.dragItem.style.top = e.clientY + yOffset + 'px';
687
+ //
688
+ this.detectBestPlacement();
689
+ this.removePositionData();
690
+ }
691
+ });
692
+ return false;
693
+ }
694
+ dragEnd(e) {
695
+ this.zone.runOutsideAngular(() => {
696
+ if (this.dragItem && this._isInEditing && this.isDragging) {
697
+ this.dragItem.classList.remove('widget-dragging');
698
+ this.dragItem.classList.add('animate__animated', 'animate__pulse');
699
+ //
700
+ const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');
701
+ if (this.newWidget) {
702
+ const w = {
703
+ uniqueName: this.newWidget.uniqueName,
704
+ component: this.newWidget.component,
705
+ title: this.newWidget.title,
706
+ options: this.newWidget.options,
707
+ sizeX: this.newWidget.sizeX,
708
+ sizeY: this.newWidget.sizeY,
709
+ col: Number(p.getAttribute(this.DATA_COL)),
710
+ row: Number(p.getAttribute(this.DATA_ROW))
711
+ };
712
+ this.widgets.push(w);
713
+ this.newWidget = null;
714
+ this.container.nativeElement.removeChild(this.dragItem);
715
+ this.zone.run(() => {
716
+ this.cdr.detectChanges();
717
+ this.calcGridSize();
718
+ setTimeout(() => {
719
+ w['__meta__'].instance.element.addEventListener('mousedown', this.dragStart.bind(this), false);
720
+ }, 1000);
721
+ });
722
+ }
723
+ else {
724
+ if (p) {
725
+ this.setPosition(this.dragItem, p.getAttribute(this.DATA_COL), p.getAttribute(this.DATA_ROW));
726
+ }
727
+ else {
728
+ this.setPosition(this.dragItem, this.dragItem.getAttribute(this.DATA_OLD_COL), this.dragItem.getAttribute(this.DATA_OLD_ROW));
729
+ }
730
+ }
731
+ //
732
+ this.removePlaceholder();
733
+ this.dragItem = null;
734
+ this.calcGridSize();
735
+ this.emitConfigChanged();
736
+ }
737
+ this.isDragging = false;
738
+ });
739
+ }
740
+ detectFirstEmptySlot(w) {
741
+ const xTile = Math.floor(this.ref.nativeElement.parentElement.offsetWidth / this.tileSize);
742
+ for (let j = 1; j <= 100; j++) {
743
+ for (let i = 1; i <= xTile - w.sizeX; i++) {
744
+ const rec = new AXClientRec({
745
+ left: i,
746
+ top: j,
747
+ width: w.sizeX,
748
+ height: w.sizeY
749
+ });
750
+ const el = this.widgets.filter(c => c !== w).find((c) => rec.intersect({
751
+ left: c.col,
752
+ top: c.row,
753
+ width: c.sizeX,
754
+ height: c.sizeY
755
+ }));
756
+ if (el == null) {
757
+ w.col = i;
758
+ w.row = j;
759
+ return;
760
+ }
761
+ }
762
+ }
763
+ }
764
+ detectBestPlacement() {
765
+ this.zone.runOutsideAngular(() => {
766
+ const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');
767
+ let col = Math.ceil(this.dragItem.offsetLeft / this.tileSize);
768
+ if (this.rtl) {
769
+ col = Math.ceil((this.container.nativeElement.clientWidth - (this.dragItem.offsetLeft + this.dragItem.clientWidth)) / this.tileSize);
770
+ }
771
+ let row = Math.ceil(this.dragItem.offsetTop / this.tileSize);
772
+ if (col < 1) {
773
+ col = 1;
774
+ }
775
+ if (row < 1) {
776
+ row = 1;
777
+ }
778
+ const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host')).map((c) => c);
779
+ p.setAttribute(this.DATA_COL, col.toString());
780
+ p.setAttribute(this.DATA_ROW, row.toString());
781
+ const collision = widgets.filter(c => c !== this.dragItem).some(c => AXHtmlUtil.collision(c, this.dragItem));
782
+ if (collision) {
783
+ this.removePlaceholder();
784
+ }
785
+ });
786
+ }
787
+ addPlaceholder() {
788
+ this.zone.runOutsideAngular(() => {
789
+ this.removePlaceholder();
790
+ if (this.dragItem) {
791
+ const p = document.createElement('div');
792
+ p.classList.add('widget-blank-placeholder');
793
+ p.setAttribute(this.DATA_COL, this.dragItem.getAttribute(this.DATA_COL));
794
+ p.setAttribute(this.DATA_ROW, this.dragItem.getAttribute(this.DATA_ROW));
795
+ p.setAttribute(this.DATA_SIZE_X, this.dragItem.getAttribute(this.DATA_SIZE_X));
796
+ p.setAttribute(this.DATA_SIZE_Y, this.dragItem.getAttribute(this.DATA_SIZE_Y));
797
+ this.container.nativeElement.appendChild(p);
798
+ }
799
+ });
800
+ }
801
+ removePlaceholder() {
802
+ const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');
803
+ p === null || p === void 0 ? void 0 : p.remove();
804
+ }
805
+ startEdit() {
806
+ this._isInEditing = true;
807
+ this.calcGridSize();
808
+ this.ref.nativeElement.classList.add('grid-background');
809
+ const bg = this.ref.nativeElement;
810
+ bg.style.setProperty('background-position', `${this.rtl ? 'right' : 'left'} top`);
811
+ // tslint:disable-next-line: max-line-length
812
+ const pattern = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${this.tileSize + this.gapSize}" height="${this.tileSize + this.gapSize}"> <rect style="fill: %23dadada" x="${this.rtl ? this.gapSize : 0}" width="${this.tileSize}" height="${this.tileSize}" y="0"></rect></svg>')`;
813
+ bg.style.setProperty('background-image', pattern);
814
+ //
815
+ const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host'));
816
+ widgets.forEach((w) => {
817
+ w.addEventListener('mousedown', this.dragStart.bind(this), false);
818
+ });
819
+ this.ref.nativeElement.addEventListener('mousemove', this.drag.bind(this), false);
820
+ this.ref.nativeElement.addEventListener('mouseup', this.dragEnd.bind(this), false);
821
+ }
822
+ finishEdit() {
823
+ this.ref.nativeElement.classList.remove('grid-background');
824
+ const bg = this.ref.nativeElement;
825
+ bg.style.removeProperty('background-image');
826
+ //
827
+ this._isInEditing = false;
828
+ const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host'));
829
+ widgets.forEach((w) => {
830
+ w.removeEventListener('mousedown', this.dragStart.bind(this), false);
831
+ });
832
+ this.ref.nativeElement.removeEventListener('mousemove', this.drag.bind(this), false);
833
+ this.ref.nativeElement.removeEventListener('mouseup', this.dragEnd.bind(this), false);
834
+ this.emitConfigChanged();
835
+ }
836
+ addWidget(widget) {
837
+ this.zone.runOutsideAngular(() => {
838
+ this.newWidget = {
839
+ uniqueName: widget.uniqueName,
840
+ component: widget.component,
841
+ title: widget.title,
842
+ col: 1,
843
+ row: 1,
844
+ sizeX: widget.sizeX,
845
+ sizeY: widget.sizeY,
846
+ options: widget.options,
847
+ props: widget.props
848
+ };
849
+ this.detectFirstEmptySlot(this.newWidget);
850
+ const w = {
851
+ uniqueName: this.newWidget.uniqueName,
852
+ component: this.newWidget.component,
853
+ title: this.newWidget.title,
854
+ options: this.newWidget.options,
855
+ props: this.newWidget.props,
856
+ sizeX: this.newWidget.sizeX,
857
+ sizeY: this.newWidget.sizeY,
858
+ col: this.newWidget.col,
859
+ row: this.newWidget.row
860
+ };
861
+ this.widgets.push(w);
862
+ this.newWidget = null;
863
+ this.zone.run(() => {
864
+ this.cdr.detectChanges();
865
+ this.calcGridSize();
866
+ this.emitConfigChanged();
867
+ setTimeout(() => {
868
+ w['__meta__'].instance.element.addEventListener('mousedown', this.dragStart.bind(this), false);
869
+ }, 1000);
870
+ });
871
+ });
872
+ }
873
+ handleOnRemove(w) {
874
+ w.element.classList.add('animate__animated', 'animate__zoomOut');
875
+ w.element.addEventListener('animationend', () => {
876
+ this.widgets = this.widgets.filter((c) => c.__meta__.id !== w.config.__meta__.id);
877
+ this.cdr.detectChanges();
878
+ this.calcGridSize();
879
+ this.emitConfigChanged();
880
+ });
881
+ }
882
+ handleOnSave(e) {
883
+ this.onWidgetSave.emit(e);
884
+ }
885
+ trackByFn(index, item) {
886
+ var _a, _b;
887
+ if (!((_a = item['__meta__']) === null || _a === void 0 ? void 0 : _a.id)) {
888
+ item['__meta__'] = {};
889
+ item['__meta__'].id = AXHtmlUtil.getUID();
890
+ }
891
+ return (_b = item['__meta__']) === null || _b === void 0 ? void 0 : _b.id;
892
+ }
893
+ load(widgets) {
894
+ this.clear();
895
+ return new Promise((resolve, reject) => {
896
+ if (widgets) {
897
+ const loadedWidgets = [];
898
+ if (typeof widgets === 'string') {
899
+ try {
900
+ loadedWidgets.push(...JSON.parse(widgets));
901
+ }
902
+ catch (error) {
903
+ reject('Invalid widget json data!');
904
+ }
905
+ }
906
+ else {
907
+ loadedWidgets.push(...widgets);
908
+ }
909
+ let intervalId = -1;
910
+ const loadFunc = () => {
911
+ if (this.galleryItems && this.galleryItems.length > 0) {
912
+ loadedWidgets.forEach(w => {
913
+ const gitem = this.galleryItems.find(c => c.uniqueName === w.uniqueName);
914
+ if (gitem) {
915
+ w.component = gitem.component;
916
+ if (gitem.props) {
917
+ w.props = JSON.parse(JSON.stringify(gitem.props));
918
+ }
919
+ }
920
+ });
921
+ this.widgets.push(...loadedWidgets);
922
+ window.clearInterval(intervalId);
923
+ this.cdr.detectChanges();
924
+ resolve();
925
+ }
926
+ };
927
+ intervalId = window.setInterval(loadFunc, 200);
928
+ }
929
+ else {
930
+ resolve();
931
+ }
932
+ });
933
+ }
934
+ clear() {
935
+ if (this.widgets.length) {
936
+ this.widgets = [];
937
+ this.cdr.detectChanges();
938
+ this.emitConfigChanged();
939
+ }
940
+ }
941
+ save() {
942
+ const obj = this.widgets.map(c => ({
943
+ uniqueName: c.uniqueName,
944
+ component: c.component,
945
+ title: c.title,
946
+ sizeX: c.sizeX,
947
+ sizeY: c.sizeY,
948
+ col: c.col,
949
+ row: c.row,
950
+ options: c.options,
951
+ props: c.props
952
+ }));
953
+ return Promise.resolve(JSON.stringify(obj));
954
+ }
955
+ refresh() {
956
+ this.widgetHosts.forEach(host => {
957
+ host.widget.refresh();
958
+ });
959
+ }
960
+ handleOnConfigChanged(e) {
961
+ this.cdr.detectChanges();
962
+ this.emitConfigChanged();
963
+ }
964
+ handleOnResizedChanged(e) {
965
+ this.detectFirstEmptySlot(e.config);
966
+ this.cdr.detectChanges();
967
+ this.emitConfigChanged();
968
+ }
969
+ emitConfigChanged() {
970
+ if (!this.resizeChangeObserver) {
971
+ this.resizeChangeObserver = new Observable();
972
+ Observable.create(observer => {
973
+ this.resizeChangeObserver = observer;
974
+ })
975
+ .pipe(debounceTime(750))
976
+ .pipe(distinctUntilChanged())
977
+ .subscribe(c => {
978
+ this.onConfigChanged.emit({
979
+ component: this
980
+ });
981
+ });
982
+ }
983
+ this.resizeChangeObserver.next(new Date());
984
+ }
985
+ }
986
+ AXWidgetBoardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
987
+ AXWidgetBoardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXWidgetBoardComponent, selector: "ax-widget-board", inputs: { galleryItems: "galleryItems", tileSize: "tileSize", gapSize: "gapSize", readonly: "readonly", provideValue: "provideValue" }, outputs: { onConfigChanged: "onConfigChanged", onWidgetSave: "onWidgetSave" }, host: { classAttribute: "ax widget-board" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }, { propertyName: "widgetHosts", predicate: AXWidgetHostComponent, descendants: true }], ngImport: i0, template: "<div class=\"widgets-container\" [class.rtl]=\"rtl\" #container>\r\n <ax-widget-host *ngFor=\"let w of widgets;trackBy: trackByFn\" [config]='w' [sizeX]=\"w.sizeX\" [readonly]=\"readonly || w.readonly\"\r\n [sizeY]=\"w.sizeY\" [col]=\"w.col\" [row]=\"w.row\" (onRemove)=\"handleOnRemove($event)\" (onSave)=\"handleOnSave($event)\"\r\n (onConfigChanged)=\"handleOnConfigChanged($event)\" (onResized)=\"handleOnResizedChanged($event)\"\r\n [provideValue]=\"provideValue\">\r\n </ax-widget-host>\r\n</div>\r\n", styles: [".widget-board{display:inline-block;margin:15px 20px;min-width:calc(100% - 40px);min-height:calc(100% - 34px);--animate-duration: .5s;background-repeat:no-repeat}.widget-board.grid-background{background-repeat:repeat!important}.widget-board.grid-background .widgets-container .widget-host{touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.widget-board.grid-background .widgets-container .widget-host .widget-edit-overlay{display:block;cursor:move}.widget-board.grid-background .widgets-container .widget-host.widget-dragging{z-index:1000}.widget-board.grid-background .widgets-container .widget-host:focus{outline-width:1px;outline-style:solid;outline-color:var(--ax-primary-color)}.widget-board.grid-background .widget-blank-placeholder{background:var(--ax-primary-trans-light-color);position:absolute}.widget-board .widgets-container{position:relative;touch-action:none}.widget-board .widgets-container.rtl .widget-host .widget-options-menu{right:unset!important;left:0!important}.widget-board .widgets-container .widget-host{position:absolute;background:#fff;box-shadow:2px 2px 3px #dadada}.widget-board .widgets-container .widget-host .widget-content{width:100%;height:100%;display:flex;flex-direction:column}.widget-board .widgets-container .widget-host .widget-content .widget-title{padding:var(--ax-size-md);text-align:start;font-size:1.5em;position:absolute}.widget-board .widgets-container .widget-host .widget-edit-loading{display:none;background:rgba(255,255,255,.85);position:absolute;width:100%;height:100%;top:0;left:0;z-index:2;display:flex}.widget-board .widgets-container .widget-host .widget-config-overlay{position:absolute;background:white;width:100%;height:100%;top:0;left:0;z-index:1;padding:var(--ax-size-md);cursor:pointer}.widget-board .widgets-container .widget-host .widget-config-overlay:hover .widget-title{text-decoration:underline}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-title{text-align:start;font-size:1.5em}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box{align-self:center;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:var(--ax-gray-dark-color)}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box .config-title{font-size:1.2em;margin-bottom:var(--ax-size-md)}.widget-board .widgets-container .widget-host .widget-edit-overlay{display:none;background:rgba(255,255,255,.5);position:absolute;width:100%;height:100%;top:0;left:0;z-index:10}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu{margin:6px;text-align:end;float:inline-end;opacity:1;transition:opacity 1s ease}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button{display:inline-block;background-color:#f0f0f0;border-radius:1px;border:2px solid #fff;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;padding:0;height:32px;width:32px;cursor:pointer;color:#666}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button:hover{border-color:#a6a6a6;background-color:#c8c8c8}.widget-board .widgets-container .widget-host .widget-options-menu{display:none;position:absolute;top:0;right:0;z-index:2;cursor:pointer;padding:2px 5px}.widget-board .widgets-container .widget-host .widget-options-menu:hover{background-color:#f0f0f0}.widget-board .widgets-container .widget-host .widget-container{padding:1px;height:100%}.widget-board .widgets-container .widget-host .widget-container:hover .widget-options-menu{display:block}\n"], components: [{ type: AXWidgetHostComponent, selector: "ax-widget-host", inputs: ["provideValue", "config", "readonly", "sizeX", "sizeY", "col", "row"], outputs: ["onRemove", "onConfigChanged", "onResized", "onSave"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardComponent, decorators: [{
989
+ type: Component,
990
+ args: [{ selector: 'ax-widget-board', host: { class: 'ax widget-board' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"widgets-container\" [class.rtl]=\"rtl\" #container>\r\n <ax-widget-host *ngFor=\"let w of widgets;trackBy: trackByFn\" [config]='w' [sizeX]=\"w.sizeX\" [readonly]=\"readonly || w.readonly\"\r\n [sizeY]=\"w.sizeY\" [col]=\"w.col\" [row]=\"w.row\" (onRemove)=\"handleOnRemove($event)\" (onSave)=\"handleOnSave($event)\"\r\n (onConfigChanged)=\"handleOnConfigChanged($event)\" (onResized)=\"handleOnResizedChanged($event)\"\r\n [provideValue]=\"provideValue\">\r\n </ax-widget-host>\r\n</div>\r\n", styles: [".widget-board{display:inline-block;margin:15px 20px;min-width:calc(100% - 40px);min-height:calc(100% - 34px);--animate-duration: .5s;background-repeat:no-repeat}.widget-board.grid-background{background-repeat:repeat!important}.widget-board.grid-background .widgets-container .widget-host{touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.widget-board.grid-background .widgets-container .widget-host .widget-edit-overlay{display:block;cursor:move}.widget-board.grid-background .widgets-container .widget-host.widget-dragging{z-index:1000}.widget-board.grid-background .widgets-container .widget-host:focus{outline-width:1px;outline-style:solid;outline-color:var(--ax-primary-color)}.widget-board.grid-background .widget-blank-placeholder{background:var(--ax-primary-trans-light-color);position:absolute}.widget-board .widgets-container{position:relative;touch-action:none}.widget-board .widgets-container.rtl .widget-host .widget-options-menu{right:unset!important;left:0!important}.widget-board .widgets-container .widget-host{position:absolute;background:#fff;box-shadow:2px 2px 3px #dadada}.widget-board .widgets-container .widget-host .widget-content{width:100%;height:100%;display:flex;flex-direction:column}.widget-board .widgets-container .widget-host .widget-content .widget-title{padding:var(--ax-size-md);text-align:start;font-size:1.5em;position:absolute}.widget-board .widgets-container .widget-host .widget-edit-loading{display:none;background:rgba(255,255,255,.85);position:absolute;width:100%;height:100%;top:0;left:0;z-index:2;display:flex}.widget-board .widgets-container .widget-host .widget-config-overlay{position:absolute;background:white;width:100%;height:100%;top:0;left:0;z-index:1;padding:var(--ax-size-md);cursor:pointer}.widget-board .widgets-container .widget-host .widget-config-overlay:hover .widget-title{text-decoration:underline}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-title{text-align:start;font-size:1.5em}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box{align-self:center;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:var(--ax-gray-dark-color)}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box .config-title{font-size:1.2em;margin-bottom:var(--ax-size-md)}.widget-board .widgets-container .widget-host .widget-edit-overlay{display:none;background:rgba(255,255,255,.5);position:absolute;width:100%;height:100%;top:0;left:0;z-index:10}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu{margin:6px;text-align:end;float:inline-end;opacity:1;transition:opacity 1s ease}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button{display:inline-block;background-color:#f0f0f0;border-radius:1px;border:2px solid #fff;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;padding:0;height:32px;width:32px;cursor:pointer;color:#666}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button:hover{border-color:#a6a6a6;background-color:#c8c8c8}.widget-board .widgets-container .widget-host .widget-options-menu{display:none;position:absolute;top:0;right:0;z-index:2;cursor:pointer;padding:2px 5px}.widget-board .widgets-container .widget-host .widget-options-menu:hover{background-color:#f0f0f0}.widget-board .widgets-container .widget-host .widget-container{padding:1px;height:100%}.widget-board .widgets-container .widget-host .widget-container:hover .widget-options-menu{display:block}\n"] }]
991
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { container: [{
992
+ type: ViewChild,
993
+ args: ['container']
994
+ }], widgetHosts: [{
995
+ type: ViewChildren,
996
+ args: [AXWidgetHostComponent]
997
+ }], galleryItems: [{
998
+ type: Input
999
+ }], tileSize: [{
1000
+ type: Input
1001
+ }], gapSize: [{
1002
+ type: Input
1003
+ }], readonly: [{
1004
+ type: Input
1005
+ }], provideValue: [{
1006
+ type: Input
1007
+ }], onConfigChanged: [{
1008
+ type: Output
1009
+ }], onWidgetSave: [{
1010
+ type: Output
1011
+ }] } });
1012
+
1013
+ class AXWidgetSizePropertyEditorComponent extends AXProperyEditorComponent {
1014
+ constructor(cdr) {
1015
+ super(cdr);
1016
+ this.cdr = cdr;
1017
+ this.minX = 1;
1018
+ this.maxX = 10;
1019
+ this.minY = 1;
1020
+ this.maxY = 10;
1021
+ }
1022
+ ngOnInit() {
1023
+ if (Array.isArray(this.value)) {
1024
+ this.sizeX = this.value[0];
1025
+ this.sizeY = this.value[1];
1026
+ }
1027
+ else {
1028
+ this.sizeX = 2;
1029
+ this.sizeY = 2;
1030
+ }
1031
+ }
1032
+ handleMinValueChange(e) {
1033
+ this.sizeX = e.value;
1034
+ if (this.sizeY > 0) {
1035
+ super.handleValueChange([this.sizeX, this.sizeY]);
1036
+ }
1037
+ }
1038
+ handleMaxValueChange(e) {
1039
+ this.sizeY = e.value;
1040
+ if (this.sizeX > 0) {
1041
+ super.handleValueChange([this.sizeX, this.sizeY]);
1042
+ }
1043
+ }
1044
+ ngAfterViewInit() {
1045
+ this.onRenderCompleted.emit();
1046
+ }
1047
+ }
1048
+ AXWidgetSizePropertyEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSizePropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1049
+ AXWidgetSizePropertyEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AXWidgetSizePropertyEditorComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div style=\"display: grid;grid-gap: 2%; grid-template-columns: 49% 49%;\">\r\n <ax-number-box (onValueChanged)=\"handleMinValueChange($event)\" [value]=\"sizeX\" [min]=\"minX\" [max]=\"maxX\">\r\n </ax-number-box>\r\n <ax-number-box (onValueChanged)=\"handleMaxValueChange($event)\" [value]=\"sizeY\" [min]=\"minY\" [max]=\"maxY\">\r\n </ax-number-box>\r\n</div>", components: [{ type: i1.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["min", "max", "showSeparator", "showCurrency", "showCounter", "scrollWeel", "showDoubleCounter", "maxLength", "intStep", "decimalNumber", "customStep"] }] });
1050
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSizePropertyEditorComponent, decorators: [{
1051
+ type: Component,
1052
+ args: [{ template: "<div style=\"display: grid;grid-gap: 2%; grid-template-columns: 49% 49%;\">\r\n <ax-number-box (onValueChanged)=\"handleMinValueChange($event)\" [value]=\"sizeX\" [min]=\"minX\" [max]=\"maxX\">\r\n </ax-number-box>\r\n <ax-number-box (onValueChanged)=\"handleMaxValueChange($event)\" [value]=\"sizeY\" [min]=\"minY\" [max]=\"maxY\">\r\n </ax-number-box>\r\n</div>" }]
1053
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
1054
+
1055
+ class AXWidgetBoardModule {
1056
+ /**
1057
+ *
1058
+ */
1059
+ constructor() {
1060
+ AXTranslator.load('en', {
1061
+ 'widget-board': {
1062
+ 'configurable-props': 'Configurable Properties',
1063
+ configure: 'Configure Widget'
1064
+ }
1065
+ });
1066
+ AXTranslator.load('fa', {
1067
+ 'widget-board': {
1068
+ 'configurable-props': 'ویژگی های قابل تنظیم',
1069
+ configure: 'پیکر بندی ابزارک'
1070
+ }
1071
+ });
1072
+ }
1073
+ }
1074
+ AXWidgetBoardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1075
+ AXWidgetBoardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, declarations: [AXWidgetBoardComponent, AXWidgetHostComponent, AXWidgetConfigComponent, AXWidgetSaveComponent], imports: [CommonModule,
1076
+ AXSearchBoxModule,
1077
+ AXLoadingModule,
1078
+ RouterModule,
1079
+ AXProppertyEditorModule,
1080
+ AXPageModule,
1081
+ AXToolbarModule,
1082
+ AXTranslatorModule,
1083
+ AXLabelModule,
1084
+ AXTextAreaModule,
1085
+ AXFieldsetModule,
1086
+ AXTextBoxModule,
1087
+ AXFormGroupModule,
1088
+ AXTabStripModule,
1089
+ AXCheckBoxModule,
1090
+ AXMenuModule,
1091
+ AXTranslatorModule,
1092
+ AXValidationModule, i1$2.RouterModule], exports: [AXWidgetBoardComponent, AXProppertyEditorModule] });
1093
+ AXWidgetBoardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, providers: [], imports: [[
1094
+ CommonModule,
1095
+ AXSearchBoxModule,
1096
+ AXLoadingModule,
1097
+ RouterModule,
1098
+ AXProppertyEditorModule,
1099
+ AXPageModule,
1100
+ AXToolbarModule,
1101
+ AXTranslatorModule,
1102
+ AXLabelModule,
1103
+ AXTextAreaModule,
1104
+ AXFieldsetModule,
1105
+ AXTextBoxModule,
1106
+ AXFormGroupModule,
1107
+ AXTabStripModule,
1108
+ AXCheckBoxModule,
1109
+ AXMenuModule,
1110
+ AXTranslatorModule,
1111
+ AXValidationModule,
1112
+ RouterModule.forChild([
1113
+ {
1114
+ component: AXWidgetSizePropertyEditorComponent,
1115
+ path: 'ax/editors/widget-size'
1116
+ },
1117
+ ])
1118
+ ], AXProppertyEditorModule] });
1119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetBoardModule, decorators: [{
1120
+ type: NgModule,
1121
+ args: [{
1122
+ imports: [
1123
+ CommonModule,
1124
+ AXSearchBoxModule,
1125
+ AXLoadingModule,
1126
+ RouterModule,
1127
+ AXProppertyEditorModule,
1128
+ AXPageModule,
1129
+ AXToolbarModule,
1130
+ AXTranslatorModule,
1131
+ AXLabelModule,
1132
+ AXTextAreaModule,
1133
+ AXFieldsetModule,
1134
+ AXTextBoxModule,
1135
+ AXFormGroupModule,
1136
+ AXTabStripModule,
1137
+ AXCheckBoxModule,
1138
+ AXMenuModule,
1139
+ AXTranslatorModule,
1140
+ AXValidationModule,
1141
+ RouterModule.forChild([
1142
+ {
1143
+ component: AXWidgetSizePropertyEditorComponent,
1144
+ path: 'ax/editors/widget-size'
1145
+ },
1146
+ ])
1147
+ ],
1148
+ exports: [AXWidgetBoardComponent, AXProppertyEditorModule],
1149
+ declarations: [AXWidgetBoardComponent, AXWidgetHostComponent, AXWidgetConfigComponent, AXWidgetSaveComponent],
1150
+ providers: []
1151
+ }]
1152
+ }], ctorParameters: function () { return []; } });
1153
+
1154
+ class AXWidgetSizePropertyEditorModule {
1155
+ }
1156
+ AXWidgetSizePropertyEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSizePropertyEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1157
+ AXWidgetSizePropertyEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSizePropertyEditorModule, declarations: [AXWidgetSizePropertyEditorComponent], imports: [CommonModule, FormsModule, AXNumberBoxModule], exports: [AXWidgetSizePropertyEditorComponent] });
1158
+ AXWidgetSizePropertyEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSizePropertyEditorModule, providers: [], imports: [[CommonModule, FormsModule, AXNumberBoxModule]] });
1159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXWidgetSizePropertyEditorModule, decorators: [{
1160
+ type: NgModule,
1161
+ args: [{
1162
+ declarations: [AXWidgetSizePropertyEditorComponent],
1163
+ imports: [CommonModule, FormsModule, AXNumberBoxModule],
1164
+ exports: [AXWidgetSizePropertyEditorComponent],
1165
+ providers: []
1166
+ }]
1167
+ }] });
1168
+
1169
+ /**
1170
+ * Generated bundle index. Do not edit.
1171
+ */
1172
+
1173
+ export { AXWidgetBoardComponent, AXWidgetBoardModule, AXWidgetComponent, AXWidgetHostComponent, AXWidgetSizePropertyEditorComponent, AXWidgetSizePropertyEditorModule };
1174
+ //# sourceMappingURL=acorex-layout.mjs.map