@famgia/omnify-react-sso 2.2.6 → 2.2.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/ant/index.cjs +644 -495
- package/dist/ant/index.cjs.map +1 -1
- package/dist/ant/index.d.cts +43 -1
- package/dist/ant/index.d.ts +43 -1
- package/dist/ant/index.js +502 -354
- package/dist/ant/index.js.map +1 -1
- package/dist/index.cjs +680 -505
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +526 -356
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ant/index.d.cts
CHANGED
|
@@ -120,6 +120,48 @@ declare function ProtectedRoute({ children, fallback, loginFallback, requiredRol
|
|
|
120
120
|
*/
|
|
121
121
|
declare function OrgBranchSelectorModal({ open, onClose, onConfirm, title, requireBranch, loadingComponent, }: OrgBranchSelectorModalProps): react_jsx_runtime.JSX.Element;
|
|
122
122
|
|
|
123
|
+
interface OrgGateProps {
|
|
124
|
+
children: React.ReactNode;
|
|
125
|
+
/**
|
|
126
|
+
* Custom translations for the UI
|
|
127
|
+
*/
|
|
128
|
+
translations?: {
|
|
129
|
+
/** Modal title when selecting org */
|
|
130
|
+
selectOrgTitle?: string;
|
|
131
|
+
/** Confirm button text */
|
|
132
|
+
confirmText?: string;
|
|
133
|
+
/** Placeholder for org select */
|
|
134
|
+
selectPlaceholder?: string;
|
|
135
|
+
/** Message when no orgs available */
|
|
136
|
+
noOrgsMessage?: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Custom loading component
|
|
140
|
+
*/
|
|
141
|
+
loadingComponent?: React.ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Called when organization changes
|
|
144
|
+
*/
|
|
145
|
+
onOrgChange?: (orgSlug: string) => void;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* OrgGate ensures an organization is always selected.
|
|
149
|
+
* - If user has only 1 org, auto-select it
|
|
150
|
+
* - If user has multiple orgs and none selected, show selection modal
|
|
151
|
+
* - Only render children when an org is selected
|
|
152
|
+
* - Syncs org ID to global state for API calls
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```tsx
|
|
156
|
+
* <SsoProvider config={config}>
|
|
157
|
+
* <OrgGate>
|
|
158
|
+
* <App />
|
|
159
|
+
* </OrgGate>
|
|
160
|
+
* </SsoProvider>
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
declare function OrgGate({ children, translations: customTranslations, loadingComponent, onOrgChange, }: OrgGateProps): react_jsx_runtime.JSX.Element;
|
|
164
|
+
|
|
123
165
|
type StoredSelection = {
|
|
124
166
|
orgId: string;
|
|
125
167
|
orgName: string;
|
|
@@ -682,4 +724,4 @@ interface AntdThemeProviderProps {
|
|
|
682
724
|
}
|
|
683
725
|
declare function AntdThemeProvider({ children, variant, setDayjsLocale }: AntdThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
684
726
|
|
|
685
|
-
export { AntdThemeProvider, type AntdThemeProviderProps, type ApiResponse, BranchGate, type BranchLike$1 as BranchLike, LocaleSwitcher, OrgBranchSelectorModal, type OrganizationLike$1 as OrganizationLike, OrganizationSwitcher, DEFAULT_TEXTS as PROTABLE_DEFAULT_TEXTS, PageContainer, type PageContainerProps, type PaginationMeta, PermissionsListCard, type PermissionsListCardProps, ProTable, type ProTableColumn, type ProTableProps, type ProTableTexts, ProtectedRoute, type QueryParams, RoleCreateModal, type RoleCreateModalProps, RolesListCard, type RolesListCardProps, type RowAction, ScopeLabel, type ScopeLabelProps, ScopeTag, type ScopeTagProps, type ScopeType, type SearchField, SsoCallback, type StatusConfig, type TeamData, TeamsListCard, type TeamsListCardProps, UserDetailCard, type UserDetailCardProps, UserPermissionsModal, type UserPermissionsModalProps, UserRoleAssignModal, type UserRoleAssignModalProps, type ValueType, getScopeColor, getScopeIcon, useBranchGate };
|
|
727
|
+
export { AntdThemeProvider, type AntdThemeProviderProps, type ApiResponse, BranchGate, type BranchLike$1 as BranchLike, LocaleSwitcher, OrgBranchSelectorModal, OrgGate, type OrgGateProps, type OrganizationLike$1 as OrganizationLike, OrganizationSwitcher, DEFAULT_TEXTS as PROTABLE_DEFAULT_TEXTS, PageContainer, type PageContainerProps, type PaginationMeta, PermissionsListCard, type PermissionsListCardProps, ProTable, type ProTableColumn, type ProTableProps, type ProTableTexts, ProtectedRoute, type QueryParams, RoleCreateModal, type RoleCreateModalProps, RolesListCard, type RolesListCardProps, type RowAction, ScopeLabel, type ScopeLabelProps, ScopeTag, type ScopeTagProps, type ScopeType, type SearchField, SsoCallback, type StatusConfig, type TeamData, TeamsListCard, type TeamsListCardProps, UserDetailCard, type UserDetailCardProps, UserPermissionsModal, type UserPermissionsModalProps, UserRoleAssignModal, type UserRoleAssignModalProps, type ValueType, getScopeColor, getScopeIcon, useBranchGate };
|
package/dist/ant/index.d.ts
CHANGED
|
@@ -120,6 +120,48 @@ declare function ProtectedRoute({ children, fallback, loginFallback, requiredRol
|
|
|
120
120
|
*/
|
|
121
121
|
declare function OrgBranchSelectorModal({ open, onClose, onConfirm, title, requireBranch, loadingComponent, }: OrgBranchSelectorModalProps): react_jsx_runtime.JSX.Element;
|
|
122
122
|
|
|
123
|
+
interface OrgGateProps {
|
|
124
|
+
children: React.ReactNode;
|
|
125
|
+
/**
|
|
126
|
+
* Custom translations for the UI
|
|
127
|
+
*/
|
|
128
|
+
translations?: {
|
|
129
|
+
/** Modal title when selecting org */
|
|
130
|
+
selectOrgTitle?: string;
|
|
131
|
+
/** Confirm button text */
|
|
132
|
+
confirmText?: string;
|
|
133
|
+
/** Placeholder for org select */
|
|
134
|
+
selectPlaceholder?: string;
|
|
135
|
+
/** Message when no orgs available */
|
|
136
|
+
noOrgsMessage?: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Custom loading component
|
|
140
|
+
*/
|
|
141
|
+
loadingComponent?: React.ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Called when organization changes
|
|
144
|
+
*/
|
|
145
|
+
onOrgChange?: (orgSlug: string) => void;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* OrgGate ensures an organization is always selected.
|
|
149
|
+
* - If user has only 1 org, auto-select it
|
|
150
|
+
* - If user has multiple orgs and none selected, show selection modal
|
|
151
|
+
* - Only render children when an org is selected
|
|
152
|
+
* - Syncs org ID to global state for API calls
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```tsx
|
|
156
|
+
* <SsoProvider config={config}>
|
|
157
|
+
* <OrgGate>
|
|
158
|
+
* <App />
|
|
159
|
+
* </OrgGate>
|
|
160
|
+
* </SsoProvider>
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
declare function OrgGate({ children, translations: customTranslations, loadingComponent, onOrgChange, }: OrgGateProps): react_jsx_runtime.JSX.Element;
|
|
164
|
+
|
|
123
165
|
type StoredSelection = {
|
|
124
166
|
orgId: string;
|
|
125
167
|
orgName: string;
|
|
@@ -682,4 +724,4 @@ interface AntdThemeProviderProps {
|
|
|
682
724
|
}
|
|
683
725
|
declare function AntdThemeProvider({ children, variant, setDayjsLocale }: AntdThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
684
726
|
|
|
685
|
-
export { AntdThemeProvider, type AntdThemeProviderProps, type ApiResponse, BranchGate, type BranchLike$1 as BranchLike, LocaleSwitcher, OrgBranchSelectorModal, type OrganizationLike$1 as OrganizationLike, OrganizationSwitcher, DEFAULT_TEXTS as PROTABLE_DEFAULT_TEXTS, PageContainer, type PageContainerProps, type PaginationMeta, PermissionsListCard, type PermissionsListCardProps, ProTable, type ProTableColumn, type ProTableProps, type ProTableTexts, ProtectedRoute, type QueryParams, RoleCreateModal, type RoleCreateModalProps, RolesListCard, type RolesListCardProps, type RowAction, ScopeLabel, type ScopeLabelProps, ScopeTag, type ScopeTagProps, type ScopeType, type SearchField, SsoCallback, type StatusConfig, type TeamData, TeamsListCard, type TeamsListCardProps, UserDetailCard, type UserDetailCardProps, UserPermissionsModal, type UserPermissionsModalProps, UserRoleAssignModal, type UserRoleAssignModalProps, type ValueType, getScopeColor, getScopeIcon, useBranchGate };
|
|
727
|
+
export { AntdThemeProvider, type AntdThemeProviderProps, type ApiResponse, BranchGate, type BranchLike$1 as BranchLike, LocaleSwitcher, OrgBranchSelectorModal, OrgGate, type OrgGateProps, type OrganizationLike$1 as OrganizationLike, OrganizationSwitcher, DEFAULT_TEXTS as PROTABLE_DEFAULT_TEXTS, PageContainer, type PageContainerProps, type PaginationMeta, PermissionsListCard, type PermissionsListCardProps, ProTable, type ProTableColumn, type ProTableProps, type ProTableTexts, ProtectedRoute, type QueryParams, RoleCreateModal, type RoleCreateModalProps, RolesListCard, type RolesListCardProps, type RowAction, ScopeLabel, type ScopeLabelProps, ScopeTag, type ScopeTagProps, type ScopeType, type SearchField, SsoCallback, type StatusConfig, type TeamData, TeamsListCard, type TeamsListCardProps, UserDetailCard, type UserDetailCardProps, UserPermissionsModal, type UserPermissionsModalProps, UserRoleAssignModal, type UserRoleAssignModalProps, type ValueType, getScopeColor, getScopeIcon, useBranchGate };
|