@myunisoft/design-system 1.3.4 → 1.4.0

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.
@@ -1,56 +0,0 @@
1
- import type { ItemPositionParams } from './Treeview/types';
2
- export type DocumentSection = {
3
- id: string;
4
- title: string;
5
- visible: boolean;
6
- parentId: string | null;
7
- sections?: DocumentSection[] | null;
8
- };
9
- export type DocumentComposerLabels = {
10
- /** Label for the "Create section" button */
11
- createSection?: string;
12
- /** Label for the "Rename" menu item */
13
- rename?: string;
14
- /** Label for the "Delete" menu item */
15
- delete?: string;
16
- /** Label for the "Create subsection" menu item */
17
- createSubsection?: string;
18
- /** Tooltip for hidden item */
19
- hiddenItemTooltip?: string;
20
- };
21
- export type DocumentComposerCustomProps = {
22
- /** Content displayed when there are no sections */
23
- noSectionsPlaceholder?: string | React.ReactNode;
24
- /** Show a loading state that prevents rendering the sections */
25
- isLoading?: boolean;
26
- /** Returns whether section title can be edited (double-click + "Renommer" menu). Defaults to `() => true`. */
27
- getSectionTitleChangePermission?: (section: DocumentSection) => boolean;
28
- /** Returns whether section can be deleted ("Supprimer" menu). Defaults to `() => true`. */
29
- getSectionDeletePermission?: (section: DocumentSection) => boolean;
30
- /** Returns whether section can be reordered via drag & drop. Defaults to `() => true`. */
31
- getSectionOrderChangePermission?: (section: DocumentSection) => boolean;
32
- /** Returns whether a section can be created under this section. Defaults to `() => true`. */
33
- getSectionCreatePermission?: (section: DocumentSection) => boolean;
34
- /** Returns whether section visibility can be toggled. Defaults to `() => true`. */
35
- getSectionVisibilityChangePermission?: (section: DocumentSection) => boolean;
36
- /** Tooltip text displayed when hovering a hidden section label (visible: false) */
37
- hiddenSectionTooltip?: string;
38
- /** Tooltip text displayed when hovering the visibility icon of a visible section */
39
- visibleIconTooltip?: string;
40
- /** Tooltip text displayed when hovering the visibility icon of a hidden section */
41
- hiddenIconTooltip?: string;
42
- /**
43
- * Determines if `targetSection` is a valid drop location for `draggedSection`.
44
- * When provided, invalid targets are visually greyed out during drag.
45
- * Defaults to () => true (all targets valid).
46
- * @param targetSection - The parent section where the item would be dropped, or `null` if dropping at root level.
47
- */
48
- isValidDropTarget?: (draggedSection: DocumentSection, targetSection: DocumentSection | null) => boolean;
49
- };
50
- export type DocumentComposerCallbacks = {
51
- onSectionOrderChange?: (params: ItemPositionParams) => void;
52
- onSectionTitleChange?: (sectionId: string, newTitle: string) => void;
53
- onSectionDelete?: (sectionId: string) => void;
54
- onSectionVisibilityChange?: (sectionId: string, visible: boolean) => void;
55
- onSectionCreate?: (parentId: string | null, title: string) => string | Promise<string>;
56
- };
@@ -1,3 +0,0 @@
1
- import type { ExportContentProps } from './types';
2
- declare const ExportContent: ({ exportFormats, onExport, title, selectFormatLabel, exportButtonLabel }: ExportContentProps) => import("react/jsx-runtime").JSX.Element;
3
- export default ExportContent;
@@ -1,9 +0,0 @@
1
- export declare const exportTitleSx: {
2
- margin: string;
3
- fontFamily: string;
4
- fontWeight: number;
5
- fontSize: string;
6
- lineHeight: number;
7
- borderBottom: string;
8
- paddingBottom: string;
9
- };
@@ -1,30 +0,0 @@
1
- import { GridExportFormat } from "@mui/x-data-grid-pro";
2
- /**
3
- * Props for ExportContent component
4
- */
5
- export interface ExportContentProps {
6
- /**
7
- * Available export formats
8
- */
9
- exportFormats: GridExportFormat[];
10
- /**
11
- * Handler function called when export is triggered
12
- * @param format - Selected export format
13
- */
14
- onExport: (format: GridExportFormat) => void;
15
- /**
16
- * Optional title for the export dialog
17
- * @default 'Export'
18
- */
19
- title?: string;
20
- /**
21
- * Optional label for format selection
22
- * @default 'Select format:'
23
- */
24
- selectFormatLabel?: string;
25
- /**
26
- * Optional label for the export button
27
- * @default 'Export'
28
- */
29
- exportButtonLabel?: string;
30
- }