@multiplatform.one/frappe-ui 7.7.0 → 7.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/FileBrowser/AttachLibrary.cjs +2 -2
- package/dist/cjs/FileBrowser/AttachLibrary.native.js +8 -2
- package/dist/cjs/FileBrowser/AttachLibrary.native.js.map +1 -1
- package/dist/cjs/FrappeImageView.cjs +2 -8
- package/dist/cjs/FrappeImageView.native.js +2 -9
- package/dist/cjs/FrappeImageView.native.js.map +1 -1
- package/dist/cjs/fields/LinkTree.cjs +5 -3
- package/dist/cjs/fields/LinkTree.native.js +9 -5
- package/dist/cjs/fields/LinkTree.native.js.map +1 -1
- package/dist/cjs/frappeStoryTarget.cjs +4 -2
- package/dist/cjs/frappeStoryTarget.native.js +4 -3
- package/dist/cjs/frappeStoryTarget.native.js.map +1 -1
- package/dist/esm/FileBrowser/AttachLibrary.mjs +2 -2
- package/dist/esm/FileBrowser/AttachLibrary.mjs.map +1 -1
- package/dist/esm/FileBrowser/AttachLibrary.native.js +8 -2
- package/dist/esm/FileBrowser/AttachLibrary.native.js.map +1 -1
- package/dist/esm/FrappeImageView.mjs +2 -7
- package/dist/esm/FrappeImageView.mjs.map +1 -1
- package/dist/esm/FrappeImageView.native.js +2 -8
- package/dist/esm/FrappeImageView.native.js.map +1 -1
- package/dist/esm/fields/LinkTree.mjs +5 -3
- package/dist/esm/fields/LinkTree.mjs.map +1 -1
- package/dist/esm/fields/LinkTree.native.js +9 -5
- package/dist/esm/fields/LinkTree.native.js.map +1 -1
- package/dist/esm/frappeStoryTarget.mjs +4 -1
- package/dist/esm/frappeStoryTarget.mjs.map +1 -1
- package/dist/esm/frappeStoryTarget.native.js +4 -2
- package/dist/esm/frappeStoryTarget.native.js.map +1 -1
- package/dist/jsx/FileBrowser/AttachLibrary.mjs +2 -2
- package/dist/jsx/FileBrowser/AttachLibrary.mjs.map +1 -1
- package/dist/jsx/FileBrowser/AttachLibrary.native.js +8 -2
- package/dist/jsx/FileBrowser/AttachLibrary.native.js.map +1 -1
- package/dist/jsx/FrappeImageView.mjs +2 -7
- package/dist/jsx/FrappeImageView.mjs.map +1 -1
- package/dist/jsx/FrappeImageView.native.js +2 -9
- package/dist/jsx/FrappeImageView.native.js.map +1 -1
- package/dist/jsx/fields/LinkTree.mjs +5 -3
- package/dist/jsx/fields/LinkTree.mjs.map +1 -1
- package/dist/jsx/fields/LinkTree.native.js +9 -5
- package/dist/jsx/fields/LinkTree.native.js.map +1 -1
- package/dist/jsx/frappeStoryTarget.mjs +4 -1
- package/dist/jsx/frappeStoryTarget.mjs.map +1 -1
- package/dist/jsx/frappeStoryTarget.native.js +4 -3
- package/dist/jsx/frappeStoryTarget.native.js.map +1 -1
- package/package.json +16 -16
- package/src/FileBrowser/AttachLibrary.tsx +13 -1
- package/src/FrappeImageView.tsx +16 -15
- package/src/classicScriptSafety.spec.ts +47 -0
- package/src/desk/DeskFormSidebar.stories.tsx +19 -1
- package/src/fields/LinkTree.tsx +18 -3
- package/src/fields/Progress/Progress.spec.tsx +160 -0
- package/src/frappeStoryTarget.tsx +25 -9
- package/types/FileBrowser/AttachLibrary.d.ts.map +1 -1
- package/types/FrappeImageView.d.ts.map +1 -1
- package/types/fields/LinkTree.d.ts.map +1 -1
- package/types/frappeStoryTarget.d.ts +2 -2
- package/types/frappeStoryTarget.d.ts.map +1 -1
|
@@ -34,7 +34,6 @@ module.exports = __toCommonJS(frappeStoryTarget_exports);
|
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_react = require("react");
|
|
36
36
|
var import_FrappeProvider = require("./FrappeProvider.native.js");
|
|
37
|
-
const import_meta = {};
|
|
38
37
|
function _instanceof(left, right) {
|
|
39
38
|
"@swc/helpers - instanceof";
|
|
40
39
|
|
|
@@ -47,8 +46,10 @@ function _instanceof(left, right) {
|
|
|
47
46
|
var _sbEnv_STORYBOOK_FRAPPE_URL;
|
|
48
47
|
var sbEnv = function () {
|
|
49
48
|
try {
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
return {
|
|
50
|
+
STORYBOOK_FRAPPE_LIVE: process.env.STORYBOOK_FRAPPE_LIVE,
|
|
51
|
+
STORYBOOK_FRAPPE_URL: process.env.STORYBOOK_FRAPPE_URL
|
|
52
|
+
};
|
|
52
53
|
} catch (unused) {
|
|
53
54
|
return {};
|
|
54
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","frappeStoryTarget_exports","FrappeStoryProvider","LIVE_TODO_NAME","LiveToDoGate","frappeStoriesLive","frappeStoryBaseUrl","module","exports","import_jsx_runtime","require","import_react","import_FrappeProvider","
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","frappeStoryTarget_exports","FrappeStoryProvider","LIVE_TODO_NAME","LiveToDoGate","frappeStoriesLive","frappeStoryBaseUrl","module","exports","import_jsx_runtime","require","import_react","import_FrappeProvider","_instanceof","left","right","Symbol","hasInstance","_sbEnv_STORYBOOK_FRAPPE_URL","sbEnv","STORYBOOK_FRAPPE_LIVE","process","env","STORYBOOK_FRAPPE_URL","unused","pageOrigin","window","location","origin","liveSocketOptions","transports","param","children","fixtures","jsx","FrappeProvider","baseURL","socketOptions","liveToDoPromise","lookupOrSeedLiveToDo","_this","_data","_this1","base","replace","preferred","fetch","encodeURIComponent","ok","list","_data_","_data1","_this2","row","json","data","whoRes","me","message","created","method","headers","body","JSON","stringify","description","status","priority","allocated_to"],"sources":["../../src/frappeSto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C,WAAA;MACEC,MAAA,QAAU;MAEVC,QAAO,UAAO;MACd,IAAC,OAAUV,EAAA,aAAO,IAAAA,EAAA,IAAAA,EAAA,KAAC,OAAI;QAC3BW,YAAO,EAAAX;MACT","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/frappe-ui",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.2",
|
|
4
4
|
"description": "Pre-wired Tamagui components for Frappe doctypes with live data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cross-platform",
|
|
@@ -85,18 +85,18 @@
|
|
|
85
85
|
"html5-qrcode": "^2.3.8",
|
|
86
86
|
"signature_pad": "^5.1.3",
|
|
87
87
|
"tamagui": "2.7.6",
|
|
88
|
-
"@multiplatform.one/components": "7.7.
|
|
89
|
-
"@multiplatform.one/
|
|
90
|
-
"@multiplatform.one/
|
|
91
|
-
"@multiplatform.one/frappe": "7.7.
|
|
92
|
-
"@multiplatform.one/i18n": "7.7.
|
|
93
|
-
"@multiplatform.one/markdown": "7.7.
|
|
94
|
-
"@multiplatform.one/platform": "7.7.
|
|
95
|
-
"@multiplatform.one/rich-text": "7.7.
|
|
96
|
-
"@multiplatform.one/router": "7.7.
|
|
97
|
-
"@multiplatform.one/store": "7.7.
|
|
98
|
-
"@multiplatform.one/table": "7.7.
|
|
99
|
-
"@multiplatform.one/theme": "7.7.
|
|
88
|
+
"@multiplatform.one/components": "7.7.2",
|
|
89
|
+
"@multiplatform.one/forms": "7.7.2",
|
|
90
|
+
"@multiplatform.one/desktop": "7.7.2",
|
|
91
|
+
"@multiplatform.one/frappe": "7.7.2",
|
|
92
|
+
"@multiplatform.one/i18n": "7.7.2",
|
|
93
|
+
"@multiplatform.one/markdown": "7.7.2",
|
|
94
|
+
"@multiplatform.one/platform": "7.7.2",
|
|
95
|
+
"@multiplatform.one/rich-text": "7.7.2",
|
|
96
|
+
"@multiplatform.one/router": "7.7.2",
|
|
97
|
+
"@multiplatform.one/store": "7.7.2",
|
|
98
|
+
"@multiplatform.one/table": "7.7.2",
|
|
99
|
+
"@multiplatform.one/theme": "7.7.2"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@tamagui/build": "2.7.6",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"react-dom": "19.2.5",
|
|
109
109
|
"react-i18next": "^16.6.6",
|
|
110
110
|
"vitest": "^4.1.5",
|
|
111
|
-
"@multiplatform.one/config": "7.7.
|
|
112
|
-
"@multiplatform.one/storybook": "7.7.
|
|
113
|
-
"@multiplatform.one/test-utils": "7.7.
|
|
111
|
+
"@multiplatform.one/config": "7.7.2",
|
|
112
|
+
"@multiplatform.one/storybook": "7.7.2",
|
|
113
|
+
"@multiplatform.one/test-utils": "7.7.2"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
116
|
"@react-native-community/datetimepicker": ">=8.0.1",
|
|
@@ -41,9 +41,21 @@ export function AttachLibrary({
|
|
|
41
41
|
put role="dialog" in the a11y tree and kept the whole FileBrowser
|
|
42
42
|
subtree live. Every other house dialog (ConfirmDialog, CellModalEditor,
|
|
43
43
|
HelpAboutDialog) already wraps overlay + content this way. */}
|
|
44
|
+
{/* Explicit keys: Tamagui wraps every Portal child in AnimatePresence's
|
|
45
|
+
PresenceChild, whose key is `child.key || ""`. Two keyless siblings
|
|
46
|
+
therefore both land on "" and React logs a duplicate-key error per
|
|
47
|
+
commit — and two presence children sharing a key can swap identity
|
|
48
|
+
when the dialog toggles. Naming them is the fix on our side of the
|
|
49
|
+
boundary (MPO-197). */}
|
|
44
50
|
<Dialog.Portal>
|
|
45
|
-
<DialogOverlay
|
|
51
|
+
<DialogOverlay
|
|
52
|
+
key="attach-scrim"
|
|
53
|
+
backgroundColor="$background"
|
|
54
|
+
opacity={0.5}
|
|
55
|
+
data-filebrowser-attach-scrim
|
|
56
|
+
/>
|
|
46
57
|
<DialogContent
|
|
58
|
+
key="attach-content"
|
|
47
59
|
aria-label={t("Attach file")}
|
|
48
60
|
data-filebrowser-attach-dialog
|
|
49
61
|
width={drill ? "100%" : 820}
|
package/src/FrappeImageView.tsx
CHANGED
|
@@ -5,25 +5,26 @@ import React, { useMemo } from "react";
|
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { Spinner, formCommonColors } from "@multiplatform.one/forms";
|
|
7
7
|
import { Image, Text, YStack, type YStackProps } from "tamagui";
|
|
8
|
+
import { isServer } from "@multiplatform.one/platform";
|
|
8
9
|
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
9
10
|
import { useFrappeConfig } from "./FrappeProvider";
|
|
10
11
|
import { FrappeReconnectIndicator } from "./FrappeReconnectIndicator";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
|
-
* True when this module is evaluated during web server rendering.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* `
|
|
14
|
+
* True when this module is evaluated during web server rendering.
|
|
15
|
+
*
|
|
16
|
+
* This used to read `import.meta.env.SSR` behind a try/catch, which MPO-192
|
|
17
|
+
* ruled out: in a classic script — the vxrn/rolldown Hermes bundle, or any
|
|
18
|
+
* Metro bundle for platform=web, which is what an Expo DOM component
|
|
19
|
+
* (`'use dom'`) is — `import.meta` is a PARSE-time SyntaxError, so the catch
|
|
20
|
+
* never runs and the whole module fails to parse.
|
|
21
|
+
*
|
|
22
|
+
* `isServer` carries no `import.meta` and is split at the FILE level
|
|
23
|
+
* (@tamagui/constants ships a `.native` flavour hardcoding it false), so it
|
|
24
|
+
* answers correctly in all four places: true only under web server render,
|
|
25
|
+
* false in a browser, on native, and inside a DOM component's WebView.
|
|
19
26
|
*/
|
|
20
|
-
const IS_SSR: boolean =
|
|
21
|
-
try {
|
|
22
|
-
return (import.meta as ImportMeta & { env?: { SSR?: boolean } }).env?.SSR === true;
|
|
23
|
-
} catch {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
})();
|
|
27
|
+
const IS_SSR: boolean = isServer;
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Resolves an image field value to a full URL.
|
|
@@ -85,8 +86,8 @@ export function FrappeImageView<TDoc extends { name: string; doctype: string }>(
|
|
|
85
86
|
// when FrappeProvider already carries it.
|
|
86
87
|
const providerConfig = useFrappeConfig();
|
|
87
88
|
// Note: `typeof window` is unreliable because react-native-web polyfills
|
|
88
|
-
// `window` during SSR. Use the module-level
|
|
89
|
-
// (
|
|
89
|
+
// `window` during SSR. Use the module-level platform flag instead
|
|
90
|
+
// (see IS_SSR above).
|
|
90
91
|
if (IS_SSR) {
|
|
91
92
|
const {
|
|
92
93
|
doctype,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { isServer } from "@multiplatform.one/platform";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* MPO-204 / MPO-192. `import.meta` is a PARSE-time SyntaxError in a classic
|
|
8
|
+
* script, and two bundles execute mpo as one: the vxrn/rolldown native bundle
|
|
9
|
+
* for Hermes, and any Metro bundle for platform=web — which is what an Expo
|
|
10
|
+
* DOM component (`'use dom'`) is. A try/catch never runs, because the file
|
|
11
|
+
* never parses, so the token has to be ABSENT rather than guarded. Both files
|
|
12
|
+
* below are reachable from a DOM component through the frappe-ui surface.
|
|
13
|
+
*/
|
|
14
|
+
const src = (name: string) =>
|
|
15
|
+
readFileSync(resolve(process.cwd(), "src", name), "utf8").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
16
|
+
|
|
17
|
+
describe("frappeStoryTarget carries no import.meta (MPO-204)", () => {
|
|
18
|
+
const source = src("frappeStoryTarget.tsx");
|
|
19
|
+
|
|
20
|
+
it("contains no import.meta token", () => {
|
|
21
|
+
expect(source).not.toMatch(/import\.meta/);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("reads both Storybook keys as static process.env member expressions, the only spelling bundlers inline", () => {
|
|
25
|
+
expect(source).toMatch(/process\.env\.STORYBOOK_FRAPPE_LIVE\b/);
|
|
26
|
+
expect(source).toMatch(/process\.env\.STORYBOOK_FRAPPE_URL\b/);
|
|
27
|
+
// A computed read is never inlined, so it would always resolve undefined.
|
|
28
|
+
expect(source).not.toMatch(/process\.env\[/);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe("FrappeImageView carries no import.meta (MPO-204)", () => {
|
|
33
|
+
const source = src("FrappeImageView.tsx");
|
|
34
|
+
|
|
35
|
+
it("contains no import.meta token", () => {
|
|
36
|
+
expect(source).not.toMatch(/import\.meta/);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("takes its SSR answer from the platform package, which is split by FILE and not by a bundler define", () => {
|
|
40
|
+
expect(source).toMatch(/import \{ isServer \} from "@multiplatform\.one\/platform";/);
|
|
41
|
+
expect(source).toMatch(/const IS_SSR: boolean = isServer;/);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("resolves isServer false in a browser-like environment, so the client branch renders", () => {
|
|
45
|
+
expect(isServer).toBe(false);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -20,6 +20,24 @@ export default {
|
|
|
20
20
|
|
|
21
21
|
const MOCK_HOST = "https://deskformsidebar.mock.test";
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The document image is an inline data: URI, not "/files/todo.png".
|
|
25
|
+
* `resolveFileUrl` prefixes a "/..." value with baseURL, so a path fixture
|
|
26
|
+
* makes the <img> fetch https://deskformsidebar.mock.test/files/todo.png for
|
|
27
|
+
* real — the story's window.fetch shim only intercepts fetch(), never an
|
|
28
|
+
* image load — and the story prints ERR_TUNNEL_CONNECTION_FAILED. A data: URI
|
|
29
|
+
* goes through resolveFileUrl untouched and paints without a request, which
|
|
30
|
+
* is what G-15 story honesty asks for (MPO-197).
|
|
31
|
+
*/
|
|
32
|
+
const storyImage =
|
|
33
|
+
"data:image/svg+xml;utf8," +
|
|
34
|
+
encodeURIComponent(
|
|
35
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 24 24">' +
|
|
36
|
+
'<rect width="24" height="24" rx="3" fill="#4c6ef5"/>' +
|
|
37
|
+
'<path d="M6 12.5l3.5 3.5L18 8" fill="none" stroke="#fff" stroke-width="2" ' +
|
|
38
|
+
'stroke-linecap="round" stroke-linejoin="round"/></svg>',
|
|
39
|
+
);
|
|
40
|
+
|
|
23
41
|
function jsonResponse(body: unknown, status = 200): Response {
|
|
24
42
|
return new Response(JSON.stringify(body), {
|
|
25
43
|
status,
|
|
@@ -70,7 +88,7 @@ const todoDocs = [
|
|
|
70
88
|
owner: "jane@example.com",
|
|
71
89
|
modified_by: "john@example.com",
|
|
72
90
|
creation: "2026-02-01",
|
|
73
|
-
image:
|
|
91
|
+
image: storyImage,
|
|
74
92
|
_assign: JSON.stringify(["jane@example.com"]),
|
|
75
93
|
},
|
|
76
94
|
];
|
package/src/fields/LinkTree.tsx
CHANGED
|
@@ -40,9 +40,24 @@ export function LinkTree({
|
|
|
40
40
|
const isLocked = disabled || readOnly;
|
|
41
41
|
|
|
42
42
|
const finalBaseURL = baseURL ?? config?.baseURL ?? "";
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const finalAuth = auth ?? config?.auth;
|
|
44
|
+
// Carry `fixtures` through, the way FrappeTreeView does. Without it a
|
|
45
|
+
// LinkTree under a fixture-backed FrappeProvider takes the HTTP path
|
|
46
|
+
// instead: every story dials socket.io at the mock host and prints
|
|
47
|
+
// ERR_TUNNEL_CONNECTION_FAILED, which is a G-15 story-honesty breach and
|
|
48
|
+
// was the only console noise left on FrappeUI/LinkTree (MPO-197).
|
|
49
|
+
const connectionConfig: FrappeConnectionConfig | undefined = useMemo(
|
|
50
|
+
() =>
|
|
51
|
+
finalBaseURL
|
|
52
|
+
? {
|
|
53
|
+
baseURL: finalBaseURL,
|
|
54
|
+
socketPort: config?.socketPort,
|
|
55
|
+
auth: finalAuth,
|
|
56
|
+
fixtures: config?.fixtures,
|
|
57
|
+
}
|
|
58
|
+
: undefined,
|
|
59
|
+
[finalBaseURL, config?.socketPort, finalAuth, config?.fixtures],
|
|
60
|
+
);
|
|
46
61
|
|
|
47
62
|
const { meta } = useDocTypeMeta(connectionConfig, doctype);
|
|
48
63
|
const titleField = meta?.title_field ?? "name";
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProgressField contract specs.
|
|
3
|
+
*
|
|
4
|
+
* ProgressField is a thin adapter: it takes the Frappe field props and hands
|
|
5
|
+
* them to the forms Progress, which owns the track, the clamp and the label
|
|
6
|
+
* chrome. So what is worth pinning here is the FORWARDING — every prop the
|
|
7
|
+
* adapter is documented to pass (readOnly / skeleton / compact / max /
|
|
8
|
+
* helperText / error) has to actually arrive, because the failure mode of a
|
|
9
|
+
* thin adapter is a silently dropped prop that makes three story variants
|
|
10
|
+
* render identically (the ContractProbe story exists for exactly that).
|
|
11
|
+
*
|
|
12
|
+
* The registry half matters too: "Progress" is a display fieldtype, so its
|
|
13
|
+
* adapter must coerce a non-number to 0 rather than hand the track NaN.
|
|
14
|
+
*/
|
|
15
|
+
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
16
|
+
import { cleanup } from "@testing-library/react";
|
|
17
|
+
import type React from "react";
|
|
18
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
19
|
+
import { getFieldComponent, type FieldRenderProps } from "../../fieldRegistry";
|
|
20
|
+
import { ProgressField } from ".";
|
|
21
|
+
|
|
22
|
+
afterEach(cleanup);
|
|
23
|
+
|
|
24
|
+
describe("ProgressField chrome", () => {
|
|
25
|
+
it("renders the label and a track", () => {
|
|
26
|
+
const { container } = renderWithProviders(
|
|
27
|
+
<ProgressField label="Completion" value={65} max={100} />,
|
|
28
|
+
);
|
|
29
|
+
expect(container.textContent).toContain("Completion");
|
|
30
|
+
expect(container.firstElementChild).toBeTruthy();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("shows helperText", () => {
|
|
34
|
+
const { container } = renderWithProviders(
|
|
35
|
+
<ProgressField label="Completion" value={65} helperText="how far along" />,
|
|
36
|
+
);
|
|
37
|
+
expect(container.textContent).toContain("how far along");
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("shows the error message", () => {
|
|
41
|
+
const { container } = renderWithProviders(
|
|
42
|
+
<ProgressField label="Completion" value={65} error="Value out of range" />,
|
|
43
|
+
);
|
|
44
|
+
expect(container.textContent).toContain("Value out of range");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("marks a required field", () => {
|
|
48
|
+
const { container } = renderWithProviders(
|
|
49
|
+
<ProgressField label="Completion" value={65} required />,
|
|
50
|
+
);
|
|
51
|
+
expect(container.textContent).toContain("Completion");
|
|
52
|
+
expect(container.querySelector("[aria-required], [aria-hidden]")).toBeTruthy();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it("a value with no max still paints (max defaults to 100)", () => {
|
|
56
|
+
const { container } = renderWithProviders(<ProgressField label="Completion" value={40} />);
|
|
57
|
+
expect(container.firstElementChild).toBeTruthy();
|
|
58
|
+
expect(container.textContent).toContain("Completion");
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The ContractProbe story asserts these three visually. If the adapter drops
|
|
64
|
+
* any of them the probe variants render identically to Main and nobody
|
|
65
|
+
* notices, so pin them structurally too.
|
|
66
|
+
*/
|
|
67
|
+
describe("ProgressField forwards the thin-adapter contract", () => {
|
|
68
|
+
it("skeleton renders a different tree from the loaded field", () => {
|
|
69
|
+
const loaded = renderWithProviders(<ProgressField label="Completion" value={65} />);
|
|
70
|
+
const loadedHtml = loaded.container.innerHTML;
|
|
71
|
+
cleanup();
|
|
72
|
+
const skeleton = renderWithProviders(<ProgressField label="Completion" value={65} skeleton />);
|
|
73
|
+
expect(skeleton.container.innerHTML).not.toBe(loadedHtml);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("compact renders a different tree from the default density", () => {
|
|
77
|
+
const normal = renderWithProviders(<ProgressField label="Completion" value={65} />);
|
|
78
|
+
const normalHtml = normal.container.innerHTML;
|
|
79
|
+
cleanup();
|
|
80
|
+
const compact = renderWithProviders(<ProgressField label="Completion" value={65} compact />);
|
|
81
|
+
expect(compact.container.innerHTML).not.toBe(normalHtml);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("readOnly is accepted and still paints the value", () => {
|
|
85
|
+
const { container } = renderWithProviders(
|
|
86
|
+
<ProgressField label="Completion" value={65} readOnly />,
|
|
87
|
+
);
|
|
88
|
+
expect(container.textContent).toContain("Completion");
|
|
89
|
+
expect(container.firstElementChild).toBeTruthy();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it("max reaches the track: the same value at two maxes renders differently", () => {
|
|
93
|
+
const wide = renderWithProviders(<ProgressField label="Completion" value={50} max={100} />);
|
|
94
|
+
const wideHtml = wide.container.innerHTML;
|
|
95
|
+
cleanup();
|
|
96
|
+
const narrow = renderWithProviders(<ProgressField label="Completion" value={50} max={50} />);
|
|
97
|
+
expect(narrow.container.innerHTML).not.toBe(wideHtml);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
describe("registry resolution (Progress fieldtype)", () => {
|
|
102
|
+
function propsFor(overrides: Partial<FieldRenderProps> = {}): FieldRenderProps {
|
|
103
|
+
return { value: "", onChange: () => {}, ...overrides };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
it("resolves 'Progress' to ProgressField", () => {
|
|
107
|
+
const Component = getFieldComponent("Progress")!;
|
|
108
|
+
expect(Component).toBeTruthy();
|
|
109
|
+
const element = (Component as Function)(
|
|
110
|
+
propsFor({ value: 65, label: "Completion" }),
|
|
111
|
+
) as React.ReactElement<Record<string, any>>;
|
|
112
|
+
expect(element.type).toBe(ProgressField);
|
|
113
|
+
expect(element.props.value).toBe(65);
|
|
114
|
+
expect(element.props.label).toBe("Completion");
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("coerces a non-number to 0 rather than handing the track NaN", () => {
|
|
118
|
+
const Component = getFieldComponent("Progress")!;
|
|
119
|
+
const element = (Component as Function)(
|
|
120
|
+
propsFor({ value: "not a number" }),
|
|
121
|
+
) as React.ReactElement<Record<string, any>>;
|
|
122
|
+
expect(element.props.value).toBe(0);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it("a null value becomes 0, not null", () => {
|
|
126
|
+
const Component = getFieldComponent("Progress")!;
|
|
127
|
+
const element = (Component as Function)(
|
|
128
|
+
propsFor({ value: null as unknown as string }),
|
|
129
|
+
) as React.ReactElement<Record<string, any>>;
|
|
130
|
+
expect(element.props.value).toBe(0);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it("forwards the passthrough contract (helperText / readOnly / skeleton / compact)", () => {
|
|
134
|
+
const Component = getFieldComponent("Progress")!;
|
|
135
|
+
const element = (Component as Function)(
|
|
136
|
+
propsFor({
|
|
137
|
+
value: 20,
|
|
138
|
+
helperText: "from the doc",
|
|
139
|
+
readOnly: true,
|
|
140
|
+
skeleton: true,
|
|
141
|
+
compact: true,
|
|
142
|
+
} as Partial<FieldRenderProps>),
|
|
143
|
+
) as React.ReactElement<Record<string, any>>;
|
|
144
|
+
expect(element.props.helperText).toBe("from the doc");
|
|
145
|
+
expect(element.props.readOnly).toBe(true);
|
|
146
|
+
expect(element.props.skeleton).toBe(true);
|
|
147
|
+
expect(element.props.compact).toBe(true);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it("falls back to the DocField description when no helperText is given", () => {
|
|
151
|
+
const Component = getFieldComponent("Progress")!;
|
|
152
|
+
const element = (Component as Function)(
|
|
153
|
+
propsFor({
|
|
154
|
+
value: 20,
|
|
155
|
+
fieldMeta: { description: "percent complete" },
|
|
156
|
+
} as Partial<FieldRenderProps>),
|
|
157
|
+
) as React.ReactElement<Record<string, any>>;
|
|
158
|
+
expect(element.props.helperText).toBe("percent complete");
|
|
159
|
+
});
|
|
160
|
+
});
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The Storybook dev server (apps/storybook/.storybook/main.ts) probes the
|
|
5
5
|
* bench selected by `STORYBOOK_FRAPPE_URL` (default: the local dev bench at
|
|
6
|
-
* http://localhost:8000) and
|
|
7
|
-
* `
|
|
6
|
+
* http://localhost:8000) and defines the result as
|
|
7
|
+
* `process.env.STORYBOOK_FRAPPE_LIVE`. When the bench is reachable it
|
|
8
8
|
* also proxies `/api` and `/socket.io` same-origin (the bench sends no CORS
|
|
9
9
|
* headers) and injects the API token server-side, so no credentials ever
|
|
10
10
|
* reach the preview bundle.
|
|
@@ -22,15 +22,31 @@ interface StorybookFrappeEnv {
|
|
|
22
22
|
STORYBOOK_FRAPPE_URL?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The two keys, read as STATIC `process.env.<KEY>` member expressions.
|
|
27
|
+
*
|
|
28
|
+
* This used to read `import.meta.env`. MPO-192 ruled that out: two bundles
|
|
29
|
+
* execute mpo as a CLASSIC script — the vxrn/rolldown native bundle for
|
|
30
|
+
* Hermes, and any Metro bundle for platform=web, which is what an Expo DOM
|
|
31
|
+
* component (`'use dom'`) is — and in a classic script `import.meta` is a
|
|
32
|
+
* PARSE-time SyntaxError, so the try/catch below never gets to run and the
|
|
33
|
+
* whole module fails to parse.
|
|
34
|
+
*
|
|
35
|
+
* `process.env.<KEY>` is the spelling every bundler on the way to a browser
|
|
36
|
+
* inlines, and it is exactly what public/platform/src/config/runtimeConfig.ts
|
|
37
|
+
* settled on. apps/storybook/.storybook/main.ts defines both keys for the
|
|
38
|
+
* preview bundle (Storybook's own `env` preset only defines the
|
|
39
|
+
* `import.meta.env.*` spelling, so the define is what carries these across).
|
|
40
|
+
* A dynamic `env[key]` read would never be inlined. Where nothing defined the
|
|
41
|
+
* keys and `process` does not exist, the reads throw and the catch answers
|
|
42
|
+
* with the fixtures fallback.
|
|
43
|
+
*/
|
|
31
44
|
const sbEnv: StorybookFrappeEnv = (() => {
|
|
32
45
|
try {
|
|
33
|
-
return
|
|
46
|
+
return {
|
|
47
|
+
STORYBOOK_FRAPPE_LIVE: process.env.STORYBOOK_FRAPPE_LIVE,
|
|
48
|
+
STORYBOOK_FRAPPE_URL: process.env.STORYBOOK_FRAPPE_URL,
|
|
49
|
+
};
|
|
34
50
|
} catch {
|
|
35
51
|
return {};
|
|
36
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachLibrary.d.ts","sourceRoot":"","sources":["../../src/FileBrowser/AttachLibrary.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IACnC,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,KAAK,EACL,aAAa,EACb,MAAM,GACP,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"AttachLibrary.d.ts","sourceRoot":"","sources":["../../src/FileBrowser/AttachLibrary.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IACnC,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,KAAK,EACL,aAAa,EACb,MAAM,GACP,EAAE,kBAAkB,2CA+EpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrappeImageView.d.ts","sourceRoot":"","sources":["../src/FrappeImageView.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"FrappeImageView.d.ts","sourceRoot":"","sources":["../src/FrappeImageView.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAgChE,MAAM,WAAW,oBAAoB,CAAC,IAAI,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAE,SAAQ,IAAI,CAChG,WAAW,EACX,UAAU,CACX;IACC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,M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,EACL,UAAU,EACV,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,WAAW,EACX,gBAAgB,EAAE,iBAAiB,EACnC,GAAG,UAAU,EACd,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"LinkTree.d.ts","sourceRoot":"","sources":["../../src/fields/LinkTree.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAU,EACV,QAAQ,EACR,OAAO,EACP,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,UAAU,EACV,QAAgB,EAChB,QAAgB,EAChB,OAAe,EACf,WAAW,EACX,gBAAgB,EAAE,iBAAiB,EACnC,GAAG,UAAU,EACd,EAAE,SAAS,2CAgFX"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The Storybook dev server (apps/storybook/.storybook/main.ts) probes the
|
|
5
5
|
* bench selected by `STORYBOOK_FRAPPE_URL` (default: the local dev bench at
|
|
6
|
-
* http://localhost:8000) and
|
|
7
|
-
* `
|
|
6
|
+
* http://localhost:8000) and defines the result as
|
|
7
|
+
* `process.env.STORYBOOK_FRAPPE_LIVE`. When the bench is reachable it
|
|
8
8
|
* also proxies `/api` and `/socket.io` same-origin (the bench sends no CORS
|
|
9
9
|
* headers) and injects the API token server-side, so no credentials ever
|
|
10
10
|
* reach the preview bundle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frappeStoryTarget.d.ts","sourceRoot":"","sources":["../src/frappeStoryTarget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"frappeStoryTarget.d.ts","sourceRoot":"","sources":["../src/frappeStoryTarget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAsC5D,0EAA0E;AAC1E,eAAO,MAAM,iBAAiB,SAAsC,CAAC;AAkBrE,eAAO,MAAM,kBAAkB,EAAE,MAGgC,CAAC;AAElE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAeD,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,wBAAwB,2CAanF;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,kBAAkB,CAAC;AA8C9C;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,SAAS,CAAC;CAC/C,2CAoCA"}
|