@dexteel/mesf-core 4.19.0 → 4.20.1
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +26 -0
- package/dist/controls/filters/TreePickerControlV2.d.ts +1 -0
- package/dist/controls/shift-navigator/hook/useShiftNavigator.d.ts +6 -6
- package/dist/index.esm.js +22 -14
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [4.20.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.20.0...@dexteel/mesf-core-v4.20.1) (2024-09-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **TreePickerControlV2:** add disabled property ([95b14dc](https://github.com/dexteel/mesf-core-frontend/commit/95b14dc13f812449dc936e117417e1edfe7523d8))
|
|
9
|
+
|
|
10
|
+
## [4.20.0] - 2024-09-04
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Changelog
|
|
15
|
+
|
|
16
|
+
## [4.20.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.19.0...@dexteel/mesf-core-v4.20.0) (2024-09-04)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **Shift Navigator:** Return shift in methods of hook ([52aece5](https://github.com/dexteel/mesf-core-frontend/commit/52aece5e9c9ad67e7cdf078792aa1024af1861a4))
|
|
22
|
+
|
|
23
|
+
## [4.19.0] - 2024-08-12
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
1
27
|
# Changelog
|
|
2
28
|
|
|
3
29
|
## [4.19.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v4.18.1...@dexteel/mesf-core-v4.19.0) (2024-08-12)
|
|
@@ -2,13 +2,13 @@ import { ShiftNavigatorDirection } from "../component/shift-navigator.control";
|
|
|
2
2
|
import { ShiftInfo } from "../models/shift-navigator.model";
|
|
3
3
|
export declare const useShiftNavigatorManager: () => {
|
|
4
4
|
shiftInfo: ShiftInfo | null;
|
|
5
|
-
moveShift: (direction: ShiftNavigatorDirection) => Promise<void>;
|
|
6
|
-
getShiftDataFromAPI: (productionDate: Date | null, shiftId: number) => Promise<void>;
|
|
7
|
-
initShiftNavigator: () => Promise<void>;
|
|
5
|
+
moveShift: (direction: ShiftNavigatorDirection) => Promise<ShiftInfo | void>;
|
|
6
|
+
getShiftDataFromAPI: (productionDate: Date | null, shiftId: number) => Promise<ShiftInfo | void>;
|
|
7
|
+
initShiftNavigator: () => Promise<ShiftInfo | void>;
|
|
8
8
|
};
|
|
9
9
|
export type ShiftNavigatorManagerResult = {
|
|
10
10
|
shiftInfo: ShiftInfo | null;
|
|
11
|
-
moveShift: (direction: ShiftNavigatorDirection) => Promise<void>;
|
|
12
|
-
getShiftDataFromAPI: (productionDate: Date | null, shiftId: number) => Promise<void>;
|
|
13
|
-
initShiftNavigator: () => Promise<void>;
|
|
11
|
+
moveShift: (direction: ShiftNavigatorDirection) => Promise<ShiftInfo | void>;
|
|
12
|
+
getShiftDataFromAPI: (productionDate: Date | null, shiftId: number) => Promise<ShiftInfo | void>;
|
|
13
|
+
initShiftNavigator: () => Promise<ShiftInfo | void>;
|
|
14
14
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -88,7 +88,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
88
88
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
89
89
|
PERFORMANCE OF THIS SOFTWARE.
|
|
90
90
|
***************************************************************************** */
|
|
91
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
91
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
92
92
|
|
|
93
93
|
var extendStatics = function(d, b) {
|
|
94
94
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -139,8 +139,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
function __generator(thisArg, body) {
|
|
142
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
143
|
-
return g =
|
|
142
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
143
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
144
144
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
145
145
|
function step(op) {
|
|
146
146
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -703,10 +703,12 @@ function findNameById(node, id) {
|
|
|
703
703
|
}
|
|
704
704
|
var TreePickerControlV2 = function (props) {
|
|
705
705
|
var classes = useStyles$u();
|
|
706
|
-
var value = props.value, onSelect = props.onSelect; props.styleLabel; var dataSource = props.dataSource; props.getOptionName; var _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, _d = props.showClearButton, showClearButton = _d === void 0 ? false : _d, showAssetTree = props.showAssetTree, onHide = props.onHide, _e = props.listAssetDrawings, listAssetDrawings = _e === void 0 ? [] : _e, onSuccess = props.onSuccess, isLoading = props.isLoading, other = __rest(props, ["value", "onSelect", "styleLabel", "dataSource", "getOptionName", "inputTitle", "showPath", "multipleSelectNodes", "showClearButton", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading"]);
|
|
707
|
-
var
|
|
706
|
+
var value = props.value, onSelect = props.onSelect; props.styleLabel; var dataSource = props.dataSource; props.getOptionName; var _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, _d = props.showClearButton, showClearButton = _d === void 0 ? false : _d, showAssetTree = props.showAssetTree, onHide = props.onHide, _e = props.listAssetDrawings, listAssetDrawings = _e === void 0 ? [] : _e, onSuccess = props.onSuccess, isLoading = props.isLoading, _f = props.disabled, disabled = _f === void 0 ? false : _f, other = __rest(props, ["value", "onSelect", "styleLabel", "dataSource", "getOptionName", "inputTitle", "showPath", "multipleSelectNodes", "showClearButton", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading", "disabled"]);
|
|
707
|
+
var _g = useState(false), open = _g[0], setOpen = _g[1];
|
|
708
708
|
var handleClickListItem = function (event) {
|
|
709
709
|
event.stopPropagation();
|
|
710
|
+
if (disabled)
|
|
711
|
+
return;
|
|
710
712
|
setOpen(true);
|
|
711
713
|
};
|
|
712
714
|
var handleClose = function (newValue, newDescription, findNode) {
|
|
@@ -7890,7 +7892,7 @@ var useShiftNavigatorManager = function () {
|
|
|
7890
7892
|
var _b = useState(false); _b[0]; var setIsShiftInfoLoading = _b[1];
|
|
7891
7893
|
var _c = useState(""); _c[0]; var setError = _c[1];
|
|
7892
7894
|
var moveShift = function (direction) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7893
|
-
var shiftId, resp;
|
|
7895
|
+
var shiftId, resp, shift;
|
|
7894
7896
|
return __generator(this, function (_a) {
|
|
7895
7897
|
switch (_a.label) {
|
|
7896
7898
|
case 0:
|
|
@@ -7916,11 +7918,13 @@ var useShiftNavigatorManager = function () {
|
|
|
7916
7918
|
case 1:
|
|
7917
7919
|
resp = _a.sent();
|
|
7918
7920
|
if (resp.ok) {
|
|
7919
|
-
|
|
7921
|
+
shift = __assign(__assign({}, resp.data), { CurrentProductionDate: moment$1
|
|
7920
7922
|
.utc(resp.data.CurrentProductionDate)
|
|
7921
7923
|
.toDate(), CurrentStart: moment$1.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$1.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$1
|
|
7922
7924
|
.utc(resp.data.PreviousProductionDate)
|
|
7923
|
-
.toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() })
|
|
7925
|
+
.toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() });
|
|
7926
|
+
setShiftInfo(shift);
|
|
7927
|
+
return [2 /*return*/, shift];
|
|
7924
7928
|
}
|
|
7925
7929
|
_a.label = 2;
|
|
7926
7930
|
case 2: return [2 /*return*/];
|
|
@@ -7928,7 +7932,7 @@ var useShiftNavigatorManager = function () {
|
|
|
7928
7932
|
});
|
|
7929
7933
|
}); };
|
|
7930
7934
|
var getShiftDataFromAPI = function (productionDate, shiftId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7931
|
-
var resp, e_1;
|
|
7935
|
+
var resp, shift, e_1;
|
|
7932
7936
|
return __generator(this, function (_a) {
|
|
7933
7937
|
switch (_a.label) {
|
|
7934
7938
|
case 0:
|
|
@@ -7943,11 +7947,13 @@ var useShiftNavigatorManager = function () {
|
|
|
7943
7947
|
case 2:
|
|
7944
7948
|
resp = _a.sent();
|
|
7945
7949
|
if (resp.ok) {
|
|
7946
|
-
|
|
7950
|
+
shift = __assign(__assign({}, resp.data), { CurrentProductionDate: moment$1
|
|
7947
7951
|
.utc(resp.data.CurrentProductionDate)
|
|
7948
7952
|
.toDate(), CurrentStart: moment$1.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$1.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$1
|
|
7949
7953
|
.utc(resp.data.PreviousProductionDate)
|
|
7950
|
-
.toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() })
|
|
7954
|
+
.toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() });
|
|
7955
|
+
setShiftInfo(shift);
|
|
7956
|
+
return [2 /*return*/, shift];
|
|
7951
7957
|
}
|
|
7952
7958
|
return [3 /*break*/, 4];
|
|
7953
7959
|
case 3:
|
|
@@ -7961,7 +7967,7 @@ var useShiftNavigatorManager = function () {
|
|
|
7961
7967
|
});
|
|
7962
7968
|
}); };
|
|
7963
7969
|
var initShiftNavigator = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
7964
|
-
var resp;
|
|
7970
|
+
var resp, shift;
|
|
7965
7971
|
return __generator(this, function (_a) {
|
|
7966
7972
|
switch (_a.label) {
|
|
7967
7973
|
case 0: return [4 /*yield*/, getShiftByParameters({
|
|
@@ -7971,11 +7977,13 @@ var useShiftNavigatorManager = function () {
|
|
|
7971
7977
|
case 1:
|
|
7972
7978
|
resp = _a.sent();
|
|
7973
7979
|
if (resp.ok) {
|
|
7974
|
-
|
|
7980
|
+
shift = __assign(__assign({}, resp.data), { CurrentProductionDate: moment$1
|
|
7975
7981
|
.utc(resp.data.CurrentProductionDate)
|
|
7976
7982
|
.toDate(), CurrentStart: moment$1.utc(resp.data.CurrentStart).toDate(), CurrentEnd: moment$1.utc(resp.data.CurrentEnd).toDate(), PreviousProductionDate: moment$1
|
|
7977
7983
|
.utc(resp.data.PreviousProductionDate)
|
|
7978
|
-
.toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() })
|
|
7984
|
+
.toDate(), PreviousStart: moment$1.utc(resp.data.PreviousStart).toDate(), PreviousEnd: moment$1.utc(resp.data.PreviousEnd).toDate(), LastProductionDate: moment$1.utc(resp.data.LastProductionDate).toDate(), LastStart: moment$1.utc(resp.data.LastStart).toDate(), LastEnd: moment$1.utc(resp.data.LastEnd).toDate() });
|
|
7985
|
+
setShiftInfo(shift);
|
|
7986
|
+
return [2 /*return*/, shift];
|
|
7979
7987
|
}
|
|
7980
7988
|
return [2 /*return*/];
|
|
7981
7989
|
}
|