@fixefy/fixefy-ui-components 0.2.40 → 0.2.42
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/dist/FxAsyncDropdown/FxAsyncDropdown.d.ts +1 -0
- package/dist/FxAsyncDropdown/FxAsyncDropdown.js +2 -4
- package/dist/FxFilterActionButton/FxFilterActionButton.d.ts +7 -0
- package/dist/FxFilterActionButton/FxFilterActionButton.js +82 -0
- package/dist/FxFilterActionButton/index.d.ts +1 -0
- package/dist/FxFilterActionButton/index.js +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
|
@@ -28,5 +28,6 @@ export type AsyncDropdownPropsType = {
|
|
|
28
28
|
isInitialOpen?: boolean;
|
|
29
29
|
placeholder?: string;
|
|
30
30
|
rootStyle?: any;
|
|
31
|
+
options_path?: string;
|
|
31
32
|
};
|
|
32
33
|
export declare const FxAsyncDropdown: React.ForwardRefExoticComponent<Omit<AsyncDropdownPropsType, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -120,7 +120,7 @@ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_iconsmaterial.CheckBox,
|
|
|
120
120
|
fontSize: "small"
|
|
121
121
|
});
|
|
122
122
|
const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
123
|
-
const { onAdd, onRemoveOne, onRemoveAll, fetcher, disabled, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, logo_placeholder, logo_folder_name } = props;
|
|
123
|
+
const { onAdd, onRemoveOne, onRemoveAll, fetcher, disabled, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, logo_placeholder, logo_folder_name, options_path } = props;
|
|
124
124
|
const ref = (0, _react.useRef)(null);
|
|
125
125
|
const theme = (0, _material.useTheme)();
|
|
126
126
|
const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
|
|
@@ -183,9 +183,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
|
183
183
|
]);
|
|
184
184
|
(0, _react.useEffect)(()=>{
|
|
185
185
|
if (data && !isLastPage && prevPage < page) {
|
|
186
|
-
const newOptions =
|
|
187
|
-
//TODO: SHOULD ADD ANOTHER VARIABLE FOR THE PATH AND INSTEAD OF THE CURRENT newOptions, USE THE getJPart WITH THE PATH:
|
|
188
|
-
// const newOptions: Option[] = getJPart(data, PATH)
|
|
186
|
+
const newOptions = options_path ? (0, _helpers.getJPart)(data, options_path) : (0, _helpers.getJPart)(data, method_name);
|
|
189
187
|
if (newOptions == null || newOptions.length < pageSize) {
|
|
190
188
|
setIsLastPage(true);
|
|
191
189
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxFilterActionButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxFilterActionButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _material = require("@mui/material");
|
|
14
|
+
function _define_property(obj, key, value) {
|
|
15
|
+
if (key in obj) {
|
|
16
|
+
Object.defineProperty(obj, key, {
|
|
17
|
+
value: value,
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
obj[key] = value;
|
|
24
|
+
}
|
|
25
|
+
return obj;
|
|
26
|
+
}
|
|
27
|
+
function _interop_require_default(obj) {
|
|
28
|
+
return obj && obj.__esModule ? obj : {
|
|
29
|
+
default: obj
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _object_spread(target) {
|
|
33
|
+
for(var i = 1; i < arguments.length; i++){
|
|
34
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
35
|
+
var ownKeys = Object.keys(source);
|
|
36
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
37
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
38
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
ownKeys.forEach(function(key) {
|
|
42
|
+
_define_property(target, key, source[key]);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return target;
|
|
46
|
+
}
|
|
47
|
+
function ownKeys(object, enumerableOnly) {
|
|
48
|
+
var keys = Object.keys(object);
|
|
49
|
+
if (Object.getOwnPropertySymbols) {
|
|
50
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
51
|
+
if (enumerableOnly) {
|
|
52
|
+
symbols = symbols.filter(function(sym) {
|
|
53
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
keys.push.apply(keys, symbols);
|
|
57
|
+
}
|
|
58
|
+
return keys;
|
|
59
|
+
}
|
|
60
|
+
function _object_spread_props(target, source) {
|
|
61
|
+
source = source != null ? source : {};
|
|
62
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
63
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
64
|
+
} else {
|
|
65
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
66
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return target;
|
|
70
|
+
}
|
|
71
|
+
const FxFilterActionButton = ({ btnValue, onClick, startIcon, sx })=>{
|
|
72
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
73
|
+
id: "fade-button",
|
|
74
|
+
sx: _object_spread_props(_object_spread({}, sx), {
|
|
75
|
+
fontWeight: 'normal'
|
|
76
|
+
}),
|
|
77
|
+
"aria-haspopup": "true",
|
|
78
|
+
startIcon: startIcon,
|
|
79
|
+
onClick: onClick,
|
|
80
|
+
children: btnValue
|
|
81
|
+
});
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FxFilterActionButton } from './FxFilterActionButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxFilterActionButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _FxFilterActionButton.FxFilterActionButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _FxFilterActionButton = require("./FxFilterActionButton");
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { FxAggregationsBar, AggregationsDataPropsType, AggreationsBarPropsType }
|
|
|
3
3
|
export { FxAsyncDropdown, Option, StylesOptions, AsyncDropdownPropsType } from './FxAsyncDropdown';
|
|
4
4
|
export { FxAvatar, AvatarPropsType, BackgroundColorsType } from './FxAvatar';
|
|
5
5
|
export { FxButton, ButtonPropsType } from './FxButton';
|
|
6
|
-
export {
|
|
6
|
+
export { FxFilterActionButton } from './FxFilterActionButton';
|
|
7
7
|
export { FxChip, ChipPropsType } from './FxChip';
|
|
8
8
|
export { FxIcon } from './FxIcon';
|
|
9
9
|
export { FxModal, ModalPropsType } from './FxModal';
|
package/dist/index.js
CHANGED
|
@@ -63,8 +63,8 @@ _export(exports, {
|
|
|
63
63
|
FxChip: function() {
|
|
64
64
|
return _FxChip.FxChip;
|
|
65
65
|
},
|
|
66
|
-
|
|
67
|
-
return
|
|
66
|
+
FxFilterActionButton: function() {
|
|
67
|
+
return _FxFilterActionButton.FxFilterActionButton;
|
|
68
68
|
},
|
|
69
69
|
FxIcon: function() {
|
|
70
70
|
return _FxIcon.FxIcon;
|
|
@@ -210,7 +210,7 @@ const _FxAggregationsBar = require("./FxAggregationsBar");
|
|
|
210
210
|
const _FxAsyncDropdown = require("./FxAsyncDropdown");
|
|
211
211
|
const _FxAvatar = require("./FxAvatar");
|
|
212
212
|
const _FxButton = require("./FxButton");
|
|
213
|
-
const
|
|
213
|
+
const _FxFilterActionButton = require("./FxFilterActionButton");
|
|
214
214
|
const _FxChip = require("./FxChip");
|
|
215
215
|
const _FxIcon = require("./FxIcon");
|
|
216
216
|
const _FxModal = require("./FxModal");
|
package/package.json
CHANGED