@univerjs/sheets-crosshair-highlight 0.6.0-experimental.20250212-dbe9830 → 0.6.0-experimental.20250220-d9a8e74
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/es/facade.js +29 -19
- package/lib/types/facade/f-univer.d.ts +3 -2
- package/lib/umd/facade.js +1 -1
- package/package.json +11 -11
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const h=require("@univerjs/core"),i=require("@univerjs/sheets-crosshair-highlight");class
|
|
1
|
+
"use strict";const o=require("@univerjs/core"),h=require("@univerjs/core/facade"),i=require("@univerjs/sheets-crosshair-highlight");class a{get CrosshairHighlightEnabledChanged(){return"CrosshairHighlightEnabledChanged"}get CrosshairHighlightColorChanged(){return"CrosshairHighlightColorChanged"}}class n extends h.FUniver{_initialize(e){const s=e.get(o.ICommandService);this.registerEventHandler(this.Event.CrosshairHighlightEnabledChanged,()=>s.onCommandExecuted(r=>{if(r.id===i.EnableCrosshairHighlightOperation.id||r.id===i.DisableCrosshairHighlightOperation.id||r.id===i.ToggleCrosshairHighlightOperation.id){const t=this.getActiveSheet();if(!t)return;this.fireEvent(this.Event.CrosshairHighlightEnabledChanged,{enabled:this.getCrosshairHighlightEnabled(),...t})}})),this.registerEventHandler(this.Event.CrosshairHighlightColorChanged,()=>s.onCommandExecuted(r=>{if(r.id===i.SetCrosshairHighlightColorOperation.id){const t=this.getActiveSheet();if(!t)return;this.fireEvent(this.Event.CrosshairHighlightColorChanged,{color:this.getCrosshairHighlightColor(),...t})}}))}setCrosshairHighlightEnabled(e){return e?this._commandService.syncExecuteCommand(i.EnableCrosshairHighlightOperation.id):this._commandService.syncExecuteCommand(i.DisableCrosshairHighlightOperation.id),this}setCrosshairHighlightColor(e){return this._commandService.syncExecuteCommand(i.SetCrosshairHighlightColorOperation.id,{value:e}),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}}h.FEventName.extend(a);h.FUniver.extend(n);
|
package/lib/es/facade.js
CHANGED
|
@@ -1,32 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { ICommandService as l } from "@univerjs/core";
|
|
2
|
+
import { FEventName as C, FUniver as n } from "@univerjs/core/facade";
|
|
3
|
+
import { EnableCrosshairHighlightOperation as h, DisableCrosshairHighlightOperation as s, ToggleCrosshairHighlightOperation as d, SetCrosshairHighlightColorOperation as g, SheetsCrosshairHighlightService as o, CROSSHAIR_HIGHLIGHT_COLORS as c } from "@univerjs/sheets-crosshair-highlight";
|
|
4
|
+
class H {
|
|
5
|
+
get CrosshairHighlightEnabledChanged() {
|
|
6
|
+
return "CrosshairHighlightEnabledChanged";
|
|
7
|
+
}
|
|
8
|
+
get CrosshairHighlightColorChanged() {
|
|
9
|
+
return "CrosshairHighlightColorChanged";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
class v extends n {
|
|
4
13
|
/**
|
|
5
14
|
* @ignore
|
|
6
15
|
*/
|
|
7
16
|
_initialize(i) {
|
|
8
|
-
const r = i.get(
|
|
17
|
+
const r = i.get(l);
|
|
9
18
|
this.registerEventHandler(
|
|
10
19
|
this.Event.CrosshairHighlightEnabledChanged,
|
|
11
|
-
() => r.onCommandExecuted((
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
20
|
+
() => r.onCommandExecuted((e) => {
|
|
21
|
+
if (e.id === h.id || e.id === s.id || e.id === d.id) {
|
|
22
|
+
const t = this.getActiveSheet();
|
|
23
|
+
if (!t) return;
|
|
15
24
|
this.fireEvent(this.Event.CrosshairHighlightEnabledChanged, {
|
|
16
25
|
enabled: this.getCrosshairHighlightEnabled(),
|
|
17
|
-
...
|
|
26
|
+
...t
|
|
18
27
|
});
|
|
19
28
|
}
|
|
20
29
|
})
|
|
21
30
|
), this.registerEventHandler(
|
|
22
31
|
this.Event.CrosshairHighlightColorChanged,
|
|
23
|
-
() => r.onCommandExecuted((
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
32
|
+
() => r.onCommandExecuted((e) => {
|
|
33
|
+
if (e.id === g.id) {
|
|
34
|
+
const t = this.getActiveSheet();
|
|
35
|
+
if (!t) return;
|
|
27
36
|
this.fireEvent(this.Event.CrosshairHighlightColorChanged, {
|
|
28
37
|
color: this.getCrosshairHighlightColor(),
|
|
29
|
-
...
|
|
38
|
+
...t
|
|
30
39
|
});
|
|
31
40
|
}
|
|
32
41
|
})
|
|
@@ -36,18 +45,19 @@ class c extends g {
|
|
|
36
45
|
return i ? this._commandService.syncExecuteCommand(h.id) : this._commandService.syncExecuteCommand(s.id), this;
|
|
37
46
|
}
|
|
38
47
|
setCrosshairHighlightColor(i) {
|
|
39
|
-
return this._commandService.syncExecuteCommand(
|
|
48
|
+
return this._commandService.syncExecuteCommand(g.id, {
|
|
40
49
|
value: i
|
|
41
50
|
}), this;
|
|
42
51
|
}
|
|
43
52
|
getCrosshairHighlightEnabled() {
|
|
44
|
-
return this._injector.get(
|
|
53
|
+
return this._injector.get(o).enabled;
|
|
45
54
|
}
|
|
46
55
|
getCrosshairHighlightColor() {
|
|
47
|
-
return this._injector.get(
|
|
56
|
+
return this._injector.get(o).color;
|
|
48
57
|
}
|
|
49
58
|
get CROSSHAIR_HIGHLIGHT_COLORS() {
|
|
50
|
-
return
|
|
59
|
+
return c;
|
|
51
60
|
}
|
|
52
61
|
}
|
|
53
|
-
|
|
62
|
+
C.extend(H);
|
|
63
|
+
n.extend(v);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injector } from '@univerjs/core';
|
|
2
|
+
import { IEventBase, FUniver } from '@univerjs/core/facade';
|
|
2
3
|
import { FWorkbook, FWorksheet } from '@univerjs/sheets/facade';
|
|
3
4
|
/**
|
|
4
5
|
* @ignore
|
|
@@ -132,7 +133,7 @@ export declare class FUniverCrosshairHighlightMixin extends FUniver implements I
|
|
|
132
133
|
getCrosshairHighlightColor(): string;
|
|
133
134
|
get CROSSHAIR_HIGHLIGHT_COLORS(): string[];
|
|
134
135
|
}
|
|
135
|
-
declare module '@univerjs/core' {
|
|
136
|
+
declare module '@univerjs/core/facade' {
|
|
136
137
|
interface FUniver extends IFUniverCrosshairHighlightMixin {
|
|
137
138
|
}
|
|
138
139
|
interface FEventName extends IFSheetCrosshairHighlightEventMixin {
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(i,r){typeof exports=="object"&&typeof module<"u"?r(require("@univerjs/core"),require("@univerjs/core/facade"),require("@univerjs/sheets-crosshair-highlight")):typeof define=="function"&&define.amd?define(["@univerjs/core","@univerjs/core/facade","@univerjs/sheets-crosshair-highlight"],r):(i=typeof globalThis<"u"?globalThis:i||self,r(i.UniverCore,i.UniverCoreFacade,i.UniverSheetsCrosshairHighlight))})(this,function(i,r,e){"use strict";class o{get CrosshairHighlightEnabledChanged(){return"CrosshairHighlightEnabledChanged"}get CrosshairHighlightColorChanged(){return"CrosshairHighlightColorChanged"}}class g extends r.FUniver{_initialize(t){const s=t.get(i.ICommandService);this.registerEventHandler(this.Event.CrosshairHighlightEnabledChanged,()=>s.onCommandExecuted(h=>{if(h.id===e.EnableCrosshairHighlightOperation.id||h.id===e.DisableCrosshairHighlightOperation.id||h.id===e.ToggleCrosshairHighlightOperation.id){const n=this.getActiveSheet();if(!n)return;this.fireEvent(this.Event.CrosshairHighlightEnabledChanged,{enabled:this.getCrosshairHighlightEnabled(),...n})}})),this.registerEventHandler(this.Event.CrosshairHighlightColorChanged,()=>s.onCommandExecuted(h=>{if(h.id===e.SetCrosshairHighlightColorOperation.id){const n=this.getActiveSheet();if(!n)return;this.fireEvent(this.Event.CrosshairHighlightColorChanged,{color:this.getCrosshairHighlightColor(),...n})}}))}setCrosshairHighlightEnabled(t){return t?this._commandService.syncExecuteCommand(e.EnableCrosshairHighlightOperation.id):this._commandService.syncExecuteCommand(e.DisableCrosshairHighlightOperation.id),this}setCrosshairHighlightColor(t){return this._commandService.syncExecuteCommand(e.SetCrosshairHighlightColorOperation.id,{value:t}),this}getCrosshairHighlightEnabled(){return this._injector.get(e.SheetsCrosshairHighlightService).enabled}getCrosshairHighlightColor(){return this._injector.get(e.SheetsCrosshairHighlightService).color}get CROSSHAIR_HIGHLIGHT_COLORS(){return e.CROSSHAIR_HIGHLIGHT_COLORS}}r.FEventName.extend(o),r.FUniver.extend(g)});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-crosshair-highlight",
|
|
3
|
-
"version": "0.6.0-experimental.
|
|
3
|
+
"version": "0.6.0-experimental.20250220-d9a8e74",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -57,24 +57,24 @@
|
|
|
57
57
|
"rxjs": ">=7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@univerjs/icons": "^0.2.
|
|
60
|
+
"@univerjs/icons": "^0.2.15",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
|
-
"@univerjs/core": "0.6.0-experimental.
|
|
63
|
-
"@univerjs/engine-render": "0.6.0-experimental.
|
|
64
|
-
"@univerjs/sheets": "0.6.0-experimental.
|
|
65
|
-
"@univerjs/
|
|
66
|
-
"@univerjs/
|
|
62
|
+
"@univerjs/core": "0.6.0-experimental.20250220-d9a8e74",
|
|
63
|
+
"@univerjs/engine-render": "0.6.0-experimental.20250220-d9a8e74",
|
|
64
|
+
"@univerjs/sheets-ui": "0.6.0-experimental.20250220-d9a8e74",
|
|
65
|
+
"@univerjs/ui": "0.6.0-experimental.20250220-d9a8e74",
|
|
66
|
+
"@univerjs/sheets": "0.6.0-experimental.20250220-d9a8e74"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"less": "^4.2.2",
|
|
70
|
-
"postcss": "^8.5.
|
|
70
|
+
"postcss": "^8.5.2",
|
|
71
71
|
"react": "18.3.1",
|
|
72
72
|
"rxjs": "^7.8.1",
|
|
73
73
|
"tailwindcss": "^3.4.17",
|
|
74
74
|
"typescript": "^5.7.3",
|
|
75
|
-
"vite": "^6.0
|
|
76
|
-
"vitest": "^3.0.
|
|
77
|
-
"@univerjs-infra/shared": "0.6.0
|
|
75
|
+
"vite": "^6.1.0",
|
|
76
|
+
"vitest": "^3.0.5",
|
|
77
|
+
"@univerjs-infra/shared": "0.6.0"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"test": "vitest run",
|