@magic-xpa/angular 4.800.0-dev480.13 → 4.800.0-dev480.133

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.
Files changed (117) hide show
  1. package/bundles/magic-xpa-angular.umd.js +200 -1505
  2. package/bundles/magic-xpa-angular.umd.js.map +1 -1
  3. package/bundles/magic-xpa-angular.umd.min.js +2 -2
  4. package/bundles/magic-xpa-angular.umd.min.js.map +1 -1
  5. package/esm2015/index.js +1 -1
  6. package/esm2015/magic-xpa-angular.js +1 -4
  7. package/esm2015/src/controls.metadata.model.js +3 -36
  8. package/esm2015/src/interfaces/sub-form-definition.iterface.js +1 -1
  9. package/esm2015/src/magic.core.module.js +4 -14
  10. package/esm2015/src/services/ISubformMagicService.js +1 -1
  11. package/esm2015/src/services/OverlayWindowService.js +4 -29
  12. package/esm2015/src/services/StylesMapManager.js +1 -4
  13. package/esm2015/src/services/accessor.magic.service.js +32 -242
  14. package/esm2015/src/services/commands-collector.magic.service.js +4 -7
  15. package/esm2015/src/services/component-list.magic.service.js +1 -25
  16. package/esm2015/src/services/confirmation.components.magic.provider.js +4 -24
  17. package/esm2015/src/services/engine.magic.service.js +7 -10
  18. package/esm2015/src/services/exit.magic.service.js +4 -10
  19. package/esm2015/src/services/magic.providers.js +1 -4
  20. package/esm2015/src/services/magic.services.js +4 -10
  21. package/esm2015/src/services/mg-date-adapter.js +5 -5
  22. package/esm2015/src/services/overlay.conainer.magic.provider.js +4 -8
  23. package/esm2015/src/services/router-commands.magic.service.js +4 -10
  24. package/esm2015/src/services/subform.magic.service.js +8 -48
  25. package/esm2015/src/services/table.magic.service.js +5 -61
  26. package/esm2015/src/services/task.magics.service.js +13 -281
  27. package/esm2015/src/services/title.magic.service.js +4 -15
  28. package/esm2015/src/ui/GuiInteractiveExecutor.js +1 -6
  29. package/esm2015/src/ui/components/base-magic-alert.component.js +4 -14
  30. package/esm2015/src/ui/components/base-magic-confirm.component.js +4 -16
  31. package/esm2015/src/ui/components/magic-alert.component.js +5 -8
  32. package/esm2015/src/ui/components/magic-confirmation-box.component.js +5 -8
  33. package/esm2015/src/ui/directives/NonMagicControlDirective.js +4 -31
  34. package/esm2015/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.js +4 -10
  35. package/esm2015/src/ui/directives/magic/checkbox.magic.directive.js +4 -13
  36. package/esm2015/src/ui/directives/magic/combobox.magic.directive.js +4 -10
  37. package/esm2015/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.js +5 -11
  38. package/esm2015/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.js +4 -16
  39. package/esm2015/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.js +5 -11
  40. package/esm2015/src/ui/directives/magic/input.noformcontrol.magic.directive.js +4 -10
  41. package/esm2015/src/ui/directives/magic/nocontrol.magic.directive.js +6 -16
  42. package/esm2015/src/ui/directives/magic/row.magic.directive.js +4 -22
  43. package/esm2015/src/ui/directives/magic-focus.directive.js +4 -7
  44. package/esm2015/src/ui/directives/magic.directive.js +14 -80
  45. package/esm2015/src/ui/directives/magicViewContainerRef.directive.js +4 -8
  46. package/esm2015/src/ui/directives/mgformat.magic.directive.js +4 -57
  47. package/esm2015/src/ui/directives/range-validator.magic.directive.js +4 -20
  48. package/esm2015/src/ui/magic-confirmationBox.js +1 -25
  49. package/esm2015/src/ui/magic-modal/base-magic-overlay-container.js +1 -1
  50. package/esm2015/src/ui/magic-modal/magic-modal-form.js +1 -4
  51. package/esm2015/src/ui/magic-modal/magic-modal-interface.js +1 -1
  52. package/esm2015/src/ui/magic-modal/magic-overlay-container-wrapper.js +4 -21
  53. package/esm2015/src/ui/magic-modal/magic-overlay-container.js +4 -46
  54. package/esm2015/src/ui/magic-root.component.js +10 -53
  55. package/esm2015/src/ui/mgerror.magic.component.js +4 -21
  56. package/esm2015/src/ui/pipes/date.magic.pipe.js +5 -12
  57. package/esm2015/src/ui/pipes/time.magic.pipe.js +4 -7
  58. package/esm2015/src/ui/router-container.magic.component.js +4 -32
  59. package/esm2015/src/ui/subform.magic.component.js +4 -23
  60. package/esm2015/src/ui/task-base.magic.component.js +4 -74
  61. package/esm2015/src/ui/utils.js +1 -20
  62. package/fesm2015/magic-xpa-angular.js +201 -1509
  63. package/fesm2015/magic-xpa-angular.js.map +1 -1
  64. package/magic-xpa-angular.d.ts +0 -3
  65. package/package.json +3 -3
  66. package/src/controls.metadata.model.d.ts +0 -16
  67. package/src/interfaces/sub-form-definition.iterface.d.ts +0 -6
  68. package/src/magic.core.module.d.ts +0 -3
  69. package/src/services/OverlayWindowService.d.ts +0 -19
  70. package/src/services/StylesMapManager.d.ts +0 -3
  71. package/src/services/accessor.magic.service.d.ts +12 -202
  72. package/src/services/commands-collector.magic.service.d.ts +0 -3
  73. package/src/services/component-list.magic.service.d.ts +0 -27
  74. package/src/services/confirmation.components.magic.provider.d.ts +0 -16
  75. package/src/services/engine.magic.service.d.ts +1 -3
  76. package/src/services/exit.magic.service.d.ts +0 -6
  77. package/src/services/magic.providers.d.ts +0 -3
  78. package/src/services/magic.services.d.ts +0 -6
  79. package/src/services/router-commands.magic.service.d.ts +0 -6
  80. package/src/services/subform.magic.service.d.ts +0 -28
  81. package/src/services/table.magic.service.d.ts +0 -55
  82. package/src/services/task.magics.service.d.ts +1 -294
  83. package/src/services/title.magic.service.d.ts +0 -11
  84. package/src/ui/GuiInteractiveExecutor.d.ts +0 -3
  85. package/src/ui/components/base-magic-alert.component.d.ts +0 -16
  86. package/src/ui/components/base-magic-confirm.component.d.ts +0 -18
  87. package/src/ui/components/magic-alert.component.d.ts +0 -3
  88. package/src/ui/components/magic-confirmation-box.component.d.ts +0 -3
  89. package/src/ui/directives/NonMagicControlDirective.d.ts +0 -41
  90. package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +0 -6
  91. package/src/ui/directives/magic/checkbox.magic.directive.d.ts +0 -9
  92. package/src/ui/directives/magic/combobox.magic.directive.d.ts +0 -6
  93. package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +0 -6
  94. package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +0 -12
  95. package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +0 -6
  96. package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +0 -6
  97. package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +0 -3
  98. package/src/ui/directives/magic/row.magic.directive.d.ts +0 -15
  99. package/src/ui/directives/magic-focus.directive.d.ts +0 -3
  100. package/src/ui/directives/magic.directive.d.ts +0 -78
  101. package/src/ui/directives/magicViewContainerRef.directive.d.ts +0 -3
  102. package/src/ui/directives/mgformat.magic.directive.d.ts +0 -40
  103. package/src/ui/directives/range-validator.magic.directive.d.ts +0 -16
  104. package/src/ui/magic-confirmationBox.d.ts +0 -19
  105. package/src/ui/magic-modal/base-magic-overlay-container.d.ts +0 -9
  106. package/src/ui/magic-modal/magic-modal-form.d.ts +0 -3
  107. package/src/ui/magic-modal/magic-modal-interface.d.ts +0 -27
  108. package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +0 -20
  109. package/src/ui/magic-modal/magic-overlay-container.d.ts +0 -51
  110. package/src/ui/magic-root.component.d.ts +0 -42
  111. package/src/ui/mgerror.magic.component.d.ts +0 -19
  112. package/src/ui/pipes/date.magic.pipe.d.ts +0 -6
  113. package/src/ui/pipes/time.magic.pipe.d.ts +0 -3
  114. package/src/ui/router-container.magic.component.d.ts +0 -19
  115. package/src/ui/subform.magic.component.d.ts +0 -21
  116. package/src/ui/task-base.magic.component.d.ts +0 -72
  117. package/src/ui/utils.d.ts +0 -3
@@ -296,21 +296,16 @@
296
296
  return value;
297
297
  }
298
298
 
299
- /**
300
- * @ignore
301
- */
302
299
  var ControlMetadata = /** @class */ (function () {
303
300
  function ControlMetadata() {
304
301
  this.properties = new Map();
305
302
  this.classesMap = new Map();
306
303
  this.stylesMap = new Map();
307
- // user properties
308
304
  this.userProperties = new Map();
309
305
  this.customValidators = new Map();
310
306
  }
311
307
  ControlMetadata.prototype.setClass = function (key, value) {
312
308
  var e_1, _a;
313
- // for no-control - hold the name of the class to be removed later
314
309
  if (this.classesMap.has(key)) {
315
310
  this.removedClass = this.classesMap.get(key);
316
311
  }
@@ -336,14 +331,9 @@
336
331
  };
337
332
  return ControlMetadata;
338
333
  }());
