@servicetitan/mpa-components 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +36 -36
- package/tsconfig.json +3 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/components/campaign-actions/actions-button/campaign-actions.stories.d.ts +0 -8
- package/lib/components/campaign-actions/actions-button/campaign-actions.stories.d.ts.map +0 -1
- package/lib/components/campaign-actions/actions-button/campaign-actions.stories.js +0 -11
- package/lib/components/campaign-actions/actions-button/campaign-actions.stories.js.map +0 -1
- package/lib/components/settings/company-details/company-details-form.stories.d.ts +0 -9
- package/lib/components/settings/company-details/company-details-form.stories.d.ts.map +0 -1
- package/lib/components/settings/company-details/company-details-form.stories.js +0 -30
- package/lib/components/settings/company-details/company-details-form.stories.js.map +0 -1
- package/lib/components/settings/company-email-footer/company-email-footer.stories.d.ts +0 -8
- package/lib/components/settings/company-email-footer/company-email-footer.stories.d.ts.map +0 -1
- package/lib/components/settings/company-email-footer/company-email-footer.stories.js +0 -28
- package/lib/components/settings/company-email-footer/company-email-footer.stories.js.map +0 -1
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.d.ts +0 -8
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.d.ts.map +0 -1
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.js +0 -26
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.js.map +0 -1
- package/lib/components/settings/company-email-sender/company-email-sender.stories.d.ts +0 -10
- package/lib/components/settings/company-email-sender/company-email-sender.stories.d.ts.map +0 -1
- package/lib/components/settings/company-email-sender/company-email-sender.stories.js +0 -31
- package/lib/components/settings/company-email-sender/company-email-sender.stories.js.map +0 -1
- package/lib/components/settings/company-trades-picker/company-trades-picker.stories.d.ts +0 -9
- package/lib/components/settings/company-trades-picker/company-trades-picker.stories.d.ts.map +0 -1
- package/lib/components/settings/company-trades-picker/company-trades-picker.stories.js +0 -71
- package/lib/components/settings/company-trades-picker/company-trades-picker.stories.js.map +0 -1
- package/lib/components/settings/double-opt-in/double-opt-in.stories.d.ts +0 -8
- package/lib/components/settings/double-opt-in/double-opt-in.stories.d.ts.map +0 -1
- package/lib/components/settings/double-opt-in/double-opt-in.stories.js +0 -30
- package/lib/components/settings/double-opt-in/double-opt-in.stories.js.map +0 -1
- package/lib/components/settings/email-validation/email-validation.stories.d.ts +0 -19
- package/lib/components/settings/email-validation/email-validation.stories.d.ts.map +0 -1
- package/lib/components/settings/email-validation/email-validation.stories.js +0 -100
- package/lib/components/settings/email-validation/email-validation.stories.js.map +0 -1
- package/lib/components/settings/logo-picker/logo-picker.stories.d.ts +0 -8
- package/lib/components/settings/logo-picker/logo-picker.stories.d.ts.map +0 -1
- package/lib/components/settings/logo-picker/logo-picker.stories.js +0 -13
- package/lib/components/settings/logo-picker/logo-picker.stories.js.map +0 -1
- package/lib/components/settings/opt-out-message/opt-out-message.stories.d.ts +0 -8
- package/lib/components/settings/opt-out-message/opt-out-message.stories.d.ts.map +0 -1
- package/lib/components/settings/opt-out-message/opt-out-message.stories.js +0 -32
- package/lib/components/settings/opt-out-message/opt-out-message.stories.js.map +0 -1
- package/lib/components/settings/settings-section/settings-section.stories.d.ts +0 -8
- package/lib/components/settings/settings-section/settings-section.stories.d.ts.map +0 -1
- package/lib/components/settings/settings-section/settings-section.stories.js +0 -12
- package/lib/components/settings/settings-section/settings-section.stories.js.map +0 -1
- package/src/components/campaign-actions/actions-button/campaign-actions.stories.tsx +0 -19
- package/src/components/settings/company-details/company-details-form.stories.tsx +0 -45
- package/src/components/settings/company-email-footer/company-email-footer.stories.tsx +0 -24
- package/src/components/settings/company-email-reply-to/company-email-reply-to.stories.tsx +0 -22
- package/src/components/settings/company-email-sender/company-email-sender.stories.tsx +0 -28
- package/src/components/settings/company-trades-picker/company-trades-picker.stories.tsx +0 -78
- package/src/components/settings/double-opt-in/double-opt-in.stories.tsx +0 -25
- package/src/components/settings/email-validation/email-validation.stories.tsx +0 -118
- package/src/components/settings/logo-picker/logo-picker.stories.tsx +0 -21
- package/src/components/settings/opt-out-message/opt-out-message.stories.tsx +0 -27
- package/src/components/settings/settings-section/settings-section.stories.tsx +0 -16
- /package/{lib → dist}/components/brands/brand-card/actions-button-section.d.ts +0 -0
- /package/{lib → dist}/components/brands/brand-card/actions-button-section.d.ts.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/actions-button-section.js +0 -0
- /package/{lib → dist}/components/brands/brand-card/actions-button-section.js.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/brand-card.d.ts +0 -0
- /package/{lib → dist}/components/brands/brand-card/brand-card.d.ts.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/brand-card.js +0 -0
- /package/{lib → dist}/components/brands/brand-card/brand-card.js.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/info-section.d.ts +0 -0
- /package/{lib → dist}/components/brands/brand-card/info-section.d.ts.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/info-section.js +0 -0
- /package/{lib → dist}/components/brands/brand-card/info-section.js.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/single-action-button.d.ts +0 -0
- /package/{lib → dist}/components/brands/brand-card/single-action-button.d.ts.map +0 -0
- /package/{lib → dist}/components/brands/brand-card/single-action-button.js +0 -0
- /package/{lib → dist}/components/brands/brand-card/single-action-button.js.map +0 -0
- /package/{lib → dist}/components/brands/cards-grid/cards-grid.d.ts +0 -0
- /package/{lib → dist}/components/brands/cards-grid/cards-grid.d.ts.map +0 -0
- /package/{lib → dist}/components/brands/cards-grid/cards-grid.js +0 -0
- /package/{lib → dist}/components/brands/cards-grid/cards-grid.js.map +0 -0
- /package/{lib → dist}/components/brands/index.d.ts +0 -0
- /package/{lib → dist}/components/brands/index.d.ts.map +0 -0
- /package/{lib → dist}/components/brands/index.js +0 -0
- /package/{lib → dist}/components/brands/index.js.map +0 -0
- /package/{lib → dist}/components/brands/styles.module.less +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-archive.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-archive.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-archive.js +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-archive.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-clone.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-clone.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-clone.js +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-clone.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-edit.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-edit.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-edit.js +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-edit.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.js +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button.js +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/action-button/action-button.module.less +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/actions-button.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/actions-button.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/actions-button.js +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/actions-button.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/actions-button.module.less +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/campaign-actions.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/campaign-actions.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/campaign-actions.js +0 -0
- /package/{lib → dist}/components/campaign-actions/actions-button/campaign-actions.js.map +0 -0
- /package/{lib → dist}/components/campaign-actions/index.d.ts +0 -0
- /package/{lib → dist}/components/campaign-actions/index.d.ts.map +0 -0
- /package/{lib → dist}/components/campaign-actions/index.js +0 -0
- /package/{lib → dist}/components/campaign-actions/index.js.map +0 -0
- /package/{lib → dist}/components/settings/company-details/company-details-form.module.less +0 -0
- /package/{lib → dist}/components/settings/company-details/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-details/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-details/index.js +0 -0
- /package/{lib → dist}/components/settings/company-details/index.js.map +0 -0
- /package/{lib → dist}/components/settings/company-email-footer/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-email-footer/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-email-footer/index.js +0 -0
- /package/{lib → dist}/components/settings/company-email-footer/index.js.map +0 -0
- /package/{lib → dist}/components/settings/company-email-reply-to/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-email-reply-to/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-email-reply-to/index.js +0 -0
- /package/{lib → dist}/components/settings/company-email-reply-to/index.js.map +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/company-email-sender.module.less +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/custom-domain-sender.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/custom-domain-sender.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/custom-domain-sender.js +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/custom-domain-sender.js.map +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/index.js +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/index.js.map +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/simple-sender.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/simple-sender.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/simple-sender.js +0 -0
- /package/{lib → dist}/components/settings/company-email-sender/simple-sender.js.map +0 -0
- /package/{lib → dist}/components/settings/company-trade-checkbox/company-trade-checkbox.module.less +0 -0
- /package/{lib → dist}/components/settings/company-trade-checkbox/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-trade-checkbox/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-trade-checkbox/index.js +0 -0
- /package/{lib → dist}/components/settings/company-trade-checkbox/index.js.map +0 -0
- /package/{lib → dist}/components/settings/company-trades-picker/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/company-trades-picker/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/company-trades-picker/index.js +0 -0
- /package/{lib → dist}/components/settings/company-trades-picker/index.js.map +0 -0
- /package/{lib → dist}/components/settings/double-opt-in/double-opt-in.module.less +0 -0
- /package/{lib → dist}/components/settings/double-opt-in/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/double-opt-in/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/double-opt-in/index.js +0 -0
- /package/{lib → dist}/components/settings/double-opt-in/index.js.map +0 -0
- /package/{lib → dist}/components/settings/email-preview/email-preview.d.ts +0 -0
- /package/{lib → dist}/components/settings/email-preview/email-preview.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/email-preview/email-preview.js +0 -0
- /package/{lib → dist}/components/settings/email-preview/email-preview.js.map +0 -0
- /package/{lib → dist}/components/settings/email-preview/email-preview.module.less +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-in-email-preview.d.ts +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-in-email-preview.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-in-email-preview.js +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-in-email-preview.js.map +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-out-email-preview.d.ts +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-out-email-preview.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-out-email-preview.js +0 -0
- /package/{lib → dist}/components/settings/email-preview/opt-out-email-preview.js.map +0 -0
- /package/{lib → dist}/components/settings/email-validation/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/email-validation/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/email-validation/index.js +0 -0
- /package/{lib → dist}/components/settings/email-validation/index.js.map +0 -0
- /package/{lib → dist}/components/settings/form-errors-list/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/form-errors-list/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/form-errors-list/index.js +0 -0
- /package/{lib → dist}/components/settings/form-errors-list/index.js.map +0 -0
- /package/{lib → dist}/components/settings/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/index.js +0 -0
- /package/{lib → dist}/components/settings/index.js.map +0 -0
- /package/{lib → dist}/components/settings/logo-picker/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/logo-picker/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/logo-picker/index.js +0 -0
- /package/{lib → dist}/components/settings/logo-picker/index.js.map +0 -0
- /package/{lib → dist}/components/settings/logo-picker/logo-picker.module.less +0 -0
- /package/{lib → dist}/components/settings/opt-out-message/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/opt-out-message/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/opt-out-message/index.js +0 -0
- /package/{lib → dist}/components/settings/opt-out-message/index.js.map +0 -0
- /package/{lib → dist}/components/settings/opt-out-message/opt-out-message.module.less +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/header.d.ts +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/header.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/header.js +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/header.js.map +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/index.js +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/index.js.map +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/result-definitions-modal.module.less +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/row.d.ts +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/row.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/row.js +0 -0
- /package/{lib → dist}/components/settings/result-definitions-modal/row.js.map +0 -0
- /package/{lib → dist}/components/settings/settings-section/index.d.ts +0 -0
- /package/{lib → dist}/components/settings/settings-section/index.d.ts.map +0 -0
- /package/{lib → dist}/components/settings/settings-section/index.js +0 -0
- /package/{lib → dist}/components/settings/settings-section/index.js.map +0 -0
- /package/{lib → dist}/enums/brands.d.ts +0 -0
- /package/{lib → dist}/enums/brands.d.ts.map +0 -0
- /package/{lib → dist}/enums/brands.js +0 -0
- /package/{lib → dist}/enums/brands.js.map +0 -0
- /package/{lib → dist}/index.d.ts +0 -0
- /package/{lib → dist}/index.d.ts.map +0 -0
- /package/{lib → dist}/index.js +0 -0
- /package/{lib → dist}/index.js.map +0 -0
- /package/{lib → dist}/utils/helpers.d.ts +0 -0
- /package/{lib → dist}/utils/helpers.d.ts.map +0 -0
- /package/{lib → dist}/utils/helpers.js +0 -0
- /package/{lib → dist}/utils/helpers.js.map +0 -0
- /package/{lib → dist}/utils/interfaces.d.ts +0 -0
- /package/{lib → dist}/utils/interfaces.d.ts.map +0 -0
- /package/{lib → dist}/utils/interfaces.js +0 -0
- /package/{lib → dist}/utils/interfaces.js.map +0 -0
- /package/{lib → dist}/utils/mappers.d.ts +0 -0
- /package/{lib → dist}/utils/mappers.d.ts.map +0 -0
- /package/{lib → dist}/utils/mappers.js +0 -0
- /package/{lib → dist}/utils/mappers.js.map +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CampaignActions as Component } from './campaign-actions';
|
|
2
|
-
|
|
3
|
-
export function CampaignActions() {
|
|
4
|
-
return (
|
|
5
|
-
<Component
|
|
6
|
-
onClickEdit={() => {}}
|
|
7
|
-
onClickStop={() => {}}
|
|
8
|
-
onClickClone={() => {}}
|
|
9
|
-
onClickArchive={() => {}}
|
|
10
|
-
onClickUnarchive={() => {}}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
title: 'MRK Components/CampaignActions',
|
|
17
|
-
component: CampaignActions,
|
|
18
|
-
parameters: {},
|
|
19
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { InputFieldState } from '@servicetitan/form';
|
|
2
|
-
import { FormState } from 'formstate';
|
|
3
|
-
|
|
4
|
-
import { CompanyDetails as Component } from '.';
|
|
5
|
-
import { LogoPicker } from '../logo-picker/logo-picker.stories';
|
|
6
|
-
import omit from 'lodash/omit';
|
|
7
|
-
|
|
8
|
-
const form = new FormState({
|
|
9
|
-
companyName: new InputFieldState('Acme Inc'),
|
|
10
|
-
tagline: new InputFieldState('Ayo! The Acme rules'),
|
|
11
|
-
street: new InputFieldState('Backed st.'),
|
|
12
|
-
unit: new InputFieldState('123'),
|
|
13
|
-
city: new InputFieldState('Glendale'),
|
|
14
|
-
state: new InputFieldState('CA'),
|
|
15
|
-
zipCode: new InputFieldState('91203'),
|
|
16
|
-
companyEmail: new InputFieldState('info@acme.com'),
|
|
17
|
-
companyWebsite: new InputFieldState('www.acme.com'),
|
|
18
|
-
yearEstablished: new InputFieldState(1999),
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export const CompanyDetailsWithoutWebsite = () => {
|
|
22
|
-
return (
|
|
23
|
-
<Component
|
|
24
|
-
formState={omit(form.$, ['companyWebsite'])}
|
|
25
|
-
logoPicker={<LogoPicker />}
|
|
26
|
-
handleCompanyEmailBlur={() => alert('company email blurred')}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const CompanyDetails = () => {
|
|
32
|
-
return (
|
|
33
|
-
<Component
|
|
34
|
-
formState={form.$}
|
|
35
|
-
logoPicker={<LogoPicker />}
|
|
36
|
-
handleCompanyEmailBlur={() => alert('company email blurred')}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default {
|
|
42
|
-
title: 'MPA Components/settings/CompanyDetails',
|
|
43
|
-
component: CompanyDetails,
|
|
44
|
-
parameters: {},
|
|
45
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { InputFieldState, TextAreaFieldState } from '@servicetitan/form';
|
|
2
|
-
import { FormState } from 'formstate';
|
|
3
|
-
|
|
4
|
-
import { CompanyEmailFooter as Component } from '.';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'MPA Components/settings/CompanyEmailFooter',
|
|
8
|
-
component: Component,
|
|
9
|
-
parameters: {},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
class CompanyEmailStore {
|
|
13
|
-
form = new FormState({
|
|
14
|
-
legalCopy: new TextAreaFieldState('Legal copy example'),
|
|
15
|
-
license: new InputFieldState('License'),
|
|
16
|
-
copyrightText: new InputFieldState('Copyritght 2022'),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const store = new CompanyEmailStore();
|
|
21
|
-
|
|
22
|
-
export const CompanyEmailFooter = () => {
|
|
23
|
-
return <Component formState={store.form.$} />;
|
|
24
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { InputFieldState } from '@servicetitan/form';
|
|
2
|
-
import { FormState } from 'formstate';
|
|
3
|
-
|
|
4
|
-
import { CompanyEmailReplyTo as Component } from '.';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'MPA Components/settings/CompanyEmailReplyTo',
|
|
8
|
-
component: Component,
|
|
9
|
-
parameters: {},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
class CompanyEmailReplyToStore {
|
|
13
|
-
form = new FormState({
|
|
14
|
-
replyToEmail: new InputFieldState('info@acme.com'),
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const store = new CompanyEmailReplyToStore();
|
|
19
|
-
|
|
20
|
-
export const CompanyEmailReplyTo = () => {
|
|
21
|
-
return <Component replyToEmail={store.form.$.replyToEmail} />;
|
|
22
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { InputFieldState } from '@servicetitan/form';
|
|
2
|
-
import { FormState } from 'formstate';
|
|
3
|
-
|
|
4
|
-
import { CompanyEmailSender as Simple, CompanyEmailSenderCustomDomain as Custom } from '.';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'MPA Components/settings/CompanyEmailSender',
|
|
8
|
-
component: Simple,
|
|
9
|
-
parameters: {},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
class CompanyEmailSenderStore {
|
|
13
|
-
form = new FormState({
|
|
14
|
-
senderEmail: new InputFieldState('email@acme.com'),
|
|
15
|
-
senderName: new InputFieldState('Pinky & Brain'),
|
|
16
|
-
senderDomain: new InputFieldState('acme'),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const store = new CompanyEmailSenderStore();
|
|
21
|
-
|
|
22
|
-
export const CompanyEmailSenderCustomDomain = () => {
|
|
23
|
-
return <Custom formState={store.form.$} senderTld="tld.com" />;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const CompanyEmailSender = () => {
|
|
27
|
-
return <Simple senderName={store.form.$.senderName} senderEmail={store.form.$.senderEmail} />;
|
|
28
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { useCallback, useState } from 'react';
|
|
2
|
-
import { CompanyTradesPicker as Component, Trade } from '.';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'MPA Components/settings/CompanyTradesPicker',
|
|
6
|
-
component: Component,
|
|
7
|
-
parameters: {},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
enum TradeType {
|
|
11
|
-
first = 'FIRST',
|
|
12
|
-
second = 'SECOND',
|
|
13
|
-
third = 'THIRD',
|
|
14
|
-
fourth = 'FOURTH',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function CompanyTradesPicker() {
|
|
18
|
-
const [trades, setTrades] = useState<Trade<TradeType>[]>([
|
|
19
|
-
{
|
|
20
|
-
qaKey: 'first',
|
|
21
|
-
name: 'first',
|
|
22
|
-
value: TradeType.first,
|
|
23
|
-
active: true,
|
|
24
|
-
asset: {
|
|
25
|
-
main: 'https://place-hold.it/64x64',
|
|
26
|
-
x2: 'https://place-hold.it/128x128',
|
|
27
|
-
x3: 'https://place-hold.it/192x192',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
qaKey: 'second',
|
|
32
|
-
name: 'second',
|
|
33
|
-
value: TradeType.second,
|
|
34
|
-
active: false,
|
|
35
|
-
asset: {
|
|
36
|
-
main: 'https://place-hold.it/64x64',
|
|
37
|
-
x2: 'https://place-hold.it/128x128',
|
|
38
|
-
x3: 'https://place-hold.it/192x192',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
qaKey: 'third',
|
|
43
|
-
name: 'third',
|
|
44
|
-
value: TradeType.third,
|
|
45
|
-
active: false,
|
|
46
|
-
asset: {
|
|
47
|
-
main: 'https://place-hold.it/64x64',
|
|
48
|
-
x2: 'https://place-hold.it/128x128',
|
|
49
|
-
x3: 'https://place-hold.it/192x192',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
qaKey: 'fourth',
|
|
54
|
-
name: 'fourth',
|
|
55
|
-
value: TradeType.fourth,
|
|
56
|
-
active: false,
|
|
57
|
-
asset: {
|
|
58
|
-
main: 'https://place-hold.it/64x64',
|
|
59
|
-
x2: 'https://place-hold.it/128x128',
|
|
60
|
-
x3: 'https://place-hold.it/192x192',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
]);
|
|
64
|
-
|
|
65
|
-
const selectTrade = useCallback(
|
|
66
|
-
(t: TradeType) => {
|
|
67
|
-
setTrades(
|
|
68
|
-
trades.map(trade => ({
|
|
69
|
-
...trade,
|
|
70
|
-
active: trade.value === t ? !trade.active : trade.active,
|
|
71
|
-
})),
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
[trades],
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
return <Component<TradeType> trades={trades} onTradeChange={selectTrade} />;
|
|
78
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CheckboxFieldState, InputFieldState, TextAreaFieldState } from '@servicetitan/form';
|
|
2
|
-
import { FormState } from 'formstate';
|
|
3
|
-
import { DoubleOptIn as Component } from '.';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'MPA Components/settings/DoubleOptIn',
|
|
7
|
-
component: Component,
|
|
8
|
-
parameters: {},
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
class DoubleOptInStore {
|
|
12
|
-
form = new FormState({
|
|
13
|
-
emailSubject: new InputFieldState('Jump in'),
|
|
14
|
-
emailHeader: new InputFieldState('Right now'),
|
|
15
|
-
emailBody: new TextAreaFieldState('Jump in right now! Please!'),
|
|
16
|
-
emailButtonText: new InputFieldState('JUMP IN'),
|
|
17
|
-
enabled: new CheckboxFieldState(true),
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const store = new DoubleOptInStore();
|
|
22
|
-
|
|
23
|
-
export const DoubleOptIn = () => {
|
|
24
|
-
return <Component formState={store.form.$} />;
|
|
25
|
-
};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { TableCellProps, TableState } from '@servicetitan/table';
|
|
3
|
-
import { InMemoryDataSource } from '@servicetitan/data-query';
|
|
4
|
-
|
|
5
|
-
import { emailValidationHoc, EmailValidationTableRecord } from '.';
|
|
6
|
-
|
|
7
|
-
enum EmailValidationLevel {
|
|
8
|
-
Low = 1,
|
|
9
|
-
Medium = 2,
|
|
10
|
-
High = 3,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
enum EmailValidationResult {
|
|
14
|
-
Undeliverable = 0,
|
|
15
|
-
Typo = 1,
|
|
16
|
-
Risky = 2,
|
|
17
|
-
Pending = -1,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const levelResultMap = new Map([
|
|
21
|
-
[EmailValidationLevel.High, [EmailValidationResult.Undeliverable]],
|
|
22
|
-
[EmailValidationLevel.Medium, [EmailValidationResult.Undeliverable]],
|
|
23
|
-
[EmailValidationLevel.Low, [EmailValidationResult.Undeliverable]],
|
|
24
|
-
]);
|
|
25
|
-
|
|
26
|
-
const resultToText = new Map<EmailValidationResult, string>([
|
|
27
|
-
[EmailValidationResult.Risky, 'Risky'],
|
|
28
|
-
[EmailValidationResult.Typo, 'Typo'],
|
|
29
|
-
[EmailValidationResult.Undeliverable, 'Undeliverable'],
|
|
30
|
-
]);
|
|
31
|
-
|
|
32
|
-
const resultToTooltipText = new Map<EmailValidationResult, string>([
|
|
33
|
-
[
|
|
34
|
-
EmailValidationResult.Risky,
|
|
35
|
-
'Address was determined risky based on historical analysis or problematic results.',
|
|
36
|
-
],
|
|
37
|
-
[
|
|
38
|
-
EmailValidationResult.Typo,
|
|
39
|
-
'Address was possibly typed incorrectly during sign-up, or matches known typo domains',
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
EmailValidationResult.Undeliverable,
|
|
43
|
-
'Address was determined invalid after performing multiple checks including MX, SMTP, etc.',
|
|
44
|
-
],
|
|
45
|
-
]);
|
|
46
|
-
|
|
47
|
-
const EmailValidationComponent = emailValidationHoc<EmailValidationLevel, EmailValidationResult>({
|
|
48
|
-
resultToText,
|
|
49
|
-
levelTypeMap: {
|
|
50
|
-
high: EmailValidationLevel.High,
|
|
51
|
-
medium: EmailValidationLevel.Medium,
|
|
52
|
-
low: EmailValidationLevel.Low,
|
|
53
|
-
},
|
|
54
|
-
levelResultMap,
|
|
55
|
-
resultToTooltipText,
|
|
56
|
-
TenantDateCell: (props: TableCellProps) => {
|
|
57
|
-
const value = props.dataItem[props.field!];
|
|
58
|
-
return <td className={props.className}>{value.toString()}</td>;
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export default {
|
|
63
|
-
title: 'MPA Components/settings/EmailValidation',
|
|
64
|
-
component: EmailValidationComponent,
|
|
65
|
-
parameters: {},
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export function EmailValidation() {
|
|
69
|
-
const [type, setType] = useState<EmailValidationLevel>(EmailValidationLevel.High);
|
|
70
|
-
const [loading, setLoading] = useState(true);
|
|
71
|
-
|
|
72
|
-
const grid = new TableState<EmailValidationTableRecord<EmailValidationResult>>({
|
|
73
|
-
dataSource: null,
|
|
74
|
-
pageSize: 15,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
async function load() {
|
|
79
|
-
if (!loading) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
setLoading(true);
|
|
83
|
-
const dataSource = new InMemoryDataSource<
|
|
84
|
-
EmailValidationTableRecord<EmailValidationResult>
|
|
85
|
-
>([
|
|
86
|
-
{
|
|
87
|
-
id: 1,
|
|
88
|
-
active: false,
|
|
89
|
-
createdOn: new Date(),
|
|
90
|
-
result: EmailValidationResult.Risky,
|
|
91
|
-
email: 'varg@vikernes.com',
|
|
92
|
-
dateAdded: new Date(),
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: 2,
|
|
96
|
-
active: true,
|
|
97
|
-
createdOn: new Date(),
|
|
98
|
-
result: EmailValidationResult.Typo,
|
|
99
|
-
email: 'joe@biden.com',
|
|
100
|
-
dateAdded: new Date(),
|
|
101
|
-
},
|
|
102
|
-
]);
|
|
103
|
-
await grid.setDataSource(dataSource, true);
|
|
104
|
-
setLoading(false);
|
|
105
|
-
}
|
|
106
|
-
load();
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
return (
|
|
110
|
-
<EmailValidationComponent
|
|
111
|
-
loading={loading}
|
|
112
|
-
resultGrid={grid}
|
|
113
|
-
validationRiskType={type}
|
|
114
|
-
setValidationRiskType={setType}
|
|
115
|
-
handleDownload={() => alert('downloading csv')}
|
|
116
|
-
/>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { LogoPicker as Component } from '.';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'MPA Components/settings/LogoPicker',
|
|
6
|
-
component: LogoPicker,
|
|
7
|
-
parameters: {},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export function LogoPicker() {
|
|
11
|
-
const [url, setUrl] = useState<string | undefined>();
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<Component
|
|
15
|
-
imageUrl={url}
|
|
16
|
-
minDimensions={{ height: 300, width: 300 }}
|
|
17
|
-
onFileChange={() => setUrl('https://place-hold.it/300x300')}
|
|
18
|
-
deleteImage={() => alert('image deleted')}
|
|
19
|
-
/>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CheckboxFieldState, InputFieldState, TextAreaFieldState } from '@servicetitan/form';
|
|
2
|
-
import { FormState } from 'formstate';
|
|
3
|
-
import { OptOutMessage as Component } from '.';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'MPA Components/settings/OptOutMessage',
|
|
7
|
-
component: Component,
|
|
8
|
-
parameters: {},
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
class OptOutStore {
|
|
12
|
-
form = new FormState({
|
|
13
|
-
subjectLine: new InputFieldState('Good bye'),
|
|
14
|
-
header: new InputFieldState('Opt out of emails'),
|
|
15
|
-
body: new TextAreaFieldState('Sorry to see you go!'),
|
|
16
|
-
buttonText: new InputFieldState('Bye'),
|
|
17
|
-
monthsLimit: new InputFieldState(6),
|
|
18
|
-
enabled: new CheckboxFieldState(true),
|
|
19
|
-
autoSuppressionEnabled: new CheckboxFieldState(true),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const store = new OptOutStore();
|
|
24
|
-
|
|
25
|
-
export const OptOutMessage = () => {
|
|
26
|
-
return <Component formState={store.form.$} />;
|
|
27
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Headline } from '@servicetitan/design-system';
|
|
2
|
-
import { SettingsSection as Component } from '.';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'MPA Components/settings/SettingsSection',
|
|
6
|
-
component: Component,
|
|
7
|
-
parameters: {},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const SettingsSection = () => {
|
|
11
|
-
return (
|
|
12
|
-
<Component title="Hey! The test">
|
|
13
|
-
<Headline>The body</Headline>
|
|
14
|
-
</Component>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/campaign-actions/action-button/action-button-archive.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/campaign-actions/action-button/action-button-archive.js.map
RENAMED
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/campaign-actions/action-button/action-button-clone.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.d.ts
RENAMED
|
File without changes
|
/package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/campaign-actions/action-button/action-button-unarchive.js.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/settings/company-email-sender/company-email-sender.module.less
RENAMED
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/components/settings/company-email-sender/custom-domain-sender.d.ts.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|