@progress/kendo-react-grid 14.5.0-develop.7 → 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/filterCommon.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 x=require("./messages/index.js"),O=require("@progress/kendo-react-intl"),m=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],y={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},a=t=>t==="isnull"||t==="isnotnull"||t==="isempty"||t==="isnotempty",h=(t,i)=>t.map(e=>({text:i.toLanguageString(e.text,x.messages[e.text]),operator:e.operator})),d="eq",q=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],I={text:!1,numeric:!1,date:!1,boolean:!0},E=(t,i,e)=>{const o=g(e.operators);let r=e.operator;switch(e.filterType){case"numeric":(!r||a(r))&&(r=o),t===null&&r===o&&(r="");break;case"date":(!r||a(r))&&(r=o),t===null&&r===o&&(r="");break;case"text":(!r||a(r))&&(r=o),!t&&r===o&&(r="");break;default:return}e.onChange({value:t,operator:r,syntheticEvent:i})},g=(t,i)=>i?t[i][0].operator:t[0].operator,N=t=>t||"text",F=(t,i)=>{const e=t.target.value;i({value:e.operator,operator:e.operator===""?"":d,syntheticEvent:t.syntheticEvent})},v=(t,i,e)=>{let o=i;const r=t.target.value;t.target.state.opened&&(a(r.operator)&&(o=null),i===null&&!a(r.operator)&&(o=void 0),e({value:o,operator:r.operator,syntheticEvent:t.syntheticEvent}))},n=(t,i)=>{const e=i||new O.IntlService("en-US");if(t.value){const o=e.parseDate(t.value);o&&(t.value=o)}t.filters&&(t.filters=t.filters.map(o=>{if(o.value){const r=e.parseDate(o.value);r&&(o.value=r)}return o}))},b=(t,i)=>{var o;let e=t;if(e&&Object.keys(e).length===0&&(e=null),e!=null&&e.filters&&Array.isArray(e.filters)){const r=i||{filters:[],logic:"and"},u=r.filters.map(l=>l.field||l.filters[0].field),p=e.filters.every(l=>l.field===(e==null?void 0:e.filters[0]).field),s=p?[{filters:e.filters.map(l=>(n(l),l)),logic:e.logic}]:e.filters.map(l=>{const c=l.filters?l:{logic:t.logic,filters:[l]};return n(c),c}),f=p&&u.includes(s[0].filters[0].field);if(f){const l=r.filters[0];l.filters&&((o=l.filters)==null||o.push(...s[0].filters),l.logic=t.logic)}e={...r,filters:f?r.filters:[...r.filters,...s]}}return e};exports.IsUnaryFilter=a;exports.booleanFilterValues=q;exports.cellBoolDropdownChange=F;exports.cellInputChange=E;exports.cellOperatorChange=v;exports.combineSmartFilters=b;exports.defaultBooleanOperator=d;exports.defaultHideSecondFilter=I;exports.filterLogicList=m;exports.getDefaultOperator=g;exports.getFilterType=N;exports.operatorMap=h;exports.operators=y;exports.parseFilterDates=n;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./messages/index.js"),O=require("@progress/kendo-react-intl"),m=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],y={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},a=e=>e==="isnull"||e==="isnotnull"||e==="isempty"||e==="isnotempty",h=(e,i)=>e.map(t=>({text:i.toLanguageString(t.text,x.messages[t.text]),operator:t.operator})),d="eq",q=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],I={text:!1,numeric:!1,date:!1,boolean:!0},E=(e,i,t)=>{const o=g(t.operators);let r=t.operator;switch(t.filterType){case"numeric":(!r||a(r))&&(r=o);break;case"date":(!r||a(r))&&(r=o);break;case"text":(!r||a(r))&&(r=o);break;default:return}t.onChange({value:e,operator:r,syntheticEvent:i})},g=(e,i)=>i?e[i][0].operator:e[0].operator,v=e=>e||"text",N=(e,i)=>{const t=e.target.value;i({value:t.operator,operator:t.operator===""?"":d,syntheticEvent:e.syntheticEvent})},F=(e,i,t)=>{let o=i;const r=e.target.value;e.target.state.opened&&(a(r.operator)&&(o=null),i===null&&!a(r.operator)&&(o=void 0),t({value:o,operator:r.operator,syntheticEvent:e.syntheticEvent}))},n=(e,i)=>{const t=i||new O.IntlService("en-US");if(e.value){const o=t.parseDate(e.value);o&&(e.value=o)}e.filters&&(e.filters=e.filters.map(o=>{if(o.value){const r=t.parseDate(o.value);r&&(o.value=r)}return o}))},b=(e,i)=>{var o;let t=e;if(t&&Object.keys(t).length===0&&(t=null),t!=null&&t.filters&&Array.isArray(t.filters)){const r=i||{filters:[],logic:"and"},u=r.filters.map(l=>l.field||l.filters[0].field),p=t.filters.every(l=>l.field===(t==null?void 0:t.filters[0]).field),s=p?[{filters:t.filters.map(l=>(n(l),l)),logic:t.logic}]:t.filters.map(l=>{const c=l.filters?l:{logic:e.logic,filters:[l]};return n(c),c}),f=p&&u.includes(s[0].filters[0].field);if(f){const l=r.filters[0];l.filters&&((o=l.filters)==null||o.push(...s[0].filters),l.logic=e.logic)}t={...r,filters:f?r.filters:[...r.filters,...s]}}return t};exports.IsUnaryFilter=a;exports.booleanFilterValues=q;exports.cellBoolDropdownChange=N;exports.cellInputChange=E;exports.cellOperatorChange=F;exports.combineSmartFilters=b;exports.defaultBooleanOperator=d;exports.defaultHideSecondFilter=I;exports.filterLogicList=m;exports.getDefaultOperator=g;exports.getFilterType=v;exports.operatorMap=h;exports.operators=y;exports.parseFilterDates=n;
package/filterCommon.mjs CHANGED
@@ -44,97 +44,97 @@ const q = [
44
44
  { text: "grid.filterIsNotNullOperator", operator: "isnotnull" }
45
45
  ],
