@3sc/common-component 0.0.2 → 0.0.4

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.
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.assign.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactSelect = _interopRequireDefault(require("react-select"));
10
+ var _Constant = require("../../utils/Constant");
11
+ const _excluded = ["option", "value", "handleSelectChange"];
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
+ const ReactSelect = _ref => {
17
+ let {
18
+ option,
19
+ value,
20
+ handleSelectChange
21
+ } = _ref,
22
+ otherProps = _objectWithoutProperties(_ref, _excluded);
23
+ return /*#__PURE__*/_react.default.createElement(_reactSelect.default, _extends({}, otherProps, {
24
+ options: option,
25
+ value: value,
26
+ className: "custom-select-container",
27
+ onChange: handleSelectChange,
28
+ theme: _Constant.customSelectTheme
29
+ }));
30
+ };
31
+ var _default = exports.default = ReactSelect;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const SortIcon = _ref => {
10
+ let {
11
+ sortKey,
12
+ sortDir,
13
+ column
14
+ } = _ref;
15
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, sortKey === column ? !sortDir ? /*#__PURE__*/_react.default.createElement("i", {
16
+ className: "fa fa-arrow-up",
17
+ "aria-hidden": "true"
18
+ }) : /*#__PURE__*/_react.default.createElement("i", {
19
+ className: "fa fa-arrow-down",
20
+ "aria-hidden": "true"
21
+ }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("i", {
22
+ className: "fa fa-sort",
23
+ "aria-hidden": "true"
24
+ })));
25
+ };
26
+ var _default = exports.default = SortIcon;
@@ -8,6 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = exports.TasksDispatchContext = exports.TasksContext = void 0;
9
9
  require("core-js/modules/web.dom-collections.iterator.js");
10
10
  var _react = _interopRequireWildcard(require("react"));
11
+ var _ActionType = _interopRequireDefault(require("../utils/ActionType"));
12
+ var _ErrorMsg = _interopRequireDefault(require("../utils/ErrorMsg"));
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -31,27 +34,34 @@ function MyContext(_ref) {
31
34
  var _default = exports.default = MyContext;
32
35
  function tasksReducer(tasks, action) {
33
36
  switch (action.type) {
34
- case "loading":
37
+ case _ActionType.default.LOADING:
35
38
  return _objectSpread(_objectSpread({}, tasks), {}, {
36
39
  loading: action.loading
37
40
  });
38
- case "success":
41
+ case _ActionType.default.SUCCESS:
39
42
  {
40
43
  return _objectSpread(_objectSpread({}, tasks), {}, {
41
44
  data: action.data
42
45
  });
43
46
  }
44
- case "error":
47
+ case _ActionType.default.MARK_ALL_AS_READ:
48
+ return _objectSpread(_objectSpread({}, tasks), {}, {
49
+ isMarkAllAsRead: action.isMarkAllAsRead
50
+ });
51
+ case _ActionType.default.ERROR:
45
52
  return _objectSpread(_objectSpread({}, tasks), {}, {
46
53
  error: action.error
47
54
  });
48
55
  default:
49
- throw new Error("Unhandled action type: ".concat(action));
56
+ throw new Error("".concat(_ErrorMsg.default.UNHANDLED, ": ").concat(action));
50
57
  }
51
58
  }
52
59
  const initialTasks = {
53
60
  loading: false,
54
61
  data: [],
55
62
  error: "",
56
- isMarkAllAsRead: true
63
+ isMarkAllAsRead: {
64
+ count: 0,
65
+ boo: false
66
+ }
57
67
  };
@@ -12,6 +12,10 @@ const theme = (0, _material.createTheme)({
12
12
  },
13
13
  secondary: {
14
14
  main: "#1D1D1B"
15
+ },
16
+ input: {
17
+ color: "rgba(0, 0, 0, 0.87)",
18
+ border: "#ACB2BA"
15
19
  }
16
20
  }
17
21
  });