339
- /**
340
- * @ignore
341
- */
342
334
  var ControlsMetadata = /** @class */ (function () {
343
335
  function ControlsMetadata() {
344
- //values of control
345
336
  this.values = new Map();
346
- // dictionary of controls with there properties
347
337
  this.ControlsProperties = new Map();
348
338
  this.isCreated = false;
349
339
  this.isEditing = false;
@@ -361,8 +351,6 @@
361
351
  return this.ControlsProperties.get(controlId);
362
352
  };
363
353
  ControlsMetadata.prototype.update = function (obj) {
364
- //should we keep the values here ?
365
- //this.values = obj.ControlsValues;
366
354
  var props = obj.ControlsMetaData;
367
355
  for (var controlName in props) {
368
356
  if (!this.ControlsProperties.has(controlName))
@@ -392,16 +380,13 @@
392
380
  };
393
381
  return ControlsMetadata;
394
382
  }());
395
- /**
396
- * @ignore
397
- */
398
383
  var Records = /** @class */ (function () {
399
384
  function Records() {
400
385
  this.data = new Map();
401
- this.list = []; //used for sequential access in table
386
+ this.list = [];
402
387
  this.recordsBeforeCurrentView = 0;
403
388
  this.isEmptyDataView = false;
404
- this.sizeUpdated = false; //used for evaluating the RecordsSizeChange.
389
+ this.sizeUpdated = false;
405
390
  }
406
391
  Records.prototype.getRow = function (dvRowId) {
407
392
  return this.list[dvRowId + this.recordsBeforeCurrentView];
@@ -425,24 +410,14 @@
425
410
  }
426
411
  return false;
427
412
  };
428
- /*
429
- * for row editing
430
- * */
431
413
  Records.prototype.startRowEditing = function (guiRowId) {
432
414
  if (guiRowId < this.list.length && this.data.has(guiRowId))
433
415
  this.data.get(guiRowId).isEditing = true;
434
416
  };
435
- /*
436
- * stop row editing on row Id
437
- * */
438
417
  Records.prototype.stopRowEditing = function (guiRowId) {
439
418
  if (guiRowId < this.list.length && this.data.has(guiRowId))
440
419
  this.data.get(guiRowId).isEditing = false;
441
420
  };
442
- /*
443
- * return if row is in editing
444
- * Called by the HTML code, so parameter is a string, not a numebr
445
- * */
446
421
  Records.prototype.isRowInRowEditing = function (guiRowId) {
447
422
  if (+guiRowId < this.list.length) {
448
423
  if (!this.data.has(+guiRowId) || util.isNullOrUndefined(this.data.get(+guiRowId)))
@@ -482,7 +457,6 @@
482
457
  Records.prototype.updateSize = function (len) {
483
458
  if (this.list.length != len) {
484
459
  if (len < this.list.length) {
485
- //remove rows
486
460
  for (var i = len; i < this.list.length; i++) {
487
461
  this.data.delete(i);
488
462
  }
@@ -491,10 +465,6 @@
491
465
  this.sizeUpdated = true;
492
466
  }
493
467
  };
494
- /**
495
- * crears data for the first record
496
- * @param template
497
- */
498
468
  Records.prototype.clearFirstTableRecord = function (template) {
499
469
  if (this.list.length >= 1) {
500
470
  for (var key in template) {
@@ -533,16 +503,11 @@
533
503
  HtmlClasses["HintColor"] = "hintcolor";
534
504
  })(exports.HtmlClasses || (exports.HtmlClasses = {}));
535
505
 
536
- /**
537
- * @ignore
538
- */
539
506
  var EngineMagicService = /** @class */ (function () {
540
507
  function EngineMagicService() {
541
508
  this.magicBridge = engine.MagicBridge;
542
509
  this.isStub = false;
543
- // true when user is logged in magic
544
510
  this.isLoggedIn = false;
545
- //TODO - unregister
546
511
  this.refreshDom = new rxjs.Subject();
547
512
  this.interactiveCommands = new rxjs.Subject();
548
513
  }
@@ -604,6 +569,9 @@
604
569
  EngineMagicService.prototype.GetControlPictureMask = function (taskId, controlName) {
605
570
  return this.magicBridge.GetControlPictureMask(taskId, controlName);
606
571
  };
572
+ EngineMagicService.prototype.GetFormattedValue = function (taskId, controlName, value) {
573
+ return this.magicBridge.GetFormattedValue(taskId, controlName, value);
574
+ };
607
575
  EngineMagicService.prototype.ValidateControlValue = function (taskId, controlName, value) {
608
576
  return this.magicBridge.ValidateControlValue(taskId, controlName, value);
609
577
  };
@@ -611,7 +579,6 @@
611
579
  return this.magicBridge.GetFldRanges(taskId, controlName);
612
580
  };
613
581
  EngineMagicService.prototype.saveData = function (data) {
614
- //this.magicBridge.saveData(data);
615
582
  };
616
583
  EngineMagicService.prototype.getIsLoggedIn = function () {
617
584
  return this.isLoggedIn;
@@ -627,26 +594,17 @@
627
594
  };
628
595
  return EngineMagicService;
629
596
  }());
630
- /** @nocollapse */ EngineMagicService.ɵfac = function EngineMagicService_Factory(t) { return new (t || EngineMagicService)(); };
631
- /** @nocollapse */ EngineMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: EngineMagicService, factory: EngineMagicService.ɵfac });
632
- /*@__PURE__*/ (function () {
597
+ EngineMagicService.ɵfac = function EngineMagicService_Factory(t) { return new (t || EngineMagicService)(); };
598
+ EngineMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: EngineMagicService, factory: EngineMagicService.ɵfac });
599
+ (function () {
633
600
  i0.ɵsetClassMetadata(EngineMagicService, [{
634
601
  type: i0.Injectable
635
602
  }], null, null);
636
603
  })();
637
604
 
638
- /**
639
- * Manages the list of components in a project, and the project title
640
- */
641
605
  var ComponentListMagicService = /** @class */ (function () {
642
606
  function ComponentListMagicService() {
643
- /**
644
- * Map of project components
645
- */
646
607
  this.components = new Map();
647
- /**
648
- * Map of project dialogs
649
- */
650
608
  this.dialogs = new Map();
651
609
  this.lazyLoadModulesMap = null;
652
610
  }
@@ -660,11 +618,6 @@
660
618
  data = this.components.get(name);
661
619
  return data;
662
620
  };
663
- /**
664
- * Return a component according to name
665
- * @param name Name of requested component
666
- * @returns The requested component
667
- */
668
621
  ComponentListMagicService.prototype.getComponent = function (name, mustHaveData) {
669
622
  if (mustHaveData === void 0) { mustHaveData = true; }
670
623
  var data = this.getData(name, mustHaveData);
@@ -676,30 +629,17 @@
676
629
  this.components.set(key, data);
677
630
  }
678
631
  };
679
- /**
680
- * Return a component according to name
681
- * @param name Name of requested component
682
- * @returns The requested component
683
- */
684
632
  ComponentListMagicService.prototype.getModuleRef = function (name) {
685
633
  var data = this.getData(name, false);
686
634
  return data ? data.moduleRef : null;
687
635
  ;
688
636
  };
689
- /**
690
- * Return the lazy load module details of the specified component
691
- * @param name: Name of requested component
692
- * @returns: lazy load module details
693
- */
694
637
  ComponentListMagicService.prototype.getLazyLoadModuleData = function (name) {
695
638
  return (this.lazyLoadModulesMap != null && this.lazyLoadModulesMap.hasOwnProperty(name)) ? this.lazyLoadModulesMap[name] : null;
696
639
  };
697
640
  return ComponentListMagicService;
698
641
  }());
699
642
 
700
- /**
701
- * @ignore
702
- */
703
643
  var StylesMapManager = /** @class */ (function () {
704
644
  function StylesMapManager() {
705
645
  }
@@ -729,14 +669,10 @@
729
669
  [utils$1.MagicProperties.Wallpaper, "background-image"]
730
670
  ]);
731
671
 
732
- /**
733
- * @ignore
734
- */
735
672
  var GuiInteractiveExecutor = /** @class */ (function () {
736
673
  function GuiInteractiveExecutor() {
737
674
  }
738
675
  GuiInteractiveExecutor.prototype.Run = function () {
739
- // Sets the currentContextID
740
676
  try {
741
677
  switch (this.command._commandType) {
742
678
  case gui.InteractiveCommandType.GET_VALUE:
@@ -767,7 +703,6 @@
767
703
  }
768
704
  catch (ex) {
769
705
  throw ex;
770
- //want to see all the exceptions for now
771
706
  }
772
707
  };
773
708
  GuiInteractiveExecutor.executeInteractiveCommand = function (task, guiIntactiveCommand, overlayService) {
@@ -848,30 +783,18 @@
848
783
  i0.Output()
849
784
  ], exports.BaseMagicOverlayContainer);
850
785
 
851
- /**
852
- * This is a base class for the magic confirm components
853
- */
854
786
  var BaseMagicConfirmComponent = /** @class */ (function () {
855
787
  function BaseMagicConfirmComponent() {
856
- /**
857
- * onClose Event - to be raised when the component is closed
858
- * should pass true when OK is pressed and false when cancel is pressed
859
- */
860
788
  this.onClose = new i0.EventEmitter();
861
789
  }
862
- /**
863
- * raises close Event
864
- * @param result true when OK is pressed and false when cancel is pressed
865
- *
866
- */
867
790
  BaseMagicConfirmComponent.prototype.OnClose = function (result) {
868
791
  this.onClose.emit(result);
869
792
  };
870
793
  return BaseMagicConfirmComponent;
871
794
  }());
872
- /** @nocollapse */ BaseMagicConfirmComponent.ɵfac = function BaseMagicConfirmComponent_Factory(t) { return new (t || BaseMagicConfirmComponent)(); };
873
- /** @nocollapse */ BaseMagicConfirmComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }, styles: [""] });
874
- /*@__PURE__*/ (function () {
795
+ BaseMagicConfirmComponent.ɵfac = function BaseMagicConfirmComponent_Factory(t) { return new (t || BaseMagicConfirmComponent)(); };
796
+ BaseMagicConfirmComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }, styles: [""] });
797
+ (function () {
875
798
  i0.ɵsetClassMetadata(BaseMagicConfirmComponent, [{
876
799
  type: i0.Component,
877
800
  args: [{
@@ -888,28 +811,18 @@
888
811
  }] });
889
812
  })();
890
813
 
891
- /**
892
- * This is a base class for the magic alert components
893
- */
894
814
  var BaseMagicAlertComponent = /** @class */ (function () {
895
815
  function BaseMagicAlertComponent() {
896
- /**
897
- * onClose Event - to be raised when the component is closed
898
-
899
- */
900
816
  this.onClose = new i0.EventEmitter();
901
817
  }
902
- /**
903
- * close magic alert
904
- */
905
818
  BaseMagicAlertComponent.prototype.OnClose = function () {
906
819
  this.onClose.emit();
907
820
  };
908
821
  return BaseMagicAlertComponent;
909
822
  }());
910
- /** @nocollapse */ BaseMagicAlertComponent.ɵfac = function BaseMagicAlertComponent_Factory(t) { return new (t || BaseMagicAlertComponent)(); };
911
- /** @nocollapse */ BaseMagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }, styles: [""] });
912
- /*@__PURE__*/ (function () {
823
+ BaseMagicAlertComponent.ɵfac = function BaseMagicAlertComponent_Factory(t) { return new (t || BaseMagicAlertComponent)(); };
824
+ BaseMagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }, styles: [""] });
825
+ (function () {
913
826
  i0.ɵsetClassMetadata(BaseMagicAlertComponent, [{
914
827
  type: i0.Component,
915
828
  args: [{
@@ -926,9 +839,6 @@
926
839
  }] });
927
840
  })();
928
841
 
929
- /**
930
- * Directive for setting focus on element
931
- */
932
842
  var MagicFocusDirective = /** @class */ (function () {
933
843
  function MagicFocusDirective(hostElement) {
934
844
  this.hostElement = hostElement;
@@ -938,9 +848,9 @@
938
848
  };
939
849
  return MagicFocusDirective;
940
850
  }());
941
- /** @nocollapse */ MagicFocusDirective.ɵfac = function MagicFocusDirective_Factory(t) { return new (t || MagicFocusDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
942
- /** @nocollapse */ MagicFocusDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicFocusDirective, selectors: [["", "magicFocus", ""]] });
943
- /*@__PURE__*/ (function () {
851
+ MagicFocusDirective.ɵfac = function MagicFocusDirective_Factory(t) { return new (t || MagicFocusDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
852
+ MagicFocusDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicFocusDirective, selectors: [["", "magicFocus", ""]] });
853
+ (function () {
944
854
  i0.ɵsetClassMetadata(MagicFocusDirective, [{
945
855
  type: i0.Directive,
946
856
  args: [{
@@ -949,22 +859,18 @@
949
859
  }], function () { return [{ type: i0.ElementRef }]; }, null);
950
860
  })();
951
861
 
952
- /**
953
- * Directive for setting ViewContainerRef on element
954
- */
955
862
  var MagicViewContainerRef = /** @class */ (function () {
956
863
  function MagicViewContainerRef(vcRef, resolver) {
957
864
  this.vcRef = vcRef;
958
865
  this.resolver = resolver;
959
- // For angular 10 - find the component from the views
960
866
  var comp = (this.vcRef._hostView).find(function (v) { return v != null && !util.isNullOrUndefined(v.setViewContainerRef); });
961
867
  comp.setViewContainerRef(vcRef);
962
868
  }
963
869
  return MagicViewContainerRef;
964
870
  }());
965
- /** @nocollapse */ MagicViewContainerRef.ɵfac = function MagicViewContainerRef_Factory(t) { return new (t || MagicViewContainerRef)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
966
- /** @nocollapse */ MagicViewContainerRef.ɵdir = i0.ɵɵdefineDirective({ type: MagicViewContainerRef, selectors: [["", "magicViewContainerRef", ""]] });
967
- /*@__PURE__*/ (function () {
871
+ MagicViewContainerRef.ɵfac = function MagicViewContainerRef_Factory(t) { return new (t || MagicViewContainerRef)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
872
+ MagicViewContainerRef.ɵdir = i0.ɵɵdefineDirective({ type: MagicViewContainerRef, selectors: [["", "magicViewContainerRef", ""]] });
873
+ (function () {
968
874
  i0.ɵsetClassMetadata(MagicViewContainerRef, [{
969
875
  type: i0.Directive,
970
876
  args: [{
@@ -975,29 +881,16 @@
975
881
 
976
882
  var _c0 = ["overlayContainerWrapper"];
977
883
  var MagicOverlayContainerWrapper = /** @class */ (function () {
978
- /**
979
- *
980
- * @param componentFactoryResolver
981
- */
982
884
  function MagicOverlayContainerWrapper(componentListMagicService, loader, injector, componentFactoryResolver, changeDetectorRef) {
983
885
  this.componentListMagicService = componentListMagicService;
984
886
  this.loader = loader;
985
887
  this.injector = injector;
986
888
  this.componentFactoryResolver = componentFactoryResolver;
987
889
  this.changeDetectorRef = changeDetectorRef;
988
- /**
989
- *
990
- */
991
890
  this.Component = null;
992
- /**
993
- *
994
- */
995
891
  this.Parameters = {};
996
892
  this.onClose = new i0.EventEmitter();
997
893
  }
998
- /**
999
- *
1000
- */
1001
894
  MagicOverlayContainerWrapper.prototype.ngOnInit = function () {
1002
895
  var _this = this;
1003
896
  var moduleRef = this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);
@@ -1050,17 +943,13 @@
1050
943
  };
1051
944
  return MagicOverlayContainerWrapper;
1052
945
  }());
1053
- /**
1054
- * @ignore
1055
- * contais data of allowed base components to use
1056
- */
1057
946
  MagicOverlayContainerWrapper.allowedBaseComps = new Map([
1058
947
  [gui.OverlayType.Overlay, { comp: exports.BaseMagicOverlayContainer, error: 'BaseMagicOverlayContainer . Overlay ' }],
1059
948
  [gui.OverlayType.Alert, { comp: BaseMagicAlertComponent, error: 'BaseMagicAlertComponent. Alert ' }],
1060
949
  [gui.OverlayType.ConfirmationBox, { comp: BaseMagicConfirmComponent, error: 'BaseMagicConfirmComponent. Confirmation ' }]
1061
950
  ]);
1062
- /** @nocollapse */ MagicOverlayContainerWrapper.ɵfac = function MagicOverlayContainerWrapper_Factory(t) { return new (t || MagicOverlayContainerWrapper)(i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(i0.NgModuleFactoryLoader), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
1063
- /** @nocollapse */ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainerWrapper, selectors: [["app-magic-overlay-container-wrapper"]], viewQuery: function MagicOverlayContainerWrapper_Query(rf, ctx) {
951
+ MagicOverlayContainerWrapper.ɵfac = function MagicOverlayContainerWrapper_Factory(t) { return new (t || MagicOverlayContainerWrapper)(i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(i0.NgModuleFactoryLoader), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
952
+ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainerWrapper, selectors: [["app-magic-overlay-container-wrapper"]], viewQuery: function MagicOverlayContainerWrapper_Query(rf, ctx) {
1064
953
  if (rf & 1) {
1065
954
  i0.ɵɵstaticViewQuery(_c0, true);
1066
955
  }
@@ -1079,7 +968,7 @@
1079
968
  i0.ɵɵelementEnd();
1080
969
  }
1081
970
  }, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%] {\n \n position: fixed;\n top: 0;\n z-index: 999;\n right: 0;\n bottom: 0;\n left: 0;\n }"] });
1082
- /*@__PURE__*/ (function () {
971
+ (function () {
1083
972
  i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
1084
973
  type: i0.Component,
1085
974
  args: [{
@@ -1101,17 +990,10 @@
1101
990
  }] });
1102
991
  })();
1103
992
 
1104
- /**
1105
- * Displays a message-box
1106
- */
1107
993
  var confirmationBox = /** @class */ (function () {
1108
994
  function confirmationBox() {
1109
995
  }
1110
- /**
1111
- * @ignore
1112
- */
1113
996
  confirmationBox.isConfirmBox = function (style) {
1114
- // button format mask is in first nibble from right
1115
997
  var buttonMode = style & 0x0F;
1116
998
  var isConfirm = (buttonMode === gui.Styles.MSGBOX_BUTTON_OK_CANCEL) ||
1117
999
  (buttonMode === gui.Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE) ||
@@ -1120,14 +1002,7 @@
1120
1002
  (buttonMode === gui.Styles.MSGBOX_BUTTON_RETRY_CANCEL);
1121
1003
  return (isConfirm);
1122
1004
  };
1123
- /**
1124
- * Converts the result from the HTML window to the expected result type
1125
- * @param style Result received from HTML window
1126
- * @param okWasPressed Was the "OK" pressed
1127
- * @returns MessageBox result type
1128
- */
1129
1005
  confirmationBox.convertToExcpectedResultBox = function (style, okWasPressed) {
1130
- // button format mask is in first nibble from right
1131
1006
  var buttonMode = style & 0x0F;
1132
1007
  var retValue = gui.Styles.MSGBOX_RESULT_OK;
1133
1008
  if (buttonMode === gui.Styles.MSGBOX_BUTTON_OK)
@@ -1144,19 +1019,10 @@
1144
1019
  retValue = okWasPressed ? gui.Styles.MSGBOX_RESULT_RETRY : gui.Styles.MSGBOX_RESULT_CANCEL;
1145
1020
  return retValue;
1146
1021
  };
1147
- /**
1148
- * Show a message box as an HTML window
1149
- * @param title Title of the message box
1150
- * @param message Message that will be display in the message box
1151
- * @param style Style that include buttons \ Icons
1152
- * @returns MessageBox result
1153
- */
1154
1022
  confirmationBox.showConfirmationBox = function (title, message, style) {
1155
1023
  var okWasPressed = false;
1156
1024
  var retValue = gui.Styles.MSGBOX_RESULT_OK;
1157
- // check if it is confirmation box
1158
1025
  var isConfirm = this.isConfirmBox(style);
1159
- // the title will be added to the string and we will add new line after the title
1160
1026
  var titleAndString = title + '\n' + '\n' + message;
1161
1027
  if (isConfirm)
1162
1028
  okWasPressed = confirm(titleAndString);
@@ -1164,7 +1030,6 @@
1164
1030
  alert(titleAndString);
1165
1031
  okWasPressed = true;
1166
1032
  }
1167
- // return the result from the user
1168
1033
  return okWasPressed;
1169
1034
  };
1170
1035
  return confirmationBox;
@@ -1198,38 +1063,18 @@
1198
1063
  i0.ɵɵtextInterpolate1(" ", ctx_r2.getText(), " ");
1199
1064
  }
1200
1065
  }
1201
- /**
1202
- * Creates a modal window for Magic modal window components
1203
- */
1204
1066
  var MagicOverlayContainer = /** @class */ (function (_super) {
1205
1067
  __extends(MagicOverlayContainer, _super);
1206
- /**
1207
- *
1208
- * @param injector
1209
- * @param componentFactoryResolver
1210
- */
1211
1068
  function MagicOverlayContainer(injector, componentFactoryResolver) {
1212
1069
  var _this = _super.call(this) || this;
1213
1070
  _this.injector = injector;
1214
1071
  _this.componentFactoryResolver = componentFactoryResolver;
1215
- /**
1216
- *
1217
- */
1218
1072
  _this.ModalComp = null;
1219
- /**
1220
- *
1221
- */
1222
1073
  _this.ModalCompParameters = {};
1223
1074
  _this.onClose = new i0.EventEmitter();
1224
- /**
1225
- *
1226
- */
1227
1075
  _this.componentRef = null;
1228
1076
  return _this;
1229
1077
  }
1230
- /**
1231
- *
1232
- */
1233
1078
  MagicOverlayContainer.prototype.ngOnInit = function () {
1234
1079
  var factory = this.componentFactoryResolver.resolveComponentFactory(this.ModalComp);
1235
1080
  this.componentRef = this.modalbodyViewContainerRef.createComponent(factory);
@@ -1238,10 +1083,6 @@
1238
1083
  MagicOverlayContainer.prototype.setViewContainerRef = function (vcRef) {
1239
1084
  this.modalbodyViewContainerRef = vcRef;
1240
1085
  };
1241
- /**
1242
- * Returns the form name
1243
- * @returns
1244
- */
1245
1086
  MagicOverlayContainer.prototype.getText = function () {
1246
1087
  if (this.componentRef !== null) {
1247
1088
  var comp = this.componentRef.instance;
@@ -1250,10 +1091,6 @@
1250
1091
  else
1251
1092
  return "";
1252
1093
  };
1253
- /**
1254
- * Returns CSS styles for the window
1255
- * @returns
1256
- */
1257
1094
  MagicOverlayContainer.prototype.getStyle = function () {
1258
1095
  var styles = {};
1259
1096
  if (this.componentRef != undefined) {
@@ -1270,10 +1107,6 @@
1270
1107
  }
1271
1108
  return styles;
1272
1109
  };
1273
- /**
1274
- * Returns the CSS styles for the client area
1275
- * @returns
1276
- */
1277
1110
  MagicOverlayContainer.prototype.getClientAreaStyles = function () {
1278
1111
  var styles = {};
1279
1112
  if (this.componentRef != undefined) {
@@ -1289,25 +1122,15 @@
1289
1122
  }
1290
1123
  return styles;
1291
1124
  };
1292
- /**
1293
- * Should the title bar be displayed
1294
- * @returns
1295
- */
1296
1125
  MagicOverlayContainer.prototype.getShowTitleBar = function () {
1297
1126
  if (this.componentRef != undefined) {
1298
1127
  var comp = this.componentRef.instance;
1299
1128
  return comp.ShowTitleBar();
1300
1129
  }
1301
1130
  };
1302
- /**
1303
- *
1304
- */
1305
1131
  MagicOverlayContainer.prototype.OnClose = function () {
1306
1132
  this.onClose.emit();
1307
1133
  };
1308
- /**
1309
- * Handles click in the background window
1310
- */
1311
1134
  MagicOverlayContainer.prototype.OnBackgroundClick = function () {
1312
1135
  var comp = this.componentRef.instance;
1313
1136
  if (comp.ShouldCloseOnBackgroundClick())
@@ -1315,8 +1138,8 @@
1315
1138
  };
1316
1139
  return MagicOverlayContainer;
1317
1140
  }(exports.BaseMagicOverlayContainer));
1318
- /** @nocollapse */ MagicOverlayContainer.ɵfac = function MagicOverlayContainer_Factory(t) { return new (t || MagicOverlayContainer)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
1319
- /** @nocollapse */ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) {
1141
+ MagicOverlayContainer.ɵfac = function MagicOverlayContainer_Factory(t) { return new (t || MagicOverlayContainer)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
1142
+ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) {
1320
1143
  if (rf & 1) {
1321
1144
  i0.ɵɵviewQuery(_c0$1, true);
1322
1145
  i0.ɵɵviewQuery(_c1, true);
@@ -1352,7 +1175,7 @@
1352
1175
  i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
1353
1176
  }
1354
1177
  }, directives: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{background-color:#fff}.modal-background[_ngcontent-%COMP%], .modal-foreground[_ngcontent-%COMP%]{bottom:0;left:0;position:fixed;right:0;top:0}.modal-background[_ngcontent-%COMP%]{background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
1355
- /*@__PURE__*/ (function () {
1178
+ (function () {
1356
1179
  i0.ɵsetClassMetadata(MagicOverlayContainer, [{
1357
1180
  type: i0.Component,
1358
1181
  args: [{
@@ -1375,10 +1198,6 @@
1375
1198
  }] });
1376
1199
  })();
1377
1200
 
1378
- /**
1379
- * Service managing overlay windows
1380
- * This is Magic's default provider
1381
- */
1382
1201
  var OverlayContainerMagicProvider = /** @class */ (function () {
1383
1202
  function OverlayContainerMagicProvider() {
1384
1203
  }
@@ -1387,17 +1206,14 @@
1387
1206
  };
1388
1207
  return OverlayContainerMagicProvider;
1389
1208
  }());
1390
- /** @nocollapse */ OverlayContainerMagicProvider.ɵfac = function OverlayContainerMagicProvider_Factory(t) { return new (t || OverlayContainerMagicProvider)(); };
1391
- /** @nocollapse */ OverlayContainerMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayContainerMagicProvider, factory: OverlayContainerMagicProvider.ɵfac });
1392
- /*@__PURE__*/ (function () {
1209
+ OverlayContainerMagicProvider.ɵfac = function OverlayContainerMagicProvider_Factory(t) { return new (t || OverlayContainerMagicProvider)(); };
1210
+ OverlayContainerMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayContainerMagicProvider, factory: OverlayContainerMagicProvider.ɵfac });
1211
+ (function () {
1393
1212
  i0.ɵsetClassMetadata(OverlayContainerMagicProvider, [{
1394
1213
  type: i0.Injectable
1395
1214
  }], null, null);
1396
1215
  })();
1397
1216
 
1398
- /***
1399
- * This is sample component for the alert message
1400
- */
1401
1217
  var MagicAlertComponent = /** @class */ (function (_super) {
1402
1218
  __extends(MagicAlertComponent, _super);
1403
1219
  function MagicAlertComponent() {
@@ -1405,8 +1221,8 @@
1405
1221
  }
1406
1222
  return MagicAlertComponent;
1407
1223
  }(BaseMagicAlertComponent));
1408
- /** @nocollapse */ MagicAlertComponent.ɵfac = function MagicAlertComponent_Factory(t) { return ɵMagicAlertComponent_BaseFactory(t || MagicAlertComponent); };
1409
- /** @nocollapse */ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent, selectors: [["sample-magic-alert-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 2, consts: [[1, "mg-message-background"], [3, "click"]], template: function MagicAlertComponent_Template(rf, ctx) {
1224
+ MagicAlertComponent.ɵfac = function MagicAlertComponent_Factory(t) { return ɵMagicAlertComponent_BaseFactory(t || MagicAlertComponent); };
1225
+ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent, selectors: [["sample-magic-alert-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 2, consts: [[1, "mg-message-background"], [3, "click"]], template: function MagicAlertComponent_Template(rf, ctx) {
1410
1226
  if (rf & 1) {
1411
1227
  i0.ɵɵelementStart(0, "div");
1412
1228
  i0.ɵɵelementStart(1, "div", 0);
@@ -1430,8 +1246,8 @@
1430
1246
  i0.ɵɵtextInterpolate1("", ctx.message, " ");
1431
1247
  }
1432
1248
  }, styles: [".mg-message-background[_ngcontent-%COMP%] {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button[_ngcontent-%COMP%] {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }"] });
1433
- var ɵMagicAlertComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(MagicAlertComponent);
1434
- /*@__PURE__*/ (function () {
1249
+ var ɵMagicAlertComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicAlertComponent);
1250
+ (function () {
1435
1251
  i0.ɵsetClassMetadata(MagicAlertComponent, [{
1436
1252
  type: i0.Component,
1437
1253
  args: [{
@@ -1442,9 +1258,6 @@
1442
1258
  }], null, null);
1443
1259
  })();
1444
1260
 
1445
- /***
1446
- * This is sample component for the confirmation box
1447
- */
1448
1261
  var MagicConfirmationBoxComponent = /** @class */ (function (_super) {
1449
1262
  __extends(MagicConfirmationBoxComponent, _super);
1450
1263
  function MagicConfirmationBoxComponent() {
@@ -1452,8 +1265,8 @@
1452
1265
  }
1453
1266
  return MagicConfirmationBoxComponent;
1454
1267
  }(BaseMagicConfirmComponent));
1455
- /** @nocollapse */ MagicConfirmationBoxComponent.ɵfac = function MagicConfirmationBoxComponent_Factory(t) { return ɵMagicConfirmationBoxComponent_BaseFactory(t || MagicConfirmationBoxComponent); };
1456
- /** @nocollapse */ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfirmationBoxComponent, selectors: [["sample-magic-confirmation-box"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 2, consts: [[1, "mg-message-background"], [3, "click"], [1, "cancel", 3, "click"]], template: function MagicConfirmationBoxComponent_Template(rf, ctx) {
1268
+ MagicConfirmationBoxComponent.ɵfac = function MagicConfirmationBoxComponent_Factory(t) { return ɵMagicConfirmationBoxComponent_BaseFactory(t || MagicConfirmationBoxComponent); };
1269
+ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfirmationBoxComponent, selectors: [["sample-magic-confirmation-box"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 2, consts: [[1, "mg-message-background"], [3, "click"], [1, "cancel", 3, "click"]], template: function MagicConfirmationBoxComponent_Template(rf, ctx) {
1457
1270
  if (rf & 1) {
1458
1271
  i0.ɵɵelementStart(0, "div");
1459
1272
  i0.ɵɵelementStart(1, "div", 0);
@@ -1481,8 +1294,8 @@
1481
1294
  i0.ɵɵtextInterpolate1(" ", ctx.message, " ");
1482
1295
  }
1483
1296
  }, styles: [".mg-message-background[_ngcontent-%COMP%] {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button[_ngcontent-%COMP%] {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n \n button.cancel[_ngcontent-%COMP%] {\n background-color: #C1C1C1;\n }"] });
1484
- var ɵMagicConfirmationBoxComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(MagicConfirmationBoxComponent);
1485
- /*@__PURE__*/ (function () {
1297
+ var ɵMagicConfirmationBoxComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicConfirmationBoxComponent);
1298
+ (function () {
1486
1299
  i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
1487
1300
  type: i0.Component,
1488
1301
  args: [{
@@ -1493,51 +1306,28 @@
1493
1306
  }], null, null);
1494
1307
  })();
1495
1308
 
1496
- /**
1497
- * Service managing overlay windows
1498
- * This is Magic's default provider
1499
- */
1500
- /**
1501
- * Service managing alert and confirmation windows
1502
- * This is Magic's default provider
1503
- */
1504
1309
  var ConfirmationComponentsMagicProvider = /** @class */ (function () {
1505
1310
  function ConfirmationComponentsMagicProvider() {
1506
1311
  }
1507
- /**
1508
- * Return true when use default javascript alert and confirmation or return false to provide custom components
1509
- * @returns true is we want to use default javascript alert and confirmation
1510
- */
1511
1312
  ConfirmationComponentsMagicProvider.prototype.showDefaultConfirmations = function () {
1512
1313
  return true;
1513
1314
  };
1514
- /**
1515
- * Returns component that will replace javascript alert. The component will be used only if showDefaultConfirmations = false
1516
- * @returns component that will replace javascript Alert
1517
- */
1518
1315
  ConfirmationComponentsMagicProvider.prototype.getAlertComponent = function () {
1519
1316
  return MagicAlertComponent;
1520
1317
  };
1521
- /**
1522
- * Returns component that will replace javascript confirmation box. The component will be used only if showDefaultConfirmations = false
1523
- * @returns component that will replace javascript confirmation box
1524
- */
1525
1318
  ConfirmationComponentsMagicProvider.prototype.getConfirmtionComponent = function () {
1526
1319
  return MagicConfirmationBoxComponent;
1527
1320
  };
1528
1321
  return ConfirmationComponentsMagicProvider;
1529
1322
  }());
1530
- /** @nocollapse */ ConfirmationComponentsMagicProvider.ɵfac = function ConfirmationComponentsMagicProvider_Factory(t) { return new (t || ConfirmationComponentsMagicProvider)(); };
1531
- /** @nocollapse */ ConfirmationComponentsMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: ConfirmationComponentsMagicProvider, factory: ConfirmationComponentsMagicProvider.ɵfac });
1532
- /*@__PURE__*/ (function () {
1323
+ ConfirmationComponentsMagicProvider.ɵfac = function ConfirmationComponentsMagicProvider_Factory(t) { return new (t || ConfirmationComponentsMagicProvider)(); };
1324
+ ConfirmationComponentsMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: ConfirmationComponentsMagicProvider, factory: ConfirmationComponentsMagicProvider.ɵfac });
1325
+ (function () {
1533
1326
  i0.ɵsetClassMetadata(ConfirmationComponentsMagicProvider, [{
1534
1327
  type: i0.Injectable
1535
1328
  }], null, null);
1536
1329
  })();
1537
1330
 
1538
- /**
1539
- * Service managing overlay windows
1540
- */
1541
1331
  var OverlayWindowService = /** @class */ (function () {
1542
1332
  function OverlayWindowService(componentFactoryResolver, componentList, engineMagicService, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
1543
1333
  this.componentFactoryResolver = componentFactoryResolver;
@@ -1553,7 +1343,6 @@
1553
1343
  };
1554
1344
  OverlayWindowService.prototype.open = function (formName, taskId, taskDescription) {
1555
1345
  var _this = this;
1556
- // for overlay which are lazy loaded don't find data in component-list
1557
1346
  var comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null : this.componentList.getComponent(formName);
1558
1347
  var parameters = { taskIdParam: taskId, taskDescription: taskDescription };
1559
1348
  var componentRef = this.createModalComponent({ MagicFormName: formName, ModalComp: comp, ModalCompParameters: parameters }, this.overlayContainerMagicProvider.getComponent(), gui.OverlayType.Overlay);
@@ -1564,28 +1353,19 @@
1564
1353
  });
1565
1354
  };
1566
1355
  OverlayWindowService.prototype.close = function (commandStr) {
1567
- // Close the overlay by removing the overlay window from its container
1568
1356
  this.overlayWindowsContainerViewRef.remove();
1569
1357
  this.overlayWindowFocusManager.popDialog();
1570
1358
  var guiEvent1 = engine.getGuiEventObj("dispose", null, 0);
1571
1359
  guiEvent1.TaskID = commandStr;
1572
1360
  this.engineMagicService.insertEvent(guiEvent1);
1573
1361
  };
1574
- /**
1575
- * Open Confirmation box
1576
- * @param title title of the box
1577
- * @param msg message
1578
- * @param style Magic style
1579
- */
1580
1362
  OverlayWindowService.prototype.openConfirmationBox = function (title, msg, style) {
1581
1363
  var _this = this;
1582
- //show default confirmations
1583
1364
  if (this.confirmationComponentsMagicProvider.showDefaultConfirmations()) {
1584
1365
  var res = confirmationBox.showConfirmationBox(title, msg, style);
1585
1366
  this.finishConfirmation(style, res);
1586
1367
  }
1587
1368
  else {
1588
- //show custom confirmations
1589
1369
  var comp = confirmationBox.isConfirmBox(style) ? this.confirmationComponentsMagicProvider.getConfirmtionComponent() : this.confirmationComponentsMagicProvider.getAlertComponent();
1590
1370
  var overlayType = confirmationBox.isConfirmBox(style) ? gui.OverlayType.ConfirmationBox : gui.OverlayType.Alert;
1591
1371
  var componentRef = this.createModalComponent({ title: title, message: msg }, comp, overlayType);
@@ -1596,21 +1376,11 @@
1596
1376
  });
1597
1377
  }
1598
1378
  };
1599
- /**
1600
- * This method is called on close of the confirmation
1601
- * @param style Magic style
1602
- * @param result
1603
- */
1604
1379
  OverlayWindowService.prototype.finishConfirmation = function (style, result) {
1605
1380
  var guiEvent = engine.getGuiEventObj("confirmationClosed", null, 0);
1606
1381
  guiEvent.keyCode = confirmationBox.convertToExcpectedResultBox(style, result);
1607
1382
  this.engineMagicService.insertEvent(guiEvent);
1608
1383
  };
1609
- /**
1610
- * creates a modal component. Can be used for overlay, message box or confirmation box
1611
- * @param parameters component's parameters
1612
- * @param component components to create
1613
- */
1614
1384
  OverlayWindowService.prototype.createModalComponent = function (parameters, component, overlayType) {
1615
1385
  var componentRef;
1616
1386
  var magicModalContainerParameters = {
@@ -1618,11 +1388,9 @@
1618
1388
  Parameters: parameters,
1619
1389
  OverlayTypeParam: overlayType
1620
1390
  };
1621
- // Create the UI component of modal window
1622
1391
  var factory = this.componentFactoryResolver.resolveComponentFactory(MagicOverlayContainerWrapper);
1623
1392
  var viewCRef = this.overlayWindowsContainerViewRef;
1624
1393
  componentRef = viewCRef.createComponent(factory);
1625
- // Set the data to newly created component
1626
1394
  Object.assign(componentRef.instance, magicModalContainerParameters);
1627
1395
  this.overlayWindowFocusManager.pushDialog(componentRef.instance.GetRootElement());
1628
1396
  componentRef.instance.DetectChanges();
@@ -1630,9 +1398,9 @@
1630
1398
  };
1631
1399
  return OverlayWindowService;
1632
1400
  }());
1633
- /** @nocollapse */ OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayContainerMagicProvider), i0.ɵɵinject(ConfirmationComponentsMagicProvider)); };
1634
- /** @nocollapse */ OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac });
1635
- /*@__PURE__*/ (function () {
1401
+ OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayContainerMagicProvider), i0.ɵɵinject(ConfirmationComponentsMagicProvider)); };
1402
+ OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac });
1403
+ (function () {
1636
1404
  i0.ɵsetClassMetadata(OverlayWindowService, [{
1637
1405
  type: i0.Injectable
1638
1406
  }], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null);
@@ -1765,103 +1533,45 @@
1765
1533
  return DialogInfo;
1766
1534
  }());
1767
1535
 
1768
- /**
1769
- * Main service to connect the UI with the Magic WebCLient
1770
- */
1771
1536
  var TaskMagicService = /** @class */ (function () {
1772
- /**
1773
- *
1774
- * @param magic
1775
- */
1776
1537
  function TaskMagicService(magic, overlayWindowService) {
1777
1538
  this.magic = magic;
1778
1539
  this.overlayWindowService = overlayWindowService;
1779
- /**
1780
- * Collection of data for all controls
1781
- */
1782
1540
  this.Records = new Records();
1783
- /**
1784
- * FormGroup collection for line mode
1785
- */
1786
1541
  this.formGroups = [];
1787
- /**
1788
- * @ignore
1789
- */
1790
1542
  this.refreshDom = new rxjs.Subject();
1791
- /**
1792
- * @ignore
1793
- */
1794
1543
  this.detectChanges = new rxjs.Subject();
1795
- /**
1796
- * @ignore
1797
- */
1798
1544
  this.interactiveCommands = new rxjs.Subject();
1799
- /**
1800
- * @ignore
1801
- * This event is emitted when the selected row in a table changes.
1802
- */
1803
1545
  this.OnSelectedRowChanged = new i0.EventEmitter();
1804
- /**
1805
- * @ignore
1806
- */
1807
1546
  this.customPropertiesSubject = new rxjs.Subject();
1808
- /**
1809
- * @ignore
1810
- */
1811
1547
  this.recordsCountChangeSubject = new rxjs.Subject();
1812
- /**
1813
- * @ignore
1814
- */
1815
1548
  this.oldPageSize = 0;
1816
1549
  this.Records.setGuiTopIndex(0);
1817
1550
  this.mgInputDateFormat = null;
1818
1551
  }
1819
- /**
1820
- * returns true if used is logged in
1821
- * @returns
1822
- */
1823
1552
  TaskMagicService.prototype.getIsLoggenIn = function () {
1824
1553
  return this.magic.getIsLoggedIn();
1825
1554
  };
1826
1555
  Object.defineProperty(TaskMagicService.prototype, "taskId", {
1827
- /**
1828
- * returns the task Id
1829
- * @returns
1830
- */
1831
1556
  get: function () {
1832
1557
  return this._taskId;
1833
1558
  },
1834
- /**
1835
- * Sets the task Id
1836
- * @param value the task id to set
1837
- */
1838
1559
  set: function (value) {
1839
- // debugger;
1840
1560
  this._taskId = value;
1841
1561
  },
1842
1562
  enumerable: false,
1843
1563
  configurable: true
1844
1564
  });
1845
1565
  Object.defineProperty(TaskMagicService.prototype, "ScreenControlsData", {
1846
- /**
1847
- * Returns the task's data in Screen mode
1848
- * @returns
1849
- */
1850
1566
  get: function () {
1851
1567
  return this.Records.list['0'];
1852
1568
  },
1853
1569
  enumerable: false,
1854
1570
  configurable: true
1855
1571
  });
1856
- /**
1857
- * @ignore
1858
- */
1859
1572
  TaskMagicService.prototype.settemplate = function (value) {
1860
1573
  this.template = value;
1861
1574
  };
1862
- /**
1863
- * Builds the FormControl for each and every control
1864
- */
1865
1575
  TaskMagicService.prototype.buildScreenModeControls = function () {
1866
1576
  var group = new forms.FormGroup({});
1867
1577
  for (var key in this.template) {
@@ -1873,21 +1583,10 @@
1873
1583
  }
1874
1584
  this.ScreenModeControls = group;
1875
1585
  };
1876
- /**
1877
- * Is the control a table control
1878
- * @param id Id of the control
1879
- * @returns
1880
- */
1881
1586
  TaskMagicService.prototype.isTableControl = function (id) {
1882
1587
  return this.template[id] == '1';
1883
1588
  };
1884
1589
  TaskMagicService.prototype.getMgInputDateFormat = function () { return this.mgInputDateFormat; };
1885
- /**
1886
- * Returns the FormControl of a control
1887
- * @param guiRowid Id of the requested row
1888
- * @param id Id of the control
1889
- * @returns
1890
- */
1891
1590
  TaskMagicService.prototype.getFormControl = function (guiRowid, id) {
1892
1591
  var c;
1893
1592
  var group = this.isTableControl(id) ? this.formGroups[guiRowid] : this.ScreenModeControls;
@@ -1897,21 +1596,12 @@
1897
1596
  }
1898
1597
  return c;
1899
1598
  };
1900
- /**
1901
- * handle the change of text for input control inside table
1902
- * @param guiRowId Id of the row for which the FormControls are built
1903
- * set the new value of the formcontrol
1904
- */
1905
1599
  TaskMagicService.prototype.setInputTextValue = function (controlId, guiRowid, val) {
1906
1600
  this.setValue(controlId, guiRowid, this.ConvertValToNative(controlId, 0, val));
1907
1601
  var fc = this.getFormControl(guiRowid, controlId);
1908
1602
  if (!util.isNullOrUndefined(val))
1909
1603
  fc.setValue(val);
1910
1604
  };
1911
- /**
1912
- * Build the FormControls for a table row
1913
- * @param guiRowId Id of the row for which the FormControls are built
1914
- */
1915
1605
  TaskMagicService.prototype.buildTableRowControls = function (guiRowId) {
1916
1606
  var group = new forms.FormGroup({});
1917
1607
  for (var key in this.template) {
@@ -1923,58 +1613,30 @@
1923
1613
  }
1924
1614
  this.formGroups[guiRowId] = group;
1925
1615
  };
1926
- /**
1927
- *
1928
- * @ignore
1929
- */
1930
1616
  TaskMagicService.prototype.updateRecordsBeforeCurrentView = function (value) {
1931
1617
  this.Records.recordsBeforeCurrentView = value;
1932
1618
  };
1933
- /**
1934
- * @ignore
1935
- */
1936
1619
  TaskMagicService.prototype.setIncludesFirst = function (value) {
1937
1620
  this.Records.includesFirst = value;
1938
1621
  };
1939
- /**
1940
- * @ignore
1941
- */
1942
1622
  TaskMagicService.prototype.setIncludesLast = function (value) {
1943
1623
  this.Records.includesLast = value;
1944
1624
  };
1945
- /**
1946
- * @ignore
1947
- */
1948
1625
  TaskMagicService.prototype.markRowAsCreated = function (guiRowId) {
1949
1626
  this.Records.markRowAsCreated(guiRowId);
1950
1627
  };
1951
- /**
1952
- * @ignore
1953
- */
1954
1628
  TaskMagicService.prototype.markRowAsNotCreated = function (guiRowId) {
1955
1629
  this.Records.markRowAsNotCreated(guiRowId);
1956
1630
  };
1957
- /**
1958
- * @ignore
1959
- */
1960
1631
  TaskMagicService.prototype.startRowEditing = function (guiRowId) {
1961
1632
  this.Records.startRowEditing(guiRowId);
1962
1633
  };
1963
- /**
1964
- * @ignore
1965
- */
1966
1634
  TaskMagicService.prototype.stopRowEditing = function (guiRowId) {
1967
1635
  this.Records.stopRowEditing(guiRowId);
1968
1636
  };
1969
- /**
1970
- * @ignore
1971
- */
1972
1637
  TaskMagicService.prototype.isRowInRowEditing = function (guiRowId) {
1973
1638
  return this.Records.isRowInRowEditing(guiRowId);
1974
1639
  };
1975
- /**
1976
- * @ignore
1977
- */
1978
1640
  TaskMagicService.prototype.setIsEmptyDataView = function (isEmpty) {
1979
1641
  if (this.Records.isEmptyDataView !== isEmpty) {
1980
1642
  if (isEmpty)
@@ -1984,11 +1646,6 @@
1984
1646
  this.refreshView();
1985
1647
  }
1986
1648
  };
1987
- /**
1988
- * Initialize the service to work with the task
1989
- * @param taskId Id of the task
1990
- * @param taskDescription
1991
- */
1992
1649
  TaskMagicService.prototype.initTask = function (taskId, taskDescription) {
1993
1650
  var _this = this;
1994
1651
  this.Records.createFirst();
@@ -2001,71 +1658,39 @@
2001
1658
  this.settemplate(taskDescription);
2002
1659
  }
2003
1660
  this.buildScreenModeControls();
2004
- // remove previous subscriptions
2005
1661
  if (!util.isNullOrUndefined(this.subscribeRefreshDom))
2006
1662
  this.subscribeRefreshDom.unsubscribe();
2007
1663
  if (!util.isNullOrUndefined(this.subscribeInteractiveCommands))
2008
1664
  this.subscribeInteractiveCommands.unsubscribe();
2009
1665
  this.subscribeRefreshDom = this.magic.refreshDom.pipe(operators.filter(function (command) { return command.TaskTag === _this.taskId; }))
2010
1666
  .subscribe(function (command) {
2011
- // console.log("Task " + command.TaskTag + "command " + command.CommandType);
2012
1667
  _this.executeCommand(command);
2013
1668
  });
2014
1669
  this.subscribeInteractiveCommands = this.magic.interactiveCommands
2015
1670
  .pipe(operators.filter(function (command) { return command.TaskTag === _this.taskId; }))
2016
1671
  .subscribe(function (command) {
2017
- // console.log("Task " + command.TaskTag + "command " + command.CommandType);
2018
1672
  _this.executeInteractiveCommand(command);
2019
1673
  });
2020
1674
  };
2021
- /**
2022
- * @ignore
2023
- */
2024
1675
  TaskMagicService.prototype.refreshView = function () {
2025
1676
  this.detectChanges.next('');
2026
1677
  };
2027
- /**
2028
- * Insert an event to the Magic WebClient event queue
2029
- * @param guiEvent The event to insert
2030
- */
2031
1678
  TaskMagicService.prototype.insertEvent = function (guiEvent) {
2032
1679
  guiEvent.TaskID = this.taskId;
2033
1680
  this.magic.insertEvent(guiEvent);
2034
1681
  };
2035
- /**
2036
- * @ignore
2037
- */
2038
1682
  TaskMagicService.prototype.GetControlPictureMask = function (controlName) {
2039
1683
  return this.magic.GetControlPictureMask(this.taskId, controlName);
2040
1684
  };
2041
- /**
2042
- * Validates the control value, using the Magic WebClient
2043
- * @param controlName Id of validated control
2044
- * @param value value to be validated
2045
- * @returns If validation fails, returns error message, else returns null
2046
- */
2047
1685
  TaskMagicService.prototype.ValidateControlValue = function (controlName, value) {
2048
1686
  return this.magic.ValidateControlValue(this.taskId, controlName, value);
2049
1687
  };
2050
- /**
2051
- * @ignore
2052
- */
2053
1688
  TaskMagicService.prototype.GetRangedValue = function (controlName, value) {
2054
1689
  return this.magic.GetRangedValue(this.taskId, controlName, value);
2055
1690
  };
2056
- /**
2057
- * @ignore
2058
- */
2059
1691
  TaskMagicService.prototype.GetFldRanges = function (controlName) {
2060
1692
  return this.magic.GetFldRanges(this.taskId, controlName);
2061
1693
  };
2062
- /**
2063
- * returns the value of a property of the control
2064
- * @param controlId Id of control
2065
- * @param prop Property
2066
- * @param guiRowId Row Id, if applicable
2067
- * @returns Property value
2068
- */
2069
1694
  TaskMagicService.prototype.getProperty = function (controlId, prop, guiRowId) {
2070
1695
  if (util.isNullOrUndefined(guiRowId))
2071
1696
  guiRowId = '0';
@@ -2079,9 +1704,6 @@
2079
1704
  return this.Records.list[guiRowId].getProperty(controlId, prop);
2080
1705
  }
2081
1706
  };
2082
- /**
2083
- * @ignore
2084
- */
2085
1707
  TaskMagicService.prototype.getPropertyStub = function (ControlsProperties, controlId, prop) {
2086
1708
  ControlsProperties = ControlsProperties.ControlsProperties;
2087
1709
  if (controlId in ControlsProperties) {
@@ -2091,31 +1713,15 @@
2091
1713
  }
2092
1714
  return '';
2093
1715
  };
2094
- /**
2095
- * @ignore
2096
- */
2097
1716
  TaskMagicService.prototype.getStyleStub = function (ControlsProperties, controlId, styleName) {
2098
1717
  ControlsProperties = ControlsProperties.ControlsProperties;
2099
1718
  return ControlsProperties[controlId].stylesMap.get(styleName);
2100
1719
  };
2101
- /**
2102
- * Return the CSS classes used for this control
2103
- * @param controlId Id of control
2104
- * @param guiRowId Row Id, if applicable
2105
- * @returns String containing the classes currently defined for this control
2106
- */
2107
1720
  TaskMagicService.prototype.getClasses = function (controlId, guiRowId) {
2108
1721
  if (util.isNullOrUndefined(guiRowId))
2109
1722
  guiRowId = '0';
2110
1723
  return this.Records.list[guiRowId].getControlMetadata(controlId).classes;
2111
1724
  };
2112
- /**
2113
- * Return the value of a style used for a control
2114
- * @param controlId Id of control
2115
- * @param styleName Name of style
2116
- * @param guiRowId Row Id, if applicable
2117
- * @returns value of style of the control
2118
- */
2119
1725
  TaskMagicService.prototype.getStyle = function (controlId, styleName, guiRowId) {
2120
1726
  if (util.isNullOrUndefined(guiRowId))
2121
1727
  guiRowId = '0';
@@ -2126,36 +1732,21 @@
2126
1732
  return StylesMapManager.magicValueGetStyle(styleName, magicValue);
2127
1733
  }
2128
1734
  };
2129
- /**
2130
- * Return the value of a control
2131
- * @param controlId Id of control
2132
- * @param guiRowId Row Id, if applicable
2133
- * @returns value of the control
2134
- */
2135
1735
  TaskMagicService.prototype.getValue = function (controlId, guiRowId) {
2136
1736
  if (util.isNullOrUndefined(guiRowId))
2137
1737
  guiRowId = '0';
2138
1738
  return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';
2139
1739
  };
2140
- /**
2141
- * Sets the value of a control
2142
- * @param controlId Id of control
2143
- * @param guiRowId Row Id, if applicable
2144
- * @param value Value to set
2145
- */
1740
+ TaskMagicService.prototype.getFormattedValue = function (controlName, val) {
1741
+ return this.magic.GetFormattedValue(this.taskId, controlName, val);
1742
+ };
2146
1743
  TaskMagicService.prototype.setValue = function (controlId, guiRowId, value) {
2147
1744
  return this.Records.list[guiRowId].setValue(controlId, value);
2148
1745
  };
2149
- /**
2150
- * @ignore
2151
- */
2152
1746
  TaskMagicService.prototype.executeInteractiveCommand = function (guiInteractiveCommand) {
2153
1747
  GuiInteractiveExecutor.executeInteractiveCommand(this, guiInteractiveCommand, this.overlayWindowService);
2154
1748
  this.interactiveCommands.next(guiInteractiveCommand);
2155
1749
  };
2156
- /**
2157
- * @ignore
2158
- */
2159
1750
  TaskMagicService.prototype.handleSetProperty = function (command, isTableChild) {
2160
1751
  var controlId = command.CtrlName;
2161
1752
  var dvRowId = (command.line || 0);
@@ -2192,7 +1783,6 @@
2192
1783
  var controlId = command.CtrlName;
2193
1784
  var properties;
2194
1785
  var isTableChild = this.isTableControl(controlId);
2195
- // For non-input type controls on table.
2196
1786
  if (command.obj !== null)
2197
1787
  isTableChild = isTableChild || command.obj.IsTableChild;
2198
1788
  guiRowId = this.getGuiRowId(dvRowId, isTableChild);
@@ -2243,13 +1833,13 @@
2243
1833
  break;
2244
1834
  case gui.CommandType.SET_PROPERTY:
2245
1835
  this.handleSetProperty(command, isTableChild);
1836
+ if (command.Operation == gui.HtmlProperties.ReadOnly)
1837
+ this.refreshDom.next(command);
2246
1838
  break;
2247
1839
  case gui.CommandType.PROP_SET_USER_PROPERTY:
2248
1840
  properties = this.Records.list[guiRowId].getControlMetadata(controlId);
2249
- // if the property has changed, set the property and raise the subject
2250
1841
  if (properties.userProperties.get(command.Operation) !== command.obj1) {
2251
1842
  properties.userProperties.set(command.Operation, command.obj1);
2252
- // the property name is of format <controlName>~<propertyName>
2253
1843
  this.customPropertiesSubject.next({ propertyName: controlId + '~' + command.Operation, value: command.obj1, rowId: guiRowId });
2254
1844
  }
2255
1845
  break;
@@ -2294,12 +1884,11 @@
2294
1884
  case gui.CommandType.SET_EMPTY_DATAVIEW:
2295
1885
  this.setIsEmptyDataView(command.Bool1);
2296
1886
  break;
1887
+ case gui.CommandType.SET_FOCUS:
1888
+ this.refreshDom.next(command);
1889
+ break;
2297
1890
  }
2298
- this.refreshDom.next(command);
2299
1891
  };
2300
- /**
2301
- custom validator
2302
- */
2303
1892
  TaskMagicService.prototype.customValidator = function (rowid, id) {
2304
1893
  var _this = this;
2305
1894
  return function (control) {
@@ -2325,13 +1914,6 @@
2325
1914
  return null;
2326
1915
  };
2327
1916
  };
2328
- /**
2329
- * COnvert a value from Magic format to native format
2330
- * @param controlId Id of control
2331
- * @param rowId Row Id, if applicable
2332
- * @param val Value to convert
2333
- * @returns Converted value
2334
- */
2335
1917
  TaskMagicService.prototype.ConvertValToNative = function (controlId, rowId, val) {
2336
1918
  var properties;
2337
1919
  properties = this.Records.list[0].getControlMetadata(controlId);
@@ -2380,13 +1962,6 @@
2380
1962
  return val;
2381
1963
  }
2382
1964
  };
2383
- /**
2384
- * Convert a value from native to Magic format
2385
- * @param controlId Id of control
2386
- * @param rowId Row Id, if applicable
2387
- * @param val Value to convert
2388
- * @returns Converted value
2389
- */
2390
1965
  TaskMagicService.prototype.ConvertValFromNative = function (controlId, rowId, val) {
2391
1966
  var properties;
2392
1967
  properties = this.Records.list[0].getControlMetadata(controlId);
@@ -2429,22 +2004,12 @@
2429
2004
  return val;
2430
2005
  }
2431
2006
  };
2432
- /**
2433
- * Handle resize and also fetch chunk of records if having an empty view.
2434
- * @ignore
2435
- * @param pageSize : PageSize
2436
- * @param topGuiRowId : GuiRowId of first record in view.
2437
- */
2438
2007
  TaskMagicService.prototype.resize = function (pageSize, topGuiRowId) {
2439
2008
  var guiEvent = engine.getGuiEventObj('resize', 'table', 0);
2440
2009
  guiEvent.PageSize = pageSize;
2441
- //As 'getRows' event also gets executed, set the guiEvent.Line parameter.
2442
2010
  guiEvent.Line = topGuiRowId;
2443
2011
  this.insertEvent(guiEvent);
2444
2012
  };
2445
- /**
2446
- * Fetches data for new table rows when scrolling done
2447
- */
2448
2013
  TaskMagicService.prototype.onScrollDown = function () {
2449
2014
  if (!this.Records.includesLast) {
2450
2015
  var guiEvent = engine.getGuiEventObj('getRows', 'table', 0);
@@ -2452,29 +2017,15 @@
2452
2017
  this.insertEvent(guiEvent);
2453
2018
  }
2454
2019
  };
2455
- /**
2456
- * Sets the new browser window title
2457
- * @param newTitle New window title
2458
- */
2459
2020
  TaskMagicService.prototype.setTitle = function (newTitle) {
2460
2021
  this.mgTitleService.setTitle(newTitle);
2461
2022
  };
2462
- /**
2463
- * @ignore
2464
- */
2465
2023
  TaskMagicService.prototype.getGuiRowId = function (dvRowId, isTableControl) {
2466
2024
  return (isTableControl ? dvRowId + this.Records.recordsBeforeCurrentView : 0);
2467
2025
  };
2468
- /**
2469
- *
2470
- * @ignore
2471
- */
2472
2026
  TaskMagicService.prototype.getDvRowId = function (guiRowId) {
2473
2027
  return (guiRowId - this.Records.recordsBeforeCurrentView);
2474
2028
  };
2475
- /**
2476
- * Clean up the service when it is no longer needed
2477
- */
2478
2029
  TaskMagicService.prototype.dispose = function () {
2479
2030
  this.refreshDom.complete();
2480
2031
  this.detectChanges.complete();
@@ -2484,14 +2035,6 @@
2484
2035
  this.customPropertiesSubject.complete();
2485
2036
  this.OnSelectedRowChanged.complete();
2486
2037
  };
2487
- ///////////////////////////////
2488
- //Events:
2489
- /**
2490
- * Handle the Combobox "change" event
2491
- * @param event The event received from the UI
2492
- * @param idx Id of the control raising the event
2493
- * @param line Row Id, if applicable
2494
- */
2495
2038
  TaskMagicService.prototype.onComboboxSelectionChanged = function (event, idx, line) {
2496
2039
  var guiEvent = engine.getGuiEventObj('selectionchanged', idx, line);
2497
2040
  if (typeof (event) == 'number') {
@@ -2510,11 +2053,6 @@
2510
2053
  }
2511
2054
  this.insertEvent(guiEvent);
2512
2055
  };
2513
- /**
2514
- * Handle the Listbox "change" event
2515
- * @param event The event received from the UI
2516
- * @param idx Id of the control raising the event
2517
- */
2518
2056
  TaskMagicService.prototype.onListBoxSelectionChanged = function (event, idx) {
2519
2057
  var guiEvent = engine.getGuiEventObj('selectionchanged', idx, 0);
2520
2058
  var selectedOptions;
@@ -2530,15 +2068,9 @@
2530
2068
  else
2531
2069
  indexes[i] = (selectedOptions[i]).value;
2532
2070
  }
2533
- guiEvent.Value = indexes; // TODO: fix
2071
+ guiEvent.Value = indexes;
2534
2072
  this.insertEvent(guiEvent);
2535
2073
  };
2536
- /**
2537
- * Handle the Checkbox "change" event
2538
- * @param event The event received from the UI
2539
- * @param idx Id of the control raising the event
2540
- * @param rowId Row Id, if applicable
2541
- */
2542
2074
  TaskMagicService.prototype.onCheckChanged = function (event, idx, rowId) {
2543
2075
  if (typeof rowId === 'undefined')
2544
2076
  rowId = 0;
@@ -2554,21 +2086,11 @@
2554
2086
  }
2555
2087
  this.insertEvent(guiEvent);
2556
2088
  };
2557
- /**
2558
- * Handle tab selection change, caused by UI events
2559
- * @param idx Id of the control raising the event
2560
- * @param layer Id of selected tabpage
2561
- */
2562
2089
  TaskMagicService.prototype.mgOnTabSelectionChanged = function (idx, layer) {
2563
2090
  var guiEvent = engine.getGuiEventObj('selectionchanged', idx, 0);
2564
2091
  guiEvent.Value = layer.toString();
2565
2092
  this.insertEvent(guiEvent);
2566
2093
  };
2567
- /**
2568
- * Handle the Radio button "change" event
2569
- * @param event The event received from the UI
2570
- * @param idx Id of the control raising the event
2571
- */
2572
2094
  TaskMagicService.prototype.mgOnRadioSelectionChanged = function (event, idx) {
2573
2095
  var result = this.getFormControl('0', idx);
2574
2096
  var guiEvent = engine.getGuiEventObj('selectionchanged', idx, 0);
@@ -2578,28 +2100,15 @@
2578
2100
  guiEvent.Value = result.value;
2579
2101
  this.insertEvent(guiEvent);
2580
2102
  };
2581
- /**
2582
- * Inserts the "close" event to the magic WebClient event queue
2583
- */
2584
2103
  TaskMagicService.prototype.close = function () {
2585
2104
  this.insertEvent(engine.getGuiEventObj('close', null, 0));
2586
2105
  };
2587
- ///////////////////////////////
2588
- /**
2589
- * @ignore
2590
- */
2591
2106
  TaskMagicService.prototype.IsStub = function () {
2592
2107
  return this.magic.isStub;
2593
2108
  };
2594
- /**
2595
- * @ignore
2596
- */
2597
2109
  TaskMagicService.prototype.saveData = function (data) {
2598
2110
  this.magic.saveData(data);
2599
2111
  };
2600
- /**
2601
- * @ignore
2602
- */
2603
2112
  TaskMagicService.prototype.createData = function () {
2604
2113
  var myData = {
2605
2114
  records: this.Records,
@@ -2611,9 +2120,6 @@
2611
2120
  console.log(text);
2612
2121
  this.saveData(text);
2613
2122
  };
2614
- /**
2615
- * @ignore
2616
- */
2617
2123
  TaskMagicService.prototype.loadStubData = function (stubData) {
2618
2124
  this.Records = stubData.records;
2619
2125
  this.settemplate(stubData.template);
@@ -2621,15 +2127,9 @@
2621
2127
  for (var i = 0; i < this.Records.list.length; i++)
2622
2128
  this.buildTableRowControls(i);
2623
2129
  };
2624
- /**
2625
- * @ignore
2626
- */
2627
2130
  TaskMagicService.prototype.loadData = function () {
2628
2131
  alert('Please, overwrite method loadData');
2629
2132
  };
2630
- /**
2631
- * @ignore
2632
- */
2633
2133
  TaskMagicService.prototype.setStubValue = function (guiRowId, fc, name) {
2634
2134
  if (this.IsStub()) {
2635
2135
  try {
@@ -2642,17 +2142,14 @@
2642
2142
  };
2643
2143
  return TaskMagicService;
2644
2144
  }());
2645
- /** @nocollapse */ TaskMagicService.ɵfac = function TaskMagicService_Factory(t) { return new (t || TaskMagicService)(i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayWindowService)); };
2646
- /** @nocollapse */ TaskMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TaskMagicService, factory: TaskMagicService.ɵfac });
2647
- /*@__PURE__*/ (function () {
2145
+ TaskMagicService.ɵfac = function TaskMagicService_Factory(t) { return new (t || TaskMagicService)(i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayWindowService)); };
2146
+ TaskMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TaskMagicService, factory: TaskMagicService.ɵfac });
2147
+ (function () {
2648
2148
  i0.ɵsetClassMetadata(TaskMagicService, [{
2649
2149
  type: i0.Injectable
2650
2150
  }], function () { return [{ type: EngineMagicService }, { type: OverlayWindowService }]; }, null);
2651
2151
  })();
2652
2152
 
2653
- /**
2654
- * @ignore
2655
- */
2656
2153
  var CommandsCollectorMagicService = /** @class */ (function () {
2657
2154
  function CommandsCollectorMagicService(magic) {
2658
2155
  this.magic = magic;
@@ -2687,25 +2184,19 @@
2687
2184
  };
2688
2185
  return CommandsCollectorMagicService;
2689
2186
  }());
2690
- /** @nocollapse */ CommandsCollectorMagicService.ɵfac = function CommandsCollectorMagicService_Factory(t) { return new (t || CommandsCollectorMagicService)(i0.ɵɵinject(EngineMagicService)); };
2691
- /** @nocollapse */ CommandsCollectorMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: CommandsCollectorMagicService, factory: CommandsCollectorMagicService.ɵfac });
2692
- /*@__PURE__*/ (function () {
2187
+ CommandsCollectorMagicService.ɵfac = function CommandsCollectorMagicService_Factory(t) { return new (t || CommandsCollectorMagicService)(i0.ɵɵinject(EngineMagicService)); };
2188
+ CommandsCollectorMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: CommandsCollectorMagicService, factory: CommandsCollectorMagicService.ɵfac });
2189
+ (function () {
2693
2190
  i0.ɵsetClassMetadata(CommandsCollectorMagicService, [{
2694
2191
  type: i0.Injectable
2695
2192
  }], function () { return [{ type: EngineMagicService }]; }, null);
2696
2193
  })();
2697
2194
 
2698
- /**
2699
- * @ignore
2700
- */
2701
2195
  var RouteCommand = /** @class */ (function () {
2702
2196
  function RouteCommand() {
2703
2197
  }
2704
2198
  return RouteCommand;
2705
2199
  }());
2706
- /**
2707
- * @ignore
2708
- */
2709
2200
  var RouterCommandsMagicService = /** @class */ (function () {
2710
2201
  function RouterCommandsMagicService() {
2711
2202
  this.pendingRouteCommands = [];
@@ -2721,17 +2212,14 @@
2721
2212
  };
2722
2213
  return RouterCommandsMagicService;
2723
2214
  }());
2724
- /** @nocollapse */ RouterCommandsMagicService.ɵfac = function RouterCommandsMagicService_Factory(t) { return new (t || RouterCommandsMagicService)(); };
2725
- /** @nocollapse */ RouterCommandsMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterCommandsMagicService, factory: RouterCommandsMagicService.ɵfac });
2726
- /*@__PURE__*/ (function () {
2215
+ RouterCommandsMagicService.ɵfac = function RouterCommandsMagicService_Factory(t) { return new (t || RouterCommandsMagicService)(); };
2216
+ RouterCommandsMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterCommandsMagicService, factory: RouterCommandsMagicService.ɵfac });
2217
+ (function () {
2727
2218
  i0.ɵsetClassMetadata(RouterCommandsMagicService, [{
2728
2219
  type: i0.Injectable
2729
2220
  }], null, null);
2730
2221
  })();
