@fixefy/fixefy-ui-components 0.3.74 → 0.3.78

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 (205) hide show
  1. package/dist/FxActionsTray/FxActionsTray.js +17 -12
  2. package/dist/FxActionsTray/styles/actionsTray.style.d.ts +3 -5
  3. package/dist/FxAggregationsBar/helpers/structureReader.js +6 -4
  4. package/dist/FxAsyncDropdown/FxAsyncDropdown.js +18 -10
  5. package/dist/FxAsyncDropdown/components/CheckboxIcon.js +8 -6
  6. package/dist/FxAsyncDropdown/components/ChipOption.d.ts +1 -1
  7. package/dist/FxAsyncDropdown/components/DeleteButton.js +2 -2
  8. package/dist/FxAsyncDropdown/components/LogoOption.d.ts +1 -1
  9. package/dist/FxAsyncDropdown/components/LogoOption.js +7 -6
  10. package/dist/FxAsyncDropdown/components/TextOption.d.ts +1 -1
  11. package/dist/FxAsyncDropdown/components/TextOption.js +7 -6
  12. package/dist/FxAsyncDropdown/styles/dropdown.styles.js +2 -2
  13. package/dist/FxAvatar/helpers/stringToColor.js +2 -2
  14. package/dist/FxAvatar/styles/avatar.styles.js +77 -36
  15. package/dist/FxButton/styles/button.styles.js +8 -3
  16. package/dist/FxButtonModalWithComponent/FxButtonModalWithComponent.d.ts +1 -1
  17. package/dist/FxButtonModalWithComponent/FxButtonModalWithComponent.js +11 -4
  18. package/dist/FxButtonModalWithMenu/FxButtonModalWithMenu.d.ts +1 -1
  19. package/dist/FxButtonModalWithMenu/FxButtonModalWithMenu.js +11 -4
  20. package/dist/FxChip/FxChip.js +2 -2
  21. package/dist/FxChip/styles/chip.styles.js +11 -6
  22. package/dist/FxDatesProgress/FxDatesProgress.js +8 -7
  23. package/dist/FxDatesProgress/styles/progress.styles.js +8 -2
  24. package/dist/FxGeneralModal/FxGeneralModal.js +12 -5
  25. package/dist/FxGridEmptyState/FxGridEmptyState.js +7 -6
  26. package/dist/FxGridError/FxGridError.js +8 -7
  27. package/dist/FxIcon/FxIcon.d.ts +1 -1
  28. package/dist/FxIcon/FxIcon.js +5 -4
  29. package/dist/FxIcon/content/index.d.ts +2 -2
  30. package/dist/FxIcon/content/lazy_icon.d.ts +1 -1
  31. package/dist/FxIcon/content/lazy_icon.js +4 -3
  32. package/dist/FxMenuItemWithIcon/FxMenuItemWithIcon.js +6 -4
  33. package/dist/FxModal/FxModal.js +4 -3
  34. package/dist/FxModal/styles/modal.style.js +12 -5
  35. package/dist/FxNotes/FxNotes.js +2 -2
  36. package/dist/FxNotes/helpers/stringToColor.js +2 -2
  37. package/dist/FxNotes/styles/notes.styles.js +2 -2
  38. package/dist/FxNumberField/FxNumberField.js +1 -2
  39. package/dist/FxNumberField/styles/number_field.styles.d.ts +1 -1
  40. package/dist/FxNumberField/styles/number_field.styles.js +7 -2
  41. package/dist/FxObjStaticDropdown/FxObjStaticDropdown.js +27 -16
  42. package/dist/FxObjStaticDropdown/styles/dropdown.styles.js +2 -2
  43. package/dist/FxPopper/Popper.d.ts +2 -1
  44. package/dist/FxPopper/Popper.js +11 -6
  45. package/dist/FxPopper/PopperWithOutside.d.ts +1 -1
  46. package/dist/FxPopper/PopperWithOutside.js +4 -3
  47. package/dist/FxPopper/styles/popper.styles.js +1 -1
  48. package/dist/FxProgressCircle/styles/progress_circle.styles.js +12 -12
  49. package/dist/FxProgressCounter/ProgressCounter.js +10 -9
  50. package/dist/FxProgressCounter/styles/progress_counter.styles.js +12 -7
  51. package/dist/FxScore/FxScore.js +19 -11
  52. package/dist/FxScore/styles/score.styles.d.ts +1 -1
  53. package/dist/FxScore/styles/score.styles.js +7 -2
  54. package/dist/FxShowMore/FxShowMore.js +2 -2
  55. package/dist/FxShowMore/styles/show_more.styles.js +16 -7
  56. package/dist/FxSlider/FxSlider.js +2 -2
  57. package/dist/FxStatisticsBar/FxStatisticsBar.js +12 -6
  58. package/dist/FxStatisticsBar/styles/statistics.styles.d.ts +1 -1
  59. package/dist/FxStatisticsBar/styles/statistics.styles.js +7 -2
  60. package/dist/FxStatusBar/FxStatusBar.js +7 -2
  61. package/dist/FxStatusBar/styles/statusBar.styles.js +22 -15
  62. package/dist/FxStrStaticDropdown/FxStrStaticDropdown.js +26 -16
  63. package/dist/FxStrStaticDropdown/styles/dropdown.styles.js +2 -2
  64. package/dist/FxStyledButton/FxStyledButton.d.ts +2 -2
  65. package/dist/FxStyledButton/FxStyledButton.js +4 -3
  66. package/dist/FxStyledComponents/index.d.ts +1 -1
  67. package/dist/FxStyledComponents/index.js +32 -23
  68. package/dist/FxSwitch/FxSwitch.d.ts +6 -0
  69. package/dist/{src/FxButton/FxButton.js → FxSwitch/FxSwitch.js} +5 -5
  70. package/dist/FxSwitch/index.d.ts +1 -0
  71. package/dist/{src/FxChip → FxSwitch}/index.js +5 -5
  72. package/dist/FxSwitch/styles/switch.styles.d.ts +1 -0
  73. package/dist/FxSwitch/styles/switch.styles.js +42 -0
  74. package/dist/FxTabs/FxTabs.js +13 -9
  75. package/dist/FxTag/FxTag.js +2 -2
  76. package/dist/FxTag/index.d.ts +1 -1
  77. package/dist/FxTag/styles/tag.styles.js +10 -4
  78. package/dist/FxTextField/FxTextField.d.ts +1 -1
  79. package/dist/FxTextField/FxTextField.js +10 -7
  80. package/dist/FxTodo/FxTodo.js +5 -5
  81. package/dist/FxToggleButtons/FxToggleButtons.js +6 -5
  82. package/dist/FxUserImage/FxUserImage.js +7 -3
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +3 -3
  85. package/package.json +31 -29
  86. package/dist/FxActionButton/FxActionButton.d.ts +0 -7
  87. package/dist/FxActionButton/FxActionButton.js +0 -82
  88. package/dist/FxActionButton/index.d.ts +0 -1
  89. package/dist/FxActionButton/index.js +0 -11
  90. package/dist/FxActionsTray/styles/actions_tray.styles.d.ts +0 -8
  91. package/dist/FxActionsTray/styles/actions_tray.styles.js +0 -159
  92. package/dist/FxAsyncDropdown/useDropdownStore.d.ts +0 -2
  93. package/dist/FxAsyncDropdown/useDropdownStore.js +0 -57
  94. package/dist/FxFilterActionButton/FxFilterActionButton.d.ts +0 -7
  95. package/dist/FxFilterActionButton/FxFilterActionButton.js +0 -82
  96. package/dist/FxFilterActionButton/index.d.ts +0 -1
  97. package/dist/FxFilterActionButton/index.js +0 -11
  98. package/dist/FxFilterSortButton/FxFilterSortButton.d.ts +0 -7
  99. package/dist/FxFilterSortButton/FxFilterSortButton.js +0 -82
  100. package/dist/FxFilterSortButton/index.d.ts +0 -1
  101. package/dist/FxFilterSortButton/index.js +0 -11
  102. package/dist/FxModalWithButton/FxModalWithButton.d.ts +0 -10
  103. package/dist/FxModalWithButton/FxModalWithButton.js +0 -131
  104. package/dist/FxModalWithButton/index.d.ts +0 -1
  105. package/dist/FxModalWithButton/index.js +0 -11
  106. package/dist/FxModalWithComponent/FxModalWithComponent.d.ts +0 -11
  107. package/dist/FxModalWithComponent/FxModalWithComponent.js +0 -102
  108. package/dist/FxModalWithComponent/index.d.ts +0 -1
  109. package/dist/FxModalWithComponent/index.js +0 -11
  110. package/dist/FxModalWithMenu/FxModalWithMenu.d.ts +0 -14
  111. package/dist/FxModalWithMenu/FxModalWithMenu.js +0 -114
  112. package/dist/FxModalWithMenu/index.d.ts +0 -1
  113. package/dist/FxModalWithMenu/index.js +0 -11
  114. package/dist/FxPopper/styles/makeStyles.d.ts +0 -16
  115. package/dist/FxPopper/styles/makeStyles.js +0 -23
  116. package/dist/FxStaticDropdown/FxStaticDropdown.d.ts +0 -24
  117. package/dist/FxStaticDropdown/FxStaticDropdown.js +0 -368
  118. package/dist/FxStaticDropdown/helpers/helpers.d.ts +0 -2
  119. package/dist/FxStaticDropdown/helpers/helpers.js +0 -22
  120. package/dist/FxStaticDropdown/index.d.ts +0 -1
  121. package/dist/FxStaticDropdown/index.js +0 -11
  122. package/dist/FxStaticDropdown/styles/dropdown.styles.d.ts +0 -3
  123. package/dist/FxStaticDropdown/styles/dropdown.styles.js +0 -190
  124. package/dist/FxWizard/FxWizard/FxWizard.d.ts +0 -6
  125. package/dist/FxWizard/FxWizard/FxWizard.js +0 -42
  126. package/dist/FxWizard/FxWizard/index.d.ts +0 -2
  127. package/dist/FxWizard/FxWizard/index.js +0 -19
  128. package/dist/FxWizard/FxWizard/utils/envHelpers.d.ts +0 -1
  129. package/dist/FxWizard/FxWizard/utils/envHelpers.js +0 -35
  130. package/dist/FxWizard/FxWizard/utils/index.d.ts +0 -1
  131. package/dist/FxWizard/FxWizard/utils/index.js +0 -18
  132. package/dist/FxWizard/pages/wizard/[step].d.ts +0 -9
  133. package/dist/FxWizard/pages/wizard/[step].js +0 -112
  134. package/dist/FxWizard/pages/wizard/index.d.ts +0 -1
  135. package/dist/FxWizard/pages/wizard/index.js +0 -18
  136. package/dist/src/FxActionsTray/FxActionsTray.js +0 -351
  137. package/dist/src/FxActionsTray/index.js +0 -19
  138. package/dist/src/FxActionsTray/styles/actions_tray.styles.js +0 -159
  139. package/dist/src/FxAggregationsBar/FxAggregations.js +0 -41
  140. package/dist/src/FxAggregationsBar/helpers/structureReader.js +0 -78
  141. package/dist/src/FxAggregationsBar/index.js +0 -22
  142. package/dist/src/FxAggregationsBar/operations/query.js +0 -73
  143. package/dist/src/FxAsyncDropdown/FxAsyncDropdown.js +0 -628
  144. package/dist/src/FxAsyncDropdown/helpers/helpers.js +0 -161
  145. package/dist/src/FxAsyncDropdown/index.js +0 -25
  146. package/dist/src/FxAsyncDropdown/styles/dropdown.styles.js +0 -228
  147. package/dist/src/FxAvatar/FxAvatar.js +0 -145
  148. package/dist/src/FxAvatar/helpers/stringToColor.js +0 -23
  149. package/dist/src/FxAvatar/index.js +0 -22
  150. package/dist/src/FxAvatar/styles/avatar.styles.js +0 -192
  151. package/dist/src/FxButton/index.js +0 -19
  152. package/dist/src/FxButton/styles/button.styles.js +0 -23
  153. package/dist/src/FxChip/FxChip.js +0 -45
  154. package/dist/src/FxChip/styles/chip.styles.js +0 -61
  155. package/dist/src/FxFilterSortButton/FxFilterSortButton.js +0 -82
  156. package/dist/src/FxFilterSortButton/index.js +0 -11
  157. package/dist/src/FxIcon/FxIcon.js +0 -107
  158. package/dist/src/FxIcon/content/dynamic_icon.js +0 -20
  159. package/dist/src/FxIcon/content/index.js +0 -20
  160. package/dist/src/FxIcon/content/lazy_icon.js +0 -137
  161. package/dist/src/FxIcon/index.js +0 -11
  162. package/dist/src/FxModal/FxModal.js +0 -170
  163. package/dist/src/FxModal/index.js +0 -19
  164. package/dist/src/FxModal/styles/modal.style.js +0 -59
  165. package/dist/src/FxModalWithButton/FxModalWithButton.js +0 -94
  166. package/dist/src/FxModalWithButton/index.js +0 -11
  167. package/dist/src/FxNotes/FxNotes.js +0 -216
  168. package/dist/src/FxNotes/helpers/stringToColor.js +0 -26
  169. package/dist/src/FxNotes/index.js +0 -22
  170. package/dist/src/FxNotes/operations/queries.js +0 -35
  171. package/dist/src/FxNotes/styles/notes.styles.js +0 -168
  172. package/dist/src/FxNumberField/FxNumberField.js +0 -109
  173. package/dist/src/FxNumberField/index.js +0 -19
  174. package/dist/src/FxNumberField/styles/number_field.styles.js +0 -94
  175. package/dist/src/FxProgressCircle/FxProgressCircle.js +0 -65
  176. package/dist/src/FxProgressCircle/index.js +0 -19
  177. package/dist/src/FxProgressCircle/styles/progress_circle.styles.js +0 -106
  178. package/dist/src/FxProgressCounter/ProgressCounter.js +0 -168
  179. package/dist/src/FxProgressCounter/index.js +0 -19
  180. package/dist/src/FxProgressCounter/styles/progress_counter.styles.js +0 -61
  181. package/dist/src/FxScore/FxScore.js +0 -207
  182. package/dist/src/FxScore/index.js +0 -19
  183. package/dist/src/FxScore/styles/score.styles.js +0 -97
  184. package/dist/src/FxShowMore/FxShowMore.js +0 -80
  185. package/dist/src/FxShowMore/index.js +0 -19
  186. package/dist/src/FxShowMore/styles/show_more.styles.js +0 -134
  187. package/dist/src/FxSlider/FxSlider.js +0 -49
  188. package/dist/src/FxSlider/index.js +0 -19
  189. package/dist/src/FxStatisticsBar/FxStatisticsBar.js +0 -191
  190. package/dist/src/FxStatisticsBar/index.js +0 -19
  191. package/dist/src/FxStatisticsBar/styles/statistics.styles.js +0 -98
  192. package/dist/src/FxStatusBar/FxStatusBar.js +0 -143
  193. package/dist/src/FxStatusBar/helpers/constants.js +0 -22
  194. package/dist/src/FxStatusBar/index.js +0 -22
  195. package/dist/src/FxStatusBar/styles/statusBar.styles.js +0 -131
  196. package/dist/src/FxStyledComponents/index.js +0 -310
  197. package/dist/src/FxTag/FxTag.js +0 -41
  198. package/dist/src/FxTag/index.js +0 -19
  199. package/dist/src/FxTag/styles/tag.styles.js +0 -100
  200. package/dist/src/FxTextField/FxTextField.js +0 -208
  201. package/dist/src/FxTextField/index.js +0 -19
  202. package/dist/src/FxTodo/FxTodo.js +0 -95
  203. package/dist/src/FxTodo/index.js +0 -22
  204. package/dist/src/FxTodo/styles/todo.styles.js +0 -183
  205. package/dist/src/index.js +0 -215
