@servicetitan/onboarding-ui 1.17.1 → 2.0.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.
Files changed (55) hide show
  1. package/dist/contentful/index.d.ts +1 -4
  2. package/dist/contentful/index.d.ts.map +1 -1
  3. package/dist/contentful/index.js +1 -4
  4. package/dist/contentful/index.js.map +1 -1
  5. package/dist/contentful/interfaces.d.ts +2 -86
  6. package/dist/contentful/interfaces.d.ts.map +1 -1
  7. package/dist/contentful/marketing-carousel.store.d.ts +1 -1
  8. package/dist/contentful/marketing-carousel.store.d.ts.map +1 -1
  9. package/dist/contentful/marketing-carousel.store.js +1 -1
  10. package/dist/contentful/marketing-carousel.store.js.map +1 -1
  11. package/dist/contentful/utils.d.ts +2 -1
  12. package/dist/contentful/utils.d.ts.map +1 -1
  13. package/dist/contentful/utils.js +1 -1
  14. package/dist/contentful/utils.js.map +1 -1
  15. package/dist/index.d.ts +0 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +0 -1
  18. package/dist/index.js.map +1 -1
  19. package/package.json +16 -14
  20. package/src/contentful/index.ts +1 -4
  21. package/src/contentful/interfaces.ts +2 -94
  22. package/src/contentful/marketing-carousel.store.ts +3 -1
  23. package/src/contentful/utils.ts +7 -2
  24. package/src/index.ts +0 -1
  25. package/CHANGELOG.md +0 -223
  26. package/dist/contentful/contentful.api.d.ts +0 -7
  27. package/dist/contentful/contentful.api.d.ts.map +0 -1
  28. package/dist/contentful/contentful.api.js +0 -3
  29. package/dist/contentful/contentful.api.js.map +0 -1
  30. package/dist/contentful/contentful.data.store.d.ts +0 -12
  31. package/dist/contentful/contentful.data.store.d.ts.map +0 -1
  32. package/dist/contentful/contentful.data.store.js +0 -51
  33. package/dist/contentful/contentful.data.store.js.map +0 -1
  34. package/dist/contentful/document-to-react-component.d.ts +0 -13
  35. package/dist/contentful/document-to-react-component.d.ts.map +0 -1
  36. package/dist/contentful/document-to-react-component.js +0 -16
  37. package/dist/contentful/document-to-react-component.js.map +0 -1
  38. package/dist/contentful/page-contentful.store.d.ts +0 -18
  39. package/dist/contentful/page-contentful.store.d.ts.map +0 -1
  40. package/dist/contentful/page-contentful.store.js +0 -136
  41. package/dist/contentful/page-contentful.store.js.map +0 -1
  42. package/dist/utils/collection-helpers.d.ts +0 -2
  43. package/dist/utils/collection-helpers.d.ts.map +0 -1
  44. package/dist/utils/collection-helpers.js +0 -4
  45. package/dist/utils/collection-helpers.js.map +0 -1
  46. package/dist/utils/index.d.ts +0 -2
  47. package/dist/utils/index.d.ts.map +0 -1
  48. package/dist/utils/index.js +0 -2
  49. package/dist/utils/index.js.map +0 -1
  50. package/src/contentful/contentful.api.ts +0 -12
  51. package/src/contentful/contentful.data.store.ts +0 -28
  52. package/src/contentful/document-to-react-component.tsx +0 -39
  53. package/src/contentful/page-contentful.store.ts +0 -60
  54. package/src/utils/collection-helpers.ts +0 -3
  55. package/src/utils/index.ts +0 -1
@@ -1,8 +1,5 @@
1
- export * from './contentful.api';
2
- export * from './contentful.data.store';
1
+ export * from '@servicetitan/contentful';
3
2
  export * from './marketing-carousel.store';
4
- export * from './page-contentful.store';
5
3
  export * from './interfaces';
6
4
  export * from './utils';
7
- export * from './document-to-react-component';
8
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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;AACxB,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contentful/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,8 +1,5 @@
1
- export * from './contentful.api';
2
- export * from './contentful.data.store';
1
+ export * from '@servicetitan/contentful';
3
2
  export * from './marketing-carousel.store';
4
- export * from './page-contentful.store';
5
3
  export * from './interfaces';
6
4
  export * from './utils';
