cabloy 5.1.247 → 5.1.249
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/.vscode/settings.json +1 -2
- package/CHANGELOG.md +27 -0
- package/package.json +1 -7
- package/repo-docs/frontend/column-configuration-guide.md +3 -1
- package/repo-docs/frontend/table-guide.md +27 -2
- package/repo-e2e/specs/a-commerce.spec.ts +32 -0
- package/repo-e2e/specs/cabloy-basic.spec.ts +1236 -0
- package/vona/package.original.json +1 -7
- package/vona/pnpm-lock.yaml +139 -1011
- package/zova/package.original.json +0 -6
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/package.json +2 -2
- package/zova/packages-utils/zova-vite/package.json +1 -1
- package/zova/packages-utils/zova-vite/src/teleports.ts +7 -0
- package/zova/packages-utils/zova-vite/test/teleports.test.ts +114 -0
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +6 -958
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx +267 -0
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/render.header.tsx +42 -10
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/render.locale.tsx +10 -5
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/render.tabs.tsx +97 -11
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/render.theme.tsx +19 -10
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/render.user.tsx +11 -0
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/style.ts +128 -0
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/config/locale/en-us.ts +6 -0
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/config/locale/zh-cn.ts +6 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/.metadata/component/layoutWeb.ts +10 -8
- package/zova/src/suite/a-home/modules/home-layoutweb/src/.metadata/index.ts +25 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +83 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.header.tsx +37 -8
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.locale.tsx +25 -8
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.tabs.tsx +3 -1
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.theme.tsx +10 -5
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.user.tsx +64 -21
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/style.ts +42 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/config/locale/en-us.ts +4 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/config/locale/zh-cn.ts +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/rowOperations/controller.tsx +2 -1
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/controller.tsx +6 -10
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/render.tsx +9 -6
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssr.ts +17 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssrProfile.ts +15 -0
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/types/ssr.ts +1 -0
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/test/lib/ssrProfile.test.ts +23 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +11 -11
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
- package/vona/.textlintrc.json +0 -19
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.249
|
package/.vscode/settings.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.249
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Update existing functionality.
|
|
8
|
+
|
|
9
|
+
### Improvements
|
|
10
|
+
|
|
11
|
+
- Remove textlint.
|
|
12
|
+
|
|
13
|
+
## 5.1.248
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- Add tab closing.
|
|
18
|
+
- Add mobile navbar support.
|
|
19
|
+
- Add update functionality.
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
- Fix teleport behavior.
|
|
24
|
+
|
|
25
|
+
### Improvements
|
|
26
|
+
|
|
27
|
+
- Support two-level tabs on mobile.
|
|
28
|
+
- Improve compact hints.
|
|
29
|
+
|
|
3
30
|
## 5.1.247
|
|
4
31
|
|
|
5
32
|
### Improvements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cabloy",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.249",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A Node.js fullstack framework",
|
|
6
6
|
"keywords": [
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"docs:dev": "pnpm --dir repo-docs docs:dev",
|
|
70
70
|
"docs:build": "pnpm --dir repo-docs docs:build",
|
|
71
71
|
"docs:preview": "pnpm --dir repo-docs docs:preview",
|
|
72
|
-
"docs:fix": "textlint --fix ./repo-docs/**/*.md",
|
|
73
72
|
"release-patch": "node scripts/release.ts patch",
|
|
74
73
|
"release-minor": "node scripts/release.ts minor",
|
|
75
74
|
"release-major": "node scripts/release.ts major",
|
|
@@ -101,11 +100,6 @@
|
|
|
101
100
|
"oxfmt": "^0.74.0",
|
|
102
101
|
"oxlint": "^1.89.0",
|
|
103
102
|
"tar": "^7.5.22",
|
|
104
|
-
"textlint": "^15.7.0",
|
|
105
|
-
"textlint-rule-en-no-mixed-period": "^3.0.2",
|
|
106
|
-
"textlint-rule-ja-no-mixed-period": "^3.0.2",
|
|
107
|
-
"textlint-rule-ja-space-between-half-and-full-width": "^2.4.2",
|
|
108
|
-
"textlint-rule-period-in-list-item": "^1.0.1",
|
|
109
103
|
"typescript": "^5.9.3"
|
|
110
104
|
},
|
|
111
105
|
"engines": {
|
|
@@ -29,7 +29,9 @@ A schema can pin a column to the `left`, `center`, or `right` region. The Move U
|
|
|
29
29
|
|
|
30
30
|
A user cannot change a column's fixed region through Column Configuration. The row-selection column is also a runtime-generated column and is never saved in a personal layout.
|
|
31
31
|
|
|
32
|
-
In Cabloy Basic
|
|
32
|
+
In Cabloy Basic and Cabloy Start, the default UI adapters temporarily disable actual column pinning and present row operations through a compact popover when the available container is narrower than `768px`. This does **not** change a column's schema-defined region or the reorder boundaries in Column Configuration. Saved widths, visibility, and order remain canonical; widening the container restores them. Responsive transitions do not save or reset the profile. Set `compactBreakpoint` to another numeric threshold or `false` to disable automatic presentation: on Basic's `ZTable`, or on Start's `start-page:blockTable` / `start-details:blockTable`. See [Basic narrow-container behavior](/frontend/table-guide#narrow-container-behavior-in-cabloy-basic) and [Start narrow-container behavior](/frontend/table-guide#narrow-container-behavior-in-cabloy-start).
|
|
33
|
+
|
|
34
|
+
When the resolved SSR cache policy emits `public, max-age=${expires}`, SSR omits `compactHint` entirely, and server HTML and initial hydration default to neutral desktop presentation for every User-Agent. The cache policy stays unchanged, with no `Vary: User-Agent` or CDN variation requirement. Outside that public-cache branch—including session/no-store responses, development, and `responseCache: false`—SSR provisionally selects compact presentation from a request User-Agent mobile hint and transfers the same value for initial hydration. In both branches, measured container width takes over afterward; this never updates the personal layout. The hint does not measure the container or apply a custom numeric breakpoint on the server. `compactBreakpoint: false` disables both provisional and measured compact presentation. See the table-guide sections above for closed-menu and browser-capability behavior.
|
|
33
35
|
|
|
34
36
|
## User workflow
|
|
35
37
|
|
|
@@ -182,9 +182,34 @@ import { ZTable } from 'zova-module-basic-table';
|
|
|
182
182
|
<ZTable data={this.students} schema={this.schemaRow} compactBreakpoint={false} />;
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
The default resource-page and details-table blocks inherit this behavior.
|
|
185
|
+
The default resource-page and details-table blocks inherit this behavior. When the resolved SSR cache policy emits `public, max-age=${expires}`, SSR omits `compactHint` entirely for every User-Agent. Server HTML and the hydration-time initial render both default to neutral desktop presentation. This keeps the compact presentation independent of User-Agent for public cached HTML, preserves the cache policy, and adds no `Vary: User-Agent` or CDN variation requirement.
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
For responses outside that public-cache branch—including session/no-store responses, development, and `responseCache: false`—SSR uses a request User-Agent mobile hint for provisional compact presentation and transfers the same value for initial hydration. The hint reduces typical mobile first-paint layout changes; it cannot measure the container or predict tablet mode or every browser accurately.
|
|
188
|
+
|
|
189
|
+
In both branches, measured container width becomes authoritative after mounting and initial hydration: a mobile request in a wide container uses desktop presentation, while any request in a narrow container becomes compact. `compactBreakpoint: false` disables both provisional and measured compact presentation; a custom numeric threshold applies to actual measurements, not to the provisional mobile classification. SPA startup uses the existing mounted measurement without a server hint.
|
|
190
|
+
|
|
191
|
+
The popover uses the browser's native Popover API to escape table overflow clipping. Compact action panels stay hidden before hydration, including in unsupported browsers; post-hydration capability detection restores the existing inline actions when the API is unavailable rather than leaving an unusable trigger.
|
|
192
|
+
|
|
193
|
+
## Narrow-container behavior in Cabloy Start
|
|
194
|
+
|
|
195
|
+
Cabloy Start's `start-page:blockTable` and `start-details:blockTable` provide the same temporary compact policy through their Vuetify adapters. Each block observes its available container width after mounting and initial SSR hydration. The Vuetify table wrapper continues to own horizontal scrolling; the observer does not measure the table's intrinsic content width.
|
|
196
|
+
|
|
197
|
+
Below the default `768px` threshold:
|
|
198
|
+
|
|
199
|
+
- columns, including row selection, temporarily stop being pinned;
|
|
200
|
+
- columns rendered by `start-table:actionOperationsRow` or `start-details:actionOperationsRow` use an approximately `80px` Operations column and a **More actions** popover;
|
|
201
|
+
- widening the container restores schema-defined pinning and schema or personal-layout widths, without saving or resetting the layout.
|
|
202
|
+
|
|
203
|
+
Configure the threshold on the owning Start block, rather than on the shared `a-table` engine:
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
ZovaRender.block('start-page:blockTable', { compactBreakpoint: 640 });
|
|
207
|
+
ZovaRender.block('start-details:blockTable', { compactBreakpoint: false });
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
The popover retains the original Start action renderers and their permission checks, confirmations, loading, duplicate-click protection, errors, and retries. Clicking an enabled action closes the popover **before** the original action runs; keyboard activation follows the same path. Closing does not unmount a pending action. Escape closes the popover and restores trigger focus; scrolling outside it or resizing closes it as well.
|
|
211
|
+
|
|
212
|
+
Start uses Vuetify `VMenu` for connected positioning, outside-click dismissal, keyboard handling, and scroll dismissal, not Basic's native Popover API or DaisyUI presentation. Its eager menu host retains the same action subtree through closure and desktop/compact transitions. SSR and initial hydration use the same cache-policy-dependent provisional presentation described above. In compact presentation, the retained actions are staged hidden until the menu host exists, then move into that host without a visible inline-action flash or remount; desktop actions stay inline. Post-hydration container measurement takes over, and native Popover API support is not required. The shared table engine consumes `compact` and `columnSizing`; it does not itself supply automatic measurement or an edition's row-action UI.
|
|
188
213
|
|
|
189
214
|
## Step 3: Let schema metadata drive the default columns
|
|
190
215
|
|
|
@@ -1740,6 +1740,38 @@ test(
|
|
|
1740
1740
|
'data-zova-hydrated',
|
|
1741
1741
|
'commerceAdmin',
|
|
1742
1742
|
);
|
|
1743
|
+
// Commerce Admin consumes the same task shell: its current create task
|
|
1744
|
+
// remains reachable through the bounded, keyboard-operable compact list.
|
|
1745
|
+
const tabItems = adminPage.getByTestId('tab-items');
|
|
1746
|
+
const allTabs = adminPage.getByTestId('tab-items-more');
|
|
1747
|
+
const tabList = adminPage.getByTestId('tab-items-list');
|
|
1748
|
+
await expect(tabItems).toHaveAttribute('data-compact', 'false');
|
|
1749
|
+
await expect(tabItems.getByRole('tab')).toHaveCount(1);
|
|
1750
|
+
await expect(tabItems.getByRole('tab')).toHaveAttribute('aria-selected', 'true');
|
|
1751
|
+
await adminPage.setViewportSize({ width: 320, height: 900 });
|
|
1752
|
+
await expect(tabItems).toHaveAttribute('data-compact', 'true');
|
|
1753
|
+
await expect(tabItems.getByRole('tab')).toHaveCount(1);
|
|
1754
|
+
await expect(tabItems.getByRole('tab')).toHaveAttribute('aria-selected', 'true');
|
|
1755
|
+
await expect(allTabs).toHaveAccessibleName('All tabs');
|
|
1756
|
+
await allTabs.focus();
|
|
1757
|
+
await allTabs.press('Enter');
|
|
1758
|
+
await expect(tabList).toBeVisible();
|
|
1759
|
+
await expect(tabList).toHaveAttribute('role', 'group');
|
|
1760
|
+
await expect(tabList).toHaveAccessibleName('All tabs');
|
|
1761
|
+
await expect(tabList.locator('.tab-items-select')).toHaveCount(1);
|
|
1762
|
+
await expect(tabList.locator('.tab-items-select')).toHaveAttribute('aria-current', 'page');
|
|
1763
|
+
await expect(tabList.locator('.tab-items-select')).toBeFocused();
|
|
1764
|
+
const popupBox = (await tabList.boundingBox())!;
|
|
1765
|
+
expect(popupBox.x).toBeGreaterThanOrEqual(-1);
|
|
1766
|
+
expect(popupBox.x + popupBox.width).toBeLessThanOrEqual(321);
|
|
1767
|
+
expect(popupBox.y).toBeGreaterThanOrEqual(-1);
|
|
1768
|
+
expect(popupBox.y + popupBox.height).toBeLessThanOrEqual(901);
|
|
1769
|
+
await adminPage.keyboard.press('Escape');
|
|
1770
|
+
await expect(tabList).toBeHidden();
|
|
1771
|
+
await expect(allTabs).toBeFocused();
|
|
1772
|
+
await adminPage.setViewportSize({ width: 1440, height: 900 });
|
|
1773
|
+
await expect(tabItems).toHaveAttribute('data-compact', 'false');
|
|
1774
|
+
|
|
1743
1775
|
for (const groupName of [
|
|
1744
1776
|
'Basic Information',
|
|
1745
1777
|
'Discount Policy',
|