@tap-payments/auth-jsconnect 2.9.6-development → 2.9.7-development

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.
@@ -210,7 +210,7 @@ interface LibCallbacks {
210
210
  onBoardButtonClick?: (data: Record<string, any>) => void;
211
211
  onCreated?: (res: Record<string, any>) => void;
212
212
  onBoardCompleted?: () => void;
213
- onMaturityChanged?: (maturity: 'full' | 'express') => void;
213
+ onMaturityChanged?: (maturity: 'full' | 'express') => Promise<void>;
214
214
  onSwitchToBoard?: (boardId: string, authId: string) => void;
215
215
  }
216
216
  export interface LibConfig extends LibCallbacks {
@@ -119,9 +119,6 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
119
119
  if (typeof (board === null || board === void 0 ? void 0 : board.editable) === 'boolean')
120
120
  thunkApi.dispatch(handelBoardMaturity(board.editable));
121
121
  onVerifyConfigTokenSuccess === null || onVerifyConfigTokenSuccess === void 0 ? void 0 : onVerifyConfigTokenSuccess(config);
122
- if (matureData === 'express' && maturity !== matureData && typeof configInfo.onMaturityChanged === 'function') {
123
- configInfo.onMaturityChanged(matureData);
124
- }
125
122
  }
126
123
  deviceInfo = {
127
124
  app: {
@@ -172,7 +169,12 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
172
169
  operator: operator,
173
170
  locale: locale
174
171
  });
175
- return [2, __assign({ countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, ipCountry: ipCountry, isValidOperator: isValidOperator, isMaturityExpress: matureData === 'express' }, (merchant && { merchant: merchant }))];
172
+ if (!(matureData === 'express' && maturity !== matureData && typeof configInfo.onMaturityChanged === 'function')) return [3, 7];
173
+ return [4, configInfo.onMaturityChanged(matureData)];
174
+ case 6:
175
+ _k.sent();
176
+ _k.label = 7;
177
+ case 7: return [2, __assign({ countries: countries, businessCountry: businessCountry, locale: locale, deviceInfo: deviceInfo, ipCountry: ipCountry, isValidOperator: isValidOperator, isMaturityExpress: matureData === 'express' }, (merchant && { merchant: merchant }))];
176
178
  }
177
179
  });
178
180
  }); });
@@ -141,7 +141,7 @@ var Connect = memo(function (props) {
141
141
  (_a = props.unmount) === null || _a === void 0 ? void 0 : _a.call(props);
142
142
  }, 1100);
143
143
  };
144
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, animationDirection: animationDirection, onClose: ((_c = appConfig.features) === null || _c === void 0 ? void 0 : _c.closeButton) ? handleDialogClose : undefined, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: false, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: __assign({ tapTextLogo: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.tapTextLogo) && activeScreen.name !== 'CONNECT_BUSINESS_COUNTRY_STEP', poweredBy: false }, appConfig.features) }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: false }, { children: connectFeatureScreens.map(function (_a, index) {
144
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading || data.isMaturityExpress }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, animationDirection: animationDirection, onClose: ((_c = appConfig.features) === null || _c === void 0 ? void 0 : _c.closeButton) ? handleDialogClose : undefined, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: false, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: __assign({ tapTextLogo: ((_d = appConfig.features) === null || _d === void 0 ? void 0 : _d.tapTextLogo) && activeScreen.name !== 'CONNECT_BUSINESS_COUNTRY_STEP', poweredBy: false }, appConfig.features) }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: false }, { children: connectFeatureScreens.map(function (_a, index) {
145
145
  var Element = _a.element, name = _a.name;
146
146
  var isActive = activeScreen.name === name;
147
147
  return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.9.6-development",
3
+ "version": "2.9.7-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",