funuicss 3.3.7 → 3.3.9

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.3.7",
2
+ "version": "3.3.9",
3
3
  "name": "funuicss",
4
4
  "description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appeal—all achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
5
5
  "main": "index.js",
@@ -39,8 +39,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  var react_1 = __importStar(require("react"));
41
41
  var react_quilljs_1 = require("react-quilljs");
42
- // import 'quill/dist/quill.bubble.css';
43
- // import 'quill/dist/quill.snow.css';
44
42
  var md_1 = require("react-icons/md");
45
43
  var Emojis_1 = require("../../utils/Emojis");
46
44
  var Dropdown_1 = __importDefault(require("../drop/Dropdown"));
@@ -60,18 +58,6 @@ var RichText = function (_a) {
60
58
  placeholder: placeholder,
61
59
  modules: modules || defaultModules,
62
60
  }), quill = _f.quill, quillRef = _f.quillRef;
63
- (0, react_1.useEffect)(function () {
64
- var cssPath = theme === 'bubble' ?
65
- '/node_modules/quill/dist/quill.bubble.css' :
66
- '/node_modules/quill/dist/quill.snow.css';
67
- var existingLink = document.querySelector("link[href*=\"".concat(theme, "\"]"));
68
- if (!existingLink) {
69
- var link = document.createElement('link');
70
- link.rel = 'stylesheet';
71
- link.href = cssPath;
72
- document.head.appendChild(link);
73
- }
74
- }, [theme]);
75
61
  (0, react_1.useEffect)(function () {
76
62
  if (!quill)
77
63
  return;
@@ -17,6 +17,7 @@ type TableProps = {
17
17
  "titles": string[];
18
18
  "funcss": string[];
19
19
  };
20
+ filterOnchange?: (filter?: any, value?: any, totals?: number) => {};
20
21
  head?: React.ReactNode;
21
22
  right?: React.ReactNode;
22
23
  body?: React.ReactNode;
@@ -36,5 +37,5 @@ type TableProps = {
36
37
  };
37
38
  export default function Table({ children, funcss, bordered, noStripped, hoverable, title, showTotal, light, dark, head, body, data, isLoading, right, hideExport, height, pageSize, // Default page size,
38
39
  customColumns, filterableFields, // New prop
39
- emptyResponse, ...rest }: TableProps): React.JSX.Element;
40
+ emptyResponse, filterOnchange, ...rest }: TableProps): React.JSX.Element;
40
41
  export {};
package/ui/table/Table.js CHANGED
@@ -88,7 +88,7 @@ function Table(_a) {
88
88
  var _b, _c;
89
89
  var children = _a.children, funcss = _a.funcss, bordered = _a.bordered, noStripped = _a.noStripped, hoverable = _a.hoverable, title = _a.title, showTotal = _a.showTotal, light = _a.light, dark = _a.dark, head = _a.head, body = _a.body, data = _a.data, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, right = _a.right, hideExport = _a.hideExport, height = _a.height, _e = _a.pageSize, pageSize = _e === void 0 ? data ? 10 : 0 : _e, // Default page size,
90
90
  customColumns = _a.customColumns, filterableFields = _a.filterableFields, // New prop
91
- emptyResponse = _a.emptyResponse, rest = __rest(_a, ["children", "funcss", "bordered", "noStripped", "hoverable", "title", "showTotal", "light", "dark", "head", "body", "data", "isLoading", "right", "hideExport", "height", "pageSize", "customColumns", "filterableFields", "emptyResponse"]);
91
+ emptyResponse = _a.emptyResponse, filterOnchange = _a.filterOnchange, rest = __rest(_a, ["children", "funcss", "bordered", "noStripped", "hoverable", "title", "showTotal", "light", "dark", "head", "body", "data", "isLoading", "right", "hideExport", "height", "pageSize", "customColumns", "filterableFields", "emptyResponse", "filterOnchange"]);
92
92
  // Check if data is null or undefined before accessing its properties
93
93
  // Replace this in your component
94
94
  var _f = (0, react_1.useState)(''), search = _f[0], setSearch = _f[1];
@@ -167,6 +167,11 @@ function Table(_a) {
167
167
  var uniqueValues = selectedField
168
168
  ? Array.from(new Set(dataArray.map(function (item) { return getNestedValue(item, selectedField); })))
169
169
  : [];
170
+ React.useEffect(function () {
171
+ if (filterOnchange) {
172
+ filterOnchange(selectedField, selectedValue, filteredData.length);
173
+ }
174
+ }, [selectedField, selectedValue]);
170
175
  return (React.createElement("div", { className: "".concat(funcss ? funcss : '', " roundEdge") },
171
176
  data &&
172
177
  React.createElement("div", { className: "padding bb" },