wcz-layout 10.2.1 → 11.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.
Files changed (122) hide show
  1. package/dist/ChatLayout-B0MBrI-Y.mjs +2394 -0
  2. package/dist/ChatLayout-B0MBrI-Y.mjs.map +1 -0
  3. package/dist/{Employee-C8xIlBxY.d.mts → ExtractFile-BQUXpuBS.d.mts} +44 -3
  4. package/dist/FileMeta-B5VU-eCi.d.mts +55 -0
  5. package/dist/FileMeta-BexXC_45.mjs +35 -0
  6. package/dist/FileMeta-BexXC_45.mjs.map +1 -0
  7. package/dist/QueryClientParam-BG9Q_9XU.d.mts +6 -0
  8. package/dist/Translate-Ad784Dps.d.mts +24 -0
  9. package/dist/{Approval-D1TfISUL.mjs → Translate-C43AmXYW.mjs} +44 -36
  10. package/dist/Translate-C43AmXYW.mjs.map +1 -0
  11. package/dist/User-CvLutatT.d.mts +10 -0
  12. package/dist/ai.d.mts +31 -4
  13. package/dist/ai.mjs +154 -10
  14. package/dist/ai.mjs.map +1 -1
  15. package/dist/auth.d.mts +7 -14
  16. package/dist/auth.mjs +15 -38
  17. package/dist/auth.mjs.map +1 -1
  18. package/dist/authMiddleware-ANa9Tlmp.mjs +45 -0
  19. package/dist/authMiddleware-ANa9Tlmp.mjs.map +1 -0
  20. package/dist/{ChatLayout-BmLySLXy.d.mts → components-2HKj8GpC.d.mts} +219 -255
  21. package/dist/components.d.mts +2 -126
  22. package/dist/components.mjs +876 -916
  23. package/dist/components.mjs.map +1 -1
  24. package/dist/data/client.d.mts +313 -55
  25. package/dist/data/client.mjs +10 -5
  26. package/dist/data/client.mjs.map +1 -1
  27. package/dist/data/server.d.mts +19 -3
  28. package/dist/data/server.mjs +3 -5
  29. package/dist/data/server.mjs.map +1 -1
  30. package/dist/env-C4WLVJMm.mjs +32 -0
  31. package/dist/env-C4WLVJMm.mjs.map +1 -0
  32. package/dist/file-DBqTibcr.mjs +176 -0
  33. package/dist/file-DBqTibcr.mjs.map +1 -0
  34. package/dist/file-hecCQszp.mjs +114 -0
  35. package/dist/file-hecCQszp.mjs.map +1 -0
  36. package/dist/generatedChart-k7NEdi5Z.mjs.map +1 -1
  37. package/dist/hooks.d.mts +13 -93
  38. package/dist/hooks.mjs +353 -1059
  39. package/dist/hooks.mjs.map +1 -1
  40. package/dist/i18n-ZRiIIdpb.mjs +563 -0
  41. package/dist/i18n-ZRiIIdpb.mjs.map +1 -0
  42. package/dist/index.d.mts +3 -35
  43. package/dist/index.mjs +630 -680
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/layout-DeTB6Ai1.mjs +224 -0
  46. package/dist/layout-DeTB6Ai1.mjs.map +1 -0
  47. package/dist/middleware.d.mts +1 -1
  48. package/dist/middleware.mjs +2 -46
  49. package/dist/middleware.mjs.map +1 -1
  50. package/dist/models.d.mts +35 -43
  51. package/dist/models.mjs +4 -6
  52. package/dist/models.mjs.map +1 -1
  53. package/dist/oidc--D2ox365.mjs +97 -0
  54. package/dist/oidc--D2ox365.mjs.map +1 -0
  55. package/dist/peoplesoft-DhwB8jrM.d.mts +204 -0
  56. package/dist/tokens-C4djIAhl.mjs +97 -0
  57. package/dist/tokens-C4djIAhl.mjs.map +1 -0
  58. package/dist/useDialogs-QER-2rVG.mjs +297 -0
  59. package/dist/useDialogs-QER-2rVG.mjs.map +1 -0
  60. package/dist/user-DQx1BanQ.mjs +120 -0
  61. package/dist/user-DQx1BanQ.mjs.map +1 -0
  62. package/dist/{utils-CNYCSgip.d.mts → utils-BnyAEKW7.d.mts} +7 -9
  63. package/dist/utils-H4BskGF8.mjs +132 -0
  64. package/dist/utils-H4BskGF8.mjs.map +1 -0
  65. package/dist/utils.d.mts +21 -4
  66. package/dist/utils.mjs +5 -4
  67. package/dist/vite.mjs +98 -32
  68. package/dist/vite.mjs.map +1 -1
  69. package/package.json +23 -29
  70. package/skills/ai/SKILL.md +105 -75
  71. package/skills/general/SKILL.md +15 -8
  72. package/skills/general/references/auth.md +15 -17
  73. package/skills/general/references/languages.md +56 -0
  74. package/skills/migrations/versions/migrate-v10-to-v11.md +98 -22
  75. package/skills/migrations/versions/migrate-v9-to-v10.md +22 -22
  76. package/skills/services/SKILL.md +41 -7
  77. package/skills/services/docs/email.md +2 -2
  78. package/skills/services/docs/file.md +100 -85
  79. package/skills/services/docs/layout.md +129 -0
  80. package/skills/start/steps/02-project-name-setup.md +1 -1
  81. package/skills/start/steps/03-apm-setup.md +8 -1
  82. package/skills/start/steps/06-entra-setup.md +1 -1
  83. package/skills/start/steps/08-generate-favicon.md +1 -1
  84. package/skills/table/SKILL.md +18 -5
  85. package/src/lib/locales/cs.json +120 -0
  86. package/src/lib/locales/en.json +119 -0
  87. package/src/lib/locales/uk.json +121 -0
  88. package/src/lib/locales/zh-TW.json +118 -0
  89. package/dist/Approval-D1TfISUL.mjs.map +0 -1
  90. package/dist/ChatLayout-BpRj5rlH.mjs +0 -1639
  91. package/dist/ChatLayout-BpRj5rlH.mjs.map +0 -1
  92. package/dist/DialogsContext-D23fJjYR.mjs +0 -6
  93. package/dist/DialogsContext-D23fJjYR.mjs.map +0 -1
  94. package/dist/Email-Dz5k0UWE.d.mts +0 -15
  95. package/dist/FileMeta-B39e2FLC.d.mts +0 -17
  96. package/dist/FileMeta-CPBWI_jA.mjs +0 -18
  97. package/dist/FileMeta-CPBWI_jA.mjs.map +0 -1
  98. package/dist/QueryClientParam-CTV1vj76.d.mts +0 -8
  99. package/dist/RouterListItemButton-CF-8w-08.mjs +0 -62
  100. package/dist/RouterListItemButton-CF-8w-08.mjs.map +0 -1
  101. package/dist/User-aJksXItw.d.mts +0 -12
  102. package/dist/approval-B3ZQn9aH.mjs +0 -83
  103. package/dist/approval-B3ZQn9aH.mjs.map +0 -1
  104. package/dist/createApi-BXjkj4fM.mjs +0 -25
  105. package/dist/createApi-BXjkj4fM.mjs.map +0 -1
  106. package/dist/env-BwFl7nWc.mjs +0 -48
  107. package/dist/env-BwFl7nWc.mjs.map +0 -1
  108. package/dist/file-BQ-Bu2g8.mjs +0 -150
  109. package/dist/file-BQ-Bu2g8.mjs.map +0 -1
  110. package/dist/file-DZ0KYhoB.mjs +0 -151
  111. package/dist/file-DZ0KYhoB.mjs.map +0 -1
  112. package/dist/peoplesoft-C-zPdRVj.d.mts +0 -161
  113. package/dist/peoplesoft-CvwdApCK.mjs +0 -125
  114. package/dist/peoplesoft-CvwdApCK.mjs.map +0 -1
  115. package/dist/providers-BfFg_3eo.mjs +0 -56
  116. package/dist/providers-BfFg_3eo.mjs.map +0 -1
  117. package/dist/session-B_jK90RC.mjs +0 -23
  118. package/dist/session-B_jK90RC.mjs.map +0 -1
  119. package/dist/tokens-CkWpu7Qp.mjs +0 -150
  120. package/dist/tokens-CkWpu7Qp.mjs.map +0 -1
  121. package/dist/utils-DJx-7b4M.mjs +0 -244
  122. package/dist/utils-DJx-7b4M.mjs.map +0 -1
