diff --git a/.github/workflows/release-note-update.yml b/.github/workflows/release-note-update.yml index 40030f1a07..1c3fbd6c1c 100644 --- a/.github/workflows/release-note-update.yml +++ b/.github/workflows/release-note-update.yml @@ -21,6 +21,8 @@ jobs: steps: - name: checks out repository to $GITHUB_WORKSPACE uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup NodeJS uses: actions/setup-node@v1 @@ -48,6 +50,7 @@ jobs: with: repository: ${{ env.DOC_REPO }} path: ${{ env.DOC_CLONE_PATH }} + fetch-depth: 0 - name: Run update doc script run: | diff --git a/packages/aml-checklist/src/tests/badges/badge-functions.svg b/packages/aml-checklist/src/tests/badges/badge-functions.svg index 58dc91e959..3b45d7a57b 100644 --- a/packages/aml-checklist/src/tests/badges/badge-functions.svg +++ b/packages/aml-checklist/src/tests/badges/badge-functions.svg @@ -1 +1 @@ -Coverage:functionsCoverage:functions73.01%73.01% \ No newline at end of file +Coverage:functionsCoverage:functions73.36%73.36% \ No newline at end of file diff --git a/packages/aml-checklist/src/tests/badges/badge-lines.svg b/packages/aml-checklist/src/tests/badges/badge-lines.svg index ec0d9e9dce..840876956e 100644 --- a/packages/aml-checklist/src/tests/badges/badge-lines.svg +++ b/packages/aml-checklist/src/tests/badges/badge-lines.svg @@ -1 +1 @@ -Coverage:linesCoverage:lines86.56%86.56% \ No newline at end of file +Coverage:linesCoverage:lines86.79%86.79% \ No newline at end of file diff --git a/packages/aml-checklist/src/tests/badges/badge-statements.svg b/packages/aml-checklist/src/tests/badges/badge-statements.svg index 78a637ff89..3a7b973bff 100644 --- a/packages/aml-checklist/src/tests/badges/badge-statements.svg +++ b/packages/aml-checklist/src/tests/badges/badge-statements.svg @@ -1 +1 @@ -Coverage:statementsCoverage:statements86.08%86.08% \ No newline at end of file +Coverage:statementsCoverage:statements86.3%86.3% \ No newline at end of file diff --git a/packages/elements/src/components/DatePicker/index.tsx b/packages/elements/src/components/DatePicker/index.tsx index 020c20159c..8a47d05038 100644 --- a/packages/elements/src/components/DatePicker/index.tsx +++ b/packages/elements/src/components/DatePicker/index.tsx @@ -181,7 +181,7 @@ export const DatePicker = ({ const className = hasError ? 'input is-danger' : 'input is-primary' return ( -
+
{labelText && ( )} - {helperText &&

{helperText}

} + {helperText && (React.isValidElement(helperText) ? helperText :

{helperText}

)} `; diff --git a/packages/elements/src/components/Modal/index.tsx b/packages/elements/src/components/Modal/index.tsx index 87ef5a1c0c..1960cbebb9 100644 --- a/packages/elements/src/components/Modal/index.tsx +++ b/packages/elements/src/components/Modal/index.tsx @@ -39,6 +39,7 @@ export const ModalHeader: React.SFC = ({ title, afterClose }) className="delete" aria-label="close" data-test="modal-close-button" + type="button" onClick={event => { event.preventDefault() afterClose && afterClose() diff --git a/packages/elements/src/styles/base/layout.scss b/packages/elements/src/styles/base/layout.scss index a72b0a77b4..7df7746e4b 100644 --- a/packages/elements/src/styles/base/layout.scss +++ b/packages/elements/src/styles/base/layout.scss @@ -14,4 +14,5 @@ $layout-quadruple: calc(1rem * 4); $layout-sextuple: calc(1rem * 6); $menu-width: 250px; -$page-container: calc(100vw - 250px); \ No newline at end of file +$nav-bar-width: 66px; +$page-container: calc(100vw - 250px); diff --git a/packages/elements/src/styles/base/utilities.scss b/packages/elements/src/styles/base/utilities.scss index 50c8cfa08c..9906505703 100644 --- a/packages/elements/src/styles/base/utilities.scss +++ b/packages/elements/src/styles/base/utilities.scss @@ -7,6 +7,10 @@ $units: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; flex-grow: $unit; } + .flex-shrink-#{$unit} { + flex-shrink: $unit; + } + .text-ellipsis-#{$unit} { display: -webkit-box; -webkit-line-clamp: 1; diff --git a/packages/elements/src/styles/components/table.scss b/packages/elements/src/styles/components/table.scss index fcf6311dcb..89d443406a 100644 --- a/packages/elements/src/styles/components/table.scss +++ b/packages/elements/src/styles/components/table.scss @@ -7,6 +7,7 @@ & td { word-break: normal; max-width: 300px; + overflow-wrap: break-word; } tr { &.is-expanded { diff --git a/packages/elements/src/styles/components/toast.scss b/packages/elements/src/styles/components/toast.scss index caa67f9f08..d77a109d66 100644 --- a/packages/elements/src/styles/components/toast.scss +++ b/packages/elements/src/styles/components/toast.scss @@ -1,4 +1,5 @@ @import '../base/layout.scss'; +@import '../base/browser.scss'; .toast { width: 100%; @@ -18,6 +19,11 @@ -webkit-transform: translateY(-$layout-base); } + @include for-ie-only { + width: inherit; + left: $nav-bar-width; + } + button { white-space: unset; } diff --git a/packages/elements/src/styles/vendor/bulma-overrides.scss b/packages/elements/src/styles/vendor/bulma-overrides.scss index a844932c4c..09c937c687 100644 --- a/packages/elements/src/styles/vendor/bulma-overrides.scss +++ b/packages/elements/src/styles/vendor/bulma-overrides.scss @@ -112,7 +112,8 @@ html { } } -.field, .field:not(:last-child) { +.field, +.field:not(:last-child) { margin-bottom: 0.75rem; } @@ -168,9 +169,11 @@ html { } .control { - .label, i { + .label, + i { color: $grey; } + &.has-icons-right, &.has-icons-left { .icon { @@ -284,9 +287,13 @@ a { } &.is-page-container { - // to allow scroll past end of content, allowing for toast popup and + // to allow scroll past end of content, allowing for toast popup and // increase readability, especially in mobile - margin-bottom: 6rem; + // Need to use "padding-bottom" here because "margin-bottom" doesn't work on IE + padding-bottom: 6rem; + // Fix IE flex columns height bug + // https://stackoverflow.com/a/36900208 + flex-shrink: 0; } } @@ -294,9 +301,14 @@ a { font-family: $title-family; } +.modal-card { + overflow: auto; +} + .modal-card, .modal-content { margin: 0 auto; + .modal-card { @media screen and (max-width: 768px) { max-height: calc(100vh - 160px); diff --git a/packages/elements/src/tests/badges/badge-branches.svg b/packages/elements/src/tests/badges/badge-branches.svg index e5cde05d0b..2c0fafd5e1 100644 --- a/packages/elements/src/tests/badges/badge-branches.svg +++ b/packages/elements/src/tests/badges/badge-branches.svg @@ -1 +1 @@ -Coverage:branchesCoverage:branches76.54%76.54% +Coverage:branchesCoverage:branches76.54%76.54% \ No newline at end of file diff --git a/packages/elements/src/tests/badges/badge-lines.svg b/packages/elements/src/tests/badges/badge-lines.svg index 066a599791..8abe5c7a74 100644 --- a/packages/elements/src/tests/badges/badge-lines.svg +++ b/packages/elements/src/tests/badges/badge-lines.svg @@ -1 +1 @@ -Coverage:linesCoverage:lines95.12%95.12% +Coverage:linesCoverage:lines95.22%95.22% \ No newline at end of file diff --git a/packages/elements/src/tests/badges/badge-statements.svg b/packages/elements/src/tests/badges/badge-statements.svg index 3644494653..dbccb30666 100644 --- a/packages/elements/src/tests/badges/badge-statements.svg +++ b/packages/elements/src/tests/badges/badge-statements.svg @@ -1 +1 @@ -Coverage:statementsCoverage:statements94.84%94.84% +Coverage:statementsCoverage:statements94.95%94.95% \ No newline at end of file diff --git a/packages/elements/src/utils/validators/error-messages.ts b/packages/elements/src/utils/validators/error-messages.ts index d9268f5898..83052a7650 100644 --- a/packages/elements/src/utils/validators/error-messages.ts +++ b/packages/elements/src/utils/validators/error-messages.ts @@ -10,7 +10,7 @@ const errorMessages = { FIELD_INVALID_PASSWORD: 'Your Password should be a minimum of 8 characters; ' + 'must contain at least one lowercase letter, one uppercase letter and one number.', - FIELD_WRONG_URI_FORMAT: 'Invalid uri format', + FIELD_WRONG_URI_FORMAT: 'Invalid URI format', MINIMUM_CHARACTER_LENGTH: minCharLengthErrMessage, MAXIMUM_CHARACTER_LENGTH: maxCharLengthErrMessage, } diff --git a/packages/foundations-ts-definitions/types/marketplace-api-schema.ts b/packages/foundations-ts-definitions/types/marketplace-api-schema.ts index 2f9fe9857e..616a0c77e7 100644 --- a/packages/foundations-ts-definitions/types/marketplace-api-schema.ts +++ b/packages/foundations-ts-definitions/types/marketplace-api-schema.ts @@ -369,6 +369,80 @@ export interface CategoryModel { */ readonly links?: LinkModel[] } +/** + * Model to expose company address info + */ +export interface CompanyAddressModel { + /** + * The building name + */ + buildingName?: string + /** + * The building number + */ + buildingNumber?: string + /** + * The first line of the address + */ + line1?: string + /** + * The second line of the address + */ + line2?: string + /** + * The third line of the address + */ + line3?: string + /** + * The fourth line of the address + */ + line4?: string + /** + * The postcode + */ + postcode?: string + /** + * The ISO-3166 country code that the address resides within + */ + countryId?: string +} +/** + * Request body used to set the address details + */ +export interface CreateAddressModel { + /** + * The building name + */ + buildingName?: string + /** + * The building number + */ + buildingNumber?: string + /** + * The first line of the address + */ + line1?: string + /** + * The second line of the address + */ + line2?: string + /** + * The third line of the address + */ + line3?: string + /** + * The fourth line of the address + */ + line4?: string + /** + * The postcode + */ + postcode?: string + /** + * The ISO-3166 country code that the address resides within + */ + countryId?: string +} /** * The model responsible for creation of an app definition */ @@ -629,7 +703,27 @@ export interface CreateDeveloperModel { /** * Sets the date the developer agreed to the terms */ - readonly agreedTerms?: string // date-time + agreedTerms?: string // date-time + /** + * Sets a brief description for the developers organisation + */ + about?: string + /** + * Sets the website of the developers organisation + */ + website?: string + /** + * Sets the tax number of the developers organisation + */ + taxNumber?: string + /** + * Sets the registration number of the developers organisation + */ + registrationNumber?: string + /** + * Sets the address of the developers organisation + */ + companyAddress?: CreateAddressModel } /** * The model responsible for creation of an installation between a specific client and app @@ -703,49 +797,85 @@ export interface DesktopIntegrationTypeModel { */ export interface DeveloperModel { /** - * Gets the id of this developer + * The id of this developer */ - readonly id?: string // uuid + id?: string // uuid /** - * Gets the id of this developer held in the gateway + * The id of this developer held in the gateway */ - readonly externalId?: string + externalId?: string /** - * Gets the full name of this developer + * The full name of this developer */ - readonly name?: string + name?: string /** - * Gets the company to which this developer is acting on behalf of + * The company to which this developer is acting on behalf of */ - readonly company?: string + company?: string /** - * Gets the job title for this developer + * The job title for this developer */ - readonly jobTitle?: string + jobTitle?: string /** - * Gets the email address of the developer + * The email address of the developer */ - readonly email?: string + email?: string /** - * Gets the telephone number of the developer + * The telephone number of the developer */ - readonly telephone?: string + telephone?: string /** - * Gets the date the developer agreed to the terms + * The date the developer agreed to the terms */ - readonly agreedTerms?: string // date-time + agreedTerms?: string // date-time /** - * Gets the flag determining if the developer is inactive + * The flag determining if the developer is inactive */ isInactive?: boolean /** - * Gets the timestamp of entity creation + * A brief description of the developers organisation */ - readonly created?: string // date-time + about?: string /** - * Gets the timestamp of entity modification + * The website for the developers organisation */ - readonly modified?: string // date-time + website?: string + /** + * The tax number of the developers organisation + */ + taxNumber?: string + /** + * The registration number of the developers organisation + */ + registrationNumber?: string + /** + * The email of the accounts department for the developer + */ + billingEmail?: string + /** + * The telephone number for the accounts department for the developer + */ + billingTelephone?: string + /** + * The name of the member of staff dealing with billing + */ + billingKeyContact?: string + /** + * The reapit account reference used for this company + */ + reapitReference?: string + /** + * The timestamp of entity creation + */ + created?: string // date-time + /** + * The timestamp of entity modification + */ + modified?: string // date-time + /** + * The address of the developers organisation + */ + companyAddress?: CompanyAddressModel /** * Gets the links associated to this model */ @@ -1047,6 +1177,43 @@ export interface TerminateInstallationModel { */ terminatesOn?: string // date-time } +/** + * Request body used to set the address details + */ +export interface UpdateAddressModel { + /** + * The building name + */ + buildingName?: string + /** + * The building number + */ + buildingNumber?: string + /** + * The first line of the address + */ + line1?: string + /** + * The second line of the address + */ + line2?: string + /** + * The third line of the address + */ + line3?: string + /** + * The fourth line of the address + */ + line4?: string + /** + * The postcode + */ + postcode?: string + /** + * The ISO-3166 country code that the address resides within + */ + countryId?: string +} /** * The model responsible for updating a desktop integration type */ @@ -1092,4 +1259,40 @@ export interface UpdateDeveloperModel { * Sets the flag specifying if the developer is inactive */ isInactive?: boolean + /** + * Sets a brief description for the developers organisation + */ + about?: string + /** + * Sets the website of the developers organisation + */ + website?: string + /** + * Sets the tax number of the developers organisation + */ + taxNumber?: string + /** + * Sets the registration number of the developers organisation + */ + registrationNumber?: string + /** + * Sets the email of the accounts department for the developer + */ + billingEmail?: string + /** + * Sets the telephone number for the accounts department for the developer + */ + billingTelephone?: string + /** + * Sets the name of the member of staff dealing with billing + */ + billingKeyContact?: string + /** + * Sets reapits account reference used for this company + */ + reapitReference?: string + /** + * Sets the address of the developers organisation + */ + companyAddress?: UpdateAddressModel } diff --git a/packages/geo-diary-v2/src/components/pages/login/__styles__/index.ts b/packages/geo-diary-v2/src/components/pages/login/__styles__/index.ts index e51608c49a..8aa3aa2145 100644 --- a/packages/geo-diary-v2/src/components/pages/login/__styles__/index.ts +++ b/packages/geo-diary-v2/src/components/pages/login/__styles__/index.ts @@ -1,5 +1,4 @@ import { css } from 'linaria' -import { white } from '@/core/__styles__' export const loginPageContainer = css` min-width: 100vw; @@ -8,7 +7,6 @@ export const loginPageContainer = css` justify-content: flex-end; align-items: center; flex-direction: row; - background-color: ${white}; @media screen and (max-width: 900px) { flex-direction: column-reverse; @@ -16,7 +14,6 @@ export const loginPageContainer = css` ` export const loginPageFormContainer = css` - background-color: ${white}; width: 33.33%; padding: 1rem; pointer-events: auto; diff --git a/packages/marketplace/src/actions/submit-app.ts b/packages/marketplace/src/actions/submit-app.ts index 11e51d2b17..3abc6a7024 100644 --- a/packages/marketplace/src/actions/submit-app.ts +++ b/packages/marketplace/src/actions/submit-app.ts @@ -13,7 +13,7 @@ export type CustomCreateAppModel = Pick & + Pick & Pick, 'setErrors' | 'setFieldValue'> export type WizardChangeStepModel = { diff --git a/packages/marketplace/src/actions/submit-revision.ts b/packages/marketplace/src/actions/submit-revision.ts index 1831917771..24269323fe 100644 --- a/packages/marketplace/src/actions/submit-revision.ts +++ b/packages/marketplace/src/actions/submit-revision.ts @@ -2,7 +2,11 @@ import { actionCreator } from '../utils/actions' import ActionTypes from '../constants/action-types' import { CreateAppRevisionModel } from '@reapit/foundations-ts-definitions' -export const submitRevision = actionCreator( - ActionTypes.DEVELOPER_SUBMIT_REVISION, -) +export type SubmitRevisionParams = { + params: CreateAppRevisionModel & { id: string } + onSuccess: () => void + onError: () => void +} + +export const submitRevision = actionCreator(ActionTypes.DEVELOPER_SUBMIT_REVISION) export const submitRevisionSetFormState = actionCreator(ActionTypes.DEVELOPER_SUBMIT_REVISION_SET_FORM_STATE) diff --git a/packages/marketplace/src/assets/files/developer-edition-guide.pdf b/packages/marketplace/src/assets/files/developer-edition-guide.pdf new file mode 100644 index 0000000000..db9c0bf388 Binary files /dev/null and b/packages/marketplace/src/assets/files/developer-edition-guide.pdf differ diff --git a/packages/marketplace/src/assets/files/foundation-pricing-0720.pdf b/packages/marketplace/src/assets/files/foundation-pricing-0720.pdf new file mode 100644 index 0000000000..fe87b1dae1 Binary files /dev/null and b/packages/marketplace/src/assets/files/foundation-pricing-0720.pdf differ diff --git a/packages/marketplace/src/assets/images/developer-desktop/video-clip.jpg b/packages/marketplace/src/assets/images/developer-desktop/video-clip.jpg deleted file mode 100644 index e012dc6f60..0000000000 Binary files a/packages/marketplace/src/assets/images/developer-desktop/video-clip.jpg and /dev/null differ diff --git a/packages/marketplace/src/components/pages/__tests__/__snapshots__/developer-help.test.tsx.snap b/packages/marketplace/src/components/pages/__tests__/__snapshots__/developer-help.test.tsx.snap index c1b0a5f06a..86a6105e31 100644 --- a/packages/marketplace/src/components/pages/__tests__/__snapshots__/developer-help.test.tsx.snap +++ b/packages/marketplace/src/components/pages/__tests__/__snapshots__/developer-help.test.tsx.snap @@ -63,7 +63,7 @@ exports[`DeveloperHelpPage should match a snapshot 1`] = ` "buttonText": "START CHAT", "header": "Need Help?", "imgSrc": "", - "text": "If you need any support, we are here to help. Why not talk to one of our Developers or Product Owners directly.", + "text": "If you have a question that is not covered in the documentation you can ask here. Please note we don’t provide chat support for Agency Cloud Developer Edition.", }, Object { "buttonOnClick": [Function], @@ -104,7 +104,9 @@ exports[`DeveloperHelpPage should match a snapshot 1`] = ` className="" data-test="" > - +
- +
- +
- +
- +
- If you need any support, we are here to help. Why not talk to one of our Developers or Product Owners directly. + If you have a question that is not covered in the documentation you can ask here. Please note we don’t provide chat support for Agency Cloud Developer Edition.
- +
- - - - + + + + + + +
@@ -3147,16 +3156,20 @@ exports[`admin-apps renderForm should return correctly 1`] = ` - Search - - - Refresh + + Search + + + Refresh + diff --git a/packages/marketplace/src/components/pages/admin-apps/admin-apps.tsx b/packages/marketplace/src/components/pages/admin-apps/admin-apps.tsx index 87d6be8c02..8b5a1481e6 100644 --- a/packages/marketplace/src/components/pages/admin-apps/admin-apps.tsx +++ b/packages/marketplace/src/components/pages/admin-apps/admin-apps.tsx @@ -21,6 +21,7 @@ import { toLocalTime, isEmptyObject, Section, + LevelRight, } from '@reapit/elements' import { selectAdminAppsData, selectAdminAppsLoading } from '@/selector/admin' import { adminAppsRequestFeatured } from '@/actions/admin-apps' @@ -185,12 +186,14 @@ export const renderForm = ({ values, status }) => { /> - - + + + + {status &&

{status}

} diff --git a/packages/marketplace/src/components/pages/admin-dev-management/__tests__/__snapshots__/admin-dev-management.test.tsx.snap b/packages/marketplace/src/components/pages/admin-dev-management/__tests__/__snapshots__/admin-dev-management.test.tsx.snap index f67d5d8d7e..68a8097af3 100644 --- a/packages/marketplace/src/components/pages/admin-dev-management/__tests__/__snapshots__/admin-dev-management.test.tsx.snap +++ b/packages/marketplace/src/components/pages/admin-dev-management/__tests__/__snapshots__/admin-dev-management.test.tsx.snap @@ -239,7 +239,7 @@ exports[`AdminDevManagement should match a snapshot when LOADING false 1`] = ` name="registeredFrom" reactDatePickerProps={ Object { - "maxDate": 2019-10-09T22:39:51.389Z, + "maxDate": 2019-10-10T22:39:51.389Z, } } > @@ -248,7 +248,7 @@ exports[`AdminDevManagement should match a snapshot when LOADING false 1`] = ` validate={null} >
= ({ appDetailData }) => { const { summary = '', description = '', scopes = [], media = [] } = appDetailData return ( - +
- +
) } diff --git a/packages/marketplace/src/components/pages/app-detail/developer/__tests__/__snapshots__/developer-app-content.test.tsx.snap b/packages/marketplace/src/components/pages/app-detail/developer/__tests__/__snapshots__/developer-app-content.test.tsx.snap index 0b7c6ad544..2f92d28273 100644 --- a/packages/marketplace/src/components/pages/app-detail/developer/__tests__/__snapshots__/developer-app-content.test.tsx.snap +++ b/packages/marketplace/src/components/pages/app-detail/developer/__tests__/__snapshots__/developer-app-content.test.tsx.snap @@ -57,10 +57,14 @@ exports[`AppContent AppContent - should match snapshoot 1`] = ` } > -
-
+
diff --git a/packages/marketplace/src/components/pages/app-detail/developer/developer-app-content.tsx b/packages/marketplace/src/components/pages/app-detail/developer/developer-app-content.tsx index 662a368e3d..77421fcf06 100644 --- a/packages/marketplace/src/components/pages/app-detail/developer/developer-app-content.tsx +++ b/packages/marketplace/src/components/pages/app-detail/developer/developer-app-content.tsx @@ -4,7 +4,7 @@ import { Dispatch } from 'redux' import { GET_ALL_PAGE_SIZE } from '@/constants/paginator' import { appInstallationsRequestData } from '@/actions/app-installations' import { selectDeveloperId } from '@/selector' -import { FlexContainerBasic, Button, DATE_TIME_FORMAT } from '@reapit/elements' +import { Button, DATE_TIME_FORMAT, Section } from '@reapit/elements' import ConfirmUninstall from '@/components/ui/app-installations/confirm-uninstall' import { PagedResultInstallationModel_, InstallationModel } from '@reapit/foundations-ts-definitions' import { handleUninstall, handleAfterClose } from '@/components/ui/app-installations/app-installations-modal' @@ -111,7 +111,7 @@ const AppContent: React.FC = ({ appDetailState }) => { const isVisibleUninstallModal = Boolean(uninstallApp) return ( - +
{isVisibleUninstallModal && ( = ({ appDetailState }) => { - +
) } diff --git a/packages/marketplace/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap b/packages/marketplace/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap index 859d039b70..716a909317 100644 --- a/packages/marketplace/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap +++ b/packages/marketplace/src/components/pages/authentication/__test__/__snapshots__/authentication.test.tsx.snap @@ -18,23 +18,22 @@ exports[`Authentication renderClientModal should match snapshot 1`] = ` } tapOutsideToDissmiss={false} - title="Agency Cloud User Licence?" + title="Agency Cloud User License?" visible={true} >

- You do not currently have an Agency Cloud User License so you can't visit the Reapit Marketplace, - if you would like more information on Agency Cloud please visit + To access the Reapit Marketplace, you will need to have an Agency Cloud User License. To obtain a license, please visit the  - - our public site. - + Desktop + - Alternatively, if you are a developer on the Reapit Platfom, one of your clients may be willing to sponsor with a paid user license. +  page within the Developers Portal, where you can subscribe to a Developer Edition of Agency Cloud.

diff --git a/packages/marketplace/src/components/pages/authentication/__test__/authentication.test.tsx b/packages/marketplace/src/components/pages/authentication/__test__/authentication.test.tsx index 776cd2f366..f1d1969d94 100644 --- a/packages/marketplace/src/components/pages/authentication/__test__/authentication.test.tsx +++ b/packages/marketplace/src/components/pages/authentication/__test__/authentication.test.tsx @@ -74,7 +74,7 @@ describe('Authentication', () => { it('should run correctly', () => { const fn = onDevelopersButtonClick(history) fn() - expect(history.replace).toBeCalledWith(Routes.DEVELOPER_MY_APPS) + expect(history.replace).toBeCalledWith(Routes.DEVELOPER_DESKTOP) }) }) }) diff --git a/packages/marketplace/src/components/pages/authentication/authentication.tsx b/packages/marketplace/src/components/pages/authentication/authentication.tsx index 5015f6cf74..d5923e3ee8 100644 --- a/packages/marketplace/src/components/pages/authentication/authentication.tsx +++ b/packages/marketplace/src/components/pages/authentication/authentication.tsx @@ -2,6 +2,7 @@ import * as React from 'react' import { Dispatch } from 'redux' import { History } from 'history' import { useHistory, useParams } from 'react-router' +import { Link } from 'react-router-dom' import { useDispatch } from 'react-redux' import { Modal, Button } from '@reapit/elements' import Routes from '@/constants/routes' @@ -16,7 +17,7 @@ export interface AuthenticationParamTypes { export const onDevelopersButtonClick = (history: History) => { return () => { - history.replace(Routes.DEVELOPER_MY_APPS) + history.replace(Routes.DEVELOPER_DESKTOP) } } @@ -41,7 +42,7 @@ export const onLogoutButtonClick = (dispatch: Dispatch) => { export const renderClientModal = (history, dispatch) => { return ( { >

- {`You do not currently have an Agency Cloud User License so you can't visit the Reapit Marketplace, - if you would like more information on Agency Cloud please visit `} + To access the Reapit Marketplace, you will need to have an Agency Cloud User License. To obtain a license, + please visit the  - our public site. + Desktop - Alternatively, if you are a developer on the Reapit Platfom, one of your clients may be willing to sponsor - with a paid user license. +  page within the Developers Portal, where you can subscribe to a Developer Edition of Agency Cloud.

diff --git a/packages/marketplace/src/components/pages/client/__tests__/__snapshots__/client.test.tsx.snap b/packages/marketplace/src/components/pages/client/__tests__/__snapshots__/client.test.tsx.snap index b9e8c7d97e..6e18320843 100644 --- a/packages/marketplace/src/components/pages/client/__tests__/__snapshots__/client.test.tsx.snap +++ b/packages/marketplace/src/components/pages/client/__tests__/__snapshots__/client.test.tsx.snap @@ -62,11 +62,15 @@ exports[`Client should match a snapshot when LOADING false 1`] = ` errorThrownComponent={[Function]} > -
-
+
@@ -151,11 +155,15 @@ exports[`Client should match a snapshot when LOADING false 2`] = ` errorThrownComponent={[Function]} > -
-
+
@@ -240,11 +248,15 @@ exports[`Client should match a snapshot when featured apps is empty [] 1`] = ` errorThrownComponent={[Function]} > -
-
+
@@ -405,11 +417,15 @@ exports[`Client should match a snapshot when featured apps is null 1`] = ` errorThrownComponent={[Function]} > -
-
+
diff --git a/packages/marketplace/src/components/pages/client/client.tsx b/packages/marketplace/src/components/pages/client/client.tsx index dc570a48c5..a29d581f03 100644 --- a/packages/marketplace/src/components/pages/client/client.tsx +++ b/packages/marketplace/src/components/pages/client/client.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { History } from 'history' import { useSelector } from 'react-redux' -import { Loader, FlexContainerBasic, H3, GridThreeColItem, Grid, Pagination } from '@reapit/elements' +import { Loader, Section, H3, GridThreeColItem, Grid, Pagination } from '@reapit/elements' import ErrorBoundary from '@/components/hocs/error-boundary' import { useHistory, useLocation } from 'react-router' import AppList from '@/components/ui/app-list' @@ -49,7 +49,7 @@ export const Client: React.FunctionComponent = () => { return ( - +
{/* */} {unfetched || loading ? ( @@ -90,7 +90,7 @@ export const Client: React.FunctionComponent = () => { /> )} - +
) } diff --git a/packages/marketplace/src/components/pages/developer-desktop/__styles__/pricing-tile.tsx b/packages/marketplace/src/components/pages/developer-desktop/__styles__/pricing-tile.tsx new file mode 100644 index 0000000000..13b2430813 --- /dev/null +++ b/packages/marketplace/src/components/pages/developer-desktop/__styles__/pricing-tile.tsx @@ -0,0 +1,34 @@ +import { css } from 'linaria' + +export const developerDesktopPricingTile = css` + .modal-card-head { + justify-content: center; + + h5 { + font-weight: normal; + } + } + + .desktop-inner-container { + margin: 0; + border: 1px solid #dbdbdb; + + @media (min-width: 1200px) { + margin: 1rem; + } + + @media (min-width: 1400px) { + margin: 0 3rem; + } + } + + .desktop-price { + font-size: 2.5rem; + font-weight: bold; + } + + .desktop-price-period { + font-size: 1.6rem; + color: #74818d; + } +` diff --git a/packages/marketplace/src/components/pages/developer-desktop/__tests__/__snapshots__/developer-desktop.tsx.snap b/packages/marketplace/src/components/pages/developer-desktop/__tests__/__snapshots__/developer-desktop.tsx.snap index 419f5f8514..b620ff5bf8 100644 --- a/packages/marketplace/src/components/pages/developer-desktop/__tests__/__snapshots__/developer-desktop.tsx.snap +++ b/packages/marketplace/src/components/pages/developer-desktop/__tests__/__snapshots__/developer-desktop.tsx.snap @@ -1,37 +1,214 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DeveloperDesktopPage should match snapshot 1`] = ` - - - + + + + +

+ Desktop +

+
+ +
+ + +
+

+ Reapit's Agency Cloud is a desktop application that offers estate agencies a comprehensive range of market leading agency products, including a Sales CRM, Lettings CRM, Client Accounts, Property Management and real-time Analytics. +

+

+ Developers that would like to integrate with or extend the functionality of Agency Cloud can use the Foundations Desktop API to build web applications for Reapit's app Marketplace that trigger events in the Agency Cloud desktop application, as well as associating their apps with common actions in Agency Cloud to replace default behaviours and screens. +

+

+ For example, a developer building a Marketplace app that provides AML and ID checking, can use the Desktop API to associate their app with the default ID checking screen in Agency Cloud. When a customer clicks the default button to launch the ID check screen, the developer's associated app would be presented instead. +

+

+ To learn more about what’s possible with the Desktop API, please visit the + + + documentation. + +

+
+
+
+
+
+ +
+ + +
+ +
+ +
+ +
+ Developer Edition +
+
+

+ The Developer Edition of Agency Cloud allows developers using the Desktop API to test their apps within the desktop application using sandbox data. +

+

+ There is no charge for the Developer Edition licence during the Beta phase, however, developers are required to confirm the subscription to proceed. When the Beta phase comes to an end, we will automatically cancel all subscriptions, and developers will need to sign-up again should they wish to subscribe and pay for a Developer Edition license. +

+

+ The application is licenced per user/developer of an organisation and will require a Windows machine to install it. +

+
+
+ +
+
+
+
+ +
+ Developer Edition +
+
+
+
+ + £0 + +   + + / Beta phase + +
+
+ Become familiar with our CRM software using sandbox data +
+
+ Test your Marketplace application inside Agency Cloud +
+
+ Understand how customers will interact with your application +
+ +
+ + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+ `; diff --git a/packages/marketplace/src/components/pages/developer-desktop/__tests__/developer-desktop.tsx b/packages/marketplace/src/components/pages/developer-desktop/__tests__/developer-desktop.tsx index afb93e36a8..606db34350 100644 --- a/packages/marketplace/src/components/pages/developer-desktop/__tests__/developer-desktop.tsx +++ b/packages/marketplace/src/components/pages/developer-desktop/__tests__/developer-desktop.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { shallow } from 'enzyme' +import { mount } from 'enzyme' import { Provider } from 'react-redux' import configureStore from 'redux-mock-store' import appState from '@/reducers/__stubs__/app-state' @@ -17,7 +17,7 @@ describe('DeveloperDesktopPage', () => { }) it('should match snapshot', () => { - const wrapper = shallow( + const wrapper = mount( , diff --git a/packages/marketplace/src/components/pages/developer-desktop/developer-desktop-content.tsx b/packages/marketplace/src/components/pages/developer-desktop/developer-desktop-content.tsx deleted file mode 100644 index fe3041c4ad..0000000000 --- a/packages/marketplace/src/components/pages/developer-desktop/developer-desktop-content.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import React from 'react' -import { H5, Grid, GridItem, Content, Section } from '@reapit/elements' -import VideoClip from '@/assets/images/developer-desktop/video-clip.jpg' - -export const DeveloperDesktopContentPartOne: React.FC = () => { - return ( - -
What is Reapit’s Agency Cloud Desktop CRM?
-

- Reapit’s Agency Cloud solution offers estate agencies a comprehensive range of market leading agency products, - with powerful features that will help an agency grow whilst improving overall efficiency. -

-
What is the Desktop API?
-

- Applications that are built on our Foundations Platform are able to communicate with Reapit's Agency Cloud - CRM system. Using a well-defined API, you are able to trigger a wide variety of actions in our award-winning - desktop application to augment your own applications and build a rich integration between systems. -

-
How does it work?
-

- Depending on what screens you want to launch and how you want to interact with Agency Cloud, you are able to use - a custom URL scheme which when triggered, Agency Cloud will interpret that action and perform the corresponding - action. -

-

For example, if you wanted to load a property record from your app you would follow the following format:

-
- {'agencycloud://properties/{id}'} -
-

- Another example would be if you wanted to load a property search with specific parameters, the URL scheme would - look something like this: -

-
- {'agencycloud://properties?address=MK43&mode=s'} -
-

- For more information on URL Schemes please visit the documentation  - - here - -

-
Agency Cloud Interaction API
-

- Not only can Applications built on the Foundations Platform trigger events in the Agency Cloud CRM system, but - installed apps can also be associated with common actions in Agency Cloud to replace the default behaviour. -

-

- The most common way that this will manifest itself is by replacing a screen in Agency Cloud with an application. - For example if you want to use an App to manage all of your AML and ID checking then you can associate the app - with this action in Agency Cloud and every time you click to launch the ID check screen, the associated App will - be presented instead. -

-

- All apps should be able to be launched from the Installed Apps screen and be ran standalone without the need to - be linked to an action. They will just be hosted in the marketplace and launched in Agency Cloud – for example - the Geo Diary application. -

- - -
Desktop Integration Types
-

- To be able to associate an application with an action in Agency Cloud the application will need to be given - a desktop type. This will be required so that Agency Cloud can be confident of the way the application will - behave and that the application is agreeing to accept certain parameters when launched. These parameters - will be available inside a global javascript object which is used to identify that a page is in{' '} - Desktop mode, example below. -

-
- {`window.__REAPIT_MARKETPLACE_GLOBALS__ = { - prpCode: 'MK010201' - }`} -
-

- We currently support several application types and we are continuing to build as apps are developed. To show - you an example, you can view the video below. It demonstrates an application that was built with a Desktop - Type of 'Property', this means that the application will be available whenever a user interacts with - a property: -

-

- More information on 'Desktop Integration Types', please visit the documentation  - - here - -

-
- -
- - - -
-
-
-
Developer Edition
-

- We understand the need to be able to test your application end to end and therefore have provided a Developer - Edition of Agency Cloud for you to download and test with Sandbox data. The application is licenced per - user/developer of your organisation and you will require a Windows machine to install it. -

-

- The application is licenced per user/developer of your organisation and you will require a  - Windows machine to install it. -

-

- During the Beta phase, there will be no charge for the Developer Edition licence. However, you will still be - required to confirm the subscription to proceed. If you would like further information on Agency Cloud, please - click here. -

-
- ) -} - -export const DeveloperDesktopContentPartTwo: React.FC = () => { - return ( - -
Support
-

- If you should need support with the Developer Edition or perhaps have a question regarding desktop types or URL - schemes, please first visit our desktop Milestone. You will be able to view and search any issues or requests - that have been raised. If you cannot find what you are looking for, please raise a  - - feature request - -  or  - - report a bug. - -

-
- ) -} diff --git a/packages/marketplace/src/components/pages/developer-desktop/developer-desktop.tsx b/packages/marketplace/src/components/pages/developer-desktop/developer-desktop.tsx index 5c883718d0..99d7ec9b9a 100644 --- a/packages/marketplace/src/components/pages/developer-desktop/developer-desktop.tsx +++ b/packages/marketplace/src/components/pages/developer-desktop/developer-desktop.tsx @@ -1,43 +1,113 @@ -import * as React from 'react' -import { H3, Button, Section } from '@reapit/elements' +import React from 'react' import ErrorBoundary from '@/components/hocs/error-boundary' +import { H5, Grid, GridItem, Content, Section, Button, H3 } from '@reapit/elements' +import Routes from '@/constants/routes' import DeveloperEditonModal from '@/components/ui/developer-edition-modal' -import { DeveloperDesktopContentPartOne, DeveloperDesktopContentPartTwo } from './developer-desktop-content' - -export type DeveloperDesktopPageProps = {} +import { developerDesktopPricingTile } from './__styles__/pricing-tile' export const handleToggleVisibleModal = ( setIsDeveloperEditionModalOpen: React.Dispatch, isVisible: boolean, ) => () => setIsDeveloperEditionModalOpen(isVisible) -export const DeveloperDesktopPage: React.FC = () => { - const [isDeveloperEditionModalOpen, setIsDeveloperEditionModalOpen] = React.useState(false) +export const DeveloperDesktopContentPartOne: React.FC = () => { + return ( + +

+ Reapit's Agency Cloud is a desktop application that offers estate agencies a comprehensive range of market + leading agency products, including a Sales CRM, Lettings CRM, Client Accounts, Property Management and real-time + Analytics. +

+

+ Developers that would like to integrate with or extend the functionality of Agency Cloud can use the Foundations + Desktop API to build web applications for Reapit's app Marketplace that trigger events in the Agency Cloud + desktop application, as well as associating their apps with common actions in Agency Cloud to replace default + behaviours and screens. +

+

+ For example, a developer building a Marketplace app that provides AML and ID checking, can use the Desktop API + to associate their app with the default ID checking screen in Agency Cloud. When a customer clicks the default + button to launch the ID check screen, the developer's associated app would be presented instead. +

+

+ To learn more about what’s possible with the Desktop API, please visit the{' '} + + documentation. + +

+
+ ) +} +export const DeveloperDesktopContentPartTwo: React.FC = () => { + const [isDeveloperEditionModalOpen, setIsDeveloperEditionModalOpen] = React.useState(false) return ( - -
-

Desktop

- -
-
- -
-
- -
+ + + +
Developer Edition
+

+ The Developer Edition of Agency Cloud allows developers using the Desktop API to test their apps within the + desktop application using sandbox data. +

+

+ There is no charge for the Developer Edition licence during the Beta phase, however, developers are required + to confirm the subscription to proceed. When the Beta phase comes to an end, we will automatically cancel + all subscriptions, and developers will need to sign-up again should they wish to subscribe and pay for a + Developer Edition license. +

+

+ The application is licenced per user/developer of an organisation and will require a Windows machine to + install it. +

+
+ +
+
+
+
+ Developer Edition +
+
+
+ £0  + / Beta phase +
+
Become familiar with our CRM software using sandbox data
+
Test your Marketplace application inside Agency Cloud
+
Understand how customers will interact with your application
+
+ +
+
+
+
+
-
+ ) } +export const DeveloperDesktopPage: React.FC = () => ( + +

Desktop

+
+ +
+
+ +
+
+) + export default DeveloperDesktopPage diff --git a/packages/marketplace/src/components/pages/developer-edit-app/__test__/__snapshots__/general-information-section.test.tsx.snap b/packages/marketplace/src/components/pages/developer-edit-app/__test__/__snapshots__/general-information-section.test.tsx.snap index 9048a9ef1c..3e35823167 100644 --- a/packages/marketplace/src/components/pages/developer-edit-app/__test__/__snapshots__/general-information-section.test.tsx.snap +++ b/packages/marketplace/src/components/pages/developer-edit-app/__test__/__snapshots__/general-information-section.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`GeneralInformationSection should match a snapshot 1`] = ` +exports[`GeneralInformationSection should match a snapshot when isListed equal to false 1`] = ` - + + +
+ +
+ For more information on how to complete this form, please view our "Step-by-step" guide  + + here + +
+
+ +
+ App Listing +
+
+ +
+ The section below relates to the fields that comprise the listing of your application as it will appear to a user in the Marketplace. It also includes details we will use to enable us to contact you about your submitted application, how best to make your app discoverable to users and to determine where to launch it from the marketplace. +
+
+ +
+ +
+ + +
+
+ + +
+
+
+
+
+
+ +
+ + +
+
+ + +
+
+
+
+
+
+
+
+ +
+ +
+ + +
+
+ + +
+
+
+
+
+
+ +
+ + +
+
+ + +
+
+
+
+
+
+
+
+ +
+ +
+ + +
+
+ + +
+
+
+
+
+
+ +
+ + +
+
+ + +
+
+
+
+
+
+
+
+ +
+ +
+ + +
+
+ +