@magic-xpa/angular 4.1200.0-dev4120.98 → 4.1200.0-ec.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { isNullOrUndefined, NString, List, isUndefined, StringBuilder, RefParam } from '@magic-xpa/mscorelib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, Component, Input, Output, Directive, EventEmitter, ViewChild, InjectionToken, Inject, HostListener, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
3
+ import { Injectable, Component, Input, Output, Directive, EventEmitter, HostListener, ViewChild, InjectionToken, Inject, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/common';
5
5
  import { DatePipe, CommonModule, formatDate } from '@angular/common';
6
6
  import * as i2 from '@angular/router';
@@ -14,11 +14,13 @@ import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, MsgIn
14
14
  import { filter, map, debounceTime } from 'rxjs/operators';
15
15
  import { Subject, EMPTY, fromEvent } from 'rxjs';
16
16
  import { __decorate, __metadata } from 'tslib';
17
+ import * as i2$1 from '@angular/cdk/drag-drop';
18
+ import { DragDropModule, CdkDragHandle, CdkDrag } from '@angular/cdk/drag-drop';
17
19
  import * as i1$1 from '@angular/platform-browser';
18
20
  import * as i1$2 from '@angular/common/http';
19
21
  import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
20
22
  import { maskitoTimeOptionsGenerator } from '@maskito/kit';
21
- import * as i2$1 from '@angular/cdk/platform';
23
+ import * as i2$2 from '@angular/cdk/platform';
22
24
  import { MaskitoModule } from '@maskito/angular';
23
25
  import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
24
26
 
@@ -317,6 +319,9 @@ class EngineMagicService {
317
319
  UploadFileToServer(fileContent, serverFileName) {
318
320
  return this.magicBridge.UploadFileToServer(fileContent, serverFileName);
319
321
  }
322
+ async DownloadFileFromServer(serverFileName) {
323
+ return await this.magicBridge.DownloadFileFromServer(serverFileName);
324
+ }
320
325
  GetFormattedValue(taskId, controlName, value, rowId) {
321
326
  return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);
322
327
  }
@@ -1023,21 +1028,40 @@ const _c0$3 = ["modalheader"];
1023
1028
  const _c1$1 = ["modalForeground"];
1024
1029
  function MagicOverlayContainer_button_2_Template(rf, ctx) { if (rf & 1) {
1025
1030
  const _r2 = i0.ɵɵgetCurrentView();
1026
- i0.ɵɵelementStart(0, "button", 9);
1031
+ i0.ɵɵelementStart(0, "button", 16);
1027
1032
  i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnClose()); });
1028
1033
  i0.ɵɵtext(1, "X");
1029
1034
  i0.ɵɵelementEnd();
1030
1035
  } }
1031
- function MagicOverlayContainer_div_5_Template(rf, ctx) { if (rf & 1) {
1036
+ function MagicOverlayContainer_span_5_Template(rf, ctx) { if (rf & 1) {
1032
1037
  const _r4 = i0.ɵɵgetCurrentView();
1033
- i0.ɵɵelementStart(0, "div", 10, 2);
1038
+ i0.ɵɵelementStart(0, "span", 17, 2);
1039
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_5_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "corner")); });
1040
+ i0.ɵɵelementEnd();
1041
+ } }
1042
+ function MagicOverlayContainer_span_6_Template(rf, ctx) { if (rf & 1) {
1043
+ const _r5 = i0.ɵɵgetCurrentView();
1044
+ i0.ɵɵelementStart(0, "span", 18, 3);
1045
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_6_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "right")); });
1046
+ i0.ɵɵelementEnd();
1047
+ } }
1048
+ function MagicOverlayContainer_span_7_Template(rf, ctx) { if (rf & 1) {
1049
+ const _r6 = i0.ɵɵgetCurrentView();
1050
+ i0.ɵɵelementStart(0, "span", 19, 4);
1051
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_7_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "bottom")); });
1052
+ i0.ɵɵelementEnd();
1053
+ } }
1054
+ function MagicOverlayContainer_div_8_Template(rf, ctx) { if (rf & 1) {
1055
+ const _r7 = i0.ɵɵgetCurrentView();
1056
+ i0.ɵɵelementStart(0, "div", 20, 5);
1034
1057
  i0.ɵɵtext(2);
1035
- i0.ɵɵelementStart(3, "button", 11);
1036
- i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnClose()); });
1058
+ i0.ɵɵelementStart(3, "button", 21);
1059
+ i0.ɵɵlistener("click", function MagicOverlayContainer_div_8_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnClose()); });
1037
1060
  i0.ɵɵtext(4, "X");
