@ctlyst.id/utils 3.0.0-beta.0 → 3.0.0-beta.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/chunk-2DTW2MMP.js +2 -0
- package/dist/chunk-2DTW2MMP.js.map +1 -0
- package/dist/chunk-2XNWBZU3.js +2 -0
- package/dist/chunk-2XNWBZU3.js.map +1 -0
- package/dist/chunk-3EZJIWT4.js +2 -0
- package/dist/chunk-3EZJIWT4.js.map +1 -0
- package/dist/chunk-55ZXUIJW.js +2 -0
- package/dist/chunk-55ZXUIJW.js.map +1 -0
- package/dist/chunk-AKPPANNV.mjs +2 -0
- package/dist/chunk-AKPPANNV.mjs.map +1 -0
- package/dist/chunk-BUGYRVTO.js +2 -0
- package/dist/chunk-BUGYRVTO.js.map +1 -0
- package/dist/chunk-CKFIKCHU.mjs +2 -0
- package/dist/chunk-CKFIKCHU.mjs.map +1 -0
- package/dist/chunk-CWURCKL2.js +2 -0
- package/dist/chunk-CWURCKL2.js.map +1 -0
- package/dist/chunk-ELX5IXB4.js +2 -0
- package/dist/chunk-ELX5IXB4.js.map +1 -0
- package/dist/chunk-FMUZKH36.mjs +2 -0
- package/dist/chunk-FMUZKH36.mjs.map +1 -0
- package/dist/chunk-HXT73NCV.mjs +2 -0
- package/dist/chunk-HXT73NCV.mjs.map +1 -0
- package/dist/chunk-IX7NK5RI.js +2 -0
- package/dist/chunk-IX7NK5RI.js.map +1 -0
- package/dist/chunk-J2L4VY5C.mjs +2 -0
- package/dist/chunk-J2L4VY5C.mjs.map +1 -0
- package/dist/chunk-KOCPH2DG.js +2 -0
- package/dist/chunk-KOCPH2DG.js.map +1 -0
- package/dist/chunk-M2YCT7CB.mjs +2 -0
- package/dist/chunk-M2YCT7CB.mjs.map +1 -0
- package/dist/chunk-N7Z7DA36.js +2 -0
- package/dist/chunk-N7Z7DA36.js.map +1 -0
- package/dist/chunk-P7FXF4IE.mjs +2 -0
- package/dist/chunk-P7FXF4IE.mjs.map +1 -0
- package/dist/chunk-Q2LVN3QY.js +2 -0
- package/dist/chunk-Q2LVN3QY.js.map +1 -0
- package/dist/chunk-QAXXZNJX.mjs +2 -0
- package/dist/chunk-QAXXZNJX.mjs.map +1 -0
- package/dist/chunk-RATGBP35.js +2 -0
- package/dist/chunk-RATGBP35.js.map +1 -0
- package/dist/chunk-T3V567AP.mjs +2 -0
- package/dist/chunk-T3V567AP.mjs.map +1 -0
- package/dist/chunk-THVM4Z3S.mjs +2 -0
- package/dist/chunk-THVM4Z3S.mjs.map +1 -0
- package/dist/chunk-X4C76ZKK.mjs +2 -0
- package/dist/chunk-X4C76ZKK.mjs.map +1 -0
- package/dist/chunk-Y5HNEW7L.js +2 -0
- package/dist/chunk-Y5HNEW7L.js.map +1 -0
- package/dist/chunk-Z6WQXCNF.mjs +2 -0
- package/dist/chunk-Z6WQXCNF.mjs.map +1 -0
- package/dist/chunk-ZFGFCYYK.mjs +2 -0
- package/dist/chunk-ZFGFCYYK.mjs.map +1 -0
- package/dist/dom.d.mts +9 -0
- package/dist/dom.d.ts +9 -0
- package/dist/dom.js +2 -0
- package/dist/dom.js.map +1 -0
- package/dist/dom.mjs +2 -0
- package/dist/dom.mjs.map +1 -0
- package/dist/hooks/index.d.mts +13 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +2 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/use-callback-ref.d.mts +5 -0
- package/dist/hooks/use-callback-ref.d.ts +5 -0
- package/dist/hooks/use-callback-ref.js +2 -0
- package/dist/hooks/use-callback-ref.js.map +1 -0
- package/dist/hooks/use-callback-ref.mjs +2 -0
- package/dist/hooks/use-callback-ref.mjs.map +1 -0
- package/dist/hooks/use-clipboard.d.mts +18 -0
- package/dist/hooks/use-clipboard.d.ts +18 -0
- package/dist/hooks/use-clipboard.js +2 -0
- package/dist/hooks/use-clipboard.js.map +1 -0
- package/dist/hooks/use-clipboard.mjs +2 -0
- package/dist/hooks/use-clipboard.mjs.map +1 -0
- package/dist/hooks/use-debounce.d.mts +7 -0
- package/dist/hooks/use-debounce.d.ts +7 -0
- package/dist/hooks/use-debounce.js +2 -0
- package/dist/hooks/use-debounce.js.map +1 -0
- package/dist/hooks/use-debounce.mjs +2 -0
- package/dist/hooks/use-debounce.mjs.map +1 -0
- package/dist/hooks/use-dimensions.d.mts +7 -0
- package/dist/hooks/use-dimensions.d.ts +7 -0
- package/dist/hooks/use-dimensions.js +2 -0
- package/dist/hooks/use-dimensions.js.map +1 -0
- package/dist/hooks/use-dimensions.mjs +2 -0
- package/dist/hooks/use-dimensions.mjs.map +1 -0
- package/dist/hooks/use-disclosure.d.mts +20 -0
- package/dist/hooks/use-disclosure.d.ts +20 -0
- package/dist/hooks/use-disclosure.js +2 -0
- package/dist/hooks/use-disclosure.js.map +1 -0
- package/dist/hooks/use-disclosure.mjs +2 -0
- package/dist/hooks/use-disclosure.mjs.map +1 -0
- package/dist/hooks/use-media-query.d.mts +7 -0
- package/dist/hooks/use-media-query.d.ts +7 -0
- package/dist/hooks/use-media-query.js +2 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-media-query.mjs +2 -0
- package/dist/hooks/use-media-query.mjs.map +1 -0
- package/dist/hooks/use-number-formatter.d.mts +10 -0
- package/dist/hooks/use-number-formatter.d.ts +10 -0
- package/dist/hooks/use-number-formatter.js +2 -0
- package/dist/hooks/use-number-formatter.js.map +1 -0
- package/dist/hooks/use-number-formatter.mjs +2 -0
- package/dist/hooks/use-number-formatter.mjs.map +1 -0
- package/dist/hooks/use-online-status.d.mts +6 -0
- package/dist/hooks/use-online-status.d.ts +6 -0
- package/dist/hooks/use-online-status.js +2 -0
- package/dist/hooks/use-online-status.js.map +1 -0
- package/dist/hooks/use-online-status.mjs +2 -0
- package/dist/hooks/use-online-status.mjs.map +1 -0
- package/dist/hooks/use-outside-click.d.mts +10 -0
- package/dist/hooks/use-outside-click.d.ts +10 -0
- package/dist/hooks/use-outside-click.js +2 -0
- package/dist/hooks/use-outside-click.js.map +1 -0
- package/dist/hooks/use-outside-click.mjs +2 -0
- package/dist/hooks/use-outside-click.mjs.map +1 -0
- package/dist/hooks/use-safe-layout-effect.d.mts +5 -0
- package/dist/hooks/use-safe-layout-effect.d.ts +5 -0
- package/dist/hooks/use-safe-layout-effect.js +2 -0
- package/dist/hooks/use-safe-layout-effect.js.map +1 -0
- package/dist/hooks/use-safe-layout-effect.mjs +2 -0
- package/dist/hooks/use-safe-layout-effect.mjs.map +1 -0
- package/dist/hooks/use-voucher-tnc.d.mts +60 -0
- package/dist/hooks/use-voucher-tnc.d.ts +60 -0
- package/dist/hooks/use-voucher-tnc.js +2 -0
- package/dist/hooks/use-voucher-tnc.js.map +1 -0
- package/dist/hooks/use-voucher-tnc.mjs +2 -0
- package/dist/hooks/use-voucher-tnc.mjs.map +1 -0
- package/dist/index.d.mts +14 -142
- package/dist/index.d.ts +14 -142
- package/dist/index.js +1 -685
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -631
- package/dist/index.mjs.map +1 -1
- package/package.json +145 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,142 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
format?: string;
|
|
16
|
-
}
|
|
17
|
-
interface UseClipboardProps {
|
|
18
|
-
value?: string;
|
|
19
|
-
optionsOrTimeout?: number | UseClipboardOptions;
|
|
20
|
-
}
|
|
21
|
-
declare const useClipboard: ({ value, optionsOrTimeout }?: UseClipboardProps) => {
|
|
22
|
-
value: string;
|
|
23
|
-
setValue: react.Dispatch<react.SetStateAction<string>>;
|
|
24
|
-
onCopy: () => void;
|
|
25
|
-
hasCopied: boolean;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
interface UseDebounceProps<T> {
|
|
29
|
-
value: T;
|
|
30
|
-
delay?: number;
|
|
31
|
-
}
|
|
32
|
-
declare const useDebounce: <T>({ value, delay }: UseDebounceProps<T>) => T;
|
|
33
|
-
|
|
34
|
-
type BoxModel = BoxModel$1;
|
|
35
|
-
declare const useDimensions: (ref: RefObject<HTMLElement>, observe?: boolean) => BoxModel$1 | null;
|
|
36
|
-
|
|
37
|
-
interface UseDisclosureProps {
|
|
38
|
-
isOpen?: boolean;
|
|
39
|
-
defaultIsOpen?: boolean;
|
|
40
|
-
onClose?(): void;
|
|
41
|
-
onOpen?(): void;
|
|
42
|
-
id?: string;
|
|
43
|
-
}
|
|
44
|
-
type HTMLProps = HTMLAttributes<HTMLElement>;
|
|
45
|
-
declare const useDisclosure: ({ onClose: onCloseProp, onOpen: onOpenProp, isOpen: isOpenProp, defaultIsOpen: defaultIsOpenProp, id: idProp, }?: UseDisclosureProps) => {
|
|
46
|
-
onClose: () => void;
|
|
47
|
-
onOpen: () => void;
|
|
48
|
-
onToggle: () => void;
|
|
49
|
-
getButtonProps: ({ onClick, ...rest }?: HTMLProps) => HTMLProps;
|
|
50
|
-
getDisclosureProps: ({ ...rest }?: HTMLProps) => HTMLProps;
|
|
51
|
-
isOpen: boolean;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
type UseMediaQueryOptions = {
|
|
55
|
-
fallback?: boolean | boolean[];
|
|
56
|
-
ssr?: boolean;
|
|
57
|
-
};
|
|
58
|
-
declare const useMediaQuery: (query: string | string[], options?: UseMediaQueryOptions) => boolean[];
|
|
59
|
-
|
|
60
|
-
interface NumberFormatterProps {
|
|
61
|
-
value: number;
|
|
62
|
-
thousandSeparator?: string;
|
|
63
|
-
decimalLength?: number;
|
|
64
|
-
decimalSeparator?: string;
|
|
65
|
-
prefix?: string;
|
|
66
|
-
}
|
|
67
|
-
declare const useNumberFormatter: ({ value, thousandSeparator, decimalLength, decimalSeparator, prefix, }: NumberFormatterProps) => string;
|
|
68
|
-
|
|
69
|
-
declare const useOnlineStatus: () => {
|
|
70
|
-
isOnline: boolean;
|
|
71
|
-
isOffline: boolean;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
interface UseOutsideClickProps {
|
|
75
|
-
enabled?: boolean;
|
|
76
|
-
ref: RefObject<HTMLElement>;
|
|
77
|
-
handler?: (e: Event) => void;
|
|
78
|
-
}
|
|
79
|
-
declare const useOutsideClick: ({ enabled, ref, handler }: UseOutsideClickProps) => void;
|
|
80
|
-
|
|
81
|
-
declare const useSafeLayoutEffect: typeof useEffect;
|
|
82
|
-
|
|
83
|
-
declare enum VoucherType {
|
|
84
|
-
product = "Product",
|
|
85
|
-
order = "Order",
|
|
86
|
-
gift = "Gift",
|
|
87
|
-
freeShipping = "Free Shipping",
|
|
88
|
-
freeInsurance = "Free Insurance",
|
|
89
|
-
bundling = "Bundling",
|
|
90
|
-
payment = "Payment",
|
|
91
|
-
affiliate = "Affiliate"
|
|
92
|
-
}
|
|
93
|
-
declare enum DiscountType {
|
|
94
|
-
percentage = "percentage",
|
|
95
|
-
amount = "amount"
|
|
96
|
-
}
|
|
97
|
-
type CollectionType = {
|
|
98
|
-
collectionId: number;
|
|
99
|
-
name: string;
|
|
100
|
-
};
|
|
101
|
-
type BrandType = {
|
|
102
|
-
brandId: number;
|
|
103
|
-
name: string;
|
|
104
|
-
};
|
|
105
|
-
type VoucherPaymentType = {
|
|
106
|
-
bankId: number;
|
|
107
|
-
bankName: string;
|
|
108
|
-
paymentMethod: string[];
|
|
109
|
-
bin: string[];
|
|
110
|
-
creditBinGroup: string[];
|
|
111
|
-
debitBinGroup: string[];
|
|
112
|
-
};
|
|
113
|
-
interface VoucherTncProps {
|
|
114
|
-
type: string;
|
|
115
|
-
discountType: string;
|
|
116
|
-
discountValue: number | string;
|
|
117
|
-
maxDiscountAmount: number | string;
|
|
118
|
-
collections: CollectionType[];
|
|
119
|
-
brands: BrandType[];
|
|
120
|
-
eligibilityType: string | null;
|
|
121
|
-
isCheckedMaxFee: boolean;
|
|
122
|
-
limitFee: number | string;
|
|
123
|
-
termsMinQty: number | string;
|
|
124
|
-
termsMinTotalAmount: number | string;
|
|
125
|
-
isOneTimeUsage: boolean;
|
|
126
|
-
quota: number;
|
|
127
|
-
transactionTerms: number;
|
|
128
|
-
dateStart: string;
|
|
129
|
-
dateEnd: string;
|
|
130
|
-
isOneTimeUsagePerCard: boolean;
|
|
131
|
-
payment: VoucherPaymentType | null;
|
|
132
|
-
isGiftCard?: boolean;
|
|
133
|
-
}
|
|
134
|
-
type GetPeriodProps = Pick<VoucherTncProps, 'dateStart' | 'dateEnd'>;
|
|
135
|
-
type GetAppliesToProps = Pick<VoucherTncProps, 'type' | 'brands' | 'collections' | 'eligibilityType' | 'payment'>;
|
|
136
|
-
type GetMethodTermsProps = Pick<VoucherTncProps, 'type' | 'discountType' | 'discountValue' | 'isCheckedMaxFee' | 'maxDiscountAmount' | 'transactionTerms' | 'termsMinTotalAmount' | 'termsMinQty' | 'limitFee'>;
|
|
137
|
-
type GetUsageLimitProps = Pick<VoucherTncProps, 'isOneTimeUsage' | 'isOneTimeUsagePerCard'>;
|
|
138
|
-
type GetBankBinProps = Pick<VoucherPaymentType, 'bankName' | 'creditBinGroup' | 'debitBinGroup'>;
|
|
139
|
-
|
|
140
|
-
declare const useVoucherTnc: (props: VoucherTncProps | null) => string[];
|
|
141
|
-
|
|
142
|
-
export { type BoxModel, DiscountType, type GetAppliesToProps, type GetBankBinProps, type GetMethodTermsProps, type GetPeriodProps, type GetUsageLimitProps, type NumberFormatterProps, type UseClipboardOptions, type UseClipboardProps, type UseDebounceProps, type UseDisclosureProps, type UseMediaQueryOptions, type UseOutsideClickProps, type VoucherPaymentType, type VoucherTncProps, VoucherType, canUseDOM, getOwnerDocument, isBrowser, isElement, isValidEvent, useCallbackRef, useClipboard, useDebounce, useDimensions, useDisclosure, useMediaQuery, useNumberFormatter, useOnlineStatus, useOutsideClick, useSafeLayoutEffect, useVoucherTnc };
|
|
1
|
+
export { canUseDOM, getOwnerDocument, isBrowser, isElement, isValidEvent } from './dom.mjs';
|
|
2
|
+
export { useCallbackRef } from './hooks/use-callback-ref.mjs';
|
|
3
|
+
export { UseClipboardOptions, UseClipboardProps, useClipboard } from './hooks/use-clipboard.mjs';
|
|
4
|
+
export { UseDebounceProps, useDebounce } from './hooks/use-debounce.mjs';
|
|
5
|
+
export { BoxModel, useDimensions } from './hooks/use-dimensions.mjs';
|
|
6
|
+
export { UseDisclosureProps, useDisclosure } from './hooks/use-disclosure.mjs';
|
|
7
|
+
export { UseMediaQueryOptions, useMediaQuery } from './hooks/use-media-query.mjs';
|
|
8
|
+
export { NumberFormatterProps, useNumberFormatter } from './hooks/use-number-formatter.mjs';
|
|
9
|
+
export { useOnlineStatus } from './hooks/use-online-status.mjs';
|
|
10
|
+
export { UseOutsideClickProps, useOutsideClick } from './hooks/use-outside-click.mjs';
|
|
11
|
+
export { useSafeLayoutEffect } from './hooks/use-safe-layout-effect.mjs';
|
|
12
|
+
export { DiscountType, GetAppliesToProps, GetBankBinProps, GetMethodTermsProps, GetPeriodProps, GetUsageLimitProps, VoucherPaymentType, VoucherTncProps, VoucherType, useVoucherTnc } from './hooks/use-voucher-tnc.mjs';
|
|
13
|
+
import 'react';
|
|
14
|
+
import 'css-box-model';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,142 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
format?: string;
|
|
16
|
-
}
|
|
17
|
-
interface UseClipboardProps {
|
|
18
|
-
value?: string;
|
|
19
|
-
optionsOrTimeout?: number | UseClipboardOptions;
|
|
20
|
-
}
|
|
21
|
-
declare const useClipboard: ({ value, optionsOrTimeout }?: UseClipboardProps) => {
|
|
22
|
-
value: string;
|
|
23
|
-
setValue: react.Dispatch<react.SetStateAction<string>>;
|
|
24
|
-
onCopy: () => void;
|
|
25
|
-
hasCopied: boolean;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
interface UseDebounceProps<T> {
|
|
29
|
-
value: T;
|
|
30
|
-
delay?: number;
|
|
31
|
-
}
|
|
32
|
-
declare const useDebounce: <T>({ value, delay }: UseDebounceProps<T>) => T;
|
|
33
|
-
|
|
34
|
-
type BoxModel = BoxModel$1;
|
|
35
|
-
declare const useDimensions: (ref: RefObject<HTMLElement>, observe?: boolean) => BoxModel$1 | null;
|
|
36
|
-
|
|
37
|
-
interface UseDisclosureProps {
|
|
38
|
-
isOpen?: boolean;
|
|
39
|
-
defaultIsOpen?: boolean;
|
|
40
|
-
onClose?(): void;
|
|
41
|
-
onOpen?(): void;
|
|
42
|
-
id?: string;
|
|
43
|
-
}
|
|
44
|
-
type HTMLProps = HTMLAttributes<HTMLElement>;
|
|
45
|
-
declare const useDisclosure: ({ onClose: onCloseProp, onOpen: onOpenProp, isOpen: isOpenProp, defaultIsOpen: defaultIsOpenProp, id: idProp, }?: UseDisclosureProps) => {
|
|
46
|
-
onClose: () => void;
|
|
47
|
-
onOpen: () => void;
|
|
48
|
-
onToggle: () => void;
|
|
49
|
-
getButtonProps: ({ onClick, ...rest }?: HTMLProps) => HTMLProps;
|
|
50
|
-
getDisclosureProps: ({ ...rest }?: HTMLProps) => HTMLProps;
|
|
51
|
-
isOpen: boolean;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
type UseMediaQueryOptions = {
|
|
55
|
-
fallback?: boolean | boolean[];
|
|
56
|
-
ssr?: boolean;
|
|
57
|
-
};
|
|
58
|
-
declare const useMediaQuery: (query: string | string[], options?: UseMediaQueryOptions) => boolean[];
|
|
59
|
-
|
|
60
|
-
interface NumberFormatterProps {
|
|
61
|
-
value: number;
|
|
62
|
-
thousandSeparator?: string;
|
|
63
|
-
decimalLength?: number;
|
|
64
|
-
decimalSeparator?: string;
|
|
65
|
-
prefix?: string;
|
|
66
|
-
}
|
|
67
|
-
declare const useNumberFormatter: ({ value, thousandSeparator, decimalLength, decimalSeparator, prefix, }: NumberFormatterProps) => string;
|
|
68
|
-
|
|
69
|
-
declare const useOnlineStatus: () => {
|
|
70
|
-
isOnline: boolean;
|
|
71
|
-
isOffline: boolean;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
interface UseOutsideClickProps {
|
|
75
|
-
enabled?: boolean;
|
|
76
|
-
ref: RefObject<HTMLElement>;
|
|
77
|
-
handler?: (e: Event) => void;
|
|
78
|
-
}
|
|
79
|
-
declare const useOutsideClick: ({ enabled, ref, handler }: UseOutsideClickProps) => void;
|
|
80
|
-
|
|
81
|
-
declare const useSafeLayoutEffect: typeof useEffect;
|
|
82
|
-
|
|
83
|
-
declare enum VoucherType {
|
|
84
|
-
product = "Product",
|
|
85
|
-
order = "Order",
|
|
86
|
-
gift = "Gift",
|
|
87
|
-
freeShipping = "Free Shipping",
|
|
88
|
-
freeInsurance = "Free Insurance",
|
|
89
|
-
bundling = "Bundling",
|
|
90
|
-
payment = "Payment",
|
|
91
|
-
affiliate = "Affiliate"
|
|
92
|
-
}
|
|
93
|
-
declare enum DiscountType {
|
|
94
|
-
percentage = "percentage",
|
|
95
|
-
amount = "amount"
|
|
96
|
-
}
|
|
97
|
-
type CollectionType = {
|
|
98
|
-
collectionId: number;
|
|
99
|
-
name: string;
|
|
100
|
-
};
|
|
101
|
-
type BrandType = {
|
|
102
|
-
brandId: number;
|
|
103
|
-
name: string;
|
|
104
|
-
};
|
|
105
|
-
type VoucherPaymentType = {
|
|
106
|
-
bankId: number;
|
|
107
|
-
bankName: string;
|
|
108
|
-
paymentMethod: string[];
|
|
109
|
-
bin: string[];
|
|
110
|
-
creditBinGroup: string[];
|
|
111
|
-
debitBinGroup: string[];
|
|
112
|
-
};
|
|
113
|
-
interface VoucherTncProps {
|
|
114
|
-
type: string;
|
|
115
|
-
discountType: string;
|
|
116
|
-
discountValue: number | string;
|
|
117
|
-
maxDiscountAmount: number | string;
|
|
118
|
-
collections: CollectionType[];
|
|
119
|
-
brands: BrandType[];
|
|
120
|
-
eligibilityType: string | null;
|
|
121
|
-
isCheckedMaxFee: boolean;
|
|
122
|
-
limitFee: number | string;
|
|
123
|
-
termsMinQty: number | string;
|
|
124
|
-
termsMinTotalAmount: number | string;
|
|
125
|
-
isOneTimeUsage: boolean;
|
|
126
|
-
quota: number;
|
|
127
|
-
transactionTerms: number;
|
|
128
|
-
dateStart: string;
|
|
129
|
-
dateEnd: string;
|
|
130
|
-
isOneTimeUsagePerCard: boolean;
|
|
131
|
-
payment: VoucherPaymentType | null;
|
|
132
|
-
isGiftCard?: boolean;
|
|
133
|
-
}
|
|
134
|
-
type GetPeriodProps = Pick<VoucherTncProps, 'dateStart' | 'dateEnd'>;
|
|
135
|
-
type GetAppliesToProps = Pick<VoucherTncProps, 'type' | 'brands' | 'collections' | 'eligibilityType' | 'payment'>;
|
|
136
|
-
type GetMethodTermsProps = Pick<VoucherTncProps, 'type' | 'discountType' | 'discountValue' | 'isCheckedMaxFee' | 'maxDiscountAmount' | 'transactionTerms' | 'termsMinTotalAmount' | 'termsMinQty' | 'limitFee'>;
|
|
137
|
-
type GetUsageLimitProps = Pick<VoucherTncProps, 'isOneTimeUsage' | 'isOneTimeUsagePerCard'>;
|
|
138
|
-
type GetBankBinProps = Pick<VoucherPaymentType, 'bankName' | 'creditBinGroup' | 'debitBinGroup'>;
|
|
139
|
-
|
|
140
|
-
declare const useVoucherTnc: (props: VoucherTncProps | null) => string[];
|
|
141
|
-
|
|
142
|
-
export { type BoxModel, DiscountType, type GetAppliesToProps, type GetBankBinProps, type GetMethodTermsProps, type GetPeriodProps, type GetUsageLimitProps, type NumberFormatterProps, type UseClipboardOptions, type UseClipboardProps, type UseDebounceProps, type UseDisclosureProps, type UseMediaQueryOptions, type UseOutsideClickProps, type VoucherPaymentType, type VoucherTncProps, VoucherType, canUseDOM, getOwnerDocument, isBrowser, isElement, isValidEvent, useCallbackRef, useClipboard, useDebounce, useDimensions, useDisclosure, useMediaQuery, useNumberFormatter, useOnlineStatus, useOutsideClick, useSafeLayoutEffect, useVoucherTnc };
|
|
1
|
+
export { canUseDOM, getOwnerDocument, isBrowser, isElement, isValidEvent } from './dom.js';
|
|
2
|
+
export { useCallbackRef } from './hooks/use-callback-ref.js';
|
|
3
|
+
export { UseClipboardOptions, UseClipboardProps, useClipboard } from './hooks/use-clipboard.js';
|
|
4
|
+
export { UseDebounceProps, useDebounce } from './hooks/use-debounce.js';
|
|
5
|
+
export { BoxModel, useDimensions } from './hooks/use-dimensions.js';
|
|
6
|
+
export { UseDisclosureProps, useDisclosure } from './hooks/use-disclosure.js';
|
|
7
|
+
export { UseMediaQueryOptions, useMediaQuery } from './hooks/use-media-query.js';
|
|
8
|
+
export { NumberFormatterProps, useNumberFormatter } from './hooks/use-number-formatter.js';
|
|
9
|
+
export { useOnlineStatus } from './hooks/use-online-status.js';
|
|
10
|
+
export { UseOutsideClickProps, useOutsideClick } from './hooks/use-outside-click.js';
|
|
11
|
+
export { useSafeLayoutEffect } from './hooks/use-safe-layout-effect.js';
|
|
12
|
+
export { DiscountType, GetAppliesToProps, GetBankBinProps, GetMethodTermsProps, GetPeriodProps, GetUsageLimitProps, VoucherPaymentType, VoucherTncProps, VoucherType, useVoucherTnc } from './hooks/use-voucher-tnc.js';
|
|
13
|
+
import 'react';
|
|
14
|
+
import 'css-box-model';
|