@tealca/core-components 1.0.8 → 1.0.9
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/README.md +60 -7
- package/dist/index.d.ts +1546 -3
- package/dist/main.css +1 -1
- package/dist/tealca-core-components.cjs.js +69 -10
- package/dist/tealca-core-components.es.js +17520 -419
- package/package.json +12 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,1556 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
1
2
|
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { Context } from 'react';
|
|
4
|
+
import { default as default_2 } from 'react';
|
|
2
5
|
import { FC } from 'react';
|
|
6
|
+
import { FormikHelpers } from 'formik';
|
|
7
|
+
import { FormikProps } from 'formik';
|
|
8
|
+
import { ForwardedRef } from 'react';
|
|
9
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
10
|
+
import { HTMLAttributes } from 'react';
|
|
11
|
+
import { IconType } from 'react-icons';
|
|
12
|
+
import { InputHTMLAttributes } from 'react';
|
|
13
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
14
|
import { ReactNode } from 'react';
|
|
15
|
+
import { RefAttributes } from 'react';
|
|
4
16
|
|
|
5
|
-
declare interface
|
|
6
|
-
|
|
17
|
+
export declare interface Account {
|
|
18
|
+
id: string;
|
|
19
|
+
fullName: string;
|
|
20
|
+
taxIdentificationType: string;
|
|
21
|
+
identificationNumber: string;
|
|
22
|
+
email: string;
|
|
23
|
+
phone: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A comprehensive form for creating or editing an account.
|
|
28
|
+
* This component wraps the form UI and logic with Formik for state management and validation.
|
|
29
|
+
* It handles form submission and can be initialized with existing account data.
|
|
30
|
+
*
|
|
31
|
+
* @param initialValues - Optional initial values for the form fields.
|
|
32
|
+
* @param onSubmit - The function to call when the form is successfully submitted.
|
|
33
|
+
* @param onCancel - The function to call when the form is successfully cancelled.
|
|
34
|
+
* @returns The rendered account form, powered by Formik.
|
|
35
|
+
*/
|
|
36
|
+
export declare const AccountForm: FC<AccountFormProps>;
|
|
37
|
+
|
|
38
|
+
declare interface AccountFormProps {
|
|
39
|
+
initialValues?: AccountFormValue;
|
|
40
|
+
onSubmit: (values: AccountFormValue, helpers: FormikHelpers<AccountFormValue>) => void;
|
|
41
|
+
onCancel?: (helpers: FormikHelpers<AccountFormValue>) => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Represents the structure for the entire account form's values.
|
|
46
|
+
*
|
|
47
|
+
* @param fullName - The full name of the user.
|
|
48
|
+
* @param email - The user's email address.
|
|
49
|
+
* @param address - The user's fiscal address.
|
|
50
|
+
* @param taxIdentificationType - The type of tax identification (e.g., V, E, J, G).
|
|
51
|
+
* @param identificationNumber - The user's identification number.
|
|
52
|
+
* @param phone - The primary phone number.
|
|
53
|
+
* @param phone2 - The optional secondary phone number.
|
|
54
|
+
*/
|
|
55
|
+
declare interface AccountFormValue {
|
|
56
|
+
fullName: string;
|
|
57
|
+
email: string;
|
|
58
|
+
address: string;
|
|
59
|
+
taxIdentificationType: Option_2<TaxIdentificationType> | null;
|
|
60
|
+
identificationNumber: string;
|
|
61
|
+
phone: PhoneFormValue;
|
|
62
|
+
phone2: PhoneFormValue;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare interface AccountSite {
|
|
66
|
+
accountSiteID: number;
|
|
67
|
+
accountSiteCode: string;
|
|
68
|
+
accountSiteName: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare interface Address {
|
|
72
|
+
addressName: string;
|
|
73
|
+
addressLine1: string;
|
|
74
|
+
addressLine2: string;
|
|
75
|
+
latitude: number;
|
|
76
|
+
longitude: number;
|
|
77
|
+
postalCode: string;
|
|
78
|
+
countryName: string;
|
|
79
|
+
countryCode: string;
|
|
80
|
+
region: string;
|
|
81
|
+
state: string;
|
|
82
|
+
locationCode: string;
|
|
83
|
+
locationName: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* AnimatedCollapse wraps its children and animates height between 0 and auto.
|
|
88
|
+
* If active is false, children are hidden (height: 0). If true, children are shown with
|
|
89
|
+
* animation.
|
|
90
|
+
*
|
|
91
|
+
* @param active - Whether the collapse is active (expanded) or not (collapsed).
|
|
92
|
+
* @param children - The content to be collapsed/expanded.
|
|
93
|
+
* @param className - Additional CSS classes to apply to the container.
|
|
94
|
+
*
|
|
95
|
+
* @returns The rendered AnimatedCollapse component.
|
|
96
|
+
*/
|
|
97
|
+
export declare const AnimatedCollapse: FC<AnimatedCollapseProps>;
|
|
98
|
+
|
|
99
|
+
declare interface AnimatedCollapseProps {
|
|
100
|
+
active: boolean;
|
|
7
101
|
className?: string;
|
|
102
|
+
children: ReactNode;
|
|
103
|
+
duration?: number;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* React context for managing application-wide data.
|
|
108
|
+
*
|
|
109
|
+
* This context provides access to the current application's information.
|
|
110
|
+
* Components that need access to this data can consume this context.
|
|
111
|
+
*/
|
|
112
|
+
export declare const AppContext: Context<Application | null>;
|
|
113
|
+
|
|
114
|
+
export declare interface Application {
|
|
115
|
+
applicationId: number;
|
|
116
|
+
applicationCode: string;
|
|
117
|
+
applicationName: string;
|
|
118
|
+
applicationDescription: string;
|
|
119
|
+
applicationVersion: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare const AppProvider: FC<{
|
|
123
|
+
children: ReactNode;
|
|
124
|
+
applicationId: number;
|
|
125
|
+
}>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* React context for managing authentication state throughout the application.
|
|
129
|
+
*
|
|
130
|
+
* This context provides access to the authenticated user's information, tokens,
|
|
131
|
+
* and authentication status. It also exposes `login` and `logout` functions to
|
|
132
|
+
* manage the authentication lifecycle. Components that need access to auth state
|
|
133
|
+
* can consume this context.
|
|
134
|
+
*/
|
|
135
|
+
export declare const AuthContext: Context<AuthContextProps>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Defines the shape of the authentication context.
|
|
139
|
+
*
|
|
140
|
+
* @param user - The currently authenticated user object, or `null` if no user is
|
|
141
|
+
* logged in.
|
|
142
|
+
* @param store - The currently selected store for the user, or `null` if no store is
|
|
143
|
+
* selected.
|
|
144
|
+
* @param availableStores - An array of stores available to the user.
|
|
145
|
+
* @param isAuthenticated - A boolean flag indicating whether the user is
|
|
146
|
+
* authenticated. `true` if a user is logged in, otherwise `false`.
|
|
147
|
+
* @param login - A function to update the authentication state upon successful
|
|
148
|
+
* login. It takes the user object, access token, and refresh token as arguments.
|
|
149
|
+
* @param logout - A function to clear the authentication state and log the user out.
|
|
150
|
+
*/
|
|
151
|
+
export declare interface AuthContextProps {
|
|
152
|
+
user: User | null;
|
|
153
|
+
store: Store | null;
|
|
154
|
+
availableStores: Store[];
|
|
155
|
+
isAuthenticated: boolean;
|
|
156
|
+
login: (user: User) => void;
|
|
157
|
+
logout: () => void;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare type AutocompletePrediction = google.maps.places.AutocompletePrediction;
|
|
161
|
+
|
|
162
|
+
declare type AutocompletePrediction_2 = google.maps.places.AutocompletePrediction;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* A simple badge component. Renders a colored label for status or info.
|
|
166
|
+
*
|
|
167
|
+
* @param className - Additional CSS classes for the badge.
|
|
168
|
+
* @param wrapperClassName - Additional CSS classes for the wrapper div.
|
|
169
|
+
* @param color - Color style for the badge.
|
|
170
|
+
* @param children - Content inside the badge.
|
|
171
|
+
* @returns The rendered badge component.
|
|
172
|
+
*/
|
|
173
|
+
export declare const Badge: FC<BadgeProps>;
|
|
174
|
+
|
|
175
|
+
declare interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
176
|
+
color?: "primary" | "success" | "warning" | "danger" | "default";
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export declare interface BoxAccount {
|
|
180
|
+
boxAccountID: string;
|
|
181
|
+
boxAccountCode: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* A base button component. Should not be used directly.
|
|
186
|
+
* Inherits all props from the standard HTML button element.
|
|
187
|
+
*/
|
|
188
|
+
export declare const Button: FC<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
189
|
+
|
|
190
|
+
export declare interface Category {
|
|
191
|
+
categoryId: number;
|
|
192
|
+
categoryTypeId: CategoryTypeID | null;
|
|
193
|
+
categoryCode: string;
|
|
194
|
+
categoryName: string;
|
|
195
|
+
categoryAbbreviation: string | null;
|
|
196
|
+
categoryDimensionalWeightFactor: number | null;
|
|
197
|
+
description: string | null;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export declare enum CategoryTypeID {
|
|
201
|
+
INTERNATIONAL = 1,
|
|
202
|
+
NATIONAL = 2
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Checkbox component with label.
|
|
207
|
+
*/
|
|
208
|
+
export declare const Checkbox: FC<CheckboxProps>;
|
|
209
|
+
|
|
210
|
+
declare interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
211
|
+
label: string;
|
|
212
|
+
id: string;
|
|
213
|
+
checked: boolean;
|
|
214
|
+
onChangeChecked: (checked: boolean) => void;
|
|
8
215
|
disabled?: boolean;
|
|
216
|
+
className?: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export declare enum ConsigneeType {
|
|
220
|
+
PERSON = 0,
|
|
221
|
+
BOX_ACCOUNT = 1
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
declare interface Coordinates {
|
|
225
|
+
lat: number;
|
|
226
|
+
lng: number;
|
|
227
|
+
name?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare interface Country {
|
|
231
|
+
countryId: number;
|
|
232
|
+
currencyId?: number;
|
|
233
|
+
currencyBaseId?: number;
|
|
234
|
+
countryName: string;
|
|
235
|
+
countryNationality: string;
|
|
236
|
+
countryCodeIso: string;
|
|
237
|
+
countryCodeIsoAlpha2?: string;
|
|
238
|
+
countryCodeIsoNumeric?: number;
|
|
239
|
+
countryPhoneAccessCode?: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export declare interface DeliveryType {
|
|
243
|
+
deliveryTypeID: DeliveryTypeID;
|
|
244
|
+
deliveryTypeName: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export declare enum DeliveryTypeID {
|
|
248
|
+
OFFICE = 10,
|
|
249
|
+
HOME = 20,
|
|
250
|
+
INTERNATIONAL = 21
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare interface Department {
|
|
254
|
+
departmentId: number;
|
|
255
|
+
departmentCode: string;
|
|
256
|
+
departmentName: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* A component to display an error message with a title and description.
|
|
261
|
+
* It includes an error icon and is styled with a red background to indicate an error.
|
|
262
|
+
*
|
|
263
|
+
* @param title - The title of the error message.
|
|
264
|
+
* @param description - The detailed description of the error.
|
|
265
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
266
|
+
* @returns The rendered error card component.
|
|
267
|
+
*/
|
|
268
|
+
export declare const ErrorCard: FC<ErrorCardProps>;
|
|
269
|
+
|
|
270
|
+
declare interface ErrorCardProps {
|
|
271
|
+
title?: string;
|
|
272
|
+
description?: string;
|
|
273
|
+
wrapperClassName?: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* A forgot password form component that includes an email field, a submit button, and
|
|
278
|
+
* a link to go back to the login page. It also displays a message when the reset email
|
|
279
|
+
* has been sent.
|
|
280
|
+
*
|
|
281
|
+
* @param appName - The name of the application to display in the header.
|
|
282
|
+
* @param appDescription - A brief description of the application.
|
|
283
|
+
* @param appVersion - The current version of the application.
|
|
284
|
+
* @param wrapperClassName - Additional CSS classes to apply to the main wrapper div.
|
|
285
|
+
* @param onSubmit - A callback function that is called when the form is submitted. It
|
|
286
|
+
* receives the email as an argument.
|
|
287
|
+
* @param onBack - A callback function that is called when the "Back" link is clicked.
|
|
288
|
+
*
|
|
289
|
+
* @returns The rendered forgot password form component.
|
|
290
|
+
*/
|
|
291
|
+
export declare const ForgotPassword: FC<ForgotPasswordProps>;
|
|
292
|
+
|
|
293
|
+
declare interface ForgotPasswordProps {
|
|
294
|
+
appName: string;
|
|
295
|
+
appDescription: string;
|
|
296
|
+
appVersion: string;
|
|
297
|
+
wrapperClassName?: string;
|
|
298
|
+
onSubmit: (email: string) => void;
|
|
299
|
+
onBack: () => void;
|
|
300
|
+
sent?: boolean;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export declare function getApplication(applicationId: number): Promise<Response_2<Application>>;
|
|
304
|
+
|
|
305
|
+
export declare function getCategories(categoryTypeId: CategoryTypeID): Promise<Response_2<Category[]>>;
|
|
306
|
+
|
|
307
|
+
export declare function getCountries(): Promise<Response_2<Country[]>>;
|
|
308
|
+
|
|
309
|
+
export declare function getTaxIdentificationTypes(countryId?: number, statusId?: number): Promise<Response_2<TaxIdentificationType[]>>;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* GoogleMap component to display a static map with markers and place names.
|
|
313
|
+
*
|
|
314
|
+
* @param coordinates - Array of coordinates to display (each can have a name).
|
|
315
|
+
* @param wrapperClassName - Optional className for the wrapper.
|
|
316
|
+
*
|
|
317
|
+
* @returns The rendered GoogleMaps component.
|
|
318
|
+
*/
|
|
319
|
+
export declare const GoogleMap: React.FC<GoogleMapProps>;
|
|
320
|
+
|
|
321
|
+
declare interface GoogleMapProps {
|
|
322
|
+
coordinates: Array<Coordinates>;
|
|
323
|
+
wrapperClassName?: string;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* A grouped option interface for use in select components with grouped options.
|
|
328
|
+
*
|
|
329
|
+
* @template _TOptionValue - The type of the value associated with the options.
|
|
330
|
+
*
|
|
331
|
+
* @property title - The title of the group.
|
|
332
|
+
* @property loading - Optional loading state for the group.
|
|
333
|
+
* @property options - The list of options within the group.
|
|
334
|
+
*/
|
|
335
|
+
export declare interface GroupedOption<_TOptionValue> {
|
|
336
|
+
title: string;
|
|
337
|
+
loading?: boolean;
|
|
338
|
+
options: Option_2<_TOptionValue>[];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* A checkbox group component for selecting multiple options.
|
|
343
|
+
*
|
|
344
|
+
* @param id - The id for the checkbox group, used to associate the label with the inputs.
|
|
345
|
+
* @param label - The text for the checkbox group label.
|
|
346
|
+
* @param options - The list of options to display.
|
|
347
|
+
* @param selected - An array of the currently selected options.
|
|
348
|
+
* @param onSelectOption - A callback function that is called when an option is selected or deselected.
|
|
349
|
+
* @param wrapperClassName - Additional CSS classes for the wrapper div.
|
|
350
|
+
* @param required - Whether the checkbox group is required.
|
|
351
|
+
* @param disabled - Whether the checkbox group is disabled.
|
|
352
|
+
* @param props - Additional props to pass to the input elements. It inherits all standard
|
|
353
|
+
* HTML input element props.
|
|
354
|
+
*
|
|
355
|
+
* @returns The rendered InputCheckboxSelect component.
|
|
356
|
+
*/
|
|
357
|
+
export declare function InputCheckboxSelect<_TOptionValue>(props: InputCheckboxSelectProps<_TOptionValue>): JSX_2.Element;
|
|
358
|
+
|
|
359
|
+
declare interface InputCheckboxSelectProps<_TOptionValue> extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
360
|
+
label: string;
|
|
361
|
+
options: Option_2<_TOptionValue>[];
|
|
362
|
+
selected: Option_2<_TOptionValue>[];
|
|
363
|
+
onSelectOption: (options: Option_2<_TOptionValue>[]) => void;
|
|
364
|
+
wrapperClassName?: string;
|
|
365
|
+
required?: boolean;
|
|
366
|
+
disabled?: boolean;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* A date input component with a label and error message.
|
|
371
|
+
*
|
|
372
|
+
* @param label - The text for the input label.
|
|
373
|
+
* @param id - The id for the input element, used to associate the label with the input.
|
|
374
|
+
* @param required - Whether the input is required. If true, an asterisk (*) will be displayed next to the label.
|
|
375
|
+
* @param error - An optional error message to display below the input.
|
|
376
|
+
* @param className - Additional CSS classes to apply to the input element.
|
|
377
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
378
|
+
* @param disabled - Whether the input is disabled.
|
|
379
|
+
* @param props - Additional props to pass to the input element. It inherits all standard HTML input element props.
|
|
380
|
+
*
|
|
381
|
+
* @returns The rendered date input component.
|
|
382
|
+
*/
|
|
383
|
+
export declare const InputDate: FC<InputDateProps>;
|
|
384
|
+
|
|
385
|
+
declare interface InputDateProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
386
|
+
label: string;
|
|
387
|
+
error?: string | boolean;
|
|
388
|
+
wrapperClassName?: string;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* A file input component with a label and error message.
|
|
393
|
+
*
|
|
394
|
+
* @param label - The text for the input label.
|
|
395
|
+
* @param id - The id for the input element, used to associate the label with the input.
|
|
396
|
+
* @param required - Whether the input is required. If true, an asterisk (*) will be displayed next to the label.
|
|
397
|
+
* @param error - An optional error message to display below the input.
|
|
398
|
+
* @param className - Additional CSS classes to apply to the input element.
|
|
399
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
400
|
+
* @param disabled - Whether the input is disabled.
|
|
401
|
+
* @param onChange - A callback function triggered when the file input changes.
|
|
402
|
+
* @param props - Additional props to pass to the input element. It inherits all standard HTML input element props.
|
|
403
|
+
*
|
|
404
|
+
* @returns The rendered file input component.
|
|
405
|
+
*/
|
|
406
|
+
export declare const InputFile: FC<InputFileProps>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* A file input component with drag-and-drop and click-to-select functionality.
|
|
410
|
+
*
|
|
411
|
+
* @param label - The text for the input label.
|
|
412
|
+
* @param id - The id for the input element, used to associate the label with the input.
|
|
413
|
+
* @param required - Whether the input is required. If true, an asterisk (*) will be displayed next to the label.
|
|
414
|
+
* @param error - An optional error message to display below the input.
|
|
415
|
+
* @param className - Additional CSS classes to apply to the input element.
|
|
416
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
417
|
+
* @param disabled - Whether the input is disabled.
|
|
418
|
+
* @param onChange - A callback function triggered when the file input changes.
|
|
419
|
+
* @param props - Additional props to pass to the input element. It inherits all standard HTML input element props.
|
|
420
|
+
*
|
|
421
|
+
* @returns The rendered file input component with drag-and-drop.
|
|
422
|
+
*/
|
|
423
|
+
export declare const InputFileDrop: FC<InputFileDropProps>;
|
|
424
|
+
|
|
425
|
+
declare interface InputFileDropProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
426
|
+
label: string;
|
|
427
|
+
error?: string | boolean;
|
|
428
|
+
wrapperClassName?: string;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
declare interface InputFileProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
432
|
+
label: string;
|
|
433
|
+
error?: string | boolean;
|
|
434
|
+
wrapperClassName?: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Google Map Selector component for selecting a location on a map.
|
|
439
|
+
*
|
|
440
|
+
* @param label - The text for the select input label.
|
|
441
|
+
* @param error - An optional error message to display below the select input.
|
|
442
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
443
|
+
* @param onSelectLocation - A callback function that is called when a location is
|
|
444
|
+
* selected.
|
|
445
|
+
* @param disabled - Whether the select input is disabled.
|
|
446
|
+
* @param initialCoordinates - Initial coordinates to center the map.
|
|
447
|
+
* @param renderOption - A function to customize the rendering of each option in the dropdown.
|
|
448
|
+
* @param filterFn - A function to filter the options based on the search text.
|
|
449
|
+
* @param emptyMessage - Message to display when no options are found.
|
|
450
|
+
* @param footerOption - An optional footer option to display at the bottom of the dropdown.
|
|
451
|
+
* @param props - Additional props to pass to the input element. It inherits all
|
|
452
|
+
* standard HTML input element props.
|
|
453
|
+
*
|
|
454
|
+
* @returns The rendered Google Map Selector component.
|
|
455
|
+
*/
|
|
456
|
+
export declare const InputGoogleMap: FC<InputGoogleMapProps>;
|
|
457
|
+
|
|
458
|
+
declare interface InputGoogleMapProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
459
|
+
label: string;
|
|
460
|
+
disabled?: boolean;
|
|
461
|
+
error?: string | boolean;
|
|
462
|
+
wrapperClassName?: string;
|
|
463
|
+
onSelectLocation?: (location: PlaceResult) => void;
|
|
464
|
+
renderOption?: (option: Option_2<AutocompletePrediction>) => ReactNode;
|
|
465
|
+
filterFn?: (option: Option_2<AutocompletePrediction>, searchText: string) => boolean;
|
|
466
|
+
emptyMessage?: string;
|
|
467
|
+
footerOption?: Option_2<AutocompletePrediction>;
|
|
468
|
+
initialCoordinates?: {
|
|
469
|
+
lat: number;
|
|
470
|
+
lng: number;
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* A integer input component with a label and error message.
|
|
476
|
+
*
|
|
477
|
+
* @param label - The text for the input label.
|
|
478
|
+
* @param id - The id for the input element, used to associate the label with the input.
|
|
479
|
+
* @param required - Whether the input is required. If true, an asterisk (*) will be
|
|
480
|
+
* displayed next to the label.
|
|
481
|
+
* @param error - An optional error message to display below the input.
|
|
482
|
+
* @param className - Additional CSS classes to apply to the input element.
|
|
483
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
484
|
+
* @param disabled - Whether the input is disabled.
|
|
485
|
+
* @param ref - A ref to the input element.
|
|
486
|
+
* @param props - Additional props to pass to the input element. It inherits all standard
|
|
487
|
+
* HTML input element props.
|
|
488
|
+
*
|
|
489
|
+
* @returns The rendered input component.
|
|
490
|
+
*/
|
|
491
|
+
export declare const InputInteger: ForwardRefExoticComponent<InputIntegerProps & RefAttributes<HTMLInputElement>>;
|
|
492
|
+
|
|
493
|
+
declare interface InputIntegerProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
494
|
+
label: string;
|
|
495
|
+
error?: string | boolean;
|
|
496
|
+
wrapperClassName?: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* InputLocationSelect component for selecting a location.
|
|
501
|
+
*
|
|
502
|
+
* @param label - The text for the select input label.
|
|
503
|
+
* @param error - An optional error message to display below the select input.
|
|
504
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
505
|
+
* @param onSelectLocation - A callback function that is called when a location is
|
|
506
|
+
* selected.
|
|
507
|
+
* @param disabled - Whether the select input is disabled.
|
|
508
|
+
* @param placeholder - Placeholder text for the input field.
|
|
509
|
+
* @param props - Additional props to pass to the input element. It inherits all
|
|
510
|
+
* standard HTML input element props.
|
|
511
|
+
*
|
|
512
|
+
* @returns The rendered InputLocationSelect component.
|
|
513
|
+
*/
|
|
514
|
+
export declare const InputLocationSelect: ({ label, onSelectLocation, disabled, ...props }: InputLocationSelectProps) => JSX_2.Element;
|
|
515
|
+
|
|
516
|
+
declare interface InputLocationSelectProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
517
|
+
label: string;
|
|
518
|
+
error?: string | boolean;
|
|
519
|
+
wrapperClassName?: string;
|
|
520
|
+
onSelectLocation: (location: PlaceResult_2) => void;
|
|
521
|
+
renderOption?: (option: Option_2<AutocompletePrediction_2>) => ReactNode;
|
|
522
|
+
filterFn?: (option: Option_2<AutocompletePrediction_2>, searchText: string) => boolean;
|
|
523
|
+
emptyMessage?: string;
|
|
524
|
+
footerOption?: Option_2<AutocompletePrediction_2>;
|
|
525
|
+
loading?: boolean;
|
|
526
|
+
disabled?: boolean;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* A radio button group component for selecting a single option.
|
|
531
|
+
*
|
|
532
|
+
* @param id - The id for the radio group, used to associate the label with the inputs.
|
|
533
|
+
* @param label - The text for the radio group label.
|
|
534
|
+
* @param options - The list of options to display.
|
|
535
|
+
* @param selected - The currently selected option.
|
|
536
|
+
* @param onSelectOption - A callback function that is called when an option is selected.
|
|
537
|
+
* @param wrapperClassName - Additional CSS classes for the wrapper div.
|
|
538
|
+
* @param required - Whether the radio group is required.
|
|
539
|
+
* @param disabled - Whether the radio group is disabled.
|
|
540
|
+
* @param props - Additional props to pass to the input elements. It inherits all standard
|
|
541
|
+
* HTML input element props.
|
|
542
|
+
*
|
|
543
|
+
* @returns The rendered InputRadioSelect component.
|
|
544
|
+
*/
|
|
545
|
+
export declare function InputRadioSelect<_TOptionValue>(props: InputRadioSelectProps<_TOptionValue>): JSX_2.Element;
|
|
546
|
+
|
|
547
|
+
declare interface InputRadioSelectProps<_TOptionValue> extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
548
|
+
label: string;
|
|
549
|
+
options: Option_2<_TOptionValue>[];
|
|
550
|
+
selected: Option_2<_TOptionValue> | null;
|
|
551
|
+
onSelectOption: (option: Option_2<_TOptionValue>) => void;
|
|
552
|
+
wrapperClassName?: string;
|
|
553
|
+
required?: boolean;
|
|
554
|
+
disabled?: boolean;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export declare const InputSelect: <_TOptionValue>(props: InputSelectProps<_TOptionValue> & {
|
|
558
|
+
ref?: ForwardedRef<HTMLInputElement>;
|
|
559
|
+
}) => React.ReactElement;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* A select input component with grouped options, a label, error message, and dropdown options.
|
|
563
|
+
*
|
|
564
|
+
* @param label - The text for the select input label.
|
|
565
|
+
* @param id - The id for the select input element.
|
|
566
|
+
* @param required - Whether the select input is required.
|
|
567
|
+
* @param error - An optional error message to display.
|
|
568
|
+
* @param className - Additional CSS classes for the input.
|
|
569
|
+
* @param wrapperClassName - Additional CSS classes for the wrapper div.
|
|
570
|
+
* @param groupedOptions - The list of options grouped by titles.
|
|
571
|
+
* @param selected - The currently selected option.
|
|
572
|
+
* @param onSelectOption - A callback function when an option is selected.
|
|
573
|
+
* @param renderOption - An optional function to customize the rendering of each option.
|
|
574
|
+
* @param filterFn - An optional function to customize the filtering.
|
|
575
|
+
* @param emptyMessage - The message to display when no options match.
|
|
576
|
+
* @param disabled - Whether the select input is disabled.
|
|
577
|
+
* @param footerOption - An option to be displayed always at the end.
|
|
578
|
+
* @param props - Additional props to pass to the input element.
|
|
579
|
+
*
|
|
580
|
+
* @returns The rendered select input component.
|
|
581
|
+
*/
|
|
582
|
+
export declare function InputSelectGrouped<_TOptionValue>(props: InputSelectGroupedProps<_TOptionValue>): JSX_2.Element;
|
|
583
|
+
|
|
584
|
+
declare interface InputSelectGroupedProps<_TOptionValue> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "options"> {
|
|
585
|
+
label: string;
|
|
586
|
+
error?: string | boolean;
|
|
587
|
+
wrapperClassName?: string;
|
|
588
|
+
groupedOptions: GroupedOption<_TOptionValue>[];
|
|
589
|
+
selected: Option_2<_TOptionValue> | null;
|
|
590
|
+
onSelectOption: (option: Option_2<_TOptionValue>) => void;
|
|
591
|
+
renderOption?: (option: Option_2<_TOptionValue>) => ReactNode;
|
|
592
|
+
filterFn?: (option: Option_2<_TOptionValue>, searchText: string) => boolean;
|
|
593
|
+
emptyMessage?: string;
|
|
594
|
+
footerOption?: Option_2<_TOptionValue>;
|
|
595
|
+
loading?: boolean;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
declare interface InputSelectProps<_TOptionValue> extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
599
|
+
label: string;
|
|
600
|
+
error?: string | boolean;
|
|
601
|
+
wrapperClassName?: string;
|
|
602
|
+
options: Option_2<_TOptionValue>[];
|
|
603
|
+
selected: Option_2<_TOptionValue> | null;
|
|
604
|
+
onSelectOption: (option: Option_2<_TOptionValue>) => void;
|
|
605
|
+
renderOption?: (option: Option_2<_TOptionValue>) => ReactNode;
|
|
606
|
+
filterFn?: (option: Option_2<_TOptionValue>, searchText: string) => boolean;
|
|
607
|
+
emptyMessage?: string;
|
|
608
|
+
footerOption?: Option_2<_TOptionValue>;
|
|
609
|
+
icon?: ReactNode;
|
|
610
|
+
loading?: boolean;
|
|
611
|
+
searchText?: string;
|
|
612
|
+
setSearchText?: (text: string) => void;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* A text input component with a label and error message.
|
|
617
|
+
*
|
|
618
|
+
* @param label - The text for the input label.
|
|
619
|
+
* @param id - The id for the input element, used to associate the label with the input.
|
|
620
|
+
* @param type - The type of the input element (e.g., "text", "password", "email").
|
|
621
|
+
* @param required - Whether the input is required. If true, an asterisk (*) will be
|
|
622
|
+
* displayed next to the label.
|
|
623
|
+
* @param error - An optional error message to display below the input.
|
|
624
|
+
* @param className - Additional CSS classes to apply to the input element.
|
|
625
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
626
|
+
* @param disabled - Whether the input is disabled.
|
|
627
|
+
* @param ref - A ref to the input element.
|
|
628
|
+
* @param props - Additional props to pass to the input element. It inherits all standard
|
|
629
|
+
* HTML input element props.
|
|
630
|
+
*
|
|
631
|
+
* @returns The rendered input component.
|
|
632
|
+
*/
|
|
633
|
+
export declare const InputText: ForwardRefExoticComponent<InputTextProps & RefAttributes<HTMLInputElement>>;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* A text area component with a label and error message.
|
|
637
|
+
*
|
|
638
|
+
* @param label - The text for the text area label.
|
|
639
|
+
* @param id - The id for the text area element, used to associate the label with the
|
|
640
|
+
* input.
|
|
641
|
+
* @param required - Whether the text area is required. If true, an asterisk (*) will be
|
|
642
|
+
* displayed next to the label.
|
|
643
|
+
* @param error - An optional error message to display below the text area.
|
|
644
|
+
* @param className - Additional CSS classes to apply to the text area element.
|
|
645
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
646
|
+
* @param disabled - Whether the text area is disabled.
|
|
647
|
+
* @param props - Additional props to pass to the text area element. It inherits all
|
|
648
|
+
* standard HTML text area element props.
|
|
649
|
+
*
|
|
650
|
+
* @returns The rendered text area component.
|
|
651
|
+
*/
|
|
652
|
+
export declare const InputTextArea: FC<InputTextAreaProps>;
|
|
653
|
+
|
|
654
|
+
declare interface InputTextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
655
|
+
label: string;
|
|
656
|
+
error?: string | boolean;
|
|
657
|
+
wrapperClassName?: string;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
declare interface InputTextProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
661
|
+
label: string;
|
|
662
|
+
error?: string | boolean;
|
|
663
|
+
wrapperClassName?: string;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export declare enum InvoiceStatus {
|
|
667
|
+
ANULLED = 6,
|
|
668
|
+
PAID = 10,
|
|
669
|
+
PENDING = 11,
|
|
670
|
+
PARTIAL_PAID = 20,
|
|
671
|
+
TO_ISSUE = 59,
|
|
672
|
+
ISSUED = 60
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Invoice summary component.
|
|
677
|
+
*
|
|
678
|
+
* @param invoice - The invoice data to display.
|
|
679
|
+
* @param onClick - Optional click handler for the invoice summary.
|
|
680
|
+
*
|
|
681
|
+
* @returns The rendered invoice summary component.
|
|
682
|
+
*/
|
|
683
|
+
export declare const InvoiceSummary: FC<InvoiceSummaryProps>;
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* InvoiceSummaryList component to display a list of invoice summaries.
|
|
687
|
+
*
|
|
688
|
+
* @param invoices - The list of invoices to display.
|
|
689
|
+
* @param onInvoiceClick - Optional callback when an invoice is clicked.
|
|
690
|
+
* @param wrapperClassName - Optional className for the wrapper.
|
|
691
|
+
*
|
|
692
|
+
* @returns The rendered InvoiceSummaryList component.
|
|
693
|
+
*/
|
|
694
|
+
export declare const InvoiceSummaryList: FC<InvoiceSummaryListProps>;
|
|
695
|
+
|
|
696
|
+
declare interface InvoiceSummaryListProps {
|
|
697
|
+
invoices: ShortInvoice[];
|
|
698
|
+
onInvoiceClick?: (invoice: ShortInvoice) => void;
|
|
699
|
+
wrapperClassName?: string;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
declare interface InvoiceSummaryProps {
|
|
703
|
+
invoice: ShortInvoice;
|
|
704
|
+
onClick?: () => void;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
export declare enum InvoiceType {
|
|
708
|
+
INVOICE = 2,
|
|
709
|
+
CREDIT_NOTE = 4,
|
|
710
|
+
ORDER = 6
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* A link component with predefined styles.
|
|
715
|
+
* Inherits all props from the standard HTML anchor element.
|
|
716
|
+
* Recommended for primary navigation or actions that redirect the user.
|
|
717
|
+
*
|
|
718
|
+
* @param children - Content to display inside the link.
|
|
719
|
+
* @param className - Additional CSS classes for custom styling.
|
|
720
|
+
* @param props - All standard anchor element props (href, target, etc).
|
|
721
|
+
* @returns The rendered anchor element styled as a primary action.
|
|
722
|
+
*/
|
|
723
|
+
export declare const Link: FC<AnchorHTMLAttributes<HTMLAnchorElement>>;
|
|
724
|
+
|
|
725
|
+
declare interface LoaderSpinnerProps {
|
|
726
|
+
className?: string;
|
|
727
|
+
wrapperClassName?: string;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* A simple loading spinner component. It displays a spinning icon to indicate loading
|
|
732
|
+
* state.
|
|
733
|
+
*
|
|
734
|
+
* @param className - Additional CSS classes to apply to the spinner icon.
|
|
735
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
736
|
+
*
|
|
737
|
+
* @returns The rendered loading spinner component.
|
|
738
|
+
*/
|
|
739
|
+
export declare const LoadingSpinner: FC<LoaderSpinnerProps>;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* A login form component that includes email and password fields, a submit button, and
|
|
743
|
+
* a link to the forgot password page.
|
|
744
|
+
*
|
|
745
|
+
* @param wrapperClassName - Additional CSS classes to apply to the main wrapper div.
|
|
746
|
+
* @param onSubmit - A callback function that is called when the form is submitted.
|
|
747
|
+
* @param onForgotPassword - A callback function that is called when the "Forgot Password"
|
|
748
|
+
* link is clicked.
|
|
749
|
+
*
|
|
750
|
+
* @returns The rendered login form component.
|
|
751
|
+
*/
|
|
752
|
+
export declare const Login: FC<LoginProps>;
|
|
753
|
+
|
|
754
|
+
declare interface LoginProps {
|
|
755
|
+
wrapperClassName?: string;
|
|
756
|
+
onSubmit: (email: string, password: string) => void;
|
|
757
|
+
onForgotPassword: () => void;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
declare interface MenuItem {
|
|
761
|
+
id: string;
|
|
762
|
+
label: string;
|
|
763
|
+
icon: IconType;
|
|
764
|
+
href: string;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Modal renders its children in a centered floating container with a dark backdrop.
|
|
769
|
+
* It closes when clicking outside the modal content or pressing Escape.
|
|
770
|
+
*
|
|
771
|
+
* @param open - Whether the modal is visible.
|
|
772
|
+
* @param onClose - Callback when modal should close.
|
|
773
|
+
* @param className - Additional CSS classes for the modal.
|
|
774
|
+
* @param children - Modal content.
|
|
775
|
+
*/
|
|
776
|
+
export declare const Modal: FC<ModalProps>;
|
|
777
|
+
|
|
778
|
+
declare interface ModalProps {
|
|
779
|
+
open: boolean;
|
|
780
|
+
onClose?: () => void;
|
|
781
|
+
className?: string;
|
|
782
|
+
children: ReactNode;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
export declare type Nullable<T> = {
|
|
786
|
+
[K in keyof T]: T[K] extends object ? Nullable<T[K]> | null : T[K] | null;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* A generic option interface for use in select components and similar.
|
|
791
|
+
*
|
|
792
|
+
* @template _TOptionValue - The type of the value associated with the option.
|
|
793
|
+
*
|
|
794
|
+
* @property label - The display label for the option.
|
|
795
|
+
* @property id - A unique identifier for the option.
|
|
796
|
+
* @property value - The value associated with the option.
|
|
797
|
+
*/
|
|
798
|
+
declare interface Option_2<_TOptionValue> {
|
|
799
|
+
label: string;
|
|
800
|
+
id: string;
|
|
801
|
+
value: _TOptionValue;
|
|
802
|
+
}
|
|
803
|
+
export { Option_2 as Option }
|
|
804
|
+
|
|
805
|
+
export declare interface Parcel {
|
|
806
|
+
pieceNumber: number;
|
|
807
|
+
height: number;
|
|
808
|
+
width: number;
|
|
809
|
+
length: number;
|
|
810
|
+
weight: number;
|
|
811
|
+
contentCategory: number;
|
|
812
|
+
contentDescription: string;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* A form for adding parcel details to a shipment.
|
|
817
|
+
*
|
|
818
|
+
* This component wraps the form UI and logic with Formik for state management and validation.
|
|
819
|
+
* It dynamically generates a validation schema based on the provided `validationConfig`
|
|
820
|
+
* and `serviceId`, ensuring that parcels meet weight, dimension, and density constraints.
|
|
821
|
+
* It also displays warnings and errors related to total weight and other validation rules.
|
|
822
|
+
*
|
|
823
|
+
* @param serviceId - The ID of the shipping service, used to apply service-specific
|
|
824
|
+
* validation (e.g., for documents).
|
|
825
|
+
* @param categoryTypeId - The type of category to fetch (e.g., for national or
|
|
826
|
+
* international shipping).
|
|
827
|
+
* @param totalWeight - The current total weight of all parcels already added to the
|
|
828
|
+
* shipment. Used to validate against `maxTotalWeight`.
|
|
829
|
+
* @param validationConfig - Configuration for validation rules (e.g., min/max weight,
|
|
830
|
+
* volume, density).
|
|
831
|
+
* @param onSubmit - The function to call when the form is successfully submitted with
|
|
832
|
+
* valid parcel details.
|
|
833
|
+
* @returns The rendered parcel form, powered by Formik.
|
|
834
|
+
*/
|
|
835
|
+
export declare const ParcelForm: FC<ParcelFormProps>;
|
|
836
|
+
|
|
837
|
+
declare interface ParcelFormProps {
|
|
838
|
+
serviceId: ServiceID;
|
|
839
|
+
categoryTypeId: CategoryTypeID;
|
|
840
|
+
totalWeight?: number;
|
|
841
|
+
validationConfig?: ParcelFormValidationConfig;
|
|
842
|
+
onSubmit: (values: ParcelFormValue, helpers: FormikHelpers<ParcelFormValue>) => void;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Configuration for parcel form validation rules.
|
|
847
|
+
*
|
|
848
|
+
* @param minWeight - The minimum allowed weight for a single parcel.
|
|
849
|
+
* @param maxWeight - The maximum allowed weight for a single parcel.
|
|
850
|
+
* @param maxDocumentWeight - The maximum allowed weight for a single document parcel.
|
|
851
|
+
* @param minVolume - The minimum allowed volume for a single parcel (cm³).
|
|
852
|
+
* @param maxVolume - The maximum allowed volume for a single parcel (cm³).
|
|
853
|
+
* @param minDensity - The minimum allowed density for a single parcel (kg/cm³).
|
|
854
|
+
* @param maxDensity - The maximum allowed density for a single parcel (kg/cm³).
|
|
855
|
+
* @param maxTotalWeight - The maximum allowed total weight for all parcels combined.
|
|
856
|
+
* @param maxTotalWeightWarn - The recommended maximum total weight for all parcels,
|
|
857
|
+
* which triggers a warning if exceeded.
|
|
858
|
+
*/
|
|
859
|
+
declare interface ParcelFormValidationConfig {
|
|
860
|
+
minWeight?: number;
|
|
861
|
+
maxWeight?: number;
|
|
862
|
+
maxDocumentWeight?: number;
|
|
863
|
+
minVolume?: number;
|
|
864
|
+
maxVolume?: number;
|
|
865
|
+
minDensity?: number;
|
|
866
|
+
maxDensity?: number;
|
|
867
|
+
maxTotalWeight?: number;
|
|
868
|
+
maxTotalWeightWarn?: number;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* Represents the structure for the parcel form's values.
|
|
873
|
+
*
|
|
874
|
+
* @param category - The selected category for the parcel.
|
|
875
|
+
* @param weight - The weight of the parcel in kilograms.
|
|
876
|
+
* @param height - The height of the parcel in centimeters.
|
|
877
|
+
* @param width - The width of the parcel in centimeters.
|
|
878
|
+
* @param length - The length of the parcel in centimeters.
|
|
879
|
+
* @param quantity - The number of parcels with the same characteristics.
|
|
880
|
+
*/
|
|
881
|
+
declare interface ParcelFormValue {
|
|
882
|
+
category: Option_2<Category> | null;
|
|
883
|
+
weight: number | null;
|
|
884
|
+
height: number | null;
|
|
885
|
+
width: number | null;
|
|
886
|
+
length: number | null;
|
|
887
|
+
quantity: number;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* ParcelRow component to display a single parcel row in the parcel table.
|
|
892
|
+
*
|
|
893
|
+
* @param parcel - The parcel object to display.
|
|
894
|
+
* @param index - The index of the parcel in the table.
|
|
895
|
+
* @param checked - Whether the parcel is selected (checked).
|
|
896
|
+
* @param editable - Whether the row is editable (shows checkboxes and actions).
|
|
897
|
+
* @param editing - Whether the row is currently being edited.
|
|
898
|
+
* @param disabledActions - Whether the action buttons are disabled.
|
|
899
|
+
* @param onChangeChecked - Callback when the checkbox is toggled.
|
|
900
|
+
* @param onPrintParcel - Callback to print the parcel.
|
|
901
|
+
* @param onDuplicate - Callback to duplicate the parcel.
|
|
902
|
+
* @param onEdit - Callback to edit the parcel.
|
|
903
|
+
*
|
|
904
|
+
* @returns The rendered ParcelRow component.
|
|
905
|
+
*/
|
|
906
|
+
export declare const ParcelRow: FC<ParcelRowProps>;
|
|
907
|
+
|
|
908
|
+
declare interface ParcelRowProps {
|
|
909
|
+
parcel: Parcel;
|
|
910
|
+
index: number;
|
|
911
|
+
checked: boolean;
|
|
912
|
+
editable?: boolean;
|
|
913
|
+
editing?: boolean;
|
|
914
|
+
disabledActions?: boolean;
|
|
915
|
+
onChangeChecked: (checked: boolean) => void;
|
|
916
|
+
onPrintParcel?: () => void;
|
|
917
|
+
onDuplicate?: () => void;
|
|
918
|
+
onEdit?: () => void;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* ParcelTable component to display a table of parcels with summary and actions.
|
|
923
|
+
*
|
|
924
|
+
* @param parcels - The list of parcels to display.
|
|
925
|
+
* @param totalPhysicalWeight - The total physical weight of all parcels.
|
|
926
|
+
* @param totalDimensionalWeight - The total dimensional (volumetric) weight of all
|
|
927
|
+
* parcels.
|
|
928
|
+
* @param totalChargedWeight - The total charged weight (used for billing).
|
|
929
|
+
* @param totalVolume - The total volume of all parcels.
|
|
930
|
+
* @param dimensionalFactor - The dimensional factor used for volumetric weight
|
|
931
|
+
* calculation.
|
|
932
|
+
* @param editingParcel - The parcel currently being edited (if any).
|
|
933
|
+
* @param editable - Whether the table is editable (shows checkboxes and actions).
|
|
934
|
+
* @param onPrintParcel - Callback to print a parcel.
|
|
935
|
+
* @param onDelete - Callback to delete selected parcels.
|
|
936
|
+
* @param onDuplicate - Callback to duplicate a parcel.
|
|
937
|
+
* @param onSelectEdit - Callback to select a parcel for editing.
|
|
938
|
+
* @param onCancelEdit - Callback to cancel editing mode.
|
|
939
|
+
* @param onPrintShipment - Callback to print the entire shipment.
|
|
940
|
+
* @param wrapperClassName - Optional className for the table wrapper.
|
|
941
|
+
*
|
|
942
|
+
* @returns The rendered ParcelTable component.
|
|
943
|
+
*/
|
|
944
|
+
export declare const ParcelTable: FC<ParcelTableProps>;
|
|
945
|
+
|
|
946
|
+
declare interface ParcelTableProps {
|
|
947
|
+
parcels: Parcel[];
|
|
948
|
+
totalPhysicalWeight: number;
|
|
949
|
+
totalDimensionalWeight: number;
|
|
950
|
+
totalChargedWeight: number;
|
|
951
|
+
totalVolume: number;
|
|
952
|
+
dimensionalFactor: number;
|
|
953
|
+
editingParcel?: Parcel | null;
|
|
954
|
+
editable?: boolean;
|
|
955
|
+
onPrintParcel?: (parcel: Parcel) => void;
|
|
956
|
+
onDelete?: (parcels: Parcel[]) => void;
|
|
957
|
+
onDuplicate?: (parcel: Parcel) => void;
|
|
958
|
+
onSelectEdit?: (parcel: Parcel) => void;
|
|
959
|
+
onCancelEdit?: () => void;
|
|
960
|
+
onPrintShipment?: () => void;
|
|
961
|
+
wrapperClassName?: string;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
export declare interface PaymentMode {
|
|
965
|
+
paymentModeID: PaymentModeID;
|
|
966
|
+
paymentModeName: string;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export declare enum PaymentModeID {
|
|
970
|
+
CASH = 1,
|
|
971
|
+
COD = 2,
|
|
972
|
+
CREDIT = 3,
|
|
973
|
+
BOXOFFICE_CREDIT = 4,
|
|
974
|
+
DEST_BOXOFFICE_CREDIT = 5,
|
|
975
|
+
EXEMPT = 6
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Represents the structure for a phone number form value.
|
|
980
|
+
*
|
|
981
|
+
* @param country - The selected country for the phone number.
|
|
982
|
+
* @param phonePrefix - The selected phone prefix.
|
|
983
|
+
* @param phoneNumber - The main part of the phone number.
|
|
984
|
+
*/
|
|
985
|
+
declare interface PhoneFormValue {
|
|
986
|
+
country: Option_2<Country> | null;
|
|
987
|
+
phonePrefix: Option_2<string> | null;
|
|
988
|
+
phoneNumber: string;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
declare type PlaceResult = google.maps.places.PlaceResult;
|
|
992
|
+
|
|
993
|
+
declare type PlaceResult_2 = google.maps.places.PlaceResult;
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Popover renders its children in a floating container anchored to an element.
|
|
997
|
+
* It supports basic placement and closes when clicking outside.
|
|
998
|
+
*
|
|
999
|
+
* @param open - Whether the popover is visible.
|
|
1000
|
+
* @param anchorEl - The element to anchor the popover to.
|
|
1001
|
+
* @param onClose - Callback when popover should close.
|
|
1002
|
+
* @param className - Additional CSS classes for the popover.
|
|
1003
|
+
* @param placement - Where to position the popover relative to anchor.
|
|
1004
|
+
* @param children - Popover content.
|
|
1005
|
+
*/
|
|
1006
|
+
export declare const Popover: FC<PopoverProps>;
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* PopoverMenu renders a selectable menu inside a Popover.
|
|
1010
|
+
*
|
|
1011
|
+
* @param options - Array of menu options.
|
|
1012
|
+
* @param selected - Currently selected option.
|
|
1013
|
+
* @param onSelect - Callback when an option is selected.
|
|
1014
|
+
* @param anchorEl - Element to anchor the popover.
|
|
1015
|
+
* @param open - Whether the popover is open.
|
|
1016
|
+
* @param onClose - Callback to close the popover.
|
|
1017
|
+
* @param className - Additional CSS classes.
|
|
1018
|
+
* @param renderOption - Custom render function for options.
|
|
1019
|
+
*/
|
|
1020
|
+
export declare const PopoverMenu: FC<PopoverMenuProps>;
|
|
1021
|
+
|
|
1022
|
+
declare interface PopoverMenuOption {
|
|
1023
|
+
id: string;
|
|
1024
|
+
label: string;
|
|
1025
|
+
icon?: ReactNode;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
declare interface PopoverMenuProps {
|
|
1029
|
+
options: PopoverMenuOption[];
|
|
1030
|
+
selected?: PopoverMenuOption | null;
|
|
1031
|
+
onSelect: (option: PopoverMenuOption) => void;
|
|
1032
|
+
anchorEl: HTMLElement | null;
|
|
1033
|
+
open: boolean;
|
|
1034
|
+
onClose: () => void;
|
|
1035
|
+
className?: string;
|
|
1036
|
+
renderOption?: (option: PopoverMenuOption) => ReactNode;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
declare interface PopoverProps {
|
|
1040
|
+
open: boolean;
|
|
1041
|
+
anchorEl: HTMLElement | null;
|
|
1042
|
+
onClose?: () => void;
|
|
1043
|
+
className?: string;
|
|
1044
|
+
children: ReactNode;
|
|
1045
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* A primary button component with predefined styles.
|
|
1050
|
+
* Inherits all props from the standard HTML button element.
|
|
1051
|
+
* It is recommended to use this button for primary actions in your application.
|
|
1052
|
+
*/
|
|
1053
|
+
export declare const PrimaryButton: FC<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
1054
|
+
|
|
1055
|
+
declare interface Response_2<_TModelType> {
|
|
1056
|
+
code: string;
|
|
1057
|
+
error: boolean;
|
|
1058
|
+
message: string;
|
|
1059
|
+
data: _TModelType | null;
|
|
1060
|
+
error_data: Record<string, string>;
|
|
1061
|
+
}
|
|
1062
|
+
export { Response_2 as Response }
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* A secondary button component with predefined styles.
|
|
1066
|
+
* Inherits all props from the standard HTML button element.
|
|
1067
|
+
* It is recommended to use this button for secondary actions in your application.
|
|
1068
|
+
*/
|
|
1069
|
+
export declare const SecondaryButton: FC<ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* A simple separator component. Renders a horizontal or vertical line to separate content.
|
|
1073
|
+
*
|
|
1074
|
+
* @param className - Additional CSS classes for the separator line.
|
|
1075
|
+
* @param wrapperClassName - Additional CSS classes for the wrapper div.
|
|
1076
|
+
* @param vertical - If true, renders a vertical separator.
|
|
1077
|
+
* @returns The rendered separator component.
|
|
1078
|
+
*/
|
|
1079
|
+
export declare const Separator: FC<SeparatorProps>;
|
|
1080
|
+
|
|
1081
|
+
declare interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
1082
|
+
className?: string;
|
|
1083
|
+
wrapperClassName?: string;
|
|
1084
|
+
vertical?: boolean;
|
|
9
1085
|
}
|
|
10
1086
|
|
|
11
|
-
export declare
|
|
1087
|
+
export declare interface Service {
|
|
1088
|
+
serviceID: ServiceID;
|
|
1089
|
+
serviceShortName: string;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
export declare enum ServiceID {
|
|
1093
|
+
STANDARD = 60,
|
|
1094
|
+
DOCUMENT = 61,
|
|
1095
|
+
INTERNATIONAL_DOCUMENT = 62,
|
|
1096
|
+
INTERNATIONAL_STANDARD = 63,
|
|
1097
|
+
ECONOMIC = 64,
|
|
1098
|
+
SAVER = 70,
|
|
1099
|
+
NATIONAL_LOCKER = 81,
|
|
1100
|
+
INTERNAL_MAIL = 99
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* ShipmentAccountSummary component to display account and store information.
|
|
1105
|
+
*
|
|
1106
|
+
* @param isShipper - Whether this summary is for the shipper (true) or consignee (false).
|
|
1107
|
+
* @param account - The account information to display.
|
|
1108
|
+
* @param store - The store information to display.
|
|
1109
|
+
* @param deliveryType - The delivery type (HOME or STORE).
|
|
1110
|
+
* @param isAccountBillTo - Whether the account is the billing account.
|
|
1111
|
+
* @param address - An optional address to display (only shown for HOME delivery).
|
|
1112
|
+
*
|
|
1113
|
+
* @returns The rendered ShipmentAccountSummary component.
|
|
1114
|
+
*/
|
|
1115
|
+
export declare const ShipmentAccountSummary: FC<ShipmentAccountSummaryProps>;
|
|
1116
|
+
|
|
1117
|
+
declare interface ShipmentAccountSummaryProps {
|
|
1118
|
+
isShipper?: boolean;
|
|
1119
|
+
account: Account;
|
|
1120
|
+
store: ShortStore;
|
|
1121
|
+
deliveryType: DeliveryTypeID;
|
|
1122
|
+
isAccountBillTo?: boolean;
|
|
1123
|
+
address?: Address;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* ShipmentAddresses component to display the addresses on a map.
|
|
1128
|
+
*
|
|
1129
|
+
* @param shipment - Shipment data
|
|
1130
|
+
* @param wrapperClassName - Optional className for the wrapper.
|
|
1131
|
+
*
|
|
1132
|
+
* @returns The rendered ShipmentAddresses component.
|
|
1133
|
+
*/
|
|
1134
|
+
export declare const ShipmentAddresses: FC<ShipmentAddressesProps>;
|
|
1135
|
+
|
|
1136
|
+
export declare const ShipmentAddressesForm: FC<ShipmentAddresssFormProps>;
|
|
1137
|
+
|
|
1138
|
+
declare interface ShipmentAddressesProps {
|
|
1139
|
+
shipment: ShipmentHeader;
|
|
1140
|
+
wrapperClassName?: string;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
declare interface ShipmentAddresssFormProps {
|
|
1144
|
+
formik: FormikProps<ShipmentFormValue>;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* ShipmentDeliveryData component to display delivery information for a shipment.
|
|
1149
|
+
*
|
|
1150
|
+
* @param user - The user who delivered the shipment.
|
|
1151
|
+
* @param date - The date and time of delivery.
|
|
1152
|
+
* @param observation - Any observations or notes about the delivery.
|
|
1153
|
+
* @param wrapperClassName - Optional className for the table wrapper.
|
|
1154
|
+
*
|
|
1155
|
+
* @returns The rendered ShipmentDeliveryData component.
|
|
1156
|
+
*/
|
|
1157
|
+
export declare const ShipmentDeliveryData: FC<ShipmentDeliveryDataProps>;
|
|
1158
|
+
|
|
1159
|
+
declare interface ShipmentDeliveryDataProps {
|
|
1160
|
+
user: string;
|
|
1161
|
+
date: string;
|
|
1162
|
+
observation?: string;
|
|
1163
|
+
wrapperClassName?: string;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* `ShipmentDetails` is a comprehensive component that displays all information related
|
|
1168
|
+
* to a shipment.
|
|
1169
|
+
*
|
|
1170
|
+
* It includes a summary, collapsible details section, and action buttons. The details
|
|
1171
|
+
* section contains information about invoices, parcels, items, tracking history,
|
|
1172
|
+
* delivery data, associated documents, and addresses.
|
|
1173
|
+
*
|
|
1174
|
+
* @param shipment - The main shipment header data.
|
|
1175
|
+
* @param trackings - An array of tracking events associated with the shipment.
|
|
1176
|
+
* @param showLiabilityWaiver - Flag to determine if the liability waiver section should be shown.
|
|
1177
|
+
* @param showPOD - Optional flag to show the Proof of Delivery (POD) document section.
|
|
1178
|
+
* @param showInvoice - Optional flag to show the invoice document section.
|
|
1179
|
+
* @param isPhysicalLiability - Optional flag indicating if the liability waiver is a physical document.
|
|
1180
|
+
* @param isPhysicalPOD - Optional flag indicating if the POD is a physical document.
|
|
1181
|
+
* @param invoiceNumber - Optional invoice number to display.
|
|
1182
|
+
* @param onSubstituteForClick - Optional handler for when the "substitute for" link is clicked.
|
|
1183
|
+
* @param onSubstitutedByClick - Optional handler for when the "substituted by" link is clicked.
|
|
1184
|
+
* @param onInvoiceClick - Optional handler for when an invoice is clicked.
|
|
1185
|
+
* @param onPublicAppClick - Optional handler for clicks on public tracking app links.
|
|
1186
|
+
* @param onShowLiabilityWaiver - Optional handler to show the liability waiver.
|
|
1187
|
+
* @param onDownloadLiabilityWaiver - Optional handler to download the liability waiver.
|
|
1188
|
+
* @param onShowPOD - Optional handler to show the POD.
|
|
1189
|
+
* @param onDownloadPOD - Optional handler to download the POD.
|
|
1190
|
+
* @param onShowInvoiceAttachments - Optional handler to show invoice attachments.
|
|
1191
|
+
* @param onPrintParcel - Optional handler to print a specific parcel's label.
|
|
1192
|
+
* @param onPrintShipment - Optional handler to print the entire shipment's documentation.
|
|
1193
|
+
* @param onEdit - Optional handler for the edit action.
|
|
1194
|
+
* @param onCancel - Optional handler for the cancel action.
|
|
1195
|
+
* @param onDeliver - Optional handler for the deliver action.
|
|
1196
|
+
* @returns A detailed view of a shipment with actions.
|
|
1197
|
+
*/
|
|
1198
|
+
export declare const ShipmentDetails: FC<ShipmentDetailsProps>;
|
|
1199
|
+
|
|
1200
|
+
declare interface ShipmentDetailsProps {
|
|
1201
|
+
shipment: ShipmentHeader;
|
|
1202
|
+
trackings: Tracking[];
|
|
1203
|
+
showLiabilityWaiver: boolean;
|
|
1204
|
+
showPOD?: boolean;
|
|
1205
|
+
showInvoice?: boolean;
|
|
1206
|
+
isPhysicalLiability?: boolean;
|
|
1207
|
+
isPhysicalPOD?: boolean;
|
|
1208
|
+
invoiceNumber?: string;
|
|
1209
|
+
onSubstituteForClick?: () => void;
|
|
1210
|
+
onSubstitutedByClick?: () => void;
|
|
1211
|
+
onInvoiceClick?: (invoice: ShortInvoice) => void;
|
|
1212
|
+
onPublicAppClick?: () => void;
|
|
1213
|
+
onShowLiabilityWaiver?: () => void;
|
|
1214
|
+
onDownloadLiabilityWaiver?: () => void;
|
|
1215
|
+
onShowPOD?: () => void;
|
|
1216
|
+
onDownloadPOD?: () => void;
|
|
1217
|
+
onShowInvoiceAttachments?: () => void;
|
|
1218
|
+
onPrintParcel?: (parcel: Parcel) => void;
|
|
1219
|
+
onPrintShipment?: () => void;
|
|
1220
|
+
onEdit?: () => void;
|
|
1221
|
+
onCancel?: () => void;
|
|
1222
|
+
onDeliver?: () => void;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* ShipmentDocument component to display digital document actions for a shipment
|
|
1227
|
+
* (Liability Waiver, POD, and Invoice).
|
|
1228
|
+
*
|
|
1229
|
+
* @param showPOD - Whether to show the POD section.
|
|
1230
|
+
* @param showInvoice - Whether to show the Invoice section.
|
|
1231
|
+
* @param isPhysicalLiability - Whether the liability waiver was filled physically.
|
|
1232
|
+
* @param isPhysicalPOD - Whether the POD was filled physically.
|
|
1233
|
+
* @param invoiceNumber - The invoice number to display (if any).
|
|
1234
|
+
* @param onShowLiabilityWaiver - Callback to show the liability waiver document.
|
|
1235
|
+
* @param onDownloadLiabilityWaiver - Callback to download the liability waiver document.
|
|
1236
|
+
* @param onShowPOD - Callback to show the POD document.
|
|
1237
|
+
* @param onDownloadPOD - Callback to download the POD document.
|
|
1238
|
+
* @param onShowInvoiceAttachments - Callback to show the invoice attachments.
|
|
1239
|
+
* @param wrapperClassName - Optional className for the wrapper.
|
|
1240
|
+
*
|
|
1241
|
+
* @returns The rendered ShipmentDocument component.
|
|
1242
|
+
*/
|
|
1243
|
+
export declare const ShipmentDocument: FC<ShipmentDocumentProps>;
|
|
1244
|
+
|
|
1245
|
+
declare interface ShipmentDocumentProps {
|
|
1246
|
+
showPOD?: boolean;
|
|
1247
|
+
showInvoice?: boolean;
|
|
1248
|
+
isPhysicalLiability?: boolean;
|
|
1249
|
+
isPhysicalPOD?: boolean;
|
|
1250
|
+
invoiceNumber?: string;
|
|
1251
|
+
onShowLiabilityWaiver?: () => void;
|
|
1252
|
+
onDownloadLiabilityWaiver?: () => void;
|
|
1253
|
+
onShowPOD?: () => void;
|
|
1254
|
+
onDownloadPOD?: () => void;
|
|
1255
|
+
onShowInvoiceAttachments?: () => void;
|
|
1256
|
+
wrapperClassName?: string;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
export declare const ShipmentForm: FC<ShipmentFormProps>;
|
|
1260
|
+
|
|
1261
|
+
declare interface ShipmentFormProps {
|
|
1262
|
+
index: number;
|
|
1263
|
+
shipment?: ShipmentHeader;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
export declare interface ShipmentFormValue {
|
|
1267
|
+
shipper: Option_2<Account> | null;
|
|
1268
|
+
consigneeType: Option_2<ConsigneeType> | null;
|
|
1269
|
+
consignee: Option_2<Account> | null;
|
|
1270
|
+
boxAccount: BoxAccount | null;
|
|
1271
|
+
pickupType: Option_2<DeliveryType> | null;
|
|
1272
|
+
originStore: Option_2<Store> | null;
|
|
1273
|
+
originAddress: Option_2<Address> | null;
|
|
1274
|
+
deliveryType: Option_2<DeliveryType> | null;
|
|
1275
|
+
destinationStore: Option_2<Store> | null;
|
|
1276
|
+
destinationAddress: Option_2<Address> | null;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
export declare interface ShipmentHeader {
|
|
1280
|
+
shipmentHeaderId: string;
|
|
1281
|
+
shipmentNumber: string;
|
|
1282
|
+
shipmentHeaderDate: string;
|
|
1283
|
+
service: Service;
|
|
1284
|
+
paymentMode: PaymentMode;
|
|
1285
|
+
pickupType: DeliveryType;
|
|
1286
|
+
deliveryType: DeliveryType;
|
|
1287
|
+
totalPieces: number;
|
|
1288
|
+
totalDimensionalWeight: number;
|
|
1289
|
+
totalPhysicalWeight: number;
|
|
1290
|
+
totalChargedWeight: number;
|
|
1291
|
+
totalVolume: number;
|
|
1292
|
+
dimensionalFactor: number;
|
|
1293
|
+
parcels: Parcel[];
|
|
1294
|
+
subTotalAmount: number;
|
|
1295
|
+
vatAmount: number;
|
|
1296
|
+
postalTaxAmount: number;
|
|
1297
|
+
totalAmount: number;
|
|
1298
|
+
items: ShipmentItem[];
|
|
1299
|
+
invoices: ShortInvoice[];
|
|
1300
|
+
originStore: ShortStore;
|
|
1301
|
+
originAddress: Address;
|
|
1302
|
+
destinationStore: ShortStore;
|
|
1303
|
+
destinationAddress: Address;
|
|
1304
|
+
lastKnowStoreLocation: ShortStore;
|
|
1305
|
+
accountSite: AccountSite | null;
|
|
1306
|
+
boxAccount: BoxAccount | null;
|
|
1307
|
+
shipper: Account;
|
|
1308
|
+
consignee: Account;
|
|
1309
|
+
billTo: Account;
|
|
1310
|
+
status: Status;
|
|
1311
|
+
deliveryUser?: string;
|
|
1312
|
+
deliveryDate?: string;
|
|
1313
|
+
deliveryObservation?: string;
|
|
1314
|
+
substituteFor?: string;
|
|
1315
|
+
substitutedBy?: string;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
export declare const shipmentInitialValues: ShipmentFormValue;
|
|
1319
|
+
|
|
1320
|
+
export declare interface ShipmentItem {
|
|
1321
|
+
itemID: number;
|
|
1322
|
+
itemDescription: string;
|
|
1323
|
+
itemDetails: string;
|
|
1324
|
+
subTotalAmount: number;
|
|
1325
|
+
vatPercentage: number;
|
|
1326
|
+
vatAmount: number;
|
|
1327
|
+
postalTaxPercentage: number;
|
|
1328
|
+
postalTaxAmount: number;
|
|
1329
|
+
totalAmount: number;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* ShipmentItemRow component to display a single shipment item row in the shipment item table.
|
|
1334
|
+
*
|
|
1335
|
+
* @param item - The shipment item object to display.
|
|
1336
|
+
* @param index - The index of the item in the table.
|
|
1337
|
+
*
|
|
1338
|
+
* @returns The rendered ShipmentItemRow component.
|
|
1339
|
+
*/
|
|
1340
|
+
export declare const ShipmentItemRow: FC<ShipmentItemRowProps>;
|
|
1341
|
+
|
|
1342
|
+
declare interface ShipmentItemRowProps {
|
|
1343
|
+
item: ShipmentItem;
|
|
1344
|
+
index: number;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* ShipmentItemTable component to display a table of shipment items with summary and totals.
|
|
1349
|
+
*
|
|
1350
|
+
* @param items - The list of shipment items to display.
|
|
1351
|
+
* @param subTotalAmount - The subtotal amount of all items.
|
|
1352
|
+
* @param vatAmount - The total VAT amount.
|
|
1353
|
+
* @param postalTaxAmount - The total postal tax amount.
|
|
1354
|
+
* @param totalAmount - The total amount (including taxes).
|
|
1355
|
+
* @param wrapperClassName - Optional className for the table wrapper.
|
|
1356
|
+
*
|
|
1357
|
+
* @returns The rendered ShipmentItemTable component.
|
|
1358
|
+
*/
|
|
1359
|
+
export declare const ShipmentItemTable: FC<ShipmentItemTableProps>;
|
|
1360
|
+
|
|
1361
|
+
declare interface ShipmentItemTableProps {
|
|
1362
|
+
items: ShipmentItem[];
|
|
1363
|
+
subTotalAmount: number;
|
|
1364
|
+
vatAmount: number;
|
|
1365
|
+
postalTaxAmount: number;
|
|
1366
|
+
totalAmount: number;
|
|
1367
|
+
wrapperClassName?: string;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* A form component for selecting the shipper (sender) and consignee (recipient)
|
|
1372
|
+
* for a shipment.
|
|
1373
|
+
*
|
|
1374
|
+
* @param formik - The Formik instance from the parent form, used to manage field
|
|
1375
|
+
* values, errors, and touched states for shipper and consignee.
|
|
1376
|
+
* @returns The rendered form for selecting shipment parties.
|
|
1377
|
+
*/
|
|
1378
|
+
export declare const ShipmentPartiesForm: FC<ShipmentPartiesFormProps>;
|
|
1379
|
+
|
|
1380
|
+
declare interface ShipmentPartiesFormProps {
|
|
1381
|
+
formik: FormikProps<ShipmentFormValue>;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
export declare enum ShipmentStatusID {
|
|
1385
|
+
ACTIVE = 1,
|
|
1386
|
+
ANNULLED = 3,
|
|
1387
|
+
DRAFT = 5,
|
|
1388
|
+
REPLACED = 55,
|
|
1389
|
+
DELIVERED = 30
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* A component that displays a comprehensive summary of a shipment.
|
|
1394
|
+
*
|
|
1395
|
+
* This component renders a detailed view of a shipment's header information,
|
|
1396
|
+
* including the shipment number, creation date, status, and any substitution links.
|
|
1397
|
+
* It is structured to show sender (shipper) and receiver (consignee) details,
|
|
1398
|
+
* along with a financial and logistical summary (service type, payment mode, total amount,
|
|
1399
|
+
* number of pieces, and chargeable weight). It utilizes sub-components like
|
|
1400
|
+
* `ShipmentAccountSummary` to display party details and `Badge` for status visualization.
|
|
1401
|
+
*
|
|
1402
|
+
* @param shipment - The full `ShipmentHeader` object containing all the data to be
|
|
1403
|
+
* displayed in the summary.
|
|
1404
|
+
* @param onSubstituteForClick - An optional function to handle clicks on the "Sustituto de"
|
|
1405
|
+
* (Replaces) link, allowing for actions like navigating to the related shipment.
|
|
1406
|
+
* @param onSubstitutedByClick - An optional function to handle clicks on the "Sustituido por"
|
|
1407
|
+
* (Replaced by) link.
|
|
1408
|
+
* @returns The rendered shipment summary component.
|
|
1409
|
+
*/
|
|
1410
|
+
export declare const ShipmentSummary: FC<ShipmentSummaryProps>;
|
|
1411
|
+
|
|
1412
|
+
declare interface ShipmentSummaryProps {
|
|
1413
|
+
shipment: ShipmentHeader;
|
|
1414
|
+
onSubstituteForClick?: () => void;
|
|
1415
|
+
onSubstitutedByClick?: () => void;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
export declare interface ShortInvoice {
|
|
1419
|
+
invoiceID: string;
|
|
1420
|
+
invoiceNumber: string;
|
|
1421
|
+
invoiceDate: string;
|
|
1422
|
+
accountFullName: string;
|
|
1423
|
+
totalAmount: number;
|
|
1424
|
+
balanceAmount: number;
|
|
1425
|
+
type: InvoiceType;
|
|
1426
|
+
status: InvoiceStatus;
|
|
1427
|
+
statusName: string;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
export declare interface ShortStore {
|
|
1431
|
+
code: string;
|
|
1432
|
+
commercialName: string;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
export declare const SideMenu: default_2.FC<SideMenuProps>;
|
|
1436
|
+
|
|
1437
|
+
declare interface SideMenuProps {
|
|
1438
|
+
menuItems: MenuItem[];
|
|
1439
|
+
activeItemId?: string;
|
|
1440
|
+
className?: string;
|
|
1441
|
+
onSelectStore?: (store: Store) => void;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
export declare interface Status {
|
|
1445
|
+
id: number;
|
|
1446
|
+
name: string;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
export declare interface Store {
|
|
1450
|
+
code: string;
|
|
1451
|
+
legalName: string;
|
|
1452
|
+
commercialName: string;
|
|
1453
|
+
businessHours: string;
|
|
1454
|
+
coverageArea: string;
|
|
1455
|
+
storeTypeName: string;
|
|
1456
|
+
pickupAvailable: boolean;
|
|
1457
|
+
dropoffAvailable: boolean;
|
|
1458
|
+
retrievalAvailable: boolean;
|
|
1459
|
+
deliveryAvailable: boolean;
|
|
1460
|
+
address: Address;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* A base switch (toggle) component.
|
|
1465
|
+
* Inherits all props from the standard HTML input[type="checkbox"] element.
|
|
1466
|
+
*/
|
|
1467
|
+
export declare const Switch: FC<InputHTMLAttributes<HTMLInputElement>>;
|
|
1468
|
+
|
|
1469
|
+
export declare const Table: FC<TableProps>;
|
|
1470
|
+
|
|
1471
|
+
declare interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
1472
|
+
wrapperClassName?: string;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
export declare interface TaxIdentificationType {
|
|
1476
|
+
taxIdentificationTypeId: number;
|
|
1477
|
+
taxIdentificationTypeName: string;
|
|
1478
|
+
taxIdentificationTypeCode: string;
|
|
1479
|
+
taxIdentificationTypeRegExp: string;
|
|
1480
|
+
countryId: number;
|
|
1481
|
+
isJuridic: boolean;
|
|
1482
|
+
abbreviationName: string;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
export declare interface Tracking {
|
|
1486
|
+
trackingID: number;
|
|
1487
|
+
date: string;
|
|
1488
|
+
shipmentNumber: string;
|
|
1489
|
+
description: string;
|
|
1490
|
+
type: string;
|
|
1491
|
+
details: string;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* TrackingRow component to display a single tracking event row in the tracking table.
|
|
1496
|
+
*
|
|
1497
|
+
* @param tracking - The tracking event object to display.
|
|
1498
|
+
* @param index - The index of the tracking event in the table.
|
|
1499
|
+
*
|
|
1500
|
+
* @returns The rendered TrackingRow component.
|
|
1501
|
+
*/
|
|
1502
|
+
export declare const TrackingRow: FC<TrackingRowProps>;
|
|
1503
|
+
|
|
1504
|
+
declare interface TrackingRowProps {
|
|
1505
|
+
tracking: Tracking;
|
|
1506
|
+
index: number;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* TrackingTable component to display a table of tracking events for a shipment.
|
|
1511
|
+
*
|
|
1512
|
+
* @param trackings - The list of tracking events to display.
|
|
1513
|
+
* @param onPublicAppClick - Optional callback for when the public app link is clicked.
|
|
1514
|
+
* @param wrapperClassName - Optional className for the table wrapper.
|
|
1515
|
+
*
|
|
1516
|
+
* @returns The rendered TrackingTable component.
|
|
1517
|
+
*/
|
|
1518
|
+
export declare const TrackingTable: FC<TrackingTableProps>;
|
|
1519
|
+
|
|
1520
|
+
declare interface TrackingTableProps {
|
|
1521
|
+
trackings: Tracking[];
|
|
1522
|
+
onPublicAppClick?: () => void;
|
|
1523
|
+
wrapperClassName?: string;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
export declare interface User {
|
|
1527
|
+
userId: string;
|
|
1528
|
+
department?: Department;
|
|
1529
|
+
userIdentificationType?: TaxIdentificationType;
|
|
1530
|
+
userIdentificationNumber?: string;
|
|
1531
|
+
userActiveDirectory: boolean;
|
|
1532
|
+
userLogin: string;
|
|
1533
|
+
userName: string;
|
|
1534
|
+
userLastName: string;
|
|
1535
|
+
userPhone: string;
|
|
1536
|
+
email: string;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* A component to display an warning message with a title and description.
|
|
1541
|
+
* It includes an warning icon and is styled with a yellow background to indicate an warning.
|
|
1542
|
+
*
|
|
1543
|
+
* @param title - The title of the warning message.
|
|
1544
|
+
* @param description - The detailed description of the warning.
|
|
1545
|
+
* @param wrapperClassName - Additional CSS classes to apply to the wrapper div.
|
|
1546
|
+
* @returns The rendered warning card component.
|
|
1547
|
+
*/
|
|
1548
|
+
export declare const WarningCard: FC<WarningCardProps>;
|
|
1549
|
+
|
|
1550
|
+
declare interface WarningCardProps {
|
|
1551
|
+
title?: string;
|
|
1552
|
+
description?: string;
|
|
1553
|
+
wrapperClassName?: string;
|
|
1554
|
+
}
|
|
12
1555
|
|
|
13
1556
|
export { }
|