flowcore-fn 9.4.8 → 9.5.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/dist/ApiEndpointsProvider-MDQW2LEP.mjs +9 -0
- package/dist/ApiServicepackage-PJH24ZGU.mjs +9 -0
- package/dist/chunk-3NI4QKQW.mjs +34 -0
- package/dist/chunk-HRODB3L2.mjs +22 -0
- package/dist/chunk-I4E63NIC.mjs +24 -0
- package/dist/pkg-index.js +328 -94
- package/dist/pkg-index.mjs +260 -146
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/components/Service/ApiEndpointsProvider.js
|
|
2
|
+
var STORAGE_KEY = "FLOWCORE_API_ENDPOINTS";
|
|
3
|
+
var apiEndpoints = null;
|
|
4
|
+
var ApiEndpointsProvider = ({ apiEndpoints: endpoints }) => {
|
|
5
|
+
if (typeof window !== "undefined" && endpoints) {
|
|
6
|
+
apiEndpoints = endpoints;
|
|
7
|
+
sessionStorage.setItem(
|
|
8
|
+
STORAGE_KEY,
|
|
9
|
+
JSON.stringify(endpoints)
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
};
|
|
14
|
+
var getApiEndpoints = () => {
|
|
15
|
+
if (apiEndpoints) {
|
|
16
|
+
return apiEndpoints;
|
|
17
|
+
}
|
|
18
|
+
if (typeof window !== "undefined") {
|
|
19
|
+
const data = sessionStorage.getItem(STORAGE_KEY);
|
|
20
|
+
if (data) {
|
|
21
|
+
apiEndpoints = JSON.parse(data);
|
|
22
|
+
return apiEndpoints;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
throw new Error(
|
|
26
|
+
"Api Endpoints not initialized. Please render <ApiEndpointsProvider apiEndpoints={ApiEndPoints} /> once before using FlowCore."
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
var ApiEndpointsProvider_default = ApiEndpointsProvider;
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
getApiEndpoints,
|
|
33
|
+
ApiEndpointsProvider_default
|
|
34
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/components/Service/ApiServicepackage.js
|
|
2
|
+
var apiService = null;
|
|
3
|
+
var ApiServicepackage = ({ apiService: service }) => {
|
|
4
|
+
if (service) {
|
|
5
|
+
apiService = service;
|
|
6
|
+
}
|
|
7
|
+
return null;
|
|
8
|
+
};
|
|
9
|
+
var getApiService = () => {
|
|
10
|
+
if (apiService) {
|
|
11
|
+
return apiService;
|
|
12
|
+
}
|
|
13
|
+
throw new Error(
|
|
14
|
+
"ApiService not initialized. Please render <ApiServicepackage apiService={ApiService} /> once before using FlowCore."
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
var ApiServicepackage_default = ApiServicepackage;
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
getApiService,
|
|
21
|
+
ApiServicepackage_default
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
__spreadValues,
|
|
23
|
+
__spreadProps
|
|
24
|
+
};
|