@vonq/hapi-elements-types 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -4
- package/src/_window/api.types.ts +9 -7
- package/src/_window/auth.types.ts +6 -4
- package/src/_window/config.types.ts +0 -25
- package/src/_window/events.types.ts +15 -14
- package/src/_window/instances.types.ts +19 -10
- package/src/_window/qa.types.ts +7 -5
- package/src/_window/routing.types.ts +6 -4
- package/src/_window/sdk.types.ts +29 -27
- package/src/_window/service.types.ts +9 -7
- package/src/_window/state.types.ts +55 -53
- package/src/_window/ui.types.ts +6 -4
- package/src/_window/utils.types.ts +7 -5
- package/src/_window/validation.types.ts +7 -5
- package/src/_window/window.ts +126 -42
- package/src/alert/index.ts +4 -7
- package/src/alert/service.types.ts +2 -2
- package/src/alert/state.types.ts +1 -19
- package/src/ats/api.types.ts +2 -2
- package/src/ats/index.ts +4 -7
- package/src/ats/service.types.ts +2 -2
- package/src/ats/state.types.ts +1 -1
- package/src/basket/index.ts +5 -10
- package/src/basket/service.types.ts +2 -2
- package/src/basket/state.types.ts +1 -1
- package/src/basket/utils.types.ts +2 -2
- package/src/campaign/api.types.ts +2 -2
- package/src/campaign/index.ts +8 -13
- package/src/campaign/qa.types.ts +4 -4
- package/src/campaign/service.types.ts +2 -2
- package/src/campaign/state.types.ts +1 -1
- package/src/campaign/utils.types.ts +2 -2
- package/{enums.ts → src/common/enums.ts} +2 -1
- package/src/common/events/types.ts +6 -6
- package/src/common/index.ts +5 -20
- package/src/common/logger/types.ts +11 -0
- package/src/common/qa.types.ts +2 -2
- package/src/common/types.ts +5 -6
- package/src/common/validator/types.ts +4 -0
- package/src/contract/api.types.ts +2 -2
- package/src/contract/index.ts +7 -12
- package/src/contract/qa.types.ts +2 -2
- package/src/contract/service.types.ts +2 -2
- package/src/contract/state.types.ts +1 -1
- package/src/contract/utils.types.ts +2 -2
- package/src/debugging/index.ts +1 -4
- package/src/debugging/state.types.ts +1 -1
- package/src/index.ts +16 -20
- package/src/language/index.ts +3 -9
- package/src/language/qa.types.ts +2 -2
- package/src/language/state.types.ts +1 -1
- package/src/modal/index.ts +4 -9
- package/src/modal/service.types.ts +2 -2
- package/src/modal/state.types.ts +1 -1
- package/src/orderJourney/index.ts +6 -11
- package/src/orderJourney/qa.types.ts +2 -2
- package/src/orderJourney/state.types.ts +1 -1
- package/src/orderJourney/utils.types.ts +2 -2
- package/src/product/api.types.ts +2 -2
- package/src/product/index.ts +8 -12
- package/src/product/qa.types.ts +2 -2
- package/src/product/service.types.ts +2 -2
- package/src/product/state.types.ts +1 -1
- package/src/product/utils.types.ts +2 -2
- package/src/routing/index.ts +1 -3
- package/src/theming/index.ts +4 -9
- package/src/theming/qa.types.ts +2 -2
- package/src/theming/state.types.ts +1 -1
- package/src/ui/service.types.ts +2 -2
- package/src/wallet/api.types.ts +2 -2
- package/src/wallet/index.ts +5 -9
- package/src/wallet/service.types.ts +2 -2
- package/src/wallet/state.types.ts +1 -1
- package/tsconfig.json +6 -11
- package/src/alert/functions.types.ts +0 -13
- package/src/alert/state.initial.ts +0 -16
- package/src/alert/state.validations.ts +0 -11
- package/src/ats/functions.types.ts +0 -7
- package/src/ats/state.initial.ts +0 -5
- package/src/ats/state.validations.ts +0 -6
- package/src/basket/consts.ts +0 -1
- package/src/basket/functions.types.ts +0 -40
- package/src/basket/state.initial.ts +0 -11
- package/src/basket/state.validations.ts +0 -12
- package/src/basket/utils.ts +0 -79
- package/src/campaign/consts.ts +0 -1
- package/src/campaign/functions.types.ts +0 -90
- package/src/campaign/state.initial.ts +0 -84
- package/src/campaign/state.validations.ts +0 -16
- package/src/campaign/utils.ts +0 -53
- package/src/common/LocalStorage.ts +0 -123
- package/src/common/browser.ts +0 -2
- package/src/common/color.ts +0 -9
- package/src/common/immutable.ts +0 -28
- package/src/common/instances/Instance.ts +0 -13
- package/src/common/instances/consts.ts +0 -1
- package/src/common/instances/index.ts +0 -4
- package/src/common/json.ts +0 -25
- package/src/common/logger/Logger.ts +0 -70
- package/src/common/logger/index.ts +0 -5
- package/src/common/logger-datadog/LoggerDatadog.ts +0 -42
- package/src/common/logger-datadog/index.ts +0 -3
- package/src/common/misc.ts +0 -114
- package/src/common/promise.ts +0 -161
- package/src/common/proxy.ts +0 -77
- package/src/common/regExTest.ts +0 -12
- package/src/common/tree.ts +0 -148
- package/src/common/utm.ts +0 -19
- package/src/common/validators.ts +0 -21
- package/src/common/webComponents.ts +0 -26
- package/src/config/functions.types.ts +0 -23
- package/src/config/index.ts +0 -5
- package/src/config/state.initial.ts +0 -11
- package/src/config/state.types.ts +0 -15
- package/src/consts.ts +0 -980
- package/src/contract/consts.ts +0 -1
- package/src/contract/functions.types.ts +0 -112
- package/src/contract/state.initial.ts +0 -39
- package/src/contract/state.validations.ts +0 -21
- package/src/contract/utils.ts +0 -36
- package/src/debugging/functions.types.ts +0 -34
- package/src/debugging/state.initial.ts +0 -10
- package/src/debugging/state.validations.ts +0 -10
- package/src/language/consts.ts +0 -6
- package/src/language/en.ts +0 -530
- package/src/language/functions.types.ts +0 -29
- package/src/language/state.initial.ts +0 -13
- package/src/language/state.validations.ts +0 -10
- package/src/language/utils.ts +0 -17
- package/src/modal/consts.ts +0 -6
- package/src/modal/functions.types.ts +0 -22
- package/src/modal/state.initial.ts +0 -9
- package/src/modal/state.validations.ts +0 -6
- package/src/modal/store.types.ts +0 -5
- package/src/orderJourney/consts.ts +0 -289
- package/src/orderJourney/functions.types.ts +0 -140
- package/src/orderJourney/state.initial.ts +0 -401
- package/src/orderJourney/state.validations.ts +0 -78
- package/src/orderJourney/utils.ts +0 -7
- package/src/product/consts.ts +0 -1
- package/src/product/functions.types.ts +0 -156
- package/src/product/state.initial.ts +0 -28
- package/src/product/state.validations.ts +0 -25
- package/src/routing/functions.types.ts +0 -48
- package/src/routing/state.initial.ts +0 -10
- package/src/theming/consts.ts +0 -7727
- package/src/theming/functions.types.ts +0 -13
- package/src/theming/state.initial.ts +0 -16
- package/src/theming/state.validations.ts +0 -8
- package/src/theming/utils.ts +0 -581
- package/src/types.ts +0 -229
- package/src/utils.ts +0 -3
- package/src/wallet/consts.ts +0 -3
- package/src/wallet/functions.types.ts +0 -58
- package/src/wallet/state.initial.ts +0 -18
- package/src/wallet/state.validations.ts +0 -18
package/src/common/types.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import validator from "validator"
|
2
|
-
import validators from "./validators"
|
3
2
|
import { MessageDescriptor } from "react-intl"
|
4
|
-
import {
|
5
|
-
import {
|
3
|
+
import { WindowHapiLogger } from "./logger/types"
|
4
|
+
import { Validators } from "./validator/types"
|
6
5
|
|
7
6
|
export type ValueOf<T> = T[keyof T]
|
8
7
|
export type AnyNonFunction<T> = Omit<T, "function">
|
@@ -76,14 +75,14 @@ export type ValidatorKey =
|
|
76
75
|
| "PostalCodeLocale"
|
77
76
|
| "isPostalCodeLocales"
|
78
77
|
>
|
79
|
-
| keyof
|
78
|
+
| keyof Validators
|
80
79
|
export type NestedValidatorKeys =
|
81
80
|
| ValidatorKey
|
82
81
|
| {
|
83
82
|
[k: string]: ValidatorKey | NestedValidatorKeys
|
84
83
|
}
|
85
84
|
export type BaseService = {
|
86
|
-
logger:
|
85
|
+
logger: WindowHapiLogger
|
87
86
|
}
|
88
87
|
// the reason there are no types like enums here is because
|
89
88
|
// the options should be a serializable JSON during generation of web component files
|
@@ -97,7 +96,7 @@ export type HapiWebComponent = {
|
|
97
96
|
key: string
|
98
97
|
id: string
|
99
98
|
injects?: string[]
|
100
|
-
initialState?: Partial<Record<
|
99
|
+
initialState?: Partial<Record<string, any>>
|
101
100
|
isUserJourney?: boolean
|
102
101
|
webComponentCSS?: Record<string, any> //React.CSSProperties
|
103
102
|
attributes?: Record<string, string>
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
} from "./types"
|
8
8
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
9
9
|
import { PaginatedAPIResponseV1, PaginationLimitOffset } from "../common/types"
|
10
|
-
import {
|
10
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
11
11
|
|
12
12
|
export type WindowHapiAPIContractConfigs = {
|
13
13
|
getContracts: AxiosRequestConfig
|
@@ -38,7 +38,7 @@ export type WindowHapiAPIContractRequests = {
|
|
38
38
|
createGroup: (group: ContractGroupCreateForm) => Promise<ContractGroup>
|
39
39
|
removeContract: (contractId: string) => Promise<Contract>
|
40
40
|
}
|
41
|
-
export type WindowHapiAPIContract =
|
41
|
+
export type WindowHapiAPIContract = WindowHapiModuleWithConstructorArgs<
|
42
42
|
WindowHapiAPIModule<
|
43
43
|
WindowHapiAPIContractRequests,
|
44
44
|
WindowHapiAPIContractConfigs
|
package/src/contract/index.ts
CHANGED
@@ -1,14 +1,9 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from
|
10
|
-
export * from './state.validations';
|
11
|
-
export * from './types';
|
12
|
-
export * from './utils';
|
13
|
-
export * from './utils.types';
|
14
|
-
export * from './validations.types';
|
3
|
+
export * from "./api.types"
|
4
|
+
export * from "./qa.types"
|
5
|
+
export * from "./service.types"
|
6
|
+
export * from "./state.types"
|
7
|
+
export * from "./types"
|
8
|
+
export * from "./utils.types"
|
9
|
+
export * from "./validations.types"
|
package/src/contract/qa.types.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ContractCreateForm, ContractGroupCreateForm } from "./types"
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
3
2
|
import { WindowHapiQA } from "../_window/qa.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
|
5
|
-
export type WindowHapiQAContract =
|
5
|
+
export type WindowHapiQAContract = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
7
|
getRandomContractId: () => Promise<string>
|
8
8
|
useMockContractForm: () => ContractCreateForm
|
@@ -10,7 +10,7 @@ import {
|
|
10
10
|
ContractPostingRequirementsAutocompleteRequestOption,
|
11
11
|
} from "./types"
|
12
12
|
import { PaginatedAPIResponseV1 } from "../common/types"
|
13
|
-
import {
|
13
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
14
14
|
|
15
15
|
export type ContractServiceGetContractPostingRequirementOptionsHandler = (
|
16
16
|
contractId: string,
|
@@ -33,7 +33,7 @@ export type ContractServiceGetContractHandler = (
|
|
33
33
|
id: string,
|
34
34
|
) => Promise<Contract>
|
35
35
|
|
36
|
-
export type WindowHapiServiceContract =
|
36
|
+
export type WindowHapiServiceContract = WindowHapiModuleWithConstructorArgs<
|
37
37
|
{
|
38
38
|
getContractPostingRequirementOptions: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractPostingRequirementOptionsHandler>
|
39
39
|
getContracts: HapiServiceFunctionWithLifecycleHooks<ContractServiceGetContractsHandler>
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
} from "./types"
|
9
9
|
import { PaginationResponseV1 } from "../common/types"
|
10
10
|
|
11
|
-
export type
|
11
|
+
export type ContractState = {
|
12
12
|
/* Contracts */
|
13
13
|
/**
|
14
14
|
* Array of Contracts to be displayed in Contracts Landing or Contracts List widgets.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ContractCreateForm, ContractGroupCreateForm } from "./types"
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
3
2
|
import { WindowHapiUtils } from "../_window/utils.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
|
5
|
-
export type WindowHapiUtilsContract =
|
5
|
+
export type WindowHapiUtilsContract = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
7
|
getInitialContractForm: () => ContractCreateForm
|
8
8
|
getInitialGroupForm: () => ContractGroupCreateForm
|
package/src/debugging/index.ts
CHANGED
package/src/index.ts
CHANGED
@@ -1,22 +1,18 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from
|
10
|
-
export * from
|
11
|
-
export * from
|
12
|
-
export * from
|
13
|
-
export * from
|
14
|
-
export * from
|
15
|
-
export * from
|
16
|
-
export * from
|
17
|
-
export * from
|
18
|
-
export * from
|
19
|
-
export * from './wallet';
|
20
|
-
export * from './consts';
|
21
|
-
export * from './types';
|
22
|
-
export * from './utils';
|
3
|
+
export * from "./_window"
|
4
|
+
export * from "./alert"
|
5
|
+
export * from "./ats"
|
6
|
+
export * from "./basket"
|
7
|
+
export * from "./campaign"
|
8
|
+
export * from "./common"
|
9
|
+
export * from "./contract"
|
10
|
+
export * from "./debugging"
|
11
|
+
export * from "./language"
|
12
|
+
export * from "./modal"
|
13
|
+
export * from "./orderJourney"
|
14
|
+
export * from "./product"
|
15
|
+
export * from "./routing"
|
16
|
+
export * from "./theming"
|
17
|
+
export * from "./ui"
|
18
|
+
export * from "./wallet"
|
package/src/language/index.ts
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from './qa.types';
|
7
|
-
export * from './state.initial';
|
8
|
-
export * from './state.types';
|
9
|
-
export * from './state.validations';
|
10
|
-
export * from './utils';
|
11
|
-
export * from './validations.types';
|
3
|
+
export * from "./qa.types"
|
4
|
+
export * from "./state.types"
|
5
|
+
export * from "./validations.types"
|
package/src/language/qa.types.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ProductPriceCurrency } from "../product/enums"
|
2
2
|
import { LanguageStoreTranslations } from "./state.types"
|
3
|
-
import { ModuleWithConstructorArgs } from "../types"
|
4
3
|
import { WindowHapiQA } from "../_window/qa.types"
|
4
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
5
5
|
|
6
|
-
export type WindowHapiQALanguage =
|
6
|
+
export type WindowHapiQALanguage = WindowHapiModuleWithConstructorArgs<
|
7
7
|
{
|
8
8
|
setLocale: (locale: string) => string
|
9
9
|
setDisplayCurrency: (
|
@@ -5,7 +5,7 @@ export type LanguageStoreTranslations = Record<
|
|
5
5
|
string,
|
6
6
|
LanguageStoreLocaleTranslations
|
7
7
|
>
|
8
|
-
export type
|
8
|
+
export type LanguageState = {
|
9
9
|
/**
|
10
10
|
* Locale of the user (navigator language) in RFC 5646 that can be changed via setLocale function
|
11
11
|
*/
|
package/src/modal/index.ts
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from './state.initial';
|
8
|
-
export * from './state.types';
|
9
|
-
export * from './state.validations';
|
10
|
-
export * from './store.types';
|
11
|
-
export * from './types';
|
3
|
+
export * from "./enums"
|
4
|
+
export * from "./service.types"
|
5
|
+
export * from "./state.types"
|
6
|
+
export * from "./types"
|
@@ -4,10 +4,10 @@ import { Product } from "../product/types"
|
|
4
4
|
import { Contract } from "../contract/types"
|
5
5
|
import { IObservableValue } from "mobx"
|
6
6
|
import { AnyNonFunction } from "../common/types"
|
7
|
-
import { ModuleWithConstructorArgs } from "../types"
|
8
7
|
import { WindowHapiService } from "../_window/service.types"
|
8
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
9
9
|
|
10
|
-
export type WindowHapiServiceModal =
|
10
|
+
export type WindowHapiServiceModal = WindowHapiModuleWithConstructorArgs<
|
11
11
|
{
|
12
12
|
openModal: (
|
13
13
|
key: ModalKeys,
|
package/src/modal/state.types.ts
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from './state.validations';
|
10
|
-
export * from './types';
|
11
|
-
export * from './utils';
|
12
|
-
export * from './utils.types';
|
13
|
-
export * from './validations.types';
|
3
|
+
export * from "./enums"
|
4
|
+
export * from "./qa.types"
|
5
|
+
export * from "./state.types"
|
6
|
+
export * from "./types"
|
7
|
+
export * from "./utils.types"
|
8
|
+
export * from "./validations.types"
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { OrderJourneyPaymentMethod, OrderJourneyStepKey } from "./enums"
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
3
2
|
import { WindowHapiQA } from "../_window/qa.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
|
5
|
-
export type WindowHapiQAOrderJourney =
|
5
|
+
export type WindowHapiQAOrderJourney = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
7
|
setEnabledSteps: (steps: OrderJourneyStepKey[]) => OrderJourneyStepKey[]
|
8
8
|
setEnabledPaymentMethods: (
|
@@ -3,7 +3,7 @@ import { OrderJourneyStep, OrderJourneyContractStep } from "./types"
|
|
3
3
|
import { MessageDescriptor } from "react-intl"
|
4
4
|
import { NestedValidatorKeys, UseValidatorResult } from "../common/types"
|
5
5
|
|
6
|
-
export type
|
6
|
+
export type OrderJourneyState = {
|
7
7
|
stepsEnabled: OrderJourneyStepKey[]
|
8
8
|
steps: OrderJourneyStep[]
|
9
9
|
stepPreviousIndex: number
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { OrderJourneyPaymentMethod, OrderJourneyStepKey } from "./enums"
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
3
2
|
import { WindowHapiUtils } from "../_window/utils.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
|
5
|
-
export type WindowHapiUtilsOrderJourney =
|
5
|
+
export type WindowHapiUtilsOrderJourney = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
7
|
stepKeys: typeof OrderJourneyStepKey
|
8
8
|
paymentMethodKeys: typeof OrderJourneyPaymentMethod
|
package/src/product/api.types.ts
CHANGED
@@ -11,11 +11,11 @@ import {
|
|
11
11
|
} from "./types"
|
12
12
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
13
13
|
import { PaginatedAPIResponseV1, PaginationLimitOffset } from "../common/types"
|
14
|
-
import { ModuleWithConstructorArgs } from "../types"
|
15
14
|
import {
|
16
15
|
WindowHapiAPIATSConfigs,
|
17
16
|
WindowHapiAPIATSRequests,
|
18
17
|
} from "../ats/api.types"
|
18
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
19
19
|
|
20
20
|
export type WindowHapiAPIProductConfigs = {
|
21
21
|
getProduct: AxiosRequestConfig
|
@@ -53,7 +53,7 @@ export type WindowHapiAPIProductRequests = {
|
|
53
53
|
) => Promise<PaginatedAPIResponseV1<ProductJobTitle>>
|
54
54
|
getLocations: (searchParam: string) => Promise<ProductLocation[]>
|
55
55
|
}
|
56
|
-
export type WindowHapiAPIProduct =
|
56
|
+
export type WindowHapiAPIProduct = WindowHapiModuleWithConstructorArgs<
|
57
57
|
WindowHapiAPIModule<
|
58
58
|
WindowHapiAPIProductRequests,
|
59
59
|
WindowHapiAPIProductConfigs
|
package/src/product/index.ts
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from
|
10
|
-
export * from
|
11
|
-
export * from './state.validations';
|
12
|
-
export * from './types';
|
13
|
-
export * from './utils.types';
|
14
|
-
export * from './validations.types';
|
3
|
+
export * from "./api.types"
|
4
|
+
export * from "./enums"
|
5
|
+
export * from "./qa.types"
|
6
|
+
export * from "./service.types"
|
7
|
+
export * from "./state.types"
|
8
|
+
export * from "./types"
|
9
|
+
export * from "./utils.types"
|
10
|
+
export * from "./validations.types"
|
package/src/product/qa.types.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ModuleWithConstructorArgs } from "../types"
|
2
1
|
import { WindowHapiQA } from "../_window/qa.types"
|
2
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
3
3
|
|
4
|
-
export type WindowHapiQAProduct =
|
4
|
+
export type WindowHapiQAProduct = WindowHapiModuleWithConstructorArgs<
|
5
5
|
{
|
6
6
|
useMockFilters: () => Promise<void>
|
7
7
|
getRandomChannelIdThatSupportsContracts: () => Promise<number>
|
@@ -13,7 +13,7 @@ import {
|
|
13
13
|
ProductSupportingContractsPartial,
|
14
14
|
} from "./types"
|
15
15
|
import { PaginatedAPIResponseV1, PaginationResponseV1 } from "../common/types"
|
16
|
-
import {
|
16
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
17
17
|
|
18
18
|
export type ProductServiceGetFilteredProductsHandler = (
|
19
19
|
meta?: PaginationResponseV1 | null,
|
@@ -51,7 +51,7 @@ export type ProductServiceGetIndustriesHandler = () => Promise<
|
|
51
51
|
ProductIndustry[]
|
52
52
|
>
|
53
53
|
|
54
|
-
export type WindowHapiServiceProduct =
|
54
|
+
export type WindowHapiServiceProduct = WindowHapiModuleWithConstructorArgs<
|
55
55
|
{
|
56
56
|
getProductWithContractsSupportById: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductWithContractsSupportByIdHandler>
|
57
57
|
getProductsWithContractsSupport: HapiServiceFunctionWithLifecycleHooks<ProductServiceGetProductsWithContractsSupportHandler>
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
} from "./types"
|
9
9
|
import { PaginationResponseV1 } from "../common/types"
|
10
10
|
|
11
|
-
export type
|
11
|
+
export type ProductState = {
|
12
12
|
/* Products */
|
13
13
|
/**
|
14
14
|
* Array of Products to be listed on Products Landing and Products List widgets. As user applies filters and sorting, this value gets overwritten
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { ProductFilterQueryParams, ProductUserProvidedFilters } from "./types"
|
2
2
|
import { PaginationResponseV1 } from "../common/types"
|
3
|
-
import { ModuleWithConstructorArgs } from "../types"
|
4
3
|
import {
|
5
4
|
OrderJourneyPaymentMethod,
|
6
5
|
OrderJourneyStepKey,
|
7
6
|
} from "../orderJourney/enums"
|
8
7
|
import { WindowHapiUtils } from "../_window/utils.types"
|
8
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
9
9
|
|
10
|
-
export type WindowHapiUtilsProduct =
|
10
|
+
export type WindowHapiUtilsProduct = WindowHapiModuleWithConstructorArgs<
|
11
11
|
{
|
12
12
|
getUserProvidedFilters: () => ProductUserProvidedFilters
|
13
13
|
getProductsQueryParams: (
|
package/src/routing/index.ts
CHANGED
package/src/theming/index.ts
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from './state.types';
|
8
|
-
export * from './state.validations';
|
9
|
-
export * from './types';
|
10
|
-
export * from './utils';
|
11
|
-
export * from './validations.types';
|
3
|
+
export * from "./qa.types"
|
4
|
+
export * from "./state.types"
|
5
|
+
export * from "./types"
|
6
|
+
export * from "./validations.types"
|
package/src/theming/qa.types.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { HapiFontOptions, HapiTheme } from "./types"
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
3
2
|
import { WindowHapiQA } from "../_window/qa.types"
|
3
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
4
4
|
|
5
|
-
export type WindowHapiQATheming =
|
5
|
+
export type WindowHapiQATheming = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
7
|
setTheme: (updatedTheme: Partial<HapiTheme>) => HapiTheme
|
8
8
|
setFontOptions: (fontOptions: HapiFontOptions) => HapiFontOptions
|
package/src/ui/service.types.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ModuleWithConstructorArgs } from "../types"
|
2
1
|
import { WindowHapiService } from "../_window/service.types"
|
2
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
3
3
|
|
4
|
-
export type WindowHapiServiceUI =
|
4
|
+
export type WindowHapiServiceUI = WindowHapiModuleWithConstructorArgs<
|
5
5
|
{
|
6
6
|
setStyleAttribute: (
|
7
7
|
selector: string,
|
package/src/wallet/api.types.ts
CHANGED
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
WalletPaymentIntentRequest,
|
7
7
|
} from "./types"
|
8
8
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
9
|
-
import {
|
9
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
10
10
|
|
11
11
|
export type WindowHapiAPIWalletConfigs = {
|
12
12
|
getWallet: RawAxiosRequestConfig
|
@@ -24,7 +24,7 @@ export type WindowHapiAPIWalletRequests = {
|
|
24
24
|
paymentParams: WalletPaymentIntentRequest,
|
25
25
|
) => Promise<any>
|
26
26
|
}
|
27
|
-
export type WindowHapiAPIWallet =
|
27
|
+
export type WindowHapiAPIWallet = WindowHapiModuleWithConstructorArgs<
|
28
28
|
WindowHapiAPIModule<
|
29
29
|
WindowHapiAPIWalletRequests,
|
30
30
|
WindowHapiAPIWalletConfigs
|
package/src/wallet/index.ts
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
2
|
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from './state.types';
|
9
|
-
export * from './state.validations';
|
10
|
-
export * from './types';
|
11
|
-
export * from './validations.types';
|
3
|
+
export * from "./api.types"
|
4
|
+
export * from "./service.types"
|
5
|
+
export * from "./state.types"
|
6
|
+
export * from "./types"
|
7
|
+
export * from "./validations.types"
|
@@ -3,7 +3,7 @@ import {
|
|
3
3
|
HapiServiceFunctionWithLifecycleHooks,
|
4
4
|
WindowHapiService,
|
5
5
|
} from "../_window/service.types"
|
6
|
-
import {
|
6
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
7
7
|
|
8
8
|
export type WalletServiceGetATSSettingsHandler =
|
9
9
|
() => Promise<WalletATSSettings>
|
@@ -12,7 +12,7 @@ export type WalletServiceGetWalletHandler = (
|
|
12
12
|
) => Promise<Wallet>
|
13
13
|
export type WalletServiceCreateWalletHandler = () => Promise<Wallet>
|
14
14
|
|
15
|
-
export type WindowHapiServiceWallet =
|
15
|
+
export type WindowHapiServiceWallet = WindowHapiModuleWithConstructorArgs<
|
16
16
|
{
|
17
17
|
getATSSettings: HapiServiceFunctionWithLifecycleHooks<WalletServiceGetATSSettingsHandler>
|
18
18
|
getWallet: HapiServiceFunctionWithLifecycleHooks<WalletServiceGetWalletHandler>
|
package/tsconfig.json
CHANGED
@@ -18,16 +18,9 @@
|
|
18
18
|
"jsx": "preserve",
|
19
19
|
"incremental": false,
|
20
20
|
"experimentalDecorators": true,
|
21
|
-
"baseUrl": "./
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"axios": ["../../node_modules/axios"],
|
25
|
-
"zod": ["../../node_modules/zod"],
|
26
|
-
"theming": ["../../node_modules/theming"],
|
27
|
-
"react-intl": ["../../node_modules/react-intl"],
|
28
|
-
"react": ["../../node_modules/react"],
|
29
|
-
"lodash": ["../../node_modules/lodash"]
|
30
|
-
}
|
21
|
+
"baseUrl": "./",
|
22
|
+
"outFile": "index.d.ts",
|
23
|
+
"forceConsistentCasingInFileNames": true
|
31
24
|
},
|
32
25
|
"include": [
|
33
26
|
"./src/**/*",
|
@@ -36,6 +29,8 @@
|
|
36
29
|
"node_modules",
|
37
30
|
"../ats/**/*",
|
38
31
|
"../common/**/*",
|
39
|
-
"
|
32
|
+
"../src/**/*",
|
33
|
+
"./index.d.ts",
|
34
|
+
"./index.d.ts.map"
|
40
35
|
]
|
41
36
|
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { AlertKey } from "./enums"
|
2
|
-
import { Alert, AlertOptions, AlertProps } from "./types"
|
3
|
-
|
4
|
-
export type AlertStoreShowHandler = (
|
5
|
-
key: AlertKey,
|
6
|
-
props: AlertProps | undefined,
|
7
|
-
options: AlertOptions,
|
8
|
-
) => void
|
9
|
-
export type AlertStoreSetAlertsHandler = (alerts: Alert[]) => void
|
10
|
-
export type AlertStoreFunctions = {
|
11
|
-
showAlert: AlertStoreShowHandler
|
12
|
-
setAlerts: AlertStoreSetAlertsHandler
|
13
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { AlertStoreState } from "./state.types"
|
2
|
-
import { AlertType } from "./enums"
|
3
|
-
|
4
|
-
export const initialAlertStoreState: AlertStoreState = {
|
5
|
-
alerts: [],
|
6
|
-
errorOptions: null,
|
7
|
-
infoOptions: null,
|
8
|
-
warningOptions: null,
|
9
|
-
successOptions: null,
|
10
|
-
defaultOptions: {
|
11
|
-
shouldShowDismiss: true,
|
12
|
-
position: "top-center",
|
13
|
-
autoClose: 5000,
|
14
|
-
type: AlertType.info,
|
15
|
-
},
|
16
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { AlertStoreState } from "./state.types"
|
2
|
-
import { StateValidations } from "../_window/state.types"
|
3
|
-
|
4
|
-
export const alertStoreStateValidations: StateValidations<AlertStoreState> = {
|
5
|
-
alerts: undefined,
|
6
|
-
errorOptions: "throwHasNoSetterError",
|
7
|
-
infoOptions: "throwHasNoSetterError",
|
8
|
-
warningOptions: "throwHasNoSetterError",
|
9
|
-
successOptions: "throwHasNoSetterError",
|
10
|
-
defaultOptions: undefined,
|
11
|
-
}
|