@fixefy/fixefy-ui-components 0.3.50 → 0.3.52

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 (29) hide show
  1. package/dist/FxAsyncDropdown/FxAsyncDropdown.d.ts +2 -34
  2. package/dist/FxAsyncDropdown/FxAsyncDropdown.js +97 -255
  3. package/dist/FxAsyncDropdown/components/CheckboxIcon.d.ts +4 -0
  4. package/dist/FxAsyncDropdown/components/CheckboxIcon.js +42 -0
  5. package/dist/FxAsyncDropdown/components/ChipOption.d.ts +6 -0
  6. package/dist/FxAsyncDropdown/components/ChipOption.js +35 -0
  7. package/dist/FxAsyncDropdown/components/ChosenIcon.d.ts +5 -0
  8. package/dist/FxAsyncDropdown/components/ChosenIcon.js +46 -0
  9. package/dist/FxAsyncDropdown/components/DeleteButton.d.ts +5 -0
  10. package/dist/FxAsyncDropdown/components/DeleteButton.js +39 -0
  11. package/dist/FxAsyncDropdown/components/LogoOption.d.ts +6 -0
  12. package/dist/FxAsyncDropdown/components/LogoOption.js +95 -0
  13. package/dist/FxAsyncDropdown/components/TextOption.d.ts +6 -0
  14. package/dist/FxAsyncDropdown/components/TextOption.js +68 -0
  15. package/dist/FxAsyncDropdown/components/index.d.ts +6 -0
  16. package/dist/FxAsyncDropdown/components/index.js +36 -0
  17. package/dist/FxAsyncDropdown/helpers/helpers.d.ts +4 -0
  18. package/dist/FxAsyncDropdown/helpers/helpers.js +76 -0
  19. package/dist/FxAsyncDropdown/index.d.ts +1 -1
  20. package/dist/FxAsyncDropdown/index.js +3 -17
  21. package/dist/FxAsyncDropdown/types.d.ts +40 -0
  22. package/dist/FxAsyncDropdown/types.js +4 -0
  23. package/dist/FxAsyncDropdown/useDropdownStore.d.ts +2 -0
  24. package/dist/FxAsyncDropdown/useDropdownStore.js +57 -0
  25. package/dist/FxGeneralModal/FxGeneralModal.d.ts +2 -1
  26. package/dist/FxGeneralModal/FxGeneralModal.js +4 -2
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +0 -9
  29. package/package.json +3 -2
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ChosenIcon", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return ChosenIcon;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _FxIcon = require("../../FxIcon");
14
+ const _helpers = require("../helpers/helpers");
15
+ const _useDropdownStore = /*#__PURE__*/ _interop_require_default(require("./../useDropdownStore"));
16
+ function _interop_require_default(obj) {
17
+ return obj && obj.__esModule ? obj : {
18
+ default: obj
19
+ };
20
+ }
21
+ const ChosenIcon = ({ option, isDisplay })=>{
22
+ const { fetchedProps, displayed } = (0, _useDropdownStore.default)();
23
+ const { title_path, multiple, search_path } = fetchedProps;
24
+ const isChecked = (option)=>{
25
+ const clicked = (0, _helpers.getOption)(option, title_path);
26
+ if (typeof displayed === 'string') {
27
+ return false;
28
+ } else {
29
+ if (multiple) {
30
+ return Array.isArray(displayed) && displayed.map((item)=>{
31
+ return item[title_path];
32
+ }).includes(clicked);
33
+ } else {
34
+ return displayed[search_path] === clicked;
35
+ }
36
+ }
37
+ };
38
+ if (isDisplay && isChecked(option)) {
39
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
40
+ width: 16,
41
+ height: 16,
42
+ icon: 'filters/chosen_icon.svg'
43
+ });
44
+ }
45
+ return null;
46
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const DeleteButton: ({ option, isDisplay }: {
3
+ option: any;
4
+ isDisplay: boolean;
5
+ }) => React.JSX.Element | null;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "DeleteButton", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return DeleteButton;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _material = require("@mui/material");
14
+ const _useDropdownStore = /*#__PURE__*/ _interop_require_default(require("./../useDropdownStore"));
15
+ const _helpers = require("../helpers/helpers");
16
+ function _interop_require_default(obj) {
17
+ return obj && obj.__esModule ? obj : {
18
+ default: obj
19
+ };
20
+ }
21
+ const DeleteButton = ({ option, isDisplay })=>{
22
+ const { fetchedProps, displayed, setDisplayed } = (0, _useDropdownStore.default)();
23
+ const { multiple, search_path, getOption, title_path } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
24
+ const isDisplayButton = isDisplay && (multiple && (displayed === null || displayed === void 0 ? void 0 : displayed.length) > 0 || !multiple && displayed[search_path] === getOption(option, title_path));
25
+ switch(isDisplayButton){
26
+ case true:
27
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
28
+ sx: {
29
+ margin: '0 5px'
30
+ },
31
+ onClick: ()=>{
32
+ (0, _helpers.deleteOneItem)(option, fetchedProps, displayed, setDisplayed);
33
+ },
34
+ children: "x"
35
+ });
36
+ default:
37
+ return null;
38
+ }
39
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const LogoOption: ({ option, curValue, modal }: {
3
+ option: any;
4
+ curValue: any;
5
+ modal: 'displayed' | 'list';
6
+ }) => React.JSX.Element;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "LogoOption", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return LogoOption;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _FxIcon = require("../../FxIcon");
14
+ const _material = require("@mui/material");
15
+ const _styles = require("@mui/styles");
16
+ const _helpers = require("../helpers/helpers");
17
+ const _fixefyhooks = require("@fixefy/fixefy-hooks");
18
+ const _DeleteButton = require("./DeleteButton");
19
+ const _ChosenIcon = require("./ChosenIcon");
20
+ const _useDropdownStore = /*#__PURE__*/ _interop_require_default(require("./../useDropdownStore"));
21
+ function _interop_require_default(obj) {
22
+ return obj && obj.__esModule ? obj : {
23
+ default: obj
24
+ };
25
+ }
26
+ const LogoOption = ({ option, curValue, modal })=>{
27
+ const theme = (0, _styles.useTheme)();
28
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
29
+ sx: {
30
+ display: 'flex',
31
+ justifyContent: 'space-between',
32
+ width: '100%',
33
+ gap: 1,
34
+ color: 'grey',
35
+ cursor: 'pointer'
36
+ },
37
+ children: [
38
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
39
+ sx: {
40
+ width: '100%',
41
+ display: 'flex',
42
+ justifyContent: 'flex-start',
43
+ gap: 1,
44
+ alignItems: 'center'
45
+ },
46
+ children: [
47
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(Logo, {
48
+ option: option
49
+ }),
50
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
51
+ sx: {
52
+ display: 'flex',
53
+ justifyContent: 'space-between',
54
+ width: '100%'
55
+ },
56
+ children: [
57
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
58
+ variant: "subtitle2",
59
+ color: theme.palette.typography.title,
60
+ children: (0, _helpers.titleCase)(curValue)
61
+ }),
62
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_DeleteButton.DeleteButton, {
63
+ option: option,
64
+ isDisplay: modal == 'displayed'
65
+ })
66
+ ]
67
+ })
68
+ ]
69
+ }),
70
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChosenIcon.ChosenIcon, {
71
+ option: option,
72
+ isDisplay: modal == 'list'
73
+ })
74
+ ]
75
+ }, option._id);
76
+ };
77
+ const Logo = ({ option })=>{
78
+ const getRandomColor = (0, _fixefyhooks.useRandomColor)();
79
+ const { fetchedProps } = (0, _useDropdownStore.default)();
80
+ const { logo_folder_name, logo_placeholder, name } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
81
+ var _option_name;
82
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
83
+ style: {
84
+ width: '70px'
85
+ },
86
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
87
+ 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'}`,
88
+ width: 70,
89
+ height: 16,
90
+ variant: "rounded",
91
+ fontSize: 17,
92
+ background: getRandomColor()
93
+ })
94
+ });
95
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const TextOption: ({ option, curValue, modal }: {
3
+ option: any;
4
+ curValue: any;
5
+ modal: 'displayed' | 'list';
6
+ }) => React.JSX.Element;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "TextOption", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return TextOption;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
13
+ const _material = require("@mui/material");
14
+ const _styles = require("@mui/styles");
15
+ const _helpers = require("../helpers/helpers");
16
+ const _DeleteButton = require("./DeleteButton");
17
+ const _ChosenIcon = require("./ChosenIcon");
18
+ function _interop_require_default(obj) {
19
+ return obj && obj.__esModule ? obj : {
20
+ default: obj
21
+ };
22
+ }
23
+ const TextOption = ({ option, curValue, modal })=>{
24
+ const theme = (0, _styles.useTheme)();
25
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
26
+ sx: {
27
+ display: 'flex',
28
+ justifyContent: 'space-between',
29
+ width: '100%',
30
+ gap: 1,
31
+ color: 'grey',
32
+ cursor: 'pointer'
33
+ },
34
+ children: [
35
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
36
+ sx: {
37
+ width: '100%',
38
+ display: 'flex',
39
+ justifyContent: 'flex-start',
40
+ gap: 1,
41
+ alignItems: 'center'
42
+ },
43
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
44
+ sx: {
45
+ display: 'flex',
46
+ justifyContent: 'space-between',
47
+ width: '100%'
48
+ },
49
+ children: [
50
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
51
+ variant: "subtitle2",
52
+ color: theme.palette.typography.title,
53
+ children: (0, _helpers.titleCase)(curValue)
54
+ }),
55
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_DeleteButton.DeleteButton, {
56
+ option: option,
57
+ isDisplay: modal == 'displayed'
58
+ })
59
+ ]
60
+ })
61
+ }),
62
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChosenIcon.ChosenIcon, {
63
+ option: option,
64
+ isDisplay: modal == 'list'
65
+ })
66
+ ]
67
+ }, option._id);
68
+ };
@@ -0,0 +1,6 @@
1
+ export { CheckboxIcon } from './CheckboxIcon';
2
+ export { ChipOption } from './ChipOption';
3
+ export { ChosenIcon } from './ChosenIcon';
4
+ export { DeleteButton } from './DeleteButton';
5
+ export { LogoOption } from './LogoOption';
6
+ export { TextOption } from './TextOption';
@@ -0,0 +1,36 @@
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
+ CheckboxIcon: function() {
13
+ return _CheckboxIcon.CheckboxIcon;
14
+ },
15
+ ChipOption: function() {
16
+ return _ChipOption.ChipOption;
17
+ },
18
+ ChosenIcon: function() {
19
+ return _ChosenIcon.ChosenIcon;
20
+ },
21
+ DeleteButton: function() {
22
+ return _DeleteButton.DeleteButton;
23
+ },
24
+ LogoOption: function() {
25
+ return _LogoOption.LogoOption;
26
+ },
27
+ TextOption: function() {
28
+ return _TextOption.TextOption;
29
+ }
30
+ });
31
+ const _CheckboxIcon = require("./CheckboxIcon");
32
+ const _ChipOption = require("./ChipOption");
33
+ const _ChosenIcon = require("./ChosenIcon");
34
+ const _DeleteButton = require("./DeleteButton");
35
+ const _LogoOption = require("./LogoOption");
36
+ const _TextOption = require("./TextOption");
@@ -6,3 +6,7 @@ export declare const titleCase: (str?: string) => string;
6
6
  export declare const toPascalCase: (string: string, title?: boolean) => string;