1038
1061
  i0.ɵɵelementEnd()();
1039
1062
  } if (rf & 2) {
1040
1063
  const ctx_r2 = i0.ɵɵnextContext();
1064
+ i0.ɵɵclassProp("movable", ctx_r2.IsMovable());
1041
1065
  i0.ɵɵadvance(2);
1042
1066
  i0.ɵɵtextInterpolate1(" ", ctx_r2.getText(), " ");
1043
1067
  } }
@@ -1070,10 +1094,17 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1070
1094
  *
1071
1095
  */
1072
1096
  componentRef = null;
1097
+ resizing = false;
1098
+ resizeDirection = null;
1099
+ originalWidth = 0;
1100
+ originalHeight = 0;
1101
+ originalMouseX = 0;
1102
+ originalMouseY = 0;
1103
+ isCenteredToWindow = true;
1104
+ static minAllowedWidth = 30;
1105
+ static minAllowedHeight = 30;
1073
1106
  /**
1074
1107
  *
1075
- * @param injector
1076
- * @param componentFactoryResolver
1077
1108
  */
1078
1109
  constructor() {
1079
1110
  super();
@@ -1084,6 +1115,8 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1084
1115
  ngOnInit() {
1085
1116
  this.componentRef = this.modalbodyViewContainerRef.createComponent(this.ModalComp);
1086
1117
  Object.assign(this.componentRef.instance, this.ModalCompParameters);
1118
+ let comp = this.componentRef.instance;
1119
+ this.isCenteredToWindow = comp.IsCenteredToWindow();
1087
1120
  }
1088
1121
  setViewContainerRef(vcRef) {
1089
1122
  this.modalbodyViewContainerRef = vcRef;
@@ -1110,7 +1143,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1110
1143
  let comp = this.componentRef.instance;
1111
1144
  styles['width'] = comp.Width();
1112
1145
  styles['height'] = comp.Height();
1113
- if (comp.IsCenteredToWindow()) {
1146
+ if (this.isCenteredToWindow) {
1114
1147
  styles['margin'] = 'auto';
1115
1148
  }
1116
1149
  else {
@@ -1162,6 +1195,93 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1162
1195
  if (comp.ShouldCloseOnBackgroundClick())
1163
1196
  this.OnClose();
1164
1197
  }
1198
+ /**
1199
+ * Checks if the overlay component allows to be resized.
1200
+ * @returns {boolean} True if the overlay is resizable, false otherwise.
1201
+ */
1202
+ IsResizable() {
1203
+ let comp = this.componentRef.instance;
1204
+ return comp.IsResizable();
1205
+ }
1206
+ /**
1207
+ * Checks if the overlay component allows to be moved (dragged).
1208
+ * @returns {boolean} True if the overlay is movable, false otherwise.
1209
+ */
1210
+ IsMovable() {
1211
+ let comp = this.componentRef.instance;
1212
+ return comp.IsMovable();
1213
+ }
1214
+ /**
1215
+ * Initiates the resize process when a mousedown event occurs on a resize handle.
1216
+ * Stores the initial state (dimensions, mouse position) and sets flags.
1217
+ * @param {MouseEvent} event - The mousedown event triggering the resize.
1218
+ * @param {'right' | 'bottom' | 'corner'} direction - Indicates which resize handle was activated.
1219
+ */
1220
+ onResizeStart(event, direction) {
1221
+ this.resizing = true;
1222
+ this.resizeDirection = direction;
1223
+ const element = this.foregroundElementRef.nativeElement;
1224
+ this.originalWidth = element.offsetWidth;
1225
+ this.originalHeight = element.offsetHeight;
1226
+ this.originalMouseX = event.clientX;
1227
+ this.originalMouseY = event.clientY;
1228
+ // Removes auto margin and set left and top style
1229
+ if (this.isCenteredToWindow) {
1230
+ element.style.left = element.offsetLeft + 'px';
1231
+ element.style.top = element.offsetTop + 'px';
1232
+ element.style.margin = '';
1233
+ this.isCenteredToWindow = false;
1234
+ }
1235
+ event.preventDefault();
1236
+ event.stopPropagation();
1237
+ }
1238
+ /**
1239
+ * Handles the resizing logic as the mouse moves across the window.
1240
+ * This listener is active globally on the window during a resize operation via @HostListener.
1241
+ * Calculates and applies the new dimensions to the element based on mouse movement.
1242
+ * @param {MouseEvent} event - The mousemove event passed by the HostListener.
1243
+ */
1244
+ onResize(event) {
1245
+ if (!this.resizing)
1246
+ return;
1247
+ const element = this.foregroundElementRef.nativeElement;
1248
+ const parentElement = element.parentNode;
1249
+ const parentWidth = parentElement.offsetWidth;
1250
+ const parentHeight = parentElement.offsetHeight;
1251
+ const rect = element.getBoundingClientRect();
1252
+ const left = rect.left;
1253
+ const top = rect.top;
1254
+ // When the user extends the overlay window to its edge, it becomes hard to grab the border for resizing.
1255
+ // To improve this, 2px are subtracted from maxAllowedWidth and maxAllowedHeight, making it easier to grab the overlay's border for resizing.
1256
+ const maxAllowedWidth = parentWidth - left - 2;
1257
+ const maxAllowedHeight = parentHeight - top - 2;
1258
+ let dx = (event.clientX - this.originalMouseX);
1259
+ let dy = (event.clientY - this.originalMouseY);
1260
+ if (this.resizeDirection === 'right' || this.resizeDirection === 'corner') {
1261
+ let newWidth = this.originalWidth + dx;
1262
+ if (newWidth > maxAllowedWidth)
1263
+ newWidth = maxAllowedWidth;
1264
+ else if (newWidth < MagicOverlayContainer.minAllowedWidth)
1265
+ newWidth = MagicOverlayContainer.minAllowedWidth;
1266
+ element.style.width = `${newWidth}px`;
1267
+ }
1268
+ if (this.resizeDirection === 'bottom' || this.resizeDirection === 'corner') {
1269
+ let newHeight = this.originalHeight + dy;
1270
+ if (newHeight > maxAllowedHeight)
1271
+ newHeight = maxAllowedHeight;
1272
+ else if (newHeight < MagicOverlayContainer.minAllowedHeight)
1273
+ newHeight = MagicOverlayContainer.minAllowedHeight;
1274
+ element.style.height = `${newHeight}px`;
1275
+ }
1276
+ }
1277
+ /**
1278
+ * Finalizes the resize operation when the mouse button is released anywhere on the window.
1279
+ * Resets the resizing state flags. Triggered globally via @HostListener.
1280
+ */
1281
+ onResizeEnd() {
1282
+ this.resizing = false;
1283
+ this.resizeDirection = null;
1284
+ }
1165
1285
  /** @nocollapse */ static ɵfac = function MagicOverlayContainer_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicOverlayContainer)(); };
1166
1286
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) { if (rf & 1) {
1167
1287
  i0.ɵɵviewQuery(_c0$3, 5);
@@ -1170,47 +1290,63 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1170
1290
  let _t;
1171
1291
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerElementRef = _t.first);
1172
1292
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.foregroundElementRef = _t.first);
1173
- } }, inputs: { ModalComp: "ModalComp", ModalCompParameters: "ModalCompParameters" }, outputs: { onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 4, consts: [["modalForeground", ""], ["modalbody", ""], ["modalheader", ""], [1, "modal-background", 3, "click"], ["tabindex", "-1", "style", "float:right; border: none; background-color: transparent; outline: none; color: white", 3, "click", 4, "ngIf"], [1, "modal-foreground", 3, "ngStyle"], ["class", "modal-header", 4, "ngIf"], [3, "ngStyle"], ["magicViewContainerRef", ""], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white", 3, "click"], [1, "modal-header"], ["tabindex", "-1", 2, "float", "right", 3, "click"]], template: function MagicOverlayContainer_Template(rf, ctx) { if (rf & 1) {
1293
+ } }, hostBindings: function MagicOverlayContainer_HostBindings(rf, ctx) { if (rf & 1) {
1294
+ i0.ɵɵlistener("mousemove", function MagicOverlayContainer_mousemove_HostBindingHandler($event) { return ctx.onResize($event); }, false, i0.ɵɵresolveWindow)("mouseup", function MagicOverlayContainer_mouseup_HostBindingHandler() { return ctx.onResizeEnd(); }, false, i0.ɵɵresolveWindow);
1295
+ } }, inputs: { ModalComp: "ModalComp", ModalCompParameters: "ModalCompParameters" }, outputs: { onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 12, vars: 8, consts: [["modalForeground", ""], ["modalbody", ""], ["dragHandleCorner", ""], ["dragHandleRight", ""], ["dragHandleBottom", ""], ["modalheader", ""], [1, "boundary-line"], [1, "modal-background", 3, "click"], ["tabindex", "-1", "style", "float:right; border: none; background-color: transparent; outline: none; color: white", 3, "click", 4, "ngIf"], ["cdkDragBoundary", ".boundary-line", "cdkDrag", "", 1, "modal-foreground", 3, "ngStyle", "cdkDragDisabled"], ["class", "dragHandle corner", 3, "mousedown", 4, "ngIf"], ["class", "dragHandle right", 3, "mousedown", 4, "ngIf"], ["class", "dragHandle bottom", 3, "mousedown", 4, "ngIf"], ["class", "modal-header", "cdkDragHandle", "", 3, "movable", 4, "ngIf"], [3, "ngStyle"], ["magicViewContainerRef", ""], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white", 3, "click"], [1, "dragHandle", "corner", 3, "mousedown"], [1, "dragHandle", "right", 3, "mousedown"], [1, "dragHandle", "bottom", 3, "mousedown"], ["cdkDragHandle", "", 1, "modal-header"], ["tabindex", "-1", 2, "float", "right", 3, "click"]], template: function MagicOverlayContainer_Template(rf, ctx) { if (rf & 1) {
1174
1296
  const _r1 = i0.ɵɵgetCurrentView();
1175
- i0.ɵɵelementStart(0, "div")(1, "div", 3);
1297
+ i0.ɵɵelementStart(0, "div", 6)(1, "div", 7);
1176
1298
  i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnBackgroundClick()); });
