@cagatayfdn/flora-components 0.0.5 → 0.0.6

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.d.ts DELETED
@@ -1,525 +0,0 @@
1
- /// <reference types="react" />
2
-
3
- import { AxiosError } from 'axios';
4
- import { CustomLocale } from 'flatpickr/dist/types/locale';
5
- import { Dispatch as Dispatch_2 } from 'react';
6
- import { FC } from 'react';
7
- import i18n from 'i18next';
8
- import { JSX as JSX_2 } from 'react/jsx-runtime';
9
- import { LinkProps } from 'react-router-dom';
10
- import { MouseEvent as MouseEvent_2 } from 'react';
11
- import NiceModal from '@ebay/nice-modal-react';
12
- import { NiceModalHocProps } from '@ebay/nice-modal-react';
13
- import { default as React_2 } from 'react';
14
- import { ReactNode } from 'react';
15
- import { SetStateAction } from 'react';
16
- import { TFunction } from 'i18next';
17
-
18
- declare type Actiontype = {
19
- type: 'login_pending';
20
- } | {
21
- type: 'active_user_success';
22
- payload: UserEntity;
23
- } | {
24
- type: 'login_failure';
25
- payload: any;
26
- } | {
27
- type: 'active_user_failure';
28
- payload: any;
29
- } | {
30
- type: 'register_pending';
31
- } | {
32
- type: 'register_failure';
33
- payload: any;
34
- } | {
35
- type: 'no_active_user';
36
- } | {
37
- type: 'signout';
38
- };
39
-
40
- export declare enum AppAndServicesStatusApperenceType {
41
- ADDONS_INITIALIZING = "addons_initializing",
42
- ADDONS_ADDONS_INITILIZATION_FAILED = "addons_initialization_failed",
43
- DEPLOYING = "deploying",
44
- FAILED = "failed",
45
- DEPLOYED = "deployed",
46
- INITIALIZING = "initializing",
47
- INITIALIZING_FAILED = "initialization_failed",
48
- QUEUEING = "queueing",
49
- QUEUED = "queued"
50
- }
51
-
52
- export declare enum AppearanceAlertCard {
53
- DANGER = "danger",
54
- WARNING = "warning"
55
- }
56
-
57
- export declare enum AppearanceButton {
58
- LINK = "link",
59
- DEFAULT = "default",
60
- PRIMARY = "primary",
61
- DANGER = "danger",
62
- SUCCESS = "success",
63
- WARNING = "warning",
64
- DARK = "dark"
65
- }
66
-
67
- export declare enum AppearanceDirection {
68
- TOP = "top",
69
- RIGHT = "right",
70
- BOTTOM = "bottom",
71
- LEFT = "left"
72
- }
73
-
74
- export declare enum AppearanceSpinner {
75
- LIGHT = "light",
76
- DARK = "dark",
77
- LIGHT_FULL = "light_full",
78
- DARK_FULL = "darkFull"
79
- }
80
-
81
- export declare enum AppearanceTag {
82
- DANGER = "danger",
83
- SUCCESS = "success",
84
- WARNING = "warning"
85
- }
86
-
87
- export declare enum ApplicationTypeSlug {
88
- COMMERCE = "commerce",
89
- ZERO = "zero",
90
- DEMO_AKINON_ZERO = "demo-akinon-zero",
91
- INSTORE = "instore",
92
- SALES_CHANNEL = "sales-channel",
93
- BI_TOOL = "bi-tool",
94
- OMNITRON_FRONTEND = "omnitron-frontend",
95
- OMS = "oms",
96
- EXTENSION = "extension",
97
- SELLER_CENTER_FRONTEND = "seller_center_fe",
98
- SELLER_CENTER_BACKEND = "seller_center_be",
99
- OMNITRON = "omnitron"
100
- }
101
-
102
- export declare enum AppTypeEnum {
103
- SERVICE = "service",
104
- APPLICATION = "application"
105
- }
106
-
107
- declare type AuthContextType = [state: State & {
108
- token?: string;
109
- }, dispatch: Dispatch];
110
-
111
- export declare const AuthProvider: (props: {
112
- children: React_2.ReactNode;
113
- }) => JSX_2.Element;
114
-
115
- export declare const Button: ({ children, size, isLoading, isDisabled, isBlock, noBorder, isSolid, type, className, prefixIcon, appearance, onClick, }: ButtonProps) => JSX.Element;
116
-
117
- declare type ButtonProps = {
118
- children: ReactNode;
119
- appearance?: AppearanceButton;
120
- size?: Size;
121
- type?: 'submit' | 'button';
122
- className?: string;
123
- autoFocus?: boolean;
124
- isBlock?: boolean;
125
- isLoading?: boolean;
126
- isDisabled?: boolean;
127
- noBorder?: boolean;
128
- isSolid?: boolean;
129
- prefixIcon?: Icons;
130
- } & Omit<EventProps<HTMLButtonElement>, 'onKeyPress' | 'onKeyUp' | 'onKeydown' | 'onChange'>;
131
-
132
- export declare const changeLanguage: (user: any, t: TFunction) => void;
133
-
134
- export declare const Column: ({ children, auto, size, sm, md, lg, xl, className, }: ColumnProps) => JSX.Element;
135
-
136
- declare type ColumnProps = {
137
- children: ReactNode;
138
- auto?: boolean;
139
- size?: number;
140
- sm?: number;
141
- md?: number;
142
- lg?: number;
143
- xl?: number;
144
- className?: string;
145
- };
146
-
147
- export declare const Confirm: FC<ConfirmProps & NiceModalHocProps>;
148
-
149
- declare type ConfirmProps = {
150
- id: string;
151
- onClose?: () => void;
152
- okBtnCallback: () => void;
153
- description: ReactNode;
154
- descriptionClassName?: string;
155
- isLoading?: boolean;
156
- appearence?: ThemeAppearance;
157
- title?: string;
158
- okBtnText?: string;
159
- cancelBtnText?: string;
160
- };
161
-
162
- export declare enum CopyTextStatusEnum {
163
- SUCCESS = "success",
164
- ERROR = "error"
165
- }
166
-
167
- declare type Dispatch = React_2.Dispatch<Actiontype>;
168
-
169
- export declare enum DividerAppearance {
170
- LIGHT = "light",
171
- GREY = "grey"
172
- }
173
-
174
- declare interface EventProps<T = HTMLElement> {
175
- onClick?: (e: React.MouseEvent<T>) => void;
176
- onFocus?: (e: React.FocusEvent<T>) => void;
177
- onBlur?: (e: React.FocusEvent<T>) => void;
178
- onChange?: (e: React.ChangeEvent<T>) => void;
179
- onKeyPress?: (e: React.KeyboardEvent<T>) => void;
180
- onKeyUp?: (e: React.KeyboardEvent<T>) => void;
181
- onKeyDown?: (e: React.KeyboardEvent<T>) => void;
182
- onMouseDown?: (e: React.MouseEventHandler<T>) => void;
183
- onMouseUp?: (e: React.MouseEventHandler<T>) => void;
184
- onMouseEnter?: (e: React.MouseEventHandler<T>) => void;
185
- onMouseLeave?: (e: React.MouseEventHandler<T>) => void;
186
- onInvalid?: (e: React.FormEvent<T>) => void;
187
- }
188
-
189
- export declare enum FormFieldAppearance {
190
- LIGHT = "light",
191
- DARK = "dark",
192
- MORE_DARK = "more_dark"
193
- }
194
-
195
- export declare function getCurrentLanguage(): string;
196
-
197
- export declare function getDatepickerLocale(): "en" | CustomLocale;
198
-
199
- declare type HashMap<K extends string | number, V> = {
200
- [key in K]: V
201
- }
202
-
203
- export { i18n }
204
-
205
- export declare const Icon: (props: IconProps) => JSX.Element;
206
-
207
- declare type IconProps = {
208
- id?: string;
209
- name: IconsId;
210
- isDisabled?: boolean;
211
- onClick?: (e: MouseEvent_2<HTMLElement>) => void;
212
- style?: any;
213
- className?: string;
214
- };
215
-
216
- declare enum Icons {
217
- Applications = "applications",
218
- Attach = "attach",
219
- Attachment = "attachment",
220
- Billing = "billing",
221
- Box = "box",
222
- Calendar = "calendar",
223
- Cart = "cart",
224
- Certificate = "certificate",
225
- Check = "check",
226
- ChevronLeft = "chevron-left",
227
- ChevronRight = "chevron-right",
228
- CircleMinus = "circle-minus",
229
- CirclePlus = "circle-plus",
230
- Clock = "clock",
231
- Close = "close",
232
- Copy = "copy",
233
- CreditCard = "credit-card",
234
- Document = "document",
235
- DomainRegistration = "domain-registration",
236
- Domains = "domains",
237
- DownArrow = "down-arrow",
238
- DownSquare = "down-square",
239
- Down = "down",
240
- Download = "download",
241
- EditOutline = "edit-outline",
242
- Edit = "edit",
243
- Email = "email",
244
- Environment = "environment",
245
- ErrorFill = "error-fill",
246
- Error = "error",
247
- FileTextOutlined = "fileTextOutlined",
248
- Info = "info",
249
- Install = "install",
250
- Link = "link",
251
- Log = "log",
252
- MenuClose = "menu-close",
253
- MenuOpen = "menu-open",
254
- Monitoring = "monitoring",
255
- Network = "network",
256
- NoResults = "no-results",
257
- NotEdit = "not-edit",
258
- Path = "path",
259
- Plus = "plus",
260
- Preview = "preview",
261
- Profile = "profile",
262
- ProjectList = "project-list",
263
- Projects = "projects",
264
- Reload = "reload",
265
- Retry = "retry",
266
- Search = "search",
267
- Settings = "settings",
268
- Support = "support",
269
- Trash = "trash",
270
- Users = "users",
271
- Warning = "warning"
272
- }
273
-
274
- declare type IconsId = 'applications' | 'attach' | 'attachment' | 'billing' | 'box' | 'calendar' | 'cart' | 'certificate' | 'check' | 'chevron-left' | 'chevron-right' | 'circle-minus' | 'circle-plus' | 'clock' | 'close' | 'copy' | 'credit-card' | 'document' | 'domain-registration' | 'domains' | 'down-arrow' | 'down-square' | 'down' | 'download' | 'edit-outline' | 'edit' | 'email' | 'environment' | 'error-fill' | 'error' | 'fileTextOutlined' | 'info' | 'install' | 'link' | 'log' | 'menu-close' | 'menu-open' | 'monitoring' | 'network' | 'no-results' | 'not-edit' | 'path' | 'plus' | 'preview' | 'profile' | 'project-list' | 'projects' | 'reload' | 'retry' | 'search' | 'settings' | 'support' | 'trash' | 'users' | 'warning';
275
-
276
- export declare enum isActiveColor {
277
- inActive = "#4482ff",
278
- active = "#3f4b5c"
279
- }
280
-
281
- export declare const Loading: ({ className, appearance, layer, wrapperClass, }: LoadingProps) => JSX.Element;
282
-
283
- declare type LoadingProps = {
284
- className?: string;
285
- wrapperClass?: string;
286
- appearance?: AppearanceSpinner;
287
- layer?: boolean;
288
- };
289
-
290
- declare type MappedObjectPermission = HashMap<PermissionsType, number[]>
291
-
292
- export declare const Modal: (props: ModalProps) => JSX.Element;
293
-
294
- export declare enum ModalAppearanceType {
295
- DEFAULT = "default",
296
- SUCCESS = "success"
297
- }
298
-
299
- declare type ModalEvents = {
300
- onClose: () => void;
301
- };
302
-
303
- declare type ModalProps = {
304
- children: ReactNode;
305
- visible?: boolean;
306
- title?: string;
307
- header?: ReactNode;
308
- headerClass?: any;
309
- descriptionClass?: any;
310
- description?: string;
311
- className?: string;
312
- appearance?: ThemeAppearance;
313
- } & ModalEvents;
314
-
315
- export { NiceModal }
316
-
317
- export declare enum NotificationAppearanceType {
318
- INFO = "info",
319
- SUCCESS = "success",
320
- ERROR = "error",
321
- WARNING = "warning",
322
- LOADING = "loading"
323
- }
324
-
325
- declare interface Permissions_2 {
326
- default: boolean
327
- depends_on: PermissionsType[] | null
328
- description: string
329
- name: string
330
- slug: PermItem
331
- }
332
-
333
- declare enum PermissionsSlug {
334
- Read = 'read',
335
- Write = 'write',
336
- Edit = 'edit',
337
- Delete = 'delete',
338
- Build = 'build',
339
- Deploy = 'deploy',
340
- EditPermissions = 'edit_permissions',
341
- ViewAddonInfo = 'view_addon_info',
342
- SetStableVersion = 'set_stable_version',
343
- AttachCertificate = 'attach_certificate',
344
- ManageEnvironments = 'manage_environments',
345
- ManageSecretEnvironments = 'manage_secret_environments',
346
- Monitor = 'monitor',
347
- Resend = 'resend',
348
- ExportZonefile = 'export_zonefile',
349
- }
350
-
351
- declare type PermissionsType = `${PermItem}::${PermissionsSlug}`
352
-
353
- declare interface PermissionTree {
354
- users: PermissionTreeItem
355
- roles: PermissionTreeItem
356
- public_key: PermissionTreeItem
357
- apps: PermissionTreeItem
358
- app_versions: PermissionTreeItem
359
- quality_assurance_report: PermissionTreeItem
360
- addon_types: PermissionTreeItem
361
- related_app: PermissionTreeItem
362
- public_apps: PermissionTreeItem
363
- public_services: PermissionTreeItem
364
- projects: PermissionTreeItem
365
- project_apps: PermissionTreeItem
366
- export_project_app_log: PermissionTreeItem
367
- project_app_deployments: PermissionTreeItem
368
- related_project_app: PermissionTreeItem
369
- project_app_email: PermissionTreeItem
370
- addons: PermissionTreeItem
371
- accounts: PermissionTreeItem
372
- domain: PermissionTreeItem
373
- certificate: PermissionTreeItem
374
- email: PermissionTreeItem
375
- mail_identity_domain: PermissionTreeItem
376
- remote_group: PermissionTreeItem
377
- remote_group_user: PermissionTreeItem
378
- remote_group_application: PermissionTreeItem
379
- app_bundle: PermissionTreeItem
380
- app_bundle_app: PermissionTreeItem
381
- app_bundle_base_app: PermissionTreeItem
382
- monitoring: PermissionTreeItem
383
- kubernetes: PermissionTreeItem
384
- app_user: PermissionTreeItem
385
- }
386
-
387
- declare interface PermissionTreeItem {
388
- depends_on: PermissionsType[] | null
389
- description: string
390
- name: string
391
- permissions: Permissions_2[]
392
- slug: PermItem
393
- }
394
-
395
- declare type PermItem = keyof PermissionTree
396
-
397
- export declare enum PodStatusEnum {
398
- TERMINATED = "Terminated",
399
- TERMINATING = "Terminating",
400
- FAILED = "Failed",
401
- PENDING = "Pending",
402
- RUNNING = "Running",
403
- SUCCEEDED = "Succeeded",
404
- EVICTED = "Evicted"
405
- }
406
-
407
- export declare enum ReportStatus {
408
- PENDING = "pending",
409
- FAILED = "failed",
410
- IN_PROGRESS = "analyzing",
411
- SUCCESS = "completed"
412
- }
413
-
414
- declare interface Role {
415
- pk: number
416
- name: string
417
- account: number
418
- description: string | null
419
- permission_tree: PermissionTree
420
- permissions: PermissionsType[]
421
- }
422
-
423
- export declare const Row: ({ children, className }: RowProps) => JSX.Element;
424
-
425
- declare type RowProps = {
426
- children: ReactNode;
427
- className?: string;
428
- };
429
-
430
- export declare enum Size {
431
- XS = "xsmall",
432
- SM = "small",
433
- MD = "normal",
434
- LG = "large",
435
- XL = "xlarge"
436
- }
437
-
438
- declare interface State {
439
- user: UserEntity | null;
440
- status: Status;
441
- error: AxiosError | null;
442
- }
443
-
444
- declare type Status = 'idle' | 'pending' | 'success' | 'rejected';
445
-
446
- export declare enum StatusEnum {
447
- addons_initializing = "initializing",
448
- addons_initialization_failed = "failed",
449
- deploying = "warning",
450
- failed = "failed",
451
- deployed = "success",
452
- completed = "success",
453
- initializing = "initializing",
454
- initialization_failed = "failed",
455
- queueing = "warning",
456
- queued = "queued",
457
- pending = "pending"
458
- }
459
-
460
- export declare enum StatusType {
461
- IDLE = "idle",
462
- PENDING = "pending",
463
- FULFILLED = "fulfilled",
464
- REJECTED = "rejected"
465
- }
466
-
467
- export declare const Stepper: ({ items, selected, selectAll, renderAnchor, onChange, wrapperClass, }: StepperProps) => JSX.Element;
468
-
469
- declare type StepperItemProps = {
470
- title: string | any;
471
- customIndexItem?: any;
472
- activeClass?: any;
473
- completeClass?: any;
474
- to?: LinkProps['to'];
475
- };
476
-
477
- declare type StepperProps = {
478
- items: StepperItemProps[];
479
- selected?: number;
480
- selectAll?: boolean;
481
- renderAnchor?: boolean;
482
- className?: string;
483
- wrapperClass?: string;
484
- onChange?: (index: number, event?: any) => void;
485
- };
486
-
487
- export declare const t: TFunction;
488
-
489
- export declare enum ThemeAppearance {
490
- LIGHT = "light",
491
- DARK = "dark",
492
- DARK_BLUE = "dark_blue"
493
- }
494
-
495
- export declare const useAuth: () => AuthContextType;
496
-
497
- export declare function useDisclosure(isOpenInit?: boolean): {
498
- isOpen: boolean;
499
- setIsOpen: Dispatch_2<SetStateAction<boolean>>;
500
- onOpen: () => void;
501
- onClose: () => void;
502
- onToggle: () => void;
503
- };
504
-
505
- declare type UseNiceModal = [() => void, () => void, string];
506
-
507
- export declare function useNiceModal(modalId?: string): UseNiceModal;
508
-
509
- declare interface UserEntity {
510
- pk: number
511
- email?: string
512
- first_name?: string
513
- last_name?: string
514
- language?: string
515
- account?: number
516
- last_login?: string | null
517
- permission_tree?: PermissionTree
518
- is_active?: boolean
519
- avatar?: string
520
- role?: Role
521
- object_permissions: MappedObjectPermission
522
- permissions: PermissionsType[]
523
- }
524
-
525
- export { }