@univerjs/sheets-crosshair-highlight 0.4.2-nightly.202411071606 → 0.4.2-nightly.202411081606

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.
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var l=(r,e,t)=>e in r?o(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var a=(r,e,t)=>l(r,typeof e!="symbol"?e+"":e,t);const s=require("@univerjs/core"),n=require("rxjs"),h=["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 i extends s.Disposable{constructor(){super(...arguments);a(this,"_enabled$",new n.BehaviorSubject(!1));a(this,"enabled$",this._enabled$.asObservable());a(this,"_color$",new n.BehaviorSubject(h[0]));a(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)}}s.CommandType.OPERATION;const g={id:"sheet.operation.set-crosshair-highlight-color",type:s.CommandType.OPERATION,handler(r,{value:e}){const t=r.get(i);return t.enabled||t.setEnabled(!0),t.setColor(e),!0}},b={id:"sheet.operation.enable-crosshair-highlight",type:s.CommandType.OPERATION,handler(r){const e=r.get(i);return e.enabled?!1:(e.setEnabled(!0),!0)}},d={id:"sheet.operation.disable-crosshair-highlight",type:s.CommandType.OPERATION,handler(r){const e=r.get(i);return e.enabled?(e.setEnabled(!1),!0):!1}};class c extends s.FUniver{setCrosshairHighlightEnabled(e){e?this._commandService.executeCommand(b.id):this._commandService.executeCommand(d.id)}setCrosshairHighlightColor(e){this._commandService.executeCommand(g.id,{value:e})}}s.FUniver.extend(c);
@@ -0,0 +1 @@
1
+ "use strict";var k=Object.defineProperty;var F=(n,e,t)=>e in n?k(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var l=(n,e,t)=>F(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@univerjs/core"),w=require("@univerjs/engine-render"),_=require("@univerjs/ui"),u=require("rxjs"),N=require("react/jsx-runtime"),S=require("react"),T=require("@univerjs/sheets-ui"),P=require("@univerjs/sheets");var h=function(){return h=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s])}return n},h.apply(this,arguments)},X=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(n);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(n,r[s])&&(t[r[s]]=n[r[s]]);return t},V=S.forwardRef(function(n,e){var t=n.icon,r=n.id,s=n.className,i=n.extend,o=X(n,["icon","id","className","extend"]),c="univerjs-icon univerjs-icon-".concat(r," ").concat(s||"").trim(),g=S.useRef("_".concat(J()));return A(t,"".concat(r),{defIds:t.defIds,idSuffix:g.current},h({ref:e,className:c},o),i)});function A(n,e,t,r,s){return S.createElement(n.tag,h(h({key:e},K(n,t,s)),r),(z(n,t).children||[]).map(function(i,o){return A(i,"".concat(e,"-").concat(n.tag,"-").concat(o),t,void 0,s)}))}function K(n,e,t){var r=h({},n.attrs);t!=null&&t.colorChannel1&&r.fill==="colorChannel1"&&(r.fill=t.colorChannel1);var s=e.defIds;return!s||s.length===0||(n.tag==="use"&&r["xlink:href"]&&(r["xlink:href"]=r["xlink:href"]+e.idSuffix),Object.entries(r).forEach(function(i){var o=i[0],c=i[1];typeof c=="string"&&(r[o]=c.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),r}function z(n,e){var t,r=e.defIds;return!r||r.length===0?n:n.tag==="defs"&&(!((t=n.children)===null||t===void 0)&&t.length)?h(h({},n),{children:n.children.map(function(s){return typeof s.attrs.id=="string"&&r&&r.indexOf(s.attrs.id)>-1?h(h({},s),{attrs:h(h({},s.attrs),{id:s.attrs.id+e.idSuffix})}):s})}):n}function J(){return Math.random().toString(36).substring(2,8)}V.displayName="UniverIcon";var Q={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"}}]},L=S.forwardRef(function(n,e){return S.createElement(V,Object.assign({},n,{id:"cross-highlighting-single",ref:e,icon:Q}))});L.displayName="CrossHighlightingSingle";const $=["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 d extends a.Disposable{constructor(){super(...arguments);l(this,"_enabled$",new u.BehaviorSubject(!1));l(this,"enabled$",this._enabled$.asObservable());l(this,"_color$",new u.BehaviorSubject($[0]));l(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:a.CommandType.OPERATION,handler(n){const e=n.get(d),t=e.enabled;return e.setEnabled(!t),!0}},j={id:"sheet.operation.set-crosshair-highlight-color",type:a.CommandType.OPERATION,handler(n,{value:e}){const t=n.get(d);return t.enabled||t.setEnabled(!0),t.setColor(e),!0}},G={id:"sheet.operation.enable-crosshair-highlight",type:a.CommandType.OPERATION,handler(n){const e=n.get(d);return e.enabled?!1:(e.setEnabled(!0),!0)}},U={id:"sheet.operation.disable-crosshair-highlight",type:a.CommandType.OPERATION,handler(n){const e=n.get(d);return e.enabled?(e.setEnabled(!1),!0):!1}};function D(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(e=0;e<s;e++)n[e]&&(t=D(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function ee(){for(var n,e,t=0,r="",s=arguments.length;t<s;t++)(n=arguments[t])&&(e=D(n))&&(r&&(r+=" "),r+=e);return r}const te="univer-crosshair-highlight-overlay",re="univer-crosshair-highlight-item",ne="univer-crosshair-highlight-item-selected",E={crosshairHighlightOverlay:te,crosshairHighlightItem:re,crosshairHighlightItemSelected:ne};function se(n){const{onChange:e}=n,t=a.useDependency(d),r=a.useObservable(t.color$),s=S.useCallback(i=>{e==null||e(i)},[e]);return N.jsx("div",{className:E.crosshairHighlightOverlay,children:$.map(i=>N.jsx("div",{className:ee(E.crosshairHighlightItem,{[E.crosshairHighlightItemSelected]:i===r}),style:{backgroundColor:i},onClick:()=>s(i)},i))})}const Y="CROSSHAIR_HIGHLIGHT_OVERLAY_COMPONENT";function ie(n){const e=n.get(d);return{id:I.id,tooltip:"crosshair.button.tooltip",type:_.MenuItemType.BUTTON_SELECTOR,icon:"CrossHighlightingSingle",selections:[{label:{name:Y,hoverable:!1}}],selectionsCommandId:j.id,activated$:e.enabled$,hidden$:_.getMenuHiddenObservable(n,a.UniverInstanceType.UNIVER_SHEET)}}const oe={[_.ContextMenuPosition.FOOTER_MENU]:{[_.ContextMenuGroup.OTHERS]:{[I.id]:{order:0,menuItemFactory:ie}}}};var ae=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,le=(n,e,t,r)=>{for(var s=r>1?void 0:r?ce(e,t):e,i=n.length-1,o;i>=0;i--)(o=n[i])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&ae(e,t,s),s},y=(n,e)=>(t,r)=>e(t,r,n);let R=class extends a.Disposable{constructor(n,e,t){super(),this._componentMgr=n,this._menuManagerService=e,this._cmdSrv=t,this._initCommands(),this._initMenus(),this._initComponents()}_initCommands(){[I,j,G,U].forEach(n=>this._cmdSrv.registerCommand(n))}_initMenus(){this._menuManagerService.mergeMenu(oe)}_initComponents(){this._componentMgr.register(Y,se),this._componentMgr.register("CrossHighlightingSingle",L)}};R=le([y(0,a.Inject(_.ComponentManager)),y(1,_.IMenuManagerService),y(2,a.ICommandService)],R);const he=1;class ge{constructor(){l(this,"_selectedRanges",[]);l(this,"_ranges",[])}addRange(e){if(e.rangeType===a.RANGE_TYPE.COLUMN||e.rangeType===a.RANGE_TYPE.ROW||e.rangeType===a.RANGE_TYPE.ALL)return;const t=this._getIntersects(e),r=this._getSplitRanges(e,t);r.length>0&&this._ranges.push(...r)}setSelectedRanges(e){this._selectedRanges=e}_getSplitRanges(e,t){let r=[e];for(const s of t.concat(this._selectedRanges)){const i=[];for(const o of r){const c=a.Rectangle.subtract(o,s);c&&c.length>0&&i.push(...c)}r=i}return r.filter(s=>s.startRow<=s.endRow&&s.startColumn<=s.endColumn)}_getIntersects(e){const t=[];for(const r of this._ranges){const s=a.Rectangle.getIntersects(r,e);s&&t.push(s)}return t}getRanges(){return this._ranges}reset(){this._ranges=[],this._selectedRanges=[]}}class ue extends w.Shape{constructor(t,r){super(t,r);l(this,"_color");r&&this.setShapeProps(r)}setShapeProps(t){typeof t.color<"u"&&(this._color=t.color),this.transformByState({width:t.width,height:t.height})}_draw(t){const r=`rgba(${this._color.r}, ${this._color.g}, ${this._color.b}, ${this._color.a})`;w.Rect.drawWith(t,{width:this.width,height:this.height,fill:r,stroke:void 0,strokeWidth:0,evented:!1})}}var de=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,_e=(n,e,t,r)=>{for(var s=r>1?void 0:r?fe(e,t):e,i=n.length-1,o;i>=0;i--)(o=n[i])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&de(e,t,s),s},p=(n,e)=>(t,r)=>e(t,r,n);let O=class extends a.Disposable{constructor(e,t,r,s,i,o){super();l(this,"_shapes",[]);l(this,"_rangeCollection",new ge);l(this,"_color","rgba(255,0,0,0.5)");this._context=e,this._sheetSkeletonManagerService=t,this._sheetsSelectionsService=r,this._sheetsCrosshairHighlightService=s,this._contextService=i,this._refSelectionsService=o,this._initRenderListener()}_transformSelection(e,t){if(!e)return;const r=t.getRowCount(),s=t.getColumnCount(),i=[];for(const o of e){const{startRow:c,endRow:g,startColumn:v,endColumn:C}=o.range;g-c+1===r||C-v+1===s||i.push(o.range)}this._rangeCollection.setSelectedRanges(i);for(const o of i)this.addSelection(o,t)}_initRenderListener(){const e=this._context.unit;this.disposeWithMe(u.combineLatest([this._contextService.subscribeContextValue$(P.DISABLE_NORMAL_SELECTIONS).pipe(u.startWith(!1)),this._sheetSkeletonManagerService.currentSkeleton$,this._sheetsCrosshairHighlightService.enabled$,this._sheetsCrosshairHighlightService.color$.pipe(u.tap(t=>this._color=t)),u.merge(this._sheetsSelectionsService.selectionMoveStart$,this._sheetsSelectionsService.selectionMoving$,this._sheetsSelectionsService.selectionMoveEnd$,e.activeSheet$.pipe(u.map(()=>this._sheetsSelectionsService.getCurrentSelections()))),u.merge(this._refSelectionsService.selectionMoveStart$,this._refSelectionsService.selectionMoving$,this._refSelectionsService.selectionMoveEnd$,e.activeSheet$.pipe(u.map(()=>this._refSelectionsService.getCurrentSelections())))]).subscribe(([t,r,s,i,o,c])=>{if(this._clear(),!s)return;const g=t?c:o;this._rangeCollection.reset(),this._transformSelection(g,e.getActiveSheet()),this.render(this._rangeCollection.getRanges())}))}addSelection(e,t){if(e.rangeType===a.RANGE_TYPE.COLUMN||e.rangeType===a.RANGE_TYPE.ROW||e.rangeType===a.RANGE_TYPE.ALL)return;const r=t.getRowCount(),s=t.getColumnCount(),{startRow:i,endRow:o,startColumn:c,endColumn:g}=e,v={startRow:i,endRow:o,startColumn:0,endColumn:c-1},C={startRow:i,endRow:o,startColumn:g+1,endColumn:s},m={startRow:0,endRow:i-1,startColumn:c,endColumn:g},b={startRow:o+1,endRow:r,startColumn:c,endColumn:g};for(const f of[v,C,m,b])f.startRow<=f.endRow&&f.startColumn<=f.endColumn&&this._rangeCollection.addRange(f)}_clear(){this._shapes.forEach(e=>{e.dispose()}),this._shapes=[]}_addShapes(e,t,r,s){const{startRow:i,endRow:o,startColumn:c,endColumn:g}=e,v=T.getCoordByCell(i,c,r,s),C=T.getCoordByCell(o,g,r,s),{startX:m,startY:b}=v,{endX:f,endY:B}=C,Z=f-m,q=B-b,W={left:m,top:b,color:new a.ColorKit(this._color).toRgb(),width:Z,height:q,zIndex:he,evented:!1},x=new ue(`crosshair-${t}`,W);this._shapes.push(x),r.addObject(x)}render(e){const t=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!t)return;const{scene:r}=this._context;this._clear();for(let s=0;s<e.length;s++){const i=e[s];this._addShapes(i,s,r,t)}r.makeDirty(!0)}async dispose(){super.dispose()}};O=_e([p(1,a.Inject(T.SheetSkeletonManagerService)),p(2,a.Inject(P.SheetsSelectionsService)),p(3,a.Inject(d)),p(4,a.Inject(a.IContextService)),p(5,P.IRefSelectionsService)],O);const Se="sheets-crosshair-highlight.config",ve={};var Ce=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,me=(n,e,t,r)=>{for(var s=r>1?void 0:r?pe(e,t):e,i=n.length-1,o;i>=0;i--)(o=n[i])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&Ce(e,t,s),s},M=(n,e)=>(t,r)=>e(t,r,n),H;exports.UniverSheetsCrosshairHighlightPlugin=(H=class extends a.Plugin{constructor(e=ve,t,r,s){super(),this._config=e,this._injector=t,this._renderManagerService=r,this._configService=s;const{...i}=this._config;this._configService.setConfig(Se,i)}onStarting(){[[d],[R]].forEach(e=>this._injector.add(e))}onReady(){[[O]].forEach(e=>this._injector.add(e)),this._injector.get(R),this._renderManagerService.registerRenderModule(a.UniverInstanceType.UNIVER_SHEET,[O])}},l(H,"pluginName","SHEET_CROSSHAIR_HIGHLIGHT_PLUGIN"),l(H,"type",a.UniverInstanceType.UNIVER_SHEET),H);exports.UniverSheetsCrosshairHighlightPlugin=me([M(1,a.Inject(a.Injector)),M(2,w.IRenderManagerService),M(3,a.IConfigService)],exports.UniverSheetsCrosshairHighlightPlugin);exports.CROSSHAIR_HIGHLIGHT_COLORS=$;exports.DisableCrosshairHighlightOperation=U;exports.EnableCrosshairHighlightOperation=G;exports.SetCrosshairHighlightColorOperation=j;exports.ToggleCrosshairHighlightOperation=I;
@@ -0,0 +1 @@
1
+ "use strict";const t={crosshair:{button:{tooltip:"Crosshair Highlight"}}};module.exports=t;
@@ -0,0 +1 @@
1
+ "use strict";const t={crosshair:{button:{tooltip:"برجسته کردن خط نشانه"}}};module.exports=t;
@@ -0,0 +1 @@
1
+ "use strict";const t={crosshair:{button:{tooltip:"Перекрестный выделение"}}};module.exports=t;
@@ -0,0 +1 @@
1
+ "use strict";const o={crosshair:{button:{tooltip:"Đánh dấu chéo"}}};module.exports=o;
@@ -0,0 +1 @@
1
+ "use strict";const t={crosshair:{button:{tooltip:"十字高亮"}}};module.exports=t;
@@ -0,0 +1 @@
1
+ "use strict";const t={crosshair:{button:{tooltip:"十字高亮"}}};module.exports=t;
package/lib/es/facade.js CHANGED
@@ -1,17 +1,81 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
3
- import { FUniver } from "@univerjs/core";
4
- import { E as EnableCrosshairHighlightOperation, D as DisableCrosshairHighlightOperation, a as SetCrosshairHighlightColorOperation } from "../operation-8Cu0xxNn.mjs";
5
- const _FUniverCrosshairHighlightMixin = class _FUniverCrosshairHighlightMixin extends FUniver {
6
- setCrosshairHighlightEnabled(enabled) {
7
- enabled ? this._commandService.executeCommand(EnableCrosshairHighlightOperation.id) : this._commandService.executeCommand(DisableCrosshairHighlightOperation.id);
8
- }
9
- setCrosshairHighlightColor(color) {
10
- this._commandService.executeCommand(SetCrosshairHighlightColorOperation.id, {
11
- value: color
12
- });
1
+ var l = Object.defineProperty;
2
+ var h = (r, e, t) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var a = (r, e, t) => h(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Disposable as g, CommandType as s, FUniver as n } from "@univerjs/core";
5
+ import { BehaviorSubject as o } from "rxjs";
6
+ const b = [
7
+ "rgba(158, 109, 227, 0.3)",
8
+ "rgba(254, 75, 75, 0.3)",
9
+ "rgba(255, 140, 81, 0.3)",
10
+ "rgba(164, 220, 22, 0.3)",
11
+ "rgba(45, 174, 255, 0.3)",
12
+ "rgba(58, 96, 247, 0.3)",
13
+ "rgba(242, 72, 166, 0.3)",
14
+ "rgba(153, 153, 153, 0.3)",
15
+ "rgba(158, 109, 227, 0.15)",
16
+ "rgba(254, 75, 75, 0.15)",
17
+ "rgba(255, 140, 81, 0.15)",
18
+ "rgba(164, 220, 22, 0.15)",
19
+ "rgba(45, 174, 255, 0.15)",
20
+ "rgba(58, 96, 247, 0.15)",
21
+ "rgba(242, 72, 166, 0.15)",
22
+ "rgba(153, 153, 153, 0.15)"
23
+ ];
24
+ class i extends g {
25
+ constructor() {
26
+ super(...arguments);
27
+ a(this, "_enabled$", new o(!1));
28
+ a(this, "enabled$", this._enabled$.asObservable());
29
+ a(this, "_color$", new o(b[0]));
30
+ a(this, "color$", this._color$.asObservable());
31
+ }
32
+ get enabled() {
33
+ return this._enabled$.getValue();
34
+ }
35
+ get color() {
36
+ return this._color$.getValue();
37
+ }
38
+ dispose() {
39
+ this._enabled$.complete();
40
+ }
41
+ setEnabled(t) {
42
+ this._enabled$.next(t);
43
+ }
44
+ setColor(t) {
45
+ this._color$.next(t);
46
+ }
47
+ }
48
+ s.OPERATION;
49
+ const d = {
50
+ id: "sheet.operation.set-crosshair-highlight-color",
51
+ type: s.OPERATION,
52
+ handler(r, { value: e }) {
53
+ const t = r.get(i);
54
+ return t.enabled || t.setEnabled(!0), t.setColor(e), !0;
55
+ }
56
+ }, c = {
57
+ id: "sheet.operation.enable-crosshair-highlight",
58
+ type: s.OPERATION,
59
+ handler(r) {
60
+ const e = r.get(i);
61
+ return e.enabled ? !1 : (e.setEnabled(!0), !0);
62
+ }
63
+ }, u = {
64
+ id: "sheet.operation.disable-crosshair-highlight",
65
+ type: s.OPERATION,
66
+ handler(r) {
67
+ const e = r.get(i);
68
+ return e.enabled ? (e.setEnabled(!1), !0) : !1;
13
69
  }
14
70
  };
15
- __name(_FUniverCrosshairHighlightMixin, "FUniverCrosshairHighlightMixin");
16
- let FUniverCrosshairHighlightMixin = _FUniverCrosshairHighlightMixin;
17
- FUniver.extend(FUniverCrosshairHighlightMixin);
71
+ class m extends n {
72
+ setCrosshairHighlightEnabled(e) {
73
+ e ? this._commandService.executeCommand(c.id) : this._commandService.executeCommand(u.id);
74
+ }
75
+ setCrosshairHighlightColor(e) {
76
+ this._commandService.executeCommand(d.id, {
77
+ value: e
78
+ });
79
+ }
80
+ }
81
+ n.extend(m);