@wix/auto-patterns 1.37.0 → 1.38.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/dist/cjs/components/AutoPatternsApp/AutoPatternsApp.js +1 -1
- package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/SkeletonCollection.js +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/EditModeEntityPage.js +13 -9
- package/dist/cjs/components/AutoPatternsEntityPage/EditModeEntityPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/Checkbox.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/DateInput.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/DateTime.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/ImageInput.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/LongText.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/Number.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/ShortText.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/Url.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutCard.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderViewField.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/SkeletonEntity.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutCard.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/ViewModeEntityPage.js +1 -1
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js +9 -6
- package/dist/cjs/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -1
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsPage.js +1 -1
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js +1 -1
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js +11 -6
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -1
- package/dist/cjs/components/AutoPatternsTableGridSwitch/AutoPatternsTableGridSwitch.js +1 -1
- package/dist/cjs/components/DynamicIcon.js +1 -1
- package/dist/cjs/components/ModalRenderer.js +1 -1
- package/dist/cjs/components/filters/DynamicCollectionFilter.js +1 -1
- package/dist/cjs/components/filters/StaticCollectionFilter.js +1 -1
- package/dist/cjs/components/modals/actions/BulkDeleteModal.js +28 -10
- package/dist/cjs/components/modals/actions/BulkDeleteModal.js.map +1 -1
- package/dist/cjs/components/modals/actions/CreateModal.js +1 -1
- package/dist/cjs/components/modals/actions/EditModal.js +1 -1
- package/dist/cjs/counter.js +1 -1
- package/dist/cjs/dataSourceAdapters/cms/filterUtils.js +3 -2
- package/dist/cjs/dataSourceAdapters/cms/filterUtils.js.map +1 -1
- package/dist/cjs/dataSourceAdapters/cms/sortUtils.js +2 -1
- package/dist/cjs/dataSourceAdapters/cms/sortUtils.js.map +1 -1
- package/dist/cjs/hooks/useBaseTableFeatures.js +6 -3
- package/dist/cjs/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useBulkActionToolbar.js +1 -1
- package/dist/cjs/hooks/useCollectionPageActions.js +1 -1
- package/dist/cjs/hooks/useColumns.js +1 -1
- package/dist/cjs/hooks/useCommonCollectionFeatures.js +1 -1
- package/dist/cjs/hooks/useDataExtensionProps.js +30 -0
- package/dist/cjs/hooks/useDataExtensionProps.js.map +1 -0
- package/dist/cjs/hooks/useDragAndDropBaseProps.js +30 -0
- package/dist/cjs/hooks/useDragAndDropBaseProps.js.map +1 -0
- package/dist/cjs/hooks/useEmptyStates.js +1 -1
- package/dist/cjs/hooks/useEntityPageActions.js +1 -1
- package/dist/cjs/hooks/useFilters.js +1 -1
- package/dist/cjs/hooks/useGridDragAndDrop.js +17 -0
- package/dist/cjs/hooks/useGridDragAndDrop.js.map +1 -0
- package/dist/cjs/hooks/useGridFeatures.js +4 -1
- package/dist/cjs/hooks/useGridFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableDragAndDrop.js +17 -0
- package/dist/cjs/hooks/useTableDragAndDrop.js.map +1 -0
- package/dist/cjs/hooks/useTableFeatures.js +7 -2
- package/dist/cjs/hooks/useTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableGridSwitchDragAndDrop.js +17 -0
- package/dist/cjs/hooks/useTableGridSwitchDragAndDrop.js.map +1 -0
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js +7 -2
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/cjs/providers/AppConfigContext.js +1 -1
- package/dist/cjs/providers/AppContext.js +1 -1
- package/dist/cjs/providers/AppContextData.js +1 -1
- package/dist/cjs/providers/AutoPatternsOverridesContext.js +2 -2
- package/dist/cjs/providers/AutoPatternsOverridesContext.js.map +1 -1
- package/dist/cjs/providers/ErrorContext.js +1 -1
- package/dist/cjs/providers/ItemsContext.js +1 -1
- package/dist/cjs/providers/ModalContext.js +1 -1
- package/dist/cjs/providers/OptimisticActionsContext.js +1 -1
- package/dist/cjs/providers/RootAppProvider.js +1 -1
- package/dist/cjs/providers/SchemaContext.js +1 -1
- package/dist/cjs/providers/SchemaRegistryContext.js +1 -1
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
- package/dist/cjs/types/DeepPartial.js +4 -0
- package/dist/cjs/types/DeepPartial.js.map +1 -0
- package/dist/cjs/types/actions/base.js.map +1 -1
- package/dist/cjs/types/types.js.map +1 -1
- package/dist/cjs/utils/actions/bulkDeleteAction.js +1 -1
- package/dist/cjs/utils/actions/createAction.js +1 -1
- package/dist/cjs/utils/actions/deleteAction.js +1 -1
- package/dist/cjs/utils/actions/updateAction.js +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/EditModeEntityPage.js +4 -0
- package/dist/esm/components/AutoPatternsEntityPage/EditModeEntityPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js +7 -4
- package/dist/esm/components/AutoPatternsGrid/AutoPatternsGrid.js.map +1 -1
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js +9 -4
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -1
- package/dist/esm/components/modals/actions/BulkDeleteModal.js +20 -3
- package/dist/esm/components/modals/actions/BulkDeleteModal.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/filterUtils.js +3 -2
- package/dist/esm/dataSourceAdapters/cms/filterUtils.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/sortUtils.js +2 -1
- package/dist/esm/dataSourceAdapters/cms/sortUtils.js.map +1 -1
- package/dist/esm/hooks/useBaseTableFeatures.js +4 -1
- package/dist/esm/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useDataExtensionProps.js +18 -0
- package/dist/esm/hooks/useDataExtensionProps.js.map +1 -0
- package/dist/esm/hooks/useDragAndDropBaseProps.js +27 -0
- package/dist/esm/hooks/useDragAndDropBaseProps.js.map +1 -0
- package/dist/esm/hooks/useGridDragAndDrop.js +13 -0
- package/dist/esm/hooks/useGridDragAndDrop.js.map +1 -0
- package/dist/esm/hooks/useGridFeatures.js +4 -1
- package/dist/esm/hooks/useGridFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableDragAndDrop.js +13 -0
- package/dist/esm/hooks/useTableDragAndDrop.js.map +1 -0
- package/dist/esm/hooks/useTableFeatures.js +7 -2
- package/dist/esm/hooks/useTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableGridSwitchDragAndDrop.js +13 -0
- package/dist/esm/hooks/useTableGridSwitchDragAndDrop.js.map +1 -0
- package/dist/esm/hooks/useTableGridSwitchFeatures.js +7 -2
- package/dist/esm/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/esm/providers/AutoPatternsOverridesContext.js.map +1 -1
- package/dist/esm/types/CollectionPageConfig.js.map +1 -1
- package/dist/esm/types/DeepPartial.js +2 -0
- package/dist/esm/types/DeepPartial.js.map +1 -0
- package/dist/esm/types/actions/base.js.map +1 -1
- package/dist/esm/types/types.js.map +1 -1
- package/dist/types/components/AutoPatternsEntityPage/EditModeEntityPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsGrid/AutoPatternsGrid.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts.map +1 -1
- package/dist/types/components/modals/actions/BulkDeleteModal.d.ts.map +1 -1
- package/dist/types/hooks/useBaseTableFeatures.d.ts +10 -0
- package/dist/types/hooks/useBaseTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useDataExtensionProps.d.ts +8 -0
- package/dist/types/hooks/useDataExtensionProps.d.ts.map +1 -0
- package/dist/types/hooks/useDragAndDropBaseProps.d.ts +4 -0
- package/dist/types/hooks/useDragAndDropBaseProps.d.ts.map +1 -0
- package/dist/types/hooks/useGridDragAndDrop.d.ts +24 -0
- package/dist/types/hooks/useGridDragAndDrop.d.ts.map +1 -0
- package/dist/types/hooks/useGridFeatures.d.ts +22 -0
- package/dist/types/hooks/useGridFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableDragAndDrop.d.ts +3 -0
- package/dist/types/hooks/useTableDragAndDrop.d.ts.map +1 -0
- package/dist/types/hooks/useTableFeatures.d.ts +2 -0
- package/dist/types/hooks/useTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableGridSwitchDragAndDrop.d.ts +27 -0
- package/dist/types/hooks/useTableGridSwitchDragAndDrop.d.ts.map +1 -0
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts +24 -0
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts.map +1 -1
- package/dist/types/providers/AutoPatternsOverridesContext.d.ts +6 -0
- package/dist/types/providers/AutoPatternsOverridesContext.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +15 -0
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
- package/dist/types/types/DeepPartial.d.ts +4 -0
- package/dist/types/types/DeepPartial.d.ts.map +1 -0
- package/dist/types/types/actions/base.d.ts +5 -0
- package/dist/types/types/actions/base.d.ts.map +1 -1
- package/dist/types/types/types.d.ts +24 -1
- package/dist/types/types/types.d.ts.map +1 -1
- package/docs/GETTING_STARTED.md +6 -2
- package/mcp-docs/app_config_structure.md +14 -1
- package/mcp-docs/auto-patterns-guide.md +282 -80
- package/mcp-docs/bulk_actions.md +60 -0
- package/mcp-docs/custom_overrides.md +134 -54
- package/mcp-docs/schema_config.md +74 -25
- package/mcp-docs/wix_fqdn_custom_data_source.md +66 -11
- package/package.json +12 -12
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
**🛑 CRITICAL PREREQUISITE**: This guide explains a specialized feature that exists within the broader auto-patterns framework. You **CANNOT** implement this guide without first having the complete content of the WixAutoPatternsGuide.
|
|
4
4
|
|
|
5
5
|
**📋 MANDATORY FIRST STEP**: Before proceeding with this FQDN-specific implementation:
|
|
6
|
+
|
|
6
7
|
1. **You MUST call the `WixAutoPatternsGuide` tool first** to get the foundational auto-patterns knowledge
|
|
7
8
|
2. **This document is NOT standalone** - it's an advanced feature guide that builds upon the core auto-patterns concepts
|
|
8
9
|
3. **Without the WixAutoPatternsGuide content**, you will not understand the basic concepts, component structure, or implementation patterns required for this FQDN implementation
|
|
@@ -16,12 +17,14 @@ When implementing a custom data source based on a Wix Business API FQDN, you'll
|
|
|
16
17
|
## Prerequisites: Required Tools and Knowledge
|
|
17
18
|
|
|
18
19
|
**🛑 ABSOLUTE REQUIREMENT - WixAutoPatternsGuide Content**:
|
|
20
|
+
|
|
19
21
|
- **You MUST have the complete WixAutoPatternsGuide content** before starting this implementation
|
|
20
22
|
- **This FQDN guide is NOT self-contained** - it's a specialized extension of the main auto-patterns guide
|
|
21
23
|
- **If you haven't called the `WixAutoPatternsGuide` tool yet**, stop now and call it first
|
|
22
24
|
- **This guide will reference concepts, components, and patterns** that are only explained in the main guide
|
|
23
25
|
|
|
24
26
|
**🛑 CRITICAL**: Before proceeding with this guide, you must have the following tools available:
|
|
27
|
+
|
|
25
28
|
- `WixAutoPatternsGuide` tool for understanding auto-patterns fundamentals and implementation patterns (**MANDATORY FIRST STEP**)
|
|
26
29
|
- `fqdn_schema` tool for extracting schema information from FQDNs
|
|
27
30
|
- `client_lib` tool for determining the correct client library package
|
|
@@ -30,6 +33,7 @@ When implementing a custom data source based on a Wix Business API FQDN, you'll
|
|
|
30
33
|
|
|
31
34
|
**Auto-Patterns Context Requirement:**
|
|
32
35
|
If you haven't already used the `WixAutoPatternsGuide` tool in this conversation, you MUST call it first to understand:
|
|
36
|
+
|
|
33
37
|
- How AutoPatternsApp works
|
|
34
38
|
- AppConfig structure and requirements
|
|
35
39
|
- Custom data source implementation patterns
|
|
@@ -42,6 +46,7 @@ If you haven't already used the `WixAutoPatternsGuide` tool in this conversation
|
|
|
42
46
|
To add these tools, you need to install the **business-schema-mcp** server:
|
|
43
47
|
|
|
44
48
|
**Installation Instructions:**
|
|
49
|
+
|
|
45
50
|
1. Follow the setup instructions at: https://github.com/wix-private/mcp-servers/tree/master/packages/business-schema-mcp
|
|
46
51
|
2. Configure the MCP server according to the documentation
|
|
47
52
|
3. Restart your development environment to load the new tools
|
|
@@ -49,6 +54,7 @@ To add these tools, you need to install the **business-schema-mcp** server:
|
|
|
49
54
|
|
|
50
55
|
**Tool Verification:**
|
|
51
56
|
Before continuing, verify that you have access to:
|
|
57
|
+
|
|
52
58
|
- `fqdn_schema` tool - for extracting entity schema from FQDNs
|
|
53
59
|
- `client_lib` tool - for determining the correct SDK package to use
|
|
54
60
|
|
|
@@ -61,6 +67,7 @@ Use fqdn_schema tool with your FQDN (e.g., "wix.bookings.v1.sessions")
|
|
|
61
67
|
```
|
|
62
68
|
|
|
63
69
|
This will provide you with:
|
|
70
|
+
|
|
64
71
|
- Entity field definitions
|
|
65
72
|
- Available actions/operations
|
|
66
73
|
- Field types and constraints
|
|
@@ -81,6 +88,7 @@ This will tell you which library to import for your custom data source implement
|
|
|
81
88
|
Transform the FQDN schema from Step 1 into a AutoPatterns-compatible SchemaConfig by mapping the FQDN field types to AutoPatterns field types. Identify appropriate fields for `displayField` and `idField` based on your FQDN schema.
|
|
82
89
|
|
|
83
90
|
**🛑 MANDATORY - Query Operators Must Be Empty Array**: When implementing a custom data source, you **MUST** set `supportedQueryOperators: []` (empty array) for all fields. This is required because:
|
|
91
|
+
|
|
84
92
|
- Custom data sources handle all query operations directly through your implementation
|
|
85
93
|
- You don't need to specify individual operators for each field
|
|
86
94
|
- The custom data source `find` action will receive all queries regardless of declared operators
|
|
@@ -94,12 +102,14 @@ Transform the FQDN schema from Step 1 into a AutoPatterns-compatible SchemaConfi
|
|
|
94
102
|
- **In API calls**: Use the original snake_case field names (e.g., `primary_info.email`, `created_date`, `last_activity.activity_date`)
|
|
95
103
|
|
|
96
104
|
**Field Path Conversion Examples:**
|
|
105
|
+
|
|
97
106
|
- `primary_info.email` → `primaryInfo.email` (NOT `primaryEmail`)
|
|
98
107
|
- `last_activity.activity_date` → `lastActivity.activityDate` (NOT `lastActivityDate`)
|
|
99
108
|
- `job_title` → `jobTitle`
|
|
100
109
|
- `created_date` → `createdDate`
|
|
101
110
|
|
|
102
111
|
This conversion ensures:
|
|
112
|
+
|
|
103
113
|
- **Consistent JavaScript naming conventions** in your AutoPatterns configuration
|
|
104
114
|
- **Preserved field path structure** for nested object access
|
|
105
115
|
- **Proper field mapping** between configuration and data source
|
|
@@ -123,10 +133,14 @@ Follow the complete custom data source implementation guide in the "Custom Overr
|
|
|
123
133
|
Create your custom data source with the hook pattern:
|
|
124
134
|
|
|
125
135
|
In `components/customDataSources/myCustomDataSource.ts`:
|
|
136
|
+
|
|
126
137
|
```typescript
|
|
127
|
-
import {
|
|
138
|
+
import { SchemaConfig } from '@wix/auto-patterns/types';
|
|
128
139
|
|
|
129
|
-
export const myCustomDataSource = async (
|
|
140
|
+
export const myCustomDataSource = async (
|
|
141
|
+
collectionId: string,
|
|
142
|
+
context: any,
|
|
143
|
+
): Promise<SchemaConfig> => {
|
|
130
144
|
return {
|
|
131
145
|
id: 'myCustomCollection',
|
|
132
146
|
fields: {
|
|
@@ -145,7 +159,9 @@ export const myCustomDataSource = async (collectionId: string, context: any) =>
|
|
|
145
159
|
// {}
|
|
146
160
|
// );
|
|
147
161
|
// Remember to map the response fields from snake_case to camelCase
|
|
148
|
-
throw new Error(
|
|
162
|
+
throw new Error(
|
|
163
|
+
'get action not implemented - user must implement this method',
|
|
164
|
+
);
|
|
149
165
|
},
|
|
150
166
|
create: async (newEntity: any) => {
|
|
151
167
|
// TODO: Implement using your FQDN client library
|
|
@@ -157,7 +173,9 @@ export const myCustomDataSource = async (collectionId: string, context: any) =>
|
|
|
157
173
|
// {}
|
|
158
174
|
// );
|
|
159
175
|
// Remember to map the request fields from camelCase to snake_case
|
|
160
|
-
throw new Error(
|
|
176
|
+
throw new Error(
|
|
177
|
+
'create action not implemented - user must implement this method',
|
|
178
|
+
);
|
|
161
179
|
},
|
|
162
180
|
update: async (updatedEntity: any) => {
|
|
163
181
|
// TODO: Implement using your FQDN client library
|
|
@@ -169,7 +187,9 @@ export const myCustomDataSource = async (collectionId: string, context: any) =>
|
|
|
169
187
|
// {}
|
|
170
188
|
// );
|
|
171
189
|
// Remember to map the request fields from camelCase to snake_case
|
|
172
|
-
throw new Error(
|
|
190
|
+
throw new Error(
|
|
191
|
+
'update action not implemented - user must implement this method',
|
|
192
|
+
);
|
|
173
193
|
},
|
|
174
194
|
delete: async (entityId: string) => {
|
|
175
195
|
// TODO: Implement using your FQDN client library
|
|
@@ -180,7 +200,9 @@ export const myCustomDataSource = async (collectionId: string, context: any) =>
|
|
|
180
200
|
// },
|
|
181
201
|
// {}
|
|
182
202
|
// );
|
|
183
|
-
throw new Error(
|
|
203
|
+
throw new Error(
|
|
204
|
+
'delete action not implemented - user must implement this method',
|
|
205
|
+
);
|
|
184
206
|
},
|
|
185
207
|
bulkDelete: async (entityIds: string[]) => {
|
|
186
208
|
// TODO: Implement using your FQDN client library
|
|
@@ -191,7 +213,9 @@ export const myCustomDataSource = async (collectionId: string, context: any) =>
|
|
|
191
213
|
// },
|
|
192
214
|
// {}
|
|
193
215
|
// );
|
|
194
|
-
throw new Error(
|
|
216
|
+
throw new Error(
|
|
217
|
+
'bulkDelete action not implemented - user must implement this method',
|
|
218
|
+
);
|
|
195
219
|
},
|
|
196
220
|
find: async (query: Query, options?: any) => {
|
|
197
221
|
// TODO: Implement using your FQDN client library
|
|
@@ -207,21 +231,47 @@ export const myCustomDataSource = async (collectionId: string, context: any) =>
|
|
|
207
231
|
// Detect by presence of query.cursor (cursor mode) vs. query.offset/page (offset mode):
|
|
208
232
|
// - Cursor mode: return { items, cursor, total? }
|
|
209
233
|
// - Offset mode (default): return { items, hasNext, total? }
|
|
210
|
-
throw new Error(
|
|
211
|
-
|
|
212
|
-
|
|
234
|
+
throw new Error(
|
|
235
|
+
'find action not implemented - user must implement this method',
|
|
236
|
+
);
|
|
237
|
+
},
|
|
238
|
+
move: async (
|
|
239
|
+
id,
|
|
240
|
+
{
|
|
241
|
+
moveAfterId,
|
|
242
|
+
}: {
|
|
243
|
+
moveAfterId: string | null | undefined;
|
|
244
|
+
},
|
|
245
|
+
) => {
|
|
246
|
+
// TODO: Implement using your FQDN client library if it supports ordering/moving entities
|
|
247
|
+
// Example:
|
|
248
|
+
// return errorHandler.withErrorHandler(
|
|
249
|
+
// async () => {
|
|
250
|
+
// return yourFQDNClient.mvoeEntity(id, {
|
|
251
|
+
// moveAfterCategoryId: moveAfterId,
|
|
252
|
+
// position: moveAfterId ? 'AFTER' : 'FIRST',
|
|
253
|
+
// })
|
|
254
|
+
// },
|
|
255
|
+
// {}
|
|
256
|
+
// );
|
|
257
|
+
throw new Error(
|
|
258
|
+
'move action not implemented - user must implement this method',
|
|
259
|
+
);
|
|
260
|
+
},
|
|
261
|
+
},
|
|
213
262
|
};
|
|
214
263
|
};
|
|
215
264
|
```
|
|
216
265
|
|
|
217
266
|
In `components/customDataSources/index.tsx`:
|
|
267
|
+
|
|
218
268
|
```typescript
|
|
219
269
|
import { myCustomDataSource } from './myCustomDataSource';
|
|
220
270
|
|
|
221
271
|
export const useCustomDataSources = () => {
|
|
222
272
|
// You can access React context and other hooks here
|
|
223
273
|
return {
|
|
224
|
-
myCustomDataSource
|
|
274
|
+
myCustomDataSource,
|
|
225
275
|
};
|
|
226
276
|
};
|
|
227
277
|
```
|
|
@@ -236,6 +286,7 @@ Configure your AppConfig to use the custom data source by setting:
|
|
|
236
286
|
- `custom.id` matching your custom data source identifier from Step 4
|
|
237
287
|
|
|
238
288
|
**Key FQDN-specific configuration:**
|
|
289
|
+
|
|
239
290
|
```json
|
|
240
291
|
"collection": {
|
|
241
292
|
"collectionId": "yourCustomCollectionId",
|
|
@@ -275,9 +326,11 @@ If the user specifically requests custom actions for your FQDN-based data source
|
|
|
275
326
|
## FQDN-Specific Implementation Checklist
|
|
276
327
|
|
|
277
328
|
### Core Requirements (Always Required)
|
|
329
|
+
|
|
278
330
|
✅ **Schema Extraction**: Used fqdn_schema tool to understand entity structure
|
|
279
331
|
✅ **Client Library**: Used client_lib tool to identify correct SDK package
|
|
280
332
|
✅ **Field Mapping**: Mapped FQDN field types to AutoPatterns field types
|
|
333
|
+
✅ **Entity Info Mapping**: Mapped FQDN entity info to SchemaConfig properties (containsPii, extensible)
|
|
281
334
|
✅ **🛑 MANDATORY: Empty Query Operators**: Set `supportedQueryOperators: []` for ALL fields to avoid TypeScript errors
|
|
282
335
|
✅ **⚠️ CRITICAL: Field ID Conversion**: Converted individual field segments from snake_case to camelCase while preserving field path structure in SchemaConfig and AppConfig
|
|
283
336
|
✅ **AppConfig Update**: Set `entityTypeSource: "custom"` and provided custom.id
|
|
@@ -286,6 +339,7 @@ If the user specifically requests custom actions for your FQDN-based data source
|
|
|
286
339
|
✅ **⚠️ CRITICAL: Unimplemented Actions**: All schema actions contain helpful comments but throw unimplemented exceptions - **user must implement these actions themselves**
|
|
287
340
|
|
|
288
341
|
### Optional Enhancements (Only When Explicitly Requested)
|
|
342
|
+
|
|
289
343
|
⚠️ **Custom Actions**: Only implement if user specifically requests custom actions beyond standard CRUD
|
|
290
344
|
⚠️ **Column Overrides**: Only implement if user requests custom column rendering
|
|
291
345
|
⚠️ **Custom Components**: Only implement if user requests custom entity page components
|
|
@@ -311,6 +365,7 @@ For general implementation pitfalls, refer to the "Custom Overrides" section.
|
|
|
311
365
|
**⚠️ IMPORTANT**: The following customizations should only be implemented when the user explicitly requests them. A basic dashboard page does not require these advanced features.
|
|
312
366
|
|
|
313
367
|
For advanced customization options when specifically requested, refer to these sections:
|
|
368
|
+
|
|
314
369
|
- "Collection Page Actions" - For custom collection-level actions
|
|
315
370
|
- "Action Cell" - For custom row-level actions
|
|
316
371
|
- "Bulk Actions" - For custom bulk operations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matvey Oklander",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.28.4",
|
|
39
|
-
"@wix/data": "^1.0.
|
|
39
|
+
"@wix/data": "^1.0.294",
|
|
40
40
|
"@wix/wix-ui-icons-common": "^3.87.3",
|
|
41
41
|
"lodash": "^4.17.21"
|
|
42
42
|
},
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"@types/node": "^16.18.126",
|
|
52
52
|
"@types/node-fetch": "^2.6.13",
|
|
53
53
|
"@types/react": "^16.14.66",
|
|
54
|
-
"@wix/crm": "^1.0.
|
|
54
|
+
"@wix/crm": "^1.0.1045",
|
|
55
55
|
"@wix/design-system": "^1.214.3",
|
|
56
|
-
"@wix/eslint-config-yoshi": "^6.
|
|
56
|
+
"@wix/eslint-config-yoshi": "^6.159.0",
|
|
57
57
|
"@wix/fe-essentials-standalone": "^1.1380.0",
|
|
58
|
-
"@wix/jest-yoshi-preset": "^6.
|
|
58
|
+
"@wix/jest-yoshi-preset": "^6.159.0",
|
|
59
59
|
"@wix/patterns": "^1.279.0",
|
|
60
|
-
"@wix/sdk": "^1.
|
|
61
|
-
"@wix/sdk-testkit": ">=0.1.
|
|
62
|
-
"@wix/wix-data-items-common": "^1.0.
|
|
63
|
-
"@wix/wix-data-items-sdk": "^1.0.
|
|
64
|
-
"@wix/yoshi-flow-library": "^6.
|
|
65
|
-
"@wix/yoshi-style-dependencies": "^6.
|
|
60
|
+
"@wix/sdk": "^1.17.1",
|
|
61
|
+
"@wix/sdk-testkit": ">=0.1.9",
|
|
62
|
+
"@wix/wix-data-items-common": "^1.0.242",
|
|
63
|
+
"@wix/wix-data-items-sdk": "^1.0.436",
|
|
64
|
+
"@wix/yoshi-flow-library": "^6.159.0",
|
|
65
|
+
"@wix/yoshi-style-dependencies": "^6.159.0",
|
|
66
66
|
"chance": "^1.1.13",
|
|
67
67
|
"date-fns": "^2.30.0",
|
|
68
68
|
"express": "^4.21.2",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"wallaby": {
|
|
126
126
|
"autoDetect": true
|
|
127
127
|
},
|
|
128
|
-
"falconPackageHash": "
|
|
128
|
+
"falconPackageHash": "a96a6c3b1913c3c54f13a26af4926aa889f4274aa141f24fc483dcd0"
|
|
129
129
|
}
|