@rxdrag/website-lib-react 0.0.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.
- package/dist/components/Analytics/eventHandlers.d.ts +8 -0
- package/dist/components/Analytics/index.d.ts +3 -0
- package/dist/components/Analytics/singleton.d.ts +18 -0
- package/dist/components/Analytics/tracking.d.ts +11 -0
- package/dist/components/Analytics/types.d.ts +54 -0
- package/dist/components/Analytics/utils.d.ts +10 -0
- package/dist/components/AttachmentIcon/index.d.ts +5 -0
- package/dist/components/BackgroundHlsVideoPlayer.d.ts +3 -0
- package/dist/components/BackgroundVideoPlayer.d.ts +3 -0
- package/dist/components/Bulletin.d.ts +3 -0
- package/dist/components/ContactForm/ContactForm.d.ts +3 -0
- package/dist/components/ContactForm/FileUpload2.d.ts +24 -0
- package/dist/components/ContactForm/Input.d.ts +14 -0
- package/dist/components/ContactForm/Input2.d.ts +6 -0
- package/dist/components/ContactForm/Submit.d.ts +11 -0
- package/dist/components/ContactForm/TelInput.d.ts +14 -0
- package/dist/components/ContactForm/TelInput2.d.ts +15 -0
- package/dist/components/ContactForm/Textarea.d.ts +14 -0
- package/dist/components/ContactForm/Textarea2.d.ts +6 -0
- package/dist/components/ContactForm/countryDialCodes.d.ts +7 -0
- package/dist/components/ContactForm/factory.d.ts +28 -0
- package/dist/components/ContactForm/funcs.d.ts +14 -0
- package/dist/components/ContactForm/hooks/useInlineLabelPadding.d.ts +9 -0
- package/dist/components/ContactForm/hooks/useTelControl.d.ts +18 -0
- package/dist/components/ContactForm/index.d.ts +7 -0
- package/dist/components/ContactForm/types.d.ts +58 -0
- package/dist/components/Icon/index.d.ts +6 -0
- package/dist/components/Medias/MainMedia.d.ts +17 -0
- package/dist/components/Medias/Thumbnail.d.ts +12 -0
- package/dist/components/Medias/VideoPlayer.d.ts +7 -0
- package/dist/components/Medias/index.d.ts +23 -0
- package/dist/components/ProductCard/ProductCard.d.ts +17 -0
- package/dist/components/ProductCard/ProductCta/index.d.ts +8 -0
- package/dist/components/ProductCard/ProductDescription/index.d.ts +3 -0
- package/dist/components/ProductCard/ProductMedia/index.d.ts +8 -0
- package/dist/components/ProductCard/ProductTitle/index.d.ts +3 -0
- package/dist/components/ProductCard/ProductView.d.ts +7 -0
- package/dist/components/ProductCard/index.d.ts +5 -0
- package/dist/components/ProductCard/useQueryProduct.d.ts +3 -0
- package/dist/components/ReactModalTrigger.d.ts +8 -0
- package/dist/components/ReactVideoPlayer.d.ts +30 -0
- package/dist/components/RichTextOutline/index.d.ts +8 -0
- package/dist/components/RichTextOutline/useAcitviedHeading.d.ts +1 -0
- package/dist/components/RichTextOutline/useAnchorScroll.d.ts +2 -0
- package/dist/components/Scroller.d.ts +5 -0
- package/dist/components/SearchInput.d.ts +2 -0
- package/dist/components/Share/index.d.ts +10 -0
- package/dist/components/Share/socials.d.ts +12 -0
- package/dist/components/ToTop.d.ts +6 -0
- package/dist/components/VideoPlayIcon.d.ts +8 -0
- package/dist/components/all.d.ts +40 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +3954 -0
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +17 -0
- package/dist/types/view-model.d.ts +35 -0
- package/package.json +40 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnalyticsState, PageData } from './types';
|
|
2
|
+
|
|
3
|
+
export declare function createPageLeaveHandler(state: AnalyticsState, pageData: PageData, apiEndpoint: string, debugLog: (...args: unknown[]) => void): (eventSource?: string) => void;
|
|
4
|
+
export declare function createAstroBeforeSwapHandler(handlePageLeave: (eventSource?: string) => void): () => void;
|
|
5
|
+
export declare function createAstroAfterSwapHandler(state: AnalyticsState, pageData: PageData, apiEndpoint: string, debugLog: (...args: unknown[]) => void): () => void;
|
|
6
|
+
export declare function createInitialLoadHandler(state: AnalyticsState, pageData: PageData, apiEndpoint: string, debugLog: (...args: unknown[]) => void): (eventType: string) => void;
|
|
7
|
+
export declare function createVisibilityChangeHandler(state: AnalyticsState): () => void;
|
|
8
|
+
export declare function createUserInteractionHandler(state: AnalyticsState): () => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare class AnalyticsSingleton {
|
|
2
|
+
private static instance;
|
|
3
|
+
private initialized;
|
|
4
|
+
private state;
|
|
5
|
+
private pageData;
|
|
6
|
+
private apiEndpoint;
|
|
7
|
+
private debugLog;
|
|
8
|
+
private eventHandlers;
|
|
9
|
+
private constructor();
|
|
10
|
+
static getInstance(apiEndpoint?: string): AnalyticsSingleton;
|
|
11
|
+
static reset(): void;
|
|
12
|
+
init(): void;
|
|
13
|
+
private setupEventListeners;
|
|
14
|
+
private handleInitialPageLoad;
|
|
15
|
+
private trackPageVisit;
|
|
16
|
+
cleanup(): void;
|
|
17
|
+
}
|
|
18
|
+
export default AnalyticsSingleton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AnalyticsState, PageData, TrackingData } from './types';
|
|
2
|
+
|
|
3
|
+
export declare function updateActiveTime(state: AnalyticsState): void;
|
|
4
|
+
export declare function resetPageTracking(state: AnalyticsState, pageData: PageData): void;
|
|
5
|
+
export declare function isRealPageVisit(state: AnalyticsState): boolean;
|
|
6
|
+
export declare function processQueue(state: AnalyticsState, apiEndpoint: string): void;
|
|
7
|
+
export declare function sendImmediately(data: TrackingData, eventType: string, state: AnalyticsState, apiEndpoint: string): void;
|
|
8
|
+
export declare function sendTrackingData(data: TrackingData, eventType: string, state: AnalyticsState, apiEndpoint: string): void;
|
|
9
|
+
export declare function createTrackingData(pageData: PageData, state: AnalyticsState, eventType: string, effectiveDuration: number): TrackingData;
|
|
10
|
+
export declare function trackPageEvent(eventType: string, pageData: PageData, state: AnalyticsState, apiEndpoint: string, debugLog: (...args: any[]) => void): void;
|
|
11
|
+
export declare function trackPageVisit(pageData: PageData, state: AnalyticsState, apiEndpoint: string, debugLog: (...args: any[]) => void): void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface AnalyticsProps {
|
|
2
|
+
apiEndpoint?: string;
|
|
3
|
+
}
|
|
4
|
+
export interface PageData {
|
|
5
|
+
visitor_id: string;
|
|
6
|
+
session_id: string;
|
|
7
|
+
url: string;
|
|
8
|
+
path: string;
|
|
9
|
+
referrer: string | null;
|
|
10
|
+
user_agent: string;
|
|
11
|
+
start_time: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TrackingData {
|
|
14
|
+
visitor_id: string;
|
|
15
|
+
session_id: string;
|
|
16
|
+
url: string;
|
|
17
|
+
path: string;
|
|
18
|
+
referrer: string | null;
|
|
19
|
+
user_agent: string;
|
|
20
|
+
duration_ms: number;
|
|
21
|
+
timestamp: number;
|
|
22
|
+
type: string;
|
|
23
|
+
device: string;
|
|
24
|
+
platform: string;
|
|
25
|
+
browser_language: string;
|
|
26
|
+
page_title: string | null;
|
|
27
|
+
screen_width: number;
|
|
28
|
+
screen_height: number;
|
|
29
|
+
viewport_width: number;
|
|
30
|
+
viewport_height: number;
|
|
31
|
+
timezone: string;
|
|
32
|
+
is_new_user: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface RequestQueueItem {
|
|
35
|
+
data: TrackingData;
|
|
36
|
+
eventType: string;
|
|
37
|
+
}
|
|
38
|
+
export interface AnalyticsState {
|
|
39
|
+
isPageTracked: boolean;
|
|
40
|
+
currentPageUrl: string;
|
|
41
|
+
pageLoadTime: number;
|
|
42
|
+
lastTrackTime: number;
|
|
43
|
+
currentReferrer: string | null;
|
|
44
|
+
activeTime: number;
|
|
45
|
+
lastActiveTime: number;
|
|
46
|
+
isPageVisible: boolean;
|
|
47
|
+
requestQueue: RequestQueueItem[];
|
|
48
|
+
isRequestPending: boolean;
|
|
49
|
+
isAstroEnvironment: boolean;
|
|
50
|
+
pageLeaveTracked: boolean;
|
|
51
|
+
initialLoadHandled: boolean;
|
|
52
|
+
interactionThrottled: boolean;
|
|
53
|
+
lastInteractionTime: number;
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function isDevelopmentEnvironment(): boolean;
|
|
2
|
+
export declare function createDebugLogger(): (...args: unknown[]) => void;
|
|
3
|
+
export declare function generateId(prefix?: string): string;
|
|
4
|
+
export declare function setCookie(name: string, value: string, days: number): void;
|
|
5
|
+
export declare function getCookie(name: string): string | null;
|
|
6
|
+
export declare function getVisitorId(): string;
|
|
7
|
+
export declare function getDeviceInfo(): string;
|
|
8
|
+
export declare function getPlatform(): string;
|
|
9
|
+
export declare function getBrowserLanguage(): string;
|
|
10
|
+
export declare function detectPageType(defaultType?: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type UploadedFile = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
size: number;
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
export type FileUploadProps = {
|
|
8
|
+
label: string;
|
|
9
|
+
name: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
labelClassName?: string;
|
|
13
|
+
inputClassName?: string;
|
|
14
|
+
accept?: string;
|
|
15
|
+
onChange?: (fileInfo: UploadedFile | null) => void;
|
|
16
|
+
onUploadStateChange?: (isUploading: boolean) => void;
|
|
17
|
+
error?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
uploadingText?: string;
|
|
20
|
+
selectedText?: string;
|
|
21
|
+
formSalt?: string;
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const FileUpload2: import('react').ForwardRefExoticComponent<FileUploadProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldConfig } from './types';
|
|
2
|
+
|
|
3
|
+
export type InputProps = Omit<FieldConfig, "feildStyle"> & {
|
|
4
|
+
requiredClassName?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const Input: import('react').ForwardRefExoticComponent<Omit<FieldConfig, "feildStyle"> & {
|
|
10
|
+
requiredClassName?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
error?: string;
|
|
14
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Input2: import('react').ForwardRefExoticComponent<Omit<import('./types').FieldConfig, "feildStyle"> & {
|
|
2
|
+
requiredClassName?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
error?: string;
|
|
6
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type SubmitProps = {
|
|
2
|
+
needClasses?: string;
|
|
3
|
+
title: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
rawHtml?: string;
|
|
6
|
+
spinner?: React.ReactNode;
|
|
7
|
+
submitting?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const Submit: React.FC<SubmitProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CountryDial } from './countryDialCodes';
|
|
2
|
+
|
|
3
|
+
export interface TelInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
requiredClassName?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
inputClassName?: string;
|
|
11
|
+
countries?: CountryDial[];
|
|
12
|
+
}
|
|
13
|
+
export declare const TelInput: import('react').ForwardRefExoticComponent<TelInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
14
|
+
export default TelInput;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CountryDial } from './countryDialCodes';
|
|
2
|
+
|
|
3
|
+
export interface TelInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
4
|
+
label?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
requiredClassName?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
labelClassName?: string;
|
|
10
|
+
inputClassName?: string;
|
|
11
|
+
countries?: CountryDial[];
|
|
12
|
+
selectPlaceholder?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TelInput2: import('react').ForwardRefExoticComponent<TelInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
15
|
+
export default TelInput2;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldConfig } from './types';
|
|
2
|
+
|
|
3
|
+
export type TextareaProps = Omit<FieldConfig, "feildStyle"> & {
|
|
4
|
+
requiredClassName?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<FieldConfig, "feildStyle"> & {
|
|
10
|
+
requiredClassName?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
error?: string;
|
|
14
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Textarea2: import('react').ForwardRefExoticComponent<Omit<import('./types').FieldConfig, "feildStyle"> & {
|
|
2
|
+
requiredClassName?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
5
|
+
error?: string;
|
|
6
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FileUploadProps } from './FileUpload2';
|
|
2
|
+
import { FieldStyle } from './types';
|
|
3
|
+
|
|
4
|
+
export declare const getControl: (controlName?: string, fieldStyle?: FieldStyle) => import('react').ForwardRefExoticComponent<Omit<import('./types').FieldConfig, "feildStyle"> & {
|
|
5
|
+
requiredClassName?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
error?: string;
|
|
9
|
+
} & import('react').RefAttributes<HTMLInputElement>> | import('react').ForwardRefExoticComponent<Omit<import('./types').FieldConfig, "feildStyle"> & {
|
|
10
|
+
requiredClassName?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
error?: string;
|
|
14
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>> | import('react').ForwardRefExoticComponent<import('./TelInput2').TelInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
15
|
+
export declare const getInput: (fieldStyle?: FieldStyle) => import('react').ForwardRefExoticComponent<Omit<import('./types').FieldConfig, "feildStyle"> & {
|
|
16
|
+
requiredClassName?: string;
|
|
17
|
+
value?: string;
|
|
18
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
+
error?: string;
|
|
20
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
21
|
+
export declare const getTextarea: (fieldStyle?: FieldStyle) => import('react').ForwardRefExoticComponent<Omit<import('./types').FieldConfig, "feildStyle"> & {
|
|
22
|
+
requiredClassName?: string;
|
|
23
|
+
value?: string;
|
|
24
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
25
|
+
error?: string;
|
|
26
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
27
|
+
export declare const getTelInput: (fieldStyle?: FieldStyle) => import('react').ForwardRefExoticComponent<import('./TelInput2').TelInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
28
|
+
export declare const getFileUpload: (fieldStyle?: FieldStyle) => React.FC<FileUploadProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 简单的加密函数,用于生成防机器人的加密字段
|
|
3
|
+
* @param value 需要加密的值
|
|
4
|
+
* @returns 加密后的字符串
|
|
5
|
+
*/
|
|
6
|
+
export declare const encrypt: (value: string, formSalt: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* 验证加密字段是否有效
|
|
9
|
+
* @param encryptedValue 加密后的字符串
|
|
10
|
+
* @param originalValue 原始值(如蜜罐字段的值)
|
|
11
|
+
* @param maxAgeMinutes 最大有效时间(分钟)
|
|
12
|
+
* @returns 是否有效
|
|
13
|
+
*/
|
|
14
|
+
export declare const verifyEncryption: (formSalt: string, encryptedValue?: string, originalValue?: string, maxAgeMinutes?: number) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 计算内联标签布局所需的 paddingLeft(= label 宽度 + 额外间距)
|
|
3
|
+
* - 返回 labelRef 供 <label ref={labelRef} /> 绑定
|
|
4
|
+
* - 返回 paddingLeft 用于内层输入/容器 style
|
|
5
|
+
*/
|
|
6
|
+
export declare function useInlineLabelPadding(extraSpace?: number): {
|
|
7
|
+
readonly labelRef: import('react').RefObject<HTMLLabelElement | null>;
|
|
8
|
+
readonly paddingLeft: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CountryDial } from '../countryDialCodes';
|
|
2
|
+
|
|
3
|
+
export interface UseTelControlOptions {
|
|
4
|
+
countries?: CountryDial[];
|
|
5
|
+
name: string;
|
|
6
|
+
value?: string | number | readonly string[] | undefined;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useTelControl({ countries, name, value, onChange }: UseTelControlOptions): {
|
|
10
|
+
readonly allCountries: CountryDial[];
|
|
11
|
+
readonly selected: CountryDial | null;
|
|
12
|
+
readonly setSelected: import('react').Dispatch<import('react').SetStateAction<CountryDial | null>>;
|
|
13
|
+
readonly localNumber: string;
|
|
14
|
+
readonly setLocalNumber: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
15
|
+
readonly filtered: (query: string) => CountryDial[];
|
|
16
|
+
readonly onSelectCountry: (c: CountryDial) => void;
|
|
17
|
+
readonly onChangeLocal: (next: string) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { HTMLInputTypeAttribute } from 'react';
|
|
2
|
+
|
|
3
|
+
export type FieldStyle = "default" | "label-inline" | string;
|
|
4
|
+
export type FieldConfig = {
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
controlName?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
labelClassName?: string;
|
|
12
|
+
inputClassName?: string;
|
|
13
|
+
rows?: number;
|
|
14
|
+
type?: HTMLInputTypeAttribute;
|
|
15
|
+
autoFocus?: boolean;
|
|
16
|
+
feildStyle?: FieldStyle;
|
|
17
|
+
isExtends?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type SubmitConfig = {
|
|
20
|
+
containerClassName?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
rawHtml?: string;
|
|
24
|
+
needClasses?: string;
|
|
25
|
+
};
|
|
26
|
+
export type ContactFormProps = {
|
|
27
|
+
submit?: SubmitConfig;
|
|
28
|
+
actionUrl?: string;
|
|
29
|
+
formSalt: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
classNames?: {
|
|
32
|
+
inputContainer?: string;
|
|
33
|
+
input?: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
required?: string;
|
|
36
|
+
};
|
|
37
|
+
fields: FieldConfig[];
|
|
38
|
+
fromCta?: string;
|
|
39
|
+
};
|
|
40
|
+
export interface FileAttachment {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
size: number;
|
|
44
|
+
url: string;
|
|
45
|
+
}
|
|
46
|
+
export interface QuoteRequest {
|
|
47
|
+
name?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
company?: string;
|
|
50
|
+
message?: string;
|
|
51
|
+
fromCta?: string;
|
|
52
|
+
mobile?: string;
|
|
53
|
+
phone: string;
|
|
54
|
+
encryptedField?: string;
|
|
55
|
+
attachments?: FileAttachment[];
|
|
56
|
+
extents?: Record<string, unknown>;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconProps as IconifyIconProps, IconifyIcon as IconifyIconData } from '@iconify/react';
|
|
2
|
+
|
|
3
|
+
export type IconProps = Omit<IconifyIconProps, "icon"> & {
|
|
4
|
+
icon?: string | IconifyIconData;
|
|
5
|
+
};
|
|
6
|
+
export declare const Icon: import('react').ForwardRefExoticComponent<Omit<IconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TMedia } from '../../types/view-model';
|
|
2
|
+
|
|
3
|
+
export type MainMediaProps = {
|
|
4
|
+
value?: TMedia[];
|
|
5
|
+
selectedId?: string | null;
|
|
6
|
+
aspect?: string;
|
|
7
|
+
enableZoom?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
arrowButtonClass?: string;
|
|
10
|
+
arrowIconClass?: string;
|
|
11
|
+
playButtonClass?: string;
|
|
12
|
+
onPrevious: () => void;
|
|
13
|
+
onNext: () => void;
|
|
14
|
+
canPrevious: boolean;
|
|
15
|
+
canNext: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const MainMedia: ({ value, selectedId, aspect, enableZoom, className, arrowButtonClass, arrowIconClass, playButtonClass, onPrevious, onNext, canPrevious, canNext, }: MainMediaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TMedia } from '../../types/view-model';
|
|
2
|
+
|
|
3
|
+
export type ThumbnailProps = {
|
|
4
|
+
media: TMedia;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
aspect?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
imageClass?: string;
|
|
10
|
+
playButtonClass?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Thumbnail: ({ media, isSelected, onClick, aspect, className, imageClass, playButtonClass, }: ThumbnailProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TMedia } from '../../types/view-model';
|
|
2
|
+
|
|
3
|
+
export type MediasProps = {
|
|
4
|
+
value?: TMedia[];
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
aspect?: string;
|
|
8
|
+
thumbnailAspect?: string;
|
|
9
|
+
enableZoom?: boolean;
|
|
10
|
+
thumbnailPosition?: "bottom" | "left";
|
|
11
|
+
visibleCount?: number;
|
|
12
|
+
classNames?: {
|
|
13
|
+
mainArea?: string;
|
|
14
|
+
navigation?: string;
|
|
15
|
+
thumbnail?: string;
|
|
16
|
+
thumbnailImage?: string;
|
|
17
|
+
arrowButton?: string;
|
|
18
|
+
arrowIcon?: string;
|
|
19
|
+
playButton?: string;
|
|
20
|
+
navigationInner?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const Medias: import('react').ForwardRefExoticComponent<MediasProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TSlateResizable } from '@rxdrag/tiptap-preview';
|
|
3
|
+
import { Product } from '@rxdrag/rxcms-models';
|
|
4
|
+
|
|
5
|
+
export type TSlateProduct = TSlateResizable & {
|
|
6
|
+
product?: Product;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
aspect?: string;
|
|
10
|
+
ctaTitle?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const PRODUCT_KEY = "Product";
|
|
13
|
+
export type ProductCardProps = {
|
|
14
|
+
node?: TSlateProduct;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
};
|
|
17
|
+
export declare const ProductCard: ({ node }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HtmlHTMLAttributes } from 'react';
|
|
2
|
+
import { TProduct } from '../../../types/view-model';
|
|
3
|
+
|
|
4
|
+
export declare function ProductMedia(props: {
|
|
5
|
+
product?: TProduct;
|
|
6
|
+
width?: number;
|
|
7
|
+
aspect?: string;
|
|
8
|
+
} & HtmlHTMLAttributes<HTMLImageElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Media } from '@rxdrag/rxcms-models';
|
|
3
|
+
|
|
4
|
+
export type ID = string | number;
|
|
5
|
+
export type VideoPlayerClassNames = {
|
|
6
|
+
container?: string;
|
|
7
|
+
aspect?: string;
|
|
8
|
+
video?: string;
|
|
9
|
+
playButton?: string;
|
|
10
|
+
playButtonOuter?: string;
|
|
11
|
+
playButtonInner?: string;
|
|
12
|
+
playIcon?: string;
|
|
13
|
+
loadingOverlay?: string;
|
|
14
|
+
loadingContent?: string;
|
|
15
|
+
overlay?: string;
|
|
16
|
+
overlayTitle?: string;
|
|
17
|
+
ctaButton?: string;
|
|
18
|
+
overlayReplayButton?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const ReactVideoPlayer: React.ForwardRefExoticComponent<{
|
|
21
|
+
endTitle?: string;
|
|
22
|
+
media?: Media;
|
|
23
|
+
posterUrl?: string;
|
|
24
|
+
eagerLoad?: boolean;
|
|
25
|
+
classNames?: VideoPlayerClassNames;
|
|
26
|
+
callToAction?: string;
|
|
27
|
+
onToggleSelect?: (id: ID) => void;
|
|
28
|
+
designMode?: boolean;
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type RichTextOutlineProps = {
|
|
2
|
+
className?: string;
|
|
3
|
+
itemClassName?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
yOffset?: number;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
export declare const RichTextOutline: import('react').ForwardRefExoticComponent<RichTextOutlineProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useAcitviedHeading(yOffset?: number): string | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ShareProps = {
|
|
2
|
+
socials?: string[];
|
|
3
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
className?: string;
|
|
5
|
+
classNames?: {
|
|
6
|
+
item?: string;
|
|
7
|
+
itemIcon?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const Share: import('react').ForwardRefExoticComponent<ShareProps & import('react').RefAttributes<HTMLDivElement>>;
|