@@ -0,0 +1,129 @@
1
+ # layout
2
+
3
+ Features served by the layout app, currently AI (`POST /api/ai/*`). The app needs no AI packages or AI
4
+ gateway env of its own for them.
5
+
6
+ ## Notes
7
+
8
+ - **Setup:** add `LAYOUT_BASE_URL: z.url()` to `server` in `src/env.ts` with the layout
9
+ app's URL in `.env`, and `layout: "api://wistron.com/devportal/access_as_user"` to the app's
10
+ scopes. `AI_BASE_URL` is a different thing: the AI gateway `chatAdapter` calls (see the `ai` skill).
11
+ - **Translate instead of prompting:** text a user typed (a name, a question, a description) gets
12
+ its other languages from `translate`; never write a translation prompt in the app.
13
+ - **Detected language:** `detected` is the language the text is written in, even one outside
14
+ `languages`. When it is one of them, its field is the text exactly as typed (trimmed), never
15
+ reworded; compare it with the field the user typed into to repair a wrong language toggle.
16
+ - One call per text, not streamed. Translate several texts with one call each, in parallel.
17
+ - **Extract instead of prompting:** data read from a document or photo (an invoice, a label, a
18
+ form) comes from `extractFile`; never send a file to a model from the app. Upload the file with
19
+ the file service first, then pass its `fileId`.
20
+ - **File access:** the layout app downloads the file on behalf of the signed-in user (OBO), so it
21
+ reads only files that user can open. A call without a user (a background job on the server
22
+ `extractFile`) reads the file with the layout app's own token instead.
23
+ - **Fields:** each field is a name (letters, digits, `_`), a `type` (`string` by default,
24
+ `number`, `boolean` or `date`) and a `description` that says what to read and in what form,
25
+ e.g. "ISO 4217 code of the invoiced currency". Every field is `null` when the file does not
26
+ show it; a `date` is `YYYY-MM-DD`. Values are copied as printed: conversions and calculations
27
+ (currency, totals, thresholds) stay in the app's code.
28
+ - **Instructions:** optional context the model compares against, e.g. the approved items, with a
29
+ field such as `note` that describes what to report.
30
+ - PDFs and images (PNG, JPEG, WebP, GIF) up to 20 MB; other types answer 415.
31
+
32
+ ## Client
33
+
34
+ `import { ... } from "wcz-layout/data/client";`
35
+
36
+ - Mutation:
37
+ `translateMutationOptions()` → `mutate(TranslateSchema)` → `Translation` // the text in every language of `languages`, and the language it is written in; signed-in users only
38
+ - Mutation:
39
+ `extractFileMutationOptions()` → `mutate(ExtractFileSchema)` → `FileExtraction` // the value of each field read from the file; signed-in users only
40
+
41
+ ## Server
42
+
43
+ `import { ... } from "wcz-layout/data/server";`
44
+
45
+ - `translate({ data: TranslateSchema })` → `Translation` // same, inside another server function
46
+ - `extractFile({ data: ExtractFileSchema })` → `FileExtraction` // same, inside another server function or a background job
47
+
48
+ ## Schemas/Models
49
+
50
+ `import { TranslateSchema, ExtractFileSchema, type Translation, type FileExtraction } from "wcz-layout/models";`
51
+
52
+ ```ts
53
+ const TranslateSchema = z.object({
54
+ text: z.string().trim().min(1).max(4000),
55
+ languages: z // BCP 47 tags: en, cs, zh-TW
56
+ .array(z.string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/))
57
+ .min(1)
58
+ .max(20),
59
+ });
60
+
61
+ type Translation = { detected: string } & Record<string, string>; // { detected: "cs", en, cs, uk }
62
+
63
+ const ExtractFileSchema = z.object({
64
+ fileId: z.uuid(),
65
+ fields: z.record(
66
+ z.string().regex(/^[A-Za-z][A-Za-z0-9_]{0,63}$/), // 1 to 50 fields
67
+ z.object({
68
+ type: z.enum(["string", "number", "boolean", "date"]).default("string"),
69
+ description: z.string().trim().min(1).max(1000),
70
+ }),
71
+ ),
72
+ instructions: z.string().trim().max(4000).optional(),
73
+ });
74
+
75
+ type FileExtraction = Record<string, string | number | boolean | null>; // keyed by field name
76
+ ```
77
+
78
+ ## Examples
79
+
80
+ ```tsx
81
+ // client
82
+ import { useMutation } from "@tanstack/react-query";
83
+ import { translateMutationOptions } from "wcz-layout/data/client";
84
+
85
+ const { mutateAsync: translate, isPending } = useMutation(translateMutationOptions());
86
+
87
+ const { detected, ...name } = await translate({
88
+ text: form.getFieldValue("name.en"),
89
+ languages: ["en", "cs", "uk", "zh-TW"],
90
+ });
91
+ form.setFieldValue("name", name); // { en, cs, uk, "zh-TW" }
92
+
93
+ // server (inside another server function)
94
+ import { translate } from "wcz-layout/data/server";
95
+
96
+ const translations = await Promise.all(
97
+ tasks.map((task) => translate({ data: { text: task.text, languages: ["cs", "en", "uk"] } })),
98
+ );
99
+ ```
100
+
101
+ ```ts
102
+ // server: read an uploaded invoice, then convert and compare in code
103
+ import { extractFile } from "wcz-layout/data/server";
104
+
105
+ const invoice = await extractFile({
106
+ data: {
107
+ appName: "cid",
108
+ fileId,
109
+ fields: {
110
+ invoice: {
111
+ description:
112
+ "Invoice number exactly as printed; the primary document number on a debit note or RMA",
113
+ },
114
+ total: {
115
+ type: "number",
116
+ description: "Grand total exactly as printed, in the document's own currency",
117
+ },
118
+ currency: { description: "ISO 4217 code of the invoiced currency (TWD for NTD)" },
119
+ note: {
120
+ description:
121
+ "Discrepancies against the approved items: unexpected part numbers, quantities, supplier",
122
+ },
123
+ },
124
+ instructions: `Approved items:\n${items.map((item) => `- ${item.pn}: qty ${item.quantity}`).join("\n")}`,
125
+ },
126
+ });
127
+ const totalNtd =
128
+ invoice.total === null ? null : await toNtd(Number(invoice.total), String(invoice.currency));
129
+ ```
@@ -16,4 +16,4 @@ Using the full name, search-and-replace across the **entire workspace**:
16
16
  | `project-name` | kebab-case version (e.g. `user-input`) |
