cloudmr-ux 1.2.3 → 1.3.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/index.css CHANGED
@@ -108,14 +108,11 @@
108
108
  margin-bottom: 4px;
109
109
  }
110
110
 
111
- /* src/CmrComponents/checkbox/Checkbox.css */
112
- .cmr-checkbox {
113
- margin-bottom: 4px;
114
- &__text {
115
- font-size: 16px;
116
- line-height: 15px;
117
- text-align: justify;
118
- }
111
+ /* src/CmrComponents/upload/Upload.css */
112
+ .btn-info {
113
+ color: #ffffff;
114
+ --bs-btn-hover-color: #ffffff;
115
+ --bs-btn-color: #ffffff;
119
116
  }
120
117
 
121
118
  /* src/CmrComponents/label/Label.css */
@@ -137,17 +134,18 @@
137
134
  margin-left: 4px;
138
135
  }
139
136
 
140
- /* src/CmrComponents/input-number/InputNumber.css */
141
-
142
- /* src/CmrComponents/tooltip/Tooltip.css */
143
-
144
- /* src/CmrComponents/upload/Upload.css */
145
- .btn-info {
146
- color: #ffffff;
147
- --bs-btn-hover-color: #ffffff;
148
- --bs-btn-color: #ffffff;
137
+ /* src/CmrComponents/checkbox/Checkbox.css */
138
+ .cmr-checkbox {
139
+ margin-bottom: 4px;
140
+ &__text {
141
+ font-size: 16px;
142
+ line-height: 15px;
143
+ text-align: justify;
144
+ }
149
145
  }
150
146
 
147
+ /* src/CmrComponents/input-number/InputNumber.css */
148
+
151
149
  /* src/CmrTable/CmrTable.css */
152
150
  .css-1lymaxv-MuiDataGrid-root .MuiDataGrid-columnHeader:focus-within,
153
151
  .css-1lymaxv-MuiDataGrid-root .MuiDataGrid-cell:focus-within {
package/dist/index.d.ts CHANGED
@@ -1,27 +1,25 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ButtonProps, SxProps, Theme } from '@mui/material';
3
- import * as React from 'react';
4
- import React__default, { ReactNode, ChangeEvent, CSSProperties, FC } from 'react';
3
+ import React, { ReactNode, ChangeEvent, CSSProperties, FC } from 'react';
5
4
  import { SizeType } from 'antd/lib/config-provider/SizeContext';
6
5
  import { CollapsibleType } from 'antd/es/collapse/CollapsePanel';
7
6
  import { ExpandIconPosition } from 'antd/es/collapse/Collapse';
8
- import { TooltipPlacement } from 'antd/lib/tooltip';
9
7
  import { AxiosRequestConfig, AxiosResponse } from 'axios';
10
8
  import { DataGridProps } from '@mui/x-data-grid';
11
9
 
12
10
  declare const CmrButton: (props: ButtonProps) => react_jsx_runtime.JSX.Element;
13
11
 
14
- interface CmrInputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
12
+ interface CmrInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
15
13
  defaultValue?: string;
16
14
  id?: string;
17
15
  maxLength?: number;
18
16
  size?: SizeType;
19
17
  value?: string;
20
18
  type?: any;
21
- prefix?: React__default.ReactNode;
19
+ prefix?: React.ReactNode;
22
20
  bordered?: boolean;
23
- onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
24
- onPressEnter?: (e: React__default.KeyboardEvent<HTMLInputElement>) => void;
21
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
22
+ onPressEnter?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
25
23
  }
26
24
  declare const CmrInput: (props: CmrInputProps) => react_jsx_runtime.JSX.Element;
27
25
 
@@ -36,7 +34,7 @@ interface CmrRadioProps {
36
34
  defaultValue?: string;
37
35
  onChange?: (value: string) => void;
38
36
  }
39
- declare const CmrRadioGroup: React__default.FC<CmrRadioProps>;
37
+ declare const CmrRadioGroup: React.FC<CmrRadioProps>;
40
38
 
