ikoncomponents 1.7.7 → 1.8.1
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/ikoncomponents/action-menu/index.d.ts +2 -1
- package/dist/ikoncomponents/activity-sheet/index.d.ts +2 -1
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +1 -1
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +2 -2
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +1 -1
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +1 -1
- package/dist/ikoncomponents/big-calendar/index.d.ts +1 -1
- package/dist/ikoncomponents/buttons/index.d.ts +6 -6
- package/dist/ikoncomponents/combobox-input/index.d.ts +2 -1
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +1 -1
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +2 -1
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +2 -1
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +2 -1
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +2 -1
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +2 -1
- package/dist/ikoncomponents/data-table/index.d.ts +2 -1
- package/dist/ikoncomponents/file-input/index.d.ts +2 -1
- package/dist/ikoncomponents/fileUpload/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +2 -1
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -1
- package/dist/ikoncomponents/glowing-effect/index.d.ts +2 -1
- package/dist/ikoncomponents/icon/index.d.ts +2 -1
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +1 -1
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +2 -1
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +2 -2
- package/dist/ikoncomponents/loading-spinner/index.d.ts +1 -1
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +1 -1
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +1 -1
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +1 -1
- package/dist/ikoncomponents/main-layout/app-sidebar.js +4 -1
- package/dist/ikoncomponents/main-layout/footer.d.ts +2 -1
- package/dist/ikoncomponents/main-layout/footer.js +4 -1
- package/dist/ikoncomponents/main-layout/header.d.ts +2 -1
- package/dist/ikoncomponents/main-layout/header.js +4 -1
- package/dist/ikoncomponents/main-layout/index.d.ts +1 -1
- package/dist/ikoncomponents/main-layout/index.js +9 -2
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +4 -2
- package/dist/ikoncomponents/main-layout/main-sidebar.js +28 -10
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +1 -1
- package/dist/ikoncomponents/main-layout/sidebar-expanded-context.d.ts +20 -0
- package/dist/ikoncomponents/main-layout/sidebar-expanded-context.js +25 -0
- package/dist/ikoncomponents/multi-combobox/index.d.ts +2 -1
- package/dist/ikoncomponents/no-data/index.d.ts +2 -1
- package/dist/ikoncomponents/page-wrapper/index.d.ts +2 -2
- package/dist/ikoncomponents/password-strength-meter/index.d.ts +2 -1
- package/dist/ikoncomponents/phone-input/index.d.ts +2 -1
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +1 -1
- package/dist/ikoncomponents/reload-component/index.d.ts +1 -1
- package/dist/ikoncomponents/search-input/index.d.ts +2 -1
- package/dist/ikoncomponents/sheet/index.d.ts +1 -1
- package/dist/ikoncomponents/simple-widget/index.d.ts +2 -2
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +1 -1
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +1 -1
- package/dist/ikoncomponents/table/DataTable/index.d.ts +3 -2
- package/dist/ikoncomponents/table/DataTable/index.js +296 -60
- package/dist/ikoncomponents/table/DataTableColumn/index.d.ts +3 -0
- package/dist/ikoncomponents/table/DataTableColumn/index.js +17 -0
- package/dist/ikoncomponents/table/DataTableFilter/index.d.ts +7 -0
- package/dist/ikoncomponents/table/DataTableFilter/index.js +95 -0
- package/dist/ikoncomponents/table/DataTablePageSize/index.d.ts +1 -1
- package/dist/ikoncomponents/table/DataTablePageSize/index.js +2 -0
- package/dist/ikoncomponents/table/DataTablePagination/index.d.ts +2 -2
- package/dist/ikoncomponents/table/DataTablePagination/index.js +3 -1
- package/dist/ikoncomponents/table/DataTableSearch/index.d.ts +1 -1
- package/dist/ikoncomponents/table/DataTableSearch/index.js +16 -4
- package/dist/ikoncomponents/table/index.d.ts +2 -2
- package/dist/ikoncomponents/table/index.js +2 -162
- package/dist/ikoncomponents/table/type.d.ts +83 -24
- package/dist/ikoncomponents/table/type.js +0 -7
- package/dist/ikoncomponents/tabs/index.d.ts +2 -1
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -1
- package/dist/ikoncomponents/title-progress/index.d.ts +2 -1
- package/dist/ikoncomponents/tooltip/index.d.ts +1 -1
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +2 -1
- package/dist/ikoncomponents/upload-tab/index.d.ts +1 -1
- package/dist/ikoncomponents/widgets/index.d.ts +2 -1
- package/dist/ikoncomponents/work-in-progress/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/shadcn/accordion.d.ts +4 -4
- package/dist/shadcn/alert-dialog.d.ts +2 -2
- package/dist/shadcn/alert.d.ts +3 -3
- package/dist/shadcn/aspect-ratio.d.ts +1 -1
- package/dist/shadcn/avatar.d.ts +3 -3
- package/dist/shadcn/badge.d.ts +1 -1
- package/dist/shadcn/breadcrumb.d.ts +7 -7
- package/dist/shadcn/button.d.ts +1 -1
- package/dist/shadcn/calendar.d.ts +2 -2
- package/dist/shadcn/card.d.ts +7 -7
- package/dist/shadcn/checkbox.d.ts +1 -1
- package/dist/shadcn/collapsible.d.ts +3 -3
- package/dist/shadcn/command.d.ts +9 -9
- package/dist/shadcn/dialog.d.ts +10 -10
- package/dist/shadcn/drawer.d.ts +10 -10
- package/dist/shadcn/dropdown-menu.d.ts +15 -15
- package/dist/shadcn/form.d.ts +7 -7
- package/dist/shadcn/hover-card.d.ts +3 -3
- package/dist/shadcn/input.d.ts +1 -1
- package/dist/shadcn/label.d.ts +1 -1
- package/dist/shadcn/navigation-menu.d.ts +8 -8
- package/dist/shadcn/popover.d.ts +4 -4
- package/dist/shadcn/progress.d.ts +1 -1
- package/dist/shadcn/radio-group.d.ts +2 -2
- package/dist/shadcn/scroll-area.d.ts +2 -2
- package/dist/shadcn/select.d.ts +10 -10
- package/dist/shadcn/separator.d.ts +1 -1
- package/dist/shadcn/sheet.d.ts +8 -8
- package/dist/shadcn/sidebar.d.ts +23 -23
- package/dist/shadcn/skeleton.d.ts +1 -1
- package/dist/shadcn/slider.d.ts +1 -1
- package/dist/shadcn/sonner.d.ts +1 -1
- package/dist/shadcn/switch.d.ts +1 -1
- package/dist/shadcn/table.d.ts +8 -8
- package/dist/shadcn/tabs.d.ts +4 -4
- package/dist/shadcn/textarea.d.ts +1 -1
- package/dist/shadcn/toggle-group.d.ts +2 -2
- package/dist/shadcn/toggle.d.ts +1 -1
- package/dist/shadcn/tooltip.d.ts +4 -4
- package/dist/shadcn/workflow.d.ts +1 -1
- package/dist/styles.css +47 -28
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/border-radius-provider.d.ts +1 -1
- package/dist/utils/font-provider.d.ts +1 -1
- package/dist/utils/theme-provider/index.d.ts +1 -1
- package/package.json +3 -2
- package/dist/ikoncomponents/assistant-ui/Assistant.d.ts +0 -28
- package/dist/ikoncomponents/assistant-ui/Assistant.js +0 -306
- package/dist/ikoncomponents/assistant-ui/agent-dropdown.d.ts +0 -24
- package/dist/ikoncomponents/assistant-ui/agent-dropdown.js +0 -16
- package/dist/ikoncomponents/assistant-ui/agentTextChatTransport.d.ts +0 -30
- package/dist/ikoncomponents/assistant-ui/agentTextChatTransport.js +0 -208
- package/dist/ikoncomponents/assistant-ui/attachment.d.ts +0 -4
- package/dist/ikoncomponents/assistant-ui/attachment.js +0 -93
- package/dist/ikoncomponents/assistant-ui/markdown-text.d.ts +0 -2
- package/dist/ikoncomponents/assistant-ui/markdown-text.js +0 -126
- package/dist/ikoncomponents/assistant-ui/thread.d.ts +0 -10
- package/dist/ikoncomponents/assistant-ui/thread.js +0 -115
- package/dist/ikoncomponents/assistant-ui/tool-fallback.d.ts +0 -2
- package/dist/ikoncomponents/assistant-ui/tool-fallback.js +0 -18
- package/dist/ikoncomponents/assistant-ui/tooltip-icon-button.d.ts +0 -7
- package/dist/ikoncomponents/assistant-ui/tooltip-icon-button.js +0 -23
- package/dist/utils/userType.d.ts +0 -13
- package/dist/utils/userType.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import type { ActionMenuProps, ExtraActionParams } from "./type";
|
|
2
3
|
export declare function ActionMenu({ actionMenus, extraActionParams, }: {
|
|
3
4
|
actionMenus: ActionMenuProps[];
|
|
4
5
|
extraActionParams?: ExtraActionParams;
|
|
5
|
-
}):
|
|
6
|
+
}): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export type ActivityLogProps = {
|
|
2
3
|
id: string;
|
|
3
4
|
activity: string;
|
|
@@ -8,4 +9,4 @@ export type ActivityLogProps = {
|
|
|
8
9
|
};
|
|
9
10
|
export declare function ActivitySheet({ activityLogs }: {
|
|
10
11
|
activityLogs?: ActivityLogProps[];
|
|
11
|
-
}):
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -13,6 +13,6 @@ interface BreadcrumbContextType {
|
|
|
13
13
|
}
|
|
14
14
|
export declare function BreadcrumbProvider({ children }: {
|
|
15
15
|
children: ReactNode;
|
|
16
|
-
}): import("react
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
17
|
export declare function useBreadcrumb(): BreadcrumbContextType;
|
|
18
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BreadcrumbItemProps } from "./BreadcrumbProvider";
|
|
2
|
-
export declare function AppBreadcrumb(): import("react
|
|
2
|
+
export declare function AppBreadcrumb(): import("react").JSX.Element | null;
|
|
3
3
|
export declare function RenderAppBreadcrumb({ breadcrumb, }: {
|
|
4
4
|
breadcrumb: BreadcrumbItemProps;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -2,4 +2,4 @@ import { BigCalendarEventProps, ExtraParamsEvent } from "../type";
|
|
|
2
2
|
export default function BigCalenderEvent({ event, extraParamsEvent }: {
|
|
3
3
|
event: BigCalendarEventProps;
|
|
4
4
|
extraParamsEvent?: ExtraParamsEvent;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BigCalenderToolbarProps } from "../type";
|
|
2
|
-
export default function BigCalenderToolbar({ onNavigate, onView, label, extraTools, view }: BigCalenderToolbarProps): import("react
|
|
2
|
+
export default function BigCalenderToolbar({ onNavigate, onView, label, extraTools, view }: BigCalenderToolbarProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "react-big-calendar/lib/css/react-big-calendar.css";
|
|
2
2
|
import { BigCalendarProps } from "./type";
|
|
3
|
-
export declare function BigCalendar({ events, extraParamsEvent, extraTools }: BigCalendarProps): import("react
|
|
3
|
+
export declare function BigCalendar({ events, extraParamsEvent, extraTools }: BigCalendarProps): import("react").JSX.Element;
|
|
@@ -10,9 +10,9 @@ export interface ButtonWithTooltipProps extends React.ButtonHTMLAttributes<HTMLB
|
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
tooltipContent: string | React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export declare function TextButton({ children, variant, asChild, size, ...props }: ButtonProps):
|
|
14
|
-
export declare function TextButtonWithTooltip({ children, variant, asChild, size, tooltipContent, ...props }: ButtonWithTooltipProps):
|
|
15
|
-
export declare function IconTextButton({ children, variant, asChild, size, ...props }: ButtonProps):
|
|
16
|
-
export declare function IconTextButtonWithTooltip({ children, variant, size, asChild, tooltipContent, ...props }: ButtonWithTooltipProps):
|
|
17
|
-
export declare function IconButton({ children, variant, size, asChild, ...props }: ButtonProps):
|
|
18
|
-
export declare function IconButtonWithTooltip({ children, tooltipContent, asChild, variant, size, ...props }: ButtonWithTooltipProps):
|
|
13
|
+
export declare function TextButton({ children, variant, asChild, size, ...props }: ButtonProps): React.JSX.Element;
|
|
14
|
+
export declare function TextButtonWithTooltip({ children, variant, asChild, size, tooltipContent, ...props }: ButtonWithTooltipProps): React.JSX.Element;
|
|
15
|
+
export declare function IconTextButton({ children, variant, asChild, size, ...props }: ButtonProps): React.JSX.Element;
|
|
16
|
+
export declare function IconTextButtonWithTooltip({ children, variant, size, asChild, tooltipContent, ...props }: ButtonWithTooltipProps): React.JSX.Element;
|
|
17
|
+
export declare function IconButton({ children, variant, size, asChild, ...props }: ButtonProps): React.JSX.Element;
|
|
18
|
+
export declare function IconButtonWithTooltip({ children, tooltipContent, asChild, variant, size, ...props }: ButtonWithTooltipProps): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ComboBoxInputProps } from "./type";
|
|
2
|
-
export declare function ComboboxInput({ placeholder, items, disabled, onSelect, defaultValue }: ComboBoxInputProps):
|
|
3
|
+
export declare function ComboboxInput({ placeholder, items, disabled, onSelect, defaultValue }: ComboBoxInputProps): React.JSX.Element;
|
|
@@ -17,5 +17,5 @@ type CustomComboboxInputProps = {
|
|
|
17
17
|
formDescription?: string;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export declare function CustomComboboxInput({ formControl, name, label, options, placeholder, emptyMessage, onValueChange, className, addNewPlaceholder, formDescription, disabled, }: CustomComboboxInputProps):
|
|
20
|
+
export declare function CustomComboboxInput({ formControl, name, label, options, placeholder, emptyMessage, onValueChange, className, addNewPlaceholder, formDescription, disabled, }: CustomComboboxInputProps): React.JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { DataTableViewOptionsProps } from "../type";
|
|
2
|
-
export declare function DataTableColumnFilter<TData>({ table, }: DataTableViewOptionsProps<TData>):
|
|
3
|
+
export declare function DataTableColumnFilter<TData>({ table, }: DataTableViewOptionsProps<TData>): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { DataTableFacetedFilterProps } from "../type";
|
|
2
|
-
export declare function DataTableFacetedFilter<TData, TValue>({ column, }: DataTableFacetedFilterProps<TData, TValue>):
|
|
3
|
+
export declare function DataTableFacetedFilter<TData, TValue>({ column, }: DataTableFacetedFilterProps<TData, TValue>): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { DataTableFilterProps } from "../type";
|
|
2
|
-
export declare function DataTableFilterMenu<TData>({ table }: DataTableFilterProps<TData>):
|
|
3
|
+
export declare function DataTableFilterMenu<TData>({ table }: DataTableFilterProps<TData>): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { DataTablePaginationProps } from "../type";
|
|
2
|
-
export declare function DataTablePagination<TData>({ table, extraParams, }: DataTablePaginationProps<TData>):
|
|
3
|
+
export declare function DataTablePagination<TData>({ table, extraParams, }: DataTablePaginationProps<TData>): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { DTToolBarProps } from "../type";
|
|
2
|
-
export declare function DataTableToolbar<TData>({ table, extraParams, }: DTToolBarProps<TData>):
|
|
3
|
+
export declare function DataTableToolbar<TData>({ table, extraParams, }: DTToolBarProps<TData>): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { DataTableProps } from "./type";
|
|
2
|
-
export declare const DataTable: <TData, TValue>({ columns, data, extraParams, onTableReady }: DataTableProps<TData, TValue>, ref: any) => false |
|
|
3
|
+
export declare const DataTable: <TData, TValue>({ columns, data, extraParams, onTableReady }: DataTableProps<TData, TValue>, ref: any) => false | React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function FileInput({ tooltipContent, fileNamePlaceholder, fileName, onFileNameChange, ...props }: any): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export declare const convertFileToObject: (file: File) => Promise<any>;
|
|
2
3
|
interface FileUploaderProps {
|
|
3
4
|
label?: string;
|
|
@@ -9,6 +10,6 @@ interface FileUploaderProps {
|
|
|
9
10
|
showPreview?: boolean;
|
|
10
11
|
onFileSelect: (files: any[]) => Promise<any> | void;
|
|
11
12
|
}
|
|
12
|
-
export default function FileUploader({ label, isDrag, fileInput, isMultiple, tooltipContent, fileNamePlaceholder, showPreview, onFileSelect, }: FileUploaderProps):
|
|
13
|
+
export default function FileUploader({ label, isDrag, fileInput, isMultiple, tooltipContent, fileNamePlaceholder, showPreview, onFileSelect, }: FileUploaderProps): React.JSX.Element;
|
|
13
14
|
export declare function getFileUrlFromObject(obj: any): string;
|
|
14
15
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FormComboboxInputProps } from "../types";
|
|
2
|
-
export declare function FormComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, }: FormComboboxInputProps):
|
|
3
|
+
export declare function FormComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, }: FormComboboxInputProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { Control } from "react-hook-form";
|
|
2
3
|
export interface FormComboboxInputProps {
|
|
3
4
|
formControl: Control<any>;
|
|
@@ -15,4 +16,4 @@ export interface FormComboboxInputProps {
|
|
|
15
16
|
value?: string;
|
|
16
17
|
onChange?: (value: any) => void;
|
|
17
18
|
}
|
|
18
|
-
export declare function FormComboboxInputWithValue(props: FormComboboxInputProps):
|
|
19
|
+
export declare function FormComboboxInputWithValue(props: FormComboboxInputProps): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FormDateInputProps } from "../types";
|
|
2
|
-
export declare function FormDateInput({ formControl, name, label, placeholder, dateFormat, calendarDateDisabled, formDescription, disabled, }: FormDateInputProps):
|
|
3
|
+
export declare function FormDateInput({ formControl, name, label, placeholder, dateFormat, calendarDateDisabled, formDescription, disabled, }: FormDateInputProps): React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function FormFileInput(): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { FormInputProps } from '../types';
|
|
2
|
-
export declare function FormInput({ formControl, label, formDescription, extraFormComponent, name, ...inputProps }: FormInputProps):
|
|
3
|
+
export declare function FormInput({ formControl, label, formDescription, extraFormComponent, name, ...inputProps }: FormInputProps): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FormComboboxInputProps as BaseFormComboboxInputProps } from "../../form-fields/types";
|
|
2
3
|
interface FormComboboxInputProps extends BaseFormComboboxInputProps {
|
|
3
4
|
defaultOptions?: number;
|
|
4
5
|
}
|
|
5
|
-
export declare function FormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, defaultValue, defaultOptions, }: FormComboboxInputProps):
|
|
6
|
+
export declare function FormMultiComboboxInput({ formControl, name, label, placeholder, formDescription, items, disabled, onSelect, defaultValue, defaultOptions, }: FormComboboxInputProps): React.JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { FormInputProps } from '../types';
|
|
2
|
-
export declare function FormOtpInput({ formControl, label, formDescription, extraFormComponent, name, ...inputProps }: FormInputProps):
|
|
3
|
+
export declare function FormOtpInput({ formControl, label, formDescription, extraFormComponent, name, ...inputProps }: FormInputProps): React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function FormPhoneInput(): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { FormTextareaProps } from '../types';
|
|
2
|
-
export declare function FormTextarea({ formControl, name, label, formItemClass, formDescription, ...textAreaProps }: FormTextareaProps):
|
|
3
|
+
export declare function FormTextarea({ formControl, name, label, formItemClass, formDescription, ...textAreaProps }: FormTextareaProps): React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
interface GlowingEffectProps {
|
|
2
3
|
blur?: number;
|
|
3
4
|
inactiveZone?: number;
|
|
@@ -10,5 +11,5 @@ interface GlowingEffectProps {
|
|
|
10
11
|
movementDuration?: number;
|
|
11
12
|
borderWidth?: number;
|
|
12
13
|
}
|
|
13
|
-
export declare const GlowingEffect: ({ blur, inactiveZone, proximity, spread, variant, glow, className, movementDuration, borderWidth, disabled, }: GlowingEffectProps) =>
|
|
14
|
+
export declare const GlowingEffect: ({ blur, inactiveZone, proximity, spread, variant, glow, className, movementDuration, borderWidth, disabled, }: GlowingEffectProps) => React.JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
export interface IconProps {
|
|
2
3
|
name: string;
|
|
3
4
|
size?: number | string;
|
|
@@ -5,4 +6,4 @@ export interface IconProps {
|
|
|
5
6
|
className?: string;
|
|
6
7
|
strokeWidth?: number;
|
|
7
8
|
}
|
|
8
|
-
export declare function Icon({ name, ...props }: IconProps):
|
|
9
|
+
export declare function Icon({ name, ...props }: IconProps): React.JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface Props {
|
|
2
2
|
onNewFileUpload?: (...args: any) => void;
|
|
3
3
|
}
|
|
4
|
-
declare function CropperFormComponent({ onNewFileUpload }: Props): import("react
|
|
4
|
+
declare function CropperFormComponent({ onNewFileUpload }: Props): import("react").JSX.Element;
|
|
5
5
|
export declare const CropperForm: import("react").MemoExoticComponent<typeof CropperFormComponent>;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AspectRatioWiseImagesProps, OriginalImageProps } from '..';
|
|
2
3
|
export declare function CropperFormWithModal({ open, onOpenChange, onCropperChange }: Readonly<{
|
|
3
4
|
open: boolean;
|
|
4
5
|
onOpenChange: (open: boolean) => void;
|
|
5
6
|
onCropperChange: (originalImage: OriginalImageProps, aspectRatioWiseImages: AspectRatioWiseImagesProps) => void;
|
|
6
|
-
}>):
|
|
7
|
+
}>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CropperUploadImagesInfoProps } from './utils';
|
|
3
3
|
export interface ImageCropperContextProps {
|
|
4
4
|
originalImage: OriginalImageProps;
|
|
@@ -23,5 +23,5 @@ export interface ImageCropperProps {
|
|
|
23
23
|
modalOpen?: boolean;
|
|
24
24
|
onModalOpenChange?: (open: boolean) => void;
|
|
25
25
|
}
|
|
26
|
-
export declare function ImageCropperProvider({ children, uploadedImages, onCropperChange, modalOpen, onModalOpenChange }: ImageCropperProps):
|
|
26
|
+
export declare function ImageCropperProvider({ children, uploadedImages, onCropperChange, modalOpen, onModalOpenChange }: ImageCropperProps): React.JSX.Element;
|
|
27
27
|
export declare const useImageCropper: () => ImageCropperContextProps;
|
|
@@ -6,4 +6,4 @@ export interface ISVGProps extends React.SVGProps<SVGSVGElement> {
|
|
|
6
6
|
export interface LoadingSpinnerProps extends ISVGProps {
|
|
7
7
|
visible?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const LoadingSpinner: ({ size, className, visible, ...props }: LoadingSpinnerProps) =>
|
|
9
|
+
export declare const LoadingSpinner: ({ size, className, visible, ...props }: LoadingSpinnerProps) => React.JSX.Element | null;
|
|
@@ -29,5 +29,5 @@ export interface SidebarNavContextType {
|
|
|
29
29
|
}
|
|
30
30
|
export declare function SidebarNavProvider({ children }: {
|
|
31
31
|
children: ReactNode;
|
|
32
|
-
}): import("react
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
33
|
export declare function useSidebarNav(): SidebarNavContextType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Sidebar } from "../../shadcn/sidebar";
|
|
3
|
-
export declare function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>):
|
|
3
|
+
export declare function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>): React.JSX.Element | null;
|
|
@@ -14,11 +14,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarRail, } from "../../shadcn/sidebar";
|
|
15
15
|
import { NavMain } from "./nav-main";
|
|
16
16
|
import { useSidebarNav } from "./SidebarNavContext";
|
|
17
|
+
import { useSidebarExpanded } from "./sidebar-expanded-context";
|
|
18
|
+
import { cn } from "../../utils/cn";
|
|
17
19
|
export function AppSidebar(_a) {
|
|
18
20
|
var props = __rest(_a, []);
|
|
19
21
|
const { navItems, header, footer } = useSidebarNav();
|
|
22
|
+
const expanded = useSidebarExpanded();
|
|
20
23
|
if (!navItems || navItems.length === 0) {
|
|
21
24
|
return null;
|
|
22
25
|
}
|
|
23
|
-
return (_jsxs(Sidebar, Object.assign({ className: "ml-12", collapsible: "offcanvas" }, props, { children: [header && _jsx(SidebarHeader, { children: header }), _jsx(SidebarContent, { children: _jsx(NavMain, {}) }), footer && _jsx(SidebarFooter, { children: footer }), _jsx(SidebarRail, {})] })));
|
|
26
|
+
return (_jsxs(Sidebar, Object.assign({ className: cn("transition-[margin] duration-200 ease-in-out", expanded ? "ml-56" : "ml-12"), collapsible: "offcanvas" }, props, { children: [header && _jsx(SidebarHeader, { children: header }), _jsx(SidebarContent, { children: _jsx(NavMain, {}) }), footer && _jsx(SidebarFooter, { children: footer }), _jsx(SidebarRail, {})] })));
|
|
24
27
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare function Footer(): React.JSX.Element;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Copyright } from "lucide-react";
|
|
4
|
+
import { useSidebarExpanded } from "./sidebar-expanded-context";
|
|
5
|
+
import { cn } from "../../utils/cn";
|
|
4
6
|
export function Footer() {
|
|
5
|
-
|
|
7
|
+
const expanded = useSidebarExpanded();
|
|
8
|
+
return (_jsx("footer", { className: cn("flex border-t px-4 py-2 justify-center lg:justify-start transition-[margin] duration-200 ease-in-out", expanded ? "ml-56" : "ml-12"), children: _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx(Copyright, { className: "size-4" }), _jsx("span", { children: "Powered By" }), _jsx("a", { href: "https://keross.com", target: "_blank", children: "Keross" }), _jsx("span", { className: "", children: "|" }), _jsx("span", { id: "txtCopyrightYear", className: "", children: new Date().getFullYear() })] }) }));
|
|
6
9
|
}
|
|
@@ -7,10 +7,13 @@ import { SidebarTrigger } from "../../shadcn/sidebar";
|
|
|
7
7
|
import { Bell, Play } from "lucide-react";
|
|
8
8
|
import { IconButtonWithTooltip, IconTextButton } from "../buttons";
|
|
9
9
|
import { useSidebarNav } from "./SidebarNavContext";
|
|
10
|
+
import { useSidebarExpanded } from "./sidebar-expanded-context";
|
|
11
|
+
import { cn } from "../../utils/cn";
|
|
10
12
|
import Link from "next/link";
|
|
11
13
|
export function Header({ platformUrl }) {
|
|
12
14
|
const { navItems } = useSidebarNav();
|
|
13
|
-
|
|
15
|
+
const expanded = useSidebarExpanded();
|
|
16
|
+
return (_jsx("header", { className: cn("flex h-12 border-b shrink-0 items-center gap-2 transition-[margin,width,height] duration-200 ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", expanded ? "ml-56" : "ml-12"), children: _jsxs("div", { className: "flex items-center justify-between gap-2 px-4 w-full", children: [_jsxs("div", { className: "flex items-center gap-2", children: [(!navItems || navItems.length === 0) ? _jsx("div", {}) : _jsx(SidebarTrigger, { className: "-ml-1" }), (!navItems || navItems.length === 0) ?
|
|
14
17
|
_jsx("div", {}) :
|
|
15
18
|
_jsx(Separator, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }), _jsx(AppBreadcrumb, {})] }), _jsxs("div", { className: "ml-auto flex gap-4", children: [_jsx(IconButtonWithTooltip, { className: "px-2!", tooltipContent: "Notifications", children: _jsx(Bell, {}) }), _jsx(ThemeToggleBtn, {}), _jsx(Link, { href: `${platformUrl}/app-store`, children: _jsxs(IconTextButton, { variant: "default", children: [_jsx(Play, {}), "App Store"] }) })] })] }) }));
|
|
16
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { MainSidebar } from './main-sidebar';
|
|
4
4
|
import { SidebarInset, SidebarProvider } from '../../shadcn/sidebar';
|
|
5
5
|
import { DialogProvider } from '../alert-dialog/dialog-context';
|
|
@@ -7,6 +7,13 @@ import { AppSidebar } from './app-sidebar';
|
|
|
7
7
|
import { Header } from './header';
|
|
8
8
|
import { Footer } from './footer';
|
|
9
9
|
import { SidebarNavProvider } from './SidebarNavContext';
|
|
10
|
+
import { SidebarExpandedProvider, useSidebarExpanded } from './sidebar-expanded-context';
|
|
11
|
+
import { cn } from '../../utils/cn';
|
|
10
12
|
export function MainLayout({ children, baseUrl, platformUrl }) {
|
|
11
|
-
return (_jsxs(
|
|
13
|
+
return (_jsx(SidebarExpandedProvider, { children: _jsxs(SidebarProvider, { children: [_jsx(MainSidebar, { baseUrl: baseUrl, platformUrl: platformUrl }), _jsx(DialogProvider, { children: _jsxs(SidebarNavProvider, { children: [_jsx(AppSidebar, {}), _jsxs(SidebarInset, { className: "flex flex-col h-screen", children: [_jsx(Header, { platformUrl: platformUrl }), _jsx(MainContent, { children: children }), _jsx(Footer, {})] })] }) })] }) }));
|
|
14
|
+
}
|
|
15
|
+
/** Page content, shifted right to clear the main sidebar rail (wider when expanded). */
|
|
16
|
+
function MainContent({ children }) {
|
|
17
|
+
const expanded = useSidebarExpanded();
|
|
18
|
+
return (_jsx("div", { className: cn("flex flex-col gap-4 p-4 pt-0 grow overflow-auto scrollbar-hidden transition-[margin] duration-200 ease-in-out", expanded ? "ml-56" : "ml-12"), children: children }));
|
|
12
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
export interface AccountMembership {
|
|
2
3
|
accountId: string;
|
|
3
4
|
accountName: string;
|
|
@@ -55,7 +56,8 @@ export interface DecodedAccessToken {
|
|
|
55
56
|
iat: number;
|
|
56
57
|
exp: number;
|
|
57
58
|
}
|
|
58
|
-
export declare const MainSidebar: ({ baseUrl, platformUrl, }: {
|
|
59
|
+
export declare const MainSidebar: ({ baseUrl, platformUrl, releaseOpsUrl, }: {
|
|
59
60
|
baseUrl: string;
|
|
60
61
|
platformUrl: string;
|
|
61
|
-
|
|
62
|
+
releaseOpsUrl?: string;
|
|
63
|
+
}) => React.JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { Check, CircleUserRound, FolderCode, Home, LogOut, Settings, } from "lucide-react";
|
|
4
|
+
import { Check, CircleUserRound, FolderCode, Home, LoaderPinwheel, LogOut, PanelLeftClose, PanelLeftOpen, Settings, } from "lucide-react";
|
|
5
5
|
import { Button } from "../../shadcn/button";
|
|
6
|
+
import { cn } from "../../utils/cn";
|
|
7
|
+
import { useSidebar } from "../../shadcn/sidebar";
|
|
8
|
+
import { useSidebarExpandedState } from "./sidebar-expanded-context";
|
|
6
9
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../../shadcn/tooltip";
|
|
7
10
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "../../shadcn/dropdown-menu";
|
|
8
11
|
import { getValidAccessToken } from "../../utils/token-management";
|
|
@@ -13,12 +16,21 @@ import Link from "next/link";
|
|
|
13
16
|
import { jwtDecode } from "jwt-decode";
|
|
14
17
|
import { Icon } from "../icon";
|
|
15
18
|
import { useRefresh } from "./RefreshContext";
|
|
16
|
-
export const MainSidebar = ({ baseUrl, platformUrl, }) => {
|
|
19
|
+
export const MainSidebar = ({ baseUrl, platformUrl, releaseOpsUrl = "https://ikon-dev.keross.com/developer/devtoolsv", }) => {
|
|
17
20
|
const [user, setUser] = React.useState();
|
|
18
21
|
const [accounts, setAccounts] = React.useState([]);
|
|
19
22
|
const [selectedAccount, setSelectedAccount] = React.useState();
|
|
20
23
|
const [softwares, setSoftwares] = React.useState([]);
|
|
21
24
|
const { refreshCounter } = useRefresh();
|
|
25
|
+
const { expanded, setExpanded } = useSidebarExpandedState();
|
|
26
|
+
const { open, setOpen } = useSidebar();
|
|
27
|
+
const [roles, setRoles] = React.useState([]);
|
|
28
|
+
// Sub menu (app sidebar) drives the rail inversely: whenever the sub menu is
|
|
29
|
+
// toggled — including from the header trigger — collapse/expand the rail to
|
|
30
|
+
// the opposite state. Single trigger (`open`), so there is no feedback loop.
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
setExpanded(!open);
|
|
33
|
+
}, [open]);
|
|
22
34
|
const getInitials = (name) => {
|
|
23
35
|
return name
|
|
24
36
|
.split(" ")
|
|
@@ -42,6 +54,7 @@ export const MainSidebar = ({ baseUrl, platformUrl, }) => {
|
|
|
42
54
|
isSetToken: true,
|
|
43
55
|
});
|
|
44
56
|
const decoded = jwtDecode(accessToken !== null && accessToken !== void 0 ? accessToken : "");
|
|
57
|
+
setRoles(decoded.platformAccess.roles);
|
|
45
58
|
// Fetch all data in parallel
|
|
46
59
|
const [userResponse, accountsResponse, softwaresResponse] = await Promise.all([
|
|
47
60
|
axios.get(`${baseUrl}/platform/user/${decoded.sub}`, {
|
|
@@ -96,9 +109,9 @@ export const MainSidebar = ({ baseUrl, platformUrl, }) => {
|
|
|
96
109
|
throw error;
|
|
97
110
|
}
|
|
98
111
|
};
|
|
99
|
-
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs("aside", { className: "fixed left-0 top-0 z-20 h-screen
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs("aside", { className: cn("fixed left-0 top-0 z-20 h-screen border-r border-border bg-sidebar text-sidebar-foreground flex flex-col py-4 transition-[width] duration-200 ease-in-out", expanded ? "w-56 items-stretch px-2" : "w-12 items-center"), children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "default", className: cn("mb-4 h-8 rounded-lg", expanded ? "w-full justify-start gap-3 px-2" : "w-8 p-0"), disabled: !selectedAccount, children: [_jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center text-base font-medium text-accent-foreground", children: selectedAccount
|
|
113
|
+
? getInitials(selectedAccount.accountName)
|
|
114
|
+
: "..." }), expanded && (_jsx("span", { className: "truncate text-sm font-medium", children: (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountName) || "Account" }))] }) }), _jsxs(DropdownMenuContent, { className: "w-55", side: "right", sideOffset: 8, align: "start", children: [_jsx("div", { className: "px-2 py-1.5 text-xs font-semibold text-foreground", children: "Accounts" }), accounts.map((account) => (_jsxs(DropdownMenuItem, { className: "flex items-center justify-between cursor-pointer", onClick: async () => {
|
|
102
115
|
try {
|
|
103
116
|
setSelectedAccount(account);
|
|
104
117
|
console.log(account.accountId);
|
|
@@ -108,12 +121,17 @@ export const MainSidebar = ({ baseUrl, platformUrl, }) => {
|
|
|
108
121
|
catch (error) {
|
|
109
122
|
console.error("Switch account failed", error);
|
|
110
123
|
}
|
|
111
|
-
}, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-6 w-6 rounded bg-primary/10 flex items-center justify-center", children: _jsx("span", { className: "text-xs font-medium text-primary", children: getInitials(account.accountName) }) }), _jsx("span", { className: "text-sm", children: account.accountName })] }), (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountId) === account.accountId && (_jsx(Check, { className: "h-4 w-4 text-primary" }))] }, account.accountId)))] })] }), _jsx("nav", { className: "flex flex-col gap-1", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: `${platformUrl}/home`, children: [_jsx(Home, { className: "h-8 w-8" }), _jsx("span", { className: "sr-only", children: "Home" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Home" })] }, "home") }), _jsx("nav", { className: "flex flex-col gap-1 flex-1", children: softwares.map((software) => {
|
|
124
|
+
}, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-6 w-6 rounded bg-primary/10 flex items-center justify-center", children: _jsx("span", { className: "text-xs font-medium text-primary", children: getInitials(account.accountName) }) }), _jsx("span", { className: "text-sm", children: account.accountName })] }), (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountId) === account.accountId && (_jsx(Check, { className: "h-4 w-4 text-primary" }))] }, account.accountId)))] })] }), _jsx("nav", { className: "flex flex-col gap-1 w-full", children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", size: "icon", className: cn("h-10", expanded ? "w-full justify-start gap-3 px-3" : "w-10"), asChild: true, children: _jsxs(Link, { href: `${platformUrl}/home`, children: [_jsx(Home, { className: "h-8 w-8 shrink-0" }), expanded ? (_jsx("span", { className: "truncate text-sm", children: "Home" })) : (_jsx("span", { className: "sr-only", children: "Home" }))] }) }) }), !expanded && (_jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Home" }))] }, "home") }), _jsx("nav", { className: "flex flex-col gap-1 flex-1 w-full", children: softwares.map((software) => {
|
|
112
125
|
var _a, _b;
|
|
113
126
|
const hasIcon = Boolean(software.icon && software.icon.trim() !== "");
|
|
114
|
-
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: (_a = software.url) !== null && _a !== void 0 ? _a : "#", children: [hasIcon ? (_jsx(Icon, { name: toPascalCase((_b = software.icon) !== null && _b !== void 0 ? _b : ""), className: "h-8 w-8" })) : (_jsx(FolderCode, { className: "h-8 w-8" })), _jsx("span", { className: "sr-only", children: software.displayName })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: software.displayName })] }, software.displayName));
|
|
115
|
-
}) }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", className: "h-10 w-10", asChild: true, children: _jsxs(Link, { href: `${platformUrl}/settings`, children: [_jsx(Settings, { className: "h-8 w-8" }), _jsx("span", { className: "sr-only", children: "Settings" })] }) }) }), _jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Settings" })] }, "settings"), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children:
|
|
127
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", size: "icon", className: cn("h-10", expanded ? "w-full justify-start gap-3 px-3" : "w-10"), asChild: true, children: _jsxs(Link, { href: (_a = software.url) !== null && _a !== void 0 ? _a : "#", children: [hasIcon ? (_jsx(Icon, { name: toPascalCase((_b = software.icon) !== null && _b !== void 0 ? _b : ""), className: "h-8 w-8 shrink-0" })) : (_jsx(FolderCode, { className: "h-8 w-8 shrink-0" })), expanded ? (_jsx("span", { className: "truncate text-sm", children: software.displayName })) : (_jsx("span", { className: "sr-only", children: software.displayName }))] }) }) }), !expanded && (_jsx(TooltipContent, { side: "right", sideOffset: 5, children: software.displayName }))] }, software.displayName));
|
|
128
|
+
}) }), ((roles === null || roles === void 0 ? void 0 : roles.includes("ADMIN")) || (roles === null || roles === void 0 ? void 0 : roles.includes("DEVELOPER")) || (roles === null || roles === void 0 ? void 0 : roles.includes("SUPERADMIN"))) && (_jsx(_Fragment, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", className: cn("h-10", expanded ? "w-full justify-start gap-3 px-3" : "w-10"), asChild: true, children: _jsxs("a", { href: releaseOpsUrl, target: "_blank", rel: "noopener noreferrer", children: [_jsx(LoaderPinwheel, { className: "h-8 w-8 shrink-0" }), expanded ? (_jsx("span", { className: "truncate text-sm", children: "Release Ops." })) : (_jsx("span", { className: "sr-only", children: "Release Ops." }))] }) }) }), !expanded && (_jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Release Ops." }))] }, "release-ops") })), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, className: "h-8 w-8", children: _jsx(Button, { variant: "ghost", className: cn("h-10", expanded ? "w-full justify-start gap-3 px-3" : "w-10"), asChild: true, children: _jsxs(Link, { href: `${platformUrl}/settings`, children: [_jsx(Settings, { className: "h-8 w-8 shrink-0" }), expanded ? (_jsx("span", { className: "truncate text-sm", children: "Settings" })) : (_jsx("span", { className: "sr-only", children: "Settings" }))] }) }) }), !expanded && (_jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Settings" }))] }, "settings"), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "icon", className: cn("h-10", expanded ? "w-full justify-start gap-3 px-3" : "w-10"), children: [_jsx(CircleUserRound, { className: "h-8 w-8 shrink-0" }), expanded && (_jsx("span", { className: "truncate text-sm font-medium", children: (user === null || user === void 0 ? void 0 : user.userName) || "Profile" }))] }) }), _jsxs(DropdownMenuContent, { className: "w-55 p-0", side: "right", sideOffset: 8, children: [_jsxs("div", { className: "flex items-start gap-3 p-4 bg-card", children: [_jsx(CircleUserRound, { className: "h-8 w-8" }), _jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-bold text-foreground blue-dark:text-muted-foreground truncate", children: user === null || user === void 0 ? void 0 : user.userName }), _jsx("p", { className: "text-xs text-muted-foreground truncate", children: user === null || user === void 0 ? void 0 : user.userEmail }), _jsx("p", { className: "text-sm text-muted-foreground font-semibold", children: selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountName })] })] }), _jsx(DropdownMenuSeparator, { className: "my-0" }), _jsxs(DropdownMenuItem, { onClick: async () => {
|
|
116
129
|
await clearAllCookieSession();
|
|
117
130
|
redirect(`${platformUrl}/login.html`);
|
|
118
|
-
}, className: "flex items-center gap-2 px-4 py-3 cursor-pointer focus:bg-destructive dark:focus:bg-destructive blue-dark:focus:bg-destructive", children: [_jsx(LogOut, { className: "h-4 w-4 text-foreground" }), _jsx("span", { children: "Log out" })] })] })] })
|
|
131
|
+
}, className: "flex items-center gap-2 px-4 py-3 cursor-pointer focus:bg-destructive dark:focus:bg-destructive blue-dark:focus:bg-destructive", children: [_jsx(LogOut, { className: "h-4 w-4 text-foreground" }), _jsx("span", { children: "Log out" })] })] })] }), _jsx("div", { className: cn("mb-2 flex", expanded ? "justify-end" : "justify-center"), children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: expanded ? "default" : "icon", className: cn("h-8", expanded ? "w-full justify-start gap-3 px-3" : "w-8"), onClick: () => {
|
|
132
|
+
const next = !expanded;
|
|
133
|
+
setExpanded(next);
|
|
134
|
+
// Opening the rail closes the sub menu, and vice versa.
|
|
135
|
+
setOpen(!next);
|
|
136
|
+
}, children: [expanded ? (_jsx(PanelLeftClose, { className: "h-5 w-5 shrink-0" })) : (_jsx(PanelLeftOpen, { className: "h-5 w-5 shrink-0" })), expanded ? (_jsx("span", { className: "truncate text-sm", children: "Collapse" })) : (_jsx("span", { className: "sr-only", children: "Expand sidebar" }))] }) }), !expanded && (_jsx(TooltipContent, { side: "right", sideOffset: 5, children: "Expand sidebar" }))] }, "toggle-sidebar") })] }) }));
|
|
119
137
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { SidebarNavItem } from "./SidebarNavContext";
|
|
3
|
-
export declare function NavMain(): import("react
|
|
3
|
+
export declare function NavMain(): import("react").JSX.Element;
|
|
4
4
|
export declare function RenderSidebarNav({ items, sidebarHeader, sidebarFooter }: {
|
|
5
5
|
items: SidebarNavItem[];
|
|
6
6
|
sidebarHeader?: ReactNode;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface SidebarExpandedContextValue {
|
|
3
|
+
/** Whether the main sidebar rail is expanded into its labeled-panel state. */
|
|
4
|
+
expanded: boolean;
|
|
5
|
+
setExpanded: (value: boolean) => void;
|
|
6
|
+
toggle: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Provides the main sidebar's expanded/collapsed state to the whole layout so
|
|
10
|
+
* that siblings of the rail (app sidebar, header, content, footer) can shift to
|
|
11
|
+
* make room for the expanded panel instead of being covered by it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function SidebarExpandedProvider({ children }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** Full state + setters for the rail (used by the rail itself). */
|
|
17
|
+
export declare const useSidebarExpandedState: () => SidebarExpandedContextValue;
|
|
18
|
+
/** Convenience hook returning just the boolean (used by rail items / layout). */
|
|
19
|
+
export declare const useSidebarExpanded: () => boolean;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useState } from "react";
|
|
4
|
+
const SidebarExpandedContext = createContext({
|
|
5
|
+
expanded: false,
|
|
6
|
+
setExpanded: () => { },
|
|
7
|
+
toggle: () => { },
|
|
8
|
+
});
|
|
9
|
+
/**
|
|
10
|
+
* Provides the main sidebar's expanded/collapsed state to the whole layout so
|
|
11
|
+
* that siblings of the rail (app sidebar, header, content, footer) can shift to
|
|
12
|
+
* make room for the expanded panel instead of being covered by it.
|
|
13
|
+
*/
|
|
14
|
+
export function SidebarExpandedProvider({ children }) {
|
|
15
|
+
const [expanded, setExpanded] = useState(false);
|
|
16
|
+
return (_jsx(SidebarExpandedContext.Provider, { value: {
|
|
17
|
+
expanded,
|
|
18
|
+
setExpanded,
|
|
19
|
+
toggle: () => setExpanded((prev) => !prev),
|
|
20
|
+
}, children: children }));
|
|
21
|
+
}
|
|
22
|
+
/** Full state + setters for the rail (used by the rail itself). */
|
|
23
|
+
export const useSidebarExpandedState = () => useContext(SidebarExpandedContext);
|
|
24
|
+
/** Convenience hook returning just the boolean (used by rail items / layout). */
|
|
25
|
+
export const useSidebarExpanded = () => useContext(SidebarExpandedContext).expanded;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface MultiComboboxProps {
|
|
2
3
|
placeholder: string;
|
|
3
4
|
items: {
|
|
@@ -9,5 +10,5 @@ interface MultiComboboxProps {
|
|
|
9
10
|
defaultValue?: string[];
|
|
10
11
|
defaultOptions?: number;
|
|
11
12
|
}
|
|
12
|
-
export declare function MultiCombobox({ placeholder, items, onValueChange, defaultValue, defaultOptions }: MultiComboboxProps):
|
|
13
|
+
export declare function MultiCombobox({ placeholder, items, onValueChange, defaultValue, defaultOptions }: MultiComboboxProps): React.JSX.Element;
|
|
13
14
|
export {};
|