@magic-xpa/cli 4.1300.0-dev4130.23 → 4.1300.0-dev4130.234

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 (61) hide show
  1. package/package.json +1 -1
  2. package/src/schematics/magic-utils/Util.js +2 -1
  3. package/src/schematics/magic-utils/Util.js.map +1 -1
  4. package/src/schematics/magic-utils/config.js +2 -2
  5. package/src/schematics/magic-utils/config.js.map +1 -1
  6. package/src/schematics/magic-utils/config.ts +2 -2
  7. package/src/schematics/magic-utils/env.js +12 -11
  8. package/src/schematics/magic-utils/env.js.map +1 -1
  9. package/src/schematics/magic-utils/env.ts +16 -15
  10. package/src/schematics/magic-utils/metadata.class.js +1 -1
  11. package/src/schematics/magic-utils/metadata.class.js.map +1 -1
  12. package/src/schematics/magic-utils/metadata.class.ts +1 -1
  13. package/src/schematics/magic-utils/rules/build-control.rule.js +3 -2
  14. package/src/schematics/magic-utils/rules/build-control.rule.js.map +1 -1
  15. package/src/schematics/magic-utils/rules/component-list.rule.js +3 -2
  16. package/src/schematics/magic-utils/rules/component-list.rule.js.map +1 -1
  17. package/src/schematics/magic-utils/rules/generate.rule.js +3 -2
  18. package/src/schematics/magic-utils/rules/generate.rule.js.map +1 -1
  19. package/src/schematics/mg-add/files/src/app/magic/magic.gen.lib.module.ts +5 -6
  20. package/src/schematics/mg-add/index.js +129 -10
  21. package/src/schematics/mg-add/index.js.map +1 -1
  22. package/src/schematics/mg-add/index.ts +149 -10
  23. package/src/schematics/utils/ast.js +2 -1
  24. package/src/schematics/utils/ast.js.map +1 -1
  25. package/src/schematics/utils/devkit-utils/ast-utils.js +2 -1
  26. package/src/schematics/utils/devkit-utils/ast-utils.js.map +1 -1
  27. package/src/schematics/utils/devkit-utils/ast-utils_old.js +2 -1
  28. package/src/schematics/utils/devkit-utils/ast-utils_old.js.map +1 -1
  29. package/src/schematics/utils/devkit-utils/component.js +2 -1
  30. package/src/schematics/utils/devkit-utils/component.js.map +1 -1
  31. package/src/schematics/utils/devkit-utils/ng-ast-utils.js +2 -1
  32. package/src/schematics/utils/devkit-utils/ng-ast-utils.js.map +1 -1
  33. package/src/schematics/utils/devkit-utils/route-utils.js +2 -1
  34. package/src/schematics/utils/devkit-utils/route-utils.js.map +1 -1
  35. package/src/schematics/utils/html.js +2 -1
  36. package/src/schematics/utils/html.js.map +1 -1
  37. package/templates/angular/src/{app.module.ts → app-module.ts} +3 -3
  38. package/templates/angular/src/{app.component.ts → app.ts} +1 -1
  39. package/templates/attributes/common/row_editing_button_attributes.ejs +2 -2
  40. package/templates/component/view.component.ts +5 -56
  41. package/templates/themes/basicHTML/combobox.ejs +10 -7
  42. package/templates/themes/basicHTML/edit.ejs +20 -10
  43. package/templates/themes/basicHTML/image.ejs +3 -2
  44. package/templates/themes/basicHTML/listbox.ejs +3 -4
  45. package/templates/themes/basicHTML/push-button.ejs +0 -1
  46. package/templates/themes/basicHTML/radio.ejs +24 -3
  47. package/templates/themes/basicHTML/tab.ejs +3 -1
  48. package/templates/themes/basicHiddenHTML/radio.ejs +3 -2
  49. package/templates/themes/basicHiddenHTML/table.ejs +7 -3
  50. package/templates/themes/container.ejs +12 -1
  51. package/templates/themes/material/combobox.ejs +12 -7
  52. package/templates/themes/material/edit.ejs +32 -28
  53. package/templates/themes/material/listbox.ejs +3 -4
  54. package/templates/themes/material/push-button.ejs +0 -1
  55. package/templates/themes/material/radio.ejs +29 -12
  56. package/templates/themes/material/tab.ejs +3 -1
  57. package/templates/themes/table/HTMLTable/table.ejs +7 -3
  58. package/templates/themes/table/repeatable/table.ejs +7 -3
  59. package/tsconfig.json +2 -0
  60. /package/src/schematics/mg-add/files/src/app/{app.component.html → app.html} +0 -0
  61. /package/templates/angular/src/app/{app.component.html.ejs → app.html.ejs} +0 -0
