@fixefy/fixefy-ui-components 0.3.108 → 0.3.110

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.
Files changed (123) hide show
  1. package/dist/FxAsyncDropdown/FxAsyncDropdown.js +3 -3
  2. package/dist/FxDatesProgress/styles/progress.styles.js +1 -1
  3. package/dist/FxUserImage/FxUserImage.js +2 -2
  4. package/dist/fixefy-ui-components/src/FxActionsTray/FxActionsTray.js +111 -0
  5. package/dist/fixefy-ui-components/src/FxActionsTray/index.js +11 -0
  6. package/dist/fixefy-ui-components/src/FxActionsTray/styles/actionsTray.style.js +114 -0
  7. package/dist/fixefy-ui-components/src/FxAggregationsBar/FxAggregations.js +41 -0
  8. package/dist/fixefy-ui-components/src/FxAggregationsBar/helpers/structureReader.js +80 -0
  9. package/dist/fixefy-ui-components/src/FxAggregationsBar/index.js +22 -0
  10. package/dist/fixefy-ui-components/src/FxAggregationsBar/operations/query.js +73 -0
  11. package/dist/fixefy-ui-components/src/FxAsyncDropdown/FxAsyncDropdown.js +500 -0
  12. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/CheckboxIcon.js +44 -0
  13. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChipOption.js +35 -0
  14. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/ChosenIcon.js +45 -0
  15. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/DeleteButton.js +37 -0
  16. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/LogoOption.js +101 -0
  17. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/TextOption.js +74 -0
  18. package/dist/fixefy-ui-components/src/FxAsyncDropdown/components/index.js +36 -0
  19. package/dist/fixefy-ui-components/src/FxAsyncDropdown/helpers/helpers.js +233 -0
  20. package/dist/fixefy-ui-components/src/FxAsyncDropdown/index.js +11 -0
  21. package/dist/fixefy-ui-components/src/FxAsyncDropdown/styles/dropdown.styles.js +211 -0
  22. package/dist/fixefy-ui-components/src/FxAsyncDropdown/types.js +4 -0
  23. package/dist/fixefy-ui-components/src/FxAvatar/FxAvatar.js +145 -0
  24. package/dist/fixefy-ui-components/src/FxAvatar/helpers/stringToColor.js +23 -0
  25. package/dist/fixefy-ui-components/src/FxAvatar/index.js +22 -0
  26. package/dist/fixefy-ui-components/src/FxAvatar/styles/avatar.styles.js +233 -0
  27. package/dist/fixefy-ui-components/src/FxButton/FxButton.js +106 -0
  28. package/dist/fixefy-ui-components/src/FxButton/index.js +19 -0
  29. package/dist/fixefy-ui-components/src/FxButton/styles/button.styles.js +28 -0
  30. package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/FxButtonModalWithComponent.js +118 -0
  31. package/dist/fixefy-ui-components/src/FxButtonModalWithComponent/index.js +11 -0
  32. package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/FxButtonModalWithMenu.js +126 -0
  33. package/dist/fixefy-ui-components/src/FxButtonModalWithMenu/index.js +11 -0
  34. package/dist/fixefy-ui-components/src/FxChip/FxChip.js +75 -0
  35. package/dist/fixefy-ui-components/src/FxChip/index.js +19 -0
  36. package/dist/fixefy-ui-components/src/FxChip/styles/chip.styles.js +147 -0
  37. package/dist/fixefy-ui-components/src/FxDatesProgress/FxDatesProgress.js +126 -0
  38. package/dist/fixefy-ui-components/src/FxDatesProgress/index.js +11 -0
  39. package/dist/fixefy-ui-components/src/FxDatesProgress/styles/progress.styles.js +24 -0
  40. package/dist/fixefy-ui-components/src/FxGeneralModal/FxGeneralModal.js +107 -0
  41. package/dist/fixefy-ui-components/src/FxGeneralModal/index.js +11 -0
  42. package/dist/fixefy-ui-components/src/FxGridEmptyState/FxGridEmptyState.js +86 -0
  43. package/dist/fixefy-ui-components/src/FxGridEmptyState/index.js +11 -0
  44. package/dist/fixefy-ui-components/src/FxGridError/FxGridError.js +91 -0
  45. package/dist/fixefy-ui-components/src/FxGridError/index.js +11 -0
  46. package/dist/fixefy-ui-components/src/FxIcon/FxIcon.js +118 -0
  47. package/dist/fixefy-ui-components/src/FxIcon/content/dynamic_icon.js +20 -0
  48. package/dist/fixefy-ui-components/src/FxIcon/content/index.js +20 -0
  49. package/dist/fixefy-ui-components/src/FxIcon/content/lazy_icon.js +87 -0
  50. package/dist/fixefy-ui-components/src/FxIcon/index.js +11 -0
  51. package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/FxMenuItemWithIcon.js +84 -0
  52. package/dist/fixefy-ui-components/src/FxMenuItemWithIcon/index.js +11 -0
  53. package/dist/fixefy-ui-components/src/FxModal/FxModal.js +171 -0
  54. package/dist/fixefy-ui-components/src/FxModal/index.js +19 -0
  55. package/dist/fixefy-ui-components/src/FxModal/styles/modal.style.js +66 -0
  56. package/dist/fixefy-ui-components/src/FxNotes/FxNotes.js +216 -0
  57. package/dist/fixefy-ui-components/src/FxNotes/helpers/stringToColor.js +26 -0
  58. package/dist/fixefy-ui-components/src/FxNotes/index.js +22 -0
  59. package/dist/fixefy-ui-components/src/FxNotes/operations/queries.js +35 -0
  60. package/dist/fixefy-ui-components/src/FxNotes/styles/notes.styles.js +168 -0
  61. package/dist/fixefy-ui-components/src/FxNumberField/FxNumberField.js +108 -0
  62. package/dist/fixefy-ui-components/src/FxNumberField/index.js +19 -0
  63. package/dist/fixefy-ui-components/src/FxNumberField/styles/number_field.styles.js +99 -0
  64. package/dist/fixefy-ui-components/src/FxObjStaticDropdown/FxObjStaticDropdown.js +548 -0
  65. package/dist/fixefy-ui-components/src/FxObjStaticDropdown/index.js +25 -0
  66. package/dist/fixefy-ui-components/src/FxObjStaticDropdown/styles/dropdown.styles.js +211 -0
  67. package/dist/fixefy-ui-components/src/FxPopper/Popper.js +139 -0
  68. package/dist/fixefy-ui-components/src/FxPopper/PopperWithOutside.js +116 -0
  69. package/dist/fixefy-ui-components/src/FxPopper/content/PopperHeader.js +36 -0
  70. package/dist/fixefy-ui-components/src/FxPopper/content/index.js +11 -0
  71. package/dist/fixefy-ui-components/src/FxPopper/index.js +24 -0
  72. package/dist/fixefy-ui-components/src/FxPopper/styles/popper.styles.js +138 -0
  73. package/dist/fixefy-ui-components/src/FxProgressCircle/FxProgressCircle.js +65 -0
  74. package/dist/fixefy-ui-components/src/FxProgressCircle/index.js +19 -0
  75. package/dist/fixefy-ui-components/src/FxProgressCircle/styles/progress_circle.styles.js +106 -0
  76. package/dist/fixefy-ui-components/src/FxProgressCounter/ProgressCounter.js +168 -0
  77. package/dist/fixefy-ui-components/src/FxProgressCounter/index.js +19 -0
  78. package/dist/fixefy-ui-components/src/FxProgressCounter/styles/progress_counter.styles.js +66 -0
  79. package/dist/fixefy-ui-components/src/FxScore/FxScore.js +215 -0
  80. package/dist/fixefy-ui-components/src/FxScore/index.js +19 -0
  81. package/dist/fixefy-ui-components/src/FxScore/styles/score.styles.js +102 -0
  82. package/dist/fixefy-ui-components/src/FxShowMore/FxShowMore.js +80 -0
  83. package/dist/fixefy-ui-components/src/FxShowMore/index.js +19 -0
  84. package/dist/fixefy-ui-components/src/FxShowMore/styles/show_more.styles.js +143 -0
  85. package/dist/fixefy-ui-components/src/FxSlider/FxSlider.js +49 -0
  86. package/dist/fixefy-ui-components/src/FxSlider/index.js +19 -0
  87. package/dist/fixefy-ui-components/src/FxStatisticsBar/FxStatisticsBar.js +198 -0
  88. package/dist/fixefy-ui-components/src/FxStatisticsBar/index.js +19 -0
  89. package/dist/fixefy-ui-components/src/FxStatisticsBar/styles/statistics.styles.js +103 -0
  90. package/dist/fixefy-ui-components/src/FxStatusBar/FxStatusBar.js +149 -0
  91. package/dist/fixefy-ui-components/src/FxStatusBar/helpers/constants.js +22 -0
  92. package/dist/fixefy-ui-components/src/FxStatusBar/index.js +22 -0
  93. package/dist/fixefy-ui-components/src/FxStatusBar/styles/statusBar.styles.js +138 -0
  94. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/FxStrStaticDropdown.js +382 -0
  95. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/helpers/helpers.js +22 -0
  96. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/index.js +11 -0
  97. package/dist/fixefy-ui-components/src/FxStrStaticDropdown/styles/dropdown.styles.js +190 -0
  98. package/dist/fixefy-ui-components/src/FxStyledButton/FxStyledButton.js +57 -0
  99. package/dist/fixefy-ui-components/src/FxStyledButton/index.js +11 -0
  100. package/dist/fixefy-ui-components/src/FxStyledComponents/index.js +319 -0
  101. package/dist/fixefy-ui-components/src/FxSwitch/FxSwitch.js +106 -0
  102. package/dist/fixefy-ui-components/src/FxSwitch/index.js +19 -0
  103. package/dist/fixefy-ui-components/src/FxSwitch/styles/switch.styles.js +42 -0
  104. package/dist/fixefy-ui-components/src/FxTabs/FxTabs.js +79 -0
  105. package/dist/fixefy-ui-components/src/FxTabs/index.js +11 -0
  106. package/dist/fixefy-ui-components/src/FxTag/FxTag.js +50 -0
  107. package/dist/fixefy-ui-components/src/FxTag/index.js +19 -0
  108. package/dist/fixefy-ui-components/src/FxTag/styles/tag.styles.js +106 -0
  109. package/dist/fixefy-ui-components/src/FxTextField/FxTextField.js +211 -0
  110. package/dist/fixefy-ui-components/src/FxTextField/index.js +19 -0
  111. package/dist/fixefy-ui-components/src/FxTodo/FxTodo.js +95 -0
  112. package/dist/fixefy-ui-components/src/FxTodo/index.js +22 -0
  113. package/dist/fixefy-ui-components/src/FxTodo/styles/todo.styles.js +183 -0
  114. package/dist/fixefy-ui-components/src/FxToggleButtons/FxToggleButtons.js +69 -0
  115. package/dist/fixefy-ui-components/src/FxToggleButtons/index.js +11 -0
  116. package/dist/fixefy-ui-components/src/FxUserImage/FxUserImage.js +236 -0
  117. package/dist/fixefy-ui-components/src/FxUserImage/index.js +11 -0
  118. package/dist/fixefy-ui-components/src/FxWizard/FxWizard.js +50 -0
  119. package/dist/fixefy-ui-components/src/FxWizard/index.js +19 -0
  120. package/dist/fixefy-ui-components/src/FxWizard/steps launcher/StepsLauncher.js +52 -0
  121. package/dist/fixefy-ui-components/src/FxWizard/steps launcher/index.js +18 -0
  122. package/dist/fixefy-ui-components/src/index.js +277 -0
  123. package/package.json +4 -5
