@steroidsjs/core 2.2.87 → 2.3.0-beta.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/components/JwtHttpComponent.d.ts +1 -4
- package/components/JwtHttpComponent.js +21 -3
- package/package.json +10 -8
- package/ui/form/SliderField/demo/marks.js +3 -1
- package/ui/layout/Portal.d.ts +2 -1
- package/ui/layout/Tooltip/TooltipPortalInner.d.ts +1 -1
- package/ui/list/Empty/demo/custom-text.js +3 -1
- package/ui/list/List/demo/condition.js +3 -1
- package/ui/list/List/demo/layout.js +3 -1
- package/ui/list/List/demo/search-form.js +3 -1
- package/ui/list/List/demo/sort.js +3 -1
- package/ui/list/SearchForm/demo/basic.js +3 -1
- package/ui/nav/Router/ConnectedRouter.d.ts +1 -1
|
@@ -7,10 +7,7 @@ export default class JwtHttpComponent extends BaseHttpComponent {
|
|
|
7
7
|
refreshTokenKey: string;
|
|
8
8
|
_refreshToken: any;
|
|
9
9
|
constructor(components: any, config?: any);
|
|
10
|
-
getAxiosConfig(): Promise<
|
|
11
|
-
withCredentials: boolean;
|
|
12
|
-
headers: any;
|
|
13
|
-
}>;
|
|
10
|
+
getAxiosConfig(): Promise<any>;
|
|
14
11
|
private setRefreshTokenInterceptor;
|
|
15
12
|
getAxiosInstance(): Promise<any>;
|
|
16
13
|
removeRefreshToken(): void;
|
|
@@ -55,7 +55,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
55
55
|
};
|
|
56
56
|
exports.__esModule = true;
|
|
57
57
|
var axios_1 = __importDefault(require("axios"));
|
|
58
|
+
// @ts-ignore
|
|
58
59
|
var HttpComponent_1 = __importDefault(require("@steroidsjs/core/components/HttpComponent"));
|
|
60
|
+
// @ts-ignore
|
|
59
61
|
var auth_1 = require("@steroidsjs/core/actions/auth");
|
|
60
62
|
var JwtHttpComponent = /** @class */ (function (_super) {
|
|
61
63
|
__extends(JwtHttpComponent, _super);
|
|
@@ -139,27 +141,40 @@ var JwtHttpComponent = /** @class */ (function (_super) {
|
|
|
139
141
|
switch (_d.label) {
|
|
140
142
|
case 0:
|
|
141
143
|
if (!!this._axios) return [3 /*break*/, 2];
|
|
144
|
+
// @ts-ignore
|
|
142
145
|
_a = this;
|
|
143
146
|
_c = (_b = axios_1["default"]).create;
|
|
144
147
|
return [4 /*yield*/, this.getAxiosConfig()];
|
|
145
148
|
case 1:
|
|
149
|
+
// @ts-ignore
|
|
146
150
|
_a._axios = _c.apply(_b, [_d.sent()]);
|
|
151
|
+
// @ts-ignore
|
|
147
152
|
this.setRefreshTokenInterceptor(this._axios);
|
|
148
153
|
_d.label = 2;
|
|
149
|
-
case 2:
|
|
154
|
+
case 2:
|
|
155
|
+
// @ts-ignore
|
|
156
|
+
return [2 /*return*/, this._axios];
|
|
150
157
|
}
|
|
151
158
|
});
|
|
152
159
|
});
|
|
153
160
|
};
|
|
154
161
|
JwtHttpComponent.prototype.removeRefreshToken = function () {
|
|
155
162
|
this._refreshToken = null;
|
|
163
|
+
// @ts-ignore
|
|
156
164
|
this.resetConfig();
|
|
157
|
-
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
this._components.clientStorage.remove(this.refreshTokenKey,
|
|
167
|
+
// @ts-ignore
|
|
168
|
+
this._components.clientStorage.STORAGE_COOKIE);
|
|
158
169
|
};
|
|
159
170
|
JwtHttpComponent.prototype.setRefreshToken = function (value) {
|
|
160
171
|
this._refreshToken = value;
|
|
172
|
+
// @ts-ignore
|
|
161
173
|
this.resetConfig();
|
|
162
|
-
|
|
174
|
+
// @ts-ignore
|
|
175
|
+
this._components.clientStorage.set(this.refreshTokenKey, value,
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
this._components.clientStorage.STORAGE_COOKIE, 180);
|
|
163
178
|
};
|
|
164
179
|
JwtHttpComponent.prototype.getRefreshToken = function () {
|
|
165
180
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -168,9 +183,11 @@ var JwtHttpComponent = /** @class */ (function (_super) {
|
|
|
168
183
|
switch (_b.label) {
|
|
169
184
|
case 0:
|
|
170
185
|
if (!(this._refreshToken === false)) return [3 /*break*/, 2];
|
|
186
|
+
// @ts-ignore
|
|
171
187
|
_a = this;
|
|
172
188
|
return [4 /*yield*/, this._components.clientStorage.get(this.refreshTokenKey)];
|
|
173
189
|
case 1:
|
|
190
|
+
// @ts-ignore
|
|
174
191
|
_a._refreshToken = (_b.sent()) || null;
|
|
175
192
|
_b.label = 2;
|
|
176
193
|
case 2: return [2 /*return*/, this._refreshToken];
|
|
@@ -179,6 +196,7 @@ var JwtHttpComponent = /** @class */ (function (_super) {
|
|
|
179
196
|
});
|
|
180
197
|
};
|
|
181
198
|
JwtHttpComponent.prototype.onLogout = function () {
|
|
199
|
+
// @ts-ignore
|
|
182
200
|
this.removeAccessToken();
|
|
183
201
|
this.removeRefreshToken();
|
|
184
202
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/core",
|
|
3
|
-
"version": "2.2
|
|
3
|
+
"version": "2.3.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
6
6
|
"repository": {
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"axios": "^0.21.1",
|
|
28
28
|
"connected-react-router": "^6.9.1",
|
|
29
|
+
"date-fns": "^2.29.3",
|
|
29
30
|
"domready": "^1.0.8",
|
|
30
31
|
"dot-prop-immutable": "^2.1.0",
|
|
31
32
|
"fileup-core": "^1.2.2",
|
|
32
33
|
"history": "^4.10.1",
|
|
33
|
-
"intl-messageformat": "^
|
|
34
|
+
"intl-messageformat": "^10.1.4",
|
|
34
35
|
"js-cookie": "^2.2.1",
|
|
35
36
|
"load-js": "^3.0.3",
|
|
36
37
|
"lodash": "^4.17.21",
|
|
@@ -39,10 +40,10 @@
|
|
|
39
40
|
"path-to-regexp": "^1.7.0",
|
|
40
41
|
"qs": "^6.9.4",
|
|
41
42
|
"query-string": "^6.14.0",
|
|
42
|
-
"react": "^
|
|
43
|
+
"react": "^18.2.0",
|
|
43
44
|
"react-click-outside": "^3.0.1",
|
|
44
|
-
"react-day-picker": "^
|
|
45
|
-
"react-dom": "^
|
|
45
|
+
"react-day-picker": "^8.2.1",
|
|
46
|
+
"react-dom": "^18.2.0",
|
|
46
47
|
"react-grid-gallery": "^0.4.8",
|
|
47
48
|
"react-helmet": "^6.1.0",
|
|
48
49
|
"react-image-crop": "^9.0.2",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"react-redux": "7.1.1",
|
|
51
52
|
"react-router": "^5.2.0",
|
|
52
53
|
"react-router-dom": "^5.2.0",
|
|
53
|
-
"react-use": "^17.
|
|
54
|
+
"react-use": "^17.4.0",
|
|
54
55
|
"redux": "^4.0.4",
|
|
55
56
|
"redux-mock-store": "^1.5.4",
|
|
56
57
|
"set-cookie-parser": "^2.4.8"
|
|
@@ -64,10 +65,11 @@
|
|
|
64
65
|
"@types/enzyme": "^3.10.8",
|
|
65
66
|
"@types/enzyme-adapter-react-16": "^1.0.6",
|
|
66
67
|
"@types/jest": "^26.0.22",
|
|
67
|
-
"@types/markdown-to-jsx": "^
|
|
68
|
+
"@types/markdown-to-jsx": "^7.0.1",
|
|
68
69
|
"@types/reach__router": "^1.3.7",
|
|
69
|
-
"@types/react": "
|
|
70
|
+
"@types/react": "^18.0.20",
|
|
70
71
|
"@types/react-color": "^3.0.4",
|
|
72
|
+
"@types/react-dom": "^18.0.6",
|
|
71
73
|
"@types/react-syntax-highlighter": "^13.5.0",
|
|
72
74
|
"@types/webpack-env": "^1.16.0",
|
|
73
75
|
"@typescript-eslint/eslint-plugin": "^4.15.0",
|
|
@@ -42,4 +42,6 @@ var marks = {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
exports["default"] = (function () { return (React.createElement("div", { style: { padding: '20px 30px' } },
|
|
45
|
-
React.createElement(SliderField_1["default"], { min: -10, max: 80,
|
|
45
|
+
React.createElement(SliderField_1["default"], { min: -10, max: 80,
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
marks: marks }))); });
|
package/ui/layout/Portal.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export default function Portal(props: any): import("react").ReactPortal;
|
|
@@ -30,4 +30,6 @@ var Empty_1 = __importDefault(require("../Empty"));
|
|
|
30
30
|
* @col 6
|
|
31
31
|
*/
|
|
32
32
|
exports["default"] = (function () { return (React.createElement(React.Fragment, null,
|
|
33
|
-
React.createElement(Empty_1["default"], { text: '\u041A \u0441\u043E\u0436\u0430\u043B\u0435\u043D\u0438\u044E, \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E',
|
|
33
|
+
React.createElement(Empty_1["default"], { text: '\u041A \u0441\u043E\u0436\u0430\u043B\u0435\u043D\u0438\u044E, \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E',
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
view: function (props) { return (React.createElement("div", { className: 'alert alert-primary', role: 'alert' }, props.text)); } }))); });
|
|
@@ -81,6 +81,8 @@ exports["default"] = (function () { return (React.createElement(List_1["default"
|
|
|
81
81
|
return ['>=', 'age', 18];
|
|
82
82
|
}
|
|
83
83
|
return [];
|
|
84
|
-
}, className: 'list-group',
|
|
84
|
+
}, className: 'list-group',
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
itemView: function (props) { return (React.createElement("div", { className: 'list-group-item' },
|
|
85
87
|
React.createElement("div", null, props.item.name),
|
|
86
88
|
React.createElement("div", null, "Age: " + props.item.age))); } })); });
|
|
@@ -41,5 +41,7 @@ exports["default"] = (function () { return (React.createElement(List_1["default"
|
|
|
41
41
|
label: 'Grid'
|
|
42
42
|
},
|
|
43
43
|
]
|
|
44
|
-
}, contentClassName: 'row mx-lg-n1',
|
|
44
|
+
}, contentClassName: 'row mx-lg-n1',
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
itemView: function (props) { return (React.createElement("div", { className: "py-1 px-lg-1 " + (props.layoutSelected === 'list' ? 'col-12' : 'col-6') },
|
|
45
47
|
React.createElement("div", { className: 'card p-2' }, props.item.title))); } })); });
|
|
@@ -98,6 +98,8 @@ exports.searchForm = {
|
|
|
98
98
|
exports["default"] = (function () { return (React.createElement(List_1["default"], { listId: 'ListDemoSearch', items: exports.items, searchForm: exports.searchForm, paginationSize: {
|
|
99
99
|
attribute: 'ps',
|
|
100
100
|
sizes: [2, 4]
|
|
101
|
-
}, addressBar: true, className: 'list-group',
|
|
101
|
+
}, addressBar: true, className: 'list-group',
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
itemView: function (props) { return (React.createElement("div", { className: 'list-group-item' },
|
|
102
104
|
React.createElement("div", null, props.item.name),
|
|
103
105
|
React.createElement("div", null, "Category: " + props.item.category))); } })); });
|
|
@@ -83,6 +83,8 @@ exports["default"] = (function () { return (React.createElement(List_1["default"
|
|
|
83
83
|
}, sort: {
|
|
84
84
|
enable: true,
|
|
85
85
|
defaultValue: '-price'
|
|
86
|
-
},
|
|
86
|
+
},
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
itemView: function (props) { return (React.createElement("div", { className: 'list-group-item' },
|
|
87
89
|
React.createElement("div", null, props.item.title),
|
|
88
90
|
React.createElement("div", null, "Price: " + props.item.price + " $"))); } })); });
|
|
@@ -30,6 +30,8 @@ var search_form_1 = require("../../List/demo/search-form");
|
|
|
30
30
|
* @order 1
|
|
31
31
|
* @col 6
|
|
32
32
|
*/
|
|
33
|
-
exports["default"] = (function () { return (React.createElement(List_1["default"], { listId: 'ListDemoSearch', items: search_form_1.items, searchForm: search_form_1.searchForm, className: 'list-group',
|
|
33
|
+
exports["default"] = (function () { return (React.createElement(List_1["default"], { listId: 'ListDemoSearch', items: search_form_1.items, searchForm: search_form_1.searchForm, className: 'list-group',
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
itemView: function (props) { return (React.createElement("div", { className: 'list-group-item' },
|
|
34
36
|
React.createElement("div", null, props.item.name),
|
|
35
37
|
React.createElement("div", null, "Category: " + props.item.category))); } })); });
|
|
@@ -3,7 +3,7 @@ interface IConnectedRouterProps {
|
|
|
3
3
|
store?: any;
|
|
4
4
|
history?: any;
|
|
5
5
|
}
|
|
6
|
-
export default class ConnectedRouter extends React.PureComponent<IConnectedRouterProps
|
|
6
|
+
export default class ConnectedRouter extends React.PureComponent<React.PropsWithChildren<IConnectedRouterProps>> {
|
|
7
7
|
inTimeTravelling?: any;
|
|
8
8
|
unsubscribe?: any;
|
|
9
9
|
unlisten?: any;
|