@servicetitan/mpa-components 1.8.0 → 1.10.0
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/lib/components/campaign-actions/action-button/action-button-archive.js +1 -1
- package/lib/components/campaign-actions/action-button/action-button-archive.js.map +1 -1
- package/lib/components/campaign-actions/action-button/action-button-clone.js +1 -1
- package/lib/components/campaign-actions/action-button/action-button-clone.js.map +1 -1
- package/lib/components/campaign-actions/action-button/action-button-edit.js +1 -1
- package/lib/components/campaign-actions/action-button/action-button-edit.js.map +1 -1
- package/lib/components/campaign-actions/action-button/action-button-unarchive.js +1 -1
- package/lib/components/campaign-actions/action-button/action-button-unarchive.js.map +1 -1
- package/lib/components/campaign-actions/action-button/action-button.js +2 -2
- package/lib/components/campaign-actions/action-button/action-button.js.map +1 -1
- package/lib/components/campaign-actions/actions-button/actions-button.js +2 -2
- package/lib/components/campaign-actions/actions-button/actions-button.js.map +1 -1
- package/lib/components/campaign-actions/actions-button/campaign-actions.js +2 -2
- package/lib/components/campaign-actions/actions-button/campaign-actions.js.map +1 -1
- package/lib/components/settings/company-details/company-details-form.stories.d.ts +3 -3
- package/lib/components/settings/company-details/company-details-form.stories.d.ts.map +1 -1
- package/lib/components/settings/company-details/company-details-form.stories.js +17 -38
- package/lib/components/settings/company-details/company-details-form.stories.js.map +1 -1
- package/lib/components/settings/company-details/index.js +2 -2
- package/lib/components/settings/company-details/index.js.map +1 -1
- package/lib/components/settings/company-email-footer/company-email-footer.stories.d.ts +1 -2
- package/lib/components/settings/company-email-footer/company-email-footer.stories.d.ts.map +1 -1
- package/lib/components/settings/company-email-footer/company-email-footer.stories.js +5 -15
- package/lib/components/settings/company-email-footer/company-email-footer.stories.js.map +1 -1
- package/lib/components/settings/company-email-footer/index.js +2 -2
- package/lib/components/settings/company-email-footer/index.js.map +1 -1
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.d.ts +1 -2
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.d.ts.map +1 -1
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.js +5 -15
- package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.js.map +1 -1
- package/lib/components/settings/company-email-reply-to/index.js +1 -1
- package/lib/components/settings/company-email-reply-to/index.js.map +1 -1
- package/lib/components/settings/company-email-sender/company-email-sender.stories.d.ts +2 -3
- package/lib/components/settings/company-email-sender/company-email-sender.stories.d.ts.map +1 -1
- package/lib/components/settings/company-email-sender/company-email-sender.stories.js +7 -18
- package/lib/components/settings/company-email-sender/company-email-sender.stories.js.map +1 -1
- package/lib/components/settings/company-email-sender/custom-domain-sender.js +3 -3
- package/lib/components/settings/company-email-sender/custom-domain-sender.js.map +1 -1
- package/lib/components/settings/company-email-sender/simple-sender.js +1 -1
- package/lib/components/settings/company-email-sender/simple-sender.js.map +1 -1
- package/lib/components/settings/company-trade-checkbox/index.d.ts +0 -1
- package/lib/components/settings/company-trade-checkbox/index.d.ts.map +1 -1
- package/lib/components/settings/company-trade-checkbox/index.js +1 -1
- package/lib/components/settings/company-trade-checkbox/index.js.map +1 -1
- package/lib/components/settings/company-trades-picker/company-trades-picker.stories.js +4 -1
- package/lib/components/settings/company-trades-picker/company-trades-picker.stories.js.map +1 -1
- package/lib/components/settings/company-trades-picker/index.d.ts +2 -1
- package/lib/components/settings/company-trades-picker/index.d.ts.map +1 -1
- package/lib/components/settings/company-trades-picker/index.js +6 -6
- package/lib/components/settings/company-trades-picker/index.js.map +1 -1
- package/lib/components/settings/double-opt-in/double-opt-in.stories.d.ts +1 -2
- package/lib/components/settings/double-opt-in/double-opt-in.stories.d.ts.map +1 -1
- package/lib/components/settings/double-opt-in/double-opt-in.stories.js +5 -17
- package/lib/components/settings/double-opt-in/double-opt-in.stories.js.map +1 -1
- package/lib/components/settings/double-opt-in/index.js +1 -1
- package/lib/components/settings/double-opt-in/index.js.map +1 -1
- package/lib/components/settings/email-preview/email-preview.js +1 -1
- package/lib/components/settings/email-preview/email-preview.js.map +1 -1
- package/lib/components/settings/email-preview/opt-in-email-preview.js.map +1 -1
- package/lib/components/settings/email-preview/opt-out-email-preview.js.map +1 -1
- package/lib/components/settings/email-validation/email-validation.stories.js +26 -37
- package/lib/components/settings/email-validation/email-validation.stories.js.map +1 -1
- package/lib/components/settings/email-validation/index.d.ts.map +1 -1
- package/lib/components/settings/email-validation/index.js +2 -2
- package/lib/components/settings/email-validation/index.js.map +1 -1
- package/lib/components/settings/form-errors-list/index.js +2 -2
- package/lib/components/settings/form-errors-list/index.js.map +1 -1
- package/lib/components/settings/logo-picker/index.d.ts +1 -0
- package/lib/components/settings/logo-picker/index.d.ts.map +1 -1
- package/lib/components/settings/logo-picker/index.js +10 -18
- package/lib/components/settings/logo-picker/index.js.map +1 -1
- package/lib/components/settings/opt-out-message/index.js +1 -1
- package/lib/components/settings/opt-out-message/index.js.map +1 -1
- package/lib/components/settings/opt-out-message/opt-out-message.stories.d.ts +1 -2
- package/lib/components/settings/opt-out-message/opt-out-message.stories.d.ts.map +1 -1
- package/lib/components/settings/opt-out-message/opt-out-message.stories.js +5 -17
- package/lib/components/settings/opt-out-message/opt-out-message.stories.js.map +1 -1
- package/lib/components/settings/result-definitions-modal/header.js +1 -1
- package/lib/components/settings/result-definitions-modal/header.js.map +1 -1
- package/lib/components/settings/result-definitions-modal/index.js +1 -1
- package/lib/components/settings/result-definitions-modal/index.js.map +1 -1
- package/lib/components/settings/result-definitions-modal/row.js +1 -1
- package/lib/components/settings/result-definitions-modal/row.js.map +1 -1
- package/lib/components/settings/settings-section/index.d.ts +1 -1
- package/lib/components/settings/settings-section/index.d.ts.map +1 -1
- package/lib/components/settings/settings-section/index.js +1 -1
- package/lib/components/settings/settings-section/index.js.map +1 -1
- package/lib/components/settings/settings-section/settings-section.stories.d.ts +0 -1
- package/lib/components/settings/settings-section/settings-section.stories.d.ts.map +1 -1
- package/lib/components/settings/settings-section/settings-section.stories.js +1 -1
- package/lib/components/settings/settings-section/settings-section.stories.js.map +1 -1
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/helpers.js.map +1 -1
- package/package.json +2 -2
- package/src/components/settings/company-details/company-details-form.stories.tsx +18 -26
- package/src/components/settings/company-details/index.tsx +1 -1
- package/src/components/settings/company-email-footer/company-email-footer.stories.tsx +3 -5
- package/src/components/settings/company-email-footer/index.tsx +1 -1
- package/src/components/settings/company-email-reply-to/company-email-reply-to.stories.tsx +4 -5
- package/src/components/settings/company-email-reply-to/index.tsx +1 -1
- package/src/components/settings/company-email-sender/company-email-sender.stories.tsx +6 -12
- package/src/components/settings/company-email-sender/custom-domain-sender.tsx +4 -4
- package/src/components/settings/company-email-sender/simple-sender.tsx +2 -2
- package/src/components/settings/company-trades-picker/company-trades-picker.stories.tsx +2 -2
- package/src/components/settings/company-trades-picker/index.tsx +4 -2
- package/src/components/settings/double-opt-in/double-opt-in.stories.tsx +4 -7
- package/src/components/settings/double-opt-in/index.tsx +3 -3
- package/src/components/settings/email-preview/email-preview.tsx +1 -1
- package/src/components/settings/email-preview/opt-in-email-preview.tsx +1 -1
- package/src/components/settings/email-validation/index.tsx +5 -5
- package/src/components/settings/form-errors-list/index.tsx +2 -2
- package/src/components/settings/logo-picker/index.tsx +104 -72
- package/src/components/settings/opt-out-message/index.tsx +2 -2
- package/src/components/settings/opt-out-message/opt-out-message.stories.tsx +3 -7
- package/src/components/settings/settings-section/index.tsx +5 -3
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.10.0](https://github.com/servicetitan/marketing/compare/@servicetitan/mpa-components@1.9.0...@servicetitan/mpa-components@1.10.0) (2024-09-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @servicetitan/mpa-components
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.9.0](https://github.com/servicetitan/marketing/compare/@servicetitan/mpa-components@1.8.0...@servicetitan/mpa-components@1.9.0) (2024-06-13)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @servicetitan/mpa-components
|
|
17
|
+
|
|
6
18
|
# [1.8.0](https://github.com/servicetitan/marketing/compare/@servicetitan/mpa-components@1.7.0...@servicetitan/mpa-components@1.8.0) (2024-05-24)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionButton } from './action-button';
|
|
3
|
-
export const ActionButtonArchive = props => (_jsx(ActionButton,
|
|
3
|
+
export const ActionButtonArchive = props => (_jsx(ActionButton, { ...props, iconName: "archive", hover: "primary", tooltip: props.tooltip, qaPrefix: "qa-action-button-archive", children: "Archive" }));
|
|
4
4
|
//# sourceMappingURL=action-button-archive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-button-archive.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-archive.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,mBAAmB,GAI3B,KAAK,CAAC,EAAE,CAAC,CACV,KAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"action-button-archive.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-archive.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,mBAAmB,GAI3B,KAAK,CAAC,EAAE,CAAC,CACV,KAAC,YAAY,OACL,KAAK,EACT,QAAQ,EAAC,SAAS,EAClB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAC,0BAA0B,wBAGxB,CAClB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionButton } from './action-button';
|
|
3
|
-
export const ActionButtonClone = props => (_jsx(ActionButton,
|
|
3
|
+
export const ActionButtonClone = props => (_jsx(ActionButton, { ...props, iconName: "control_point_duplicate", hover: "primary", qaPrefix: "qa-action-button-clone", children: "Clone" }));
|
|
4
4
|
//# sourceMappingURL=action-button-clone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-button-clone.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-clone.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAiD,KAAK,CAAC,EAAE,CAAC,CACpF,KAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"action-button-clone.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-clone.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAAiD,KAAK,CAAC,EAAE,CAAC,CACpF,KAAC,YAAY,OACL,KAAK,EACT,QAAQ,EAAC,yBAAyB,EAClC,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,wBAAwB,sBAGtB,CAClB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionButton } from './action-button';
|
|
3
|
-
export const ActionButtonEdit = props => (_jsx(ActionButton,
|
|
3
|
+
export const ActionButtonEdit = props => (_jsx(ActionButton, { ...props, iconName: "edit", hover: "primary", qaPrefix: "qa-action-button-edit", tooltip: props.tooltip, children: "Edit" }));
|
|
4
4
|
//# sourceMappingURL=action-button-edit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-button-edit.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-edit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAIxB,KAAK,CAAC,EAAE,CAAC,CACV,KAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"action-button-edit.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-edit.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAIxB,KAAK,CAAC,EAAE,CAAC,CACV,KAAC,YAAY,OACL,KAAK,EACT,QAAQ,EAAC,MAAM,EACf,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,uBAAuB,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,qBAGX,CAClB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ActionButton } from './action-button';
|
|
3
|
-
export const ActionButtonUnarchive = props => (_jsx(ActionButton,
|
|
3
|
+
export const ActionButtonUnarchive = props => (_jsx(ActionButton, { ...props, iconName: "unarchive", hover: "primary", qaPrefix: "qa-action-button-unarchive", children: "Unarchive" }));
|
|
4
4
|
//# sourceMappingURL=action-button-unarchive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-button-unarchive.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-unarchive.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,qBAAqB,GAAiD,KAAK,CAAC,EAAE,CAAC,CACxF,KAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"action-button-unarchive.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button-unarchive.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,qBAAqB,GAAiD,KAAK,CAAC,EAAE,CAAC,CACxF,KAAC,YAAY,OACL,KAAK,EACT,QAAQ,EAAC,WAAW,EACpB,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,4BAA4B,0BAG1B,CAClB,CAAC"}
|
|
@@ -19,11 +19,11 @@ export const ActionButton = ({ active, children, disabled, iconName, onClick, qa
|
|
|
19
19
|
[Styles.primary]: !disabled,
|
|
20
20
|
[Styles.focusVisible]: isFocusVisible,
|
|
21
21
|
});
|
|
22
|
-
return (_jsxs("button",
|
|
22
|
+
return (_jsxs("button", { type: "button", ref: buttonRef, className: classes, onClick: handleClick, disabled: disabled, onFocus: focusFunction, onBlur: blurFunction, children: [iconName && _jsx(Icon, { name: iconName, size: "20px", className: "m-r-1" }), _jsx(BodyText, { className: `${qaPrefix}-text ${active ? 'c-blue-500' : 'c-neutral-100'}`, children: children })] }));
|
|
23
23
|
};
|
|
24
24
|
if (!tooltip) {
|
|
25
25
|
return getButton();
|
|
26
26
|
}
|
|
27
|
-
return (_jsx(Tooltip,
|
|
27
|
+
return (_jsx(Tooltip, { text: tooltip, direction: "l", el: "div", className: `${qaPrefix}-tooltip`, children: getButton() }));
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=action-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-button.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,IAAI,EACJ,QAAQ,EAER,OAAO,EACP,eAAe,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAiB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAatD,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAChD,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnF,MAAM,WAAW,GAAG,GAAG,EAAE;QACrB,IAAI,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"action-button.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/action-button/action-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,IAAI,EACJ,QAAQ,EAER,OAAO,EACP,eAAe,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAiB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAatD,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAChD,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAEnF,MAAM,WAAW,GAAG,GAAG,EAAE;QACrB,IAAI,QAAQ,EAAE,CAAC;YACX,OAAO;QACX,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACnB,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,EAAE;YACtD,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ;YAC3B,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,cAAc;SACxC,CAAC,CAAC;QAEH,OAAO,CACH,kBACI,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,YAAY,aAEnB,QAAQ,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,OAAO,GAAG,EACnE,KAAC,QAAQ,IAAC,SAAS,EAAE,GAAG,QAAQ,SAAS,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,eAAe,EAAE,YAC7E,QAAQ,GACF,IACN,CACZ,CAAC;IACN,CAAC,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,SAAS,EAAE,CAAC;IACvB,CAAC;IAED,OAAO,CACH,KAAC,OAAO,IAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC,GAAG,EAAC,EAAE,EAAC,KAAK,EAAC,SAAS,EAAE,GAAG,QAAQ,UAAU,YAC1E,SAAS,EAAE,GACN,CACb,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -26,8 +26,8 @@ export const ActionsButton = ({ children }) => {
|
|
|
26
26
|
const close = () => {
|
|
27
27
|
setIsOpen(false);
|
|
28
28
|
};
|
|
29
|
-
return (_jsx("div",
|
|
29
|
+
return (_jsx("div", { ref: wrapElem, className: "qa-actions-button d-ib", onClick: e => {
|
|
30
30
|
e.stopPropagation();
|
|
31
|
-
}
|
|
31
|
+
}, children: _jsx(Popover, { className: Styles.popover, width: "xs", open: isOpen, direction: "bl", trigger: _jsx(Card, { raised: true, sharp: true, padding: "none", active: isOpen, onClick: toggle, className: "qa-actions-button-menu-button", children: _jsx(Card.Section, { className: "p-half-i", children: _jsx(Icon, { name: "more_vert", size: "22px", className: isOpen ? 'c-blue-400' : '' }) }) }), children: children }) }));
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=actions-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-button.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/actions-button/actions-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAM,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAEvD,MAAM,CAAC,MAAM,aAAa,GAErB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE9C,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YACtC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"actions-button.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/actions-button/actions-button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAM,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAEvD,MAAM,CAAC,MAAM,aAAa,GAErB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,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,IAAC,SAAS,EAAC,UAAU,YAC9B,KAAC,IAAI,IACD,IAAI,EAAC,WAAW,EAChB,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GACvC,GACS,GACZ,YAGV,QAAQ,GACH,GACR,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,9 +7,9 @@ import { ActionsButton } from './actions-button';
|
|
|
7
7
|
import { ActionButtonClone } from '../action-button/action-button-clone';
|
|
8
8
|
import { ActionButtonEdit } from '../action-button/action-button-edit';
|
|
9
9
|
export const CampaignActions = ({ archivedDisabledTooltip, onClickEdit, onClickStop, onClickClone, onClickArchive, onClickUnarchive, }) => {
|
|
10
|
-
const stopAction = (handleClick) => (_jsx(Button,
|
|
10
|
+
const stopAction = (handleClick) => (_jsx(Button, { outline: true, onClick: handleClick, small: true, negative: true, className: "qa-campaign-actions-stop", children: "Stop" }));
|
|
11
11
|
const archiveAction = (handleClick) => (_jsx(ActionButtonArchive, { onClick: handleClick }));
|
|
12
12
|
const unarchiveAction = (handleClick) => (_jsx(ActionButtonUnarchive, { onClick: handleClick }));
|
|
13
|
-
return (_jsxs(ButtonGroup, { children: [onClickStop && (_jsx(Confirm,
|
|
13
|
+
return (_jsxs(ButtonGroup, { children: [onClickStop && (_jsx(Confirm, { onConfirm: onClickStop, title: "Confirm stop", message: "Are you sure you want to stop this campaign?", negative: true, children: stopAction })), _jsxs(ActionsButton, { children: [onClickClone && _jsx(ActionButtonClone, { onClick: onClickClone }), onClickArchive ? (_jsx(Confirm, { onConfirm: onClickArchive, title: "Confirm archive", message: "Are you sure you want to archive this campaign?", negative: false, children: archiveAction })) : (_jsx(ActionButtonArchive, { disabled: true, tooltip: archivedDisabledTooltip })), onClickUnarchive && (_jsx(Confirm, { onConfirm: onClickUnarchive, title: "Confirm unarchive", message: "Are you sure you want to unarchive this campaign?", negative: false, children: unarchiveAction })), onClickEdit && _jsx(ActionButtonEdit, { onClick: onClickEdit })] })] }));
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=campaign-actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign-actions.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/actions-button/campaign-actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAWvE,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EACtD,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,gBAAgB,GACnB,EAAE,EAAE;IACD,MAAM,UAAU,GAAG,CAAC,WAAuB,EAAE,EAAE,CAAC,CAC5C,KAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"campaign-actions.js","sourceRoot":"","sources":["../../../../src/components/campaign-actions/actions-button/campaign-actions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,gB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,EAAE,KAAK,YAEd,eAAe,GACV,CACb,EACA,WAAW,IAAI,KAAC,gBAAgB,IAAC,OAAO,EAAE,WAAW,GAAI,IAC9C,IACN,CACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const CompanyDetailsWithoutWebsite: (
|
|
2
|
-
export declare const CompanyDetails: (
|
|
1
|
+
export declare const CompanyDetailsWithoutWebsite: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const CompanyDetails: () => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
parameters: {};
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-details-form.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-details/company-details-form.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-details-form.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-details/company-details-form.stories.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,4BAA4B,+CAQxC,CAAC;AAEF,eAAO,MAAM,cAAc,+CAQ1B,CAAC;;;;;;AAEF,wBAIE"}
|
|
@@ -1,48 +1,27 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
2
|
import { InputFieldState } from '@servicetitan/form';
|
|
9
|
-
import { injectable, provide, useDependencies } from '@servicetitan/react-ioc';
|
|
10
3
|
import { FormState } from 'formstate';
|
|
11
4
|
import { CompanyDetails as Component } from '.';
|
|
12
5
|
import { LogoPicker } from '../logo-picker/logo-picker.stories';
|
|
13
6
|
import omit from 'lodash/omit';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
city: new InputFieldState('Glendale'),
|
|
26
|
-
state: new InputFieldState('CA'),
|
|
27
|
-
zipCode: new InputFieldState('91203'),
|
|
28
|
-
companyEmail: new InputFieldState('info@acme.com'),
|
|
29
|
-
companyWebsite: new InputFieldState('www.acme.com'),
|
|
30
|
-
yearEstablished: new InputFieldState(1999),
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
DetailsStore = __decorate([
|
|
36
|
-
injectable()
|
|
37
|
-
], DetailsStore);
|
|
38
|
-
export const CompanyDetailsWithoutWebsite = provide({ singletons: [DetailsStore] })(() => {
|
|
39
|
-
const [store] = useDependencies(DetailsStore);
|
|
40
|
-
return (_jsx(Component, { formState: omit(store.form.$, ['companyWebsite']), logoPicker: _jsx(LogoPicker, {}), handleCompanyEmailBlur: () => alert('company email blurred') }));
|
|
41
|
-
});
|
|
42
|
-
export const CompanyDetails = provide({ singletons: [DetailsStore] })(() => {
|
|
43
|
-
const [store] = useDependencies(DetailsStore);
|
|
44
|
-
return (_jsx(Component, { formState: store.form.$, logoPicker: _jsx(LogoPicker, {}), handleCompanyEmailBlur: () => alert('company email blurred') }));
|
|
7
|
+
const form = new FormState({
|
|
8
|
+
companyName: new InputFieldState('Acme Inc'),
|
|
9
|
+
tagline: new InputFieldState('Ayo! The Acme rules'),
|
|
10
|
+
street: new InputFieldState('Backed st.'),
|
|
11
|
+
unit: new InputFieldState('123'),
|
|
12
|
+
city: new InputFieldState('Glendale'),
|
|
13
|
+
state: new InputFieldState('CA'),
|
|
14
|
+
zipCode: new InputFieldState('91203'),
|
|
15
|
+
companyEmail: new InputFieldState('info@acme.com'),
|
|
16
|
+
companyWebsite: new InputFieldState('www.acme.com'),
|
|
17
|
+
yearEstablished: new InputFieldState(1999),
|
|
45
18
|
});
|
|
19
|
+
export const CompanyDetailsWithoutWebsite = () => {
|
|
20
|
+
return (_jsx(Component, { formState: omit(form.$, ['companyWebsite']), logoPicker: _jsx(LogoPicker, {}), handleCompanyEmailBlur: () => alert('company email blurred') }));
|
|
21
|
+
};
|
|
22
|
+
export const CompanyDetails = () => {
|
|
23
|
+
return (_jsx(Component, { formState: form.$, logoPicker: _jsx(LogoPicker, {}), handleCompanyEmailBlur: () => alert('company email blurred') }));
|
|
24
|
+
};
|
|
46
25
|
export default {
|
|
47
26
|
title: 'MPA Components/settings/CompanyDetails',
|
|
48
27
|
component: CompanyDetails,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-details-form.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-details/company-details-form.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-details-form.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-details/company-details-form.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,GAAG,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,IAAI,MAAM,aAAa,CAAC;AAE/B,MAAM,IAAI,GAAG,IAAI,SAAS,CAAC;IACvB,WAAW,EAAE,IAAI,eAAe,CAAC,UAAU,CAAC;IAC5C,OAAO,EAAE,IAAI,eAAe,CAAC,qBAAqB,CAAC;IACnD,MAAM,EAAE,IAAI,eAAe,CAAC,YAAY,CAAC;IACzC,IAAI,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC;IAChC,IAAI,EAAE,IAAI,eAAe,CAAC,UAAU,CAAC;IACrC,KAAK,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC;IAChC,OAAO,EAAE,IAAI,eAAe,CAAC,OAAO,CAAC;IACrC,YAAY,EAAE,IAAI,eAAe,CAAC,eAAe,CAAC;IAClD,cAAc,EAAE,IAAI,eAAe,CAAC,cAAc,CAAC;IACnD,eAAe,EAAE,IAAI,eAAe,CAAC,IAAI,CAAC;CAC7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE;IAC7C,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,EAC3C,UAAU,EAAE,KAAC,UAAU,KAAG,EAC1B,sBAAsB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAC9D,CACL,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IAC/B,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,IAAI,CAAC,CAAC,EACjB,UAAU,EAAE,KAAC,UAAU,KAAG,EAC1B,sBAAsB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAC9D,CACL,CAAC;AACN,CAAC,CAAC;AAEF,eAAe;IACX,KAAK,EAAE,wCAAwC;IAC/C,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE,EAAE;CACjB,CAAC"}
|
|
@@ -7,8 +7,8 @@ import { NumberInput } from '@servicetitan/form';
|
|
|
7
7
|
import { SettingsSection } from '../settings-section';
|
|
8
8
|
import * as Styles from './company-details-form.module.less';
|
|
9
9
|
export const MERGE_TAGS_DOCUMENTATION_LINK = 'https://help.servicetitan.com/Content/Marketing/merge-tags.htm';
|
|
10
|
-
const DEFAULT_SECTION_DESCRIPTION = (_jsxs(Fragment, { children: ["Enter these details as you would like them to appear in your campaign. Much of this info can be utilized as\u00A0", _jsx(Link,
|
|
10
|
+
const DEFAULT_SECTION_DESCRIPTION = (_jsxs(Fragment, { children: ["Enter these details as you would like them to appear in your campaign. Much of this info can be utilized as\u00A0", _jsx(Link, { href: MERGE_TAGS_DOCUMENTATION_LINK, target: "_blank", primary: true, className: classNames(Styles.description, 'qa-settings-company-details-merge-tags'), children: "merge tags" }), "."] }));
|
|
11
11
|
export const CompanyDetails = observer(({ formState, logoPicker, sectionDescription = DEFAULT_SECTION_DESCRIPTION, handleCompanyEmailBlur = () => { }, layout, className = '', title = 'Company Details', }) => {
|
|
12
|
-
return (_jsx(SettingsSection,
|
|
12
|
+
return (_jsx(SettingsSection, { className: className, layout: layout, qaPrefix: "qa-settings-company-details", title: title, text: sectionDescription, children: _jsxs(Form, { className: "m-b-0-i", children: [_jsx(Form.Input, { className: "m-b-2-i qa-settings-company-details-company-name", value: formState.companyName.value, onChange: formState.companyName.onChangeHandler, error: formState.companyName.hasError, label: "Company Name", placeholder: "Enter company name", fluid: true }), _jsx(Form.Input, { className: "m-b-2-i qa-settings-company-details-tagline", value: formState.tagline.value, onChange: formState.tagline.onChangeHandler, error: formState.tagline.hasError, label: "Tagline / Slogan", placeholder: "ex: Trusted since 1956", fluid: true }), _jsxs(Form.Group, { className: "m-b-2-i", children: [_jsx(Form.Input, { width: 8, className: "m-b-0-i qa-settings-company-details-address", value: formState.street.value, onChange: formState.street.onChangeHandler, error: formState.street.hasError, label: "Street Address", placeholder: "801 N Brand Blvd" }), _jsx(Form.Input, { width: 4, className: "m-b-0-i qa-settings-company-details-address", value: formState.unit.value, onChange: formState.unit.onChangeHandler, error: formState.unit.hasError, label: "Suite, Unit, etc" })] }), _jsxs(Form.Group, { widths: "equal", className: "m-b-2-i", children: [_jsx(Form.Input, { className: "m-b-0-i qa-settings-company-details-city", value: formState.city.value, onChange: formState.city.onChangeHandler, error: formState.city.hasError, label: "City", placeholder: "Glendale", fluid: true }), _jsx(Form.Input, { className: "m-b-0-i qa-settings-company-details-state", value: formState.state.value, onChange: formState.state.onChangeHandler, error: formState.state.hasError, label: "State", placeholder: "CA", fluid: true }), _jsx(Form.Input, { className: "m-b-0-i qa-settings-company-details-zip-code", value: formState.zipCode.value, onChange: formState.zipCode.onChangeHandler, error: formState.zipCode.hasError, label: "Zip Code", placeholder: "91203", fluid: true, maxLength: 10 })] }), formState.companyWebsite ? (_jsxs(Fragment, { children: [_jsxs(Form.Group, { widths: "equal", className: "m-b-2-i", children: [_jsx(Form.Input, { className: "m-b-0-i qa-settings-company-details-company-website", value: formState.companyWebsite.value, onChange: formState.companyWebsite.onChangeHandler, error: formState.companyWebsite.hasError, label: "Company Website", placeholder: "Company Website", fluid: true }), _jsx(Form.Input, { className: "m-b-0-i qa-settings-company-details-company-email", value: formState.companyEmail.value, onChange: formState.companyEmail.onChangeHandler, error: formState.companyEmail.hasError, onBlur: handleCompanyEmailBlur, label: "Company Email", placeholder: "hello@yourcompany.com", fluid: true })] }), _jsx(Form.Group, { className: "m-b-2-i", children: _jsx(Form.Field, { label: "Year Established", className: "qa-settings-company-details-company-email", width: 4, error: formState.yearEstablished.hasError, children: _jsx(NumberInput, { value: formState.yearEstablished.value, onChange: formState.yearEstablished.onChange, error: formState.yearEstablished.hasError, emptyValue: undefined, min: 1, max: 2099, useEmptyThousandsSeparator: true, placeholder: "1950", fluid: true }) }) })] })) : (_jsx(Fragment, { children: _jsxs(Form.Group, { widths: "equal", className: "m-b-2-i", children: [_jsx(Form.Input, { className: "m-b-0-i qa-settings-company-details-company-email", width: 8, value: formState.companyEmail.value, onChange: formState.companyEmail.onChangeHandler, error: formState.companyEmail.hasError, onBlur: handleCompanyEmailBlur, label: "Company Email", placeholder: "hello@yourcompany.com", fluid: true }), _jsx(Form.Field, { label: "Year Established", className: "qa-settings-company-details-company-email", width: 4, error: formState.yearEstablished.hasError, children: _jsx(NumberInput, { value: formState.yearEstablished.value, onChange: formState.yearEstablished.onChange, error: formState.yearEstablished.hasError, emptyValue: undefined, min: 1, max: 2099, useEmptyThousandsSeparator: true, placeholder: "1950", fluid: true }) })] }) })), logoPicker] }) }));
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/settings/company-details/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAe,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAmB,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAuB7D,MAAM,CAAC,MAAM,6BAA6B,GACtC,gEAAgE,CAAC;AAErE,MAAM,2BAA2B,GAAG,CAChC,MAAC,QAAQ,oIAGL,KAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/settings/company-details/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,QAAQ,EAAa,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAe,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,WAAW,EAAmB,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAA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K,SACP,GACO,IACJ,GACN,CACd,EAEA,UAAU,IACR,GACO,CACrB,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
component: import("react").FC<import(".").CompanyEmailFooterProps>;
|
|
5
4
|
parameters: {};
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
|
-
export declare const CompanyEmailFooter: (
|
|
7
|
+
export declare const CompanyEmailFooter: () => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
//# sourceMappingURL=company-email-footer.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-email-footer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-email-footer/company-email-footer.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-email-footer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-email-footer/company-email-footer.stories.tsx"],"names":[],"mappings":";;;;;AAKA,wBAIE;AAYF,eAAO,MAAM,kBAAkB,+CAE9B,CAAC"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
2
|
import { InputFieldState, TextAreaFieldState } from '@servicetitan/form';
|
|
9
|
-
import { injectable, provide, useDependencies } from '@servicetitan/react-ioc';
|
|
10
3
|
import { FormState } from 'formstate';
|
|
11
4
|
import { CompanyEmailFooter as Component } from '.';
|
|
12
5
|
export default {
|
|
@@ -14,7 +7,7 @@ export default {
|
|
|
14
7
|
component: Component,
|
|
15
8
|
parameters: {},
|
|
16
9
|
};
|
|
17
|
-
|
|
10
|
+
class CompanyEmailStore {
|
|
18
11
|
constructor() {
|
|
19
12
|
Object.defineProperty(this, "form", {
|
|
20
13
|
enumerable: true,
|
|
@@ -27,12 +20,9 @@ let CompanyEmailStore = class CompanyEmailStore {
|
|
|
27
20
|
})
|
|
28
21
|
});
|
|
29
22
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
], CompanyEmailStore);
|
|
34
|
-
export const CompanyEmailFooter = provide({ singletons: [CompanyEmailStore] })(() => {
|
|
35
|
-
const [store] = useDependencies(CompanyEmailStore);
|
|
23
|
+
}
|
|
24
|
+
const store = new CompanyEmailStore();
|
|
25
|
+
export const CompanyEmailFooter = () => {
|
|
36
26
|
return _jsx(Component, { formState: store.form.$ });
|
|
37
|
-
}
|
|
27
|
+
};
|
|
38
28
|
//# sourceMappingURL=company-email-footer.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-email-footer.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-footer/company-email-footer.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-email-footer.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-footer/company-email-footer.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,GAAG,CAAC;AAEpD,eAAe;IACX,KAAK,EAAE,4CAA4C;IACnD,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,iBAAiB;IAAvB;QACI;;;;mBAAO,IAAI,SAAS,CAAC;gBACjB,SAAS,EAAE,IAAI,kBAAkB,CAAC,oBAAoB,CAAC;gBACvD,OAAO,EAAE,IAAI,eAAe,CAAC,SAAS,CAAC;gBACvC,aAAa,EAAE,IAAI,eAAe,CAAC,iBAAiB,CAAC;aACxD,CAAC;WAAC;IACP,CAAC;CAAA;AAED,MAAM,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,OAAO,KAAC,SAAS,IAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,GAAI,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { observer } from 'mobx-react';
|
|
|
4
4
|
import { Form, Text } from '@servicetitan/design-system';
|
|
5
5
|
import { SettingsSection } from '../settings-section';
|
|
6
6
|
export const CompanyEmailFooter = observer(({ formState: { legalCopy, license, copyrightText }, layout, className }) => {
|
|
7
|
-
return (_jsx(SettingsSection,
|
|
8
|
-
Please enter the additional info so that it is CAN-SPAM compliant.`, qaPrefix: "qa-settings-footer"
|
|
7
|
+
return (_jsx(SettingsSection, { className: className, layout: layout, title: "Footer", text: `Your footer will be partially generated from the Company Details section above.
|
|
8
|
+
Please enter the additional info so that it is CAN-SPAM compliant.`, qaPrefix: "qa-settings-footer", children: _jsxs(Form, { className: "m-b-0-i", children: [_jsx(Form.TextArea, { className: "m-b-2-i qa-settings-footer-legal-copy", label: _jsxs(Fragment, { children: ["Legal Copy\u00A0", _jsx(Text, { inline: true, size: 2, subdued: true, children: "(optional)" })] }), placeholder: "Enter legal copy here", value: legalCopy.value, onChange: legalCopy.onChangeHandler }), _jsxs(Form.Group, { className: "m-b-0-i", children: [_jsx(Form.Input, { width: 6, className: "m-b-0-i qa-settings-footer-lic", value: license.value, onChange: license.onChangeHandler, label: _jsxs(Fragment, { children: ["LIC #\u00A0", _jsx(Text, { inline: true, size: 2, subdued: true, children: "(optional)" })] }), placeholder: "XYZ12345", fluid: true }), _jsx(Form.Input, { width: 6, className: "m-b-0-i qa-settings-footer-copyright-text", value: copyrightText.value, onChange: copyrightText.onChangeHandler, label: _jsxs(Fragment, { children: ["Copyright Text\u00A0", _jsx(Text, { inline: true, size: 2, subdued: true, children: "(optional)" })] }), placeholder: "\u00A9 2022, all right reserved", fluid: true })] })] }) }));
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-footer/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAe,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAYtD,MAAM,CAAC,MAAM,kBAAkB,GAAgC,QAAQ,CACnE,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE;IACxE,OAAO,CACH,KAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-footer/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAe,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAYtD,MAAM,CAAC,MAAM,kBAAkB,GAAgC,QAAQ,CACnE,CAAC,EAAE,SAAS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V,GACO,CACrB,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
component: import("react").FC<import(".").CompanyEmailReplyToProps>;
|
|
5
4
|
parameters: {};
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
|
-
export declare const CompanyEmailReplyTo: (
|
|
7
|
+
export declare const CompanyEmailReplyTo: () => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
//# sourceMappingURL=company-email-reply-to.stories.d.ts.map
|
package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-email-reply-to.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-email-reply-to/company-email-reply-to.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-email-reply-to.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-email-reply-to/company-email-reply-to.stories.tsx"],"names":[],"mappings":";;;;;AAKA,wBAIE;AAUF,eAAO,MAAM,mBAAmB,+CAE/B,CAAC"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
2
|
import { InputFieldState } from '@servicetitan/form';
|
|
9
|
-
import { injectable, provide, useDependencies } from '@servicetitan/react-ioc';
|
|
10
3
|
import { FormState } from 'formstate';
|
|
11
4
|
import { CompanyEmailReplyTo as Component } from '.';
|
|
12
5
|
export default {
|
|
@@ -14,7 +7,7 @@ export default {
|
|
|
14
7
|
component: Component,
|
|
15
8
|
parameters: {},
|
|
16
9
|
};
|
|
17
|
-
|
|
10
|
+
class CompanyEmailReplyToStore {
|
|
18
11
|
constructor() {
|
|
19
12
|
Object.defineProperty(this, "form", {
|
|
20
13
|
enumerable: true,
|
|
@@ -25,12 +18,9 @@ let CompanyEmailReplyToStore = class CompanyEmailReplyToStore {
|
|
|
25
18
|
})
|
|
26
19
|
});
|
|
27
20
|
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
], CompanyEmailReplyToStore);
|
|
32
|
-
export const CompanyEmailReplyTo = provide({ singletons: [CompanyEmailReplyToStore] })(() => {
|
|
33
|
-
const [store] = useDependencies(CompanyEmailReplyToStore);
|
|
21
|
+
}
|
|
22
|
+
const store = new CompanyEmailReplyToStore();
|
|
23
|
+
export const CompanyEmailReplyTo = () => {
|
|
34
24
|
return _jsx(Component, { replyToEmail: store.form.$.replyToEmail });
|
|
35
|
-
}
|
|
25
|
+
};
|
|
36
26
|
//# sourceMappingURL=company-email-reply-to.stories.js.map
|
package/lib/components/settings/company-email-reply-to/company-email-reply-to.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-email-reply-to.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-reply-to/company-email-reply-to.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-email-reply-to.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-reply-to/company-email-reply-to.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,mBAAmB,IAAI,SAAS,EAAE,MAAM,GAAG,CAAC;AAErD,eAAe;IACX,KAAK,EAAE,6CAA6C;IACpD,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,wBAAwB;IAA9B;QACI;;;;mBAAO,IAAI,SAAS,CAAC;gBACjB,YAAY,EAAE,IAAI,eAAe,CAAC,eAAe,CAAC;aACrD,CAAC;WAAC;IACP,CAAC;CAAA;AAED,MAAM,KAAK,GAAG,IAAI,wBAAwB,EAAE,CAAC;AAE7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACpC,OAAO,KAAC,SAAS,IAAC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,GAAI,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -7,6 +7,6 @@ export const CompanyEmailReplyTo = observer(({ replyToEmail, layout, className }
|
|
|
7
7
|
const handleReplyToBlur = useCallback(() => {
|
|
8
8
|
replyToEmail.validate();
|
|
9
9
|
}, [replyToEmail]);
|
|
10
|
-
return (_jsx(SettingsSection,
|
|
10
|
+
return (_jsx(SettingsSection, { layout: layout, className: className, title: "Reply-To", text: "This is where emails will be sent if someone replies to one of your emails.", qaPrefix: "qa-settings-reply-to", children: _jsx(Form, { className: "m-b-0-i", children: _jsx(Form.Input, { className: "m-b-0-i qa-settings-reply-to-email-address", value: replyToEmail.value, onChange: replyToEmail.onChangeHandler, error: replyToEmail.hasError, onBlur: handleReplyToBlur, label: "Reply-to Email Address", placeholder: "info@yourcompany.com", fluid: true }) }) }));
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-reply-to/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,WAAW,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,QAAQ,EAA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,KAAK,EACzB,QAAQ,EAAE,YAAY,CAAC,eAAe,EACtC,KAAK,EAAE,YAAY,CAAC,QAAQ,EAC5B,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAC,wBAAwB,EAC9B,WAAW,EAAC,sBAAsB,EAClC,KAAK,SACP,GACC,GACO,CACrB,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CompanyEmailSender as Simple } from '.';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
@@ -6,6 +5,6 @@ declare const _default: {
|
|
|
6
5
|
parameters: {};
|
|
7
6
|
};
|
|
8
7
|
export default _default;
|
|
9
|
-
export declare const CompanyEmailSenderCustomDomain: (
|
|
10
|
-
export declare const CompanyEmailSender: (
|
|
8
|
+
export declare const CompanyEmailSenderCustomDomain: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const CompanyEmailSender: () => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//# sourceMappingURL=company-email-sender.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-email-sender.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-email-sender/company-email-sender.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-email-sender.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/company-email-sender/company-email-sender.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,IAAI,MAAM,EAA4C,MAAM,GAAG,CAAC;;;;;;AAE3F,wBAIE;AAYF,eAAO,MAAM,8BAA8B,+CAE1C,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAE9B,CAAC"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
2
|
import { InputFieldState } from '@servicetitan/form';
|
|
9
|
-
import { injectable, provide, useDependencies } from '@servicetitan/react-ioc';
|
|
10
3
|
import { FormState } from 'formstate';
|
|
11
4
|
import { CompanyEmailSender as Simple, CompanyEmailSenderCustomDomain as Custom } from '.';
|
|
12
5
|
export default {
|
|
@@ -14,7 +7,7 @@ export default {
|
|
|
14
7
|
component: Simple,
|
|
15
8
|
parameters: {},
|
|
16
9
|
};
|
|
17
|
-
|
|
10
|
+
class CompanyEmailSenderStore {
|
|
18
11
|
constructor() {
|
|
19
12
|
Object.defineProperty(this, "form", {
|
|
20
13
|
enumerable: true,
|
|
@@ -27,16 +20,12 @@ let CompanyEmailSenderStore = class CompanyEmailSenderStore {
|
|
|
27
20
|
})
|
|
28
21
|
});
|
|
29
22
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
], CompanyEmailSenderStore);
|
|
34
|
-
export const CompanyEmailSenderCustomDomain = provide({ singletons: [CompanyEmailSenderStore] })(() => {
|
|
35
|
-
const [store] = useDependencies(CompanyEmailSenderStore);
|
|
23
|
+
}
|
|
24
|
+
const store = new CompanyEmailSenderStore();
|
|
25
|
+
export const CompanyEmailSenderCustomDomain = () => {
|
|
36
26
|
return _jsx(Custom, { formState: store.form.$, senderTld: "tld.com" });
|
|
37
|
-
}
|
|
38
|
-
export const CompanyEmailSender =
|
|
39
|
-
const [store] = useDependencies(CompanyEmailSenderStore);
|
|
27
|
+
};
|
|
28
|
+
export const CompanyEmailSender = () => {
|
|
40
29
|
return _jsx(Simple, { senderName: store.form.$.senderName, senderEmail: store.form.$.senderEmail });
|
|
41
|
-
}
|
|
30
|
+
};
|
|
42
31
|
//# sourceMappingURL=company-email-sender.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-email-sender.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-sender/company-email-sender.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-email-sender.stories.js","sourceRoot":"","sources":["../../../../src/components/settings/company-email-sender/company-email-sender.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,kBAAkB,IAAI,MAAM,EAAE,8BAA8B,IAAI,MAAM,EAAE,MAAM,GAAG,CAAC;AAE3F,eAAe;IACX,KAAK,EAAE,4CAA4C;IACnD,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,uBAAuB;IAA7B;QACI;;;;mBAAO,IAAI,SAAS,CAAC;gBACjB,WAAW,EAAE,IAAI,eAAe,CAAC,gBAAgB,CAAC;gBAClD,UAAU,EAAE,IAAI,eAAe,CAAC,eAAe,CAAC;gBAChD,YAAY,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;aAC5C,CAAC;WAAC;IACP,CAAC;CAAA;AAED,MAAM,KAAK,GAAG,IAAI,uBAAuB,EAAE,CAAC;AAE5C,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE;IAC/C,OAAO,KAAC,MAAM,IAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,EAAC,SAAS,GAAG,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,OAAO,KAAC,MAAM,IAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,GAAI,CAAC;AAClG,CAAC,CAAC"}
|