ivt 0.5.6 → 0.5.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.
- package/dist/accordion/index.mjs +15 -15
- package/dist/accordion-table/index.mjs +27 -27
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +17 -17
- package/dist/aspect-ratio/index.mjs +1 -1
- package/dist/avatar/index.mjs +7 -7
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +1 -0
- package/dist/base/index.mjs +56 -49
- package/dist/base/index.mjs.map +1 -1
- package/dist/breadcrumb/index.mjs +5 -5
- package/dist/button/index.mjs +3 -3
- package/dist/button-group/index.mjs +4 -4
- package/dist/calendar/index.mjs +9 -9
- package/dist/card/index.mjs +3 -3
- package/dist/carousel/index.mjs +4 -4
- package/dist/chart/index.mjs +4 -4
- package/dist/checkbox/index.mjs +14 -14
- package/dist/chunks/{CalendarRange-Bag_yGEQ.mjs → CalendarRange-BBDdipiF.mjs} +8 -8
- package/dist/chunks/{CalendarRange-Bag_yGEQ.mjs.map → CalendarRange-BBDdipiF.mjs.map} +1 -1
- package/dist/chunks/{ComboboxField-BLTT982W.mjs → ComboboxField-CQ9hWD8h.mjs} +9 -9
- package/dist/chunks/{ComboboxField-BLTT982W.mjs.map → ComboboxField-CQ9hWD8h.mjs.map} +1 -1
- package/dist/chunks/{Container-CDOK_e_b.mjs → Container-Dc7omjsi.mjs} +2 -2
- package/dist/chunks/{Container-CDOK_e_b.mjs.map → Container-Dc7omjsi.mjs.map} +1 -1
- package/dist/chunks/{DeleteConfirmationModal-BUcMwZqw.mjs → DeleteConfirmationModal-DY1WIUjV.mjs} +4 -4
- package/dist/chunks/{DeleteConfirmationModal-BUcMwZqw.mjs.map → DeleteConfirmationModal-DY1WIUjV.mjs.map} +1 -1
- package/dist/chunks/{TooltipIndicator-B23VyuOv.mjs → TooltipIndicator-CRQxZJc4.mjs} +4 -4
- package/dist/chunks/{TooltipIndicator-B23VyuOv.mjs.map → TooltipIndicator-CRQxZJc4.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-4KUcxYfY.mjs → _commonjsHelpers-CHnJMbeQ.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-CHnJMbeQ.mjs.map +1 -0
- package/dist/chunks/{accordion-Cz5ayAWy.mjs → accordion-Cs11bdwn.mjs} +11 -11
- package/dist/chunks/{accordion-Cz5ayAWy.mjs.map → accordion-Cs11bdwn.mjs.map} +1 -1
- package/dist/chunks/{badge-DcTK-GBP.mjs → badge-OLIlDazt.mjs} +2 -2
- package/dist/chunks/{badge-DcTK-GBP.mjs.map → badge-OLIlDazt.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-CGLhO34T.mjs → bundle-mjs-CDsJv8mx.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-CGLhO34T.mjs.map → bundle-mjs-CDsJv8mx.mjs.map} +1 -1
- package/dist/chunks/{button-D_MnAjQl.mjs → button-C8kDXHHO.mjs} +2 -2
- package/dist/chunks/{button-D_MnAjQl.mjs.map → button-C8kDXHHO.mjs.map} +1 -1
- package/dist/chunks/{calendar-DGNoWQgo.mjs → calendar-B3ttB6VU.mjs} +7 -7
- package/dist/chunks/{calendar-DGNoWQgo.mjs.map → calendar-B3ttB6VU.mjs.map} +1 -1
- package/dist/chunks/{calendar-days-CGnc9ko6.mjs → calendar-days-DywZyGDA.mjs} +2 -2
- package/dist/chunks/{calendar-days-CGnc9ko6.mjs.map → calendar-days-DywZyGDA.mjs.map} +1 -1
- package/dist/chunks/{card-DZ3filVx.mjs → card-DZyd1XuD.mjs} +2 -2
- package/dist/chunks/{card-DZ3filVx.mjs.map → card-DZyd1XuD.mjs.map} +1 -1
- package/dist/chunks/{check-DEf9V4Nh.mjs → check-LwrFK8tw.mjs} +2 -2
- package/dist/chunks/{check-DEf9V4Nh.mjs.map → check-LwrFK8tw.mjs.map} +1 -1
- package/dist/chunks/{checkbox-DjzhCYqW.mjs → checkbox-ggJwH1Qi.mjs} +11 -11
- package/dist/chunks/{checkbox-DjzhCYqW.mjs.map → checkbox-ggJwH1Qi.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-CNWi6KOF.mjs → chevron-down-BW_fza_f.mjs} +2 -2
- package/dist/chunks/{chevron-down-CNWi6KOF.mjs.map → chevron-down-BW_fza_f.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-Cla2-kGr.mjs → chevron-left-iSYNdGiZ.mjs} +2 -2
- package/dist/chunks/{chevron-left-Cla2-kGr.mjs.map → chevron-left-iSYNdGiZ.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-C3X2iYjh.mjs → chevron-right-BDBexrwi.mjs} +2 -2
- package/dist/chunks/{chevron-right-C3X2iYjh.mjs.map → chevron-right-BDBexrwi.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-Dcziczc9.mjs → chevrons-up-down-krhX0LvO.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-Dcziczc9.mjs.map → chevrons-up-down-krhX0LvO.mjs.map} +1 -1
- package/dist/chunks/{command-c98KtQLr.mjs → command-Dmn5Zotf.mjs} +8 -8
- package/dist/chunks/{command-c98KtQLr.mjs.map → command-Dmn5Zotf.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-BQUZb4BK.mjs → createLucideIcon-Cs209BXY.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-BQUZb4BK.mjs.map → createLucideIcon-Cs209BXY.mjs.map} +1 -1
- package/dist/chunks/{date-BX6jqpaN.mjs → date-Cp5v7MCD.mjs} +2 -2
- package/dist/chunks/{date-BX6jqpaN.mjs.map → date-Cp5v7MCD.mjs.map} +1 -1
- package/dist/chunks/{dialog-Bzks3Ko4.mjs → dialog-DGL-wjm5.mjs} +4 -4
- package/dist/chunks/{dialog-Bzks3Ko4.mjs.map → dialog-DGL-wjm5.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-S2vrEUTX.mjs → ellipsis-z3pVR1Ha.mjs} +2 -2
- package/dist/chunks/{ellipsis-S2vrEUTX.mjs.map → ellipsis-z3pVR1Ha.mjs.map} +1 -1
- package/dist/chunks/{form-CwxoZkN0.mjs → form-Bfc0Vrf9.mjs} +3 -3
- package/dist/chunks/{form-CwxoZkN0.mjs.map → form-Bfc0Vrf9.mjs.map} +1 -1
- package/dist/chunks/{format-6LfcNksm.mjs → format-Bw766LiP.mjs} +1 -1
- package/dist/chunks/{format-6LfcNksm.mjs.map → format-Bw766LiP.mjs.map} +1 -1
- package/dist/chunks/{format-numbers-NnQQahT8.mjs → format-numbers-B2Xg1Xd4.mjs} +1 -1
- package/dist/chunks/{format-numbers-NnQQahT8.mjs.map → format-numbers-B2Xg1Xd4.mjs.map} +1 -1
- package/dist/chunks/{hover-card-5rT-1QMh.mjs → hover-card-B1iaMKeT.mjs} +11 -11
- package/dist/chunks/{hover-card-5rT-1QMh.mjs.map → hover-card-B1iaMKeT.mjs.map} +1 -1
- package/dist/chunks/{index-BCbVqu_3.mjs → index-5BIVlsf0.mjs} +2 -2
- package/dist/chunks/{index-BCbVqu_3.mjs.map → index-5BIVlsf0.mjs.map} +1 -1
- package/dist/chunks/{index-BQ-TEa5d.mjs → index-7aYTflwq.mjs} +1 -1
- package/dist/chunks/{index-BQ-TEa5d.mjs.map → index-7aYTflwq.mjs.map} +1 -1
- package/dist/chunks/{index-AKiXR0pZ.mjs → index-B79kyzoW.mjs} +1 -1
- package/dist/chunks/{index-AKiXR0pZ.mjs.map → index-B79kyzoW.mjs.map} +1 -1
- package/dist/chunks/{index-CY5xJaha.mjs → index-BKBEmeOE.mjs} +1 -1
- package/dist/chunks/{index-CY5xJaha.mjs.map → index-BKBEmeOE.mjs.map} +1 -1
- package/dist/chunks/{index-UxueW3GO.mjs → index-BYjPaTiQ.mjs} +15 -15
- package/dist/chunks/{index-UxueW3GO.mjs.map → index-BYjPaTiQ.mjs.map} +1 -1
- package/dist/chunks/{index-BmDvd1mU.mjs → index-BamMmpxT.mjs} +11 -11
- package/dist/chunks/{index-BmDvd1mU.mjs.map → index-BamMmpxT.mjs.map} +1 -1
- package/dist/chunks/{index-DLownQDQ.mjs → index-Bbl_XfK5.mjs} +2 -2
- package/dist/chunks/{index-DLownQDQ.mjs.map → index-Bbl_XfK5.mjs.map} +1 -1
- package/dist/chunks/{index-4TCt3gOI.mjs → index-BwahdO40.mjs} +3 -3
- package/dist/chunks/{index-4TCt3gOI.mjs.map → index-BwahdO40.mjs.map} +1 -1
- package/dist/chunks/{index-BWnbRXP-.mjs → index-CHnGKuc1.mjs} +7 -7
- package/dist/chunks/{index-BWnbRXP-.mjs.map → index-CHnGKuc1.mjs.map} +1 -1
- package/dist/chunks/{index-BmW-kojJ.mjs → index-CJznEDFQ.mjs} +1 -1
- package/dist/chunks/{index-BmW-kojJ.mjs.map → index-CJznEDFQ.mjs.map} +1 -1
- package/dist/chunks/{index-Cq-A6c3g.mjs → index-Ctl41mbz.mjs} +1 -1
- package/dist/chunks/{index-Cq-A6c3g.mjs.map → index-Ctl41mbz.mjs.map} +1 -1
- package/dist/chunks/{index-CGiXQ4Pe.mjs → index-CuPJzY2D.mjs} +9 -9
- package/dist/chunks/{index-CGiXQ4Pe.mjs.map → index-CuPJzY2D.mjs.map} +1 -1
- package/dist/chunks/{index-6boixHzs.mjs → index-D1Oqvl53.mjs} +2 -2
- package/dist/chunks/{index-6boixHzs.mjs.map → index-D1Oqvl53.mjs.map} +1 -1
- package/dist/chunks/{index-T-_ESk_G.mjs → index-D33V_3rS.mjs} +1 -1
- package/dist/chunks/{index-T-_ESk_G.mjs.map → index-D33V_3rS.mjs.map} +1 -1
- package/dist/chunks/{index-C_z2VNWo.mjs → index-D3kx7k_i.mjs} +1 -1
- package/dist/chunks/{index-C_z2VNWo.mjs.map → index-D3kx7k_i.mjs.map} +1 -1
- package/dist/chunks/{index-wAh1wx6m.mjs → index-DM3MyE-N.mjs} +9 -9
- package/dist/chunks/{index-wAh1wx6m.mjs.map → index-DM3MyE-N.mjs.map} +1 -1
- package/dist/chunks/{index-B2gDNmb8.mjs → index-Df3YRRgX.mjs} +5 -5
- package/dist/chunks/{index-B2gDNmb8.mjs.map → index-Df3YRRgX.mjs.map} +1 -1
- package/dist/chunks/{index-DkGvxlDJ.mjs → index-EhkpAtV_.mjs} +2 -2
- package/dist/chunks/{index-DkGvxlDJ.mjs.map → index-EhkpAtV_.mjs.map} +1 -1
- package/dist/chunks/{index-DSLICNwF.mjs → index-TBrLKN9p.mjs} +1 -1
- package/dist/chunks/{index-DSLICNwF.mjs.map → index-TBrLKN9p.mjs.map} +1 -1
- package/dist/chunks/{index-Cs_8Iu2P.mjs → index-YOMvi8__.mjs} +1 -1
- package/dist/chunks/{index-Cs_8Iu2P.mjs.map → index-YOMvi8__.mjs.map} +1 -1
- package/dist/chunks/{index-BUvLOcM1.mjs → index-ZrPnvFCM.mjs} +1 -1
- package/dist/chunks/{index-BUvLOcM1.mjs.map → index-ZrPnvFCM.mjs.map} +1 -1
- package/dist/chunks/{index-M3WHAYcQ.mjs → index-g06EAstv.mjs} +5 -5
- package/dist/chunks/{index-M3WHAYcQ.mjs.map → index-g06EAstv.mjs.map} +1 -1
- package/dist/chunks/{index-BjgE_yhl.mjs → index-wKi7FsfC.mjs} +3 -3
- package/dist/chunks/{index-BjgE_yhl.mjs.map → index-wKi7FsfC.mjs.map} +1 -1
- package/dist/chunks/{input-DKrW5tuu.mjs → input-Cq3hRDLY.mjs} +2 -2
- package/dist/chunks/{input-DKrW5tuu.mjs.map → input-Cq3hRDLY.mjs.map} +1 -1
- package/dist/chunks/{label-BuC6aAG0.mjs → label-D9mw8gry.mjs} +3 -3
- package/dist/chunks/{label-BuC6aAG0.mjs.map → label-D9mw8gry.mjs.map} +1 -1
- package/dist/chunks/{loader-circle-Df9_-0g-.mjs → loader-circle-DN94bZLW.mjs} +2 -2
- package/dist/chunks/{loader-circle-Df9_-0g-.mjs.map → loader-circle-DN94bZLW.mjs.map} +1 -1
- package/dist/chunks/{multi-select--jT_ewJI.mjs → multi-select-p8e7hqdd.mjs} +12 -12
- package/dist/chunks/{multi-select--jT_ewJI.mjs.map → multi-select-p8e7hqdd.mjs.map} +1 -1
- package/dist/chunks/{pagination-m1KTCwr8.mjs → pagination-DVnnlPCe.mjs} +6 -6
- package/dist/chunks/{pagination-m1KTCwr8.mjs.map → pagination-DVnnlPCe.mjs.map} +1 -1
- package/dist/chunks/{popover-n__dGmWJ.mjs → popover-Cxd1LZHE.mjs} +13 -13
- package/dist/chunks/{popover-n__dGmWJ.mjs.map → popover-Cxd1LZHE.mjs.map} +1 -1
- package/dist/chunks/{progress-DzHu9qd2.mjs → progress-BHF75OVa.mjs} +4 -4
- package/dist/chunks/{progress-DzHu9qd2.mjs.map → progress-BHF75OVa.mjs.map} +1 -1
- package/dist/chunks/{react-number-format.es-CmBAGhhQ.mjs → react-number-format.es-BBXgiDBD.mjs} +1 -1
- package/dist/chunks/{react-number-format.es-CmBAGhhQ.mjs.map → react-number-format.es-BBXgiDBD.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-DDlmn7ag.mjs → scroll-area-DTwYYQ8q.mjs} +11 -11
- package/dist/chunks/{scroll-area-DDlmn7ag.mjs.map → scroll-area-DTwYYQ8q.mjs.map} +1 -1
- package/dist/chunks/{select-BdW90s0k.mjs → select-Bkmq2X8X.mjs} +5 -5
- package/dist/chunks/{select-BdW90s0k.mjs.map → select-Bkmq2X8X.mjs.map} +1 -1
- package/dist/chunks/{separator-CkJ0LBlz.mjs → separator-gh3PBnpH.mjs} +3 -3
- package/dist/chunks/{separator-CkJ0LBlz.mjs.map → separator-gh3PBnpH.mjs.map} +1 -1
- package/dist/chunks/{sheet-BLsRYTsa.mjs → sheet-BT9RwmPS.mjs} +4 -4
- package/dist/chunks/{sheet-BLsRYTsa.mjs.map → sheet-BT9RwmPS.mjs.map} +1 -1
- package/dist/chunks/{skeleton-CGj35I4b.mjs → skeleton-CXrLE3fs.mjs} +2 -2
- package/dist/chunks/{skeleton-CGj35I4b.mjs.map → skeleton-CXrLE3fs.mjs.map} +1 -1
- package/dist/chunks/{sortable-CxR7dghC.mjs → sortable-DC4HebwV.mjs} +14 -8
- package/dist/chunks/{sortable-CxR7dghC.mjs.map → sortable-DC4HebwV.mjs.map} +1 -1
- package/dist/chunks/{table-YJw4-dig.mjs → table-nPqfWR0d.mjs} +3 -3
- package/dist/chunks/{table-YJw4-dig.mjs.map → table-nPqfWR0d.mjs.map} +1 -1
- package/dist/chunks/{textarea-uqJyF5jY.mjs → textarea-CvJAEfFK.mjs} +2 -2
- package/dist/chunks/{textarea-uqJyF5jY.mjs.map → textarea-CvJAEfFK.mjs.map} +1 -1
- package/dist/chunks/{toggle-DnllXBCB.mjs → toggle-UnHxq53A.mjs} +5 -5
- package/dist/chunks/{toggle-DnllXBCB.mjs.map → toggle-UnHxq53A.mjs.map} +1 -1
- package/dist/chunks/{tooltip-kXkkJZem.mjs → tooltip-B8zF2C8j.mjs} +13 -13
- package/dist/chunks/{tooltip-kXkkJZem.mjs.map → tooltip-B8zF2C8j.mjs.map} +1 -1
- package/dist/chunks/{trash-2-CJs96X7u.mjs → trash-2-CMgAgkKK.mjs} +2 -2
- package/dist/chunks/{trash-2-CJs96X7u.mjs.map → trash-2-CMgAgkKK.mjs.map} +1 -1
- package/dist/chunks/{triangle-alert-CW5j-i5O.mjs → triangle-alert-XjlHTdeo.mjs} +2 -2
- package/dist/chunks/{triangle-alert-CW5j-i5O.mjs.map → triangle-alert-XjlHTdeo.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-dqPUMt5Y.mjs → tslib.es6--9nUwZOO.mjs} +1 -1
- package/dist/chunks/{tslib.es6-dqPUMt5Y.mjs.map → tslib.es6--9nUwZOO.mjs.map} +1 -1
- package/dist/chunks/{utils-D8c5tyzG.mjs → utils-Cle2i1lJ.mjs} +2 -2
- package/dist/chunks/{utils-D8c5tyzG.mjs.map → utils-Cle2i1lJ.mjs.map} +1 -1
- package/dist/chunks/{x-DYQCuAK0.mjs → x-CSOUAHrZ.mjs} +2 -2
- package/dist/chunks/{x-DYQCuAK0.mjs.map → x-CSOUAHrZ.mjs.map} +1 -1
- package/dist/collapsible/index.mjs +9 -9
- package/dist/combobox/index.mjs +26 -26
- package/dist/command/index.mjs +20 -20
- package/dist/context-menu/index.mjs +23 -23
- package/dist/dash/index.mjs +25 -25
- package/dist/data-table/index.d.ts +26 -3
- package/dist/data-table/index.mjs +201 -59
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/date-picker/index.mjs +27 -27
- package/dist/dialog/index.mjs +19 -19
- package/dist/drawer/index.mjs +16 -16
- package/dist/dropdown-menu/index.mjs +23 -23
- package/dist/dropzone/index.mjs +18 -18
- package/dist/editable-table/index.mjs +10 -10
- package/dist/empty/index.mjs +2 -2
- package/dist/field/index.mjs +5 -5
- package/dist/form/index.mjs +5 -5
- package/dist/form-fields/index.mjs +28 -28
- package/dist/hover-card/index.mjs +15 -15
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/input-group/index.mjs +5 -5
- package/dist/input-otp/index.mjs +3 -3
- package/dist/item/index.mjs +4 -4
- package/dist/ivt.css +1 -1
- package/dist/kbd/index.mjs +2 -2
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.mjs +6 -6
- package/dist/menubar/index.mjs +23 -23
- package/dist/multi-select/index.mjs +31 -31
- package/dist/navigation-menu/index.mjs +17 -17
- package/dist/pagination/index.mjs +8 -8
- package/dist/popover/index.mjs +18 -18
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +17 -17
- package/dist/resizable/index.mjs +3 -3
- package/dist/scroll-area/index.mjs +12 -12
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +4 -4
- package/dist/shared/index.mjs +5 -5
- package/dist/sheet/index.mjs +19 -19
- package/dist/sidebar/index.mjs +27 -27
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/slider/index.mjs +12 -12
- package/dist/sortable/index.d.ts +7 -1
- package/dist/sortable/index.mjs +4 -4
- package/dist/spinner/index.mjs +4 -4
- package/dist/switch/index.mjs +10 -10
- package/dist/table/index.mjs +3 -3
- package/dist/table-filter/index.d.ts +29 -11
- package/dist/table-filter/index.mjs +82 -75
- package/dist/table-filter/index.mjs.map +1 -1
- package/dist/tabs/index.mjs +13 -13
- package/dist/textarea/index.mjs +3 -3
- package/dist/toast/index.mjs +15 -15
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +13 -13
- package/dist/tooltip/index.mjs +17 -17
- package/package.json +1 -1
- package/dist/chunks/_commonjsHelpers-4KUcxYfY.mjs.map +0 -1
package/dist/sortable/index.d.ts
CHANGED
|
@@ -72,10 +72,16 @@ interface SortableProps<TData extends {
|
|
|
72
72
|
* overlay={<Skeleton className="w-full h-8" />}
|
|
73
73
|
*/
|
|
74
74
|
overlay?: React.ReactNode | null;
|
|
75
|
+
/**
|
|
76
|
+
* An optional array of items to be used in the SortableContext.
|
|
77
|
+
* If provided, this will be used instead of the `value` prop for the SortableContext items.
|
|
78
|
+
* This is useful for restricting the sortable context to a subset of items (e.g. siblings only).
|
|
79
|
+
*/
|
|
80
|
+
contextItems?: TData[];
|
|
75
81
|
}
|
|
76
82
|
declare function Sortable<TData extends {
|
|
77
83
|
id: UniqueIdentifier;
|
|
78
|
-
}>({ value, onValueChange, collisionDetection, modifiers, strategy, onMove, orientation, overlay, children, ...props }: SortableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
84
|
+
}>({ value, onValueChange, collisionDetection, modifiers, strategy, onMove, orientation, overlay, children, onDragStart, onDragEnd, contextItems, ...props }: SortableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
79
85
|
interface SortableOverlayProps extends React.ComponentPropsWithRef<typeof DragOverlay> {
|
|
80
86
|
activeId?: UniqueIdentifier | null;
|
|
81
87
|
}
|
package/dist/sortable/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { S as Sortable, a as SortableDragHandle, b as SortableItem, c as SortableOverlay } from '../chunks/sortable-
|
|
1
|
+
export { S as Sortable, a as SortableDragHandle, b as SortableItem, c as SortableOverlay } from '../chunks/sortable-DC4HebwV.mjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-dom';
|
|
4
4
|
import '@radix-ui/react-slot';
|
|
5
|
-
import '../chunks/utils-
|
|
6
|
-
import '../chunks/bundle-mjs-
|
|
7
|
-
import '../chunks/button-
|
|
5
|
+
import '../chunks/utils-Cle2i1lJ.mjs';
|
|
6
|
+
import '../chunks/bundle-mjs-CDsJv8mx.mjs';
|
|
7
|
+
import '../chunks/button-C8kDXHHO.mjs';
|
|
8
8
|
import 'class-variance-authority';
|
|
9
9
|
//# sourceMappingURL=index.mjs.map
|
package/dist/spinner/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as cn } from '../chunks/utils-
|
|
2
|
-
import { L as LoaderCircle } from '../chunks/loader-circle-
|
|
3
|
-
import '../chunks/bundle-mjs-
|
|
4
|
-
import '../chunks/createLucideIcon-
|
|
1
|
+
import { c as cn } from '../chunks/utils-Cle2i1lJ.mjs';
|
|
2
|
+
import { L as LoaderCircle } from '../chunks/loader-circle-DN94bZLW.mjs';
|
|
3
|
+
import '../chunks/bundle-mjs-CDsJv8mx.mjs';
|
|
4
|
+
import '../chunks/createLucideIcon-Cs209BXY.mjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
|
|
7
7
|
function Spinner({ className, ...props }) {
|
package/dist/switch/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { c as composeEventHandlers } from '../chunks/index-
|
|
3
|
-
import { u as useComposedRefs } from '../chunks/index-
|
|
4
|
-
import { c as createContextScope } from '../chunks/index-
|
|
5
|
-
import { u as useControllableState } from '../chunks/index-
|
|
6
|
-
import { u as usePrevious } from '../chunks/index-
|
|
7
|
-
import { u as useSize } from '../chunks/index-
|
|
8
|
-
import { P as Primitive } from '../chunks/index-
|
|
2
|
+
import { c as composeEventHandlers } from '../chunks/index-TBrLKN9p.mjs';
|
|
3
|
+
import { u as useComposedRefs } from '../chunks/index-ZrPnvFCM.mjs';
|
|
4
|
+
import { c as createContextScope } from '../chunks/index-D3kx7k_i.mjs';
|
|
5
|
+
import { u as useControllableState } from '../chunks/index-D1Oqvl53.mjs';
|
|
6
|
+
import { u as usePrevious } from '../chunks/index-BKBEmeOE.mjs';
|
|
7
|
+
import { u as useSize } from '../chunks/index-EhkpAtV_.mjs';
|
|
8
|
+
import { P as Primitive } from '../chunks/index-CJznEDFQ.mjs';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
-
import { c as cn } from '../chunks/utils-
|
|
11
|
-
import '../chunks/index-
|
|
10
|
+
import { c as cn } from '../chunks/utils-Cle2i1lJ.mjs';
|
|
11
|
+
import '../chunks/index-D33V_3rS.mjs';
|
|
12
12
|
import 'react-dom';
|
|
13
13
|
import '@radix-ui/react-slot';
|
|
14
|
-
import '../chunks/bundle-mjs-
|
|
14
|
+
import '../chunks/bundle-mjs-CDsJv8mx.mjs';
|
|
15
15
|
|
|
16
16
|
var SWITCH_NAME = "Switch";
|
|
17
17
|
var [createSwitchContext] = createContextScope(SWITCH_NAME);
|
package/dist/table/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { T as Table, b as TableBody, g as TableCaption, f as TableCell, c as TableFooter, d as TableHead, a as TableHeader, e as TableRow } from '../chunks/table-
|
|
1
|
+
export { T as Table, b as TableBody, g as TableCaption, f as TableCell, c as TableFooter, d as TableHead, a as TableHeader, e as TableRow } from '../chunks/table-nPqfWR0d.mjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../chunks/utils-
|
|
4
|
-
import '../chunks/bundle-mjs-
|
|
3
|
+
import '../chunks/utils-Cle2i1lJ.mjs';
|
|
4
|
+
import '../chunks/bundle-mjs-CDsJv8mx.mjs';
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { DefaultValues } from 'react-hook-form';
|
|
3
4
|
import { ZodObject, z } from 'zod';
|
|
4
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
6
|
|
|
7
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: <any> */
|
|
8
|
+
|
|
6
9
|
type DefaultFilterSide = "top" | "bottom" | "left" | "right";
|
|
7
10
|
interface TableFilterBaseProps<TData> {
|
|
8
11
|
table: Table<TData>;
|
|
9
12
|
defaultSide?: DefaultFilterSide;
|
|
10
13
|
disabled?: boolean;
|
|
11
14
|
}
|
|
15
|
+
type FieldFilterType = "text" | "number" | "date" | "select" | "checkbox" | "cnpj" | "dateRange" | "numeric_range" | "multiselect" | "exactString" | "exactNumber";
|
|
12
16
|
type FieldConfig<TFormValues> = {
|
|
13
|
-
name: keyof TFormValues;
|
|
17
|
+
name: keyof TFormValues extends string ? keyof TFormValues | (string & {}) : string;
|
|
14
18
|
label: string;
|
|
15
19
|
placeholder: string;
|
|
16
|
-
type:
|
|
20
|
+
type: FieldFilterType;
|
|
17
21
|
allowNegative?: boolean;
|
|
18
22
|
isCurrency?: boolean;
|
|
19
23
|
isPercent?: boolean;
|
|
@@ -22,20 +26,34 @@ type FieldConfig<TFormValues> = {
|
|
|
22
26
|
options?: {
|
|
23
27
|
label: string;
|
|
24
28
|
value: any;
|
|
25
|
-
icon?: ReactNode;
|
|
29
|
+
icon?: React__default.ReactNode;
|
|
26
30
|
}[];
|
|
27
31
|
items?: string[];
|
|
28
32
|
style?: "badge";
|
|
29
33
|
description?: string;
|
|
34
|
+
decimalScale?: number;
|
|
30
35
|
};
|
|
31
|
-
interface TableFilterProps<TData, TSchema extends ZodObject<any>, TFormValues = z.infer<TSchema>> extends TableFilterBaseProps<TData> {
|
|
36
|
+
interface TableFilterProps<TData = unknown, TSchema extends ZodObject<any> = ZodObject<any>, TFormValues = z.infer<TSchema>> extends TableFilterBaseProps<TData> {
|
|
32
37
|
title: string;
|
|
33
38
|
schema: TSchema;
|
|
34
39
|
fieldConfigs: FieldConfig<TFormValues>[];
|
|
35
|
-
defaultFilterValues: TFormValues
|
|
36
|
-
prepareFilterStorage
|
|
37
|
-
appliedFiltersCount
|
|
38
|
-
setAppliedFiltersCount
|
|
40
|
+
defaultFilterValues: DefaultValues<TFormValues>;
|
|
41
|
+
prepareFilterStorage?: (data: TFormValues) => TFormValues;
|
|
42
|
+
appliedFiltersCount?: number;
|
|
43
|
+
setAppliedFiltersCount?: (count: number) => void;
|
|
44
|
+
filterStorage?: any;
|
|
45
|
+
setFilterStorage?: (value: any) => void;
|
|
46
|
+
pagination?: {
|
|
47
|
+
pageIndex: number;
|
|
48
|
+
pageSize: number;
|
|
49
|
+
};
|
|
50
|
+
setPagination?: (value: {
|
|
51
|
+
pageIndex: number;
|
|
52
|
+
pageSize: number;
|
|
53
|
+
}) => void;
|
|
54
|
+
resetKey?: number;
|
|
55
|
+
applyFiltersOnMount?: boolean;
|
|
56
|
+
onClearFilters?: () => void;
|
|
39
57
|
}
|
|
40
58
|
type Operator = "eq" | "gt" | "lt" | "gte" | "lte";
|
|
41
59
|
type NumericFilterValue = {
|
|
@@ -43,7 +61,7 @@ type NumericFilterValue = {
|
|
|
43
61
|
value: number | null;
|
|
44
62
|
};
|
|
45
63
|
|
|
46
|
-
declare function TableFilter<TData, TSchema extends ZodObject<any>>({ table, defaultSide, disabled, title, schema, fieldConfigs, defaultFilterValues,
|
|
64
|
+
declare function TableFilter<TData, TSchema extends ZodObject<any>>({ table, defaultSide, disabled, title, schema, fieldConfigs, defaultFilterValues, appliedFiltersCount, setAppliedFiltersCount, applyFiltersOnMount, onClearFilters, }: TableFilterProps<TData, TSchema>): react_jsx_runtime.JSX.Element;
|
|
47
65
|
|
|
48
66
|
export { TableFilter };
|
|
49
|
-
export type { DefaultFilterSide, FieldConfig, NumericFilterValue, Operator, TableFilterBaseProps, TableFilterProps };
|
|
67
|
+
export type { DefaultFilterSide, FieldConfig, FieldFilterType, NumericFilterValue, Operator, TableFilterBaseProps, TableFilterProps };
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { g as get, s as set, h as appendErrors, i as useForm, F as Form, f as FormField, a as FormItem, b as FormLabel, c as FormControl, d as FormDescription, e as FormMessage } from '../chunks/form-
|
|
1
|
+
import { g as get, s as set, h as appendErrors, i as useForm, F as Form, f as FormField, a as FormItem, b as FormLabel, c as FormControl, d as FormDescription, e as FormMessage } from '../chunks/form-Bfc0Vrf9.mjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { N as NumericFormat, P as PatternFormat } from '../chunks/react-number-format.es-
|
|
4
|
-
import { c as cn } from '../chunks/utils-
|
|
5
|
-
import { f as formatDateToBrazilian, a as parseFieldDate, p as ptBR } from '../chunks/date-
|
|
6
|
-
import { f as formatNumberWithComma, s as styleInput, c as styleSelect } from '../chunks/format-numbers-
|
|
7
|
-
import { S as Sheet, a as SheetTrigger, c as SheetContent, d as SheetHeader, f as SheetTitle, e as SheetFooter, b as SheetClose } from '../chunks/sheet-
|
|
8
|
-
import { c as createLucideIcon } from '../chunks/createLucideIcon-
|
|
9
|
-
import { C as CalendarDays } from '../chunks/calendar-days-
|
|
10
|
-
import { C as Checkbox } from '../chunks/checkbox-
|
|
11
|
-
import { C as CalendarRange } from '../chunks/CalendarRange-
|
|
12
|
-
import { C as ComboboxField } from '../chunks/ComboboxField-
|
|
13
|
-
import { M as MultiSelect } from '../chunks/multi-select
|
|
14
|
-
import { B as Button } from '../chunks/button-
|
|
15
|
-
import { B as Badge } from '../chunks/badge-
|
|
16
|
-
import { S as ScrollArea } from '../chunks/scroll-area-
|
|
17
|
-
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-
|
|
18
|
-
import { C as Calendar } from '../chunks/calendar-
|
|
19
|
-
import { f as format } from '../chunks/format-
|
|
20
|
-
import { L as Label } from '../chunks/label-
|
|
21
|
-
import { S as Separator } from '../chunks/separator-
|
|
22
|
-
import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from '../chunks/select-
|
|
23
|
-
import { I as Input } from '../chunks/input-
|
|
3
|
+
import { N as NumericFormat, P as PatternFormat } from '../chunks/react-number-format.es-BBXgiDBD.mjs';
|
|
4
|
+
import { c as cn } from '../chunks/utils-Cle2i1lJ.mjs';
|
|
5
|
+
import { f as formatDateToBrazilian, a as parseFieldDate, p as ptBR } from '../chunks/date-Cp5v7MCD.mjs';
|
|
6
|
+
import { f as formatNumberWithComma, s as styleInput, c as styleSelect } from '../chunks/format-numbers-B2Xg1Xd4.mjs';
|
|
7
|
+
import { S as Sheet, a as SheetTrigger, c as SheetContent, d as SheetHeader, f as SheetTitle, e as SheetFooter, b as SheetClose } from '../chunks/sheet-BT9RwmPS.mjs';
|
|
8
|
+
import { c as createLucideIcon } from '../chunks/createLucideIcon-Cs209BXY.mjs';
|
|
9
|
+
import { C as CalendarDays } from '../chunks/calendar-days-DywZyGDA.mjs';
|
|
10
|
+
import { C as Checkbox } from '../chunks/checkbox-ggJwH1Qi.mjs';
|
|
11
|
+
import { C as CalendarRange } from '../chunks/CalendarRange-BBDdipiF.mjs';
|
|
12
|
+
import { C as ComboboxField } from '../chunks/ComboboxField-CQ9hWD8h.mjs';
|
|
13
|
+
import { M as MultiSelect } from '../chunks/multi-select-p8e7hqdd.mjs';
|
|
14
|
+
import { B as Button } from '../chunks/button-C8kDXHHO.mjs';
|
|
15
|
+
import { B as Badge } from '../chunks/badge-OLIlDazt.mjs';
|
|
16
|
+
import { S as ScrollArea } from '../chunks/scroll-area-DTwYYQ8q.mjs';
|
|
17
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-Cxd1LZHE.mjs';
|
|
18
|
+
import { C as Calendar } from '../chunks/calendar-B3ttB6VU.mjs';
|
|
19
|
+
import { f as format } from '../chunks/format-Bw766LiP.mjs';
|
|
20
|
+
import { L as Label } from '../chunks/label-D9mw8gry.mjs';
|
|
21
|
+
import { S as Separator } from '../chunks/separator-gh3PBnpH.mjs';
|
|
22
|
+
import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from '../chunks/select-Bkmq2X8X.mjs';
|
|
23
|
+
import { I as Input } from '../chunks/input-Cq3hRDLY.mjs';
|
|
24
24
|
import '@radix-ui/react-slot';
|
|
25
|
-
import '../chunks/bundle-mjs-
|
|
26
|
-
import '../chunks/index-
|
|
27
|
-
import '../chunks/index-
|
|
28
|
-
import '../chunks/index-
|
|
29
|
-
import '../chunks/index-
|
|
25
|
+
import '../chunks/bundle-mjs-CDsJv8mx.mjs';
|
|
26
|
+
import '../chunks/index-BamMmpxT.mjs';
|
|
27
|
+
import '../chunks/index-TBrLKN9p.mjs';
|
|
28
|
+
import '../chunks/index-ZrPnvFCM.mjs';
|
|
29
|
+
import '../chunks/index-D3kx7k_i.mjs';
|
|
30
30
|
import 'react/jsx-runtime';
|
|
31
|
-
import '../chunks/index-
|
|
32
|
-
import '../chunks/index-
|
|
33
|
-
import '../chunks/index-
|
|
34
|
-
import '../chunks/index-
|
|
35
|
-
import '../chunks/index-
|
|
31
|
+
import '../chunks/index-Bbl_XfK5.mjs';
|
|
32
|
+
import '../chunks/index-D33V_3rS.mjs';
|
|
33
|
+
import '../chunks/index-D1Oqvl53.mjs';
|
|
34
|
+
import '../chunks/index-Df3YRRgX.mjs';
|
|
35
|
+
import '../chunks/index-CJznEDFQ.mjs';
|
|
36
36
|
import 'react-dom';
|
|
37
|
-
import '../chunks/index-
|
|
38
|
-
import '../chunks/index-
|
|
39
|
-
import '../chunks/tslib.es6
|
|
40
|
-
import '../chunks/index-
|
|
41
|
-
import '../chunks/index-
|
|
42
|
-
import '../chunks/x-
|
|
43
|
-
import '../chunks/index-
|
|
44
|
-
import '../chunks/index-
|
|
45
|
-
import '../chunks/check-
|
|
46
|
-
import '../chunks/chevrons-up-down-
|
|
47
|
-
import '../chunks/command-
|
|
48
|
-
import '../chunks/dialog-
|
|
37
|
+
import '../chunks/index-Ctl41mbz.mjs';
|
|
38
|
+
import '../chunks/index-g06EAstv.mjs';
|
|
39
|
+
import '../chunks/tslib.es6--9nUwZOO.mjs';
|
|
40
|
+
import '../chunks/index-BwahdO40.mjs';
|
|
41
|
+
import '../chunks/index-wKi7FsfC.mjs';
|
|
42
|
+
import '../chunks/x-CSOUAHrZ.mjs';
|
|
43
|
+
import '../chunks/index-BKBEmeOE.mjs';
|
|
44
|
+
import '../chunks/index-EhkpAtV_.mjs';
|
|
45
|
+
import '../chunks/check-LwrFK8tw.mjs';
|
|
46
|
+
import '../chunks/chevrons-up-down-krhX0LvO.mjs';
|
|
47
|
+
import '../chunks/command-Dmn5Zotf.mjs';
|
|
48
|
+
import '../chunks/dialog-DGL-wjm5.mjs';
|
|
49
49
|
import 'class-variance-authority';
|
|
50
|
-
import '../chunks/tooltip-
|
|
51
|
-
import '../chunks/index-
|
|
52
|
-
import '../chunks/index-
|
|
53
|
-
import '../chunks/index-
|
|
54
|
-
import '../chunks/index-
|
|
55
|
-
import '../chunks/chevron-left-
|
|
56
|
-
import '../chunks/chevron-right-
|
|
57
|
-
import '../chunks/chevron-down-
|
|
50
|
+
import '../chunks/tooltip-B8zF2C8j.mjs';
|
|
51
|
+
import '../chunks/index-CHnGKuc1.mjs';
|
|
52
|
+
import '../chunks/index-5BIVlsf0.mjs';
|
|
53
|
+
import '../chunks/index-7aYTflwq.mjs';
|
|
54
|
+
import '../chunks/index-B79kyzoW.mjs';
|
|
55
|
+
import '../chunks/chevron-left-iSYNdGiZ.mjs';
|
|
56
|
+
import '../chunks/chevron-right-BDBexrwi.mjs';
|
|
57
|
+
import '../chunks/chevron-down-BW_fza_f.mjs';
|
|
58
58
|
import '@radix-ui/react-select';
|
|
59
59
|
|
|
60
60
|
const __iconNode = [
|
|
@@ -169,7 +169,7 @@ function s(o$1, s, t) {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
// biome-ignore lint/suspicious/noExplicitAny: <any>
|
|
172
|
-
function TableFilter({ table, defaultSide = "right", disabled, title, schema, fieldConfigs, defaultFilterValues,
|
|
172
|
+
function TableFilter({ table, defaultSide = "right", disabled, title, schema, fieldConfigs, defaultFilterValues, appliedFiltersCount = 0, setAppliedFiltersCount, applyFiltersOnMount, onClearFilters }) {
|
|
173
173
|
React__default.useEffect(()=>{
|
|
174
174
|
for (const { name, filterType } of fieldConfigs){
|
|
175
175
|
const column = table.getColumn(name);
|
|
@@ -192,11 +192,10 @@ function TableFilter({ table, defaultSide = "right", disabled, title, schema, fi
|
|
|
192
192
|
table,
|
|
193
193
|
fieldConfigs
|
|
194
194
|
]);
|
|
195
|
-
const [filterStorage, setFilterStorage] = React__default.useState(defaultFilterValues);
|
|
196
195
|
const [clearTrigger, setClearTrigger] = React__default.useState(0);
|
|
197
196
|
const form = useForm({
|
|
198
|
-
resolver: s(schema),
|
|
199
|
-
defaultValues:
|
|
197
|
+
resolver: schema ? s(schema) : undefined,
|
|
198
|
+
defaultValues: defaultFilterValues
|
|
200
199
|
});
|
|
201
200
|
const countAppliedFilters = (data)=>{
|
|
202
201
|
return Object.values(data).filter((value)=>{
|
|
@@ -204,31 +203,33 @@ function TableFilter({ table, defaultSide = "right", disabled, title, schema, fi
|
|
|
204
203
|
if (value === null || value === undefined) return false;
|
|
205
204
|
if (typeof value === "string") return value !== "";
|
|
206
205
|
if (typeof value === "object") {
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
// biome-ignore lint/suspicious/noExplicitAny: <any>
|
|
207
|
+
const val = value;
|
|
208
|
+
if ("from" in val || "to" in val) {
|
|
209
|
+
return Boolean(val.from || val.to);
|
|
209
210
|
}
|
|
210
211
|
return true;
|
|
211
212
|
}
|
|
212
213
|
return Boolean(value);
|
|
213
214
|
}).length;
|
|
214
215
|
};
|
|
216
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: <useCallback>
|
|
215
217
|
const handleCleanFilters = React__default.useCallback(()=>{
|
|
216
218
|
for (const column of table.getAllColumns()){
|
|
217
219
|
if (column.getCanFilter()) {
|
|
218
220
|
column.setFilterValue(undefined);
|
|
219
221
|
}
|
|
220
222
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
+
if (setAppliedFiltersCount) {
|
|
224
|
+
setAppliedFiltersCount(0);
|
|
225
|
+
}
|
|
223
226
|
form.reset(defaultFilterValues);
|
|
224
227
|
// Trigger para forçar re-render do MultiSelect
|
|
225
228
|
setClearTrigger((prev)=>prev + 1);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
defaultFilterValues
|
|
231
|
-
]);
|
|
229
|
+
if (onClearFilters) {
|
|
230
|
+
onClearFilters();
|
|
231
|
+
}
|
|
232
|
+
}, []);
|
|
232
233
|
const handleApplyFilters = (data)=>{
|
|
233
234
|
const allFieldsEmpty = Object.entries(data).every(([, value])=>{
|
|
234
235
|
// Para arrays (multiselect), verificar se tem itens
|
|
@@ -241,7 +242,8 @@ function TableFilter({ table, defaultSide = "right", disabled, title, schema, fi
|
|
|
241
242
|
}
|
|
242
243
|
// Para objetos numéricos (numeric_range), verificar se tem valor
|
|
243
244
|
if (typeof value === "object" && value !== null) {
|
|
244
|
-
|
|
245
|
+
const numericValue = value;
|
|
246
|
+
return numericValue.value === null || numericValue.value === undefined || String(numericValue.value) === "";
|
|
245
247
|
}
|
|
246
248
|
return value === null || value === "";
|
|
247
249
|
});
|
|
@@ -260,7 +262,8 @@ function TableFilter({ table, defaultSide = "right", disabled, title, schema, fi
|
|
|
260
262
|
}
|
|
261
263
|
// Para objetos numéricos (numeric_range), verificar se tem valor
|
|
262
264
|
if (typeof value === "object" && value !== null) {
|
|
263
|
-
|
|
265
|
+
const numericValue = value;
|
|
266
|
+
return numericValue.value !== null && numericValue.value !== undefined && String(numericValue.value) !== "" && numericValue.value !== 0;
|
|
264
267
|
}
|
|
265
268
|
return value !== null && value !== "";
|
|
266
269
|
});
|
|
@@ -278,20 +281,16 @@ function TableFilter({ table, defaultSide = "right", disabled, title, schema, fi
|
|
|
278
281
|
column.setFilterValue(filterValue);
|
|
279
282
|
}
|
|
280
283
|
}
|
|
281
|
-
const newFilterStorage = prepareFilterStorage(data);
|
|
282
|
-
setFilterStorage(newFilterStorage);
|
|
283
284
|
const count = countAppliedFilters(data);
|
|
284
|
-
setAppliedFiltersCount
|
|
285
|
+
if (setAppliedFiltersCount) {
|
|
286
|
+
setAppliedFiltersCount(count);
|
|
287
|
+
}
|
|
285
288
|
};
|
|
286
289
|
const handleOpenChange = (open)=>{
|
|
287
290
|
if (!open) {
|
|
288
291
|
form.handleSubmit(handleApplyFilters)();
|
|
289
292
|
}
|
|
290
293
|
};
|
|
291
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: <useEffect>
|
|
292
|
-
React__default.useEffect(()=>{
|
|
293
|
-
handleCleanFilters();
|
|
294
|
-
}, []);
|
|
295
294
|
// Event listener para scroll do mouse (CSS global já cuida do resto)
|
|
296
295
|
React__default.useEffect(()=>{
|
|
297
296
|
const handleWheel = (e)=>{
|
|
@@ -308,6 +307,14 @@ function TableFilter({ table, defaultSide = "right", disabled, title, schema, fi
|
|
|
308
307
|
document.removeEventListener("wheel", handleWheel);
|
|
309
308
|
};
|
|
310
309
|
}, []);
|
|
310
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: <useEffect>
|
|
311
|
+
React__default.useEffect(()=>{
|
|
312
|
+
if (applyFiltersOnMount) {
|
|
313
|
+
handleApplyFilters(form.getValues());
|
|
314
|
+
}
|
|
315
|
+
}, [
|
|
316
|
+
form
|
|
317
|
+
]);
|
|
311
318
|
return /*#__PURE__*/ React__default.createElement(Sheet, {
|
|
312
319
|
onOpenChange: handleOpenChange
|
|
313
320
|
}, /*#__PURE__*/ React__default.createElement("div", {
|