@cryptlex/web-components 1.3.1 → 1.3.3
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 +81 -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 +82 -0
- package/dist/components/data-table/table-actions.es.js.map +1 -0
- package/dist/components/data-table/table-commons.es.js +55 -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 +25 -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/fetch.es.js +40 -0
- package/dist/components/data-table/table-utils/fetch.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 +74 -0
- package/dist/components/info-card/info-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +86 -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/button.es.js +18 -28
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/calendar.es.js +51 -53
- package/dist/components/ui/calendar.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +13 -12
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dynamic-input.es.js +141 -0
- package/dist/components/ui/dynamic-input.es.js.map +1 -0
- package/dist/components/ui/input-otp.es.js +16 -16
- package/dist/components/ui/input-otp.es.js.map +1 -1
- package/dist/components/ui/mutli-select.es.js +197 -0
- package/dist/components/ui/mutli-select.es.js.map +1 -0
- package/dist/components/ui/search-input.es.js +41 -0
- package/dist/components/ui/search-input.es.js.map +1 -0
- package/dist/components/ui/sheet.es.js +11 -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/table-page-layout.es.js +14 -0
- package/dist/components/ui/table-page-layout.es.js.map +1 -0
- package/dist/components/ui/table.es.js +62 -54
- package/dist/components/ui/table.es.js.map +1 -1
- package/dist/index.es.d.ts +305 -14
- package/dist/index.es.js +264 -208
- 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 +10 -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';
|
|
@@ -7,11 +8,15 @@ import { CartesianViewBox } from 'recharts/types/util/types';
|
|
|
7
8
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
9
|
import { ClassProp } from 'class-variance-authority/types';
|
|
9
10
|
import { ClassValue } from 'clsx';
|
|
11
|
+
import { ClientMethod } from 'openapi-fetch';
|
|
10
12
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
13
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
14
|
+
import { components } from '@cryptlex/web-api-types';
|
|
11
15
|
import { ContentType } from 'recharts/types/component/Tooltip';
|
|
12
16
|
import { ControllerProps } from 'react-hook-form';
|
|
13
17
|
import { Coordinate } from 'recharts/types/util/types';
|
|
14
18
|
import { DayPicker } from 'react-day-picker';
|
|
19
|
+
import { default as default_2 } from 'react';
|
|
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';
|
|
@@ -30,11 +35,14 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
30
35
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
31
36
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
32
37
|
import { LucideIcon } from 'lucide-react';
|
|
38
|
+
import { Middleware } from 'openapi-fetch';
|
|
33
39
|
import { NameType } from 'recharts/types/component/DefaultTooltipContent';
|
|
34
40
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
41
|
+
import { PaginationState } from '@tanstack/react-table';
|
|
42
|
+
import { ParamsOption } from 'openapi-fetch';
|
|
43
|
+
import { paths } from '@cryptlex/web-api-types';
|
|
35
44
|
import { Payload } from 'recharts/types/component/DefaultTooltipContent';
|
|
36
45
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
37
|
-
import { Portal } from 'vaul';
|
|
38
46
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
39
47
|
import * as React_2 from 'react';
|
|
40
48
|
import * as RechartsPrimitive from 'recharts';
|
|
@@ -44,12 +52,14 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
44
52
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
45
53
|
import { SeparatorProps } from '@radix-ui/react-separator';
|
|
46
54
|
import { SlotProps } from '@radix-ui/react-slot';
|
|
55
|
+
import { SortingState } from '@tanstack/react-table';
|
|
47
56
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
48
57
|
import { Toaster as Toaster_2 } from 'sonner';
|
|
49
58
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
50
59
|
import { UniqueOption } from 'recharts/types/util/payload/getUniqPayload';
|
|
51
60
|
import { ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
52
61
|
import { VariantProps } from 'class-variance-authority';
|
|
62
|
+
import { VisibilityState as VisibilityState_2 } from '@tanstack/react-table';
|
|
53
63
|
|
|
54
64
|
export declare const Accordion: React_2.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React_2.RefAttributes<HTMLDivElement>>;
|
|
55
65
|
|
|
@@ -59,6 +69,19 @@ export declare const AccordionItem: React_2.ForwardRefExoticComponent<Omit<Accor
|
|
|
59
69
|
|
|
60
70
|
export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
61
71
|
|
|
72
|
+
export declare const ActionTriggerButton: () => JSX_2.Element;
|
|
73
|
+
|
|
74
|
+
export declare function AppLayout({ data, user }: AppLayoutProps): JSX_2.Element;
|
|
75
|
+
|
|
76
|
+
export declare interface AppLayoutProps {
|
|
77
|
+
data: NavItem[];
|
|
78
|
+
user?: {
|
|
79
|
+
firstName?: string;
|
|
80
|
+
lastName?: string;
|
|
81
|
+
logoUrl?: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
62
85
|
export declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
63
86
|
|
|
64
87
|
export declare const AvatarFallback: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -111,11 +134,7 @@ export declare const buttonVariants: (props?: ({
|
|
|
111
134
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
112
135
|
} & ClassProp) | undefined) => string;
|
|
113
136
|
|
|
114
|
-
export declare
|
|
115
|
-
|
|
116
|
-
export declare namespace Calendar {
|
|
117
|
-
var displayName: string;
|
|
118
|
-
}
|
|
137
|
+
export declare const Calendar: React_2.FC<CalendarProps>;
|
|
119
138
|
|
|
120
139
|
export declare type CalendarProps = React_2.ComponentProps<typeof DayPicker>;
|
|
121
140
|
|
|
@@ -193,6 +212,8 @@ export declare const ChartTooltipContent: React_2.ForwardRefExoticComponent<Omit
|
|
|
193
212
|
labelKey?: string;
|
|
194
213
|
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
195
214
|
|
|
215
|
+
export declare const CHECK_BOX: AccessorKeyColumnDef<any, any>[];
|
|
216
|
+
|
|
196
217
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
197
218
|
|
|
198
219
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -292,6 +313,61 @@ export declare const CommandShortcut: {
|
|
|
292
313
|
displayName: string;
|
|
293
314
|
};
|
|
294
315
|
|
|
316
|
+
export declare const COMPARISON_OPERATOR_LABELS: Record<FilterComparisonOperator, string>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Converts a string from 'camelCase' to 'Title Case'
|
|
320
|
+
* @param string String to convert to `Title Case`
|
|
321
|
+
*/
|
|
322
|
+
export declare function convertCamelCaseToTitleCase(string: string): string;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
*
|
|
326
|
+
* @param input camelCase
|
|
327
|
+
* @returns title case for the camelCase string
|
|
328
|
+
*/
|
|
329
|
+
export declare function convertToTitleCase(input: string): string;
|
|
330
|
+
|
|
331
|
+
export declare function createTableFetchFn<_any, Return>(path: Parameters<typeof ctxClient.GET>[0], params: ParamsOption<any>): TableFetchFn<Return>;
|
|
332
|
+
|
|
333
|
+
export declare const ctxClient: {
|
|
334
|
+
GET: ClientMethod<paths, "get", `${string}/${string}`>;
|
|
335
|
+
PUT: ClientMethod<paths, "put", `${string}/${string}`>;
|
|
336
|
+
POST: ClientMethod<paths, "post", `${string}/${string}`>;
|
|
337
|
+
DELETE: ClientMethod<paths, "delete", `${string}/${string}`>;
|
|
338
|
+
OPTIONS: ClientMethod<paths, "options", `${string}/${string}`>;
|
|
339
|
+
HEAD: ClientMethod<paths, "head", `${string}/${string}`>;
|
|
340
|
+
PATCH: ClientMethod<paths, "patch", `${string}/${string}`>;
|
|
341
|
+
TRACE: ClientMethod<paths, "trace", `${string}/${string}`>;
|
|
342
|
+
use(...middleware: Middleware[]): void;
|
|
343
|
+
eject(...middleware: Middleware[]): void;
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
/** Application Names */
|
|
347
|
+
export declare type CtxProjectName = 'admin-portal' | 'customer-portal' | 'internal-portal' | 'reseller-portal';
|
|
348
|
+
|
|
349
|
+
export declare function DataTable<TData extends Record<string, any>, TValue = any>({ columns, fetchFn, tableName, tableActions, columnsToHideByDefault, }: DataTableProps<TData, TValue>): JSX_2.Element;
|
|
350
|
+
|
|
351
|
+
export declare interface DataTableProps<TData, TValue = any> {
|
|
352
|
+
columns: ColumnDef<TData, TValue>[];
|
|
353
|
+
tableName: string;
|
|
354
|
+
fetchFn: TableFetchFn<TData>;
|
|
355
|
+
tableActions: TableActions;
|
|
356
|
+
filterableFields: FilterableProperties;
|
|
357
|
+
columnsToHideByDefault: VisibilityState_2;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export declare const DEFAULT_DATE_COLUMNS: AccessorKeyColumnDef<any, any>[];
|
|
361
|
+
|
|
362
|
+
export declare const DEFAULT_FILTERABLE_FIELDS: FilterableProperties;
|
|
363
|
+
|
|
364
|
+
/*** Type for hide some of the columns based on the dto of the particular page
|
|
365
|
+
** `id`, `updatedAt` are by default hidden
|
|
366
|
+
*/
|
|
367
|
+
export declare type DefaultVisibilityState<T> = {
|
|
368
|
+
[K in keyof T]?: boolean;
|
|
369
|
+
};
|
|
370
|
+
|
|
295
371
|
export declare const Dialog: React_2.FC<DialogPrimitive.DialogProps>;
|
|
296
372
|
|
|
297
373
|
export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -318,6 +394,13 @@ export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogP
|
|
|
318
394
|
|
|
319
395
|
export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
320
396
|
|
|
397
|
+
export declare type DisplayField = {
|
|
398
|
+
display: string;
|
|
399
|
+
accessor: string;
|
|
400
|
+
type?: 'text' | 'badge' | 'boolean';
|
|
401
|
+
transform?: (value: any) => React.ReactNode;
|
|
402
|
+
};
|
|
403
|
+
|
|
321
404
|
export declare const Drawer: {
|
|
322
405
|
({ shouldScaleBackground, ...props }: React_2.ComponentProps<typeof Drawer_2.Root>): JSX_2.Element;
|
|
323
406
|
displayName: string;
|
|
@@ -341,7 +424,7 @@ export declare const DrawerHeader: {
|
|
|
341
424
|
|
|
342
425
|
export declare const DrawerOverlay: React_2.ForwardRefExoticComponent<Omit<Omit<DialogOverlayProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
343
426
|
|
|
344
|
-
export declare const DrawerPortal: Portal
|
|
427
|
+
export declare const DrawerPortal: React_2.FC<React_2.ComponentProps<typeof Drawer_2.Portal>>;
|
|
345
428
|
|
|
346
429
|
export declare const DrawerTitle: React_2.ForwardRefExoticComponent<Omit<DialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
|
|
347
430
|
|
|
@@ -386,8 +469,57 @@ export declare const DropdownMenuSubTrigger: React_2.ForwardRefExoticComponent<O
|
|
|
386
469
|
|
|
387
470
|
export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
388
471
|
|
|
472
|
+
export declare enum DYNAMIC_INPUT_TARGET {
|
|
473
|
+
USER = 0,
|
|
474
|
+
ORGANIZATION = 1,
|
|
475
|
+
RESELLER = 2
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export declare function DynamicInput({ onChange, target, placeholder }: DynamicInputProps): JSX_2.Element;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
*
|
|
482
|
+
* @param onChange
|
|
483
|
+
* @param target fthis is used to make the component generic and reusble for differnt use cases
|
|
484
|
+
* @param placeholder placeholder to be showing in the input for searching
|
|
485
|
+
* @returns return id of the seleced value, can be customized to return full selected value
|
|
486
|
+
*/
|
|
487
|
+
declare interface DynamicInputProps {
|
|
488
|
+
onChange: (id: any) => void;
|
|
489
|
+
target: DYNAMIC_INPUT_TARGET;
|
|
490
|
+
placeholder: string;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
*
|
|
495
|
+
* @param url
|
|
496
|
+
* @param method
|
|
497
|
+
* @param body
|
|
498
|
+
* @returns
|
|
499
|
+
*/
|
|
500
|
+
export declare const fetchClient: (url: string, method: Methods, body?: any) => Promise<any>;
|
|
501
|
+
|
|
502
|
+
export declare type fieldsToDisplay = {
|
|
503
|
+
display: string;
|
|
504
|
+
accessor: string;
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
export declare const FILTER_COMPARISON_OPERATORS: readonly ["eq", "ne", "cn", "nc", "sw", "ew", "in", "nin", "gt", "gte", "lt", "lte"];
|
|
508
|
+
|
|
509
|
+
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"];
|
|
510
|
+
|
|
511
|
+
export declare type FilterableProperties = {
|
|
512
|
+
[filterProperty: string]: FilterablePropertyType;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
export declare type FilterablePropertyType = (typeof FILTERABLE_PROPERTY_TYPES)[number];
|
|
516
|
+
|
|
517
|
+
export declare type FilterComparisonOperator = (typeof FILTER_COMPARISON_OPERATORS)[number];
|
|
518
|
+
|
|
389
519
|
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
|
|
390
520
|
|
|
521
|
+
export declare function FormatDate(date: string | null | undefined): string | null;
|
|
522
|
+
|
|
391
523
|
export declare const FormControl: React_2.ForwardRefExoticComponent<Omit<SlotProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
392
524
|
|
|
393
525
|
export declare const FormDescription: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -400,12 +532,45 @@ export declare const FormLabel: React_2.ForwardRefExoticComponent<Omit<LabelPrim
|
|
|
400
532
|
|
|
401
533
|
export declare const FormMessage: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
402
534
|
|
|
535
|
+
export declare function getAccessToken(): string | null;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Format multiple license parameters (expired, suspended, revoked) into a single status
|
|
539
|
+
*/
|
|
540
|
+
export declare function getLicenseStatus(license: any): string;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* This helps in passing the state data from one page to another, showing different text for a link
|
|
544
|
+
* @param display String that needs to be displayed
|
|
545
|
+
* @param url actual url for the a tag
|
|
546
|
+
* @param stateData data to be passed to the next page
|
|
547
|
+
* @returns
|
|
548
|
+
*/
|
|
549
|
+
export declare function getLinkDisplay(display: string, url: string, stateData?: any): JSX_2.Element;
|
|
550
|
+
|
|
551
|
+
export declare function getResourceDisplayName(resourceName: string, portal: CtxProjectName): string;
|
|
552
|
+
|
|
403
553
|
/**
|
|
404
554
|
*
|
|
405
555
|
* @returns
|
|
406
556
|
*/
|
|
407
557
|
export declare function getThemeHue(): string;
|
|
408
558
|
|
|
559
|
+
export declare function getValidityDisplay(validity: number | undefined): string;
|
|
560
|
+
|
|
561
|
+
export declare function getValueFromData(data: any, accessor: string | number | symbol): any;
|
|
562
|
+
|
|
563
|
+
export declare const ID_COLUMN: AccessorKeyColumnDef<any, any>[];
|
|
564
|
+
|
|
565
|
+
export declare const InfoCard: React.FC<InfoCardProps>;
|
|
566
|
+
|
|
567
|
+
export declare interface InfoCardProps {
|
|
568
|
+
data: Record<string, any>;
|
|
569
|
+
label: string;
|
|
570
|
+
fields: DisplayField[];
|
|
571
|
+
className?: string;
|
|
572
|
+
}
|
|
573
|
+
|
|
409
574
|
export declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
410
575
|
|
|
411
576
|
export declare const InputOTP: React_2.ForwardRefExoticComponent<(Omit<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
@@ -447,6 +612,23 @@ export declare const InputOTPSlot: React_2.ForwardRefExoticComponent<Omit<React_
|
|
|
447
612
|
export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
448
613
|
}
|
|
449
614
|
|
|
615
|
+
export declare type JwtDecode = {
|
|
616
|
+
aud: string;
|
|
617
|
+
email: string;
|
|
618
|
+
exp: number;
|
|
619
|
+
iat: number;
|
|
620
|
+
jti: string;
|
|
621
|
+
region: string;
|
|
622
|
+
role: string;
|
|
623
|
+
role_type: string;
|
|
624
|
+
scope: string[];
|
|
625
|
+
sub: string;
|
|
626
|
+
teat: number;
|
|
627
|
+
tenantid: string;
|
|
628
|
+
token_usage: string;
|
|
629
|
+
sadmin?: string;
|
|
630
|
+
};
|
|
631
|
+
|
|
450
632
|
export declare const Label: React_2.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React_2.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ClassProp | undefined) => string> & React_2.RefAttributes<HTMLLabelElement>>;
|
|
451
633
|
|
|
452
634
|
export declare function Loader({ className }: LoaderProps): JSX_2.Element;
|
|
@@ -455,6 +637,12 @@ declare interface LoaderProps {
|
|
|
455
637
|
className?: string;
|
|
456
638
|
}
|
|
457
639
|
|
|
640
|
+
export declare function logout(): void;
|
|
641
|
+
|
|
642
|
+
export declare type MetadataDto = components['schemas']['MetadataDto'];
|
|
643
|
+
|
|
644
|
+
declare type Methods = 'GET' | 'POST' | 'PATCH' | 'PUT';
|
|
645
|
+
|
|
458
646
|
export declare const NavigationMenu: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
459
647
|
|
|
460
648
|
export declare const NavigationMenuContent: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -475,6 +663,29 @@ export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined)
|
|
|
475
663
|
|
|
476
664
|
export declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
477
665
|
|
|
666
|
+
export declare type NavItem = {
|
|
667
|
+
path: string;
|
|
668
|
+
label: string;
|
|
669
|
+
display: boolean;
|
|
670
|
+
icon: LucideIcon;
|
|
671
|
+
chidren?: {
|
|
672
|
+
path: string;
|
|
673
|
+
label: string;
|
|
674
|
+
icon: LucideIcon;
|
|
675
|
+
display: boolean;
|
|
676
|
+
}[];
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
export declare function NavMain({ items }: {
|
|
680
|
+
items: NavItem[];
|
|
681
|
+
}): JSX_2.Element;
|
|
682
|
+
|
|
683
|
+
export declare const OPERATORS_FOR_FILTER_TYPE: OperatorsForFilterType;
|
|
684
|
+
|
|
685
|
+
export declare type OperatorsForFilterType = Record<FilterablePropertyType, FilterComparisonOperator[]>;
|
|
686
|
+
|
|
687
|
+
declare type OrganizationDto = components['schemas']['OrganizationDto'];
|
|
688
|
+
|
|
478
689
|
export declare const Pagination: {
|
|
479
690
|
({ className, ...props }: React_2.ComponentProps<"nav">): JSX_2.Element;
|
|
480
691
|
displayName: string;
|
|
@@ -510,6 +721,8 @@ export declare const PaginationPrevious: {
|
|
|
510
721
|
|
|
511
722
|
export declare const PasswordInput: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
512
723
|
|
|
724
|
+
export declare function pluralizeTimes(resourceName: string, count: number): string;
|
|
725
|
+
|
|
513
726
|
export declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
|
|
514
727
|
|
|
515
728
|
export declare const PopoverAnchor: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -518,10 +731,38 @@ export declare const PopoverContent: React_2.ForwardRefExoticComponent<Omit<Popo
|
|
|
518
731
|
|
|
519
732
|
export declare const PopoverTrigger: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
520
733
|
|
|
734
|
+
export declare type Portals = 'customer-portal' | 'system-portal' | 'reseller-portal' | 'admin-portal';
|
|
735
|
+
|
|
521
736
|
export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
522
737
|
|
|
523
738
|
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
524
739
|
|
|
740
|
+
declare type ResellerDto = components['schemas']['ResellerDto'];
|
|
741
|
+
|
|
742
|
+
export declare const RESOURCE_DEFINITIONS: Record<ResourceName, string>;
|
|
743
|
+
|
|
744
|
+
/** Resource Name should ALWAYS be in singular form */
|
|
745
|
+
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"];
|
|
746
|
+
|
|
747
|
+
export declare type ResourceName = (typeof RESOURCE_NAMES)[number];
|
|
748
|
+
|
|
749
|
+
export declare function Search({ selectedResult, onSelectResult, target, placeholder }: SearchProps): JSX_2.Element;
|
|
750
|
+
|
|
751
|
+
export declare const SearchInput: default_2.FC<SearchInputProps>;
|
|
752
|
+
|
|
753
|
+
declare interface SearchInputProps extends Omit<InputProps, 'onChange'> {
|
|
754
|
+
onChange?: (value: string) => void;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
declare interface SearchProps {
|
|
758
|
+
selectedResult?: Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto>;
|
|
759
|
+
onSelectResult: (dto: Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto>) => void;
|
|
760
|
+
target: DYNAMIC_INPUT_TARGET;
|
|
761
|
+
placeholder: string;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export declare function secondsToDuration(seconds: number): string;
|
|
765
|
+
|
|
525
766
|
export declare const Select: React_2.FC<SelectPrimitive.SelectProps>;
|
|
526
767
|
|
|
527
768
|
export declare const SelectContent: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -579,9 +820,11 @@ export declare const SheetTitle: React_2.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
579
820
|
export declare const SheetTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
580
821
|
|
|
581
822
|
declare const sheetVariants: (props?: ({
|
|
582
|
-
side?: "top" | "bottom" | "
|
|
823
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
583
824
|
} & ClassProp) | undefined) => string;
|
|
584
825
|
|
|
826
|
+
export declare function SideBar({ data, ...props }: SidebarProps): JSX_2.Element;
|
|
827
|
+
|
|
585
828
|
export declare const Sidebar: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & {
|
|
586
829
|
side?: "left" | "right";
|
|
587
830
|
variant?: "sidebar" | "floating" | "inset";
|
|
@@ -591,7 +834,7 @@ export declare const Sidebar: React_2.ForwardRefExoticComponent<Omit<React_2.Cla
|
|
|
591
834
|
export declare const SidebarContent: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
592
835
|
|
|
593
836
|
declare type SidebarContext = {
|
|
594
|
-
state:
|
|
837
|
+
state: 'expanded' | 'collapsed';
|
|
595
838
|
open: boolean;
|
|
596
839
|
setOpen: (open: boolean) => void;
|
|
597
840
|
openMobile: boolean;
|
|
@@ -656,6 +899,10 @@ export declare const SidebarMenuSubButton: React_2.ForwardRefExoticComponent<Omi
|
|
|
656
899
|
|
|
657
900
|
export declare const SidebarMenuSubItem: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React_2.RefAttributes<HTMLLIElement>>;
|
|
658
901
|
|
|
902
|
+
declare interface SidebarProps extends React_2.ComponentProps<typeof Sidebar> {
|
|
903
|
+
data: NavItem[];
|
|
904
|
+
}
|
|
905
|
+
|
|
659
906
|
export declare const SidebarProvider: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & {
|
|
660
907
|
defaultOpen?: boolean;
|
|
661
908
|
open?: boolean;
|
|
@@ -670,20 +917,59 @@ export declare const SidebarTrigger: React_2.ForwardRefExoticComponent<Omit<Butt
|
|
|
670
917
|
|
|
671
918
|
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|
|
672
919
|
|
|
920
|
+
export declare function StaticDataTable<T>({ accessors, data, affectedData }: StaticDataTableProps<T>): JSX_2.Element;
|
|
921
|
+
|
|
922
|
+
export declare interface StaticDataTableProps<T> {
|
|
923
|
+
accessors: (keyof T)[];
|
|
924
|
+
data: T[];
|
|
925
|
+
affectedData?: T[];
|
|
926
|
+
}
|
|
927
|
+
|
|
673
928
|
export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
|
|
674
929
|
|
|
930
|
+
export declare type TableActions = {
|
|
931
|
+
/** True if reading this resource is allowed. */
|
|
932
|
+
read: boolean;
|
|
933
|
+
/** True if creation of resource from dashboard is allowed. */
|
|
934
|
+
create: boolean;
|
|
935
|
+
/** True if the resource can be updated */
|
|
936
|
+
update: boolean;
|
|
937
|
+
/** True if the resource can be deleted */
|
|
938
|
+
delete: boolean;
|
|
939
|
+
/** True if the resource can be exported */
|
|
940
|
+
export: boolean;
|
|
941
|
+
/** True if the resource can be linked to tags. */
|
|
942
|
+
tag: boolean;
|
|
943
|
+
/** True if searching is supported. Search is defined by the `query` QueryParameter in the Web API */
|
|
944
|
+
search: boolean;
|
|
945
|
+
/** True if selection using checkboxes is allowed */
|
|
946
|
+
selection: boolean;
|
|
947
|
+
/** True if the resource has support for segments */
|
|
948
|
+
segments: boolean;
|
|
949
|
+
};
|
|
950
|
+
|
|
675
951
|
export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
676
952
|
|
|
677
953
|
export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & React_2.RefAttributes<HTMLTableCaptionElement>>;
|
|
678
954
|
|
|
679
955
|
export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
680
956
|
|
|
957
|
+
export declare type TableFetchFn<TData> = (p: PaginationState, s: SortingState, q: string, f: any) => Promise<{
|
|
958
|
+
total: number;
|
|
959
|
+
data: TData[] | undefined;
|
|
960
|
+
}>;
|
|
961
|
+
|
|
681
962
|
export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
682
963
|
|
|
683
964
|
export declare const TableHead: React_2.ForwardRefExoticComponent<React_2.ThHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
684
965
|
|
|
685
966
|
export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
686
967
|
|
|
968
|
+
export declare function TablePageLayout({ resourceName, children, }: {
|
|
969
|
+
resourceName: string;
|
|
970
|
+
children?: React.ReactNode;
|
|
971
|
+
}): JSX_2.Element;
|
|
972
|
+
|
|
687
973
|
export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & React_2.RefAttributes<HTMLTableRowElement>>;
|
|
688
974
|
|
|
689
975
|
export declare const Tabs: React_2.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -711,6 +997,8 @@ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProvide
|
|
|
711
997
|
|
|
712
998
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
713
999
|
|
|
1000
|
+
export declare const US_BASE_URL: string;
|
|
1001
|
+
|
|
714
1002
|
export declare const useFormField: () => {
|
|
715
1003
|
invalid: boolean;
|
|
716
1004
|
isDirty: boolean;
|
|
@@ -726,11 +1014,14 @@ export declare const useFormField: () => {
|
|
|
726
1014
|
|
|
727
1015
|
export declare function useIsMobile(): boolean;
|
|
728
1016
|
|
|
1017
|
+
declare type UserDto = components['schemas']['UserDto'] & {
|
|
1018
|
+
organizationId?: string;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
729
1021
|
export declare function useSidebar(): SidebarContext;
|
|
730
1022
|
|
|
1023
|
+
export declare type VisibilityState<T> = {
|
|
1024
|
+
[K in keyof T]?: boolean;
|
|
1025
|
+
};
|
|
1026
|
+
|
|
731
1027
|
export { }
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
declare namespace Calendar {
|
|
735
|
-
var displayName: string;
|
|
736
|
-
}
|