@ng-formworks/core 19.6.3 → 19.6.5
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.
|
@@ -2488,6 +2488,10 @@ const jsonSchemaFormatTests = {
|
|
|
2488
2488
|
// Modified to allow incomplete entries, such as
|
|
2489
2489
|
// "2000-03-14T01:59:26.535" (needs "Z") or "2000-03-14T01:59" (needs ":00Z")
|
|
2490
2490
|
'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
|
|
2491
|
+
// "2000-03-14T01:59:26.535" (doesn't need "Z") or "2000-03-14T01:59" (needs ":00Z")
|
|
2492
|
+
//'iso-date-time':^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$
|
|
2493
|
+
//for now same as 'date-time' until better tested
|
|
2494
|
+
'iso-date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,
|
|
2491
2495
|
// email (sources from jsen validator):
|
|
2492
2496
|
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
|
2493
2497
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')
|
|
@@ -2856,7 +2860,7 @@ class JsonValidators {
|
|
|
2856
2860
|
}
|
|
2857
2861
|
else {
|
|
2858
2862
|
// Allow JavaScript Date objects
|
|
2859
|
-
isValid = ['date', 'time', 'date-time'].includes(requiredFormat) &&
|
|
2863
|
+
isValid = ['date', 'time', 'iso-date-time'].includes(requiredFormat) &&
|
|
2860
2864
|
Object.prototype.toString.call(currentValue) === '[object Date]';
|
|
2861
2865
|
}
|
|
2862
2866
|
return xor(isValid, invert) ?
|
|
@@ -4072,7 +4076,10 @@ function getInputType(schema, layoutNode = null) {
|
|
|
4072
4076
|
return {
|
|
4073
4077
|
'color': 'color',
|
|
4074
4078
|
'date': 'date',
|
|
4075
|
-
|
|
4079
|
+
//as per ajv date-time requires a timezone but input
|
|
4080
|
+
//datetime-local doesn't
|
|
4081
|
+
//'date-time': 'datetime-local',
|
|
4082
|
+
'iso-date-time': 'datetime-local',
|
|
4076
4083
|
'email': 'email',
|
|
4077
4084
|
'uri': 'url',
|
|
4078
4085
|
}[schema.format] || 'text';
|
|
@@ -9754,13 +9761,13 @@ class SelectComponent {
|
|
|
9754
9761
|
[name]="controlName">
|
|
9755
9762
|
<ng-template ngFor let-selectItem [ngForOf]="selectList">
|
|
9756
9763
|
<option *ngIf="!isArray(selectItem?.items)"
|
|
9757
|
-
[
|
|
9764
|
+
[ngValue]="selectItem?.value">
|
|
9758
9765
|
<span [innerHTML]="selectItem?.name"></span>
|
|
9759
9766
|
</option>
|
|
9760
9767
|
<optgroup *ngIf="isArray(selectItem?.items)"
|
|
9761
9768
|
[label]="selectItem?.group">
|
|
9762
9769
|
<option *ngFor="let subItem of selectItem.items"
|
|
9763
|
-
[
|
|
9770
|
+
[ngValue]="subItem?.value">
|
|
9764
9771
|
<span [innerHTML]="subItem?.name"></span>
|
|
9765
9772
|
</option>
|
|
9766
9773
|
</optgroup>
|
|
@@ -9778,14 +9785,14 @@ class SelectComponent {
|
|
|
9778
9785
|
<ng-template ngFor let-selectItem [ngForOf]="selectList">
|
|
9779
9786
|
<option *ngIf="!isArray(selectItem?.items)"
|
|
9780
9787
|
[selected]="selectItem?.value === controlValue"
|
|
9781
|
-
[
|
|
9788
|
+
[ngValue]="selectItem?.value">
|
|
9782
9789
|
<span [innerHTML]="selectItem?.name"></span>
|
|
9783
9790
|
</option>
|
|
9784
9791
|
<optgroup *ngIf="isArray(selectItem?.items)"
|
|
9785
9792
|
[label]="selectItem?.group">
|
|
9786
9793
|
<option *ngFor="let subItem of selectItem.items"
|
|
9787
9794
|
[attr.selected]="subItem?.value === controlValue"
|
|
9788
|
-
[
|
|
9795
|
+
[ngValue]="subItem?.value">
|
|
9789
9796
|
<span [innerHTML]="subItem?.name"></span>
|
|
9790
9797
|
</option>
|
|
9791
9798
|
</optgroup>
|
|
@@ -9805,14 +9812,14 @@ class SelectComponent {
|
|
|
9805
9812
|
<ng-template ngFor let-selectItem [ngForOf]="selectList">
|
|
9806
9813
|
<option *ngIf="!isArray(selectItem?.items)"
|
|
9807
9814
|
[selected]="selectItem?.value === controlValue"
|
|
9808
|
-
[
|
|
9815
|
+
[ngValue]="selectItem?.value">
|
|
9809
9816
|
<span [innerHTML]="selectItem?.name"></span>
|
|
9810
9817
|
</option>
|
|
9811
9818
|
<optgroup *ngIf="isArray(selectItem?.items)"
|
|
9812
9819
|
[label]="selectItem?.group">
|
|
9813
9820
|
<option *ngFor="let subItem of selectItem.items"
|
|
9814
9821
|
[attr.selected]="subItem?.value === controlValue"
|
|
9815
|
-
[
|
|
9822
|
+
[ngValue]="subItem?.value">
|
|
9816
9823
|
<span [innerHTML]="subItem?.name"></span>
|
|
9817
9824
|
</option>
|
|
9818
9825
|
</optgroup>
|
|
@@ -9843,13 +9850,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9843
9850
|
[name]="controlName">
|
|
9844
9851
|
<ng-template ngFor let-selectItem [ngForOf]="selectList">
|
|
9845
9852
|
<option *ngIf="!isArray(selectItem?.items)"
|
|
9846
|
-
[
|
|
9853
|
+
[ngValue]="selectItem?.value">
|
|
9847
9854
|
<span [innerHTML]="selectItem?.name"></span>
|
|
9848
9855
|
</option>
|
|
9849
9856
|
<optgroup *ngIf="isArray(selectItem?.items)"
|
|
9850
9857
|
[label]="selectItem?.group">
|
|
9851
9858
|
<option *ngFor="let subItem of selectItem.items"
|
|
9852
|
-
[
|
|
9859
|
+
[ngValue]="subItem?.value">
|
|
9853
9860
|
<span [innerHTML]="subItem?.name"></span>
|
|
9854
9861
|
</option>
|
|
9855
9862
|
</optgroup>
|
|
@@ -9867,14 +9874,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9867
9874
|
<ng-template ngFor let-selectItem [ngForOf]="selectList">
|
|
9868
9875
|
<option *ngIf="!isArray(selectItem?.items)"
|
|
9869
9876
|
[selected]="selectItem?.value === controlValue"
|
|
9870
|
-
[
|
|
9877
|
+
[ngValue]="selectItem?.value">
|
|
9871
9878
|
<span [innerHTML]="selectItem?.name"></span>
|
|
9872
9879
|
</option>
|
|
9873
9880
|
<optgroup *ngIf="isArray(selectItem?.items)"
|
|
9874
9881
|
[label]="selectItem?.group">
|
|
9875
9882
|
<option *ngFor="let subItem of selectItem.items"
|
|
9876
9883
|
[attr.selected]="subItem?.value === controlValue"
|
|
9877
|
-
[
|
|
9884
|
+
[ngValue]="subItem?.value">
|
|
9878
9885
|
<span [innerHTML]="subItem?.name"></span>
|
|
9879
9886
|
</option>
|
|
9880
9887
|
</optgroup>
|
|
@@ -9894,14 +9901,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
9894
9901
|
<ng-template ngFor let-selectItem [ngForOf]="selectList">
|
|
9895
9902
|
<option *ngIf="!isArray(selectItem?.items)"
|
|
9896
9903
|
[selected]="selectItem?.value === controlValue"
|
|
9897
|
-
[
|
|
9904
|
+
[ngValue]="selectItem?.value">
|
|
9898
9905
|
<span [innerHTML]="selectItem?.name"></span>
|
|
9899
9906
|
</option>
|
|
9900
9907
|
<optgroup *ngIf="isArray(selectItem?.items)"
|
|
9901
9908
|
[label]="selectItem?.group">
|
|
9902
9909
|
<option *ngFor="let subItem of selectItem.items"
|
|
9903
9910
|
[attr.selected]="subItem?.value === controlValue"
|
|
9904
|
-
[
|
|
9911
|
+
[ngValue]="subItem?.value">
|
|
9905
9912
|
<span [innerHTML]="subItem?.name"></span>
|
|
9906
9913
|
</option>
|
|
9907
9914
|
</optgroup>
|
|
@@ -10209,7 +10216,10 @@ class WidgetLibraryService {
|
|
|
10209
10216
|
// See: http://ulion.github.io/jsonform/playground/?example=fields-checkboxbuttons
|
|
10210
10217
|
// Widgets included for compatibility with React JSON Schema Form API
|
|
10211
10218
|
'updown': 'number',
|
|
10212
|
-
'date-time': 'datetime-local',
|
|
10219
|
+
//'date-time': 'datetime-local',
|
|
10220
|
+
//as per ajv date-time requires a timezone but input
|
|
10221
|
+
//datetime-local doesn't
|
|
10222
|
+
'iso-date-time': 'datetime-local',
|
|
10213
10223
|
'alt-datetime': 'datetime-local',
|
|
10214
10224
|
'alt-date': 'date',
|
|
10215
10225
|
// Widgets included for compatibility with Angular Schema Form API
|