@acorex/components 3.0.3 → 3.0.8
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/acorex-components.metadata.json +1 -1
- package/bundles/acorex-components.umd.js +41 -32
- package/bundles/acorex-components.umd.js.map +1 -1
- package/bundles/acorex-components.umd.min.js +1 -1
- package/bundles/acorex-components.umd.min.js.map +1 -1
- package/esm2015/lib/base/element.class.js +35 -31
- package/esm2015/lib/selectbox/selectbox.component.js +2 -2
- package/esm2015/lib/textarea/textarea.component.js +7 -2
- package/esm5/lib/base/element.class.js +35 -31
- package/esm5/lib/selectbox/selectbox.component.js +2 -2
- package/esm5/lib/textarea/textarea.component.js +7 -2
- package/fesm2015/acorex-components.js +42 -33
- package/fesm2015/acorex-components.js.map +1 -1
- package/fesm5/acorex-components.js +41 -32
- package/fesm5/acorex-components.js.map +1 -1
- package/lib/textarea/textarea.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -496,7 +496,7 @@
|
|
|
496
496
|
});
|
|
497
497
|
AXValidatableComponent.prototype.validate = function () {
|
|
498
498
|
var _this = this;
|
|
499
|
-
if (this.__validation !== undefined) {
|
|
499
|
+
if (this.__validation !== undefined && (this.__validation.rules || []).length > 0) {
|
|
500
500
|
var result = this.__validation.validate(this[this.__valueField]);
|
|
501
501
|
result.then(function (c) {
|
|
502
502
|
if (c.result) {
|
|
@@ -515,40 +515,44 @@
|
|
|
515
515
|
AXValidatableComponent.prototype.clearValidationStyle = function (element, clear) {
|
|
516
516
|
if (clear === void 0) { clear = false; }
|
|
517
517
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
(
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
518
|
+
if (this.__validation !== undefined && (this.__validation.rules || []).length > 0) {
|
|
519
|
+
var formGroup = element.closest('.form-group');
|
|
520
|
+
var formItem = ((_a = formGroup) === null || _a === void 0 ? void 0 : _a.querySelector('.form-item')) || element.closest('.form-item') || element.querySelector('.form-item');
|
|
521
|
+
;
|
|
522
|
+
var label = (_b = formGroup) === null || _b === void 0 ? void 0 : _b.querySelector('.form-group-label');
|
|
523
|
+
var parent_1 = ((_c = formItem) === null || _c === void 0 ? void 0 : _c.parentElement) || element.parentElement;
|
|
524
|
+
(_d = formItem) === null || _d === void 0 ? void 0 : _d.classList.remove('success-state');
|
|
525
|
+
(_e = formItem) === null || _e === void 0 ? void 0 : _e.classList.remove('error-state');
|
|
526
|
+
//formItem?.classList.remove('required-state');
|
|
527
|
+
if (!clear) {
|
|
528
|
+
(_f = formItem) === null || _f === void 0 ? void 0 : _f.classList.add('success-state');
|
|
529
|
+
}
|
|
530
|
+
(_g = label) === null || _g === void 0 ? void 0 : _g.classList.remove('error-text');
|
|
531
|
+
if (parent_1.querySelector('span.error-text')) {
|
|
532
|
+
parent_1.removeChild(parent_1.querySelector('span.error-text'));
|
|
533
|
+
}
|
|
532
534
|
}
|
|
533
535
|
};
|
|
534
536
|
AXValidatableComponent.prototype.applyValidationStyle = function (element, v) {
|
|
535
537
|
var _a, _b, _c, _d, _e, _f;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
538
|
+
if (this.__validation !== undefined && (this.__validation.rules || []).length > 0) {
|
|
539
|
+
var formGroup = element.closest('.form-group');
|
|
540
|
+
var formItem = ((_a = formGroup) === null || _a === void 0 ? void 0 : _a.querySelector('.form-item')) || element.closest('.form-item') || element.querySelector('.form-item');
|
|
541
|
+
var label = (_b = formGroup) === null || _b === void 0 ? void 0 : _b.querySelector('.form-group-label');
|
|
542
|
+
var parent_2 = ((_c = formItem) === null || _c === void 0 ? void 0 : _c.parentElement) || element.parentElement;
|
|
543
|
+
(_d = formItem) === null || _d === void 0 ? void 0 : _d.classList.add('error-state');
|
|
544
|
+
(_e = formItem) === null || _e === void 0 ? void 0 : _e.classList.remove('success-state');
|
|
545
|
+
if (parent_2.querySelector('span.error-text')) {
|
|
546
|
+
parent_2.removeChild(parent_2.querySelector('span.error-text'));
|
|
547
|
+
}
|
|
548
|
+
if (this.__validation.showMessage) {
|
|
549
|
+
var span = document.createElement('span');
|
|
550
|
+
span.innerText = v.message;
|
|
551
|
+
span.classList.add('ax', 'error-text');
|
|
552
|
+
parent_2.appendChild(span);
|
|
553
|
+
}
|
|
554
|
+
(_f = label) === null || _f === void 0 ? void 0 : _f.classList.add('error-text');
|
|
550
555
|
}
|
|
551
|
-
(_f = label) === null || _f === void 0 ? void 0 : _f.classList.add('error-text');
|
|
552
556
|
};
|
|
553
557
|
__decorate([
|
|
554
558
|
core.Input(),
|
|
@@ -8443,7 +8447,7 @@
|
|
|
8443
8447
|
_this.size = 'md';
|
|
8444
8448
|
_this.allowNull = true;
|
|
8445
8449
|
_this.textAlign = null;
|
|
8446
|
-
_this.bufferSize =
|
|
8450
|
+
_this.bufferSize = 20;
|
|
8447
8451
|
_this.remoteOperation = false;
|
|
8448
8452
|
// this input is Private and only use in LOV
|
|
8449
8453
|
_this.currentfocusedIndex = -1;
|
|
@@ -11696,6 +11700,7 @@
|
|
|
11696
11700
|
_this.cdr = cdr;
|
|
11697
11701
|
_this.rows = 0;
|
|
11698
11702
|
_this.cols = 0;
|
|
11703
|
+
_this.maxLength = null;
|
|
11699
11704
|
return _this;
|
|
11700
11705
|
}
|
|
11701
11706
|
AXTextAreaComponent_1 = AXTextAreaComponent;
|
|
@@ -11712,10 +11717,14 @@
|
|
|
11712
11717
|
core.Input(),
|
|
11713
11718
|
__metadata("design:type", Number)
|
|
11714
11719
|
], AXTextAreaComponent.prototype, "cols", void 0);
|
|
11720
|
+
__decorate([
|
|
11721
|
+
core.Input(),
|
|
11722
|
+
__metadata("design:type", Number)
|
|
11723
|
+
], AXTextAreaComponent.prototype, "maxLength", void 0);
|
|
11715
11724
|
AXTextAreaComponent = AXTextAreaComponent_1 = __decorate([
|
|
11716
11725
|
core.Component({
|
|
11717
11726
|
selector: 'ax-text-area',
|
|
11718
|
-
template: "<div class=\"ax form-item {{size}}\" [class.disabled]=\"disabled\" [attr.id]=\"uid\">\r\n <div class=\"content\">\r\n <div class=\"ax input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\">\r\n <textarea rows=\"{{rows}}\" cols=\"{{cols}}\" #input type=\"text\"
|
|
11727
|
+
template: "<div class=\"ax form-item {{size}}\" [class.disabled]=\"disabled\" [attr.id]=\"uid\">\r\n <div class=\"content\">\r\n <div class=\"ax input {{size}}\" [class.disabled]=\"disabled\" [class.readonly]=\"readonly\">\r\n <textarea [attr.maxlength]=\"maxLength\" rows=\"{{rows}}\" cols=\"{{cols}}\" #input type=\"text\"\r\n class=\"ax icon {{size}}\" [ngClass]=\"setTextAlign()\" placeholder=\"{{placeholder}}\" [readonly]=\"readonly\"\r\n [disabled]=\"disabled\" value=\"{{value}}\"></textarea>\r\n </div>\r\n </div>\r\n <div class=\"ax buttons\">\r\n <ng-content select=\"ax-button\">\r\n </ng-content>\r\n </div>\r\n</div>",
|
|
11719
11728
|
encapsulation: core.ViewEncapsulation.None,
|
|
11720
11729
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
11721
11730
|
host: { style: 'display: contents;' },
|