@pumpkin-tech/pumpkin-tech-ng 0.2.1 → 0.2.2

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/index.d.ts CHANGED
@@ -18,7 +18,6 @@ import * as i7 from '@angular/material/snack-bar';
18
18
  import { MatSnackBarRef, MatSnackBar } from '@angular/material/snack-bar';
19
19
  import * as i19 from '@angular/material/datepicker';
20
20
  import { MatDatepickerInputEvent, MatDatepicker } from '@angular/material/datepicker';
21
- import { NgxCurrencyConfig } from 'ngx-currency';
22
21
  import { SelectionModel } from '@angular/cdk/collections';
23
22
  import * as i1 from '@angular/common';
24
23
  import * as i3 from '@angular/material/toolbar';
@@ -342,7 +341,7 @@ declare class BadgeStackComponent {
342
341
  get dir(): Dir;
343
342
  get fwrap(): "wrap" | "nowrap";
344
343
  get cssGap(): string;
345
- get ai(): "center" | "flex-end" | "stretch" | "baseline" | "flex-start";
344
+ get ai(): "center" | "stretch" | "baseline" | "flex-end" | "flex-start";
346
345
  get jc(): "center" | "flex-end" | "flex-start" | "space-between" | "space-around" | "space-evenly";
347
346
  static ɵfac: i0.ɵɵFactoryDeclaration<BadgeStackComponent, never>;
348
347
  static ɵcmp: i0.ɵɵComponentDeclaration<BadgeStackComponent, "ptech-badge-stack", never, { "direction": { "alias": "direction"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "align": { "alias": "align"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "col": { "alias": "col"; "required": false; }; }, {}, never, ["*"], true, never>;
@@ -402,6 +401,26 @@ declare class QuantityItemsComponent extends BaseField implements ControlValueAc
402
401
  static ɵcmp: i0.ɵɵComponentDeclaration<QuantityItemsComponent, "ptech-quantity-items", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "quantity": { "alias": "quantity"; "required": false; }; }, { "quantityChange": "quantityChange"; }, never, never, true, never>;
403
402
  }
404
403
 
404
+ declare class SelectQuantityItemsComponent extends BaseField implements ControlValueAccessor {
405
+ constructor(el: ElementRef<HTMLElement>);
406
+ appearance: MatFormFieldAppearance;
407
+ min: number;
408
+ max: number;
409
+ step: number;
410
+ quantity: number;
411
+ quantityChange: EventEmitter<number>;
412
+ get quantityOptions(): number[];
413
+ private onChange;
414
+ private onTouched;
415
+ onSelect(value: number): void;
416
+ writeValue(value: number | null): void;
417
+ registerOnChange(fn: (value: number) => void): void;
418
+ registerOnTouched(fn: () => void): void;
419
+ setDisabledState(isDisabled: boolean): void;
420
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectQuantityItemsComponent, never>;
421
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectQuantityItemsComponent, "ptech-select-quantity-items", never, { "appearance": { "alias": "appearance"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "quantity": { "alias": "quantity"; "required": false; }; }, { "quantityChange": "quantityChange"; }, never, never, true, never>;
422
+ }
423
+
405
424
  type Entity = Record<string, any>;
406
425
  declare class SelectEntityComponent extends BaseField implements ControlValueAccessor, OnChanges {
407
426
  constructor(el: ElementRef<HTMLElement>);
@@ -732,14 +751,67 @@ declare class ConfirmationDialogComponent {
732
751
  static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "ptech-confirmation-dialog", never, {}, {}, never, never, true, never>;
733
752
  }
734
753
 
754
+ interface PtechCurrencyConfig {
755
+ align?: 'left' | 'right' | 'center';
756
+ allowNegative?: boolean;
757
+ allowZero?: boolean;
758
+ locale?: string;
759
+ currency?: string;
760
+ currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name';
761
+ useGrouping?: boolean;
762
+ decimal?: string;
763
+ precision?: number;
764
+ prefix?: string;
765
+ suffix?: string;
766
+ thousands?: string;
767
+ nullable?: boolean;
768
+ }
769
+ declare class InputCurrencyComponent extends BaseField implements ControlValueAccessor {
770
+ constructor(el: ElementRef<HTMLElement>);
771
+ /** Config por input (parcial) */
772
+ options: Partial<PtechCurrencyConfig>;
773
+ valueChange: EventEmitter<any>;
774
+ private defaultOptions;
775
+ get resolvedOptions(): PtechCurrencyConfig;
776
+ private _val;
777
+ displayValue: string;
778
+ onChange: (val: any) => void;
779
+ onTouch: () => void;
780
+ private parseToNumber;
781
+ private formatNumber;
782
+ onInput(raw: string): void;
783
+ onBlur(): void;
784
+ writeValue(value: any): void;
785
+ registerOnChange(fn: any): void;
786
+ registerOnTouched(fn: any): void;
787
+ setDisabledState(isDisabled: boolean): void;
788
+ private getLocale;
789
+ private getCurrency;
790
+ private getIntlFormatter;
791
+ private detectLocaleSeparators;
792
+ private getDecimalSeparator;
793
+ private getThousandsSeparator;
794
+ private normalizeInput;
795
+ private parseUsingSeparators;
796
+ private parseFlexible;
797
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputCurrencyComponent, never>;
798
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputCurrencyComponent, "ptech-input-currency", never, { "options": { "alias": "options"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["mat-hint, [mat-hint], mat-error, [mat-error]"], true, never>;
799
+ }
800
+
735
801
  interface ActionDialogField<T = any> {
736
- type: 'select' | 'number' | 'text' | 'checkbox';
802
+ type: 'select' | 'number' | 'text' | 'checkbox' | 'currency' | 'quantity-select';
737
803
  label: string;
738
804
  value?: any;
739
805
  options?: T[];
806
+ min?: number;
807
+ max?: number;
808
+ step?: number;
809
+ placeholder?: string;
810
+ currencyOptions?: Partial<PtechCurrencyConfig>;
740
811
  }
741
812
  interface ActionDialogConfig {
742
813
  title: string;
814
+ subtitle?: string;
743
815
  fields: ActionDialogField[];
744
816
  infoBox?: string;
745
817
  content?: string;
@@ -765,7 +837,7 @@ declare class ActionDialogComponent {
765
837
  private get msg();
766
838
  onConfirm(): void;
767
839
  onCancel(): void;
768
- changeQuantity($event: number): void;
840
+ onQuantityChange(field: any, value: number): void;
769
841
  onSelectionChange($event: any): void;
770
842
  static ɵfac: i0.ɵɵFactoryDeclaration<ActionDialogComponent, [null, null, { optional: true; }]>;
771
843
  static ɵcmp: i0.ɵɵComponentDeclaration<ActionDialogComponent, "ptech-action-dialog", never, {}, {}, never, never, true, never>;
@@ -774,18 +846,20 @@ declare class ActionDialogComponent {
774
846
  declare class InfoDetailComponent {
775
847
  private dialog;
776
848
  infoTitle: string;
849
+ infoSubtitle: string;
777
850
  infoContent: string;
778
851
  infoRawContent: string;
779
852
  iconColor: string;
780
853
  constructor(dialog: MatDialog);
781
854
  openInfo(): void;
782
855
  static ɵfac: i0.ɵɵFactoryDeclaration<InfoDetailComponent, never>;
783
- static ɵcmp: i0.ɵɵComponentDeclaration<InfoDetailComponent, "ptech-info-detail", never, { "infoTitle": { "alias": "infoTitle"; "required": false; }; "infoContent": { "alias": "infoContent"; "required": false; }; "infoRawContent": { "alias": "infoRawContent"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; }, {}, never, ["*"], true, never>;
856
+ static ɵcmp: i0.ɵɵComponentDeclaration<InfoDetailComponent, "ptech-info-detail", never, { "infoTitle": { "alias": "infoTitle"; "required": false; }; "infoSubtitle": { "alias": "infoSubtitle"; "required": false; }; "infoContent": { "alias": "infoContent"; "required": false; }; "infoRawContent": { "alias": "infoRawContent"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; }, {}, never, ["*"], true, never>;
784
857
  }
785
858
 
786
859
  declare class InfoDetailDialogComponent {
787
860
  data: {
788
861
  title: string;
862
+ subtitle?: string;
789
863
  content: string;
790
864
  rawContent?: string;
791
865
  };
@@ -794,6 +868,7 @@ declare class InfoDetailDialogComponent {
794
868
  private readonly msgService;
795
869
  constructor(data: {
796
870
  title: string;
871
+ subtitle?: string;
797
872
  content: string;
798
873
  rawContent?: string;
799
874
  }, dialogRef: MatDialogRef<InfoDetailDialogComponent>, messageService: IMessageService | null);
@@ -805,6 +880,7 @@ declare class InfoDetailDialogComponent {
805
880
 
806
881
  interface ActionResultData {
807
882
  title: string;
883
+ subtitle?: string;
808
884
  content?: string;
809
885
  rawContent?: string;
810
886
  details?: unknown;
@@ -996,26 +1072,6 @@ declare class InputTimeComponent extends BaseField implements ControlValueAccess
996
1072
  static ɵcmp: i0.ɵɵComponentDeclaration<InputTimeComponent, "ptech-input-time", never, { "format": { "alias": "format"; "required": false; }; "seconds": { "alias": "seconds"; "required": false; }; "disableClick": { "alias": "disableClick"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["mat-hint, [mat-hint], mat-error, [mat-error]"], true, never>;
997
1073
  }
998
1074
 
999
- declare class InputCurrencyComponent extends BaseField implements ControlValueAccessor {
1000
- constructor(el: ElementRef<HTMLElement>);
1001
- /** Config por input (parcial) */
1002
- options: Partial<NgxCurrencyConfig>;
1003
- valueChange: EventEmitter<any>;
1004
- private defaultOptions;
1005
- get resolvedOptions(): NgxCurrencyConfig;
1006
- private _val;
1007
- onChange: (val: any) => void;
1008
- onTouch: () => void;
1009
- get value(): any;
1010
- set value(v: any);
1011
- writeValue(value: any): void;
1012
- registerOnChange(fn: any): void;
1013
- registerOnTouched(fn: any): void;
1014
- setDisabledState(isDisabled: boolean): void;
1015
- static ɵfac: i0.ɵɵFactoryDeclaration<InputCurrencyComponent, never>;
1016
- static ɵcmp: i0.ɵɵComponentDeclaration<InputCurrencyComponent, "ptech-input-currency", never, { "options": { "alias": "options"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["mat-hint, [mat-hint], mat-error, [mat-error]"], true, never>;
1017
- }
1018
-
1019
1075
  declare class FlagComponent {
1020
1076
  /** ISO 3166-1 alpha-2 (ex.: 'BR', 'ES', 'US'). */
1021
1077
  code: string | null | undefined;
@@ -1183,7 +1239,7 @@ declare class CoreMaterialModule {
1183
1239
 
1184
1240
  declare class PumpkinTechModule {
1185
1241
  static ɵfac: i0.ɵɵFactoryDeclaration<PumpkinTechModule, never>;
1186
- static ɵmod: i0.ɵɵNgModuleDeclaration<PumpkinTechModule, never, [typeof i1.CommonModule, typeof CoreMaterialModule, typeof InputComponent, typeof TextareaComponent, typeof InputDateComponent, typeof InputDateRangeComponent, typeof InputTimeComponent, typeof InputCurrencyComponent, typeof InfoDetailComponent, typeof InfoDetailDialogComponent, typeof ActionDialogComponent, typeof ActionResultDialogComponent, typeof ButtonComponent, typeof BadgeComponent, typeof BadgeStackComponent, typeof BreadcrumbComponent, typeof TitleComponent, typeof ActionRowComponent, typeof HeaderComponent, typeof NavComponent, typeof FooterComponent, typeof IconComponent, typeof SelectEntityComponent, typeof SelectEnumComponent, typeof RadioGroupEnumComponent, typeof RadioGroupEntityComponent, typeof SlideToggleComponent, typeof QuantityItemsComponent, typeof LoadingOverlayComponent, typeof ProfileMenuComponent, typeof CheckBoxComponent, typeof ProgressBarComponent, typeof ProgressBarMultipleComponent, typeof FlagComponent, typeof TableComponent], [typeof InputComponent, typeof TextareaComponent, typeof InputDateComponent, typeof InputDateRangeComponent, typeof InputTimeComponent, typeof InputCurrencyComponent, typeof InfoDetailComponent, typeof InfoDetailDialogComponent, typeof ActionDialogComponent, typeof ActionResultDialogComponent, typeof ButtonComponent, typeof BadgeComponent, typeof BadgeStackComponent, typeof BreadcrumbComponent, typeof TitleComponent, typeof ActionRowComponent, typeof HeaderComponent, typeof NavComponent, typeof FooterComponent, typeof IconComponent, typeof SelectEntityComponent, typeof SelectEnumComponent, typeof RadioGroupEnumComponent, typeof RadioGroupEntityComponent, typeof SlideToggleComponent, typeof QuantityItemsComponent, typeof LoadingOverlayComponent, typeof ProfileMenuComponent, typeof CheckBoxComponent, typeof ProgressBarComponent, typeof ProgressBarMultipleComponent, typeof FlagComponent, typeof TableComponent, typeof CoreMaterialModule]>;
1242
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PumpkinTechModule, never, [typeof i1.CommonModule, typeof CoreMaterialModule, typeof InputComponent, typeof TextareaComponent, typeof InputDateComponent, typeof InputDateRangeComponent, typeof InputTimeComponent, typeof InputCurrencyComponent, typeof InfoDetailComponent, typeof InfoDetailDialogComponent, typeof ActionDialogComponent, typeof ActionResultDialogComponent, typeof ButtonComponent, typeof BadgeComponent, typeof BadgeStackComponent, typeof BreadcrumbComponent, typeof TitleComponent, typeof ActionRowComponent, typeof HeaderComponent, typeof NavComponent, typeof FooterComponent, typeof IconComponent, typeof SelectEntityComponent, typeof SelectEnumComponent, typeof RadioGroupEnumComponent, typeof RadioGroupEntityComponent, typeof SlideToggleComponent, typeof QuantityItemsComponent, typeof SelectQuantityItemsComponent, typeof LoadingOverlayComponent, typeof ProfileMenuComponent, typeof CheckBoxComponent, typeof ProgressBarComponent, typeof ProgressBarMultipleComponent, typeof FlagComponent, typeof TableComponent], [typeof InputComponent, typeof TextareaComponent, typeof InputDateComponent, typeof InputDateRangeComponent, typeof InputTimeComponent, typeof InputCurrencyComponent, typeof InfoDetailComponent, typeof InfoDetailDialogComponent, typeof ActionDialogComponent, typeof ActionResultDialogComponent, typeof ButtonComponent, typeof BadgeComponent, typeof BadgeStackComponent, typeof BreadcrumbComponent, typeof TitleComponent, typeof ActionRowComponent, typeof HeaderComponent, typeof NavComponent, typeof FooterComponent, typeof IconComponent, typeof SelectEntityComponent, typeof SelectEnumComponent, typeof RadioGroupEnumComponent, typeof RadioGroupEntityComponent, typeof SlideToggleComponent, typeof QuantityItemsComponent, typeof SelectQuantityItemsComponent, typeof LoadingOverlayComponent, typeof ProfileMenuComponent, typeof CheckBoxComponent, typeof ProgressBarComponent, typeof ProgressBarMultipleComponent, typeof FlagComponent, typeof TableComponent, typeof CoreMaterialModule]>;
1187
1243
  static ɵinj: i0.ɵɵInjectorDeclaration<PumpkinTechModule>;
1188
1244
  }
1189
1245
 
@@ -1385,9 +1441,11 @@ interface DialogModel<T = any, D = any> {
1385
1441
  declare class DialogService {
1386
1442
  private dialog;
1387
1443
  constructor(dialog: MatDialog);
1444
+ private resolvePanelClass;
1388
1445
  open<T = any, R = any>(model: DialogModel<T, any>): MatDialogRef<T, R>;
1389
1446
  openInfo(arg: {
1390
1447
  title: string;
1448
+ subtitle?: string;
1391
1449
  content: string;
1392
1450
  rawContent?: string;
1393
1451
  }, width?: string): MatDialogRef<InfoDetailDialogComponent>;
@@ -1583,5 +1641,5 @@ declare class FakeDataService {
1583
1641
  static ɵprov: i0.ɵɵInjectableDeclaration<FakeDataService>;
1584
1642
  }
1585
1643
 
1586
- export { ActionDialogComponent, ActionResultDialogComponent, ActionRowComponent, AlertComponent, ArrayUtil, BREADCRUMB_PREFIX$, BadgeComponent, BadgeStackComponent, BreadcrumbComponent, BreadcrumbService, ButtonComponent, CheckBoxComponent, ClickCatcherDirective, ConfirmationDialogComponent, CoreMaterialModule, CurrencyBrlPipe, CurrencyPreferenceService, CurrencyUtil, DateAgoPipe, DateMaskDirective, DateUtil, DefaultConsoleMessageService, DefaultMessageService, DialogService, DirectivesModule, DocumentUtil, DynamicTabDirective, FakeDataService, FlagComponent, FooterComponent, ForDirective, GetFirstStringBeforeSpacePipe, HeaderComponent, IconComponent, InfoDetailComponent, InfoDetailDialogComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputTimeComponent, IsLongerThanPipe, LineBreakAfterPeriodPipe, LineBreakAfterPipe, LoadingOverlayComponent, LoadingService, LowerCaseDirective, MESSAGE_SERVICE, MY_DATE_FORMATS, MemoryFormatPipe, ModuleChangeService, NavComponent, NavService, NumberUtil, ObjectUtil, PhoneBrazilPipe, PhoneMaskBrazilDirective, PhoneMaskSpainDirective, PhoneSpainPipe, PipesModule, ProfileMenuComponent, ProgressBarComponent, ProgressBarMultipleComponent, PtechColDirective, PtechGridDirective, PumpkinTechModule, QuantityItemsComponent, RadioGroupEntityComponent, RadioGroupEnumComponent, RedDirective, SelectEntityComponent, SelectEnumComponent, SlideToggleComponent, SnackbarMessageService, SpaceDropDirective, StringUtil, TableCellDirective, TableComponent, TextareaComponent, TimeDurationPipe, TitleComponent, UpperCaseDirective, UptimeFormatPipe, UuidUtil };
1587
- export type { ActionDialogConfig, ActionDialogField, ActionResultData, AlertData, AlertType, BadgePreset, BadgeSize, BadgeVariant, BreadcrumbRoute, ConfirmationDTO, CurrencyCode, DialogModel, FakeUser, FooterItem, HeaderData, IMessageService, NavLink, PasswordOptions, ProfileMenuItem, TableAction, TableAlign, TableBadgeConfig, TableColType, TableColumn };
1644
+ export { ActionDialogComponent, ActionResultDialogComponent, ActionRowComponent, AlertComponent, ArrayUtil, BREADCRUMB_PREFIX$, BadgeComponent, BadgeStackComponent, BreadcrumbComponent, BreadcrumbService, ButtonComponent, CheckBoxComponent, ClickCatcherDirective, ConfirmationDialogComponent, CoreMaterialModule, CurrencyBrlPipe, CurrencyPreferenceService, CurrencyUtil, DateAgoPipe, DateMaskDirective, DateUtil, DefaultConsoleMessageService, DefaultMessageService, DialogService, DirectivesModule, DocumentUtil, DynamicTabDirective, FakeDataService, FlagComponent, FooterComponent, ForDirective, GetFirstStringBeforeSpacePipe, HeaderComponent, IconComponent, InfoDetailComponent, InfoDetailDialogComponent, InputComponent, InputCurrencyComponent, InputDateComponent, InputDateRangeComponent, InputTimeComponent, IsLongerThanPipe, LineBreakAfterPeriodPipe, LineBreakAfterPipe, LoadingOverlayComponent, LoadingService, LowerCaseDirective, MESSAGE_SERVICE, MY_DATE_FORMATS, MemoryFormatPipe, ModuleChangeService, NavComponent, NavService, NumberUtil, ObjectUtil, PhoneBrazilPipe, PhoneMaskBrazilDirective, PhoneMaskSpainDirective, PhoneSpainPipe, PipesModule, ProfileMenuComponent, ProgressBarComponent, ProgressBarMultipleComponent, PtechColDirective, PtechGridDirective, PumpkinTechModule, QuantityItemsComponent, RadioGroupEntityComponent, RadioGroupEnumComponent, RedDirective, SelectEntityComponent, SelectEnumComponent, SelectQuantityItemsComponent, SlideToggleComponent, SnackbarMessageService, SpaceDropDirective, StringUtil, TableCellDirective, TableComponent, TextareaComponent, TimeDurationPipe, TitleComponent, UpperCaseDirective, UptimeFormatPipe, UuidUtil };
1645
+ export type { ActionDialogConfig, ActionDialogField, ActionResultData, AlertData, AlertType, BadgePreset, BadgeSize, BadgeVariant, BreadcrumbRoute, ConfirmationDTO, CurrencyCode, DialogModel, FakeUser, FooterItem, HeaderData, IMessageService, NavLink, PasswordOptions, ProfileMenuItem, PtechCurrencyConfig, TableAction, TableAlign, TableBadgeConfig, TableColType, TableColumn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pumpkin-tech/pumpkin-tech-ng",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Biblioteca Angular com utilitários e componentes Pumpkin Tech",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -26,7 +26,6 @@
26
26
  "moment": "^2.29.4",
27
27
  "@faker-js/faker": "^9.0.3",
28
28
  "@ngx-translate/core": "^17.0.0",
29
- "ngx-currency": "^19.0.0",
30
29
  "ngx-material-timepicker": "^13.1.1",
31
30
  "flag-icons": "^7.5.0"
32
31
  },