7
- export * from './document-to-react-component';
8
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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;AACxB,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contentful/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1,54 +1,5 @@
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
- }
1
+ import { Asset, Entry } from '@servicetitan/contentful';
2
+ import { Document as RichText } from '@contentful/rich-text-types/dist/types/types';
52
3
  export interface OxPhotoGalleryItemFields {
53
4
  name: string;
54
5
  media: Asset;
@@ -64,40 +15,6 @@ export interface OxPhotoGalleryFields {
64
15
  name: string;
65
16
  items: Entry<OxPhotoGalleryItemFields>[];
66
17
  }
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
18
  export interface OxCallAssistantStepFields {
102
19
  internalName: string;
103
20
  stepHeader: string;
@@ -116,5 +33,4 @@ export interface OxCallAssistantFields {
116
33
  finishPageText: RichText;
117
34
  welcomeModalText: RichText;
118
35
  }
119
- export { RichText };
120
36
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/contentful/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,QAAQ,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IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,yBAAyB;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IACzC,YAAY,EAAE,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"}
@@ -1,4 +1,4 @@
1
- import { ContentfulDataStore } from '.';
1
+ import { ContentfulDataStore } from '@servicetitan/contentful';
2
2
  export declare enum MarketingCarouselColorTheme {
3
3
  Light = "Light",
4
4
  Dark = "Dark"
@@ -1 +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"}
1
+ {"version":3,"file":"marketing-carousel.store.d.ts","sourceRoot":"","sources":["../../src/contentful/marketing-carousel.store.ts"],"names":[],"mappings":"AAGA,OAAO,EAAS,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMtE,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;AAED,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"}
@@ -33,7 +33,7 @@ var __rest = (this && this.__rest) || function (s, e) {
33
33
  import { inject, injectable } from '@servicetitan/react-ioc';
34
34
  import { action, computed, makeObservable, observable, runInAction } from 'mobx';
35
35
  import queryString from 'query-string';
36
- import { ContentfulDataStore } from '.';
36
+ import { ContentfulDataStore } from '@servicetitan/contentful';
37
37
  const carouselBackgroundLightPath = 'https://static.servicetitan.com/acm/auth/sign-in-carousel-background.png';
38
38
  export var MarketingCarouselColorTheme;
39
39
  (function (MarketingCarouselColorTheme) {
@@ -1 +1 @@
1
- {"version":3,"file":"marketing-carousel.store.js","sourceRoot":"","sources":["../../src/contentful/marketing-carousel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EAAE,EAAE,CAC3C,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAE7C,GAAG,CAAC,CAAC,EAA0D,EAAE,EAAE;gBAA5D,cAAsD,EAAtD,EAAU,OAAO,EAAE,eAAe,EAAE,KAAK,OAAa,EAAR,MAAM,cAA5C,uCAA8C,CAAF;YAAS,OAAA,iCAC9D,MAAM,KACT,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,eAAe,CAAC,EAClD,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,IAC3D,CAAA;SAAA,CAAC,mCAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,YAAY,CAC7C,CAAC;IACN,CAAC;CAsBJ,CAAA;AAjFe;IAAX,UAAU;;8DAAwB;AACvB;IAAX,UAAU;;gEAAwD;AACvD;IAAX,UAAU;;yDAA4B;AAC3B;IAAX,UAAU;;4DAAsD;AAOjE;IADC,MAAM;;0DAwBL;AAIF;IADC,QAAQ;;;8DAQR;AAGD;IADC,QAAQ;;;0DAaR;AA5DQ,sBAAsB;IADlC,UAAU,EAAE;IAOI,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;qCAA8B,mBAAmB;GANhF,sBAAsB,CAkFlC;SAlFY,sBAAsB"}
@@ -1,4 +1,5 @@
1
- import { Entry, ContentContainerFields, TextEntryFields, OxPermissionFields } from '.';
1
+ import { Entry, OxPermissionFields, ContentContainerFields, TextEntryFields } from '@servicetitan/contentful';
2
+ export declare const isEntryTypeOf: (entry: Entry<unknown>, type: string) => boolean;
2
3
  export declare const isContentContainerEntry: (entry: Entry<unknown>) => entry is Entry<ContentContainerFields>;
3
4
  export declare const isTextEntry: (entry: Entry<unknown>) => entry is Entry<TextEntryFields>;
4
5
  export declare const isHeaderEntry: (entry: Entry<unknown>) => entry is Entry<TextEntryFields>;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/contentful/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAC;AAKvF,eAAO,MAAM,uBAAuB,UACzB,MAAM,OAAO,CAAC,2CAGxB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,OAAO,CAAC,oCAEhD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,MAAM,OAAO,CAAC,oCAElD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,MAAM,OAAO,CAAC,oCAEvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,MAAM,OAAO,CAAC,uCAEzD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/contentful/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EAClB,MAAM,0BAA0B,CAAC;AAElC,eAAO,MAAM,aAAa,UAAW,MAAM,OAAO,CAAC,QAAQ,MAAM,YACxB,CAAC;AAE1C,eAAO,MAAM,uBAAuB,UACzB,MAAM,OAAO,CAAC,2CAGxB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,OAAO,CAAC,oCAEhD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,MAAM,OAAO,CAAC,oCAElD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,MAAM,OAAO,CAAC,oCAEvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAAW,MAAM,OAAO,CAAC,uCAEzD,CAAC"}
@@ -1,4 +1,4 @@
1
- const isEntryTypeOf = (entry, type) => entry.sys.contentType.sys.id === type;
1
+ export const isEntryTypeOf = (entry, type) => entry.sys.contentType.sys.id === type;
2
2
  export const isContentContainerEntry = (entry) => {
3
3
  return isEntryTypeOf(entry, 'serviceTitanContentContainer');
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/contentful/utils.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAE,IAAY,EAAE,EAAE,CAC1D,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;AAE1C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACnC,KAAqB,EACiB,EAAE;IACxC,OAAO,aAAa,CAAC,KAAK,EAAE,8BAA8B,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAqB,EAAmC,EAAE;IAClF,OAAO,aAAa,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAmC,EAAE;IACpF,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAqB,EAAmC,EAAE;IACzF,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAqB,EAAsC,EAAE;IAC9F,OAAO,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAChD,CAAC,CAAC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/contentful/utils.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAE,IAAY,EAAE,EAAE,CACjE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;AAE1C,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACnC,KAAqB,EACiB,EAAE;IACxC,OAAO,aAAa,CAAC,KAAK,EAAE,8BAA8B,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAqB,EAAmC,EAAE;IAClF,OAAO,aAAa,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAmC,EAAE;IACpF,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAqB,EAAmC,EAAE;IACzF,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAqB,EAAsC,EAAE;IAC9F,OAAO,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAChD,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './company-profile';
2
2
  export * from './address-suggestion-popover';
3
3
  export * from './hooks';
4
- export * from './utils';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './company-profile';
2
2
  export * from './address-suggestion-popover';
3
3
  export * from './hooks';
4
- export * from './utils';
5
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/onboarding-ui",
3
- "version": "1.17.1",
3
+ "version": "2.0.1",
4
4
  "description": "Shared components between servicetitan monolith and Onboarding",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,14 +16,15 @@
16
16
  "contentful.d.ts"
17
17
  ],
18
18
  "peerDependencies": {
19
- "@servicetitan/confirm": "~14.3.0",
20
- "@servicetitan/culture": "~14.3.0",
21
- "@servicetitan/data-query": "~14.3.0",
22
- "@servicetitan/design-system": "~10.1.1",
23
- "@servicetitan/form": "~14.3.0",
19
+ "@servicetitan/confirm": ">=22.0.0",
20
+ "@servicetitan/contentful": ">=0.0.1",
21
+ "@servicetitan/culture": ">=22.0.0",
22
+ "@servicetitan/data-query": ">=22.0.0",
23
+ "@servicetitan/design-system": ">=12.4.1",
24
+ "@servicetitan/form": ">=22.0.0",
24
25
  "@servicetitan/react-ioc": "~14.3.0",
25
26
  "axios": "~0.21.1",
26
- "formstate": "~2.0.0",
27
+ "formstate": "~2.1.0",
27
28
  "mobx": "~6.3.2",
28
29
  "mobx-react": "~7.2.0",
29
30
  "react": "~17.0.2",
@@ -31,17 +32,18 @@
31
32
  "resumablejs": "~1.0.2"
32
33
  },
33
34
  "devDependencies": {
34
- "@servicetitan/confirm": "~14.3.0",
35
- "@servicetitan/culture": "~14.3.0",
36
- "@servicetitan/data-query": "~14.3.0",
37
- "@servicetitan/design-system": "~10.1.1",
38
- "@servicetitan/form": "~14.3.0",
35
+ "@servicetitan/confirm": "^23.0.2",
36
+ "@servicetitan/contentful": "^0.0.2",
37
+ "@servicetitan/culture": ">=22.0.0",
38
+ "@servicetitan/data-query": ">=22.0.0",
39
+ "@servicetitan/design-system": ">=12.4.1",
40
+ "@servicetitan/form": "^23.0.2",
39
41
  "@servicetitan/react-ioc": "~14.3.0",
40
42
  "@types/contentful-resolve-response": "^0.1.31",
41
43
  "@types/react": "~17.0.15",
42
44
  "@types/react-dom": "~17.0.0",
43
45
  "axios": "~0.21.1",
44
- "formstate": "~2.0.0",
46
+ "formstate": "~2.1.0",
45
47
  "mobx": "~6.3.2",
46
48
  "mobx-react": "~7.2.0",
47
49
  "react": "~17.0.2",
@@ -68,5 +70,5 @@
68
70
  "less": true,
69
71
  "webpack": false
70
72
  },
71
- "gitHead": "95353485da31143047ad9b538d74fd5bf3167f6e"
73
+ "gitHead": "0a6802248be2831db36e11a6fc156676521a324b"
72
74
  }
@@ -1,7 +1,4 @@
1
- export * from './contentful.api';
2
- export * from './contentful.data.store';
1
+ export * from '@servicetitan/contentful';
3
2
  export * from './marketing-carousel.store';
4
- export * from './page-contentful.store';
5
3
  export * from './interfaces';
6
4
  export * from './utils';
7
- export * from './document-to-react-component';
@@ -1,56 +1,5 @@
1
- import { Document as RichText } from '@contentful/rich-text-types';
2
-
3
- interface Link<T extends 'Space' | 'ContentType' | 'Environment'> {
4
- type: 'Link';
5
- linkType: T;
6
- id: string;
7
- }
8
- type SpaceLink = Link<'Space'>;
9
- type EnvironmentLink = Link<'Environment'>;
10
- type ContentTypeLink = Link<'ContentType'>;
11
-
12
- interface Sys {
13
- type: string;
14
- id: string;
15
- createdAt: string;
16
- updatedAt: string;
17
- locale: string;
18
- revision?: number;
19
- space?: {
20
- sys: SpaceLink;
21
- };
22
- environment?: {
23
- sys: EnvironmentLink;
24
- };
25
- contentType: {
26
- sys: ContentTypeLink;
27
- };
28
- }
29
-
30
- export interface Entry<T> {
31
- sys: Sys;
32
- fields: T & { codeId: string };
33
- }
34
-
35
- export interface Asset {
36
- sys: Sys;
37
- fields: {
38
- title: string;
39
- description: string;
40
- file: {
41
- url: string;
42
- details: {
43
- size: number;
44
- image?: {
45
- width: number;
46
- height: number;
47
- };
48
- };
49
- fileName: string;
50
- contentType: string;
51
- };
52
- };
53
- }
1
+ import { Asset, Entry } from '@servicetitan/contentful';
2
+ import { Document as RichText } from '@contentful/rich-text-types/dist/types/types';
54
3
 
55
4
  export interface OxPhotoGalleryItemFields {
56
5
  name: string;
@@ -69,45 +18,6 @@ export interface OxPhotoGalleryFields {
69
18
  items: Entry<OxPhotoGalleryItemFields>[];
70
19
  }
71
20
 
72
- export interface TooltipEntryFields {
73
- tooltipName: string;
74
- objectId: string;
75
- content: string;
76
- expandedContent?: RichText;
77
- }
78
-
79
- export interface OxPermissionFields {
80
- name?: string;
81
- title: string;
82
- childPermissions?: Entry<OxPermissionFields>[];
83
- tooltip?: Entry<TooltipEntryFields>;
84
- /**
85
- * @deprecated This is used for permissions that have two parents, this is not allowed anymore
86
- */
87
- dependentPermission?: Entry<OxPermissionFields>;
88
- }
89
-
90
- export interface TextEntryFields {
91
- name: string;
92
- shortText?: string;
93
- longText?: RichText;
94
- }
95
- type ContentContainerContentFields = ContentContainerFields | OxPermissionFields | TextEntryFields; // Add more as needed
96
-
97
- export interface ContentContainerFields {
98
- name: string;
99
- content?: Entry<ContentContainerContentFields>[];
100
- }
101
- type PageEntryContentFields = ContentContainerFields; // Add more as needed
102
-
103
- export interface PageEntryFields {
104
- name: string;
105
- title?: string;
106
- description?: RichText;
107
- content?: Entry<PageEntryContentFields>[];
108
- tooltips?: Entry<TooltipEntryFields>[];
109
- }
110
-
111
21
  export interface OxCallAssistantStepFields {
112
22
  internalName: string;
113
23
  stepHeader: string;
@@ -128,5 +38,3 @@ export interface OxCallAssistantFields {
128
38
  finishPageText: RichText;
129
39
  welcomeModalText: RichText;
130
40
  }
131
-
132
- export { RichText };
@@ -1,7 +1,8 @@
1
1
  import { inject, injectable } from '@servicetitan/react-ioc';
2
2
  import { action, computed, makeObservable, observable, runInAction } from 'mobx';
3
3
  import queryString from 'query-string';
4
- import { Entry, OxPhotoGalleryFields, ContentfulDataStore } from '.';
4
+ import { Entry, ContentfulDataStore } from '@servicetitan/contentful';
5
+ import { OxPhotoGalleryFields } from './interfaces';
5
6
 
6
7
  const carouselBackgroundLightPath =
7
8
  'https://static.servicetitan.com/acm/auth/sign-in-carousel-background.png';
@@ -18,6 +19,7 @@ export interface MarketingCarouselFallbackData {
18
19
  };
19
20
  carouselData: MarketingCarouselItem[];
20
21
  }
22
+
21
23
  interface MarketingCarouselStoreOptions {
22
24
  codeId: string;
23
25
  isPreview?: boolean;
@@ -1,6 +1,11 @@
1
- import { Entry, ContentContainerFields, TextEntryFields, OxPermissionFields } from '.';
1
+ import {
2
+ Entry,
3
+ OxPermissionFields,
4
+ ContentContainerFields,
5
+ TextEntryFields,
6
+ } from '@servicetitan/contentful';
2
7
 
3
- const isEntryTypeOf = (entry: Entry<unknown>, type: string) =>
8
+ export const isEntryTypeOf = (entry: Entry<unknown>, type: string) =>
4
9
  entry.sys.contentType.sys.id === type;
5
10
 
6
11
  export const isContentContainerEntry = (
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './company-profile';
2
2
  export * from './address-suggestion-popover';
3
3
  export * from './hooks';
4
- export * from './utils';
package/CHANGELOG.md DELETED
@@ -1,223 +0,0 @@
1
- # v1.17.1 (Tue Jul 26 2022)
2
-
3
- #### 🐛 Bug Fix
4
-
5
- - [onboarding-ui] Added conversion CA to Canada for address suggestion [#136](https://github.com/servicetitan/anvil-uikit-contrib/pull/136) ([@da1z](https://github.com/da1z))
6
-
7
- #### Authors: 1
8
-
9
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
10
-
11
- ---
12
-
13
- # v1.16.1 (Tue Jun 28 2022)
14
-
15
- #### 🐛 Bug Fix
16
-
17
- - FAR-823: Adding tsconfig references to fix build [#116](https://github.com/servicetitan/anvil-uikit-contrib/pull/116) ([@rgdelato](https://github.com/rgdelato))
18
-
19
- #### Authors: 1
20
-
21
- - Ryan De La Torre ([@rgdelato](https://github.com/rgdelato))
22
-
23
- ---
24
-
25
- # v1.16.0 (Wed Jun 01 2022)
26
-
27
- #### 🚀 Enhancement
28
-
29
- - OX-6191: onboarding-ui - Country Requirement - OBJS, and Company Profile [#107](https://github.com/servicetitan/anvil-uikit-contrib/pull/107) ([@johnnycoyleST](https://github.com/johnnycoyleST))
30
-
31
- #### Authors: 1
32
-
33
- - Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
34
-
35
- ---
36
-
37
- # v1.15.0 (Thu Feb 24 2022)
38
-
39
- #### 🐛 Bug Fix
40
-
41
- - ox-5772: removes masked characters [#91](https://github.com/servicetitan/anvil-uikit-contrib/pull/91) ([@sumanTitan](https://github.com/sumanTitan))
42
-
43
- #### Authors: 1
44
-
45
- - Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
46
-
47
- ---
48
-
49
- # v1.13.1 (Thu Feb 10 2022)
50
-
51
- #### 🐛 Bug Fix
52
-
53
- - onboarding-ui: updated google types dependency type [#79](https://github.com/servicetitan/anvil-uikit-contrib/pull/79) ([@da1z](https://github.com/da1z))
54
-
55
- #### Authors: 1
56
-
57
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
58
-
59
- ---
60
-
61
- # v1.13.0 (Wed Feb 02 2022)
62
-
63
- #### 🚀 Enhancement
64
-
65
- - onboarding: address model missing fields [#76](https://github.com/servicetitan/anvil-uikit-contrib/pull/76) ([@da1z](https://github.com/da1z))
66
-
67
- #### Authors: 1
68
-
69
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
70
-
71
- ---
72
-
73
- # v1.12.0 (Wed Feb 02 2022)
74
-
75
- #### 🚀 Enhancement
76
-
77
- - onboarding: add longitude and latitude to address suggestion results [#75](https://github.com/servicetitan/anvil-uikit-contrib/pull/75) ([@da1z](https://github.com/da1z))
78
-
79
- #### Authors: 1
80
-
81
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
82
-
83
- ---
84
-
85
- # v1.11.0 (Fri Jan 28 2022)
86
-
87
- #### 🚀 Enhancement
88
-
89
- - OX-5627: Payments Wizard sometimes throws error with Country Field from step 1 [#74](https://github.com/servicetitan/anvil-uikit-contrib/pull/74) ([@johnnycoyleST](https://github.com/johnnycoyleST))
90
-
91
- #### Authors: 1
92
-
93
- - Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
94
-
95
- ---
96
-
97
- # v1.9.0 (Mon Dec 27 2021)
98
-
99
- #### 🚀 Enhancement
100
-
101
- - Update useFormatPhone [#69](https://github.com/servicetitan/anvil-uikit-contrib/pull/69) ([@aschumahua](https://github.com/aschumahua) [@fnkear](https://github.com/fnkear))
102
-
103
- #### Authors: 2
104
-
105
- - Anzar Schumahua ([@aschumahua](https://github.com/aschumahua))
106
- - Oleg Mikhalkov ([@fnkear](https://github.com/fnkear))
107
-
108
- ---
109
-
110
- # v1.8.0 (Wed Dec 01 2021)
111
-
112
- #### 🚀 Enhancement
113
-
114
- - ox/contentful/OX-5378: open rich text hyperlinks in new window [#63](https://github.com/servicetitan/anvil-uikit-contrib/pull/63) ([@johnnycoyleST](https://github.com/johnnycoyleST))
115
-
116
- #### Authors: 1
117
-
118
- - Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
119
-
120
- ---
121
-
122
- # v1.7.0 (Mon Nov 29 2021)
123
-
124
- :tada: This release contains work from a new contributor! :tada:
125
-
126
- Thank you, Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST)), for all your work!
127
-
128
- #### 🚀 Enhancement
129
-
130
- - ox/contentful-rich-text-renderer: add rich text renderer from contentful library [#59](https://github.com/servicetitan/anvil-uikit-contrib/pull/59) ([@johnnycoyleST](https://github.com/johnnycoyleST))
131
-
132
- #### Authors: 1
133
-
134
- - Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
135
-
136
- ---
137
-
138
- # v1.6.0 (Wed Nov 24 2021)
139
-
140
- #### 🚀 Enhancement
141
-
142
- - [onboarding-ui] contentful OX call assistant types [#55](https://github.com/servicetitan/anvil-uikit-contrib/pull/55) ([@da1z](https://github.com/da1z))
143
-
144
- #### Authors: 1
145
-
146
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
147
-
148
- ---
149
-
150
- # v1.5.0 (Wed Nov 17 2021)
151
-
152
- #### 🚀 Enhancement
153
-
154
- - [onboarding-ui] Contentful integration [#49](https://github.com/servicetitan/anvil-uikit-contrib/pull/49) ([@da1z](https://github.com/da1z))
155
-
156
- #### Authors: 1
157
-
158
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
159
-
160
- ---
161
-
162
- # v1.4.0 (Thu Oct 14 2021)
163
-
164
- #### 🚀 Enhancement
165
-
166
- - [onboarding-ui] useScrollToError [#39](https://github.com/servicetitan/anvil-uikit-contrib/pull/39) ([@da1z](https://github.com/da1z))
167
-
168
- #### Authors: 1
169
-
170
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
171
-
172
- ---
173
-
174
- # v1.3.0 (Wed Oct 13 2021)
175
-
176
- #### 🚀 Enhancement
177
-
178
- - OX-5137: Update country-dropdown-input.tsx [#37](https://github.com/servicetitan/anvil-uikit-contrib/pull/37) ([@sumanTitan](https://github.com/sumanTitan))
179
-
180
- #### Authors: 1
181
-
182
- - Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
183
-
184
- ---
185
-
186
- # v1.2.1 (Tue Oct 12 2021)
187
-
188
- #### 🐛 Bug Fix
189
-
190
- - fixes masked input usage [#36](https://github.com/servicetitan/anvil-uikit-contrib/pull/36) ([@sumanTitan](https://github.com/sumanTitan))
191
-
192
- #### Authors: 1
193
-
194
- - Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
195
-
196
- ---
197
-
198
- # v1.2.0 (Wed Oct 06 2021)
199
-
200
- #### 🚀 Enhancement
201
-
202
- - [onboarding-ui] Address suggestion popover with google geocoder suggester [#31](https://github.com/servicetitan/anvil-uikit-contrib/pull/31) ([@da1z](https://github.com/da1z))
203
-
204
- #### Authors: 1
205
-
206
- - Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
207
-
208
- ---
209
-
210
- # v1.1.0 (Mon Sep 27 2021)
211
-
212
- :tada: This release contains work from a new contributor! :tada:
213
-
214
- Thank you, Suman Lama ([@sumanTitan](https://github.com/sumanTitan)), for all your work!
215
-
216
- #### 🚀 Enhancement
217
-
218
- - [onboarding-ui] added onboarding-ui package [#18](https://github.com/servicetitan/anvil-uikit-contrib/pull/18) ([@sumanTitan](https://github.com/sumanTitan) [@xarety](https://github.com/xarety))
219
-
220
- #### Authors: 2
221
-
222
- - Denis Gordeev ([@xarety](https://github.com/xarety))
223
- - Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
@@ -1,7 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- import { symbolToken } from '@servicetitan/react-ioc';
2
- export const CONTENTFUL_API_TOKEN = symbolToken('CONTENTFUL_API_TOKEN');
3
- //# sourceMappingURL=contentful.api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contentful.api.js","sourceRoot":"","sources":["../../src/contentful/contentful.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAiB,sBAAsB,CAAC,CAAC"}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,51 +0,0 @@
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
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11
- return function (target, key) { decorator(target, key, paramIndex); }
12
- };
13
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
- return new (P || (P = Promise))(function (resolve, reject) {
16
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
- step((generator = generator.apply(thisArg, _arguments || [])).next());
20
- });
21
- };
22
- import resolveResponse from 'contentful-resolve-response';
23
- import { inject, injectable } from '@servicetitan/react-ioc';
24
- import { CONTENTFUL_API_TOKEN } from '.';
25
- let ContentfulDataStore = class ContentfulDataStore {
26
- constructor(contentfulApi) {
27
- Object.defineProperty(this, "contentfulApi", {
28
- enumerable: true,
29
- configurable: true,
30
- writable: true,
31
- value: contentfulApi
32
- });
33
- Object.defineProperty(this, "getContentfulData", {
34
- enumerable: true,
35
- configurable: true,
36
- writable: true,
37
- value: ({ entryType, codeId, isPreview = false, }) => __awaiter(this, void 0, void 0, function* () {
38
- var _a;
39
- const { data } = yield this.contentfulApi.getContentfulContent(entryType, codeId, 10, isPreview);
40
- return (_a = resolveResponse(data)) === null || _a === void 0 ? void 0 : _a[0];
41
- })
42
- });
43
- }
44
- };
45
- ContentfulDataStore = __decorate([
46
- injectable(),
47
- __param(0, inject(CONTENTFUL_API_TOKEN)),
48
- __metadata("design:paramtypes", [Object])
49
- ], ContentfulDataStore);
50
- export { ContentfulDataStore };
51
- //# sourceMappingURL=contentful.data.store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contentful.data.store.js","sourceRoot":"","sources":["../../src/contentful/contentful.data.store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAyB,MAAM,GAAG,CAAC;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,eAAe,CAAC,IAAI,CAAC,0CAAG,CAAC,CAAyB,CAAC;YAC9D,CAAC,CAAA;WAAC;IAdgF,CAAC;CAetF,CAAA;AAhBY,mBAAmB;IAD/B,UAAU,EAAE;IAEI,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;;GADhC,mBAAmB,CAgB/B;SAhBY,mBAAmB"}
@@ -1,13 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Options, RenderNode } from '@contentful/rich-text-react-renderer';
3
- import { RichText } from '.';
4
- export declare const richTextRenderOptions: {
5
- openHyperlinkInNewTab: RenderNode;
6
- };
7
- export interface RichTextConfig {
8
- document?: RichText;
9
- options?: Options;
10
- renderNodes?: RenderNode[];
11
- }
12
- export declare const documentToReactComponent: (config: RichTextConfig) => ReactNode;
13
- //# sourceMappingURL=document-to-react-component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document-to-react-component.d.ts","sourceRoot":"","sources":["../../src/contentful/document-to-react-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAEH,OAAO,EACP,UAAU,EACb,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAE7B,eAAO,MAAM,qBAAqB;;CAUjC,CAAC;AAEF,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC9B;AAED,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,SAUlE,CAAC"}
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { documentToReactComponents, } from '@contentful/rich-text-react-renderer';
3
- import { INLINES } from '@contentful/rich-text-types';
4
- import { Link } from '@servicetitan/design-system';
5
- export const richTextRenderOptions = {
6
- openHyperlinkInNewTab: {
7
- [INLINES.HYPERLINK]: (node, children) => {
8
- return (_jsx(Link, Object.assign({ primary: true, href: node.data.uri, target: "_blank", rel: "noopener noreferrer" }, { children: children })));
9
- },
10
- },
11
- };
12
- export const documentToReactComponent = ({ document, options, renderNodes, }) => {
13
- const renderOptions = Object.assign(Object.assign({}, options), { renderNode: renderNodes === null || renderNodes === void 0 ? void 0 : renderNodes.reduce((acc, x) => (Object.assign(Object.assign({}, acc), x))) });
14
- return document ? documentToReactComponents(document, renderOptions) : undefined;
15
- };
16
- //# sourceMappingURL=document-to-react-component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"document-to-react-component.js","sourceRoot":"","sources":["../../src/contentful/document-to-react-component.tsx"],"names":[],"mappings":";AACA,OAAO,EACH,yBAAyB,GAG5B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAiB,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGnD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,qBAAqB,EAAE;QACnB,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,IAAoB,EAAE,QAAmB,EAAE,EAAE;YAC/D,OAAO,CACH,KAAC,IAAI,kBAAC,OAAO,QAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,gBACvE,QAAQ,IACN,CACV,CAAC;QACN,CAAC;KACU;CAClB,CAAC;AAQF,MAAM,CAAC,MAAM,wBAAwB,GAA0C,CAAC,EAC5E,QAAQ,EACR,OAAO,EACP,WAAW,GACd,EAAE,EAAE;IACD,MAAM,aAAa,mCACZ,OAAO,KACV,UAAU,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iCAAM,GAAG,GAAK,CAAC,EAAG,CAAC,GAClE,CAAC;IACF,OAAO,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,EAAE,aAAwB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import { ContentfulDataStore, Entry, PageEntryFields } from '.';
2
- interface PageContentfulStoreOptions {
3
- codeId: string;
4
- isPreview?: boolean;
5
- }
6
- export declare class PageContentfulStore {
7
- private contentfulDataStore;
8
- isInitializing: boolean;
9
- isInitialized: boolean;
10
- pageData?: Entry<PageEntryFields>;
11
- constructor(contentfulDataStore: ContentfulDataStore);
12
- initialize: ({ codeId, isPreview }: PageContentfulStoreOptions) => Promise<void>;
13
- lazyInitialize: (options: PageContentfulStoreOptions) => Promise<void>;
14
- get tooltipsByObjectId(): Map<string, Entry<import("./interfaces").TooltipEntryFields>>;
15
- getTooltip: (objectId: string, disabled?: boolean | undefined) => string | undefined;
16
- }
17
- export {};
18
- //# sourceMappingURL=page-contentful.store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-contentful.store.d.ts","sourceRoot":"","sources":["../../src/contentful/page-contentful.store.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC;AAEhE,UAAU,0BAA0B;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBACa,mBAAmB;IAKa,OAAO,CAAC,mBAAmB;IAJxD,cAAc,UAAS;IACvB,aAAa,UAAS;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;gBAEG,mBAAmB,EAAE,mBAAmB;IAKzF,UAAU,0BAAyC,0BAA0B,mBAiB3E;IAGF,cAAc,YAAa,0BAA0B,mBAKnD;IAEF,IACI,kBAAkB,kEAErB;IAED,UAAU,aAAc,MAAM,wDAK5B;CACL"}
@@ -1,136 +0,0 @@
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
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11
- return function (target, key) { decorator(target, key, paramIndex); }
12
- };
13
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
- return new (P || (P = Promise))(function (resolve, reject) {
16
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
- step((generator = generator.apply(thisArg, _arguments || [])).next());
20
- });
21
- };
22
- import { inject, injectable } from '@servicetitan/react-ioc';
23
- import { action, computed, makeObservable, observable, runInAction } from 'mobx';
24
- import { arrayToMap } from '..';
25
- import { ContentfulDataStore } from '.';
26
- let PageContentfulStore = class PageContentfulStore {
27
- constructor(contentfulDataStore) {
28
- Object.defineProperty(this, "contentfulDataStore", {
29
- enumerable: true,
30
- configurable: true,
31
- writable: true,
32
- value: contentfulDataStore
33
- });
34
- Object.defineProperty(this, "isInitializing", {
35
- enumerable: true,
36
- configurable: true,
37
- writable: true,
38
- value: false
39
- });
40
- Object.defineProperty(this, "isInitialized", {
41
- enumerable: true,
42
- configurable: true,
43
- writable: true,
44
- value: false
45
- });
46
- Object.defineProperty(this, "pageData", {
47
- enumerable: true,
48
- configurable: true,
49
- writable: true,
50
- value: void 0
51
- });
52
- Object.defineProperty(this, "initialize", {
53
- enumerable: true,
54
- configurable: true,
55
- writable: true,
56
- value: ({ codeId, isPreview = false }) => __awaiter(this, void 0, void 0, function* () {
57
- this.isInitializing = true;
58
- try {
59
- const data = yield this.contentfulDataStore.getContentfulData({
60
- entryType: 'serviceTitanPage',
61
- codeId,
62
- isPreview,
63
- });
64
- runInAction(() => {
65
- this.pageData = data;
66
- this.isInitialized = true;
67
- });
68
- }
69
- finally {
70
- runInAction(() => {
71
- this.isInitializing = false;
72
- });
73
- }
74
- })
75
- });
76
- Object.defineProperty(this, "lazyInitialize", {
77
- enumerable: true,
78
- configurable: true,
79
- writable: true,
80
- value: (options) => {
81
- if (!this.isInitialized && !this.isInitializing) {
82
- return this.initialize(options);
83
- }
84
- return Promise.resolve();
85
- }
86
- });
87
- Object.defineProperty(this, "getTooltip", {
88
- enumerable: true,
89
- configurable: true,
90
- writable: true,
91
- value: (objectId, disabled) => {
92
- let tooltip = disabled ? this.tooltipsByObjectId.get(`${objectId}-disabled`) : undefined;
93
- tooltip = tooltip !== null && tooltip !== void 0 ? tooltip : this.tooltipsByObjectId.get(objectId);
94
- const content = tooltip === null || tooltip === void 0 ? void 0 : tooltip.fields.content;
95
- return content === '%none%' ? undefined : content;
96
- }
97
- });
98
- makeObservable(this);
99
- }
100
- get tooltipsByObjectId() {
101
- var _a;
102
- return arrayToMap((_a = this.pageData) === null || _a === void 0 ? void 0 : _a.fields.tooltips, entry => entry.fields.objectId);
103
- }
104
- };
105
- __decorate([
106
- observable,
107
- __metadata("design:type", Object)
108
- ], PageContentfulStore.prototype, "isInitializing", void 0);
109
- __decorate([
110
- observable,
111
- __metadata("design:type", Object)
112
- ], PageContentfulStore.prototype, "isInitialized", void 0);
113
- __decorate([
114
- observable,
115
- __metadata("design:type", Object)
116
- ], PageContentfulStore.prototype, "pageData", void 0);
117
- __decorate([
118
- action,
119
- __metadata("design:type", Object)
120
- ], PageContentfulStore.prototype, "initialize", void 0);
121
- __decorate([
122
- action,
123
- __metadata("design:type", Object)
124
- ], PageContentfulStore.prototype, "lazyInitialize", void 0);
125
- __decorate([
126
- computed,
127
- __metadata("design:type", Object),
128
- __metadata("design:paramtypes", [])
129
- ], PageContentfulStore.prototype, "tooltipsByObjectId", null);
130
- PageContentfulStore = __decorate([
131
- injectable(),
132
- __param(0, inject(ContentfulDataStore)),
133
- __metadata("design:paramtypes", [ContentfulDataStore])
134
- ], PageContentfulStore);
135
- export { PageContentfulStore };
136
- //# sourceMappingURL=page-contentful.store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-contentful.store.js","sourceRoot":"","sources":["../../src/contentful/page-contentful.store.ts"],"names":[],"mappings":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AAC;YAC7B,CAAC;WAAC;QAOF;;;;mBAAa,CAAC,QAAgB,EAAE,QAAkB,EAAE,EAAE;gBAClD,IAAI,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,QAAQ,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBACzF,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAC3D,MAAM,OAAO,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,OAAO,CAAC;gBACxC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;YACtD,CAAC;WAAC;QAzCE,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IA+BD,IAAI,kBAAkB;;QAClB,OAAO,UAAU,CAAC,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtF,CAAC;CAQJ,CAAA;AA/Ce;IAAX,UAAU;;2DAAwB;AACvB;IAAX,UAAU;;0DAAuB;AACtB;IAAX,UAAU;;qDAAmC;AAO9C;IADC,MAAM;;uDAkBL;AAGF;IADC,MAAM;;2DAML;AAGF;IADC,QAAQ;;;6DAGR;AAxCQ,mBAAmB;IAD/B,UAAU,EAAE;IAMI,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;qCAA8B,mBAAmB;GALhF,mBAAmB,CAgD/B;SAhDY,mBAAmB"}
@@ -1,2 +0,0 @@
1
- export declare const arrayToMap: <T, K>(array: T[] | undefined, keySelector: (item: T) => K) => Map<K, T>;
2
- //# sourceMappingURL=collection-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collection-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/collection-helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,0EAEtB,CAAC"}
@@ -1,4 +0,0 @@
1
- export const arrayToMap = (array, keySelector) => {
2
- return new Map((array !== null && array !== void 0 ? array : []).map(item => [keySelector(item), item]));
3
- };
4
- //# sourceMappingURL=collection-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collection-helpers.js","sourceRoot":"","sources":["../../src/utils/collection-helpers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAO,KAAsB,EAAE,WAA2B,EAAE,EAAE;IACpF,OAAO,IAAI,GAAG,CAAO,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './collection-helpers';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './collection-helpers';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -1,12 +0,0 @@
1
- import { symbolToken } from '@servicetitan/react-ioc';
2
-
3
- export const CONTENTFUL_API_TOKEN = symbolToken<IContentfulApi>('CONTENTFUL_API_TOKEN');
4
-
5
- export interface IContentfulApi {
6
- getContentfulContent(
7
- entryType: string,
8
- codeId: string,
9
- include: number,
10
- isPreview: boolean
11
- ): Promise<{ data: any }>;
12
- }
@@ -1,28 +0,0 @@
1
- import resolveResponse from 'contentful-resolve-response';
2
- import { inject, injectable } from '@servicetitan/react-ioc';
3
- import { CONTENTFUL_API_TOKEN, IContentfulApi, Entry } from '.';
4
-
5
- export interface ContentfulDataOptions {
6
- entryType: string;
7
- codeId: string;
8
- isPreview?: boolean;
9
- }
10
-
11
- @injectable()
12
- export class ContentfulDataStore {
13
- constructor(@inject(CONTENTFUL_API_TOKEN) private contentfulApi: IContentfulApi) {}
14
-
15
- getContentfulData = async <T>({
16
- entryType,
17
- codeId,
18
- isPreview = false,
19
- }: ContentfulDataOptions) => {
20
- const { data } = await this.contentfulApi.getContentfulContent(
21
- entryType,
22
- codeId,
23
- 10,
24
- isPreview
25
- );
26
- return resolveResponse(data)?.[0] as Entry<T> | undefined;
27
- };
28
- }
@@ -1,39 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import {
3
- documentToReactComponents,
4
- Options,
5
- RenderNode,
6
- } from '@contentful/rich-text-react-renderer';
7
- import { Block, Inline, INLINES } from '@contentful/rich-text-types';
8
- import { Link } from '@servicetitan/design-system';
9
- import { RichText } from '.';
10
-
11
- export const richTextRenderOptions = {
12
- openHyperlinkInNewTab: {
13
- [INLINES.HYPERLINK]: (node: Block | Inline, children: ReactNode) => {
14
- return (
15
- <Link primary href={node.data.uri} target="_blank" rel="noopener noreferrer">
16
- {children}
17
- </Link>
18
- );
19
- },
20
- } as RenderNode,
21
- };
22
-
23
- export interface RichTextConfig {
24
- document?: RichText;
25
- options?: Options;
26
- renderNodes?: RenderNode[];
27
- }
28
-
29
- export const documentToReactComponent: (config: RichTextConfig) => ReactNode = ({
30
- document,
31
- options,
32
- renderNodes,
33
- }) => {
34
- const renderOptions = {
35
- ...options,
36
- renderNode: renderNodes?.reduce((acc, x) => ({ ...acc, ...x })),
37
- };
38
- return document ? documentToReactComponents(document, renderOptions as Options) : undefined;
39
- };
@@ -1,60 +0,0 @@
1
- import { inject, injectable } from '@servicetitan/react-ioc';
2
- import { action, computed, makeObservable, observable, runInAction } from 'mobx';
3
- import { arrayToMap } from '..';
4
- import { ContentfulDataStore, Entry, PageEntryFields } from '.';
5
-
6
- interface PageContentfulStoreOptions {
7
- codeId: string;
8
- isPreview?: boolean;
9
- }
10
-
11
- @injectable()
12
- export class PageContentfulStore {
13
- @observable isInitializing = false;
14
- @observable isInitialized = false;
15
- @observable pageData?: Entry<PageEntryFields>;
16
-
17
- constructor(@inject(ContentfulDataStore) private contentfulDataStore: ContentfulDataStore) {
18
- makeObservable(this);
19
- }
20
-
21
- @action
22
- initialize = async ({ codeId, isPreview = false }: PageContentfulStoreOptions) => {
23
- this.isInitializing = true;
24
- try {
25
- const data = await this.contentfulDataStore.getContentfulData<PageEntryFields>({
26
- entryType: 'serviceTitanPage',
27
- codeId,
28
- isPreview,
29
- });
30
- runInAction(() => {
31
- this.pageData = data;
32
- this.isInitialized = true;
33
- });
34
- } finally {
35
- runInAction(() => {
36
- this.isInitializing = false;
37
- });
38
- }
39
- };
40
-
41
- @action
42
- lazyInitialize = (options: PageContentfulStoreOptions) => {
43
- if (!this.isInitialized && !this.isInitializing) {
44
- return this.initialize(options);
45
- }
46
- return Promise.resolve();
47
- };
48
-
49
- @computed
50
- get tooltipsByObjectId() {
51
- return arrayToMap(this.pageData?.fields.tooltips, entry => entry.fields.objectId);
52
- }
53
-
54
- getTooltip = (objectId: string, disabled?: boolean) => {
55
- let tooltip = disabled ? this.tooltipsByObjectId.get(`${objectId}-disabled`) : undefined;
56
- tooltip = tooltip ?? this.tooltipsByObjectId.get(objectId);
57
- const content = tooltip?.fields.content;
58
- return content === '%none%' ? undefined : content;
59
- };
60
- }
@@ -1,3 +0,0 @@
1
- export const arrayToMap = <T, K>(array: T[] | undefined, keySelector: (item: T) => K) => {
2
- return new Map<K, T>((array ?? []).map(item => [keySelector(item), item]));
3
- };
@@ -1 +0,0 @@
1
- export * from './collection-helpers';