@seniorsistemas/angular-components 17.2.9 → 17.2.11

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.
Files changed (43) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +1698 -1649
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/country-phone-picker/country-phone-picker.component.d.ts +5 -0
  6. package/components/dynamic-form/components/fields/base-field-component.d.ts +2 -1
  7. package/components/dynamic-form/components/fields/country-phone-picker/country-phone-picker-field.component.d.ts +7 -0
  8. package/components/dynamic-form/configurations/field-type.d.ts +1 -0
  9. package/components/dynamic-form/configurations/fields/country-phone-picker-field.d.ts +15 -0
  10. package/components/dynamic-form/configurations/fields/index.d.ts +19 -0
  11. package/esm2015/components/country-phone-picker/country-phone-picker.component.js +13 -2
  12. package/esm2015/components/dynamic-form/components/fields/base-field-component.js +1 -1
  13. package/esm2015/components/dynamic-form/components/fields/country-phone-picker/country-phone-picker-field.component.js +17 -0
  14. package/esm2015/components/dynamic-form/configurations/field-type.js +2 -1
  15. package/esm2015/components/dynamic-form/configurations/fields/country-phone-picker-field.js +11 -0
  16. package/esm2015/components/dynamic-form/configurations/fields/index.js +20 -0
  17. package/esm2015/components/dynamic-form/configurations/form-field.js +4 -1
  18. package/esm2015/components/dynamic-form/dynamic-form.js +7 -4
  19. package/esm2015/components/dynamic-form/dynamic-form.module.js +56 -47
  20. package/esm2015/components/file-upload/file-upload.component.js +2 -7
  21. package/esm2015/components/file-upload/file-upload.module.js +3 -1
  22. package/esm2015/locale/fallback.js +5 -1
  23. package/esm2015/seniorsistemas-angular-components.js +55 -54
  24. package/esm5/components/country-phone-picker/country-phone-picker.component.js +13 -2
  25. package/esm5/components/dynamic-form/components/fields/base-field-component.js +1 -1
  26. package/esm5/components/dynamic-form/components/fields/country-phone-picker/country-phone-picker-field.component.js +20 -0
  27. package/esm5/components/dynamic-form/configurations/field-type.js +2 -1
  28. package/esm5/components/dynamic-form/configurations/fields/country-phone-picker-field.js +16 -0
  29. package/esm5/components/dynamic-form/configurations/fields/index.js +20 -0
  30. package/esm5/components/dynamic-form/configurations/form-field.js +4 -1
  31. package/esm5/components/dynamic-form/dynamic-form.js +7 -4
  32. package/esm5/components/dynamic-form/dynamic-form.module.js +56 -47
  33. package/esm5/components/file-upload/file-upload.component.js +2 -7
  34. package/esm5/components/file-upload/file-upload.module.js +3 -1
  35. package/esm5/locale/fallback.js +5 -1
  36. package/esm5/seniorsistemas-angular-components.js +55 -54
  37. package/fesm2015/seniorsistemas-angular-components.js +1508 -1466
  38. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  39. package/fesm5/seniorsistemas-angular-components.js +1641 -1593
  40. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  41. package/package.json +1 -1
  42. package/seniorsistemas-angular-components.d.ts +54 -53
  43. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -18,7 +18,7 @@ import { Hotkey, HotkeysService, HotkeyModule } from 'angular2-hotkeys';
18
18
  import BigNumber, { BigNumber as BigNumber$1 } from 'bignumber.js';
19
19
  import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
20
20
  import { Dialog, DialogModule } from 'primeng/dialog';
21
- import { Table, TableService, RowToggler, TableModule as TableModule$1 } from 'primeng/table';
21
+ import { Table, RowToggler, TableService, TableModule as TableModule$1 } from 'primeng/table';
22
22
  import { applyMask, AlignmentOptions, CurrencyMaskDirective as CurrencyMaskDirective$1 } from '@seniorsistemas/ng2-currency-mask';
23
23
  import { user, service } from '@seniorsistemas/senior-platform-data';
24
24
  import * as moment_ from 'moment';
@@ -37,10 +37,10 @@ import { MultiSelectModule } from 'primeng/multiselect';
37
37
  import { PanelModule as PanelModule$1 } from 'primeng/panel';
38
38
  import { RadioButtonModule } from 'primeng/radiobutton';
39
39
  import { SliderModule } from 'primeng/slider';
40
+ import { MessageService, ConfirmationService } from 'primeng/api';
40
41
  import { ProgressBarModule as ProgressBarModule$1 } from 'primeng/progressbar';
41
42
  import { DomSanitizer, BrowserModule } from '@angular/platform-browser';
42
43
  import { Clipboard } from '@angular/cdk/clipboard';
43
- import { MessageService, ConfirmationService } from 'primeng/api';
44
44
  import Cropper from 'cropperjs';
45
45
  import * as elementResizeDetectorMaker_ from 'element-resize-detector';
46
46
  import { FocusTrapFactory, A11yModule } from '@angular/cdk/a11y';
@@ -2034,7 +2034,11 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
2034
2034
  this.offsetTop = 0;
2035
2035
  this.ordination = Ordination.NO;
2036
2036
  this.selected = new EventEmitter();
2037
+ /**
2038
+ * @deprecated Use focusLost event instead.
2039
+ */
2037
2040
  this.blur = new EventEmitter();
2041
+ this.focusLost = new EventEmitter();
2038
2042
  this.tabindex = 0;
