@main-class/componentes 1.19.11 → 1.19.14

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.
@@ -535,14 +535,6 @@
535
535
  }
536
536
  this.stateChanges.next();
537
537
  };
538
- InputDatetimeComponent.prototype.validate = function (control) {
539
- if (!!control.value) {
540
- if (isNaN(control.value)) {
541
- return { date: true };
542
- }
543
- }
544
- return null;
545
- };
546
538
  return InputDatetimeComponent;
547
539
  }(AbstractMatFormFieldControl));
548
540
  InputDatetimeComponent.decorators = [
@@ -554,11 +546,6 @@
554
546
  provide: formField.MatFormFieldControl,
555
547
  useExisting: InputDatetimeComponent
556
548
  },
557
- {
558
- provide: forms.NG_VALIDATORS,
559
- useExisting: InputDatetimeComponent,
560
- multi: true
561
- }
562
549
  ],
563
550
  styles: [".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}"]
564
551
  },] }
@@ -578,6 +565,33 @@
578
565
  picker: [{ type: core.ViewChild, args: ['pickerData',] }]
579
566
  };
580
567
 
568
+ var InputDatetimeValidatorDirective = /** @class */ (function () {
569
+ function InputDatetimeValidatorDirective() {
570
+ }
571
+ InputDatetimeValidatorDirective.prototype.validate = function (control) {
572
+ if (!!control.value) {
573
+ if (isNaN(control.value)) {
574
+ return { date: true };
575
+ }
576
+ }
577
+ return null;
578
+ };
579
+ return InputDatetimeValidatorDirective;
580
+ }());
581
+ InputDatetimeValidatorDirective.decorators = [
582
+ { type: core.Directive, args: [{
583
+ selector: '[mclInputDatetimeValidator],mcl-input-datetime',
584
+ providers: [
585
+ {
586
+ provide: forms.NG_VALIDATORS,
587
+ useExisting: InputDatetimeValidatorDirective,
588
+ multi: true
589
+ }
590
+ ]
591
+ },] }
592
+ ];
593
+ InputDatetimeValidatorDirective.ctorParameters = function () { return []; };
594
+
581
595
  var ɵ0 = {
582
596
  parse: {
583
597
  dateInput: 'L',
@@ -603,7 +617,10 @@
603
617
  }());
604
618
  InputDatetimeModule.decorators = [
605
619
  { type: core.NgModule, args: [{
606
- declarations: [InputDatetimeComponent],
620
+ declarations: [
621
+ InputDatetimeComponent,
622
+ InputDatetimeValidatorDirective
623
+ ],
607
624
  imports: [
608
625
  common.CommonModule,
609
626
  input.MatInputModule,
@@ -614,7 +631,8 @@
614
631
  model.ModelModule
615
632
  ],
616
633
  exports: [
617
- InputDatetimeComponent
634
+ InputDatetimeComponent,
635
+ InputDatetimeValidatorDirective
618
636
  ],
619
637
  providers: [
620
638
  { provide: core$1.MAT_DATE_LOCALE, useExisting: core.LOCALE_ID },
@@ -2080,37 +2098,41 @@
2080
2098
  SelectManyCheckboxComponent.prototype.updateOpcoes = function (value) {
2081
2099
  var e_1, _a;
2082
2100
  if (value === void 0) { value = this.value; }
2083
- try {
2084
- for (var _b = __values(this.opcoes), _c = _b.next(); !_c.done; _c = _b.next()) {
2085
- var opcao = _c.value;
2086
- opcao._selected = value && value.indexOf(opcao.value) >= 0;
2087
- }
2088
- }
2089
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2090
- finally {
2101
+ if (!!this.opcoes) {
2091
2102
  try {
2092
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2103
+ for (var _b = __values(this.opcoes), _c = _b.next(); !_c.done; _c = _b.next()) {
2104
+ var opcao = _c.value;
2105
+ opcao._selected = value && value.indexOf(opcao.value) >= 0;
2106
+ }
2107
+ }
2108
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2109
+ finally {
2110
+ try {
2111
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2112
+ }
2113
+ finally { if (e_1) throw e_1.error; }
2093
2114
  }
2094
- finally { if (e_1) throw e_1.error; }
2095
2115
  }
2096
2116
  };
2097
2117
  SelectManyCheckboxComponent.prototype.opcoesToValue = function () {
2098
2118
  var e_2, _a;
2099
2119
  var val = [];
2100
- try {
2101
- for (var _b = __values(this.opcoes), _c = _b.next(); !_c.done; _c = _b.next()) {
2102
- var opcao = _c.value;
2103
- if (opcao._selected) {
2104
- val.push(opcao.value);
2120
+ if (!!this.opcoes) {
2121
+ try {
2122
+ for (var _b = __values(this.opcoes), _c = _b.next(); !_c.done; _c = _b.next()) {
2123
+ var opcao = _c.value;
2124
+ if (opcao._selected) {
2125
+ val.push(opcao.value);
2126
+ }
2105
2127
  }
2106
2128
  }
2107
- }
2108
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
2109
- finally {
2110
- try {
2111
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2129
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2130
+ finally {
2131
+ try {
2132
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2133
+ }
2134
+ finally { if (e_2) throw e_2.error; }
2112
2135
  }
2113
- finally { if (e_2) throw e_2.error; }
2114
2136
  }
2115
2137
  return val.length ? val : undefined;
2116
2138
  };
@@ -2483,7 +2505,8 @@
2483
2505
  exports.SelectRadioComponent = SelectRadioComponent;
2484
2506
  exports.SelectRadioModule = SelectRadioModule;
2485
2507
  exports.ɵ0 = ɵ0;
2486
- exports.ɵa = OptionCheckboxService;
2508
+ exports.ɵa = InputDatetimeValidatorDirective;
2509
+ exports.ɵb = OptionCheckboxService;
2487
2510
 
2488
2511
  Object.defineProperty(exports, '__esModule', { value: true });
2489
2512