@@ -1,368 +0,0 @@
1
- // @ts-ignore
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "FxStaticDropdown", {
7
- enumerable: true,
8
- get: function() {
9
- return FxStaticDropdown;
10
- }
11
- });
12
- const _jsxruntime = require("react/jsx-runtime");
13
- const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
14
- const _iconsmaterial = require("@mui/icons-material");
15
- const _material = require("@mui/material");
16
- const _FxChip = require("../FxChip");
17
- const _FxIcon = require("../FxIcon");
18
- const _dropdownstyles = require("./styles/dropdown.styles");
19
- const _helpers = require("./helpers/helpers");
20
- function _getRequireWildcardCache(nodeInterop) {
21
- if (typeof WeakMap !== "function") return null;
22
- var cacheBabelInterop = new WeakMap();
23
- var cacheNodeInterop = new WeakMap();
24
- return (_getRequireWildcardCache = function(nodeInterop) {
25
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
26
- })(nodeInterop);
27
- }
28
- function _interop_require_wildcard(obj, nodeInterop) {
29
- if (!nodeInterop && obj && obj.__esModule) {
30
- return obj;
31
- }
32
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
33
- return {
34
- default: obj
35
- };
36
- }
37
- var cache = _getRequireWildcardCache(nodeInterop);
38
- if (cache && cache.has(obj)) {
39
- return cache.get(obj);
40
- }
41
- var newObj = {
42
- __proto__: null
43
- };
44
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
45
- for(var key in obj){
46
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
47
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
48
- if (desc && (desc.get || desc.set)) {
49
- Object.defineProperty(newObj, key, desc);
50
- } else {
51
- newObj[key] = obj[key];
52
- }
53
- }
54
- }
55
- newObj.default = obj;
56
- if (cache) {
57
- cache.set(obj, newObj);
58
- }
59
- return newObj;
60
- }
61
- const icon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_iconsmaterial.CheckBoxOutlineBlank, {
62
- fontSize: "small"
63
- });
64
- const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_iconsmaterial.CheckBox, {
65
- fontSize: "small"
66
- });
67
- const FxStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
68
- const { onAdd, onRemoveOne, onRemoveAll, type = 'text', modal_type, multiple, name, query, isInitialOpen, placeholder, data, rootStylesOverride } = props;
69
- const ref = (0, _react.useRef)(null);
70
- const theme = (0, _material.useTheme)();
71
- const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
72
- const [isOpen, setIsOpen] = (0, _react.useState)(isInitialOpen);
73
- (0, _react.useEffect)(()=>{
74
- const storedData = sessionStorage.getItem(`dropdown-${query}-${name}`);
75
- if (storedData) {
76
- const parsedData = JSON.parse(storedData);
77
- if (parsedData) {
78
- multiple ? setDisplayed([
79
- ...parsedData
80
- ]) : setDisplayed(parsedData[0]);
81
- }
82
- }
83
- }, [
84
- query
85
- ]);
86
- const addToStoredDisplayed = (option)=>{
87
- const prevStored = sessionStorage.getItem(`dropdown-${query}-${name}`);
88
- let data = prevStored ? JSON.parse(prevStored) : {};
89
- if (data === null || data === void 0 ? void 0 : data.length) {
90
- if (multiple) {
91
- data = [
92
- ...data,
93
- option
94
- ];
95
- } else {
96
- data = [
97
- option
98
- ];
99
- }
100
- } else {
101
- data = [
102
- option
103
- ];
104
- }
105
- sessionStorage.setItem(`dropdown-${query}-${name}`, JSON.stringify(data));
106
- };
107
- const removeOneFromStoredDisplayed = (option)=>{
108
- let storedDisplayed = sessionStorage.getItem(`dropdown-${query}-${name}`);
109
- if (storedDisplayed) {
110
- storedDisplayed = JSON.parse(storedDisplayed);
111
- if (multiple) {
112
- const newDisplayed = storedDisplayed.filter((opt)=>{
113
- opt !== option;
114
- });
115
- storedDisplayed = newDisplayed;
116
- } else {
117
- storedDisplayed = storedDisplayed.filter((opt)=>opt !== option);
118
- }
119
- sessionStorage.setItem(`dropdown-${query}-${name}`, JSON.stringify(storedDisplayed));
120
- }
121
- };
122
- const handleOptionClick = (option)=>{
123
- switch(multiple){
124
- case true:
125
- if (displayed.includes(option)) {
126
- deleteOneItem(option);
127
- } else {
128
- onAdd && onAdd(option);
129
- setDisplayed((prev)=>[
130
- ...prev,
131
- option
132
- ]);
133
- addToStoredDisplayed(option);
134
- }
135
- break;
136
- default:
137
- setDisplayed(option);
138
- onAdd && onAdd(option);
139
- addToStoredDisplayed(option);
140
- }
141
- };
142
- const deleteOneItem = (item)=>{
143
- if (multiple) {
144
- setDisplayed((prev)=>prev.filter((val)=>val !== item));
145
- } else {
146
- setDisplayed('');
147
- }
148
- onRemoveOne && onRemoveOne(item);
149
- removeOneFromStoredDisplayed(item);
150
- };
151
- const isChecked = (option)=>{
152
- return multiple ? displayed.includes(option) : displayed === option;
153
- };
154
- const displayListOptions = ()=>{
155
- switch(type){
156
- case 'checkbox':
157
- {
158
- return data.map((option)=>{
159
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)("li", {
160
- onClick: ()=>{
161
- handleOptionClick(option);
162
- },
163
- children: [
164
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Checkbox, {
165
- icon: icon,
166
- checked: isChecked(option),
167
- checkedIcon: checkedIcon,
168
- sx: {
169
- mr: 1,
170
- minWidth: 24,
171
- minHeight: 24,
172
- p: 0,
173
- ['& svg']: {
174
- fill: theme.palette.primary.light
175
- }
176
- }
177
- }),
178
- getSingleOptionFromListOrDisplayed(option, 'list')
179
- ]
180
- }, option);
181
- });
182
- }
183
- case 'text':
184
- default:
185
- {
186
- return data.map((option, i)=>{
187
- return /*#__PURE__*/ (0, _jsxruntime.jsx)("li", {
188
- onClick: ()=>{
189
- handleOptionClick(option);
190
- },
191
- children: getSingleOptionFromListOrDisplayed(option, 'list')
192
- }, i);
193
- });
194
- }
195
- }
196
- };
197
- const getCurrentValues = ()=>{
198
- if (multiple) {
199
- return getMultipleDisplayedValues();
200
- } else {
201
- return getSingleOptionFromListOrDisplayed(displayed, 'displayed');
202
- }
203
- };
204
- const DeleteButton = ({ option, isDisplay })=>{
205
- const isDisplayButton = isDisplay && multiple && (displayed === null || displayed === void 0 ? void 0 : displayed.length) > 0 || !multiple && displayed === option;
206
- if (isDisplayButton) {
207
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
208
- onClick: ()=>{
209
- deleteOneItem(option);
210
- },
211
- children: "x"
212
- });
213
- }
214
- return null;
215
- };
216
- const Chip = ({ option, modal })=>{
217
- return modal == 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
218
- status: option,
219
- label: (0, _helpers.titleCase)(option),
220
- variant: "outlined",
221
- onDelete: ()=>{
222
- deleteOneItem(option);
223
- }
224
- }, option) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
225
- status: option,
226
- label: (0, _helpers.titleCase)(option),
227
- variant: "outlined"
228
- }, option);
229
- };
230
- const ChosenIcon = ({ option, isDisplay })=>{
231
- if (isDisplay && isChecked(option)) {
232
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
233
- width: 16,
234
- height: 16,
235
- icon: 'filters/chosen_icon.svg'
236
- });
237
- }
238
- return null;
239
- };
240
- const OneOption = ({ option, modal })=>{
241
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
242
- sx: {
243
- display: 'flex',
244
- justifyContent: 'space-between',
245
- width: '100%',
246
- gap: 1,
247
- color: 'grey',
248
- cursor: 'pointer'
249
- },
250
- children: [
251
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
252
- sx: {
253
- width: '100%',
254
- display: 'flex',
255
- justifyContent: 'flex-start',
256
- gap: 1
257
- },
258
- children: [
259
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
260
- variant: "subtitle2",
261
- color: theme.palette.typography.title,
262
- children: (0, _helpers.titleCase)(option)
263
- }),
264
- /*#__PURE__*/ (0, _jsxruntime.jsx)(DeleteButton, {
265
- option: option,
266
- isDisplay: modal == 'displayed'
267
- })
268
- ]
269
- }),
270
- /*#__PURE__*/ (0, _jsxruntime.jsx)(ChosenIcon, {
271
- option: option,
272
- isDisplay: modal == 'list'
273
- })
274
- ]
275
- }, option);
276
- };
277
- const getSingleOptionFromListOrDisplayed = (option, modal)=>{
278
- if (option) {
279
- let rv = null;
280
- switch(modal_type){
281
- case 'chip':
282
- rv = /*#__PURE__*/ (0, _jsxruntime.jsx)(Chip, {
283
- option: option,
284
- modal: modal
285
- });
286
- break;
287
- case 'text':
288
- default:
289
- rv = /*#__PURE__*/ (0, _jsxruntime.jsx)(OneOption, {
290
- option: option,
291
- modal: modal
292
- });
293
- break;
294
- }
295
- return rv;
296
- }
297
- };
298
- const getMultipleDisplayedValues = ()=>{
299
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
300
- direction: 'row',
301
- sx: {
302
- maxWidth: 214,
303
- minWidth: 214,
304
- display: 'flex',
305
- justifyContent: 'space-between'
306
- },
307
- children: [
308
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
309
- direction: 'row',
310
- sx: {
311
- overflow: 'hidden',
312
- flexWrap: 'wrap',
313
- gap: 1
314
- },
315
- children: displayed.map((item)=>{
316
- return getSingleOptionFromListOrDisplayed(item, 'displayed');
317
- })
318
- }),
319
- (displayed === null || displayed === void 0 ? void 0 : displayed.length) > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
320
- sx: {
321
- minWidth: '20px',
322
- maxWidth: '20px',
323
- cursor: 'pointer',
324
- paddingLeft: '3px'
325
- },
326
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
327
- onClick: ()=>{
328
- setDisplayed([]);
329
- onRemoveAll && onRemoveAll();
330
- sessionStorage.removeItem(`dropdown-${query}-${name}`);
331
- },
332
- icon: `filters/remove_all_button.svg`,
333
- width: 16,
334
- height: 16
335
- })
336
- })
337
- ]
338
- });
339
- };
340
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dropdownstyles.Root, {
341
- style: rootStylesOverride,
342
- children: [
343
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
344
- children: [
345
- getCurrentValues(),
346
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_dropdownstyles.InputWrapper, {
347
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)("input", {
348
- autoFocus: true,
349
- placeholder: placeholder || 'Select an option...',
350
- onFocus: ()=>{
351
- !isInitialOpen && setIsOpen(true);
352
- },
353
- onBlur: ()=>{
354
- setTimeout(()=>{
355
- !isInitialOpen && setIsOpen(false);
356
- }, 200);
357
- }
358
- })
359
- })
360
- ]
361
- }),
362
- (isInitialOpen || isOpen) && data && (data === null || data === void 0 ? void 0 : data.length) > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_dropdownstyles.StyledListBox, {
363
- ref: ref,
364
- children: displayListOptions()
365
- })
366
- ]
367
- });
368
- });
@@ -1,2 +0,0 @@
1
- export declare const titleCase: (str?: string) => string;
2
- export declare const toPascalCase: (string: string, title?: boolean) => string;
@@ -1,22 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export { FxStaticDropdown, type StaticDropdownStylesOptions, type StaticDropdownPropsType } from './FxStaticDropdown';
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "FxStaticDropdown", {
6
- enumerable: true,
7
- get: function() {
8
- return _FxStaticDropdown.FxStaticDropdown;
9
- }
10
- });
11
- const _FxStaticDropdown = require("./FxStaticDropdown");
@@ -1,3 +0,0 @@
1
- export declare const Root: any;
2
- export declare const InputWrapper: any;
3
- export declare const StyledListBox: any;
@@ -1,190 +0,0 @@
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
- }));
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- declare const FxWizard: ({ config, footer }: {
3
- config: any;
4
- footer: any;
5
- }) => React.JSX.Element;
6
- export default FxWizard;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return _default;
9
- }
10
- });
11
- const _jsxruntime = require("react/jsx-runtime");
12
- const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
- const _reactusewizard = require("react-use-wizard");
14
- function _interop_require_default(obj) {
15
- return obj && obj.__esModule ? obj : {
16
- default: obj
17
- };
18
- }
19
- const FxWizard = ({ config, footer })=>{
20
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactusewizard.Wizard, {
21
- footer: footer,
22
- children: config === null || config === void 0 ? void 0 : config.steps.map((step, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(WizardStepWrapper, {
23
- props: step,
24
- Component: step.component
25
- }, i))
26
- });
27
- };
28
- const WizardStepWrapper = ({ Component, props })=>{
29
- console.log('WizardStepWrapper', JSON.stringify(props));
30
- const { goToStep, isLastStep } = (0, _reactusewizard.useWizard)();
31
- const handleNext = ()=>{
32
- if (!isLastStep) {
33
- goToStep(props.nextStepPath);
34
- } else {
35
- console.log('Reached the final step');
36
- }
37
- };
38
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(Component, {
39
- onHandleNext: handleNext
40
- });
41
- };
42
- const _default = FxWizard;
@@ -1,2 +0,0 @@
1
- export * from './FxWizard';
2
- export * from './utils';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- _export_star(require("./FxWizard"), exports);
6
- _export_star(require("./utils"), exports);
7
- function _export_star(from, to) {
8
- Object.keys(from).forEach(function(k) {
9
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
10
- Object.defineProperty(to, k, {
11
- enumerable: true,
12
- get: function() {
13
- return from[k];
14
- }
15
- });
16
- }
17
- });
18
- return from;
19
- }
@@ -1 +0,0 @@
1
- export declare const getEnvSuffix: () => string;