@cryptlex/web-components 1.3.2 → 1.3.4
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/components/data-table/column-picker.es.js +78 -0
- package/dist/components/data-table/column-picker.es.js.map +1 -0
- package/dist/components/data-table/data-table.es.js +197 -0
- package/dist/components/data-table/data-table.es.js.map +1 -0
- package/dist/components/data-table/page-size.es.js +23 -0
- package/dist/components/data-table/page-size.es.js.map +1 -0
- package/dist/components/data-table/paginator.es.js +63 -0
- package/dist/components/data-table/paginator.es.js.map +1 -0
- package/dist/components/data-table/table-actions.es.js +78 -0
- package/dist/components/data-table/table-actions.es.js.map +1 -0
- package/dist/components/data-table/table-commons.es.js +52 -0
- package/dist/components/data-table/table-commons.es.js.map +1 -0
- package/dist/components/data-table/table-content.es.js +46 -0
- package/dist/components/data-table/table-content.es.js.map +1 -0
- package/dist/components/data-table/table-utils/constants.es.js +274 -0
- package/dist/components/data-table/table-utils/constants.es.js.map +1 -0
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js +24 -0
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +1 -0
- package/dist/components/data-table/table-utils/date.es.js +12 -0
- package/dist/components/data-table/table-utils/date.es.js.map +1 -0
- package/dist/components/data-table/table-utils/link-display.es.js +21 -0
- package/dist/components/data-table/table-utils/link-display.es.js.map +1 -0
- package/dist/components/data-table/table-utils/string.es.js +19 -0
- package/dist/components/data-table/table-utils/string.es.js.map +1 -0
- package/dist/components/data-table/table-utils/types.es.js +5 -0
- package/dist/components/data-table/table-utils/types.es.js.map +1 -0
- package/dist/components/info-card/info-card.es.js +71 -0
- package/dist/components/info-card/info-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +83 -0
- package/dist/components/sidebar/app-layout.es.js.map +1 -0
- package/dist/components/sidebar/nav-main.es.js +76 -0
- package/dist/components/sidebar/nav-main.es.js.map +1 -0
- package/dist/components/sidebar/sidebar.es.js +10 -0
- package/dist/components/sidebar/sidebar.es.js.map +1 -0
- package/dist/components/static-data-table/data-table.es.js +30 -0
- package/dist/components/static-data-table/data-table.es.js.map +1 -0
- package/dist/components/ui/avatar.es.js +12 -14
- package/dist/components/ui/avatar.es.js.map +1 -1
- package/dist/components/ui/button.es.js +12 -22
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/chart.es.js +40 -51
- package/dist/components/ui/chart.es.js.map +1 -1
- package/dist/components/ui/collapsible.es.js +1 -0
- package/dist/components/ui/collapsible.es.js.map +1 -1
- package/dist/components/ui/dialog.es.js +23 -22
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +16 -48
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/form.es.js +28 -29
- package/dist/components/ui/form.es.js.map +1 -1
- package/dist/components/ui/mutli-select.es.js +195 -0
- package/dist/components/ui/mutli-select.es.js.map +1 -0
- package/dist/components/ui/password-input.es.js +9 -8
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/search-input.es.js +42 -0
- package/dist/components/ui/search-input.es.js.map +1 -0
- package/dist/components/ui/select.es.js +4 -9
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/separator.es.js +17 -18
- package/dist/components/ui/separator.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +12 -37
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +286 -264
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/sonner.es.js +3 -2
- package/dist/components/ui/sonner.es.js.map +1 -1
- package/dist/components/ui/table-page-layout.es.js +14 -0
- package/dist/components/ui/table-page-layout.es.js.map +1 -0
- package/dist/components/ui/tooltip.es.js +9 -8
- package/dist/components/ui/tooltip.es.js.map +1 -1
- package/dist/index.es.d.ts +248 -2
- package/dist/index.es.js +247 -200
- package/dist/index.es.js.map +1 -1
- package/dist/utils/index.es.js +13 -8
- package/dist/utils/index.es.js.map +1 -1
- package/package.json +13 -3
package/dist/index.es.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AccessorKeyColumnDef } from '@tanstack/react-table';
|
|
1
2
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
3
|
import { AllowInDimension } from 'recharts/types/util/types';
|
|
3
4
|
import { AnimationDuration } from 'recharts/types/util/types';
|
|
@@ -8,10 +9,14 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
8
9
|
import { ClassProp } from 'class-variance-authority/types';
|
|
9
10
|
import { ClassValue } from 'clsx';
|
|
10
11
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
12
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
13
|
+
import { components } from '@cryptlex/web-api-types';
|
|
11
14
|
import { ContentType } from 'recharts/types/component/Tooltip';
|
|
12
15
|
import { ControllerProps } from 'react-hook-form';
|
|
13
16
|
import { Coordinate } from 'recharts/types/util/types';
|
|
14
17
|
import { DayPicker } from 'react-day-picker';
|
|
18
|
+
import { default as default_2 } from 'react';
|
|
19
|
+
import { default as default_3 } from 'openapi-fetch';
|
|
15
20
|
import { DialogCloseProps } from '@radix-ui/react-dialog';
|
|
16
21
|
import { DialogContentProps } from '@radix-ui/react-dialog';
|
|
17
22
|
import { DialogDescriptionProps } from '@radix-ui/react-dialog';
|
|
@@ -32,6 +37,9 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
32
37
|
import { LucideIcon } from 'lucide-react';
|
|
33
38
|
import { NameType } from 'recharts/types/component/DefaultTooltipContent';
|
|
34
39
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
40
|
+
import { PaginationState } from '@tanstack/react-table';
|
|
41
|
+
import { ParamsOption } from 'openapi-fetch';
|
|
42
|
+
import { paths } from '@cryptlex/web-api-types';
|
|
35
43
|
import { Payload } from 'recharts/types/component/DefaultTooltipContent';
|
|
36
44
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
37
45
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -43,12 +51,14 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
43
51
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
44
52
|
import { SeparatorProps } from '@radix-ui/react-separator';
|
|
45
53
|
import { SlotProps } from '@radix-ui/react-slot';
|
|
54
|
+
import { SortingState } from '@tanstack/react-table';
|
|
46
55
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
47
56
|
import { Toaster as Toaster_2 } from 'sonner';
|
|
48
57
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
49
58
|
import { UniqueOption } from 'recharts/types/util/payload/getUniqPayload';
|
|
50
59
|
import { ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
51
60
|
import { VariantProps } from 'class-variance-authority';
|
|
61
|
+
import { VisibilityState as VisibilityState_2 } from '@tanstack/react-table';
|
|
52
62
|
|
|
53
63
|
export declare const Accordion: React_2.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React_2.RefAttributes<HTMLDivElement>>;
|
|
54
64
|
|
|
@@ -58,6 +68,17 @@ export declare const AccordionItem: React_2.ForwardRefExoticComponent<Omit<Accor
|
|
|
58
68
|
|
|
59
69
|
export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
60
70
|
|
|
71
|
+
export declare function AppLayout({ data, user }: AppLayoutProps): JSX_2.Element;
|
|
72
|
+
|
|
73
|
+
export declare interface AppLayoutProps {
|
|
74
|
+
data: NavItem[];
|
|
75
|
+
user?: {
|
|
76
|
+
firstName?: string;
|
|
77
|
+
lastName?: string;
|
|
78
|
+
logoUrl?: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
61
82
|
export declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
62
83
|
|
|
63
84
|
export declare const AvatarFallback: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -188,8 +209,12 @@ export declare const ChartTooltipContent: React_2.ForwardRefExoticComponent<Omit
|
|
|
188
209
|
labelKey?: string;
|
|
189
210
|
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
190
211
|
|
|
212
|
+
export declare const CHECK_BOX: AccessorKeyColumnDef<any, any>[];
|
|
213
|
+
|
|
191
214
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
192
215
|
|
|
216
|
+
declare type Client = ReturnType<typeof default_3<paths>>;
|
|
217
|
+
|
|
193
218
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
194
219
|
|
|
195
220
|
export declare const Collapsible: ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -287,6 +312,50 @@ export declare const CommandShortcut: {
|
|
|
287
312
|
displayName: string;
|
|
288
313
|
};
|
|
289
314
|
|
|
315
|
+
export declare const COMPARISON_OPERATOR_LABELS: Record<FilterComparisonOperator, string>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Converts a string from 'camelCase' to 'Title Case'
|
|
319
|
+
* @param string String to convert to `Title Case`
|
|
320
|
+
*/
|
|
321
|
+
export declare function convertCamelCaseToTitleCase(string: string): string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
*
|
|
325
|
+
* @param input camelCase
|
|
326
|
+
* @returns title case for the camelCase string
|
|
327
|
+
*/
|
|
328
|
+
export declare function convertToTitleCase(input: string): string;
|
|
329
|
+
|
|
330
|
+
export declare function createTableFetchFn<_any, Return>(ctxclient: Client, path: GetPaths, params?: ParamsOption<any>): TableFetchFn<Return>;
|
|
331
|
+
|
|
332
|
+
export declare type CtxPortals = 'customer-portal' | 'system-portal' | 'reseller-portal' | 'admin-portal';
|
|
333
|
+
|
|
334
|
+
/** Application Names */
|
|
335
|
+
export declare type CtxProjectName = 'admin-portal' | 'customer-portal' | 'internal-portal' | 'reseller-portal';
|
|
336
|
+
|
|
337
|
+
export declare function DataTable<TData extends Record<string, any>, TValue = any>({ columns, fetchFn, tableName, tableActions, columnsToHideByDefault, }: DataTableProps<TData, TValue>): JSX_2.Element;
|
|
338
|
+
|
|
339
|
+
export declare interface DataTableProps<TData, TValue = any> {
|
|
340
|
+
columns: ColumnDef<TData, TValue>[];
|
|
341
|
+
tableName: string;
|
|
342
|
+
fetchFn: TableFetchFn<TData>;
|
|
343
|
+
tableActions: TableActions;
|
|
344
|
+
filterableFields: FilterableProperties;
|
|
345
|
+
columnsToHideByDefault: VisibilityState_2;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export declare const DEFAULT_DATE_COLUMNS: AccessorKeyColumnDef<any, any>[];
|
|
349
|
+
|
|
350
|
+
export declare const DEFAULT_FILTERABLE_FIELDS: FilterableProperties;
|
|
351
|
+
|
|
352
|
+
/*** Type for hide some of the columns based on the dto of the particular page
|
|
353
|
+
** `id`, `updatedAt` are by default hidden
|
|
354
|
+
*/
|
|
355
|
+
export declare type DefaultVisibilityState<T> = {
|
|
356
|
+
[K in keyof T]?: boolean;
|
|
357
|
+
};
|
|
358
|
+
|
|
290
359
|
export declare const Dialog: React_2.FC<DialogPrimitive.DialogProps>;
|
|
291
360
|
|
|
292
361
|
export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -313,6 +382,13 @@ export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogP
|
|
|
313
382
|
|
|
314
383
|
export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
315
384
|
|
|
385
|
+
export declare type DisplayField = {
|
|
386
|
+
display: string;
|
|
387
|
+
accessor: string;
|
|
388
|
+
type?: 'text' | 'badge' | 'boolean';
|
|
389
|
+
transform?: (value: any) => React.ReactNode;
|
|
390
|
+
};
|
|
391
|
+
|
|
316
392
|
export declare const Drawer: {
|
|
317
393
|
({ shouldScaleBackground, ...props }: React_2.ComponentProps<typeof Drawer_2.Root>): JSX_2.Element;
|
|
318
394
|
displayName: string;
|
|
@@ -381,8 +457,33 @@ export declare const DropdownMenuSubTrigger: React_2.ForwardRefExoticComponent<O
|
|
|
381
457
|
|
|
382
458
|
export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
383
459
|
|
|
460
|
+
export declare enum DYNAMIC_INPUT_TARGET {
|
|
461
|
+
USER = 0,
|
|
462
|
+
ORGANIZATION = 1,
|
|
463
|
+
RESELLER = 2
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export declare type fieldsToDisplay = {
|
|
467
|
+
display: string;
|
|
468
|
+
accessor: string;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export declare const FILTER_COMPARISON_OPERATORS: readonly ["eq", "ne", "cn", "nc", "sw", "ew", "in", "nin", "gt", "gte", "lt", "lte"];
|
|
472
|
+
|
|
473
|
+
export declare const FILTERABLE_PROPERTY_TYPES: readonly ["objectString", "string", "number", "objectNumber", "boolean", "objectDate", "licenseType", "product", "product-version", "user", "webhook", "automated-email", "organization", "country", "tag", "resource", "resourceId", "reseller", "role"];
|
|
474
|
+
|
|
475
|
+
export declare type FilterableProperties = {
|
|
476
|
+
[filterProperty: string]: FilterablePropertyType;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export declare type FilterablePropertyType = (typeof FILTERABLE_PROPERTY_TYPES)[number];
|
|
480
|
+
|
|
481
|
+
export declare type FilterComparisonOperator = (typeof FILTER_COMPARISON_OPERATORS)[number];
|
|
482
|
+
|
|
384
483
|
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
|
|
385
484
|
|
|
485
|
+
export declare function FormatDate(date: string | null | undefined): string | null;
|
|
486
|
+
|
|
386
487
|
export declare const FormControl: React_2.ForwardRefExoticComponent<Omit<SlotProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
387
488
|
|
|
388
489
|
export declare const FormDescription: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -395,12 +496,49 @@ export declare const FormLabel: React_2.ForwardRefExoticComponent<Omit<LabelPrim
|
|
|
395
496
|
|
|
396
497
|
export declare const FormMessage: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
397
498
|
|
|
499
|
+
/**
|
|
500
|
+
* Format multiple license parameters (expired, suspended, revoked) into a single status
|
|
501
|
+
*/
|
|
502
|
+
export declare function getLicenseStatus(license: any): string;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* This helps in passing the state data from one page to another, showing different text for a link
|
|
506
|
+
* @param display String that needs to be displayed
|
|
507
|
+
* @param url actual url for the a tag
|
|
508
|
+
* @param stateData data to be passed to the next page
|
|
509
|
+
* @returns
|
|
510
|
+
*/
|
|
511
|
+
export declare function getLinkDisplay(display: string, url: string, stateData?: any): JSX_2.Element;
|
|
512
|
+
|
|
513
|
+
declare type GetPaths = {
|
|
514
|
+
[P in keyof paths]: paths[P] extends {
|
|
515
|
+
get: any;
|
|
516
|
+
} ? P : never;
|
|
517
|
+
}[keyof paths];
|
|
518
|
+
|
|
519
|
+
export declare function getResourceDisplayName(resourceName: string, portal: CtxProjectName): string;
|
|
520
|
+
|
|
398
521
|
/**
|
|
399
522
|
*
|
|
400
523
|
* @returns
|
|
401
524
|
*/
|
|
402
525
|
export declare function getThemeHue(): string;
|
|
403
526
|
|
|
527
|
+
export declare function getValidityDisplay(validity: number | undefined): string;
|
|
528
|
+
|
|
529
|
+
export declare function getValueFromData(data: any, accessor: string | number | symbol): any;
|
|
530
|
+
|
|
531
|
+
export declare const ID_COLUMN: AccessorKeyColumnDef<any, any>[];
|
|
532
|
+
|
|
533
|
+
export declare const InfoCard: React.FC<InfoCardProps>;
|
|
534
|
+
|
|
535
|
+
export declare interface InfoCardProps {
|
|
536
|
+
data: Record<string, any>;
|
|
537
|
+
label: string;
|
|
538
|
+
fields: DisplayField[];
|
|
539
|
+
className?: string;
|
|
540
|
+
}
|
|
541
|
+
|
|
404
542
|
export declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
405
543
|
|
|
406
544
|
export declare const InputOTP: React_2.ForwardRefExoticComponent<(Omit<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
@@ -442,6 +580,23 @@ export declare const InputOTPSlot: React_2.ForwardRefExoticComponent<Omit<React_
|
|
|
442
580
|
export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
443
581
|
}
|
|
444
582
|
|
|
583
|
+
export declare type JwtDecode = {
|
|
584
|
+
aud: string;
|
|
585
|
+
email: string;
|
|
586
|
+
exp: number;
|
|
587
|
+
iat: number;
|
|
588
|
+
jti: string;
|
|
589
|
+
region: string;
|
|
590
|
+
role: string;
|
|
591
|
+
role_type: string;
|
|
592
|
+
scope: string[];
|
|
593
|
+
sub: string;
|
|
594
|
+
teat: number;
|
|
595
|
+
tenantid: string;
|
|
596
|
+
token_usage: string;
|
|
597
|
+
sadmin?: string;
|
|
598
|
+
};
|
|
599
|
+
|
|
445
600
|
export declare const Label: React_2.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React_2.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ClassProp | undefined) => string> & React_2.RefAttributes<HTMLLabelElement>>;
|
|
446
601
|
|
|
447
602
|
export declare function Loader({ className }: LoaderProps): JSX_2.Element;
|
|
@@ -450,6 +605,10 @@ declare interface LoaderProps {
|
|
|
450
605
|
className?: string;
|
|
451
606
|
}
|
|
452
607
|
|
|
608
|
+
export declare function logout(): void;
|
|
609
|
+
|
|
610
|
+
export declare type MetadataDto = components['schemas']['MetadataDto'];
|
|
611
|
+
|
|
453
612
|
export declare const NavigationMenu: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
454
613
|
|
|
455
614
|
export declare const NavigationMenuContent: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -470,6 +629,27 @@ export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined)
|
|
|
470
629
|
|
|
471
630
|
export declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
472
631
|
|
|
632
|
+
export declare type NavItem = {
|
|
633
|
+
path: string;
|
|
634
|
+
label: string;
|
|
635
|
+
display: boolean;
|
|
636
|
+
icon: LucideIcon;
|
|
637
|
+
chidren?: {
|
|
638
|
+
path: string;
|
|
639
|
+
label: string;
|
|
640
|
+
icon: LucideIcon;
|
|
641
|
+
display: boolean;
|
|
642
|
+
}[];
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
export declare function NavMain({ items }: {
|
|
646
|
+
items: NavItem[];
|
|
647
|
+
}): JSX_2.Element;
|
|
648
|
+
|
|
649
|
+
export declare const OPERATORS_FOR_FILTER_TYPE: OperatorsForFilterType;
|
|
650
|
+
|
|
651
|
+
export declare type OperatorsForFilterType = Record<FilterablePropertyType, FilterComparisonOperator[]>;
|
|
652
|
+
|
|
473
653
|
export declare const Pagination: {
|
|
474
654
|
({ className, ...props }: React_2.ComponentProps<"nav">): JSX_2.Element;
|
|
475
655
|
displayName: string;
|
|
@@ -505,6 +685,8 @@ export declare const PaginationPrevious: {
|
|
|
505
685
|
|
|
506
686
|
export declare const PasswordInput: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
507
687
|
|
|
688
|
+
export declare function pluralizeTimes(resourceName: string, count: number): string;
|
|
689
|
+
|
|
508
690
|
export declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
|
|
509
691
|
|
|
510
692
|
export declare const PopoverAnchor: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -517,6 +699,21 @@ export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<RadioGro
|
|
|
517
699
|
|
|
518
700
|
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
519
701
|
|
|
702
|
+
export declare const RESOURCE_DEFINITIONS: Record<ResourceName, string>;
|
|
703
|
+
|
|
704
|
+
/** Resource Name should ALWAYS be in singular form */
|
|
705
|
+
export declare const RESOURCE_NAMES: readonly ["access-token", "account", "activation", "activation-log", "admin-role", "audit-log", "automated-email", "automated-email-event-log", "card", "feature-flag", "invoice", "license", "license-template", "maintenance-policy", "organization", "plan", "product", "product-version", "profile", "release", "release-channel", "release-file", "release-platform", "report", "role", "role-claim", "saml-configuration", "segment", "sending-domain", "setting", "tag", "team-member", "trial", "trial-policy", "user", "user-group", "webhook", "webhook-event-log", "webhook-trigger", "reseller", "oidc-configuration", "organization-claim", "reseller-claim"];
|
|
706
|
+
|
|
707
|
+
export declare type ResourceName = (typeof RESOURCE_NAMES)[number];
|
|
708
|
+
|
|
709
|
+
export declare const SearchInput: default_2.FC<SearchInputProps>;
|
|
710
|
+
|
|
711
|
+
declare interface SearchInputProps extends Omit<InputProps, 'onChange'> {
|
|
712
|
+
onChange?: (value: string) => void;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export declare function secondsToDuration(seconds: number): string;
|
|
716
|
+
|
|
520
717
|
export declare const Select: React_2.FC<SelectPrimitive.SelectProps>;
|
|
521
718
|
|
|
522
719
|
export declare const SelectContent: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -574,9 +771,11 @@ export declare const SheetTitle: React_2.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
574
771
|
export declare const SheetTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
575
772
|
|
|
576
773
|
declare const sheetVariants: (props?: ({
|
|
577
|
-
side?: "top" | "bottom" | "
|
|
774
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
578
775
|
} & ClassProp) | undefined) => string;
|
|
579
776
|
|
|
777
|
+
export declare function SideBar({ data, ...props }: SidebarProps): JSX_2.Element;
|
|
778
|
+
|
|
580
779
|
export declare const Sidebar: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & {
|
|
581
780
|
side?: "left" | "right";
|
|
582
781
|
variant?: "sidebar" | "floating" | "inset";
|
|
@@ -586,7 +785,7 @@ export declare const Sidebar: React_2.ForwardRefExoticComponent<Omit<React_2.Cla
|
|
|
586
785
|
export declare const SidebarContent: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
587
786
|
|
|
588
787
|
declare type SidebarContext = {
|
|
589
|
-
state:
|
|
788
|
+
state: 'expanded' | 'collapsed';
|
|
590
789
|
open: boolean;
|
|
591
790
|
setOpen: (open: boolean) => void;
|
|
592
791
|
openMobile: boolean;
|
|
@@ -651,6 +850,10 @@ export declare const SidebarMenuSubButton: React_2.ForwardRefExoticComponent<Omi
|
|
|
651
850
|
|
|
652
851
|
export declare const SidebarMenuSubItem: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React_2.RefAttributes<HTMLLIElement>>;
|
|
653
852
|
|
|
853
|
+
declare interface SidebarProps extends React_2.ComponentProps<typeof Sidebar> {
|
|
854
|
+
data: NavItem[];
|
|
855
|
+
}
|
|
856
|
+
|
|
654
857
|
export declare const SidebarProvider: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & {
|
|
655
858
|
defaultOpen?: boolean;
|
|
656
859
|
open?: boolean;
|
|
@@ -665,20 +868,59 @@ export declare const SidebarTrigger: React_2.ForwardRefExoticComponent<Omit<Butt
|
|
|
665
868
|
|
|
666
869
|
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|
|
667
870
|
|
|
871
|
+
export declare function StaticDataTable<T>({ accessors, data, affectedData }: StaticDataTableProps<T>): JSX_2.Element;
|
|
872
|
+
|
|
873
|
+
export declare interface StaticDataTableProps<T> {
|
|
874
|
+
accessors: (keyof T)[];
|
|
875
|
+
data: T[];
|
|
876
|
+
affectedData?: T[];
|
|
877
|
+
}
|
|
878
|
+
|
|
668
879
|
export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
|
|
669
880
|
|
|
881
|
+
export declare type TableActions = {
|
|
882
|
+
/** True if reading this resource is allowed. */
|
|
883
|
+
read: boolean;
|
|
884
|
+
/** True if creation of resource from dashboard is allowed. */
|
|
885
|
+
create: boolean;
|
|
886
|
+
/** True if the resource can be updated */
|
|
887
|
+
update: boolean;
|
|
888
|
+
/** True if the resource can be deleted */
|
|
889
|
+
delete: boolean;
|
|
890
|
+
/** True if the resource can be exported */
|
|
891
|
+
export: boolean;
|
|
892
|
+
/** True if the resource can be linked to tags. */
|
|
893
|
+
tag: boolean;
|
|
894
|
+
/** True if searching is supported. Search is defined by the `query` QueryParameter in the Web API */
|
|
895
|
+
search: boolean;
|
|
896
|
+
/** True if selection using checkboxes is allowed */
|
|
897
|
+
selection: boolean;
|
|
898
|
+
/** True if the resource has support for segments */
|
|
899
|
+
segments: boolean;
|
|
900
|
+
};
|
|
901
|
+
|
|
670
902
|
export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
671
903
|
|
|
672
904
|
export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & React_2.RefAttributes<HTMLTableCaptionElement>>;
|
|
673
905
|
|
|
674
906
|
export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
675
907
|
|
|
908
|
+
export declare type TableFetchFn<TData> = (p: PaginationState, s: SortingState, q: string, f: any) => Promise<{
|
|
909
|
+
total: number;
|
|
910
|
+
data: TData[] | undefined;
|
|
911
|
+
}>;
|
|
912
|
+
|
|
676
913
|
export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
677
914
|
|
|
678
915
|
export declare const TableHead: React_2.ForwardRefExoticComponent<React_2.ThHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
679
916
|
|
|
680
917
|
export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
681
918
|
|
|
919
|
+
export declare function TablePageLayout({ resourceName, children, }: {
|
|
920
|
+
resourceName: string;
|
|
921
|
+
children?: React.ReactNode;
|
|
922
|
+
}): JSX_2.Element;
|
|
923
|
+
|
|
682
924
|
export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & React_2.RefAttributes<HTMLTableRowElement>>;
|
|
683
925
|
|
|
684
926
|
export declare const Tabs: React_2.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -723,4 +965,8 @@ export declare function useIsMobile(): boolean;
|
|
|
723
965
|
|
|
724
966
|
export declare function useSidebar(): SidebarContext;
|
|
725
967
|
|
|
968
|
+
export declare type VisibilityState<T> = {
|
|
969
|
+
[K in keyof T]?: boolean;
|
|
970
|
+
};
|
|
971
|
+
|
|
726
972
|
export { }
|