@cagatayfdn/flora-components 0.0.15 → 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 +254 -47
- package/dist/index.es.js +11659 -9232
- 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 +1 -1
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
|
|
|
@@ -402,15 +435,45 @@ declare type PagerProps = {
|
|
|
402
435
|
appearance?: ThemeAppearance;
|
|
403
436
|
};
|
|
404
437
|
|
|
438
|
+
export declare const PermFallBack: () => JSX_2.Element;
|
|
439
|
+
|
|
440
|
+
export declare function Permission(props: Props): JSX_2.Element;
|
|
441
|
+
|
|
405
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 {
|
|
406
451
|
default: boolean
|
|
407
|
-
depends_on:
|
|
452
|
+
depends_on: PermissionsType_2[] | null
|
|
408
453
|
description: string
|
|
409
454
|
name: string
|
|
410
|
-
slug:
|
|
455
|
+
slug: PermItem_2
|
|
411
456
|
}
|
|
412
457
|
|
|
413
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 {
|
|
414
477
|
Read = 'read',
|
|
415
478
|
Write = 'write',
|
|
416
479
|
Edit = 'edit',
|
|
@@ -428,51 +491,101 @@ declare enum PermissionsSlug {
|
|
|
428
491
|
ExportZonefile = 'export_zonefile',
|
|
429
492
|
}
|
|
430
493
|
|
|
431
|
-
declare type PermissionsType = `${PermItem}::${PermissionsSlug}
|
|
494
|
+
declare type PermissionsType = `${PermItem}::${PermissionsSlug}`;
|
|
495
|
+
|
|
496
|
+
declare type PermissionsType_2 = `${PermItem_2}::${PermissionsSlug_2}`
|
|
432
497
|
|
|
433
498
|
declare interface PermissionTree {
|
|
434
|
-
users: PermissionTreeItem
|
|
435
|
-
roles: PermissionTreeItem
|
|
436
|
-
public_key: PermissionTreeItem
|
|
437
|
-
apps: PermissionTreeItem
|
|
438
|
-
app_versions: PermissionTreeItem
|
|
439
|
-
quality_assurance_report: PermissionTreeItem
|
|
440
|
-
addon_types: PermissionTreeItem
|
|
441
|
-
related_app: PermissionTreeItem
|
|
442
|
-
public_apps: PermissionTreeItem
|
|
443
|
-
public_services: PermissionTreeItem
|
|
444
|
-
projects: PermissionTreeItem
|
|
445
|
-
project_apps: PermissionTreeItem
|
|
446
|
-
export_project_app_log: PermissionTreeItem
|
|
447
|
-
project_app_deployments: PermissionTreeItem
|
|
448
|
-
related_project_app: PermissionTreeItem
|
|
449
|
-
project_app_email: PermissionTreeItem
|
|
450
|
-
addons: PermissionTreeItem
|
|
451
|
-
accounts: PermissionTreeItem
|
|
452
|
-
domain: PermissionTreeItem
|
|
453
|
-
certificate: PermissionTreeItem
|
|
454
|
-
email: PermissionTreeItem
|
|
455
|
-
mail_identity_domain: PermissionTreeItem
|
|
456
|
-
remote_group: PermissionTreeItem
|
|
457
|
-
remote_group_user: PermissionTreeItem
|
|
458
|
-
remote_group_application: PermissionTreeItem
|
|
459
|
-
app_bundle: PermissionTreeItem
|
|
460
|
-
app_bundle_app: PermissionTreeItem
|
|
461
|
-
app_bundle_base_app: PermissionTreeItem
|
|
462
|
-
monitoring: PermissionTreeItem
|
|
463
|
-
kubernetes: PermissionTreeItem
|
|
464
|
-
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
|
|
465
564
|
}
|
|
466
565
|
|
|
467
566
|
declare interface PermissionTreeItem {
|
|
468
|
-
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
|
|
469
576
|
description: string
|
|
470
577
|
name: string
|
|
471
|
-
permissions:
|
|
472
|
-
slug:
|
|
578
|
+
permissions: Permissions_3[]
|
|
579
|
+
slug: PermItem_2
|
|
473
580
|
}
|
|
474
581
|
|
|
475
|
-
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}`
|
|
476
589
|
|
|
477
590
|
export declare enum PodStatusEnum {
|
|
478
591
|
TERMINATED = "Terminated",
|
|
@@ -484,6 +597,11 @@ export declare enum PodStatusEnum {
|
|
|
484
597
|
EVICTED = "Evicted"
|
|
485
598
|
}
|
|
486
599
|
|
|
600
|
+
declare type Props = {
|
|
601
|
+
id: string;
|
|
602
|
+
tooltipText?: string;
|
|
603
|
+
} & CanProps;
|
|
604
|
+
|
|
487
605
|
export declare enum ReportStatus {
|
|
488
606
|
PENDING = "pending",
|
|
489
607
|
FAILED = "failed",
|
|
@@ -491,13 +609,32 @@ export declare enum ReportStatus {
|
|
|
491
609
|
SUCCESS = "completed"
|
|
492
610
|
}
|
|
493
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
|
+
|
|
494
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 {
|
|
495
632
|
pk: number
|
|
496
633
|
name: string
|
|
497
634
|
account: number
|
|
498
635
|
description: string | null
|
|
499
|
-
permission_tree:
|
|
500
|
-
permissions:
|
|
636
|
+
permission_tree: PermissionTree_2
|
|
637
|
+
permissions: PermissionsType_2[]
|
|
501
638
|
}
|
|
502
639
|
|
|
503
640
|
export declare const Row: ({ children, className }: RowProps) => JSX.Element;
|
|
@@ -561,7 +698,7 @@ export declare enum Size {
|
|
|
561
698
|
}
|
|
562
699
|
|
|
563
700
|
declare interface State {
|
|
564
|
-
user:
|
|
701
|
+
user: UserEntity_2 | null;
|
|
565
702
|
status: Status;
|
|
566
703
|
error: AxiosError | null;
|
|
567
704
|
}
|
|
@@ -611,12 +748,66 @@ declare type StepperProps = {
|
|
|
611
748
|
|
|
612
749
|
export declare const t: TFunction;
|
|
613
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
|
+
|
|
614
791
|
export declare enum ThemeAppearance {
|
|
615
792
|
LIGHT = "light",
|
|
616
793
|
DARK = "dark",
|
|
617
794
|
DARK_BLUE = "dark_blue"
|
|
618
795
|
}
|
|
619
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
|
+
|
|
620
811
|
export declare const useAuth: () => AuthContextType;
|
|
621
812
|
|
|
622
813
|
export declare function useDisclosure(isOpenInit?: boolean): {
|
|
@@ -632,6 +823,22 @@ declare type UseNiceModal = [() => void, () => void, string];
|
|
|
632
823
|
export declare function useNiceModal(modalId?: string): UseNiceModal;
|
|
633
824
|
|
|
634
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 {
|
|
635
842
|
pk: number
|
|
636
843
|
email?: string
|
|
637
844
|
first_name?: string
|
|
@@ -639,12 +846,12 @@ declare interface UserEntity {
|
|
|
639
846
|
language?: string
|
|
640
847
|
account?: number
|
|
641
848
|
last_login?: string | null
|
|
642
|
-
permission_tree?:
|
|
849
|
+
permission_tree?: PermissionTree_2
|
|
643
850
|
is_active?: boolean
|
|
644
851
|
avatar?: string
|
|
645
|
-
role?:
|
|
646
|
-
object_permissions:
|
|
647
|
-
permissions:
|
|
852
|
+
role?: Role_2
|
|
853
|
+
object_permissions: MappedObjectPermission_2
|
|
854
|
+
permissions: PermissionsType_2[]
|
|
648
855
|
}
|
|
649
856
|
|
|
650
857
|
export declare const ValidationError: ({ message }: ValidationErrorProps) => JSX.Element;
|