@antscorp/antsomi-ui 1.3.5-beta.706 → 1.3.5-beta.708

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.
@@ -18,6 +18,7 @@ import { Button, Typography, Dropdown, ContentEditable, Modal, } from '@antscorp
18
18
  import { EditorTabStyled } from './styled';
19
19
  // Utils
20
20
  import { handleError } from '@antscorp/antsomi-ui/es/utils';
21
+ import { CloseIcon, MoreIcon } from '../../icons';
21
22
  const PATH = 'src/components/EditorTab/index.jsx';
22
23
  export const EditorTab = props => {
23
24
  var _a;
@@ -195,7 +196,7 @@ export const EditorTab = props => {
195
196
  }
196
197
  }),
197
198
  }, placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true },
198
- React.createElement(Button, { icon: React.createElement(Icon, { type: "icon-ants-three-dot-vertical", overlayStyle: { fontSize: 12 } }), size: "small" }))) : closable ? (React.createElement(Button, { onClick: e => handleCloseTab(e, tab, idx), icon: React.createElement(Icon, { type: "icon-ants-remove-slim", overlayStyle: { fontSize: 12 } }), size: "small" })) : null));
199
+ React.createElement(Button, { icon: React.createElement(MoreIcon, { size: 20 }), size: "small" }))) : closable ? (React.createElement(Button, { onClick: e => handleCloseTab(e, tab, idx), icon: React.createElement(CloseIcon, { size: 20 }), size: "small" })) : null));
199
200
  })
200
201
  : null,
201
202
  React.createElement("div", { ref: anchorRightElRef })),
