@vonq/hapi-elements-types 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/_window/api.types.ts +23 -0
- package/_window/events.types.ts +10 -10
- package/_window/sdk.types.ts +12 -1
- package/_window/service.types.ts +3 -0
- package/_window/state.types.ts +12 -6
- package/_window/window.ts +2 -0
- package/ats/api.types.ts +5 -1
- package/ats/state.types.ts +2 -1
- package/ats/types.ts +9 -1
- package/basket/service.types.ts +7 -1
- package/basket/state.types.ts +1 -21
- package/basket/utils.types.ts +36 -0
- package/campaign/state.types.ts +0 -30
- package/campaign/types.ts +9 -5
- package/campaign/validations.types.ts +10 -3
- package/common/enums.ts +2 -0
- package/common/events/EventCommand/enums.ts +5 -4
- package/common/events/EventCommand/types.ts +2 -0
- package/common/events/types.ts +4 -1
- package/common/qa.types.ts +2 -0
- package/common/validations.types.ts +2 -0
- package/contract/state.types.ts +0 -45
- package/contract/utils.types.ts +2 -1
- package/debugging/state.types.ts +1 -12
- package/modal/enums.ts +3 -0
- package/modal/types.ts +19 -0
- package/orderJourney/enums.ts +1 -1
- package/orderJourney/service.types.ts +16 -0
- package/orderJourney/state.types.ts +11 -5
- package/orderJourney/types.ts +50 -12
- package/orderJourney/utils.types.ts +8 -0
- package/orderJourney/validations.types.ts +23 -2
- package/package.json +1 -1
- package/product/enums.ts +1 -0
- package/product/state.types.ts +2 -57
- package/product/types.ts +12 -7
- package/product/utils.types.ts +0 -4
- package/routing/state.types.ts +1 -1
- package/theming/types.ts +5 -0
- package/ui/service.types.ts +6 -4
- package/wallet/state.types.ts +0 -36
package/contract/state.types.ts
CHANGED
@@ -10,65 +10,20 @@ import { PaginationResponseV1 } from "../common/types"
|
|
10
10
|
|
11
11
|
export type ContractState = {
|
12
12
|
/* Contracts */
|
13
|
-
/**
|
14
|
-
* Array of Contracts to be displayed in Contracts Landing or Contracts List widgets.
|
15
|
-
*/
|
16
13
|
contracts: Contract[]
|
17
|
-
/**
|
18
|
-
* An object that holds information like next URL, previous URL and count for pagination purposes
|
19
|
-
*/
|
20
14
|
contractsPaginationMeta: PaginationResponseV1
|
21
|
-
/**
|
22
|
-
* Shows a loading spinner when the Contracts are loading
|
23
|
-
*/
|
24
15
|
contractsAreLoading: boolean
|
25
|
-
/**
|
26
|
-
* Selected Channel ID that will trigger an API request to fetch the data then to populate `contractSelected`
|
27
|
-
*/
|
28
16
|
contractSelectedId: string | number | null
|
29
|
-
/**
|
30
|
-
* Selected Channel that will be part of the Contract when user submits the form
|
31
|
-
*/
|
32
17
|
contractSelected: ProductSupportingContractsComplete | null
|
33
|
-
/**
|
34
|
-
* Shows a loading spinner when the properties required for the Contract are being loaded from the API
|
35
|
-
*/
|
36
18
|
contractSelectedIsLoading: boolean
|
37
|
-
/**
|
38
|
-
* The object that contains details for the new Contract that will be created when user submits the form
|
39
|
-
*/
|
40
19
|
contractForm: ContractCreateForm
|
41
|
-
/**
|
42
|
-
* Error(s) received from the API when user submits the form
|
43
|
-
*/
|
44
20
|
contractCreateError: any
|
45
|
-
/**
|
46
|
-
* Client-side validation result of the `contractForm`. **This value is a computed getter meaning that it cannot be set from outside**
|
47
|
-
*/
|
48
21
|
contractFormIsValid: boolean | null
|
49
22
|
/* Contracts Groups */
|
50
|
-
/**
|
51
|
-
* Array of Contract Groups for user to select during creation of a new Contract.
|
52
|
-
*/
|
53
23
|
groups: ContractGroup[]
|
54
|
-
/**
|
55
|
-
* Selected Contract Group to be saved as part of Contract that will be created when user submits the form
|
56
|
-
*/
|
57
24
|
groupSelected: ContractGroupSelected
|
58
|
-
/**
|
59
|
-
* Shows a loading spinner and disables the Select HTML Element when Contract Groups are loading
|
60
|
-
*/
|
61
25
|
groupsAreLoading: boolean
|
62
|
-
/**
|
63
|
-
* Shows a loading spinner and disables the submit button while a new Contract Group is being created
|
64
|
-
*/
|
65
26
|
groupIsCreating: boolean
|
66
|
-
/**
|
67
|
-
* Error message displayed to the end user when the new Contract Group could not be created
|
68
|
-
*/
|
69
27
|
groupCreateError: string | null
|
70
|
-
/**
|
71
|
-
* The object that contains details for the new Contract Group that will be created when user submits the form
|
72
|
-
*/
|
73
28
|
groupForm: ContractGroupCreateForm
|
74
29
|
}
|
package/contract/utils.types.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ContractCreateForm, ContractGroupCreateForm } from "./types"
|
1
|
+
import { Contract, ContractCreateForm, ContractGroupCreateForm } from "./types"
|
2
2
|
import { WindowHapiUtils } from "../_window/utils.types"
|
3
3
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
|
@@ -6,6 +6,7 @@ export type WindowHapiUtilsContract = WindowHapiModuleWithConstructorArgs<
|
|
6
6
|
{
|
7
7
|
getInitialContractForm: () => ContractCreateForm
|
8
8
|
getInitialGroupForm: () => ContractGroupCreateForm
|
9
|
+
getContractNameWithGroupSuffix: (contract: Contract) => string
|
9
10
|
},
|
10
11
|
{ readonly utils: WindowHapiUtils }
|
11
12
|
>
|
package/debugging/state.types.ts
CHANGED
@@ -1,18 +1,7 @@
|
|
1
1
|
export type DebuggingState = {
|
2
|
-
/**
|
3
|
-
* Shows or hides the debugging tool on Campaign Create Form's fields for Product & Contract steps
|
4
|
-
*/
|
5
2
|
campaignFormDebuggerIsShown: boolean
|
6
|
-
/**
|
7
|
-
* Shows translation keys in place of translations for ease of development
|
8
|
-
*/
|
9
3
|
localeDebuggingIsEnabled: boolean
|
10
|
-
/**
|
11
|
-
* Encompasses widgets that may become available (or upon request) with a red border and a name so communication while making requests is easier.
|
12
|
-
*/
|
13
4
|
componentDebuggingIsEnabled: boolean
|
14
|
-
/**
|
15
|
-
* Enables console logs (all HAPI Elements) logs
|
16
|
-
*/
|
17
5
|
consoleLogsAreEnabled: boolean
|
6
|
+
isAIFeaturesEnabled: boolean
|
18
7
|
}
|
package/modal/enums.ts
CHANGED
@@ -11,4 +11,7 @@ export enum ModalKeys {
|
|
11
11
|
campaignCopyConfirmation = "campaign-confirm-copy",
|
12
12
|
basketRemoveProductConfirmation = "remove-product-from-basket",
|
13
13
|
contractRemoveConfirmation = "contract-remove-confirmation",
|
14
|
+
contractGroupConflictInfo = "contract-group-conflict-info",
|
15
|
+
filePicker = "file-picker",
|
16
|
+
contractPostingRequirementsSmartFillSuccess = "contract-posting-requirements-smart-fill-success",
|
14
17
|
}
|
package/modal/types.ts
CHANGED
@@ -2,6 +2,7 @@ import { Product } from "../product/types"
|
|
2
2
|
import { Contract } from "../contract/types"
|
3
3
|
import { ModalKeys, ModalZone } from "./enums"
|
4
4
|
import { AnyNonFunction } from "../common/types"
|
5
|
+
import { TransformedPostingRequirement } from "../campaign"
|
5
6
|
|
6
7
|
export type ProductDetailModalProps = {
|
7
8
|
id: string
|
@@ -12,6 +13,21 @@ export type BasketRemoveProductConfirmationModalProps = {
|
|
12
13
|
}
|
13
14
|
export type CampaignTakeOfflineConfirmationModalProps = { campaignId: string }
|
14
15
|
export type ContractRemoveConfirmationModalProps = { contractId: string }
|
16
|
+
export type ContractGroupConflictInfoModalProps = {
|
17
|
+
contract: Contract
|
18
|
+
conflictingContracts: Contract[]
|
19
|
+
}
|
20
|
+
export type ContractPostingRequirementsSmartFillResponseModalProps = {
|
21
|
+
response: Record<string, any>
|
22
|
+
postingRequirements: Record<string, TransformedPostingRequirement>
|
23
|
+
contractId: string
|
24
|
+
}
|
25
|
+
export type FilePickerOptions = {
|
26
|
+
accept?: string[]
|
27
|
+
uploadInBackground?: boolean
|
28
|
+
maxFiles?: number
|
29
|
+
maxSize?: number
|
30
|
+
}
|
15
31
|
export type BasketModalProps = {}
|
16
32
|
export type WalletModalProps = {}
|
17
33
|
|
@@ -21,6 +37,8 @@ export type ModalProps = AnyNonFunction<
|
|
21
37
|
| BasketRemoveProductConfirmationModalProps
|
22
38
|
| CampaignTakeOfflineConfirmationModalProps
|
23
39
|
| ContractRemoveConfirmationModalProps
|
40
|
+
| ContractGroupConflictInfoModalProps
|
41
|
+
| ContractPostingRequirementsSmartFillResponseModalProps
|
24
42
|
| BasketModalProps
|
25
43
|
| WalletModalProps
|
26
44
|
>
|
@@ -28,6 +46,7 @@ export type ModalProps = AnyNonFunction<
|
|
28
46
|
export type ModalOptions = {
|
29
47
|
showCloseButton?: boolean
|
30
48
|
showBackdrop?: boolean
|
49
|
+
unstyled?: boolean
|
31
50
|
disableVerticalScroll?: boolean
|
32
51
|
}
|
33
52
|
|
package/orderJourney/enums.ts
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
import {
|
2
|
+
HapiServiceFunctionWithLifecycleHooks,
|
3
|
+
WindowHapiService,
|
4
|
+
} from "../_window/service.types"
|
5
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
6
|
+
|
7
|
+
export type OrderJourneyServiceSwitchToNextStepHandler = () => Promise<void>
|
8
|
+
export type OrderJourneyServiceSwitchToPreviousStepHandler = () => Promise<void>
|
9
|
+
|
10
|
+
export type WindowHapiServiceOrderJourney = WindowHapiModuleWithConstructorArgs<
|
11
|
+
{
|
12
|
+
switchToNextStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToNextStepHandler>
|
13
|
+
switchToPreviousStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToPreviousStepHandler>
|
14
|
+
},
|
15
|
+
{ readonly service: WindowHapiService }
|
16
|
+
>
|
@@ -1,5 +1,11 @@
|
|
1
1
|
import { OrderJourneyPaymentMethod, OrderJourneyStepKey } from "./enums"
|
2
|
-
import {
|
2
|
+
import {
|
3
|
+
OrderJourneyStep,
|
4
|
+
OrderJourneyContractStep,
|
5
|
+
OrderJourneyUTMStepData,
|
6
|
+
OrderJourneyUTMStepValidations,
|
7
|
+
OrderJourneyOrderReviewStepData,
|
8
|
+
} from "./types"
|
3
9
|
import { MessageDescriptor } from "react-intl"
|
4
10
|
import { NestedValidatorKeys, UseValidatorResult } from "../common/types"
|
5
11
|
|
@@ -15,9 +21,9 @@ export type OrderJourneyState = {
|
|
15
21
|
stepActive: OrderJourneyStep | null
|
16
22
|
stepNext: OrderJourneyStep | null
|
17
23
|
stepsPopulatedAreHidden: boolean
|
24
|
+
stepIsSwitching: boolean
|
18
25
|
paymentMethodsAvailable: OrderJourneyPaymentMethod[]
|
19
26
|
paymentMethodsEnabled: OrderJourneyPaymentMethod[]
|
20
|
-
paymentMethodActive: OrderJourneyPaymentMethod | null
|
21
27
|
hidePrefilledFields: boolean
|
22
28
|
orderErrors: Record<string, any> | null
|
23
29
|
/* Onboarding */
|
@@ -82,11 +88,11 @@ export type OrderJourneyState = {
|
|
82
88
|
contractStepsValidations: Record<string, UseValidatorResult> | null
|
83
89
|
/* UTM Codes */
|
84
90
|
utmCodesStep: OrderJourneyStep
|
85
|
-
utmCodesStepData:
|
86
|
-
utmCodesStepValidations:
|
91
|
+
utmCodesStepData: OrderJourneyUTMStepData
|
92
|
+
utmCodesStepValidations: OrderJourneyUTMStepValidations
|
87
93
|
/* Order Review */
|
88
94
|
orderReviewStep: OrderJourneyStep
|
89
|
-
orderReviewStepData:
|
95
|
+
orderReviewStepData: OrderJourneyOrderReviewStepData
|
90
96
|
orderReviewStepValidations: UseValidatorResult
|
91
97
|
/* Payment Method */
|
92
98
|
paymentMethodStep: OrderJourneyStep
|
package/orderJourney/types.ts
CHANGED
@@ -1,18 +1,24 @@
|
|
1
1
|
import { MessageDescriptor } from "react-intl"
|
2
2
|
import { OrderJourneyStepKey } from "./enums"
|
3
|
+
import { UseValidatorResult } from "../common"
|
3
4
|
|
4
|
-
export type OrderJourneyStepBlurredFields =
|
5
|
-
string
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
>
|
5
|
+
export type OrderJourneyStepBlurredFields = {
|
6
|
+
[k: string]:
|
7
|
+
| boolean
|
8
|
+
| Record<string, boolean | OrderJourneyStepBlurredFields>
|
9
|
+
}
|
10
10
|
|
11
|
-
export type
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
export type OrderJourneyStepErrorMessage = Record<string, MessageDescriptor>
|
12
|
+
|
13
|
+
export type OrderJourneyStepErrorMessages = {
|
14
|
+
[k: string]:
|
15
|
+
| MessageDescriptor
|
16
|
+
| Record<string, MessageDescriptor | OrderJourneyStepErrorMessage>
|
17
|
+
}
|
18
|
+
|
19
|
+
export type OrderJourneyStepHideFields = {
|
20
|
+
[k: string]: boolean | Record<string, boolean | OrderJourneyStepHideFields>
|
21
|
+
}
|
16
22
|
|
17
23
|
export type OrderJourneyStepKeyType = OrderJourneyStepKey | string
|
18
24
|
export type OrderJourneyStep = {
|
@@ -22,10 +28,42 @@ export type OrderJourneyStep = {
|
|
22
28
|
isSubmitted?: boolean
|
23
29
|
blurredFields?: OrderJourneyStepBlurredFields
|
24
30
|
errorMessagesIntlDescriptors?: OrderJourneyStepErrorMessages
|
25
|
-
hideFields?:
|
31
|
+
hideFields?: OrderJourneyStepHideFields
|
26
32
|
}
|
27
33
|
|
28
34
|
export type OrderJourneyContractStep = Omit<
|
29
35
|
OrderJourneyStep,
|
30
36
|
"blurredFields" | "isSubmitted" | "errorMessagesIntlDescriptors"
|
31
37
|
>
|
38
|
+
|
39
|
+
export type UTMMap = {
|
40
|
+
value: string
|
41
|
+
mapToName: boolean
|
42
|
+
key: string
|
43
|
+
}
|
44
|
+
|
45
|
+
export type OrderJourneyUTMStepData = {
|
46
|
+
settings: UTMMap[]
|
47
|
+
productUTMs: Record<string, UTMMap[]>
|
48
|
+
}
|
49
|
+
|
50
|
+
export type OrderJourneyUTMStepValidations = {
|
51
|
+
settings: {
|
52
|
+
name: UseValidatorResult
|
53
|
+
value: UseValidatorResult
|
54
|
+
}
|
55
|
+
productUTMs: Record<
|
56
|
+
string,
|
57
|
+
{
|
58
|
+
settings: {
|
59
|
+
name: UseValidatorResult
|
60
|
+
value: UseValidatorResult
|
61
|
+
}
|
62
|
+
}
|
63
|
+
>
|
64
|
+
areAllValid: boolean
|
65
|
+
}
|
66
|
+
|
67
|
+
export type OrderJourneyOrderReviewStepData = {
|
68
|
+
accordionsOpen: OrderJourneyStepKey[]
|
69
|
+
}
|
@@ -1,11 +1,19 @@
|
|
1
1
|
import { OrderJourneyPaymentMethod, OrderJourneyStepKey } from "./enums"
|
2
2
|
import { WindowHapiUtils } from "../_window/utils.types"
|
3
3
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
|
+
import { Contract } from "../contract"
|
5
|
+
import { Product } from "../product"
|
4
6
|
|
5
7
|
export type WindowHapiUtilsOrderJourney = WindowHapiModuleWithConstructorArgs<
|
6
8
|
{
|
7
9
|
stepKeys: typeof OrderJourneyStepKey
|
8
10
|
paymentMethodKeys: typeof OrderJourneyPaymentMethod
|
11
|
+
updateProductUTMsFromBasketItemData: (
|
12
|
+
basketItemData: (Contract | Product)[],
|
13
|
+
) => void
|
14
|
+
updateOrderReviewAccordionStatesFromBasketItemData: (
|
15
|
+
basketItemData: (Contract | Product)[],
|
16
|
+
) => void
|
9
17
|
},
|
10
18
|
{ readonly utils: WindowHapiUtils }
|
11
19
|
>
|
@@ -1,25 +1,42 @@
|
|
1
1
|
import {
|
2
2
|
ZodArray,
|
3
3
|
ZodBoolean,
|
4
|
+
ZodNativeEnum,
|
4
5
|
ZodObject,
|
5
6
|
ZodOptional,
|
6
7
|
ZodRecord,
|
7
8
|
ZodString,
|
8
9
|
ZodTypeAny,
|
10
|
+
ZodUnion,
|
9
11
|
} from "zod"
|
10
12
|
import { OrderJourneyPaymentMethod, OrderJourneyStepKey } from "./enums"
|
11
13
|
import { ZodIntlDescriptor } from "../common/validations.types"
|
12
14
|
|
13
15
|
export type ZodOrderJourneyStep = ZodObject<{
|
14
16
|
key: ZodString
|
15
|
-
titleIntlDescriptor: ZodIntlDescriptor
|
16
|
-
descriptionIntlDescriptor: ZodIntlDescriptor
|
17
|
+
titleIntlDescriptor: ZodOptional<ZodIntlDescriptor>
|
18
|
+
descriptionIntlDescriptor: ZodOptional<ZodIntlDescriptor>
|
17
19
|
isSubmitted: ZodOptional<ZodBoolean>
|
18
20
|
blurredFields: ZodOptional<ZodRecord<ZodString, ZodTypeAny>>
|
19
21
|
errorMessagesIntlDescriptors: ZodOptional<ZodRecord<ZodString, ZodTypeAny>>
|
20
22
|
}>
|
21
23
|
|
22
24
|
export type ZodOrderJourneySteps = ZodArray<ZodOrderJourneyStep>
|
25
|
+
export type ZodOrderJourneyUTMCodeMap = ZodObject<{
|
26
|
+
mapToName: ZodBoolean
|
27
|
+
value: ZodString
|
28
|
+
key: ZodString
|
29
|
+
}>
|
30
|
+
export type ZodOrderJourneyUTMCodeMaps = ZodArray<ZodOrderJourneyUTMCodeMap>
|
31
|
+
export type ZodOrderJourneyUTMCodesStepData = ZodObject<{
|
32
|
+
settings: ZodOrderJourneyUTMCodeMaps
|
33
|
+
productUTMs: ZodRecord<ZodString, ZodOrderJourneyUTMCodeMaps>
|
34
|
+
}>
|
35
|
+
export type ZodOrderJourneyOrderReviewStepData = ZodObject<{
|
36
|
+
accordionsOpen: ZodArray<
|
37
|
+
ZodUnion<[ZodNativeEnum<typeof OrderJourneyStepKey>, ZodString]>
|
38
|
+
>
|
39
|
+
}>
|
23
40
|
export type WindowHapiValidationsOrderJourney = {
|
24
41
|
supportedStepKeys: OrderJourneyStepKey[]
|
25
42
|
stepKeysRegex: RegExp
|
@@ -31,4 +48,8 @@ export type WindowHapiValidationsOrderJourney = {
|
|
31
48
|
paymentMethods: ZodArray<ZodString>
|
32
49
|
supportedPaymentMethods: OrderJourneyPaymentMethod[]
|
33
50
|
paymentMethodsRegex: RegExp
|
51
|
+
utmMap: ZodOrderJourneyUTMCodeMap
|
52
|
+
utmMaps: ZodOrderJourneyUTMCodeMaps
|
53
|
+
utmCodesStepData: ZodOrderJourneyUTMCodesStepData
|
54
|
+
orderReviewStepData: ZodOrderJourneyOrderReviewStepData
|
34
55
|
}
|
package/package.json
CHANGED
package/product/enums.ts
CHANGED
package/product/state.types.ts
CHANGED
@@ -10,84 +10,29 @@ import { PaginationResponseV1 } from "../common/types"
|
|
10
10
|
|
11
11
|
export type ProductState = {
|
12
12
|
/* Products */
|
13
|
-
/**
|
14
|
-
* Array of Products to be listed on Products Landing and Products List widgets. As user applies filters and sorting, this value gets overwritten
|
15
|
-
*/
|
16
13
|
recommendedProducts: Product[]
|
17
|
-
/**
|
18
|
-
* Indicates if recommended products are loading
|
19
|
-
*/
|
20
14
|
recommendedProductsAreLoading: boolean
|
21
|
-
/**
|
22
|
-
* Array of Products to be listed on Contracts Add Channel Selector Dropdown
|
23
|
-
*/
|
24
15
|
productsWithContractsSupport: ProductSupportingContractsPartial[]
|
25
|
-
/**
|
26
|
-
* Indicates whether the Products with Contracts support is loading (mainly used for showing a loading spinner on the Select element when the user is searching for a Product when creating a contract)
|
27
|
-
*/
|
28
16
|
productsWithContractsSupportAreLoading: boolean
|
29
|
-
/**
|
30
|
-
* Array of Products to be listed on Products Landing and Products List widgets. As user applies filters and sorting, this value gets overwritten
|
31
|
-
*/
|
32
17
|
products: Product[]
|
33
|
-
/**
|
34
|
-
Offset and limit style pagination meta
|
35
|
-
*/
|
36
18
|
productsPaginationMeta: PaginationResponseV1 | null
|
37
|
-
/**
|
38
|
-
* Indicates if products are loading
|
39
|
-
*/
|
40
19
|
productsAreLoading: boolean
|
41
|
-
/**
|
42
|
-
* The value of Product name in the Input HTML Element that is used to fetch new Product results from the API
|
43
|
-
*/
|
44
20
|
productNameInput: string
|
45
|
-
/**
|
46
|
-
* The selected Product region IDs that is used to fetch new Product results from the API
|
47
|
-
*/
|
48
21
|
jobRegionsIdsSelected: number[]
|
49
22
|
/* Locations */
|
50
|
-
/**
|
51
|
-
* Array of Locations that are lazily loaded with the input given in `jobRegionsIdsSelected`
|
52
|
-
*/
|
53
23
|
jobRegions: ProductLocation[]
|
54
24
|
/* Job Titles */
|
55
|
-
/**
|
56
|
-
* Array of Job Titles that are lazily loaded with the input given in `jobTitlesIdsSelected`
|
57
|
-
*/
|
58
25
|
jobTitles: ProductJobTitle[]
|
59
|
-
/**
|
60
|
-
* The selected Job Title IDs that are used to fetch new Product results from the API
|
61
|
-
*/
|
62
26
|
jobTitlesIdsSelected: number[]
|
63
27
|
/* Job Functions */
|
64
|
-
/**
|
65
|
-
* Array of Job Functions that are lazily loaded with the input given in `jobTitlesIdsSelected`
|
66
|
-
*/
|
67
28
|
jobFunctions: ProductJobFunction[]
|
68
|
-
/**
|
69
|
-
* Shows a loading spinner and disables the Select HTML Element while locations are loading
|
70
|
-
*/
|
71
29
|
jobFunctionsAreLoading: boolean
|
72
|
-
/**
|
73
|
-
* The value of Job Function in the Input HTML Element that lazy loads `jobFunctions`
|
74
|
-
*/
|
75
30
|
jobFunctionsInput: string
|
76
|
-
/**
|
77
|
-
* The selected Job Function IDs that are used to fetch new Product results from the API
|
78
|
-
*/
|
79
31
|
jobFunctionsIdsSelected: number[]
|
80
32
|
/* Industries */
|
81
|
-
/**
|
82
|
-
* The selected Job Industry ID that is used to fetch new Product results from the API
|
83
|
-
*/
|
84
33
|
jobIndustriesIdsSelected: number[]
|
85
|
-
/**
|
86
|
-
* Array of Industries that are lazily loaded with the input given in `jobIndustriesIdsSelected`
|
87
|
-
*/
|
88
34
|
jobIndustries: ProductIndustry[]
|
89
|
-
/**
|
90
|
-
* Shows a loading spinner and disables the Select HTML Element while locations are loading
|
91
|
-
*/
|
92
35
|
jobIndustriesAreLoading: boolean
|
36
|
+
/* Search Text */
|
37
|
+
searchTextInput: string
|
93
38
|
}
|
package/product/types.ts
CHANGED
@@ -64,14 +64,16 @@ export type Product = {
|
|
64
64
|
} & ProductLogos &
|
65
65
|
ProductType
|
66
66
|
|
67
|
+
export type ProductBoardType =
|
68
|
+
| "aggregator"
|
69
|
+
| "job board"
|
70
|
+
| "service"
|
71
|
+
| "social media"
|
72
|
+
| "publication"
|
73
|
+
| "community"
|
74
|
+
|
67
75
|
export type ProductType = {
|
68
|
-
type:
|
69
|
-
| "aggregator"
|
70
|
-
| "job board"
|
71
|
-
| "service"
|
72
|
-
| "social media"
|
73
|
-
| "publication"
|
74
|
-
| "community"
|
76
|
+
type: ProductBoardType
|
75
77
|
}
|
76
78
|
|
77
79
|
export type ProductLogos = {
|
@@ -100,6 +102,8 @@ export type ProductLocationPlaceType =
|
|
100
102
|
| "continent"
|
101
103
|
| "country"
|
102
104
|
| "region"
|
105
|
+
| "place"
|
106
|
+
| "district"
|
103
107
|
|
104
108
|
export type ProductLocation = {
|
105
109
|
bounding_box: any[]
|
@@ -116,6 +120,7 @@ export type ProductFilterQueryParams = {
|
|
116
120
|
jobIndustriesIdsSelected: number[]
|
117
121
|
filterProductRecommendations: ProductFilterRecommendations
|
118
122
|
filterMyContractSupportedOnly: boolean
|
123
|
+
searchTextInput: string
|
119
124
|
}
|
120
125
|
|
121
126
|
export type ProductSearchFilters = {
|
package/product/utils.types.ts
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
import { ProductFilterQueryParams, ProductUserProvidedFilters } from "./types"
|
2
2
|
import { PaginationResponseV1 } from "../common/types"
|
3
|
-
import {
|
4
|
-
OrderJourneyPaymentMethod,
|
5
|
-
OrderJourneyStepKey,
|
6
|
-
} from "../orderJourney/enums"
|
7
3
|
import { WindowHapiUtils } from "../_window/utils.types"
|
8
4
|
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
9
5
|
|
package/routing/state.types.ts
CHANGED
package/theming/types.ts
CHANGED
@@ -39,6 +39,7 @@ declare const useTheme: UseThemeFactory<DefaultTheme>
|
|
39
39
|
|
40
40
|
export type ThemeGlobalStyles = {
|
41
41
|
borderRadius: string
|
42
|
+
borderColor: string
|
42
43
|
|
43
44
|
primaryBackgroundColor: string
|
44
45
|
primaryTextColor: string
|
@@ -67,6 +68,9 @@ export type ThemeGlobalStyles = {
|
|
67
68
|
|
68
69
|
accentBackgroundColor: string
|
69
70
|
accentTextColor: string
|
71
|
+
|
72
|
+
scrollBarTrackColor: string
|
73
|
+
scrollBarThumbColor: string
|
70
74
|
}
|
71
75
|
|
72
76
|
export type HapiThemingThemeProvider = Theming<HapiTheme>["ThemeProvider"]
|
@@ -98,6 +102,7 @@ export type HapiThemeRule =
|
|
98
102
|
| "buttonFaded"
|
99
103
|
| "buttonAccent"
|
100
104
|
| "badgeBase"
|
105
|
+
| "formFieldLabel"
|
101
106
|
| "formFieldBase"
|
102
107
|
| "inputSelectBase"
|
103
108
|
| "input"
|
package/ui/service.types.ts
CHANGED
@@ -3,6 +3,8 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
|
3
3
|
|
4
4
|
export type WindowHapiServiceUI = WindowHapiModuleWithConstructorArgs<
|
5
5
|
{
|
6
|
+
onIframeLoaded: (callback: (iframeName: string) => void) => void
|
7
|
+
onIframeUnloaded: (callback: (iframeName: string) => void) => void
|
6
8
|
setStyleAttribute: (
|
7
9
|
selector: string,
|
8
10
|
attributeName: string,
|
@@ -11,12 +13,12 @@ export type WindowHapiServiceUI = WindowHapiModuleWithConstructorArgs<
|
|
11
13
|
setStyle: (selector: string, style: any) => Promise<void>
|
12
14
|
addClass: (selector: string, className: string) => Promise<void>
|
13
15
|
removeClass: (selector: string, className: string) => Promise<void>
|
14
|
-
|
15
|
-
|
16
|
+
appendChildToSlot: (
|
17
|
+
slotId: string,
|
16
18
|
element: HTMLElement,
|
17
19
|
) => Promise<void>
|
18
|
-
|
19
|
-
|
20
|
+
removeChildFromSlot: (
|
21
|
+
slotId: string,
|
20
22
|
elementSelector: string,
|
21
23
|
) => Promise<void>
|
22
24
|
hideElement: (elementSelector: string) => Promise<void>
|
package/wallet/state.types.ts
CHANGED
@@ -6,53 +6,17 @@ import {
|
|
6
6
|
} from "./types"
|
7
7
|
|
8
8
|
export type WalletState = {
|
9
|
-
/**
|
10
|
-
* User's Wallet that can hold credits to be used on Creating/Ordering a Campaign
|
11
|
-
*/
|
12
9
|
wallet: Wallet | null
|
13
|
-
/**
|
14
|
-
* User's balance in dollars converted from cents through `wallet.balance`. **This value is a computed getter meaning that it cannot be set from outside**
|
15
|
-
*/
|
16
10
|
balanceInUSD: number | null
|
17
|
-
/**
|
18
|
-
* Indicates whether or not user has enough credits/balance to Order a Campaign
|
19
|
-
*/
|
20
11
|
balanceIsEnoughToOrderCampaign: boolean
|
21
|
-
/**
|
22
|
-
* Shows a loading spinner while wallet is loading
|
23
|
-
*/
|
24
12
|
walletIsLoading: boolean
|
25
|
-
/**
|
26
|
-
* The request body to be sent to HAPI Backend Service to create a payment intent. **This value is a computed getter meaning that it cannot be set from outside**
|
27
|
-
*/
|
28
13
|
paymentIntentRequestBody: WalletPaymentIntentRequest | null
|
29
14
|
paymentIntentClientSecret: string | null
|
30
|
-
/**
|
31
|
-
* Shows a loading spinner while PaymentIntent is creating
|
32
|
-
*/
|
33
15
|
topUpIsLoading: boolean
|
34
|
-
/**
|
35
|
-
* A custom amount to specify for the top up of balance
|
36
|
-
*/
|
37
16
|
topUpAmount: number
|
38
|
-
/**
|
39
|
-
* A minimum amount enforced by an ATS for the top up of balance
|
40
|
-
*/
|
41
17
|
topUpMinAmount: number
|
42
|
-
/**
|
43
|
-
* A minimum amount's currency enforced by an ATS for the top up of balance
|
44
|
-
*/
|
45
18
|
topUpMinAmountCurrency: ProductPriceCurrency
|
46
|
-
/**
|
47
|
-
* Indicates if user has agreed to terms of service
|
48
|
-
*/
|
49
19
|
topUpTermsOfServiceIsAgreed: boolean
|
50
|
-
/**
|
51
|
-
* Step of the popup. **Should not be edited from outside**
|
52
|
-
*/
|
53
20
|
topUpCurrentStepIndex: number
|
54
|
-
/**
|
55
|
-
* An array of payment method types that Stripe accepts https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_types to specify which types of payment methods the end user can use
|
56
|
-
*/
|
57
21
|
topUpPaymentMethodTypes: WalletPaymentIntentPaymentMethod[]
|
58
22
|
}
|