@fixefy/fixefy-ui-components 0.2.58 → 0.2.60

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.
@@ -133,7 +133,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
133
133
  const [prevPage, setPrevPage] = (0, _react.useState)(0);
134
134
  const pageSize = 20;
135
135
  const { method_name } = variables;
136
- const { where } = fetcher.queryOptions.variables;
136
+ const { where, sort } = fetcher.queryOptions.variables;
137
137
  const ws = (0, _nookies.parseCookies)().ws;
138
138
  const isLocal = fetcher.query.loc;
139
139
  const getWhere = ()=>{
@@ -158,7 +158,8 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
158
158
  variables: {
159
159
  where: getWhere(),
160
160
  skip: page * pageSize - pageSize,
161
- limit: pageSize
161
+ limit: pageSize,
162
+ sort: sort || {}
162
163
  }
163
164
  }));
164
165
  (0, _react.useEffect)(()=>{
@@ -253,7 +254,6 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
253
254
  option
254
255
  ]);
255
256
  addToStoredDisplayed(option);
256
- !multiple && setIsOpen(false);
257
257
  }
258
258
  break;
259
259
  default:
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  export type StatisticsPropsType = {
3
- currency?: any;
4
3
  value?: number;
5
4
  type?: 'currency' | 'percentage';
6
5
  collapsed?: boolean;
@@ -8,4 +7,4 @@ export type StatisticsPropsType = {
8
7
  structure?: any;
9
8
  filter?: object;
10
9
  };
11
- export declare function FxStatisticsBar({ currency, value, type, label, structure, collapsed, filter, }: StatisticsPropsType): React.JSX.Element;
10
+ export declare function FxStatisticsBar({ value, type, label, structure, collapsed, filter, }: StatisticsPropsType): React.JSX.Element;
@@ -84,7 +84,7 @@ function _object_spread(target) {
84
84
  }
85
85
  return target;
86
86
  }
87
- function FxStatisticsBar({ currency, value, type = 'currency', label, structure, collapsed, filter }) {
87
+ function FxStatisticsBar({ value, type = 'currency', label, structure, collapsed, filter }) {
88
88
  const _classes = (0, _statisticsstyles.useStyles)();
89
89
  const { extended, input_type, title } = structure || {};
90
90
  const { gql_operation, object_path, filter: structurefilter, variables } = extended || {};
@@ -109,7 +109,7 @@ function FxStatisticsBar({ currency, value, type = 'currency', label, structure,
109
109
  }
110
110
  return new Intl.NumberFormat('en-US', {
111
111
  style: 'currency',
112
- currency: currency ? currency.code.toUpperCase() : ((_getCurrency = (0, _fixefyuiutils.getCurrency)(null)) === null || _getCurrency === void 0 ? void 0 : _getCurrency.code.toUpperCase()) || 'USD'
112
+ currency: ((_getCurrency = (0, _fixefyuiutils.getCurrency)(null)) === null || _getCurrency === void 0 ? void 0 : _getCurrency.code.toUpperCase()) || 'USD'
113
113
  }).format(Number(newValue)) + sign;
114
114
  };
115
115
  const checkIsCollapsed = ()=>{
@@ -140,7 +140,7 @@ function FxStatisticsBar({ currency, value, type = 'currency', label, structure,
140
140
  var _getCurrency;
141
141
  return new Intl.NumberFormat('en-US', {
142
142
  style: 'currency',
143
- currency: currency ? currency.code.toUpperCase() : ((_getCurrency = (0, _fixefyuiutils.getCurrency)(null)) === null || _getCurrency === void 0 ? void 0 : _getCurrency.code.toUpperCase()) || 'USD'
143
+ currency: ((_getCurrency = (0, _fixefyuiutils.getCurrency)(null)) === null || _getCurrency === void 0 ? void 0 : _getCurrency.code.toUpperCase()) || 'USD'
144
144
  }).format(Number(value));
145
145
  }
146
146
  }
package/package.json CHANGED
@@ -65,5 +65,5 @@
65
65
  "require": "./dist/index.js"
66
66
  }
67
67
  },
68
- "version": "0.2.58"
68
+ "version": "0.2.60"
69
69
  }