File tree Expand file tree Collapse file tree 7 files changed +37
-18
lines changed
samples/SkyflowElements/src
components/CardBrandChoice Expand file tree Collapse file tree 7 files changed +37
-18
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5+ ## [ 2.5.0] - 2025-06-20
6+ ### Added
7+ - Typescript support for public interfaces in JS SDK.
8+
9+ ## [ 2.4.3] - 2025-06-16
10+ ### Fixed
11+ - Expiration date validations.
12+
13+ ## [ 2.4.2] - 2025-06-12
14+ ### Fixed
15+ - Refactor stale elements code.
16+
17+ ## [ 2.4.1] - 2025-06-03
18+ ### Fixed
19+ - Add check for empty container for collect and reveal.
20+ ### Changed
21+ - Update 3DS browser details helper function.
22+
23+ ## [ 2.4.0] - 2025-05-26
24+ ### Added
25+ - Iframe refactoring.
26+
527## [ 2.3.3] - 2025-05-08
628### Added
729- Add overloading method signatures for container initialisation.
Original file line number Diff line number Diff line change 22 "name" : " skyflow-react-js" ,
33 "preferGlobal" : true ,
44 "analyze" : false ,
5- "version" : " 2.4.3" ,
5+ "version" : " 2.4.3-dev.00dc315 " ,
66 "description" : " Skyflow React SDK" ,
77 "homepage" : " https://github.com/skyflowapi/skyflow-react" ,
88 "main" : " lib/index.js" ,
8282 "webpack-merge" : " ^5.8.0"
8383 },
8484 "dependencies" : {
85- "skyflow-js" : " ^2.3.3 " ,
85+ "skyflow-js" : " ^2.4.1 " ,
8686 "uuid" : " ^9.0.0"
8787 },
8888 "peerDependencies" : {
Original file line number Diff line number Diff line change 88
99const CardBrandChoice = ( ) => {
1010 // Use this state to update cardschema list to provide choice
11- const [ scheme , setScheme ] = useState < typeof CardType [ ] > ( [ ] ) ;
11+ const [ scheme , setScheme ] = useState < CardType [ ] > ( [ ] ) ;
1212
1313 // Use this to aviod unnesscary bin api calls.
1414 const binUpdate = useRef ( false ) ;
@@ -116,7 +116,7 @@ const CardBrandChoice = () => {
116116
117117 // Handle to parse card scheme from the bin api response.
118118 const getCardSchems = ( cardData :any ) => {
119- const schemeList :any [ ] = [ ] ;
119+ const schemeList :CardType [ ] = [ ] ;
120120 // cardData will results in array of length more than 1 if it is cobranded.
121121 cardData . forEach ( ( card :any ) => {
122122 if ( card . card_scheme === 'VISA' ) {
Original file line number Diff line number Diff line change @@ -50,4 +50,3 @@ root.render(
5050 < App />
5151 </ SkyflowElements >
5252) ;
53-
Original file line number Diff line number Diff line change 33*/
44
55
6- import { CardType } from 'skyflow-js/types/core/constants ' ;
6+ import { CardMetadata } from 'skyflow-js' ;
77import CollectContainer from 'skyflow-js/types/core/external/collect/collect-container'
88import ComposableContainer from 'skyflow-js/types/core/external/collect/compose-collect-container'
99import RevealContainer from 'skyflow-js/types/core/external/reveal/reveal-container'
@@ -35,7 +35,7 @@ export interface SkyflowCollectElementProps {
3535}
3636
3737export interface SkyflowCollectElementRef {
38- setErrorOverride : ( errorMessage : string ) => void ;
38+ setErrorOverride : ( errorMessage : string ) => void ;
3939}
4040
4141export interface SkyflowRevealElementProps {
@@ -76,7 +76,7 @@ export interface ICollectElementOptions {
7676 enableCopy ?: boolean
7777 allowedFileType ?: string [ ]
7878 preserveFileName ?: boolean
79- cardMetadata ?: ICardMetadata
79+ cardMetadata ?: CardMetadata
8080 masking ?: boolean
8181 maskingChar ?: string
8282 blockEmptyFiles ?: boolean
@@ -87,6 +87,6 @@ export type IRevealOptions = {
8787 format ?:string
8888}
8989
90- export type ICardMetadata = {
91- scheme ?: typeof CardType [ ]
92- }
90+ // export type ICardMetadata = {
91+ // scheme?: typeof CardType[]
92+ // }
Original file line number Diff line number Diff line change 22 Copyright (c) 2022 Skyflow, Inc.
33*/
44import SkyflowElements from './core'
5- import Skyflow from 'skyflow-js'
5+ import Skyflow , { CardType } from 'skyflow-js'
66
77import CardHolderNameElement from './elements/CardHolderName'
88import CardNumberElement from './elements/CardNumber'
@@ -34,8 +34,6 @@ const LENGTH_MATCH_RULE = Skyflow.ValidationRuleType.LENGTH_MATCH_RULE
3434const REGEX_MATCH_RULE = Skyflow . ValidationRuleType . REGEX_MATCH_RULE
3535const ELEMENT_VALUE_MATCH_RULE = Skyflow . ValidationRuleType . ELEMENT_VALUE_MATCH_RULE
3636
37- const CardType = Skyflow . CardType
38-
3937export {
4038 SkyflowElements ,
4139 CardNumberElement ,
You can’t perform that action at this time.
0 commit comments