@sheetxl/scripting-mui 0.7.23-beta.2
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/LICENSE.md +11 -0
- package/README.md +33 -0
- package/browser/cjs/index.cjs +1 -0
- package/browser/esm/index.mjs +927 -0
- package/licenses/dependencies.txt +19 -0
- package/node/esm/index.mjs +920 -0
- package/package.json +65 -0
- package/resources/contents.json +18 -0
- package/resources/locales/contents.json +16 -0
- package/resources/locales/de/ui.msg.json +14 -0
- package/resources/locales/en/ui.msg.json +14 -0
- package/types/index.d.ts +2 -0
- package/types/src/ScriptingPlugin.d.ts +9 -0
- package/types/src/ScriptingPlugin.d.ts.map +1 -0
- package/types/src/command/InsertFunctionContribution.d.ts +15 -0
- package/types/src/command/InsertFunctionContribution.d.ts.map +1 -0
- package/types/src/command/InsertFunctionPopupPanel.d.ts +13 -0
- package/types/src/command/InsertFunctionPopupPanel.d.ts.map +1 -0
- package/types/src/command/InsertScriptCommandButton.d.ts +15 -0
- package/types/src/command/InsertScriptCommandButton.d.ts.map +1 -0
- package/types/src/command/RunScriptCommandButton.d.ts +11 -0
- package/types/src/command/RunScriptCommandButton.d.ts.map +1 -0
- package/types/src/command/RunScriptContribution.d.ts +21 -0
- package/types/src/command/RunScriptContribution.d.ts.map +1 -0
- package/types/src/command/RunScriptPopupPanel.d.ts +8 -0
- package/types/src/command/RunScriptPopupPanel.d.ts.map +1 -0
- package/types/src/command/index.d.ts +3 -0
- package/types/src/command/index.d.ts.map +1 -0
- package/types/src/index.d.ts +5 -0
- package/types/src/index.d.ts.map +1 -0
- package/types/src/locales/index.d.ts +3 -0
- package/types/src/locales/index.d.ts.map +1 -0
- package/types/src/template/TemplateSelectPanel.d.ts +41 -0
- package/types/src/template/TemplateSelectPanel.d.ts.map +1 -0
- package/types/src/template/index.d.ts +2 -0
- package/types/src/template/index.d.ts.map +1 -0
- package/types/src/toolbar/ScriptEditorToolbar.d.ts +6 -0
- package/types/src/toolbar/ScriptEditorToolbar.d.ts.map +1 -0
- package/types/src/toolbar/index.d.ts +2 -0
- package/types/src/toolbar/index.d.ts.map +1 -0
- package/types/src/utils/FetchDirectory.d.ts +20 -0
- package/types/src/utils/FetchDirectory.d.ts.map +1 -0
- package/types/src/utils/Utils.d.ts +2 -0
- package/types/src/utils/Utils.d.ts.map +1 -0
- package/types/src/utils/index.d.ts +3 -0
- package/types/src/utils/index.d.ts.map +1 -0
- package/types/src/workspace/ScriptCommandProvider.d.ts +29 -0
- package/types/src/workspace/ScriptCommandProvider.d.ts.map +1 -0
- package/types/src/workspace/ScriptTaskPane.d.ts +3 -0
- package/types/src/workspace/ScriptTaskPane.d.ts.map +1 -0
- package/types/src/workspace/ScriptWorkspace.d.ts +58 -0
- package/types/src/workspace/ScriptWorkspace.d.ts.map +1 -0
- package/types/src/workspace/index.d.ts +3 -0
- package/types/src/workspace/index.d.ts.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sheetxl/scripting-mui",
|
|
3
|
+
"description": "Scripting MUI - MUI script workspace, toolbar and run-script plugin for SheetXL.",
|
|
4
|
+
"version": "0.7.23-beta.2",
|
|
5
|
+
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./types/index.d.ts",
|
|
10
|
+
"browser": "./browser/esm/index.mjs",
|
|
11
|
+
"node": "./node/esm/index.mjs",
|
|
12
|
+
"import": "./browser/esm/index.mjs",
|
|
13
|
+
"require": "./browser/cjs/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"types": "./types/index.d.ts",
|
|
17
|
+
"module": "./browser/esm/index.mjs",
|
|
18
|
+
"main": "./browser/cjs/index.cjs",
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css",
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
23
|
+
"homepage": "https://sheetxl.com",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/sheetxl/sheetxl.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/sheetxl/sheetxl/issues"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"sheetxl",
|
|
33
|
+
"spreadsheet",
|
|
34
|
+
"react",
|
|
35
|
+
"mui",
|
|
36
|
+
"scripting",
|
|
37
|
+
"macros",
|
|
38
|
+
"automation"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@sheetxl/react": "^0.7.23-beta.2",
|
|
42
|
+
"@sheetxl/scripting-react": "^0.7.23-beta.2",
|
|
43
|
+
"@sheetxl/sdk": "^0.7.23-beta.2",
|
|
44
|
+
"@sheetxl/studio-mui": "^0.7.23-beta.2",
|
|
45
|
+
"@sheetxl/utils": "^0.7.23-beta.2",
|
|
46
|
+
"@sheetxl/utils-mui": "^0.7.23-beta.2",
|
|
47
|
+
"@sheetxl/utils-react": "^0.7.23-beta.2",
|
|
48
|
+
"clsx": "^2.1.1"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@emotion/cache": "^11.14.0",
|
|
52
|
+
"@emotion/react": "^11.14.0",
|
|
53
|
+
"@emotion/styled": "^11.14.0",
|
|
54
|
+
"@mui/material": "^9.0.0",
|
|
55
|
+
"@mui/styled-engine": "^9.0.0",
|
|
56
|
+
"@mui/system": "^9.0.0",
|
|
57
|
+
"@mui/utils": "^9.0.0",
|
|
58
|
+
"react": "^19.0.0",
|
|
59
|
+
"react-dom": "^19.0.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/react": "^19.2.17",
|
|
63
|
+
"@types/react-dom": "^19.2.3"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"insertFunction.fallbackLabel": "Funktion",
|
|
3
|
+
"insertFunction.insertNamed": "{name} einfügen",
|
|
4
|
+
"runScript.executeNamed": "{name} ausführen",
|
|
5
|
+
"runScript.fallbackLabel": "Makro",
|
|
6
|
+
"templateSelect.blankSummary": "Mit einem leeren Skript beginnen.",
|
|
7
|
+
"templateSelect.blankTitle": "Leere Vorlage...",
|
|
8
|
+
"templateSelect.errorTitle": "Fehler beim Laden der Vorlagen",
|
|
9
|
+
"templateSelect.intro": "Wählen Sie eine Vorlage als Ausgangspunkt, um Aufgaben zu automatisieren oder benutzerdefinierte Funktionen zu erstellen.",
|
|
10
|
+
"templateSelect.intro2": "Vorlagen bieten eine Grundlage, die Sie anpassen und auf Ihre Bedürfnisse zuschneiden können.",
|
|
11
|
+
"templateSelect.loadFailed": "Skripte konnten nicht geladen werden",
|
|
12
|
+
"templateSelect.title": "Skriptvorlage",
|
|
13
|
+
"templateSelect.untitled": "Unbenannt"
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"insertFunction.fallbackLabel": "Function",
|
|
3
|
+
"insertFunction.insertNamed": "Insert {name}",
|
|
4
|
+
"runScript.executeNamed": "Execute {name}",
|
|
5
|
+
"runScript.fallbackLabel": "Macro",
|
|
6
|
+
"templateSelect.blankSummary": "Start with an empty script.",
|
|
7
|
+
"templateSelect.blankTitle": "Blank Template...",
|
|
8
|
+
"templateSelect.errorTitle": "Error loading Templates",
|
|
9
|
+
"templateSelect.intro": "Choose from a template to provide a starting point to automate tasks or create user defined functions.",
|
|
10
|
+
"templateSelect.intro2": "Templates provide a foundation to customize and meet your specific needs.",
|
|
11
|
+
"templateSelect.loadFailed": "Failed to load scripts",
|
|
12
|
+
"templateSelect.title": "Script Template",
|
|
13
|
+
"templateSelect.untitled": "Untitled"
|
|
14
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptingPlugin.d.ts","sourceRoot":"","sources":["../../../src/ScriptingPlugin.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe,YAgH3B,CAAA;AAED;;;;;;GAMG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
2
|
+
export interface InsertFunctionContributionProps extends CommandPopupButtonProps {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* The **Custom Functions** popup button — the scripting plugin's contribution to the Formulas ribbon
|
|
6
|
+
* (`formulaToolbar`). Opens a menu of the workbook's user-defined calculation functions ({@link
|
|
7
|
+
* InsertFunctionPopupPanel}); picking one inserts it via the workbook `insertFunction` command.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Peer of the Macros button (`RunScriptContribution`). Stays **enabled even with no custom functions** — the
|
|
11
|
+
* popup always offers an "Edit Script" button, which is the way to create the first one — so it never gates
|
|
12
|
+
* on emptiness (the has-functions probe was dropped).
|
|
13
|
+
*/
|
|
14
|
+
export declare const InsertFunctionContribution: import('react').NamedExoticComponent<Omit<InsertFunctionContributionProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
15
|
+
//# sourceMappingURL=InsertFunctionContribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertFunctionContribution.d.ts","sourceRoot":"","sources":["../../../../src/command/InsertFunctionContribution.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,+BAAgC,SAAQ,uBAAuB;CAAG;AAEnF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,iIAiCpC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ExhibitPopupPanelProps, CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
2
|
+
export interface InsertFunctionPopupPanelProps extends ExhibitPopupPanelProps, CommandPopupButtonProps {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Popup panel listing the workbook's **custom calculation** functions (the user-defined formula functions).
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Mirrors `RunScriptPopupPanel` but filters `searchFunctions` by `type: 'calculation'` (not `'macro'`) and
|
|
9
|
+
* inserts the chosen function via the workbook `insertFunction` command (seeds `=FN(` into the active cell)
|
|
10
|
+
* instead of running a macro.
|
|
11
|
+
*/
|
|
12
|
+
export declare const InsertFunctionPopupPanel: import('react').NamedExoticComponent<Omit<InsertFunctionPopupPanelProps, "ref"> & import('react').RefAttributes<any>>;
|
|
13
|
+
//# sourceMappingURL=InsertFunctionPopupPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertFunctionPopupPanel.d.ts","sourceRoot":"","sources":["../../../../src/command/InsertFunctionPopupPanel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,sBAAsB,EAAE,KAAK,uBAAuB,EAC1D,MAAM,oBAAoB,CAAC;AAS5B,MAAM,WAAW,6BAA8B,SAAQ,sBAAsB,EAAE,uBAAuB;CAErG;AACD;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,uHAiFlC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
3
|
+
export interface InsertScriptCommandButtonProps extends CommandPopupButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Path to fetch directory scripts from.
|
|
6
|
+
*/
|
|
7
|
+
scriptPath?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Menu for Inserting new Scripts
|
|
11
|
+
*/
|
|
12
|
+
export declare const InsertScriptCommandButton: React.FC<InsertScriptCommandButtonProps & {
|
|
13
|
+
ref?: any;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=InsertScriptCommandButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertScriptCommandButton.d.ts","sourceRoot":"","sources":["../../../../src/command/InsertScriptCommandButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,EAEiD,KAAK,uBAAuB,EACnF,MAAM,oBAAoB,CAAC;AAsF5B,MAAM,WAAW,8BAA+B,SAAQ,uBAAuB;IAC7E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CA2G5F,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
3
|
+
export interface RunScriptCommandButtonProps extends CommandPopupButtonProps {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Menu for Quick run of scripts.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RunScriptCommandButton: React.FC<RunScriptCommandButtonProps & {
|
|
9
|
+
ref?: any;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=RunScriptCommandButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunScriptCommandButton.d.ts","sourceRoot":"","sources":["../../../../src/command/RunScriptCommandButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,2BAA4B,SAAQ,uBAAuB;CAAG;AAE/E;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAwCtF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RunScriptCommandButtonProps } from './RunScriptCommandButton';
|
|
3
|
+
export interface RunScriptContributionProps extends RunScriptCommandButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* When `true` the button is always shown (used by the view ribbon).
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Otherwise it only appears when the workbook has macros or the script editor is open - this keeps
|
|
9
|
+
* the run-script visibility logic with the scripting plugin rather than in the generic toolbar.
|
|
10
|
+
*/
|
|
11
|
+
alwaysShow?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Command bar contribution wrapper for {@link RunScriptCommandButton}.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Self-gating: renders nothing (including its leading divider) until it should appear, so it can be
|
|
18
|
+
* dropped into a ribbon contribution point without the host toolbar knowing scripting's rules.
|
|
19
|
+
*/
|
|
20
|
+
export declare const RunScriptContribution: React.FC<RunScriptContributionProps>;
|
|
21
|
+
//# sourceMappingURL=RunScriptContribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunScriptContribution.d.ts","sourceRoot":"","sources":["../../../../src/command/RunScriptContribution.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAA0B,KAAK,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEpG,MAAM,WAAW,0BAA2B,SAAQ,2BAA2B;IAC7E;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAoDrE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExhibitPopupPanelProps, CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
2
|
+
export interface RunScriptPopupPanelProps extends ExhibitPopupPanelProps, CommandPopupButtonProps {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Popup panel showing available scripts to run and option to open script editor.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RunScriptPopupPanel: import('react').NamedExoticComponent<Omit<RunScriptPopupPanelProps, "ref"> & import('react').RefAttributes<any>>;
|
|
8
|
+
//# sourceMappingURL=RunScriptPopupPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunScriptPopupPanel.d.ts","sourceRoot":"","sources":["../../../../src/command/RunScriptPopupPanel.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,sBAAsB,EAAE,KAAK,uBAAuB,EAC1D,MAAM,oBAAoB,CAAC;AAS5B,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB,EAAE,uBAAuB;CAEhG;AACD;;GAEG;AACH,eAAO,MAAM,mBAAmB,kHAwF7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAE1B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/locales/index.ts"],"names":[],"mappings":"AAoBA,uGAAuG;AACvG,wBAAgB,2BAA2B,IAAI,IAAI,CAKlD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/system';
|
|
3
|
+
import { DirectoryFile } from '../utils';
|
|
4
|
+
export interface TemplateSelectPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
7
|
+
*/
|
|
8
|
+
sx?: SxProps<Theme>;
|
|
9
|
+
/**
|
|
10
|
+
* Path to fetch directory scripts from.
|
|
11
|
+
*/
|
|
12
|
+
scriptPath?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Called when a script button is clicked
|
|
15
|
+
*/
|
|
16
|
+
onScriptSelect?: (file: DirectoryFile) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Additional class name
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Button minimum width in pixels
|
|
23
|
+
* @default 210
|
|
24
|
+
*/
|
|
25
|
+
buttonMinWidth?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Button minimum height in pixels
|
|
28
|
+
* @default 80
|
|
29
|
+
*/
|
|
30
|
+
buttonMinHeight?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Gap between buttons in pixels
|
|
33
|
+
* @default 12
|
|
34
|
+
*/
|
|
35
|
+
gap?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Panel displaying script buttons from a directory
|
|
39
|
+
*/
|
|
40
|
+
export declare const TemplateSelectPanel: React.NamedExoticComponent<TemplateSelectPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
//# sourceMappingURL=TemplateSelectPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplateSelectPanel.d.ts","sourceRoot":"","sources":["../../../../src/template/TemplateSelectPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AASvD,OAAO,EAAkB,KAAK,aAAa,EAAuB,MAAM,UAAU,CAAC;AAMnF,MAAM,WAAW,wBAAyB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpF;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,4FA+P7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommandToolbarProps } from '@sheetxl/utils-mui';
|
|
2
|
+
/**
|
|
3
|
+
* Toolbar for script editor with common script commands.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ScriptEditorToolbar: import('react').NamedExoticComponent<Omit<Omit<CommandToolbarProps, "renderToolbarPalette">, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
//# sourceMappingURL=ScriptEditorToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptEditorToolbar.d.ts","sourceRoot":"","sources":["../../../../src/toolbar/ScriptEditorToolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAE2B,KAAK,mBAAmB,EACzD,MAAM,oBAAoB,CAAC;AAI5B;;GAEG;AACH,eAAO,MAAM,mBAAmB,sJAoE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/toolbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface DirectoryFile<M = any> {
|
|
2
|
+
/** `null` for a synthetic entry with no backing file (e.g. the "blank" template). */
|
|
3
|
+
path: string | null;
|
|
4
|
+
metadata?: M;
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DirectoryEntry<M = any> {
|
|
8
|
+
path: string;
|
|
9
|
+
metadata?: M;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetches and loads 'virtual files' using fetch.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* This function only works if there is a directory.json file at the directory path.
|
|
16
|
+
*
|
|
17
|
+
* @returns {Promise<DirectoryFile[]>} A promise that resolves to the content of the directory.
|
|
18
|
+
*/
|
|
19
|
+
export declare const fetchDirectory: (directoryPath: string) => Promise<DirectoryFile[]>;
|
|
20
|
+
//# sourceMappingURL=FetchDirectory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetchDirectory.d.ts","sourceRoot":"","sources":["../../../../src/utils/FetchDirectory.ts"],"names":[],"mappings":"AA6BA,MAAM,WAAW,aAAa,CAAC,CAAC,GAAC,GAAG;IAClC,qFAAqF;IACrF,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,GAAC,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,CAAC;CACd;AAwBD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAU,eAAe,MAAM,KAAG,OAAO,CAAC,aAAa,EAAE,CAyDnF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/Utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,wDAAwD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* **Command bridge for the script editor container** (the task-pane analogue of `PaneScopeProvider`).
|
|
4
|
+
*
|
|
5
|
+
* Implements "**two resolvers, one registry**". The script pane renders alongside the grid inside
|
|
6
|
+
* `WorkbookElement`'s `workbook` scope (the per-sheet `sheet` scope is owned by the grid, so task panes
|
|
7
|
+
* don't inherit it), so this reads that ambient `workbook` scope, creates a `scriptEditor` **child** of it
|
|
8
|
+
* (chain `scriptEditor → workbook → app`), and wraps the workspace in its own {@link CommandAnchorProvider}
|
|
9
|
+
* anchored there:
|
|
10
|
+
* - the **script toolbar** resolves via this resolver — its chain reaches the per-workbook commands
|
|
11
|
+
* scripting needs (`insertFunction`, `executeScript`, undo/redo);
|
|
12
|
+
* - the **studio toolbars** keep resolving via the sheet/pane tracker.
|
|
13
|
+
*
|
|
14
|
+
* Sheet commands (`bold`, `copy`) resolve *up* the script chain, which is fine: the script toolbar renders
|
|
15
|
+
* none of them, `keyBindings` are OFF (no keystroke leak), and `InputClipboardInjector` overrides
|
|
16
|
+
* copy/cut/paste at the leaf so they act on the editor text, not the sheet.
|
|
17
|
+
*
|
|
18
|
+
* This bridge owns only the region's **scope + focus-tracked resolver**, and it is exactly those two
|
|
19
|
+
* standard pieces — the **contributor** axis ({@link CommandScopeProvider}: create the scope, name its
|
|
20
|
+
* element) and the **consumer** axis ({@link CommandAnchorProvider}: own a tracker + resolver). Nothing
|
|
21
|
+
* here is script-specific except the scope name. The script-editor command behavior
|
|
22
|
+
* (`saveScripts`/`insertScript`/`help`/…) is contributed by `ScriptEditor` (a descendant holding the live
|
|
23
|
+
* editor handle) into this same scope, so the toolbar resolves them with no `IScriptEditor.Context`
|
|
24
|
+
* marshalling. See design/COMMAND-DESIGN.md for the full topology.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ScriptCommandProvider: ({ children }: {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}) => ReactNode;
|
|
29
|
+
//# sourceMappingURL=ScriptCommandProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptCommandProvider.d.ts","sourceRoot":"","sources":["../../../../src/workspace/ScriptCommandProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWxD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,qBAAqB,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,KAAG,SAc7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptTaskPane.d.ts","sourceRoot":"","sources":["../../../../src/workspace/ScriptTaskPane.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,gBAAgB,CAAC;AAKjE,eAAO,MAAM,cAAc,GAAI,OAAO,aAAa,gCAyBlD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
|
+
import { Theme } from '@mui/material';
|
|
4
|
+
import { IScript } from '@sheetxl/sdk';
|
|
5
|
+
import { IFrame } from '@sheetxl/react';
|
|
6
|
+
import { ScriptEditorProps } from '@sheetxl/scripting-react';
|
|
7
|
+
/**
|
|
8
|
+
* Move this to another project. Automation-Editor
|
|
9
|
+
*/
|
|
10
|
+
export interface ScriptWorkspaceProps extends React.HTMLAttributes<HTMLElement> {
|
|
11
|
+
/**
|
|
12
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
13
|
+
*/
|
|
14
|
+
sx?: SxProps<Theme>;
|
|
15
|
+
/**
|
|
16
|
+
* If the values can be modified
|
|
17
|
+
*/
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Called before hiding the task pane.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* If a promise is returned, the task pane will show a loading pane.
|
|
24
|
+
*/
|
|
25
|
+
frame?: IFrame;
|
|
26
|
+
/**
|
|
27
|
+
* Allows for component to be autoFocused.
|
|
28
|
+
* @remarks
|
|
29
|
+
* If a string is provided this will be used as a querySelector to find the initial focusable component.
|
|
30
|
+
*/
|
|
31
|
+
autoFocusSel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Props to pass to the editor.
|
|
34
|
+
*/
|
|
35
|
+
propsScriptEditor?: ScriptEditorProps;
|
|
36
|
+
/**
|
|
37
|
+
* The script module to interact with.
|
|
38
|
+
*/
|
|
39
|
+
scripts: IScript;
|
|
40
|
+
/**
|
|
41
|
+
* Reference to the component instance.
|
|
42
|
+
*/
|
|
43
|
+
ref?: React.Ref<IScriptWorkspaceElement>;
|
|
44
|
+
}
|
|
45
|
+
export interface ScriptWorkspaceAttributes {
|
|
46
|
+
isScriptWorkspaceElement: () => true;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Type returned via ref property
|
|
50
|
+
*/
|
|
51
|
+
export interface IScriptWorkspaceElement extends ScriptWorkspaceAttributes, HTMLDivElement {
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* This tracks the selection of the sheet and
|
|
55
|
+
* updates the a named range editor and a sheet cell editor.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ScriptWorkspace: React.NamedExoticComponent<Omit<ScriptWorkspaceProps, "ref"> & React.RefAttributes<IScriptWorkspaceElement>>;
|
|
58
|
+
//# sourceMappingURL=ScriptWorkspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScriptWorkspace.d.ts","sourceRoot":"","sources":["../../../../src/workspace/ScriptWorkspace.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AASrD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAM5C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAE0C,KAAK,iBAAiB,EACtE,MAAM,0BAA0B,CAAC;AAKlC;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC9E;;QAEI;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;CAC1C;AAGD,MAAM,WAAW,yBAAyB;IACxC,wBAAwB,EAAE,MAAM,IAAI,CAAC;CACtC;AACD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB,EAAE,cAAc;CAAG;AAE7F;;;GAGG;AACH,eAAO,MAAM,eAAe,8GAmW3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/workspace/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|