@object-ui/plugin-view 0.5.0 → 3.0.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/.turbo/turbo-build.log +7 -6
- package/CHANGELOG.md +38 -0
- package/README.md +58 -0
- package/dist/index.js +1168 -349
- package/dist/index.umd.cjs +2 -2
- package/dist/plugin-view/src/FilterUI.d.ts +16 -0
- package/dist/plugin-view/src/ObjectView.d.ts +85 -5
- package/dist/plugin-view/src/SortUI.d.ts +16 -0
- package/dist/plugin-view/src/ViewSwitcher.d.ts +16 -0
- package/dist/plugin-view/src/index.d.ts +7 -1
- package/package.json +9 -8
- package/src/FilterUI.tsx +317 -0
- package/src/ObjectView.tsx +668 -148
- package/src/SortUI.tsx +210 -0
- package/src/ViewSwitcher.tsx +311 -0
- package/src/__tests__/FilterUI.test.tsx +544 -0
- package/src/__tests__/ObjectView.test.tsx +375 -0
- package/src/__tests__/SortUI.test.tsx +380 -0
- package/src/__tests__/registration.test.tsx +32 -0
- package/src/__tests__/toolbar-consistency.test.tsx +755 -0
- package/src/index.tsx +147 -5
- package/vite.config.ts +1 -0
- package/vitest.config.ts +12 -0
- package/vitest.setup.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
> @object-ui/plugin-view@0.
|
|
2
|
+
> @object-ui/plugin-view@3.0.0 build /home/runner/work/objectui/objectui/packages/plugin-view
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v7.3.1 [32mbuilding client environment for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 16 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
9
|
[32m
|
|
10
10
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
13
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
12
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m47.74 kB[22m[1m[22m[2m │ gzip: 12.27 kB[22m
|
|
13
|
+
[32m[36m[vite:dts][32m Declaration files built in 3998ms.
|
|
14
14
|
[39m
|
|
15
15
|
[33mNo name was provided for external module "@object-ui/core" in "output.globals" – guessing "core".[39m
|
|
16
16
|
[33mNo name was provided for external module "@object-ui/plugin-grid" in "output.globals" – guessing "pluginGrid".[39m
|
|
17
17
|
[33mNo name was provided for external module "@object-ui/plugin-form" in "output.globals" – guessing "pluginForm".[39m
|
|
18
18
|
[33mNo name was provided for external module "@object-ui/components" in "output.globals" – guessing "components".[39m
|
|
19
19
|
[33mNo name was provided for external module "lucide-react" in "output.globals" – guessing "lucideReact".[39m
|
|
20
|
-
[
|
|
21
|
-
[
|
|
20
|
+
[33mNo name was provided for external module "@object-ui/react" in "output.globals" – guessing "react".[39m
|
|
21
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[2m33.55 kB[22m[1m[22m[2m │ gzip: 10.79 kB[22m
|
|
22
|
+
[32m✓ built in 4.41s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @object-ui/plugin-view
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 87979c3: Upgrade to @objectstack v3.0.0 and console bundle optimization
|
|
8
|
+
- Upgraded all @objectstack/\* packages from ^2.0.7 to ^3.0.0
|
|
9
|
+
- Breaking change migrations: Hub → Cloud namespace, definePlugin removed, PaginatedResult.value → .records, PaginatedResult.count → .total, client.meta.getObject() → client.meta.getItem()
|
|
10
|
+
- Console bundle optimization: split monolithic 3.7 MB chunk into 17 granular cacheable chunks (95% main entry reduction)
|
|
11
|
+
- Added gzip + brotli pre-compression via vite-plugin-compression2
|
|
12
|
+
- Lazy MSW loading for build:server (~150 KB gzip saved)
|
|
13
|
+
- Added bundle analysis with rollup-plugin-visualizer
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [87979c3]
|
|
18
|
+
- @object-ui/types@3.0.0
|
|
19
|
+
- @object-ui/core@3.0.0
|
|
20
|
+
- @object-ui/react@3.0.0
|
|
21
|
+
- @object-ui/components@3.0.0
|
|
22
|
+
- @object-ui/plugin-form@3.0.0
|
|
23
|
+
- @object-ui/plugin-grid@3.0.0
|
|
24
|
+
|
|
25
|
+
## 2.0.0
|
|
26
|
+
|
|
27
|
+
### Major Changes
|
|
28
|
+
|
|
29
|
+
- b859617: Release v1.0.0 — unify all package versions to 1.0.0
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [b859617]
|
|
34
|
+
- @object-ui/types@2.0.0
|
|
35
|
+
- @object-ui/core@2.0.0
|
|
36
|
+
- @object-ui/react@2.0.0
|
|
37
|
+
- @object-ui/components@2.0.0
|
|
38
|
+
- @object-ui/plugin-form@2.0.0
|
|
39
|
+
- @object-ui/plugin-grid@2.0.0
|
|
40
|
+
|
|
3
41
|
## 0.3.1
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Object View plugin for Object UI - Unified component for displaying and managing
|
|
|
11
11
|
- **Field Mapping** - Automatic field type detection
|
|
12
12
|
- **Validation** - Schema-based validation
|
|
13
13
|
- **ObjectQL Integration** - Native ObjectStack support
|
|
14
|
+
- **View Controls** - View switcher, filter UI, and sort UI components
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
@@ -66,6 +67,63 @@ Unified view component for ObjectQL objects:
|
|
|
66
67
|
}
|
|
67
68
|
```
|
|
68
69
|
|
|
70
|
+
### ViewSwitcher
|
|
71
|
+
|
|
72
|
+
Toggle between multiple view configurations:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
{
|
|
76
|
+
type: 'view-switcher',
|
|
77
|
+
views: [
|
|
78
|
+
{ type: 'grid', label: 'Grid', schema: { type: 'text', content: 'Grid content' } },
|
|
79
|
+
{ type: 'kanban', label: 'Kanban', schema: { type: 'text', content: 'Kanban content' } }
|
|
80
|
+
],
|
|
81
|
+
defaultView: 'grid',
|
|
82
|
+
variant: 'tabs',
|
|
83
|
+
position: 'top',
|
|
84
|
+
persistPreference: true,
|
|
85
|
+
storageKey: 'my-view-switcher'
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### FilterUI
|
|
90
|
+
|
|
91
|
+
Render a filter toolbar with multiple field types:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
{
|
|
95
|
+
type: 'filter-ui',
|
|
96
|
+
layout: 'popover',
|
|
97
|
+
showApply: true,
|
|
98
|
+
showClear: true,
|
|
99
|
+
filters: [
|
|
100
|
+
{ field: 'name', label: 'Name', type: 'text', placeholder: 'Search name' },
|
|
101
|
+
{ field: 'status', label: 'Status', type: 'select', options: [
|
|
102
|
+
{ label: 'Open', value: 'open' },
|
|
103
|
+
{ label: 'Closed', value: 'closed' }
|
|
104
|
+
] },
|
|
105
|
+
{ field: 'created_at', label: 'Created', type: 'date-range' }
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### SortUI
|
|
111
|
+
|
|
112
|
+
Configure sorting with dropdowns or buttons:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
{
|
|
116
|
+
type: 'sort-ui',
|
|
117
|
+
variant: 'dropdown',
|
|
118
|
+
multiple: true,
|
|
119
|
+
fields: [
|
|
120
|
+
{ field: 'name', label: 'Name' },
|
|
121
|
+
{ field: 'created_at', label: 'Created At' }
|
|
122
|
+
],
|
|
123
|
+
sort: [{ field: 'name', direction: 'asc' }]
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
69
127
|
## Examples
|
|
70
128
|
|
|
71
129
|
### Grid View
|