2039
2043
  this._filterCountries = (value) => {
2040
2044
  if (!value) {
@@ -2160,6 +2164,10 @@ let CountryPhonePickerComponent = CountryPhonePickerComponent_1 = class CountryP
2160
2164
  getPlaceholder() {
2161
2165
  return this.mask.replace(/9/g, "");
2162
2166
  }
2167
+ onBlur(value) {
2168
+ this.blur.emit(value);
2169
+ this.focusLost.emit(value);
2170
+ }
2163
2171
  _getSelectedCountryDefault() {
2164
2172
  if (!this._countriesList.length) {
2165
2173
  throw new Error("No country loaded");
@@ -2242,6 +2250,9 @@ __decorate([
2242
2250
  __decorate([
2243
2251
  Output()
2244
2252
  ], CountryPhonePickerComponent.prototype, "blur", void 0);
2253
+ __decorate([
2254
+ Output()
2255
+ ], CountryPhonePickerComponent.prototype, "focusLost", void 0);
2245
2256
  __decorate([
2246
2257
  ViewChild("phoneInput", { static: true })
2247
2258
  ], CountryPhonePickerComponent.prototype, "phoneInput", void 0);
@@ -2257,7 +2268,7 @@ __decorate([
2257
2268
  CountryPhonePickerComponent = CountryPhonePickerComponent_1 = __decorate([
2258
2269
  Component({
2259
2270
  selector: "s-country-phone-picker",
2260
- template: "<div class=\"country-phone-picker\">\n <div class=\"phone-input\">\n <div class=\"drop\" (click)=\"open = !open\">\n <span class=\"drop-flag\" [ngClass]=\"'fi fi-' + selectedItem.id\">\n </span>\n <span class=\"drop-icon fas fa-caret-down\"></span>\n </div>\n <p class=\"phone-ddi\">{{ selectedItem.ddi }}</p>\n <input\n #phoneInput\n type=\"tel\"\n autofocus\n [mask]=\"mask\" \n [placeholder]=\"getPlaceholder()\"\n [formControl]=\"phone\"\n (focus)=\"onPhoneInputFocus()\" \n (blur)=\"blur.emit(value)\"\n />\n </div>\n <div *ngIf=\"open\" class=\"dropdown\">\n <div class=\"search\">\n <input\n class=\"search-field\"\n type=\"text\"\n [formControl]=\"filter\">\n <span class=\"search-icon fas fa-search\"></span>\n <span\n class=\"search-clear fa fa-times\"\n (click)=\"onCleanFilter()\"></span>\n </div>\n <ul class=\"select-list\">\n <li\n *ngFor=\"let country of filteredCountriesList; let i = index;\"\n class=\"select-option\"\n [ngClass]=\"{ 'select-option--focused': i == currentItemIndex }\"\n (click)=\"onSelectItem(country)\">\n <span\n class=\"select-option__flag\"\n [ngClass]=\"'fi fi-' + country.id\">\n </span>\n <span class=\"select-option__name\">\n {{ \"platform.angular_components.country_name_\" + country.id | translate }}\n </span>\n <span class=\"select-option__ddi\">\n {{ country.ddi }}\n </span>\n </li>\n </ul>\n </div>\n</div>",
2271
+ template: "<div class=\"country-phone-picker\">\n <div class=\"phone-input\">\n <div class=\"drop\" (click)=\"open = !open\">\n <span class=\"drop-flag\" [ngClass]=\"'fi fi-' + selectedItem.id\">\n </span>\n <span class=\"drop-icon fas fa-caret-down\"></span>\n </div>\n <p class=\"phone-ddi\">{{ selectedItem.ddi }}</p>\n <input\n #phoneInput\n type=\"tel\"\n autofocus\n [mask]=\"mask\" \n [placeholder]=\"getPlaceholder()\"\n [formControl]=\"phone\"\n (focus)=\"onPhoneInputFocus()\" \n (blur)=\"onBlur(value)\"\n />\n </div>\n <div *ngIf=\"open\" class=\"dropdown\">\n <div class=\"search\">\n <input\n class=\"search-field\"\n type=\"text\"\n [formControl]=\"filter\">\n <span class=\"search-icon fas fa-search\"></span>\n <span\n class=\"search-clear fa fa-times\"\n (click)=\"onCleanFilter()\"></span>\n </div>\n <ul class=\"select-list\">\n <li\n *ngFor=\"let country of filteredCountriesList; let i = index;\"\n class=\"select-option\"\n [ngClass]=\"{ 'select-option--focused': i == currentItemIndex }\"\n (click)=\"onSelectItem(country)\">\n <span\n class=\"select-option__flag\"\n [ngClass]=\"'fi fi-' + country.id\">\n </span>\n <span class=\"select-option__name\">\n {{ \"platform.angular_components.country_name_\" + country.id | translate }}\n </span>\n <span class=\"select-option__ddi\">\n {{ country.ddi }}\n </span>\n </li>\n </ul>\n </div>\n</div>",
2261
2272
  providers: [{
2262
2273
  provide: NG_VALUE_ACCESSOR,
2263
2274
  useExisting: forwardRef(() => CountryPhonePickerComponent_1),
@@ -2290,6 +2301,7 @@ var FieldType;
2290
2301
  FieldType["Blob"] = "Blob";
2291
2302
  FieldType["Boolean"] = "Boolean";
2292
2303
  FieldType["Chips"] = "Chips";
2304
+ FieldType["CountryPhonePicker"] = "CountryPhonePicker";
2293
2305
  FieldType["Custom"] = "Custom";
2294
2306
  FieldType["Date"] = "Date";
2295
2307
  FieldType["DateTime"] = "DateTime";
@@ -3130,6 +3142,16 @@ class SliderField extends Field {
3130
3142
  }
3131
3143
  }
3132
3144
 
3145
+ class CountryPhonePickerField extends Field {
3146
+ constructor(config) {
3147
+ super(config);
3148
+ this.countries = config.countries;
3149
+ this.ordination = config.ordination;
3150
+ this.onSelected = config.onSelected;
3151
+ this.onFocusLost = config.onFocusLost;
3152
+ }
3153
+ }
3154
+
3133
3155
  class FormField {
3134
3156
  constructor(config) {
3135
3157
  switch (config.type) {
@@ -3167,6 +3189,8 @@ class FormField {
3167
3189
  return new RadioButtonField(config);
3168
3190
  case FieldType.Chips:
3169
3191
  return new ChipsField(config);
3192
+ case FieldType.CountryPhonePicker:
3193
+ return new CountryPhonePickerField(config);
3170
3194
  case FieldType.Blob:
3171
3195
  return new BlobField(config);
3172
3196
  case FieldType.Slider:
@@ -3851,145 +3875,413 @@ DynamicFormComponent = __decorate([
3851
3875
  })
3852
3876
  ], DynamicFormComponent);
3853
3877
 
3854
- var EmptyStateComponent_1;
3855
- let EmptyStateComponent = EmptyStateComponent_1 = class EmptyStateComponent {
3878
+ let IAssistService = class IAssistService {
3879
+ constructor(http, _messageService) {
3880
+ this.http = http;
3881
+ this._messageService = _messageService;
3882
+ }
3883
+ askIA(context, data) {
3884
+ return this.http.post("platform/iassist/api/latest/completions", {
3885
+ "prompt": this._createPrompt(context, data),
3886
+ "provider": "OPEN_AI",
3887
+ "parameters": {
3888
+ "model": "gpt-3.5-turbo",
3889
+ "max_tokens": 700,
3890
+ "temperature": 1
3891
+ }
3892
+ }).pipe(catchError((err) => {
3893
+ this._messageService.add({
3894
+ severity: "error",
3895
+ summary: err.status ? String(err.status) : "Error",
3896
+ detail: (err.error && err.error.message) || err.statusText || err.message || "Error",
3897
+ });
3898
+ return throwError(err);
3899
+ }));
3900
+ }
3901
+ _createPrompt(context, data) {
3902
+ return `Crie um texto genérico para preencher o campo de textarea.
3903
+ ${data.label ? `O campo tem o label ${data.label}.` : ""}
3904
+ ${data.id ? `O campo tem o id ${data.id}.` : ""}
3905
+ ${data.placeholder ? `Considere as instruções/sugestões do placeholder: ${data.placeholder}.` : ""}
3906
+ Baseie-se no contexto informado pelo usuário: '${context}'.
3907
+ O texto deve ser formal e conter informações pertinentes a um campo como este, como se um usuário real tivesse preenchido com as informações necessárias.
3908
+ O texto deve ser neutro com relação a generos, raças, religiões, etc.
3909
+ O texto deve ser impessoal e não deve conter informações pessoais do usuário.
3910
+ Não direcione o texto a ninguém, não use expressões como: caro, atenciosamente. gostaria, agradeço. O texto deve ser genérico.
3911
+
3912
+ Exemplos de texto:
3913
+ Um campo de descrição de usuário: "Usuário com 20 anos, estudante de engenharia, gosta de jogar futebol e assistir filmes."
3914
+ Outro exemplo de descrição de usuário: "Usuário administrador, com acesso total ao sistema, responsável por gerenciar os usuários e os produtos."
3915
+ Um campo de descrição de um produto: "O produto é um celular, com tela de 6 polegadas, 128GB de armazenamento, 4GB de memória RAM, câmera de 12MP e bateria de 4000mAh."
3916
+ Outro exemplo de descrição de produto: "O produto é uma geladeira, com capacidade de 500 litros, 2 portas, cor branca, com freezer e gaveta de legumes."
3917
+ Outro exemplo de descrição de produto: "O produto é uma camiseta, tamanho M, cor azul, 100% algodão, com estampa de um gato."
3918
+
3919
+ Em caso de contexto incompleto crie um texto genérico, como se fosse um exemplo de preenchimento do campo.
3920
+ O texto é para um campo de textarea, então escreva um texto sucinto.
3921
+ Exiba apenas o texto do output`;
3922
+ }
3923
+ };
3924
+ IAssistService.ctorParameters = () => [
3925
+ { type: HttpClient },
3926
+ { type: MessageService }
3927
+ ];
3928
+ IAssistService = __decorate([
3929
+ Injectable()
3930
+ ], IAssistService);
3931
+
3932
+ let LongPressDirective = class LongPressDirective {
3856
3933
  constructor() {
3857
- this.id = `s-empty-state-${EmptyStateComponent_1.nextId++}`;
3858
- this.iconClass = "fa fa-inbox";
3859
- this.showPrimaryAction = true;
3860
- this.showSecondaryAction = true;
3861
- this.primaryModel = [];
3862
- this.primaryAction = new EventEmitter();
3863
- this.secondaryAction = new EventEmitter();
3934
+ this.sLongPressDelay = 500;
3935
+ this.sLongPress = new EventEmitter();
3936
+ this.mouseUp = new Subject();
3937
+ this.mouseDown = new Subject();
3938
+ this.ngUnsubscribe = new Subject();
3939
+ }
3940
+ onMouseUp(event) {
3941
+ this.mouseUp.next(event);
3942
+ }
3943
+ onMouseDown(event) {
3944
+ this.mouseDown.next(event);
3945
+ }
3946
+ ngOnInit() {
3947
+ this.mouseDown
3948
+ .pipe(debounceTime(this.sLongPressDelay), takeUntil(this.mouseUp), repeat(), takeUntil(this.ngUnsubscribe))
3949
+ .subscribe(event => this.sLongPress.emit(event));
3950
+ }
3951
+ ngOnDestroy() {
3952
+ this.ngUnsubscribe.next();
3953
+ this.ngUnsubscribe.complete();
3864
3954
  }
3865
3955
  };
3866
- EmptyStateComponent.nextId = 0;
3867
- __decorate([
3868
- Input()
3869
- ], EmptyStateComponent.prototype, "id", void 0);
3870
- __decorate([
3871
- Input()
3872
- ], EmptyStateComponent.prototype, "iconClass", void 0);
3873
- __decorate([
3874
- Input()
3875
- ], EmptyStateComponent.prototype, "title", void 0);
3876
- __decorate([
3877
- Input()
3878
- ], EmptyStateComponent.prototype, "description", void 0);
3879
- __decorate([
3880
- Input()
3881
- ], EmptyStateComponent.prototype, "showPrimaryAction", void 0);
3882
- __decorate([
3883
- Input()
3884
- ], EmptyStateComponent.prototype, "showSecondaryAction", void 0);
3885
- __decorate([
3886
- Input()
3887
- ], EmptyStateComponent.prototype, "primaryActionLabel", void 0);
3888
3956
  __decorate([
3889
3957
  Input()
3890
- ], EmptyStateComponent.prototype, "secondaryActionLabel", void 0);
3891
- __decorate([
3892
- Input()
3893
- ], EmptyStateComponent.prototype, "primaryModel", void 0);
3958
+ ], LongPressDirective.prototype, "sLongPressDelay", void 0);
3894
3959
  __decorate([
3895
3960
  Output()
3896
- ], EmptyStateComponent.prototype, "primaryAction", void 0);
3961
+ ], LongPressDirective.prototype, "sLongPress", void 0);
3897
3962
  __decorate([
3898
- Output()
3899
- ], EmptyStateComponent.prototype, "secondaryAction", void 0);
3900
- EmptyStateComponent = EmptyStateComponent_1 = __decorate([
3901
- Component({
3902
- selector: `s-empty-state`,
3903
- template: "<div [id]=\"id\" class=\"container\">\n <div [id]=\"id + '-icon'\" class=\"icon\">\n <i [attr.class]=\"iconClass ? iconClass : 'fa fa-cogs'\" aria-hidden=\"true\"></i>\n </div>\n <div [id]=\"id + '-title'\" class=\"title\">{{title}}</div>\n <div [id]=\"id + '-description'\" class=\"description\" *ngIf=\"description\">\n <p>{{description}}</p>\n </div>\n <div [id]=\"id + '-actions'\" class=\"actions\" *ngIf=\"showPrimaryAction && primaryActionLabel\">\n <s-button [id]=\"id + '-primary-action'\" type=\"button\" [label]=\"primaryActionLabel\"\n [model]=\"primaryModel\" (click)=\"primaryAction.next()\"></s-button>\n <s-button [id]=\"id + '-secondary-action'\" *ngIf=\"showSecondaryAction && secondaryActionLabel\" id=\"secondaryAction\" type=\"button\"\n [label]=\"secondaryActionLabel\" priority=\"link\" (click)=\"secondaryAction.next()\"></s-button>\n </div>\n</div>",
3904
- styles: [".container{width:100%;text-align:center}.title{font-weight:700;margin-bottom:10px}.description{margin-bottom:15px;color:#999;padding:0 20px;text-align:center}.description>p{margin:auto;max-width:400px;max-height:80px;overflow:hidden}.icon{color:#d8d8d8;font-size:6em}.actions{text-align:center;width:100%}"]
3963
+ HostListener("mouseup", ["$event"]),
3964
+ HostListener("touchend", ["$event"])
3965
+ ], LongPressDirective.prototype, "onMouseUp", null);
3966
+ __decorate([
3967
+ HostListener("mousedown", ["$event"]),
3968
+ HostListener("touchstart", ["$event"])
3969
+ ], LongPressDirective.prototype, "onMouseDown", null);
3970
+ LongPressDirective = __decorate([
3971
+ Directive({
3972
+ selector: "[sLongPress]",
3905
3973
  })
3906
- ], EmptyStateComponent);
3974
+ ], LongPressDirective);
3907
3975
 
3908
- let EmptyStateGoBackComponent = class EmptyStateGoBackComponent {
3909
- constructor(cookieService) {
3910
- this.cookieService = cookieService;
3911
- this.iconClass = "fa fa-exclamation-triangle";
3976
+ let DoubleClickDirective = class DoubleClickDirective {
3977
+ constructor() {
3978
+ this.onDoubleClick = new EventEmitter();
3979
+ this._timeout = null;
3980
+ this._DOUBLE_CLICK_DELAY = 500;
3912
3981
  }
3913
- goBack() {
3914
- const portalUrl = this.cookieService.get("com.senior.portal.url");
3915
- window.open(portalUrl, "_top");
3982
+ onClick(event) {
3983
+ this.handleOnClickEvent(event);
3984
+ }
3985
+ handleOnClickEvent(event) {
3986
+ if (this._timeout) {
3987
+ this.clearTimeout();
3988
+ this.onDoubleClick.emit(event);
3989
+ }
3990
+ else {
3991
+ this._timeout = setTimeout(() => this.clearTimeout(), this._DOUBLE_CLICK_DELAY);
3992
+ }
3993
+ }
3994
+ clearTimeout() {
3995
+ clearTimeout(this._timeout);
3996
+ this._timeout = null;
3916
3997
  }
3917
3998
  };
3918
- EmptyStateGoBackComponent.nextId = 0;
3919
- EmptyStateGoBackComponent.ctorParameters = () => [
3920
- { type: CookieService }
3921
- ];
3922
- __decorate([
3923
- Input()
3924
- ], EmptyStateGoBackComponent.prototype, "iconClass", void 0);
3925
3999
  __decorate([
3926
- Input()
3927
- ], EmptyStateGoBackComponent.prototype, "title", void 0);
3928
- __decorate([
3929
- Input()
3930
- ], EmptyStateGoBackComponent.prototype, "description", void 0);
4000
+ Output()
4001
+ ], DoubleClickDirective.prototype, "onDoubleClick", void 0);
3931
4002
  __decorate([
3932
- Input()
3933
- ], EmptyStateGoBackComponent.prototype, "primaryActionLabel", void 0);
3934
- EmptyStateGoBackComponent = __decorate([
3935
- Component({
3936
- selector: `s-empty-state-go-back`,
3937
- template: "<s-empty-state \n [iconClass]=\"iconClass\" \n [title]=\"title\" \n [description]=\"description\" \n (primaryAction)=\"goBack()\"\n [primaryActionLabel]=\"primaryActionLabel\">\n</s-empty-state>"
4003
+ HostListener("click", ["$event"])
4004
+ ], DoubleClickDirective.prototype, "onClick", null);
4005
+ DoubleClickDirective = __decorate([
4006
+ Directive({
4007
+ selector: '[sDoubleClick]'
3938
4008
  })
3939
- ], EmptyStateGoBackComponent);
4009
+ ], DoubleClickDirective);
3940
4010
 
3941
- let EmptyStateModule = class EmptyStateModule {
4011
+ let MouseEventsModule = class MouseEventsModule {
3942
4012
  };
3943
- EmptyStateModule = __decorate([
4013
+ MouseEventsModule = __decorate([
3944
4014
  NgModule({
3945
- imports: [CommonModule, ButtonModule],
3946
- providers: [CookieService],
3947
- declarations: [EmptyStateComponent, EmptyStateGoBackComponent],
3948
- exports: [EmptyStateComponent, EmptyStateGoBackComponent],
4015
+ imports: [CommonModule],
4016
+ declarations: [
4017
+ LongPressDirective,
4018
+ DoubleClickDirective
4019
+ ],
4020
+ exports: [
4021
+ LongPressDirective,
4022
+ DoubleClickDirective
4023
+ ],
3949
4024
  })
3950
- ], EmptyStateModule);
3951
-
3952
- /**
3953
- * Formats a JSON response to a JS object
3954
- * @param response The response to format
3955
- * @returns A JS object based on the response's body
3956
- */
3957
- function formatJsonResponse(response) {
3958
- return __awaiter(this, void 0, void 0, function* () {
3959
- return response.json();
3960
- });
3961
- }
3962
-
3963
- /**
3964
- * Formats a Blob response to a JS object
3965
- * @param response The response to format
3966
- * @returns A JS object based on the response's body
3967
- */
3968
- function formatBlobResponse(response) {
3969
- return __awaiter(this, void 0, void 0, function* () {
3970
- const textResponse = yield (yield response.blob()).text();
3971
- return JSON.parse(textResponse);
3972
- });
3973
- }
4025
+ ], MouseEventsModule);
3974
4026
 
3975
- /**
3976
- * Custom HttpClient for cases when is not possible to use the Angular's HttpClient
3977
- */
3978
- class CustomHttpClient {
3979
- /**
3980
- * Executes a Http Get
3981
- * @param url Url to execute the Get on
3982
- * @param init Optional additional configs
3983
- * @returns Whether a Promise<T> on request success or an error in request fail
3984
- */
3985
- static GET(url, init = {}) {
3986
- return __awaiter(this, void 0, void 0, function* () {
3987
- const response = yield this.interceptRequest(url, Object.assign(Object.assign({}, init), { method: "GET" }));
3988
- return this.formatResponse(response);
3989
- });
3990
- }
3991
- /**
3992
- * Executes a Http Post
4027
+ var BignumberInputDirective_1;
4028
+ let BignumberInputDirective = BignumberInputDirective_1 = class BignumberInputDirective extends CurrencyMaskDirective$1 {
4029
+ constructor() {
4030
+ super(...arguments);
4031
+ this.precision = 15;
4032
+ this.scale = 0;
4033
+ this.decimalSeparator = ",";
4034
+ this.alignTo = AlignmentOptions.LEFT;
4035
+ this.allowNegative = true;
4036
+ }
4037
+ ngOnInit() {
4038
+ this.updateVariables();
4039
+ super.ngOnInit();
4040
+ }
4041
+ ngOnChanges(changes) {
4042
+ const placeholderChange = changes.placeholder && changes.placeholder.currentValue;
4043
+ if (!placeholderChange && this.scale) {
4044
+ this.placeholder = `0${this.decimalSeparator}${"".padEnd(this.scale, "0")}`;
4045
+ }
4046
+ if (changes.scale ||
4047
+ changes.decimalSeparator ||
4048
+ changes.thousandsSeparator ||
4049
+ changes.alignTo ||
4050
+ changes.precision ||
4051
+ changes.allowNegative) {
4052
+ this.updateVariables();
4053
+ }
4054
+ }
4055
+ onKeypress(event) {
4056
+ const code = event.code;
4057
+ if (code === "Minus" || code === "NumpadSubtract") {
4058
+ if (this.allowNegative) {
4059
+ this.maxLength = this._maxLength + 1;
4060
+ }
4061
+ }
4062
+ else if (code === "Equal" || code === "NumpadAdd") {
4063
+ this.maxLength = this._maxLength;
4064
+ }
4065
+ }
4066
+ /**
4067
+ * Update the options values according to the directive input values.
4068
+ */
4069
+ updateVariables() {
4070
+ var _a;
4071
+ this.options = {
4072
+ align: this.alignTo,
4073
+ decimalSeparator: this.decimalSeparator,
4074
+ thousandsSeparator: (_a = this.thousandsSeparator) !== null && _a !== void 0 ? _a : ".",
4075
+ scale: this.scale || 0,
4076
+ prefix: "",
4077
+ suffix: "",
4078
+ allowNegative: this.allowNegative
4079
+ };
4080
+ this.calculateMaxLength();
4081
+ }
4082
+ /**
4083
+ * Responsible to calculate the field maximum length considering the separators.
4084
+ */
4085
+ calculateMaxLength() {
4086
+ var _a, _b;
4087
+ const decSepLength = this.decimalSeparator.length;
4088
+ const thoSepLength = (_b = (_a = this.thousandsSeparator) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 1;
4089
+ let maxLength = this.precision + (this.scale ? decSepLength : 0);
4090
+ maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
4091
+ this._maxLength = maxLength;
4092
+ this.maxLength = maxLength;
4093
+ }
4094
+ };
4095
+ __decorate([
4096
+ Input()
4097
+ ], BignumberInputDirective.prototype, "precision", void 0);
4098
+ __decorate([
4099
+ Input()
4100
+ ], BignumberInputDirective.prototype, "scale", void 0);
4101
+ __decorate([
4102
+ Input()
4103
+ ], BignumberInputDirective.prototype, "decimalSeparator", void 0);
4104
+ __decorate([
4105
+ Input()
4106
+ ], BignumberInputDirective.prototype, "thousandsSeparator", void 0);
4107
+ __decorate([
4108
+ Input()
4109
+ ], BignumberInputDirective.prototype, "alignTo", void 0);
4110
+ __decorate([
4111
+ Input()
4112
+ ], BignumberInputDirective.prototype, "allowNegative", void 0);
4113
+ __decorate([
4114
+ Input(),
4115
+ HostBinding("attr.placeholder")
4116
+ ], BignumberInputDirective.prototype, "placeholder", void 0);
4117
+ __decorate([
4118
+ HostBinding("attr.maxLength")
4119
+ ], BignumberInputDirective.prototype, "maxLength", void 0);
4120
+ __decorate([
4121
+ HostListener("keypress", ["$event"])
4122
+ ], BignumberInputDirective.prototype, "onKeypress", null);
4123
+ BignumberInputDirective = BignumberInputDirective_1 = __decorate([
4124
+ Directive({
4125
+ selector: "input[sBignumberInput]",
4126
+ providers: [
4127
+ {
4128
+ provide: NG_VALUE_ACCESSOR,
4129
+ useExisting: forwardRef(() => BignumberInputDirective_1),
4130
+ multi: true,
4131
+ },
4132
+ ],
4133
+ })
4134
+ ], BignumberInputDirective);
4135
+
4136
+ let BignumberInputModule = class BignumberInputModule {
4137
+ };
4138
+ BignumberInputModule = __decorate([
4139
+ NgModule({
4140
+ imports: [CommonModule],
4141
+ declarations: [BignumberInputDirective],
4142
+ exports: [BignumberInputDirective],
4143
+ })
4144
+ ], BignumberInputModule);
4145
+
4146
+ var EmptyStateComponent_1;
4147
+ let EmptyStateComponent = EmptyStateComponent_1 = class EmptyStateComponent {
4148
+ constructor() {
4149
+ this.id = `s-empty-state-${EmptyStateComponent_1.nextId++}`;
4150
+ this.iconClass = "fa fa-inbox";
4151
+ this.showPrimaryAction = true;
4152
+ this.showSecondaryAction = true;
4153
+ this.primaryModel = [];
4154
+ this.primaryAction = new EventEmitter();
4155
+ this.secondaryAction = new EventEmitter();
4156
+ }
4157
+ };
4158
+ EmptyStateComponent.nextId = 0;
4159
+ __decorate([
4160
+ Input()
4161
+ ], EmptyStateComponent.prototype, "id", void 0);
4162
+ __decorate([
4163
+ Input()
4164
+ ], EmptyStateComponent.prototype, "iconClass", void 0);
4165
+ __decorate([
4166
+ Input()
4167
+ ], EmptyStateComponent.prototype, "title", void 0);
4168
+ __decorate([
4169
+ Input()
4170
+ ], EmptyStateComponent.prototype, "description", void 0);
4171
+ __decorate([
4172
+ Input()
4173
+ ], EmptyStateComponent.prototype, "showPrimaryAction", void 0);
4174
+ __decorate([
4175
+ Input()
4176
+ ], EmptyStateComponent.prototype, "showSecondaryAction", void 0);
4177
+ __decorate([
4178
+ Input()
4179
+ ], EmptyStateComponent.prototype, "primaryActionLabel", void 0);
4180
+ __decorate([
4181
+ Input()
4182
+ ], EmptyStateComponent.prototype, "secondaryActionLabel", void 0);
4183
+ __decorate([
4184
+ Input()
4185
+ ], EmptyStateComponent.prototype, "primaryModel", void 0);
4186
+ __decorate([
4187
+ Output()
4188
+ ], EmptyStateComponent.prototype, "primaryAction", void 0);
4189
+ __decorate([
4190
+ Output()
4191
+ ], EmptyStateComponent.prototype, "secondaryAction", void 0);
4192
+ EmptyStateComponent = EmptyStateComponent_1 = __decorate([
4193
+ Component({
4194
+ selector: `s-empty-state`,
4195
+ template: "<div [id]=\"id\" class=\"container\">\n <div [id]=\"id + '-icon'\" class=\"icon\">\n <i [attr.class]=\"iconClass ? iconClass : 'fa fa-cogs'\" aria-hidden=\"true\"></i>\n </div>\n <div [id]=\"id + '-title'\" class=\"title\">{{title}}</div>\n <div [id]=\"id + '-description'\" class=\"description\" *ngIf=\"description\">\n <p>{{description}}</p>\n </div>\n <div [id]=\"id + '-actions'\" class=\"actions\" *ngIf=\"showPrimaryAction && primaryActionLabel\">\n <s-button [id]=\"id + '-primary-action'\" type=\"button\" [label]=\"primaryActionLabel\"\n [model]=\"primaryModel\" (click)=\"primaryAction.next()\"></s-button>\n <s-button [id]=\"id + '-secondary-action'\" *ngIf=\"showSecondaryAction && secondaryActionLabel\" id=\"secondaryAction\" type=\"button\"\n [label]=\"secondaryActionLabel\" priority=\"link\" (click)=\"secondaryAction.next()\"></s-button>\n </div>\n</div>",
4196
+ styles: [".container{width:100%;text-align:center}.title{font-weight:700;margin-bottom:10px}.description{margin-bottom:15px;color:#999;padding:0 20px;text-align:center}.description>p{margin:auto;max-width:400px;max-height:80px;overflow:hidden}.icon{color:#d8d8d8;font-size:6em}.actions{text-align:center;width:100%}"]
4197
+ })
4198
+ ], EmptyStateComponent);
4199
+
4200
+ let EmptyStateGoBackComponent = class EmptyStateGoBackComponent {
4201
+ constructor(cookieService) {
4202
+ this.cookieService = cookieService;
4203
+ this.iconClass = "fa fa-exclamation-triangle";
4204
+ }
4205
+ goBack() {
4206
+ const portalUrl = this.cookieService.get("com.senior.portal.url");
4207
+ window.open(portalUrl, "_top");
4208
+ }
4209
+ };
4210
+ EmptyStateGoBackComponent.nextId = 0;
4211
+ EmptyStateGoBackComponent.ctorParameters = () => [
4212
+ { type: CookieService }
4213
+ ];
4214
+ __decorate([
4215
+ Input()
4216
+ ], EmptyStateGoBackComponent.prototype, "iconClass", void 0);
4217
+ __decorate([
4218
+ Input()
4219
+ ], EmptyStateGoBackComponent.prototype, "title", void 0);
4220
+ __decorate([
4221
+ Input()
4222
+ ], EmptyStateGoBackComponent.prototype, "description", void 0);
4223
+ __decorate([
4224
+ Input()
4225
+ ], EmptyStateGoBackComponent.prototype, "primaryActionLabel", void 0);
4226
+ EmptyStateGoBackComponent = __decorate([
4227
+ Component({
4228
+ selector: `s-empty-state-go-back`,
4229
+ template: "<s-empty-state \n [iconClass]=\"iconClass\" \n [title]=\"title\" \n [description]=\"description\" \n (primaryAction)=\"goBack()\"\n [primaryActionLabel]=\"primaryActionLabel\">\n</s-empty-state>"
4230
+ })
4231
+ ], EmptyStateGoBackComponent);
4232
+
4233
+ let EmptyStateModule = class EmptyStateModule {
4234
+ };
4235
+ EmptyStateModule = __decorate([
4236
+ NgModule({
4237
+ imports: [CommonModule, ButtonModule],
4238
+ providers: [CookieService],
4239
+ declarations: [EmptyStateComponent, EmptyStateGoBackComponent],
4240
+ exports: [EmptyStateComponent, EmptyStateGoBackComponent],
4241
+ })
4242
+ ], EmptyStateModule);
4243
+
4244
+ /**
4245
+ * Formats a JSON response to a JS object
4246
+ * @param response The response to format
4247
+ * @returns A JS object based on the response's body
4248
+ */
4249
+ function formatJsonResponse(response) {
4250
+ return __awaiter(this, void 0, void 0, function* () {
4251
+ return response.json();
4252
+ });
4253
+ }
4254
+
4255
+ /**
4256
+ * Formats a Blob response to a JS object
4257
+ * @param response The response to format
4258
+ * @returns A JS object based on the response's body
4259
+ */
4260
+ function formatBlobResponse(response) {
4261
+ return __awaiter(this, void 0, void 0, function* () {
4262
+ const textResponse = yield (yield response.blob()).text();
4263
+ return JSON.parse(textResponse);
4264
+ });
4265
+ }
4266
+
4267
+ /**
4268
+ * Custom HttpClient for cases when is not possible to use the Angular's HttpClient
4269
+ */
4270
+ class CustomHttpClient {
4271
+ /**
4272
+ * Executes a Http Get
4273
+ * @param url Url to execute the Get on
4274
+ * @param init Optional additional configs
4275
+ * @returns Whether a Promise<T> on request success or an error in request fail
4276
+ */
4277
+ static GET(url, init = {}) {
4278
+ return __awaiter(this, void 0, void 0, function* () {
4279
+ const response = yield this.interceptRequest(url, Object.assign(Object.assign({}, init), { method: "GET" }));
4280
+ return this.formatResponse(response);
4281
+ });
4282
+ }
4283
+ /**
4284
+ * Executes a Http Post
3993
4285
  * @param url Url to execute the Post on
3994
4286
  * @param body Info to send to server on Post
3995
4287
  * @param init Optional additional configs
@@ -4274,12 +4566,7 @@ let FileUploadComponent = FileUploadComponent_1 = class FileUploadComponent {
4274
4566
  this.READ_PERMISSION = FileUploadPermissions.Read;
4275
4567
  this.REMOVE_PERMISSION = FileUploadPermissions.Remove;
4276
4568
  this.id = `s-file-upload-${FileUploadComponent_1.nextId++}`;
4277
- this.chooseLabel = "Anexar arquivos";
4278
- this.removeLabel = "Remover";
4279
- this.cancelLabel = "Cancelar";
4280
- this.successTooltip = "Arquivo anexado com sucesso";
4281
4569
  this.supportedExtensions = [];
4282
- this.ariaLabelProgress = "Carregando arquivo";
4283
4570
  this.disabled = false;
4284
4571
  this.showFileUploadDate = false;
4285
4572
  this.permissions = ALL_PERMISSIONS;
@@ -4518,7 +4805,7 @@ __decorate([
4518
4805
  FileUploadComponent = FileUploadComponent_1 = __decorate([
4519
4806
  Component({
4520
4807
  selector: "s-file-upload",
4521
- template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip\"\n [pTooltip]=\"successTooltip\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{cancelLabel}}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel\">\n {{removeLabel}}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
4808
+ template: "<div\n [id]=\"id\"\n class=\"s-fileupload\">\n <div class=\"s-fileupload-choose\">\n <input\n #inputUpload\n [id]=\"id+'input-upload'\"\n type=\"file\"\n name=\"file\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileSelect($event.dataTransfer\n ? $event.dataTransfer.files\n : $event.target.files)\"> \n <s-button\n *ngIf=\"permissions.includes(ADD_PERMISSION)\"\n [id]=\"id + 'upload-button'\"\n [label]=\"chooseLabel || 'platform.angular_components.attach_files' | translate\"\n (onClick)=\"inputUpload.click()\"\n priority=\"primary\"\n [disabled]=\"disabled || !!formGroup?.disabled\"\n [auxiliary]=\"false\">\n </s-button>\n </div>\n\n <section\n *ngIf=\"files.length\" \n [id]=\"id + 'fileupload-list'\"\n class=\"s-fileupload-list\"\n role=\"grid\">\n <ng-container *ngFor=\"let file of files; let i = index\">\n <div\n class=\"s-fileupload-list-file\"\n role=\"row\">\n <div\n [id]=\"id + '-file-' + i + '-name'\"\n class=\"s-fileupload-list-file-name\"\n role=\"gridcell\">\n <ng-container *ngTemplateOutlet=\"permissions.includes(READ_PERMISSION) && file.savedFile || file.progress === 100\n ? descriptionUrl\n : description; context: {\n $implicit: file,\n index: i\n }\">\n </ng-container>\n <span *ngIf=\"modifiedDate\" class=\"s-fileupload-list-file-name-date\">{{ modifiedDate }}</span>\n </div>\n <div\n class=\"s-fileupload-list-file-status\"\n role=\"gridcell\">\n <p-progressBar\n *ngIf=\"file.isUploading && !isSmallDevice\"\n [style]=\"{ 'width': '250px', 'background-color': '#d8d8d8', 'border-radius': '0px', 'height': '14px'}\"\n [value]=\"file.progress\"\n [showValue]=\"false\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </p-progressBar>\n <span\n *ngIf=\"file.isUploading && isSmallDevice\" \n [id]=\"id + '-file-' + i + '-spin'\"\n class=\"fas fa-circle-notch fa-spin\"\n [attr.aria-label]=\"ariaLabelProgress || 'platform.angular_components.loading_file' | translate\">\n </span>\n <span\n *ngIf=\"!file.isUploading && !file.error && file.progress === 100\"\n [id]=\"id + '-file-' + i + '-check'\"\n class=\"fas fa-check\"\n role=\"alert\"\n [attr.aria-label]=\"ariaLabelSuccess || successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n [pTooltip]=\"successTooltip || 'platform.angular_components.file_attached_successfully' | translate\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n <span\n *ngIf=\"file.error?.message\" \n [id]=\"id + '-file-' + i + '-error'\"\n class=\"fas fa-times\"\n role=\"alert\"\n [pTooltip]=\"file.error?.message\"\n tooltipPosition=\"top\"\n showDelay=\"500\"\n [appendTo]=\"'body'\">\n </span>\n </div>\n <div\n class=\"s-fileupload-list-file-actions\"\n role=\"gridcell\">\n <a\n *ngIf=\"file.isUploading\"\n [id]=\"id + '-file-' + i + '-cancel'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onCancelUpload(i)\">\n {{ cancelLabel || 'platform.angular_components.cancel' | translate }}\n </a>\n <a\n *ngIf=\"permissions.includes(REMOVE_PERMISSION) && !file.isUploading && !(disabled || !!formGroup?.disabled)\"\n role=\"button\"\n tabindex=\"0\"\n [id]=\"id + '-file-' + i + '-remove'\"\n class=\"s-fileupload-list-file-actions-action\"\n (click)=\"onRemoveFile(file)\"\n [attr.aria-label]=\"ariaLabelRemove || removeLabel || 'platform.angular_components.remove' | translate\">\n {{ removeLabel || 'platform.angular_components.remove' | translate }}\n </a>\n </div>\n </div>\n </ng-container>\n </section>\n</div>\n\n<ng-template\n #descriptionUrl\n let-file\n let-i = index>\n <a\n [id]=\"id + '-file-' + i + '-name-link'\"\n tabindex=\"0\"\n (click)=\"onDowloadFile(i)\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">{{file.name}}\n </a>\n <a\n style=\"display: none;\"\n [href]=\"file.objectURL\"\n target=\"_blank\"\n download\n #anchor>\n </a>\n</ng-template>\n\n<ng-template\n #description\n let-file>\n <span\n tabindex=\"0\"\n [attr.aria-label]=\"ariaLabelFileName || file.name\">\n {{file.name}}\n </span>\n</ng-template>\n",
4522
4809
  styles: [".s-fileupload .s-fileupload-choose{position:relative;margin:15px 0;width:-webkit-max-content;width:max-content}.s-fileupload input[type=file]{display:none}.s-fileupload-list{border:1px solid #ccc}.s-fileupload-list-file:not(:first-child){border-top:1px solid #ccc}.s-fileupload-list .s-fileupload-list-file{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;padding:15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-item-align:center;align-self:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name .s-fileupload-list-file-name-date{font-size:.75rem;color:#999}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name>a{cursor:pointer;text-decoration:none}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.s-fileupload-list .s-fileupload-list-file .fas.fa-circle-notch{color:#d8d8d8;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-check{color:#0c9348;font-size:12px}.s-fileupload-list .s-fileupload-list-file .fas.fa-times{color:#c13018;font-size:12px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin-top:15px;-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;width:100%}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action{text-decoration:none;color:#428bca}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :focus,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action :visited,.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions a.s-fileupload-list-file-actions-action:hover{text-decoration:none}@media (min-width:768px){.s-fileupload-list .s-fileupload-list-file{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-name{width:auto;-ms-flex-positive:2;flex-grow:2}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-status{margin:0 15px}.s-fileupload-list .s-fileupload-list-file .s-fileupload-list-file-actions{margin:0;width:auto}}"]
4523
4810
  })
4524
4811
  ], FileUploadComponent);
@@ -4533,6 +4820,7 @@ FileUploadModule = __decorate([
4533
4820
  ButtonModule,
4534
4821
  TooltipModule$1,
4535
4822
  ProgressBarModule$1,
4823
+ TranslateModule,
4536
4824
  ],
4537
4825
  providers: [FileUploadService],
4538
4826
  exports: [FileUploadComponent],
@@ -4863,269 +5151,315 @@ MaskFormatterModule = __decorate([
4863
5151
  })
4864
5152
  ], MaskFormatterModule);
4865
5153
 
4866
- var BignumberInputDirective_1;
4867
- let BignumberInputDirective = BignumberInputDirective_1 = class BignumberInputDirective extends CurrencyMaskDirective$1 {
5154
+ var PasswordStrengths;
5155
+ (function (PasswordStrengths) {
5156
+ PasswordStrengths["VeryWeak"] = "Very_weak";
5157
+ PasswordStrengths["Weak"] = "weak";
5158
+ PasswordStrengths["Medium"] = "medium";
5159
+ PasswordStrengths["Strong"] = "strong";
5160
+ })(PasswordStrengths || (PasswordStrengths = {}));
5161
+
5162
+ var PasswordStrengthPositions;
5163
+ (function (PasswordStrengthPositions) {
5164
+ PasswordStrengthPositions["Top"] = "top";
5165
+ PasswordStrengthPositions["Right"] = "right";
5166
+ PasswordStrengthPositions["Left"] = "left";
5167
+ })(PasswordStrengthPositions || (PasswordStrengthPositions = {}));
5168
+
5169
+ let PasswordStrengthComponent = class PasswordStrengthComponent {
4868
5170
  constructor() {
4869
- super(...arguments);
4870
- this.precision = 15;
4871
- this.scale = 0;
4872
- this.decimalSeparator = ",";
4873
- this.alignTo = AlignmentOptions.LEFT;
4874
- this.allowNegative = true;
5171
+ this.weakTitle = "Fraca";
5172
+ this.mediumTitle = "Médio";
5173
+ this.strongTitle = "Forte";
5174
+ this.position = PasswordStrengthPositions.Right;
5175
+ this.left = 0;
5176
+ this.top = 0;
5177
+ this.visible = false;
4875
5178
  }
4876
5179
  ngOnInit() {
4877
- this.updateVariables();
4878
- super.ngOnInit();
4879
- }
4880
- ngOnChanges(changes) {
4881
- const placeholderChange = changes.placeholder && changes.placeholder.currentValue;
4882
- if (!placeholderChange && this.scale) {
4883
- this.placeholder = `0${this.decimalSeparator}${"".padEnd(this.scale, "0")}`;
4884
- }
4885
- if (changes.scale ||
4886
- changes.decimalSeparator ||
4887
- changes.thousandsSeparator ||
4888
- changes.alignTo ||
4889
- changes.precision ||
4890
- changes.allowNegative) {
4891
- this.updateVariables();
4892
- }
5180
+ this.title = this.weakTitle;
4893
5181
  }
4894
- onKeypress(event) {
4895
- const code = event.code;
4896
- if (code === "Minus" || code === "NumpadSubtract") {
4897
- if (this.allowNegative) {
4898
- this.maxLength = this._maxLength + 1;
4899
- }
4900
- }
4901
- else if (code === "Equal" || code === "NumpadAdd") {
4902
- this.maxLength = this._maxLength;
5182
+ setPasswordStrengthPosition() {
5183
+ const passwordStrength = document.querySelector(".password-strength");
5184
+ switch (this.position) {
5185
+ case PasswordStrengthPositions.Top:
5186
+ passwordStrength.classList.add("password-strength--top");
5187
+ break;
5188
+ case PasswordStrengthPositions.Right:
5189
+ passwordStrength.classList.add("password-strength--right");
5190
+ break;
5191
+ case PasswordStrengthPositions.Left:
5192
+ passwordStrength.classList.add("password-strength--left");
5193
+ break;
4903
5194
  }
4904
5195
  }
4905
- /**
4906
- * Update the options values according to the directive input values.
4907
- */
4908
- updateVariables() {
4909
- var _a;
4910
- this.options = {
4911
- align: this.alignTo,
4912
- decimalSeparator: this.decimalSeparator,
4913
- thousandsSeparator: (_a = this.thousandsSeparator) !== null && _a !== void 0 ? _a : ".",
4914
- scale: this.scale || 0,
4915
- prefix: "",
4916
- suffix: "",
4917
- allowNegative: this.allowNegative
4918
- };
4919
- this.calculateMaxLength();
4920
- }
4921
- /**
4922
- * Responsible to calculate the field maximum length considering the separators.
4923
- */
4924
- calculateMaxLength() {
4925
- var _a, _b;
4926
- const decSepLength = this.decimalSeparator.length;
4927
- const thoSepLength = (_b = (_a = this.thousandsSeparator) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 1;
4928
- let maxLength = this.precision + (this.scale ? decSepLength : 0);
4929
- maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
4930
- this._maxLength = maxLength;
4931
- this.maxLength = maxLength;
5196
+ updateIndicators(passwordStrength) {
5197
+ const strengthIndicator1 = document.querySelector("#strength-indicator-1");
5198
+ const strengthIndicator2 = document.querySelector("#strength-indicator-2");
5199
+ const strengthIndicator3 = document.querySelector("#strength-indicator-3");
5200
+ const onIndicators = [];
5201
+ const indicators = [
5202
+ strengthIndicator1,
5203
+ strengthIndicator2,
5204
+ strengthIndicator3,
5205
+ ];
5206
+ let strengthClass;
5207
+ switch (passwordStrength) {
5208
+ case PasswordStrengths.VeryWeak:
5209
+ this.title = this.weakTitle;
5210
+ break;
5211
+ case PasswordStrengths.Weak:
5212
+ this.title = this.weakTitle;
5213
+ strengthClass = "strength-indicator--weak";
5214
+ onIndicators.push(strengthIndicator1);
5215
+ break;
5216
+ case PasswordStrengths.Medium:
5217
+ this.title = this.mediumTitle;
5218
+ strengthClass = "strength-indicator--medium";
5219
+ onIndicators.push(strengthIndicator1);
5220
+ onIndicators.push(strengthIndicator2);
5221
+ break;
5222
+ case PasswordStrengths.Strong:
5223
+ this.title = this.strongTitle;
5224
+ strengthClass = "strength-indicator--strong";
5225
+ onIndicators.push(strengthIndicator1);
5226
+ onIndicators.push(strengthIndicator2);
5227
+ onIndicators.push(strengthIndicator3);
5228
+ break;
5229
+ }
5230
+ indicators.forEach(indicator => {
5231
+ indicator.classList.remove("strength-indicator--weak", "strength-indicator--medium", "strength-indicator--strong");
5232
+ });
5233
+ onIndicators.forEach(indicator => {
5234
+ indicator.classList.add(strengthClass);
5235
+ });
4932
5236
  }
4933
5237
  };
4934
5238
  __decorate([
4935
5239
  Input()
4936
- ], BignumberInputDirective.prototype, "precision", void 0);
4937
- __decorate([
4938
- Input()
4939
- ], BignumberInputDirective.prototype, "scale", void 0);
4940
- __decorate([
4941
- Input()
4942
- ], BignumberInputDirective.prototype, "decimalSeparator", void 0);
5240
+ ], PasswordStrengthComponent.prototype, "weakTitle", void 0);
4943
5241
  __decorate([
4944
5242
  Input()
4945
- ], BignumberInputDirective.prototype, "thousandsSeparator", void 0);
5243
+ ], PasswordStrengthComponent.prototype, "mediumTitle", void 0);
4946
5244
  __decorate([
4947
5245
  Input()
4948
- ], BignumberInputDirective.prototype, "alignTo", void 0);
5246
+ ], PasswordStrengthComponent.prototype, "strongTitle", void 0);
4949
5247
  __decorate([
4950
5248
  Input()
4951
- ], BignumberInputDirective.prototype, "allowNegative", void 0);
4952
- __decorate([
4953
- Input(),
4954
- HostBinding("attr.placeholder")
4955
- ], BignumberInputDirective.prototype, "placeholder", void 0);
4956
- __decorate([
4957
- HostBinding("attr.maxLength")
4958
- ], BignumberInputDirective.prototype, "maxLength", void 0);
4959
- __decorate([
4960
- HostListener("keypress", ["$event"])
4961
- ], BignumberInputDirective.prototype, "onKeypress", null);
4962
- BignumberInputDirective = BignumberInputDirective_1 = __decorate([
4963
- Directive({
4964
- selector: "input[sBignumberInput]",
4965
- providers: [
4966
- {
4967
- provide: NG_VALUE_ACCESSOR,
4968
- useExisting: forwardRef(() => BignumberInputDirective_1),
4969
- multi: true,
4970
- },
4971
- ],
4972
- })
4973
- ], BignumberInputDirective);
4974
-
4975
- let BignumberInputModule = class BignumberInputModule {
4976
- };
4977
- BignumberInputModule = __decorate([
4978
- NgModule({
4979
- imports: [CommonModule],
4980
- declarations: [BignumberInputDirective],
4981
- exports: [BignumberInputDirective],
5249
+ ], PasswordStrengthComponent.prototype, "description", void 0);
5250
+ PasswordStrengthComponent = __decorate([
5251
+ Component({
5252
+ template: "<div\n class=\"password-strength\"\n [ngStyle]=\"{\n 'left': left + 'px',\n 'top': top + 'px'\n }\"\n [ngClass]=\"['password-strength--' + position]\">\n <span class=\"title\">{{ title }}</span>\n <div class=\"strength-indicators\">\n <span class=\"strength-indicator\" id=\"strength-indicator-1\"></span>\n <span class=\"strength-indicator\" id=\"strength-indicator-2\"></span>\n <span class=\"strength-indicator\" id=\"strength-indicator-3\"></span>\n </div>\n <span class=\"content\">{{ description }}</span>\n</div>",
5253
+ styles: [".password-strength{position:fixed;transform:translateX(-50%);background-color:#fff;border-radius:2px;box-shadow:0 0 5px 1px #ccc;padding:10px;width:232px;z-index:99999}.password-strength::after{content:\"\";position:absolute}.password-strength .title{font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:700;line-height:150%}.password-strength .strength-indicators{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:10px 0}.password-strength .strength-indicators .strength-indicator{background-color:#ccc;border-radius:2px;display:inline-block;height:3px;width:64px}.password-strength .strength-indicators .strength-indicator--weak{background-color:#c13018}.password-strength .strength-indicators .strength-indicator--medium{background-color:#fcbf10}.password-strength .strength-indicators .strength-indicator--strong{background-color:#0c9348}.password-strength .content{font-family:\"Open Sans\",sans-serif;font-size:12px;font-weight:400;line-height:150%}.password-strength--top{transform:translate(-50%,-100%)}.password-strength--top::after{top:100%;right:calc(50% - 4px);border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}.password-strength--right{transform:translateY(-50%)}.password-strength--right::after{bottom:calc(50% - 8px);left:-8px;border-top:8px solid transparent;border-right:8px solid #fff;border-bottom:8px solid transparent}.password-strength--left{transform:translate(-100%,-50%)}.password-strength--left::after{bottom:calc(50% - 8px);right:-8px;border-top:8px solid transparent;border-left:8px solid #fff;border-bottom:8px solid transparent}"]
4982
5254
  })
4983
- ], BignumberInputModule);
5255
+ ], PasswordStrengthComponent);
4984
5256
 
4985
- var TableHeaderCheckboxComponent_1;
4986
- let TableHeaderCheckboxComponent = TableHeaderCheckboxComponent_1 = class TableHeaderCheckboxComponent {
4987
- constructor(table, tableService) {
4988
- this.table = table;
4989
- this.tableService = tableService;
4990
- this.id = `s-table-header-checkbox-${TableHeaderCheckboxComponent_1.nextId++}`;
4991
- this.ngUnsubscribe = new Subject();
4992
- this.table.tableService.valueSource$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
4993
- this.checked = this.updateCheckedState();
4994
- });
4995
- this.table.tableService.selectionSource$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
4996
- this.checked = this.updateCheckedState();
4997
- });
5257
+ let PasswordStrengthDirective = class PasswordStrengthDirective {
5258
+ constructor(elementRef, appRef, componentFactoryResolver, injector) {
5259
+ this.elementRef = elementRef;
5260
+ this.appRef = appRef;
5261
+ this.componentFactoryResolver = componentFactoryResolver;
5262
+ this.injector = injector;
5263
+ this.enabled = true;
5264
+ this.position = PasswordStrengthPositions.Right;
5265
+ this.componentRef = null;
4998
5266
  }
4999
5267
  ngOnInit() {
5000
- this.checked = this.updateCheckedState();
5001
- }
5002
- ngOnDestroy() {
5003
- this.ngUnsubscribe.next();
5268
+ this.validateProperties();
5004
5269
  }
5005
5270
  onFocus() {
5006
- this.hasFocus = true;
5271
+ var _a, _b, _c;
5272
+ const content = (_a = this.elementRef.nativeElement.value) !== null && _a !== void 0 ? _a : "";
5273
+ if (content) {
5274
+ this.createPasswordStrength();
5275
+ (_b = this.componentRef) === null || _b === void 0 ? void 0 : _b.instance.updateIndicators(this.validation(content));
5276
+ }
5277
+ else {
5278
+ (_c = this.componentRef) === null || _c === void 0 ? void 0 : _c.instance.updateIndicators(PasswordStrengths.VeryWeak);
5279
+ }
5007
5280
  }
5008
5281
  onBlur() {
5009
- this.hasFocus = false;
5010
- }
5011
- isDisabled() {
5012
- return this.disabled || !this.table.value || !this.table.value.length;
5282
+ this.destroyPasswordStrength();
5013
5283
  }
5014
- onClick() {
5015
- if (!this.disabled) {
5016
- if (this.table.value && this.table.value.length > 0)
5017
- this.onToggleCheckbox(!this.checked);
5284
+ createPasswordStrength() {
5285
+ if (this.enabled && this.componentRef === null) {
5286
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(PasswordStrengthComponent);
5287
+ this.componentRef = componentFactory.create(this.injector);
5288
+ this.appRef.attachView(this.componentRef.hostView);
5289
+ const domElem = this.componentRef.hostView.rootNodes[0];
5290
+ document.body.appendChild(domElem);
5291
+ this.setPasswordStrengthComponentProperties();
5292
+ this.showPasswordStrength();
5018
5293
  }
5019
5294
  }
5020
- updateCheckedState() {
5021
- if (this.table.filteredValue) {
5022
- const val = this.table.filteredValue;
5023
- return val && val.length > 0 && this.table.selection && this.table.selection.length > 0 && this.isAllFilteredValuesChecked();
5295
+ showPasswordStrength() {
5296
+ if (this.componentRef !== null) {
5297
+ this.componentRef.instance.visible = true;
5024
5298
  }
5025
- else {
5026
- const val = this.table.value;
5027
- return val && val.length > 0 && this.table.selection && this.table.selection.length > 0 && this.isAllValuesChecked();
5299
+ }
5300
+ setPasswordStrengthComponentProperties() {
5301
+ if (this.componentRef != null) {
5302
+ this.componentRef.instance.position = this.position;
5303
+ this.componentRef.instance.weakTitle = this.weakTitle;
5304
+ this.componentRef.instance.mediumTitle = this.mediumTitle;
5305
+ this.componentRef.instance.strongTitle = this.strongTitle;
5306
+ this.componentRef.instance.description = this.description;
5307
+ const { top, right, bottom, left } = this.elementRef.nativeElement.getBoundingClientRect();
5308
+ const margin = 20;
5309
+ const elementRefHeight = bottom - top;
5310
+ const elementRefWidth = right - left;
5311
+ const safeSpace = 150;
5312
+ let positioned = false;
5313
+ const invalidOptions = [];
5314
+ while (!positioned) {
5315
+ if (invalidOptions.includes(PasswordStrengthPositions.Top)
5316
+ && invalidOptions.includes(PasswordStrengthPositions.Right)
5317
+ && invalidOptions.includes(PasswordStrengthPositions.Left)) {
5318
+ this.destroyPasswordStrength();
5319
+ throw new Error("No space to show password strength");
5320
+ }
5321
+ switch (this.position) {
5322
+ case PasswordStrengthPositions.Top: {
5323
+ const topShift = top;
5324
+ const rightShift = document.body.clientWidth - right;
5325
+ const leftShift = left;
5326
+ if (topShift <= elementRefHeight + safeSpace || rightShift < 50 || leftShift < 50) {
5327
+ this.position = PasswordStrengthPositions.Right;
5328
+ invalidOptions.push(PasswordStrengthPositions.Top);
5329
+ break;
5330
+ }
5331
+ this.componentRef.instance.top = Math.round(top - margin);
5332
+ this.componentRef.instance.left = Math.round(elementRefWidth / 2 + left);
5333
+ positioned = true;
5334
+ break;
5335
+ }
5336
+ case PasswordStrengthPositions.Right: {
5337
+ const rightShift = document.body.clientWidth - right;
5338
+ if (rightShift <= elementRefWidth + safeSpace) {
5339
+ this.position = PasswordStrengthPositions.Left;
5340
+ invalidOptions.push(PasswordStrengthPositions.Right);
5341
+ break;
5342
+ }
5343
+ this.componentRef.instance.top = Math.round(top + elementRefHeight / 2);
5344
+ this.componentRef.instance.left = Math.round(right + margin);
5345
+ positioned = true;
5346
+ break;
5347
+ }
5348
+ case PasswordStrengthPositions.Left: {
5349
+ const leftShift = left;
5350
+ if (leftShift <= elementRefWidth + safeSpace) {
5351
+ this.position = PasswordStrengthPositions.Top;
5352
+ invalidOptions.push(PasswordStrengthPositions.Left);
5353
+ break;
5354
+ }
5355
+ this.componentRef.instance.top = Math.round(top + elementRefHeight / 2);
5356
+ this.componentRef.instance.left = Math.round(left - margin);
5357
+ positioned = true;
5358
+ break;
5359
+ }
5360
+ default: {
5361
+ break;
5362
+ }
5363
+ }
5364
+ this.componentRef.instance.position = this.position;
5365
+ }
5028
5366
  }
5029
5367
  }
5030
- onToggleCheckbox(checked) {
5031
- const { filteredValue, value, dataKey } = this.table;
5032
- const gridData = checked ? (filteredValue ? filteredValue.slice() : value.slice()) : [];
5033
- if (checked) {
5034
- const unselecteds = gridData
5035
- .filter(record => !this.table._selection.find((selected) => record[dataKey] === selected[dataKey]))
5036
- .map((record) => {
5037
- if (this.useAllObject)
5038
- return record;
5039
- const newRecord = {};
5040
- if (this.rowProps)
5041
- this.rowProps.forEach((prop) => (newRecord[prop] = record[prop]));
5042
- else
5043
- newRecord[dataKey] = record[dataKey];
5044
- return newRecord;
5045
- });
5046
- this.table._selection = [...this.table._selection, ...unselecteds];
5368
+ validateProperties() {
5369
+ this.validation = this.validation || this.defaultValidator;
5370
+ if (!this.description) {
5371
+ throw new Error("Description is required");
5047
5372
  }
5048
- else {
5049
- value.forEach((data) => {
5050
- this.table._selection = this.table._selection.filter((record) => record[dataKey] !== data[dataKey]);
5051
- });
5373
+ }
5374
+ destroyPasswordStrength() {
5375
+ if (this.componentRef !== null) {
5376
+ this.appRef.detachView(this.componentRef.hostView);
5377
+ this.componentRef.destroy();
5378
+ this.componentRef = null;
5052
5379
  }
5053
- this.table.updateSelectionKeys();
5054
- this.table.selectionChange.emit(this.table._selection);
5055
- this.tableService.onSelectionChange();
5056
- if (this.table.isStateful())
5057
- this.table.saveState();
5058
5380
  }
5059
- isAllFilteredValuesChecked() {
5060
- if (!this.table.filteredValue) {
5061
- return false;
5381
+ defaultValidator(content) {
5382
+ let points = 0;
5383
+ const regExpValidations = [
5384
+ new RegExp("(?=.*\\d)"),
5385
+ new RegExp("(?=.*[a-z])"),
5386
+ new RegExp("(?=.*[A-Z])"),
5387
+ new RegExp("(?=.*[!@#$%&*.\\-=+^~])"),
5388
+ ];
5389
+ if (content.length >= 6) {
5390
+ points++;
5062
5391
  }
5063
- else {
5064
- for (const rowData of this.table.filteredValue) {
5065
- if (!this.table.isSelected(rowData)) {
5066
- return false;
5067
- }
5392
+ regExpValidations.forEach(validation => {
5393
+ if (validation.test(content)) {
5394
+ points++;
5068
5395
  }
5069
- return true;
5396
+ });
5397
+ if (points < 1) {
5398
+ return PasswordStrengths.VeryWeak;
5070
5399
  }
5071
- }
5072
- isAllValuesChecked() {
5073
- if (!this.table.value) {
5074
- return false;
5400
+ else if (points < 4) {
5401
+ return PasswordStrengths.Weak;
5402
+ }
5403
+ else if (points < 5) {
5404
+ return PasswordStrengths.Medium;
5075
5405
  }
5076
5406
  else {
5077
- for (const rowData of this.table.value) {
5078
- if (!this.table.isSelected(rowData)) {
5079
- return false;
5080
- }
5081
- }
5082
- return true;
5407
+ return PasswordStrengths.Strong;
5083
5408
  }
5084
5409
  }
5085
5410
  };
5086
- TableHeaderCheckboxComponent.nextId = 0;
5087
- TableHeaderCheckboxComponent.ctorParameters = () => [
5088
- { type: Table },
5089
- { type: TableService }
5411
+ PasswordStrengthDirective.ctorParameters = () => [
5412
+ { type: ElementRef },
5413
+ { type: ApplicationRef },
5414
+ { type: ComponentFactoryResolver },
5415
+ { type: Injector }
5090
5416
  ];
5091
5417
  __decorate([
5092
- Input()
5093
- ], TableHeaderCheckboxComponent.prototype, "id", void 0);
5418
+ Input("sPasswordStrength")
5419
+ ], PasswordStrengthDirective.prototype, "enabled", void 0);
5094
5420
  __decorate([
5095
- Input()
5096
- ], TableHeaderCheckboxComponent.prototype, "disabled", void 0);
5421
+ Input("psValidation")
5422
+ ], PasswordStrengthDirective.prototype, "validation", void 0);
5097
5423
  __decorate([
5098
- Input()
5099
- ], TableHeaderCheckboxComponent.prototype, "rowProps", void 0);
5424
+ Input("psPosition")
5425
+ ], PasswordStrengthDirective.prototype, "position", void 0);
5100
5426
  __decorate([
5101
- Input()
5102
- ], TableHeaderCheckboxComponent.prototype, "useAllObject", void 0);
5103
- TableHeaderCheckboxComponent = TableHeaderCheckboxComponent_1 = __decorate([
5104
- Component({
5105
- selector: "s-table-header-checkbox",
5106
- template: `
5107
- <div class="ui-chkbox ui-widget" (click)="onClick()">
5108
- <div class="ui-helper-hidden-accessible">
5109
- <input type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="isDisabled()">
5110
- </div>
5111
- <div [ngClass]="{'ui-chkbox-box ui-widget ui-state-default':true,
5112
- 'ui-state-active':checked, 'ui-state-disabled': isDisabled(), 'ui-state-focus': hasFocus}">
5113
- <span [id]="id" class="ui-chkbox-icon ui-clickable" [ngClass]="{'pi pi-check':checked}"></span>
5114
- </div>
5115
- </div>
5116
- `
5427
+ Input("psWeakTitle")
5428
+ ], PasswordStrengthDirective.prototype, "weakTitle", void 0);
5429
+ __decorate([
5430
+ Input("psMediumTitle")
5431
+ ], PasswordStrengthDirective.prototype, "mediumTitle", void 0);
5432
+ __decorate([
5433
+ Input("psStrongTitle")
5434
+ ], PasswordStrengthDirective.prototype, "strongTitle", void 0);
5435
+ __decorate([
5436
+ Input("psDescription")
5437
+ ], PasswordStrengthDirective.prototype, "description", void 0);
5438
+ __decorate([
5439
+ HostListener("keyup"),
5440
+ HostListener("focus")
5441
+ ], PasswordStrengthDirective.prototype, "onFocus", null);
5442
+ __decorate([
5443
+ HostListener("blur")
5444
+ ], PasswordStrengthDirective.prototype, "onBlur", null);
5445
+ PasswordStrengthDirective = __decorate([
5446
+ Directive({
5447
+ selector: "[sPasswordStrength]",
5117
5448
  })
5118
- ], TableHeaderCheckboxComponent);
5449
+ ], PasswordStrengthDirective);
5119
5450
 
5120
- let TableHeaderCheckboxModule = class TableHeaderCheckboxModule {
5451
+ let PasswordStrengthModule = class PasswordStrengthModule {
5121
5452
  };
5122
- TableHeaderCheckboxModule = __decorate([
5453
+ PasswordStrengthModule = __decorate([
5123
5454
  NgModule({
5124
5455
  imports: [CommonModule],
5125
- exports: [TableHeaderCheckboxComponent],
5126
- declarations: [TableHeaderCheckboxComponent],
5456
+ declarations: [
5457
+ PasswordStrengthComponent,
5458
+ PasswordStrengthDirective,
5459
+ ],
5460
+ exports: [PasswordStrengthDirective],
5127
5461
  })
5128
- ], TableHeaderCheckboxModule);
5462
+ ], PasswordStrengthModule);
5129
5463
 
5130
5464
  let NavigationDirective = class NavigationDirective {
5131
5465
  onKeyDown(event) {
@@ -6000,558 +6334,407 @@ __decorate([
6000
6334
  Input()
6001
6335
  ], TablePagingComponent.prototype, "exportFileName", void 0);
6002
6336
  __decorate([
6003
- Input()
6004
- ], TablePagingComponent.prototype, "table", void 0);
6005
- __decorate([
6006
- Input()
6007
- ], TablePagingComponent.prototype, "exportable", void 0);
6008
- __decorate([
6009
- Input()
6010
- ], TablePagingComponent.prototype, "enableExportSelectedRecords", void 0);
6011
- __decorate([
6012
- Input()
6013
- ], TablePagingComponent.prototype, "customActions", void 0);
6014
- __decorate([
6015
- Input()
6016
- ], TablePagingComponent.prototype, "loadAllRecords", void 0);
6017
- __decorate([
6018
- Input()
6019
- ], TablePagingComponent.prototype, "loadCurrentPageRecords", void 0);
6020
- __decorate([
6021
- Input()
6022
- ], TablePagingComponent.prototype, "loadSelectedRecords", void 0);
6023
- __decorate([
6024
- Output()
6025
- ], TablePagingComponent.prototype, "totalRecordsText", void 0);
6026
- TablePagingComponent = __decorate([
6027
- Component({
6028
- template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button\n *ngIf=\"exportable\"\n class=\"export-button\" \n priority=\"default\" \n iconClass=\"fa fa-fw fa-file-export\" \n [disabled]=\"false\" \n [auxiliary]=\"true\" \n [tooltip]=\"getTooltipText()\" \n [model]=\"getActions()\">\n </s-button>\n</div>\n",
6029
- selector: "s-table-paging",
6030
- styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
6031
- }),
6032
- __param(1, Inject(HostProjectConfigsInjectionToken))
6033
- ], TablePagingComponent);
6034
-
6035
- let TableModule = class TableModule {
6036
- };
6037
- TableModule = __decorate([
6038
- NgModule({
6039
- imports: [
6040
- CommonModule,
6041
- TooltipModule,
6042
- TokenListModule,
6043
- TranslateModule,
6044
- ButtonModule,
6045
- InfoSignModule
6046
- ],
6047
- exports: [
6048
- RowTogllerDirective,
6049
- NavigationDirective,
6050
- TableColumnsComponent,
6051
- TableFrozenPositionDirective,
6052
- TablePagingComponent
6053
- ],
6054
- declarations: [
6055
- RowTogllerDirective,
6056
- NavigationDirective,
6057
- TableColumnsComponent,
6058
- TableFrozenPositionDirective,
6059
- TablePagingComponent
6060
- ],
6061
- })
6062
- ], TableModule);
6063
-
6064
- let AutocompleteFieldComponent = class AutocompleteFieldComponent {
6065
- };
6066
- __decorate([
6067
- Input()
6068
- ], AutocompleteFieldComponent.prototype, "field", void 0);
6069
- __decorate([
6070
- Input()
6071
- ], AutocompleteFieldComponent.prototype, "formControl", void 0);
6072
- AutocompleteFieldComponent = __decorate([
6073
- Component({
6074
- template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [lookupSuggestions]=\"field.suggestions\"\n [dataKey]=\"field.dataKey\"\n (onLookupRequest)=\"field.onSearch($event)\"\n [lookupDisplayField]=\"field.displayField\"\n [showSearch]=\"false\"\n [lookupAppendTo]=\"field.appendTo\"\n (onSelect)=\"field.onSelect ? field.onSelect($event) : null\"\n (onUnselect)=\"field.onUnselect ? field.onUnselect($event) : null\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupEmptyMessage]=\"field.emptyMessage\">\n </s-lookup>\n</div>\n"
6075
- })
6076
- ], AutocompleteFieldComponent);
6077
-
6078
- let BooleanFieldComponent = class BooleanFieldComponent {
6079
- onClear() {
6080
- this.formControl.reset();
6081
- }
6082
- };
6083
- __decorate([
6084
- Input()
6085
- ], BooleanFieldComponent.prototype, "field", void 0);
6086
- __decorate([
6087
- Input()
6088
- ], BooleanFieldComponent.prototype, "formControl", void 0);
6089
- BooleanFieldComponent = __decorate([
6090
- Component({
6091
- template: "<ng-container *ngIf=\"field.verticalAlignment;else horizontalAlignment\">\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"true\"\n [label]=\"field.optionsLabel.true\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-1'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n </div>\n <div class=\"ui-g-12\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"false\"\n [label]=\"field.optionsLabel.false\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-2'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n </div>\n <div\n *ngIf=\"!field.showClear && !field.required()\"\n class=\"ui-g-12\">\n <p-radioButton \n [name]=\"field.name\"\n [value]=\"null\"\n [label]=\"field.optionsLabel.empty\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-3'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton> \n </div>\n <div>\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n [label]=\"field.optionsLabel.clear || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n </div>\n\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class=\"ui-g\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"true\"\n [label]=\"field.optionsLabel.true\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-1'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n \n <p-radioButton\n [name]=\"field.name\"\n [value]=\"false\"\n [label]=\"field.optionsLabel.false\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-2'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n\n <p-radioButton\n *ngIf=\"!field.showClear && !field.required()\"\n [name]=\"field.name\"\n [value]=\"null\"\n [label]=\"field.optionsLabel.empty\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-3'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n style=\"margin-left: 40px;\"\n [label]=\"field.optionsLabel.clear || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n </div>\n</ng-template>\n"
6092
- })
6093
- ], BooleanFieldComponent);
6094
-
6095
- let CalendarFieldComponent = class CalendarFieldComponent {
6096
- };
6097
- __decorate([
6098
- Input()
6099
- ], CalendarFieldComponent.prototype, "field", void 0);
6100
- __decorate([
6101
- Input()
6102
- ], CalendarFieldComponent.prototype, "formControl", void 0);
6103
- __decorate([
6104
- Input()
6105
- ], CalendarFieldComponent.prototype, "showTime", void 0);
6106
- __decorate([
6107
- Input()
6108
- ], CalendarFieldComponent.prototype, "timeOnly", void 0);
6109
- CalendarFieldComponent = __decorate([
6110
- Component({
6111
- template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <!-- Remover as propriedades [showTransitionOptions] e [hideTransitionOptions] quando atualizar para o PrimeNG v10, esses atributos foram\n usados para remover um bug ocasionado pela anima\u00E7\u00E3o do componente p-calendar, bug explicado nas issues: #ERPROM-5534, #ERPROM-8248 e #DSN-1045. -->\n <p-calendar\n #calendar\n sCalendarMask\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [showIcon]=\"true\"\n [timeOnly]=\"timeOnly\"\n [selectionMode]=\"field.selectionMode\"\n [rangeSeparator]=\"field.rangeSeparator\"\n [showTime]=\"showTime\"\n [showSeconds]=\"field.showSeconds\"\n [showOnFocus]=\"field.showOnFocus\"\n [formControl]=\"formControl\"\n [icon]=\"timeOnly ? 'fa fa-clock' : 'fa fa-calendar'\"\n [minDate]=\"field.minDate\"\n [maxDate]=\"field.maxDate\"\n [defaultDate]=\"field.defaultDate\"\n [locale]=\"field.calendarLocaleOptions\"\n [dateFormat]=\"field.calendarLocaleOptions.dateFormat\"\n [hourFormat]=\"field.calendarLocaleOptions.hourFormat\"\n [view]=\"field.view\"\n [placeholder]=\"field.placeholder\"\n inputStyleClass=\"mousetrap\"\n [appendTo]=\"field.appendTo\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event): null\"\n (onSelect)=\"field.onSelect ? field.onSelect($event) : null\"\n (onClose)=\"field.onClose ? field.onClose($event) : null\"\n (onTodayClick)=\"field.onTodayClick ? field.onTodayClick($event) : null\"\n (onClearClick)=\"field.onClearClick ? field.onClearClick($event) : null\"\n (onMonthChange)=\"field.onMonthChange ? field.onMonthChange($event) : null\"\n (onYearChange)=\"field.onYearChange ? field.onYearChange($event) : null\"\n [showTransitionOptions]=\"'0ms'\"\n [hideTransitionOptions]=\"'0ms'\">\n </p-calendar>\n</div>\n"
6112
- })
6113
- ], CalendarFieldComponent);
6114
-
6115
- let ChipsFieldComponent = class ChipsFieldComponent {
6116
- constructor(clipboard) {
6117
- this.clipboard = clipboard;
6118
- this.feedbackMessageVisible = false;
6119
- this.copyButtonVisible = true;
6120
- }
6121
- onCopyFieldContent() {
6122
- if (this.formControl.value) {
6123
- this.copyButtonVisible = false;
6124
- this.feedbackMessageVisible = true;
6125
- setTimeout(() => {
6126
- this.feedbackMessageVisible = false;
6127
- this.copyButtonVisible = true;
6128
- }, 3000);
6129
- const content = this.formControl.value.join(this.field.separator || "\n");
6130
- this.clipboard.copy(content);
6131
- if (this.field.onCopy) {
6132
- this.field.onCopy(content);
6133
- }
6134
- }
6135
- }
6136
- };
6137
- ChipsFieldComponent.ctorParameters = () => [
6138
- { type: Clipboard }
6139
- ];
6140
- __decorate([
6141
- Input()
6142
- ], ChipsFieldComponent.prototype, "field", void 0);
6143
- __decorate([
6144
- Input()
6145
- ], ChipsFieldComponent.prototype, "formControl", void 0);
6146
- ChipsFieldComponent = __decorate([
6147
- Component({
6148
- template: "<div class=\"chips-field-wrapper\">\n <div style=\"width: 100%;\">\n <p-chips\n *ngIf=\"field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [pKeyFilter]=\"field.keyFilter\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n </p-chips>\n \n <p-chips\n *ngIf=\"!field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n </p-chips>\n </div>\n \n <button\n *ngIf=\"field.showCopyButton && formControl.value?.length > 0 && copyButtonVisible\"\n class=\"copy-content-button\"\n (click)=\"onCopyFieldContent()\">\n {{ \"platform.angular_components.copy_field_content\" | translate }}\n </button>\n \n <span\n *ngIf=\"feedbackMessageVisible\"\n class=\"feedback-message\">\n {{ \"platform.angular_components.copied_to_clipboard\" | translate }}\n </span>\n</div>\n",
6149
- styles: [".chips-field-wrapper{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.chips-field-wrapper .chip-content{display:block;overflow:hidden;padding-right:1rem;text-overflow:ellipsis}.chips-field-wrapper .copy-content-button{background-color:transparent;border:none;color:#2a6496;cursor:pointer;margin-top:8px}.chips-field-wrapper .feedback-message{color:#0c9348;display:block;margin-top:8px;-webkit-user-select:none;-ms-user-select:none;user-select:none}"]
6150
- })
6151
- ], ChipsFieldComponent);
6152
-
6153
- /**
6154
- * @deprecated Should use bignumber instead
6155
- */
6156
- let CurrencyFieldComponent = class CurrencyFieldComponent extends BaseFieldComponent {
6157
- };
6337
+ Input()
6338
+ ], TablePagingComponent.prototype, "table", void 0);
6158
6339
  __decorate([
6159
6340
  Input()
6160
- ], CurrencyFieldComponent.prototype, "field", void 0);
6341
+ ], TablePagingComponent.prototype, "exportable", void 0);
6161
6342
  __decorate([
6162
6343
  Input()
6163
- ], CurrencyFieldComponent.prototype, "formControl", void 0);
6164
- CurrencyFieldComponent = __decorate([
6165
- Component({
6166
- template: "<div class=\"ui-inputgroup\">\n <span\n *ngIf=\"field.numberLocaleOptions.currencySymbol\"\n class=\"ui-inputgroup-addon\">\n {{ field.numberLocaleOptions.currencySymbol }}\n </span>\n <input\n *ngIf=\"!field.mask\"\n type=\"text\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n sNumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"field.onFocus ? field.onFocus($event): null\" />\n <p-inputMask\n *ngIf=\"field.mask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n [mask]=\"field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event): null\"\n (onComplete)=\"field.onComplete ? field.onComplete($event) : null\"\n (onInput)=\"field.onInput ? field.onInput($event) : null\" >\n </p-inputMask>\n</div>\n"
6167
- })
6168
- ], CurrencyFieldComponent);
6169
-
6170
- let FileUploadComponent$1 = class FileUploadComponent extends BaseFieldComponent {
6171
- };
6344
+ ], TablePagingComponent.prototype, "enableExportSelectedRecords", void 0);
6172
6345
  __decorate([
6173
6346
  Input()
6174
- ], FileUploadComponent$1.prototype, "field", void 0);
6347
+ ], TablePagingComponent.prototype, "customActions", void 0);
6175
6348
  __decorate([
6176
6349
  Input()
6177
- ], FileUploadComponent$1.prototype, "formControl", void 0);
6178
- FileUploadComponent$1 = __decorate([
6179
- Component({
6180
- template: "<s-file-upload [id]=\"(field.id || field.name)\" [accept]=\"field.accept\" [files]=\"field.files\" [multiple]=\"field.multiple\"\n [chooseLabel]=\"field.chooseLabel\" [removeLabel]=\"field.removeLabel\" [cancelLabel]=\"field.cancelLabel\"\n [successTooltip]=\"field.successTooltip\" (uploadHandler)=\"field.onUploadFile($event, field)\"\n (removeFile)=\"field.onRemoveFile($event, field)\" (cancelUpload)=\"field.onCancelUpload($event, field)\"\n (downloadFile)=\"field.onDownloadFile($event, field)\" [formGroup]=\"formControl\"\n [showFileUploadDate]=\"field.showFileUploadDate\"> \n</s-file-upload>\n"
6181
- })
6182
- ], FileUploadComponent$1);
6183
-
6184
- let LookupFieldComponent = class LookupFieldComponent {
6185
- };
6350
+ ], TablePagingComponent.prototype, "loadAllRecords", void 0);
6186
6351
  __decorate([
6187
6352
  Input()
6188
- ], LookupFieldComponent.prototype, "field", void 0);
6353
+ ], TablePagingComponent.prototype, "loadCurrentPageRecords", void 0);
6189
6354
  __decorate([
6190
6355
  Input()
6191
- ], LookupFieldComponent.prototype, "formControl", void 0);
6192
- LookupFieldComponent = __decorate([
6356
+ ], TablePagingComponent.prototype, "loadSelectedRecords", void 0);
6357
+ __decorate([
6358
+ Output()
6359
+ ], TablePagingComponent.prototype, "totalRecordsText", void 0);
6360
+ TablePagingComponent = __decorate([
6193
6361
  Component({
6194
- template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [lookupSuggestions]=\"field.lookupSuggestions\"\n [dataKey]=\"field.dataKey\"\n [placeholder]=\"field.placeholder\"\n [searchFields]=\"field.searchFields\"\n [searchGridFields]=\"field.searchGridFields\"\n [searchGridData]=\"field.gridData\"\n (onLookupRequest)=\"field.onLookupRequest($event)\"\n (onSearchRequest)=\"field.onSearchRequest($event)\"\n [lookupDisplayField]=\"field.lookupDisplayField\"\n [searchTotalRecords]=\"field.searchTotalRecords\"\n [searchTotalRecordsLabel]=\"field.searchTotalRecordsLabel\"\n [searchTitle]=\"field.searchTitle\"\n [selectLabel]=\"field.selectLabel\"\n [searchEmptyTitle]=\"field.searchEmptyTitle\"\n [filterLabel]=\"field.filterLabel\"\n [filterTitle]=\"field.filterTitle\"\n [clearLabel]=\"field.clearLabel\"\n [cancelLabel]=\"field.cancelLabel\"\n [emptyFieldLabel]=\"field.emptyFieldLabel \"\n (onSelect)=\"field.onSelect($event)\"\n (onUnselect)=\"field.onUnselect($event)\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupAppendTo]=\"field.appendTo\"\n [lookupEmptyMessage]=\"field.emptyMessage\"\n [recordLabel]=\"field.recordLabel\"\n [recordsLabel]=\"field.recordsLabel\"\n [defaultFilter]=\"field.defaultFilter\"\n [autocompleteForceSelection]=\"field.autocompleteForceSelection\">\n </s-lookup>\n</div>\n"
6362
+ template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button\n *ngIf=\"exportable\"\n class=\"export-button\" \n priority=\"default\" \n iconClass=\"fa fa-fw fa-file-export\" \n [disabled]=\"false\" \n [auxiliary]=\"true\" \n [tooltip]=\"getTooltipText()\" \n [model]=\"getActions()\">\n </s-button>\n</div>\n",
6363
+ selector: "s-table-paging",
6364
+ styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
6365
+ }),
6366
+ __param(1, Inject(HostProjectConfigsInjectionToken))
6367
+ ], TablePagingComponent);
6368
+
6369
+ let TableModule = class TableModule {
6370
+ };
6371
+ TableModule = __decorate([
6372
+ NgModule({
6373
+ imports: [
6374
+ CommonModule,
6375
+ TooltipModule,
6376
+ TokenListModule,
6377
+ TranslateModule,
6378
+ ButtonModule,
6379
+ InfoSignModule
6380
+ ],
6381
+ exports: [
6382
+ RowTogllerDirective,
6383
+ NavigationDirective,
6384
+ TableColumnsComponent,
6385
+ TableFrozenPositionDirective,
6386
+ TablePagingComponent
6387
+ ],
6388
+ declarations: [
6389
+ RowTogllerDirective,
6390
+ NavigationDirective,
6391
+ TableColumnsComponent,
6392
+ TableFrozenPositionDirective,
6393
+ TablePagingComponent
6394
+ ],
6195
6395
  })
6196
- ], LookupFieldComponent);
6396
+ ], TableModule);
6197
6397
 
6198
- let NumberFieldComponent = class NumberFieldComponent extends BaseFieldComponent {
6199
- constructor() {
6200
- super(...arguments);
6201
- this.onInput = new EventEmitter();
6202
- this.onFocus = new EventEmitter();
6203
- this.onComplete = new EventEmitter();
6398
+ var TableHeaderCheckboxComponent_1;
6399
+ let TableHeaderCheckboxComponent = TableHeaderCheckboxComponent_1 = class TableHeaderCheckboxComponent {
6400
+ constructor(table, tableService) {
6401
+ this.table = table;
6402
+ this.tableService = tableService;
6403
+ this.id = `s-table-header-checkbox-${TableHeaderCheckboxComponent_1.nextId++}`;
6204
6404
  this.ngUnsubscribe = new Subject();
6205
- }
6206
- ngOnInit() {
6207
- this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6208
- if (this.field.onFocus)
6209
- this.field.onFocus(event);
6210
- });
6211
- this.onInput.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6212
- if (this.field.onInput)
6213
- this.field.onInput(event);
6405
+ this.table.tableService.valueSource$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
6406
+ this.checked = this.updateCheckedState();
6214
6407
  });
6215
- this.onComplete.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6216
- if (this.field.onComplete)
6217
- this.field.onComplete(event);
6408
+ this.table.tableService.selectionSource$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
6409
+ this.checked = this.updateCheckedState();
6218
6410
  });
6219
6411
  }
6412
+ ngOnInit() {
6413
+ this.checked = this.updateCheckedState();
6414
+ }
6220
6415
  ngOnDestroy() {
6221
6416
  this.ngUnsubscribe.next();
6222
- this.ngUnsubscribe.complete();
6223
6417
  }
6224
- get numberAlignmentOption() {
6225
- return NumberAlignmentOption;
6418
+ onFocus() {
6419
+ this.hasFocus = true;
6226
6420
  }
6227
- get fieldType() {
6228
- return FieldType;
6421
+ onBlur() {
6422
+ this.hasFocus = false;
6423
+ }
6424
+ isDisabled() {
6425
+ return this.disabled || !this.table.value || !this.table.value.length;
6426
+ }
6427
+ onClick() {
6428
+ if (!this.disabled) {
6429
+ if (this.table.value && this.table.value.length > 0)
6430
+ this.onToggleCheckbox(!this.checked);
6431
+ }
6432
+ }
6433
+ updateCheckedState() {
6434
+ if (this.table.filteredValue) {
6435
+ const val = this.table.filteredValue;
6436
+ return val && val.length > 0 && this.table.selection && this.table.selection.length > 0 && this.isAllFilteredValuesChecked();
6437
+ }
6438
+ else {
6439
+ const val = this.table.value;
6440
+ return val && val.length > 0 && this.table.selection && this.table.selection.length > 0 && this.isAllValuesChecked();
6441
+ }
6442
+ }
6443
+ onToggleCheckbox(checked) {
6444
+ const { filteredValue, value, dataKey } = this.table;
6445
+ const gridData = checked ? (filteredValue ? filteredValue.slice() : value.slice()) : [];
6446
+ if (checked) {
6447
+ const unselecteds = gridData
6448
+ .filter(record => !this.table._selection.find((selected) => record[dataKey] === selected[dataKey]))
6449
+ .map((record) => {
6450
+ if (this.useAllObject)
6451
+ return record;
6452
+ const newRecord = {};
6453
+ if (this.rowProps)
6454
+ this.rowProps.forEach((prop) => (newRecord[prop] = record[prop]));
6455
+ else
6456
+ newRecord[dataKey] = record[dataKey];
6457
+ return newRecord;
6458
+ });
6459
+ this.table._selection = [...this.table._selection, ...unselecteds];
6460
+ }
6461
+ else {
6462
+ value.forEach((data) => {
6463
+ this.table._selection = this.table._selection.filter((record) => record[dataKey] !== data[dataKey]);
6464
+ });
6465
+ }
6466
+ this.table.updateSelectionKeys();
6467
+ this.table.selectionChange.emit(this.table._selection);
6468
+ this.tableService.onSelectionChange();
6469
+ if (this.table.isStateful())
6470
+ this.table.saveState();
6471
+ }
6472
+ isAllFilteredValuesChecked() {
6473
+ if (!this.table.filteredValue) {
6474
+ return false;
6475
+ }
6476
+ else {
6477
+ for (const rowData of this.table.filteredValue) {
6478
+ if (!this.table.isSelected(rowData)) {
6479
+ return false;
6480
+ }
6481
+ }
6482
+ return true;
6483
+ }
6484
+ }
6485
+ isAllValuesChecked() {
6486
+ if (!this.table.value) {
6487
+ return false;
6488
+ }
6489
+ else {
6490
+ for (const rowData of this.table.value) {
6491
+ if (!this.table.isSelected(rowData)) {
6492
+ return false;
6493
+ }
6494
+ }
6495
+ return true;
6496
+ }
6229
6497
  }
6230
6498
  };
6499
+ TableHeaderCheckboxComponent.nextId = 0;
6500
+ TableHeaderCheckboxComponent.ctorParameters = () => [
6501
+ { type: Table },
6502
+ { type: TableService }
6503
+ ];
6231
6504
  __decorate([
6232
6505
  Input()
6233
- ], NumberFieldComponent.prototype, "field", void 0);
6506
+ ], TableHeaderCheckboxComponent.prototype, "id", void 0);
6234
6507
  __decorate([
6235
6508
  Input()
6236
- ], NumberFieldComponent.prototype, "formControl", void 0);
6509
+ ], TableHeaderCheckboxComponent.prototype, "disabled", void 0);
6237
6510
  __decorate([
6238
- Output()
6239
- ], NumberFieldComponent.prototype, "onInput", void 0);
6511
+ Input()
6512
+ ], TableHeaderCheckboxComponent.prototype, "rowProps", void 0);
6240
6513
  __decorate([
6241
- Output()
6242
- ], NumberFieldComponent.prototype, "onFocus", void 0);
6514
+ Input()
6515
+ ], TableHeaderCheckboxComponent.prototype, "useAllObject", void 0);
6516
+ TableHeaderCheckboxComponent = TableHeaderCheckboxComponent_1 = __decorate([
6517
+ Component({
6518
+ selector: "s-table-header-checkbox",
6519
+ template: `
6520
+ <div class="ui-chkbox ui-widget" (click)="onClick()">
6521
+ <div class="ui-helper-hidden-accessible">
6522
+ <input type="checkbox" [checked]="checked" (focus)="onFocus()" (blur)="onBlur()" [disabled]="isDisabled()">
6523
+ </div>
6524
+ <div [ngClass]="{'ui-chkbox-box ui-widget ui-state-default':true,
6525
+ 'ui-state-active':checked, 'ui-state-disabled': isDisabled(), 'ui-state-focus': hasFocus}">
6526
+ <span [id]="id" class="ui-chkbox-icon ui-clickable" [ngClass]="{'pi pi-check':checked}"></span>
6527
+ </div>
6528
+ </div>
6529
+ `
6530
+ })
6531
+ ], TableHeaderCheckboxComponent);
6532
+
6533
+ let TableHeaderCheckboxModule = class TableHeaderCheckboxModule {
6534
+ };
6535
+ TableHeaderCheckboxModule = __decorate([
6536
+ NgModule({
6537
+ imports: [CommonModule],
6538
+ exports: [TableHeaderCheckboxComponent],
6539
+ declarations: [TableHeaderCheckboxComponent],
6540
+ })
6541
+ ], TableHeaderCheckboxModule);
6542
+
6543
+ let AutocompleteFieldComponent = class AutocompleteFieldComponent {
6544
+ };
6243
6545
  __decorate([
6244
- Output()
6245
- ], NumberFieldComponent.prototype, "onComplete", void 0);
6246
- NumberFieldComponent = __decorate([
6546
+ Input()
6547
+ ], AutocompleteFieldComponent.prototype, "field", void 0);
6548
+ __decorate([
6549
+ Input()
6550
+ ], AutocompleteFieldComponent.prototype, "formControl", void 0);
6551
+ AutocompleteFieldComponent = __decorate([
6247
6552
  Component({
6248
- template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\" >\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"field.type === fieldType.Double && field.alignTo === numberAlignmentOption.LEFT ? localizedNumber : input\"></ng-container>\n\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sNumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n</ng-template>\n<ng-template #localizedNumber>\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sLocalizedNumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n</ng-template>\n",
6249
- encapsulation: ViewEncapsulation.None,
6250
- styles: ["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
6553
+ template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [lookupSuggestions]=\"field.suggestions\"\n [dataKey]=\"field.dataKey\"\n (onLookupRequest)=\"field.onSearch($event)\"\n [lookupDisplayField]=\"field.displayField\"\n [showSearch]=\"false\"\n [lookupAppendTo]=\"field.appendTo\"\n (onSelect)=\"field.onSelect ? field.onSelect($event) : null\"\n (onUnselect)=\"field.onUnselect ? field.onUnselect($event) : null\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupEmptyMessage]=\"field.emptyMessage\">\n </s-lookup>\n</div>\n"
6251
6554
  })
6252
- ], NumberFieldComponent);
6555
+ ], AutocompleteFieldComponent);
6253
6556
 
