cabloy 5.1.120 → 5.1.122
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/.cabloy-version +1 -1
- package/CHANGELOG.md +17 -0
- package/cabloy-docs/frontend/form-layout-guide.md +51 -20
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +31 -4
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +7 -5
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +5 -2
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +2 -2
- package/e2e/specs/cabloy-basic/basic.spec.ts +9 -0
- package/package.json +1 -1
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudBasic/boilerplate/src/dto/{{resourceName}}SelectResItem.tsx_ +27 -2
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/boilerplate/src/dto/{{resourceName}}SelectResItem.tsx_ +27 -2
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/pnpm-lock.yaml +39 -39
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/categorySelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productSelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/skuSelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-member/src/dto/addressSelectResItem.tsx +24 -1
- package/vona/src/suite/a-commerce/modules/commerce-promotion/src/dto/couponTemplateSelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/orderSelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/stockAuditSelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/stockBalanceSelectResItem.tsx +23 -1
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +6 -1
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/shipmentRefundRace.test.ts +377 -24
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordSelectResItem.tsx +24 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +4 -1
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +10 -3
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +3 -3
- package/zova/src/suite/cabloy-basic/modules/basic-form/src/component/blockFormLayout/controller.tsx +25 -4
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/form/controller.tsx +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/lib/formLayout.ts +21 -4
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/types/formLayout.ts +13 -4
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/resource/formLayout.ts +14 -4
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.122
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.122
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Update functionality and dependencies.
|
|
8
|
+
|
|
9
|
+
## 5.1.121
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- Support embedded layout blocks in forms.
|
|
14
|
+
|
|
15
|
+
### Improvements
|
|
16
|
+
|
|
17
|
+
- Update the student selection result item component.
|
|
18
|
+
- Add commerce test coverage for shipment refund race conditions.
|
|
19
|
+
|
|
3
20
|
## 5.1.120
|
|
4
21
|
|
|
5
22
|
### Features
|
|
@@ -13,8 +13,8 @@ Several APIs contain the word “layout,” but they own different concerns:
|
|
|
13
13
|
|
|
14
14
|
| Surface | Owns | Does not own |
|
|
15
15
|
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
16
|
-
| `formLayout` | Field placement, Grid/flow sections, groups, responsive spans, and tabs
|
|
17
|
-
| `basic-form:blockFormLayout` | Resolving and rendering a structural `formLayout` tree in Cabloy Basic
|
|
16
|
+
| `formLayout` | Field and renderable-block placement, Grid/flow sections, groups, responsive spans, and tabs | Field renderer selection, validation rules, submit policy |
|
|
17
|
+
| `basic-form:blockFormLayout` | Resolving and rendering a structural `formLayout` tree in Cabloy Basic, including embedded renderable blocks | Page-entry or filter action semantics |
|
|
18
18
|
| `layout`, `formFieldLayout`, `FormFieldLayout` | One field's label and wrapper presentation: inline/block mode, icons, borders, header/footer, class, and style | Sections, Grid/flow placement, groups, or tabs |
|
|
19
19
|
|
|
20
20
|
For example, `formFieldLayout: { inline: false }` makes each field use a block-style wrapper. It does not create a grid. Pair it with `basic-form:blockFormLayout` when the fields also need structural placement.
|
|
@@ -63,7 +63,7 @@ Form Layout changes neither readonly behavior nor actions. Create, update, and v
|
|
|
63
63
|
|
|
64
64
|
### Filter form composition
|
|
65
65
|
|
|
66
|
-
A filter uses the filter block as its host
|
|
66
|
+
A filter uses the filter block as its host. Place Search/Reset inside the structural layout when they should participate in the same Grid or flow as filter fields:
|
|
67
67
|
|
|
68
68
|
```tsx
|
|
69
69
|
ZovaRender.block('basic-page:blockFilter', {
|
|
@@ -72,16 +72,36 @@ ZovaRender.block('basic-page:blockFilter', {
|
|
|
72
72
|
ZovaRender.block('basic-form:blockFormLayout', {
|
|
73
73
|
formLayout: {
|
|
74
74
|
children: [
|
|
75
|
-
|
|
75
|
+
{
|
|
76
|
+
type: 'section',
|
|
77
|
+
layout: 'flow',
|
|
78
|
+
children: [
|
|
79
|
+
/* filter fields */
|
|
80
|
+
{
|
|
81
|
+
type: 'block',
|
|
82
|
+
block: ZovaRender.block('basic-page:blockFilterActions'),
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
76
86
|
],
|
|
77
87
|
},
|
|
78
88
|
}),
|
|
79
|
-
ZovaRender.block('basic-page:blockFilterActions'),
|
|
80
89
|
],
|
|
81
90
|
});
|
|
82
91
|
```
|
|
83
92
|
|
|
84
|
-
|
|
93
|
+
The renderable block node controls only structural placement. `basic-page:blockFilterActions` still owns Search/Reset and obtains the filter command surface from the inherited form scope, preserving normalization and page-query handoff. A nonempty `blocks` list replaces `ZForm`'s automatic body and footer.
|
|
94
|
+
|
|
95
|
+
The legacy sibling composition remains supported when actions do not need to share a structural section:
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
blocks: [
|
|
99
|
+
ZovaRender.block('basic-form:blockFormLayout', { formLayout }),
|
|
100
|
+
ZovaRender.block('basic-page:blockFilterActions'),
|
|
101
|
+
];
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Use either the embedded layout block or the legacy sibling action block, never both; otherwise Search and Reset are rendered twice. Maintained Cabloy Basic list DTOs and current Basic CRUD output prefer the embedded flow, while a bare filter remains the minimal/default form when structural placement is unnecessary. See [Table + Resource CRUD Cookbook](/frontend/table-resource-crud-cookbook#use-blocks-for-a-structural-filter-layout) for the filter ownership model.
|
|
85
105
|
|
|
86
106
|
## Layout node grammar
|
|
87
107
|
|
|
@@ -90,28 +110,35 @@ A nonempty `blocks` list replaces `ZForm`'s automatic body and footer. Therefore
|
|
|
90
110
|
```text
|
|
91
111
|
formLayout
|
|
92
112
|
├─ field
|
|
113
|
+
├─ block
|
|
93
114
|
├─ section
|
|
94
|
-
│
|
|
115
|
+
│ ├─ field
|
|
116
|
+
│ └─ block
|
|
95
117
|
├─ group
|
|
96
118
|
│ ├─ field
|
|
119
|
+
│ ├─ block
|
|
97
120
|
│ ├─ group
|
|
98
121
|
│ └─ section
|
|
99
122
|
└─ tabs
|
|
100
123
|
└─ tab
|
|
101
124
|
├─ field
|
|
125
|
+
├─ block
|
|
102
126
|
├─ group
|
|
103
127
|
└─ section
|
|
104
128
|
```
|
|
105
129
|
|
|
106
|
-
| Node | Key properties | Allowed children
|
|
107
|
-
| --------- | ---------------------------------------------------------- |
|
|
108
|
-
| `field` | required `name`; optional `span` | none
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
130
|
+
| Node | Key properties | Allowed children | Use it for |
|
|
131
|
+
| --------- | ---------------------------------------------------------- | -------------------------------- | ------------------------------------------- |
|
|
132
|
+
| `field` | required `name`; optional `span` | none | Place one resolved schema field |
|
|
133
|
+
| `block` | required `block`; optional `span` | none | Place an existing renderable resource block |
|
|
134
|
+
| `section` | optional `id`, `title`, `description`, `layout`, `columns` | fields and blocks | A Grid or wrapping flow layout |
|
|
135
|
+
| `group` | optional `id`, `title`, `description` | fields, blocks, groups, sections | A semantic, bordered fieldset-style group |
|
|
136
|
+
| `tabs` | optional `id` | tabs only | One tab container |
|
|
137
|
+
| `tab` | optional `id`; required `title` | fields, blocks, groups, sections | One tab panel |
|
|
138
|
+
|
|
139
|
+
A section is a layout boundary. It uses the Grid strategy by default; set `layout: 'flow'` for compact, left-packed fields and blocks that wrap at their intrinsic widths. Use a group when the fields need a semantic or visual boundary, and place a section inside that group when it also needs Grid columns or flow placement. There is no separate `row` node: Grid and flow placement create rows automatically.
|
|
113
140
|
|
|
114
|
-
A
|
|
141
|
+
A `block` node is not a schema field and does not add a request, response, validation, or query value. It wraps an existing `ZovaRender.block(...)` descriptor and renders it with the current form JSX/CEL context. This lets a filter action block participate in a flow section without transferring filter-action behavior into Form Layout.
|
|
115
142
|
|
|
116
143
|
Nested tabs are not part of the current contract. Likewise, a section cannot contain a group or another section.
|
|
117
144
|
|
|
@@ -286,26 +313,30 @@ ZovaRender.block('basic-page:blockFilter', {
|
|
|
286
313
|
{ type: 'field', name: 'name' },
|
|
287
314
|
{ type: 'field', name: 'level' },
|
|
288
315
|
{ type: 'field', name: 'createdAt' },
|
|
316
|
+
{
|
|
317
|
+
type: 'block',
|
|
318
|
+
block: ZovaRender.block('basic-page:blockFilterActions'),
|
|
319
|
+
},
|
|
289
320
|
],
|
|
290
321
|
},
|
|
291
322
|
],
|
|
292
323
|
},
|
|
293
324
|
}),
|
|
294
|
-
ZovaRender.block('basic-page:blockFilterActions'),
|
|
295
325
|
],
|
|
296
326
|
});
|
|
297
327
|
```
|
|
298
328
|
|
|
299
|
-
Here `formFieldLayout.inline: true` controls how each field wrapper is presented. The flow section keeps
|
|
329
|
+
Here `formFieldLayout.inline: true` controls how each field wrapper is presented. The flow section keeps fields and the action block left-packed and wraps them together when necessary. `basic-page:blockFilterActions` remains required because the custom blocks replace automatic filter body/footer content, but it is now placed through the structural layout rather than as a sibling block.
|
|
300
330
|
|
|
301
331
|
## Authoring checklist
|
|
302
332
|
|
|
303
333
|
1. Start with DTO or resource metadata; do not hand-patch generated `.zova-rest` artifacts.
|
|
304
334
|
2. Use `formLayout` when the requirement is field placement, Grid or flow structure, groups, or tabs.
|
|
305
335
|
3. Use `layout`, `formFieldLayout`, `options`, or provider behaviors when the requirement is one field's wrapper or renderer.
|
|
306
|
-
4. Keep entry actions in page-entry toolbar blocks
|
|
307
|
-
5.
|
|
308
|
-
6.
|
|
336
|
+
4. Keep entry actions in page-entry toolbar blocks. Keep filter action semantics in `basic-page:blockFilterActions`; place that block inside Form Layout when the actions must share structural Grid or flow placement with fields.
|
|
337
|
+
5. For maintained Cabloy Basic list filters, prefer one inline flow section that explicitly lists every real filter-schema field in schema order and ends with one embedded `basic-page:blockFilterActions` block. Do not add virtual request fields, alter filter transforms, or combine it with a sibling action block.
|
|
338
|
+
6. Review field names against the scene-specific schema. Unlisted visible fields are appended; unknown and duplicate declarations are silently pruned from the rendered plan.
|
|
339
|
+
7. Use the smallest layout that communicates the form structure; reserve tabs for genuinely separate field groups.
|
|
309
340
|
|
|
310
341
|
## Source-reading and verification path
|
|
311
342
|
|
|
@@ -107,7 +107,29 @@ A standard resource list page is usually declared through backend-owned block me
|
|
|
107
107
|
```tsx
|
|
108
108
|
ZovaRender.block('basic-page:blockPage', {
|
|
109
109
|
blocks: [
|
|
110
|
-
ZovaRender.block('basic-page:blockFilter'
|
|
110
|
+
ZovaRender.block('basic-page:blockFilter', {
|
|
111
|
+
formFieldLayout: { inline: true },
|
|
112
|
+
blocks: [
|
|
113
|
+
ZovaRender.block('basic-form:blockFormLayout', {
|
|
114
|
+
formLayout: {
|
|
115
|
+
children: [
|
|
116
|
+
{
|
|
117
|
+
type: 'section',
|
|
118
|
+
layout: 'flow',
|
|
119
|
+
children: [
|
|
120
|
+
{ type: 'field', name: 'name' },
|
|
121
|
+
{ type: 'field', name: 'createdAt' },
|
|
122
|
+
{
|
|
123
|
+
type: 'block',
|
|
124
|
+
block: ZovaRender.block('basic-page:blockFilterActions'),
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
}),
|
|
131
|
+
],
|
|
132
|
+
}),
|
|
111
133
|
ZovaRender.block('basic-page:blockToolbarBulk', {
|
|
112
134
|
actions: [ZovaRender.tableActionBulk('basic-table:actionCreate')],
|
|
113
135
|
}),
|
|
@@ -117,6 +139,8 @@ ZovaRender.block('basic-page:blockPage', {
|
|
|
117
139
|
});
|
|
118
140
|
```
|
|
119
141
|
|
|
142
|
+
The example follows the current Cabloy Basic CRUD convention: enumerate the real `SelectReq` fields in schema order and embed Search/Reset once so they share the filter flow. A bare `basic-page:blockFilter` remains supported as a minimal/default form, but it delegates placement to the automatic renderer.
|
|
143
|
+
|
|
120
144
|
That declaration is important because it shows the intended authoring direction clearly:
|
|
121
145
|
|
|
122
146
|
- backend or shared contract metadata chooses the block composition
|
|
@@ -180,7 +204,7 @@ A practical rule is:
|
|
|
180
204
|
|
|
181
205
|
### Use blocks for a structural filter layout
|
|
182
206
|
|
|
183
|
-
A bare `basic-page:blockFilter` keeps the default schema field rendering and adds Search/Reset controls automatically. For a structured filter
|
|
207
|
+
A bare `basic-page:blockFilter` keeps the default schema field rendering and adds Search/Reset controls automatically. For a structured filter whose actions should share the flow with filter fields, embed the existing action block in Form Layout:
|
|
184
208
|
|
|
185
209
|
```tsx
|
|
186
210
|
ZovaRender.block('basic-page:blockFilter', {
|
|
@@ -196,17 +220,20 @@ ZovaRender.block('basic-page:blockFilter', {
|
|
|
196
220
|
{ type: 'field', name: 'name' },
|
|
197
221
|
{ type: 'field', name: 'level' },
|
|
198
222
|
{ type: 'field', name: 'createdAt' },
|
|
223
|
+
{
|
|
224
|
+
type: 'block',
|
|
225
|
+
block: ZovaRender.block('basic-page:blockFilterActions'),
|
|
226
|
+
},
|
|
199
227
|
],
|
|
200
228
|
},
|
|
201
229
|
],
|
|
202
230
|
},
|
|
203
231
|
}),
|
|
204
|
-
ZovaRender.block('basic-page:blockFilterActions'),
|
|
205
232
|
],
|
|
206
233
|
});
|
|
207
234
|
```
|
|
208
235
|
|
|
209
|
-
`basic-form:blockFormLayout`
|
|
236
|
+
`basic-form:blockFormLayout` owns structural placement only. `basic-page:blockFilterActions` still owns Search/Reset behavior and invokes the filter command surface supplied through the inherited form scope, preserving filter normalization and page-query behavior. A nonempty `blocks` list replaces the automatic body and footer; include the action block explicitly to make the filter operable. The older sibling action-block composition remains supported, but do not combine it with an embedded action block.
|
|
210
237
|
|
|
211
238
|
`ZForm.inline` is no longer a form API. Use `formFieldLayout.inline` for field-level compact layout, or use blocks plus `basic-form:blockFormLayout` for structural layout. The flow section above keeps compact filters left-packed and wrapping; use the default Grid section when fields need responsive columns and spans. Read [Form Layout Guide](/frontend/form-layout-guide) for the full node grammar, section layout rules, resolver behavior, tabs, and entry-form composition.
|
|
212
239
|
|
|
@@ -223,7 +223,7 @@ Use this path when you are asking questions like:
|
|
|
223
223
|
Use this path when you are asking questions like:
|
|
224
224
|
|
|
225
225
|
- where does `formLayout` come from in a resource DTO?
|
|
226
|
-
- how are fields, sections, groups, and tabs normalized before rendering?
|
|
226
|
+
- how are fields, embedded blocks, sections, groups, and tabs normalized before rendering?
|
|
227
227
|
- why are omitted visible fields appended or duplicate fields removed?
|
|
228
228
|
- where does Cabloy Basic render responsive grids and tab error badges?
|
|
229
229
|
|
|
@@ -240,15 +240,17 @@ Use this path when you are asking questions like:
|
|
|
240
240
|
3. `zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/resource/formLayout.ts`
|
|
241
241
|
4. `zova/src/suite-vendor/a-zova/modules/a-form/src/lib/formLayout.ts`
|
|
242
242
|
5. `zova/src/suite/cabloy-basic/modules/basic-form/src/component/blockFormLayout/controller.tsx`
|
|
243
|
-
6. `
|
|
243
|
+
6. `zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockFilterActions/controller.tsx`
|
|
244
|
+
7. `vona/src/suite/a-training/modules/training-student/test/student.test.ts`
|
|
244
245
|
|
|
245
246
|
### What each file clarifies
|
|
246
247
|
|
|
247
248
|
- the Student DTOs show the entry and filter block composition that supplies layout metadata
|
|
248
249
|
- the OpenAPI type contract defines the legal node grammar and responsive values
|
|
249
|
-
- the resolver reconciles metadata with visible schema fields, generated IDs, and
|
|
250
|
-
- the Basic block controller renders sections, groups, tabs,
|
|
251
|
-
-
|
|
250
|
+
- the resolver reconciles field metadata with visible schema fields, generated IDs, diagnostics, and preserved embedded blocks
|
|
251
|
+
- the Basic block controller renders sections, groups, tabs, field spans, and embedded blocks while delegating fields to `$$form.renderField(...)`
|
|
252
|
+
- `blockFilterActions` shows how a block rendered inside Form Layout reuses the inherited form CEL scope to invoke `$$filter`
|
|
253
|
+
- the Student test verifies emitted metadata nesting, columns, spans, embedded action blocks, and optional IDs; it is not a browser rendering test
|
|
252
254
|
|
|
253
255
|
## 8. Resource-driven CRUD page integration
|
|
254
256
|
|
|
@@ -414,11 +414,14 @@ That means automatic schema-driven rendering is not happening magically in the w
|
|
|
414
414
|
|
|
415
415
|
When `ZForm` receives a nonempty block list, the render bean delegates body rendering to those blocks instead of iterating schema fields directly. For Cabloy Basic structural forms, `basic-form:blockFormLayout` resolves `formLayout` against the form's current schema properties and calls `$$form.renderField(...)` for each surviving layout field.
|
|
416
416
|
|
|
417
|
+
Form Layout also supports a leaf `block` node. It wraps an existing resource block descriptor and the Basic renderer invokes it with the inherited `IJsxRenderContextForm`, including the same JSX runtime and CEL scope. The node has no schema property or field value; for example, a filter can place `basic-page:blockFilterActions` inside a flow section while that action block continues to read `$$filter` from the filter-owned form scope.
|
|
418
|
+
|
|
417
419
|
This keeps ownership separate:
|
|
418
420
|
|
|
419
421
|
- the form controller owns schema properties, field state, validation, and field rendering
|
|
420
|
-
- the shared form-layout resolver normalizes field placement metadata
|
|
421
|
-
- the Basic layout block renders sections, groups, grids, and
|
|
422
|
+
- the shared form-layout resolver normalizes field placement metadata while preserving non-field block nodes
|
|
423
|
+
- the Basic layout block renders sections, groups, grids, tabs, and embedded blocks
|
|
424
|
+
- embedded blocks own their behavior; Form Layout owns only their placement
|
|
422
425
|
- field-layout behaviors still own each field wrapper and its visible validation message
|
|
423
426
|
|
|
424
427
|
Read [Form Layout Guide](/frontend/form-layout-guide) for the DTO authoring grammar, resolver behavior, and Basic-specific responsive/tab behavior.
|
|
@@ -152,12 +152,12 @@ A practical reading takeaway is:
|
|
|
152
152
|
|
|
153
153
|
Table actions do not live in isolation. They appear inside a resource-page block composition.
|
|
154
154
|
|
|
155
|
-
Representative shape:
|
|
155
|
+
Representative abbreviated page-chain shape (the filter’s internal Form Layout is omitted here because this page focuses on table actions):
|
|
156
156
|
|
|
157
157
|
```tsx
|
|
158
158
|
ZovaRender.block('basic-page:blockPage', {
|
|
159
159
|
blocks: [
|
|
160
|
-
|
|
160
|
+
/* basic-page:blockFilter with its resource-specific filter layout */
|
|
161
161
|
ZovaRender.block('basic-page:blockToolbarBulk', {
|
|
162
162
|
actions: [ZovaRender.tableActionBulk('basic-table:actionCreate')],
|
|
163
163
|
}),
|
|
@@ -209,6 +209,8 @@ test(
|
|
|
209
209
|
await expect(name).toBeVisible();
|
|
210
210
|
await expect(level).toBeVisible();
|
|
211
211
|
await expect(dates).toHaveCount(2);
|
|
212
|
+
await expect(search).toHaveCount(1);
|
|
213
|
+
await expect(reset).toHaveCount(1);
|
|
212
214
|
await expect(search).toBeVisible();
|
|
213
215
|
await expect(reset).toBeVisible();
|
|
214
216
|
|
|
@@ -223,6 +225,13 @@ test(
|
|
|
223
225
|
for (const geometry of wideGeometry) {
|
|
224
226
|
expect(geometry.field.right).toBeLessThanOrEqual(geometry.container.right + 1);
|
|
225
227
|
}
|
|
228
|
+
const actionFlowMatchesFieldFlow = await search.evaluate(element => {
|
|
229
|
+
const actionFlow = element.parentElement?.parentElement?.parentElement;
|
|
230
|
+
const fieldFlow = element.closest('section')?.querySelector('label')
|
|
231
|
+
?.parentElement?.parentElement;
|
|
232
|
+
return actionFlow === fieldFlow;
|
|
233
|
+
});
|
|
234
|
+
expect(actionFlowMatchesFieldFlow).toBeTruthy();
|
|
226
235
|
|
|
227
236
|
await page.setViewportSize({ width: 700, height: 900 });
|
|
228
237
|
const drawer = page.locator('.drawer').first();
|
package/package.json
CHANGED
|
@@ -14,7 +14,29 @@ export interface IDtoOptions<%=argv.resourceNameCapitalize%>SelectResItem extend
|
|
|
14
14
|
blocks: [
|
|
15
15
|
ZovaRender.block('basic-page:blockPage', {
|
|
16
16
|
blocks: [
|
|
17
|
-
ZovaRender.block('basic-page:blockFilter'
|
|
17
|
+
ZovaRender.block('basic-page:blockFilter', {
|
|
18
|
+
formFieldLayout: { inline: true },
|
|
19
|
+
blocks: [
|
|
20
|
+
ZovaRender.block('basic-form:blockFormLayout', {
|
|
21
|
+
formLayout: {
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
type: 'section',
|
|
25
|
+
layout: 'flow',
|
|
26
|
+
children: [
|
|
27
|
+
{ type: 'field', name: 'name' },
|
|
28
|
+
{ type: 'field', name: 'createdAt' },
|
|
29
|
+
{
|
|
30
|
+
type: 'block',
|
|
31
|
+
block: ZovaRender.block('basic-page:blockFilterActions'),
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
}),
|
|
18
40
|
ZovaRender.block('basic-page:blockToolbarBulk', {
|
|
19
41
|
actions: [ZovaRender.tableActionBulk('basic-table:actionCreate')],
|
|
20
42
|
}),
|
|
@@ -29,7 +51,10 @@ export class Dto<%=argv.resourceNameCapitalize%>SelectResItem extends $Dto.get((
|
|
|
29
51
|
v.title($locale('Operations')),
|
|
30
52
|
ZovaRender.order(1, 'max'),
|
|
31
53
|
ZovaRender.cell('basic-table:actionOperationsRow', {
|
|
32
|
-
actions: [
|
|
54
|
+
actions: [
|
|
55
|
+
ZovaRender.tableActionRow('basic-table:actionUpdate'),
|
|
56
|
+
ZovaRender.tableActionRow('basic-table:actionDelete'),
|
|
57
|
+
],
|
|
33
58
|
}),
|
|
34
59
|
)
|
|
35
60
|
_operationsRow?: unknown;
|
|
@@ -14,7 +14,29 @@ export interface IDtoOptions<%=argv.resourceNameCapitalize%>SelectResItem extend
|
|
|
14
14
|
blocks: [
|
|
15
15
|
ZovaRender.block('start-page:blockPage', {
|
|
16
16
|
blocks: [
|
|
17
|
-
ZovaRender.block('start-page:blockFilter'
|
|
17
|
+
ZovaRender.block('start-page:blockFilter', {
|
|
18
|
+
formFieldLayout: { inline: true },
|
|
19
|
+
blocks: [
|
|
20
|
+
ZovaRender.block('start-form:blockFormLayout', {
|
|
21
|
+
formLayout: {
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
type: 'section',
|
|
25
|
+
layout: 'flow',
|
|
26
|
+
children: [
|
|
27
|
+
{ type: 'field', name: 'name' },
|
|
28
|
+
{ type: 'field', name: 'createdAt' },
|
|
29
|
+
{
|
|
30
|
+
type: 'block',
|
|
31
|
+
block: ZovaRender.block('start-page:blockFilterActions'),
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
}),
|
|
18
40
|
ZovaRender.block('start-page:blockToolbarBulk', {
|
|
19
41
|
actions: [ZovaRender.tableActionBulk('start-table:actionCreate')],
|
|
20
42
|
}),
|
|
@@ -28,7 +50,10 @@ export class Dto<%=argv.resourceNameCapitalize%>SelectResItem extends $Dto.get((
|
|
|
28
50
|
v.title($locale('Operations')),
|
|
29
51
|
ZovaRender.order(1, 'max'),
|
|
30
52
|
ZovaRender.cell('start-table:actionOperationsRow', {
|
|
31
|
-
actions: [
|
|
53
|
+
actions: [
|
|
54
|
+
ZovaRender.tableActionRow('start-table:actionUpdate'),
|
|
55
|
+
ZovaRender.tableActionRow('start-table:actionDelete'),
|
|
56
|
+
],
|
|
32
57
|
}),
|
|
33
58
|
)
|
|
34
59
|
_operationsRow?: unknown;
|