diff --git a/.changeset/witty-shoes-fly.md b/.changeset/witty-shoes-fly.md new file mode 100644 index 00000000000..e2bb1264de3 --- /dev/null +++ b/.changeset/witty-shoes-fly.md @@ -0,0 +1,8 @@ +--- +"@wso2is/admin.template-core.v1": minor +"@wso2is/admin.applications.v1": patch +"@wso2is/console": patch +"@wso2is/form": patch +--- + +Onboard Slack and Zoom SSO templates diff --git a/apps/console/src/public/resources/applications/assets/images/illustrations/slack.png b/apps/console/src/public/resources/applications/assets/images/illustrations/slack.png new file mode 100644 index 00000000000..fbad005161c Binary files /dev/null and b/apps/console/src/public/resources/applications/assets/images/illustrations/slack.png differ diff --git a/apps/console/src/public/resources/applications/assets/images/illustrations/zoom.svg b/apps/console/src/public/resources/applications/assets/images/illustrations/zoom.svg new file mode 100644 index 00000000000..73dae46ec00 --- /dev/null +++ b/apps/console/src/public/resources/applications/assets/images/illustrations/zoom.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + diff --git a/features/admin.applications.v1/components/forms/inbound-saml-form.tsx b/features/admin.applications.v1/components/forms/inbound-saml-form.tsx index 2e74ed42bf3..a82e122e0b9 100644 --- a/features/admin.applications.v1/components/forms/inbound-saml-form.tsx +++ b/features/admin.applications.v1/components/forms/inbound-saml-form.tsx @@ -880,7 +880,10 @@ export const InboundSAMLForm: FunctionComponent = } { /*Response/Assertion Signing*/ } - + + + + ) => { + setSignSAMLResponsesEnabled( + values.get("responseSigning").includes("enabled") + ); } - children={ [ - { - label: t("applications:forms.inboundSAML" + - ".sections.responseSigning.fields.responseSigning.label"), - value: "enabled" - } - ] } - readOnly={ readOnly } - data-testid={ `${ testId }-response-signing-checkbox` } - /> - - { t("applications:forms.inboundSAML.sections" + - ".responseSigning.fields.responseSigning.hint", - { productName: config.ui.productName }) } - - + } + children={ [ + { + label: t("applications:forms.inboundSAML" + + ".sections.responseSigning.fields.responseSigning.label"), + value: "enabled" + } + ] } + readOnly={ readOnly } + data-testid={ `${ testId }-response-signing-checkbox` } + /> + + { t("applications:forms.inboundSAML.sections" + + ".responseSigning.fields.responseSigning.hint", + { productName: config.ui.productName }) } + - + = /> - + = { t("applications:forms.inboundSAML.sections.assertion" + ".heading") } - + + + = - + = /> - + = /> - + + + + = } { /*Single Logout Profile*/ } - + + + + = - + = /> - + = - + = - + { t("applications:forms.inboundSAML.sections" + ".idpInitiatedSLO.heading") } - + + + =
- { - setReturnToURLS(url); - - if (initialValues - ?.singleLogoutProfile - ?.idpInitiatedSingleLogout?.returnToUrls?.toString() !== url) { - setIsFormStale(true); - } - } } - labelName={ - t("applications:forms.inboundSAML.sections" + - ".idpInitiatedSLO.fields.returnToURLs.label") - } - value={ - initialValues?.singleLogoutProfile.idpInitiatedSingleLogout.returnToUrls.toString() - } - placeholder={ - t("applications:forms.inboundSAML.sections" + - ".idpInitiatedSLO.fields.returnToURLs.placeholder") - } - validationErrorMsg={ - t("applications:forms.inboundSAML.sections" + - ".idpInitiatedSLO.fields.returnToURLs.validations.invalid") - } - validation={ (value: string) => { - - let label: ReactElement = null; - - if (!URLUtils.isHttpUrl(value) && !URLUtils.isHttpsUrl(value)) { - label = ( - - ); - } + + + { + setReturnToURLS(url); - if (!URLUtils.isMobileDeepLink(value)) { - return false; - } + if (initialValues + ?.singleLogoutProfile + ?.idpInitiatedSingleLogout?.returnToUrls?.toString() !== url) { + setIsFormStale(true); + } + } } + labelName={ + t("applications:forms.inboundSAML.sections" + + ".idpInitiatedSLO.fields.returnToURLs.label") + } + value={ + initialValues?.singleLogoutProfile.idpInitiatedSingleLogout + .returnToUrls.toString() + } + placeholder={ + t("applications:forms.inboundSAML.sections" + + ".idpInitiatedSLO.fields.returnToURLs.placeholder") + } + validationErrorMsg={ + t("applications:forms.inboundSAML.sections" + + ".idpInitiatedSLO.fields.returnToURLs.validations.invalid") + } + validation={ (value: string) => { + + let label: ReactElement = null; - setReturnToURLsErrorLabel(label); - - return true; - } } - showError={ returnToURLSError } - setShowError={ setReturnToURLSError } - disabled={ !isIdpInitiatedSingleLogoutEnabled || !isSingleLogoutProfileEnabled } - readOnly={ readOnly } - addURLTooltip={ t("common:addURL") } - duplicateURLErrorMessage={ t("common:duplicateURLError") } - data-testid={ `${ testId }-return-to-urls-input` } - showPredictions={ false } - customLabel={ returnToURLsErrorLabel } - popupHeaderPositive={ t("applications:URLInput.withLabel." - + "positive.header") } - popupHeaderNegative={ t("applications:URLInput.withLabel." - + "negative.header") } - popupContentPositive={ t("applications:URLInput.withLabel." - + "positive.content", { productName: config.ui.productName }) } - popupContentNegative={ t("applications:URLInput.withLabel." - + "negative.content", { productName: config.ui.productName }) } - popupDetailedContentPositive={ t("applications:URLInput." - + "withLabel.positive.detailedContent.0") } - popupDetailedContentNegative={ t("applications:URLInput." - + "withLabel.negative.detailedContent.0") } - insecureURLDescription={ t("console:common.validations.inSecureURL.description") } - showLessContent={ t("common:showLess") } - showMoreContent={ t("common:showMore") } - /> - - { t("applications:forms.inboundSAML.sections" + - ".idpInitiatedSLO.fields.returnToURLs.hint") - } - + if (!URLUtils.isHttpUrl(value) && !URLUtils.isHttpsUrl(value)) { + label = ( + + ); + } + + if (!URLUtils.isMobileDeepLink(value)) { + return false; + } + + setReturnToURLsErrorLabel(label); + + return true; + } } + showError={ returnToURLSError } + setShowError={ setReturnToURLSError } + disabled={ !isIdpInitiatedSingleLogoutEnabled || !isSingleLogoutProfileEnabled } + readOnly={ readOnly } + addURLTooltip={ t("common:addURL") } + duplicateURLErrorMessage={ t("common:duplicateURLError") } + data-testid={ `${ testId }-return-to-urls-input` } + showPredictions={ false } + customLabel={ returnToURLsErrorLabel } + popupHeaderPositive={ t("applications:URLInput.withLabel." + + "positive.header") } + popupHeaderNegative={ t("applications:URLInput.withLabel." + + "negative.header") } + popupContentPositive={ t("applications:URLInput.withLabel." + + "positive.content", { productName: config.ui.productName }) } + popupContentNegative={ t("applications:URLInput.withLabel." + + "negative.content", { productName: config.ui.productName }) } + popupDetailedContentPositive={ t("applications:URLInput." + + "withLabel.positive.detailedContent.0") } + popupDetailedContentNegative={ t("applications:URLInput." + + "withLabel.negative.detailedContent.0") } + insecureURLDescription={ + t("console:common.validations.inSecureURL.description") } + showLessContent={ t("common:showLess") } + showMoreContent={ t("common:showMore") } + /> + + { t("applications:forms.inboundSAML.sections" + + ".idpInitiatedSLO.fields.returnToURLs.hint") + } + + + { /* Assertion Query/Request Profile */ } { diff --git a/features/admin.template-core.v1/components/form-dynamic-field.scss b/features/admin.template-core.v1/components/form-dynamic-field.scss new file mode 100644 index 00000000000..8baa3aac559 --- /dev/null +++ b/features/admin.template-core.v1/components/form-dynamic-field.scss @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * 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. + */ + + .dynamic-template-selection-field { + .oxygen-form-control { + margin-top: 0; + margin-bottom: 0; + + .oxygen-input-label { + margin-top: 0; + margin-left: 0; + position: relative; + transform: unset; + -webkit-transform: unset; + } + + .oxygen-select { + margin-top: 8px; + margin-bottom: 4px; + } + + .oxygen-form-helper-text { + margin-top: 3px; + margin-left: 0; + margin-right: 0; + } + } + } + + .dynamic-template-selection-field-dropdown { + &.MuiPopover-root { + z-index: 1500; + filter: unset !important; + } + } diff --git a/features/admin.template-core.v1/components/form-dynamic-field.tsx b/features/admin.template-core.v1/components/form-dynamic-field.tsx index f60d7f4f594..9493d804873 100644 --- a/features/admin.template-core.v1/components/form-dynamic-field.tsx +++ b/features/admin.template-core.v1/components/form-dynamic-field.tsx @@ -18,15 +18,24 @@ import { getCertificateIllustrations } from "@wso2is/admin.core.v1"; import { IdentifiableComponentInterface } from "@wso2is/core/models"; -import { CheckboxFieldAdapter, FilePickerAdapter, FinalFormField, FormApi, TextFieldAdapter } from "@wso2is/form"; +import { + CheckboxFieldAdapter, + FilePickerAdapter, + FinalFormField, + FormApi, + SelectFieldAdapter, + TextFieldAdapter +} from "@wso2is/form"; import { Hint } from "@wso2is/react-components"; import React, { FunctionComponent, PropsWithChildren, ReactElement } from "react"; import { Icon } from "semantic-ui-react"; import { + DynamicDropdownFieldInterface, DynamicFieldInterface, DynamicFilePickerFieldInterface, DynamicInputFieldTypes } from "../models/dynamic-fields"; +import "./form-dynamic-field.scss"; /** * Prop types for the dynamic input fields. @@ -139,6 +148,38 @@ export const FormDynamicField: FunctionComponent ); + case DynamicInputFieldTypes.SELECT: + return ( +
+ + { field?.helperText } + + ) : null + } + /> +
+ ); case DynamicInputFieldTypes.FILE: return (