@fixefy/fixefy-ui-components 0.1.943 → 0.1.945
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FxAvatar/helpers/stringToColor.d.ts +1 -1
- package/dist/FxIcon/FxIcon.d.ts +1 -1
- package/dist/FxIcon/content/lazy_icon.d.ts +4 -4
- package/dist/FxNotes/helpers/stringToColor.d.ts +1 -1
- package/dist/FxStyledComponents/index.d.ts +2 -2
- package/dist/src/FxActionsTray/FxActionsTray.js +351 -0
- package/dist/src/FxActionsTray/index.js +19 -0
- package/dist/src/FxActionsTray/styles/actions_tray.styles.js +159 -0
- package/dist/src/FxAggregationsBar/FxAggregations.js +41 -0
- package/dist/src/FxAggregationsBar/helpers/structureReader.js +78 -0
- package/dist/src/FxAggregationsBar/index.js +22 -0
- package/dist/src/FxAggregationsBar/operations/query.js +73 -0
- package/dist/src/FxAsyncDropdown/FxAsyncDropdown.js +628 -0
- package/dist/src/FxAsyncDropdown/helpers/helpers.js +161 -0
- package/dist/src/FxAsyncDropdown/index.js +25 -0
- package/dist/src/FxAsyncDropdown/styles/dropdown.styles.js +228 -0
- package/dist/src/FxAvatar/FxAvatar.js +145 -0
- package/dist/src/FxAvatar/helpers/stringToColor.js +23 -0
- package/dist/src/FxAvatar/index.js +22 -0
- package/dist/src/FxAvatar/styles/avatar.styles.js +192 -0
- package/dist/src/FxButton/FxButton.js +106 -0
- package/dist/src/FxButton/index.js +19 -0
- package/dist/src/FxButton/styles/button.styles.js +23 -0
- package/dist/src/FxChip/FxChip.js +45 -0
- package/dist/src/FxChip/index.js +19 -0
- package/dist/src/FxChip/styles/chip.styles.js +61 -0
- package/dist/src/FxFilterSortButton/FxFilterSortButton.js +82 -0
- package/dist/src/FxFilterSortButton/index.js +11 -0
- package/dist/src/FxIcon/FxIcon.js +107 -0
- package/dist/src/FxIcon/content/dynamic_icon.js +20 -0
- package/dist/src/FxIcon/content/index.js +20 -0
- package/dist/src/FxIcon/content/lazy_icon.js +137 -0
- package/dist/src/FxIcon/index.js +11 -0
- package/dist/src/FxModal/FxModal.js +170 -0
- package/dist/src/FxModal/index.js +19 -0
- package/dist/src/FxModal/styles/modal.style.js +59 -0
- package/dist/src/FxModalWithButton/FxModalWithButton.js +94 -0
- package/dist/src/FxModalWithButton/index.js +11 -0
- package/dist/src/FxNotes/FxNotes.js +216 -0
- package/dist/src/FxNotes/helpers/stringToColor.js +26 -0
- package/dist/src/FxNotes/index.js +22 -0
- package/dist/src/FxNotes/operations/queries.js +35 -0
- package/dist/src/FxNotes/styles/notes.styles.js +168 -0
- package/dist/src/FxNumberField/FxNumberField.js +109 -0
- package/dist/src/FxNumberField/index.js +19 -0
- package/dist/src/FxNumberField/styles/number_field.styles.js +94 -0
- package/dist/src/FxProgressCircle/FxProgressCircle.js +65 -0
- package/dist/src/FxProgressCircle/index.js +19 -0
- package/dist/src/FxProgressCircle/styles/progress_circle.styles.js +106 -0
- package/dist/src/FxProgressCounter/ProgressCounter.js +168 -0
- package/dist/src/FxProgressCounter/index.js +19 -0
- package/dist/src/FxProgressCounter/styles/progress_counter.styles.js +61 -0
- package/dist/src/FxScore/FxScore.js +207 -0
- package/dist/src/FxScore/index.js +19 -0
- package/dist/src/FxScore/styles/score.styles.js +97 -0
- package/dist/src/FxShowMore/FxShowMore.js +80 -0
- package/dist/src/FxShowMore/index.js +19 -0
- package/dist/src/FxShowMore/styles/show_more.styles.js +134 -0
- package/dist/src/FxSlider/FxSlider.js +49 -0
- package/dist/src/FxSlider/index.js +19 -0
- package/dist/src/FxStatisticsBar/FxStatisticsBar.js +191 -0
- package/dist/src/FxStatisticsBar/index.js +19 -0
- package/dist/src/FxStatisticsBar/styles/statistics.styles.js +98 -0
- package/dist/src/FxStatusBar/FxStatusBar.js +143 -0
- package/dist/src/FxStatusBar/helpers/constants.js +22 -0
- package/dist/src/FxStatusBar/index.js +22 -0
- package/dist/src/FxStatusBar/styles/statusBar.styles.js +131 -0
- package/dist/src/FxStyledComponents/index.js +310 -0
- package/dist/src/FxTag/FxTag.js +41 -0
- package/dist/src/FxTag/index.js +19 -0
- package/dist/src/FxTag/styles/tag.styles.js +100 -0
- package/dist/src/FxTextField/FxTextField.js +208 -0
- package/dist/src/FxTextField/index.js +19 -0
- package/dist/src/FxTodo/FxTodo.js +95 -0
- package/dist/src/FxTodo/index.js +22 -0
- package/dist/src/FxTodo/styles/todo.styles.js +183 -0
- package/dist/src/index.js +215 -0
- package/package.json +2 -2
|
@@ -0,0 +1,310 @@
|
|
|
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
|
+
Bars: function() {
|
|
13
|
+
return Bars;
|
|
14
|
+
},
|
|
15
|
+
BoldValue: function() {
|
|
16
|
+
return BoldValue;
|
|
17
|
+
},
|
|
18
|
+
Card: function() {
|
|
19
|
+
return Card;
|
|
20
|
+
},
|
|
21
|
+
DataWrapper: function() {
|
|
22
|
+
return DataWrapper;
|
|
23
|
+
},
|
|
24
|
+
Label: function() {
|
|
25
|
+
return Label;
|
|
26
|
+
},
|
|
27
|
+
Link: function() {
|
|
28
|
+
return Link;
|
|
29
|
+
},
|
|
30
|
+
PageHeader: function() {
|
|
31
|
+
return PageHeader;
|
|
32
|
+
},
|
|
33
|
+
PageTitle: function() {
|
|
34
|
+
return PageTitle;
|
|
35
|
+
},
|
|
36
|
+
ShowMore: function() {
|
|
37
|
+
return ShowMore;
|
|
38
|
+
},
|
|
39
|
+
ShowMoreContainer: function() {
|
|
40
|
+
return ShowMoreContainer;
|
|
41
|
+
},
|
|
42
|
+
Text: function() {
|
|
43
|
+
return Text;
|
|
44
|
+
},
|
|
45
|
+
Value: function() {
|
|
46
|
+
return Value;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
50
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
51
|
+
const _styles = require("@mui/material/styles");
|
|
52
|
+
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
53
|
+
const _material = require("@mui/material");
|
|
54
|
+
function _define_property(obj, key, value) {
|
|
55
|
+
if (key in obj) {
|
|
56
|
+
Object.defineProperty(obj, key, {
|
|
57
|
+
value: value,
|
|
58
|
+
enumerable: true,
|
|
59
|
+
configurable: true,
|
|
60
|
+
writable: true
|
|
61
|
+
});
|
|
62
|
+
} else {
|
|
63
|
+
obj[key] = value;
|
|
64
|
+
}
|
|
65
|
+
return obj;
|
|
66
|
+
}
|
|
67
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
68
|
+
if (typeof WeakMap !== "function") return null;
|
|
69
|
+
var cacheBabelInterop = new WeakMap();
|
|
70
|
+
var cacheNodeInterop = new WeakMap();
|
|
71
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
72
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
73
|
+
})(nodeInterop);
|
|
74
|
+
}
|
|
75
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
76
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
80
|
+
return {
|
|
81
|
+
default: obj
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
85
|
+
if (cache && cache.has(obj)) {
|
|
86
|
+
return cache.get(obj);
|
|
87
|
+
}
|
|
88
|
+
var newObj = {
|
|
89
|
+
__proto__: null
|
|
90
|
+
};
|
|
91
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
92
|
+
for(var key in obj){
|
|
93
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
94
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
95
|
+
if (desc && (desc.get || desc.set)) {
|
|
96
|
+
Object.defineProperty(newObj, key, desc);
|
|
97
|
+
} else {
|
|
98
|
+
newObj[key] = obj[key];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
newObj.default = obj;
|
|
103
|
+
if (cache) {
|
|
104
|
+
cache.set(obj, newObj);
|
|
105
|
+
}
|
|
106
|
+
return newObj;
|
|
107
|
+
}
|
|
108
|
+
function _object_spread(target) {
|
|
109
|
+
for(var i = 1; i < arguments.length; i++){
|
|
110
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
111
|
+
var ownKeys = Object.keys(source);
|
|
112
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
113
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
114
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
ownKeys.forEach(function(key) {
|
|
118
|
+
_define_property(target, key, source[key]);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return target;
|
|
122
|
+
}
|
|
123
|
+
function ownKeys(object, enumerableOnly) {
|
|
124
|
+
var keys = Object.keys(object);
|
|
125
|
+
if (Object.getOwnPropertySymbols) {
|
|
126
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
127
|
+
if (enumerableOnly) {
|
|
128
|
+
symbols = symbols.filter(function(sym) {
|
|
129
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
keys.push.apply(keys, symbols);
|
|
133
|
+
}
|
|
134
|
+
return keys;
|
|
135
|
+
}
|
|
136
|
+
function _object_spread_props(target, source) {
|
|
137
|
+
source = source != null ? source : {};
|
|
138
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
139
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
140
|
+
} else {
|
|
141
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
142
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return target;
|
|
146
|
+
}
|
|
147
|
+
const Card = (0, _styles.styled)(_material.Paper)(({})=>({
|
|
148
|
+
borderRadius: 8,
|
|
149
|
+
padding: 16,
|
|
150
|
+
// transition: "max-height 1000ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
151
|
+
overflow: 'hidden',
|
|
152
|
+
position: 'relative'
|
|
153
|
+
}));
|
|
154
|
+
const PageHeader = (0, _styles.styled)(_material.Box)(({})=>({
|
|
155
|
+
backgroundColor: '#E2EEF1',
|
|
156
|
+
width: '100%',
|
|
157
|
+
height: 220,
|
|
158
|
+
padding: 32
|
|
159
|
+
}));
|
|
160
|
+
const Label = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.overLineCaption), {
|
|
161
|
+
color: theme.palette.statistics.label
|
|
162
|
+
}));
|
|
163
|
+
const BoldValue = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.subtitle2), {
|
|
164
|
+
fontWeight: 700,
|
|
165
|
+
lineHeight: '16px',
|
|
166
|
+
color: theme.palette.typography.title
|
|
167
|
+
}));
|
|
168
|
+
const Value = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
|
|
169
|
+
fontFamily: theme.typography.fontFamily,
|
|
170
|
+
lineHeight: '20px',
|
|
171
|
+
color: theme.palette.typography.title
|
|
172
|
+
}));
|
|
173
|
+
const PageTitle = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.h4), {
|
|
174
|
+
color: theme.palette.common.black
|
|
175
|
+
}));
|
|
176
|
+
const Link = (0, _styles.styled)(_material.Link)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
|
|
177
|
+
lineHeight: '20px',
|
|
178
|
+
fontStyle: 'italic',
|
|
179
|
+
color: theme.palette.primary[500],
|
|
180
|
+
cursor: 'pointer',
|
|
181
|
+
textDecoration: 'none'
|
|
182
|
+
}));
|
|
183
|
+
const Text = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
|
|
184
|
+
color: theme.palette.typography.title,
|
|
185
|
+
textOverflow: 'ellipsis',
|
|
186
|
+
whiteSpace: 'nowrap',
|
|
187
|
+
overflow: 'hidden'
|
|
188
|
+
}));
|
|
189
|
+
const ShowMore = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
|
|
190
|
+
color: theme.palette.primary['500'],
|
|
191
|
+
fontWeight: 600,
|
|
192
|
+
fontSize: '12px',
|
|
193
|
+
letterSpacing: '0.5px',
|
|
194
|
+
lineHeight: '24px',
|
|
195
|
+
cursor: 'pointer'
|
|
196
|
+
}));
|
|
197
|
+
const ShowMoreContainer = (0, _styles.styled)(_material.Grid)(({ theme })=>({
|
|
198
|
+
backgroundColor: theme.palette.common.white,
|
|
199
|
+
width: '100%',
|
|
200
|
+
display: 'flex',
|
|
201
|
+
justifyContent: 'center',
|
|
202
|
+
cursor: 'pointer'
|
|
203
|
+
}));
|
|
204
|
+
const DataWrapper = ({ values = [], title, icon, columns = 4, cardStyle = {}, wrapperStyle = {} })=>{
|
|
205
|
+
const normalizedValues = values.length % columns !== 0 ? [
|
|
206
|
+
...values,
|
|
207
|
+
...new Array(columns - values.length % columns)
|
|
208
|
+
] : values;
|
|
209
|
+
const last4Items = normalizedValues.splice(-columns);
|
|
210
|
+
const containerColumns = columns === 5 ? 10 : 12;
|
|
211
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
212
|
+
sx: _object_spread({}, wrapperStyle),
|
|
213
|
+
children: [
|
|
214
|
+
(title || icon) && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
215
|
+
display: "flex",
|
|
216
|
+
alignItems: "center",
|
|
217
|
+
sx: {
|
|
218
|
+
ml: 2,
|
|
219
|
+
mb: 1
|
|
220
|
+
},
|
|
221
|
+
children: [
|
|
222
|
+
icon && icon,
|
|
223
|
+
title && /*#__PURE__*/ (0, _jsxruntime.jsx)(BoldValue, {
|
|
224
|
+
sx: {
|
|
225
|
+
ml: 1
|
|
226
|
+
},
|
|
227
|
+
children: (0, _fixefyuiutils.titleCase)(title)
|
|
228
|
+
})
|
|
229
|
+
]
|
|
230
|
+
}),
|
|
231
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Card, {
|
|
232
|
+
elevation: 0,
|
|
233
|
+
sx: _object_spread({
|
|
234
|
+
border: `1px solid #F0F0F0`
|
|
235
|
+
}, cardStyle),
|
|
236
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Grid, {
|
|
237
|
+
container: true,
|
|
238
|
+
columns: containerColumns,
|
|
239
|
+
children: [
|
|
240
|
+
normalizedValues.map((value, index)=>{
|
|
241
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
|
|
242
|
+
sx: {
|
|
243
|
+
minHeight: 74,
|
|
244
|
+
padding: 2,
|
|
245
|
+
borderRight: value && (index + 1) % columns !== 0 && `1px solid #F0F0F0`,
|
|
246
|
+
borderBottom: value && `1px solid #F0F0F0`,
|
|
247
|
+
display: 'flex',
|
|
248
|
+
alignItems: 'center'
|
|
249
|
+
},
|
|
250
|
+
item: true,
|
|
251
|
+
xs: containerColumns / columns,
|
|
252
|
+
children: value && /*#__PURE__*/ _react.default.cloneElement(value)
|
|
253
|
+
}, index);
|
|
254
|
+
}),
|
|
255
|
+
last4Items.map((value, index)=>{
|
|
256
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Grid, {
|
|
257
|
+
sx: {
|
|
258
|
+
minHeight: 74,
|
|
259
|
+
padding: 2,
|
|
260
|
+
borderRight: value && (index + 1) % columns !== 0 && `1px solid #F0F0F0`,
|
|
261
|
+
display: 'flex',
|
|
262
|
+
alignItems: 'center'
|
|
263
|
+
},
|
|
264
|
+
item: true,
|
|
265
|
+
xs: containerColumns / columns,
|
|
266
|
+
children: value && /*#__PURE__*/ _react.default.cloneElement(value)
|
|
267
|
+
}, index);
|
|
268
|
+
})
|
|
269
|
+
]
|
|
270
|
+
})
|
|
271
|
+
})
|
|
272
|
+
]
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
const Bars = ({ fields })=>{
|
|
276
|
+
const max = (0, _react.useMemo)(()=>{
|
|
277
|
+
return fields.reduce((total, acc)=>{
|
|
278
|
+
return acc.value > total ? acc.value : total;
|
|
279
|
+
}, 0);
|
|
280
|
+
}, [
|
|
281
|
+
fields
|
|
282
|
+
]);
|
|
283
|
+
const calculateTheValue = (value)=>{
|
|
284
|
+
const calculatedValue = value * 24 / max;
|
|
285
|
+
if (calculatedValue > 0 && calculatedValue < 2) {
|
|
286
|
+
return 2;
|
|
287
|
+
}
|
|
288
|
+
if (calculatedValue < 1) {
|
|
289
|
+
return 1;
|
|
290
|
+
}
|
|
291
|
+
return calculatedValue;
|
|
292
|
+
};
|
|
293
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
294
|
+
style: {
|
|
295
|
+
display: 'flex',
|
|
296
|
+
alignItems: 'flex-end'
|
|
297
|
+
},
|
|
298
|
+
children: fields.map((field, index)=>{
|
|
299
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
300
|
+
style: {
|
|
301
|
+
width: 8,
|
|
302
|
+
borderRadius: '0.75px',
|
|
303
|
+
height: calculateTheValue(field.value),
|
|
304
|
+
backgroundColor: field.color,
|
|
305
|
+
marginRight: 2
|
|
306
|
+
}
|
|
307
|
+
}, index);
|
|
308
|
+
})
|
|
309
|
+
});
|
|
310
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxTag", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxTag;
|
|
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 _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
15
|
+
const _tagstyles = require("./styles/tag.styles");
|
|
16
|
+
function _interop_require_default(obj) {
|
|
17
|
+
return obj && obj.__esModule ? obj : {
|
|
18
|
+
default: obj
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const FxTag = ({ name, count = 0 })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
sx: {
|
|
26
|
+
maxWidth: 'fit-content',
|
|
27
|
+
mb: 1
|
|
28
|
+
},
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_tagstyles.StyledTag, {
|
|
31
|
+
name: name,
|
|
32
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_tagstyles.StyledLabel, {
|
|
33
|
+
children: (0, _fixefyuiutils.titleCase)(name)
|
|
34
|
+
})
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_tagstyles.StyledCount, {
|
|
37
|
+
name: name,
|
|
38
|
+
children: count
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
FxTag: function() {
|
|
13
|
+
return _FxTag.FxTag;
|
|
14
|
+
},
|
|
15
|
+
TagPropsType: function() {
|
|
16
|
+
return _FxTag.TagPropsType;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _FxTag = require("./FxTag");
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
StyledCount: function() {
|
|
13
|
+
return StyledCount;
|
|
14
|
+
},
|
|
15
|
+
StyledLabel: function() {
|
|
16
|
+
return StyledLabel;
|
|
17
|
+
},
|
|
18
|
+
StyledTag: function() {
|
|
19
|
+
return StyledTag;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _styles = require("@mui/material/styles");
|
|
23
|
+
const _material = require("@mui/material");
|
|
24
|
+
function _define_property(obj, key, value) {
|
|
25
|
+
if (key in obj) {
|
|
26
|
+
Object.defineProperty(obj, key, {
|
|
27
|
+
value: value,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true
|
|
31
|
+
});
|
|
32
|
+
} else {
|
|
33
|
+
obj[key] = value;
|
|
34
|
+
}
|
|
35
|
+
return obj;
|
|
36
|
+
}
|
|
37
|
+
function _object_spread(target) {
|
|
38
|
+
for(var i = 1; i < arguments.length; i++){
|
|
39
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
40
|
+
var ownKeys = Object.keys(source);
|
|
41
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
42
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
43
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
ownKeys.forEach(function(key) {
|
|
47
|
+
_define_property(target, key, source[key]);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return target;
|
|
51
|
+
}
|
|
52
|
+
function ownKeys(object, enumerableOnly) {
|
|
53
|
+
var keys = Object.keys(object);
|
|
54
|
+
if (Object.getOwnPropertySymbols) {
|
|
55
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
56
|
+
if (enumerableOnly) {
|
|
57
|
+
symbols = symbols.filter(function(sym) {
|
|
58
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
keys.push.apply(keys, symbols);
|
|
62
|
+
}
|
|
63
|
+
return keys;
|
|
64
|
+
}
|
|
65
|
+
function _object_spread_props(target, source) {
|
|
66
|
+
source = source != null ? source : {};
|
|
67
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
68
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
69
|
+
} else {
|
|
70
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
71
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return target;
|
|
75
|
+
}
|
|
76
|
+
const StyledTag = (0, _styles.styled)(_material.Box)(({ theme, name })=>{
|
|
77
|
+
var _theme_palette_tag_name, _theme_palette_tag_name1;
|
|
78
|
+
return {
|
|
79
|
+
background: (_theme_palette_tag_name = theme.palette.tag[name]) === null || _theme_palette_tag_name === void 0 ? void 0 : _theme_palette_tag_name.background,
|
|
80
|
+
borderRadius: 8,
|
|
81
|
+
padding: '2px 8px',
|
|
82
|
+
border: `1px solid ${(_theme_palette_tag_name1 = theme.palette.tag[name]) === null || _theme_palette_tag_name1 === void 0 ? void 0 : _theme_palette_tag_name1.border}`,
|
|
83
|
+
display: 'flex',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
width: 'fit-content'
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
const StyledLabel = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
|
|
89
|
+
lineHeight: '20px',
|
|
90
|
+
color: theme.palette.common.white
|
|
91
|
+
}));
|
|
92
|
+
const StyledCount = (0, _styles.styled)(_material.Typography)(({ theme, name })=>{
|
|
93
|
+
var _theme_palette_tag_name;
|
|
94
|
+
return _object_spread_props(_object_spread({}, theme.typography.subtitle2), {
|
|
95
|
+
lineHeight: '16px',
|
|
96
|
+
fontWeight: 700,
|
|
97
|
+
color: (_theme_palette_tag_name = theme.palette.tag[name]) === null || _theme_palette_tag_name === void 0 ? void 0 : _theme_palette_tag_name.background,
|
|
98
|
+
marginLeft: 8
|
|
99
|
+
});
|
|
100
|
+
});
|
|
@@ -0,0 +1,208 @@
|
|
|
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
|
+
FxTextField: function() {
|
|
13
|
+
return FxTextField;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return _default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
20
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
|
+
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
22
|
+
const _material = require("@mui/material");
|
|
23
|
+
const _ErrorRounded = /*#__PURE__*/ _interop_require_default(require("@mui/icons-material/ErrorRounded"));
|
|
24
|
+
function _define_property(obj, key, value) {
|
|
25
|
+
if (key in obj) {
|
|
26
|
+
Object.defineProperty(obj, key, {
|
|
27
|
+
value: value,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true
|
|
31
|
+
});
|
|
32
|
+
} else {
|
|
33
|
+
obj[key] = value;
|
|
34
|
+
}
|
|
35
|
+
return obj;
|
|
36
|
+
}
|
|
37
|
+
function _interop_require_default(obj) {
|
|
38
|
+
return obj && obj.__esModule ? obj : {
|
|
39
|
+
default: obj
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
43
|
+
if (typeof WeakMap !== "function") return null;
|
|
44
|
+
var cacheBabelInterop = new WeakMap();
|
|
45
|
+
var cacheNodeInterop = new WeakMap();
|
|
46
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
47
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
48
|
+
})(nodeInterop);
|
|
49
|
+
}
|
|
50
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
51
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
54
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
55
|
+
return {
|
|
56
|
+
default: obj
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
60
|
+
if (cache && cache.has(obj)) {
|
|
61
|
+
return cache.get(obj);
|
|
62
|
+
}
|
|
63
|
+
var newObj = {
|
|
64
|
+
__proto__: null
|
|
65
|
+
};
|
|
66
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
67
|
+
for(var key in obj){
|
|
68
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
69
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
70
|
+
if (desc && (desc.get || desc.set)) {
|
|
71
|
+
Object.defineProperty(newObj, key, desc);
|
|
72
|
+
} else {
|
|
73
|
+
newObj[key] = obj[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
newObj.default = obj;
|
|
78
|
+
if (cache) {
|
|
79
|
+
cache.set(obj, newObj);
|
|
80
|
+
}
|
|
81
|
+
return newObj;
|
|
82
|
+
}
|
|
83
|
+
function _object_spread(target) {
|
|
84
|
+
for(var i = 1; i < arguments.length; i++){
|
|
85
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
86
|
+
var ownKeys = Object.keys(source);
|
|
87
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
88
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
89
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
ownKeys.forEach(function(key) {
|
|
93
|
+
_define_property(target, key, source[key]);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return target;
|
|
97
|
+
}
|
|
98
|
+
function ownKeys(object, enumerableOnly) {
|
|
99
|
+
var keys = Object.keys(object);
|
|
100
|
+
if (Object.getOwnPropertySymbols) {
|
|
101
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
102
|
+
if (enumerableOnly) {
|
|
103
|
+
symbols = symbols.filter(function(sym) {
|
|
104
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
keys.push.apply(keys, symbols);
|
|
108
|
+
}
|
|
109
|
+
return keys;
|
|
110
|
+
}
|
|
111
|
+
function _object_spread_props(target, source) {
|
|
112
|
+
source = source != null ? source : {};
|
|
113
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
114
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
115
|
+
} else {
|
|
116
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
117
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return target;
|
|
121
|
+
}
|
|
122
|
+
const FxTextField = ({ autoFocus, droppedItem, defaultValue = '', onChange, structure, endAdornment, startAdornment, required, helperText, error = false, errorText, disabled })=>{
|
|
123
|
+
const [value, setValue] = (0, _react.useState)(defaultValue);
|
|
124
|
+
const { input_type, extended: { placeholder, title_path }, title } = structure;
|
|
125
|
+
(0, _react.useEffect)(()=>{
|
|
126
|
+
if (droppedItem) {
|
|
127
|
+
const { item } = droppedItem;
|
|
128
|
+
setValue(item[title_path]);
|
|
129
|
+
}
|
|
130
|
+
}, [
|
|
131
|
+
droppedItem
|
|
132
|
+
]);
|
|
133
|
+
const _onChange = (e)=>{
|
|
134
|
+
onChange && onChange(e);
|
|
135
|
+
setValue(e.target.value);
|
|
136
|
+
};
|
|
137
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormControl, {
|
|
138
|
+
variant: "standard",
|
|
139
|
+
error: error,
|
|
140
|
+
children: [
|
|
141
|
+
title && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputLabel, {
|
|
142
|
+
shrink: true,
|
|
143
|
+
htmlFor: title,
|
|
144
|
+
sx: (theme)=>_object_spread(_object_spread_props(_object_spread({
|
|
145
|
+
color: theme.palette.greyscale.light,
|
|
146
|
+
'&.Mui-focused': {
|
|
147
|
+
color: theme.palette.greyscale.light
|
|
148
|
+
}
|
|
149
|
+
}, disabled && {
|
|
150
|
+
opacity: '0.3'
|
|
151
|
+
}), {
|
|
152
|
+
'&.Mui-error': {
|
|
153
|
+
color: theme.palette.greyscale.light
|
|
154
|
+
}
|
|
155
|
+
}), required && {
|
|
156
|
+
'&:before': {
|
|
157
|
+
content: "'*'",
|
|
158
|
+
color: theme.palette.redscale.main,
|
|
159
|
+
display: 'inline-block',
|
|
160
|
+
marginRight: '5px'
|
|
161
|
+
}
|
|
162
|
+
}),
|
|
163
|
+
children: (0, _fixefyuiutils.titleCase)(title)
|
|
164
|
+
}),
|
|
165
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.InputBase, {
|
|
166
|
+
endAdornment: endAdornment,
|
|
167
|
+
startAdornment: startAdornment,
|
|
168
|
+
id: title,
|
|
169
|
+
autoFocus: autoFocus ? autoFocus : false,
|
|
170
|
+
placeholder: (0, _fixefyuiutils.titleCase)(placeholder),
|
|
171
|
+
onChange: _onChange,
|
|
172
|
+
type: input_type && input_type.value,
|
|
173
|
+
value: value,
|
|
174
|
+
error: error
|
|
175
|
+
}),
|
|
176
|
+
error && errorText ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.FormHelperText, {
|
|
177
|
+
sx: (theme)=>({
|
|
178
|
+
'&.Mui-error': {
|
|
179
|
+
color: theme.palette.redscale.main
|
|
180
|
+
},
|
|
181
|
+
display: 'grid',
|
|
182
|
+
gridAutoFlow: 'column',
|
|
183
|
+
alignItems: 'center',
|
|
184
|
+
justifyContent: 'left',
|
|
185
|
+
columnGap: theme.spacing(0.6),
|
|
186
|
+
fontSize: '11px'
|
|
187
|
+
}),
|
|
188
|
+
children: [
|
|
189
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ErrorRounded.default, {
|
|
190
|
+
sx: (theme)=>({
|
|
191
|
+
color: theme.palette.redscale.main,
|
|
192
|
+
width: 10,
|
|
193
|
+
height: 10
|
|
194
|
+
})
|
|
195
|
+
}),
|
|
196
|
+
(0, _fixefyuiutils.titleCase)(errorText)
|
|
197
|
+
]
|
|
198
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormHelperText, {
|
|
199
|
+
sx: (theme)=>({
|
|
200
|
+
color: theme.palette.greyscale.light,
|
|
201
|
+
fontSize: '11px'
|
|
202
|
+
}),
|
|
203
|
+
children: helperText
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
const _default = FxTextField;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
FxTextField: function() {
|
|
13
|
+
return _FxTextField.FxTextField;
|
|
14
|
+
},
|
|
15
|
+
TextFieldPropsType: function() {
|
|
16
|
+
return _FxTextField.TextFieldPropsType;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _FxTextField = require("./FxTextField");
|