@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
@@ -1,13 +1,15 @@
|
|
1
|
-
import { WindowHapiModuleName } from "
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
1
|
+
import { WindowHapiModuleName } from "../common/enums"
|
3
2
|
import { WindowHapiUtilsProduct } from "../product/utils.types"
|
4
3
|
import { WindowHapiUtilsContract } from "../contract/utils.types"
|
5
4
|
import { WindowHapiUtilsCampaign } from "../campaign/utils.types"
|
6
5
|
import { WindowHapiUtilsBasket } from "../basket/utils.types"
|
7
6
|
import { WindowHapiUtilsOrderJourney } from "../orderJourney/utils.types"
|
8
|
-
import {
|
7
|
+
import {
|
8
|
+
WindowHapiModuleWithConstructorArgs,
|
9
|
+
WindowHapiClassInterface,
|
10
|
+
} from "./window"
|
9
11
|
|
10
|
-
export type WindowHapiUtils =
|
12
|
+
export type WindowHapiUtils = WindowHapiModuleWithConstructorArgs<
|
11
13
|
{
|
12
14
|
isObject: (item: any) => boolean
|
13
15
|
mergeDeepOverwriteArrays: (
|
@@ -30,5 +32,5 @@ export type WindowHapiUtils = ModuleWithConstructorArgs<
|
|
30
32
|
[WindowHapiModuleName.orderJourney]: WindowHapiUtilsOrderJourney
|
31
33
|
}
|
32
34
|
},
|
33
|
-
{ readonly core:
|
35
|
+
{ readonly core: WindowHapiClassInterface }
|
34
36
|
>
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { z } from "zod"
|
2
|
-
import { WindowHapiModuleName } from "
|
3
|
-
import {
|
4
|
-
|
2
|
+
import { WindowHapiModuleName } from "../common/enums"
|
3
|
+
import {
|
4
|
+
WindowHapiModuleWithConstructorArgs,
|
5
|
+
WindowHapiClassInterface,
|
6
|
+
} from "./window"
|
5
7
|
import { WindowHapiValidationsCommon } from "../common/validations.types"
|
6
8
|
import { WindowHapiValidationsProduct } from "../product/validations.types"
|
7
9
|
import { WindowHapiValidationsContract } from "../contract/validations.types"
|
@@ -12,7 +14,7 @@ import { WindowHapiValidationsTheming } from "../theming/validations.types"
|
|
12
14
|
import { WindowHapiValidationsLanguage } from "../language/validations.types"
|
13
15
|
import { WindowHapiValidationsOrderJourney } from "../orderJourney/validations.types"
|
14
16
|
|
15
|
-
export type WindowHapiValidations =
|
17
|
+
export type WindowHapiValidations = WindowHapiModuleWithConstructorArgs<
|
16
18
|
{
|
17
19
|
validator: typeof z
|
18
20
|
messages: Record<string, string | Function>
|
@@ -35,7 +37,7 @@ export type WindowHapiValidations = ModuleWithConstructorArgs<
|
|
35
37
|
) => void
|
36
38
|
runSDKEventsValidations: (callback: Function) => void
|
37
39
|
},
|
38
|
-
{ readonly core:
|
40
|
+
{ readonly core: WindowHapiClassInterface }
|
39
41
|
>
|
40
42
|
|
41
43
|
export type ValidationSubmoduleConstructorArgs = {
|
package/src/_window/window.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
import { Logger } from "../common/logger/Logger"
|
2
1
|
import { WindowHapiUtils } from "./utils.types"
|
3
2
|
import { WindowHapiValidations } from "./validation.types"
|
4
3
|
import { WindowHapiState } from "./state.types"
|
5
|
-
import { WindowHapiInstances } from "./instances.types"
|
4
|
+
import { WindowHapiInstance, WindowHapiInstances } from "./instances.types"
|
6
5
|
import { WindowHapiRouting } from "./routing.types"
|
7
6
|
import { WindowHapiAuth } from "./auth.types"
|
8
7
|
import { WindowHapiEvents } from "./events.types"
|
@@ -10,47 +9,132 @@ import { WindowHapiUI } from "./ui.types"
|
|
10
9
|
import { WindowHapiAPI } from "./api.types"
|
11
10
|
import { WindowHapiSDK } from "./sdk.types"
|
12
11
|
import { WindowHapiService } from "./service.types"
|
13
|
-
import HapiInstance from "../common/instances/Instance"
|
14
12
|
import { WindowHapiQA } from "./qa.types"
|
15
|
-
import {
|
13
|
+
import { WindowHapiLogger } from "../common/logger/types"
|
14
|
+
import {
|
15
|
+
HapiWebComponent,
|
16
|
+
RecursivePartial,
|
17
|
+
WindowHapiSubmoduleName,
|
18
|
+
} from "../common"
|
19
|
+
import { DebugPanelPosition } from "./config.types"
|
20
|
+
|
21
|
+
export type WindowHapiModuleWithConstructorArgs<Module, ConstructorArgs> =
|
22
|
+
Module & ConstructorArgs
|
23
|
+
|
24
|
+
export type WindowHapiUtilsSubmodule = WindowHapiModuleWithConstructorArgs<
|
25
|
+
WindowHapiUtils,
|
26
|
+
{ readonly core: WindowHapiClassInterface }
|
27
|
+
>
|
28
|
+
|
29
|
+
export type WindowHapiValidationSubmodule = WindowHapiModuleWithConstructorArgs<
|
30
|
+
WindowHapiValidations,
|
31
|
+
{ readonly core: WindowHapiClassInterface }
|
32
|
+
>
|
33
|
+
|
34
|
+
export type WindowHapiStateSubmodule = WindowHapiModuleWithConstructorArgs<
|
35
|
+
WindowHapiState,
|
36
|
+
{ readonly core: WindowHapiClassInterface }
|
37
|
+
>
|
38
|
+
|
39
|
+
export type WindowHapiInstancesSubmodule = WindowHapiModuleWithConstructorArgs<
|
40
|
+
WindowHapiInstances,
|
41
|
+
{ readonly core: WindowHapiClassInterface }
|
42
|
+
>
|
43
|
+
|
44
|
+
export type WindowHapiRoutingSubmodule = WindowHapiModuleWithConstructorArgs<
|
45
|
+
WindowHapiRouting,
|
46
|
+
{ readonly core: WindowHapiClassInterface }
|
47
|
+
>
|
48
|
+
|
49
|
+
export type WindowHapiAuthSubmodule = WindowHapiModuleWithConstructorArgs<
|
50
|
+
WindowHapiAuth,
|
51
|
+
{ readonly core: WindowHapiClassInterface }
|
52
|
+
>
|
53
|
+
|
54
|
+
export type WindowHapiEventsSubmodule = WindowHapiModuleWithConstructorArgs<
|
55
|
+
WindowHapiEvents,
|
56
|
+
{ readonly core: WindowHapiClassInterface }
|
57
|
+
>
|
58
|
+
|
59
|
+
export type WindowHapiUISubmodule = WindowHapiModuleWithConstructorArgs<
|
60
|
+
WindowHapiUI,
|
61
|
+
{ readonly core: WindowHapiClassInterface }
|
62
|
+
>
|
63
|
+
|
64
|
+
export type WindowHapiAPISubmodule = WindowHapiModuleWithConstructorArgs<
|
65
|
+
WindowHapiAPI,
|
66
|
+
{ readonly core: WindowHapiClassInterface }
|
67
|
+
>
|
68
|
+
|
69
|
+
export type WindowHapiSDKSubmodule = WindowHapiModuleWithConstructorArgs<
|
70
|
+
WindowHapiSDK,
|
71
|
+
{ readonly core: WindowHapiClassInterface }
|
72
|
+
>
|
73
|
+
|
74
|
+
export type WindowHapiServiceSubmodule = WindowHapiModuleWithConstructorArgs<
|
75
|
+
WindowHapiService,
|
76
|
+
{ readonly core: WindowHapiClassInterface }
|
77
|
+
>
|
78
|
+
|
79
|
+
export type WindowHapiQASubmodule = WindowHapiModuleWithConstructorArgs<
|
80
|
+
WindowHapiQA,
|
81
|
+
{ readonly core: WindowHapiClassInterface }
|
82
|
+
>
|
83
|
+
|
84
|
+
export type WindowHapiConfigSubmodule = {
|
85
|
+
apiHost: string
|
86
|
+
initialState: RecursivePartial<any>
|
87
|
+
partnerId: string
|
88
|
+
clientId: string
|
89
|
+
clientToken: string
|
90
|
+
loadingSpinnerDefaultFillColor: string
|
91
|
+
appOrigin: string
|
92
|
+
enableLogs: boolean
|
93
|
+
webComponents: HapiWebComponent[]
|
94
|
+
isInvalidToken: boolean
|
95
|
+
useJWTAuthHeaders: boolean
|
96
|
+
addModal: boolean
|
97
|
+
addAlertBar: boolean
|
98
|
+
addDebugPanel: boolean
|
99
|
+
debugPanelPosition: DebugPanelPosition
|
100
|
+
datadogClientToken: string
|
101
|
+
env: string
|
102
|
+
appVersion: string
|
103
|
+
testMode: boolean
|
104
|
+
debugMode: boolean
|
105
|
+
htmlTemplates: Record<string, string>
|
106
|
+
}
|
107
|
+
|
108
|
+
export type WindowHapiClassInterface = {
|
109
|
+
logger: WindowHapiLogger
|
110
|
+
utils: WindowHapiUtilsSubmodule
|
111
|
+
validation: WindowHapiValidationSubmodule
|
112
|
+
state: WindowHapiStateSubmodule
|
113
|
+
instances: WindowHapiInstancesSubmodule
|
114
|
+
routing: WindowHapiRoutingSubmodule
|
115
|
+
auth: WindowHapiAuthSubmodule
|
116
|
+
events: WindowHapiEventsSubmodule
|
117
|
+
ui: WindowHapiUISubmodule
|
118
|
+
api: WindowHapiAPISubmodule
|
119
|
+
sdk: WindowHapiSDKSubmodule
|
120
|
+
service: WindowHapiServiceSubmodule
|
121
|
+
instance: WindowHapiInstance
|
122
|
+
qa: WindowHapiQASubmodule
|
123
|
+
}
|
16
124
|
|
17
125
|
export type WindowHapi = {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
WindowHapiInstances,
|
33
|
-
{ readonly core: WindowHapi }
|
34
|
-
>
|
35
|
-
routing: ModuleWithConstructorArgs<
|
36
|
-
WindowHapiRouting,
|
37
|
-
{ readonly core: WindowHapi }
|
38
|
-
>
|
39
|
-
auth: ModuleWithConstructorArgs<
|
40
|
-
WindowHapiAuth,
|
41
|
-
{ readonly core: WindowHapi }
|
42
|
-
>
|
43
|
-
events: ModuleWithConstructorArgs<
|
44
|
-
WindowHapiEvents,
|
45
|
-
{ readonly core: WindowHapi }
|
46
|
-
>
|
47
|
-
ui: ModuleWithConstructorArgs<WindowHapiUI, { readonly core: WindowHapi }>
|
48
|
-
api: ModuleWithConstructorArgs<WindowHapiAPI, { readonly core: WindowHapi }>
|
49
|
-
sdk: ModuleWithConstructorArgs<WindowHapiSDK, { readonly core: WindowHapi }>
|
50
|
-
service: ModuleWithConstructorArgs<
|
51
|
-
WindowHapiService,
|
52
|
-
{ readonly core: WindowHapi }
|
53
|
-
>
|
54
|
-
instance: HapiInstance
|
55
|
-
qa: ModuleWithConstructorArgs<WindowHapiQA, { readonly core: WindowHapi }>
|
126
|
+
[WindowHapiSubmoduleName.api]: WindowHapiAPISubmodule
|
127
|
+
[WindowHapiSubmoduleName.auth]: WindowHapiAuthSubmodule
|
128
|
+
[WindowHapiSubmoduleName.config]: WindowHapiConfigSubmodule
|
129
|
+
[WindowHapiSubmoduleName.instances]: WindowHapiInstancesSubmodule
|
130
|
+
[WindowHapiSubmoduleName.qa]: WindowHapiQASubmodule
|
131
|
+
[WindowHapiSubmoduleName.routing]: WindowHapiRoutingSubmodule
|
132
|
+
[WindowHapiSubmoduleName.sdk]: WindowHapiSDKSubmodule
|
133
|
+
[WindowHapiSubmoduleName.service]: WindowHapiServiceSubmodule
|
134
|
+
[WindowHapiSubmoduleName.state]: WindowHapiStateSubmodule
|
135
|
+
[WindowHapiSubmoduleName.ui]: WindowHapiUISubmodule
|
136
|
+
[WindowHapiSubmoduleName.utils]: WindowHapiUtilsSubmodule
|
137
|
+
[WindowHapiSubmoduleName.validation]: WindowHapiValidationSubmodule
|
138
|
+
[WindowHapiSubmoduleName.events]: WindowHapiEventsSubmodule
|
139
|
+
[WindowHapiSubmoduleName.instance]: WindowHapiInstance
|
56
140
|
}
|
package/src/alert/index.ts
CHANGED
@@ -1,9 +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';
|
3
|
+
export * from "./enums"
|
4
|
+
export * from "./service.types"
|
5
|
+
export * from "./state.types"
|
6
|
+
export * from "./types"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { AlertKey } from "./enums"
|
2
2
|
import { AlertOptions } from "./types"
|
3
|
-
import { ModuleWithConstructorArgs } from "../types"
|
4
3
|
import { WindowHapiService } from "../_window/service.types"
|
4
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
5
5
|
|
6
|
-
export type WindowHapiServiceAlert =
|
6
|
+
export type WindowHapiServiceAlert = WindowHapiModuleWithConstructorArgs<
|
7
7
|
{
|
8
8
|
show: (
|
9
9
|
key: AlertKey,
|
package/src/alert/state.types.ts
CHANGED
@@ -1,27 +1,9 @@
|
|
1
1
|
import { Alert, AlertOptions } from "./types"
|
2
|
-
export type
|
3
|
-
/**
|
4
|
-
* List of alert objects to be shown
|
5
|
-
*/
|
2
|
+
export type AlertState = {
|
6
3
|
alerts: Alert[]
|
7
|
-
/**
|
8
|
-
* Default options object for Toast (Snack) notifications. Contains options like duration, show/hide close button, position.
|
9
|
-
*/
|
10
4
|
defaultOptions: AlertOptions
|
11
|
-
/**
|
12
|
-
* Extends default options and sets the type to "success". **This value is a computed getter meaning that it cannot be set from outside**
|
13
|
-
*/
|
14
5
|
successOptions: AlertOptions | null
|
15
|
-
/**
|
16
|
-
* Extends default options and sets the type to "info". **This value is a computed getter meaning that it cannot be set from outside**
|
17
|
-
*/
|
18
6
|
infoOptions: AlertOptions | null
|
19
|
-
/**
|
20
|
-
* Extends default options and sets the type to "warning". **This value is a computed getter meaning that it cannot be set from outside**
|
21
|
-
*/
|
22
7
|
warningOptions: AlertOptions | null
|
23
|
-
/**
|
24
|
-
* Extends default options and sets the type to "error". **This value is a computed getter meaning that it cannot be set from outside**
|
25
|
-
*/
|
26
8
|
errorOptions: AlertOptions | null
|
27
9
|
}
|
package/src/ats/api.types.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AxiosRequestConfig } from "axios/index"
|
2
2
|
import { ATSSettings } from "./types"
|
3
3
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
4
|
-
import {
|
4
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
5
5
|
|
6
6
|
export type WindowHapiAPIATSConfigs = {
|
7
7
|
getUserSettings: AxiosRequestConfig<any>
|
@@ -10,7 +10,7 @@ export type WindowHapiAPIATSConfigs = {
|
|
10
10
|
export type WindowHapiAPIATSRequests = {
|
11
11
|
getUserSettings: () => Promise<ATSSettings>
|
12
12
|
}
|
13
|
-
export type WindowHapiAPIATS =
|
13
|
+
export type WindowHapiAPIATS = WindowHapiModuleWithConstructorArgs<
|
14
14
|
WindowHapiAPIModule<WindowHapiAPIATSRequests, WindowHapiAPIATSConfigs>,
|
15
15
|
{ readonly api: WindowHapiAPI }
|
16
16
|
>
|
package/src/ats/index.ts
CHANGED
@@ -1,9 +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';
|
3
|
+
export * from "./api.types"
|
4
|
+
export * from "./service.types"
|
5
|
+
export * from "./state.types"
|
6
|
+
export * from "./types"
|
package/src/ats/service.types.ts
CHANGED
@@ -3,13 +3,13 @@ import {
|
|
3
3
|
WindowHapiService,
|
4
4
|
} from "../_window/service.types"
|
5
5
|
import { ATSSettings } from "./types"
|
6
|
-
import {
|
6
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
7
7
|
|
8
8
|
export type ATSServiceGetUserSettingsHandler = () => Promise<
|
9
9
|
ATSSettings | undefined
|
10
10
|
>
|
11
11
|
|
12
|
-
export type WindowHapiServiceATS =
|
12
|
+
export type WindowHapiServiceATS = WindowHapiModuleWithConstructorArgs<
|
13
13
|
{
|
14
14
|
getUserSettings: HapiServiceFunctionWithLifecycleHooks<ATSServiceGetUserSettingsHandler>
|
15
15
|
},
|
package/src/ats/state.types.ts
CHANGED
package/src/basket/index.ts
CHANGED
@@ -1,12 +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.validations';
|
9
|
-
export * from './types';
|
10
|
-
export * from './utils';
|
11
|
-
export * from './utils.types';
|
12
|
-
export * from './validations.types';
|
3
|
+
export * from "./service.types"
|
4
|
+
export * from "./state.types"
|
5
|
+
export * from "./types"
|
6
|
+
export * from "./utils.types"
|
7
|
+
export * from "./validations.types"
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
HapiServiceFunctionWithLifecycleHooks,
|
6
6
|
WindowHapiService,
|
7
7
|
} from "../_window/service.types"
|
8
|
-
import {
|
8
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
9
9
|
|
10
10
|
export type BasketServiceGetProductsHandler = () => Promise<
|
11
11
|
(Product | Contract)[]
|
@@ -18,7 +18,7 @@ export type BasketServiceRemoveProductOrContractByIdHandler = (
|
|
18
18
|
contractOrProductId: string,
|
19
19
|
) => void
|
20
20
|
|
21
|
-
export type WindowHapiServiceBasket =
|
21
|
+
export type WindowHapiServiceBasket = WindowHapiModuleWithConstructorArgs<
|
22
22
|
{
|
23
23
|
setBasketProductsAndMetaByItemData: (
|
24
24
|
basketItemData: (Contract | Product)[],
|
@@ -2,7 +2,7 @@ import { Product } from "../product/types"
|
|
2
2
|
import { BasketProduct } from "./types"
|
3
3
|
import { Contract } from "../contract/types"
|
4
4
|
|
5
|
-
export type
|
5
|
+
export type BasketState = {
|
6
6
|
/**
|
7
7
|
* Array of `BasketProduct`s. The price or other properties of a Product or Contract may change therefore this variable only contains ID of Product or Contract and whether it is a Product or not; via the `isProduct: boolean` variable. Elements of this array then are fetched from the API with their latest information and then set as `products`.
|
8
8
|
*/
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { BasketProduct } 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 WindowHapiUtilsBasket =
|
5
|
+
export type WindowHapiUtilsBasket = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
7
|
getInitialBasketProductsMeta: () => BasketProduct[]
|
8
8
|
},
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
import { ProductSupportingContractsComplete } from "../product/types"
|
8
8
|
import { WindowHapiAPI, WindowHapiAPIModule } from "../_window/api.types"
|
9
9
|
import { PaginatedAPIResponseV2 } from "../common/types"
|
10
|
-
import {
|
10
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
11
11
|
|
12
12
|
export type WindowHapiAPICampaignConfigs = {
|
13
13
|
getCampaigns: AxiosRequestConfig
|
@@ -36,7 +36,7 @@ export type WindowHapiAPICampaignRequests = {
|
|
36
36
|
getSeniorities: () => Promise<TaxonomyEducationAndSeniorityLevel[]>
|
37
37
|
orderCampaign: (postBody: CampaignOrderRequestBody) => Promise<Campaign>
|
38
38
|
}
|
39
|
-
export type WindowHapiAPICampaign =
|
39
|
+
export type WindowHapiAPICampaign = WindowHapiModuleWithConstructorArgs<
|
40
40
|
WindowHapiAPIModule<
|
41
41
|
WindowHapiAPICampaignRequests,
|
42
42
|
WindowHapiAPICampaignConfigs
|
package/src/campaign/index.ts
CHANGED
@@ -1,15 +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';
|
14
|
-
export * from './utils.types';
|
15
|
-
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/campaign/qa.types.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import { MockCampaignCreateForm } from "../consts"
|
2
|
-
import { ModuleWithConstructorArgs } from "../types"
|
3
1
|
import { WindowHapiQA } from "../_window/qa.types"
|
2
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
3
|
+
import { CampaignCreateForm } from "./types"
|
4
4
|
|
5
|
-
export type WindowHapiQACampaign =
|
5
|
+
export type WindowHapiQACampaign = WindowHapiModuleWithConstructorArgs<
|
6
6
|
{
|
7
|
-
useMockCampaignForm: () =>
|
7
|
+
useMockCampaignForm: () => CampaignCreateForm
|
8
8
|
getRandomCampaignId: () => Promise<string>
|
9
9
|
setCampaignFormDebuggerIsShown: (isEnabled: boolean) => boolean
|
10
10
|
},
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
import { ProductSupportingContractsComplete } from "../product/types"
|
6
6
|
import { Campaign, TaxonomyEducationAndSeniorityLevel } from "./types"
|
7
7
|
import { PaginatedAPIResponseV2 } from "../common/types"
|
8
|
-
import {
|
8
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
9
9
|
|
10
10
|
export type CampaignServiceGetCampaignsHandler = (
|
11
11
|
offset?: number,
|
@@ -33,7 +33,7 @@ export type CampaignServiceCopyCampaignHandler = (
|
|
33
33
|
campaign: Campaign,
|
34
34
|
) => Promise<Campaign>
|
35
35
|
|
36
|
-
export type WindowHapiServiceCampaign =
|
36
|
+
export type WindowHapiServiceCampaign = WindowHapiModuleWithConstructorArgs<
|
37
37
|
{
|
38
38
|
getCampaigns: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignsHandler>
|
39
39
|
getCampaignDetail: HapiServiceFunctionWithLifecycleHooks<CampaignServiceGetCampaignDetailHandler>
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
} from "./types"
|
8
8
|
import { PaginationResponseV2 } from "../common/types"
|
9
9
|
|
10
|
-
export type
|
10
|
+
export type CampaignState = {
|
11
11
|
/* Campaign */
|
12
12
|
/**
|
13
13
|
* Array of Campaign Objects for listing in Campaigns Landing and Campaigns List (both Card and Accordion Table Layout) widgets
|
@@ -14,11 +14,11 @@ import {
|
|
14
14
|
} from "./types"
|
15
15
|
import { Product } from "../product/types"
|
16
16
|
import { Contract } from "../contract/types"
|
17
|
-
import { ModuleWithConstructorArgs } from "../types"
|
18
17
|
import { BasketProduct } from "../basket/types"
|
19
18
|
import { WindowHapiUtils } from "../_window/utils.types"
|
19
|
+
import { WindowHapiModuleWithConstructorArgs } from "../_window"
|
20
20
|
|
21
|
-
export type WindowHapiUtilsCampaign =
|
21
|
+
export type WindowHapiUtilsCampaign = WindowHapiModuleWithConstructorArgs<
|
22
22
|
{
|
23
23
|
getInitialCampaignForm: () => CampaignCreateForm
|
24
24
|
mapCampaignsAndUpdateById: (
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export enum
|
1
|
+
export enum WindowHapiSubmoduleName {
|
2
2
|
"api" = "hapiApi",
|
3
3
|
auth = "hapiAuth",
|
4
4
|
config = "hapiConfig",
|
@@ -11,6 +11,7 @@ export enum WindowHapiCoreModuleName {
|
|
11
11
|
ui = "hapiUI",
|
12
12
|
utils = "hapiUtils",
|
13
13
|
validation = "hapiValidation",
|
14
|
+
events = "hapiEvents",
|
14
15
|
instance = "hapiInstance",
|
15
16
|
}
|
16
17
|
|
@@ -3,8 +3,8 @@ import {
|
|
3
3
|
WindowHapiEventCommandNames,
|
4
4
|
WindowHapiEventCommandStatus,
|
5
5
|
} from "./EventCommand/types"
|
6
|
-
import {
|
7
|
-
import
|
6
|
+
import { WindowHapiInstance } from "../../_window"
|
7
|
+
import { WindowHapiLogger } from "../logger/types"
|
8
8
|
|
9
9
|
export type WindowHapiEventStrategy = {
|
10
10
|
handleEvent: (
|
@@ -13,8 +13,8 @@ export type WindowHapiEventStrategy = {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
export type WindowHapiEventMediatorInstances = {
|
16
|
-
source:
|
17
|
-
targets:
|
16
|
+
source: WindowHapiInstance
|
17
|
+
targets: WindowHapiInstance[]
|
18
18
|
}
|
19
19
|
|
20
20
|
export type WindowHapiEventMediatorGetInstancesHandler =
|
@@ -26,8 +26,8 @@ export type WindowHapiEventCommand = {
|
|
26
26
|
createdAt: string
|
27
27
|
updatedAt: string | undefined
|
28
28
|
status: WindowHapiEventCommandStatus
|
29
|
-
logger:
|
30
|
-
instance?:
|
29
|
+
logger: WindowHapiLogger
|
30
|
+
instance?: WindowHapiInstance
|
31
31
|
data: WindowHapiEventCommandData | undefined
|
32
32
|
sourceInstanceName: string
|
33
33
|
targetInstancesNames: string[]
|
package/src/common/index.ts
CHANGED
@@ -1,22 +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 './browser';
|
9
|
-
export * from './color';
|
10
|
-
export * from './immutable';
|
11
|
-
export * from './json';
|
12
|
-
export * from './misc';
|
13
|
-
export * from './promise';
|
14
|
-
export * from './proxy';
|
15
|
-
export * from './qa.types';
|
16
|
-
export * from './regExTest';
|
17
|
-
export * from './tree';
|
18
|
-
export * from './types';
|
19
|
-
export * from './utm';
|
20
|
-
export * from './validations.types';
|
21
|
-
export * from './validators';
|
22
|
-
export * from './webComponents';
|
3
|
+
export * from "./events"
|
4
|
+
export * from "./qa.types"
|
5
|
+
export * from "./types"
|
6
|
+
export * from "./validations.types"
|
7
|
+
export * from "./enums"
|
@@ -5,3 +5,14 @@ export type LogOutput = (
|
|
5
5
|
level: LogLevel,
|
6
6
|
...objects: any[]
|
7
7
|
) => void
|
8
|
+
|
9
|
+
export type WindowHapiLogger = {
|
10
|
+
id: string
|
11
|
+
setIsEnabled: (isEnabled: boolean) => void
|
12
|
+
debug: (...objects: any[]) => void
|
13
|
+
info: (...objects: any[]) => void
|
14
|
+
warn: (...objects: any[]) => void
|
15
|
+
error: (...objects: any[]) => void
|
16
|
+
timeStart: (message: string) => void
|
17
|
+
timeEnd: (message: string) => void
|
18
|
+
}
|
package/src/common/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 WindowHapiQACommon =
|
4
|
+
export type WindowHapiQACommon = WindowHapiModuleWithConstructorArgs<
|
5
5
|
{
|
6
6
|
setComponentDebuggingIsEnabled: (isEnabled: boolean) => boolean
|
7
7
|
},
|