@mittwald/flow-remote-react-components 0.2.0-alpha.583 → 0.2.0-alpha.585
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.
|
@@ -6,13 +6,26 @@ import { FlowRemoteElement } from '@mittwald/flow-remote-elements';
|
|
|
6
6
|
import { createRemoteComponent as createRemoteComponent$1 } from '@mittwald/remote-dom-react';
|
|
7
7
|
import { createElement } from 'react';
|
|
8
8
|
|
|
9
|
+
const controlledComponentNames = [
|
|
10
|
+
"flr-markdown-editor",
|
|
11
|
+
"flr-number-field",
|
|
12
|
+
"flr-password-creation-field",
|
|
13
|
+
"flr-search-field",
|
|
14
|
+
"flr-text-field",
|
|
15
|
+
"flr-text-area"
|
|
16
|
+
];
|
|
9
17
|
const createRemoteComponent = (name, element, options) => {
|
|
10
18
|
const RemoteComponent = createRemoteComponent$1(name, element, options);
|
|
11
|
-
return (props) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
return (props) => {
|
|
20
|
+
const isControlledComponent = controlledComponentNames.includes(
|
|
21
|
+
name
|
|
22
|
+
);
|
|
23
|
+
return createElement(RemoteComponent, {
|
|
24
|
+
[FlowRemoteElement.initializationPropertyName]: true,
|
|
25
|
+
[FlowRemoteElement.versionPropertyName]: version,
|
|
26
|
+
...isControlledComponent ? useControlledRemoteValueProps(props) : props
|
|
27
|
+
});
|
|
28
|
+
};
|
|
16
29
|
};
|
|
17
30
|
|
|
18
31
|
export { createRemoteComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRemoteComponent.mjs","sources":["../../../src/lib/createRemoteComponent.ts"],"sourcesContent":["import { version } from \"@/version\";\nimport { useControlledRemoteValueProps } from \"@mittwald/flow-react-components\";\nimport { FlowRemoteElement } from \"@mittwald/flow-remote-elements\";\nimport { createRemoteComponent as libCreateRemoteComponent } from \"@mittwald/remote-dom-react\";\nimport { createElement } from \"react\";\n\nexport const createRemoteComponent: typeof libCreateRemoteComponent = (\n name,\n element,\n options,\n) => {\n const RemoteComponent = libCreateRemoteComponent(name, element, options);\n return (props)
|
|
1
|
+
{"version":3,"file":"createRemoteComponent.mjs","sources":["../../../src/lib/createRemoteComponent.ts"],"sourcesContent":["import { version } from \"@/version\";\nimport { useControlledRemoteValueProps } from \"@mittwald/flow-react-components\";\nimport { FlowRemoteElement } from \"@mittwald/flow-remote-elements\";\nimport { createRemoteComponent as libCreateRemoteComponent } from \"@mittwald/remote-dom-react\";\nimport { createElement } from \"react\";\n\nconst controlledComponentNames: (keyof HTMLElementTagNameMap)[] = [\n \"flr-markdown-editor\",\n \"flr-number-field\",\n \"flr-password-creation-field\",\n \"flr-search-field\",\n \"flr-text-field\",\n \"flr-text-area\",\n];\n\nexport const createRemoteComponent: typeof libCreateRemoteComponent = (\n name,\n element,\n options,\n) => {\n const RemoteComponent = libCreateRemoteComponent(name, element, options);\n return (props) => {\n const isControlledComponent = controlledComponentNames.includes(\n name as keyof HTMLElementTagNameMap,\n );\n\n return createElement(RemoteComponent, {\n [FlowRemoteElement.initializationPropertyName]: true,\n [FlowRemoteElement.versionPropertyName]: version,\n ...(isControlledComponent ? useControlledRemoteValueProps(props) : props),\n });\n };\n};\n"],"names":["libCreateRemoteComponent"],"mappings":";;;;;;AAMA,MAAM,wBAAA,GAA4D;AAAA,EAChE,qBAAA;AAAA,EACA,kBAAA;AAAA,EACA,6BAAA;AAAA,EACA,kBAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF,CAAA;AAEO,MAAM,qBAAA,GAAyD,CACpE,IAAA,EACA,OAAA,EACA,OAAA,KACG;AACH,EAAA,MAAM,eAAA,GAAkBA,uBAAA,CAAyB,IAAA,EAAM,OAAA,EAAS,OAAO,CAAA;AACvE,EAAA,OAAO,CAAC,KAAA,KAAU;AAChB,IAAA,MAAM,wBAAwB,wBAAA,CAAyB,QAAA;AAAA,MACrD;AAAA,KACF;AAEA,IAAA,OAAO,cAAc,eAAA,EAAiB;AAAA,MACpC,CAAC,iBAAA,CAAkB,0BAA0B,GAAG,IAAA;AAAA,MAChD,CAAC,iBAAA,CAAkB,mBAAmB,GAAG,OAAA;AAAA,MACzC,GAAI,qBAAA,GAAwB,6BAAA,CAA8B,KAAK,CAAA,GAAI;AAAA,KACpE,CAAA;AAAA,EACH,CAAA;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRemoteComponent.d.ts","sourceRoot":"","sources":["../../../src/lib/createRemoteComponent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"createRemoteComponent.d.ts","sourceRoot":"","sources":["../../../src/lib/createRemoteComponent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAY/F,eAAO,MAAM,qBAAqB,EAAE,OAAO,wBAiB1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-remote-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.585",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components that can be used in a remote environment",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"test:unit": "exit 0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@mittwald/flow-react-components": "0.2.0-alpha.
|
|
40
|
-
"@mittwald/flow-remote-core": "0.2.0-alpha.
|
|
41
|
-
"@mittwald/flow-remote-elements": "0.2.0-alpha.
|
|
39
|
+
"@mittwald/flow-react-components": "0.2.0-alpha.585",
|
|
40
|
+
"@mittwald/flow-remote-core": "0.2.0-alpha.585",
|
|
41
|
+
"@mittwald/flow-remote-elements": "0.2.0-alpha.585",
|
|
42
42
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
43
43
|
"@types/react": "^19.2.6",
|
|
44
44
|
"react-error-boundary": "^6.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@internationalized/date": "^3.10.0",
|
|
48
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
49
|
-
"@mittwald/flow-remote-react-renderer": "0.2.0-alpha.
|
|
48
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.585",
|
|
49
|
+
"@mittwald/flow-remote-react-renderer": "0.2.0-alpha.585",
|
|
50
50
|
"@mittwald/typescript-config": "",
|
|
51
51
|
"@types/node": "^24.10.1",
|
|
52
52
|
"@types/react-dom": "^19.2.3",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@internationalized/date": "^3.10.0",
|
|
77
|
-
"@mittwald/ext-bridge": "0.2.0-alpha.
|
|
77
|
+
"@mittwald/ext-bridge": "0.2.0-alpha.584",
|
|
78
78
|
"react": "^19.2.0",
|
|
79
79
|
"react-hook-form": "*"
|
|
80
80
|
},
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"optional": true
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "1a330fa90e1a0e0ff02820051351ad066bb08168"
|
|
93
93
|
}
|