@blocklet/pages-kit 0.2.252 → 0.2.254
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/lib/cjs/builtin/call.js
CHANGED
|
@@ -22,7 +22,10 @@ function call(input) {
|
|
|
22
22
|
const { sign } =
|
|
23
23
|
// eslint-disable-next-line global-require
|
|
24
24
|
require('@blocklet/sdk/lib/util/verify-sign');
|
|
25
|
-
|
|
25
|
+
const fetch =
|
|
26
|
+
// eslint-disable-next-line global-require
|
|
27
|
+
require('node-fetch');
|
|
28
|
+
return fetch((0, utils_1.withQuery)((0, utils_1.joinURL)(getComponentWebEndpoint(input.name), input.path), (_a = input.query) !== null && _a !== void 0 ? _a : {}), {
|
|
26
29
|
method: input.method,
|
|
27
30
|
headers: Object.assign(Object.assign({}, input.headers), { 'x-component-sig': sign((_b = input.body) !== null && _b !== void 0 ? _b : {}), 'x-component-did': process.env.BLOCKLET_COMPONENT_DID, 'Content-Type': 'application/json' }),
|
|
28
31
|
body: typeof input.body !== 'undefined' && input.method.toLowerCase() !== 'get'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MenuItem = exports.MenuList = exports.Menu = exports.ListItemSecondaryAction = exports.ListItemIcon = exports.ListSubheader = exports.ListItemButton = exports.ListItemAvatar = exports.ListItem = exports.List = exports.Typography = exports.Container = exports.TextField = exports.Switch = exports.Stack = exports.Popper = exports.Paper = exports.DialogTitle = exports.DialogContent = exports.DialogActions = exports.Dialog = exports.ClickAwayListener = exports.Button = exports.Box = exports.Autocomplete = exports.Avatar = exports.useTheme = exports.createTheme = exports.ThemeProvider = exports.styled = void 0;
|
|
3
|
+
exports.alpha = exports.Divider = exports.Grid = exports.CircularProgress = exports.GlobalStyles = exports.MenuItem = exports.MenuList = exports.Menu = exports.ListItemSecondaryAction = exports.ListItemIcon = exports.ListSubheader = exports.ListItemButton = exports.ListItemAvatar = exports.ListItem = exports.List = exports.Typography = exports.Container = exports.TextField = exports.Switch = exports.Stack = exports.Popper = exports.Paper = exports.DialogTitle = exports.DialogContent = exports.DialogActions = exports.Dialog = exports.ClickAwayListener = exports.ButtonGroup = exports.Button = exports.Box = exports.Autocomplete = exports.Avatar = exports.useTheme = exports.createTheme = exports.ThemeProvider = exports.styled = void 0;
|
|
4
4
|
var material_1 = require("@mui/material");
|
|
5
5
|
Object.defineProperty(exports, "styled", { enumerable: true, get: function () { return material_1.styled; } });
|
|
6
6
|
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return material_1.ThemeProvider; } });
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () {
|
|
|
10
10
|
Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return material_1.Autocomplete; } });
|
|
11
11
|
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return material_1.Box; } });
|
|
12
12
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return material_1.Button; } });
|
|
13
|
+
Object.defineProperty(exports, "ButtonGroup", { enumerable: true, get: function () { return material_1.ButtonGroup; } });
|
|
13
14
|
Object.defineProperty(exports, "ClickAwayListener", { enumerable: true, get: function () { return material_1.ClickAwayListener; } });
|
|
14
15
|
Object.defineProperty(exports, "Dialog", { enumerable: true, get: function () { return material_1.Dialog; } });
|
|
15
16
|
Object.defineProperty(exports, "DialogActions", { enumerable: true, get: function () { return material_1.DialogActions; } });
|
|
@@ -32,3 +33,8 @@ Object.defineProperty(exports, "ListItemSecondaryAction", { enumerable: true, ge
|
|
|
32
33
|
Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return material_1.Menu; } });
|
|
33
34
|
Object.defineProperty(exports, "MenuList", { enumerable: true, get: function () { return material_1.MenuList; } });
|
|
34
35
|
Object.defineProperty(exports, "MenuItem", { enumerable: true, get: function () { return material_1.MenuItem; } });
|
|
36
|
+
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return material_1.GlobalStyles; } });
|
|
37
|
+
Object.defineProperty(exports, "CircularProgress", { enumerable: true, get: function () { return material_1.CircularProgress; } });
|
|
38
|
+
Object.defineProperty(exports, "Grid", { enumerable: true, get: function () { return material_1.Grid; } });
|
|
39
|
+
Object.defineProperty(exports, "Divider", { enumerable: true, get: function () { return material_1.Divider; } });
|
|
40
|
+
Object.defineProperty(exports, "alpha", { enumerable: true, get: function () { return material_1.alpha; } });
|
package/lib/esm/builtin/call.js
CHANGED
|
@@ -19,7 +19,10 @@ export function call(input) {
|
|
|
19
19
|
const { sign } =
|
|
20
20
|
// eslint-disable-next-line global-require
|
|
21
21
|
require('@blocklet/sdk/lib/util/verify-sign');
|
|
22
|
-
|
|
22
|
+
const fetch =
|
|
23
|
+
// eslint-disable-next-line global-require
|
|
24
|
+
require('node-fetch');
|
|
25
|
+
return fetch(withQuery(joinURL(getComponentWebEndpoint(input.name), input.path), (_a = input.query) !== null && _a !== void 0 ? _a : {}), {
|
|
23
26
|
method: input.method,
|
|
24
27
|
headers: Object.assign(Object.assign({}, input.headers), { 'x-component-sig': sign((_b = input.body) !== null && _b !== void 0 ? _b : {}), 'x-component-did': process.env.BLOCKLET_COMPONENT_DID, 'Content-Type': 'application/json' }),
|
|
25
28
|
body: typeof input.body !== 'undefined' && input.method.toLowerCase() !== 'get'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { styled, ThemeProvider, createTheme, useTheme, Avatar, Autocomplete, Box, Button, ClickAwayListener, Dialog, DialogActions, DialogContent, DialogTitle, Paper, Popper, Stack, Switch, TextField, Container, Typography, List, ListItem, ListItemAvatar, ListItemButton, ListSubheader, ListItemIcon, ListItemSecondaryAction, Menu, MenuList, MenuItem, } from '@mui/material';
|
|
1
|
+
export { styled, ThemeProvider, createTheme, useTheme, Avatar, Autocomplete, Box, Button, ButtonGroup, ClickAwayListener, Dialog, DialogActions, DialogContent, DialogTitle, Paper, Popper, Stack, Switch, TextField, Container, Typography, List, ListItem, ListItemAvatar, ListItemButton, ListSubheader, ListItemIcon, ListItemSecondaryAction, Menu, MenuList, MenuItem, GlobalStyles, CircularProgress, Grid, Divider, alpha, } from '@mui/material';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node-fetch" />
|
|
1
2
|
export interface CallInput {
|
|
2
3
|
name: string;
|
|
3
4
|
path: string;
|
|
@@ -10,4 +11,4 @@ export interface CallInput {
|
|
|
10
11
|
};
|
|
11
12
|
body?: any;
|
|
12
13
|
}
|
|
13
|
-
export declare function call(input: CallInput): Promise<Response>;
|
|
14
|
+
export declare function call(input: CallInput): Promise<import("node-fetch").Response | Response>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { styled, ThemeProvider, createTheme, useTheme, Avatar, Autocomplete, Box, Button, ClickAwayListener, Dialog, DialogActions, DialogContent, DialogTitle, Paper, Popper, Stack, Switch, TextField, Container, Typography, List, ListItem, ListItemAvatar, ListItemButton, ListSubheader, ListItemIcon, ListItemSecondaryAction, Menu, MenuList, MenuItem, } from '@mui/material';
|
|
1
|
+
export { styled, ThemeProvider, createTheme, useTheme, Avatar, Autocomplete, Box, Button, ButtonGroup, ClickAwayListener, Dialog, DialogActions, DialogContent, DialogTitle, Paper, Popper, Stack, Switch, TextField, Container, Typography, List, ListItem, ListItemAvatar, ListItemButton, ListSubheader, ListItemIcon, ListItemSecondaryAction, Menu, MenuList, MenuItem, GlobalStyles, CircularProgress, Grid, Divider, alpha, } from '@mui/material';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/pages-kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.254",
|
|
4
4
|
"description": "Pages Kit components and utils",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"immer": "^10.0.3",
|
|
102
102
|
"lodash": "^4.17.21",
|
|
103
103
|
"nanoid": "^3.3.7",
|
|
104
|
+
"node-fetch": "^2.7.0",
|
|
104
105
|
"react-error-boundary": "^4.0.13",
|
|
105
106
|
"react-frame-component": "^5.2.6",
|
|
106
107
|
"react-hook-form": "^7.51.0",
|