@fixefy/fixefy-ui-components 0.3.93 → 0.3.94
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/FxActionsTray/FxActionsTray.d.ts +1 -2
- package/dist/FxActionsTray/FxActionsTray.js +3 -5
- package/dist/FxAsyncDropdown/FxAsyncDropdown.js +1 -2
- package/dist/FxAsyncDropdown/components/ChipOption.js +0 -2
- package/dist/FxAsyncDropdown/components/ChosenIcon.js +2 -3
- package/dist/FxAsyncDropdown/components/LogoOption.js +1 -2
- package/dist/FxAsyncDropdown/types.d.ts +0 -1
- package/dist/FxButtonModalWithComponent/FxButtonModalWithComponent.d.ts +1 -2
- package/dist/FxButtonModalWithComponent/FxButtonModalWithComponent.js +1 -2
- package/dist/FxButtonModalWithMenu/FxButtonModalWithMenu.d.ts +1 -2
- package/dist/FxButtonModalWithMenu/FxButtonModalWithMenu.js +1 -3
- package/dist/FxChip/FxChip.d.ts +0 -1
- package/dist/FxChip/FxChip.js +2 -3
- package/dist/FxGridEmptyState/FxGridEmptyState.d.ts +1 -5
- package/dist/FxGridEmptyState/FxGridEmptyState.js +5 -9
- package/dist/FxMenuItemWithIcon/FxMenuItemWithIcon.d.ts +1 -2
- package/dist/FxMenuItemWithIcon/FxMenuItemWithIcon.js +2 -3
- package/dist/FxObjStaticDropdown/FxObjStaticDropdown.js +2 -7
- package/dist/FxStatusBar/FxStatusBar.d.ts +1 -2
- package/dist/FxStatusBar/FxStatusBar.js +1 -2
- package/dist/FxStrStaticDropdown/FxStrStaticDropdown.d.ts +0 -1
- package/dist/FxStrStaticDropdown/FxStrStaticDropdown.js +2 -6
- package/dist/FxTabs/FxTabs.d.ts +2 -2
- package/dist/FxTabs/FxTabs.js +2 -2
- package/dist/FxUserImage/FxUserImage.d.ts +1 -2
- package/dist/FxUserImage/FxUserImage.js +1 -2
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxActionsTray: ({
|
|
3
|
-
assetUrl?: string;
|
|
2
|
+
export declare const FxActionsTray: ({ ctx, entityType, show, actions, onClose, onClick, }: {
|
|
4
3
|
ctx: any;
|
|
5
4
|
entityType?: string;
|
|
6
5
|
show: boolean;
|
|
@@ -25,7 +25,7 @@ function _interop_require_default(obj) {
|
|
|
25
25
|
default: obj
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
const FxActionsTray = ({
|
|
28
|
+
const FxActionsTray = ({ ctx, entityType = 'item', show = false, actions = [], onClose, onClick })=>{
|
|
29
29
|
const { classes } = (0, _actionsTraystyle.useStyles)();
|
|
30
30
|
const { selection = [], selectAll, ultraSelectAll, totalCount } = ctx;
|
|
31
31
|
const selectedCount = selectAll === true && ultraSelectAll === true ? totalCount : selection.length;
|
|
@@ -63,7 +63,6 @@ const FxActionsTray = ({ assetUrl, ctx, entityType = 'item', show = false, actio
|
|
|
63
63
|
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
64
64
|
className: classes.actions,
|
|
65
65
|
children: actions.map((action, index)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(ActionButton, {
|
|
66
|
-
assetUrl: assetUrl,
|
|
67
66
|
title: action.title,
|
|
68
67
|
name: action.name,
|
|
69
68
|
icon: action.extended.icon,
|
|
@@ -88,7 +87,7 @@ const FxActionsTray = ({ assetUrl, ctx, entityType = 'item', show = false, actio
|
|
|
88
87
|
})
|
|
89
88
|
});
|
|
90
89
|
};
|
|
91
|
-
const ActionButton = ({
|
|
90
|
+
const ActionButton = ({ title, name, icon, classes, onClick })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Button.default, {
|
|
92
91
|
id: name,
|
|
93
92
|
className: classes.actionButton,
|
|
94
93
|
title: (0, _fixefyuiutils.titleCase)(title),
|
|
@@ -100,8 +99,7 @@ const ActionButton = ({ assetUrl, title, name, icon, classes, onClick })=>/*#__P
|
|
|
100
99
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
101
100
|
width: 16,
|
|
102
101
|
height: 16,
|
|
103
|
-
icon: `actions/${icon}.svg
|
|
104
|
-
assetUrl: assetUrl
|
|
102
|
+
icon: `actions/${icon}.svg`
|
|
105
103
|
})
|
|
106
104
|
}),
|
|
107
105
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
@@ -121,7 +121,7 @@ function _object_spread_props(target, source) {
|
|
|
121
121
|
}
|
|
122
122
|
const FxAsyncDropdown = (props)=>{
|
|
123
123
|
var _fetcher_query;
|
|
124
|
-
const {
|
|
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;
|
|
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,7 +436,6 @@ const FxAsyncDropdown = (props)=>{
|
|
|
436
436
|
paddingLeft: '3px'
|
|
437
437
|
},
|
|
438
438
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
439
|
-
assetUrl: assetUrl,
|
|
440
439
|
onClick: ()=>{
|
|
441
440
|
setDisplayed([]);
|
|
442
441
|
if (onRemoveAll) {
|
|
@@ -19,7 +19,6 @@ function _interop_require_default(obj) {
|
|
|
19
19
|
}
|
|
20
20
|
const ChipOption = ({ option, curValue, modal, fetchedProps, displayed, setDisplayed })=>{
|
|
21
21
|
return modal == 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
22
|
-
assetUrl: fetchedProps.assetUrl,
|
|
23
22
|
status: curValue,
|
|
24
23
|
label: (0, _helpers.titleCase)(curValue),
|
|
25
24
|
variant: "outlined",
|
|
@@ -27,7 +26,6 @@ const ChipOption = ({ option, curValue, modal, fetchedProps, displayed, setDispl
|
|
|
27
26
|
(0, _helpers.deleteOneItem)(option, fetchedProps, displayed, setDisplayed);
|
|
28
27
|
}
|
|
29
28
|
}, option._id) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
30
|
-
assetUrl: fetchedProps.assetUrl,
|
|
31
29
|
status: curValue,
|
|
32
30
|
label: (0, _helpers.titleCase)(curValue),
|
|
33
31
|
variant: "outlined"
|
|
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
const ChosenIcon = ({ option, isDisplay, fetchedProps, displayed })=>{
|
|
21
|
-
const {
|
|
21
|
+
const { 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,8 +37,7 @@ 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'
|
|
41
|
-
assetUrl: assetUrl
|
|
40
|
+
icon: 'filters/chosen_icon.svg'
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
43
|
return null;
|
|
@@ -82,14 +82,13 @@ 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 {
|
|
85
|
+
const { 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,
|
|
93
92
|
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'}`,
|
|
94
93
|
width: 70,
|
|
95
94
|
height: 16,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxButtonModalWithComponent: ({
|
|
3
|
-
assetUrl?: string;
|
|
2
|
+
export declare const FxButtonModalWithComponent: ({ btnType, btnValue, modalData, onClick, disabled, startIcon, endIcon, sx, iconSize, }: {
|
|
4
3
|
btnType?: "text" | "icon";
|
|
5
4
|
btnValue?: string;
|
|
6
5
|
modalData: any;
|
|
@@ -60,7 +60,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
60
60
|
}
|
|
61
61
|
return newObj;
|
|
62
62
|
}
|
|
63
|
-
const FxButtonModalWithComponent = ({
|
|
63
|
+
const FxButtonModalWithComponent = ({ btnType = 'text', btnValue, modalData, onClick, disabled, startIcon, endIcon, sx, iconSize })=>{
|
|
64
64
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
65
65
|
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
66
66
|
const handleClick = (e)=>{
|
|
@@ -85,7 +85,6 @@ const FxButtonModalWithComponent = ({ assetUrl, btnType = 'text', btnValue, moda
|
|
|
85
85
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
|
|
86
86
|
children: [
|
|
87
87
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStyledButton.FxStyledButton, {
|
|
88
|
-
assetUrl: assetUrl,
|
|
89
88
|
sx: sx,
|
|
90
89
|
btnType: btnType,
|
|
91
90
|
btnValue: btnValue,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxButtonModalWithMenu: ({
|
|
3
|
-
assetUrl?: string;
|
|
2
|
+
export declare const FxButtonModalWithMenu: ({ btnType, btnValue, modalData, onClick, disabled, startIcon, endIcon, shouldShowModal, buttonSx, menuItemSx, iconSize, }: {
|
|
4
3
|
btnType?: "text" | "icon";
|
|
5
4
|
btnValue?: string;
|
|
6
5
|
modalData: any;
|
|
@@ -61,7 +61,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
61
61
|
}
|
|
62
62
|
return newObj;
|
|
63
63
|
}
|
|
64
|
-
const FxButtonModalWithMenu = ({
|
|
64
|
+
const FxButtonModalWithMenu = ({ btnType = 'text', btnValue, modalData, onClick, disabled, startIcon, endIcon, shouldShowModal = true, buttonSx, menuItemSx, iconSize })=>{
|
|
65
65
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
66
66
|
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
67
67
|
const handleClick = (e)=>{
|
|
@@ -86,7 +86,6 @@ const FxButtonModalWithMenu = ({ assetUrl, btnType = 'text', btnValue, modalData
|
|
|
86
86
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
|
|
87
87
|
children: [
|
|
88
88
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStyledButton.FxStyledButton, {
|
|
89
|
-
assetUrl: assetUrl,
|
|
90
89
|
sx: buttonSx,
|
|
91
90
|
btnType: btnType,
|
|
92
91
|
btnValue: btnValue,
|
|
@@ -110,7 +109,6 @@ const FxButtonModalWithMenu = ({ assetUrl, btnType = 'text', btnValue, modalData
|
|
|
110
109
|
TransitionComponent: _Fade.default,
|
|
111
110
|
children: isOpen && (modalData === null || modalData === void 0 ? void 0 : modalData.map((item, i)=>{
|
|
112
111
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxMenuItemWithIcon.FxMenuItemWithIcon, {
|
|
113
|
-
assetUrl: assetUrl,
|
|
114
112
|
icon: item.icon,
|
|
115
113
|
title: item.title,
|
|
116
114
|
onClick: ()=>{
|
package/dist/FxChip/FxChip.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EntityStatusType, ChargeStateType, InvoiceStateType, RecoStateType } from '@fixefy/fixefy-ui-utils';
|
|
3
3
|
export interface ChipPropsType {
|
|
4
|
-
assetUrl?: string;
|
|
5
4
|
type?: 'status' | 'priority' | 'score' | 'dimension' | 'reco';
|
|
6
5
|
status?: EntityStatusType | ChargeStateType | InvoiceStateType | RecoStateType;
|
|
7
6
|
label: string | number;
|
package/dist/FxChip/FxChip.js
CHANGED
|
@@ -20,7 +20,7 @@ function _interop_require_default(obj) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
const FxChip = (props)=>{
|
|
23
|
-
const {
|
|
23
|
+
const { status, label, type = 'status', scoreValue = 0, minimized = false, variant = 'outlined', onClick, onDelete, icon } = props;
|
|
24
24
|
const newStatus = status ? status.split(' ').join('_') : status;
|
|
25
25
|
const value = typeof label === 'number' ? label.toFixed(2) : label;
|
|
26
26
|
switch(type){
|
|
@@ -58,8 +58,7 @@ const FxChip = (props)=>{
|
|
|
58
58
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
59
59
|
icon: `${icon}.svg`,
|
|
60
60
|
width: 15,
|
|
61
|
-
height: 15
|
|
62
|
-
assetUrl: assetUrl
|
|
61
|
+
height: 15
|
|
63
62
|
})
|
|
64
63
|
});
|
|
65
64
|
default:
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxGridEmptyState: ({ assetUrl
|
|
2
|
+
export declare const FxGridEmptyState: ({ assetUrl }: {
|
|
3
3
|
assetUrl?: string;
|
|
4
|
-
mainIcon?: string;
|
|
5
|
-
message?: string;
|
|
6
|
-
mainIconWidth?: number;
|
|
7
|
-
mainIconHeight?: number;
|
|
8
4
|
}) => React.JSX.Element;
|
|
@@ -18,10 +18,7 @@ function _interop_require_default(obj) {
|
|
|
18
18
|
default: obj
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
const FxGridEmptyState = ({ assetUrl
|
|
22
|
-
const icon = mainIcon || 'table/table_no_results.svg';
|
|
23
|
-
const iconWidth = mainIconWidth || 279;
|
|
24
|
-
const iconHeight = mainIconHeight || 250;
|
|
21
|
+
const FxGridEmptyState = ({ assetUrl })=>{
|
|
25
22
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
|
|
26
23
|
sx: {
|
|
27
24
|
width: '100%',
|
|
@@ -47,9 +44,9 @@ const FxGridEmptyState = ({ assetUrl, mainIcon, message, mainIconWidth, mainIcon
|
|
|
47
44
|
},
|
|
48
45
|
children: [
|
|
49
46
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
52
|
-
icon:
|
|
47
|
+
width: 279,
|
|
48
|
+
height: 250,
|
|
49
|
+
icon: 'table/table_no_results.svg',
|
|
53
50
|
assetUrl: assetUrl
|
|
54
51
|
}),
|
|
55
52
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
@@ -66,10 +63,9 @@ const FxGridEmptyState = ({ assetUrl, mainIcon, message, mainIconWidth, mainIcon
|
|
|
66
63
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
67
64
|
display: 'flex',
|
|
68
65
|
flexDirection: 'column',
|
|
69
|
-
mt: 3,
|
|
70
66
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
|
|
71
67
|
variant: "h5",
|
|
72
|
-
children:
|
|
68
|
+
children: "There is currently no data to display."
|
|
73
69
|
})
|
|
74
70
|
})
|
|
75
71
|
})
|
|
@@ -48,7 +48,7 @@ function _object_spread(target) {
|
|
|
48
48
|
}
|
|
49
49
|
return target;
|
|
50
50
|
}
|
|
51
|
-
const FxMenuItemWithIcon = ({
|
|
51
|
+
const FxMenuItemWithIcon = ({ title, icon, onClick, sx = {} })=>{
|
|
52
52
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_MenuItem.default, {
|
|
53
53
|
sx: {
|
|
54
54
|
width: '197px',
|
|
@@ -68,8 +68,7 @@ const FxMenuItemWithIcon = ({ assetUrl, title, icon, onClick, sx = {} })=>{
|
|
|
68
68
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
69
69
|
width: 16,
|
|
70
70
|
height: 16,
|
|
71
|
-
icon: icon
|
|
72
|
-
assetUrl: assetUrl
|
|
71
|
+
icon: icon
|
|
73
72
|
})
|
|
74
73
|
}),
|
|
75
74
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ListItemText.default, {
|
|
@@ -76,7 +76,7 @@ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_CheckBox.default, {
|
|
|
76
76
|
fontSize: "small"
|
|
77
77
|
});
|
|
78
78
|
const FxObjStaticDropdown = (props)=>{
|
|
79
|
-
const {
|
|
79
|
+
const { onAdd, onRemoveOne, onRemoveAll, onUnselectAll, disabled, type = 'text', search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, logo_placeholder, logo_folder_name, _id, data, defaultValue } = props;
|
|
80
80
|
const ref = (0, _react.useRef)(null);
|
|
81
81
|
const theme = (0, _styles.useTheme)();
|
|
82
82
|
const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
|
|
@@ -394,8 +394,7 @@ const FxObjStaticDropdown = (props)=>{
|
|
|
394
394
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
395
395
|
width: 16,
|
|
396
396
|
height: 16,
|
|
397
|
-
icon: 'filters/chosen_icon.svg'
|
|
398
|
-
assetUrl: assetUrl
|
|
397
|
+
icon: 'filters/chosen_icon.svg'
|
|
399
398
|
});
|
|
400
399
|
}
|
|
401
400
|
return null;
|
|
@@ -407,7 +406,6 @@ const FxObjStaticDropdown = (props)=>{
|
|
|
407
406
|
width: '70px'
|
|
408
407
|
},
|
|
409
408
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
410
|
-
assetUrl: assetUrl,
|
|
411
409
|
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'}`,
|
|
412
410
|
width: 70,
|
|
413
411
|
height: 16,
|
|
@@ -419,7 +417,6 @@ const FxObjStaticDropdown = (props)=>{
|
|
|
419
417
|
};
|
|
420
418
|
const Chip = ({ option, curValue, modal })=>{
|
|
421
419
|
return modal == 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
422
|
-
assetUrl: assetUrl,
|
|
423
420
|
status: curValue,
|
|
424
421
|
label: (0, _fixefyuiutils.titleCase)(curValue),
|
|
425
422
|
variant: "outlined",
|
|
@@ -427,7 +424,6 @@ const FxObjStaticDropdown = (props)=>{
|
|
|
427
424
|
deleteOneItem(option);
|
|
428
425
|
}
|
|
429
426
|
}, option === null || option === void 0 ? void 0 : option._id) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
430
|
-
assetUrl: assetUrl,
|
|
431
427
|
status: curValue,
|
|
432
428
|
label: (0, _fixefyuiutils.titleCase)(curValue),
|
|
433
429
|
variant: "outlined"
|
|
@@ -491,7 +487,6 @@ const FxObjStaticDropdown = (props)=>{
|
|
|
491
487
|
paddingLeft: '3px'
|
|
492
488
|
},
|
|
493
489
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
494
|
-
assetUrl: assetUrl,
|
|
495
490
|
onClick: ()=>{
|
|
496
491
|
setDisplayed([]);
|
|
497
492
|
onRemoveAll();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EntityStatusType, ChargeStateType, InvoiceStateType, RecoStateType } from '@fixefy/fixefy-ui-utils';
|
|
3
3
|
export type StatusBarPropsType = {
|
|
4
|
-
assetUrl?: string;
|
|
5
4
|
onSearch?: (searchValue: string) => void;
|
|
6
5
|
onChangeStatus: (statuses: string[]) => void;
|
|
7
6
|
defaultStatus?: string | string[];
|
|
@@ -12,4 +11,4 @@ export type StatusBarPropsType = {
|
|
|
12
11
|
export type Options = {
|
|
13
12
|
[x: string]: keyof EntityStatusType | keyof ChargeStateType | keyof InvoiceStateType | keyof RecoStateType | string;
|
|
14
13
|
};
|
|
15
|
-
export declare const FxStatusBar: ({
|
|
14
|
+
export declare const FxStatusBar: ({ onChangeStatus, onSearch, defaultStatus, title, options, chipsVariant, }: StatusBarPropsType) => React.JSX.Element;
|
|
@@ -61,7 +61,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
61
61
|
}
|
|
62
62
|
return newObj;
|
|
63
63
|
}
|
|
64
|
-
const FxStatusBar = ({
|
|
64
|
+
const FxStatusBar = ({ onChangeStatus, onSearch, defaultStatus, title, options, chipsVariant = 'filled' })=>{
|
|
65
65
|
const [selectedStatus, setSelectedStatus] = (0, _react.useState)([]);
|
|
66
66
|
const [searchValue] = (0, _react.useState)('');
|
|
67
67
|
(0, _react.useEffect)(()=>{
|
|
@@ -135,7 +135,6 @@ const FxStatusBar = ({ assetUrl, onChangeStatus, onSearch, defaultStatus, title,
|
|
|
135
135
|
}),
|
|
136
136
|
Object.keys(__options).map((key, index)=>{
|
|
137
137
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
138
|
-
assetUrl: assetUrl,
|
|
139
138
|
onClick: ()=>onStatusClick(__options[key]),
|
|
140
139
|
label: (0, _fixefyuiutils.titleCase)(key),
|
|
141
140
|
variant: chipsVariant,
|
|
@@ -74,7 +74,7 @@ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_CheckBox.default, {
|
|
|
74
74
|
fontSize: "small"
|
|
75
75
|
});
|
|
76
76
|
const FxStrStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
77
|
-
const {
|
|
77
|
+
const { onAdd, onRemoveOne, onRemoveAll, type = 'text', modal_type, multiple, name, query, isInitialOpen, placeholder, data, rootStylesOverride } = props;
|
|
78
78
|
const ref = (0, _react.useRef)(null);
|
|
79
79
|
const theme = (0, _styles.useTheme)();
|
|
80
80
|
const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
|
|
@@ -224,7 +224,6 @@ const FxStrStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
|
224
224
|
};
|
|
225
225
|
const Chip = ({ option, modal })=>{
|
|
226
226
|
return modal == 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
227
|
-
assetUrl: assetUrl,
|
|
228
227
|
status: option,
|
|
229
228
|
label: (0, _helpers.titleCase)(option),
|
|
230
229
|
variant: "outlined",
|
|
@@ -232,7 +231,6 @@ const FxStrStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
|
232
231
|
deleteOneItem(option);
|
|
233
232
|
}
|
|
234
233
|
}, option) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
|
|
235
|
-
assetUrl: assetUrl,
|
|
236
234
|
status: option,
|
|
237
235
|
label: (0, _helpers.titleCase)(option),
|
|
238
236
|
variant: "outlined"
|
|
@@ -243,8 +241,7 @@ const FxStrStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
|
243
241
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
244
242
|
width: 16,
|
|
245
243
|
height: 16,
|
|
246
|
-
icon: 'filters/chosen_icon.svg'
|
|
247
|
-
assetUrl: assetUrl
|
|
244
|
+
icon: 'filters/chosen_icon.svg'
|
|
248
245
|
});
|
|
249
246
|
}
|
|
250
247
|
return null;
|
|
@@ -336,7 +333,6 @@ const FxStrStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
|
336
333
|
paddingLeft: '3px'
|
|
337
334
|
},
|
|
338
335
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
339
|
-
assetUrl: assetUrl,
|
|
340
336
|
onClick: ()=>{
|
|
341
337
|
setDisplayed([]);
|
|
342
338
|
onRemoveAll && onRemoveAll();
|
package/dist/FxTabs/FxTabs.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ export interface FxTab {
|
|
|
4
4
|
label: string;
|
|
5
5
|
tabContent: any;
|
|
6
6
|
}
|
|
7
|
-
export declare const FxTabs: ({ activeTab, tabsData, onChange, divider,
|
|
7
|
+
export declare const FxTabs: ({ activeTab, tabsData, onChange, divider, adjacentComponent, }: {
|
|
8
8
|
activeTab: string;
|
|
9
9
|
tabsData: FxTab[];
|
|
10
10
|
onChange: any;
|
|
11
11
|
divider?: boolean;
|
|
12
|
-
|
|
12
|
+
adjacentComponent?: any;
|
|
13
13
|
}) => React.JSX.Element;
|
package/dist/FxTabs/FxTabs.js
CHANGED
|
@@ -22,7 +22,7 @@ function _interop_require_default(obj) {
|
|
|
22
22
|
default: obj
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
const FxTabs = ({ activeTab, tabsData, onChange, divider = false,
|
|
25
|
+
const FxTabs = ({ activeTab, tabsData, onChange, divider = false, adjacentComponent })=>{
|
|
26
26
|
const theme = (0, _styles.useTheme)();
|
|
27
27
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_TabContext.default, {
|
|
28
28
|
value: activeTab,
|
|
@@ -55,7 +55,7 @@ const FxTabs = ({ activeTab, tabsData, onChange, divider = false, adjecentCompon
|
|
|
55
55
|
value: value
|
|
56
56
|
}, i);
|
|
57
57
|
}),
|
|
58
|
-
|
|
58
|
+
adjacentComponent
|
|
59
59
|
]
|
|
60
60
|
}),
|
|
61
61
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export declare const FxUserImage: ({ bucketAddress, user, loading, setLoading
|
|
1
|
+
export declare const FxUserImage: ({ bucketAddress, user, loading, setLoading }: {
|
|
2
2
|
bucketAddress: string;
|
|
3
3
|
user: any;
|
|
4
4
|
loading: boolean;
|
|
5
5
|
setLoading: (loading: boolean) => void;
|
|
6
|
-
assetUrl?: string;
|
|
7
6
|
}) => any;
|
|
@@ -92,7 +92,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
92
92
|
}
|
|
93
93
|
return newObj;
|
|
94
94
|
}
|
|
95
|
-
const FxUserImage = ({ bucketAddress, user, loading, setLoading
|
|
95
|
+
const FxUserImage = ({ bucketAddress, user, loading, setLoading })=>{
|
|
96
96
|
const getRandomColor = (0, _fixefyhooks.useRandomColor)();
|
|
97
97
|
const { listS3Bucket } = (0, _nexts3upload.useS3ListBucket)();
|
|
98
98
|
const { downloadFromS3 } = (0, _nexts3upload.useS3Download)('download-bytearray');
|
|
@@ -190,7 +190,6 @@ const FxUserImage = ({ bucketAddress, user, loading, setLoading, assetUrl })=>{
|
|
|
190
190
|
size: 24
|
|
191
191
|
});
|
|
192
192
|
if (!file && !loading) return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
193
|
-
assetUrl: assetUrl,
|
|
194
193
|
icon: 'users',
|
|
195
194
|
width: 24,
|
|
196
195
|
height: 24,
|
package/package.json
CHANGED