1177
- i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 4);
1299
+ i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 8);
1178
1300
  i0.ɵɵelementEnd();
1179
- i0.ɵɵelementStart(3, "div", 5, 0);
1180
- i0.ɵɵtemplate(5, MagicOverlayContainer_div_5_Template, 5, 1, "div", 6);
1181
- i0.ɵɵelementStart(6, "div", 7);
1182
- i0.ɵɵelement(7, "div", 8, 1);
1301
+ i0.ɵɵelementStart(3, "div", 9, 0);
1302
+ i0.ɵɵtemplate(5, MagicOverlayContainer_span_5_Template, 2, 0, "span", 10)(6, MagicOverlayContainer_span_6_Template, 2, 0, "span", 11)(7, MagicOverlayContainer_span_7_Template, 2, 0, "span", 12)(8, MagicOverlayContainer_div_8_Template, 5, 3, "div", 13);
1303
+ i0.ɵɵelementStart(9, "div", 14);
1304
+ i0.ɵɵelement(10, "div", 15, 1);
1183
1305
  i0.ɵɵelementEnd()()();
1184
1306
  } if (rf & 2) {
1185
1307
  i0.ɵɵadvance(2);
1186
1308
  i0.ɵɵproperty("ngIf", !ctx.getShowTitleBar());
1187
1309
  i0.ɵɵadvance();
1188
- i0.ɵɵproperty("ngStyle", ctx.getStyle());
1310
+ i0.ɵɵproperty("ngStyle", ctx.getStyle())("cdkDragDisabled", !ctx.IsMovable());
1189
1311
  i0.ɵɵadvance(2);
1312
+ i0.ɵɵproperty("ngIf", ctx.IsResizable());
1313
+ i0.ɵɵadvance();
1314
+ i0.ɵɵproperty("ngIf", ctx.IsResizable());
1315
+ i0.ɵɵadvance();
1316
+ i0.ɵɵproperty("ngIf", ctx.IsResizable());
1317
+ i0.ɵɵadvance();
1190
1318
  i0.ɵɵproperty("ngIf", ctx.getShowTitleBar());
1191
1319
  i0.ɵɵadvance();
1192
1320
  i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
1193
- } }, dependencies: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
1321
+ } }, dependencies: [i1.NgIf, i1.NgStyle, i2$1.CdkDragHandle, i2$1.CdkDrag, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}.modal-header.movable[_ngcontent-%COMP%]:active{cursor:move}.container[_ngcontent-%COMP%]{position:relative}.dragHandle[_ngcontent-%COMP%]{position:absolute}.dragHandle.corner[_ngcontent-%COMP%]{width:10px;right:0;bottom:0;height:10px;cursor:nwse-resize;background:linear-gradient(135deg,rgba(0,0,0,.4) 50%,transparent 50%)}.dragHandle.right[_ngcontent-%COMP%]{width:2px;right:-2px;height:100%;cursor:ew-resize}.dragHandle.bottom[_ngcontent-%COMP%]{height:2px;bottom:-2px;width:100%;cursor:ns-resize}.boundary-line[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100%}"] });
1194
1322
  }
