@object-ui/components 11.5.0 → 13.1.0

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.
@@ -1,8 +1,37 @@
1
+ import { default as React } from 'react';
2
+ import { DataTableSchema } from '@object-ui/types';
1
3
  /**
2
- * ObjectUI
3
- * Copyright (c) 2024-present ObjectStack Inc.
4
+ * The element type of `DataTableSchema.rowActionDefs`. Derived via indexed
5
+ * access rather than imported by name: `@object-ui/types` defines
6
+ * `DataTableRowAction` but doesn't re-export it from its public entry, so it's
7
+ * only reachable structurally through `DataTableSchema`.
8
+ */
9
+ type RowActionDef = NonNullable<DataTableSchema['rowActionDefs']>[number];
10
+ /**
11
+ * One schema-driven custom row action in the data-table's inline row overflow
12
+ * menu. Extracted into its own component so the action's `visible` (and
13
+ * `disabled`) CEL predicate can be evaluated with a hook (`useCondition`)
14
+ * without violating the rules-of-hooks inside a `.map()`.
15
+ *
16
+ * Mirrors `RowActionMenuItem` on the ObjectGrid path so BOTH row-menu
17
+ * renderers honor `visible`/`disabled` identically. Previously this path
18
+ * (used by a detail page's related list) rendered every custom action
19
+ * unconditionally, so e.g. a member row's "Transfer Ownership"
20
+ * (`visible: "record.role != 'owner' && …"`) showed on the owner's own row.
21
+ *
22
+ * Bare field references (`role`) resolve against the row record and `record.`
23
+ * references (`record.role`) against the same, while `features`/`user` come
24
+ * from the ambient ExpressionProvider scope — so gating stays consistent with
25
+ * the grid's own row menu.
4
26
  *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
27
+ * Exported for unit tests — NOT part of the package's public API: the
28
+ * `@object-ui/components` barrel only side-effect-imports this module (to run
29
+ * its `ComponentRegistry.register`), so this named export is reachable solely
30
+ * via the deep module path the colocated test uses.
7
31
  */
32
+ export declare const DataTableRowActionItem: React.FC<{
33
+ action: RowActionDef;
34
+ row: any;
35
+ onActionDef?: (action: RowActionDef, row: any) => void | Promise<void>;
36
+ }>;
8
37
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/components",
3
- "version": "11.5.0",
3
+ "version": "13.1.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Standard UI component library for Object UI, built with Shadcn UI + Tailwind CSS",
@@ -26,33 +26,33 @@
26
26
  "./style.css": "./dist/index.css"
27
27
  },
