@fixefy/fixefy-ui-components 0.3.87 → 0.3.89

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.
@@ -121,7 +121,7 @@ function _object_spread_props(target, source) {
121
121
  }
122
122
  const FxAsyncDropdown = (props)=>{
123
123
  var _fetcher_query;
124
- const { onAdd, onRemoveAll, onUnselectAll, fetcher, disabled, defaultValue, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, options_path, _id } = props;
124
+ const { assetUrl, onAdd, onRemoveAll, onUnselectAll, fetcher, disabled, defaultValue, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, options_path, _id } = props;
125
125
  const ref = (0, _react.useRef)(null);
126
126
  const { method_name } = variables !== null && variables !== void 0 ? variables : {};
127
127
  var _fetcher_queryOptions_variables;
@@ -436,6 +436,7 @@ const FxAsyncDropdown = (props)=>{
436
436
  paddingLeft: '3px'
437
437
  },
438
438
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
439
+ assetUrl: assetUrl,
439
440
  onClick: ()=>{
440
441
  setDisplayed([]);
441
442
  if (onRemoveAll) {
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  };
19
19
  }
20
20
  const ChosenIcon = ({ option, isDisplay, fetchedProps, displayed })=>{
21
- const { title_path, multiple, search_path } = fetchedProps;
21
+ const { assetUrl, title_path, multiple, search_path } = fetchedProps;
22
22
  const isChecked = (option)=>{
23
23
  const clicked = (0, _helpers.getOption)(option, title_path);
24
24
  if (typeof displayed === 'string') {
@@ -37,7 +37,8 @@ const ChosenIcon = ({ option, isDisplay, fetchedProps, displayed })=>{
37
37
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
38
38
  width: 16,
39
39
  height: 16,
40
- icon: 'filters/chosen_icon.svg'
40
+ icon: 'filters/chosen_icon.svg',
41
+ assetUrl: assetUrl
41
42
  });
42
43
  }
43
44
  return null;
@@ -82,13 +82,14 @@ const LogoOption = ({ option, curValue, modal, fetchedProps, displayed, setDispl
82
82
  };
83
83
  const Logo = ({ option, fetchedProps })=>{
84
84
  const getRandomColor = (0, _fixefyhooks.useRandomColor)();
85
- const { logo_folder_name, logo_placeholder, name } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
85
+ const { assetUrl, logo_folder_name, logo_placeholder, name } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
86
86
  var _option_name;
87
87
  return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
88
88
  style: {
89
89
  width: '70px'
90
90
  },
91
91
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
92
+ assetUrl: assetUrl,
92
93
  icon: `${option.logo ? `${logo_folder_name}/${option.logo}` : logo_placeholder ? logo_placeholder : (_option_name = option === null || option === void 0 ? void 0 : option[name]) !== null && _option_name !== void 0 ? _option_name : 'x'}`,
93
94
  width: 70,
94
95
  height: 16,
@@ -10,6 +10,7 @@ export interface StylesOptions {
10
10
  menuSx?: object;
11
11
  }
12
12
  export type AsyncDropdownPropsType = {
13
+ assetUrl?: string;
13
14
  initialValue?: Option | any;
14
15
  styles?: StylesOptions;
15
16
  multiple?: boolean;
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const FxGridEmptyState: () => React.JSX.Element;
2
+ export declare const FxGridEmptyState: ({ assetUrl }: {
3
+ assetUrl?: string;
4
+ }) => React.JSX.Element;
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
18
18
  default: obj
19
19
  };
20
20
  }
21
- const FxGridEmptyState = ()=>{
21
+ const FxGridEmptyState = ({ assetUrl })=>{
22
22
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
23
23
  sx: {
24
24
  width: '100%',
@@ -30,7 +30,8 @@ const FxGridEmptyState = ()=>{
30
30
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
31
31
  width: 380,
32
32
  height: 415,
33
- icon: 'general/hexagon_bottom.svg'
33
+ icon: 'general/hexagon_bottom.svg',
34
+ assetUrl: assetUrl
34
35
  }),
35
36
  /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
36
37
  display: 'flex',
@@ -45,7 +46,8 @@ const FxGridEmptyState = ()=>{
45
46
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
46
47
  width: 279,
47
48
  height: 250,
48
- icon: 'table/table_no_results.svg'
49
+ icon: 'table/table_no_results.svg',
50
+ assetUrl: assetUrl
49
51
  }),
50
52
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
51
53
  sx: {
@@ -72,7 +74,8 @@ const FxGridEmptyState = ()=>{
72
74
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
73
75
  width: 416,
74
76
  height: 377,
75
- icon: 'general/hexagon_right.svg'
77
+ icon: 'general/hexagon_right.svg',
78
+ assetUrl: assetUrl
76
79
  })
77
80
  ]
78
81
  });
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- export declare const FxGridError: ({ header, message, image, textSx, imageHeight, imageWidth }: {
2
+ export declare const FxGridError: ({ header, message, image, textSx, imageHeight, imageWidth, assetUrl, }: {
3
3
  header?: string;
4
4
  message?: string;
5
5
  image?: string;
6
6
  textSx?: any;
7
7
  imageHeight?: number;
8
8
  imageWidth?: number;
9
+ assetUrl?: string;
9
10
  }) => React.JSX.Element;
@@ -10,16 +10,15 @@ Object.defineProperty(exports, "FxGridError", {
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
12
12
  const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
- const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
14
- const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
13
+ const _material = require("@mui/material");
15
14
  const _FxIcon = require("../FxIcon");
16
15
  function _interop_require_default(obj) {
17
16
  return obj && obj.__esModule ? obj : {
18
17
  default: obj
19
18
  };
20
19
  }
21
- const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth })=>{
22
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
20
+ const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth, assetUrl })=>{
21
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
23
22
  sx: {
24
23
  width: '100%',
25
24
  height: '100%',
@@ -30,9 +29,10 @@ const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth }
30
29
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
31
30
  width: 380,
32
31
  height: 415,
33
- icon: 'general/hexagon_bottom.svg'
32
+ icon: 'general/hexagon_bottom.svg',
33
+ assetUrl: assetUrl
34
34
  }),
35
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
35
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
36
36
  display: 'flex',
37
37
  flexDirection: 'column',
38
38
  sx: {
@@ -45,9 +45,10 @@ const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth }
45
45
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
46
46
  width: imageWidth || 345,
47
47
  height: imageHeight || 412,
48
- icon: image || 'general/bot_with_bubble.svg'
48
+ icon: image || 'general/bot_with_bubble.svg',
49
+ assetUrl: assetUrl
49
50
  }),
