@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.
- package/bundles/seniorsistemas-angular-components.umd.js +63 -20
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.d.ts +7 -0
- package/components/dynamic-form/configurations/fields/boolean-switch-field.d.ts +8 -0
- package/components/dynamic-form/configurations/fields/field.d.ts +2 -0
- package/components/dynamic-form/configurations/form-field.d.ts +1 -0
- package/esm2015/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.js +17 -0
- package/esm2015/components/dynamic-form/configurations/dynamic-config.js +6 -2
- package/esm2015/components/dynamic-form/configurations/fields/boolean-field.js +2 -1
- package/esm2015/components/dynamic-form/configurations/fields/boolean-switch-field.js +9 -0
- package/esm2015/components/dynamic-form/configurations/fields/field.js +2 -1
- package/esm2015/components/dynamic-form/configurations/form-field.js +5 -1
- package/esm2015/components/dynamic-form/dynamic-form.js +5 -1
- package/esm2015/components/dynamic-form/dynamic-form.module.js +9 -4
- package/esm2015/seniorsistemas-angular-components.js +14 -13
- package/esm5/components/dynamic-form/components/fields/boolean/boolean-switch-field.component.js +20 -0
- package/esm5/components/dynamic-form/configurations/dynamic-config.js +6 -2
- package/esm5/components/dynamic-form/configurations/fields/boolean-field.js +2 -1
- package/esm5/components/dynamic-form/configurations/fields/boolean-switch-field.js +14 -0
- package/esm5/components/dynamic-form/configurations/fields/field.js +2 -1
- package/esm5/components/dynamic-form/configurations/form-field.js +5 -1
- package/esm5/components/dynamic-form/dynamic-form.js +5 -1
- package/esm5/components/dynamic-form/dynamic-form.module.js +9 -4
- package/esm5/seniorsistemas-angular-components.js +14 -13
- package/fesm2015/seniorsistemas-angular-components.js +42 -5
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +48 -5
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.d.ts +13 -12
- 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';
|
|
@@ -1012,6 +1013,7 @@ class Field {
|
|
|
1012
1013
|
this.errorMessages = config.errorMessages;
|
|
1013
1014
|
this.gridClass = Object.keys(this.size).map(key => `ui-${key}-${this.size[key]}`);
|
|
1014
1015
|
this.defaultValue = config.defaultValue;
|
|
1016
|
+
this.representedBy = config.representedBy;
|
|
1015
1017
|
}
|
|
1016
1018
|
}
|
|
1017
1019
|
|
|
@@ -1416,12 +1418,21 @@ class BooleanField extends Field {
|
|
|
1416
1418
|
super(config);
|
|
1417
1419
|
this.verticalAlignment = config.verticalAlignment;
|
|
1418
1420
|
this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
1421
|
+
this.representedBy = "radio";
|
|
1419
1422
|
this.onBlur = config.onBlur;
|
|
1420
1423
|
this.onFocus = config.onFocus;
|
|
1421
1424
|
this.onClick = config.onClick;
|
|
1422
1425
|
}
|
|
1423
1426
|
}
|
|
1424
1427
|
|
|
1428
|
+
class BooleanSwitchField extends Field {
|
|
1429
|
+
constructor(config) {
|
|
1430
|
+
super(config);
|
|
1431
|
+
this.onChange = config.onChange;
|
|
1432
|
+
this.representedBy = "switch";
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1425
1436
|
class CalendarField extends Field {
|
|
1426
1437
|
constructor(config) {
|
|
1427
1438
|
super(config);
|
|
@@ -1753,6 +1764,9 @@ class FormField {
|
|
|
1753
1764
|
case FieldType.Text:
|
|
1754
1765
|
return new TextAreaField(config);
|
|
1755
1766
|
case FieldType.Boolean:
|
|
1767
|
+
if (config.representedBy === "switch") {
|
|
1768
|
+
return new BooleanSwitchField(config);
|
|
1769
|
+
}
|
|
1756
1770
|
return new BooleanField(config);
|
|
1757
1771
|
case FieldType.Date:
|
|
1758
1772
|
case FieldType.DateTime:
|
|
@@ -2304,7 +2318,7 @@ class Section extends Structure {
|
|
|
2304
2318
|
|
|
2305
2319
|
class DynamicConfig {
|
|
2306
2320
|
constructor(config) {
|
|
2307
|
-
const { type } = config;
|
|
2321
|
+
const { type, representedBy } = config;
|
|
2308
2322
|
switch (type) {
|
|
2309
2323
|
case DynamicType.Autocomplete:
|
|
2310
2324
|
return new AutocompleteField(config);
|
|
@@ -2312,6 +2326,9 @@ class DynamicConfig {
|
|
|
2312
2326
|
case DynamicType.String:
|
|
2313
2327
|
return new TextField(config);
|
|
2314
2328
|
case DynamicType.Boolean:
|
|
2329
|
+
if (representedBy === "switch") {
|
|
2330
|
+
return new BooleanSwitchField(config);
|
|
2331
|
+
}
|
|
2315
2332
|
return new BooleanField(config);
|
|
2316
2333
|
case DynamicType.Chips:
|
|
2317
2334
|
return new ChipsField(config);
|
|
@@ -4609,6 +4626,20 @@ BignumberFieldComponent = __decorate([
|
|
|
4609
4626
|
})
|
|
4610
4627
|
], BignumberFieldComponent);
|
|
4611
4628
|
|
|
4629
|
+
let BooleanSwitchFieldComponent = class BooleanSwitchFieldComponent {
|
|
4630
|
+
};
|
|
4631
|
+
__decorate([
|
|
4632
|
+
Input()
|
|
4633
|
+
], BooleanSwitchFieldComponent.prototype, "field", void 0);
|
|
4634
|
+
__decorate([
|
|
4635
|
+
Input()
|
|
4636
|
+
], BooleanSwitchFieldComponent.prototype, "formControl", void 0);
|
|
4637
|
+
BooleanSwitchFieldComponent = __decorate([
|
|
4638
|
+
Component({
|
|
4639
|
+
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>"
|
|
4640
|
+
})
|
|
4641
|
+
], BooleanSwitchFieldComponent);
|
|
4642
|
+
|
|
4612
4643
|
class DynamicForm {
|
|
4613
4644
|
constructor({ group, errorMessages }) {
|
|
4614
4645
|
this.group = group;
|
|
@@ -4662,6 +4693,9 @@ class DynamicField extends DynamicForm {
|
|
|
4662
4693
|
case FieldType.String:
|
|
4663
4694
|
return TextFieldComponent;
|
|
4664
4695
|
case FieldType.Boolean:
|
|
4696
|
+
if (this.field.representedBy === "switch") {
|
|
4697
|
+
return BooleanSwitchFieldComponent;
|
|
4698
|
+
}
|
|
4665
4699
|
return BooleanFieldComponent;
|
|
4666
4700
|
case FieldType.Chips:
|
|
4667
4701
|
return ChipsFieldComponent;
|
|
@@ -4958,7 +4992,8 @@ DynamicFormModule = __decorate([
|
|
|
4958
4992
|
InfoSignModule,
|
|
4959
4993
|
MaskFormatterModule,
|
|
4960
4994
|
HotkeyModule.forRoot(),
|
|
4961
|
-
MouseEventsModule
|
|
4995
|
+
MouseEventsModule,
|
|
4996
|
+
InputSwitchModule
|
|
4962
4997
|
],
|
|
4963
4998
|
declarations: [
|
|
4964
4999
|
AutocompleteFieldComponent,
|
|
@@ -4980,7 +5015,8 @@ DynamicFormModule = __decorate([
|
|
|
4980
5015
|
SectionComponent,
|
|
4981
5016
|
SelectFieldComponent,
|
|
4982
5017
|
TextAreaFieldComponent,
|
|
4983
|
-
TextFieldComponent
|
|
5018
|
+
TextFieldComponent,
|
|
5019
|
+
BooleanSwitchFieldComponent
|
|
4984
5020
|
],
|
|
4985
5021
|
exports: [DynamicFormComponent, LookupComponent],
|
|
4986
5022
|
entryComponents: [
|
|
@@ -4999,7 +5035,8 @@ DynamicFormModule = __decorate([
|
|
|
4999
5035
|
SectionComponent,
|
|
5000
5036
|
SelectFieldComponent,
|
|
5001
5037
|
TextAreaFieldComponent,
|
|
5002
|
-
TextFieldComponent
|
|
5038
|
+
TextFieldComponent,
|
|
5039
|
+
BooleanSwitchFieldComponent
|
|
5003
5040
|
],
|
|
5004
5041
|
providers: [HotkeysService]
|
|
5005
5042
|
})
|
|
@@ -8505,5 +8542,5 @@ CodeEditorModule = __decorate([
|
|
|
8505
8542
|
* Generated bundle index. Do not edit.
|
|
8506
8543
|
*/
|
|
8507
8544
|
|
|
8508
|
-
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
|
|
8545
|
+
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 };
|
|
8509
8546
|
//# sourceMappingURL=seniorsistemas-angular-components.js.map
|