bord-design-system 0.0.44 → 0.0.45
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/dist/components/BordNotificationModal/BordNotificationModal.d.ts +1 -1
- package/dist/components/BordNotificationModal/BordNotificationModal.d.ts.map +1 -1
- package/dist/components/BordNotificationModal/BordNotificationModal.types.d.ts +1 -0
- package/dist/components/BordNotificationModal/BordNotificationModal.types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +5 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.webpack.js +5 -2
- package/dist/index.webpack.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,6 @@ import './BordNotificationModal.scss';
|
|
|
5
5
|
* presentacional: recibe los grupos ya resueltos y delega en callbacks el resto (paginar,
|
|
6
6
|
* navegar al hacer click, cerrar).
|
|
7
7
|
*/
|
|
8
|
-
declare const BordNotificationModal: ({ isOpen, onClose, state, unreadCount, onLoadMore, onNotificationClick, title, emptyStateText, loadErrorText, searchPlaceholder, closeButtonLabel, skeletonRowsCount, loadMoreSkeletonRowsCount, infiniteScrollThresholdPx, }: IBordNotificationModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
declare const BordNotificationModal: ({ isOpen, onClose, state, unreadCount, onLoadMore, onNotificationClick, onSearchChange, title, emptyStateText, loadErrorText, searchPlaceholder, closeButtonLabel, skeletonRowsCount, loadMoreSkeletonRowsCount, infiniteScrollThresholdPx, }: IBordNotificationModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export default BordNotificationModal;
|
|
10
10
|
//# sourceMappingURL=BordNotificationModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BordNotificationModal.d.ts","sourceRoot":"","sources":["../../../src/components/BordNotificationModal/BordNotificationModal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,8BAA8B,CAAC;AAwBtC;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"BordNotificationModal.d.ts","sourceRoot":"","sources":["../../../src/components/BordNotificationModal/BordNotificationModal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,8BAA8B,CAAC;AAwBtC;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,kPAgBxB,2BAA2B,mDAwF7B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -16,6 +16,7 @@ export interface IBordNotificationModalProps {
|
|
|
16
16
|
unreadCount: number;
|
|
17
17
|
onLoadMore: () => void;
|
|
18
18
|
onNotificationClick: (notificationId: number) => void;
|
|
19
|
+
onSearchChange?: (query: string) => void;
|
|
19
20
|
title: string;
|
|
20
21
|
emptyStateText: string;
|
|
21
22
|
loadErrorText: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BordNotificationModal.types.d.ts","sourceRoot":"","sources":["../../../src/components/BordNotificationModal/BordNotificationModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAElG,MAAM,MAAM,2BAA2B,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,0BAA0B,EAAE,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtG,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,2BAA2B,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,mBAAmB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC"}
|
|
1
|
+
{"version":3,"file":"BordNotificationModal.types.d.ts","sourceRoot":"","sources":["../../../src/components/BordNotificationModal/BordNotificationModal.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAElG,MAAM,MAAM,2BAA2B,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,0BAA0B,EAAE,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtG,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,2BAA2B,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,mBAAmB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2995,6 +2995,7 @@ interface IBordNotificationModalProps {
|
|
|
2995
2995
|
unreadCount: number;
|
|
2996
2996
|
onLoadMore: () => void;
|
|
2997
2997
|
onNotificationClick: (notificationId: number) => void;
|
|
2998
|
+
onSearchChange?: (query: string) => void;
|
|
2998
2999
|
title: string;
|
|
2999
3000
|
emptyStateText: string;
|
|
3000
3001
|
loadErrorText: string;
|
|
@@ -3010,7 +3011,7 @@ interface IBordNotificationModalProps {
|
|
|
3010
3011
|
* presentacional: recibe los grupos ya resueltos y delega en callbacks el resto (paginar,
|
|
3011
3012
|
* navegar al hacer click, cerrar).
|
|
3012
3013
|
*/
|
|
3013
|
-
declare const BordNotificationModal: ({ isOpen, onClose, state, unreadCount, onLoadMore, onNotificationClick, title, emptyStateText, loadErrorText, searchPlaceholder, closeButtonLabel, skeletonRowsCount, loadMoreSkeletonRowsCount, infiniteScrollThresholdPx, }: IBordNotificationModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
3014
|
+
declare const BordNotificationModal: ({ isOpen, onClose, state, unreadCount, onLoadMore, onNotificationClick, onSearchChange, title, emptyStateText, loadErrorText, searchPlaceholder, closeButtonLabel, skeletonRowsCount, loadMoreSkeletonRowsCount, infiniteScrollThresholdPx, }: IBordNotificationModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
3014
3015
|
|
|
3015
3016
|
/**
|
|
3016
3017
|
* Fila individual del centro de notificaciones. Es puramente presentacional: recibe el
|
package/dist/index.esm.js
CHANGED
|
@@ -44644,7 +44644,7 @@ const matchesNotificationSearch = (query, entityId) => {
|
|
|
44644
44644
|
* presentacional: recibe los grupos ya resueltos y delega en callbacks el resto (paginar,
|
|
44645
44645
|
* navegar al hacer click, cerrar).
|
|
44646
44646
|
*/
|
|
44647
|
-
const BordNotificationModal = ({ isOpen, onClose, state, unreadCount, onLoadMore, onNotificationClick, title, emptyStateText, loadErrorText, searchPlaceholder, closeButtonLabel, skeletonRowsCount = 6, loadMoreSkeletonRowsCount = 3, infiniteScrollThresholdPx = 120, }) => {
|
|
44647
|
+
const BordNotificationModal = ({ isOpen, onClose, state, unreadCount, onLoadMore, onNotificationClick, onSearchChange, title, emptyStateText, loadErrorText, searchPlaceholder, closeButtonLabel, skeletonRowsCount = 6, loadMoreSkeletonRowsCount = 3, infiniteScrollThresholdPx = 120, }) => {
|
|
44648
44648
|
const [searchQuery, setSearchQuery] = useState('');
|
|
44649
44649
|
const handleBodyScroll = (event) => {
|
|
44650
44650
|
if (state.kind !== 'ready' || !state.hasMore || state.isLoadingMore)
|
|
@@ -44668,7 +44668,10 @@ const BordNotificationModal = ({ isOpen, onClose, state, unreadCount, onLoadMore
|
|
|
44668
44668
|
if (!isOpen)
|
|
44669
44669
|
return null;
|
|
44670
44670
|
const isEmpty = state.kind === 'ready' && filteredGroups.length === 0;
|
|
44671
|
-
return (jsx(BordModal, { clickOutsideCallback: onClose, customClassName: "bordNotificationModalOverlay", modalContent: jsxs("div", { className: "bordNotificationModalDS", children: [jsxs("div", { className: "bordNotificationModalHeader", children: [jsxs("div", { className: "bordNotificationModalTitleGroup", children: [jsx("span", { className: "bordNotificationModalTitle", children: title }), jsxs("span", { className: "bordNotificationModalCount", children: ["(", unreadCount, ")"] })] }), jsx("button", { type: "button", className: "bordNotificationModalCloseButton", onClick: onClose, "aria-label": closeButtonLabel, children: jsx(BordOneToneIcon, { variant: "x", customWidth: "1.3rem", stroke: "#C6C7CB" }) })] }), jsx("div", { className: "bordNotificationModalSearchWrapper", children: jsxs("div", { className: "bordNotificationModalSearch", children: [jsx(BordOneToneIcon, { variant: "search", customWidth: "1.3rem", stroke: "#626C82" }), jsx("input", { type: "text", value: searchQuery, onChange: event =>
|
|
44671
|
+
return (jsx(BordModal, { clickOutsideCallback: onClose, customClassName: "bordNotificationModalOverlay", modalContent: jsxs("div", { className: "bordNotificationModalDS", children: [jsxs("div", { className: "bordNotificationModalHeader", children: [jsxs("div", { className: "bordNotificationModalTitleGroup", children: [jsx("span", { className: "bordNotificationModalTitle", children: title }), jsxs("span", { className: "bordNotificationModalCount", children: ["(", unreadCount, ")"] })] }), jsx("button", { type: "button", className: "bordNotificationModalCloseButton", onClick: onClose, "aria-label": closeButtonLabel, children: jsx(BordOneToneIcon, { variant: "x", customWidth: "1.3rem", stroke: "#C6C7CB" }) })] }), jsx("div", { className: "bordNotificationModalSearchWrapper", children: jsxs("div", { className: "bordNotificationModalSearch", children: [jsx(BordOneToneIcon, { variant: "search", customWidth: "1.3rem", stroke: "#626C82" }), jsx("input", { type: "text", value: searchQuery, onChange: event => {
|
|
44672
|
+
setSearchQuery(event.target.value);
|
|
44673
|
+
onSearchChange?.(event.target.value);
|
|
44674
|
+
}, placeholder: searchPlaceholder })] }) }), jsxs("div", { className: "bordNotificationModalBody", onScroll: handleBodyScroll, children: [state.kind === 'loading' &&
|
|
44672
44675
|
Array.from({ length: skeletonRowsCount }, (_, index) => jsx(BordNotificationRowSkeleton, {}, index)), state.kind === 'error' && jsx("p", { className: "bordNotificationModalEmpty", children: loadErrorText }), isEmpty && jsx("p", { className: "bordNotificationModalEmpty", children: emptyStateText }), state.kind === 'ready' &&
|
|
44673
44676
|
filteredGroups.map(group => (jsxs("div", { className: "bordNotificationModalGroup", children: [jsx("div", { className: "bordNotificationModalGroupLabel", children: group.label }), group.notifications.map(notification => (jsx(BordNotificationRow, { notification: notification, onClick: () => onNotificationClick(notification.id) }, notification.id)))] }, group.key))), state.kind === 'ready' &&
|
|
44674
44677
|
state.isLoadingMore &&
|