@magic-xpa/cli 4.1300.0-dev4130.1 → 4.1300.0-dev4130.101
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.
- package/package.json +1 -1
- package/src/schematics/magic-utils/config.js +2 -2
- package/src/schematics/magic-utils/config.js.map +1 -1
- package/src/schematics/magic-utils/config.ts +2 -2
- package/src/schematics/magic-utils/env.js +7 -6
- package/src/schematics/magic-utils/env.js.map +1 -1
- package/src/schematics/magic-utils/env.ts +7 -6
- package/src/schematics/magic-utils/metadata.class.js +1 -1
- package/src/schematics/magic-utils/metadata.class.js.map +1 -1
- package/src/schematics/magic-utils/metadata.class.ts +1 -1
- package/src/schematics/mg-add/files/src/app/magic/magic.gen.lib.module.ts +2 -2
- package/src/schematics/mg-add/index.js +127 -9
- package/src/schematics/mg-add/index.js.map +1 -1
- package/src/schematics/mg-add/index.ts +149 -10
- package/templates/angular/src/{app.module.ts → app-module.ts} +3 -3
- package/templates/angular/src/{app.component.ts → app.ts} +1 -1
- package/templates/attributes/common/row_editing_button_attributes.ejs +2 -2
- package/templates/themes/basicHTML/combobox.ejs +10 -7
- package/templates/themes/basicHTML/edit.ejs +20 -10
- package/templates/themes/basicHTML/image.ejs +3 -2
- package/templates/themes/basicHTML/listbox.ejs +3 -4
- package/templates/themes/basicHTML/push-button.ejs +0 -1
- package/templates/themes/basicHTML/radio.ejs +3 -2
- package/templates/themes/basicHTML/tab.ejs +3 -1
- package/templates/themes/basicHiddenHTML/radio.ejs +3 -2
- package/templates/themes/basicHiddenHTML/table.ejs +7 -3
- package/templates/themes/container.ejs +12 -1
- package/templates/themes/material/combobox.ejs +10 -7
- package/templates/themes/material/edit.ejs +32 -28
- package/templates/themes/material/listbox.ejs +3 -4
- package/templates/themes/material/push-button.ejs +0 -1
- package/templates/themes/material/radio.ejs +3 -3
- package/templates/themes/material/tab.ejs +3 -1
- package/templates/themes/table/HTMLTable/table.ejs +7 -3
- package/templates/themes/table/repeatable/table.ejs +7 -3
- /package/src/schematics/mg-add/files/src/app/{app.component.html → app.html} +0 -0
- /package/templates/angular/src/app/{app.component.html.ejs → app.html.ejs} +0 -0
|
@@ -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
|
|
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
|
|
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
|
-
|
|
97
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
13
|
-
|
|
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>
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
required
|
|
10
10
|
<% } %>
|
|
11
11
|
>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[value] = "o.index" >
|
|
12
|
+
@for (o of mg.getItemListValues(<%- ctrl.props.enum_id %>); track $index) {
|
|
13
|
+
<mat-radio-button [value] = "o.index" >
|
|
15
14
|
{{o.displayValue}}
|
|
16
15
|
</mat-radio-button >
|
|
16
|
+
}
|
|
17
17
|
|
|
18
18
|
</mat-radio-group>
|
|
19
19
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
23
|
-
<
|
|
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
|
-
|
|
37
|
+
}
|
|
38
|
+
</ng-container>
|
|
39
|
+
}
|
|
36
40
|
</table>
|
|
37
41
|
</div>
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
[scrollWindow]="false"
|
|
10
10
|
<%}%>
|
|
11
11
|
>
|
|
12
|
-
|
|
13
|
-
<div
|
|
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
|
-
|
|
29
|
+
}
|
|
30
|
+
</div>
|
|
31
|
+
}
|
|
28
32
|
</div>
|
|
File without changes
|
|
File without changes
|