@tap-payments/os-micro-frontend-shared 0.1.77 → 0.1.80
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/build/components/index.d.ts +0 -2
- package/build/components/index.js +0 -2
- package/build/constants/timezones.js +1 -0
- package/package.json +2 -4
- package/build/components/LazyImage/LazyImage.d.ts +0 -3
- package/build/components/LazyImage/LazyImage.js +0 -39
- package/build/components/LazyImage/index.d.ts +0 -3
- package/build/components/LazyImage/index.js +0 -3
|
@@ -104,5 +104,3 @@ export * from './RadioGroup';
|
|
|
104
104
|
export * from './LeftPeekRightExpandingChip';
|
|
105
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
106
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
107
|
-
export { default as LazyImage } from './LazyImage';
|
|
108
|
-
export * from './LazyImage';
|
|
@@ -104,5 +104,3 @@ export * from './RadioGroup';
|
|
|
104
104
|
export * from './LeftPeekRightExpandingChip';
|
|
105
105
|
export { default as ColorPicker } from './ColorPicker';
|
|
106
106
|
export { default as WindowBackdrop } from './WindowBackdrop';
|
|
107
|
-
export { default as LazyImage } from './LazyImage';
|
|
108
|
-
export * from './LazyImage';
|
|
@@ -42,4 +42,5 @@ export const COUNTRIES_TIMEZONES = [
|
|
|
42
42
|
{ countryCode: 'PK', label: '(GMT:+0500) Pakistan', timezone: 'Asia/Karachi', offset: 5 },
|
|
43
43
|
{ countryCode: 'IN', label: '(GMT:-0500) India', timezone: 'America/Indiana/Indianapolis', offset: -5 },
|
|
44
44
|
{ countryCode: 'SG', label: '(GMT:+0800) Singapore', timezone: 'Asia/Singapore', offset: 8 },
|
|
45
|
+
{ countryCode: 'US', label: '(GMT:-0500) Eastern Time (US & Canada)', timezone: 'America/New_York', offset: -5 },
|
|
45
46
|
];
|
package/package.json
CHANGED
|
@@ -1,8 +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.1.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.80",
|
|
5
|
+
"testVersion": 1,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -94,7 +94,6 @@
|
|
|
94
94
|
"react-hook-form": "^7.45.4",
|
|
95
95
|
"react-hot-toast": "^2.4.1",
|
|
96
96
|
"react-i18next": "^12.2.2",
|
|
97
|
-
"react-lazy-load-image-component": "^1.6.3",
|
|
98
97
|
"react-multi-date-picker": "^4.1.2",
|
|
99
98
|
"react-router-dom": "^7.7.0",
|
|
100
99
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
@@ -109,7 +108,6 @@
|
|
|
109
108
|
"@types/lodash": "^4.17.15",
|
|
110
109
|
"@types/react": "^18.2.6",
|
|
111
110
|
"@types/react-dom": "^18.3.5",
|
|
112
|
-
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
113
111
|
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
114
112
|
"@types/react-window": "^1.8.5",
|
|
115
113
|
"@types/react-window-infinite-loader": "^1.0.6",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect, useState } from 'react';
|
|
14
|
-
import { LazyLoadImage as RawLazyLoadImage } from 'react-lazy-load-image-component';
|
|
15
|
-
const LazyLoadImage = RawLazyLoadImage;
|
|
16
|
-
const EFFECT_ASSETS_MAPPER = {
|
|
17
|
-
opacity: () => import('react-lazy-load-image-component/src/effects/opacity.css'),
|
|
18
|
-
blur: () => import('react-lazy-load-image-component/src/effects/blur.css'),
|
|
19
|
-
'black-and-white': () => import('react-lazy-load-image-component/src/effects/black-and-white.css'),
|
|
20
|
-
};
|
|
21
|
-
const LazyImage = (props) => {
|
|
22
|
-
const { wrapperProps } = props, rest = __rest(props, ["wrapperProps"]);
|
|
23
|
-
const { effect } = rest;
|
|
24
|
-
const { style } = wrapperProps || {};
|
|
25
|
-
const [cssEffectAssetsLoading, setCssEffectAssetsLoading] = useState(!!effect);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (!effect || !(effect in EFFECT_ASSETS_MAPPER))
|
|
28
|
-
return;
|
|
29
|
-
const getResources = EFFECT_ASSETS_MAPPER[effect];
|
|
30
|
-
setCssEffectAssetsLoading(true);
|
|
31
|
-
getResources().finally(() => {
|
|
32
|
-
setCssEffectAssetsLoading(false);
|
|
33
|
-
});
|
|
34
|
-
}, [effect]);
|
|
35
|
-
if (cssEffectAssetsLoading)
|
|
36
|
-
return null;
|
|
37
|
-
return (_jsx(LazyLoadImage, Object.assign({}, rest, { wrapperProps: Object.assign(Object.assign({}, wrapperProps), { style: Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center' }, style) }) })));
|
|
38
|
-
};
|
|
39
|
-
export default LazyImage;
|