@wix/agent-skills 1.16.0 → 1.16.2

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.
Files changed (94) hide show
  1. package/package.json +1 -1
  2. package/skills/wix-app/SKILL.md +72 -8
  3. package/skills/wix-app/references/CODE_QUALITY.md +0 -1
  4. package/skills/wix-app/references/DASHBOARD_MODAL.md +21 -14
  5. package/skills/wix-app/references/DASHBOARD_PAGE.md +30 -184
  6. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +19 -3
  7. package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +172 -0
  8. package/skills/wix-app/references/dashboard-page/WDS_LAYOUT.md +187 -0
  9. package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +12 -7
  10. package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +31 -2
  11. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +6 -1
  12. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
  13. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +6 -6
  14. package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +167 -0
  15. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -2
  16. package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
  17. package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
  18. package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
  19. package/skills/wix-base44-connector/SKILL.md +185 -0
  20. package/skills/wix-base44-connector/scripts/utils.js +212 -0
  21. package/skills/wix-design-system/SKILL.md +19 -15
  22. package/skills/wix-docs/SKILL.md +75 -1
  23. package/skills/wix-headless/references/CAPABILITIES.md +16 -3
  24. package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
  25. package/skills/wix-headless/references/SEED.md +1 -1
  26. package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
  27. package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
  28. package/skills/wix-manage/SKILL.md +20 -17
  29. package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
  30. package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +1 -2
  31. package/skills/wix-manage/references/domains/domain-search-purchase-and-connect.md +2603 -0
  32. package/skills/wix-manage/references/events/create-wix-event.md +112 -90
  33. package/skills/wix-manage/references/events/manage-wix-events.md +33 -94
  34. package/skills/wix-manage/references/sites/create-headless-site.md +1 -0
  35. package/skills/wix-manage/references/sites/manage-oauth-apps.md +154 -0
  36. package/skills/wix-manage/references/sites/read-site-context.md +125 -0
  37. package/skills/wix-manage/references/sites/site-import.md +67 -15
  38. package/skills/wix-manage/references/stores/create-product-catalog-v3.md +273 -0
  39. package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +1 -1
  40. package/skills/wix-vibe-headless/SKILL.md +2 -1
  41. package/skills/wix-vibe-headless/install/deploy.cjs +63 -3
  42. package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +104 -0
  43. package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +74 -0
  44. package/skills/wix-vibe-headless/platforms/base44.md +15 -40
  45. package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +7 -11
  46. package/skills/wix-vibe-headless/references/blog/seed/SEED.md +1 -1
  47. package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +7 -11
  48. package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +1 -1
  49. package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +1 -2
  50. package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +7 -12
  51. package/skills/wix-vibe-headless/references/events/seed/SEED.md +1 -1
  52. package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +7 -11
  53. package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +7 -11
  54. package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +1 -1
  55. package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +7 -11
  56. package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +1 -1
  57. package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +7 -11
  58. package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +1 -1
  59. package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +1 -1
  60. package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +5 -3
  61. package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +75 -13
  62. package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +29 -86
  63. package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +3 -8
  64. package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +78 -105
  65. package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +92 -0
  66. package/skills/wix-vibe-headless/references/storefront/app/hooks/useVariantOptions.js +76 -0
  67. package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +1 -1
  68. package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +44 -5
  69. package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +0 -326
  70. package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +0 -115
  71. package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +0 -264
  72. package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +0 -37
  73. package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +0 -86
  74. package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +0 -119
  75. package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +0 -103
  76. package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +0 -76
  77. package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +0 -82
  78. package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +0 -89
  79. package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +0 -124
  80. package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +0 -91
  81. package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +0 -71
  82. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +0 -70
  83. package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +0 -73
  84. package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +0 -98
  85. package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +0 -278
  86. package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +0 -94
  87. package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +0 -43
  88. package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +0 -66
  89. package/skills/wix-app/references/auto-patterns-dashboard/views.md +0 -76
  90. package/skills/wix-app/scripts/generate-auto-patterns.js +0 -510
  91. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +0 -437
  92. package/skills/wix-manage/references/stores/create-product-from-image.md +0 -1031
  93. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +0 -623
  94. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +0 -106