6254
- let RadioButtonComponent = class RadioButtonComponent {
6557
+ let BignumberFieldComponent = class BignumberFieldComponent extends BaseFieldComponent {
6255
6558
  constructor() {
6256
- this.onClick = new EventEmitter();
6559
+ super(...arguments);
6560
+ this.onInput = new EventEmitter();
6257
6561
  this.onFocus = new EventEmitter();
6562
+ this.onComplete = new EventEmitter();
6258
6563
  this.ngUnsubscribe = new Subject();
6259
6564
  }
6260
6565
  ngOnInit() {
6261
- this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6262
- if (this.field.onFocus)
6566
+ this.onFocus
6567
+ .pipe(takeUntil(this.ngUnsubscribe))
6568
+ .subscribe((event) => {
6569
+ if (this.field.onFocus) {
6263
6570
  this.field.onFocus(event);
6571
+ }
6264
6572
  });
6265
- this.onClick.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6266
- if (this.field.onClick)
6267
- this.field.onClick(event);
6573
+ this.onInput
6574
+ .pipe(takeUntil(this.ngUnsubscribe))
6575
+ .subscribe((event) => {
6576
+ if (this.field.onInput) {
6577
+ this.field.onInput(event);
6578
+ }
6579
+ });
6580
+ this.onComplete
6581
+ .pipe(takeUntil(this.ngUnsubscribe))
6582
+ .subscribe((event) => {
6583
+ if (this.field.onComplete) {
6584
+ this.field.onComplete(event);
6585
+ }
6268
6586
  });
6269
6587
  }
6270
6588
  ngOnDestroy() {
6271
6589
  this.ngUnsubscribe.next();
6272
6590
  this.ngUnsubscribe.complete();
6273
6591
  }
6274
- onClear() {
6275
- this.formControl.reset();
6592
+ get fieldType() {
6593
+ return FieldType;
6276
6594
  }
6277
6595
  };
6278
6596
  __decorate([
6279
6597
  Input()
6280
- ], RadioButtonComponent.prototype, "field", void 0);
6598
+ ], BignumberFieldComponent.prototype, "field", void 0);
6281
6599
  __decorate([
6282
6600
  Input()
6283
- ], RadioButtonComponent.prototype, "formControl", void 0);
6601
+ ], BignumberFieldComponent.prototype, "formControl", void 0);
6284
6602
  __decorate([
6285
6603
  Output()
6286
- ], RadioButtonComponent.prototype, "onClick", void 0);
6604
+ ], BignumberFieldComponent.prototype, "onInput", void 0);
6287
6605
  __decorate([
6288
6606
  Output()
6289
- ], RadioButtonComponent.prototype, "onFocus", void 0);
6290
- RadioButtonComponent = __decorate([
6607
+ ], BignumberFieldComponent.prototype, "onFocus", void 0);
6608
+ __decorate([
6609
+ Output()
6610
+ ], BignumberFieldComponent.prototype, "onComplete", void 0);
6611
+ BignumberFieldComponent = __decorate([
6291
6612
  Component({
6292
- template: "<ng-container *ngIf=\"field.verticalAlignment;else horizontalAlignment\">\n <div class=\"ui-g\">\n <div\n *ngFor=\"let option of field.options; let i = index\"\n class=\"ui-g-12\">\n <ng-container\n [ngTemplateOutlet]=\"radioButton\"\n [ngTemplateOutletContext]=\"{option: option, index: i}\">\n </ng-container>\n </div>\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n [label]=\"field.clearLabel || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class=\"ui-g\">\n <ng-container\n *ngFor=\"let option of field.options; let i = index\"\n [ngTemplateOutlet]=\"radioButton\"\n [ngTemplateOutletContext]=\"{option: option, index: i}\">\n </ng-container>\n </div>\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n class=\"horizontal-clear-option\"\n [label]=\"field.clearLabel || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n</ng-template>\n\n<ng-template #radioButton let-option=\"option\" let-i=\"index\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"option.value\"\n [label]=\"option.label\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-' + i\"\n [sTooltip]=\"field.tooltip\"\n (onClick)=\"onClick.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n</ng-template>\n",
6613
+ template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [autoClear]=\"field.autoClear\">\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sBignumberInput\n [allowNegative]=\"field.allowNegative\"\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n",
6293
6614
  encapsulation: ViewEncapsulation.None,
6294
- styles: [`
6295
- s-button.horizontal-clear-option button {
6296
- width: min-content !important;
6297
- }
6298
- `]
6615
+ styles: ["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
6299
6616
  })
6300
- ], RadioButtonComponent);
6617
+ ], BignumberFieldComponent);
6301
6618
 
