@vonq/hapi-elements-types 1.23.0 → 1.24.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.
@@ -26,6 +26,7 @@ export type WindowHapiQA = WindowHapiModuleWithConstructorArgs<
26
26
  getDebugPanelButtonEl: () => HTMLElement | null
27
27
  onClickDebugPanel: () => void
28
28
  addDebugPanelToDOM: () => void
29
+ removeDebugPanelFromDOM: () => void
29
30
  setDebugPanelPosition: (buttonEl: HTMLElement | null) => void
30
31
  },
31
32
  { readonly core: WindowHapiClassInterface }
@@ -3,10 +3,17 @@ import {
3
3
  WindowHapiClassInterface,
4
4
  } from "./window"
5
5
 
6
+ export type WindowHapiUIElementNameForAddingToBody =
7
+ | "he-ui-modals"
8
+ | "he-ui-alertbar"
9
+
6
10
  export type WindowHapiUI = WindowHapiModuleWithConstructorArgs<
7
11
  {
8
12
  addUIElementToBody: (
9
- elementName: "he-ui-modals" | "he-ui-alertbar",
13
+ elementName: WindowHapiUIElementNameForAddingToBody,
14
+ ) => void
15
+ removeUIElementFromBody: (
16
+ elementName: WindowHapiUIElementNameForAddingToBody,
10
17
  ) => void
11
18
  toggleModal: () => void
12
19
  toggleAlertbar: () => void
package/_window/window.ts CHANGED
@@ -5,7 +5,10 @@ import { WindowHapiInstance, WindowHapiInstances } from "./instances.types"
5
5
  import { WindowHapiRouting } from "./routing.types"
6
6
  import { WindowHapiAuth } from "./auth.types"
7
7
  import { WindowHapiEvents } from "./events.types"
8
- import { WindowHapiUI } from "./ui.types"
8
+ import {
9
+ WindowHapiUI,
10
+ WindowHapiUIElementNameForAddingToBody,
11
+ } from "./ui.types"
9
12
  import { WindowHapiAPI } from "./api.types"
10
13
  import { WindowHapiSDK } from "./sdk.types"
11
14
  import { WindowHapiService } from "./service.types"
@@ -129,6 +132,11 @@ export type WindowHapiConfigSubmodule = {
129
132
  featureBranches: HapiFeatureBranch[]
130
133
  }
131
134
 
135
+ export type WindowPropertiesMap = {
136
+ windowKey: WindowHapiSubmoduleName
137
+ klassProperty: keyof WindowHapiClassInterface
138
+ }
139
+
132
140
  export type WindowHapiClassInterface = {
133
141
  logger: WindowHapiLogger
134
142
  utils: WindowHapiUtilsSubmodule
@@ -148,6 +156,16 @@ export type WindowHapiClassInterface = {
148
156
  isReady: boolean
149
157
  enableLogs: boolean
150
158
  enableRemoteLogs: boolean
159
+ windowPropertiesMap: WindowPropertiesMap[]
160
+ uiElementsToAddToBody: WindowHapiUIElementNameForAddingToBody[]
161
+ attachWebComponents: () => void
162
+ attach: () => void
163
+ detach: () => void
164
+ bootstrap: () => Promise<void>
165
+ logWelcomeMessage: () => void
166
+ logDeprecationNotice: () => void
167
+ logLatestTypesPackageVersion: () => Promise<void>
168
+ logFeatureBranches: () => Promise<void>
151
169
  }
152
170
 
153
171
  export type WindowHapi = {
@@ -173,7 +191,9 @@ export type WindowHapiInjector = {
173
191
  key: K,
174
192
  value: WindowHapiInjectorConfig[K],
175
193
  ): WindowHapiInjectorConfig
176
- inject: () => Promise<void>
194
+ inject: () => Promise<never | true>
195
+ eject: () => Promise<void>
196
+ reinjectForNewUser: (newToken: string) => Promise<never | true>
177
197
  }
178
198
  hapiInjectorConfig: WindowHapiInjectorConfig
179
199
  }
@@ -1,6 +1,6 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./enums"
4
- export * from "./service.types"
5
- export * from "./state.types"
6
- export * from "./types"
3
+ export * from './enums';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
package/ats/index.ts.bak CHANGED
@@ -1,6 +1,6 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./api.types"
4
- export * from "./service.types"
5
- export * from "./state.types"
6
- export * from "./types"
3
+ export * from './api.types';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
@@ -1,7 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./service.types"
4
- export * from "./state.types"
5
- export * from "./types"
6
- export * from "./utils.types"
7
- 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';
@@ -9,6 +9,7 @@ import { WindowHapiModuleWithConstructorArgs } from "../_window"
9
9
 
10
10
  export type BasketServiceGetProductsHandler = (
11
11
  products?: BasketProduct[],
12
+ shouldSet?: boolean,
12
13
  ) => Promise<(Product | Contract)[]>
13
14
  export type BasketServiceAddProductOrContractByIdHandler = (
14
15
  contractOrProductId: string,
@@ -30,6 +31,7 @@ export type WindowHapiServiceBasket = WindowHapiModuleWithConstructorArgs<
30
31
  {
31
32
  onAfterGetBasketData: (
32
33
  basketItemData: (Contract | Product)[],
34
+ shouldSet: boolean,
33
35
  ) => BasketProduct[]
34
36
  setProductsMeta: BasketServiceSetProductsMetaHandler
35
37
  getProducts: HapiServiceFunctionWithLifecycleHooks<BasketServiceGetProductsHandler>
@@ -1,10 +1,10 @@
1
1
  // created from 'create-ts-index'
2
2
 
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"
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';
@@ -1,7 +1,9 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./events"
4
- export * from "./qa.types"
5
- export * from "./types"
6
- export * from "./validations.types"
7
- export * from "./enums"
3
+ export * from './events';
4
+ export * from './logger';
5
+ export * from './validator';
6
+ export * from './enums';
7
+ export * from './qa.types';
8
+ export * from './types';
9
+ export * from './validations.types';
@@ -0,0 +1,4 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './enums';
4
+ export * from './types';
package/common/types.ts CHANGED
@@ -223,16 +223,26 @@ export type PostingRequirementOption = {
223
223
  default?: string
224
224
  key: string
225
225
  label: string
226
- data?: any[]
226
+ data?: PostingRequirementOptionData
227
227
  labels?: Record<"default", string>
228
228
  sort: string
229
229
  parent?: string
230
230
  requires?: PostingRequirementOptionRequiresField[] | null
231
231
  show?: string[]
232
232
  }
233
+ export type PostingRequirementOptionDataImage = {
234
+ image: {
235
+ title: string
236
+ src: string
237
+ }
238
+ }
239
+ export type PostingRequirementOptionData = {
240
+ description?: string
241
+ images?: PostingRequirementOptionDataImage[]
242
+ }
233
243
  export type TransformedPostingRequirementOption = {
234
244
  value?: string
235
- data?: any[]
245
+ data?: PostingRequirementOptionData
236
246
  requires?: PostingRequirementOptionRequiresField[] | null
237
247
  label: string
238
248
  show?: string[]
@@ -0,0 +1,3 @@
1
+ // created from 'create-ts-index'
2
+
3
+ export * from './types';
@@ -1,9 +1,9 @@
1
1
  // created from 'create-ts-index'
2
2
 
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"
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';
@@ -1,4 +1,5 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./state.types"
4
- export * from "./types"
3
+ export * from './service.types';
4
+ export * from './state.types';
5
+ export * from './types';
package/index.ts.bak CHANGED
@@ -1,18 +1,18 @@
1
1
  // created from 'create-ts-index'
2
2
 
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"
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';
@@ -1,5 +1,8 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./qa.types"
4
- export * from "./state.types"
5
- export * from "./validations.types"
3
+ export * from './enums';
4
+ export * from './qa.types';
5
+ export * from './service.types';
6
+ export * from './state.types';
7
+ export * from './utils.types';
8
+ export * from './validations.types';
@@ -1,6 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./enums"
4
- export * from "./service.types"
5
- export * from "./state.types"
6
- export * from "./types"
3
+ export * from './enums';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
7
+ export * from './utils.types';
@@ -1,8 +1,9 @@
1
1
  // created from 'create-ts-index'
2
2
 
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"
3
+ export * from './enums';
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';
@@ -17,6 +17,7 @@ export type WindowHapiServiceOrderJourney = WindowHapiModuleWithConstructorArgs<
17
17
  switchToNextStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToNextStepHandler>
18
18
  switchToPreviousStep: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceSwitchToPreviousStepHandler>
19
19
  restartJourney: HapiServiceFunctionWithLifecycleHooks<OrderJourneyServiceRestartJourneyHandler>
20
+ unblurOnboardingStepFields: () => void
20
21
  getValidators: () => Record<string, NestedValidatorKeys>
21
22
  getErrorMessages: () => Record<string, Record<string, any> | undefined>
22
23
  getBlurredFields: () => Record<string, Record<string, any> | undefined>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@vonq/hapi-elements-types",
4
- "version": "1.23.0",
4
+ "version": "1.24.0",
5
5
  "description": "This package contains Typescript definitions for HAPI Elements",
6
6
  "author": "VONQ HAPI Team",
7
7
  "license": "BSD-3-Clause",
@@ -1,10 +1,10 @@
1
1
  // created from 'create-ts-index'
2
2
 
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"
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';
@@ -1,3 +1,4 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./state.types"
3
+ export * from './state.types';
4
+ export * from './utils.types';
@@ -1,6 +1,6 @@
1
1
  // created from 'create-ts-index'
2
2
 
3
- export * from "./qa.types"
4
- export * from "./state.types"
5
- export * from "./types"
6
- export * from "./validations.types"
3
+ export * from './qa.types';
4
+ export * from './state.types';
5
+ export * from './types';
6
+ export * from './validations.types';
@@ -1,7 +1,7 @@
1
1
  // created from 'create-ts-index'
2
2
 
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
+ export * from './api.types';
4
+ export * from './service.types';
5
+ export * from './state.types';
6
+ export * from './types';
7
+ export * from './validations.types';