@majoo-ui/react 1.52.7 → 1.52.8
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.
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type * as Stitches from '@stitches/react';
|
|
3
3
|
import { CSS } from '../../config/stitches.config';
|
|
4
4
|
export declare const ButtonPrimitive: import("@stitches/react/types/styled-component").StyledComponent<"button", {
|
|
5
|
-
buttonType?: "primary" | "secondary" | "ghost" | "negative" | "negative-secondary" | "headerMenu" | "tableMenu" | undefined;
|
|
5
|
+
buttonType?: "primary" | "secondary" | "ghost" | "negative" | "negative-secondary" | "negative-ghost" | "headerMenu" | "tableMenu" | undefined;
|
|
6
6
|
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
7
7
|
iconSize?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
8
8
|
}, {
|
|
@@ -129,7 +129,7 @@ interface AdditionalButtonProps extends React.ComponentPropsWithoutRef<'button'>
|
|
|
129
129
|
css?: CSS;
|
|
130
130
|
}
|
|
131
131
|
export declare const Button: React.ForwardRefExoticComponent<import("@stitches/react/types/styled-component").TransformProps<{
|
|
132
|
-
buttonType?: "primary" | "secondary" | "ghost" | "negative" | "negative-secondary" | "headerMenu" | "tableMenu" | undefined;
|
|
132
|
+
buttonType?: "primary" | "secondary" | "ghost" | "negative" | "negative-secondary" | "negative-ghost" | "headerMenu" | "tableMenu" | undefined;
|
|
133
133
|
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
134
134
|
iconSize?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
135
135
|
}, {
|
|
@@ -63,6 +63,13 @@ export interface InputDatePickerProps {
|
|
|
63
63
|
* Specify the maximum date.
|
|
64
64
|
*/
|
|
65
65
|
maxDate?: Date;
|
|
66
|
+
/**
|
|
67
|
+
* Additional css styles.
|
|
68
|
+
*/
|
|
66
69
|
css?: CSS;
|
|
70
|
+
/**
|
|
71
|
+
* Invalid state input.
|
|
72
|
+
*/
|
|
73
|
+
isInvalid?: boolean;
|
|
67
74
|
}
|
|
68
|
-
export declare function InputDatePicker({ type, placeholder, size, disabled, onChange, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, minDate, maxDate, readOnly, }: InputDatePickerProps): JSX.Element;
|
|
75
|
+
export declare function InputDatePicker({ type, placeholder, size, disabled, onChange, defaultValue: defaultDateValue, value: dateValue, defaultDate, date, advanceView, placement, css, showTimePicker, minDate, maxDate, readOnly, isInvalid, }: InputDatePickerProps): JSX.Element;
|
|
@@ -4,6 +4,7 @@ export interface IResource {
|
|
|
4
4
|
value: string;
|
|
5
5
|
label: string;
|
|
6
6
|
variants?: string[];
|
|
7
|
+
description?: string;
|
|
7
8
|
}
|
|
8
9
|
interface IInputResourceListProps {
|
|
9
10
|
data: IResource[];
|
|
@@ -21,6 +22,7 @@ interface IInputResourceListProps {
|
|
|
21
22
|
}): void;
|
|
22
23
|
onQueryChange?(query: string): void;
|
|
23
24
|
css?: Stitches.CSS;
|
|
25
|
+
defaultSort?: 'asc' | 'desc';
|
|
24
26
|
}
|
|
25
|
-
declare function InputResourceList({ data, disabled, onItemCheck, onItemUncheck, searchPlaceholder, counterFooterText, isLoading, enabledItems, value, fetchData, onQueryChange, css, }: IInputResourceListProps): JSX.Element;
|
|
27
|
+
declare function InputResourceList({ data, disabled, onItemCheck, onItemUncheck, searchPlaceholder, counterFooterText, isLoading, enabledItems, value, fetchData, onQueryChange, css, defaultSort, }: IInputResourceListProps): JSX.Element;
|
|
26
28
|
export default InputResourceList;
|
package/index.esm.js
CHANGED
|
@@ -3847,6 +3847,20 @@ const ButtonNegativeSecondary = {
|
|
|
3847
3847
|
border: '1px solid $textRed'
|
|
3848
3848
|
}
|
|
3849
3849
|
};
|
|
3850
|
+
const ButtonNegativeGhost = {
|
|
3851
|
+
backgroundColor: '$btnSecondary',
|
|
3852
|
+
color: '$textRed',
|
|
3853
|
+
border: 'none',
|
|
3854
|
+
'&:hover': {
|
|
3855
|
+
backgroundColor: '$red50',
|
|
3856
|
+
outline: '1px solid $red50',
|
|
3857
|
+
color: '$textRed'
|
|
3858
|
+
},
|
|
3859
|
+
'&:active': {
|
|
3860
|
+
backgroundColor: '$red100',
|
|
3861
|
+
outline: '1px solid $btnNegative'
|
|
3862
|
+
}
|
|
3863
|
+
};
|
|
3850
3864
|
const ButtonHeaderMenu = {
|
|
3851
3865
|
backgroundColor: '$bgWhite',
|
|
3852
3866
|
border: '1px solid $bgBorder',
|
|
@@ -3936,6 +3950,7 @@ const ButtonPrimitive = styled('button', {
|
|
|
3936
3950
|
ghost: Object.assign({}, GhostButton),
|
|
3937
3951
|
negative: Object.assign({}, ButtonNegative),
|
|
3938
3952
|
'negative-secondary': Object.assign({}, ButtonNegativeSecondary),
|
|
3953
|
+
'negative-ghost': Object.assign({}, ButtonNegativeGhost),
|
|
3939
3954
|
headerMenu: Object.assign({}, ButtonHeaderMenu),
|
|
3940
3955
|
tableMenu: Object.assign({}, ButtonTableMenu)
|
|
3941
3956
|
},
|
|
@@ -10187,6 +10202,17 @@ InputCreatable.defaultProps = {
|
|
|
10187
10202
|
value: ''
|
|
10188
10203
|
};
|
|
10189
10204
|
|
|
10205
|
+
const SortingIcon = styled('div', {
|
|
10206
|
+
marginTop: 1,
|
|
10207
|
+
cursor: 'pointer',
|
|
10208
|
+
'&::after': {
|
|
10209
|
+
size: '16px',
|
|
10210
|
+
content: `url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='%23A5ABAB'%3E%3Cpath d='m9.38 3.95 2.462 3.134c.338.43.098 1.166-.38 1.166H6.538c-.478 0-.718-.736-.38-1.166L8.62 3.95c.21-.267.55-.267.76 0zM9.38 14.05l2.462-3.134c.338-.43.098-1.166-.38-1.166H6.538c-.478 0-.718.736-.38 1.166L8.62 14.05c.21.267.55.267.76 0z'/%3E%3C/g%3E%3C/svg%3E")`,
|
|
10211
|
+
margin: '0 $spacing-02 $spacing-01 0',
|
|
10212
|
+
opacity: 1
|
|
10213
|
+
}
|
|
10214
|
+
});
|
|
10215
|
+
|
|
10190
10216
|
function InputResourceList({
|
|
10191
10217
|
data,
|
|
10192
10218
|
disabled = false,
|
|
@@ -10199,10 +10225,12 @@ function InputResourceList({
|
|
|
10199
10225
|
value,
|
|
10200
10226
|
fetchData,
|
|
10201
10227
|
onQueryChange,
|
|
10202
|
-
css
|
|
10228
|
+
css,
|
|
10229
|
+
defaultSort
|
|
10203
10230
|
}) {
|
|
10204
10231
|
const [checkedResources, setCheckedResources] = useState([]);
|
|
10205
10232
|
const [query, setQuery] = useState();
|
|
10233
|
+
const [sortType, setSortType] = useState('asc');
|
|
10206
10234
|
const scrollerRef = useRef(null);
|
|
10207
10235
|
useEffect(() => {
|
|
10208
10236
|
var _a;
|
|
@@ -10211,35 +10239,159 @@ function InputResourceList({
|
|
|
10211
10239
|
top: 0
|
|
10212
10240
|
});
|
|
10213
10241
|
}, [query]);
|
|
10242
|
+
useEffect(() => {
|
|
10243
|
+
if (defaultSort) {
|
|
10244
|
+
setSortType(defaultSort);
|
|
10245
|
+
}
|
|
10246
|
+
}, [defaultSort]);
|
|
10214
10247
|
|
|
10215
10248
|
const renderCheckbox = (resource, index) => {
|
|
10216
10249
|
var _a;
|
|
10217
10250
|
|
|
10218
10251
|
const isDisabled = enabledItems && (!enabledItems.find(id => id === resource.value) || enabledItems.length === 0);
|
|
10219
|
-
return
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
children: resource.label
|
|
10227
|
-
}), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map((variant, index) => jsx(Tag, Object.assign({
|
|
10228
|
-
type: "varian",
|
|
10229
|
-
size: "lg",
|
|
10230
|
-
css: {
|
|
10231
|
-
color: disabled || isDisabled ? '$textDisable' : '$textGreen'
|
|
10232
|
-
}
|
|
10252
|
+
return jsxs(Flex$1, Object.assign({
|
|
10253
|
+
direction: "column",
|
|
10254
|
+
gap: 1
|
|
10255
|
+
}, {
|
|
10256
|
+
children: [jsx(InputCheckbox, {
|
|
10257
|
+
label: jsxs(Flex$1, Object.assign({
|
|
10258
|
+
gap: 3
|
|
10233
10259
|
}, {
|
|
10234
|
-
children:
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10260
|
+
children: [jsx(Paragraph, Object.assign({
|
|
10261
|
+
paragraph: "longContentRegular"
|
|
10262
|
+
}, {
|
|
10263
|
+
children: resource.label
|
|
10264
|
+
}), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map((variant, index) => jsx(Tag, Object.assign({
|
|
10265
|
+
type: "varian",
|
|
10266
|
+
size: "lg",
|
|
10267
|
+
css: {
|
|
10268
|
+
color: disabled || isDisabled ? '$textDisable' : '$textGreen'
|
|
10269
|
+
}
|
|
10270
|
+
}, {
|
|
10271
|
+
children: variant
|
|
10272
|
+
}), index))]
|
|
10273
|
+
}), void 0),
|
|
10274
|
+
index: index,
|
|
10275
|
+
value: resource.value,
|
|
10276
|
+
disabled: isDisabled
|
|
10277
|
+
}, void 0), (resource === null || resource === void 0 ? void 0 : resource.description) && jsx(Paragraph, Object.assign({
|
|
10278
|
+
css: {
|
|
10279
|
+
fontSize: 12,
|
|
10280
|
+
paddingLeft: 30
|
|
10281
|
+
},
|
|
10282
|
+
color: "secondary"
|
|
10283
|
+
}, {
|
|
10284
|
+
children: resource === null || resource === void 0 ? void 0 : resource.description
|
|
10285
|
+
}), void 0)]
|
|
10286
|
+
}), `${resource.value}-${new Date().toISOString()}`);
|
|
10241
10287
|
};
|
|
10242
10288
|
|
|
10289
|
+
function sorting(data, type) {
|
|
10290
|
+
function ascending(a, b) {
|
|
10291
|
+
if (a.label < b.label) {
|
|
10292
|
+
return -1;
|
|
10293
|
+
}
|
|
10294
|
+
|
|
10295
|
+
if (a.label > b.label) {
|
|
10296
|
+
return 1;
|
|
10297
|
+
}
|
|
10298
|
+
|
|
10299
|
+
return 0;
|
|
10300
|
+
}
|
|
10301
|
+
|
|
10302
|
+
function descending(a, b) {
|
|
10303
|
+
if (a.label > b.label) {
|
|
10304
|
+
return -1;
|
|
10305
|
+
}
|
|
10306
|
+
|
|
10307
|
+
if (a.label < b.label) {
|
|
10308
|
+
return 1;
|
|
10309
|
+
}
|
|
10310
|
+
|
|
10311
|
+
return 0;
|
|
10312
|
+
}
|
|
10313
|
+
|
|
10314
|
+
switch (type) {
|
|
10315
|
+
case 'asc':
|
|
10316
|
+
return data.sort(ascending);
|
|
10317
|
+
|
|
10318
|
+
case 'desc':
|
|
10319
|
+
return data.sort(descending);
|
|
10320
|
+
|
|
10321
|
+
default:
|
|
10322
|
+
return data;
|
|
10323
|
+
}
|
|
10324
|
+
}
|
|
10325
|
+
|
|
10326
|
+
function toggleSort() {
|
|
10327
|
+
setSortType(sortType === 'asc' ? 'desc' : 'asc');
|
|
10328
|
+
}
|
|
10329
|
+
|
|
10330
|
+
function renderWithoutSorting() {
|
|
10331
|
+
return jsxs(Flex$1, Object.assign({
|
|
10332
|
+
direction: "column",
|
|
10333
|
+
gap: 3
|
|
10334
|
+
}, {
|
|
10335
|
+
children: [jsx(CheckboxGroup, Object.assign({
|
|
10336
|
+
onChange: (_, index) => {
|
|
10337
|
+
onItemUncheck === null || onItemUncheck === void 0 ? void 0 : onItemUncheck((value || checkedResources)[index]);
|
|
10338
|
+
if (!value) setCheckedResources(current => current.filter(currItem => currItem.value !== checkedResources[index].value));
|
|
10339
|
+
},
|
|
10340
|
+
value: (value || checkedResources).map(item => item.value),
|
|
10341
|
+
disabled: disabled
|
|
10342
|
+
}, {
|
|
10343
|
+
children: (value || checkedResources).map(renderCheckbox)
|
|
10344
|
+
}), void 0), jsx(CheckboxGroup, Object.assign({
|
|
10345
|
+
onChange: (_, index) => {
|
|
10346
|
+
onItemCheck === null || onItemCheck === void 0 ? void 0 : onItemCheck(data[index]);
|
|
10347
|
+
if (!value) setCheckedResources(current => [...current, data[index]]);
|
|
10348
|
+
},
|
|
10349
|
+
value: (value || checkedResources).map(item => item.value),
|
|
10350
|
+
disabled: disabled
|
|
10351
|
+
}, {
|
|
10352
|
+
children: data.map(renderCheckbox)
|
|
10353
|
+
}), void 0)]
|
|
10354
|
+
}), void 0);
|
|
10355
|
+
}
|
|
10356
|
+
|
|
10357
|
+
function renderWithSorting() {
|
|
10358
|
+
const datasets = sorting(data, sortType);
|
|
10359
|
+
return jsx(Flex$1, Object.assign({
|
|
10360
|
+
direction: "column",
|
|
10361
|
+
gap: 3
|
|
10362
|
+
}, {
|
|
10363
|
+
children: jsx(CheckboxGroup, Object.assign({
|
|
10364
|
+
onChange: (_, index) => {
|
|
10365
|
+
if (value === null || value === void 0 ? void 0 : value.some(val => {
|
|
10366
|
+
var _a;
|
|
10367
|
+
|
|
10368
|
+
return (val === null || val === void 0 ? void 0 : val.value) === ((_a = datasets[index]) === null || _a === void 0 ? void 0 : _a.value);
|
|
10369
|
+
})) {
|
|
10370
|
+
onItemUncheck === null || onItemUncheck === void 0 ? void 0 : onItemUncheck(datasets[index]);
|
|
10371
|
+
} else {
|
|
10372
|
+
onItemCheck === null || onItemCheck === void 0 ? void 0 : onItemCheck(datasets[index]);
|
|
10373
|
+
}
|
|
10374
|
+
},
|
|
10375
|
+
value: value === null || value === void 0 ? void 0 : value.map(item => item === null || item === void 0 ? void 0 : item.value),
|
|
10376
|
+
disabled: disabled
|
|
10377
|
+
}, {
|
|
10378
|
+
children: datasets.map(renderCheckbox)
|
|
10379
|
+
}), void 0)
|
|
10380
|
+
}), void 0);
|
|
10381
|
+
}
|
|
10382
|
+
|
|
10383
|
+
function toggleCheckAll() {
|
|
10384
|
+
if ((value === null || value === void 0 ? void 0 : value.length) && (value === null || value === void 0 ? void 0 : value.length) < (data === null || data === void 0 ? void 0 : data.length) || (value === null || value === void 0 ? void 0 : value.length) === (data === null || data === void 0 ? void 0 : data.length)) {
|
|
10385
|
+
for (let i = 0; i < (value === null || value === void 0 ? void 0 : value.length); i++) {
|
|
10386
|
+
onItemUncheck === null || onItemUncheck === void 0 ? void 0 : onItemUncheck(value === null || value === void 0 ? void 0 : value[i]);
|
|
10387
|
+
}
|
|
10388
|
+
} else {
|
|
10389
|
+
for (let i = 0; i < (data === null || data === void 0 ? void 0 : data.length); i++) {
|
|
10390
|
+
onItemCheck === null || onItemCheck === void 0 ? void 0 : onItemCheck(data === null || data === void 0 ? void 0 : data[i]);
|
|
10391
|
+
}
|
|
10392
|
+
}
|
|
10393
|
+
}
|
|
10394
|
+
|
|
10243
10395
|
return jsxs(Box, Object.assign({
|
|
10244
10396
|
css: Object.assign({
|
|
10245
10397
|
position: 'relative'
|
|
@@ -10253,7 +10405,26 @@ function InputResourceList({
|
|
|
10253
10405
|
onQueryChange(query);
|
|
10254
10406
|
}, 1000),
|
|
10255
10407
|
disabled: disabled
|
|
10256
|
-
}, void 0),
|
|
10408
|
+
}, void 0), defaultSort && jsxs(Flex$1, Object.assign({
|
|
10409
|
+
align: "center",
|
|
10410
|
+
gap: 4,
|
|
10411
|
+
css: {
|
|
10412
|
+
paddingLeft: 16,
|
|
10413
|
+
marginTop: '$spacing-04'
|
|
10414
|
+
}
|
|
10415
|
+
}, {
|
|
10416
|
+
children: [jsx(InputCheckbox, {
|
|
10417
|
+
checked: (value === null || value === void 0 ? void 0 : value.length) === (data === null || data === void 0 ? void 0 : data.length),
|
|
10418
|
+
indeterminate: Boolean((value === null || value === void 0 ? void 0 : value.length) && (value === null || value === void 0 ? void 0 : value.length) < (data === null || data === void 0 ? void 0 : data.length)),
|
|
10419
|
+
onCheckedChange: toggleCheckAll
|
|
10420
|
+
}, void 0), jsx(Paragraph, Object.assign({
|
|
10421
|
+
paragraph: "shortContentBold"
|
|
10422
|
+
}, {
|
|
10423
|
+
children: "DATA TITLE"
|
|
10424
|
+
}), void 0), jsx(SortingIcon, {
|
|
10425
|
+
onClick: toggleSort
|
|
10426
|
+
}, void 0)]
|
|
10427
|
+
}), void 0), isLoading && jsx(Flex$1, Object.assign({
|
|
10257
10428
|
justify: "center",
|
|
10258
10429
|
align: "center",
|
|
10259
10430
|
css: {
|
|
@@ -10312,30 +10483,7 @@ function InputResourceList({
|
|
|
10312
10483
|
children: children
|
|
10313
10484
|
}), void 0)
|
|
10314
10485
|
}, {
|
|
10315
|
-
children:
|
|
10316
|
-
direction: "column",
|
|
10317
|
-
gap: 3
|
|
10318
|
-
}, {
|
|
10319
|
-
children: [jsx(CheckboxGroup, Object.assign({
|
|
10320
|
-
onChange: (_, index) => {
|
|
10321
|
-
onItemUncheck((value || checkedResources)[index]);
|
|
10322
|
-
if (!value) setCheckedResources(current => current.filter(currItem => currItem.value !== checkedResources[index].value));
|
|
10323
|
-
},
|
|
10324
|
-
value: (value || checkedResources).map(item => item.value),
|
|
10325
|
-
disabled: disabled
|
|
10326
|
-
}, {
|
|
10327
|
-
children: (value || checkedResources).map(renderCheckbox)
|
|
10328
|
-
}), void 0), jsx(CheckboxGroup, Object.assign({
|
|
10329
|
-
onChange: (_, index) => {
|
|
10330
|
-
onItemCheck(data[index]);
|
|
10331
|
-
if (!value) setCheckedResources(current => [...current, data[index]]);
|
|
10332
|
-
},
|
|
10333
|
-
value: (value || checkedResources).map(item => item.value),
|
|
10334
|
-
disabled: disabled
|
|
10335
|
-
}, {
|
|
10336
|
-
children: data.map(renderCheckbox)
|
|
10337
|
-
}), void 0)]
|
|
10338
|
-
}), void 0)
|
|
10486
|
+
children: defaultSort ? renderWithSorting() : renderWithoutSorting()
|
|
10339
10487
|
}), void 0)]
|
|
10340
10488
|
}), void 0), (((value === null || value === void 0 ? void 0 : value.length) || 0) > 0 || checkedResources.length > 0) && jsx(Box, Object.assign({
|
|
10341
10489
|
css: {
|
|
@@ -15589,7 +15737,8 @@ function InputTimePicker({
|
|
|
15589
15737
|
disabled,
|
|
15590
15738
|
readOnly,
|
|
15591
15739
|
minDate,
|
|
15592
|
-
maxDate
|
|
15740
|
+
maxDate,
|
|
15741
|
+
isInvalid
|
|
15593
15742
|
}) {
|
|
15594
15743
|
const [openPicker, setOpenPicker] = useState(false);
|
|
15595
15744
|
const isMobile = useMediaQuery(`(max-width: 480px)`);
|
|
@@ -15605,10 +15754,11 @@ function InputTimePicker({
|
|
|
15605
15754
|
disabled: disabled,
|
|
15606
15755
|
onClick: handleChange,
|
|
15607
15756
|
readOnly: readOnly,
|
|
15757
|
+
isInvalid: isInvalid,
|
|
15608
15758
|
__self: this,
|
|
15609
15759
|
__source: {
|
|
15610
15760
|
fileName: _jsxFileName$j,
|
|
15611
|
-
lineNumber:
|
|
15761
|
+
lineNumber: 42,
|
|
15612
15762
|
columnNumber: 5
|
|
15613
15763
|
}
|
|
15614
15764
|
}, /*#__PURE__*/React__default.createElement(InputLeftElement, {
|
|
@@ -15616,14 +15766,14 @@ function InputTimePicker({
|
|
|
15616
15766
|
__self: this,
|
|
15617
15767
|
__source: {
|
|
15618
15768
|
fileName: _jsxFileName$j,
|
|
15619
|
-
lineNumber:
|
|
15769
|
+
lineNumber: 43,
|
|
15620
15770
|
columnNumber: 35
|
|
15621
15771
|
}
|
|
15622
15772
|
}),
|
|
15623
15773
|
__self: this,
|
|
15624
15774
|
__source: {
|
|
15625
15775
|
fileName: _jsxFileName$j,
|
|
15626
|
-
lineNumber:
|
|
15776
|
+
lineNumber: 43,
|
|
15627
15777
|
columnNumber: 7
|
|
15628
15778
|
}
|
|
15629
15779
|
}), /*#__PURE__*/React__default.createElement(InputText, {
|
|
@@ -15636,7 +15786,7 @@ function InputTimePicker({
|
|
|
15636
15786
|
__self: this,
|
|
15637
15787
|
__source: {
|
|
15638
15788
|
fileName: _jsxFileName$j,
|
|
15639
|
-
lineNumber:
|
|
15789
|
+
lineNumber: 44,
|
|
15640
15790
|
columnNumber: 7
|
|
15641
15791
|
}
|
|
15642
15792
|
}));
|
|
@@ -15652,7 +15802,7 @@ function InputTimePicker({
|
|
|
15652
15802
|
__self: this,
|
|
15653
15803
|
__source: {
|
|
15654
15804
|
fileName: _jsxFileName$j,
|
|
15655
|
-
lineNumber:
|
|
15805
|
+
lineNumber: 56,
|
|
15656
15806
|
columnNumber: 5
|
|
15657
15807
|
}
|
|
15658
15808
|
});
|
|
@@ -15664,7 +15814,7 @@ function InputTimePicker({
|
|
|
15664
15814
|
__self: this,
|
|
15665
15815
|
__source: {
|
|
15666
15816
|
fileName: _jsxFileName$j,
|
|
15667
|
-
lineNumber:
|
|
15817
|
+
lineNumber: 68,
|
|
15668
15818
|
columnNumber: 5
|
|
15669
15819
|
}
|
|
15670
15820
|
}, disabled || readOnly ? /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -15672,14 +15822,14 @@ function InputTimePicker({
|
|
|
15672
15822
|
__self: this,
|
|
15673
15823
|
__source: {
|
|
15674
15824
|
fileName: _jsxFileName$j,
|
|
15675
|
-
lineNumber:
|
|
15825
|
+
lineNumber: 70,
|
|
15676
15826
|
columnNumber: 9
|
|
15677
15827
|
}
|
|
15678
15828
|
}, renderInputGroup()) : /*#__PURE__*/React__default.createElement(PopoverTrigger, {
|
|
15679
15829
|
__self: this,
|
|
15680
15830
|
__source: {
|
|
15681
15831
|
fileName: _jsxFileName$j,
|
|
15682
|
-
lineNumber:
|
|
15832
|
+
lineNumber: 72,
|
|
15683
15833
|
columnNumber: 9
|
|
15684
15834
|
}
|
|
15685
15835
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -15687,14 +15837,14 @@ function InputTimePicker({
|
|
|
15687
15837
|
__self: this,
|
|
15688
15838
|
__source: {
|
|
15689
15839
|
fileName: _jsxFileName$j,
|
|
15690
|
-
lineNumber:
|
|
15840
|
+
lineNumber: 73,
|
|
15691
15841
|
columnNumber: 11
|
|
15692
15842
|
}
|
|
15693
15843
|
}, renderInputGroup())), /*#__PURE__*/React__default.createElement(PopoverContent, {
|
|
15694
15844
|
__self: this,
|
|
15695
15845
|
__source: {
|
|
15696
15846
|
fileName: _jsxFileName$j,
|
|
15697
|
-
lineNumber:
|
|
15847
|
+
lineNumber: 76,
|
|
15698
15848
|
columnNumber: 7
|
|
15699
15849
|
}
|
|
15700
15850
|
}, renderTimePicker())) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -15702,7 +15852,7 @@ function InputTimePicker({
|
|
|
15702
15852
|
__self: this,
|
|
15703
15853
|
__source: {
|
|
15704
15854
|
fileName: _jsxFileName$j,
|
|
15705
|
-
lineNumber:
|
|
15855
|
+
lineNumber: 80,
|
|
15706
15856
|
columnNumber: 7
|
|
15707
15857
|
}
|
|
15708
15858
|
}, renderInputGroup()), /*#__PURE__*/React__default.createElement(Drawer, {
|
|
@@ -15712,7 +15862,7 @@ function InputTimePicker({
|
|
|
15712
15862
|
__self: this,
|
|
15713
15863
|
__source: {
|
|
15714
15864
|
fileName: _jsxFileName$j,
|
|
15715
|
-
lineNumber:
|
|
15865
|
+
lineNumber: 81,
|
|
15716
15866
|
columnNumber: 7
|
|
15717
15867
|
}
|
|
15718
15868
|
}, /*#__PURE__*/React__default.createElement(DrawerContent, {
|
|
@@ -15723,7 +15873,7 @@ function InputTimePicker({
|
|
|
15723
15873
|
__self: this,
|
|
15724
15874
|
__source: {
|
|
15725
15875
|
fileName: _jsxFileName$j,
|
|
15726
|
-
lineNumber:
|
|
15876
|
+
lineNumber: 82,
|
|
15727
15877
|
columnNumber: 9
|
|
15728
15878
|
}
|
|
15729
15879
|
}, /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
@@ -15735,7 +15885,7 @@ function InputTimePicker({
|
|
|
15735
15885
|
__self: this,
|
|
15736
15886
|
__source: {
|
|
15737
15887
|
fileName: _jsxFileName$j,
|
|
15738
|
-
lineNumber:
|
|
15888
|
+
lineNumber: 88,
|
|
15739
15889
|
columnNumber: 11
|
|
15740
15890
|
}
|
|
15741
15891
|
}, renderTimePicker()))));
|
|
@@ -15797,8 +15947,13 @@ InputTimePicker.propTypes = {
|
|
|
15797
15947
|
|
|
15798
15948
|
/**
|
|
15799
15949
|
Specify the maximum date.
|
|
15800
|
-
|
|
15801
|
-
maxDate: PropTypes.instanceOf(Date)
|
|
15950
|
+
*/
|
|
15951
|
+
maxDate: PropTypes.instanceOf(Date),
|
|
15952
|
+
|
|
15953
|
+
/**
|
|
15954
|
+
* Invalid state input.
|
|
15955
|
+
*/
|
|
15956
|
+
isInvalid: PropTypes.bool
|
|
15802
15957
|
};
|
|
15803
15958
|
InputTimePicker.displayName = 'InputTimePicker';
|
|
15804
15959
|
|
|
@@ -16200,7 +16355,8 @@ function InputDatePicker({
|
|
|
16200
16355
|
showTimePicker,
|
|
16201
16356
|
minDate,
|
|
16202
16357
|
maxDate,
|
|
16203
|
-
readOnly
|
|
16358
|
+
readOnly,
|
|
16359
|
+
isInvalid
|
|
16204
16360
|
}) {
|
|
16205
16361
|
const [value, setValue] = useState(date || dateValue);
|
|
16206
16362
|
const [defaultValue, setDefaultValue] = useState(defaultDate || defaultDateValue);
|
|
@@ -16236,7 +16392,8 @@ function InputDatePicker({
|
|
|
16236
16392
|
disabled: disabled,
|
|
16237
16393
|
readOnly: readOnly,
|
|
16238
16394
|
onClick: handleChange,
|
|
16239
|
-
size: size
|
|
16395
|
+
size: size,
|
|
16396
|
+
isInvalid: isInvalid
|
|
16240
16397
|
}, {
|
|
16241
16398
|
children: [jsx(InputLeftElement, {
|
|
16242
16399
|
children: jsx(CalendarOutline, {}, void 0)
|
package/index.umd.js
CHANGED
|
@@ -3926,6 +3926,20 @@
|
|
|
3926
3926
|
border: '1px solid $textRed'
|
|
3927
3927
|
}
|
|
3928
3928
|
};
|
|
3929
|
+
var ButtonNegativeGhost = {
|
|
3930
|
+
backgroundColor: '$btnSecondary',
|
|
3931
|
+
color: '$textRed',
|
|
3932
|
+
border: 'none',
|
|
3933
|
+
'&:hover': {
|
|
3934
|
+
backgroundColor: '$red50',
|
|
3935
|
+
outline: '1px solid $red50',
|
|
3936
|
+
color: '$textRed'
|
|
3937
|
+
},
|
|
3938
|
+
'&:active': {
|
|
3939
|
+
backgroundColor: '$red100',
|
|
3940
|
+
outline: '1px solid $btnNegative'
|
|
3941
|
+
}
|
|
3942
|
+
};
|
|
3929
3943
|
var ButtonHeaderMenu = {
|
|
3930
3944
|
backgroundColor: '$bgWhite',
|
|
3931
3945
|
border: '1px solid $bgBorder',
|
|
@@ -4015,6 +4029,7 @@
|
|
|
4015
4029
|
ghost: __assign({}, GhostButton),
|
|
4016
4030
|
negative: __assign({}, ButtonNegative),
|
|
4017
4031
|
'negative-secondary': __assign({}, ButtonNegativeSecondary),
|
|
4032
|
+
'negative-ghost': __assign({}, ButtonNegativeGhost),
|
|
4018
4033
|
headerMenu: __assign({}, ButtonHeaderMenu),
|
|
4019
4034
|
tableMenu: __assign({}, ButtonTableMenu)
|
|
4020
4035
|
},
|
|
@@ -10324,6 +10339,17 @@
|
|
|
10324
10339
|
value: ''
|
|
10325
10340
|
};
|
|
10326
10341
|
|
|
10342
|
+
var SortingIcon = styled('div', {
|
|
10343
|
+
marginTop: 1,
|
|
10344
|
+
cursor: 'pointer',
|
|
10345
|
+
'&::after': {
|
|
10346
|
+
size: '16px',
|
|
10347
|
+
content: "url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='%23A5ABAB'%3E%3Cpath d='m9.38 3.95 2.462 3.134c.338.43.098 1.166-.38 1.166H6.538c-.478 0-.718-.736-.38-1.166L8.62 3.95c.21-.267.55-.267.76 0zM9.38 14.05l2.462-3.134c.338-.43.098-1.166-.38-1.166H6.538c-.478 0-.718.736-.38 1.166L8.62 14.05c.21.267.55.267.76 0z'/%3E%3C/g%3E%3C/svg%3E\")",
|
|
10348
|
+
margin: '0 $spacing-02 $spacing-01 0',
|
|
10349
|
+
opacity: 1
|
|
10350
|
+
}
|
|
10351
|
+
});
|
|
10352
|
+
|
|
10327
10353
|
function InputResourceList(_a) {
|
|
10328
10354
|
var data = _a.data,
|
|
10329
10355
|
_b = _a.disabled,
|
|
@@ -10340,7 +10366,8 @@
|
|
|
10340
10366
|
value = _a.value,
|
|
10341
10367
|
fetchData = _a.fetchData,
|
|
10342
10368
|
onQueryChange = _a.onQueryChange,
|
|
10343
|
-
css = _a.css
|
|
10369
|
+
css = _a.css,
|
|
10370
|
+
defaultSort = _a.defaultSort;
|
|
10344
10371
|
|
|
10345
10372
|
var _f = React.useState([]),
|
|
10346
10373
|
checkedResources = _f[0],
|
|
@@ -10350,6 +10377,10 @@
|
|
|
10350
10377
|
query = _g[0],
|
|
10351
10378
|
setQuery = _g[1];
|
|
10352
10379
|
|
|
10380
|
+
var _h = React.useState('asc'),
|
|
10381
|
+
sortType = _h[0],
|
|
10382
|
+
setSortType = _h[1];
|
|
10383
|
+
|
|
10353
10384
|
var scrollerRef = React.useRef(null);
|
|
10354
10385
|
React.useEffect(function () {
|
|
10355
10386
|
var _a;
|
|
@@ -10358,6 +10389,11 @@
|
|
|
10358
10389
|
top: 0
|
|
10359
10390
|
});
|
|
10360
10391
|
}, [query]);
|
|
10392
|
+
React.useEffect(function () {
|
|
10393
|
+
if (defaultSort) {
|
|
10394
|
+
setSortType(defaultSort);
|
|
10395
|
+
}
|
|
10396
|
+
}, [defaultSort]);
|
|
10361
10397
|
|
|
10362
10398
|
var renderCheckbox = function renderCheckbox(resource, index) {
|
|
10363
10399
|
var _a;
|
|
@@ -10365,32 +10401,163 @@
|
|
|
10365
10401
|
var isDisabled = enabledItems && (!enabledItems.find(function (id) {
|
|
10366
10402
|
return id === resource.value;
|
|
10367
10403
|
}) || enabledItems.length === 0);
|
|
10368
|
-
return jsxRuntime.
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10404
|
+
return jsxRuntime.jsxs(Flex$1, __assign({
|
|
10405
|
+
direction: "column",
|
|
10406
|
+
gap: 1
|
|
10407
|
+
}, {
|
|
10408
|
+
children: [jsxRuntime.jsx(InputCheckbox, {
|
|
10409
|
+
label: jsxRuntime.jsxs(Flex$1, __assign({
|
|
10410
|
+
gap: 3
|
|
10374
10411
|
}, {
|
|
10375
|
-
children:
|
|
10376
|
-
|
|
10377
|
-
return jsxRuntime.jsx(Tag, __assign({
|
|
10378
|
-
type: "varian",
|
|
10379
|
-
size: "lg",
|
|
10380
|
-
css: {
|
|
10381
|
-
color: disabled || isDisabled ? '$textDisable' : '$textGreen'
|
|
10382
|
-
}
|
|
10412
|
+
children: [jsxRuntime.jsx(Paragraph, __assign({
|
|
10413
|
+
paragraph: "longContentRegular"
|
|
10383
10414
|
}, {
|
|
10384
|
-
children:
|
|
10385
|
-
}), index)
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10415
|
+
children: resource.label
|
|
10416
|
+
}), void 0), (_a = resource.variants) === null || _a === void 0 ? void 0 : _a.map(function (variant, index) {
|
|
10417
|
+
return jsxRuntime.jsx(Tag, __assign({
|
|
10418
|
+
type: "varian",
|
|
10419
|
+
size: "lg",
|
|
10420
|
+
css: {
|
|
10421
|
+
color: disabled || isDisabled ? '$textDisable' : '$textGreen'
|
|
10422
|
+
}
|
|
10423
|
+
}, {
|
|
10424
|
+
children: variant
|
|
10425
|
+
}), index);
|
|
10426
|
+
})]
|
|
10427
|
+
}), void 0),
|
|
10428
|
+
index: index,
|
|
10429
|
+
value: resource.value,
|
|
10430
|
+
disabled: isDisabled
|
|
10431
|
+
}, void 0), (resource === null || resource === void 0 ? void 0 : resource.description) && jsxRuntime.jsx(Paragraph, __assign({
|
|
10432
|
+
css: {
|
|
10433
|
+
fontSize: 12,
|
|
10434
|
+
paddingLeft: 30
|
|
10435
|
+
},
|
|
10436
|
+
color: "secondary"
|
|
10437
|
+
}, {
|
|
10438
|
+
children: resource === null || resource === void 0 ? void 0 : resource.description
|
|
10439
|
+
}), void 0)]
|
|
10440
|
+
}), "".concat(resource.value, "-").concat(new Date().toISOString()));
|
|
10392
10441
|
};
|
|
10393
10442
|
|
|
10443
|
+
function sorting(data, type) {
|
|
10444
|
+
function ascending(a, b) {
|
|
10445
|
+
if (a.label < b.label) {
|
|
10446
|
+
return -1;
|
|
10447
|
+
}
|
|
10448
|
+
|
|
10449
|
+
if (a.label > b.label) {
|
|
10450
|
+
return 1;
|
|
10451
|
+
}
|
|
10452
|
+
|
|
10453
|
+
return 0;
|
|
10454
|
+
}
|
|
10455
|
+
|
|
10456
|
+
function descending(a, b) {
|
|
10457
|
+
if (a.label > b.label) {
|
|
10458
|
+
return -1;
|
|
10459
|
+
}
|
|
10460
|
+
|
|
10461
|
+
if (a.label < b.label) {
|
|
10462
|
+
return 1;
|
|
10463
|
+
}
|
|
10464
|
+
|
|
10465
|
+
return 0;
|
|
10466
|
+
}
|
|
10467
|
+
|
|
10468
|
+
switch (type) {
|
|
10469
|
+
case 'asc':
|
|
10470
|
+
return data.sort(ascending);
|
|
10471
|
+
|
|
10472
|
+
case 'desc':
|
|
10473
|
+
return data.sort(descending);
|
|
10474
|
+
|
|
10475
|
+
default:
|
|
10476
|
+
return data;
|
|
10477
|
+
}
|
|
10478
|
+
}
|
|
10479
|
+
|
|
10480
|
+
function toggleSort() {
|
|
10481
|
+
setSortType(sortType === 'asc' ? 'desc' : 'asc');
|
|
10482
|
+
}
|
|
10483
|
+
|
|
10484
|
+
function renderWithoutSorting() {
|
|
10485
|
+
return jsxRuntime.jsxs(Flex$1, __assign({
|
|
10486
|
+
direction: "column",
|
|
10487
|
+
gap: 3
|
|
10488
|
+
}, {
|
|
10489
|
+
children: [jsxRuntime.jsx(CheckboxGroup, __assign({
|
|
10490
|
+
onChange: function (_, index) {
|
|
10491
|
+
onItemUncheck === null || onItemUncheck === void 0 ? void 0 : onItemUncheck((value || checkedResources)[index]);
|
|
10492
|
+
if (!value) setCheckedResources(function (current) {
|
|
10493
|
+
return current.filter(function (currItem) {
|
|
10494
|
+
return currItem.value !== checkedResources[index].value;
|
|
10495
|
+
});
|
|
10496
|
+
});
|
|
10497
|
+
},
|
|
10498
|
+
value: (value || checkedResources).map(function (item) {
|
|
10499
|
+
return item.value;
|
|
10500
|
+
}),
|
|
10501
|
+
disabled: disabled
|
|
10502
|
+
}, {
|
|
10503
|
+
children: (value || checkedResources).map(renderCheckbox)
|
|
10504
|
+
}), void 0), jsxRuntime.jsx(CheckboxGroup, __assign({
|
|
10505
|
+
onChange: function (_, index) {
|
|
10506
|
+
onItemCheck === null || onItemCheck === void 0 ? void 0 : onItemCheck(data[index]);
|
|
10507
|
+
if (!value) setCheckedResources(function (current) {
|
|
10508
|
+
return __spreadArray(__spreadArray([], current, true), [data[index]], false);
|
|
10509
|
+
});
|
|
10510
|
+
},
|
|
10511
|
+
value: (value || checkedResources).map(function (item) {
|
|
10512
|
+
return item.value;
|
|
10513
|
+
}),
|
|
10514
|
+
disabled: disabled
|
|
10515
|
+
}, {
|
|
10516
|
+
children: data.map(renderCheckbox)
|
|
10517
|
+
}), void 0)]
|
|
10518
|
+
}), void 0);
|
|
10519
|
+
}
|
|
10520
|
+
|
|
10521
|
+
function renderWithSorting() {
|
|
10522
|
+
var datasets = sorting(data, sortType);
|
|
10523
|
+
return jsxRuntime.jsx(Flex$1, __assign({
|
|
10524
|
+
direction: "column",
|
|
10525
|
+
gap: 3
|
|
10526
|
+
}, {
|
|
10527
|
+
children: jsxRuntime.jsx(CheckboxGroup, __assign({
|
|
10528
|
+
onChange: function (_, index) {
|
|
10529
|
+
if (value === null || value === void 0 ? void 0 : value.some(function (val) {
|
|
10530
|
+
var _a;
|
|
10531
|
+
|
|
10532
|
+
return (val === null || val === void 0 ? void 0 : val.value) === ((_a = datasets[index]) === null || _a === void 0 ? void 0 : _a.value);
|
|
10533
|
+
})) {
|
|
10534
|
+
onItemUncheck === null || onItemUncheck === void 0 ? void 0 : onItemUncheck(datasets[index]);
|
|
10535
|
+
} else {
|
|
10536
|
+
onItemCheck === null || onItemCheck === void 0 ? void 0 : onItemCheck(datasets[index]);
|
|
10537
|
+
}
|
|
10538
|
+
},
|
|
10539
|
+
value: value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
10540
|
+
return item === null || item === void 0 ? void 0 : item.value;
|
|
10541
|
+
}),
|
|
10542
|
+
disabled: disabled
|
|
10543
|
+
}, {
|
|
10544
|
+
children: datasets.map(renderCheckbox)
|
|
10545
|
+
}), void 0)
|
|
10546
|
+
}), void 0);
|
|
10547
|
+
}
|
|
10548
|
+
|
|
10549
|
+
function toggleCheckAll() {
|
|
10550
|
+
if ((value === null || value === void 0 ? void 0 : value.length) && (value === null || value === void 0 ? void 0 : value.length) < (data === null || data === void 0 ? void 0 : data.length) || (value === null || value === void 0 ? void 0 : value.length) === (data === null || data === void 0 ? void 0 : data.length)) {
|
|
10551
|
+
for (var i = 0; i < (value === null || value === void 0 ? void 0 : value.length); i++) {
|
|
10552
|
+
onItemUncheck === null || onItemUncheck === void 0 ? void 0 : onItemUncheck(value === null || value === void 0 ? void 0 : value[i]);
|
|
10553
|
+
}
|
|
10554
|
+
} else {
|
|
10555
|
+
for (var i = 0; i < (data === null || data === void 0 ? void 0 : data.length); i++) {
|
|
10556
|
+
onItemCheck === null || onItemCheck === void 0 ? void 0 : onItemCheck(data === null || data === void 0 ? void 0 : data[i]);
|
|
10557
|
+
}
|
|
10558
|
+
}
|
|
10559
|
+
}
|
|
10560
|
+
|
|
10394
10561
|
return jsxRuntime.jsxs(Box, __assign({
|
|
10395
10562
|
css: __assign({
|
|
10396
10563
|
position: 'relative'
|
|
@@ -10404,7 +10571,26 @@
|
|
|
10404
10571
|
onQueryChange(query);
|
|
10405
10572
|
}, 1000),
|
|
10406
10573
|
disabled: disabled
|
|
10407
|
-
}, void 0),
|
|
10574
|
+
}, void 0), defaultSort && jsxRuntime.jsxs(Flex$1, __assign({
|
|
10575
|
+
align: "center",
|
|
10576
|
+
gap: 4,
|
|
10577
|
+
css: {
|
|
10578
|
+
paddingLeft: 16,
|
|
10579
|
+
marginTop: '$spacing-04'
|
|
10580
|
+
}
|
|
10581
|
+
}, {
|
|
10582
|
+
children: [jsxRuntime.jsx(InputCheckbox, {
|
|
10583
|
+
checked: (value === null || value === void 0 ? void 0 : value.length) === (data === null || data === void 0 ? void 0 : data.length),
|
|
10584
|
+
indeterminate: Boolean((value === null || value === void 0 ? void 0 : value.length) && (value === null || value === void 0 ? void 0 : value.length) < (data === null || data === void 0 ? void 0 : data.length)),
|
|
10585
|
+
onCheckedChange: toggleCheckAll
|
|
10586
|
+
}, void 0), jsxRuntime.jsx(Paragraph, __assign({
|
|
10587
|
+
paragraph: "shortContentBold"
|
|
10588
|
+
}, {
|
|
10589
|
+
children: "DATA TITLE"
|
|
10590
|
+
}), void 0), jsxRuntime.jsx(SortingIcon, {
|
|
10591
|
+
onClick: toggleSort
|
|
10592
|
+
}, void 0)]
|
|
10593
|
+
}), void 0), isLoading && jsxRuntime.jsx(Flex$1, __assign({
|
|
10408
10594
|
justify: "center",
|
|
10409
10595
|
align: "center",
|
|
10410
10596
|
css: {
|
|
@@ -10465,40 +10651,7 @@
|
|
|
10465
10651
|
}), void 0);
|
|
10466
10652
|
}
|
|
10467
10653
|
}, {
|
|
10468
|
-
children:
|
|
10469
|
-
direction: "column",
|
|
10470
|
-
gap: 3
|
|
10471
|
-
}, {
|
|
10472
|
-
children: [jsxRuntime.jsx(CheckboxGroup, __assign({
|
|
10473
|
-
onChange: function (_, index) {
|
|
10474
|
-
onItemUncheck((value || checkedResources)[index]);
|
|
10475
|
-
if (!value) setCheckedResources(function (current) {
|
|
10476
|
-
return current.filter(function (currItem) {
|
|
10477
|
-
return currItem.value !== checkedResources[index].value;
|
|
10478
|
-
});
|
|
10479
|
-
});
|
|
10480
|
-
},
|
|
10481
|
-
value: (value || checkedResources).map(function (item) {
|
|
10482
|
-
return item.value;
|
|
10483
|
-
}),
|
|
10484
|
-
disabled: disabled
|
|
10485
|
-
}, {
|
|
10486
|
-
children: (value || checkedResources).map(renderCheckbox)
|
|
10487
|
-
}), void 0), jsxRuntime.jsx(CheckboxGroup, __assign({
|
|
10488
|
-
onChange: function (_, index) {
|
|
10489
|
-
onItemCheck(data[index]);
|
|
10490
|
-
if (!value) setCheckedResources(function (current) {
|
|
10491
|
-
return __spreadArray(__spreadArray([], current, true), [data[index]], false);
|
|
10492
|
-
});
|
|
10493
|
-
},
|
|
10494
|
-
value: (value || checkedResources).map(function (item) {
|
|
10495
|
-
return item.value;
|
|
10496
|
-
}),
|
|
10497
|
-
disabled: disabled
|
|
10498
|
-
}, {
|
|
10499
|
-
children: data.map(renderCheckbox)
|
|
10500
|
-
}), void 0)]
|
|
10501
|
-
}), void 0)
|
|
10654
|
+
children: defaultSort ? renderWithSorting() : renderWithoutSorting()
|
|
10502
10655
|
}), void 0)]
|
|
10503
10656
|
}), void 0), (((value === null || value === void 0 ? void 0 : value.length) || 0) > 0 || checkedResources.length > 0) && jsxRuntime.jsx(Box, __assign({
|
|
10504
10657
|
css: {
|
|
@@ -15838,7 +15991,8 @@
|
|
|
15838
15991
|
disabled,
|
|
15839
15992
|
readOnly,
|
|
15840
15993
|
minDate,
|
|
15841
|
-
maxDate
|
|
15994
|
+
maxDate,
|
|
15995
|
+
isInvalid
|
|
15842
15996
|
}) {
|
|
15843
15997
|
const [openPicker, setOpenPicker] = React.useState(false);
|
|
15844
15998
|
const isMobile = useMediaQuery(`(max-width: 480px)`);
|
|
@@ -15854,10 +16008,11 @@
|
|
|
15854
16008
|
disabled: disabled,
|
|
15855
16009
|
onClick: handleChange,
|
|
15856
16010
|
readOnly: readOnly,
|
|
16011
|
+
isInvalid: isInvalid,
|
|
15857
16012
|
__self: this,
|
|
15858
16013
|
__source: {
|
|
15859
16014
|
fileName: _jsxFileName$j,
|
|
15860
|
-
lineNumber:
|
|
16015
|
+
lineNumber: 42,
|
|
15861
16016
|
columnNumber: 5
|
|
15862
16017
|
}
|
|
15863
16018
|
}, /*#__PURE__*/React__default["default"].createElement(InputLeftElement, {
|
|
@@ -15865,14 +16020,14 @@
|
|
|
15865
16020
|
__self: this,
|
|
15866
16021
|
__source: {
|
|
15867
16022
|
fileName: _jsxFileName$j,
|
|
15868
|
-
lineNumber:
|
|
16023
|
+
lineNumber: 43,
|
|
15869
16024
|
columnNumber: 35
|
|
15870
16025
|
}
|
|
15871
16026
|
}),
|
|
15872
16027
|
__self: this,
|
|
15873
16028
|
__source: {
|
|
15874
16029
|
fileName: _jsxFileName$j,
|
|
15875
|
-
lineNumber:
|
|
16030
|
+
lineNumber: 43,
|
|
15876
16031
|
columnNumber: 7
|
|
15877
16032
|
}
|
|
15878
16033
|
}), /*#__PURE__*/React__default["default"].createElement(InputText, {
|
|
@@ -15885,7 +16040,7 @@
|
|
|
15885
16040
|
__self: this,
|
|
15886
16041
|
__source: {
|
|
15887
16042
|
fileName: _jsxFileName$j,
|
|
15888
|
-
lineNumber:
|
|
16043
|
+
lineNumber: 44,
|
|
15889
16044
|
columnNumber: 7
|
|
15890
16045
|
}
|
|
15891
16046
|
}));
|
|
@@ -15901,7 +16056,7 @@
|
|
|
15901
16056
|
__self: this,
|
|
15902
16057
|
__source: {
|
|
15903
16058
|
fileName: _jsxFileName$j,
|
|
15904
|
-
lineNumber:
|
|
16059
|
+
lineNumber: 56,
|
|
15905
16060
|
columnNumber: 5
|
|
15906
16061
|
}
|
|
15907
16062
|
});
|
|
@@ -15913,7 +16068,7 @@
|
|
|
15913
16068
|
__self: this,
|
|
15914
16069
|
__source: {
|
|
15915
16070
|
fileName: _jsxFileName$j,
|
|
15916
|
-
lineNumber:
|
|
16071
|
+
lineNumber: 68,
|
|
15917
16072
|
columnNumber: 5
|
|
15918
16073
|
}
|
|
15919
16074
|
}, disabled || readOnly ? /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
@@ -15921,14 +16076,14 @@
|
|
|
15921
16076
|
__self: this,
|
|
15922
16077
|
__source: {
|
|
15923
16078
|
fileName: _jsxFileName$j,
|
|
15924
|
-
lineNumber:
|
|
16079
|
+
lineNumber: 70,
|
|
15925
16080
|
columnNumber: 9
|
|
15926
16081
|
}
|
|
15927
16082
|
}, renderInputGroup()) : /*#__PURE__*/React__default["default"].createElement(PopoverTrigger, {
|
|
15928
16083
|
__self: this,
|
|
15929
16084
|
__source: {
|
|
15930
16085
|
fileName: _jsxFileName$j,
|
|
15931
|
-
lineNumber:
|
|
16086
|
+
lineNumber: 72,
|
|
15932
16087
|
columnNumber: 9
|
|
15933
16088
|
}
|
|
15934
16089
|
}, /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
@@ -15936,14 +16091,14 @@
|
|
|
15936
16091
|
__self: this,
|
|
15937
16092
|
__source: {
|
|
15938
16093
|
fileName: _jsxFileName$j,
|
|
15939
|
-
lineNumber:
|
|
16094
|
+
lineNumber: 73,
|
|
15940
16095
|
columnNumber: 11
|
|
15941
16096
|
}
|
|
15942
16097
|
}, renderInputGroup())), /*#__PURE__*/React__default["default"].createElement(PopoverContent, {
|
|
15943
16098
|
__self: this,
|
|
15944
16099
|
__source: {
|
|
15945
16100
|
fileName: _jsxFileName$j,
|
|
15946
|
-
lineNumber:
|
|
16101
|
+
lineNumber: 76,
|
|
15947
16102
|
columnNumber: 7
|
|
15948
16103
|
}
|
|
15949
16104
|
}, renderTimePicker())) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
@@ -15951,7 +16106,7 @@
|
|
|
15951
16106
|
__self: this,
|
|
15952
16107
|
__source: {
|
|
15953
16108
|
fileName: _jsxFileName$j,
|
|
15954
|
-
lineNumber:
|
|
16109
|
+
lineNumber: 80,
|
|
15955
16110
|
columnNumber: 7
|
|
15956
16111
|
}
|
|
15957
16112
|
}, renderInputGroup()), /*#__PURE__*/React__default["default"].createElement(Drawer, {
|
|
@@ -15961,7 +16116,7 @@
|
|
|
15961
16116
|
__self: this,
|
|
15962
16117
|
__source: {
|
|
15963
16118
|
fileName: _jsxFileName$j,
|
|
15964
|
-
lineNumber:
|
|
16119
|
+
lineNumber: 81,
|
|
15965
16120
|
columnNumber: 7
|
|
15966
16121
|
}
|
|
15967
16122
|
}, /*#__PURE__*/React__default["default"].createElement(DrawerContent, {
|
|
@@ -15972,7 +16127,7 @@
|
|
|
15972
16127
|
__self: this,
|
|
15973
16128
|
__source: {
|
|
15974
16129
|
fileName: _jsxFileName$j,
|
|
15975
|
-
lineNumber:
|
|
16130
|
+
lineNumber: 82,
|
|
15976
16131
|
columnNumber: 9
|
|
15977
16132
|
}
|
|
15978
16133
|
}, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
@@ -15984,7 +16139,7 @@
|
|
|
15984
16139
|
__self: this,
|
|
15985
16140
|
__source: {
|
|
15986
16141
|
fileName: _jsxFileName$j,
|
|
15987
|
-
lineNumber:
|
|
16142
|
+
lineNumber: 88,
|
|
15988
16143
|
columnNumber: 11
|
|
15989
16144
|
}
|
|
15990
16145
|
}, renderTimePicker()))));
|
|
@@ -16046,8 +16201,13 @@
|
|
|
16046
16201
|
|
|
16047
16202
|
/**
|
|
16048
16203
|
Specify the maximum date.
|
|
16049
|
-
|
|
16050
|
-
maxDate: PropTypes__default["default"].instanceOf(Date)
|
|
16204
|
+
*/
|
|
16205
|
+
maxDate: PropTypes__default["default"].instanceOf(Date),
|
|
16206
|
+
|
|
16207
|
+
/**
|
|
16208
|
+
* Invalid state input.
|
|
16209
|
+
*/
|
|
16210
|
+
isInvalid: PropTypes__default["default"].bool
|
|
16051
16211
|
};
|
|
16052
16212
|
InputTimePicker.displayName = 'InputTimePicker';
|
|
16053
16213
|
|
|
@@ -16462,7 +16622,8 @@
|
|
|
16462
16622
|
showTimePicker = _a.showTimePicker,
|
|
16463
16623
|
minDate = _a.minDate,
|
|
16464
16624
|
maxDate = _a.maxDate,
|
|
16465
|
-
readOnly = _a.readOnly
|
|
16625
|
+
readOnly = _a.readOnly,
|
|
16626
|
+
isInvalid = _a.isInvalid;
|
|
16466
16627
|
|
|
16467
16628
|
var _f = React.useState(date || dateValue),
|
|
16468
16629
|
value = _f[0],
|
|
@@ -16510,7 +16671,8 @@
|
|
|
16510
16671
|
disabled: disabled,
|
|
16511
16672
|
readOnly: readOnly,
|
|
16512
16673
|
onClick: handleChange,
|
|
16513
|
-
size: size
|
|
16674
|
+
size: size,
|
|
16675
|
+
isInvalid: isInvalid
|
|
16514
16676
|
}, {
|
|
16515
16677
|
children: [jsxRuntime.jsx(InputLeftElement, {
|
|
16516
16678
|
children: jsxRuntime.jsx(icons.CalendarOutline, {}, void 0)
|