info-library 2.10.34 → 2.10.37

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.
@@ -12,6 +12,7 @@ import { MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/materia
12
12
  import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateModule } from '@angular/material-moment-adapter';
13
13
  import createAutoCorrectedDatePipe from 'text-mask-addons/dist/createAutoCorrectedDatePipe';
14
14
  import { DomSanitizer } from '@angular/platform-browser';
15
+ import { AngularEditorModule } from '@kolkov/angular-editor';
15
16
  import { ENTER } from '@angular/cdk/keycodes';
16
17
  import { CommonModule } from '@angular/common';
17
18
  import { CurrencyMaskModule } from 'ng2-currency-mask';
@@ -28,7 +29,6 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
28
29
  import { MatProgressBarModule } from '@angular/material/progress-bar';
29
30
  import { MatTooltipModule } from '@angular/material/tooltip';
30
31
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
31
- import { AngularEditorModule } from '@kolkov/angular-editor';
32
32
  import { MatChipsModule } from '@angular/material/chips';
33
33
  import emailMask from 'text-mask-addons/dist/emailMask';
34
34
 
@@ -1300,12 +1300,13 @@ class InfoAuthenticationService {
1300
1300
  /**
1301
1301
  * @param {?} usuario
1302
1302
  * @param {?} senha
1303
+ * @param {?=} reCaptchaToken
1303
1304
  * @return {?}
1304
1305
  */
1305
- login(usuario, senha) {
1306
+ login(usuario, senha, reCaptchaToken = null) {
1306
1307
  this.removeSessao();
1307
1308
  return this._http
1308
- .post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/autenticar', { Usuario: usuario, Senha: senha })
1309
+ .post(this._plataforma.Config.webapiUrl + 'centrocontrole/usuario/autenticar', { Usuario: usuario, Senha: senha, ReCaptchaToken: reCaptchaToken })
1309
1310
  .pipe(map((/**
1310
1311
  * @param {?} r
1311
1312
  * @return {?}
@@ -2153,7 +2154,16 @@ class InfoAutoCompleteComponent {
2153
2154
  * @param {?} a
2154
2155
  * @return {?}
2155
2156
  */
2156
- a => { this.data = a.data; this.loading = false; }));
2157
+ a => {
2158
+ this.data = a.data;
2159
+ this.loading = false;
2160
+ if (this.selectedValue && this.onselecteditem != null)
2161
+ this.onselecteditem.emit(this.data == null ? null : this.data.find((/**
2162
+ * @param {?} r
2163
+ * @return {?}
2164
+ */
2165
+ r => r.Id == this.selectedValue)));
2166
+ }));
2157
2167
  this.control.valueChanges.subscribe((/**
2158
2168
  * @param {?} value
2159
2169
  * @return {?}
@@ -2169,7 +2179,15 @@ class InfoAutoCompleteComponent {
2169
2179
  * @param {?} a
2170
2180
  * @return {?}
2171
2181
  */
2172
- a => this.data = this.options = a.data));
2182
+ a => {
2183
+ this.data = this.options = a.data;
2184
+ if (this.selectedValue && this.onselecteditem != null)
2185
+ this.onselecteditem.emit(this.data == null ? null : this.data.find((/**
2186
+ * @param {?} r
2187
+ * @return {?}
2188
+ */
2189
+ r => r.Id == this.selectedValue)));
2190
+ }));
2173
2191
  }
2174
2192
  }
2175
2193
  /**
@@ -5286,8 +5304,11 @@ class InfoSelectComponent {
5286
5304
  * @return {?}
5287
5305
  */
5288
5306
  r => {
5289
- if (r.success)
5307
+ if (r.success) {
5290
5308
  this.data = r.data;
5309
+ if (this.selectedValue)
5310
+ this.onChangeValue();
5311
+ }
5291
5312
  this.loading = false;
5292
5313
  }));
5293
5314
  }
@@ -5590,6 +5611,10 @@ class InfoEditorComponent {
5590
5611
  * @return {?}
5591
5612
  */
5592
5613
  () => _this.focused = false));
5614
+ document.querySelector(`#${this.id} .angular-editor-textarea`).addEventListener('mouseout', (/**
5615
+ * @return {?}
5616
+ */
5617
+ () => _this.editor.editorToolbar['editorService'].saveSelection()));
5593
5618
  }
5594
5619
  /**
5595
5620
  * @private
@@ -5649,7 +5674,7 @@ class InfoEditorComponent {
5649
5674
  InfoEditorComponent.decorators = [
5650
5675
  { type: Component, args: [{
5651
5676
  selector: 'info-editor',
5652
- template: "<angular-editor [attr.id]=\"id\" [attr.focused]=\"focused\" [(ngModel)]=\"value\" name=\"editor\" [config]=\"editorConfig\" (ngModelChange)=\"onChangeValue()\" [required]=\"required\"></angular-editor>\r\n",
5677
+ template: "<angular-editor [attr.id]=\"id\" [attr.focused]=\"focused\" [(ngModel)]=\"value\" name=\"editor\" [config]=\"editorConfig\" (ngModelChange)=\"onChangeValue()\" [required]=\"required\" #editor></angular-editor>\r\n",
5653
5678
  providers: [{
5654
5679
  provide: NG_VALUE_ACCESSOR,
5655
5680
  useExisting: forwardRef((/**
@@ -5666,6 +5691,7 @@ InfoEditorComponent.ctorParameters = () => [
5666
5691
  { type: DomSanitizer }
5667
5692
  ];
5668
5693
  InfoEditorComponent.propDecorators = {
5694
+ editor: [{ type: ViewChild, args: ['editor',] }],
5669
5695
  required: [{ type: Input }],
5670
5696
  disabled: [{ type: Input }],
5671
5697
  height: [{ type: Input }],
@@ -5675,6 +5701,8 @@ InfoEditorComponent.propDecorators = {
5675
5701
  minwidth: [{ type: Input }]
5676
5702
  };
5677
5703
  if (false) {
5704
+ /** @type {?} */
5705
+ InfoEditorComponent.prototype.editor;
5678
5706
  /** @type {?} */
5679
5707
  InfoEditorComponent.prototype.required;
5680
5708
  /** @type {?} */
@@ -5787,8 +5815,11 @@ class InfoMultiSelectComponent {
5787
5815
  * @return {?}
5788
5816
  */
5789
5817
  r => {
5790
- if (r.success)
5818
+ if (r.success) {
5791
5819
  this.data = r.data;
5820
+ if ((this.selectedValues || []).length > 0)
5821
+ this.onChangeValue();
5822
+ }
5792
5823
  this.loading = false;
5793
5824
  }));
5794
5825
  }