@@ -25,9 +25,8 @@ import { MgDisplayedColumns} from "./<%- id %>.mg.controls.g";
25
25
  <% } else {%>
26
26
  import {TaskBaseMagicComponent, magicProviders} from "@magic-xpa/angular";
27
27
  <%}%>
28
- <% if(isModal) { %>
29
- import {MagicModalInterface} from "@magic-xpa/angular";
30
- <%}%>
28
+ import {MagicModalProperties} from "@magic-xpa/angular";
29
+ <%= '\n' %>
31
30
 
32
31
  @Component({
33
32
  selector: '<%= selector %>',
@@ -36,9 +35,11 @@ import { MgDisplayedColumns} from "./<%- id %>.mg.controls.g";
36
35
  templateUrl: './<%- id %>.component.html'
37
36
  })
38
37
 
39
- export class <%- id %> extends <% if(useMatGrid) { %> BaseMatTableMagicComponent <% } else {%> TaskBaseMagicComponent <%}%> <% if(isModal) { %> implements MagicModalInterface <% }%>
38
+ export class <%- id %> extends <% if(useMatGrid) { %> BaseMatTableMagicComponent <% } else {%> TaskBaseMagicComponent <%}%>
40
39
 
41
40
  {
41
+ magicModalProperties: MagicModalProperties = new MagicModalProperties("<%- id %>", true, 0, 0, "300px", "300px", true, true, true, true);
42
+
42
43
  <% if(!magicConfig.no_controls_accessor) { %>
43
44
  mgc = MgControlName;
44
45
  mgcp = MgCustomProperties;
@@ -55,58 +56,6 @@ export class <%- id %> extends <% if(useMatGrid) { %> BaseMatTableMagicComponen
55
56
  }
56
57
  <%}-%>
57
58
 
58
- <% if(isModal) { -%>
59
- private static readonly formName: string = "<%- id %>";
60
- private static readonly showTitleBar: boolean = true;
61
- private static readonly x: number = 0;
62
- private static readonly y: number = 0;
63
- private static readonly width: string = "300px";
64
- private static readonly height: string = "300px";
65
- private static readonly isCenteredToWindow: boolean = true;
66
- private static readonly shouldCloseOnBackgroundClick: boolean = true;
67
- private static readonly isResizable: boolean = true;
68
- private static readonly isMovable: boolean = true;
69
-
70
- X() {
71
- return <%- id %>.x;
72
- }
73
-
74
- Y() {
75
- return <%- id %>.y;
76
- }
77
-
78
- Width(): string {
79
- return <%- id %>.width;
80
- }
81
-
82
- Height(): string {
83
- return <%- id %>.height;
84
- }
85
-
86
- IsCenteredToWindow() {
87
- return <%- id %>.isCenteredToWindow;
88
- }
89
-
90
- FormName() {
91
- return <%- id %>.formName;
92
- }
93
-
94
- ShowTitleBar() {
95
- return <%- id %>.showTitleBar;
96
- }
97
-
98
- ShouldCloseOnBackgroundClick() {
99
- return <%- id %>.shouldCloseOnBackgroundClick;
100
- }
101
-
102
- IsResizable() {
103
- return <%- id %>.isResizable;
104
- }
105
-
106
- IsMovable() {
107
- return <%- id %>.isMovable;
108
- }
109
- <%}-%>
110
59
  <% if(useMatGrid) { -%>
111
60
  override displayedColumns = this.mgdp;
112
61
  <%}-%>
@@ -6,32 +6,35 @@
6
6
 
7
7
  <%# show combo box in table only while we on row edit %>
8
8
  <% if (ctrl.props.is_table_child) { %>
9
- <div *ngIf="mg.isRowInRowEditing(row)">
9
+ @if (mg.isRowInRowEditing(row)) {
10
+ <div>
10
11
  <%}%>
11
12
  <select
12
13
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>
13
14
  <%- include('../../attributes/common/base/formControlName', {ctrl : ctrl}) %>
14
15
  <% if (ctrl.props.must_input && !ctrl.props.must_input.has_exp) { %> required <%}%>
15
16
  >
16
- <option
17
- *ngFor="let o of mg.getItemListValues(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>);"
18
- [selected]="o.index == mg.getValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)"
19
- [value] = "o.index"
20
- >
17
+ @for (o of mg.getItemListValues(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>); track $index) {
18
+ <option [selected]="o.index == mg.getValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)"
19
+ [value] = "o.index">
21
20
  {{o.displayValue}}
22
21
  </option>
22
+ }
23
23
  </select>
24
24
  <% if (ctrl.props.must_input || ctrl.props.validator != null) {%>
25
25
  <mgError [magic]=<%- ctrl.props.directive_id %>> </mgError>
26
26
  <%}%>
27
27
  <% if (ctrl.props.is_table_child) { %>
28
28
  </div>
29
+ }
29
30
 
30
31
  <%# show lable in table only while we on row read only %>
31
- <div *ngIf="!mg.isRowInRowEditing(row)">
32
+ @if (!mg.isRowInRowEditing(row)) {
33
+ <div>
32
34
  <label <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
33
35
  {{ mg.getDisplayValue(<%- ctrl.props.enum_id %>, row.rowId) }}
34
36
  </label>
35
37
  </div>
38
+ }
36
39
  <%}%>
37
40
  </div>
@@ -8,7 +8,8 @@
8
8
  <div >
9
9
  <% if (ctrl.style && ctrl.style.multiline_edit ){ %>
10
10
 
11
- <textarea *ngIf="mg.isRowInRowEditing(row)"
11
+ @if (mg.isRowInRowEditing(row)) {
12
+ <textarea
12
13
  type="text"
13
14
  <%- include('../../attributes/common/base/formControlName', {ctrl : ctrl}) %>
14
15
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>
@@ -20,20 +21,21 @@
20
21
  <% if (ctrl.props.validator) { %><%- ctrl.props.validator %><%}%>
21
22
  >
22
23
  </textarea>
24
+ }
23
25
 
24
26
  <% } else { %>
27
+ <% if(ctrl.props.is_table_child){ %>
28
+ @if (mg.isRowInRowEditing(row)) {
29
+ <%}%>
25
30
  <input
26
31
  <% if (ctrl.props.show_zoom_button ){ %>
27
32
  style="width: 70%"
28
33
  <% } %>
29
34
  <%- include('../../attributes/common/base/formControlName', {ctrl : ctrl}) %>
30
- <% if(ctrl.props.is_table_child){ %>
31
- *ngIf="mg.isRowInRowEditing(row)"
32
- <%}%>
33
35
 
34
36
  <% if (ctrl.props.attribute == StorageAttributeType.Numeric) { %>
35
37
  <% if (ctrl.props.currency) { %>
36
- currencyMask [options]="mg.getNumericPicture(mg.getPicture(<%- ctrl.props.enum_id %>))"
38
+ [currencyMask]="mg.getNumericPicture(mg.getPicture(<%- ctrl.props.enum_id %>))"
37
39
  <% } else { %>
38
40
  type='number'
39
41
  <% } %>
@@ -52,13 +54,16 @@
52
54
  <%- ' '%>
53
55
  <% if (ctrl.props.validator) { %><%- ctrl.props.validator %><%}%>
54
56
  />
57
+ <% if(ctrl.props.is_table_child){ %>
58
+ }
59
+ <%}%>
55
60
  <% } %>
56
61
  <%- include(`../../attributes/common/input/validation`, {ctrl : ctrl}) %>
57
62
 
58
63
  <% if(ctrl.props.is_table_child){ %>
59
64
 
65
+ @if (!mg.isRowInRowEditing(row)) {
60
66
  <label
61
- *ngIf="!mg.isRowInRowEditing(row)"
62
67
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
63
68
  <% if (ctrl.props.currency ) { %>
64
69
  {{mg.getFormattedValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)
@@ -71,6 +76,7 @@
71
76
 
72
77
 
73
78
  </label>
79
+ }
74
80
  <%}%>
75
81
  <%- include('./zoom-button.ejs', {ctrl : ctrl}) %>
76
82
  </div>
@@ -78,8 +84,8 @@
78
84
  case StorageAttributeType.Date: %>
79
85
 
80
86
  <% if(ctrl.props.is_table_child){ %>
87
+ @if (mg.isRowInRowEditing(row)) {
81
88
  <div
82
- *ngIf="mg.isRowInRowEditing(row)"
83
89
  style="display: flex; flex-direction: row">
84
90
  <%}%>
85
91
 
@@ -102,24 +108,26 @@
102
108
 
103
109
  <% if(ctrl.props.is_table_child){ %>
104
110
  </div>
111
+ }
105
112
  <%}%>
106
113
 
107
114
 
108
115
  <% if(ctrl.props.is_table_child){ %>
116
+ @if (!mg.isRowInRowEditing(row)) {
109
117
  <label
110
- *ngIf="!mg.isRowInRowEditing(row)"
111
118
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
112
119
  {{mg.getValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)
113
120
  <% if (ctrl.props.formatter) { %>| <%- ctrl.props.formatter %> : <%- ctrl.props.enum_id %><%}%>}}
114
121
  </label>
122
+ }
115
123
  <%}%>
116
124
  <%- include('./zoom-button.ejs', {ctrl : ctrl}) %>
117
125
  <% break;
118
126
 
119
127
  case StorageAttributeType.Time: %>
120
128
  <% if(ctrl.props.is_table_child){ %>
129
+ @if (mg.isRowInRowEditing(row)) {
121
130
  <div
122
- *ngIf="mg.isRowInRowEditing(row)"
123
131
  style="display: flex; flex-direction: row">
124
132
  <%}%>
125
133
 
@@ -141,15 +149,17 @@
141
149
 
142
150
  <% if(ctrl.props.is_table_child){ %>
143
151
  </div>
152
+ }
144
153
  <%}%>
145
154
 
146
155
  <% if(ctrl.props.is_table_child){ %>
156
+ @if (!mg.isRowInRowEditing(row)) {
147
157
  <label
148
- *ngIf="!mg.isRowInRowEditing(row)"
149
158
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
150
159
  {{mg.getValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)
151
160
  <% if (ctrl.props.formatter) { %>| <%- ctrl.props.formatter %> : <%- ctrl.props.enum_id %><%}%>}}
152
161
  </label>
162
+ }
153
163
  <%}%>
154
164
  <%- include('./zoom-button.ejs', {ctrl : ctrl}) %>
155
165
  <% break;
@@ -1,6 +1,7 @@
1
-
2
- <div *ngIf="mg.isImageExists(<%- ctrl.props.enum_id %>)">
1
+ @if (mg.isImageExists(<%- ctrl.props.enum_id %>)) {
2
+ <div>
3
3
  <img <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>
4
4
  <%- include('../../attributes/common/base/enabled', {ctrl : ctrl}) %>
5
5
  [src]="mg.getImage(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)" />
6
6
  </div>
7
+ }
@@ -8,12 +8,11 @@
8
8
  <% if (ctrl.props.must_input && !ctrl.props.must_input.has_exp) { %> required <%}%>
9
9
  >
10
10
  <%# build of items in listbox %>
11
- <option
12
- *ngFor="let o of mg.getItemListValues(<%-ctrl.props.enum_id%>);"
13
- [value] = "o.index"
14
- >
11
+ @for (o of mg.getItemListValues(<%-ctrl.props.enum_id%>); track $index) {
12
+ <option [value] = "o.index">
15
13
  {{o.displayValue}}
16
14
  </option>
15
+ }
17
16
  </select>
18
17
  <% if (ctrl.props.must_input || ctrl.props.validator != null) {%>
19
18
  <mgError [magic]=<%- ctrl.props.directive_id %>> </mgError>
@@ -25,4 +25,3 @@ case CtrlButtonTypeGui.Hypertext : %>
25
25
  <%- include('../../attributes/common/format.ejs', {ctrl : ctrl}) %>
26
26
  </button>
27
27
  <% } %> %>
28
-
@@ -1,9 +1,20 @@
1
+ <%# Wrap in a row-specific formGroup if this radio control is child of a table %>
1
2
  <div
3
+ <% if (ctrl.props.is_table_child && (typeof ctrl.props.web_style === "undefined" || ctrl.props.web_style === TableWebStyle.MatGrid)) { %>
4
+ [formGroup]="mg.getFormGroupByRow(row.rowId)"
5
+ <%}%>
6
+ >
7
+ <%# Render radio buttons group if in edit mode, otherwise render a static display label %>
8
+ <% if (ctrl.props.is_table_child) { %>
9
+ @if (mg.isRowInRowEditing(row)) {
10
+ <% } %>
11
+ <div
2
12
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>
3
- (change)="task.mgOnRadioSelectionChanged(<%-ctrl.props.enum_id%>)"
13
+ (change)="task.mgOnRadioSelectionChanged(<%-ctrl.props.enum_id%><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)"
4
14
  >
5
- <div
6
- *ngFor="let o of mg.getItemListValues(<%-ctrl.props.enum_id%>);">
15
+ <%# Get the options and display values, passing the row.rowId if it is a table control %>
16
+ @for (o of mg.getItemListValues(<%-ctrl.props.enum_id%><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>); track $index) {
17
+ <div>
7
18
  <label>
8
19
  <input
9
20
  type="radio"
@@ -14,7 +25,17 @@
14
25
  {{o.displayValue}}
15
26
  </label>
16
27
  </div>
28
+ }
17
29
  <% if (ctrl.props.must_input || ctrl.props.validator != null) {%>
18
30
  <mgError [magic]=<%- ctrl.props.directive_id %>> </mgError>
19
31
  <%}%>
32
+ </div>
33
+ <% if (ctrl.props.is_table_child) { %>
34
+ }
35
+ @if (!mg.isRowInRowEditing(row)) {
36
+ <label <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
37
+ {{ mg.getDisplayValue(<%- ctrl.props.enum_id %>, row.rowId) }}
38
+ </label>
39
+ }
40
+ <% } %>
20
41
  </div>
@@ -12,7 +12,8 @@
12
12
  <% }%>
13
13
 
14
14
  <%# add buttons for each tab page%>
15
- <div *ngFor="let o of mg.getItemListValues(<%-ctrl.props.enum_id%>)">
15
+ @for (o of mg.getItemListValues(<%-ctrl.props.enum_id%>); track $index) {
16
+ <div>
16
17
  <button class="tab_button"
17
18
  <%- include('../../attributes/common/base/enabled', {ctrl : ctrl}) %>
18
19
  (click)="task.mgOnTabSelectionChanged(<%-ctrl.props.enum_id%>, o.index)"
@@ -21,6 +22,7 @@
21
22
  {{mg.getTabpageText(<%- ctrl.props.enum_id %>, o.index)}}
22
23
  </button>
23
24
  </div>
25
+ }
24
26
 
25
27
  <% if ( tab_side == SideType.Top) { %>
26
28
  <%# add tab pages after adding the buttons, so the buttons are at the top%>
@@ -2,8 +2,8 @@
2
2
  <%- include('../../attributes/common/no_control_base_attributes', {ctrl : ctrl}) %>
3
3
  magicMark="magicRadio"
4
4
  >
5
- <div
6
- *ngFor="let o of mgGetListboxValues(<%-ctrl.props.enum_id%>);">
5
+ @for (o of mgGetListboxValues(<%-ctrl.props.enum_id%>); track $index) {
6
+ <div>
7
7
  <label>
8
8
  <input
9
9
  type="radio"
@@ -14,4 +14,5 @@
14
14
  {{o.displayValue}}
15
15
  </label>
16
16
  </div>
17
+ }
17
18
  </div>
@@ -7,12 +7,16 @@
7
7
  (scrolled)="tableService.onScrollDown()"
8
8
  [scrollWindow]="false"
9
9
  >
10
- <div *ngFor="let row of task.Records.list">
11
- <div *ngIf="mg.ifRowCreated(row)" id="row">
10
+ @for (row of task.Records.list; track $index) {
11
+ <div>
12
+ @if (mg.ifRowCreated(row)) {
13
+ <div id="row">
12
14
  <form [formGroup]="mg.getFormGroupByRow(row.rowId)" class="table_row"
13
15
  [ngClass]="{ 'selected': mg.isRowSelected(<%= ctrl.props.enum_id %>, row.rowId)}">
14
16
  <%- include(`../container`, {ctrl: ctrl}) %>
15
17
  </form>
16
18
  </div>
17
- </div>
19
+ }
20
+ </div>
21
+ }
18
22
  </div>
@@ -6,6 +6,9 @@
6
6
  <% if (line_id !== null) {%>
7
7
  <% if( typeof child.props.common_line_id === "undefined" || child.props.common_line_id !== line_id) {%>
8
8
  </div>
9
+ <% if (ctrl.props.web_style === TableWebStyle.MatGrid) { %>
10
+ }
11
+ <% } %>
9
12
  <% line_id = null;%>
10
13
  <%}}%>
11
14
 
@@ -13,7 +16,12 @@
13
16
  <% if (line_id === null && typeof child.props.common_line_id !== "undefined" &&
14
17
  child.controlType !== MgControlType.CTRL_TYPE_TAB) { %>
15
18
  <% line_id = child.props.common_line_id; %>
16
- <div style="display: flex; flex-direction: row" <% if ( ctrl.props.web_style === TableWebStyle.MatGrid) { %>*ngIf="mg.ifRowCreated(row)" <%}%> >
19
+ <% if (ctrl.props.web_style === TableWebStyle.MatGrid) { %>
20
+ @if (mg.ifRowCreated(row)) {
21
+ <div style="display: flex; flex-direction: row">
22
+ <% } else { %>
23
+ <div style="display: flex; flex-direction: row">
24
+ <% } %>
17
25
  <%}%>
18
26
 
19
27
  <%- include(`./control`, {child: child}) %>
@@ -23,4 +31,7 @@
23
31
  <%# close the line-wrapping div, in case it was left open %>
24
32
  <%if (line_id !== null) {%>
25
33
  </div>
34
+ <% if (ctrl.props.web_style === TableWebStyle.MatGrid) { %>
35
+ }
36
+ <% } %>
26
37
  <%}} %>
