@object-ui/components 17.1.0 → 17.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 +295 -0
- package/dist/custom/field.d.ts +20 -2
- package/dist/custom/filter-builder.d.ts +20 -4
- package/dist/custom/sort-builder.d.ts +14 -3
- package/dist/index.css +3 -0
- package/dist/index.js +3065 -3044
- package/dist/index.umd.cjs +5 -5
- package/dist/share/ShareDialog.d.ts +23 -27
- package/package.json +11 -10
|
@@ -1,37 +1,33 @@
|
|
|
1
|
+
import { ShareLink as SpecShareLink, ShareLinkAudience, ShareLinkPermission } from '@objectstack/spec/contracts';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
3
|
+
* The share-link vocabulary is the framework's, so this dialog uses the
|
|
4
|
+
* framework's bindings rather than the copies it used to declare
|
|
5
|
+
* (objectstack#4115). The two enums were member-for-member identical — the
|
|
6
|
+
* comment further down already said "audience values match the framework's
|
|
7
|
+
* `ShareLinkAudience` contract", which is a claim only an import can keep.
|
|
8
|
+
*/
|
|
9
|
+
export type { ShareLinkPermission, ShareLinkAudience };
|
|
10
|
+
/**
|
|
11
|
+
* A share link as the BROWSER receives it.
|
|
4
12
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
13
|
+
* The spec's `ShareLink` is the stored row; this is the same row minus the one
|
|
14
|
+
* field that must never cross the wire. Deriving means a new spec field is
|
|
15
|
+
* typed here the day it ships, while the two deltas stay visible and bounded:
|
|
7
16
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
17
|
+
* - `password_hash` is omitted, not optional. It is the credential itself;
|
|
18
|
+
* typing it in a browser package is an invitation to render it.
|
|
19
|
+
* - `password_protected` is the boolean projection the UI needs in its place.
|
|
20
|
+
* - `created_at` is widened to `| null`, matching every other timestamp on the
|
|
21
|
+
* spec's own row (`expires_at`, `revoked_at`, `last_used_at`).
|
|
12
22
|
*
|
|
13
|
-
*
|
|
14
|
-
* can be reused from the AI page, the floating chatbot panel, record
|
|
15
|
-
* detail views, and any other surface — all of which already know their
|
|
16
|
-
* `apiBase`, `objectName`, and `recordId`.
|
|
23
|
+
* Pinned by `__tests__/share-filter-sort-spec-parity.test.ts`.
|
|
17
24
|
*/
|
|
18
|
-
export type
|
|
19
|
-
|
|
20
|
-
export interface ShareLink {
|
|
21
|
-
id: string;
|
|
22
|
-
token: string;
|
|
23
|
-
object_name: string;
|
|
24
|
-
record_id: string;
|
|
25
|
-
permission: ShareLinkPermission;
|
|
26
|
-
audience: ShareLinkAudience;
|
|
27
|
-
expires_at?: string | null;
|
|
25
|
+
export type ShareLink = Omit<SpecShareLink, 'password_hash' | 'created_at'> & {
|
|
26
|
+
/** Whether a password is set — the server's stand-in for `password_hash`. */
|
|
28
27
|
password_protected?: boolean;
|
|
29
|
-
|
|
30
|
-
revoked_at?: string | null;
|
|
28
|
+
/** ISO timestamp; `null` when the row predates audit stamping. */
|
|
31
29
|
created_at?: string | null;
|
|
32
|
-
|
|
33
|
-
use_count?: number;
|
|
34
|
-
}
|
|
30
|
+
};
|
|
35
31
|
export interface ShareDialogProps {
|
|
36
32
|
open: boolean;
|
|
37
33
|
onOpenChange: (open: boolean) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/components",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.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,6 +26,7 @@
|
|
|
26
26
|
"./style.css": "./dist/index.css"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@objectstack/spec": "^17.0.0-rc.1",
|
|
29
30
|
"@radix-ui/react-accordion": "^1.2.20",
|
|
30
31
|
"@radix-ui/react-alert-dialog": "^1.1.23",
|
|
31
32
|
"@radix-ui/react-aspect-ratio": "^1.1.15",
|
|
@@ -69,12 +70,12 @@
|
|
|
69
70
|
"tailwind-merge": "^3.6.0",
|
|
70
71
|
"tailwindcss-animate": "^1.0.7",
|
|
71
72
|
"vaul": "^1.1.2",
|
|
72
|
-
"@object-ui/core": "17.
|
|
73
|
-
"@object-ui/i18n": "17.
|
|
74
|
-
"@object-ui/react": "17.
|
|
75
|
-
"@object-ui/react-runtime": "17.
|
|
76
|
-
"@object-ui/sdui-parser": "17.
|
|
77
|
-
"@object-ui/types": "17.
|
|
73
|
+
"@object-ui/core": "17.2.0",
|
|
74
|
+
"@object-ui/i18n": "17.2.0",
|
|
75
|
+
"@object-ui/react": "17.2.0",
|
|
76
|
+
"@object-ui/react-runtime": "17.2.0",
|
|
77
|
+
"@object-ui/sdui-parser": "17.2.0",
|
|
78
|
+
"@object-ui/types": "17.2.0"
|
|
78
79
|
},
|
|
79
80
|
"peerDependencies": {
|
|
80
81
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -82,13 +83,13 @@
|
|
|
82
83
|
"tailwindcss": "^4.2.1"
|
|
83
84
|
},
|
|
84
85
|
"devDependencies": {
|
|
85
|
-
"@
|
|
86
|
+
"@radix-ui/react-focus-scope": "^1.1.16",
|
|
86
87
|
"@tailwindcss/postcss": "^4.3.3",
|
|
87
88
|
"@types/react": "19.2.17",
|
|
88
89
|
"@types/react-dom": "19.2.3",
|
|
89
90
|
"@vitejs/plugin-react": "^6.0.4",
|
|
90
91
|
"autoprefixer": "^10.5.4",
|
|
91
|
-
"postcss": "^8.5.
|
|
92
|
+
"postcss": "^8.5.24",
|
|
92
93
|
"shadcn": "^4.15.0",
|
|
93
94
|
"tailwindcss": "^4.3.3",
|
|
94
95
|
"typescript": "^6.0.3",
|
|
@@ -123,7 +124,7 @@
|
|
|
123
124
|
"prebuild": "pnpm --filter @object-ui/types build && pnpm --filter @object-ui/core build && pnpm --filter @object-ui/react build",
|
|
124
125
|
"pretest": "pnpm run prebuild",
|
|
125
126
|
"test": "vitest run",
|
|
126
|
-
"type-check": "tsc --noEmit",
|
|
127
|
+
"type-check": "tsc --noEmit && tsc -p tsconfig.typetests.json",
|
|
127
128
|
"lint": "eslint ."
|
|
128
129
|
}
|
|
129
130
|
}
|