@servicetitan/onboarding-ui 1.16.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +211 -0
- package/dist/address-suggestion-popover/components/address-suggestion-popover.js +13 -35
- package/dist/address-suggestion-popover/components/address-suggestion-popover.js.map +1 -1
- package/dist/address-suggestion-popover/index.js +2 -14
- package/dist/address-suggestion-popover/index.js.map +1 -1
- package/dist/address-suggestion-popover/utils/google-geocoder-suggestions-provider.js +1 -5
- package/dist/address-suggestion-popover/utils/google-geocoder-suggestions-provider.js.map +1 -1
- package/dist/address-suggestion-popover/utils/index.js +1 -13
- package/dist/address-suggestion-popover/utils/index.js.map +1 -1
- package/dist/company-profile/components/company-profile-form.js +13 -19
- package/dist/company-profile/components/company-profile-form.js.map +1 -1
- package/dist/company-profile/components/country-dropdown-input.js +5 -8
- package/dist/company-profile/components/country-dropdown-input.js.map +1 -1
- package/dist/company-profile/components/state-and-province-dropdown-input.js +7 -10
- package/dist/company-profile/components/state-and-province-dropdown-input.js.map +1 -1
- package/dist/company-profile/index.js +6 -18
- package/dist/company-profile/index.js.map +1 -1
- package/dist/company-profile/stores/__mocks__/company-profile-form-mock-data.js +3 -6
- package/dist/company-profile/stores/__mocks__/company-profile-form-mock-data.js.map +1 -1
- package/dist/company-profile/stores/company-profile-form.store.js +33 -36
- package/dist/company-profile/stores/company-profile-form.store.js.map +1 -1
- package/dist/company-profile/utils/validators.js +1 -5
- package/dist/company-profile/utils/validators.js.map +1 -1
- package/dist/contentful/contentful.api.js +2 -5
- package/dist/contentful/contentful.api.js.map +1 -1
- package/dist/contentful/contentful.data.store.js +7 -13
- package/dist/contentful/contentful.data.store.js.map +1 -1
- package/dist/contentful/document-to-react-component.js +9 -13
- package/dist/contentful/document-to-react-component.js.map +1 -1
- package/dist/contentful/index.js +7 -19
- package/dist/contentful/index.js.map +1 -1
- package/dist/contentful/interfaces.js +1 -2
- package/dist/contentful/marketing-carousel.store.js +22 -28
- package/dist/contentful/marketing-carousel.store.js.map +1 -1
- package/dist/contentful/page-contentful.store.js +18 -21
- package/dist/contentful/page-contentful.store.js.map +1 -1
- package/dist/contentful/utils.js +7 -15
- package/dist/contentful/utils.js.map +1 -1
- package/dist/hooks/index.js +1 -13
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-scroll-to-error/index.js +1 -13
- package/dist/hooks/use-scroll-to-error/index.js.map +1 -1
- package/dist/hooks/use-scroll-to-error/use-scroll-to-error.js +5 -9
- package/dist/hooks/use-scroll-to-error/use-scroll-to-error.js.map +1 -1
- package/dist/index.js +4 -16
- package/dist/index.js.map +1 -1
- package/dist/utils/collection-helpers.js +1 -5
- package/dist/utils/collection-helpers.js.map +1 -1
- package/dist/utils/index.js +1 -13
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# v1.16.1 (Tue Jun 28 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- FAR-823: Adding tsconfig references to fix build [#116](https://github.com/servicetitan/anvil-uikit-contrib/pull/116) ([@rgdelato](https://github.com/rgdelato))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Ryan De La Torre ([@rgdelato](https://github.com/rgdelato))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v1.16.0 (Wed Jun 01 2022)
|
|
14
|
+
|
|
15
|
+
#### 🚀 Enhancement
|
|
16
|
+
|
|
17
|
+
- 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))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# v1.15.0 (Thu Feb 24 2022)
|
|
26
|
+
|
|
27
|
+
#### 🐛 Bug Fix
|
|
28
|
+
|
|
29
|
+
- ox-5772: removes masked characters [#91](https://github.com/servicetitan/anvil-uikit-contrib/pull/91) ([@sumanTitan](https://github.com/sumanTitan))
|
|
30
|
+
|
|
31
|
+
#### Authors: 1
|
|
32
|
+
|
|
33
|
+
- Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# v1.13.1 (Thu Feb 10 2022)
|
|
38
|
+
|
|
39
|
+
#### 🐛 Bug Fix
|
|
40
|
+
|
|
41
|
+
- onboarding-ui: updated google types dependency type [#79](https://github.com/servicetitan/anvil-uikit-contrib/pull/79) ([@da1z](https://github.com/da1z))
|
|
42
|
+
|
|
43
|
+
#### Authors: 1
|
|
44
|
+
|
|
45
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# v1.13.0 (Wed Feb 02 2022)
|
|
50
|
+
|
|
51
|
+
#### 🚀 Enhancement
|
|
52
|
+
|
|
53
|
+
- onboarding: address model missing fields [#76](https://github.com/servicetitan/anvil-uikit-contrib/pull/76) ([@da1z](https://github.com/da1z))
|
|
54
|
+
|
|
55
|
+
#### Authors: 1
|
|
56
|
+
|
|
57
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# v1.12.0 (Wed Feb 02 2022)
|
|
62
|
+
|
|
63
|
+
#### 🚀 Enhancement
|
|
64
|
+
|
|
65
|
+
- onboarding: add longitude and latitude to address suggestion results [#75](https://github.com/servicetitan/anvil-uikit-contrib/pull/75) ([@da1z](https://github.com/da1z))
|
|
66
|
+
|
|
67
|
+
#### Authors: 1
|
|
68
|
+
|
|
69
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
# v1.11.0 (Fri Jan 28 2022)
|
|
74
|
+
|
|
75
|
+
#### 🚀 Enhancement
|
|
76
|
+
|
|
77
|
+
- 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))
|
|
78
|
+
|
|
79
|
+
#### Authors: 1
|
|
80
|
+
|
|
81
|
+
- Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
# v1.9.0 (Mon Dec 27 2021)
|
|
86
|
+
|
|
87
|
+
#### 🚀 Enhancement
|
|
88
|
+
|
|
89
|
+
- Update useFormatPhone [#69](https://github.com/servicetitan/anvil-uikit-contrib/pull/69) ([@aschumahua](https://github.com/aschumahua) [@fnkear](https://github.com/fnkear))
|
|
90
|
+
|
|
91
|
+
#### Authors: 2
|
|
92
|
+
|
|
93
|
+
- Anzar Schumahua ([@aschumahua](https://github.com/aschumahua))
|
|
94
|
+
- Oleg Mikhalkov ([@fnkear](https://github.com/fnkear))
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
# v1.8.0 (Wed Dec 01 2021)
|
|
99
|
+
|
|
100
|
+
#### 🚀 Enhancement
|
|
101
|
+
|
|
102
|
+
- 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))
|
|
103
|
+
|
|
104
|
+
#### Authors: 1
|
|
105
|
+
|
|
106
|
+
- Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
# v1.7.0 (Mon Nov 29 2021)
|
|
111
|
+
|
|
112
|
+
:tada: This release contains work from a new contributor! :tada:
|
|
113
|
+
|
|
114
|
+
Thank you, Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST)), for all your work!
|
|
115
|
+
|
|
116
|
+
#### 🚀 Enhancement
|
|
117
|
+
|
|
118
|
+
- 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))
|
|
119
|
+
|
|
120
|
+
#### Authors: 1
|
|
121
|
+
|
|
122
|
+
- Johnny Coyle ([@johnnycoyleST](https://github.com/johnnycoyleST))
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
# v1.6.0 (Wed Nov 24 2021)
|
|
127
|
+
|
|
128
|
+
#### 🚀 Enhancement
|
|
129
|
+
|
|
130
|
+
- [onboarding-ui] contentful OX call assistant types [#55](https://github.com/servicetitan/anvil-uikit-contrib/pull/55) ([@da1z](https://github.com/da1z))
|
|
131
|
+
|
|
132
|
+
#### Authors: 1
|
|
133
|
+
|
|
134
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
# v1.5.0 (Wed Nov 17 2021)
|
|
139
|
+
|
|
140
|
+
#### 🚀 Enhancement
|
|
141
|
+
|
|
142
|
+
- [onboarding-ui] Contentful integration [#49](https://github.com/servicetitan/anvil-uikit-contrib/pull/49) ([@da1z](https://github.com/da1z))
|
|
143
|
+
|
|
144
|
+
#### Authors: 1
|
|
145
|
+
|
|
146
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
# v1.4.0 (Thu Oct 14 2021)
|
|
151
|
+
|
|
152
|
+
#### 🚀 Enhancement
|
|
153
|
+
|
|
154
|
+
- [onboarding-ui] useScrollToError [#39](https://github.com/servicetitan/anvil-uikit-contrib/pull/39) ([@da1z](https://github.com/da1z))
|
|
155
|
+
|
|
156
|
+
#### Authors: 1
|
|
157
|
+
|
|
158
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
# v1.3.0 (Wed Oct 13 2021)
|
|
163
|
+
|
|
164
|
+
#### 🚀 Enhancement
|
|
165
|
+
|
|
166
|
+
- OX-5137: Update country-dropdown-input.tsx [#37](https://github.com/servicetitan/anvil-uikit-contrib/pull/37) ([@sumanTitan](https://github.com/sumanTitan))
|
|
167
|
+
|
|
168
|
+
#### Authors: 1
|
|
169
|
+
|
|
170
|
+
- Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
# v1.2.1 (Tue Oct 12 2021)
|
|
175
|
+
|
|
176
|
+
#### 🐛 Bug Fix
|
|
177
|
+
|
|
178
|
+
- fixes masked input usage [#36](https://github.com/servicetitan/anvil-uikit-contrib/pull/36) ([@sumanTitan](https://github.com/sumanTitan))
|
|
179
|
+
|
|
180
|
+
#### Authors: 1
|
|
181
|
+
|
|
182
|
+
- Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
# v1.2.0 (Wed Oct 06 2021)
|
|
187
|
+
|
|
188
|
+
#### 🚀 Enhancement
|
|
189
|
+
|
|
190
|
+
- [onboarding-ui] Address suggestion popover with google geocoder suggester [#31](https://github.com/servicetitan/anvil-uikit-contrib/pull/31) ([@da1z](https://github.com/da1z))
|
|
191
|
+
|
|
192
|
+
#### Authors: 1
|
|
193
|
+
|
|
194
|
+
- Kiryl Chetyrbak ([@da1z](https://github.com/da1z))
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
# v1.1.0 (Mon Sep 27 2021)
|
|
199
|
+
|
|
200
|
+
:tada: This release contains work from a new contributor! :tada:
|
|
201
|
+
|
|
202
|
+
Thank you, Suman Lama ([@sumanTitan](https://github.com/sumanTitan)), for all your work!
|
|
203
|
+
|
|
204
|
+
#### 🚀 Enhancement
|
|
205
|
+
|
|
206
|
+
- [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))
|
|
207
|
+
|
|
208
|
+
#### Authors: 2
|
|
209
|
+
|
|
210
|
+
- Denis Gordeev ([@xarety](https://github.com/xarety))
|
|
211
|
+
- Suman Lama ([@sumanTitan](https://github.com/sumanTitan))
|
|
@@ -1,23 +1,3 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -38,28 +18,26 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
38
18
|
}
|
|
39
19
|
return t;
|
|
40
20
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
const styles = __importStar(require("./styles.module.less"));
|
|
49
|
-
exports.countryValues = new Map([
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { useEffect, useState } from 'react';
|
|
23
|
+
import { useBoolean } from '@servicetitan/react-hooks';
|
|
24
|
+
import { BodyText, Button, Popover, Spinner } from '@servicetitan/design-system';
|
|
25
|
+
import { observer } from 'mobx-react';
|
|
26
|
+
import * as styles from './styles.module.less';
|
|
27
|
+
export const countryValues = new Map([
|
|
50
28
|
['us', 'USA'],
|
|
51
29
|
['can', 'Canada'],
|
|
52
30
|
]);
|
|
53
31
|
const withVerifiedCountryValue = (address) => {
|
|
54
32
|
var _a;
|
|
55
|
-
address.country = (_a =
|
|
33
|
+
address.country = (_a = countryValues.get(address.country.toLowerCase())) !== null && _a !== void 0 ? _a : address.country;
|
|
56
34
|
return address;
|
|
57
35
|
};
|
|
58
|
-
|
|
36
|
+
export const AddressSuggestionPopover = observer((_a) => {
|
|
59
37
|
var { portal = true, width = 'm', direction = 'l', padding = 's', currentAddress, addressSuggestionsProvider, onSuggestionSelect } = _a, restProps = __rest(_a, ["portal", "width", "direction", "padding", "currentAddress", "addressSuggestionsProvider", "onSuggestionSelect"]);
|
|
60
|
-
const [isLoading, { setFalse: disableLoading, setTrue: enabledLoading }] =
|
|
61
|
-
const [results, setResults] =
|
|
62
|
-
|
|
38
|
+
const [isLoading, { setFalse: disableLoading, setTrue: enabledLoading }] = useBoolean(true);
|
|
39
|
+
const [results, setResults] = useState(undefined);
|
|
40
|
+
useEffect(() => {
|
|
63
41
|
const bootstrap = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
42
|
if (!restProps.open) {
|
|
65
43
|
return;
|
|
@@ -77,6 +55,6 @@ exports.AddressSuggestionPopover = (0, mobx_react_1.observer)((_a) => {
|
|
|
77
55
|
bootstrap();
|
|
78
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
79
57
|
}, [restProps.open]);
|
|
80
|
-
return ((
|
|
58
|
+
return (_jsx(Popover, Object.assign({ portal: portal, width: width, direction: direction, padding: padding }, restProps, { children: isLoading ? (_jsx("div", Object.assign({ className: "d-f justify-content-center" }, { children: _jsx(Spinner, { size: "tiny" }) }))) : (results === null || results === void 0 ? void 0 : results.length) ? (results.map(result => (_jsx(Button, Object.assign({ full: true, fill: "subtle", className: styles.verifyAddressBtn, color: "primary", onClick: () => onSuggestionSelect(withVerifiedCountryValue(result.value)) }, { children: result.title }), result.key)))) : (_jsx(BodyText, Object.assign({ className: "c-blue-400 ta-center", bold: true }, { children: "No suggestions" }))) })));
|
|
81
59
|
});
|
|
82
60
|
//# sourceMappingURL=address-suggestion-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-suggestion-popover.js","sourceRoot":"","sources":["../../../src/address-suggestion-popover/components/address-suggestion-popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"address-suggestion-popover.js","sourceRoot":"","sources":["../../../src/address-suggestion-popover/components/address-suggestion-popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAM,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAgB,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAoB/C,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,G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S,CAAC,IAAI,CAAC,CAAC,CAAC;IAErB,OAAO,CACH,KAAC,OAAO,kBACJ,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,IACZ,SAAS,cAEZ,SAAS,CAAC,CAAC,CAAC,CACT,4BAAK,SAAS,EAAC,4BAA4B,gBACvC,KAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,IACrB,CACT,CAAC,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAC,CAAC,CAAC,CAClB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAClB,KAAC,MAAM,kBAEH,IAAI,QACJ,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAClC,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE,CACV,kBAAkB,CAAC,wBAAwB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,gBAG7D,MAAM,CAAC,KAAK,KATR,MAAM,CAAC,GAAG,CAUV,CACZ,CAAC,CACL,CAAC,CAAC,CAAC,CACA,KAAC,QAAQ,kBAAC,SAAS,EAAC,sBAAsB,EAAC,IAAI,0CAEpC,CACd,IACK,CACb,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./components/address-suggestion-popover"), exports);
|
|
14
|
-
__exportStar(require("./utils"), exports);
|
|
1
|
+
export * from './components/address-suggestion-popover';
|
|
2
|
+
export * from './utils';
|
|
15
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/address-suggestion-popover/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/address-suggestion-popover/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC;AACxD,cAAc,SAAS,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,9 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
8
|
});
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
exports.GoogleGeocoderSuggestionsProvider = void 0;
|
|
13
|
-
class GoogleGeocoderSuggestionsProvider {
|
|
10
|
+
export class GoogleGeocoderSuggestionsProvider {
|
|
14
11
|
constructor() {
|
|
15
12
|
Object.defineProperty(this, "getSuggestions", {
|
|
16
13
|
enumerable: true,
|
|
@@ -121,5 +118,4 @@ class GoogleGeocoderSuggestionsProvider {
|
|
|
121
118
|
});
|
|
122
119
|
}
|
|
123
120
|
}
|
|
124
|
-
exports.GoogleGeocoderSuggestionsProvider = GoogleGeocoderSuggestionsProvider;
|
|
125
121
|
//# sourceMappingURL=google-geocoder-suggestions-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-geocoder-suggestions-provider.js","sourceRoot":"","sources":["../../../src/address-suggestion-popover/utils/google-geocoder-suggestions-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-geocoder-suggestions-provider.js","sourceRoot":"","sources":["../../../src/address-suggestion-popover/utils/google-geocoder-suggestions-provider.ts"],"names":[],"mappings":";;;;;;;;;AAEA,MAAM,OAAO,iCAAiC;IAA9C;QACI;;;;mBAAiB,CAAO,OAAqB,EAAE,EAAE;gBAC7C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBAChB,OAAO;iBACV;gBACD,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACjD,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC/D,MAAM,MAAM,GAAG;oBACX,OAAO,EAAE,UAAU;oBACnB,MAAM,EAAE,WAAW;iBACtB,CAAC;gBACF,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAC5C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBACnD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACrD,CAAC,CAAA;WAAC;QAEF;;;;mBAA0B,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAgB,EAAE,EAAE;gBACpF,MAAM,YAAY,GAAa,EAAE,CAAC;gBAElC,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,IAAa,EAAE,EAAE;oBACjD,IAAI,IAAI,EAAE;wBACN,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;qBACnC;gBACL,CAAC,CAAC;gBAEF,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nB;gBACD,MAAM,KAAK,GAAG,IAAI,CAAC,yBAAyB,CAAC,UAAU,EAAE,6BAA6B,CAAC,CAAC;gBACxF,IAAI,KAAK,IAAI,yBAAyB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;oBACzD,OAAO,KAAK,CAAC;iBAChB;gBACD,MAAM,WAAW,GAAG,IAAI,CAAC,yBAAyB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;gBAC9E,IAAI,WAAW,IAAI,yBAAyB,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;oBACrE,OAAO,WAAW,CAAC;iBACtB;gBACD,MAAM,YAAY,GAAG,IAAI,CAAC,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;gBAChF,IAAI,YAAY,IAAI,yBAAyB,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;oBACvE,OAAO,YAAY,CAAC;iBACvB;gBAED,OAAO,MAAA,MAAA,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAK,mCAAI,WAAW,mCAAI,YAAY,CAAC;YAC5D,CAAC;WAAC;IACN,CAAC;CAAA"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
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("./google-geocoder-suggestions-provider"), exports);
|
|
1
|
+
export * from './google-geocoder-suggestions-provider';
|
|
14
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/address-suggestion-popover/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/address-suggestion-popover/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC"}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const react_ioc_1 = require("@servicetitan/react-ioc");
|
|
13
|
-
const state_and_province_dropdown_input_1 = require("./state-and-province-dropdown-input");
|
|
14
|
-
const company_profile_form_store_1 = require("../stores/company-profile-form.store");
|
|
15
|
-
const form_1 = require("@servicetitan/form");
|
|
16
|
-
exports.CompanyProfileForm = (0, mobx_react_1.observer)((props) => {
|
|
17
|
-
const [{ form, showFormError, zipCodeMask, einOrBnMask, einOrBnInputProps, countries, countryAndRegionData, regionToCodeMap, phoneMask, },] = (0, react_ioc_1.useDependencies)(company_profile_form_store_1.CompanyProfileFormStore);
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Form } from '@servicetitan/design-system';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { CountryDropdownInput } from './country-dropdown-input';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import { useDependencies } from '@servicetitan/react-ioc';
|
|
7
|
+
import { StateAndProvinceDropdownInput } from './state-and-province-dropdown-input';
|
|
8
|
+
import { CompanyProfileFormStore } from '../stores/company-profile-form.store';
|
|
9
|
+
import { MaskedInput } from '@servicetitan/form';
|
|
10
|
+
export const CompanyProfileForm = observer((props) => {
|
|
11
|
+
const [{ form, showFormError, zipCodeMask, einOrBnMask, einOrBnInputProps, countries, countryAndRegionData, regionToCodeMap, phoneMask, },] = useDependencies(CompanyProfileFormStore);
|
|
18
12
|
const zipCodeOnChangeHandler = (zip) => {
|
|
19
13
|
form.$.companyZipCode.onChange(zip);
|
|
20
14
|
};
|
|
@@ -32,10 +26,10 @@ exports.CompanyProfileForm = (0, mobx_react_1.observer)((props) => {
|
|
|
32
26
|
};
|
|
33
27
|
const { companyName, companyStreetAddress, companyCity, companyCountry, companyStateCode, companyZipCode, adminPhone, einOrBn, } = form.$;
|
|
34
28
|
const zipCodeHasError = companyZipCode.hasError;
|
|
35
|
-
return ((
|
|
29
|
+
return (_jsxs(Form, Object.assign({ size: "tiny", className: classNames(props.className, 'ta-left', 'p-x-6') }, { children: [_jsx(Form.Input, { label: "Company Name", placeholder: "Company Name", value: companyName.value, onChange: companyName.onChangeHandler, error: (companyName.dirty || showFormError) && companyName.hasError }), _jsx(Form.Input, { label: "Street Address", placeholder: "Street Address", value: companyStreetAddress.value, onChange: companyStreetAddress.onChangeHandler, error: (companyStreetAddress.dirty || showFormError) && companyStreetAddress.hasError }), _jsxs(Form.Group, Object.assign({ width: "equal" }, { children: [_jsx(Form.Input, { fluid: true, label: "City", placeholder: "City", className: "p-r-0", width: "6", value: companyCity.value, onChange: companyCity.onChangeHandler, error: (companyCity.dirty || showFormError) && companyCity.hasError }), _jsx(StateAndProvinceDropdownInput, { width: "6", countryCode: companyCountry.value || 'USA', fieldState: companyStateCode, error: (companyStateCode.dirty || showFormError) && companyStateCode.hasError, countryAndRegionData: countryAndRegionData, regionNameToCodeMap: regionToCodeMap })] })), _jsxs(Form.Group, Object.assign({ width: "equal" }, { children: [_jsx(MaskedInput, { fluid: true, label: "ZIP Code", placeholder: "ZIP Code", value: companyZipCode.value, onChange: zipCodeOnChangeHandler, mask: zipCodeMask, className: "p-r-0", maskChar: " ", error: (companyZipCode.dirty || showFormError) && zipCodeHasError, width: 6 }), _jsx(CountryDropdownInput, { width: "6", value: companyCountry.value, onChange: countryOnChangeHandler, error: (companyCountry.dirty || showFormError) && companyCountry.hasError, options: countries.map(x => ({
|
|
36
30
|
key: x,
|
|
37
31
|
value: x,
|
|
38
32
|
text: x === 'USA' ? 'United States' : x,
|
|
39
|
-
})) }
|
|
33
|
+
})) })] })), _jsxs(Form.Group, Object.assign({ width: "equal" }, { children: [_jsx(MaskedInput, { fluid: true, label: "Phone Number", placeholder: "Phone Number", value: adminPhone.value, onChange: phoneOnChangeHandler, error: (adminPhone.dirty || showFormError) && adminPhone.hasError, mask: phoneMask, width: 6 }), _jsx(MaskedInput, { fluid: true, label: einOrBnInputProps.label, placeholder: einOrBnInputProps.placeholder, value: einOrBn.value, onChange: einOrBnOnChangeHandler, mask: einOrBnMask, className: "p-r-0", maskChar: " ", error: (einOrBn.dirty || showFormError) && einOrBn.hasError, width: 6 })] }))] })));
|
|
40
34
|
});
|
|
41
35
|
//# sourceMappingURL=company-profile-form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-profile-form.js","sourceRoot":"","sources":["../../../src/company-profile/components/company-profile-form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-profile-form.js","sourceRoot":"","sources":["../../../src/company-profile/components/company-profile-form.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAqB,MAAM,6BAA6B,CAAC;AACtE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,WAA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E,CAAC,UAAU,CAAC,KAAK,IAAI,aAAa,CAAC,IAAI,UAAU,CAAC,QAAQ,EACjE,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,CAAC,GACV,EACF,KAAC,WAAW,IACR,KAAK,QACL,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAC9B,WAAW,EAAE,iBAAiB,CAAC,WAAW,EAC1C,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,QAAQ,EAAE,sBAAsB,EAChC,IAAI,EAAE,WAAW,EACjB,SAAS,EAAC,OAAO,EACjB,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC,IAAI,OAAO,CAAC,QAAQ,EAC3D,KAAK,EAAE,CAAC,GACV,KACO,KACV,CACV,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
2
|
var t = {};
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -10,13 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
9
|
}
|
|
11
10
|
return t;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const mobx_react_1 = require("mobx-react");
|
|
18
|
-
exports.CountryDropdownInput = (0, mobx_react_1.observer)((props) => {
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Form } from '@servicetitan/design-system';
|
|
14
|
+
import { observer } from 'mobx-react';
|
|
15
|
+
export const CountryDropdownInput = observer((props) => {
|
|
19
16
|
const { value, width, placeholder } = props, rest = __rest(props, ["value", "width", "placeholder"]);
|
|
20
|
-
return ((
|
|
17
|
+
return (_jsx(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: value }, rest)));
|
|
21
18
|
});
|
|
22
19
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"country-dropdown-input.js","sourceRoot":"","sources":["../../../src/company-profile/components/country-dropdown-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAqB,IAAI,EAAkB,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,CAAC,KAA4B,EAAE,EAAE;IAC1E,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA9C,iCAAsC,CAAQ,CAAC;IACrD,OAAO,CACH,KAAC,IAAI,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,KAAK,IACR,IAAI,EACV,CACL,CAAC;AACN,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
2
|
var t = {};
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -10,17 +9,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
9
|
}
|
|
11
10
|
return t;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const design_system_1 = require("@servicetitan/design-system");
|
|
18
|
-
const mobx_react_1 = require("mobx-react");
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
|
+
import { Form } from '@servicetitan/design-system';
|
|
15
|
+
import { observer } from 'mobx-react';
|
|
19
16
|
const toTitleCase = (str) => str.replace(/\w\S*/g, txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase());
|
|
20
|
-
|
|
17
|
+
export const StateAndProvinceDropdownInput = observer((props) => {
|
|
21
18
|
const { fieldState, regionNameToCodeMap, countryAndRegionData, countryCode, width, placeholder } = props, rest = __rest(props, ["fieldState", "regionNameToCodeMap", "countryAndRegionData", "countryCode", "width", "placeholder"]);
|
|
22
19
|
const { value, onChange, onChangeHandler } = fieldState;
|
|
23
|
-
|
|
20
|
+
useEffect(() => {
|
|
24
21
|
var _a;
|
|
25
22
|
/*
|
|
26
23
|
* requirement: convert any incoming state value that is a full state/province name
|
|
@@ -53,6 +50,6 @@ exports.StateAndProvinceDropdownInput = (0, mobx_react_1.observer)((props) => {
|
|
|
53
50
|
? 'Province'
|
|
54
51
|
: 'State';
|
|
55
52
|
const options = regionType === 'Province' ? canadianRegionalData : americanRegionalData;
|
|
56
|
-
return ((
|
|
53
|
+
return (_jsx(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)));
|
|
57
54
|
});
|
|
58
55
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"state-and-province-dropdown-input.js","sourceRoot":"","sources":["../../../src/company-profile/components/state-and-province-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AAC;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,WAAW,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,KAAC,IAAI,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,EACV,CACL,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,19 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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("./components/company-profile-form"), exports);
|
|
14
|
-
__exportStar(require("./components/country-dropdown-input"), exports);
|
|
15
|
-
__exportStar(require("./components/state-and-province-dropdown-input"), exports);
|
|
16
|
-
__exportStar(require("./stores/company-profile-form.store"), exports);
|
|
17
|
-
__exportStar(require("./stores/__mocks__/company-profile-form-mock-data"), exports);
|
|
18
|
-
__exportStar(require("./utils/validators"), exports);
|
|
1
|
+
export * from './components/company-profile-form';
|
|
2
|
+
export * from './components/country-dropdown-input';
|
|
3
|
+
export * from './components/state-and-province-dropdown-input';
|
|
4
|
+
export * from './stores/company-profile-form.store';
|
|
5
|
+
export * from './stores/__mocks__/company-profile-form-mock-data';
|
|
6
|
+
export * from './utils/validators';
|
|
19
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/company-profile/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/company-profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,qCAAqC,CAAC;AACpD,cAAc,mDAAmD,CAAC;AAClE,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompanyProfileFormCanadian = exports.CompanyProfileFormEmptyValues = exports.CompanyProfileFormCorrect = void 0;
|
|
4
|
-
exports.CompanyProfileFormCorrect = {
|
|
1
|
+
export const CompanyProfileFormCorrect = {
|
|
5
2
|
companyName: 'Wyatt Works',
|
|
6
3
|
adminPhone: '(310) 855-8585',
|
|
7
4
|
companyStreetAddress: '123 Main St.',
|
|
@@ -11,7 +8,7 @@ exports.CompanyProfileFormCorrect = {
|
|
|
11
8
|
companyZipCode: '12345',
|
|
12
9
|
einOrBn: '',
|
|
13
10
|
};
|
|
14
|
-
|
|
11
|
+
export const CompanyProfileFormEmptyValues = {
|
|
15
12
|
companyName: '',
|
|
16
13
|
adminPhone: '',
|
|
17
14
|
companyStreetAddress: '',
|
|
@@ -20,7 +17,7 @@ exports.CompanyProfileFormEmptyValues = {
|
|
|
20
17
|
companyCity: '',
|
|
21
18
|
companyZipCode: '',
|
|
22
19
|
};
|
|
23
|
-
|
|
20
|
+
export const CompanyProfileFormCanadian = {
|
|
24
21
|
companyName: 'Wyatt Works',
|
|
25
22
|
adminPhone: '(310) 855-8585',
|
|
26
23
|
companyStreetAddress: '123 Main St.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company-profile-form-mock-data.js","sourceRoot":"","sources":["../../../../src/company-profile/stores/__mocks__/company-profile-form-mock-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"company-profile-form-mock-data.js","sourceRoot":"","sources":["../../../../src/company-profile/stores/__mocks__/company-profile-form-mock-data.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAiB;IACnD,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,gBAAgB;IAC5B,oBAAoB,EAAE,cAAc;IACpC,cAAc,EAAE,KAAK;IACrB,gBAAgB,EAAE,IAAI;IACtB,WAAW,EAAE,UAAU;IACvB,cAAc,EAAE,OAAO;IACvB,OAAO,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAiB;IACvD,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,oBAAoB,EAAE,EAAE;IACxB,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,EAAE;IACpB,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,EAAE;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAiB;IACpD,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,gBAAgB;IAC5B,oBAAoB,EAAE,cAAc;IACpC,cAAc,EAAE,IAAI;IACpB,gBAAgB,EAAE,IAAI;IACtB,WAAW,EAAE,UAAU;IACvB,cAAc,EAAE,OAAO;CAC1B,CAAC"}
|