2731
2222
 
2732
- /**
2733
- * Service for managing subforms and routing
2734
- */
2735
2223
  var SubformMagicService = /** @class */ (function () {
2736
2224
  function SubformMagicService(task, activatedRoute, componentList, pendingCommandsCollector, router, routerCommandsMagicService) {
2737
2225
  this.task = task;
@@ -2740,15 +2228,10 @@
2740
2228
  this.pendingCommandsCollector = pendingCommandsCollector;
2741
2229
  this.router = router;
2742
2230
  this.routerCommandsMagicService = routerCommandsMagicService;
2743
- this.subformsDict /*:{ [x: string]: SubformDefinition }*/ = {};
2744
- this.routesDict = {}; // dictionary of router outlet to router path
2231
+ this.subformsDict = {};
2232
+ this.routesDict = {};
2745
2233
  this.currentRouteDefinition = null;
2746
2234
  }
2747
- /**
2748
- * Finds and returns the component according to the subform name
2749
- * @param subformName
2750
- * @returns
2751
- */
2752
2235
  SubformMagicService.prototype.mgGetComp = function (subformName) {
2753
2236
  if (subformName in this.subformsDict) {
2754
2237
  var formName = this.subformsDict[subformName].formName;
@@ -2757,11 +2240,6 @@
2757
2240
  }
2758
2241
  return null;
2759
2242
  };
2760
- /**
2761
- * Returns the parameters of the subform
2762
- * @param subformName
2763
- * @returns
2764
- */
2765
2243
  SubformMagicService.prototype.mgGetParameters = function (subformName) {
2766
2244
  if (subformName in this.subformsDict) {
2767
2245
  return this.subformsDict[subformName].parameters;
@@ -2769,9 +2247,6 @@
2769
2247
  else
2770
2248
  return "";
2771
2249
  };
2772
- /**
2773
- * @ignore
2774
- */
2775
2250
  SubformMagicService.prototype.deleteSubformComp = function (subformControlName, formName) {
2776
2251
  if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0) {
2777
2252
  if (this.subformsDict[subformControlName].formName === formName) {
@@ -2780,13 +2255,10 @@
2780
2255
  }
2781
2256
  }
2782
2257
  };
2783
- /**
2784
- * @ignore
2785
- */
2786
2258
  SubformMagicService.prototype.addSubformComp = function (subformControlName, formName, taskId, taskDescription, routerPath, params, inDefaultOutlet) {
2787
2259
  this.pendingCommandsCollector.startCollecting();
2788
2260
  var refreshNeeded = false;
2789
- if (util.isNullOrUndefined(routerPath)) { // call in destination subform
2261
+ if (util.isNullOrUndefined(routerPath)) {
2790
2262
  if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0) {
2791
2263
  if (this.subformsDict[subformControlName].formName === formName) {
2792
2264
  this.subformsDict[subformControlName] = {};
@@ -2797,10 +2269,9 @@
2797
2269
  formName: formName,
2798
2270
  parameters: { taskIdParam: taskId, taskDescription: taskDescription }
2799
2271
  };
2800
- //this.ref.detectChanges();
2801
2272
  refreshNeeded = true;
2802
2273
  }
2803
- else { // call route
2274
+ else {
2804
2275
  if (inDefaultOutlet)
2805
2276
  subformControlName = "primary";
2806
2277
  var routeParams = new mscorelib.List();
@@ -2815,10 +2286,6 @@
2815
2286
  parameters: { taskIdParam: taskId, taskDescription: taskDescription },
2816
2287
  routeParams: routeParams
2817
2288
  };
2818
- // If SubformMagicService.currentCallerMgSubformServiceRef !== null means that router.navigate() is already
2819
- // called once, but angular has not yet executed it (ngOnInit of the new component is not called).
2820
- // In such a case, do not executed router.navigate() again. Because, angular ignores the previous one.
2821
- // So, put a command in the queue which will be executed after the first one is executed.
2822
2289
  if (SubformMagicService.currentCallerMgSubformServiceRef === null)
2823
2290
  this.ExecuteRouteCommand(routeCommand);
2824
2291
  else
@@ -2827,17 +2294,12 @@
2827
2294
  if (refreshNeeded)
2828
2295
  this.task.refreshView();
2829
2296
  };
2830
- /**
2831
- * Open the subform using a route command
2832
- */
2833
2297
  SubformMagicService.prototype.ExecuteRouteCommand = function (routeCommand) {
2834
2298
  var _a;
2835
2299
  var reusingComponent = false;
2836
2300
  var currentSubformMagicService = routeCommand.callerMgSubformServiceRef;
2837
2301
  var relativeRoute = SubformMagicService.getRelativeRoute(currentSubformMagicService.activatedRoute);
2838
2302
  if (currentSubformMagicService.routesDict[routeCommand.routerOutletName] === routeCommand.routeParams[0]) {
2839
- // If the specified router outlet already hosts the same router path, router.navigate() doesn't actually navigate.
2840
- // So, first clear the outlet (passing null route params, clears the outlet) and then navigate again.
2841
2303
  currentSubformMagicService.router.navigate([{ outlets: (_a = {}, _a[routeCommand.routerOutletName] = null, _a) }], { relativeTo: relativeRoute })
2842
2304
  .then(function (result) {
2843
2305
  SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;
@@ -2878,13 +2340,8 @@
2878
2340
  }
2879
2341
  });
2880
2342
  };
2881
- /**
2882
- * @ignore
2883
- */
2884
2343
  SubformMagicService.prototype.init = function () {
2885
2344
  var _this = this;
2886
- // If commands were issued for this task before ngOnInit(), they were not executed because task had not registered for them.
2887
- // So, execute them now.
2888
2345
  var pendingCommands = this.pendingCommandsCollector.GetCommands(this.task.taskId);
2889
2346
  if (pendingCommands.length > 0) {
2890
2347
  pendingCommands.forEach(function (command) { _this.task.executeCommand(command); });
@@ -2892,15 +2349,9 @@
2892
2349
  }
2893
2350
  this.pendingCommandsCollector.stopCollecting();
2894
2351
  };
2895
- /**
2896
- * @ignore
2897
- */
2898
2352
  SubformMagicService.prototype.refreshView = function () {
2899
2353
  this.task.refreshView();
2900
2354
  };
2901
- ///
2902
- // return the relative route
2903
- //
2904
2355
  SubformMagicService.getRelativeRoute = function (sendActivatedRoute) {
2905
2356
  var currentActiveRoute = sendActivatedRoute;
2906
2357
  if (currentActiveRoute.snapshot.routeConfig !== null && currentActiveRoute.snapshot.routeConfig.path === '') {
@@ -2914,72 +2365,39 @@
2914
2365
  }());
2915
2366
  SubformMagicService.currentCallerMgSubformServiceRef = null;
2916
2367
  SubformMagicService.routerContainers = new Array();
2917
- /** @nocollapse */ SubformMagicService.ɵfac = function SubformMagicService_Factory(t) { return new (t || SubformMagicService)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(i2.ActivatedRoute), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(CommandsCollectorMagicService), i0.ɵɵinject(i2.Router), i0.ɵɵinject(RouterCommandsMagicService)); };
2918
- /** @nocollapse */ SubformMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: SubformMagicService, factory: SubformMagicService.ɵfac });
2919
- /*@__PURE__*/ (function () {
2368
+ SubformMagicService.ɵfac = function SubformMagicService_Factory(t) { return new (t || SubformMagicService)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(i2.ActivatedRoute), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(CommandsCollectorMagicService), i0.ɵɵinject(i2.Router), i0.ɵɵinject(RouterCommandsMagicService)); };
2369
+ SubformMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: SubformMagicService, factory: SubformMagicService.ɵfac });
2370
+ (function () {
2920
2371
  i0.ɵsetClassMetadata(SubformMagicService, [{
2921
2372
  type: i0.Injectable
2922
2373
  }], function () { return [{ type: TaskMagicService }, { type: i2.ActivatedRoute }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: i2.Router }, { type: RouterCommandsMagicService }]; }, null);
2923
2374
  })();
