@cagatayfdn/flora-components 0.0.14 → 0.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.js +177 -41
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +265 -47
- package/dist/index.es.js +11655 -9146
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +175 -39
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ declare type Actiontype = {
|
|
|
21
21
|
type: 'login_pending';
|
|
22
22
|
} | {
|
|
23
23
|
type: 'active_user_success';
|
|
24
|
-
payload:
|
|
24
|
+
payload: UserEntity_2;
|
|
25
25
|
} | {
|
|
26
26
|
type: 'login_failure';
|
|
27
27
|
payload: any;
|
|
@@ -131,6 +131,15 @@ declare type ButtonProps = {
|
|
|
131
131
|
prefixIcon?: Icons;
|
|
132
132
|
} & Omit<EventProps<HTMLButtonElement>, 'onKeyPress' | 'onKeyUp' | 'onKeydown' | 'onChange'>;
|
|
133
133
|
|
|
134
|
+
declare type CanProps = {
|
|
135
|
+
permItem: PermItem;
|
|
136
|
+
permType: PermType | PermType[];
|
|
137
|
+
children: ReactNode;
|
|
138
|
+
fallback?: JSX_2.Element | null;
|
|
139
|
+
pk?: string;
|
|
140
|
+
byPass?: boolean;
|
|
141
|
+
};
|
|
142
|
+
|
|
134
143
|
export declare const changeLanguage: (user: any, t: TFunction) => void;
|
|
135
144
|
|
|
136
145
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<{
|
|
@@ -156,6 +165,19 @@ declare type ColumnProps = {
|
|
|
156
165
|
className?: string;
|
|
157
166
|
};
|
|
158
167
|
|
|
168
|
+
declare type ColumnsType = {
|
|
169
|
+
title: ReactNode;
|
|
170
|
+
dataIndex: string;
|
|
171
|
+
key?: string;
|
|
172
|
+
width?: string | number;
|
|
173
|
+
className?: string;
|
|
174
|
+
tdClassName?: string;
|
|
175
|
+
permItem?: PermItem_2;
|
|
176
|
+
permType?: PermType_2 | PermType_2[];
|
|
177
|
+
onClick?: (e: any, item: any, colItem: any, index: any) => void;
|
|
178
|
+
render?: (property: any, row: any) => void;
|
|
179
|
+
};
|
|
180
|
+
|
|
159
181
|
export declare const Confirm: FC<ConfirmProps & NiceModalHocProps>;
|
|
160
182
|
|
|
161
183
|
declare type ConfirmProps = {
|
|
@@ -220,6 +242,15 @@ export declare enum FormFieldAppearance {
|
|
|
220
242
|
MORE_DARK = "more_dark"
|
|
221
243
|
}
|
|
222
244
|
|
|
245
|
+
export declare const getAuth: ({ permType, user, permItem }: GetAuthProps) => boolean;
|
|
246
|
+
|
|
247
|
+
declare type GetAuthProps = {
|
|
248
|
+
permItem: PermItem;
|
|
249
|
+
permType: PermType | PermType[];
|
|
250
|
+
pk?: string;
|
|
251
|
+
user: UserEntity | null | undefined;
|
|
252
|
+
};
|
|
253
|
+
|
|
223
254
|
export declare function getCurrentLanguage(): string;
|
|
224
255
|
|
|
225
256
|
export declare function getDatepickerLocale(): "en" | CustomLocale;
|
|
@@ -343,7 +374,9 @@ declare type LoadingProps = {
|
|
|
343
374
|
layer?: boolean;
|
|
344
375
|
};
|
|
345
376
|
|
|
346
|
-
declare type MappedObjectPermission = HashMap<PermissionsType, number[]
|
|
377
|
+
declare type MappedObjectPermission = HashMap<PermissionsType, number[]>;
|
|
378
|
+
|
|
379
|
+
declare type MappedObjectPermission_2 = HashMap<PermissionsType_2, number[]>
|
|
347
380
|
|
|
348
381
|
export declare const Modal: (props: ModalProps) => JSX.Element;
|
|
349
382
|
|
|
@@ -391,15 +424,56 @@ declare interface OptionProps extends OptionItem {
|
|
|
391
424
|
name?: string;
|
|
392
425
|
}
|
|
393
426
|
|
|
427
|
+
export declare const Pager: (props: PagerProps) => JSX.Element;
|
|
428
|
+
|
|
429
|
+
declare type PagerProps = {
|
|
430
|
+
totalCount: number;
|
|
431
|
+
currentPage?: number;
|
|
432
|
+
pageSize?: number;
|
|
433
|
+
className?: string;
|
|
434
|
+
onChange?: (pageIndex: number) => void;
|
|
435
|
+
appearance?: ThemeAppearance;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
export declare const PermFallBack: () => JSX_2.Element;
|
|
439
|
+
|
|
440
|
+
export declare function Permission(props: Props): JSX_2.Element;
|
|
441
|
+
|
|
394
442
|
declare interface Permissions_2 {
|
|
443
|
+
default: boolean;
|
|
444
|
+
depends_on: PermissionsType[] | null;
|
|
445
|
+
description: string;
|
|
446
|
+
name: string;
|
|
447
|
+
slug: PermItem;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
declare interface Permissions_3 {
|
|
395
451
|
default: boolean
|
|
396
|
-
depends_on:
|
|
452
|
+
depends_on: PermissionsType_2[] | null
|
|
397
453
|
description: string
|
|
398
454
|
name: string
|
|
399
|
-
slug:
|
|
455
|
+
slug: PermItem_2
|
|
400
456
|
}
|
|
401
457
|
|
|
402
458
|
declare enum PermissionsSlug {
|
|
459
|
+
Read = "read",
|
|
460
|
+
Write = "write",
|
|
461
|
+
Edit = "edit",
|
|
462
|
+
Delete = "delete",
|
|
463
|
+
Build = "build",
|
|
464
|
+
Deploy = "deploy",
|
|
465
|
+
EditPermissions = "edit_permissions",
|
|
466
|
+
ViewAddonInfo = "view_addon_info",
|
|
467
|
+
SetStableVersion = "set_stable_version",
|
|
468
|
+
AttachCertificate = "attach_certificate",
|
|
469
|
+
ManageEnvironments = "manage_environments",
|
|
470
|
+
ManageSecretEnvironments = "manage_secret_environments",
|
|
471
|
+
Monitor = "monitor",
|
|
472
|
+
Resend = "resend",
|
|
473
|
+
ExportZonefile = "export_zonefile"
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
declare enum PermissionsSlug_2 {
|
|
403
477
|
Read = 'read',
|
|
404
478
|
Write = 'write',
|
|
405
479
|
Edit = 'edit',
|
|
@@ -417,51 +491,101 @@ declare enum PermissionsSlug {
|
|
|
417
491
|
ExportZonefile = 'export_zonefile',
|
|
418
492
|
}
|
|
419
493
|
|
|
420
|
-
declare type PermissionsType = `${PermItem}::${PermissionsSlug}
|
|
494
|
+
declare type PermissionsType = `${PermItem}::${PermissionsSlug}`;
|
|
495
|
+
|
|
496
|
+
declare type PermissionsType_2 = `${PermItem_2}::${PermissionsSlug_2}`
|
|
421
497
|
|
|
422
498
|
declare interface PermissionTree {
|
|
423
|
-
users: PermissionTreeItem
|
|
424
|
-
roles: PermissionTreeItem
|
|
425
|
-
public_key: PermissionTreeItem
|
|
426
|
-
apps: PermissionTreeItem
|
|
427
|
-
app_versions: PermissionTreeItem
|
|
428
|
-
quality_assurance_report: PermissionTreeItem
|
|
429
|
-
addon_types: PermissionTreeItem
|
|
430
|
-
related_app: PermissionTreeItem
|
|
431
|
-
public_apps: PermissionTreeItem
|
|
432
|
-
public_services: PermissionTreeItem
|
|
433
|
-
projects: PermissionTreeItem
|
|
434
|
-
project_apps: PermissionTreeItem
|
|
435
|
-
export_project_app_log: PermissionTreeItem
|
|
436
|
-
project_app_deployments: PermissionTreeItem
|
|
437
|
-
related_project_app: PermissionTreeItem
|
|
438
|
-
project_app_email: PermissionTreeItem
|
|
439
|
-
addons: PermissionTreeItem
|
|
440
|
-
accounts: PermissionTreeItem
|
|
441
|
-
domain: PermissionTreeItem
|
|
442
|
-
certificate: PermissionTreeItem
|
|
443
|
-
email: PermissionTreeItem
|
|
444
|
-
mail_identity_domain: PermissionTreeItem
|
|
445
|
-
remote_group: PermissionTreeItem
|
|
446
|
-
remote_group_user: PermissionTreeItem
|
|
447
|
-
remote_group_application: PermissionTreeItem
|
|
448
|
-
app_bundle: PermissionTreeItem
|
|
449
|
-
app_bundle_app: PermissionTreeItem
|
|
450
|
-
app_bundle_base_app: PermissionTreeItem
|
|
451
|
-
monitoring: PermissionTreeItem
|
|
452
|
-
kubernetes: PermissionTreeItem
|
|
453
|
-
app_user: PermissionTreeItem
|
|
499
|
+
users: PermissionTreeItem;
|
|
500
|
+
roles: PermissionTreeItem;
|
|
501
|
+
public_key: PermissionTreeItem;
|
|
502
|
+
apps: PermissionTreeItem;
|
|
503
|
+
app_versions: PermissionTreeItem;
|
|
504
|
+
quality_assurance_report: PermissionTreeItem;
|
|
505
|
+
addon_types: PermissionTreeItem;
|
|
506
|
+
related_app: PermissionTreeItem;
|
|
507
|
+
public_apps: PermissionTreeItem;
|
|
508
|
+
public_services: PermissionTreeItem;
|
|
509
|
+
projects: PermissionTreeItem;
|
|
510
|
+
project_apps: PermissionTreeItem;
|
|
511
|
+
export_project_app_log: PermissionTreeItem;
|
|
512
|
+
project_app_deployments: PermissionTreeItem;
|
|
513
|
+
related_project_app: PermissionTreeItem;
|
|
514
|
+
project_app_email: PermissionTreeItem;
|
|
515
|
+
addons: PermissionTreeItem;
|
|
516
|
+
accounts: PermissionTreeItem;
|
|
517
|
+
domain: PermissionTreeItem;
|
|
518
|
+
certificate: PermissionTreeItem;
|
|
519
|
+
email: PermissionTreeItem;
|
|
520
|
+
mail_identity_domain: PermissionTreeItem;
|
|
521
|
+
remote_group: PermissionTreeItem;
|
|
522
|
+
remote_group_user: PermissionTreeItem;
|
|
523
|
+
remote_group_application: PermissionTreeItem;
|
|
524
|
+
app_bundle: PermissionTreeItem;
|
|
525
|
+
app_bundle_app: PermissionTreeItem;
|
|
526
|
+
app_bundle_base_app: PermissionTreeItem;
|
|
527
|
+
monitoring: PermissionTreeItem;
|
|
528
|
+
kubernetes: PermissionTreeItem;
|
|
529
|
+
app_user: PermissionTreeItem;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
declare interface PermissionTree_2 {
|
|
533
|
+
users: PermissionTreeItem_2
|
|
534
|
+
roles: PermissionTreeItem_2
|
|
535
|
+
public_key: PermissionTreeItem_2
|
|
536
|
+
apps: PermissionTreeItem_2
|
|
537
|
+
app_versions: PermissionTreeItem_2
|
|
538
|
+
quality_assurance_report: PermissionTreeItem_2
|
|
539
|
+
addon_types: PermissionTreeItem_2
|
|
540
|
+
related_app: PermissionTreeItem_2
|
|
541
|
+
public_apps: PermissionTreeItem_2
|
|
542
|
+
public_services: PermissionTreeItem_2
|
|
543
|
+
projects: PermissionTreeItem_2
|
|
544
|
+
project_apps: PermissionTreeItem_2
|
|
545
|
+
export_project_app_log: PermissionTreeItem_2
|
|
546
|
+
project_app_deployments: PermissionTreeItem_2
|
|
547
|
+
related_project_app: PermissionTreeItem_2
|
|
548
|
+
project_app_email: PermissionTreeItem_2
|
|
549
|
+
addons: PermissionTreeItem_2
|
|
550
|
+
accounts: PermissionTreeItem_2
|
|
551
|
+
domain: PermissionTreeItem_2
|
|
552
|
+
certificate: PermissionTreeItem_2
|
|
553
|
+
email: PermissionTreeItem_2
|
|
554
|
+
mail_identity_domain: PermissionTreeItem_2
|
|
555
|
+
remote_group: PermissionTreeItem_2
|
|
556
|
+
remote_group_user: PermissionTreeItem_2
|
|
557
|
+
remote_group_application: PermissionTreeItem_2
|
|
558
|
+
app_bundle: PermissionTreeItem_2
|
|
559
|
+
app_bundle_app: PermissionTreeItem_2
|
|
560
|
+
app_bundle_base_app: PermissionTreeItem_2
|
|
561
|
+
monitoring: PermissionTreeItem_2
|
|
562
|
+
kubernetes: PermissionTreeItem_2
|
|
563
|
+
app_user: PermissionTreeItem_2
|
|
454
564
|
}
|
|
455
565
|
|
|
456
566
|
declare interface PermissionTreeItem {
|
|
457
|
-
depends_on: PermissionsType[] | null
|
|
567
|
+
depends_on: PermissionsType[] | null;
|
|
568
|
+
description: string;
|
|
569
|
+
name: string;
|
|
570
|
+
permissions: Permissions_2[];
|
|
571
|
+
slug: PermItem;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
declare interface PermissionTreeItem_2 {
|
|
575
|
+
depends_on: PermissionsType_2[] | null
|
|
458
576
|
description: string
|
|
459
577
|
name: string
|
|
460
|
-
permissions:
|
|
461
|
-
slug:
|
|
578
|
+
permissions: Permissions_3[]
|
|
579
|
+
slug: PermItem_2
|
|
462
580
|
}
|
|
463
581
|
|
|
464
|
-
declare type PermItem = keyof PermissionTree
|
|
582
|
+
declare type PermItem = keyof PermissionTree;
|
|
583
|
+
|
|
584
|
+
declare type PermItem_2 = keyof PermissionTree_2
|
|
585
|
+
|
|
586
|
+
declare type PermType = `${PermissionsSlug}`;
|
|
587
|
+
|
|
588
|
+
declare type PermType_2 = `${PermissionsSlug_2}`
|
|
465
589
|
|
|
466
590
|
export declare enum PodStatusEnum {
|
|
467
591
|
TERMINATED = "Terminated",
|
|
@@ -473,6 +597,11 @@ export declare enum PodStatusEnum {
|
|
|
473
597
|
EVICTED = "Evicted"
|
|
474
598
|
}
|
|
475
599
|
|
|
600
|
+
declare type Props = {
|
|
601
|
+
id: string;
|
|
602
|
+
tooltipText?: string;
|
|
603
|
+
} & CanProps;
|
|
604
|
+
|
|
476
605
|
export declare enum ReportStatus {
|
|
477
606
|
PENDING = "pending",
|
|
478
607
|
FAILED = "failed",
|
|
@@ -480,13 +609,32 @@ export declare enum ReportStatus {
|
|
|
480
609
|
SUCCESS = "completed"
|
|
481
610
|
}
|
|
482
611
|
|
|
612
|
+
export declare const ResultError: ({ title, text, image, buttonText, onClick, }: ResultErrorProps) => JSX.Element;
|
|
613
|
+
|
|
614
|
+
declare type ResultErrorProps = {
|
|
615
|
+
title: string;
|
|
616
|
+
text: string;
|
|
617
|
+
image: string;
|
|
618
|
+
buttonText?: string;
|
|
619
|
+
onClick?: () => void;
|
|
620
|
+
};
|
|
621
|
+
|
|
483
622
|
declare interface Role {
|
|
623
|
+
pk: number;
|
|
624
|
+
name: string;
|
|
625
|
+
account: number;
|
|
626
|
+
description: string | null;
|
|
627
|
+
permission_tree: PermissionTree;
|
|
628
|
+
permissions: PermissionsType[];
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
declare interface Role_2 {
|
|
484
632
|
pk: number
|
|
485
633
|
name: string
|
|
486
634
|
account: number
|
|
487
635
|
description: string | null
|
|
488
|
-
permission_tree:
|
|
489
|
-
permissions:
|
|
636
|
+
permission_tree: PermissionTree_2
|
|
637
|
+
permissions: PermissionsType_2[]
|
|
490
638
|
}
|
|
491
639
|
|
|
492
640
|
export declare const Row: ({ children, className }: RowProps) => JSX.Element;
|
|
@@ -550,7 +698,7 @@ export declare enum Size {
|
|
|
550
698
|
}
|
|
551
699
|
|
|
552
700
|
declare interface State {
|
|
553
|
-
user:
|
|
701
|
+
user: UserEntity_2 | null;
|
|
554
702
|
status: Status;
|
|
555
703
|
error: AxiosError | null;
|
|
556
704
|
}
|
|
@@ -600,12 +748,66 @@ declare type StepperProps = {
|
|
|
600
748
|
|
|
601
749
|
export declare const t: TFunction;
|
|
602
750
|
|
|
751
|
+
export declare const Table: (props: TableProps) => JSX.Element;
|
|
752
|
+
|
|
753
|
+
export declare const TableHeader: ({ totalCount, currentPage, title, actionOnChange, className, pagerOnChange, pageSizeOnChange, pagerVisible, pageSizeVisible, pageSize, actionItems, pageSizeItems, headerLeftItem, appearance, showItemsText, }: TableHeaderProps) => JSX_2.Element;
|
|
754
|
+
|
|
755
|
+
declare type TableHeaderProps = {
|
|
756
|
+
totalCount?: number;
|
|
757
|
+
currentPage?: number;
|
|
758
|
+
title?: string;
|
|
759
|
+
pagerVisible?: boolean;
|
|
760
|
+
pageSizeVisible?: boolean;
|
|
761
|
+
pageSize?: number;
|
|
762
|
+
actionItems?: OptionProps[];
|
|
763
|
+
pageSizeItems?: OptionProps[];
|
|
764
|
+
headerLeftItem?: ReactNode;
|
|
765
|
+
className?: string;
|
|
766
|
+
appearance?: ThemeAppearance;
|
|
767
|
+
actionOnChange?: (value: any) => void;
|
|
768
|
+
pagerOnChange?: (pageIndex: number) => void;
|
|
769
|
+
pageSizeOnChange?: (pageSize: number) => void;
|
|
770
|
+
showItemsText?: string;
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
declare type TableProps = {
|
|
774
|
+
columns: ColumnsType[];
|
|
775
|
+
dataSource: any[];
|
|
776
|
+
disabledItems?: any[];
|
|
777
|
+
isLoading?: boolean;
|
|
778
|
+
className?: string;
|
|
779
|
+
wrapperClass?: string;
|
|
780
|
+
headerVisible?: boolean;
|
|
781
|
+
headerLeftItem?: ReactNode;
|
|
782
|
+
selectedItems?: any[];
|
|
783
|
+
footerAction?: boolean;
|
|
784
|
+
rowSelection?: boolean;
|
|
785
|
+
rowSelectionChange?: (value: any) => void;
|
|
786
|
+
fixedHeader?: boolean;
|
|
787
|
+
customHeader?: ReactNode;
|
|
788
|
+
scrollClass?: string;
|
|
789
|
+
} & TableHeaderProps;
|
|
790
|
+
|
|
603
791
|
export declare enum ThemeAppearance {
|
|
604
792
|
LIGHT = "light",
|
|
605
793
|
DARK = "dark",
|
|
606
794
|
DARK_BLUE = "dark_blue"
|
|
607
795
|
}
|
|
608
796
|
|
|
797
|
+
export declare const Tooltip: (props: TooltipProps) => JSX.Element;
|
|
798
|
+
|
|
799
|
+
declare type TooltipProps = {
|
|
800
|
+
id: string;
|
|
801
|
+
children: ReactNode;
|
|
802
|
+
tooltipContent: ReactNode;
|
|
803
|
+
contentClass?: string;
|
|
804
|
+
childClass?: string;
|
|
805
|
+
className?: string;
|
|
806
|
+
direction?: AppearanceDirection;
|
|
807
|
+
ellipsis?: boolean;
|
|
808
|
+
tooltipVisible?: boolean;
|
|
809
|
+
};
|
|
810
|
+
|
|
609
811
|
export declare const useAuth: () => AuthContextType;
|
|
610
812
|
|
|
611
813
|
export declare function useDisclosure(isOpenInit?: boolean): {
|
|
@@ -621,6 +823,22 @@ declare type UseNiceModal = [() => void, () => void, string];
|
|
|
621
823
|
export declare function useNiceModal(modalId?: string): UseNiceModal;
|
|
622
824
|
|
|
623
825
|
declare interface UserEntity {
|
|
826
|
+
pk: number;
|
|
827
|
+
email?: string;
|
|
828
|
+
first_name?: string;
|
|
829
|
+
last_name?: string;
|
|
830
|
+
language?: string;
|
|
831
|
+
account?: number;
|
|
832
|
+
last_login?: string | null;
|
|
833
|
+
permission_tree?: PermissionTree;
|
|
834
|
+
is_active?: boolean;
|
|
835
|
+
avatar?: string;
|
|
836
|
+
role?: Role;
|
|
837
|
+
object_permissions: MappedObjectPermission;
|
|
838
|
+
permissions: PermissionsType[];
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare interface UserEntity_2 {
|
|
624
842
|
pk: number
|
|
625
843
|
email?: string
|
|
626
844
|
first_name?: string
|
|
@@ -628,12 +846,12 @@ declare interface UserEntity {
|
|
|
628
846
|
language?: string
|
|
629
847
|
account?: number
|
|
630
848
|
last_login?: string | null
|
|
631
|
-
permission_tree?:
|
|
849
|
+
permission_tree?: PermissionTree_2
|
|
632
850
|
is_active?: boolean
|
|
633
851
|
avatar?: string
|
|
634
|
-
role?:
|
|
635
|
-
object_permissions:
|
|
636
|
-
permissions:
|
|
852
|
+
role?: Role_2
|
|
853
|
+
object_permissions: MappedObjectPermission_2
|
|
854
|
+
permissions: PermissionsType_2[]
|
|
637
855
|
}
|
|
638
856
|
|
|
639
857
|
export declare const ValidationError: ({ message }: ValidationErrorProps) => JSX.Element;
|