@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.12
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/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
- package/browser/esm/2nRxqrNYbmEn8fS8.mjs +386 -0
- package/browser/esm/{fb126BNj3F8URR19.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
- package/browser/esm/BAzhmMX4Fk_qnUTp.mjs +414 -0
- package/browser/esm/BGL3x0W74D7qZXlf.mjs +318 -0
- package/browser/esm/BHGr2gsFofTdAFxq.mjs +515 -0
- package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BKhcJI-G15D3kGap.mjs} +4 -4
- package/browser/esm/BNbub9weuqm3mcoF.mjs +335 -0
- package/browser/esm/BSv9MVJaz1DVEffm.mjs +975 -0
- package/browser/esm/BWfLpYmd3cSgJ0C6.mjs +141 -0
- package/browser/esm/BZqwbIE8qzjSOYcJ.mjs +582 -0
- package/browser/esm/BZy9xUrYpAtnKeji.mjs +1288 -0
- package/browser/esm/{CIu1bjPJe_x31Oww.mjs → BnkwC5rsg9LZyhoP.mjs} +3 -3
- package/browser/esm/BpJsBv413cNQpyg0.mjs +319 -0
- package/browser/esm/BpVrgbVISiTDyFR3.mjs +197 -0
- package/browser/esm/BsngRDhvVYGVBJeK.mjs +1546 -0
- package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → C29TKq47CbXs652l.mjs} +2 -2
- package/browser/esm/{CEvZe2cZK-voZTif.mjs → C8p2iMad_NNCwGI_.mjs} +5 -5
- package/browser/esm/CBzXksWnb-1gGEWZ.mjs +212 -0
- package/browser/esm/{IQLeaAbtGTipUsOD.mjs → CFIAWgpU3UyepLBn.mjs} +25 -24
- package/browser/esm/CJD4jF4m9cBGHzr_.mjs +31 -0
- package/browser/esm/{CjznclrKqJRi7u9O.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
- package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
- package/browser/esm/CeF35ZeFP28Do5Zx.mjs +1379 -0
- package/browser/esm/{xKiLJKiLxto8SayF.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
- package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → Cq82lvdjyBvlJ8xJ.mjs} +19 -17
- package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
- package/browser/esm/Cvk2yY90hpgXWMAt.mjs +103 -0
- package/browser/esm/D0slJycx3nq53qmf.mjs +14 -0
- package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
- package/browser/esm/D5Fn0Hqllwv5HY6i.mjs +7581 -0
- package/browser/esm/D5N4nGaZsXtrHAOh.mjs +831 -0
- package/browser/esm/D7AqPfyhMiuda5l5.mjs +412 -0
- package/browser/esm/DHZA48ZMCETvHmeP.mjs +161 -0
- package/browser/esm/DX2_vf7WX6uRLaOZ.mjs +94 -0
- package/browser/esm/DaxpbAF1ShkT7hNU.mjs +490 -0
- package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → Db3oHfXiRtcH015t.mjs} +162 -156
- package/browser/esm/Dt47Huh1l3C4_5_w.mjs +87 -0
- package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
- package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
- package/browser/esm/{DHY19rkSiiRZxShC.mjs → DuuyN4-7K6_io2Py.mjs} +3 -3
- package/browser/esm/{yZxC4qUENOlMhVUH.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
- package/browser/esm/PY3Br5Bo_TxcCnCU.mjs +252 -0
- package/browser/esm/WIhvQtBkGiw-oFUs.mjs +2566 -0
- package/browser/esm/WgIvwAENeO8LANax.mjs +437 -0
- package/browser/esm/{DBtc4lku0uHVcqWn.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
- package/browser/esm/index.mjs +1053 -192
- package/browser/esm/jFRFCWlkD7Dsrhkh.mjs +236 -0
- package/browser/esm/lKXEDVt2ow1NlWJj.mjs +392 -0
- package/browser/esm/{Blaj2R5hYxtLAW__.mjs → oC0OwOddhOD0OoCJ.mjs} +6 -6
- package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
- package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → u84rSnESjxqB6gay.mjs} +1 -1
- package/licenses/dependencies.txt +94 -94
- package/node/esm/{BcwMb6CyVfvEwbHn.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
- package/node/esm/{CKu1AtRgyltyEdEN.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
- package/node/esm/{ETK6T6G0SIcFXDe5.mjs → BBGoyqs2L_ccSH1e.mjs} +40 -40
- package/node/esm/BLv99aovW4R3C5PE.mjs +515 -0
- package/node/esm/BUGU_5lUtnCRlp3n.mjs +519 -0
- package/node/esm/BalROFG_oa9PFs9Q.mjs +141 -0
- package/node/esm/{ah3CUg4-VmNstGk_.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
- package/node/esm/C3FCh9xju2SccUIE.mjs +1283 -0
- package/node/esm/{Bb1sLMqXWKjdve23.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
- package/node/esm/CKWeipCqqpLnLE5e.mjs +391 -0
- package/node/esm/CTnVNfz4eqFnM92M.mjs +212 -0
- package/node/esm/Cfi_ly8fBDZZdiZT.mjs +72 -0
- package/node/esm/CgKa6JuyJ1tTodev.mjs +1703 -0
- package/node/esm/{cqzp431iNSLWictb.mjs → Cq53M7bAUSXMNq1f.mjs} +22 -22
- package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
- package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
- package/node/esm/D72CupF9mfy2D1Xa.mjs +94 -0
- package/node/esm/{DNSjK5DAH3M14Qbc.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
- package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DJFkALt4XrwkMbnU.mjs} +163 -157
- package/node/esm/DJpwI8PlKBI2rk0r.mjs +319 -0
- package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DQaGPUYbgL4Y5YZW.mjs} +32 -30
- package/node/esm/{D9rzScOA9pEYFrtz.mjs → DsNYnq4NtYBxPmeA.mjs} +20 -20
- package/node/esm/DygDgOpa9sJ6YFVS.mjs +385 -0
- package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
- package/node/esm/M7YxvRPGCuxuk9aK.mjs +142 -0
- package/node/esm/QNjtpX8rIpqGGLEJ.mjs +1379 -0
- package/node/esm/{B_jRGdwGFkudwmL-.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
- package/node/esm/{ci8d-mF1H9wnYzix.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
- package/node/esm/dm8dmEaTIqfmgyeL.mjs +412 -0
- package/node/esm/{D6oQL8knsPpgdXuk.mjs → fmya3XQnTGyQisvT.mjs} +2 -2
- package/node/esm/gPYAb_A0T5ZwcQ1E.mjs +318 -0
- package/node/esm/index.mjs +8915 -13417
- package/node/esm/wB8xMpyJ_NvE16yG.mjs +975 -0
- package/node/esm/zGAcd4Jr7wkvXDBS.mjs +197 -0
- package/package.json +9 -9
- package/resources/locales/de/groups.cmd.json +4 -0
- package/resources/locales/de/ui.msg.json +100 -1
- package/resources/locales/en/groups.cmd.json +4 -0
- package/resources/locales/en/ui.msg.json +100 -1
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
- package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/border/BorderTemplateIcon.d.ts +6 -1
- package/types/src/chart/ChartFormatPanel.d.ts +20 -0
- package/types/src/chart/ChartPlugin.d.ts +6 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/index.d.ts +1 -0
- package/types/src/comments/CommentCard.d.ts +2 -2
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
- package/types/src/conditions/ConditionEditor.d.ts +1 -1
- package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +2 -2
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/format/BorderPreview.d.ts +11 -4
- package/types/src/format/useFormatSelection.d.ts +4 -4
- package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
- package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
- package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
- package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
- package/types/src/index.d.ts +15 -6
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
- package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
- package/types/src/protection/index.d.ts +1 -1
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/StudioProps.d.ts +10 -10
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
- package/types/src/workbook/DefaultRenderers.d.ts +31 -19
- package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
- package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
- package/browser/esm/CtEFHbzYNvYjDYvi.mjs +0 -236
- package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
- package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
- package/node/esm/BYVLi0md4AYuDsB_.mjs +0 -236
- package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
- package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WorksheetElementProps, SheetTabProps, CommentCardRenderProps, HyperlinkCardRenderProps, TableToolbarRenderProps, OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
|
+
import { TooltipRenderProps } from '@sheetxl/grid-react';
|
|
3
4
|
import { AnimatedLoadingPanelProps, StackTraceErrorPanelProps } from '@sheetxl/utils-mui';
|
|
4
5
|
import { FormulaBarProps } from '../formulaBar';
|
|
5
6
|
import { ColumnMenuProps } from '../filter';
|
|
@@ -9,29 +10,40 @@ import { SheetsAllMenuProps, SheetTabMenuProps } from '../sheet';
|
|
|
9
10
|
import { WorkbookStripProps } from './WorkbookStrip';
|
|
10
11
|
import { WorkbookContextMenuProps } from './WorkbookContextMenu';
|
|
11
12
|
import { FillMenuProps } from './FillMenu';
|
|
13
|
+
/**
|
|
14
|
+
* The bubble of the grid's tooltips (a resize readout, a drag's destination, a range tip) in MUI's
|
|
15
|
+
* `Tooltip` look, so they match the toolbar's.
|
|
16
|
+
*/
|
|
17
|
+
export declare const defaultRenderTooltip: (props: TooltipRenderProps) => React.ReactNode;
|
|
12
18
|
/** The card of a threaded comment as it floats beside its cell. */
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
|
|
19
|
+
export declare const defaultRenderCommentCard: (props: CommentCardRenderProps) => React.ReactElement;
|
|
20
|
+
export declare const defaultRenderHyperlinkCard: (props: HyperlinkCardRenderProps) => React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* The toolbar at a hovered table's corner: the toolbar's own table split button — the quick press edits
|
|
23
|
+
* the table, the dropdown is the style gallery. With a single button the paper hugs it (no padding), so
|
|
24
|
+
* it reads as one floating button rather than a button inside a toolbar.
|
|
25
|
+
*/
|
|
26
|
+
export declare const TableToolbar: React.FC<TableToolbarRenderProps>;
|
|
27
|
+
export declare const defaultRenderTableToolbar: (props: TableToolbarRenderProps) => React.ReactElement;
|
|
16
28
|
/** The collapse / expand button of a row or column group, in the outline gutter. */
|
|
17
|
-
export declare const
|
|
29
|
+
export declare const defaultRenderOutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
18
30
|
/** A level button `1`..`n` of the outline. */
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
31
|
+
export declare const defaultRenderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
32
|
+
export declare const defaultRenderMovableMenu: (props: MovableContextMenuProps) => React.ReactElement;
|
|
33
|
+
export declare const defaultRenderFillMenu: (props: FillMenuProps) => React.ReactElement;
|
|
34
|
+
export declare const defaultRenderContextMenu: (props: WorkbookContextMenuProps) => React.ReactElement;
|
|
35
|
+
export declare const defaultRenderColumnMenu: (props: ColumnMenuProps) => React.ReactElement;
|
|
24
36
|
/**
|
|
25
37
|
* The formula bar for the studio's placement: the desktop bar above the grid, the mobile host when
|
|
26
38
|
* the bar sits at the bottom.
|
|
27
39
|
*/
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
40
|
+
export declare const defaultRenderFormulaBar: (props: FormulaBarProps) => React.ReactElement;
|
|
41
|
+
export declare const defaultRenderWorkbookLoading: (props: AnimatedLoadingPanelProps) => React.ReactElement;
|
|
42
|
+
export declare const defaultRenderWorkbookError: (props: StackTraceErrorPanelProps) => React.ReactElement;
|
|
43
|
+
export declare const defaultRenderWorksheet: (props: WorksheetElementProps) => React.ReactElement;
|
|
44
|
+
export declare const defaultRenderStatusBar: (props: StatusBarProps) => React.ReactElement;
|
|
45
|
+
export declare const defaultRenderTabs: (props: WorkbookStripProps) => React.ReactElement;
|
|
46
|
+
export declare const defaultRenderSheetTabMenu: (props: SheetTabMenuProps) => React.ReactElement;
|
|
47
|
+
export declare const defaultRenderSheetsAll: (props: SheetsAllMenuProps) => React.ReactElement;
|
|
48
|
+
export declare const defaultRenderSheetTab: (props: SheetTabProps) => React.ReactElement;
|
|
37
49
|
//# sourceMappingURL=DefaultRenderers.d.ts.map
|
|
@@ -9,5 +9,9 @@ export interface WorkbookContextMenuProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
floatReference: FloatReference;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The grid's context menu. It acts on the selected worksheet's selection, so it shows nothing while
|
|
14
|
+
* the active tab is a sheet of another kind.
|
|
15
|
+
*/
|
|
12
16
|
export declare const WorkbookContextMenu: React.FC<WorkbookContextMenuProps>;
|
|
13
17
|
//# sourceMappingURL=WorkbookContextMenu.d.ts.map
|
|
@@ -3,10 +3,11 @@ import { WorkbookElementProps, IWorkbookElement } from '@sheetxl/react';
|
|
|
3
3
|
* The MUI workbook element.
|
|
4
4
|
*
|
|
5
5
|
* A thin wrapper around the chromeless `WorkbookElement` from `@sheetxl/react`: it supplies the grid's
|
|
6
|
-
* own MUI popups (tabs, context/column/movable menus, comment cards, loading) via the render
|
|
7
|
-
*
|
|
8
|
-
* the
|
|
9
|
-
*
|
|
6
|
+
* own MUI popups (tabs, context/column/movable menus, comment cards, loading, tooltips) via the render
|
|
7
|
+
* slots. A slot left `undefined` gets the MUI default; `null` turns it off. Theming flows through the
|
|
8
|
+
* injected `--sxl-*` token matrix (from the studio root) — no theme bridge is needed here; the grid
|
|
9
|
+
* self-sources its light/dark scheme from the shared appearance preference. The surrounding chrome
|
|
10
|
+
* (toolbar, formula bar, status bar) is composed by the Studio layer, not here.
|
|
10
11
|
*/
|
|
11
12
|
export declare const WorkbookElement: import('react').NamedExoticComponent<Omit<WorkbookElementProps, "ref"> & import('react').RefAttributes<IWorkbookElement>>;
|
|
12
13
|
//# sourceMappingURL=WorkbookElement.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { RenderSlotFn } from '@sheetxl/utils-react';
|
|
2
3
|
import { WorkbookStripProps as ReactWorkbookStripProps, WorkbookStripRef, SheetTabProps } from '@sheetxl/react';
|
|
3
4
|
import { SheetsAllMenuProps, SheetTabMenuProps } from '../sheet';
|
|
4
5
|
/**
|
|
@@ -11,27 +12,27 @@ export interface WorkbookStripProps extends Omit<ReactWorkbookStripProps, 'rende
|
|
|
11
12
|
/**
|
|
12
13
|
* Allow for customizations on the per-tab context menu.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
propsSheetTabMenu?: Partial<SheetTabMenuProps>;
|
|
15
16
|
/**
|
|
16
|
-
* Render
|
|
17
|
+
* Render the per-tab context menu. `null` for none.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
renderSheetTabMenu?: RenderSlotFn<SheetTabMenuProps> | null;
|
|
19
20
|
/**
|
|
20
21
|
* Allow for customizations on the "all sheets" menu.
|
|
21
22
|
*/
|
|
22
23
|
propsSheetsAll?: SheetsAllMenuProps;
|
|
23
24
|
/**
|
|
24
|
-
* Render
|
|
25
|
+
* Render the "all sheets" menu.
|
|
25
26
|
*/
|
|
26
|
-
renderSheetsAll?:
|
|
27
|
+
renderSheetsAll?: RenderSlotFn<SheetsAllMenuProps>;
|
|
27
28
|
/**
|
|
28
29
|
* Allow for customizations on sheet tabs.
|
|
29
30
|
*/
|
|
30
31
|
propsSheetTab?: Partial<SheetTabProps>;
|
|
31
32
|
/**
|
|
32
|
-
* Render custom sheet tabs. Defaults to the MUI ripple tab ({@link
|
|
33
|
+
* Render custom sheet tabs. Defaults to the MUI ripple tab ({@link defaultRenderSheetTab}).
|
|
33
34
|
*/
|
|
34
|
-
renderSheetTab?:
|
|
35
|
+
renderSheetTab?: RenderSlotFn<SheetTabProps>;
|
|
35
36
|
}
|
|
36
37
|
export declare const WorkbookStrip: React.NamedExoticComponent<WorkbookStripProps & React.RefAttributes<WorkbookStripRef>>;
|
|
37
38
|
//# sourceMappingURL=WorkbookStrip.d.ts.map
|
|
@@ -4,5 +4,5 @@ export * from './DocumentTitle';
|
|
|
4
4
|
export * from './WorkbookContextMenu';
|
|
5
5
|
export * from './FillMenu';
|
|
6
6
|
export * from './WorkbookStrip';
|
|
7
|
-
export
|
|
7
|
+
export * from './DefaultRenderers';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.10
|
|
3
|
-
*
|
|
4
|
-
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { t as e } from "./5cbK03T_Oh3tNdR7.mjs";
|
|
8
|
-
import { t } from "./B1Yp_uy1vFHcJB3U.mjs";
|
|
9
|
-
import { useInputField as n } from "@sheetxl/react";
|
|
10
|
-
import { DynamicIcon as r, useTextSelectionDrag as i, useTranslator as a } from "@sheetxl/utils-react";
|
|
11
|
-
import { forwardRef as o, memo as s, useEffect as c, useImperativeHandle as l, useMemo as u, useRef as d } from "react";
|
|
12
|
-
import { ExhibitIconButton as f } from "@sheetxl/utils-mui";
|
|
13
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
|
-
import { FormControl as h, InputAdornment as g, TextField as _ } from "@mui/material";
|
|
15
|
-
var v = (e) => {
|
|
16
|
-
e.button === 0 && e.preventDefault();
|
|
17
|
-
}, y = s(o((o, s) => {
|
|
18
|
-
let { disabled: y, className: b, sx: x, defaultInput: S, value: C, formName: w, formOptions: T, onChangeInput: E, onChangeText: D, onDone: O, changeOn: k, onValidate: A, apiRef: j, label: M, helperText: N, showError: P = !0, onChangeError: F, hideAdornment: I, propsInput: L, onKeyDown: R, onFocus: z, ...B } = o, V = a(), H = i(), U = M ?? V("namedInput.label"), W = t(), G = w && W ? W.register(w, T) : null, K = n({
|
|
19
|
-
value: C ?? "",
|
|
20
|
-
onChange: E,
|
|
21
|
-
onChangeText: D,
|
|
22
|
-
onDone: O,
|
|
23
|
-
changeOn: k,
|
|
24
|
-
onValidate: A,
|
|
25
|
-
disabled: y
|
|
26
|
-
});
|
|
27
|
-
l(j, () => K, [K]);
|
|
28
|
-
let q = d(W);
|
|
29
|
-
q.current = W;
|
|
30
|
-
let J = d(F);
|
|
31
|
-
J.current = F;
|
|
32
|
-
let Y = d(null);
|
|
33
|
-
c(() => {
|
|
34
|
-
if (K.error === Y.current || (Y.current = K.error, J.current?.(K.error), !w)) return;
|
|
35
|
-
let e = q.current;
|
|
36
|
-
e && (K.error ? e.setError(w, { message: V(K.error) }) : e.clearErrors(w));
|
|
37
|
-
}, [K.error, w]);
|
|
38
|
-
let X = k === "done", Z = K.engaged && K.dirty, Q = u(() => {
|
|
39
|
-
if (!I && X) return m(g, {
|
|
40
|
-
tabIndex: -1,
|
|
41
|
-
onMouseDown: v,
|
|
42
|
-
"aria-hidden": !Z,
|
|
43
|
-
sx: {
|
|
44
|
-
display: "flex",
|
|
45
|
-
position: "relative",
|
|
46
|
-
flex: "0",
|
|
47
|
-
...Z ? null : {
|
|
48
|
-
visibility: "hidden",
|
|
49
|
-
pointerEvents: "none"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
position: "end",
|
|
53
|
-
children: [p(f, {
|
|
54
|
-
dense: !0,
|
|
55
|
-
outlined: !1,
|
|
56
|
-
color: "primary",
|
|
57
|
-
"aria-label": "commit-input",
|
|
58
|
-
icon: p(r, { iconKey: "CheckSuccess" }),
|
|
59
|
-
propsTooltip: {
|
|
60
|
-
label: V("referenceInput.commit"),
|
|
61
|
-
simple: !0
|
|
62
|
-
},
|
|
63
|
-
disabled: !!K.error,
|
|
64
|
-
tabIndex: -1,
|
|
65
|
-
onMouseDown: v,
|
|
66
|
-
onClick: () => {
|
|
67
|
-
K.commit();
|
|
68
|
-
}
|
|
69
|
-
}), p(f, {
|
|
70
|
-
dense: !0,
|
|
71
|
-
outlined: !1,
|
|
72
|
-
color: "warning",
|
|
73
|
-
"aria-label": "cancel-input",
|
|
74
|
-
icon: p(r, { iconKey: "CloseError" }),
|
|
75
|
-
propsTooltip: {
|
|
76
|
-
label: V("referenceInput.cancel"),
|
|
77
|
-
simple: !0
|
|
78
|
-
},
|
|
79
|
-
tabIndex: -1,
|
|
80
|
-
onMouseDown: v,
|
|
81
|
-
onClick: () => {
|
|
82
|
-
K.cancel();
|
|
83
|
-
}
|
|
84
|
-
})]
|
|
85
|
-
});
|
|
86
|
-
}, [
|
|
87
|
-
I,
|
|
88
|
-
X,
|
|
89
|
-
Z,
|
|
90
|
-
K.commit,
|
|
91
|
-
K.cancel,
|
|
92
|
-
!!K.error
|
|
93
|
-
]);
|
|
94
|
-
return p(h, {
|
|
95
|
-
sx: {
|
|
96
|
-
minWidth: 135,
|
|
97
|
-
width: "100%",
|
|
98
|
-
...x
|
|
99
|
-
},
|
|
100
|
-
size: "small",
|
|
101
|
-
ref: s,
|
|
102
|
-
className: e("sxl-input-field", b),
|
|
103
|
-
...B,
|
|
104
|
-
children: p(_, {
|
|
105
|
-
label: U,
|
|
106
|
-
placeholder: S,
|
|
107
|
-
disabled: y,
|
|
108
|
-
error: !!K.error,
|
|
109
|
-
helperText: K.error && P ? V(K.error) : N === void 0 ? " " : N,
|
|
110
|
-
sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
|
|
111
|
-
slotProps: {
|
|
112
|
-
input: { endAdornment: Q },
|
|
113
|
-
inputLabel: { shrink: !0 },
|
|
114
|
-
htmlInput: {
|
|
115
|
-
spellCheck: !1,
|
|
116
|
-
autoComplete: "off",
|
|
117
|
-
onPointerDown: H.onPointerDown,
|
|
118
|
-
onDragStart: H.onDragStart,
|
|
119
|
-
...L,
|
|
120
|
-
className: e("autoFocus", L?.className),
|
|
121
|
-
name: w,
|
|
122
|
-
readOnly: y,
|
|
123
|
-
sx: {
|
|
124
|
-
paddingTop: (e) => e.spacing(1.25),
|
|
125
|
-
paddingBottom: (e) => e.spacing(.75)
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
value: K.inputProps.value,
|
|
130
|
-
inputRef: (e) => {
|
|
131
|
-
K.inputProps.ref(e), G?.ref && G.ref(e);
|
|
132
|
-
},
|
|
133
|
-
onChange: (e) => {
|
|
134
|
-
K.inputProps.onChange(e), G?.onChange(e);
|
|
135
|
-
},
|
|
136
|
-
onKeyDown: (e) => {
|
|
137
|
-
K.inputProps.onKeyDown(e), e.defaultPrevented || R?.(e);
|
|
138
|
-
},
|
|
139
|
-
onFocus: (e) => {
|
|
140
|
-
K.inputProps.onFocus(e), z?.(e);
|
|
141
|
-
},
|
|
142
|
-
onBlur: (e) => {
|
|
143
|
-
K.inputProps.onBlur(e), G?.onBlur(e);
|
|
144
|
-
},
|
|
145
|
-
onContextMenu: (e) => {
|
|
146
|
-
e.stopPropagation();
|
|
147
|
-
}
|
|
148
|
-
})
|
|
149
|
-
});
|
|
150
|
-
}));
|
|
151
|
-
y.displayName = "InputField";
|
|
152
|
-
export { y as t };
|