diff --git a/packages/demo-site/tpls/detail.ejs b/packages/demo-site/tpls/detail.ejs
index ac13766ddf..f209b0f361 100644
--- a/packages/demo-site/tpls/detail.ejs
+++ b/packages/demo-site/tpls/detail.ejs
@@ -12,25 +12,26 @@
margin: 0 auto;
}
-
-
-
+
+
+
-
-
+
+
+
<% if (development) { %>
diff --git a/packages/demo-site/tpls/index.ejs b/packages/demo-site/tpls/index.ejs
index e53c63fa18..dfa30dec37 100644
--- a/packages/demo-site/tpls/index.ejs
+++ b/packages/demo-site/tpls/index.ejs
@@ -6,7 +6,7 @@
DEMO
-
+
-
+
diff --git a/packages/web-components/scripts/build-prod.js b/packages/web-components/scripts/build-prod.js
index 3f5fa25972..6c97dec66e 100644
--- a/packages/web-components/scripts/build-prod.js
+++ b/packages/web-components/scripts/build-prod.js
@@ -38,26 +38,26 @@ return (async () => {
const packages = [
{
rollUpPackageName: 'search-widget',
- exportName: 'ReapitSearchWidgetComponent',
+ exportName: 'ReapitSearchWidget',
},
{
- rollUpPackageName: 'appointment-bookings',
- exportName: 'ReapitAppointmentBookingComponent',
+ rollUpPackageName: 'book-valuation-widget',
+ exportName: 'ReapitBookValuationWidget',
},
{
- rollUpPackageName: 'viewing-booking',
- exportName: 'ReapitViewingBookingComponent',
+ rollUpPackageName: 'book-viewing-widget',
+ exportName: 'ReapitBookViewingWidget',
},
{
rollUpPackageName: 'themes',
},
{
- rollUpPackageName: 'property-detail',
- exportName: 'ReapitPropertyDetailComponent',
+ rollUpPackageName: 'property-detail-widget',
+ exportName: 'ReapitPropertyDetailWidget',
},
{
- rollUpPackageName: 'login',
- exportName: 'LoginWithReapitComponent',
+ rollUpPackageName: 'login-reapit-component',
+ exportName: 'LoginReapitComponent',
},
]
const opts = {
diff --git a/packages/web-components/scripts/build-serverless.js b/packages/web-components/scripts/build-serverless.js
index 07ed97c1ef..a9b49f963f 100644
--- a/packages/web-components/scripts/build-serverless.js
+++ b/packages/web-components/scripts/build-serverless.js
@@ -6,7 +6,7 @@ const stage = yargs.argv.stage
// relative to the root of web-components package
const listServerlessYmlFiles = [
'src/search-widget/server/serverless.yml',
- 'src/appointment-planner/server/serverless.yml',
+ 'src/appointment-planner-component/server/serverless.yml',
]
const buildServerlessList = () => {
diff --git a/packages/web-components/scripts/release-serverless.js b/packages/web-components/scripts/release-serverless.js
index bba553b9e4..8d994d6bad 100644
--- a/packages/web-components/scripts/release-serverless.js
+++ b/packages/web-components/scripts/release-serverless.js
@@ -6,7 +6,7 @@ const stage = yargs.argv.stage
// relative to the root of web-components package
const listServerlessYmlFiles = [
'src/search-widget/server/serverless.yml',
- 'src/appointment-planner/server/serverless.yml',
+ 'src/appointment-planner-component/tserver/serverless.yml',
]
const deployServerlessList = () => {
diff --git a/packages/web-components/scripts/rollup.config.appointment-bookings.js b/packages/web-components/scripts/rollup.config.book-valuation-widget.js
similarity index 75%
rename from packages/web-components/scripts/rollup.config.appointment-bookings.js
rename to packages/web-components/scripts/rollup.config.book-valuation-widget.js
index 3b0f605ffa..c6472072ee 100644
--- a/packages/web-components/scripts/rollup.config.appointment-bookings.js
+++ b/packages/web-components/scripts/rollup.config.book-valuation-widget.js
@@ -12,12 +12,12 @@ const production = !process.env.ROLLUP_WATCH
export const baseConfigurationWithoutTheme = {
...baseConfig,
- input: 'src/appointment-bookings/client/core/index.ts',
- output: generateRollupOutput({ production, fileName: 'appointment-bookings', name: 'appointmentBookings' }),
+ input: 'src/book-valuation-widget/client/core/index.ts',
+ output: generateRollupOutput({ production, fileName: 'book-valuation-widget', name: 'bookValuationWidget' }),
plugins: [
svelte({
dev: !production,
- css: css => generateCssOutput({ css, fileName: 'appointment-bookings.css', production }),
+ css: css => generateCssOutput({ css, fileName: 'book-valuation-widget.css', production }),
}),
replace({
'process.env.NODE_ENV': JSON.stringify(config.NODE_ENV),
diff --git a/packages/web-components/scripts/rollup.config.viewing-booking.js b/packages/web-components/scripts/rollup.config.book-viewing-widget.js
similarity index 76%
rename from packages/web-components/scripts/rollup.config.viewing-booking.js
rename to packages/web-components/scripts/rollup.config.book-viewing-widget.js
index 846e90761d..fc238344ac 100644
--- a/packages/web-components/scripts/rollup.config.viewing-booking.js
+++ b/packages/web-components/scripts/rollup.config.book-viewing-widget.js
@@ -11,12 +11,12 @@ const production = !process.env.ROLLUP_WATCH
export const baseConfigurationWithoutTheme = {
...baseConfig,
- input: 'src/viewing-booking/client/core/index.ts',
- output: generateRollupOutput({ production, fileName: 'viewing-booking', name: 'viewingBooking' }),
+ input: 'src/book-viewing-widget/client/core/index.ts',
+ output: generateRollupOutput({ production, fileName: 'book-viewing-widget', name: 'bookViewingWidget' }),
plugins: [
svelte({
dev: !production,
- css: css => generateCssOutput({ css, fileName: 'viewing-booking.css', production }),
+ css: css => generateCssOutput({ css, fileName: 'book-viewing-widget.css', production }),
}),
replace({
'process.env.NODE_ENV': JSON.stringify(config.NODE_ENV),
diff --git a/packages/web-components/scripts/rollup.config.demo-site.js b/packages/web-components/scripts/rollup.config.demo-site.js
index bc03164567..1df25f2ad6 100644
--- a/packages/web-components/scripts/rollup.config.demo-site.js
+++ b/packages/web-components/scripts/rollup.config.demo-site.js
@@ -1,7 +1,9 @@
-import { baseConfigurationWithoutTheme as viewBookingBuidConfiguration } from './rollup.config.viewing-booking'
-import { baseConfigurationWithoutTheme as appointmentBookingConfiguration } from './rollup.config.appointment-bookings'
+import { baseConfigurationWithoutTheme as bookViewingWidgetConfiguration } from './rollup.config.book-viewing-widget'
+// eslint-disable-next-line max-len
+import { baseConfigurationWithoutTheme as bookValuationWidgetConfiguration } from './rollup.config.book-valuation-widget'
import { baseConfigurationWithoutTheme as searchWidgetConfiguration } from './rollup.config.search-widget'
-import { baseConfigurationWithoutTheme as propertyDetailConfiguration } from './rollup.config.property-detail'
+// eslint-disable-next-line max-len
+import { baseConfigurationWithoutTheme as propertyDetailWidgetConfiguration } from './rollup.config.property-detail-widget'
import themeConfiguration from './rollup.config.themes'
/**
@@ -9,10 +11,10 @@ import themeConfiguration from './rollup.config.themes'
*/
const buildConfigurations = [
- propertyDetailConfiguration,
+ propertyDetailWidgetConfiguration,
searchWidgetConfiguration,
- viewBookingBuidConfiguration,
- appointmentBookingConfiguration,
+ bookViewingWidgetConfiguration,
+ bookValuationWidgetConfiguration,
themeConfiguration,
]
diff --git a/packages/web-components/scripts/rollup.config.login.js b/packages/web-components/scripts/rollup.config.login-reapit-component.js
similarity index 80%
rename from packages/web-components/scripts/rollup.config.login.js
rename to packages/web-components/scripts/rollup.config.login-reapit-component.js
index 9a4cd47536..dfd9bc3616 100644
--- a/packages/web-components/scripts/rollup.config.login.js
+++ b/packages/web-components/scripts/rollup.config.login-reapit-component.js
@@ -9,8 +9,12 @@ const production = !process.env.ROLLUP_WATCH
export const baseConfigurationWithoutTheme = {
...baseConfig,
- input: 'src/login/index.ts',
- output: generateRollupOutput({ production, fileName: 'login-with-reapit', name: 'login' }),
+ input: 'src/login-reapit-component/index.ts',
+ output: generateRollupOutput({
+ production,
+ fileName: 'login-reapit-component',
+ name: 'loginReapitComponent',
+ }),
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(config.NODE_ENV),
diff --git a/packages/web-components/scripts/rollup.config.property-detail.js b/packages/web-components/scripts/rollup.config.property-detail-widget.js
similarity index 86%
rename from packages/web-components/scripts/rollup.config.property-detail.js
rename to packages/web-components/scripts/rollup.config.property-detail-widget.js
index 46b463356b..09fe31d8ad 100644
--- a/packages/web-components/scripts/rollup.config.property-detail.js
+++ b/packages/web-components/scripts/rollup.config.property-detail-widget.js
@@ -5,15 +5,15 @@ import path from 'path'
import generateRollupOutput from './generate-rollup-output'
import generateCssOutput from './generate-css-output'
import themesConfiguration from './rollup.config.themes.js'
-import { baseConfigurationWithoutTheme as viewBookinConfiguration } from './rollup.config.viewing-booking.js'
+import { baseConfigurationWithoutTheme as viewBookinConfiguration } from './rollup.config.book-viewing-widget.js'
const config = require(path.resolve(__dirname, '..', 'config.json'))
const production = !process.env.ROLLUP_WATCH
export const baseConfigurationWithoutTheme = {
...baseConfig,
- input: 'src/property-detail/client/core/index.ts',
- output: generateRollupOutput({ production, fileName: 'property-detail', name: 'propertyDetail' }),
+ input: 'src/property-detail-widget/client/core/index.ts',
+ output: generateRollupOutput({ production, fileName: 'property-detail-widget', name: 'propertyDetailWidget' }),
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(config.NODE_ENV),
@@ -24,7 +24,7 @@ export const baseConfigurationWithoutTheme = {
}),
svelte({
dev: !production,
- css: css => generateCssOutput({ css, fileName: 'property-detail.css', production }),
+ css: css => generateCssOutput({ css, fileName: 'property-detail-widget.css', production }),
}),
...baseConfig.plugins,
],
diff --git a/packages/web-components/scripts/rollup.config.search-widget.js b/packages/web-components/scripts/rollup.config.search-widget.js
index 89a30f5ac9..ddeb744983 100644
--- a/packages/web-components/scripts/rollup.config.search-widget.js
+++ b/packages/web-components/scripts/rollup.config.search-widget.js
@@ -1,5 +1,5 @@
import svelte from 'rollup-plugin-svelte'
-import propertyDetailConfigurations from './rollup.config.property-detail'
+import propertyDetailConfigurations from './rollup.config.property-detail-widget'
import baseConfig from './rollup.config.base'
import replace from '@rollup/plugin-replace'
import path from 'path'
diff --git a/packages/web-components/scripts/start-dev.js b/packages/web-components/scripts/start-dev.js
index 65da73677a..8e680d0b8f 100644
--- a/packages/web-components/scripts/start-dev.js
+++ b/packages/web-components/scripts/start-dev.js
@@ -4,14 +4,14 @@ const path = require('path')
const getMoveHtmlScript = packageName => {
switch (packageName) {
- case 'property-detail':
- return 'mkdir -p ./public && cp ./src/property-detail/client/detail.html ./public/index.html'
+ case 'property-detail-widget':
+ return 'mkdir -p ./public && cp ./src/property-detail-widget/client/detail.html ./public/index.html'
case 'search-widget':
// eslint-disable-next-line max-len
- return 'mkdir -p ./public && cp ./src/search-widget/client/index.html ./public/ && cp ./src/property-detail/client/detail.html ./public/'
+ return 'mkdir -p ./public && cp ./src/search-widget/client/index.html ./public/ && cp ./src/property-detail-widget/client/detail.html ./public/'
case 'demo-site':
return ''
- case 'login':
+ case 'login-reapit-component':
return `mkdir -p ./public && cp ./src/${packageName}/index.html ./public/`
default:
return `mkdir -p ./public && cp ./src/${packageName}/client/index.html ./public/`
diff --git a/packages/web-components/src/appointment-bookings/client/core/index.ts b/packages/web-components/src/appointment-bookings/client/core/index.ts
deleted file mode 100644
index 2bb4117a4c..0000000000
--- a/packages/web-components/src/appointment-bookings/client/core/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import AppointmentBooking from '../components/appointment-bookings.svelte'
-import { AppointmentBookingInitializerTheme } from './theme'
-
-export interface AppointmentBookingInitializers {
- theme: AppointmentBookingInitializerTheme
- apiKey: string
- // customerId: string
- parentSelector: string
- variant: 'VIEWING' | 'VALUATION'
-}
-
-export const ReapitAppointmentBookingComponent = ({
- parentSelector,
- theme,
- variant,
-}: // apiKey,
-// variant,
-AppointmentBookingInitializers) =>
- new AppointmentBooking({
- target: document.querySelector(parentSelector) || document.body,
- props: {
- theme,
- // TODO - will need to reference later
- // apiKey,
- // customerId,
- variant,
- parentSelector,
- },
- })
-
-Object.defineProperty(window, 'ReapitAppointmentBookingComponent', {
- value: ReapitAppointmentBookingComponent,
-})
diff --git a/packages/web-components/src/appointment-bookings/client/index.html b/packages/web-components/src/appointment-bookings/client/index.html
deleted file mode 100644
index f9547b513d..0000000000
--- a/packages/web-components/src/appointment-bookings/client/index.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-DEMO
-
-
-
-
-
-
- Book a viewing
-
-
-
-
- Book a valuation
-
-
-
-
-
-
-
-
-
diff --git a/packages/web-components/src/appointment-planner/client/components/__tests__/__snapshots__/appointment-planner.test.ts.snap b/packages/web-components/src/appointment-planner-component/client/components/__tests__/__snapshots__/appointment-planner-component.test.ts.snap
similarity index 95%
rename from packages/web-components/src/appointment-planner/client/components/__tests__/__snapshots__/appointment-planner.test.ts.snap
rename to packages/web-components/src/appointment-planner-component/client/components/__tests__/__snapshots__/appointment-planner-component.test.ts.snap
index 4c0dcf5a42..85a442da71 100644
--- a/packages/web-components/src/appointment-planner/client/components/__tests__/__snapshots__/appointment-planner.test.ts.snap
+++ b/packages/web-components/src/appointment-planner-component/client/components/__tests__/__snapshots__/appointment-planner-component.test.ts.snap
@@ -4,11 +4,11 @@ exports[`appointment bookings it matches a snapshot 1`] = `