@gr4vy/secure-fields 1.2.0 → 1.3.0
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/CHANGELOG.md +17 -0
- package/lib/input.d.ts +2 -2
- package/lib/types.d.ts +11 -11
- package/lib/utils/logger.d.ts +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# v1.3.0 (Thu Feb 16 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- build(deps): bump css-loader from 6.7.2 to 6.7.3 [#191](https://github.com/gr4vy/secure-fields/pull/191) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
6
|
+
- build(deps-dev): bump typedoc from 0.23.24 to 0.23.25 [#195](https://github.com/gr4vy/secure-fields/pull/195) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
7
|
+
|
|
8
|
+
#### 🏠 Internal
|
|
9
|
+
|
|
10
|
+
- build(deps-dev): bump typescript-transform-paths from 3.4.4 to 3.4.6 [#181](https://github.com/gr4vy/secure-fields/pull/181) ([@dependabot[bot]](https://github.com/dependabot[bot]))
|
|
11
|
+
|
|
12
|
+
#### Authors: 1
|
|
13
|
+
|
|
14
|
+
- [@dependabot[bot]](https://github.com/dependabot[bot])
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
1
18
|
# v1.2.0 (Fri Feb 03 2023)
|
|
2
19
|
|
|
3
20
|
#### 🐛 Bug Fix
|
package/lib/input.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputConfig as Config, Field, FieldType, FieldEvent, StylesTuple } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Options = Omit<Field, 'element' | 'type'>;
|
|
3
|
+
type EventListener = (event: FieldEvent['type'], callback: (...args: any[]) => void) => void;
|
|
4
4
|
declare class SecureInput {
|
|
5
5
|
frameUrl: string;
|
|
6
6
|
parentOrigin: string;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { Events } from './constants';
|
|
2
2
|
import type * as CSS from 'csstype';
|
|
3
|
-
export
|
|
3
|
+
export type Config = {
|
|
4
4
|
environment?: 'sandbox' | 'production';
|
|
5
5
|
gr4vyId: string;
|
|
6
6
|
sessionId: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type InputConfig = {
|
|
9
9
|
frameUrl: string;
|
|
10
10
|
parentOrigin: string;
|
|
11
11
|
font?: string;
|
|
12
12
|
options: Field;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
15
|
-
export
|
|
14
|
+
export type FieldType = 'number' | 'securityCode' | 'expiryDate';
|
|
15
|
+
export type Field = {
|
|
16
16
|
type: FieldType;
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
styles?: Styles;
|
|
19
19
|
label?: string;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type FieldEvent = {
|
|
22
22
|
type: keyof HTMLElementEventMap;
|
|
23
23
|
data: Omit<Field, 'type' | 'styles'> & {
|
|
24
24
|
id: Field['type'];
|
|
25
25
|
valid: boolean;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
28
|
+
export type CombinedEvents = Events | keyof HTMLElementEventMap;
|
|
29
|
+
export type Event = Events | `${FieldType}:${keyof HTMLElementEventMap}`;
|
|
30
|
+
export type SupportedCSSProperties = Partial<Pick<CSS.Properties, 'backgroundColor' | 'boxShadow' | 'caretColor' | 'color' | 'colorScheme' | 'cursor' | 'font' | 'fontFamily' | 'fontFeatureSettings' | 'fontKerning' | 'fontSize' | 'fontSizeAdjust' | 'fontStretch' | 'fontStyle' | 'fontVariant' | 'fontVariantAlternates' | 'fontVariantCaps' | 'fontVariantEastAsian' | 'fontVariantLigatures' | 'fontVariantNumeric' | 'fontVariationSettings' | 'fontWeight' | 'letterSpacing' | 'lineHeight' | 'opacity' | 'padding' | 'textAlign' | 'textShadow' | 'textRendering' | 'transition' | 'MozOsxFontSmoothing' | 'WebkitFontSmoothing'>>;
|
|
31
|
+
export type SupportedCSSVariables = {
|
|
32
32
|
[K in keyof SupportedCSSProperties as `--${K}`]: SupportedCSSProperties[K];
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type Styles = {
|
|
35
35
|
[key in ':autofill' | ':hover' | ':focus' | ':disabled' | ':valid' | ':invalid' | '::placeholder']?: SupportedCSSProperties;
|
|
36
36
|
} & SupportedCSSProperties;
|
|
37
|
-
export
|
|
37
|
+
export type StylesTuple = [string, string][];
|
package/lib/utils/logger.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type Options = {
|
|
2
2
|
debug?: boolean;
|
|
3
3
|
level?: 'log' | 'warn' | 'debug' | 'info' | 'error';
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type LogFunction = (key: string, object?: Record<string, unknown>, options?: Options) => void;
|
|
6
6
|
export declare const log: LogFunction;
|
|
7
7
|
export declare const warn: LogFunction;
|
|
8
8
|
export declare const debug: LogFunction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gr4vy/secure-fields",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Gr4vy-hosted secure fields offering advanced theming, PCI compliance, event handling, and more.",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"types": "lib/index",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"token": "node generate-token"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"css-loader": "^6.7.
|
|
44
|
+
"css-loader": "^6.7.3",
|
|
45
45
|
"csstype": "^3.1.1",
|
|
46
46
|
"dotenv": "^16.0.3",
|
|
47
47
|
"style-loader": "^3.3.1",
|
|
48
48
|
"ts-patch": "^2.1.0",
|
|
49
|
-
"typedoc": "^0.23.
|
|
49
|
+
"typedoc": "^0.23.25",
|
|
50
50
|
"typedoc-plugin-missing-exports": "^0.23.0",
|
|
51
|
-
"typescript-transform-paths": "^3.4.
|
|
51
|
+
"typescript-transform-paths": "^3.4.6"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "fdf652b4e9caefb8be25446258a41c2a30ff9757"
|
|
57
57
|
}
|