@fixefy/fixefy-ui-components 0.0.41 → 0.0.42

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 (89) hide show
  1. package/build/FxActionsTray/FxActionsTray.js +351 -0
  2. package/build/FxActionsTray/actions_tray_types.d.js +4 -0
  3. package/build/FxActionsTray/index.js +11 -0
  4. package/build/FxActionsTray/styles/actions_tray.styles.js +160 -0
  5. package/build/FxAggregationsBar/FxAggregations.js +41 -0
  6. package/build/FxAggregationsBar/aggregations_types.d.js +4 -0
  7. package/build/FxAggregationsBar/helpers/structureReader.js +78 -0
  8. package/build/FxAggregationsBar/index.js +11 -0
  9. package/build/FxAggregationsBar/operations/query.js +73 -0
  10. package/build/FxAsyncDropdown/FxAsyncDropdown.js +456 -0
  11. package/build/FxAsyncDropdown/async_dropdown_types.d.js +4 -0
  12. package/build/FxAsyncDropdown/helpers/helpers.js +151 -0
  13. package/build/FxAsyncDropdown/index.js +11 -0
  14. package/build/FxAsyncDropdown/styles/dropdown.styles.js +230 -0
  15. package/build/FxAvatar/FxAvatar.js +145 -0
  16. package/build/FxAvatar/avatar_types.d.js +4 -0
  17. package/build/FxAvatar/helpers/stringToColor.js +23 -0
  18. package/build/FxAvatar/index.js +11 -0
  19. package/build/FxAvatar/styles/avatar.styles.js +193 -0
  20. package/build/FxButton/FxButton.js +106 -0
  21. package/build/FxButton/index.js +11 -0
  22. package/build/FxButton/styles/button.styles.js +24 -0
  23. package/build/FxChip/FxChip.js +37 -0
  24. package/build/FxChip/chip_types.d.js +4 -0
  25. package/build/FxChip/index.js +11 -0
  26. package/build/FxChip/styles/chip.styles.js +62 -0
  27. package/build/FxIcon/FxIcon.js +147 -0
  28. package/build/FxIcon/content/dynamic_icon.js +20 -0
  29. package/build/FxIcon/content/index.js +20 -0
  30. package/build/FxIcon/content/lazy_icon.js +137 -0
  31. package/build/FxIcon/icon_types.d.js +4 -0
  32. package/build/FxIcon/index.js +20 -0
  33. package/build/FxModal/FxModal.js +171 -0
  34. package/build/FxModal/index.js +11 -0
  35. package/build/FxModal/modal_types.d.js +4 -0
  36. package/build/FxModal/styles/modal.style.js +59 -0
  37. package/build/FxNotes/FxNotes.js +216 -0
  38. package/build/FxNotes/helpers/stringToColor.js +26 -0
  39. package/build/FxNotes/index.js +11 -0
  40. package/build/FxNotes/note_types.d.js +4 -0
  41. package/build/FxNotes/operations/queries.js +35 -0
  42. package/build/FxNotes/styles/notes.styles.js +169 -0
  43. package/build/FxNumberField/FxNumberField.js +109 -0
  44. package/build/FxNumberField/index.js +11 -0
  45. package/build/FxNumberField/number_field_types.d.js +4 -0
  46. package/build/FxNumberField/styles/number_field.styles.js +94 -0
  47. package/build/FxProgressCircle/FxProgressCircle.js +65 -0
  48. package/build/FxProgressCircle/index.js +11 -0
  49. package/build/FxProgressCircle/progress_circle_types.d.js +4 -0
  50. package/build/FxProgressCircle/styles/progress_circle.styles.js +106 -0
  51. package/build/FxProgressCounter/ProgressCounter.js +168 -0
  52. package/build/FxProgressCounter/index.js +11 -0
  53. package/build/FxProgressCounter/progress_counter_types.d.js +4 -0
  54. package/build/FxProgressCounter/styles/progress_counter.styles.js +61 -0
  55. package/build/FxScore/FxScore.js +207 -0
  56. package/build/FxScore/index.js +11 -0
  57. package/build/FxScore/score_types.d.js +4 -0
  58. package/build/FxScore/styles/score.styles.js +96 -0
  59. package/build/FxShowMore/FxShowMore.js +80 -0
  60. package/build/FxShowMore/index.js +11 -0
  61. package/build/FxShowMore/show_more_types.d.js +4 -0
  62. package/build/FxShowMore/styles/show_more.styles.js +134 -0
  63. package/build/FxSlider/FxSlider.js +49 -0
  64. package/build/FxSlider/index.js +11 -0
  65. package/build/FxSlider/slider_types.d.js +4 -0
  66. package/build/FxStatisticsBar/FxStatisticsBar.js +191 -0
  67. package/build/FxStatisticsBar/index.js +11 -0
  68. package/build/FxStatisticsBar/statistics_bar_types.d.js +4 -0
  69. package/build/FxStatisticsBar/styles/statistics.styles.js +98 -0
  70. package/build/FxStatusBar/FxStatusBar.js +143 -0
  71. package/build/FxStatusBar/helpers/constants.js +22 -0
  72. package/build/FxStatusBar/index.js +20 -0
  73. package/build/FxStatusBar/status_bar_types.d.js +4 -0
  74. package/build/FxStatusBar/styles/statusBar.styles.js +131 -0
  75. package/build/FxStyledComponents/index.js +311 -0
  76. package/build/FxTextField/FxTextField.js +208 -0
  77. package/build/FxTextField/index.js +11 -0
  78. package/build/FxTextField/text_field_types.d.js +4 -0
  79. package/build/FxTodo/FxTodo.js +95 -0
  80. package/build/FxTodo/index.js +23 -0
  81. package/build/FxTodo/styles/todo.styles.js +183 -0
  82. package/build/FxTodo/todo_types.d.js +4 -0
  83. package/build/FxWizard/FxWizard.js +179 -0
  84. package/build/FxWizard/WizardContext.js +207 -0
  85. package/build/FxWizard/index.js +23 -0
  86. package/build/FxWizard/styles/wizard.styles.js +89 -0
  87. package/build/FxWizard/wizard_types.d.js +4 -0
  88. package/build/index.js +182 -0
  89. package/package.json +2 -2