6302
- let SelectFieldComponent = class SelectFieldComponent extends BaseFieldComponent {
6619
+ let BooleanFieldComponent = class BooleanFieldComponent {
6620
+ onClear() {
6621
+ this.formControl.reset();
6622
+ }
6303
6623
  };
6304
6624
  __decorate([
6305
6625
  Input()
6306
- ], SelectFieldComponent.prototype, "field", void 0);
6626
+ ], BooleanFieldComponent.prototype, "field", void 0);
6307
6627
  __decorate([
6308
6628
  Input()
6309
- ], SelectFieldComponent.prototype, "formControl", void 0);
6310
- SelectFieldComponent = __decorate([
6629
+ ], BooleanFieldComponent.prototype, "formControl", void 0);
6630
+ BooleanFieldComponent = __decorate([
6311
6631
  Component({
6312
- template: "<p-dropdown\n *ngIf=\"!field.multiple\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [options]=\"isFunction(field.options) ? field.options() : field.options\"\n [placeholder]=\"field.placeholder || ' '\"\n [formControl]=\"formControl\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n [showClear]=\"field.showClear\"\n dataKey=\"{{field.dataKey}}\"\n optionLabel=\"{{field.optionLabel}}\"\n [autoDisplayFirst]=\"field.autoDisplayFirst\"\n [appendTo]=\"field.appendTo || 'body'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onChange)=\"field.onChange ? field.onChange($event) : null\">\n</p-dropdown>\n<p-multiSelect\n *ngIf=\"field.multiple\"\n [formControl]=\"formControl\"\n [name]=\"field.name\"\n [inputId]=\"(field.id || field.name)\"\n [options]=\"isFunction(field.options) ? field.options() : field.options\"\n [defaultLabel]=\"field.placeholder\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [emptyFilterMessage]=\"field.emptyMessage || 'Nenhum registro encontrado'\"\n [showDelay]=\"500\"\n [selectedItemsLabel]=\"field.multipleSelectedLabel\"\n [appendTo]=\"field.appendTo || 'body'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onChange)=\"field.onChange ? field.onChange($event) : null\">\n</p-multiSelect>\n\n"
6632
+ template: "<ng-container *ngIf=\"field.verticalAlignment;else horizontalAlignment\">\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"true\"\n [label]=\"field.optionsLabel.true\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-1'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n </div>\n <div class=\"ui-g-12\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"false\"\n [label]=\"field.optionsLabel.false\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-2'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n </div>\n <div\n *ngIf=\"!field.showClear && !field.required()\"\n class=\"ui-g-12\">\n <p-radioButton \n [name]=\"field.name\"\n [value]=\"null\"\n [label]=\"field.optionsLabel.empty\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-3'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton> \n </div>\n <div>\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n [label]=\"field.optionsLabel.clear || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n </div>\n\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class=\"ui-g\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"true\"\n [label]=\"field.optionsLabel.true\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-1'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n \n <p-radioButton\n [name]=\"field.name\"\n [value]=\"false\"\n [label]=\"field.optionsLabel.false\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-2'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n\n <p-radioButton\n *ngIf=\"!field.showClear && !field.required()\"\n [name]=\"field.name\"\n [value]=\"null\"\n [label]=\"field.optionsLabel.empty\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-3'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n style=\"margin-left: 40px;\"\n [label]=\"field.optionsLabel.clear || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n </div>\n</ng-template>\n"
6313
6633
  })
6314
- ], SelectFieldComponent);
6634
+ ], BooleanFieldComponent);
6315
6635
 
