@progress/kendo-react-grid 14.5.0-develop.8 → 14.5.0-develop.9
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/cells/groupcell/GridGroupCellToggle.js +1 -1
- package/cells/groupcell/GridGroupCellToggle.mjs +23 -23
- package/cells/pincell/GridPinDropdownButton.js +1 -1
- package/cells/pincell/GridPinDropdownButton.mjs +14 -14
- package/contextMenu/GridContextMenu.js +1 -1
- package/contextMenu/GridContextMenu.mjs +44 -44
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +23 -18
- package/toolbar-tools/smartbox/SmartBox.js +1 -1
- package/toolbar-tools/smartbox/SmartBox.mjs +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxListData.js +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxListData.mjs +7 -7
- package/toolbar-tools/smartbox/listItemRenders.js +1 -1
- package/toolbar-tools/smartbox/listItemRenders.mjs +1 -1
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1778599546,version:"14.5.0-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '14.5.0-develop.
|
|
10
|
+
publishDate: 1778599546,
|
|
11
|
+
version: '14.5.0-develop.9',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "14.5.0-develop.
|
|
3
|
+
"version": "14.5.0-develop.9",
|
|
4
4
|
"description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -30,22 +30,22 @@
|
|
|
30
30
|
"@progress/kendo-drawing": "^1.21.2",
|
|
31
31
|
"@progress/kendo-file-saver": "^1.1.1",
|
|
32
32
|
"@progress/kendo-licensing": "^1.7.2",
|
|
33
|
-
"@progress/kendo-react-animation": "14.5.0-develop.
|
|
34
|
-
"@progress/kendo-react-buttons": "14.5.0-develop.
|
|
35
|
-
"@progress/kendo-react-common": "14.5.0-develop.
|
|
36
|
-
"@progress/kendo-react-data-tools": "14.5.0-develop.
|
|
37
|
-
"@progress/kendo-react-dateinputs": "14.5.0-develop.
|
|
38
|
-
"@progress/kendo-react-indicators": "14.5.0-develop.
|
|
39
|
-
"@progress/kendo-react-form": "14.5.0-develop.
|
|
40
|
-
"@progress/kendo-react-labels": "14.5.0-develop.
|
|
41
|
-
"@progress/kendo-react-dialogs": "14.5.0-develop.
|
|
42
|
-
"@progress/kendo-react-dropdowns": "14.5.0-develop.
|
|
43
|
-
"@progress/kendo-react-inputs": "14.5.0-develop.
|
|
44
|
-
"@progress/kendo-react-intl": "14.5.0-develop.
|
|
45
|
-
"@progress/kendo-react-popup": "14.5.0-develop.
|
|
46
|
-
"@progress/kendo-react-layout": "14.5.0-develop.
|
|
47
|
-
"@progress/kendo-react-conversational-ui": "14.5.0-develop.
|
|
48
|
-
"@progress/kendo-svg-icons": "^4.0.0",
|
|
33
|
+
"@progress/kendo-react-animation": "14.5.0-develop.9",
|
|
34
|
+
"@progress/kendo-react-buttons": "14.5.0-develop.9",
|
|
35
|
+
"@progress/kendo-react-common": "14.5.0-develop.9",
|
|
36
|
+
"@progress/kendo-react-data-tools": "14.5.0-develop.9",
|
|
37
|
+
"@progress/kendo-react-dateinputs": "14.5.0-develop.9",
|
|
38
|
+
"@progress/kendo-react-indicators": "14.5.0-develop.9",
|
|
39
|
+
"@progress/kendo-react-form": "14.5.0-develop.9",
|
|
40
|
+
"@progress/kendo-react-labels": "14.5.0-develop.9",
|
|
41
|
+
"@progress/kendo-react-dialogs": "14.5.0-develop.9",
|
|
42
|
+
"@progress/kendo-react-dropdowns": "14.5.0-develop.9",
|
|
43
|
+
"@progress/kendo-react-inputs": "14.5.0-develop.9",
|
|
44
|
+
"@progress/kendo-react-intl": "14.5.0-develop.9",
|
|
45
|
+
"@progress/kendo-react-popup": "14.5.0-develop.9",
|
|
46
|
+
"@progress/kendo-react-layout": "14.5.0-develop.9",
|
|
47
|
+
"@progress/kendo-react-conversational-ui": "14.5.0-develop.9",
|
|
48
|
+
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
49
49
|
"react": "^18.0.0 || ^19.0.0",
|
|
50
50
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
51
51
|
},
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"package": {
|
|
149
149
|
"productName": "KendoReact",
|
|
150
150
|
"productCode": "KENDOUIREACT",
|
|
151
|
-
"publishDate":
|
|
151
|
+
"publishDate": 1778599546,
|
|
152
152
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
153
153
|
}
|
|
154
154
|
},
|
|
@@ -158,5 +158,10 @@
|
|
|
158
158
|
"repository": {
|
|
159
159
|
"type": "git",
|
|
160
160
|
"url": "git+https://github.com/telerik/kendo-react.git"
|
|
161
|
+
},
|
|
162
|
+
"peerDependenciesMeta": {
|
|
163
|
+
"@progress/kendo-svg-icons": {
|
|
164
|
+
"optional": true
|
|
165
|
+
}
|
|
161
166
|
}
|
|
162
167
|
}
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=require("react"),_=require("@progress/kendo-react-buttons"),M=require("@progress/kendo-svg-icons"),d=require("@progress/kendo-react-common"),et=require("@progress/kendo-react-intl"),J=require("@progress/kendo-react-dropdowns"),tt=require("@progress/kendo-react-popup"),R=require("./listItemRenders.js"),o=require("../../messages/index.js"),nt=require("../../hooks/useGridAIRequest.js"),st=require("../../utils/GridContext.js"),rt=require("./hooks/useSmartBoxModes.js"),at=require("./hooks/useSmartBoxHistory.js"),ot=require("./hooks/useSmartBoxPopup.js"),ct=require("./hooks/useSmartBoxGridState.js"),it=require("./hooks/useSmartBoxLabels.js"),lt=require("./hooks/useSmartBoxListData.js"),ut=require("./hooks/useSmartBoxSegmentedControl.js"),pt=require("./hooks/useSmartBoxSearch.js"),dt=require("./hooks/useDebounce.js");function mt(m){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const f in m)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(m,f);Object.defineProperty(x,f,I.get?I:{enumerable:!0,get:()=>m[f]})}}return x.default=m,Object.freeze(x)}const e=mt(Ae),ge=e.forwardRef((m,x)=>{var de;const{searchConfig:f,semanticSearchConfig:I,aiAssistantConfig:he,activeMode:fe,dir:Se="ltr",size:Q="medium",placeholder:ke,history:xe,loading:Ce=!1,promptSuggestionRender:X,historyItemRender:Y,onOpen:be,onClose:Be,onFocus:v,onBlur:q,onSearch:Re,onSemanticSearch:Ie,onAIPromptRequest:N,onAIResponseSuccess:F,onAIResponseError:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ae=require("react"),_=require("@progress/kendo-react-buttons"),M=require("@progress/kendo-svg-icons"),d=require("@progress/kendo-react-common"),et=require("@progress/kendo-react-intl"),J=require("@progress/kendo-react-dropdowns"),tt=require("@progress/kendo-react-popup"),R=require("./listItemRenders.js"),o=require("../../messages/index.js"),nt=require("../../hooks/useGridAIRequest.js"),st=require("../../utils/GridContext.js"),rt=require("./hooks/useSmartBoxModes.js"),at=require("./hooks/useSmartBoxHistory.js"),ot=require("./hooks/useSmartBoxPopup.js"),ct=require("./hooks/useSmartBoxGridState.js"),it=require("./hooks/useSmartBoxLabels.js"),lt=require("./hooks/useSmartBoxListData.js"),ut=require("./hooks/useSmartBoxSegmentedControl.js"),pt=require("./hooks/useSmartBoxSearch.js"),dt=require("./hooks/useDebounce.js");function mt(m){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const f in m)if(f!=="default"){const I=Object.getOwnPropertyDescriptor(m,f);Object.defineProperty(x,f,I.get?I:{enumerable:!0,get:()=>m[f]})}}return x.default=m,Object.freeze(x)}const e=mt(Ae),ge=e.forwardRef((m,x)=>{var de;const{searchConfig:f,semanticSearchConfig:I,aiAssistantConfig:he,activeMode:fe,dir:Se="ltr",size:Q="medium",placeholder:ke,history:xe,loading:Ce=!1,promptSuggestionRender:X,historyItemRender:Y,onOpen:be,onClose:Be,onFocus:v,onBlur:q,onSearch:Re,onSemanticSearch:Ie,onAIPromptRequest:N,onAIResponseSuccess:F,onAIResponseError:z,onAICancelRequest:w}=m,C=et.useLocalization(),b=e.useContext(st.GridContext),ve=e.useRef(`k-${d.guid()}`),S=e.useRef(null),B=e.useRef(null),Z=e.useRef(null),[c,g]=e.useState(""),[qe,D]=e.useState(!1),[we,A]=e.useState(void 0),[De,ee]=e.useState(null),{searchMode:i,semanticSearchMode:u,aiAssistantMode:r,selectedView:n,setSelectedViewState:O,lastSearchMode:Pe,searchHistorySettings:te,semanticSearchHistorySettings:ne,aiAssistantHistorySettings:G,speechToTextButtonSettings:se,currentSearchDelay:ye}=rt.useSmartBoxModes({searchConfigProp:f,semanticSearchConfigProp:I,aiAssistantConfigProp:he,activeModeProp:fe,sharedHistory:xe}),{currentHistory:P,currentHistorySettings:Ee,addToHistory:V}=at.useSmartBoxHistory({selectedView:n,searchHistorySettings:te,semanticSearchHistorySettings:ne,aiAssistantHistorySettings:G}),{isOpen:W,togglePopup:a}=ot.useSmartBoxPopup({onOpen:be,onClose:Be}),{columns:re,gridState:Le,gridRef:Te,handleStateChange:He}=ct.useSmartBoxGridState(b),j=e.useMemo(()=>(r==null?void 0:r.promptSuggestions)||[],[r==null?void 0:r.promptSuggestions]),{inputPlaceholder:Ne,prefixIcon:Fe}=it.useSmartBoxLabels({selectedView:n,searchMode:i,semanticSearchMode:u,aiAssistantMode:r,sharedPlaceholder:ke}),{searchListData:k,aiAssistantListData:y,searchHistoryListData:E}=lt.useSmartBoxListData({selectedView:n,searchModeEnabled:i==null?void 0:i.enabled,semanticSearchModeEnabled:u==null?void 0:u.enabled,promptSuggestions:j,currentHistory:P,currentHistorySettings:Ee}),L=ut.useSmartBoxSegmentedControl({searchMode:i,semanticSearchMode:u,aiAssistantMode:r,selectedView:n,lastSearchMode:Pe,setSelectedViewState:O,setInputValue:g});e.useEffect(()=>{const t=S.current;if(!t)return;A(t.offsetWidth);const s=new ResizeObserver(()=>{t&&A(t.offsetWidth)});return s.observe(t),()=>{s.disconnect()}},[]);const h=Ce||qe,U=!n,ze=!(i!=null&&i.enabled)&&!(u!=null&&u.enabled)&&!(r!=null&&r.enabled),Oe=d.kendoThemeMaps.sizeMap[Q]||"md",{emitSearchEvent:p}=pt.useSmartBoxSearch({selectedView:n,searchMode:i,columns:re,gridContext:b,searchHistorySettings:te,semanticSearchHistorySettings:ne,addToHistory:V,onSearch:Re,onSemanticSearch:Ie}),{sendRequest:ae,cancelRequest:oe}=nt.useGridAIRequest({requestUrl:r==null?void 0:r.requestUrl,requestOptions:r==null?void 0:r.requestOptions,httpClient:r==null?void 0:r.httpClient,columns:re,gridState:Le,gridRef:Te,onPromptRequest:t=>{N==null||N({requestData:t})},onResponseSuccess:t=>{D(!1),F==null||F({response:t})},onResponseError:t=>{D(!1),z==null||z({error:t})},onStateChange:He,onExportPdf:()=>b==null?void 0:b.exportAsPdf()});e.useImperativeHandle(x,()=>({show:()=>a(!0),hide:()=>a(!1)}),[a]);const $=dt.useDebounce(De,ye),ce=e.useRef(p);ce.current=p,e.useEffect(()=>{$!==null&&ce.current($)},[$]);const Ge=e.useCallback(t=>{const s=t.target.value;g(s),a(!s),(n==="search"||n==="semanticSearch")&&ee(s)},[a,n]),Ve=e.useCallback(()=>{v==null||v(),c||a(!0)},[v,a,c]),We=e.useCallback(t=>{var me;const s=S.current,l=(me=Z.current)==null?void 0:me.element,H=t.relatedTarget,Ye=H&&(s==null?void 0:s.contains(H)),Ze=H&&(l==null?void 0:l.contains(H));!Ye&&!Ze&&(q==null||q(),a(!1))},[q,a]),je=e.useCallback(()=>{c||a(!0)},[a,c]),ie=!!((de=r==null?void 0:r.requestOptions)!=null&&de.url||r!=null&&r.requestUrl),K=e.useCallback(()=>{if(h){w==null||w(),oe(),D(!1);return}c.trim()&&(ie&&D(!0),V("aiAssistant",c,G),a(!1),ae(c.trim()),g(""))},[h,c,G,a,V,ae,oe,ie,w]),Ue=e.useCallback(t=>{t.key==="Enter"&&(n==="aiAssistant"?K():n==="semanticSearch"&&p(c))},[n,c,p,K]),$e=e.useCallback(()=>{var t;a(!W),(t=B.current)==null||t.focus()},[W,a]),Ke=e.useCallback(t=>{var s;t.stopPropagation(),t.preventDefault(),g(""),(s=B.current)==null||s.focus(),a(!0),p("")},[a,p]),le=e.useCallback(t=>{var s;O(t),g(""),ee(null),(s=B.current)==null||s.focus()},[O]),T=e.useCallback(t=>{var s;g(t),a(!1),(s=B.current)==null||s.focus(),n!=="aiAssistant"&&p(t)},[n,a,p]),_e=e.useCallback(t=>{if(t.isFinal&&t.alternatives.length>0){const s=t.alternatives[0].transcript;g(l=>l?`${l} ${s}`:s)}},[]),Me=e.useMemo(()=>n==="aiAssistant"?P.length===0&&j.length===0:n==="search"||n==="semanticSearch"?P.length===0&&k.length===0:!1,[n,P.length,j.length,k.length]),ue=e.useCallback(t=>{const l=(n==="aiAssistant"?y:E)[t];l&&T(l.text)},[n,y,E,T]),Je=e.useCallback(t=>{const s=k[t];s&&le(s.mode)},[k,le]),pe=e.useMemo(()=>R.createListItemRender({historyItemRender:Y,promptSuggestionRender:X,handleListItemClick:T}),[Y,X,T]),Qe=W&&!ze,Xe=()=>e.createElement(e.Fragment,null,L.items.length>0&&e.createElement(_.SegmentedControl,{items:L.items,value:L.value,onChange:L.onChange,size:Q,layoutMode:"stretch"}),(n==="search"||n==="semanticSearch")&&k.length>0&&e.createElement(J.List,{data:k,textField:"text",descriptionField:"description",onClick:Je,itemRender:R.searchModeItemRender,show:!0,wrapperCssClass:"k-list k-list-md"}),n==="aiAssistant"&&y.length>0&&e.createElement(J.List,{data:y,textField:"text",groupField:"group",svgIconField:"groupSvgIcon",descriptionField:"description",onClick:ue,itemRender:pe,groupHeaderItemRender:R.listGroupHeaderRender,showFirstGroupHeader:!0,show:!0,wrapperCssClass:"k-list k-list-md"}),(n==="search"||n==="semanticSearch")&&E.length>0&&e.createElement(J.List,{data:E,textField:"text",groupField:"group",svgIconField:"groupSvgIcon",descriptionField:"description",onClick:ue,itemRender:pe,groupHeaderItemRender:R.listGroupHeaderRender,showFirstGroupHeader:!0,show:!0,wrapperCssClass:"k-list k-list-md"}),Me&&e.createElement(R.NoDataRender,{selectedView:n}));return e.createElement("div",{ref:S,className:"k-smart-box-wrapper",dir:Se,onBlur:We},e.createElement("span",{className:d.classNames("k-smart-box","k-input",`k-input-${Oe}`,{"k-loading":h})},!U&&e.createElement("span",{className:"k-input-prefix k-input-prefix-horizontal"},e.createElement(d.IconWrap,{className:d.classNames("k-icon",{"k-accent-icon":n==="aiAssistant"||n==="semanticSearch"}),icon:Fe.svgIcon,onClick:$e,onMouseDown:t=>{"preventDefault"in t&&t.preventDefault()}})),e.createElement("input",{ref:B,type:"text",className:d.classNames("k-input-inner",{"k-disabled":U}),id:ve.current,placeholder:Ne,value:c,disabled:U,onChange:Ge,onFocus:Ve,onClick:je,onKeyDown:Ue}),c.length>0&&(n==="search"||n==="semanticSearch")&&e.createElement("span",{className:"k-clear-value",title:C.toLanguageString(o.smartBoxClearTitle,o.messages[o.smartBoxClearTitle]),role:"button",tabIndex:-1,onClick:Ke,onMouseDown:t=>t.preventDefault()},e.createElement(d.IconWrap,{className:"k-icon",icon:M.xIcon})),n==="aiAssistant"&&e.createElement("span",{className:"k-input-suffix k-input-suffix-horizontal"},se&&e.createElement(_.SpeechToTextButton,{...se,"aria-label":C.toLanguageString(o.smartBoxSpeechToTextButton,o.messages[o.smartBoxSpeechToTextButton]),title:C.toLanguageString(o.smartBoxSpeechToTextButton,o.messages[o.smartBoxSpeechToTextButton]),onResult:_e}),e.createElement(_.Button,{className:d.classNames("k-smart-box-send",{"k-processing":h,"k-active":h}),type:"button",rounded:"full",size:"small",title:C.toLanguageString(o.smartBoxSubmitPromptButton,o.messages[o.smartBoxSubmitPromptButton]),"aria-label":C.toLanguageString(o.smartBoxSubmitPromptButton,o.messages[o.smartBoxSubmitPromptButton]),"aria-disabled":c.length===0,svgIcon:h?M.stopIcon:M.arrowUpIcon,disabled:c.length===0&&!h,onClick:K}))),e.createElement(tt.Popup,{ref:Z,anchor:S.current,show:Qe,popupClass:"k-smart-box-popup",style:{width:we},anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},margin:{horizontal:0,vertical:2},onMouseDownOutside:t=>{const s=t.event.target;S.current&&!S.current.contains(s)&&a(!1)}},Xe()))});ge.displayName="KendoReactSmartBox";exports.SmartBox=ge;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import { SpeechToTextButton as et, Button as tt, SegmentedControl as nt } from "@progress/kendo-react-buttons";
|
|
10
|
-
import { xIcon as rt,
|
|
10
|
+
import { xIcon as rt, stopIcon as at, arrowUpIcon as st } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { guid as ot, kendoThemeMaps as it, classNames as B, IconWrap as ce } from "@progress/kendo-react-common";
|
|
12
12
|
import { useLocalization as lt } from "@progress/kendo-react-intl";
|
|
13
13
|
import { List as $ } from "@progress/kendo-react-dropdowns";
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),h=require("@progress/kendo-react-intl"),x=require("@progress/kendo-svg-icons"),a=require("../../../messages/index.js");function D(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const l=D(S);function M({selectedView:o,searchModeEnabled:r,semanticSearchModeEnabled:s,promptSuggestions:i,currentHistory:p,currentHistorySettings:e}){const t=h.useLocalization(),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),h=require("@progress/kendo-react-intl"),x=require("@progress/kendo-svg-icons"),a=require("../../../messages/index.js");function D(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const l=D(S);function M({selectedView:o,searchModeEnabled:r,semanticSearchModeEnabled:s,promptSuggestions:i,currentHistory:p,currentHistorySettings:e}){const t=h.useLocalization(),g=h.useInternationalization(),u=t.toLanguageString(a.smartBoxSuggestedPrompts,a.messages[a.smartBoxSuggestedPrompts]),n=o==="aiAssistant"?t.toLanguageString(a.smartBoxPreviouslyAsked,a.messages[a.smartBoxPreviouslyAsked]):t.toLanguageString(a.smartBoxPreviouslySearched,a.messages[a.smartBoxPreviouslySearched]),f=l.useMemo(()=>r&&s?[{text:t.toLanguageString(a.smartBoxSearchModeText,a.messages[a.smartBoxSearchModeText]),description:t.toLanguageString(a.smartBoxSearchModeDescription,a.messages[a.smartBoxSearchModeDescription]),selected:o==="search",mode:"search"},{text:t.toLanguageString(a.smartBoxSemanticSearchModeText,a.messages[a.smartBoxSemanticSearchModeText]),description:t.toLanguageString(a.smartBoxSemanticSearchModeDescription,a.messages[a.smartBoxSemanticSearchModeDescription]),selected:o==="semanticSearch",mode:"semanticSearch"}]:[],[r,s,o,t]),B=l.useMemo(()=>{const m=[];return i.forEach((c,d)=>{m.push({id:`suggestion-${d}`,text:c,group:u,groupSvgIcon:x.lightbulbIcon,isHistoryItem:!1})}),p.forEach((c,d)=>{m.push({id:`history-${d}`,text:c.text,description:g.formatDate(c.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:c.timestamp})}),m},[i,p,u,n,g,e==null?void 0:e.timestampFormat]),L=l.useMemo(()=>p.map((m,c)=>({id:`history-${c}`,text:m.text,description:g.formatDate(m.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:m.timestamp})),[p,n,g,e==null?void 0:e.timestampFormat]);return{searchListData:f,aiAssistantListData:B,searchHistoryListData:L,suggestedPromptsLabel:u,historyLabel:n}}exports.useSmartBoxListData=M;
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as L from "react";
|
|
10
10
|
import { useLocalization as P, useInternationalization as z } from "@progress/kendo-react-intl";
|
|
11
|
-
import {
|
|
11
|
+
import { lightbulbIcon as $, clockArrowRotateIcon as f } from "@progress/kendo-svg-icons";
|
|
12
12
|
import { smartBoxSuggestedPrompts as l, messages as e, smartBoxPreviouslyAsked as n, smartBoxPreviouslySearched as r, smartBoxSearchModeDescription as B, smartBoxSearchModeText as D, smartBoxSemanticSearchModeDescription as v, smartBoxSemanticSearchModeText as I } from "../../../messages/index.mjs";
|
|
13
13
|
function T({
|
|
14
14
|
selectedView: p,
|
|
15
15
|
searchModeEnabled: h,
|
|
16
|
-
semanticSearchModeEnabled:
|
|
17
|
-
promptSuggestions:
|
|
16
|
+
semanticSearchModeEnabled: d,
|
|
17
|
+
promptSuggestions: u,
|
|
18
18
|
currentHistory: i,
|
|
19
19
|
currentHistorySettings: a
|
|
20
20
|
}) {
|
|
@@ -27,7 +27,7 @@ function T({
|
|
|
27
27
|
) : o.toLanguageString(
|
|
28
28
|
r,
|
|
29
29
|
e[r]
|
|
30
|
-
), M = L.useMemo(() => h &&
|
|
30
|
+
), M = L.useMemo(() => h && d ? [
|
|
31
31
|
{
|
|
32
32
|
text: o.toLanguageString(
|
|
33
33
|
D,
|
|
@@ -52,9 +52,9 @@ function T({
|
|
|
52
52
|
selected: p === "semanticSearch",
|
|
53
53
|
mode: "semanticSearch"
|
|
54
54
|
}
|
|
55
|
-
] : [], [h,
|
|
55
|
+
] : [], [h, d, p, o]), A = L.useMemo(() => {
|
|
56
56
|
const m = [];
|
|
57
|
-
return
|
|
57
|
+
return u.forEach((t, c) => {
|
|
58
58
|
m.push({
|
|
59
59
|
id: `suggestion-${c}`,
|
|
60
60
|
text: t,
|
|
@@ -74,7 +74,7 @@ function T({
|
|
|
74
74
|
});
|
|
75
75
|
}), m;
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
u,
|
|
78
78
|
i,
|
|
79
79
|
g,
|
|
80
80
|
s,
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),c=require("@progress/kendo-react-common"),i=require("@progress/kendo-svg-icons"),p=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function d(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const e=d(u);function g({historyItemRender:t,promptSuggestionRender:a,handleListItemClick:n}){return(s,l)=>{const r=l.dataItem;return r.isHistoryItem&&t?t({text:r.text,timestamp:r.timestamp},()=>n(r.text)):!r.isHistoryItem&&a?a(r.text,()=>n(r.text)):e.cloneElement(s,{...s.props,title:r.text,onMouseDown:m=>m.preventDefault()},e.createElement(e.Fragment,null,e.createElement("span",{className:"k-list-item-text"},r.text),r.description&&e.createElement("span",{className:"k-list-item-description"},r.description)))}}function x(t,a){const n=a.dataItem;return e.cloneElement(t,{...t.props,onMouseDown:s=>s.preventDefault()},e.createElement(e.Fragment,null,n.selected&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon k-smart-box-check-icon",icon:i.checkIcon})),e.createElement("span",{className:"k-list-item-text"},n.text),e.createElement("span",{className:"k-list-item-description"},n.description)))}function f(t,a){const n=a.groupItem,s=n==null?void 0:n.groupSvgIcon;return e.cloneElement(t,t.props,e.createElement(e.Fragment,null,s&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon",icon:s})),e.createElement("span",{className:"k-list-item-text"},a.group)))}function k({selectedView:t}){const a=p.useLocalization();return e.createElement("span",{className:"k-no-data k-smart-box-no-data"},e.createElement(c.IconWrap,{icon:i.
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),c=require("@progress/kendo-react-common"),i=require("@progress/kendo-svg-icons"),p=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function d(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const e=d(u);function g({historyItemRender:t,promptSuggestionRender:a,handleListItemClick:n}){return(s,l)=>{const r=l.dataItem;return r.isHistoryItem&&t?t({text:r.text,timestamp:r.timestamp},()=>n(r.text)):!r.isHistoryItem&&a?a(r.text,()=>n(r.text)):e.cloneElement(s,{...s.props,title:r.text,onMouseDown:m=>m.preventDefault()},e.createElement(e.Fragment,null,e.createElement("span",{className:"k-list-item-text"},r.text),r.description&&e.createElement("span",{className:"k-list-item-description"},r.description)))}}function x(t,a){const n=a.dataItem;return e.cloneElement(t,{...t.props,onMouseDown:s=>s.preventDefault()},e.createElement(e.Fragment,null,n.selected&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon k-smart-box-check-icon",icon:i.checkIcon})),e.createElement("span",{className:"k-list-item-text"},n.text),e.createElement("span",{className:"k-list-item-description"},n.description)))}function f(t,a){const n=a.groupItem,s=n==null?void 0:n.groupSvgIcon;return e.cloneElement(t,t.props,e.createElement(e.Fragment,null,s&&e.createElement("span",{className:"k-list-item-icon-wrapper"},e.createElement(c.IconWrap,{className:"k-list-item-icon",icon:s})),e.createElement("span",{className:"k-list-item-text"},a.group)))}function k({selectedView:t}){const a=p.useLocalization();return e.createElement("span",{className:"k-no-data k-smart-box-no-data"},e.createElement(c.IconWrap,{icon:i.fileClockIcon,size:"xxxlarge"}),e.createElement("span",null,t==="aiAssistant"?a.toLanguageString(o.smartBoxNoPreviousPrompts,o.messages[o.smartBoxNoPreviousPrompts]):a.toLanguageString(o.smartBoxNoPreviousSearches,o.messages[o.smartBoxNoPreviousSearches])))}exports.NoDataRender=k;exports.createListItemRender=g;exports.listGroupHeaderRender=f;exports.searchModeItemRender=x;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
9
|
import { IconWrap as o } from "@progress/kendo-react-common";
|
|
10
|
-
import { checkIcon as u,
|
|
10
|
+
import { checkIcon as u, fileClockIcon as x } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { useLocalization as E } from "@progress/kendo-react-intl";
|
|
12
12
|
import { smartBoxNoPreviousPrompts as c, messages as m, smartBoxNoPreviousSearches as i } from "../../messages/index.mjs";
|
|
13
13
|
function g({
|