@osovitny/anatoly 3.20.44 → 3.20.45
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/fesm2022/osovitny-anatoly.mjs +30 -28
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/index.d.ts +4 -5
- package/package.json +1 -1
|
@@ -7021,6 +7021,18 @@ class EnumEditComponentBase extends EditComponentBase {
|
|
|
7021
7021
|
//Outputs
|
|
7022
7022
|
this.valueChange = new EventEmitter();
|
|
7023
7023
|
}
|
|
7024
|
+
//Inputs
|
|
7025
|
+
get selectedValue() {
|
|
7026
|
+
return this.sv;
|
|
7027
|
+
}
|
|
7028
|
+
set selectedValue(value) {
|
|
7029
|
+
if (!value) {
|
|
7030
|
+
return;
|
|
7031
|
+
}
|
|
7032
|
+
if (value != this.sv) {
|
|
7033
|
+
this.sv = value;
|
|
7034
|
+
}
|
|
7035
|
+
}
|
|
7024
7036
|
ngOnInit() {
|
|
7025
7037
|
this.setDefaults();
|
|
7026
7038
|
this.setValues();
|
|
@@ -7029,55 +7041,45 @@ class EnumEditComponentBase extends EditComponentBase {
|
|
|
7029
7041
|
this.renderItems();
|
|
7030
7042
|
}
|
|
7031
7043
|
setValues() {
|
|
7032
|
-
if (
|
|
7033
|
-
this.
|
|
7044
|
+
if (this.isNgModelBased) {
|
|
7045
|
+
if (!this.selectedValue) {
|
|
7046
|
+
this.selectedValue = this.defaultValue;
|
|
7047
|
+
}
|
|
7048
|
+
}
|
|
7049
|
+
else {
|
|
7050
|
+
let value = this.getFormValue(this.controlName);
|
|
7051
|
+
if (!value) {
|
|
7052
|
+
this.setFormValue(this.controlName, this.defaultValue);
|
|
7053
|
+
}
|
|
7034
7054
|
}
|
|
7035
7055
|
}
|
|
7036
7056
|
fireValueChange(value) {
|
|
7037
7057
|
this.valueChange.emit(value);
|
|
7038
7058
|
}
|
|
7039
7059
|
renderItems() {
|
|
7040
|
-
let
|
|
7041
|
-
let
|
|
7060
|
+
let one = [];
|
|
7061
|
+
let two = Convert.enumToArray(this.enumeration, true);
|
|
7042
7062
|
if (this.isNgModelBased) {
|
|
7043
|
-
|
|
7063
|
+
one = [{ value: -1, text: 'All' }];
|
|
7044
7064
|
}
|
|
7045
7065
|
this.items = [];
|
|
7046
|
-
this.items =
|
|
7047
|
-
}
|
|
7048
|
-
//Public
|
|
7049
|
-
reset() {
|
|
7050
|
-
this.selectedValue = this.defaultValue;
|
|
7066
|
+
this.items = one.concat(two);
|
|
7051
7067
|
}
|
|
7052
7068
|
//Events
|
|
7053
7069
|
onChange(value) {
|
|
7054
7070
|
this.fireValueChange(value);
|
|
7055
7071
|
}
|
|
7056
|
-
//Properties
|
|
7057
|
-
get selectedValue() {
|
|
7058
|
-
if (this.isNgModelBased) {
|
|
7059
|
-
return this.sv;
|
|
7060
|
-
}
|
|
7061
|
-
let value = this.getFormValue(this.controlName);
|
|
7062
|
-
return value;
|
|
7063
|
-
}
|
|
7064
|
-
set selectedValue(value) {
|
|
7065
|
-
if (!value) {
|
|
7066
|
-
return;
|
|
7067
|
-
}
|
|
7068
|
-
if (value != this.sv) {
|
|
7069
|
-
this.sv = value;
|
|
7070
|
-
}
|
|
7071
|
-
}
|
|
7072
7072
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵEnumEditComponentBase_BaseFactory; return function EnumEditComponentBase_Factory(__ngFactoryType__) { return (ɵEnumEditComponentBase_BaseFactory || (ɵEnumEditComponentBase_BaseFactory = i0.ɵɵgetInheritedFactory(EnumEditComponentBase)))(__ngFactoryType__ || EnumEditComponentBase); }; })(); }
|
|
7073
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EnumEditComponentBase, selectors: [["ng-component"]], inputs: { defaultValue: "defaultValue" }, outputs: { valueChange: "valueChange" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function EnumEditComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
|
|
7073
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EnumEditComponentBase, selectors: [["ng-component"]], inputs: { selectedValue: "selectedValue", defaultValue: "defaultValue" }, outputs: { valueChange: "valueChange" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function EnumEditComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
|
|
7074
7074
|
}
|
|
7075
7075
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EnumEditComponentBase, [{
|
|
7076
7076
|
type: Component,
|
|
7077
7077
|
args: [{
|
|
7078
7078
|
template: ''
|
|
7079
7079
|
}]
|
|
7080
|
-
}], null, {
|
|
7080
|
+
}], null, { selectedValue: [{
|
|
7081
|
+
type: Input
|
|
7082
|
+
}], defaultValue: [{
|
|
7081
7083
|
type: Input
|
|
7082
7084
|
}], valueChange: [{
|
|
7083
7085
|
type: Output
|