Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into alternative-login…
Browse files Browse the repository at this point in the history
…-improvement
  • Loading branch information
sandushi committed Mar 15, 2024
2 parents f33bd0d + bdb7970 commit 008b03b
Show file tree
Hide file tree
Showing 400 changed files with 17,357 additions and 39,159 deletions.
5 changes: 0 additions & 5 deletions .changeset/modern-cherries-unite.md

This file was deleted.

15 changes: 14 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,19 @@ module.exports = {
name: "@oxygen-ui/react"
}
],
patterns: [ "@wso2is/**/dist/**", "lodash/**", "lodash/fp/**" ]
patterns: [
"@wso2is/**/dist/**",
"lodash/**",
"lodash/fp/**",
// prevents using absolute import paths such as "apps/console/src/**/*", "modules/react"
// TODO: show an error message in the editor when an absolute import is used[1]. Currently
// it's not working for some reason[2].
//
// [1] https://eslint.org/docs/latest/rules/no-restricted-imports#options:~:text=%22no%2Drestricted%2Dimports%22%3A%20%5B%22error%22%2C%20%7B%0A%20%20%20%20%22patterns,deprecated%2C%20except%20the%20modules%20in%20import2/good.%22%0A%20%20%20%20%7D%5D%0A%7D%5D
// [2] https://stackoverflow.com/questions/68126222/lint-rule-no-restricted-imports-throw-error-when-patterns-group-specified
"apps/**/*",
"modules/**/*"
]
}
],
"no-trailing-spaces": "warn",
Expand Down Expand Up @@ -328,6 +340,7 @@ module.exports = {
return: "parens"
}
],
"react/no-danger": 2,
"react/no-children-prop": 0,
"react/prop-types": 1,
semi: 1,
Expand Down
401 changes: 401 additions & 0 deletions apps/console/CHANGELOG.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.identity.apps</groupId>
<artifactId>identity-apps-console</artifactId>
<version>2.12.31-SNAPSHOT</version>
<version>2.13.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion apps/console/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<groupId>org.wso2.identity.apps</groupId>
<artifactId>identity-apps-console</artifactId>
<packaging>pom</packaging>
<version>2.12.31-SNAPSHOT</version>
<version>2.13.13-SNAPSHOT</version>
<name>WSO2 Identity Server Console - Parent</name>
<description>WSO2 Identity Server Console Parent</description>

