@asgardeo/react 0.22.1 → 0.22.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/cjs/index.js
CHANGED
|
@@ -200,6 +200,7 @@ var AsgardeoContext = (0, import_react.createContext)({
|
|
|
200
200
|
instanceId: 0,
|
|
201
201
|
isInitialized: false,
|
|
202
202
|
isLoading: true,
|
|
203
|
+
isMetaLoading: false,
|
|
203
204
|
isSignedIn: false,
|
|
204
205
|
meta: null,
|
|
205
206
|
organization: null,
|
|
@@ -1285,8 +1286,10 @@ var useAsgardeo = () => {
|
|
|
1285
1286
|
const flowMetaContext = (0, import_react8.useContext)(FlowMetaContext_default);
|
|
1286
1287
|
const i18nContext = (0, import_react8.useContext)(I18nContext_default);
|
|
1287
1288
|
const meta = flowMetaContext?.meta ?? null;
|
|
1289
|
+
const isMetaLoading = flowMetaContext?.isLoading ?? false;
|
|
1288
1290
|
return {
|
|
1289
1291
|
...context,
|
|
1292
|
+
isMetaLoading,
|
|
1290
1293
|
meta,
|
|
1291
1294
|
resolveFlowTemplateLiterals: (text) => (0, import_browser9.resolveFlowTemplateLiterals)(text, {
|
|
1292
1295
|
meta,
|
|
@@ -1318,13 +1321,14 @@ var FlowMetaProvider = ({
|
|
|
1318
1321
|
const { baseUrl, applicationId, platform } = useAsgardeo_default();
|
|
1319
1322
|
const i18nContext = useI18n_default();
|
|
1320
1323
|
const [meta, setMeta] = (0, import_react10.useState)(null);
|
|
1321
|
-
const [isLoading, setIsLoading] = (0, import_react10.useState)(
|
|
1324
|
+
const [isLoading, setIsLoading] = (0, import_react10.useState)(true);
|
|
1322
1325
|
const [error, setError] = (0, import_react10.useState)(null);
|
|
1323
1326
|
const [pendingLanguage, setPendingLanguage] = (0, import_react10.useState)(null);
|
|
1324
1327
|
const hasFetchedRef = (0, import_react10.useRef)(false);
|
|
1325
1328
|
const fetchFlowMeta = (0, import_react10.useCallback)(async () => {
|
|
1326
1329
|
if (!enabled || platform !== import_browser10.Platform.AsgardeoV2) {
|
|
1327
1330
|
setMeta(null);
|
|
1331
|
+
setIsLoading(false);
|
|
1328
1332
|
return;
|
|
1329
1333
|
}
|
|
1330
1334
|
setIsLoading(true);
|