@dexteel/mesf-core 3.2.5 → 3.3.0
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/controls/filters/filters.d.ts +0 -26
- package/dist/index.esm.js +1 -96
- package/package.json +4 -7
|
@@ -4,32 +4,6 @@ declare type TreePickerControlProps = {
|
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
};
|
|
6
6
|
export declare const TreePickerControl: (props: TreePickerControlProps) => JSX.Element;
|
|
7
|
-
interface DateControlProps {
|
|
8
|
-
value?: any;
|
|
9
|
-
onChange?: any;
|
|
10
|
-
title?: string;
|
|
11
|
-
styleGeneral?: any;
|
|
12
|
-
styleLabel?: any;
|
|
13
|
-
}
|
|
14
|
-
export declare function DateControl({ value, onChange, title, styleGeneral, styleLabel }: DateControlProps): JSX.Element;
|
|
15
|
-
export declare const DateTimeControl: (props: any) => JSX.Element;
|
|
16
|
-
export declare const SimpleTimeControl: (props: any) => JSX.Element;
|
|
17
|
-
interface SimpleInputSearchControlProps {
|
|
18
|
-
title?: string;
|
|
19
|
-
onChange?: any;
|
|
20
|
-
styleLabel?: any;
|
|
21
|
-
isNumeric?: boolean;
|
|
22
|
-
readOnly?: boolean;
|
|
23
|
-
value?: any;
|
|
24
|
-
name?: any;
|
|
25
|
-
styleTextBox?: any;
|
|
26
|
-
onKeyDown?: any;
|
|
27
|
-
lengthCharacters?: any;
|
|
28
|
-
}
|
|
29
|
-
export declare function SimpleInputSearchControl({ title, styleLabel, isNumeric, readOnly, value, onChange, name, styleTextBox, onKeyDown, lengthCharacters }: SimpleInputSearchControlProps): JSX.Element;
|
|
30
|
-
export declare class TimeControl extends Component<any> {
|
|
31
|
-
render(): JSX.Element;
|
|
32
|
-
}
|
|
33
7
|
export declare class SimpleTextControl extends Component<any> {
|
|
34
8
|
render(): JSX.Element;
|
|
35
9
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -41,7 +41,6 @@ import EditIcon from '@material-ui/icons/Edit';
|
|
|
41
41
|
import { Outlet, useNavigate, useSearchParams, Link, useParams, Navigate, Routes, Route, BrowserRouter } from 'react-router-dom';
|
|
42
42
|
import PropTypes from 'prop-types';
|
|
43
43
|
import { ResponsiveBar } from '@nivo/bar';
|
|
44
|
-
import DatePicker from 'react-datepicker';
|
|
45
44
|
import TreeView from '@material-ui/lab/TreeView';
|
|
46
45
|
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
47
46
|
import TreeItem from '@material-ui/lab/TreeItem';
|
|
@@ -4549,100 +4548,6 @@ var TreePickerControl = function (props) {
|
|
|
4549
4548
|
paper: classes.paper
|
|
4550
4549
|
}, id: "modal-treeview-filter", title: props.title, keepMounted: true, open: open, onClose: handleClose, value: value, data: dataSource }, other))));
|
|
4551
4550
|
};
|
|
4552
|
-
function DateControl(_a) {
|
|
4553
|
-
var value = _a.value, onChange = _a.onChange, title = _a.title, styleGeneral = _a.styleGeneral, styleLabel = _a.styleLabel;
|
|
4554
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
4555
|
-
React__default.createElement("div", { className: "input-group row", style: (styleGeneral || {}) },
|
|
4556
|
-
React__default.createElement("div", { className: "input-group-prepend col-sm-3" },
|
|
4557
|
-
React__default.createElement("span", { className: "input-group-text", style: (styleLabel || {}) }, title)),
|
|
4558
|
-
React__default.createElement("div", { className: "col-sm-9" },
|
|
4559
|
-
React__default.createElement(DatePicker, { className: "form-control mes-filter-datepicker", selected: value, onChange: function (date) { return onChange(date); } })))));
|
|
4560
|
-
}
|
|
4561
|
-
var DateTimeControl = function (props) {
|
|
4562
|
-
var value = props.value, title = props.title, styleLabel = props.styleLabel, readOnly = props.readOnly, styleTextTimeBox = props.styleTextTimeBox, onChange = props.onChange, name = props.name;
|
|
4563
|
-
var formatTime = function () {
|
|
4564
|
-
var date = moment(value);
|
|
4565
|
-
if (!date.isValid())
|
|
4566
|
-
return '';
|
|
4567
|
-
return date.format('HH:mm:ss');
|
|
4568
|
-
};
|
|
4569
|
-
var _a = React__default.useState(formatTime()), formattedTimeValue = _a[0], setFormattedTimeValue = _a[1];
|
|
4570
|
-
var changeDate = function (e) {
|
|
4571
|
-
setFormattedTimeValue(e.target.value);
|
|
4572
|
-
};
|
|
4573
|
-
var blurDate = function (e) {
|
|
4574
|
-
var date = moment(e.target.value, 'hh:mm:ss');
|
|
4575
|
-
if (date.isValid() && moment(value).isValid()) {
|
|
4576
|
-
var newDate = (moment(value)).set('hour', date.hour()).set('minute', date.minute()).set('second', date.second());
|
|
4577
|
-
onChange(newDate.toDate(), name || '');
|
|
4578
|
-
}
|
|
4579
|
-
else {
|
|
4580
|
-
setFormattedTimeValue(formatTime());
|
|
4581
|
-
}
|
|
4582
|
-
};
|
|
4583
|
-
React__default.useEffect(function () {
|
|
4584
|
-
setFormattedTimeValue(formatTime());
|
|
4585
|
-
}, [value]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
4586
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
4587
|
-
React__default.createElement("div", { className: "input-group" },
|
|
4588
|
-
React__default.createElement("div", { className: "input-group-prepend" },
|
|
4589
|
-
React__default.createElement("span", { className: "input-group-text", style: (styleLabel || {}) }, title)),
|
|
4590
|
-
React__default.createElement(DatePicker, { className: "form-control mes-filter-datepicker mes-not-rounded", selected: value, onChange: function (date) { return onChange(date, name || ''); }, readOnly: readOnly || false }),
|
|
4591
|
-
React__default.createElement("input", { type: "text", className: "form-control input-group-append mes-filter-datetimepicker", placeholder: "time", value: formattedTimeValue || '', readOnly: readOnly || false, style: styleTextTimeBox || {}, onBlur: function (e) { return blurDate(e); }, onChange: function (e) { return changeDate(e); } }))));
|
|
4592
|
-
};
|
|
4593
|
-
var SimpleTimeControl = function (props) {
|
|
4594
|
-
var value = props.value, title = props.title, styleLabel = props.styleLabel, readOnly = props.readOnly, styleTextBox = props.styleTextBox, onChange = props.onChange, name = props.name;
|
|
4595
|
-
var formatDate = function () {
|
|
4596
|
-
var date = moment(value);
|
|
4597
|
-
if (!date.isValid())
|
|
4598
|
-
return 'INVALID TIME';
|
|
4599
|
-
return date.format('HH:mm:ss');
|
|
4600
|
-
};
|
|
4601
|
-
var _a = React__default.useState(formatDate()), formattedValue = _a[0], setFormattedValue = _a[1];
|
|
4602
|
-
React__default.useEffect(function () {
|
|
4603
|
-
setFormattedValue(formatDate());
|
|
4604
|
-
}, [value]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
4605
|
-
var blurDate = function (e) {
|
|
4606
|
-
var date = moment(e.target.value, 'hh:mm:ss');
|
|
4607
|
-
if (date.isValid() && moment(value).isValid()) {
|
|
4608
|
-
var newDate = (moment(value)).set('hour', date.hour()).set('minute', date.minute()).set('second', date.second());
|
|
4609
|
-
onChange(newDate.toDate(), name || '');
|
|
4610
|
-
}
|
|
4611
|
-
else {
|
|
4612
|
-
setFormattedValue(formatDate());
|
|
4613
|
-
}
|
|
4614
|
-
};
|
|
4615
|
-
var changeDate = function (e) {
|
|
4616
|
-
setFormattedValue(e.target.value);
|
|
4617
|
-
};
|
|
4618
|
-
return (React__default.createElement("div", { className: "input-group" },
|
|
4619
|
-
React__default.createElement("div", { className: "input-group-prepend" },
|
|
4620
|
-
React__default.createElement("span", { className: "input-group-text", style: (styleLabel || {}) }, title)),
|
|
4621
|
-
React__default.createElement("input", { type: "text", className: "form-control", placeholder: title, readOnly: readOnly || false, value: formattedValue || '', onBlur: function (e) { return blurDate(e); }, onChange: function (e) { return changeDate(e); }, style: styleTextBox || {} })));
|
|
4622
|
-
};
|
|
4623
|
-
function SimpleInputSearchControl(_a) {
|
|
4624
|
-
var title = _a.title, styleLabel = _a.styleLabel, isNumeric = _a.isNumeric, readOnly = _a.readOnly, value = _a.value, onChange = _a.onChange, name = _a.name, styleTextBox = _a.styleTextBox, onKeyDown = _a.onKeyDown, lengthCharacters = _a.lengthCharacters;
|
|
4625
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
4626
|
-
React__default.createElement("div", { className: "input-group" },
|
|
4627
|
-
React__default.createElement("div", { className: "input-group-prepend" },
|
|
4628
|
-
React__default.createElement("span", { className: "input-group-text", style: (styleLabel || {}) }, title)),
|
|
4629
|
-
React__default.createElement("input", { type: "text", className: "form-control " + (isNumeric ? 'mes-numeric' : ''), placeholder: title, readOnly: readOnly, value: value || '', onChange: function (e) { return onChange(e.target.value, name || ''); }, style: (styleTextBox || {}), onKeyDown: function (e) { return onKeyDown(e); }, maxLength: lengthCharacters || '' }))));
|
|
4630
|
-
}
|
|
4631
|
-
var TimeControl = /** @class */ (function (_super) {
|
|
4632
|
-
__extends(TimeControl, _super);
|
|
4633
|
-
function TimeControl() {
|
|
4634
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4635
|
-
}
|
|
4636
|
-
TimeControl.prototype.render = function () {
|
|
4637
|
-
var _this = this;
|
|
4638
|
-
return (React__default.createElement(React__default.Fragment, null,
|
|
4639
|
-
React__default.createElement("div", { className: "input-group" },
|
|
4640
|
-
React__default.createElement("div", { className: "input-group-prepend" },
|
|
4641
|
-
React__default.createElement("span", { className: "input-group-text", style: (this.props.styleLabel || {}) }, this.props.title)),
|
|
4642
|
-
React__default.createElement(DatePicker, { className: "form-control mes-filter-datepicker", selected: this.props.value, onChange: function (date) { return _this.props.onChange(date, _this.props.name || ''); }, showTimeSelect: this.props.showSelector || false, showTimeSelectOnly: true, timeIntervals: 15, timeCaption: "Time", dateFormat: "HH:mm:ss", timeFormat: "HH:mm", readOnly: this.props.readOnly || false }))));
|
|
4643
|
-
};
|
|
4644
|
-
return TimeControl;
|
|
4645
|
-
}(Component));
|
|
4646
4551
|
var SimpleTextControl = /** @class */ (function (_super) {
|
|
4647
4552
|
__extends(SimpleTextControl, _super);
|
|
4648
4553
|
function SimpleTextControl() {
|
|
@@ -5675,4 +5580,4 @@ function MESFMain(props) {
|
|
|
5675
5580
|
React__default.createElement(Navigation, null)))))));
|
|
5676
5581
|
}
|
|
5677
5582
|
|
|
5678
|
-
export { Account, AuthContext, AuthProvider, BarChartControl, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, CurrencyFormatter, DataGridControl,
|
|
5583
|
+
export { Account, AuthContext, AuthProvider, BarChartControl, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HorizontalTextControl, IntegerFormatter, Login, Logout, LongFilterPanel, MESApiService, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, NumericTextControl, SimplePasswordControl, SimpleSelectorControl, SimpleTextAreaControl, SimpleTextControl, TimeFormatter, TreePickerControl, USER_LABELS, UploadFileControl, formatNumber, getCrewStyle, getShiftStyle, useToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexteel/mesf-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"author": "Dexteel Team",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -32,14 +32,12 @@
|
|
|
32
32
|
"@types/lodash-es": "^4.17.6",
|
|
33
33
|
"@types/node": "^12.20.46",
|
|
34
34
|
"@types/react": "^17.0.39",
|
|
35
|
-
"@types/react-datepicker": "^4.3.4",
|
|
36
35
|
"autoprefixer": "^10.4.2",
|
|
37
36
|
"bootstrap": "^4.6.1",
|
|
38
37
|
"moment": "^2.29.3",
|
|
39
38
|
"prop-types": "^15.8.1",
|
|
40
39
|
"react": "^17.0.2",
|
|
41
40
|
"react-bootstrap": "^1.6.4",
|
|
42
|
-
"react-datepicker": "^4.6.0",
|
|
43
41
|
"react-dom": "^17.0.2",
|
|
44
42
|
"react-hook-form": "^7.20.2",
|
|
45
43
|
"react-router-dom": "^6.2.1",
|
|
@@ -69,7 +67,6 @@
|
|
|
69
67
|
"prop-types": "^15.8.1",
|
|
70
68
|
"react": "^17.0.2",
|
|
71
69
|
"react-bootstrap": "^1.6.4",
|
|
72
|
-
"react-datepicker": "^4.6.0",
|
|
73
70
|
"react-dom": "^17.0.2",
|
|
74
71
|
"react-router-dom": "^6.2.1",
|
|
75
72
|
"react-spring": "^9.4.3",
|
|
@@ -92,10 +89,10 @@
|
|
|
92
89
|
"dependencies": {
|
|
93
90
|
"@azure/msal-browser": "^2.18.0",
|
|
94
91
|
"@azure/msal-react": "^1.1.0",
|
|
95
|
-
"@date-io/moment": "^
|
|
92
|
+
"@date-io/moment": "^1.3.13",
|
|
96
93
|
"lodash-es": "^4.17.21",
|
|
97
|
-
"
|
|
98
|
-
"
|
|
94
|
+
"string-to-color": "^2.2.2",
|
|
95
|
+
"tsc": "^2.0.3"
|
|
99
96
|
},
|
|
100
97
|
"repository": {
|
|
101
98
|
"type": "git",
|