@uniformdev/mesh-sdk-react 18.24.1-alpha.1 → 18.26.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.
- package/dist/index.esm.js +5 -12
- package/dist/index.js +15 -22
- package/dist/index.mjs +5 -12
- package/package.json +5 -7
package/dist/index.esm.js
CHANGED
|
@@ -2864,7 +2864,7 @@ function VariablesProvider({
|
|
|
2864
2864
|
children
|
|
2865
2865
|
}) {
|
|
2866
2866
|
const [editing, setEditing] = React10.useState();
|
|
2867
|
-
const
|
|
2867
|
+
const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
|
|
2868
2868
|
const contextValue = {
|
|
2869
2869
|
dispatch: (event) => {
|
|
2870
2870
|
if (event.type === "set") {
|
|
@@ -2890,7 +2890,7 @@ function VariablesProvider({
|
|
|
2890
2890
|
return /* @__PURE__ */ jsxs17(VariablesContext.Provider, { value: contextValue, children: [
|
|
2891
2891
|
children,
|
|
2892
2892
|
typeof editing !== "undefined" ? /* @__PURE__ */ jsx29(
|
|
2893
|
-
|
|
2893
|
+
Editor,
|
|
2894
2894
|
{
|
|
2895
2895
|
onSubmit: (val) => {
|
|
2896
2896
|
setEditing(void 0);
|
|
@@ -3265,8 +3265,7 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
3265
3265
|
|
|
3266
3266
|
// src/components/Request/RequestBody.tsx
|
|
3267
3267
|
import { css as css23 } from "@emotion/react";
|
|
3268
|
-
import
|
|
3269
|
-
import { InputSelect as InputSelect4 } from "@uniformdev/design-system";
|
|
3268
|
+
import { InputSelect as InputSelect4, JsonEditor } from "@uniformdev/design-system";
|
|
3270
3269
|
import { useState as useState8 } from "react";
|
|
3271
3270
|
|
|
3272
3271
|
// src/components/Request/RequestProvider.tsx
|
|
@@ -3432,16 +3431,10 @@ function RequestBody() {
|
|
|
3432
3431
|
}
|
|
3433
3432
|
),
|
|
3434
3433
|
/* @__PURE__ */ jsx36(
|
|
3435
|
-
|
|
3434
|
+
JsonEditor,
|
|
3436
3435
|
{
|
|
3437
3436
|
height: 200,
|
|
3438
|
-
|
|
3439
|
-
language,
|
|
3440
|
-
options: {
|
|
3441
|
-
language,
|
|
3442
|
-
minimap: { enabled: false },
|
|
3443
|
-
folding: false
|
|
3444
|
-
},
|
|
3437
|
+
defaultValue: request.body,
|
|
3445
3438
|
onChange: (body) => {
|
|
3446
3439
|
if (body) {
|
|
3447
3440
|
dispatch({ type: "setBody", body, contentType: LANGUAGE_TO_CONTENT_TYPE[language] });
|
package/dist/index.js
CHANGED
|
@@ -3033,7 +3033,7 @@ function VariablesProvider({
|
|
|
3033
3033
|
children
|
|
3034
3034
|
}) {
|
|
3035
3035
|
const [editing, setEditing] = React10.useState();
|
|
3036
|
-
const
|
|
3036
|
+
const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
|
|
3037
3037
|
const contextValue = {
|
|
3038
3038
|
dispatch: (event) => {
|
|
3039
3039
|
if (event.type === "set") {
|
|
@@ -3059,7 +3059,7 @@ function VariablesProvider({
|
|
|
3059
3059
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(VariablesContext.Provider, { value: contextValue, children: [
|
|
3060
3060
|
children,
|
|
3061
3061
|
typeof editing !== "undefined" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3062
|
-
|
|
3062
|
+
Editor,
|
|
3063
3063
|
{
|
|
3064
3064
|
onSubmit: (val) => {
|
|
3065
3065
|
setEditing(void 0);
|
|
@@ -3424,9 +3424,8 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
3424
3424
|
|
|
3425
3425
|
// src/components/Request/RequestBody.tsx
|
|
3426
3426
|
var import_react34 = require("@emotion/react");
|
|
3427
|
-
var import_react35 = __toESM(require("@monaco-editor/react"));
|
|
3428
3427
|
var import_design_system19 = require("@uniformdev/design-system");
|
|
3429
|
-
var
|
|
3428
|
+
var import_react35 = require("react");
|
|
3430
3429
|
|
|
3431
3430
|
// src/components/Request/RequestProvider.tsx
|
|
3432
3431
|
var React12 = __toESM(require("react"));
|
|
@@ -3552,7 +3551,7 @@ var LANGUAGE_TO_CONTENT_TYPE = {
|
|
|
3552
3551
|
};
|
|
3553
3552
|
function RequestBody() {
|
|
3554
3553
|
const { request, dispatch } = useRequest();
|
|
3555
|
-
const [language, setLanguage] = (0,
|
|
3554
|
+
const [language, setLanguage] = (0, import_react35.useState)("json");
|
|
3556
3555
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3557
3556
|
"div",
|
|
3558
3557
|
{
|
|
@@ -3591,16 +3590,10 @@ function RequestBody() {
|
|
|
3591
3590
|
}
|
|
3592
3591
|
),
|
|
3593
3592
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3594
|
-
|
|
3593
|
+
import_design_system19.JsonEditor,
|
|
3595
3594
|
{
|
|
3596
3595
|
height: 200,
|
|
3597
|
-
|
|
3598
|
-
language,
|
|
3599
|
-
options: {
|
|
3600
|
-
language,
|
|
3601
|
-
minimap: { enabled: false },
|
|
3602
|
-
folding: false
|
|
3603
|
-
},
|
|
3596
|
+
defaultValue: request.body,
|
|
3604
3597
|
onChange: (body) => {
|
|
3605
3598
|
if (body) {
|
|
3606
3599
|
dispatch({ type: "setBody", body, contentType: LANGUAGE_TO_CONTENT_TYPE[language] });
|
|
@@ -3791,8 +3784,8 @@ function RequestParameters({ disableVariables }) {
|
|
|
3791
3784
|
}
|
|
3792
3785
|
|
|
3793
3786
|
// src/components/Request/RequestUrl.tsx
|
|
3794
|
-
var
|
|
3795
|
-
var
|
|
3787
|
+
var import_react36 = require("@emotion/react");
|
|
3788
|
+
var import_react37 = require("react");
|
|
3796
3789
|
|
|
3797
3790
|
// src/components/Request/urlEncodeRequestParameter.ts
|
|
3798
3791
|
function urlEncodeRequestUrl(url, varValues) {
|
|
@@ -3818,7 +3811,7 @@ function RequestUrl() {
|
|
|
3818
3811
|
var _a, _b;
|
|
3819
3812
|
const { variables } = useVariables();
|
|
3820
3813
|
const { request } = useRequest();
|
|
3821
|
-
const mergedParameters = (0,
|
|
3814
|
+
const mergedParameters = (0, import_react37.useMemo)(() => {
|
|
3822
3815
|
var _a2;
|
|
3823
3816
|
if (!((_a2 = request.baseRequest) == null ? void 0 : _a2.parameters)) {
|
|
3824
3817
|
return request.parameters;
|
|
@@ -3828,7 +3821,7 @@ function RequestUrl() {
|
|
|
3828
3821
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3829
3822
|
"small",
|
|
3830
3823
|
{
|
|
3831
|
-
css:
|
|
3824
|
+
css: import_react36.css`
|
|
3832
3825
|
display: inline-block;
|
|
3833
3826
|
margin-bottom: var(--spacing-xs);
|
|
3834
3827
|
word-break: break-word;
|
|
@@ -4043,12 +4036,12 @@ var import_design_system23 = require("@uniformdev/design-system");
|
|
|
4043
4036
|
|
|
4044
4037
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
4045
4038
|
var import_mesh_sdk = require("@uniformdev/mesh-sdk");
|
|
4046
|
-
var
|
|
4039
|
+
var import_react38 = require("react");
|
|
4047
4040
|
var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
4048
|
-
const [error, setError] = (0,
|
|
4049
|
-
const [sdk, setSdk] = (0,
|
|
4050
|
-
const initializationInProgress = (0,
|
|
4051
|
-
(0,
|
|
4041
|
+
const [error, setError] = (0, import_react38.useState)();
|
|
4042
|
+
const [sdk, setSdk] = (0, import_react38.useState)();
|
|
4043
|
+
const initializationInProgress = (0, import_react38.useRef)(false);
|
|
4044
|
+
(0, import_react38.useEffect)(
|
|
4052
4045
|
() => {
|
|
4053
4046
|
if (typeof window === "undefined" || sdk) {
|
|
4054
4047
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -2864,7 +2864,7 @@ function VariablesProvider({
|
|
|
2864
2864
|
children
|
|
2865
2865
|
}) {
|
|
2866
2866
|
const [editing, setEditing] = React10.useState();
|
|
2867
|
-
const
|
|
2867
|
+
const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
|
|
2868
2868
|
const contextValue = {
|
|
2869
2869
|
dispatch: (event) => {
|
|
2870
2870
|
if (event.type === "set") {
|
|
@@ -2890,7 +2890,7 @@ function VariablesProvider({
|
|
|
2890
2890
|
return /* @__PURE__ */ jsxs17(VariablesContext.Provider, { value: contextValue, children: [
|
|
2891
2891
|
children,
|
|
2892
2892
|
typeof editing !== "undefined" ? /* @__PURE__ */ jsx29(
|
|
2893
|
-
|
|
2893
|
+
Editor,
|
|
2894
2894
|
{
|
|
2895
2895
|
onSubmit: (val) => {
|
|
2896
2896
|
setEditing(void 0);
|
|
@@ -3265,8 +3265,7 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
3265
3265
|
|
|
3266
3266
|
// src/components/Request/RequestBody.tsx
|
|
3267
3267
|
import { css as css23 } from "@emotion/react";
|
|
3268
|
-
import
|
|
3269
|
-
import { InputSelect as InputSelect4 } from "@uniformdev/design-system";
|
|
3268
|
+
import { InputSelect as InputSelect4, JsonEditor } from "@uniformdev/design-system";
|
|
3270
3269
|
import { useState as useState8 } from "react";
|
|
3271
3270
|
|
|
3272
3271
|
// src/components/Request/RequestProvider.tsx
|
|
@@ -3432,16 +3431,10 @@ function RequestBody() {
|
|
|
3432
3431
|
}
|
|
3433
3432
|
),
|
|
3434
3433
|
/* @__PURE__ */ jsx36(
|
|
3435
|
-
|
|
3434
|
+
JsonEditor,
|
|
3436
3435
|
{
|
|
3437
3436
|
height: 200,
|
|
3438
|
-
|
|
3439
|
-
language,
|
|
3440
|
-
options: {
|
|
3441
|
-
language,
|
|
3442
|
-
minimap: { enabled: false },
|
|
3443
|
-
folding: false
|
|
3444
|
-
},
|
|
3437
|
+
defaultValue: request.body,
|
|
3445
3438
|
onChange: (body) => {
|
|
3446
3439
|
if (body) {
|
|
3447
3440
|
dispatch({ type: "setBody", body, contentType: LANGUAGE_TO_CONTENT_TYPE[language] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.26.0",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,11 +43,9 @@
|
|
|
43
43
|
"document": "api-extractor run --local"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@uniformdev/
|
|
48
|
-
"@uniformdev/mesh-sdk": "18.24.1-alpha.1+65e77b560",
|
|
46
|
+
"@uniformdev/design-system": "18.26.0",
|
|
47
|
+
"@uniformdev/mesh-sdk": "18.26.0",
|
|
49
48
|
"formik": "^2.2.9",
|
|
50
|
-
"monaco-editor": "0.36.1",
|
|
51
49
|
"react-beautiful-dnd": "13.1.1",
|
|
52
50
|
"react-icons": "4.8.0",
|
|
53
51
|
"react-use": "17.4.0",
|
|
@@ -64,7 +62,7 @@
|
|
|
64
62
|
"@emotion/react": "11.10.5",
|
|
65
63
|
"@svgr/cli": "6.5.1",
|
|
66
64
|
"@types/react": "18.0.28",
|
|
67
|
-
"@types/react-beautiful-dnd": "13.1.
|
|
65
|
+
"@types/react-beautiful-dnd": "13.1.4",
|
|
68
66
|
"@types/uuid": "9.0.1",
|
|
69
67
|
"react": "18.2.0",
|
|
70
68
|
"react-dom": "18.2.0"
|
|
@@ -75,5 +73,5 @@
|
|
|
75
73
|
"publishConfig": {
|
|
76
74
|
"access": "public"
|
|
77
75
|
},
|
|
78
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "776654d5b12c24cf597acd66cde039d6b0111419"
|
|
79
77
|
}
|