@tap-payments/os-micro-frontend-shared 0.1.159 → 0.1.161

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Tap Payments
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tap Payments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # os-micro-frontend-shared
2
-
3
- ## Publishing Workflow
4
-
5
- 1. Update version in package.json
6
- 2. Commit changes
7
- 3. Create and push a tag:
8
-
9
- ```bash
10
- npm version patch # or minor, major
11
- git push origin main --tags
12
- ```
1
+ # os-micro-frontend-shared
2
+
3
+ ## Publishing Workflow
4
+
5
+ 1. Update version in package.json
6
+ 2. Commit changes
7
+ 3. Create and push a tag:
8
+
9
+ ```bash
10
+ npm version patch # or minor, major
11
+ git push origin main --tags
12
+ ```
@@ -13,25 +13,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import Tooltip from '../../../Tooltip';
14
14
  import { ImageWrapper } from '../../../index.js';
15
15
  import { TableCell } from '../../../TableCells';
16
- import { openUrl } from '../../../../utils/index.js';
17
16
  import { ChannelTextLabel, ChannelTextWrapper, salesChannelAnimation, SalesChannelsContainer, StyledSourceCell, StyledSourceImage } from './style';
18
- import { NON_CLICKABLE_CHANNELS } from './constants';
17
+ import { openChannelUrl, transformUrl } from './utils';
19
18
  function SalesChannelCell(_a) {
20
19
  var _b;
21
20
  var { channels, isTextShown } = _a, props = __rest(_a, ["channels", "isTextShown"]);
22
21
  const salesChannels = (_b = channels === null || channels === void 0 ? void 0 : channels.filter((s) => !!s.address)) === null || _b === void 0 ? void 0 : _b.map((channel, index) => {
23
- var _a;
22
+ var _a, _b, _c;
24
23
  const sourceTooltip = channel.address;
25
24
  const channelCode = (_a = channel.code) === null || _a === void 0 ? void 0 : _a.replace(/_/g, '');
26
25
  const isLastChannel = index === (channels === null || channels === void 0 ? void 0 : channels.length) - 1;
26
+ const transformedUrl = transformUrl((_b = channel.address) !== null && _b !== void 0 ? _b : '', (_c = channel.code) !== null && _c !== void 0 ? _c : '');
27
27
  return (_jsx(Tooltip, Object.assign({ title: sourceTooltip }, { children: _jsx(ImageWrapper, Object.assign({ order: index, variants: salesChannelAnimation(index, isTextShown ? 74 : 0, isLastChannel), sx: {
28
28
  width: isTextShown ? '70px' : '36px',
29
- cursor: NON_CLICKABLE_CHANNELS.includes(channel.code) ? 'default' : 'pointer',
29
+ cursor: !transformedUrl ? 'default' : 'pointer',
30
30
  }, onClick: () => {
31
- if (NON_CLICKABLE_CHANNELS.includes(channel.code))
32
- return;
33
31
  if (channel === null || channel === void 0 ? void 0 : channel.address)
34
- openUrl(channel.address);
32
+ openChannelUrl(transformedUrl);
35
33
  } }, { children: isTextShown ? (_jsx(ChannelTextWrapper, { children: _jsx(ChannelTextLabel, { children: channelCode }) })) : (_jsx(StyledSourceImage, { src: channel.logo, alt: channelCode })) })) }), `${channel}-${index}`));
36
34
  });
37
35
  const salesChannelsCount = (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.length) || 0;
@@ -0,0 +1,3 @@
1
+ import { SalesChannelTypes } from '../../../../types/index.js';
2
+ export declare const transformUrl: (url: string, channelCode: SalesChannelTypes) => string | null;
3
+ export declare const openChannelUrl: (url: string | null) => void;
@@ -0,0 +1,69 @@
1
+ import { SalesChannelTypes } from '../../../../types/index.js';
2
+ const needsHttpsPrefix = (url) => {
3
+ return !url.startsWith('http://') && !url.startsWith('https://');
4
+ };
5
+ const isUrl = (url) => {
6
+ return /^https?:\/\//i.test(url);
7
+ };
8
+ export const transformUrl = (url, channelCode) => {
9
+ switch (channelCode) {
10
+ case SalesChannelTypes.WEBSITE:
11
+ return url;
12
+ case SalesChannelTypes.PHYSICAL_STORE:
13
+ case SalesChannelTypes.CALL_CENTER:
14
+ return null;
15
+ case SalesChannelTypes.LINKEDIN:
16
+ case SalesChannelTypes.INSTAGRAM:
17
+ case SalesChannelTypes.TWITTER:
18
+ case SalesChannelTypes.SOCIAL_MEDIA:
19
+ return handleSocialMediaUrl(url, channelCode);
20
+ case SalesChannelTypes.IOS:
21
+ case SalesChannelTypes.ANDROID:
22
+ case SalesChannelTypes.MOBILE_APP:
23
+ return handleMobileAppUrl(url, channelCode);
24
+ default:
25
+ return url;
26
+ }
27
+ };
28
+ const handleSocialMediaUrl = (url, channelCode) => {
29
+ const lowerUrl = url.toLowerCase();
30
+ if (channelCode === SalesChannelTypes.LINKEDIN) {
31
+ if (lowerUrl.includes('linkedin.com') || lowerUrl.includes('linked.com')) {
32
+ return url;
33
+ }
34
+ return !isUrl(url) ? `https://linkedin.com/company/${url}` : null;
35
+ }
36
+ if (channelCode === SalesChannelTypes.INSTAGRAM) {
37
+ if (lowerUrl.includes('instagram.com')) {
38
+ return url;
39
+ }
40
+ return !isUrl(url) ? `https://instagram.com/${url}` : null;
41
+ }
42
+ if (channelCode === SalesChannelTypes.TWITTER) {
43
+ if (lowerUrl.includes('twitter.com') || lowerUrl.includes('x.com')) {
44
+ return url;
45
+ }
46
+ return !isUrl(url) ? `https://x.com/${url}` : null;
47
+ }
48
+ return null;
49
+ };
50
+ const handleMobileAppUrl = (url, channelCode) => {
51
+ const lowerUrl = url.toLowerCase();
52
+ if (lowerUrl.includes('apps.apple.com') && channelCode === SalesChannelTypes.IOS) {
53
+ return url;
54
+ }
55
+ if (channelCode === SalesChannelTypes.ANDROID) {
56
+ if (!isUrl(url)) {
57
+ return `https://play.google.com/store/apps/details?id=${url}`;
58
+ }
59
+ return url;
60
+ }
61
+ return null;
62
+ };
63
+ export const openChannelUrl = (url) => {
64
+ if (!url || typeof url !== 'string') {
65
+ return;
66
+ }
67
+ // Open the URL in a new tab
68
+ window.open(needsHttpsPrefix(url) ? `https://${url}` : url, '_blank', 'noopener,noreferrer');
69
+ };
@@ -45,6 +45,13 @@ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader,
45
45
  delay: 1000,
46
46
  });