6316
- let TextAreaFieldComponent = class TextAreaFieldComponent {
6636
+ let BooleanSwitchFieldComponent = class BooleanSwitchFieldComponent {
6317
6637
  };
6318
6638
  __decorate([
6319
6639
  Input()
6320
- ], TextAreaFieldComponent.prototype, "field", void 0);
6640
+ ], BooleanSwitchFieldComponent.prototype, "field", void 0);
6321
6641
  __decorate([
6322
6642
  Input()
6323
- ], TextAreaFieldComponent.prototype, "formControl", void 0);
6324
- TextAreaFieldComponent = __decorate([
6643
+ ], BooleanSwitchFieldComponent.prototype, "formControl", void 0);
6644
+ BooleanSwitchFieldComponent = __decorate([
6325
6645
  Component({
6326
- template: "<textarea\n [id]=\"(field.id || field.name)\"\n *ngIf=\"!field.keyFilter\"\n pInputTextarea\n [rows]=\"field.rows\"\n [cols]=\"field.cols\"\n [formControl]=\"formControl\"\n style=\"resize: vertical;\"\n [ngStyle]=\"field.style\"\n></textarea>\n<textarea\n [id]=\"(field.id || field.name)\"\n *ngIf=\"field.keyFilter\"\n pInputTextarea\n [rows]=\"field.rows\"\n [cols]=\"field.cols\"\n [formControl]=\"formControl\"\n style=\"resize: vertical;\"\n [pKeyFilter]=\"field.keyFilter\"\n [ngStyle]=\"field.style\"\n></textarea>\n"
6646
+ template: "<div class=\"ui-grid ui-grid-responsive ui-grid-pad ui-fluid\">\n <div class=\"ui-grid-row\">\n <div class=\"i-grid-col-1\">\n <s-switch\n [id]=\"(field.id || field.name)\"\n [inputName]=\"field.name\"\n [formControl]=\"formControl\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n (valueChanged)=\"field.onChange ? field.onChange($event) : null\">\n </s-switch>\n </div>\n <div class=\"i-grid-col-1\" *ngIf=\"field.optionsLabel\">\n <ng-container *ngIf=\"formControl.value; else caseFalse\">\n <span>{{ field.optionsLabel.true }}</span>\n </ng-container>\n <ng-template #caseFalse>\n <span>{{ field.optionsLabel.false }}</span>\n </ng-template>\n </div>\n </div>\n</div>"
6327
6647
  })
6328
- ], TextAreaFieldComponent);
6329
-
6330
- let IAssistService = class IAssistService {
6331
- constructor(http, _messageService) {
6332
- this.http = http;
6333
- this._messageService = _messageService;
6334
- }
6335
- askIA(context, data) {
6336
- return this.http.post("platform/iassist/api/latest/completions", {
6337
- "prompt": this._createPrompt(context, data),
6338
- "provider": "OPEN_AI",
6339
- "parameters": {
6340
- "model": "gpt-3.5-turbo",
6341
- "max_tokens": 700,
6342
- "temperature": 1
6343
- }
6344
- }).pipe(catchError((err) => {
6345
- this._messageService.add({
6346
- severity: "error",
6347
- summary: err.status ? String(err.status) : "Error",
6348
- detail: (err.error && err.error.message) || err.statusText || err.message || "Error",
6349
- });
6350
- return throwError(err);
6351
- }));
6352
- }
6353
- _createPrompt(context, data) {
6354
- return `Crie um texto genérico para preencher o campo de textarea.
6355
- ${data.label ? `O campo tem o label ${data.label}.` : ""}
6356
- ${data.id ? `O campo tem o id ${data.id}.` : ""}
6357
- ${data.placeholder ? `Considere as instruções/sugestões do placeholder: ${data.placeholder}.` : ""}
6358
- Baseie-se no contexto informado pelo usuário: '${context}'.
6359
- O texto deve ser formal e conter informações pertinentes a um campo como este, como se um usuário real tivesse preenchido com as informações necessárias.
6360
- O texto deve ser neutro com relação a generos, raças, religiões, etc.
6361
- O texto deve ser impessoal e não deve conter informações pessoais do usuário.
6362
- Não direcione o texto a ninguém, não use expressões como: caro, atenciosamente. gostaria, agradeço. O texto deve ser genérico.
6363
-
6364
- Exemplos de texto:
6365
- Um campo de descrição de usuário: "Usuário com 20 anos, estudante de engenharia, gosta de jogar futebol e assistir filmes."
6366
- Outro exemplo de descrição de usuário: "Usuário administrador, com acesso total ao sistema, responsável por gerenciar os usuários e os produtos."
6367
- Um campo de descrição de um produto: "O produto é um celular, com tela de 6 polegadas, 128GB de armazenamento, 4GB de memória RAM, câmera de 12MP e bateria de 4000mAh."
6368
- Outro exemplo de descrição de produto: "O produto é uma geladeira, com capacidade de 500 litros, 2 portas, cor branca, com freezer e gaveta de legumes."
6369
- Outro exemplo de descrição de produto: "O produto é uma camiseta, tamanho M, cor azul, 100% algodão, com estampa de um gato."
6370
-
6371
- Em caso de contexto incompleto crie um texto genérico, como se fosse um exemplo de preenchimento do campo.
6372
- O texto é para um campo de textarea, então escreva um texto sucinto.
6373
- Exiba apenas o texto do output`;
6374
- }
6375
- };
6376
- IAssistService.ctorParameters = () => [
6377
- { type: HttpClient },
6378
- { type: MessageService }
6379
- ];
6380
- IAssistService = __decorate([
6381
- Injectable()
6382
- ], IAssistService);
6648
+ ], BooleanSwitchFieldComponent);
6383
6649
 
6384
- let TextAreaIAFieldComponent = class TextAreaIAFieldComponent {
6385
- constructor(_iassistService, _formBuilder, _translateService) {
6386
- this._iassistService = _iassistService;
6387
- this._formBuilder = _formBuilder;
6388
- this._translateService = _translateService;
6389
- this.isVisible = false;
6390
- this.isLoading = false;
6391
- }
6392
- ngOnInit() {
6393
- this._createDialogFields();
6394
- this._createDialogFormGroup();
6395
- }
6396
- showDialog() {
6397
- this.isVisible = true;
6398
- }
6399
- onHideDialog() {
6400
- this.formGroup.get("context").setValue("");
6401
- }
6402
- hideDialog() {
6403
- this.isVisible = false;
6404
- }
6405
- submitContext() {
6406
- const context = this.formGroup.get("context");
6407
- this.isLoading = true;
6408
- this._iassistService.askIA(context.value, {
6409
- id: this.field.id,
6410
- label: this.field.label,
6411
- placeholder: this.field.placeholder,
6412
- })
6413
- .pipe(catchError((err) => {
6414
- this.isLoading = false;
6415
- return throwError(err);
6416
- }))
6417
- .subscribe((res) => {
6418
- this.formControl.setValue(res.text);
6419
- this.isLoading = false;
6420
- });
6421
- this.hideDialog();
6422
- }
6423
- _createDialogFields() {
6424
- this.fields = [
6425
- new FormField({
6426
- name: "context",
6427
- type: FieldType.String,
6428
- label: this._translateService.instant("platform.angular_components.context"),
6429
- size: { sm: 12, md: 12, lg: 12, xl: 12 },
6430
- }),
6431
- ];
6432
- }
6433
- _createDialogFormGroup() {
6434
- this.formGroup = this._formBuilder.group({
6435
- context: [""],
6436
- });
6437
- }
6650
+ let CalendarFieldComponent = class CalendarFieldComponent {
6438
6651
  };
6439
- TextAreaIAFieldComponent.ctorParameters = () => [
6440
- { type: IAssistService },
6441
- { type: FormBuilder },
6442
- { type: TranslateService }
6443
- ];
6444
6652
  __decorate([
6445
6653
  Input()
6446
- ], TextAreaIAFieldComponent.prototype, "field", void 0);
6654
+ ], CalendarFieldComponent.prototype, "field", void 0);
6447
6655
  __decorate([
6448
6656
  Input()
6449
- ], TextAreaIAFieldComponent.prototype, "formControl", void 0);
6450
- TextAreaIAFieldComponent = __decorate([
6657
+ ], CalendarFieldComponent.prototype, "formControl", void 0);
6658
+ __decorate([
6659
+ Input()
6660
+ ], CalendarFieldComponent.prototype, "showTime", void 0);
6661
+ __decorate([
6662
+ Input()
6663
+ ], CalendarFieldComponent.prototype, "timeOnly", void 0);
6664
+ CalendarFieldComponent = __decorate([
6451
6665
  Component({
6452
- template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"> \n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\">\n <p-header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n {{ 'platform.angular_components.iassist_text_generator' | translate }}\n </div>\n </p-header>\n <s-dynamic-form\n [fields]=\"fields\"\n [form]=\"formGroup\">\n </s-dynamic-form>\n <p-footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (onClick)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\">\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\">\n </s-button>\n </div>\n </p-footer>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <textarea\n [id]=\"(field.id || field.name)\"\n pInputTextarea\n [rows]=\"field.rows\"\n [cols]=\"field.cols\"\n [formControl]=\"formControl\"\n style=\"resize: vertical;\"\n [ngStyle]=\"field.style\">\n </textarea>\n <button\n class=\"iassist-button\"\n (click)=\"showDialog()\"\n [sTooltip]=\"'platform.angular_components.iassist_text_generator' | translate\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n </svg>\n</ng-template>",
6453
- styles: [".footer-content{display:-ms-flexbox;display:flex;-ms-flex-positive:0;flex-grow:0}.textarea-ia{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;gap:8px}.iassist-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:-ms-flexbox;display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}"]
6666
+ template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <!-- Remover as propriedades [showTransitionOptions] e [hideTransitionOptions] quando atualizar para o PrimeNG v10, esses atributos foram\n usados para remover um bug ocasionado pela anima\u00E7\u00E3o do componente p-calendar, bug explicado nas issues: #ERPROM-5534, #ERPROM-8248 e #DSN-1045. -->\n <p-calendar\n #calendar\n sCalendarMask\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [showIcon]=\"true\"\n [timeOnly]=\"timeOnly\"\n [selectionMode]=\"field.selectionMode\"\n [rangeSeparator]=\"field.rangeSeparator\"\n [showTime]=\"showTime\"\n [showSeconds]=\"field.showSeconds\"\n [showOnFocus]=\"field.showOnFocus\"\n [formControl]=\"formControl\"\n [icon]=\"timeOnly ? 'fa fa-clock' : 'fa fa-calendar'\"\n [minDate]=\"field.minDate\"\n [maxDate]=\"field.maxDate\"\n [defaultDate]=\"field.defaultDate\"\n [locale]=\"field.calendarLocaleOptions\"\n [dateFormat]=\"field.calendarLocaleOptions.dateFormat\"\n [hourFormat]=\"field.calendarLocaleOptions.hourFormat\"\n [view]=\"field.view\"\n [placeholder]=\"field.placeholder\"\n inputStyleClass=\"mousetrap\"\n [appendTo]=\"field.appendTo\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event): null\"\n (onSelect)=\"field.onSelect ? field.onSelect($event) : null\"\n (onClose)=\"field.onClose ? field.onClose($event) : null\"\n (onTodayClick)=\"field.onTodayClick ? field.onTodayClick($event) : null\"\n (onClearClick)=\"field.onClearClick ? field.onClearClick($event) : null\"\n (onMonthChange)=\"field.onMonthChange ? field.onMonthChange($event) : null\"\n (onYearChange)=\"field.onYearChange ? field.onYearChange($event) : null\"\n [showTransitionOptions]=\"'0ms'\"\n [hideTransitionOptions]=\"'0ms'\">\n </p-calendar>\n</div>\n"
6454
6667
  })
6455
- ], TextAreaIAFieldComponent);
6668
+ ], CalendarFieldComponent);
6456
6669
 
6457
- let TextFieldComponent = class TextFieldComponent extends BaseFieldComponent {
6458
- constructor() {
6459
- super(...arguments);
6460
- this.onInput = new EventEmitter();
6461
- this.onFocus = new EventEmitter();
6462
- this.onComplete = new EventEmitter();
6463
- this.ngUnsubscribe = new Subject();
6464
- }
6465
- ngOnInit() {
6466
- this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6467
- if (this.field.onFocus)
6468
- this.field.onFocus(event);
6469
- });
6470
- this.onInput.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6471
- if (this.field.onInput)
6472
- this.field.onInput(event);
6473
- });
6474
- this.onComplete.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6475
- if (this.field.onComplete)
6476
- this.field.onComplete(event);
6477
- });
6670
+ let ChipsFieldComponent = class ChipsFieldComponent {
6671
+ constructor(clipboard) {
6672
+ this.clipboard = clipboard;
6673
+ this.feedbackMessageVisible = false;
6674
+ this.copyButtonVisible = true;
6478
6675
  }
6479
- ngOnDestroy() {
6480
- this.ngUnsubscribe.next();
6481
- this.ngUnsubscribe.complete();
6676
+ onCopyFieldContent() {
6677
+ if (this.formControl.value) {
6678
+ this.copyButtonVisible = false;
6679
+ this.feedbackMessageVisible = true;
6680
+ setTimeout(() => {
6681
+ this.feedbackMessageVisible = false;
6682
+ this.copyButtonVisible = true;
6683
+ }, 3000);
6684
+ const content = this.formControl.value.join(this.field.separator || "\n");
6685
+ this.clipboard.copy(content);
6686
+ if (this.field.onCopy) {
6687
+ this.field.onCopy(content);
6688
+ }
6689
+ }
6482
6690
  }
6483
6691
  };
6692
+ ChipsFieldComponent.ctorParameters = () => [
6693
+ { type: Clipboard }
6694
+ ];
6484
6695
  __decorate([
6485
- Input()
6486
- ], TextFieldComponent.prototype, "field", void 0);
6487
- __decorate([
6488
- Input()
6489
- ], TextFieldComponent.prototype, "formControl", void 0);
6490
- __decorate([
6491
- Output()
6492
- ], TextFieldComponent.prototype, "onInput", void 0);
6493
- __decorate([
6494
- Output()
6495
- ], TextFieldComponent.prototype, "onFocus", void 0);
6696
+ Input()
6697
+ ], ChipsFieldComponent.prototype, "field", void 0);
6496
6698
  __decorate([
6497
- Output()
6498
- ], TextFieldComponent.prototype, "onComplete", void 0);
6499
- TextFieldComponent = __decorate([
6699
+ Input()
6700
+ ], ChipsFieldComponent.prototype, "formControl", void 0);
6701
+ ChipsFieldComponent = __decorate([
6500
6702
  Component({
6501
- template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n [type]=\"field.inputType || 'text'\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\">\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"field.keyFilter ? inputKeyFilter : input\"></ng-container>\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [type]=\"field.inputType || 'text'\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\" />\n</ng-template>\n<ng-template #inputKeyFilter>\n <input\n #inputText\n [type]=\"field.inputType || 'text'\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [pKeyFilter]=\"field.keyFilter\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\" />\n</ng-template>\n",
6502
- encapsulation: ViewEncapsulation.None,
6503
- styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
6703
+ template: "<div class=\"chips-field-wrapper\">\n <div style=\"width: 100%;\">\n <p-chips\n *ngIf=\"field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [pKeyFilter]=\"field.keyFilter\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n </p-chips>\n \n <p-chips\n *ngIf=\"!field.keyFilter\"\n [inputId]=\"(field.id || field.name)\"\n [formControl]=\"formControl\"\n [placeholder]=\"field.placeholder\"\n [allowDuplicate]=\"false\"\n [addOnTab]=\"true\"\n [addOnBlur]=\"true\"\n (onAdd)=\"field.onAdd ? field.onAdd($event) : null\"\n (onRemove)=\"field.onRemove ? field.onRemove($event) : null\"\n (onChipClick)=\"field.onChipClick ? field.onChipClick($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n <ng-template let-item pTemplate=\"item\">\n <span\n class=\"chip-content\"\n [sTooltip]=\"item\">\n {{ item }}\n </span>\n </ng-template>\n </p-chips>\n </div>\n \n <button\n *ngIf=\"field.showCopyButton && formControl.value?.length > 0 && copyButtonVisible\"\n class=\"copy-content-button\"\n (click)=\"onCopyFieldContent()\">\n {{ \"platform.angular_components.copy_field_content\" | translate }}\n </button>\n \n <span\n *ngIf=\"feedbackMessageVisible\"\n class=\"feedback-message\">\n {{ \"platform.angular_components.copied_to_clipboard\" | translate }}\n </span>\n</div>\n",
6704
+ styles: [".chips-field-wrapper{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.chips-field-wrapper .chip-content{display:block;overflow:hidden;padding-right:1rem;text-overflow:ellipsis}.chips-field-wrapper .copy-content-button{background-color:transparent;border:none;color:#2a6496;cursor:pointer;margin-top:8px}.chips-field-wrapper .feedback-message{color:#0c9348;display:block;margin-top:8px;-webkit-user-select:none;-ms-user-select:none;user-select:none}"]
6504
6705
  })
6505
- ], TextFieldComponent);
6706
+ ], ChipsFieldComponent);
6506
6707
 
6507
- let RowComponent = class RowComponent {
6508
- constructor() { }
6509
- ngOnInit() { }
6510
- getErrorMessages(errorMessages) {
6511
- if (errorMessages)
6512
- return this.isFunction(errorMessages) ? errorMessages() : errorMessages;
6513
- return this.errorMessages;
6514
- }
6515
- isFunction(value) {
6516
- return value instanceof Function;
6517
- }
6708
+ let CountryPhonePickerFieldComponent = class CountryPhonePickerFieldComponent {
6518
6709
  };
6519
6710
  __decorate([
6520
6711
  Input()
6521
- ], RowComponent.prototype, "id", void 0);
6712
+ ], CountryPhonePickerFieldComponent.prototype, "field", void 0);
6522
6713
  __decorate([
6523
6714
  Input()
6524
- ], RowComponent.prototype, "config", void 0);
6715
+ ], CountryPhonePickerFieldComponent.prototype, "formControl", void 0);
6716
+ CountryPhonePickerFieldComponent = __decorate([
6717
+ Component({
6718
+ template: "<s-country-phone-picker\n [formControl]=\"formControl\"\n [ordination]=\"field.ordination\"\n [countries]=\"field.countries\"\n (selected)=\"field.onSelected\"\n (focusLost)=\"field.onFocusLost\">\n</s-country-phone-picker>"
6719
+ })
6720
+ ], CountryPhonePickerFieldComponent);
6721
+
6722
+ /**
6723
+ * @deprecated Should use bignumber instead
6724
+ */
6725
+ let CurrencyFieldComponent = class CurrencyFieldComponent extends BaseFieldComponent {
6726
+ };
6525
6727
  __decorate([
6526
6728
  Input()
6527
- ], RowComponent.prototype, "group", void 0);
6729
+ ], CurrencyFieldComponent.prototype, "field", void 0);
6528
6730
  __decorate([
6529
6731
  Input()
6530
- ], RowComponent.prototype, "errorMessages", void 0);
6531
- RowComponent = __decorate([
6732
+ ], CurrencyFieldComponent.prototype, "formControl", void 0);
6733
+ CurrencyFieldComponent = __decorate([
6532
6734
  Component({
6533
- template: `
6534
- <div class="ui-fluid" [formGroup]="group">
6535
- <div class="ui-g">
6536
- <ng-container *ngFor="let field of config.fields">
6537
- <div [ngClass]="field.gridClass" *ngIf="field.visible()">
6538
- <label
6539
- [for]="field.name"
6540
- [ngClass]="{ 'required': field.required() }"
6541
- *sInfoSign="field.infoSign"
6542
- >
6543
- {{ field.label }}
6544
- </label>
6545
- <ng-container *sDynamicForm="{ id: id, config: field, group: group}"></ng-container>
6546
- <s-control-errors [form]="group" [control]="group.controls[field.name]"
6547
- [errorMessages]="getErrorMessages(field.errorMessages)"></s-control-errors>
6548
- <ng-template *ngIf="field?.bottomTemplate" [ngTemplateOutlet]="field.bottomTemplate"></ng-template>
6549
- </div>
6550
- </ng-container>
6551
- </div>
6552
- `
6735
+ template: "<div class=\"ui-inputgroup\">\n <span\n *ngIf=\"field.numberLocaleOptions.currencySymbol\"\n class=\"ui-inputgroup-addon\">\n {{ field.numberLocaleOptions.currencySymbol }}\n </span>\n <input\n *ngIf=\"!field.mask\"\n type=\"text\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n sNumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"field.onFocus ? field.onFocus($event): null\" />\n <p-inputMask\n *ngIf=\"field.mask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [formControl]=\"formControl\"\n [mask]=\"field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"field.onFocus ? field.onFocus($event): null\"\n (onComplete)=\"field.onComplete ? field.onComplete($event) : null\"\n (onInput)=\"field.onInput ? field.onInput($event) : null\" >\n </p-inputMask>\n</div>\n"
6553
6736
  })
6554
- ], RowComponent);
6737
+ ], CurrencyFieldComponent);
6555
6738
 
6556
6739
  let FieldsetComponent = class FieldsetComponent {
6557
6740
  };
@@ -6582,76 +6765,35 @@ FieldsetComponent = __decorate([
6582
6765
  })
6583
6766
  ], FieldsetComponent);
6584
6767
 
6585
- let SectionComponent = class SectionComponent {
6768
+ let FileUploadComponent$1 = class FileUploadComponent extends BaseFieldComponent {
6586
6769
  };
6587
6770
  __decorate([
6588
6771
  Input()
6589
- ], SectionComponent.prototype, "id", void 0);
6590
- __decorate([
6591
- Input()
6592
- ], SectionComponent.prototype, "config", void 0);
6593
- __decorate([
6594
- Input()
6595
- ], SectionComponent.prototype, "group", void 0);
6772
+ ], FileUploadComponent$1.prototype, "field", void 0);
6596
6773
  __decorate([
6597
6774
  Input()
6598
- ], SectionComponent.prototype, "errorMessages", void 0);
6599
- SectionComponent = __decorate([
6775
+ ], FileUploadComponent$1.prototype, "formControl", void 0);
6776
+ FileUploadComponent$1 = __decorate([
6600
6777
  Component({
6601
- template: `
6602
- <h3 *ngIf="config?.header" class="sds-section-title">{{config.header}}</h3>
6603
- <ng-container *ngFor="let conf of config.configs">
6604
- <ng-container *sDynamicForm="{ id: id, config: conf, group: group, errorMessages: errorMessages }"></ng-container>
6605
- </ng-container>
6606
- `
6778
+ template: "<s-file-upload [id]=\"(field.id || field.name)\" [accept]=\"field.accept\" [files]=\"field.files\" [multiple]=\"field.multiple\"\n [chooseLabel]=\"field.chooseLabel\" [removeLabel]=\"field.removeLabel\" [cancelLabel]=\"field.cancelLabel\"\n [successTooltip]=\"field.successTooltip\" (uploadHandler)=\"field.onUploadFile($event, field)\"\n (removeFile)=\"field.onRemoveFile($event, field)\" (cancelUpload)=\"field.onCancelUpload($event, field)\"\n (downloadFile)=\"field.onDownloadFile($event, field)\" [formGroup]=\"formControl\"\n [showFileUploadDate]=\"field.showFileUploadDate\"> \n</s-file-upload>\n"
6607
6779
  })
6608
- ], SectionComponent);
6780
+ ], FileUploadComponent$1);
6609
6781
 
