blixify-ui-web 1.2.78 → 1.2.79
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 +32 -22
- package/lib/components/data/dataTemplate/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 +9 -0
- package/lib/components/display/newTable/index.js.map +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":"AAkCA,OAAO,KASN,MAAM,OAAO,CAAC;AAwFf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAwD1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAkCA,OAAO,KASN,MAAM,OAAO,CAAC;AAwFf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAwD1B,eAAO,MAAM,YAAY,mFAsoYvB,CAAC"}
|
|
@@ -7885,6 +7885,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7885
7885
|
}
|
|
7886
7886
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onAddColumns) === null || _b === void 0 ? void 0 : _b.call(_a, __spreadArray(__spreadArray([], structure, true), [newColumn], false));
|
|
7887
7887
|
};
|
|
7888
|
+
// INFO: reported through the same onAddColumns callback as adding one — the
|
|
7889
|
+
// consumer receives the whole model either way, so the schema has one
|
|
7890
|
+
// destination rather than a second place to be written.
|
|
7891
|
+
var handleDeletePlainColumn = function (columnId) {
|
|
7892
|
+
var _a, _b;
|
|
7893
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.onAddColumns) === null || _b === void 0 ? void 0 : _b.call(_a, structure.filter(function (eachColumn) { return eachColumn.id !== columnId; }));
|
|
7894
|
+
};
|
|
7888
7895
|
var renderAddMathColumn = function (id, onClose) {
|
|
7889
7896
|
var _a, _b, _c;
|
|
7890
7897
|
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 }));
|
|
@@ -7935,7 +7942,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7935
7942
|
return groups;
|
|
7936
7943
|
};
|
|
7937
7944
|
var renderGroupTable = function (multipleSelect) {
|
|
7938
|
-
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;
|
|
7945
|
+
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;
|
|
7939
7946
|
if (groupId && !((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareNewDTW)) {
|
|
7940
7947
|
var groupAttributeDS_1 = structure.find(function (eachDS) { return eachDS.id === groupId; });
|
|
7941
7948
|
var groupedSpaceTableData = spaceTableData.reduce(function (acc, eachData) {
|
|
@@ -8127,20 +8134,23 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8127
8134
|
onAddColumn: ((_y = props.bareSettings) === null || _y === void 0 ? void 0 : _y.bareAddColumns)
|
|
8128
8135
|
? handleAddPlainColumn
|
|
8129
8136
|
: undefined,
|
|
8130
|
-
|
|
8137
|
+
onDeleteColumn: ((_z = props.bareSettings) === null || _z === void 0 ? void 0 : _z.bareAddColumns)
|
|
8138
|
+
? handleDeletePlainColumn
|
|
8139
|
+
: undefined,
|
|
8140
|
+
renderAddColumnElements: ((_0 = props.bareSettings) === null || _0 === void 0 ? void 0 : _0.bareAddColumns)
|
|
8131
8141
|
? undefined
|
|
8132
8142
|
: renderAddMathColumn,
|
|
8133
8143
|
// INFO: the popup's reference pickers read from the same providers
|
|
8134
8144
|
// the schema editor uses — without them a reference column would be
|
|
8135
8145
|
// created with no target and resolve nothing
|
|
8136
|
-
renderReferenceSpaceOptions: (
|
|
8137
|
-
renderReferenceLabelOptions: (
|
|
8146
|
+
renderReferenceSpaceOptions: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.renderReferenceSpaceOptions,
|
|
8147
|
+
renderReferenceLabelOptions: (_2 = props.organise) === null || _2 === void 0 ? void 0 : _2.renderReferenceLabelOptions,
|
|
8138
8148
|
dragEnabled: isViewSettingsEnabled,
|
|
8139
8149
|
sortEnabled: isViewSettingsEnabled,
|
|
8140
8150
|
// INFO: per-column header filter is replaced by the flex filters
|
|
8141
8151
|
filterEnabled: false,
|
|
8142
8152
|
sortId: activeSortId,
|
|
8143
|
-
sortOptions: (
|
|
8153
|
+
sortOptions: (_5 = (_4 = (_3 = props.organise) === null || _3 === void 0 ? void 0 : _3.renderReferenceLabelOptions) === null || _4 === void 0 ? void 0 : _4.call(_3)) !== null && _5 !== void 0 ? _5 : (isViewSettingsEnabled
|
|
8144
8154
|
? getViewSettingsColumns().map(function (eachColumn) {
|
|
8145
8155
|
var _a;
|
|
8146
8156
|
return ({
|
|
@@ -8172,7 +8182,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8172
8182
|
return renderSearchContent(newQuery);
|
|
8173
8183
|
},
|
|
8174
8184
|
}, editable: {
|
|
8175
|
-
active: ((
|
|
8185
|
+
active: ((_6 = props.edit) === null || _6 === void 0 ? void 0 : _6.listEditable) && !props.edit.disabledUpdate
|
|
8176
8186
|
? true
|
|
8177
8187
|
: false,
|
|
8178
8188
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -8186,7 +8196,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8186
8196
|
});
|
|
8187
8197
|
}); },
|
|
8188
8198
|
}, onObjectEdit: handleObjectCellEdit, addable: {
|
|
8189
|
-
active: ((
|
|
8199
|
+
active: ((_7 = props.edit) === null || _7 === void 0 ? void 0 : _7.listAddable) ? true : false,
|
|
8190
8200
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8191
8201
|
return __generator(this, function (_a) {
|
|
8192
8202
|
switch (_a.label) {
|
|
@@ -8197,27 +8207,27 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8197
8207
|
}
|
|
8198
8208
|
});
|
|
8199
8209
|
}); },
|
|
8200
|
-
}, darkMode: (
|
|
8210
|
+
}, darkMode: (_8 = props.organise) === null || _8 === void 0 ? void 0 : _8.darkMode, hidePagination: (_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_10 = props.organise) === null || _10 === void 0 ? void 0 : _10.disableEllipsisOnLongWord, pinColumns: (_11 = props.bareSettings) === null || _11 === void 0 ? void 0 : _11.bareListTablePinColumns }));
|
|
8201
8211
|
}
|
|
8202
|
-
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, 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: (
|
|
8212
|
+
return (react_1.default.createElement(table_1.Table, { showId: showId, paginationType: renderResolvedPaginationType(), data: tableData, spaceData: spaceTableData !== null && spaceTableData !== void 0 ? spaceTableData : [], referencesOptions: listReferencesOptions, 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: (_13 = (_12 = props.organise) === null || _12 === void 0 ? void 0 : _12.disableSelectFullData) === null || _13 === void 0 ? void 0 : _13.table, multiActionButton: react_1.default.createElement("div", { className: "flex flex-row space-x-3" },
|
|
8203
8213
|
selectedIds.length > 0 &&
|
|
8204
|
-
!((
|
|
8205
|
-
!((
|
|
8214
|
+
!((_14 = props.edit) === null || _14 === void 0 ? void 0 : _14.disabledUpdate) &&
|
|
8215
|
+
!((_15 = props.bareSettings) === null || _15 === void 0 ? void 0 : _15.bareHideTableExtraMultipleAction) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
8206
8216
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Change to Draft", disable: loading, onClick: function () {
|
|
8207
8217
|
handleBatchDraftData();
|
|
8208
8218
|
} }),
|
|
8209
8219
|
react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Clone Items", disable: loading, onClick: function () {
|
|
8210
8220
|
handleCloneSelectedData();
|
|
8211
8221
|
} }))),
|
|
8212
|
-
((
|
|
8222
|
+
((_16 = props.edit) === null || _16 === void 0 ? void 0 : _16.deleteBtn) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm text-red-500 hover:text-red-600", text: "Delete", onClick: function () {
|
|
8213
8223
|
handleGenerateDeletePasscode();
|
|
8214
8224
|
setDeleteModal(true);
|
|
8215
8225
|
} })),
|
|
8216
|
-
!isFirebase && !((
|
|
8226
|
+
!isFirebase && !((_17 = props.edit) === null || _17 === void 0 ? void 0 : _17.disableBatchUpdate) && (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm", text: "Update", onClick: function () {
|
|
8217
8227
|
setBatchUpdateModal(true);
|
|
8218
8228
|
} })),
|
|
8219
|
-
((
|
|
8220
|
-
((
|
|
8229
|
+
((_18 = props.bareSettings) === null || _18 === void 0 ? void 0 : _18.bareListMultipleSelectAddtionalActions) &&
|
|
8230
|
+
((_20 = (_19 = props.bareSettings) === null || _19 === void 0 ? void 0 : _19.bareListMultipleSelectAddtionalActions) === null || _20 === void 0 ? void 0 : _20.map(function (eachButton) {
|
|
8221
8231
|
return (react_1.default.createElement(textButton_1.TextButton, { className: "text-sm ".concat(eachButton.className), text: eachButton.text, onClick: function () {
|
|
8222
8232
|
var _a, _b;
|
|
8223
8233
|
(_a = eachButton.onClick) === null || _a === void 0 ? void 0 : _a.call(eachButton, selectedIds, selectAll, (_b = renderImpSearchFilterConditions()) !== null && _b !== void 0 ? _b : []);
|
|
@@ -8225,17 +8235,17 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8225
8235
|
}))), handleSelectAll: handleSelectAllPages, handleSelectedIds: handleSelectIds, header: renderTableHeader(), pageIndex: pageIndex !== null && pageIndex !== void 0 ? pageIndex : 0, onClickRow: function (id) {
|
|
8226
8236
|
var _a, _b;
|
|
8227
8237
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
8228
|
-
}, linkType: props.linkType, custom: props.custom, newTabUrl: (
|
|
8238
|
+
}, linkType: props.linkType, custom: props.custom, newTabUrl: (_22 = (_21 = props.newTabUrl) === null || _21 === void 0 ? void 0 : _21.default) !== null && _22 !== void 0 ? _22 : "".concat(props.localURLEndpoint, "?data="), addNewTabUrl: (_24 = (_23 = props.newTabUrl) === null || _23 === void 0 ? void 0 : _23.addons) !== null && _24 !== void 0 ? _24 : "&type=read&collection=".concat(props.collectionId, "&view=general"), handleUpdatePageIndex: function (value) {
|
|
8229
8239
|
handlePagination(value);
|
|
8230
|
-
}, className: "mt-5", lib: { axios: (
|
|
8231
|
-
addColumnEnabled: (
|
|
8240
|
+
}, className: "mt-5", lib: { axios: (_25 = props.lib) === null || _25 === void 0 ? void 0 : _25.axios }, devSettings: props.devSettings, bareSettings: props.bareSettings, fixedPagination: (_26 = props.organise) === null || _26 === void 0 ? void 0 : _26.fixedPagination, advSettings: {
|
|
8241
|
+
addColumnEnabled: (_27 = props.organise) === null || _27 === void 0 ? void 0 : _27.addColumnEnabled,
|
|
8232
8242
|
renderAddColumnElements: renderAddMathColumn,
|
|
8233
8243
|
dragEnabled: isViewSettingsEnabled,
|
|
8234
8244
|
sortEnabled: isViewSettingsEnabled,
|
|
8235
8245
|
// INFO: per-column header filter is replaced by the flex filters
|
|
8236
8246
|
filterEnabled: false,
|
|
8237
8247
|
sortId: activeSortId,
|
|
8238
|
-
sortOptions: (
|
|
8248
|
+
sortOptions: (_30 = (_29 = (_28 = props.organise) === null || _28 === void 0 ? void 0 : _28.renderReferenceLabelOptions) === null || _29 === void 0 ? void 0 : _29.call(_28)) !== null && _30 !== void 0 ? _30 : (isViewSettingsEnabled
|
|
8239
8249
|
? getViewSettingsColumns().map(function (eachColumn) {
|
|
8240
8250
|
var _a;
|
|
8241
8251
|
return ({
|
|
@@ -8264,7 +8274,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8264
8274
|
return renderSearchContent(newQuery);
|
|
8265
8275
|
},
|
|
8266
8276
|
}, editable: {
|
|
8267
|
-
active: ((
|
|
8277
|
+
active: ((_31 = props.edit) === null || _31 === void 0 ? void 0 : _31.listEditable) && !props.edit.disabledUpdate
|
|
8268
8278
|
? true
|
|
8269
8279
|
: false,
|
|
8270
8280
|
onUpdateData: function (rowId, columnId, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -8278,7 +8288,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8278
8288
|
});
|
|
8279
8289
|
}); },
|
|
8280
8290
|
}, onObjectEdit: handleObjectCellEdit, addable: {
|
|
8281
|
-
active: ((
|
|
8291
|
+
active: ((_32 = props.edit) === null || _32 === void 0 ? void 0 : _32.listAddable) ? true : false,
|
|
8282
8292
|
onAddData: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
8283
8293
|
return __generator(this, function (_a) {
|
|
8284
8294
|
switch (_a.label) {
|
|
@@ -8289,7 +8299,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
8289
8299
|
}
|
|
8290
8300
|
});
|
|
8291
8301
|
}); },
|
|
8292
|
-
}, darkMode: (
|
|
8302
|
+
}, darkMode: (_33 = props.organise) === null || _33 === void 0 ? void 0 : _33.darkMode, hidePagination: (_34 = props.organise) === null || _34 === void 0 ? void 0 : _34.hidePagination, customPaginationSize: customPaginationSize, disableEllipsisOnLongWord: (_35 = props.organise) === null || _35 === void 0 ? void 0 : _35.disableEllipsisOnLongWord }));
|
|
8293
8303
|
}
|
|
8294
8304
|
};
|
|
8295
8305
|
var renderTabContent = function (tabs, dataType, viewType) {
|