47
47
  const [showBackDrop, setShowBackdrop] = useState(false);
48
+ // Dynamic AutoSizer key that updates asynchronously when layout-affecting props change
49
+ const [autoSizerKey, setAutoSizerKey] = useState('INITIAL_KEY');
50
+ useEffect(() => {
51
+ const depsKey = `${footerProps === null || footerProps === void 0 ? void 0 : footerProps.maximized}-${isMinimized}`;
52
+ const frame = requestAnimationFrame(() => setAutoSizerKey(depsKey));
53
+ return () => cancelAnimationFrame(frame);
54
+ }, [footerProps === null || footerProps === void 0 ? void 0 : footerProps.maximized, isMinimized]);
48
55
  const isError = hasError(error);
49
56
  const tableLoading = isLoading !== null && isLoading !== void 0 ? isLoading : true;
50
57
  const tableError = !isLoading && rows.length === 0 && isError && !isNotFoundError(error);
@@ -78,10 +85,8 @@ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader,
78
85
  });
79
86
  return (
80
87
  // @ts-ignore
81
- _jsx(InfiniteLoader, Object.assign({ "data-testid": "VirtualTable_InfiniteLoader", isItemLoaded: (index) => index !== lastItemIndex, itemCount: itemsCount, loadMoreItems: handleOnLoadMoreItems, threshold: threshold }, { children: ({ onItemsRendered, ref }) => (_jsx(AutoSizer, Object.assign({ ref: ref, "data-testid": "VirtualTable_AutoSizer" }, { children: ({ height, width }) => (_jsx(StyledVirtualList, Object.assign({ "data-testid": "VirtualTable_VirtualList", useIsScrolling: true, className: "list", itemData: itemData, height: height || 0, width: width || 0, itemCount: itemsCount, itemSize: () => tableRowHeight, onItemsRendered: onItemsRendered, setBackdropVisibility: setBackdropVisibility, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, scrollToIndex: scrollToIndex, overscanCount: TABLE_LIST_OVER_SCAN, isSheetView: isSheetView, listRef: listRef }, { children: ListItemWrapper }))) }), `${footerProps === null || footerProps === void 0 ? void 0 : footerProps.maximized}-${isMinimized}`)) })));
88
+ _jsx(InfiniteLoader, Object.assign({ "data-testid": "VirtualTable_InfiniteLoader", isItemLoaded: (index) => index !== lastItemIndex, itemCount: itemsCount, loadMoreItems: handleOnLoadMoreItems, threshold: threshold }, { children: ({ onItemsRendered, ref }) => (_jsx(AutoSizer, Object.assign({ ref: ref, "data-testid": "VirtualTable_AutoSizer" }, { children: ({ height, width }) => (_jsx(StyledVirtualList, Object.assign({ "data-testid": "VirtualTable_VirtualList", useIsScrolling: true, className: "list", itemData: itemData, height: height || 0, width: width || 0, itemCount: itemsCount, itemSize: () => tableRowHeight, onItemsRendered: onItemsRendered, setBackdropVisibility: setBackdropVisibility, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, scrollToIndex: scrollToIndex, overscanCount: TABLE_LIST_OVER_SCAN, isSheetView: isSheetView, listRef: listRef }, { children: ListItemWrapper }))) }), autoSizerKey)) })));
82
89
  }, [
83
- isMinimized,
84
- footerProps === null || footerProps === void 0 ? void 0 : footerProps.maximized,
85
90
  lastItemIndex,
86
91
  loadMoreItems,
87
92
  threshold,
@@ -92,6 +97,7 @@ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader,
92
97
  isSheetView,
93
98
  itemData,
94
99
  scrollToIndex,
100
+ autoSizerKey,
95
101
  ]);