2924
2375
 
2925
- /**
2926
- * Implements various table-related functionalities
2927
- */
2928
2376
  var TableMagicService = /** @class */ (function () {
2929
- /**
2930
- *
2931
- * @param componentList Component-mapping service
2932
- * @param task Magic task service
2933
- */
2934
2377
  function TableMagicService(componentList, task) {
2935
2378
  this.componentList = componentList;
2936
2379
  this.task = task;
2937
2380
  this.shouldOpenFieldTextEditor = true;
2938
2381
  }
2939
- /**
2940
- * Refreshes the DataSource
2941
- */
2942
2382
  TableMagicService.prototype.refreshDataSource = function () {
2943
2383
  };
2944
- /**
2945
- * Returns the table page size
2946
- */
2947
2384
  TableMagicService.prototype.getPageSize = function () {
2948
2385
  return 10;
2949
2386
  };
2950
- /**
2951
- * Returns max no of rows in the table.
2952
- */
2953
2387
  TableMagicService.prototype.getMaxRowsInTable = function () {
2954
2388
  return this.task.Records.list.length;
2955
2389
  };
2956
- /**
2957
- * Selects the specified row
2958
- * @param rowId The row to select
2959
- */
2960
2390
  TableMagicService.prototype.selectRow = function (rowId) {
2961
2391
  this.selectedItem = rowId;
2962
2392
  };
2963
2393
  TableMagicService.prototype.getSelectedRow = function () {
2964
2394
  return this.selectedItem;
2965
2395
  };
2966
- /**
2967
- * Returns the selected row
2968
- */
2969
2396
  TableMagicService.prototype.selectedRow = function () {
2970
2397
  return null;
2971
2398
  };
2972
- /**
2973
- * Selects the specified page
2974
- * @param pageId The page to select
2975
- */
2976
2399
  TableMagicService.prototype.selectPage = function (pageId) {
2977
2400
  };
2978
- /**
2979
- * Returns whether a dialog should be opened for the HTML element
2980
- * @param element The HTML element for which a dialog may be needed
2981
- * @returns
2982
- */
2983
2401
  TableMagicService.prototype.OpenDialogForControl = function (element) {
2984
2402
  if (element.tagName === "MAT-SELECT" || element.tagName === "MAT-CHECKBOX" ||
2985
2403
  element.tagName === "INPUT" ||
@@ -2987,34 +2405,17 @@
2987
2405
  return false;
2988
2406
  return true;
2989
2407
  };
2990
- /**
2991
- * Returns the dialog used to edit values
2992
- */
2993
2408
  TableMagicService.prototype.getDialog = function () {
2994
2409
  return null;
2995
2410
  };
2996
- /**
2997
- * Handles the table "scrolled" event
2998
- */
2999
2411
  TableMagicService.prototype.onScrollDown = function () {
3000
2412
  this.task.onScrollDown();
3001
2413
  };
3002
- /**
3003
- * To be overwitten in specific implelemtations
3004
- */
3005
2414
  TableMagicService.prototype.sortData = function (e) { };
3006
- /**
3007
- * To be overwitten in specific implelemtations
3008
- */
3009
2415
  TableMagicService.prototype.mgOnPaginateChange = function (e) { };
3010
2416
  TableMagicService.prototype.mgOptionChanged = function (e) { };
3011
- /**
3012
- * Change the number of lines in a table
3013
- * @param size New number of lines in table
3014
- */
3015
2417
  TableMagicService.prototype.updateTableSize = function (size) {
3016
- if (size === 0) // never remove row 0 for now
3017
- {
2418
+ if (size === 0) {
3018
2419
  size = 1;
3019
2420
  this.task.Records.clearFirstTableRecord(this.task.template);
3020
2421
  }
@@ -3022,17 +2423,11 @@
3022
2423
  this.task.Records.updateSize(size);
3023
2424
  this.task.setIncludesFirst(false);
3024
2425
  };
3025
- /**
3026
- * @ignore
3027
- */
3028
2426
  TableMagicService.prototype.setTableTopIndex = function (value) {
3029
2427
  if (!this.task.Records.includesFirst)
3030
2428
  value++;
3031
2429
  this.task.Records.setGuiTopIndex(value);
3032
2430
  };
3033
- /**
3034
- * @ignore
3035
- */
3036
2431
  TableMagicService.prototype.getTableTopIndex = function () {
3037
2432
  var topIndex = this.task.Records.getGuiTopIndex();
3038
2433
  if (!this.task.Records.includesFirst)
@@ -3041,60 +2436,37 @@
3041
2436
  };
3042
2437
  return TableMagicService;
3043
2438
  }());
3044
- /** @nocollapse */ TableMagicService.ɵfac = function TableMagicService_Factory(t) { return new (t || TableMagicService)(i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(TaskMagicService)); };
3045
- /** @nocollapse */ TableMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TableMagicService, factory: TableMagicService.ɵfac });
3046
- /*@__PURE__*/ (function () {
2439
+ TableMagicService.ɵfac = function TableMagicService_Factory(t) { return new (t || TableMagicService)(i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(TaskMagicService)); };
2440
+ TableMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TableMagicService, factory: TableMagicService.ɵfac });
2441
+ (function () {
3047
2442
  i0.ɵsetClassMetadata(TableMagicService, [{
3048
2443
  type: i0.Injectable
3049
2444
  }], function () { return [{ type: ComponentListMagicService }, { type: TaskMagicService }]; }, null);
3050
2445
  })();
3051
2446
 
3052
- /**
3053
- * Enables changing the browser title using Magic expression (SetTitle)
3054
- */
3055
2447
  var TitleMagicService = /** @class */ (function () {
3056
- /**
3057
- *
3058
- * @param titleService Angular's title-changing class
3059
- */
3060
2448
  function TitleMagicService(titleService) {
3061
2449
  this.titleService = titleService;
3062
2450
  }
3063
- /**
3064
- * Set the new title of the window
3065
- * @param newTitle New title of the window
3066
- */
3067
2451
  TitleMagicService.prototype.setTitle = function (newTitle) {
3068
2452
  this.titleService.setTitle(newTitle);
3069
2453
  };
3070
2454
  return TitleMagicService;
3071
2455
  }());
3072
- /** @nocollapse */ TitleMagicService.ɵfac = function TitleMagicService_Factory(t) { return new (t || TitleMagicService)(i0.ɵɵinject(i1$1.Title)); };
3073
- /** @nocollapse */ TitleMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TitleMagicService, factory: TitleMagicService.ɵfac });
3074
- /*@__PURE__*/ (function () {
2456
+ TitleMagicService.ɵfac = function TitleMagicService_Factory(t) { return new (t || TitleMagicService)(i0.ɵɵinject(i1$1.Title)); };
2457
+ TitleMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TitleMagicService, factory: TitleMagicService.ɵfac });
2458
+ (function () {
3075
2459
  i0.ɵsetClassMetadata(TitleMagicService, [{
3076
2460
  type: i0.Injectable
3077
2461
  }], function () { return [{ type: i1$1.Title }]; }, null);
3078
2462
  })();
3079
2463
 
3080
- /**
3081
- * Provides the UI with values calculated by the Magic WebClient
3082
- */
3083
2464
  var AccessorMagicService = /** @class */ (function () {
3084
- /**
3085
- * @ignore
3086
- */
3087
2465
  function AccessorMagicService(task) {
3088
2466
  this.task = task;
3089
2467
  this.Logger = null;
3090
2468
  this.Logger = utils$1.Logger.Instance;
3091
2469
  }
3092
- /**
3093
- * Checks if the control is read-only
3094
- * @param controlId Id of control
3095
- * @returns Is the control not read-only
3096
- */
3097
- // CheckReadOnly
3098
2470
  AccessorMagicService.prototype.checkIsReadOnly = function (controlId) {
3099
2471
  var properties;
3100
2472
  properties = this.task.Records.list[0].getControlMetadata(controlId);
@@ -3103,99 +2475,45 @@
3103
2475
  else
3104
2476
  return true;
3105
2477
  };
3106
- /**
3107
- * Returns the text of the control
3108
- * @param controlId Id of control
3109
- * @param rowId Id of row, if applicable
3110
- * @returns The text of the control
3111
- */
3112
- // mgGetText
3113
2478
  AccessorMagicService.prototype.getText = function (controlId, rowId) {
3114
2479
  return this.task.getProperty(controlId, gui.HtmlProperties.Text, rowId);
3115
2480
  };
3116
- /**
3117
- * Gets the text of the tab page
3118
- * @param controlId Id of control
3119
- * @param layer Id of tabpage
3120
- * @returns Text of tabpage
3121
- */
3122
- // mgGetTabpageText
3123
2481
  AccessorMagicService.prototype.getTabpageText = function (controlId, layer) {
3124
2482
  var items = this.task.getProperty(controlId, gui.HtmlProperties.ItemsList);
3125
2483
  if (typeof items !== "undefined")
3126
2484
  return items[layer].displayValue;
3127
2485
  return "";
3128
2486
  };
3129
- /**
3130
- * Gets the image defined for the control
3131
- * @param controlId Id of control
3132
- * @param rowId Id of row, if applicable
3133
- * @returns Image set on control
3134
- */
3135
- // mgGetImage
3136
2487
  AccessorMagicService.prototype.getImage = function (controlId, rowId) {
3137
2488
  var result = this.task.getProperty(controlId, gui.HtmlProperties.Image, rowId);
3138
2489
  return result;
3139
2490
  };
3140
- /**
3141
- * Returns whether an image is set for this control
3142
- * @param controlId Id of control
3143
- * @param rowId Id of row, if applicable
3144
- * @returns returns true if control has an image set on it
3145
- */
3146
- // mgIsImageExists
3147
2491
  AccessorMagicService.prototype.isImageExists = function (controlId, rowId) {
3148
2492
  var result = this.task.getProperty(controlId, gui.HtmlProperties.Image, rowId);
3149
2493
  return !util.isNullOrUndefined(result);
3150
2494
  };
3151
- /**
3152
- * Gets the CSS classes set on the control
3153
- * @param controlId Id of control
3154
- * @param rowId Id of row, if applicable
3155
- * @returns The classes for this control
3156
- */
3157
- // mgGetClasses
3158
2495
  AccessorMagicService.prototype.getClasses = function (controlId, rowId) {
3159
2496
  return this.task.getClasses(controlId, rowId);
3160
2497
  };
3161
- /**
3162
- * Gets the CSS styles set on the control
3163
- * @param controlId Id of control
3164
- * @param styleName NAme of style requested
3165
- * @param rowId Id of row, if applicable
3166
- * @returns The style set on the control
3167
- */
3168
- // mgGetStyle
3169
2498
  AccessorMagicService.prototype.getStyle = function (controlId, styleName, rowId) {
3170
2499
  var style = this.task.getStyle(controlId, styleName, rowId);
3171
2500
  return style;
3172
2501
  };
3173
- /**
3174
- * Returns whether a control is visible or not
3175
- * @param controlId Id of control
3176
- * @param rowId Id of row, if applicable
3177
- * @returns Is the control visible or hidden
3178
- */
3179
- // mgGetVisible
3180
2502
  AccessorMagicService.prototype.getVisible = function (controlId, rowId) {
3181
2503
  var vis = this.getProperty(controlId, gui.HtmlProperties.Visible, rowId);
3182
2504
  return vis ? 'visible' : 'hidden';
3183
2505
  };
3184
- /**
3185
- * Returns object representing numeric picture
3186
- * @param picture string which is defined in magic
3187
- * @returns object representing numeric picture
3188
- */
3189
- // mgGetNumericPicture
3190
2506
  AccessorMagicService.prototype.getNumericPicture = function (picture) {
3191
2507
  if (util.isNullOrUndefined(picture))
3192
2508
  return null;
3193
2509
  var pic = new gui.PIC(picture, utils$1.StorageAttribute.NUMERIC, 0);
3194
2510
  var obj = {};
3195
- if (pic.getPosPref_().length > 0)
3196
- obj['prefix'] = pic.getPosPref_();
3197
- else
3198
- obj['prefix'] = "";
2511
+ obj['prefix'] = "";
2512
+ if (pic.getPosPref_().length > 0 && pic.getNegPref_().length > 0) {
2513
+ var pref = '-' + pic.getPosPref_();
2514
+ if (pref == pic.getNegPref_())
2515
+ obj['prefix'] = pic.getPosPref_();
2516
+ }
3199
2517
  if (pic.getPosSuff_().length > 0)
3200
2518
  obj['suffix'] = pic.getPosSuff_();
3201
2519
  else
@@ -3217,118 +2535,51 @@
3217
2535
  obj['wholes'] = pic.getWholes();
3218
2536
  return obj;
3219
2537
  };
3220
- /**
3221
- * Returns whether a control should have the "required" attribute set on it
3222
- * @param controlId Id of control
3223
- * @param rowId Id of row, if applicable
3224
- * @returns
3225
- */
3226
- // mgGetMustInput
3227
2538
  AccessorMagicService.prototype.getMustInput = function (controlId, rowId) {
3228
2539
  var vis = this.getProperty(controlId, gui.HtmlProperties.MustInput, rowId);
3229
2540
  return vis ? 'true' : 'false';
3230
2541
  };
3231
- /**
3232
- * Returns whether a control is disabled
3233
- * @param controlId Id of control
3234
- * @param rowId Id of row, if applicable
3235
- * @returns
3236
- */
3237
- // mgIsDisabled
3238
2542
  AccessorMagicService.prototype.isDisabled = function (controlId, rowId) {
3239
2543
  var result = this.getProperty(controlId, gui.HtmlProperties.Enabled, rowId);
3240
2544
  return result === true ? null : true;
3241
2545
  };
3242
- /**
3243
- * @ignore
3244
- */
3245
- // getProperty (not changed)
3246
2546
  AccessorMagicService.prototype.getProperty = function (controlId, prop, rowId) {
3247
2547
  return this.task.getProperty(controlId, prop, rowId);
3248
2548
  };
3249
- /**
3250
- * Returns the title (tooltip) text of the control
3251
- * @param controlId Id of control
3252
- * @param rowId Id of row, if applicable
3253
- * @returns
3254
- */
3255
- // mgGetTitle
3256
2549
  AccessorMagicService.prototype.getTitle = function (controlId, rowId) {
3257
2550
  return this.task.getProperty(controlId, gui.HtmlProperties.Tooltip, rowId);
3258
2551
  };
3259
- /**
3260
- * Gets the selection control's selected value
3261
- * @param controlId Id of control
3262
- * @param rowId Id of row, if applicable
3263
- * @returns
3264
- */
3265
- // getSelectedValue
2552
+ AccessorMagicService.prototype.getZoomButtonTitle = function (controlId, rowId) {
2553
+ return this.task.getProperty(controlId, gui.HtmlProperties.ZoomButtonTooltip, rowId);
2554
+ };
3266
2555
  AccessorMagicService.prototype.getSelectedValue = function (controlId, rowId) {
3267
2556
  return this.task.getProperty(controlId, gui.HtmlProperties.SelectedValue, rowId);
3268
2557
  };
3269
- /**
3270
- * Gets the place-holder text of the control
3271
- * @param controlId Id of control
3272
- * @param rowId Id of row, if applicable
3273
- * @returns
3274
- */
3275
- // mgGetPlaceholder
3276
2558
  AccessorMagicService.prototype.getPlaceholder = function (controlId, rowId) {
3277
2559
  return this.task.getProperty(controlId, gui.HtmlProperties.PlaceHolder, rowId);
3278
2560
  };
3279
- /**
3280
- * Returns a type for input controls - should the control be a simple text or a password control
3281
- * @param controlId Id of control
3282
- * @param rowId Id of row, if applicable
3283
- * @returns
3284
- */
3285
- // mgGetType
3286
2561
  AccessorMagicService.prototype.getType = function (controlId, rowId) {
3287
2562
  var result = this.task.getProperty(controlId, gui.HtmlProperties.Password, rowId);
3288
2563
  return result ? "password" : "text";
3289
2564
  };
3290
- /**
3291
- * Returns the tab-index of the control
3292
- * @param controlId Id of control
3293
- * @param rowId Id of row, if applicable
3294
- * @returns
3295
- */
3296
- // mgGetTabIndex
3297
2565
  AccessorMagicService.prototype.getTabIndex = function (controlId, rowId) {
3298
2566
  return this.task.getProperty(controlId, gui.HtmlProperties.TabIndex, rowId);
3299
2567
  };
3300
- /**
3301
- * Returns the value of the control
3302
- * @param controlId Id of control
3303
- * @param rowId Id of row, if applicable
3304
- * @returns
3305
- */
3306
- /// mgGetValue -->
3307
2568
  AccessorMagicService.prototype.getValue = function (controlId, rowId) {
3308
2569
  var val = this.task.getValue(controlId, rowId);
3309
2570
  return val;
3310
2571
  };
3311
- /**
3312
- * Returns the Picture of the control
3313
- * @param controlId Id of control
3314
- * @param rowId Id of row, if applicable
3315
- * @returns
3316
- */
3317
- /// getPicture -->
2572
+ AccessorMagicService.prototype.getFormattedValue = function (controlId, rowId) {
2573
+ var val = this.task.getValue(controlId, rowId);
2574
+ val = this.task.getFormattedValue(controlId, val);
2575
+ return val;
2576
+ };
3318
2577
  AccessorMagicService.prototype.getPicture = function (controlId, rowId) {
3319
2578
  if (util.isNullOrUndefined(controlId))
3320
2579
  return null;
3321
2580
  var pic = this.task.GetControlPictureMask(controlId);
3322
2581
  return (pic != null) ? pic.getFormat().toString() : null;
3323
2582
  };
3324
- /**
3325
- * Returns the custom (user) properties of the control
3326
- * @param controlId Id of control
3327
- * @param propertyName Name of requested property
3328
- * @param rowId Id of row, if applicable
3329
- * @returns
3330
- */
3331
- // mgGetCustomProperty
3332
2583
  AccessorMagicService.prototype.getCustomProperty = function (controlId, propertyNameOrRowID, rowId) {
3333
2584
  if (controlId.indexOf('~') == -1)
3334
2585
  return this.getCustomProperty_1(controlId, propertyNameOrRowID, rowId);
@@ -3353,22 +2604,9 @@
3353
2604
  }
3354
2605
  return userProperties;
3355
2606
  };
3356
- /**
3357
- * Gets the values of the items of a selection control
3358
- * @param id Id of control
3359
- * @param rowId Id of row, if applicable
3360
- * @returns
3361
- */
3362
- // mgGetItemListValues
3363
2607
  AccessorMagicService.prototype.getItemListValues = function (id, rowId) {
3364
2608
  return this.getProperty(id, gui.HtmlProperties.ItemsList, rowId);
3365
2609
  };
3366
- /**
3367
- * Gets the display value of the item from items of a selection control
3368
- * @param id Id of control
3369
- * @param rowId Id of row, if applicable
3370
- * @returns
3371
- */
3372
2610
  AccessorMagicService.prototype.getDisplayValue = function (id, rowId) {
3373
2611
  var displayValue = "";
3374
2612
  var o = this.getProperty(id, gui.HtmlProperties.ItemsList, rowId);
@@ -3377,12 +2615,6 @@
3377
2615
  displayValue = o[value].displayValue;
3378
2616
  return displayValue;
3379
2617
  };
3380
- /**
3381
- * Returns whether a tab page is selected or not
3382
- * @param index of current option in iterarotr
3383
- * @param control Id of list control
3384
- * @returns
3385
- */ // isOptionSelected
3386
2618
  AccessorMagicService.prototype.isOptionSelected = function (index, controlId) {
3387
2619
  var e_1, _a;
3388
2620
  var val = this.task.getValue(controlId, "0");
@@ -3402,40 +2634,18 @@
3402
2634
  }
3403
2635
  return false;
3404
2636
  };
