@acorex/layout 3.0.66 → 4.1.2

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 +0,0 @@
1
- {"version":3,"file":"acorex-layout.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@acorex/layout/lib/widget-board/widget.class.ts","ng://@acorex/layout/lib/widget-board/widget-config.component.ts","ng://@acorex/layout/lib/widget-board/widget-save.component.ts","ng://@acorex/layout/lib/widget-board/widget-host.component.ts","ng://@acorex/layout/lib/widget-board/widget-board.component.ts","ng://@acorex/layout/lib/widget-board/editors/widget-size-editor/widget-size.editor.ts","ng://@acorex/layout/lib/widget-board/widget-board.module.ts","ng://@acorex/layout/lib/widget-board/editors/widget-size-editor/widget-size.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { EventEmitter } from '@angular/core';\r\nimport { AXValueEvent, AXBaseEvent, propertyEditor, AXDataEvent } from '@acorex/components';\r\nimport { AXHtmlUtil, AXTranslator } from '@acorex/core';\r\n\r\nexport interface AXWidgetConfig {\r\n uniqueName: string;\r\n component: any;\r\n title: string;\r\n sizeX: number;\r\n sizeY: number;\r\n col?: number;\r\n row?: number;\r\n options?: any;\r\n props?: any;\r\n}\r\n\r\nexport interface AXWidgetConfigChanged extends AXBaseEvent {\r\n config: AXWidgetConfig;\r\n}\r\n\r\n\r\n\r\nexport interface AXWidgetBoardConfigChanged extends AXBaseEvent {\r\n\r\n}\r\n\r\nexport interface AXWidgetConfigSavedEvent extends AXDataEvent<AXWidgetSaveAsData> {\r\n\r\n}\r\n\r\n\r\nexport interface AXWidgetSaveAsData {\r\n title?: string;\r\n description?: string;\r\n icon?: string;\r\n group?: string;\r\n //\r\n uniqueName: string;\r\n component: any;\r\n options?: any;\r\n props?: any;\r\n}\r\n\r\n// @dynamic\r\nexport abstract class AXWidgetComponent {\r\n\r\n readonly uid: string = AXHtmlUtil.getUID();\r\n provideValue: (e: any) => any;\r\n\r\n onBusyChanged: EventEmitter<AXValueEvent<boolean>> = new EventEmitter<AXValueEvent<boolean>>();\r\n\r\n private _isBusy: boolean = true;\r\n public get isBusy(): boolean {\r\n return this._isBusy;\r\n }\r\n public set isBusy(v: boolean) {\r\n if (v !== this._isBusy) {\r\n const eventData: AXValueEvent<boolean> = {\r\n component: this,\r\n oldValue: this._isBusy,\r\n value: v\r\n };\r\n this._isBusy = v;\r\n this.onBusyChanged.emit(eventData);\r\n }\r\n }\r\n\r\n @propertyEditor({\r\n editorClass: 'ax/editors/widget-size',\r\n title: 'common.size',\r\n visible: false,\r\n order: -99,\r\n })\r\n widgetSize: number[];\r\n\r\n @propertyEditor({\r\n editorClass: 'ax/editors/select',\r\n title: 'common.refresh-rate',\r\n visible: true,\r\n order: -98,\r\n editorOptions: {\r\n items: () => {\r\n return [1, 2, 3, 5, 10, 20, 30, 60].map(c => ({\r\n id: 60000 * c,\r\n text: AXTranslator.get('dateTime.duration.format_minute').replace('{0}', c.toString())\r\n }));\r\n },\r\n allowNull: false,\r\n allowSearch: false,\r\n selectionDataMode: 'value',\r\n selectionMode: 'single',\r\n valueField: 'id',\r\n }\r\n })\r\n refreshRate: any = [{\r\n id: 60000 * 5,\r\n text: AXTranslator.get('dateTime.duration.format_minute').replace('{0}', '5')\r\n }];\r\n\r\n // ???\r\n getRefreshRate() {\r\n return Array.isArray(this.refreshRate) && this.refreshRate.length ? this.refreshRate[0].id : this.refreshRate;\r\n }\r\n\r\n private intervalId: number;\r\n\r\n constructor() {\r\n this.onConfiguredChanged.subscribe(() => {\r\n if (this.isConfigured === true && this.getRefreshRate()) {\r\n this.restartRefreshTimer();\r\n }\r\n else {\r\n this.stopRefreshTimer();\r\n }\r\n });\r\n }\r\n\r\n\r\n private startRefreshTimer() {\r\n this.intervalId = window.setInterval(this.refresh.bind(this), this.getRefreshRate());\r\n }\r\n\r\n private stopRefreshTimer() {\r\n window.clearInterval(this.intervalId);\r\n }\r\n\r\n private restartRefreshTimer() {\r\n this.stopRefreshTimer();\r\n this.startRefreshTimer();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.stopRefreshTimer();\r\n }\r\n\r\n public redraw() {\r\n\r\n }\r\n\r\n public refresh() {\r\n this.restartRefreshTimer();\r\n }\r\n\r\n onConfiguredChanged: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n get isConfigured(): boolean {\r\n return true;\r\n }\r\n\r\n public setValue(name: string, value?: any) {\r\n this[name] = value;\r\n this.onConfiguredChanged.emit();\r\n }\r\n\r\n public getValue(name: string): Promise<any> {\r\n const val = this[name];\r\n const config = this['__meta__'].config;\r\n const runtime = config.props[name]?.runtime;\r\n if (runtime && this.provideValue) {\r\n const res = this.provideValue({\r\n name,\r\n value: val,\r\n uniqueName: config.uniqueName,\r\n options: config.options,\r\n });\r\n if (this.provideValue instanceof Promise) {\r\n return res;\r\n }\r\n else {\r\n return Promise.resolve(res);\r\n }\r\n }\r\n return Promise.resolve(val);\r\n }\r\n\r\n}","import { Component, ViewEncapsulation, ChangeDetectionStrategy, ChangeDetectorRef, ViewChild } from '@angular/core';\r\nimport { AXPropertyConfig, AXBasePopupPageComponent, AXMenuItemClickEvent, AXProperyEditorValueChangeEvent, AXValidationFormComponent } from '@acorex/components';\r\nimport { AXButtonItem, AXTranslator } from '@acorex/core';\r\nimport { AXWidgetComponent } from './widget.class';\r\n\r\n\r\n@Component({\r\n templateUrl: './widget-config.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\n\r\nexport class AXWidgetConfigComponent extends AXBasePopupPageComponent {\r\n\r\n @ViewChild(AXValidationFormComponent) form: AXValidationFormComponent;\r\n\r\n constructor(private cdr: ChangeDetectorRef) {\r\n super();\r\n }\r\n\r\n\r\n widget: AXWidgetComponent;\r\n props: AXPropertyConfig[] = [];\r\n displayProps: AXPropertyConfig[] = [];\r\n\r\n\r\n changes: AXPropertyConfig[] = [];\r\n\r\n context: any = {};\r\n\r\n\r\n getFooterButtons(): AXButtonItem[] {\r\n return [\r\n {\r\n name: 'okay',\r\n submitBehavior: true,\r\n text: AXTranslator.get('common.confirm'),\r\n style: 'success'\r\n },\r\n {\r\n name: 'cancel',\r\n cancelBehavior: true,\r\n text: AXTranslator.get('common.cancel'),\r\n style: 'danger blank'\r\n }\r\n ];\r\n }\r\n\r\n\r\n\r\n\r\n\r\n onFooterButtonClick(e: AXMenuItemClickEvent) {\r\n if (e.name === 'cancel') {\r\n this.close();\r\n }\r\n if (e.name === 'okay') {\r\n this.form.validate().then(c => {\r\n if (c.result) {\r\n this.close(this.changes);\r\n }\r\n });\r\n }\r\n }\r\n\r\n handleValueChange(e: AXProperyEditorValueChangeEvent) {\r\n const prop = this.changes.find(c => c.property.name === e.property.name);\r\n if (prop) {\r\n prop.value = e.value;\r\n }\r\n else {\r\n this.changes.push({ property: e.property, value: e.value });\r\n }\r\n this.updateContext();\r\n }\r\n\r\n ngOnInit() {\r\n this.displayProps = this.props.filter(c => c.property.visible !== false).sort((a, b) => a.property.order - b.property.order);\r\n this.updateContext();\r\n }\r\n\r\n\r\n private updateContext() {\r\n const ctx = {};\r\n this.props.forEach(p => {\r\n ctx[p.property.name] = p.value;\r\n });\r\n this.changes.forEach(p => {\r\n ctx[p.property.name] = p.value;\r\n });\r\n this.context = ctx;\r\n }\r\n\r\n\r\n identify(index, item: AXPropertyConfig) {\r\n return item.property.name;\r\n }\r\n\r\n}","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n\r\n} from '@angular/core';\r\nimport { AXWidgetConfig, AXWidgetSaveAsData } from './widget.class';\r\nimport { AXButtonItem, AXHtmlUtil, AXObjectUtil, AXTranslator } from '@acorex/core';\r\nimport { AXPropertyConfig, AXMenuItemClickEvent, AXBasePopupPageComponent } from '@acorex/components';\r\n\r\n\r\n\r\n@Component({\r\n templateUrl: \"./widget-save.component.html\",\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AXWidgetSaveComponent extends AXBasePopupPageComponent {\r\n config: AXWidgetConfig;\r\n props: AXPropertyConfig[] = [];\r\n displayProps: { name: string, title: string, allow: boolean }[];\r\n\r\n data: AXWidgetSaveAsData;\r\n\r\n getFooterButtons(): AXButtonItem[] {\r\n return [\r\n {\r\n name: 'okay',\r\n submitBehavior: true,\r\n text: AXTranslator.get('common.confirm'),\r\n style: 'ax success'\r\n },\r\n {\r\n name: 'cancel',\r\n cancelBehavior: true,\r\n text: AXTranslator.get('common.cancel'),\r\n style: 'ax light'\r\n }\r\n ];\r\n }\r\n\r\n ngOnInit() {\r\n const titleProp = this.props.find(c => c.property.name === 'title' || c.property.name === 'name');\r\n const title = titleProp?.value || this.config.title;\r\n const pp: any = {};\r\n this.props?.forEach(c => {\r\n pp[c.property.name] = c.property;\r\n });\r\n this.data = {\r\n component: this.config.component,\r\n title,\r\n uniqueName: `${this.config.uniqueName}-${AXHtmlUtil.getUID()}`,\r\n options: AXObjectUtil.deepJSONClone(this.config.options),\r\n props: AXObjectUtil.deepJSONClone(pp)\r\n };\r\n this.displayProps = this.props\r\n .filter(c => c.property.visible !== false)\r\n .sort((a, b) => a.property.order - b.property.order)\r\n .map(c => ({\r\n name: c.property.name,\r\n title: c.property.title,\r\n allow: true\r\n }));\r\n }\r\n\r\n\r\n\r\n onFooterButtonClick(e: AXMenuItemClickEvent) {\r\n if (e.name === 'cancel') {\r\n this.close();\r\n }\r\n if (e.name === 'okay') {\r\n this.props.forEach(p => {\r\n const pp = this.displayProps.find(c => c.name === p.property.name);\r\n if (pp == null || !pp.allow) {\r\n let ppp = this.data.props[p.property.name];\r\n if (ppp) {\r\n ppp.visible = false;\r\n }\r\n else {\r\n ppp = { visible: false };\r\n }\r\n }\r\n });\r\n this.close(this.data);\r\n }\r\n }\r\n}","import {\r\n Component,\r\n ViewEncapsulation, Input,\r\n ElementRef, HostBinding, ComponentFactoryResolver, ViewChild,\r\n ViewContainerRef, Output, EventEmitter, ChangeDetectionStrategy,\r\n ChangeDetectorRef, ComponentRef\r\n} from '@angular/core';\r\nimport { AXWidgetConfig, AXWidgetComponent, AXWidgetConfigChanged, AXWidgetConfigSavedEvent } from './widget.class';\r\nimport { AXObjectUtil, AXRenderService } from '@acorex/core';\r\nimport { AXPopupService, AXPropertyDecorators, AXPropertyDecorator, AXLoadingService } from '@acorex/components';\r\nimport { AXWidgetConfigComponent } from './widget-config.component';\r\nimport { AXMenuItem } from '@acorex/core';\r\nimport { AXTranslator } from '@acorex/core';\r\nimport { AXWidgetSaveComponent } from './widget-save.component';\r\n\r\n\r\n\r\n\r\n\r\n@Component({\r\n selector: 'ax-widget-host',\r\n templateUrl: \"./widget-host.component.html\",\r\n host: { class: 'ax widget-host', tabindex: '0' },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\n\r\nexport class AXWidgetHostComponent {\r\n\r\n private _widget: AXWidgetComponent;\r\n public get widget(): AXWidgetComponent {\r\n return this._widget;\r\n }\r\n\r\n _hasProps: boolean = false;\r\n\r\n\r\n _hasMenu: boolean = false;\r\n\r\n @Input()\r\n provideValue: (e: any) => any;\r\n\r\n\r\n get element(): HTMLDivElement {\r\n return this.ref.nativeElement;\r\n }\r\n\r\n\r\n configMenuItem: AXMenuItem[] = [\r\n {\r\n icon: 'far fa-ellipsis-h',\r\n items: []\r\n }\r\n ];\r\n\r\n\r\n @Output()\r\n onRemove: EventEmitter<AXWidgetHostComponent> = new EventEmitter<AXWidgetHostComponent>();\r\n\r\n @Output()\r\n onConfigChanged: EventEmitter<AXWidgetConfigChanged> = new EventEmitter<AXWidgetConfigChanged>();\r\n\r\n\r\n @Output()\r\n onResized: EventEmitter<AXWidgetConfigChanged> = new EventEmitter<AXWidgetConfigChanged>();\r\n\r\n @Output()\r\n onSave: EventEmitter<AXWidgetConfigSavedEvent> = new EventEmitter<AXWidgetConfigSavedEvent>();\r\n\r\n @Input()\r\n config: AXWidgetConfig;\r\n\r\n @ViewChild('vc', { read: ViewContainerRef })\r\n vc: ViewContainerRef;\r\n\r\n private componentRef: ComponentRef<any>;\r\n //private isLoading: boolean = true;\r\n\r\n // get isBusy() {\r\n // return this._widget?.isBusy || this.isLoading;\r\n // }\r\n\r\n\r\n private _loadingId: number;\r\n\r\n private _isLoading: boolean = false;\r\n public get isLoading(): boolean {\r\n return this._isLoading;\r\n }\r\n public set isLoading(v: boolean) {\r\n this._isLoading = v;\r\n if (this._loadingId && !v) {\r\n this.loadingService.hide(this._loadingId);\r\n this._loadingId = null;\r\n }\r\n if (v) {\r\n this._loadingId = this.loadingService.show(this.ref.nativeElement);\r\n }\r\n }\r\n\r\n\r\n get isConfigured(): boolean {\r\n return this._widget?.isConfigured || false;\r\n }\r\n\r\n\r\n constructor(\r\n private ref: ElementRef<HTMLDivElement>,\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n private rendererService: AXRenderService,\r\n private cdr: ChangeDetectorRef,\r\n private popup: AXPopupService,\r\n private loadingService: AXLoadingService\r\n\r\n ) {\r\n\r\n }\r\n\r\n\r\n ngOnInit() {\r\n this.isLoading = true;\r\n }\r\n\r\n\r\n async ngAfterViewInit() {\r\n let component: any;\r\n if (typeof this.config.component === 'string') {\r\n const route = await this.rendererService.findLoadedComponentByRoute(this.config.component, 20);\r\n component = route?.component;\r\n }\r\n else if (typeof this.config.component === 'function') {\r\n component = this.config.component;\r\n }\r\n if (component == null) {\r\n console.error(`Invalid Widget Component!`, this.config);\r\n this.onRemove.emit(this);\r\n return;\r\n }\r\n\r\n const widgetFactory = this.componentFactoryResolver.resolveComponentFactory(component);\r\n this.componentRef = this.vc.createComponent(widgetFactory);\r\n this._widget = this.componentRef.instance as AXWidgetComponent;\r\n this._widget.provideValue = this.provideValue;\r\n if (this._widget.onBusyChanged) {\r\n this._widget.onBusyChanged.subscribe((d) => {\r\n if (!this._widget.widgetSize) {\r\n this._widget.setValue('widgetSize', [this.sizeX, this.sizeY]);\r\n }\r\n else {\r\n this.setSizeFromOptions();\r\n }\r\n this.isLoading = d.value;\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n if (this._widget.onConfiguredChanged) {\r\n this._widget.onConfiguredChanged.subscribe(() => {\r\n this.setSizeFromOptions();\r\n });\r\n }\r\n //\r\n if (this.config.options) {\r\n Object.assign(this._widget, this.config.options);\r\n }\r\n this._hasProps = AXPropertyDecorators.getProperties(this._widget).length > 0;\r\n\r\n this.isLoading = false;\r\n this.config['__meta__'].instance = this;\r\n this._widget['__meta__'] = {};\r\n this._widget['__meta__'].config = this.config;\r\n //\r\n this.configMenuItem[0].items.push({\r\n name: 'refresh',\r\n icon: 'far fa-undo',\r\n text: AXTranslator.get('common.refresh'),\r\n onClick: () => {\r\n this?.widget?.refresh();\r\n }\r\n });\r\n //\r\n if (this._hasProps) {\r\n this.configMenuItem[0].items.push({\r\n name: 'configs',\r\n icon: 'far fa-cogs',\r\n text: AXTranslator.get('common.configs'),\r\n onClick: () => {\r\n this.openConfigDialog();\r\n }\r\n });\r\n }\r\n this.configMenuItem[0].items.push({\r\n name: 'save',\r\n icon: 'far fa-save',\r\n text: AXTranslator.get('common.save-as'),\r\n onClick: () => {\r\n this.openSaveDialog();\r\n }\r\n });\r\n if (true) {\r\n this.configMenuItem[0].items.push({\r\n name: 'remove',\r\n icon: 'far fa-times',\r\n style: 'ax danger blank',\r\n text: AXTranslator.get('common.remove'),\r\n onClick: () => {\r\n this.onRemove.emit(this);\r\n }\r\n });\r\n }\r\n this._hasMenu = this.configMenuItem[0].items.length > 0;\r\n this.cdr.detectChanges();\r\n }\r\n\r\n @HostBinding('attr.data-size-x')\r\n @Input()\r\n sizeX: number = 1;\r\n\r\n @HostBinding('attr.data-size-y')\r\n @Input()\r\n sizeY: number = 1;\r\n\r\n @HostBinding('attr.data-col')\r\n @Input()\r\n col: number = 1;\r\n\r\n\r\n @HostBinding('attr.data-row')\r\n @Input()\r\n row: number = 1;\r\n\r\n\r\n private setSizeFromOptions() {\r\n this._widget.getValue('widgetSize').then(c => {\r\n const oldSizeX = this.sizeX;\r\n const oldSizeY = this.sizeY;\r\n if (c && Array.isArray(c) && (oldSizeX !== c[0] || oldSizeY !== c[1])) {\r\n this.config.sizeX = this.sizeX = c[0];\r\n this.config.sizeY = this.sizeY = c[1];\r\n this.onResized.emit({\r\n component: this._widget,\r\n config: this.config\r\n });\r\n }\r\n this.cdr.detectChanges();\r\n });\r\n }\r\n\r\n remove(e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.onRemove.emit(this);\r\n return false;\r\n }\r\n\r\n handleConfig(e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.openConfigDialog();\r\n return false;\r\n }\r\n\r\n private openConfigDialog() {\r\n const ppp = this.getMergedProps();\r\n this.popup.open(AXWidgetConfigComponent, {\r\n title: AXTranslator.get('common.configs'),\r\n size: 'sm',\r\n data: {\r\n props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] })),\r\n widget: this.widget\r\n }\r\n }).then(c => {\r\n if (c.data) {\r\n if (!this.config.options) {\r\n this.config.options = {};\r\n }\r\n c.data.forEach(p => {\r\n this._widget.setValue(p.property.name, p.value);\r\n this.config.options[p.property.name] = p.value;\r\n });\r\n this.emitConfigChanged();\r\n this._widget.redraw();\r\n this.cdr.detectChanges();\r\n }\r\n });\r\n }\r\n\r\n private openSaveDialog() {\r\n const ppp = this.getMergedProps();\r\n this.popup.open(AXWidgetSaveComponent, {\r\n title: AXTranslator.get('common.save-as'),\r\n size: 'sm',\r\n data: {\r\n config: this.config,\r\n props: ppp.map(c => ({ property: c.options, value: this._widget[c.options.name] }))\r\n }\r\n }).then(c => {\r\n if (c.data) {\r\n this.onSave.emit({\r\n component: this._widget,\r\n data: c.data\r\n });\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n handleOptionClick(e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.openConfigDialog();\r\n return false;\r\n }\r\n\r\n ngOnDestroy() {\r\n this.vc.clear();\r\n if (this.componentRef) {\r\n this.componentRef.destroy();\r\n }\r\n }\r\n\r\n private getMergedProps(): AXPropertyDecorator[] {\r\n const ppp = AXObjectUtil.deepCopy(AXPropertyDecorators.getProperties(this._widget)) as AXPropertyDecorator[];\r\n for (const key in this.config.props) {\r\n if (Object.prototype.hasOwnProperty.call(this.config.props, key)) {\r\n const newP = this.config.props[key];\r\n const existPropDec = ppp.find(p => p.property === key);\r\n if (existPropDec) {\r\n Object.assign(existPropDec.options, newP);\r\n }\r\n }\r\n }\r\n return ppp;\r\n }\r\n\r\n private emitConfigChanged() {\r\n this.onConfigChanged.emit({\r\n component: this._widget,\r\n config: this.config\r\n });\r\n }\r\n\r\n}","import {\r\n Component,\r\n OnInit,\r\n Input,\r\n ViewEncapsulation,\r\n ElementRef,\r\n ViewChild,\r\n NgZone,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Output,\r\n EventEmitter, ViewChildren, QueryList\r\n} from '@angular/core';\r\nimport {\r\n AXWidgetConfig,\r\n AXWidgetConfigChanged,\r\n AXWidgetBoardConfigChanged,\r\n AXWidgetConfigSavedEvent\r\n} from './widget.class';\r\nimport { AXWidgetHostComponent } from './widget-host.component';\r\nimport { AXHtmlUtil, AXClientRec } from '@acorex/core';\r\nimport { Observable } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'ax-widget-board',\r\n templateUrl: './widget-board.component.html',\r\n styleUrls: ['./widget-board.component.scss'],\r\n host: { class: 'ax widget-board' },\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class AXWidgetBoardComponent implements OnInit {\r\n\r\n @ViewChild('container')\r\n private container: ElementRef<HTMLDivElement>;\r\n\r\n @ViewChildren(AXWidgetHostComponent)\r\n private widgetHosts: QueryList<AXWidgetHostComponent>;\r\n\r\n widgets: AXWidgetConfig[] = [];\r\n\r\n @Input()\r\n galleryItems: AXWidgetConfig[] = [];\r\n\r\n @Input()\r\n tileSize: number = 80;\r\n\r\n @Input()\r\n gapSize: number = 5;\r\n\r\n private newWidget: AXWidgetConfig = null;\r\n\r\n public rtl: boolean;\r\n\r\n private _isInEditing: boolean = false;\r\n public isInEditing(): boolean {\r\n return this._isInEditing;\r\n }\r\n private isDragging: boolean = false;\r\n private dragItem: HTMLElement;\r\n\r\n @Input()\r\n provideValue: (e: any) => any;\r\n\r\n private readonly DATA_COL = 'data-col';\r\n private readonly DATA_ROW = 'data-row';\r\n private readonly DATA_SIZE_X = 'data-size-x';\r\n private readonly DATA_SIZE_Y = 'data-size-y';\r\n private readonly DATA_OLD_COL = 'data-old-col';\r\n private readonly DATA_OLD_ROW = 'data-old-row';\r\n\r\n\r\n @Output()\r\n onConfigChanged: EventEmitter<AXWidgetBoardConfigChanged> = new EventEmitter<AXWidgetBoardConfigChanged>();\r\n\r\n @Output()\r\n onWidgetSave: EventEmitter<AXWidgetConfigSavedEvent> = new EventEmitter<AXWidgetConfigSavedEvent>();\r\n\r\n constructor(\r\n private ref: ElementRef<HTMLDivElement>,\r\n private zone: NgZone,\r\n private cdr: ChangeDetectorRef\r\n ) { }\r\n\r\n\r\n ngOnInit() {\r\n if (this.rtl == null) {\r\n this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.zone.runOutsideAngular((c) => {\r\n const style = document.createElement('style');\r\n style.type = 'text/css';\r\n this.ref.nativeElement.appendChild(style);\r\n // add css data classes\r\n for (let i = 1; i <= 50; i++) {\r\n style.innerHTML += `[${this.DATA_COL}=\"${i}\"] { ${this.rtl ? 'right' : 'left'}: ${(i - 1) * (this.tileSize + this.gapSize)}px; }`;\r\n style.innerHTML += `[${this.DATA_ROW}=\"${i}\"] { top: ${(i - 1) * (this.tileSize + this.gapSize)}px; }`;\r\n style.innerHTML += `[${this.DATA_SIZE_X}=\"${i}\"] { width: ${(i * this.tileSize) + ((i - 1) * this.gapSize)}px; }`;\r\n style.innerHTML += `[${this.DATA_SIZE_Y}=\"${i}\"] { height: ${(i * this.tileSize) + ((i - 1) * this.gapSize)}px; }`;\r\n }\r\n });\r\n }\r\n\r\n private calcGridSize() {\r\n this.zone.runOutsideAngular(() => {\r\n const width =\r\n (Math.max(...this.widgets.map((c) => c.col + c.sizeX - 1))) * (this.tileSize + this.gapSize);\r\n const height =\r\n (Math.max(...this.widgets.map((c) => c.row + c.sizeY - 1))) * (this.tileSize + this.gapSize);\r\n this.container.nativeElement.style.width = width + 'px';\r\n this.container.nativeElement.style.height = height + 'px';\r\n });\r\n }\r\n\r\n toggleEdit() {\r\n this._isInEditing ? this.finishEdit() : this.startEdit();\r\n }\r\n\r\n\r\n\r\n private dragStart(e: MouseEvent) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.zone.runOutsideAngular(() => {\r\n if (this._isInEditing && e.which === 1) {\r\n this.dragItem = e.currentTarget as any;\r\n this.dragItem.setAttribute('data-x-offset', (this.dragItem.offsetLeft - e.clientX).toString());\r\n //\r\n this.dragItem.setAttribute('data-y-offset', (this.dragItem.offsetTop - e.clientY).toString());\r\n this.dragItem.classList.add('widget-dragging');\r\n this.dragItem.classList.remove('animate__animated', 'animate__pulse');\r\n }\r\n });\r\n return false;\r\n }\r\n\r\n removePositionData() {\r\n this.zone.runOutsideAngular(() => {\r\n if (this.dragItem && this._isInEditing && this.dragItem.getAttribute(this.DATA_OLD_COL) == null) {\r\n this.dragItem.setAttribute(this.DATA_OLD_COL, this.dragItem.getAttribute(this.DATA_COL));\r\n this.dragItem.setAttribute(this.DATA_OLD_ROW, this.dragItem.getAttribute(this.DATA_ROW));\r\n this.dragItem.removeAttribute(this.DATA_COL);\r\n this.dragItem.removeAttribute(this.DATA_ROW);\r\n }\r\n });\r\n }\r\n\r\n resetPositionData() {\r\n this.zone.runOutsideAngular(() => {\r\n if (this.dragItem && this._isInEditing) {\r\n this.setPosition(this.dragItem, this.dragItem.getAttribute(this.DATA_OLD_COL), this.dragItem.getAttribute(this.DATA_OLD_ROW));\r\n }\r\n });\r\n }\r\n\r\n private setPosition(element: HTMLElement, col: string, row: string) {\r\n this.zone.runOutsideAngular(() => {\r\n element.setAttribute(this.DATA_COL, col);\r\n element.setAttribute(this.DATA_ROW, row);\r\n element.removeAttribute(this.DATA_OLD_COL);\r\n element.removeAttribute(this.DATA_OLD_ROW);\r\n element.style.removeProperty('top');\r\n element.style.removeProperty('left');\r\n const widget = this.widgets.find(c => c['__meta__'].instance.element === element);\r\n widget.col = Number(col);\r\n widget.row = Number(row);\r\n });\r\n }\r\n\r\n private drag(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.zone.runOutsideAngular(() => {\r\n if (this.dragItem && this._isInEditing) {\r\n this.isDragging = true;\r\n this.addPlaceholder();\r\n const xOffset = Number(this.dragItem.getAttribute('data-x-offset'));\r\n const yOffset = Number(this.dragItem.getAttribute('data-y-offset'));\r\n this.dragItem.style.left = e.clientX + xOffset + 'px';\r\n this.dragItem.style.top = e.clientY + yOffset + 'px';\r\n //\r\n this.detectBestPlacement();\r\n this.removePositionData();\r\n }\r\n });\r\n return false;\r\n }\r\n\r\n private dragEnd(e) {\r\n this.zone.runOutsideAngular(() => {\r\n if (this.dragItem && this._isInEditing && this.isDragging) {\r\n this.dragItem.classList.remove('widget-dragging');\r\n this.dragItem.classList.add('animate__animated', 'animate__pulse');\r\n //\r\n const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');\r\n if (this.newWidget) {\r\n const w = {\r\n uniqueName: this.newWidget.uniqueName,\r\n component: this.newWidget.component,\r\n title: this.newWidget.title,\r\n options: this.newWidget.options,\r\n sizeX: this.newWidget.sizeX,\r\n sizeY: this.newWidget.sizeY,\r\n col: Number(p.getAttribute(this.DATA_COL)),\r\n row: Number(p.getAttribute(this.DATA_ROW))\r\n };\r\n\r\n this.widgets.push(w);\r\n this.newWidget = null;\r\n this.container.nativeElement.removeChild(this.dragItem);\r\n this.zone.run(() => {\r\n this.cdr.detectChanges();\r\n this.calcGridSize();\r\n setTimeout(() => {\r\n w['__meta__'].instance.element.addEventListener('mousedown', this.dragStart.bind(this), false);\r\n }, 1000);\r\n });\r\n } else {\r\n if (p) {\r\n this.setPosition(this.dragItem, p.getAttribute(this.DATA_COL), p.getAttribute(this.DATA_ROW));\r\n }\r\n else {\r\n this.setPosition(this.dragItem, this.dragItem.getAttribute(this.DATA_OLD_COL), this.dragItem.getAttribute(this.DATA_OLD_ROW));\r\n }\r\n }\r\n //\r\n this.removePlaceholder();\r\n this.dragItem = null;\r\n this.calcGridSize();\r\n this.emitConfigChanged();\r\n }\r\n this.isDragging = false;\r\n });\r\n }\r\n\r\n private detectFirstEmptySlot(w: AXWidgetConfig) {\r\n const xTile = Math.floor(this.ref.nativeElement.parentElement.offsetWidth / this.tileSize);\r\n for (let j = 1; j <= 100; j++) {\r\n for (let i = 1; i <= xTile - w.sizeX; i++) {\r\n const rec = new AXClientRec({\r\n left: i,\r\n top: j,\r\n width: w.sizeX,\r\n height: w.sizeY\r\n });\r\n const el = this.widgets.filter(c => c !== w).find((c) =>\r\n rec.intersect({\r\n left: c.col,\r\n top: c.row,\r\n width: c.sizeX,\r\n height: c.sizeY\r\n })\r\n );\r\n if (el == null) {\r\n w.col = i;\r\n w.row = j;\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private detectBestPlacement() {\r\n this.zone.runOutsideAngular(() => {\r\n const p = this.container.nativeElement.querySelector('.widget-blank-placeholder') as HTMLElement;\r\n let col = Math.ceil(this.dragItem.offsetLeft / this.tileSize);\r\n if (this.rtl) {\r\n col = Math.ceil((this.container.nativeElement.clientWidth - (this.dragItem.offsetLeft + this.dragItem.clientWidth)) / this.tileSize);\r\n }\r\n\r\n let row = Math.ceil(this.dragItem.offsetTop / this.tileSize);\r\n if (col < 1) {\r\n col = 1;\r\n }\r\n if (row < 1) {\r\n row = 1;\r\n }\r\n const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host')).map((c) => c as HTMLElement);\r\n p.setAttribute(this.DATA_COL, col.toString());\r\n p.setAttribute(this.DATA_ROW, row.toString());\r\n const collision = widgets.filter(c => c !== this.dragItem).some(c => AXHtmlUtil.collision(c, this.dragItem));\r\n if (collision) {\r\n this.removePlaceholder();\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n private addPlaceholder() {\r\n this.zone.runOutsideAngular(() => {\r\n this.removePlaceholder();\r\n if (this.dragItem) {\r\n const p = document.createElement('div');\r\n p.classList.add('widget-blank-placeholder');\r\n p.setAttribute(this.DATA_COL, this.dragItem.getAttribute(this.DATA_COL));\r\n p.setAttribute(this.DATA_ROW, this.dragItem.getAttribute(this.DATA_ROW));\r\n p.setAttribute(this.DATA_SIZE_X, this.dragItem.getAttribute(this.DATA_SIZE_X));\r\n p.setAttribute(this.DATA_SIZE_Y, this.dragItem.getAttribute(this.DATA_SIZE_Y));\r\n this.container.nativeElement.appendChild(p);\r\n }\r\n });\r\n }\r\n\r\n private removePlaceholder() {\r\n const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');\r\n p?.remove();\r\n }\r\n\r\n public startEdit() {\r\n this._isInEditing = true;\r\n this.calcGridSize();\r\n this.ref.nativeElement.classList.add('grid-background');\r\n const bg = this.ref.nativeElement as HTMLDivElement;\r\n bg.style.setProperty('background-position', `${this.rtl ? 'right' : 'left'} top`);\r\n // tslint:disable-next-line: max-line-length\r\n 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>')`;\r\n bg.style.setProperty('background-image', pattern);\r\n //\r\n const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host'));\r\n widgets.forEach((w) => {\r\n w.addEventListener('mousedown', this.dragStart.bind(this), false);\r\n });\r\n this.ref.nativeElement.addEventListener('mousemove', this.drag.bind(this), false);\r\n this.ref.nativeElement.addEventListener('mouseup', this.dragEnd.bind(this), false);\r\n }\r\n\r\n public finishEdit() {\r\n this.ref.nativeElement.classList.remove('grid-background');\r\n const bg = this.ref.nativeElement as HTMLDivElement;\r\n bg.style.removeProperty('background-image');\r\n //\r\n this._isInEditing = false;\r\n const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host'));\r\n widgets.forEach((w) => {\r\n w.removeEventListener('mousedown', this.dragStart.bind(this), false);\r\n });\r\n this.ref.nativeElement.removeEventListener('mousemove', this.drag.bind(this), false);\r\n this.ref.nativeElement.removeEventListener('mouseup', this.dragEnd.bind(this), false);\r\n this.emitConfigChanged();\r\n }\r\n\r\n\r\n addWidget(widget: AXWidgetConfig) {\r\n this.zone.runOutsideAngular(() => {\r\n this.newWidget = {\r\n uniqueName: widget.uniqueName,\r\n component: widget.component,\r\n title: widget.title,\r\n col: 1,\r\n row: 1,\r\n sizeX: widget.sizeX,\r\n sizeY: widget.sizeY,\r\n options: widget.options,\r\n props: widget.props\r\n };\r\n this.detectFirstEmptySlot(this.newWidget);\r\n const w = {\r\n uniqueName: this.newWidget.uniqueName,\r\n component: this.newWidget.component,\r\n title: this.newWidget.title,\r\n options: this.newWidget.options,\r\n props: this.newWidget.props,\r\n sizeX: this.newWidget.sizeX,\r\n sizeY: this.newWidget.sizeY,\r\n col: this.newWidget.col,\r\n row: this.newWidget.row\r\n };\r\n this.widgets.push(w);\r\n this.newWidget = null;\r\n this.zone.run(() => {\r\n this.cdr.detectChanges();\r\n this.calcGridSize();\r\n this.emitConfigChanged();\r\n setTimeout(() => {\r\n w['__meta__'].instance.element.addEventListener('mousedown', this.dragStart.bind(this), false);\r\n }, 1000);\r\n });\r\n });\r\n }\r\n\r\n\r\n handleOnRemove(w: AXWidgetHostComponent) {\r\n w.element.classList.add('animate__animated', 'animate__zoomOut');\r\n w.element.addEventListener('animationend', () => {\r\n this.widgets = this.widgets.filter((c) => (c as any).__meta__.id !== (w.config as any).__meta__.id);\r\n this.cdr.detectChanges();\r\n this.calcGridSize();\r\n this.emitConfigChanged();\r\n });\r\n }\r\n\r\n handleOnSave(e: AXWidgetConfigSavedEvent) {\r\n this.onWidgetSave.emit(e);\r\n }\r\n\r\n trackByFn(index, item) {\r\n if (!item['__meta__']?.id) {\r\n item['__meta__'] = {};\r\n item['__meta__'].id = AXHtmlUtil.getUID();\r\n }\r\n return item['__meta__']?.id;\r\n }\r\n\r\n\r\n load(widgets: string | AXWidgetConfig[]): Promise<void> {\r\n this.clear();\r\n return new Promise<void>((resolve, reject) => {\r\n if (widgets) {\r\n const loadedWidgets: AXWidgetConfig[] = [];\r\n if (typeof widgets === 'string') {\r\n try {\r\n loadedWidgets.push(...JSON.parse(widgets));\r\n } catch (error) {\r\n reject('Invalid widget json data!');\r\n }\r\n }\r\n else {\r\n loadedWidgets.push(...widgets);\r\n }\r\n let intervalId: number = -1;\r\n const loadFunc = () => {\r\n\r\n if (this.galleryItems && this.galleryItems.length > 0) {\r\n loadedWidgets.forEach(w => {\r\n const gitem = this.galleryItems.find(c => c.uniqueName === w.uniqueName);\r\n if (gitem) {\r\n w.component = gitem.component;\r\n if (gitem.props) {\r\n w.props = JSON.parse(JSON.stringify(gitem.props));\r\n }\r\n }\r\n });\r\n this.widgets.push(...loadedWidgets);\r\n window.clearInterval(intervalId);\r\n this.cdr.detectChanges();\r\n resolve();\r\n }\r\n };\r\n intervalId = window.setInterval(loadFunc, 200);\r\n }\r\n else {\r\n resolve();\r\n }\r\n });\r\n }\r\n\r\n clear() {\r\n if (this.widgets.length) {\r\n this.widgets = [];\r\n this.cdr.detectChanges();\r\n this.emitConfigChanged();\r\n }\r\n }\r\n\r\n save(): Promise<string> {\r\n const obj = this.widgets.map(c => ({\r\n uniqueName: c.uniqueName,\r\n component: c.component,\r\n title: c.title,\r\n sizeX: c.sizeX,\r\n sizeY: c.sizeY,\r\n col: c.col,\r\n row: c.row,\r\n options: c.options,\r\n props: c.props\r\n }));\r\n return Promise.resolve(JSON.stringify(obj));\r\n }\r\n\r\n refresh() {\r\n this.widgetHosts.forEach(host => {\r\n host.widget.refresh();\r\n });\r\n }\r\n\r\n handleOnConfigChanged(e: AXWidgetConfigChanged) {\r\n this.cdr.detectChanges();\r\n this.emitConfigChanged();\r\n }\r\n\r\n handleOnResizedChanged(e: AXWidgetConfigChanged) {\r\n this.detectFirstEmptySlot(e.config);\r\n this.cdr.detectChanges();\r\n this.emitConfigChanged();\r\n }\r\n\r\n private resizeChangeObserver: any;\r\n private emitConfigChanged() {\r\n if (!this.resizeChangeObserver) {\r\n this.resizeChangeObserver = new Observable();\r\n Observable.create(observer => {\r\n this.resizeChangeObserver = observer;\r\n })\r\n .pipe(debounceTime(750))\r\n .pipe(distinctUntilChanged())\r\n .subscribe(c => {\r\n this.onConfigChanged.emit({\r\n component: this\r\n });\r\n });\r\n }\r\n this.resizeChangeObserver.next(new Date());\r\n }\r\n}\r\n","import { Component, OnInit, ChangeDetectorRef } from '@angular/core';\r\nimport { AXProperyEditorComponent } from '@acorex/components';\r\n\r\n@Component({\r\n templateUrl: './widget-size.editor.html'\r\n})\r\nexport class AXWidgetSizePropertyEditorComponent extends AXProperyEditorComponent<number[]> {\r\n\r\n sizeX: number;\r\n sizeY: number;\r\n\r\n minX: number = 1;\r\n maxX: number = 10;\r\n\r\n minY: number = 1;\r\n maxY: number = 10;\r\n\r\n\r\n constructor(protected cdr: ChangeDetectorRef) {\r\n super(cdr);\r\n }\r\n\r\n ngOnInit() {\r\n if (Array.isArray(this.value)) {\r\n this.sizeX = this.value[0];\r\n this.sizeY = this.value[1];\r\n }\r\n else {\r\n this.sizeX = 2;\r\n this.sizeY = 2;\r\n }\r\n }\r\n\r\n handleMinValueChange(e: any) {\r\n this.sizeX = e.value;\r\n\r\n if (this.sizeY > 0) {\r\n super.handleValueChange([this.sizeX, this.sizeY]);\r\n }\r\n }\r\n\r\n handleMaxValueChange(e: any) {\r\n this.sizeY = e.value;\r\n if (this.sizeX > 0) {\r\n super.handleValueChange([this.sizeX, this.sizeY]);\r\n }\r\n }\r\n\r\n\r\n\r\n ngAfterViewInit() {\r\n this.onRenderCompleted.emit();\r\n }\r\n\r\n}","import { NgModule } from '@angular/core';\r\nimport { AXWidgetBoardComponent } from './widget-board.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXWidgetHostComponent } from './widget-host.component';\r\nimport {\r\n AXSearchBoxModule,\r\n AXLoadingModule,\r\n AXProppertyEditorModule,\r\n AXPageModule, AXLabelModule,\r\n AXToolbarModule,\r\n AXTabStripModule,\r\n AXMenuModule,\r\n AXFormGroupModule,\r\n AXTextAreaModule, AXTextBoxModule, AXFieldsetModule, AXCheckBoxModule, AXValidationModule\r\n} from '@acorex/components';\r\nimport { RouterModule } from '@angular/router';\r\nimport { AXWidgetConfigComponent } from './widget-config.component';\r\nimport { AXTranslator, AXTranslatorModule } from '@acorex/core';\r\nimport { AXWidgetSizePropertyEditorComponent } from './editors/widget-size-editor/widget-size.editor';\r\nimport { AXWidgetSizePropertyEditorModule } from './editors/widget-size-editor/widget-size.module';\r\nimport { AXWidgetSaveComponent } from './widget-save.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n AXSearchBoxModule,\r\n AXLoadingModule,\r\n RouterModule,\r\n AXProppertyEditorModule,\r\n AXPageModule,\r\n AXToolbarModule,\r\n AXTranslatorModule,\r\n AXLabelModule,\r\n AXTextAreaModule,\r\n AXFieldsetModule,\r\n AXTextBoxModule,\r\n AXFormGroupModule,\r\n AXTabStripModule,\r\n AXCheckBoxModule,\r\n AXMenuModule,\r\n AXTranslatorModule,\r\n AXValidationModule,\r\n RouterModule.forChild([\r\n {\r\n component: AXWidgetSizePropertyEditorComponent,\r\n path: 'ax/editors/widget-size'\r\n },\r\n ])\r\n ],\r\n exports: [AXWidgetBoardComponent, AXProppertyEditorModule],\r\n declarations: [AXWidgetBoardComponent, AXWidgetHostComponent, AXWidgetConfigComponent, AXWidgetSaveComponent],\r\n entryComponents: [AXWidgetConfigComponent, AXWidgetSaveComponent],\r\n providers: []\r\n})\r\nexport class AXWidgetBoardModule {\r\n /**\r\n *\r\n */\r\n constructor() {\r\n AXTranslator.load('en', {\r\n 'widget-board': {\r\n 'configurable-props': 'Configurable Properties',\r\n configure: 'Configure Widget'\r\n }\r\n });\r\n AXTranslator.load('fa', {\r\n 'widget-board': {\r\n 'configurable-props': 'ویژگی های قابل تنظیم',\r\n configure: 'پیکر بندی ابزارک'\r\n }\r\n });\r\n\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\nimport { AXWidgetSizePropertyEditorComponent } from './widget-size.editor';\r\nimport { AXNumberBoxModule } from '@acorex/components';\r\n\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [AXWidgetSizePropertyEditorComponent],\r\n imports: [CommonModule, FormsModule, AXNumberBoxModule],\r\n exports: [AXWidgetSizePropertyEditorComponent],\r\n entryComponents: [AXWidgetSizePropertyEditorComponent],\r\n providers: [],\r\n})\r\nexport class AXWidgetSizePropertyEditorModule {\r\n \r\n}"],"names":["AXTranslator","AXHtmlUtil","EventEmitter","propertyEditor","ChangeDetectorRef","ViewChild","AXValidationFormComponent","Component","ViewEncapsulation","ChangeDetectionStrategy","AXBasePopupPageComponent","AXObjectUtil","AXPropertyDecorators","ElementRef","ComponentFactoryResolver","AXRenderService","AXPopupService","AXLoadingService","Input","Output","ViewContainerRef","HostBinding","AXClientRec","Observable","debounceTime","distinctUntilChanged","NgZone","ViewChildren","QueryList","AXProperyEditorComponent","NgModule","CommonModule","AXSearchBoxModule","AXLoadingModule","RouterModule","AXProppertyEditorModule","AXPageModule","AXToolbarModule","AXTranslatorModule","AXLabelModule","AXTextAreaModule","AXFieldsetModule","AXTextBoxModule","AXFormGroupModule","AXTabStripModule","AXCheckBoxModule","AXMenuModule","AXValidationModule","FormsModule","AXNumberBoxModule"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;AACF;IACO,SAAS,SAAS,C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,iBAAW,EAAEC,4BAAiB,CAAC;gBACvD,OAAO,EAAE,CAAC,mCAAmC,CAAC;gBAC9C,eAAe,EAAE,CAAC,mCAAmC,CAAC;gBACtD,SAAS,EAAE,EAAE;aAChB,CAAC;WACW,gCAAgC,CAE5C;QAAD,uCAAC;KAFD;;;;;;;;;;;;;;;;;;;;"}
@@ -1,16 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@acorex/components"),require("@acorex/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/router"),require("@angular/forms")):"function"==typeof define&&define.amd?define("@acorex/layout",["exports","@angular/core","@acorex/components","@acorex/core","rxjs","rxjs/operators","@angular/common","@angular/router","@angular/forms"],t):t(((e=e||self).acorex=e.acorex||{},e.acorex.layout={}),e.ng.core,e.components,e.core$1,e.rxjs,e.rxjs.operators,e.ng.common,e.ng.router,e.ng.forms)}(this,(function(e,t,i,n,o,r,a,s,d){"use strict";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function c(e,t){function i(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function p(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function g(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,i,n){return new(i||(i=Promise))((function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}d((n=n.apply(e,t||[])).next())}))}function h(e,t){var i,n,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,n=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(e){r=[6,e],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function f(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}var v=function(){return[1,2,3,5,10,20,30,60].map((function(e){return{id:6e4*e,text:n.AXTranslator.get("dateTime.duration.format_minute").replace("{0}",e.toString())}}))},y=function(){function e(){var e=this;this.uid=n.AXHtmlUtil.getUID(),this.onBusyChanged=new t.EventEmitter,this._isBusy=!0,this.refreshRate=[{id:3e5,text:n.AXTranslator.get("dateTime.duration.format_minute").replace("{0}","5")}],this.onConfiguredChanged=new t.EventEmitter,this.onConfiguredChanged.subscribe((function(){!0===e.isConfigured&&e.getRefreshRate()?e.restartRefreshTimer():e.stopRefreshTimer()}))}return Object.defineProperty(e.prototype,"isBusy",{get:function(){return this._isBusy},set:function(e){if(e!==this._isBusy){var t={component:this,oldValue:this._isBusy,value:e};this._isBusy=e,this.onBusyChanged.emit(t)}},enumerable:!0,configurable:!0}),e.prototype.getRefreshRate=function(){return Array.isArray(this.refreshRate)&&this.refreshRate.length?this.refreshRate[0].id:this.refreshRate},e.prototype.startRefreshTimer=function(){this.intervalId=window.setInterval(this.refresh.bind(this),this.getRefreshRate())},e.prototype.stopRefreshTimer=function(){window.clearInterval(this.intervalId)},e.prototype.restartRefreshTimer=function(){this.stopRefreshTimer(),this.startRefreshTimer()},e.prototype.ngOnDestroy=function(){this.stopRefreshTimer()},e.prototype.redraw=function(){},e.prototype.refresh=function(){this.restartRefreshTimer()},Object.defineProperty(e.prototype,"isConfigured",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.setValue=function(e,t){this[e]=t,this.onConfiguredChanged.emit()},e.prototype.getValue=function(e){var t,i=this[e],n=this.__meta__.config;if((null===(t=n.props[e])||void 0===t?void 0:t.runtime)&&this.provideValue){var o=this.provideValue({name:e,value:i,uniqueName:n.uniqueName,options:n.options});return this.provideValue instanceof Promise?o:Promise.resolve(o)}return Promise.resolve(i)},p([i.propertyEditor({editorClass:"ax/editors/widget-size",title:"common.size",visible:!1,order:-99}),g("design:type",Array)],e.prototype,"widgetSize",void 0),p([i.propertyEditor({editorClass:"ax/editors/select",title:"common.refresh-rate",visible:!0,order:-98,editorOptions:{items:v,allowNull:!1,allowSearch:!1,selectionDataMode:"value",selectionMode:"single",valueField:"id"}}),g("design:type",Object)],e.prototype,"refreshRate",void 0),e}(),w=function(e){function o(t){var i=e.call(this)||this;return i.cdr=t,i.props=[],i.displayProps=[],i.changes=[],i.context={},i}return c(o,e),o.prototype.getFooterButtons=function(){return[{name:"okay",submitBehavior:!0,text:n.AXTranslator.get("common.confirm"),style:"success"},{name:"cancel",cancelBehavior:!0,text:n.AXTranslator.get("common.cancel"),style:"danger blank"}]},o.prototype.onFooterButtonClick=function(e){var t=this;"cancel"===e.name&&this.close(),"okay"===e.name&&this.form.validate().then((function(e){e.result&&t.close(t.changes)}))},o.prototype.handleValueChange=function(e){var t=this.changes.find((function(t){return t.property.name===e.property.name}));t?t.value=e.value:this.changes.push({property:e.property,value:e.value}),this.updateContext()},o.prototype.ngOnInit=function(){this.displayProps=this.props.filter((function(e){return!1!==e.property.visible})).sort((function(e,t){return e.property.order-t.property.order})),this.updateContext()},o.prototype.updateContext=function(){var e={};this.props.forEach((function(t){e[t.property.name]=t.value})),this.changes.forEach((function(t){e[t.property.name]=t.value})),this.context=e},o.prototype.identify=function(e,t){return t.property.name},o.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},p([t.ViewChild(i.AXValidationFormComponent),g("design:type",i.AXValidationFormComponent)],o.prototype,"form",void 0),o=p([t.Component({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>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}),g("design:paramtypes",[t.ChangeDetectorRef])],o)}(i.AXBasePopupPageComponent),b=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.props=[],t}return c(i,e),i.prototype.getFooterButtons=function(){return[{name:"okay",submitBehavior:!0,text:n.AXTranslator.get("common.confirm"),style:"ax success"},{name:"cancel",cancelBehavior:!0,text:n.AXTranslator.get("common.cancel"),style:"ax light"}]},i.prototype.ngOnInit=function(){var e,t,i=(null===(e=this.props.find((function(e){return"title"===e.property.name||"name"===e.property.name})))||void 0===e?void 0:e.value)||this.config.title,o={};null===(t=this.props)||void 0===t||t.forEach((function(e){o[e.property.name]=e.property})),this.data={component:this.config.component,title:i,uniqueName:this.config.uniqueName+"-"+n.AXHtmlUtil.getUID(),options:n.AXObjectUtil.deepJSONClone(this.config.options),props:n.AXObjectUtil.deepJSONClone(o)},this.displayProps=this.props.filter((function(e){return!1!==e.property.visible})).sort((function(e,t){return e.property.order-t.property.order})).map((function(e){return{name:e.property.name,title:e.property.title,allow:!0}}))},i.prototype.onFooterButtonClick=function(e){var t=this;"cancel"===e.name&&this.close(),"okay"===e.name&&(this.props.forEach((function(e){var i=t.displayProps.find((function(t){return t.name===e.property.name}));if(null==i||!i.allow){var n=t.data.props[e.property.name];n?n.visible=!1:n={visible:!1}}})),this.close(this.data))},i=p([t.Component({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 \x3c!-- <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> --\x3e\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>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush})],i)}(i.AXBasePopupPageComponent),x=function(){function e(e,i,n,o,r,a){this.ref=e,this.componentFactoryResolver=i,this.rendererService=n,this.cdr=o,this.popup=r,this.loadingService=a,this._hasProps=!1,this._hasMenu=!1,this.configMenuItem=[{icon:"far fa-ellipsis-h",items:[]}],this.onRemove=new t.EventEmitter,this.onConfigChanged=new t.EventEmitter,this.onResized=new t.EventEmitter,this.onSave=new t.EventEmitter,this._isLoading=!1,this.sizeX=1,this.sizeY=1,this.col=1,this.row=1}return Object.defineProperty(e.prototype,"widget",{get:function(){return this._widget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.ref.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this._isLoading},set:function(e){this._isLoading=e,this._loadingId&&!e&&(this.loadingService.hide(this._loadingId),this._loadingId=null),e&&(this._loadingId=this.loadingService.show(this.ref.nativeElement))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isConfigured",{get:function(){var e;return(null===(e=this._widget)||void 0===e?void 0:e.isConfigured)||!1},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.isLoading=!0},e.prototype.ngAfterViewInit=function(){var e;return u(this,void 0,void 0,(function(){var t,o,r,a=this;return h(this,(function(s){switch(s.label){case 0:return"string"!=typeof this.config.component?[3,2]:[4,this.rendererService.findLoadedComponentByRoute(this.config.component,20)];case 1:return o=s.sent(),t=null===(e=o)||void 0===e?void 0:e.component,[3,3];case 2:"function"==typeof this.config.component&&(t=this.config.component),s.label=3;case 3:return null==t?(console.error("Invalid Widget Component!",this.config),this.onRemove.emit(this),[2]):(r=this.componentFactoryResolver.resolveComponentFactory(t),this.componentRef=this.vc.createComponent(r),this._widget=this.componentRef.instance,this._widget.provideValue=this.provideValue,this._widget.onBusyChanged&&this._widget.onBusyChanged.subscribe((function(e){a._widget.widgetSize?a.setSizeFromOptions():a._widget.setValue("widgetSize",[a.sizeX,a.sizeY]),a.isLoading=e.value,a.cdr.detectChanges()})),this._widget.onConfiguredChanged&&this._widget.onConfiguredChanged.subscribe((function(){a.setSizeFromOptions()})),this.config.options&&Object.assign(this._widget,this.config.options),this._hasProps=i.AXPropertyDecorators.getProperties(this._widget).length>0,this.isLoading=!1,this.config.__meta__.instance=this,this._widget.__meta__={},this._widget.__meta__.config=this.config,this.configMenuItem[0].items.push({name:"refresh",icon:"far fa-undo",text:n.AXTranslator.get("common.refresh"),onClick:function(){var e,t;null===(t=null===(e=a)||void 0===e?void 0:e.widget)||void 0===t||t.refresh()}}),this._hasProps&&this.configMenuItem[0].items.push({name:"configs",icon:"far fa-cogs",text:n.AXTranslator.get("common.configs"),onClick:function(){a.openConfigDialog()}}),this.configMenuItem[0].items.push({name:"save",icon:"far fa-save",text:n.AXTranslator.get("common.save-as"),onClick:function(){a.openSaveDialog()}}),this.configMenuItem[0].items.push({name:"remove",icon:"far fa-times",style:"ax danger blank",text:n.AXTranslator.get("common.remove"),onClick:function(){a.onRemove.emit(a)}}),this._hasMenu=this.configMenuItem[0].items.length>0,this.cdr.detectChanges(),[2])}}))}))},e.prototype.setSizeFromOptions=function(){var e=this;this._widget.getValue("widgetSize").then((function(t){var i=e.sizeX,n=e.sizeY;t&&Array.isArray(t)&&(i!==t[0]||n!==t[1])&&(e.config.sizeX=e.sizeX=t[0],e.config.sizeY=e.sizeY=t[1],e.onResized.emit({component:e._widget,config:e.config})),e.cdr.detectChanges()}))},e.prototype.remove=function(e){return e.preventDefault(),e.stopPropagation(),this.onRemove.emit(this),!1},e.prototype.handleConfig=function(e){return e.preventDefault(),e.stopPropagation(),this.openConfigDialog(),!1},e.prototype.openConfigDialog=function(){var e=this,t=this.getMergedProps();this.popup.open(w,{title:n.AXTranslator.get("common.configs"),size:"sm",data:{props:t.map((function(t){return{property:t.options,value:e._widget[t.options.name]}})),widget:this.widget}}).then((function(t){t.data&&(e.config.options||(e.config.options={}),t.data.forEach((function(t){e._widget.setValue(t.property.name,t.value),e.config.options[t.property.name]=t.value})),e.emitConfigChanged(),e._widget.redraw(),e.cdr.detectChanges())}))},e.prototype.openSaveDialog=function(){var e=this,t=this.getMergedProps();this.popup.open(b,{title:n.AXTranslator.get("common.save-as"),size:"sm",data:{config:this.config,props:t.map((function(t){return{property:t.options,value:e._widget[t.options.name]}}))}}).then((function(t){t.data&&e.onSave.emit({component:e._widget,data:t.data})}))},e.prototype.handleOptionClick=function(e){return e.preventDefault(),e.stopPropagation(),this.openConfigDialog(),!1},e.prototype.ngOnDestroy=function(){this.vc.clear(),this.componentRef&&this.componentRef.destroy()},e.prototype.getMergedProps=function(){var e=n.AXObjectUtil.deepCopy(i.AXPropertyDecorators.getProperties(this._widget)),t=function(t){if(Object.prototype.hasOwnProperty.call(o.config.props,t)){var i=o.config.props[t],n=e.find((function(e){return e.property===t}));n&&Object.assign(n.options,i)}},o=this;for(var r in this.config.props)t(r);return e},e.prototype.emitConfigChanged=function(){this.onConfigChanged.emit({component:this._widget,config:this.config})},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ComponentFactoryResolver},{type:n.AXRenderService},{type:t.ChangeDetectorRef},{type:i.AXPopupService},{type:i.AXLoadingService}]},p([t.Input(),g("design:type",Function)],e.prototype,"provideValue",void 0),p([t.Output(),g("design:type",t.EventEmitter)],e.prototype,"onRemove",void 0),p([t.Output(),g("design:type",t.EventEmitter)],e.prototype,"onConfigChanged",void 0),p([t.Output(),g("design:type",t.EventEmitter)],e.prototype,"onResized",void 0),p([t.Output(),g("design:type",t.EventEmitter)],e.prototype,"onSave",void 0),p([t.Input(),g("design:type",Object)],e.prototype,"config",void 0),p([t.ViewChild("vc",{read:t.ViewContainerRef}),g("design:type",t.ViewContainerRef)],e.prototype,"vc",void 0),p([t.HostBinding("attr.data-size-x"),t.Input(),g("design:type",Number)],e.prototype,"sizeX",void 0),p([t.HostBinding("attr.data-size-y"),t.Input(),g("design:type",Number)],e.prototype,"sizeY",void 0),p([t.HostBinding("attr.data-col"),t.Input(),g("design:type",Number)],e.prototype,"col",void 0),p([t.HostBinding("attr.data-row"),t.Input(),g("design:type",Number)],e.prototype,"row",void 0),e=p([t.Component({selector:"ax-widget-host",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 \x3c!-- <ax-loading-panel [visible]="isBusy">\r\n </ax-loading-panel> --\x3e\r\n <div class="widget-content">\r\n <ng-container #vc></ng-container>\r\n </div>\r\n</div>',host:{class:"ax widget-host",tabindex:"0"},encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}),g("design:paramtypes",[t.ElementRef,t.ComponentFactoryResolver,n.AXRenderService,t.ChangeDetectorRef,i.AXPopupService,i.AXLoadingService])],e)}(),A=function(){function e(e,i,n){this.ref=e,this.zone=i,this.cdr=n,this.widgets=[],this.galleryItems=[],this.tileSize=80,this.gapSize=5,this.newWidget=null,this._isInEditing=!1,this.isDragging=!1,this.DATA_COL="data-col",this.DATA_ROW="data-row",this.DATA_SIZE_X="data-size-x",this.DATA_SIZE_Y="data-size-y",this.DATA_OLD_COL="data-old-col",this.DATA_OLD_ROW="data-old-row",this.onConfigChanged=new t.EventEmitter,this.onWidgetSave=new t.EventEmitter}return e.prototype.isInEditing=function(){return this._isInEditing},e.prototype.ngOnInit=function(){null==this.rtl&&(this.rtl="rtl"===window.getComputedStyle(this.ref.nativeElement,null).getPropertyValue("direction"))},e.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(t){var i=document.createElement("style");i.type="text/css",e.ref.nativeElement.appendChild(i);for(var n=1;n<=50;n++)i.innerHTML+="["+e.DATA_COL+'="'+n+'"] { '+(e.rtl?"right":"left")+": "+(n-1)*(e.tileSize+e.gapSize)+"px; }",i.innerHTML+="["+e.DATA_ROW+'="'+n+'"] { top: '+(n-1)*(e.tileSize+e.gapSize)+"px; }",i.innerHTML+="["+e.DATA_SIZE_X+'="'+n+'"] { width: '+(n*e.tileSize+(n-1)*e.gapSize)+"px; }",i.innerHTML+="["+e.DATA_SIZE_Y+'="'+n+'"] { height: '+(n*e.tileSize+(n-1)*e.gapSize)+"px; }"}))},e.prototype.calcGridSize=function(){var e=this;this.zone.runOutsideAngular((function(){var t=Math.max.apply(Math,m(e.widgets.map((function(e){return e.col+e.sizeX-1}))))*(e.tileSize+e.gapSize),i=Math.max.apply(Math,m(e.widgets.map((function(e){return e.row+e.sizeY-1}))))*(e.tileSize+e.gapSize);e.container.nativeElement.style.width=t+"px",e.container.nativeElement.style.height=i+"px"}))},e.prototype.toggleEdit=function(){this._isInEditing?this.finishEdit():this.startEdit()},e.prototype.dragStart=function(e){var t=this;return e.preventDefault(),e.stopPropagation(),this.zone.runOutsideAngular((function(){t._isInEditing&&1===e.which&&(t.dragItem=e.currentTarget,t.dragItem.setAttribute("data-x-offset",(t.dragItem.offsetLeft-e.clientX).toString()),t.dragItem.setAttribute("data-y-offset",(t.dragItem.offsetTop-e.clientY).toString()),t.dragItem.classList.add("widget-dragging"),t.dragItem.classList.remove("animate__animated","animate__pulse"))})),!1},e.prototype.removePositionData=function(){var e=this;this.zone.runOutsideAngular((function(){e.dragItem&&e._isInEditing&&null==e.dragItem.getAttribute(e.DATA_OLD_COL)&&(e.dragItem.setAttribute(e.DATA_OLD_COL,e.dragItem.getAttribute(e.DATA_COL)),e.dragItem.setAttribute(e.DATA_OLD_ROW,e.dragItem.getAttribute(e.DATA_ROW)),e.dragItem.removeAttribute(e.DATA_COL),e.dragItem.removeAttribute(e.DATA_ROW))}))},e.prototype.resetPositionData=function(){var e=this;this.zone.runOutsideAngular((function(){e.dragItem&&e._isInEditing&&e.setPosition(e.dragItem,e.dragItem.getAttribute(e.DATA_OLD_COL),e.dragItem.getAttribute(e.DATA_OLD_ROW))}))},e.prototype.setPosition=function(e,t,i){var n=this;this.zone.runOutsideAngular((function(){e.setAttribute(n.DATA_COL,t),e.setAttribute(n.DATA_ROW,i),e.removeAttribute(n.DATA_OLD_COL),e.removeAttribute(n.DATA_OLD_ROW),e.style.removeProperty("top"),e.style.removeProperty("left");var o=n.widgets.find((function(t){return t.__meta__.instance.element===e}));o.col=Number(t),o.row=Number(i)}))},e.prototype.drag=function(e){var t=this;return e.preventDefault(),e.stopPropagation(),this.zone.runOutsideAngular((function(){if(t.dragItem&&t._isInEditing){t.isDragging=!0,t.addPlaceholder();var i=Number(t.dragItem.getAttribute("data-x-offset")),n=Number(t.dragItem.getAttribute("data-y-offset"));t.dragItem.style.left=e.clientX+i+"px",t.dragItem.style.top=e.clientY+n+"px",t.detectBestPlacement(),t.removePositionData()}})),!1},e.prototype.dragEnd=function(e){var t=this;this.zone.runOutsideAngular((function(){if(t.dragItem&&t._isInEditing&&t.isDragging){t.dragItem.classList.remove("widget-dragging"),t.dragItem.classList.add("animate__animated","animate__pulse");var e=t.container.nativeElement.querySelector(".widget-blank-placeholder");if(t.newWidget){var i={uniqueName:t.newWidget.uniqueName,component:t.newWidget.component,title:t.newWidget.title,options:t.newWidget.options,sizeX:t.newWidget.sizeX,sizeY:t.newWidget.sizeY,col:Number(e.getAttribute(t.DATA_COL)),row:Number(e.getAttribute(t.DATA_ROW))};t.widgets.push(i),t.newWidget=null,t.container.nativeElement.removeChild(t.dragItem),t.zone.run((function(){t.cdr.detectChanges(),t.calcGridSize(),setTimeout((function(){i.__meta__.instance.element.addEventListener("mousedown",t.dragStart.bind(t),!1)}),1e3)}))}else e?t.setPosition(t.dragItem,e.getAttribute(t.DATA_COL),e.getAttribute(t.DATA_ROW)):t.setPosition(t.dragItem,t.dragItem.getAttribute(t.DATA_OLD_COL),t.dragItem.getAttribute(t.DATA_OLD_ROW));t.removePlaceholder(),t.dragItem=null,t.calcGridSize(),t.emitConfigChanged()}t.isDragging=!1}))},e.prototype.detectFirstEmptySlot=function(e){for(var t=Math.floor(this.ref.nativeElement.parentElement.offsetWidth/this.tileSize),i=1;i<=100;i++)for(var o=function(t){var o=new n.AXClientRec({left:t,top:i,width:e.sizeX,height:e.sizeY});if(null==r.widgets.filter((function(t){return t!==e})).find((function(e){return o.intersect({left:e.col,top:e.row,width:e.sizeX,height:e.sizeY})})))return e.col=t,e.row=i,{value:void 0}},r=this,a=1;a<=t-e.sizeX;a++){var s=o(a);if("object"==typeof s)return s.value}},e.prototype.detectBestPlacement=function(){var e=this;this.zone.runOutsideAngular((function(){var t=e.container.nativeElement.querySelector(".widget-blank-placeholder"),i=Math.ceil(e.dragItem.offsetLeft/e.tileSize);e.rtl&&(i=Math.ceil((e.container.nativeElement.clientWidth-(e.dragItem.offsetLeft+e.dragItem.clientWidth))/e.tileSize));var o=Math.ceil(e.dragItem.offsetTop/e.tileSize);i<1&&(i=1),o<1&&(o=1);var r=Array.from(e.ref.nativeElement.querySelectorAll(".widget-host")).map((function(e){return e}));t.setAttribute(e.DATA_COL,i.toString()),t.setAttribute(e.DATA_ROW,o.toString()),r.filter((function(t){return t!==e.dragItem})).some((function(t){return n.AXHtmlUtil.collision(t,e.dragItem)}))&&e.removePlaceholder()}))},e.prototype.addPlaceholder=function(){var e=this;this.zone.runOutsideAngular((function(){if(e.removePlaceholder(),e.dragItem){var t=document.createElement("div");t.classList.add("widget-blank-placeholder"),t.setAttribute(e.DATA_COL,e.dragItem.getAttribute(e.DATA_COL)),t.setAttribute(e.DATA_ROW,e.dragItem.getAttribute(e.DATA_ROW)),t.setAttribute(e.DATA_SIZE_X,e.dragItem.getAttribute(e.DATA_SIZE_X)),t.setAttribute(e.DATA_SIZE_Y,e.dragItem.getAttribute(e.DATA_SIZE_Y)),e.container.nativeElement.appendChild(t)}}))},e.prototype.removePlaceholder=function(){var e;null===(e=this.container.nativeElement.querySelector(".widget-blank-placeholder"))||void 0===e||e.remove()},e.prototype.startEdit=function(){var e=this;this._isInEditing=!0,this.calcGridSize(),this.ref.nativeElement.classList.add("grid-background");var t=this.ref.nativeElement;t.style.setProperty("background-position",(this.rtl?"right":"left")+" top");var i='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>\')';t.style.setProperty("background-image",i),Array.from(this.ref.nativeElement.querySelectorAll(".widget-host")).forEach((function(t){t.addEventListener("mousedown",e.dragStart.bind(e),!1)})),this.ref.nativeElement.addEventListener("mousemove",this.drag.bind(this),!1),this.ref.nativeElement.addEventListener("mouseup",this.dragEnd.bind(this),!1)},e.prototype.finishEdit=function(){var e=this;this.ref.nativeElement.classList.remove("grid-background"),this.ref.nativeElement.style.removeProperty("background-image"),this._isInEditing=!1,Array.from(this.ref.nativeElement.querySelectorAll(".widget-host")).forEach((function(t){t.removeEventListener("mousedown",e.dragStart.bind(e),!1)})),this.ref.nativeElement.removeEventListener("mousemove",this.drag.bind(this),!1),this.ref.nativeElement.removeEventListener("mouseup",this.dragEnd.bind(this),!1),this.emitConfigChanged()},e.prototype.addWidget=function(e){var t=this;this.zone.runOutsideAngular((function(){t.newWidget={uniqueName:e.uniqueName,component:e.component,title:e.title,col:1,row:1,sizeX:e.sizeX,sizeY:e.sizeY,options:e.options,props:e.props},t.detectFirstEmptySlot(t.newWidget);var i={uniqueName:t.newWidget.uniqueName,component:t.newWidget.component,title:t.newWidget.title,options:t.newWidget.options,props:t.newWidget.props,sizeX:t.newWidget.sizeX,sizeY:t.newWidget.sizeY,col:t.newWidget.col,row:t.newWidget.row};t.widgets.push(i),t.newWidget=null,t.zone.run((function(){t.cdr.detectChanges(),t.calcGridSize(),t.emitConfigChanged(),setTimeout((function(){i.__meta__.instance.element.addEventListener("mousedown",t.dragStart.bind(t),!1)}),1e3)}))}))},e.prototype.handleOnRemove=function(e){var t=this;e.element.classList.add("animate__animated","animate__zoomOut"),e.element.addEventListener("animationend",(function(){t.widgets=t.widgets.filter((function(t){return t.__meta__.id!==e.config.__meta__.id})),t.cdr.detectChanges(),t.calcGridSize(),t.emitConfigChanged()}))},e.prototype.handleOnSave=function(e){this.onWidgetSave.emit(e)},e.prototype.trackByFn=function(e,t){var i,o;return(null===(i=t.__meta__)||void 0===i?void 0:i.id)||(t.__meta__={},t.__meta__.id=n.AXHtmlUtil.getUID()),null===(o=t.__meta__)||void 0===o?void 0:o.id},e.prototype.load=function(e){var t=this;return this.clear(),new Promise((function(i,n){if(e){var o=[];if("string"==typeof e)try{o.push.apply(o,m(JSON.parse(e)))}catch(e){n("Invalid widget json data!")}else o.push.apply(o,m(e));var r=-1;r=window.setInterval((function(){var e;t.galleryItems&&t.galleryItems.length>0&&(o.forEach((function(e){var i=t.galleryItems.find((function(t){return t.uniqueName===e.uniqueName}));i&&(e.component=i.component,i.props&&(e.props=JSON.parse(JSON.stringify(i.props))))})),(e=t.widgets).push.apply(e,m(o)),window.clearInterval(r),t.cdr.detectChanges(),i())}),200)}else i()}))},e.prototype.clear=function(){this.widgets.length&&(this.widgets=[],this.cdr.detectChanges(),this.emitConfigChanged())},e.prototype.save=function(){var e=this.widgets.map((function(e){return{uniqueName:e.uniqueName,component:e.component,title:e.title,sizeX:e.sizeX,sizeY:e.sizeY,col:e.col,row:e.row,options:e.options,props:e.props}}));return Promise.resolve(JSON.stringify(e))},e.prototype.refresh=function(){this.widgetHosts.forEach((function(e){e.widget.refresh()}))},e.prototype.handleOnConfigChanged=function(e){this.cdr.detectChanges(),this.emitConfigChanged()},e.prototype.handleOnResizedChanged=function(e){this.detectFirstEmptySlot(e.config),this.cdr.detectChanges(),this.emitConfigChanged()},e.prototype.emitConfigChanged=function(){var e=this;this.resizeChangeObserver||(this.resizeChangeObserver=new o.Observable,o.Observable.create((function(t){e.resizeChangeObserver=t})).pipe(r.debounceTime(750)).pipe(r.distinctUntilChanged()).subscribe((function(t){e.onConfigChanged.emit({component:e})}))),this.resizeChangeObserver.next(new Date)},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:t.ChangeDetectorRef}]},p([t.ViewChild("container"),g("design:type",t.ElementRef)],e.prototype,"container",void 0),p([t.ViewChildren(x),g("design:type",t.QueryList)],e.prototype,"widgetHosts",void 0),p([t.Input(),g("design:type",Array)],e.prototype,"galleryItems",void 0),p([t.Input(),g("design:type",Number)],e.prototype,"tileSize",void 0),p([t.Input(),g("design:type",Number)],e.prototype,"gapSize",void 0),p([t.Input(),g("design:type",Function)],e.prototype,"provideValue",void 0),p([t.Output(),g("design:type",t.EventEmitter)],e.prototype,"onConfigChanged",void 0),p([t.Output(),g("design:type",t.EventEmitter)],e.prototype,"onWidgetSave",void 0),e=p([t.Component({selector:"ax-widget-board",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"\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',host:{class:"ax widget-board"},encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".widget-board{display:inline-block;margin:15px 20px;min-width:calc(100% - 40px);min-height:calc(100% - 34px);--animate-duration:0.5s;background-repeat:no-repeat}.widget-board.grid-background{background-repeat:repeat!important}.widget-board.grid-background .widgets-container .widget-host{touch-action:none;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:#fff;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}.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}"]}),g("design:paramtypes",[t.ElementRef,t.NgZone,t.ChangeDetectorRef])],e)}(),_=function(e){function i(t){var i=e.call(this,t)||this;return i.cdr=t,i.minX=1,i.maxX=10,i.minY=1,i.maxY=10,i}return c(i,e),i.prototype.ngOnInit=function(){Array.isArray(this.value)?(this.sizeX=this.value[0],this.sizeY=this.value[1]):(this.sizeX=2,this.sizeY=2)},i.prototype.handleMinValueChange=function(t){this.sizeX=t.value,this.sizeY>0&&e.prototype.handleValueChange.call(this,[this.sizeX,this.sizeY])},i.prototype.handleMaxValueChange=function(t){this.sizeY=t.value,this.sizeX>0&&e.prototype.handleValueChange.call(this,[this.sizeX,this.sizeY])},i.prototype.ngAfterViewInit=function(){this.onRenderCompleted.emit()},i.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},i=p([t.Component({template:'<div style="display: flex;">\r\n <div style="margin-inline-end: 0.5em;flex: calc(50% - 0.25em);">\r\n <ax-number-box (onValueChanged)="handleMinValueChange($event)" [value]="sizeX" [min]="minX" [max]="maxX">\r\n </ax-number-box>\r\n </div>\r\n <div style="flex: calc(50% - 0.25em);">\r\n <ax-number-box (onValueChanged)="handleMaxValueChange($event)" [value]="sizeY" [min]="minY" [max]="maxY">\r\n </ax-number-box>\r\n </div>\r\n</div>'}),g("design:paramtypes",[t.ChangeDetectorRef])],i)}(i.AXProperyEditorComponent),C=function(){function e(){n.AXTranslator.load("en",{"widget-board":{"configurable-props":"Configurable Properties",configure:"Configure Widget"}}),n.AXTranslator.load("fa",{"widget-board":{"configurable-props":"ویژگی های قابل تنظیم",configure:"پیکر بندی ابزارک"}})}return e=p([t.NgModule({imports:[a.CommonModule,i.AXSearchBoxModule,i.AXLoadingModule,s.RouterModule,i.AXProppertyEditorModule,i.AXPageModule,i.AXToolbarModule,n.AXTranslatorModule,i.AXLabelModule,i.AXTextAreaModule,i.AXFieldsetModule,i.AXTextBoxModule,i.AXFormGroupModule,i.AXTabStripModule,i.AXCheckBoxModule,i.AXMenuModule,n.AXTranslatorModule,i.AXValidationModule,s.RouterModule.forChild([{component:_,path:"ax/editors/widget-size"}])],exports:[A,i.AXProppertyEditorModule],declarations:[A,x,w,b],entryComponents:[w,b],providers:[]}),g("design:paramtypes",[])],e)}(),z=function(){function e(){}return e=p([t.NgModule({declarations:[_],imports:[a.CommonModule,d.FormsModule,i.AXNumberBoxModule],exports:[_],entryComponents:[_],providers:[]})],e)}();e.AXWidgetBoardComponent=A,e.AXWidgetBoardModule=C,e.AXWidgetComponent=y,e.AXWidgetHostComponent=x,e.AXWidgetSizePropertyEditorComponent=_,e.AXWidgetSizePropertyEditorModule=z,e.ɵ0=v,e.ɵa=w,e.ɵb=b,Object.defineProperty(e,"__esModule",{value:!0})}));
16
- //# sourceMappingURL=acorex-layout.umd.min.js.map