7
7
  export declare const useRandomColor: (theme: any) => () => unknown;
8
8
  export declare const getOption: (option: any, title_path: string) => any;
9
+ export declare const removeOneFromStoredDisplayed: (option: any, fetchedProps: any) => void;
10
+ export declare const deleteOneItem: (item: any, fetchedProps: any, displayed: any, setDisplayed: any) => void;
11
+ export declare const addToStoredDisplayed: (option: any, fetchedProps: any) => void;
12
+ export declare const isChecked: (option: any, displayed: any, fetchedProps: any) => any;
@@ -9,6 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ addToStoredDisplayed: function() {
13
+ return addToStoredDisplayed;
14
+ },
15
+ deleteOneItem: function() {
16
+ return deleteOneItem;
17
+ },
12
18
  getJPart: function() {
13
19
  return getJPart;
14
20
  },
@@ -18,12 +24,18 @@ _export(exports, {
18
24
  isArrayValid: function() {
19
25
  return isArrayValid;
20
26
  },
27
+ isChecked: function() {
28
+ return isChecked;
29
+ },
21
30
  isObjectValid: function() {
22
31
  return isObjectValid;
23
32
  },
24
33
  isStringValid: function() {
25
34
  return isStringValid;
26
35
  },
36
+ removeOneFromStoredDisplayed: function() {
37
+ return removeOneFromStoredDisplayed;
38
+ },
27
39
  titleCase: function() {
28
40
  return titleCase;
29
41
  },
@@ -155,3 +167,67 @@ const getOption = (option, title_path)=>{
155
167
  }
156
168
  return null;
157
169
  };
170
+ const removeOneFromStoredDisplayed = (option, fetchedProps)=>{
171
+ const { multiple, title_path, name, _id, query } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
172
+ let storedDisplayed = sessionStorage.getItem(`dropdown-${query}-${name}-${_id}`);
173
+ if (storedDisplayed) {
174
+ storedDisplayed = JSON.parse(storedDisplayed);
175
+ if (multiple) {
176
+ const newDisplayed = storedDisplayed[name].filter((opt)=>opt[title_path] !== option[title_path]);
177
+ storedDisplayed[name] = newDisplayed;
178
+ } else {
179
+ delete storedDisplayed[name];
180
+ }
181
+ sessionStorage.setItem(`dropdown-${query}-${name}-${_id}`, JSON.stringify(storedDisplayed));
182
+ }
183
+ };
184
+ const deleteOneItem = (item, fetchedProps, displayed, setDisplayed)=>{
185
+ const { multiple, title_path, onRemoveOne } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
186
+ if (multiple) {
187
+ const newDisplayed = displayed.filter((opt)=>opt[title_path] !== item[title_path]);
188
+ setDisplayed(newDisplayed);
189
+ } else {
190
+ setDisplayed('');
191
+ }
192
+ if (onRemoveOne) {
193
+ onRemoveOne(item);
194
+ }
195
+ removeOneFromStoredDisplayed(item, fetchedProps);
196
+ };
197
+ const addToStoredDisplayed = (option, fetchedProps)=>{
198
+ const { name, multiple, query, _id } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
199
+ const prevStored = sessionStorage.getItem(`dropdown-${query}-${name}-${_id}`);
200
+ const data = prevStored ? JSON.parse(prevStored) : {};
201
+ if (data[name]) {
202
+ if (multiple) {
203
+ data[name] = [
204
+ ...data[name],
205
+ option
206
+ ];
207
+ } else {
208
+ data[name] = [
209
+ option
210
+ ];
211
+ }
212
+ } else {
213
+ data[name] = [
214
+ option
215
+ ];
216
+ }
217
+ sessionStorage.setItem(`dropdown-${query}-${name}-${_id}`, JSON.stringify(data));
218
+ };
219
+ const isChecked = (option, displayed, fetchedProps)=>{
220
+ const { multiple, title_path, search_path } = fetchedProps !== null && fetchedProps !== void 0 ? fetchedProps : {};
221
+ const clicked = getOption(option, title_path);
222
+ if (typeof displayed === 'string') {
223
+ return false;
224
+ } else {
225
+ if (multiple) {
226
+ return displayed.map((item)=>{
227
+ return item[title_path];
228
+ }).includes(clicked);
229
+ } else {
230
+ return displayed[search_path] === clicked;
231
+ }
232
+ }
233
+ };
@@ -1 +1 @@
1
- export { FxAsyncDropdown, Option, StylesOptions, AsyncDropdownPropsType } from './FxAsyncDropdown';
1
+ export { FxAsyncDropdown } from './FxAsyncDropdown';
@@ -2,24 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
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
- AsyncDropdownPropsType: function() {
13
- return _FxAsyncDropdown.AsyncDropdownPropsType;
14
- },
15
- FxAsyncDropdown: function() {
5
+ Object.defineProperty(exports, "FxAsyncDropdown", {
6
+ enumerable: true,
7
+ get: function() {
16
8
  return _FxAsyncDropdown.FxAsyncDropdown;
17
- },
18
- Option: function() {
19
- return _FxAsyncDropdown.Option;
20
- },
21
- StylesOptions: function() {
22
- return _FxAsyncDropdown.StylesOptions;
23
9
  }
24
10
  });
25
11
  const _FxAsyncDropdown = require("./FxAsyncDropdown");
@@ -0,0 +1,40 @@
1
+ export interface Option {
2
+ title: string;
3
+ value: string | number | boolean;
4
+ [key: string]: any;
5
+ }
6
+ export interface StylesOptions {
7
+ width?: string | number;
8
+ maxWidth?: string | number;
9
+ inputSx?: object;
10
+ menuSx?: object;
11
+ }
12
+ export type AsyncDropdownPropsType = {
13
+ initialValue?: Option | any;
14
+ styles?: StylesOptions;
15
+ method_name: string;
16
+ multiple?: boolean;
17
+ name: any;
18
+ variables: any;
19
+ onAdd?: (value: any) => void;
20
+ onRemoveOne?: (value: any) => void;
21
+ onRemoveAll?: () => void;
22
+ onUnselectAll?: () => void;
23
+ type?: 'checkbox' | 'text';
24
+ renderOptions?: (option: Option, index: number) => void;
25
+ [x: string]: any;
26
+ modal_type?: string;
27
+ query: string;
28
+ isInitialOpen?: boolean;
29
+ placeholder?: string;
30
+ rootStylesOverride?: any;
31
+ options_path?: string;
32
+ defaultValue?: any;
33
+ fetcher?: any;
34
+ disabled?: boolean;
35
+ search_path?: any;
36
+ title_path: string;
37
+ _id: any;
38
+ logo_folder_name?: string;
39
+ logo_placeholder?: string;
40
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,2 @@
1
+ declare const useDropdownStore: import("zustand").UseBoundStore<import("zustand").StoreApi<unknown>>;
2
+ export default useDropdownStore;
@@ -0,0 +1,57 @@
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 _zustand = require("zustand");
12
+ const useDropdownStore = (0, _zustand.create)((set)=>({
13
+ fetchedProps: {},
14
+ setFetchedProps: (val)=>set({
15
+ fetchedProps: val
16
+ }),
17
+ displayed: null,
18
+ setDisplayed: (val)=>set({
19
+ displayed: val
20
+ }),
21
+ options: [],
22
+ setOptions: (val)=>set({
23
+ options: val
24
+ }),
25
+ reason: 'init',
26
+ setReason: (val)=>set({
27
+ reason: val
28
+ }),
29
+ isLastPage: false,
30
+ setIsLastPage: (val)=>set({
31
+ isLastPage: val
32
+ }),
33
+ isOpen: false,
34
+ setIsOpen: (val)=>set({
35
+ isOpen: val
36
+ }),
37
+ searchValue: null,
38
+ setSearchValue: (val)=>set({
39
+ searchValue: val
40
+ }),
41
+ page: 1,
42
+ setPage: (val)=>set({
43
+ page: val
44
+ }),
45
+ prevPage: 0,
46
+ setPrevPage: (val)=>set({
47
+ prevPage: val
48
+ }),
49
+ pageSize: 20,
50
+ loadMore: (page, prevPage)=>{
51
+ set({
52
+ page: page + 1,
53
+ prevPage: prevPage + 1
54
+ });
55
+ }
56
+ }));
57
+ const _default = useDropdownStore;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- export declare const FxGeneralModal: ({ buttonComponent, modalComponent, onClick, }: {
2
+ export declare const FxGeneralModal: ({ buttonComponent, modalComponent, onClick, closeOnButtonChange }: {
3
3
  buttonComponent: any;
4
4
  modalComponent: any;
5
5
  onClick?: any;
6
+ closeOnButtonChange?: boolean;
6
7
  }) => React.JSX.Element;
@@ -52,7 +52,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
52
52
  }
53
53
  return newObj;
54
54
  }
55
- const FxGeneralModal = ({ buttonComponent, modalComponent, onClick })=>{
55
+ const FxGeneralModal = ({ buttonComponent, modalComponent, onClick, closeOnButtonChange = true })=>{
56
56
  const [isOpen, setIsOpen] = (0, _react.useState)(false);
57
57
  const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
58
58
  const handleClick = (e)=>{
@@ -72,7 +72,9 @@ const FxGeneralModal = ({ buttonComponent, modalComponent, onClick })=>{
72
72
  setAnchorEl(null);
73
73
  };
74
74
  (0, _react.useEffect)(()=>{
75
- setIsOpen(false);
75
+ if (closeOnButtonChange) {
76
+ setIsOpen(false);
77
+ }
76
78
  }, [
77
79
  buttonComponent
78
80
  ]);
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { FxActionsTray } from './FxActionsTray';
2
2
  export { FxAggregationsBar, AggregationsDataPropsType, AggreationsBarPropsType } from './FxAggregationsBar';
3
- export { FxAsyncDropdown, Option, StylesOptions, AsyncDropdownPropsType } from './FxAsyncDropdown';
3
+ export { FxAsyncDropdown } from './FxAsyncDropdown';
4
4
  export { FxAvatar, AvatarPropsType, BackgroundColorsType } from './FxAvatar';
5
5
  export { FxButton, ButtonPropsType } from './FxButton';
6
6
  export { FxChip, ChipPropsType } from './FxChip';
package/dist/index.js CHANGED
@@ -18,9 +18,6 @@ _export(exports, {
18
18
  Arrow: function() {
19
19
  return _FxPopper.Arrow;
20
20
  },
21
- AsyncDropdownPropsType: function() {
22
- return _FxAsyncDropdown.AsyncDropdownPropsType;
23
- },
24
21
  AvatarPropsType: function() {
25
22
  return _FxAvatar.AvatarPropsType;
26
23
  },
@@ -159,9 +156,6 @@ _export(exports, {
159
156
  NumberfieldPropsType: function() {
160
157
  return _FxNumberField.NumberfieldPropsType;
161
158
  },
162
- Option: function() {
163
- return _FxAsyncDropdown.Option;
164
- },
165
159
  Options: function() {
166
160
  return _FxStatusBar.Options;
167
161
  },
@@ -213,9 +207,6 @@ _export(exports, {
213
207
  StepsLauncher: function() {
214
208
  return _FxWizard.StepsLauncher;
215
209
  },
216
- StylesOptions: function() {
217
- return _FxAsyncDropdown.StylesOptions;
218
- },
219
210
  TagPropsType: function() {
220
211
  return _FxTag.TagPropsType;
221
212
  },
package/package.json CHANGED
@@ -19,7 +19,8 @@
19
19
  "react": "18.3.1",
20
20
  "react-dom": "18.3.1",
21
21
  "react-use-wizard": "2.3.0",
22
- "tss-react": "^4.9.14"
22
+ "tss-react": "^4.9.14",
23
+ "zustand": "^5.0.3"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@svgr/webpack": "8.1.0",
@@ -69,5 +70,5 @@
69
70
  "require": "./dist/index.js"
70
71
  }
71
72
  },
72
- "version": "0.3.50"
73
+ "version": "0.3.52"
73
74
  }