@object-ui/plugin-view 0.5.0 → 2.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.
@@ -1,21 +1,199 @@
1
1
 
2
- > @object-ui/plugin-view@0.5.0 build /home/runner/work/objectui/objectui/packages/plugin-view
2
+ > @object-ui/plugin-view@2.0.0 build /home/runner/work/objectui/objectui/packages/plugin-view
3
3
  > vite build
4
4
 
5
5
  vite v7.3.1 building client environment for production...
6
6
  transforming...
7
- ✓ 11 modules transformed.
7
+ ✓ 16 modules transformed.
8
8
  rendering chunks...
9
9
  
10
10
  [vite:dts] Start generate declaration files...
11
+ src/__tests__/FilterUI.test.tsx:183:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
12
+
13
+ 183 expect(screen.getByText('Status')).toBeInTheDocument();
14
+    ~~~~~~~~~~~~~~~~~
15
+ src/__tests__/FilterUI.test.tsx:184:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
16
+
17
+ 184 expect(screen.getByText('Name')).toBeInTheDocument();
18
+    ~~~~~~~~~~~~~~~~~
19
+ src/__tests__/FilterUI.test.tsx:187:51 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
20
+
21
+ 187 expect(screen.queryByTestId('popover')).not.toBeInTheDocument();
22
+    ~~~~~~~~~~~~~~~~~
23
+ src/__tests__/FilterUI.test.tsx:188:50 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
24
+
25
+ 188 expect(screen.queryByTestId('drawer')).not.toBeInTheDocument();
26
+    ~~~~~~~~~~~~~~~~~
27
+ src/__tests__/FilterUI.test.tsx:194:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
28
+
29
+ 194 expect(screen.getByText('Status')).toBeInTheDocument();
30
+    ~~~~~~~~~~~~~~~~~
31
+ src/__tests__/FilterUI.test.tsx:195:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
32
+
33
+ 195 expect(screen.getByText('Name')).toBeInTheDocument();
34
+    ~~~~~~~~~~~~~~~~~
35
+ src/__tests__/FilterUI.test.tsx:206:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
36
+
37
+ 206 expect(screen.getByText('Status')).toBeInTheDocument();
38
+    ~~~~~~~~~~~~~~~~~
39
+ src/__tests__/FilterUI.test.tsx:207:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
40
+
41
+ 207 expect(screen.getByText('Name')).toBeInTheDocument();
42
+    ~~~~~~~~~~~~~~~~~
43
+ src/__tests__/FilterUI.test.tsx:219:41 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
44
+
45
+ 219 expect(screen.getByText('email')).toBeInTheDocument();
46
+    ~~~~~~~~~~~~~~~~~
47
+ src/__tests__/FilterUI.test.tsx:225:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
48
+
49
+ 225 expect(screen.getByText('Active')).toBeInTheDocument();
50
+    ~~~~~~~~~~~~~~~~~
51
+ src/__tests__/FilterUI.test.tsx:226:44 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
52
+
53
+ 226 expect(screen.getByText('Inactive')).toBeInTheDocument();
54
+    ~~~~~~~~~~~~~~~~~
55
+ src/__tests__/FilterUI.test.tsx:239:21 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
56
+
57
+ 239 expect(input).toBeInTheDocument();
58
+    ~~~~~~~~~~~~~~~~~
59
+ src/__tests__/FilterUI.test.tsx:320:26 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLElement>'.
60
+
61
+ 320 expect(selectRoot).toHaveAttribute('data-value', 'inactive');
62
+    ~~~~~~~~~~~~~~~
63
+ src/__tests__/FilterUI.test.tsx:331:45 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
64
+
65
+ 331 expect(screen.getByTestId('popover')).toBeInTheDocument();
66
+    ~~~~~~~~~~~~~~~~~
67
+ src/__tests__/FilterUI.test.tsx:332:43 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
68
+
69
+ 332 expect(screen.getByText('Filters')).toBeInTheDocument();
70
+    ~~~~~~~~~~~~~~~~~
71
+ src/__tests__/FilterUI.test.tsx:339:30 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
72
+
73
+ 339 expect(popoverContent).toBeInTheDocument();
74
+    ~~~~~~~~~~~~~~~~~
75
+ src/__tests__/FilterUI.test.tsx:342:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
76
+
77
+ 342 expect(screen.getByText('Status')).toBeInTheDocument();
78
+    ~~~~~~~~~~~~~~~~~
79
+ src/__tests__/FilterUI.test.tsx:343:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
80
+
81
+ 343 expect(screen.getByText('Name')).toBeInTheDocument();
82
+    ~~~~~~~~~~~~~~~~~
83
+ src/__tests__/FilterUI.test.tsx:357:37 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
84
+
85
+ 357 expect(screen.getByText('1')).toBeInTheDocument();
86
+    ~~~~~~~~~~~~~~~~~
87
+ src/__tests__/FilterUI.test.tsx:369:48 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
88
+
89
+ 369 expect(screen.queryByText('Status')).not.toBeInTheDocument();
90
+    ~~~~~~~~~~~~~~~~~
91
+ src/__tests__/FilterUI.test.tsx:370:46 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
92
+
93
+ 370 expect(screen.queryByText('Name')).not.toBeInTheDocument();
94
+    ~~~~~~~~~~~~~~~~~
95
+ src/__tests__/FilterUI.test.tsx:376:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
96
+
97
+ 376 expect(screen.getByText('Status')).toBeInTheDocument();
98
+    ~~~~~~~~~~~~~~~~~
99
+ src/__tests__/FilterUI.test.tsx:377:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
100
+
101
+ 377 expect(screen.getByText('Name')).toBeInTheDocument();
102
+    ~~~~~~~~~~~~~~~~~
103
+ src/__tests__/FilterUI.test.tsx:383:42 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
104
+
105
+ 383 expect(screen.getByText('Status')).toBeInTheDocument();
106
+    ~~~~~~~~~~~~~~~~~
107
+ src/__tests__/FilterUI.test.tsx:402:43 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
108
+
109
+ 402 expect(screen.queryByText('1')).not.toBeInTheDocument();
110
+    ~~~~~~~~~~~~~~~~~
111
+ src/__tests__/FilterUI.test.tsx:415:43 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
112
+
113
+ 415 expect(screen.queryByText('1')).not.toBeInTheDocument();
114
+    ~~~~~~~~~~~~~~~~~
115
+ src/__tests__/FilterUI.test.tsx:428:43 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
116
+
117
+ 428 expect(screen.queryByText('1')).not.toBeInTheDocument();
118
+    ~~~~~~~~~~~~~~~~~
119
+ src/__tests__/FilterUI.test.tsx:441:43 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement | null>'.
120
+
121
+ 441 expect(screen.queryByText('1')).not.toBeInTheDocument();
122
+    ~~~~~~~~~~~~~~~~~
123
+ src/__tests__/FilterUI.test.tsx:454:37 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
124
+
125
+ 454 expect(screen.getByText('2')).toBeInTheDocument();
126
+    ~~~~~~~~~~~~~~~~~
127
+ src/__tests__/SortUI.test.tsx:98:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
128
+
129
+ 98 expect(screen.getByText('Name')).toBeInTheDocument();
130
+    ~~~~~~~~~~~~~~~~~
131
+ src/__tests__/SortUI.test.tsx:99:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
132
+
133
+ 99 expect(screen.getByText('Date')).toBeInTheDocument();
134
+    ~~~~~~~~~~~~~~~~~
135
+ src/__tests__/SortUI.test.tsx:108:21 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLElement>'.
136
+
137
+ 108 expect(btn).toHaveAttribute('data-variant', 'outline');
138
+    ~~~~~~~~~~~~~~~
139
+ src/__tests__/SortUI.test.tsx:123:23 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLButtonElement>'.
140
+
141
+ 123 expect(nameBtn).toHaveAttribute('data-variant', 'secondary');
142
+    ~~~~~~~~~~~~~~~
143
+ src/__tests__/SortUI.test.tsx:126:23 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLButtonElement>'.
144
+
145
+ 126 expect(dateBtn).toHaveAttribute('data-variant', 'outline');
146
+    ~~~~~~~~~~~~~~~
147
+ src/__tests__/SortUI.test.tsx:157:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
148
+
149
+ 157 expect(screen.getByText('Name')).toBeInTheDocument();
150
+    ~~~~~~~~~~~~~~~~~
151
+ src/__tests__/SortUI.test.tsx:158:40 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
152
+
153
+ 158 expect(screen.getByText('Date')).toBeInTheDocument();
154
+    ~~~~~~~~~~~~~~~~~
155
+ src/__tests__/SortUI.test.tsx:164:45 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
156
+
157
+ 164 expect(screen.getByText('Ascending')).toBeInTheDocument();
158
+    ~~~~~~~~~~~~~~~~~
159
+ src/__tests__/SortUI.test.tsx:165:46 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
160
+
161
+ 165 expect(screen.getByText('Descending')).toBeInTheDocument();
162
+    ~~~~~~~~~~~~~~~~~
163
+ src/__tests__/SortUI.test.tsx:188:50 - error TS2339: Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.
164
+
165
+ 188 expect(screen.getByTestId('sort-builder')).toBeInTheDocument();
166
+    ~~~~~~~~~~~~~~~~~
167
+ src/__tests__/SortUI.test.tsx:243:23 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLButtonElement>'.
168
+
169
+ 243 expect(dateBtn).toHaveAttribute('data-variant', 'secondary');
170
+    ~~~~~~~~~~~~~~~
171
+ src/__tests__/SortUI.test.tsx:260:21 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLElement>'.
172
+
173
+ 260 expect(btn).toHaveAttribute('data-variant', 'outline');
174
+    ~~~~~~~~~~~~~~~
175
+ src/__tests__/SortUI.test.tsx:341:23 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLButtonElement>'.
176
+
177
+ 341 expect(nameBtn).toHaveAttribute('data-variant', 'secondary');
178
+    ~~~~~~~~~~~~~~~
179
+ src/__tests__/SortUI.test.tsx:342:23 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLButtonElement>'.
180
+
181
+ 342 expect(dateBtn).toHaveAttribute('data-variant', 'secondary');
182
+    ~~~~~~~~~~~~~~~
183
+ src/__tests__/SortUI.test.tsx:376:21 - error TS2339: Property 'toHaveAttribute' does not exist on type 'Assertion<HTMLElement>'.
184
+
185
+ 376 expect(btn).toHaveAttribute('data-variant', 'outline');
186
+    ~~~~~~~~~~~~~~~
187
+
11
188
  computing gzip size...
