@sgcloud-sgsistemas/angular-components 0.0.1

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 ADDED
@@ -0,0 +1,396 @@
1
+ import * as i0 from '@angular/core';
2
+ import { SimpleChanges, EventEmitter, ElementRef, TemplateRef } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { Subject, Observable } from 'rxjs';
5
+
6
+ declare class AcButton {
7
+ disabled: boolean;
8
+ title: any | null | undefined;
9
+ colorType: 'white' | 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning';
10
+ leftIcon: string | null;
11
+ rightIcon: string | null;
12
+ onClick: Function | null;
13
+ isWhite: boolean;
14
+ isPrimary: boolean;
15
+ isSecondary: boolean;
16
+ isTertiary: boolean;
17
+ isNeutral: boolean;
18
+ isError: boolean;
19
+ isSuccess: boolean;
20
+ isWarning: boolean;
21
+ constructor();
22
+ ngOnInit(): void;
23
+ ngOnChanges(changes: SimpleChanges): void;
24
+ actionClick(): void;
25
+ private defineColorType;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcButton, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcButton, "ac-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "colorType": { "alias": "colorType"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; }, {}, never, never, true, never>;
28
+ }
29
+
30
+ declare class AcSwitch {
31
+ model: boolean;
32
+ disabled: boolean;
33
+ title: string;
34
+ buildTitleSpace: boolean;
35
+ titleColor: string | null;
36
+ backgroundColor: string;
37
+ checkedColor: string;
38
+ focusColor: string;
39
+ ballColor: string;
40
+ onToggle: Function | null;
41
+ modelChange: EventEmitter<boolean>;
42
+ constructor();
43
+ ngOnInit(): void;
44
+ onChange(): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcSwitch, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcSwitch, "ac-switch", never, { "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "titleColor": { "alias": "titleColor"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "checkedColor": { "alias": "checkedColor"; "required": false; }; "focusColor": { "alias": "focusColor"; "required": false; }; "ballColor": { "alias": "ballColor"; "required": false; }; "onToggle": { "alias": "onToggle"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
47
+ }
48
+
49
+ declare class AcCheckBox {
50
+ model: boolean;
51
+ disabled: boolean;
52
+ title: string;
53
+ buildTitleSpace: boolean;
54
+ titleColor: string | null;
55
+ onToggle: Function | null;
56
+ modelChange: EventEmitter<boolean>;
57
+ constructor();
58
+ ngOnInit(): void;
59
+ onChange(): void;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcCheckBox, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcCheckBox, "ac-checkbox", never, { "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "titleColor": { "alias": "titleColor"; "required": false; }; "onToggle": { "alias": "onToggle"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
62
+ }
63
+
64
+ declare abstract class AcInput {
65
+ model: string | undefined;
66
+ disabled: boolean;
67
+ placeholder: string;
68
+ title: string;
69
+ buildTitleSpace: boolean;
70
+ debounce: number;
71
+ onChangeModel: Function | null;
72
+ modelChange: EventEmitter<string>;
73
+ private inputSubject;
74
+ constructor();
75
+ ngOnInit(): void;
76
+ onChange(value: string): void;
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInput, never>;
78
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AcInput, never, never, { "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "onChangeModel": { "alias": "onChangeModel"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
79
+ }
80
+
81
+ declare class AcInputPassword extends AcInput {
82
+ showPassword: boolean;
83
+ constructor();
84
+ togglePasswordVisibility(): void;
85
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputPassword, never>;
86
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputPassword, "ac-input-password", never, {}, {}, never, never, true, never>;
87
+ }
88
+
89
+ declare class AcInputText extends AcInput {
90
+ constructor();
91
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputText, never>;
92
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputText, "ac-input-text", never, {}, {}, never, never, true, never>;
93
+ }
94
+
95
+ declare abstract class AcInputMaskNumber {
96
+ model: string | undefined;
97
+ disabled: boolean;
98
+ placeholder: string;
99
+ title: string;
100
+ buildTitleSpace: boolean;
101
+ debounce: number;
102
+ onChangeModel: Function | null;
103
+ modelChange: EventEmitter<string>;
104
+ inputSubject: Subject<string>;
105
+ formattedValue: string;
106
+ constructor();
107
+ ngOnInit(): void;
108
+ ngOnChanges(changes: SimpleChanges): void;
109
+ abstract applyMask(value: string | undefined, limitLength: boolean): string;
110
+ onChange(value: string): void;
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputMaskNumber, never>;
112
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AcInputMaskNumber, never, never, { "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "onChangeModel": { "alias": "onChangeModel"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
113
+ }
114
+
115
+ declare class AcInputDocumentNumber extends AcInputMaskNumber {
116
+ documentType: string | 'CNPJ' | 'CPF';
117
+ constructor();
118
+ applyMask(value: string | undefined, limitLength: boolean): string;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputDocumentNumber, never>;
120
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputDocumentNumber, "ac-input-document-number", never, { "documentType": { "alias": "documentType"; "required": false; }; }, {}, never, never, true, never>;
121
+ }
122
+
123
+ declare class AcInputPhoneNumber extends AcInputMaskNumber {
124
+ constructor();
125
+ applyMask(value: string | undefined, limitLength: boolean): string;
126
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputPhoneNumber, never>;
127
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputPhoneNumber, "ac-input-phone-number", never, {}, {}, never, never, true, never>;
128
+ }
129
+
130
+ declare abstract class AcInputDateTimeDefault {
131
+ model: Date | undefined;
132
+ disabled: boolean;
133
+ title: string;
134
+ buildTitleSpace: boolean;
135
+ debounce: number;
136
+ onChangeModel: Function | null;
137
+ modelChange: EventEmitter<Date>;
138
+ private inputSubject;
139
+ date: string;
140
+ time: string;
141
+ constructor();
142
+ ngOnInit(): void;
143
+ private applyMask;
144
+ ngOnChanges(changes: SimpleChanges): void;
145
+ onChangeDate(event: any): void;
146
+ onChangeTime(event: any): void;
147
+ private updateNgModel;
148
+ private formatDate;
149
+ private formatTime;
150
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputDateTimeDefault, never>;
151
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AcInputDateTimeDefault, never, never, { "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "onChangeModel": { "alias": "onChangeModel"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
152
+ }
153
+
154
+ declare class AcInputDateTime extends AcInputDateTimeDefault {
155
+ constructor();
156
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputDateTime, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputDateTime, "ac-input-date-time", never, {}, {}, never, never, true, never>;
158
+ }
159
+
160
+ declare class AcInputDate extends AcInputDateTimeDefault {
161
+ constructor();
162
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputDate, never>;
163
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputDate, "ac-input-date", never, {}, {}, never, never, true, never>;
164
+ }
165
+
166
+ declare class AcInputTime extends AcInputDateTimeDefault {
167
+ constructor();
168
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputTime, never>;
169
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputTime, "ac-input-time", never, {}, {}, never, never, true, never>;
170
+ }
171
+
172
+ declare class AcInputFile {
173
+ model: string | undefined;
174
+ disabled: boolean;
175
+ title: string;
176
+ buildTitleSpace: boolean;
177
+ accept: string;
178
+ index: number;
179
+ onSelectFile: EventEmitter<{
180
+ event: Event;
181
+ index: number;
182
+ }>;
183
+ onUnselectFile: EventEmitter<{
184
+ index: number;
185
+ }>;
186
+ selectedFileName: string | null;
187
+ fileInputId: string;
188
+ constructor();
189
+ ngOnInit(): void;
190
+ onFileChange(event: Event): void;
191
+ triggerFileInput(): void;
192
+ removeFile(): void;
193
+ uuid(): string;
194
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcInputFile, never>;
195
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcInputFile, "ac-input-file", never, { "model": { "alias": "model"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, { "onSelectFile": "onSelectFile"; "onUnselectFile": "onUnselectFile"; }, never, never, true, never>;
196
+ }
197
+
198
+ declare class AcActionLink {
199
+ disabled: boolean;
200
+ title: string;
201
+ onClick: Function | null;
202
+ constructor();
203
+ ngOnInit(): void;
204
+ actionClick(): void;
205
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcActionLink, never>;
206
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcActionLink, "ac-action-link", never, { "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "onClick": { "alias": "onClick"; "required": false; }; }, {}, never, never, true, never>;
207
+ }
208
+
209
+ declare class AcSelect {
210
+ private elementRef;
211
+ model: any | undefined;
212
+ index: number | null;
213
+ disabled: boolean;
214
+ title: string;
215
+ buildTitleSpace: boolean;
216
+ debounce: number;
217
+ placeholder: string;
218
+ labelName: string;
219
+ valueName: string;
220
+ options: Array<any>;
221
+ searchOptions: Function | null;
222
+ onChangeModel: Function | null;
223
+ modelChange: EventEmitter<any | null>;
224
+ private inputSubject;
225
+ filteredOptions: Array<any>;
226
+ searchText: string;
227
+ itemSelected: any | null;
228
+ showList: boolean;
229
+ private fakeFocusPosition;
230
+ constructor(elementRef: ElementRef);
231
+ ngOnInit(): void;
232
+ ngOnChanges(changes: SimpleChanges): void;
233
+ onChangeInputSearch(value: string): void;
234
+ filterOptions(value: string): Promise<void>;
235
+ private updateItemSelected;
236
+ getItemSelectedLabel(): string;
237
+ onFocus(): void;
238
+ onBlur(): void;
239
+ getListPreview(): string[];
240
+ selectItem(index: number): void;
241
+ removeItem(): void;
242
+ onFocusOut(event: FocusEvent): void;
243
+ keydownList(event: KeyboardEvent): void;
244
+ private updateFocusState;
245
+ hasFocus(valueIdxFromList: number): boolean;
246
+ haveModel(): boolean;
247
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcSelect, never>;
248
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcSelect, "ac-select", never, { "model": { "alias": "model"; "required": false; }; "index": { "alias": "index"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "title": { "alias": "title"; "required": false; }; "buildTitleSpace": { "alias": "buildTitleSpace"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "labelName": { "alias": "labelName"; "required": false; }; "valueName": { "alias": "valueName"; "required": false; }; "options": { "alias": "options"; "required": false; }; "searchOptions": { "alias": "searchOptions"; "required": false; }; "onChangeModel": { "alias": "onChangeModel"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, true, never>;
249
+ }
250
+
251
+ declare class AcPagination {
252
+ totalItems: number;
253
+ itemsPerPage: number;
254
+ currentPage: number;
255
+ pageChange: EventEmitter<number>;
256
+ totalPages: number;
257
+ pages: number[];
258
+ constructor();
259
+ ngOnInit(): void;
260
+ ngOnChanges(): void;
261
+ calculatePages(): void;
262
+ goToPage(page: number): void;
263
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcPagination, never>;
264
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcPagination, "ac-pagination", never, { "totalItems": { "alias": "totalItems"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
265
+ }
266
+
267
+ interface Notifications<T = Notification> {
268
+ topCenter: T[];
269
+ topLeft: T[];
270
+ topRight: T[];
271
+ bottomCenter: T[];
272
+ bottomLeft: T[];
273
+ bottomRight: T[];
274
+ }
275
+ type NotificationType = 'normal' | 'success' | 'error' | 'info' | 'warning';
276
+ interface Notification {
277
+ type: NotificationType;
278
+ message: string;
279
+ timer?: number;
280
+ }
281
+
282
+ type Notify = Notification & {
283
+ id?: string;
284
+ show?: boolean;
285
+ };
286
+ declare class AcNotification {
287
+ private static defaultTimer;
288
+ private static notifications;
289
+ getNotifications(key: keyof Notifications): Observable<Notify[]>;
290
+ ngOnInit(): void;
291
+ static notify(notification: Notify, vertical: 'top' | 'bottom', horizontal: 'left' | 'center' | 'right'): void;
292
+ private static scheduleHideNotification;
293
+ private static strCapitalize;
294
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcNotification, never>;
295
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcNotification, "ac-notification", never, {}, {}, never, never, true, never>;
296
+ }
297
+
298
+ declare class AcProgressBar {
299
+ color: string;
300
+ timer: number;
301
+ transparentColor: string;
302
+ startTime: number;
303
+ percent: number;
304
+ ngOnInit(): void;
305
+ getPercentage(): string;
306
+ updateProgress(): void;
307
+ getTransparentColor(): string;
308
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcProgressBar, never>;
309
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcProgressBar, "ac-progress-bar", never, { "color": { "alias": "color"; "required": false; }; "timer": { "alias": "timer"; "required": false; }; }, {}, never, never, true, never>;
310
+ }
311
+
312
+ type AcModule = {
313
+ title: string;
314
+ icon: string;
315
+ path: string;
316
+ modules: AcModule[];
317
+ };
318
+
319
+ type AcRoute = {
320
+ title: string;
321
+ icon: string;
322
+ modulesType: AcModule[];
323
+ };
324
+
325
+ declare class AcSideMenu {
326
+ readonly elementRef: ElementRef<HTMLElement>;
327
+ previewIdx: number;
328
+ showModulesNumber: number;
329
+ showModules: boolean;
330
+ moduleClicked: number;
331
+ modules: AcModule[];
332
+ routes: AcRoute;
333
+ goTo: Function | null;
334
+ forcedShowModules: boolean;
335
+ constructor();
336
+ ngOnInit(): void;
337
+ ngOnDestroy(): void;
338
+ private setModules;
339
+ getModules(): AcModule[];
340
+ onModule(index: number, showModules: boolean): void;
341
+ onSubModule(onSubModule: AcModule): void;
342
+ mouseInSomeModule(index: number): void;
343
+ private clickOutsideDetected;
344
+ private mouseEnterDetected;
345
+ private mouseLeaveDetected;
346
+ private onMouseLeave;
347
+ private onBlur;
348
+ private onFocus;
349
+ private resetFocus;
350
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcSideMenu, never>;
351
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcSideMenu, "ac-side-menu", never, { "routes": { "alias": "routes"; "required": false; }; "goTo": { "alias": "goTo"; "required": false; }; "forcedShowModules": { "alias": "forcedShowModules"; "required": false; }; }, {}, never, never, true, never>;
352
+ }
353
+
354
+ interface AcListColumn {
355
+ param: string;
356
+ label: string;
357
+ direction?: string;
358
+ hide?: boolean;
359
+ sortable?: boolean;
360
+ size?: number;
361
+ }
362
+
363
+ type AcListSortDirection = "ASC" | "DESC" | "NONE";
364
+
365
+ type IconDirection = {
366
+ icon: string;
367
+ next: AcListSortDirection;
368
+ };
369
+ type Direction = {
370
+ NONE: IconDirection;
371
+ ASC: IconDirection;
372
+ DESC: IconDirection;
373
+ };
374
+ declare class AcList {
375
+ direction: Direction;
376
+ columns: AcListColumn[];
377
+ list: any[];
378
+ rowTemplate?: TemplateRef<any>;
379
+ sortColumn: string;
380
+ sortDirection: AcListSortDirection;
381
+ constructor();
382
+ ngOnInit(): void;
383
+ ngOnChanges(changes: SimpleChanges): void;
384
+ onSortDirection(colIndex: number): void;
385
+ getSortDirection(colIndex: number): AcListSortDirection;
386
+ static ɵfac: i0.ɵɵFactoryDeclaration<AcList, never>;
387
+ static ɵcmp: i0.ɵɵComponentDeclaration<AcList, "ac-list", never, { "columns": { "alias": "columns"; "required": false; }; "list": { "alias": "list"; "required": false; }; "rowTemplate": { "alias": "rowTemplate"; "required": false; }; "sortColumn": { "alias": "sortColumn"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; }, {}, never, never, true, never>;
388
+ }
389
+
390
+ declare class ComponentsModule {
391
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
392
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, never, [typeof i1.CommonModule, typeof AcButton, typeof AcSwitch, typeof AcCheckBox, typeof AcInputPassword, typeof AcInputText, typeof AcInputDocumentNumber, typeof AcInputPhoneNumber, typeof AcInputDateTime, typeof AcInputDate, typeof AcInputTime, typeof AcInputFile, typeof AcActionLink, typeof AcSelect, typeof AcPagination, typeof AcNotification, typeof AcProgressBar, typeof AcSideMenu, typeof AcList], [typeof AcButton, typeof AcSwitch, typeof AcCheckBox, typeof AcInputPassword, typeof AcInputText, typeof AcInputDocumentNumber, typeof AcInputPhoneNumber, typeof AcInputDateTime, typeof AcInputDate, typeof AcInputTime, typeof AcInputFile, typeof AcActionLink, typeof AcSelect, typeof AcPagination, typeof AcNotification, typeof AcProgressBar, typeof AcSideMenu, typeof AcList]>;
393
+ static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
394
+ }
395
+
396
+ export { AcActionLink, AcButton, AcCheckBox, AcInputDate, AcInputDateTime, AcInputDocumentNumber, AcInputFile, AcInputPassword, AcInputPhoneNumber, AcInputText, AcInputTime, AcList, AcNotification, AcPagination, AcProgressBar, AcSelect, AcSideMenu, AcSwitch, ComponentsModule };
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@sgcloud-sgsistemas/angular-components",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^20.0.0",
6
+ "@angular/core": "^20.0.0",
7
+ "@angular/material": "^20.0.3"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/sgcloud-sgsistemas-angular-components.mjs",
14
+ "typings": "index.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./index.d.ts",
21
+ "default": "./fesm2022/sgcloud-sgsistemas-angular-components.mjs"
22
+ }
23
+ }
24
+ }