6610
- let DynamicFieldComponent = class DynamicFieldComponent {
6611
- getErrorMessages(errorMessages) {
6612
- if (errorMessages)
6613
- return this.isFunction(errorMessages)
6614
- ? Object.assign(Object.assign({}, this.errorMessages), errorMessages()) : Object.assign(Object.assign({}, this.errorMessages), errorMessages);
6615
- return this.errorMessages;
6616
- }
6617
- isFunction(value) {
6618
- return value instanceof Function;
6619
- }
6782
+ let LookupFieldComponent = class LookupFieldComponent {
6620
6783
  };
6621
6784
  __decorate([
6622
6785
  Input()
6623
- ], DynamicFieldComponent.prototype, "id", void 0);
6624
- __decorate([
6625
- Input()
6626
- ], DynamicFieldComponent.prototype, "fields", void 0);
6627
- __decorate([
6628
- Input()
6629
- ], DynamicFieldComponent.prototype, "form", void 0);
6630
- __decorate([
6631
- Input()
6632
- ], DynamicFieldComponent.prototype, "errorMessages", void 0);
6786
+ ], LookupFieldComponent.prototype, "field", void 0);
6633
6787
  __decorate([
6634
6788
  Input()
6635
- ], DynamicFieldComponent.prototype, "displayTimeInfoSign", void 0);
6636
- DynamicFieldComponent = __decorate([
6789
+ ], LookupFieldComponent.prototype, "formControl", void 0);
6790
+ LookupFieldComponent = __decorate([
6637
6791
  Component({
6638
- selector: "s-dynamic-field",
6639
- template: "<div class=\"ui-fluid\" [formGroup]=\"form\">\n <div class=\"ui-g\">\n <ng-container *ngFor=\"let field of fields\">\n <div\n *ngIf=\"!field.visible || field.visible()\"\n [ngClass]=\"field.gridClass\">\n <span *ngIf=\"field.label\">\n <label\n *sInfoSign=\"field.infoSign; displayTime: displayTimeInfoSign\"\n [for]=\"field.name\"\n [ngClass]=\"{ 'required': field.required() }\">\n {{ field.label }}\n </label>\n </span>\n <ng-container *sDynamicForm=\"{\n id: id,\n config: field,\n group: form\n }\">\n </ng-container>\n <s-control-errors\n [form]=\"form\"\n [control]=\"form.controls[field.name]\"\n [errorMessages]=\"getErrorMessages(field.errorMessages)\">\n </s-control-errors>\n <ng-template\n *ngIf=\"field?.bottomTemplate\"\n [ngTemplateOutlet]=\"field.bottomTemplate\">\n </ng-template>\n </div>\n </ng-container>\n </div>\n</div>"
6792
+ template: "<div\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\">\n <s-lookup\n [id]=\"(field.id || field.name)\"\n [multiple]=\"field.multiple\"\n [formControl]=\"formControl\"\n [lookupSuggestions]=\"field.lookupSuggestions\"\n [dataKey]=\"field.dataKey\"\n [placeholder]=\"field.placeholder\"\n [searchFields]=\"field.searchFields\"\n [searchGridFields]=\"field.searchGridFields\"\n [searchGridData]=\"field.gridData\"\n (onLookupRequest)=\"field.onLookupRequest($event)\"\n (onSearchRequest)=\"field.onSearchRequest($event)\"\n [lookupDisplayField]=\"field.lookupDisplayField\"\n [searchTotalRecords]=\"field.searchTotalRecords\"\n [searchTotalRecordsLabel]=\"field.searchTotalRecordsLabel\"\n [searchTitle]=\"field.searchTitle\"\n [selectLabel]=\"field.selectLabel\"\n [searchEmptyTitle]=\"field.searchEmptyTitle\"\n [filterLabel]=\"field.filterLabel\"\n [filterTitle]=\"field.filterTitle\"\n [clearLabel]=\"field.clearLabel\"\n [cancelLabel]=\"field.cancelLabel\"\n [emptyFieldLabel]=\"field.emptyFieldLabel \"\n (onSelect)=\"field.onSelect($event)\"\n (onUnselect)=\"field.onUnselect($event)\"\n (onClear)=\"field.onClear ? field.onClear($event) : null\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n [lookupAppendTo]=\"field.appendTo\"\n [lookupEmptyMessage]=\"field.emptyMessage\"\n [recordLabel]=\"field.recordLabel\"\n [recordsLabel]=\"field.recordsLabel\"\n [defaultFilter]=\"field.defaultFilter\"\n [autocompleteForceSelection]=\"field.autocompleteForceSelection\">\n </s-lookup>\n</div>\n"
6640
6793
  })
6641
- ], DynamicFieldComponent);
6642
-
6643
- var GridType;
6644
- (function (GridType) {
6645
- GridType["Row"] = "Row";
6646
- })(GridType || (GridType = {}));
6647
-
6648
- var StructureType;
6649
- (function (StructureType) {
6650
- StructureType["Fieldset"] = "Fieldset";
6651
- StructureType["Section"] = "Section";
6652
- })(StructureType || (StructureType = {}));
6794
+ ], LookupFieldComponent);
6653
6795
 
6654
- let BignumberFieldComponent = class BignumberFieldComponent extends BaseFieldComponent {
6796
+ let NumberFieldComponent = class NumberFieldComponent extends BaseFieldComponent {
6655
6797
  constructor() {
6656
6798
  super(...arguments);
6657
6799
  this.onInput = new EventEmitter();
@@ -6660,72 +6802,52 @@ let BignumberFieldComponent = class BignumberFieldComponent extends BaseFieldCom
6660
6802
  this.ngUnsubscribe = new Subject();
6661
6803
  }
6662
6804
  ngOnInit() {
6663
- this.onFocus
6664
- .pipe(takeUntil(this.ngUnsubscribe))
6665
- .subscribe((event) => {
6666
- if (this.field.onFocus) {
6805
+ this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6806
+ if (this.field.onFocus)
6667
6807
  this.field.onFocus(event);
6668
- }
6669
6808
  });
6670
- this.onInput
6671
- .pipe(takeUntil(this.ngUnsubscribe))
6672
- .subscribe((event) => {
6673
- if (this.field.onInput) {
6809
+ this.onInput.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6810
+ if (this.field.onInput)
6674
6811
  this.field.onInput(event);
6675
- }
6676
6812
  });
6677
- this.onComplete
6678
- .pipe(takeUntil(this.ngUnsubscribe))
6679
- .subscribe((event) => {
6680
- if (this.field.onComplete) {
6813
+ this.onComplete.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6814
+ if (this.field.onComplete)
6681
6815
  this.field.onComplete(event);
6682
- }
6683
6816
  });
6684
6817
  }
6685
6818
  ngOnDestroy() {
6686
6819
  this.ngUnsubscribe.next();
6687
6820
  this.ngUnsubscribe.complete();
6688
6821
  }
6822
+ get numberAlignmentOption() {
6823
+ return NumberAlignmentOption;
6824
+ }
6689
6825
  get fieldType() {
6690
6826
  return FieldType;
6691
6827
  }
6692
6828
  };
6693
6829
  __decorate([
6694
6830
  Input()
6695
- ], BignumberFieldComponent.prototype, "field", void 0);
6831
+ ], NumberFieldComponent.prototype, "field", void 0);
6696
6832
  __decorate([
6697
6833
  Input()
6698
- ], BignumberFieldComponent.prototype, "formControl", void 0);
6834
+ ], NumberFieldComponent.prototype, "formControl", void 0);
6699
6835
  __decorate([
6700
6836
  Output()
6701
- ], BignumberFieldComponent.prototype, "onInput", void 0);
6837
+ ], NumberFieldComponent.prototype, "onInput", void 0);
6702
6838
  __decorate([
6703
6839
  Output()
6704
- ], BignumberFieldComponent.prototype, "onFocus", void 0);
6840
+ ], NumberFieldComponent.prototype, "onFocus", void 0);
6705
6841
  __decorate([
6706
6842
  Output()
6707
- ], BignumberFieldComponent.prototype, "onComplete", void 0);
6708
- BignumberFieldComponent = __decorate([
6843
+ ], NumberFieldComponent.prototype, "onComplete", void 0);
6844
+ NumberFieldComponent = __decorate([
6709
6845
  Component({
6710
- template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [autoClear]=\"field.autoClear\">\n</p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sBignumberInput\n [allowNegative]=\"field.allowNegative\"\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n",
6846
+ template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\" >\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"field.type === fieldType.Double && field.alignTo === numberAlignmentOption.LEFT ? localizedNumber : input\"></ng-container>\n\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sNumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n</ng-template>\n<ng-template #localizedNumber>\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sLocalizedNumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\" />\n</ng-template>\n",
6711
6847
  encapsulation: ViewEncapsulation.None,
6712
6848
  styles: ["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
6713
6849
  })
6714
- ], BignumberFieldComponent);
6715
-
6716
- let BooleanSwitchFieldComponent = class BooleanSwitchFieldComponent {
6717
- };
6718
- __decorate([
6719
- Input()
6720
- ], BooleanSwitchFieldComponent.prototype, "field", void 0);
6721
- __decorate([
6722
- Input()
6723
- ], BooleanSwitchFieldComponent.prototype, "formControl", void 0);
6724
- BooleanSwitchFieldComponent = __decorate([
6725
- Component({
6726
- template: "<div class=\"ui-grid ui-grid-responsive ui-grid-pad ui-fluid\">\n <div class=\"ui-grid-row\">\n <div class=\"i-grid-col-1\">\n <s-switch\n [id]=\"(field.id || field.name)\"\n [inputName]=\"field.name\"\n [formControl]=\"formControl\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n (valueChanged)=\"field.onChange ? field.onChange($event) : null\">\n </s-switch>\n </div>\n <div class=\"i-grid-col-1\" *ngIf=\"field.optionsLabel\">\n <ng-container *ngIf=\"formControl.value; else caseFalse\">\n <span>{{ field.optionsLabel.true }}</span>\n </ng-container>\n <ng-template #caseFalse>\n <span>{{ field.optionsLabel.false }}</span>\n </ng-template>\n </div>\n </div>\n</div>"
6727
- })
6728
- ], BooleanSwitchFieldComponent);
6850
+ ], NumberFieldComponent);
6729
6851
 
6730
6852
  let PasswordFieldComponent = class PasswordFieldComponent {
6731
6853
  constructor() {
@@ -6764,26 +6886,113 @@ let PasswordFieldComponent = class PasswordFieldComponent {
6764
6886
  };
6765
6887
  __decorate([
6766
6888
  Input()
6767
- ], PasswordFieldComponent.prototype, "field", void 0);
6889
+ ], PasswordFieldComponent.prototype, "field", void 0);
6890
+ __decorate([
6891
+ Input()
6892
+ ], PasswordFieldComponent.prototype, "formControl", void 0);
6893
+ __decorate([
6894
+ Output()
6895
+ ], PasswordFieldComponent.prototype, "onInput", void 0);
6896
+ __decorate([
6897
+ Output()
6898
+ ], PasswordFieldComponent.prototype, "onFocus", void 0);
6899
+ __decorate([
6900
+ Output()
6901
+ ], PasswordFieldComponent.prototype, "onComplete", void 0);
6902
+ PasswordFieldComponent = __decorate([
6903
+ Component({
6904
+ template: "<input\n type=\"password\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [sPasswordStrength]=\"field.passwordStrength\"\n [psDescription]=\"field.passwordStrengthOptions?.description\"\n [psWeakTitle]=\"field.passwordStrengthOptions?.weakTitle\"\n [psMediumTitle]=\"field.passwordStrengthOptions?.mediumTitle\"\n [psStrongTitle]=\"field.passwordStrengthOptions?.strongTitle\"\n [psValidation]=\"field.passwordStrengthOptions?.validation\" />",
6905
+ encapsulation: ViewEncapsulation.None,
6906
+ styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
6907
+ })
6908
+ ], PasswordFieldComponent);
6909
+
6910
+ let RadioButtonComponent = class RadioButtonComponent {
6911
+ constructor() {
6912
+ this.onClick = new EventEmitter();
6913
+ this.onFocus = new EventEmitter();
6914
+ this.ngUnsubscribe = new Subject();
6915
+ }
6916
+ ngOnInit() {
6917
+ this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6918
+ if (this.field.onFocus)
6919
+ this.field.onFocus(event);
6920
+ });
6921
+ this.onClick.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
6922
+ if (this.field.onClick)
6923
+ this.field.onClick(event);
6924
+ });
6925
+ }
6926
+ ngOnDestroy() {
6927
+ this.ngUnsubscribe.next();
6928
+ this.ngUnsubscribe.complete();
6929
+ }
6930
+ onClear() {
6931
+ this.formControl.reset();
6932
+ }
6933
+ };
6934
+ __decorate([
6935
+ Input()
6936
+ ], RadioButtonComponent.prototype, "field", void 0);
6937
+ __decorate([
6938
+ Input()
6939
+ ], RadioButtonComponent.prototype, "formControl", void 0);
6940
+ __decorate([
6941
+ Output()
6942
+ ], RadioButtonComponent.prototype, "onClick", void 0);
6943
+ __decorate([
6944
+ Output()
6945
+ ], RadioButtonComponent.prototype, "onFocus", void 0);
6946
+ RadioButtonComponent = __decorate([
6947
+ Component({
6948
+ template: "<ng-container *ngIf=\"field.verticalAlignment;else horizontalAlignment\">\n <div class=\"ui-g\">\n <div\n *ngFor=\"let option of field.options; let i = index\"\n class=\"ui-g-12\">\n <ng-container\n [ngTemplateOutlet]=\"radioButton\"\n [ngTemplateOutletContext]=\"{option: option, index: i}\">\n </ng-container>\n </div>\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n [label]=\"field.clearLabel || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n </div>\n</ng-container>\n\n<ng-template #horizontalAlignment>\n <div class=\"ui-g\">\n <ng-container\n *ngFor=\"let option of field.options; let i = index\"\n [ngTemplateOutlet]=\"radioButton\"\n [ngTemplateOutletContext]=\"{option: option, index: i}\">\n </ng-container>\n </div>\n <s-button\n *ngIf=\"field.showClear && !field.required() && !formControl.disabled\"\n class=\"horizontal-clear-option\"\n [label]=\"field.clearLabel || 'Clear selection'\"\n (onClick)=\"onClear()\"\n priority=\"link\">\n </s-button>\n</ng-template>\n\n<ng-template #radioButton let-option=\"option\" let-i=\"index\">\n <p-radioButton\n [name]=\"field.name\"\n [value]=\"option.value\"\n [label]=\"option.label\"\n [formControl]=\"formControl\"\n [inputId]=\"(field.id || field.name) + '-' + i\"\n [sTooltip]=\"field.tooltip\"\n (onClick)=\"onClick.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\">\n </p-radioButton>\n</ng-template>\n",
6949
+ encapsulation: ViewEncapsulation.None,
6950
+ styles: [`
6951
+ s-button.horizontal-clear-option button {
6952
+ width: min-content !important;
6953
+ }
6954
+ `]
6955
+ })
6956
+ ], RadioButtonComponent);
6957
+
6958
+ let SectionComponent = class SectionComponent {
6959
+ };
6960
+ __decorate([
6961
+ Input()
6962
+ ], SectionComponent.prototype, "id", void 0);
6768
6963
  __decorate([
6769
6964
  Input()
6770
- ], PasswordFieldComponent.prototype, "formControl", void 0);
6965
+ ], SectionComponent.prototype, "config", void 0);
6771
6966
  __decorate([
6772
- Output()
6773
- ], PasswordFieldComponent.prototype, "onInput", void 0);
6967
+ Input()
6968
+ ], SectionComponent.prototype, "group", void 0);
6774
6969
  __decorate([
6775
- Output()
6776
- ], PasswordFieldComponent.prototype, "onFocus", void 0);
6970
+ Input()
6971
+ ], SectionComponent.prototype, "errorMessages", void 0);
6972
+ SectionComponent = __decorate([
6973
+ Component({
6974
+ template: `
6975
+ <h3 *ngIf="config?.header" class="sds-section-title">{{config.header}}</h3>
6976
+ <ng-container *ngFor="let conf of config.configs">
6977
+ <ng-container *sDynamicForm="{ id: id, config: conf, group: group, errorMessages: errorMessages }"></ng-container>
6978
+ </ng-container>
6979
+ `
6980
+ })
6981
+ ], SectionComponent);
6982
+
6983
+ let SelectFieldComponent = class SelectFieldComponent extends BaseFieldComponent {
6984
+ };
6777
6985
  __decorate([
6778
- Output()
6779
- ], PasswordFieldComponent.prototype, "onComplete", void 0);
6780
- PasswordFieldComponent = __decorate([
6986
+ Input()
6987
+ ], SelectFieldComponent.prototype, "field", void 0);
6988
+ __decorate([
6989
+ Input()
6990
+ ], SelectFieldComponent.prototype, "formControl", void 0);
6991
+ SelectFieldComponent = __decorate([
6781
6992
  Component({
6782
- template: "<input\n type=\"password\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\"\n [sPasswordStrength]=\"field.passwordStrength\"\n [psDescription]=\"field.passwordStrengthOptions?.description\"\n [psWeakTitle]=\"field.passwordStrengthOptions?.weakTitle\"\n [psMediumTitle]=\"field.passwordStrengthOptions?.mediumTitle\"\n [psStrongTitle]=\"field.passwordStrengthOptions?.strongTitle\"\n [psValidation]=\"field.passwordStrengthOptions?.validation\" />",
6783
- encapsulation: ViewEncapsulation.None,
6784
- styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
6993
+ template: "<p-dropdown\n *ngIf=\"!field.multiple\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [options]=\"isFunction(field.options) ? field.options() : field.options\"\n [placeholder]=\"field.placeholder || ' '\"\n [formControl]=\"formControl\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n [showClear]=\"field.showClear\"\n dataKey=\"{{field.dataKey}}\"\n optionLabel=\"{{field.optionLabel}}\"\n [autoDisplayFirst]=\"field.autoDisplayFirst\"\n [appendTo]=\"field.appendTo || 'body'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onChange)=\"field.onChange ? field.onChange($event) : null\">\n</p-dropdown>\n<p-multiSelect\n *ngIf=\"field.multiple\"\n [formControl]=\"formControl\"\n [name]=\"field.name\"\n [inputId]=\"(field.id || field.name)\"\n [options]=\"isFunction(field.options) ? field.options() : field.options\"\n [defaultLabel]=\"field.placeholder\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [emptyFilterMessage]=\"field.emptyMessage || 'Nenhum registro encontrado'\"\n [showDelay]=\"500\"\n [selectedItemsLabel]=\"field.multipleSelectedLabel\"\n [appendTo]=\"field.appendTo || 'body'\"\n (onClick)=\"field.onClick ? field.onClick($event) : null\"\n (onChange)=\"field.onChange ? field.onChange($event) : null\">\n</p-multiSelect>\n\n"
6785
6994
  })
6786
- ], PasswordFieldComponent);
6995
+ ], SelectFieldComponent);
6787
6996
 
6788
6997
  let SliderFieldComponent = class SliderFieldComponent extends BaseFieldComponent {
6789
6998
  constructor() {
@@ -6866,242 +7075,114 @@ SliderFieldComponent = __decorate([
6866
7075
  })
6867
7076
  ], SliderFieldComponent);
6868
7077
 
6869
- class DynamicForm {
6870
- constructor({ group, errorMessages }) {
6871
- this.group = group;
6872
- this.errorMessages = errorMessages;
6873
- }
6874
- }
6875
- class DynamicField extends DynamicForm {
6876
- constructor({ group, field, errorMessages }) {
6877
- super({
6878
- group,
6879
- errorMessages,
6880
- });
6881
- this.field = field;
6882
- this.setFieldPropertiesByType();
6883
- }
6884
- setFieldPropertiesByType() {
6885
- if (this.field.type === FieldType.Integer || this.field.type === FieldType.Double) {
6886
- this.field.numberLocaleOptions.currencySymbol = "";
6887
- }
6888
- }
6889
- createComponent(resolver, container) {
6890
- const componentFactory = resolver.resolveComponentFactory(this.getComponent());
6891
- const component = container.createComponent(componentFactory);
6892
- component.instance.field = this.field;
6893
- // Must be this way because some teams use name like "e070emp.codemp"
6894
- component.instance.formControl = this.group["controls"][this.field.name];
6895
- component.instance.errorMessages = this.errorMessages;
6896
- this.setVariablesByType(component);
6897
- return component;
6898
- }
6899
- setVariablesByType(component) {
6900
- if (this.field.type == FieldType.Time) {
6901
- component.instance.timeOnly = true;
6902
- }
6903
- if ([FieldType.LocalDateTime, FieldType.DateTime, FieldType.Time].includes(this.field.type)) {
6904
- component.instance.showTime = true;
6905
- }
6906
- }
6907
- updateVariables(component) {
6908
- component.instance.field = this.field;
6909
- component.instance.formControl = this.group["controls"][this.field.name];
6910
- this.setVariablesByType(component);
6911
- }
6912
- getComponent() {
6913
- switch (this.field.type) {
6914
- case FieldType.Autocomplete:
6915
- return AutocompleteFieldComponent;
6916
- case FieldType.Binary:
6917
- case FieldType.String:
6918
- return TextFieldComponent;
6919
- case FieldType.Boolean:
6920
- return this.field.representedBy === "switch" ? BooleanSwitchFieldComponent : BooleanFieldComponent;
6921
- case FieldType.Chips:
6922
- return ChipsFieldComponent;
6923
- case FieldType.Date:
6924
- case FieldType.DateTime:
6925
- case FieldType.LocalDateTime:
6926
- case FieldType.Time:
6927
- return CalendarFieldComponent;
6928
- case FieldType.Number:
6929
- case FieldType.Integer:
6930
- case FieldType.Double:
6931
- return BignumberFieldComponent;
6932
- case FieldType.Enum:
6933
- return SelectFieldComponent;
6934
- case FieldType.Lookup:
6935
- return LookupFieldComponent;
6936
- case FieldType.Money:
6937
- return CurrencyFieldComponent;
6938
- case FieldType.Radio:
6939
- return RadioButtonComponent;
6940
- case FieldType.Text:
6941
- return TextAreaFieldComponent;
6942
- case FieldType.TextIA:
6943
- return TextAreaIAFieldComponent;
6944
- case FieldType.Password:
6945
- return PasswordFieldComponent;
6946
- case FieldType.Blob:
6947
- return FileUploadComponent$1;
6948
- case FieldType.Slider:
6949
- return SliderFieldComponent;
6950
- case FieldType.Custom:
6951
- return this.field.CustomFieldComponentClass;
6952
- default:
6953
- throw new Error(`Trying to use an unsupported type (${this.field.type}).`);
6954
- }
6955
- }
6956
- }
6957
- class DynamicStructure extends DynamicForm {
6958
- constructor({ group, config, errorMessages }) {
6959
- super({
6960
- group,
6961
- errorMessages,
6962
- });
6963
- this.config = config;
6964
- }
6965
- createComponent(resolver, container) {
6966
- const componentFactory = resolver.resolveComponentFactory(this.getComponent());
6967
- const component = container.createComponent(componentFactory);
6968
- component.instance.config = this.config;
6969
- component.instance.group = this.group;
6970
- return component;
6971
- }
6972
- updateVariables(component) {
6973
- component.instance.structure = this.config;
6974
- component.instance.group = this.group;
6975
- }
6976
- getComponent() {
6977
- switch (this.config.type) {
6978
- case StructureType.Fieldset:
6979
- return FieldsetComponent;
6980
- case StructureType.Section:
6981
- return SectionComponent;
6982
- default:
6983
- throw new Error(`Trying to use an unsupported type (${this.config.type}).`);
6984
- }
6985
- }
6986
- }
6987
- class DynamicGrid extends DynamicForm {
6988
- constructor({ group, config, errorMessages }) {
6989
- super({ group, errorMessages });
6990
- this.config = config;
6991
- }
6992
- createComponent(resolver, container) {
6993
- const componentFactory = resolver.resolveComponentFactory(this.getComponent());
6994
- const component = container.createComponent(componentFactory);
6995
- component.instance.config = this.config;
6996
- component.instance.group = this.group;
6997
- component.instance.errorMessages = this.errorMessages;
6998
- return component;
6999
- }
7000
- updateVariables(component) {
7001
- component.instance.config = this.config;
7002
- component.instance.group = this.group;
7003
- }
7004
- getComponent() {
7005
- switch (this.config.type) {
7006
- case GridType.Row:
7007
- return RowComponent;
7008
- default:
7009
- throw new Error(`Trying to use an unsupported type (${this.config.type}).`);
7010
- }
7011
- }
7012
- }
7078
+ let TextAreaFieldComponent = class TextAreaFieldComponent {
7079
+ };
7080
+ __decorate([
7081
+ Input()
7082
+ ], TextAreaFieldComponent.prototype, "field", void 0);
7083
+ __decorate([
7084
+ Input()
7085
+ ], TextAreaFieldComponent.prototype, "formControl", void 0);
7086
+ TextAreaFieldComponent = __decorate([
7087
+ Component({
7088
+ template: "<textarea\n [id]=\"(field.id || field.name)\"\n *ngIf=\"!field.keyFilter\"\n pInputTextarea\n [rows]=\"field.rows\"\n [cols]=\"field.cols\"\n [formControl]=\"formControl\"\n style=\"resize: vertical;\"\n [ngStyle]=\"field.style\"\n></textarea>\n<textarea\n [id]=\"(field.id || field.name)\"\n *ngIf=\"field.keyFilter\"\n pInputTextarea\n [rows]=\"field.rows\"\n [cols]=\"field.cols\"\n [formControl]=\"formControl\"\n style=\"resize: vertical;\"\n [pKeyFilter]=\"field.keyFilter\"\n [ngStyle]=\"field.style\"\n></textarea>\n"
7089
+ })
7090
+ ], TextAreaFieldComponent);
7013
7091
 
