blixify-ui-web 1.2.26 → 1.2.28
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/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +68 -68
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +1 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/display/detailList/index.d.ts.map +1 -1
- package/lib/components/display/detailList/index.js +11 -6
- package/lib/components/display/detailList/index.js.map +1 -1
- package/lib/components/display/newList/index.d.ts +1 -0
- package/lib/components/display/newList/index.d.ts.map +1 -1
- package/lib/components/display/newList/index.js +35 -11
- package/lib/components/display/newList/index.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts +1 -0
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +54 -25
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/tail.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KASN,MAAM,OAAO,CAAC;AA+Ef,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoC1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KASN,MAAM,OAAO,CAAC;AA+Ef,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoC1B,eAAO,MAAM,YAAY,mFA87VvB,CAAC"}
|
|
@@ -7214,7 +7214,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7214
7214
|
return (react_1.default.createElement(settingsModal_1.ExpressionModal, { selectedId: id, model: structure, renderReferenceLabelOptions: (_a = props.organise) === null || _a === void 0 ? void 0 : _a.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_b = props.organise) === null || _b === void 0 ? void 0 : _b.renderReferenceSpaceOptions, onAddModelSchema: (_c = props.organise) === null || _c === void 0 ? void 0 : _c.onAddColumns, onClose: onClose }));
|
|
7215
7215
|
};
|
|
7216
7216
|
var renderGroupTable = function (multipleSelect) {
|
|
7217
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37;
|
|
7217
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38;
|
|
7218
7218
|
if (groupId) {
|
|
7219
7219
|
var groupAttributeDS_1 = structure.find(function (eachDS) { return eachDS.id === groupId; });
|
|
7220
7220
|
var groupedSpaceTableData = spaceTableData.reduce(function (acc, eachData) {
|
|
@@ -7339,8 +7339,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7339
7339
|
else {
|
|
7340
7340
|
// INFO: when bareNewDTW is enabled, render NewTable instead of legacy Table
|
|
7341
7341
|
if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW) {
|
|
7342
|
-
return (react_1.default.createElement(newTable_1.NewTable, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.disableSelectFullData) === null || _c === void 0 ? void 0 : _c.table,
|
|
7343
|
-
!((
|
|
7342
|
+
return (react_1.default.createElement(newTable_1.NewTable, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_c = (_b = props.organise) === null || _b === void 0 ? void 0 : _b.disableSelectFullData) === null || _c === void 0 ? void 0 : _c.table, maxSelectedCount: (_d = props.bareSettings) === null || _d === void 0 ? void 0 : _d.bareListMaxSelectedCount, mobileView: (_e = props.bareSettings) === null || _e === void 0 ? void 0 : _e.bareListMobileView, mobileTooltip: (_f = props.bareSettings) === null || _f === void 0 ? void 0 : _f.bareMobileTooltip, multiActionFloatingBtns: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (!((_g = props.edit) === null || _g === void 0 ? void 0 : _g.disabledUpdate) &&
|
|
7343
|
+
!((_h = props.bareSettings) === null || _h === void 0 ? void 0 : _h.bareHideTableExtraMultipleAction)
|
|
7344
7344
|
? [
|
|
7345
7345
|
{
|
|
7346
7346
|
id: "draft",
|
|
@@ -7355,7 +7355,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7355
7355
|
hide: selectedIds.length === 0,
|
|
7356
7356
|
},
|
|
7357
7357
|
]
|
|
7358
|
-
: []), true), (((
|
|
7358
|
+
: []), true), (((_j = props.edit) === null || _j === void 0 ? void 0 : _j.deleteBtn)
|
|
7359
7359
|
? [
|
|
7360
7360
|
{
|
|
7361
7361
|
id: "delete",
|
|
@@ -7366,7 +7366,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7366
7366
|
},
|
|
7367
7367
|
},
|
|
7368
7368
|
]
|
|
7369
|
-
: []), true), (!isFirebase && !((
|
|
7369
|
+
: []), true), (!isFirebase && !((_k = props.edit) === null || _k === void 0 ? void 0 : _k.disableBatchUpdate)
|
|
7370
7370
|
? [
|
|
7371
7371
|
{
|
|
7372
7372
|
id: "update",
|
|
@@ -7374,7 +7374,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7374
7374
|
onClick: function () { return setBatchUpdateModal(true); },
|
|
7375
7375
|
},
|
|
7376
7376
|
]
|
|
7377
|
-
: []), true), (((
|
|
7377
|
+
: []), true), (((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareListMultipleSelectAddtionalActions)
|
|
7378
7378
|
? props.bareSettings.bareListMultipleSelectAddtionalActions.map(function (eachButton) { return ({
|
|
7379
7379
|
id: "dt-list-multi-action-btn-" + eachButton.text,
|
|
7380
7380
|
btnText: eachButton.text,
|
|
@@ -7383,23 +7383,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7383
7383
|
return (_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
7384
7384
|
},
|
|
7385
7385
|
}); })
|
|
7386
|
-
: []), true), multiActionFloatingOffset: (
|
|
7386
|
+
: []), true), multiActionFloatingOffset: (_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareListFloatingActionOffset, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
|
|
7387
7387
|
var _a, _b;
|
|
7388
7388
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
7389
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
7389
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_p = (_o = props.newTabUrl) === null || _o === void 0 ? void 0 : _o.default) !== null && _p !== void 0 ? _p : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_r = (_q = props.newTabUrl) === null || _q === void 0 ? void 0 : _q.addons) !== null && _r !== void 0 ? _r : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
7390
7390
|
handlePagination(value);
|
|
7391
|
-
}, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (
|
|
7392
|
-
addColumnEnabled: (
|
|
7391
|
+
}, className: "mt-5", devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_s = props.organise) === null || _s === void 0 ? void 0 : _s.fixedPagination, advSettings: {
|
|
7392
|
+
addColumnEnabled: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.addColumnEnabled,
|
|
7393
7393
|
renderAddColumnElements: renderAddMathColumn,
|
|
7394
|
-
dragEnabled: (
|
|
7395
|
-
sortEnabled: (
|
|
7396
|
-
filterEnabled: ((
|
|
7394
|
+
dragEnabled: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.advDragEnabled,
|
|
7395
|
+
sortEnabled: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.advSortEnabled,
|
|
7396
|
+
filterEnabled: ((_w = props.bareSettings) === null || _w === void 0 ? void 0 : _w.bareFlexFilters)
|
|
7397
7397
|
? false
|
|
7398
|
-
: (
|
|
7399
|
-
sortId: (
|
|
7400
|
-
sortOptions: (
|
|
7401
|
-
onSortColumn: (
|
|
7402
|
-
onDragColumn: (
|
|
7398
|
+
: (_x = props.organise) === null || _x === void 0 ? void 0 : _x.advFilterEnabled,
|
|
7399
|
+
sortId: (_y = props.organise) === null || _y === void 0 ? void 0 : _y.sort,
|
|
7400
|
+
sortOptions: (_0 = (_z = props.organise) === null || _z === void 0 ? void 0 : _z.renderReferenceLabelOptions) === null || _0 === void 0 ? void 0 : _0.call(_z),
|
|
7401
|
+
onSortColumn: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.onChangeSort,
|
|
7402
|
+
onDragColumn: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.onChangeDrag,
|
|
7403
7403
|
filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
|
|
7404
7404
|
var _a;
|
|
7405
7405
|
return {
|
|
@@ -7416,7 +7416,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7416
7416
|
return renderSearchContent(newQuery);
|
|
7417
7417
|
},
|
|
7418
7418
|
}, editable: {
|
|
7419
|
-
active: ((
|
|
7419
|
+
active: ((_3 = props.edit) === null || _3 === void 0 ? void 0 : _3.listEditable) && !props.edit.disabledUpdate
|
|
7420
7420
|
? true
|
|
7421
7421
|
: false,
|
|
7422
7422
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -7430,7 +7430,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7430
7430
|
});
|
|
7431
7431
|
}); },
|
|
7432
7432
|
}, addable: {
|
|
7433
|
-
active: ((
|
|
7433
|
+
active: ((_4 = props.edit) === null || _4 === void 0 ? void 0 : _4.listAddable) ? true : false,
|
|
7434
7434
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7435
7435
|
return __generator(this, function (_a) {
|
|
7436
7436
|
switch (_a.label) {
|
|
@@ -7441,27 +7441,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7441
7441
|
}
|
|
7442
7442
|
});
|
|
7443
7443
|
}); },
|
|
7444
|
-
}, darkMode: (
|
|
7444
|
+
}, darkMode: (_5 = props.organise) === null || _5 === void 0 ? void 0 : _5.darkMode, hidePagination: (_6 = props.organise) === null || _6 === void 0 ? void 0 : _6.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_7 = props.organise) === null || _7 === void 0 ? void 0 : _7.disableEllipsisOnLongWord, pinColumns: (_8 = props.bareSettings) === null || _8 === void 0 ? void 0 : _8.bareListTablePinColumns }));
|
|
7445
7445
|
}
|
|
7446
|
-
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (
|
|
7446
|
+
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], size: size !== null && size !== void 0 ? size : 0, limit: limit, cursor: cursor !== null && cursor !== void 0 ? cursor : "", loading: tableLoading !== null && tableLoading !== void 0 ? tableLoading : true, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, selectAllText: selectAll ? "from filter" : "", disableSelectFullData: (_10 = (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.disableSelectFullData) === null || _10 === void 0 ? void 0 : _10.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
7447
7447
|
selectedIds.length > 0 &&
|
|
7448
|
-
!((
|
|
7449
|
-
!((
|
|
7448
|
+
!((_11 = props.edit) === null || _11 === void 0 ? void 0 : _11.disabledUpdate) &&
|
|
7449
|
+
!((_12 = props.bareSettings) === null || _12 === void 0 ? void 0 : _12.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
7450
7450
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
7451
7451
|
handleBatchDraftData();
|
|
7452
7452
|
} }),
|
|
7453
7453
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
7454
7454
|
handleCloneSelectedData();
|
|
7455
7455
|
} }))),
|
|
7456
|
-
((
|
|
7456
|
+
((_13 = props.edit) === null || _13 === void 0 ? void 0 : _13.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
7457
7457
|
handleGenerateDeletePasscode();
|
|
7458
7458
|
setDeleteModal(true);
|
|
7459
7459
|
} })),
|
|
7460
|
-
!isFirebase && !((
|
|
7460
|
+
!isFirebase && !((_14 = props.edit) === null || _14 === void 0 ? void 0 : _14.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
7461
7461
|
setBatchUpdateModal(true);
|
|
7462
7462
|
} })),
|
|
7463
|
-
((
|
|
7464
|
-
((
|
|
7463
|
+
((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareListMultipleSelectAddtionalActions) &&
|
|
7464
|
+
((_17 = (_16 = props.bareSettings) === null || _16 === void 0 ? void 0 : _16.bareListMultipleSelectAddtionalActions) === null || _17 === void 0 ? void 0 : _17.map(function (eachButton) {
|
|
7465
7465
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
7466
7466
|
var _a, _b;
|
|
7467
7467
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
@@ -7469,20 +7469,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7469
7469
|
}))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
|
|
7470
7470
|
var _a, _b;
|
|
7471
7471
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
7472
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
7472
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_19 = (_18 = props.newTabUrl) === null || _18 === void 0 ? void 0 : _18.default) !== null && _19 !== void 0 ? _19 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_21 = (_20 = props.newTabUrl) === null || _20 === void 0 ? void 0 : _20.addons) !== null && _21 !== void 0 ? _21 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
7473
7473
|
handlePagination(value);
|
|
7474
|
-
}, className: "mt-5", lib: { axios: (
|
|
7475
|
-
addColumnEnabled: (
|
|
7474
|
+
}, className: "mt-5", lib: { axios: (_22 = props.lib) === null || _22 === void 0 ? void 0 : _22.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_23 = props.organise) === null || _23 === void 0 ? void 0 : _23.fixedPagination, advSettings: {
|
|
7475
|
+
addColumnEnabled: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.addColumnEnabled,
|
|
7476
7476
|
renderAddColumnElements: renderAddMathColumn,
|
|
7477
|
-
dragEnabled: (
|
|
7478
|
-
sortEnabled: (
|
|
7479
|
-
filterEnabled: ((
|
|
7477
|
+
dragEnabled: (_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.advDragEnabled,
|
|
7478
|
+
sortEnabled: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.advSortEnabled,
|
|
7479
|
+
filterEnabled: ((_27 = props.bareSettings) === null || _27 === void 0 ? void 0 : _27.bareFlexFilters)
|
|
7480
7480
|
? false
|
|
7481
|
-
: (
|
|
7482
|
-
sortId: (
|
|
7483
|
-
sortOptions: (
|
|
7484
|
-
onSortColumn: (
|
|
7485
|
-
onDragColumn: (
|
|
7481
|
+
: (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.advFilterEnabled,
|
|
7482
|
+
sortId: (_29 = props.organise) === null || _29 === void 0 ? void 0 : _29.sort,
|
|
7483
|
+
sortOptions: (_31 = (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.renderReferenceLabelOptions) === null || _31 === void 0 ? void 0 : _31.call(_30),
|
|
7484
|
+
onSortColumn: (_32 = props.organise) === null || _32 === void 0 ? void 0 : _32.onChangeSort,
|
|
7485
|
+
onDragColumn: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.onChangeDrag,
|
|
7486
7486
|
filterOptions: additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery.map(function (eachQuery) {
|
|
7487
7487
|
var _a;
|
|
7488
7488
|
return {
|
|
@@ -7499,7 +7499,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7499
7499
|
return renderSearchContent(newQuery);
|
|
7500
7500
|
},
|
|
7501
7501
|
}, editable: {
|
|
7502
|
-
active: ((
|
|
7502
|
+
active: ((_34 = props.edit) === null || _34 === void 0 ? void 0 : _34.listEditable) && !props.edit.disabledUpdate
|
|
7503
7503
|
? true
|
|
7504
7504
|
: false,
|
|
7505
7505
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -7513,7 +7513,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7513
7513
|
});
|
|
7514
7514
|
}); },
|
|
7515
7515
|
}, addable: {
|
|
7516
|
-
active: ((
|
|
7516
|
+
active: ((_35 = props.edit) === null || _35 === void 0 ? void 0 : _35.listAddable) ? true : false,
|
|
7517
7517
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7518
7518
|
return __generator(this, function (_a) {
|
|
7519
7519
|
switch (_a.label) {
|
|
@@ -7524,11 +7524,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7524
7524
|
}
|
|
7525
7525
|
});
|
|
7526
7526
|
}); },
|
|
7527
|
-
}, darkMode: (
|
|
7527
|
+
}, darkMode: (_36 = props.organise) === null || _36 === void 0 ? void 0 : _36.darkMode, hidePagination: (_37 = props.organise) === null || _37 === void 0 ? void 0 : _37.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.disableEllipsisOnLongWord }));
|
|
7528
7528
|
}
|
|
7529
7529
|
};
|
|
7530
7530
|
var renderTabContent = function (tabs, dataType, viewType) {
|
|
7531
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29;
|
|
7531
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30;
|
|
7532
7532
|
var selectedTabData = tabs.find(function (eachTab) {
|
|
7533
7533
|
if (eachTab.id === viewType) {
|
|
7534
7534
|
return eachTab;
|
|
@@ -7711,48 +7711,48 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7711
7711
|
else if (selectedTabData.viewType === "list") {
|
|
7712
7712
|
// INFO: when bareNewDTW is enabled, render NewList instead of legacy List
|
|
7713
7713
|
if ((_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareNewDTW) {
|
|
7714
|
-
return (react_1.default.createElement(newList_1.NewList, { paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.disableSelectFullData) === null || _s === void 0 ? void 0 : _s.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
7715
|
-
selectedIds.length > 0 && !((
|
|
7714
|
+
return (react_1.default.createElement(newList_1.NewList, { paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_s = (_r = props.organise) === null || _r === void 0 ? void 0 : _r.disableSelectFullData) === null || _s === void 0 ? void 0 : _s.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", maxSelectedCount: (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareListMaxSelectedCount, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
7715
|
+
selectedIds.length > 0 && !((_u = props.edit) === null || _u === void 0 ? void 0 : _u.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
7716
7716
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
7717
7717
|
handleBatchDraftData();
|
|
7718
7718
|
} }),
|
|
7719
7719
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
7720
7720
|
handleCloneSelectedData();
|
|
7721
7721
|
} }))),
|
|
7722
|
-
((
|
|
7722
|
+
((_v = props.edit) === null || _v === void 0 ? void 0 : _v.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
7723
7723
|
handleGenerateDeletePasscode();
|
|
7724
7724
|
setDeleteModal(true);
|
|
7725
7725
|
} })),
|
|
7726
|
-
!isFirebase && !((
|
|
7726
|
+
!isFirebase && !((_w = props.edit) === null || _w === void 0 ? void 0 : _w.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
7727
7727
|
setBatchUpdateModal(true);
|
|
7728
7728
|
} }))), onClickRow: function (id) {
|
|
7729
7729
|
var _a, _b;
|
|
7730
7730
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
7731
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
7731
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_y = (_x = props.newTabUrl) === null || _x === void 0 ? void 0 : _x.default) !== null && _y !== void 0 ? _y : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_0 = (_z = props.newTabUrl) === null || _z === void 0 ? void 0 : _z.addons) !== null && _0 !== void 0 ? _0 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
7732
7732
|
handlePagination(value);
|
|
7733
|
-
}, darkMode: (
|
|
7733
|
+
}, darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode, className: "mt-5", hidePagination: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.hidePagination, customPaginationSize: customPaginationSize, mobileTooltip: (_3 = props.bareSettings) === null || _3 === void 0 ? void 0 : _3.bareListMobileTooltip }));
|
|
7734
7734
|
}
|
|
7735
7735
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
7736
|
-
react_1.default.createElement(list_1.List, { paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (
|
|
7737
|
-
selectedIds.length > 0 && !((
|
|
7736
|
+
react_1.default.createElement(list_1.List, { paginationType: renderResolvedPaginationType(), list: renderGridAndListData(selectedTabData.viewImage, "list"), size: size, limit: limit, cursor: cursor, loading: tableLoading, pageIndex: pageIndex, checkbox: multipleSelect, selectAll: selectAll, selectedIds: selectedIds, disableSelectFullData: (_5 = (_4 = props.organise) === null || _4 === void 0 ? void 0 : _4.disableSelectFullData) === null || _5 === void 0 ? void 0 : _5.list, handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, selectAllText: selectAll ? "from filter" : "", multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
7737
|
+
selectedIds.length > 0 && !((_6 = props.edit) === null || _6 === void 0 ? void 0 : _6.disabledUpdate) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
7738
7738
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
7739
7739
|
handleBatchDraftData();
|
|
7740
7740
|
} }),
|
|
7741
7741
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
7742
7742
|
handleCloneSelectedData();
|
|
7743
7743
|
} }))),
|
|
7744
|
-
((
|
|
7744
|
+
((_7 = props.edit) === null || _7 === void 0 ? void 0 : _7.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
7745
7745
|
handleGenerateDeletePasscode();
|
|
7746
7746
|
setDeleteModal(true);
|
|
7747
7747
|
} })),
|
|
7748
|
-
!isFirebase && !((
|
|
7748
|
+
!isFirebase && !((_8 = props.edit) === null || _8 === void 0 ? void 0 : _8.disabledUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
7749
7749
|
setBatchUpdateModal(true);
|
|
7750
7750
|
} }))), onClickRow: function (id) {
|
|
7751
7751
|
var _a, _b;
|
|
7752
7752
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
7753
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
7753
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_10 = (_9 = props.newTabUrl) === null || _9 === void 0 ? void 0 : _9.default) !== null && _10 !== void 0 ? _10 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_12 = (_11 = props.newTabUrl) === null || _11 === void 0 ? void 0 : _11.addons) !== null && _12 !== void 0 ? _12 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
7754
7754
|
handlePagination(value);
|
|
7755
|
-
}, className: "mt-5", hidePagination: (
|
|
7755
|
+
}, className: "mt-5", hidePagination: (_13 = props.organise) === null || _13 === void 0 ? void 0 : _13.hidePagination, customPaginationSize: customPaginationSize })));
|
|
7756
7756
|
}
|
|
7757
7757
|
else if (selectedTabData.viewType === "grid") {
|
|
7758
7758
|
var isScrollMode = renderCheckScrollMode();
|
|
@@ -7760,9 +7760,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7760
7760
|
react_1.default.createElement(grid_1.Grid, { paginationType: renderResolvedPaginationType(), data: renderGridAndListData(selectedTabData.viewImage, "grid"), size: size, limit: limit, cursor: cursor, loading: tableLoading, horizontalScroll: isScrollMode, pageIndex: pageIndex, onClickData: function (id) {
|
|
7761
7761
|
var _a, _b;
|
|
7762
7762
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
7763
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
7763
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_15 = (_14 = props.newTabUrl) === null || _14 === void 0 ? void 0 : _14.default) !== null && _15 !== void 0 ? _15 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_17 = (_16 = props.newTabUrl) === null || _16 === void 0 ? void 0 : _16.addons) !== null && _17 !== void 0 ? _17 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
7764
7764
|
handlePagination(value);
|
|
7765
|
-
}, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (
|
|
7765
|
+
}, imgContain: selectedTabData === null || selectedTabData === void 0 ? void 0 : selectedTabData.gridContain, gridColClassName: (_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareListGridColClassName, className: "mt-5", hidePagination: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.hidePagination, customPaginationSize: customPaginationSize })));
|
|
7766
7766
|
}
|
|
7767
7767
|
else if (selectedTabData.viewType === "calendar") {
|
|
7768
7768
|
var calendarSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings;
|
|
@@ -7857,7 +7857,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7857
7857
|
return eventAvailabilities;
|
|
7858
7858
|
};
|
|
7859
7859
|
// INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
|
|
7860
|
-
if ((
|
|
7860
|
+
if ((_20 = props.bareSettings) === null || _20 === void 0 ? void 0 : _20.bareNewDTW) {
|
|
7861
7861
|
var newCalendarEvents = renderEventAvailabilities().map(function (ev) {
|
|
7862
7862
|
var _a, _b, _c, _d;
|
|
7863
7863
|
return ({
|
|
@@ -7885,9 +7885,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7885
7885
|
var _a, _b;
|
|
7886
7886
|
if (event.id)
|
|
7887
7887
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", event.id, "general");
|
|
7888
|
-
}, darkMode: (
|
|
7888
|
+
}, darkMode: (_21 = props.organise) === null || _21 === void 0 ? void 0 : _21.darkMode, className: "w-full" }))));
|
|
7889
7889
|
}
|
|
7890
|
-
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (
|
|
7890
|
+
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(calendar_1.Calendar, { currentDate: calendarTabMonth, calendarView: (_22 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _22 !== void 0 ? _22 : calendarView, handleMonthChange: function (date) {
|
|
7891
7891
|
var startOfMonth = (0, dayjs_1.default)(calendarTabMonth).startOf("month");
|
|
7892
7892
|
var endOfMonth = (0, dayjs_1.default)(calendarTabMonth).endOf("month");
|
|
7893
7893
|
if (!(0, dayjs_1.default)(date).isBetween(startOfMonth, endOfMonth)) {
|
|
@@ -7905,7 +7905,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7905
7905
|
else if (selectedTabData.viewType === "feeds") {
|
|
7906
7906
|
var contentList_1 = [];
|
|
7907
7907
|
var feedsSettings_1 = selectedTabData.feedsSettings;
|
|
7908
|
-
var customFeedsData = (
|
|
7908
|
+
var customFeedsData = (_23 = feedsSettings_1 === null || feedsSettings_1 === void 0 ? void 0 : feedsSettings_1.customFeedsData) === null || _23 === void 0 ? void 0 : _23.call(feedsSettings_1, tableData, spaceTableData);
|
|
7909
7909
|
if (customFeedsData && customFeedsData.length > 0) {
|
|
7910
7910
|
customFeedsData.map(function (eachData) {
|
|
7911
7911
|
var _a, _b, _c, _d;
|
|
@@ -7946,11 +7946,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7946
7946
|
});
|
|
7947
7947
|
}
|
|
7948
7948
|
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement("div", { className: "p-4 bg-white rounded-lg" },
|
|
7949
|
-
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (
|
|
7949
|
+
react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_24 = props.organise) === null || _24 === void 0 ? void 0 : _24.darkMode }),
|
|
7950
7950
|
react_1.default.createElement("div", { className: "my-10" }),
|
|
7951
|
-
contentList_1.length > 0 && !((
|
|
7951
|
+
contentList_1.length > 0 && !((_25 = props.organise) === null || _25 === void 0 ? void 0 : _25.hidePagination) && (react_1.default.createElement(pagination_1.Pagination, { data: tableData, size: size, limit: limit, cursor: cursor, pageIndex: pageIndex, paginationType: renderResolvedPaginationType(), handleUpdatePageIndex: function (value) {
|
|
7952
7952
|
handlePagination(value);
|
|
7953
|
-
}, darkMode: (
|
|
7953
|
+
}, darkMode: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.darkMode, customPaginationSize: customPaginationSize }))))));
|
|
7954
7954
|
}
|
|
7955
7955
|
else if (selectedTabData.viewType === "map") {
|
|
7956
7956
|
var mapSettings_1 = selectedTabData.mapSettings;
|
|
@@ -8049,7 +8049,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8049
8049
|
}
|
|
8050
8050
|
else if (selectedTabData.viewType === "kanban") {
|
|
8051
8051
|
var kanbanSettings = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.kanbanSettings;
|
|
8052
|
-
var kanbanTitle_2 = (
|
|
8052
|
+
var kanbanTitle_2 = (_27 = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _27 !== void 0 ? _27 : "";
|
|
8053
8053
|
var nullColumn_1 = false;
|
|
8054
8054
|
var groupBy_1 = [];
|
|
8055
8055
|
var groupLabel_1 = [];
|
|
@@ -8070,10 +8070,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8070
8070
|
});
|
|
8071
8071
|
var kanbanData = renderGridAndListData("", "kanban", kanbanTitle_2, kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.useColumnName);
|
|
8072
8072
|
// INFO: when bareNewDTW is enabled, render NewKanban instead of legacy Kanban
|
|
8073
|
-
if ((
|
|
8073
|
+
if ((_28 = props.bareSettings) === null || _28 === void 0 ? void 0 : _28.bareNewDTW) {
|
|
8074
8074
|
return (react_1.default.createElement(newKanban_1.NewKanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
8075
8075
|
? "Data has exceeded limit, please apply filters"
|
|
8076
|
-
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (
|
|
8076
|
+
: "", groupCluster: kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.groupCluster, draggable: true, droppable: kanbanDroppable, mobileView: (_29 = props.bareSettings) === null || _29 === void 0 ? void 0 : _29.bareListMobileView, onUpdateData: function (cardId, _fromCol, toCol) {
|
|
8077
8077
|
var _a;
|
|
8078
8078
|
setKanbanDroppable(false);
|
|
8079
8079
|
handleSubmitData("update", cardId, kanbanTitle_2, (_a = {},
|
|
@@ -8082,7 +8082,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8082
8082
|
}, onClickData: function (id) {
|
|
8083
8083
|
var _a, _b;
|
|
8084
8084
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
8085
|
-
}, darkMode: (
|
|
8085
|
+
}, darkMode: (_30 = props.organise) === null || _30 === void 0 ? void 0 : _30.darkMode }));
|
|
8086
8086
|
}
|
|
8087
8087
|
return (react_1.default.createElement(kanban_1.Kanban, { className: "inline-flex", data: kanbanData, loading: tableLoading, groupBy: groupBy_1, groupId: kanbanTitle_2 !== null && kanbanTitle_2 !== void 0 ? kanbanTitle_2 : "", groupLabel: groupLabel_1.length > 0 ? groupLabel_1 : undefined, nullColumn: nullColumn_1, alertMessage: kanbanData.length === limit
|
|
8088
8088
|
? "Data has exceeded limit, please apply filters"
|