ngx-vector-components 6.3.0 → 6.5.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/CHANGELOG.md +3047 -3033
- package/README.md +35 -35
- package/assets/icons/chevron_down_icon.svg +3 -3
- package/assets/icons/home_menu_icon.svg +3 -3
- package/assets/icons/logout_icon.svg +9 -9
- package/assets/icons/menu_footer_icon.svg +3 -3
- package/assets/icons/menu_hamburguer_icon.svg +3 -3
- package/assets/icons/terms_of_use_icon.svg +9 -9
- package/assets/icons/vector_admin_icon.svg +4 -4
- package/assets/icons/vector_fintech_icon.svg +3 -3
- package/assets/icons/vector_logtech_icon.svg +6 -6
- package/assets/icons/vector_marketplace_icon.svg +3 -3
- package/assets/images/bunge_logo.svg +23 -23
- package/assets/images/cofco_logo.svg +117 -117
- package/assets/images/emote_bad.svg +6 -6
- package/assets/images/emote_cool.svg +5 -5
- package/assets/images/emote_nice.svg +5 -5
- package/assets/images/success_sign.svg +4 -4
- package/assets/images/vector-logo-horizontal-inverse-color.svg +13 -13
- package/assets/images/vector_logo_horizontal.svg +13 -13
- package/assets/images/warn_sign.svg +4 -4
- package/assets/styles/_fonts.scss +114 -114
- package/assets/styles/_mixins.scss +7 -7
- package/assets/styles/_primeng-custom-theme.scss +1861 -1860
- package/assets/styles/_spinner.scss +36 -36
- package/assets/styles/_styles.scss +134 -134
- package/assets/styles/_variables.scss +61 -61
- package/fesm2022/ngx-vector-components.mjs +499 -90
- package/fesm2022/ngx-vector-components.mjs.map +1 -1
- package/lib/components/fields/fields.module.d.ts +29 -28
- package/lib/components/fields/index.d.ts +1 -0
- package/lib/components/fields/input-file/index.d.ts +1 -0
- package/lib/components/fields/input-file/input-file.component.d.ts +141 -0
- package/lib/models/profile.model.d.ts +1 -0
- package/package.json +1 -1
|
@@ -18,35 +18,36 @@ import * as i16 from "./select-button-field/select-button-field.component";
|
|
|
18
18
|
import * as i17 from "./input-number-field/input-number-field.component";
|
|
19
19
|
import * as i18 from "./input-switch-field/input-switch-field.component";
|
|
20
20
|
import * as i19 from "./input-otp/input-otp.component";
|
|
21
|
-
import * as i20 from "
|
|
22
|
-
import * as i21 from "
|
|
23
|
-
import * as i22 from "
|
|
24
|
-
import * as i23 from "primeng/
|
|
25
|
-
import * as i24 from "primeng/
|
|
26
|
-
import * as i25 from "primeng/
|
|
27
|
-
import * as i26 from "primeng/
|
|
28
|
-
import * as i27 from "primeng/
|
|
29
|
-
import * as i28 from "primeng/
|
|
30
|
-
import * as i29 from "primeng/
|
|
31
|
-
import * as i30 from "primeng/
|
|
32
|
-
import * as i31 from "primeng/
|
|
33
|
-
import * as i32 from "primeng/
|
|
34
|
-
import * as i33 from "primeng/
|
|
35
|
-
import * as i34 from "primeng/
|
|
36
|
-
import * as i35 from "
|
|
37
|
-
import * as i36 from "
|
|
38
|
-
import * as i37 from "primeng/
|
|
39
|
-
import * as i38 from "primeng/
|
|
40
|
-
import * as i39 from "primeng/
|
|
41
|
-
import * as i40 from "
|
|
42
|
-
import * as i41 from "../
|
|
43
|
-
import * as i42 from "
|
|
44
|
-
import * as i43 from "
|
|
45
|
-
import * as i44 from "primeng/
|
|
46
|
-
import * as i45 from "primeng/
|
|
47
|
-
import * as i46 from "primeng/
|
|
21
|
+
import * as i20 from "./input-file/input-file.component";
|
|
22
|
+
import * as i21 from "../../shared/shared.module";
|
|
23
|
+
import * as i22 from "@angular/forms";
|
|
24
|
+
import * as i23 from "primeng/keyfilter";
|
|
25
|
+
import * as i24 from "primeng/inputtext";
|
|
26
|
+
import * as i25 from "primeng/checkbox";
|
|
27
|
+
import * as i26 from "primeng/inputmask";
|
|
28
|
+
import * as i27 from "primeng/datepicker";
|
|
29
|
+
import * as i28 from "primeng/multiselect";
|
|
30
|
+
import * as i29 from "primeng/select";
|
|
31
|
+
import * as i30 from "primeng/autocomplete";
|
|
32
|
+
import * as i31 from "primeng/slider";
|
|
33
|
+
import * as i32 from "primeng/radiobutton";
|
|
34
|
+
import * as i33 from "primeng/fileupload";
|
|
35
|
+
import * as i34 from "primeng/dialog";
|
|
36
|
+
import * as i35 from "primeng/inputnumber";
|
|
37
|
+
import * as i36 from "../panel/panel.module";
|
|
38
|
+
import * as i37 from "primeng/tabview";
|
|
39
|
+
import * as i38 from "primeng/button";
|
|
40
|
+
import * as i39 from "primeng/textarea";
|
|
41
|
+
import * as i40 from "primeng/selectbutton";
|
|
42
|
+
import * as i41 from "../badge/badge.module";
|
|
43
|
+
import * as i42 from "../score/score.module";
|
|
44
|
+
import * as i43 from "@ngx-translate/core";
|
|
45
|
+
import * as i44 from "primeng/toggleswitch";
|
|
46
|
+
import * as i45 from "primeng/menu";
|
|
47
|
+
import * as i46 from "primeng/table";
|
|
48
|
+
import * as i47 from "primeng/inputotp";
|
|
48
49
|
export declare class FieldsModule {
|
|
49
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldsModule, never>;
|
|
50
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FieldsModule, [typeof i1.DataTableComponent, typeof i2.TextFieldComponent, typeof i3.CheckboxFieldComponent, typeof i4.ButtonComponent, typeof i5.CalendarComponent, typeof i6.MultiselectFieldComponent, typeof i7.DropdownFieldComponent, typeof i8.RangeValueComponent, typeof i9.SearchFieldComponent, typeof i10.RadioButtonFieldComponent, typeof i11.CurrencyFieldComponent, typeof i12.PercentageFieldComponent, typeof i13.FiltersComponent, typeof i14.TextareaFieldComponent, typeof i15.FieldErrorMessageComponent, typeof i16.SelectButtonFieldComponent, typeof i17.InputNumberFieldComponent, typeof i18.InputSwitchFieldComponent, typeof i19.InputOtpComponent], [typeof
|
|
51
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FieldsModule, [typeof i1.DataTableComponent, typeof i2.TextFieldComponent, typeof i3.CheckboxFieldComponent, typeof i4.ButtonComponent, typeof i5.CalendarComponent, typeof i6.MultiselectFieldComponent, typeof i7.DropdownFieldComponent, typeof i8.RangeValueComponent, typeof i9.SearchFieldComponent, typeof i10.RadioButtonFieldComponent, typeof i11.CurrencyFieldComponent, typeof i12.PercentageFieldComponent, typeof i13.FiltersComponent, typeof i14.TextareaFieldComponent, typeof i15.FieldErrorMessageComponent, typeof i16.SelectButtonFieldComponent, typeof i17.InputNumberFieldComponent, typeof i18.InputSwitchFieldComponent, typeof i19.InputOtpComponent, typeof i20.InputFileComponent], [typeof i21.SharedModule, typeof i22.FormsModule, typeof i22.ReactiveFormsModule, typeof i23.KeyFilterModule, typeof i24.InputTextModule, typeof i25.CheckboxModule, typeof i26.InputMaskModule, typeof i27.DatePickerModule, typeof i28.MultiSelectModule, typeof i29.SelectModule, typeof i30.AutoCompleteModule, typeof i31.SliderModule, typeof i32.RadioButtonModule, typeof i33.FileUploadModule, typeof i34.DialogModule, typeof i35.InputNumberModule, typeof i36.PanelModule, typeof i37.TabViewModule, typeof i38.ButtonModule, typeof i39.TextareaModule, typeof i40.SelectButtonModule, typeof i35.InputNumberModule, typeof i41.BadgeModule, typeof i42.ScoreModule, typeof i43.TranslateModule, typeof i44.ToggleSwitchModule, typeof i45.MenuModule, typeof i46.TableModule, typeof i47.InputOtpModule], [typeof i1.DataTableComponent, typeof i2.TextFieldComponent, typeof i3.CheckboxFieldComponent, typeof i4.ButtonComponent, typeof i5.CalendarComponent, typeof i6.MultiselectFieldComponent, typeof i7.DropdownFieldComponent, typeof i8.RangeValueComponent, typeof i9.SearchFieldComponent, typeof i10.RadioButtonFieldComponent, typeof i33.FileUploadModule, typeof i34.DialogModule, typeof i11.CurrencyFieldComponent, typeof i12.PercentageFieldComponent, typeof i13.FiltersComponent, typeof i14.TextareaFieldComponent, typeof i15.FieldErrorMessageComponent, typeof i16.SelectButtonFieldComponent, typeof i17.InputNumberFieldComponent, typeof i18.InputSwitchFieldComponent, typeof i19.InputOtpComponent, typeof i20.InputFileComponent]>;
|
|
51
52
|
static ɵinj: i0.ɵɵInjectorDeclaration<FieldsModule>;
|
|
52
53
|
}
|
|
@@ -7,6 +7,7 @@ export * from './dropdown-field';
|
|
|
7
7
|
export * from './field-error-message';
|
|
8
8
|
export * from './fields.module';
|
|
9
9
|
export * from './filters';
|
|
10
|
+
export * from './input-file';
|
|
10
11
|
export * from './input-number-field';
|
|
11
12
|
export * from './input-otp';
|
|
12
13
|
export * from './input-switch-field';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-file.component';
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormArray, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
4
|
+
import { FileSelectEvent, FileUpload } from 'primeng/fileupload';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
type ButtonType = 'success' | 'success-outlined' | 'default' | 'default-filled' | 'default-outlined' | 'default-outlined-gray' | 'default-outlined-gray-icon-red' | 'default-outlined-gray-icon-gray' | 'cancel' | 'cancel-filled' | 'light-outline';
|
|
7
|
+
export type InputFileButtonConfig = {
|
|
8
|
+
label?: string;
|
|
9
|
+
type?: ButtonType;
|
|
10
|
+
leftIcon?: string;
|
|
11
|
+
rightIcon?: string;
|
|
12
|
+
};
|
|
13
|
+
export type InputFileAcceptExtension = 'PDF' | 'DOC' | 'DOCX' | 'XLS' | 'XLSX' | 'PPT' | 'PPTX' | 'TXT' | 'CSV' | 'RTF' | 'JPG' | 'JPEG' | 'PNG' | 'GIF' | 'BMP' | 'WEBP' | 'SVG' | 'MP4' | 'MP3' | 'WAV' | 'ZIP' | 'RAR' | 'JSON' | 'XML';
|
|
14
|
+
export type UploadSingleFormValue = {
|
|
15
|
+
originalFileName: string;
|
|
16
|
+
friendlyFileName: string;
|
|
17
|
+
fileExtension: string;
|
|
18
|
+
fileSize: number;
|
|
19
|
+
contentType: string;
|
|
20
|
+
lastModified: number;
|
|
21
|
+
convertedData: string | FormData | null;
|
|
22
|
+
};
|
|
23
|
+
export type UploadSingleFormControls = {
|
|
24
|
+
originalFileName: FormControl<string>;
|
|
25
|
+
friendlyFileName: FormControl<string>;
|
|
26
|
+
fileExtension: FormControl<string>;
|
|
27
|
+
fileSize: FormControl<number>;
|
|
28
|
+
contentType: FormControl<string>;
|
|
29
|
+
lastModified: FormControl<number>;
|
|
30
|
+
convertedData: FormControl<string | FormData | null>;
|
|
31
|
+
};
|
|
32
|
+
export type UploadSingleFormGroup = FormGroup<UploadSingleFormControls>;
|
|
33
|
+
export type UploadMultipleFormArray = FormArray<UploadSingleFormGroup>;
|
|
34
|
+
/**
|
|
35
|
+
* Callback dos botões. Em modo single recebe um valor único; em modo multiple recebe a lista.
|
|
36
|
+
* O componente decide qual formato passar com base em `uploadType`.
|
|
37
|
+
*/
|
|
38
|
+
export type InputFileButtonEvent = (value: UploadSingleFormValue | UploadSingleFormValue[]) => void | Promise<void>;
|
|
39
|
+
/** Cria FormGroup vazio para modo single (ou item de FormArray no modo multiple). */
|
|
40
|
+
export declare function createUploadSingleForm(): UploadSingleFormGroup;
|
|
41
|
+
/** Cria FormArray vazio para modo multiple. */
|
|
42
|
+
export declare function createUploadMultipleForm(): UploadMultipleFormArray;
|
|
43
|
+
export declare class InputFileComponent {
|
|
44
|
+
private sanitizer;
|
|
45
|
+
/** Modo do upload: `'single'` = 1 arquivo (usa FormGroup) · `'multiple'` = vários (usa FormArray). Default: `'single'`. */
|
|
46
|
+
uploadType: 'single' | 'multiple';
|
|
47
|
+
/** Formato salvo em `convertedData`: `'base64'` (data URL string) ou `'formData'` (FormData pronto para POST). Default: `'formData'`. */
|
|
48
|
+
uploadFormat: 'formData' | 'base64';
|
|
49
|
+
/** Criação de formulário: Single → `UploadSingleFormGroup` (use `createUploadSingleForm()`) · Multiple → `UploadMultipleFormArray` (use `createUploadMultipleForm()`). Se omitido, usa form interno. */
|
|
50
|
+
control?: UploadSingleFormGroup | UploadMultipleFormArray;
|
|
51
|
+
/** Extensões aceitas, ex: `['PDF', 'JPG']` (vira `accept=".pdf,.jpg"`). Array vazio = aceita qualquer tipo. */
|
|
52
|
+
acceptExtensions: InputFileAcceptExtension[];
|
|
53
|
+
/** Tamanho máximo por arquivo em **MB** (ex: `5` = 5MB). `null` = sem limite. Convertido internamente pra bytes. */
|
|
54
|
+
maxFileSize: number | null;
|
|
55
|
+
/** Quantidade máxima de arquivos no modo multiple (1 à 10). Ignorado em single (sempre 1). Default: `10`. */
|
|
56
|
+
maxFileNumberUploaded: number;
|
|
57
|
+
/** Renderiza o botão "Enviar" ao lado de "Anexar". Default: `false`. */
|
|
58
|
+
uploadButtonSendEnabled: boolean;
|
|
59
|
+
/** Renderiza o botão "Cancelar" (limpa todos os arquivos ao clicar). Default: `false`. */
|
|
60
|
+
uploadButtonCancelEnabled: boolean;
|
|
61
|
+
/** Callback disparado após clicar em "Anexar" e o picker do SO fechar. Recebe o valor atual do form (objeto em single, array em multiple). */
|
|
62
|
+
uploadButtonAttachEvent?: InputFileButtonEvent;
|
|
63
|
+
/** Callback do botão "Enviar". Enquanto a Promise retornada não resolve, `internalSending` fica `true` (botão em loading e demais desabilitados). */
|
|
64
|
+
uploadButtonSendEvent?: InputFileButtonEvent;
|
|
65
|
+
/** Callback do botão "Cancelar". Chamado **após** o form já ter sido limpo — útil para notificar o consumidor. */
|
|
66
|
+
uploadButtonCancelEvent?: InputFileButtonEvent;
|
|
67
|
+
/** Habilita clique na badge do arquivo para abrir modal de preview (imagem ou PDF). Default: `false`. */
|
|
68
|
+
enableModalView: boolean;
|
|
69
|
+
fileSelected: EventEmitter<UploadSingleFormValue | UploadSingleFormValue[]>;
|
|
70
|
+
fileRemoved: EventEmitter<void>;
|
|
71
|
+
fileUploadRef?: FileUpload;
|
|
72
|
+
internalSending: boolean;
|
|
73
|
+
isModalViewOpen: boolean;
|
|
74
|
+
/** Índice do arquivo que está sendo visualizado no modal (só usado em modo multiple). */
|
|
75
|
+
modalViewIndex: number | null;
|
|
76
|
+
private _internalForm;
|
|
77
|
+
private _internalArray;
|
|
78
|
+
/** Single: arquivo original (antes das conversões) + objectURL para preview. */
|
|
79
|
+
private _selectedFile;
|
|
80
|
+
private _previewObjectUrl;
|
|
81
|
+
/** Multiple: arquivos originais por índice + objectURLs por índice, paralelo ao FormArray. */
|
|
82
|
+
private _multipleFiles;
|
|
83
|
+
private _multiplePreviewObjectUrls;
|
|
84
|
+
constructor(sanitizer: DomSanitizer);
|
|
85
|
+
private _uploadButtonAttach;
|
|
86
|
+
/** Customiza o botão "Anexar" (`label`, `type`, `leftIcon`, `rightIcon`). */
|
|
87
|
+
set uploadButtonAttach(value: InputFileButtonConfig | undefined | null);
|
|
88
|
+
get uploadButtonAttach(): Required<InputFileButtonConfig>;
|
|
89
|
+
private _uploadButtonSend;
|
|
90
|
+
/** Customiza o botão "Enviar". (`label`, `type`, `leftIcon`, `rightIcon`) */
|
|
91
|
+
set uploadButtonSend(value: InputFileButtonConfig | undefined | null);
|
|
92
|
+
get uploadButtonSend(): Required<InputFileButtonConfig>;
|
|
93
|
+
private _uploadButtonCancel;
|
|
94
|
+
/** Customiza o botão "Cancelar". (`label`, `type`, `leftIcon`, `rightIcon`). Só aparece se `uploadButtonCancelEnabled === true`. */
|
|
95
|
+
set uploadButtonCancel(value: InputFileButtonConfig | undefined | null);
|
|
96
|
+
get uploadButtonCancel(): Required<InputFileButtonConfig>;
|
|
97
|
+
get uploadForm(): UploadSingleFormGroup;
|
|
98
|
+
get uploadArray(): UploadMultipleFormArray;
|
|
99
|
+
/** True se tem arquivo(s) — funciona pros dois modos. */
|
|
100
|
+
get hasFile(): boolean;
|
|
101
|
+
/** Send habilitado se: single com arquivo, ou multiple com pelo menos 1 arquivo. */
|
|
102
|
+
get canSend(): boolean;
|
|
103
|
+
/** Limite atingido — desabilita Attach em modo multiple. */
|
|
104
|
+
get isAttachAtLimit(): boolean;
|
|
105
|
+
get acceptString(): string;
|
|
106
|
+
get maxFileSizeBytes(): number;
|
|
107
|
+
/** Passado para o p-fileUpload — 1 em modo single, o input em modo multiple. */
|
|
108
|
+
get effectiveFileLimit(): number;
|
|
109
|
+
handleAttachClick(event: MouseEvent): Promise<void>;
|
|
110
|
+
handleSendClick(): Promise<void>;
|
|
111
|
+
handleCancelClick(): Promise<void>;
|
|
112
|
+
private currentEmitValue;
|
|
113
|
+
resetUploadForm(): void;
|
|
114
|
+
/** Remove um item específico do FormArray (modo multiple). */
|
|
115
|
+
removeUploadArrayItem(index: number): void;
|
|
116
|
+
onPrimeFileSelect(event: FileSelectEvent): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Abre o modal de preview. Em single, chama sem índice. Em multiple, passa o índice.
|
|
119
|
+
*/
|
|
120
|
+
openModalView(index?: number): void;
|
|
121
|
+
closeModalView(): void;
|
|
122
|
+
/** FormGroup do arquivo atualmente sendo visualizado (single ou item do array). */
|
|
123
|
+
private currentPreviewControl;
|
|
124
|
+
get previewFileName(): string;
|
|
125
|
+
get isImagePreview(): boolean;
|
|
126
|
+
get isPdfPreview(): boolean;
|
|
127
|
+
get previewUrl(): string;
|
|
128
|
+
get safePreviewUrl(): SafeResourceUrl;
|
|
129
|
+
private triggerAttach;
|
|
130
|
+
private buildValueFromFile;
|
|
131
|
+
private toFriendlyName;
|
|
132
|
+
private extractExtension;
|
|
133
|
+
private stripExtension;
|
|
134
|
+
private convertFile;
|
|
135
|
+
private fileToBase64;
|
|
136
|
+
private fileToFormData;
|
|
137
|
+
private revokePreviewObjectUrl;
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputFileComponent, never>;
|
|
139
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputFileComponent, "vector-input-file", never, { "uploadType": { "alias": "uploadType"; "required": false; }; "uploadFormat": { "alias": "uploadFormat"; "required": false; }; "control": { "alias": "control"; "required": false; }; "acceptExtensions": { "alias": "acceptExtensions"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "maxFileNumberUploaded": { "alias": "maxFileNumberUploaded"; "required": false; }; "uploadButtonSendEnabled": { "alias": "uploadButtonSendEnabled"; "required": false; }; "uploadButtonCancelEnabled": { "alias": "uploadButtonCancelEnabled"; "required": false; }; "uploadButtonAttachEvent": { "alias": "uploadButtonAttachEvent"; "required": false; }; "uploadButtonSendEvent": { "alias": "uploadButtonSendEvent"; "required": false; }; "uploadButtonCancelEvent": { "alias": "uploadButtonCancelEvent"; "required": false; }; "enableModalView": { "alias": "enableModalView"; "required": false; }; "uploadButtonAttach": { "alias": "uploadButtonAttach"; "required": false; }; "uploadButtonSend": { "alias": "uploadButtonSend"; "required": false; }; "uploadButtonCancel": { "alias": "uploadButtonCancel"; "required": false; }; }, { "fileSelected": "fileSelected"; "fileRemoved": "fileRemoved"; }, never, never, false, never>;
|
|
140
|
+
}
|
|
141
|
+
export {};
|
|
@@ -733,6 +733,7 @@ export declare enum ProfileModuleActionType {
|
|
|
733
733
|
ENABLED_CHANGE_FREIGHTRATE_IN_LOT_MASSIVELY = "Enabled Change FreightRate In Lot Massively",
|
|
734
734
|
RECEIVABLE_CHARGE = "ReceivableCharge",
|
|
735
735
|
CAMPAIGN = "Campanha",
|
|
736
|
+
LINK_GENERATOR = "Gerador De Link",
|
|
736
737
|
ADD_BLOCK_CARRIER = "Add Block Carrier",
|
|
737
738
|
SHOW_BLOCK_CARRIER = "Show Block Carrier",
|
|
738
739
|
EDIT_BLOCK_CARRIER = "Edit Block Carrier"
|