7014
- let DynamicFormDirective = class DynamicFormDirective {
7015
- constructor(resolver, container) {
7016
- this.resolver = resolver;
7017
- this.container = container;
7018
- }
7019
- set sDynamicForm(context) {
7020
- const { id, config, group, errorMessages } = context;
7021
- this.id = id;
7022
- this.config = config;
7023
- this.group = group;
7024
- this.errorMessages = errorMessages;
7092
+ let TextAreaIAFieldComponent = class TextAreaIAFieldComponent {
7093
+ constructor(_iassistService, _formBuilder, _translateService) {
7094
+ this._iassistService = _iassistService;
7095
+ this._formBuilder = _formBuilder;
7096
+ this._translateService = _translateService;
7097
+ this.isVisible = false;
7098
+ this.isLoading = false;
7025
7099
  }
7026
7100
  ngOnInit() {
7027
- if (this.isField()) {
7028
- if (!(this.config.id) && this.id) {
7029
- this.config.id = this.id + "-" + this.config.name;
7030
- }
7031
- this.directiveConfig = new DynamicField({
7032
- group: this.group,
7033
- field: this.config,
7034
- errorMessages: this.errorMessages,
7035
- });
7036
- }
7037
- else if (this.isStructure()) {
7038
- this.directiveConfig = new DynamicStructure({
7039
- group: this.group,
7040
- config: this.config,
7041
- errorMessages: this.errorMessages,
7042
- });
7043
- }
7044
- else if (this.isGrid()) {
7045
- this.directiveConfig = new DynamicGrid({
7046
- group: this.group,
7047
- config: this.config,
7048
- errorMessages: this.errorMessages,
7049
- });
7050
- }
7051
- else
7052
- throw new Error(`Trying to use an unsupported type (${this.config.type}).`);
7053
- this.component = this.directiveConfig.createComponent(this.resolver, this.container);
7054
- this.component.instance.id = this.id;
7055
- this.component.instance.errorMessages = this.errorMessages;
7101
+ this._createDialogFields();
7102
+ this._createDialogFormGroup();
7103
+ }
7104
+ showDialog() {
7105
+ this.isVisible = true;
7056
7106
  }
7057
- ngOnChanges() {
7058
- if (this.component) {
7059
- this.directiveConfig.updateVariables(this.component);
7060
- this.component.instance.errorMessages = this.errorMessages;
7061
- }
7107
+ onHideDialog() {
7108
+ this.formGroup.get("context").setValue("");
7062
7109
  }
7063
- isField() {
7064
- return FieldType[this.config.type];
7110
+ hideDialog() {
7111
+ this.isVisible = false;
7065
7112
  }
7066
- isStructure() {
7067
- return StructureType[this.config.type];
7113
+ submitContext() {
7114
+ const context = this.formGroup.get("context");
7115
+ this.isLoading = true;
7116
+ this._iassistService.askIA(context.value, {
7117
+ id: this.field.id,
7118
+ label: this.field.label,
7119
+ placeholder: this.field.placeholder,
7120
+ })
7121
+ .pipe(catchError((err) => {
7122
+ this.isLoading = false;
7123
+ return throwError(err);
7124
+ }))
7125
+ .subscribe((res) => {
7126
+ this.formControl.setValue(res.text);
7127
+ this.isLoading = false;
7128
+ });
7129
+ this.hideDialog();
7068
7130
  }
7069
- isGrid() {
7070
- return GridType[this.config.type];
7131
+ _createDialogFields() {
7132
+ this.fields = [
7133
+ new FormField({
7134
+ name: "context",
7135
+ type: FieldType.String,
7136
+ label: this._translateService.instant("platform.angular_components.context"),
7137
+ size: { sm: 12, md: 12, lg: 12, xl: 12 },
7138
+ }),
7139
+ ];
7140
+ }
7141
+ _createDialogFormGroup() {
7142
+ this.formGroup = this._formBuilder.group({
7143
+ context: [""],
7144
+ });
7071
7145
  }
7072
7146
  };
7073
- DynamicFormDirective.ctorParameters = () => [
7074
- { type: ComponentFactoryResolver },
7075
- { type: ViewContainerRef }
7147
+ TextAreaIAFieldComponent.ctorParameters = () => [
7148
+ { type: IAssistService },
7149
+ { type: FormBuilder },
7150
+ { type: TranslateService }
7076
7151
  ];
7077
7152
  __decorate([
7078
7153
  Input()
7079
- ], DynamicFormDirective.prototype, "sDynamicForm", null);
7154
+ ], TextAreaIAFieldComponent.prototype, "field", void 0);
7080
7155
  __decorate([
7081
- Input("sDynamicFormDisplayTimeInfoSign")
7082
- ], DynamicFormDirective.prototype, "displayTimeInfoSign", void 0);
7083
- DynamicFormDirective = __decorate([
7084
- Directive({ selector: "[sDynamicForm]" })
7085
- ], DynamicFormDirective);
7156
+ Input()
7157
+ ], TextAreaIAFieldComponent.prototype, "formControl", void 0);
7158
+ TextAreaIAFieldComponent = __decorate([
7159
+ Component({
7160
+ template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"> \n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\">\n <p-header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n {{ 'platform.angular_components.iassist_text_generator' | translate }}\n </div>\n </p-header>\n <s-dynamic-form\n [fields]=\"fields\"\n [form]=\"formGroup\">\n </s-dynamic-form>\n <p-footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (onClick)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\">\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (onClick)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\">\n </s-button>\n </div>\n </p-footer>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <textarea\n [id]=\"(field.id || field.name)\"\n pInputTextarea\n [rows]=\"field.rows\"\n [cols]=\"field.cols\"\n [formControl]=\"formControl\"\n style=\"resize: vertical;\"\n [ngStyle]=\"field.style\">\n </textarea>\n <button\n class=\"iassist-button\"\n (click)=\"showDialog()\"\n [sTooltip]=\"'platform.angular_components.iassist_text_generator' | translate\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg style=\"width: 100%; height: 100%;\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\" fill=\"#0FA389\"/>\n <path d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\" fill=\"#0FA389\"/>\n <path d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\" fill=\"#F3F3F5\"/>\n <path d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\" fill=\"#0C847B\"/>\n <path d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\" fill=\"#0C847B\"/>\n </svg>\n</ng-template>",
7161
+ styles: [".footer-content{display:-ms-flexbox;display:flex;-ms-flex-positive:0;flex-grow:0}.textarea-ia{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;gap:8px}.iassist-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:-ms-flexbox;display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}"]
7162
+ })
7163
+ ], TextAreaIAFieldComponent);
7086
7164
 
7087
- let LongPressDirective = class LongPressDirective {
7165
+ let TextFieldComponent = class TextFieldComponent extends BaseFieldComponent {
7088
7166
  constructor() {
7089
- this.sLongPressDelay = 500;
7090
- this.sLongPress = new EventEmitter();
7091
- this.mouseUp = new Subject();
7092
- this.mouseDown = new Subject();
7167
+ super(...arguments);
7168
+ this.onInput = new EventEmitter();
7169
+ this.onFocus = new EventEmitter();
7170
+ this.onComplete = new EventEmitter();
7093
7171
  this.ngUnsubscribe = new Subject();
7094
7172
  }
7095
- onMouseUp(event) {
7096
- this.mouseUp.next(event);
7097
- }
7098
- onMouseDown(event) {
7099
- this.mouseDown.next(event);
7100
- }
7101
7173
  ngOnInit() {
7102
- this.mouseDown
7103
- .pipe(debounceTime(this.sLongPressDelay), takeUntil(this.mouseUp), repeat(), takeUntil(this.ngUnsubscribe))
7104
- .subscribe(event => this.sLongPress.emit(event));
7174
+ this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
7175
+ if (this.field.onFocus)
7176
+ this.field.onFocus(event);
7177
+ });
7178
+ this.onInput.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
7179
+ if (this.field.onInput)
7180
+ this.field.onInput(event);
7181
+ });
7182
+ this.onComplete.pipe(takeUntil(this.ngUnsubscribe)).subscribe((event) => {
7183
+ if (this.field.onComplete)
7184
+ this.field.onComplete(event);
7185
+ });
7105
7186
  }
7106
7187
  ngOnDestroy() {
7107
7188
  this.ngUnsubscribe.next();
@@ -7110,420 +7191,375 @@ let LongPressDirective = class LongPressDirective {
7110
7191
  };
7111
7192
  __decorate([
7112
7193
  Input()
7113
- ], LongPressDirective.prototype, "sLongPressDelay", void 0);
7194
+ ], TextFieldComponent.prototype, "field", void 0);
7195
+ __decorate([
7196
+ Input()
7197
+ ], TextFieldComponent.prototype, "formControl", void 0);
7114
7198
  __decorate([
7115
7199
  Output()
7116
- ], LongPressDirective.prototype, "sLongPress", void 0);
7200
+ ], TextFieldComponent.prototype, "onInput", void 0);
7117
7201
  __decorate([
7118
- HostListener("mouseup", ["$event"]),
7119
- HostListener("touchend", ["$event"])
7120
- ], LongPressDirective.prototype, "onMouseUp", null);
7202
+ Output()
7203
+ ], TextFieldComponent.prototype, "onFocus", void 0);
7121
7204
  __decorate([
7122
- HostListener("mousedown", ["$event"]),
7123
- HostListener("touchstart", ["$event"])
7124
- ], LongPressDirective.prototype, "onMouseDown", null);
7125
- LongPressDirective = __decorate([
7126
- Directive({
7127
- selector: "[sLongPress]",
7205
+ Output()
7206
+ ], TextFieldComponent.prototype, "onComplete", void 0);
7207
+ TextFieldComponent = __decorate([
7208
+ Component({
7209
+ template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n [type]=\"field.inputType || 'text'\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\">\n</p-inputMask>\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"field.keyFilter ? inputKeyFilter : input\"></ng-container>\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>\n<ng-template #input>\n <input\n [type]=\"field.inputType || 'text'\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\" />\n</ng-template>\n<ng-template #inputKeyFilter>\n <input\n #inputText\n [type]=\"field.inputType || 'text'\"\n [id]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [sTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n [maxLength]=\"field.maxLength\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n (input)=\"onInput.next($event)\"\n [pKeyFilter]=\"field.keyFilter\"\n [formControl]=\"formControl\"\n [ngStyle]=\"field.style\" />\n</ng-template>\n",
7210
+ encapsulation: ViewEncapsulation.None,
7211
+ styles: ["s-text-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-text-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
7128
7212
  })
7129
- ], LongPressDirective);
7213
+ ], TextFieldComponent);
7130
7214
 
7131
- let DoubleClickDirective = class DoubleClickDirective {
7132
- constructor() {
7133
- this.onDoubleClick = new EventEmitter();
7134
- this._timeout = null;
7135
- this._DOUBLE_CLICK_DELAY = 500;
7136
- }
7137
- onClick(event) {
7138
- this.handleOnClickEvent(event);
7139
- }
7140
- handleOnClickEvent(event) {
7141
- if (this._timeout) {
7142
- this.clearTimeout();
7143
- this.onDoubleClick.emit(event);
7144
- }
7145
- else {
7146
- this._timeout = setTimeout(() => this.clearTimeout(), this._DOUBLE_CLICK_DELAY);
7147
- }
7215
+ let RowComponent = class RowComponent {
7216
+ constructor() { }
7217
+ ngOnInit() { }
7218
+ getErrorMessages(errorMessages) {
7219
+ if (errorMessages)
7220
+ return this.isFunction(errorMessages) ? errorMessages() : errorMessages;
7221
+ return this.errorMessages;
7148
7222
  }
7149
- clearTimeout() {
7150
- clearTimeout(this._timeout);
7151
- this._timeout = null;
7223
+ isFunction(value) {
7224
+ return value instanceof Function;
7152
7225
  }
7153
7226
  };
7154
7227
  __decorate([
7155
- Output()
7156
- ], DoubleClickDirective.prototype, "onDoubleClick", void 0);
7228
+ Input()
7229
+ ], RowComponent.prototype, "id", void 0);
7157
7230
  __decorate([
7158
- HostListener("click", ["$event"])
7159
- ], DoubleClickDirective.prototype, "onClick", null);
7160
- DoubleClickDirective = __decorate([
7161
- Directive({
7162
- selector: '[sDoubleClick]'
7163
- })
7164
- ], DoubleClickDirective);
7165
-
7166
- let MouseEventsModule = class MouseEventsModule {
7167
- };
7168
- MouseEventsModule = __decorate([
7169
- NgModule({
7170
- imports: [CommonModule],
7171
- declarations: [
7172
- LongPressDirective,
7173
- DoubleClickDirective
7174
- ],
7175
- exports: [
7176
- LongPressDirective,
7177
- DoubleClickDirective
7178
- ],
7231
+ Input()
7232
+ ], RowComponent.prototype, "config", void 0);
7233
+ __decorate([
7234
+ Input()
7235
+ ], RowComponent.prototype, "group", void 0);
7236
+ __decorate([
7237
+ Input()
7238
+ ], RowComponent.prototype, "errorMessages", void 0);
7239
+ RowComponent = __decorate([
7240
+ Component({
7241
+ template: `
7242
+ <div class="ui-fluid" [formGroup]="group">
7243
+ <div class="ui-g">
7244
+ <ng-container *ngFor="let field of config.fields">
7245
+ <div [ngClass]="field.gridClass" *ngIf="field.visible()">
7246
+ <label
7247
+ [for]="field.name"
7248
+ [ngClass]="{ 'required': field.required() }"
7249
+ *sInfoSign="field.infoSign"
7250
+ >
7251
+ {{ field.label }}
7252
+ </label>
7253
+ <ng-container *sDynamicForm="{ id: id, config: field, group: group}"></ng-container>
7254
+ <s-control-errors [form]="group" [control]="group.controls[field.name]"
7255
+ [errorMessages]="getErrorMessages(field.errorMessages)"></s-control-errors>
7256
+ <ng-template *ngIf="field?.bottomTemplate" [ngTemplateOutlet]="field.bottomTemplate"></ng-template>
7257
+ </div>
7258
+ </ng-container>
7259
+ </div>
7260
+ `
7179
7261
  })
7180
- ], MouseEventsModule);
7181
-
7182
- var PasswordStrengths;
7183
- (function (PasswordStrengths) {
7184
- PasswordStrengths["VeryWeak"] = "Very_weak";
7185
- PasswordStrengths["Weak"] = "weak";
7186
- PasswordStrengths["Medium"] = "medium";
7187
- PasswordStrengths["Strong"] = "strong";
7188
- })(PasswordStrengths || (PasswordStrengths = {}));
7189
-
7190
- var PasswordStrengthPositions;
7191
- (function (PasswordStrengthPositions) {
7192
- PasswordStrengthPositions["Top"] = "top";
7193
- PasswordStrengthPositions["Right"] = "right";
7194
- PasswordStrengthPositions["Left"] = "left";
7195
- })(PasswordStrengthPositions || (PasswordStrengthPositions = {}));
7262
+ ], RowComponent);
7196
7263
 
7197
- let PasswordStrengthComponent = class PasswordStrengthComponent {
7198
- constructor() {
7199
- this.weakTitle = "Fraca";
7200
- this.mediumTitle = "Médio";
7201
- this.strongTitle = "Forte";
7202
- this.position = PasswordStrengthPositions.Right;
7203
- this.left = 0;
7204
- this.top = 0;
7205
- this.visible = false;
7206
- }
7207
- ngOnInit() {
7208
- this.title = this.weakTitle;
7209
- }
7210
- setPasswordStrengthPosition() {
7211
- const passwordStrength = document.querySelector(".password-strength");
7212
- switch (this.position) {
7213
- case PasswordStrengthPositions.Top:
7214
- passwordStrength.classList.add("password-strength--top");
7215
- break;
7216
- case PasswordStrengthPositions.Right:
7217
- passwordStrength.classList.add("password-strength--right");
7218
- break;
7219
- case PasswordStrengthPositions.Left:
7220
- passwordStrength.classList.add("password-strength--left");
7221
- break;
7222
- }
7264
+ let DynamicFieldComponent = class DynamicFieldComponent {
7265
+ getErrorMessages(errorMessages) {
7266
+ if (errorMessages)
7267
+ return this.isFunction(errorMessages)
7268
+ ? Object.assign(Object.assign({}, this.errorMessages), errorMessages()) : Object.assign(Object.assign({}, this.errorMessages), errorMessages);
7269
+ return this.errorMessages;
7223
7270
  }
7224
- updateIndicators(passwordStrength) {
7225
- const strengthIndicator1 = document.querySelector("#strength-indicator-1");
7226
- const strengthIndicator2 = document.querySelector("#strength-indicator-2");
7227
- const strengthIndicator3 = document.querySelector("#strength-indicator-3");
7228
- const onIndicators = [];
7229
- const indicators = [
7230
- strengthIndicator1,
7231
- strengthIndicator2,
7232
- strengthIndicator3,
7233
- ];
7234
- let strengthClass;
7235
- switch (passwordStrength) {
7236
- case PasswordStrengths.VeryWeak:
7237
- this.title = this.weakTitle;
7238
- break;
7239
- case PasswordStrengths.Weak:
7240
- this.title = this.weakTitle;
7241
- strengthClass = "strength-indicator--weak";
7242
- onIndicators.push(strengthIndicator1);
7243
- break;
7244
- case PasswordStrengths.Medium:
7245
- this.title = this.mediumTitle;
7246
- strengthClass = "strength-indicator--medium";
7247
- onIndicators.push(strengthIndicator1);
7248
- onIndicators.push(strengthIndicator2);
7249
- break;
7250
- case PasswordStrengths.Strong:
7251
- this.title = this.strongTitle;
7252
- strengthClass = "strength-indicator--strong";
7253
- onIndicators.push(strengthIndicator1);
7254
- onIndicators.push(strengthIndicator2);
7255
- onIndicators.push(strengthIndicator3);
7256
- break;
7257
- }
7258
- indicators.forEach(indicator => {
7259
- indicator.classList.remove("strength-indicator--weak", "strength-indicator--medium", "strength-indicator--strong");
7260
- });
7261
- onIndicators.forEach(indicator => {
7262
- indicator.classList.add(strengthClass);
7263
- });
7271
+ isFunction(value) {
7272
+ return value instanceof Function;
7264
7273
  }
7265
7274
  };
7266
7275
  __decorate([
7267
7276
  Input()
7268
- ], PasswordStrengthComponent.prototype, "weakTitle", void 0);
7277
+ ], DynamicFieldComponent.prototype, "id", void 0);
7269
7278
  __decorate([
7270
7279
  Input()
7271
- ], PasswordStrengthComponent.prototype, "mediumTitle", void 0);
7280
+ ], DynamicFieldComponent.prototype, "fields", void 0);
7272
7281
  __decorate([
7273
7282
  Input()
7274
- ], PasswordStrengthComponent.prototype, "strongTitle", void 0);
7283
+ ], DynamicFieldComponent.prototype, "form", void 0);
7275
7284
  __decorate([
7276
7285
  Input()
7277
- ], PasswordStrengthComponent.prototype, "description", void 0);
7278
- PasswordStrengthComponent = __decorate([
7286
+ ], DynamicFieldComponent.prototype, "errorMessages", void 0);
7287
+ __decorate([
7288
+ Input()
7289
+ ], DynamicFieldComponent.prototype, "displayTimeInfoSign", void 0);
7290
+ DynamicFieldComponent = __decorate([
7279
7291
  Component({
7280
- template: "<div\n class=\"password-strength\"\n [ngStyle]=\"{\n 'left': left + 'px',\n 'top': top + 'px'\n }\"\n [ngClass]=\"['password-strength--' + position]\">\n <span class=\"title\">{{ title }}</span>\n <div class=\"strength-indicators\">\n <span class=\"strength-indicator\" id=\"strength-indicator-1\"></span>\n <span class=\"strength-indicator\" id=\"strength-indicator-2\"></span>\n <span class=\"strength-indicator\" id=\"strength-indicator-3\"></span>\n </div>\n <span class=\"content\">{{ description }}</span>\n</div>",
7281
- styles: [".password-strength{position:fixed;transform:translateX(-50%);background-color:#fff;border-radius:2px;box-shadow:0 0 5px 1px #ccc;padding:10px;width:232px;z-index:99999}.password-strength::after{content:\"\";position:absolute}.password-strength .title{font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:700;line-height:150%}.password-strength .strength-indicators{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:10px 0}.password-strength .strength-indicators .strength-indicator{background-color:#ccc;border-radius:2px;display:inline-block;height:3px;width:64px}.password-strength .strength-indicators .strength-indicator--weak{background-color:#c13018}.password-strength .strength-indicators .strength-indicator--medium{background-color:#fcbf10}.password-strength .strength-indicators .strength-indicator--strong{background-color:#0c9348}.password-strength .content{font-family:\"Open Sans\",sans-serif;font-size:12px;font-weight:400;line-height:150%}.password-strength--top{transform:translate(-50%,-100%)}.password-strength--top::after{top:100%;right:calc(50% - 4px);border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}.password-strength--right{transform:translateY(-50%)}.password-strength--right::after{bottom:calc(50% - 8px);left:-8px;border-top:8px solid transparent;border-right:8px solid #fff;border-bottom:8px solid transparent}.password-strength--left{transform:translate(-100%,-50%)}.password-strength--left::after{bottom:calc(50% - 8px);right:-8px;border-top:8px solid transparent;border-left:8px solid #fff;border-bottom:8px solid transparent}"]
7292
+ selector: "s-dynamic-field",
7293
+ template: "<div class=\"ui-fluid\" [formGroup]=\"form\">\n <div class=\"ui-g\">\n <ng-container *ngFor=\"let field of fields\">\n <div\n *ngIf=\"!field.visible || field.visible()\"\n [ngClass]=\"field.gridClass\">\n <span *ngIf=\"field.label\">\n <label\n *sInfoSign=\"field.infoSign; displayTime: displayTimeInfoSign\"\n [for]=\"field.name\"\n [ngClass]=\"{ 'required': field.required() }\">\n {{ field.label }}\n </label>\n </span>\n <ng-container *sDynamicForm=\"{\n id: id,\n config: field,\n group: form\n }\">\n </ng-container>\n <s-control-errors\n [form]=\"form\"\n [control]=\"form.controls[field.name]\"\n [errorMessages]=\"getErrorMessages(field.errorMessages)\">\n </s-control-errors>\n <ng-template\n *ngIf=\"field?.bottomTemplate\"\n [ngTemplateOutlet]=\"field.bottomTemplate\">\n </ng-template>\n </div>\n </ng-container>\n </div>\n</div>"
7282
7294
  })
7283
- ], PasswordStrengthComponent);
7295
+ ], DynamicFieldComponent);
7284
7296
 
