novo-elements 6.0.1 → 6.0.4
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 +55 -65
- 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/data-table/cell-headers/data-table-checkbox-header-cell.component.js +13 -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/select/Select.js +2 -2
- 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 +47 -45
- package/fesm2015/novo-elements.js.map +1 -1
- package/package.json +1 -1
- package/schematics/package.json +1 -1
- package/src/elements/data-table/cell-headers/data-table-checkbox-header-cell.component.d.ts +1 -0
- 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;
|
|
@@ -36143,7 +36146,7 @@
|
|
|
36143
36146
|
var _a;
|
|
36144
36147
|
_this.checked = false;
|
|
36145
36148
|
if ((_a = _this.dataTable) === null || _a === void 0 ? void 0 : _a.canSelectAll) {
|
|
36146
|
-
_this.
|
|
36149
|
+
_this.resetAllMatchingSelected();
|
|
36147
36150
|
}
|
|
36148
36151
|
_this.ref.markForCheck();
|
|
36149
36152
|
});
|
|
@@ -36181,9 +36184,19 @@
|
|
|
36181
36184
|
this.dataTable.selectRows(!this.checked);
|
|
36182
36185
|
}
|
|
36183
36186
|
if ((_a = this.dataTable) === null || _a === void 0 ? void 0 : _a.canSelectAll) {
|
|
36184
|
-
this.
|
|
36187
|
+
if (this.checked) {
|
|
36188
|
+
this.resetAllMatchingSelected();
|
|
36189
|
+
}
|
|
36190
|
+
else {
|
|
36191
|
+
this.selectAllChanged();
|
|
36192
|
+
}
|
|
36185
36193
|
}
|
|
36186
36194
|
};
|
|
36195
|
+
NovoDataTableCheckboxHeaderCell.prototype.resetAllMatchingSelected = function () {
|
|
36196
|
+
var _a, _b, _c;
|
|
36197
|
+
(_b = (_a = this.dataTable.state) === null || _a === void 0 ? void 0 : _a.allMatchingSelectedSource) === null || _b === void 0 ? void 0 : _b.next(false);
|
|
36198
|
+
(_c = this.dataTable.state) === null || _c === void 0 ? void 0 : _c.onSelectionChange();
|
|
36199
|
+
};
|
|
36187
36200
|
NovoDataTableCheckboxHeaderCell.prototype.selectAllChanged = function () {
|
|
36188
36201
|
var _a, _b, _c, _d;
|
|
36189
36202
|
var allSelectedEvent = {
|
|
@@ -38335,7 +38348,7 @@
|
|
|
38335
38348
|
_this.id = _this._uniqueId;
|
|
38336
38349
|
_this.name = _this._uniqueId;
|
|
38337
38350
|
_this.placeholder = 'Select...';
|
|
38338
|
-
_this.position = '
|
|
38351
|
+
_this.position = 'above-below';
|
|
38339
38352
|
_this.onSelect = new i0.EventEmitter();
|
|
38340
38353
|
/** Event emitted when the selected value has been changed by the user. */
|
|
38341
38354
|
_this.selectionChange = new i0.EventEmitter();
|
|
@@ -44083,7 +44096,7 @@
|
|
|
44083
44096
|
var nestedFormGroup = controlsArray.at(index);
|
|
44084
44097
|
nestedFormGroup.fieldInteractionEvents.unsubscribe();
|
|
44085
44098
|
if (emitEvent) {
|
|
44086
|
-
this.onRemove.emit({ value: nestedFormGroup.
|
|
44099
|
+
this.onRemove.emit({ value: nestedFormGroup.value, index: index });
|
|
44087
44100
|
}
|
|
44088
44101
|
controlsArray.removeAt(index);
|
|
44089
44102
|
this.disabledArray = this.disabledArray.filter(function (value, idx) { return idx !== index; });
|
|
@@ -44368,7 +44381,7 @@
|
|
|
44368
44381
|
}
|
|
44369
44382
|
// Hide required fields that have been successfully filled out
|
|
44370
44383
|
if (hideRequiredWithValue &&
|
|
44371
|
-
!Helpers.isBlank(_this.form.
|
|
44384
|
+
!Helpers.isBlank(_this.form.value[control.key]) &&
|
|
44372
44385
|
(!control.isEmpty || (control.isEmpty && control.isEmpty(ctl)))) {
|
|
44373
44386
|
ctl.hidden = true;
|
|
44374
44387
|
}
|
|
@@ -44384,7 +44397,7 @@
|
|
|
44384
44397
|
};
|
|
44385
44398
|
Object.defineProperty(NovoDynamicFormElement.prototype, "values", {
|
|
44386
44399
|
get: function () {
|
|
44387
|
-
return this.form ? this.form.
|
|
44400
|
+
return this.form ? this.form.value : null;
|
|
44388
44401
|
},
|
|
44389
44402
|
enumerable: false,
|
|
44390
44403
|
configurable: true
|
|
@@ -44405,7 +44418,7 @@
|
|
|
44405
44418
|
if (!ret) {
|
|
44406
44419
|
ret = {};
|
|
44407
44420
|
}
|
|
44408
|
-
ret[control.key] = _this.form.
|
|
44421
|
+
ret[control.key] = _this.form.value[control.key];
|
|
44409
44422
|
}
|
|
44410
44423
|
});
|
|
44411
44424
|
});
|
|
@@ -44415,7 +44428,7 @@
|
|
|
44415
44428
|
var _this = this;
|
|
44416
44429
|
Object.keys(this.form.controls).forEach(function (key) {
|
|
44417
44430
|
var control = _this.form.controls[key];
|
|
44418
|
-
if (control.required && Helpers.isBlank(_this.form.
|
|
44431
|
+
if (control.required && Helpers.isBlank(_this.form.value[control.key])) {
|
|
44419
44432
|
control.markAsDirty();
|
|
44420
44433
|
control.markAsTouched();
|
|
44421
44434
|
}
|
|
@@ -44493,7 +44506,7 @@
|
|
|
44493
44506
|
_this.form.controls[key].hidden = true;
|
|
44494
44507
|
}
|
|
44495
44508
|
// Hide required fields that have been successfully filled out
|
|
44496
|
-
if (hideRequiredWithValue && !Helpers.isBlank(_this.form.
|
|
44509
|
+
if (hideRequiredWithValue && !Helpers.isBlank(_this.form.value[key])) {
|
|
44497
44510
|
_this.form.controls[key].hidden = true;
|
|
44498
44511
|
}
|
|
44499
44512
|
// Don't hide fields with errors
|
|
@@ -44509,7 +44522,7 @@
|
|
|
44509
44522
|
var _this = this;
|
|
44510
44523
|
Object.keys(this.form.controls).forEach(function (key) {
|
|
44511
44524
|
var control = _this.form.controls[key];
|
|
44512
|
-
if (control.required && Helpers.isBlank(_this.form.
|
|
44525
|
+
if (control.required && Helpers.isBlank(_this.form.value[control.key])) {
|
|
44513
44526
|
control.markAsDirty();
|
|
44514
44527
|
control.markAsTouched();
|
|
44515
44528
|
}
|
|
@@ -51479,10 +51492,21 @@
|
|
|
51479
51492
|
_this._iconOverrides = {};
|
|
51480
51493
|
return _this;
|
|
51481
51494
|
}
|
|
51495
|
+
Object.defineProperty(NovoStepper.prototype, "steps", {
|
|
51496
|
+
/** Steps that belong to the current stepper, excluding ones from nested steppers. */
|
|
51497
|
+
get: function () {
|
|
51498
|
+
return this._steps;
|
|
51499
|
+
},
|
|
51500
|
+
set: function (value) {
|
|
51501
|
+
this._steps = value;
|
|
51502
|
+
},
|
|
51503
|
+
enumerable: false,
|
|
51504
|
+
configurable: true
|
|
51505
|
+
});
|
|
51482
51506
|
Object.defineProperty(NovoStepper.prototype, "completed", {
|
|
51483
51507
|
get: function () {
|
|
51484
51508
|
try {
|
|
51485
|
-
var steps = this.
|
|
51509
|
+
var steps = this._steps.toArray();
|
|
51486
51510
|
var length = steps.length - 1;
|
|
51487
51511
|
return steps[length].completed && length === this.selectedIndex;
|
|
51488
51512
|
}
|
|
@@ -51496,11 +51520,11 @@
|
|
|
51496
51520
|
NovoStepper.prototype.ngAfterContentInit = function () {
|
|
51497
51521
|
var _this = this;
|
|
51498
51522
|
// Mark the component for change detection whenever the content children query changes
|
|
51499
|
-
this.
|
|
51523
|
+
this._steps.changes.pipe(operators.takeUntil(this._destroyed)).subscribe(function () { return _this._stateChanged(); });
|
|
51500
51524
|
};
|
|
51501
51525
|
NovoStepper.prototype.complete = function () {
|
|
51502
51526
|
try {
|
|
51503
|
-
var steps = this.
|
|
51527
|
+
var steps = this._steps.toArray();
|
|
51504
51528
|
steps[this.selectedIndex].completed = true;
|
|
51505
51529
|
this.next();
|
|
51506
51530
|
this._stateChanged();
|
|
@@ -51510,7 +51534,7 @@
|
|
|
51510
51534
|
}
|
|
51511
51535
|
};
|
|
51512
51536
|
NovoStepper.prototype.getIndicatorType = function (index) {
|
|
51513
|
-
var steps = this.
|
|
51537
|
+
var steps = this._steps.toArray();
|
|
51514
51538
|
if (index === this.selectedIndex) {
|
|
51515
51539
|
if (steps[index] && index === steps.length - 1 && steps[index].completed) {
|
|
51516
51540
|
return 'done';
|
|
@@ -51535,7 +51559,7 @@
|
|
|
51535
51559
|
];
|
|
51536
51560
|
NovoStepper.propDecorators = {
|
|
51537
51561
|
_stepHeader: [{ type: i0.ViewChildren, args: [NovoStepHeader,] }],
|
|
51538
|
-
|
|
51562
|
+
_steps: [{ type: i0.ContentChildren, args: [NovoStep, { descendants: true },] }],
|
|
51539
51563
|
_icons: [{ type: i0.ContentChildren, args: [NovoIconComponent,] }]
|
|
51540
51564
|
};
|
|
51541
51565
|
var NovoHorizontalStepper = /** @class */ (function (_super) {
|
|
@@ -52027,30 +52051,10 @@
|
|
|
52027
52051
|
|
|
52028
52052
|
var BaseRenderer = /** @class */ (function () {
|
|
52029
52053
|
function BaseRenderer() {
|
|
52030
|
-
this.
|
|
52031
|
-
this.
|
|
52054
|
+
this.data = {};
|
|
52055
|
+
this.value = '';
|
|
52032
52056
|
this.meta = {};
|
|
52033
52057
|
}
|
|
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
52058
|
return BaseRenderer;
|
|
52055
52059
|
}());
|
|
52056
52060
|
|
|
@@ -52061,13 +52065,6 @@
|
|
|
52061
52065
|
_this.labels = labels;
|
|
52062
52066
|
return _this;
|
|
52063
52067
|
}
|
|
52064
|
-
Object.defineProperty(DateCell.prototype, "value", {
|
|
52065
|
-
set: function (v) {
|
|
52066
|
-
this._value = v;
|
|
52067
|
-
},
|
|
52068
|
-
enumerable: false,
|
|
52069
|
-
configurable: true
|
|
52070
|
-
});
|
|
52071
52068
|
DateCell.prototype.getFormattedDate = function () {
|
|
52072
52069
|
return this.labels.formatDate(this.value);
|
|
52073
52070
|
};
|
|
@@ -52091,13 +52088,6 @@
|
|
|
52091
52088
|
function NovoDropdownCell() {
|
|
52092
52089
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
52093
52090
|
}
|
|
52094
|
-
Object.defineProperty(NovoDropdownCell.prototype, "value", {
|
|
52095
|
-
set: function (v) {
|
|
52096
|
-
this._value = v;
|
|
52097
|
-
},
|
|
52098
|
-
enumerable: false,
|
|
52099
|
-
configurable: true
|
|
52100
|
-
});
|
|
52101
52091
|
NovoDropdownCell.prototype.ngOnInit = function () {
|
|
52102
52092
|
// Check for and fix bad config
|
|
52103
52093
|
if (!this.meta.dropdownCellConfig) {
|