50
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
51
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
51
52
  sx: {
52
53
  width: '100%',
53
54
  height: '100%',
@@ -58,7 +59,7 @@ const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth }
58
59
  flexDirection: 'column',
59
60
  margin: 'auto'
60
61
  },
61
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
62
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
62
63
  display: 'flex',
63
64
  flexDirection: 'column',
64
65
  sx: textSx || {
@@ -66,11 +67,11 @@ const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth }
66
67
  marginTop: '40px'
67
68
  },
68
69
  children: [
69
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
70
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
70
71
  variant: "h5",
71
72
  children: header || 'Something went wrong on our end.'
72
73
  }),
73
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
74
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
74
75
  variant: "subtitle2",
75
76
  children: message || 'Please try again later.'
76
77
  })
@@ -82,7 +83,8 @@ const FxGridError = ({ header, message, image, textSx, imageHeight, imageWidth }
82
83
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
83
84
  width: 416,
84
85
  height: 377,
85
- icon: 'general/hexagon_right.svg'
86
+ icon: 'general/hexagon_right.svg',
87
+ assetUrl: assetUrl
86
88
  })
87
89
  ]
88
90
  });
package/package.json CHANGED
@@ -17,6 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@apollo/client": "3.7.15",
20
+ "@fixefy/next-s3-upload": "^0.0.12",
20
21
  "@mui/icons-material": "5.16.12",
21
22
  "@mui/lab": "6.0.0-beta.7",
22
23
  "nookies": "^2.5.2",
@@ -71,5 +72,5 @@
71
72
  "require": "./dist/index.js"
72
73
  }
73
74
  },
74
- "version": "0.3.87"
75
+ "version": "0.3.89"
75
76
  }