novo-elements 6.0.1 → 6.0.2
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/bundles/novo-elements.umd.js +42 -62
- package/bundles/novo-elements.umd.js.map +1 -1
- package/bundles/novo-elements.umd.min.js +1 -1
- package/bundles/novo-elements.umd.min.js.map +1 -1
- package/esm2015/src/elements/chips/Chips.js +6 -3
- package/esm2015/src/elements/form/ControlGroup.js +2 -2
- package/esm2015/src/elements/form/DynamicForm.js +5 -5
- package/esm2015/src/elements/form/Form.js +3 -3
- package/esm2015/src/elements/form/NovoFormGroup.js +7 -1
- package/esm2015/src/elements/picker/extras/base-picker-results/BasePickerResults.js +2 -8
- package/esm2015/src/elements/stepper/stepper.component.js +13 -6
- package/esm2015/src/elements/table/extras/base-renderer/BaseRenderer.js +3 -15
- package/esm2015/src/elements/table/extras/date-cell/DateCell.js +1 -4
- package/esm2015/src/elements/table/extras/dropdown-cell/DropdownCell.js +1 -4
- package/esm2015/src/utils/form-utils/FormUtils.js +2 -2
- package/fesm2015/novo-elements.js +34 -42
- package/fesm2015/novo-elements.js.map +1 -1
- package/package.json +1 -1
- package/schematics/package.json +1 -1
- package/src/elements/form/NovoFormGroup.d.ts +2 -0
- package/src/elements/picker/extras/base-picker-results/BasePickerResults.d.ts +1 -3
- package/src/elements/stepper/stepper.component.d.ts +4 -1
- package/src/elements/table/extras/base-renderer/BaseRenderer.d.ts +2 -6
- package/src/elements/table/extras/date-cell/DateCell.d.ts +1 -1
- package/src/elements/table/extras/dropdown-cell/DropdownCell.d.ts +1 -1
- package/styles/reset.scss +0 -1
|
@@ -20923,6 +20923,16 @@
|
|
|
20923
20923
|
_this.fieldInteractionEvents = new i0.EventEmitter();
|
|
20924
20924
|
return _this;
|
|
20925
20925
|
}
|
|
20926
|
+
Object.defineProperty(NovoFormGroup.prototype, "value", {
|
|
20927
|
+
get: function () {
|
|
20928
|
+
return this.getRawValue(); // The value property on Angular form groups do not include disabled form control values. Find way to address this.
|
|
20929
|
+
},
|
|
20930
|
+
set: function (v) {
|
|
20931
|
+
this._value = v;
|
|
20932
|
+
},
|
|
20933
|
+
enumerable: false,
|
|
20934
|
+
configurable: true
|
|
20935
|
+
});
|
|
20926
20936
|
NovoFormGroup.prototype.enableAllControls = function () {
|
|
20927
20937
|
for (var key in this.controls) {
|
|
20928
20938
|
if (this.controls[key].readOnly) {
|
|
@@ -21244,6 +21254,7 @@
|
|
|
21244
21254
|
function BasePickerResults(element, ref) {
|
|
21245
21255
|
this._term = '';
|
|
21246
21256
|
this.selected = [];
|
|
21257
|
+
this.matches = [];
|
|
21247
21258
|
this.hasError = false;
|
|
21248
21259
|
this.isLoading = false;
|
|
21249
21260
|
this.isStatic = true;
|
|
@@ -21252,21 +21263,10 @@
|
|
|
21252
21263
|
this.autoSelectFirstOption = true;
|
|
21253
21264
|
this.optionsFunctionHasChanged = false;
|
|
21254
21265
|
this.selectingMatches = false;
|
|
21255
|
-
this._matches = [];
|
|
21256
21266
|
this.element = element;
|
|
21257
21267
|
this.ref = ref;
|
|
21258
21268
|
this.scrollHandler = this.onScrollDown.bind(this);
|
|
21259
21269
|
}
|
|
21260
|
-
Object.defineProperty(BasePickerResults.prototype, "matches", {
|
|
21261
|
-
get: function () {
|
|
21262
|
-
return this._matches;
|
|
21263
|
-
},
|
|
21264
|
-
set: function (m) {
|
|
21265
|
-
this._matches = m;
|
|
21266
|
-
},
|
|
21267
|
-
enumerable: false,
|
|
21268
|
-
configurable: true
|
|
21269
|
-
});
|
|
21270
21270
|
BasePickerResults.prototype.cleanUp = function () {
|
|
21271
21271
|
var element = this.getListElement();
|
|
21272
21272
|
if (element && element.hasAttribute('scrollListener')) {
|
|
@@ -22561,7 +22561,7 @@
|
|
|
22561
22561
|
FormUtils.prototype.forceValidation = function (form) {
|
|
22562
22562
|
Object.keys(form.controls).forEach(function (key) {
|
|
22563
22563
|
var control = form.controls[key];
|
|
22564
|
-
if (control.required && Helpers.isBlank(form.
|
|
22564
|
+
if (control.required && Helpers.isBlank(form.value[control.key])) {
|
|
22565
22565
|
control.markAsDirty();
|
|
22566
22566
|
control.markAsTouched();
|
|
22567
22567
|
}
|
|
@@ -33373,8 +33373,11 @@
|
|
|
33373
33373
|
}
|
|
33374
33374
|
}
|
|
33375
33375
|
this._items.next(this.items);
|
|
33376
|
-
|
|
33377
|
-
this.
|
|
33376
|
+
var valueToSet = this.source && this.source.valueFormatter ? this.source.valueFormatter(this.items) : this.items.map(function (i) { return i.value; });
|
|
33377
|
+
if (Helpers.isBlank(this.value) !== Helpers.isBlank(valueToSet) || JSON.stringify(this.value) !== JSON.stringify(valueToSet)) {
|
|
33378
|
+
this.value = valueToSet;
|
|
33379
|
+
this._propagateChanges();
|
|
33380
|
+
}
|
|
33378
33381
|
};
|
|
33379
33382
|
NovoChipsElement.prototype.getLabelFromOptions = function (value) {
|
|
33380
33383
|
var id = value;
|
|
@@ -44083,7 +44086,7 @@
|
|
|
44083
44086
|
var nestedFormGroup = controlsArray.at(index);
|
|
44084
44087
|
nestedFormGroup.fieldInteractionEvents.unsubscribe();
|
|
44085
44088
|
if (emitEvent) {
|
|
44086
|
-
this.onRemove.emit({ value: nestedFormGroup.
|
|
44089
|
+
this.onRemove.emit({ value: nestedFormGroup.value, index: index });
|
|
44087
44090
|
}
|
|
44088
44091
|
controlsArray.removeAt(index);
|
|
44089
44092
|
this.disabledArray = this.disabledArray.filter(function (value, idx) { return idx !== index; });
|
|
@@ -44368,7 +44371,7 @@
|
|
|
44368
44371
|
}
|
|
44369
44372
|
// Hide required fields that have been successfully filled out
|
|
44370
44373
|
if (hideRequiredWithValue &&
|
|
44371
|
-
!Helpers.isBlank(_this.form.
|
|
44374
|
+
!Helpers.isBlank(_this.form.value[control.key]) &&
|
|
44372
44375
|
(!control.isEmpty || (control.isEmpty && control.isEmpty(ctl)))) {
|
|
44373
44376
|
ctl.hidden = true;
|
|
44374
44377
|
}
|
|
@@ -44384,7 +44387,7 @@
|
|
|
44384
44387
|
};
|
|
44385
44388
|
Object.defineProperty(NovoDynamicFormElement.prototype, "values", {
|
|
44386
44389
|
get: function () {
|
|
44387
|
-
return this.form ? this.form.
|
|
44390
|
+
return this.form ? this.form.value : null;
|
|
44388
44391
|
},
|
|
44389
44392
|
enumerable: false,
|
|
44390
44393
|
configurable: true
|
|
@@ -44405,7 +44408,7 @@
|
|
|
44405
44408
|
if (!ret) {
|
|
44406
44409
|
ret = {};
|
|
44407
44410
|
}
|
|
44408
|
-
ret[control.key] = _this.form.
|
|
44411
|
+
ret[control.key] = _this.form.value[control.key];
|
|
44409
44412
|
}
|
|
44410
44413
|
});
|
|
44411
44414
|
});
|
|
@@ -44415,7 +44418,7 @@
|
|
|
44415
44418
|
var _this = this;
|
|
44416
44419
|
Object.keys(this.form.controls).forEach(function (key) {
|
|
44417
44420
|
var control = _this.form.controls[key];
|
|
44418
|
-
if (control.required && Helpers.isBlank(_this.form.
|
|
44421
|
+
if (control.required && Helpers.isBlank(_this.form.value[control.key])) {
|
|
44419
44422
|
control.markAsDirty();
|
|
44420
44423
|
control.markAsTouched();
|
|
44421
44424
|
}
|
|
@@ -44493,7 +44496,7 @@
|
|
|
44493
44496
|
_this.form.controls[key].hidden = true;
|
|
44494
44497
|
}
|
|
44495
44498
|
// Hide required fields that have been successfully filled out
|
|
44496
|
-
if (hideRequiredWithValue && !Helpers.isBlank(_this.form.
|
|
44499
|
+
if (hideRequiredWithValue && !Helpers.isBlank(_this.form.value[key])) {
|
|
44497
44500
|
_this.form.controls[key].hidden = true;
|
|
44498
44501
|
}
|
|
44499
44502
|
// Don't hide fields with errors
|
|
@@ -44509,7 +44512,7 @@
|
|
|
44509
44512
|
var _this = this;
|
|
44510
44513
|
Object.keys(this.form.controls).forEach(function (key) {
|
|
44511
44514
|
var control = _this.form.controls[key];
|
|
44512
|
-
if (control.required && Helpers.isBlank(_this.form.
|
|
44515
|
+
if (control.required && Helpers.isBlank(_this.form.value[control.key])) {
|
|
44513
44516
|
control.markAsDirty();
|
|
44514
44517
|
control.markAsTouched();
|
|
44515
44518
|
}
|
|
@@ -51479,10 +51482,21 @@
|
|
|
51479
51482
|
_this._iconOverrides = {};
|
|
51480
51483
|
return _this;
|
|
51481
51484
|
}
|
|
51485
|
+
Object.defineProperty(NovoStepper.prototype, "steps", {
|
|
51486
|
+
/** Steps that belong to the current stepper, excluding ones from nested steppers. */
|
|
51487
|
+
get: function () {
|
|
51488
|
+
return this._steps;
|
|
51489
|
+
},
|
|
51490
|
+
set: function (value) {
|
|
51491
|
+
this._steps = value;
|
|
51492
|
+
},
|
|
51493
|
+
enumerable: false,
|
|
51494
|
+
configurable: true
|
|
51495
|
+
});
|
|
51482
51496
|
Object.defineProperty(NovoStepper.prototype, "completed", {
|
|
51483
51497
|
get: function () {
|
|
51484
51498
|
try {
|
|
51485
|
-
var steps = this.
|
|
51499
|
+
var steps = this._steps.toArray();
|
|
51486
51500
|
var length = steps.length - 1;
|
|
51487
51501
|
return steps[length].completed && length === this.selectedIndex;
|
|
51488
51502
|
}
|
|
@@ -51496,11 +51510,11 @@
|
|
|
51496
51510
|
NovoStepper.prototype.ngAfterContentInit = function () {
|
|
51497
51511
|
var _this = this;
|
|
51498
51512
|
// Mark the component for change detection whenever the content children query changes
|
|
51499
|
-
this.
|
|
51513
|
+
this._steps.changes.pipe(operators.takeUntil(this._destroyed)).subscribe(function () { return _this._stateChanged(); });
|
|
51500
51514
|
};
|
|
51501
51515
|
NovoStepper.prototype.complete = function () {
|
|
51502
51516
|
try {
|
|
51503
|
-
var steps = this.
|
|
51517
|
+
var steps = this._steps.toArray();
|
|
51504
51518
|
steps[this.selectedIndex].completed = true;
|
|
51505
51519
|
this.next();
|
|
51506
51520
|
this._stateChanged();
|
|
@@ -51510,7 +51524,7 @@
|
|
|
51510
51524
|
}
|
|
51511
51525
|
};
|
|
51512
51526
|
NovoStepper.prototype.getIndicatorType = function (index) {
|
|
51513
|
-
var steps = this.
|
|
51527
|
+
var steps = this._steps.toArray();
|
|
51514
51528
|
if (index === this.selectedIndex) {
|
|
51515
51529
|
if (steps[index] && index === steps.length - 1 && steps[index].completed) {
|
|
51516
51530
|
return 'done';
|
|
@@ -51535,7 +51549,7 @@
|
|
|
51535
51549
|
];
|
|
51536
51550
|
NovoStepper.propDecorators = {
|
|
51537
51551
|
_stepHeader: [{ type: i0.ViewChildren, args: [NovoStepHeader,] }],
|
|
51538
|
-
|
|
51552
|
+
_steps: [{ type: i0.ContentChildren, args: [NovoStep, { descendants: true },] }],
|
|
51539
51553
|
_icons: [{ type: i0.ContentChildren, args: [NovoIconComponent,] }]
|
|
51540
51554
|
};
|
|
51541
51555
|
var NovoHorizontalStepper = /** @class */ (function (_super) {
|
|
@@ -52027,30 +52041,10 @@
|
|
|
52027
52041
|
|
|
52028
52042
|
var BaseRenderer = /** @class */ (function () {
|
|
52029
52043
|
function BaseRenderer() {
|
|
52030
|
-
this.
|
|
52031
|
-
this.
|
|
52044
|
+
this.data = {};
|
|
52045
|
+
this.value = '';
|
|
52032
52046
|
this.meta = {};
|
|
52033
52047
|
}
|
|
52034
|
-
Object.defineProperty(BaseRenderer.prototype, "data", {
|
|
52035
|
-
get: function () {
|
|
52036
|
-
return this._data;
|
|
52037
|
-
},
|
|
52038
|
-
set: function (d) {
|
|
52039
|
-
this._data = d;
|
|
52040
|
-
},
|
|
52041
|
-
enumerable: false,
|
|
52042
|
-
configurable: true
|
|
52043
|
-
});
|
|
52044
|
-
Object.defineProperty(BaseRenderer.prototype, "value", {
|
|
52045
|
-
get: function () {
|
|
52046
|
-
return this._value;
|
|
52047
|
-
},
|
|
52048
|
-
set: function (v) {
|
|
52049
|
-
this._value = v;
|
|
52050
|
-
},
|
|
52051
|
-
enumerable: false,
|
|
52052
|
-
configurable: true
|
|
52053
|
-
});
|
|
52054
52048
|
return BaseRenderer;
|
|
52055
52049
|
}());
|
|
52056
52050
|
|
|
@@ -52061,13 +52055,6 @@
|
|
|
52061
52055
|
_this.labels = labels;
|
|
52062
52056
|
return _this;
|
|
52063
52057
|
}
|
|
52064
|
-
Object.defineProperty(DateCell.prototype, "value", {
|
|
52065
|
-
set: function (v) {
|
|
52066
|
-
this._value = v;
|
|
52067
|
-
},
|
|
52068
|
-
enumerable: false,
|
|
52069
|
-
configurable: true
|
|
52070
|
-
});
|
|
52071
52058
|
DateCell.prototype.getFormattedDate = function () {
|
|
52072
52059
|
return this.labels.formatDate(this.value);
|
|
52073
52060
|
};
|
|
@@ -52091,13 +52078,6 @@
|
|
|
52091
52078
|
function NovoDropdownCell() {
|
|
52092
52079
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
52093
52080
|
}
|
|
52094
|
-
Object.defineProperty(NovoDropdownCell.prototype, "value", {
|
|
52095
|
-
set: function (v) {
|
|
52096
|
-
this._value = v;
|
|
52097
|
-
},
|
|
52098
|
-
enumerable: false,
|
|
52099
|
-
configurable: true
|
|
52100
|
-
});
|
|
52101
52081
|
NovoDropdownCell.prototype.ngOnInit = function () {
|
|
52102
52082
|
// Check for and fix bad config
|
|
52103
52083
|
if (!this.meta.dropdownCellConfig) {
|