17
17
  | `Project Name` | Title Case version (e.g. `User Input`) |
18
18
 
19
- If a short name was provided, set the `short_name` property in `public/manifest.json` to it.
19
+ If a short name was provided, set the `short_name` property in `public/manifest.webmanifest` to it.
@@ -20,7 +20,14 @@ Register the app in **Application Portfolio Management** (https://apm.wistron.co
20
20
 
21
21
  - `Create` → dismiss the notice with `OK`. Tab 1 opens in edit mode. Every other section opens with its pencil and saves with its ✓. After a save, check for the `Update successful` toast.
22
22
  - Dropdown option refs change every time a dropdown opens. Open it, find the option, then click.
23
- - Person fields: type the full name, click the suggestion, and verify the row (job number, name, email).
23
+ - Dropdowns: click the select component itself, not its placeholder text (a hidden search input intercepts the click). Options often render in a body-level popup missing from the snapshot diff; find them with a visible-option selector (e.g. `.ant-select-item-option:visible`) filtered by text. Inspect the DOM once to learn the class names, then reuse them.
24
+ - Refs inside a section go stale when an earlier field re-renders it (e.g. picking a value rebuilds the rows below). Re-read the refs from the latest diff, or use label-based locators.
25
+ - Prefer one Playwright script per section: locate fields by label (form item containing the label text), fill them all, then return the values read back. This is faster and far cheaper than one tool call per field. Avoid full page reads; the sidebar alone is tens of KB.
26
+ - Type-ahead searches sometimes return nothing on the first try. Clear the field, retype more slowly, and wait up to ~10 s for the options before retrying (max 3 attempts).
27
+ - Person fields: type the job number or full name, click the suggestion, and verify the row (job number, name, email). For several people, loop: add row → type → wait for the suggestion → click → read back.
28
+ - Do not navigate back to fix an earlier section after moving on; verify the summary/view mode instead, and if values were lost, re-enter them rather than trusting the earlier save.
29
+ - A Playwright `check()` on a styled radio/checkbox can report failure while the click worked. Verify by the UI effect (a dependent field appearing) rather than `isChecked()`.
30
+ - An auth error toast (e.g. `Unauthorized`, `socket hang up`) on save is usually transient: retry once, then confirm that no duplicate record was created.
24
31
  - A ✓ that stays disabled means a required field is unset. After a failed save, change any dropdown and change it back to re-enable the ✓.
25
32
 
26
33
  ## Tab 1 — Application Information
@@ -74,7 +74,7 @@ SESSION_SECRET=<generated-64-char-hex>
74
74
 
75
75
  3. **Certificates & secrets:** open the **Client secrets** tab → **+ New client secret**. Leave **Description** empty and set **Expires** to `730 days (24 months)` — always these values, never ask the user — then click **Add**. **CRITICAL — one chance only:** the new row's **Value** column holds the secret and is shown _only_ immediately after creation; once you leave or reload the blade it is masked forever and the app must get a brand-new secret. Read that **Value** from the row's textbox in the page snapshot, and write it into `ENTRA_CLIENT_SECRET` in `.env.local` as your very next action, before any other click or navigation. The neighbouring **Secret ID** column is a plain GUID and is _not_ the secret — writing it there is a silent, unrecoverable mistake. The cell renders truncated with `…`, so take the textbox's full value from the snapshot, and never print it in chat or a commit.
76
76
  4. **Token configuration:** click **Add groups claim**. In the panel tick **Security groups** only, then expand each of **ID**, **Access**, and **SAML** in "Customize token properties by type" and switch the radio from `Group ID` to `sAMAccountName`. Click **Add**. The list should then show a `groups` claim with token type `ID, Access, SAML`.
77
- 5. **Expose an API:** next to **Application ID URI** click **Add** (or **Edit** if one exists). The portal prefills `api://<client-id>` — replace it with `api://wistron.com/<app-name>` (for `wh-fg-preparation`: `api://wistron.com/wh-fg-preparation`) and **Save**. Then **+ Add a scope** named `access_as_user`, set **Who can consent?** to `Admins and users`, and fill only the two required fields — **Admin consent display name** and **Admin consent description**. Leave the user consent fields empty (optional) and **State** on `Enabled`, then click **Add scope**. Do not navigate away or report progress as complete until the saved `api://wistron.com/<app-name>` URI and enabled `access_as_user` scope are both visible in the portal. Then set the `api` key in `src/lib/auth/scopes.ts` to the plain string `"api://wistron.com/<app-name>/access_as_user"` (`Scope` is `string | Partial<Record<ProviderId, string>>` — an array fails `satisfies Scopes`), matching the scope exactly as the portal lists it; leave the other keys untouched.
77
+ 5. **Expose an API:** next to **Application ID URI** click **Add** (or **Edit** if one exists). The portal prefills `api://<client-id>` — replace it with `api://wistron.com/<app-name>` (for `wh-fg-preparation`: `api://wistron.com/wh-fg-preparation`) and **Save**. Then **+ Add a scope** named `access_as_user`, set **Who can consent?** to `Admins and users`, and fill only the two required fields — **Admin consent display name** and **Admin consent description**. Leave the user consent fields empty (optional) and **State** on `Enabled`, then click **Add scope**. Do not navigate away or report progress as complete until the saved `api://wistron.com/<app-name>` URI and enabled `access_as_user` scope are both visible in the portal. Then set the `api` key in `src/lib/auth/scopes.ts` to the plain string `"api://wistron.com/<app-name>/access_as_user"` (every `Scopes` value is one string — an array fails `satisfies Scopes`), matching the scope exactly as the portal lists it; leave the other keys untouched.
78
78
  6. **Owners:** first read the current table once. Add only missing people from this fixed list: Radim Staworowski, Martin Husar, Dalibor Homola, Patrik Lorenc, Tien Thanh Tran, Sebastian Ondruska. In the picker, search each missing full name, wait for the exact name and Wistron UPN match, select it, then replace the search text with the next name without closing the picker. Submit the batch once and verify all six names in the refreshed table.
79
79
  7. **Manifest:** the page opens the **Microsoft Graph App Manifest (New)** JSON in a Monaco editor. Do not retype the JSON — click into the editor, press `Ctrl+H`, and run Replace All twice: `"acceptMappedClaims": null` → `"acceptMappedClaims": true`, then `"requestedAccessTokenVersion": null` → `"requestedAccessTokenVersion": 2` (both live in the `api` object, one match each). Verify both edited lines, then click **Save**.
80
80
 
@@ -3,6 +3,6 @@
3
3
  1. Ask the user for the absolute filesystem path to their app logo. Recommend a square PNG, JPG, BMP, or WEBP image at least 512 x 512 pixels, but continue with a smaller image when the user provides one.
4
4
  2. Verify that the supplied path exists and is an image file.
5
5
  3. Check whether `favicons` is installed globally. If it is missing, run `npm install --global favicons`. Do not add it to this project's dependencies.
6
- 4. Set `NODE_PATH` to the result of `npm root --global` and use a temporary CommonJS Node script to call `favicons(sourcePath, options)`. Enable Android and favicon output, enable Apple output with `background: "transparent"`, and disable Apple startup, Windows, and Yandex assets. Write the returned `images` and `files` entries to `/public`.
6
+ 4. Set `NODE_PATH` to the result of `npm root --global` and use a temporary CommonJS Node script to call `favicons(sourcePath, options)`. Enable Android and favicon output, enable Apple output with `background: "transparent"`, and disable Apple startup, Windows, and Yandex assets. Write only the returned `images` entries to `/public` (skip `files` so `public/manifest.webmanifest` is not overwritten).
7
7
  5. Keep only the existing favicon assets that the template owns: `android-chrome-192x192.png`, `android-chrome-512x512.png`, `apple-touch-icon.png`, `favicon-16x16.png`, `favicon-32x32.png`, and `favicon.ico`. Delete any additional generated assets and the temporary script. Leave unrelated public assets unchanged.
8
8
  6. Verify that all six favicon assets exist, then report completion to the user.
@@ -26,7 +26,7 @@ setup: `LayoutTable` (`wcz-layout/components`) does both.
26
26
  link or another interactive element.
27
27
  - Selection and actions display columns: `size: 50`, `enableResizing: false`,
28
28
  `enableCellSelection: false`; each extra visible action button adds about 40 px.
29
- - `meta` keys: `label`, `align`, `variant`, `options`, `flex`. A column whose `header` is not
29
+ - `meta` keys: `label`, `align`, `variant`, `options`, `flex`, `edit`. A column whose `header` is not
30
30
  a plain string needs `meta.label` (header menu, column selector and filter picker read it).
31
31
  - `meta.variant` picks the filter: `"text"` (default), `"number"`, `"boolean"`, `"date"`,
32
32
  `"select"`, `"multi-select"`. Select variants build their options from the faceted unique
@@ -42,14 +42,27 @@ setup: `LayoutTable` (`wcz-layout/components`) does both.
42
42
  delete, `when("settled")`, then `table.resetRowSelection()`; `catch` alerts. Icons are
43
43
  `fontSize="small"` inside a `Tooltip`.
44
44
  - `LayoutTable` props: `title`, `actions`, `showToolbar`, `loading`, `pagination`,
45
- `pageSizeOptions`, `onRowClick`, `onRowDoubleClick`, `sx`, and `disableSearch`,
45
+ `onRowClick`, `onRowDoubleClick`, `onRowUpdate`, `editSchema`, `sx`, and `disableSearch`,
46
46
  `disableColumnFilter`, `disableColumnSelector`, `disableColumnMenu`.
47
+ - Inline editing: a column opts in with `meta.edit`, a bound form field (forms):
48
+ `edit: (field) => <field.TextField />`, `<field.NumberField />`, `<field.Checkbox />`, or
49
+ `<field.Autocomplete options={statusEnum.enumValues} disableClearable />`. `LayoutTable` saves
50
+ with `onRowUpdate={(row) => handleOnUpdate(row).when("settled")}` (the optimistic update; on
51
+ failure alert and rethrow, which keeps the editor open) and validates with
52
+ `editSchema={<Entity>Schema}`. A hovered row outlines its editable cells and the hovered one
53
+ shows a pencil; the pencil, a double-click, Enter or F2 edits the cell instead of running the
54
+ row action. Enter or a click outside saves, Escape cancels. Date columns stay read-only: the
55
+ pickers hold `Dayjs`, not the row's `Date`.
56
+ - `pagination` pages 25 rows, a fixed size with no rows-per-page picker; any other `pageSize`
57
+ in state or `initialState` is reset to 25 and page 0.
47
58
  - Server-paged tables (reports, lists sorted over more rows than the browser should hold;
48
59
  deep offset collection queries load a growing prefix, see client-db): use Query/server pages.
49
60
  Load upstream Query integration/state guidance for request keys, totals and manual flags; pass
50
- `manualPagination: true`, `rowCount` and controlled `state.pagination` /
51
- `onPaginationChange` (plus the `manual*` flags for what the server sorts and filters) to
52
- `useLayoutTable`, with `pagination` on `LayoutTable`.
61
+ `manualPagination: true`, `rowCount` (the server's total) and controlled `state.pagination`
62
+ (start it at `{ pageIndex: 0, pageSize: 25 }`) / `onPaginationChange` (plus the `manual*`
63
+ flags for what the server sorts and filters) to `useLayoutTable`, with `pagination` on
64
+ `LayoutTable`. No total yet: `pageCount: -1`, and the pager shows "of more than N" with
65
+ Next enabled.
53
66
 
54
67
  ## Example
55
68
 
@@ -0,0 +1,120 @@
1
+ {
2
+ "Layout": {
3
+ "LogIn": "Přihlásit se",
4
+ "Logout": "Odhlásit se",
5
+ "Language": "Jazyk",
6
+ "Appearance": "Vzhled",
7
+ "Light": "Světlý",
8
+ "Dark": "Tmavý",
9
+ "System": "Systém",
10
+ "ThisPageCouldNotBeFound": "Tato stránka nebyla nalezena.",
11
+ "Settings": "Nastavení",
12
+ "Unauthorized": "Neoprávněný",
13
+ "TestEnvironment": "Jste v <env>TESTOVACÍM</env> prostředí",
14
+ "Dialog": {
15
+ "Confirm": "Potvrdit",
16
+ "Cancel": "Zrušit",
17
+ "Alert": "Upozornění"
18
+ },
19
+ "File": {
20
+ "AreYouSureYouWantToDelete": "Opravdu chcete smazat {{name}}?",
21
+ "DragSomeFilesHereOrClickToSelectThem": "Přetáhněte sem některé soubory nebo je vyberte kliknutím",
22
+ "Delete": "Smazat",
23
+ "Download": "Stáhnout"
24
+ },
25
+ "Table": {
26
+ "Search": "Hledat",
27
+ "ClearSearch": "Zrušit hledání",
28
+ "ColumnMenu": "Nabídka sloupce",
29
+ "Filters": "Filtry",
30
+ "AddFilter": "Přidat filtr",
31
+ "RemoveFilter": "Odebrat filtr",
32
+ "ClearFilters": "Zrušit filtry",
33
+ "And": "a",
34
+ "Or": "nebo",
35
+ "Field": "Pole",
36
+ "Operator": "Operátor",
37
+ "Value": "Hodnota",
38
+ "NoValueRequired": "Hodnota není potřeba",
39
+ "From": "Od",
40
+ "To": "Do",
41
+ "DaysFromToday": "Dnů od dneška",
42
+ "NoRows": "Žádné řádky",
43
+ "SortAscending": "Seřadit vzestupně",
44
+ "SortDescending": "Seřadit sestupně",
45
+ "ClearSort": "Zrušit řazení",
46
+ "PinStart": "Připnout na začátek",
47
+ "PinEnd": "Připnout na konec",
48
+ "Unpin": "Odepnout",
49
+ "GroupBy": "Seskupit podle sloupce",
50
+ "Ungroup": "Zrušit seskupení",
51
+ "RowActions": "Akce řádku",
52
+ "EditCell": "Upravit",
53
+ "SelectedCount_one": "{{count}} vybraný",
54
+ "SelectedCount_few": "{{count}} vybrané",
55
+ "SelectedCount_other": "{{count}} vybraných",
56
+ "MoveLeft": "Posunout doleva",
57
+ "MoveRight": "Posunout doprava",
58
+ "Columns": "Sloupce",
59
+ "ShowHideAll": "Zobrazit/skrýt vše",
60
+ "HideColumn": "Skrýt sloupec",
61
+ "Operators": {
62
+ "includesString": "obsahuje",
63
+ "notIncludesString": "neobsahuje",
64
+ "equalsString": "je",
65
+ "notEqualsString": "není",
66
+ "startsWith": "začíná na",
67
+ "endsWith": "končí na",
68
+ "isEmpty": "je prázdné",
69
+ "isNotEmpty": "není prázdné",
70
+ "equals": "je",
71
+ "notEquals": "není",
72
+ "greaterThan": "je větší než",
73
+ "greaterThanOrEqualTo": "je větší nebo rovno",
74
+ "lessThan": "je menší než",
75
+ "lessThanOrEqualTo": "je menší nebo rovno",
76
+ "inRange": "je mezi",
77
+ "isRelativeToToday": "je relativní ke dnešku",
78
+ "Date": {
79
+ "lessThan": "je před",
80
+ "lessThanOrEqualTo": "je nejpozději",
81
+ "greaterThan": "je po",
82
+ "greaterThanOrEqualTo": "je nejdříve"
83
+ }
84
+ }
85
+ },
86
+ "Chat": {
87
+ "Assistant": "Asistent",
88
+ "Message": "Zeptejte se na cokoliv",
89
+ "Send": "Odeslat",
90
+ "Stop": "Zastavit",
91
+ "NewChat": "Nový chat",
92
+ "NewChatConfirm": "Začít nový chat? Tato konverzace bude smazána.",
93
+ "Reasoning": "Přemýšlím…",
94
+ "Regenerate": "Vygenerovat znovu",
95
+ "AreYouSure": "Opravdu?",
96
+ "RenderFailed": "Tento obsah nelze zobrazit.",
97
+ "Attach": "Připojit soubory",
98
+ "DropFiles": "Přetažením sem soubory připojíte",
99
+ "FileNotRead": "Soubor „{{name}}“ nelze připojit. Připojte obrázek nebo dokument (PDF, Word, Excel, PowerPoint, CSV nebo text) do 10 MB.",
100
+ "WritingCode": "Píšu kód…",
101
+ "RunningCode": "Spouštím kód…",
102
+ "RanCode": "Kód spuštěn",
103
+ "FindingTools": "Hledám nástroje…",
104
+ "FoundTools": "Nástroje vyhledány",
105
+ "ReadingPage": "Čtu stránku…",
106
+ "ReadPage": "Stránka přečtena",
107
+ "Clicking": "Klikám…",
108
+ "Clicked": "Kliknuto na „{{target}}“",
109
+ "Filling": "Vyplňuji…",
110
+ "Filled": "Vyplněno „{{target}}“",
111
+ "PressingKey": "Mačkám klávesu…",
112
+ "PressedKey": "Stisknuta klávesa {{target}}",
113
+ "UsingTool": "Používám nástroj {{name}}…",
114
+ "UsedTool": "Použit nástroj {{name}}",
115
+ "ToolStopped": "Nástroj {{name}} nedoběhl"
116
+ }
117
+ },
118
+ "Homepage": "Domovská stránka",
119
+ "GettingStarted": "Začínáme"
120
+ }
@@ -0,0 +1,119 @@
1
+ {
2
+ "Layout": {
3
+ "LogIn": "Log In",
4
+ "Logout": "Logout",
5
+ "Language": "Language",
6
+ "Appearance": "Appearance",
7
+ "Light": "Light",
8
+ "Dark": "Dark",
9
+ "System": "System",
10
+ "ThisPageCouldNotBeFound": "This page could not be found.",
11
+ "Settings": "Settings",
12
+ "Unauthorized": "Unauthorized",
13
+ "TestEnvironment": "You’re in the <env>TEST</env> environment",
14
+ "Dialog": {
15
+ "Confirm": "Confirm",
16
+ "Cancel": "Cancel",
17
+ "Alert": "Alert"
18
+ },
19
+ "File": {
20
+ "AreYouSureYouWantToDelete": "Are you sure you want to delete {{name}}?",
21
+ "DragSomeFilesHereOrClickToSelectThem": "Drag some files here or click to select them",
22
+ "Delete": "Delete",
23
+ "Download": "Download"
24
+ },
25
+ "Table": {
26
+ "Search": "Search",
27
+ "ClearSearch": "Clear search",
28
+ "ColumnMenu": "Column menu",
29
+ "Filters": "Filters",
30
+ "AddFilter": "Add filter",
31
+ "RemoveFilter": "Remove filter",
32
+ "ClearFilters": "Clear filters",
33
+ "And": "and",
34
+ "Or": "or",
35
+ "Field": "Field",
36
+ "Operator": "Operator",
37
+ "Value": "Value",
38
+ "NoValueRequired": "No value required",
39
+ "From": "From",
40
+ "To": "To",
41
+ "DaysFromToday": "Days from today",
42
+ "NoRows": "No rows",
43
+ "SortAscending": "Sort ascending",
44
+ "SortDescending": "Sort descending",
45
+ "ClearSort": "Clear sort",
46
+ "PinStart": "Pin to start",
47
+ "PinEnd": "Pin to end",
48
+ "Unpin": "Unpin",
49
+ "GroupBy": "Group by this column",
50
+ "Ungroup": "Stop grouping",
51
+ "RowActions": "Row actions",
52
+ "EditCell": "Edit",
53
+ "SelectedCount_one": "{{count}} selected",
54
+ "SelectedCount_other": "{{count}} selected",
55
+ "MoveLeft": "Move left",
56
+ "MoveRight": "Move right",
57
+ "Columns": "Columns",
58
+ "ShowHideAll": "Show/Hide all",
59
+ "HideColumn": "Hide column",
60
+ "Operators": {
61
+ "includesString": "contains",
62
+ "notIncludesString": "does not contain",
63
+ "equalsString": "is",
64
+ "notEqualsString": "is not",
65
+ "startsWith": "starts with",
66
+ "endsWith": "ends with",
67
+ "isEmpty": "is empty",
68
+ "isNotEmpty": "is not empty",
69
+ "equals": "is",
70
+ "notEquals": "is not",
71
+ "greaterThan": "is greater than",
72
+ "greaterThanOrEqualTo": "is greater than or equal to",
73
+ "lessThan": "is less than",
74
+ "lessThanOrEqualTo": "is less than or equal to",
75
+ "inRange": "is between",
76
+ "isRelativeToToday": "is relative to today",
77
+ "Date": {
78
+ "lessThan": "is before",
79
+ "lessThanOrEqualTo": "is on or before",
80
+ "greaterThan": "is after",
81
+ "greaterThanOrEqualTo": "is on or after"
82
+ }
83
+ }
84
+ },
85
+ "Chat": {
86
+ "Assistant": "Assistant",
87
+ "Message": "Ask anything",
88
+ "Send": "Send",
89
+ "Stop": "Stop",
90
+ "NewChat": "New chat",
91
+ "NewChatConfirm": "Start a new chat? This conversation will be deleted.",
92
+ "Reasoning": "Reasoning…",
93
+ "Regenerate": "Regenerate",
94
+ "AreYouSure": "Are you sure?",
95
+ "RenderFailed": "This content could not be displayed.",
96
+ "Attach": "Attach files",
97
+ "DropFiles": "Drop files to attach them",
98
+ "FileNotRead": "“{{name}}” cannot be attached. Attach an image or a document (PDF, Word, Excel, PowerPoint, CSV or text) of up to 10 MB.",
99
+ "WritingCode": "Writing code…",
100
+ "RunningCode": "Running code…",
101
+ "RanCode": "Ran code",
102
+ "FindingTools": "Looking up tools…",
103
+ "FoundTools": "Looked up tools",
104
+ "ReadingPage": "Reading the page…",
105
+ "ReadPage": "Read the page",
106
+ "Clicking": "Clicking…",
107
+ "Clicked": "Clicked “{{target}}”",
108
+ "Filling": "Filling in…",
109
+ "Filled": "Filled in “{{target}}”",
110
+ "PressingKey": "Pressing a key…",
111
+ "PressedKey": "Pressed {{target}}",
112
+ "UsingTool": "Using {{name}}…",
113
+ "UsedTool": "Used {{name}}",
114
+ "ToolStopped": "{{name}} did not finish"
115
+ }
116
+ },
117
+ "Homepage": "Homepage",
118
+ "GettingStarted": "Getting Started"
119
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "Layout": {
3
+ "LogIn": "Увійти",
4
+ "Logout": "Вийти",
5
+ "Language": "Мова",
6
+ "Appearance": "Вигляд",
7
+ "Light": "Світлий",
8
+ "Dark": "Темний",
9
+ "System": "Системний",
10
+ "ThisPageCouldNotBeFound": "Цю сторінку не знайдено.",
11
+ "Settings": "Налаштування",
12
+ "Unauthorized": "Немає доступу",
13
+ "TestEnvironment": "Ви в <env>ТЕСТОВОМУ</env> середовищі",
14
+ "Dialog": {
15
+ "Confirm": "Підтвердити",
16
+ "Cancel": "Скасувати",
17
+ "Alert": "Попередження"
18
+ },
19
+ "File": {
20
+ "AreYouSureYouWantToDelete": "Ви дійсно хочете видалити {{name}}?",
21
+ "DragSomeFilesHereOrClickToSelectThem": "Перетягніть сюди файли або натисніть, щоб вибрати їх",
22
+ "Delete": "Видалити",
23
+ "Download": "Завантажити"
24
+ },
25
+ "Table": {
26
+ "Search": "Пошук",
27
+ "ClearSearch": "Очистити пошук",
28
+ "ColumnMenu": "Меню стовпця",
29
+ "Filters": "Фільтри",
30
+ "AddFilter": "Додати фільтр",
31
+ "RemoveFilter": "Видалити фільтр",
32
+ "ClearFilters": "Очистити фільтри",
33
+ "And": "і",
34
+ "Or": "або",
35
+ "Field": "Поле",
36
+ "Operator": "Оператор",
37
+ "Value": "Значення",
38
+ "NoValueRequired": "Значення не потрібне",
39
+ "From": "Від",
40
+ "To": "До",
41
+ "DaysFromToday": "Днів від сьогодні",
42
+ "NoRows": "Немає рядків",
43
+ "SortAscending": "Сортувати за зростанням",
44
+ "SortDescending": "Сортувати за спаданням",
45
+ "ClearSort": "Скасувати сортування",
46
+ "PinStart": "Закріпити на початку",
47
+ "PinEnd": "Закріпити в кінці",
48
+ "Unpin": "Відкріпити",
49
+ "GroupBy": "Групувати за цим стовпцем",
50
+ "Ungroup": "Скасувати групування",
51
+ "RowActions": "Дії з рядком",
52
+ "EditCell": "Редагувати",
53
+ "SelectedCount_one": "Вибрано {{count}}",
54
+ "SelectedCount_few": "Вибрано {{count}}",
55
+ "SelectedCount_many": "Вибрано {{count}}",
56
+ "SelectedCount_other": "Вибрано {{count}}",
57
+ "MoveLeft": "Перемістити ліворуч",
58
+ "MoveRight": "Перемістити праворуч",
59
+ "Columns": "Стовпці",
60
+ "ShowHideAll": "Показати/сховати всі",
61
+ "HideColumn": "Сховати стовпець",
62
+ "Operators": {
63
+ "includesString": "містить",
64
+ "notIncludesString": "не містить",
65
+ "equalsString": "дорівнює",
66
+ "notEqualsString": "не дорівнює",
67
+ "startsWith": "починається з",
68
+ "endsWith": "закінчується на",
69
+ "isEmpty": "порожнє",
70
+ "isNotEmpty": "не порожнє",
71
+ "equals": "дорівнює",
72
+ "notEquals": "не дорівнює",
73
+ "greaterThan": "більше ніж",
74
+ "greaterThanOrEqualTo": "більше або дорівнює",
75
+ "lessThan": "менше ніж",
76
+ "lessThanOrEqualTo": "менше або дорівнює",
77
+ "inRange": "між",
78
+ "isRelativeToToday": "відносно сьогодні",
79
+ "Date": {
80
+ "lessThan": "раніше ніж",
81
+ "lessThanOrEqualTo": "не пізніше ніж",
82
+ "greaterThan": "пізніше ніж",
83
+ "greaterThanOrEqualTo": "не раніше ніж"
84
+ }
85
+ }
86
+ },
87
+ "Chat": {
88
+ "Assistant": "Асистент",
89
+ "Message": "Запитайте що завгодно",
90
+ "Send": "Надіслати",
91
+ "Stop": "Зупинити",
92
+ "NewChat": "Новий чат",
93
+ "NewChatConfirm": "Почати новий чат? Цю розмову буде видалено.",
94
+ "Reasoning": "Міркування…",
95
+ "Regenerate": "Згенерувати знову",
96
+ "AreYouSure": "Ви впевнені?",
97
+ "RenderFailed": "Цей вміст не вдалося показати.",
98
+ "Attach": "Прикріпити файли",
99
+ "DropFiles": "Перетягніть файли, щоб прикріпити їх",
100
+ "FileNotRead": "Файл «{{name}}» не можна прикріпити. Прикріпіть зображення або документ (PDF, Word, Excel, PowerPoint, CSV або текст) розміром до 10 МБ.",
101
+ "WritingCode": "Пишу код…",
102
+ "RunningCode": "Виконую код…",
103
+ "RanCode": "Код виконано",
104
+ "FindingTools": "Шукаю інструменти…",
105
+ "FoundTools": "Інструменти знайдено",
106
+ "ReadingPage": "Читаю сторінку…",
107
+ "ReadPage": "Сторінку прочитано",
108
+ "Clicking": "Натискаю…",
109
+ "Clicked": "Натиснуто «{{target}}»",
110
+ "Filling": "Заповнюю…",
111
+ "Filled": "Заповнено «{{target}}»",
112
+ "PressingKey": "Натискаю клавішу…",
113
+ "PressedKey": "Натиснуто {{target}}",
114
+ "UsingTool": "Використовую {{name}}…",
115
+ "UsedTool": "Використано {{name}}",
116
+ "ToolStopped": "{{name}} не завершив роботу"
117
+ }
118
+ },
119
+ "Homepage": "Головна сторінка",
120
+ "GettingStarted": "Початок роботи"
121
+ }