@jsonforms/angular-material 3.3.0-alpha.0 → 3.3.0-alpha.1
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/lib/esm2022/library/layouts/index.mjs +2 -1
- package/lib/esm2022/library/other/table.renderer.mjs +173 -159
- package/lib/fesm2022/jsonforms-angular-material.mjs +175 -161
- package/lib/fesm2022/jsonforms-angular-material.mjs.map +1 -1
- package/lib/library/layouts/index.d.ts +1 -0
- package/lib/library/layouts/index.d.ts.map +1 -1
- package/lib/library/other/table.renderer.d.ts.map +1 -1
- package/lib/package.json +3 -3
- package/package.json +7 -7
- package/src/library/layouts/index.ts +1 -0
- package/src/library/other/table.renderer.ts +91 -79
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/library/layouts/index.ts"],"names":[],"mappings":"AAwBA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/library/layouts/index.ts"],"names":[],"mappings":"AAwBA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.renderer.d.ts","sourceRoot":"","sources":["../../../src/library/other/table.renderer.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAa,MAAM,EAAQ,aAAa,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,cA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AG,IAAI,IAAI;IAMX,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAGvB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAGzB,QAAQ;IAaR,aAAa,WACH,UAAU,WACT,MAAM,KACd,iBAAiB,EAAE,CA+BpB;IAEF,mBAAmB,iBAAkB,UAAU,cAY7C;yCAtGS,aAAa;2CAAb,aAAa;CAuGzB;AACD,eAAO,MAAM,mBAAmB,EAAE,YAGjC,CAAC;AAEF,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED,eAAO,MAAM,mBAAmB,UAAW,MAAM,KAAG,cAIlD,CAAC;AAEH,qBACa,QAAS,YAAW,aAAa;IAC5C,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB;;;;;yCADvC,QAAQ;uCAAR,QAAQ;CASpB"}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonforms/angular-material",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-alpha.0",
|
|
4
4
|
"description": "Material Renderer Set for Angular module of JSON Forms",
|
|
5
5
|
"repository": "https://github.com/eclipsesource/jsonforms",
|
|
6
6
|
"bugs": "https://github.com/eclipsesource/jsonforms/issues",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@angular/material": "^16.0.0 || ^17.0.0",
|
|
52
52
|
"@angular/platform-browser": "^16.0.0 || ^17.0.0",
|
|
53
53
|
"@angular/router": "^16.0.0 || ^17.0.0",
|
|
54
|
-
"@jsonforms/angular": "3.
|
|
55
|
-
"@jsonforms/core": "3.
|
|
54
|
+
"@jsonforms/angular": "3.3.0-alpha.0",
|
|
55
|
+
"@jsonforms/core": "3.3.0-alpha.0",
|
|
56
56
|
"dayjs": "^1.11.7",
|
|
57
57
|
"rxjs": "^6.6.0 || ^7.4.0"
|
|
58
58
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonforms/angular-material",
|
|
3
|
-
"version": "3.3.0-alpha.
|
|
3
|
+
"version": "3.3.0-alpha.1",
|
|
4
4
|
"description": "Material Renderer Set for Angular module of JSON Forms",
|
|
5
5
|
"repository": "https://github.com/eclipsesource/jsonforms",
|
|
6
6
|
"bugs": "https://github.com/eclipsesource/jsonforms/issues",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@angular/material": "^16.0.0 || ^17.0.0",
|
|
52
52
|
"@angular/platform-browser": "^16.0.0 || ^17.0.0",
|
|
53
53
|
"@angular/router": "^16.0.0 || ^17.0.0",
|
|
54
|
-
"@jsonforms/angular": "3.3.0-alpha.
|
|
55
|
-
"@jsonforms/core": "3.3.0-alpha.
|
|
54
|
+
"@jsonforms/angular": "3.3.0-alpha.1",
|
|
55
|
+
"@jsonforms/core": "3.3.0-alpha.1",
|
|
56
56
|
"dayjs": "^1.11.7",
|
|
57
57
|
"rxjs": "^6.6.0 || ^7.4.0"
|
|
58
58
|
},
|
|
@@ -118,10 +118,10 @@
|
|
|
118
118
|
"webpack": "^5.78.0",
|
|
119
119
|
"yargs": "^17.7.2",
|
|
120
120
|
"zone.js": "~0.13.0",
|
|
121
|
-
"@jsonforms/angular": "3.3.0-alpha.
|
|
122
|
-
"@jsonforms/
|
|
123
|
-
"@jsonforms/
|
|
124
|
-
"@jsonforms/examples": "3.3.0-alpha.
|
|
121
|
+
"@jsonforms/angular": "3.3.0-alpha.1",
|
|
122
|
+
"@jsonforms/core": "3.3.0-alpha.1",
|
|
123
|
+
"@jsonforms/angular-test": "3.3.0-alpha.1",
|
|
124
|
+
"@jsonforms/examples": "3.3.0-alpha.1"
|
|
125
125
|
},
|
|
126
126
|
"scripts": {
|
|
127
127
|
"build": "node ./build-package.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
23
|
THE SOFTWARE.
|
|
24
24
|
*/
|
|
25
|
+
export * from './array-layout.renderer';
|
|
25
26
|
export * from './horizontal-layout.renderer';
|
|
26
27
|
export * from './vertical-layout.renderer';
|
|
27
28
|
export * from './categorization-layout.renderer';
|
|
@@ -51,91 +51,103 @@ import {
|
|
|
51
51
|
@Component({
|
|
52
52
|
selector: 'TableRenderer',
|
|
53
53
|
template: `
|
|
54
|
-
<table
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
mat-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[disabled]="!isEnabled()"
|
|
68
|
-
[matTooltip]="translations.addTooltip"
|
|
69
|
-
>
|
|
70
|
-
<mat-icon>add</mat-icon>
|
|
71
|
-
</button>
|
|
72
|
-
</th>
|
|
73
|
-
</tr>
|
|
74
|
-
<tr>
|
|
75
|
-
<td
|
|
76
|
-
mat-cell
|
|
77
|
-
*matCellDef="
|
|
78
|
-
let row;
|
|
79
|
-
let i = index;
|
|
80
|
-
let first = first;
|
|
81
|
-
let last = last
|
|
82
|
-
"
|
|
83
|
-
>
|
|
84
|
-
<button
|
|
85
|
-
*ngIf="uischema?.options?.showSortButtons"
|
|
86
|
-
class="item-up"
|
|
87
|
-
mat-button
|
|
88
|
-
[disabled]="first"
|
|
89
|
-
(click)="up(i)"
|
|
90
|
-
[matTooltip]="translations.upAriaLabel"
|
|
91
|
-
matTooltipPosition="right"
|
|
92
|
-
>
|
|
93
|
-
<mat-icon>arrow_upward</mat-icon>
|
|
94
|
-
</button>
|
|
95
|
-
<button
|
|
96
|
-
*ngIf="uischema?.options?.showSortButtons"
|
|
97
|
-
class="item-down"
|
|
98
|
-
mat-button
|
|
99
|
-
[disabled]="last"
|
|
100
|
-
(click)="down(i)"
|
|
101
|
-
[matTooltip]="translations.downAriaLabel"
|
|
102
|
-
matTooltipPosition="right"
|
|
54
|
+
<div class="table-container">
|
|
55
|
+
<table
|
|
56
|
+
mat-table
|
|
57
|
+
[dataSource]="data"
|
|
58
|
+
class="mat-elevation-z8"
|
|
59
|
+
[trackBy]="trackElement"
|
|
60
|
+
>
|
|
61
|
+
<ng-container matColumnDef="action" stickyEnd>
|
|
62
|
+
<tr>
|
|
63
|
+
<th
|
|
64
|
+
mat-header-cell
|
|
65
|
+
*matHeaderCellDef
|
|
66
|
+
[ngClass]="{ 'sort-column': uischema?.options?.showSortButtons }"
|
|
103
67
|
>
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
68
|
+
<button
|
|
69
|
+
mat-button
|
|
70
|
+
color="primary"
|
|
71
|
+
(click)="add()"
|
|
72
|
+
[disabled]="!isEnabled()"
|
|
73
|
+
[matTooltip]="translations.addTooltip"
|
|
74
|
+
>
|
|
75
|
+
<mat-icon>add</mat-icon>
|
|
76
|
+
</button>
|
|
77
|
+
</th>
|
|
78
|
+
</tr>
|
|
79
|
+
<tr>
|
|
80
|
+
<td
|
|
81
|
+
[ngClass]="{ 'sort-column': uischema?.options?.showSortButtons }"
|
|
82
|
+
mat-cell
|
|
83
|
+
*matCellDef="
|
|
84
|
+
let row;
|
|
85
|
+
let i = index;
|
|
86
|
+
let first = first;
|
|
87
|
+
let last = last
|
|
88
|
+
"
|
|
113
89
|
>
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
90
|
+
<button
|
|
91
|
+
*ngIf="uischema?.options?.showSortButtons"
|
|
92
|
+
class="item-up"
|
|
93
|
+
mat-icon-button
|
|
94
|
+
[disabled]="first"
|
|
95
|
+
(click)="up(i)"
|
|
96
|
+
[matTooltip]="translations.upAriaLabel"
|
|
97
|
+
matTooltipPosition="right"
|
|
98
|
+
>
|
|
99
|
+
<mat-icon>arrow_upward</mat-icon>
|
|
100
|
+
</button>
|
|
101
|
+
<button
|
|
102
|
+
*ngIf="uischema?.options?.showSortButtons"
|
|
103
|
+
class="item-down"
|
|
104
|
+
mat-icon-button
|
|
105
|
+
[disabled]="last"
|
|
106
|
+
(click)="down(i)"
|
|
107
|
+
[matTooltip]="translations.downAriaLabel"
|
|
108
|
+
matTooltipPosition="right"
|
|
109
|
+
>
|
|
110
|
+
<mat-icon>arrow_downward</mat-icon>
|
|
111
|
+
</button>
|
|
112
|
+
<button
|
|
113
|
+
mat-icon-button
|
|
114
|
+
color="warn"
|
|
115
|
+
(click)="remove(i)"
|
|
116
|
+
[disabled]="!isEnabled()"
|
|
117
|
+
matTooltipPosition="right"
|
|
118
|
+
[matTooltip]="translations.removeTooltip"
|
|
119
|
+
>
|
|
120
|
+
<mat-icon>delete</mat-icon>
|
|
121
|
+
</button>
|
|
122
|
+
</td>
|
|
123
|
+
</tr>
|
|
118
124
|
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
<tr></tr
|
|
126
|
+
></ng-container>
|
|
121
127
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
<ng-container
|
|
129
|
+
*ngFor="let item of items"
|
|
130
|
+
matColumnDef="{{ item.property }}"
|
|
131
|
+
>
|
|
132
|
+
<th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>
|
|
133
|
+
<td mat-cell *matCellDef="let index = index">
|
|
134
|
+
<jsonforms-outlet
|
|
135
|
+
[renderProps]="index | getProps : item.props"
|
|
136
|
+
></jsonforms-outlet>
|
|
137
|
+
</td>
|
|
138
|
+
</ng-container>
|
|
133
139
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
140
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
141
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
142
|
+
</table>
|
|
143
|
+
</div>
|
|
137
144
|
`,
|
|
138
|
-
styles: [
|
|
145
|
+
styles: [
|
|
146
|
+
'table {width: 100%;}',
|
|
147
|
+
'.cdk-column-action { width: 15%;}',
|
|
148
|
+
'.sort-column { min-width: 12vw;}',
|
|
149
|
+
'.table-container {max-width: 100%; overflow: auto;}',
|
|
150
|
+
],
|
|
139
151
|
})
|
|
140
152
|
export class TableRenderer extends JsonFormsArrayControl implements OnInit {
|
|
141
153
|
detailUiSchema: UISchemaElement;
|