@@ -0,0 +1,382 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxStrStaticDropdown", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxStrStaticDropdown;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
13
+ const _CheckBoxOutlineBlank = /*#__PURE__*/ _interop_require_default(require("@mui/icons-material/CheckBoxOutlineBlank"));
14
+ const _CheckBox = /*#__PURE__*/ _interop_require_default(require("@mui/icons-material/CheckBox"));
15
+ const _Checkbox = /*#__PURE__*/ _interop_require_default(require("@mui/material/Checkbox"));
16
+ const _styles = require("@mui/material/styles");
17
+ const _Typography = /*#__PURE__*/ _interop_require_default(require("@mui/material/Typography"));
18
+ const _Box = /*#__PURE__*/ _interop_require_default(require("@mui/material/Box"));
19
+ const _Stack = /*#__PURE__*/ _interop_require_default(require("@mui/material/Stack"));
20
+ const _FxChip = require("../FxChip");
21
+ const _FxIcon = require("../FxIcon");
22
+ const _dropdownstyles = require("./styles/dropdown.styles");
23
+ const _helpers = require("./helpers/helpers");
24
+ function _interop_require_default(obj) {
25
+ return obj && obj.__esModule ? obj : {
26
+ default: obj
27
+ };
28
+ }
29
+ function _getRequireWildcardCache(nodeInterop) {
30
+ if (typeof WeakMap !== "function") return null;
31
+ var cacheBabelInterop = new WeakMap();
32
+ var cacheNodeInterop = new WeakMap();
33
+ return (_getRequireWildcardCache = function(nodeInterop) {
34
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
35
+ })(nodeInterop);
36
+ }
37
+ function _interop_require_wildcard(obj, nodeInterop) {
38
+ if (!nodeInterop && obj && obj.__esModule) {
39
+ return obj;
40
+ }
41
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
42
+ return {
43
+ default: obj
44
+ };
45
+ }
46
+ var cache = _getRequireWildcardCache(nodeInterop);
47
+ if (cache && cache.has(obj)) {
48
+ return cache.get(obj);
49
+ }
50
+ var newObj = {
51
+ __proto__: null
52
+ };
53
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
54
+ for(var key in obj){
55
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
56
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
57
+ if (desc && (desc.get || desc.set)) {
58
+ Object.defineProperty(newObj, key, desc);
59
+ } else {
60
+ newObj[key] = obj[key];
61
+ }
62
+ }
63
+ }
64
+ newObj.default = obj;
65
+ if (cache) {
66
+ cache.set(obj, newObj);
67
+ }
68
+ return newObj;
69
+ }
70
+ const icon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_CheckBoxOutlineBlank.default, {
71
+ fontSize: "small"
72
+ });
73
+ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_CheckBox.default, {
74
+ fontSize: "small"
75
+ });
76
+ const FxStrStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
77
+ const { assetUrl, onAdd, onRemoveOne, onRemoveAll, type = 'text', modal_type, multiple, name, query, isInitialOpen, placeholder, data, rootStylesOverride } = props;
78
+ const ref = (0, _react.useRef)(null);
79
+ const theme = (0, _styles.useTheme)();
80
+ const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
81
+ const [isOpen, setIsOpen] = (0, _react.useState)(isInitialOpen);
82
+ (0, _react.useEffect)(()=>{
83
+ const storedData = sessionStorage.getItem(`dropdown-${query}-${name}`);
84
+ if (storedData) {
85
+ const parsedData = JSON.parse(storedData);
86
+ if (parsedData) {
87
+ multiple ? setDisplayed([
88
+ ...parsedData
89
+ ]) : setDisplayed(parsedData[0]);
90
+ }
91
+ }
92
+ }, [
93
+ query
94
+ ]);
95
+ const addToStoredDisplayed = (option)=>{
96
+ const prevStored = sessionStorage.getItem(`dropdown-${query}-${name}`);
97
+ let data = prevStored ? JSON.parse(prevStored) : {};
98
+ if (data === null || data === void 0 ? void 0 : data.length) {
99
+ if (multiple) {
100
+ data = [
101
+ ...data,
102
+ option
103
+ ];
104
+ } else {
105
+ data = [
106
+ option
107
+ ];
108
+ }
109
+ } else {
110
+ data = [
111
+ option
112
+ ];
113
+ }
114
+ sessionStorage.setItem(`dropdown-${query}-${name}`, JSON.stringify(data));
115
+ };
116
+ const removeOneFromStoredDisplayed = (option)=>{
117
+ let storedDisplayed = sessionStorage.getItem(`dropdown-${query}-${name}`);
118
+ if (storedDisplayed) {
119
+ storedDisplayed = JSON.parse(storedDisplayed);
120
+ if (multiple) {
121
+ const newDisplayed = storedDisplayed.filter((opt)=>{
122
+ opt !== option;
123
+ });
124
+ storedDisplayed = newDisplayed;
125
+ } else {
126
+ storedDisplayed = storedDisplayed.filter((opt)=>opt !== option);
127
+ }
128
+ sessionStorage.setItem(`dropdown-${query}-${name}`, JSON.stringify(storedDisplayed));
129
+ }
130
+ };
131
+ const handleOptionClick = (option)=>{
132
+ switch(multiple){
133
+ case true:
134
+ if (displayed.includes(option)) {
135
+ deleteOneItem(option);
136
+ } else {
137
+ onAdd && onAdd(option);
138
+ setDisplayed((prev)=>[
139
+ ...prev,
140
+ option
141
+ ]);
142
+ addToStoredDisplayed(option);
143
+ }
144
+ break;
145
+ default:
146
+ setDisplayed(option);
147
+ onAdd && onAdd(option);
148
+ addToStoredDisplayed(option);
149
+ }
150
+ };
151
+ const deleteOneItem = (item)=>{
152
+ if (multiple) {
153
+ setDisplayed((prev)=>prev.filter((val)=>val !== item));
154
+ } else {
155
+ setDisplayed('');
156
+ }
157
+ onRemoveOne && onRemoveOne(item);
158
+ removeOneFromStoredDisplayed(item);
159
+ };
160
+ const isChecked = (option)=>{
161
+ return multiple ? displayed.includes(option) : displayed === option;
162
+ };
163
+ const displayListOptions = ()=>{
164
+ switch(type){
165
+ case 'checkbox':
166
+ {
167
+ return data.map((option)=>{
168
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)("li", {
169
+ onClick: ()=>{
170
+ handleOptionClick(option);
171
+ },
172
+ children: [
173
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Checkbox.default, {
174
+ icon: icon,
175
+ checked: isChecked(option),
176
+ checkedIcon: checkedIcon,
177
+ sx: {
178
+ mr: 1,
179
+ minWidth: 24,
180
+ minHeight: 24,
181
+ p: 0,
182
+ ['& svg']: {
183
+ fill: theme.palette.primary.light
184
+ }
185
+ }
186
+ }),
187
+ getSingleOptionFromListOrDisplayed(option, 'list')
188
+ ]
189
+ }, option);
190
+ });
191
+ }
192
+ case 'text':
193
+ default:
194
+ {
195
+ return data.map((option, i)=>{
196
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)("li", {
197
+ onClick: ()=>{
198
+ handleOptionClick(option);
199
+ },
200
+ children: getSingleOptionFromListOrDisplayed(option, 'list')
201
+ }, i);
202
+ });
203
+ }
204
+ }
205
+ };
206
+ const getCurrentValues = ()=>{
207
+ if (multiple) {
208
+ return getMultipleDisplayedValues();
209
+ } else {
210
+ return getSingleOptionFromListOrDisplayed(displayed, 'displayed');
211
+ }
212
+ };
213
+ const DeleteButton = ({ option, isDisplay })=>{
214
+ const isDisplayButton = isDisplay && multiple && (displayed === null || displayed === void 0 ? void 0 : displayed.length) > 0 || !multiple && displayed === option;
215
+ if (isDisplayButton) {
216
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
217
+ onClick: ()=>{
218
+ deleteOneItem(option);
219
+ },
220
+ children: "x"
221
+ });
222
+ }
223
+ return null;
224
+ };
225
+ const Chip = ({ option, modal })=>{
226
+ return modal == 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
227
+ assetUrl: assetUrl,
228
+ status: option,
229
+ label: (0, _helpers.titleCase)(option),
230
+ variant: "outlined",
231
+ onDelete: ()=>{
232
+ deleteOneItem(option);
233
+ }
234
+ }, option) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
235
+ assetUrl: assetUrl,
236
+ status: option,
237
+ label: (0, _helpers.titleCase)(option),
238
+ variant: "outlined"
239
+ }, option);
240
+ };
241
+ const ChosenIcon = ({ option, isDisplay })=>{
242
+ if (isDisplay && isChecked(option)) {
243
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
244
+ width: 16,
245
+ height: 16,
246
+ icon: 'filters/chosen_icon.svg',
247
+ assetUrl: assetUrl
248
+ });
249
+ }
250
+ return null;
251
+ };
252
+ const OneOption = ({ option, modal })=>{
253
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
254
+ sx: {
255
+ display: 'flex',
256
+ justifyContent: 'space-between',
257
+ width: '100%',
258
+ gap: 1,
259
+ color: 'grey',
260
+ cursor: 'pointer'
261
+ },
262
+ children: [
263
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
264
+ sx: {
265
+ width: '100%',
266
+ display: 'flex',
267
+ justifyContent: 'flex-start',
268
+ gap: 1
269
+ },
270
+ children: [
271
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Typography.default, {
272
+ variant: "subtitle2",
273
+ color: theme.palette.typography.title,
274
+ children: (0, _helpers.titleCase)(option)
275
+ }),
276
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(DeleteButton, {
277
+ option: option,
278
+ isDisplay: modal == 'displayed'
279
+ })
280
+ ]
281
+ }),
282
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(ChosenIcon, {
283
+ option: option,
284
+ isDisplay: modal == 'list'
285
+ })
286
+ ]
287
+ }, option);
288
+ };
289
+ const getSingleOptionFromListOrDisplayed = (option, modal)=>{
290
+ if (option) {
291
+ let rv = null;
292
+ switch(modal_type){
293
+ case 'chip':
294
+ rv = /*#__PURE__*/ (0, _jsxruntime.jsx)(Chip, {
295
+ option: option,
296
+ modal: modal
297
+ });
298
+ break;
299
+ case 'text':
300
+ default:
301
+ rv = /*#__PURE__*/ (0, _jsxruntime.jsx)(OneOption, {
302
+ option: option,
303
+ modal: modal
304
+ });
305
+ break;
306
+ }
307
+ return rv;
308
+ }
309
+ };
310
+ const getMultipleDisplayedValues = ()=>{
311
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.default, {
312
+ direction: 'row',
313
+ sx: {
314
+ maxWidth: 214,
315
+ minWidth: 214,
316
+ display: 'flex',
317
+ justifyContent: 'space-between'
318
+ },
319
+ children: [
320
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Stack.default, {
321
+ direction: 'row',
322
+ sx: {
323
+ overflow: 'hidden',
324
+ flexWrap: 'wrap',
325
+ gap: 1
326
+ },
327
+ children: displayed.map((item)=>{
328
+ return getSingleOptionFromListOrDisplayed(item, 'displayed');
329
+ })
330
+ }),
331
+ (displayed === null || displayed === void 0 ? void 0 : displayed.length) > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Box.default, {
332
+ sx: {
333
+ minWidth: '20px',
334
+ maxWidth: '20px',
335
+ cursor: 'pointer',
336
+ paddingLeft: '3px'
337
+ },
338
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
339
+ assetUrl: assetUrl,
340
+ onClick: ()=>{
341
+ setDisplayed([]);
342
+ onRemoveAll && onRemoveAll();
343
+ sessionStorage.removeItem(`dropdown-${query}-${name}`);
344
+ },
345
+ icon: 'filters/remove_all_button.svg',
346
+ width: 16,
347
+ height: 16
348
+ })
349
+ })
350
+ ]
351
+ });
352
+ };
353
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dropdownstyles.Root, {
354
+ style: rootStylesOverride,
355
+ children: [
356
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Box.default, {
357
+ children: [
358
+ getCurrentValues(),
359
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_dropdownstyles.InputWrapper, {
360
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("input", {
361
+ autoFocus: true,
362
+ placeholder: placeholder || 'Select an option...',
363
+ onFocus: ()=>{
364
+ !isInitialOpen && setIsOpen(true);
365
+ },
366
+ onBlur: ()=>{
367
+ setTimeout(()=>{
368
+ !isInitialOpen && setIsOpen(false);
369
+ }, 200);
370
+ }
371
+ })
372
+ })
373
+ ]
374
+ }),
375
+ (isInitialOpen || isOpen) && data && (data === null || data === void 0 ? void 0 : data.length) > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_dropdownstyles.StyledListBox, {
376
+ ref: ref,
377
+ children: displayListOptions()
378
+ })
379
+ ]
380
+ });
381
+ });
382
+ FxStrStaticDropdown.displayName = 'FxStrStaticDropdown';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ titleCase: function() {
13
+ return titleCase;
14
+ },
15
+ toPascalCase: function() {
16
+ return toPascalCase;
17
+ }
18
+ });
19
+ const titleCase = (str = '')=>str && toPascalCase(str.toString(), true);
20
+ const toPascalCase = (string, title = false)=>{
21
+ return string && string.replace(/(_[a-z])?(^[a-z])?(_|\s[a-z])?/g, ($1)=>$1.toUpperCase().replace('_', title ? ' ' : ''));
22
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxStrStaticDropdown", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _FxStrStaticDropdown.FxStrStaticDropdown;
9
+ }
10
+ });
11
+ const _FxStrStaticDropdown = require("./FxStrStaticDropdown");
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ InputWrapper: function() {
13
+ return InputWrapper;
14
+ },
15
+ Root: function() {
16
+ return Root;
17
+ },
18
+ StyledListBox: function() {
19
+ return StyledListBox;
20
+ }
21
+ });
22
+ const _styles = require("@mui/material/styles");
23
+ function _define_property(obj, key, value) {
24
+ if (key in obj) {
25
+ Object.defineProperty(obj, key, {
26
+ value: value,
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true
30
+ });
31
+ } else {
32
+ obj[key] = value;
33
+ }
34
+ return obj;
35
+ }
36
+ function _object_spread(target) {
37
+ for(var i = 1; i < arguments.length; i++){
38
+ var source = arguments[i] != null ? arguments[i] : {};
39
+ var ownKeys = Object.keys(source);
40
+ if (typeof Object.getOwnPropertySymbols === "function") {
41
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
42
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
43
+ }));
44
+ }
45
+ ownKeys.forEach(function(key) {
46
+ _define_property(target, key, source[key]);
47
+ });
48
+ }
49
+ return target;
50
+ }
51
+ function ownKeys(object, enumerableOnly) {
52
+ var keys = Object.keys(object);
53
+ if (Object.getOwnPropertySymbols) {
54
+ var symbols = Object.getOwnPropertySymbols(object);
55
+ if (enumerableOnly) {
56
+ symbols = symbols.filter(function(sym) {
57
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
58
+ });
59
+ }
60
+ keys.push.apply(keys, symbols);
61
+ }
62
+ return keys;
63
+ }
64
+ function _object_spread_props(target, source) {
65
+ source = source != null ? source : {};
66
+ if (Object.getOwnPropertyDescriptors) {
67
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
68
+ } else {
69
+ ownKeys(Object(source)).forEach(function(key) {
70
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
71
+ });
72
+ }
73
+ return target;
74
+ }
75
+ const Root = (0, _styles.styled)('div')(({ props })=>{
76
+ return _object_spread({
77
+ color: 'rgba(0,0,0,.85)',
78
+ fontSize: 14,
79
+ background: '#FFFFFF',
80
+ padding: '0 16px',
81
+ position: 'relative',
82
+ ' & .MuiBox-root': {
83
+ ['& > div']: {
84
+ padding: 0
85
+ }
86
+ }
87
+ }, props);
88
+ });
89
+ const InputWrapper = (0, _styles.styled)('div')(({ theme, hasValue, disabled })=>{
90
+ const disabledBorder = `1px solid ${theme.palette.greyscale[200]}`;
91
+ const activeBorder = `1px solid ${theme.palette.primary[500]}`;
92
+ return {
93
+ backgroundColor: theme.palette.common.white,
94
+ borderRadius: 4,
95
+ padding: 1,
96
+ display: 'flex',
97
+ alignItems: 'center',
98
+ flexWrap: 'wrap',
99
+ cursor: disabled ? 'not-allowed' : 'pointer',
100
+ width: '100%',
101
+ border: 'none !important',
102
+ outline: 'none !important',
103
+ ['&:hover']: {
104
+ border: disabled ? disabledBorder : activeBorder,
105
+ borderRadius: 4
106
+ },
107
+ ['&:focus']: {
108
+ border: disabled ? disabledBorder : activeBorder,
109
+ borderRadius: 4
110
+ },
111
+ ['& > svg']: {
112
+ color: disabled ? theme.palette.greyscale[300] : theme.palette.primary['500'],
113
+ marginRight: 8
114
+ },
115
+ ['& input']: _object_spread_props(_object_spread({
116
+ border: 'none',
117
+ outline: 'none',
118
+ cursor: disabled ? 'not-allowed' : 'pointer',
119
+ backgroundColor: theme.palette.common.white,
120
+ color: theme.palette.typography.title,
121
+ height: 36,
122
+ boxSizing: 'border-box',
123
+ width: 0,
124
+ minWidth: 30,
125
+ flexGrow: 1,
126
+ margin: 0
127
+ }, theme.typography.body1), {
128
+ lineHeight: '20px',
129
+ ['& ::placeholder']: {
130
+ color: hasValue ? theme.palette.typography.title : theme.palette.greyscale[400]
131
+ }
132
+ })
133
+ };
134
+ });
135
+ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
136
+ margin: 0,
137
+ padding: 0,
138
+ listStyle: 'none',
139
+ backgroundColor: theme.palette.common.white,
140
+ overflow: 'auto',
141
+ zIndex: 1,
142
+ textOverflow: 'ellipsis',
143
+ whiteSpace: 'nowrap',
144
+ overflowX: 'hidden',
145
+ paddingTop: 8,
146
+ paddingBottom: 8,
147
+ '&::-webkit-scrollbar': {
148
+ width: '8px',
149
+ backgroundColor: 'transparent'
150
+ },
151
+ '&::-webkit-scrollbar-thumb': {
152
+ backgroundColor: '#8B9092',
153
+ borderRadius: '8px'
154
+ },
155
+ // To support Firefox
156
+ scrollbarWidth: 'thin',
157
+ scrollbarColor: '#8B9092 transparent',
158
+ maxHeight: '300px',
159
+ overflowY: 'auto',
160
+ ['& div']: {
161
+ textOverflow: 'ellipsis',
162
+ whiteSpace: 'nowrap',
163
+ overflow: 'hidden'
164
+ },
165
+ ['& li']: {
166
+ display: 'flex',
167
+ alignItems: 'center',
168
+ justifyContent: 'flex-start',
169
+ height: 40,
170
+ cursor: 'pointer',
171
+ textOverflow: 'ellipsis',
172
+ whiteSpace: 'nowrap',
173
+ overflow: 'hidden',
174
+ width: '100%'
175
+ },
176
+ ['& li:hover']: {
177
+ backgroundColor: '#F6F9FA'
178
+ },
179
+ ['& li[aria-selected=\'true\']']: {
180
+ fontWeight: 900,
181
+ backgroundColor: '#F6F9FA'
182
+ },
183
+ ['& li[data-focus=\'true\']']: {
184
+ backgroundColor: '#F6F9FA',
185
+ cursor: 'pointer',
186
+ ['& svg ']: {
187
+ color: 'currentColor'
188
+ }
189
+ }
190
+ }));
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxStyledButton", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxStyledButton;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _Button = /*#__PURE__*/ _interop_require_default(require("@mui/material/Button"));
14
+ const _IconButton = /*#__PURE__*/ _interop_require_default(require("@mui/material/IconButton"));
15
+ const _FxIcon = require("../FxIcon");
16
+ const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
17
+ function _interop_require_default(obj) {
18
+ return obj && obj.__esModule ? obj : {
19
+ default: obj
20
+ };
21
+ }
22
+ const FxStyledButton = ({ btnValue, btnType = 'text', disabled, onClick, startIcon, endIcon, iconSize, sx, variant, assetUrl })=>{
23
+ return btnType == 'text' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.default, {
24
+ disabled: disabled,
25
+ sx: sx,
26
+ variant: variant || 'text',
27
+ onClick: (e)=>{
28
+ onClick && onClick(e);
29
+ },
30
+ startIcon: startIcon && iconSize ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
31
+ width: iconSize,
32
+ height: iconSize,
33
+ icon: startIcon,
34
+ assetUrl: assetUrl
35
+ }) : null,
36
+ endIcon: endIcon && iconSize ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
37
+ width: iconSize,
38
+ height: iconSize,
39
+ icon: endIcon,
40
+ assetUrl: assetUrl
41
+ }) : null,
42
+ children: (0, _fixefyuiutils.titleCase)(btnValue)
43
+ }) : btnType == 'icon' && startIcon && iconSize && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_IconButton.default, {
44
+ onClick: onClick,
45
+ sx: sx,
46
+ disabled: disabled,
47
+ children: [
48
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
49
+ icon: startIcon,
50
+ width: iconSize,
51
+ height: iconSize,
52
+ assetUrl: assetUrl
53
+ }),
54
+ ' '
55
+ ]
56
+ });
57
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxStyledButton", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _FxStyledButton.FxStyledButton;
9
+ }
10
+ });
11
+ const _FxStyledButton = require("./FxStyledButton");