@cxbox-ui/core 1.37.2-alpha.2 → 1.37.2-alpha.4
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/cxbox-ui-core.cjs.development.js +36 -42
- package/dist/cxbox-ui-core.cjs.production.min.js +1 -1
- package/dist/cxbox-ui-core.esm.js +11 -8
- package/dist/cxbox-ui-core.modern.development.js +11 -8
- package/dist/cxbox-ui-core.modern.js +11 -8
- package/dist/cxbox-ui-core.modern.production.min.js +1 -1
- package/dist/interfaces/widget.d.ts +2 -1
- package/package.json +1 -1
|
@@ -376,12 +376,14 @@ __export(interfaces_exports, {
|
|
|
376
376
|
OperationPostInvokeConfirmType: function () { return OperationPostInvokeConfirmType; },
|
|
377
377
|
OperationPostInvokeType: function () { return OperationPostInvokeType; },
|
|
378
378
|
OperationPreInvokeType: function () { return OperationPreInvokeType; },
|
|
379
|
-
OperationTypeCrud: function () { return
|
|
379
|
+
OperationTypeCrud: function () { return import_schema5.OperationTypeCrud; },
|
|
380
380
|
PaginationMode: function () { return PaginationMode; },
|
|
381
381
|
PendingValidationFailsFormat: function () { return PendingValidationFailsFormat; },
|
|
382
382
|
PopupWidgetTypes: function () { return PopupWidgetTypes; },
|
|
383
|
+
PositionTypes: function () { return import_schema4.PositionTypes; },
|
|
383
384
|
RouteType: function () { return RouteType; },
|
|
384
385
|
TableLikeWidgetTypes: function () { return TableLikeWidgetTypes; },
|
|
386
|
+
WidgetTypes: function () { return import_schema4.WidgetTypes; },
|
|
385
387
|
coreOperations: function () { return coreOperations; },
|
|
386
388
|
isCustomWidget: function () { return isCustomWidget; },
|
|
387
389
|
isCustomWidgetConfiguration: function () { return isCustomWidgetConfiguration; },
|
|
@@ -424,6 +426,7 @@ var ApplicationErrorType = /* @__PURE__ */ (function (ApplicationErrorType2) {
|
|
|
424
426
|
})(ApplicationErrorType || {});
|
|
425
427
|
// src/interfaces/widget.ts
|
|
426
428
|
var import_schema3 = require("@cxbox-ui/schema");
|
|
429
|
+
var import_schema4 = require("@cxbox-ui/schema");
|
|
427
430
|
var TableLikeWidgetTypes = [
|
|
428
431
|
import_schema3.WidgetTypes.List,
|
|
429
432
|
import_schema3.WidgetTypes.DataGrid,
|
|
@@ -448,14 +451,14 @@ var PaginationMode = /* @__PURE__ */ (function (PaginationMode2) {
|
|
|
448
451
|
return PaginationMode2;
|
|
449
452
|
})(PaginationMode || {});
|
|
450
453
|
// src/interfaces/operation.ts
|
|
451
|
-
var
|
|
454
|
+
var import_schema5 = require("@cxbox-ui/schema");
|
|
452
455
|
var coreOperations = [
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
import_schema5.OperationTypeCrud.create,
|
|
457
|
+
import_schema5.OperationTypeCrud.save,
|
|
458
|
+
import_schema5.OperationTypeCrud.delete,
|
|
459
|
+
import_schema5.OperationTypeCrud.associate,
|
|
460
|
+
import_schema5.OperationTypeCrud.cancelCreate,
|
|
461
|
+
import_schema5.OperationTypeCrud.fileUpload
|
|
459
462
|
];
|
|
460
463
|
function isOperationGroup(operation) {
|
|
461
464
|
return Array.isArray(operation.actions);
|
|
@@ -1020,7 +1023,7 @@ var createRouterReducerBuilderManager = function (initialState) { return new Red
|
|
|
1020
1023
|
}
|
|
1021
1024
|
}); };
|
|
1022
1025
|
// src/reducers/screen.ts
|
|
1023
|
-
var
|
|
1026
|
+
var import_schema6 = require("@cxbox-ui/schema");
|
|
1024
1027
|
var initialScreenState = {
|
|
1025
1028
|
screenName: "",
|
|
1026
1029
|
bo: { activeBcName: "", bc: {} },
|
|
@@ -1030,7 +1033,7 @@ var initialScreenState = {
|
|
|
1030
1033
|
filters: {},
|
|
1031
1034
|
sorters: {}
|
|
1032
1035
|
};
|
|
1033
|
-
var operationsHandledLocally = [
|
|
1036
|
+
var operationsHandledLocally = [import_schema6.OperationTypeCrud.associate, import_schema6.OperationTypeCrud.fileUpload];
|
|
1034
1037
|
var createScreenReducerBuilderManager = function (initialState) { return new ReducerBuilderManager().addCase(selectScreen, function (state, action) {
|
|
1035
1038
|
var bcDictionary = {};
|
|
1036
1039
|
var bcSorters = {};
|
|
@@ -1203,7 +1206,7 @@ var createSessionReducerBuilderManager = function (initialState) { return new Re
|
|
|
1203
1206
|
state.notifications = state.notifications.filter(function (notification) { return !closingKeys.includes(notification.key); });
|
|
1204
1207
|
}); };
|
|
1205
1208
|
// src/reducers/view.ts
|
|
1206
|
-
var
|
|
1209
|
+
var import_schema7 = require("@cxbox-ui/schema");
|
|
1207
1210
|
var initialViewState = {
|
|
1208
1211
|
id: void 0,
|
|
1209
1212
|
name: null,
|
|
@@ -1238,7 +1241,7 @@ var createViewReducerBuilderManager = function (initialState) { return new Reduc
|
|
|
1238
1241
|
}
|
|
1239
1242
|
state.infiniteWidgets = Array.from(new Set(infiniteWidgets));
|
|
1240
1243
|
}).addCase(sendOperation, function (state, action) {
|
|
1241
|
-
if (action.payload.operationType ===
|
|
1244
|
+
if (action.payload.operationType === import_schema7.OperationTypeCrud.create) {
|
|
1242
1245
|
state.metaInProgress[action.payload.bcName] = true;
|
|
1243
1246
|
}
|
|
1244
1247
|
}).addCase(bcFetchRowMetaSuccess, function (state, action) {
|
|
@@ -1600,12 +1603,12 @@ var sendOperationEpic = function (action$, state$, _a) {
|
|
|
1600
1603
|
};
|
|
1601
1604
|
// src/epics/view/showAssocPopupEpic.ts
|
|
1602
1605
|
var import_rxjs3 = require("rxjs");
|
|
1603
|
-
var
|
|
1606
|
+
var import_schema8 = require("@cxbox-ui/schema");
|
|
1604
1607
|
var showAssocPopupEpic = function (action$, state$) { return action$.pipe((0, import_rxjs3.filter)(showViewPopup.match), (0, import_rxjs3.filter)(function (action) { return !!(action.payload.calleeBCName && action.payload.associateFieldKey); }), (0, import_rxjs3.mergeMap)(function (action) {
|
|
1605
1608
|
var _a, _b, _c, _d;
|
|
1606
1609
|
var _e = action.payload, bcName = _e.bcName, calleeBCName = _e.calleeBCName;
|
|
1607
1610
|
var state = state$.value;
|
|
1608
|
-
var assocWidget = state.view.widgets.find(function (widget) { return widget.bcName === bcName && widget.type ===
|
|
1611
|
+
var assocWidget = state.view.widgets.find(function (widget) { return widget.bcName === bcName && widget.type === import_schema8.WidgetTypes.AssocListPopup; });
|
|
1609
1612
|
var calleeCursor = (_a = state.screen.bo.bc[calleeBCName]) === null || _a === void 0 ? void 0 : _a.cursor;
|
|
1610
1613
|
var calleePendingChanges = (_b = state.view.pendingDataChanges[calleeBCName]) === null || _b === void 0 ? void 0 : _b[calleeCursor];
|
|
1611
1614
|
var assocFieldKey = action.payload.associateFieldKey;
|
|
@@ -1643,7 +1646,7 @@ var showAssocPopupEpic = function (action$, state$) { return action$.pipe((0, im
|
|
|
1643
1646
|
})); };
|
|
1644
1647
|
// src/epics/view/fileUploadConfirmEpic.ts
|
|
1645
1648
|
var import_rxjs4 = require("rxjs");
|
|
1646
|
-
var
|
|
1649
|
+
var import_schema9 = require("@cxbox-ui/schema");
|
|
1647
1650
|
var fileUploadConfirmEpic = function (action$, state$, _a) {
|
|
1648
1651
|
var api = _a.api;
|
|
1649
1652
|
return action$.pipe((0, import_rxjs4.filter)(bulkUploadFiles.match), (0, import_rxjs4.mergeMap)(function (action) {
|
|
@@ -1660,7 +1663,7 @@ var fileUploadConfirmEpic = function (action$, state$, _a) {
|
|
|
1660
1663
|
var preInvoke = response.preInvoke;
|
|
1661
1664
|
return (0, import_rxjs4.concat).apply(void 0, __spreadArray([(0, import_rxjs4.of)(sendOperationSuccess({ bcName: bcName, cursor: null })),
|
|
1662
1665
|
(0, import_rxjs4.of)(bcForceUpdate({ bcName: bcName })),
|
|
1663
|
-
(0, import_rxjs4.of)(closeViewPopup(null))], postOperationRoutine(widgetName, postInvoke, preInvoke,
|
|
1666
|
+
(0, import_rxjs4.of)(closeViewPopup(null))], postOperationRoutine(widgetName, postInvoke, preInvoke, import_schema9.OperationTypeCrud.save, bcName), false));
|
|
1664
1667
|
}));
|
|
1665
1668
|
}));
|
|
1666
1669
|
};
|
|
@@ -1685,15 +1688,15 @@ var selectTableCellInitEpic = function (action$, state$) { return action$.pipe((
|
|
|
1685
1688
|
})); };
|
|
1686
1689
|
// src/epics/view/showFileUploadPopupEpic.ts
|
|
1687
1690
|
var import_rxjs6 = require("rxjs");
|
|
1688
|
-
var
|
|
1689
|
-
var showFileUploadPopupEpic = function (action$, state$) { return action$.pipe((0, import_rxjs6.filter)(sendOperation.match), (0, import_rxjs6.filter)(function (action) { return matchOperationRole(
|
|
1691
|
+
var import_schema10 = require("@cxbox-ui/schema");
|
|
1692
|
+
var showFileUploadPopupEpic = function (action$, state$) { return action$.pipe((0, import_rxjs6.filter)(sendOperation.match), (0, import_rxjs6.filter)(function (action) { return matchOperationRole(import_schema10.OperationTypeCrud.fileUpload, action.payload, state$.value); }), (0, import_rxjs6.mergeMap)(function (action) {
|
|
1690
1693
|
var _a;
|
|
1691
1694
|
return (0, import_rxjs6.concat)((0, import_rxjs6.of)(bcChangeCursors({ cursorsMap: (_a = {}, _a[action.payload.bcName] = null, _a) })), (0, import_rxjs6.of)(showFileUploadPopup({ widgetName: action.payload.widgetName })));
|
|
1692
1695
|
})); };
|
|
1693
1696
|
// src/epics/view/sendOperationAssociateEpic.ts
|
|
1694
1697
|
var import_rxjs7 = require("rxjs");
|
|
1695
|
-
var
|
|
1696
|
-
var sendOperationAssociateEpic = function (action$, state$) { return action$.pipe((0, import_rxjs7.filter)(sendOperation.match), (0, import_rxjs7.filter)(function (action) { return matchOperationRole(
|
|
1698
|
+
var import_schema11 = require("@cxbox-ui/schema");
|
|
1699
|
+
var sendOperationAssociateEpic = function (action$, state$) { return action$.pipe((0, import_rxjs7.filter)(sendOperation.match), (0, import_rxjs7.filter)(function (action) { return matchOperationRole(import_schema11.OperationTypeCrud.associate, action.payload, state$.value); }), (0, import_rxjs7.map)(function (action) {
|
|
1697
1700
|
return showViewPopup({
|
|
1698
1701
|
// TODO: 2.0.0 bcKey and bcName will be removed in favor `widgetName`
|
|
1699
1702
|
bcName: action.payload.bcKey ? "".concat(action.payload.bcKey) : "".concat(action.payload.bcName, "Assoc"),
|
|
@@ -1704,7 +1707,7 @@ var sendOperationAssociateEpic = function (action$, state$) { return action$.pip
|
|
|
1704
1707
|
})); };
|
|
1705
1708
|
// src/epics/view/getRowMetaByForceActiveEpic.ts
|
|
1706
1709
|
var import_rxjs8 = require("rxjs");
|
|
1707
|
-
var
|
|
1710
|
+
var import_schema12 = require("@cxbox-ui/schema");
|
|
1708
1711
|
var import_toolkit2 = require("@reduxjs/toolkit");
|
|
1709
1712
|
var getRowMetaByForceActiveEpic = function (action$, state$, _a) {
|
|
1710
1713
|
var api = _a.api;
|
|
@@ -1715,12 +1718,12 @@ var getRowMetaByForceActiveEpic = function (action$, state$, _a) {
|
|
|
1715
1718
|
var _e = action.payload, bcName = _e.bcName, cursor = _e.cursor, disableRetry = _e.disableRetry;
|
|
1716
1719
|
var isBcHierarchy = state.view.widgets.some(function (widget) {
|
|
1717
1720
|
var _a, _b;
|
|
1718
|
-
return widget.bcName === bcName && widget.type ===
|
|
1721
|
+
return widget.bcName === bcName && widget.type === import_schema12.WidgetTypes.AssocListPopup && (((_a = widget.options) === null || _a === void 0 ? void 0 : _a.hierarchySameBc) || ((_b = widget.options) === null || _b === void 0 ? void 0 : _b.hierarchyFull));
|
|
1719
1722
|
});
|
|
1720
1723
|
if (isBcHierarchy) {
|
|
1721
1724
|
return import_rxjs8.EMPTY;
|
|
1722
1725
|
}
|
|
1723
|
-
var isPickListPopup = state.view.widgets.find(function (item) { var _a; return item.name === ((_a = state.view.popupData) === null || _a === void 0 ? void 0 : _a.widgetName) && [
|
|
1726
|
+
var isPickListPopup = state.view.widgets.find(function (item) { var _a; return item.name === ((_a = state.view.popupData) === null || _a === void 0 ? void 0 : _a.widgetName) && [import_schema12.WidgetTypes.PickListPopup, import_schema12.WidgetTypes.FlatTreePopup].includes(item.type); });
|
|
1724
1727
|
var bcUrl = buildBcUrl(bcName, true);
|
|
1725
1728
|
var pendingChanges = state.view.pendingDataChanges[bcName][cursor];
|
|
1726
1729
|
var handledForceActive = ((_a = state.view.handledForceActive[bcName]) === null || _a === void 0 ? void 0 : _a[cursor]) || {};
|
|
@@ -2219,10 +2222,10 @@ var import_rxjs35 = require("rxjs");
|
|
|
2219
2222
|
var refreshMetaAndReloadPageEpic = function (action$, state$) { return action$.pipe((0, import_rxjs35.filter)(refreshMetaAndReloadPage.match), (0, import_rxjs35.switchMap)(function () { return (0, import_rxjs35.concat)((0, import_rxjs35.of)(refreshMeta(null)), action$.pipe((0, import_rxjs35.filter)(loginDone.match), (0, import_rxjs35.take)(1), (0, import_rxjs35.tap)(function () { return location.reload(); }), (0, import_rxjs35.switchMap)(function () { return import_rxjs35.EMPTY; }))); })); };
|
|
2220
2223
|
// src/epics/data/bcNewDataEpic.ts
|
|
2221
2224
|
var import_rxjs36 = require("rxjs");
|
|
2222
|
-
var
|
|
2225
|
+
var import_schema13 = require("@cxbox-ui/schema");
|
|
2223
2226
|
var bcNewDataEpic = function (action$, state$, _a) {
|
|
2224
2227
|
var api = _a.api;
|
|
2225
|
-
return action$.pipe((0, import_rxjs36.filter)(sendOperation.match), (0, import_rxjs36.filter)(function (action) { return matchOperationRole(
|
|
2228
|
+
return action$.pipe((0, import_rxjs36.filter)(sendOperation.match), (0, import_rxjs36.filter)(function (action) { return matchOperationRole(import_schema13.OperationTypeCrud.create, action.payload, state$.value); }), (0, import_rxjs36.mergeMap)(function (action) {
|
|
2226
2229
|
var state = state$.value;
|
|
2227
2230
|
var bcName = action.payload.bcName;
|
|
2228
2231
|
var bcUrl = buildBcUrl(bcName);
|
|
@@ -2302,7 +2305,7 @@ var bcLoadMoreEpic = function (action$, state$, _a) {
|
|
|
2302
2305
|
var import_rxjs39 = require("rxjs");
|
|
2303
2306
|
var bcSaveDataEpic = function (action$, state$, _a) {
|
|
2304
2307
|
var api = _a.api;
|
|
2305
|
-
return action$.pipe((0, import_rxjs39.filter)(sendOperation.match), (0, import_rxjs39.filter)(function (action) { return matchOperationRole(
|
|
2308
|
+
return action$.pipe((0, import_rxjs39.filter)(sendOperation.match), (0, import_rxjs39.filter)(function (action) { return matchOperationRole(import_schema5.OperationTypeCrud.save, action.payload, state$.value); }), (0, import_rxjs39.mergeMap)(function (action) {
|
|
2306
2309
|
var _a, _b, _c;
|
|
2307
2310
|
var state = state$.value;
|
|
2308
2311
|
var bcName = action.payload.bcName;
|
|
@@ -2399,7 +2402,7 @@ var selectViewEpic = function (action$, state$) { return action$.pipe((0, import
|
|
|
2399
2402
|
})); };
|
|
2400
2403
|
// src/epics/data/bcFetchDataEpic.ts
|
|
2401
2404
|
var import_rxjs41 = require("rxjs");
|
|
2402
|
-
var
|
|
2405
|
+
var import_schema14 = require("@cxbox-ui/schema");
|
|
2403
2406
|
var import_toolkit5 = require("@reduxjs/toolkit");
|
|
2404
2407
|
var bcFetchDataEpic = function (action$, state$, _a) {
|
|
2405
2408
|
var api = _a.api;
|
|
@@ -2461,11 +2464,11 @@ var bcFetchDataEpic = function (action$, state$, _a) {
|
|
|
2461
2464
|
return [import_rxjs41.EMPTY];
|
|
2462
2465
|
}
|
|
2463
2466
|
var anyHierarchyWidget = widgets.find(function (item) {
|
|
2464
|
-
return item.bcName === widget.bcName && item.type ===
|
|
2467
|
+
return item.bcName === widget.bcName && item.type === import_schema14.WidgetTypes.AssocListPopup && isHierarchyWidget(item);
|
|
2465
2468
|
});
|
|
2466
2469
|
var fullHierarchyWidget = state.view.widgets.find(function (item) {
|
|
2467
2470
|
var _a;
|
|
2468
|
-
return item.bcName === widget.bcName && item.type ===
|
|
2471
|
+
return item.bcName === widget.bcName && item.type === import_schema14.WidgetTypes.AssocListPopup && ((_a = item.options) === null || _a === void 0 ? void 0 : _a.hierarchyFull);
|
|
2469
2472
|
});
|
|
2470
2473
|
var limitBySelfCursor = (_c = state.router.bcPath) === null || _c === void 0 ? void 0 : _c.includes("".concat(bcName, "/").concat(cursor));
|
|
2471
2474
|
var bcUrl = buildBcUrl(bcName, limitBySelfCursor);
|
|
@@ -2541,10 +2544,10 @@ function isHierarchyWidget(widget) {
|
|
|
2541
2544
|
}
|
|
2542
2545
|
// src/epics/data/bcDeleteDataEpic.ts
|
|
2543
2546
|
var import_rxjs42 = require("rxjs");
|
|
2544
|
-
var
|
|
2547
|
+
var import_schema15 = require("@cxbox-ui/schema");
|
|
2545
2548
|
var bcDeleteDataEpic = function (action$, store$, _a) {
|
|
2546
2549
|
var api = _a.api;
|
|
2547
|
-
return action$.pipe((0, import_rxjs42.filter)(sendOperation.match), (0, import_rxjs42.filter)(function (action) { return matchOperationRole(
|
|
2550
|
+
return action$.pipe((0, import_rxjs42.filter)(sendOperation.match), (0, import_rxjs42.filter)(function (action) { return matchOperationRole(import_schema15.OperationTypeCrud.delete, action.payload, store$.value); }), (0, import_rxjs42.mergeMap)(function (action) {
|
|
2548
2551
|
var widgetName = action.payload.widgetName;
|
|
2549
2552
|
var state = store$.value;
|
|
2550
2553
|
var bcName = action.payload.bcName;
|
|
@@ -2649,12 +2652,12 @@ var changeAssociationEpic = function (action$, state$) { return action$.pipe((0,
|
|
|
2649
2652
|
})); };
|
|
2650
2653
|
// src/epics/data/bcCancelCreateDataEpic.ts
|
|
2651
2654
|
var import_rxjs45 = require("rxjs");
|
|
2652
|
-
var
|
|
2655
|
+
var import_schema16 = require("@cxbox-ui/schema");
|
|
2653
2656
|
var import_toolkit6 = require("@reduxjs/toolkit");
|
|
2654
2657
|
var actionTypesMatcher = (0, import_toolkit6.isAnyOf)(sendOperation);
|
|
2655
2658
|
var bcCancelCreateDataEpic = function (action$, state$, _a) {
|
|
2656
2659
|
var api = _a.api;
|
|
2657
|
-
return action$.pipe((0, import_rxjs45.filter)(actionTypesMatcher), (0, import_rxjs45.filter)(function (action) { return matchOperationRole(
|
|
2660
|
+
return action$.pipe((0, import_rxjs45.filter)(actionTypesMatcher), (0, import_rxjs45.filter)(function (action) { return matchOperationRole(import_schema16.OperationTypeCrud.cancelCreate, action.payload, state$.value); }), (0, import_rxjs45.mergeMap)(function (action) {
|
|
2658
2661
|
var _a;
|
|
2659
2662
|
var _b, _c;
|
|
2660
2663
|
var state = state$.value;
|
|
@@ -3176,13 +3179,4 @@ var Api = /** @class */ (function () {
|
|
|
3176
3179
|
};
|
|
3177
3180
|
return class_3;
|
|
3178
3181
|
}());
|
|
3179
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
3180
|
-
0 && (module.exports = {
|
|
3181
|
-
Api: Api,
|
|
3182
|
-
actions: actions,
|
|
3183
|
-
epics: epics,
|
|
3184
|
-
interfaces: interfaces,
|
|
3185
|
-
reducers: reducers,
|
|
3186
|
-
utils: utils
|
|
3187
|
-
});
|
|
3188
3182
|
//# sourceMappingURL=cxbox-ui-core.cjs.development.js.map
|