@progress/kendo-react-grid 14.3.0-develop.1 → 14.3.0-develop.11
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/GridClientContextReader.js +1 -1
- package/GridClientContextReader.mjs +10 -9
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +711 -624
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +427 -374
- package/GridState.d.ts +2 -0
- package/GridState.js +1 -1
- package/GridState.mjs +98 -90
- package/{toolbar-tools/smartbox/SegmentedControl.d.ts → cells/pincell/GridPinCell.d.ts} +4 -2
- package/cells/pincell/GridPinCell.js +9 -0
- package/cells/pincell/GridPinCell.mjs +19 -0
- package/cells/pincell/GridPinCellServer.d.ts +15 -0
- package/cells/pincell/GridPinCellServer.js +8 -0
- package/cells/pincell/GridPinCellServer.mjs +32 -0
- package/cells/pincell/GridPinCellServerContainer.d.ts +11 -0
- package/cells/pincell/GridPinCellServerContainer.js +9 -0
- package/cells/pincell/GridPinCellServerContainer.mjs +26 -0
- package/cells/pincell/GridPinDropdownButton.d.ts +21 -0
- package/cells/pincell/GridPinDropdownButton.js +9 -0
- package/cells/pincell/GridPinDropdownButton.mjs +58 -0
- package/cells/pincell/useGridPinCellClientTdProps.d.ts +24 -0
- package/cells/pincell/useGridPinCellClientTdProps.js +9 -0
- package/cells/pincell/useGridPinCellClientTdProps.mjs +21 -0
- package/cells/pincell/utils.d.ts +20 -0
- package/cells/pincell/utils.js +8 -0
- package/cells/pincell/utils.mjs +47 -0
- package/components/PinnedRowsTable.d.ts +48 -0
- package/components/PinnedRowsTable.js +9 -0
- package/components/PinnedRowsTable.mjs +133 -0
- package/components/StickyGroupTable.js +1 -1
- package/components/StickyGroupTable.mjs +1 -1
- package/contextMenu/GridContextMenu.d.ts +42 -0
- package/contextMenu/GridContextMenu.js +1 -1
- package/contextMenu/GridContextMenu.mjs +101 -51
- package/contextMenu/enums.d.ts +5 -1
- package/contextMenu/enums.js +1 -1
- package/contextMenu/enums.mjs +2 -2
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnResize.d.ts +9 -0
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +105 -115
- package/getRowContents.d.ts +2 -2
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +13 -14
- package/header/client/GridHeaderPinCell.d.ts +12 -0
- package/header/client/GridHeaderPinCell.js +9 -0
- package/header/client/GridHeaderPinCell.mjs +14 -0
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.js +1 -1
- package/index.mjs +97 -95
- package/interfaces/ColumnType.d.ts +1 -1
- package/interfaces/GridCellsSettings.d.ts +23 -0
- package/interfaces/GridProps.d.ts +70 -1
- package/interfaces/GridRowProps.d.ts +4 -0
- package/interfaces/GridRowsSettings.d.ts +11 -0
- package/interfaces/events.d.ts +17 -0
- package/messages/index.d.ts +20 -0
- package/messages/index.js +2 -2
- package/messages/index.mjs +110 -102
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +18 -17
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +25 -24
- package/rows/GridRowRenderer.d.ts +1 -0
- package/rows/GridRowRenderer.js +1 -1
- package/rows/GridRowRenderer.mjs +39 -36
- package/stacked/GridStackedRow.d.ts +5 -0
- package/stacked/GridStackedRow.js +1 -1
- package/stacked/GridStackedRow.mjs +118 -116
- package/stacked/StackedModeRow.d.ts +1 -0
- package/stacked/StackedModeRow.js +1 -1
- package/stacked/StackedModeRow.mjs +13 -11
- package/toolbar-tools/smartbox/SmartBox.js +1 -1
- package/toolbar-tools/smartbox/SmartBox.mjs +102 -94
- package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.d.ts +12 -3
- package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.js +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.mjs +42 -41
- package/toolbar-tools/smartbox/index.d.ts +0 -1
- package/toolbar-tools/smartbox/interfaces/index.d.ts +0 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +44 -44
- package/toolbar-tools/smartbox/SegmentedControl.js +0 -8
- package/toolbar-tools/smartbox/SegmentedControl.mjs +0 -109
- package/toolbar-tools/smartbox/interfaces/SegmentedControlTypes.d.ts +0 -66
|
@@ -6,52 +6,53 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { zoomSparkleIcon as
|
|
11
|
-
function
|
|
9
|
+
import * as g from "react";
|
|
10
|
+
import { zoomSparkleIcon as t, searchIcon as N, sparklesIcon as i } from "@progress/kendo-svg-icons";
|
|
11
|
+
function z({
|
|
12
12
|
searchMode: n,
|
|
13
|
-
semanticSearchMode:
|
|
14
|
-
aiAssistantMode:
|
|
15
|
-
selectedView:
|
|
16
|
-
lastSearchMode:
|
|
17
|
-
setSelectedViewState:
|
|
13
|
+
semanticSearchMode: u,
|
|
14
|
+
aiAssistantMode: C,
|
|
15
|
+
selectedView: f,
|
|
16
|
+
lastSearchMode: b,
|
|
17
|
+
setSelectedViewState: l,
|
|
18
18
|
setInputValue: k
|
|
19
19
|
}) {
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
const p = g.useMemo(() => {
|
|
21
|
+
const I = (n == null ? void 0 : n.enabled) || (u == null ? void 0 : u.enabled), B = C == null ? void 0 : C.enabled;
|
|
22
|
+
if (!I || !B)
|
|
23
|
+
return [];
|
|
24
|
+
const v = f === "semanticSearch" || f === "aiAssistant" && b === "semanticSearch";
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
value: "search",
|
|
26
28
|
text: "Search",
|
|
27
|
-
svgIcon:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}), l.push({
|
|
34
|
-
buttonId: 2,
|
|
29
|
+
svgIcon: v ? t : N,
|
|
30
|
+
iconClassName: v ? "k-accent-icon" : void 0
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: "aiAssistant",
|
|
35
34
|
text: "AI Assistant",
|
|
36
|
-
svgIcon:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
u,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
svgIcon: i,
|
|
36
|
+
iconClassName: "k-accent-icon"
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
}, [n, u, C, f, b]), x = g.useCallback(() => {
|
|
40
|
+
if (f === "search" || f === "semanticSearch")
|
|
41
|
+
return "search";
|
|
42
|
+
if (f === "aiAssistant")
|
|
43
|
+
return "aiAssistant";
|
|
44
|
+
}, [f]), A = g.useCallback(
|
|
45
|
+
(I) => {
|
|
46
|
+
I === "search" ? b && (b === "search" ? n != null && n.enabled : u != null && u.enabled) ? l(b) : n != null && n.enabled ? l("search") : u != null && u.enabled && l("semanticSearch") : I === "aiAssistant" && l("aiAssistant"), k("");
|
|
47
|
+
},
|
|
48
|
+
[n, u, b, l, k]
|
|
49
|
+
);
|
|
50
|
+
return {
|
|
51
|
+
items: p,
|
|
52
|
+
value: x(),
|
|
53
|
+
onChange: A
|
|
54
|
+
};
|
|
54
55
|
}
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
z as useSmartBoxSegmentedControl
|
|
57
58
|
};
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
export * from './SegmentedControlTypes.js';
|
|
9
8
|
export * from './SearchTypes.js';
|
|
10
9
|
export * from './SmartBoxTypes.js';
|
|
11
10
|
export * from './utilTypes.js';
|
package/utils/index.d.ts
CHANGED
package/utils/index.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),v=require("../GridColumn.js"),S=require("@progress/kendo-data-query"),y=require("@progress/kendo-react-data-tools"),O=require("./_serverModule.js"),T=require("./_clientModule.js"),h=require("../contextMenu/enums.js"),H=require("@progress/kendo-react-common");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const M=j(A);function u(e,t){const a=(e!=null?e:"").split(".");let r=t;return a.forEach(n=>{r=r?r[n]:void 0}),r}function N(e,t,a,r,n,d,l,i,s,f=0,o){var c;let x=f;for(let g=0;g<t.length;g++){let C;if(!n||t[g].value===void 0||t[g].items===void 0){e[e.length]={dataIndex:r.index,dataItem:t[g],rowType:"data",level:f,group:o,expanded:(c=s?!!(d!=null&&d[S.getter(s)(t[g])]):!1)!=null?c:!1},r.index++;continue}else{let w;o!=null&&o.parents?w=[{field:o.field,value:o.value},...o.parents]:o?w=[o]:w=[],C={field:t[g].field,value:t[g].value,parents:w}}x=Math.max(x,f+1);let I=!1;const b=y.findGroupExpand(l||[],C);b?I=b.expanded!==!1:I=i!==!1,e[e.length]={dataIndex:-1,dataItem:t[g],level:f,group:C,rowType:"groupHeader",expanded:I},I&&(C.expanded=I,x=Math.max(N(e,t[g].items,a,r,n,d,l,i,s,f+1,C),x)),(a==="always"||I&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[g],rowType:"groupFooter",level:f,expanded:I})}return x}function p(e,t){for(let a=0;a<e.length;a++){const r=e[a];if(r.locked===void 0){const n=t[r.index];n&&(r.locked=n.locked)}}}const q=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function B(e,t,a){const r=[[]];let n=0;for(let i=e.length-1;i>=0;i--)n=Math.max(n,e[i].depth),e[i].headerColSpan=e[i].headerColSpan||1,e[i].children.length>0&&(e[i].headerColSpan=e[i].children.reduce((s,f)=>f.hidden?s:s+f.headerColSpan,0));const d=[];let l=1;return e.forEach((i,s)=>{r[i.depth]=r[i.depth]||[];let f=!1;r[i.depth].length===0&&(l<=1?l=1+(i.children.length>0?0:n-i.depth):(l--,f=!0)),i.rowSpan=1+(i.children.length>0?0:n-i.depth),i.kFirst=f,i.index=r[i.depth].length,r[i.depth].push(s),i.ariaColumnIndex=d[i.depth]?d[i.depth]+1:1;for(let o=i.depth;o<i.depth+i.rowSpan;o++)d[o]=(d[o]||0)+i.headerColSpan}),p(e,t),y.updateLeft(r,e,a),y.updateRight(r,e,a),r}function R(e,t,a,r=0,n=!1){const d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((i,s)=>{i=i.props?i.props:i;const f=i.id?i.id:y.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),o=H.canUseDOM&&i.media&&window.matchMedia?!window.matchMedia(i.media).matches:!1,x=n||o||i.hidden,c=t==null?void 0:t.find(C=>C.id===f),g=R(i.children,(c==null?void 0:c.children)||[],a,r+1,x);d.push(Object.assign({depth:r},v.gridDefaultProps,g.length?{cell:()=>null,filterCell:()=>null}:{},i,{id:f,declarationIndex:d.length,children:g,headerColSpan:0,rowSpan:0,columnType:i.columnType||"data",colSpan:i.colSpan||1,isAccessible:!0,hidden:x,left:null,right:null,rowSpannable:i.rowSpannable},c?{width:c.width,orderIndex:c.orderIndex}:{}))});const l=(i,s)=>i.orderIndex===s.orderIndex?i.declarationIndex-s.declarationIndex:(i.orderIndex||0)-(s.orderIndex||0);if(d.sort(l),r===0){const i=[],s=(f,o)=>f.forEach(x=>{x.parentIndex=o,s(x.children,i.push(x)-1)});return s(d,-1),i}return d}const D=e=>Array.isArray(e)?e:e?e.data:[];function z(e,t,a,r){const n=D(e),d=[];if(n.length>0){let l=n[0];if(t)for(let s=0;s<t.length;s++)l=l.items&&l.items[0];Object.getOwnPropertyNames(l).forEach(s=>{s!==a.column&&d.push(Object.assign({id:y.tableKeyboardNavigationTools.generateNavigatableId(`${r.prevId++}`,r.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},v.gridDefaultProps,{field:s}))})}return d}const _=(e,t)=>{var r;let a=e[t.parentIndex];for(;a;){if((r=a.cells)!=null&&r.footerCell)return!0;a=e[a.parentIndex]}return!1},L=e=>e.filter(t=>{var a;return _(e,t)?!1:!!((a=t.cells)!=null&&a.footerCell)||!(t.children&&t.children.length>0)}),$=e=>{let t=e.width;return typeof(e==null?void 0:e.width)=="number"&&(e!=null&&e.minResizableWidth)&&(e==null?void 0:e.width)<(e==null?void 0:e.minResizableWidth)&&(t=e==null?void 0:e.minResizableWidth),typeof(e==null?void 0:e.width)=="number"&&(e!=null&&e.minWidth)&&(e==null?void 0:e.width)<(e==null?void 0:e.minWidth)?t=e==null?void 0:e.minWidth:typeof(e==null?void 0:e.width)=="number"&&(e!=null&&e.maxWidth)&&(e==null?void 0:e.width)>(e==null?void 0:e.maxWidth)&&(t=e==null?void 0:e.maxWidth),t!==void 0?Math.floor(parseFloat(t.toString()))+"px":void 0},V=(e,t)=>t&&t.filter(a=>a.field===e).length>0,E=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:r,depth:n,headerColSpan:d,rowSpan:l,index:i,kFirst:s,children:f,...o}=t;return f.length?{children:E(f),...o}:o})),G=e=>{const{cells:t,rowSpannable:a,defaultCell:r,...n}=e;return e.children.length?{...n,children:e.children.map(G)}:n},W=e=>({id:e.id,field:e.field,title:e.title,width:e.width,orderIndex:e.orderIndex,hidden:!1,minWidth:e.minWidth,maxWidth:e.maxWidth,children:e.children?F(e.children):null}),F=e=>e.map(W),P=e=>{const t=[],a=r=>r==null?void 0:r.forEach(n=>{t.push(n),a(n.children)});return a(e),t},K=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),Q=17895697,U=e=>{let t=[];return e.sortable&&(t=t.concat([h.GridContextMenuItemNames.sortAsc,h.GridContextMenuItemNames.sortDesc])),e.pdf&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.exportPDF])),t},J=e=>{let t=[];return e.clipboard&&(t=t.concat([h.GridContextMenuItemNames.copySelection,h.GridContextMenuItemNames.copySelectionNoHeaders,h.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.create,h.GridContextMenuItemNames.edit,h.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.reorderRow])),e.pdf&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.exportPDF])),e.pinnable&&(t.length&&(t=t.concat([h.GridContextMenuItemNames.separator])),t=t.concat([h.GridContextMenuItemNames.pinRow])),t},X=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e},Y=e=>{var a;return typeof e=="object"?(a=e.enabled)!=null?a:!0:e!=null?e:!1},Z=()=>O.ServerFragment===T.ClientFragment,m=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),ee=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isHighlighted:e.isHighlighted,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),te=e=>{var r,n;const t=typeof e=="object"?(r=e.enabled)!=null?r:!0:e!=null?e:!1,a=typeof e=="object"?(n=e.valueGetter)!=null?n:((d,l)=>S.getter(l)(d)):(d,l)=>S.getter(l)(d);return{enabled:t,valueGetter:a}},k=e=>{var t;return M.isValidElement(e)?e:(t=M.Children.toArray(e))==null?void 0:t[0]},ie=(e,t)=>{const a=k(e);return a?M.cloneElement(a,t):null},ae=e=>{let t=0;if(e){const a=e.insertRow(0),r=a.insertCell(0);r.textContent=" ",t=a.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.autoGenerateColumns=z;exports.calcRowHeight=ae;exports.clientColumn=G;exports.cloneReactElement=ie;exports.firefox=K;exports.firefoxMaxHeight=Q;exports.flatData=N;exports.footerColumns=L;exports.getClientCellProps=ee;exports.getColSpan=q;exports.getColumnState=W;exports.getColumnWidth=$;exports.getColumnsState=F;exports.getDataAsArray=D;exports.getDefaultBodyContextMenuItems=J;exports.getDefaultHeadContextMenuItems=U;exports.getFlatColumnsState=P;exports.getNestedValue=u;exports.getReactElement=k;exports.getRowSpanOptions=te;exports.isClient=Z;exports.isClientReference=m;exports.isRowReorderEnabled=Y;exports.isSorted=V;exports.mapColumns=B;exports.readColumns=R;exports.resolveCells=X;exports.sanitizeColumns=E;exports.syncLockedColumns=p;
|
package/utils/index.mjs
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
import * as C from "react";
|
|
9
9
|
import { gridDefaultProps as p } from "../GridColumn.mjs";
|
|
10
10
|
import { getter as S } from "@progress/kendo-data-query";
|
|
11
|
-
import { findGroupExpand as
|
|
11
|
+
import { findGroupExpand as R, tableKeyboardNavigationTools as b, updateLeft as W, updateRight as F } from "@progress/kendo-react-data-tools";
|
|
12
12
|
import { ServerFragment as D } from "./_serverModule.mjs";
|
|
13
13
|
import { ClientFragment as E } from "./_clientModule.mjs";
|
|
14
|
-
import { GridContextMenuItemNames as
|
|
14
|
+
import { GridContextMenuItemNames as l } from "../contextMenu/enums.mjs";
|
|
15
15
|
import { canUseDOM as M } from "@progress/kendo-react-common";
|
|
16
16
|
function X(e, t) {
|
|
17
17
|
const r = (e != null ? e : "").split(".");
|
|
@@ -20,64 +20,64 @@ function X(e, t) {
|
|
|
20
20
|
a = a ? a[d] : void 0;
|
|
21
21
|
}), a;
|
|
22
22
|
}
|
|
23
|
-
function A(e, t, r, a, d, n,
|
|
23
|
+
function A(e, t, r, a, d, n, o, i, h, s = 0, f) {
|
|
24
24
|
var c;
|
|
25
|
-
let
|
|
26
|
-
for (let
|
|
25
|
+
let x = s;
|
|
26
|
+
for (let g = 0; g < t.length; g++) {
|
|
27
27
|
let I;
|
|
28
|
-
if (!d || t[
|
|
28
|
+
if (!d || t[g].value === void 0 || t[g].items === void 0) {
|
|
29
29
|
e[e.length] = {
|
|
30
30
|
dataIndex: a.index,
|
|
31
|
-
dataItem: t[
|
|
31
|
+
dataItem: t[g],
|
|
32
32
|
rowType: "data",
|
|
33
33
|
level: s,
|
|
34
34
|
group: f,
|
|
35
35
|
// This is related to detail-row expansion
|
|
36
|
-
expanded: (c = h ? !!(n != null && n[S(h)(t[
|
|
36
|
+
expanded: (c = h ? !!(n != null && n[S(h)(t[g])]) : !1) != null ? c : !1
|
|
37
37
|
}, a.index++;
|
|
38
38
|
continue;
|
|
39
39
|
} else {
|
|
40
40
|
let y;
|
|
41
41
|
f != null && f.parents ? y = [{ field: f.field, value: f.value }, ...f.parents] : f ? y = [f] : y = [], I = {
|
|
42
|
-
field: t[
|
|
43
|
-
value: t[
|
|
42
|
+
field: t[g].field,
|
|
43
|
+
value: t[g].value,
|
|
44
44
|
parents: y
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
x = Math.max(x, s + 1);
|
|
48
48
|
let w = !1;
|
|
49
|
-
const v =
|
|
49
|
+
const v = R(o || [], I);
|
|
50
50
|
v ? w = v.expanded !== !1 : w = i !== !1, e[e.length] = {
|
|
51
51
|
dataIndex: -1,
|
|
52
|
-
dataItem: t[
|
|
52
|
+
dataItem: t[g],
|
|
53
53
|
level: s,
|
|
54
54
|
group: I,
|
|
55
55
|
rowType: "groupHeader",
|
|
56
56
|
expanded: w
|
|
57
|
-
}, w && (I.expanded = w,
|
|
57
|
+
}, w && (I.expanded = w, x = Math.max(
|
|
58
58
|
A(
|
|
59
59
|
e,
|
|
60
|
-
t[
|
|
60
|
+
t[g].items,
|
|
61
61
|
r,
|
|
62
62
|
a,
|
|
63
63
|
d,
|
|
64
64
|
n,
|
|
65
|
-
|
|
65
|
+
o,
|
|
66
66
|
i,
|
|
67
67
|
h,
|
|
68
68
|
s + 1,
|
|
69
69
|
I
|
|
70
70
|
),
|
|
71
|
-
|
|
71
|
+
x
|
|
72
72
|
)), (r === "always" || w && r === "visible") && (e[e.length] = {
|
|
73
73
|
dataIndex: -1,
|
|
74
|
-
dataItem: t[
|
|
74
|
+
dataItem: t[g],
|
|
75
75
|
rowType: "groupFooter",
|
|
76
76
|
level: s,
|
|
77
77
|
expanded: w
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return x;
|
|
81
81
|
}
|
|
82
82
|
function H(e, t) {
|
|
83
83
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -98,14 +98,14 @@ function Z(e, t, r) {
|
|
|
98
98
|
0
|
|
99
99
|
));
|
|
100
100
|
const n = [];
|
|
101
|
-
let
|
|
101
|
+
let o = 1;
|
|
102
102
|
return e.forEach((i, h) => {
|
|
103
103
|
a[i.depth] = a[i.depth] || [];
|
|
104
104
|
let s = !1;
|
|
105
|
-
a[i.depth].length === 0 && (
|
|
105
|
+
a[i.depth].length === 0 && (o <= 1 ? o = 1 + (i.children.length > 0 ? 0 : d - i.depth) : (o--, s = !0)), i.rowSpan = 1 + (i.children.length > 0 ? 0 : d - i.depth), i.kFirst = s, i.index = a[i.depth].length, a[i.depth].push(h), i.ariaColumnIndex = n[i.depth] ? n[i.depth] + 1 : 1;
|
|
106
106
|
for (let f = i.depth; f < i.depth + i.rowSpan; f++)
|
|
107
107
|
n[f] = (n[f] || 0) + i.headerColSpan;
|
|
108
|
-
}), H(e, t),
|
|
108
|
+
}), H(e, t), W(a, e, r), F(a, e, r), a;
|
|
109
109
|
}
|
|
110
110
|
function T(e, t, r, a = 0, d = !1) {
|
|
111
111
|
const n = [];
|
|
@@ -113,23 +113,23 @@ function T(e, t, r, a = 0, d = !1) {
|
|
|
113
113
|
return [];
|
|
114
114
|
e && e.length === void 0 && (e = [e]), e.forEach((i, h) => {
|
|
115
115
|
i = i.props ? i.props : i;
|
|
116
|
-
const s = i.id ? i.id : b.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), f = M && i.media && window.matchMedia ? !window.matchMedia(i.media).matches : !1,
|
|
116
|
+
const s = i.id ? i.id : b.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"), f = M && i.media && window.matchMedia ? !window.matchMedia(i.media).matches : !1, x = d || f || i.hidden, c = t == null ? void 0 : t.find((I) => I.id === s), g = T(i.children, (c == null ? void 0 : c.children) || [], r, a + 1, x);
|
|
117
117
|
n.push(
|
|
118
118
|
Object.assign(
|
|
119
119
|
{ depth: a },
|
|
120
120
|
p,
|
|
121
|
-
|
|
121
|
+
g.length ? { cell: () => null, filterCell: () => null } : {},
|
|
122
122
|
i,
|
|
123
123
|
{
|
|
124
124
|
id: s,
|
|
125
125
|
declarationIndex: n.length,
|
|
126
|
-
children:
|
|
126
|
+
children: g,
|
|
127
127
|
headerColSpan: 0,
|
|
128
128
|
rowSpan: 0,
|
|
129
129
|
columnType: i.columnType || "data",
|
|
130
130
|
colSpan: i.colSpan || 1,
|
|
131
131
|
isAccessible: !0,
|
|
132
|
-
hidden:
|
|
132
|
+
hidden: x,
|
|
133
133
|
left: null,
|
|
134
134
|
right: null,
|
|
135
135
|
rowSpannable: i.rowSpannable
|
|
@@ -138,10 +138,10 @@ function T(e, t, r, a = 0, d = !1) {
|
|
|
138
138
|
)
|
|
139
139
|
);
|
|
140
140
|
});
|
|
141
|
-
const
|
|
142
|
-
if (n.sort(
|
|
143
|
-
const i = [], h = (s, f) => s.forEach((
|
|
144
|
-
|
|
141
|
+
const o = (i, h) => i.orderIndex === h.orderIndex ? i.declarationIndex - h.declarationIndex : (i.orderIndex || 0) - (h.orderIndex || 0);
|
|
142
|
+
if (n.sort(o), a === 0) {
|
|
143
|
+
const i = [], h = (s, f) => s.forEach((x) => {
|
|
144
|
+
x.parentIndex = f, h(x.children, i.push(x) - 1);
|
|
145
145
|
});
|
|
146
146
|
return h(n, -1), i;
|
|
147
147
|
}
|
|
@@ -151,11 +151,11 @@ const k = (e) => Array.isArray(e) ? e : e ? e.data : [];
|
|
|
151
151
|
function _(e, t, r, a) {
|
|
152
152
|
const d = k(e), n = [];
|
|
153
153
|
if (d.length > 0) {
|
|
154
|
-
let
|
|
154
|
+
let o = d[0];
|
|
155
155
|
if (t)
|
|
156
156
|
for (let h = 0; h < t.length; h++)
|
|
157
|
-
|
|
158
|
-
Object.getOwnPropertyNames(
|
|
157
|
+
o = o.items && o.items[0];
|
|
158
|
+
Object.getOwnPropertyNames(o).forEach((h) => {
|
|
159
159
|
h !== r.column && n.push(
|
|
160
160
|
Object.assign(
|
|
161
161
|
{
|
|
@@ -199,7 +199,7 @@ const j = (e, t) => {
|
|
|
199
199
|
let t = e.width;
|
|
200
200
|
return typeof (e == null ? void 0 : e.width) == "number" && (e != null && e.minResizableWidth) && (e == null ? void 0 : e.width) < (e == null ? void 0 : e.minResizableWidth) && (t = e == null ? void 0 : e.minResizableWidth), typeof (e == null ? void 0 : e.width) == "number" && (e != null && e.minWidth) && (e == null ? void 0 : e.width) < (e == null ? void 0 : e.minWidth) ? t = e == null ? void 0 : e.minWidth : typeof (e == null ? void 0 : e.width) == "number" && (e != null && e.maxWidth) && (e == null ? void 0 : e.width) > (e == null ? void 0 : e.maxWidth) && (t = e == null ? void 0 : e.maxWidth), t !== void 0 ? Math.floor(parseFloat(t.toString())) + "px" : void 0;
|
|
201
201
|
}, u = (e, t) => t && t.filter((r) => r.field === e).length > 0, B = (e) => (e.sort((t, r) => t.declarationIndex - r.declarationIndex), e.map((t) => {
|
|
202
|
-
const { declarationIndex: r, parentIndex: a, depth: d, headerColSpan: n, rowSpan:
|
|
202
|
+
const { declarationIndex: r, parentIndex: a, depth: d, headerColSpan: n, rowSpan: o, index: i, kFirst: h, children: s, ...f } = t;
|
|
203
203
|
return s.length ? {
|
|
204
204
|
children: B(s),
|
|
205
205
|
...f
|
|
@@ -227,18 +227,18 @@ const j = (e, t) => {
|
|
|
227
227
|
return r(e), t;
|
|
228
228
|
}, ee = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), te = 17895697, ie = (e) => {
|
|
229
229
|
let t = [];
|
|
230
|
-
return e.sortable && (t = t.concat([
|
|
230
|
+
return e.sortable && (t = t.concat([l.sortAsc, l.sortDesc])), e.pdf && (t.length && (t = t.concat([l.separator])), t = t.concat([l.exportPDF])), t;
|
|
231
231
|
}, re = (e) => {
|
|
232
232
|
let t = [];
|
|
233
233
|
return e.clipboard && (t = t.concat([
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
])), e.editable && (t.length && (t = t.concat([
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
])), e.selectable && (t.length && (t = t.concat([
|
|
234
|
+
l.copySelection,
|
|
235
|
+
l.copySelectionNoHeaders,
|
|
236
|
+
l.paste
|
|
237
|
+
])), e.editable && (t.length && (t = t.concat([l.separator])), t = t.concat([
|
|
238
|
+
l.create,
|
|
239
|
+
l.edit,
|
|
240
|
+
l.delete
|
|
241
|
+
])), e.selectable && (t.length && (t = t.concat([l.separator])), t = t.concat([l.select])), e.rowReorderable && (t.length && (t = t.concat([l.separator])), t = t.concat([l.reorderRow])), e.pdf && (t.length && (t = t.concat([l.separator])), t = t.concat([l.exportPDF])), e.pinnable && (t.length && (t = t.concat([l.separator])), t = t.concat([l.pinRow])), t;
|
|
242
242
|
}, ae = (e, t) => {
|
|
243
243
|
if (!(!e && !t))
|
|
244
244
|
return t ? e ? {
|
|
@@ -292,7 +292,7 @@ const j = (e, t) => {
|
|
|
292
292
|
group: e.group
|
|
293
293
|
}), se = (e) => {
|
|
294
294
|
var a, d;
|
|
295
|
-
const t = typeof e == "object" ? (a = e.enabled) != null ? a : !0 : e != null ? e : !1, r = typeof e == "object" ? (d = e.valueGetter) != null ? d : ((n,
|
|
295
|
+
const t = typeof e == "object" ? (a = e.enabled) != null ? a : !0 : e != null ? e : !1, r = typeof e == "object" ? (d = e.valueGetter) != null ? d : ((n, o) => S(o)(n)) : (n, o) => S(o)(n);
|
|
296
296
|
return { enabled: t, valueGetter: r };
|
|
297
297
|
}, $ = (e) => {
|
|
298
298
|
var t;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),i=require("@progress/kendo-react-common");function W(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(a,r,l.get?l:{enumerable:!0,get:()=>s[r]})}}return a.default=s,Object.freeze(a)}const e=W(T),P=void 0,I=e.forwardRef((s,a)=>{const{buttons:r=[],size:l=P,stretched:z}=s,N=l?i.kendoThemeMaps.sizeMap[l]:void 0,f=e.useRef(null),R=e.useRef(null),[O,u]=e.useState({}),d=e.useCallback(()=>{const t=f.current,n=R.current;if(!t||!n)return;const m=t.querySelector(".k-segmented-control-button.k-selected");if(!m)return;const g=t.offsetWidth,p=m.offsetWidth,b=m.offsetLeft;n.style.left=`${b}px`,n.style.right=`${g-b-p}px`},[]);return e.useLayoutEffect(()=>{d()},[r,d]),e.useEffect(()=>{const t=f.current;if(!t)return;const n=new ResizeObserver(()=>{d()});return n.observe(t),()=>{n.disconnect()}},[d]),e.useImperativeHandle(a,()=>({element:f.current}),[]),e.createElement("div",{ref:f,className:i.classNames("k-segmented-control",N&&`k-segmented-control-${N}`,{"k-segmented-control-stretched":z})},e.createElement("div",{className:"k-segmented-control-thumb",ref:R,"aria-hidden":"true"}),r.map(({buttonId:t,disabled:n,text:m,svgIcon:g,selected:p,accentIcon:b,type:E="button",onClick:h,onMouseEnter:k,onMouseLeave:v,onFocus:S,onBlur:y,...j})=>e.createElement("button",{key:t,type:E,className:i.classNames("k-segmented-control-button",{"k-selected":p,"k-hover":O.hoveredId===t&&!n,"k-focus":O.focusedId===t&&!n,"k-disabled":n}),disabled:n,onClick:c=>{h==null||h(c),d()},onMouseEnter:c=>{u(o=>({...o,hoveredId:t})),k==null||k(c)},onMouseLeave:c=>{u(o=>({...o,hoveredId:void 0})),v==null||v(c)},onFocus:c=>{u(o=>({...o,focusedId:t})),S==null||S(c)},onBlur:c=>{u(o=>({...o,focusedId:void 0})),y==null||y(c)},...j},g&&e.createElement(i.IconWrap,{className:i.classNames("k-segmented-control-button-icon",{"k-accent-icon":p&&b}),icon:g}),e.createElement("span",{className:"k-segmented-control-button-text"},m))))});I.displayName="KendoReactSegmentedControl";exports.SegmentedControl=I;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
import * as e from "react";
|
|
9
|
-
import { kendoThemeMaps as x, classNames as g, IconWrap as T } from "@progress/kendo-react-common";
|
|
10
|
-
const $ = void 0, w = e.forwardRef((S, y) => {
|
|
11
|
-
const { buttons: v = [], size: b = $, stretched: E } = S, R = b ? x.sizeMap[b] : void 0, a = e.useRef(null), I = e.useRef(null), [N, m] = e.useState({}), r = e.useCallback(() => {
|
|
12
|
-
const t = a.current, s = I.current;
|
|
13
|
-
if (!t || !s)
|
|
14
|
-
return;
|
|
15
|
-
const o = t.querySelector(".k-segmented-control-button.k-selected");
|
|
16
|
-
if (!o)
|
|
17
|
-
return;
|
|
18
|
-
const d = t.offsetWidth, l = o.offsetWidth, i = o.offsetLeft;
|
|
19
|
-
s.style.left = `${i}px`, s.style.right = `${d - i - l}px`;
|
|
20
|
-
}, []);
|
|
21
|
-
return e.useLayoutEffect(() => {
|
|
22
|
-
r();
|
|
23
|
-
}, [v, r]), e.useEffect(() => {
|
|
24
|
-
const t = a.current;
|
|
25
|
-
if (!t)
|
|
26
|
-
return;
|
|
27
|
-
const s = new ResizeObserver(() => {
|
|
28
|
-
r();
|
|
29
|
-
});
|
|
30
|
-
return s.observe(t), () => {
|
|
31
|
-
s.disconnect();
|
|
32
|
-
};
|
|
33
|
-
}, [r]), e.useImperativeHandle(
|
|
34
|
-
y,
|
|
35
|
-
() => ({
|
|
36
|
-
element: a.current
|
|
37
|
-
}),
|
|
38
|
-
[]
|
|
39
|
-
), /* @__PURE__ */ e.createElement(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
ref: a,
|
|
43
|
-
className: g("k-segmented-control", R && `k-segmented-control-${R}`, {
|
|
44
|
-
"k-segmented-control-stretched": E
|
|
45
|
-
})
|
|
46
|
-
},
|
|
47
|
-
/* @__PURE__ */ e.createElement("div", { className: "k-segmented-control-thumb", ref: I, "aria-hidden": "true" }),
|
|
48
|
-
v.map(
|
|
49
|
-
({
|
|
50
|
-
buttonId: t,
|
|
51
|
-
disabled: s,
|
|
52
|
-
text: o,
|
|
53
|
-
svgIcon: d,
|
|
54
|
-
selected: l,
|
|
55
|
-
accentIcon: i,
|
|
56
|
-
type: z = "button",
|
|
57
|
-
onClick: f,
|
|
58
|
-
onMouseEnter: u,
|
|
59
|
-
onMouseLeave: h,
|
|
60
|
-
onFocus: k,
|
|
61
|
-
onBlur: p,
|
|
62
|
-
...W
|
|
63
|
-
}) => /* @__PURE__ */ e.createElement(
|
|
64
|
-
"button",
|
|
65
|
-
{
|
|
66
|
-
key: t,
|
|
67
|
-
type: z,
|
|
68
|
-
className: g("k-segmented-control-button", {
|
|
69
|
-
"k-selected": l,
|
|
70
|
-
"k-hover": N.hoveredId === t && !s,
|
|
71
|
-
"k-focus": N.focusedId === t && !s,
|
|
72
|
-
"k-disabled": s
|
|
73
|
-
}),
|
|
74
|
-
disabled: s,
|
|
75
|
-
onClick: (n) => {
|
|
76
|
-
f == null || f(n), r();
|
|
77
|
-
},
|
|
78
|
-
onMouseEnter: (n) => {
|
|
79
|
-
m((c) => ({ ...c, hoveredId: t })), u == null || u(n);
|
|
80
|
-
},
|
|
81
|
-
onMouseLeave: (n) => {
|
|
82
|
-
m((c) => ({ ...c, hoveredId: void 0 })), h == null || h(n);
|
|
83
|
-
},
|
|
84
|
-
onFocus: (n) => {
|
|
85
|
-
m((c) => ({ ...c, focusedId: t })), k == null || k(n);
|
|
86
|
-
},
|
|
87
|
-
onBlur: (n) => {
|
|
88
|
-
m((c) => ({ ...c, focusedId: void 0 })), p == null || p(n);
|
|
89
|
-
},
|
|
90
|
-
...W
|
|
91
|
-
},
|
|
92
|
-
d && /* @__PURE__ */ e.createElement(
|
|
93
|
-
T,
|
|
94
|
-
{
|
|
95
|
-
className: g("k-segmented-control-button-icon", {
|
|
96
|
-
"k-accent-icon": l && i
|
|
97
|
-
}),
|
|
98
|
-
icon: d
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
/* @__PURE__ */ e.createElement("span", { className: "k-segmented-control-button-text" }, o)
|
|
102
|
-
)
|
|
103
|
-
)
|
|
104
|
-
);
|
|
105
|
-
});
|
|
106
|
-
w.displayName = "KendoReactSegmentedControl";
|
|
107
|
-
export {
|
|
108
|
-
w as SegmentedControl
|
|
109
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
9
|
-
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*
|
|
13
|
-
* Defines the props for a Button inside the SegmentedControlComponent.
|
|
14
|
-
*/
|
|
15
|
-
export interface SegmentedButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
|
-
/**
|
|
17
|
-
* The unique identifier for the SegmentedButton.
|
|
18
|
-
*/
|
|
19
|
-
buttonId: number;
|
|
20
|
-
/**
|
|
21
|
-
* Sets an SVG icon to display inside the Button.
|
|
22
|
-
*/
|
|
23
|
-
svgIcon?: SVGIcon;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies the text content of the Button.
|
|
26
|
-
*/
|
|
27
|
-
text?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies whether the button is selected.
|
|
30
|
-
*/
|
|
31
|
-
selected?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Specifies whether the icon should use the accent color when the button is selected.
|
|
34
|
-
*
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
accentIcon?: boolean;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @hidden
|
|
41
|
-
*/
|
|
42
|
-
export interface SegmentedControlHandle {
|
|
43
|
-
/**
|
|
44
|
-
* The root DOM element of the SegmentedControl.
|
|
45
|
-
*/
|
|
46
|
-
element: HTMLDivElement | null;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
export interface SegmentedControlProps {
|
|
52
|
-
/**
|
|
53
|
-
* Specifies the collection of buttons that will be rendered inside the SegmentedControl.
|
|
54
|
-
*/
|
|
55
|
-
buttons?: Array<SegmentedButtonProps>;
|
|
56
|
-
/**
|
|
57
|
-
* Sets the padding of the control.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
size?: ButtonProps['size'];
|
|
62
|
-
/**
|
|
63
|
-
* Specifies whether the SegmentedControl should stretch to fill the available horizontal space.
|
|
64
|
-
*/
|
|
65
|
-
stretched?: boolean;
|
|
66
|
-
}
|