UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

69 lines (68 loc) 2.98 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as e from "react"; import { IconWrap as o } from "@progress/kendo-react-common"; import { checkIcon as u, fileClockOutlineIcon as x } from "@progress/kendo-svg-icons"; import { useLocalization as E } from "@progress/kendo-react-intl"; import { smartBoxNoPreviousPrompts as c, messages as m, smartBoxNoPreviousSearches as i } from "../../messages/index.mjs"; function g({ historyItemRender: n, promptSuggestionRender: a, handleListItemClick: s }) { return (r, l) => { const t = l.dataItem; return t.isHistoryItem && n ? n( { text: t.text, timestamp: t.timestamp }, () => s(t.text) ) : !t.isHistoryItem && a ? a(t.text, () => s(t.text)) : e.cloneElement( r, { ...r.props, title: t.text, onMouseDown: (p) => p.preventDefault() }, /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: "k-list-item-text" }, t.text), t.description && /* @__PURE__ */ e.createElement("span", { className: "k-list-item-description" }, t.description)) ); }; } function I(n, a) { const s = a.dataItem; return e.cloneElement( n, { ...n.props, onMouseDown: (r) => r.preventDefault() }, /* @__PURE__ */ e.createElement(e.Fragment, null, s.selected && /* @__PURE__ */ e.createElement("span", { className: "k-list-item-icon-wrapper" }, /* @__PURE__ */ e.createElement(o, { className: "k-list-item-icon k-smart-box-check-icon", icon: u })), /* @__PURE__ */ e.createElement("span", { className: "k-list-item-text" }, s.text), /* @__PURE__ */ e.createElement("span", { className: "k-list-item-description" }, s.description)) ); } function v(n, a) { const s = a.groupItem, r = s == null ? void 0 : s.groupSvgIcon; return e.cloneElement( n, n.props, /* @__PURE__ */ e.createElement(e.Fragment, null, r && /* @__PURE__ */ e.createElement("span", { className: "k-list-item-icon-wrapper" }, /* @__PURE__ */ e.createElement(o, { className: "k-list-item-icon", icon: r })), /* @__PURE__ */ e.createElement("span", { className: "k-list-item-text" }, a.group)) ); } function D({ selectedView: n }) { const a = E(); return /* @__PURE__ */ e.createElement("span", { className: "k-no-data k-smart-box-no-data" }, /* @__PURE__ */ e.createElement(o, { icon: x, size: "xxxlarge" }), /* @__PURE__ */ e.createElement("span", null, n === "aiAssistant" ? a.toLanguageString( c, m[c] ) : a.toLanguageString( i, m[i] ))); } export { D as NoDataRender, g as createListItemRender, v as listGroupHeaderRender, I as searchModeItemRender };