28
28
  "dependencies": {
29
- "@radix-ui/react-accordion": "^1.2.14",
30
- "@radix-ui/react-alert-dialog": "^1.1.17",
31
- "@radix-ui/react-aspect-ratio": "^1.1.10",
32
- "@radix-ui/react-avatar": "^1.2.0",
33
- "@radix-ui/react-checkbox": "^1.3.5",
34
- "@radix-ui/react-collapsible": "^1.1.14",
35
- "@radix-ui/react-context-menu": "^2.3.1",
36
- "@radix-ui/react-dialog": "^1.1.17",
37
- "@radix-ui/react-dropdown-menu": "^2.1.18",
38
- "@radix-ui/react-hover-card": "^1.1.17",
39
- "@radix-ui/react-label": "^2.1.10",
40
- "@radix-ui/react-menubar": "^1.1.18",
41
- "@radix-ui/react-navigation-menu": "^1.2.16",
42
- "@radix-ui/react-popover": "^1.1.17",
43
- "@radix-ui/react-progress": "^1.1.10",
44
- "@radix-ui/react-radio-group": "^1.4.1",
45
- "@radix-ui/react-scroll-area": "^1.2.12",
46
- "@radix-ui/react-select": "^2.3.1",
47
- "@radix-ui/react-separator": "^1.1.10",
48
- "@radix-ui/react-slider": "^1.4.1",
29
+ "@radix-ui/react-accordion": "^1.2.15",
30
+ "@radix-ui/react-alert-dialog": "^1.1.18",
31
+ "@radix-ui/react-aspect-ratio": "^1.1.11",
32
+ "@radix-ui/react-avatar": "^1.2.1",
33
+ "@radix-ui/react-checkbox": "^1.3.6",
34
+ "@radix-ui/react-collapsible": "^1.1.15",
35
+ "@radix-ui/react-context-menu": "^2.3.2",
36
+ "@radix-ui/react-dialog": "^1.1.18",
37
+ "@radix-ui/react-dropdown-menu": "^2.1.19",
38
+ "@radix-ui/react-hover-card": "^1.1.18",
39
+ "@radix-ui/react-label": "^2.1.11",
40
+ "@radix-ui/react-menubar": "^1.1.19",
41
+ "@radix-ui/react-navigation-menu": "^1.2.17",
42
+ "@radix-ui/react-popover": "^1.1.18",
43
+ "@radix-ui/react-progress": "^1.1.11",
44
+ "@radix-ui/react-radio-group": "^1.4.2",
45
+ "@radix-ui/react-scroll-area": "^1.2.13",
46
+ "@radix-ui/react-select": "^2.3.2",
47
+ "@radix-ui/react-separator": "^1.1.11",
48
+ "@radix-ui/react-slider": "^1.4.2",
49
49
  "@radix-ui/react-slot": "^1.3.0",
50
- "@radix-ui/react-switch": "^1.3.1",
51
- "@radix-ui/react-tabs": "^1.1.15",
52
- "@radix-ui/react-toast": "^1.2.17",
53
- "@radix-ui/react-toggle": "^1.1.12",
54
- "@radix-ui/react-toggle-group": "^1.1.13",
55
- "@radix-ui/react-tooltip": "^1.2.10",
50
+ "@radix-ui/react-switch": "^1.3.2",
51
+ "@radix-ui/react-tabs": "^1.1.16",
52
+ "@radix-ui/react-toast": "^1.2.18",
53
+ "@radix-ui/react-toggle": "^1.1.13",
54
+ "@radix-ui/react-toggle-group": "^1.1.14",
55
+ "@radix-ui/react-tooltip": "^1.2.11",
56
56
  "class-variance-authority": "^0.7.1",
57
57
  "clsx": "^2.1.1",
58
58
  "cmdk": "^1.1.1",
@@ -62,19 +62,19 @@
62
62
  "lucide-react": "^1.22.0",
63
63
  "next-themes": "^0.4.6",
64
64
  "react-day-picker": "^10.0.1",
65
- "react-hook-form": "^7.80.0",
66
- "react-resizable-panels": "^4.12.0",
67
- "recharts": "3.9.0",
65
+ "react-hook-form": "^7.81.0",
66
+ "react-resizable-panels": "^4.12.1",
67
+ "recharts": "3.9.2",
68
68
  "sonner": "^2.0.7",
69
69
  "tailwind-merge": "^3.6.0",
70
70
  "tailwindcss-animate": "^1.0.7",
71
71
  "vaul": "^1.1.2",
72
- "@object-ui/core": "11.5.0",
73
- "@object-ui/i18n": "11.5.0",
74
- "@object-ui/react": "11.5.0",
75
- "@object-ui/react-runtime": "11.5.0",
76
- "@object-ui/sdui-parser": "11.5.0",
77
- "@object-ui/types": "11.5.0"
72
+ "@object-ui/core": "13.1.0",
73
+ "@object-ui/i18n": "13.1.0",
74
+ "@object-ui/react": "13.1.0",
75
+ "@object-ui/react-runtime": "13.1.0",
76
+ "@object-ui/sdui-parser": "13.1.0",
77
+ "@object-ui/types": "13.1.0"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "react": "^18.0.0 || ^19.0.0",
@@ -82,16 +82,16 @@
82
82
  "tailwindcss": "^4.2.1"
83
83
  },
84
84
  "devDependencies": {
85
- "@tailwindcss/postcss": "^4.3.1",
85
+ "@tailwindcss/postcss": "^4.3.2",
86
86
  "@types/react": "19.2.17",
87
87
  "@types/react-dom": "19.2.3",
88
88
  "@vitejs/plugin-react": "^6.0.3",
89
89
  "autoprefixer": "^10.5.2",
90
90
  "postcss": "^8.5.16",
91
- "shadcn": "^4.12.0",
91
+ "shadcn": "^4.13.0",
92
92
  "tailwindcss": "^4.3.2",
93
93
  "typescript": "^6.0.3",
94
- "vite": "^8.1.0",
94
+ "vite": "^8.1.3",
95
95
  "vite-plugin-dts": "^5.0.3"
96
96
  },
97
97
  "keywords": [