@@ -1,278 +0,0 @@
1
- {
2
- "pages": [
3
- {
4
- "id": "additional-fees-collection",
5
- "type": "collectionPage",
6
- "appMainPage": true,
7
- "collectionPage": {
8
- "route": {
9
- "path": "/"
10
- },
11
- "title": {
12
- "text": "Additional Fees Configuration",
13
- "hideTotal": false
14
- },
15
- "subtitle": {
16
- "text": "Manage and configure additional fees for checkout"
17
- },
18
- "actions": {
19
- "primaryActions": {
20
- "type": "action",
21
- "action": {
22
- "item": {
23
- "id": "create-additional-fees",
24
- "type": "create",
25
- "label": "Add New Fee",
26
- "collection": {
27
- "collectionId": "@mirivo/mirivo-private-app-for-test2011/additional-fees",
28
- "entityTypeSource": "cms"
29
- },
30
- "create": {
31
- "mode": "page",
32
- "page": {
33
- "id": "additional-fees-entity"
34
- }
35
- }
36
- }
37
- }
38
- }
39
- },
40
- "components": [
41
- {
42
- "type": "collection",
43
- "layout": [
44
- {
45
- "type": "Table",
46
- "table": {
47
- "columns": [
48
- {
49
- "id": "feeTitle",
50
- "name": "Title",
51
- "width": "200px",
52
- "sortable": true
53
- },
54
- {
55
- "id": "feeAmount",
56
- "name": "Amount",
57
- "width": "100px",
58
- "sortable": true
59
- },
60
- {
61
- "id": "feeType",
62
- "name": "Type",
63
- "width": "200px",
64
- "sortable": true
65
- },
66
- {
67
- "id": "isActive",
68
- "name": "Active",
69
- "width": "100px",
70
- "sortable": true
71
- }
72
- ],
73
- "customColumns": {
74
- "enabled": true
75
- }
76
- }
77
- }
78
- ],
79
- "entityPageId": "additional-fees-entity",
80
- "collection": {
81
- "collectionId": "@mirivo/mirivo-private-app-for-test2011/additional-fees",
82
- "entityTypeSource": "cms"
83
- },
84
- "toolbarTitle": {
85
- "title": "Additional Fees",
86
- "subtitle": {
87
- "text": "Configure fees applied during checkout process"
88
- },
89
- "showTotal": true
90
- },
91
- "filters": {
92
- "items": [
93
- {
94
- "id": "feeAmount-filter",
95
- "fieldId": "feeAmount",
96
- "displayName": "Fee Amount",
97
- "tagLabel": "Fee Amount",
98
- "numberConfig": {
99
- "allowedDecimals": true
100
- }
101
- },
102
- {
103
- "id": "isActive-filter",
104
- "fieldId": "isActive",
105
- "displayName": "Is Active",
106
- "tagLabel": "Is Active"
107
- }
108
- ]
109
- },
110
- "emptyState": {
111
- "title": "No Additional Fees Configured",
112
- "subtitle": "Start by adding your first additional fee for checkout",
113
- "addNewCta": {
114
- "id": "create-additional-fees",
115
- "text": "Create First Fee"
116
- }
117
- },
118
- "actionCell": {
119
- "primaryAction": {
120
- "item": {
121
- "id": "edit-additional-fees",
122
- "type": "update",
123
- "update": {
124
- "mode": "page",
125
- "page": {
126
- "id": "additional-fees-entity"
127
- }
128
- }
129
- }
130
- },
131
- "secondaryActions": {
132
- "items": [
133
- {
134
- "id": "delete-additional-fees",
135
- "type": "delete",
136
- "label": "Delete",
137
- "delete": {
138
- "mode": "modal",
139
- "modal": {
140
- "title": {
141
- "text": "Remove Additional Fee"
142
- },
143
- "description": {
144
- "text": "Are you sure you want to delete this additional fee? This will remove it from future checkouts."
145
- },
146
- "feedback": {
147
- "successToast": {
148
- "text": "Additional fee deleted successfully"
149
- },
150
- "errorToast": {
151
- "text": "Failed to delete additional fee"
152
- }
153
- }
154
- }
155
- }
156
- }
157
- ]
158
- }
159
- },
160
- "bulkActionToolbar": {
161
- "primaryActions": [
162
- {
163
- "type": "action",
164
- "action": {
165
- "item": {
166
- "id": "bulk-delete-additional-fees",
167
- "type": "bulkDelete",
168
- "bulkDelete": {
169
- "mode": "modal",
170
- "modal": {
171
- "title": {
172
- "text": "Remove Multiple Fees"
173
- },
174
- "description": {
175
- "text": "Are you sure you want to delete the selected additional fees? This will remove them from future checkouts."
176
- },
177
- "feedback": {
178
- "successToast": {
179
- "text": "Selected additional fees deleted successfully"
180
- },
181
- "errorToast": {
182
- "text": "Failed to delete selected additional fees"
183
- }
184
- }
185
- }
186
- }
187
- }
188
- }
189
- }
190
- ]
191
- }
192
- }
193
- ]
194
- }
195
- },
196
- {
197
- "id": "additional-fees-entity",
198
- "type": "entityPage",
199
- "entityPage": {
200
- "route": {
201
- "path": "/additional-fee/:entityId",
202
- "params": {
203
- "id": "entityId"
204
- }
205
- },
206
- "title": {
207
- "text": "Fee Details"
208
- },
209
- "subtitle": {
210
- "text": "View and edit additional fee configuration"
211
- },
212
- "parentPageId": "additional-fees-collection",
213
- "layout": {
214
- "main": [
215
- {
216
- "type": "card",
217
- "card": {
218
- "title": {
219
- "text": "Fee Information"
220
- },
221
- "subtitle": {
222
- "text": "Basic details for the additional fee"
223
- },
224
- "children": [
225
- {
226
- "type": "field",
227
- "field": {
228
- "span": 12,
229
- "fieldId": "feeTitle"
230
- }
231
- },
232
- {
233
- "type": "field",
234
- "field": {
235
- "span": 12,
236
- "fieldId": "feeAmount"
237
- }
238
- },
239
- {
240
- "type": "field",
241
- "field": {
242
- "span": 12,
243
- "fieldId": "feeType"
244
- }
245
- }
246
- ]
247
- }
248
- }
249
- ],
250
- "sidebar": [
251
- {
252
- "type": "card",
253
- "card": {
254
- "title": {
255
- "text": "Fee Status"
256
- },
257
- "subtitle": {
258
- "text": "Activation and usage settings"
259
- },
260
- "children": [
261
- {
262
- "type": "field",
263
- "field": {
264
- "span": 12,
265
- "fieldId": "isActive"
266
- }
267
- }
268
- ]
269
- }
270
- }
271
- ]
272
- },
273
- "collectionId": "@mirivo/mirivo-private-app-for-test2011/additional-fees",
274
- "entityTypeSource": "cms"
275
- }
276
- }
277
- ]
278
- }
@@ -1,94 +0,0 @@
1
- # Pages Configuration Rules
2
-
3
- ## Type Definitions
4
- ```typescript
5
- interface PageConfig {
6
- id: string; // Unique ID
7
- type: 'collectionPage' | 'entityPage';
8
- appMainPage?: boolean; // EXACTLY ONE page must have true
9
- }
10
-
11
- interface CollectionPage extends PageConfig {
12
- type: 'collectionPage';
13
- collectionPage: {
14
- route: { path: '/' };
15
- components: [{
16
- entityPageId: string; // REQUIRED: Links to entity page ID
17
- // ... component config
18
- }];
19
- };
20
- }
21
-
22
- interface EntityPage extends PageConfig {
23
- type: 'entityPage';
24
- entityPage: {
25
- parentPageId: string; // REQUIRED: Links to collection page ID
26
- route: {
27
- path: string; // MUST be '/[segment]/:entityId'
28
- params: { id: 'entityId' };
29
- };
30
- };
31
- }
32
-
33
- interface StickyConfig {
34
- stickyColumns?: number; // Count of columns to stick from left
35
- columns: Array<{
36
- reorderDisabled?: boolean; // Recommended for sticky cols
37
- }>;
38
- }
39
- ```
40
-
41
- ## Validation Logic
42
- - **IF** `pages` array length != 2 **THEN** Invalid (Must be exactly 2).
43
- - **IF** `appMainPage: true` count != 1 **THEN** Invalid (Must be exactly 1).
44
- - **IF** `type: 'entityPage'` **THEN** `route.path` MUST match `/[segment]/:entityId`.
45
- - **IF** `route.path` is `/:entityId` **THEN** Invalid (Conflict with root).
46
- - **IF** `stickyColumns` is set **THEN** value must be > 0 AND <= total columns.
47
-
48
- ## Implementation Rules
49
- - **MUST** generate exactly one `collectionPage` and one `entityPage`.
50
- - **MUST** link pages bidirectionally:
51
- - `collectionPage` references `entityPageId` (in component).
52
- - `entityPage` references `parentPageId` (in page config).
53
- - **MUST** use `entityId` as the dynamic parameter name.
54
- - **MUST** use position-based stickiness (first N columns).
55
- - **SHOULD** set `reorderDisabled: true` for sticky columns to prevent user breakage.
56
-
57
- ## Canonical Example
58
- ```typescript
59
- [
60
- {
61
- id: 'product-list',
62
- type: 'collectionPage',
63
- appMainPage: true,
64
- collectionPage: {
65
- route: { path: '/' },
66
- components: [{
67
- type: 'collection',
68
- entityPageId: 'product-details', // Link to Entity Page
69
- layout: [{
70
- type: 'Table',
71
- table: {
72
- stickyColumns: 1,
73
- columns: [
74
- { id: 'name', name: 'Name', reorderDisabled: true }, // Sticky & Locked
75
- { id: 'price', name: 'Price' }
76
- ]
77
- }
78
- }]
79
- }]
80
- }
81
- },
82
- {
83
- id: 'product-details',
84
- type: 'entityPage',
85
- entityPage: {
86
- parentPageId: 'product-list', // Link to Collection Page
87
- route: {
88
- path: '/product/:entityId', // Correct format
89
- params: { id: 'entityId' }
90
- }
91
- }
92
- }
93
- ]
94
- ```
@@ -1,43 +0,0 @@
1
- # ResolvedAction Rules
2
-
3
- ## Type Definitions
4
- ```typescript
5
- interface ResolvedAction {
6
- label: string; // Display text
7
- icon: IconElement; // React Icon Component
8
- onClick: () => void; // async handlers compile due to TS void-return bivariance
9
- biName?: string; // type-optional; project convention is to ALWAYS set it (see Implementation Rules)
10
- disabled?: boolean;
11
- hidden?: boolean;
12
- tooltip?: string;
13
- skin?: string; // recommended values: 'standard' | 'inverted' | 'premium' | 'dark' | 'destructive'
14
- }
15
- ```
16
-
17
- ## Validation Logic
18
- - **IF** `disabled` is true **THEN** `tooltip` is **RECOMMENDED**.
19
- - **IF** implementing a custom action **THEN** return object MUST match `ResolvedAction`.
20
- - **IF** `biName` is provided **THEN** value MUST match configuration `biName`.
21
-
22
- ## Implementation Rules
23
- - **MUST** include `label`, `icon`, `onClick`, and `biName`.
24
- - **MUST** use valid icon element (e.g. `<Icon />`).
25
- - **MUST** handle async `onClick` operations properly (use try/catch or SDK helpers).
26
- - **SHOULD** use `hidden` for permission checks.
27
- - **SHOULD** use `skin="destructive"` for delete/dangerous actions.
28
-
29
- ## Canonical Example
30
- ```typescript
31
- // Resolver Function Return Value
32
- return {
33
- label: 'Export',
34
- icon: <Download />,
35
- biName: 'export-action',
36
- onClick: async () => {
37
- // Action logic
38
- },
39
- disabled: !hasData,
40
- tooltip: !hasData ? 'No data to export' : undefined,
41
- skin: 'standard'
42
- };
43
- ```
@@ -1,66 +0,0 @@
1
- # SDK Utilities Rules
2
-
3
- ## Type Definitions
4
- ```typescript
5
- interface AutoPatternsSDK {
6
- closeModal: () => void;
7
- getOptimisticActions: (collectionId: string) => OptimisticActions;
8
- getSchema: (collectionId: string) => SchemaConfig | undefined;
9
- refreshCollection: () => void;
10
- collectionId: string;
11
- }
12
-
13
- interface OptimisticActions {
14
- createOne: (item: any, params: OptimisticParams) => void;
15
- createMany: (items: any[], params: OptimisticParams) => void;
16
- updateOne: (item: any, params: OptimisticParams) => void;
17
- updateMany: (items: any[], params: OptimisticParams) => void;
18
- updateAll: (transformFn: (item: any) => Partial<any>, params: OptimisticParams) => void;
19
- deleteOne: (item: any, params: DeleteParams) => void;
20
- deleteMany: (items: any[], params: DeleteParams) => void;
21
- deleteAll: (params: DeleteParams) => void;
22
- }
23
-
24
- interface OptimisticParams {
25
- submit: (items: any[]) => Promise<any>;
26
- successToast: string | ToastConfig;
27
- errorToast: (error: Error, actions: { retry: () => void }) => string | ToastConfig;
28
- }
29
-
30
- type DeleteParams = OptimisticParams & { showUndoToast: true };
31
-
32
- interface ToastConfig {
33
- message: string; // Must use 'message' (not 'text')
34
- action?: { text: string; onClick: () => void };
35
- }
36
- ```
37
-
38
- ## Validation Logic
39
- - **IF** using `delete*` operations **THEN** `showUndoToast: true` is **REQUIRED**.
40
- - **IF** returning `ToastConfig` **THEN** use `message` property (NOT `text`).
41
- - **IF** using schema in submit **THEN** check `schema` existence first (can be undefined).
42
-
43
- ## Implementation Rules
44
- - **MUST** use `optimisticActions` for data mutations (create/update/delete).
45
- - **MUST** handle async submit failures in `errorToast`.
46
- - **MUST** use `sdk.collectionId` for current context.
47
- - **NEVER** use OptimisticActions for read-only operations.
48
-
49
- ## Canonical Example
50
- ```typescript
51
- const optimisticActions = sdk.getOptimisticActions(sdk.collectionId);
52
- const schema = sdk.getSchema(sdk.collectionId);
53
-
54
- optimisticActions.updateOne(item, {
55
- submit: async (items) => {
56
- // Check schema existence
57
- if (!schema) return items[0];
58
- return await schema.actions.update(items[0]);
59
- },
60
- successToast: 'Item updated successfully',
61
- errorToast: (err, { retry }) => ({
62
- message: 'Update failed', // Use 'message'
63
- action: { text: 'Retry', onClick: retry }
64
- })
65
- });
66
- ```
@@ -1,76 +0,0 @@
1
- # Views Configuration Rules
2
-
3
- ## Type Definitions
4
- ```typescript
5
- interface ViewsConfig {
6
- enabled?: boolean;
7
- presets?: ViewsPreset | CategoriesPreset;
8
- saveViewModalProps?: { placeholderName?: string; learnMore?: { url?: string } };
9
- viewsDropdownProps?: {
10
- showTotal?: boolean;
11
- hideAllItemsView?: boolean;
12
- customAllItemsViewLabel?: string;
13
- };
14
- }
15
-
16
- interface ViewsPreset {
17
- type: 'views';
18
- views: PresetView[];
19
- }
20
-
21
- interface CategoriesPreset {
22
- type: 'categories';
23
- categories: {
24
- id: string;
25
- label: string;
26
- views: PresetView[];
27
- icon?: { tooltipContent: string; size?: 'small' | 'medium' };
28
- }[];
29
- }
30
-
31
- interface PresetView {
32
- id: string; // Forbidden: predefined-views, saved-views, all-items-view
33
- label: string;
34
- isDefaultView?: boolean;
35
- columnPreferences?: { id: string; direction?: 'asc' | 'desc'; show?: boolean }[];
36
- filters?: Record<string, AutoFilterValue>; // Key matches filter config ID
37
- }
38
- ```
39
-
40
- ## Validation Logic
41
- - **IF** `views.enabled` is false **THEN** all other settings ignored.
42
- - **IF** controlling columns in views **THEN** `table.customColumns.enabled` MUST be true.
43
- - **IF** setting `columnPreferences` **THEN** must list ALL visible columns if reordering/hiding.
44
- - **IF** setting filters **THEN** keys MUST match defined filter IDs.
45
-
46
- ## Implementation Rules
47
- - **MUST** set `enabled: true` to activate.
48
- - **MUST** use valid filter structures (Date/Number/Boolean/Enum/Reference) matching `AppConfig`.
49
- - **MUST** avoid reserved IDs (`predefined-views`, `saved-views`, `all-items-view`).
50
- - **SHOULD** set `isDefaultView: true` on exactly one preset if default override needed.
51
-
52
- ## Canonical Example
53
- ```typescript
54
- views: {
55
- enabled: true,
56
- presets: {
57
- type: 'categories',
58
- categories: [{
59
- id: 'status-cat',
60
- label: 'By Status',
61
- views: [{
62
- id: 'active-items',
63
- label: 'Active Only',
64
- isDefaultView: true,
65
- filters: {
66
- 'status-filter': { filterType: 'boolean', value: [{ id: 'checked', name: 'Active' }] }
67
- },
68
- columnPreferences: [
69
- { id: 'name', show: true },
70
- { id: 'status', show: true, direction: 'asc' }
71
- ]
72
- }]
73
- }]
74
- }
75
- }
76
- ```