@progress/kendo-react-dropdowns 7.5.0-develop.1 → 7.5.0-develop.10

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.
@@ -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 client";"use strict";const v=require("react"),i=require("prop-types"),y=require("./VirtualScroll.js"),S=require("./Navigation.js"),c=require("./utils.js");function b(l){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:()=>l[t]})}}return n.default=l,Object.freeze(n)}const P=b(v),p=class p{constructor(n){this.wrapper=null,this.list=null,this.vs=new y,this.navigation=new S.Navigation,this.handleItemClick=(t,e)=>{const s=this.initState();s.syntheticEvent=e,e.stopPropagation(),this.component.handleItemSelect(t,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=t=>{if(!this.component.state.focused){const e=this.initState();e.data.focused=!0,e.events.push({type:"onFocus"}),e.syntheticEvent=t,this.applyState(e)}},this.filterChanged=(t,e)=>{const{textField:s,filterable:o}=this.component.props;o&&e.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:t}})},this.togglePopup=t=>{const e=this.component.props,s=e.opened!==void 0?e.opened:this.component.state.opened;e.opened===void 0&&(t.data.opened=!s),s?t.events.push({type:"onClose"}):(t.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(t,e)=>{const s=this.initState();s.syntheticEvent=e,this.triggerOnPageChange(s,t.skip,t.take),this.applyState(s)},this.scrollToVirtualItem=(t,e)=>{const s=this.vs;if(s.enabled=!1,t.skip===0)s.reset();else if(t.skip+t.pageSize===t.total)s.scrollToEnd();else{let o=s.translate;o===0&&(s.calcScrollElementHeight(),o=s.itemHeight*t.skip,s.translateTo(o-s.itemHeight)),s.container&&(s.container.scrollTop=o),this.scrollToItem(e,!0)}window.setTimeout(()=>s.enabled=!0,10)},this.scrollPopupByPageSize=t=>{var r,u,d,g,f,m;const e=this.vs,s=(u=(r=this.list)==null?void 0:r.parentElement)==null?void 0:u.scrollTop,o=e.enabled&&e.itemHeight?e.itemHeight:this.list?this.list.children[0].offsetHeight:0,a=(g=(d=this.list)==null?void 0:d.parentElement)==null?void 0:g.offsetHeight;s!==void 0&&a!==void 0&&((m=(f=this.list)==null?void 0:f.parentElement)==null||m.scroll({top:s+t*Math.floor(a/o)*o}))},this.renderScrollElement=()=>{const t=this.vs;return t.enabled&&P.createElement("div",{ref:e=>t.scrollElement=e,key:"scrollElementKey"})},this.resetGroupStickyHeader=(t,e)=>{t!==e.state.group&&e.setState({...e.state,group:t})},this.listBoxId=n.props.id+"list",this.guid=n.props.id,this.component=n,this.vs.PageChange=this.pageChange}didMount(){const n=this.component.props,t=n.popupSettings||{},e=n.style||{},s=t.width;let o=n.opened===!0;s===void 0&&this.calculatePopupWidth(),n.dir===void 0&&e.direction===void 0&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()}calculateDir(){const n=this.component.element;n&&n.ownerDocument&&n.ownerDocument.defaultView&&(this.dirCalculated=n.ownerDocument.defaultView.getComputedStyle(n).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(n,t,e){const s=this.list||this.vs.list;if(!s&&!e&&setTimeout(()=>{this.scrollToItem(n,t,!0)},10),s&&n>=0){const o=this.vs,a=o.container||s.parentNode,r=t!==void 0?t:o.enabled;c.scrollToItem(a,s,n,o.translate,r)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(n){Object.keys(n.data).length>0&&this.component.setState(n.data);const t={syntheticEvent:n.syntheticEvent,nativeEvent:n.syntheticEvent?n.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};n.events.forEach(e=>{const s=e.type;delete e.type;const o=s&&this.component.props[s];o&&o.call(void 0,{...t,...e})})}triggerOnPageChange(n,t,e){const s=this.component.props.virtual;if(s){const o=Math.min(Math.max(0,t),Math.max(0,s.total-e));o!==s.skip&&n.events.push({type:"onPageChange",page:{skip:o,take:e}})}}triggerPageChangeCornerItems(n,t){const e=this.component.props,{data:s=[],dataItemKey:o,virtual:a}=e,r=e.opened!==void 0?e.opened:this.component.state.opened;n&&a&&this.vs.enabled&&(a.skip>0&&c.areSame(n,s[0],o)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!r&&a.skip+a.pageSize<a.total&&c.areSame(n,s[s.length-1],o)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},p.defaultProps.popupSettings,this.component.props.popupSettings)}getGroupedDataModernMode(n,t){let e=[];return n.forEach((s,o)=>{n[o-1]&&s[t]!==n[o-1][t]&&e.push({[t]:s[t]}),e.push(n[o])}),e}};p.basicPropTypes={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,textField:i.string,className:i.string,label:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,itemRender:i.func,listNoDataRender:i.func,focusedItemIndex:i.func,header:i.node,footer:i.node},p.propTypes={...p.basicPropTypes,value:i.any,defaultValue:i.any,filterable:i.bool,filter:i.string,virtual:i.shape({pageSize:i.number.isRequired,skip:i.number.isRequired,total:i.number.isRequired}),onFilterChange:i.func,onPageChange:i.func},p.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let h=p;module.exports=h;
8
+ "use client";"use strict";const v=require("react"),n=require("prop-types"),y=require("./VirtualScroll.js"),S=require("./Navigation.js"),c=require("./utils.js");function b(l){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const e in l)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(l,e);Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:()=>l[e]})}}return i.default=l,Object.freeze(i)}const P=b(v),p=class p{constructor(i){this.wrapper=null,this.list=null,this.vs=new y,this.navigation=new S.Navigation,this.handleItemClick=(e,t)=>{const s=this.initState();s.syntheticEvent=t,t.stopPropagation(),this.component.handleItemSelect(e,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=e=>{if(!this.component.state.focused){const t=this.initState();t.data.focused=!0,t.events.push({type:"onFocus"}),t.syntheticEvent=e,this.applyState(t)}},this.filterChanged=(e,t)=>{const{textField:s,filterable:o}=this.component.props;o&&t.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=e=>{const t=this.component.props,s=t.opened!==void 0?t.opened:this.component.state.opened;t.opened===void 0&&(e.data.opened=!s),s?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(e,t)=>{const s=this.initState();s.syntheticEvent=t,this.triggerOnPageChange(s,e.skip,e.take),this.applyState(s)},this.scrollToVirtualItem=(e,t)=>{const s=this.vs;if(s.enabled=!1,e.skip===0)s.reset();else if(e.skip+e.pageSize===e.total)s.scrollToEnd();else{let o=s.translate;o===0&&(s.calcScrollElementHeight(),o=s.itemHeight*e.skip,s.translateTo(o-s.itemHeight)),s.container&&(s.container.scrollTop=o),this.scrollToItem(t,!0)}window.setTimeout(()=>s.enabled=!0,10)},this.scrollPopupByPageSize=e=>{var r,u,d,g,f,m;const t=this.vs,s=(u=(r=this.list)==null?void 0:r.parentElement)==null?void 0:u.scrollTop,o=t.enabled&&t.itemHeight?t.itemHeight:this.list?this.list.children[0].offsetHeight:0,a=(g=(d=this.list)==null?void 0:d.parentElement)==null?void 0:g.offsetHeight;s!==void 0&&a!==void 0&&((m=(f=this.list)==null?void 0:f.parentElement)==null||m.scroll({top:s+e*Math.floor(a/o)*o}))},this.renderScrollElement=()=>{const e=this.vs;return e.enabled&&P.createElement("div",{ref:t=>e.scrollElement=t,key:"scrollElementKey"})},this.resetGroupStickyHeader=(e,t)=>{e!==t.state.group&&t.setState({...t.state,group:e})},this.listBoxId=i.props.id+"list",this.guid=i.props.id,this.component=i,this.vs.PageChange=this.pageChange}didMount(){const i=this.component.props,e=i.popupSettings||{},t=i.style||{},s=e.width;let o=i.opened===!0;s===void 0&&this.calculatePopupWidth(),i.dir===void 0&&t.direction===void 0&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()}calculateDir(){const i=this.component.element;i&&i.ownerDocument&&i.ownerDocument.defaultView&&(this.dirCalculated=i.ownerDocument.defaultView.getComputedStyle(i).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(i,e,t){const s=this.list||this.vs.list;if(!s&&!t&&setTimeout(()=>{this.scrollToItem(i,e,!0)},10),s&&i>=0){const o=this.vs,a=o.container||s.parentNode,r=e!==void 0?e:o.enabled;c.scrollToItem(a,s,i,o.translate,r)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(i){Object.keys(i.data).length>0&&this.component.setState(i.data);const e={syntheticEvent:i.syntheticEvent,nativeEvent:i.syntheticEvent?i.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};i.events.forEach(t=>{const s=t.type;delete t.type;const o=s&&this.component.props[s];o&&o.call(void 0,{...e,...t})})}triggerOnPageChange(i,e,t){const s=this.component.props.virtual;if(s){const o=Math.min(Math.max(0,e),Math.max(0,s.total-t));o!==s.skip&&i.events.push({type:"onPageChange",page:{skip:o,take:t}})}}triggerPageChangeCornerItems(i,e){const t=this.component.props,{data:s=[],dataItemKey:o,virtual:a}=t,r=t.opened!==void 0?t.opened:this.component.state.opened;i&&a&&this.vs.enabled&&(a.skip>0&&c.areSame(i,s[0],o)?this.triggerOnPageChange(e,a.skip-1,a.pageSize):!r&&a.skip+a.pageSize<a.total&&c.areSame(i,s[s.length-1],o)&&this.triggerOnPageChange(e,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},p.defaultProps.popupSettings,this.component.props.popupSettings)}getAdaptiveAnimation(){const i=this.getPopupSettings();return i.animate!==void 0?i.animate:!0}getGroupedDataModernMode(i,e){let t=[];return i.forEach((s,o)=>{i[o-1]&&s[e]!==i[o-1][e]&&t.push({[e]:s[e]}),t.push(i[o])}),t}};p.basicPropTypes={opened:n.bool,disabled:n.bool,dir:n.string,tabIndex:n.number,accessKey:n.string,data:n.array,textField:n.string,className:n.string,label:n.string,loading:n.bool,popupSettings:n.shape({animate:n.oneOfType([n.bool,n.shape({openDuration:n.number,closeDuration:n.number})]),popupClass:n.string,className:n.string,appendTo:n.any,width:n.oneOfType([n.string,n.number]),height:n.oneOfType([n.string,n.number])}),onOpen:n.func,onClose:n.func,onFocus:n.func,onBlur:n.func,onChange:n.func,itemRender:n.func,listNoDataRender:n.func,focusedItemIndex:n.func,header:n.node,footer:n.node},p.propTypes={...p.basicPropTypes,value:n.any,defaultValue:n.any,filterable:n.bool,filter:n.string,virtual:n.shape({pageSize:n.number.isRequired,skip:n.number.isRequired,total:n.number.isRequired}),onFilterChange:n.func,onPageChange:n.func},p.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let h=p;module.exports=h;
@@ -7,21 +7,21 @@
7
7
  */
8
8
  "use client";
9
9
  import * as m from "react";
10
- import s from "prop-types";
10
+ import i from "prop-types";
11
11
  import v from "./VirtualScroll.mjs";
12
12
  import { Navigation as y } from "./Navigation.mjs";
13
13
  import { scrollToItem as S, areSame as g } from "./utils.mjs";
14
14
  const a = class a {
15
15
  constructor(n) {
16
- this.wrapper = null, this.list = null, this.vs = new v(), this.navigation = new y(), this.handleItemClick = (i, e) => {
16
+ this.wrapper = null, this.list = null, this.vs = new v(), this.navigation = new y(), this.handleItemClick = (s, e) => {
17
17
  const t = this.initState();
18
- t.syntheticEvent = e, e.stopPropagation(), this.component.handleItemSelect(i, t), this.togglePopup(t), this.applyState(t);
19
- }, this.handleFocus = (i) => {
18
+ t.syntheticEvent = e, e.stopPropagation(), this.component.handleItemSelect(s, t), this.togglePopup(t), this.applyState(t);
19
+ }, this.handleFocus = (s) => {
20
20
  if (!this.component.state.focused) {
21
21
  const e = this.initState();
22
- e.data.focused = !0, e.events.push({ type: "onFocus" }), e.syntheticEvent = i, this.applyState(e);
22
+ e.data.focused = !0, e.events.push({ type: "onFocus" }), e.syntheticEvent = s, this.applyState(e);
23
23
  }
24
- }, this.filterChanged = (i, e) => {
24
+ }, this.filterChanged = (s, e) => {
25
25
  const { textField: t, filterable: o } = this.component.props;
26
26
  o && e.events.push({
27
27
  type: "onFilterChange",
@@ -29,45 +29,45 @@ const a = class a {
29
29
  field: t,
30
30
  operator: "contains",
31
31
  ignoreCase: !0,
32
- value: i
32
+ value: s
33
33
  }
34
34
  });
35
- }, this.togglePopup = (i) => {
35
+ }, this.togglePopup = (s) => {
36
36
  const e = this.component.props, t = e.opened !== void 0 ? e.opened : this.component.state.opened;
37
- e.opened === void 0 && (i.data.opened = !t), t ? i.events.push({ type: "onClose" }) : (i.events.push({ type: "onOpen" }), this.calculatePopupWidth());
38
- }, this.pageChange = (i, e) => {
37
+ e.opened === void 0 && (s.data.opened = !t), t ? s.events.push({ type: "onClose" }) : (s.events.push({ type: "onOpen" }), this.calculatePopupWidth());
38
+ }, this.pageChange = (s, e) => {
39
39
  const t = this.initState();
40
- t.syntheticEvent = e, this.triggerOnPageChange(t, i.skip, i.take), this.applyState(t);
41
- }, this.scrollToVirtualItem = (i, e) => {
40
+ t.syntheticEvent = e, this.triggerOnPageChange(t, s.skip, s.take), this.applyState(t);
41
+ }, this.scrollToVirtualItem = (s, e) => {
42
42
  const t = this.vs;
43
- if (t.enabled = !1, i.skip === 0)
43
+ if (t.enabled = !1, s.skip === 0)
44
44
  t.reset();
45
- else if (i.skip + i.pageSize === i.total)
45
+ else if (s.skip + s.pageSize === s.total)
46
46
  t.scrollToEnd();
47
47
  else {
48
48
  let o = t.translate;
49
- o === 0 && (t.calcScrollElementHeight(), o = t.itemHeight * i.skip, t.translateTo(o - t.itemHeight)), t.container && (t.container.scrollTop = o), this.scrollToItem(e, !0);
49
+ o === 0 && (t.calcScrollElementHeight(), o = t.itemHeight * s.skip, t.translateTo(o - t.itemHeight)), t.container && (t.container.scrollTop = o), this.scrollToItem(e, !0);
50
50
  }
51
51
  window.setTimeout(() => t.enabled = !0, 10);
52
- }, this.scrollPopupByPageSize = (i) => {
53
- var l, r, h, c, u, d;
54
- const e = this.vs, t = (r = (l = this.list) == null ? void 0 : l.parentElement) == null ? void 0 : r.scrollTop, o = e.enabled && e.itemHeight ? e.itemHeight : this.list ? this.list.children[0].offsetHeight : 0, p = (c = (h = this.list) == null ? void 0 : h.parentElement) == null ? void 0 : c.offsetHeight;
55
- t !== void 0 && p !== void 0 && ((d = (u = this.list) == null ? void 0 : u.parentElement) == null || d.scroll({ top: t + i * Math.floor(p / o) * o }));
52
+ }, this.scrollPopupByPageSize = (s) => {
53
+ var r, l, h, c, u, d;
54
+ const e = this.vs, t = (l = (r = this.list) == null ? void 0 : r.parentElement) == null ? void 0 : l.scrollTop, o = e.enabled && e.itemHeight ? e.itemHeight : this.list ? this.list.children[0].offsetHeight : 0, p = (c = (h = this.list) == null ? void 0 : h.parentElement) == null ? void 0 : c.offsetHeight;
55
+ t !== void 0 && p !== void 0 && ((d = (u = this.list) == null ? void 0 : u.parentElement) == null || d.scroll({ top: t + s * Math.floor(p / o) * o }));
56
56
  }, this.renderScrollElement = () => {
57
- const i = this.vs;
58
- return i.enabled && /* @__PURE__ */ m.createElement(
57
+ const s = this.vs;
58
+ return s.enabled && /* @__PURE__ */ m.createElement(
59
59
  "div",
60
60
  {
61
- ref: (e) => i.scrollElement = e,
61
+ ref: (e) => s.scrollElement = e,
62
62
  key: "scrollElementKey"
63
63
  }
64
64
  );
65
- }, this.resetGroupStickyHeader = (i, e) => {
66
- i !== e.state.group && e.setState({ ...e.state, group: i });
65
+ }, this.resetGroupStickyHeader = (s, e) => {
66
+ s !== e.state.group && e.setState({ ...e.state, group: s });
67
67
  }, this.listBoxId = n.props.id + "list", this.guid = n.props.id, this.component = n, this.vs.PageChange = this.pageChange;
68
68
  }
69
69
  didMount() {
70
- const n = this.component.props, i = n.popupSettings || {}, e = n.style || {}, t = i.width;
70
+ const n = this.component.props, s = n.popupSettings || {}, e = n.style || {}, t = s.width;
71
71
  let o = n.opened === !0;
72
72
  t === void 0 && this.calculatePopupWidth(), n.dir === void 0 && e.direction === void 0 && (this.calculateDir(), o = !0), o && this.component.forceUpdate();
73
73
  }
@@ -78,13 +78,13 @@ const a = class a {
78
78
  calculatePopupWidth() {
79
79
  this.wrapper && (this.popupWidth = this.wrapper.offsetWidth + "px");
80
80
  }
81
- scrollToItem(n, i, e) {
81
+ scrollToItem(n, s, e) {
82
82
  const t = this.list || this.vs.list;
83
83
  if (!t && !e && setTimeout(() => {
84
- this.scrollToItem(n, i, !0);
84
+ this.scrollToItem(n, s, !0);
85
85
  }, 10), t && n >= 0) {
86
- const o = this.vs, p = o.container || t.parentNode, l = i !== void 0 ? i : o.enabled;
87
- S(p, t, n, o.translate, l);
86
+ const o = this.vs, p = o.container || t.parentNode, r = s !== void 0 ? s : o.enabled;
87
+ S(p, t, n, o.translate, r);
88
88
  }
89
89
  }
90
90
  initState() {
@@ -96,7 +96,7 @@ const a = class a {
96
96
  }
97
97
  applyState(n) {
98
98
  Object.keys(n.data).length > 0 && this.component.setState(n.data);
99
- const i = {
99
+ const s = {
100
100
  syntheticEvent: n.syntheticEvent,
101
101
  nativeEvent: n.syntheticEvent ? n.syntheticEvent.nativeEvent : void 0,
102
102
  target: this.component,
@@ -107,80 +107,84 @@ const a = class a {
107
107
  delete e.type;
108
108
  const o = t && this.component.props[t];
109
109
  o && o.call(void 0, {
110
- ...i,
110
+ ...s,
111
111
  ...e
112
112
  });
113
113
  });
114
114
  }
115
- triggerOnPageChange(n, i, e) {
115
+ triggerOnPageChange(n, s, e) {
116
116
  const t = this.component.props.virtual;
117
117
  if (t) {
118
- const o = Math.min(Math.max(0, i), Math.max(0, t.total - e));
118
+ const o = Math.min(Math.max(0, s), Math.max(0, t.total - e));
119
119
  o !== t.skip && n.events.push({
120
120
  type: "onPageChange",
121
121
  page: { skip: o, take: e }
122
122
  });
123
123
  }
124
124
  }
125
- triggerPageChangeCornerItems(n, i) {
126
- const e = this.component.props, { data: t = [], dataItemKey: o, virtual: p } = e, l = e.opened !== void 0 ? e.opened : this.component.state.opened;
127
- n && p && this.vs.enabled && (p.skip > 0 && g(n, t[0], o) ? this.triggerOnPageChange(i, p.skip - 1, p.pageSize) : !l && p.skip + p.pageSize < p.total && g(n, t[t.length - 1], o) && this.triggerOnPageChange(i, p.skip + 1, p.pageSize));
125
+ triggerPageChangeCornerItems(n, s) {
126
+ const e = this.component.props, { data: t = [], dataItemKey: o, virtual: p } = e, r = e.opened !== void 0 ? e.opened : this.component.state.opened;
127
+ n && p && this.vs.enabled && (p.skip > 0 && g(n, t[0], o) ? this.triggerOnPageChange(s, p.skip - 1, p.pageSize) : !r && p.skip + p.pageSize < p.total && g(n, t[t.length - 1], o) && this.triggerOnPageChange(s, p.skip + 1, p.pageSize));
128
128
  }
129
129
  getPopupSettings() {
130
130
  return Object.assign({}, a.defaultProps.popupSettings, this.component.props.popupSettings);
131
131
  }
132
- getGroupedDataModernMode(n, i) {
132
+ getAdaptiveAnimation() {
133
+ const n = this.getPopupSettings();
134
+ return n.animate !== void 0 ? n.animate : !0;
135
+ }
136
+ getGroupedDataModernMode(n, s) {
133
137
  let e = [];
134
138
  return n.forEach((t, o) => {
135
- n[o - 1] && t[i] !== n[o - 1][i] && e.push({ [i]: t[i] }), e.push(n[o]);
139
+ n[o - 1] && t[s] !== n[o - 1][s] && e.push({ [s]: t[s] }), e.push(n[o]);
136
140
  }), e;
137
141
  }
138
142
  };
139
143
  a.basicPropTypes = {
140
- opened: s.bool,
141
- disabled: s.bool,
142
- dir: s.string,
143
- tabIndex: s.number,
144
- accessKey: s.string,
145
- data: s.array,
146
- textField: s.string,
147
- className: s.string,
148
- label: s.string,
149
- loading: s.bool,
150
- popupSettings: s.shape({
151
- animate: s.oneOfType([s.bool, s.shape({
152
- openDuration: s.number,
153
- closeDuration: s.number
144
+ opened: i.bool,
145
+ disabled: i.bool,
146
+ dir: i.string,
147
+ tabIndex: i.number,
148
+ accessKey: i.string,
149
+ data: i.array,
150
+ textField: i.string,
151
+ className: i.string,
152
+ label: i.string,
153
+ loading: i.bool,
154
+ popupSettings: i.shape({
155
+ animate: i.oneOfType([i.bool, i.shape({
156
+ openDuration: i.number,
157
+ closeDuration: i.number
154
158
  })]),
155
- popupClass: s.string,
156
- className: s.string,
157
- appendTo: s.any,
158
- width: s.oneOfType([s.string, s.number]),
159
- height: s.oneOfType([s.string, s.number])
159
+ popupClass: i.string,
160
+ className: i.string,
161
+ appendTo: i.any,
162
+ width: i.oneOfType([i.string, i.number]),
163
+ height: i.oneOfType([i.string, i.number])
160
164
  }),
161
- onOpen: s.func,
162
- onClose: s.func,
163
- onFocus: s.func,
164
- onBlur: s.func,
165
- onChange: s.func,
166
- itemRender: s.func,
167
- listNoDataRender: s.func,
168
- focusedItemIndex: s.func,
169
- header: s.node,
170
- footer: s.node
165
+ onOpen: i.func,
166
+ onClose: i.func,
167
+ onFocus: i.func,
168
+ onBlur: i.func,
169
+ onChange: i.func,
170
+ itemRender: i.func,
171
+ listNoDataRender: i.func,
172
+ focusedItemIndex: i.func,
173
+ header: i.node,
174
+ footer: i.node
171
175
  }, a.propTypes = {
172
176
  ...a.basicPropTypes,
173
- value: s.any,
174
- defaultValue: s.any,
175
- filterable: s.bool,
176
- filter: s.string,
177
- virtual: s.shape({
178
- pageSize: s.number.isRequired,
179
- skip: s.number.isRequired,
180
- total: s.number.isRequired
177
+ value: i.any,
178
+ defaultValue: i.any,
179
+ filterable: i.bool,
180
+ filter: i.string,
181
+ virtual: i.shape({
182
+ pageSize: i.number.isRequired,
183
+ skip: i.number.isRequired,
184
+ total: i.number.isRequired
181
185
  }),
182
- onFilterChange: s.func,
183
- onPageChange: s.func
186
+ onFilterChange: i.func,
187
+ onPageChange: i.func
184
188
  }, a.defaultProps = {
185
189
  popupSettings: {
186
190
  height: "200px"
@@ -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 client";"use strict";const i=require("react"),n=require("prop-types"),c=require("@progress/kendo-react-inputs"),u=require("@progress/kendo-svg-icons"),s=require("@progress/kendo-react-common");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=d(i),a=o.forwardRef((e,r)=>{const t=o.useRef(null);return o.useImperativeHandle(r,()=>t.current),o.createElement("div",{className:"k-list-filter"},o.createElement(c.TextBox,{...e,ref:t,value:e.value||"",onChange:e.onChange,onKeyDown:e.onKeyDown,tabIndex:e.tabIndex,onClick:l=>l.stopPropagation(),size:e.size,fillMode:e.fillMode,rounded:e.rounded,prefix:()=>o.createElement(c.InputPrefix,null,o.createElement(s.IconWrap,{name:"search",icon:u.searchIcon}))}))});a.propTypes={value:n.oneOfType([n.string,n.number,n.array]),tabIndex:n.number,onChange:n.func,onKeyDown:n.func,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"])};a.displayName="KendoReactListFilter";const f=a;module.exports=f;
8
+ "use client";"use strict";const m=require("react"),n=require("prop-types"),l=require("@progress/kendo-react-inputs"),p=require("@progress/kendo-svg-icons"),b=require("@progress/kendo-react-common");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const t=g(m),c=t.forwardRef((e,o)=>{const r=t.useRef(null),{renderListFilterWrapper:a=!1,renderPrefixSeparator:s=!1,...u}=e;t.useImperativeHandle(o,()=>r.current);const d=()=>t.createElement(t.Fragment,null,t.createElement(l.InputPrefix,null,t.createElement(b.IconWrap,{name:"search",icon:p.searchIcon,className:"k-input-icon"})),s&&t.createElement(l.InputSeparator,null)),i=t.createElement(l.TextBox,{...u,ref:r,className:"k-searchbox",value:e.value||"",onChange:e.onChange,onKeyDown:e.onKeyDown,tabIndex:e.tabIndex,onClick:f=>f.stopPropagation(),size:e.size,fillMode:e.fillMode,rounded:e.rounded,prefix:d});return a?t.createElement("div",{className:"k-list-filter"}," ",i," "):i});c.propTypes={value:n.oneOfType([n.string,n.number,n.array]),tabIndex:n.number,onChange:n.func,onKeyDown:n.func,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"]),renderListFilterWrapper:n.bool,renderPrefixSeparator:n.bool};c.displayName="KendoReactListFilter";const x=c;module.exports=x;
@@ -6,32 +6,35 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as l from "react";
9
+ import * as n from "react";
10
10
  import e from "prop-types";
11
- import { TextBox as i, InputPrefix as u } from "@progress/kendo-react-inputs";
12
- import { searchIcon as m } from "@progress/kendo-svg-icons";
13
- import { IconWrap as f } from "@progress/kendo-react-common";
14
- const t = l.forwardRef((n, a) => {
15
- const o = l.useRef(null);
16
- return l.useImperativeHandle(
17
- a,
18
- () => o.current
19
- ), /* @__PURE__ */ l.createElement("div", { className: "k-list-filter" }, /* @__PURE__ */ l.createElement(
20
- i,
11
+ import { TextBox as f, InputPrefix as d, InputSeparator as p } from "@progress/kendo-react-inputs";
12
+ import { searchIcon as x } from "@progress/kendo-svg-icons";
13
+ import { IconWrap as b } from "@progress/kendo-react-common";
14
+ const t = n.forwardRef((r, o) => {
15
+ const l = n.useRef(null), { renderListFilterWrapper: i = !1, renderPrefixSeparator: s = !1, ...m } = r;
16
+ n.useImperativeHandle(
17
+ o,
18
+ () => l.current
19
+ );
20
+ const u = () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(d, null, /* @__PURE__ */ n.createElement(b, { name: "search", icon: x, className: "k-input-icon" })), s && /* @__PURE__ */ n.createElement(p, null)), a = /* @__PURE__ */ n.createElement(
21
+ f,
21
22
  {
22
- ...n,
23
- ref: o,
24
- value: n.value || "",
25
- onChange: n.onChange,
26
- onKeyDown: n.onKeyDown,
27
- tabIndex: n.tabIndex,
28
- onClick: (r) => r.stopPropagation(),
29
- size: n.size,
30
- fillMode: n.fillMode,
31
- rounded: n.rounded,
32
- prefix: () => /* @__PURE__ */ l.createElement(u, null, /* @__PURE__ */ l.createElement(f, { name: "search", icon: m }))
23
+ ...m,
24
+ ref: l,
25
+ className: "k-searchbox",
26
+ value: r.value || "",
27
+ onChange: r.onChange,
28
+ onKeyDown: r.onKeyDown,
29
+ tabIndex: r.tabIndex,
30
+ onClick: (c) => c.stopPropagation(),
31
+ size: r.size,
32
+ fillMode: r.fillMode,
33
+ rounded: r.rounded,
34
+ prefix: u
33
35
  }
34
- ));
36
+ );
37
+ return i ? /* @__PURE__ */ n.createElement("div", { className: "k-list-filter" }, " ", a, " ") : a;
35
38
  });
36
39
  t.propTypes = {
37
40
  value: e.oneOfType([e.string, e.number, e.array]),
@@ -40,10 +43,12 @@ t.propTypes = {
40
43
  onKeyDown: e.func,
41
44
  size: e.oneOf([null, "small", "medium", "large"]),
42
45
  rounded: e.oneOf([null, "small", "medium", "large", "full"]),
43
- fillMode: e.oneOf([null, "solid", "flat", "outline"])
46
+ fillMode: e.oneOf([null, "solid", "flat", "outline"]),
47
+ renderListFilterWrapper: e.bool,
48
+ renderPrefixSeparator: e.bool
44
49
  };
45
50
  t.displayName = "KendoReactListFilter";
46
- const y = t;
51
+ const E = t;
47
52
  export {
48
- y as default
53
+ E as default
49
54
  };