bs-unified-ui 1.0.911 → 1.0.915
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.
|
@@ -37,5 +37,6 @@ export interface TableProps extends MuiTableProps {
|
|
|
37
37
|
colWidths?: string[];
|
|
38
38
|
rowIndeterminate?: (row: any) => boolean;
|
|
39
39
|
disableSelectAll?: boolean;
|
|
40
|
+
enablePageInput?: boolean;
|
|
40
41
|
}
|
|
41
|
-
export declare const Table: ({ data, columns: rawColumns, rowKey, sx, sort, onSort, pageStart, pageCount, page, onPageChange, onSelect, selected, outlined, toolbarCounter, toolbarSortingSelectProps, onRowClick, onRowHover, disableGutters, loading, dataTestId, disabledCheckboxes, highlight, noDataMessage, allowRowLevel, colWidths, rowIndeterminate, disableSelectAll }: TableProps) => React.JSX.Element;
|
|
42
|
+
export declare const Table: ({ data, columns: rawColumns, rowKey, sx, sort, onSort, pageStart, pageCount, page, onPageChange, onSelect, selected, outlined, toolbarCounter, toolbarSortingSelectProps, onRowClick, onRowHover, disableGutters, loading, dataTestId, disabledCheckboxes, highlight, noDataMessage, allowRowLevel, colWidths, rowIndeterminate, disableSelectAll, enablePageInput }: TableProps) => React.JSX.Element;
|
package/index.js
CHANGED
|
@@ -20748,7 +20748,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
20748
20748
|
});
|
|
20749
20749
|
|
|
20750
20750
|
var Table = function (_a) {
|
|
20751
|
-
var _b = _a.data, data = _b === void 0 ? [] : _b, _c = _a.columns, rawColumns = _c === void 0 ? [] : _c, _d = _a.rowKey, rowKey = _d === void 0 ? 'id' : _d, _e = _a.sx, sx = _e === void 0 ? {} : _e, sort = _a.sort, onSort = _a.onSort, pageStart = _a.pageStart, pageCount = _a.pageCount, _f = _a.page, page = _f === void 0 ? 0 : _f, onPageChange = _a.onPageChange, onSelect = _a.onSelect, _g = _a.selected, selected = _g === void 0 ? [] : _g, _h = _a.outlined, outlined = _h === void 0 ? true : _h, _j = _a.toolbarCounter, toolbarCounter = _j === void 0 ? '' : _j, toolbarSortingSelectProps = _a.toolbarSortingSelectProps, onRowClick = _a.onRowClick, onRowHover = _a.onRowHover, _k = _a.disableGutters, disableGutters = _k === void 0 ? false : _k, _l = _a.loading, loading = _l === void 0 ? false : _l, _m = _a.dataTestId, dataTestId = _m === void 0 ? 'table' : _m, _o = _a.disabledCheckboxes, disabledCheckboxes = _o === void 0 ? [] : _o, _p = _a.highlight, highlight = _p === void 0 ? [] : _p, _q = _a.noDataMessage, noDataMessage = _q === void 0 ? 'No data to display' : _q, _r = _a.allowRowLevel, allowRowLevel = _r === void 0 ? false : _r, _s = _a.colWidths, colWidths = _s === void 0 ? [] : _s, rowIndeterminate = _a.rowIndeterminate, _t = _a.disableSelectAll, disableSelectAll = _t === void 0 ? false : _t;
|
|
20751
|
+
var _b = _a.data, data = _b === void 0 ? [] : _b, _c = _a.columns, rawColumns = _c === void 0 ? [] : _c, _d = _a.rowKey, rowKey = _d === void 0 ? 'id' : _d, _e = _a.sx, sx = _e === void 0 ? {} : _e, sort = _a.sort, onSort = _a.onSort, pageStart = _a.pageStart, pageCount = _a.pageCount, _f = _a.page, page = _f === void 0 ? 0 : _f, onPageChange = _a.onPageChange, onSelect = _a.onSelect, _g = _a.selected, selected = _g === void 0 ? [] : _g, _h = _a.outlined, outlined = _h === void 0 ? true : _h, _j = _a.toolbarCounter, toolbarCounter = _j === void 0 ? '' : _j, toolbarSortingSelectProps = _a.toolbarSortingSelectProps, onRowClick = _a.onRowClick, onRowHover = _a.onRowHover, _k = _a.disableGutters, disableGutters = _k === void 0 ? false : _k, _l = _a.loading, loading = _l === void 0 ? false : _l, _m = _a.dataTestId, dataTestId = _m === void 0 ? 'table' : _m, _o = _a.disabledCheckboxes, disabledCheckboxes = _o === void 0 ? [] : _o, _p = _a.highlight, highlight = _p === void 0 ? [] : _p, _q = _a.noDataMessage, noDataMessage = _q === void 0 ? 'No data to display' : _q, _r = _a.allowRowLevel, allowRowLevel = _r === void 0 ? false : _r, _s = _a.colWidths, colWidths = _s === void 0 ? [] : _s, rowIndeterminate = _a.rowIndeterminate, _t = _a.disableSelectAll, disableSelectAll = _t === void 0 ? false : _t, _u = _a.enablePageInput, enablePageInput = _u === void 0 ? false : _u;
|
|
20752
20752
|
var theme = material.useTheme();
|
|
20753
20753
|
var columns = React.useMemo(function () { return rawColumns.filter(function (c) { return !(c === null || c === void 0 ? void 0 : c.hidden); }); }, [rawColumns]);
|
|
20754
20754
|
var colWidthStyles = function (colIndex) { return (__assign({ width: colWidths[colIndex] || '' }, allowRowLevel ? { maxWidth: colWidths[colIndex] || '' } : {})); };
|
|
@@ -20877,7 +20877,7 @@ var Table = function (_a) {
|
|
|
20877
20877
|
!data.length && (React.createElement(material.TableRow, null,
|
|
20878
20878
|
React.createElement(TableCell, { align: 'center', colSpan: columns.length + (onSelect ? 1 : 0) },
|
|
20879
20879
|
React.createElement(material.Typography, { variant: 'fs12', color: theme.foreground.black4 }, noDataMessage))))))),
|
|
20880
|
-
onPageChange && (React.createElement(TablePagination, { pageStart: pageStart, pageCount: pageCount, page: Number(page), onPageChange: onPageChange, dataTestId: dataTestId }))));
|
|
20880
|
+
onPageChange && (React.createElement(TablePagination, { pageStart: pageStart, pageCount: pageCount, page: Number(page), onPageChange: onPageChange, dataTestId: dataTestId, enablePageInput: enablePageInput }))));
|
|
20881
20881
|
};
|
|
20882
20882
|
|
|
20883
20883
|
var css_248z$1 = "@import url(\"https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,700&family=Lato&display=swap\");\n@import url(\"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap\");\n@import url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.css\");\n@import url(\"https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.snow.css\");\n@import url(\"https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,700&family=Lato&display=swap\");\n@import url(\"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap\");\n@import url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.css\");\n@import url(\"https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.snow.css\");\n@font-face {\n font-family: \"remixicon\";\n src: url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.eot?t=1705244689813\"); /* IE9*/\n src: url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.eot?t=1705244689813#iefix\") format(\"embedded-opentype\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.woff2?t=1705244689813\") format(\"woff2\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.woff?t=1705244689813\") format(\"woff\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.ttf?t=1705244689813\") format(\"truetype\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.svg?t=1705244689813#remixicon\") format(\"svg\"); /* iOS 4.1- */\n font-display: swap;\n}\n/* Typeface */\n/* Font size */\n/* Colors */\n/* Radius */\n/* Animations */\n.fs12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: 0em;\n}\n.fs13 {\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.0025em;\n}\n.fs14 {\n font-size: 14px;\n line-height: 24px;\n letter-spacing: -0.006em;\n}\n.fs15 {\n font-size: 15px;\n line-height: 24px;\n letter-spacing: -0.009em;\n}\n.fs16 {\n font-size: 16px;\n line-height: 24px;\n letter-spacing: -0.011em;\n}\n.fs17 {\n font-size: 17px;\n line-height: 24px;\n letter-spacing: -0.013em;\n}\n.fs18 {\n font-size: 18px;\n line-height: 24px;\n letter-spacing: -0.014em;\n}\n.fs19 {\n font-size: 19px;\n line-height: 32px;\n letter-spacing: -0.016em;\n}\n.fs20 {\n font-size: 20px;\n line-height: 32px;\n letter-spacing: -0.017em;\n}\n.fs24 {\n font-size: 24px;\n line-height: 32px;\n letter-spacing: -0.019em;\n}\n.fs30 {\n font-size: 30px;\n line-height: 40px;\n letter-spacing: -0.021em;\n}\n.fs40 {\n font-size: 40px;\n line-height: 56px;\n letter-spacing: -0.022em;\n}\n.fs42 {\n font-size: 42px;\n line-height: 56px;\n letter-spacing: -0.022em;\n}\n.fs48 {\n font-size: 48px;\n line-height: 64px;\n letter-spacing: -0.022em;\n}\n.fs60 {\n font-size: 60px;\n line-height: 80px;\n letter-spacing: -0.022em;\n}\nhtml {\n font-family: \"Lato\", sans-serif;\n}\n@font-face {\n font-family: \"remixicon\";\n src: url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.eot?t=1705244689813\"); /* IE9*/\n src: url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.eot?t=1705244689813#iefix\") format(\"embedded-opentype\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.woff2?t=1705244689813\") format(\"woff2\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.woff?t=1705244689813\") format(\"woff\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.ttf?t=1705244689813\") format(\"truetype\"), url(\"https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.svg?t=1705244689813#remixicon\") format(\"svg\"); /* iOS 4.1- */\n font-display: swap;\n}\n/* Typeface */\n/* Font size */\n/* Colors */\n/* Radius */\n/* Animations */\n.fs12 {\n font-size: 12px;\n line-height: 16px;\n letter-spacing: 0em;\n}\n.fs13 {\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.0025em;\n}\n.fs14 {\n font-size: 14px;\n line-height: 24px;\n letter-spacing: -0.006em;\n}\n.fs15 {\n font-size: 15px;\n line-height: 24px;\n letter-spacing: -0.009em;\n}\n.fs16 {\n font-size: 16px;\n line-height: 24px;\n letter-spacing: -0.011em;\n}\n.fs17 {\n font-size: 17px;\n line-height: 24px;\n letter-spacing: -0.013em;\n}\n.fs18 {\n font-size: 18px;\n line-height: 24px;\n letter-spacing: -0.014em;\n}\n.fs19 {\n font-size: 19px;\n line-height: 32px;\n letter-spacing: -0.016em;\n}\n.fs20 {\n font-size: 20px;\n line-height: 32px;\n letter-spacing: -0.017em;\n}\n.fs24 {\n font-size: 24px;\n line-height: 32px;\n letter-spacing: -0.019em;\n}\n.fs30 {\n font-size: 30px;\n line-height: 40px;\n letter-spacing: -0.021em;\n}\n.fs40 {\n font-size: 40px;\n line-height: 56px;\n letter-spacing: -0.022em;\n}\n.fs42 {\n font-size: 42px;\n line-height: 56px;\n letter-spacing: -0.022em;\n}\n.fs48 {\n font-size: 48px;\n line-height: 64px;\n letter-spacing: -0.022em;\n}\n.fs60 {\n font-size: 60px;\n line-height: 80px;\n letter-spacing: -0.022em;\n}\nhtml {\n font-family: \"Lato\", sans-serif;\n}\n.bs-unified__custom-dark-mode {\n background: #2D91FC !important;\n}";
|
|
@@ -45693,6 +45693,31 @@ var ObservableSet = /** @class */ (function () {
|
|
|
45693
45693
|
ObservableSet.prototype.keys = function () {
|
|
45694
45694
|
return this.set.keys();
|
|
45695
45695
|
};
|
|
45696
|
+
// Delete all items matching a predicate
|
|
45697
|
+
ObservableSet.prototype.deleteBy = function (predicate) {
|
|
45698
|
+
var _this = this;
|
|
45699
|
+
var toDelete = [];
|
|
45700
|
+
this.set.forEach(function (value) {
|
|
45701
|
+
if (predicate(value)) {
|
|
45702
|
+
toDelete.push(value);
|
|
45703
|
+
}
|
|
45704
|
+
});
|
|
45705
|
+
toDelete.forEach(function (value) { return _this.set.delete(value); });
|
|
45706
|
+
if (toDelete.length > 0) {
|
|
45707
|
+
this.notifyListeners();
|
|
45708
|
+
}
|
|
45709
|
+
return toDelete.length;
|
|
45710
|
+
};
|
|
45711
|
+
// Find all items matching a predicate
|
|
45712
|
+
ObservableSet.prototype.filter = function (predicate) {
|
|
45713
|
+
var result = [];
|
|
45714
|
+
this.set.forEach(function (value) {
|
|
45715
|
+
if (predicate(value)) {
|
|
45716
|
+
result.push(value);
|
|
45717
|
+
}
|
|
45718
|
+
});
|
|
45719
|
+
return result;
|
|
45720
|
+
};
|
|
45696
45721
|
return ObservableSet;
|
|
45697
45722
|
}());
|
|
45698
45723
|
|
|
@@ -46129,11 +46154,11 @@ var useNotificationsV2 = function (options) {
|
|
|
46129
46154
|
}, []);
|
|
46130
46155
|
// Helper: Stop audio for group if no reminders remain for that group
|
|
46131
46156
|
var stopAudioRepeatForGroupIfNoReminders = React.useCallback(function (group) {
|
|
46132
|
-
var
|
|
46157
|
+
var remindersForGroup = allRemindersRef.current.filter(function (key) {
|
|
46133
46158
|
var eventType = key.includes(':') ? key.split(':')[0] : key;
|
|
46134
46159
|
return getEventGroup(eventType) === group;
|
|
46135
46160
|
});
|
|
46136
|
-
if (
|
|
46161
|
+
if (remindersForGroup.length === 0) {
|
|
46137
46162
|
stopAudioRepeatForGroup(group);
|
|
46138
46163
|
}
|
|
46139
46164
|
}, [stopAudioRepeatForGroup]);
|
|
@@ -46443,14 +46468,11 @@ var useNotificationsV2 = function (options) {
|
|
|
46443
46468
|
});
|
|
46444
46469
|
setUnreadCount(0);
|
|
46445
46470
|
// Clear notification-based reminders (orders + delivery)
|
|
46446
|
-
|
|
46471
|
+
allRemindersRef.current.deleteBy(function (key) {
|
|
46447
46472
|
return NOTIFICATION_BASED_REMINDER_EVENTS.some(function (subType) {
|
|
46448
46473
|
return key.startsWith("".concat(subType, ":"));
|
|
46449
46474
|
});
|
|
46450
46475
|
});
|
|
46451
|
-
remindersToDelete.forEach(function (key) {
|
|
46452
|
-
return allRemindersRef.current.delete(key);
|
|
46453
|
-
});
|
|
46454
46476
|
// Stop audio for online_store and delivery groups if no reminders remain
|
|
46455
46477
|
['online_store', 'delivery'].forEach(stopAudioRepeatForGroupIfNoReminders);
|
|
46456
46478
|
break;
|
|
@@ -46481,15 +46503,11 @@ var useNotificationsV2 = function (options) {
|
|
|
46481
46503
|
// Handle special case: event without id but with metadata.ids (DELIVERY_REMINDER_EVENTS only)
|
|
46482
46504
|
if (((_k = incoming_notification === null || incoming_notification === void 0 ? void 0 : incoming_notification.metadata) === null || _k === void 0 ? void 0 : _k.ids) &&
|
|
46483
46505
|
Array.isArray((_l = incoming_notification === null || incoming_notification === void 0 ? void 0 : incoming_notification.metadata) === null || _l === void 0 ? void 0 : _l.ids)) {
|
|
46484
|
-
var
|
|
46485
|
-
|
|
46486
|
-
|
|
46487
|
-
|
|
46488
|
-
|
|
46489
|
-
var compositeKey = "".concat(deliverySubType, ":").concat(notificationId);
|
|
46490
|
-
if (allRemindersRef.current.has(compositeKey)) {
|
|
46491
|
-
allRemindersRef.current.delete(compositeKey);
|
|
46492
|
-
}
|
|
46506
|
+
var idsToRemove_1 = incoming_notification.metadata.ids;
|
|
46507
|
+
// Delete all reminders matching any of the notification IDs in one call
|
|
46508
|
+
allRemindersRef.current.deleteBy(function (key) {
|
|
46509
|
+
return idsToRemove_1.some(function (notificationId) {
|
|
46510
|
+
return key.includes(":".concat(notificationId));
|
|
46493
46511
|
});
|
|
46494
46512
|
});
|
|
46495
46513
|
// Check if we should stop audio for delivery group
|
|
@@ -46846,16 +46864,16 @@ var useNotificationsV2 = function (options) {
|
|
|
46846
46864
|
if (!memoizedReminderEvents)
|
|
46847
46865
|
return;
|
|
46848
46866
|
// Find reminders for disabled events
|
|
46849
|
-
var remindersToDelete =
|
|
46850
|
-
allRemindersRef.current.forEach(function (key) {
|
|
46867
|
+
var remindersToDelete = allRemindersRef.current.filter(function (key) {
|
|
46851
46868
|
var subType = key.includes(':') ? key.split(':')[0] : key;
|
|
46852
|
-
|
|
46853
|
-
remindersToDelete.push(key);
|
|
46854
|
-
}
|
|
46869
|
+
return !memoizedReminderEvents[subType];
|
|
46855
46870
|
});
|
|
46856
46871
|
if (remindersToDelete.length > 0) {
|
|
46857
46872
|
// Delete reminders
|
|
46858
|
-
|
|
46873
|
+
allRemindersRef.current.deleteBy(function (key) {
|
|
46874
|
+
var subType = key.includes(':') ? key.split(':')[0] : key;
|
|
46875
|
+
return !memoizedReminderEvents[subType];
|
|
46876
|
+
});
|
|
46859
46877
|
// Get unique groups from deleted reminders and check if audio should stop
|
|
46860
46878
|
var reminderGroupsToCheck = getReminderGroups(new Set(remindersToDelete));
|
|
46861
46879
|
reminderGroupsToCheck.forEach(stopAudioRepeatForGroupIfNoReminders);
|