@asgardeo/react 0.5.6 → 0.5.7
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
|
@@ -1092,16 +1092,17 @@ var import_react7 = require("react");
|
|
|
1092
1092
|
// src/contexts/Organization/OrganizationContext.ts
|
|
1093
1093
|
var import_react6 = require("react");
|
|
1094
1094
|
var OrganizationContext = (0, import_react6.createContext)({
|
|
1095
|
+
createOrganization: () => null,
|
|
1095
1096
|
currentOrganization: null,
|
|
1096
1097
|
error: null,
|
|
1097
|
-
isLoading: false,
|
|
1098
|
-
myOrganizations: null,
|
|
1099
|
-
switchOrganization: () => Promise.resolve(),
|
|
1100
|
-
revalidateMyOrganizations: () => Promise.resolve([]),
|
|
1101
1098
|
getAllOrganizations: () => Promise.resolve({
|
|
1102
1099
|
count: 0,
|
|
1103
1100
|
organizations: []
|
|
1104
|
-
})
|
|
1101
|
+
}),
|
|
1102
|
+
isLoading: false,
|
|
1103
|
+
myOrganizations: null,
|
|
1104
|
+
revalidateMyOrganizations: () => Promise.resolve([]),
|
|
1105
|
+
switchOrganization: () => Promise.resolve()
|
|
1105
1106
|
});
|
|
1106
1107
|
OrganizationContext.displayName = "OrganizationContext";
|
|
1107
1108
|
var OrganizationContext_default = OrganizationContext;
|
|
@@ -1115,7 +1116,8 @@ var OrganizationProvider = ({
|
|
|
1115
1116
|
myOrganizations,
|
|
1116
1117
|
onOrganizationSwitch,
|
|
1117
1118
|
revalidateMyOrganizations,
|
|
1118
|
-
getAllOrganizations: getAllOrganizations2
|
|
1119
|
+
getAllOrganizations: getAllOrganizations2,
|
|
1120
|
+
createOrganization: createOrganization2
|
|
1119
1121
|
}) => {
|
|
1120
1122
|
const [isLoading, setIsLoading] = (0, import_react7.useState)(false);
|
|
1121
1123
|
const [error, setError] = (0, import_react7.useState)(null);
|
|
@@ -1148,13 +1150,14 @@ var OrganizationProvider = ({
|
|
|
1148
1150
|
);
|
|
1149
1151
|
const contextValue = (0, import_react7.useMemo)(
|
|
1150
1152
|
() => ({
|
|
1153
|
+
createOrganization: createOrganization2,
|
|
1151
1154
|
currentOrganization,
|
|
1152
1155
|
error,
|
|
1156
|
+
getAllOrganizations: getAllOrganizations2,
|
|
1153
1157
|
isLoading,
|
|
1154
1158
|
myOrganizations,
|
|
1155
|
-
switchOrganization,
|
|
1156
1159
|
revalidateMyOrganizations,
|
|
1157
|
-
|
|
1160
|
+
switchOrganization
|
|
1158
1161
|
}),
|
|
1159
1162
|
[
|
|
1160
1163
|
currentOrganization,
|
|
@@ -1163,7 +1166,8 @@ var OrganizationProvider = ({
|
|
|
1163
1166
|
myOrganizations,
|
|
1164
1167
|
switchOrganization,
|
|
1165
1168
|
revalidateMyOrganizations,
|
|
1166
|
-
getAllOrganizations2
|
|
1169
|
+
getAllOrganizations2,
|
|
1170
|
+
createOrganization2
|
|
1167
1171
|
]
|
|
1168
1172
|
);
|
|
1169
1173
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OrganizationContext_default.Provider, { value: contextValue, children });
|