@kameleoon/react-sdk 6.1.0 → 6.1.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/dist/KameleoonContext.js +7 -3
- package/dist/KameleoonContext.js.map +1 -1
- package/dist/KameleoonError.js +16 -27
- package/dist/KameleoonError.js.map +1 -1
- package/dist/KameleoonProvider.js +18 -19
- package/dist/KameleoonProvider.js.map +1 -1
- package/dist/ProviderError.js +10 -25
- package/dist/ProviderError.js.map +1 -1
- package/dist/constants.js +6 -2
- package/dist/constants.js.map +1 -1
- package/dist/eventSource/browserEventSource.js +40 -30
- package/dist/eventSource/browserEventSource.js.map +1 -1
- package/dist/eventSource/index.js +18 -6
- package/dist/eventSource/index.js.map +1 -1
- package/dist/eventSource/nativeEventSource.js +42 -35
- package/dist/eventSource/nativeEventSource.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +288 -50
- package/dist/index.js.map +1 -1
- package/dist/kameleoonClient.js +27 -22
- package/dist/kameleoonClient.js.map +1 -1
- package/dist/kameleoonUtils/browserUtils.js +45 -58
- package/dist/kameleoonUtils/browserUtils.js.map +1 -1
- package/dist/kameleoonUtils/nativeUtils.js +38 -54
- package/dist/kameleoonUtils/nativeUtils.js.map +1 -1
- package/dist/requester.d.ts +5 -0
- package/dist/requester.js +29 -0
- package/dist/requester.js.map +1 -0
- package/dist/storage/index.js +18 -6
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/localStorage.js +37 -39
- package/dist/storage/localStorage.js.map +1 -1
- package/dist/storage/nativeStorage.js +36 -36
- package/dist/storage/nativeStorage.js.map +1 -1
- package/dist/useAddData.js +26 -49
- package/dist/useAddData.js.map +1 -1
- package/dist/useBrowserVisitorCode.js +13 -11
- package/dist/useBrowserVisitorCode.js.map +1 -1
- package/dist/useConfigurationUpdate.js +26 -20
- package/dist/useConfigurationUpdate.js.map +1 -1
- package/dist/useError.js +14 -12
- package/dist/useError.js.map +1 -1
- package/dist/useErrors.js +15 -38
- package/dist/useErrors.js.map +1 -1
- package/dist/useExperiments.js +27 -21
- package/dist/useExperiments.js.map +1 -1
- package/dist/useFeatureFlagActive.js +27 -21
- package/dist/useFeatureFlagActive.js.map +1 -1
- package/dist/useFeatureFlagVariationKey.js +27 -21
- package/dist/useFeatureFlagVariationKey.js.map +1 -1
- package/dist/useFeatureFlags.js +27 -21
- package/dist/useFeatureFlags.js.map +1 -1
- package/dist/useFeatureVariable.js +27 -21
- package/dist/useFeatureVariable.js.map +1 -1
- package/dist/useFlushData.js +16 -12
- package/dist/useFlushData.js.map +1 -1
- package/dist/useInitialize.js +27 -65
- package/dist/useInitialize.js.map +1 -1
- package/dist/useKameleoon.js +15 -13
- package/dist/useKameleoon.js.map +1 -1
- package/dist/useNativeVisitorCode.js +13 -11
- package/dist/useNativeVisitorCode.js.map +1 -1
- package/dist/useRemoteData.js +28 -67
- package/dist/useRemoteData.js.map +1 -1
- package/dist/useTrackConversion.js +26 -20
- package/dist/useTrackConversion.js.map +1 -1
- package/dist/useTriggerExperiment.js +28 -22
- package/dist/useTriggerExperiment.js.map +1 -1
- package/dist/useVisitorExperiments.js +27 -21
- package/dist/useVisitorExperiments.js.map +1 -1
- package/dist/useVisitorFeatureFlags.js +27 -21
- package/dist/useVisitorFeatureFlags.js.map +1 -1
- package/package.json +9 -6
package/dist/useError.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useError = useError;
|
|
7
|
+
var _react = require("react");
|
|
5
8
|
function useError() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const errorRef = (0, _react.useRef)(null);
|
|
10
|
+
const setError = (0, _react.useCallback)(unknownError => {
|
|
11
|
+
errorRef.current = unknownError;
|
|
12
|
+
}, [errorRef]);
|
|
13
|
+
return {
|
|
14
|
+
error: errorRef.current,
|
|
15
|
+
setError
|
|
16
|
+
};
|
|
14
17
|
}
|
|
15
|
-
exports.useError = useError;
|
|
16
18
|
//# sourceMappingURL=useError.js.map
|
package/dist/useError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useError.js","
|
|
1
|
+
{"version":3,"file":"useError.js","names":["_react","require","useError","errorRef","useRef","setError","useCallback","unknownError","current","error"],"sources":["../src/useError.ts"],"sourcesContent":["import { useCallback, useRef } from 'react';\nimport { KameleoonError } from './KameleoonError';\n\ntype UseErrorHookResultType = {\n error: KameleoonError | null;\n setError: (unknownError: unknown) => void;\n};\n\nexport function useError(): UseErrorHookResultType {\n const errorRef = useRef<KameleoonError | null>(null);\n\n const setError = useCallback(\n (unknownError: unknown) => {\n errorRef.current = unknownError as KameleoonError;\n },\n [errorRef],\n );\n\n return {\n error: errorRef.current,\n setError,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQO,SAASC,QAAQA,CAAA,EAA2B;EACjD,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAwB,IAAI,CAAC;EAEpD,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EACzBC,YAAqB,IAAK;IACzBJ,QAAQ,CAACK,OAAO,GAAGD,YAA8B;EACnD,CAAC,EACD,CAACJ,QAAQ,CAAC,CACX;EAED,OAAO;IACLM,KAAK,EAAEN,QAAQ,CAACK,OAAO;IACvBH;EACF,CAAC;AACH"}
|
package/dist/useErrors.js
CHANGED
|
@@ -1,42 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
catch (error) { e = { error: error }; }
|
|
10
|
-
finally {
|
|
11
|
-
try {
|
|
12
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
-
}
|
|
14
|
-
finally { if (e) throw e.error; }
|
|
15
|
-
}
|
|
16
|
-
return ar;
|
|
17
|
-
};
|
|
18
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
-
if (ar || !(i in from)) {
|
|
21
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
-
ar[i] = from[i];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.useErrors = void 0;
|
|
29
|
-
var react_1 = require("react");
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useErrors = useErrors;
|
|
7
|
+
var _react = require("react");
|
|
30
8
|
function useErrors() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
9
|
+
const errorsRef = (0, _react.useRef)([]);
|
|
10
|
+
const setErrors = (0, _react.useCallback)(newErrors => {
|
|
11
|
+
const uniqueErrors = [...new Set(newErrors)].filter(value => Boolean(value));
|
|
12
|
+
errorsRef.current = uniqueErrors;
|
|
13
|
+
}, [errorsRef]);
|
|
14
|
+
return {
|
|
15
|
+
errors: errorsRef.current,
|
|
16
|
+
setErrors
|
|
17
|
+
};
|
|
40
18
|
}
|
|
41
|
-
exports.useErrors = useErrors;
|
|
42
19
|
//# sourceMappingURL=useErrors.js.map
|
package/dist/useErrors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useErrors.js","
|
|
1
|
+
{"version":3,"file":"useErrors.js","names":["_react","require","useErrors","errorsRef","useRef","setErrors","useCallback","newErrors","uniqueErrors","Set","filter","value","Boolean","current","errors"],"sources":["../src/useErrors.ts"],"sourcesContent":["import { useCallback, useRef } from 'react';\nimport { KameleoonException } from '@kameleoon/javascript-sdk-core';\n\ntype UseErrorsHookResultType = {\n errors: KameleoonException[];\n setErrors: (newErrors: Array<KameleoonException | undefined>) => void;\n};\n\nexport function useErrors(): UseErrorsHookResultType {\n const errorsRef = useRef<KameleoonException[]>([]);\n\n const setErrors = useCallback(\n (newErrors: Array<KameleoonException | undefined>) => {\n const uniqueErrors = [...new Set(newErrors)].filter(\n (value): value is KameleoonException => Boolean(value),\n );\n\n errorsRef.current = uniqueErrors;\n },\n [errorsRef],\n );\n\n return {\n errors: errorsRef.current,\n setErrors,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQO,SAASC,SAASA,CAAA,EAA4B;EACnD,MAAMC,SAAS,GAAG,IAAAC,aAAM,EAAuB,EAAE,CAAC;EAElD,MAAMC,SAAS,GAAG,IAAAC,kBAAW,EAC1BC,SAAgD,IAAK;IACpD,MAAMC,YAAY,GAAG,CAAC,GAAG,IAAIC,GAAG,CAACF,SAAS,CAAC,CAAC,CAACG,MAAM,CAChDC,KAAK,IAAkCC,OAAO,CAACD,KAAK,CAAC,CACvD;IAEDR,SAAS,CAACU,OAAO,GAAGL,YAAY;EAClC,CAAC,EACD,CAACL,SAAS,CAAC,CACZ;EAED,OAAO;IACLW,MAAM,EAAEX,SAAS,CAACU,OAAO;IACzBR;EACF,CAAC;AACH"}
|
package/dist/useExperiments.js
CHANGED
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useExperiments = useExperiments;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
9
|
+
var _useError = require("./useError");
|
|
7
10
|
/**
|
|
8
11
|
* A React Hook that returns `getExperiments` function which returns a list of experiments.
|
|
9
12
|
*
|
|
10
13
|
* @returns {IExperimentsHookResult} an object containing the `getExperiments` function and an optional error object.
|
|
11
14
|
*/
|
|
12
15
|
function useExperiments() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const {
|
|
17
|
+
client
|
|
18
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
19
|
+
const {
|
|
20
|
+
error,
|
|
21
|
+
setError
|
|
22
|
+
} = (0, _useError.useError)();
|
|
23
|
+
const getExperiments = (0, _react.useCallback)(() => {
|
|
24
|
+
try {
|
|
25
|
+
return client.getExperiments();
|
|
26
|
+
} catch (unknownError) {
|
|
27
|
+
setError(unknownError);
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
}, [client]);
|
|
31
|
+
return {
|
|
32
|
+
getExperiments,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
28
35
|
}
|
|
29
|
-
exports.useExperiments = useExperiments;
|
|
30
36
|
//# sourceMappingURL=useExperiments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExperiments.js","
|
|
1
|
+
{"version":3,"file":"useExperiments.js","names":["_react","require","_useKameleoon","_useError","useExperiments","client","useKameleoon","error","setError","useError","getExperiments","useCallback","unknownError"],"sources":["../src/useExperiments.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { ExperimentType } from '@kameleoon/javascript-sdk-core';\nimport { useKameleoon } from './useKameleoon';\nimport { useError } from './useError';\nimport { KameleoonError } from './KameleoonError';\n\nexport interface IExperimentsHookResult {\n /**\n * Returns a list of experiments stored in the client configuration.\n *\n * @returns {ExperimentType[]} a list of all experiments items with `id` and `name` fields.\n */\n getExperiments: () => ExperimentType[];\n /** An optional error object that may be returned if an error occurs while calling the `getExperiments` function. */\n error: KameleoonError | null;\n}\n\n/**\n * A React Hook that returns `getExperiments` function which returns a list of experiments.\n *\n * @returns {IExperimentsHookResult} an object containing the `getExperiments` function and an optional error object.\n */\nexport function useExperiments(): IExperimentsHookResult {\n const { client } = useKameleoon();\n const { error, setError } = useError();\n\n const getExperiments = useCallback((): ExperimentType[] => {\n try {\n return client.getExperiments();\n } catch (unknownError) {\n setError(unknownError);\n\n return [];\n }\n }, [client]);\n\n return {\n getExperiments,\n error,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAcA;AACA;AACA;AACA;AACA;AACO,SAASG,cAAcA,CAAA,EAA2B;EACvD,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,0BAAY,GAAE;EACjC,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAG,IAAAC,kBAAQ,GAAE;EAEtC,MAAMC,cAAc,GAAG,IAAAC,kBAAW,EAAC,MAAwB;IACzD,IAAI;MACF,OAAON,MAAM,CAACK,cAAc,EAAE;IAChC,CAAC,CAAC,OAAOE,YAAY,EAAE;MACrBJ,QAAQ,CAACI,YAAY,CAAC;MAEtB,OAAO,EAAE;IACX;EACF,CAAC,EAAE,CAACP,MAAM,CAAC,CAAC;EAEZ,OAAO;IACLK,cAAc;IACdH;EACF,CAAC;AACH"}
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFeatureFlagActive = useFeatureFlagActive;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
9
|
+
var _useError = require("./useError");
|
|
7
10
|
/**
|
|
8
11
|
* A React Hook that returns `isFeatureFlagActive` function which indicates whether the visitor with `visitorCode` has `featureKey` active for him.
|
|
9
12
|
*
|
|
10
13
|
* @returns {IFeatureFlagActiveHookResult} an object containing the `isFeatureFlagActive` function.
|
|
11
14
|
*/
|
|
12
15
|
function useFeatureFlagActive() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const {
|
|
17
|
+
client
|
|
18
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
19
|
+
const {
|
|
20
|
+
error,
|
|
21
|
+
setError
|
|
22
|
+
} = (0, _useError.useError)();
|
|
23
|
+
const isFeatureFlagActive = (0, _react.useCallback)((visitorCode, featureKey) => {
|
|
24
|
+
try {
|
|
25
|
+
return client.isFeatureFlagActive(visitorCode, featureKey);
|
|
26
|
+
} catch (unknownError) {
|
|
27
|
+
setError(unknownError);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}, [client, setError]);
|
|
31
|
+
return {
|
|
32
|
+
isFeatureFlagActive,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
28
35
|
}
|
|
29
|
-
exports.useFeatureFlagActive = useFeatureFlagActive;
|
|
30
36
|
//# sourceMappingURL=useFeatureFlagActive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureFlagActive.js","
|
|
1
|
+
{"version":3,"file":"useFeatureFlagActive.js","names":["_react","require","_useKameleoon","_useError","useFeatureFlagActive","client","useKameleoon","error","setError","useError","isFeatureFlagActive","useCallback","visitorCode","featureKey","unknownError"],"sources":["../src/useFeatureFlagActive.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useKameleoon } from './useKameleoon';\nimport { KameleoonError } from './KameleoonError';\nimport { useError } from './useError';\n\nexport interface IFeatureFlagActiveHookResult {\n /**\n * Indicates whether the visitor with `visitorCode` has `featureKey` active for him, this method includes targeting check, finding the according variation exposed to the visitor and saving it to storage along with sending tracking request if the feature rollout rule was of type of `Experimentation`.\n *\n * @param {string} visitorCode - unique visitor identification string, can't exceed 255 characters length.\n * @param {string} featureKey - a unique key for feature flag.\n * @returns {boolean} a boolean indicator of whether the feature flag with `featureKey` is active for visitor with `visitorCode`.\n */\n isFeatureFlagActive: (visitorCode: string, featureKey: string) => boolean;\n /** An optional error object that may be returned if an error occurs while calling the `isFeatureFlagActive` function. */\n error: KameleoonError | null;\n}\n\n/**\n * A React Hook that returns `isFeatureFlagActive` function which indicates whether the visitor with `visitorCode` has `featureKey` active for him.\n *\n * @returns {IFeatureFlagActiveHookResult} an object containing the `isFeatureFlagActive` function.\n */\nexport function useFeatureFlagActive(): IFeatureFlagActiveHookResult {\n const { client } = useKameleoon();\n const { error, setError } = useError();\n\n const isFeatureFlagActive = useCallback(\n (visitorCode: string, featureKey: string): boolean => {\n try {\n return client.isFeatureFlagActive(visitorCode, featureKey);\n } catch (unknownError) {\n setError(unknownError);\n\n return false;\n }\n },\n [client, setError],\n );\n\n return {\n isFeatureFlagActive,\n error,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAeA;AACA;AACA;AACA;AACA;AACO,SAASG,oBAAoBA,CAAA,EAAiC;EACnE,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,0BAAY,GAAE;EACjC,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAG,IAAAC,kBAAQ,GAAE;EAEtC,MAAMC,mBAAmB,GAAG,IAAAC,kBAAW,EACrC,CAACC,WAAmB,EAAEC,UAAkB,KAAc;IACpD,IAAI;MACF,OAAOR,MAAM,CAACK,mBAAmB,CAACE,WAAW,EAAEC,UAAU,CAAC;IAC5D,CAAC,CAAC,OAAOC,YAAY,EAAE;MACrBN,QAAQ,CAACM,YAAY,CAAC;MAEtB,OAAO,KAAK;IACd;EACF,CAAC,EACD,CAACT,MAAM,EAAEG,QAAQ,CAAC,CACnB;EAED,OAAO;IACLE,mBAAmB;IACnBH;EACF,CAAC;AACH"}
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFeatureFlagVariationKey = useFeatureFlagVariationKey;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
9
|
+
var _useError = require("./useError");
|
|
7
10
|
/**
|
|
8
11
|
* A React Hook that returns `getFeatureFlagVariationKey` function which returns variation key for the visitor under `visitorCode` in the found feature flag.
|
|
9
12
|
*
|
|
10
13
|
* @returns {IFeatureFlagVariationKeyHookResult} an object containing the `getFeatureFlagVariationKey` function and an optional error object.
|
|
11
14
|
*/
|
|
12
15
|
function useFeatureFlagVariationKey() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const {
|
|
17
|
+
client
|
|
18
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
19
|
+
const {
|
|
20
|
+
error,
|
|
21
|
+
setError
|
|
22
|
+
} = (0, _useError.useError)();
|
|
23
|
+
const getFeatureFlagVariationKey = (0, _react.useCallback)((visitorCode, featureKey) => {
|
|
24
|
+
try {
|
|
25
|
+
return client.getFeatureFlagVariationKey(visitorCode, featureKey);
|
|
26
|
+
} catch (unknownError) {
|
|
27
|
+
setError(unknownError);
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}, [client]);
|
|
31
|
+
return {
|
|
32
|
+
getFeatureFlagVariationKey,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
28
35
|
}
|
|
29
|
-
exports.useFeatureFlagVariationKey = useFeatureFlagVariationKey;
|
|
30
36
|
//# sourceMappingURL=useFeatureFlagVariationKey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureFlagVariationKey.js","
|
|
1
|
+
{"version":3,"file":"useFeatureFlagVariationKey.js","names":["_react","require","_useKameleoon","_useError","useFeatureFlagVariationKey","client","useKameleoon","error","setError","useError","getFeatureFlagVariationKey","useCallback","visitorCode","featureKey","unknownError","undefined"],"sources":["../src/useFeatureFlagVariationKey.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useKameleoon } from './useKameleoon';\nimport { useError } from './useError';\nimport { KameleoonError } from './KameleoonError';\n\nexport interface IFeatureFlagVariationKeyHookResult {\n /**\n * Returns variation key for the visitor under `visitorCode` in the found feature flag, this method includes targeting check, finding the according variation exposed to the visitor and saving it to storage along with sending tracking request if the feature rollout rule was of type of `Experimentation`.\n *\n * @param {string} visitorCode - unique visitor identification string, can't exceed 255 characters length.\n * @param {string} featureKey - a unique key for feature flag.\n * @returns {string | undefined} a string containing variable key for the allocated feature flag variation for the provided visitor.\n */\n getFeatureFlagVariationKey: (\n visitorCode: string,\n featureKey: string,\n ) => string | undefined;\n /** An optional error object that may be returned if an error occurs while calling the `getFeatureFlagVariationKey` function. */\n error: KameleoonError | null;\n}\n\n/**\n * A React Hook that returns `getFeatureFlagVariationKey` function which returns variation key for the visitor under `visitorCode` in the found feature flag.\n *\n * @returns {IFeatureFlagVariationKeyHookResult} an object containing the `getFeatureFlagVariationKey` function and an optional error object.\n */\nexport function useFeatureFlagVariationKey(): IFeatureFlagVariationKeyHookResult {\n const { client } = useKameleoon();\n const { error, setError } = useError();\n\n const getFeatureFlagVariationKey = useCallback(\n (visitorCode: string, featureKey: string): string | undefined => {\n try {\n return client.getFeatureFlagVariationKey(visitorCode, featureKey);\n } catch (unknownError) {\n setError(unknownError);\n\n return undefined;\n }\n },\n [client],\n );\n\n return {\n getFeatureFlagVariationKey,\n error,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACO,SAASG,0BAA0BA,CAAA,EAAuC;EAC/E,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,0BAAY,GAAE;EACjC,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAG,IAAAC,kBAAQ,GAAE;EAEtC,MAAMC,0BAA0B,GAAG,IAAAC,kBAAW,EAC5C,CAACC,WAAmB,EAAEC,UAAkB,KAAyB;IAC/D,IAAI;MACF,OAAOR,MAAM,CAACK,0BAA0B,CAACE,WAAW,EAAEC,UAAU,CAAC;IACnE,CAAC,CAAC,OAAOC,YAAY,EAAE;MACrBN,QAAQ,CAACM,YAAY,CAAC;MAEtB,OAAOC,SAAS;IAClB;EACF,CAAC,EACD,CAACV,MAAM,CAAC,CACT;EAED,OAAO;IACLK,0BAA0B;IAC1BH;EACF,CAAC;AACH"}
|
package/dist/useFeatureFlags.js
CHANGED
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFeatureFlags = useFeatureFlags;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
9
|
+
var _useError = require("./useError");
|
|
7
10
|
/**
|
|
8
11
|
* A React Hook that returns `getFeatureFlags` function which returns a list of feature flags.
|
|
9
12
|
*
|
|
10
13
|
* @returns {IFeatureFlagsHookResult} an object containing the `getFeatureFlags` function and an optional error object.
|
|
11
14
|
*/
|
|
12
15
|
function useFeatureFlags() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const {
|
|
17
|
+
client
|
|
18
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
19
|
+
const {
|
|
20
|
+
error,
|
|
21
|
+
setError
|
|
22
|
+
} = (0, _useError.useError)();
|
|
23
|
+
const getFeatureFlags = (0, _react.useCallback)(() => {
|
|
24
|
+
try {
|
|
25
|
+
return client.getFeatureFlags();
|
|
26
|
+
} catch (unknownError) {
|
|
27
|
+
setError(unknownError);
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
}, [client]);
|
|
31
|
+
return {
|
|
32
|
+
getFeatureFlags,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
28
35
|
}
|
|
29
|
-
exports.useFeatureFlags = useFeatureFlags;
|
|
30
36
|
//# sourceMappingURL=useFeatureFlags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureFlags.js","
|
|
1
|
+
{"version":3,"file":"useFeatureFlags.js","names":["_react","require","_useKameleoon","_useError","useFeatureFlags","client","useKameleoon","error","setError","useError","getFeatureFlags","useCallback","unknownError"],"sources":["../src/useFeatureFlags.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { FeatureFlagType } from '@kameleoon/javascript-sdk-core';\nimport { useKameleoon } from './useKameleoon';\nimport { useError } from './useError';\nimport { KameleoonError } from './KameleoonError';\n\nexport interface IFeatureFlagsHookResult {\n /**\n * Returns a list of feature flags stored in the client configuration.\n *\n * @returns {FeatureFlagType[]} a list of all feature flags items with `id` and `key` fields.\n */\n getFeatureFlags: () => FeatureFlagType[];\n /** An optional error object that may be returned if an error occurs while calling the `getFeatureFlags` function. */\n error: KameleoonError | null;\n}\n\n/**\n * A React Hook that returns `getFeatureFlags` function which returns a list of feature flags.\n *\n * @returns {IFeatureFlagsHookResult} an object containing the `getFeatureFlags` function and an optional error object.\n */\nexport function useFeatureFlags(): IFeatureFlagsHookResult {\n const { client } = useKameleoon();\n const { error, setError } = useError();\n\n const getFeatureFlags = useCallback((): FeatureFlagType[] => {\n try {\n return client.getFeatureFlags();\n } catch (unknownError) {\n setError(unknownError);\n\n return [];\n }\n }, [client]);\n\n return {\n getFeatureFlags,\n error,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAcA;AACA;AACA;AACA;AACA;AACO,SAASG,eAAeA,CAAA,EAA4B;EACzD,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,0BAAY,GAAE;EACjC,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAG,IAAAC,kBAAQ,GAAE;EAEtC,MAAMC,eAAe,GAAG,IAAAC,kBAAW,EAAC,MAAyB;IAC3D,IAAI;MACF,OAAON,MAAM,CAACK,eAAe,EAAE;IACjC,CAAC,CAAC,OAAOE,YAAY,EAAE;MACrBJ,QAAQ,CAACI,YAAY,CAAC;MAEtB,OAAO,EAAE;IACX;EACF,CAAC,EAAE,CAACP,MAAM,CAAC,CAAC;EAEZ,OAAO;IACLK,eAAe;IACfH;EACF,CAAC;AACH"}
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFeatureVariable = useFeatureVariable;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
9
|
+
var _useError = require("./useError");
|
|
7
10
|
/**
|
|
8
11
|
* A React Hook that returns `getFeatureFlagVariable` function which retrieves a feature variable.
|
|
9
12
|
*
|
|
10
13
|
* @returns {IPageViewHookResult} an object containing the `getFeatureFlagVariable` function.
|
|
11
14
|
*/
|
|
12
15
|
function useFeatureVariable() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
const {
|
|
17
|
+
client
|
|
18
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
19
|
+
const {
|
|
20
|
+
error,
|
|
21
|
+
setError
|
|
22
|
+
} = (0, _useError.useError)();
|
|
23
|
+
const getFeatureFlagVariable = (0, _react.useCallback)(params => {
|
|
24
|
+
try {
|
|
25
|
+
return client.getFeatureFlagVariable(params);
|
|
26
|
+
} catch (unknownError) {
|
|
27
|
+
setError(unknownError);
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}, [client, setError]);
|
|
31
|
+
return {
|
|
32
|
+
getFeatureFlagVariable,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
28
35
|
}
|
|
29
|
-
exports.useFeatureVariable = useFeatureVariable;
|
|
30
36
|
//# sourceMappingURL=useFeatureVariable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureVariable.js","
|
|
1
|
+
{"version":3,"file":"useFeatureVariable.js","names":["_react","require","_useKameleoon","_useError","useFeatureVariable","client","useKameleoon","error","setError","useError","getFeatureFlagVariable","useCallback","params","unknownError","undefined"],"sources":["../src/useFeatureVariable.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport {\n GetFeatureFlagVariableParamsType,\n FeatureVariableResultType,\n} from '@kameleoon/javascript-sdk-core';\nimport { useKameleoon } from './useKameleoon';\nimport { KameleoonError } from './KameleoonError';\nimport { useError } from './useError';\n\nexport interface IFeatureVariableHookResult {\n /**\n * Returns a variable for the visitor under `visitorCode` in the found feature flag, this method includes targeting check, finding the according variation exposed to the visitor and saving it to storage along with sending tracking request if the feature rollout rule was of type of `Experimentation`.\n *\n * @param {GetFeatureFlagVariableParamsType} params - `visitorCode`, `featureKey` and `variableKey` parameters to return variable.\n * @return {FeatureVariableResultType | undefined} a variable object containing `type` and `value` fields, `type` can be checked against `FeatureVariableType` enum, if the `type` is `FeatureVariableType.BOOLEAN` then the `value` type will be `boolean` and so on.\n */\n getFeatureFlagVariable: (\n params: GetFeatureFlagVariableParamsType,\n ) => FeatureVariableResultType | undefined;\n /** An optional error object that may be returned if an error occurs while calling the `getFeatureFlagVariable` function. */\n error: KameleoonError | null;\n}\n\n/**\n * A React Hook that returns `getFeatureFlagVariable` function which retrieves a feature variable.\n *\n * @returns {IPageViewHookResult} an object containing the `getFeatureFlagVariable` function.\n */\nexport function useFeatureVariable(): IFeatureVariableHookResult {\n const { client } = useKameleoon();\n const { error, setError } = useError();\n\n const getFeatureFlagVariable = useCallback(\n (\n params: GetFeatureFlagVariableParamsType,\n ): FeatureVariableResultType | undefined => {\n try {\n return client.getFeatureFlagVariable(params);\n } catch (unknownError) {\n setError(unknownError);\n\n return undefined;\n }\n },\n [client, setError],\n );\n\n return {\n getFeatureFlagVariable,\n error,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAgBA;AACA;AACA;AACA;AACA;AACO,SAASG,kBAAkBA,CAAA,EAA+B;EAC/D,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,0BAAY,GAAE;EACjC,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAG,IAAAC,kBAAQ,GAAE;EAEtC,MAAMC,sBAAsB,GAAG,IAAAC,kBAAW,EAEtCC,MAAwC,IACE;IAC1C,IAAI;MACF,OAAOP,MAAM,CAACK,sBAAsB,CAACE,MAAM,CAAC;IAC9C,CAAC,CAAC,OAAOC,YAAY,EAAE;MACrBL,QAAQ,CAACK,YAAY,CAAC;MAEtB,OAAOC,SAAS;IAClB;EACF,CAAC,EACD,CAACT,MAAM,EAAEG,QAAQ,CAAC,CACnB;EAED,OAAO;IACLE,sBAAsB;IACtBH;EACF,CAAC;AACH"}
|
package/dist/useFlushData.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useFlushData = useFlushData;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
6
9
|
/**
|
|
7
10
|
* A React Hook that returns `flushData` function
|
|
8
11
|
*
|
|
9
12
|
* @returns {IFlushDataHookResult} an object containing the `flushData` function.
|
|
10
13
|
*/
|
|
11
14
|
function useFlushData() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const {
|
|
16
|
+
client
|
|
17
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
18
|
+
const flushData = (0, _react.useCallback)(visitorCode => {
|
|
19
|
+
client.flushData(visitorCode);
|
|
20
|
+
}, [client]);
|
|
21
|
+
return {
|
|
22
|
+
flushData
|
|
23
|
+
};
|
|
19
24
|
}
|
|
20
|
-
exports.useFlushData = useFlushData;
|
|
21
25
|
//# sourceMappingURL=useFlushData.js.map
|
package/dist/useFlushData.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlushData.js","
|
|
1
|
+
{"version":3,"file":"useFlushData.js","names":["_react","require","_useKameleoon","useFlushData","client","useKameleoon","flushData","useCallback","visitorCode"],"sources":["../src/useFlushData.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useKameleoon } from './useKameleoon';\n\nexport interface IFlushDataHookResult {\n /**\n * Takes visitor associated kameleoon data and sends the data tracking request with collected data sent data is removed from `KameleoonClient` instance but not from the storage for correct targeting checks.\n *\n * @param {string} visitorCode - unique visitor identification string, can't exceed 255 characters length.\n */\n flushData: (visitorCode: string) => void;\n}\n\n/**\n * A React Hook that returns `flushData` function\n *\n * @returns {IFlushDataHookResult} an object containing the `flushData` function.\n */\nexport function useFlushData(): IFlushDataHookResult {\n const { client } = useKameleoon();\n\n const flushData = useCallback(\n (visitorCode: string): void => {\n client.flushData(visitorCode);\n },\n [client],\n );\n\n return {\n flushData,\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAWA;AACA;AACA;AACA;AACA;AACO,SAASE,YAAYA,CAAA,EAAyB;EACnD,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,0BAAY,GAAE;EAEjC,MAAMC,SAAS,GAAG,IAAAC,kBAAW,EAC1BC,WAAmB,IAAW;IAC7BJ,MAAM,CAACE,SAAS,CAACE,WAAW,CAAC;EAC/B,CAAC,EACD,CAACJ,MAAM,CAAC,CACT;EAED,OAAO;IACLE;EACF,CAAC;AACH"}
|
package/dist/useInitialize.js
CHANGED
|
@@ -1,74 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.useInitialize = void 0;
|
|
40
|
-
var react_1 = require("react");
|
|
41
|
-
var useKameleoon_1 = require("./useKameleoon");
|
|
42
|
-
var useError_1 = require("./useError");
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useInitialize = useInitialize;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _useKameleoon = require("./useKameleoon");
|
|
9
|
+
var _useError = require("./useError");
|
|
43
10
|
/**
|
|
44
11
|
* A React Hook that returns asynchronous `initialize` function.
|
|
45
12
|
*
|
|
46
13
|
* @returns {IInitializeHookResult} an object containing the asynchronous `initialize` function and an optional error object.
|
|
47
14
|
*/
|
|
48
15
|
function useInitialize() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
initialize: initialize,
|
|
70
|
-
error: error,
|
|
71
|
-
};
|
|
16
|
+
const {
|
|
17
|
+
client
|
|
18
|
+
} = (0, _useKameleoon.useKameleoon)();
|
|
19
|
+
const {
|
|
20
|
+
error,
|
|
21
|
+
setError
|
|
22
|
+
} = (0, _useError.useError)();
|
|
23
|
+
const initialize = (0, _react.useCallback)(async () => {
|
|
24
|
+
try {
|
|
25
|
+
return await client.initialize();
|
|
26
|
+
} catch (unknownError) {
|
|
27
|
+
setError(unknownError);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}, [client]);
|
|
31
|
+
return {
|
|
32
|
+
initialize,
|
|
33
|
+
error
|
|
34
|
+
};
|
|
72
35
|
}
|
|
73
|
-
exports.useInitialize = useInitialize;
|
|
74
36
|
//# sourceMappingURL=useInitialize.js.map
|