@ishibashi0112/spreadsheet-grid 1.7.0 → 1.9.0
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/API_REFERENCE.md +158 -19
- package/README.md +2 -2
- package/dist/CellEditorLayer.d.ts +2 -1
- package/dist/GridShell.d.ts +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/features/changeTracking.d.ts +2 -0
- package/dist/features/treeData.d.ts +2 -0
- package/dist/features/types.d.ts +13 -1
- package/dist/hooks/useGridBarContext.d.ts +4 -3
- package/dist/index.cjs +9 -6
- package/dist/index.js +3073 -2709
- package/dist/lite/createSpreadsheetGrid-B8ove8hh.js +4857 -0
- package/dist/lite/createSpreadsheetGrid-M3WJSRoB.cjs +9 -0
- package/dist/lite/createSpreadsheetGrid.cjs +1 -1
- package/dist/lite/createSpreadsheetGrid.js +1 -1
- package/dist/lite/features/changeTracking.cjs +1 -0
- package/dist/lite/features/changeTracking.js +13 -0
- package/dist/lite/features/pinnedRows.cjs +1 -1
- package/dist/lite/features/pinnedRows.js +1 -1
- package/dist/lite/features/treeData.cjs +1 -0
- package/dist/lite/features/treeData.js +2 -0
- package/dist/lite/{pinnedRows-BtvLVkLa.js → pinnedRows-C0z2lLC4.js} +1 -0
- package/dist/lite/pinnedRows-CrwRr7W0.cjs +1 -0
- package/dist/lite/treeData-2RQEs57C.js +64 -0
- package/dist/lite/treeData-X3RTdPnL.cjs +1 -0
- package/dist/lite.cjs +1 -1
- package/dist/lite.d.ts +2 -0
- package/dist/lite.js +16 -14
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/themes/astryx.css +3 -0
- package/dist/themes/heroui.css +3 -0
- package/dist/themes/mantine.css +5 -1
- package/dist/themes/shadcn.css +3 -0
- package/dist/view/DefaultGridBottomBar.d.ts +2 -1
- package/dist/view/GridBodyLayer.d.ts +14 -2
- package/dist/view/GridTreeCell.d.ts +16 -0
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +4 -2
- package/dist/lite/createSpreadsheetGrid-B4_L9K--.cjs +0 -6
- package/dist/lite/createSpreadsheetGrid-BlYZzGf-.js +0 -4547
- package/dist/lite/pinnedRows-CBgirKjW.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./useGridLocaleText-CRSWUb4o.cjs"),t=require("./CheckboxCell-BBzjMEcs.cjs");let n=require("react"),r=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/cx"),i=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/slotProps"),a=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText"),o=require("react/jsx-runtime"),s=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/detailRow"),c=require("@ishibashi0112/spreadsheet-grid-core/internal/utils/permissions"),l=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/checkboxEditor"),u=require("@ishibashi0112/spreadsheet-grid-core/internal/logic/localeTextFeatures");var d=()=>{},f=80,p=(0,o.jsx)(`path`,{d:`M9.8 1.5 14.5 6.2l-1.4 1.4-1-.9-2.6 2.6.3 3.2-1.4 1.4-2.6-2.6-3.3 3.3-.7-.7 3.3-3.3L2.5 8l1.4-1.4 3.2.3 2.6-2.6-.9-1z`});function m({pane:n,position:u,ownsRowHeader:m,leadingWidth:h,rows:g,rowHeight:_,stickyOffset:v,bodyHeight:y,renderEntries:b,rowKeyGetter:x,ariaRowIndexStart:S,rowHeaderCellStyle:C,getRowClassName:w,showCellOverflowTooltip:T,conditionalFormat:E,conditionalFormatStats:D,slots:O,onPointerEnter:k}){let A=e.r(),j=b.filter(Boolean),M=!m&&j.length===0,N=(e,n,r)=>{if((0,s.isSyntheticColumnKey)(n.key))return null;if(n.renderCell)return n.renderCell({...r,setValue:d});if(n.editor?.type===`checkbox`)return(0,o.jsx)(t.t,{slot:O?.checkbox,label:n.title||n.key,checked:(0,l.isCheckboxChecked)(r.value,n.editor),readOnly:!0,onToggle:d});let i=E?n.conditionalFormat:void 0;if(i?.dataBar?.showValue===!1)return null;let a=n.valueFormatter?n.valueFormatter({value:r.value,row:e,column:n}):String(r.value??``),c=E&&i?.chips?E.resolveChipSpec(i.chips,r):null;return E&&c?(0,o.jsx)(E.GridChip,{spec:c,children:c.label??a}):(0,o.jsx)(`span`,{className:`ssg-cell-value`,children:a})};return(0,o.jsxs)(o.Fragment,{children:[y>0&&(0,o.jsx)(`div`,{"aria-hidden":`true`,style:{height:y}}),(0,o.jsx)(`div`,{className:(0,r.cx)(`ssg-pinned-rows`,`ssg-pinned-rows--${u}`),style:{[u]:v,height:g.length*_},onPointerEnter:k,children:g.map((e,t)=>{let s=x(e,t),l=(0,i.resolveSlotProps)(w?.(e,t,{row:e,rowIndex:t,sourceRowIndex:t,rowKey:s,isSelected:!1,pinned:u}));return(0,o.jsxs)(`div`,{"data-pane":n,"data-ssg-pinned":u,role:`row`,"aria-rowindex":S+t,"aria-hidden":M||void 0,className:(0,r.cx)(`ssg-pinned-row`,l.className),style:{...l.style,height:_,top:t*_},children:[m&&(0,o.jsx)(`div`,{role:`rowheader`,"aria-colindex":1,className:(0,r.cx)(`ssg-header-cell`,`ssg-row-header-cell`,`ssg-pinned-row-header`,l.className,O?.rowHeaderCell?.className),style:{...O?.rowHeaderCell?.style,...l.style,...C,height:_},children:(0,o.jsx)(`svg`,{className:`ssg-pinned-row-icon`,viewBox:`0 0 16 16`,role:`img`,"aria-label":(0,a.formatLocaleText)(u===`top`?A.pinnedTopRow:A.pinnedBottomRow,{row:t+1}),children:p})}),j.map(n=>{let a=n.column,d=(0,c.getCellValue)(e,a),p={row:e,rowIndex:t,sourceRowIndex:t,rowKey:s,colIndex:n.logicalIndex,value:d,column:a,isActive:!1,isSelected:!1,isEditing:!1,readOnly:!0,pinned:u},m=(0,i.resolveSlotProps)(typeof a.cellClassName==`function`?a.cellClassName(p):a.cellClassName),g=E?a.conditionalFormat:void 0,v=D.get(a.key),y=E&&g?.dataBar?E.resolveDataBar(g.dataBar,d,v):null,b=E&&g?.colorScale?E.resolveColorScaleBackground(g.colorScale,d,v):null,x=y?y.negative?g?.dataBar?.negativeColor:g?.dataBar?.color:void 0;return(0,o.jsxs)(`div`,{role:`gridcell`,"aria-colindex":n.logicalIndex+2,"aria-readonly":!0,"data-ssg-col-key":a.key,"data-ssg-tooltip-overflow":T&&!a.renderCell?``:void 0,className:(0,r.cx)(`ssg-body-cell`,`ssg-pinned-cell`,a.align===`center`&&`ssg-body-cell--align-center`,a.align===`right`&&`ssg-body-cell--align-right`,y!==null&&`ssg-body-cell--cf-bar`,b!==null&&`ssg-body-cell--cf-scale`,g?.chips!==void 0&&n.paneLocalSize<f&&`ssg-body-cell--chip-compact`,l.className,m.className,O?.bodyCell?.className),style:{...O?.bodyCell?.style,...b===null?null:{backgroundColor:b},...l.style,...m.style,left:h+n.paneLocalStart,width:n.paneLocalSize,minWidth:n.paneLocalSize,height:_},children:[y&&(0,o.jsx)(`span`,{className:(0,r.cx)(`ssg-cf-bar`,y.negative&&`ssg-cf-bar--negative`),style:{left:`${y.start}%`,width:`${y.end-y.start}%`,...x?{backgroundColor:x}:null},"aria-hidden":`true`}),N(e,a,p)]},a.key)})]},String(s))})})]})}var h=new Set([`rowHeaderCellStyle`]),g={PinnedRows:(0,n.memo)(m,(e,t)=>(0,i.arePropsEqualWithStyleKeys)(e,t,h)),localeText:u.DEFAULT_PINNED_ROWS_LOCALE_TEXT};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return g}});
|