@seniorsistemas/angular-components 14.15.1 → 14.16.0

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 (33) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +63 -20
  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/dynamic-form/components/fields/boolean/boolean-switch-field.component.d.ts +7 -0
  6. package/components/dynamic-form/configurations/fields/boolean-switch-field.d.ts +8 -0
  7. package/components/dynamic-form/configurations/fields/field.d.ts +2 -0
  8. package/components/dynamic-form/configurations/form-field.d.ts +1 -0
  9. package/esm2015/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.js +17 -0
  10. package/esm2015/components/dynamic-form/configurations/dynamic-config.js +6 -2
  11. package/esm2015/components/dynamic-form/configurations/fields/boolean-field.js +2 -1
  12. package/esm2015/components/dynamic-form/configurations/fields/boolean-switch-field.js +9 -0
  13. package/esm2015/components/dynamic-form/configurations/fields/field.js +2 -1
  14. package/esm2015/components/dynamic-form/configurations/form-field.js +5 -1
  15. package/esm2015/components/dynamic-form/dynamic-form.js +5 -1
  16. package/esm2015/components/dynamic-form/dynamic-form.module.js +9 -4
  17. package/esm2015/seniorsistemas-angular-components.js +14 -13
  18. package/esm5/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.js +20 -0
  19. package/esm5/components/dynamic-form/configurations/dynamic-config.js +6 -2
  20. package/esm5/components/dynamic-form/configurations/fields/boolean-field.js +2 -1
  21. package/esm5/components/dynamic-form/configurations/fields/boolean-switch-field.js +14 -0
  22. package/esm5/components/dynamic-form/configurations/fields/field.js +2 -1
  23. package/esm5/components/dynamic-form/configurations/form-field.js +5 -1
  24. package/esm5/components/dynamic-form/dynamic-form.js +5 -1
  25. package/esm5/components/dynamic-form/dynamic-form.module.js +9 -4
  26. package/esm5/seniorsistemas-angular-components.js +14 -13
  27. package/fesm2015/seniorsistemas-angular-components.js +42 -5
  28. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  29. package/fesm5/seniorsistemas-angular-components.js +48 -5
  30. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  31. package/package.json +1 -1
  32. package/seniorsistemas-angular-components.d.ts +13 -12
  33. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -32,6 +32,7 @@ import { InputTextModule } from 'primeng/inputtext';
32
32
  import { InputTextareaModule } from 'primeng/inputtextarea';
33
33
  import { KeyFilterModule } from 'primeng/keyfilter';
34
34
  import { MultiSelectModule } from 'primeng/multiselect';
35
+ import { InputSwitchModule } from 'primeng/inputswitch';
35
36
  import { PanelModule } from 'primeng/panel';
36
37
  import { RadioButtonModule } from 'primeng/radiobutton';
37
38
  import { ProgressBarModule } from 'primeng/progressbar';
@@ -1054,6 +1055,7 @@ var Field = /** @class */ (function () {
1054
1055
  this.errorMessages = config.errorMessages;
1055
1056
  this.gridClass = Object.keys(this.size).map(function (key) { return "ui-" + key + "-" + _this.size[key]; });
1056
1057
  this.defaultValue = config.defaultValue;
1058
+ this.representedBy = config.representedBy;
1057
1059
  }
1058
1060
  return Field;
1059
1061
  }());
