@povio/ui 3.3.0-rc.4 → 3.3.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 +15 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +93 -227
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +84 -202
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +60 -132
- package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
- package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +140 -338
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +65 -261
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
- package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
- package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
- package/dist/components/inputs/FormField/FormField.js +34 -47
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +75 -313
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +23 -83
- package/dist/components/inputs/Selection/Select/QuerySelect.js +30 -96
- package/dist/components/inputs/Selection/Select/Select.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
- package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
- package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
- package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
- package/dist/components/inputs/TextEditor/TextEditor.js +87 -389
- package/dist/components/inputs/shared/InputClear.js +24 -40
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/Table.d.ts +2 -8
- package/dist/components/table/Table.js +33 -55
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.js +8 -39
- package/dist/config/uiOverrides.context.d.ts +0 -1
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFormAutosave.js +33 -120
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/package.json +2 -2
- package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
- package/dist/components/inputs/FormField/formField.cva.js +0 -16
- package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
- package/dist/components/table/TableColumnFilterInput.js +0 -108
- package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
- package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
- package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
- package/dist/components/table/TableColumnFilterRow.js +0 -68
|
@@ -1,64 +1,29 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
1
|
import { useEffect, useRef } from "react";
|
|
3
2
|
//#region src/hooks/useLongPressRepeat.ts
|
|
4
|
-
var useLongPressRepeat = (
|
|
5
|
-
const $ = c(10);
|
|
6
|
-
const { onPress, enabled: t1, interval: t2, timeout: t3 } = t0;
|
|
7
|
-
const enabled = t1 === void 0 ? true : t1;
|
|
8
|
-
const interval = t2 === void 0 ? 85 : t2;
|
|
9
|
-
const timeout = t3 === void 0 ? 500 : t3;
|
|
3
|
+
var useLongPressRepeat = ({ onPress, enabled = true, interval = 85, timeout = 500 }) => {
|
|
10
4
|
const intervalRef = useRef(void 0);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14
|
-
t4 = () => () => {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
return () => {
|
|
15
7
|
clearInterval(intervalRef.current);
|
|
16
8
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
useEffect(t4, t5);
|
|
25
|
-
let t6;
|
|
26
|
-
if ($[2] !== enabled || $[3] !== interval || $[4] !== onPress || $[5] !== timeout) {
|
|
27
|
-
t6 = () => {
|
|
28
|
-
onPress(false);
|
|
29
|
-
if (!enabled) return;
|
|
30
|
-
intervalRef.current = setTimeout(() => {
|
|
9
|
+
}, []);
|
|
10
|
+
const onPressStart = () => {
|
|
11
|
+
onPress(false);
|
|
12
|
+
if (!enabled) return;
|
|
13
|
+
intervalRef.current = setTimeout(() => {
|
|
14
|
+
onPress(true);
|
|
15
|
+
intervalRef.current = setInterval(() => {
|
|
31
16
|
onPress(true);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} else t6 = $[6];
|
|
43
|
-
const onPressStart = t6;
|
|
44
|
-
let t7;
|
|
45
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46
|
-
t7 = () => {
|
|
47
|
-
clearInterval(intervalRef.current);
|
|
48
|
-
};
|
|
49
|
-
$[7] = t7;
|
|
50
|
-
} else t7 = $[7];
|
|
51
|
-
const onPressEnd = t7;
|
|
52
|
-
let t8;
|
|
53
|
-
if ($[8] !== onPressStart) {
|
|
54
|
-
t8 = {
|
|
55
|
-
onPressStart,
|
|
56
|
-
onPressEnd
|
|
57
|
-
};
|
|
58
|
-
$[8] = onPressStart;
|
|
59
|
-
$[9] = t8;
|
|
60
|
-
} else t8 = $[9];
|
|
61
|
-
return t8;
|
|
17
|
+
}, interval);
|
|
18
|
+
}, timeout);
|
|
19
|
+
};
|
|
20
|
+
const onPressEnd = () => {
|
|
21
|
+
clearInterval(intervalRef.current);
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
onPressStart,
|
|
25
|
+
onPressEnd
|
|
26
|
+
};
|
|
62
27
|
};
|
|
63
28
|
//#endregion
|
|
64
29
|
export { useLongPressRepeat };
|
package/dist/index.d.ts
CHANGED
|
@@ -193,7 +193,6 @@ export { inputUploadButtonDefinition, inputUploadDropZoneDefinition, } from './c
|
|
|
193
193
|
export { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, } from './components/inputs/File/shared/progressBar.cva';
|
|
194
194
|
export type { ProgressBarConfig, ProgressBarTrackConfig, ProgressBarVariantProps, } from './components/inputs/File/shared/progressBar.cva';
|
|
195
195
|
export { formFieldHeaderDefinition } from './components/inputs/FormField/formFieldHeader.cva';
|
|
196
|
-
export { formFieldDefinition } from './components/inputs/FormField/formField.cva';
|
|
197
196
|
export { formFieldErrorDefinition } from './components/inputs/FormField/formFieldError.cva';
|
|
198
197
|
export { formFieldHelperDefinition } from './components/inputs/FormField/formFieldHelper.cva';
|
|
199
198
|
export { textAreaWrapperDefinition } from './components/inputs/Input/TextArea/TextArea.cva';
|
package/dist/index.js
CHANGED
|
@@ -77,7 +77,6 @@ import { Checkbox } from "./components/inputs/Checkbox/Checkbox.js";
|
|
|
77
77
|
import { formFieldHeaderDefinition } from "./components/inputs/FormField/formFieldHeader.cva.js";
|
|
78
78
|
import { labelDefinition } from "./components/inputs/shared/label.cva.js";
|
|
79
79
|
import { formFieldHelperDefinition } from "./components/inputs/FormField/formFieldHelper.cva.js";
|
|
80
|
-
import { formFieldDefinition } from "./components/inputs/FormField/formField.cva.js";
|
|
81
80
|
import { FormField } from "./components/inputs/FormField/FormField.js";
|
|
82
81
|
import { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition } from "./components/inputs/shared/input.cva.js";
|
|
83
82
|
import { CheckboxGroup } from "./components/inputs/Checkbox/CheckboxGroup.js";
|
|
@@ -178,4 +177,4 @@ import { useSorting } from "./hooks/useSorting.js";
|
|
|
178
177
|
import { useTableColumnConfig } from "./hooks/useTableColumnConfig.js";
|
|
179
178
|
import { ArrayUtils } from "./utils/array.utils.js";
|
|
180
179
|
import { QueriesUtils } from "./utils/queries.utils.js";
|
|
181
|
-
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition,
|
|
180
|
+
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@povio/ui",
|
|
3
|
-
"version": "3.3.0
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"@react-stately/calendar": "^3.9.2",
|
|
31
31
|
"@react-stately/datepicker": "^3.16.0",
|
|
32
32
|
"@react-types/shared": "^3.33.0",
|
|
33
|
-
"@tanstack/react-query": "~5.90.21",
|
|
34
33
|
"@tanstack/react-table": "^8.21.3",
|
|
35
34
|
"axios": "^1.13.2",
|
|
36
35
|
"class-variance-authority": "^0.7.1",
|
|
@@ -52,6 +51,7 @@
|
|
|
52
51
|
"peerDependencies": {
|
|
53
52
|
"@casl/ability": "^6.7.3",
|
|
54
53
|
"@casl/react": "^5.0.0",
|
|
54
|
+
"@tanstack/react-query": "^5.89.0",
|
|
55
55
|
"@tiptap/core": "^3.19.0",
|
|
56
56
|
"@tiptap/extension-color": "^3.19.0",
|
|
57
57
|
"@tiptap/extension-heading": "^3.19.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const formFieldDefinition: {
|
|
2
|
-
base: string[];
|
|
3
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
4
|
-
readonly as: {
|
|
5
|
-
readonly default: "";
|
|
6
|
-
readonly filter: "";
|
|
7
|
-
readonly floating: "";
|
|
8
|
-
readonly inline: "";
|
|
9
|
-
};
|
|
10
|
-
}>;
|
|
11
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
-
//#region src/components/inputs/FormField/formField.cva.ts
|
|
3
|
-
var formFieldDefinition = UIOverrides.defineConfig({
|
|
4
|
-
base: [""],
|
|
5
|
-
config: {
|
|
6
|
-
variants: { as: {
|
|
7
|
-
default: "",
|
|
8
|
-
filter: "",
|
|
9
|
-
floating: "",
|
|
10
|
-
inline: ""
|
|
11
|
-
} },
|
|
12
|
-
defaultVariants: { as: "default" }
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
//#endregion
|
|
16
|
-
export { formFieldDefinition };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InputDef } from '../inputs/Inputs/InputItem';
|
|
2
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
interface TableColumnFilterInputProps<TFilterData extends Record<string, any>> {
|
|
4
|
-
form: UseFormReturn<TFilterData>;
|
|
5
|
-
inputDef: InputDef<TFilterData>;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const TableColumnFilterInput: <TFilterData extends Record<string, any>>({ form, inputDef, className, }: TableColumnFilterInputProps<TFilterData>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Inputs } from "../inputs/Inputs/Inputs.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
|
-
//#region src/components/table/TableColumnFilterInput.tsx
|
|
6
|
-
var TableColumnFilterInput = (t0) => {
|
|
7
|
-
const $ = c(28);
|
|
8
|
-
const { form, inputDef, className } = t0;
|
|
9
|
-
const filterKey = String(inputDef.name);
|
|
10
|
-
const inputProps = inputDef.props;
|
|
11
|
-
const t1 = inputProps?.className;
|
|
12
|
-
let t2;
|
|
13
|
-
if ($[0] !== t1) {
|
|
14
|
-
t2 = clsx("w-full min-w-0 max-w-full", t1, "[&_label]:sr-only");
|
|
15
|
-
$[0] = t1;
|
|
16
|
-
$[1] = t2;
|
|
17
|
-
} else t2 = $[1];
|
|
18
|
-
const t3 = inputProps?.containerClassName;
|
|
19
|
-
let t4;
|
|
20
|
-
if ($[2] !== t3) {
|
|
21
|
-
t4 = clsx("w-full min-w-0 max-w-full", t3);
|
|
22
|
-
$[2] = t3;
|
|
23
|
-
$[3] = t4;
|
|
24
|
-
} else t4 = $[3];
|
|
25
|
-
const t5 = inputProps?.inputClassName;
|
|
26
|
-
let t6;
|
|
27
|
-
if ($[4] !== t5) {
|
|
28
|
-
t6 = clsx("min-w-0 max-w-full truncate", t5);
|
|
29
|
-
$[4] = t5;
|
|
30
|
-
$[5] = t6;
|
|
31
|
-
} else t6 = $[5];
|
|
32
|
-
let t7;
|
|
33
|
-
if ($[6] !== inputProps || $[7] !== t2 || $[8] !== t4 || $[9] !== t6) {
|
|
34
|
-
t7 = {
|
|
35
|
-
...inputProps,
|
|
36
|
-
as: "filter",
|
|
37
|
-
className: t2,
|
|
38
|
-
containerClassName: t4,
|
|
39
|
-
inputClassName: t6,
|
|
40
|
-
hideLabel: true,
|
|
41
|
-
isClearable: true,
|
|
42
|
-
placeholder: "",
|
|
43
|
-
size: "extra-small"
|
|
44
|
-
};
|
|
45
|
-
$[6] = inputProps;
|
|
46
|
-
$[7] = t2;
|
|
47
|
-
$[8] = t4;
|
|
48
|
-
$[9] = t6;
|
|
49
|
-
$[10] = t7;
|
|
50
|
-
} else t7 = $[10];
|
|
51
|
-
const props = t7;
|
|
52
|
-
let t8;
|
|
53
|
-
if ($[11] !== filterKey || $[12] !== inputDef.label) {
|
|
54
|
-
t8 = typeof inputDef.label === "string" && inputDef.label.trim() ? inputDef.label : filterKey;
|
|
55
|
-
$[11] = filterKey;
|
|
56
|
-
$[12] = inputDef.label;
|
|
57
|
-
$[13] = t8;
|
|
58
|
-
} else t8 = $[13];
|
|
59
|
-
let t9;
|
|
60
|
-
if ($[14] !== inputDef || $[15] !== props || $[16] !== t8) {
|
|
61
|
-
t9 = {
|
|
62
|
-
...inputDef,
|
|
63
|
-
label: t8,
|
|
64
|
-
placeholder: "",
|
|
65
|
-
props
|
|
66
|
-
};
|
|
67
|
-
$[14] = inputDef;
|
|
68
|
-
$[15] = props;
|
|
69
|
-
$[16] = t8;
|
|
70
|
-
$[17] = t9;
|
|
71
|
-
} else t9 = $[17];
|
|
72
|
-
const inlineInputDef = t9;
|
|
73
|
-
let t10;
|
|
74
|
-
if ($[18] !== className) {
|
|
75
|
-
t10 = clsx("w-full min-w-0 max-w-full [&>*]:w-full [&_*]:min-w-0", className);
|
|
76
|
-
$[18] = className;
|
|
77
|
-
$[19] = t10;
|
|
78
|
-
} else t10 = $[19];
|
|
79
|
-
let t11;
|
|
80
|
-
if ($[20] !== inlineInputDef) {
|
|
81
|
-
t11 = [inlineInputDef];
|
|
82
|
-
$[20] = inlineInputDef;
|
|
83
|
-
$[21] = t11;
|
|
84
|
-
} else t11 = $[21];
|
|
85
|
-
let t12;
|
|
86
|
-
if ($[22] !== form || $[23] !== t11) {
|
|
87
|
-
t12 = /* @__PURE__ */ jsx(Inputs, {
|
|
88
|
-
form,
|
|
89
|
-
inputDefs: t11
|
|
90
|
-
});
|
|
91
|
-
$[22] = form;
|
|
92
|
-
$[23] = t11;
|
|
93
|
-
$[24] = t12;
|
|
94
|
-
} else t12 = $[24];
|
|
95
|
-
let t13;
|
|
96
|
-
if ($[25] !== t10 || $[26] !== t12) {
|
|
97
|
-
t13 = /* @__PURE__ */ jsx("div", {
|
|
98
|
-
className: t10,
|
|
99
|
-
children: t12
|
|
100
|
-
});
|
|
101
|
-
$[25] = t10;
|
|
102
|
-
$[26] = t12;
|
|
103
|
-
$[27] = t13;
|
|
104
|
-
} else t13 = $[27];
|
|
105
|
-
return t13;
|
|
106
|
-
};
|
|
107
|
-
//#endregion
|
|
108
|
-
export { TableColumnFilterInput };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
//#region src/components/table/TableColumnFilterPlaceholder.tsx
|
|
5
|
-
var columnFilterPlaceholderClassName = clsx("h-[calc(var(--spacing-input-height-xs)*2+var(--text-label-2)*var(--text-label-2--line-height)+2px)]", "flex w-full min-w-0 items-center overflow-hidden", "rounded-input-rounding-default border border-solid border-input-outlined-outline-disabled/50", "bg-input-filled-idle px-input-side-xs text-label-2");
|
|
6
|
-
var TableColumnFilterPlaceholder = (t0) => {
|
|
7
|
-
const $ = c(8);
|
|
8
|
-
const { label } = t0;
|
|
9
|
-
const t1 = label ? void 0 : true;
|
|
10
|
-
const t2 = label && "text-text-default-2";
|
|
11
|
-
let t3;
|
|
12
|
-
if ($[0] !== t2) {
|
|
13
|
-
t3 = clsx(columnFilterPlaceholderClassName, t2);
|
|
14
|
-
$[0] = t2;
|
|
15
|
-
$[1] = t3;
|
|
16
|
-
} else t3 = $[1];
|
|
17
|
-
let t4;
|
|
18
|
-
if ($[2] !== label) {
|
|
19
|
-
t4 = label ? /* @__PURE__ */ jsx("span", {
|
|
20
|
-
className: "min-w-0 truncate",
|
|
21
|
-
children: label
|
|
22
|
-
}) : null;
|
|
23
|
-
$[2] = label;
|
|
24
|
-
$[3] = t4;
|
|
25
|
-
} else t4 = $[3];
|
|
26
|
-
let t5;
|
|
27
|
-
if ($[4] !== t1 || $[5] !== t3 || $[6] !== t4) {
|
|
28
|
-
t5 = /* @__PURE__ */ jsx("div", {
|
|
29
|
-
"aria-hidden": t1,
|
|
30
|
-
className: t3,
|
|
31
|
-
children: t4
|
|
32
|
-
});
|
|
33
|
-
$[4] = t1;
|
|
34
|
-
$[5] = t3;
|
|
35
|
-
$[6] = t4;
|
|
36
|
-
$[7] = t5;
|
|
37
|
-
} else t5 = $[7];
|
|
38
|
-
return t5;
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { TableColumnFilterPlaceholder };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Header } from '@tanstack/react-table';
|
|
2
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
import { InputDef } from '../inputs/Inputs/InputItem';
|
|
4
|
-
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
5
|
-
import { TableHeadDataVariantProps } from './table.cva';
|
|
6
|
-
interface TableColumnFilterRowProps<T> {
|
|
7
|
-
headers: Header<T, unknown>[];
|
|
8
|
-
filterForm: UseFormReturn<Record<string, any>>;
|
|
9
|
-
filterDefs: InputDef<any>[];
|
|
10
|
-
tableHeadDataCva: UIOverrides.Cva<TableHeadDataVariantProps>;
|
|
11
|
-
rowClassName?: string;
|
|
12
|
-
cellClassName?: string;
|
|
13
|
-
showCellBorder?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const TableColumnFilterRow: <T>({ headers, filterForm, filterDefs, tableHeadDataCva, rowClassName, cellClassName, showCellBorder, }: TableColumnFilterRowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { TableColumnFilterInput } from "./TableColumnFilterInput.js";
|
|
2
|
-
import { TableColumnFilterPlaceholder } from "./TableColumnFilterPlaceholder.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
//#region src/components/table/TableColumnFilterRow.tsx
|
|
7
|
-
var getColumnMeta = (header) => header.column.columnDef.meta ?? {};
|
|
8
|
-
var TableColumnFilterRow = (t0) => {
|
|
9
|
-
const $ = c(18);
|
|
10
|
-
const { headers, filterForm, filterDefs, tableHeadDataCva, rowClassName, cellClassName, showCellBorder } = t0;
|
|
11
|
-
let t1;
|
|
12
|
-
if ($[0] !== filterDefs) {
|
|
13
|
-
t1 = new Map((filterDefs ?? []).map(_temp));
|
|
14
|
-
$[0] = filterDefs;
|
|
15
|
-
$[1] = t1;
|
|
16
|
-
} else t1 = $[1];
|
|
17
|
-
const inputDefsByName = t1;
|
|
18
|
-
let t2;
|
|
19
|
-
if ($[2] !== cellClassName || $[3] !== filterForm || $[4] !== headers || $[5] !== inputDefsByName || $[6] !== showCellBorder || $[7] !== tableHeadDataCva) {
|
|
20
|
-
let t3;
|
|
21
|
-
if ($[9] !== cellClassName || $[10] !== filterForm || $[11] !== inputDefsByName || $[12] !== showCellBorder || $[13] !== tableHeadDataCva) {
|
|
22
|
-
t3 = (header, index) => {
|
|
23
|
-
const columnMeta = getColumnMeta(header);
|
|
24
|
-
const filterKey = columnMeta.filterKey ?? header.column.id;
|
|
25
|
-
const filterDef_0 = inputDefsByName.get(filterKey);
|
|
26
|
-
return /* @__PURE__ */ jsx("th", {
|
|
27
|
-
colSpan: header.colSpan,
|
|
28
|
-
tabIndex: -1,
|
|
29
|
-
className: clsx(tableHeadDataCva({ hasRightBorder: index > 0 && showCellBorder }), "min-w-0 max-w-full overflow-hidden", cellClassName, columnMeta.width),
|
|
30
|
-
children: filterDef_0 ? /* @__PURE__ */ jsx(TableColumnFilterInput, {
|
|
31
|
-
form: filterForm,
|
|
32
|
-
inputDef: filterDef_0
|
|
33
|
-
}) : /* @__PURE__ */ jsx(TableColumnFilterPlaceholder, {})
|
|
34
|
-
}, `${header.id}-filter`);
|
|
35
|
-
};
|
|
36
|
-
$[9] = cellClassName;
|
|
37
|
-
$[10] = filterForm;
|
|
38
|
-
$[11] = inputDefsByName;
|
|
39
|
-
$[12] = showCellBorder;
|
|
40
|
-
$[13] = tableHeadDataCva;
|
|
41
|
-
$[14] = t3;
|
|
42
|
-
} else t3 = $[14];
|
|
43
|
-
t2 = headers.map(t3);
|
|
44
|
-
$[2] = cellClassName;
|
|
45
|
-
$[3] = filterForm;
|
|
46
|
-
$[4] = headers;
|
|
47
|
-
$[5] = inputDefsByName;
|
|
48
|
-
$[6] = showCellBorder;
|
|
49
|
-
$[7] = tableHeadDataCva;
|
|
50
|
-
$[8] = t2;
|
|
51
|
-
} else t2 = $[8];
|
|
52
|
-
let t3;
|
|
53
|
-
if ($[15] !== rowClassName || $[16] !== t2) {
|
|
54
|
-
t3 = /* @__PURE__ */ jsx("tr", {
|
|
55
|
-
className: rowClassName,
|
|
56
|
-
children: t2
|
|
57
|
-
});
|
|
58
|
-
$[15] = rowClassName;
|
|
59
|
-
$[16] = t2;
|
|
60
|
-
$[17] = t3;
|
|
61
|
-
} else t3 = $[17];
|
|
62
|
-
return t3;
|
|
63
|
-
};
|
|
64
|
-
function _temp(filterDef) {
|
|
65
|
-
return [String(filterDef.name), filterDef];
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
export { TableColumnFilterRow };
|