baaz-custom-components 5.0.29 → 5.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -11
- package/dist/index.mjs +13 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -118,7 +118,7 @@ type MultiFilterPayload = {
|
|
|
118
118
|
formatted: any[];
|
|
119
119
|
action: "apply" | "clear";
|
|
120
120
|
};
|
|
121
|
-
type FilterValue = string | {
|
|
121
|
+
type FilterValue = string | number | {
|
|
122
122
|
start?: string;
|
|
123
123
|
end?: string;
|
|
124
124
|
};
|
|
@@ -154,6 +154,6 @@ type Pagination$1 = {
|
|
|
154
154
|
sizeChangerOptions?: number[];
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
declare function Pagination({ totalCount, count, currentPage, totalPages, pageSize, onPageChange, onPageSizeChange, showSizeChanger, sizeChangerOptions, }: Pagination$1): react.JSX.Element
|
|
157
|
+
declare function Pagination({ totalCount, count, currentPage, totalPages, pageSize, onPageChange, onPageSizeChange, showSizeChanger, sizeChangerOptions, }: Pagination$1): react.JSX.Element;
|
|
158
158
|
|
|
159
159
|
export { type BreadcrumbProps, CustomBreadcrumb, Grid, type GridProps, Navbar, type NavbarData, type NavbarEntry, type NavbarProps, type NotificationDataTypes, Pagination, type Pagination$1 as PaginationProps, type RouteTree, type RouterAdapter, SortableHeaderCell, type UserData };
|
package/dist/index.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ type MultiFilterPayload = {
|
|
|
118
118
|
formatted: any[];
|
|
119
119
|
action: "apply" | "clear";
|
|
120
120
|
};
|
|
121
|
-
type FilterValue = string | {
|
|
121
|
+
type FilterValue = string | number | {
|
|
122
122
|
start?: string;
|
|
123
123
|
end?: string;
|
|
124
124
|
};
|
|
@@ -154,6 +154,6 @@ type Pagination$1 = {
|
|
|
154
154
|
sizeChangerOptions?: number[];
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
declare function Pagination({ totalCount, count, currentPage, totalPages, pageSize, onPageChange, onPageSizeChange, showSizeChanger, sizeChangerOptions, }: Pagination$1): react.JSX.Element
|
|
157
|
+
declare function Pagination({ totalCount, count, currentPage, totalPages, pageSize, onPageChange, onPageSizeChange, showSizeChanger, sizeChangerOptions, }: Pagination$1): react.JSX.Element;
|
|
158
158
|
|
|
159
159
|
export { type BreadcrumbProps, CustomBreadcrumb, Grid, type GridProps, Navbar, type NavbarData, type NavbarEntry, type NavbarProps, type NotificationDataTypes, Pagination, type Pagination$1 as PaginationProps, type RouteTree, type RouterAdapter, SortableHeaderCell, type UserData };
|
package/dist/index.js
CHANGED
|
@@ -2108,7 +2108,7 @@ var Filters = ({
|
|
|
2108
2108
|
className: "flex items-center gap-2 px-3 py-2 rounded-md hover:bg-input text-sm cursor-pointer",
|
|
2109
2109
|
children: [
|
|
2110
2110
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react12.ListFilter, { size: 16 }),
|
|
2111
|
-
|
|
2111
|
+
"Filters",
|
|
2112
2112
|
activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-primary text-primary-foreground rounded-full font-medium", children: activeFilterCount })
|
|
2113
2113
|
]
|
|
2114
2114
|
}
|
|
@@ -2140,7 +2140,7 @@ var Filters = ({
|
|
|
2140
2140
|
)
|
|
2141
2141
|
] }),
|
|
2142
2142
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "space-y-3 w-full flex flex-col overflow-auto", children: conditions.map((condition, index) => {
|
|
2143
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
2143
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2144
2144
|
const selectedColumn = filterList.find(
|
|
2145
2145
|
(f) => f.columnName.value === condition.column
|
|
2146
2146
|
);
|
|
@@ -2252,10 +2252,13 @@ var Filters = ({
|
|
|
2252
2252
|
"input",
|
|
2253
2253
|
{
|
|
2254
2254
|
type: "date",
|
|
2255
|
-
value:
|
|
2256
|
-
onChange: (e) =>
|
|
2257
|
-
|
|
2258
|
-
|
|
2255
|
+
value: condition.value ? new Date(condition.value).toISOString().split("T")[0] : "",
|
|
2256
|
+
onChange: (e) => {
|
|
2257
|
+
const epoch = new Date(e.target.value).getTime();
|
|
2258
|
+
updateCondition(condition.id, {
|
|
2259
|
+
value: epoch
|
|
2260
|
+
});
|
|
2261
|
+
},
|
|
2259
2262
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none"
|
|
2260
2263
|
}
|
|
2261
2264
|
),
|
|
@@ -2264,10 +2267,10 @@ var Filters = ({
|
|
|
2264
2267
|
"input",
|
|
2265
2268
|
{
|
|
2266
2269
|
type: "date",
|
|
2267
|
-
value: (
|
|
2270
|
+
value: ((_g = condition.value) == null ? void 0 : _g.start) ? new Date(condition.value.start).toISOString().split("T")[0] : "",
|
|
2268
2271
|
onChange: (e) => updateCondition(condition.id, {
|
|
2269
2272
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
|
2270
|
-
start: e.target.value
|
|
2273
|
+
start: new Date(e.target.value).getTime()
|
|
2271
2274
|
})
|
|
2272
2275
|
}),
|
|
2273
2276
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none"
|
|
@@ -2277,10 +2280,10 @@ var Filters = ({
|
|
|
2277
2280
|
"input",
|
|
2278
2281
|
{
|
|
2279
2282
|
type: "date",
|
|
2280
|
-
value: (
|
|
2283
|
+
value: ((_h = condition.value) == null ? void 0 : _h.end) ? new Date(condition.value.end).toISOString().split("T")[0] : "",
|
|
2281
2284
|
onChange: (e) => updateCondition(condition.id, {
|
|
2282
2285
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
|
2283
|
-
end: e.target.value
|
|
2286
|
+
end: new Date(e.target.value).getTime()
|
|
2284
2287
|
})
|
|
2285
2288
|
}),
|
|
2286
2289
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none"
|
|
@@ -2670,7 +2673,6 @@ function Pagination({
|
|
|
2670
2673
|
showSizeChanger = false,
|
|
2671
2674
|
sizeChangerOptions = [10, 20, 50, 100]
|
|
2672
2675
|
}) {
|
|
2673
|
-
if (totalPages <= 1) return null;
|
|
2674
2676
|
const pages = getPaginationRange(currentPage, totalPages);
|
|
2675
2677
|
const handlePageChange = (page) => {
|
|
2676
2678
|
if (page < 1 || page > totalPages) return;
|
package/dist/index.mjs
CHANGED
|
@@ -2083,7 +2083,7 @@ var Filters = ({
|
|
|
2083
2083
|
className: "flex items-center gap-2 px-3 py-2 rounded-md hover:bg-input text-sm cursor-pointer",
|
|
2084
2084
|
children: [
|
|
2085
2085
|
/* @__PURE__ */ jsx23(ListFilter, { size: 16 }),
|
|
2086
|
-
|
|
2086
|
+
"Filters",
|
|
2087
2087
|
activeFilterCount > 0 && /* @__PURE__ */ jsx23("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-primary text-primary-foreground rounded-full font-medium", children: activeFilterCount })
|
|
2088
2088
|
]
|
|
2089
2089
|
}
|
|
@@ -2115,7 +2115,7 @@ var Filters = ({
|
|
|
2115
2115
|
)
|
|
2116
2116
|
] }),
|
|
2117
2117
|
/* @__PURE__ */ jsx23("div", { className: "space-y-3 w-full flex flex-col overflow-auto", children: conditions.map((condition, index) => {
|
|
2118
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
2118
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2119
2119
|
const selectedColumn = filterList.find(
|
|
2120
2120
|
(f) => f.columnName.value === condition.column
|
|
2121
2121
|
);
|
|
@@ -2227,10 +2227,13 @@ var Filters = ({
|
|
|
2227
2227
|
"input",
|
|
2228
2228
|
{
|
|
2229
2229
|
type: "date",
|
|
2230
|
-
value:
|
|
2231
|
-
onChange: (e) =>
|
|
2232
|
-
|
|
2233
|
-
|
|
2230
|
+
value: condition.value ? new Date(condition.value).toISOString().split("T")[0] : "",
|
|
2231
|
+
onChange: (e) => {
|
|
2232
|
+
const epoch = new Date(e.target.value).getTime();
|
|
2233
|
+
updateCondition(condition.id, {
|
|
2234
|
+
value: epoch
|
|
2235
|
+
});
|
|
2236
|
+
},
|
|
2234
2237
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none"
|
|
2235
2238
|
}
|
|
2236
2239
|
),
|
|
@@ -2239,10 +2242,10 @@ var Filters = ({
|
|
|
2239
2242
|
"input",
|
|
2240
2243
|
{
|
|
2241
2244
|
type: "date",
|
|
2242
|
-
value: (
|
|
2245
|
+
value: ((_g = condition.value) == null ? void 0 : _g.start) ? new Date(condition.value.start).toISOString().split("T")[0] : "",
|
|
2243
2246
|
onChange: (e) => updateCondition(condition.id, {
|
|
2244
2247
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
|
2245
|
-
start: e.target.value
|
|
2248
|
+
start: new Date(e.target.value).getTime()
|
|
2246
2249
|
})
|
|
2247
2250
|
}),
|
|
2248
2251
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none"
|
|
@@ -2252,10 +2255,10 @@ var Filters = ({
|
|
|
2252
2255
|
"input",
|
|
2253
2256
|
{
|
|
2254
2257
|
type: "date",
|
|
2255
|
-
value: (
|
|
2258
|
+
value: ((_h = condition.value) == null ? void 0 : _h.end) ? new Date(condition.value.end).toISOString().split("T")[0] : "",
|
|
2256
2259
|
onChange: (e) => updateCondition(condition.id, {
|
|
2257
2260
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
|
2258
|
-
end: e.target.value
|
|
2261
|
+
end: new Date(e.target.value).getTime()
|
|
2259
2262
|
})
|
|
2260
2263
|
}),
|
|
2261
2264
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none"
|
|
@@ -2645,7 +2648,6 @@ function Pagination({
|
|
|
2645
2648
|
showSizeChanger = false,
|
|
2646
2649
|
sizeChangerOptions = [10, 20, 50, 100]
|
|
2647
2650
|
}) {
|
|
2648
|
-
if (totalPages <= 1) return null;
|
|
2649
2651
|
const pages = getPaginationRange(currentPage, totalPages);
|
|
2650
2652
|
const handlePageChange = (page) => {
|
|
2651
2653
|
if (page < 1 || page > totalPages) return;
|