@tap-payments/os-micro-frontend-shared 0.0.215 → 0.0.216-test.3

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.
@@ -66,6 +66,6 @@ function Calender(_a) {
66
66
  setTempDate(v);
67
67
  }, onChange: (v) => {
68
68
  setTempDate(v);
69
- }, weekDays: !isAr ? weekDays : undefined, minDate: new Date(), value: date }, props)), _jsxs(ButtonsWrapper, Object.assign({ sx: Object.assign({}, (enableTimePicker && { justifyContent: 'space-between' })) }, { children: [enableTimePicker && _jsx(TimePicker, { onChange: onChangeTimepicker, defaultTime: time }), _jsxs(FooterButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: handleClose }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: handleSubmit }, { children: t('okay') }))] })] }))] })) }))] })) })));
69
+ }, weekDays: !isAr ? weekDays : undefined, minDate: new Date(), value: date }, props)), _jsxs(ButtonsWrapper, Object.assign({ sx: Object.assign({}, (enableTimePicker && { justifyContent: 'space-between' })) }, { children: [enableTimePicker && _jsx(TimePicker, { enableRealTimeChange: true, onChange: onChangeTimepicker, defaultTime: time }), _jsxs(FooterButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: handleClose }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: handleSubmit }, { children: t('okay') }))] })] }))] })) }))] })) })));
70
70
  }
71
71
  export default memo(Calender);
@@ -554,9 +554,9 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
554
554
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
555
555
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
556
556
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
557
+ referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
557
558
  src?: string | undefined;
558
559
  alt?: string | undefined;
559
- referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
560
560
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
561
561
  useMap?: string | undefined;
562
562
  loading?: "eager" | "lazy" | undefined;
@@ -272,9 +272,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
272
272
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
273
273
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
274
274
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
275
+ referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
275
276
  src?: string | undefined;
276
277
  alt?: string | undefined;
277
- referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
278
278
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
279
279
  useMap?: string | undefined;
280
280
  loading?: "eager" | "lazy" | undefined;
@@ -273,9 +273,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
273
273
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
274
274
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
275
275
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
276
+ referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
276
277
  src?: string | undefined;
277
278
  alt?: string | undefined;
278
- referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
279
279
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
280
280
  useMap?: string | undefined;
281
281
  loading?: "eager" | "lazy" | undefined;
@@ -262,9 +262,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
262
262
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
263
263
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
264
264
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
265
+ referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
265
266
  src?: string | undefined;
266
267
  alt?: string | undefined;
267
- referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
268
268
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
269
269
  useMap?: string | undefined;
270
270
  loading?: "eager" | "lazy" | undefined;
@@ -6,6 +6,7 @@ export type Time = {
6
6
  interface TimePickerProps {
7
7
  defaultTime?: Time;
8
8
  onChange?: (time: Time) => void;
9
+ enableRealTimeChange?: boolean;
9
10
  }
10
- export declare function TimePicker({ onChange, defaultTime }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function TimePicker({ onChange, defaultTime, enableRealTimeChange }: TimePickerProps): import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useCallback } from 'react';
2
+ import { useState, useCallback, useEffect } from 'react';
3
3
  import ClickAwayListener from '@mui/material/ClickAwayListener';
4
4
  import Box from '@mui/material/Box';
5
5
  import Menu from '../Menu';
@@ -8,13 +8,18 @@ import { greyUpArrowIcon, greyDownArrowIcon } from '../../constants/index.js';
8
8
  import { Arrow, Button, Period, PeriodWrapper, Wrapper, Time, TimeWrapper, Input } from './style';
9
9
  import { getDefaultHour, getDefaultMinute } from './utils';
10
10
  import { maxHour, maxMinute, periodList } from './constant';
11
- export function TimePicker({ onChange, defaultTime }) {
11
+ export function TimePicker({ onChange, defaultTime, enableRealTimeChange }) {
12
12
  var _a, _b, _c;
13
13
  const [anchorEl, setAnchorEl] = useState(null);
14
14
  const [period, setPeriod] = useState((_a = defaultTime === null || defaultTime === void 0 ? void 0 : defaultTime.period) !== null && _a !== void 0 ? _a : (new Date().getHours() >= maxHour ? 'PM' : 'AM'));
15
15
  const [hours, setHours] = useState((_b = defaultTime === null || defaultTime === void 0 ? void 0 : defaultTime.hour) !== null && _b !== void 0 ? _b : getDefaultHour());
16
16
  const [minutes, setMinutes] = useState((_c = defaultTime === null || defaultTime === void 0 ? void 0 : defaultTime.minute) !== null && _c !== void 0 ? _c : getDefaultMinute());
17
17
  const open = Boolean(anchorEl);
18
+ useEffect(() => {
19
+ if (!enableRealTimeChange)
20
+ return;
21
+ onChange === null || onChange === void 0 ? void 0 : onChange({ hour: hours, minute: minutes, period: period });
22
+ }, [hours, minutes, period, enableRealTimeChange]);
18
23
  const onOpen = (e) => {
19
24
  setAnchorEl(e.currentTarget);
20
25
  };
@@ -306,9 +306,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
306
306
  onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
307
307
  onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
308
308
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
309
+ referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
309
310
  src?: string | undefined;
310
311
  alt?: string | undefined;
311
- referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
312
312
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
313
313
  useMap?: string | undefined;
314
314
  loading?: "eager" | "lazy" | undefined;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.215",
4
+ "version": "0.0.216-test.3",
5
+ "testVersion": 3,
5
6
  "type": "module",
6
7
  "main": "build/index.js",
7
8
  "module": "build/index.js",
@@ -60,6 +61,7 @@
60
61
  "scripts": {
61
62
  "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
62
63
  "push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
64
+ "test-publish": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
63
65
  "dev": "vite",
64
66
  "build": "tsc -b && vite build ",
65
67
  "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
@@ -129,4 +131,4 @@
129
131
  "publishConfig": {
130
132
  "registry": "https://registry.npmjs.org/"
131
133
  }
132
- }
134
+ }