@univerjs/sheets-crosshair-highlight 0.5.5-experimental.20250122-3362a4a → 0.5.5-nightly.202501201606
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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +9 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +24 -31
- package/lib/es/index.js +325 -310
- package/lib/es/locale/en-US.js +2 -2
- package/lib/es/locale/fa-IR.js +2 -2
- package/lib/es/locale/fr-FR.js +2 -2
- package/lib/es/locale/ru-RU.js +2 -2
- package/lib/es/locale/vi-VN.js +2 -2
- package/lib/es/locale/zh-CN.js +2 -2
- package/lib/es/locale/zh-TW.js +2 -2
- package/lib/types/facade/f-univer.d.ts +0 -3
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +9 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +7 -7
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED
package/lib/es/locale/ru-RU.js
CHANGED
package/lib/es/locale/vi-VN.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -107,9 +107,6 @@ export interface IFUniverCrosshairHighlightMixin {
|
|
|
107
107
|
readonly CROSSHAIR_HIGHLIGHT_COLORS: string[];
|
|
108
108
|
}
|
|
109
109
|
export declare class FUniverCrosshairHighlightMixin extends FUniver implements IFUniverCrosshairHighlightMixin {
|
|
110
|
-
/**
|
|
111
|
-
* @ignore
|
|
112
|
-
*/
|
|
113
110
|
_initialize(injector: Injector): void;
|
|
114
111
|
setCrosshairHighlightEnabled(enabled: boolean): FUniver;
|
|
115
112
|
setCrosshairHighlightColor(color: string): FUniver;
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?i(require("@univerjs/core"),require("@univerjs/sheets-crosshair-highlight")):typeof define=="function"&&define.amd?define(["@univerjs/core","@univerjs/sheets-crosshair-highlight"],i):(e=typeof globalThis<"u"?globalThis:e||self,i(e.UniverCore,e.UniverSheetsCrosshairHighlight))})(this,function(e,i){"use strict";class n extends e.FUniver{_initialize(t){const s=t.get(e.ICommandService);this.disposeWithMe(s.onCommandExecuted(h=>{if(h.id===i.EnableCrosshairHighlightOperation.id||h.id===i.DisableCrosshairHighlightOperation.id){const r=this.getActiveSheet();if(!r||!this._eventListend(this.Event.CrosshairHighlightEnabledChanged))return;this.fireEvent(this.Event.CrosshairHighlightEnabledChanged,{enabled:this.getCrosshairHighlightEnabled(),...r})}if(h.id===i.SetCrosshairHighlightColorOperation.id){const r=this.getActiveSheet();if(!r||!this._eventListend(this.Event.CrosshairHighlightColorChanged))return;this.fireEvent(this.Event.CrosshairHighlightColorChanged,{color:this.getCrosshairHighlightColor(),...r})}}))}setCrosshairHighlightEnabled(t){return t?this._commandService.syncExecuteCommand(i.EnableCrosshairHighlightOperation.id):this._commandService.syncExecuteCommand(i.DisableCrosshairHighlightOperation.id),this}setCrosshairHighlightColor(t){return this._commandService.syncExecuteCommand(i.SetCrosshairHighlightColorOperation.id,{value:t}),this}getCrosshairHighlightEnabled(){return this._injector.get(i.SheetsCrosshairHighlightService).enabled}getCrosshairHighlightColor(){return this._injector.get(i.SheetsCrosshairHighlightService).color}get CROSSHAIR_HIGHLIGHT_COLORS(){return i.CROSSHAIR_HIGHLIGHT_COLORS}}e.FUniver.extend(n)});
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("@univerjs/engine-render"),require("@univerjs/ui"),require("rxjs"),require("react/jsx-runtime"),require("react"),require("@univerjs/sheets"),require("@univerjs/sheets-ui")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-render","@univerjs/ui","rxjs","react/jsx-runtime","react","@univerjs/sheets","@univerjs/sheets-ui"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverSheetsCrosshairHighlight={},global.UniverCore,global.UniverEngineRender,global.UniverUi,global.rxjs,global.React,global.React,global.UniverSheets,global.UniverSheetsUi))})(this,function(exports2,core,engineRender,ui,rxjs,jsxRuntime,react,sheets,sheetsUi){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var _a,_b,_c;const SHEETS_CROSSHAIR_HIGHLIGHT_PLUGIN_CONFIG_KEY="sheets-crosshair-highlight.config",defaultPluginConfig={};var __assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},__rest=function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},IconBase=react.forwardRef(function(props,ref){var icon=props.icon,id=props.id,className=props.className,extend=props.extend,restProps=__rest(props,["icon","id","className","extend"]),cls="univerjs-icon univerjs-icon-".concat(id," ").concat(className||"").trim(),idSuffix=react.useRef("_".concat(generateShortUuid()));return render(icon,"".concat(id),{defIds:icon.defIds,idSuffix:idSuffix.current},__assign({ref,className:cls},restProps),extend)});function render(node,id,runtimeProps,rootProps,extend){return react.createElement(node.tag,__assign(__assign({key:id},replaceRuntimeIdsAndExtInAttrs(node,runtimeProps,extend)),rootProps),(replaceRuntimeIdsInDefs(node,runtimeProps).children||[]).map(function(child,index){return render(child,"".concat(id,"-").concat(node.tag,"-").concat(index),runtimeProps,void 0,extend)}))}__name(render,"render");function replaceRuntimeIdsAndExtInAttrs(node,runtimeProps,extend){var attrs=__assign({},node.attrs);extend!=null&&extend.colorChannel1&&attrs.fill==="colorChannel1"&&(attrs.fill=extend.colorChannel1);var defIds=runtimeProps.defIds;return!defIds||defIds.length===0||(node.tag==="use"&&attrs["xlink:href"]&&(attrs["xlink:href"]=attrs["xlink:href"]+runtimeProps.idSuffix),Object.entries(attrs).forEach(function(_a2){var key=_a2[0],value=_a2[1];typeof value=="string"&&(attrs[key]=value.replace(/url\(#(.*)\)/,"url(#$1".concat(runtimeProps.idSuffix,")")))})),attrs}__name(replaceRuntimeIdsAndExtInAttrs,"replaceRuntimeIdsAndExtInAttrs");function replaceRuntimeIdsInDefs(node,runtimeProps){var _a2,defIds=runtimeProps.defIds;return!defIds||defIds.length===0?node:node.tag==="defs"&&(!((_a2=node.children)===null||_a2===void 0)&&_a2.length)?__assign(__assign({},node),{children:node.children.map(function(child){return typeof child.attrs.id=="string"&&defIds&&defIds.indexOf(child.attrs.id)>-1?__assign(__assign({},child),{attrs:__assign(__assign({},child.attrs),{id:child.attrs.id+runtimeProps.idSuffix})}):child})}):node}__name(replaceRuntimeIdsInDefs,"replaceRuntimeIdsInDefs");function generateShortUuid(){return Math.random().toString(36).substring(2,8)}__name(generateShortUuid,"generateShortUuid"),IconBase.displayName="UniverIcon";var element={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"#E5E5E5",d:"M1.6499 3.65002C1.6499 2.54545 2.54533 1.65002 3.6499 1.65002H12.3499C13.4545 1.65002 14.3499 2.54545 14.3499 3.65002V12.35C14.3499 13.4546 13.4545 14.35 12.3499 14.35H3.6499C2.54533 14.35 1.6499 13.4546 1.6499 12.35V3.65002Z"}},{tag:"path",attrs:{fill:"#fff",d:"M9.9998 1.65002H5.9998V6H1.6499V10H5.9998V14.35H9.9998V10H14.3499V6H9.9998V1.65002Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M3.6498 1.05005C2.21386 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V3.65005C14.9498 2.21411 13.7857 1.05005 12.3498 1.05005H3.6498ZM5.4002 2.25005H3.6498C2.87661 2.25005 2.2498 2.87685 2.2498 3.65005V5.40002H5.4002V2.25005ZM2.2498 10.6V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H5.4002V10.6H2.2498ZM6.60019 13.75H9.4002V9.40002H13.7498V6.60002H9.4002V2.25005H6.60019V6.60002H2.25029V9.40002H6.60019V13.75ZM10.6002 2.25005V5.40002H13.7498V3.65005C13.7498 2.87685 13.123 2.25005 12.3498 2.25005H10.6002ZM13.7498 10.6H10.6002V13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.6Z",fillRule:"evenodd",clipRule:"evenodd"}}]},CrossHighlightingSingle=react.forwardRef(function(props,ref){return react.createElement(IconBase,Object.assign({},props,{id:"cross-highlighting-single",ref,icon:element}))});CrossHighlightingSingle.displayName="CrossHighlightingSingle";const CROSSHAIR_HIGHLIGHT_COLORS=["rgba(158, 109, 227, 0.3)","rgba(254, 75, 75, 0.3)","rgba(255, 140, 81, 0.3)","rgba(164, 220, 22, 0.3)","rgba(45, 174, 255, 0.3)","rgba(58, 96, 247, 0.3)","rgba(242, 72, 166, 0.3)","rgba(153, 153, 153, 0.3)","rgba(158, 109, 227, 0.15)","rgba(254, 75, 75, 0.15)","rgba(255, 140, 81, 0.15)","rgba(164, 220, 22, 0.15)","rgba(45, 174, 255, 0.15)","rgba(58, 96, 247, 0.15)","rgba(242, 72, 166, 0.15)","rgba(153, 153, 153, 0.15)"],_SheetsCrosshairHighlightService=class _SheetsCrosshairHighlightService extends core.Disposable{constructor(){super(...arguments);__publicField(this,"_enabled$",new rxjs.BehaviorSubject(!1));__publicField(this,"enabled$",this._enabled$.asObservable());__publicField(this,"_color$",new rxjs.BehaviorSubject(CROSSHAIR_HIGHLIGHT_COLORS[0]));__publicField(this,"color$",this._color$.asObservable())}get enabled(){return this._enabled$.getValue()}get color(){return this._color$.getValue()}dispose(){this._enabled$.complete()}setEnabled(value){this._enabled$.next(value)}setColor(value){this._color$.next(value)}};__name(_SheetsCrosshairHighlightService,"SheetsCrosshairHighlightService");let SheetsCrosshairHighlightService=_SheetsCrosshairHighlightService;const ToggleCrosshairHighlightOperation={id:"sheet.operation.toggle-crosshair-highlight",type:core.CommandType.OPERATION,handler(accessor){const service=accessor.get(SheetsCrosshairHighlightService),turnedOn=service.enabled;return service.setEnabled(!turnedOn),!0}},SetCrosshairHighlightColorOperation={id:"sheet.operation.set-crosshair-highlight-color",type:core.CommandType.OPERATION,handler(accessor,{value}){const service=accessor.get(SheetsCrosshairHighlightService);return service.enabled||service.setEnabled(!0),service.setColor(value),!0}},EnableCrosshairHighlightOperation={id:"sheet.operation.enable-crosshair-highlight",type:core.CommandType.OPERATION,handler(accessor){const service=accessor.get(SheetsCrosshairHighlightService);return service.enabled?!1:(service.setEnabled(!0),!0)}},DisableCrosshairHighlightOperation={id:"sheet.operation.disable-crosshair-highlight",type:core.CommandType.OPERATION,handler(accessor){const service=accessor.get(SheetsCrosshairHighlightService);return service.enabled?(service.setEnabled(!1),!0):!1}};function r(e){var t,f,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}__name(r,"r");function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}__name(clsx,"clsx");const styles={crosshairHighlightOverlay:"univer-crosshair-highlight-overlay",crosshairHighlightItem:"univer-crosshair-highlight-item",crosshairHighlightItemSelected:"univer-crosshair-highlight-item-selected"};function CrosshairOverlay(props){const{onChange}=props,crosshairSrv=core.useDependency(SheetsCrosshairHighlightService),currentColor=core.useObservable(crosshairSrv.color$),handleColorPicked=react.useCallback(color=>{onChange==null||onChange(color)},[onChange]);return jsxRuntime.jsx("div",{className:styles.crosshairHighlightOverlay,children:CROSSHAIR_HIGHLIGHT_COLORS.map(color=>jsxRuntime.jsx("div",{className:clsx(styles.crosshairHighlightItem,{[styles.crosshairHighlightItemSelected]:color===currentColor}),style:{backgroundColor:color},onClick:__name(()=>handleColorPicked(color),"onClick")},color))})}__name(CrosshairOverlay,"CrosshairOverlay");const CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT="CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT";function CrosshairHighlightMenuItemFactory(accessor){const crosshairHighlightService=accessor.get(SheetsCrosshairHighlightService);return{id:ToggleCrosshairHighlightOperation.id,tooltip:"crosshair.button.tooltip",type:ui.MenuItemType.BUTTON_SELECTOR,icon:"CrossHighlightingSingle",selections:[{label:{name:CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT,hoverable:!1}}],selectionsCommandId:SetCrosshairHighlightColorOperation.id,activated$:crosshairHighlightService.enabled$,hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET)}}__name(CrosshairHighlightMenuItemFactory,"CrosshairHighlightMenuItemFactory");const menuSchema={[ui.ContextMenuPosition.FOOTER_MENU]:{[ui.ContextMenuGroup.OTHERS]:{[ToggleCrosshairHighlightOperation.id]:{order:0,menuItemFactory:CrosshairHighlightMenuItemFactory}}}};var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");let SheetsCrosshairHighlightController=(_a=class extends core.Disposable{constructor(_componentMgr,_menuManagerService,_cmdSrv){super(),this._componentMgr=_componentMgr,this._menuManagerService=_menuManagerService,this._cmdSrv=_cmdSrv,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[ToggleCrosshairHighlightOperation,SetCrosshairHighlightColorOperation,EnableCrosshairHighlightOperation,DisableCrosshairHighlightOperation].forEach(c=>this._cmdSrv.registerCommand(c))}_initMenus(){this._menuManagerService.mergeMenu(menuSchema)}_initComponents(){this._componentMgr.register(CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT,CrosshairOverlay),this._componentMgr.register("CrossHighlightingSingle",CrossHighlightingSingle)}},__name(_a,"SheetsCrosshairHighlightController"),_a);SheetsCrosshairHighlightController=__decorateClass$2([__decorateParam$2(0,core.Inject(ui.ComponentManager)),__decorateParam$2(1,ui.IMenuManagerService),__decorateParam$2(2,core.ICommandService)],SheetsCrosshairHighlightController);const SHEETS_CROSSHAIR_HIGHLIGHT_Z_INDEX=1,_CrossHairRangeCollection=class _CrossHairRangeCollection{constructor(){__publicField(this,"_selectedRanges",[]);__publicField(this,"_ranges",[])}addRange(range){if(range.rangeType===core.RANGE_TYPE.COLUMN||range.rangeType===core.RANGE_TYPE.ROW||range.rangeType===core.RANGE_TYPE.ALL)return;const intersects=this._getIntersects(range),splitRanges=this._getSplitRanges(range,intersects);splitRanges.length>0&&this._ranges.push(...splitRanges)}setSelectedRanges(selectedRange){this._selectedRanges=selectedRange}_getSplitRanges(range,intersects){let splitRanges=[range];for(const intersect of intersects.concat(this._selectedRanges)){const newRanges=[];for(const splitRange of splitRanges){const split=core.Rectangle.subtract(splitRange,intersect);split&&split.length>0&&newRanges.push(...split)}splitRanges=newRanges}return splitRanges.filter(range2=>range2.startRow<=range2.endRow&&range2.startColumn<=range2.endColumn)}_getIntersects(addRange){const intersects=[];for(const range of this._ranges){const intersect=core.Rectangle.getIntersects(range,addRange);intersect&&intersects.push(intersect)}return intersects}getRanges(){return this._ranges}reset(){this._ranges=[],this._selectedRanges=[]}};__name(_CrossHairRangeCollection,"CrossHairRangeCollection");let CrossHairRangeCollection=_CrossHairRangeCollection;const _SheetCrossHairHighlightShape=class _SheetCrossHairHighlightShape extends engineRender.Shape{constructor(key,props){super(key,props);__publicField(this,"_color");props&&this.setShapeProps(props)}setShapeProps(props){typeof props.color<"u"&&(this._color=props.color),this.transformByState({width:props.width,height:props.height})}_draw(ctx){const color=`rgba(${this._color.r}, ${this._color.g}, ${this._color.b}, ${this._color.a})`;engineRender.Rect.drawWith(ctx,{width:this.width,height:this.height,fill:color,stroke:void 0,strokeWidth:0,evented:!1})}};__name(_SheetCrossHairHighlightShape,"SheetCrossHairHighlightShape");let SheetCrossHairHighlightShape=_SheetCrossHairHighlightShape;var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1");let SheetCrosshairHighlightRenderController=(_b=class extends core.Disposable{constructor(_context,_sheetSkeletonManagerService,_sheetsSelectionsService,_sheetsCrosshairHighlightService,_contextService,_refSelectionsService){super();__publicField(this,"_shapes",[]);__publicField(this,"_rangeCollection",new CrossHairRangeCollection);__publicField(this,"_color","rgba(255,0,0,0.5)");this._context=_context,this._sheetSkeletonManagerService=_sheetSkeletonManagerService,this._sheetsSelectionsService=_sheetsSelectionsService,this._sheetsCrosshairHighlightService=_sheetsCrosshairHighlightService,this._contextService=_contextService,this._refSelectionsService=_refSelectionsService,this._initRenderListener()}_transformSelection(selectionData,sheet){if(!selectionData)return;const rowCount=sheet.getRowCount(),columnCount=sheet.getColumnCount(),ranges=[];for(const selection of selectionData){const{startRow,endRow,startColumn,endColumn}=selection.range;endRow-startRow+1===rowCount||endColumn-startColumn+1===columnCount||ranges.push(selection.range)}this._rangeCollection.setSelectedRanges(ranges);for(const range of ranges)this.addSelection(range,sheet)}_initRenderListener(){const workbook=this._context.unit;this.disposeWithMe(rxjs.combineLatest([this._contextService.subscribeContextValue$(sheets.REF_SELECTIONS_ENABLED).pipe(rxjs.startWith(!1)),this._sheetSkeletonManagerService.currentSkeleton$,this._sheetsCrosshairHighlightService.enabled$,this._sheetsCrosshairHighlightService.color$.pipe(rxjs.tap(color=>this._color=color)),rxjs.merge(this._sheetsSelectionsService.selectionMoveStart$,this._sheetsSelectionsService.selectionMoving$,this._sheetsSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,workbook.activeSheet$.pipe(rxjs.map(()=>this._sheetsSelectionsService.getCurrentSelections()))),rxjs.merge(this._refSelectionsService.selectionMoveStart$,this._refSelectionsService.selectionMoving$,this._refSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,workbook.activeSheet$.pipe(rxjs.map(()=>this._refSelectionsService.getCurrentSelections())))]).subscribe(([refSelectionEnabled,_,enabled,_color,normalSelections,refSelection])=>{if(this._clear(),!enabled)return;const selections=refSelectionEnabled?refSelection:normalSelections;this._rangeCollection.reset(),this._transformSelection(selections,workbook.getActiveSheet()),this.render(this._rangeCollection.getRanges())}))}addSelection(range,sheet){if(range.rangeType===core.RANGE_TYPE.COLUMN||range.rangeType===core.RANGE_TYPE.ROW||range.rangeType===core.RANGE_TYPE.ALL)return;const maxRow=sheet.getRowCount(),maxColumn=sheet.getColumnCount(),{startRow,endRow,startColumn,endColumn}=range,left={startRow,endRow,startColumn:0,endColumn:startColumn-1},right={startRow,endRow,startColumn:endColumn+1,endColumn:maxColumn},top={startRow:0,endRow:startRow-1,startColumn,endColumn},bottom={startRow:endRow+1,endRow:maxRow,startColumn,endColumn};for(const range2 of[left,right,top,bottom])range2.startRow<=range2.endRow&&range2.startColumn<=range2.endColumn&&this._rangeCollection.addRange(range2)}_clear(){this._shapes.forEach(shape=>{shape.dispose()}),this._shapes=[]}_addShapes(range,index,scene,skeleton){const{startRow,endRow,startColumn,endColumn}=range,startPosition=sheetsUi.getCoordByCell(startRow,startColumn,scene,skeleton),endPosition=sheetsUi.getCoordByCell(endRow,endColumn,scene,skeleton),{startX,startY}=startPosition,{endX,endY}=endPosition,width=endX-startX,height=endY-startY,shapeProps={left:startX,top:startY,color:new core.ColorKit(this._color).toRgb(),width,height,zIndex:SHEETS_CROSSHAIR_HIGHLIGHT_Z_INDEX,evented:!1},currentShapes=new SheetCrossHairHighlightShape(`crosshair-${index}`,shapeProps);this._shapes.push(currentShapes),scene.addObject(currentShapes)}render(ranges){const skeleton=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!skeleton)return;const{scene}=this._context;this._clear();for(let i=0;i<ranges.length;i++){const range=ranges[i];this._addShapes(range,i,scene,skeleton)}scene.makeDirty(!0)}async dispose(){super.dispose()}},__name(_b,"SheetCrosshairHighlightRenderController"),_b);SheetCrosshairHighlightRenderController=__decorateClass$1([__decorateParam$1(1,core.Inject(sheetsUi.SheetSkeletonManagerService)),__decorateParam$1(2,core.Inject(sheets.SheetsSelectionsService)),__decorateParam$1(3,core.Inject(SheetsCrosshairHighlightService)),__decorateParam$1(4,core.Inject(core.IContextService)),__decorateParam$1(5,sheets.IRefSelectionsService)],SheetCrosshairHighlightRenderController);var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam");exports2.UniverSheetsCrosshairHighlightPlugin=(_c=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_renderManagerService,_configService){super(),this._config=_config,this._injector=_injector,this._renderManagerService=_renderManagerService,this._configService=_configService;const{...rest}=core.merge({},defaultPluginConfig,this._config);this._configService.setConfig(SHEETS_CROSSHAIR_HIGHLIGHT_PLUGIN_CONFIG_KEY,rest)}onStarting(){[[SheetsCrosshairHighlightService],[SheetsCrosshairHighlightController]].forEach(d=>this._injector.add(d))}onReady(){[[SheetCrosshairHighlightRenderController]].forEach(d=>this._injector.add(d)),this._injector.get(SheetsCrosshairHighlightController),this._renderManagerService.registerRenderModule(core.UniverInstanceType.UNIVER_SHEET,[SheetCrosshairHighlightRenderController])}},__name(_c,"UniverSheetsCrosshairHighlightPlugin"),__publicField(_c,"pluginName","SHEET_CROSSHAIR_HIGHLIGHT_PLUGIN"),__publicField(_c,"type",core.UniverInstanceType.UNIVER_SHEET),_c),exports2.UniverSheetsCrosshairHighlightPlugin=__decorateClass([__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,engineRender.IRenderManagerService),__decorateParam(3,core.IConfigService)],exports2.UniverSheetsCrosshairHighlightPlugin),exports2.CROSSHAIR_HIGHLIGHT_COLORS=CROSSHAIR_HIGHLIGHT_COLORS,exports2.DisableCrosshairHighlightOperation=DisableCrosshairHighlightOperation,exports2.EnableCrosshairHighlightOperation=EnableCrosshairHighlightOperation,exports2.SetCrosshairHighlightColorOperation=SetCrosshairHighlightColorOperation,exports2.SheetsCrosshairHighlightService=SheetsCrosshairHighlightService,exports2.ToggleCrosshairHighlightOperation=ToggleCrosshairHighlightOperation,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(c,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@univerjs/core"),require("@univerjs/engine-render"),require("@univerjs/ui"),require("rxjs"),require("react"),require("@univerjs/sheets"),require("@univerjs/sheets-ui")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/engine-render","@univerjs/ui","rxjs","react","@univerjs/sheets","@univerjs/sheets-ui"],o):(c=typeof globalThis<"u"?globalThis:c||self,o(c.UniverSheetsCrosshairHighlight={},c.UniverCore,c.UniverEngineRender,c.UniverUi,c.rxjs,c.React,c.UniverSheets,c.UniverSheetsUi))})(this,function(c,o,p,H,_,R,w,P){"use strict";var be=Object.defineProperty;var Oe=(c,o,p)=>o in c?be(c,o,{enumerable:!0,configurable:!0,writable:!0,value:p}):c[o]=p;var u=(c,o,p)=>Oe(c,typeof o!="symbol"?o+"":o,p);var T;const J="sheets-crosshair-highlight.config",A={};var d=function(){return d=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},d.apply(this,arguments)},X=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t},L=R.forwardRef(function(r,e){var t=r.icon,n=r.id,i=r.className,s=r.extend,a=X(r,["icon","id","className","extend"]),h="univerjs-icon univerjs-icon-".concat(n," ").concat(i||"").trim(),l=R.useRef("_".concat(Q()));return U(t,"".concat(n),{defIds:t.defIds,idSuffix:l.current},d({ref:e,className:h},a),s)});function U(r,e,t,n,i){return R.createElement(r.tag,d(d({key:e},K(r,t,i)),n),(z(r,t).children||[]).map(function(s,a){return U(s,"".concat(e,"-").concat(r.tag,"-").concat(a),t,void 0,i)}))}function K(r,e,t){var n=d({},r.attrs);t!=null&&t.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=t.colorChannel1);var i=e.defIds;return!i||i.length===0||(r.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(s){var a=s[0],h=s[1];typeof h=="string"&&(n[a]=h.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function z(r,e){var t,n=e.defIds;return!n||n.length===0?r:r.tag==="defs"&&(!((t=r.children)===null||t===void 0)&&t.length)?d(d({},r),{children:r.children.map(function(i){return typeof i.attrs.id=="string"&&n&&n.indexOf(i.attrs.id)>-1?d(d({},i),{attrs:d(d({},i.attrs),{id:i.attrs.id+e.idSuffix})}):i})}):r}function Q(){return Math.random().toString(36).substring(2,8)}L.displayName="UniverIcon";var ee={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"#E5E5E5",d:"M1.6499 3.65002C1.6499 2.54545 2.54533 1.65002 3.6499 1.65002H12.3499C13.4545 1.65002 14.3499 2.54545 14.3499 3.65002V12.35C14.3499 13.4546 13.4545 14.35 12.3499 14.35H3.6499C2.54533 14.35 1.6499 13.4546 1.6499 12.35V3.65002Z"}},{tag:"path",attrs:{fill:"#fff",d:"M9.9998 1.65002H5.9998V6H1.6499V10H5.9998V14.35H9.9998V10H14.3499V6H9.9998V1.65002Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M3.6498 1.05005C2.21386 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V3.65005C14.9498 2.21411 13.7857 1.05005 12.3498 1.05005H3.6498ZM5.4002 2.25005H3.6498C2.87661 2.25005 2.2498 2.87685 2.2498 3.65005V5.40002H5.4002V2.25005ZM2.2498 10.6V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H5.4002V10.6H2.2498ZM6.60019 13.75H9.4002V9.40002H13.7498V6.60002H9.4002V2.25005H6.60019V6.60002H2.25029V9.40002H6.60019V13.75ZM10.6002 2.25005V5.40002H13.7498V3.65005C13.7498 2.87685 13.123 2.25005 12.3498 2.25005H10.6002ZM13.7498 10.6H10.6002V13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.6Z",fillRule:"evenodd",clipRule:"evenodd"}}]},G=R.forwardRef(function(r,e){return R.createElement(L,Object.assign({},r,{id:"cross-highlighting-single",ref:e,icon:ee}))});G.displayName="CrossHighlightingSingle";const M=["rgba(158, 109, 227, 0.3)","rgba(254, 75, 75, 0.3)","rgba(255, 140, 81, 0.3)","rgba(164, 220, 22, 0.3)","rgba(45, 174, 255, 0.3)","rgba(58, 96, 247, 0.3)","rgba(242, 72, 166, 0.3)","rgba(153, 153, 153, 0.3)","rgba(158, 109, 227, 0.15)","rgba(254, 75, 75, 0.15)","rgba(255, 140, 81, 0.15)","rgba(164, 220, 22, 0.15)","rgba(45, 174, 255, 0.15)","rgba(58, 96, 247, 0.15)","rgba(242, 72, 166, 0.15)","rgba(153, 153, 153, 0.15)"];class S extends o.Disposable{constructor(){super(...arguments);u(this,"_enabled$",new _.BehaviorSubject(!1));u(this,"enabled$",this._enabled$.asObservable());u(this,"_color$",new _.BehaviorSubject(M[0]));u(this,"color$",this._color$.asObservable())}get enabled(){return this._enabled$.getValue()}get color(){return this._color$.getValue()}dispose(){this._enabled$.complete()}setEnabled(t){this._enabled$.next(t)}setColor(t){this._color$.next(t)}}const I={id:"sheet.operation.toggle-crosshair-highlight",type:o.CommandType.OPERATION,handler(r){const e=r.get(S),t=e.enabled;return e.setEnabled(!t),!0}},j={id:"sheet.operation.set-crosshair-highlight-color",type:o.CommandType.OPERATION,handler(r,{value:e}){const t=r.get(S);return t.enabled||t.setEnabled(!0),t.setColor(e),!0}},D={id:"sheet.operation.enable-crosshair-highlight",type:o.CommandType.OPERATION,handler(r){const e=r.get(S);return e.enabled?!1:(e.setEnabled(!0),!0)}},Y={id:"sheet.operation.disable-crosshair-highlight",type:o.CommandType.OPERATION,handler(r){const e=r.get(S);return e.enabled?(e.setEnabled(!1),!0):!1}};var N={exports:{}},b={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var k;function te(){if(k)return b;k=1;var r=R,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(h,l,C){var g,v={},m=null,f=null;C!==void 0&&(m=""+C),l.key!==void 0&&(m=""+l.key),l.ref!==void 0&&(f=l.ref);for(g in l)n.call(l,g)&&!s.hasOwnProperty(g)&&(v[g]=l[g]);if(h&&h.defaultProps)for(g in l=h.defaultProps,l)v[g]===void 0&&(v[g]=l[g]);return{$$typeof:e,type:h,key:m,ref:f,props:v,_owner:i.current}}return b.Fragment=t,b.jsx=a,b.jsxs=a,b}var B;function ne(){return B||(B=1,N.exports=te()),N.exports}var Z=ne();function F(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(t=F(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function re(){for(var r,e,t=0,n="",i=arguments.length;t<i;t++)(r=arguments[t])&&(e=F(r))&&(n&&(n+=" "),n+=e);return n}const x={crosshairHighlightOverlay:"univer-crosshair-highlight-overlay",crosshairHighlightItem:"univer-crosshair-highlight-item",crosshairHighlightItemSelected:"univer-crosshair-highlight-item-selected"};function ie(r){const{onChange:e}=r,t=o.useDependency(S),n=o.useObservable(t.color$),i=R.useCallback(s=>{e==null||e(s)},[e]);return Z.jsx("div",{className:x.crosshairHighlightOverlay,children:M.map(s=>Z.jsx("div",{className:re(x.crosshairHighlightItem,{[x.crosshairHighlightItemSelected]:s===n}),style:{backgroundColor:s},onClick:()=>i(s)},s))})}const W="CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT";function se(r){const e=r.get(S);return{id:I.id,tooltip:"crosshair.button.tooltip",type:H.MenuItemType.BUTTON_SELECTOR,icon:"CrossHighlightingSingle",selections:[{label:{name:W,hoverable:!1}}],selectionsCommandId:j.id,activated$:e.enabled$,hidden$:H.getMenuHiddenObservable(r,o.UniverInstanceType.UNIVER_SHEET)}}const oe={[H.ContextMenuPosition.FOOTER_MENU]:{[H.ContextMenuGroup.OTHERS]:{[I.id]:{order:0,menuItemFactory:se}}}};var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,he=(r,e,t,n)=>{for(var i=n>1?void 0:n?ce(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&ae(e,t,i),i},$=(r,e)=>(t,n)=>e(t,n,r);let y=class extends o.Disposable{constructor(r,e,t){super(),this._componentMgr=r,this._menuManagerService=e,this._cmdSrv=t,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[I,j,D,Y].forEach(r=>this._cmdSrv.registerCommand(r))}_initMenus(){this._menuManagerService.mergeMenu(oe)}_initComponents(){this._componentMgr.register(W,ie),this._componentMgr.register("CrossHighlightingSingle",G)}};y=he([$(0,o.Inject(H.ComponentManager)),$(1,H.IMenuManagerService),$(2,o.ICommandService)],y);const le=1;class ge{constructor(){u(this,"_selectedRanges",[]);u(this,"_ranges",[])}addRange(e){if(e.rangeType===o.RANGE_TYPE.COLUMN||e.rangeType===o.RANGE_TYPE.ROW||e.rangeType===o.RANGE_TYPE.ALL)return;const t=this._getIntersects(e),n=this._getSplitRanges(e,t);n.length>0&&this._ranges.push(...n)}setSelectedRanges(e){this._selectedRanges=e}_getSplitRanges(e,t){let n=[e];for(const i of t.concat(this._selectedRanges)){const s=[];for(const a of n){const h=o.Rectangle.subtract(a,i);h&&h.length>0&&s.push(...h)}n=s}return n.filter(i=>i.startRow<=i.endRow&&i.startColumn<=i.endColumn)}_getIntersects(e){const t=[];for(const n of this._ranges){const i=o.Rectangle.getIntersects(n,e);i&&t.push(i)}return t}getRanges(){return this._ranges}reset(){this._ranges=[],this._selectedRanges=[]}}class ue extends p.Shape{constructor(t,n){super(t,n);u(this,"_color");n&&this.setShapeProps(n)}setShapeProps(t){typeof t.color<"u"&&(this._color=t.color),this.transformByState({width:t.width,height:t.height})}_draw(t){const n=`rgba(${this._color.r}, ${this._color.g}, ${this._color.b}, ${this._color.a})`;p.Rect.drawWith(t,{width:this.width,height:this.height,fill:n,stroke:void 0,strokeWidth:0,evented:!1})}}var de=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,_e=(r,e,t,n)=>{for(var i=n>1?void 0:n?fe(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&de(e,t,i),i},O=(r,e)=>(t,n)=>e(t,n,r);let E=class extends o.Disposable{constructor(e,t,n,i,s,a){super();u(this,"_shapes",[]);u(this,"_rangeCollection",new ge);u(this,"_color","rgba(255,0,0,0.5)");this._context=e,this._sheetSkeletonManagerService=t,this._sheetsSelectionsService=n,this._sheetsCrosshairHighlightService=i,this._contextService=s,this._refSelectionsService=a,this._initRenderListener()}_transformSelection(e,t){if(!e)return;const n=t.getRowCount(),i=t.getColumnCount(),s=[];for(const a of e){const{startRow:h,endRow:l,startColumn:C,endColumn:g}=a.range;l-h+1===n||g-C+1===i||s.push(a.range)}this._rangeCollection.setSelectedRanges(s);for(const a of s)this.addSelection(a,t)}_initRenderListener(){const e=this._context.unit;this.disposeWithMe(_.combineLatest([this._contextService.subscribeContextValue$(w.REF_SELECTIONS_ENABLED).pipe(_.startWith(!1)),this._sheetSkeletonManagerService.currentSkeleton$,this._sheetsCrosshairHighlightService.enabled$,this._sheetsCrosshairHighlightService.color$.pipe(_.tap(t=>this._color=t)),_.merge(this._sheetsSelectionsService.selectionMoveStart$,this._sheetsSelectionsService.selectionMoving$,this._sheetsSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,e.activeSheet$.pipe(_.map(()=>this._sheetsSelectionsService.getCurrentSelections()))),_.merge(this._refSelectionsService.selectionMoveStart$,this._refSelectionsService.selectionMoving$,this._refSelectionsService.selectionMoveEnd$,this._sheetsSelectionsService.selectionSet$,e.activeSheet$.pipe(_.map(()=>this._refSelectionsService.getCurrentSelections())))]).subscribe(([t,n,i,s,a,h])=>{if(this._clear(),!i)return;const l=t?h:a;this._rangeCollection.reset(),this._transformSelection(l,e.getActiveSheet()),this.render(this._rangeCollection.getRanges())}))}addSelection(e,t){if(e.rangeType===o.RANGE_TYPE.COLUMN||e.rangeType===o.RANGE_TYPE.ROW||e.rangeType===o.RANGE_TYPE.ALL)return;const n=t.getRowCount(),i=t.getColumnCount(),{startRow:s,endRow:a,startColumn:h,endColumn:l}=e,C={startRow:s,endRow:a,startColumn:0,endColumn:h-1},g={startRow:s,endRow:a,startColumn:l+1,endColumn:i},v={startRow:0,endRow:s-1,startColumn:h,endColumn:l},m={startRow:a+1,endRow:n,startColumn:h,endColumn:l};for(const f of[C,g,v,m])f.startRow<=f.endRow&&f.startColumn<=f.endColumn&&this._rangeCollection.addRange(f)}_clear(){this._shapes.forEach(e=>{e.dispose()}),this._shapes=[]}_addShapes(e,t,n,i){const{startRow:s,endRow:a,startColumn:h,endColumn:l}=e,C=P.getCoordByCell(s,h,n,i),g=P.getCoordByCell(a,l,n,i),{startX:v,startY:m}=C,{endX:f,endY:Ce}=g,me=f-v,Re=Ce-m,He={left:v,top:m,color:new o.ColorKit(this._color).toRgb(),width:me,height:Re,zIndex:le,evented:!1},q=new ue(`crosshair-${t}`,He);this._shapes.push(q),n.addObject(q)}render(e){const t=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!t)return;const{scene:n}=this._context;this._clear();for(let i=0;i<e.length;i++){const s=e[i];this._addShapes(s,i,n,t)}n.makeDirty(!0)}async dispose(){super.dispose()}};E=_e([O(1,o.Inject(P.SheetSkeletonManagerService)),O(2,o.Inject(w.SheetsSelectionsService)),O(3,o.Inject(S)),O(4,o.Inject(o.IContextService)),O(5,w.IRefSelectionsService)],E);var Se=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,pe=(r,e,t,n)=>{for(var i=n>1?void 0:n?ve(e,t):e,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=(n?a(e,t,i):a(i))||i);return n&&i&&Se(e,t,i),i},V=(r,e)=>(t,n)=>e(t,n,r);c.UniverSheetsCrosshairHighlightPlugin=(T=class extends o.Plugin{constructor(e=A,t,n,i){super(),this._config=e,this._injector=t,this._renderManagerService=n,this._configService=i;const{...s}=o.merge({},A,this._config);this._configService.setConfig(J,s)}onStarting(){[[S],[y]].forEach(e=>this._injector.add(e))}onReady(){[[E]].forEach(e=>this._injector.add(e)),this._injector.get(y),this._renderManagerService.registerRenderModule(o.UniverInstanceType.UNIVER_SHEET,[E])}},u(T,"pluginName","SHEET_CROSSHAIR_HIGHLIGHT_PLUGIN"),u(T,"type",o.UniverInstanceType.UNIVER_SHEET),T),c.UniverSheetsCrosshairHighlightPlugin=pe([V(1,o.Inject(o.Injector)),V(2,p.IRenderManagerService),V(3,o.IConfigService)],c.UniverSheetsCrosshairHighlightPlugin),c.CROSSHAIR_HIGHLIGHT_COLORS=M,c.DisableCrosshairHighlightOperation=Y,c.EnableCrosshairHighlightOperation=D,c.SetCrosshairHighlightColorOperation=j,c.SheetsCrosshairHighlightService=S,c.ToggleCrosshairHighlightOperation=I,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
package/lib/umd/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightEnUS=i())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"Crosshair Highlight"}}}});
|
package/lib/umd/locale/fa-IR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightFaIR=t())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"برجسته کردن خط نشانه"}}}});
|
package/lib/umd/locale/fr-FR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightFrFR=i())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"Surlignage du réticule"}}}});
|
package/lib/umd/locale/ru-RU.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightRuRU=t())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"Перекрестный выделение"}}}});
|
package/lib/umd/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightViVN=i())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"Đánh dấu chéo"}}}});
|
package/lib/umd/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhCN=t())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"十字高亮"}}}});
|
package/lib/umd/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.UniverSheetsCrosshairHighlightZhTW=t())})(this,function(){"use strict";return{crosshair:{button:{tooltip:"十字高亮"}}}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-crosshair-highlight",
|
|
3
|
-
"version": "0.5.5-
|
|
3
|
+
"version": "0.5.5-nightly.202501201606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"lib"
|
|
54
54
|
],
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"react": "
|
|
56
|
+
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
|
|
57
57
|
"rxjs": ">=7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@univerjs/icons": "^0.2.12",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
|
-
"@univerjs/
|
|
63
|
-
"@univerjs/
|
|
64
|
-
"@univerjs/
|
|
65
|
-
"@univerjs/
|
|
66
|
-
"@univerjs/
|
|
62
|
+
"@univerjs/engine-render": "0.5.5-nightly.202501201606",
|
|
63
|
+
"@univerjs/sheets-ui": "0.5.5-nightly.202501201606",
|
|
64
|
+
"@univerjs/ui": "0.5.5-nightly.202501201606",
|
|
65
|
+
"@univerjs/core": "0.5.5-nightly.202501201606",
|
|
66
|
+
"@univerjs/sheets": "0.5.5-nightly.202501201606"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"less": "^4.2.1",
|