@object-ui/components 11.5.0 → 13.2.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.
- package/CHANGELOG.md +176 -0
- package/dist/index.css +12 -1
- package/dist/index.js +2920 -2815
- package/dist/index.umd.cjs +3 -3
- package/dist/renderers/action/action-group.d.ts +16 -0
- package/dist/renderers/complex/data-table.d.ts +33 -4
- package/package.json +39 -39
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ActionSchema, ActionLocation } from '@object-ui/types';
|
|
2
3
|
export interface ActionGroupSchema {
|
|
3
4
|
type: 'action:group';
|
|
@@ -23,3 +24,18 @@ export interface ActionGroupSchema {
|
|
|
23
24
|
className?: string;
|
|
24
25
|
[key: string]: any;
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* One action inside an `action:group`'s dropdown (overflow) menu. Extracted
|
|
29
|
+
* into its own component so the action's `visible`/`enabled` CEL predicate can
|
|
30
|
+
* be evaluated with a hook (`useCondition`) without violating the
|
|
31
|
+
* rules-of-hooks inside a `.map()`. Mirrors `InlineActionButton` (the
|
|
32
|
+
* inline-mode leaf) so BOTH display modes honor `visible`/`enabled`
|
|
33
|
+
* identically — previously the dropdown branch rendered every action
|
|
34
|
+
* unconditionally, so an action with `visible: "record.role != 'owner'"`
|
|
35
|
+
* showed even when its predicate was false.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DropdownActionItem: React.FC<{
|
|
38
|
+
action: ActionSchema;
|
|
39
|
+
index: number;
|
|
40
|
+
onSelect: (action: ActionSchema) => void | Promise<void>;
|
|
41
|
+
}>;
|
|
@@ -1,8 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DataTableSchema } from '@object-ui/types';
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
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
|
-
*
|
|
6
|
-
*
|
|
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": "
|
|
3
|
+
"version": "13.2.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.
|
|
30
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
31
|
-
"@radix-ui/react-aspect-ratio": "^1.1.
|
|
32
|
-
"@radix-ui/react-avatar": "^1.2.
|
|
33
|
-
"@radix-ui/react-checkbox": "^1.3.
|
|
34
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
35
|
-
"@radix-ui/react-context-menu": "^2.3.
|
|
36
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
37
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
38
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
39
|
-
"@radix-ui/react-label": "^2.1.
|
|
40
|
-
"@radix-ui/react-menubar": "^1.1.
|
|
41
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
42
|
-
"@radix-ui/react-popover": "^1.1.
|
|
43
|
-
"@radix-ui/react-progress": "^1.1.
|
|
44
|
-
"@radix-ui/react-radio-group": "^1.4.
|
|
45
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
46
|
-
"@radix-ui/react-select": "^2.3.
|
|
47
|
-
"@radix-ui/react-separator": "^1.1.
|
|
48
|
-
"@radix-ui/react-slider": "^1.4.
|
|
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.
|
|
51
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
52
|
-
"@radix-ui/react-toast": "^1.2.
|
|
53
|
-
"@radix-ui/react-toggle": "^1.1.
|
|
54
|
-
"@radix-ui/react-toggle-group": "^1.1.
|
|
55
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
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.
|
|
66
|
-
"react-resizable-panels": "^4.12.
|
|
67
|
-
"recharts": "3.9.
|
|
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": "
|
|
73
|
-
"@object-ui/i18n": "
|
|
74
|
-
"@object-ui/react": "
|
|
75
|
-
"@object-ui/react-runtime": "
|
|
76
|
-
"@object-ui/sdui-parser": "
|
|
77
|
-
"@object-ui/types": "
|
|
72
|
+
"@object-ui/core": "13.2.0",
|
|
73
|
+
"@object-ui/i18n": "13.2.0",
|
|
74
|
+
"@object-ui/react": "13.2.0",
|
|
75
|
+
"@object-ui/react-runtime": "13.2.0",
|
|
76
|
+
"@object-ui/sdui-parser": "13.2.0",
|
|
77
|
+
"@object-ui/types": "13.2.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.
|
|
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.
|
|
91
|
+
"shadcn": "^4.13.0",
|
|
92
92
|
"tailwindcss": "^4.3.2",
|
|
93
93
|
"typescript": "^6.0.3",
|
|
94
|
-
"vite": "^8.1.
|
|
94
|
+
"vite": "^8.1.3",
|
|
95
95
|
"vite-plugin-dts": "^5.0.3"
|
|
96
96
|
},
|
|
97
97
|
"keywords": [
|