@fixefy/fixefy-ui-components 0.3.29 → 0.3.31
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/{FxModalWithComponent/FxModalWithComponent.d.ts → FxButtonModalWithComponent/FxButtonModalWithComponent.d.ts} +1 -1
- package/dist/{FxModalWithComponent/FxModalWithComponent.js → FxButtonModalWithComponent/FxButtonModalWithComponent.js} +3 -3
- package/dist/FxButtonModalWithComponent/index.d.ts +1 -0
- package/dist/FxButtonModalWithComponent/index.js +11 -0
- package/dist/{FxModalWithMenu/FxModalWithMenu.d.ts → FxButtonModalWithMenu/FxButtonModalWithMenu.d.ts} +1 -1
- package/dist/{FxModalWithMenu/FxModalWithMenu.js → FxButtonModalWithMenu/FxButtonModalWithMenu.js} +3 -3
- package/dist/FxButtonModalWithMenu/index.d.ts +1 -0
- package/dist/FxButtonModalWithMenu/index.js +11 -0
- package/dist/FxCheckbox/FxCheckbox.d.ts +9 -0
- package/dist/FxCheckbox/FxCheckbox.js +76 -0
- package/dist/FxCheckbox/index.d.ts +1 -0
- package/dist/{src/FxIcon → FxCheckbox}/index.js +3 -3
- package/dist/index.d.ts +3 -2
- package/dist/index.js +12 -8
- package/package.json +1 -1
- package/dist/FxActionButton/FxActionButton.d.ts +0 -7
- package/dist/FxActionButton/FxActionButton.js +0 -82
- package/dist/FxActionButton/index.d.ts +0 -1
- package/dist/FxActionButton/index.js +0 -11
- package/dist/FxActionsTray/styles/actions_tray.styles.d.ts +0 -8
- package/dist/FxActionsTray/styles/actions_tray.styles.js +0 -159
- package/dist/FxFilterActionButton/FxFilterActionButton.d.ts +0 -7
- package/dist/FxFilterActionButton/FxFilterActionButton.js +0 -82
- package/dist/FxFilterActionButton/index.d.ts +0 -1
- package/dist/FxFilterActionButton/index.js +0 -11
- package/dist/FxFilterSortButton/FxFilterSortButton.d.ts +0 -7
- package/dist/FxFilterSortButton/FxFilterSortButton.js +0 -82
- package/dist/FxFilterSortButton/index.d.ts +0 -1
- package/dist/FxFilterSortButton/index.js +0 -11
- package/dist/FxModalWithButton/FxModalWithButton.d.ts +0 -10
- package/dist/FxModalWithButton/FxModalWithButton.js +0 -131
- package/dist/FxModalWithButton/index.d.ts +0 -1
- package/dist/FxModalWithButton/index.js +0 -11
- package/dist/FxModalWithComponent/index.d.ts +0 -1
- package/dist/FxModalWithComponent/index.js +0 -11
- package/dist/FxModalWithMenu/index.d.ts +0 -1
- package/dist/FxModalWithMenu/index.js +0 -11
- package/dist/FxPopper/styles/makeStyles.d.ts +0 -16
- package/dist/FxPopper/styles/makeStyles.js +0 -23
- package/dist/FxWizard/FxWizard/FxWizard.d.ts +0 -6
- package/dist/FxWizard/FxWizard/FxWizard.js +0 -42
- package/dist/FxWizard/FxWizard/index.d.ts +0 -2
- package/dist/FxWizard/FxWizard/index.js +0 -19
- package/dist/FxWizard/FxWizard/utils/envHelpers.d.ts +0 -1
- package/dist/FxWizard/FxWizard/utils/envHelpers.js +0 -35
- package/dist/FxWizard/FxWizard/utils/index.d.ts +0 -1
- package/dist/FxWizard/FxWizard/utils/index.js +0 -18
- package/dist/FxWizard/pages/wizard/[step].d.ts +0 -9
- package/dist/FxWizard/pages/wizard/[step].js +0 -112
- package/dist/FxWizard/pages/wizard/index.d.ts +0 -1
- package/dist/FxWizard/pages/wizard/index.js +0 -18
- package/dist/src/FxActionsTray/FxActionsTray.js +0 -351
- package/dist/src/FxActionsTray/index.js +0 -19
- package/dist/src/FxActionsTray/styles/actions_tray.styles.js +0 -159
- package/dist/src/FxAggregationsBar/FxAggregations.js +0 -41
- package/dist/src/FxAggregationsBar/helpers/structureReader.js +0 -78
- package/dist/src/FxAggregationsBar/index.js +0 -22
- package/dist/src/FxAggregationsBar/operations/query.js +0 -73
- package/dist/src/FxAsyncDropdown/FxAsyncDropdown.js +0 -628
- package/dist/src/FxAsyncDropdown/helpers/helpers.js +0 -161
- package/dist/src/FxAsyncDropdown/index.js +0 -25
- package/dist/src/FxAsyncDropdown/styles/dropdown.styles.js +0 -228
- package/dist/src/FxAvatar/FxAvatar.js +0 -145
- package/dist/src/FxAvatar/helpers/stringToColor.js +0 -23
- package/dist/src/FxAvatar/index.js +0 -22
- package/dist/src/FxAvatar/styles/avatar.styles.js +0 -192
- package/dist/src/FxButton/FxButton.js +0 -106
- package/dist/src/FxButton/index.js +0 -19
- package/dist/src/FxButton/styles/button.styles.js +0 -23
- package/dist/src/FxChip/FxChip.js +0 -45
- package/dist/src/FxChip/index.js +0 -19
- package/dist/src/FxChip/styles/chip.styles.js +0 -61
- package/dist/src/FxFilterSortButton/FxFilterSortButton.js +0 -82
- package/dist/src/FxFilterSortButton/index.js +0 -11
- package/dist/src/FxIcon/FxIcon.js +0 -107
- package/dist/src/FxIcon/content/dynamic_icon.js +0 -20
- package/dist/src/FxIcon/content/index.js +0 -20
- package/dist/src/FxIcon/content/lazy_icon.js +0 -137
- package/dist/src/FxModal/FxModal.js +0 -170
- package/dist/src/FxModal/index.js +0 -19
- package/dist/src/FxModal/styles/modal.style.js +0 -59
- package/dist/src/FxModalWithButton/FxModalWithButton.js +0 -94
- package/dist/src/FxModalWithButton/index.js +0 -11
- package/dist/src/FxNotes/FxNotes.js +0 -216
- package/dist/src/FxNotes/helpers/stringToColor.js +0 -26
- package/dist/src/FxNotes/index.js +0 -22
- package/dist/src/FxNotes/operations/queries.js +0 -35
- package/dist/src/FxNotes/styles/notes.styles.js +0 -168
- package/dist/src/FxNumberField/FxNumberField.js +0 -109
- package/dist/src/FxNumberField/index.js +0 -19
- package/dist/src/FxNumberField/styles/number_field.styles.js +0 -94
- package/dist/src/FxProgressCircle/FxProgressCircle.js +0 -65
- package/dist/src/FxProgressCircle/index.js +0 -19
- package/dist/src/FxProgressCircle/styles/progress_circle.styles.js +0 -106
- package/dist/src/FxProgressCounter/ProgressCounter.js +0 -168
- package/dist/src/FxProgressCounter/index.js +0 -19
- package/dist/src/FxProgressCounter/styles/progress_counter.styles.js +0 -61
- package/dist/src/FxScore/FxScore.js +0 -207
- package/dist/src/FxScore/index.js +0 -19
- package/dist/src/FxScore/styles/score.styles.js +0 -97
- package/dist/src/FxShowMore/FxShowMore.js +0 -80
- package/dist/src/FxShowMore/index.js +0 -19
- package/dist/src/FxShowMore/styles/show_more.styles.js +0 -134
- package/dist/src/FxSlider/FxSlider.js +0 -49
- package/dist/src/FxSlider/index.js +0 -19
- package/dist/src/FxStatisticsBar/FxStatisticsBar.js +0 -191
- package/dist/src/FxStatisticsBar/index.js +0 -19
- package/dist/src/FxStatisticsBar/styles/statistics.styles.js +0 -98
- package/dist/src/FxStatusBar/FxStatusBar.js +0 -143
- package/dist/src/FxStatusBar/helpers/constants.js +0 -22
- package/dist/src/FxStatusBar/index.js +0 -22
- package/dist/src/FxStatusBar/styles/statusBar.styles.js +0 -131
- package/dist/src/FxStyledComponents/index.js +0 -310
- package/dist/src/FxTag/FxTag.js +0 -41
- package/dist/src/FxTag/index.js +0 -19
- package/dist/src/FxTag/styles/tag.styles.js +0 -100
- package/dist/src/FxTextField/FxTextField.js +0 -208
- package/dist/src/FxTextField/index.js +0 -19
- package/dist/src/FxTodo/FxTodo.js +0 -95
- package/dist/src/FxTodo/index.js +0 -22
- package/dist/src/FxTodo/styles/todo.styles.js +0 -183
- package/dist/src/index.js +0 -215
|
@@ -1,161 +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
|
-
getJPart: function() {
|
|
13
|
-
return getJPart;
|
|
14
|
-
},
|
|
15
|
-
isArrayValid: function() {
|
|
16
|
-
return isArrayValid;
|
|
17
|
-
},
|
|
18
|
-
isObjectValid: function() {
|
|
19
|
-
return isObjectValid;
|
|
20
|
-
},
|
|
21
|
-
isStringValid: function() {
|
|
22
|
-
return isStringValid;
|
|
23
|
-
},
|
|
24
|
-
titleCase: function() {
|
|
25
|
-
return titleCase;
|
|
26
|
-
},
|
|
27
|
-
toPascalCase: function() {
|
|
28
|
-
return toPascalCase;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
function _define_property(obj, key, value) {
|
|
32
|
-
if (key in obj) {
|
|
33
|
-
Object.defineProperty(obj, key, {
|
|
34
|
-
value: value,
|
|
35
|
-
enumerable: true,
|
|
36
|
-
configurable: true,
|
|
37
|
-
writable: true
|
|
38
|
-
});
|
|
39
|
-
} else {
|
|
40
|
-
obj[key] = value;
|
|
41
|
-
}
|
|
42
|
-
return obj;
|
|
43
|
-
}
|
|
44
|
-
function _object_spread(target) {
|
|
45
|
-
for(var i = 1; i < arguments.length; i++){
|
|
46
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
47
|
-
var ownKeys = Object.keys(source);
|
|
48
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
49
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
50
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
ownKeys.forEach(function(key) {
|
|
54
|
-
_define_property(target, key, source[key]);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
return target;
|
|
58
|
-
}
|
|
59
|
-
function ownKeys(object, enumerableOnly) {
|
|
60
|
-
var keys = Object.keys(object);
|
|
61
|
-
if (Object.getOwnPropertySymbols) {
|
|
62
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
63
|
-
if (enumerableOnly) {
|
|
64
|
-
symbols = symbols.filter(function(sym) {
|
|
65
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
keys.push.apply(keys, symbols);
|
|
69
|
-
}
|
|
70
|
-
return keys;
|
|
71
|
-
}
|
|
72
|
-
function _object_spread_props(target, source) {
|
|
73
|
-
source = source != null ? source : {};
|
|
74
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
75
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
76
|
-
} else {
|
|
77
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
78
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return target;
|
|
82
|
-
}
|
|
83
|
-
const getJPart = (j, jsonPath, defaultValue)=>{
|
|
84
|
-
// input check - if key is invalid - return error
|
|
85
|
-
if (isObjectValid(j) === false) return defaultValue;
|
|
86
|
-
// convert indexes to properties
|
|
87
|
-
jsonPath = jsonPath.replace(/\[(\w+)\]/g, '.$1');
|
|
88
|
-
// strip a leading dot
|
|
89
|
-
jsonPath = jsonPath.replace(/^\./, '');
|
|
90
|
-
// split path by '.'
|
|
91
|
-
let _isArrayValid = false;
|
|
92
|
-
let _isStringValid = false;
|
|
93
|
-
let currentPathPart;
|
|
94
|
-
let isLoop = true;
|
|
95
|
-
const pathParts = jsonPath.split('.');
|
|
96
|
-
for(let i = 0, n = pathParts.length; isLoop && i < n; ++i){
|
|
97
|
-
currentPathPart = pathParts[i];
|
|
98
|
-
_isStringValid = isStringValid(j);
|
|
99
|
-
_isArrayValid = isArrayValid(j);
|
|
100
|
-
if (_isStringValid === true || _isArrayValid === true) {
|
|
101
|
-
if (_isStringValid === true) {
|
|
102
|
-
j = JSON.parse(j);
|
|
103
|
-
} else {
|
|
104
|
-
j = j.reduce((acc, cur)=>{
|
|
105
|
-
const innerJ = getJPart(cur, pathParts.slice(i).join('.'), defaultValue);
|
|
106
|
-
if (isArrayValid(innerJ)) {
|
|
107
|
-
acc.push(...innerJ);
|
|
108
|
-
} else {
|
|
109
|
-
acc.push(_object_spread_props(_object_spread({}, innerJ), {
|
|
110
|
-
value: innerJ._id
|
|
111
|
-
}));
|
|
112
|
-
}
|
|
113
|
-
return acc;
|
|
114
|
-
}, []);
|
|
115
|
-
isLoop = false;
|
|
116
|
-
}
|
|
117
|
-
} else {
|
|
118
|
-
if (currentPathPart in j) {
|
|
119
|
-
j = j[currentPathPart];
|
|
120
|
-
} else {
|
|
121
|
-
// if something in the process failed:
|
|
122
|
-
// 1. set the rv as the default value
|
|
123
|
-
// 2. stop the loop`
|
|
124
|
-
j = defaultValue;
|
|
125
|
-
isLoop = false;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return j;
|
|
130
|
-
};
|
|
131
|
-
const isArrayValid = (arr, minLength = 1, maxLength = 0)=>{
|
|
132
|
-
let rv = isObjectValid(arr) && arr.length >= minLength && //arr instanceof Array
|
|
133
|
-
Object.prototype.toString.call(arr) == '[object Array]';
|
|
134
|
-
if (maxLength > 0) {
|
|
135
|
-
rv = rv && arr.length <= maxLength;
|
|
136
|
-
}
|
|
137
|
-
return rv;
|
|
138
|
-
};
|
|
139
|
-
const isObjectValid = (obj, isCheckKeys = false)=>{
|
|
140
|
-
let rv = typeof obj !== 'undefined' && obj !== null;
|
|
141
|
-
if (isCheckKeys) {
|
|
142
|
-
rv = rv && Object.keys(obj).length > 0;
|
|
143
|
-
}
|
|
144
|
-
return rv;
|
|
145
|
-
};
|
|
146
|
-
const isStringValid = (str, minLength = null, maxLength = null, isValidateType = true)=>{
|
|
147
|
-
let rv = isObjectValid(str) && str.toString().length > 0 && (isValidateType ? typeof str === 'string' : true);
|
|
148
|
-
if (rv === false) return false;
|
|
149
|
-
if (minLength && isNaN(minLength) === false && minLength > 0) {
|
|
150
|
-
rv = rv && str.toString().length >= minLength;
|
|
151
|
-
}
|
|
152
|
-
if (rv === false) return false;
|
|
153
|
-
if (maxLength && isNaN(maxLength) === false && maxLength > 0) {
|
|
154
|
-
rv = rv && str.toString().length <= maxLength;
|
|
155
|
-
}
|
|
156
|
-
return rv;
|
|
157
|
-
};
|
|
158
|
-
const titleCase = (str = '')=>str && toPascalCase(str.toString(), true);
|
|
159
|
-
const toPascalCase = (string, title = false)=>{
|
|
160
|
-
return string && string.replace(/(_[a-z])?(^[a-z])?(_|\s[a-z])?/g, ($1)=>$1.toUpperCase().replace('_', title ? ' ' : ''));
|
|
161
|
-
};
|
|
@@ -1,25 +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
|
-
AsyncDropdownPropsType: function() {
|
|
13
|
-
return _FxAsyncDropdown.AsyncDropdownPropsType;
|
|
14
|
-
},
|
|
15
|
-
FxAsyncDropdown: function() {
|
|
16
|
-
return _FxAsyncDropdown.FxAsyncDropdown;
|
|
17
|
-
},
|
|
18
|
-
Option: function() {
|
|
19
|
-
return _FxAsyncDropdown.Option;
|
|
20
|
-
},
|
|
21
|
-
StylesOptions: function() {
|
|
22
|
-
return _FxAsyncDropdown.StylesOptions;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _FxAsyncDropdown = require("./FxAsyncDropdown");
|
|
@@ -1,228 +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
|
-
Label: function() {
|
|
16
|
-
return Label;
|
|
17
|
-
},
|
|
18
|
-
Listbox: function() {
|
|
19
|
-
return Listbox;
|
|
20
|
-
},
|
|
21
|
-
Loading: function() {
|
|
22
|
-
return Loading;
|
|
23
|
-
},
|
|
24
|
-
Root: function() {
|
|
25
|
-
return Root;
|
|
26
|
-
},
|
|
27
|
-
StyledClose: function() {
|
|
28
|
-
return StyledClose;
|
|
29
|
-
},
|
|
30
|
-
StyledListBox: function() {
|
|
31
|
-
return StyledListBox;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const _styles = require("@mui/material/styles");
|
|
35
|
-
function _define_property(obj, key, value) {
|
|
36
|
-
if (key in obj) {
|
|
37
|
-
Object.defineProperty(obj, key, {
|
|
38
|
-
value: value,
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true
|
|
42
|
-
});
|
|
43
|
-
} else {
|
|
44
|
-
obj[key] = value;
|
|
45
|
-
}
|
|
46
|
-
return obj;
|
|
47
|
-
}
|
|
48
|
-
function _object_spread(target) {
|
|
49
|
-
for(var i = 1; i < arguments.length; i++){
|
|
50
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
51
|
-
var ownKeys = Object.keys(source);
|
|
52
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
53
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
54
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
55
|
-
}));
|
|
56
|
-
}
|
|
57
|
-
ownKeys.forEach(function(key) {
|
|
58
|
-
_define_property(target, key, source[key]);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return target;
|
|
62
|
-
}
|
|
63
|
-
function ownKeys(object, enumerableOnly) {
|
|
64
|
-
var keys = Object.keys(object);
|
|
65
|
-
if (Object.getOwnPropertySymbols) {
|
|
66
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
67
|
-
if (enumerableOnly) {
|
|
68
|
-
symbols = symbols.filter(function(sym) {
|
|
69
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
keys.push.apply(keys, symbols);
|
|
73
|
-
}
|
|
74
|
-
return keys;
|
|
75
|
-
}
|
|
76
|
-
function _object_spread_props(target, source) {
|
|
77
|
-
source = source != null ? source : {};
|
|
78
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
79
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
80
|
-
} else {
|
|
81
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
82
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
return target;
|
|
86
|
-
}
|
|
87
|
-
const Root = (0, _styles.styled)('div')(()=>({
|
|
88
|
-
color: 'rgba(0,0,0,.85)',
|
|
89
|
-
fontSize: 14
|
|
90
|
-
}));
|
|
91
|
-
const Label = (0, _styles.styled)('label')(()=>({
|
|
92
|
-
padding: '0 0 4px',
|
|
93
|
-
lineHeight: '1.5',
|
|
94
|
-
display: 'block'
|
|
95
|
-
}));
|
|
96
|
-
const Loading = (0, _styles.styled)('div')(()=>({
|
|
97
|
-
width: 30,
|
|
98
|
-
height: 30,
|
|
99
|
-
display: 'flex',
|
|
100
|
-
alignItems: 'center',
|
|
101
|
-
justifyContent: 'center',
|
|
102
|
-
['& span']: {
|
|
103
|
-
width: '20px !important',
|
|
104
|
-
height: '20px !important'
|
|
105
|
-
}
|
|
106
|
-
}));
|
|
107
|
-
const InputWrapper = (0, _styles.styled)('div')(({ theme, hasValue, disabled })=>{
|
|
108
|
-
const defaultBorder = `1px solid ${theme.palette.greyscale[200]}`;
|
|
109
|
-
const hasValueBorder = `1px solid ${theme.palette.primary[500]}`;
|
|
110
|
-
const disabledBorder = `1px solid ${theme.palette.greyscale[200]}`;
|
|
111
|
-
const activeBorder = `1px solid ${theme.palette.primary[500]}`;
|
|
112
|
-
return {
|
|
113
|
-
border: disabled ? disabledBorder : hasValue ? hasValueBorder : defaultBorder,
|
|
114
|
-
backgroundColor: theme.palette.common.white,
|
|
115
|
-
borderRadius: 4,
|
|
116
|
-
padding: 1,
|
|
117
|
-
display: 'flex',
|
|
118
|
-
alignItems: 'center',
|
|
119
|
-
flexWrap: 'wrap',
|
|
120
|
-
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
121
|
-
['&:hover']: {
|
|
122
|
-
border: disabled ? disabledBorder : activeBorder,
|
|
123
|
-
borderRadius: 4
|
|
124
|
-
},
|
|
125
|
-
['&:focus']: {
|
|
126
|
-
border: disabled ? disabledBorder : activeBorder,
|
|
127
|
-
borderRadius: 4
|
|
128
|
-
},
|
|
129
|
-
['& > svg']: {
|
|
130
|
-
color: disabled ? theme.palette.greyscale[300] : theme.palette.primary['500'],
|
|
131
|
-
marginRight: 8
|
|
132
|
-
},
|
|
133
|
-
['& input']: _object_spread_props(_object_spread({
|
|
134
|
-
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
135
|
-
backgroundColor: theme.palette.common.white,
|
|
136
|
-
color: theme.palette.typography.title,
|
|
137
|
-
height: 36,
|
|
138
|
-
boxSizing: 'border-box',
|
|
139
|
-
width: 0,
|
|
140
|
-
minWidth: 30,
|
|
141
|
-
flexGrow: 1,
|
|
142
|
-
border: 0,
|
|
143
|
-
margin: 0,
|
|
144
|
-
outline: 0
|
|
145
|
-
}, theme.typography.body1), {
|
|
146
|
-
lineHeight: '20px',
|
|
147
|
-
['& ::placeholder']: {
|
|
148
|
-
color: hasValue ? theme.palette.typography.title : theme.palette.greyscale[400]
|
|
149
|
-
}
|
|
150
|
-
})
|
|
151
|
-
};
|
|
152
|
-
});
|
|
153
|
-
const Listbox = (0, _styles.styled)('ul')(({ theme })=>({
|
|
154
|
-
margin: 0,
|
|
155
|
-
padding: 0,
|
|
156
|
-
position: 'absolute',
|
|
157
|
-
listStyle: 'none',
|
|
158
|
-
backgroundColor: theme.palette.common.white,
|
|
159
|
-
overflow: 'auto',
|
|
160
|
-
maxHeight: 250,
|
|
161
|
-
minHeight: 250,
|
|
162
|
-
borderRadius: 4,
|
|
163
|
-
boxShadow: '0px 0px 10px rgba(86, 135, 147, 0.2)',
|
|
164
|
-
zIndex: 1,
|
|
165
|
-
maxWidth: 270,
|
|
166
|
-
minWidth: 270,
|
|
167
|
-
top: 48,
|
|
168
|
-
left: -42,
|
|
169
|
-
['& div']: {
|
|
170
|
-
textOverflow: 'ellipsis',
|
|
171
|
-
whiteSpace: 'nowrap',
|
|
172
|
-
overflow: 'hidden'
|
|
173
|
-
}
|
|
174
|
-
}));
|
|
175
|
-
const StyledClose = (0, _styles.styled)('div')(()=>({
|
|
176
|
-
position: 'absolute',
|
|
177
|
-
bottom: 0
|
|
178
|
-
}));
|
|
179
|
-
const StyledListBox = (0, _styles.styled)('ul')(({ theme, hasClearBtn })=>({
|
|
180
|
-
// width: 300,
|
|
181
|
-
margin: 0,
|
|
182
|
-
padding: 0,
|
|
183
|
-
// position: 'absolute',
|
|
184
|
-
listStyle: 'none',
|
|
185
|
-
backgroundColor: theme.palette.common.white,
|
|
186
|
-
overflow: 'auto',
|
|
187
|
-
maxHeight: hasClearBtn ? 190 : 230,
|
|
188
|
-
zIndex: 1,
|
|
189
|
-
textOverflow: 'ellipsis',
|
|
190
|
-
whiteSpace: 'nowrap',
|
|
191
|
-
overflowX: 'hidden',
|
|
192
|
-
paddingTop: 8,
|
|
193
|
-
paddingBottom: 8,
|
|
194
|
-
maxWidth: 270,
|
|
195
|
-
minWidth: 270,
|
|
196
|
-
['& div']: {
|
|
197
|
-
textOverflow: 'ellipsis',
|
|
198
|
-
whiteSpace: 'nowrap',
|
|
199
|
-
overflow: 'hidden'
|
|
200
|
-
},
|
|
201
|
-
['& li']: {
|
|
202
|
-
display: 'flex',
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
justifyContent: 'flex-start',
|
|
205
|
-
height: 40,
|
|
206
|
-
cursor: 'pointer',
|
|
207
|
-
textOverflow: 'ellipsis',
|
|
208
|
-
whiteSpace: 'nowrap',
|
|
209
|
-
overflow: 'hidden',
|
|
210
|
-
width: '100%',
|
|
211
|
-
maxWidth: 270,
|
|
212
|
-
minWidth: 270
|
|
213
|
-
},
|
|
214
|
-
['& li:hover']: {
|
|
215
|
-
backgroundColor: '#F6F9FA'
|
|
216
|
-
},
|
|
217
|
-
["& li[aria-selected='true']"]: {
|
|
218
|
-
fontWeight: 900,
|
|
219
|
-
backgroundColor: '#F6F9FA'
|
|
220
|
-
},
|
|
221
|
-
["& li[data-focus='true']"]: {
|
|
222
|
-
backgroundColor: '#F6F9FA',
|
|
223
|
-
cursor: 'pointer',
|
|
224
|
-
['& svg ']: {
|
|
225
|
-
color: 'currentColor'
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}));
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "FxAvatar", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FxAvatar;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
-
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
14
|
-
const _stringToColor = require("./helpers/stringToColor");
|
|
15
|
-
const _avatarstyles = require("./styles/avatar.styles");
|
|
16
|
-
function _define_property(obj, key, value) {
|
|
17
|
-
if (key in obj) {
|
|
18
|
-
Object.defineProperty(obj, key, {
|
|
19
|
-
value: value,
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
obj[key] = value;
|
|
26
|
-
}
|
|
27
|
-
return obj;
|
|
28
|
-
}
|
|
29
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
30
|
-
if (typeof WeakMap !== "function") return null;
|
|
31
|
-
var cacheBabelInterop = new WeakMap();
|
|
32
|
-
var cacheNodeInterop = new WeakMap();
|
|
33
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
34
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
35
|
-
})(nodeInterop);
|
|
36
|
-
}
|
|
37
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
38
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
42
|
-
return {
|
|
43
|
-
default: obj
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
47
|
-
if (cache && cache.has(obj)) {
|
|
48
|
-
return cache.get(obj);
|
|
49
|
-
}
|
|
50
|
-
var newObj = {
|
|
51
|
-
__proto__: null
|
|
52
|
-
};
|
|
53
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
54
|
-
for(var key in obj){
|
|
55
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
56
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
57
|
-
if (desc && (desc.get || desc.set)) {
|
|
58
|
-
Object.defineProperty(newObj, key, desc);
|
|
59
|
-
} else {
|
|
60
|
-
newObj[key] = obj[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
newObj.default = obj;
|
|
65
|
-
if (cache) {
|
|
66
|
-
cache.set(obj, newObj);
|
|
67
|
-
}
|
|
68
|
-
return newObj;
|
|
69
|
-
}
|
|
70
|
-
function _object_spread(target) {
|
|
71
|
-
for(var i = 1; i < arguments.length; i++){
|
|
72
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
73
|
-
var ownKeys = Object.keys(source);
|
|
74
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
75
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
76
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
ownKeys.forEach(function(key) {
|
|
80
|
-
_define_property(target, key, source[key]);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return target;
|
|
84
|
-
}
|
|
85
|
-
function ownKeys(object, enumerableOnly) {
|
|
86
|
-
var keys = Object.keys(object);
|
|
87
|
-
if (Object.getOwnPropertySymbols) {
|
|
88
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
89
|
-
if (enumerableOnly) {
|
|
90
|
-
symbols = symbols.filter(function(sym) {
|
|
91
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
keys.push.apply(keys, symbols);
|
|
95
|
-
}
|
|
96
|
-
return keys;
|
|
97
|
-
}
|
|
98
|
-
function _object_spread_props(target, source) {
|
|
99
|
-
source = source != null ? source : {};
|
|
100
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
101
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
102
|
-
} else {
|
|
103
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
104
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return target;
|
|
108
|
-
}
|
|
109
|
-
function FxAvatar({ users, max = 5, isEditable = false, onEdit }) {
|
|
110
|
-
const [backgroundcolors, setBackgroundColors] = (0, _react.useState)({});
|
|
111
|
-
const avatars = users.length > max ? users.slice(0, max - 1) : users;
|
|
112
|
-
const isMoreThanMax = users.length > max;
|
|
113
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_avatarstyles.AvatarWrapper, {
|
|
114
|
-
children: [
|
|
115
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_avatarstyles.AvatarGroup, {
|
|
116
|
-
children: [
|
|
117
|
-
avatars.map((user, index)=>{
|
|
118
|
-
const userName = user.first_name + ' ' + user.last_name;
|
|
119
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_avatarstyles.FxTooltip, {
|
|
120
|
-
title: (0, _fixefyuiutils.titleCase)(userName),
|
|
121
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_avatarstyles.StyledAvatar, {
|
|
122
|
-
sx: {
|
|
123
|
-
backgroundColor: backgroundcolors[userName] ? backgroundcolors[userName] : (0, _stringToColor.stringToColor)(userName, (color)=>{
|
|
124
|
-
setBackgroundColors(_object_spread_props(_object_spread({}, backgroundcolors), {
|
|
125
|
-
[userName]: color
|
|
126
|
-
}));
|
|
127
|
-
})
|
|
128
|
-
},
|
|
129
|
-
src: user.image_url,
|
|
130
|
-
alt: userName,
|
|
131
|
-
children: (0, _fixefyuiutils.titleCase)(userName.slice(0, 1))
|
|
132
|
-
})
|
|
133
|
-
}, index);
|
|
134
|
-
}),
|
|
135
|
-
isMoreThanMax && /*#__PURE__*/ (0, _jsxruntime.jsx)(_avatarstyles.StyledMoreAvatar, {
|
|
136
|
-
children: `+${users.length - max + 1}`
|
|
137
|
-
})
|
|
138
|
-
]
|
|
139
|
-
}),
|
|
140
|
-
isEditable && /*#__PURE__*/ (0, _jsxruntime.jsx)(_avatarstyles.EditIcon, {
|
|
141
|
-
onClick: onEdit && onEdit
|
|
142
|
-
})
|
|
143
|
-
]
|
|
144
|
-
});
|
|
145
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "stringToColor", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return stringToColor;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const stringToColor = (string, callBack)=>{
|
|
12
|
-
let hash = 0;
|
|
13
|
-
let color = '#';
|
|
14
|
-
/* eslint-disable no-bitwise */ for(let i = 0; i < string.length; i += 1){
|
|
15
|
-
hash = string.charCodeAt(i) + ((hash << 5) - hash);
|
|
16
|
-
}
|
|
17
|
-
for(let i = 0; i < 3; i += 1){
|
|
18
|
-
const value = hash >> i * 8 & 0xff;
|
|
19
|
-
color += `00${value.toString(16)}`.substr(-2);
|
|
20
|
-
}
|
|
21
|
-
/* eslint-enable no-bitwise */ callBack && callBack(color);
|
|
22
|
-
return color;
|
|
23
|
-
};
|
|
@@ -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
|
-
AvatarPropsType: function() {
|
|
13
|
-
return _FxAvatar.AvatarPropsType;
|
|
14
|
-
},
|
|
15
|
-
BackgroundColorsType: function() {
|
|
16
|
-
return _FxAvatar.BackgroundColorsType;
|
|
17
|
-
},
|
|
18
|
-
FxAvatar: function() {
|
|
19
|
-
return _FxAvatar.FxAvatar;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
const _FxAvatar = require("./FxAvatar");
|