@@ -3,7 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getLocalStorage = void 0;
6
+ exports.sortByKeyArr = exports.searchByKeyArr = exports.getLocalStorage = exports.fullFormatDate = exports.filterAlertData = exports.detectMarkAllAsRead = exports.dataSlice = exports.createPayloadMarkAllAsRead = void 0;
7
+ require("core-js/modules/es.array.sort.js");
8
+ require("core-js/modules/es.array.includes.js");
9
+ require("core-js/modules/es.string.includes.js");
10
+ require("core-js/modules/es.string.trim.js");
7
11
  const getLocalStorage = key => {
8
12
  const value = localStorage.getItem(key);
9
13
  if (value) {
@@ -11,4 +15,76 @@ const getLocalStorage = key => {
11
15
  }
12
16
  return "";
13
17
  };
14
- exports.getLocalStorage = getLocalStorage;
18
+ exports.getLocalStorage = getLocalStorage;
19
+ const fullFormatDate = date => {
20
+ const currentDate = new Date(date);
21
+ const options = {
22
+ year: "numeric",
23
+ month: "long",
24
+ day: "2-digit",
25
+ hour: "2-digit",
26
+ minute: "2-digit",
27
+ second: "2-digit",
28
+ hour12: true
29
+ };
30
+ const formattedDate = currentDate.toLocaleString("en-US", options);
31
+ return formattedDate;
32
+ };
33
+ exports.fullFormatDate = fullFormatDate;
34
+ const filterAlertData = data => {
35
+ const newData = data.sort((a, b) => {
36
+ if (a.isRead === b.isRead) {
37
+ return 0;
38
+ } else if (b.isRead) {
39
+ return -1;
40
+ } else {
41
+ return 1;
42
+ }
43
+ }).slice(0, 9);
44
+ return newData;
45
+ };
46
+ exports.filterAlertData = filterAlertData;
47
+ const detectMarkAllAsRead = data => {
48
+ let count = 0;
49
+ for (let i = 0; i < data.length; i++) {
50
+ if (!data[i].isRead) count++;
51
+ ;
52
+ }
53
+ return count;
54
+ };
55
+ exports.detectMarkAllAsRead = detectMarkAllAsRead;
56
+ const createPayloadMarkAllAsRead = data => {
57
+ const payload = [];
58
+ data.forEach(item => {
59
+ if (!item.isRead) {
60
+ payload.push(item.id);
61
+ }
62
+ });
63
+ return payload;
64
+ };
65
+ exports.createPayloadMarkAllAsRead = createPayloadMarkAllAsRead;
66
+ const searchByKeyArr = (data, keyArr, value) => {
67
+ const newData = data.filter(item => {
68
+ return keyArr.some(key => {
69
+ return item[key].toLowerCase().includes(value.trim().toLowerCase());
70
+ });
71
+ });
72
+ return newData;
73
+ };
74
+ exports.searchByKeyArr = searchByKeyArr;
75
+ const sortByKeyArr = (data, key, order) => {
76
+ const newData = data.sort((a, b) => {
77
+ if (order === "asc") {
78
+ return a[key].toLowerCase().localeCompare(b[key].toLowerCase());
79
+ } else {
80
+ return b[key].toLowerCase().localeCompare(a[key].toLowerCase());
81
+ }
82
+ });
83
+ return newData;
84
+ };
85
+ exports.sortByKeyArr = sortByKeyArr;
86
+ const dataSlice = (data, page, rowPerPage) => {
87
+ const newData = data.slice((page - 1) * rowPerPage, page * rowPerPage);
88
+ return newData;
89
+ };
90
+ exports.dataSlice = dataSlice;
@@ -9,16 +9,7 @@ var _alert = _interopRequireDefault(require("../components/alert"));
9
9
  var _muiProvider = _interopRequireDefault(require("../config/mui-provider"));
10
10
  var _myContext = _interopRequireDefault(require("../config/my-context"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- const Notification = _ref => {
13
- let {
14
- tenantId,
15
- buId,
16
- snopId
17
- } = _ref;
18
- return /*#__PURE__*/_react.default.createElement(_muiProvider.default, null, /*#__PURE__*/_react.default.createElement(_myContext.default, null, /*#__PURE__*/_react.default.createElement(_alert.default, {
19
- tenantId: tenantId,
20
- buId: buId,
21
- snopId: snopId
22
- })));
12
+ const Notification = () => {
13
+ return /*#__PURE__*/_react.default.createElement(_muiProvider.default, null, /*#__PURE__*/_react.default.createElement(_myContext.default, null, /*#__PURE__*/_react.default.createElement(_alert.default, null)));
23
14
  };
24
15
  exports.Notification = Notification;
@@ -1,2 +1,7 @@
1
1
  $primary-color: #E94F1C;
2
- $secondary-color: #1D1D1B;
2
+ $secondary-color: #1D1D1B;
3
+ $light-grey: #ACB2BA;
4
+ $table-header: #efefef;
5
+ $table-td-color: #212529;
6
+
7
+ // other variables
@@ -1 +1 @@
1
- $fontFamily: "Montserrat";
1
+ $fontFamily: Montserrat, sans-serif;
@@ -3,26 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getNotification = void 0;
6
+ exports.putNotification = exports.getNotification = void 0;
7
7
  require("core-js/modules/es.promise.js");
8
8
  var _axios = _interopRequireDefault(require("../config/axios"));
9
9
  var _Constant = require("../utils/Constant");
10
10
  var _EndPoint = _interopRequireDefault(require("../utils/EndPoint"));
11
11
  var _Env = _interopRequireDefault(require("../utils/Env"));
12
+ var _LocalStorage = _interopRequireDefault(require("../utils/LocalStorage"));
12
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14
  const {
14
15
  TENANT_ID,
15
16
  BU_ID,
16
17
  SNOP_ID
17
18
  } = _Constant.OTHER_CONSTANT;
18
- const getNotification = async _ref => {
19
- let {
20
- tenantId,
21
- buId,
22
- snopId
23
- } = _ref;
19
+ const {
20
+ TENANT_IDS,
21
+ BU_IDS,
22
+ SNOP_IDS
23
+ } = _LocalStorage.default;
24
+ const getNotification = async () => {
24
25
  try {
25
- const url = "".concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(tenantId, "&").concat(BU_ID, "=").concat(buId, "&").concat(SNOP_ID, "=").concat(snopId);
26
+ const url = "".concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(TENANT_IDS, "&").concat(BU_ID, "=").concat(BU_IDS, "&").concat(SNOP_ID, "=").concat(SNOP_IDS);
26
27
  const response = await _axios.default.get(url);
27
28
  return response;
28
29
  } catch (e) {
@@ -30,4 +31,15 @@ const getNotification = async _ref => {
30
31
  return e;
31
32
  }
32
33
  };
33
- exports.getNotification = getNotification;
34
+ exports.getNotification = getNotification;
35
+ const putNotification = async payload => {
36
+ try {
37
+ const url = "".concat(_EndPoint.default.NOTIFICATION).concat(_Env.default.VERSION, "?").concat(TENANT_ID, "=").concat(TENANT_IDS, "&").concat(BU_ID, "=").concat(BU_IDS, "&").concat(SNOP_ID, "=").concat(SNOP_IDS);
38
+ const response = await _axios.default.put(url, payload);
39
+ return response;
40
+ } catch (e) {
41
+ // do something
42
+ return e;
43
+ }
44
+ };
45
+ exports.putNotification = putNotification;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const ACTION_TYPE = {
8
+ LOADING: "LOADING",
9
+ SUCCESS: "SUCCESS",
10
+ ERROR: "ERROR",
11
+ MARK_ALL_AS_READ: "MARK_ALL_AS_READ"
12
+ };
13
+ var _default = exports.default = ACTION_TYPE;
@@ -3,13 +3,52 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.OTHER_CONSTANT = exports.LOCAL_STORAGE_KEY = void 0;
6
+ exports.optionRow = exports.detailsSearchKey = exports.detailsHeadObj = exports.customSelectTheme = exports.alertSearchKey = exports.OTHER_CONSTANT = exports.LOCAL_STORAGE_KEY = exports.HEADER_ICON_TYPE = void 0;
7
+ require("core-js/modules/es.symbol.description.js");
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
12
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
13
  const LOCAL_STORAGE_KEY = exports.LOCAL_STORAGE_KEY = {
8
- TOKEN: "token"
14
+ TOKEN: "token",
15
+ USER: "user",
16
+ SNOP: "snop"
9
17
  };
10
18
  const OTHER_CONSTANT = exports.OTHER_CONSTANT = {
11
19
  BEARER: "Bearer",
12
20
  TENANT_ID: "tenant_id",
13
21
  BU_ID: "bu_id",
14
22
  SNOP_ID: "snop_id"
15
- };
23
+ };
24
+ const HEADER_ICON_TYPE = exports.HEADER_ICON_TYPE = {
25
+ REFRESH: "refresh",
26
+ CLOSE: "close"
27
+ };
28
+ const optionRow = exports.optionRow = [{
29
+ label: "Show 10 Rows",
30
+ value: 10
31
+ }, {
32
+ label: "Show 20 Rows",
33
+ value: 20
34
+ }, {
35
+ label: "Show 30 Rows",
36
+ value: 30
37
+ }];
38
+ const detailsHeadObj = exports.detailsHeadObj = {
39
+ "SKU Name": "sku_name",
40
+ Node: "node",
41
+ "Channel Name": "channel_name"
42
+ };
43
+ const detailsSearchKey = exports.detailsSearchKey = Object.values(detailsHeadObj);
44
+ const alertSearchKey = exports.alertSearchKey = ["message", "sub_type"];
45
+ const customSelectTheme = theme => {
46
+ return _objectSpread(_objectSpread({}, theme), {}, {
47
+ borderRadius: 2,
48
+ colors: _objectSpread(_objectSpread({}, theme.colors), {}, {
49
+ primary25: "#F2F2F2",
50
+ primary: "#E94F1C"
51
+ })
52
+ });
53
+ };
54
+ exports.customSelectTheme = customSelectTheme;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const ERROR_MSG = {
8
+ SWR: "Something went wrong!",
9
+ UNHANDLED: "Unhandled action type: ",
10
+ INVALID: "Invalid action type: ",
11
+ INVALID_ACTION: "Invalid action type: ",
12
+ NRF: "Not record found!"
13
+ };
14
+ var _default = exports.default = ERROR_MSG;
@@ -6,7 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _commonFun = require("../helper/common-fun");
8
8
  var _Constant = require("./Constant");
9
+ const user = (0, _commonFun.getLocalStorage)(_Constant.LOCAL_STORAGE_KEY.USER);
10
+ const snop = (0, _commonFun.getLocalStorage)(_Constant.LOCAL_STORAGE_KEY.SNOP);
9
11
  const LOCAL_STORAGE = {
10
- TOKEN: (0, _commonFun.getLocalStorage)(_Constant.LOCAL_STORAGE_KEY.TOKEN)
12
+ TOKEN: (0, _commonFun.getLocalStorage)(_Constant.LOCAL_STORAGE_KEY.TOKEN),
13
+ BU_IDS: user === null || user === void 0 ? void 0 : user.business_unit_id,
14
+ TENANT_IDS: user === null || user === void 0 ? void 0 : user.tenant_id,
15
+ SNOP_IDS: snop === null || snop === void 0 ? void 0 : snop.snop_id
11
16
  };
12
17
  var _default = exports.default = LOCAL_STORAGE;
package/package.json CHANGED
@@ -1,60 +1,63 @@
1
- {
2
- "name": "@3sc/common-component",
3
- "version": "0.0.2",
4
- "keywords": [
5
- "react",
6
- "components",
7
- "ui"
8
- ],
9
- "main": "dist/modules",
10
- "module": "dist/modules",
11
- "files": [
12
- "dist",
13
- "README.md"
14
- ],
15
- "dependencies": {
16
- "@emotion/react": "^11.11.3",
17
- "@emotion/styled": "^11.11.0",
18
- "@mui/icons-material": "^5.14.5",
19
- "@mui/material": "^5.15.5",
20
- "@testing-library/jest-dom": "^5.17.0",
21
- "@testing-library/react": "^13.4.0",
22
- "@testing-library/user-event": "^13.5.0",
23
- "axios": "^1.6.5",
24
- "react": "^18.2.0",
25
- "react-dom": "^18.2.0",
26
- "react-scripts": "5.0.1",
27
- "sass": "^1.69.7",
28
- "web-vitals": "^2.1.4"
29
- },
30
- "scripts": {
31
- "start": "react-scripts start",
32
- "build": "babel src --out-dir dist --copy-files",
33
- "test": "react-scripts test",
34
- "eject": "react-scripts eject"
35
- },
36
- "eslintConfig": {
37
- "extends": [
38
- "react-app",
39
- "react-app/jest"
40
- ]
41
- },
42
- "browserslist": {
43
- "production": [
44
- ">0.2%",
45
- "not dead",
46
- "not op_mini all"
47
- ],
48
- "development": [
49
- "last 1 chrome version",
50
- "last 1 firefox version",
51
- "last 1 safari version"
52
- ]
53
- },
54
- "devDependencies": {
55
- "@babel/cli": "^7.23.4",
56
- "@babel/core": "^7.23.7",
57
- "@babel/preset-env": "^7.23.8",
58
- "babel-plugin-inline-dotenv": "^1.7.0"
59
- }
60
- }
1
+ {
2
+ "name": "@3sc/common-component",
3
+ "version": "0.0.4",
4
+ "keywords": [
5
+ "react",
6
+ "components",
7
+ "ui"
8
+ ],
9
+ "main": "dist/modules",
10
+ "module": "dist/modules",
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "dependencies": {
16
+ "@emotion/react": "^11.11.3",
17
+ "@emotion/styled": "^11.11.0",
18
+ "@mui/icons-material": "^5.14.5",
19
+ "@mui/material": "^5.15.5",
20
+ "@testing-library/jest-dom": "^5.17.0",
21
+ "@testing-library/react": "^13.4.0",
22
+ "@testing-library/user-event": "^13.5.0",
23
+ "axios": "^1.6.5",
24
+ "i": "^0.3.7",
25
+ "npm": "^10.3.0",
26
+ "react": "^18.2.0",
27
+ "react-dom": "^18.2.0",
28
+ "react-scripts": "5.0.1",
29
+ "react-select": "^5.8.0",
30
+ "sass": "^1.69.7",
31
+ "web-vitals": "^2.1.4"
32
+ },
33
+ "scripts": {
34
+ "start": "react-scripts start",
35
+ "build": "babel src --out-dir dist --copy-files",
36
+ "test": "react-scripts test",
37
+ "eject": "react-scripts eject"
38
+ },
39
+ "eslintConfig": {
40
+ "extends": [
41
+ "react-app",
42
+ "react-app/jest"
43
+ ]
44
+ },
45
+ "browserslist": {
46
+ "production": [
47
+ ">0.2%",
48
+ "not dead",
49
+ "not op_mini all"
50
+ ],
51
+ "development": [
52
+ "last 1 chrome version",
53
+ "last 1 firefox version",
54
+ "last 1 safari version"
55
+ ]
56
+ },
57
+ "devDependencies": {
58
+ "@babel/cli": "^7.23.4",
59
+ "@babel/core": "^7.23.7",
60
+ "@babel/preset-env": "^7.23.8",
61
+ "babel-plugin-inline-dotenv": "^1.7.0"
62
+ }
63
+ }