@fixefy/fixefy-ui-components 0.0.44 → 0.0.46
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/build/{FxTag/styles/tag.styles.js → FxRaaya/FxRaaya.js} +33 -1
- package/build/{FxNotes → FxRaaya}/index.js +3 -3
- package/package.json +3 -4
- package/build/FxActionsTray/FxActionsTray.js +0 -351
- package/build/FxActionsTray/actions_tray_types.d.js +0 -4
- package/build/FxActionsTray/index.js +0 -11
- package/build/FxActionsTray/styles/actions_tray.styles.js +0 -160
- package/build/FxAggregationsBar/FxAggregations.js +0 -41
- package/build/FxAggregationsBar/aggregations_types.d.js +0 -4
- package/build/FxAggregationsBar/helpers/structureReader.js +0 -78
- package/build/FxAggregationsBar/index.js +0 -11
- package/build/FxAggregationsBar/operations/query.js +0 -73
- package/build/FxAsyncDropdown/FxAsyncDropdown.js +0 -456
- package/build/FxAsyncDropdown/async_dropdown_types.d.js +0 -4
- package/build/FxAsyncDropdown/helpers/helpers.js +0 -151
- package/build/FxAsyncDropdown/index.js +0 -11
- package/build/FxAsyncDropdown/styles/dropdown.styles.js +0 -230
- package/build/FxAvatar/FxAvatar.js +0 -145
- package/build/FxAvatar/avatar_types.d.js +0 -4
- package/build/FxAvatar/helpers/stringToColor.js +0 -23
- package/build/FxAvatar/index.js +0 -11
- package/build/FxAvatar/styles/avatar.styles.js +0 -193
- package/build/FxButton/FxButton.js +0 -106
- package/build/FxButton/index.js +0 -11
- package/build/FxButton/styles/button.styles.js +0 -24
- package/build/FxChip/FxChip.js +0 -37
- package/build/FxChip/chip_types.d.js +0 -4
- package/build/FxChip/index.js +0 -11
- package/build/FxChip/styles/chip.styles.js +0 -62
- package/build/FxIcon/FxIcon.js +0 -147
- package/build/FxIcon/content/dynamic_icon.js +0 -20
- package/build/FxIcon/content/index.js +0 -20
- package/build/FxIcon/content/lazy_icon.js +0 -137
- package/build/FxIcon/icon_types.d.js +0 -4
- package/build/FxIcon/index.js +0 -20
- package/build/FxModal/FxModal.js +0 -171
- package/build/FxModal/index.js +0 -11
- package/build/FxModal/modal_types.d.js +0 -4
- package/build/FxModal/styles/modal.style.js +0 -59
- package/build/FxNotes/FxNotes.js +0 -216
- package/build/FxNotes/helpers/stringToColor.js +0 -26
- package/build/FxNotes/note_types.d.js +0 -4
- package/build/FxNotes/operations/queries.js +0 -35
- package/build/FxNotes/styles/notes.styles.js +0 -169
- package/build/FxNumberField/FxNumberField.js +0 -109
- package/build/FxNumberField/index.js +0 -11
- package/build/FxNumberField/number_field_types.d.js +0 -4
- package/build/FxNumberField/styles/number_field.styles.js +0 -94
- package/build/FxProgressCircle/FxProgressCircle.js +0 -65
- package/build/FxProgressCircle/index.js +0 -11
- package/build/FxProgressCircle/progress_circle_types.d.js +0 -4
- package/build/FxProgressCircle/styles/progress_circle.styles.js +0 -106
- package/build/FxProgressCounter/ProgressCounter.js +0 -168
- package/build/FxProgressCounter/index.js +0 -11
- package/build/FxProgressCounter/progress_counter_types.d.js +0 -4
- package/build/FxProgressCounter/styles/progress_counter.styles.js +0 -61
- package/build/FxScore/FxScore.js +0 -207
- package/build/FxScore/index.js +0 -11
- package/build/FxScore/score_types.d.js +0 -4
- package/build/FxScore/styles/score.styles.js +0 -96
- package/build/FxShowMore/FxShowMore.js +0 -80
- package/build/FxShowMore/index.js +0 -11
- package/build/FxShowMore/show_more_types.d.js +0 -4
- package/build/FxShowMore/styles/show_more.styles.js +0 -134
- package/build/FxSlider/FxSlider.js +0 -49
- package/build/FxSlider/index.js +0 -11
- package/build/FxSlider/slider_types.d.js +0 -4
- package/build/FxStatisticsBar/FxStatisticsBar.js +0 -191
- package/build/FxStatisticsBar/index.js +0 -11
- package/build/FxStatisticsBar/statistics_bar_types.d.js +0 -4
- package/build/FxStatisticsBar/styles/statistics.styles.js +0 -98
- package/build/FxStatusBar/FxStatusBar.js +0 -143
- package/build/FxStatusBar/helpers/constants.js +0 -22
- package/build/FxStatusBar/index.js +0 -20
- package/build/FxStatusBar/status_bar_types.d.js +0 -4
- package/build/FxStatusBar/styles/statusBar.styles.js +0 -131
- package/build/FxStyledComponents/index.js +0 -311
- package/build/FxTag/FxTag.js +0 -41
- package/build/FxTag/fxtag_types.d.js +0 -4
- package/build/FxTag/index.js +0 -20
- package/build/FxTextField/FxTextField.js +0 -208
- package/build/FxTextField/index.js +0 -11
- package/build/FxTextField/text_field_types.d.js +0 -4
- package/build/FxTodo/FxTodo.js +0 -95
- package/build/FxTodo/index.js +0 -23
- package/build/FxTodo/styles/todo.styles.js +0 -183
- package/build/FxTodo/todo_types.d.js +0 -4
- package/build/FxWizard/FxWizard.js +0 -179
- package/build/FxWizard/WizardContext.js +0 -207
- package/build/FxWizard/index.js +0 -23
- package/build/FxWizard/styles/wizard.styles.js +0 -89
- package/build/FxWizard/wizard_types.d.js +0 -4
- package/build/index.js +0 -182
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "LazyIcon", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return LazyIcon;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
-
const _material = require("@mui/material");
|
|
14
|
-
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
15
|
-
const _image = /*#__PURE__*/ _interop_require_default(require("next/image"));
|
|
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 _interop_require_default(obj) {
|
|
30
|
-
return obj && obj.__esModule ? obj : {
|
|
31
|
-
default: obj
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
35
|
-
if (typeof WeakMap !== "function") return null;
|
|
36
|
-
var cacheBabelInterop = new WeakMap();
|
|
37
|
-
var cacheNodeInterop = new WeakMap();
|
|
38
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
39
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
40
|
-
})(nodeInterop);
|
|
41
|
-
}
|
|
42
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
43
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
44
|
-
return obj;
|
|
45
|
-
}
|
|
46
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
47
|
-
return {
|
|
48
|
-
default: obj
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
52
|
-
if (cache && cache.has(obj)) {
|
|
53
|
-
return cache.get(obj);
|
|
54
|
-
}
|
|
55
|
-
var newObj = {
|
|
56
|
-
__proto__: null
|
|
57
|
-
};
|
|
58
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
59
|
-
for(var key in obj){
|
|
60
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
61
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
62
|
-
if (desc && (desc.get || desc.set)) {
|
|
63
|
-
Object.defineProperty(newObj, key, desc);
|
|
64
|
-
} else {
|
|
65
|
-
newObj[key] = obj[key];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
newObj.default = obj;
|
|
70
|
-
if (cache) {
|
|
71
|
-
cache.set(obj, newObj);
|
|
72
|
-
}
|
|
73
|
-
return newObj;
|
|
74
|
-
}
|
|
75
|
-
function _object_spread(target) {
|
|
76
|
-
for(var i = 1; i < arguments.length; i++){
|
|
77
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
78
|
-
var ownKeys = Object.keys(source);
|
|
79
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
80
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
81
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
ownKeys.forEach(function(key) {
|
|
85
|
-
_define_property(target, key, source[key]);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
return target;
|
|
89
|
-
}
|
|
90
|
-
function ownKeys(object, enumerableOnly) {
|
|
91
|
-
var keys = Object.keys(object);
|
|
92
|
-
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
94
|
-
if (enumerableOnly) {
|
|
95
|
-
symbols = symbols.filter(function(sym) {
|
|
96
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
keys.push.apply(keys, symbols);
|
|
100
|
-
}
|
|
101
|
-
return keys;
|
|
102
|
-
}
|
|
103
|
-
function _object_spread_props(target, source) {
|
|
104
|
-
source = source != null ? source : {};
|
|
105
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
106
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
107
|
-
} else {
|
|
108
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
109
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return target;
|
|
113
|
-
}
|
|
114
|
-
const LazyIcon = ({ icon, root, width, height })=>{
|
|
115
|
-
const [isError, setError] = (0, _react.useState)(false);
|
|
116
|
-
const handleError = (isError)=>setError(isError);
|
|
117
|
-
if (isError) {
|
|
118
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Avatar, {
|
|
119
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
120
|
-
fontSize: 29,
|
|
121
|
-
fontWeight: 600,
|
|
122
|
-
children: (0, _fixefyuiutils.toInitials)(icon)
|
|
123
|
-
})
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_image.default, {
|
|
127
|
-
alt: icon,
|
|
128
|
-
width: width,
|
|
129
|
-
height: height,
|
|
130
|
-
loader: (obj)=>(0, _fixefyuiutils.imageLoader)(_object_spread_props(_object_spread({}, obj), {
|
|
131
|
-
root
|
|
132
|
-
})),
|
|
133
|
-
src: icon,
|
|
134
|
-
onLoad: ()=>handleError(false),
|
|
135
|
-
onError: ()=>handleError(true)
|
|
136
|
-
});
|
|
137
|
-
};
|
package/build/FxIcon/index.js
DELETED
|
@@ -1,20 +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
|
-
FxIcon: function() {
|
|
13
|
-
return _FxIcon.FxIcon;
|
|
14
|
-
},
|
|
15
|
-
IconPropsType: function() {
|
|
16
|
-
return _icon_types.IconPropsType;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _FxIcon = require("./FxIcon");
|
|
20
|
-
const _icon_types = require("./icon_types");
|
package/build/FxModal/FxModal.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "FxModal", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FxModal;
|
|
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 _modalstyle = require("./styles/modal.style");
|
|
15
|
-
function _define_property(obj, key, value) {
|
|
16
|
-
if (key in obj) {
|
|
17
|
-
Object.defineProperty(obj, key, {
|
|
18
|
-
value: value,
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
obj[key] = value;
|
|
25
|
-
}
|
|
26
|
-
return obj;
|
|
27
|
-
}
|
|
28
|
-
function _interop_require_default(obj) {
|
|
29
|
-
return obj && obj.__esModule ? obj : {
|
|
30
|
-
default: obj
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function _object_spread(target) {
|
|
34
|
-
for(var i = 1; i < arguments.length; i++){
|
|
35
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
36
|
-
var ownKeys = Object.keys(source);
|
|
37
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
38
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
39
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
ownKeys.forEach(function(key) {
|
|
43
|
-
_define_property(target, key, source[key]);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
return target;
|
|
47
|
-
}
|
|
48
|
-
function ownKeys(object, enumerableOnly) {
|
|
49
|
-
var keys = Object.keys(object);
|
|
50
|
-
if (Object.getOwnPropertySymbols) {
|
|
51
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
52
|
-
if (enumerableOnly) {
|
|
53
|
-
symbols = symbols.filter(function(sym) {
|
|
54
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
keys.push.apply(keys, symbols);
|
|
58
|
-
}
|
|
59
|
-
return keys;
|
|
60
|
-
}
|
|
61
|
-
function _object_spread_props(target, source) {
|
|
62
|
-
source = source != null ? source : {};
|
|
63
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
64
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
65
|
-
} else {
|
|
66
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
67
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return target;
|
|
71
|
-
}
|
|
72
|
-
function _object_without_properties(source, excluded) {
|
|
73
|
-
if (source == null) return {};
|
|
74
|
-
var target = _object_without_properties_loose(source, excluded);
|
|
75
|
-
var key, i;
|
|
76
|
-
if (Object.getOwnPropertySymbols) {
|
|
77
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
78
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
79
|
-
key = sourceSymbolKeys[i];
|
|
80
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
81
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
82
|
-
target[key] = source[key];
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return target;
|
|
86
|
-
}
|
|
87
|
-
function _object_without_properties_loose(source, excluded) {
|
|
88
|
-
if (source == null) return {};
|
|
89
|
-
var target = {};
|
|
90
|
-
var sourceKeys = Object.keys(source);
|
|
91
|
-
var key, i;
|
|
92
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
93
|
-
key = sourceKeys[i];
|
|
94
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
95
|
-
target[key] = source[key];
|
|
96
|
-
}
|
|
97
|
-
return target;
|
|
98
|
-
}
|
|
99
|
-
//////////////
|
|
100
|
-
const FxDialogTitle = (props)=>{
|
|
101
|
-
const { children } = props, other = _object_without_properties(props, [
|
|
102
|
-
"children"
|
|
103
|
-
]);
|
|
104
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_modalstyle.StyledDialogTitle, _object_spread_props(_object_spread({}, other), {
|
|
105
|
-
children: children
|
|
106
|
-
}));
|
|
107
|
-
};
|
|
108
|
-
const FxInlineDialogTitle = (props)=>{
|
|
109
|
-
const { children } = props, other = _object_without_properties(props, [
|
|
110
|
-
"children"
|
|
111
|
-
]);
|
|
112
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_modalstyle.StyledInlineDialogTitle, _object_spread_props(_object_spread({}, other), {
|
|
113
|
-
children: children
|
|
114
|
-
}));
|
|
115
|
-
};
|
|
116
|
-
const IconTitle = ({ icon, title, inline })=>{
|
|
117
|
-
const renderObject = inline ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
118
|
-
sx: {
|
|
119
|
-
display: 'flex',
|
|
120
|
-
alignItems: 'center'
|
|
121
|
-
},
|
|
122
|
-
children: [
|
|
123
|
-
icon,
|
|
124
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(FxInlineDialogTitle, {
|
|
125
|
-
id: "customized-dialog-title",
|
|
126
|
-
children: title
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
}) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
130
|
-
children: [
|
|
131
|
-
icon && icon,
|
|
132
|
-
title && /*#__PURE__*/ (0, _jsxruntime.jsx)(FxDialogTitle, {
|
|
133
|
-
id: "customized-dialog-title",
|
|
134
|
-
children: title
|
|
135
|
-
})
|
|
136
|
-
]
|
|
137
|
-
});
|
|
138
|
-
return renderObject;
|
|
139
|
-
};
|
|
140
|
-
const FxModal = (_param)=>{
|
|
141
|
-
var { isOpen = false, isIconTitleInline = false, icon, onClose, children, title, actions } = _param, rest = _object_without_properties(_param, [
|
|
142
|
-
"isOpen",
|
|
143
|
-
"isIconTitleInline",
|
|
144
|
-
"icon",
|
|
145
|
-
"onClose",
|
|
146
|
-
"children",
|
|
147
|
-
"title",
|
|
148
|
-
"actions"
|
|
149
|
-
]);
|
|
150
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
151
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_modalstyle.FxDialog, _object_spread_props(_object_spread({}, rest), {
|
|
152
|
-
fullWidth: true,
|
|
153
|
-
onClose: onClose,
|
|
154
|
-
"aria-labelledby": "customized-dialog-title",
|
|
155
|
-
open: isOpen,
|
|
156
|
-
children: [
|
|
157
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(IconTitle, {
|
|
158
|
-
icon: icon,
|
|
159
|
-
title: title,
|
|
160
|
-
inline: isIconTitleInline
|
|
161
|
-
}),
|
|
162
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.DialogContent, {
|
|
163
|
-
children: children
|
|
164
|
-
}),
|
|
165
|
-
actions && /*#__PURE__*/ (0, _jsxruntime.jsx)(_modalstyle.DialogActionsStyled, {
|
|
166
|
-
children: actions
|
|
167
|
-
})
|
|
168
|
-
]
|
|
169
|
-
}))
|
|
170
|
-
});
|
|
171
|
-
};
|
package/build/FxModal/index.js
DELETED
|
@@ -1,59 +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
|
-
DialogActionsStyled: function() {
|
|
13
|
-
return DialogActionsStyled;
|
|
14
|
-
},
|
|
15
|
-
FxDialog: function() {
|
|
16
|
-
return FxDialog;
|
|
17
|
-
},
|
|
18
|
-
StyledDialogTitle: function() {
|
|
19
|
-
return StyledDialogTitle;
|
|
20
|
-
},
|
|
21
|
-
StyledInlineDialogTitle: function() {
|
|
22
|
-
return StyledInlineDialogTitle;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
const _styles = require("@mui/material/styles");
|
|
26
|
-
const _material = require("@mui/material");
|
|
27
|
-
const FxDialog = (0, _styles.styled)(_material.Dialog)(()=>({
|
|
28
|
-
'& .MuiDialog-paper': {
|
|
29
|
-
borderRadius: 8,
|
|
30
|
-
padding: '24px',
|
|
31
|
-
// minWidth: "370px",
|
|
32
|
-
maxWidth: 'fit-content'
|
|
33
|
-
},
|
|
34
|
-
'& .MuiDialogContent-root': {
|
|
35
|
-
padding: 0
|
|
36
|
-
},
|
|
37
|
-
// "& .MuiDialogTitle-root": {
|
|
38
|
-
// margin: "8px 0",
|
|
39
|
-
// },
|
|
40
|
-
'& .MuiDialogActions-root': {
|
|
41
|
-
margin: '24px 0 0 0',
|
|
42
|
-
padding: 0
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
const StyledDialogTitle = (0, _styles.styled)(_material.DialogTitle)(()=>({
|
|
46
|
-
fontSize: 14,
|
|
47
|
-
fontWeight: 900,
|
|
48
|
-
margin: '8px 0'
|
|
49
|
-
}));
|
|
50
|
-
const StyledInlineDialogTitle = (0, _styles.styled)(_material.DialogTitle)(()=>({
|
|
51
|
-
fontSize: 19,
|
|
52
|
-
fontWeight: 600,
|
|
53
|
-
color: '#568793',
|
|
54
|
-
margin: '8px 16px',
|
|
55
|
-
padding: 0
|
|
56
|
-
}));
|
|
57
|
-
const DialogActionsStyled = (0, _styles.styled)(_material.DialogActions)(({})=>({
|
|
58
|
-
justifyContent: 'flex-start'
|
|
59
|
-
}));
|
package/build/FxNotes/FxNotes.js
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "FxNotes", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FxNotes;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
|
-
const _notesstyles = require("./styles/notes.styles");
|
|
14
|
-
const _queries = require("./operations/queries");
|
|
15
|
-
const _client = require("@apollo/client");
|
|
16
|
-
const _stringToColor = require("./helpers/stringToColor");
|
|
17
|
-
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
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 ownKeys(object, enumerableOnly) {
|
|
88
|
-
var keys = Object.keys(object);
|
|
89
|
-
if (Object.getOwnPropertySymbols) {
|
|
90
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
91
|
-
if (enumerableOnly) {
|
|
92
|
-
symbols = symbols.filter(function(sym) {
|
|
93
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
keys.push.apply(keys, symbols);
|
|
97
|
-
}
|
|
98
|
-
return keys;
|
|
99
|
-
}
|
|
100
|
-
function _object_spread_props(target, source) {
|
|
101
|
-
source = source != null ? source : {};
|
|
102
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
103
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
104
|
-
} else {
|
|
105
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
106
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return target;
|
|
110
|
-
}
|
|
111
|
-
const FxNotes = ({ notes, onChange, onSend })=>{
|
|
112
|
-
const [comment, setComment] = (0, _react.useState)('');
|
|
113
|
-
const [backgroundcolors, setBackgroundColors] = (0, _react.useState)({});
|
|
114
|
-
// const [anchorEl] = React.useState<HTMLButtonElement | null>(null)
|
|
115
|
-
const inputRef = (0, _react.useRef)();
|
|
116
|
-
const { data } = (0, _client.useQuery)(_queries.ME);
|
|
117
|
-
const { me } = data;
|
|
118
|
-
// const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
119
|
-
// setAnchorEl(event.currentTarget)
|
|
120
|
-
// }
|
|
121
|
-
// const handleClose = () => {
|
|
122
|
-
// setAnchorEl(null)
|
|
123
|
-
// }
|
|
124
|
-
const handleEnterKeyPressed = ()=>{
|
|
125
|
-
setComment((prevState)=>{
|
|
126
|
-
if (prevState) {
|
|
127
|
-
onSend && onSend({
|
|
128
|
-
created_at: new Date().getTime(),
|
|
129
|
-
created_by: me.username,
|
|
130
|
-
text: prevState
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
return '';
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
(0, _react.useEffect)(()=>{
|
|
137
|
-
onChange && onChange(comment);
|
|
138
|
-
}, [
|
|
139
|
-
comment
|
|
140
|
-
]);
|
|
141
|
-
(0, _react.useEffect)(()=>{
|
|
142
|
-
if (inputRef.current) {
|
|
143
|
-
inputRef.current.addEventListener('keyup', (event)=>{
|
|
144
|
-
if (event.keyCode === 13) {
|
|
145
|
-
event.preventDefault();
|
|
146
|
-
handleEnterKeyPressed();
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return inputRef && inputRef.current && inputRef.current.removeEventListener('keyup', handleEnterKeyPressed);
|
|
151
|
-
}, []);
|
|
152
|
-
// const open = Boolean(anchorEl)
|
|
153
|
-
// const id = open ? 'simple-popover' : undefined
|
|
154
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_notesstyles.CommentsContainer, {
|
|
155
|
-
children: [
|
|
156
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_notesstyles.CommentWrapper, {
|
|
157
|
-
children: [
|
|
158
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.StyledAvatar, {
|
|
159
|
-
sx: {
|
|
160
|
-
backgroundColor: backgroundcolors[me.username] ? backgroundcolors[me.username] : (0, _stringToColor.stringToColor)(me.username, (color)=>{
|
|
161
|
-
setBackgroundColors(_object_spread_props(_object_spread({}, backgroundcolors), {
|
|
162
|
-
[me.username]: color
|
|
163
|
-
}));
|
|
164
|
-
})
|
|
165
|
-
},
|
|
166
|
-
src: me && me.image_url,
|
|
167
|
-
children: me && (0, _fixefyuiutils.titleCase)(me.username.slice(0, 1))
|
|
168
|
-
}),
|
|
169
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.CommentInput, {
|
|
170
|
-
type: "text",
|
|
171
|
-
value: comment,
|
|
172
|
-
ref: inputRef,
|
|
173
|
-
onChange: (e)=>{
|
|
174
|
-
setComment(e.currentTarget.value);
|
|
175
|
-
}
|
|
176
|
-
})
|
|
177
|
-
]
|
|
178
|
-
}),
|
|
179
|
-
notes && notes.length ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.CommentsWrapper, {
|
|
180
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.CommentsScrollWrapper, {
|
|
181
|
-
children: notes.slice().reverse().map((comment, index)=>{
|
|
182
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_notesstyles.UserCommentWrapper, {
|
|
183
|
-
children: [
|
|
184
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.StyledAvatar, {
|
|
185
|
-
sx: {
|
|
186
|
-
backgroundColor: backgroundcolors[comment.created_by] ? backgroundcolors[comment.created_by] : (0, _stringToColor.stringToColor)(comment.created_by, (color)=>{
|
|
187
|
-
setBackgroundColors(_object_spread_props(_object_spread({}, backgroundcolors), {
|
|
188
|
-
[comment.created_by]: color
|
|
189
|
-
}));
|
|
190
|
-
})
|
|
191
|
-
},
|
|
192
|
-
children: (0, _fixefyuiutils.titleCase)(comment.created_by.slice(0, 1))
|
|
193
|
-
}),
|
|
194
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_notesstyles.UserComment, {
|
|
195
|
-
children: [
|
|
196
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.CommentUserTitle, {
|
|
197
|
-
children: comment.created_by
|
|
198
|
-
}),
|
|
199
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.CommentDate, {
|
|
200
|
-
children: (0, _fixefyuiutils.normalizeTimestamp)(comment.created_at, {
|
|
201
|
-
dateOnly: true
|
|
202
|
-
})
|
|
203
|
-
}),
|
|
204
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_notesstyles.CommentDesc, {
|
|
205
|
-
children: comment.text
|
|
206
|
-
})
|
|
207
|
-
]
|
|
208
|
-
})
|
|
209
|
-
]
|
|
210
|
-
}, index);
|
|
211
|
-
})
|
|
212
|
-
})
|
|
213
|
-
}) : null
|
|
214
|
-
]
|
|
215
|
-
});
|
|
216
|
-
};
|
|
@@ -1,26 +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
|
-
if (!string) {
|
|
15
|
-
return '#000';
|
|
16
|
-
}
|
|
17
|
-
/* eslint-disable no-bitwise */ for(let i = 0; i < string.length; i += 1){
|
|
18
|
-
hash = string.charCodeAt(i) + ((hash << 5) - hash);
|
|
19
|
-
}
|
|
20
|
-
for(let i = 0; i < 3; i += 1){
|
|
21
|
-
const value = hash >> i * 8 & 0xff;
|
|
22
|
-
color += `00${value.toString(16)}`.substr(-2);
|
|
23
|
-
}
|
|
24
|
-
/* eslint-enable no-bitwise */ callBack && callBack(color);
|
|
25
|
-
return color;
|
|
26
|
-
};
|