12
- dist/index.js 17.10 kB │ gzip: 5.03 kB
13
- [vite:dts] Declaration files built in 4664ms.
189
+ dist/index.js 47.74 kB │ gzip: 12.26 kB
190
+ [vite:dts] Declaration files built in 5404ms.
14
191
  
15
192
  No name was provided for external module "@object-ui/core" in "output.globals" – guessing "core".
16
193
  No name was provided for external module "@object-ui/plugin-grid" in "output.globals" – guessing "pluginGrid".
17
194
  No name was provided for external module "@object-ui/plugin-form" in "output.globals" – guessing "pluginForm".
18
195
  No name was provided for external module "@object-ui/components" in "output.globals" – guessing "components".
19
196
  No name was provided for external module "lucide-react" in "output.globals" – guessing "lucideReact".
20
- dist/index.umd.cjs 11.73 kB │ gzip: 4.45 kB
21
- ✓ built in 5.31s
197
+ No name was provided for external module "@object-ui/react" in "output.globals" – guessing "react".
198
+ dist/index.umd.cjs 33.54 kB │ gzip: 10.79 kB
199
+ ✓ built in 5.86s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @object-ui/plugin-view
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - b859617: Release v1.0.0 — unify all package versions to 1.0.0
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [b859617]
12
+ - @object-ui/types@2.0.0
13
+ - @object-ui/core@2.0.0
14
+ - @object-ui/react@2.0.0
15
+ - @object-ui/components@2.0.0
16
+ - @object-ui/plugin-form@2.0.0
17
+ - @object-ui/plugin-grid@2.0.0
18
+
3
19
  ## 0.3.1
4
20
 
5
21
  ### 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