@fixefy/fixefy-ui-components 0.1.81 → 0.1.83
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 +0 -1
- package/dist/FxAsyncDropdown/FxAsyncDropdown.js +23 -3
- package/dist/FxModalWithButton/FxModalWithButton.d.ts +6 -0
- package/dist/FxModalWithButton/FxModalWithButton.js +94 -0
- package/dist/FxModalWithButton/index.d.ts +1 -0
- package/dist/FxModalWithButton/index.js +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -283,12 +283,29 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props, parentRe
|
|
|
283
283
|
onChange && onChange(item, 'uncheck');
|
|
284
284
|
removeFromStoredDisplayed(item);
|
|
285
285
|
};
|
|
286
|
+
const isChecked = (option)=>{
|
|
287
|
+
const clicked = getClicked(option);
|
|
288
|
+
if (typeof displayed === 'string') {
|
|
289
|
+
return false;
|
|
290
|
+
} else {
|
|
291
|
+
if (multiple) {
|
|
292
|
+
return displayed.map((item)=>{
|
|
293
|
+
if (search_path.includes('workspace')) {
|
|
294
|
+
return item['title'];
|
|
295
|
+
} else {
|
|
296
|
+
return item[search_path];
|
|
297
|
+
}
|
|
298
|
+
}).includes(clicked);
|
|
299
|
+
} else {
|
|
300
|
+
return displayed[search_path] === clicked;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
};
|
|
286
304
|
const handleListOptions = ()=>{
|
|
287
305
|
switch(type){
|
|
288
306
|
case 'checkbox':
|
|
289
307
|
{
|
|
290
308
|
return options.map((option)=>{
|
|
291
|
-
const clicked = getClicked(option);
|
|
292
309
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("li", {
|
|
293
310
|
onClick: ()=>{
|
|
294
311
|
handleOptionClick(option);
|
|
@@ -296,7 +313,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props, parentRe
|
|
|
296
313
|
children: [
|
|
297
314
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Checkbox, {
|
|
298
315
|
icon: icon,
|
|
299
|
-
checked:
|
|
316
|
+
checked: isChecked(option),
|
|
300
317
|
checkedIcon: checkedIcon,
|
|
301
318
|
sx: {
|
|
302
319
|
mr: 1,
|
|
@@ -463,10 +480,13 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props, parentRe
|
|
|
463
480
|
});
|
|
464
481
|
};
|
|
465
482
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dropdownstyles.Root, {
|
|
483
|
+
sx: {
|
|
484
|
+
background: '#FFFFFF'
|
|
485
|
+
},
|
|
466
486
|
children: [
|
|
467
487
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
468
488
|
sx: {
|
|
469
|
-
padding: '5px 0 5px
|
|
489
|
+
padding: '5px 0 5px 5px'
|
|
470
490
|
},
|
|
471
491
|
children: [
|
|
472
492
|
getCurrentValues(),
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxModalWithButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxModalWithButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
+
const _material = require("@mui/material");
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
15
|
+
if (typeof WeakMap !== "function") return null;
|
|
16
|
+
var cacheBabelInterop = new WeakMap();
|
|
17
|
+
var cacheNodeInterop = new WeakMap();
|
|
18
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
19
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
20
|
+
})(nodeInterop);
|
|
21
|
+
}
|
|
22
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
23
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
27
|
+
return {
|
|
28
|
+
default: obj
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
32
|
+
if (cache && cache.has(obj)) {
|
|
33
|
+
return cache.get(obj);
|
|
34
|
+
}
|
|
35
|
+
var newObj = {
|
|
36
|
+
__proto__: null
|
|
37
|
+
};
|
|
38
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
39
|
+
for(var key in obj){
|
|
40
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
41
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
42
|
+
if (desc && (desc.get || desc.set)) {
|
|
43
|
+
Object.defineProperty(newObj, key, desc);
|
|
44
|
+
} else {
|
|
45
|
+
newObj[key] = obj[key];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
newObj.default = obj;
|
|
50
|
+
if (cache) {
|
|
51
|
+
cache.set(obj, newObj);
|
|
52
|
+
}
|
|
53
|
+
return newObj;
|
|
54
|
+
}
|
|
55
|
+
const FxModalWithButton = ({ btnValue, modalData, onClick })=>{
|
|
56
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
57
|
+
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
58
|
+
const handleClick = (e)=>{
|
|
59
|
+
if (onClick) {
|
|
60
|
+
onClick();
|
|
61
|
+
}
|
|
62
|
+
setIsOpen((prev)=>!prev);
|
|
63
|
+
setAnchorEl(e.currentTarget);
|
|
64
|
+
};
|
|
65
|
+
const handleClose = ()=>{
|
|
66
|
+
setIsOpen(false);
|
|
67
|
+
setAnchorEl(null);
|
|
68
|
+
};
|
|
69
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
70
|
+
children: [
|
|
71
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
72
|
+
id: "fade-button",
|
|
73
|
+
"aria-haspopup": "true",
|
|
74
|
+
onClick: handleClick,
|
|
75
|
+
sx: {
|
|
76
|
+
fontWeight: isOpen ? 'bold' : 'normal'
|
|
77
|
+
},
|
|
78
|
+
children: btnValue
|
|
79
|
+
}),
|
|
80
|
+
' ',
|
|
81
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
82
|
+
id: "fade-menu",
|
|
83
|
+
MenuListProps: {
|
|
84
|
+
'aria-labelledby': 'fade-button'
|
|
85
|
+
},
|
|
86
|
+
anchorEl: AnchorEl,
|
|
87
|
+
open: isOpen,
|
|
88
|
+
onClose: handleClose,
|
|
89
|
+
TransitionComponent: _material.Fade,
|
|
90
|
+
children: isOpen && modalData
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FxModalWithButton } from './FxModalWithButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxModalWithButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _FxModalWithButton.FxModalWithButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _FxModalWithButton = require("./FxModalWithButton");
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { FxButton, ButtonPropsType } from './FxButton';
|
|
|
6
6
|
export { FxChip, ChipPropsType } from './FxChip';
|
|
7
7
|
export { FxIcon } from './FxIcon';
|
|
8
8
|
export { FxModal, ModalPropsType } from './FxModal';
|
|
9
|
+
export { FxModalWithButton } from './FxModalWithButton';
|
|
9
10
|
export { FxNotes, NoteCreateInput, NotesPropsType } from './FxNotes';
|
|
10
11
|
export { FxNumberField, NumberfieldPropsType } from './FxNumberField';
|
|
11
12
|
export { FxProgressCircle, ProgressCirclePropsType } from './FxProgressCircle';
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,9 @@ _export(exports, {
|
|
|
69
69
|
FxModal: function() {
|
|
70
70
|
return _FxModal.FxModal;
|
|
71
71
|
},
|
|
72
|
+
FxModalWithButton: function() {
|
|
73
|
+
return _FxModalWithButton.FxModalWithButton;
|
|
74
|
+
},
|
|
72
75
|
FxNotes: function() {
|
|
73
76
|
return _FxNotes.FxNotes;
|
|
74
77
|
},
|
|
@@ -192,6 +195,7 @@ const _FxButton = require("./FxButton");
|
|
|
192
195
|
const _FxChip = require("./FxChip");
|
|
193
196
|
const _FxIcon = require("./FxIcon");
|
|
194
197
|
const _FxModal = require("./FxModal");
|
|
198
|
+
const _FxModalWithButton = require("./FxModalWithButton");
|
|
195
199
|
const _FxNotes = require("./FxNotes");
|
|
196
200
|
const _FxNumberField = require("./FxNumberField");
|
|
197
201
|
const _FxProgressCircle = require("./FxProgressCircle");
|
package/package.json
CHANGED