@@ -0,0 +1,168 @@
1
+ // @ts-nocheck
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "FxProgressCounter", {
7
+ enumerable: true,
8
+ get: function() {
9
+ return FxProgressCounter;
10
+ }
11
+ });
12
+ const _jsxruntime = require("react/jsx-runtime");
13
+ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
14
+ const _material = require("@mui/material");
15
+ const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
16
+ const _progress_counterstyles = require("./styles/progress_counter.styles");
17
+ const _image = /*#__PURE__*/ _interop_require_default(require("next/image"));
18
+ function _define_property(obj, key, value) {
19
+ if (key in obj) {
20
+ Object.defineProperty(obj, key, {
21
+ value: value,
22
+ enumerable: true,
23
+ configurable: true,
24
+ writable: true
25
+ });
26
+ } else {
27
+ obj[key] = value;
28
+ }
29
+ return obj;
30
+ }
31
+ function _interop_require_default(obj) {
32
+ return obj && obj.__esModule ? obj : {
33
+ default: obj
34
+ };
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 _object_without_properties(source, excluded) {
52
+ if (source == null) return {};
53
+ var target = _object_without_properties_loose(source, excluded);
54
+ var key, i;
55
+ if (Object.getOwnPropertySymbols) {
56
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
57
+ for(i = 0; i < sourceSymbolKeys.length; i++){
58
+ key = sourceSymbolKeys[i];
59
+ if (excluded.indexOf(key) >= 0) continue;
60
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
61
+ target[key] = source[key];
62
+ }
63
+ }
64
+ return target;
65
+ }
66
+ function _object_without_properties_loose(source, excluded) {
67
+ if (source == null) return {};
68
+ var target = {};
69
+ var sourceKeys = Object.keys(source);
70
+ var key, i;
71
+ for(i = 0; i < sourceKeys.length; i++){
72
+ key = sourceKeys[i];
73
+ if (excluded.indexOf(key) >= 0) continue;
74
+ target[key] = source[key];
75
+ }
76
+ return target;
77
+ }
78
+ function FxProgressCounter(_param) {
79
+ var { values, structure, filter } = _param, rest = _object_without_properties(_param, [
80
+ "values",
81
+ "structure",
82
+ "filter"
83
+ ]);
84
+ var _values_count, _values_current;
85
+ // const { extended, title } = structure ?? {};
86
+ // const {
87
+ // gql_operation,
88
+ // object_path: objectPath,
89
+ // title_path: titlePath,
90
+ // filter: structureFilter,
91
+ // } = extended ?? {};
92
+ const initialValues = {
93
+ count: (_values_count = values === null || values === void 0 ? void 0 : values.count) !== null && _values_count !== void 0 ? _values_count : 0,
94
+ current: (_values_current = values === null || values === void 0 ? void 0 : values.current) !== null && _values_current !== void 0 ? _values_current : 0
95
+ };
96
+ // let _filter = structureFilter;
97
+ // if (filter) {
98
+ // _filter = {
99
+ // ..._filter,
100
+ // ...filter,
101
+ // };
102
+ // }
103
+ // const { data, error, loading } = useQuery(gql(gql_operation), {
104
+ // variables: {
105
+ // where: { ..._filter },
106
+ // },
107
+ // });
108
+ const normalizeNumber = (number)=>{
109
+ return number / initialValues.count * 100;
110
+ };
111
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_counterstyles.Container, {
112
+ children: [
113
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
114
+ position: 'relative',
115
+ textAlign: 'center',
116
+ justifyContent: 'center',
117
+ mt: 1.2,
118
+ children: [
119
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_image.default, {
120
+ alt: 'approve',
121
+ width: 16,
122
+ height: 16,
123
+ loader: ()=>(0, _fixefyuiutils.imageLoader)({
124
+ root: 'https://cdn-dev.fixefy.me/',
125
+ src: 'invoices/approve-small-white.svg'
126
+ }),
127
+ src: 'invoices/approve-small-white.svg',
128
+ onLoad: ()=>console.log('loaded'),
129
+ onError: (e)=>console.log('error:', e)
130
+ }),
131
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
132
+ mt: 0.5,
133
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Typography, {
134
+ fontSize: 19,
135
+ fontWeight: 600,
136
+ children: [
137
+ initialValues.current,
138
+ "/",
139
+ initialValues.count
140
+ ]
141
+ })
142
+ }),
143
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
144
+ fontSize: 11,
145
+ sx: {
146
+ opacity: 0.6
147
+ },
148
+ children: "Charges"
149
+ })
150
+ ]
151
+ }),
152
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_progress_counterstyles.ProgressContainer, {
153
+ children: [
154
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_counterstyles.MainBar, _object_spread({
155
+ variant: "determinate",
156
+ value: normalizeNumber(initialValues.current),
157
+ color: 'inherit'
158
+ }, rest)),
159
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_progress_counterstyles.BackgroundBar, _object_spread({
160
+ variant: "determinate",
161
+ value: initialValues.count > 100 ? 100 : initialValues.count,
162
+ color: 'inherit'
163
+ }, rest))
164
+ ]
165
+ })
166
+ ]
167
+ });
168
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxProgressCounter", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _ProgressCounter.FxProgressCounter;
9
+ }
10
+ });
11
+ const _ProgressCounter = require("./ProgressCounter");
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,61 @@
1
+ // @ts-nocheck
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ BackgroundBar: function() {
14
+ return BackgroundBar;
15
+ },
16
+ BaseProgress: function() {
17
+ return BaseProgress;
18
+ },
19
+ Container: function() {
20
+ return Container;
21
+ },
22
+ MainBar: function() {
23
+ return MainBar;
24
+ },
25
+ ProgressContainer: function() {
26
+ return ProgressContainer;
27
+ }
28
+ });
29
+ const _styles = require("@mui/material/styles");
30
+ const _material = require("@mui/material");
31
+ const BaseProgress = (0, _styles.styled)(_material.LinearProgress)(({ theme })=>({
32
+ borderRadius: '8px',
33
+ width: '70%',
34
+ position: 'absolute',
35
+ zIndex: 2,
36
+ height: 3
37
+ }));
38
+ const MainBar = (0, _styles.styled)(BaseProgress)(({ theme })=>({
39
+ opacity: 1
40
+ }));
41
+ const BackgroundBar = (0, _styles.styled)(BaseProgress)(({ theme })=>({
42
+ opacity: 0.2
43
+ }));
44
+ const ProgressContainer = (0, _styles.styled)(_material.Box)(({ theme })=>({
45
+ alignItems: 'center',
46
+ display: 'flex',
47
+ width: '100%',
48
+ margin: '8px 0',
49
+ position: 'relative',
50
+ justifyContent: 'center'
51
+ }));
52
+ const Container = (0, _styles.styled)(_material.Box)(({ theme })=>({
53
+ width: 104,
54
+ height: 104,
55
+ minWidth: 104,
56
+ maxWidth: 104,
57
+ borderRadius: 8,
58
+ position: 'relative',
59
+ color: theme.palette.common.white,
60
+ backgroundColor: theme.palette.score.excellent
61
+ }));
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxScore", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxScore;
9
+ }
10
+ });
11
+ const _jsxruntime = require("react/jsx-runtime");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
13
+ const _graphqltag = require("graphql-tag");
14
+ const _client = require("@apollo/client");
15
+ const _scorestyles = require("./styles/score.styles");
16
+ const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
17
+ const _material = require("@mui/material");
18
+ function _define_property(obj, key, value) {
19
+ if (key in obj) {
20
+ Object.defineProperty(obj, key, {
21
+ value: value,
22
+ enumerable: true,
23
+ configurable: true,
24
+ writable: true
25
+ });
26
+ } else {
27
+ obj[key] = value;
28
+ }
29
+ return obj;
30
+ }
31
+ function _getRequireWildcardCache(nodeInterop) {
32
+ if (typeof WeakMap !== "function") return null;
33
+ var cacheBabelInterop = new WeakMap();
34
+ var cacheNodeInterop = new WeakMap();
35
+ return (_getRequireWildcardCache = function(nodeInterop) {
36
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
37
+ })(nodeInterop);
38
+ }
39
+ function _interop_require_wildcard(obj, nodeInterop) {
40
+ if (!nodeInterop && obj && obj.__esModule) {
41
+ return obj;
42
+ }
43
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
44
+ return {
45
+ default: obj
46
+ };
47
+ }
48
+ var cache = _getRequireWildcardCache(nodeInterop);
49
+ if (cache && cache.has(obj)) {
50
+ return cache.get(obj);
51
+ }
52
+ var newObj = {
53
+ __proto__: null
54
+ };
55
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
56
+ for(var key in obj){
57
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
58
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
59
+ if (desc && (desc.get || desc.set)) {
60
+ Object.defineProperty(newObj, key, desc);
61
+ } else {
62
+ newObj[key] = obj[key];
63
+ }
64
+ }
65
+ }
66
+ newObj.default = obj;
67
+ if (cache) {
68
+ cache.set(obj, newObj);
69
+ }
70
+ return newObj;
71
+ }
72
+ function _object_spread(target) {
73
+ for(var i = 1; i < arguments.length; i++){
74
+ var source = arguments[i] != null ? arguments[i] : {};
75
+ var ownKeys = Object.keys(source);
76
+ if (typeof Object.getOwnPropertySymbols === "function") {
77
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
78
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
79
+ }));
80
+ }
81
+ ownKeys.forEach(function(key) {
82
+ _define_property(target, key, source[key]);
83
+ });
84
+ }
85
+ return target;
86
+ }
87
+ function _object_without_properties(source, excluded) {
88
+ if (source == null) return {};
89
+ var target = _object_without_properties_loose(source, excluded);
90
+ var key, i;
91
+ if (Object.getOwnPropertySymbols) {
92
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
93
+ for(i = 0; i < sourceSymbolKeys.length; i++){
94
+ key = sourceSymbolKeys[i];
95
+ if (excluded.indexOf(key) >= 0) continue;
96
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
97
+ target[key] = source[key];
98
+ }
99
+ }
100
+ return target;
101
+ }
102
+ function _object_without_properties_loose(source, excluded) {
103
+ if (source == null) return {};
104
+ var target = {};
105
+ var sourceKeys = Object.keys(source);
106
+ var key, i;
107
+ for(i = 0; i < sourceKeys.length; i++){
108
+ key = sourceKeys[i];
109
+ if (excluded.indexOf(key) >= 0) continue;
110
+ target[key] = source[key];
111
+ }
112
+ return target;
113
+ }
114
+ const FxScore = (_param)=>{
115
+ var { value, structure, filter, variant = 'box', hasLabel = true, title: propsTitle = 'score', Sizes: propsSizes = {} } = _param, rest = _object_without_properties(_param, [
116
+ "value",
117
+ "structure",
118
+ "filter",
119
+ "variant",
120
+ "hasLabel",
121
+ "title",
122
+ "Sizes"
123
+ ]);
124
+ const Sizes = _object_spread({
125
+ box: {
126
+ boxWidth: 104,
127
+ progressWidth: 68
128
+ },
129
+ circle: {
130
+ boxWidth: 40,
131
+ progressWidth: 36
132
+ }
133
+ }, propsSizes);
134
+ const { extended, title } = structure || {};
135
+ const { gql_operation, object_path: objectPath, filter: structureFilter } = extended || {};
136
+ const gqlOperation = gql_operation !== null && gql_operation !== void 0 ? gql_operation : 'query GET_SCORE($where: Json) { score: chargesAvg( where: $where data: { fields: ["score"], fragment: "{ score }" } ) }';
137
+ let _filter = structureFilter;
138
+ if (filter) {
139
+ _filter = _object_spread({}, _filter, filter);
140
+ }
141
+ const [fetchData, { data, loading }] = (0, _client.useLazyQuery)((0, _graphqltag.gql)(gqlOperation));
142
+ (0, _react.useEffect)(()=>{
143
+ if (!value && structure) {
144
+ fetchData({
145
+ variables: {
146
+ where: _object_spread({}, _filter)
147
+ }
148
+ });
149
+ }
150
+ }, []);
151
+ const ScoreValue = data ? data[objectPath] * 100 : value;
152
+ const _classes = (0, _scorestyles.useStyles)({
153
+ scoreColor: (0, _fixefyuiutils.getScoreColor)(ScoreValue || 0),
154
+ variant
155
+ });
156
+ var _Math_round;
157
+ return loading ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
158
+ className: _classes.container,
159
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Skeleton, {
160
+ animation: "wave",
161
+ variant: "circular",
162
+ width: 68,
163
+ height: 68
164
+ })
165
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
166
+ className: _classes.container,
167
+ sx: {
168
+ width: Sizes[variant].boxWidth,
169
+ height: Sizes[variant].boxWidth,
170
+ minWidth: Sizes[variant].boxWidth,
171
+ maxWidth: Sizes[variant].boxWidth,
172
+ borderRadius: variant === 'box' ? '8px' : '50%'
173
+ },
174
+ children: [
175
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, _object_spread({
176
+ size: Sizes[variant].progressWidth,
177
+ variant: "determinate",
178
+ value: ScoreValue,
179
+ color: "inherit",
180
+ thickness: 2,
181
+ className: _classes.mainCircle
182
+ }, rest)),
183
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.CircularProgress, _object_spread({
184
+ size: Sizes[variant].progressWidth,
185
+ variant: "determinate",
186
+ value: 100,
187
+ color: "inherit",
188
+ thickness: 2,
189
+ className: _classes.backgroundCircle
190
+ }, rest)),
191
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
192
+ className: _classes.content,
193
+ children: [
194
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
195
+ variant: variant === 'box' ? 'h5' : 'table',
196
+ className: _classes.scoreNumber,
197
+ children: `${(_Math_round = Math.round(Number(ScoreValue))) !== null && _Math_round !== void 0 ? _Math_round : 0}%`
198
+ }),
199
+ hasLabel && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
200
+ className: _classes.scoreText,
201
+ children: (0, _fixefyuiutils.titleCase)(title !== null && title !== void 0 ? title : propsTitle)
202
+ })
203
+ ]
204
+ })
205
+ ]
206
+ });
207
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxScore", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _FxScore.FxScore;
9
+ }
10
+ });
11
+ const _FxScore = require("./FxScore");
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useStyles", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useStyles;
9
+ }
10
+ });
11
+ const _styles = require("@mui/styles");
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ function _object_spread(target) {
26
+ for(var i = 1; i < arguments.length; i++){
27
+ var source = arguments[i] != null ? arguments[i] : {};
28
+ var ownKeys = Object.keys(source);
29
+ if (typeof Object.getOwnPropertySymbols === "function") {
30
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
31
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
32
+ }));
33
+ }
34
+ ownKeys.forEach(function(key) {
35
+ _define_property(target, key, source[key]);
36
+ });
37
+ }
38
+ return target;
39
+ }
40
+ function ownKeys(object, enumerableOnly) {
41
+ var keys = Object.keys(object);
42
+ if (Object.getOwnPropertySymbols) {
43
+ var symbols = Object.getOwnPropertySymbols(object);
44
+ if (enumerableOnly) {
45
+ symbols = symbols.filter(function(sym) {
46
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
47
+ });
48
+ }
49
+ keys.push.apply(keys, symbols);
50
+ }
51
+ return keys;
52
+ }
53
+ function _object_spread_props(target, source) {
54
+ source = source != null ? source : {};
55
+ if (Object.getOwnPropertyDescriptors) {
56
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
57
+ } else {
58
+ ownKeys(Object(source)).forEach(function(key) {
59
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
60
+ });
61
+ }
62
+ return target;
63
+ }
64
+ const useStyles = (0, _styles.makeStyles)((theme)=>({
65
+ container: {
66
+ display: 'flex',
67
+ justifyContent: 'center',
68
+ alignItems: 'center',
69
+ position: 'relative',
70
+ color: theme.palette.common.white,
71
+ backgroundColor: (props)=>theme.palette.score[props.scoreColor]
72
+ },
73
+ content: {
74
+ position: 'absolute',
75
+ display: 'flex',
76
+ justifyContent: 'center',
77
+ alignItems: 'center',
78
+ flexDirection: 'column'
79
+ },
80
+ scoreNumber: {
81
+ color: theme.palette.common.white
82
+ },
83
+ scoreText: _object_spread_props(_object_spread({}, theme.typography.table), {
84
+ fontWeight: 400,
85
+ color: theme.palette.common.white,
86
+ opacity: 0.6
87
+ }),
88
+ mainCircle: {
89
+ position: 'absolute',
90
+ zIndex: 2
91
+ },
92
+ backgroundCircle: {
93
+ position: 'absolute',
94
+ opacity: 0.2
95
+ }
96
+ }));
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxShowMore", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FxShowMore;
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 _show_morestyles = require("./styles/show_more.styles");
15
+ const _KeyboardArrowDown = /*#__PURE__*/ _interop_require_default(require("@mui/icons-material/KeyboardArrowDown"));
16
+ function _interop_require_default(obj) {
17
+ return obj && obj.__esModule ? obj : {
18
+ default: obj
19
+ };
20
+ }
21
+ function FxShowMore({ items, label, children, title }) {
22
+ const [anchorEl, setAnchorEl] = _react.default.useState(null);
23
+ const handleClick = (event)=>{
24
+ setAnchorEl(event.currentTarget);
25
+ };
26
+ const handleClose = ()=>{
27
+ setAnchorEl(null);
28
+ };
29
+ const open = Boolean(anchorEl);
30
+ const id = open ? 'simple-popover' : undefined;
31
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.ShowMoreWrapper, {
32
+ children: [
33
+ children,
34
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.ShowMoreBtn, {
35
+ onClick: handleClick,
36
+ children: [
37
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_show_morestyles.ShowMoreIcon, {
38
+ isOpen: open,
39
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_KeyboardArrowDown.default, {})
40
+ }),
41
+ title ? title : 'SHOW MORE'
42
+ ]
43
+ }),
44
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.StyledPopover, {
45
+ id: id,
46
+ open: open,
47
+ anchorEl: anchorEl,
48
+ onClose: handleClose,
49
+ anchorOrigin: {
50
+ vertical: 'bottom',
51
+ horizontal: 'center'
52
+ },
53
+ transformOrigin: {
54
+ vertical: 'top',
55
+ horizontal: 'center'
56
+ },
57
+ children: [
58
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_show_morestyles.StyledLabel, {
59
+ children: [
60
+ label,
61
+ " (",
62
+ items.length,
63
+ ")"
64
+ ]
65
+ }),
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_show_morestyles.StyledDivider, {}),
67
+ items === null || items === void 0 ? void 0 : items.map((item, index)=>/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
68
+ children: [
69
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
70
+ variant: "body1",
71
+ children: item
72
+ }),
73
+ index + 1 !== items.length && /*#__PURE__*/ (0, _jsxruntime.jsx)(_show_morestyles.StyledDivider, {})
74
+ ]
75
+ }, index))
76
+ ]
77
+ })
78
+ ]
79
+ });
80
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "FxShowMore", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _FxShowMore.FxShowMore;
9
+ }
10
+ });
11
+ const _FxShowMore = require("./FxShowMore");
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });