@adobe-commerce/elsie 1.0.0-alpha3 → 1.0.0-alpha5
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/config/eslint.js +1 -0
- package/config/storybook/addon.js +1 -1
- package/package.json +2 -2
- package/post-release.sh +5 -0
- package/src/components/Accordion/Accordion.stories.tsx +7 -0
- package/src/components/Accordion/Accordion.tsx +3 -1
- package/src/components/Icon/Icon.stories.tsx +1 -0
- package/src/docs/API/initializer.mdx +23 -14
- package/src/icons/GiftCard.svg +2 -2
- package/src/lib/image-params-keymap.ts +3 -1
- package/src/lib/initializer.ts +7 -4
- package/src/lib/resolve-image.ts +19 -4
- package/dist/chunks/deviceUtils.js +0 -14
- package/dist/chunks/icons/Add.js +0 -3
- package/dist/chunks/icons/AddressBook.js +0 -3
- package/dist/chunks/icons/Bulk.js +0 -3
- package/dist/chunks/icons/Burger.js +0 -3
- package/dist/chunks/icons/Card.js +0 -3
- package/dist/chunks/icons/Cart.js +0 -3
- package/dist/chunks/icons/Check.js +0 -3
- package/dist/chunks/icons/CheckWithCircle.js +0 -3
- package/dist/chunks/icons/ChevronDown.js +0 -3
- package/dist/chunks/icons/ChevronRight.js +0 -3
- package/dist/chunks/icons/ChevronUp.js +0 -3
- package/dist/chunks/icons/Close.js +0 -3
- package/dist/chunks/icons/Coupon.js +0 -3
- package/dist/chunks/icons/Date.js +0 -3
- package/dist/chunks/icons/Delivery.js +0 -3
- package/dist/chunks/icons/EmptyBox.js +0 -3
- package/dist/chunks/icons/Eye.js +0 -3
- package/dist/chunks/icons/EyeClose.js +0 -3
- package/dist/chunks/icons/Gift.js +0 -3
- package/dist/chunks/icons/GiftCard.js +0 -3
- package/dist/chunks/icons/Heart.js +0 -3
- package/dist/chunks/icons/HeartFilled.js +0 -3
- package/dist/chunks/icons/InfoFilled.js +0 -3
- package/dist/chunks/icons/Locker.js +0 -3
- package/dist/chunks/icons/Minus.js +0 -3
- package/dist/chunks/icons/Order.js +0 -3
- package/dist/chunks/icons/OrderError.js +0 -3
- package/dist/chunks/icons/OrderSuccess.js +0 -3
- package/dist/chunks/icons/PaymentError.js +0 -3
- package/dist/chunks/icons/Placeholder.js +0 -3
- package/dist/chunks/icons/PlaceholderFilled.js +0 -3
- package/dist/chunks/icons/Search.js +0 -3
- package/dist/chunks/icons/SearchFilled.js +0 -3
- package/dist/chunks/icons/Sort.js +0 -3
- package/dist/chunks/icons/Star.js +0 -3
- package/dist/chunks/icons/Trash.js +0 -3
- package/dist/chunks/icons/User.js +0 -3
- package/dist/chunks/icons/View.js +0 -3
- package/dist/chunks/icons/Wallet.js +0 -3
- package/dist/chunks/icons/Warning.js +0 -3
- package/dist/chunks/icons/WarningFilled.js +0 -3
- package/dist/chunks/icons/WarningWithCircle.js +0 -3
- package/dist/chunks/image-params-keymap.js +0 -3
- package/dist/chunks/initializer.js +0 -5
- package/dist/components.d.ts +0 -1
- package/dist/components.js +0 -3
- package/dist/event-bus.d.ts +0 -1
- package/dist/event-bus.js +0 -3
- package/dist/fetch-graphql.d.ts +0 -1
- package/dist/fetch-graphql.js +0 -3
- package/dist/i18n.d.ts +0 -1
- package/dist/i18n.js +0 -5
- package/dist/initializer.d.ts +0 -1
- package/dist/initializer.js +0 -5
- package/dist/lib.d.ts +0 -1
- package/dist/lib.js +0 -3
- package/dist/preact-compat.d.ts +0 -1
- package/dist/preact-compat.js +0 -3
- package/dist/preact-hooks.d.ts +0 -1
- package/dist/preact-hooks.js +0 -3
- package/dist/preact-jsx-runtime.d.ts +0 -1
- package/dist/preact-jsx-runtime.js +0 -3
- package/dist/preact.d.ts +0 -1
- package/dist/preact.js +0 -3
- package/dist/recaptcha.d.ts +0 -1
- package/dist/recaptcha.js +0 -14
- package/dist/signals.d.ts +0 -1
- package/dist/signals.js +0 -3
- package/dist/types/elsie/src/components/Accordion/Accordion.d.ts +0 -27
- package/dist/types/elsie/src/components/Accordion/index.d.ts +0 -3
- package/dist/types/elsie/src/components/ActionButton/ActionButton.d.ts +0 -11
- package/dist/types/elsie/src/components/ActionButton/index.d.ts +0 -2
- package/dist/types/elsie/src/components/ActionButtonGroup/ActionButtonGroup.d.ts +0 -20
- package/dist/types/elsie/src/components/ActionButtonGroup/index.d.ts +0 -2
- package/dist/types/elsie/src/components/AlertBanner/AlertBanner.d.ts +0 -15
- package/dist/types/elsie/src/components/AlertBanner/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Breadcrumbs/Breadcrumbs.d.ts +0 -9
- package/dist/types/elsie/src/components/Breadcrumbs/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Button/Button.d.ts +0 -15
- package/dist/types/elsie/src/components/Button/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Card/Card.d.ts +0 -9
- package/dist/types/elsie/src/components/Card/index.d.ts +0 -2
- package/dist/types/elsie/src/components/CartItem/CartItem.d.ts +0 -36
- package/dist/types/elsie/src/components/CartItem/CartItemSkeleton.d.ts +0 -4
- package/dist/types/elsie/src/components/CartItem/index.d.ts +0 -4
- package/dist/types/elsie/src/components/CartList/CartList.d.ts +0 -7
- package/dist/types/elsie/src/components/CartList/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Checkbox/Checkbox.d.ts +0 -13
- package/dist/types/elsie/src/components/Checkbox/index.d.ts +0 -2
- package/dist/types/elsie/src/components/ColorSwatch/ColorSwatch.d.ts +0 -20
- package/dist/types/elsie/src/components/ColorSwatch/index.d.ts +0 -3
- package/dist/types/elsie/src/components/ContentGrid/ContentGrid.d.ts +0 -10
- package/dist/types/elsie/src/components/ContentGrid/index.d.ts +0 -19
- package/dist/types/elsie/src/components/Divider/Divider.d.ts +0 -8
- package/dist/types/elsie/src/components/Divider/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Field/Field.d.ts +0 -14
- package/dist/types/elsie/src/components/Field/index.d.ts +0 -2
- package/dist/types/elsie/src/components/Header/Header.d.ts +0 -11
- package/dist/types/elsie/src/components/Header/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Icon/Icon.d.ts +0 -18
- package/dist/types/elsie/src/components/Icon/index.d.ts +0 -2
- package/dist/types/elsie/src/components/IllustratedMessage/IllustratedMessage.d.ts +0 -13
- package/dist/types/elsie/src/components/IllustratedMessage/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Image/Image.d.ts +0 -11
- package/dist/types/elsie/src/components/Image/index.d.ts +0 -2
- package/dist/types/elsie/src/components/ImageSwatch/ImageSwatch.d.ts +0 -20
- package/dist/types/elsie/src/components/ImageSwatch/index.d.ts +0 -3
- package/dist/types/elsie/src/components/InLineAlert/InLineAlert.d.ts +0 -19
- package/dist/types/elsie/src/components/InLineAlert/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Incrementer/Incrementer.d.ts +0 -17
- package/dist/types/elsie/src/components/Incrementer/index.d.ts +0 -2
- package/dist/types/elsie/src/components/Input/Input.d.ts +0 -19
- package/dist/types/elsie/src/components/Input/index.d.ts +0 -3
- package/dist/types/elsie/src/components/InputDate/InputDate.d.ts +0 -11
- package/dist/types/elsie/src/components/InputDate/index.d.ts +0 -3
- package/dist/types/elsie/src/components/InputPassword/InputPassword.d.ts +0 -19
- package/dist/types/elsie/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.d.ts +0 -18
- package/dist/types/elsie/src/components/InputPassword/PasswordStatusIndicator/index.d.ts +0 -3
- package/dist/types/elsie/src/components/InputPassword/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Modal/Modal.d.ts +0 -15
- package/dist/types/elsie/src/components/Modal/index.d.ts +0 -2
- package/dist/types/elsie/src/components/Pagination/Pagination.d.ts +0 -15
- package/dist/types/elsie/src/components/Pagination/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Picker/Picker.d.ts +0 -28
- package/dist/types/elsie/src/components/Picker/index.d.ts +0 -2
- package/dist/types/elsie/src/components/Price/Price.d.ts +0 -17
- package/dist/types/elsie/src/components/Price/index.d.ts +0 -2
- package/dist/types/elsie/src/components/PriceRange/PriceRange.d.ts +0 -17
- package/dist/types/elsie/src/components/PriceRange/index.d.ts +0 -3
- package/dist/types/elsie/src/components/ProgressSpinner/ProgressSpinner.d.ts +0 -14
- package/dist/types/elsie/src/components/ProgressSpinner/index.d.ts +0 -3
- package/dist/types/elsie/src/components/RadioButton/RadioButton.d.ts +0 -16
- package/dist/types/elsie/src/components/RadioButton/index.d.ts +0 -3
- package/dist/types/elsie/src/components/Skeleton/Skeleton.d.ts +0 -17
- package/dist/types/elsie/src/components/Skeleton/index.d.ts +0 -2
- package/dist/types/elsie/src/components/Tag/Tag.d.ts +0 -9
- package/dist/types/elsie/src/components/Tag/index.d.ts +0 -3
- package/dist/types/elsie/src/components/TextArea/TextArea.d.ts +0 -11
- package/dist/types/elsie/src/components/TextArea/index.d.ts +0 -3
- package/dist/types/elsie/src/components/TextSwatch/TextSwatch.d.ts +0 -18
- package/dist/types/elsie/src/components/TextSwatch/index.d.ts +0 -3
- package/dist/types/elsie/src/components/ToggleButton/ToggleButton.d.ts +0 -14
- package/dist/types/elsie/src/components/ToggleButton/index.d.ts +0 -3
- package/dist/types/elsie/src/components/UIProvider/UIProvider.d.ts +0 -19
- package/dist/types/elsie/src/components/UIProvider/index.d.ts +0 -2
- package/dist/types/elsie/src/components/index.d.ts +0 -41
- package/dist/types/elsie/src/i18n/en_US.json.d.ts +0 -149
- package/dist/types/elsie/src/i18n/index.d.ts +0 -443
- package/dist/types/elsie/src/icons/index.d.ts +0 -43
- package/dist/types/elsie/src/lib/classes.d.ts +0 -6
- package/dist/types/elsie/src/lib/config.d.ts +0 -7
- package/dist/types/elsie/src/lib/debounce.d.ts +0 -2
- package/dist/types/elsie/src/lib/deepmerge.d.ts +0 -5
- package/dist/types/elsie/src/lib/deviceUtils.d.ts +0 -2
- package/dist/types/elsie/src/lib/form-values.d.ts +0 -5
- package/dist/types/elsie/src/lib/i18n.d.ts +0 -8
- package/dist/types/elsie/src/lib/image-params-keymap.d.ts +0 -4
- package/dist/types/elsie/src/lib/index.d.ts +0 -16
- package/dist/types/elsie/src/lib/initializer.d.ts +0 -81
- package/dist/types/elsie/src/lib/is-number.d.ts +0 -2
- package/dist/types/elsie/src/lib/render.d.ts +0 -42
- package/dist/types/elsie/src/lib/resolve-image.d.ts +0 -10
- package/dist/types/elsie/src/lib/signals.d.ts +0 -2
- package/dist/types/elsie/src/lib/slot.d.ts +0 -45
- package/dist/types/elsie/src/lib/tests.d.ts +0 -5
- package/dist/types/elsie/src/lib/types.d.ts +0 -10
- package/dist/types/elsie/src/lib/vcomponent.d.ts +0 -9
- package/dist/types/event-bus/src/events-catalog.d.ts +0 -16
- package/dist/types/event-bus/src/index.d.ts +0 -53
- package/dist/types/fetch-graphql/src/index.d.ts +0 -105
- package/dist/types/recaptcha/src/configs/index.d.ts +0 -4
- package/dist/types/recaptcha/src/configs/message.config.d.ts +0 -8
- package/dist/types/recaptcha/src/configs/recaptchaBadgeSelector.config.d.ts +0 -2
- package/dist/types/recaptcha/src/configs/typeForms.config.d.ts +0 -2
- package/dist/types/recaptcha/src/graphql/recaptchaConfig.graphql.d.ts +0 -2
- package/dist/types/recaptcha/src/index.d.ts +0 -42
- package/dist/types/recaptcha/src/lib/_checkRecaptchaBadge.d.ts +0 -2
- package/dist/types/recaptcha/src/lib/_convertKeysToCamelCase.d.ts +0 -6
- package/dist/types/recaptcha/src/lib/_extendConfig.d.ts +0 -4
- package/dist/types/recaptcha/src/lib/_storageConfig.d.ts +0 -6
- package/dist/types/recaptcha/src/lib/index.d.ts +0 -5
- package/dist/types/recaptcha/src/services/recaptcha.service.d.ts +0 -6
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from './form-values';
|
|
2
|
-
export * from './classes';
|
|
3
|
-
export * from './deepmerge';
|
|
4
|
-
export * from './debounce';
|
|
5
|
-
export * from './resolve-image';
|
|
6
|
-
export * from './render';
|
|
7
|
-
export * from './i18n';
|
|
8
|
-
export * from './initializer';
|
|
9
|
-
export * from './config';
|
|
10
|
-
export * from './types';
|
|
11
|
-
export * from './slot';
|
|
12
|
-
export * from './vcomponent';
|
|
13
|
-
export * from './image-params-keymap';
|
|
14
|
-
export * from './is-number';
|
|
15
|
-
export * from './deviceUtils';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { Config } from '.';
|
|
2
|
-
|
|
3
|
-
type Listener = {
|
|
4
|
-
off(): void;
|
|
5
|
-
};
|
|
6
|
-
type Listeners<T> = (config?: T) => Array<Listener | undefined>;
|
|
7
|
-
type Init<T> = (config?: T) => Promise<void>;
|
|
8
|
-
type Options<T> = {
|
|
9
|
-
init: Init<T>;
|
|
10
|
-
listeners: Listeners<T>;
|
|
11
|
-
};
|
|
12
|
-
export type Model<T = any, D = any> = {
|
|
13
|
-
transformer?: (data: D) => T & {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* The `Initializer` class is responsible for setting up event listeners and initializing a module with the given configuration.
|
|
19
|
-
*
|
|
20
|
-
* @template T - The type of the configuration object.
|
|
21
|
-
* @class
|
|
22
|
-
*/
|
|
23
|
-
export declare class Initializer<T> {
|
|
24
|
-
private _listeners;
|
|
25
|
-
listeners: Listeners<T>;
|
|
26
|
-
init: Init<T>;
|
|
27
|
-
config: Config<T>;
|
|
28
|
-
/**
|
|
29
|
-
* Creates an instance of Initializer.
|
|
30
|
-
* @param options - The initialization options.
|
|
31
|
-
* @param options.init - A function that initializes the module.
|
|
32
|
-
* @param options.listeners - A function that sets up event listeners.
|
|
33
|
-
*/
|
|
34
|
-
constructor({ init, listeners }: Options<T>);
|
|
35
|
-
}
|
|
36
|
-
type Initializers = [Initializer<any>, {
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
} | undefined][];
|
|
39
|
-
/**
|
|
40
|
-
* The Initializers class provides methods to register, mount, and configure initializers.
|
|
41
|
-
*
|
|
42
|
-
* @class
|
|
43
|
-
*
|
|
44
|
-
* @method register - Registers a new initializer. If the initializers have already been mounted, it immediately binds the event listeners and initializes the API for the new initializer.
|
|
45
|
-
* @method mount - Mounts all registered initializers. This involves binding the event listeners and initializing the APIs for each initializer, in that order.
|
|
46
|
-
* @method setImageParamKeys - Sets the image parameter keys. These keys are used when initializing the APIs for the initializers.
|
|
47
|
-
*/
|
|
48
|
-
export declare class initializers {
|
|
49
|
-
static _initializers: Initializers;
|
|
50
|
-
static _mounted: boolean;
|
|
51
|
-
static _imageParamsKeyMap: {
|
|
52
|
-
[key: string]: string;
|
|
53
|
-
} | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* Registers a new initializer. If the initializers have already been mounted,it immediately binds the event listeners and initializes the API for the new initializer.
|
|
56
|
-
* @param initializer - The initializer to register.
|
|
57
|
-
* @param options - Optional configuration for the initializer.
|
|
58
|
-
*/
|
|
59
|
-
static register(initializer: Initializer<any>, options?: {
|
|
60
|
-
[key: string]: any;
|
|
61
|
-
}): void;
|
|
62
|
-
/**
|
|
63
|
-
* Mounts the provided initializer immediately. This involves binding the event listeners and initializing the API for the initializer.
|
|
64
|
-
*/
|
|
65
|
-
static mountImmediately(initializer: Initializer<any>, options?: {
|
|
66
|
-
[key: string]: any;
|
|
67
|
-
}): Promise<void>;
|
|
68
|
-
/**
|
|
69
|
-
* Mounts all registered initializers. This involves binding the event listeners and initializing the APIs for each initializer, in that order.
|
|
70
|
-
*/
|
|
71
|
-
static mount(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Sets the image parameter keys. These keys are used when initializing the APIs for the initializers.
|
|
74
|
-
* @param params - The image parameter keys.
|
|
75
|
-
*/
|
|
76
|
-
static setImageParamKeys(params: {
|
|
77
|
-
[key: string]: any;
|
|
78
|
-
}): void;
|
|
79
|
-
}
|
|
80
|
-
export {};
|
|
81
|
-
//# sourceMappingURL=initializer.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { VNode } from 'preact';
|
|
2
|
-
import { Container } from '.';
|
|
3
|
-
import { Signal } from './signals';
|
|
4
|
-
|
|
5
|
-
export declare const SlotQueueContext: import('preact').Context<Signal<Set<string>> | null>;
|
|
6
|
-
type RenderAPI = {
|
|
7
|
-
remove: () => void;
|
|
8
|
-
setProps: (cb: (prev: any) => any) => void;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* The `Render` class provides methods to render and unmount components, as well as to render components to a string.
|
|
12
|
-
* @class
|
|
13
|
-
*
|
|
14
|
-
* @property {Function} render - Renders a component to a root element.
|
|
15
|
-
* @property {Function} toString - Renders a component to a string.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Render {
|
|
18
|
-
private _provider;
|
|
19
|
-
constructor(provider: VNode<any>);
|
|
20
|
-
/**
|
|
21
|
-
* Renders a container to a root element.
|
|
22
|
-
* @param Container - The container to render.
|
|
23
|
-
* @param props - The container parameters.
|
|
24
|
-
* @returns A function to render the component to a root element.
|
|
25
|
-
*/
|
|
26
|
-
render<T>(Component: Container<T>, props: T): (rootElement: HTMLElement) => Promise<RenderAPI>;
|
|
27
|
-
/**
|
|
28
|
-
* UnRenders a component from a root element.
|
|
29
|
-
* @param rootElement - The root element to unmount the component from.
|
|
30
|
-
* @deprecated Use `remove` method from the returned object of the `mount` method instead.
|
|
31
|
-
*/
|
|
32
|
-
unmount(rootElement: HTMLElement): void;
|
|
33
|
-
/**
|
|
34
|
-
* Renders a component to a string.
|
|
35
|
-
* @param Component - The component to render.
|
|
36
|
-
* @param props - The component props.
|
|
37
|
-
* @param options - Optional rendering options.
|
|
38
|
-
*/
|
|
39
|
-
toString<T>(Component: Container<T>, props: T, options?: T): Promise<string>;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface ResolveImageUrlOptions {
|
|
2
|
-
width: number;
|
|
3
|
-
height?: number;
|
|
4
|
-
auto?: string;
|
|
5
|
-
quality?: number;
|
|
6
|
-
crop?: boolean;
|
|
7
|
-
fit?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const generateSrcset: (imageURL: string, options: ResolveImageUrlOptions) => string | undefined;
|
|
10
|
-
//# sourceMappingURL=resolve-image.d.ts.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ComponentChildren, RefObject, VNode } from 'preact';
|
|
2
|
-
import { StateUpdater } from 'preact/hooks';
|
|
3
|
-
import { Lang } from '../i18n';
|
|
4
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
5
|
-
|
|
6
|
-
type MutateElement = (elem: HTMLElement) => void;
|
|
7
|
-
interface State {
|
|
8
|
-
get: (key: string) => void;
|
|
9
|
-
set: (key: string, value: any) => void;
|
|
10
|
-
}
|
|
11
|
-
interface SlotElement {
|
|
12
|
-
appendChild: MutateElement;
|
|
13
|
-
prependChild: MutateElement;
|
|
14
|
-
appendSibling: MutateElement;
|
|
15
|
-
prependSibling: MutateElement;
|
|
16
|
-
}
|
|
17
|
-
interface PrivateContext<T> {
|
|
18
|
-
_setProps: (s: StateUpdater<{}>) => void;
|
|
19
|
-
_registerMethod: (cb: (next: T & DefaultSlotContext<T>, state: State) => void) => void;
|
|
20
|
-
_htmlElementToVNode: (element: HTMLElement) => VNode;
|
|
21
|
-
}
|
|
22
|
-
interface DefaultSlotContext<T> extends PrivateContext<T> {
|
|
23
|
-
dictionary: Lang;
|
|
24
|
-
getSlotElement: (key: string) => SlotElement;
|
|
25
|
-
replaceWith: MutateElement;
|
|
26
|
-
appendChild: MutateElement;
|
|
27
|
-
prependChild: MutateElement;
|
|
28
|
-
appendSibling: MutateElement;
|
|
29
|
-
prependSibling: MutateElement;
|
|
30
|
-
onRender: (cb: (next: T & DefaultSlotContext<T>) => void) => void;
|
|
31
|
-
onChange: (cb: (next: T & DefaultSlotContext<T>) => void) => void;
|
|
32
|
-
}
|
|
33
|
-
type Context<T> = T & ThisType<DefaultSlotContext<T>>;
|
|
34
|
-
export type SlotProps<T = any> = (ctx: T & DefaultSlotContext<T>, element: HTMLDivElement | null) => Promise<void> | void;
|
|
35
|
-
export type SlotMethod<P = any> = (callback: (next: unknown, state: State) => P) => void;
|
|
36
|
-
export declare function useSlot<K, V extends HTMLDivElement>(name: string, context?: Context<K>, callback?: SlotProps<K>, children?: ComponentChildren, render?: Function): [RefObject<V>, Record<string, any>];
|
|
37
|
-
interface SlotPropsComponent<T> extends Omit<HTMLAttributes<HTMLDivElement>, 'slot'> {
|
|
38
|
-
name: string;
|
|
39
|
-
slot?: SlotProps<T>;
|
|
40
|
-
context?: Context<T>;
|
|
41
|
-
render?: (props: Record<string, any>) => VNode | VNode[];
|
|
42
|
-
}
|
|
43
|
-
export declare function Slot<T>({ name, context, slot, children, render, ...props }: Readonly<SlotPropsComponent<T>>): import("preact").JSX.Element;
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { VNode, ComponentChildren } from 'preact';
|
|
2
|
-
|
|
3
|
-
export type VComponentProps = {
|
|
4
|
-
node: VNode | VNode[];
|
|
5
|
-
children?: ComponentChildren;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
export declare function VComponent({ node, ...props }: VComponentProps): import("preact").JSX.Element | null;
|
|
9
|
-
//# sourceMappingURL=vcomponent.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface Events {
|
|
2
|
-
authenticated: boolean;
|
|
3
|
-
locale: string;
|
|
4
|
-
'cart/data': Cart | null;
|
|
5
|
-
}
|
|
6
|
-
export interface Cart {
|
|
7
|
-
id: string;
|
|
8
|
-
totalQuantity: number;
|
|
9
|
-
items: Array<{
|
|
10
|
-
uid: string;
|
|
11
|
-
quantity: number;
|
|
12
|
-
sku: string;
|
|
13
|
-
name: string;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=events-catalog.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Events } from './events-catalog';
|
|
2
|
-
|
|
3
|
-
export * from './events-catalog';
|
|
4
|
-
/**
|
|
5
|
-
* The `events` class provides static methods for event handling.
|
|
6
|
-
* It allows subscribing to events, emitting events, and enabling or disabling event logging.
|
|
7
|
-
*
|
|
8
|
-
* @class
|
|
9
|
-
* @extends {Events}
|
|
10
|
-
*
|
|
11
|
-
* @property {Function} on - Subscribes to an event.
|
|
12
|
-
* @property {Function} emit - Emits an event.
|
|
13
|
-
* @property {Function} enableLogger - Enables or disables event logging.
|
|
14
|
-
* @property {Function} lastPayload - Returns the last payload of the event.
|
|
15
|
-
*/
|
|
16
|
-
export declare class events {
|
|
17
|
-
static _identifier: string;
|
|
18
|
-
static _logger: BroadcastChannel | null;
|
|
19
|
-
static _lastEvent: {
|
|
20
|
-
[key: string]: {
|
|
21
|
-
payload: any;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Returns the last payload of the event.
|
|
26
|
-
* @param event – The event to get the last payload from.
|
|
27
|
-
* @returns – The last payload of the event.
|
|
28
|
-
*/
|
|
29
|
-
static lastPayload(event: string): any;
|
|
30
|
-
/**
|
|
31
|
-
* Subscribes to an event.
|
|
32
|
-
* @param event - The event to subscribe to.
|
|
33
|
-
* @param handler - The event handler.
|
|
34
|
-
* @param options - Optional configuration for the event handler.
|
|
35
|
-
*/
|
|
36
|
-
static on<K extends keyof Events>(event: K, handler: (payload: Events[K]) => void, options?: {
|
|
37
|
-
eager?: boolean;
|
|
38
|
-
}): {
|
|
39
|
-
off(): void;
|
|
40
|
-
} | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Emits an event.
|
|
43
|
-
* @param event - The event to emit.
|
|
44
|
-
* @param payload - The event payload.
|
|
45
|
-
*/
|
|
46
|
-
static emit<K extends keyof Events>(event: K, payload: Events[K]): void;
|
|
47
|
-
/**
|
|
48
|
-
* Enables or disables event logging.
|
|
49
|
-
* @param enabled - Whether to enable or disable event logging.
|
|
50
|
-
*/
|
|
51
|
-
static enableLogger(enabled: boolean): void;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
export type Header = {
|
|
2
|
-
[key: string]: string | null;
|
|
3
|
-
};
|
|
4
|
-
export type FetchOptions = {
|
|
5
|
-
method?: 'GET' | 'POST';
|
|
6
|
-
variables?: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
signal?: AbortSignal;
|
|
10
|
-
cache?: 'default' | 'no-store' | 'reload' | 'no-cache' | 'force-cache' | 'only-if-cached';
|
|
11
|
-
};
|
|
12
|
-
export type FetchQueryError = Array<{
|
|
13
|
-
message: string;
|
|
14
|
-
extensions: {
|
|
15
|
-
category: string;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
declare class FetchGraphQLMesh {
|
|
19
|
-
_endpoint?: string;
|
|
20
|
-
get endpoint(): string | undefined;
|
|
21
|
-
get fetchGraphQlHeaders(): Header | undefined;
|
|
22
|
-
_fetchGraphQlHeaders: Header | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the GraphQL endpoint.
|
|
25
|
-
* @param endpoint - The GraphQL endpoint.
|
|
26
|
-
*/
|
|
27
|
-
setEndpoint(endpoint: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Sets the GraphQL headers.
|
|
30
|
-
* @param key - The key of the header.
|
|
31
|
-
* @param value - The value of the header.
|
|
32
|
-
*/
|
|
33
|
-
setFetchGraphQlHeader(key: string, value: string | null): void;
|
|
34
|
-
/**
|
|
35
|
-
* Removes a specific GraphQL header.
|
|
36
|
-
* @param key - The key of the header.
|
|
37
|
-
*/
|
|
38
|
-
removeFetchGraphQlHeader(key: string): void;
|
|
39
|
-
/**
|
|
40
|
-
* Sets the GraphQL headers.
|
|
41
|
-
* @param header - The header object.
|
|
42
|
-
*/
|
|
43
|
-
setFetchGraphQlHeaders(header: Header): void;
|
|
44
|
-
/**
|
|
45
|
-
* Fetches GraphQL data.
|
|
46
|
-
* @param query - The GraphQL query.
|
|
47
|
-
* @param options - Optional configuration for the fetch request.
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
fetchGraphQl<T = any>(query: string, options?: FetchOptions): Promise<{
|
|
51
|
-
errors?: FetchQueryError;
|
|
52
|
-
data: T;
|
|
53
|
-
}>;
|
|
54
|
-
/**
|
|
55
|
-
* Gets the configuration.
|
|
56
|
-
*/
|
|
57
|
-
getConfig(): {
|
|
58
|
-
endpoint: string | undefined;
|
|
59
|
-
fetchGraphQlHeaders: Header | undefined;
|
|
60
|
-
};
|
|
61
|
-
getMethods(): {
|
|
62
|
-
setEndpoint: (endpoint: string) => void;
|
|
63
|
-
setFetchGraphQlHeader: (key: string, value: string | null) => void;
|
|
64
|
-
removeFetchGraphQlHeader: (key: string) => void;
|
|
65
|
-
setFetchGraphQlHeaders: (header: Header) => void;
|
|
66
|
-
fetchGraphQl: <T = any>(query: string, options?: FetchOptions | undefined) => Promise<{
|
|
67
|
-
errors?: FetchQueryError | undefined;
|
|
68
|
-
data: T;
|
|
69
|
-
}>;
|
|
70
|
-
getConfig: () => {
|
|
71
|
-
endpoint: string | undefined;
|
|
72
|
-
fetchGraphQlHeaders: Header | undefined;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* `FetchGraphQL` is a class that extends `FetchGraphQLMesh`.
|
|
78
|
-
* It provides methods to get the GraphQL endpoint and headers.
|
|
79
|
-
*
|
|
80
|
-
* @class
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
export declare class FetchGraphQL extends FetchGraphQLMesh {
|
|
84
|
-
get endpoint(): string | undefined;
|
|
85
|
-
get fetchGraphQlHeaders(): Header;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Exports several methods from the `mesh` object.
|
|
89
|
-
*
|
|
90
|
-
* @property {Function} setEndpoint - Sets the GraphQL endpoint.
|
|
91
|
-
* @property {Function} setFetchGraphQlHeaders - Sets the GraphQL headers.
|
|
92
|
-
* @property {Function} setFetchGraphQlHeader - Sets a specific GraphQL header.
|
|
93
|
-
* @property {Function} removeFetchGraphQlHeader - Removes a specific GraphQL header.
|
|
94
|
-
* @property {Function} fetchGraphQl - Fetches GraphQL data.
|
|
95
|
-
* @property {Function} getConfig - Gets the configuration.
|
|
96
|
-
*/
|
|
97
|
-
export declare const setEndpoint: (endpoint: string) => void, setFetchGraphQlHeaders: (header: Header) => void, setFetchGraphQlHeader: (key: string, value: string | null) => void, removeFetchGraphQlHeader: (key: string) => void, fetchGraphQl: <T = any>(query: string, options?: FetchOptions) => Promise<{
|
|
98
|
-
errors?: FetchQueryError | undefined;
|
|
99
|
-
data: T;
|
|
100
|
-
}>, getConfig: () => {
|
|
101
|
-
endpoint: string | undefined;
|
|
102
|
-
fetchGraphQlHeaders: Header | undefined;
|
|
103
|
-
};
|
|
104
|
-
export {};
|
|
105
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ReCaptchaV3Response, PropsFormTypes, ReCaptchaV3Model } from './types/recaptcha.types';
|
|
2
|
-
|
|
3
|
-
export declare const recaptchaFetchApi: {
|
|
4
|
-
setEndpoint: (endpoint: string) => void;
|
|
5
|
-
setFetchGraphQlHeader: (key: string, value: string | null) => void;
|
|
6
|
-
removeFetchGraphQlHeader: (key: string) => void;
|
|
7
|
-
setFetchGraphQlHeaders: (header: import('@adobe-commerce/fetch-graphql').Header) => void;
|
|
8
|
-
fetchGraphQl: <T = any>(query: string, options?: import('@adobe-commerce/fetch-graphql').FetchOptions | undefined) => Promise<{
|
|
9
|
-
errors?: import('@adobe-commerce/fetch-graphql').FetchQueryError | undefined;
|
|
10
|
-
data: T;
|
|
11
|
-
}>;
|
|
12
|
-
getConfig: () => {
|
|
13
|
-
endpoint: string | undefined;
|
|
14
|
-
fetchGraphQlHeaders: import('@adobe-commerce/fetch-graphql').Header | undefined;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare class RecaptchaModule {
|
|
18
|
-
_enableReCAPTCHA: boolean;
|
|
19
|
-
_recaptchaBackendEndpoint: string;
|
|
20
|
-
_recaptchaScriptUrl: string;
|
|
21
|
-
_configStorageKey: string;
|
|
22
|
-
_logger: boolean;
|
|
23
|
-
_updateBadgePosition(badgeId: string, config: ReCaptchaV3Model): Promise<void | null>;
|
|
24
|
-
_addRecaptchaScript(): Promise<void>;
|
|
25
|
-
_fetchStoreConfig(): Promise<ReCaptchaV3Response | undefined>;
|
|
26
|
-
_loadConfig(): Promise<ReCaptchaV3Model | null>;
|
|
27
|
-
setEndpoint(url: string): void;
|
|
28
|
-
setConfig(configList: PropsFormTypes[]): Promise<void>;
|
|
29
|
-
initReCaptcha(lazyLoadTimeout?: number): Promise<void>;
|
|
30
|
-
verifyReCaptcha(): Promise<string | undefined>;
|
|
31
|
-
enableLogger(logger: boolean): void;
|
|
32
|
-
getMethods(): {
|
|
33
|
-
enableLogger: (logger: boolean) => void;
|
|
34
|
-
setEndpoint: (url: string) => void;
|
|
35
|
-
setConfig: (configList: PropsFormTypes[]) => Promise<void>;
|
|
36
|
-
initReCaptcha: (lazyLoadTimeout?: number) => Promise<void>;
|
|
37
|
-
verifyReCaptcha: () => Promise<string | undefined>;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
declare const initReCaptcha: (lazyLoadTimeout?: number) => Promise<void>, verifyReCaptcha: () => Promise<string | undefined>, setEndpoint: (url: string) => void, setConfig: (configList: PropsFormTypes[]) => Promise<void>, enableLogger: (logger: boolean) => void;
|
|
41
|
-
export { setEndpoint, setConfig, initReCaptcha, verifyReCaptcha, enableLogger };
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ReCaptchaV3Model } from '../types/recaptcha.types';
|
|
2
|
-
|
|
3
|
-
declare const getConfigStorage: (storageKey: string, retries?: number, delay?: number) => Promise<ReCaptchaV3Model | null>;
|
|
4
|
-
declare const setConfigStorage: (storageKey: string, config: ReCaptchaV3Model, logger: boolean) => null | undefined;
|
|
5
|
-
export { getConfigStorage, setConfigStorage };
|
|
6
|
-
//# sourceMappingURL=_storageConfig.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ReCaptchaV3Model } from '../types/recaptcha.types';
|
|
2
|
-
|
|
3
|
-
export declare const getRecaptchaToken: (websiteKey: string) => Promise<string>;
|
|
4
|
-
export declare const waitForReCaptcha: () => Promise<unknown>;
|
|
5
|
-
export declare const verifyReCaptchaLoad: (badgeId: string, config: ReCaptchaV3Model, logger: boolean) => Promise<void>;
|
|
6
|
-
//# sourceMappingURL=recaptcha.service.d.ts.map
|