ywana-core8 0.0.668 → 0.0.670
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 +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +18 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +18 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +6 -4
- package/src/site/site.js +4 -3
package/dist/index.umd.js
CHANGED
@@ -3639,7 +3639,10 @@
|
|
3639
3639
|
var title = _ref2.title,
|
3640
3640
|
body = _ref2.body,
|
3641
3641
|
_ref2$type = _ref2.type,
|
3642
|
-
type = _ref2$type === void 0 ? "success" : _ref2$type
|
3642
|
+
type = _ref2$type === void 0 ? "success" : _ref2$type,
|
3643
|
+
_ref2$duration = _ref2.duration,
|
3644
|
+
duration = _ref2$duration === void 0 ? 3000 : _ref2$duration,
|
3645
|
+
onRemoval = _ref2.onRemoval;
|
3643
3646
|
reactNotificationsComponent.Store.addNotification({
|
3644
3647
|
title: title,
|
3645
3648
|
message: body,
|
@@ -3649,9 +3652,10 @@
|
|
3649
3652
|
animationIn: ["animate__animated", "animate__fadeIn"],
|
3650
3653
|
animationOut: ["animate__animated", "animate__fadeOut"],
|
3651
3654
|
dismiss: {
|
3652
|
-
duration:
|
3655
|
+
duration: duration,
|
3653
3656
|
onScreen: true
|
3654
|
-
}
|
3657
|
+
},
|
3658
|
+
onRemoval: onRemoval
|
3655
3659
|
});
|
3656
3660
|
}
|
3657
3661
|
};
|
@@ -5670,6 +5674,8 @@
|
|
5670
5674
|
delay = _props$delay === void 0 ? 1000 : _props$delay,
|
5671
5675
|
_props$patch = props.patch,
|
5672
5676
|
patch = _props$patch === void 0 ? false : _props$patch,
|
5677
|
+
_props$versioning = props.versioning,
|
5678
|
+
versioning = _props$versioning === void 0 ? false : _props$versioning,
|
5673
5679
|
groupBy = props.groupBy,
|
5674
5680
|
levels = props.levels,
|
5675
5681
|
sorter = props.sorter,
|
@@ -5677,12 +5683,12 @@
|
|
5677
5683
|
editor = props.editor,
|
5678
5684
|
footer = props.footer,
|
5679
5685
|
children = props.children;
|
5686
|
+
var context = CollectionContext(url, field, host, page, fetching, versioning);
|
5680
5687
|
|
5681
5688
|
var _useContext = React.useContext(PageContext),
|
5682
5689
|
pageContext = _useContext[0],
|
5683
5690
|
setPageContext = _useContext[1];
|
5684
5691
|
|
5685
|
-
var context = CollectionContext(url, field, host, page, fetching);
|
5686
5692
|
var all = pageContext.all;
|
5687
5693
|
React.useEffect(function () {
|
5688
5694
|
try {
|
@@ -6206,7 +6212,11 @@
|
|
6206
6212
|
*/
|
6207
6213
|
|
6208
6214
|
|
6209
|
-
var CollectionContext = function CollectionContext(url, field, host, page, fetching) {
|
6215
|
+
var CollectionContext = function CollectionContext(url, field, host, page, fetching, versioning) {
|
6216
|
+
if (versioning === void 0) {
|
6217
|
+
versioning = false;
|
6218
|
+
}
|
6219
|
+
|
6210
6220
|
var API = CollectionAPI(url, host);
|
6211
6221
|
return {
|
6212
6222
|
all: [],
|
@@ -6285,6 +6295,7 @@
|
|
6285
6295
|
var _this8 = this;
|
6286
6296
|
|
6287
6297
|
var _temp10 = _catch$3(function () {
|
6298
|
+
if (versioning) form.version = 1;
|
6288
6299
|
return Promise.resolve(API.create(form)).then(function () {
|
6289
6300
|
return Promise.resolve(_this8.load()).then(function () {});
|
6290
6301
|
});
|
@@ -6302,6 +6313,7 @@
|
|
6302
6313
|
var _this10 = this;
|
6303
6314
|
|
6304
6315
|
var _temp12 = _catch$3(function () {
|
6316
|
+
if (versioning) form.version = form.version ? form.version + 1 : 1;
|
6305
6317
|
return Promise.resolve(API.update(form)).then(function () {
|
6306
6318
|
return Promise.resolve(_this10.load()).then(function () {});
|
6307
6319
|
});
|
@@ -6319,6 +6331,7 @@
|
|
6319
6331
|
var _this12 = this;
|
6320
6332
|
|
6321
6333
|
var _temp14 = _catch$3(function () {
|
6334
|
+
if (versioning) form.version = form.version ? form.version + 1 : 1;
|
6322
6335
|
return Promise.resolve(API.patch(id, form)).then(function () {
|
6323
6336
|
return Promise.resolve(_this12.load()).then(function () {});
|
6324
6337
|
});
|