3405
- /**
3406
- * Returns whether a tab page is selected or not - used for the tab buttons
3407
- * @param controlId Id of control
3408
- * @param layer Id of the tab page
3409
- * @returns
3410
- */ // mgIsTabPageSelected
3411
2637
  AccessorMagicService.prototype.isTabPageSelected = function (controlId, layer) {
3412
2638
  var val = this.task.getProperty(controlId, gui.HtmlProperties.SelectedValue);
3413
- return val == (layer - 1); // comparing string to number!
3414
- };
3415
- /**
3416
- * Returns whether a tab page layer is selected or not - used for the div which represents the tab page
3417
- * @param controlId Id of control
3418
- * @param layer Id of the tab page
3419
- * @returns
3420
- */ // mgIsTabLayerSelected
2639
+ return val == (layer - 1);
2640
+ };
3421
2641
  AccessorMagicService.prototype.isTabPageLayerSelected = function (controlId, layer) {
3422
2642
  var val = this.task.getProperty(controlId, gui.HtmlProperties.SelectedLayer);
3423
- return val == (layer - 1); // comparing string to number!
2643
+ return val == (layer - 1);
3424
2644
  };
3425
- /**
3426
- * Returns the index of the selected tab page
3427
- * @param controlId Id of control
3428
- * @returns
3429
- */
3430
2645
  AccessorMagicService.prototype.getTabSelectedIndex = function (controlId) {
3431
2646
  var val = this.task.getProperty(controlId, gui.HtmlProperties.SelectedValue);
3432
- return val; // comparing string to number!
2647
+ return val;
3433
2648
  };
3434
- // private methodes
3435
- /**
3436
- * @ignore
3437
- */
3438
- // mgIfRowCreated
3439
2649
  AccessorMagicService.prototype.ifRowCreated = function (row) {
3440
2650
  if (row == null)
3441
2651
  return false;
@@ -3443,48 +2653,25 @@
3443
2653
  var result = this.getFormGroupByRow(rowId);
3444
2654
  return !util.isNullOrUndefined(result);
3445
2655
  };
3446
- /**
3447
- * @ignore
3448
- */
3449
- // mgGetFormGroupByRow
3450
2656
  AccessorMagicService.prototype.getFormGroupByRow = function (id) {
3451
2657
  return this.task.formGroups[id];
3452
2658
  };
3453
- /**
3454
- * @ignore
3455
- */
3456
- // isRowSelected (not changed)
3457
2659
  AccessorMagicService.prototype.isRowSelected = function (controlId, rowId) {
3458
2660
  var selectedRow = this.task.getProperty(controlId, gui.HtmlProperties.SelectedRow, "0");
3459
2661
  return selectedRow == rowId;
3460
2662
  };
3461
- /**
3462
- * Returns whether a row is in edit state
3463
- * @param row
3464
- */
3465
2663
  AccessorMagicService.prototype.isRowInRowEditing = function (row) {
3466
2664
  var guiRowId = '0';
3467
2665
  guiRowId = typeof row == "number" ? row.toString() : row.rowId;
3468
2666
  return this.task.isRowInRowEditing(guiRowId);
3469
2667
  };
3470
- /**
3471
- * Returns whether a row is in edit state, use this method while control outside table control
3472
- * @param row
3473
- */
3474
2668
  AccessorMagicService.prototype.isCurrentInRowEditing = function () {
3475
2669
  var row = this.task.tableService.getSelectedRow();
3476
2670
  return this.task.isRowInRowEditing(row);
3477
2671
  };
3478
- /**
3479
- * @ignore
3480
- */
3481
- // GetGuiTopIndex
3482
2672
  AccessorMagicService.prototype.guiTopIndex = function () {
3483
2673
  return this.task.tableService.getTableTopIndex();
3484
2674
  };
3485
- /**
3486
- * @ignore
3487
- */
3488
2675
  AccessorMagicService.prototype.getErrMsg = function (id, rowId) {
3489
2676
  var e_2, _a;
3490
2677
  var c = this.task.getFormControl(rowId, id);
@@ -3517,12 +2704,6 @@
3517
2704
  }
3518
2705
  return 'unknown error';
3519
2706
  };
3520
- /**
3521
- * Sets a user-supplied value to the specified control
3522
- * @param controlName
3523
- * @param value
3524
- * @param refreshDisplay
3525
- */
3526
2707
  AccessorMagicService.prototype.setValueToControl = function (controlName, value, refreshDisplay) {
3527
2708
  if (typeof refreshDisplay === "undefined")
3528
2709
  refreshDisplay = true;
@@ -3531,31 +2712,17 @@
3531
2712
  guiEvent.param = refreshDisplay;
3532
2713
  this.task.insertEvent(guiEvent);
3533
2714
  };
3534
- /**
3535
- * @ignore
3536
- */
3537
2715
  AccessorMagicService.prototype.isDataviewEmpty = function () {
3538
2716
  return this.task.Records.isEmptyDataView;
3539
2717
  };
3540
- /**
3541
- * simulates a click event on the specified control, for the Magic engine
3542
- * @param controlName
3543
- * @param rowId
3544
- */
3545
2718
  AccessorMagicService.prototype.simulateClick = function (controlName, rowId) {
3546
2719
  if (typeof rowId === "undefined")
3547
2720
  rowId = 0;
3548
2721
  this.task.insertEvent(engine.getGuiEventObj('click', controlName, rowId));
3549
2722
  };
3550
- /**
3551
- * Return Boolean TRUE if user logged in Else it will return FALSE
3552
- */
3553
2723
  AccessorMagicService.prototype.isLoggedIn = function () {
3554
2724
  return this.task.getIsLoggenIn();
3555
2725
  };
3556
- /**
3557
- * Returns JS object containing the records with all table fields.
3558
- */
3559
2726
  AccessorMagicService.prototype.GetFormRecords = function () {
3560
2727
  var _this = this;
3561
2728
  var rowId = 0;
@@ -3563,13 +2730,11 @@
3563
2730
  if (!util.isNullOrUndefined(this.task.Records) && this.task.Records.list.length > 0) {
3564
2731
  var recList = this.task.Records.list;
3565
2732
  var tableControls_1 = new Array();
3566
- //Generate list of table fields names
3567
2733
  for (var key in this.task.template) {
3568
2734
  if (this.task.template[key] == '1')
3569
2735
  tableControls_1.push(key);
3570
2736
  }
3571
2737
  recArray = new Array();
3572
- //Update the records as list of objects with values for table fields.
3573
2738
  if (tableControls_1.length > 0) {
3574
2739
  recList.forEach(function (ctrlMetaData) {
3575
2740
  if (_this.task.Records.isRowCreated(rowId)) {
@@ -3585,23 +2750,26 @@
3585
2750
  }
3586
2751
  return recArray;
3587
2752
  };
2753
+ AccessorMagicService.prototype.SetCookie = function (name, value, expires, path, domain, secure, sameSite) {
2754
+ engine.CookieService.setCookie(name, value, expires, path, domain, secure, sameSite);
2755
+ };
2756
+ AccessorMagicService.prototype.GetCookie = function (name) {
2757
+ return engine.CookieService.getCookie(name);
2758
+ };
2759
+ AccessorMagicService.prototype.DeleteCookie = function (name) {
2760
+ return engine.CookieService.deleteCookie(name);
2761
+ };
3588
2762
  return AccessorMagicService;
3589
2763
  }());
3590
- /** @nocollapse */ AccessorMagicService.ɵfac = function AccessorMagicService_Factory(t) { return new (t || AccessorMagicService)(i0.ɵɵinject(TaskMagicService)); };
3591
- /** @nocollapse */ AccessorMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: AccessorMagicService, factory: AccessorMagicService.ɵfac });
3592
- /*@__PURE__*/ (function () {
2764
+ AccessorMagicService.ɵfac = function AccessorMagicService_Factory(t) { return new (t || AccessorMagicService)(i0.ɵɵinject(TaskMagicService)); };
2765
+ AccessorMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: AccessorMagicService, factory: AccessorMagicService.ɵfac });
2766
+ (function () {
3593
2767
  i0.ɵsetClassMetadata(AccessorMagicService, [{
3594
2768
  type: i0.Injectable
3595
2769
  }], function () { return [{ type: TaskMagicService }]; }, null);
3596
2770
  })();
3597
2771
 
3598
- /**
3599
- * Central place for adding the Magic services
3600
- */
3601
2772
  var MagicServices = /** @class */ (function () {
3602
- /**
3603
- * @ignore
3604
- */
3605
2773
  function MagicServices(task, subformService, tableService, titleService, mgAccessorService) {
3606
2774
  this.task = task;
3607
2775
  this.subformService = subformService;
@@ -3615,36 +2783,21 @@
3615
2783
  }
3616
2784
  return MagicServices;
3617
2785
  }());
3618
- /** @nocollapse */ MagicServices.ɵfac = function MagicServices_Factory(t) { return new (t || MagicServices)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(SubformMagicService), i0.ɵɵinject(TableMagicService), i0.ɵɵinject(TitleMagicService), i0.ɵɵinject(AccessorMagicService)); };
3619
- /** @nocollapse */ MagicServices.ɵprov = i0.ɵɵdefineInjectable({ token: MagicServices, factory: MagicServices.ɵfac });
3620
- /*@__PURE__*/ (function () {
2786
+ MagicServices.ɵfac = function MagicServices_Factory(t) { return new (t || MagicServices)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(SubformMagicService), i0.ɵɵinject(TableMagicService), i0.ɵɵinject(TitleMagicService), i0.ɵɵinject(AccessorMagicService)); };
2787
+ MagicServices.ɵprov = i0.ɵɵdefineInjectable({ token: MagicServices, factory: MagicServices.ɵfac });
2788
+ (function () {
3621
2789
  i0.ɵsetClassMetadata(MagicServices, [{
3622
2790
  type: i0.Injectable
3623
2791
  }], function () { return [{ type: TaskMagicService }, { type: SubformMagicService }, { type: TableMagicService }, { type: TitleMagicService }, { type: AccessorMagicService }]; }, null);
3624
2792
  })();
3625
2793
 
3626
- /**
3627
- * Base component representing a Magic task
3628
- */
3629
2794
  var TaskBaseMagicComponent = /** @class */ (function () {
3630
- /**
3631
- *
3632
- * @param ref changes-detector object
3633
- * @param magicServices Access point for all Magic services
3634
- */
3635
2795
  function TaskBaseMagicComponent(ref, magicServices) {
3636
2796
  this.ref = ref;
3637
2797
  this.magicServices = magicServices;
3638
- /**
3639
- * @ignore
3640
- */
3641
2798
  this.magicProperties = utils$1.MagicProperties;
3642
2799
  }
3643
2800
  Object.defineProperty(TaskBaseMagicComponent.prototype, "task", {
3644
- /**
3645
- * Returns the Magic task service
3646
- * @returns
3647
- */
3648
2801
  get: function () {
3649
2802
  return this.magicServices.task;
3650
2803
  },
@@ -3652,10 +2805,6 @@
3652
2805
  configurable: true
3653
2806
  });
3654
2807
  Object.defineProperty(TaskBaseMagicComponent.prototype, "mgSub", {
3655
- /**
3656
- * Returns the Magic subform service
3657
- * @returns
3658
- */
3659
2808
  get: function () {
3660
2809
  return this.magicServices.subformService;
3661
2810
  },
@@ -3663,10 +2812,6 @@
3663
2812
  configurable: true
3664
2813
  });
3665
2814
  Object.defineProperty(TaskBaseMagicComponent.prototype, "tableService", {
3666
- /**
3667
- * Returns the Magic table service
3668
- * @returns
3669
- */
3670
2815
  get: function () {
3671
2816
  return this.magicServices.tableService;
3672
2817
  },
@@ -3674,10 +2819,6 @@
3674
2819
  configurable: true
3675
2820
  });
3676
2821
  Object.defineProperty(TaskBaseMagicComponent.prototype, "mg", {
3677
- /**
3678
- * Returns the Magic accessor service
3679
- * @returns
3680
- */
3681
2822
  get: function () {
3682
2823
  return this.magicServices.mgAccessorService;
3683
2824
  },
@@ -3685,10 +2826,6 @@
3685
2826
  configurable: true
3686
2827
  });
3687
2828
  Object.defineProperty(TaskBaseMagicComponent.prototype, "taskId", {
3688
- /**
3689
- * Returns the task Id
3690
- * @returns
3691
- */
3692
2829
  get: function () {
3693
2830
  return this.task.taskId;
3694
2831
  },
@@ -3696,19 +2833,12 @@
3696
2833
  configurable: true
3697
2834
  });
3698
2835
  Object.defineProperty(TaskBaseMagicComponent.prototype, "screenFormGroup", {
3699
- /**
3700
- * Returns the FormGroup for screen-mode forms
3701
- * @returns
3702
- */
3703
2836
  get: function () {
3704
2837
  return this.task.ScreenModeControls;
3705
2838
  },
3706
2839
  enumerable: false,
3707
2840
  configurable: true
3708
2841
  });
3709
- /**
3710
- * Interface implementation
3711
- */
3712
2842
  TaskBaseMagicComponent.prototype.ngOnInit = function () {
3713
2843
  var _this = this;
3714
2844
  var subscription = this.task.detectChanges.pipe().subscribe(function (c) {
@@ -3717,48 +2847,19 @@
3717
2847
  this.task.initTask(this.taskIdParam, this.taskDescription);
3718
2848
  this.createFormControlsAccessor(this.screenFormGroup);
3719
2849
  this.setInputDateFormat();
3720
- // subcribe to custom property changes
3721
2850
  this.task.customPropertiesSubject.pipe().subscribe(function (property) {
3722
2851
  _this.PropertyChanged(property.propertyName, property.rowId, property.value);
3723
2852
  });
3724
- // subcribe to records count changes
3725
2853
  this.task.recordsCountChangeSubject.pipe().subscribe(function (value) {
3726
2854
  _this.RecordsCountChanged(value);
3727
2855
  });
3728
2856
  };
3729
- /**
3730
- * @ignore
3731
- */
3732
2857
  TaskBaseMagicComponent.prototype.createFormControlsAccessor = function (formGroup) { };
3733
- /**
3734
- * @ignore
3735
- */
3736
2858
  TaskBaseMagicComponent.prototype.setInputDateFormat = function () { };
3737
- /**
3738
- * This method is called when the value of any custom property is updated in Magic
3739
- * propertyName : name of property which is updated. The format is <controlname>~<propertyname>
3740
- * rowId : row number of the updated property for controls in table control (0 for controls outside table)
3741
- * value : updated value of the property
3742
- * @returns : void
3743
- * To use the method override it in your component and check the property name and write you code ..for eg
3744
- * if(propertyName == 'controlname~propertyName') {// your code}
3745
- * else { // your code}
3746
- */
3747
2859
  TaskBaseMagicComponent.prototype.PropertyChanged = function (propertyName, rowId, value) {
3748
- // intentionally left blank because the implementation should be in the derived class
3749
- };
3750
- /**
3751
- * Records count change subject is subscribed to change in its value. This method will be called
3752
- * as the value of records count is received at from server.
3753
- * @returns : void
3754
- * To use the method override it in your component.
3755
- */
2860
+ };
3756
2861
  TaskBaseMagicComponent.prototype.RecordsCountChanged = function (recordsCount) {
3757
- // intentionally left blank because the implementation should be in the derived class
3758
2862
  };
3759
- /**
3760
- * Interface implementation
3761
- */
3762
2863
  TaskBaseMagicComponent.prototype.ngAfterViewInit = function () {
3763
2864
  this.mgSub.init();
3764
2865
  };
@@ -3768,17 +2869,14 @@
3768
2869
  this.task.oldPageSize = this.tableService.getPageSize();
3769
2870
  }
3770
2871
  };
3771
- /**
3772
- * Interface implementation
3773
- */
3774
2872
  TaskBaseMagicComponent.prototype.ngOnDestroy = function () {
3775
2873
  this.task.dispose();
3776
2874
  };
3777
2875
  return TaskBaseMagicComponent;
3778
2876
  }());
