ptechcore_ui 1.0.80 → 1.0.81

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.cjs CHANGED
@@ -5503,7 +5503,7 @@ var FDrawer = ({
5503
5503
  }
5504
5504
  ),
5505
5505
  dropdownOpen === item.id && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "fixed right-3 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-10", children: [
5506
- actions.filter((action) => !action.permission || hasPermission(action.permission)).map(
5506
+ actions.filter((action) => !action.permission || hasPermission(action.permission)).filter((action) => !action.condition || action.condition(item)).map(
5507
5507
  (action, index) => action.navigate ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_router_dom4.Link, { to: action.navigate, className: "w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center space-x-2", children: action.label }, index) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { onClick: () => {
5508
5508
  action.onclick && action.onclick(item);
5509
5509
  setDropdownOpen(null);
package/dist/index.d.cts CHANGED
@@ -946,6 +946,7 @@ type FDrawerLineAction = {
946
946
  permission: string;
947
947
  navigate?: string;
948
948
  onclick?: (item: any) => any;
949
+ condition?: (item: any) => boolean;
949
950
  };
950
951
  type ViewMode$1 = 'table' | 'grid';
951
952
  type FDrawerToolbarAction = {
package/dist/index.d.ts CHANGED
@@ -946,6 +946,7 @@ type FDrawerLineAction = {
946
946
  permission: string;
947
947
  navigate?: string;
948
948
  onclick?: (item: any) => any;
949
+ condition?: (item: any) => boolean;
949
950
  };
950
951
  type ViewMode$1 = 'table' | 'grid';
951
952
  type FDrawerToolbarAction = {
package/dist/index.js CHANGED
@@ -5310,7 +5310,7 @@ var FDrawer = ({
5310
5310
  }
5311
5311
  ),
5312
5312
  dropdownOpen === item.id && /* @__PURE__ */ jsxs11("div", { className: "fixed right-3 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-10", children: [
5313
- actions.filter((action) => !action.permission || hasPermission(action.permission)).map(
5313
+ actions.filter((action) => !action.permission || hasPermission(action.permission)).filter((action) => !action.condition || action.condition(item)).map(
5314
5314
  (action, index) => action.navigate ? /* @__PURE__ */ jsx16(Link3, { to: action.navigate, className: "w-full px-4 py-2 text-left text-sm text-gray-700 hover:bg-gray-50 flex items-center space-x-2", children: action.label }, index) : /* @__PURE__ */ jsx16("button", { onClick: () => {
5315
5315
  action.onclick && action.onclick(item);
5316
5316
  setDropdownOpen(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ptechcore_ui",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",