@acorex/components 16.19.39 → 16.19.41
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/acorex-components.mjs +22 -16
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/lib/property-editor/editors/number-editor/number.editor.d.ts +1 -0
- package/lib/property-editor/editors/text-editor/text.editor.d.ts +1 -0
- package/lib/validation/validation-rule.widget.d.ts +1 -1
- package/lib/validation/validation.class.d.ts +1 -1
- package/lib/validation/validation.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -77,13 +77,15 @@ class AXValidationRuleComponent {
|
|
|
77
77
|
result = value.trim() != '';
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
|
-
result =
|
|
81
|
-
value !=
|
|
82
|
-
|
|
80
|
+
result =
|
|
81
|
+
value != null &&
|
|
82
|
+
value != '' &&
|
|
83
|
+
(!Array.isArray(value) ||
|
|
84
|
+
(Array.isArray(value) && value.length > 0));
|
|
83
85
|
}
|
|
84
86
|
resolve({
|
|
85
87
|
message: message || AXTranslator.get('validation.messages.required'),
|
|
86
|
-
result: this.operation === 'not' ? !result : result
|
|
88
|
+
result: this.operation === 'not' ? !result : result,
|
|
87
89
|
});
|
|
88
90
|
break;
|
|
89
91
|
case 'regex':
|
|
@@ -91,7 +93,7 @@ class AXValidationRuleComponent {
|
|
|
91
93
|
result = ex.test(value);
|
|
92
94
|
resolve({
|
|
93
95
|
message: message || AXTranslator.get('validation.messages.regex'),
|
|
94
|
-
result: this.operation === 'not' ? !result : result
|
|
96
|
+
result: this.operation === 'not' ? !result : result,
|
|
95
97
|
});
|
|
96
98
|
break;
|
|
97
99
|
case 'custom':
|
|
@@ -116,7 +118,7 @@ class AXValidationRuleComponent {
|
|
|
116
118
|
res.result = val;
|
|
117
119
|
resolve({
|
|
118
120
|
message: message,
|
|
119
|
-
result: this.operation === 'not' ? !res.result : res.result
|
|
121
|
+
result: this.operation === 'not' ? !res.result : res.result,
|
|
120
122
|
});
|
|
121
123
|
}
|
|
122
124
|
}
|
|
@@ -137,7 +139,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
137
139
|
args: [{
|
|
138
140
|
selector: 'ax-validation-rule',
|
|
139
141
|
template: '',
|
|
140
|
-
standalone: false
|
|
142
|
+
standalone: false,
|
|
141
143
|
}]
|
|
142
144
|
}], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
|
|
143
145
|
type: Inject,
|
|
@@ -163,8 +165,8 @@ class AXValidation {
|
|
|
163
165
|
if (!this.rules || this.rules.length === 0) {
|
|
164
166
|
return Promise.resolve({ result: true });
|
|
165
167
|
}
|
|
166
|
-
return new Promise(resolve => {
|
|
167
|
-
Promise.all(this.rules.map(c => {
|
|
168
|
+
return new Promise((resolve) => {
|
|
169
|
+
Promise.all(this.rules.map((c) => {
|
|
168
170
|
if (c instanceof AXValidationRuleComponent) {
|
|
169
171
|
return c.validate(value);
|
|
170
172
|
}
|
|
@@ -173,8 +175,8 @@ class AXValidation {
|
|
|
173
175
|
Object.assign(v, c);
|
|
174
176
|
return v.validate(value);
|
|
175
177
|
}
|
|
176
|
-
})).then(d => {
|
|
177
|
-
const error = d.find(c => c.result === false);
|
|
178
|
+
})).then((d) => {
|
|
179
|
+
const error = d.find((c) => c.result === false);
|
|
178
180
|
if (error) {
|
|
179
181
|
resolve(error);
|
|
180
182
|
}
|
|
@@ -193,7 +195,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
193
195
|
class AXValidationComponent extends AXValidation {
|
|
194
196
|
ref;
|
|
195
197
|
_getComponenets() {
|
|
196
|
-
return Array.from(this.ref?.nativeElement.querySelectorAll('ax-validation-rule')).map(c => c[
|
|
198
|
+
return Array.from(this.ref?.nativeElement.querySelectorAll('ax-validation-rule')).map((c) => c['__axContext__']);
|
|
197
199
|
}
|
|
198
200
|
constructor(ref) {
|
|
199
201
|
super();
|
|
@@ -226,7 +228,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
226
228
|
selector: 'ax-validation',
|
|
227
229
|
template: '<ng-content></ng-content>',
|
|
228
230
|
providers: [{ provide: AXValidation, useExisting: AXValidationComponent }],
|
|
229
|
-
standalone: false
|
|
231
|
+
standalone: false,
|
|
230
232
|
}]
|
|
231
233
|
}], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
|
|
232
234
|
type: Inject,
|
|
@@ -13536,6 +13538,7 @@ class AXNumberBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
13536
13538
|
showCounter = true;
|
|
13537
13539
|
scrollWeel = true;
|
|
13538
13540
|
readonly = false;
|
|
13541
|
+
placeholder = '';
|
|
13539
13542
|
textBox;
|
|
13540
13543
|
constructor(cdr) {
|
|
13541
13544
|
super(cdr);
|
|
@@ -13561,6 +13564,7 @@ class AXNumberBoxPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
13561
13564
|
[showCounter]="showCounter"
|
|
13562
13565
|
[readonly]="readonly"
|
|
13563
13566
|
[scrollWeel]="scrollWeel"
|
|
13567
|
+
[placeholder]="placeholder"
|
|
13564
13568
|
>
|
|
13565
13569
|
<ax-validation [rules]="validation?.rules"> </ax-validation>
|
|
13566
13570
|
</ax-number-box>
|
|
@@ -13581,11 +13585,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
13581
13585
|
[showCounter]="showCounter"
|
|
13582
13586
|
[readonly]="readonly"
|
|
13583
13587
|
[scrollWeel]="scrollWeel"
|
|
13588
|
+
[placeholder]="placeholder"
|
|
13584
13589
|
>
|
|
13585
13590
|
<ax-validation [rules]="validation?.rules"> </ax-validation>
|
|
13586
13591
|
</ax-number-box>
|
|
13587
13592
|
`,
|
|
13588
|
-
standalone: false
|
|
13593
|
+
standalone: false,
|
|
13589
13594
|
}]
|
|
13590
13595
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { textBox: [{
|
|
13591
13596
|
type: ViewChild,
|
|
@@ -14137,6 +14142,7 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
14137
14142
|
mask;
|
|
14138
14143
|
maskGuid = false;
|
|
14139
14144
|
showMask = false;
|
|
14145
|
+
placeholder = '';
|
|
14140
14146
|
constructor(cdr) {
|
|
14141
14147
|
super(cdr);
|
|
14142
14148
|
this.cdr = cdr;
|
|
@@ -14149,11 +14155,11 @@ class AXTextPropertyEditorComponent extends AXProperyEditorComponent {
|
|
|
14149
14155
|
this.onRenderCompleted.emit();
|
|
14150
14156
|
}
|
|
14151
14157
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXTextPropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
14152
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AXTextPropertyEditorComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-text-box
|
|
14158
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AXTextPropertyEditorComponent, isStandalone: false, selector: "ng-component", viewQueries: [{ propertyName: "textBox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ax-text-box\n (onValueChanged)=\"handleValueChange($event)\"\n [value]=\"value\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [allowClear]=\"clearButton\"\n [mask]=\"mask\"\n [showMask]=\"showMask\"\n>\n <ax-validation [rules]=\"validation?.rules\"> </ax-validation>\n</ax-text-box>\n", dependencies: [{ kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions", "leadZeroDateTime"] }, { kind: "component", type: AXValidationComponent, selector: "ax-validation", inputs: ["rules", "validateOn"], outputs: ["rulesChange", "showMessage"] }] });
|
|
14153
14159
|
}
|
|
14154
14160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXTextPropertyEditorComponent, decorators: [{
|
|
14155
14161
|
type: Component,
|
|
14156
|
-
args: [{ standalone: false, template: "<ax-text-box
|
|
14162
|
+
args: [{ standalone: false, template: "<ax-text-box\n (onValueChanged)=\"handleValueChange($event)\"\n [value]=\"value\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [allowClear]=\"clearButton\"\n [mask]=\"mask\"\n [showMask]=\"showMask\"\n>\n <ax-validation [rules]=\"validation?.rules\"> </ax-validation>\n</ax-text-box>\n" }]
|
|
14157
14163
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { textBox: [{
|
|
14158
14164
|
type: ViewChild,
|
|
14159
14165
|
args: [AXTextBoxComponent]
|