41
39
  interface Option {
42
40
  label: string;
@@ -47,7 +45,7 @@ interface CmrSelectProps {
47
45
  label: string;
48
46
  disabled?: boolean;
49
47
  }
50
- declare const CmrSelect: React__default.FC<CmrSelectProps>;
48
+ declare const CmrSelect: React.FC<CmrSelectProps>;
51
49
 
52
50
  interface CmrCollapseProps {
53
51
  accordion?: boolean;
@@ -63,118 +61,17 @@ interface CmrCollapseProps {
63
61
  }
64
62
  declare const CmrCollapse: (props: CmrCollapseProps) => react_jsx_runtime.JSX.Element;
65
63
 
66
- interface CmrPanelProps extends React__default.HTMLAttributes<HTMLDivElement> {
64
+ interface CmrPanelProps extends React.HTMLAttributes<HTMLDivElement> {
67
65
  activeKey?: string | string[];
68
66
  header: string | undefined;
69
67
  children: ReactNode;
70
68
  panelKey?: number;
71
69
  onToggle?: (key: number | undefined) => void;
72
70
  expanded?: boolean;
73
- cardProps?: React__default.HTMLAttributes<HTMLDivElement>;
71
+ cardProps?: React.HTMLAttributes<HTMLDivElement>;
74
72
  }
75
73
  declare const CmrPanel: (props: CmrPanelProps) => react_jsx_runtime.JSX.Element;
76
74
 
77
- declare function CmrNameDialog(props: {
78
- originalName: string;
79
- renamingCallback: (alias: string) => Promise<boolean>;
80
- open: boolean;
81
- setOpen: (open: boolean) => void;
82
- }): react_jsx_runtime.JSX.Element;
83
-
84
- declare function CmrConfirmation({ name, message, cancelText, color, open, setOpen, confirmCallback, confirmText, cancellable, cancelCallback, width }: {
85
- name: string | undefined;
86
- cancelText?: string;
87
- message: string | undefined;
88
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
89
- open: boolean;
90
- setOpen: (open: boolean) => void;
91
- confirmCallback?: () => void;
92
- cancellable?: boolean;
93
- cancelCallback?: () => void;
94
- width?: number;
95
- confirmText?: string;
96
- }): react_jsx_runtime.JSX.Element;
97
-
98
- declare function CmrDeletionDialog(props: {
99
- name: string | undefined;
100
- deletionCallback: () => void;
101
- }): react_jsx_runtime.JSX.Element;
102
-
103
- interface EditConfirmationProps {
104
- name?: string;
105
- defaultText?: string;
106
- message?: string;
107
- color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
108
- open: boolean;
109
- setOpen: (open: boolean) => void;
110
- confirmCallback?: (text: string) => void;
111
- cancellable?: boolean;
112
- cancelCallback?: (edit: string) => void;
113
- suffix?: string;
114
- }
115
- declare function CmrEditConfirmation({ name, message, defaultText, color, open, setOpen, confirmCallback, cancellable, cancelCallback, suffix }: EditConfirmationProps): react_jsx_runtime.JSX.Element;
116
-
117
- interface TabInfo {
118
- id: number;
119
- text: string;
120
- disable?: boolean;
121
- children: JSX.Element;
122
- }
123
-
124
- interface CmrTabsProps {
125
- tabList: TabInfo[];
126
- onTabSelected?: (tabId: number) => void;
127
- }
128
- declare function CmrTabs(props: CmrTabsProps): react_jsx_runtime.JSX.Element;
129
-
130
- interface CmrCheckboxProps extends React__default.HTMLAttributes<HTMLDivElement> {
131
- autoFocus?: boolean;
132
- checked?: boolean;
133
- defaultChecked?: boolean;
134
- disabled?: boolean;
135
- indeterminate?: boolean;
136
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
137
- children?: any;
138
- style?: any;
139
- sx?: any;
140
- }
141
- declare const CmrCheckbox: (props: CmrCheckboxProps) => react_jsx_runtime.JSX.Element;
142
-
143
- interface CmrLabelProps extends React__default.HTMLAttributes<HTMLDivElement> {
144
- required?: boolean;
145
- children?: any;
146
- }
147
- declare const CmrLabel: (props: CmrLabelProps) => react_jsx_runtime.JSX.Element;
148
-
149
- interface CmrInputNumberProps {
150
- defaultValue?: number;
151
- disabled?: boolean;
152
- keyboard?: boolean;
153
- max?: number;
154
- min?: number;
155
- size?: SizeType;
156
- value?: number;
157
- onChange?: (value: number | null) => void;
158
- children?: React__default.ReactNode;
159
- style?: CSSProperties;
160
- }
161
- declare const CmrInputNumber: (props: CmrInputNumberProps) => react_jsx_runtime.JSX.Element;
162
-
163
- interface CmrTooltipProps {
164
- arrowPointAtCenter?: boolean;
165
- autoAdjustOverflow?: boolean;
166
- color?: string;
167
- defaultVisible?: boolean;
168
- mouseEnterDelay?: number;
169
- mouseLeaveDelay?: number;
170
- overlayClassName?: string;
171
- placement?: TooltipPlacement;
172
- visible?: boolean;
173
- title: React__default.ReactNode;
174
- overlay?: React__default.ReactNode;
175
- }
176
- declare const CmrTooltip: (props: CmrTooltipProps) => react_jsx_runtime.JSX.Element;
177
-
178
75
  interface LambdaFile {
179
76
  "filename": string;
180
77
  "filetype": string;
@@ -187,7 +84,7 @@ interface LambdaFile {
187
84
  * functionalities and call back methods evoked
188
85
  * for specific interactions
189
86
  */
190
- interface CMRUploadProps extends React__default.HTMLAttributes<HTMLDivElement> {
87
+ interface CMRUploadProps extends React.HTMLAttributes<HTMLDivElement> {
191
88
  retains?: boolean;
192
89
  maxCount: number;
193
90
  changeNameAfterUpload?: boolean;
@@ -255,48 +152,91 @@ declare const CmrUpload: {
255
152
  };
256
153
  };
257
154
 
258
- interface CMRSelectUploadProps extends CMRUploadProps {
259
- /**
260
- * A selection of currently uploaded files
261
- */
262
- fileSelection: UploadedFile[];
263
- onSelected: (file?: UploadedFile) => void;
264
- chosenFile?: string;
265
- buttonText?: string;
266
- /**
267
- * Enforces the extension of selected files
268
- */
269
- fileExtension?: string;
155
+ declare function CmrNameDialog(props: {
156
+ originalName: string;
157
+ renamingCallback: (alias: string) => Promise<boolean>;
158
+ open: boolean;
159
+ setOpen: (open: boolean) => void;
160
+ }): react_jsx_runtime.JSX.Element;
161
+
162
+ declare function CmrConfirmation({ name, message, cancelText, color, open, setOpen, confirmCallback, confirmText, cancellable, cancelCallback, width }: {
163
+ name: string | undefined;
164
+ cancelText?: string;
165
+ message: string | undefined;
166
+ color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
167
+ open: boolean;
168
+ setOpen: (open: boolean) => void;
169
+ confirmCallback?: () => void;
170
+ cancellable?: boolean;
171
+ cancelCallback?: () => void;
172
+ width?: number;
173
+ confirmText?: string;
174
+ }): react_jsx_runtime.JSX.Element;
175
+
176
+ declare function CmrDeletionDialog(props: {
177
+ name: string | undefined;
178
+ deletionCallback: () => void;
179
+ }): react_jsx_runtime.JSX.Element;
180
+
181
+ interface EditConfirmationProps {
182
+ name?: string;
183
+ defaultText?: string;
184
+ message?: string;
185
+ color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
186
+ open: boolean;
187
+ setOpen: (open: boolean) => void;
188
+ confirmCallback?: (text: string) => void;
189
+ cancellable?: boolean;
190
+ cancelCallback?: (edit: string) => void;
191
+ suffix?: string;
270
192
  }
271
- interface UploadedFile {
193
+ declare function CmrEditConfirmation({ name, message, defaultText, color, open, setOpen, confirmCallback, cancellable, cancelCallback, suffix }: EditConfirmationProps): react_jsx_runtime.JSX.Element;
194
+
195
+ interface TabInfo {
272
196
  id: number;
273
- fileName: string;
274
- link: string;
275
- md5?: string;
276
- size: string;
277
- status: string;
278
- createdAt: string;
279
- updatedAt: string;
280
- database: string;
281
- location: string;
197
+ text: string;
198
+ disable?: boolean;
199
+ children: JSX.Element;
200
+ }
201
+
202
+ interface CmrTabsProps {
203
+ tabList: TabInfo[];
204
+ onTabSelected?: (tabId: number) => void;
282
205
  }
283
- /**
284
- * Select from a set of uploaded files or upload new
285
- */
286
- declare const CMRSelectUpload: (props: CMRSelectUploadProps) => react_jsx_runtime.JSX.Element;
206
+ declare function CmrTabs(props: CmrTabsProps): react_jsx_runtime.JSX.Element;
287
207
 
288
- interface UploadWindowProps {
289
- upload: (file: File, fileAlias: string, fileDatabase: string) => Promise<number>;
290
- open: boolean;
291
- setOpen: React.Dispatch<React.SetStateAction<boolean>>;
292
- fileExtension?: string;
293
- template?: {
294
- showFileName?: boolean;
295
- showDatabase?: boolean;
296
- showFileSize?: boolean;
297
- };
208
+ interface CmrCheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
209
+ autoFocus?: boolean;
210
+ checked?: boolean;
211
+ defaultChecked?: boolean;
212
+ disabled?: boolean;
213
+ indeterminate?: boolean;
214
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
215
+ children?: any;
216
+ style?: any;
217
+ sx?: any;
298
218
  }
299
- declare function CmrUploadWindow({ upload, open, setOpen, fileExtension, template, }: UploadWindowProps): react_jsx_runtime.JSX.Element;
219
+ declare const CmrCheckbox: (props: CmrCheckboxProps) => react_jsx_runtime.JSX.Element;
220
+
221
+ interface CmrLabelProps extends React.HTMLAttributes<HTMLDivElement> {
222
+ required?: boolean;
223
+ children?: any;
224
+ }
225
+ declare const CmrLabel: (props: CmrLabelProps) => react_jsx_runtime.JSX.Element;
226
+
227
+ interface CmrInputNumberProps {
228
+ defaultValue?: number;
229
+ disabled?: boolean;
230
+ keyboard?: boolean;
231
+ max?: number;
232
+ min?: number;
233
+ size?: SizeType;
234
+ value?: number;
235
+ onChange?: (value: number | null) => void;
236
+ children?: React.ReactNode;
237
+ style?: CSSProperties;
238
+ }
239
+ declare const CmrInputNumber: (props: CmrInputNumberProps) => react_jsx_runtime.JSX.Element;
300
240
 
301
241
  interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
302
242
  dataSource: any[];
@@ -308,4 +248,4 @@ interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
308
248
 
309
249
  declare const CmrTable: FC<CmrTableProps>;
310
250
 
311
- export { CMRSelectUpload, CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrInputNumber, CmrLabel, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, CmrTooltip, CmrUploadWindow, LambdaFile };
251
+ export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrInputNumber, CmrLabel, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };