@cloudwick/astral-ui 2.1.0 → 3.0.0

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  UI Library for Cloudwick
4
4
 
5
- Version - 2.1.0
5
+ Version - 3.0.0
6
6
 
7
7
  ## Installation
8
8
 
@@ -27,7 +27,7 @@ export declare const iconList: {
27
27
  readonly appFlow: "app-flow";
28
28
  readonly appManagement: "app-management";
29
29
  readonly appNavigator: "app-navigator";
30
- readonly approve: "approve";
30
+ readonly checkMark: "check-mark";
31
31
  readonly apps: "apps";
32
32
  readonly arrowTurnLeft: "arrow-turn-left";
33
33
  readonly attachment: "attachment";
@@ -64,7 +64,7 @@ export declare const iconList: {
64
64
  readonly checkCircle: "check-circle";
65
65
  readonly checkCircleFilled: "check-circle-filled";
66
66
  readonly circle: "circle";
67
- readonly circleOutline: "circle-outline";
67
+ readonly circleFilled: "circle-filled";
68
68
  readonly clone: "clone";
69
69
  readonly code: "code";
70
70
  readonly codeCog: "code-cog";
@@ -77,11 +77,13 @@ export declare const iconList: {
77
77
  readonly currentBalance: "current-balance";
78
78
  readonly customIcon: "custom-icon";
79
79
  readonly customModel: "custom-model";
80
+ readonly danger: "danger";
80
81
  readonly dashboard: "dashboard";
81
82
  readonly database: "database";
82
83
  readonly databaseMaintenance: "database-maintenance";
83
84
  readonly dataClassifications: "data-classifications";
84
85
  readonly dataLake: "data-lake";
86
+ readonly dataPipeline: "data-pipeline";
85
87
  readonly dataset: "dataset";
86
88
  readonly dataView: "data-view";
87
89
  readonly dataWarehouse: "data-warehouse";
@@ -90,9 +92,11 @@ export declare const iconList: {
90
92
  readonly disable: "disable";
91
93
  readonly disableMFA: "disable-mfa";
92
94
  readonly disconnect: "disconnect";
95
+ readonly documentUpload: "document-upload";
93
96
  readonly domains: "domains";
94
97
  readonly doubleCheck: "double-check";
95
98
  readonly downArrow: "down-arrow";
99
+ readonly downArrowLong: "down-arrow-long";
96
100
  readonly download: "download";
97
101
  readonly drag: "drag";
98
102
  readonly edit: "edit";
@@ -101,6 +105,7 @@ export declare const iconList: {
101
105
  readonly email: "email";
102
106
  readonly entityRecognizer: "entity-recognizer";
103
107
  readonly etl: "etl";
108
+ readonly etlJobSetting: "etl-job-setting";
104
109
  readonly etlLibrary: "etl-library";
105
110
  readonly exclamationCircle: "exclamation-circle";
106
111
  readonly execute: "execute";
@@ -118,8 +123,10 @@ export declare const iconList: {
118
123
  readonly fileInfo: "file-info";
119
124
  readonly fileloadValidate: "fileload-validate";
120
125
  readonly fileLog: "file-log";
126
+ readonly fileSearch: "file-search";
121
127
  readonly fileSuccess: "file-success";
122
128
  readonly fileSync: "file-sync";
129
+ readonly fileVerified: "file-verified";
123
130
  readonly fileWarning: "file-warning";
124
131
  readonly filter: "filter";
125
132
  readonly filterFunnel: "filter-funnel";
@@ -144,14 +151,16 @@ export declare const iconList: {
144
151
  readonly ingestion: "ingestion";
145
152
  readonly insights: "insights";
146
153
  readonly key: "key";
147
- readonly language: "language";
148
154
  readonly leftArrow: "left-arrow";
149
155
  readonly leftArrowLong: "left-arrow-long";
150
156
  readonly licenseInfo: "license-info";
151
157
  readonly lineage: "lineage";
152
158
  readonly link: "link";
159
+ readonly listSearch: "list-search";
153
160
  readonly listView: "list-view";
154
161
  readonly lock: "lock";
162
+ readonly logout: "logout";
163
+ readonly mailOpen: "mail-open";
155
164
  readonly mailServer: "mail-server";
156
165
  readonly management: "management";
157
166
  readonly managementRole: "management-role";
@@ -177,13 +186,16 @@ export declare const iconList: {
177
186
  readonly parametersStore: "parameters-store";
178
187
  readonly password: "password";
179
188
  readonly pause: "pause";
189
+ readonly pauseFilled: "pause-filled";
180
190
  readonly payload: "payload";
181
191
  readonly pencil: "pencil";
182
192
  readonly pipeline: "pipeline";
193
+ readonly play: "play";
194
+ readonly playFilled: "play-filled";
183
195
  readonly postgres: "postgres";
184
- readonly profile: "profile";
185
196
  readonly qrCode: "qr-code";
186
197
  readonly queryEngine: "query-engine";
198
+ readonly reload: "reload";
187
199
  readonly removeUser: "remove-user";
188
200
  readonly repair: "repair";
189
201
  readonly restart: "restart";
@@ -214,6 +226,8 @@ export declare const iconList: {
214
226
  readonly spinner: "spinner";
215
227
  readonly sqlServer: "sql-server";
216
228
  readonly statistic: "statistic";
229
+ readonly stop: "stop";
230
+ readonly stopFilled: "stop-filled";
217
231
  readonly stream: "stream";
218
232
  readonly switchRole: "switch-role";
219
233
  readonly sync: "sync";
@@ -230,12 +244,15 @@ export declare const iconList: {
230
244
  readonly time: "time";
231
245
  readonly timesCircle: "times-circle";
232
246
  readonly timesCircleFilled: "times-circle-filled";
247
+ readonly translate: "translate";
233
248
  readonly tree: "tree";
234
249
  readonly upArrow: "up-arrow";
250
+ readonly upArrowLong: "up-arrow-long";
235
251
  readonly upload: "upload";
236
252
  readonly usageByService: "usage-by-service";
237
253
  readonly user: "user";
238
254
  readonly userAgreements: "user-agreements";
255
+ readonly username: "username";
239
256
  readonly video: "video";
240
257
  readonly vMenu: "v-menu";
241
258
  readonly vMenuFilled: "v-menu-filled";
@@ -243,11 +260,6 @@ export declare const iconList: {
243
260
  readonly workflow: "workflow";
244
261
  readonly zoomIn: "zoom-in";
245
262
  readonly zoomOut: "zoom-out";
246
- readonly username: "username";
247
- readonly logout: "logout";
248
- readonly reload: "reload";
249
- readonly downArrowLong: "down-arrow-long";
250
- readonly upArrowLong: "up-arrow-long";
251
263
  };
252
264
  export type IconType = (typeof iconList)[keyof typeof iconList];
253
265
  export declare const icons: {
@@ -11,7 +11,7 @@ export interface IBadgeProps extends HTMLAttributes<HTMLDivElement> {
11
11
  * Variants for the badge
12
12
  * @default filled
13
13
  */
14
- variant?: "filled" | "outline" | "text";
14
+ variant?: "filled" | "outline" | "text" | "ghost";
15
15
  /**
16
16
  * Color of the Badge to be rendered
17
17
  * @default primary
@@ -7,7 +7,7 @@ export declare const basicFilters: ({
7
7
  id: string;
8
8
  title: string;
9
9
  placeholder: string;
10
- icon: "profile";
10
+ icon: "user";
11
11
  } | {
12
12
  options: {
13
13
  label: number;
@@ -18,7 +18,7 @@ export declare const basicFilters: ({
18
18
  placeholder: string;
19
19
  icon: "access-request";
20
20
  })[];
21
- export declare const columns: IColumn[];
21
+ export declare const dataColumns: IColumn[];
22
22
  export declare const posts: {
23
23
  userId: number;
24
24
  id: number;
@@ -42,7 +42,8 @@ export declare const basicFilterOptions: ({
42
42
  title: string;
43
43
  placeholder: string;
44
44
  icon: "statistic";
45
- multiSelect?: undefined;
45
+ isMulti?: undefined;
46
+ maxVisibleValues?: undefined;
46
47
  } | {
47
48
  options: {
48
49
  value: string;
@@ -52,7 +53,8 @@ export declare const basicFilterOptions: ({
52
53
  title: string;
53
54
  placeholder: string;
54
55
  icon: "table-pivot";
55
- multiSelect: boolean;
56
+ isMulti: boolean;
57
+ maxVisibleValues: number;
56
58
  } | {
57
59
  options: {
58
60
  value: string;
@@ -62,7 +64,8 @@ export declare const basicFilterOptions: ({
62
64
  title: string;
63
65
  placeholder: string;
64
66
  icon: "globe";
65
- multiSelect?: undefined;
67
+ isMulti?: undefined;
68
+ maxVisibleValues?: undefined;
66
69
  })[];
67
70
  export declare const advancedFilterOptions: ({
68
71
  options: {
@@ -73,7 +76,7 @@ export declare const advancedFilterOptions: ({
73
76
  title: string;
74
77
  subTitle: string;
75
78
  icon: "bookmark";
76
- multiSelect: boolean;
79
+ isMulti: boolean;
77
80
  } | {
78
81
  options: {
79
82
  value: string;
@@ -83,7 +86,7 @@ export declare const advancedFilterOptions: ({
83
86
  title: string;
84
87
  subTitle: string;
85
88
  icon: "tag";
86
- multiSelect?: undefined;
89
+ isMulti?: undefined;
87
90
  })[];
88
91
  export declare const dummydatasetListColumn: ({
89
92
  key: string;
@@ -1,18 +1,46 @@
1
- import { ReactNode } from "react";
2
- import { CellContext, OnChangeFn, type SortingState, type ColumnHelper, type SortingFnOption } from "@tanstack/react-table";
1
+ import { type ReactNode } from "react";
2
+ import { CellContext, OnChangeFn, type SortingState, type SortingFnOption } from "@tanstack/react-table";
3
+ import { Props as ITextFieldProps } from "../textField";
3
4
  import { type Props as ISelectProps } from "../select";
4
5
  import { type IconType } from "../adpIcon";
5
6
  export type IColumn = {
6
7
  id?: string;
7
8
  key: string;
8
- header: any;
9
+ header?: any;
9
10
  cell?: (row: CellContext<any, any>) => ReactNode;
11
+ /**
12
+ * A fixed column -
13
+ * * Cannot be re-ordered or hidden using the Column Preference panel
14
+ * * The column will always be placed on the left side of the table irrespective of the index of the column configuration in IColumn[]
15
+ *
16
+ * @default false
17
+ */
10
18
  fixed?: boolean;
19
+ /**
20
+ * Handle the visibility of the column
21
+ * @default false
22
+ */
11
23
  selected?: boolean;
24
+ /**
25
+ * To make the column sortable
26
+ * @default true
27
+ */
12
28
  enableSorting?: boolean;
29
+ /**
30
+ * To make the column resizable
31
+ * @default true
32
+ */
13
33
  enableResizing?: boolean;
14
34
  sortingFn?: SortingFnOption<any>;
35
+ /**
36
+ * To adjust the width of the column
37
+ */
15
38
  size?: number;
39
+ /**
40
+ * Hides the column from the Column Preference panel
41
+ * @default false
42
+ */
43
+ hideColPreference?: boolean;
16
44
  };
17
45
  export interface FilterItem extends ISelectProps {
18
46
  selectedValue?: any;
@@ -25,8 +53,18 @@ interface AdvancedFilterItem extends FilterItem {
25
53
  setSelectedValue?: (val: any) => void;
26
54
  subTitle?: string;
27
55
  }
56
+ interface ISearchProps extends Pick<ITextFieldProps, "placeholder" | "hidden" | "onChange" | "value"> {
57
+ /**
58
+ * Props to control the onSearch function debounceTime
59
+ */
60
+ debounceTime: number;
61
+ /**
62
+ * Attach the debounced search function
63
+ */
64
+ onSearch: (value: string) => void;
65
+ }
28
66
  interface IPaginationProps {
29
- onPageSizeChange?: (args: number) => number;
67
+ onPageSizeChange?: (args: number) => void;
30
68
  onPageChange?: (args: number) => void;
31
69
  totalRecords?: number;
32
70
  offset?: number;
@@ -141,7 +179,15 @@ interface ITableProps<T> {
141
179
  * To add the custom CTAs
142
180
  */
143
181
  customCTAs?: ReactNode;
182
+ /**
183
+ * Callback function triggered on change of Column Preferences.
184
+ * @param columns - columns array with updated order and selected key value
185
+ */
186
+ setColumns: (columns: IColumn[]) => void;
187
+ /**
188
+ * Allows to set search textfield props.
189
+ */
190
+ searchProps: ISearchProps;
144
191
  }
145
- export declare const deriveConfiguredColumns: (rawColumns: IColumn[], selectable: boolean, columnHelper: ColumnHelper<any>) => import("@tanstack/react-table").AccessorKeyColumnDef<any, any>[];
146
- export declare const DataTable: <T extends object>({ advancedFilters, basicFilters, className, columns, data, filters, loading, paginationProps, resizable, selectable, setFilters, sorting, columnVirtualization, rowVirtualization, setSorting, onRefresh, onRowSelection, height, pageSizeOptions, customCTAs }: ITableProps<T>) => ReactNode;
192
+ export declare const DataTable: <T extends object>({ advancedFilters, basicFilters, className, columns, data, filters, loading, paginationProps, resizable, selectable, sorting, columnVirtualization, rowVirtualization, height, pageSizeOptions, customCTAs, searchProps, setFilters, setSorting, onRefresh, onRowSelection, setColumns }: ITableProps<T>) => ReactNode;
147
193
  export default DataTable;
@@ -1,9 +1,10 @@
1
1
  export type IRecordsChangeModal = {
2
2
  show: boolean;
3
3
  toggleVisibility: () => void;
4
- setPageSize: (args: number) => void;
4
+ onPageSizeChange?: (args: number) => void;
5
+ onPageChange?: (args: number) => void;
5
6
  pageSize: number;
6
7
  pageSizeOptions?: number[];
7
8
  };
8
- declare const PageSizeModal: ({ show, pageSize, pageSizeOptions, toggleVisibility, setPageSize }: IRecordsChangeModal) => import("react/jsx-runtime").JSX.Element;
9
+ declare const PageSizeModal: ({ show, pageSize, pageSizeOptions, toggleVisibility, onPageSizeChange: setPageSize, onPageChange }: IRecordsChangeModal) => import("react/jsx-runtime").JSX.Element;
9
10
  export default PageSizeModal;
@@ -1,10 +1,6 @@
1
- import { type ColumnHelper } from "@tanstack/react-table";
2
1
  import { type IColumn } from ".";
3
- declare const Settings: ({ fields, setFields, selectable, columns, columnHelper }: {
4
- fields: any[];
5
- setFields: (args: any) => void;
6
- selectable: boolean;
2
+ declare const Settings: ({ columns, setColumns }: {
7
3
  columns: IColumn[];
8
- columnHelper: ColumnHelper<any>;
4
+ setColumns: (columns: IColumn[]) => void;
9
5
  }) => import("react/jsx-runtime").JSX.Element;
10
6
  export default Settings;
@@ -0,0 +1,3 @@
1
+ import { ColumnHelper } from "@tanstack/react-table";
2
+ import { IColumn } from ".";
3
+ export declare const deriveConfiguredColumns: (rawColumns: IColumn[], selectable: boolean, columnHelper: ColumnHelper<any>) => import("@tanstack/react-table").AccessorKeyColumnDef<any, any>[];
@@ -0,0 +1,58 @@
1
+ import React from "react";
2
+ export interface FileUploadProps {
3
+ /**
4
+ * Array of accepted file extensions
5
+ * @example [".json", ".csv"]
6
+ * @default []
7
+ */
8
+ acceptedExtensions: string[];
9
+ /**
10
+ * Custom message displayed in the drop area
11
+ */
12
+ dropAreaCustomMessage?: React.ReactNode;
13
+ /**
14
+ * State tracking the upload progress and error messages for each file.
15
+ * @default null
16
+ */
17
+ uploadState: Record<string, {
18
+ error: boolean;
19
+ helperText?: React.ReactNode;
20
+ progress: number;
21
+ }> | null;
22
+ /**
23
+ * Determines if multiple file uploads are allowed.
24
+ * When `false`, only one file can be selected or dropped at a time.
25
+ * @default true
26
+ */
27
+ multiple?: boolean;
28
+ /**
29
+ * Disables the upload functionality.
30
+ * @default false
31
+ */
32
+ disabled?: boolean;
33
+ /**
34
+ * Additional informational text to display about file requirements or upload instructions.
35
+ * @default null
36
+ */
37
+ infoText?: React.ReactNode;
38
+ /**
39
+ * Maximum allowed file size in bytes.
40
+ * @example 5 * 1024 * 1024 (5 MB)
41
+ */
42
+ maxFileSize?: number;
43
+ /**
44
+ * Function to retry uploading files that failed during the initial upload attempt.
45
+ * Called when user wants to retry uploading files that encountered errors.
46
+ */
47
+ retryFailedUpload?: () => void;
48
+ /**
49
+ * Function to reset the upload state.
50
+ */
51
+ resetUploadState: () => void;
52
+ /**
53
+ * Function triggered after file validation to handle the upload logic.
54
+ * Receives either a single file or an array of files based on the `multiple` prop.
55
+ */
56
+ handleUpload: (file: File | File[]) => void;
57
+ }
58
+ export declare const FileUpload: ({ acceptedExtensions, dropAreaCustomMessage, resetUploadState, handleUpload, uploadState, multiple, disabled, infoText, maxFileSize, retryFailedUpload }: FileUploadProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ interface StatusCardProps {
3
+ fileEntry: {
4
+ file: File;
5
+ state: string;
6
+ };
7
+ uploadState: Record<string, {
8
+ error: boolean;
9
+ helperText?: React.ReactNode;
10
+ progress: number;
11
+ }> | null;
12
+ maxFileSize?: number;
13
+ disabled: boolean;
14
+ acceptedExtensions: string[];
15
+ removeFile: (fileName: string) => void;
16
+ }
17
+ export declare const StatusCard: ({ fileEntry, uploadState, maxFileSize, disabled, acceptedExtensions, removeFile }: StatusCardProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1 @@
1
+ export declare const AllStateStory: () => import("react/jsx-runtime").JSX.Element;
@@ -51,7 +51,7 @@ export interface Props {
51
51
  /**
52
52
  * Additional information or guidance displayed below the text field.
53
53
  */
54
- helperText?: string;
54
+ helperText?: ReactNode;
55
55
  /**
56
56
  * Error state for showing error message.
57
57
  */
@@ -22,7 +22,7 @@ export interface Props extends Omit<React.ComponentPropsWithoutRef<"input">, "cs
22
22
  /**
23
23
  * Additional information or guidance displayed below the text field.
24
24
  */
25
- helperText?: string | ReactNode;
25
+ helperText?: ReactNode;
26
26
  /**
27
27
  * Pass a boolean value to indicate if the text field is in an error state.
28
28
  */