From e7914e82f1ddc9308353495ac2ca1eb7b4a5dbb2 Mon Sep 17 00:00:00 2001 From: thiva-k Date: Fri, 5 Apr 2024 15:49:38 +0530 Subject: [PATCH] Remove modules/common --- modules/common/.babelrc | 30 - modules/common/CHANGELOG.md | 582 ------------------ modules/common/README.md | 8 - modules/common/package.json | 82 --- modules/common/project.json | 56 -- modules/common/rollup.config.cjs | 21 - modules/common/src/actions/ui-config.ts | 34 - .../src/assets/icons/caret-left-icon.svg | 15 - .../src/assets/icons/caret-right-icon.svg | 16 - .../common/src/assets/icons/cross-icon.svg | 14 - modules/common/src/assets/icons/pin-icon.svg | 14 - .../common/src/assets/icons/unpin-icon.svg | 14 - modules/common/src/assets/icons/upload.svg | 13 - .../common/src/assets/illustrations/badge.svg | 20 - .../illustrations/certificate-avatar.svg | 33 - .../src/assets/illustrations/certificate.svg | 29 - .../create-error-illustration.svg | 35 -- .../illustrations/empty-list-illustration.svg | 65 -- .../empty-search-illustration.svg | 65 -- .../src/assets/illustrations/ribbon.svg | 13 - .../components/modals/help-panel-modal.tsx | 171 ----- .../modals/modal-with-side-panel.tsx | 156 ----- .../modals/tier-limit-error-modal.tsx | 81 --- .../common/src/components/quick-start-tab.tsx | 45 -- .../src/components/vertical-stepper/step.tsx | 125 ---- .../vertical-stepper/vertical-stepper.tsx | 109 ---- modules/common/src/configs/app.ts | 97 --- modules/common/src/configs/ui.ts | 92 --- modules/common/src/constants/app-constants.ts | 387 ------------ .../src/constants/organization-constants.ts | 69 --- .../shared/application-management.ts | 447 -------------- .../src/constants/shared/role-management.ts | 29 - modules/common/src/constants/ui-constants.ts | 77 --- .../contexts/deployment-config-context.tsx | 27 - .../contexts/resource-endpoints-context.tsx | 27 - .../common/src/contexts/ui-config-context.tsx | 27 - modules/common/src/helpers/history.ts | 12 - modules/common/src/hooks/use-app-configs.ts | 25 - .../src/hooks/use-deployment-configs.ts | 31 - .../src/hooks/use-get-organization-type.tsx | 23 - modules/common/src/hooks/use-request.ts | 135 ---- .../src/hooks/use-resource-endpoints.ts | 31 - modules/common/src/hooks/use-ui-configs.ts | 31 - modules/common/src/index.ts | 35 -- modules/common/src/models/analytics.ts | 19 - modules/common/src/models/common.ts | 207 ------- modules/common/src/models/config.ts | 340 ---------- modules/common/src/models/documentation.ts | 81 --- modules/common/src/models/help-panel.ts | 60 -- modules/common/src/models/reducer-state.ts | 76 --- modules/common/src/models/ui.ts | 64 -- .../src/providers/app-config-provider.tsx | 37 -- .../providers/deployment-config-provider.tsx | 41 -- .../providers/resource-enpoints-provider.tsx | 44 -- .../src/providers/ui-config-provider.tsx | 47 -- .../common/src/reducers/ui-config-reducer.tsx | 22 - .../common/src/store/actions/acess-control.ts | 36 -- modules/common/src/store/actions/global.ts | 24 - .../common/src/store/actions/help-panel.ts | 63 -- .../common/src/store/actions/organization.ts | 87 --- modules/common/src/store/actions/routes.ts | 45 -- .../src/store/actions/types/access-control.ts | 52 -- .../common/src/store/actions/types/global.ts | 43 -- .../src/store/actions/types/help-panel.ts | 90 --- .../src/store/actions/types/organization.ts | 51 -- .../common/src/store/actions/types/routes.ts | 42 -- modules/common/src/store/combine-reducers.ts | 50 -- modules/common/src/store/index.ts | 49 -- .../src/store/reducers/access-control.ts | 45 -- modules/common/src/store/reducers/config.ts | 158 ----- modules/common/src/store/reducers/global.ts | 54 -- .../common/src/store/reducers/help-panel.ts | 66 -- modules/common/src/store/reducers/loaders.ts | 21 - .../common/src/store/reducers/organization.ts | 71 --- modules/common/src/store/reducers/profile.ts | 30 - modules/common/src/store/reducers/routes.ts | 66 -- modules/common/src/utils/organization.ts | 26 - modules/common/src/utils/roles.ts | 45 -- modules/common/tsconfig.json | 19 - modules/common/tsconfig.lib.json | 24 - modules/common/tsconfig.spec.json | 19 - modules/common/types/globals.d.ts | 17 - modules/common/types/imports.d.ts | 24 - tsconfig.base.json | 1 - workspace.json | 1 - 85 files changed, 5805 deletions(-) delete mode 100644 modules/common/.babelrc delete mode 100644 modules/common/CHANGELOG.md delete mode 100644 modules/common/README.md delete mode 100644 modules/common/package.json delete mode 100644 modules/common/project.json delete mode 100644 modules/common/rollup.config.cjs delete mode 100644 modules/common/src/actions/ui-config.ts delete mode 100644 modules/common/src/assets/icons/caret-left-icon.svg delete mode 100644 modules/common/src/assets/icons/caret-right-icon.svg delete mode 100644 modules/common/src/assets/icons/cross-icon.svg delete mode 100644 modules/common/src/assets/icons/pin-icon.svg delete mode 100644 modules/common/src/assets/icons/unpin-icon.svg delete mode 100644 modules/common/src/assets/icons/upload.svg delete mode 100644 modules/common/src/assets/illustrations/badge.svg delete mode 100644 modules/common/src/assets/illustrations/certificate-avatar.svg delete mode 100644 modules/common/src/assets/illustrations/certificate.svg delete mode 100644 modules/common/src/assets/illustrations/create-error-illustration.svg delete mode 100644 modules/common/src/assets/illustrations/empty-list-illustration.svg delete mode 100644 modules/common/src/assets/illustrations/empty-search-illustration.svg delete mode 100644 modules/common/src/assets/illustrations/ribbon.svg delete mode 100644 modules/common/src/components/modals/help-panel-modal.tsx delete mode 100644 modules/common/src/components/modals/modal-with-side-panel.tsx delete mode 100644 modules/common/src/components/modals/tier-limit-error-modal.tsx delete mode 100644 modules/common/src/components/quick-start-tab.tsx delete mode 100644 modules/common/src/components/vertical-stepper/step.tsx delete mode 100644 modules/common/src/components/vertical-stepper/vertical-stepper.tsx delete mode 100644 modules/common/src/configs/app.ts delete mode 100644 modules/common/src/configs/ui.ts delete mode 100644 modules/common/src/constants/app-constants.ts delete mode 100644 modules/common/src/constants/organization-constants.ts delete mode 100644 modules/common/src/constants/shared/application-management.ts delete mode 100644 modules/common/src/constants/shared/role-management.ts delete mode 100644 modules/common/src/constants/ui-constants.ts delete mode 100644 modules/common/src/contexts/deployment-config-context.tsx delete mode 100644 modules/common/src/contexts/resource-endpoints-context.tsx delete mode 100644 modules/common/src/contexts/ui-config-context.tsx delete mode 100644 modules/common/src/helpers/history.ts delete mode 100644 modules/common/src/hooks/use-app-configs.ts delete mode 100644 modules/common/src/hooks/use-deployment-configs.ts delete mode 100644 modules/common/src/hooks/use-get-organization-type.tsx delete mode 100644 modules/common/src/hooks/use-request.ts delete mode 100644 modules/common/src/hooks/use-resource-endpoints.ts delete mode 100644 modules/common/src/hooks/use-ui-configs.ts delete mode 100644 modules/common/src/index.ts delete mode 100644 modules/common/src/models/analytics.ts delete mode 100644 modules/common/src/models/common.ts delete mode 100644 modules/common/src/models/config.ts delete mode 100644 modules/common/src/models/documentation.ts delete mode 100644 modules/common/src/models/help-panel.ts delete mode 100644 modules/common/src/models/reducer-state.ts delete mode 100644 modules/common/src/models/ui.ts delete mode 100644 modules/common/src/providers/app-config-provider.tsx delete mode 100644 modules/common/src/providers/deployment-config-provider.tsx delete mode 100644 modules/common/src/providers/resource-enpoints-provider.tsx delete mode 100644 modules/common/src/providers/ui-config-provider.tsx delete mode 100644 modules/common/src/reducers/ui-config-reducer.tsx delete mode 100644 modules/common/src/store/actions/acess-control.ts delete mode 100644 modules/common/src/store/actions/global.ts delete mode 100755 modules/common/src/store/actions/help-panel.ts delete mode 100644 modules/common/src/store/actions/organization.ts delete mode 100644 modules/common/src/store/actions/routes.ts delete mode 100644 modules/common/src/store/actions/types/access-control.ts delete mode 100644 modules/common/src/store/actions/types/global.ts delete mode 100755 modules/common/src/store/actions/types/help-panel.ts delete mode 100644 modules/common/src/store/actions/types/organization.ts delete mode 100644 modules/common/src/store/actions/types/routes.ts delete mode 100644 modules/common/src/store/combine-reducers.ts delete mode 100644 modules/common/src/store/index.ts delete mode 100644 modules/common/src/store/reducers/access-control.ts delete mode 100644 modules/common/src/store/reducers/config.ts delete mode 100644 modules/common/src/store/reducers/global.ts delete mode 100755 modules/common/src/store/reducers/help-panel.ts delete mode 100644 modules/common/src/store/reducers/loaders.ts delete mode 100644 modules/common/src/store/reducers/organization.ts delete mode 100644 modules/common/src/store/reducers/profile.ts delete mode 100644 modules/common/src/store/reducers/routes.ts delete mode 100644 modules/common/src/utils/organization.ts delete mode 100644 modules/common/src/utils/roles.ts delete mode 100644 modules/common/tsconfig.json delete mode 100644 modules/common/tsconfig.lib.json delete mode 100644 modules/common/tsconfig.spec.json delete mode 100644 modules/common/types/globals.d.ts delete mode 100644 modules/common/types/imports.d.ts diff --git a/modules/common/.babelrc b/modules/common/.babelrc deleted file mode 100644 index 03f47cba2e1..00000000000 --- a/modules/common/.babelrc +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -{ - "plugins": [ - [ - "babel-plugin-rename-jsx-attribute", - { - "attributes": { - "data-suppress": "data-hj-suppress" - } - } - ] - ], - "presets": [ - [ - "@nrwl/react/babel", - { - "runtime": "automatic", - "useBuiltIns": "usage" - } - ] - ] -} diff --git a/modules/common/CHANGELOG.md b/modules/common/CHANGELOG.md deleted file mode 100644 index ff0c789ecc7..00000000000 --- a/modules/common/CHANGELOG.md +++ /dev/null @@ -1,582 +0,0 @@ -# @wso2is/common - -## 2.0.54 - -### Patch Changes - -- [#5894](https://github.com/wso2/identity-apps/pull/5894) [`616887f5f8`](https://github.com/wso2/identity-apps/commit/616887f5f8450f86c42a98a3d5d373e20d3f5810) Thanks [@savindi7](https://github.com/savindi7)! - Add branding to Identifier in Login and Password Recovery. - -- Updated dependencies [[`616887f5f8`](https://github.com/wso2/identity-apps/commit/616887f5f8450f86c42a98a3d5d373e20d3f5810)]: - - @wso2is/i18n@2.1.7 - -## 2.0.53 - -### Patch Changes - -- [#5847](https://github.com/wso2/identity-apps/pull/5847) [`92c327a9ef`](https://github.com/wso2/identity-apps/commit/92c327a9ef7b584f7f105790f1ec389f2d62a39d) Thanks [@DilshanSenarath](https://github.com/DilshanSenarath)! - Enable configurability for SCIM custom schema URI - -- Updated dependencies [[`92c327a9ef`](https://github.com/wso2/identity-apps/commit/92c327a9ef7b584f7f105790f1ec389f2d62a39d)]: - - @wso2is/core@2.0.38 - - @wso2is/access-control@2.0.23 - - @wso2is/forms@2.0.28 - - @wso2is/i18n@2.1.6 - - @wso2is/react-components@2.1.13 - -## 2.0.52 - -### Patch Changes - -- [#5835](https://github.com/wso2/identity-apps/pull/5835) [`48d274b6b2`](https://github.com/wso2/identity-apps/commit/48d274b6b25895fe3254dc392f0b722dbc4caa74) Thanks [@VivekVinushanth](https://github.com/VivekVinushanth)! - Improve audit log ux - -- Updated dependencies [[`48d274b6b2`](https://github.com/wso2/identity-apps/commit/48d274b6b25895fe3254dc392f0b722dbc4caa74)]: - - @wso2is/react-components@2.1.12 - - @wso2is/access-control@2.0.22 - -## 2.0.51 - -### Patch Changes - -- [#5758](https://github.com/wso2/identity-apps/pull/5758) [`2381bd93b8`](https://github.com/wso2/identity-apps/commit/2381bd93b883b2e491419d298796fbc35d4e7990) Thanks [@dasuni-30](https://github.com/dasuni-30)! - Fix the responsiveness issues in the info card - -- Updated dependencies [[`2381bd93b8`](https://github.com/wso2/identity-apps/commit/2381bd93b883b2e491419d298796fbc35d4e7990)]: - - @wso2is/react-components@2.1.11 - - @wso2is/forms@2.0.27 - -## 2.0.50 - -### Patch Changes - -- [#5721](https://github.com/wso2/identity-apps/pull/5721) [`e58b366693`](https://github.com/wso2/identity-apps/commit/e58b3666931dac0ef802aa00657c71ff2593d6cd) Thanks [@DilshanSenarath](https://github.com/DilshanSenarath)! - Add missing i18n content - -## 2.0.49 - -### Patch Changes - -- [#5675](https://github.com/wso2/identity-apps/pull/5675) [`440500b008`](https://github.com/wso2/identity-apps/commit/440500b008c1f3ce95eef5bf9a6250b29fdabb8f) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Enable conditionally displaying governance connector related UI elements - -## 2.0.48 - -### Patch Changes - -- [#5626](https://github.com/wso2/identity-apps/pull/5626) [`17be9fce9c`](https://github.com/wso2/identity-apps/commit/17be9fce9ce703a35c50c0119e9486c8b47995b0) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Fix issue with bot detection and firefox browsers - -- Updated dependencies [[`17be9fce9c`](https://github.com/wso2/identity-apps/commit/17be9fce9ce703a35c50c0119e9486c8b47995b0)]: - - @wso2is/forms@2.0.26 - -## 2.0.47 - -### Patch Changes - -- [#5611](https://github.com/wso2/identity-apps/pull/5611) [`b101792fc4`](https://github.com/wso2/identity-apps/commit/b101792fc43b6468c5a893397658d239f28739d0) Thanks [@Achintha444](https://github.com/Achintha444)! - [improvement] improve URL validation in branding and move HTML text sanitization to `core` - -- Updated dependencies [[`b101792fc4`](https://github.com/wso2/identity-apps/commit/b101792fc43b6468c5a893397658d239f28739d0)]: - - @wso2is/react-components@2.1.10 - - @wso2is/access-control@2.0.21 - - @wso2is/forms@2.0.25 - - @wso2is/core@2.0.37 - - @wso2is/i18n@2.0.130 - -## 2.0.46 - -### Patch Changes - -- [#5556](https://github.com/wso2/identity-apps/pull/5556) [`156b149fea`](https://github.com/wso2/identity-apps/commit/156b149fea83b93c6981a034bb1308c4b259b0e6) Thanks [@savindi7](https://github.com/savindi7)! - Update content related to Authorize API Resource modal and empty illustration. - -- Updated dependencies [[`593bfb1b81`](https://github.com/wso2/identity-apps/commit/593bfb1b816e0210fb631efc3edd4542f6568df3)]: - - @wso2is/i18n@2.0.127 - -## 2.0.45 - -### Patch Changes - -- [#5539](https://github.com/wso2/identity-apps/pull/5539) [`103e725ba7`](https://github.com/wso2/identity-apps/commit/103e725ba75daef8fb0612da5888f2f7531412c8) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Add email as username capability to user creation wizard - -* [#5540](https://github.com/wso2/identity-apps/pull/5540) [`2450476542`](https://github.com/wso2/identity-apps/commit/24504765423f58bf611721b05799bdb2eb38308d) Thanks [@DilshanSenarath](https://github.com/DilshanSenarath)! - Fix the issues in user's danger section and user table actions - -- [#5543](https://github.com/wso2/identity-apps/pull/5543) [`c442b2fd0f`](https://github.com/wso2/identity-apps/commit/c442b2fd0ffa18e3f4d641387d42dadd5eb29721) Thanks [@brionmario](https://github.com/brionmario)! - Fix the visual editor update button - -- Updated dependencies [[`f423ee0d5d`](https://github.com/wso2/identity-apps/commit/f423ee0d5d82818e079af6a5cc5ec2d761151685), [`2450476542`](https://github.com/wso2/identity-apps/commit/24504765423f58bf611721b05799bdb2eb38308d), [`c442b2fd0f`](https://github.com/wso2/identity-apps/commit/c442b2fd0ffa18e3f4d641387d42dadd5eb29721)]: - - @wso2is/react-components@2.1.9 - - @wso2is/access-control@2.0.20 - - @wso2is/core@2.0.36 - - @wso2is/forms@2.0.24 - - @wso2is/i18n@2.0.126 - -## 2.0.44 - -### Patch Changes - -- [#5521](https://github.com/wso2/identity-apps/pull/5521) [`dee6342be9`](https://github.com/wso2/identity-apps/commit/dee6342be98f63a7612cb122a6043fd1cb895ced) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Address text changes in the Connections role mapping UI - -- Updated dependencies [[`d39283c8f0`](https://github.com/wso2/identity-apps/commit/d39283c8f0e684931e6393cba53f606e59b927ce), [`dee6342be9`](https://github.com/wso2/identity-apps/commit/dee6342be98f63a7612cb122a6043fd1cb895ced)]: - - @wso2is/i18n@2.0.125 - -## 2.0.43 - -### Patch Changes - -- [#5515](https://github.com/wso2/identity-apps/pull/5515) [`a252735e1f`](https://github.com/wso2/identity-apps/commit/a252735e1f206c2c47e0d5d0011381e793cc83f4) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Fix UX issues related to role attributes in connections - -- Updated dependencies [[`a252735e1f`](https://github.com/wso2/identity-apps/commit/a252735e1f206c2c47e0d5d0011381e793cc83f4)]: - - @wso2is/i18n@2.0.124 - -## 2.0.42 - -### Patch Changes - -- [#5514](https://github.com/wso2/identity-apps/pull/5514) [`1e6be6b088`](https://github.com/wso2/identity-apps/commit/1e6be6b088742e6efbde124e4e7b05636ee64719) Thanks [@JayaShakthi97](https://github.com/JayaShakthi97)! - Improve UX related to IDP groups section - -- Updated dependencies [[`101b8e535e`](https://github.com/wso2/identity-apps/commit/101b8e535e67354cb3bbb5c88f3b9d3633d596a4)]: - - @wso2is/i18n@2.0.123 - -## 2.0.41 - -### Patch Changes - -- [#5498](https://github.com/wso2/identity-apps/pull/5498) [`900d253e7e`](https://github.com/wso2/identity-apps/commit/900d253e7e15fb74ee6d149ff19bb87e88c835e7) Thanks [@DilshanSenarath](https://github.com/DilshanSenarath)! - Unify the trusted token issuer text content - -- Updated dependencies [[`900d253e7e`](https://github.com/wso2/identity-apps/commit/900d253e7e15fb74ee6d149ff19bb87e88c835e7)]: - - @wso2is/i18n@2.0.122 - -## 2.0.40 - -### Patch Changes - -- [#5485](https://github.com/wso2/identity-apps/pull/5485) [`9589f58413`](https://github.com/wso2/identity-apps/commit/9589f58413652c2a61ca908659599cbfa66d1f81) Thanks [@savindi7](https://github.com/savindi7)! - Update Connection icons. - -- Updated dependencies [[`9589f58413`](https://github.com/wso2/identity-apps/commit/9589f58413652c2a61ca908659599cbfa66d1f81)]: - - @wso2is/react-components@2.1.8 - - @wso2is/forms@2.0.23 - -## 2.0.39 - -### Patch Changes - -- [#5488](https://github.com/wso2/identity-apps/pull/5488) [`65c62b577a`](https://github.com/wso2/identity-apps/commit/65c62b577add1783fd28c606c78a949aa2647250) Thanks [@NipuniBhagya](https://github.com/NipuniBhagya)! - Fix overflow issue in workflow approvals - -- Updated dependencies [[`65c62b577a`](https://github.com/wso2/identity-apps/commit/65c62b577add1783fd28c606c78a949aa2647250)]: - - @wso2is/react-components@2.1.7 - - @wso2is/forms@2.0.22 - -## 2.0.38 - -### Patch Changes - -- [#5483](https://github.com/wso2/identity-apps/pull/5483) [`2575c34693`](https://github.com/wso2/identity-apps/commit/2575c34693943f56dbe824f69ac2f7ba715bd721) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Fix grouping in dynamic governance connectors - -- Updated dependencies [[`2575c34693`](https://github.com/wso2/identity-apps/commit/2575c34693943f56dbe824f69ac2f7ba715bd721)]: - - @wso2is/i18n@2.0.120 - -## 2.0.37 - -### Patch Changes - -- [#5470](https://github.com/wso2/identity-apps/pull/5470) [`f58ad94c02`](https://github.com/wso2/identity-apps/commit/f58ad94c02ba67759480812d52e6cecc9bd3bc95) Thanks [@brionmario](https://github.com/brionmario)! - Stop minifying public assets - -- Updated dependencies [[`f58ad94c02`](https://github.com/wso2/identity-apps/commit/f58ad94c02ba67759480812d52e6cecc9bd3bc95)]: - - @wso2is/react-components@2.1.6 - - @wso2is/forms@2.0.21 - -## 2.0.36 - -### Patch Changes - -- [#5447](https://github.com/wso2/identity-apps/pull/5447) [`cc77f90975`](https://github.com/wso2/identity-apps/commit/cc77f909754080d55ae375f74b29c6387df24298) Thanks [@savindi7](https://github.com/savindi7)! - Update content and validations in Ask password configs - -- Updated dependencies [[`d57abf987f`](https://github.com/wso2/identity-apps/commit/d57abf987f8752ee33c964b20e38ba52c6d4fd76), [`cc77f90975`](https://github.com/wso2/identity-apps/commit/cc77f909754080d55ae375f74b29c6387df24298)]: - - @wso2is/i18n@2.0.118 - -## 2.0.35 - -### Patch Changes - -- [#5448](https://github.com/wso2/identity-apps/pull/5448) [`53a104f778`](https://github.com/wso2/identity-apps/commit/53a104f77830e39f1717b079b40bcba860fd1209) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Update hasRequiredScopes method to cater organization level UI scopes - -- Updated dependencies [[`b6c27667fc`](https://github.com/wso2/identity-apps/commit/b6c27667fc6e1984184b2d756918f0185a7825bf), [`53a104f778`](https://github.com/wso2/identity-apps/commit/53a104f77830e39f1717b079b40bcba860fd1209)]: - - @wso2is/react-components@2.1.5 - - @wso2is/core@2.0.35 - - @wso2is/access-control@2.0.19 - - @wso2is/forms@2.0.20 - - @wso2is/i18n@2.0.117 - -## 2.0.34 - -### Patch Changes - -- [#5438](https://github.com/wso2/identity-apps/pull/5438) [`c8df38c747`](https://github.com/wso2/identity-apps/commit/c8df38c747c0b802c733639642f21367279fd5c4) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Fix subject attribute issue in OIDC applications - -* [#5445](https://github.com/wso2/identity-apps/pull/5445) [`2716489838`](https://github.com/wso2/identity-apps/commit/2716489838478b4092beec1201fb936a8b4042ee) Thanks [@JayaShakthi97](https://github.com/JayaShakthi97)! - Enable attributes section for OIDC connections - -* Updated dependencies [[`c8df38c747`](https://github.com/wso2/identity-apps/commit/c8df38c747c0b802c733639642f21367279fd5c4)]: - - @wso2is/i18n@2.0.116 - -## 2.0.33 - -### Patch Changes - -- [#5437](https://github.com/wso2/identity-apps/pull/5437) [`7a0f6170fc`](https://github.com/wso2/identity-apps/commit/7a0f6170fcd14b07fb52fa980332ae956220469e) Thanks [@DilshanSenarath](https://github.com/DilshanSenarath)! - Fix search and filter action panel issues - -- Updated dependencies [[`0f81fbe7f3`](https://github.com/wso2/identity-apps/commit/0f81fbe7f39a6f787867a281ab6b50f45ab0b57f), [`7a0f6170fc`](https://github.com/wso2/identity-apps/commit/7a0f6170fcd14b07fb52fa980332ae956220469e)]: - - @wso2is/i18n@2.0.115 - - @wso2is/react-components@2.1.4 - - @wso2is/forms@2.0.19 - -## 2.0.32 - -### Patch Changes - -- [#5384](https://github.com/wso2/identity-apps/pull/5384) [`70bb714df1`](https://github.com/wso2/identity-apps/commit/70bb714df1684f8df5622028b6adf7a72e262ad3) Thanks [@brionmario](https://github.com/brionmario)! - Rename `Sign-in Method` -> `Login Flow` - -- Updated dependencies [[`70bb714df1`](https://github.com/wso2/identity-apps/commit/70bb714df1684f8df5622028b6adf7a72e262ad3)]: - - @wso2is/i18n@2.0.114 - - @wso2is/core@2.0.34 - -## 2.0.31 - -### Patch Changes - -- [#5396](https://github.com/wso2/identity-apps/pull/5396) [`e2b6712595`](https://github.com/wso2/identity-apps/commit/e2b6712595cff0c1d5f4786433b854196aa3c5af) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Add custom protocol application template - -- Updated dependencies [[`e2b6712595`](https://github.com/wso2/identity-apps/commit/e2b6712595cff0c1d5f4786433b854196aa3c5af)]: - - @wso2is/i18n@2.0.111 - - @wso2is/core@2.0.33 - - @wso2is/react-components@2.1.3 - -## 2.0.30 - -### Patch Changes - -- [#5347](https://github.com/wso2/identity-apps/pull/5347) [`cc28be662d`](https://github.com/wso2/identity-apps/commit/cc28be662d01e758f6b7df468b04186759cf2b9e) Thanks [@savindi7](https://github.com/savindi7)! - Improve button text consistency. - -- Updated dependencies [[`cc28be662d`](https://github.com/wso2/identity-apps/commit/cc28be662d01e758f6b7df468b04186759cf2b9e)]: - - @wso2is/i18n@2.0.108 - -## 2.0.29 - -### Patch Changes - -- [#5337](https://github.com/wso2/identity-apps/pull/5337) [`f34a5e6a7e`](https://github.com/wso2/identity-apps/commit/f34a5e6a7e11103584df5c8ae26274f5ef5e5c8a) Thanks [@dasuni-30](https://github.com/dasuni-30)! - Add support to upload a pkcs12 file - -- Updated dependencies [[`f34a5e6a7e`](https://github.com/wso2/identity-apps/commit/f34a5e6a7e11103584df5c8ae26274f5ef5e5c8a)]: - - @wso2is/react-components@2.1.2 - - @wso2is/forms@2.0.18 - -## 2.0.28 - -### Patch Changes - -- [#5327](https://github.com/wso2/identity-apps/pull/5327) [`4daf62f1b2`](https://github.com/wso2/identity-apps/commit/4daf62f1b20a50affa871e151b753e4b3f0219dc) Thanks [@savindi7](https://github.com/savindi7)! - Fix placeholder text in mapped attributes. - -- Updated dependencies [[`4daf62f1b2`](https://github.com/wso2/identity-apps/commit/4daf62f1b20a50affa871e151b753e4b3f0219dc)]: - - @wso2is/i18n@2.0.107 - -## 2.0.27 - -### Patch Changes - -- [#5306](https://github.com/wso2/identity-apps/pull/5306) [`e91ba6d123`](https://github.com/wso2/identity-apps/commit/e91ba6d12307d580608ecde1551f9541af426d30) Thanks [@savindi7](https://github.com/savindi7)! - Add validation to user store name. - -- Updated dependencies [[`e91ba6d123`](https://github.com/wso2/identity-apps/commit/e91ba6d12307d580608ecde1551f9541af426d30)]: - - @wso2is/i18n@2.0.106 - -## 2.0.26 - -### Patch Changes - -- [#5298](https://github.com/wso2/identity-apps/pull/5298) [`f42ecb1522`](https://github.com/wso2/identity-apps/commit/f42ecb15227b64f51d68f91ed2f1580c1411c625) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Fix issue with organization switch unauthorized route - -- Updated dependencies [[`f42ecb1522`](https://github.com/wso2/identity-apps/commit/f42ecb15227b64f51d68f91ed2f1580c1411c625)]: - - @wso2is/core@2.0.32 - - @wso2is/access-control@2.0.18 - - @wso2is/forms@2.0.17 - - @wso2is/i18n@2.0.105 - - @wso2is/react-components@2.1.1 - -## 2.0.25 - -### Patch Changes - -- [#5289](https://github.com/wso2/identity-apps/pull/5289) [`0e70f8c7f9`](https://github.com/wso2/identity-apps/commit/0e70f8c7f968693397bd7bd6e4972bb0e1b8e111) Thanks [@brionmario](https://github.com/brionmario)! - Rename `Tenant Permissions` -> `Root Organization Permissions` - -* [#5272](https://github.com/wso2/identity-apps/pull/5272) [`99a993a902`](https://github.com/wso2/identity-apps/commit/99a993a9021727c62a00d75a805f37cccea882d1) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Fix form autofill preventing form submission - -* Updated dependencies [[`0e70f8c7f9`](https://github.com/wso2/identity-apps/commit/0e70f8c7f968693397bd7bd6e4972bb0e1b8e111), [`99a993a902`](https://github.com/wso2/identity-apps/commit/99a993a9021727c62a00d75a805f37cccea882d1), [`6395f654df`](https://github.com/wso2/identity-apps/commit/6395f654df1e65dfb9219954abadcdf6c9754cf1), [`486a47329a`](https://github.com/wso2/identity-apps/commit/486a47329a0e025d4841ee8dc87b96519f1879cb)]: - - @wso2is/i18n@2.0.102 - - @wso2is/core@2.0.31 - - @wso2is/forms@2.0.16 - - @wso2is/react-components@2.1.0 - -## 2.0.24 - -### Patch Changes - -- [#5260](https://github.com/wso2/identity-apps/pull/5260) [`6079baa09b`](https://github.com/wso2/identity-apps/commit/6079baa09b8fd353f5fd6b25197ec18fc3883a43) Thanks [@brionmario](https://github.com/brionmario)! - Fix OIDC Session Management issues in Console & My Account - -- Updated dependencies [[`6079baa09b`](https://github.com/wso2/identity-apps/commit/6079baa09b8fd353f5fd6b25197ec18fc3883a43)]: - - @wso2is/core@2.0.30 - - @wso2is/access-control@2.0.17 - - @wso2is/forms@2.0.15 - - @wso2is/i18n@2.0.100 - - @wso2is/react-components@2.0.39 - -## 2.0.23 - -### Patch Changes - -- [#5230](https://github.com/wso2/identity-apps/pull/5230) [`1e8fab14ee`](https://github.com/wso2/identity-apps/commit/1e8fab14eef7fb055ac861dcfe0a07c568b17be8) Thanks [@savindi7](https://github.com/savindi7)! - Add WS Fed logo to app template listing page - -- Updated dependencies [[`1e8fab14ee`](https://github.com/wso2/identity-apps/commit/1e8fab14eef7fb055ac861dcfe0a07c568b17be8)]: - - @wso2is/react-components@2.0.38 - -## 2.0.22 - -### Patch Changes - -- [#5200](https://github.com/wso2/identity-apps/pull/5200) [`0d34235611`](https://github.com/wso2/identity-apps/commit/0d34235611229eee382218d2c1b00313cecc96cf) Thanks [@savindi7](https://github.com/savindi7)! - Remove Carbon log configuration capability and fix UI issues in the Remote Logging page. - -* [#5202](https://github.com/wso2/identity-apps/pull/5202) [`1883513877`](https://github.com/wso2/identity-apps/commit/1883513877d53d42c73f7b8b1b6d7c2cf0e5d849) Thanks [@brionmario](https://github.com/brionmario)! - Add passive STS cert hint - -* Updated dependencies [[`0d34235611`](https://github.com/wso2/identity-apps/commit/0d34235611229eee382218d2c1b00313cecc96cf), [`1883513877`](https://github.com/wso2/identity-apps/commit/1883513877d53d42c73f7b8b1b6d7c2cf0e5d849)]: - - @wso2is/react-components@2.0.35 - - @wso2is/i18n@2.0.95 - - @wso2is/access-control@2.0.16 - - @wso2is/forms@2.0.13 - - @wso2is/core@2.0.28 - -## 2.0.21 - -### Patch Changes - -- [#5182](https://github.com/wso2/identity-apps/pull/5182) [`4480cc0094`](https://github.com/wso2/identity-apps/commit/4480cc0094268ca86030ff7d307bdb5fd2e6a763) Thanks [@dasuni-30](https://github.com/dasuni-30)! - Conditionally display the regex field for attributes - -- Updated dependencies [[`4480cc0094`](https://github.com/wso2/identity-apps/commit/4480cc0094268ca86030ff7d307bdb5fd2e6a763)]: - - @wso2is/core@2.0.27 - - @wso2is/access-control@2.0.15 - - @wso2is/forms@2.0.12 - - @wso2is/i18n@2.0.93 - - @wso2is/react-components@2.0.34 - -## 2.0.20 - -### Patch Changes - -- [#5178](https://github.com/wso2/identity-apps/pull/5178) [`402f7c900b`](https://github.com/wso2/identity-apps/commit/402f7c900be04cc5fa41c8f392fda7f291c33674) Thanks [@dasuni-30](https://github.com/dasuni-30)! - Fix build failure in forms module - -- Updated dependencies [[`402f7c900b`](https://github.com/wso2/identity-apps/commit/402f7c900be04cc5fa41c8f392fda7f291c33674)]: - - @wso2is/forms@2.0.11 - -## 2.0.19 - -### Patch Changes - -- [#5172](https://github.com/wso2/identity-apps/pull/5172) [`2c84895c1f`](https://github.com/wso2/identity-apps/commit/2c84895c1fb817520aeee514dd05bd7dcacd89af) Thanks [@savindi7](https://github.com/savindi7)! - Update Oxygen version to 1.8.5 - -- Updated dependencies [[`c040ebb287`](https://github.com/wso2/identity-apps/commit/c040ebb28774818045cad8ad405871f9ad897f6e), [`2c84895c1f`](https://github.com/wso2/identity-apps/commit/2c84895c1fb817520aeee514dd05bd7dcacd89af)]: - - @wso2is/i18n@2.0.91 - - @wso2is/react-components@2.0.33 - - @wso2is/forms@2.0.10 - -## 2.0.18 - -### Patch Changes - -- [#5154](https://github.com/wso2/identity-apps/pull/5154) [`afbc0c147d`](https://github.com/wso2/identity-apps/commit/afbc0c147d9d8aaf43fe93a8fe56932d066f289e) Thanks [@JayaShakthi97](https://github.com/JayaShakthi97)! - Bump react-components module - -- Updated dependencies [[`afbc0c147d`](https://github.com/wso2/identity-apps/commit/afbc0c147d9d8aaf43fe93a8fe56932d066f289e)]: - - @wso2is/react-components@2.0.32 - - @wso2is/i18n@2.0.90 - -## 2.0.17 - -### Patch Changes - -- [#5148](https://github.com/wso2/identity-apps/pull/5148) [`5fe0424f8e`](https://github.com/wso2/identity-apps/commit/5fe0424f8eb283e54d2f8f23eab6ffa7013e92c4) Thanks [@dasuni-30](https://github.com/dasuni-30)! - Dynamically render custom connector wizard fields according to the selected mode - -* [#5141](https://github.com/wso2/identity-apps/pull/5141) [`068dd0721c`](https://github.com/wso2/identity-apps/commit/068dd0721c96b769c242afa962a3eab09343044b) Thanks [@brionmario](https://github.com/brionmario)! - Enable Organization login for My Account - -* Updated dependencies [[`5fe0424f8e`](https://github.com/wso2/identity-apps/commit/5fe0424f8eb283e54d2f8f23eab6ffa7013e92c4), [`fbdecb98fa`](https://github.com/wso2/identity-apps/commit/fbdecb98fa95cb15aa041bd21a52f0809ca82da9), [`068dd0721c`](https://github.com/wso2/identity-apps/commit/068dd0721c96b769c242afa962a3eab09343044b)]: - - @wso2is/react-components@2.0.31 - - @wso2is/forms@2.0.9 - - @wso2is/i18n@2.0.89 - - @wso2is/access-control@2.0.14 - - @wso2is/core@2.0.26 - -## 2.0.16 - -### Patch Changes - -- [#5052](https://github.com/wso2/identity-apps/pull/5052) [`8c344f3ec4`](https://github.com/wso2/identity-apps/commit/8c344f3ec4ced3c93ede47a1c0accd023f2d73e0) Thanks [@brionmario](https://github.com/brionmario)! - Enable sub org logins for Console - -- Updated dependencies [[`8c344f3ec4`](https://github.com/wso2/identity-apps/commit/8c344f3ec4ced3c93ede47a1c0accd023f2d73e0)]: - - @wso2is/react-components@2.0.30 - - @wso2is/access-control@2.0.13 - - @wso2is/core@2.0.25 - - @wso2is/i18n@2.0.85 - -## 2.0.15 - -### Patch Changes - -- [#5044](https://github.com/wso2/identity-apps/pull/5044) [`c6dc46bcd2`](https://github.com/wso2/identity-apps/commit/c6dc46bcd25b0571280f2ea4b1bf9b98a70c9dab) Thanks [@savindi7](https://github.com/savindi7)! - Hide Xacml feature with config - -- Updated dependencies [[`c6dc46bcd2`](https://github.com/wso2/identity-apps/commit/c6dc46bcd25b0571280f2ea4b1bf9b98a70c9dab)]: - - @wso2is/core@2.0.23 - - @wso2is/access-control@2.0.12 - -## 2.0.14 - -### Patch Changes - -- [#4933](https://github.com/wso2/identity-apps/pull/4933) [`c5cd4b8d51`](https://github.com/wso2/identity-apps/commit/c5cd4b8d51e38eb0d82d0ec733d009993a2e9e3a) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Introduce legacy mode to console - -- Updated dependencies [[`c5cd4b8d51`](https://github.com/wso2/identity-apps/commit/c5cd4b8d51e38eb0d82d0ec733d009993a2e9e3a)]: - - @wso2is/core@2.0.22 - - @wso2is/access-control@2.0.11 - - @wso2is/forms@2.0.8 - - @wso2is/i18n@2.0.73 - - @wso2is/react-components@2.0.26 - -## 2.0.13 - -### Patch Changes - -- [#4900](https://github.com/wso2/identity-apps/pull/4900) [`951c6434c0`](https://github.com/wso2/identity-apps/commit/951c6434c03c45f8d4fa6624f5eff84a492487dd) Thanks [@DonOmalVindula](https://github.com/DonOmalVindula)! - Fix issues in the user attributes section - -- Updated dependencies [[`951c6434c0`](https://github.com/wso2/identity-apps/commit/951c6434c03c45f8d4fa6624f5eff84a492487dd)]: - - @wso2is/core@2.0.21 - - @wso2is/access-control@2.0.10 - - @wso2is/forms@2.0.7 - - @wso2is/i18n@2.0.69 - - @wso2is/react-components@2.0.25 - -## 2.0.12 - -### Patch Changes - -- [#4885](https://github.com/wso2/identity-apps/pull/4885) [`143df44dd3`](https://github.com/wso2/identity-apps/commit/143df44dd3ac1ba44c46e34590c436f38fd3c143) Thanks [@Achintha444](https://github.com/Achintha444)! - (improvement) Adding config for API Based Authn configuration - -* [#4885](https://github.com/wso2/identity-apps/pull/4885) [`614bc01dc7`](https://github.com/wso2/identity-apps/commit/614bc01dc7631402b61756a8583f6eff0bd8a6ff) Thanks [@Achintha444](https://github.com/Achintha444)! - config for api based authn - -* Updated dependencies [[`143df44dd3`](https://github.com/wso2/identity-apps/commit/143df44dd3ac1ba44c46e34590c436f38fd3c143), [`614bc01dc7`](https://github.com/wso2/identity-apps/commit/614bc01dc7631402b61756a8583f6eff0bd8a6ff)]: - - @wso2is/react-components@2.0.24 - - @wso2is/core@2.0.20 - - @wso2is/i18n@2.0.66 - - @wso2is/access-control@2.0.9 - - @wso2is/forms@2.0.6 - -## 2.0.11 - -### Patch Changes - -- [#4794](https://github.com/wso2/identity-apps/pull/4794) [`3ff5ae5e97`](https://github.com/wso2/identity-apps/commit/3ff5ae5e97085dad7d64bcd34644cd42b1774533) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Hide delete button in admin role for console application - -- Updated dependencies [[`3ff5ae5e97`](https://github.com/wso2/identity-apps/commit/3ff5ae5e97085dad7d64bcd34644cd42b1774533), [`493a19fa6c`](https://github.com/wso2/identity-apps/commit/493a19fa6cf28c7227f380fb38dd2f00f777e772), [`02599b5d1a`](https://github.com/wso2/identity-apps/commit/02599b5d1a0aba9197986275617ecd3ff5e7625e), [`827e21fa38`](https://github.com/wso2/identity-apps/commit/827e21fa38d65ec67cc30e97c9ce321c2f4549f4)]: - - @wso2is/core@2.0.19 - - @wso2is/access-control@2.0.8 - - @wso2is/forms@2.0.5 - - @wso2is/i18n@2.0.57 - - @wso2is/react-components@2.0.23 - -## 2.0.10 - -### Patch Changes - -- [#4780](https://github.com/wso2/identity-apps/pull/4780) [`a62910f64f`](https://github.com/wso2/identity-apps/commit/a62910f64fdd05bbffcbdedf1392ec451d37c6b8) Thanks [@Achintha444](https://github.com/Achintha444)! - (fix) Revert the fix the user avatar default shape to square - -- Updated dependencies [[`a62910f64f`](https://github.com/wso2/identity-apps/commit/a62910f64fdd05bbffcbdedf1392ec451d37c6b8)]: - - @wso2is/react-components@2.0.22 - - @wso2is/access-control@2.0.7 - - @wso2is/forms@2.0.4 - - @wso2is/core@2.0.18 - - @wso2is/i18n@2.0.56 - -## 2.0.9 - -### Patch Changes - -- [#4747](https://github.com/wso2/identity-apps/pull/4747) [`41104e4934`](https://github.com/wso2/identity-apps/commit/41104e493424c3abb76ef5a4c84d35b2d147d369) Thanks [@brionmario](https://github.com/brionmario)! - Add Console Settings feature - -- Updated dependencies [[`41104e4934`](https://github.com/wso2/identity-apps/commit/41104e493424c3abb76ef5a4c84d35b2d147d369)]: - - @wso2is/react-components@2.0.21 - - @wso2is/access-control@2.0.6 - - @wso2is/forms@2.0.3 - - @wso2is/core@2.0.17 - - @wso2is/i18n@2.0.53 - -## 2.0.8 - -### Patch Changes - -- [#4737](https://github.com/wso2/identity-apps/pull/4737) [`31fc142c2b`](https://github.com/wso2/identity-apps/commit/31fc142c2b0ed9c74e97a8cc6f2d58e20eec709a) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Hide default subject attribute selection dropdown for OIDC apps - -- Updated dependencies [[`31fc142c2b`](https://github.com/wso2/identity-apps/commit/31fc142c2b0ed9c74e97a8cc6f2d58e20eec709a), [`b533228182`](https://github.com/wso2/identity-apps/commit/b533228182a5092b13584912e7032c1147eacc69)]: - - @wso2is/core@2.0.16 - - @wso2is/access-control@2.0.5 - - @wso2is/forms@2.0.2 - - @wso2is/i18n@2.0.51 - - @wso2is/react-components@2.0.20 - -## 2.0.7 - -### Patch Changes - -- [#4641](https://github.com/wso2/identity-apps/pull/4641) [`640820b3c6`](https://github.com/wso2/identity-apps/commit/640820b3c6daeefa415c76e5aa0fd37a3680b9f0) Thanks [@pavinduLakshan](https://github.com/pavinduLakshan)! - Add deployment configs to conditionally enable/disable classic features - -- Updated dependencies [[`9260cecd00`](https://github.com/wso2/identity-apps/commit/9260cecd008a26d5d15596e943bf5a919a1d0c97), [`640820b3c6`](https://github.com/wso2/identity-apps/commit/640820b3c6daeefa415c76e5aa0fd37a3680b9f0)]: - - @wso2is/i18n@2.0.41 - - @wso2is/core@2.0.14 - - @wso2is/access-control@2.0.4 - - @wso2is/forms@2.0.1 - - @wso2is/react-components@2.0.16 - -## 2.0.6 - -### Patch Changes - -- [#4581](https://github.com/wso2/identity-apps/pull/4581) [`e0c4bf346f`](https://github.com/wso2/identity-apps/commit/e0c4bf346fd2c6ad6a63ba2196098d6ee8696a12) Thanks [@JayaShakthi97](https://github.com/JayaShakthi97)! - Bump i18n module version - -- Updated dependencies [[`e81a728ec2`](https://github.com/wso2/identity-apps/commit/e81a728ec287cf93a90882cff112f3a64bb1ab6e), [`e0c4bf346f`](https://github.com/wso2/identity-apps/commit/e0c4bf346fd2c6ad6a63ba2196098d6ee8696a12)]: - - @wso2is/react-components@2.0.15 - - @wso2is/i18n@2.0.36 - -## 2.0.5 - -### Patch Changes - -- [#4392](https://github.com/wso2/identity-apps/pull/4392) [`f024908ba9`](https://github.com/wso2/identity-apps/commit/f024908ba9c166a24a62c12addc7419209dfdab0) Thanks [@DilshanSenarath](https://github.com/DilshanSenarath)! - Enable adding new custom attribute mappings - -- Updated dependencies [[`8f53e4fccb`](https://github.com/wso2/identity-apps/commit/8f53e4fccb76ded393a41d5ffbf40754c95b059b)]: - - @wso2is/i18n@2.0.25 - -## 2.0.4 - -### Patch Changes - -- [#4156](https://github.com/wso2/identity-apps/pull/4156) [`3d726abaa2`](https://github.com/wso2/identity-apps/commit/3d726abaa2fe38081c647bec22d8333af8b48bb8) Thanks [@AfraHussaindeen](https://github.com/AfraHussaindeen)! - Integrate FIDO passkey enrollment during the authentication process, enabling its configuration as a primary, secondary factor along with giving prominence to "Passkey" while reducing the emphasis on "Security Key/Biometrics" - -- Updated dependencies [[`9566504a92`](https://github.com/wso2/identity-apps/commit/9566504a9270c7805af809ea1087a95d53d338fb), [`3d726abaa2`](https://github.com/wso2/identity-apps/commit/3d726abaa2fe38081c647bec22d8333af8b48bb8)]: - - @wso2is/i18n@2.0.23 - - @wso2is/react-components@2.0.11 - - @wso2is/access-control@2.0.3 - - @wso2is/core@2.0.9 - -## 2.0.3 - -### Patch Changes - -- [#4341](https://github.com/wso2/identity-apps/pull/4341) [`29c9e682ab`](https://github.com/wso2/identity-apps/commit/29c9e682ab800fdd65436032a69b4baa6663f75e) Thanks [@Rashmini](https://github.com/Rashmini)! - Add feature Organization Discovery - -- Updated dependencies [[`29c9e682ab`](https://github.com/wso2/identity-apps/commit/29c9e682ab800fdd65436032a69b4baa6663f75e)]: - - @wso2is/i18n@2.0.20 - -## 2.0.2 - -### Patch Changes - -- [#4169](https://github.com/wso2/identity-apps/pull/4169) [`cff75e07a6`](https://github.com/wso2/identity-apps/commit/cff75e07a64d86c0c3bf6d8f84a06fc53729cd88) Thanks [@JayaShakthi97](https://github.com/JayaShakthi97)! - Bug fixes and improvements - -## 2.0.1 - -### Patch Changes - -- [#4137](https://github.com/wso2/identity-apps/pull/4137) [`c30cc8f293`](https://github.com/wso2/identity-apps/commit/c30cc8f293f8f8d524f82bdeedc6105d1ce39875) Thanks [@JayaShakthi97](https://github.com/JayaShakthi97)! - Initial release diff --git a/modules/common/README.md b/modules/common/README.md deleted file mode 100644 index b21317ea452..00000000000 --- a/modules/common/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# WSO2 Identity Server - React Common Feature Library - -A Common Feature Library for WSO2 Identity Server frontend apps. - -## Install - -Add following dependency in your package.json file. -`"@wso2is/common": ""` diff --git a/modules/common/package.json b/modules/common/package.json deleted file mode 100644 index efd64d5a00b..00000000000 --- a/modules/common/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "private": true, - "name": "@wso2is/common", - "version": "2.0.54", - "description": "Common UI module for Asgardeo React Applications.", - "keywords": [ - "Asgardeo", - "WSO2", - "Asgardeo Apps" - ], - "author": "WSO2", - "license": "Apache-2.0", - "scripts": { - "build": "pnpm nx run common:build", - "clean": "pnpm clean:lock-files && pnpm clean:build && pnpm clean:node-modules", - "clean:build": "pnpm rimraf dist", - "clean:lock-files": "pnpm rimraf package-lock.json && pnpm rimraf pnpm-lock.yaml && pnpm rimraf yarn.lock", - "clean:node-modules": "pnpm rimraf node_modules", - "compile": "pnpm tsc -p tsconfig.json --incremental", - "compile:win32": "..\\..\\node_modules\\.bin\\tsc -p tsconfig.json --incremental", - "compile:default": "../../node_modules/.bin/tsc -p tsconfig.json --incremental", - "lint": "pnpm lint:all", - "lint:all": "pnpm lint:targeted -- .", - "lint:autofix": "pnpm lint:all -- --fix", - "lint:targeted": "eslint --ext .js,.jsx,.ts,.tsx --resolve-plugins-relative-to .", - "test": "jest --passWithNoTests", - "test:watch": "pnpm test -- --watch", - "typecheck": "pnpm compile" - }, - "dependencies": { - "@asgardeo/auth-react": "^4.0.1", - "@emotion/react": "^11.11.0", - "@emotion/styled": "^11.11.0", - "@microsoft/applicationinsights-core-js": "^3.0.0", - "@microsoft/applicationinsights-react-js": "^3.4.2", - "@microsoft/applicationinsights-web": "^3.0.0", - "@wso2is/access-control": "^2.0.23", - "@wso2is/core": "^2.0.38", - "@wso2is/forms": "^2.0.28", - "@wso2is/i18n": "^2.1.7", - "i18next": "^21.9.1", - "react-i18next": "^11.18.5", - "reduce-reducers": "^1.0.4", - "@wso2is/react-components": "^2.1.13", - "axios": "^0.19.2", - "joi": "^17.4.0", - "lodash-es": "^4.17.21", - "history": "^4.9.0", - "redux": "^4.0.4", - "redux-form": "^8.3.7", - "semantic-ui-react": "^2.1.3", - "swr": "^1.3.0", - "uuid": "^8.3.0" - }, - "devDependencies": { - "@nrwl/jest": "latest", - "@nrwl/web": "latest", - "typescript": "^4.6.4", - "@svgr/rollup": "^6.2.1", - "@svgr/webpack": "^5.4.0", - "@types/i18next": "8.4.3", - "@babel/core": "^7.11.4", - "@rollup/plugin-url": "^7.0.0", - "@types/lodash-es": "^4.17.4", - "@types/node": "^13.9.2", - "@types/react": "^18.0.18", - "react-docgen-typescript-loader": "^3.6.0", - "@typescript-eslint/eslint-plugin": "^4.32.0", - "@typescript-eslint/parser": "^4.32.0", - "babel-loader": "^8.1.0", - "babel-plugin-rename-jsx-attribute": "^0.2.4", - "copy-webpack-plugin": "^12.0.2", - "eslint": "^7.20.0", - "eslint-plugin-import": "^2.20.2", - "eslint-plugin-react": "^7.18.3", - "eslint-plugin-react-hooks": "^4.0.0", - "react-dom": "^18.2.0", - "rimraf": "^3.0.2", - "ts-node": "^10.8.1", - "tsconfig-paths-webpack-plugin": "^3.5.2" - } -} diff --git a/modules/common/project.json b/modules/common/project.json deleted file mode 100644 index 5e6f58f74f7..00000000000 --- a/modules/common/project.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "root": "modules/common", - "sourceRoot": "modules/common/src", - "projectType": "library", - "generators": {}, - "prefix": "@wso2is", - "tags": [], - "implicitDependencies": [ - "core", - "react-components", - "validation" - ], - "targets": { - "build": { - "executor": "@nrwl/web:rollup", - "outputs": ["{options.outputPath}"], - "options": { - "outputPath": "modules/common/dist", - "tsConfig": "modules/common/tsconfig.lib.json", - "project": "modules/common/package.json", - "entryFile": "modules/common/src/index.ts", - "external": ["react/jsx-runtime"], - "rollupConfig": "modules/common/rollup.config.cjs", - "compiler": "babel", - "format": [ - "esm", - "cjs" - ], - "assets": [ - { - "glob": "modules/common/README.md", - "input": ".", - "output": "." - } - ] - } - }, - "lint": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "command": "pnpm lint", - "cwd": "modules/common", - "parallel": false - } - }, - "test": { - "executor": "@nrwl/workspace:run-commands", - "options": { - "command": "pnpm test", - "cwd": "modules/common", - "parallel": false - } - } - } -} diff --git a/modules/common/rollup.config.cjs b/modules/common/rollup.config.cjs deleted file mode 100644 index 41fb6770e7b..00000000000 --- a/modules/common/rollup.config.cjs +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -const nrwlConfig = require("@nrwl/react/plugins/bundle-rollup"); -const url = require("@rollup/plugin-url"); -const svgr = require("@svgr/rollup"); - -module.exports = (config) => { - const nxConfig = nrwlConfig(config); - - return { - ...nxConfig, - plugins: [ ...nxConfig.plugins, url(), svgr() ] - }; -}; diff --git a/modules/common/src/actions/ui-config.ts b/modules/common/src/actions/ui-config.ts deleted file mode 100644 index 415e6d774ac..00000000000 --- a/modules/common/src/actions/ui-config.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2023, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { UIConfigInterface } from "../models/config"; - -/** - * UI config action types. - */ -export const UIConfigActionTypes = { - SET_UI_CONFIG: "SET_UI_CONFIG", -}; - -/** - * UI config action interface. - */ -export type UIConfigAction = { - type: typeof UIConfigActionTypes.SET_UI_CONFIG; - payload: UIConfigInterface; -}; diff --git a/modules/common/src/assets/icons/caret-left-icon.svg b/modules/common/src/assets/icons/caret-left-icon.svg deleted file mode 100644 index 224616d621f..00000000000 --- a/modules/common/src/assets/icons/caret-left-icon.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/modules/common/src/assets/icons/caret-right-icon.svg b/modules/common/src/assets/icons/caret-right-icon.svg deleted file mode 100644 index 4a8b2de7393..00000000000 --- a/modules/common/src/assets/icons/caret-right-icon.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/modules/common/src/assets/icons/cross-icon.svg b/modules/common/src/assets/icons/cross-icon.svg deleted file mode 100644 index d2e945bb7b8..00000000000 --- a/modules/common/src/assets/icons/cross-icon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/modules/common/src/assets/icons/pin-icon.svg b/modules/common/src/assets/icons/pin-icon.svg deleted file mode 100644 index 509d58c4490..00000000000 --- a/modules/common/src/assets/icons/pin-icon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/modules/common/src/assets/icons/unpin-icon.svg b/modules/common/src/assets/icons/unpin-icon.svg deleted file mode 100644 index c749237bc43..00000000000 --- a/modules/common/src/assets/icons/unpin-icon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/modules/common/src/assets/icons/upload.svg b/modules/common/src/assets/icons/upload.svg deleted file mode 100644 index 29c07f8e65d..00000000000 --- a/modules/common/src/assets/icons/upload.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/modules/common/src/assets/illustrations/badge.svg b/modules/common/src/assets/illustrations/badge.svg deleted file mode 100644 index ec621644b06..00000000000 --- a/modules/common/src/assets/illustrations/badge.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/modules/common/src/assets/illustrations/certificate-avatar.svg b/modules/common/src/assets/illustrations/certificate-avatar.svg deleted file mode 100644 index 603d386a062..00000000000 --- a/modules/common/src/assets/illustrations/certificate-avatar.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/common/src/assets/illustrations/certificate.svg b/modules/common/src/assets/illustrations/certificate.svg deleted file mode 100644 index 1b233a1a8cc..00000000000 --- a/modules/common/src/assets/illustrations/certificate.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/common/src/assets/illustrations/create-error-illustration.svg b/modules/common/src/assets/illustrations/create-error-illustration.svg deleted file mode 100644 index 81ab51d76a3..00000000000 --- a/modules/common/src/assets/illustrations/create-error-illustration.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/common/src/assets/illustrations/empty-list-illustration.svg b/modules/common/src/assets/illustrations/empty-list-illustration.svg deleted file mode 100644 index 8f3815e5f95..00000000000 --- a/modules/common/src/assets/illustrations/empty-list-illustration.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/common/src/assets/illustrations/empty-search-illustration.svg b/modules/common/src/assets/illustrations/empty-search-illustration.svg deleted file mode 100644 index bd4e788895b..00000000000 --- a/modules/common/src/assets/illustrations/empty-search-illustration.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/common/src/assets/illustrations/ribbon.svg b/modules/common/src/assets/illustrations/ribbon.svg deleted file mode 100644 index b9329f98a28..00000000000 --- a/modules/common/src/assets/illustrations/ribbon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/modules/common/src/components/modals/help-panel-modal.tsx b/modules/common/src/components/modals/help-panel-modal.tsx deleted file mode 100644 index 37cdfbd455c..00000000000 --- a/modules/common/src/components/modals/help-panel-modal.tsx +++ /dev/null @@ -1,171 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { ContentLoader, GenericIcon } from "@wso2is/react-components"; -import React, { FunctionComponent, PropsWithChildren, ReactElement, useState } from "react"; -import { Modal, ModalProps } from "semantic-ui-react"; -import { ReactComponent as CaretLeftIcon } from "../../assets/icons/caret-left-icon.svg"; -import { ReactComponent as CaretRightIcon } from "../../assets/icons/caret-right-icon.svg"; - -/** - * Model of the sub components of the `HelpPanelModal` component. - */ -interface HelpPanelModalSubComponentsInterface { - MainPanel: typeof HelpPanelModalMainPanel; - SidePanel: typeof HelpPanelModalSidePanel; - Header: typeof HelpPanelModalHeader; - Content: typeof HelpPanelModalContent; - Actions: typeof HelpPanelModalActions; -} - -/** - * Proptypes of the components belonging to modal with side panel. - */ -interface ComponentsPropsInterface { - className?: string; - isLoading?: boolean; -} - -/** - * The root component that encapsulates all the sub components. - * - * @param {ModalProps & ComponentsPropsInterface} props Props to be injected into the component. - * - * @return {ReactElement} A modal with a side panel. - */ -export const HelpPanelModal: FunctionComponent & - HelpPanelModalSubComponentsInterface = (props: ModalProps & ComponentsPropsInterface): ReactElement => { - return ( - -
{ props?.children }
-
- ); - }; - -/** - * The header of a panel. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The header. - */ -export const HelpPanelModalHeader: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return ( - <> -
- { !props?.isLoading ? props?.children : } -
- - ); -}; - -/** - * The content of a panel. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The content section. - */ -export const HelpPanelModalContent: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return
{ props?.children }
; -}; - -/** - * The actions of a panel. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The actions section. - */ -export const HelpPanelModalActions: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return ( - <> -
{ props?.children }
- - ); -}; - -/** - * The main panel of the modal. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The main panel. - */ -export const HelpPanelModalMainPanel: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return
{ props?.children }
; -}; - -/** - * The side panel of the modal. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The side panel. - */ -export const HelpPanelModalSidePanel: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - - const { isLoading } = props; - const [ sidePanelOpen, setSidePanelOpen ] = useState(true); - - return ( -
- { - !isLoading ? ( - <> -
{ props?.children }
-
-
{ - setSidePanelOpen(!sidePanelOpen); - } } - > - -
-
- - ) : ( - - ) - } - -
- ); -}; - -/** - * Attaches with sub components to the `HelpPanelModal` component. - */ -HelpPanelModal.MainPanel = HelpPanelModalMainPanel; -HelpPanelModal.SidePanel = HelpPanelModalSidePanel; -HelpPanelModal.Header = HelpPanelModalHeader; -HelpPanelModal.Content = HelpPanelModalContent; -HelpPanelModal.Actions = HelpPanelModalActions; diff --git a/modules/common/src/components/modals/modal-with-side-panel.tsx b/modules/common/src/components/modals/modal-with-side-panel.tsx deleted file mode 100644 index 84876d8dafc..00000000000 --- a/modules/common/src/components/modals/modal-with-side-panel.tsx +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { GenericIcon } from "@wso2is/react-components"; -import React, { FunctionComponent, PropsWithChildren, ReactElement, useState } from "react"; -import { Modal, ModalProps } from "semantic-ui-react"; -import { getHelpPanelActionIcons } from "../../configs/ui"; - -/** - * Model of the sub components of the `ModalWithSidePanel` component. - */ -interface ModalWithSidePanelSubComponentsInterface { - MainPanel: typeof ModalWithSidePanelMainPanel; - SidePanel: typeof ModalWithSidePanelSidePanel; - Header: typeof ModalWithSidePanelHeader; - Content: typeof ModalWithSidePanelContent; - Actions: typeof ModalWithSidePanelActions; -} - -/** - * Proptypes of the components belonging to modal with side panel. - */ -interface ComponentsPropsInterface { - className?: string; -} - -/** - * The root component that encapsulates all the sub components. - * - * @param {ModalProps & ComponentsPropsInterface} props Props to be injected into the component. - * - * @return {ReactElement} A modal with a side panel. - */ -export const ModalWithSidePanel: FunctionComponent & - ModalWithSidePanelSubComponentsInterface = (props: ModalProps & ComponentsPropsInterface): ReactElement => { - return ( - -
{ props?.children }
-
- ); - }; - -/** - * The header of a panel. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The header. - */ -export const ModalWithSidePanelHeader: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return ( - <> -
{ props?.children }
- - ); -}; - -/** - * The content of a panel. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The content section. - */ -export const ModalWithSidePanelContent: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return
{ props?.children }
; -}; - -/** - * The actions of a panel. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The actions section. - */ -export const ModalWithSidePanelActions: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return ( - <> -
{ props?.children }
- - ); -}; - -/** - * The main panel of the modal. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The main panel. - */ -export const ModalWithSidePanelMainPanel: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - return
{ props?.children }
; -}; - -/** - * The side panel of the modal. - * - * @param {PropsWithChildren} props Props to be injected into the component. - * - * @return {ReactElement} The side panel. - */ -export const ModalWithSidePanelSidePanel: FunctionComponent> = ( - props: PropsWithChildren -): ReactElement => { - const [ sidePanelOpen, setSidePanelOpen ] = useState(true); - - return ( -
-
{ props?.children }
-
-
{ - setSidePanelOpen(!sidePanelOpen); - } } - > - -
-
-
- ); -}; - -/** - * Attaches with sub components to the `ModalWithSidePanel` component. - */ -ModalWithSidePanel.MainPanel = ModalWithSidePanelMainPanel; -ModalWithSidePanel.SidePanel = ModalWithSidePanelSidePanel; -ModalWithSidePanel.Header = ModalWithSidePanelHeader; -ModalWithSidePanel.Content = ModalWithSidePanelContent; -ModalWithSidePanel.Actions = ModalWithSidePanelActions; diff --git a/modules/common/src/components/modals/tier-limit-error-modal.tsx b/modules/common/src/components/modals/tier-limit-error-modal.tsx deleted file mode 100644 index e3bf95efaa9..00000000000 --- a/modules/common/src/components/modals/tier-limit-error-modal.tsx +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { EmptyPlaceholder, LinkButton } from "@wso2is/react-components"; -import React, { FunctionComponent, ReactElement } from "react"; -import { useTranslation } from "react-i18next"; -import { Grid, Modal, ModalProps } from "semantic-ui-react"; -import { ReactComponent as CreateErrorIllustration } from "../../assets/illustrations/create-error-illustration.svg"; - -/** - * Prop types for the limit reach error modal component. - */ -interface TierLimitErrorModalPropsInterface extends ModalProps { - actionLabel: string; - description: string; - handleModalClose: () => void; - header: string; - message: string; - openModal: boolean; -} - -/** - * Limit reach error modal component. - * - * @param {TierLimitErrorModalPropsInterface} props - Props injected to the component. - * - * @return {React.ReactElement} - */ -export const TierLimitReachErrorModal: FunctionComponent = ( - props: TierLimitErrorModalPropsInterface -): ReactElement => { - const { description, message, openModal, handleModalClose } = props; - - const { t } = useTranslation(); - - return ( - - - - - - - - - - { t("common:cancel") } - - - - - - - ); -}; - -/** - * Default props for the component. - */ -TierLimitReachErrorModal.defaultProps = { - openModal: false -}; diff --git a/modules/common/src/components/quick-start-tab.tsx b/modules/common/src/components/quick-start-tab.tsx deleted file mode 100644 index f44f82820f1..00000000000 --- a/modules/common/src/components/quick-start-tab.tsx +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { TestableComponentInterface } from "@wso2is/core/models"; -import { ResourceTab } from "@wso2is/react-components"; -import React, { ElementType, FunctionComponent, ReactElement } from "react"; -import { Grid } from "semantic-ui-react"; - -interface QuickStartTabPropsInterface extends TestableComponentInterface { - content: ElementType; -} - -/** - * A function returning a ReactElement to render tab panes. - */ -const QuickStartTab: FunctionComponent = ( - props: QuickStartTabPropsInterface -): ReactElement => { - - const { - content: Content, - [ "data-testid" ]: testId, - ...rest - } = props; - - return ( - - - - - - - - - - ); -}; - -export default QuickStartTab; diff --git a/modules/common/src/components/vertical-stepper/step.tsx b/modules/common/src/components/vertical-stepper/step.tsx deleted file mode 100644 index 4edbf11c36f..00000000000 --- a/modules/common/src/components/vertical-stepper/step.tsx +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import classNames from "classnames"; -import React, { FunctionComponent, ReactElement } from "react"; -import { Button, Divider } from "semantic-ui-react"; - -interface VerticalStepPropsInterface { - alwaysOpen: boolean; - className?: string; - stepTitle: string; - stepContent: any; - hasPrevious: boolean; - hasNext: boolean; - isFinalStep: boolean; - isComplete: boolean; - isCurrentStep: boolean; - step: number; - isInitial: boolean; - isActiveStep: boolean; - handleCompleteStep: (key: number) => void; - handlePreviousStep: (key: number) => void; - isNextEnabled: boolean; - isSidePanelOpen: boolean; -} - -export const VerticalStep: FunctionComponent = ( - props: VerticalStepPropsInterface -): ReactElement => { - - const { - alwaysOpen, - className, - stepTitle, - stepContent, - hasPrevious, - hasNext, - isFinalStep, - handleCompleteStep, - handlePreviousStep, - step, - isComplete, - isInitial, - isActiveStep, - isCurrentStep, - isNextEnabled, - isSidePanelOpen - } = props; - - const classes = classNames( - "quick-start-step", - { - "complete": !alwaysOpen && !isActiveStep && isComplete, - "initial": !alwaysOpen && !isInitial && !isCurrentStep && !isComplete && !isActiveStep - } - , className - ); - - return ( -
-
-

{ stepTitle }

-
- { stepContent } - { - !alwaysOpen && ( - <> -
-
-
- ); -}; - -VerticalStep.defaultProps = { - alwaysOpen: false -}; diff --git a/modules/common/src/components/vertical-stepper/vertical-stepper.tsx b/modules/common/src/components/vertical-stepper/vertical-stepper.tsx deleted file mode 100644 index 97322fe77a6..00000000000 --- a/modules/common/src/components/vertical-stepper/vertical-stepper.tsx +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { TestableComponentInterface } from "@wso2is/core/models"; -import React, { FunctionComponent, ReactElement, ReactNode, useState } from "react"; -import { VerticalStep } from "./step"; - -interface VerticalStepperProps extends TestableComponentInterface { - handleFinishAction?: () => void; - alwaysOpen?: boolean; - // TODO: Fix the interface here and remove any. - stepContent: VerticalStepperStepInterface[] & any; - isNextEnabled?: boolean; - isSidePanelOpen: boolean; -} - -export interface VerticalStepperStepInterface { - preventGoToNextStep?: boolean; - stepAction?: () => void; - stepContent: ReactNode; - stepTitle: ReactNode; -} - -export const VerticalStepper: FunctionComponent = ( - props: VerticalStepperProps -): ReactElement => { - - const { - handleFinishAction, - alwaysOpen, - stepContent, - isNextEnabled, - isSidePanelOpen, - [ "data-testid" ]: testId - } = props; - - const [ completedSteps, setCompletedSteps ] = useState([]); - const [ currentActiveStep, setCurrentActiveStep ] = useState(); - - const handleCompleteStep = (step: number) => { - setCompletedSteps([ ...completedSteps, step ]); - }; - - const handleCurrentActiveStep = (): void => { - setCurrentActiveStep(completedSteps.pop()); - }; - - const handlePreviousStep = () => { - setCurrentActiveStep(completedSteps.pop()); - }; - - return ( -
- { stepContent && stepContent.map((step, index) => ( - { - if (index == (stepContent.length - 1)) { - handleFinishAction(); - - return; - } - - if (step.stepAction) { - step.stepAction(); - } - - if (step.preventGoToNextStep) { - // If preventGoToNextStep is available and true, - // It will prevent from going to the next step. - // This will happen AFTER the next button action - // is performed. - return; - } - - handleCompleteStep(index); - handleCurrentActiveStep(); - } } - handlePreviousStep={ handlePreviousStep } - isComplete={ completedSteps.includes(index) } - isActiveStep={ currentActiveStep === index } - isNextEnabled={ !isNextEnabled } - isSidePanelOpen={ isSidePanelOpen } - isCurrentStep={ !completedSteps.includes(index) && - completedSteps[completedSteps.length - 1] + 1 === index - } - /> - )) } -
- ); -}; - -VerticalStepper.defaultProps = { - alwaysOpen: false -}; diff --git a/modules/common/src/configs/app.ts b/modules/common/src/configs/app.ts deleted file mode 100644 index 5cf98cc324b..00000000000 --- a/modules/common/src/configs/app.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) 2023, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { DocumentationConstants } from "@wso2is/core/constants"; -import { DocumentationProviders, DocumentationStructureFileTypes } from "@wso2is/core/models"; -import { DeploymentConfigInterface } from "../models/config"; - -/** - * Class to handle application config operations. - */ -export class AppConfig { - - /** - * Private constructor to avoid object instantiation from outside - * the class. - * - */ - private constructor() { } - - /** - * This method adds organization path to the server host if an organization is selected. - * - * @param enforceOrgPath - Enforces the organization path - * - * @returns Server host. - */ - public static resolveServerHost(_enforceOrgPath?: boolean): string { - return window[ "AppUtils" ]?.getConfig()?.serverOriginWithTenant; - } - - /** - * Get the deployment config. - * - * @returns Deployment config object. - */ - public static getDeploymentConfig(): DeploymentConfigInterface { - return { - accountApp: window[ "AppUtils" ]?.getConfig()?.accountApp, - adminApp: window[ "AppUtils" ]?.getConfig()?.adminApp, - allowMultipleAppProtocols: window[ "AppUtils" ]?.getConfig()?.allowMultipleAppProtocols, - appBaseName: window[ "AppUtils" ]?.getConfig()?.appBaseWithTenant, - appBaseNameWithoutTenant: window[ "AppUtils" ]?.getConfig()?.appBase, - appHomePath: window[ "AppUtils" ]?.getConfig()?.routes?.home, - appLoginPath: window[ "AppUtils" ]?.getConfig()?.routes?.login, - appLogoutPath: window[ "AppUtils" ]?.getConfig()?.routes?.logout, - clientHost: window[ "AppUtils" ]?.getConfig()?.clientOriginWithTenant, - clientID: window[ "AppUtils" ]?.getConfig()?.clientID, - clientOrigin: window[ "AppUtils" ]?.getConfig()?.clientOrigin, - customServerHost: window[ "AppUtils" ]?.getConfig()?.customServerHost, - developerApp: window[ "AppUtils" ]?.getConfig()?.developerApp, - docSiteURL: window[ "AppUtils" ]?.getConfig()?.docSiteUrl, - documentation: { - baseURL: window[ "AppUtils" ]?.getConfig()?.documentation?.baseURL - ?? DocumentationConstants.GITHUB_API_BASE_URL, - contentBaseURL: window[ "AppUtils" ]?.getConfig()?.documentation?.contentBaseURL - ?? DocumentationConstants.DEFAULT_CONTENT_BASE_URL, - githubOptions: { - branch: window[ "AppUtils" ]?.getConfig()?.documentation?.githubOptions?.branch - ?? DocumentationConstants.DEFAULT_BRANCH - }, - imagePrefixURL: window[ "AppUtils" ]?.getConfig()?.documentation?.imagePrefixURL - ?? DocumentationConstants.DEFAULT_IMAGE_PREFIX_URL, - provider: window[ "AppUtils" ]?.getConfig()?.documentation?.provider - ?? DocumentationProviders.GITHUB, - structureFileType: window[ "AppUtils" ]?.getConfig()?.documentation?.structureFileType - ?? DocumentationStructureFileTypes.YAML, - structureFileURL: window[ "AppUtils" ]?.getConfig()?.documentation?.structureFileURL - ?? DocumentationConstants.DEFAULT_STRUCTURE_FILE_URL - }, - extensions: window[ "AppUtils" ]?.getConfig()?.extensions, - idpConfigs: window[ "AppUtils" ]?.getConfig()?.idpConfigs, - loginCallbackUrl: window[ "AppUtils" ]?.getConfig()?.loginCallbackURL, - organizationPrefix: window["AppUtils"]?.getConfig()?.organizationPrefix, - serverHost: window[ "AppUtils" ]?.getConfig()?.serverOriginWithTenant, - serverOrigin: window[ "AppUtils" ]?.getConfig()?.serverOrigin, - superTenant: window[ "AppUtils" ]?.getConfig()?.superTenant, - tenant: window[ "AppUtils" ]?.getConfig()?.tenant, - tenantPath: window[ "AppUtils" ]?.getConfig()?.tenantPath, - tenantPrefix: window[ "AppUtils" ]?.getConfig()?.tenantPrefix - }; - } -} diff --git a/modules/common/src/configs/ui.ts b/modules/common/src/configs/ui.ts deleted file mode 100644 index 31a5ef17e1c..00000000000 --- a/modules/common/src/configs/ui.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { - ReactComponent as EmptyListIllustration -} from "../assets/illustrations/empty-list-illustration.svg"; -import { - ReactComponent as EmptySearchResultsIllustration -} from "../assets/illustrations/empty-search-illustration.svg"; -import { ReactComponent as CaretLeftIcon } from "../assets/icons/caret-left-icon.svg"; -import { ReactComponent as CaretRightIcon } from "../assets/icons/caret-right-icon.svg"; -import { ReactComponent as CrossIcon } from "../assets/icons/cross-icon.svg"; -import { ReactComponent as PinIcon } from "../assets/icons/pin-icon.svg"; -import { ReactComponent as UnPinIcon } from "../assets/icons/unpin-icon.svg"; -import { ReactComponent as CertificateAvatar -} from "../assets/illustrations/certificate-avatar.svg"; -import { ReactComponent as CertificateBadge } from "../assets/illustrations/badge.svg"; -import { ReactComponent as CertificateIllustration -} from "../assets/illustrations/certificate.svg"; -import { ReactComponent as CertificateRibbon } from "../assets/illustrations/ribbon.svg"; -import { ReactComponent as FileUploadIllustration } from "../assets/icons/upload.svg"; - -import { - GetAdvancedSearchIconsInterface, - GetCertificateIllustrationsInterface, - GetEmptyPlaceholderIllustrationsInterface, - GetHelpPanelActionIconsInterface -} from "../models/ui"; - -/** - * Get Empty Placeholder Illustrations. Please add the types to - * {@link GetEmptyPlaceholderIllustrationsInterface} if introducing - * new icons/images. - */ -export const getEmptyPlaceholderIllustrations = (): GetEmptyPlaceholderIllustrationsInterface => { - - return { - emptyList: EmptyListIllustration, - newList: EmptyListIllustration, - emptySearch: EmptySearchResultsIllustration - }; -}; - -/** -* Get Certificate illustrations. Please add the types to -* {@link GetHelpPanelActionIconsInterface} if introducing -* new icons/images. -*/ -export const getHelpPanelActionIcons = (): GetHelpPanelActionIconsInterface => { - - return { - caretLeft: CaretLeftIcon, - caretRight: CaretRightIcon, - close: CrossIcon, - pin: PinIcon, - unpin: UnPinIcon - }; - }; - - /** - * Get Certificate illustrations. Please add the types to - * {@link GetCertificateIllustrationsInterface} if introducing - * new icons/images. - */ -export const getCertificateIllustrations = (): GetCertificateIllustrationsInterface => { - - return { - avatar: CertificateAvatar, - badge: CertificateBadge, - file: CertificateIllustration, - ribbon: CertificateRibbon, - uploadPlaceholder: FileUploadIllustration - }; -}; - -/** - * Get Advanced Search Icons. Please add the types to - * {@link GetAdvancedSearchIconsInterface} if introducing - * new icons/images. - */ -export const getAdvancedSearchIcons = (): GetAdvancedSearchIconsInterface => { - - return { - clear: CrossIcon - }; -}; diff --git a/modules/common/src/constants/app-constants.ts b/modules/common/src/constants/app-constants.ts deleted file mode 100644 index 6e915c1aac8..00000000000 --- a/modules/common/src/constants/app-constants.ts +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Copyright (c) 2023, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { AppThemeConfigInterface } from "@wso2is/core/models"; -import { StringUtils } from "@wso2is/core/utils"; - -/** - * Class containing app constants. - */ -export class AppConstants { - - /** - * Private constructor to avoid object instantiation from outside - * the class. - */ - /* eslint-disable @typescript-eslint/no-empty-function */ - private constructor() { } - - /** - * Get the admin view base path. - * - * @returns The admin view base path. - */ - public static getAdminViewBasePath(): string { - return window["AppUtils"]?.getConfig()?.adminApp.basePath; - } - - /** - * Get the admin view home path. - * - * @returns The admin view home path. - */ - public static getAdminViewHomePath(): string { - return window["AppUtils"]?.getConfig()?.adminApp.path; - } - - /** - * Get the full screen view base path. - * - * @returns The full screen view base path. - */ - public static getFullScreenViewBasePath(): string { - return this.getMainViewBasePath() + "/fullscreen"; - } - - /** - * Get the developer view base path. - * - * @returns The developer view base path. - */ - public static getDeveloperViewBasePath(): string { - return window["AppUtils"]?.getConfig()?.developerApp.basePath; - } - - /** - * Get the developer view home path. - * - * @returns The developer view home path. - */ - public static getDeveloperViewHomePath(): string { - return window["AppUtils"]?.getConfig()?.developerApp.path; - } - - /** - * Get the main view base path. - * If `this.getTenantQualifiedAppBasePath()` returns with just "/", - * return empty string. - * - * @returns The main view base path. - */ - public static getMainViewBasePath(): string { - return this.getTenantQualifiedAppBasePath() !== "/" - ? this.getTenantQualifiedAppBasePath() - : ""; - } - - /** - * Get tenant qualified app base name. ex: `t/` - * - * @returns The tenant qualified app base name. - */ - public static getTenantQualifiedAppBasename(): string { - return window["AppUtils"]?.getConfig()?.appBaseWithTenant; - } - - /** - * Get tenant qualified app base path. ex: `/t/` - * - * @returns The tenant qualified app base path. - */ - public static getTenantQualifiedAppBasePath(): string { - return "/" + StringUtils.removeSlashesFromPath(this.getTenantQualifiedAppBasename()); - } - - /** - * Get app base name. ex: `` - * - * @returns The app base name. - */ - public static getAppBasename(): string { - return window["AppUtils"]?.getConfig()?.appBase; - } - - /** - * Get tenant qualified app base path. ex: `/` - * - * @returns The tenant qualified app base path. - */ - public static getAppBasePath(): string { - return "/" + StringUtils.removeSlashesFromPath(this.getAppBasename()); - } - - /** - * Get the app home path. - * - * @returns The app home path. - */ - public static getAppHomePath(): string { - return window["AppUtils"]?.getConfig()?.routes.home; - } - - /** - * Get the app login path. - * - * @returns The app login path. - */ - public static getAppLoginPath(): string { - return window[ "AppUtils" ]?.getConfig()?.routes.login; - } - - /** - * Get the app login path. - * - * @returns The app login path. - */ - public static getAppLogoutPath(): string { - return window[ "AppUtils" ]?.getConfig()?.routes.logout; - } - - /** - * Get the app Client ID. - * - * @returns The app Client ID. - */ - public static getClientID(): string { - return window["AppUtils"]?.getConfig()?.clientID; - } - - /** - * Get app theme configs. - * - * @returns App theme configs. - */ - public static getAppTheme(): AppThemeConfigInterface { - return window["AppUtils"]?.getConfig()?.ui?.theme; - } - - /** - * Get the My Account path. - * - * @returns The My Account path. - */ - public static getMyAccountPath(): string { - - return window[ "AppUtils" ]?.getConfig()?.accountApp.path; - } - - /** - * Get the tenant path. ex: `/t/wso2.com`. - * - * @returns The tenant path. - */ - public static getTenantPath(): string { - return window["AppUtils"]?.getConfig()?.tenantPath; - } - - /** - * Get the tenant. ex: `abc.com`. - * - * @returns The tenant domain - */ - public static getTenant(): string { - return window["AppUtils"]?.getConfig()?.tenant; - } - - /** - * Get the super tenant. ex: `carbon.super`. - * - * @returns The super tenant domain. - */ - public static getSuperTenant(): string { - return window["AppUtils"]?.getConfig()?.superTenant; - } - - /** - * Get the client origin. ex: `https://localhost:9443`. - * - * @returns The client origin. - */ - public static getClientOrigin(): string { - return window["AppUtils"]?.getConfig()?.clientOrigin; - } - - /** - * Get the client origin with tenant. ex: `https://localhost:9443/t/wso2.comn`. - * - * @returns The client origin with tenant. - */ - public static getClientOriginWithTenant(): string { - return window["AppUtils"]?.getConfig()?.clientOriginWithTenant; - } - - /** - * URL param for email template add state. - * NOTE: Not needed if the same component is not used for edit and add, - */ - public static readonly EMAIL_TEMPLATE_ADD_URL_PARAM: string = "add-template"; - - /** - * Get all the app paths as a map. - * - * @returns All the app paths as a map. - */ - public static getPaths(): Map { - - return new Map() - .set("ADMIN_OVERVIEW", `${ AppConstants.getAdminViewBasePath() }/overview`) - .set("APPLICATIONS", `${ AppConstants.getDeveloperViewBasePath() }/applications`) - .set("APPLICATION_TEMPLATES", `${ AppConstants.getDeveloperViewBasePath() }/applications/templates`) - .set("APPLICATION_EDIT", `${ AppConstants.getDeveloperViewBasePath() }/applications/:id`) - .set("APPLICATION_SIGN_IN_METHOD_EDIT", `${ AppConstants.getDeveloperViewBasePath() - }/applications/:id:tabName`) - .set("APPROVALS", `${ AppConstants.getAdminViewBasePath() }/approvals`) - .set("CERTIFICATES", `${ AppConstants.getAdminViewBasePath() }/certificates`) - .set("CLAIM_DIALECTS", `${ AppConstants.getAdminViewBasePath() }/attributes-and-mappings`) - .set("CONNECTIONS", `${ AppConstants.getDeveloperViewBasePath() }/connections`) - .set("CONNECTION_TEMPLATES", `${ AppConstants.getDeveloperViewBasePath() }/connections/templates`) - .set("CONNECTION_EDIT", `${ AppConstants.getDeveloperViewBasePath() }/connections/:id`) - .set("CUSTOMIZE", `${ AppConstants.getMainViewBasePath() }/customize`) - .set("DEVELOPER_OVERVIEW", `${ AppConstants.getDeveloperViewBasePath() }/overview`) - .set( - "ASSIGN_ORGANIZATION_DISCOVERY_DOMAINS", - `${ AppConstants.getAdminViewBasePath() }/email-domain-assign` - ) - .set("ORGANIZATION_DISCOVERY_DOMAINS", `${ AppConstants.getAdminViewBasePath() }/email-domain-discovery`) - .set( - "UPDATE_ORGANIZATION_DISCOVERY_DOMAINS", - `${ AppConstants.getAdminViewBasePath() }/email-domain-edit/:id` - ) - .set("EMAIL_PROVIDER", `${ AppConstants.getDeveloperViewBasePath() }/email-provider`) - .set("EMAIL_TEMPLATE_TYPES", `${ AppConstants.getAdminViewBasePath() }/email-templates`) - .set("EMAIL_TEMPLATES", `${ AppConstants.getAdminViewBasePath() }/email-templates/:templateTypeId`) - .set("EMAIL_TEMPLATE", `${ - AppConstants.getAdminViewBasePath() }/email-templates/:templateTypeId/:templateId`) - .set("EMAIL_TEMPLATE_ADD", `${ - AppConstants.getAdminViewBasePath() }/email-templates/:templateTypeId/${ - AppConstants.EMAIL_TEMPLATE_ADD_URL_PARAM }`) - .set("EXTERNAL_DIALECT_EDIT", `${ AppConstants.getAdminViewBasePath() }/edit-attribute-mappings/:id`) - .set("GROUPS", `${ AppConstants.getAdminViewBasePath() }/groups`) - .set("GROUP_EDIT", `${ AppConstants.getAdminViewBasePath() }/groups/:id`) - .set("IDP", `${ AppConstants.getDeveloperViewBasePath() }/connections`) - .set("IDP_TEMPLATES", `${ AppConstants.getDeveloperViewBasePath() }/connections/templates`) - .set("IDP_EDIT", `${ AppConstants.getDeveloperViewBasePath() }/connections/:id`) - .set("EVENT_EDIT", `${ AppConstants.getDeveloperViewBasePath() }/event-edit`) - .set("LOCAL_CLAIMS", `${ AppConstants.getAdminViewBasePath() }/attributes`) - .set("LOCAL_CLAIMS_EDIT", `${ AppConstants.getAdminViewBasePath() }/edit-attributes/:id`) - .set("LOGIN", window[ "AppUtils" ]?.getConfig()?.routes.login) - .set("SCIM_MAPPING", `${ AppConstants.getAdminViewBasePath() }/attribute-mappings/scim`) - .set("LOGOUT", window[ "AppUtils" ]?.getConfig()?.routes.logout) - .set("OIDC_SCOPES", `${ AppConstants.getAdminViewBasePath() }/oidc-scopes`) - .set("OIDC_SCOPES_EDIT", `${ AppConstants.getAdminViewBasePath() }/oidc-scopes/:id`) - .set("PAGE_NOT_FOUND", `${ AppConstants.getMainViewBasePath() }/404`) - .set("PRIVACY", `${ AppConstants.getMainViewBasePath() }/privacy`) - .set("REMOTE_REPO_CONFIG", `${ AppConstants.getAdminViewBasePath() }/remote-repository-config`) - .set("ROLES", `${ AppConstants.getAdminViewBasePath() }/roles`) - .set("ROLE_EDIT", `${ AppConstants.getAdminViewBasePath() }/roles/:id`) - .set("ROOT", "/") - .set("GOVERNANCE_CONNECTORS", `${AppConstants.getAdminViewBasePath()}/governance-connectors/:id`) - .set("UNAUTHORIZED", `${AppConstants.getMainViewBasePath()}/unauthorized`) - .set("USERS", `${AppConstants.getAdminViewBasePath()}/users`) - .set("USER_EDIT", `${AppConstants.getAdminViewBasePath()}/users/:id`) - .set("USERSTORES", `${AppConstants.getAdminViewBasePath()}/user-stores`) - .set("USERSTORES_EDIT", `${AppConstants.getAdminViewBasePath()}/edit-user-store/:id`) - .set("USERSTORE_TEMPLATES", `${AppConstants.getAdminViewBasePath()}/userstore-templates`) - .set("STORING_DATA_DISABLED", `${AppConstants.getMainViewBasePath()}/storing_data_disabled`) - .set("GOVERNANCE_CONNECTOR", `${AppConstants.getAdminViewBasePath()}/connector/:id`) - .set( - "GOVERNANCE_CONNECTOR_EDIT", - `${AppConstants.getAdminViewBasePath()}/connector/:categoryId/:connectorId` - ) - .set("SECRETS", `${AppConstants.getDeveloperViewBasePath()}/secrets`) - .set("SECRET_EDIT", `${AppConstants.getDeveloperViewBasePath()}/secrets/:type/:name`) - .set( - "ATTRIBUTE_MAPPINGS", - `${AppConstants.getAdminViewBasePath()}/attribute-mappings/:type/:customAttributeMappingID?` - ) - .set("CREATE_TENANT", `${AppConstants.getMainViewBasePath()}/create-tenant`) - .set("ORGANIZATIONS", `${AppConstants.getAdminViewBasePath()}/organizations`) - .set("ORGANIZATION_UPDATE", `${AppConstants.getAdminViewBasePath()}/organizations/:id`) - .set("ORGANIZATION_ROLES", `${AppConstants.getAdminViewBasePath()}/organization-roles`) - .set("ORGANIZATION_ROLE_UPDATE", `${AppConstants.getAdminViewBasePath()}/organization-roles/:id`) - .set("ADMINISTRATORS", `${AppConstants.getAdminViewBasePath()}/administrators`) - .set("MY_ACCOUNT", `${AppConstants.getAdminViewBasePath()}/my-account`) - .set("MY_ACCOUNT_EDIT", `${AppConstants.getAdminViewBasePath()}/edit-my-account`) - .set("VALIDATION_CONFIG", `${AppConstants.getAdminViewBasePath()}/validation-configuration`) - .set("VALIDATION_CONFIG_EDIT", `${AppConstants.getAdminViewBasePath()}/edit-validation-configuration`) - .set("ACCOUNT_LOGIN", `${AppConstants.getAdminViewBasePath()}/account-login`) - .set("USERNAME_VALIDATION_EDIT", `${AppConstants.getAdminViewBasePath()}/edit-username-validation`) - .set( - "PRIVATE_KEY_JWT_CONFIG_EDIT", - `${AppConstants.getAdminViewBasePath()}/edit-private-key-jwt-configuration` - ); - } - - /** - * Name of the app config file for the admin portal. - */ - public static readonly APP_CONFIG_FILE_NAME: string = "app.config.json"; - - /** - * Error given by server when the user has denied consent. - */ - public static readonly USER_DENIED_CONSENT_SERVER_ERROR: string = "User denied the consent"; - - /** - * Set of login errors to be used as search params to toggle unauthorized page appearance. - */ - public static readonly LOGIN_ERRORS: Map = new Map() - .set("NO_LOGIN_PERMISSION", "no_login_permission") - .set("ACCESS_DENIED", "access_denied") - .set("USER_DENIED_CONSENT", "consent_denied"); - - /** - * Route ids that are enabled in an organization. - */ - public static readonly ORGANIZATION_ENABLED_ROUTES: string[] = [ - "identityProviders", - "users", - "organizations", - "groups", - "organization-roles", - "applications", - "emailTemplates", - "governanceConnectors" - ]; - - /** - * Organization-management-related route ids - */ - public static readonly ORGANIZATION_ROUTES: string[] = [ - "organizations", - "organization-roles", - "organization-edit" - ]; - - /** - * Route ids that are enabled in only for an organizations (Not allowed in root organization). - */ - public static readonly ORGANIZATION_ONLY_ROUTES: string[] = [ - "organization-roles" - ] - - /** - * Name of the root node - */ - public static readonly PERMISSIONS_ROOT_NODE: string = "All Permissions"; - - /** - * Default status of the My Account portal. - */ - public static readonly DEFAULT_MY_ACCOUNT_STATUS: boolean = true; -} diff --git a/modules/common/src/constants/organization-constants.ts b/modules/common/src/constants/organization-constants.ts deleted file mode 100644 index a9b1754d708..00000000000 --- a/modules/common/src/constants/organization-constants.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { IdentityAppsError } from "@wso2is/core/errors"; - -/** - * Interface to store data for create group api. - */ -export interface OrganizationInterface { - id: string; - name: string; - ref: string; - status: "ACTIVE" | "DISABLED" -} - -export class OrganizationManagementConstants { - /** - * Set of keys used to enable/disable features. - */ - public static readonly FEATURE_DICTIONARY: Map = new Map() - .set("ORGANIZATION_CREATE", "organizations.create") - .set("ORGANIZATION_UPDATE", "organizations.update") - .set("ORGANIZATION_DELETE", "organizations.delete") - .set("ORGANIZATION_READ", "organizations.read"); - - /** - * Super organization id as per alpha pack 2 - */ - public static readonly ROOT_ORGANIZATION_ID: string = "10084a8d-113f-4211-a0d5-efe36b082211"; - - /** - * Super organization object. - * - */ - public static readonly ROOT_ORGANIZATION: OrganizationInterface = { - id: this.ROOT_ORGANIZATION_ID, - name: "Super", - ref: "", - status: "ACTIVE" - }; - - public static readonly ORGANIZATION_ROUTES: string = "organizations"; - - /** - * Sub Organization creation limit reached error. - */ - public static readonly ERROR_CREATE_LIMIT_REACHED: IdentityAppsError = new IdentityAppsError( - "RLS-10001", - "console:develop.features.applications.notifications.apiLimitReachedError.error.description", - "console:develop.features.applications.notifications.apiLimitReachedError.error.message", - "cdaefcee-ecdb-47af-8538-174ec13292db" - ); -} - -/** - * Contains all the possible types of organizations. - */ -export enum OrganizationType { - SUBORGANIZATION = "SUBORGANIZATION", - TENANT = "TENANT", - FIRST_LEVEL_ORGANIZATION = "FIRST_LEVEL_ORGANIZATION", - SUPER_ORGANIZATION= "SUPER_ORGANIZATION" -} diff --git a/modules/common/src/constants/shared/application-management.ts b/modules/common/src/constants/shared/application-management.ts deleted file mode 100644 index f60b6e7c565..00000000000 --- a/modules/common/src/constants/shared/application-management.ts +++ /dev/null @@ -1,447 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { IdentityAppsError } from "@wso2is/core/errors"; - -/** - * Class containing application management constants. - */ -export class ApplicationManagementConstants { - - public static readonly EMPTY_STRING: string = ""; - public static readonly LINE_BREAK: string = "\n"; - public static readonly MAXIMUM_NUMBER_OF_LIST_ITEMS_TO_SHOW_INSIDE_POPUP: number = 3; - public static readonly AUTHENTICATORS_LOCAL_STORAGE_KEY: string = btoa("Authenticators"); - public static readonly EMPTY_JSON_ARRAY: string = "[]"; - - /** - * Private constructor to avoid object instantiation from outside - * the class. - */ - /* eslint-disable @typescript-eslint/no-empty-function */ - private constructor() { } - - public static readonly DEFAULT_ADAPTIVE_AUTH_SCRIPT_HEADER: string = "var onLoginRequest = function(context) {"; - public static readonly DEFAULT_ADAPTIVE_AUTH_SCRIPT_FOOTER: string = "};"; - - public static readonly DEFAULT_ADAPTIVE_AUTH_SCRIPT: string[] = [ - ApplicationManagementConstants.DEFAULT_ADAPTIVE_AUTH_SCRIPT_HEADER, - ApplicationManagementConstants.DEFAULT_ADAPTIVE_AUTH_SCRIPT_FOOTER, - "" - ]; - - /** - * Set of keys used to enable/disable features. - */ - public static readonly FEATURE_DICTIONARY: Map = new Map() - .set("APPLICATION_ADD", "application.add") - .set("APPLICATION_EDIT", "application.edit") - .set("APPLICATION_EDIT_GENERAL_SETTINGS", "application.edit.generalSettings") - .set("APPLICATION_EDIT_ACCESS_CONFIG", "applications.edit.accessConfiguration") - .set("APPLICATION_EDIT_ATTRIBUTE_MAPPING", "applications.edit.attributeMapping") - .set("APPLICATION_EDIT_SIGN_ON_METHOD_CONFIG", "applications.edit.signOnMethodConfiguration") - .set("APPLICATION_EDIT_PROVISIONING_SETTINGS", "applications.edit.provisioningSettings") - .set("APPLICATION_EDIT_ADVANCED_SETTINGS", "applications.edit.advancedSettings") - .set("APPLICATION_EDIT_INFO", "applications.edit.info"); - - /** - * Key for the `Edit Application` tag in the docs structure object. - */ - // public static readonly EDIT_APPLICATIONS_DOCS_KEY: string = `${ - // DocumentationConstants.PORTAL_DOCS_KEY }.Applications["Edit Application"]`; - - /** - * Key for the application samples tag in the docs structure object. - */ - public static readonly APPLICATION_SAMPLES_DOCS_KEY: string = "Quick Starts[\"Choose a Sample Type\"]"; - - /** - * Key for the application docs tag in the docs structure object. - */ - public static readonly APPLICATION_DOCS_KEY: string = "[\"Developer Portal\"].Applications[\"Edit Application\"]"; - - /** - * Key for the overview tag in the docs structure object. - */ - public static readonly APPLICATION_DOCS_OVERVIEW: string = "Overview"; - - /** - * Key for the URL search param for application state. - */ - public static readonly APP_STATE_URL_SEARCH_PARAM_KEY: string = "state"; - - /** - * Value for sign on authentication param for application state. - */ - public static readonly APP_STATE_STRONG_AUTH_PARAM_KEY: string = "isSignOn"; - - /** - * Key for the URL search param for application readonly state. - */ - public static readonly APP_READ_ONLY_STATE_URL_SEARCH_PARAM_KEY: string = "readOnly"; - - /** - * Key for the URL search param for client secret hashing enabled flag. - */ - public static readonly CLIENT_SECRET_HASH_ENABLED_URL_SEARCH_PARAM_KEY: string = "isClientSecretHashEnabled"; - - /** - * Value for the URL search param for application state. - */ - public static readonly APP_STATE_URL_SEARCH_PARAM_VALUE: string = "new"; - - /** - * Value for sign on authentication param for application state. - */ - public static readonly APP_STATE_STRONG_AUTH_PARAM_VALUE: string = "true"; - - /** - * Value for sign in method tab url. - */ - public static readonly SIGN_IN_METHOD_TAB_URL_FRAG: string = "sign-in-method"; - - /** - * Default application template loading strategy. - */ - // public static readonly DEFAULT_APP_TEMPLATE_LOADING_STRATEGY: ApplicationTemplateLoadingStrategies = - // ApplicationTemplateLoadingStrategies.LOCAL; - - /** - * Map to access the template ids. - */ - public static readonly TEMPLATE_IDS: Map = new Map() - .set("box", "h9c5e23e-fc78-484b-9bec-015d242361b8") - .set("mobile", "mobile-application") - .set("oidcWeb", "b9c5e11e-fc78-484b-9bec-015d247561b8") - .set("samlWeb", "776a73da-fd8e-490b-84ff-93009f8ede85") - .set("spa", "6a90e4b0-fbff-42d7-bfde-1efd98f07cd7") - .set("slack", "z345e11e-fc78-484b-9bec-015d2475u341r") - .set("windowsDesktop", "df929521-6768-44f5-8586-624126ec3f8b") - .set("workday", "r565e11e-fc78-484b-9bec-015d24753456") - .set("zoom", "t565e11e-fc78-484b-9bec-015d2472008"); - - /** - * Mapping for template and template DOC in the doc structure. i.e `<"TEMPLATE_NAME", "TAG_NAME_IN_DOC_STRUCTURE">` - */ - public static readonly APPLICATION_TEMPLATE_DOC_MAPPING: Map = new Map() - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("box"), "OIDC Web Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("mobile"), "Mobile Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("oidcWeb"), "OIDC Web Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("spa"), "Single Page Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("slack"), "OIDC Web Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("windowsDesktop"), "Windows Desktop Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("workday"), "OIDC Web Application") - .set(ApplicationManagementConstants.TEMPLATE_IDS.get("zoom"), "OIDC Web Application"); - - /** - * Template categories to be used to extract the filter types. - */ - // public static readonly FILTERABLE_TEMPLATE_CATEGORIES: any[] = [ - // ApplicationTemplateCategories.VENDOR - // ]; - - /** - * Set of grant types to hide from the UI. - */ - public static readonly HIDDEN_GRANT_TYPES: string[] = [ "account_switch" ]; - - public static readonly AUTHORIZATION_CODE_GRANT: string = "authorization_code"; - public static readonly CLIENT_CREDENTIALS_GRANT: string = "client_credentials"; - public static readonly REFRESH_TOKEN_GRANT: string = "refresh_token"; - public static readonly ORGANIZATION_SWITCH_GRANT: string = "organization_switch"; - public static readonly IMPLICIT_GRANT: string = "implicit"; - public static readonly PASSWORD: string = "password"; - public static readonly SAML2_BEARER: string = "urn:ietf:params:oauth:grant-type:saml2-bearer"; - public static readonly JWT_BEARER: string = "urn:ietf:params:oauth:grant-type:jwt-bearer"; - public static readonly IWA_NTLM: string = "iwa:ntlm"; - public static readonly UMA_TICKET: string = "urn:ietf:params:oauth:grant-type:uma-ticket"; - public static readonly DEVICE_GRANT: string = "urn:ietf:params:oauth:grant-type:device_code"; - - /** - * Currently refresh grant type is recommended to use at least one of below. - * We need to get information from backend rather than hard code. - * This issue is tracked via https://github.com/wso2/product-is/issues/12397. - */ - public static readonly IS_REFRESH_TOKEN_GRANT_TYPE_ALLOWED: string[] = [ - ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, - ApplicationManagementConstants.PASSWORD, - ApplicationManagementConstants.SAML2_BEARER, - ApplicationManagementConstants.IWA_NTLM, - ApplicationManagementConstants.JWT_BEARER, - ApplicationManagementConstants.UMA_TICKET - ]; - - /** - * Set of grant types allowed for certain templates. - */ - public static readonly TEMPLATE_WISE_ALLOWED_GRANT_TYPES: Record = { - [ "6a90e4b0-fbff-42d7-bfde-1efd98f07cd7" ]: [ - ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, - ApplicationManagementConstants.REFRESH_TOKEN_GRANT, - ApplicationManagementConstants.IMPLICIT_GRANT, - ApplicationManagementConstants.ORGANIZATION_SWITCH_GRANT - ], - [ "b9c5e11e-fc78-484b-9bec-015d247561b8" ]: [ - ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, - ApplicationManagementConstants.IMPLICIT_GRANT, - ApplicationManagementConstants.CLIENT_CREDENTIALS_GRANT, - ApplicationManagementConstants.REFRESH_TOKEN_GRANT, - ApplicationManagementConstants.ORGANIZATION_SWITCH_GRANT - ], - [ "custom-application" ]: [ - ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, - ApplicationManagementConstants.IMPLICIT_GRANT, - ApplicationManagementConstants.PASSWORD, - ApplicationManagementConstants.CLIENT_CREDENTIALS_GRANT, - ApplicationManagementConstants.REFRESH_TOKEN_GRANT, - ApplicationManagementConstants.ORGANIZATION_SWITCH_GRANT, - ApplicationManagementConstants.DEVICE_GRANT - ], - [ "mobile-application" ]: [ - ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, - ApplicationManagementConstants.REFRESH_TOKEN_GRANT, - ApplicationManagementConstants.IMPLICIT_GRANT, - ApplicationManagementConstants.PASSWORD, - ApplicationManagementConstants.DEVICE_GRANT, - ApplicationManagementConstants.ORGANIZATION_SWITCH_GRANT - ] - }; - - /** - * Holds metadata on how to arrange the values when rendering above - * Usage: Map the index to key to rearrange the values. - */ - public static readonly TEMPLATE_WISE_ALLOWED_GRANT_TYPE_ARRANGE_ORDER: { [ key: string ]: Map; } = { - [ "6a90e4b0-fbff-42d7-bfde-1efd98f07cd7" ]: new Map([ - [ ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, 0 ], - [ ApplicationManagementConstants.IMPLICIT_GRANT, 1 ], - [ ApplicationManagementConstants.REFRESH_TOKEN_GRANT, 2 ] - ]), - [ "b9c5e11e-fc78-484b-9bec-015d247561b8" ]: new Map([ - [ ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, 0 ], - [ ApplicationManagementConstants.IMPLICIT_GRANT, 3 ], - [ ApplicationManagementConstants.PASSWORD, 4 ], - [ ApplicationManagementConstants.CLIENT_CREDENTIALS_GRANT, 1 ], - [ ApplicationManagementConstants.REFRESH_TOKEN_GRANT, 2 ] - ]), - [ "custom-application" ]: new Map([ - [ ApplicationManagementConstants.AUTHORIZATION_CODE_GRANT, 0 ], - [ ApplicationManagementConstants.IMPLICIT_GRANT, 3 ], - [ ApplicationManagementConstants.PASSWORD, 4 ], - [ ApplicationManagementConstants.CLIENT_CREDENTIALS_GRANT, 1 ], - [ ApplicationManagementConstants.REFRESH_TOKEN_GRANT, 2 ] - ]) - }; - - /** - * Key for the SPA template. - */ - public static readonly SPA: string = "Single Page Application"; - - // API errors - public static readonly AUTH_PROTOCOL_METADATA_INVALID_STATUS_CODE_ERROR: string = "Received an invalid status " + - "code while retrieving the auth protocol metadata."; - - public static readonly AUTH_PROTOCOL_METADATA_FETCH_ERROR: string = "An error occurred while fetching the " + - "metadata related to the required auth protocol."; - - public static readonly AUTH_PROTOCOL_CONFIG_UPDATE_INVALID_STATUS_CODE_ERROR: string = "Received an invalid " + - "status code while updating the auth protocol config."; - - public static readonly AUTH_PROTOCOL_CONFIG_UPDATE_ERROR: string = "An error occurred while updating the auth" + - "protocol config."; - - public static readonly ADAPTIVE_AUTH_TEMPLATES_FETCH_INVALID_STATUS_CODE_ERROR: string = "Received an invalid " + - "status code while fetching adaptive authentication templates."; - - public static readonly ADAPTIVE_AUTH_TEMPLATES_FETCH_ERROR: string = "An error occurred while fetching the " + - "required adaptive authentication template."; - - public static readonly APP_PROTOCOL_DELETE_INVALID_STATUS_CODE_ERROR: string = "Received an invalid " + - "status code while deleting the protocol config."; - - public static readonly APP_PROTOCOL_DELETE_ERROR: string = "An error occurred while deleting the" + - "protocol config."; - - public static readonly APPLICATION_TEMPLATE_FETCH_INVALID_STATUS_CODE_ERROR: string = "Received an invalid " + - "status code while fetching application template."; - - public static readonly APPLICATION_TEMPLATE_FETCH_ERROR: string = "An error occurred while fetching the " + - "required adaptive application template."; - - public static readonly APPLICATION_TEMPLATES_LIST_FETCH_INVALID_STATUS_CODE_ERROR: string = "Received an " + - "invalid status code while fetching application templates list."; - - public static readonly APPLICATION_TEMPLATES_LIST_FETCH_ERROR: string = "An error occurred while fetching the " + - "required adaptive application templates list."; - - public static readonly OIDC_CONFIGURATIONS_STATUS_CODE_ERROR: string = "Received an invalid status " + - "code while retrieving the OIDC configurations of the IDP."; - - public static readonly SAML_CONFIGURATIONS_STATUS_CODE_ERROR: string = "Received an invalid status " + - "code while retrieving the SAML configurations of the IDP."; - - public static readonly APPLICATION_OIDC_CONFIGURATIONS_FETCH_ERROR: string = "An error occurred while fetching " + - "the OIDC configurations of the IDP."; - - public static readonly APPLICATION_SAML_CONFIGURATIONS_FETCH_ERROR: string = "An error occurred while fetching " + - "the SAML configurations of the IDP."; - - public static readonly REQUEST_PATH_AUTHENTICATORS_INVALID_STATUS_CODE_ERROR: string = "Received an invalid " + - "status code while retrieving the request path authenticators."; - - public static readonly REQUEST_PATH_AUTHENTICATORS_FETCH_ERROR: string = "An error occurred while fetching the " + - "request path authenticators."; - - public static readonly UNABLE_FETCH_APPLICATIONS: string = "An error occurred while fetching applications."; - - // public static readonly IDENTIFIER_FIRST_AUTHENTICATOR_ID: string = - // IdentityProviderManagementConstants.LOCAL_IDP_IDENTIFIER + "-" + "SWRlbnRpZmllckV4ZWN1dG9y"; - - public static readonly MYACCOUNT_STATUS_UPDATE_ERROR: string = "An error occurred while updating " + - "status of the My Account Portal."; - - public static readonly MYACCOUNT_STATUS_UPDATE_INVALID_STATUS_CODE_ERROR: string = "Received an " + - "invalid status code while updating status of the My Account Portal."; - - public static readonly SECOND_FACTOR_AUTHENTICATORS_DROPPABLE_ID: string = "second-factor-authenticators"; - public static readonly EXTERNAL_AUTHENTICATORS_DROPPABLE_ID: string = "external-authenticators"; - public static readonly SOCIAL_LOGIN_HEADER: string = "Social Login"; - - // Authenticators that are only handlers. - // public static readonly HANDLER_AUTHENTICATORS: string[] = [ - // ApplicationManagementConstants.IDENTIFIER_FIRST_AUTHENTICATOR_ID - // ]; - - // First factor authenticators. - // public static readonly FIRST_FACTOR_AUTHENTICATORS: string[] = [ - // IdentityProviderManagementConstants.BASIC_AUTHENTICATOR, - // IdentityProviderManagementConstants.FIDO_AUTHENTICATOR - // ]; - - // Second factor authenticators. - // public static readonly SECOND_FACTOR_AUTHENTICATORS: string[] = [ - // IdentityProviderManagementConstants.TOTP_AUTHENTICATOR, - // IdentityProviderManagementConstants.TOTP_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.EMAIL_OTP_AUTHENTICATOR, - // IdentityProviderManagementConstants.EMAIL_OTP_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.SMS_OTP_AUTHENTICATOR, - // IdentityProviderManagementConstants.SMS_OTP_AUTHENTICATOR_ID - // ]; - - // Known social authenticators. - // public static readonly SOCIAL_AUTHENTICATORS: string[] = [ - // IdentityProviderManagementConstants.APPLE_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.APPLE_AUTHENTICATOR_NAME, - // IdentityProviderManagementConstants.GOOGLE_OIDC_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.GOOGLE_OIDC_AUTHENTICATOR_NAME, - // IdentityProviderManagementConstants.FACEBOOK_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.FACEBOOK_AUTHENTICATOR_NAME, - // IdentityProviderManagementConstants.MICROSOFT_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.MICROSOFT_AUTHENTICATOR_NAME, - // IdentityProviderManagementConstants.TWITTER_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.TWITTER_AUTHENTICATOR_NAME, - // IdentityProviderManagementConstants.GITHUB_AUTHENTICATOR_ID, - // IdentityProviderManagementConstants.GITHUB_AUTHENTICATOR_NAME - // ]; - - // Authenticators that can handle TOTP. - // public static readonly TOTP_HANDLERS: string[] = [ - // ...ApplicationManagementConstants.FIRST_FACTOR_AUTHENTICATORS, - // ...ApplicationManagementConstants.SOCIAL_AUTHENTICATORS, - // IdentityProviderManagementConstants.MAGIC_LINK_AUTHENTICATOR - // ]; - - // Authenticators that can handle Email OTP. - // public static readonly EMAIL_OTP_HANDLERS: string[] = [ - // ...ApplicationManagementConstants.FIRST_FACTOR_AUTHENTICATORS, - // ...ApplicationManagementConstants.SOCIAL_AUTHENTICATORS - // ]; - - // Enterprise EIDP Authenticators - // public static readonly EIDP_AUTHENTICATORS: SupportedAuthenticators[] = [ - // SupportedAuthenticators.OIDC, - // SupportedAuthenticators.SAML - // ]; - - /** - * PEM certificate field default placeholder. - */ - public static readonly PEM_CERTIFICATE_PLACEHOLDER: string = "-----BEGIN CERTIFICATE-----\n" + - "MIIFaDCCBFCgAwIBAgISESHkvZFwK9Qz0KsXD3x8p44aMA0GCSqGSIb3DQEBCwUA\n" + - "...\n" + - "lffygD5IymCSuuDim4qB/9bh7oi37heJ4ObpBIzroPUOthbG4gv/5blW3Dc=\n" + - "-----END CERTIFICATE-----"; - - /** - * Form element constraints. - */ - public static readonly FORM_FIELD_CONSTRAINTS: { - APP_DESCRIPTION_PATTERN: RegExp, - APP_NAME_MAX_LENGTH: number, - APP_NAME_PATTERN: RegExp - } = { - APP_DESCRIPTION_PATTERN: new RegExp("^[a-zA-Z0-9.+=!$#()@&%*~_-]+(?: [a-zA-Z0-9.+=!$#()@&%*~_-]+)*$", "gm"), - APP_NAME_MAX_LENGTH: 50, - APP_NAME_PATTERN: new RegExp("^[a-zA-Z0-9._-]+(?: [a-zA-Z0-9._-]+)*$") - }; - - public static readonly CONDITIONAL_AUTH_TOUR_STATUS_STORAGE_KEY: string = "isConditionalAuthTourViewed"; - - public static readonly CUSTOM_APPLICATION_OIDC: string = "custom-application-oidc"; - - public static readonly CUSTOM_APPLICATION_SAML: string = "custom-application-saml"; - - public static readonly CUSTOM_APPLICATION_PASSIVE_STS: string = "custom-application-passive-sts"; - - public static readonly CUSTOM_APPLICATION: string = "custom-application"; - - public static readonly MOBILE: string = "mobile-application"; - - public static readonly CUSTOM_APPLICATION_PROTOCOL_ORDER: Map = - new Map([ - [ "oidc", 0 ], - [ "saml", 1 ], - [ "passive-sts", 2 ] - ]); - - /** - * Application create limit reached error. - */ - public static readonly ERROR_CREATE_LIMIT_REACHED: IdentityAppsError = new IdentityAppsError( - "APP-60503", - "console:develop.features.applications.notifications.apiLimitReachedError.error.description", - "console:develop.features.applications.notifications.apiLimitReachedError.error.message", - "cdaefcee-ecdb-47af-8538-174ec13292db" - ); - - /** - * Error code for application already exists. - */ - public static readonly ERROR_CODE_APPLICATION_ALREADY_EXISTS: string = "OAUTH-60008"; - /** - * Error code for Issuer already exists. - */ - public static readonly ERROR_CODE_ISSUER_EXISTS: string = "SAML-60002"; - /** - * Error code for invalid metadata URL. - */ - public static readonly ERROR_CODE_INVALID_METADATA_URL: string = "SAML-60003"; - - /** - * Application state param to be sent in the routing. - */ - public static readonly APPLICATION_STATE: string = "application"; -} - -export enum ShareWithOrgStatus { - TRUE, - FALSE, - UNDEFINED -} diff --git a/modules/common/src/constants/shared/role-management.ts b/modules/common/src/constants/shared/role-management.ts deleted file mode 100644 index e7aab155027..00000000000 --- a/modules/common/src/constants/shared/role-management.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Class containing user role operation constants. - */ -export class RoleConstants { - - /** - * Private constructor to avoid object instantiation from outside - * the class. - * - * @hideconstructor - */ - /* eslint-disable @typescript-eslint/no-empty-function */ - private constructor() { } - - // API errors - public static readonly ROLES_FETCH_REQUEST_INVALID_RESPONSE_CODE_ERROR: string = "Received an invalid " + - "status code while retrieving user roles."; - public static readonly ROLES_FETCH_REQUEST_ERROR: string = "An error occurred while fetching the " + - "user roles."; -} diff --git a/modules/common/src/constants/ui-constants.ts b/modules/common/src/constants/ui-constants.ts deleted file mode 100644 index a4334669efb..00000000000 --- a/modules/common/src/constants/ui-constants.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Class containing ui constants. - */ -export class UIConstants { - - /** - * Private constructor to avoid object instantiation from outside the class. - */ - /* eslint-disable @typescript-eslint/no-empty-function */ - private constructor() { } - - /** - * Default header height to be used in state initializations. - */ - public static readonly DEFAULT_HEADER_HEIGHT = 121; - - /** - * Default footer height to be used in state initializations. - */ - public static readonly DEFAULT_FOOTER_HEIGHT = 50; - - /** - * Constant to handle dashboard layout's desktop content top spacing. - */ - public static readonly DASHBOARD_LAYOUT_DESKTOP_CONTENT_TOP_SPACING: number = 0; - - /** - * Interval to dismiss the alerts. - */ - public static readonly ALERT_DISMISS_INTERVAL: number = 15; - - /** - * AJAX top loading bar height. - */ - public static readonly AJAX_TOP_LOADING_BAR_HEIGHT: number = 3; - - /** - * Default list item size for resources such as applications, IdPs etc. - */ - public static readonly DEFAULT_RESOURCE_LIST_ITEM_LIMIT: number = 10; - - /** - * Default list item size for resources such as applications, IdPs etc. - */ - public static readonly DEFAULT_RESOURCE_GRID_ITEM_LIMIT: number = 18; - - /** - * Default overview statistics insights list item limit. - */ - public static readonly DEFAULT_STATS_LIST_ITEM_LIMIT: number = 5; - - /** - * Default theme of the portal. - */ - public static readonly DEFAULT_THEME: string = "default"; - - /** - * Product Documentation URLs. - */ - public static readonly IS_DOC_URLS: Map = new Map() - .set("5.11.0", "https://is.docs.wso2.com/en/5.11.0/"); - - /** - * Additional top offset padding for page scrolling placement. - * This will use along with the header height (appHeaderHeight + thisValues). - */ - public static readonly PAGE_SCROLL_TOP_PADDING = 20; -} diff --git a/modules/common/src/contexts/deployment-config-context.tsx b/modules/common/src/contexts/deployment-config-context.tsx deleted file mode 100644 index 37bae0299ba..00000000000 --- a/modules/common/src/contexts/deployment-config-context.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { Context, createContext } from "react"; -import { DeploymentConfigInterface } from "../models/config"; - -// Define the interface for the deployment config context value. -export interface DeploymentConfigContextInterface { - deploymentConfig: DeploymentConfigInterface; - setDeploymentConfig: (configs: DeploymentConfigInterface) => void; -} - -// Create the deployment config context using createContext. -const _DeploymentConfigContext: Context = createContext< - DeploymentConfigContextInterface | undefined>(undefined); - -// Set a display name for the deployment config context (optional). -_DeploymentConfigContext.displayName = "DeploymentConfigContext"; - -// Export the deployment config context. -export const DeploymentConfigContext: Context = _DeploymentConfigContext; diff --git a/modules/common/src/contexts/resource-endpoints-context.tsx b/modules/common/src/contexts/resource-endpoints-context.tsx deleted file mode 100644 index f8c1479dfe8..00000000000 --- a/modules/common/src/contexts/resource-endpoints-context.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { Context, createContext } from "react"; -import { ResourceEndpointsInterface } from "../models/config"; - -// Define the interface for the resource endpoints context value. -export interface ResourceEndpointsContextInterface { - resourceEndpoints: ResourceEndpointsInterface | undefined; - setResourceEndpoints: (endpoints: ResourceEndpointsInterface) => void; -} - -// Create the resource endpoints context using createContext. -const _ResourceEndpointsContext: Context = createContext< - ResourceEndpointsContextInterface | undefined>(undefined); - -// Set a display name for the resource endpoints context (optional). -_ResourceEndpointsContext.displayName = "ResourceEndpointsContext"; - -// Export the resource endpoints context. -export const ResourceEndpointsContext: Context = _ResourceEndpointsContext; diff --git a/modules/common/src/contexts/ui-config-context.tsx b/modules/common/src/contexts/ui-config-context.tsx deleted file mode 100644 index df5030f27d4..00000000000 --- a/modules/common/src/contexts/ui-config-context.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { Context, createContext } from "react"; -import { UIConfigInterface } from "../models/config"; - -// Define the interface for the UI config context value. -export interface UIConfigContextInterface { - UIConfig: UIConfigInterface; - setUIConfig: (configs: UIConfigInterface) => void; -} - -// Create the UI config context using createContext. -const _UIConfigContext: Context = createContext< - UIConfigContextInterface | undefined>(undefined); - -// Set a display name for the UI config context (optional). -_UIConfigContext.displayName = "UIConfigContext"; - -// Export the UI config context. -export const UIConfigContext: Context = _UIConfigContext; diff --git a/modules/common/src/helpers/history.ts b/modules/common/src/helpers/history.ts deleted file mode 100644 index 952bb8b9a67..00000000000 --- a/modules/common/src/helpers/history.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { createBrowserHistory } from "history"; - -export const history = createBrowserHistory({ basename: window["AppUtils"]?.getConfig()?.appBaseNameForHistoryAPI }); diff --git a/modules/common/src/hooks/use-app-configs.ts b/modules/common/src/hooks/use-app-configs.ts deleted file mode 100644 index 4baa0d2d826..00000000000 --- a/modules/common/src/hooks/use-app-configs.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { useContext } from 'react'; -import { - DeploymentConfigContext, - DeploymentConfigContextInterface -} from '../contexts/deployment-config-context'; - -export default function useDeploymentConfig(): DeploymentConfigContextInterface { - - const deploymentConfig = useContext(DeploymentConfigContext); - - if (!deploymentConfig) { - throw new Error('Deployment config not found. Make sure to wrap your components with DeploymentConfigProvider.'); - } - - return deploymentConfig; -} diff --git a/modules/common/src/hooks/use-deployment-configs.ts b/modules/common/src/hooks/use-deployment-configs.ts deleted file mode 100644 index 56844f38b88..00000000000 --- a/modules/common/src/hooks/use-deployment-configs.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { useContext } from "react"; -import { - DeploymentConfigContext, - DeploymentConfigContextInterface -} from "../contexts/deployment-config-context"; - -const useDeploymentConfig = (): DeploymentConfigContextInterface => { - const context = useContext(DeploymentConfigContext); - - if (!context) { - throw new Error('useResourceEndpoints must be used within a ResourceEndpointsProvider'); - } - - const { deploymentConfig, setDeploymentConfig } = useContext(DeploymentConfigContext); - - return { - deploymentConfig, - setDeploymentConfig - }; -}; - -export default useDeploymentConfig; diff --git a/modules/common/src/hooks/use-get-organization-type.tsx b/modules/common/src/hooks/use-get-organization-type.tsx deleted file mode 100644 index e244b1de154..00000000000 --- a/modules/common/src/hooks/use-get-organization-type.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { useSelector } from "react-redux"; -import { AppState } from "../store/index"; -import { OrganizationType } from "../constants/organization-constants"; - -/** - * This is a React hook that returns the type of the organization. - * - * @returns The type of the organization. - */ -export const useGetCurrentOrganizationType = (): OrganizationType => { - return useSelector( - (state: AppState) => state.organization.organizationType - ); -}; diff --git a/modules/common/src/hooks/use-request.ts b/modules/common/src/hooks/use-request.ts deleted file mode 100644 index 14c3a9e3960..00000000000 --- a/modules/common/src/hooks/use-request.ts +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { AsgardeoSPAClient } from "@asgardeo/auth-react"; -import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios"; -import useSWR, { SWRConfiguration, SWRResponse } from "swr"; - -const httpClient = AsgardeoSPAClient.getInstance().httpRequest.bind(AsgardeoSPAClient.getInstance()); - -export type GetRequest = AxiosRequestConfig | null - -/** - * Request error interface. - */ -export interface RequestResultInterface - extends Pick< - SWRResponse, AxiosError>, - "isValidating" | "error" | "mutate" - > { - /** - * Request data. - */ - data: Data | undefined; - /** - * Request loading state. - */ - isLoading?: boolean; - /** - * Request response. - */ - response?: AxiosResponse | undefined; -} - -/** - * Schema for the request config. - */ -export type RequestConfigInterface = AxiosRequestConfig; - -/** - * Schema of the Error response body returned by Identity Server REST APIs. - */ -export interface RequestErrorInterface { - /** - * Error code. - * @example example: AAA-00000 - */ - code: string; - /** - * Error message. - * @example example: Some error message. - */ - message: string; - /** - * Error description. - * @example Some error description. - */ - description?: string; - /** - * Error description alias. - * @example Some error description. - */ - detail?: string; - /** - * Error trace id. - * @example e0fbcfeb-3617-43c4-8dd0-7b7d38e13047 - */ - traceId: string; -} - -export interface SWRConfig - extends Omit< - SWRConfiguration, AxiosError>, - "fallbackData" - > { - attachToken?: boolean, - fallbackData?: Data -} - -const globalConfig: SWRConfiguration = {}; - -export default function useRequest( - request: GetRequest, - { attachToken, fallbackData, ...config }: SWRConfig = {} -): RequestResultInterface { - - const _config = { - ...globalConfig, - ...config - }; - - const { - data: response, - error, - isValidating, - mutate - } = useSWR, AxiosError>( - request && JSON.stringify(request), - /** - * NOTE: Typescript thinks `request` can be `null` here, but the fetcher - * function is actually only called by `useSWR` when it isn't. - */ - () => - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - attachToken === undefined ? httpClient(request!) : ( attachToken ? httpClient(request!) : axios(request!) ), - { - // Revalidates data on document focus. - // Sends unnecessary request so disabling globally. - // If needed, can pass in as a special option for selected requests. - revalidateOnFocus: false, - ..._config, - fallbackData: fallbackData && { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - config: request!, - data: fallbackData, - headers: {}, - status: 200, - statusText: "InitialData" - } - } - ); - - return { - data: response && response.data, - error, - isValidating, - mutate, - response - }; -} diff --git a/modules/common/src/hooks/use-resource-endpoints.ts b/modules/common/src/hooks/use-resource-endpoints.ts deleted file mode 100644 index 519ce8a1c67..00000000000 --- a/modules/common/src/hooks/use-resource-endpoints.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { useContext } from "react"; -import { - ResourceEndpointsContext, - ResourceEndpointsContextInterface -} from '../contexts/resource-endpoints-context'; - -const useResourceEndpoints = (): ResourceEndpointsContextInterface => { - const context = useContext(ResourceEndpointsContext); - - if (!context) { - throw new Error('useResourceEndpoints must be used within a ResourceEndpointsProvider'); - } - - const { resourceEndpoints, setResourceEndpoints } = useContext(ResourceEndpointsContext); - - return { - resourceEndpoints, - setResourceEndpoints - }; -}; - -export default useResourceEndpoints; diff --git a/modules/common/src/hooks/use-ui-configs.ts b/modules/common/src/hooks/use-ui-configs.ts deleted file mode 100644 index fe1954fe4d0..00000000000 --- a/modules/common/src/hooks/use-ui-configs.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { useContext } from "react"; -import { - UIConfigContext, - UIConfigContextInterface -} from "../contexts/ui-config-context"; - -const useUIConfig = (): UIConfigContextInterface => { - const context = useContext(UIConfigContext); - - if (!context) { - throw new Error('useResourceEndpoints must be used within a ResourceEndpointsProvider'); - } - - const { UIConfig, setUIConfig } = useContext(UIConfigContext); - - return { - UIConfig, - setUIConfig - }; -}; - -export default useUIConfig; diff --git a/modules/common/src/index.ts b/modules/common/src/index.ts deleted file mode 100644 index b8237a9705c..00000000000 --- a/modules/common/src/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Export the components. - */ -export * from "./components/quick-start-tab"; - -export * from "./components/modals/help-panel-modal"; -export * from "./components/modals/tier-limit-error-modal"; - -export * from "./components/vertical-stepper/vertical-stepper"; -export * from "./components/vertical-stepper/step"; - -/** - * Export API configs. - */ -export * from "./configs/app"; -export * from "./configs/ui"; - -/** - * Export constants. - */ -export * from "./constants/app-constants"; -export * from "./constants/ui-constants"; -export * from "./constants/organization-constants"; - -export * from "./constants/shared/application-management"; -export * from "./constants/shared/role-management"; diff --git a/modules/common/src/models/analytics.ts b/modules/common/src/models/analytics.ts deleted file mode 100644 index 816e80ada29..00000000000 --- a/modules/common/src/models/analytics.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -export interface AnalyticsConfig { - EventPublisherExtension: { - compute: (computation: () => void) => void; - init: () => void; - publish: (eventId: string, customProperties?: { [key: string]: string | Record | - number }) => void; - record: (pathname: string, startTimeInMs: number, duration: number, responseCode: number, isSuccess: boolean, - customProperties?: { [key: string]: any }) => void; - } -} diff --git a/modules/common/src/models/common.ts b/modules/common/src/models/common.ts deleted file mode 100644 index 1b6819945f4..00000000000 --- a/modules/common/src/models/common.ts +++ /dev/null @@ -1,207 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { LinkInterface } from "@wso2is/core/models"; - -/** - * Organization model interfaces. - */ -export interface OrganizationAttributesInterface { - key: string; - value: string; -} - -export interface OrganizationResponseInterface { - id: string; - name: string; - description: string; - status: string; - created: string; - lastModified: string; - type: string; - domain: string; - parent: { - id: string; - ref: string; - }; - attributes: OrganizationAttributesInterface[]; -} - -export type OrganizationRoleInterface = RolesInterface; - -export type OrganizationRoleListItemInterface = Omit; - -export type OrganizationRoleListResponseInterface = { - totalResults: number; - itemsPerPage: number; - nextCursor: string; - previousCursor: string; - Resources: Array; -}; - -/** - * Application model interfaces. - */ -export enum ApplicationAccessTypes { - READ = "READ", - WRITE = "WRITE" -} - -export enum ApplicationInboundTypes { - CLIENTID = "Client ID", - ISSUER = "Issuer" -} - -export interface AdvancedConfigurationsInterface { - saas?: boolean; - discoverableByEndUsers?: boolean; - certificate?: CertificateInterface; - skipLoginConsent?: boolean; - skipLogoutConsent?: boolean; - returnAuthenticatedIdpList?: boolean; - enableAuthorization?: boolean; - fragment?: boolean; - additionalSpProperties?: additionalSpProperty[] -} - -export interface ApplicationBasicInterface { - access?: ApplicationAccessTypes; - id?: string; - name: string; - description?: string; - accessUrl?: string; - clientId?: string; - issuer?: string; - templateId?: string; - isManagementApp?: boolean; - advancedConfigurations?: AdvancedConfigurationsInterface; -} - -export interface ApplicationListItemInterface extends ApplicationBasicInterface { - image?: string; - self?: string; -} - -export interface ApplicationListInterface { - /** - * Number of results that match the listing operation. - */ - totalResults?: number; - /** - * Index of the first element of the page, which will be equal to offset + 1. - */ - startIndex?: number; - /** - * Number of elements in the returned page. - */ - count?: number; - /** - * Set of applications. - */ - applications?: ApplicationListItemInterface[]; - /** - * Useful links for pagination. - */ - links?: LinkInterface[]; -} - -export interface ApplicationTemplateListItemInterface { - id: string; - name: string; - description?: string; - image?: string; - authenticationProtocol?: string; - isManagementApp?: boolean; - templateGroup?: string; - templateId?: string; - types?: any[]; - category?: string; - displayOrder?: number; - self?: string; - subTemplates?: ApplicationTemplateListItemInterface[]; - subTemplatesSectionTitle?: string; - previewOnly?: boolean; -} - -/** - * Captures name and id of the user store. - */ -export interface SimpleUserStoreListItemInterface { - id?: string; - name: string; -} - -export enum CertificateTypeInterface { - NONE ="None", - JWKS = "JWKS", - PEM = "PEM" -} - -export interface additionalSpProperty { - name: string; - value: string; - displayName?: string; -} - -export interface CertificateInterface { - value?: string; - type?: CertificateTypeInterface; // TODO Check for upload option. -} - -/** - * Interface to contain Role meta information - */ -export interface RolesMetaInterface { - created: string; - location: string; - lastModified: string; -} - -/** - * Interface to contain groups information of the role - */ -export interface RoleGroupsInterface { - display: string; - value: string; - $ref: string; -} - -/** - * Interface to contain Role member information - */ -export interface RolesMemberInterface { - display: string; - value: string; - orgId: string; - orgName: string; - $ref: string; -} - -/** - * Interface to contain top level role information - */ -export interface RolesInterface { - displayName: string; - id: string; - meta: RolesMetaInterface; - groups?: RoleGroupsInterface[]; - users?: RolesMemberInterface[]; - permissions: string[]; -} - -/** - * Interface to contain roles listing - */ -export interface RoleListInterface { - totalResults?: number; - startIndex?: number; - itemsPerPage?: number; - Resources?: RolesInterface[]; - schemas: string; -} diff --git a/modules/common/src/models/config.ts b/modules/common/src/models/config.ts deleted file mode 100644 index 3beb76bdcdc..00000000000 --- a/modules/common/src/models/config.ts +++ /dev/null @@ -1,340 +0,0 @@ -/** - * Copyright (c) 2023, 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 - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { ResponseMode, Storage } from "@asgardeo/auth-react"; -import { - CommonConfigInterface, - CommonDeploymentConfigInterface, - CommonUIConfigInterface, - FeatureAccessConfigInterface -} from "@wso2is/core/models"; -import { I18nModuleOptionsInterface } from "@wso2is/i18n"; - -export type ConfigInterface = CommonConfigInterface< - DeploymentConfigInterface, - ResourceEndpointsInterface, - FeatureConfigInterface, - I18nModuleOptionsInterface, - UIConfigInterface>; - -interface ConnectionConfigInterface extends FeatureAccessConfigInterface { - /** - * Connection templates. - */ - templates?: Record[]; -} - -/** - * Application configuration interface. - */ -export interface FeatureConfigInterface { - /** - * Application management feature. - */ - applications?: FeatureAccessConfigInterface; - /** - * Workflow approvals feature. - */ - approvals?: FeatureAccessConfigInterface; - /** - * Attribute dialects(Claim dialects) feature. - */ - attributeDialects?: FeatureAccessConfigInterface; - /** - * Certificates configurations feature. - */ - certificates?: FeatureAccessConfigInterface; - /** - * Email providers feature. - */ - emailProviders?: FeatureAccessConfigInterface; - /** - * Email providers feature. - */ - smsProviders?: FeatureAccessConfigInterface; - /** - * Email templates feature. - */ - emailTemplates?: FeatureAccessConfigInterface; - /** - * General Configuration settings feature. - */ - governanceConnectors?: FeatureAccessConfigInterface; - /** - * Groups feature. - */ - groups?: FeatureAccessConfigInterface; - /** - * Guest User Feature - */ - guestUser?: FeatureAccessConfigInterface; - /** - * Connection management feature. - */ - connections?: ConnectionConfigInterface; - /** - * OIDC Scope management feature. - */ - oidcScopes?: FeatureAccessConfigInterface; - /** - * Organization management feature. - */ - organizations?: FeatureAccessConfigInterface; - /** - * Organization role management feature. - */ - organizationsRoles?: FeatureAccessConfigInterface; - /** - * Remote Fetch Config management feature. - */ - remoteFetchConfig?: FeatureAccessConfigInterface; - /** - * Role management feature. - */ - roles?: FeatureAccessConfigInterface; - /** - * User store configurations feature. - */ - userStores?: FeatureAccessConfigInterface; - /** - * User management feature. - */ - users?: FeatureAccessConfigInterface; - /** - * Secret Management Feature UI Access Scopes. - */ - secretsManagement?: FeatureAccessConfigInterface; - /** - * Try It feature - */ - tryIt?: FeatureAccessConfigInterface; - /** - * Event Management feature - */ - eventPublishing?: FeatureAccessConfigInterface; -} - -/** - * Portal Deployment config interface inheriting the common configs from core module. - */ -export interface DeploymentConfigInterface extends CommonDeploymentConfigInterface { - /** - * Configs of the Admin app. - */ - adminApp: ExternalAppConfigInterface; - /** - * Configs of the myaccount app. - */ - accountApp: ExternalAppConfigInterface; - /** - * Configs of the developer app. - */ - developerApp: ExternalAppConfigInterface; - /** - * Configs for extensions. - */ - extensions: Record; - /** - * URL of the help center. - */ - helpCenterURL?: string; - /** - * URL of the doc site. - */ - docSiteURL?: string; - /** - * Configs of multiple application protocol. - */ - allowMultipleAppProtocols?: boolean; -} - -/** - * Interface for defining settings and configs of an external app. - */ -interface ExternalAppConfigInterface { - /** - * App base path. ex: `/account`, `/admin` etc. - */ - basePath: string; - /** - * Display name for the app. - */ - displayName: string; - /** - * Access path/URL for the app. - */ - path: string; - /** - * Access path/URL for the consumer account app. - */ - tenantQualifiedPath: string; -} - -type GovernanceConnectorsFeatureConfig = Record - -/** - * Portal UI config interface inheriting the common configs from core module. - */ -export interface UIConfigInterface extends CommonUIConfigInterface { - /** - * Configurations for IDP templates. - */ - connectionTemplates?: any; - /** - * Connection resources URL. - */ - connectionResourcesUrl?: string; - /** - * Configuration to enable Google One Tap for specific tenants. - */ - googleOneTapEnabledTenants?: string[]; - /** - * Set of authenticators to be hidden in application sign on methods. - */ - hiddenAuthenticators?: string[]; - /** - * Set of connections to be hidden. - */ - hiddenConnectionTemplates?: string[]; - /** - * Configurations for IDP templates. - */ - identityProviderTemplates: IdentityProviderTemplatesConfigInterface; - /** - * Should default dialects be allowed for editing. - */ - isDefaultDialectEditingEnabled?: boolean; - /** - * Should dialects addition be allowed. - */ - isDialectAddingEnabled?: boolean; - /** - * Flag to check if the `OAuth.EnableClientSecretHash` is enabled in the `identity.xml`. - */ - isClientSecretHashEnabled?: boolean; - /** - * Enable roles and groups separation. - */ - isGroupAndRoleSeparationEnabled?: boolean; - /** - * Is Request path section enabled in applications. - */ - isRequestPathAuthenticationEnabled?: boolean; - /** - * Enable/Disable the email domain feature. - */ - enableEmailDomain?: boolean; - /** - * Flag to check whether to list all the attribute dialects - */ - listAllAttributeDialects?: boolean; - /** - * Should show/hide marketing consent banner. - */ - isMarketingConsentBannerEnabled: boolean; - /** - * Enable signature validation certificate alias. - */ - isSignatureValidationCertificateAliasEnabled?: boolean; - /** - * Self app name. - */ - selfAppIdentifier: string; - /** - * System apps list. - */ - systemAppsIdentifiers: string[]; - /** - * Show App Switch button in the Header. - */ - showAppSwitchButton?: boolean; - /** - * Hidden userstores - */ - hiddenUserStores: string[]; - /** - * is XACML connector enabled. - */ - isXacmlConnectorEnabled?: boolean; - /** - * Enable/Disable the custom claim mapping feature. - */ - isCustomClaimMappingEnabled?: boolean; - /** - * Enable/Disable the custom claim mapping merge feature. - */ - isCustomClaimMappingMergeEnabled?: boolean; - /** - * Whether to consider the role claim as the group claim. - */ - useRoleClaimAsGroupClaim?: boolean; - /** - * Feature configs related to governance connectors. - */ - governanceConnectors?: GovernanceConnectorsFeatureConfig; -} - -/** - * Interface for IDP template configurations. - */ -interface IdentityProviderTemplatesConfigInterface { - /** - * Apple template config. - */ - apple: IdentityProviderTemplateConfigInterface; - /** - * Enterprise OIDC template config. - */ - enterpriseOIDC: IdentityProviderTemplateConfigInterface; - /** - * Enterprise SAML template config. - */ - enterpriseSAML: IdentityProviderTemplateConfigInterface; - /** - * Facebook template config. - */ - facebook: IdentityProviderTemplateConfigInterface; - /** - * Google template config. - */ - google: IdentityProviderTemplateConfigInterface; - /** - * GitHub template config. - */ - github: IdentityProviderTemplateConfigInterface; - /** - * Microsoft template config. - */ - microsoft: IdentityProviderTemplateConfigInterface; -} - -/** - * Interface for IDP template config. - */ -interface IdentityProviderTemplateConfigInterface { - /** - * Is the IDP enabled. - */ - enabled: boolean; -} - -export interface ResourceEndpointsInterface { - [key: string]: string; -} diff --git a/modules/common/src/models/documentation.ts b/modules/common/src/models/documentation.ts deleted file mode 100644 index 6c13a73eb8c..00000000000 --- a/modules/common/src/models/documentation.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Interface for the common documentation structure. - */ -interface CommonDocumentationLinksInterface { - docsHomePage: string; -} - -/** - * Interface for the connections section documentation structure. - */ -interface ConnectionsDocumentationLinksInterface { - learnMore: string; - newConnection: { - learnMore: string; - apple: { - learnMore: string; - }; - enterprise: { - oidcLearnMore: string; - samlLearnMore: string; - }; - facebook: { - learnMore: string; - }; - github: { - learnMore: string; - }; - google: { - learnMore: string; - }; - hypr: { - learnMore: string; - }; - microsoft: { - learnMore: string; - }; - siwe: { - learnMore: string; - }; - }; - edit: { - advancedSettings: { - jit: string; - }; - quickStart: { - fido: { - learnMore: string; - }; - }; - } -} - -/** - * Interface for the console documentation structure. - */ -export interface DocumentationLinksExtensionInterface { - /** - * Documentation links for common elements. - */ - common: CommonDocumentationLinksInterface; - /** - * Documentation links for develop section elements. - */ - develop: { - /** - * Documentation links for connections section elements. - */ - connections: ConnectionsDocumentationLinksInterface; - } -} - -export type DocumentationLinksInterface = DocumentationLinksExtensionInterface; diff --git a/modules/common/src/models/help-panel.ts b/modules/common/src/models/help-panel.ts deleted file mode 100644 index 78894fd2f12..00000000000 --- a/modules/common/src/models/help-panel.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Interface for the portal documentation structure. - */ -export interface PortalDocumentationStructureInterface extends StrictPortalDocumentationStructureInterface { - [ key: string ]: any; -} - -/** - * Strict interface for the portal documentation structure. - */ -interface StrictPortalDocumentationStructureInterface { - "Developer Portal": { - "Applications": { - Overview: string; - "Create New Application": { - Overview: string; - "Single Page Application": string; - "OIDC Web Application": string; - "SAML Web Application": string; - }; - "Edit Application": { - "Single Page Aplication": string; - "OIDC Web Application": string; - "SAML Web Application": string; - }; - }; - }; - Samples: { - Overview: string; - Authentication: { - Android: string; - iOS: string; - Angular: string; - React: string; - Java: string; - NodeJs: string; - "OpenID Connect": string; - SAML: string; - }; - }; -} - -/** - * Interface for generic doc panel UI card. - */ -export interface DocPanelUICardInterface { - name: string; - displayName: string; - image: string; - docs: string; -} diff --git a/modules/common/src/models/reducer-state.ts b/modules/common/src/models/reducer-state.ts deleted file mode 100644 index 510b55289b4..00000000000 --- a/modules/common/src/models/reducer-state.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { AuthenticatedUserInfo } from "@asgardeo/auth-react"; -import { - AlertInterface, - CommonAuthReducerStateInterface, - CommonConfigReducerStateInterface, - CommonGlobalReducerStateInterface, - RouteInterface -} from "@wso2is/core/models"; -import { I18nModuleOptionsInterface, SupportedLanguagesMeta } from "@wso2is/i18n"; -import { System } from "react-notification-system"; -import { - DeploymentConfigInterface, - FeatureConfigInterface, - ResourceEndpointsInterface, - UIConfigInterface -} from "./config"; -import { OrganizationType } from "../constants/organization-constants"; - -/** - * Portal config reducer state interface. - */ -export type ConfigReducerStateInterface = CommonConfigReducerStateInterface< - DeploymentConfigInterface, - ResourceEndpointsInterface, - FeatureConfigInterface, - I18nModuleOptionsInterface, - UIConfigInterface>; - -/** - * Global reducer state interface. - */ -export interface GlobalReducerStateInterface extends CommonGlobalReducerStateInterface< - AlertInterface, - System, - SupportedLanguagesMeta> { - - activeView: any; -} - -export interface AccessControlReducerStateInterface { - isDevelopAllowed: boolean, - isManageAllowed: boolean -} - -export interface RoutesReducerStateInterface { - manageRoutes: { - filteredRoutes: RouteInterface[]; - sanitizedRoutes: RouteInterface[]; - }; - developeRoutes: { - filteredRoutes: RouteInterface[]; - sanitizedRoutes: RouteInterface[]; - }; -} - -/** - * Organization Reducer State Interface. - */ -export interface OrganizationReducerStateInterface { - currentOrganization: string; - organization?: any; - getOrganizationLoading: boolean; - isFirstLevelOrganization: boolean; - organizationType: OrganizationType; -} - -export interface AuthReducerStateInterface extends CommonAuthReducerStateInterface, AuthenticatedUserInfo { } diff --git a/modules/common/src/models/ui.ts b/modules/common/src/models/ui.ts deleted file mode 100644 index 642b091ce45..00000000000 --- a/modules/common/src/models/ui.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { FunctionComponent, ReactNode } from "react"; - -/** - * Types of views supported by default in the application. - * @readonly - * @enum {string} - */ -export enum StrictAppViewTypes { - DEVELOP = "DEVELOP", - MANAGE = "MANAGE", - QUICKSTART = "QUICKSTART" -} - -/** - * Typed interface of {@link getHelpPanelActionIcons} - */ -export type GetHelpPanelActionIconsInterface = { - caretLeft: FunctionComponent | ReactNode, - caretRight: FunctionComponent | ReactNode, - close: FunctionComponent | ReactNode, - pin: FunctionComponent | ReactNode, - unpin: FunctionComponent | ReactNode -}; - -/** - * Typed interface of {@link getCertificateIllustrations} - */ -export type GetCertificateIllustrationsInterface = { - avatar: FunctionComponent | ReactNode, - badge: FunctionComponent | ReactNode, - file: FunctionComponent | ReactNode, - ribbon: FunctionComponent | ReactNode, - uploadPlaceholder: FunctionComponent | ReactNode -}; - -/** - * Typed interface of {@link getEmptyPlaceholderIllustrations} - */ -export type GetEmptyPlaceholderIllustrationsInterface = { - emptyList: FunctionComponent | ReactNode, - emptySearch: FunctionComponent | ReactNode, - newList: FunctionComponent | ReactNode -}; - -/** - * Combination of views in the application with extensions. - */ -export type AppViewTypes = StrictAppViewTypes; - -/** - * Typed interface of {@link getAdvancedSearchIcons} - */ -export type GetAdvancedSearchIconsInterface = { - clear: FunctionComponent | ReactNode, -}; diff --git a/modules/common/src/providers/app-config-provider.tsx b/modules/common/src/providers/app-config-provider.tsx deleted file mode 100644 index c6fe88f50da..00000000000 --- a/modules/common/src/providers/app-config-provider.tsx +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import React, { PropsWithChildren, ReactElement } from "react"; -import DeploymentConfigProvider from "./deployment-config-provider"; -import ResourceEndpointsProvider from "./resource-enpoints-provider"; -import UIConfigProvider from "./ui-config-provider"; - -// eslint-disable-next-line @typescript-eslint/ban-types -type AppConfigProviderPropsInterface = {}; - -/** - * App Configuration Provider. - * - * @param {React.PropsWithChildren} props - Props injected to the component. - * @returns {React.ReactElement} - */ -export const AppConfigProvider = (props: PropsWithChildren): ReactElement => { - - const { children } = props; - - return ( - - - - { children } - - - - ); -}; diff --git a/modules/common/src/providers/deployment-config-provider.tsx b/modules/common/src/providers/deployment-config-provider.tsx deleted file mode 100644 index a8c8e846a29..00000000000 --- a/modules/common/src/providers/deployment-config-provider.tsx +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import React, { PropsWithChildren, ReactElement, useEffect, useState } from "react"; -import { DeploymentConfigInterface } from "../models/config"; -import { DeploymentConfigContext } from "../contexts/deployment-config-context"; - -// eslint-disable-next-line @typescript-eslint/ban-types -type DeploymentConfigProviderPropsInterface = {}; - -/** - * Deployment Configuration Provider. - * - * @param {React.PropsWithChildren} props - Props injected to the component. - * @returns {React.ReactElement} - */ -const DeploymentConfigProvider = (props: PropsWithChildren): ReactElement => { - - const { children } = props; - - const [ deploymentConfig, setDeploymentConfig ] = useState(undefined); - - return ( - - { children } - - ); -}; - -export default DeploymentConfigProvider; diff --git a/modules/common/src/providers/resource-enpoints-provider.tsx b/modules/common/src/providers/resource-enpoints-provider.tsx deleted file mode 100644 index f22a5249ffe..00000000000 --- a/modules/common/src/providers/resource-enpoints-provider.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import React, { PropsWithChildren, ReactElement, useState } from "react"; -import { ResourceEndpointsInterface } from "../models/config"; -import { ResourceEndpointsContext } from "../contexts/resource-endpoints-context"; - -// Define the interface for the resource endpoint provider. -interface ResourceEndpointsProviderPropsInterface { - resourceEndpoints?: ResourceEndpointsInterface; - setResourceEndpoints?: (endpoints: ResourceEndpointsInterface) => void; -} - -/** - * Resource endpoint Provider. - * - * @param {React.PropsWithChildren} props - Props injected to the component. - * @returns {React.ReactElement} - */ -const ResourceEndpointsProvider = (props: PropsWithChildren): ReactElement => { - - const { children } = props; - - const [ resourceEndpoints, setResourceEndpoints ] = useState(undefined); - - return ( - - { children } - - ); -}; - -export default ResourceEndpointsProvider; diff --git a/modules/common/src/providers/ui-config-provider.tsx b/modules/common/src/providers/ui-config-provider.tsx deleted file mode 100644 index 9d3a993921d..00000000000 --- a/modules/common/src/providers/ui-config-provider.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import React, { PropsWithChildren, ReactElement, useReducer } from "react"; -import { UIConfigInterface } from "../models/config"; -import { UIConfigContext } from "../contexts/ui-config-context"; -import { UIConfigReducer } from "../reducers/ui-config-reducer"; -import { UIConfigActionTypes } from "../actions/ui-config"; - -// eslint-disable-next-line @typescript-eslint/ban-types -type UIConfigProviderPropsInterface = {}; - -/** - * UI Configuration Provider. - * - * @param {React.PropsWithChildren} props - Props injected to the component. - * @returns {React.ReactElement} - */ -const UIConfigProvider = (props: PropsWithChildren): ReactElement => { - - const { children } = props; - - const [ state, dispatch ] = useReducer(UIConfigReducer, { UIConfig: null }); - - const setUIConfig = (config: UIConfigInterface) => { - dispatch({ type: UIConfigActionTypes.SET_UI_CONFIG, payload: config }); - }; - - return ( - - { children } - - ); -}; - -export default UIConfigProvider; diff --git a/modules/common/src/reducers/ui-config-reducer.tsx b/modules/common/src/reducers/ui-config-reducer.tsx deleted file mode 100644 index 692ea5f524a..00000000000 --- a/modules/common/src/reducers/ui-config-reducer.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { UIConfigAction, UIConfigActionTypes } from "../actions/ui-config"; - -/** - * Reducer to handle the state of UI config related actions. - */ -export const UIConfigReducer = (state: any, action: UIConfigAction) => { - switch (action.type) { - case UIConfigActionTypes.SET_UI_CONFIG: - return { ...state, UIConfig: action.payload }; - default: - return state; - } -}; diff --git a/modules/common/src/store/actions/acess-control.ts b/modules/common/src/store/actions/acess-control.ts deleted file mode 100644 index aed5f74bd66..00000000000 --- a/modules/common/src/store/actions/acess-control.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { - AccessControlActionType, - SetDevelopVisibilityActionInterface, - SetManageVisibilityActionInterface -} from "./types/access-control"; - -/** - * Redux action to set the access control developer tab visibility. - * - * @param {boolean} visibility - visibility state - * @return {SetHelpPanelDocsContentURLActionInterface} An action of type `SET_DEVELOPER_VISIBILITY` - */ -export const setDeveloperVisibility = (visibility: boolean): SetDevelopVisibilityActionInterface => ({ - payload: visibility, - type: AccessControlActionType.SET_DEVELOPER_VISIBILITY -}); - -/** - * Redux action to set the access control manage tab visibility. - * - * @param {boolean} visibility - visibility state - * @return {SetHelpPanelDocsContentURLActionInterface} An action of type `SET_MANAGE_VISIBILITY` - */ -export const setManageVisibility = (visibility: boolean): SetManageVisibilityActionInterface => ({ - payload: visibility, - type: AccessControlActionType.SET_MANAGE_VISIBILITY -}); diff --git a/modules/common/src/store/actions/global.ts b/modules/common/src/store/actions/global.ts deleted file mode 100644 index 9eee847b62d..00000000000 --- a/modules/common/src/store/actions/global.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { GlobalActionTypes, SetActiveViewAction } from "./types/global"; -import { AppViewTypes } from "../../models/ui"; - -/** - * Set the active view of the Application. - * Whether it's DEVELOP, MANAGE etc. - * - * @param {AppViewTypes} payload - Active view. - * - * @return {SetActiveViewAction} - */ -export const setActiveView = (payload: AppViewTypes): SetActiveViewAction => ({ - payload, - type: GlobalActionTypes.SET_ACTIVE_VIEW -}); diff --git a/modules/common/src/store/actions/help-panel.ts b/modules/common/src/store/actions/help-panel.ts deleted file mode 100755 index 579035814e4..00000000000 --- a/modules/common/src/store/actions/help-panel.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { - HelpPanelActionTypes, - SetHelpPanelActiveTabIndexActionInterface, - SetHelpPanelDocStructureActionInterface, - SetHelpPanelDocsContentURLActionInterface, - ToggleHelpPanelVisibilityActionInterface -} from "./types/help-panel"; -import { PortalDocumentationStructureInterface } from "../../models/help-panel"; - -/** - * Redux action to set the help panel docs tab content URL. - * - * @param {string} url - Content URL. - * @return {SetHelpPanelDocsContentURLActionInterface} An action of type `SET_AVAILABLE_INBOUND_AUTH_PROTOCOL_META` - */ -export const setHelpPanelDocsContentURL = (url: string): SetHelpPanelDocsContentURLActionInterface => ({ - payload: url, - type: HelpPanelActionTypes.SET_HELP_PANEL_DOCS_CONTENT_URL -}); - -/** - * Redux action to set the help panel doc structure. - * - * @param {PortalDocumentationStructureInterface} structure - Doc structure. - * @return {SetHelpPanelDocStructureActionInterface} An action of type `SET_HELP_PANEL_DOC_STRUCTURE` - */ -export const setHelpPanelDocStructure = ( - structure: PortalDocumentationStructureInterface -): SetHelpPanelDocStructureActionInterface => ({ - payload: structure, - type: HelpPanelActionTypes.SET_HELP_PANEL_DOC_STRUCTURE -}); - -/** - * Redux action to toggle help panel visibility. - * - * @param {boolean} isVisible - Should side panel be visible. - * @return {ToggleHelpPanelVisibilityActionInterface} An action of type `TOGGLE_HELP_PANEL_VISIBILITY` - */ -export const toggleHelpPanelVisibility = (isVisible: boolean): ToggleHelpPanelVisibilityActionInterface => ({ - payload: isVisible, - type: HelpPanelActionTypes.TOGGLE_HELP_PANEL_VISIBILITY -}); - -/** - * Redux action to set the help panel active tab index. - * - * @param {number} tabIndex - The active tab index. - * @return {SetHelpPanelActiveTabIndexActionInterface} An action of type `SET_HELP_PANEL_ACTIVE_TAB_INDEX` - */ -export const setHelpPanelActiveTabIndex = (tabIndex: number): SetHelpPanelActiveTabIndexActionInterface => ({ - payload: tabIndex, - type: HelpPanelActionTypes.SET_HELP_PANEL_ACTIVE_TAB_INDEX -}); diff --git a/modules/common/src/store/actions/organization.ts b/modules/common/src/store/actions/organization.ts deleted file mode 100644 index 90f9f692814..00000000000 --- a/modules/common/src/store/actions/organization.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { - OrganizationActionTypes, - SetCurrentOrganizationActionInterface, - SetGetOrganizationLoadingActionInterface, - SetIsFirstLevelOrganizationInterface, - SetOrganizationActionInterface, - SetOrganizationTypeInterface -} from "./types/organization"; -import { OrganizationType } from "../../constants/organization-constants"; -import { OrganizationResponseInterface } from "../../models/common"; - -/** - * This action sets an organization in the redux store. - * - * @param organization - AN organization object - * - * @returns - A set organization action - */ -export const setOrganization = (organization: OrganizationResponseInterface): SetOrganizationActionInterface => { - return { - payload: organization, - type: OrganizationActionTypes.SET_ORGANIZATION - }; -}; - -/** - * This action sets the current organization in the redux store. - * - * @param orgName - The current organization - * - * @returns - A set current organization action - */ -export const setCurrentOrganization = (orgName: string): SetCurrentOrganizationActionInterface => { - return { - payload: orgName, - type: OrganizationActionTypes.SET_CURRENT_ORGANIZATION - }; -}; - -/** - * This action sets the loading state of the get organization API. - * - * @param isLoading - A boolean value to set the loading state of the organization - * @returns - A set get organization loading action - */ -export const setGetOrganizationLoading = (isLoading: boolean): SetGetOrganizationLoadingActionInterface => { - return { - payload: isLoading, - type: OrganizationActionTypes.SET_GET_ORGANIZATION_LOADING - }; -}; - -/** - * This action sets if the current organization is a first level organization. - * - * @param isFirstLevel - A boolean value to set the loading state of the organization - * - * @returns - An action that sets the if it is a first level organization. - */ -export const setIsFirstLevelOrganization = (isFirstLevel: boolean): SetIsFirstLevelOrganizationInterface => { - return { - payload: isFirstLevel, - type: OrganizationActionTypes.SET_IS_FIRST_LEVEL_ORGANIZATION - }; -}; - -/** - * Sets the organization type. - * - * @param orgType - The organization type. - * @returns Redux action - */ -export const setOrganizationType = (orgType: OrganizationType): SetOrganizationTypeInterface => { - return { - payload: orgType, - type: OrganizationActionTypes.SET_ORGANIZATION_TYPE - }; -}; diff --git a/modules/common/src/store/actions/routes.ts b/modules/common/src/store/actions/routes.ts deleted file mode 100644 index 16a436fb8dc..00000000000 --- a/modules/common/src/store/actions/routes.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { RouteInterface } from "@wso2is/core/models"; -import { - RoutesActionTypes, - SetFilteredDevelopRoutesActionInterface, - SetFilteredManageRoutesActionInterface, - SetSanitizedDevelopRoutesActionInterface, - SetSanitizedManageRoutesActionInterface -} from "./types/routes"; - -export const setFilteredManageRoutes = (routes: RouteInterface[]): SetFilteredManageRoutesActionInterface => { - return { - payload: routes, - type: RoutesActionTypes.SET_FILTERED_MANAGE_ROUTES - }; -}; - -export const setFilteredDevelopRoutes = (routes: RouteInterface[]): SetFilteredDevelopRoutesActionInterface => { - return { - payload: routes, - type: RoutesActionTypes.SET_FILTERED_DEVELOP_ROUTES - }; -}; - -export const setSanitizedManageRoutes = (routes: RouteInterface[]): SetSanitizedManageRoutesActionInterface => { - return { - payload: routes, - type: RoutesActionTypes.SET_SANITIZED_MANAGE_ROUTES - }; -}; - -export const setSanitizedDevelopRoutes = (routes: RouteInterface[]): SetSanitizedDevelopRoutesActionInterface => { - return { - payload: routes, - type: RoutesActionTypes.SET_SANITIZED_DEVELOP_ROUTES - }; -}; diff --git a/modules/common/src/store/actions/types/access-control.ts b/modules/common/src/store/actions/types/access-control.ts deleted file mode 100644 index 2877f715250..00000000000 --- a/modules/common/src/store/actions/types/access-control.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Enum for Access Constol action types - * - * @readonly - * @enum {string} - */ -export enum AccessControlActionType { - /** - * Action type to set the visibility of the developer tab. - * - * @type {string} - */ - SET_DEVELOPER_VISIBILITY = "SET_DEVELOPER_VISIBILITY", - /** - * Action type to set the visibility of the manage tab. - * - * @type {string} - */ - SET_MANAGE_VISIBILITY = "SET_MANAGE_VISIBILITY", -} - -/** - * Access control base action interface. - */ -interface AccessControlBaseActionInterface { - type: AccessControlActionType; -} - -export interface SetDevelopVisibilityActionInterface extends AccessControlBaseActionInterface { - payload: boolean; - type: AccessControlActionType.SET_DEVELOPER_VISIBILITY; -} - -export interface SetManageVisibilityActionInterface extends AccessControlBaseActionInterface { - payload: boolean; - type: AccessControlActionType.SET_MANAGE_VISIBILITY; -} - -/** - * Export action interfaces. - */ -export type AccessControlActions = SetDevelopVisibilityActionInterface - | SetManageVisibilityActionInterface; diff --git a/modules/common/src/store/actions/types/global.ts b/modules/common/src/store/actions/types/global.ts deleted file mode 100644 index ae4f880d43e..00000000000 --- a/modules/common/src/store/actions/types/global.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { AppViewTypes } from "../../../models/ui"; - -/** - * Enum for Global action types. - */ -export enum GlobalActionTypes { - /** - * Action type to set the current active view. - * - * @type {string} - */ - SET_ACTIVE_VIEW = "SET_ACTIVE_VIEW" -} - -/** - * Global base action interface. - */ -interface GlobalBaseAction { - type: GlobalActionTypes; -} - -/** - * Set the active view for the Console content. - * ex: DEVELOPER, ADMIN etc. - */ -export interface SetActiveViewAction extends GlobalBaseAction { - payload: AppViewTypes; - type: GlobalActionTypes.SET_ACTIVE_VIEW; -} - -/** - * Export action interfaces. - */ -export type GlobalActions = SetActiveViewAction; diff --git a/modules/common/src/store/actions/types/help-panel.ts b/modules/common/src/store/actions/types/help-panel.ts deleted file mode 100755 index 59b428310f8..00000000000 --- a/modules/common/src/store/actions/types/help-panel.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { PortalDocumentationStructureInterface } from "../../../models/help-panel"; - -/** - * Enum for help panel action types. - * - * @readonly - * @enum {string} - */ -export enum HelpPanelActionTypes { - /** - * Action type to set the content URL for the help panel docs tab. - * - * @type {string} - */ - SET_HELP_PANEL_DOCS_CONTENT_URL = "SET_HELP_PANEL_DOCS_CONTENT_URL", - /** - * Action type to set the documentation structure for the help panel. - * - * @type {string} - */ - SET_HELP_PANEL_DOC_STRUCTURE = "SET_HELP_PANEL_DOC_STRUCTURE", - /** - * Action type to toggle the help panel visibility. - * - * @type {string} - */ - TOGGLE_HELP_PANEL_VISIBILITY = "TOGGLE_HELP_PANEL_VISIBILITY", - /** - * Action type to set the help panel active tab index. - * - * @type {string} - */ - SET_HELP_PANEL_ACTIVE_TAB_INDEX = "SET_HELP_PANEL_ACTIVE_TAB_INDEX" -} - -/** - * Help panel base action interface. - */ -interface HelpPanelBaseActionInterface { - type: HelpPanelActionTypes; -} - -/** - * Set the content URL for the help panel docs tab action interface. - */ -export interface SetHelpPanelDocsContentURLActionInterface extends HelpPanelBaseActionInterface { - payload: string; - type: HelpPanelActionTypes.SET_HELP_PANEL_DOCS_CONTENT_URL; -} - -/** - * Set the doc structure for the help panel action interface. - */ -export interface SetHelpPanelDocStructureActionInterface extends HelpPanelBaseActionInterface { - payload: PortalDocumentationStructureInterface; - type: HelpPanelActionTypes.SET_HELP_PANEL_DOC_STRUCTURE; -} - -/** - * Action interface for the help panel visibility action. - */ -export interface ToggleHelpPanelVisibilityActionInterface extends HelpPanelBaseActionInterface { - payload: boolean; - type: HelpPanelActionTypes.TOGGLE_HELP_PANEL_VISIBILITY; -} - -/** - * Action interface for the help panel active tab index action. - */ -export interface SetHelpPanelActiveTabIndexActionInterface extends HelpPanelBaseActionInterface { - payload: number; - type: HelpPanelActionTypes.SET_HELP_PANEL_ACTIVE_TAB_INDEX; -} - -/** - * Export action interfaces. - */ -export type HelpPanelActions = SetHelpPanelDocsContentURLActionInterface - | SetHelpPanelDocStructureActionInterface - | ToggleHelpPanelVisibilityActionInterface - | SetHelpPanelActiveTabIndexActionInterface; diff --git a/modules/common/src/store/actions/types/organization.ts b/modules/common/src/store/actions/types/organization.ts deleted file mode 100644 index 02b7722e5ce..00000000000 --- a/modules/common/src/store/actions/types/organization.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { OrganizationType } from "../../../constants/organization-constants"; -import { OrganizationResponseInterface } from "../../../models/common"; - -export enum OrganizationActionTypes { - SET_ORGANIZATION = "SET_ORGANIZATION", - SET_CURRENT_ORGANIZATION = "SET_CURRENT_ORGANIZATION", - SET_GET_ORGANIZATION_LOADING = "SET_GET_ORGANIZATION_LOADING", - SET_IS_FIRST_LEVEL_ORGANIZATION = "SET_IS_FIRST_LEVEL_ORGANIZATION", - SET_ORGANIZATION_TYPE = "SET_ORGANIZATION_TYPE" -} - -export interface SetOrganizationActionInterface { - payload: OrganizationResponseInterface; - type: OrganizationActionTypes.SET_ORGANIZATION; -} - -export interface SetCurrentOrganizationActionInterface { - payload: string; - type: OrganizationActionTypes.SET_CURRENT_ORGANIZATION; -} - -export interface SetGetOrganizationLoadingActionInterface { - payload: boolean; - type: OrganizationActionTypes.SET_GET_ORGANIZATION_LOADING; -} - -export interface SetIsFirstLevelOrganizationInterface { - payload: boolean; - type: OrganizationActionTypes.SET_IS_FIRST_LEVEL_ORGANIZATION; -} - -export interface SetOrganizationTypeInterface { - payload: OrganizationType; - type: OrganizationActionTypes.SET_ORGANIZATION_TYPE; -} - -export type OrganizationAction = - | SetCurrentOrganizationActionInterface - | SetOrganizationActionInterface - | SetGetOrganizationLoadingActionInterface - | SetIsFirstLevelOrganizationInterface - | SetOrganizationTypeInterface; diff --git a/modules/common/src/store/actions/types/routes.ts b/modules/common/src/store/actions/types/routes.ts deleted file mode 100644 index 25c2608a325..00000000000 --- a/modules/common/src/store/actions/types/routes.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { RouteInterface } from "@wso2is/core/models"; - -export enum RoutesActionTypes { - SET_FILTERED_MANAGE_ROUTES = "SET_FILTERED_MANAGE_ROUTES", - SET_SANITIZED_MANAGE_ROUTES = "SET_SANITIZED_MANAGE_ROUTES", - SET_FILTERED_DEVELOP_ROUTES = "SET_FILTERED_DEVELOP_ROUTES", - SET_SANITIZED_DEVELOP_ROUTES = "SET_SANITIZED_DEVELOP_ROUTES" -} - -export interface SetFilteredManageRoutesActionInterface { - payload: RouteInterface[]; - type: RoutesActionTypes.SET_FILTERED_MANAGE_ROUTES; -} - -export interface SetFilteredDevelopRoutesActionInterface { - payload: RouteInterface[]; - type: RoutesActionTypes.SET_FILTERED_DEVELOP_ROUTES; -} - -export interface SetSanitizedManageRoutesActionInterface { - payload: RouteInterface[]; - type: RoutesActionTypes.SET_SANITIZED_MANAGE_ROUTES; -} - -export interface SetSanitizedDevelopRoutesActionInterface { - payload: RouteInterface[]; - type: RoutesActionTypes.SET_SANITIZED_DEVELOP_ROUTES; -} - -export type RoutesAction = SetFilteredDevelopRoutesActionInterface | - SetFilteredManageRoutesActionInterface | - SetSanitizedDevelopRoutesActionInterface | - SetSanitizedManageRoutesActionInterface; diff --git a/modules/common/src/store/combine-reducers.ts b/modules/common/src/store/combine-reducers.ts deleted file mode 100644 index ef61cd2de71..00000000000 --- a/modules/common/src/store/combine-reducers.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { - LinkedAccountInterface, - ProfileInfoInterface, - ProfileSchemaInterface -} from "@wso2is/core/models"; -import { - commonConfigReducer, - commonProfileReducer, - commonRequestLoadersReducer -} from "@wso2is/core/store"; -import { I18nModuleOptionsInterface } from "@wso2is/i18n"; -import { combineReducers } from "redux"; -import { reducer as formReducer } from "redux-form"; -import { accessControlReducer } from "./reducers/access-control"; -import { commonProfileReducerInitialState } from "./reducers/profile"; -import { commonRequestLoadersInitialState } from "./reducers/loaders"; -import { globalReducer } from "./reducers/global"; -import { helpPanelReducer } from "./reducers/help-panel"; -import { organizationReducer } from "./reducers/organization"; -import { routeReducer } from "./reducers/routes"; - -/** - * Combines all the reducers. - * - * @type {Reducer} Root reducer to be used when creating the store. - */ -export const reducers = combineReducers({ - accessControl: accessControlReducer, - config: null, - form: formReducer, - global: globalReducer, - helpPanel: helpPanelReducer, - loaders: commonRequestLoadersReducer(commonRequestLoadersInitialState), - organization: organizationReducer, - profile: commonProfileReducer< - ProfileInfoInterface, - ProfileSchemaInterface[], - LinkedAccountInterface[] - >(commonProfileReducerInitialState), - routes: routeReducer -}); diff --git a/modules/common/src/store/index.ts b/modules/common/src/store/index.ts deleted file mode 100644 index a4c4b8c2010..00000000000 --- a/modules/common/src/store/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { IdentifiableComponentInterface } from "@wso2is/core/models"; -import { AnyAction, Store, StoreEnhancer, applyMiddleware, createStore } from "redux"; -import { composeWithDevTools } from "redux-devtools-extension/developmentOnly"; -import thunk from "redux-thunk"; -import { reducers } from "./combine-reducers"; - -type ComponentInterface = IdentifiableComponentInterface; - -/** - * The type of state held by this store. - */ -export type AppState = ReturnType; - -/** - * The type of actions which may be dispatched by this store. - */ -export type AppActions = AnyAction; - -/** - * Enables the instantiation of a redux store which could be passed on - * to the `Provider` supplied by the `react-redux` library. - * - * @return {Store & Store & {dispatch: any}} Redux Store - */ -const configureStore = (): Store & Store & - { dispatch: any } => { - - const middleware = [ - thunk - ]; - - const middleWareEnhancer: StoreEnhancer<{ dispatch: any }> = applyMiddleware(...middleware); - - return createStore( - reducers, - composeWithDevTools(middleWareEnhancer) - ); -}; - -export const store = configureStore(); diff --git a/modules/common/src/store/reducers/access-control.ts b/modules/common/src/store/reducers/access-control.ts deleted file mode 100644 index 0478baa7335..00000000000 --- a/modules/common/src/store/reducers/access-control.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { AccessControlReducerStateInterface } from "../../models/reducer-state"; -import { AccessControlActionType, AccessControlActions } from "../actions/types/access-control"; - -/** - * Common access control reducer initial state. - */ -const initialState: AccessControlReducerStateInterface = { - isDevelopAllowed: true, - isManageAllowed: true -}; - -/** - * Reducer to handle the state of access control related actions. - * - * @param {AccessControlReducerStateInterface} state - Previous state - * @param {AccessControlActionType} action - Action type. - * @returns The new state - */ -export const accessControlReducer = (state: AccessControlReducerStateInterface = initialState, - action: AccessControlActions): AccessControlReducerStateInterface => { - - switch (action.type) { - case AccessControlActionType.SET_DEVELOPER_VISIBILITY: - return { - ...state, - isDevelopAllowed: action.payload - }; - case AccessControlActionType.SET_MANAGE_VISIBILITY: - return { - ...state, - isManageAllowed: action.payload - }; - default: - return state; - } -}; diff --git a/modules/common/src/store/reducers/config.ts b/modules/common/src/store/reducers/config.ts deleted file mode 100644 index 4f2e6824a76..00000000000 --- a/modules/common/src/store/reducers/config.ts +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -/** - * Initial state for the common config reducer. - */ -export const commonConfigReducerInitialState = { - - deployment: { - accountApp: { - basePath: "", - displayName: "", - path: "", - tenantQualifiedPath: "" - }, - adminApp: { - basePath: "", - displayName: "", - path: "", - tenantQualifiedPath: "" - }, - allowMultipleAppProtocols: undefined, - appBaseName: "", - appBaseNameWithoutTenant: "", - appHomePath: "", - appLoginPath: "", - appLogoutPath: "", - clientHost: "", - clientID: "", - clientOrigin: "", - customServerHost: "", - developerApp: { - basePath: "", - displayName: "", - path: "", - tenantQualifiedPath: "" - }, - docSiteURL: "", - documentation: null, - extensions: null, - helpCenterURL: "", - idpConfigs: null, - loginCallbackUrl: "", - serverHost: "", - serverOrigin: "", - superTenant: "", - tenant: "", - tenantPath: "", - tenantPrefix: "" - }, - endpoints: { - CORSOrigins: "", - identityProviders: "" - }, - features: { - applications: null, - approvals: null, - attributeDialects: null, - certificates: null, - emailTemplates: null, - governanceConnectors: null, - groups: null, - guestUser: null, - identityProviders: null, - oidcScopes: null, - remoteFetchConfig: null, - roles: null, - secretsManagement: null, - userStores: null, - users: null - }, - i18n: null, - ui: { - announcements: [], - appCopyright: "", - appName: "", - appTitle: "", - features: { - applications: null, - approvals: null, - attributeDialects: null, - certificates: null, - emailTemplates: null, - governanceConnectors: null, - groups: null, - guestUser: null, - identityProviders: null, - oidcScopes: null, - remoteFetchConfig: null, - roles: null, - secretsManagement: null, - userStores: null, - users: null - }, - googleOneTapEnabledTenants: [], - gravatarConfig: { - defaultImage: "", - fallback: null, - size: null - }, - hiddenAuthenticators: [], - hiddenConnectionTemplates: [], - hiddenUserStores: [], - i18nConfigs: null, - identityProviderTemplates: { - apple: { - enabled: false - }, - enterpriseOIDC: { - enabled: false - }, - enterpriseSAML: { - enabled: false - }, - facebook: { - enabled: false - }, - github: { - enabled: false - }, - google: { - enabled: false - }, - microsoft: { - enabled: false - } - }, - connectionResourcesUrl: "", - isClientSecretHashEnabled: undefined, - isCookieConsentBannerEnabled: undefined, - isDefaultDialectEditingEnabled: undefined, - isDialectAddingEnabled: undefined, - isGroupAndRoleSeparationEnabled: undefined, - isHeaderAvatarLabelAllowed: undefined, - isLeftNavigationCategorized: undefined, - isMarketingConsentBannerEnabled: undefined, - isRequestPathAuthenticationEnabled: undefined, - isSignatureValidationCertificateAliasEnabled: undefined, - listAllAttributeDialects: undefined, - privacyPolicyConfigs: null, - productName: "", - productVersionConfig: null, - selfAppIdentifier: "", - showAppSwitchButton: undefined, - systemAppsIdentifiers: [], - theme: { - name: "", - path: "", - styleSheets: null - } - } - }; diff --git a/modules/common/src/store/reducers/global.ts b/modules/common/src/store/reducers/global.ts deleted file mode 100644 index da806c117df..00000000000 --- a/modules/common/src/store/reducers/global.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { AlertInterface } from "@wso2is/core/models"; -import { commonGlobalReducer } from "@wso2is/core/store"; -import { SupportedLanguagesMeta } from "@wso2is/i18n"; -import { System } from "react-notification-system"; -import reduceReducers from "reduce-reducers"; -import { Reducer } from "redux"; -import { GlobalReducerStateInterface } from "../../models/reducer-state"; -import { GlobalActionTypes, GlobalActions } from "../actions/types/global"; - -/** - * Initial state for the common global reducer. - */ -const initialState: GlobalReducerStateInterface = { - - activeView: null, - alert: null, - alertSystem: null, - isAJAXTopLoaderVisible: false, - supportedI18nLanguages: null -}; - -/** - * Reducer to handle the state of Global actions specific to Console. - * - * @param {AccessControlReducerStateInterface} state - Previous state - * @param {AccessControlActionType} action - Action type. - * @returns The new state - */ -const GlobalReducer = (state: GlobalReducerStateInterface = initialState, - action: GlobalActions): GlobalReducerStateInterface => { - - switch (action.type) { - case GlobalActionTypes.SET_ACTIVE_VIEW: - return { - ...state, - activeView: action.payload - }; - default: - return state; - } -}; - -export const globalReducer: Reducer = reduceReducers(initialState, - commonGlobalReducer(initialState), - GlobalReducer); diff --git a/modules/common/src/store/reducers/help-panel.ts b/modules/common/src/store/reducers/help-panel.ts deleted file mode 100755 index b51eedd8237..00000000000 --- a/modules/common/src/store/reducers/help-panel.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { HelpPanelActionTypes, HelpPanelActions } from "../actions/types/help-panel"; - -/** - * Help panel reducer state interface. - */ -export interface HelpPanelReducerStateInterface { - activeTabIndex: number; - docURL: string; - docStructure: any; - visibility: boolean; -} - -/** - * Help panel reducer initial state. - */ -const initialState: HelpPanelReducerStateInterface = { - activeTabIndex: 0, - docStructure: null, - docURL: null, - visibility: false -}; - -/** - * Reducer to handle the state of help panel related actions. - * - * @param {HelpPanelReducerStateInterface} state - Previous state - * @param {ApplicationActions} action - Action type. - * @returns The new state - */ -export const helpPanelReducer = (state: HelpPanelReducerStateInterface = initialState, - action: HelpPanelActions): HelpPanelReducerStateInterface => { - - switch (action.type) { - case HelpPanelActionTypes.SET_HELP_PANEL_DOCS_CONTENT_URL: - return { - ...state, - docURL: action.payload - }; - case HelpPanelActionTypes.SET_HELP_PANEL_DOC_STRUCTURE: - return { - ...state, - docStructure: action.payload - }; - case HelpPanelActionTypes.TOGGLE_HELP_PANEL_VISIBILITY: - return { - ...state, - visibility: action.payload - }; - case HelpPanelActionTypes.SET_HELP_PANEL_ACTIVE_TAB_INDEX: - return { - ...state, - activeTabIndex: action.payload - }; - default: - return state; - } -}; diff --git a/modules/common/src/store/reducers/loaders.ts b/modules/common/src/store/reducers/loaders.ts deleted file mode 100644 index 95b94a3188f..00000000000 --- a/modules/common/src/store/reducers/loaders.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { CommonRequestLoadersReducerStateInterface } from "@wso2is/core/models"; - -/** - * Initial state for the common request loaders reducer. - */ -export const commonRequestLoadersInitialState: CommonRequestLoadersReducerStateInterface = { - isProfileInfoRequestLoading: false, - isProfileSchemaRequestLoading: false, - isSignOutRequestLoading: false, - isTokenRequestLoading: false, - isTokenRevokeRequestLoading: false -}; diff --git a/modules/common/src/store/reducers/organization.ts b/modules/common/src/store/reducers/organization.ts deleted file mode 100644 index 88f64fba504..00000000000 --- a/modules/common/src/store/reducers/organization.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { OrganizationManagementConstants, OrganizationType } from "../../constants/organization-constants"; -import { OrganizationReducerStateInterface } from "../../models/reducer-state"; -import { OrganizationAction, OrganizationActionTypes } from "../actions/types/organization"; - -const initialState: OrganizationReducerStateInterface = { - currentOrganization: "", - getOrganizationLoading: true, - isFirstLevelOrganization: false, - organization: { - attributes: [], - created: new Date().toString(), - description: "", - domain: "", - id: OrganizationManagementConstants.ROOT_ORGANIZATION.id, - lastModified: new Date().toString(), - name: OrganizationManagementConstants.ROOT_ORGANIZATION.name, - parent: { - id: "", - ref: "" - }, - status: "", - type: "" - }, - organizationType: OrganizationType.SUPER_ORGANIZATION -}; - -export const organizationReducer = ( - state: OrganizationReducerStateInterface = initialState, - action: OrganizationAction -): OrganizationReducerStateInterface => { - switch (action.type) { - case OrganizationActionTypes.SET_CURRENT_ORGANIZATION: - return { - ...state, - currentOrganization: action.payload - }; - case OrganizationActionTypes.SET_ORGANIZATION: - return { - ...state, - organization: action.payload - }; - case OrganizationActionTypes.SET_GET_ORGANIZATION_LOADING: - return { - ...state, - getOrganizationLoading: action.payload - }; - case OrganizationActionTypes.SET_IS_FIRST_LEVEL_ORGANIZATION: - return { - ...state, - isFirstLevelOrganization: action.payload - }; - case OrganizationActionTypes.SET_ORGANIZATION_TYPE: - return { - ...state, - organizationType: action.payload - }; - default: - return { - ...state - }; - } -}; diff --git a/modules/common/src/store/reducers/profile.ts b/modules/common/src/store/reducers/profile.ts deleted file mode 100644 index ececa89f087..00000000000 --- a/modules/common/src/store/reducers/profile.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { - CommonProfileReducerStateInterface, - LinkedAccountInterface, - ProfileInfoInterface, - ProfileSchemaInterface, - emptyProfileInfo -} from "@wso2is/core/models"; - -/** - * Initial state for the common profile reducer. - */ -export const commonProfileReducerInitialState: CommonProfileReducerStateInterface< - ProfileInfoInterface, - ProfileSchemaInterface[], - LinkedAccountInterface[]> = { - - isSCIMEnabled: true, - linkedAccounts: [], - profileInfo: emptyProfileInfo(), - profileSchemas: [] - }; diff --git a/modules/common/src/store/reducers/routes.ts b/modules/common/src/store/reducers/routes.ts deleted file mode 100644 index d5c5b0372d8..00000000000 --- a/modules/common/src/store/reducers/routes.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { RoutesReducerStateInterface } from "../../models/reducer-state"; -import { RoutesAction, RoutesActionTypes } from "../actions/types/routes"; - -const initialState: RoutesReducerStateInterface = { - developeRoutes: { - filteredRoutes: [], - sanitizedRoutes: [] - }, - manageRoutes: { - filteredRoutes: [], - sanitizedRoutes: [] - } -}; - -export const routeReducer = ( - state: RoutesReducerStateInterface = initialState, - action: RoutesAction -): RoutesReducerStateInterface => { - switch (action.type) { - case RoutesActionTypes.SET_FILTERED_DEVELOP_ROUTES: - return { - ...state, - developeRoutes: { - ...state.developeRoutes, - filteredRoutes: action.payload - } - }; - case RoutesActionTypes.SET_FILTERED_MANAGE_ROUTES: - return { - ...state, - manageRoutes: { - ...state.manageRoutes, - filteredRoutes: action.payload - } - }; - case RoutesActionTypes.SET_SANITIZED_MANAGE_ROUTES: - return { - ...state, - manageRoutes: { - ...state.manageRoutes, - sanitizedRoutes: action.payload - } - }; - case RoutesActionTypes.SET_SANITIZED_DEVELOP_ROUTES: - return { - ...state, - developeRoutes: { - ...state.developeRoutes, - sanitizedRoutes: action.payload - } - }; - default: - return { - ...state - }; - } -}; diff --git a/modules/common/src/utils/organization.ts b/modules/common/src/utils/organization.ts deleted file mode 100644 index 71ac493fe7b..00000000000 --- a/modules/common/src/utils/organization.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { OrganizationManagementConstants } from "../constants/organization-constants"; - -export class OrganizationUtils { - /** - * Private constructor to prevent object instantiation. - */ - private constructor() { } - - /** - * Returns true if the current organization is the root organization. - * - * @returns if the current organization is the root organization. - */ - public static isCurrentOrganizationRoot(currentOrg: string): boolean { - return currentOrg === OrganizationManagementConstants.ROOT_ORGANIZATION_ID; - } -} diff --git a/modules/common/src/utils/roles.ts b/modules/common/src/utils/roles.ts deleted file mode 100644 index 1a543f1b36e..00000000000 --- a/modules/common/src/utils/roles.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -import { AlertLevels } from "@wso2is/core/models"; -import { addAlert } from "@wso2is/core/store"; -import { I18n } from "@wso2is/i18n"; -import { store } from "../store/index"; - -export const handleGetRoleListError = (error) => { - if (error.response && error.response.data && error.response.data.description) { - store.dispatch( - addAlert({ - description: I18n.instance.t( - "console:develop.features.authenticationProvider.notifications.getRolesList.error.description", - { description: error.response.data.description } - ), - level: AlertLevels.ERROR, - message: I18n.instance.t( - "console:develop.features.authenticationProvider.notifications.getRolesList.error.message" - ) - }) - ); - - return; - } - - store.dispatch( - addAlert({ - description: I18n.instance.t( - "console:develop.features.authenticationProvider.notifications.getRolesList.genericError." + - "description" - ), - level: AlertLevels.ERROR, - message: I18n.instance.t( - "console:develop.features.authenticationProvider.notifications.getRolesList.genericError.message" - ) - }) - ); -}; diff --git a/modules/common/tsconfig.json b/modules/common/tsconfig.json deleted file mode 100644 index aeed91257c4..00000000000 --- a/modules/common/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../../tsconfig.base.react.json", - "compilerOptions": { - "allowJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "noFallthroughCasesInSwitch": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/modules/common/tsconfig.lib.json b/modules/common/tsconfig.lib.json deleted file mode 100644 index 49b7e425a27..00000000000 --- a/modules/common/tsconfig.lib.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../node_modules/@nrwl/react/typings/cssmodule.d.ts", - "../../node_modules/@nrwl/react/typings/image.d.ts" - ], - "exclude": [ - "**/*.spec.ts", - "**/*.test.ts", - "**/*.spec.tsx", - "**/*.test.tsx", - "**/*.spec.js", - "**/*.test.js", - "**/*.spec.jsx", - "**/*.test.jsx", - "jest.config.ts", - "test-configs" - ], - "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] -} diff --git a/modules/common/tsconfig.spec.json b/modules/common/tsconfig.spec.json deleted file mode 100644 index b6d0596e0c7..00000000000 --- a/modules/common/tsconfig.spec.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"] - }, - "include": [ - "**/*.test.ts", - "**/*.spec.ts", - "**/*.test.tsx", - "**/*.spec.tsx", - "**/*.test.js", - "**/*.spec.js", - "**/*.test.jsx", - "**/*.spec.jsx", - "**/*.d.ts" - ] -} diff --git a/modules/common/types/globals.d.ts b/modules/common/types/globals.d.ts deleted file mode 100644 index 1268fcf7953..00000000000 --- a/modules/common/types/globals.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -export {}; - -declare global { - interface Window { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - JSHINT: any; - } -} diff --git a/modules/common/types/imports.d.ts b/modules/common/types/imports.d.ts deleted file mode 100644 index 8baf174fa34..00000000000 --- a/modules/common/types/imports.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com). All Rights Reserved. - * - * This software is the property of WSO2 LLC. and its suppliers, if any. - * Dissemination of any information or reproduction of any material contained - * herein in any form is strictly forbidden, unless permitted by WSO2 expressly. - * You may not alter or remove any copyright or other notice from copies of this content. - */ - -declare module "*.svg" { - import React = require("react"); - - export const ReactComponent: React.FunctionComponent>; - - const src: string; - - export default src; -} - -declare module "*.png" { - const content: string; - - export default content; -} diff --git a/tsconfig.base.json b/tsconfig.base.json index 3e1757b56c3..248e1b26919 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -17,7 +17,6 @@ "target": "es2015", "baseUrl": ".", "paths": { - "@wso2is/common": ["modules/common/src/index.ts"], "@wso2is/dynamic-forms": ["modules/dynamic-forms/src/index.ts"], "@wso2is/form": ["modules/form/src/index.ts"], "@wso2is/forms": ["modules/forms/src/index.ts"], diff --git a/workspace.json b/workspace.json index e88f3931c71..38cc8380cdb 100644 --- a/workspace.json +++ b/workspace.json @@ -15,7 +15,6 @@ "tests": "tests", "theme": "modules/theme", "validation": "modules/validation", - "common": "modules/common", "features": "features" } }