@cryptlex/web-components 1.3.2 → 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 +12 -22
- package/dist/components/ui/button.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/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/index.es.d.ts +303 -2
- 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,8 +35,12 @@ 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
46
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -43,12 +52,14 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
43
52
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
44
53
|
import { SeparatorProps } from '@radix-ui/react-separator';
|
|
45
54
|
import { SlotProps } from '@radix-ui/react-slot';
|
|
55
|
+
import { SortingState } from '@tanstack/react-table';
|
|
46
56
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
47
57
|
import { Toaster as Toaster_2 } from 'sonner';
|
|
48
58
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
49
59
|
import { UniqueOption } from 'recharts/types/util/payload/getUniqPayload';
|
|
50
60
|
import { ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
51
61
|
import { VariantProps } from 'class-variance-authority';
|
|
62
|
+
import { VisibilityState as VisibilityState_2 } from '@tanstack/react-table';
|
|
52
63
|
|
|
53
64
|
export declare const Accordion: React_2.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React_2.RefAttributes<HTMLDivElement>>;
|
|
54
65
|
|
|
@@ -58,6 +69,19 @@ export declare const AccordionItem: React_2.ForwardRefExoticComponent<Omit<Accor
|
|
|
58
69
|
|
|
59
70
|
export declare const AccordionTrigger: React_2.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
60
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
|
+
|
|
61
85
|
export declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
62
86
|
|
|
63
87
|
export declare const AvatarFallback: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -188,6 +212,8 @@ export declare const ChartTooltipContent: React_2.ForwardRefExoticComponent<Omit
|
|
|
188
212
|
labelKey?: string;
|
|
189
213
|
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
190
214
|
|
|
215
|
+
export declare const CHECK_BOX: AccessorKeyColumnDef<any, any>[];
|
|
216
|
+
|
|
191
217
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
192
218
|
|
|
193
219
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -287,6 +313,61 @@ export declare const CommandShortcut: {
|
|
|
287
313
|
displayName: string;
|
|
288
314
|
};
|
|
289
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
|
+
|
|
290
371
|
export declare const Dialog: React_2.FC<DialogPrimitive.DialogProps>;
|
|
291
372
|
|
|
292
373
|
export declare const DialogClose: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -313,6 +394,13 @@ export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogP
|
|
|
313
394
|
|
|
314
395
|
export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
315
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
|
+
|
|
316
404
|
export declare const Drawer: {
|
|
317
405
|
({ shouldScaleBackground, ...props }: React_2.ComponentProps<typeof Drawer_2.Root>): JSX_2.Element;
|
|
318
406
|
displayName: string;
|
|
@@ -381,8 +469,57 @@ export declare const DropdownMenuSubTrigger: React_2.ForwardRefExoticComponent<O
|
|
|
381
469
|
|
|
382
470
|
export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
383
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
|
+
|
|
384
519
|
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
|
|
385
520
|
|
|
521
|
+
export declare function FormatDate(date: string | null | undefined): string | null;
|
|
522
|
+
|
|
386
523
|
export declare const FormControl: React_2.ForwardRefExoticComponent<Omit<SlotProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
387
524
|
|
|
388
525
|
export declare const FormDescription: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -395,12 +532,45 @@ export declare const FormLabel: React_2.ForwardRefExoticComponent<Omit<LabelPrim
|
|
|
395
532
|
|
|
396
533
|
export declare const FormMessage: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
397
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
|
+
|
|
398
553
|
/**
|
|
399
554
|
*
|
|
400
555
|
* @returns
|
|
401
556
|
*/
|
|
402
557
|
export declare function getThemeHue(): string;
|
|
403
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
|
+
|
|
404
574
|
export declare const Input: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
405
575
|
|
|
406
576
|
export declare const InputOTP: React_2.ForwardRefExoticComponent<(Omit<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
@@ -442,6 +612,23 @@ export declare const InputOTPSlot: React_2.ForwardRefExoticComponent<Omit<React_
|
|
|
442
612
|
export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
443
613
|
}
|
|
444
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
|
+
|
|
445
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>>;
|
|
446
633
|
|
|
447
634
|
export declare function Loader({ className }: LoaderProps): JSX_2.Element;
|
|
@@ -450,6 +637,12 @@ declare interface LoaderProps {
|
|
|
450
637
|
className?: string;
|
|
451
638
|
}
|
|
452
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
|
+
|
|
453
646
|
export declare const NavigationMenu: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
454
647
|
|
|
455
648
|
export declare const NavigationMenuContent: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -470,6 +663,29 @@ export declare const navigationMenuTriggerStyle: (props?: ClassProp | undefined)
|
|
|
470
663
|
|
|
471
664
|
export declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
472
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
|
+
|
|
473
689
|
export declare const Pagination: {
|
|
474
690
|
({ className, ...props }: React_2.ComponentProps<"nav">): JSX_2.Element;
|
|
475
691
|
displayName: string;
|
|
@@ -505,6 +721,8 @@ export declare const PaginationPrevious: {
|
|
|
505
721
|
|
|
506
722
|
export declare const PasswordInput: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
507
723
|
|
|
724
|
+
export declare function pluralizeTimes(resourceName: string, count: number): string;
|
|
725
|
+
|
|
508
726
|
export declare const Popover: React_2.FC<PopoverPrimitive.PopoverProps>;
|
|
509
727
|
|
|
510
728
|
export declare const PopoverAnchor: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -513,10 +731,38 @@ export declare const PopoverContent: React_2.ForwardRefExoticComponent<Omit<Popo
|
|
|
513
731
|
|
|
514
732
|
export declare const PopoverTrigger: React_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
515
733
|
|
|
734
|
+
export declare type Portals = 'customer-portal' | 'system-portal' | 'reseller-portal' | 'admin-portal';
|
|
735
|
+
|
|
516
736
|
export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
517
737
|
|
|
518
738
|
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
519
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
|
+
|
|
520
766
|
export declare const Select: React_2.FC<SelectPrimitive.SelectProps>;
|
|
521
767
|
|
|
522
768
|
export declare const SelectContent: React_2.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -574,9 +820,11 @@ export declare const SheetTitle: React_2.ForwardRefExoticComponent<Omit<DialogPr
|
|
|
574
820
|
export declare const SheetTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
575
821
|
|
|
576
822
|
declare const sheetVariants: (props?: ({
|
|
577
|
-
side?: "top" | "bottom" | "
|
|
823
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
578
824
|
} & ClassProp) | undefined) => string;
|
|
579
825
|
|
|
826
|
+
export declare function SideBar({ data, ...props }: SidebarProps): JSX_2.Element;
|
|
827
|
+
|
|
580
828
|
export declare const Sidebar: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & {
|
|
581
829
|
side?: "left" | "right";
|
|
582
830
|
variant?: "sidebar" | "floating" | "inset";
|
|
@@ -586,7 +834,7 @@ export declare const Sidebar: React_2.ForwardRefExoticComponent<Omit<React_2.Cla
|
|
|
586
834
|
export declare const SidebarContent: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
587
835
|
|
|
588
836
|
declare type SidebarContext = {
|
|
589
|
-
state:
|
|
837
|
+
state: 'expanded' | 'collapsed';
|
|
590
838
|
open: boolean;
|
|
591
839
|
setOpen: (open: boolean) => void;
|
|
592
840
|
openMobile: boolean;
|
|
@@ -651,6 +899,10 @@ export declare const SidebarMenuSubButton: React_2.ForwardRefExoticComponent<Omi
|
|
|
651
899
|
|
|
652
900
|
export declare const SidebarMenuSubItem: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React_2.RefAttributes<HTMLLIElement>>;
|
|
653
901
|
|
|
902
|
+
declare interface SidebarProps extends React_2.ComponentProps<typeof Sidebar> {
|
|
903
|
+
data: NavItem[];
|
|
904
|
+
}
|
|
905
|
+
|
|
654
906
|
export declare const SidebarProvider: React_2.ForwardRefExoticComponent<Omit<React_2.ClassAttributes<HTMLDivElement> & React_2.HTMLAttributes<HTMLDivElement> & {
|
|
655
907
|
defaultOpen?: boolean;
|
|
656
908
|
open?: boolean;
|
|
@@ -665,20 +917,59 @@ export declare const SidebarTrigger: React_2.ForwardRefExoticComponent<Omit<Butt
|
|
|
665
917
|
|
|
666
918
|
export declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): JSX_2.Element;
|
|
667
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
|
+
|
|
668
928
|
export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
|
|
669
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
|
+
|
|
670
951
|
export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
671
952
|
|
|
672
953
|
export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & React_2.RefAttributes<HTMLTableCaptionElement>>;
|
|
673
954
|
|
|
674
955
|
export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
675
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
|
+
|
|
676
962
|
export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
677
963
|
|
|
678
964
|
export declare const TableHead: React_2.ForwardRefExoticComponent<React_2.ThHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
|
|
679
965
|
|
|
680
966
|
export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
|
|
681
967
|
|
|
968
|
+
export declare function TablePageLayout({ resourceName, children, }: {
|
|
969
|
+
resourceName: string;
|
|
970
|
+
children?: React.ReactNode;
|
|
971
|
+
}): JSX_2.Element;
|
|
972
|
+
|
|
682
973
|
export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & React_2.RefAttributes<HTMLTableRowElement>>;
|
|
683
974
|
|
|
684
975
|
export declare const Tabs: React_2.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -706,6 +997,8 @@ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProvide
|
|
|
706
997
|
|
|
707
998
|
export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
708
999
|
|
|
1000
|
+
export declare const US_BASE_URL: string;
|
|
1001
|
+
|
|
709
1002
|
export declare const useFormField: () => {
|
|
710
1003
|
invalid: boolean;
|
|
711
1004
|
isDirty: boolean;
|
|
@@ -721,6 +1014,14 @@ export declare const useFormField: () => {
|
|
|
721
1014
|
|
|
722
1015
|
export declare function useIsMobile(): boolean;
|
|
723
1016
|
|
|
1017
|
+
declare type UserDto = components['schemas']['UserDto'] & {
|
|
1018
|
+
organizationId?: string;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
724
1021
|
export declare function useSidebar(): SidebarContext;
|
|
725
1022
|
|
|
1023
|
+
export declare type VisibilityState<T> = {
|
|
1024
|
+
[K in keyof T]?: boolean;
|
|
1025
|
+
};
|
|
1026
|
+
|
|
726
1027
|
export { }
|