blixify-ui-web 1.2.130 → 1.2.132
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 +41 -9
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +4 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts +1 -1
- package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +2 -2
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/data/utils.d.ts.map +1 -1
- package/lib/components/data/utils.js +1 -0
- package/lib/components/data/utils.js.map +1 -1
- package/lib/components/display/flexTable/index.d.ts +2 -0
- package/lib/components/display/flexTable/index.d.ts.map +1 -1
- package/lib/components/display/flexTable/index.js +27 -17
- package/lib/components/display/flexTable/index.js.map +1 -1
- package/lib/components/display/newCalendar/index.d.ts +1 -0
- package/lib/components/display/newCalendar/index.d.ts.map +1 -1
- package/lib/components/display/newCalendar/index.js +41 -13
- package/lib/components/display/newCalendar/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":"AAqCA,OAAO,KASN,MAAM,OAAO,CAAC;AA2Ff,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AA2E1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,KASN,MAAM,OAAO,CAAC;AA2Ff,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AA2E1B,eAAO,MAAM,YAAY,mFAq6avB,CAAC"}
|
|
@@ -7941,8 +7941,9 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
7941
7941
|
}
|
|
7942
7942
|
// INFO: View settings — columns (hide, reorder, search), sort and rows
|
|
7943
7943
|
// per page in one panel. Standard on the new DTW; videColumnEnabled
|
|
7944
|
-
// keeps it available to legacy and bare DTWs.
|
|
7945
|
-
|
|
7944
|
+
// keeps it available to legacy and bare DTWs. A calendar has no
|
|
7945
|
+
// columns, sort or pages, so it gets no panel.
|
|
7946
|
+
if (isViewSettingsEnabled && (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.viewType) !== "calendar") {
|
|
7946
7947
|
var hiddenColumnCount_1 = getViewSettingsColumns().filter(getIsColumnHidden).length;
|
|
7947
7948
|
// INFO: desktop and mobile both render, CSS decides which is shown —
|
|
7948
7949
|
// distinct test ids keep the two unambiguous for e2e
|
|
@@ -9392,10 +9393,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9392
9393
|
if (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.startDate) {
|
|
9393
9394
|
for (var _i = 0, spaceTableData_1 = spaceTableData; _i < spaceTableData_1.length; _i++) {
|
|
9394
9395
|
var eachData = spaceTableData_1[_i];
|
|
9396
|
+
// INFO: skip only the undated row — a union mixes collections, so
|
|
9397
|
+
// one row without a date must not hide every row after it
|
|
9395
9398
|
if (!eachData[calendarSettings_1.startDate])
|
|
9396
|
-
|
|
9399
|
+
continue;
|
|
9397
9400
|
else if (!(0, dayjs_1.default)(eachData[calendarSettings_1.startDate], "YYYY-MM-DD HH:mm A").isValid()) {
|
|
9398
|
-
|
|
9401
|
+
continue;
|
|
9399
9402
|
}
|
|
9400
9403
|
else {
|
|
9401
9404
|
var id = eachData.id;
|
|
@@ -9450,7 +9453,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9450
9453
|
}
|
|
9451
9454
|
eventAvailability["bgColor"] = color;
|
|
9452
9455
|
eventAvailability["hoverColor"] = hoverColor;
|
|
9453
|
-
|
|
9456
|
+
eventAvailability["textColor"] = "text-white";
|
|
9454
9457
|
}
|
|
9455
9458
|
eventAvailabilities.push(eventAvailability);
|
|
9456
9459
|
}
|
|
@@ -9460,7 +9463,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9460
9463
|
};
|
|
9461
9464
|
// INFO: when bareNewDTW is enabled, render NewCalendar instead of legacy Calendar
|
|
9462
9465
|
if ((_35 = props.bareSettings) === null || _35 === void 0 ? void 0 : _35.bareNewDTW) {
|
|
9463
|
-
var
|
|
9466
|
+
var mappedCalendarEvents = renderEventAvailabilities().map(function (ev) {
|
|
9464
9467
|
var _a, _b, _c, _d;
|
|
9465
9468
|
return ({
|
|
9466
9469
|
id: (_a = ev.id) !== null && _a !== void 0 ? _a : "",
|
|
@@ -9474,8 +9477,22 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9474
9477
|
textColor: ev.textColor,
|
|
9475
9478
|
status: ev.status,
|
|
9476
9479
|
date: ev.date,
|
|
9480
|
+
// INFO: the unformatted row, so a tap handler can tell which
|
|
9481
|
+
// collection a union event came from
|
|
9482
|
+
meta: {
|
|
9483
|
+
rawData: tableData.find(function (eachRow) {
|
|
9484
|
+
return [eachRow === null || eachRow === void 0 ? void 0 : eachRow[serverId], eachRow === null || eachRow === void 0 ? void 0 : eachRow._id, eachRow === null || eachRow === void 0 ? void 0 : eachRow.id].some(function (eachId) {
|
|
9485
|
+
return eachId !== undefined && String(eachId) === String(ev.id);
|
|
9486
|
+
});
|
|
9487
|
+
}),
|
|
9488
|
+
},
|
|
9477
9489
|
});
|
|
9478
9490
|
});
|
|
9491
|
+
// INFO: lets the app reshape the fetched events — e.g. expand one
|
|
9492
|
+
// repeating row into an event per day, or colour by a derived status
|
|
9493
|
+
var newCalendarEvents = props.bareSettings.bareCalendarMapEvents
|
|
9494
|
+
? props.bareSettings.bareCalendarMapEvents(mappedCalendarEvents)
|
|
9495
|
+
: mappedCalendarEvents;
|
|
9479
9496
|
// INFO: viewSwitch — optional Month/Week/Agenda toggle. The range
|
|
9480
9497
|
// query follows via calendarView ("dayGridMonth" ↔ "timeGridWeek");
|
|
9481
9498
|
// agenda lists the fetched month chronologically.
|
|
@@ -9483,6 +9500,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9483
9500
|
var VIEW_VARIANT_MAP = {
|
|
9484
9501
|
month: "fullMonth",
|
|
9485
9502
|
week: "weekTimeGrid",
|
|
9503
|
+
day: "dayTimeline",
|
|
9486
9504
|
agenda: "agenda",
|
|
9487
9505
|
};
|
|
9488
9506
|
var activeVariant = (_37 = VIEW_VARIANT_MAP[newCalendarViewMode]) !== null && _37 !== void 0 ? _37 : "fullMonth";
|
|
@@ -9496,7 +9514,11 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9496
9514
|
// only week changes the query cond. Only set loading
|
|
9497
9515
|
// when a refetch will actually fire, otherwise
|
|
9498
9516
|
// nothing clears it and the spinner hangs forever.
|
|
9499
|
-
var nextCalendarView = view === "week"
|
|
9517
|
+
var nextCalendarView = view === "week"
|
|
9518
|
+
? "timeGridWeek"
|
|
9519
|
+
: view === "day"
|
|
9520
|
+
? "timeGridDay"
|
|
9521
|
+
: "dayGridMonth";
|
|
9500
9522
|
if (nextCalendarView !== calendarView) {
|
|
9501
9523
|
setCalendarView(nextCalendarView);
|
|
9502
9524
|
setTableLoading(true);
|
|
@@ -9523,10 +9545,20 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
9523
9545
|
onChangeWeek: function (weekStart) {
|
|
9524
9546
|
setTableLoading(true);
|
|
9525
9547
|
setCalendarTabMonth(weekStart);
|
|
9548
|
+
},
|
|
9549
|
+
// INFO: Day paging in dayTimeline — the timeGridDay range
|
|
9550
|
+
// query follows calendarTabMonth
|
|
9551
|
+
onChangeDay: function (day) {
|
|
9552
|
+
setTableLoading(true);
|
|
9553
|
+
setCalendarTabMonth(day);
|
|
9526
9554
|
}, onClickEvent: function (event) {
|
|
9527
|
-
var _a, _b;
|
|
9555
|
+
var _a, _b, _c, _d;
|
|
9556
|
+
if ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareCalendarOnClickEvent) {
|
|
9557
|
+
props.bareSettings.bareCalendarOnClickEvent(event, (_b = event.meta) === null || _b === void 0 ? void 0 : _b.rawData);
|
|
9558
|
+
return;
|
|
9559
|
+
}
|
|
9528
9560
|
if (event.id)
|
|
9529
|
-
(
|
|
9561
|
+
(_d = (_c = props.organise) === null || _c === void 0 ? void 0 : _c.handleNavigate) === null || _d === void 0 ? void 0 : _d.call(_c, "read", event.id, "general");
|
|
9530
9562
|
}, darkMode: (_38 = props.organise) === null || _38 === void 0 ? void 0 : _38.darkMode, className: "w-full" }))));
|
|
9531
9563
|
}
|
|
9532
9564
|
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: (_39 = calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.defaultView) !== null && _39 !== void 0 ? _39 : calendarView, handleMonthChange: function (date) {
|