@gomusdev/web-components 1.15.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,18 @@
1
1
  export declare function createSetDetails<T>(KEY: string): (host: HTMLElement, details: T) => void;
2
- export declare function createGetDetails<T>(KEY: string): (host: HTMLElement) => T | undefined;
2
+ export declare class DetailsWrapper<T> {
3
+ #private;
4
+ host: HTMLElement;
5
+ KEY: string;
6
+ pollDuration: number;
7
+ error: boolean;
8
+ constructor(host: HTMLElement, KEY: string, pollDuration?: number);
9
+ load(): void;
10
+ get value(): T | undefined;
11
+ set value(newValue: T | undefined);
12
+ }
13
+ export declare function createGetDetails<T>(KEY: string): (host: HTMLElement, options?: {
14
+ pollDuration: number;
15
+ }) => DetailsWrapper<T>;
16
+ export declare class StaticDetailsWrapper<T> extends DetailsWrapper<T> {
17
+ constructor(_value: T);
18
+ }
@@ -2,4 +2,6 @@ export declare class Details {
2
2
  field: string;
3
3
  }
4
4
  export declare const setDetails: (host: HTMLElement, details: Details) => void;
5
- export declare const getDetails: (host: HTMLElement) => Details | undefined;
5
+ export declare const getDetails: (host: HTMLElement, options?: {
6
+ pollDuration: number;
7
+ }) => import('../../context.svelte.ts').DetailsWrapper<Details>;
@@ -3,7 +3,7 @@ import { ShopUrls } from '../helpers/urls';
3
3
  import { User } from './user.svelte.ts';
4
4
  import { OpenApiClient } from '@gomus/api';
5
5
  import { TicketsAndQuotasParams, TicketsCalendarParams, TicketsParams } from '@gomus/api/lib/types.ts';
6
- import { CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour } from '@gomus/types';
6
+ import { CheckoutParams, CheckoutResponse, Country, Event, Exhibition, FinalizePersonalizationParams, FinalizePersonalizationResponse, LocaleOptions, Merchandise, Museum, PasswordResetResponse, Salutation, ShopType, SignInParams, SignInResponse, SignUpParams, SignUpResponse, Tour } from '@gomus/types';
7
7
  export type ShopKind = 'angular' | 'jmb';
8
8
  export declare class Shop {
9
9
  #private;
@@ -187,6 +187,9 @@ export declare class Shop {
187
187
  };
188
188
  signIn(params: SignInParams): Promise<SignInResponse>;
189
189
  signUp(params: SignUpParams, asGuest?: boolean): Promise<SignUpResponse>;
190
+ passwordReset(params: {
191
+ email: string;
192
+ }): Promise<PasswordResetResponse>;
190
193
  checkout(params: CheckoutParams): Promise<CheckoutResponse>;
191
194
  order(token: string): {
192
195
  id: number;
@@ -9,8 +9,9 @@ export declare function isBoolean(value: unknown): value is boolean;
9
9
  * @param {Function} callback A function to be repeatedly invoked. It should return a value
10
10
  * which will be checked for truthiness. If it throws an error,
11
11
  * the polling will stop, and the returned promise will be rejected.
12
+ * @param maxDuration
12
13
  * @return {Promise<any>} A promise that resolves with the first truthy value returned by the callback,
13
14
  * `undefined` if the timeout is reached without any truthy value,
14
15
  * or rejects if the callback throws an error.
15
16
  */
16
- export declare function pollUntilTruthy(callback: () => any): Promise<any>;
17
+ export declare function pollUntilTruthy(callback: () => any, maxDuration?: number): Promise<any>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.15.0",
7
+ "version": "1.16.1",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",
@@ -24,6 +24,7 @@
24
24
  "build-web-components": "vite build;",
25
25
  "copy-web-components": "cp ./dist-js/gomus-paypal.iife.js ../../../gomus-shop/src/assets/javascript",
26
26
  "build:standard-components": "pnpm vite -c vite.standard-components.config.ts build; cp dist-js/standard-components.js ../../../gomus-shop/src/assets/javascript",
27
+ "open-test": "vite build && vite --open src/test.html",
27
28
  "=== E 2 E ===": "",
28
29
  "e2e": "npx playwright test",
29
30
  "e2e:ui": "npx playwright test --ui",
@@ -1,3 +0,0 @@
1
- export interface DataHolder<T> {
2
- data: T | undefined;
3
- }