chayns-api 2.7.0-beta.1 → 3.0.0-beta.1
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/.babelrc +14 -6
- package/dist/cjs/components/ChaynsProvider.js +38 -11
- package/dist/cjs/hooks/geoLocationListener.js +53 -17
- package/dist/cjs/hooks/scrollListener.js +151 -45
- package/dist/cjs/hooks/useAccessToken.js +35 -11
- package/dist/cjs/hooks/useChaynsApiId.js +5 -2
- package/dist/cjs/hooks/useCurrentPage.js +7 -2
- package/dist/cjs/hooks/useCustomCallbackFunction.js +7 -2
- package/dist/cjs/hooks/useCustomData.js +7 -2
- package/dist/cjs/hooks/useCustomFunction.js +13 -1
- package/dist/cjs/hooks/useDevice.js +7 -2
- package/dist/cjs/hooks/useDialogState.js +42 -18
- package/dist/cjs/hooks/useEnvironment.js +7 -2
- package/dist/cjs/hooks/useFunctions.js +7 -2
- package/dist/cjs/hooks/useIsAdminMode.js +6 -3
- package/dist/cjs/hooks/useLanguage.js +7 -2
- package/dist/cjs/hooks/usePages.js +34 -14
- package/dist/cjs/hooks/useParameters.js +7 -2
- package/dist/cjs/hooks/useSite.js +7 -2
- package/dist/cjs/hooks/useStyleSettings.js +7 -2
- package/dist/cjs/hooks/useUser.js +7 -2
- package/dist/cjs/hooks/useValues.js +7 -2
- package/dist/cjs/hooks/windowMetricsListener.js +71 -25
- package/dist/cjs/host/ChaynsHost.js +157 -78
- package/dist/cjs/host/iframe/utils/useUpdateData.js +26 -10
- package/dist/cjs/host/module/ModuleHost.js +109 -37
- package/dist/cjs/types/IChaynsReact.js +4 -1
- package/dist/cjs/types/dialog.js +1 -5
- package/dist/esm/components/ChaynsProvider.js +38 -11
- package/dist/esm/components/withCompatMode.js +6 -0
- package/dist/esm/handler/DialogHandler.js +7 -0
- package/dist/esm/hooks/geoLocationListener.js +53 -17
- package/dist/esm/hooks/scrollListener.js +151 -45
- package/dist/esm/hooks/useAccessToken.js +35 -11
- package/dist/esm/hooks/useChaynsApiId.js +5 -2
- package/dist/esm/hooks/useCurrentPage.js +6 -1
- package/dist/esm/hooks/useCustomCallbackFunction.js +6 -1
- package/dist/esm/hooks/useCustomData.js +6 -1
- package/dist/esm/hooks/useCustomFunction.js +13 -1
- package/dist/esm/hooks/useDevice.js +6 -1
- package/dist/esm/hooks/useDialogState.js +42 -18
- package/dist/esm/hooks/useEnvironment.js +6 -1
- package/dist/esm/hooks/useFunctions.js +6 -1
- package/dist/esm/hooks/useIsAdminMode.js +5 -2
- package/dist/esm/hooks/useLanguage.js +6 -1
- package/dist/esm/hooks/usePages.js +34 -14
- package/dist/esm/hooks/useParameters.js +6 -1
- package/dist/esm/hooks/useSite.js +6 -1
- package/dist/esm/hooks/useStyleSettings.js +6 -1
- package/dist/esm/hooks/useUser.js +6 -1
- package/dist/esm/hooks/useValues.js +6 -1
- package/dist/esm/hooks/windowMetricsListener.js +71 -25
- package/dist/esm/host/ChaynsHost.js +157 -78
- package/dist/esm/host/iframe/utils/useUpdateData.js +26 -10
- package/dist/esm/host/module/ModuleHost.js +109 -37
- package/dist/esm/host/module/utils/loadComponent.js +4 -0
- package/dist/esm/types/IChaynsReact.js +4 -1
- package/dist/esm/wrapper/AppWrapper.js +1 -0
- package/dist/esm/wrapper/ModuleFederationWrapper.js +2 -0
- package/dist/esm/wrapper/SsrWrapper.js +4 -0
- package/dist/esm/wrapper/StaticChaynsApi.js +67 -0
- package/dist/types/types/IChaynsReact.d.ts +8 -2
- package/eslint.config.mjs +6 -0
- package/package.json +3 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { c as _c } from "react-compiler-runtime";
|
|
1
2
|
import React, { useContext, useMemo } from 'react';
|
|
2
3
|
import { ModuleContext } from '../../constants/moduleContext';
|
|
3
4
|
import loadComponent from './utils/loadComponent';
|
|
@@ -22,27 +23,31 @@ const System = ({
|
|
|
22
23
|
fallback: fallback || ''
|
|
23
24
|
}, React.createElement(Component, props));
|
|
24
25
|
};
|
|
25
|
-
const ModuleHost =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
const ModuleHost = t0 => {
|
|
27
|
+
const $ = _c(34);
|
|
28
|
+
const {
|
|
29
|
+
system,
|
|
30
|
+
children: t1,
|
|
31
|
+
functions,
|
|
32
|
+
customFunctions,
|
|
33
|
+
pages,
|
|
34
|
+
isAdminModeActive,
|
|
35
|
+
site,
|
|
36
|
+
user,
|
|
37
|
+
currentPage,
|
|
38
|
+
device,
|
|
39
|
+
language,
|
|
40
|
+
parameters,
|
|
41
|
+
customData,
|
|
42
|
+
dialog,
|
|
43
|
+
environment,
|
|
44
|
+
preventStagingReplacement,
|
|
45
|
+
styleSettings
|
|
46
|
+
} = t0;
|
|
47
|
+
const children = t1 === undefined ? null : t1;
|
|
48
|
+
let result;
|
|
49
|
+
if ($[0] !== currentPage || $[1] !== customData || $[2] !== device || $[3] !== dialog || $[4] !== environment || $[5] !== isAdminModeActive || $[6] !== language || $[7] !== pages || $[8] !== parameters || $[9] !== site || $[10] !== styleSettings || $[11] !== user) {
|
|
50
|
+
result = {
|
|
46
51
|
site,
|
|
47
52
|
isAdminModeActive,
|
|
48
53
|
pages,
|
|
@@ -60,23 +65,90 @@ const ModuleHost = ({
|
|
|
60
65
|
if (dialog) {
|
|
61
66
|
result.dialog = dialog;
|
|
62
67
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
$[0] = currentPage;
|
|
69
|
+
$[1] = customData;
|
|
70
|
+
$[2] = device;
|
|
71
|
+
$[3] = dialog;
|
|
72
|
+
$[4] = environment;
|
|
73
|
+
$[5] = isAdminModeActive;
|
|
74
|
+
$[6] = language;
|
|
75
|
+
$[7] = pages;
|
|
76
|
+
$[8] = parameters;
|
|
77
|
+
$[9] = site;
|
|
78
|
+
$[10] = styleSettings;
|
|
79
|
+
$[11] = user;
|
|
80
|
+
$[12] = result;
|
|
81
|
+
} else {
|
|
82
|
+
result = $[12];
|
|
83
|
+
}
|
|
84
|
+
const data = result;
|
|
85
|
+
let t2;
|
|
86
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
87
|
+
t2 = React.createElement("div", {
|
|
88
|
+
className: "module-css"
|
|
89
|
+
});
|
|
90
|
+
$[13] = t2;
|
|
91
|
+
} else {
|
|
92
|
+
t2 = $[13];
|
|
93
|
+
}
|
|
94
|
+
const t3 = system.scope;
|
|
95
|
+
let t4;
|
|
96
|
+
if ($[14] !== environment.buildEnvironment || $[15] !== preventStagingReplacement || $[16] !== system.url) {
|
|
97
|
+
t4 = replaceStagingUrl(preventStagingReplacement, system.url, environment.buildEnvironment);
|
|
98
|
+
$[14] = environment.buildEnvironment;
|
|
99
|
+
$[15] = preventStagingReplacement;
|
|
100
|
+
$[16] = system.url;
|
|
101
|
+
$[17] = t4;
|
|
102
|
+
} else {
|
|
103
|
+
t4 = $[17];
|
|
104
|
+
}
|
|
105
|
+
let t5;
|
|
106
|
+
if ($[18] !== environment.buildEnvironment || $[19] !== preventStagingReplacement || $[20] !== system.serverUrl) {
|
|
107
|
+
t5 = replaceStagingUrl(preventStagingReplacement, system.serverUrl, environment.buildEnvironment);
|
|
108
|
+
$[18] = environment.buildEnvironment;
|
|
109
|
+
$[19] = preventStagingReplacement;
|
|
110
|
+
$[20] = system.serverUrl;
|
|
111
|
+
$[21] = t5;
|
|
112
|
+
} else {
|
|
113
|
+
t5 = $[21];
|
|
114
|
+
}
|
|
115
|
+
let t6;
|
|
116
|
+
if ($[22] !== system.module || $[23] !== system.preventSingleton || $[24] !== system.scope || $[25] !== t4 || $[26] !== t5) {
|
|
117
|
+
t6 = {
|
|
118
|
+
scope: t3,
|
|
119
|
+
url: t4,
|
|
120
|
+
serverUrl: t5,
|
|
72
121
|
module: system.module,
|
|
73
122
|
preventSingleton: system.preventSingleton
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
123
|
+
};
|
|
124
|
+
$[22] = system.module;
|
|
125
|
+
$[23] = system.preventSingleton;
|
|
126
|
+
$[24] = system.scope;
|
|
127
|
+
$[25] = t4;
|
|
128
|
+
$[26] = t5;
|
|
129
|
+
$[27] = t6;
|
|
130
|
+
} else {
|
|
131
|
+
t6 = $[27];
|
|
132
|
+
}
|
|
133
|
+
let t7;
|
|
134
|
+
if ($[28] !== children || $[29] !== customFunctions || $[30] !== data || $[31] !== functions || $[32] !== t6) {
|
|
135
|
+
t7 = React.createElement(React.Fragment, null, t2, React.createElement(System, {
|
|
136
|
+
system: t6,
|
|
137
|
+
data: data,
|
|
138
|
+
functions: functions,
|
|
139
|
+
customFunctions: customFunctions,
|
|
140
|
+
fallback: children,
|
|
141
|
+
isModule: true
|
|
142
|
+
}));
|
|
143
|
+
$[28] = children;
|
|
144
|
+
$[29] = customFunctions;
|
|
145
|
+
$[30] = data;
|
|
146
|
+
$[31] = functions;
|
|
147
|
+
$[32] = t6;
|
|
148
|
+
$[33] = t7;
|
|
149
|
+
} else {
|
|
150
|
+
t7 = $[33];
|
|
151
|
+
}
|
|
152
|
+
return t7;
|
|
81
153
|
};
|
|
82
154
|
export default ModuleHost;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
4
|
import React from "react";
|
|
2
5
|
export const loadModule = (scope, module, url, preventSingleton = false) => {
|
|
3
6
|
if (!globalThis.moduleFederationRuntime || !globalThis.moduleFederationScopes) {
|
|
@@ -72,6 +75,7 @@ const loadComponent = (scope, module, url, skipCompatMode = false, preventSingle
|
|
|
72
75
|
class CompatComponent extends React.Component {
|
|
73
76
|
constructor(props) {
|
|
74
77
|
super(props);
|
|
78
|
+
_defineProperty(this, "ref", void 0);
|
|
75
79
|
this.ref = React.createRef();
|
|
76
80
|
}
|
|
77
81
|
componentDidMount() {
|
|
@@ -71,8 +71,11 @@ export let AccessMode = function (AccessMode) {
|
|
|
71
71
|
}({});
|
|
72
72
|
export let ScanQrCodeCodeType = function (ScanQrCodeCodeType) {
|
|
73
73
|
ScanQrCodeCodeType[ScanQrCodeCodeType["QR"] = 0] = "QR";
|
|
74
|
-
ScanQrCodeCodeType[ScanQrCodeCodeType["BARCODE"] =
|
|
74
|
+
ScanQrCodeCodeType[ScanQrCodeCodeType["BARCODE"] = 1] = "BARCODE";
|
|
75
75
|
ScanQrCodeCodeType[ScanQrCodeCodeType["ALL"] = 2] = "ALL";
|
|
76
|
+
ScanQrCodeCodeType[ScanQrCodeCodeType["CASH"] = 3] = "CASH";
|
|
77
|
+
ScanQrCodeCodeType[ScanQrCodeCodeType["DATA_MATRIX"] = 4] = "DATA_MATRIX";
|
|
78
|
+
ScanQrCodeCodeType[ScanQrCodeCodeType["PDF417"] = 5] = "PDF417";
|
|
76
79
|
return ScanQrCodeCodeType;
|
|
77
80
|
}({});
|
|
78
81
|
export let ScanQrCodeCameraTypes = function (ScanQrCodeCameraTypes) {
|
|
@@ -150,6 +150,7 @@ export class AppWrapper {
|
|
|
150
150
|
_defineProperty(this, "listeners", []);
|
|
151
151
|
_defineProperty(this, "customFunctions", {});
|
|
152
152
|
_defineProperty(this, "nextDialogEventId", 0);
|
|
153
|
+
_defineProperty(this, "chaynsApiId", void 0);
|
|
153
154
|
_defineProperty(this, "counter", 0);
|
|
154
155
|
_defineProperty(this, "functions", {
|
|
155
156
|
getAccessToken: async () => ({
|
|
@@ -7,6 +7,8 @@ import getUserInfo from '../calls/getUserInfo';
|
|
|
7
7
|
import { sendMessageToGroup, sendMessageToPage, sendMessageToUser } from '../calls/sendMessage';
|
|
8
8
|
export class ModuleFederationWrapper {
|
|
9
9
|
constructor(values, functions, customFunctions) {
|
|
10
|
+
_defineProperty(this, "values", void 0);
|
|
11
|
+
_defineProperty(this, "functions", void 0);
|
|
10
12
|
_defineProperty(this, "customFunctions", {});
|
|
11
13
|
_defineProperty(this, "listeners", []);
|
|
12
14
|
_defineProperty(this, "chaynsApiId", null);
|
|
@@ -3,6 +3,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
export class SsrWrapper {
|
|
5
5
|
constructor(values, functions, customFunctions) {
|
|
6
|
+
_defineProperty(this, "initialData", void 0);
|
|
7
|
+
_defineProperty(this, "values", void 0);
|
|
8
|
+
_defineProperty(this, "functions", void 0);
|
|
9
|
+
_defineProperty(this, "customFunctions", void 0);
|
|
6
10
|
_defineProperty(this, "listeners", []);
|
|
7
11
|
_defineProperty(this, "chaynsApiId", null);
|
|
8
12
|
_defineProperty(this, "subscribe", listener => {
|
|
@@ -10,6 +10,73 @@ import { ModuleFederationWrapper } from './ModuleFederationWrapper';
|
|
|
10
10
|
class StaticChaynsApi {
|
|
11
11
|
constructor(values, functions) {
|
|
12
12
|
var _deviceInfo$app;
|
|
13
|
+
_defineProperty(this, "addGeoLocationListener", void 0);
|
|
14
|
+
_defineProperty(this, "addScrollListener", void 0);
|
|
15
|
+
_defineProperty(this, "addVisibilityChangeListener", void 0);
|
|
16
|
+
_defineProperty(this, "addToolbarChangeListener", void 0);
|
|
17
|
+
_defineProperty(this, "addWindowMetricsListener", void 0);
|
|
18
|
+
_defineProperty(this, "customCallbackFunction", void 0);
|
|
19
|
+
_defineProperty(this, "getAvailableSharingServices", void 0);
|
|
20
|
+
_defineProperty(this, "getAccessToken", void 0);
|
|
21
|
+
_defineProperty(this, "getCustomCookie", void 0);
|
|
22
|
+
_defineProperty(this, "getGeoLocation", void 0);
|
|
23
|
+
_defineProperty(this, "getUserInfo", void 0);
|
|
24
|
+
_defineProperty(this, "getScrollPosition", void 0);
|
|
25
|
+
_defineProperty(this, "getWindowMetrics", void 0);
|
|
26
|
+
_defineProperty(this, "invokeCall", void 0);
|
|
27
|
+
_defineProperty(this, "invokePaymentCall", void 0);
|
|
28
|
+
_defineProperty(this, "invokeDialogCall", void 0);
|
|
29
|
+
_defineProperty(this, "login", void 0);
|
|
30
|
+
_defineProperty(this, "logout", void 0);
|
|
31
|
+
_defineProperty(this, "navigateBack", void 0);
|
|
32
|
+
_defineProperty(this, "openImage", void 0);
|
|
33
|
+
_defineProperty(this, "openUrl", void 0);
|
|
34
|
+
_defineProperty(this, "openVideo", void 0);
|
|
35
|
+
_defineProperty(this, "openMedia", void 0);
|
|
36
|
+
_defineProperty(this, "refreshData", void 0);
|
|
37
|
+
_defineProperty(this, "refreshAccessToken", void 0);
|
|
38
|
+
_defineProperty(this, "removeGeoLocationListener", void 0);
|
|
39
|
+
_defineProperty(this, "removeScrollListener", void 0);
|
|
40
|
+
_defineProperty(this, "removeVisibilityChangeListener", void 0);
|
|
41
|
+
_defineProperty(this, "removeToolbarChangeListener", void 0);
|
|
42
|
+
_defineProperty(this, "removeWindowMetricsListener", void 0);
|
|
43
|
+
_defineProperty(this, "selectPage", void 0);
|
|
44
|
+
_defineProperty(this, "scrollToY", void 0);
|
|
45
|
+
_defineProperty(this, "sendMessageToGroup", void 0);
|
|
46
|
+
_defineProperty(this, "sendMessageToPage", void 0);
|
|
47
|
+
_defineProperty(this, "sendMessageToUser", void 0);
|
|
48
|
+
_defineProperty(this, "setAdminMode", void 0);
|
|
49
|
+
_defineProperty(this, "setCustomCookie", void 0);
|
|
50
|
+
_defineProperty(this, "setDisplayTimeout", void 0);
|
|
51
|
+
_defineProperty(this, "setFloatingButton", void 0);
|
|
52
|
+
_defineProperty(this, "setHeight", void 0);
|
|
53
|
+
_defineProperty(this, "setRefreshScrollEnabled", void 0);
|
|
54
|
+
_defineProperty(this, "setScanQrCode", void 0);
|
|
55
|
+
_defineProperty(this, "setTempDesignSettings", void 0);
|
|
56
|
+
_defineProperty(this, "setWaitCursor", void 0);
|
|
57
|
+
_defineProperty(this, "storageGetItem", void 0);
|
|
58
|
+
_defineProperty(this, "storageRemoveItem", void 0);
|
|
59
|
+
_defineProperty(this, "storageSetItem", void 0);
|
|
60
|
+
_defineProperty(this, "vibrate", void 0);
|
|
61
|
+
_defineProperty(this, "scrollByY", void 0);
|
|
62
|
+
_defineProperty(this, "setOverlay", void 0);
|
|
63
|
+
_defineProperty(this, "createDialog", void 0);
|
|
64
|
+
_defineProperty(this, "openDialog", void 0);
|
|
65
|
+
_defineProperty(this, "closeDialog", void 0);
|
|
66
|
+
_defineProperty(this, "setDialogResult", void 0);
|
|
67
|
+
_defineProperty(this, "dispatchEventToDialogClient", void 0);
|
|
68
|
+
_defineProperty(this, "addDialogClientEventListener", void 0);
|
|
69
|
+
_defineProperty(this, "removeDialogClientEventListener", void 0);
|
|
70
|
+
_defineProperty(this, "dispatchEventToDialogHost", void 0);
|
|
71
|
+
_defineProperty(this, "addDialogHostEventListener", void 0);
|
|
72
|
+
_defineProperty(this, "removeDialogHostEventListener", void 0);
|
|
73
|
+
_defineProperty(this, "addAnonymousAccount", void 0);
|
|
74
|
+
_defineProperty(this, "addAccessTokenChangeListener", void 0);
|
|
75
|
+
_defineProperty(this, "removeAccessTokenChangeListener", void 0);
|
|
76
|
+
_defineProperty(this, "redirect", void 0);
|
|
77
|
+
_defineProperty(this, "ready", void 0);
|
|
78
|
+
_defineProperty(this, "addDataListener", void 0);
|
|
79
|
+
_defineProperty(this, "_wrapper", void 0);
|
|
13
80
|
_defineProperty(this, "getUser", () => this._wrapper.values.user);
|
|
14
81
|
_defineProperty(this, "getSite", () => this._wrapper.values.site);
|
|
15
82
|
_defineProperty(this, "getCurrentPage", () => this._wrapper.values.currentPage);
|
|
@@ -511,8 +511,12 @@ export type IntercomMessage = {
|
|
|
511
511
|
};
|
|
512
512
|
export declare enum ScanQrCodeCodeType {
|
|
513
513
|
QR = 0,
|
|
514
|
-
BARCODE =
|
|
515
|
-
|
|
514
|
+
BARCODE = 1,
|
|
515
|
+
/** @deprecated Use codeTypes and explicitly set all **/
|
|
516
|
+
ALL = 2,
|
|
517
|
+
CASH = 3,
|
|
518
|
+
DATA_MATRIX = 4,
|
|
519
|
+
PDF417 = 5
|
|
516
520
|
}
|
|
517
521
|
export declare enum ScanQrCodeCameraTypes {
|
|
518
522
|
AUTO = 0,
|
|
@@ -530,7 +534,9 @@ export type ScanQrCodeRequest = {
|
|
|
530
534
|
ccAnimation?: boolean;
|
|
531
535
|
geoLocation?: boolean;
|
|
532
536
|
showInput?: boolean;
|
|
537
|
+
/** @deprecated Use **codeTypes** instead **/
|
|
533
538
|
codeType?: ScanQrCodeCodeType;
|
|
539
|
+
codeTypes?: ScanQrCodeCodeType[];
|
|
534
540
|
codeFormats?: 4 | 5;
|
|
535
541
|
};
|
|
536
542
|
export type ScanQrCodeResult = {
|
package/eslint.config.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import config from '@chayns-toolkit/eslint-config';
|
|
2
2
|
|
|
3
|
+
import hooksPlugin from 'eslint-plugin-react-hooks';
|
|
4
|
+
|
|
5
|
+
// Enable rules for react-compiler which are not enabled by default
|
|
6
|
+
const rule = config.find(rule => rule.plugins?.['react-hooks']);
|
|
7
|
+
Object.assign(rule.rules, hooksPlugin.configs['recommended-latest'][0].rules);
|
|
8
|
+
|
|
3
9
|
export default config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chayns-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "new chayns api",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"comlink": "4.3.1",
|
|
53
53
|
"htmlescape": "^1.1.1",
|
|
54
54
|
"lodash.throttle": "^4.1.1",
|
|
55
|
+
"react-compiler-runtime": "^1.0.0",
|
|
55
56
|
"ua-parser-js": "^1.0.41",
|
|
56
57
|
"use-sync-external-store": "^1.6.0"
|
|
57
58
|
},
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
"@types/react-dom": "^18.3.7",
|
|
72
73
|
"@types/ua-parser-js": "^0.7.39",
|
|
73
74
|
"@types/use-sync-external-store": "^1.5.0",
|
|
75
|
+
"babel-plugin-react-compiler": "^1.0.0",
|
|
74
76
|
"chayns-toolkit": "^4.0.0-beta.0",
|
|
75
77
|
"concurrently": "^9.2.1",
|
|
76
78
|
"cross-env": "^10.1.0",
|