96
102
  const showNoDataView = tableLoading || tableError || tableEmpty || hasTimeoutError;
97
103
  return (_jsxs(_Fragment, { children: [_jsxs(TableContainer, { children: [_jsx(StyledTableBox, Object.assign({ as: "main", id: "table-box-container", "aria-labelledby": "table-box-container", "data-testid": "VirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: Object.assign({}, tableBodyStyles) }, { children: [showHeader && (_jsx(TableHeader, { "data-testid": "VirtualTable_TableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: orderedColumns, headerProps: headerProps, showBackDrop: showBackDrop, isSheetView: isSheetView })), showNoDataView ? (_jsx(TableNoData, { error: error, tableEmpty: tableEmpty, isTimeoutError: hasTimeoutError, tableError: tableError, tableLoading: tableLoading, orderedColumns: orderedColumns, triggerDataRefetch: triggerDataRefetch, footerProps: footerProps })) : (_jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
package/package.json CHANGED
@@ -1,166 +1,166 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.159",
5
- "testVersion": 0,
6
- "type": "module",
7
- "main": "build/index.js",
8
- "module": "build/index.js",
9
- "types": "build/index.d.ts",
10
- "exports": {
11
- "./package.json": "./package.json",
12
- ".": {
13
- "types": "./build/index.d.ts",
14
- "import": "./build/index.js",
15
- "require": "./build/index.js"
16
- },
17
- "./constants": {
18
- "types": "./build/constants/index.d.ts",
19
- "import": "./build/constants/index.js",
20
- "require": "./build/constants/index.js"
21
- },
22
- "./components": {
23
- "types": "./build/components/index.d.ts",
24
- "import": "./build/components/index.js",
25
- "require": "./build/components/index.js"
26
- },
27
- "./components/*": {
28
- "types": "./build/components/*/index.d.ts",
29
- "import": "./build/components/*/index.js",
30
- "require": "./build/components/*/index.js"
31
- },
32
- "./hooks": {
33
- "types": "./build/hooks/index.d.ts",
34
- "import": "./build/hooks/index.js",
35
- "require": "./build/hooks/index.js"
36
- },
37
- "./utils": {
38
- "types": "./build/utils/index.d.ts",
39
- "import": "./build/utils/index.js",
40
- "require": "./build/utils/index.js"
41
- },
42
- "./theme": {
43
- "types": "./build/theme/index.d.ts",
44
- "import": "./build/theme/index.js",
45
- "require": "./build/theme/index.js"
46
- },
47
- "./types": {
48
- "types": "./build/types/index.d.ts",
49
- "import": "./build/types/index.js",
50
- "require": "./build/types/index.js"
51
- }
52
- },
53
- "license": "MIT",
54
- "author": {
55
- "name": "Ahmed Sharkawy",
56
- "email": "a.elsharkawy@tap.company"
57
- },
58
- "files": [
59
- "build",
60
- "readme.md"
61
- ],
62
- "scripts": {
63
- "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
64
- "push:local": "yarn ts:build && yalc publish --push",
65
- "push": "npm run ts:build && npm publish --access public",
66
- "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
67
- "dev": "vite",
68
- "build": "tsc -b && vite build ",
69
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
70
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
71
- "lint": "eslint . --color",
72
- "lint:fix": "eslint src --fix --color",
73
- "preview": "vite preview",
74
- "prepare": "husky"
75
- },
76
- "dependencies": {
77
- "@emotion/react": "^11.11.0",
78
- "@emotion/styled": "^11.11.0",
79
- "@hookform/resolvers": "^3.3.1",
80
- "@mui/material": "^5.12.3",
81
- "@uiw/react-json-view": "^2.0.0-alpha.16",
82
- "axios": "^1.4.0",
83
- "color": "^5.0.0",
84
- "dayjs": "^1.11.8",
85
- "framer-motion": "10.11.0",
86
- "i18next": "^22.4.15",
87
- "memoize-one": "^6.0.0",
88
- "re-resizable": "^6.9.9",
89
- "react": "^18.2.0",
90
- "react-colorful": "^5.6.1",
91
- "react-currency-input-field": "^3.6.11",
92
- "react-dom": "^18.2.0",
93
- "react-draggable": "^4.4.6",
94
- "react-dropzone": "^14.2.3",
95
- "react-hook-form": "^7.45.4",
96
- "react-hot-toast": "^2.4.1",
97
- "react-i18next": "^12.2.2",
98
- "react-lazy-load-image-component": "^1.6.3",
99
- "react-multi-date-picker": "^4.1.2",
100
- "react-router-dom": "^7.7.0",
101
- "react-virtualized-auto-sizer": "^1.0.20",
102
- "react-window": "^1.8.9",
103
- "react-window-infinite-loader": "^1.0.9",
104
- "react18-input-otp": "^1.1.4",
105
- "recharts": "^2.15.1"
106
- },
107
- "devDependencies": {
108
- "@eslint/js": "^9.17.0",
109
- "@testing-library/jest-dom": "^5.16.5",
110
- "@types/lodash": "^4.17.15",
111
- "@types/react": "^18.2.6",
112
- "@types/react-dom": "^18.3.5",
113
- "@types/react-lazy-load-image-component": "^1.6.4",
114
- "@types/react-virtualized-auto-sizer": "^1.0.8",
115
- "@types/react-window": "^1.8.5",
116
- "@types/react-window-infinite-loader": "^1.0.6",
117
- "@vitejs/plugin-react": "^4.3.4",
118
- "eslint": "^9.17.0",
119
- "eslint-plugin-react-hooks": "^5.0.0",
120
- "eslint-plugin-react-refresh": "^0.4.16",
121
- "globals": "^15.14.0",
122
- "husky": "^8.0.3",
123
- "lint-staged": "^13.2.2",
124
- "prettier": "^2.8.8",
125
- "tsc-alias": "^1.8.16",
126
- "typescript": "5.0.2",
127
- "typescript-eslint": "^8.18.2",
128
- "vite": "6.0.5",
129
- "vite-tsconfig-paths": "^4.2.0"
130
- },
131
- "peerDependencies": {
132
- "react": "^18",
133
- "react-dom": "^18",
134
- "@mui/material": "^5",
135
- "@emotion/react": "^11",
136
- "@emotion/styled": "^11",
137
- "framer-motion": "^10",
138
- "react-hook-form": "^7",
139
- "@hookform/resolvers": "^3",
140
- "react-router-dom": "^7",
141
- "i18next": "^22",
142
- "react-i18next": "^12",
143
- "react-multi-date-picker": "^4",
144
- "dayjs": "^1",
145
- "react-dropzone": "^14",
146
- "react-hot-toast": "^2",
147
- "recharts": "^2",
148
- "react-window": "^1.8",
149
- "react-window-infinite-loader": "^1",
150
- "react-virtualized-auto-sizer": "^1",
151
- "re-resizable": "^6",
152
- "react-draggable": "^4",
153
- "react-currency-input-field": "^3",
154
- "react18-input-otp": "^1",
155
- "@uiw/react-json-view": "^2.0.0-alpha"
156
- },
157
- "lint-staged": {
158
- "src/**/*.{ts,tsx,json,js,jsx}": [
159
- "yarn run prettier:fix",
160
- "yarn run lint"
161
- ]
162
- },
163
- "publishConfig": {
164
- "registry": "https://registry.npmjs.org/"
165
- }
166
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.1.161",
5
+ "testVersion": 0,
6
+ "type": "module",
7
+ "main": "build/index.js",
8
+ "module": "build/index.js",
9
+ "types": "build/index.d.ts",
10
+ "exports": {
11
+ "./package.json": "./package.json",
12
+ ".": {
13
+ "types": "./build/index.d.ts",
14
+ "import": "./build/index.js",
15
+ "require": "./build/index.js"
16
+ },
17
+ "./constants": {
18
+ "types": "./build/constants/index.d.ts",
19
+ "import": "./build/constants/index.js",
20
+ "require": "./build/constants/index.js"
21
+ },
22
+ "./components": {
23
+ "types": "./build/components/index.d.ts",
24
+ "import": "./build/components/index.js",
25
+ "require": "./build/components/index.js"
26
+ },
27
+ "./components/*": {
28
+ "types": "./build/components/*/index.d.ts",
29
+ "import": "./build/components/*/index.js",
30
+ "require": "./build/components/*/index.js"
31
+ },
32
+ "./hooks": {
33
+ "types": "./build/hooks/index.d.ts",
34
+ "import": "./build/hooks/index.js",
35
+ "require": "./build/hooks/index.js"
36
+ },
37
+ "./utils": {
38
+ "types": "./build/utils/index.d.ts",
39
+ "import": "./build/utils/index.js",
40
+ "require": "./build/utils/index.js"
41
+ },
42
+ "./theme": {
43
+ "types": "./build/theme/index.d.ts",
44
+ "import": "./build/theme/index.js",
45
+ "require": "./build/theme/index.js"
46
+ },
47
+ "./types": {
48
+ "types": "./build/types/index.d.ts",
49
+ "import": "./build/types/index.js",
50
+ "require": "./build/types/index.js"
51
+ }
52
+ },
53
+ "license": "MIT",
54
+ "author": {
55
+ "name": "Ahmed Sharkawy",
56
+ "email": "a.elsharkawy@tap.company"
57
+ },
58
+ "files": [
59
+ "build",
60
+ "readme.md"
61
+ ],
62
+ "scripts": {
63
+ "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
64
+ "push:local": "yarn ts:build && yalc publish --push",
65
+ "push": "npm run ts:build && npm publish --access public",
66
+ "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
67
+ "dev": "vite",
68
+ "build": "tsc -b && vite build ",
69
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
70
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
71
+ "lint": "eslint . --color",
72
+ "lint:fix": "eslint src --fix --color",
73
+ "preview": "vite preview",
74
+ "prepare": "husky"
75
+ },
76
+ "dependencies": {
77
+ "@emotion/react": "^11.11.0",
78
+ "@emotion/styled": "^11.11.0",
79
+ "@hookform/resolvers": "^3.3.1",
80
+ "@mui/material": "^5.12.3",
81
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
82
+ "axios": "^1.4.0",
83
+ "color": "^5.0.0",
84
+ "dayjs": "^1.11.8",
85
+ "framer-motion": "10.11.0",
86
+ "i18next": "^22.4.15",
87
+ "memoize-one": "^6.0.0",
88
+ "re-resizable": "^6.9.9",
89
+ "react": "^18.2.0",
90
+ "react-colorful": "^5.6.1",
91
+ "react-currency-input-field": "^3.6.11",
92
+ "react-dom": "^18.2.0",
93
+ "react-draggable": "^4.4.6",
94
+ "react-dropzone": "^14.2.3",
95
+ "react-hook-form": "^7.45.4",
96
+ "react-hot-toast": "^2.4.1",
97
+ "react-i18next": "^12.2.2",
98
+ "react-lazy-load-image-component": "^1.6.3",
99
+ "react-multi-date-picker": "^4.1.2",
100
+ "react-router-dom": "^7.7.0",
101
+ "react-virtualized-auto-sizer": "^1.0.20",
102
+ "react-window": "^1.8.9",
103
+ "react-window-infinite-loader": "^1.0.9",
104
+ "react18-input-otp": "^1.1.4",
105
+ "recharts": "^2.15.1"
106
+ },
107
+ "devDependencies": {
108
+ "@eslint/js": "^9.17.0",
109
+ "@testing-library/jest-dom": "^5.16.5",
110
+ "@types/lodash": "^4.17.15",
111
+ "@types/react": "^18.2.6",
112
+ "@types/react-dom": "^18.3.5",
113
+ "@types/react-lazy-load-image-component": "^1.6.4",
114
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
115
+ "@types/react-window": "^1.8.5",
116
+ "@types/react-window-infinite-loader": "^1.0.6",
117
+ "@vitejs/plugin-react": "^4.3.4",
118
+ "eslint": "^9.17.0",
119
+ "eslint-plugin-react-hooks": "^5.0.0",
120
+ "eslint-plugin-react-refresh": "^0.4.16",
121
+ "globals": "^15.14.0",
122
+ "husky": "^8.0.3",
123
+ "lint-staged": "^13.2.2",
124
+ "prettier": "^2.8.8",
125
+ "tsc-alias": "^1.8.16",
126
+ "typescript": "5.0.2",
127
+ "typescript-eslint": "^8.18.2",
128
+ "vite": "6.0.5",
129
+ "vite-tsconfig-paths": "^4.2.0"
130
+ },
131
+ "peerDependencies": {
132
+ "react": "^18",
133
+ "react-dom": "^18",
134
+ "@mui/material": "^5",
135
+ "@emotion/react": "^11",
136
+ "@emotion/styled": "^11",
137
+ "framer-motion": "^10",
138
+ "react-hook-form": "^7",
139
+ "@hookform/resolvers": "^3",
140
+ "react-router-dom": "^7",
141
+ "i18next": "^22",
142
+ "react-i18next": "^12",
143
+ "react-multi-date-picker": "^4",
144
+ "dayjs": "^1",
145
+ "react-dropzone": "^14",
146
+ "react-hot-toast": "^2",
147
+ "recharts": "^2",
148
+ "react-window": "^1.8",
149
+ "react-window-infinite-loader": "^1",
150
+ "react-virtualized-auto-sizer": "^1",
151
+ "re-resizable": "^6",
152
+ "react-draggable": "^4",
153
+ "react-currency-input-field": "^3",
154
+ "react18-input-otp": "^1",
155
+ "@uiw/react-json-view": "^2.0.0-alpha"
156
+ },
157
+ "lint-staged": {
158
+ "src/**/*.{ts,tsx,json,js,jsx}": [
159
+ "yarn run prettier:fix",
160
+ "yarn run lint"
161
+ ]
162
+ },
163
+ "publishConfig": {
164
+ "registry": "https://registry.npmjs.org/"
165
+ }
166
+ }
@@ -1,2 +0,0 @@
1
- import { SalesChannelTypes } from '../../../../types/index.js';
2
- export declare const NON_CLICKABLE_CHANNELS: SalesChannelTypes[];
@@ -1,2 +0,0 @@
1
- import { SalesChannelTypes } from '../../../../types/index.js';
2
- export const NON_CLICKABLE_CHANNELS = [SalesChannelTypes.CALL_CENTER, SalesChannelTypes.PHYSICAL_STORE, SalesChannelTypes.IOS];