Expand Down
2 changes: 1 addition & 1 deletion apps/console/java/webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.identity.apps</groupId>
<artifactId>identity-apps-console</artifactId>
<version>2.12.31-SNAPSHOT</version>
<version>2.13.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
12 changes: 8 additions & 4 deletions apps/console/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ module.exports = {
"node"
],
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/test-configs/__mocks__/style-file.ts",
"\\.(css|less|scss)$": "<rootDir>/test-configs/__mocks__/style-file.ts",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|md)$":
"<rootDir>/test-configs/__mocks__/file.ts",
"\\.svg": "<rootDir>/test-configs/__mocks__/svgr.ts",
"^@unit-testing(.*)$": "<rootDir>/test-configs/utils",
"^lodash-es/(.*)$": "<rootDir>/../../node_modules/lodash/$1",
"^react($|/.+)": "<rootDir>/../../node_modules/react$1",
"^react($|/.+)": "<rootDir>/node_modules/react$1",
"@wso2is/form": "<rootDir>/../../modules/form/dist",
"@wso2is/forms": "<rootDir>/../../modules/forms/dist",
"@wso2is/common": "<rootDir>/../../modules/common/dist",
"@wso2is/dynamic-forms": "<rootDir>/../../modules/dynamic-forms/dist",
"@wso2is/react-components": "<rootDir>/../../modules/react-components/dist",
"@oxygen-ui/react": "<rootDir>/node_modules/@oxygen-ui/react"
},
modulePaths: [
"<rootDir>"
Expand All @@ -69,7 +72,8 @@ module.exports = {
"^.+\\.(ts|tsx)?$": "ts-jest"
},
transformIgnorePatterns: [
"/node_modules/?(?!@wso2is)"
"/node_modules/?(?!@wso2is)",
"/node_modules/(?!@oxygen-ui/react/)"
],
verbose: true
verbose: true,
};
22 changes: 11 additions & 11 deletions apps/console/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@wso2is/console",
"version": "2.12.30",
"version": "2.13.13",
"description": "WSO2 Identity Server Console",
"author": "WSO2",
"license": "Apache-2.0",
Expand Down Expand Up @@ -30,7 +30,7 @@
"postbuild": "node scripts/post-build.js",
"poststart": "pnpm run postbuild",
"start": "pnpm prestart && pnpm nx run console:serve && pnpm poststart",
"test": "pnpm jest --passWithNoTests",
"test": "jest --passWithNoTests",
"test:watch": "pnpm run test --watchAll",
"start:profile": "pnpm run start -- --env ENABLE_BUILD_PROFILER=true",
"start:verbose": "pnpm run start -- --env LOG_LEVEL=verbose",
Expand All @@ -51,15 +51,15 @@
"@mui/utils": "^5.12.3",
"@oxygen-ui/react": "^1.9.0",
"@oxygen-ui/react-icons": "^1.9.0",
"@wso2is/access-control": "^2.0.20",
"@wso2is/common": "^2.0.45",
"@wso2is/core": "^2.0.36",
"@wso2is/dynamic-forms": "^2.0.37",
"@wso2is/form": "^2.0.37",
"@wso2is/forms": "^2.0.24",
"@wso2is/i18n": "^2.0.126",
"@wso2is/react-components": "^2.1.9",
"@wso2is/theme": "^2.0.67",
"@wso2is/access-control": "^2.0.21",
"@wso2is/common": "^2.0.50",
"@wso2is/core": "^2.0.37",
"@wso2is/dynamic-forms": "^2.0.39",
"@wso2is/form": "^2.0.39",
"@wso2is/forms": "^2.0.26",
"@wso2is/i18n": "^2.1.3",
"@wso2is/react-components": "^2.1.10",
"@wso2is/theme": "^2.0.69",
"@wso2is/validation": "^2.0.3",
"axios": "^0.19.2",
"codemirror": "^5.52.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/console/src/auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
<!-- End of custom stylesheets -->

<!-- Start of custom scripts added to the head -->
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.publicPath %>extensions/head-script.js"></script>
<script defer type="text/javascript" src="<%= htmlWebpackPlugin.options.publicPath %>extensions/head-script.js"></script>
<!-- End of custom scripts added to the head -->
</head>
<body onload="preLoaderResolver()">
Expand Down Expand Up @@ -334,7 +334,7 @@
</div>