46
46
  boolean: [{ text: "grid.filterEqOperator", operator: "eq" }]
47
- }, a = (t) => t === "isnull" || t === "isnotnull" || t === "isempty" || t === "isnotempty", h = (t, i) => t.map((e) => ({
48
- text: i.toLanguageString(e.text, g[e.text]),
49
- operator: e.operator
47
+ }, a = (e) => e === "isnull" || e === "isnotnull" || e === "isempty" || e === "isnotempty", h = (e, i) => e.map((t) => ({
48
+ text: i.toLanguageString(t.text, g[t.text]),
49
+ operator: t.operator
50
50
  })), x = "eq", N = [
51
51
  { text: "grid.filterBooleanAll", operator: "" },
52
52
  { text: "grid.filterIsTrue", operator: !0 },
53
53
  { text: "grid.filterIsFalse", operator: !1 }
54
- ], I = {
54
+ ], v = {
55
55
  text: !1,
56
56
  numeric: !1,
57
57
  date: !1,
58
58
  boolean: !0
59
- }, v = (t, i, e) => {
60
- const o = O(e.operators);
61
- let r = e.operator;
62
- switch (e.filterType) {
59
+ }, I = (e, i, t) => {
60
+ const o = O(t.operators);
61
+ let r = t.operator;
62
+ switch (t.filterType) {
63
63
  case "numeric":
64
- (!r || a(r)) && (r = o), t === null && r === o && (r = "");
64
+ (!r || a(r)) && (r = o);
65
65
  break;
66
66
  case "date":
67
- (!r || a(r)) && (r = o), t === null && r === o && (r = "");
67
+ (!r || a(r)) && (r = o);
68
68
  break;
69
69
  case "text":
70
- (!r || a(r)) && (r = o), !t && r === o && (r = "");
70
+ (!r || a(r)) && (r = o);
71
71
  break;
72
72
  default:
73
73
  return;
74
74
  }
75
- e.onChange({ value: t, operator: r, syntheticEvent: i });
76
- }, O = (t, i) => i ? t[i][0].operator : t[0].operator, F = (t) => t || "text", b = (t, i) => {
77
- const e = t.target.value;
75
+ t.onChange({ value: e, operator: r, syntheticEvent: i });
76
+ }, O = (e, i) => i ? e[i][0].operator : e[0].operator, F = (e) => e || "text", b = (e, i) => {
77
+ const t = e.target.value;
78
78
  i({
79
- value: e.operator,
80
- operator: e.operator === "" ? "" : x,
81
- syntheticEvent: t.syntheticEvent
79
+ value: t.operator,
80
+ operator: t.operator === "" ? "" : x,
81
+ syntheticEvent: e.syntheticEvent
82
82
  });
83
- }, A = (t, i, e) => {
83
+ }, A = (e, i, t) => {
84
84
  let o = i;
85
- const r = t.target.value;
86
- t.target.state.opened && (a(r.operator) && (o = null), i === null && !a(r.operator) && (o = void 0), e({ value: o, operator: r.operator, syntheticEvent: t.syntheticEvent }));
87
- }, d = (t, i) => {
88
- const e = i || new u("en-US");
89
- if (t.value) {
90
- const o = e.parseDate(t.value);
91
- o && (t.value = o);
85
+ const r = e.target.value;
86
+ e.target.state.opened && (a(r.operator) && (o = null), i === null && !a(r.operator) && (o = void 0), t({ value: o, operator: r.operator, syntheticEvent: e.syntheticEvent }));
87
+ }, d = (e, i) => {
88
+ const t = i || new u("en-US");
89
+ if (e.value) {
90
+ const o = t.parseDate(e.value);
91
+ o && (e.value = o);
92
92
  }
93
- t.filters && (t.filters = t.filters.map(
93
+ e.filters && (e.filters = e.filters.map(
94
94
  (o) => {
95
95
  if (o.value) {
96
- const r = e.parseDate(o.value);
96
+ const r = t.parseDate(o.value);
97
97
  r && (o.value = r);
98
98
  }
99
99
  return o;
100
100
  }
101
101
  ));
102
- }, C = (t, i) => {
102
+ }, C = (e, i) => {
103
103
  var o;
104
- let e = t;
105
- if (e && Object.keys(e).length === 0 && (e = null), e != null && e.filters && Array.isArray(e.filters)) {
106
- const r = i || { filters: [], logic: "and" }, c = r.filters.map((l) => l.field || l.filters[0].field), n = e.filters.every((l) => l.field === (e == null ? void 0 : e.filters[0]).field), s = n ? [
104
+ let t = e;
105
+ if (t && Object.keys(t).length === 0 && (t = null), t != null && t.filters && Array.isArray(t.filters)) {
106
+ const r = i || { filters: [], logic: "and" }, c = r.filters.map((l) => l.field || l.filters[0].field), n = t.filters.every((l) => l.field === (t == null ? void 0 : t.filters[0]).field), s = n ? [
107
107
  {
108
- filters: e.filters.map((l) => (d(l), l)),
109
- logic: e.logic
108
+ filters: t.filters.map((l) => (d(l), l)),
109
+ logic: t.logic
110
110
  }
111
- ] : e.filters.map((l) => {
111
+ ] : t.filters.map((l) => {
112
112
  const f = l.filters ? l : {
113
- logic: t.logic,
113
+ logic: e.logic,
114
114
  filters: [l]
115
115
  };
116
116
  return d(f), f;
117
117
  }), p = n && c.includes(s[0].filters[0].field);
118
118
  if (p) {
119
119
  const l = r.filters[0];
120
- l.filters && ((o = l.filters) == null || o.push(...s[0].filters), l.logic = t.logic);
120
+ l.filters && ((o = l.filters) == null || o.push(...s[0].filters), l.logic = e.logic);
121
121
  }
122
- e = {
122
+ t = {
123
123
  ...r,
124
124
  filters: p ? r.filters : [...r.filters, ...s]
125
125
  };
126
126
  }
127
- return e;
127
+ return t;
128
128
  };
129
129
  export {
130
130
  a as IsUnaryFilter,
131
131
  N as booleanFilterValues,
132
132
  b as cellBoolDropdownChange,
133
- v as cellInputChange,
133
+ I as cellInputChange,
134
134
  A as cellOperatorChange,
135
135
  C as combineSmartFilters,
136
136
  x as defaultBooleanOperator,
137
- I as defaultHideSecondFilter,
137
+ v as defaultHideSecondFilter,
138
138
  q as filterLogicList,
139
139
  O as getDefaultOperator,
140
140
  F as getFilterType,
@@ -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: 1778500462,version:"14.5.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
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;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1778500462,
11
- version: '14.5.0-develop.7',
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.7",
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.7",
34
- "@progress/kendo-react-buttons": "14.5.0-develop.7",
35
- "@progress/kendo-react-common": "14.5.0-develop.7",
36
- "@progress/kendo-react-data-tools": "14.5.0-develop.7",
37
- "@progress/kendo-react-dateinputs": "14.5.0-develop.7",
38
- "@progress/kendo-react-indicators": "14.5.0-develop.7",
39
- "@progress/kendo-react-form": "14.5.0-develop.7",
40
- "@progress/kendo-react-labels": "14.5.0-develop.7",
41
- "@progress/kendo-react-dialogs": "14.5.0-develop.7",
42
- "@progress/kendo-react-dropdowns": "14.5.0-develop.7",
43
- "@progress/kendo-react-inputs": "14.5.0-develop.7",
44
- "@progress/kendo-react-intl": "14.5.0-develop.7",
45
- "@progress/kendo-react-popup": "14.5.0-develop.7",
46
- "@progress/kendo-react-layout": "14.5.0-develop.7",
47
- "@progress/kendo-react-conversational-ui": "14.5.0-develop.7",
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": 1778500462,
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:O,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:z,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:z,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,Oe=!(i!=null&&i.enabled)&&!(u!=null&&u.enabled)&&!(r!=null&&r.enabled),ze=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),O==null||O({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;z(t),g(""),ee(null),(s=B.current)==null||s.focus()},[z]),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&&!Oe,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-${ze}`,{"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.stopSmIcon:M.arrowUpOutlineIcon,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;
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, stopSmIcon as at, arrowUpOutlineIcon as st } from "@progress/kendo-svg-icons";
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(),u=h.useInternationalization(),g=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:g,groupSvgIcon:x.lightbulbOutlineIcon,isHistoryItem:!1})}),p.forEach((c,d)=>{m.push({id:`history-${d}`,text:c.text,description:u.formatDate(c.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:c.timestamp})}),m},[i,p,g,n,u,e==null?void 0:e.timestampFormat]),L=l.useMemo(()=>p.map((m,c)=>({id:`history-${c}`,text:m.text,description:u.formatDate(m.timestamp,(e==null?void 0:e.timestampFormat)||"HH:mm"),group:n,groupSvgIcon:x.clockArrowRotateIcon,isHistoryItem:!0,timestamp:m.timestamp})),[p,n,u,e==null?void 0:e.timestampFormat]);return{searchListData:f,aiAssistantListData:B,searchHistoryListData:L,suggestedPromptsLabel:g,historyLabel:n}}exports.useSmartBoxListData=M;
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 { lightbulbOutlineIcon as $, clockArrowRotateIcon as f } from "@progress/kendo-svg-icons";
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: u,
17
- promptSuggestions: d,
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 && u ? [
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, u, p, o]), A = L.useMemo(() => {
55
+ ] : [], [h, d, p, o]), A = L.useMemo(() => {
56
56
  const m = [];
57
- return d.forEach((t, c) => {
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
- d,
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.fileClockOutlineIcon,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;
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, fileClockOutlineIcon as x } from "@progress/kendo-svg-icons";
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({