@rufous/ui 0.3.43 → 0.3.44
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/main.cjs +11 -2
- package/dist/main.d.cts +2 -3
- package/dist/main.d.ts +2 -3
- package/dist/main.js +11 -2
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -838,7 +838,7 @@ var subscribeIcon_default = SubscribeIcon;
|
|
|
838
838
|
|
|
839
839
|
// lib/icons/suspendUserIcon.tsx
|
|
840
840
|
var React30 = __toESM(require("react"), 1);
|
|
841
|
-
var SuspendUserIcon = ({ color = "
|
|
841
|
+
var SuspendUserIcon = (({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React30.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25.8", height: "25.8", viewBox: "0 0 25.8 25.8", ...props }, /* @__PURE__ */ React30.createElement("g", { id: "Group_24703", "data-name": "Group 24703", transform: "translate(-1737.415 -376.95)" }, /* @__PURE__ */ React30.createElement("g", { id: "Group_24684", "data-name": "Group 24684", transform: "translate(1738.315 377.85)" }, /* @__PURE__ */ React30.createElement("ellipse", { id: "Ellipse_414", "data-name": "Ellipse 414", cx: "4.979", cy: "5.203", rx: "4.979", ry: "5.203", transform: "translate(3.506)", fill: "rgba(0,0,0,0)", stroke: color, strokeWidth: "1.8" }), /* @__PURE__ */ React30.createElement("path", { id: "Path_52609", "data-name": "Path 52609", d: "M128.5,212.538a8.719,8.719,0,0,1,14.56-6.69", transform: "translate(-128.5 -193.195)", fill: "rgba(0,0,0,0)", stroke: color, strokeWidth: "1.8" })), /* @__PURE__ */ React30.createElement("g", { id: "Group_24690", "data-name": "Group 24690", transform: "translate(1750.156 389.69)" }, /* @__PURE__ */ React30.createElement("g", { id: "Group_24741", "data-name": "Group 24741" }, /* @__PURE__ */ React30.createElement("ellipse", { id: "Ellipse_415", "data-name": "Ellipse 415", cx: "6.08", cy: "6.08", rx: "6.08", ry: "6.08", fill: "none", stroke: color, strokeWidth: "1.8", "stroke-dasharray": "470 154" }), /* @__PURE__ */ React30.createElement("line", { id: "Line_419", "data-name": "Line 419", x1: "7", y2: "9", transform: "translate(2.66 1.66)", fill: "none", stroke: color, strokeWidth: "1.8" }))))));
|
|
842
842
|
var suspendUserIcon_default = SuspendUserIcon;
|
|
843
843
|
|
|
844
844
|
// lib/icons/unsubscribeIcon.tsx
|
|
@@ -5217,6 +5217,7 @@ function DataGrid({
|
|
|
5217
5217
|
const [sortField, setSortField] = (0, import_react17.useState)(null);
|
|
5218
5218
|
const [sortDirection, setSortDirection] = (0, import_react17.useState)(null);
|
|
5219
5219
|
const [filterText, setFilterText] = (0, import_react17.useState)("");
|
|
5220
|
+
const prevFilterText = (0, import_react17.useRef)("");
|
|
5220
5221
|
const [currentPage, setCurrentPage] = (0, import_react17.useState)(1);
|
|
5221
5222
|
const activePage = paginationModel ? paginationModel.page + 1 : currentPage;
|
|
5222
5223
|
const activePageSize = paginationModel ? paginationModel.pageSize : pageSize;
|
|
@@ -5506,7 +5507,15 @@ function DataGrid({
|
|
|
5506
5507
|
});
|
|
5507
5508
|
}, [data, filterText, advancedFilters, resolvedColumns, searchableColumns]);
|
|
5508
5509
|
(0, import_react17.useEffect)(() => {
|
|
5509
|
-
if (!onSearchChange
|
|
5510
|
+
if (!onSearchChange) return;
|
|
5511
|
+
if (!filterText) {
|
|
5512
|
+
if (prevFilterText.current !== "") {
|
|
5513
|
+
onSearchChange("");
|
|
5514
|
+
}
|
|
5515
|
+
prevFilterText.current = "";
|
|
5516
|
+
return;
|
|
5517
|
+
}
|
|
5518
|
+
prevFilterText.current = filterText;
|
|
5510
5519
|
if (filteredData.length === 0) onSearchChange(filterText);
|
|
5511
5520
|
}, [filteredData, filterText, onSearchChange]);
|
|
5512
5521
|
const sortedData = (0, import_react17.useMemo)(() => {
|
package/dist/main.d.cts
CHANGED
|
@@ -274,11 +274,10 @@ interface SubscribeIconProps extends React.SVGProps<SVGSVGElement> {
|
|
|
274
274
|
}
|
|
275
275
|
declare const SubscribeIcon: React.FC<SubscribeIconProps>;
|
|
276
276
|
|
|
277
|
-
interface
|
|
277
|
+
interface SuspendUserIconProps extends React.SVGProps<SVGSVGElement> {
|
|
278
278
|
color?: string;
|
|
279
|
-
size?: number;
|
|
280
279
|
}
|
|
281
|
-
declare const SuspendUserIcon: React.FC<
|
|
280
|
+
declare const SuspendUserIcon: React.FC<SuspendUserIconProps>;
|
|
282
281
|
|
|
283
282
|
interface UnsubscribeIconProps extends React.SVGProps<SVGSVGElement> {
|
|
284
283
|
color?: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -274,11 +274,10 @@ interface SubscribeIconProps extends React.SVGProps<SVGSVGElement> {
|
|
|
274
274
|
}
|
|
275
275
|
declare const SubscribeIcon: React.FC<SubscribeIconProps>;
|
|
276
276
|
|
|
277
|
-
interface
|
|
277
|
+
interface SuspendUserIconProps extends React.SVGProps<SVGSVGElement> {
|
|
278
278
|
color?: string;
|
|
279
|
-
size?: number;
|
|
280
279
|
}
|
|
281
|
-
declare const SuspendUserIcon: React.FC<
|
|
280
|
+
declare const SuspendUserIcon: React.FC<SuspendUserIconProps>;
|
|
282
281
|
|
|
283
282
|
interface UnsubscribeIconProps extends React.SVGProps<SVGSVGElement> {
|
|
284
283
|
color?: string;
|
package/dist/main.js
CHANGED
|
@@ -577,7 +577,7 @@ var subscribeIcon_default = SubscribeIcon;
|
|
|
577
577
|
|
|
578
578
|
// lib/icons/suspendUserIcon.tsx
|
|
579
579
|
import * as React30 from "react";
|
|
580
|
-
var SuspendUserIcon = ({ color = "
|
|
580
|
+
var SuspendUserIcon = (({ color = "#3a3a3a", ...props }) => /* @__PURE__ */ React30.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25.8", height: "25.8", viewBox: "0 0 25.8 25.8", ...props }, /* @__PURE__ */ React30.createElement("g", { id: "Group_24703", "data-name": "Group 24703", transform: "translate(-1737.415 -376.95)" }, /* @__PURE__ */ React30.createElement("g", { id: "Group_24684", "data-name": "Group 24684", transform: "translate(1738.315 377.85)" }, /* @__PURE__ */ React30.createElement("ellipse", { id: "Ellipse_414", "data-name": "Ellipse 414", cx: "4.979", cy: "5.203", rx: "4.979", ry: "5.203", transform: "translate(3.506)", fill: "rgba(0,0,0,0)", stroke: color, strokeWidth: "1.8" }), /* @__PURE__ */ React30.createElement("path", { id: "Path_52609", "data-name": "Path 52609", d: "M128.5,212.538a8.719,8.719,0,0,1,14.56-6.69", transform: "translate(-128.5 -193.195)", fill: "rgba(0,0,0,0)", stroke: color, strokeWidth: "1.8" })), /* @__PURE__ */ React30.createElement("g", { id: "Group_24690", "data-name": "Group 24690", transform: "translate(1750.156 389.69)" }, /* @__PURE__ */ React30.createElement("g", { id: "Group_24741", "data-name": "Group 24741" }, /* @__PURE__ */ React30.createElement("ellipse", { id: "Ellipse_415", "data-name": "Ellipse 415", cx: "6.08", cy: "6.08", rx: "6.08", ry: "6.08", fill: "none", stroke: color, strokeWidth: "1.8", "stroke-dasharray": "470 154" }), /* @__PURE__ */ React30.createElement("line", { id: "Line_419", "data-name": "Line 419", x1: "7", y2: "9", transform: "translate(2.66 1.66)", fill: "none", stroke: color, strokeWidth: "1.8" }))))));
|
|
581
581
|
var suspendUserIcon_default = SuspendUserIcon;
|
|
582
582
|
|
|
583
583
|
// lib/icons/unsubscribeIcon.tsx
|
|
@@ -4983,6 +4983,7 @@ function DataGrid({
|
|
|
4983
4983
|
const [sortField, setSortField] = useState10(null);
|
|
4984
4984
|
const [sortDirection, setSortDirection] = useState10(null);
|
|
4985
4985
|
const [filterText, setFilterText] = useState10("");
|
|
4986
|
+
const prevFilterText = useRef10("");
|
|
4986
4987
|
const [currentPage, setCurrentPage] = useState10(1);
|
|
4987
4988
|
const activePage = paginationModel ? paginationModel.page + 1 : currentPage;
|
|
4988
4989
|
const activePageSize = paginationModel ? paginationModel.pageSize : pageSize;
|
|
@@ -5272,7 +5273,15 @@ function DataGrid({
|
|
|
5272
5273
|
});
|
|
5273
5274
|
}, [data, filterText, advancedFilters, resolvedColumns, searchableColumns]);
|
|
5274
5275
|
useEffect9(() => {
|
|
5275
|
-
if (!onSearchChange
|
|
5276
|
+
if (!onSearchChange) return;
|
|
5277
|
+
if (!filterText) {
|
|
5278
|
+
if (prevFilterText.current !== "") {
|
|
5279
|
+
onSearchChange("");
|
|
5280
|
+
}
|
|
5281
|
+
prevFilterText.current = "";
|
|
5282
|
+
return;
|
|
5283
|
+
}
|
|
5284
|
+
prevFilterText.current = filterText;
|
|
5276
5285
|
if (filteredData.length === 0) onSearchChange(filterText);
|
|
5277
5286
|
}, [filteredData, filterText, onSearchChange]);
|
|
5278
5287
|
const sortedData = useMemo2(() => {
|