@@ -113,15 +113,15 @@ export const HeaderV2 = memo(props => {
113
113
  showLogo && (React.createElement(LogoWrapper, { className: "logo-wrapper", onClick: onCLickLogo },
114
114
  React.createElement("img", { src: SubLogoAntsomi, alt: "Antsomi sub logo" }))),
115
115
  React.createElement(AccountSelection, Object.assign({}, accountSelectionProps, { currentAccount: selectedAccount, apiConfig: accountSelectionApiConfig, onChange: handleChangeAccount, inputStyle: inputStyle, refreshOnSelect: true })),
116
- React.createElement("div", { className: "title-container" },
117
- breadcrumbs ? (React.createElement("div", { className: "header-breadcrumbs" }, breadcrumbs.map((item, index) => (React.createElement(React.Fragment, { key: `${item.title}_${item.link}` },
116
+ React.createElement("div", { className: "title-container", "data-test": "page-title" },
117
+ breadcrumbs ? (React.createElement("div", { className: "header-breadcrumbs", "data-test": "breadcrumbs" }, breadcrumbs.map((item, index) => (React.createElement(React.Fragment, { key: `${item.title}_${item.link}` },
118
118
  isNil(item.useExternalLink) && !item.useExternalLink ? (React.createElement(Link, { to: item.link || '', className: "header-breadcrumbs__item" }, item.title)) : (React.createElement("a", { href: item.link, className: "header-breadcrumbs__item" }, item.title)),
119
119
  breadcrumbs.length === index + 1 ? null : React.createElement(React.Fragment, null,
120
120
  "\u2002",
121
121
  QUOTE_ENTITY,
122
122
  "\u2002")))))) : null,
123
123
  typeof pageTitle === 'string' ? (React.createElement("div", { className: "page-title" }, pageTitle)) : (pageTitle))),
124
- React.createElement("div", { className: "right-side" },
124
+ React.createElement("div", { "data-test": "header-menu", className: "right-side" },
125
125
  React.createElement(Flex, { gap: 10 },
126
126
  rightContent,
127
127
  showHelp ? React.createElement(Help, Object.assign({ configs: helpConfigProps }, helpProps)) : null,
@@ -3,6 +3,7 @@ import { HideOptionTypes, TContentSourceGroup, UpdateGroupAction } from './types
3
3
  import { FallbackBO } from '@antscorp/antsomi-ui/es/models/FallbackBO';
4
4
  export type TProps = {
5
5
  groups: TContentSourceGroup[];
6
+ justOneGroup?: boolean;
6
7
  isLoadingListBO: boolean;
7
8
  listBO: any;
8
9
  hideOptionTypes?: HideOptionTypes;
@@ -18,6 +18,7 @@ import { THEME } from '@antscorp/antsomi-ui/es/constants';
18
18
  const defaultProps = {
19
19
  groups: [],
20
20
  isShowErrorAlert: false,
21
+ justOneGroup: false,
21
22
  journeySettings: {},
22
23
  isLoadingListBO: true,
23
24
  listFallbackBO: [],
@@ -25,7 +26,7 @@ const defaultProps = {
25
26
  };
26
27
  const Content = (props = defaultProps) => {
27
28
  // prettier-ignore
28
- const { groups, isLoadingListBO, listBO, onChangeGroup, onChangeExpand, expanded, isShowErrorAlert, hideOptionTypes, listFallbackBO, journeySettings, onDeleteGroup } = props;
29
+ const { groups, isLoadingListBO, listBO, onChangeGroup, onChangeExpand, expanded, isShowErrorAlert, hideOptionTypes, listFallbackBO, journeySettings, justOneGroup, onDeleteGroup } = props;
29
30
  const { t } = i18nInstance;
30
31
  const mode = useSelectModeView();
31
32
  const isCDP = mode === 'CDP';
@@ -69,8 +70,8 @@ const Content = (props = defaultProps) => {
69
70
  }, onClick: (e) => handleOnDeleteGroup(e, group.groupId), type: "icon-ants-outline-delete", size: 20 })));
70
71
  };
71
72
  return (React.createElement(Collapse, { ghost: true, bordered: true, activeKey: expanded, expandIconPosition: "end", onChange: handleOnChangeExpand, destroyInactivePanel: true, rootClassName: "no-border-top" }, groups.map((group, index) => {
72
- const groupNode = (React.createElement(Group, { data: group, hideOptionTypes: hideOptionTypes, groupNames: groupNames, isLoadingSelectBO: isLoadingListBO, listBO: listBO, onChange: onChangeGroup, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, listFallbackBO: listFallbackBO }));
73
- if (isCDP) {
73
+ const groupNode = (React.createElement(Group, { data: group, justOneGroup: justOneGroup, hideOptionTypes: hideOptionTypes, groupNames: groupNames, isLoadingSelectBO: isLoadingListBO, listBO: listBO, onChange: onChangeGroup, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, listFallbackBO: listFallbackBO }));
74
+ if (isCDP || justOneGroup) {
74
75
  return React.createElement(React.Fragment, { key: group.groupId }, groupNode);
75
76
  }
76
77
  return (React.createElement(React.Fragment, { key: group.groupId },
@@ -4,6 +4,7 @@ import { FallbackBO } from '@antscorp/antsomi-ui/es/models/FallbackBO';
4
4
  type TProps = {
5
5
  data: TContentSourceGroup;
6
6
  listBO: any[];
7
+ justOneGroup?: boolean;
7
8
  hideOptionTypes?: HideOptionTypes;
8
9
  isLoadingSelectBO: boolean;
9
10
  onChange?: (groupId: string, action: UpdateGroupAction) => void;
@@ -1,7 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { cloneDeep, get, isEmpty } from 'lodash';
3
3
  // Molecules
4
- import { Space, Text } from '../../atoms';
4
+ import { Divider, Space, Text } from '../../atoms';
5
5
  import { SelectV2 as Select } from '../../molecules';
6
6
  // Styled
7
7
  import { WrapperFallback } from './styled';
@@ -31,7 +31,7 @@ const cdpStyle = {
31
31
  };
32
32
  const Group = (props) => {
33
33
  var _a, _b;
34
- const { data, isLoadingSelectBO, listBO, listFallbackBO, hideOptionTypes, isShowErrorAlert, journeySettings, onChange, } = props;
34
+ const { data, isLoadingSelectBO, listBO, listFallbackBO, hideOptionTypes, isShowErrorAlert, journeySettings, justOneGroup = false, onChange, } = props;
35
35
  const { itemTypeId, filters, level, itemTypeName } = data;
36
36
  const mode = useSelectModeView();
37
37
  const isCDP = mode === 'CDP';
@@ -105,10 +105,11 @@ const Group = (props) => {
105
105
  }
106
106
  }, [level, relationship]);
107
107
  return (React.createElement(Space, { size: 20, direction: "vertical" },
108
- React.createElement(Select, { showSearch: true, loading: isLoadingSelectBO, required: isCDP, isReverseMask: isCDP, labelStyle: isCDP ? cdpStyle : {}, style: isCDP ? { width: '100%' } : {}, containerStyle: isCDP ? { flexDirection: 'row', alignItems: 'baseline' } : {}, label: React.createElement(Text, { type: "secondary", color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText }, isCDP ? TRANSLATE_TEXT.csTitle : TRANSLATE_TEXT.selectCsTitle), options: options, placeholder: TRANSLATE_TEXT.selectAnItem, value: convertValue(listBO, itemTypeId), onChange: value => handleChange({
108
+ React.createElement(Select, { showSearch: true, loading: isLoadingSelectBO, required: isCDP, isReverseMask: isCDP, labelStyle: isCDP ? cdpStyle : {}, style: isCDP ? { width: '100%' } : {}, containerStyle: isCDP ? { flexDirection: 'row', alignItems: 'baseline' } : {}, label: React.createElement(Text, { type: "secondary", color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText }, TRANSLATE_TEXT.csTitle), options: options, placeholder: TRANSLATE_TEXT.selectAnItem, value: convertValue(listBO, itemTypeId), onChange: value => handleChange({
109
109
  type: 'BO_TYPE',
110
110
  payload: { itemTypeId: value },
111
111
  }), errorArchive: isCheckBOArchiveDelete(listBO, itemTypeId) }),
112
+ justOneGroup && (React.createElement(Divider, { type: "horizontal", style: { margin: 0 }, rootClassName: "root-divider-bottom-cs", className: "divider-bottom-cs" })),
112
113
  isShowLevelSetting && (React.createElement(LevelSetting, { value: level || 'parent', levelOption: relationship.recommendation_level, onChange: e => {
113
114
  handleChange({
114
115
  type: 'LEVEL',
@@ -4,6 +4,7 @@ import type { ContentSourceModeView, HideOptionTypes, JourneySettings, TContentS
4
4
  interface SettingsProps {
5
5
  serviceAuth: TServiceAuth;
6
6
  mode: ContentSourceModeView;
7
+ justOneGroup?: boolean;
7
8
  hideOptionTypes?: HideOptionTypes;
8
9
  onChange: (contentSource: TContentSourceSettings) => void;
9
10
  onBOChange?: (item: {
@@ -36,7 +36,7 @@ import { deleteContentSourceGroup, setContentSourceGroup, setContentSourceGroupB
36
36
  import { handleError } from '@antscorp/antsomi-ui/es/utils';
37
37
  const PATH = 'src/components/organism/ContentSources/Settings.tsx';
38
38
  const Settings = (props) => {
39
- const { serviceAuth, mode, isShowErrorAlert, initValue, journeySettings, hideOptionTypes, onChange, onBOChange, } = props;
39
+ const { serviceAuth, mode, isShowErrorAlert, initValue, justOneGroup = false, journeySettings, hideOptionTypes, onChange, onBOChange, } = props;
40
40
  const { url = '', userId, token, accountId } = serviceAuth;
41
41
  const { t } = i18nInstance;
42
42
  const boIdByGroupCS = useSelectBoIdByGroupFromCS();
@@ -56,7 +56,7 @@ const Settings = (props) => {
56
56
  }, {
57
57
  onSuccess(data) {
58
58
  if (!isInitDataCDPDone &&
59
- isCDP &&
59
+ (isCDP || justOneGroup) &&
60
60
  isArray(data) &&
61
61
  contentSources.groups.length === 1 &&
62
62
  contentSources.groups[0] &&
@@ -69,7 +69,7 @@ const Settings = (props) => {
69
69
  let valueRanking = GET_TOP_RANKING_DEFAULT;
70
70
  if (itemTypeId === PRODUCT_ITEM_TYPE_ID) {
71
71
  valueRanking = PRODUCT_RANKING_DEFAULT;
72
- if (isCDP) {
72
+ if (isCDP || justOneGroup) {
73
73
  set(valueRanking, 'algorithms.sort', 'order');
74
74
  }
75
75
  }
@@ -109,7 +109,7 @@ const Settings = (props) => {
109
109
  let valueRanking = GET_TOP_RANKING_DEFAULT;
110
110
  if (id === PRODUCT_ITEM_TYPE_ID) {
111
111
  valueRanking = PRODUCT_RANKING_DEFAULT;
112
- if (isCDP) {
112
+ if (isCDP || justOneGroup) {
113
113
  set(valueRanking, 'algorithms.sort', 'order');
114
114
  }
115
115
  }
@@ -224,28 +224,28 @@ const Settings = (props) => {
224
224
  }, [mode, contentSourceDispatch]);
225
225
  // INIT group in case using CDP mode
226
226
  useLayoutEffect(() => {
227
- if (isCDP && groups.length === 0) {
227
+ if ((isCDP || justOneGroup) && groups.length === 0) {
228
228
  contentSourceDispatch({
229
229
  type: 'ADD_CONTENT_SOURCE',
230
230
  payload: {},
231
231
  });
232
232
  }
233
- }, [isCDP, contentSourceDispatch, groups.length]);
233
+ }, [isCDP, justOneGroup, contentSourceDispatch, groups.length]);
234
234
  // init data
235
235
  useDeepCompareEffect(() => {
236
236
  if (!isEmpty(initValue)) {
237
237
  contentSourceDispatch(updateContentSourceSettings(initValue));
238
- if (isCDP) {
238
+ if (isCDP || justOneGroup) {
239
239
  setIsInitDataCDPDone(true);
240
240
  }
241
241
  }
242
242
  else {
243
- if (isCDP) {
243
+ if (isCDP || justOneGroup) {
244
244
  refetchListBO();
245
245
  setIsInitDataCDPDone(false);
246
246
  }
247
247
  }
248
- }, [initValue, contentSourceDispatch, isCDP]);
248
+ }, [initValue, contentSourceDispatch, isCDP, justOneGroup]);
249
249
  useDeepCompareEffect(() => {
250
250
  let ignore = false;
251
251
  if (!isEmpty(boIdByGroupCS) && !isEmpty(serviceAuth)) {
@@ -284,7 +284,7 @@ const Settings = (props) => {
284
284
  }
285
285
  }, [contentSourcesDebounce]);
286
286
  return (React.createElement(ContentContainer, { className: "contentsource-container" },
287
- React.createElement(Content, { isLoadingListBO: isLoadingListBO || isLoadingDataTableBO, hideOptionTypes: hideOptionTypes, listBO: listBO, groups: groups, expanded: expanded, onChangeExpand: expanded => {
287
+ React.createElement(Content, { isLoadingListBO: isLoadingListBO || isLoadingDataTableBO, hideOptionTypes: hideOptionTypes, justOneGroup: justOneGroup, listBO: listBO, groups: groups, expanded: expanded, onChangeExpand: expanded => {
288
288
  contentSourceDispatch({
289
289
  type: 'EXPANDED',
290
290
  payload: {
@@ -294,7 +294,7 @@ const Settings = (props) => {
294
294
  }, onChangeGroup: (groupId, action) => {
295
295
  handleChangeContentSourceGroup(groupId, action);
296
296
  }, onDeleteGroup: groupId => handleDeleteContentSourceGroup(groupId), journeySettings: journeySettings, isShowErrorAlert: isShowErrorAlert, listFallbackBO: listFallbackBO || [] }),
297
- groups.length < MAX_NUM_OF_CONTENT_SOURCE && !isCDP && (React.createElement(Button, { type: "text", onClick: () => contentSourceDispatch({
297
+ groups.length < MAX_NUM_OF_CONTENT_SOURCE && !isCDP && !justOneGroup && (React.createElement(Button, { type: "text", onClick: () => contentSourceDispatch({
298
298
  type: 'ADD_CONTENT_SOURCE',
299
299
  payload: {},
300
300
  }) },
@@ -17,7 +17,10 @@ const LevelSetting = (props) => {
17
17
  const { onChange, levelOption, value } = props;
18
18
  const mode = useSelectModeView();
19
19
  const isCDP = mode === 'CDP';
20
- return (React.createElement(SettingWrapper, { label: t(translations.level.title).toString(), labelStyle: { fontWeight: mode === 'CDP' ? 'normal' : 'bold', width: LABEL_WIDTH }, labelColor: isCDP ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText : undefined, containerStyle: isCDP ? { justifyContent: 'flex-start' } : {} },
20
+ return (React.createElement(SettingWrapper, { label: t(translations.level.title).toString(), labelStyle: {
21
+ fontWeight: isCDP ? 'normal' : 'bold',
22
+ width: isCDP ? LABEL_WIDTH : 'auto',
23
+ }, labelColor: isCDP ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText : undefined, containerStyle: isCDP ? { justifyContent: 'flex-start' } : {} },
21
24
  React.createElement(RadioGroup, { options: LEVEL_OPTIONS[levelOption], defaultValue: value, value: value, onChange: onChange })));
22
25
  };
23
26
  export default React.memo(LevelSetting);
@@ -5,6 +5,7 @@ export interface ContentSourceProps {
5
5
  useQueryClient: boolean;
6
6
  serviceAuth: TServiceAuth;
7
7
  isShowErrorAlert: boolean;
8
+ justOneGroup?: boolean;
8
9
  hideOptionTypes?: HideOptionTypes;
9
10
  mode: ContentSourceModeView;
10
11
  initValue?: TContentSourceSettings;
@@ -11,6 +11,7 @@ import { JOURNEY_SETTINGS_DEFAULT } from './constants';
11
11
  const defaultProps = {
12
12
  useQueryClient: true,
13
13
  isShowErrorAlert: false,
14
+ justOneGroup: false,
14
15
  hideOptionTypes: {
15
16
  filter: false,
16
17
  level: false,
@@ -28,12 +29,12 @@ const defaultProps = {
28
29
  },
29
30
  };
30
31
  const ContentSource = (props) => {
31
- const { useQueryClient, serviceAuth, mode, isShowErrorAlert, initValue, hideOptionTypes, journeySettings, onChange, onBOChange, } = props;
32
+ const { useQueryClient, serviceAuth, mode, isShowErrorAlert, justOneGroup, initValue, hideOptionTypes, journeySettings, onChange, onBOChange, } = props;
32
33
  if (!useQueryClient)
33
- return (React.createElement(Settings, { mode: mode, initValue: initValue, hideOptionTypes: hideOptionTypes, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange, onBOChange: onBOChange }));
34
+ return (React.createElement(Settings, { mode: mode, initValue: initValue, hideOptionTypes: hideOptionTypes, justOneGroup: justOneGroup, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange, onBOChange: onBOChange }));
34
35
  return (React.createElement(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI },
35
36
  React.createElement(ContentSourceProvider, null,
36
- React.createElement(Settings, { mode: mode, initValue: initValue, hideOptionTypes: hideOptionTypes, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange, onBOChange: onBOChange }))));
37
+ React.createElement(Settings, { mode: mode, initValue: initValue, justOneGroup: justOneGroup, hideOptionTypes: hideOptionTypes, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange, onBOChange: onBOChange }))));
37
38
  };
38
39
  ContentSource.defaultProps = defaultProps;
39
40
  export default memo(ContentSource);
@@ -137,7 +137,7 @@ const Help = props => {
137
137
  type: 'divider',
138
138
  },
139
139
  {
140
- label: (React.createElement("a", { href: `${domainTicket}/${portalId}/#/${userId}/tickets`, target: "_blank", rel: "noreferrer" },
140
+ label: (React.createElement("a", { href: `${domainTicket}/${portalId}/#/${userId}/tickets`, target: "_blank", rel: "noreferrer", style: { textDecoration: 'none' } },
141
141
  React.createElement(Label, { className: "verify-support" }, "Verify support request"))),
142
142
  key: MENU_KEYS.SUPPORT,
143
143
  },
@@ -81,9 +81,9 @@ export const TemplateListing = memo(props => {
81
81
  previewBtnProps: Object.assign(Object.assign({}, previewBtnProps), { onClick: handleClickThumbnailPreview }) }, restOfTemplateItemProps))));
82
82
  }))),
83
83
  !loading && !blankTemplateProps.show && !isHasData && (React.createElement(EmptyData, { icon: emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.icon, title: emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.description })))));
84
- return (React.createElement(TemplateListingWrapper, { "data-test": "template-listing-container" },
85
- React.createElement(CategoryListing, Object.assign({}, categoryListingProps, { emptyProps: emptyProps })),
86
- React.createElement(TemplateWrapper, { className: wrapperClassName, style: wrapperStyle },
84
+ return (React.createElement(TemplateListingWrapper, { "data-test": "template-listing-component" },
85
+ React.createElement(CategoryListing, Object.assign({}, categoryListingProps, { emptyProps: emptyProps, "data-test": "template-listing-categories" })),
86
+ React.createElement(TemplateWrapper, { className: wrapperClassName, style: wrapperStyle, "data-test": "template-listing-container" },
87
87
  header,
88
88
  content
89
89
  ? typeof content === 'function'
package/es/test.js CHANGED
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  import React, { useState } from 'react';
12
12
  import { createRoot } from 'react-dom/client';
13
13
  import '@antscorp/icons/main.css';
14
- import { TemplateSaveAsModal, useTemplateSave, Button, Layout, } from './components';
14
+ import { TemplateSaveAsModal, useTemplateSave, Button, Layout, Login, ContentSources, } from './components';
15
15
  // Constants
16
16
  import { GET_LIST_TYPE, OBJECT_TYPES, PUBLIC_LEVEL } from './constants';
17
17
  // import { Slider } from 'antd';
@@ -107,6 +107,24 @@ export const App = () => {
107
107
  const callbackSlideBar = (type, data) => {
108
108
  console.log({ type, data });
109
109
  };
110
+ const d = {
111
+ loginDomain: 'https://iam.ants.tech/',
112
+ };
113
+ // const d = {
114
+ // loginDomain: 'https://sandbox-aacm.ants.vn',
115
+ // networkId: '76753',
116
+ // theme: 'white',
117
+ // u_ogs: 'uogs_sand_48956',
118
+ // apiDomain: '//sandbox-permission.ants.vn',
119
+ // };
120
+ /* Login */
121
+ return (React.createElement(ContentSources, { mode: "MEDIA", useQueryClient: true, justOneGroup: true, serviceAuth: {
122
+ url: 'https://sandbox-media-template.antsomi.com/cdp/api/v1',
123
+ userId: '1600080515',
124
+ accountId: '1600083946',
125
+ token: '5474r2x214z254a4u2a4y454t4065406a434d4e4b4z5',
126
+ } }));
127
+ return React.createElement(Login, Object.assign({}, d));
110
128
  /* MatchesAnySelect */
111
129
  return React.createElement(MatchesAnySelectTest, null);
112
130
  /* Data Table */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.706",
3
+ "version": "1.3.5-beta.708",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -19,6 +19,7 @@
19
19
  "unpkg": "dist/index.js",
20
20
  "types": "es/index.d.ts",
21
21
  "scripts": {
22
+ "prepublishOnly": "yarn && yarn build:es",
22
23
  "build:es": "npm run clean && npm run copy-files && npm run ts-compile",
23
24
  "clean": "rimraf dist lib es",
24
25
  "dev": "vite",
@@ -32,8 +33,6 @@
32
33
  "serve-storybook": "serve storybook-static",
33
34
  "version": "auto-changelog -p && git add CHANGELOG.md",
34
35
  "test": "jest",
35
- "test:clean": "rimraf coverage",
36
- "test:update-snapshot": "jest -u",
37
36
  "test:changed": "jest --onlyChanged",
38
37
  "test:watch": "jest --watch",
39
38
  "test:coverage": "jest --coverage",
@@ -114,10 +113,8 @@
114
113
  "react-color": "2.19.3",
115
114
  "react-cookie": "^7.1.4",
116
115
  "react-custom-scrollbars": "^4.2.1",
117
- "react-device-detect": "^2.2.3",
118
116
  "react-draggable": "^4.4.5",
119
117
  "react-frame-component": "^5.2.6",
120
- "react-google-recaptcha": "^3.1.0",
121
118
  "react-helmet": "^6.1.0",
122
119
  "react-intersection-observer": "^9.10.3",
123
120
  "react-konva": "^18.2.10",
@@ -147,8 +144,6 @@
147
144
  "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
148
145
  "@babel/plugin-proposal-optional-chaining": "^7.21.0",
149
146
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
150
- "@babel/plugin-syntax-jsx": "^7.23.3",
151
- "@babel/plugin-transform-modules-commonjs": "^7.23.3",
152
147
  "@babel/plugin-transform-react-jsx": "^7.23.4",
153
148
  "@babel/plugin-transform-react-jsx-source": "^7.23.3",
154
149
  "@babel/plugin-transform-runtime": "^7.23.6",
@@ -188,7 +183,6 @@
188
183
  "@vitejs/plugin-react": "^4.3.1",
189
184
  "@vitest/ui": "^2.0.4",
190
185
  "auto-changelog": "^2.4.0",
191
- "babel-jest": "^29.7.0",
192
186
  "babel-loader": "^8.3.0",
193
187
  "babel-plugin-import": "^1.13.8",
194
188
  "babel-plugin-module-resolver": "^5.0.0",
@@ -235,12 +229,10 @@
235
229
  "ts-loader": "^9.4.2",
236
230
  "ts-node": "^10.9.1",
237
231
  "tsconfig-paths-webpack-plugin": "^4.0.1",
238
- "type-fest": "^4.10.2",
239
232
  "tsx": "^4.16.2",
240
233
  "type-fest": "^4.10.2",
241
234
  "typescript": "^5.4.3",
242
235
  "vite": "^5.3.4",
243
- "vite-plugin-commonjs": "^0.10.1",
244
236
  "vite-plugin-mkcert": "^1.17.5",
245
237
  "vitest": "^2.0.4",
246
238
  "webpack": "^5.78.0",