@magic-xpa/cli 4.1300.0-dev4130.24 → 4.1300.0-dev4130.240

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
@@ -1,22 +1,39 @@
1
- <mat-radio-group
2
- (change)="task.mgOnRadioSelectionChanged(<%- ctrl.props.enum_id %>)"
3
-
1
+ <%# Wrap in a row-specific formGroup if this radio control is child of a table %>
2
+ <div <% if (ctrl.props.is_table_child && (typeof ctrl.props.web_style === "undefined" || ctrl.props.web_style === TableWebStyle.MatGrid)) { %>
3
+ [formGroup]="mg.getFormGroupByRow(row.rowId)"
4
+ <%}%>
5
+ >
6
+ <%# Render radio buttons group if in edit mode, otherwise render a static display label %>
7
+ <% if (ctrl.props.is_table_child) { %>
8
+ @if (mg.isRowInRowEditing(row)) {
9
+ <% } %>
10
+ <mat-radio-group
11
+ (change)="task.mgOnRadioSelectionChanged(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>)"
4
12
  <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>
5
- <%- include('../../attributes/common/base/id', {ctrl : ctrl}) %>
6
13
  <%- include('../../attributes/common/base/formControlName', {ctrl : ctrl}) %>
7
14
 
8
15
  <% if (ctrl.props.must_input && !ctrl.props.must_input.has_exp) { %>
9
16
  required
10
17
  <% } %>
11
- >
12
- <mat-radio-button
13
- *ngFor="let o of mg.getItemListValues(<%- ctrl.props.enum_id %>);"
14
- [value] = "o.index" >
18
+ >
19
+ <%# Get the options and display values, passing the row.rowId if it is a table control %>
20
+ @for (o of mg.getItemListValues(<%- ctrl.props.enum_id %><% if(ctrl.props.is_table_child){ %>, row.rowId<%}%>); track $index) {
21
+ <mat-radio-button [value] = "o.index" >
15
22
  {{o.displayValue}}
16
23
  </mat-radio-button >
24
+ }
17
25
 
18
- </mat-radio-group>
26
+ </mat-radio-group>
27
+ <% if (ctrl.props.is_table_child) { %>
28
+ }
29
+ @if (!mg.isRowInRowEditing(row)) {
30
+ <label <%- include('../../attributes/common/base_attributes', {ctrl : ctrl}) %>>
31
+ {{ mg.getDisplayValue(<%- ctrl.props.enum_id %>, row.rowId) }}
32
+ </label>
33
+ }
34
+ <% } %>
19
35
 
20
- <% if (ctrl.props.must_input || ctrl.props.validator != null) { %>
21
- <mgError [magic]=<%- ctrl.props.directive_id %>> </mgError>
22
- <% } %>
36
+ <% if (ctrl.props.must_input || ctrl.props.validator != null) { %>
37
+ <mgError [magic]=<%- ctrl.props.directive_id %>> </mgError>
38
+ <% } %>
39
+ </div>
@@ -5,13 +5,15 @@
5
5
  [selectedIndex]="mg.getTabSelectedIndex(<%- ctrl.props.enum_id %>)"
6
6
  >
7
7
  <%# extra div to add the tab style%>
8
- <mat-tab *ngFor="let o of mg.getItemListValues(<%- ctrl.props.enum_id %>)"
8
+ @for (o of mg.getItemListValues(<%- ctrl.props.enum_id %>); track $index) {
9
+ <mat-tab
9
10
  <% if (ctrl.props.enabled){ %>
10
11
  [disabled]="mg.isDisabled(<%- ctrl.props.enum_id %>)"
11
12
  <% } %>
12
13
  [label]="mg.getTabpageText(<%- ctrl.props.enum_id %>, o.index)"
13
14
  >
14
15
  </mat-tab>
16
+ }
15
17
  </mat-tab-group>
16
18
  <%# add tab pages after adding the buttons, so the buttons are at the top%>
17
19
  <%- include(`../container`, {child: ctrl}) %>
@@ -19,8 +19,10 @@
19
19
  <% ctrl.children.forEach(child =>{ %>
20
20
  <% child.props.no_modifiable_descendants = ctrl.props.no_modifiable_descendants; %>
21
21
  <%})} %>
22
- <ng-container *ngFor="let row of task.Records.list">
23
- <tr *ngIf="mg.ifRowCreated(row) && !mg.isDataviewEmpty()" id="row"
22
+ @for (row of task.Records.list; track $index) {
23
+ <ng-container>
24
+ @if (mg.ifRowCreated(row) && !mg.isDataviewEmpty()) {
25
+ <tr id="row"
24
26
  <%if (typeof ctrl.props.no_modifiable_descendants === "undefined") {%>
25
27
  [formGroup]="mg.getFormGroupByRow(row.rowId)"
26
28
  <%}%>
@@ -32,6 +34,8 @@
32
34
  >
33
35
  <%- include(`../../container`, {ctrl: ctrl}) %>
34
36
  </tr>
35
- </ng-container>
37
+ }
38
+ </ng-container>
39
+ }
36
40
  </table>
37
41
  </div>
@@ -9,8 +9,10 @@
9
9
  [scrollWindow]="false"
10
10
  <%}%>
11
11
  >
12
- <div *ngFor="let row of task.Records.list">
13
- <div *ngIf="mg.ifRowCreated(row) && !mg.isDataviewEmpty()" id="row"
12
+ @for (row of task.Records.list; track $index) {
13
+ <div>
14
+ @if (mg.ifRowCreated(row) && !mg.isDataviewEmpty()) {
15
+ <div id="row"
14
16
  <% if(magicConfig.allow_testing) { %>
15
17
  MgControlType="MgRow"
16
18
  <% } %>
@@ -24,5 +26,7 @@
24
26
  [magicRow]="row?.rowId">
25
27
  <%- include(`../../container`, {ctrl: ctrl}) %>
26
28
  </div>
27
- </div>
29
+ }
30
+ </div>
31
+ }
28
32
  </div>
package/tsconfig.json CHANGED
@@ -6,6 +6,8 @@
6
6
  "target": "es6",
7
7
  "module": "commonjs",
8
8
  "moduleResolution": "node",
9
+ "ignoreDeprecations": "6.0",
10
+ "strict": false,
9
11
 
10
12
  "noEmitOnError" : false,
11
13
  "skipLibCheck" : true,