@servicetitan/onboarding-ui 1.2.1 → 1.6.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.
Files changed (76) hide show
  1. package/contentful.d.ts +1 -0
  2. package/contentful.js +1 -0
  3. package/dist/company-profile/components/country-dropdown-input.d.ts.map +1 -1
  4. package/dist/company-profile/components/country-dropdown-input.js +14 -3
  5. package/dist/company-profile/components/country-dropdown-input.js.map +1 -1
  6. package/dist/company-profile/components/state-and-province-dropdown-input.d.ts.map +1 -1
  7. package/dist/company-profile/components/state-and-province-dropdown-input.js +19 -11
  8. package/dist/company-profile/components/state-and-province-dropdown-input.js.map +1 -1
  9. package/dist/contentful/contentful.api.d.ts +7 -0
  10. package/dist/contentful/contentful.api.d.ts.map +1 -0
  11. package/dist/contentful/contentful.api.js +6 -0
  12. package/dist/contentful/contentful.api.js.map +1 -0
  13. package/dist/contentful/contentful.data.store.d.ts +12 -0
  14. package/dist/contentful/contentful.data.store.d.ts.map +1 -0
  15. package/dist/contentful/contentful.data.store.js +57 -0
  16. package/dist/contentful/contentful.data.store.js.map +1 -0
  17. package/dist/contentful/index.d.ts +7 -0
  18. package/dist/contentful/index.d.ts.map +1 -0
  19. package/dist/contentful/index.js +19 -0
  20. package/dist/contentful/index.js.map +1 -0
  21. package/dist/contentful/interfaces.d.ts +120 -0
  22. package/dist/contentful/interfaces.d.ts.map +1 -0
  23. package/dist/contentful/interfaces.js +3 -0
  24. package/dist/contentful/interfaces.js.map +1 -0
  25. package/dist/contentful/marketing-carousel.store.d.ts +43 -0
  26. package/dist/contentful/marketing-carousel.store.d.ts.map +1 -0
  27. package/dist/contentful/marketing-carousel.store.js +191 -0
  28. package/dist/contentful/marketing-carousel.store.js.map +1 -0
  29. package/dist/contentful/page-contentful.store.d.ts +18 -0
  30. package/dist/contentful/page-contentful.store.d.ts.map +1 -0
  31. package/dist/contentful/page-contentful.store.js +139 -0
  32. package/dist/contentful/page-contentful.store.js.map +1 -0
  33. package/dist/contentful/utils.d.ts +7 -0
  34. package/dist/contentful/utils.d.ts.map +1 -0
  35. package/dist/contentful/utils.js +25 -0
  36. package/dist/contentful/utils.js.map +1 -0
  37. package/dist/hooks/index.d.ts +2 -0
  38. package/dist/hooks/index.d.ts.map +1 -0
  39. package/dist/hooks/index.js +14 -0
  40. package/dist/hooks/index.js.map +1 -0
  41. package/dist/hooks/use-scroll-to-error/index.d.ts +2 -0
  42. package/dist/hooks/use-scroll-to-error/index.d.ts.map +1 -0
  43. package/dist/hooks/use-scroll-to-error/index.js +14 -0
  44. package/dist/hooks/use-scroll-to-error/index.js.map +1 -0
  45. package/dist/hooks/use-scroll-to-error/use-scroll-to-error.d.ts +4 -0
  46. package/dist/hooks/use-scroll-to-error/use-scroll-to-error.d.ts.map +1 -0
  47. package/dist/hooks/use-scroll-to-error/use-scroll-to-error.js +32 -0
  48. package/dist/hooks/use-scroll-to-error/use-scroll-to-error.js.map +1 -0
  49. package/dist/index.d.ts +2 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +2 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/utils/collection-helpers.d.ts +2 -0
  54. package/dist/utils/collection-helpers.d.ts.map +1 -0
  55. package/dist/utils/collection-helpers.js +8 -0
  56. package/dist/utils/collection-helpers.js.map +1 -0
  57. package/dist/utils/index.d.ts +2 -0
  58. package/dist/utils/index.d.ts.map +1 -0
  59. package/dist/utils/index.js +14 -0
  60. package/dist/utils/index.js.map +1 -0
  61. package/package.json +10 -4
  62. package/src/company-profile/components/country-dropdown-input.tsx +5 -7
  63. package/src/company-profile/components/state-and-province-dropdown-input.tsx +19 -11
  64. package/src/contentful/contentful.api.ts +12 -0
  65. package/src/contentful/contentful.data.store.ts +28 -0
  66. package/src/contentful/index.ts +6 -0
  67. package/src/contentful/interfaces.ts +132 -0
  68. package/src/contentful/marketing-carousel.store.ts +119 -0
  69. package/src/contentful/page-contentful.store.ts +60 -0
  70. package/src/contentful/utils.ts +26 -0
  71. package/src/hooks/index.ts +1 -0
  72. package/src/hooks/use-scroll-to-error/index.ts +1 -0
  73. package/src/hooks/use-scroll-to-error/use-scroll-to-error.ts +31 -0
  74. package/src/index.ts +2 -0
  75. package/src/utils/collection-helpers.ts +3 -0
  76. package/src/utils/index.ts +1 -0