@@ -1518,6 +1520,7 @@ var BooleanField = /** @class */ (function (_super) {
1518
1520
  var _this = _super.call(this, config) || this;
1519
1521
  _this.verticalAlignment = config.verticalAlignment;
1520
1522
  _this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
1523
+ _this.representedBy = "radio";
1521
1524
  _this.onBlur = config.onBlur;
1522
1525
  _this.onFocus = config.onFocus;
1523
1526
  _this.onClick = config.onClick;
@@ -1526,6 +1529,17 @@ var BooleanField = /** @class */ (function (_super) {
1526
1529
  return BooleanField;
1527
1530
  }(Field));
1528
1531
 
1532
+ var BooleanSwitchField = /** @class */ (function (_super) {
1533
+ __extends(BooleanSwitchField, _super);
1534
+ function BooleanSwitchField(config) {
1535
+ var _this = _super.call(this, config) || this;
1536
+ _this.onChange = config.onChange;
1537
+ _this.representedBy = "switch";
1538
+ return _this;
1539
+ }
1540
+ return BooleanSwitchField;
1541
+ }(Field));
1542
+
1529
1543
  var CalendarField = /** @class */ (function (_super) {
1530
1544
  __extends(CalendarField, _super);
1531
1545
  function CalendarField(config) {
@@ -1909,6 +1923,9 @@ var FormField = /** @class */ (function () {
1909
1923
  case FieldType.Text:
1910
1924
  return new TextAreaField(config);
1911
1925
  case FieldType.Boolean:
1926
+ if (config.representedBy === "switch") {
1927
+ return new BooleanSwitchField(config);
1928
+ }
1912
1929
  return new BooleanField(config);
1913
1930
  case FieldType.Date:
1914
1931
  case FieldType.DateTime:
@@ -2479,7 +2496,7 @@ var Section = /** @class */ (function (_super) {
2479
2496
 
2480
2497
  var DynamicConfig = /** @class */ (function () {
2481
2498
  function DynamicConfig(config) {
2482
- var type = config.type;
2499
+ var type = config.type, representedBy = config.representedBy;
2483
2500
  switch (type) {
2484
2501
  case DynamicType.Autocomplete:
2485
2502
  return new AutocompleteField(config);
@@ -2487,6 +2504,9 @@ var DynamicConfig = /** @class */ (function () {
2487
2504
  case DynamicType.String:
2488
2505
  return new TextField(config);
2489
2506
  case DynamicType.Boolean:
2507
+ if (representedBy === "switch") {
2508
+ return new BooleanSwitchField(config);
2509
+ }
2490
2510
  return new BooleanField(config);
2491
2511
  case DynamicType.Chips:
2492
2512
  return new ChipsField(config);
@@ -4982,6 +5002,23 @@ var BignumberFieldComponent = /** @class */ (function (_super) {
4982
5002
  return BignumberFieldComponent;
4983
5003
  }(BaseFieldComponent));
4984
5004
 
5005
+ var BooleanSwitchFieldComponent = /** @class */ (function () {
5006
+ function BooleanSwitchFieldComponent() {
5007
+ }
5008
+ __decorate([
5009
+ Input()
5010
+ ], BooleanSwitchFieldComponent.prototype, "field", void 0);
5011
+ __decorate([
5012
+ Input()
5013
+ ], BooleanSwitchFieldComponent.prototype, "formControl", void 0);
5014
+ BooleanSwitchFieldComponent = __decorate([
5015
+ Component({
5016
+ template: "<p-inputSwitch [id]=\"(field.id || field.name)\" [name]=\"field.name\" [formControl]=\"formControl\"\n [pTooltip]=\"field.tooltip\" tooltipPosition=\"top\"\n (onChange)=\"field.onChange ? field.onChange($event) : null\">\n</p-inputSwitch>"
5017
+ })
5018
+ ], BooleanSwitchFieldComponent);
5019
+ return BooleanSwitchFieldComponent;
5020
+ }());
5021
+
4985
5022
  var DynamicForm = /** @class */ (function () {
4986
5023
  function DynamicForm(_a) {
4987
5024
  var group = _a.group, errorMessages = _a.errorMessages;
@@ -5040,6 +5077,9 @@ var DynamicField = /** @class */ (function (_super) {
5040
5077
  case FieldType.String:
5041
5078
  return TextFieldComponent;
5042
5079
  case FieldType.Boolean:
5080
+ if (this.field.representedBy === "switch") {
5081
+ return BooleanSwitchFieldComponent;
5082
+ }
5043
5083
  return BooleanFieldComponent;
5044
5084
  case FieldType.Chips:
5045
5085
  return ChipsFieldComponent;
@@ -5358,7 +5398,8 @@ var DynamicFormModule = /** @class */ (function () {
5358
5398
  InfoSignModule,
5359
5399
  MaskFormatterModule,
5360
5400
  HotkeyModule.forRoot(),
5361
- MouseEventsModule
5401
+ MouseEventsModule,
5402
+ InputSwitchModule
5362
5403
  ],
5363
5404
  declarations: [
5364
5405
  AutocompleteFieldComponent,
@@ -5380,7 +5421,8 @@ var DynamicFormModule = /** @class */ (function () {
5380
5421
  SectionComponent,
5381
5422
  SelectFieldComponent,
5382
5423
  TextAreaFieldComponent,
5383
- TextFieldComponent
5424
+ TextFieldComponent,
5425
+ BooleanSwitchFieldComponent
5384
5426
  ],
5385
5427
  exports: [DynamicFormComponent, LookupComponent],
5386
5428
  entryComponents: [
@@ -5399,7 +5441,8 @@ var DynamicFormModule = /** @class */ (function () {
5399
5441
  SectionComponent,
5400
5442
  SelectFieldComponent,
5401
5443
  TextAreaFieldComponent,
5402
- TextFieldComponent
5444
+ TextFieldComponent,
5445
+ BooleanSwitchFieldComponent
5403
5446
  ],
5404
5447
  providers: [HotkeysService]
5405
5448
  })
@@ -9150,5 +9193,5 @@ var CodeEditorModule = /** @class */ (function () {
9150
9193
  * Generated bundle index. Do not edit.
9151
9194
  */
9152
9195
 
9153
- export { AngularComponentsModule, AutocompleteField, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, 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, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TimelineComponent, TimelineModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, DecimalField as ɵba, StructureModule as ɵbb, HeaderComponent as ɵbc, FooterComponent as ɵbd, NumberLocaleOptions as ɵbe, ThumbnailService as ɵbf, InfiniteScrollModule as ɵbg, InfiniteScrollDirective as ɵbh, CustomTranslationsModule as ɵbi, CodeEditorComponent as ɵbj, CoreFacade as ɵbk, CodeMirror6Core as ɵbl, LocalizedBignumberImpurePipe as ɵc, EmptyStateGoBackComponent as ɵd, TableColumnsComponent as ɵe, TablePagingComponent as ɵf, InfoSignComponent as ɵg, AutocompleteFieldComponent as ɵh, BooleanFieldComponent as ɵi, CalendarFieldComponent as ɵj, ChipsFieldComponent as ɵk, CurrencyFieldComponent as ɵl, DynamicFieldComponent as ɵm, DynamicFormDirective as ɵn, FieldsetComponent as ɵo, FileUploadComponent$1 as ɵp, LookupFieldComponent as ɵq, NumberFieldComponent as ɵr, BignumberFieldComponent as ɵs, RadioButtonComponent as ɵt, RowComponent as ɵu, SectionComponent as ɵv, SelectFieldComponent as ɵw, TextAreaFieldComponent as ɵx, TextFieldComponent as ɵy };
9196
+ export { AngularComponentsModule, AutocompleteField, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, 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, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TimelineComponent, TimelineModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, DecimalField as ɵbb, StructureModule as ɵbc, HeaderComponent as ɵbd, FooterComponent as ɵbe, NumberLocaleOptions as ɵbf, ThumbnailService as ɵbg, InfiniteScrollModule as ɵbh, InfiniteScrollDirective as ɵbi, CustomTranslationsModule as ɵbj, CodeEditorComponent as ɵbk, CoreFacade as ɵbl, CodeMirror6Core as ɵbm, LocalizedBignumberImpurePipe as ɵc, EmptyStateGoBackComponent as ɵd, TableColumnsComponent as ɵe, TablePagingComponent as ɵf, InfoSignComponent as ɵg, AutocompleteFieldComponent as ɵh, BooleanFieldComponent as ɵi, CalendarFieldComponent as ɵj, ChipsFieldComponent as ɵk, CurrencyFieldComponent as ɵl, DynamicFieldComponent as ɵm, DynamicFormDirective as ɵn, FieldsetComponent as ɵo, FileUploadComponent$1 as ɵp, LookupFieldComponent as ɵq, NumberFieldComponent as ɵr, BignumberFieldComponent as ɵs, RadioButtonComponent as ɵt, RowComponent as ɵu, SectionComponent as ɵv, SelectFieldComponent as ɵw, TextAreaFieldComponent as ɵx, TextFieldComponent as ɵy, BooleanSwitchFieldComponent as ɵz };
9154
9197
  //# sourceMappingURL=seniorsistemas-angular-components.js.map