3779
- /** @nocollapse */ TaskBaseMagicComponent.ɵfac = function TaskBaseMagicComponent_Factory(t) { return new (t || TaskBaseMagicComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MagicServices)); };
3780
- /** @nocollapse */ TaskBaseMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TaskBaseMagicComponent, selectors: [["task-magic"]], inputs: { taskIdParam: "taskIdParam", taskDescription: "taskDescription" }, features: [i0.ɵɵProvidersFeature([TaskMagicService, SubformMagicService, TableMagicService])], decls: 0, vars: 0, template: function TaskBaseMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
3781
- /*@__PURE__*/ (function () {
2877
+ TaskBaseMagicComponent.ɵfac = function TaskBaseMagicComponent_Factory(t) { return new (t || TaskBaseMagicComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MagicServices)); };
2878
+ TaskBaseMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TaskBaseMagicComponent, selectors: [["task-magic"]], inputs: { taskIdParam: "taskIdParam", taskDescription: "taskDescription" }, features: [i0.ɵɵProvidersFeature([TaskMagicService, SubformMagicService, TableMagicService])], decls: 0, vars: 0, template: function TaskBaseMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
2879
+ (function () {
3782
2880
  i0.ɵsetClassMetadata(TaskBaseMagicComponent, [{
3783
2881
  type: i0.Component,
3784
2882
  args: [{
@@ -3793,22 +2891,13 @@
3793
2891
  }] });
3794
2892
  })();
3795
2893
 
3796
- /**
3797
- * @ignore
3798
- */
3799
2894
  var RowMagicDirective = /** @class */ (function () {
3800
2895
  function RowMagicDirective(_task, element) {
3801
2896
  this._task = _task;
3802
2897
  this.element = element;
3803
- /**
3804
- * @ignore
3805
- */
3806
2898
  this.rowChangedSubscriber = null;
3807
2899
  this.htmlElement = this.element.nativeElement;
3808
2900
  }
3809
- /**
3810
- * Initializes this object
3811
- */
3812
2901
  RowMagicDirective.prototype.ngOnInit = function () {
3813
2902
  var _this = this;
3814
2903
  this.rowChangedSubscriber = this._task
@@ -3824,16 +2913,7 @@
3824
2913
  return (rect.top >= parentRect.top &&
3825
2914
  rect.bottom <= parentRect.bottom);
3826
2915
  };
3827
- /**
3828
- * Cleanup
3829
- */
3830
2916
  RowMagicDirective.prototype.ngOnDestroy = function () {
3831
- // Don't know why, but when the table is loaded for the first time, we
3832
- // get ngOnInit() for the 1st row (rowId = "0") and then ngOnDestroy()
3833
- // for number of rows in the page but here this.rowId is undefined.
3834
- // Since ngOnInit() was not called for all these rows, this.rowChangedSubscriber
3835
- // is null and hence crashes.
3836
- // So, the condition to check nulity is added.
3837
2917
  if (this.rowChangedSubscriber !== null) {
3838
2918
  this.rowChangedSubscriber.unsubscribe();
3839
2919
  }
@@ -3846,13 +2926,13 @@
3846
2926
  };
3847
2927
  return RowMagicDirective;
3848
2928
  }());
3849
- /** @nocollapse */ RowMagicDirective.ɵfac = function RowMagicDirective_Factory(t) { return new (t || RowMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
3850
- /** @nocollapse */ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, selectors: [["", "magicRow", ""]], hostBindings: function RowMagicDirective_HostBindings(rf, ctx) {
2929
+ RowMagicDirective.ɵfac = function RowMagicDirective_Factory(t) { return new (t || RowMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
2930
+ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, selectors: [["", "magicRow", ""]], hostBindings: function RowMagicDirective_HostBindings(rf, ctx) {
3851
2931
  if (rf & 1) {
3852
2932
  i0.ɵɵlistener("click", function RowMagicDirective_click_HostBindingHandler($event) { return ctx.onClick($event); });
3853
2933
  }
3854
2934
  }, inputs: { rowId: ["magicRow", "rowId"] } });
3855
- /*@__PURE__*/ (function () {
2935
+ (function () {
3856
2936
  i0.ɵsetClassMetadata(RowMagicDirective, [{
3857
2937
  type: i0.Directive,
3858
2938
  args: [{
@@ -3867,35 +2947,16 @@
3867
2947
  }] });
3868
2948
  })();
3869
2949
 
3870
- /**
3871
- * Connects HTML elements to the Magic Web Client engine
3872
- */
3873
2950
  var MagicDirective = /** @class */ (function () {
3874
- /**
3875
- *
3876
- * @param _task The task service
3877
- * @param element The element for which the directive is applied
3878
- * @param renderer Renderer for the element
3879
- * @param vcRef
3880
- * @param magicRow
3881
- */
3882
2951
  function MagicDirective(_task, element, renderer, vcRef, magicRow) {
3883
2952
  this._task = _task;
3884
2953
  this.element = element;
3885
2954
  this.renderer = renderer;
3886
2955
  this.vcRef = vcRef;
3887
2956
  this.magicRow = magicRow;
3888
- /**
3889
- * Collection of event handlers for this element
3890
- */
3891
2957
  this.eventHandlers = {};
3892
2958
  this.eventsOnlyVal = false;
3893
2959
  this.htmlElement = this.element.nativeElement;
3894
- //let c = (<any>this.vcRef)._view;
3895
- //while (!(c instanceof TaskBaseMagicComponent)) {
3896
- // c = c.component;
3897
- //}
3898
- //this.component = c;
3899
2960
  if (!(typeof magicRow === 'undefined' || magicRow === null))
3900
2961
  this.rowId = magicRow.rowId;
3901
2962
  }
@@ -3909,9 +2970,6 @@
3909
2970
  });
3910
2971
  ;
3911
2972
  Object.defineProperty(MagicDirective.prototype, "eventsOnly", {
3912
- /**
3913
- * This flag is used when we only want to register to events, but do not want to execute commands sent from server
3914
- */
3915
2973
  set: function (val) {
3916
2974
  console.log('eventsOnly');
3917
2975
  this.eventsOnlyVal = true;
@@ -3921,31 +2979,25 @@
3921
2979
  });
3922
2980
  ;
3923
2981
  Object.defineProperty(MagicDirective.prototype, "task", {
3924
- /**
3925
- * Get the task service
3926
- * @returns
3927
- */
3928
2982
  get: function () {
3929
2983
  return this._task;
3930
2984
  },
3931
2985
  enumerable: false,
3932
2986
  configurable: true
3933
2987
  });
3934
- /**
3935
- * Register to the events this element may need to handle
3936
- */
3937
2988
  MagicDirective.prototype.regEvents = function () {
3938
2989
  var _this = this;
3939
- // Handle events for which event handler may be removed and restored
3940
2990
  this.eventHandlers['focusin'] = this.OnFocus.bind(this);
3941
2991
  Object.keys(this.eventHandlers).forEach(function (key) {
3942
2992
  _this.focusUnlistener = _this.renderer.listen(_this.htmlElement, key, _this.eventHandlers[key]);
3943
2993
  });
3944
- // Handle events with anonymous event handlers
3945
- var events = ['click', 'mousedown', 'dblclick']; // ,'resize', 'load', 'unload'
2994
+ var events = ['click', 'mousedown', 'dblclick'];
3946
2995
  events.forEach(function (event) {
3947
2996
  _this.renderer.listen(_this.htmlElement, event, function (e) {
3948
- _this.task.insertEvent(engine.getGuiEventObj(event, _this.id, +_this.rowId));
2997
+ var fromButton = false;
2998
+ if (_this.htmlElement instanceof HTMLButtonElement)
2999
+ fromButton = true;
3000
+ _this.task.insertEvent(engine.getGuiEventObj(event, _this.id, +_this.rowId, fromButton));
3949
3001
  e.cancelBubble = true;
3950
3002
  });
3951
3003
  });
@@ -3957,13 +3009,10 @@
3957
3009
  _this.task.insertEvent(guiEvent);
3958
3010
  }
3959
3011
  });
3960
- // handle the input event
3961
3012
  fromEvent.fromEvent(this.htmlElement, 'input').pipe(operators.map(function (event) {
3962
3013
  return event.target.value;
3963
- }), operators.debounceTime(200) // time after which value will be sent to magic
3964
- ).subscribe(function (x) {
3014
+ }), operators.debounceTime(200)).subscribe(function (x) {
3965
3015
  if (_this.task.getProperty(_this.id, gui.HtmlProperties.BindingLevel, _this.rowId) === utils$1.BindingLevel.Character) {
3966
- // Don't support character binding for date/time values
3967
3016
  var attribute = _this.task.Records.list[0].getControlMetadata(_this.id).dataType;
3968
3017
  if (attribute !== utils$1.StorageAttributeType.Date && attribute != utils$1.StorageAttributeType.Time)
3969
3018
  _this.task.mgAccessorService.setValueToControl(_this.id, x, true);
@@ -3989,25 +3038,16 @@
3989
3038
  (e.keyCode >= gui.GuiConstants.KEY_F1 && e.keyCode <= gui.GuiConstants.KEY_F12);
3990
3039
  if (guiEvent.modifiers !== gui.Modifiers.MODIFIER_NONE || supportedKey) {
3991
3040
  guiEvent.keyCode = e.keyCode;
3992
- // Defect 160021 fixed - don't set e.cancelBubble when combobox is opened and esc key is pressed
3993
3041
  if (e.keyCode !== gui.GuiConstants.KEY_ESC || e.keyCode === gui.GuiConstants.KEY_ESC && !MagicDirective.opened)
3994
3042
  e.cancelBubble = true;
3995
3043
  _this.task.insertEvent(guiEvent);
3996
3044
  }
3997
3045
  });
3998
3046
  };
3999
- /**
4000
- * Handle focus event
4001
- */
4002
3047
  MagicDirective.prototype.OnFocus = function () {
4003
3048
  this.task.insertEvent(engine.getGuiEventObj('focus', this.id, +this.rowId));
4004
3049
  event.cancelBubble = true;
4005
3050
  };
4006
- /**
4007
- * Is the command's element the same as this directive's element
4008
- * @param command
4009
- * @returns true/false
4010
- */
4011
3051
  MagicDirective.prototype.IsSameElement = function (command) {
4012
3052
  var line = command.line;
4013
3053
  if (this.task.isTableControl(command.CtrlName))
@@ -4016,17 +3056,9 @@
4016
3056
  (line === +this.rowId ||
4017
3057
  (line === 0 && util.isNullOrUndefined(this.rowId))));
4018
3058
  };
4019
- /**
4020
- * Is the command's element the same as this directive's component
4021
- * @param command
4022
- * @returns true/false
4023
- */
4024
3059
  MagicDirective.prototype.IsSameComponent = function (command) {
4025
3060
  return (command.controlName === this.id);
4026
3061
  };
4027
- /**
4028
- * @ignore
4029
- */
4030
3062
  MagicDirective.prototype.regUpdatesUI = function () {
4031
3063
  var _this = this;
4032
3064
  this.subscribeRefreshDom = this.task
@@ -4049,17 +3081,10 @@
4049
3081
  _this.handleInteractiveCommands(command);
4050
3082
  });
4051
3083
  };
4052
- /**
4053
- * Initializes this object
4054
- */
4055
3084
  MagicDirective.prototype.ngOnInit = function () {
4056
3085
  this.regEvents();
4057
3086
  this.regUpdatesUI();
4058
3087
  };
4059
- /**
4060
- * Handles the commands received from the Magic WebClient engine
4061
- * @param command
4062
- */
4063
3088
  MagicDirective.prototype.handleCommand = function (command) {
4064
3089
  switch (command.CommandType) {
4065
3090
  case gui.CommandType.SET_PROPERTY:
@@ -4067,14 +3092,12 @@
4067
3092
  break;
4068
3093
  case gui.CommandType.SET_FOCUS:
4069
3094
  this.focusUnlistener();
4070
- this.htmlElement.focus();
3095
+ if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
3096
+ this.htmlElement.focus();
4071
3097
  this.focusUnlistener = this.renderer.listen(this.htmlElement, 'focusin', this.eventHandlers['focusin']);
4072
3098
  break;
4073
3099
  }
4074
3100
  };
4075
- /**
4076
- * handle the interactive commands like CallJS
4077
- */
4078
3101
  MagicDirective.prototype.handleInteractiveCommands = function (command) {
4079
3102
  switch (command._commandType) {
4080
3103
  case gui.InteractiveCommandType.CALL_JS:
@@ -4084,24 +3107,18 @@
4084
3107
  var resultString = '';
4085
3108
  try {
4086
3109
  if (!util.isNullOrUndefined(magicComponent[methodName])) {
4087
- // invoke the method on instance of magic componenet
4088
3110
  resultString = magicComponent[methodName].apply(magicComponent, args);
4089
3111
  }
4090
3112
  else
4091
- console.error('Instance method ' + methodName + ' does not exists'); // when method is not found
3113
+ console.error('Instance method ' + methodName + ' does not exists');
4092
3114
  }
4093
3115
  catch (e) {
4094
- // any other exception
4095
3116
  console.error(e.message);
4096
3117
  }
4097
- command.resultString = resultString; // update the return value
3118
+ command.resultString = resultString;
4098
3119
  break;
4099
3120
  }
4100
3121
  };
4101
- /**
4102
- * Handle the Magic set-property command
4103
- * @param command
4104
- */
4105
3122
  MagicDirective.prototype.handleSetProperty = function (command) {
4106
3123
  switch (command.Operation) {
4107
3124
  case gui.HtmlProperties.ReadOnly:
@@ -4112,18 +3129,15 @@
4112
3129
  break;
4113
3130
  }
4114
3131
  };
4115
- /**
4116
- * Cleanup
4117
- */
4118
3132
  MagicDirective.prototype.ngOnDestroy = function () {
4119
3133
  this.subscribeRefreshDom.unsubscribe();
4120
3134
  };
4121
3135
  return MagicDirective;
4122
3136
  }());
4123
3137
  MagicDirective.opened = false;
4124
- /** @nocollapse */ MagicDirective.ɵfac = function MagicDirective_Factory(t) { return new (t || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4125
- /** @nocollapse */ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
4126
- /*@__PURE__*/ (function () {
3138
+ MagicDirective.ɵfac = function MagicDirective_Factory(t) { return new (t || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
3139
+ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
3140
+ (function () {
4127
3141
  i0.ɵsetClassMetadata(MagicDirective, [{
4128
3142
  type: i0.Directive,
4129
3143
  args: [{
@@ -4144,9 +3158,6 @@
4144
3158
  }] });
4145
3159
  })();
4146
3160
 
4147
- /**
4148
- * @ignore
4149
- */
4150
3161
  var NoControlMagicDirective = /** @class */ (function (_super) {
4151
3162
  __extends(NoControlMagicDirective, _super);
4152
3163
  function NoControlMagicDirective(_task, element, renderer, vcRef, magicRow) {
@@ -4187,12 +3198,10 @@
4187
3198
  }
4188
3199
  }
4189
3200
  };
4190
- // is the div a tab control
4191
3201
  NoControlMagicDirective.prototype.isTabControl = function () {
4192
3202
  return this.htmlElement instanceof HTMLDivElement &&
4193
3203
  this.htmlElement.children[0].getAttribute('magicMark') === "magicTabControl";
4194
3204
  };
4195
- // is the div a radio buttons wrapper
4196
3205
  NoControlMagicDirective.prototype.isRadio = function () {
4197
3206
  return this.htmlElement instanceof HTMLDivElement &&
4198
3207
  this.htmlElement.children[0].getAttribute('magicMark') === "magicRadio";
@@ -4201,7 +3210,6 @@
4201
3210
  _super.prototype.handleCommand.call(this, command);
4202
3211
  switch (command.CommandType) {
4203
3212
  case gui.CommandType.SET_CLASS:
4204
- //remove the class which was replaced by this new one, as registered in the ControlMetadata
4205
3213
  var controlMetadata = this._task.Records.list[0].getControlMetadata(this.id);
4206
3214
  if (controlMetadata.removedClass != '') {
4207
3215
  this.htmlElement.classList.remove(controlMetadata.removedClass);
@@ -4214,7 +3222,7 @@
4214
3222
  this.htmlElement.innerText = command.value;
4215
3223
  if (this.htmlElement instanceof HTMLSelectElement)
4216
3224
  this.htmlElement.value = command.value;
4217
- if (this.htmlElement instanceof HTMLAnchorElement) //hyper-text button
3225
+ if (this.htmlElement instanceof HTMLAnchorElement)
4218
3226
  this.htmlElement.text = command.value;
4219
3227
  if (this.htmlElement instanceof HTMLInputElement) {
4220
3228
  if (this.htmlElement.type === "checkbox") {
@@ -4238,7 +3246,6 @@
4238
3246
  break;
4239
3247
  }
4240
3248
  };
4241
- // handle set-property commands
4242
3249
  NoControlMagicDirective.prototype.handleSetProperty = function (command) {
4243
3250
  var e_1, _a;
4244
3251
  _super.prototype.handleSetProperty.call(this, command);
@@ -4255,7 +3262,6 @@
4255
3262
  break;
4256
3263
  case gui.HtmlProperties.ItemsList:
4257
3264
  if (this.htmlElement instanceof HTMLSelectElement) {
4258
- // clear the list
4259
3265
  var len = this.htmlElement.length;
4260
3266
  for (var i = len - 1; i >= 0; i--) {
4261
3267
  this.htmlElement.remove(i);
@@ -4307,8 +3313,7 @@
4307
3313
  var child = tabControl.children[i];
4308
3314
  var layer = child.getAttribute('layer') - 1;
4309
3315
  if (child instanceof HTMLButtonElement) {
4310
- // set button style
4311
- if (layer == command.obj1) { // compare int to string
3316
+ if (layer == command.obj1) {
4312
3317
  child.classList.add('tab_button_active');
4313
3318
  }
4314
3319
  else {
@@ -4316,7 +3321,6 @@
4316
3321
  }
4317
3322
  }
4318
3323
  else {
4319
- // not a buton - hide unselected tabpages
4320
3324
  var style = (layer == command.obj1) ? 'display: inline' : 'display: none';
4321
3325
  child.setAttribute('style', style);
4322
3326
  }
@@ -4339,9 +3343,9 @@
4339
3343
  };
4340
3344
  return NoControlMagicDirective;
4341
3345
  }(MagicDirective));
4342
- /** @nocollapse */ NoControlMagicDirective.ɵfac = function NoControlMagicDirective_Factory(t) { return new (t || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4343
- /** @nocollapse */ NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [i0.ɵɵInheritDefinitionFeature] });
4344
- /*@__PURE__*/ (function () {
3346
+ NoControlMagicDirective.ɵfac = function NoControlMagicDirective_Factory(t) { return new (t || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
3347
+ NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [i0.ɵɵInheritDefinitionFeature] });
3348
+ (function () {
4345
3349
  i0.ɵsetClassMetadata(NoControlMagicDirective, [{
4346
3350
  type: i0.Directive,
4347
3351
  args: [{
@@ -4357,20 +3361,7 @@
4357
3361
  }] });
4358
3362
  })();
4359
3363
 
4360
- /**
4361
- * Mock component, implements routing by connecting the requested URL with the appropriate Magic task
4362
- */
4363
3364
  var RouterContainerMagicComponent = /** @class */ (function () {
4364
- /**
4365
- *
4366
- * @param changeDetectorRef
4367
- * @param activatedRoute
4368
- * @param magic
4369
- * @param componentFactoryResolver
4370
- * @param viewContainerRef
4371
- * @param componentList
4372
- * @param pendingCommandsCollector
4373
- */
4374
3365
  function RouterContainerMagicComponent(activatedRoute, magic, containerTaskService, componentFactoryResolver, viewContainerRef, componentList, pendingCommandsCollector, routerCommandsMagicService) {
4375
3366
  this.activatedRoute = activatedRoute;
4376
3367
  this.magic = magic;
@@ -4383,9 +3374,6 @@
4383
3374
  this.componentRef = null;
4384
3375
  this.parentMgSubformService = null;
4385
3376
  }
4386
- /**
4387
- * Initialization
4388
- */
4389
3377
  RouterContainerMagicComponent.prototype.ngOnInit = function () {
4390
3378
  var outletname = this.activatedRoute.outlet;
4391
3379
  var subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
@@ -4403,10 +3391,7 @@
4403
3391
  guiEvent.RouterPath = currentActiveRoute.snapshot.routeConfig.path;
4404
3392
  if (currentActiveRoute.snapshot.outlet !== 'primary')
4405
3393
  guiEvent.RouterOutletName = currentActiveRoute.snapshot.outlet;
4406
- // if this is LoadOnDemandModuleMagicComponent it's mean that this is load on demand module and we
4407
- // need to take the path form routeConfig.path
4408
3394
  var calcRouterPath = currentActiveRoute.routeConfig.path;
4409
- // add the RouterPath only if exist
4410
3395
  if (calcRouterPath.length > 0) {
4411
3396
  var routerPath = calcRouterPath;
4412
3397
  var tokens = utils$1.StrUtil.tokenize(routerPath, "/:");
@@ -4420,7 +3405,6 @@
4420
3405
  };
4421
3406
  RouterContainerMagicComponent.prototype.initializeComponent = function () {
4422
3407
  var _this = this;
4423
- // re-init subformMagicService since it may change after executing "RouterNavigate" event.
4424
3408
  var subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
4425
3409
  if (subformMagicService.currentRouteDefinition !== null) {
4426
3410
  var comp = this.componentList.getComponent(subformMagicService.currentRouteDefinition.formName);
@@ -4433,9 +3417,6 @@
4433
3417
  this.parentMgSubformService = subformMagicService;
4434
3418
  subformMagicService.currentRouteDefinition = null;
4435
3419
  SubformMagicService.currentCallerMgSubformServiceRef = null;
4436
- //When the component is initialized, then also we get the notification for paramMap subscription.
4437
- //But in this case, we do not have to raise the event, because magic engine itself has initiated the route with the same parameters.
4438
- //So, control it via ignoreParamChange flag.
4439
3420
  var ignoreParamChange_1 = true;
4440
3421
  myActiveRoute_1.paramMap.subscribe(function (params) {
4441
3422
  if (!ignoreParamChange_1)
@@ -4446,12 +3427,7 @@
4446
3427
  this.routerCommandsMagicService.ExecuteNextCommand();
4447
3428
  }
4448
3429
  };
4449
- /**
4450
- * Cleanup
4451
- */
4452
3430
  RouterContainerMagicComponent.prototype.ngOnDestroy = function () {
4453
- // TODO Routing: Call close() only if the task is not already closed.
4454
- // Task can be closed when a router is overlayed by another task via call operation.
4455
3431
  if (this.componentRef != null) {
4456
3432
  this.componentRef.instance.task.close();
4457
3433
  var currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
@@ -4460,9 +3436,9 @@
4460
3436
  };
4461
3437
  return RouterContainerMagicComponent;
4462
3438
  }());
4463
- /** @nocollapse */ RouterContainerMagicComponent.ɵfac = function RouterContainerMagicComponent_Factory(t) { return new (t || RouterContainerMagicComponent)(i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(RouterCommandsMagicService)); };
4464
- /** @nocollapse */ RouterContainerMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RouterContainerMagicComponent, selectors: [["magic-route-outlet"]], decls: 0, vars: 0, template: function RouterContainerMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
4465
- /*@__PURE__*/ (function () {
3439
+ RouterContainerMagicComponent.ɵfac = function RouterContainerMagicComponent_Factory(t) { return new (t || RouterContainerMagicComponent)(i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(RouterCommandsMagicService)); };
3440
+ RouterContainerMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RouterContainerMagicComponent, selectors: [["magic-route-outlet"]], decls: 0, vars: 0, template: function RouterContainerMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
3441
+ (function () {
4466
3442
  i0.ɵsetClassMetadata(RouterContainerMagicComponent, [{
4467
3443
  type: i0.Component,
4468
3444
  args: [{
@@ -4472,18 +3448,12 @@
4472
3448
  }], function () { return [{ type: i2.ActivatedRoute }, { type: EngineMagicService }, { type: TaskMagicService }, { type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: RouterCommandsMagicService }]; }, null);
4473
3449
  })();
4474
3450
 
4475
- /**
4476
- * @ignore
4477
- */
4478
3451
  var Constants = /** @class */ (function () {
4479
3452
  function Constants() {
4480
3453
  }
4481
3454
  return Constants;
4482
3455
  }());
4483
3456
  Constants.DATE_FMT = 'dd/MMM/yyyy';
4484
- /**
4485
- * @ignore
4486
- */
4487
3457
  var DateMagicPipe = /** @class */ (function (_super) {
4488
3458
  __extends(DateMagicPipe, _super);
4489
3459
  function DateMagicPipe(_task) {
@@ -4497,7 +3467,6 @@
4497
3467
  var mgDateFormatter = new MgDateFormatter();
4498
3468
  if (!util.isNullOrUndefined(value) && mask !== null) {
4499
3469
  formatStr = mgDateFormatter.ConvertMgDateFormatToAngular(mask);
4500
- // If control is label control of table, due to query mode, then save the format here.
4501
3470
  if (formatStr != null && this._task.isTableControl(controlId)) {
4502
3471
  if (this._task.mgInputDateFormat == null)
4503
3472
  this._task.mgInputDateFormat = formatStr;
@@ -4512,9 +3481,9 @@
4512
3481
  };
4513
3482
  return DateMagicPipe;
4514
3483
  }(i1.DatePipe));
4515
- /** @nocollapse */ DateMagicPipe.ɵfac = function DateMagicPipe_Factory(t) { return new (t || DateMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService)); };
4516
- /** @nocollapse */ DateMagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicDate", type: DateMagicPipe, pure: true });
4517
- /*@__PURE__*/ (function () {
3484
+ DateMagicPipe.ɵfac = function DateMagicPipe_Factory(t) { return new (t || DateMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService)); };
3485
+ DateMagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicDate", type: DateMagicPipe, pure: true });
3486
+ (function () {
4518
3487
  i0.ɵsetClassMetadata(DateMagicPipe, [{
4519
3488
  type: i0.Pipe,
4520
3489
  args: [{
@@ -4583,18 +3552,12 @@
4583
3552
  return formatStr.ToString();
4584
3553
  }
4585
3554
  else
4586
- return "dd-mm-yyyy"; // return default format.
3555
+ return "dd-mm-yyyy";
4587
3556
  };
4588
3557
  return MgDateFormatter;
4589
3558
  }());
4590
3559
 
4591
- /**
4592
- * Perform Magic validation on input controls which hold alphanumeric strings
4593
- */
4594
3560
  var MgformatMagicDirective = /** @class */ (function () {
4595
- /**
4596
- * @ignore
4597
- */
4598
3561
  function MgformatMagicDirective(magicDir, _task) {
4599
3562
  this.magicDir = magicDir;
4600
3563
  this._task = _task;
@@ -4602,20 +3565,12 @@
4602
3565
  MgformatMagicDirective.prototype.ngAfterViewInit = function () {
4603
3566
  var control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
4604
3567
  if (control != null && this._task.mgInputDateFormat == null) {
4605
- // get the first date control's format.
4606
3568
  var pic = this._task.GetControlPictureMask(this.magicDir.id);
4607
3569
  if (pic.getAttr() == utils$1.StorageAttribute.DATE) {
4608
3570
  this.formatDate(pic);
4609
3571
  }
4610
3572
  }
4611
3573
  };
4612
- /**
4613
- * @ignore
4614
- */
4615
- /**
4616
- * This can be used to set pattern
4617
- * On input, verifies the input matches the required mask
4618
- */
4619
3574
  MgformatMagicDirective.prototype.onFocusEvent = function ($event) {
4620
3575
  var control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
4621
3576
  if (control != null) {
@@ -4640,10 +3595,6 @@
4640
3595
  }
4641
3596
  }
4642
3597
  };
4643
- /**
4644
- * @ignore
4645
- */
4646
- // This can be used to implement uppercase/lower case
4647
3598
  MgformatMagicDirective.prototype.onChangeEvent = function ($event) {
4648
3599
  var control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
4649
3600
  var attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
@@ -4661,9 +3612,6 @@
4661
3612
  var mgDateFormatter = new MgDateFormatter();
4662
3613
  this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
4663
3614
  };
4664
- /**
4665
- * @ignore
4666
- */
4667
3615
  MgformatMagicDirective.prototype.formatAlphaUnicode = function (control) {
4668
3616
  var value = control.value;
4669
3617
  if (value !== null && value.length > 0) {
@@ -4689,9 +3637,6 @@
4689
3637
  control.setValue(valueStr.ToString());
4690
3638
  }
4691
3639
  };
4692
- /**
4693
- * @ignore
4694
- */
4695
3640
  MgformatMagicDirective.prototype.formatBoolean = function (control) {
4696
3641
  var value = control.value;
4697
3642
  if (value !== null && value.length > 0) {
@@ -4704,12 +3649,6 @@
4704
3649
  }
4705
3650
  }
4706
3651
  };
4707
- /**
4708
- * @ignore
4709
- */
4710
- /// <summary>
4711
- /// generate pattern from fld's format
4712
- /// </summary>
4713
3652
  MgformatMagicDirective.prototype.generatePattern = function (attribute, pic) {
4714
3653
  var pattern = "";
4715
3654
  switch (attribute) {
@@ -4723,12 +3662,6 @@
4723
3662
  }
4724
3663
  return pattern;
4725
3664
  };
4726
- /**
4727
- * @ignore
4728
- */
4729
- /// <summary>
4730
- /// generate pattern for Alpha
4731
- /// </summary>
4732
3665
  MgformatMagicDirective.prototype.generatePatternForNumber = function (pic) {
4733
3666
  var patternStr = new mscorelib.StringBuilder();
4734
3667
  patternStr.Append("^");
@@ -4741,9 +3674,6 @@
4741
3674
  patternStr.Append("$");
4742
3675
  return patternStr.ToString();
4743
3676
  };
4744
- /**
4745
- * @ignore
4746
- */
4747
3677
  MgformatMagicDirective.prototype.isPatternGenerationNeeded = function (attr, pic) {
4748
3678
  switch (attr) {
4749
3679
  case utils$1.StorageAttribute.NUMERIC:
@@ -4753,12 +3683,6 @@
4753
3683
  return (pic.getMaskChars() > 0) ? true : false;
4754
3684
  }
4755
3685
  };
4756
- /**
4757
- * @ignore
4758
- */
4759
- /// <summary>
4760
- /// generate pattern for Alpha
4761
- /// </summary>
4762
3686
  MgformatMagicDirective.prototype.generatePatternForAlpha = function (pic) {
4763
3687
  var cnt = 0;
4764
3688
  var inputAllChars = false;
@@ -4769,7 +3693,6 @@
4769
3693
  var pattern = new mscorelib.StringBuilder();
4770
3694
  pattern.Append("^");
4771
3695
  for (var i = 0; i < mask.length;) {
4772
- //start new subset , if mask[i] is one of these.
4773
3696
  if (inputAllChars && (mask.charCodeAt(i) == utils$1.PICInterface.PIC_N || mask.charCodeAt(i) == utils$1.PICInterface.PIC_U || mask.charCodeAt(i) == utils$1.PICInterface.PIC_L
4774
3697
  || mask.charCodeAt(i) == utils$1.PICInterface.PIC_X)) {
4775
3698
  pattern.Append("(");
@@ -4815,13 +3738,9 @@
4815
3738
  pattern.Append("$");
4816
3739
  return pattern.ToString();
4817
3740
  };
4818
- /**
4819
- * @ignore
4820
- */
4821
3741
  MgformatMagicDirective.prototype.getDirectiveCount = function (mask, idx, pattern, changeInPattern) {
4822
3742
  changeInPattern.value = false;
4823
3743
  var patternCount = 0;
4824
- // find max chars
4825
3744
  while (idx < mask.length && this.IsPatternMatches(mask.charCodeAt(idx).toString(), pattern)) {
4826
3745
  patternCount++;
4827
3746
  idx++;
@@ -4830,9 +3749,6 @@
4830
3749
  changeInPattern.value = true;
4831
3750
  return patternCount;
4832
3751
  };
4833
- /**
4834
- * @ignore
4835
- */
4836
3752
  MgformatMagicDirective.prototype.IsPatternMatches = function (mask, pattern) {
4837
3753
  for (var i = 0; i < pattern.length; i++)
4838
3754
  if (mask == pattern[i])
@@ -4841,13 +3757,13 @@
4841
3757
  };
4842
3758
  return MgformatMagicDirective;
4843
3759
  }());
4844
- /** @nocollapse */ MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
4845
- /** @nocollapse */ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) {
3760
+ MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
3761
+ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) {
4846
3762
  if (rf & 1) {
4847
3763
  i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
4848
3764
  }
4849
3765
  } });
4850
- /*@__PURE__*/ (function () {
3766
+ (function () {
4851
3767
  i0.ɵsetClassMetadata(MgformatMagicDirective, [{
4852
3768
  type: i0.Directive,
4853
3769
  args: [{
@@ -4862,9 +3778,6 @@
4862
3778
  }] });
4863
3779
  })();
4864
3780
 
4865
- /**
4866
- * @ignore
4867
- */
4868
3781
  var TimeMagicPipe = /** @class */ (function (_super) {
4869
3782
  __extends(TimeMagicPipe, _super);
4870
3783
  function TimeMagicPipe(_task) {
@@ -4903,9 +3816,9 @@
4903
3816
  };
4904
3817
  return TimeMagicPipe;
4905
3818
  }(i1.DatePipe));
4906
- /** @nocollapse */ TimeMagicPipe.ɵfac = function TimeMagicPipe_Factory(t) { return new (t || TimeMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService)); };
4907
- /** @nocollapse */ TimeMagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicTime", type: TimeMagicPipe, pure: true });
4908
- /*@__PURE__*/ (function () {
3819
+ TimeMagicPipe.ɵfac = function TimeMagicPipe_Factory(t) { return new (t || TimeMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService)); };
3820
+ TimeMagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicTime", type: TimeMagicPipe, pure: true });
3821
+ (function () {
4909
3822
  i0.ɵsetClassMetadata(TimeMagicPipe, [{
4910
3823
  type: i0.Pipe,
4911
3824
  args: [{
@@ -4914,24 +3827,11 @@
4914
3827
  }], function () { return [{ type: TaskMagicService }]; }, null);
4915
3828
  })();
4916
3829
 
4917
- /**
4918
- * Validates the field range.
4919
- */
4920
3830
  var RangeValidatorMagicDirective = /** @class */ (function () {
4921
- /**
4922
- *
4923
- * @param _task The task service
4924
- * @param vcRef
4925
- */
4926
3831
  function RangeValidatorMagicDirective(_task, vcRef) {
4927
3832
  this._task = _task;
4928
3833
  this.vcRef = vcRef;
4929
3834
  }
4930
- /**
4931
- * Validation method
4932
- * @param c FormControl to validate
4933
- * @returns If validation fails, return error message, else returns null
4934
- */
4935
3835
  RangeValidatorMagicDirective.prototype.validate = function (c) {
4936
3836
  var controlName;
4937
3837
  controlName = this.getControlName(c);
@@ -4953,24 +3853,21 @@
4953
3853
  };
4954
3854
  }
4955
3855
  };
4956
- /**
4957
- * @ignore
4958
- */
4959
3856
  RangeValidatorMagicDirective.prototype.getControlName = function (c) {
4960
3857
  var formGroup = c.parent.controls;
4961
3858
  return Object.keys(formGroup).find(function (name) { return c === formGroup[name]; }) || null;
4962
3859
  };
4963
3860
  return RangeValidatorMagicDirective;
4964
3861
  }());
4965
- /** @nocollapse */ RangeValidatorMagicDirective.ɵfac = function RangeValidatorMagicDirective_Factory(t) { return new (t || RangeValidatorMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
4966
- /** @nocollapse */ RangeValidatorMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RangeValidatorMagicDirective, selectors: [["", "rangevalidator", ""]], features: [i0.ɵɵProvidersFeature([
3862
+ RangeValidatorMagicDirective.ɵfac = function RangeValidatorMagicDirective_Factory(t) { return new (t || RangeValidatorMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
3863
+ RangeValidatorMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RangeValidatorMagicDirective, selectors: [["", "rangevalidator", ""]], features: [i0.ɵɵProvidersFeature([
4967
3864
  {
4968
3865
  provide: forms.NG_VALIDATORS,
4969
3866
  useExisting: RangeValidatorMagicDirective,
4970
3867
  multi: true,
4971
3868
  }
4972
3869
  ])] });
4973
- /*@__PURE__*/ (function () {
3870
+ (function () {
4974
3871
  i0.ɵsetClassMetadata(RangeValidatorMagicDirective, [{
4975
3872
  type: i0.Directive,
4976
3873
  args: [{
@@ -4995,36 +3892,20 @@
4995
3892
  i0.ɵɵproperty("ndcDynamicComponent", ctx_r0.Component)("ndcDynamicInputs", ctx_r0.Parameters);
4996
3893
  }
4997
3894
  }
4998
- /**
4999
- * Represents a Magic subform
5000
- */
5001
3895
  var SubformMagicComponent = /** @class */ (function () {
5002
- /**
5003
- * @ignore
5004
- */
5005
3896
  function SubformMagicComponent(vcRef, mgSub) {
5006
3897
  this.vcRef = vcRef;
5007
3898
  this.mgSub = mgSub;
5008
- /**
5009
- * @ignore
5010
- */
5011
3899
  this.component = null;
5012
- // For angular 10 - find the component from views
5013
3900
  this.component = (this.vcRef._hostView).find(function (v) { return !util.isNullOrUndefined(v); });
5014
3901
  }
5015
3902
  Object.defineProperty(SubformMagicComponent.prototype, "magic", {
5016
- /**
5017
- * @ignore
5018
- */
5019
3903
  set: function (val) { this.id = val; },
5020
3904
  enumerable: false,
5021
3905
  configurable: true
5022
3906
  });
5023
3907
  ;
5024
3908
  Object.defineProperty(SubformMagicComponent.prototype, "Component", {
5025
- /**
5026
- * @ignore
5027
- */
5028
3909
  get: function () {
5029
3910
  return this.mgSub.mgGetComp(this.id);
5030
3911
  },
@@ -5032,9 +3913,6 @@
5032
3913
  configurable: true
5033
3914
  });
5034
3915
  Object.defineProperty(SubformMagicComponent.prototype, "Parameters", {
5035
- /**
5036
- * @ignore
5037
- */
5038
3916
  get: function () {
5039
3917
  return this.mgSub.mgGetParameters(this.id);
5040
3918
  },
@@ -5043,8 +3921,8 @@
5043
3921
  });
5044
3922
  return SubformMagicComponent;
5045
3923
  }());
5046
- /** @nocollapse */ SubformMagicComponent.ɵfac = function SubformMagicComponent_Factory(t) { return new (t || SubformMagicComponent)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(SubformMagicService)); };
5047
- /** @nocollapse */ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicComponent, selectors: [["magic-subform"]], inputs: { magic: "magic" }, decls: 1, vars: 1, consts: [[3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], [3, "ndcDynamicComponent", "ndcDynamicInputs"]], template: function SubformMagicComponent_Template(rf, ctx) {
3924
+ SubformMagicComponent.ɵfac = function SubformMagicComponent_Factory(t) { return new (t || SubformMagicComponent)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(SubformMagicService)); };
3925
+ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicComponent, selectors: [["magic-subform"]], inputs: { magic: "magic" }, decls: 1, vars: 1, consts: [[3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], [3, "ndcDynamicComponent", "ndcDynamicInputs"]], template: function SubformMagicComponent_Template(rf, ctx) {
5048
3926
  if (rf & 1) {
5049
3927
  i0.ɵɵtemplate(0, SubformMagicComponent_ndc_dynamic_0_Template, 1, 2, "ndc-dynamic", 0);
5050
3928
  }
@@ -5052,7 +3930,7 @@
5052
3930
  i0.ɵɵproperty("ngIf", ctx.Component);
5053
3931
  }
5054
3932
  }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
5055
- /*@__PURE__*/ (function () {
3933
+ (function () {
5056
3934
  i0.ɵsetClassMetadata(SubformMagicComponent, [{
5057
3935
  type: i0.Component,
5058
3936
  args: [{
@@ -5094,25 +3972,15 @@
5094
3972
  }
5095
3973
  }
5096
3974
  var _c1$1 = ["*"];
5097
- /**
5098
- * Represents a Magic subform
5099
- */
5100
3975
  var ErrorMagicComponent = /** @class */ (function () {
5101
- /**
5102
- * @ignore
5103
- */
5104
3976
  function ErrorMagicComponent(_task, mgService, changeDetectorRef) {
5105
3977
  this._task = _task;
5106
3978
  this.mgService = mgService;
5107
3979
  this.changeDetectorRef = changeDetectorRef;
5108
- // if true - display standard magic error message, if false - customer has provides his own content and we'll use it
5109
3980
  this.defaultDisplay = true;
5110
3981
  this.rowId = "0";
5111
3982
  }
5112
3983
  Object.defineProperty(ErrorMagicComponent.prototype, "magic", {
5113
- /**
5114
- * @ignore
5115
- */
5116
3984
  set: function (val) {
5117
3985
  this.id = val;
5118
3986
  },
@@ -5137,10 +4005,6 @@
5137
4005
  configurable: true
5138
4006
  });
5139
4007
  ;
5140
- /**
5141
- * returns true if the html element has no children
5142
- * @param element
5143
- */
5144
4008
  ErrorMagicComponent.prototype.isEmpty = function (element) {
5145
4009
  var nodes = element.childNodes;
5146
4010
  for (var i = 0; i < nodes.length; i++) {
@@ -5151,9 +4015,6 @@
5151
4015
  }
5152
4016
  return true;
5153
4017
  };
5154
- /**
5155
- * @ignore
5156
- */
5157
4018
  ErrorMagicComponent.prototype.HasErrors = function (id) {
5158
4019
  var e_1, _a;
5159
4020
  if (!util.isUndefined(id)) {
@@ -5187,8 +4048,8 @@
5187
4048
  };
5188
4049
  return ErrorMagicComponent;
5189
4050
  }());
5190
- /** @nocollapse */ ErrorMagicComponent.ɵfac = function ErrorMagicComponent_Factory(t) { return new (t || ErrorMagicComponent)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(AccessorMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
5191
- /** @nocollapse */ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent, selectors: [["mgError"]], viewQuery: function ErrorMagicComponent_Query(rf, ctx) {
4051
+ ErrorMagicComponent.ɵfac = function ErrorMagicComponent_Factory(t) { return new (t || ErrorMagicComponent)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(AccessorMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
4052
+ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent, selectors: [["mgError"]], viewQuery: function ErrorMagicComponent_Query(rf, ctx) {
5192
4053
  if (rf & 1) {
5193
4054
  i0.ɵɵviewQuery(_c0$2, true);
5194
4055
  }
@@ -5205,7 +4066,7 @@
5205
4066
  i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
5206
4067
  }
5207
4068
  }, directives: [i1.NgIf], encapsulation: 2 });
5208
- /*@__PURE__*/ (function () {
4069
+ (function () {
5209
4070
  i0.ɵsetClassMetadata(ErrorMagicComponent, [{
5210
4071
  type: i0.Component,
5211
4072
  args: [{
@@ -5224,31 +4085,22 @@
5224
4085
  }] });
5225
4086
  })();
5226
4087
 
5227
- /**
5228
- * Directive for checkboxes, to handle the 'change' event
5229
- */
5230
4088
  var CheckboxMagicDirective = /** @class */ (function () {
5231
- /**
5232
- * @ignore
5233
- */
5234
4089
  function CheckboxMagicDirective(magicDirective) {
5235
4090
  this.magicDirective = magicDirective;
5236
4091
  }
5237
- /**
5238
- * Handles the Checkbox 'change' event - pass it to the Magic engine
5239
- */
5240
4092
  CheckboxMagicDirective.prototype.onChange = function ($event) {
5241
4093
  this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
5242
4094
  };
5243
4095
  return CheckboxMagicDirective;
5244
4096
  }());
5245
- /** @nocollapse */ CheckboxMagicDirective.ɵfac = function CheckboxMagicDirective_Factory(t) { return new (t || CheckboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
5246
- /** @nocollapse */ CheckboxMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: CheckboxMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function CheckboxMagicDirective_HostBindings(rf, ctx) {
4097
+ CheckboxMagicDirective.ɵfac = function CheckboxMagicDirective_Factory(t) { return new (t || CheckboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
4098
+ CheckboxMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: CheckboxMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function CheckboxMagicDirective_HostBindings(rf, ctx) {
5247
4099
  if (rf & 1) {
5248
4100
  i0.ɵɵlistener("change", function CheckboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
5249
4101
  }
5250
4102
  } });
5251
- /*@__PURE__*/ (function () {
4103
+ (function () {
5252
4104
  i0.ɵsetClassMetadata(CheckboxMagicDirective, [{
5253
4105
  type: i0.Directive,
5254
4106
  args: [{
@@ -5260,28 +4112,22 @@
5260
4112
  }] });
5261
4113
  })();
5262
4114
 
5263
- /**
5264
- * Directive for comboboxes, to handle the 'change' event
5265
- */
5266
4115
  var ComboboxMagicDirective = /** @class */ (function () {
5267
4116
  function ComboboxMagicDirective(magicDirective) {
5268
4117
  this.magicDirective = magicDirective;
5269
4118
  }
5270
- /**
5271
- * Handles the Combobox 'change' event - pass it to the Magic engine
5272
- */
5273
4119
  ComboboxMagicDirective.prototype.onChange = function ($event) {
5274
4120
  this.magicDirective.task.onComboboxSelectionChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
5275
4121
  };
5276
4122
  return ComboboxMagicDirective;
5277
4123
  }());
5278
- /** @nocollapse */ ComboboxMagicDirective.ɵfac = function ComboboxMagicDirective_Factory(t) { return new (t || ComboboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
5279
- /** @nocollapse */ ComboboxMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: ComboboxMagicDirective, selectors: [["select", "magic", "", 3, "multiple", ""]], hostBindings: function ComboboxMagicDirective_HostBindings(rf, ctx) {
4124
+ ComboboxMagicDirective.ɵfac = function ComboboxMagicDirective_Factory(t) { return new (t || ComboboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
4125
+ ComboboxMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: ComboboxMagicDirective, selectors: [["select", "magic", "", 3, "multiple", ""]], hostBindings: function ComboboxMagicDirective_HostBindings(rf, ctx) {
5280
4126
  if (rf & 1) {
5281
4127
  i0.ɵɵlistener("change", function ComboboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
5282
4128
  }
5283
4129
  } });
5284
- /*@__PURE__*/ (function () {
4130
+ (function () {
5285
4131
  i0.ɵsetClassMetadata(ComboboxMagicDirective, [{
5286
4132
  type: i0.Directive,
5287
4133
  args: [{
@@ -5293,23 +4139,17 @@
5293
4139
  }] });
5294
4140
  })();
5295
4141
 
5296
- /**
5297
- * This service supports custom actions on magic exit
5298
- */
5299
4142
  var ExitMagicService = /** @class */ (function () {
5300
4143
  function ExitMagicService() {
5301
4144
  }
5302
- /**
5303
- * Override this method to implement custom logic on magic exit
5304
- */
5305
4145
  ExitMagicService.prototype.exitMagic = function () {
5306
4146
  console.log("Magic application terminated");
5307
4147
  };
5308
4148
  return ExitMagicService;
5309
4149
  }());
5310
- /** @nocollapse */ ExitMagicService.ɵfac = function ExitMagicService_Factory(t) { return new (t || ExitMagicService)(); };
5311
- /** @nocollapse */ ExitMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: ExitMagicService, factory: ExitMagicService.ɵfac });
5312
- /*@__PURE__*/ (function () {
4150
+ ExitMagicService.ɵfac = function ExitMagicService_Factory(t) { return new (t || ExitMagicService)(); };
4151
+ ExitMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: ExitMagicService, factory: ExitMagicService.ɵfac });
4152
+ (function () {
5313
4153
  i0.ɵsetClassMetadata(ExitMagicService, [{
5314
4154
  type: i0.Injectable
5315
4155
  }], null, null);
@@ -5343,19 +4183,7 @@
5343
4183
  i0.ɵɵelement(0, "div", 9);
5344
4184
  }
5345
4185
  }
5346
- /**
5347
- * Root Magic component
5348
- */
5349
4186
  var MagicShellComponent = /** @class */ (function () {
5350
- /**
5351
- *
5352
- * @param magic Magic's service
5353
- * @param componentList Magic component list
5354
- * @param changeDetectorRef Changes detector
5355
- * @param titleService Title setting service
5356
- * @param httpClient The native httpClient instance
5357
- * @param exitMagicService Magic exit service
5358
- */
5359
4187
  function MagicShellComponent(engineMagicService, componentList, changeDetectorRef, titleService, overlayWindowService, httpClient, pendingCommandsCollector, exitMagicService) {
5360
4188
  this.engineMagicService = engineMagicService;
5361
4189
  this.componentList = componentList;
@@ -5365,32 +4193,22 @@
5365
4193
  this.httpClient = httpClient;
5366
4194
  this.pendingCommandsCollector = pendingCommandsCollector;
5367
4195
  this.exitMagicService = exitMagicService;
5368
- /**
5369
- * Root component to be displayed in the window
5370
- */
5371
4196
  this.RootComponent = null;
5372
4197
  this.magicEngineTerminated = false;
5373
4198
  this.initialize();
5374
4199
  this.setTitle();
5375
4200
  }
5376
- /**
5377
- * Before-unload event listener
5378
- * @param event
5379
- */
5380
4201
  MagicShellComponent.prototype.onBeforeUnload = function (event) {
5381
4202
  if (this.engineMagicService.TransCacheExists()) {
5382
- // Show the confirmation box before unloading the browser
5383
4203
  event.returnValue = 'Are you sure?';
5384
4204
  return 'Are you sure?';
5385
4205
  }
5386
4206
  else {
5387
- // terminate the magic server context using fetch API with keep-alive
5388
4207
  this.engineMagicService.TerminateContextUsingFetchAPI();
5389
4208
  this.magicEngineTerminated = true;
5390
4209
  }
5391
4210
  };
5392
4211
  MagicShellComponent.prototype.onUnload = function (event) {
5393
- // Chrome provides an opportunity to terminate the context after user approves the browser unload alert
5394
4212
  if (!this.magicEngineTerminated)
5395
4213
  this.engineMagicService.TerminateContextUsingFetchAPI();
5396
4214
  };
@@ -5401,26 +4219,13 @@
5401
4219
  MagicShellComponent.prototype.setViewContainerRef = function (vcRef) {
5402
4220
  this.overlayWindowsContainerViewRef = vcRef;
5403
4221
  };
5404
- /**
5405
- * Initialization of Magic mechanisms
5406
- */
5407
4222
  MagicShellComponent.prototype.initialize = function () {
5408
4223
  this.registerUICommands();
5409
4224
  };
5410
- /**
5411
- * Set the title
5412
- */
5413
4225
  MagicShellComponent.prototype.setTitle = function () {
5414
4226
  var newTitle = this.componentList.title;
5415
4227
  this.titleService.setTitle(newTitle);
5416
4228
  };
5417
- /**
5418
- * Set the component according to requested form
5419
- * @param formName Name of the form to open
5420
- * @param taskId Id of opening task
5421
- * @param taskDescription TODO
5422
- * @param isModal whether modal window is being opened
5423
- */
5424
4229
  MagicShellComponent.prototype.setComponent = function (formName, taskId, taskDescription, isModal) {
5425
4230
  this.pendingCommandsCollector.startCollecting();
5426
4231
  if (isModal) {
@@ -5432,9 +4237,6 @@
5432
4237
  }
5433
4238
  this.changeDetectorRef.detectChanges();
5434
4239
  };
5435
- /**
5436
- * @ignore
5437
- */
5438
4240
  MagicShellComponent.prototype.registerUICommands = function () {
5439
4241
  var _this = this;
5440
4242
  this.engineMagicService.refreshDom.pipe(operators.filter(function (command) { return command.TaskTag === '0'; }))
@@ -5447,10 +4249,6 @@
5447
4249
  GuiInteractiveExecutor.executeInteractiveCommand(null, command, _this.overlayWindowService);
5448
4250
  });
5449
4251
  };
5450
- /**
5451
- * Execute commands received from the Magic WebClient engine
5452
- * @param command
5453
- */
5454
4252
  MagicShellComponent.prototype.executeCommand = function (command) {
5455
4253
  switch (command.CommandType) {
5456
4254
  case gui.CommandType.OPEN_FORM:
@@ -5465,7 +4263,7 @@
5465
4263
  this.RootComponentParameters = {};
5466
4264
  this.changeDetectorRef.detectChanges();
5467
4265
  }
5468
- else { // Close modal window
4266
+ else {
5469
4267
  this.overlayWindowService.close(command.str);
5470
4268
  this.changeDetectorRef.detectChanges();
5471
4269
  }
@@ -5483,12 +4281,15 @@
5483
4281
  if (this.exitMagicService)
5484
4282
  this.exitMagicService.exitMagic();
5485
4283
  break;
4284
+ case gui.CommandType.SHOW_HTML_ERROR:
4285
+ window.document.write(command.str);
4286
+ break;
5486
4287
  }
5487
4288
  };
5488
4289
  return MagicShellComponent;
5489
4290
  }());
5490
- /** @nocollapse */ MagicShellComponent.ɵfac = function MagicShellComponent_Factory(t) { return new (t || MagicShellComponent)(i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.Title), i0.ɵɵdirectiveInject(OverlayWindowService), i0.ɵɵdirectiveInject(i5.HttpClient), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(ExitMagicService, 8)); };
5491
- /** @nocollapse */ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent, selectors: [["magic-root"]], viewQuery: function MagicShellComponent_Query(rf, ctx) {
4291
+ MagicShellComponent.ɵfac = function MagicShellComponent_Factory(t) { return new (t || MagicShellComponent)(i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.Title), i0.ɵɵdirectiveInject(OverlayWindowService), i0.ɵɵdirectiveInject(i5.HttpClient), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(ExitMagicService, 8)); };
4292
+ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent, selectors: [["magic-root"]], viewQuery: function MagicShellComponent_Query(rf, ctx) {
5492
4293
  if (rf & 1) {
5493
4294
  i0.ɵɵstaticViewQuery(_c0$3, true);
5494
4295
  }
@@ -5500,9 +4301,7 @@
5500
4301
  if (rf & 1) {
5501
4302
  i0.ɵɵlistener("beforeunload", function MagicShellComponent_beforeunload_HostBindingHandler($event) { return ctx.onBeforeUnload($event); }, false, i0.ɵɵresolveWindow)("unload", function MagicShellComponent_unload_HostBindingHandler($event) { return ctx.onUnload($event); }, false, i0.ɵɵresolveWindow);
5502
4303
  }
5503
- }, inputs: { SpinnerTemplate: "SpinnerTemplate" }, features: [i0.ɵɵProvidersFeature([
5504
- // ExitMagicService
5505
- ])], decls: 8, vars: 2, consts: [["magicRoot", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], ["magicViewContainerRef", ""], ["overlayWindowsContainer", ""], ["class", "spinner-background", 4, "ngIf"], ["defaultSpinner", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs"], [1, "spinner-background"], [3, "ngTemplateOutlet"], [1, "mgSpinnerClass"]], template: function MagicShellComponent_Template(rf, ctx) {
4304
+ }, inputs: { SpinnerTemplate: "SpinnerTemplate" }, features: [i0.ɵɵProvidersFeature([])], decls: 8, vars: 2, consts: [["magicRoot", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], ["magicViewContainerRef", ""], ["overlayWindowsContainer", ""], ["class", "spinner-background", 4, "ngIf"], ["defaultSpinner", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs"], [1, "spinner-background"], [3, "ngTemplateOutlet"], [1, "mgSpinnerClass"]], template: function MagicShellComponent_Template(rf, ctx) {
5506
4305
  if (rf & 1) {
5507
4306
  i0.ɵɵelementStart(0, "div", null, 0);
5508
4307
  i0.ɵɵtemplate(2, MagicShellComponent_ndc_dynamic_2_Template, 1, 2, "ndc-dynamic", 1);
@@ -5518,14 +4317,12 @@
5518
4317
  i0.ɵɵproperty("ngIf", ctx.showSpinner);
5519
4318
  }
5520
4319
  }, directives: [i1.NgIf, MagicViewContainerRef, i3.DynamicComponent, i3.DynamicIoDirective, i1.NgTemplateOutlet], styles: [".mgSpinnerClass[_ngcontent-%COMP%] {\n border: 10px solid #cccccc; \n border-top: 10px solid black; \n border-radius: 50%;\n position: fixed;\n margin: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100px;\n height: 100px;\n animation: spin 2s linear infinite;\n }\n .spinner-background[_ngcontent-%COMP%] {\n \n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n left: 0;\n opacity: 0.5;\n }\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }"] });
5521
- /*@__PURE__*/ (function () {
4320
+ (function () {
5522
4321
  i0.ɵsetClassMetadata(MagicShellComponent, [{
5523
4322
  type: i0.Component,
5524
4323
  args: [{
5525
4324
  selector: 'magic-root',
5526
- providers: [
5527
- // ExitMagicService
5528
- ],
4325
+ providers: [],
5529
4326
  template: "\n <div #magicRoot>\n <ndc-dynamic\n *ngIf = \"RootComponent !== null\"\n [ndcDynamicComponent]=\"RootComponent\"\n [ndcDynamicInputs] =\"RootComponentParameters\">\n </ndc-dynamic>\n\n <div #overlayWindowsContainer magicViewContainerRef>\n </div>\n </div>\n\n <div class=\"spinner-background\" *ngIf=\"showSpinner\">\n <ng-container [ngTemplateOutlet]=\"SpinnerTemplate ? SpinnerTemplate:defaultSpinner\"></ng-container>\n </div>\n\n <ng-template #defaultSpinner>\n <div class=\"mgSpinnerClass\"></div>\n </ng-template>\n ",
5530
4327
  styles: ["\n .mgSpinnerClass {\n border: 10px solid #cccccc; /* Light grey */\n border-top: 10px solid black; /* Blue */\n border-radius: 50%;\n position: fixed;\n margin: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100px;\n height: 100px;\n animation: spin 2s linear infinite;\n }\n .spinner-background {\n /* background fixed across whole screen */\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n left: 0;\n opacity: 0.5;\n }\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "]
5531
4328
  }]
@@ -5547,17 +4344,11 @@
5547
4344
  }] });
5548
4345
  })();
5549
4346
 
5550
- /**
5551
- * @ignore
5552
- */
5553
4347
  var CHECKBOX_VALUE_ACCESSOR = {
5554
4348
  provide: forms.NG_VALUE_ACCESSOR,
5555
4349
  useExisting: i0.forwardRef(function () { return MagicCheckboxControlValueAccessor; }),
5556
4350
  multi: true,
5557
4351
  };
5558
- /**
5559
- * Value accessor for Checkbox without a FormControl
5560
- */
5561
4352
  var MagicCheckboxControlValueAccessor = /** @class */ (function (_super) {
5562
4353
  __extends(MagicCheckboxControlValueAccessor, _super);
5563
4354
  function MagicCheckboxControlValueAccessor() {
@@ -5565,14 +4356,14 @@
5565
4356
  }
5566
4357
  return MagicCheckboxControlValueAccessor;
5567
4358
  }(forms.CheckboxControlValueAccessor));
5568
- /** @nocollapse */ MagicCheckboxControlValueAccessor.ɵfac = function MagicCheckboxControlValueAccessor_Factory(t) { return ɵMagicCheckboxControlValueAccessor_BaseFactory(t || MagicCheckboxControlValueAccessor); };
5569
- /** @nocollapse */ MagicCheckboxControlValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: MagicCheckboxControlValueAccessor, selectors: [["input", "type", "checkbox", "magic", "", 3, "formControlName", "", 3, "no-form-control", ""], ["input", "type", "checkbox", "magic", "", 3, "formControl", ""], ["input", "type", "checkbox", "magic", "", 3, "ngModel", ""]], hostBindings: function MagicCheckboxControlValueAccessor_HostBindings(rf, ctx) {
4359
+ MagicCheckboxControlValueAccessor.ɵfac = function MagicCheckboxControlValueAccessor_Factory(t) { return ɵMagicCheckboxControlValueAccessor_BaseFactory(t || MagicCheckboxControlValueAccessor); };
4360
+ MagicCheckboxControlValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: MagicCheckboxControlValueAccessor, selectors: [["input", "type", "checkbox", "magic", "", 3, "formControlName", "", 3, "no-form-control", ""], ["input", "type", "checkbox", "magic", "", 3, "formControl", ""], ["input", "type", "checkbox", "magic", "", 3, "ngModel", ""]], hostBindings: function MagicCheckboxControlValueAccessor_HostBindings(rf, ctx) {
5570
4361
  if (rf & 1) {
5571
4362
  i0.ɵɵlistener("change", function MagicCheckboxControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.checked); })("blur", function MagicCheckboxControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });
5572
4363
  }
5573
4364
  }, features: [i0.ɵɵProvidersFeature([CHECKBOX_VALUE_ACCESSOR]), i0.ɵɵInheritDefinitionFeature] });
5574
- var ɵMagicCheckboxControlValueAccessor_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(MagicCheckboxControlValueAccessor);
5575
- /*@__PURE__*/ (function () {
4365
+ var ɵMagicCheckboxControlValueAccessor_BaseFactory = i0.ɵɵgetInheritedFactory(MagicCheckboxControlValueAccessor);
4366
+ (function () {
5576
4367
  i0.ɵsetClassMetadata(MagicCheckboxControlValueAccessor, [{
5577
4368
  type: i0.Directive,
5578
4369
  args: [{
@@ -5583,17 +4374,11 @@
5583
4374
  }], null, null);
5584
4375
  })();
5585
4376
 
5586
- /**
5587
- * @ignore
5588
- */
5589
4377
  var MAGIC_DEFAULT_VALUE_ACCESSOR = {
5590
4378
  provide: forms.NG_VALUE_ACCESSOR,
5591
4379
  useExisting: i0.forwardRef(function () { return MagicDefaultValueAccessor; }),
5592
4380
  multi: true
5593
4381
  };
5594
- /**
5595
- * @ignore
5596
- */
5597
4382
  var MagicDefaultValueAccessor = /** @class */ (function (_super) {
5598
4383
  __extends(MagicDefaultValueAccessor, _super);
5599
4384
  function MagicDefaultValueAccessor() {
@@ -5601,14 +4386,14 @@
5601
4386
  }
5602
4387
  return MagicDefaultValueAccessor;
5603
4388
  }(forms.DefaultValueAccessor));
5604
- /** @nocollapse */ MagicDefaultValueAccessor.ɵfac = function MagicDefaultValueAccessor_Factory(t) { return ɵMagicDefaultValueAccessor_BaseFactory(t || MagicDefaultValueAccessor); };
5605
- /** @nocollapse */ MagicDefaultValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: MagicDefaultValueAccessor, selectors: [["input", "magic", "", 3, "type", "checkbox", 3, "formControlName", "", 3, "no-form-control", ""], ["textarea", "magic", "", 3, "formControlName", "", 3, "noFormControl", "", 3, "no-form-control", ""]], hostBindings: function MagicDefaultValueAccessor_HostBindings(rf, ctx) {
4389
+ MagicDefaultValueAccessor.ɵfac = function MagicDefaultValueAccessor_Factory(t) { return ɵMagicDefaultValueAccessor_BaseFactory(t || MagicDefaultValueAccessor); };
4390
+ MagicDefaultValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: MagicDefaultValueAccessor, selectors: [["input", "magic", "", 3, "type", "checkbox", 3, "formControlName", "", 3, "no-form-control", ""], ["textarea", "magic", "", 3, "formControlName", "", 3, "noFormControl", "", 3, "no-form-control", ""]], hostBindings: function MagicDefaultValueAccessor_HostBindings(rf, ctx) {
5606
4391
  if (rf & 1) {
5607
4392
  i0.ɵɵlistener("input", function MagicDefaultValueAccessor_input_HostBindingHandler($event) { return ctx._handleInput($event.target.value); })("blur", function MagicDefaultValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); })("compositionstart", function MagicDefaultValueAccessor_compositionstart_HostBindingHandler() { return ctx._compositionStart(); })("compositionend", function MagicDefaultValueAccessor_compositionend_HostBindingHandler($event) { return ctx._compositionEnd($event.target.value); });
5608
4393
  }
5609
4394
  }, exportAs: ["magic"], features: [i0.ɵɵProvidersFeature([MAGIC_DEFAULT_VALUE_ACCESSOR]), i0.ɵɵInheritDefinitionFeature] });
5610
- var ɵMagicDefaultValueAccessor_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(MagicDefaultValueAccessor);
5611
- /*@__PURE__*/ (function () {
4395
+ var ɵMagicDefaultValueAccessor_BaseFactory = i0.ɵɵgetInheritedFactory(MagicDefaultValueAccessor);
4396
+ (function () {
5612
4397
  i0.ɵsetClassMetadata(MagicDefaultValueAccessor, [{
5613
4398
  type: i0.Directive,
5614
4399
  args: [{
@@ -5625,28 +4410,22 @@
5625
4410
  }], null, null);
5626
4411
  })();
5627
4412
 
5628
- /**
5629
- * Directive for checkboxes which should not have a form control
5630
- */
5631
4413
  var CheckboxNoFormControlMagicDirective = /** @class */ (function () {
5632
4414
  function CheckboxNoFormControlMagicDirective(magicDirective) {
5633
4415
  this.magicDirective = magicDirective;
5634
4416
  }
5635
- /**
5636
- * Handle the 'Checkbox' change event - pass it to the Magic engine
5637
- */
5638
4417
  CheckboxNoFormControlMagicDirective.prototype.onChange = function ($event) {
5639
4418
  this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
5640
4419
  };
5641
4420
  return CheckboxNoFormControlMagicDirective;
5642
4421
  }());
5643
- /** @nocollapse */ CheckboxNoFormControlMagicDirective.ɵfac = function CheckboxNoFormControlMagicDirective_Factory(t) { return new (t || CheckboxNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
5644
- /** @nocollapse */ CheckboxNoFormControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: CheckboxNoFormControlMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", "noFormControl", ""]], hostBindings: function CheckboxNoFormControlMagicDirective_HostBindings(rf, ctx) {
4422
+ CheckboxNoFormControlMagicDirective.ɵfac = function CheckboxNoFormControlMagicDirective_Factory(t) { return new (t || CheckboxNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
4423
+ CheckboxNoFormControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: CheckboxNoFormControlMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", "noFormControl", ""]], hostBindings: function CheckboxNoFormControlMagicDirective_HostBindings(rf, ctx) {
5645
4424
  if (rf & 1) {
5646
4425
  i0.ɵɵlistener("change", function CheckboxNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
5647
4426
  }
5648
4427
  } });
5649
- /*@__PURE__*/ (function () {
4428
+ (function () {
5650
4429
  i0.ɵsetClassMetadata(CheckboxNoFormControlMagicDirective, [{
5651
4430
  type: i0.Directive,
5652
4431
  args: [{
@@ -5658,28 +4437,22 @@
5658
4437
  }] });
5659
4438
  })();
5660
4439
 
5661
- /**
5662
- * Directive for non-checkbox input controls which do not have a form control
5663
- */
5664
4440
  var InputNoFormControlMagicDirective = /** @class */ (function () {
5665
4441
  function InputNoFormControlMagicDirective(magicDirective) {
5666
4442
  this.magicDirective = magicDirective;
5667
4443
  }
5668
- /**
5669
- * Handles the 'change' event - pass it to the Magic engine
5670
- */
5671
4444
  InputNoFormControlMagicDirective.prototype.onChange = function ($event) {
5672
4445
  this.magicDirective.task.setInputTextValue(this.magicDirective.id, this.magicDirective.rowId, event.srcElement.value);
5673
4446
  };
5674
4447
  return InputNoFormControlMagicDirective;
5675
4448
  }());
5676
- /** @nocollapse */ InputNoFormControlMagicDirective.ɵfac = function InputNoFormControlMagicDirective_Factory(t) { return new (t || InputNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
5677
- /** @nocollapse */ InputNoFormControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: InputNoFormControlMagicDirective, selectors: [["input", "magic", "", "noFormControl", "", 3, "type", "checkbox"], ["textarea", "magic", "", "noFormControl", "", 3, "type", "checkbox"]], hostBindings: function InputNoFormControlMagicDirective_HostBindings(rf, ctx) {
4449
+ InputNoFormControlMagicDirective.ɵfac = function InputNoFormControlMagicDirective_Factory(t) { return new (t || InputNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
4450
+ InputNoFormControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: InputNoFormControlMagicDirective, selectors: [["input", "magic", "", "noFormControl", "", 3, "type", "checkbox"], ["textarea", "magic", "", "noFormControl", "", 3, "type", "checkbox"]], hostBindings: function InputNoFormControlMagicDirective_HostBindings(rf, ctx) {
5678
4451
  if (rf & 1) {
5679
4452
  i0.ɵɵlistener("change", function InputNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
5680
4453
  }
5681
4454
  } });
5682
- /*@__PURE__*/ (function () {
4455
+ (function () {
5683
4456
  i0.ɵsetClassMetadata(InputNoFormControlMagicDirective, [{
5684
4457
  type: i0.Directive,
5685
4458
  args: [{
@@ -5696,14 +4469,6 @@
5696
4469
  useExisting: i0.forwardRef(function () { return DateValueAccessor; }),
5697
4470
  multi: true
5698
4471
  };
5699
- /**
5700
- * The accessor for writing a value and listening to changes on a date input element
5701
- *
5702
- * ### Example
5703
- * `<input type="date" name="birthday" ngModel dateInput>`
5704
- * OR
5705
- * `<input type="date" formControlName="birthday" dateInput>`
5706
- */
5707
4472
  var DateValueAccessor = /** @class */ (function () {
5708
4473
  function DateValueAccessor(renderer, elementRef) {
5709
4474
  this.renderer = renderer;
@@ -5711,7 +4476,6 @@
5711
4476
  this.onChange = function (_) { };
5712
4477
  this.onTouched = function () { };
5713
4478
  }
5714
- /** Writes a new value to the element (model -> view) */
5715
4479
  DateValueAccessor.prototype.writeValue = function (value) {
5716
4480
  if (!value) {
5717
4481
  this.renderer.setProperty(this.elementRef.nativeElement, "value", null);
@@ -5719,29 +4483,26 @@
5719
4483
  }
5720
4484
  this.renderer.setProperty(this.elementRef.nativeElement, "valueAsDate", new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate())));
5721
4485
  };
5722
- /** Registers a callback function, called when value changes (view -> model) */
5723
4486
  DateValueAccessor.prototype.registerOnChange = function (fn) {
5724
4487
  this.onChange = function (v) { return fn(v instanceof Date
5725
4488
  ? new Date(v.getUTCFullYear(), v.getUTCMonth(), v.getUTCDate())
5726
4489
  : v); };
5727
4490
  };
5728
- /** Registers a callback function, called when the control is blurred */
5729
4491
  DateValueAccessor.prototype.registerOnTouched = function (fn) {
5730
4492
  this.onTouched = fn;
5731
4493
  };
5732
- /** Enables or disables the element when the control status changes */
5733
4494
  DateValueAccessor.prototype.setDisabledState = function (isDisabled) {
5734
4495
  this.renderer.setProperty(this.elementRef.nativeElement, "disabled", isDisabled);
5735
4496
  };
5736
4497
  return DateValueAccessor;
5737
4498
  }());
5738
- /** @nocollapse */ DateValueAccessor.ɵfac = function DateValueAccessor_Factory(t) { return new (t || DateValueAccessor)(i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef)); };
5739
- /** @nocollapse */ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, selectors: [["", "dateInput", ""]], hostBindings: function DateValueAccessor_HostBindings(rf, ctx) {
4499
+ DateValueAccessor.ɵfac = function DateValueAccessor_Factory(t) { return new (t || DateValueAccessor)(i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef)); };
4500
+ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, selectors: [["", "dateInput", ""]], hostBindings: function DateValueAccessor_HostBindings(rf, ctx) {
5740
4501
  if (rf & 1) {
5741
4502
  i0.ɵɵlistener("input", function DateValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.valueAsDate); })("blur", function DateValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });
5742
4503
  }
5743
4504
  }, features: [i0.ɵɵProvidersFeature([DATE_VALUE_ACCESSOR])] });
5744
- /*@__PURE__*/ (function () {
4505
+ (function () {
5745
4506
  i0.ɵsetClassMetadata(DateValueAccessor, [{
5746
4507
  type: i0.Directive,
5747
4508
  args: [{
@@ -5757,25 +4518,12 @@
5757
4518
  }] });
5758
4519
  })();
5759
4520
 
5760
- /**
5761
- * Responsible for connecting HTML elements to the Magic WebClient engine showing it is not Magic Control but a Dummy control which is used to notify only receeive focus event for now
5762
- */
5763
4521
  var NonMagicControlDirective = /** @class */ (function () {
5764
- /**
5765
- *
5766
- * @param _task The task service
5767
- * @param element The element for which the directive is applied
5768
- * @param renderer Renderer for the element
5769
- * @param vcRef
5770
- */
5771
4522
  function NonMagicControlDirective(_task, element, renderer, vcRef) {
5772
4523
  this._task = _task;
5773
4524
  this.element = element;
5774
4525
  this.renderer = renderer;
5775
4526
  this.vcRef = vcRef;
5776
- /**
5777
- * Collection of event handlers for this element
5778
- */
5779
4527
  this.eventHandlers = {};
5780
4528
  this.eventsOnlyVal = false;
5781
4529
  this.htmlElement = this.element.nativeElement;
@@ -5790,45 +4538,31 @@
5790
4538
  });
5791
4539
  ;
5792
4540
  Object.defineProperty(NonMagicControlDirective.prototype, "task", {
5793
- /**
5794
- * Get the task service
5795
- * @returns
5796
- */
5797
4541
  get: function () {
5798
4542
  return this._task;
5799
4543
  },
5800
4544
  enumerable: false,
5801
4545
  configurable: true
5802
4546
  });
5803
- /**
5804
- * Register to the events this element may need to handle
5805
- */
5806
4547
  NonMagicControlDirective.prototype.regEvents = function () {
5807
4548
  var _this = this;
5808
- // Handle events for which event handler may be removed and restored
5809
4549
  this.eventHandlers['focusin'] = this.OnFocus.bind(this);
5810
4550
  Object.keys(this.eventHandlers).forEach(function (key) {
5811
4551
  _this.focusUnlistener = _this.renderer.listen(_this.htmlElement, key, _this.eventHandlers[key]);
5812
4552
  });
5813
4553
  };
5814
- /**
5815
- * Handle focus event
5816
- */
5817
4554
  NonMagicControlDirective.prototype.OnFocus = function () {
5818
4555
  this.task.insertEvent(engine.getGuiEventObj('focusOnNonMagicControl', "", -1));
5819
4556
  event.cancelBubble = true;
5820
4557
  };
5821
- /**
5822
- * Initialize this object
5823
- */
5824
4558
  NonMagicControlDirective.prototype.ngOnInit = function () {
5825
4559
  this.regEvents();
5826
4560
  };
5827
4561
  return NonMagicControlDirective;
5828
4562
  }());
5829
- /** @nocollapse */ NonMagicControlDirective.ɵfac = function NonMagicControlDirective_Factory(t) { return new (t || NonMagicControlDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
5830
- /** @nocollapse */ NonMagicControlDirective.ɵdir = i0.ɵɵdefineDirective({ type: NonMagicControlDirective, selectors: [["", "NonMagicControl", ""]], inputs: { magic: ["NonMagicControl", "magic"] } });
5831
- /*@__PURE__*/ (function () {
4563
+ NonMagicControlDirective.ɵfac = function NonMagicControlDirective_Factory(t) { return new (t || NonMagicControlDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
4564
+ NonMagicControlDirective.ɵdir = i0.ɵɵdefineDirective({ type: NonMagicControlDirective, selectors: [["", "NonMagicControl", ""]], inputs: { magic: ["NonMagicControl", "magic"] } });
4565
+ (function () {
5832
4566
  i0.ɵsetClassMetadata(NonMagicControlDirective, [{
5833
4567
  type: i0.Directive,
5834
4568
  args: [{
@@ -5840,9 +4574,6 @@
5840
4574
  }] });
5841
4575
  })();
5842
4576
 
5843
- /**
5844
- * @ignore
5845
- */
5846
4577
  var decs = [
5847
4578
  MagicDirective,
5848
4579
  CheckboxMagicDirective,
@@ -5873,9 +4604,6 @@
5873
4604
  MagicFocusDirective,
5874
4605
  MagicViewContainerRef
5875
4606
  ];
5876
- /**
5877
- * @ignore
5878
- */
5879
4607
  var MagicModule = /** @class */ (function () {
5880
4608
  function MagicModule() {
5881
4609
  }
@@ -5893,12 +4621,11 @@
5893
4621
  };
5894
4622
  return MagicModule;
5895
4623
  }());
5896
- /** @nocollapse */ MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
5897
- /** @nocollapse */ MagicModule.ɵinj = i0.ɵɵdefineInjector({ factory: function MagicModule_Factory(t) { return new (t || MagicModule)(); }, providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [[
4624
+ MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
4625
+ MagicModule.ɵinj = i0.ɵɵdefineInjector({ factory: function MagicModule_Factory(t) { return new (t || MagicModule)(); }, providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [[
5898
4626
  i1.CommonModule,
5899
4627
  forms.FormsModule,
5900
4628
  forms.ReactiveFormsModule,
5901
- //ThemeModule,
5902
4629
  i2.RouterModule,
5903
4630
  i3.DynamicModule,
5904
4631
  i5.HttpClientModule
@@ -5934,7 +4661,6 @@
5934
4661
  MagicViewContainerRef], imports: [i1.CommonModule,
5935
4662
  forms.FormsModule,
5936
4663
  forms.ReactiveFormsModule,
5937
- //ThemeModule,
5938
4664
  i2.RouterModule,
5939
4665
  i3.DynamicModule,
5940
4666
  i5.HttpClientModule], exports: [MagicDirective,
@@ -5966,7 +4692,7 @@
5966
4692
  MagicFocusDirective,
5967
4693
  MagicViewContainerRef] });
5968
4694
  })();
5969
- /*@__PURE__*/ (function () {
4695
+ (function () {
5970
4696
  i0.ɵsetClassMetadata(MagicModule, [{
5971
4697
  type: i0.NgModule,
5972
4698
  args: [{
@@ -5977,12 +4703,10 @@
5977
4703
  i1.CommonModule,
5978
4704
  forms.FormsModule,
5979
4705
  forms.ReactiveFormsModule,
5980
- //ThemeModule,
5981
4706
  i2.RouterModule,
5982
4707
  i3.DynamicModule,
5983
4708
  i5.HttpClientModule
5984
4709
  ],
5985
- //Customizable providers
5986
4710
  providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider]
5987
4711
  }]
5988
4712
  }], null, null);
@@ -6073,7 +4797,7 @@
6073
4797
  this.mgdtfmt = this.task.mgInputDateFormat;
6074
4798
  if (displayFormat === 'input') {
6075
4799
  if (this.mgdtfmt == null)
6076
- this.mgdtfmt = 'M/d/yyyy'; //default format
4800
+ this.mgdtfmt = 'M/d/yyyy';
6077
4801
  return i1.formatDate(date, this.mgdtfmt, this.locale);
6078
4802
  }
6079
4803
  else {
@@ -6082,9 +4806,9 @@
6082
4806
  };
6083
4807
  return MgDateAdapter;
6084
4808
  }(core.NativeDateAdapter));
6085
- /** @nocollapse */ MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$2.Platform), i0.ɵɵinject(TaskMagicService)); };
6086
- /** @nocollapse */ MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
6087
- /*@__PURE__*/ (function () {
4809
+ MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$2.Platform), i0.ɵɵinject(TaskMagicService)); };
4810
+ MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
4811
+ (function () {
6088
4812
  i0.ɵsetClassMetadata(MgDateAdapter, [{
6089
4813
  type: i0.Injectable
6090
4814
  }], function () { return [{ type: i1$2.Platform }, { type: TaskMagicService }]; }, null);
@@ -6094,9 +4818,6 @@
6094
4818
  { provide: core.DateAdapter, useClass: MgDateAdapter },
6095
4819
  { provide: core.MAT_DATE_FORMATS, useValue: MG_FORMATS }
6096
4820
  ];
6097
- /**
6098
- * Magic service providers
6099
- */
6100
4821
  var basicMagicProviders = [
6101
4822
  MagicServices,
6102
4823
  TaskMagicService,
@@ -6109,20 +4830,9 @@
6109
4830
  TableMagicService
6110
4831
  ]);
6111
4832
 
6112
- /**
6113
- * @ignore
6114
- */
6115
- ///////////////////////////////////////////////////////////
6116
- // class to hold gui-related helper methods
6117
- ///////////////////////////////////////////////////////////
6118
4833
  var utils = /** @class */ (function () {
6119
4834
  function utils() {
6120
4835
  }
6121
- ///////////////////////////////////////////////////////////
6122
- // Add magic child control to the supplied array.
6123
- // Recursive, and checks children even if they are not magic controls.
6124
- // Magic controls are controls which have a magic directive attached to them.
6125
- ///////////////////////////////////////////////////////////
6126
4836
  utils.addChildren = function (parent, children, selector) {
6127
4837
  for (var i = 0; i < parent.children.length; i++) {
6128
4838
  if (typeof parent.children[i].attributes[selector] !== "undefined") {
@@ -6131,9 +4841,6 @@
6131
4841
  this.addChildren(parent.children[i], children, selector);
6132
4842
  }
6133
4843
  };
6134
- ///////////////////////////////////////////////////////////
6135
- // Calculate the distance between the control and the supplied x,y coordinates
6136
- ///////////////////////////////////////////////////////////
6137
4844
  utils.getDistance = function (control, x, y) {
6138
4845
  var left = control.clientLeft, top = control.clientTop;
6139
4846
  var dx, dy;
@@ -6160,9 +4867,6 @@
6160
4867
  var ret = (dx * dx + dy * dy);
6161
4868
  return ret;
6162
4869
  };
6163
- ///////////////////////////////////////////////////////////
6164
- //
6165
- ///////////////////////////////////////////////////////////
6166
4870
  utils.getDimentions = function (el) {
6167
4871
  var xPos = 0;
6168
4872
  var yPos = 0;
@@ -6170,14 +4874,12 @@
6170
4874
  var height = el.height;
6171
4875
  while (el) {
6172
4876
  if (el.tagName == "BODY") {
6173
- // deal with browser quirks with body/window/document and page scroll
6174
4877
  var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
6175
4878
  var yScroll = el.scrollTop || document.documentElement.scrollTop;
6176
4879
  xPos += (el.offsetLeft - xScroll + el.clientLeft);
6177
4880
  yPos += (el.offsetTop - yScroll + el.clientTop);
6178
4881
  }
6179
4882
  else {
6180
- // for all other non-BODY elements
6181
4883
  xPos += (el.offsetLeft - el.scrollLeft + el.clientLeft);
6182
4884
  yPos += (el.offsetTop - el.scrollTop + el.clientTop);
6183
4885
  }
@@ -6193,9 +4895,6 @@
6193
4895
  return utils;
6194
4896
  }());
6195
4897
 
6196
- /**
6197
- * @ignore
6198
- */
6199
4898
  var ModalFormDefinition = /** @class */ (function () {
6200
4899
  function ModalFormDefinition() {
6201
4900
  this.taskId = "";
@@ -6205,10 +4904,6 @@
6205
4904
  return ModalFormDefinition;
6206
4905
  }());
6207
4906
 
6208
- /**
6209
- * Generated bundle index. Do not edit.
6210
- */
6211
-
6212
4907
  exports.AccessorMagicService = AccessorMagicService;
6213
4908
  exports.BaseMagicAlertComponent = BaseMagicAlertComponent;
6214
4909
  exports.BaseMagicConfirmComponent = BaseMagicConfirmComponent;