@@ -0,0 +1 @@
1
+ export * from './dist/contentful';
package/contentful.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/contentful');
@@ -1 +1 @@
1
- {"version":3,"file":"country-dropdown-input.d.ts","sourceRoot":"","sources":["../../../src/company-profile/components/country-dropdown-input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAQ,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEtF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC5D,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB,UAAoB,qBAAqB,gBAiBxE,CAAC"}
1
+ {"version":3,"file":"country-dropdown-input.d.ts","sourceRoot":"","sources":["../../../src/company-profile/components/country-dropdown-input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAQ,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEtF,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC5D,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB,UAAoB,qBAAqB,gBAexE,CAAC"}
@@ -1,13 +1,24 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.CountryDropdownInput = void 0;
4
15
  const jsx_runtime_1 = require("react/jsx-runtime");
5
16
  const design_system_1 = require("@servicetitan/design-system");
6
17
  const mobx_react_1 = require("mobx-react");
7
18
  exports.CountryDropdownInput = mobx_react_1.observer((props) => {
8
- var _a, _b;
9
- const value = props.value && props.value.toString().toLowerCase();
19
+ const { value: propsValue, width, placeholder } = props, rest = __rest(props, ["value", "width", "placeholder"]);
20
+ const value = propsValue && propsValue.toString().toLowerCase();
10
21
  const country = value && (value === 'canada' || value === 'ca' ? 'Canada' : 'USA');
11
- return (jsx_runtime_1.jsx(design_system_1.Form.Select, { fluid: true, search: true, width: (_a = props.width) !== null && _a !== void 0 ? _a : '12', label: "Country", placeholder: (_b = props.placeholder) !== null && _b !== void 0 ? _b : 'Country', className: props.className, value: country, onChange: props.onChange, options: props.options, error: props.error }, void 0));
22
+ return (jsx_runtime_1.jsx(design_system_1.Form.Select, Object.assign({ fluid: true, search: true, width: width !== null && width !== void 0 ? width : '12', label: "Country", placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : 'Country', value: country }, rest), void 0));
12
23
  });
13
24
  //# sourceMappingURL=country-dropdown-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"country-dropdown-input.js","sourceRoot":"","sources":["../../../src/company-profile/components/country-dropdown-input.tsx"],"names":[],"mappings":";;;;AACA,+DAAsF;AACtF,2CAAsC;AAQzB,QAAA,oBAAoB,GAAG,qBAAQ,CAAC,CAAC,KAA4B,EAAE,EAAE;;IAC1E,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAM,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC;IACnE,MAAM,OAAO,GAAG,KAAK,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnF,OAAO,CACH,kBAAC,oBAAI,CAAC,MAAM,IACR,KAAK,QACL,MAAM,QACN,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,IAAI,EAC1B,KAAK,EAAC,SAAS,EACf,WAAW,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,SAAS,EAC3C,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,KAAK,EAAE,KAAK,CAAC,KAAK,WACpB,CACL,CAAC;AACN,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"country-dropdown-input.js","sourceRoot":"","sources":["../../../src/company-profile/components/country-dropdown-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+DAAsF;AACtF,2CAAsC;AAQzB,QAAA,oBAAoB,GAAG,qBAAQ,CAAC,CAAC,KAA4B,EAAE,EAAE;IAC1E,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA1D,iCAAkD,CAAQ,CAAC;IACjE,MAAM,KAAK,GAAG,UAAU,IAAI,UAAW,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC;IACjE,MAAM,OAAO,GAAG,KAAK,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnF,OAAO,CACH,kBAAC,oBAAI,CAAC,MAAM,kBACR,KAAK,QACL,MAAM,QACN,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,EACpB,KAAK,EAAC,SAAS,EACf,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,EACrC,KAAK,EAAE,OAAO,IACV,IAAI,UACV,CACL,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"state-and-province-dropdown-input.d.ts","sourceRoot":"","sources":["../../../src/company-profile/components/state-and-province-dropdown-input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAQ,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAkB,MAAM,sCAAsC,CAAC;AAE1F,UAAU,kCAAmC,SAAQ,iBAAiB;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACvC,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAC3C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,cAAc,CAAC;CAC1B;AAKD,eAAO,MAAM,6BAA6B,UAC9B,kCAAkC,gBAuD7C,CAAC"}
1
+ {"version":3,"file":"state-and-province-dropdown-input.d.ts","sourceRoot":"","sources":["../../../src/company-profile/components/state-and-province-dropdown-input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAQ,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAkB,MAAM,sCAAsC,CAAC;AAE1F,UAAU,kCAAmC,SAAQ,iBAAiB;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACvC,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAC3C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,cAAc,CAAC;CAC1B;AAKD,eAAO,MAAM,6BAA6B,UAC9B,kCAAkC,gBA+D7C,CAAC"}
@@ -1,18 +1,26 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
4
12
  };
5
13
  Object.defineProperty(exports, "__esModule", { value: true });
6
14
  exports.StateAndProvinceDropdownInput = void 0;
7
15
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const react_1 = __importDefault(require("react"));
16
+ const react_1 = require("react");
9
17
  const design_system_1 = require("@servicetitan/design-system");
10
18
  const mobx_react_1 = require("mobx-react");
11
19
  const toTitleCase = (str) => str.replace(/\w\S*/g, txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
12
20
  exports.StateAndProvinceDropdownInput = mobx_react_1.observer((props) => {
13
- var _a, _b;
14
- const { value, onChange, onChangeHandler } = props.fieldState;
15
- react_1.default.useEffect(() => {
21
+ const { fieldState, regionNameToCodeMap, countryAndRegionData, countryCode, width, placeholder } = props, rest = __rest(props, ["fieldState", "regionNameToCodeMap", "countryAndRegionData", "countryCode", "width", "placeholder"]);
22
+ const { value, onChange, onChangeHandler } = fieldState;
23
+ react_1.useEffect(() => {
16
24
  var _a;
17
25
  /*
18
26
  * requirement: convert any incoming state value that is a full state/province name
@@ -23,12 +31,12 @@ exports.StateAndProvinceDropdownInput = mobx_react_1.observer((props) => {
23
31
  * https://servicetitan.atlassian.net/browse/OX-948
24
32
  */
25
33
  if (value && value.length > 2) {
26
- onChange((_a = props.regionNameToCodeMap.get(toTitleCase(value))) !== null && _a !== void 0 ? _a : ' ');
34
+ onChange((_a = regionNameToCodeMap.get(toTitleCase(value))) !== null && _a !== void 0 ? _a : ' ');
27
35
  }
28
- }, [onChange, props.regionNameToCodeMap, value]);
36
+ }, [onChange, regionNameToCodeMap, value]);
29
37
  let americanRegionalData;
30
38
  let canadianRegionalData;
31
- props.countryAndRegionData.forEach((countryOption) => {
39
+ countryAndRegionData.forEach((countryOption) => {
32
40
  const data = countryOption.Regions.map((option) => ({
33
41
  key: option.Code,
34
42
  value: option.Code,
@@ -41,10 +49,10 @@ exports.StateAndProvinceDropdownInput = mobx_react_1.observer((props) => {
41
49
  canadianRegionalData = data;
42
50
  }
43
51
  });
44
- const regionType = props.countryCode.toLowerCase() === 'canada' || props.countryCode.toLowerCase() === 'ca'
52
+ const regionType = countryCode.toLowerCase() === 'canada' || countryCode.toLowerCase() === 'ca'
45
53
  ? 'Province'
46
54
  : 'State';
47
55
  const options = regionType === 'Province' ? canadianRegionalData : americanRegionalData;
48
- return (jsx_runtime_1.jsx(design_system_1.Form.Select, { search: true, fluid: true, width: (_a = props.width) !== null && _a !== void 0 ? _a : '12', label: regionType, placeholder: (_b = props.placeholder) !== null && _b !== void 0 ? _b : regionType, className: props.className, value: value, onChange: onChangeHandler, options: options, error: props.error }, void 0));
56
+ return (jsx_runtime_1.jsx(design_system_1.Form.Select, Object.assign({ search: true, fluid: true, width: width !== null && width !== void 0 ? width : '12', label: regionType, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : regionType, value: value, onChange: onChangeHandler, options: options }, rest), void 0));
49
57
  });
50
58
  //# sourceMappingURL=state-and-province-dropdown-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"state-and-province-dropdown-input.js","sourceRoot":"","sources":["../../../src/company-profile/components/state-and-province-dropdown-input.tsx"],"names":[],"mappings":";;;;;;;AAAA,kDAA0B;AAC1B,+DAAsF;AACtF,2CAAsC;AAYtC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE,CAChC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAE/E,QAAA,6BAA6B,GAAG,qBAAQ,CACjD,CAAC,KAAyC,EAAE,EAAE;;IAC1C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC;IAE9D,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;;QACjB;;;;;;;WAOG;QACH,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,QAAQ,CAAC,MAAA,KAAK,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,mCAAI,GAAG,CAAC,CAAC;SACtE;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC,CAAC;IAEjD,IAAI,oBAAoB,CAAC;IACzB,IAAI,oBAAoB,CAAC;IAEzB,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,aAAiC,EAAE,EAAE;QACrE,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAsB,EAAE,EAAE,CAAC,CAAC;YAChE,GAAG,EAAE,MAAM,CAAC,IAAI;YAChB,KAAK,EAAE,MAAM,CAAC,IAAI;YAClB,IAAI,EAAE,MAAM,CAAC,IAAI;SACpB,CAAC,CAAC,CAAC;QACJ,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YAChC,oBAAoB,GAAG,IAAI,CAAC;SAC/B;QACD,IAAI,aAAa,CAAC,OAAO,KAAK,IAAI,EAAE;YAChC,oBAAoB,GAAG,IAAI,CAAC;SAC/B;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GACZ,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,KAAK,QAAQ,IAAI,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,KAAK,IAAI;QACpF,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,OAAO,CAAC;IAClB,MAAM,OAAO,GAAG,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAExF,OAAO,CACH,kBAAC,oBAAI,CAAC,MAAM,IACR,MAAM,QACN,KAAK,QACL,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,IAAI,EAC1B,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,UAAU,EAC5C,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAQ,EACjB,KAAK,EAAE,KAAK,CAAC,KAAK,WACpB,CACL,CAAC;AACN,CAAC,CACJ,CAAC"}
1
+ {"version":3,"file":"state-and-province-dropdown-input.js","sourceRoot":"","sources":["../../../src/company-profile/components/state-and-province-dropdown-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAyC;AACzC,+DAAsF;AACtF,2CAAsC;AAYtC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE,CAChC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,W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AAW,CAAC,WAAW,EAAE,KAAK,QAAQ,IAAI,WAAW,CAAC,WAAW,EAAE,KAAK,IAAI;QACxE,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,OAAO,CAAC;IAClB,MAAM,OAAO,GAAG,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAExF,OAAO,CACH,kBAAC,oBAAI,CAAC,MAAM,kBACR,MAAM,QACN,KAAK,QACL,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,EACpB,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,UAAU,EACtC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAQ,IACb,IAAI,UACV,CACL,CAAC;AACN,CAAC,CACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const CONTENTFUL_API_TOKEN: import("@servicetitan/react-ioc").SymbolToken<IContentfulApi>;
2
+ export interface IContentfulApi {
3
+ getContentfulContent(entryType: string, codeId: string, include: number, isPreview: boolean): Promise<{
4
+ data: any;
5
+ }>;
6
+ }
7
+ //# sourceMappingURL=contentful.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentful.api.d.ts","sourceRoot":"","sources":["../../src/contentful/contentful.api.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,+DAAsD,CAAC;AAExF,MAAM,WAAW,cAAc;IAC3B,oBAAoB,CAChB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,OAAO,GACnB,OAAO,CAAC;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;CAC7B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTENTFUL_API_TOKEN = void 0;
4
+ const react_ioc_1 = require("@servicetitan/react-ioc");
5
+ exports.CONTENTFUL_API_TOKEN = react_ioc_1.symbolToken('CONTENTFUL_API_TOKEN');
6
+ //# sourceMappingURL=contentful.api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentful.api.js","sourceRoot":"","sources":["../../src/contentful/contentful.api.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAEzC,QAAA,oBAAoB,GAAG,uBAAW,CAAiB,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { IContentfulApi, Entry } from '.';
2
+ export interface ContentfulDataOptions {
3
+ entryType: string;
4
+ codeId: string;
5
+ isPreview?: boolean;
6
+ }
7
+ export declare class ContentfulDataStore {
8
+ private contentfulApi;
9
+ constructor(contentfulApi: IContentfulApi);
10
+ getContentfulData: <T>({ entryType, codeId, isPreview, }: ContentfulDataOptions) => Promise<Entry<T> | undefined>;
11
+ }
12
+ //# sourceMappingURL=contentful.data.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentful.data.store.d.ts","sourceRoot":"","sources":["../../src/contentful/contentful.data.store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAEhE,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBACa,mBAAmB;IACc,OAAO,CAAC,aAAa;gBAAb,aAAa,EAAE,cAAc;IAE/E,iBAAiB,yCAId,qBAAqB,mCAQtB;CACL"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ var __importDefault = (this && this.__importDefault) || function (mod) {
24
+ return (mod && mod.__esModule) ? mod : { "default": mod };
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.ContentfulDataStore = void 0;
28
+ const contentful_resolve_response_1 = __importDefault(require("contentful-resolve-response"));
29
+ const react_ioc_1 = require("@servicetitan/react-ioc");
30
+ const _1 = require(".");
31
+ let ContentfulDataStore = class ContentfulDataStore {
32
+ constructor(contentfulApi) {
33
+ Object.defineProperty(this, "contentfulApi", {
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true,
37
+ value: contentfulApi
38
+ });
39
+ Object.defineProperty(this, "getContentfulData", {
40
+ enumerable: true,
41
+ configurable: true,
42
+ writable: true,
43
+ value: ({ entryType, codeId, isPreview = false, }) => __awaiter(this, void 0, void 0, function* () {
44
+ var _a;
45
+ const { data } = yield this.contentfulApi.getContentfulContent(entryType, codeId, 10, isPreview);
46
+ return (_a = contentful_resolve_response_1.default(data)) === null || _a === void 0 ? void 0 : _a[0];
47
+ })
48
+ });
49
+ }
50
+ };
51
+ ContentfulDataStore = __decorate([
52
+ react_ioc_1.injectable(),
53
+ __param(0, react_ioc_1.inject(_1.CONTENTFUL_API_TOKEN)),
54
+ __metadata("design:paramtypes", [Object])
55
+ ], ContentfulDataStore);
56
+ exports.ContentfulDataStore = ContentfulDataStore;
57
+ //# sourceMappingURL=contentful.data.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contentful.data.store.js","sourceRoot":"","sources":["../../src/contentful/contentful.data.store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA0D;AAC1D,uDAA6D;AAC7D,wBAAgE;AAShE,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAC5B,YAAkD,aAA6B;;;;;mBAA7B;;QAElD;;;;mBAAoB,CAAU,EAC1B,SAAS,EACT,MAAM,EACN,SAAS,GAAG,KAAK,GACG,EAAE,EAAE;;gBACxB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAC1D,SAAS,EACT,MAAM,EACN,EAAE,EACF,SAAS,CACZ,CAAC;gBACF,OAAO,MAAA,qCAAe,CAAC,IAAI,CAAC,0CAAG,CAAC,CAAyB,CAAC;YAC9D,CAAC,CAAA;WAAC;IAdgF,CAAC;CAetF,CAAA;AAhBY,mBAAmB;IAD/B,sBAAU,EAAE;IAEI,WAAA,kBAAM,CAAC,uBAAoB,CAAC,CAAA;;GADhC,mBAAmB,CAgB/B;AAhBY,kDAAmB"}
@@ -0,0 +1,7 @@
1
+ export * from './contentful.api';
2
+ export * from './contentful.data.store';
3
+ export * from './marketing-carousel.store';
4
+ export * from './page-contentful.store';
5
+ export * from './interfaces';
6
+ export * from './utils';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contentful/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./contentful.api"), exports);
14
+ __exportStar(require("./contentful.data.store"), exports);
15
+ __exportStar(require("./marketing-carousel.store"), exports);
16
+ __exportStar(require("./page-contentful.store"), exports);
17
+ __exportStar(require("./interfaces"), exports);
18
+ __exportStar(require("./utils"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contentful/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAiC;AACjC,0DAAwC;AACxC,6DAA2C;AAC3C,0DAAwC;AACxC,+CAA6B;AAC7B,0CAAwB"}
@@ -0,0 +1,120 @@
1
+ import { Document as RichText } from '@contentful/rich-text-types';
2
+ interface Link<T extends 'Space' | 'ContentType' | 'Environment'> {
3
+ type: 'Link';
4
+ linkType: T;
5
+ id: string;
6
+ }
7
+ declare type SpaceLink = Link<'Space'>;
8
+ declare type EnvironmentLink = Link<'Environment'>;
9
+ declare type ContentTypeLink = Link<'ContentType'>;
10
+ interface Sys {
11
+ type: string;
12
+ id: string;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ locale: string;
16
+ revision?: number;
17
+ space?: {
18
+ sys: SpaceLink;
19
+ };
20
+ environment?: {
21
+ sys: EnvironmentLink;
22
+ };
23
+ contentType: {
24
+ sys: ContentTypeLink;
25
+ };
26
+ }
27
+ export interface Entry<T> {
28
+ sys: Sys;
29
+ fields: T & {
30
+ codeId: string;
31
+ };
32
+ }
33
+ export interface Asset {
34
+ sys: Sys;
35
+ fields: {
36
+ title: string;
37
+ description: string;
38
+ file: {
39
+ url: string;
40
+ details: {
41
+ size: number;
42
+ image?: {
43
+ width: number;
44
+ height: number;
45
+ };
46
+ };
47
+ fileName: string;
48
+ contentType: string;
49
+ };
50
+ };
51
+ }
52
+ export interface OxPhotoGalleryItemFields {
53
+ name: string;
54
+ media: Asset;
55
+ headline: string;
56
+ description: string;
57
+ ctaLabel: string;
58
+ ctaLink: string;
59
+ ctaTrackingCode?: string;
60
+ showDate?: string;
61
+ hideDate?: string;
62
+ }
63
+ export interface OxPhotoGalleryFields {
64
+ name: string;
65
+ items: Entry<OxPhotoGalleryItemFields>[];
66
+ }
67
+ export interface TooltipEntryFields {
68
+ tooltipName: string;
69
+ objectId: string;
70
+ content: string;
71
+ expandedContent?: RichText;
72
+ }
73
+ export interface OxPermissionFields {
74
+ name?: string;
75
+ title: string;
76
+ childPermissions?: Entry<OxPermissionFields>[];
77
+ tooltip?: Entry<TooltipEntryFields>;
78
+ /**
79
+ * @deprecated This is used for permissions that have two parents, this is not allowed anymore
80
+ */
81
+ dependentPermission?: Entry<OxPermissionFields>;
82
+ }
83
+ export interface TextEntryFields {
84
+ name: string;
85
+ shortText?: string;
86
+ longText?: RichText;
87
+ }
88
+ declare type ContentContainerContentFields = ContentContainerFields | OxPermissionFields | TextEntryFields;
89
+ export interface ContentContainerFields {
90
+ name: string;
91
+ content?: Entry<ContentContainerContentFields>[];
92
+ }
93
+ declare type PageEntryContentFields = ContentContainerFields;
94
+ export interface PageEntryFields {
95
+ name: string;
96
+ title?: string;
97
+ description?: RichText;
98
+ content?: Entry<PageEntryContentFields>[];
99
+ tooltips?: Entry<TooltipEntryFields>[];
100
+ }
101
+ export interface OxCallAssistantStepFields {
102
+ internalName: string;
103
+ stepHeader: string;
104
+ stepSubHeader?: string;
105
+ stepHintText?: string;
106
+ helperText?: RichText;
107
+ }
108
+ export interface OxCallAssistantSectionFields {
109
+ internalName: string;
110
+ sectionName: string;
111
+ steps: Entry<OxCallAssistantStepFields>[];
112
+ }
113
+ export interface OxCallAssistantFields {
114
+ internalName: string;
115
+ sections: Entry<OxCallAssistantSectionFields>[];
116
+ finishPageText: RichText;
117
+ welcomeModalText: RichText;
118
+ }
119
+ export { RichText };
120
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/contentful/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEnE,UAAU,IAAI,CAAC,CAAC,SAAS,OAAO,GAAG,aAAa,GAAG,aAAa;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACd;AACD,aAAK,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;AAC/B,aAAK,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;AAC3C,aAAK,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;AAE3C,UAAU,GAAG;IACT,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QACJ,GAAG,EAAE,SAAS,CAAC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,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,4BAA4B,CAAC,EAAE,CAAC;IAChD,cAAc,EAAE,QAAQ,CAAC;IACzB,gBAAgB,EAAE,QAAQ,CAAC;CAC9B;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/contentful/interfaces.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import { ContentfulDataStore } from '.';
2
+ export declare enum MarketingCarouselColorTheme {
3
+ Light = "Light",
4
+ Dark = "Dark"
5
+ }
6
+ export interface MarketingCarouselFallbackData {
7
+ carouselSettings: {
8
+ colorTheme: MarketingCarouselColorTheme;
9
+ backgroundImageUrl: string;
10
+ };
11
+ carouselData: MarketingCarouselItem[];
12
+ }
13
+ interface MarketingCarouselStoreOptions {
14
+ codeId: string;
15
+ isPreview?: boolean;
16
+ utmSource?: string;
17
+ fallbackData?: MarketingCarouselFallbackData;
18
+ }
19
+ interface MarketingCarouselItem {
20
+ headline: string;
21
+ ctaLink: string;
22
+ ctaLabel: string;
23
+ imageUrl: string;
24
+ description: string;
25
+ }
26
+ export declare class MarketingCarouselStore {
27
+ private contentfulDataStore;
28
+ isInitializing: boolean;
29
+ private photoGalleryData?;
30
+ private utmSource?;
31
+ private fallbackData?;
32
+ constructor(contentfulDataStore: ContentfulDataStore);
33
+ initialize: ({ codeId, utmSource, fallbackData, isPreview, }: MarketingCarouselStoreOptions) => Promise<void>;
34
+ get carouselSettings(): {
35
+ colorTheme: MarketingCarouselColorTheme;
36
+ backgroundImageUrl: string;
37
+ } | undefined;
38
+ get carouselData(): MarketingCarouselItem[] | undefined;
39
+ private getCtaLink;
40
+ private isDateRangeActive;
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=marketing-carousel.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-carousel.store.d.ts","sourceRoot":"","sources":["../../src/contentful/marketing-carousel.store.ts"],"names":[],"mappings":"AAGA,OAAO,EAA+B,mBAAmB,EAAE,MAAM,GAAG,CAAC;AAKrE,oBAAY,2BAA2B;IACnC,KAAK,UAAU;IACf,IAAI,SAAS;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC1C,gBAAgB,EAAE;QACd,UAAU,EAAE,2BAA2B,CAAC;QACxC,kBAAkB,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,YAAY,EAAE,qBAAqB,EAAE,CAAC;CACzC;AACD,UAAU,6BAA6B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,6BAA6B,CAAC;CAChD;AAED,UAAU,qBAAqB;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,qBACa,sBAAsB;IAMU,OAAO,CAAC,mBAAmB;IALxD,cAAc,UAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAA8B;IACvD,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAgC;gBAEhB,mBAAmB,EAAE,mBAAmB;IAKzF,UAAU,oDAKP,6BAA6B,mBAkB9B;IAGF,IACI,gBAAgB;;;kBAOnB;IAED,IACI,YAAY,IAAI,qBAAqB,EAAE,GAAG,SAAS,CAYtD;IAED,OAAO,CAAC,UAAU,CAShB;IAEF,OAAO,CAAC,iBAAiB,CAQvB;CACL"}