ptechcore_ui 1.0.14 → 1.0.16
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/dist/index.cjs +1156 -16
- package/dist/index.d.cts +136 -40
- package/dist/index.d.ts +136 -40
- package/dist/index.js +1175 -19
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
interface PrimaryButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
interface PrimaryButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: 'full' | 'outline' | 'text';
|
|
5
6
|
loading?: boolean;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
+
children?: React$1.ReactNode;
|
|
7
8
|
classname?: string;
|
|
8
9
|
}
|
|
9
|
-
declare const PrimaryButton: React.FC<PrimaryButtonProps>;
|
|
10
|
-
declare const SecondaryButton: React.FC<PrimaryButtonProps>;
|
|
10
|
+
declare const PrimaryButton: React$1.FC<PrimaryButtonProps>;
|
|
11
|
+
declare const SecondaryButton: React$1.FC<PrimaryButtonProps>;
|
|
11
12
|
|
|
12
13
|
interface ModalProps {
|
|
13
14
|
title: string;
|
|
@@ -15,9 +16,9 @@ interface ModalProps {
|
|
|
15
16
|
width?: string;
|
|
16
17
|
open: boolean;
|
|
17
18
|
onClose: () => void;
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
+
children: React$1.ReactNode;
|
|
19
20
|
}
|
|
20
|
-
declare const Modal: React.FC<ModalProps>;
|
|
21
|
+
declare const Modal: React$1.FC<ModalProps>;
|
|
21
22
|
|
|
22
23
|
type InputProps = {
|
|
23
24
|
label?: string;
|
|
@@ -28,14 +29,14 @@ type InputProps = {
|
|
|
28
29
|
required?: boolean;
|
|
29
30
|
disabled?: boolean;
|
|
30
31
|
error?: string;
|
|
31
|
-
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
32
|
+
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
+
onBlur?: (e: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
33
34
|
};
|
|
34
|
-
declare const InputField: React.FC<InputProps>;
|
|
35
|
+
declare const InputField: React$1.FC<InputProps>;
|
|
35
36
|
type TextInputProps = Omit<InputProps, "type">;
|
|
36
|
-
declare const TextInput: React.FC<TextInputProps>;
|
|
37
|
-
declare const NumberInput: React.FC<TextInputProps>;
|
|
38
|
-
declare const DateInput: React.FC<TextInputProps>;
|
|
37
|
+
declare const TextInput: React$1.FC<TextInputProps>;
|
|
38
|
+
declare const NumberInput: React$1.FC<TextInputProps>;
|
|
39
|
+
declare const DateInput: React$1.FC<TextInputProps>;
|
|
39
40
|
type Option = {
|
|
40
41
|
label: string;
|
|
41
42
|
value: string | number;
|
|
@@ -50,10 +51,10 @@ type SelectInputProps = {
|
|
|
50
51
|
disabled?: boolean;
|
|
51
52
|
error?: string;
|
|
52
53
|
className?: string;
|
|
53
|
-
onChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
54
|
-
onBlur?: (e: React.FocusEvent<HTMLSelectElement>) => void;
|
|
54
|
+
onChange: (e: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
55
|
+
onBlur?: (e: React$1.FocusEvent<HTMLSelectElement>) => void;
|
|
55
56
|
};
|
|
56
|
-
declare const SelectInput: React.FC<SelectInputProps>;
|
|
57
|
+
declare const SelectInput: React$1.FC<SelectInputProps>;
|
|
57
58
|
type FileInputProps = {
|
|
58
59
|
label?: string;
|
|
59
60
|
name: string;
|
|
@@ -62,29 +63,29 @@ type FileInputProps = {
|
|
|
62
63
|
disabled?: boolean;
|
|
63
64
|
readOnly?: boolean;
|
|
64
65
|
error?: string;
|
|
65
|
-
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
66
|
+
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
66
67
|
};
|
|
67
|
-
declare const FileInput: React.FC<FileInputProps>;
|
|
68
|
+
declare const FileInput: React$1.FC<FileInputProps>;
|
|
68
69
|
|
|
69
70
|
interface MenuItem {
|
|
70
71
|
id: string;
|
|
71
72
|
label: string;
|
|
72
|
-
icon: React.ReactNode;
|
|
73
|
+
icon: React$1.ReactNode;
|
|
73
74
|
path?: string;
|
|
74
75
|
badge?: string | number;
|
|
75
76
|
submenu?: MenuItem[];
|
|
76
77
|
ariaLabel?: string;
|
|
77
78
|
}
|
|
78
79
|
interface PrivateLayoutProps {
|
|
79
|
-
children: React.ReactNode;
|
|
80
|
+
children: React$1.ReactNode;
|
|
80
81
|
module_name: string;
|
|
81
82
|
module_description?: string;
|
|
82
83
|
primaryMenuItems: MenuItem[];
|
|
83
84
|
secondaryMenuItems: Record<string, MenuItem[]>;
|
|
84
85
|
}
|
|
85
|
-
declare const RewiseLayout: React.FC<PrivateLayoutProps>;
|
|
86
|
+
declare const RewiseLayout: React$1.FC<PrivateLayoutProps>;
|
|
86
87
|
|
|
87
|
-
declare const ToastContainer: React.FC;
|
|
88
|
+
declare const ToastContainer: React$1.FC;
|
|
88
89
|
|
|
89
90
|
interface Entity {
|
|
90
91
|
id: number;
|
|
@@ -152,9 +153,9 @@ declare const SessionProvider: ({ children }: {
|
|
|
152
153
|
}) => react_jsx_runtime.JSX.Element;
|
|
153
154
|
|
|
154
155
|
interface ThemeProviderProps {
|
|
155
|
-
children: React.ReactNode;
|
|
156
|
+
children: React$1.ReactNode;
|
|
156
157
|
}
|
|
157
|
-
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
158
|
+
declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
|
|
158
159
|
|
|
159
160
|
interface Toast {
|
|
160
161
|
id: string;
|
|
@@ -175,17 +176,17 @@ declare const useToast: () => ToastContextType;
|
|
|
175
176
|
interface ToastProviderProps {
|
|
176
177
|
children: ReactNode;
|
|
177
178
|
}
|
|
178
|
-
declare const ToastProvider: React.FC<ToastProviderProps>;
|
|
179
|
+
declare const ToastProvider: React$1.FC<ToastProviderProps>;
|
|
179
180
|
|
|
180
181
|
interface PagesProps {
|
|
181
182
|
title?: string;
|
|
182
183
|
description?: string;
|
|
183
|
-
sideAction?: React.ReactNode;
|
|
184
|
-
sidebar?: React.ReactNode;
|
|
185
|
-
tabs?: React.ReactNode;
|
|
186
|
-
children?: React.ReactNode;
|
|
184
|
+
sideAction?: React$1.ReactNode;
|
|
185
|
+
sidebar?: React$1.ReactNode;
|
|
186
|
+
tabs?: React$1.ReactNode;
|
|
187
|
+
children?: React$1.ReactNode;
|
|
187
188
|
}
|
|
188
|
-
declare const Pages: React.FC<PagesProps>;
|
|
189
|
+
declare const Pages: React$1.FC<PagesProps>;
|
|
189
190
|
|
|
190
191
|
declare const UserServices: {
|
|
191
192
|
addUser: (data: Partial<User>, token: string) => Promise<unknown>;
|
|
@@ -220,25 +221,25 @@ type FDrawerLineAction = {
|
|
|
220
221
|
onclick?: (item: any) => any;
|
|
221
222
|
};
|
|
222
223
|
interface FDrawerProps {
|
|
223
|
-
children?: React.ReactNode;
|
|
224
|
+
children?: React$1.ReactNode;
|
|
224
225
|
apiEndpoint: string;
|
|
225
226
|
columns: FDrawerColumn[];
|
|
226
227
|
actions: FDrawerLineAction[];
|
|
227
228
|
ordering: string;
|
|
228
229
|
toggle?: boolean;
|
|
229
230
|
}
|
|
230
|
-
declare const FDrawer: React.FC<FDrawerProps>;
|
|
231
|
+
declare const FDrawer: React$1.FC<FDrawerProps>;
|
|
231
232
|
|
|
232
233
|
interface ApprovalWorkflowProps {
|
|
233
234
|
process: number;
|
|
234
235
|
object_id: number;
|
|
235
236
|
title?: string;
|
|
236
237
|
readOnly?: boolean;
|
|
237
|
-
CustomBtn?: React.ComponentType<{
|
|
238
|
+
CustomBtn?: React$1.ComponentType<{
|
|
238
239
|
onClick?: () => void;
|
|
239
240
|
}>;
|
|
240
241
|
}
|
|
241
|
-
declare const ApprovalWorkflow: React.FC<ApprovalWorkflowProps>;
|
|
242
|
+
declare const ApprovalWorkflow: React$1.FC<ApprovalWorkflowProps>;
|
|
242
243
|
|
|
243
244
|
declare enum ApprovalStatus {
|
|
244
245
|
CANCEL = "cancel",
|
|
@@ -295,9 +296,9 @@ interface ApprovalAnswerModalProps {
|
|
|
295
296
|
link_token?: string;
|
|
296
297
|
object_detail: ApprovalCase;
|
|
297
298
|
}
|
|
298
|
-
declare const ApprovalAnswerModal: React.FC<ApprovalAnswerModalProps>;
|
|
299
|
-
declare const ApprovalAnswerPage: React.FC;
|
|
300
|
-
declare const ApprovalPreviewAnswer: React.FC<{
|
|
299
|
+
declare const ApprovalAnswerModal: React$1.FC<ApprovalAnswerModalProps>;
|
|
300
|
+
declare const ApprovalAnswerPage: React$1.FC;
|
|
301
|
+
declare const ApprovalPreviewAnswer: React$1.FC<{
|
|
301
302
|
loadCase: () => void;
|
|
302
303
|
answerId: number | null;
|
|
303
304
|
caseData: ApprovalCase | null;
|
|
@@ -322,7 +323,7 @@ interface AlertProps {
|
|
|
322
323
|
cancelText?: string;
|
|
323
324
|
confirmButtonVariant?: 'danger' | 'primary' | 'success';
|
|
324
325
|
}
|
|
325
|
-
declare const Alert: React.FC<AlertProps>;
|
|
326
|
+
declare const Alert: React$1.FC<AlertProps>;
|
|
326
327
|
|
|
327
328
|
interface AlertOptions {
|
|
328
329
|
title: string;
|
|
@@ -336,9 +337,104 @@ interface AlertContextType {
|
|
|
336
337
|
showConfirmation: (options: AlertOptions) => Promise<boolean>;
|
|
337
338
|
showAlert: (title: string, confirmText?: string, cancelText?: string, description?: string, variant?: AlertVariant) => Promise<boolean>;
|
|
338
339
|
}
|
|
339
|
-
declare const AlertProvider: React.FC<{
|
|
340
|
+
declare const AlertProvider: React$1.FC<{
|
|
340
341
|
children: ReactNode;
|
|
341
342
|
}>;
|
|
342
343
|
declare const useAlert: () => AlertContextType;
|
|
343
344
|
|
|
344
|
-
|
|
345
|
+
interface SearchableSelectOption {
|
|
346
|
+
value: string | number;
|
|
347
|
+
label: string;
|
|
348
|
+
object?: any;
|
|
349
|
+
content?: React$1.ReactNode;
|
|
350
|
+
image?: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface SelectProps$1 {
|
|
354
|
+
value?: any;
|
|
355
|
+
onSelect: (option: SearchableSelectOption) => void;
|
|
356
|
+
}
|
|
357
|
+
declare const SelectVendor: React.FC<SelectProps$1>;
|
|
358
|
+
declare const SelectUser: React.FC<SelectProps$1>;
|
|
359
|
+
declare const SelectDepartment: React.FC<SelectProps$1>;
|
|
360
|
+
declare const SelectCostCenter: React.FC<SelectProps$1>;
|
|
361
|
+
|
|
362
|
+
interface SelectProps {
|
|
363
|
+
value?: any;
|
|
364
|
+
onSelect: (option: SearchableSelectOption) => void;
|
|
365
|
+
}
|
|
366
|
+
interface ChoiceSelectProps extends SelectProps {
|
|
367
|
+
disabled?: boolean;
|
|
368
|
+
language?: 'fr' | 'en' | 'default';
|
|
369
|
+
}
|
|
370
|
+
interface TaxSelectProps extends ChoiceSelectProps {
|
|
371
|
+
handleChange?: (value: any) => void;
|
|
372
|
+
}
|
|
373
|
+
declare const CHOICES: {
|
|
374
|
+
INVOICE_TYPES: {
|
|
375
|
+
value: string;
|
|
376
|
+
label: {
|
|
377
|
+
fr: string;
|
|
378
|
+
en: string;
|
|
379
|
+
default: string;
|
|
380
|
+
};
|
|
381
|
+
}[];
|
|
382
|
+
PAYMENT_METHODS: {
|
|
383
|
+
value: string;
|
|
384
|
+
label: {
|
|
385
|
+
fr: string;
|
|
386
|
+
en: string;
|
|
387
|
+
default: string;
|
|
388
|
+
};
|
|
389
|
+
}[];
|
|
390
|
+
TEMPLATES: {
|
|
391
|
+
value: string;
|
|
392
|
+
label: {
|
|
393
|
+
fr: string;
|
|
394
|
+
en: string;
|
|
395
|
+
default: string;
|
|
396
|
+
};
|
|
397
|
+
}[];
|
|
398
|
+
FOREIGN_CURRENCIES: {
|
|
399
|
+
value: string;
|
|
400
|
+
label: {
|
|
401
|
+
fr: string;
|
|
402
|
+
en: string;
|
|
403
|
+
default: string;
|
|
404
|
+
};
|
|
405
|
+
}[];
|
|
406
|
+
TAXES: {
|
|
407
|
+
value: string;
|
|
408
|
+
label: {
|
|
409
|
+
fr: string;
|
|
410
|
+
en: string;
|
|
411
|
+
default: string;
|
|
412
|
+
};
|
|
413
|
+
}[];
|
|
414
|
+
LEGAL_FORMS: {
|
|
415
|
+
value: string;
|
|
416
|
+
label: {
|
|
417
|
+
fr: string;
|
|
418
|
+
en: string;
|
|
419
|
+
default: string;
|
|
420
|
+
};
|
|
421
|
+
}[];
|
|
422
|
+
COUNTRIES: {
|
|
423
|
+
value: string;
|
|
424
|
+
label: {
|
|
425
|
+
fr: string;
|
|
426
|
+
en: string;
|
|
427
|
+
default: string;
|
|
428
|
+
};
|
|
429
|
+
}[];
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
declare const InvoiceTypeSelector: React$1.FC<ChoiceSelectProps>;
|
|
433
|
+
declare const PaymentMethodSelector: React$1.FC<ChoiceSelectProps>;
|
|
434
|
+
declare const TemplateFNESelector: React$1.FC<ChoiceSelectProps>;
|
|
435
|
+
declare const ForeignCurrencySelector: React$1.FC<ChoiceSelectProps>;
|
|
436
|
+
declare const TaxSelector: React$1.FC<TaxSelectProps>;
|
|
437
|
+
declare const LegalFormSelector: React$1.FC<ChoiceSelectProps>;
|
|
438
|
+
declare const CountrySelector: React$1.FC<ChoiceSelectProps>;
|
|
439
|
+
|
|
440
|
+
export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalWorkflow, CHOICES, CountrySelector, DateInput, FDrawer, FetchApi, FileInput, ForeignCurrencySelector, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, Pages, PaymentMethodSelector, PrimaryButton, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUser, SelectVendor, SessionProvider, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useAlert, useSession, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
interface PrimaryButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
interface PrimaryButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: 'full' | 'outline' | 'text';
|
|
5
6
|
loading?: boolean;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
+
children?: React$1.ReactNode;
|
|
7
8
|
classname?: string;
|
|
8
9
|
}
|
|
9
|
-
declare const PrimaryButton: React.FC<PrimaryButtonProps>;
|
|
10
|
-
declare const SecondaryButton: React.FC<PrimaryButtonProps>;
|
|
10
|
+
declare const PrimaryButton: React$1.FC<PrimaryButtonProps>;
|
|
11
|
+
declare const SecondaryButton: React$1.FC<PrimaryButtonProps>;
|
|
11
12
|
|
|
12
13
|
interface ModalProps {
|
|
13
14
|
title: string;
|
|
@@ -15,9 +16,9 @@ interface ModalProps {
|
|
|
15
16
|
width?: string;
|
|
16
17
|
open: boolean;
|
|
17
18
|
onClose: () => void;
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
+
children: React$1.ReactNode;
|
|
19
20
|
}
|
|
20
|
-
declare const Modal: React.FC<ModalProps>;
|
|
21
|
+
declare const Modal: React$1.FC<ModalProps>;
|
|
21
22
|
|
|
22
23
|
type InputProps = {
|
|
23
24
|
label?: string;
|
|
@@ -28,14 +29,14 @@ type InputProps = {
|
|
|
28
29
|
required?: boolean;
|
|
29
30
|
disabled?: boolean;
|
|
30
31
|
error?: string;
|
|
31
|
-
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
32
|
+
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
+
onBlur?: (e: React$1.FocusEvent<HTMLInputElement>) => void;
|
|
33
34
|
};
|
|
34
|
-
declare const InputField: React.FC<InputProps>;
|
|
35
|
+
declare const InputField: React$1.FC<InputProps>;
|
|
35
36
|
type TextInputProps = Omit<InputProps, "type">;
|
|
36
|
-
declare const TextInput: React.FC<TextInputProps>;
|
|
37
|
-
declare const NumberInput: React.FC<TextInputProps>;
|
|
38
|
-
declare const DateInput: React.FC<TextInputProps>;
|
|
37
|
+
declare const TextInput: React$1.FC<TextInputProps>;
|
|
38
|
+
declare const NumberInput: React$1.FC<TextInputProps>;
|
|
39
|
+
declare const DateInput: React$1.FC<TextInputProps>;
|
|
39
40
|
type Option = {
|
|
40
41
|
label: string;
|
|
41
42
|
value: string | number;
|
|
@@ -50,10 +51,10 @@ type SelectInputProps = {
|
|
|
50
51
|
disabled?: boolean;
|
|
51
52
|
error?: string;
|
|
52
53
|
className?: string;
|
|
53
|
-
onChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
54
|
-
onBlur?: (e: React.FocusEvent<HTMLSelectElement>) => void;
|
|
54
|
+
onChange: (e: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
55
|
+
onBlur?: (e: React$1.FocusEvent<HTMLSelectElement>) => void;
|
|
55
56
|
};
|
|
56
|
-
declare const SelectInput: React.FC<SelectInputProps>;
|
|
57
|
+
declare const SelectInput: React$1.FC<SelectInputProps>;
|
|
57
58
|
type FileInputProps = {
|
|
58
59
|
label?: string;
|
|
59
60
|
name: string;
|
|
@@ -62,29 +63,29 @@ type FileInputProps = {
|
|
|
62
63
|
disabled?: boolean;
|
|
63
64
|
readOnly?: boolean;
|
|
64
65
|
error?: string;
|
|
65
|
-
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
66
|
+
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
66
67
|
};
|
|
67
|
-
declare const FileInput: React.FC<FileInputProps>;
|
|
68
|
+
declare const FileInput: React$1.FC<FileInputProps>;
|
|
68
69
|
|
|
69
70
|
interface MenuItem {
|
|
70
71
|
id: string;
|
|
71
72
|
label: string;
|
|
72
|
-
icon: React.ReactNode;
|
|
73
|
+
icon: React$1.ReactNode;
|
|
73
74
|
path?: string;
|
|
74
75
|
badge?: string | number;
|
|
75
76
|
submenu?: MenuItem[];
|
|
76
77
|
ariaLabel?: string;
|
|
77
78
|
}
|
|
78
79
|
interface PrivateLayoutProps {
|
|
79
|
-
children: React.ReactNode;
|
|
80
|
+
children: React$1.ReactNode;
|
|
80
81
|
module_name: string;
|
|
81
82
|
module_description?: string;
|
|
82
83
|
primaryMenuItems: MenuItem[];
|
|
83
84
|
secondaryMenuItems: Record<string, MenuItem[]>;
|
|
84
85
|
}
|
|
85
|
-
declare const RewiseLayout: React.FC<PrivateLayoutProps>;
|
|
86
|
+
declare const RewiseLayout: React$1.FC<PrivateLayoutProps>;
|
|
86
87
|
|
|
87
|
-
declare const ToastContainer: React.FC;
|
|
88
|
+
declare const ToastContainer: React$1.FC;
|
|
88
89
|
|
|
89
90
|
interface Entity {
|
|
90
91
|
id: number;
|
|
@@ -152,9 +153,9 @@ declare const SessionProvider: ({ children }: {
|
|
|
152
153
|
}) => react_jsx_runtime.JSX.Element;
|
|
153
154
|
|
|
154
155
|
interface ThemeProviderProps {
|
|
155
|
-
children: React.ReactNode;
|
|
156
|
+
children: React$1.ReactNode;
|
|
156
157
|
}
|
|
157
|
-
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
158
|
+
declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
|
|
158
159
|
|
|
159
160
|
interface Toast {
|
|
160
161
|
id: string;
|
|
@@ -175,17 +176,17 @@ declare const useToast: () => ToastContextType;
|
|
|
175
176
|
interface ToastProviderProps {
|
|
176
177
|
children: ReactNode;
|
|
177
178
|
}
|
|
178
|
-
declare const ToastProvider: React.FC<ToastProviderProps>;
|
|
179
|
+
declare const ToastProvider: React$1.FC<ToastProviderProps>;
|
|
179
180
|
|
|
180
181
|
interface PagesProps {
|
|
181
182
|
title?: string;
|
|
182
183
|
description?: string;
|
|
183
|
-
sideAction?: React.ReactNode;
|
|
184
|
-
sidebar?: React.ReactNode;
|
|
185
|
-
tabs?: React.ReactNode;
|
|
186
|
-
children?: React.ReactNode;
|
|
184
|
+
sideAction?: React$1.ReactNode;
|
|
185
|
+
sidebar?: React$1.ReactNode;
|
|
186
|
+
tabs?: React$1.ReactNode;
|
|
187
|
+
children?: React$1.ReactNode;
|
|
187
188
|
}
|
|
188
|
-
declare const Pages: React.FC<PagesProps>;
|
|
189
|
+
declare const Pages: React$1.FC<PagesProps>;
|
|
189
190
|
|
|
190
191
|
declare const UserServices: {
|
|
191
192
|
addUser: (data: Partial<User>, token: string) => Promise<unknown>;
|
|
@@ -220,25 +221,25 @@ type FDrawerLineAction = {
|
|
|
220
221
|
onclick?: (item: any) => any;
|
|
221
222
|
};
|
|
222
223
|
interface FDrawerProps {
|
|
223
|
-
children?: React.ReactNode;
|
|
224
|
+
children?: React$1.ReactNode;
|
|
224
225
|
apiEndpoint: string;
|
|
225
226
|
columns: FDrawerColumn[];
|
|
226
227
|
actions: FDrawerLineAction[];
|
|
227
228
|
ordering: string;
|
|
228
229
|
toggle?: boolean;
|
|
229
230
|
}
|
|
230
|
-
declare const FDrawer: React.FC<FDrawerProps>;
|
|
231
|
+
declare const FDrawer: React$1.FC<FDrawerProps>;
|
|
231
232
|
|
|
232
233
|
interface ApprovalWorkflowProps {
|
|
233
234
|
process: number;
|
|
234
235
|
object_id: number;
|
|
235
236
|
title?: string;
|
|
236
237
|
readOnly?: boolean;
|
|
237
|
-
CustomBtn?: React.ComponentType<{
|
|
238
|
+
CustomBtn?: React$1.ComponentType<{
|
|
238
239
|
onClick?: () => void;
|
|
239
240
|
}>;
|
|
240
241
|
}
|
|
241
|
-
declare const ApprovalWorkflow: React.FC<ApprovalWorkflowProps>;
|
|
242
|
+
declare const ApprovalWorkflow: React$1.FC<ApprovalWorkflowProps>;
|
|
242
243
|
|
|
243
244
|
declare enum ApprovalStatus {
|
|
244
245
|
CANCEL = "cancel",
|
|
@@ -295,9 +296,9 @@ interface ApprovalAnswerModalProps {
|
|
|
295
296
|
link_token?: string;
|
|
296
297
|
object_detail: ApprovalCase;
|
|
297
298
|
}
|
|
298
|
-
declare const ApprovalAnswerModal: React.FC<ApprovalAnswerModalProps>;
|
|
299
|
-
declare const ApprovalAnswerPage: React.FC;
|
|
300
|
-
declare const ApprovalPreviewAnswer: React.FC<{
|
|
299
|
+
declare const ApprovalAnswerModal: React$1.FC<ApprovalAnswerModalProps>;
|
|
300
|
+
declare const ApprovalAnswerPage: React$1.FC;
|
|
301
|
+
declare const ApprovalPreviewAnswer: React$1.FC<{
|
|
301
302
|
loadCase: () => void;
|
|
302
303
|
answerId: number | null;
|
|
303
304
|
caseData: ApprovalCase | null;
|
|
@@ -322,7 +323,7 @@ interface AlertProps {
|
|
|
322
323
|
cancelText?: string;
|
|
323
324
|
confirmButtonVariant?: 'danger' | 'primary' | 'success';
|
|
324
325
|
}
|
|
325
|
-
declare const Alert: React.FC<AlertProps>;
|
|
326
|
+
declare const Alert: React$1.FC<AlertProps>;
|
|
326
327
|
|
|
327
328
|
interface AlertOptions {
|
|
328
329
|
title: string;
|
|
@@ -336,9 +337,104 @@ interface AlertContextType {
|
|
|
336
337
|
showConfirmation: (options: AlertOptions) => Promise<boolean>;
|
|
337
338
|
showAlert: (title: string, confirmText?: string, cancelText?: string, description?: string, variant?: AlertVariant) => Promise<boolean>;
|
|
338
339
|
}
|
|
339
|
-
declare const AlertProvider: React.FC<{
|
|
340
|
+
declare const AlertProvider: React$1.FC<{
|
|
340
341
|
children: ReactNode;
|
|
341
342
|
}>;
|
|
342
343
|
declare const useAlert: () => AlertContextType;
|
|
343
344
|
|
|
344
|
-
|
|
345
|
+
interface SearchableSelectOption {
|
|
346
|
+
value: string | number;
|
|
347
|
+
label: string;
|
|
348
|
+
object?: any;
|
|
349
|
+
content?: React$1.ReactNode;
|
|
350
|
+
image?: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface SelectProps$1 {
|
|
354
|
+
value?: any;
|
|
355
|
+
onSelect: (option: SearchableSelectOption) => void;
|
|
356
|
+
}
|
|
357
|
+
declare const SelectVendor: React.FC<SelectProps$1>;
|
|
358
|
+
declare const SelectUser: React.FC<SelectProps$1>;
|
|
359
|
+
declare const SelectDepartment: React.FC<SelectProps$1>;
|
|
360
|
+
declare const SelectCostCenter: React.FC<SelectProps$1>;
|
|
361
|
+
|
|
362
|
+
interface SelectProps {
|
|
363
|
+
value?: any;
|
|
364
|
+
onSelect: (option: SearchableSelectOption) => void;
|
|
365
|
+
}
|
|
366
|
+
interface ChoiceSelectProps extends SelectProps {
|
|
367
|
+
disabled?: boolean;
|
|
368
|
+
language?: 'fr' | 'en' | 'default';
|
|
369
|
+
}
|
|
370
|
+
interface TaxSelectProps extends ChoiceSelectProps {
|
|
371
|
+
handleChange?: (value: any) => void;
|
|
372
|
+
}
|
|
373
|
+
declare const CHOICES: {
|
|
374
|
+
INVOICE_TYPES: {
|
|
375
|
+
value: string;
|
|
376
|
+
label: {
|
|
377
|
+
fr: string;
|
|
378
|
+
en: string;
|
|
379
|
+
default: string;
|
|
380
|
+
};
|
|
381
|
+
}[];
|
|
382
|
+
PAYMENT_METHODS: {
|
|
383
|
+
value: string;
|
|
384
|
+
label: {
|
|
385
|
+
fr: string;
|
|
386
|
+
en: string;
|
|
387
|
+
default: string;
|
|
388
|
+
};
|
|
389
|
+
}[];
|
|
390
|
+
TEMPLATES: {
|
|
391
|
+
value: string;
|
|
392
|
+
label: {
|
|
393
|
+
fr: string;
|
|
394
|
+
en: string;
|
|
395
|
+
default: string;
|
|
396
|
+
};
|
|
397
|
+
}[];
|
|
398
|
+
FOREIGN_CURRENCIES: {
|
|
399
|
+
value: string;
|
|
400
|
+
label: {
|
|
401
|
+
fr: string;
|
|
402
|
+
en: string;
|
|
403
|
+
default: string;
|
|
404
|
+
};
|
|
405
|
+
}[];
|
|
406
|
+
TAXES: {
|
|
407
|
+
value: string;
|
|
408
|
+
label: {
|
|
409
|
+
fr: string;
|
|
410
|
+
en: string;
|
|
411
|
+
default: string;
|
|
412
|
+
};
|
|
413
|
+
}[];
|
|
414
|
+
LEGAL_FORMS: {
|
|
415
|
+
value: string;
|
|
416
|
+
label: {
|
|
417
|
+
fr: string;
|
|
418
|
+
en: string;
|
|
419
|
+
default: string;
|
|
420
|
+
};
|
|
421
|
+
}[];
|
|
422
|
+
COUNTRIES: {
|
|
423
|
+
value: string;
|
|
424
|
+
label: {
|
|
425
|
+
fr: string;
|
|
426
|
+
en: string;
|
|
427
|
+
default: string;
|
|
428
|
+
};
|
|
429
|
+
}[];
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
declare const InvoiceTypeSelector: React$1.FC<ChoiceSelectProps>;
|
|
433
|
+
declare const PaymentMethodSelector: React$1.FC<ChoiceSelectProps>;
|
|
434
|
+
declare const TemplateFNESelector: React$1.FC<ChoiceSelectProps>;
|
|
435
|
+
declare const ForeignCurrencySelector: React$1.FC<ChoiceSelectProps>;
|
|
436
|
+
declare const TaxSelector: React$1.FC<TaxSelectProps>;
|
|
437
|
+
declare const LegalFormSelector: React$1.FC<ChoiceSelectProps>;
|
|
438
|
+
declare const CountrySelector: React$1.FC<ChoiceSelectProps>;
|
|
439
|
+
|
|
440
|
+
export { Alert, AlertProvider, ApprovalAnswerModal, ApprovalAnswerPage, ApprovalPreviewAnswer, ApprovalWorkflow, CHOICES, CountrySelector, DateInput, FDrawer, FetchApi, FileInput, ForeignCurrencySelector, InputField, InvoiceTypeSelector, LegalFormSelector, type MenuItem, Modal, NumberInput, Pages, PaymentMethodSelector, PrimaryButton, RewiseLayout, SecondaryButton, SelectCostCenter, SelectDepartment, SelectInput, SelectUser, SelectVendor, SessionProvider, TaxSelector, TemplateFNESelector, TextInput, ThemeProvider, ToastContainer, ToastProvider, type User, UserServices, useAlert, useSession, useToast };
|