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
|
@@ -20423,6 +20423,12 @@ class NovoFormGroup extends FormGroup {
|
|
|
20423
20423
|
super(...arguments);
|
|
20424
20424
|
this.fieldInteractionEvents = new EventEmitter();
|
|
20425
20425
|
}
|
|
20426
|
+
get value() {
|
|
20427
|
+
return this.getRawValue(); // The value property on Angular form groups do not include disabled form control values. Find way to address this.
|
|
20428
|
+
}
|
|
20429
|
+
set value(v) {
|
|
20430
|
+
this._value = v;
|
|
20431
|
+
}
|
|
20426
20432
|
enableAllControls() {
|
|
20427
20433
|
for (const key in this.controls) {
|
|
20428
20434
|
if (this.controls[key].readOnly) {
|
|
@@ -20738,6 +20744,7 @@ class BasePickerResults {
|
|
|
20738
20744
|
constructor(element, ref) {
|
|
20739
20745
|
this._term = '';
|
|
20740
20746
|
this.selected = [];
|
|
20747
|
+
this.matches = [];
|
|
20741
20748
|
this.hasError = false;
|
|
20742
20749
|
this.isLoading = false;
|
|
20743
20750
|
this.isStatic = true;
|
|
@@ -20746,17 +20753,10 @@ class BasePickerResults {
|
|
|
20746
20753
|
this.autoSelectFirstOption = true;
|
|
20747
20754
|
this.optionsFunctionHasChanged = false;
|
|
20748
20755
|
this.selectingMatches = false;
|
|
20749
|
-
this._matches = [];
|
|
20750
20756
|
this.element = element;
|
|
20751
20757
|
this.ref = ref;
|
|
20752
20758
|
this.scrollHandler = this.onScrollDown.bind(this);
|
|
20753
20759
|
}
|
|
20754
|
-
set matches(m) {
|
|
20755
|
-
this._matches = m;
|
|
20756
|
-
}
|
|
20757
|
-
get matches() {
|
|
20758
|
-
return this._matches;
|
|
20759
|
-
}
|
|
20760
20760
|
cleanUp() {
|
|
20761
20761
|
const element = this.getListElement();
|
|
20762
20762
|
if (element && element.hasAttribute('scrollListener')) {
|
|
@@ -22113,7 +22113,7 @@ class FormUtils {
|
|
|
22113
22113
|
forceValidation(form) {
|
|
22114
22114
|
Object.keys(form.controls).forEach((key) => {
|
|
22115
22115
|
const control = form.controls[key];
|
|
22116
|
-
if (control.required && Helpers.isBlank(form.
|
|
22116
|
+
if (control.required && Helpers.isBlank(form.value[control.key])) {
|
|
22117
22117
|
control.markAsDirty();
|
|
22118
22118
|
control.markAsTouched();
|
|
22119
22119
|
}
|
|
@@ -32820,8 +32820,11 @@ class NovoChipsElement {
|
|
|
32820
32820
|
}
|
|
32821
32821
|
}
|
|
32822
32822
|
this._items.next(this.items);
|
|
32823
|
-
|
|
32824
|
-
this.
|
|
32823
|
+
const valueToSet = this.source && this.source.valueFormatter ? this.source.valueFormatter(this.items) : this.items.map((i) => i.value);
|
|
32824
|
+
if (Helpers.isBlank(this.value) !== Helpers.isBlank(valueToSet) || JSON.stringify(this.value) !== JSON.stringify(valueToSet)) {
|
|
32825
|
+
this.value = valueToSet;
|
|
32826
|
+
this._propagateChanges();
|
|
32827
|
+
}
|
|
32825
32828
|
}
|
|
32826
32829
|
getLabelFromOptions(value) {
|
|
32827
32830
|
let id = value;
|
|
@@ -35930,7 +35933,7 @@ class NovoDataTableCheckboxHeaderCell extends CdkHeaderCell {
|
|
|
35930
35933
|
var _a;
|
|
35931
35934
|
this.checked = false;
|
|
35932
35935
|
if ((_a = this.dataTable) === null || _a === void 0 ? void 0 : _a.canSelectAll) {
|
|
35933
|
-
this.
|
|
35936
|
+
this.resetAllMatchingSelected();
|
|
35934
35937
|
}
|
|
35935
35938
|
this.ref.markForCheck();
|
|
35936
35939
|
});
|
|
@@ -35963,9 +35966,19 @@ class NovoDataTableCheckboxHeaderCell extends CdkHeaderCell {
|
|
|
35963
35966
|
this.dataTable.selectRows(!this.checked);
|
|
35964
35967
|
}
|
|
35965
35968
|
if ((_a = this.dataTable) === null || _a === void 0 ? void 0 : _a.canSelectAll) {
|
|
35966
|
-
this.
|
|
35969
|
+
if (this.checked) {
|
|
35970
|
+
this.resetAllMatchingSelected();
|
|
35971
|
+
}
|
|
35972
|
+
else {
|
|
35973
|
+
this.selectAllChanged();
|
|
35974
|
+
}
|
|
35967
35975
|
}
|
|
35968
35976
|
}
|
|
35977
|
+
resetAllMatchingSelected() {
|
|
35978
|
+
var _a, _b, _c;
|
|
35979
|
+
(_b = (_a = this.dataTable.state) === null || _a === void 0 ? void 0 : _a.allMatchingSelectedSource) === null || _b === void 0 ? void 0 : _b.next(false);
|
|
35980
|
+
(_c = this.dataTable.state) === null || _c === void 0 ? void 0 : _c.onSelectionChange();
|
|
35981
|
+
}
|
|
35969
35982
|
selectAllChanged() {
|
|
35970
35983
|
var _a, _b, _c, _d;
|
|
35971
35984
|
const allSelectedEvent = {
|
|
@@ -38133,7 +38146,7 @@ class NovoSelectElement extends NovoSelectMixins {
|
|
|
38133
38146
|
this.id = this._uniqueId;
|
|
38134
38147
|
this.name = this._uniqueId;
|
|
38135
38148
|
this.placeholder = 'Select...';
|
|
38136
|
-
this.position = '
|
|
38149
|
+
this.position = 'above-below';
|
|
38137
38150
|
this.onSelect = new EventEmitter();
|
|
38138
38151
|
/** Event emitted when the selected value has been changed by the user. */
|
|
38139
38152
|
this.selectionChange = new EventEmitter();
|
|
@@ -44133,7 +44146,7 @@ class NovoControlGroup {
|
|
|
44133
44146
|
const nestedFormGroup = controlsArray.at(index);
|
|
44134
44147
|
nestedFormGroup.fieldInteractionEvents.unsubscribe();
|
|
44135
44148
|
if (emitEvent) {
|
|
44136
|
-
this.onRemove.emit({ value: nestedFormGroup.
|
|
44149
|
+
this.onRemove.emit({ value: nestedFormGroup.value, index });
|
|
44137
44150
|
}
|
|
44138
44151
|
controlsArray.removeAt(index);
|
|
44139
44152
|
this.disabledArray = this.disabledArray.filter((value, idx) => idx !== index);
|
|
@@ -44943,7 +44956,7 @@ class NovoDynamicFormElement {
|
|
|
44943
44956
|
}
|
|
44944
44957
|
// Hide required fields that have been successfully filled out
|
|
44945
44958
|
if (hideRequiredWithValue &&
|
|
44946
|
-
!Helpers.isBlank(this.form.
|
|
44959
|
+
!Helpers.isBlank(this.form.value[control.key]) &&
|
|
44947
44960
|
(!control.isEmpty || (control.isEmpty && control.isEmpty(ctl)))) {
|
|
44948
44961
|
ctl.hidden = true;
|
|
44949
44962
|
}
|
|
@@ -44958,7 +44971,7 @@ class NovoDynamicFormElement {
|
|
|
44958
44971
|
this.forceValidation();
|
|
44959
44972
|
}
|
|
44960
44973
|
get values() {
|
|
44961
|
-
return this.form ? this.form.
|
|
44974
|
+
return this.form ? this.form.value : null;
|
|
44962
44975
|
}
|
|
44963
44976
|
get isValid() {
|
|
44964
44977
|
return this.form ? this.form.valid : false;
|
|
@@ -44971,7 +44984,7 @@ class NovoDynamicFormElement {
|
|
|
44971
44984
|
if (!ret) {
|
|
44972
44985
|
ret = {};
|
|
44973
44986
|
}
|
|
44974
|
-
ret[control.key] = this.form.
|
|
44987
|
+
ret[control.key] = this.form.value[control.key];
|
|
44975
44988
|
}
|
|
44976
44989
|
});
|
|
44977
44990
|
});
|
|
@@ -44980,7 +44993,7 @@ class NovoDynamicFormElement {
|
|
|
44980
44993
|
forceValidation() {
|
|
44981
44994
|
Object.keys(this.form.controls).forEach((key) => {
|
|
44982
44995
|
const control = this.form.controls[key];
|
|
44983
|
-
if (control.required && Helpers.isBlank(this.form.
|
|
44996
|
+
if (control.required && Helpers.isBlank(this.form.value[control.key])) {
|
|
44984
44997
|
control.markAsDirty();
|
|
44985
44998
|
control.markAsTouched();
|
|
44986
44999
|
}
|
|
@@ -45070,7 +45083,7 @@ class NovoFormElement {
|
|
|
45070
45083
|
this.form.controls[key].hidden = true;
|
|
45071
45084
|
}
|
|
45072
45085
|
// Hide required fields that have been successfully filled out
|
|
45073
|
-
if (hideRequiredWithValue && !Helpers.isBlank(this.form.
|
|
45086
|
+
if (hideRequiredWithValue && !Helpers.isBlank(this.form.value[key])) {
|
|
45074
45087
|
this.form.controls[key].hidden = true;
|
|
45075
45088
|
}
|
|
45076
45089
|
// Don't hide fields with errors
|
|
@@ -45085,7 +45098,7 @@ class NovoFormElement {
|
|
|
45085
45098
|
forceValidation() {
|
|
45086
45099
|
Object.keys(this.form.controls).forEach((key) => {
|
|
45087
45100
|
const control = this.form.controls[key];
|
|
45088
|
-
if (control.required && Helpers.isBlank(this.form.
|
|
45101
|
+
if (control.required && Helpers.isBlank(this.form.value[control.key])) {
|
|
45089
45102
|
control.markAsDirty();
|
|
45090
45103
|
control.markAsTouched();
|
|
45091
45104
|
}
|
|
@@ -51971,9 +51984,16 @@ class NovoStepper extends CdkStepper {
|
|
|
51971
51984
|
/** Consumer-specified template-refs to be used to override the header icons. */
|
|
51972
51985
|
this._iconOverrides = {};
|
|
51973
51986
|
}
|
|
51987
|
+
/** Steps that belong to the current stepper, excluding ones from nested steppers. */
|
|
51988
|
+
get steps() {
|
|
51989
|
+
return this._steps;
|
|
51990
|
+
}
|
|
51991
|
+
set steps(value) {
|
|
51992
|
+
this._steps = value;
|
|
51993
|
+
}
|
|
51974
51994
|
get completed() {
|
|
51975
51995
|
try {
|
|
51976
|
-
const steps = this.
|
|
51996
|
+
const steps = this._steps.toArray();
|
|
51977
51997
|
const length = steps.length - 1;
|
|
51978
51998
|
return steps[length].completed && length === this.selectedIndex;
|
|
51979
51999
|
}
|
|
@@ -51983,11 +52003,11 @@ class NovoStepper extends CdkStepper {
|
|
|
51983
52003
|
}
|
|
51984
52004
|
ngAfterContentInit() {
|
|
51985
52005
|
// Mark the component for change detection whenever the content children query changes
|
|
51986
|
-
this.
|
|
52006
|
+
this._steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => this._stateChanged());
|
|
51987
52007
|
}
|
|
51988
52008
|
complete() {
|
|
51989
52009
|
try {
|
|
51990
|
-
const steps = this.
|
|
52010
|
+
const steps = this._steps.toArray();
|
|
51991
52011
|
steps[this.selectedIndex].completed = true;
|
|
51992
52012
|
this.next();
|
|
51993
52013
|
this._stateChanged();
|
|
@@ -51997,7 +52017,7 @@ class NovoStepper extends CdkStepper {
|
|
|
51997
52017
|
}
|
|
51998
52018
|
}
|
|
51999
52019
|
getIndicatorType(index) {
|
|
52000
|
-
const steps = this.
|
|
52020
|
+
const steps = this._steps.toArray();
|
|
52001
52021
|
if (index === this.selectedIndex) {
|
|
52002
52022
|
if (steps[index] && index === steps.length - 1 && steps[index].completed) {
|
|
52003
52023
|
return 'done';
|
|
@@ -52021,7 +52041,7 @@ NovoStepper.decorators = [
|
|
|
52021
52041
|
];
|
|
52022
52042
|
NovoStepper.propDecorators = {
|
|
52023
52043
|
_stepHeader: [{ type: ViewChildren, args: [NovoStepHeader,] }],
|
|
52024
|
-
|
|
52044
|
+
_steps: [{ type: ContentChildren, args: [NovoStep, { descendants: true },] }],
|
|
52025
52045
|
_icons: [{ type: ContentChildren, args: [NovoIconComponent,] }]
|
|
52026
52046
|
};
|
|
52027
52047
|
class NovoHorizontalStepper extends NovoStepper {
|
|
@@ -52440,22 +52460,10 @@ NovoTabbedGroupPickerModule.decorators = [
|
|
|
52440
52460
|
|
|
52441
52461
|
class BaseRenderer {
|
|
52442
52462
|
constructor() {
|
|
52443
|
-
this.
|
|
52444
|
-
this.
|
|
52463
|
+
this.data = {};
|
|
52464
|
+
this.value = '';
|
|
52445
52465
|
this.meta = {};
|
|
52446
52466
|
}
|
|
52447
|
-
get data() {
|
|
52448
|
-
return this._data;
|
|
52449
|
-
}
|
|
52450
|
-
set data(d) {
|
|
52451
|
-
this._data = d;
|
|
52452
|
-
}
|
|
52453
|
-
get value() {
|
|
52454
|
-
return this._value;
|
|
52455
|
-
}
|
|
52456
|
-
set value(v) {
|
|
52457
|
-
this._value = v;
|
|
52458
|
-
}
|
|
52459
52467
|
}
|
|
52460
52468
|
|
|
52461
52469
|
// NG2
|
|
@@ -52464,9 +52472,6 @@ class DateCell extends BaseRenderer {
|
|
|
52464
52472
|
super();
|
|
52465
52473
|
this.labels = labels;
|
|
52466
52474
|
}
|
|
52467
|
-
set value(v) {
|
|
52468
|
-
this._value = v;
|
|
52469
|
-
}
|
|
52470
52475
|
getFormattedDate() {
|
|
52471
52476
|
return this.labels.formatDate(this.value);
|
|
52472
52477
|
}
|
|
@@ -52490,9 +52495,6 @@ DateCell.propDecorators = {
|
|
|
52490
52495
|
|
|
52491
52496
|
// NG2
|
|
52492
52497
|
class NovoDropdownCell extends BaseRenderer {
|
|
52493
|
-
set value(v) {
|
|
52494
|
-
this._value = v;
|
|
52495
|
-
}
|
|
52496
52498
|
ngOnInit() {
|
|
52497
52499
|
// Check for and fix bad config
|
|
52498
52500
|
if (!this.meta.dropdownCellConfig) {
|