7285
- let PasswordStrengthDirective = class PasswordStrengthDirective {
7286
- constructor(elementRef, appRef, componentFactoryResolver, injector) {
7287
- this.elementRef = elementRef;
7288
- this.appRef = appRef;
7289
- this.componentFactoryResolver = componentFactoryResolver;
7290
- this.injector = injector;
7291
- this.enabled = true;
7292
- this.position = PasswordStrengthPositions.Right;
7293
- this.componentRef = null;
7297
+ var GridType;
7298
+ (function (GridType) {
7299
+ GridType["Row"] = "Row";
7300
+ })(GridType || (GridType = {}));
7301
+
7302
+ var StructureType;
7303
+ (function (StructureType) {
7304
+ StructureType["Fieldset"] = "Fieldset";
7305
+ StructureType["Section"] = "Section";
7306
+ })(StructureType || (StructureType = {}));
7307
+
7308
+ class DynamicForm {
7309
+ constructor({ group, errorMessages }) {
7310
+ this.group = group;
7311
+ this.errorMessages = errorMessages;
7294
7312
  }
7295
- ngOnInit() {
7296
- this.validateProperties();
7313
+ }
7314
+ class DynamicField extends DynamicForm {
7315
+ constructor({ group, field, errorMessages }) {
7316
+ super({
7317
+ group,
7318
+ errorMessages,
7319
+ });
7320
+ this.field = field;
7321
+ this.setFieldPropertiesByType();
7297
7322
  }
7298
- onFocus() {
7299
- var _a, _b, _c;
7300
- const content = (_a = this.elementRef.nativeElement.value) !== null && _a !== void 0 ? _a : "";
7301
- if (content) {
7302
- this.createPasswordStrength();
7303
- (_b = this.componentRef) === null || _b === void 0 ? void 0 : _b.instance.updateIndicators(this.validation(content));
7304
- }
7305
- else {
7306
- (_c = this.componentRef) === null || _c === void 0 ? void 0 : _c.instance.updateIndicators(PasswordStrengths.VeryWeak);
7323
+ setFieldPropertiesByType() {
7324
+ if (this.field.type === FieldType.Integer || this.field.type === FieldType.Double) {
7325
+ this.field.numberLocaleOptions.currencySymbol = "";
7307
7326
  }
7308
7327
  }
7309
- onBlur() {
7310
- this.destroyPasswordStrength();
7328
+ createComponent(resolver, container) {
7329
+ const componentFactory = resolver.resolveComponentFactory(this.getComponent());
7330
+ const component = container.createComponent(componentFactory);
7331
+ component.instance.field = this.field;
7332
+ // Must be this way because some teams use name like "e070emp.codemp"
7333
+ component.instance.formControl = this.group["controls"][this.field.name];
7334
+ component.instance.errorMessages = this.errorMessages;
7335
+ this.setVariablesByType(component);
7336
+ return component;
7311
7337
  }
7312
- createPasswordStrength() {
7313
- if (this.enabled && this.componentRef === null) {
7314
- const componentFactory = this.componentFactoryResolver.resolveComponentFactory(PasswordStrengthComponent);
7315
- this.componentRef = componentFactory.create(this.injector);
7316
- this.appRef.attachView(this.componentRef.hostView);
7317
- const domElem = this.componentRef.hostView.rootNodes[0];
7318
- document.body.appendChild(domElem);
7319
- this.setPasswordStrengthComponentProperties();
7320
- this.showPasswordStrength();
7338
+ setVariablesByType(component) {
7339
+ if (this.field.type == FieldType.Time) {
7340
+ component.instance.timeOnly = true;
7321
7341
  }
7322
- }
7323
- showPasswordStrength() {
7324
- if (this.componentRef !== null) {
7325
- this.componentRef.instance.visible = true;
7342
+ if ([FieldType.LocalDateTime, FieldType.DateTime, FieldType.Time].includes(this.field.type)) {
7343
+ component.instance.showTime = true;
7326
7344
  }
7327
7345
  }
7328
- setPasswordStrengthComponentProperties() {
7329
- if (this.componentRef != null) {
7330
- this.componentRef.instance.position = this.position;
7331
- this.componentRef.instance.weakTitle = this.weakTitle;
7332
- this.componentRef.instance.mediumTitle = this.mediumTitle;
7333
- this.componentRef.instance.strongTitle = this.strongTitle;
7334
- this.componentRef.instance.description = this.description;
7335
- const { top, right, bottom, left } = this.elementRef.nativeElement.getBoundingClientRect();
7336
- const margin = 20;
7337
- const elementRefHeight = bottom - top;
7338
- const elementRefWidth = right - left;
7339
- const safeSpace = 150;
7340
- let positioned = false;
7341
- const invalidOptions = [];
7342
- while (!positioned) {
7343
- if (invalidOptions.includes(PasswordStrengthPositions.Top)
7344
- && invalidOptions.includes(PasswordStrengthPositions.Right)
7345
- && invalidOptions.includes(PasswordStrengthPositions.Left)) {
7346
- this.destroyPasswordStrength();
7347
- throw new Error("No space to show password strength");
7348
- }
7349
- switch (this.position) {
7350
- case PasswordStrengthPositions.Top: {
7351
- const topShift = top;
7352
- const rightShift = document.body.clientWidth - right;
7353
- const leftShift = left;
7354
- if (topShift <= elementRefHeight + safeSpace || rightShift < 50 || leftShift < 50) {
7355
- this.position = PasswordStrengthPositions.Right;
7356
- invalidOptions.push(PasswordStrengthPositions.Top);
7357
- break;
7358
- }
7359
- this.componentRef.instance.top = Math.round(top - margin);
7360
- this.componentRef.instance.left = Math.round(elementRefWidth / 2 + left);
7361
- positioned = true;
7362
- break;
7363
- }
7364
- case PasswordStrengthPositions.Right: {
7365
- const rightShift = document.body.clientWidth - right;
7366
- if (rightShift <= elementRefWidth + safeSpace) {
7367
- this.position = PasswordStrengthPositions.Left;
7368
- invalidOptions.push(PasswordStrengthPositions.Right);
7369
- break;
7370
- }
7371
- this.componentRef.instance.top = Math.round(top + elementRefHeight / 2);
7372
- this.componentRef.instance.left = Math.round(right + margin);
7373
- positioned = true;
7374
- break;
7375
- }
7376
- case PasswordStrengthPositions.Left: {
7377
- const leftShift = left;
7378
- if (leftShift <= elementRefWidth + safeSpace) {
7379
- this.position = PasswordStrengthPositions.Top;
7380
- invalidOptions.push(PasswordStrengthPositions.Left);
7381
- break;
7382
- }
7383
- this.componentRef.instance.top = Math.round(top + elementRefHeight / 2);
7384
- this.componentRef.instance.left = Math.round(left - margin);
7385
- positioned = true;
7386
- break;
7387
- }
7388
- default: {
7389
- break;
7390
- }
7391
- }
7392
- this.componentRef.instance.position = this.position;
7393
- }
7394
- }
7346
+ updateVariables(component) {
7347
+ component.instance.field = this.field;
7348
+ component.instance.formControl = this.group["controls"][this.field.name];
7349
+ this.setVariablesByType(component);
7395
7350
  }
7396
- validateProperties() {
7397
- this.validation = this.validation || this.defaultValidator;
7398
- if (!this.description) {
7399
- throw new Error("Description is required");
7351
+ getComponent() {
7352
+ switch (this.field.type) {
7353
+ case FieldType.Autocomplete:
7354
+ return AutocompleteFieldComponent;
7355
+ case FieldType.Binary:
7356
+ case FieldType.String:
7357
+ return TextFieldComponent;
7358
+ case FieldType.Boolean:
7359
+ return this.field.representedBy === "switch" ? BooleanSwitchFieldComponent : BooleanFieldComponent;
7360
+ case FieldType.Chips:
7361
+ return ChipsFieldComponent;
7362
+ case FieldType.CountryPhonePicker:
7363
+ return CountryPhonePickerFieldComponent;
7364
+ case FieldType.Date:
7365
+ case FieldType.DateTime:
7366
+ case FieldType.LocalDateTime:
7367
+ case FieldType.Time:
7368
+ return CalendarFieldComponent;
7369
+ case FieldType.Number:
7370
+ case FieldType.Integer:
7371
+ case FieldType.Double:
7372
+ return BignumberFieldComponent;
7373
+ case FieldType.Enum:
7374
+ return SelectFieldComponent;
7375
+ case FieldType.Lookup:
7376
+ return LookupFieldComponent;
7377
+ case FieldType.Money:
7378
+ return CurrencyFieldComponent;
7379
+ case FieldType.Radio:
7380
+ return RadioButtonComponent;
7381
+ case FieldType.Text:
7382
+ return TextAreaFieldComponent;
7383
+ case FieldType.TextIA:
7384
+ return TextAreaIAFieldComponent;
7385
+ case FieldType.Password:
7386
+ return PasswordFieldComponent;
7387
+ case FieldType.Blob:
7388
+ return FileUploadComponent$1;
7389
+ case FieldType.Slider:
7390
+ return SliderFieldComponent;
7391
+ case FieldType.Custom:
7392
+ return this.field.CustomFieldComponentClass;
7393
+ default:
7394
+ throw new Error(`Trying to use an unsupported type (${this.field.type}).`);
7400
7395
  }
7401
7396
  }
7402
- destroyPasswordStrength() {
7403
- if (this.componentRef !== null) {
7404
- this.appRef.detachView(this.componentRef.hostView);
7405
- this.componentRef.destroy();
7406
- this.componentRef = null;
7397
+ }
7398
+ class DynamicStructure extends DynamicForm {
7399
+ constructor({ group, config, errorMessages }) {
7400
+ super({
7401
+ group,
7402
+ errorMessages,
7403
+ });
7404
+ this.config = config;
7405
+ }
7406
+ createComponent(resolver, container) {
7407
+ const componentFactory = resolver.resolveComponentFactory(this.getComponent());
7408
+ const component = container.createComponent(componentFactory);
7409
+ component.instance.config = this.config;
7410
+ component.instance.group = this.group;
7411
+ return component;
7412
+ }
7413
+ updateVariables(component) {
7414
+ component.instance.structure = this.config;
7415
+ component.instance.group = this.group;
7416
+ }
7417
+ getComponent() {
7418
+ switch (this.config.type) {
7419
+ case StructureType.Fieldset:
7420
+ return FieldsetComponent;
7421
+ case StructureType.Section:
7422
+ return SectionComponent;
7423
+ default:
7424
+ throw new Error(`Trying to use an unsupported type (${this.config.type}).`);
7407
7425
  }
7408
7426
  }
7409
- defaultValidator(content) {
7410
- let points = 0;
7411
- const regExpValidations = [
7412
- new RegExp("(?=.*\\d)"),
7413
- new RegExp("(?=.*[a-z])"),
7414
- new RegExp("(?=.*[A-Z])"),
7415
- new RegExp("(?=.*[!@#$%&*.\\-=+^~])"),
7416
- ];
7417
- if (content.length >= 6) {
7418
- points++;
7427
+ }
7428
+ class DynamicGrid extends DynamicForm {
7429
+ constructor({ group, config, errorMessages }) {
7430
+ super({ group, errorMessages });
7431
+ this.config = config;
7432
+ }
7433
+ createComponent(resolver, container) {
7434
+ const componentFactory = resolver.resolveComponentFactory(this.getComponent());
7435
+ const component = container.createComponent(componentFactory);
7436
+ component.instance.config = this.config;
7437
+ component.instance.group = this.group;
7438
+ component.instance.errorMessages = this.errorMessages;
7439
+ return component;
7440
+ }
7441
+ updateVariables(component) {
7442
+ component.instance.config = this.config;
7443
+ component.instance.group = this.group;
7444
+ }
7445
+ getComponent() {
7446
+ switch (this.config.type) {
7447
+ case GridType.Row:
7448
+ return RowComponent;
7449
+ default:
7450
+ throw new Error(`Trying to use an unsupported type (${this.config.type}).`);
7419
7451
  }
7420
- regExpValidations.forEach(validation => {
7421
- if (validation.test(content)) {
7422
- points++;
7452
+ }
7453
+ }
7454
+
7455
+ let DynamicFormDirective = class DynamicFormDirective {
7456
+ constructor(resolver, container) {
7457
+ this.resolver = resolver;
7458
+ this.container = container;
7459
+ }
7460
+ set sDynamicForm(context) {
7461
+ const { id, config, group, errorMessages } = context;
7462
+ this.id = id;
7463
+ this.config = config;
7464
+ this.group = group;
7465
+ this.errorMessages = errorMessages;
7466
+ }
7467
+ ngOnInit() {
7468
+ if (this.isField()) {
7469
+ if (!(this.config.id) && this.id) {
7470
+ this.config.id = this.id + "-" + this.config.name;
7423
7471
  }
7424
- });
7425
- if (points < 1) {
7426
- return PasswordStrengths.VeryWeak;
7472
+ this.directiveConfig = new DynamicField({
7473
+ group: this.group,
7474
+ field: this.config,
7475
+ errorMessages: this.errorMessages,
7476
+ });
7427
7477
  }
7428
- else if (points < 4) {
7429
- return PasswordStrengths.Weak;
7478
+ else if (this.isStructure()) {
7479
+ this.directiveConfig = new DynamicStructure({
7480
+ group: this.group,
7481
+ config: this.config,
7482
+ errorMessages: this.errorMessages,
7483
+ });
7430
7484
  }
7431
- else if (points < 5) {
7432
- return PasswordStrengths.Medium;
7485
+ else if (this.isGrid()) {
7486
+ this.directiveConfig = new DynamicGrid({
7487
+ group: this.group,
7488
+ config: this.config,
7489
+ errorMessages: this.errorMessages,
7490
+ });
7433
7491
  }
7434
- else {
7435
- return PasswordStrengths.Strong;
7492
+ else
7493
+ throw new Error(`Trying to use an unsupported type (${this.config.type}).`);
7494
+ this.component = this.directiveConfig.createComponent(this.resolver, this.container);
7495
+ this.component.instance.id = this.id;
7496
+ this.component.instance.errorMessages = this.errorMessages;
7497
+ }
7498
+ ngOnChanges() {
7499
+ if (this.component) {
7500
+ this.directiveConfig.updateVariables(this.component);
7501
+ this.component.instance.errorMessages = this.errorMessages;
7436
7502
  }
7437
7503
  }
7504
+ isField() {
7505
+ return FieldType[this.config.type];
7506
+ }
7507
+ isStructure() {
7508
+ return StructureType[this.config.type];
7509
+ }
7510
+ isGrid() {
7511
+ return GridType[this.config.type];
7512
+ }
7438
7513
  };
7439
- PasswordStrengthDirective.ctorParameters = () => [
7440
- { type: ElementRef },
7441
- { type: ApplicationRef },
7514
+ DynamicFormDirective.ctorParameters = () => [
7442
7515
  { type: ComponentFactoryResolver },
7443
- { type: Injector }
7516
+ { type: ViewContainerRef }
7444
7517
  ];
7445
7518
  __decorate([
7446
- Input("sPasswordStrength")
7447
- ], PasswordStrengthDirective.prototype, "enabled", void 0);
7448
- __decorate([
7449
- Input("psValidation")
7450
- ], PasswordStrengthDirective.prototype, "validation", void 0);
7451
- __decorate([
7452
- Input("psPosition")
7453
- ], PasswordStrengthDirective.prototype, "position", void 0);
7454
- __decorate([
7455
- Input("psWeakTitle")
7456
- ], PasswordStrengthDirective.prototype, "weakTitle", void 0);
7457
- __decorate([
7458
- Input("psMediumTitle")
7459
- ], PasswordStrengthDirective.prototype, "mediumTitle", void 0);
7460
- __decorate([
7461
- Input("psStrongTitle")
7462
- ], PasswordStrengthDirective.prototype, "strongTitle", void 0);
7463
- __decorate([
7464
- Input("psDescription")
7465
- ], PasswordStrengthDirective.prototype, "description", void 0);
7466
- __decorate([
7467
- HostListener("keyup"),
7468
- HostListener("focus")
7469
- ], PasswordStrengthDirective.prototype, "onFocus", null);
7519
+ Input()
7520
+ ], DynamicFormDirective.prototype, "sDynamicForm", null);
7470
7521
  __decorate([
7471
- HostListener("blur")
7472
- ], PasswordStrengthDirective.prototype, "onBlur", null);
7473
- PasswordStrengthDirective = __decorate([
7474
- Directive({
7475
- selector: "[sPasswordStrength]",
7476
- })
7477
- ], PasswordStrengthDirective);
7478
-
7479
- let PasswordStrengthModule = class PasswordStrengthModule {
7480
- };
7481
- PasswordStrengthModule = __decorate([
7482
- NgModule({
7483
- imports: [CommonModule],
7484
- declarations: [
7485
- PasswordStrengthComponent,
7486
- PasswordStrengthDirective,
7487
- ],
7488
- exports: [PasswordStrengthDirective],
7489
- })
7490
- ], PasswordStrengthModule);
7522
+ Input("sDynamicFormDisplayTimeInfoSign")
7523
+ ], DynamicFormDirective.prototype, "displayTimeInfoSign", void 0);
7524
+ DynamicFormDirective = __decorate([
7525
+ Directive({ selector: "[sDynamicForm]" })
7526
+ ], DynamicFormDirective);
7491
7527
 
7492
7528
  let DynamicFormModule = class DynamicFormModule {
7493
7529
  };
7494
7530
  DynamicFormModule = __decorate([
7495
7531
  NgModule({
7496
7532
  imports: [
7497
- CommonModule,
7498
- FormsModule,
7499
- ReactiveFormsModule,
7500
- TooltipModule,
7501
- InputTextModule,
7502
- CheckboxModule,
7503
- CalendarModule,
7504
- InputMaskModule,
7505
- DropdownModule,
7506
- NumberInputModule,
7507
- BignumberInputModule,
7508
- LocalizedNumberInputModule,
7509
- ControlErrorsModule,
7510
- LocaleModule,
7511
7533
  AutoCompleteModule,
7512
- MultiSelectModule,
7513
- ButtonModule$1,
7534
+ BignumberInputModule,
7514
7535
  ButtonModule,
7515
- PanelModule$1,
7536
+ CalendarMaskModule,
7537
+ CalendarModule,
7538
+ CheckboxModule,
7539
+ ChipsModule,
7540
+ CommonModule,
7541
+ ControlErrorsModule,
7542
+ CountryPhonePickerModule,
7516
7543
  DialogModule,
7517
- RadioButtonModule,
7518
- TableModule$1,
7544
+ DropdownModule,
7519
7545
  EmptyStateModule,
7520
- LoadingStateModule,
7546
+ FormsModule,
7521
7547
  HotkeyModule,
7522
- ChipsModule,
7523
- CalendarMaskModule,
7548
+ InputMaskModule,
7524
7549
  InputTextareaModule,
7525
- RadioButtonModule,
7550
+ InputTextModule,
7526
7551
  KeyFilterModule,
7552
+ LoadingStateModule,
7553
+ LocaleModule,
7554
+ LocalizedNumberInputModule,
7555
+ PanelModule$1,
7556
+ ButtonModule$1,
7557
+ TableModule$1,
7558
+ MultiSelectModule,
7559
+ NumberInputModule,
7560
+ RadioButtonModule,
7561
+ ReactiveFormsModule,
7562
+ TooltipModule,
7527
7563
  FieldsetModule,
7528
7564
  TableHeaderCheckboxModule,
7529
7565
  FileUploadModule,
@@ -7539,52 +7575,54 @@ DynamicFormModule = __decorate([
7539
7575
  ],
7540
7576
  declarations: [
7541
7577
  AutocompleteFieldComponent,
7578
+ BignumberFieldComponent,
7542
7579
  BooleanFieldComponent,
7580
+ BooleanSwitchFieldComponent,
7543
7581
  CalendarFieldComponent,
7544
7582
  ChipsFieldComponent,
7583
+ CountryPhonePickerFieldComponent,
7545
7584
  CurrencyFieldComponent,
7546
- DynamicFormComponent,
7547
7585
  DynamicFieldComponent,
7586
+ DynamicFormComponent,
7548
7587
  DynamicFormDirective,
7549
7588
  FieldsetComponent,
7550
7589
  FileUploadComponent$1,
7551
7590
  LookupComponent,
7552
7591
  LookupFieldComponent,
7553
7592
  NumberFieldComponent,
7554
- BignumberFieldComponent,
7593
+ PasswordFieldComponent,
7555
7594
  RadioButtonComponent,
7556
7595
  RowComponent,
7557
7596
  SectionComponent,
7558
7597
  SelectFieldComponent,
7598
+ SliderFieldComponent,
7559
7599
  TextAreaFieldComponent,
7560
7600
  TextAreaIAFieldComponent,
7561
7601
  TextFieldComponent,
7562
- BooleanSwitchFieldComponent,
7563
- PasswordFieldComponent,
7564
- SliderFieldComponent,
7565
7602
  ],
7566
7603
  exports: [DynamicFormComponent, LookupComponent],
7567
7604
  entryComponents: [
7568
7605
  AutocompleteFieldComponent,
7606
+ BignumberFieldComponent,
7569
7607
  BooleanFieldComponent,
7608
+ BooleanSwitchFieldComponent,
7570
7609
  CalendarFieldComponent,
7571
7610
  ChipsFieldComponent,
7611
+ CountryPhonePickerFieldComponent,
7572
7612
  CurrencyFieldComponent,
7573
7613
  FieldsetComponent,
7574
7614
  FileUploadComponent$1,
7575
7615
  LookupFieldComponent,
7576
7616
  NumberFieldComponent,
7577
- BignumberFieldComponent,
7617
+ PasswordFieldComponent,
7578
7618
  RadioButtonComponent,
7579
7619
  RowComponent,
7580
7620
  SectionComponent,
7581
7621
  SelectFieldComponent,
7622
+ SliderFieldComponent,
7582
7623
  TextAreaFieldComponent,
7583
7624
  TextAreaIAFieldComponent,
7584
7625
  TextFieldComponent,
7585
- PasswordFieldComponent,
7586
- BooleanSwitchFieldComponent,
7587
- SliderFieldComponent,
7588
7626
  ],
7589
7627
  providers: [
7590
7628
  HotkeysService,
@@ -14481,6 +14519,10 @@ PanelModule = __decorate([
14481
14519
  ], PanelModule);
14482
14520
 
14483
14521
  const fallback = {
14522
+ "platform.angular_components.attach_files": "Anexar arquivos",
14523
+ "platform.angular_components.remove": "Remover",
14524
+ "platform.angular_components.file_attached_successfully": "Arquivo anexado com sucesso",
14525
+ "platform.angular_components.loading_file": "Carregando arquivo",
14484
14526
  "platform.angular_components.iassist_text_generator": "IAssist Gerador de texto",
14485
14527
  "platform.angular_components.copied_to_clipboard": "Copiado para área de transferência",
14486
14528
  "platform.angular_components.copy_field_content": "Copiar conteúdo preenchido",
@@ -14727,5 +14769,5 @@ const fallback = {
14727
14769
  * Generated bundle index. Do not edit.
14728
14770
  */
14729
14771
 
14730
- export { AccordionComponent, AccordionModule, AccordionPanelComponent, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, SelectFieldComponent as ɵba, TextAreaFieldComponent as ɵbb, TextAreaIAFieldComponent as ɵbc, IAssistService as ɵbd, TextFieldComponent as ɵbe, BooleanSwitchFieldComponent as ɵbf, PasswordFieldComponent as ɵbg, SliderFieldComponent as ɵbh, DecimalField as ɵbj, SideTableComponent as ɵbk, StructureModule as ɵbl, HeaderComponent as ɵbm, FooterComponent as ɵbn, NumberLocaleOptions as ɵbo, ThumbnailService as ɵbp, BorderButtonModule as ɵbq, BorderButtonComponent as ɵbr, TimelineItemModule as ɵbs, TimelineIconItemComponent as ɵbt, HorizontalTimelineModule as ɵbu, HorizontalTimelineComponent as ɵbv, VerticalTimelineModule as ɵbw, VerticalTimelineComponent as ɵbx, RangeLineComponent as ɵby, CollapseOptionComponent as ɵbz, CountryPhonePickerService as ɵc, CollapsedItemsComponent as ɵca, VerticalItemsComponent as ɵcb, InfiniteScrollModule as ɵcc, InfiniteScrollDirective as ɵcd, CustomTranslationsModule as ɵce, CodeEditorComponent as ɵcf, CoreFacade as ɵcg, CodeMirror6Core as ɵch, TieredMenuEventService as ɵci, TieredMenuService as ɵcj, TieredMenuComponent as ɵck, TieredMenuNestedComponent as ɵcl, TieredMenuItemComponent as ɵcm, TieredMenuDividerComponent as ɵcn, LocalizedCurrencyImpurePipe as ɵd, LocalizedBignumberPipe as ɵe, LocalizedBignumberImpurePipe as ɵf, EmptyStateGoBackComponent as ɵg, FileUploadService as ɵh, InfoSignComponent as ɵi, TableColumnsComponent as ɵj, TablePagingComponent as ɵk, AutocompleteFieldComponent as ɵl, BooleanFieldComponent as ɵm, CalendarFieldComponent as ɵn, ChipsFieldComponent as ɵo, CurrencyFieldComponent as ɵp, DynamicFieldComponent as ɵq, DynamicFormDirective as ɵr, FieldsetComponent as ɵs, FileUploadComponent$1 as ɵt, LookupFieldComponent as ɵu, NumberFieldComponent as ɵv, BignumberFieldComponent as ɵw, RadioButtonComponent as ɵx, RowComponent as ɵy, SectionComponent as ɵz };
14772
+ export { AccordionComponent, AccordionModule, AccordionPanelComponent, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, RadioButtonComponent as ɵba, RowComponent as ɵbb, SectionComponent as ɵbc, SelectFieldComponent as ɵbd, SliderFieldComponent as ɵbe, TextAreaFieldComponent as ɵbf, TextAreaIAFieldComponent as ɵbg, IAssistService as ɵbh, TextFieldComponent as ɵbi, DecimalField as ɵbk, SideTableComponent as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, NumberLocaleOptions as ɵbp, ThumbnailService as ɵbq, BorderButtonModule as ɵbr, BorderButtonComponent as ɵbs, TimelineItemModule as ɵbt, TimelineIconItemComponent as ɵbu, HorizontalTimelineModule as ɵbv, HorizontalTimelineComponent as ɵbw, VerticalTimelineModule as ɵbx, VerticalTimelineComponent as ɵby, RangeLineComponent as ɵbz, CountryPhonePickerService as ɵc, CollapseOptionComponent as ɵca, CollapsedItemsComponent as ɵcb, VerticalItemsComponent as ɵcc, InfiniteScrollModule as ɵcd, InfiniteScrollDirective as ɵce, CustomTranslationsModule as ɵcf, CodeEditorComponent as ɵcg, CoreFacade as ɵch, CodeMirror6Core as ɵci, TieredMenuEventService as ɵcj, TieredMenuService as ɵck, TieredMenuComponent as ɵcl, TieredMenuNestedComponent as ɵcm, TieredMenuItemComponent as ɵcn, TieredMenuDividerComponent as ɵco, LocalizedCurrencyImpurePipe as ɵd, LocalizedBignumberPipe as ɵe, LocalizedBignumberImpurePipe as ɵf, EmptyStateGoBackComponent as ɵg, FileUploadService as ɵh, InfoSignComponent as ɵi, TableColumnsComponent as ɵj, TablePagingComponent as ɵk, AutocompleteFieldComponent as ɵl, BignumberFieldComponent as ɵm, BooleanFieldComponent as ɵn, BooleanSwitchFieldComponent as ɵo, CalendarFieldComponent as ɵp, ChipsFieldComponent as ɵq, CountryPhonePickerFieldComponent as ɵr, CurrencyFieldComponent as ɵs, DynamicFieldComponent as ɵt, DynamicFormDirective as ɵu, FieldsetComponent as ɵv, FileUploadComponent$1 as ɵw, LookupFieldComponent as ɵx, NumberFieldComponent as ɵy, PasswordFieldComponent as ɵz };
14731
14773
  //# sourceMappingURL=seniorsistemas-angular-components.js.map