blixify-ui-web 0.2.2 → 0.2.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/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +70 -20
- 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/data/dataTemplate/settingsModal.d.ts +9 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +106 -3
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts +16 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts +2 -1
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +6 -2
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/data/stories.d.ts.map +1 -1
- package/lib/components/data/stories.js +8 -0
- package/lib/components/data/stories.js.map +1 -1
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +3 -3
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/input/markdown/index.js +1 -1
- package/lib/components/input/markdown/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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAON,MAAM,OAAO,CAAC;AAoDf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAQ1B,eAAO,MAAM,YAAY,mFA+4IvB,CAAC"}
|
|
@@ -128,6 +128,7 @@ var dataStateModel_1 = require("./dataStateModel");
|
|
|
128
128
|
var indexedDb_1 = require("./indexedDb");
|
|
129
129
|
var pagination_1 = require("./pagination");
|
|
130
130
|
var settingsModal_1 = require("./settingsModal");
|
|
131
|
+
var feeds_1 = require("../../display/feeds");
|
|
131
132
|
exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
132
133
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
133
134
|
var formRef = (0, react_1.createRef)();
|
|
@@ -293,25 +294,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
293
294
|
}
|
|
294
295
|
}, [props.type, props.id]);
|
|
295
296
|
(0, react_1.useEffect)(function () {
|
|
296
|
-
var _a, _b, _c;
|
|
297
|
+
var _a, _b, _c, _d;
|
|
297
298
|
if (!selectedTab) {
|
|
298
299
|
var currentTab = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs) === null || _b === void 0 ? void 0 : _b.find(function (eachTab) { var _a; return (0, utils_1.lowercaseTextToId)(eachTab.name) === ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.viewId); });
|
|
299
|
-
if (currentTab
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
hrefPoint
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
id
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
300
|
+
if (currentTab) {
|
|
301
|
+
if (currentTab.viewType === "calendar" ||
|
|
302
|
+
currentTab.viewType === "feeds") {
|
|
303
|
+
var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(props.type, "&collection=").concat(props.collectionId);
|
|
304
|
+
if (props.id)
|
|
305
|
+
hrefPoint += "&data=".concat(props.id);
|
|
306
|
+
var id = (0, utils_1.lowercaseTextToId)(currentTab.name);
|
|
307
|
+
setSelectedTab({
|
|
308
|
+
id: id,
|
|
309
|
+
name: currentTab.name,
|
|
310
|
+
href: hrefPoint + "&view=".concat(id),
|
|
311
|
+
type: currentTab.type,
|
|
312
|
+
viewType: currentTab.viewType,
|
|
313
|
+
viewImage: currentTab.viewImage,
|
|
314
|
+
calendarSettings: (_c = currentTab.calendarSettings) !== null && _c !== void 0 ? _c : undefined,
|
|
315
|
+
feedsSettings: (_d = currentTab.feedsSettings) !== null && _d !== void 0 ? _d : undefined,
|
|
316
|
+
});
|
|
317
|
+
if (listRQueryHocRef.current)
|
|
318
|
+
listRQueryHocRef.current.handleRefresh();
|
|
319
|
+
}
|
|
315
320
|
}
|
|
316
321
|
}
|
|
317
322
|
}, [
|
|
@@ -508,11 +513,18 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
508
513
|
}
|
|
509
514
|
};
|
|
510
515
|
var handleSetListData = function (tableData, spaceTableData) {
|
|
511
|
-
var _a, _b;
|
|
516
|
+
var _a, _b, _c, _d, _e;
|
|
512
517
|
setTableData(tableData);
|
|
513
518
|
setSpaceTableData(spaceTableData);
|
|
514
519
|
if (tableData.length > 0)
|
|
515
520
|
(_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareListHandleData) === null || _b === void 0 ? void 0 : _b.call(_a, tableData, spaceTableData);
|
|
521
|
+
if (((_c = props.organise) === null || _c === void 0 ? void 0 : _c.extendedTabs) &&
|
|
522
|
+
props.organise.extendedTabs.length > 0) {
|
|
523
|
+
var feedsTab = props.organise.extendedTabs.find(function (eachTab) { return eachTab.viewType === "feeds"; });
|
|
524
|
+
if (feedsTab) {
|
|
525
|
+
(_e = (_d = feedsTab.feedsSettings) === null || _d === void 0 ? void 0 : _d.customFeedsData) === null || _e === void 0 ? void 0 : _e.call(_d, tableData, spaceTableData);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
516
528
|
};
|
|
517
529
|
var handleGetListData = function (responseData, type, rowId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
518
530
|
var dataList, prettierDataList, dummyPrettierDataList_1, selectedIndex_1, newTableData, newPrettierTableData, isExists;
|
|
@@ -2815,7 +2827,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2815
2827
|
if (((_d = props.organise) === null || _d === void 0 ? void 0 : _d.extendedTabs) &&
|
|
2816
2828
|
((_e = props.organise.extendedTabs) === null || _e === void 0 ? void 0 : _e.length) > 0) {
|
|
2817
2829
|
(_f = props.organise) === null || _f === void 0 ? void 0 : _f.extendedTabs.map(function (eachTab) {
|
|
2818
|
-
var _a;
|
|
2830
|
+
var _a, _b;
|
|
2819
2831
|
var hrefPoint = "".concat(props.localURLEndpoint, "?type=").concat(props.type, "&collection=").concat(props.collectionId);
|
|
2820
2832
|
if (props.id)
|
|
2821
2833
|
hrefPoint += "&data=".concat(props.id);
|
|
@@ -2828,6 +2840,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2828
2840
|
viewType: eachTab.viewType,
|
|
2829
2841
|
viewImage: eachTab.viewImage,
|
|
2830
2842
|
calendarSettings: (_a = eachTab.calendarSettings) !== null && _a !== void 0 ? _a : undefined,
|
|
2843
|
+
feedsSettings: (_b = eachTab.feedsSettings) !== null && _b !== void 0 ? _b : undefined,
|
|
2831
2844
|
};
|
|
2832
2845
|
if (eachTab.viewType === "iframe")
|
|
2833
2846
|
tabData["iframeSrc"] = eachTab.src;
|
|
@@ -3133,7 +3146,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3133
3146
|
return gridData;
|
|
3134
3147
|
};
|
|
3135
3148
|
var renderTabContent = function (tabs, dataType, viewType) {
|
|
3136
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3149
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
3137
3150
|
var selectedTabData = tabs.find(function (eachTab) {
|
|
3138
3151
|
if (eachTab.id === viewType) {
|
|
3139
3152
|
return eachTab;
|
|
@@ -3330,6 +3343,43 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
3330
3343
|
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
|
|
3331
3344
|
}, lib: { moment: moment_1.default } }))));
|
|
3332
3345
|
}
|
|
3346
|
+
else if (selectedTabData.viewType === "feeds") {
|
|
3347
|
+
var feedsSettings_1 = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.feedsSettings;
|
|
3348
|
+
var contentList_1 = [];
|
|
3349
|
+
var feedsTab = (_m = (_l = props.organise) === null || _l === void 0 ? void 0 : _l.extendedTabs) === null || _m === void 0 ? void 0 : _m.find(function (eachTab) { return eachTab.viewType === "feeds"; });
|
|
3350
|
+
if (feedsTab) {
|
|
3351
|
+
var customFeedsData = (_p = (_o = feedsTab.feedsSettings) === null || _o === void 0 ? void 0 : _o.customFeedsData) === null || _p === void 0 ? void 0 : _p.call(_o, tableData, spaceTableData);
|
|
3352
|
+
if (customFeedsData && customFeedsData.length > 0) {
|
|
3353
|
+
customFeedsData.map(function (eachData) {
|
|
3354
|
+
var _a, _b, _c, _d, _e;
|
|
3355
|
+
var content = {
|
|
3356
|
+
content: (_a = eachData.content) !== null && _a !== void 0 ? _a : "",
|
|
3357
|
+
addContent: (_b = eachData.addContent) !== null && _b !== void 0 ? _b : "",
|
|
3358
|
+
step: (_c = eachData.step) !== null && _c !== void 0 ? _c : "",
|
|
3359
|
+
iconClass: (_d = eachData.iconClass) !== null && _d !== void 0 ? _d : "",
|
|
3360
|
+
iconType: (_e = eachData.iconType) !== null && _e !== void 0 ? _e : (react_1.default.createElement(solid_1.CheckIcon, { className: "h-5 w-5 text-white" })),
|
|
3361
|
+
};
|
|
3362
|
+
contentList_1.push(content);
|
|
3363
|
+
return null;
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
else {
|
|
3367
|
+
spaceTableData.map(function (eachData) {
|
|
3368
|
+
var _a, _b, _c, _d, _e;
|
|
3369
|
+
var content = {
|
|
3370
|
+
content: (_a = eachData[feedsSettings_1.title]) !== null && _a !== void 0 ? _a : "",
|
|
3371
|
+
addContent: (react_1.default.createElement("p", { className: "mt-2 text-sm text-gray-500" }, (_b = eachData[feedsSettings_1.content]) !== null && _b !== void 0 ? _b : "")),
|
|
3372
|
+
step: (_c = eachData[feedsSettings_1.step]) !== null && _c !== void 0 ? _c : "",
|
|
3373
|
+
iconClass: (_d = feedsSettings_1.iconClass) !== null && _d !== void 0 ? _d : "bg-primary-500",
|
|
3374
|
+
iconType: (_e = feedsSettings_1.icon) !== null && _e !== void 0 ? _e : (react_1.default.createElement(solid_1.CheckIcon, { className: "h-5 w-5 text-white" })),
|
|
3375
|
+
};
|
|
3376
|
+
contentList_1.push(content);
|
|
3377
|
+
return null;
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
}
|
|
3381
|
+
return (react_1.default.createElement("div", { className: "mt-4" }, tableLoading ? (react_1.default.createElement(loading_1.Loading, null)) : (react_1.default.createElement(feeds_1.Feeds, { bold: true, content: contentList_1, darkMode: (_q = props.organise) === null || _q === void 0 ? void 0 : _q.darkMode }))));
|
|
3382
|
+
}
|
|
3333
3383
|
else if (selectedTabData.renderComp) {
|
|
3334
3384
|
return react_1.default.createElement(react_1.default.Fragment, null, selectedTabData.renderComp());
|
|
3335
3385
|
}
|