1195
1323
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
1196
1324
  type: Component,
1197
1325
  args: [{ selector: 'app-magic-overlay-container', template: `
1198
- <div>
1326
+ <div class="boundary-line">
1327
+
1199
1328
  <div class="modal-background" (click)="OnBackgroundClick()">
1200
1329
  <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white" *ngIf="!getShowTitleBar()">X</button>
1201
1330
  </div>
1202
- <div #modalForeground class="modal-foreground" [ngStyle]="getStyle()">
1203
- <div #modalheader class="modal-header" *ngIf="getShowTitleBar()">
1331
+
1332
+ <div #modalForeground class="modal-foreground" [ngStyle]="getStyle()" cdkDragBoundary=".boundary-line" cdkDrag [cdkDragDisabled]="!IsMovable()">
1333
+
1334
+ <span #dragHandleCorner *ngIf="IsResizable()" class="dragHandle corner" (mousedown)="onResizeStart($event, 'corner')"></span>
1335
+ <span #dragHandleRight *ngIf="IsResizable()" class="dragHandle right" (mousedown)="onResizeStart($event, 'right')"></span>
1336
+ <span #dragHandleBottom *ngIf="IsResizable()" class="dragHandle bottom" (mousedown)="onResizeStart($event, 'bottom')"></span>
1337
+
1338
+ <div #modalheader class="modal-header" *ngIf="getShowTitleBar()" cdkDragHandle [class.movable]="IsMovable()">
1204
1339
  {{getText()}}
1205
1340
  <button (click)="OnClose()" style="float:right" tabindex="-1">X</button>
1206
1341
  </div>
1342
+
1207
1343
  <div [ngStyle]="getClientAreaStyles()">
1208
1344
  <div #modalbody magicViewContainerRef>
1209
1345
  </div>
1210
1346
  </div>
1211
1347
  </div>
1212
1348
  </div>
1213
- `, standalone: false, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}\n"] }]
1349
+ `, standalone: false, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}.modal-header.movable:active{cursor:move}.container{position:relative}.dragHandle{position:absolute}.dragHandle.corner{width:10px;right:0;bottom:0;height:10px;cursor:nwse-resize;background:linear-gradient(135deg,rgba(0,0,0,.4) 50%,transparent 50%)}.dragHandle.right{width:2px;right:-2px;height:100%;cursor:ew-resize}.dragHandle.bottom{height:2px;bottom:-2px;width:100%;cursor:ns-resize}.boundary-line{width:100%;height:100%;max-width:100%}\n"] }]
1214
1350
  }], () => [], { headerElementRef: [{
1215
1351
  type: ViewChild,
1216
1352
  args: ['modalheader', { static: false }]
@@ -1223,8 +1359,14 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1223
1359
  type: Input
1224
1360
  }], onClose: [{
1225
1361
  type: Output
1362
+ }], onResize: [{
1363
+ type: HostListener,
1364
+ args: ['window:mousemove', ['$event']]
1365
+ }], onResizeEnd: [{
1366
+ type: HostListener,
1367
+ args: ['window:mouseup']
1226
1368
  }] }); })();
1227
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicOverlayContainer, { className: "MagicOverlayContainer", filePath: "src/ui/magic-modal/magic-overlay-container.ts", lineNumber: 41 }); })();
1369
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicOverlayContainer, { className: "MagicOverlayContainer", filePath: "src/ui/magic-modal/magic-overlay-container.ts", lineNumber: 50 }); })();
1228
1370
 
1229
1371
  /**
1230
1372
  * Service managing overlay windows
@@ -2220,6 +2362,9 @@ class TaskMagicService {
2220
2362
  UploadFileToServer(fileContent, serverFileName) {
2221
2363
  return this.magic.UploadFileToServer(fileContent, serverFileName);
2222
2364
  }
2365
+ async DownloadFileFromServer(serverFileName) {
2366
+ return await this.magic.DownloadFileFromServer(serverFileName);
2367
+ }
2223
2368
  /**
2224
2369
  * Validates the control value, using the Magic WebClient
2225
2370
  * @param controlName Id of validated control
@@ -3145,6 +3290,9 @@ class AccessorMagicService {
3145
3290
  UploadFileToServer(fileContent, serverFileName) {
3146
3291
  return this.task.UploadFileToServer(fileContent, serverFileName);
3147
3292
  }
3293
+ async DownloadFileFromServer(serverFileName) {
3294
+ return await this.task.DownloadFileFromServer(serverFileName);
3295
+ }
3148
3296
  /**
3149
3297
  * Checks if the control is read-only
3150
3298
  * @param controlId Id of control
@@ -4328,7 +4476,7 @@ class MagicDirective {
4328
4476
  ngOnDestroy() {
4329
4477
  this.subscribeRefreshDom.unsubscribe();
4330
4478
  }
4331
- /** @nocollapse */ static ɵfac = function MagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$1.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4479
+ /** @nocollapse */ static ɵfac = function MagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$2.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4332
4480
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", pollTime: "pollTime", rowId: "rowId" }, standalone: false });
4333
4481
  }
4334
4482
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
@@ -4337,7 +4485,7 @@ class MagicDirective {
4337
4485
  selector: "[magic]",
4338
4486
  standalone: false
4339
4487
  }]
4340
- }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$1.Platform }, { type: RowMagicDirective, decorators: [{
4488
+ }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$2.Platform }, { type: RowMagicDirective, decorators: [{
4341
4489
  type: Optional
4342
4490
  }] }], { magic: [{
4343
4491
  type: Input,
@@ -4526,7 +4674,7 @@ class NoControlMagicDirective extends MagicDirective {
4526
4674
  break;
4527
4675
  }
4528
4676
  }
4529
- /** @nocollapse */ static ɵfac = function NoControlMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$1.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4677
+ /** @nocollapse */ static ɵfac = function NoControlMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$2.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4530
4678
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: [0, "magicnc", "magic"] }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature] });
4531
4679
  }
4532
4680
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoControlMagicDirective, [{
@@ -4535,7 +4683,7 @@ class NoControlMagicDirective extends MagicDirective {
4535
4683
  selector: '[magicnc]',
4536
4684
  standalone: false
4537
4685
  }]
4538
- }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$1.Platform }, { type: RowMagicDirective, decorators: [{
4686
+ }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$2.Platform }, { type: RowMagicDirective, decorators: [{
4539
4687
  type: Optional
4540
4688
  }] }], { magic: [{
4541
4689
  type: Input,
@@ -6436,7 +6584,8 @@ class MagicModule {
6436
6584
  FormsModule,
6437
6585
  ReactiveFormsModule,
6438
6586
  RouterModule,
6439
- DynamicModule, MaskitoModule] });
6587
+ DynamicModule,
6588
+ DragDropModule, MaskitoModule] });
6440
6589
  }
6441
6590
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicModule, [{
6442
6591
  type: NgModule,
@@ -6447,7 +6596,10 @@ class MagicModule {
6447
6596
  FormsModule,
6448
6597
  ReactiveFormsModule,
6449
6598
  RouterModule,
6450
- DynamicModule],
6599
+ DynamicModule,
6600
+ CdkDragHandle,
6601
+ CdkDrag,
6602
+ DragDropModule],
6451
6603
  providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider, provideHttpClient(withInterceptorsFromDi())]
6452
6604
  }]
6453
6605
  }], null, null); })();
@@ -6483,7 +6635,10 @@ class MagicModule {
6483
6635
  FormsModule,
6484
6636
  ReactiveFormsModule,
6485
6637
  RouterModule,
6486
- DynamicModule], exports: [MagicDirective,
6638
+ DynamicModule,
6639
+ CdkDragHandle,
6640
+ CdkDrag,
6641
+ DragDropModule], exports: [MagicDirective,
6487
6642
  CheckboxMagicDirective,
6488
6643
  CheckboxNoFormControlMagicDirective,
6489
6644
  InputNoFormControlMagicDirective,