@@ -6,11 +6,14 @@
6
6
 
7
7
  <%# show combo box in table only while we on row edit %>
8
8
  <% if (ctrl.props.is_table_child) { %>
9
- <div *ngIf="mg.isRowInRowEditing(row)">
9
+ @if (mg.isRowInRowEditing(row)) {
10
+ <div>
10
11
  <%}%>
11
12
 
12
13
  <% if (ctrl.props.editable) { %>
14
+ <mat-form-field <%- include('../../attributes/common/container_attributes', {ctrl : ctrl}) %>>
13
15
  <editable-combo
16
+ <%- include('../../attributes/common/base/visible', {ctrl : ctrl})%>
14
17
  <%- include(`../../attributes/common/control_attributes`, {ctrl : ctrl})%>
15
18
  <%- include('../../attributes/common/base/formControlName', {ctrl : ctrl}) %>
16
19
  <% if (ctrl.props.must_input && !ctrl.props.must_input.has_exp) { %>
@@ -19,6 +22,7 @@
19
22
  placeholder="Type/Select an option"
20
23
  >
21
24
  </editable-combo>
25
+ </mat-form-field>
22
26
  <% }else { %>
23
27
 
24
28
  <mat-form-field <%- include('../../attributes/common/container_attributes', {ctrl : ctrl}) %>>
@@ -29,13 +33,11 @@
29
33
  required
30
34
  <% } %>
31
35
  >
32
- <mat-option
33
- *ngFor="let o of mg.getItemListValues(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>);"
34
-
35
- [value]="o.index"
36
- >
36
+ @for (o of mg.getItemListValues(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>); track $index) {
37
+ <mat-option [value]="o.index">
37
38
  {{o.displayValue}}
38
39
  </mat-option>
40
+ }
39
41
  </mat-select>
40
42
  </mat-form-field>
41
43
 
@@ -47,12 +49,15 @@
47
49
 
48
50
  <% if (ctrl.props.is_table_child) { %>
49
51
  </div>
52
+ }
50
53
  <%# show lable in table only while we on row read only %>
51
- <div *ngIf="!mg.isRowInRowEditing(row)">
54
+ @if (!mg.isRowInRowEditing(row)) {
55
+ <div>
52
56
  <label <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
53
57
  {{ mg.getDisplayValue(<%- ctrl.props.enum_id %>, row.rowId) }}
54
58
  </label>
55
59
  </div>
60
+ }
56
61
  <%}%>
57
62
 
58
63
  </div>
@@ -10,13 +10,14 @@
10
10
  default: %>
11
11
 
12
12
  <div>
13
+ <% if(ctrl.props.is_table_child){ %>
14
+ @if (mg.isRowInRowEditing(row)) {
15
+ <% } %>
13
16
  <mat-form-field
14
17
  <% if (ctrl.props.show_zoom_button ){ %>
15
18
  style="width: 65%"
16
19
  <% } %>
17
20
  <%- include(`../../attributes/common/container_attributes`, {ctrl : ctrl}) %>
18
- <% if(ctrl.props.is_table_child){ %>
19
- *ngIf="mg.isRowInRowEditing(row)" <%}%>
20
21
  >
21
22
  <div>
22
23
 
@@ -24,7 +25,7 @@ default: %>
24
25
  <textarea
25
26
  matInput
26
27
  <% if (ctrl.props.attribute == StorageAttributeType.Numeric) { %>
27
- <% if (ctrl.props.currency) { %> currencyMask [options]="mg.getNumericPicture(mg.getPicture(<%- ctrl.props.enum_id %>))"
28
+ <% if (ctrl.props.currency) { %> [currencyMask]="mg.getNumericPicture(mg.getPicture(<%- ctrl.props.enum_id %>))"
28
29
  <% } else { %>
29
30
  type='number'
30
31
  <% } %> <%} %>
@@ -47,14 +48,10 @@ default: %>
47
48
  <% } else { %>
48
49
 
49
50
  <input
50
- <% if(ctrl.props.is_table_child){ %>
51
- *ngIf="mg.isRowInRowEditing(row)"
52
- <%}%>
53
-
54
51
  matInput
55
52
  <% if (ctrl.props.attribute == StorageAttributeType.Numeric) { %>
56
53
  <% if (ctrl.props.currency) { %>
57
- currencyMask [options]="mg.getNumericPicture(mg.getPicture(<%- ctrl.props.enum_id %>))"
54
+ [currencyMask]="mg.getNumericPicture(mg.getPicture(<%- ctrl.props.enum_id %>))"
58
55
  <% } else { %>
59
56
  type='number'
60
57
  <% } %> <% } %>
@@ -93,25 +90,26 @@ default: %>
93
90
  <% if (ctrl.props.auto_complete_mode) { %>
94
91
  <mat-autocomplete #<%- ctrl.props.id %>="matAutocomplete"
95
92
  <%- include('../../attributes/common/base/id', {ctrl : ctrl}) %>>
96
- <mat-option
97
- *ngFor="let o of mg.getFilteredList(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>);"
98
-
99
- [value]="o.displayValue"
100
- >
93
+ @for (o of mg.getFilteredList(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>); track $index) {
94
+ <mat-option [value]="o.displayValue">
101
95
  {{o.displayValue}}
102
96
  </mat-option>
97
+ }
103
98
  </mat-autocomplete>
104
99
  <% } %>
105
100
  </div>
106
101
 
107
102
  </mat-form-field>
103
+ <% if(ctrl.props.is_table_child){ %>
104
+ }
105
+ <% } %>
108
106
 
109
107
  <% if(ctrl.props.is_table_child){ %>
108
+ @if (!mg.isRowInRowEditing(row)) {
110
109
  <label
111
110
  <% if (ctrl.props.show_zoom_button ){ %>
112
111
  style="width: 65%"
113
112
  <% } %>
114
- *ngIf="!mg.isRowInRowEditing(row)"
115
113
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
116
114
  <% if (ctrl.props.currency) { %>
117
115
  {{mg.getFormattedValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)
@@ -122,6 +120,7 @@ default: %>
122
120
  <%}%>
123
121
 
124
122
  </label>
123
+ }
125
124
  <%}%>
126
125
  <%- include('./zoom-button.ejs', {ctrl : ctrl}) %>
127
126
  </div>
@@ -129,6 +128,9 @@ default: %>
129
128
 
130
129
  case StorageAttributeType.Date: %>
131
130
  <div>
131
+ <% if(ctrl.props.is_table_child){ %>
132
+ @if (mg.isRowInRowEditing(row)) {
133
+ <%}%>
132
134
  <mat-form-field
133
135
  <% if (ctrl.props.show_zoom_button ){ %>
134
136
  style="width: 65%"
@@ -136,9 +138,6 @@ case StorageAttributeType.Date: %>
136
138
  <%- include(`../../attributes/common/container_attributes`, {ctrl : ctrl}) %>
137
139
  <%- include('../../attributes/common/base/id', {ctrl : ctrl}) %>
138
140
  [eventsOnly]=true
139
- <% if(ctrl.props.is_table_child){ %>
140
- *ngIf="mg.isRowInRowEditing(row)"
141
- <%}%>
142
141
  >
143
142
 
144
143
  <% if(ctrl.props.is_table_child){ %>
@@ -154,35 +153,40 @@ case StorageAttributeType.Date: %>
154
153
  <%- ctrl.props.validator %>
155
154
  <% } %>
156
155
  >
157
- <mat-datepicker-toggle matSuffix
158
- [for]="<%- ctrl.props.id %>"
159
- <% if ( child.props.is_table_child ) {%>
160
- *ngIf="!mg.checkIsReadOnly(<%- ctrl.props.enum_id %>) && mg.isRowInRowEditing(row)"
161
- <%} else { %>
162
- *ngIf="!mg.checkIsReadOnly(<%- ctrl.props.enum_id %>)"
163
- <%}%>
164
- >
165
-
166
- </mat-datepicker-toggle>
156
+ <% if ( child.props.is_table_child ) {%>
157
+ @if (!mg.checkIsReadOnly(<%- ctrl.props.enum_id %>) && mg.isRowInRowEditing(row)) {
158
+ <mat-datepicker-toggle matSuffix [for]="<%- ctrl.props.id %>">
159
+ </mat-datepicker-toggle>
160
+ }
161
+ <%} else { %>
162
+ @if (!mg.checkIsReadOnly(<%- ctrl.props.enum_id %>)) {
163
+ <mat-datepicker-toggle matSuffix [for]="<%- ctrl.props.id %>">
164
+ </mat-datepicker-toggle>
165
+ }
166
+ <%}%>
167
167
  <mat-datepicker #<%- ctrl.props.id %>></mat-datepicker>
168
168
 
169
169
  <% if(ctrl.props.is_table_child){ %>
170
170
  </div>
171
171
  <%}%>
172
172
  </mat-form-field>
173
+ <% if(ctrl.props.is_table_child){ %>
174
+ }
175
+ <%}%>
173
176
  <%- include('./zoom-button.ejs', {ctrl : ctrl}) %>
174
177
 
175
178
  </div>
176
179
  <% if(ctrl.props.is_table_child){ %>
180
+ @if (!mg.isRowInRowEditing(row)) {
177
181
  <label
178
182
  <% if (ctrl.props.show_zoom_button ){ %>
179
183
  style="width: 65%"
180
184
  <% } %>
181
- *ngIf="!mg.isRowInRowEditing(row)"
182
185
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
183
186
  {{mg.getValue(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)
184
187
  <% if (ctrl.props.formatter) { %>| <%- ctrl.props.formatter %> : <%- ctrl.props.enum_id %><%}%>}}
185
188
  </label>
189
+ }
186
190
  <%}%>
187
191
 
188
192
  <% if(ctrl.props.validator){ %>
@@ -9,12 +9,11 @@
9
9
  <%- include('../../attributes/common/base/enabled', {ctrl : ctrl}) %>
10
10
  >
11
11
  <%# build of items in listbox %>
12
- <mat-list-option
13
- *ngFor="let o of mg.getItemListValues(<%-ctrl.props.enum_id%>);"
14
- [value] = "o.index"
15
- >
12
+ @for (o of mg.getItemListValues(<%-ctrl.props.enum_id%>); track $index) {
13
+ <mat-list-option [value] = "o.index">
16
14
  {{o.displayValue}}
17
15
  </mat-list-option>
16
+ }
18
17
  </mat-selection-list>
19
18
  <% if (ctrl.props.must_input || ctrl.props.validator != null) {%>
20
19
  <mgError [magic]=<%- ctrl.props.directive_id %>> </mgError>
@@ -25,4 +25,3 @@ case CtrlButtonTypeGui.Hypertext : %>
25
25
  <%- include('../../attributes/common/format.ejs', {ctrl : ctrl}) %>
26
26
  </button>
27
27
  <% } %> %>
28
-