<!-- Start of custom scripts added to the body -->
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.publicPath %>extensions/body-script.js"></script>
<script defer type="text/javascript" src="<%= htmlWebpackPlugin.options.publicPath %>extensions/body-script.js"></script>
<!-- End of custom scripts added to the body -->
</body>
</html>
12 changes: 1 addition & 11 deletions apps/console/src/branding/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2023-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand All @@ -23,11 +23,6 @@ import { extendTheme } from "@oxygen-ui/react/theme";
export const AsgardeoTheme: Theme = extendTheme({
colorSchemes: {
dark: {
brand: {
logo: {
main: `${process.env.PUBLIC_URL}/assets/brands/asgardeo/images/asgardeo-logo-inverted.svg`
}
},
palette: {
customComponents: {
Navbar: {
Expand All @@ -46,11 +41,6 @@ export const AsgardeoTheme: Theme = extendTheme({
}
},
light: {
brand: {
logo: {
main: `${process.env.PUBLIC_URL}/assets/brands/asgardeo/images/asgardeo-logo.svg`
}
},
palette: {
customComponents: {
AppShell: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ import {
} from "@wso2is/react-components";
import {

Check warning on line 43 in apps/console/src/extensions/components/account-login/pages/alternative-login-identifier-edit.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

`../../../../features/server-configurations/constants` import should occur after import of `../../../../features/server-configurations/api`
ServerConfigurationsConstants
} from "apps/console/src/features/server-configurations/constants";
} from "../../../../features/server-configurations/constants";
import { AxiosError } from "axios";

Check warning on line 46 in apps/console/src/extensions/components/account-login/pages/alternative-login-identifier-edit.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

`axios` import should occur after import of `@wso2is/core/errors`
import isEmpty from "lodash-es/isEmpty";

Check warning on line 47 in apps/console/src/extensions/components/account-login/pages/alternative-login-identifier-edit.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

`lodash-es/isEmpty` import should occur after import of `@wso2is/core/errors`
import { IdentityAppsError } from "modules/core/dist/types/errors";
import { IdentityAppsError } from "@wso2is/core/errors";
import React, {
FunctionComponent,
ReactElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import {
PageLayout,
Text
} from "@wso2is/react-components";
import { updateValidationConfigData, useValidationConfigData } from "apps/console/src/features/validation/api";
import { updateValidationConfigData, useValidationConfigData } from "../../../../features/validation/api";
import {
ValidationConfInterface,
ValidationDataInterface,
ValidationFormInterface,
ValidationPropertyInterface
} from "apps/console/src/features/validation/models";
} from "../../../../features/validation/models";
import { AxiosError } from "axios";
import React, {
FunctionComponent,
Expand Down Expand Up @@ -572,6 +572,7 @@ export const UsernameValidationEditPage: FunctionComponent<UsernameValidationEdi
listen={ (value: boolean) => setInitialFormValues(
{ ...currentValues, isAlphanumericOnly: value }
) }
readOnly={ true }
width={ 16 }
defaultValue={ initialFormValues }
data-componentid={ `${componentId}-is-alphanumeric-only` }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { HttpMethods } from "@wso2is/core/models";
import useRequest, {
RequestErrorInterface,
RequestResultInterface
} from "apps/console/src/features/core/hooks/use-request";
} from "../../../../features/core/hooks/use-request";
import { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
import { store } from "../../../../features/core/store";
import { APIResourcesConstants } from "../constants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
ListLayout,
PrimaryButton
} from "@wso2is/react-components";
import { getEmptyPlaceholderIllustrations } from "apps/console/src/features/core";
import { getEmptyPlaceholderIllustrations } from "../../../../../features/core";
import React, { FunctionComponent, ReactElement, useEffect, useState } from "react";
import { Trans, useTranslation } from "react-i18next";
import { Icon, Input } from "semantic-ui-react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { CommonUtils } from "@wso2is/core/utils";
import {
DataTable, EmptyPlaceholder, LinkButton, PrimaryButton, TableActionsInterface, TableColumnInterface
} from "@wso2is/react-components";
import { getEmptyPlaceholderIllustrations } from "apps/console/src/features/core";
import { getEmptyPlaceholderIllustrations } from "../../../../../features/core";
import React, { FunctionComponent, ReactElement, ReactNode, SyntheticEvent, useState } from "react";
import { useTranslation } from "react-i18next";
import { Header, Icon, Label, SemanticICONS } from "semantic-ui-react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
TableActionsInterface,
TableColumnInterface
} from "@wso2is/react-components";
import { IdentityAppsApiException } from "modules/core/dist/types/exceptions";
import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import React, { FunctionComponent, ReactElement, ReactNode, SyntheticEvent, useState } from "react";
import { useTranslation } from "react-i18next";
import { useDispatch, useSelector } from "react-redux";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* under the License.
*/

import { AppConstants } from "apps/console/src/features/core";
import { AppConstants } from "../../../../features/core";

/**
* Class containing API resources constants.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { HttpMethods } from "@wso2is/core/models";
import useRequest, {
RequestErrorInterface,
RequestResultInterface
} from "apps/console/src/features/core/hooks/use-request";
} from "../../../../../features/core/hooks/use-request";
import { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
import { store } from "../../../../../features/core/store";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
PrimaryButton,
useDocumentation
} from "@wso2is/react-components";
import { RequestErrorInterface } from "apps/console/src/features/core/hooks/use-request";
import { RequestErrorInterface } from "../../../../../features/core/hooks/use-request";
import { AxiosError } from "axios";
import React, {
Fragment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import {
SegmentedAccordion,
SegmentedAccordionTitleActionInterface
} from "@wso2is/react-components";
import { getEmptyPlaceholderIllustrations, history } from "apps/console/src/features/core";
import { RequestErrorInterface } from "apps/console/src/features/core/hooks/use-request";
import { getEmptyPlaceholderIllustrations, history } from "../../../../../features/core";
import { RequestErrorInterface } from "../../../../../features/core/hooks/use-request";
import { AxiosError } from "axios";
import React, { Fragment, FunctionComponent, ReactElement, useEffect, useState } from "react";
import { Trans, useTranslation } from "react-i18next";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
Heading,
PrimaryButton
} from "@wso2is/react-components";
import { IdentityAppsApiException } from "modules/core/dist/types/exceptions";
import { IdentityAppsApiException } from "@wso2is/core/exceptions";
import React, { MutableRefObject, ReactElement, useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { useDispatch } from "react-redux";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { EmptyPlaceholder,
LinkButton,
Message,
PrimaryButton } from "@wso2is/react-components";
import { getEmptyPlaceholderIllustrations } from "apps/console/src/features/core";
import { getEmptyPlaceholderIllustrations } from "../../../features/core";
import React, {
MutableRefObject,
ReactElement,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,17 @@ const EmailOTPQuickStart: FunctionComponent<EmailOTPQuickStartPropsInterface> =
i18nKey={ "extensions:develop.identityProviders.emailOTP.quickStart.steps.selectEmailOTP" +
".content" }
>
Go to <strong>Login Flow</strong> tab and click on <strong>Start with default
configuration</strong>.
Go to <strong>Login Flow</strong> tab and click on the <strong>Username & Password +
Email OTP </strong> option from the Multi-factor login section to configure a
basic Email OTP flow.
</Trans>
</Text>
<GenericIcon inline transparent icon={ BuildLoginFlowIllustration } size="huge"/>
</>
),
stepTitle: (
<Trans i18nKey="extensions:develop.identityProviders.emailOTP.quickStart.steps.selectEmailOTP.heading">
Select <strong>Start with default configuration</strong>
Select <strong>Email OTP</strong> option
</Trans>
)
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ import BuildLoginFlowIllustration from
"../../../../features/connections/components/authenticators/fido/assets/build-login-flow.png";
import ConfigureParametersIllustration from
"../../../../features/connections/components/authenticators/fido/assets/configure-parameters.png";
import CustomizeStepsIllustration from
"../../../../features/connections/components/authenticators/fido/assets/customize-steps.png";
import { FeatureConfigInterface } from "../../../../features/core/models";
import { AppState } from "../../../../features/core/store";
import { VerticalStepper, VerticalStepperStepInterface } from "../../component-extensions";
Expand Down Expand Up @@ -106,34 +104,19 @@ const FIDOQuickStart: FunctionComponent<FIDOQuickStartPropsInterface> = (
<Trans
i18nKey={ "extensions:develop.identityProviders.fido.quickStart.steps.selectFIDO.content" }
>
Go to <strong>Login Flow</strong> tab and click on <strong>Add Passkey
Login</strong> to configure a basic passkey flow.
Go to <strong>Login Flow</strong> tab and click on the <strong>Passkey</strong>
option from the Passwordless login section to configure a basic Passkey flow.
</Trans>
</Text>
<GenericIcon inline transparent icon={ BuildLoginFlowIllustration } size="huge"/>
</>
),
stepTitle: (
<Trans i18nKey="extensions:develop.identityProviders.fido.quickStart.steps.selectFIDO.heading">
Select <strong>Add Passkey Login</strong>
Select <strong>Passkey</strong> option
</Trans>
)
},
{
stepContent: (
<>
<Text>
<Trans
i18nKey="extensions:develop.identityProviders.fido.quickStart.steps.customizeFlow.content"
>
Continue to configure the login flow as required.
</Trans>
</Text>
<GenericIcon inline transparent icon={ CustomizeStepsIllustration } size="huge"/>
</>
),
stepTitle: t("extensions:develop.identityProviders.fido.quickStart.steps.customizeFlow.heading")
},
{
stepContent: (
<>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading

0 comments on commit 008b03b

Please sign in to comment.