@thx/controls 14.2.0 → 15.1.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/date/LocalDatePicker/MaskedDateInput.d.ts +7 -6
- package/dist/date/LocalTimePicker/MaskedTimeInput.d.ts +7 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +834 -351
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/inputs/CreditCardInput/CreditCardInput.d.ts +14 -5
- package/dist/inputs/CreditCardInput/CreditCardNumberInput.d.ts +8 -0
- package/dist/inputs/CreditCardInput/index.d.ts +1 -1
- package/dist/inputs/MaskedInput/MaskedInput.d.ts +4 -11
- package/dist/inputs/MaskedInput/index.d.ts +1 -0
- package/dist/inputs/MaskedInput/useMaskedInput.d.ts +9 -0
- package/dist/inputs/PhoneInput/PhoneInput.d.ts +2 -1
- package/dist/inputs/Scriptel/withScriptel.d.ts +1 -0
- package/dist/inputs/SinInput/SinInput.d.ts +5 -4
- package/dist/inputs/TableInput/DropdownCell.d.ts +1 -0
- package/dist/inputs/TableInput/HoverCell.d.ts +1 -0
- package/dist/inputs/TableInput/MoneyCell.d.ts +1 -0
- package/dist/inputs/TableInput/MoneyEditCell.d.ts +1 -0
- package/dist/inputs/TableInput/MoneySumFooter.d.ts +1 -0
- package/dist/inputs/TableInput/StringEditCell.d.ts +1 -0
- package/dist/money/MoneyCurrencyInput/MoneyCurrencyInput.d.ts +1 -1
- package/dist/money/MoneyInput/MoneyInput.d.ts +3 -4
- package/dist/money/useMoneyInput.d.ts +6 -7
- package/package.json +11 -6
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import type { LocalDate } from '@js-joda/core';
|
|
3
|
+
import 'react-credit-cards/es/styles-compiled.css';
|
|
4
|
+
import { InputProps } from 'semantic-ui-react';
|
|
5
|
+
import './styles.css';
|
|
6
|
+
export interface CreditCardData {
|
|
7
|
+
number?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
cvc?: string;
|
|
10
|
+
expiry?: LocalDate;
|
|
6
11
|
}
|
|
7
|
-
export declare
|
|
12
|
+
export declare type CreditCardInputProps = {
|
|
13
|
+
value?: CreditCardData;
|
|
14
|
+
onChange?: (data: CreditCardData) => void;
|
|
15
|
+
} & Pick<InputProps, 'disabled' | 'onBlur'>;
|
|
16
|
+
export declare function CreditCardInput(props: CreditCardInputProps): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputProps } from 'semantic-ui-react';
|
|
3
|
+
interface CreditCardNumberInputProps {
|
|
4
|
+
onChange?: (value: string | undefined) => void;
|
|
5
|
+
value?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CreditCardNumberInput(props: CreditCardNumberInputProps & Omit<InputProps, 'onChange'>): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { CreditCardInput } from './CreditCardInput';
|
|
2
|
-
export type {
|
|
2
|
+
export type { CreditCardInputProps } from './CreditCardInput';
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import Inputmask from 'inputmask';
|
|
3
2
|
import { InputProps } from 'semantic-ui-react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @typedef {Object} inputmaskPropTypes
|
|
7
|
-
*/
|
|
8
|
-
export interface MaskedInputProps {
|
|
3
|
+
import { UseMaskedInputProps } from './useMaskedInput';
|
|
4
|
+
export declare type MaskedInputProps = {
|
|
9
5
|
name?: string;
|
|
10
|
-
value?: string;
|
|
11
|
-
onChange?: (value?: string) => void;
|
|
12
6
|
onBlur?: (event: any) => void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare function MaskedInput(props: MaskedInputProps & Omit<InputProps, 'onChange'>): JSX.Element;
|
|
7
|
+
} & UseMaskedInputProps & Omit<InputProps, 'onChange'>;
|
|
8
|
+
export declare function MaskedInput(props: MaskedInputProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Inputmask from 'inputmask';
|
|
3
|
+
export interface UseMaskedInputProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value?: string) => void;
|
|
6
|
+
mask?: Inputmask.Options;
|
|
7
|
+
onSet?: (value?: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useMaskedInput(props: UseMaskedInputProps): import("react").MutableRefObject<HTMLInputElement | null>;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
import { MaskedInputProps } from '../MaskedInput';
|
|
3
3
|
export interface PhoneInputProps {
|
|
4
4
|
extension?: boolean;
|
|
5
|
+
onChange?: (value?: string) => void;
|
|
5
6
|
}
|
|
6
|
-
export declare function PhoneInput(props: PhoneInputProps & Omit<MaskedInputProps, 'mask'>): JSX.Element;
|
|
7
|
+
export declare function PhoneInput(props: PhoneInputProps & Omit<MaskedInputProps, 'mask' | 'onChange'>): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MaskedInputProps } from '../MaskedInput';
|
|
3
|
-
export interface SinInputProps {
|
|
4
|
-
|
|
2
|
+
import type { MaskedInputProps } from '../MaskedInput';
|
|
3
|
+
export interface SinInputProps extends Omit<MaskedInputProps, 'mask'> {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange(value?: string): void;
|
|
5
6
|
}
|
|
6
|
-
export declare function SinInput(props: SinInputProps
|
|
7
|
+
export declare function SinInput(props: SinInputProps): JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { DropdownProps } from 'semantic-ui-react';
|
|
2
3
|
import type { TableCellProps } from './TableInput';
|
|
3
4
|
export declare function DropdownCell<D extends Record<string, unknown>>(dropdownProps: DropdownProps): (props: TableCellProps<D>) => JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
import type Money from 'js-money';
|
|
2
|
+
import Money, { Currency, MoneyObject } from 'js-money';
|
|
4
3
|
import { InputProps } from 'semantic-ui-react';
|
|
5
4
|
export interface MoneyInputProps {
|
|
6
5
|
name?: string;
|
|
7
6
|
onChange?: (value: Money) => void;
|
|
8
|
-
value?: Money |
|
|
9
|
-
defaultCurrency?:
|
|
7
|
+
value?: Money | MoneyObject;
|
|
8
|
+
defaultCurrency?: Currency;
|
|
10
9
|
onBlur?: (ev: any) => void;
|
|
11
10
|
prefix?: string;
|
|
12
11
|
showPrefix?: boolean;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { Currencies, IMoneyObject } from '@thx/money';
|
|
2
1
|
import Money from 'js-money';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
3
|
interface UseMoneyInputProps {
|
|
4
|
-
|
|
5
|
-
value?: Money
|
|
6
|
-
|
|
4
|
+
value?: Money;
|
|
5
|
+
onChange?: (value?: Money) => void;
|
|
6
|
+
onSet?: (value?: Money) => void;
|
|
7
7
|
prefix?: string;
|
|
8
8
|
showPrefix?: boolean;
|
|
9
9
|
wholeNumber?: boolean;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
11
|
+
declare type SetValueFn = (value?: Money) => void;
|
|
12
|
+
export declare function useMoneyInput(props: UseMoneyInputProps): [MutableRefObject<HTMLInputElement | null>, SetValueFn];
|
|
14
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thx/controls",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.1.1",
|
|
4
4
|
"description": "A collection of components designed with SemanticUI.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/thr-consulting/thr-addons/issues"
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "thx build",
|
|
22
|
+
"build-storybook": "build-storybook",
|
|
22
23
|
"build:dev": "thx build:dev",
|
|
23
24
|
"build:prod": "thx build:prod",
|
|
24
25
|
"clean": "thx clean",
|
|
25
|
-
"deps": "thx -p *.stories.tsx -i style-loader,css-loader deps",
|
|
26
|
+
"deps": "thx -p *.stories.tsx,*.story.tsx -i style-loader,css-loader deps",
|
|
26
27
|
"lint": "thx lint",
|
|
27
28
|
"lint:fix": "thx lint:fix",
|
|
28
29
|
"sort": "thx sort",
|
|
@@ -36,11 +37,12 @@
|
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"@js-joda/core": "^4.0.0",
|
|
39
|
-
"@thx/date": "^
|
|
40
|
-
"@thx/money": "^
|
|
41
|
-
"@thx/yup-types": "^
|
|
40
|
+
"@thx/date": "^15.1.1",
|
|
41
|
+
"@thx/money": "^15.1.1",
|
|
42
|
+
"@thx/yup-types": "^15.1.1",
|
|
42
43
|
"@types/inputmask": "^5.0.1",
|
|
43
44
|
"@types/react-datepicker": "^4.1.7",
|
|
45
|
+
"credit-card-type": "^9.1.0",
|
|
44
46
|
"debug": "^4.1.1",
|
|
45
47
|
"eventemitter3": "^4.0.0",
|
|
46
48
|
"flat": "^5.0.0",
|
|
@@ -48,8 +50,11 @@
|
|
|
48
50
|
"inputmask": "^5.0.6",
|
|
49
51
|
"js-money": "^0.6.3",
|
|
50
52
|
"lodash": "^4.17.15",
|
|
53
|
+
"luhn": "^2.4.1",
|
|
54
|
+
"react-credit-cards": "^0.8.3",
|
|
51
55
|
"react-datepicker": "^4.2.1",
|
|
52
56
|
"react-table": "^7.6.3",
|
|
57
|
+
"social-insurance-number": "^0.2.2",
|
|
53
58
|
"use-deep-compare-effect": "1.4.0"
|
|
54
59
|
},
|
|
55
60
|
"devDependencies": {
|
|
@@ -68,5 +73,5 @@
|
|
|
68
73
|
"publishConfig": {
|
|
69
74
|
"access": "public"
|
|
70
75
|
},
|
|
71
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "71c2dabf3b35fc12e48244dfc8a84bfa5a5bf3f7"
|
|
72
77
|
}
|