diff --git a/packages/app-market/src/components/apps-browse/__styles__/featured-hero-apps.ts b/packages/app-market/src/components/apps-browse/__styles__/featured-hero-apps.ts index d1a850744c..1e77027a1d 100644 --- a/packages/app-market/src/components/apps-browse/__styles__/featured-hero-apps.ts +++ b/packages/app-market/src/components/apps-browse/__styles__/featured-hero-apps.ts @@ -152,6 +152,8 @@ export const FeaturedHeroAppsIcon = styled.img` border-radius: 0.25rem; width: 48px; height: 48px; + padding: 0.25rem; + background-color: var(--color-white); ${forMobileAndAbove} { border-radius: 0.5rem; diff --git a/packages/app-market/src/components/apps-browse/__styles__/hero-apps.ts b/packages/app-market/src/components/apps-browse/__styles__/hero-apps.ts index cb5231ec0d..c2ebecd1ca 100644 --- a/packages/app-market/src/components/apps-browse/__styles__/hero-apps.ts +++ b/packages/app-market/src/components/apps-browse/__styles__/hero-apps.ts @@ -106,7 +106,7 @@ export const HeroAppsStrapline = styled(ElBodyText)` export const HeroAppsInnerContainer = styled.div` width: 100%; - border-radius: 0.25rem; + border-radius: 0.5rem; padding: 0.75rem; ${forMobileAndAbove} { @@ -203,6 +203,8 @@ export const HeroAppsIcon = styled.img` border-radius: 0.25rem; width: 40px; height: 40px; + padding: 0.25rem; + background-color: var(--color-white); ${forMobileAndAbove} { margin-bottom: 1.25rem; diff --git a/packages/app-market/src/components/apps-detail/__styles__/index.ts b/packages/app-market/src/components/apps-detail/__styles__/index.ts index 7b464a3393..686643ad5a 100644 --- a/packages/app-market/src/components/apps-detail/__styles__/index.ts +++ b/packages/app-market/src/components/apps-detail/__styles__/index.ts @@ -1,7 +1,8 @@ +import { forDesktopAndAbove } from './../../../core/__styles__/media' import { ElModalBody } from './../../../../../elements/src/components/modal/__styles__/index' import { css } from '@linaria/core' import { styled } from '@linaria/react' -import { forMobileAndAbove, forTabletAndAbove } from '../../../core/__styles__/media' +import { forMobileAndAbove, forTabletAndAbove, forWidescreenAndAbove } from '../../../core/__styles__/media' export const htmlRender = css` font-family: var(--font-sans-serif); @@ -22,25 +23,27 @@ export const htmlRender = css` export const AppDetailWrapper = styled.div` margin-right: 0.75rem; border-radius: 0.25rem; + padding: 0.75rem; background-color: var(--color-grey-light); - width: 48px; - height: 48px; display: flex; align-items: center; justify-content: center; + margin-bottom: 0.75rem; ${forMobileAndAbove} { width: 96px; height: 96px; + margin-bottom: 0rem; } ` export const AppDetailIcon = styled.img` - border-radius: 1rem; + border-radius: 0.25rem; width: 48px; height: 48px; ${forMobileAndAbove} { + border-radius: 1rem; width: 72px; height: 72px; } @@ -82,6 +85,10 @@ export const AppDetailDescriptionColMain = styled.div` ${forTabletAndAbove} { grid-column-end: span 7; } + + ${forWidescreenAndAbove} { + grid-column-end: span 12; + } ` export const AppDetailDescriptionColAside = styled.div` @@ -93,6 +100,20 @@ export const AppDetailDescriptionColAside = styled.div` grid-column-end: span 5; padding-top: 2.75rem; } + + ${forWidescreenAndAbove} { + display: none; + } +` + +export const AppDetailDescriptionAsideDesktop = styled.div` + display: none; + + ${forWidescreenAndAbove} { + display: block; + margin-left: 1rem; + margin-bottom: 1.25rem; + } ` export const AppDetailBackButton = styled.div` @@ -103,8 +124,13 @@ export const AppDetailBackButton = styled.div` align-items: center; border-radius: 0.25rem; background-color: var(--color-grey-light); - margin-bottom: 0.75rem; + margin-bottom: 1.25rem; cursor: pointer; + margin-top: 0.75rem; + + ${forMobileAndAbove} { + margin-top: 0; + } ` export const AppDetailPermissionChip = styled.div` @@ -143,3 +169,48 @@ export const appDetailVideoModal = css` height: calc(100% - 2.5rem); } ` + +export const appDetailInfoLineAdjust = css` + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; +` + +export const AppsDetailContentGrid = styled.div` + display: grid; + grid-template-columns: 1fr; + + ${forWidescreenAndAbove} { + grid-template-columns: 1fr 2fr; + grid-column-gap: 2rem; + } +` + +export const AppDetailSupportGrid = styled.div` + display: grid; + grid-template-columns: repeat(12, 1fr); + grid-column-gap: 1rem; + grid-row-gap: 1.5rem; + + ${forMobileAndAbove} { + grid-column-gap: 2rem; + grid-row-gap: 2.5rem; + } +` + +export const AppDetailSupportGridCol = styled.div` + grid-column-end: span 12; + + ${forMobileAndAbove} { + grid-column-end: span 6; + } + + ${forDesktopAndAbove} { + grid-column-end: span 4; + } + + ${forWidescreenAndAbove} { + grid-column-end: span 6; + } +` diff --git a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/app-install-modal.test.tsx.snap b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/app-install-modal.test.tsx.snap index 0365ff460b..20b95267da 100644 --- a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/app-install-modal.test.tsx.snap +++ b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/app-install-modal.test.tsx.snap @@ -12,7 +12,7 @@ Object { class="el-mb11" >

As an organisation admin, you have control over enabling @@ -32,20 +32,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

- + +

For more information regarding Desktop Integration types, please @@ -64,7 +70,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -83,7 +89,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -96,47 +102,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

As an organisation admin, you have control over enabling @@ -188,20 +178,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -220,7 +216,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -239,7 +235,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -252,47 +248,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

As an organisation admin, you have control over enabling @@ -401,20 +381,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -433,7 +419,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -452,7 +438,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -465,47 +451,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

As an organisation admin, you have control over enabling @@ -557,20 +527,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -589,7 +565,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -608,7 +584,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -621,47 +597,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -768,20 +728,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -800,7 +766,7 @@ Object { Pricing Information

Will Test DevCo have specified there is no cost for using this @@ -813,47 +779,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -903,20 +853,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -935,7 +891,7 @@ Object { Pricing Information

Will Test DevCo have specified there is no cost for using this @@ -948,47 +904,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -1093,20 +1033,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -1125,7 +1071,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -1144,7 +1090,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -1157,47 +1103,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -1245,20 +1175,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -1277,7 +1213,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -1296,7 +1232,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -1309,47 +1245,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -1456,20 +1376,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -1488,7 +1414,7 @@ Object { Pricing Information

There may be a cost associated to using this integration @@ -1504,47 +1430,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -1594,20 +1504,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -1626,7 +1542,7 @@ Object { Pricing Information

There may be a cost associated to using this integration @@ -1642,47 +1558,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -1789,20 +1689,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -1821,7 +1727,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -1840,7 +1746,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -1853,47 +1759,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

You are about to enable @@ -1943,20 +1833,26 @@ Object { Desktop Integration

This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud.

-
+
Provides ability to export a saved applicant to third party system - - +
+

For more information regarding Desktop Integration types, please @@ -1975,7 +1871,7 @@ Object { Pricing Information

Will Test DevCo have specified that there is a cost for using this @@ -1994,7 +1890,7 @@ Object { .

You will not be charged by Reapit Ltd for any costs associated with using this @@ -2007,47 +1903,31 @@ Object { Data Permissions

By enabling this app, you are granting the following permissions to your data:

Information about your organisation and the names/email addresses of your users

-
-
- Read applicants -
-
-
-
- Read property images -
-
-
-
- Read properties -
-
+ Read applicants +
+
+ Read property images +
+
+ Read properties

will-test-dev-co-voracious-person integration has been successfully enabled.

For details on how to use the integration and, if there are any additional setup requirements, a member of - MOCK_NAME + MOCK_DEVELOPER_NAME will be in touch to help you through the process.

If you wish to contact them directly, you can do this via telephone at 07777777777 @@ -58,21 +58,21 @@ Object { class="el-snack-holder" />

will-test-dev-co-voracious-person integration has been successfully enabled.

For details on how to use the integration and, if there are any additional setup requirements, a member of - MOCK_NAME + MOCK_DEVELOPER_NAME will be in touch to help you through the process.

If you wish to contact them directly, you can do this via telephone at 07777777777 @@ -164,14 +164,14 @@ Object { class="el-snack-holder" />

The will-test-dev-co-voracious-person app has been successfully installed. You can now launch the app from the ‘My Apps’ page or by clicking the button below.

If you wish to contact the developer about using the app, you can do this via telephone at 07777777777 @@ -218,14 +218,14 @@ Object { class="el-snack-holder" />

The will-test-dev-co-voracious-person app has been successfully installed. You can now launch the app from the ‘My Apps’ page or by clicking the button below.

If you wish to contact the developer about using the app, you can do this via telephone at 07777777777 @@ -329,14 +329,14 @@ Object { class="el-snack-holder" />

The will-test-dev-co-voracious-person app has been successfully installed. You can now launch the app from the ‘My Apps’ page or by clicking the button below.

If you wish to contact the developer about using the app, you can do this via telephone at 07777777777 @@ -383,14 +383,14 @@ Object { class="el-snack-holder" />

The will-test-dev-co-voracious-person app has been successfully installed. You can now launch the app from the ‘My Apps’ page or by clicking the button below.

If you wish to contact the developer about using the app, you can do this via telephone at 07777777777 diff --git a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail-header.test.tsx.snap b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail-header.test.tsx.snap new file mode 100644 index 0000000000..9f86a584dd --- /dev/null +++ b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail-header.test.tsx.snap @@ -0,0 +1,411 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AppsDetailHeader should match a snapshot for desktop 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +

+
+
+
+ will-test-dev-co-voracious-person +
+
+
+

+ will-test-dev-co-voracious-person +

+

+ Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar +

+
+
+ + + + + +

+ Verified by Reapit +

+
+ Category +
+

+ Integration +

+
+
+
+
+ , + "container":
+
+
+
+ will-test-dev-co-voracious-person +
+
+
+

+ will-test-dev-co-voracious-person +

+

+ Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar +

+
+
+ + + + + +

+ Verified by Reapit +

+
+ Category +
+

+ Integration +

+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`AppsDetailHeader should match a snapshot for mobile 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+
+
+

+ will-test-dev-co-voracious-person +

+ + + + + +

+ Verified by Reapit +

+
+
+
+ will-test-dev-co-voracious-person +
+

+ Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar +

+
+
+
+ Category +
+

+ Integration +

+
+
+
+
+ , + "container":
+
+
+
+
+

+ will-test-dev-co-voracious-person +

+ + + + + +

+ Verified by Reapit +

+
+
+
+ will-test-dev-co-voracious-person +
+

+ Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar +

+
+
+
+ Category +
+

+ Integration +

+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail.test.tsx.snap b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail.test.tsx.snap index a52cef1105..987b26f0ca 100644 --- a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail.test.tsx.snap +++ b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/apps-detail.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AppsDetail should match a snapshot when loading 1`] = ` +exports[`AppsDetail should match a snapshot for viewport desktop 1`] = ` Object { "asFragment": [Function], "baseElement": @@ -106,7 +106,7 @@ Object { } `; -exports[`AppsDetail should match a snapshot with data 1`] = ` +exports[`AppsDetail should match a snapshot for viewport mobile 1`] = ` Object { "asFragment": [Function], "baseElement": @@ -125,415 +125,953 @@ Object { class="el-page-container" >
- - - - - -
-
- will-test-dev-co-voracious-person
+
+ +
+ , + "container":
+
+
+
+
-
-

- will-test-dev-co-voracious-person -

-

- Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar -

-
-
- - - - - -

- Integration Enabled -

- - - - - -

- Verified by Reapit -

-
- Category -
-

- Integration -

-
-
+ class="el-loader-moving-bar" + />
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`AppsDetail should match a snapshot for viewport superWidescreen 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+
+
+
+ + , + "container":
+
+
+
-

- About App -

-
- Mock Component -
-
-
- - + class="el-loader-moving-bar" + /> +
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`AppsDetail should match a snapshot for viewport tablet 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ , + "container":
+
+
+
+
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`AppsDetail should match a snapshot for viewport widescreen 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ , + "container":
+
+
+
+
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`AppsDetail should match a snapshot when loading 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ , + "container":
+
+
+
+
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + +exports[`AppsDetail should match a snapshot with data 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+
+
+
+
+
+
+ + + + + +
+
+
+ will-test-dev-co-voracious-person +
+
+
+

+ will-test-dev-co-voracious-person +

+

+ Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar +

+
+
+ + + + + +

+ Verified by Reapit +

+
+ Category
+

+ Integration +

+
+
-
- Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar -
+ +
-
-

- Website -

-

- - https://foo.bar - -

-
-
-

- Support Email -

-

- + Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar +

+
+ -
-

- Telephone -

-

- 07777777777 -

-
-
-

- Terms and Conditions -

-

+

+
+
+
+ - +
+

+ Support Email +

+

+ + foo@bar.com + +

+
+
+

+ Telephone +

+

+ 07777777777 +

+
+
+

+ Terms and Conditions +

+

+ + https://foo.bar + +

+
+
+

+ Privacy Policy +

+

+ + https://foo.bar + +

+
+
+

+ Pricing Policy +

+

+ + https://foo.bar + +

+
+
+
- https://foo.bar - -

-
- + -
-
-

- About Developer -

-

- All about us -

-
-
-

- Permissions -

-
- Read applicants -
-
- Read property images -
-
- Read properties -
-
-
-

- AgencyCloud Integration -

-
- Applicant -
-
- Applicant Export +

+ Permissions +

+
+ Read applicants +
+
+ Read property images +
+
+ Read properties +
+
+
+

+ AgencyCloud Integration +

+
+ Applicant +
+
+ Applicant Export +
+
+
@@ -598,27 +1136,6 @@ Object {
- - - - - -

- Integration Enabled -

@@ -660,7 +1177,7 @@ Object { class="el-button-group-align-left el-button-group-inner" > @@ -673,289 +1190,318 @@ Object {
-

- About App -

-
- Mock Component -
+

+ About App +

+
+ Mock Component +
- - +
- + + + + + Marketing Presentation +
+ +
-
-
-
- Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar Foo bar -
-
-
- - + -
-

- Telephone -

-

- 07777777777 -

-
-
-

- Terms and Conditions -

-

+

+
+
+
+ - +
+

+ Support Email +

+

+ + foo@bar.com + +

+
+
+

+ Telephone +

+

+ 07777777777 +

+
+
+

+ Terms and Conditions +

+

+ + https://foo.bar + +

+
+
+

+ Privacy Policy +

+

+ + https://foo.bar + +

+
+
+

+ Pricing Policy +

+

+ + https://foo.bar + +

+
+
+
- https://foo.bar - -

-
- + -
-
-

- About Developer -

-

- All about us -

-
-
-

- Permissions -

-
- Read applicants -
-
- Read property images -
-
- Read properties -
-
-
-

- AgencyCloud Integration -

-
- Applicant -
-
- Applicant Export +

+ Permissions +

+
+ Read applicants +
+
+ Read property images +
+
+ Read properties +
+
+
+

+ AgencyCloud Integration +

+
+ Applicant +
+
+ Applicant Export +
+
+
diff --git a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/index.test.tsx.snap b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/index.test.tsx.snap index 54c71e888c..4e1f14bead 100644 --- a/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/index.test.tsx.snap +++ b/packages/app-market/src/components/apps-detail/__tests__/__snapshots__/index.test.tsx.snap @@ -103,132 +103,212 @@ Object { />
-

- About App -

-
-
+ class="app-detail-description-col-main" + > +

+ About App +

+
+
- - - - - - - - - - - + + + + + + + + + + + +
-
- -
-

- About Developer -

-

-

-
-

- Permissions -

-
, @@ -331,132 +411,212 @@ Object { />
-

- About App -

-
-
+ class="app-detail-description-col-main" + > +

+ About App +

+
+
- - - - - - - - - - - + + + + + + + + + + + +
-
- -
-

- About Developer -

-

-

-
-

- Permissions -

-
, "debug": [Function], diff --git a/packages/app-market/src/components/apps-detail/__tests__/app-install-success-modal.test.tsx b/packages/app-market/src/components/apps-detail/__tests__/app-install-success-modal.test.tsx index 91c9e0bd50..9e627b9931 100644 --- a/packages/app-market/src/components/apps-detail/__tests__/app-install-success-modal.test.tsx +++ b/packages/app-market/src/components/apps-detail/__tests__/app-install-success-modal.test.tsx @@ -3,7 +3,6 @@ import { render } from '../../../tests/react-testing' import { mockAppDetailModel } from '../../../tests/__stubs__/apps' import { AppInstallSuccesModalContent } from '../app-install-success-modal' import { useReapitConnect } from '@reapit/connect-session' -import { mockDeveloperModel } from '../../../tests/__stubs__/developers' jest.mock('@reapit/connect-session', () => ({ ReapitConnectBrowserSession: jest.fn(), @@ -18,7 +17,11 @@ describe('AppInstallSuccesModalContent', () => { it('should match a snapshot where app is directApi', () => { expect( render( - , + , ), ).toMatchSnapshot() }) @@ -29,7 +32,7 @@ describe('AppInstallSuccesModalContent', () => { , ), ).toMatchSnapshot() @@ -45,7 +48,7 @@ describe('AppInstallSuccesModalContent', () => { , ), ).toMatchSnapshot() diff --git a/packages/app-market/src/components/apps-detail/__tests__/apps-detail-header.test.tsx b/packages/app-market/src/components/apps-detail/__tests__/apps-detail-header.test.tsx new file mode 100644 index 0000000000..f74f4a8430 --- /dev/null +++ b/packages/app-market/src/components/apps-detail/__tests__/apps-detail-header.test.tsx @@ -0,0 +1,16 @@ +import React from 'react' +import { render, setViewport } from '../../../tests/react-testing' +import { mockAppDetailModel } from '../../../tests/__stubs__/apps' +import { AppsDetailHeader } from '../apps-detail-header' + +describe('AppsDetailHeader', () => { + it('should match a snapshot for mobile', () => { + setViewport('mobile') + expect(render()).toMatchSnapshot() + }) + + it('should match a snapshot for desktop', () => { + setViewport('desktop') + expect(render()).toMatchSnapshot() + }) +}) diff --git a/packages/app-market/src/components/apps-detail/__tests__/apps-detail.test.tsx b/packages/app-market/src/components/apps-detail/__tests__/apps-detail.test.tsx index 4689c709ae..778be65812 100644 --- a/packages/app-market/src/components/apps-detail/__tests__/apps-detail.test.tsx +++ b/packages/app-market/src/components/apps-detail/__tests__/apps-detail.test.tsx @@ -1,12 +1,10 @@ import { useReapitGet } from '@reapit/utils-react' import React from 'react' import { MediaType } from '@reapit/elements' -import { render } from '../../../tests/react-testing' +import { render, setViewport, viewPortOptions } from '../../../tests/react-testing' import { mockAppDetailModel } from '../../../tests/__stubs__/apps' import { mockDesktopIntegrationTypeModelPagedResult } from '../../../tests/__stubs__/desktop-integration-types' -import { mockDeveloperModel } from '../../../tests/__stubs__/developers' import { AppsDetail, handleCarouselCols, handleOpenModal } from '../apps-detail' -import { mockInstallationModelPagedResult } from '../../../tests/__stubs__/installations' window.reapit.config.clientHiddenAppIds = {} window.reapit.config.orgAdminRestrictedAppIds = [] @@ -39,9 +37,7 @@ describe('AppsDetail', () => { document.body.appendChild(testElem) mockUseReapitGet - .mockReturnValueOnce([mockInstallationModelPagedResult, false]) .mockReturnValueOnce([mockAppDetailModel, false]) - .mockReturnValueOnce([mockDeveloperModel, false]) .mockReturnValueOnce([mockDesktopIntegrationTypeModelPagedResult, false]) expect(render()).toMatchSnapshot() }) @@ -51,6 +47,13 @@ describe('AppsDetail', () => { expect(render()).toMatchSnapshot() }) + + viewPortOptions.forEach((option) => { + it(`should match a snapshot for viewport ${option}`, () => { + setViewport(option) + expect(render()).toMatchSnapshot() + }) + }) }) describe('handleCarouselCols', () => { diff --git a/packages/app-market/src/components/apps-detail/app-install-modal.tsx b/packages/app-market/src/components/apps-detail/app-install-modal.tsx index 8345a9f4f6..ac1a61c63e 100644 --- a/packages/app-market/src/components/apps-detail/app-install-modal.tsx +++ b/packages/app-market/src/components/apps-detail/app-install-modal.tsx @@ -7,7 +7,7 @@ import { import { selectIsMarketplaceAdmin, selectIsOffGrouping, selectIsOrgAdmin } from '../../utils/auth' import { useReapitConnect } from '@reapit/connect-session' import { reapitConnectBrowserSession } from '../../core/connect-session' -import { BodyText, Button, ButtonGroup, Col, elMb11, Grid, SmallText } from '@reapit/elements' +import { Button, ButtonGroup, elMb11, BodyText, elMb6 } from '@reapit/elements' import { AcProcessType, DesktopLink, SendFunction, useReapitUpdate } from '@reapit/utils-react' import { UpdateActionNames, updateActions } from '@reapit/utils-common' import { AppDetailPermissionChip } from './__styles__' @@ -79,7 +79,7 @@ export const AppInstallModalContent: FC = ({ <>
{isOffGrouping && isOrgAdmin ? ( - + As an organisation admin, you have control over {isDirectApi ? 'enabling' : 'installation'} of ‘{name} ’ for either your Office Group or for all Users and Offices within your Organisation. To do this, you need to visit the{' '} @@ -89,31 +89,33 @@ export const AppInstallModalContent: FC = ({ target="_blank" content="Reapit Connect Management App." /> - + ) : isOffGrouping && isMarketplaceAdmin ? ( - + You are about to {isDirectApi ? 'enable' : 'install'} ‘{name}’ for your Office Group{' '} {offGroupName} - + ) : ( - + You are about to {isDirectApi ? 'enable' : 'install'} ‘{name}’ for all Users and Offices within your Organisation. - + )} {userDesktopIntegrationTypes?.length ? ( <> Desktop Integration - + This app requires the following Desktop Integration. Some integration types may replace or change certain behaviours within Agency Cloud. - -
    + +
    {userDesktopIntegrationTypes.map((integration) => ( -
  • {integration?.description ?? ''}
  • + + {integration?.description ?? ''} + ))} -
- +
+ For more information regarding Desktop Integration types, please{' '} = ({ content="click here" /> . - + ) : null} Pricing Information {isFree ? ( - + {developer} have specified there is no cost for using this {isDirectApi ? 'integration' : 'app'}. - + ) : pricingUrl ? ( <> - + {developer} have specified that there is a cost for using this {isDirectApi ? 'integration' : 'app'}, please {' '} to view their pricing information. You will be billed directly by {developer}. - + {developer !== 'Reapit Ltd' && ( - + You will not be charged by Reapit Ltd for any costs associated with using this{' '} {isDirectApi ? 'integration' : 'app'}. - + )} ) : ( - + There may be a cost associated to using this {isDirectApi ? 'integration' : 'app'}. However, this information has not yet been provided by {developer}. Please contact {developer} directly for information about pricing. - + )} <> Data Permissions - + By {isDirectApi ? 'enabling' : 'installing'} this app, you are granting the following permissions to your data: - - + + Information about your organisation and the names/email addresses of your users - - {Boolean(scopes.length) && ( - - {scopes.map(({ name, description }) => ( - - {description ?? ''} - - ))} - - )} + + {scopes?.map(({ name, description }) => ( + {description ?? ''} + ))}
diff --git a/packages/app-market/src/components/apps-detail/app-install-success-modal.tsx b/packages/app-market/src/components/apps-detail/app-install-success-modal.tsx index 281a3c92ec..8cfa31d3fd 100644 --- a/packages/app-market/src/components/apps-detail/app-install-success-modal.tsx +++ b/packages/app-market/src/components/apps-detail/app-install-success-modal.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react' -import { AppDetailModel, DeveloperModel } from '@reapit/foundations-ts-definitions' -import { Button, ButtonGroup, SmallText } from '@reapit/elements' +import { AppDetailModel } from '@reapit/foundations-ts-definitions' +import { Button, ButtonGroup, BodyText } from '@reapit/elements' import { AcProcessType, DesktopLink } from '@reapit/utils-react' export const DESKTOP_REFRESH_URL = 'agencycloud://apps/refresh' @@ -8,38 +8,37 @@ export const DESKTOP_REFRESH_URL = 'agencycloud://apps/refresh' export type AppInstallModalContentProps = { app?: AppDetailModel closeModal: () => void - developer: DeveloperModel + developer?: string } export const AppInstallSuccesModalContent: FC = ({ app, closeModal, developer }) => { const { name, id, isDirectApi, launchUri, telephone, supportEmail } = app ?? {} - const { name: developerName } = developer return ( <> {isDirectApi ? ( <> - {name} integration has been successfully enabled. - + {name} integration has been successfully enabled. + For details on how to use the integration and, if there are any additional setup requirements, a member of{' '} - {developerName} will be in touch to help you through the process. - - + {developer} will be in touch to help you through the process. + + If you wish to contact them directly, you can do this via telephone at {telephone} or email at{' '} . - + ) : ( <> - + The {name} app has been successfully installed. You can now launch the app from the ‘My Apps’ page or by clicking the button below. - - + + If you wish to contact the developer about using the app, you can do this via telephone at {telephone} or email at{' '} . - + )} diff --git a/packages/app-market/src/components/apps-detail/apps-detail-header.tsx b/packages/app-market/src/components/apps-detail/apps-detail-header.tsx new file mode 100644 index 0000000000..3fd5e801a8 --- /dev/null +++ b/packages/app-market/src/components/apps-detail/apps-detail-header.tsx @@ -0,0 +1,125 @@ +import { cx } from '@linaria/core' +import { + BodyText, + elFadeIn, + elMb3, + elMb5, + elMr2, + elMr5, + FlexContainer, + Icon, + PlaceholderImage, + SmallText, + Subtitle, + Title, + useMediaQuery, +} from '@reapit/elements' +import { AppDetailModel } from '@reapit/foundations-ts-definitions' +import React, { FC } from 'react' +import { IsFreeNotice } from '../apps-browse/__styles__' +import { AppDetailCategoryChip, AppDetailIcon, appDetailInfoLineAdjust, AppDetailWrapper } from './__styles__' + +export interface AppsDetailHeaderProps { + app: AppDetailModel +} + +export const AppsDetailHeader: FC = ({ app }) => { + const { isMobile } = useMediaQuery() + const { name, summary, isFree, categories, isDirectApi, installedOn, media } = app + const isInstalled = Boolean(installedOn) + const iconUri = media?.find((item) => item.type === 'icon')?.uri + + if (isMobile) { + return ( + + + + + {name} + + {isInstalled && ( + <> + + + {isDirectApi ? 'Integration Enabled' : 'App Installed'} + + + )} + + + Verified by Reapit + + + + + {iconUri ? ( + + ) : ( + + )} + + {summary} + + + {Boolean(categories?.length) && + categories?.map((category) => ( + + {category.name} + + ))} + {isDirectApi && ( + + Integration + + )} + {isFree && FREE} + + + + ) + } + + return ( + + + {iconUri ? ( + + ) : ( + + )} + + + + {name} + {summary} + + + {isInstalled && ( + <> + + + {isDirectApi ? 'Integration Enabled' : 'App Installed'} + + + )} + + + Verified by Reapit + + {Boolean(categories?.length) && + categories?.map((category) => ( + + {category.name} + + ))} + {isDirectApi && ( + + Integration + + )} + {isFree && FREE} + + + + ) +} diff --git a/packages/app-market/src/components/apps-detail/apps-detail.tsx b/packages/app-market/src/components/apps-detail/apps-detail.tsx index 546625cdce..53f04e2738 100644 --- a/packages/app-market/src/components/apps-detail/apps-detail.tsx +++ b/packages/app-market/src/components/apps-detail/apps-detail.tsx @@ -1,35 +1,25 @@ import React, { createRef, Dispatch, FC, LegacyRef, SetStateAction, useMemo, useRef, useState } from 'react' import { - Title, PageContainer, Loader, Subtitle, FlexContainer, PlaceholderImage, - elFadeIn, BodyText, elMb7, Icon, useMediaQuery, MediaType, - Grid, - Col, elMb11, - elMr5, - elMb5, - SmallText, ButtonGroup, Button, elMr4, + elMr6, + elMl6, } from '@reapit/elements' import { useHistory, useParams } from 'react-router-dom' import { AcProcessType, DesktopLink, HTMLRender, useReapitGet } from '@reapit/utils-react' -import { - AppDetailModel, - DesktopIntegrationTypeModelPagedResult, - DeveloperModel, - InstallationModelPagedResult, -} from '@reapit/foundations-ts-definitions' +import { AppDetailModel, DesktopIntegrationTypeModelPagedResult } from '@reapit/foundations-ts-definitions' import { reapitConnectBrowserSession } from '../../core/connect-session' import { GetActionNames, getActions } from '../../../../utils-common/src' import { @@ -37,17 +27,17 @@ import { AppDetailDescriptionColAside, AppDetailDescriptionColMain, AppDetailDescriptionGrid, - AppDetailIcon, AppDetailImage, AppDetailImageWrapper, AppDetailPermissionChip, - AppDetailWrapper, - AppDetailCategoryChip, htmlRender, appDetailVideoModal, + AppsDetailContentGrid, + AppDetailSupportGrid, + AppDetailSupportGridCol, + AppDetailDescriptionAsideDesktop, } from './__styles__' import { Carousel } from '../carousel' -import { IsFreeNotice } from '../apps-browse/__styles__' import { useModal } from '@reapit/elements' import { AppInstallModalContent } from './app-install-modal' import { AppInstallSuccesModalContent } from './app-install-success-modal' @@ -55,13 +45,14 @@ import { useReapitConnect } from '@reapit/connect-session' import { selectIsAdmin } from '../../utils/auth' import { filterRestrictedAppDetail } from '../../utils/browse-app' import { cx } from '@linaria/core' +import { AppsDetailHeader } from './apps-detail-header' export interface AppIdParams { appId: string } export const handleCarouselCols = (mediaQuery: MediaType) => () => { - const { isMobile, isTablet, isDesktop } = mediaQuery + const { isMobile, isTablet, isDesktop, isSuperWideScreen, is4KScreen } = mediaQuery if (isMobile) { return 1 @@ -71,6 +62,10 @@ export const handleCarouselCols = (mediaQuery: MediaType) => () => { return 2 } + if (isSuperWideScreen || is4KScreen) { + return 1 + } + return 3 } @@ -94,53 +89,30 @@ export const AppsDetail: FC = () => { const { Modal: VideoModal, openModal: videoOpenModal, closeModal: videoCloseModal } = useModal() const { connectSession } = useReapitConnect(reapitConnectBrowserSession) const clientId = connectSession?.loginIdentity.clientId - const developerId = connectSession?.loginIdentity.developerId - - const baseParams = { - clientId, - appId, - onlyInstalled: true, - } - - const queryParams = developerId ? { ...baseParams, developerId } : baseParams - - const [installations] = useReapitGet({ - reapitConnectBrowserSession, - action: getActions(window.reapit.config.appEnv)[GetActionNames.getInstallations], - queryParams, - fetchWhenTrue: [clientId, appId], - }) + const sessionDeveloperId = connectSession?.loginIdentity.developerId const [unfilteredAppDetail, appDetailLoading, , refetchApp] = useReapitGet({ reapitConnectBrowserSession, action: getActions(window.reapit.config.appEnv)[GetActionNames.getAppById], + queryParams: { clientId }, uriParams: { appId, }, - fetchWhenTrue: [appId], + fetchWhenTrue: [appId, clientId], }) const appDetail = useMemo(filterRestrictedAppDetail(unfilteredAppDetail, connectSession), [unfilteredAppDetail]) - const [developerDetail] = useReapitGet({ - reapitConnectBrowserSession, - action: getActions(window.reapit.config.appEnv)[GetActionNames.getDeveloper], - uriParams: { developerId: appDetail?.developerId }, - fetchWhenTrue: [appDetail?.developerId], - }) - const [desktopIntegrationTypes] = useReapitGet({ reapitConnectBrowserSession, action: getActions(window.reapit.config.appEnv)[GetActionNames.getDesktopIntegrationTypes], }) const app = appDetail ?? {} - const developer = developerDetail ?? {} const { name, description, media, - summary, scopes, homePage, supportEmail, @@ -149,19 +121,27 @@ export const AppsDetail: FC = () => { privacyPolicyUrl, pricingUrl, isFree, - categories, isDirectApi, desktopIntegrationTypeIds, + developerAbout, + developer, + installedOn, + isListed, + developerId, } = app - const { about } = developer - const iconUri = media?.find((item) => item.type === 'icon')?.uri + const images = media?.filter((item) => item.type === 'image') const videos = media?.filter((item) => item.type === 'video') const heroImage = images ? images[0] : null const screenshots = images ? images.slice(1, images.length) : [] imageRefs.current = screenshots.map((_, i) => imageRefs.current[i] ?? createRef()) - const isInstalled = Boolean(installations?.totalCount) + const isSandbox = clientId !== 'SBOX' && clientId !== 'SBXA' + const hideInstall = + (!isListed && isSandbox) || (isSandbox && sessionDeveloperId && sessionDeveloperId !== developerId) + const isInstalled = Boolean(installedOn) const isAdmin = selectIsAdmin(connectSession) + const { isSuperWideScreen, is4KScreen } = mediaQuery + const isFullScreen = isSuperWideScreen || is4KScreen return ( @@ -172,56 +152,16 @@ export const AppsDetail: FC = () => { - - - {iconUri ? ( - - ) : ( - - )} - - - - {name} - {summary} - - - {isInstalled && ( - <> - - - {isDirectApi ? 'Integration Enabled' : 'App Installed'} - - - )} - - - Verified by Reapit - - {Boolean(categories?.length) && - categories?.map((category) => ( - - {category.name} - - ))} - {isDirectApi && ( - - Integration - - )} - {isFree && FREE} - - - + - {!isInstalled && isAdmin && ( + {!isInstalled && isAdmin && !hideInstall && ( )} {supportEmail && ( { /> )} - - - About App - - {videos && Boolean(videos?.length) && ( - - - {videos && videos?.length > 1 && ( - - )} - - )} - - - - {heroImage?.uri ? ( - - ) : ( - - )} - - - - ( - - {uri ? ( - - ) : ( - + {videos && videos?.length > 1 && ( + + )} + )} - - ))} - /> - - {homePage && ( - - Website - - - - - )} - {supportEmail && ( - - Support Email - - - - - )} - {telephone && ( - - Telephone - - {telephone} - - - )} - {termsAndConditionsUrl && ( - - Terms and Conditions - - - - - )} - {privacyPolicyUrl && ( - - Privacy Policy - - - - - )} - - Pricing Policy - - {!isFree && pricingUrl ? ( - - ) : ( - 'Free' + + + + {heroImage?.uri ? ( + + ) : ( + + )} + + + + + + + + {heroImage?.uri ? ( + + ) : ( + + )} + + + ( + + {uri ? ( + + ) : ( + + )} + + ))} + /> + + + + {homePage && ( + + Website + + + + + )} + {supportEmail && ( + + Support Email + + + + + )} + {telephone && ( + + Telephone + + {telephone} + + + )} + {termsAndConditionsUrl && ( + + Terms and Conditions + + + + + )} + {privacyPolicyUrl && ( + + Privacy Policy + + + + + )} + + Pricing Policy + + {!isFree && pricingUrl ? ( + + ) : ( + 'Free' + )} + + + +
+ About Developer + + {developerAbout} + +
+
+ Permissions + {scopes?.map(({ name, description }) => ( + {description} + ))} +
+ {Boolean(desktopIntegrationTypeIds?.length) && ( +
+ AgencyCloud Integration + {desktopIntegrationTypeIds?.map((id) => { + const desktopType = desktopIntegrationTypes?.data?.find((item) => item.id === id) + if (desktopType) + return {desktopType.name} + })} +
)} -
- -
-
- About Developer - - {about} - -
-
- Permissions - {scopes?.map(({ name, description }) => ( - {description} - ))} -
- {Boolean(desktopIntegrationTypeIds?.length) && ( -
- AgencyCloud Integration - {desktopIntegrationTypeIds?.map((id) => { - const desktopType = desktopIntegrationTypes?.data?.find((item) => item.id === id) - if (desktopType) return {desktopType.name} - })} -
- )} + + + )} diff --git a/packages/app-market/src/components/apps-support/__tests__/__snapshots__/apps-support-item.test.tsx.snap b/packages/app-market/src/components/apps-support/__tests__/__snapshots__/apps-support-item.test.tsx.snap index ac61eabff8..186bbebae1 100644 --- a/packages/app-market/src/components/apps-support/__tests__/__snapshots__/apps-support-item.test.tsx.snap +++ b/packages/app-market/src/components/apps-support/__tests__/__snapshots__/apps-support-item.test.tsx.snap @@ -12,7 +12,7 @@ Object { class="el-card-wrap" >
( diff --git a/packages/elements/src/components/card/__styles__/index.ts b/packages/elements/src/components/card/__styles__/index.ts index baad4432a4..e3f2ba711a 100644 --- a/packages/elements/src/components/card/__styles__/index.ts +++ b/packages/elements/src/components/card/__styles__/index.ts @@ -155,7 +155,7 @@ export const ElMobileToggle = styled.button` } &.${elMobileListToggle} { - top: 4.5rem; + top: 0; } ` diff --git a/packages/elements/src/components/card/card-components.tsx b/packages/elements/src/components/card/card-components.tsx index 2f73f6c82d..4dcb8f95f7 100644 --- a/packages/elements/src/components/card/card-components.tsx +++ b/packages/elements/src/components/card/card-components.tsx @@ -209,7 +209,7 @@ export const Card: FC = ({ )} {hasListCard && ( <> - + {listContextMenuItems && (listMobileOpen || !isMobile) && ( )} diff --git a/packages/elements/src/storybook/changelog.stories.mdx b/packages/elements/src/storybook/changelog.stories.mdx index 97464d518a..f263c32c26 100644 --- a/packages/elements/src/storybook/changelog.stories.mdx +++ b/packages/elements/src/storybook/changelog.stories.mdx @@ -14,11 +14,15 @@ We will publish release version history and changes here. Where possible, we wil Beta versions should be relatively stable but subject to occssional breaking changes. +### **3.9.2 - 11/08/22** + +- Fixes small bug where list items on `Card` fails to render in mobile + ### **3.9.1 - 09/08/22** - - Adds `TableSortHeader` for a sortable table header element - - Adds `labelChild` property to `TableCell` element to add a customisable table header - - Adds `onLabelClick` for a label header click event +- Adds `TableSortHeader` for a sortable table header element +- Adds `labelChild` property to `TableCell` element to add a customisable table header +- Adds `onLabelClick` for a label header click event ### **3.9.0 - 03/08/22** diff --git a/packages/payments-client/src/components/pages/payment/__tests__/__snapshots__/payment-external.test.tsx.snap b/packages/payments-client/src/components/pages/payment/__tests__/__snapshots__/payment-external.test.tsx.snap index 2854a68e6d..a1bbb8907b 100644 --- a/packages/payments-client/src/components/pages/payment/__tests__/__snapshots__/payment-external.test.tsx.snap +++ b/packages/payments-client/src/components/pages/payment/__tests__/__snapshots__/payment-external.test.tsx.snap @@ -62,7 +62,7 @@ Object { class="el-card-wrap" >