PageSourceSearch

https://hunter.io/assets/data-table-bulk-actions-bar-Bw1ayYQn.js

js hunter.io collected 2026-09-24 07:51:27 UTC 8,345 bytes, 158 lines download raw bytes

1(function() {
2	try {
3		var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
4		e.SENTRY_RELEASE = { id: "b96dc26" };
5		var n = new e.Error().stack;
6		n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8d7d8846-72fb-421e-8d08-2b1989e03ab5", e._sentryDebugIdIdentifier = "sentry-dbid-8d7d8846-72fb-421e-8d08-2b1989e03ab5");
7	} catch (e) {}
8})();
9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { Et as DropdownMenuTrigger, bt as DropdownMenuItem, ft as DropdownMenu, ht as DropdownMenuDivider, kt as init_dropdown_menu, mt as DropdownMenuContent, pt as DropdownMenuAction } from "./controllers-jdPQjaCB.js";
11import { a as cn, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
12import { n as init_icon, t as Icon } from "./icon-BNzYbsdJ.js";
13import { r as init_button, t as Button } from "./button-DOiPZHfy.js";
14import { a as init_tooltip, i as TooltipTrigger, n as TooltipContent, r as TooltipProvider, t as Tooltip } from "./tooltip-HHfiWInP.js";
15import { i as init_select_count_menu, n as SelectCountMenu, r as SelectCountMenuItems } from "./select-count-menu-CyKZwGL-.js";
16//#region app/frontend/react/components/data-table-bulk-actions-bar.tsx
17function DataTableBulkActionsBar({ totalCount, pageCount, selectedCount, onClearSelection, onSelectAll, onSelectPage, onSelectCount, actions = [] }) {
18	const visibleActions = actions.length <= 3 ? actions : actions.slice(0, 3);
19	const collapsedActions = actions.length > 3 ? actions.slice(3) : [];
20	const singlePage = totalCount <= pageCount;
21	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
22		className: cn("h-table-bulk-actions", selectedCount > 0 && "is-visible"),
23		children: [
24			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
25				size: "sm",
26				iconOnly: true,
27				type: "button",
28				onClick: onClearSelection,
29				title: i18n.t("js.data_table.bulk_actions.clear_selection"),
30				"aria-label": i18n.t("js.data_table.bulk_actions.clear_selection"),
31				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
32					icon: "times",
33					"aria-hidden": "true"
34				})
35			}),
36			singlePage && !onSelectCount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
37				size: "sm",
38				type: "button",
39				onClick: onSelectAll,
40				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: i18n.t("js.data_table.bulk_actions.count_selected", { count: selectedCount.toLocaleString("en-US") }) })
41			}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectCountMenu, {
42				onSelectCount,
43				trigger: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
44					size: "sm",
45					type: "button",
46					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: i18n.t("js.data_table.bulk_actions.count_selected", { count: selectedCount.toLocaleString("en-US") }) }
46), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
47						icon: "angle-down",
48						"aria-hidden": "true"
49					})]
50				}),
51				renderItems: ({ openCustom }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
52					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenuAction, {
53						type: "button",
54						onClick: onSelectAll,
55						children: [i18n.t("js.data_table.bulk_actions.select_all"), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("small", {
56							className: "grey ml-auto",
57							children: [
58								"(",
59								totalCount.toLocaleString("en-US"),
60								")"
61							]
62						})]
63					}) }),
64					!singlePage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenuAction, {
65						type: "button",
66						onClick: onSelectPage,
67						children: [i18n.t("js.data_table.bulk_actions.select_page"), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("small", {
68							className: "grey ml-auto",
69							children: [
70								"(",
71								pageCount.toLocaleString("en-US"),
72								")"
73							]
74						})]
75					}) }),
76					onSelectCount ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectCountMenuItems, { onOpenCustom: openCustom }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuDivider, {})] }) : null,
77					/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuItem, {
78						className: "h-table-bulk-actions__unselect",
79						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuAction, {
80							type: "button",
81							onClick: onClearSelection,
82							children: i18n.t("js.data_table.bulk_actions.unselect_all")
83						})
84					})
85				] })
86			}),
87			visibleActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", { className: "h-table-bulks-actions__separator" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
88				className: "h-table-bulk-actions__actions",
89				children: visibleActions.map((action, index) => {
90					const button = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
91						size: "sm",
92						type: "button",
93						onClick: action.onClick,
94						disabled: action.disabled,
95						variant: action.variant,
96						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
97							icon: action.icon.replace("fa-", ""),
98							size: "sm",
99							variant: "regular",
100							"aria-hidden": "true"
101						}), action.label]
102					});
103					if (action.disabled && action.tooltip) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger, {
104						asChild: true,
105						children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: button })
106					}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContent, { children: action.tooltip })] }) }, index);
107					return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: button }, index);
108				})
109			})] }),
110			collapsedActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
111				asChild: true,
112				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
113					size: "sm",
114					iconOnly: true,
115					type: "button",
116					"aria-label": i18n.t("js.email_accounts_center.actions.more_actions_aria"),
117					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
118						icon: "ellipsis-h",
119						size: "sm",
120						variant: "regular",
121						"aria-hidden": "true"
122					})
123				})
124			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, { children: collapsedActions.map((action_0, index_0) => {
125				const menuAction = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenuAction, {
126					type: "button",
127					onClick: action_0.onClick,
128					disabled: action_0.disabled,
129					variant: action_0.variant,
130					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {
131						icon: action_0.icon.replace("fa-", ""),
132						size: "sm",
133						variant: "regular",
134						"aria-hidden": "true"
135					}), action_0.label]
136				});
137				return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuItem, { children: action_0.disabled && action_0.tooltip ? /* @__P
137URE__ */ (0, import_jsx_runtime.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipTrigger, {
138					asChild: true,
139					children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: menuAction })
140				}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipContent, { children: action_0.tooltip })] }) }) : menuAction }, index_0);
141			}) })] })
142		]
143	});
144}
145var import_jsx_runtime;
146function init_data_table_bulk_actions_bar() {
147	return (init_data_table_bulk_actions_bar = __esmMin((() => {
148		init_button();
149		init_icon();
150		init_dropdown_menu();
151		init_tooltip();
152		init_select_count_menu();
153		init_utils();
154		import_jsx_runtime = require_jsx_runtime();
155	})))();
156}
157//#endregion
158export { init_data_table_bulk_actions_bar as n, DataTableBulkActionsBar as t };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.