ywana-core8 0.0.823 → 0.0.825
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/index.cjs +20 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +21 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +20 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +5 -1
- package/src/widgets/planner/Planner.js +16 -9
package/dist/index.cjs
CHANGED
@@ -3433,11 +3433,15 @@ var Planner = function Planner(_ref) {
|
|
3433
3433
|
setTo = _useState3[1];
|
3434
3434
|
|
3435
3435
|
var thisMondayElement = React.useRef(null);
|
3436
|
-
React.
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3440
|
-
|
3436
|
+
var gotoMonday = React.useCallback(function (node) {
|
3437
|
+
var element = node;
|
3438
|
+
console.log("goto monday", element);
|
3439
|
+
if (element) element.scrollIntoView({
|
3440
|
+
behavior: 'smooth',
|
3441
|
+
block: 'start',
|
3442
|
+
inline: 'start'
|
3443
|
+
});
|
3444
|
+
}, []);
|
3441
3445
|
React.useEffect(function () {
|
3442
3446
|
var element = document.getElementById(focusEvent);
|
3443
3447
|
if (element) element.scrollIntoView({
|
@@ -3479,6 +3483,7 @@ var Planner = function Planner(_ref) {
|
|
3479
3483
|
function showThisWeek() {
|
3480
3484
|
var element = thisMondayElement.current; //const element = document.querySelector(".thisMonday")
|
3481
3485
|
|
3486
|
+
console.log("Show this week", element);
|
3482
3487
|
if (element) element.scrollIntoView({
|
3483
3488
|
behavior: 'smooth',
|
3484
3489
|
block: 'start',
|
@@ -3581,10 +3586,12 @@ var Planner = function Planner(_ref) {
|
|
3581
3586
|
var isThisMonday = date.moment.isSame(weekStart);
|
3582
3587
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
3583
3588
|
key: "column-" + date.moment.dayOfYear(),
|
3589
|
+
id: isThisMonday ? "thisMonday" : "",
|
3584
3590
|
className: "column-header",
|
3585
3591
|
ref: isThisMonday ? thisMondayElement : null
|
3586
3592
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
3587
|
-
className: "date-header " + weekend + " " + thisWeek
|
3593
|
+
className: "date-header " + weekend + " " + thisWeek,
|
3594
|
+
ref: isThisMonday ? gotoMonday : null
|
3588
3595
|
}, /*#__PURE__*/React__default["default"].createElement(Text, {
|
3589
3596
|
use: "headline6"
|
3590
3597
|
}, date.moment.format("DD")), "\xA0", /*#__PURE__*/React__default["default"].createElement(Text, {
|
@@ -7472,8 +7479,13 @@ var CollectionContext$1 = function CollectionContext(url, field, host, page, fet
|
|
7472
7479
|
|
7473
7480
|
var _temp12 = _catch$4(function () {
|
7474
7481
|
if (versioning) form.version = 1;
|
7475
|
-
return Promise.resolve(API.create(form)).then(function () {
|
7476
|
-
return Promise.resolve(_this8.load()).then(function () {
|
7482
|
+
return Promise.resolve(API.create(form)).then(function (response) {
|
7483
|
+
return Promise.resolve(_this8.load()).then(function () {
|
7484
|
+
if (response) {
|
7485
|
+
var id = response.id;
|
7486
|
+
if (id) _this8.select(id);
|
7487
|
+
}
|
7488
|
+
});
|
7477
7489
|
});
|
7478
7490
|
}, function (error) {
|
7479
7491
|
console.log(error);
|