-
Notifications
You must be signed in to change notification settings - Fork 48
fix(nextjs): fix issues with B2B components #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
…corresponding tests
…ogic in OrganizationList component
…ixes from usernames
- Renamed context property from `organizations` to `myOrganizations` in OrganizationSwitcher and related components. - Introduced new server actions `getAllOrganizations` and `getMyOrganizations` for fetching organization data. - Updated AsgardeoProvider to manage and provide `myOrganizations` and `getAllOrganizations` to the context. - Refactored OrganizationProvider to utilize new organization fetching methods and removed legacy pagination logic. - Enhanced BaseOrganizationList to handle both all organizations and user-specific organizations with switch access. - Updated CreateOrganization component to refresh the list of user organizations after creation. - Adjusted OrganizationList to fetch all organizations on mount and pass necessary props to BaseOrganizationList. - Cleaned up unused code and improved error handling across organization-related components.
…variable structure
- Updated UserProfile component to utilize theme.vars for spacing, colors, and border radius. - Modified Alert component to apply theme.vars for background, border, and text colors. - Adjusted Avatar component to use theme.vars for background and text colors. - Refactored Button component to implement theme.vars for padding, colors, and border styles. - Changed Checkbox component to utilize theme.vars for sizing and accent color. - Updated DatePicker component to apply theme.vars for padding, border, and background colors. - Refactored Divider component to use theme.vars for spacing and background colors. - Adjusted FormControl component to implement theme.vars for margin and spacing. - Updated InputLabel component to utilize theme.vars for margin and color. - Refactored KeyValueInput component to apply theme.vars for spacing, colors, and border radius. - Changed OtpField component to use theme.vars for sizing, colors, and border styles. - Updated Select component to implement theme.vars for padding, border, and background colors. - Refactored Spinner component to utilize theme.vars for primary color. - Adjusted Typography component to apply theme.vars for font sizes across various text styles.
…stency and improved styling
…nsistency and improved styling
…efactor Divider styles with CSS classes
…components to use action colors
…improved user feedback
… profile handling and simplify error alert rendering
… to handle multiple field variations and improve code readability style(react): adjust dropdown dimensions in BaseUserDropdown for better UI consistency refactor(react): simplify rendering logic in BaseUserProfile component for improved clarity and maintainability
…t and clean up imports
…and return TokenResponse
… SVG stroke attributes
…utilize it in AsgardeoServerProvider for organization login handling
…oProvider components
DonOmalVindula
approved these changes
Jul 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces several updates to the
Asgardeo JavaScript SDK, including enhancements to organization management, API improvements, and updates to theming functionality. The most notable changes include the addition of new methods for handling organizations, updates to the API response structure, and the introduction of a comprehensive theme creation utility with support for custom configurations and dark mode.Enhancements to organization management:
switchOrganizationandgetOrganizationsmethods inAsgardeoJavaScriptClientto include support for session IDs and return more detailed responses, such asTokenResponseorAllOrganizationsApiResponse. ([[1]](https://github.com/asgardeo/javascript/pull/87/files#diff-1de99ccf9a6555feff096d35ba4d4626b4d42ce6da23d9b9ed996bb3f65e1bcbL33-R43),[[2]](https://github.com/asgardeo/javascript/pull/87/files#diff-47d1628f385e7a95ba078012412f6b43a3af85373b276c74b1a7f620f89d8581L40-R52),[[3]](https://github.com/asgardeo/javascript/pull/87/files#diff-47d1628f385e7a95ba078012412f6b43a3af85373b276c74b1a7f620f89d8581L58-R66))AllOrganizationsApiResponsefor paginated organization responses, replacing the previousPaginatedOrganizationsResponse. ([[1]](https://github.com/asgardeo/javascript/pull/87/files#diff-4856bf64c07f5f9176749dbf7f720719abaefc7d70d3c316656f391270ee6035R26-R35),[[2]](https://github.com/asgardeo/javascript/pull/87/files#diff-79296621b96b8d639da909543b1fd217ad3c2f31d53e2c7582e86ba5253f6e0fL19-L31),[[3]](https://github.com/asgardeo/javascript/pull/87/files#diff-79296621b96b8d639da909543b1fd217ad3c2f31d53e2c7582e86ba5253f6e0fL123-R113))API improvements:
getScim2Meto process user usernames before returning the response using a newly introduced utility functionprocessUsername. ([[1]](https://github.com/asgardeo/javascript/pull/87/files#diff-0d8b77f6e2a7070081091b5c3864480dbdbd9f7bdaf30cbb59412912378922d9R21),[[2]](https://github.com/asgardeo/javascript/pull/87/files#diff-0d8b77f6e2a7070081091b5c3864480dbdbd9f7bdaf30cbb59412912378922d9L133-R136))getBrandingPreferenceandgetScim2MeAPIs to ensure proper endpoint paths. ([[1]](https://github.com/asgardeo/javascript/pull/87/files#diff-daae96c0966c861401953667db84adeca004b669cff391291ad418b2314e2415L137-R137),[[2]](https://github.com/asgardeo/javascript/pull/87/files#diff-0d8b77f6e2a7070081091b5c3864480dbdbd9f7bdaf30cbb59412912378922d9L106-R107))Theming functionality:
createThemeutility with support for custom configurations, dark mode, and CSS variable prefixes. Comprehensive test coverage added for this utility. ([packages/javascript/src/theme/createTheme.test.tsR1-R98](https://github.com/asgardeo/javascript/pull/87/files#diff-a292551729f130c438c1741dce3d78efe0847571f883abe0869a9e07e1685264R1-R98))ThemeTypographyandThemeColorsinterfaces to include detailed typography and action-related color properties. ([packages/javascript/src/theme/types.tsR19-R56](https://github.com/asgardeo/javascript/pull/87/files#diff-a1f5614ca9519ec291c8191c45b409f396ab60acdfedc76a3a78387afdd5952cR19-R56))Internationalization updates:
[[1]](https://github.com/asgardeo/javascript/pull/87/files#diff-2c22f979243dfaf9d2031311426ff5516e255f5f9c2b8984770dbf9e779178a7L91-R102),[[2]](https://github.com/asgardeo/javascript/pull/87/files#diff-e5f67c806e5be95de3b966cbc9cd589a7ebcb89afe790c612b66c0c91361142cR91-R100))Miscellaneous improvements:
index.tsto include new models and utilities, such asprocessUsernameandtransformBrandingPreferenceToTheme. ([[1]](https://github.com/asgardeo/javascript/pull/87/files#diff-c91ab2a4227a3b32483db0f1a9f4268f2d6dd3818dd7f96c027d1b1ea8a06883R52),[[2]](https://github.com/asgardeo/javascript/pull/87/files#diff-c91ab2a4227a3b32483db0f1a9f4268f2d6dd3818dd7f96c027d1b1ea8a06883R115),[[3]](https://github.com/asgardeo/javascript/pull/87/files#diff-c91ab2a4227a3b32483db0f1a9f4268f2d6dd3818dd7f96c027d1b1ea8a06883R133))Related Issues
Related PRs
Checklist
Security checks