@jsonforms/angular-material 3.2.1 → 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/controls/date.renderer.mjs +112 -14
- package/lib/esm2022/library/layouts/index.mjs +2 -1
- package/lib/esm2022/library/module.mjs +5 -3
- package/lib/esm2022/library/other/master-detail/master.mjs +3 -1
- package/lib/esm2022/library/other/table.renderer.mjs +190 -168
- package/lib/esm2022/library/util/date-format.mjs +27 -0
- package/lib/esm2022/library/util/dayjs-date-adapter.mjs +100 -0
- package/lib/fesm2022/jsonforms-angular-material.mjs +424 -184
- package/lib/fesm2022/jsonforms-angular-material.mjs.map +1 -1
- package/lib/library/controls/date.renderer.d.ts +15 -3
- package/lib/library/controls/date.renderer.d.ts.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/module.d.ts +1 -1
- package/lib/library/module.d.ts.map +1 -1
- package/lib/library/other/master-detail/master.d.ts.map +1 -1
- package/lib/library/other/table.renderer.d.ts +10 -2
- package/lib/library/other/table.renderer.d.ts.map +1 -1
- package/lib/library/util/date-format.d.ts +17 -0
- package/lib/library/util/date-format.d.ts.map +1 -0
- package/lib/library/util/dayjs-date-adapter.d.ts +28 -0
- package/lib/library/util/dayjs-date-adapter.d.ts.map +1 -0
- package/lib/package.json +4 -3
- package/package.json +10 -8
- package/src/library/controls/date.renderer.ts +106 -8
- package/src/library/layouts/index.ts +1 -0
- package/src/library/module.ts +2 -1
- package/src/library/other/master-detail/master.ts +1 -0
- package/src/library/other/table.renderer.ts +104 -88
- package/src/library/util/date-format.ts +24 -0
- package/src/library/util/dayjs-date-adapter.ts +101 -0
|
@@ -26,7 +26,7 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
26
26
|
import * as i4$4 from '@angular/material/list';
|
|
27
27
|
import { MatListModule } from '@angular/material/list';
|
|
28
28
|
import * as i6 from '@angular/material/core';
|
|
29
|
-
import { MatNativeDateModule } from '@angular/material/core';
|
|
29
|
+
import { NativeDateAdapter, MAT_DATE_FORMATS, DateAdapter, MatNativeDateModule } from '@angular/material/core';
|
|
30
30
|
import { MatSelectModule } from '@angular/material/select';
|
|
31
31
|
import * as i3$1 from '@angular/material/sidenav';
|
|
32
32
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
@@ -40,11 +40,13 @@ import * as i3$3 from '@angular/material/tabs';
|
|
|
40
40
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
41
41
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
42
42
|
import * as i0 from '@angular/core';
|
|
43
|
-
import { Component, ChangeDetectionStrategy, Input, Pipe, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
43
|
+
import { Component, ChangeDetectionStrategy, Input, Injectable, ViewEncapsulation, Inject, Pipe, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
44
44
|
import * as i1 from '@jsonforms/angular';
|
|
45
45
|
import { JsonFormsControl, JsonFormsBaseRenderer, JsonFormsArrayControl, JsonFormsControlWithDetail, JsonFormsAbstractControl, JsonFormsModule } from '@jsonforms/angular';
|
|
46
|
-
import { composeWithUi, Actions, rankWith, isEnumControl, isBooleanControl, isDateControl, isNumberControl, or, isIntegerControl, isRangeControl, isMultiLineControl, isStringControl, and, optionIs, mapStateToLabelProps, uiTypeIs, decode, mapDispatchToArrayControlProps, findUISchema, setReadonly, getFirstPrimitiveProp, createDefaultValue, mapStateToArrayControlProps, Generate, isObjectControl,
|
|
46
|
+
import { composeWithUi, Actions, rankWith, isEnumControl, isBooleanControl, defaultDateFormat, isDateControl, isNumberControl, or, isIntegerControl, isRangeControl, isMultiLineControl, isStringControl, and, optionIs, mapStateToLabelProps, uiTypeIs, decode, mapDispatchToArrayControlProps, findUISchema, setReadonly, getFirstPrimitiveProp, createDefaultValue, mapStateToArrayControlProps, Generate, isObjectControl, encode, deriveTypes, isObjectArrayControl, isPrimitiveArrayControl, Paths, mapStateToLayoutProps, isVisible, getAjv, deriveLabelForUISchemaElement, defaultJsonFormsI18nState, categorizationHasCategory, mapStateToArrayLayoutProps, unsetReadonly, isObjectArrayWithNesting } from '@jsonforms/core';
|
|
47
47
|
import { startWith, map } from 'rxjs/operators';
|
|
48
|
+
import dayjs from 'dayjs';
|
|
49
|
+
import customParsing from 'dayjs/plugin/customParseFormat';
|
|
48
50
|
import merge from 'lodash/merge';
|
|
49
51
|
import some from 'lodash/some';
|
|
50
52
|
import get from 'lodash/get';
|
|
@@ -287,6 +289,125 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
287
289
|
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }, { type: i0.ChangeDetectorRef }]; } });
|
|
288
290
|
const booleanControlTester = rankWith(2, isBooleanControl);
|
|
289
291
|
|
|
292
|
+
class MyFormat {
|
|
293
|
+
displayFormat = 'M/D/YYYY';
|
|
294
|
+
setDisplayFormat(displayFormat) {
|
|
295
|
+
this.displayFormat = displayFormat;
|
|
296
|
+
}
|
|
297
|
+
get display() {
|
|
298
|
+
return {
|
|
299
|
+
monthYearLabel: 'YYYY-MM',
|
|
300
|
+
dateA11yLabel: 'YYYY-MM-DD',
|
|
301
|
+
monthYearA11yLabel: 'YYYY-MM',
|
|
302
|
+
dateInput: this.displayFormat,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
get parse() {
|
|
306
|
+
return {
|
|
307
|
+
dateInput: this.displayFormat,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MyFormat, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
311
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MyFormat });
|
|
312
|
+
}
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MyFormat, decorators: [{
|
|
314
|
+
type: Injectable
|
|
315
|
+
}] });
|
|
316
|
+
|
|
317
|
+
/*
|
|
318
|
+
The MIT License
|
|
319
|
+
|
|
320
|
+
Copyright (c) 2017-2019 EclipseSource Munich
|
|
321
|
+
https://github.com/eclipsesource/jsonforms
|
|
322
|
+
|
|
323
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
324
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
325
|
+
in the Software without restriction, including without limitation the rights
|
|
326
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
327
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
328
|
+
furnished to do so, subject to the following conditions:
|
|
329
|
+
|
|
330
|
+
The above copyright notice and this permission notice shall be included in
|
|
331
|
+
all copies or substantial portions of the Software.
|
|
332
|
+
|
|
333
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
334
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
335
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
336
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
337
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
338
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
339
|
+
THE SOFTWARE.
|
|
340
|
+
*/
|
|
341
|
+
// allows to parse date strings with custom format
|
|
342
|
+
dayjs.extend(customParsing);
|
|
343
|
+
/**
|
|
344
|
+
* date adapter for dayjs to parse and format dates
|
|
345
|
+
*/
|
|
346
|
+
class DayJsDateAdapter extends NativeDateAdapter {
|
|
347
|
+
saveFormat = defaultDateFormat;
|
|
348
|
+
setSaveFormat(format) {
|
|
349
|
+
this.saveFormat = format;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* parses a given data prop string in the save-format into a date object
|
|
353
|
+
* @param value date string to be parsed
|
|
354
|
+
* @returns date object or null if parsing failed
|
|
355
|
+
*/
|
|
356
|
+
parseSaveFormat(value) {
|
|
357
|
+
return this.parse(value, this.saveFormat);
|
|
358
|
+
}
|
|
359
|
+
parse(value, format) {
|
|
360
|
+
if (!value) {
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
const date = dayjs(value, format);
|
|
364
|
+
if (date.isValid()) {
|
|
365
|
+
return date.toDate();
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
toSaveFormat(value) {
|
|
372
|
+
if (!value) {
|
|
373
|
+
return undefined;
|
|
374
|
+
}
|
|
375
|
+
const date = dayjs(value);
|
|
376
|
+
if (date.isValid()) {
|
|
377
|
+
return date.format(this.saveFormat);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
return undefined;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* transforms the date to a string representation for display
|
|
385
|
+
* @param date date to be formatted
|
|
386
|
+
* @param displayFormat format to be used for formatting the date e.g. YYYY-MM-DD
|
|
387
|
+
* @returns string representation of the date
|
|
388
|
+
*/
|
|
389
|
+
format(date, displayFormat) {
|
|
390
|
+
return dayjs(date).format(displayFormat);
|
|
391
|
+
}
|
|
392
|
+
deserialize(value) {
|
|
393
|
+
if (!value) {
|
|
394
|
+
return null;
|
|
395
|
+
}
|
|
396
|
+
const date = dayjs(value);
|
|
397
|
+
if (date.isValid()) {
|
|
398
|
+
return date.toDate();
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
return null;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DayJsDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
405
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DayJsDateAdapter });
|
|
406
|
+
}
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DayJsDateAdapter, decorators: [{
|
|
408
|
+
type: Injectable
|
|
409
|
+
}] });
|
|
410
|
+
|
|
290
411
|
/*
|
|
291
412
|
The MIT License
|
|
292
413
|
|
|
@@ -312,14 +433,77 @@ const booleanControlTester = rankWith(2, isBooleanControl);
|
|
|
312
433
|
THE SOFTWARE.
|
|
313
434
|
*/
|
|
314
435
|
class DateControlRenderer extends JsonFormsControl {
|
|
436
|
+
dateFormat;
|
|
437
|
+
dateAdapter;
|
|
315
438
|
focused = false;
|
|
316
|
-
|
|
439
|
+
views = [];
|
|
440
|
+
startView = '';
|
|
441
|
+
panelClass = '';
|
|
442
|
+
constructor(jsonformsService, dateFormat, dateAdapter) {
|
|
317
443
|
super(jsonformsService);
|
|
444
|
+
this.dateFormat = dateFormat;
|
|
445
|
+
this.dateAdapter = dateAdapter;
|
|
318
446
|
}
|
|
319
|
-
getEventValue = (event) =>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
447
|
+
getEventValue = (event) => {
|
|
448
|
+
const value = event.value ? event.value : event;
|
|
449
|
+
return this.dateAdapter.toSaveFormat(value);
|
|
450
|
+
};
|
|
451
|
+
mapToProps(state) {
|
|
452
|
+
const props = super.mapToProps(state);
|
|
453
|
+
const saveFormat = this.uischema?.options?.dateSaveFormat
|
|
454
|
+
? this.uischema.options.dateSaveFormat
|
|
455
|
+
: defaultDateFormat;
|
|
456
|
+
this.views = this.uischema?.options?.views
|
|
457
|
+
? this.uischema.options.views
|
|
458
|
+
: ['year', 'month', 'day'];
|
|
459
|
+
this.setViewProperties();
|
|
460
|
+
const dateFormat = this.uischema?.options?.dateFormat;
|
|
461
|
+
if (dateFormat) {
|
|
462
|
+
this.dateFormat.setDisplayFormat(dateFormat);
|
|
463
|
+
}
|
|
464
|
+
this.dateAdapter.setSaveFormat(saveFormat);
|
|
465
|
+
if (this.jsonFormsService.getLocale()) {
|
|
466
|
+
this.dateAdapter.setLocale(this.jsonFormsService.getLocale());
|
|
467
|
+
}
|
|
468
|
+
const date = this.dateAdapter.parseSaveFormat(props.data);
|
|
469
|
+
return { ...props, data: date };
|
|
470
|
+
}
|
|
471
|
+
yearSelected($event, datepicker) {
|
|
472
|
+
if (!this.views.includes('day') && !this.views.includes('month')) {
|
|
473
|
+
this.onChange($event);
|
|
474
|
+
datepicker.close();
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
monthSelected($event, datepicker) {
|
|
478
|
+
if (!this.views.includes('day')) {
|
|
479
|
+
this.onChange($event);
|
|
480
|
+
datepicker.close();
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
setViewProperties() {
|
|
484
|
+
if (!this.views.includes('day')) {
|
|
485
|
+
this.startView = 'multi-year';
|
|
486
|
+
this.panelClass = 'no-panel-navigation';
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
this.startView = 'month';
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateControlRenderer, deps: [{ token: i1.JsonFormsAngularService }, { token: MAT_DATE_FORMATS }, { token: DateAdapter }], target: i0.ɵɵFactoryTarget.Component });
|
|
493
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DateControlRenderer, selector: "DateControlRenderer", providers: [
|
|
494
|
+
{
|
|
495
|
+
provide: DateAdapter,
|
|
496
|
+
useClass: DayJsDateAdapter,
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
provide: MAT_DATE_FORMATS,
|
|
500
|
+
useClass: MyFormat,
|
|
501
|
+
},
|
|
502
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
503
|
+
<mat-form-field
|
|
504
|
+
class="date-control-renderer"
|
|
505
|
+
[ngStyle]="{ display: hidden ? 'none' : '' }"
|
|
506
|
+
>
|
|
323
507
|
<mat-label>{{ label }}</mat-label>
|
|
324
508
|
<input
|
|
325
509
|
matInput
|
|
@@ -334,18 +518,27 @@ class DateControlRenderer extends JsonFormsControl {
|
|
|
334
518
|
matSuffix
|
|
335
519
|
[for]="datepicker"
|
|
336
520
|
></mat-datepicker-toggle>
|
|
337
|
-
<mat-datepicker
|
|
521
|
+
<mat-datepicker
|
|
522
|
+
#datepicker
|
|
523
|
+
(monthSelected)="monthSelected($event, datepicker)"
|
|
524
|
+
(yearSelected)="yearSelected($event, datepicker)"
|
|
525
|
+
[startView]="startView"
|
|
526
|
+
[panelClass]="panelClass"
|
|
527
|
+
></mat-datepicker>
|
|
338
528
|
<mat-hint *ngIf="shouldShowUnfocusedDescription() || focused">{{
|
|
339
529
|
description
|
|
340
530
|
}}</mat-hint>
|
|
341
531
|
<mat-error>{{ error }}</mat-error>
|
|
342
532
|
</mat-form-field>
|
|
343
|
-
`, isInline: true, styles: ["
|
|
533
|
+
`, isInline: true, styles: ["DateControlRenderer{display:flex;flex-direction:row}.date-control-renderer{flex:1 1 auto}.no-panel-navigation .mat-calendar-period-button{pointer-events:none}.no-panel-navigation .mat-calendar-arrow{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
344
534
|
}
|
|
345
535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateControlRenderer, decorators: [{
|
|
346
536
|
type: Component,
|
|
347
537
|
args: [{ selector: 'DateControlRenderer', template: `
|
|
348
|
-
<mat-form-field
|
|
538
|
+
<mat-form-field
|
|
539
|
+
class="date-control-renderer"
|
|
540
|
+
[ngStyle]="{ display: hidden ? 'none' : '' }"
|
|
541
|
+
>
|
|
349
542
|
<mat-label>{{ label }}</mat-label>
|
|
350
543
|
<input
|
|
351
544
|
matInput
|
|
@@ -360,14 +553,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
360
553
|
matSuffix
|
|
361
554
|
[for]="datepicker"
|
|
362
555
|
></mat-datepicker-toggle>
|
|
363
|
-
<mat-datepicker
|
|
556
|
+
<mat-datepicker
|
|
557
|
+
#datepicker
|
|
558
|
+
(monthSelected)="monthSelected($event, datepicker)"
|
|
559
|
+
(yearSelected)="yearSelected($event, datepicker)"
|
|
560
|
+
[startView]="startView"
|
|
561
|
+
[panelClass]="panelClass"
|
|
562
|
+
></mat-datepicker>
|
|
364
563
|
<mat-hint *ngIf="shouldShowUnfocusedDescription() || focused">{{
|
|
365
564
|
description
|
|
366
565
|
}}</mat-hint>
|
|
367
566
|
<mat-error>{{ error }}</mat-error>
|
|
368
567
|
</mat-form-field>
|
|
369
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
370
|
-
|
|
568
|
+
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
569
|
+
{
|
|
570
|
+
provide: DateAdapter,
|
|
571
|
+
useClass: DayJsDateAdapter,
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
provide: MAT_DATE_FORMATS,
|
|
575
|
+
useClass: MyFormat,
|
|
576
|
+
},
|
|
577
|
+
], styles: ["DateControlRenderer{display:flex;flex-direction:row}.date-control-renderer{flex:1 1 auto}.no-panel-navigation .mat-calendar-period-button{pointer-events:none}.no-panel-navigation .mat-calendar-arrow{display:none}\n"] }]
|
|
578
|
+
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }, { type: MyFormat, decorators: [{
|
|
579
|
+
type: Inject,
|
|
580
|
+
args: [MAT_DATE_FORMATS]
|
|
581
|
+
}] }, { type: DayJsDateAdapter, decorators: [{
|
|
582
|
+
type: Inject,
|
|
583
|
+
args: [DateAdapter]
|
|
584
|
+
}] }]; } });
|
|
371
585
|
const DateControlRendererTester = rankWith(2, isDateControl);
|
|
372
586
|
|
|
373
587
|
/*
|
|
@@ -1110,6 +1324,7 @@ class MasterListComponent extends JsonFormsArrayControl {
|
|
|
1110
1324
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MasterListComponent, selector: "jsonforms-list-with-detail-master", usesInheritance: true, ngImport: i0, template: `
|
|
1111
1325
|
<mat-sidenav-container
|
|
1112
1326
|
[ngStyle]="{ display: hidden ? 'none' : '' }"
|
|
1327
|
+
autosize="true"
|
|
1113
1328
|
class="container"
|
|
1114
1329
|
>
|
|
1115
1330
|
<mat-sidenav mode="side" opened>
|
|
@@ -1164,6 +1379,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1164
1379
|
args: [{ selector: 'jsonforms-list-with-detail-master', template: `
|
|
1165
1380
|
<mat-sidenav-container
|
|
1166
1381
|
[ngStyle]="{ display: hidden ? 'none' : '' }"
|
|
1382
|
+
autosize="true"
|
|
1167
1383
|
class="container"
|
|
1168
1384
|
>
|
|
1169
1385
|
<mat-sidenav mode="side" opened>
|
|
@@ -1338,14 +1554,6 @@ class TableRenderer extends JsonFormsArrayControl {
|
|
|
1338
1554
|
}
|
|
1339
1555
|
this.translations = props.translations;
|
|
1340
1556
|
}
|
|
1341
|
-
getProps(index, props) {
|
|
1342
|
-
const rowPath = Paths.compose(props.path, `${index}`);
|
|
1343
|
-
return {
|
|
1344
|
-
schema: props.schema,
|
|
1345
|
-
uischema: props.uischema,
|
|
1346
|
-
path: rowPath,
|
|
1347
|
-
};
|
|
1348
|
-
}
|
|
1349
1557
|
remove(index) {
|
|
1350
1558
|
this.removeItems(this.propsPath, [index])();
|
|
1351
1559
|
}
|
|
@@ -1413,178 +1621,192 @@ class TableRenderer extends JsonFormsArrayControl {
|
|
|
1413
1621
|
};
|
|
1414
1622
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1415
1623
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableRenderer, selector: "TableRenderer", usesInheritance: true, ngImport: i0, template: `
|
|
1416
|
-
<table
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
<
|
|
1424
|
-
<
|
|
1425
|
-
<
|
|
1426
|
-
mat-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
[disabled]="!isEnabled()"
|
|
1430
|
-
[matTooltip]="translations.addTooltip"
|
|
1431
|
-
>
|
|
1432
|
-
<mat-icon>add</mat-icon>
|
|
1433
|
-
</button>
|
|
1434
|
-
</th>
|
|
1435
|
-
</tr>
|
|
1436
|
-
<tr>
|
|
1437
|
-
<td
|
|
1438
|
-
mat-cell
|
|
1439
|
-
*matCellDef="
|
|
1440
|
-
let row;
|
|
1441
|
-
let i = index;
|
|
1442
|
-
let first = first;
|
|
1443
|
-
let last = last
|
|
1444
|
-
"
|
|
1445
|
-
>
|
|
1446
|
-
<button
|
|
1447
|
-
*ngIf="uischema?.options?.showSortButtons"
|
|
1448
|
-
class="item-up"
|
|
1449
|
-
mat-button
|
|
1450
|
-
[disabled]="first"
|
|
1451
|
-
(click)="up(i)"
|
|
1452
|
-
[matTooltip]="translations.upAriaLabel"
|
|
1453
|
-
matTooltipPosition="right"
|
|
1454
|
-
>
|
|
1455
|
-
<mat-icon>arrow_upward</mat-icon>
|
|
1456
|
-
</button>
|
|
1457
|
-
<button
|
|
1458
|
-
*ngIf="uischema?.options?.showSortButtons"
|
|
1459
|
-
class="item-down"
|
|
1460
|
-
mat-button
|
|
1461
|
-
[disabled]="last"
|
|
1462
|
-
(click)="down(i)"
|
|
1463
|
-
[matTooltip]="translations.downAriaLabel"
|
|
1464
|
-
matTooltipPosition="right"
|
|
1624
|
+
<div class="table-container">
|
|
1625
|
+
<table
|
|
1626
|
+
mat-table
|
|
1627
|
+
[dataSource]="data"
|
|
1628
|
+
class="mat-elevation-z8"
|
|
1629
|
+
[trackBy]="trackElement"
|
|
1630
|
+
>
|
|
1631
|
+
<ng-container matColumnDef="action" stickyEnd>
|
|
1632
|
+
<tr>
|
|
1633
|
+
<th
|
|
1634
|
+
mat-header-cell
|
|
1635
|
+
*matHeaderCellDef
|
|
1636
|
+
[ngClass]="{ 'sort-column': uischema?.options?.showSortButtons }"
|
|
1465
1637
|
>
|
|
1466
|
-
<
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1638
|
+
<button
|
|
1639
|
+
mat-button
|
|
1640
|
+
color="primary"
|
|
1641
|
+
(click)="add()"
|
|
1642
|
+
[disabled]="!isEnabled()"
|
|
1643
|
+
[matTooltip]="translations.addTooltip"
|
|
1644
|
+
>
|
|
1645
|
+
<mat-icon>add</mat-icon>
|
|
1646
|
+
</button>
|
|
1647
|
+
</th>
|
|
1648
|
+
</tr>
|
|
1649
|
+
<tr>
|
|
1650
|
+
<td
|
|
1651
|
+
[ngClass]="{ 'sort-column': uischema?.options?.showSortButtons }"
|
|
1652
|
+
mat-cell
|
|
1653
|
+
*matCellDef="
|
|
1654
|
+
let row;
|
|
1655
|
+
let i = index;
|
|
1656
|
+
let first = first;
|
|
1657
|
+
let last = last
|
|
1658
|
+
"
|
|
1475
1659
|
>
|
|
1476
|
-
<
|
|
1477
|
-
|
|
1660
|
+
<button
|
|
1661
|
+
*ngIf="uischema?.options?.showSortButtons"
|
|
1662
|
+
class="item-up"
|
|
1663
|
+
mat-icon-button
|
|
1664
|
+
[disabled]="first"
|
|
1665
|
+
(click)="up(i)"
|
|
1666
|
+
[matTooltip]="translations.upAriaLabel"
|
|
1667
|
+
matTooltipPosition="right"
|
|
1668
|
+
>
|
|
1669
|
+
<mat-icon>arrow_upward</mat-icon>
|
|
1670
|
+
</button>
|
|
1671
|
+
<button
|
|
1672
|
+
*ngIf="uischema?.options?.showSortButtons"
|
|
1673
|
+
class="item-down"
|
|
1674
|
+
mat-icon-button
|
|
1675
|
+
[disabled]="last"
|
|
1676
|
+
(click)="down(i)"
|
|
1677
|
+
[matTooltip]="translations.downAriaLabel"
|
|
1678
|
+
matTooltipPosition="right"
|
|
1679
|
+
>
|
|
1680
|
+
<mat-icon>arrow_downward</mat-icon>
|
|
1681
|
+
</button>
|
|
1682
|
+
<button
|
|
1683
|
+
mat-icon-button
|
|
1684
|
+
color="warn"
|
|
1685
|
+
(click)="remove(i)"
|
|
1686
|
+
[disabled]="!isEnabled()"
|
|
1687
|
+
matTooltipPosition="right"
|
|
1688
|
+
[matTooltip]="translations.removeTooltip"
|
|
1689
|
+
>
|
|
1690
|
+
<mat-icon>delete</mat-icon>
|
|
1691
|
+
</button>
|
|
1692
|
+
</td>
|
|
1693
|
+
</tr>
|
|
1694
|
+
|
|
1695
|
+
<tr></tr
|
|
1696
|
+
></ng-container>
|
|
1697
|
+
|
|
1698
|
+
<ng-container
|
|
1699
|
+
*ngFor="let item of items"
|
|
1700
|
+
matColumnDef="{{ item.property }}"
|
|
1701
|
+
>
|
|
1702
|
+
<th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>
|
|
1703
|
+
<td mat-cell *matCellDef="let index = index">
|
|
1704
|
+
<jsonforms-outlet
|
|
1705
|
+
[renderProps]="index | getProps : item.props"
|
|
1706
|
+
></jsonforms-outlet>
|
|
1478
1707
|
</td>
|
|
1479
|
-
</
|
|
1708
|
+
</ng-container>
|
|
1480
1709
|
|
|
1481
|
-
<tr></tr
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
matColumnDef="{{ item.property }}"
|
|
1487
|
-
>
|
|
1488
|
-
<th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>
|
|
1489
|
-
<td mat-cell *matCellDef="let index = index">
|
|
1490
|
-
<jsonforms-outlet
|
|
1491
|
-
[renderProps]="getProps(index, item.props)"
|
|
1492
|
-
></jsonforms-outlet>
|
|
1493
|
-
</td>
|
|
1494
|
-
</ng-container>
|
|
1495
|
-
|
|
1496
|
-
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
1497
|
-
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
1498
|
-
</table>
|
|
1499
|
-
`, isInline: true, styles: ["table{width:100%}\n", ".cdk-column-action{width:15%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.JsonFormsOutlet, selector: "jsonforms-outlet", inputs: ["renderProps"] }, { kind: "component", type: i5$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
1710
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
1711
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
1712
|
+
</table>
|
|
1713
|
+
</div>
|
|
1714
|
+
`, isInline: true, styles: ["table{width:100%}\n", ".cdk-column-action{width:15%}\n", ".sort-column{min-width:12vw}\n", ".table-container{max-width:100%;overflow:auto}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i2.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return i2.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return i2.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i1.JsonFormsOutlet; }), selector: "jsonforms-outlet", inputs: ["renderProps"] }, { kind: "component", type: i0.forwardRef(function () { return i5$2.MatButton; }), selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i0.forwardRef(function () { return i5$2.MatIconButton; }), selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i0.forwardRef(function () { return i6$1.MatIcon; }), selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i0.forwardRef(function () { return i5$3.MatTable; }), selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatHeaderCellDef; }), selector: "[matHeaderCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatHeaderRowDef; }), selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatColumnDef; }), selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatCellDef; }), selector: "[matCellDef]" }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatRowDef; }), selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatHeaderCell; }), selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i0.forwardRef(function () { return i5$3.MatCell; }), selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i0.forwardRef(function () { return i5$3.MatHeaderRow; }), selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i0.forwardRef(function () { return i5$3.MatRow; }), selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i0.forwardRef(function () { return i6$2.MatTooltip; }), selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i0.forwardRef(function () { return GetProps; }), name: "getProps" }] });
|
|
1500
1715
|
}
|
|
1501
1716
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableRenderer, decorators: [{
|
|
1502
1717
|
type: Component,
|
|
1503
1718
|
args: [{ selector: 'TableRenderer', template: `
|
|
1504
|
-
<table
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
<
|
|
1512
|
-
<
|
|
1513
|
-
<
|
|
1514
|
-
mat-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
[disabled]="!isEnabled()"
|
|
1518
|
-
[matTooltip]="translations.addTooltip"
|
|
1519
|
-
>
|
|
1520
|
-
<mat-icon>add</mat-icon>
|
|
1521
|
-
</button>
|
|
1522
|
-
</th>
|
|
1523
|
-
</tr>
|
|
1524
|
-
<tr>
|
|
1525
|
-
<td
|
|
1526
|
-
mat-cell
|
|
1527
|
-
*matCellDef="
|
|
1528
|
-
let row;
|
|
1529
|
-
let i = index;
|
|
1530
|
-
let first = first;
|
|
1531
|
-
let last = last
|
|
1532
|
-
"
|
|
1533
|
-
>
|
|
1534
|
-
<button
|
|
1535
|
-
*ngIf="uischema?.options?.showSortButtons"
|
|
1536
|
-
class="item-up"
|
|
1537
|
-
mat-button
|
|
1538
|
-
[disabled]="first"
|
|
1539
|
-
(click)="up(i)"
|
|
1540
|
-
[matTooltip]="translations.upAriaLabel"
|
|
1541
|
-
matTooltipPosition="right"
|
|
1542
|
-
>
|
|
1543
|
-
<mat-icon>arrow_upward</mat-icon>
|
|
1544
|
-
</button>
|
|
1545
|
-
<button
|
|
1546
|
-
*ngIf="uischema?.options?.showSortButtons"
|
|
1547
|
-
class="item-down"
|
|
1548
|
-
mat-button
|
|
1549
|
-
[disabled]="last"
|
|
1550
|
-
(click)="down(i)"
|
|
1551
|
-
[matTooltip]="translations.downAriaLabel"
|
|
1552
|
-
matTooltipPosition="right"
|
|
1719
|
+
<div class="table-container">
|
|
1720
|
+
<table
|
|
1721
|
+
mat-table
|
|
1722
|
+
[dataSource]="data"
|
|
1723
|
+
class="mat-elevation-z8"
|
|
1724
|
+
[trackBy]="trackElement"
|
|
1725
|
+
>
|
|
1726
|
+
<ng-container matColumnDef="action" stickyEnd>
|
|
1727
|
+
<tr>
|
|
1728
|
+
<th
|
|
1729
|
+
mat-header-cell
|
|
1730
|
+
*matHeaderCellDef
|
|
1731
|
+
[ngClass]="{ 'sort-column': uischema?.options?.showSortButtons }"
|
|
1553
1732
|
>
|
|
1554
|
-
<
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1733
|
+
<button
|
|
1734
|
+
mat-button
|
|
1735
|
+
color="primary"
|
|
1736
|
+
(click)="add()"
|
|
1737
|
+
[disabled]="!isEnabled()"
|
|
1738
|
+
[matTooltip]="translations.addTooltip"
|
|
1739
|
+
>
|
|
1740
|
+
<mat-icon>add</mat-icon>
|
|
1741
|
+
</button>
|
|
1742
|
+
</th>
|
|
1743
|
+
</tr>
|
|
1744
|
+
<tr>
|
|
1745
|
+
<td
|
|
1746
|
+
[ngClass]="{ 'sort-column': uischema?.options?.showSortButtons }"
|
|
1747
|
+
mat-cell
|
|
1748
|
+
*matCellDef="
|
|
1749
|
+
let row;
|
|
1750
|
+
let i = index;
|
|
1751
|
+
let first = first;
|
|
1752
|
+
let last = last
|
|
1753
|
+
"
|
|
1563
1754
|
>
|
|
1564
|
-
<
|
|
1565
|
-
|
|
1755
|
+
<button
|
|
1756
|
+
*ngIf="uischema?.options?.showSortButtons"
|
|
1757
|
+
class="item-up"
|
|
1758
|
+
mat-icon-button
|
|
1759
|
+
[disabled]="first"
|
|
1760
|
+
(click)="up(i)"
|
|
1761
|
+
[matTooltip]="translations.upAriaLabel"
|
|
1762
|
+
matTooltipPosition="right"
|
|
1763
|
+
>
|
|
1764
|
+
<mat-icon>arrow_upward</mat-icon>
|
|
1765
|
+
</button>
|
|
1766
|
+
<button
|
|
1767
|
+
*ngIf="uischema?.options?.showSortButtons"
|
|
1768
|
+
class="item-down"
|
|
1769
|
+
mat-icon-button
|
|
1770
|
+
[disabled]="last"
|
|
1771
|
+
(click)="down(i)"
|
|
1772
|
+
[matTooltip]="translations.downAriaLabel"
|
|
1773
|
+
matTooltipPosition="right"
|
|
1774
|
+
>
|
|
1775
|
+
<mat-icon>arrow_downward</mat-icon>
|
|
1776
|
+
</button>
|
|
1777
|
+
<button
|
|
1778
|
+
mat-icon-button
|
|
1779
|
+
color="warn"
|
|
1780
|
+
(click)="remove(i)"
|
|
1781
|
+
[disabled]="!isEnabled()"
|
|
1782
|
+
matTooltipPosition="right"
|
|
1783
|
+
[matTooltip]="translations.removeTooltip"
|
|
1784
|
+
>
|
|
1785
|
+
<mat-icon>delete</mat-icon>
|
|
1786
|
+
</button>
|
|
1787
|
+
</td>
|
|
1788
|
+
</tr>
|
|
1789
|
+
|
|
1790
|
+
<tr></tr
|
|
1791
|
+
></ng-container>
|
|
1792
|
+
|
|
1793
|
+
<ng-container
|
|
1794
|
+
*ngFor="let item of items"
|
|
1795
|
+
matColumnDef="{{ item.property }}"
|
|
1796
|
+
>
|
|
1797
|
+
<th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>
|
|
1798
|
+
<td mat-cell *matCellDef="let index = index">
|
|
1799
|
+
<jsonforms-outlet
|
|
1800
|
+
[renderProps]="index | getProps : item.props"
|
|
1801
|
+
></jsonforms-outlet>
|
|
1566
1802
|
</td>
|
|
1567
|
-
</
|
|
1568
|
-
|
|
1569
|
-
<tr></tr
|
|
1570
|
-
></ng-container>
|
|
1571
|
-
|
|
1572
|
-
<ng-container
|
|
1573
|
-
*ngFor="let item of items"
|
|
1574
|
-
matColumnDef="{{ item.property }}"
|
|
1575
|
-
>
|
|
1576
|
-
<th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>
|
|
1577
|
-
<td mat-cell *matCellDef="let index = index">
|
|
1578
|
-
<jsonforms-outlet
|
|
1579
|
-
[renderProps]="getProps(index, item.props)"
|
|
1580
|
-
></jsonforms-outlet>
|
|
1581
|
-
</td>
|
|
1582
|
-
</ng-container>
|
|
1803
|
+
</ng-container>
|
|
1583
1804
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1805
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
1806
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
1807
|
+
</table>
|
|
1808
|
+
</div>
|
|
1809
|
+
`, styles: ["table{width:100%}\n", ".cdk-column-action{width:15%}\n", ".sort-column{min-width:12vw}\n", ".table-container{max-width:100%;overflow:auto}\n"] }]
|
|
1588
1810
|
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; } });
|
|
1589
1811
|
const TableRendererTester = rankWith(3, or(isObjectArrayControl, isPrimitiveArrayControl));
|
|
1590
1812
|
const controlWithoutLabel = (scope) => ({
|
|
@@ -1592,6 +1814,22 @@ const controlWithoutLabel = (scope) => ({
|
|
|
1592
1814
|
scope: scope,
|
|
1593
1815
|
label: false,
|
|
1594
1816
|
});
|
|
1817
|
+
class GetProps {
|
|
1818
|
+
transform(index, props) {
|
|
1819
|
+
const rowPath = Paths.compose(props.path, `${index}`);
|
|
1820
|
+
return {
|
|
1821
|
+
schema: props.schema,
|
|
1822
|
+
uischema: props.uischema,
|
|
1823
|
+
path: rowPath,
|
|
1824
|
+
};
|
|
1825
|
+
}
|
|
1826
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GetProps, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1827
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: GetProps, name: "getProps" });
|
|
1828
|
+
}
|
|
1829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GetProps, decorators: [{
|
|
1830
|
+
type: Pipe,
|
|
1831
|
+
args: [{ name: 'getProps' }]
|
|
1832
|
+
}] });
|
|
1595
1833
|
|
|
1596
1834
|
/*
|
|
1597
1835
|
The MIT License
|
|
@@ -2282,7 +2520,8 @@ class JsonFormsAngularMaterialModule {
|
|
|
2282
2520
|
AutocompleteControlRenderer,
|
|
2283
2521
|
TableRenderer,
|
|
2284
2522
|
ArrayLayoutRenderer,
|
|
2285
|
-
LayoutChildrenRenderPropsPipe
|
|
2523
|
+
LayoutChildrenRenderPropsPipe,
|
|
2524
|
+
GetProps], imports: [CommonModule,
|
|
2286
2525
|
JsonFormsModule,
|
|
2287
2526
|
MatFormFieldModule,
|
|
2288
2527
|
MatCheckboxModule,
|
|
@@ -2408,6 +2647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2408
2647
|
TableRenderer,
|
|
2409
2648
|
ArrayLayoutRenderer,
|
|
2410
2649
|
LayoutChildrenRenderPropsPipe,
|
|
2650
|
+
GetProps,
|
|
2411
2651
|
],
|
|
2412
2652
|
exports: [
|
|
2413
2653
|
CommonModule,
|
|
@@ -2560,5 +2800,5 @@ const angularMaterialRenderers = [
|
|
|
2560
2800
|
* Generated bundle index. Do not edit.
|
|
2561
2801
|
*/
|
|
2562
2802
|
|
|
2563
|
-
export { AutocompleteControlRenderer, BooleanControlRenderer, CategorizationTabLayoutRenderer, DateControlRenderer, DateControlRendererTester, GroupLayoutRenderer, HorizontalLayoutRenderer, JsonFormsAngularMaterialModule, JsonFormsDetailComponent, LabelRenderer, LabelRendererTester, LayoutChildrenRenderPropsPipe, LayoutRenderer, MasterListComponent, NumberControlRenderer, NumberControlRendererTester, ObjectControlRenderer, ObjectControlRendererTester, RangeControlRenderer, RangeControlRendererTester, TableRenderer, TableRendererTester, TextAreaRenderer, TextAreaRendererTester, TextControlRenderer, TextControlRendererTester, ToggleControlRenderer, ToggleControlRendererTester, VerticalLayoutRenderer, angularMaterialRenderers, booleanControlTester, categorizationTester, controlWithoutLabel, enumControlTester, groupLayoutTester, horizontalLayoutTester, masterDetailTester, removeSchemaKeywords, verticalLayoutTester };
|
|
2803
|
+
export { ArrayLayoutRenderer, ArrayLayoutRendererTester, AutocompleteControlRenderer, BooleanControlRenderer, CategorizationTabLayoutRenderer, DateControlRenderer, DateControlRendererTester, GetProps, GroupLayoutRenderer, HorizontalLayoutRenderer, JsonFormsAngularMaterialModule, JsonFormsDetailComponent, LabelRenderer, LabelRendererTester, LayoutChildrenRenderPropsPipe, LayoutRenderer, MasterListComponent, NumberControlRenderer, NumberControlRendererTester, ObjectControlRenderer, ObjectControlRendererTester, RangeControlRenderer, RangeControlRendererTester, TableRenderer, TableRendererTester, TextAreaRenderer, TextAreaRendererTester, TextControlRenderer, TextControlRendererTester, ToggleControlRenderer, ToggleControlRendererTester, VerticalLayoutRenderer, angularMaterialRenderers, booleanControlTester, categorizationTester, controlWithoutLabel, enumControlTester, groupLayoutTester, horizontalLayoutTester, masterDetailTester, removeSchemaKeywords, verticalLayoutTester };
|
|
2564
2804
|
//# sourceMappingURL=jsonforms-angular-material.mjs.map
|