baaz-custom-components 5.0.18 → 5.0.19
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.js +27 -23
- package/dist/index.mjs +28 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2239,22 +2239,33 @@ function Grid(_a) {
|
|
|
2239
2239
|
}
|
|
2240
2240
|
});
|
|
2241
2241
|
});
|
|
2242
|
-
const
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2242
|
+
const init = (api) => {
|
|
2243
|
+
apiRef.current = api;
|
|
2244
|
+
};
|
|
2245
|
+
(0, import_react6.useEffect)(() => {
|
|
2246
|
+
if (!apiRef.current || !columns.length) return;
|
|
2247
|
+
const resize = () => {
|
|
2248
|
+
columns.forEach((col) => {
|
|
2249
|
+
var _a2;
|
|
2250
|
+
if (!(col == null ? void 0 : col.width)) {
|
|
2251
|
+
(_a2 = apiRef.current) == null ? void 0 : _a2.exec("resize-column", {
|
|
2252
|
+
id: col.id,
|
|
2253
|
+
auto: "data"
|
|
2252
2254
|
});
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
|
|
2255
|
+
}
|
|
2256
|
+
});
|
|
2257
|
+
};
|
|
2258
|
+
const run = async () => {
|
|
2259
|
+
var _a2;
|
|
2260
|
+
if ((_a2 = document == null ? void 0 : document.fonts) == null ? void 0 : _a2.ready) {
|
|
2261
|
+
await document.fonts.ready;
|
|
2262
|
+
}
|
|
2263
|
+
requestAnimationFrame(() => {
|
|
2264
|
+
requestAnimationFrame(resize);
|
|
2265
|
+
});
|
|
2266
|
+
};
|
|
2267
|
+
run();
|
|
2268
|
+
}, [columns, data]);
|
|
2258
2269
|
const getSelectedData = () => {
|
|
2259
2270
|
var _a2, _b2;
|
|
2260
2271
|
const selected = (_b2 = (_a2 = apiRef.current) == null ? void 0 : _a2.getState().selectedRows) != null ? _b2 : [];
|
|
@@ -2294,14 +2305,7 @@ function Grid(_a) {
|
|
|
2294
2305
|
onFilterChange
|
|
2295
2306
|
}
|
|
2296
2307
|
),
|
|
2297
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_grid.WillowDark, { fonts, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-grid h-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2298
|
-
import_react_grid.Grid,
|
|
2299
|
-
__spreadProps(__spreadValues({}, rest), {
|
|
2300
|
-
data,
|
|
2301
|
-
columns: svarColumns,
|
|
2302
|
-
init: handleInit
|
|
2303
|
-
})
|
|
2304
|
-
) }) }) })
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_grid.WillowDark, { fonts, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-grid h-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_grid.Grid, __spreadProps(__spreadValues({}, rest), { data, columns: svarColumns, init })) }) }) })
|
|
2305
2309
|
] });
|
|
2306
2310
|
}
|
|
2307
2311
|
var grid_default = Grid;
|
package/dist/index.mjs
CHANGED
|
@@ -1909,7 +1909,7 @@ var CustomBreadcrumb = ({
|
|
|
1909
1909
|
var breadcrumb_default = CustomBreadcrumb;
|
|
1910
1910
|
|
|
1911
1911
|
// src/components/custom/grid/index.tsx
|
|
1912
|
-
import {
|
|
1912
|
+
import { useEffect as useEffect6, useRef as useRef2 } from "react";
|
|
1913
1913
|
import { Grid as SvarGrid, WillowDark } from "@svar-ui/react-grid";
|
|
1914
1914
|
|
|
1915
1915
|
// src/components/custom/grid/sortableHeaderCell.tsx
|
|
@@ -2210,22 +2210,33 @@ function Grid(_a) {
|
|
|
2210
2210
|
}
|
|
2211
2211
|
});
|
|
2212
2212
|
});
|
|
2213
|
-
const
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2213
|
+
const init = (api) => {
|
|
2214
|
+
apiRef.current = api;
|
|
2215
|
+
};
|
|
2216
|
+
useEffect6(() => {
|
|
2217
|
+
if (!apiRef.current || !columns.length) return;
|
|
2218
|
+
const resize = () => {
|
|
2219
|
+
columns.forEach((col) => {
|
|
2220
|
+
var _a2;
|
|
2221
|
+
if (!(col == null ? void 0 : col.width)) {
|
|
2222
|
+
(_a2 = apiRef.current) == null ? void 0 : _a2.exec("resize-column", {
|
|
2223
|
+
id: col.id,
|
|
2224
|
+
auto: "data"
|
|
2223
2225
|
});
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
|
-
|
|
2226
|
+
}
|
|
2227
|
+
});
|
|
2228
|
+
};
|
|
2229
|
+
const run = async () => {
|
|
2230
|
+
var _a2;
|
|
2231
|
+
if ((_a2 = document == null ? void 0 : document.fonts) == null ? void 0 : _a2.ready) {
|
|
2232
|
+
await document.fonts.ready;
|
|
2233
|
+
}
|
|
2234
|
+
requestAnimationFrame(() => {
|
|
2235
|
+
requestAnimationFrame(resize);
|
|
2236
|
+
});
|
|
2237
|
+
};
|
|
2238
|
+
run();
|
|
2239
|
+
}, [columns, data]);
|
|
2229
2240
|
const getSelectedData = () => {
|
|
2230
2241
|
var _a2, _b2;
|
|
2231
2242
|
const selected = (_b2 = (_a2 = apiRef.current) == null ? void 0 : _a2.getState().selectedRows) != null ? _b2 : [];
|
|
@@ -2265,14 +2276,7 @@ function Grid(_a) {
|
|
|
2265
2276
|
onFilterChange
|
|
2266
2277
|
}
|
|
2267
2278
|
),
|
|
2268
|
-
/* @__PURE__ */ jsx25("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ jsx25(WillowDark, { fonts, children: /* @__PURE__ */ jsx25("div", { className: "w-grid h-full overflow-hidden", children: /* @__PURE__ */ jsx25(
|
|
2269
|
-
SvarGrid,
|
|
2270
|
-
__spreadProps(__spreadValues({}, rest), {
|
|
2271
|
-
data,
|
|
2272
|
-
columns: svarColumns,
|
|
2273
|
-
init: handleInit
|
|
2274
|
-
})
|
|
2275
|
-
) }) }) })
|
|
2279
|
+
/* @__PURE__ */ jsx25("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ jsx25(WillowDark, { fonts, children: /* @__PURE__ */ jsx25("div", { className: "w-grid h-full overflow-hidden", children: /* @__PURE__ */ jsx25(SvarGrid, __spreadProps(__spreadValues({}, rest), { data, columns: svarColumns, init })) }) }) })
|
|
2276
2280
|
] });
|
|
2277
2281
|
}
|
|
2278
2282
|
var grid_default = Grid;
|