dhx-react-suite 1.2.1 → 1.2.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/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { Context } from 'react';
2
2
  import { default as default_2 } from 'react';
3
+ import { ForwardRefExoticComponent } from 'react';
3
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
5
+ import { RefAttributes } from 'react';
4
6
  import { RefObject } from 'react';
5
7
 
6
8
  export declare function Button({ children, variant, size, icon, disabled, onClick, style, className, }: ButtonProps): JSX_2.Element;
@@ -494,7 +496,7 @@ export declare interface RibbonSubItem {
494
496
  onFocus?: (value: string) => void;
495
497
  }
496
498
 
497
- export declare function Richtext({ value, toolbar, menubar, fullscreenMode, layoutMode, imageUploadUrl, locale, defaultStyles, onChange, style, className, }: RichtextProps): JSX_2.Element;
499
+ export declare const Richtext: ForwardRefExoticComponent<RichtextProps & RefAttributes<RichtextRef>>;
498
500
 
499
501
  export declare type RichtextCustomButton = {
500
502
  type: "button";
@@ -511,24 +513,30 @@ export declare type RichtextLayoutMode = "classic" | "document";
511
513
  export declare interface RichtextProps {
512
514
  /** Initial HTML content */
513
515
  value?: string;
514
- /** Toolbar buttons list or false to hide. Defaults to full toolbar. */
516
+ /** Toolbar buttons list, true = full toolbar, false = hidden */
515
517
  toolbar?: boolean | Array<RichtextToolbarButton | RichtextCustomButton>;
516
- /** Show menu bar (File, Edit…). Default false. */
517
- menubar?: boolean;
518
518
  /** Start in fullscreen mode */
519
519
  fullscreenMode?: boolean;
520
520
  /** Editor layout mode */
521
521
  layoutMode?: RichtextLayoutMode;
522
- /** Server endpoint for image uploads */
522
+ /** Server endpoint for image uploads (reserved for future use) */
523
523
  imageUploadUrl?: string;
524
- /** Localisation object (use richtext.locales.de etc.) */
525
- locale?: Record<string, any>;
524
+ /** Localisation object */
525
+ locale?: Record<string, string>;
526
526
  /** Default text styles per block type */
527
527
  defaultStyles?: Record<string, Record<string, string>>;
528
528
  /** Fires on every content change with current HTML value */
529
529
  onChange?: (value: string) => void;
530
530
  style?: React.CSSProperties;
531
531
  className?: string;
532
+ /** Show menu bar — reserved, not yet implemented */
533
+ menubar?: boolean;
534
+ }
535
+
536
+ export declare interface RichtextRef {
537
+ getValue(): string;
538
+ setValue(html: string): void;
539
+ focus(): void;
532
540
  }
533
541
 
534
542
  export declare type RichtextToolbarButton = "undo" | "redo" | "style" | "font-family" | "font-size" | "bold" | "italic" | "underline" | "strike" | "subscript" | "superscript" | "text-color" | "background-color" | "align" | "indent" | "outdent" | "line-height" | "quote" | "bulleted-list" | "numbered-list" | "link" | "image" | "line" | "clear" | "print" | "fullscreen" | "mode" | "shortcuts" | "separator";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhx-react-suite",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "TypeScript ui-components",
5
5
  "type": "module",
6
6
  "main": "./dist/dhx-react-suite.umd.cjs",
@@ -35,19 +35,14 @@
35
35
  "peerDependencies": {
36
36
  "react": ">=17.0.0",
37
37
  "react-dom": ">=17.0.0",
38
- "recharts": ">=2.0.0",
39
- "@dhx/trial-richtext": ">=2.0.0"
38
+ "recharts": ">=2.0.0"
40
39
  },
41
40
  "peerDependenciesMeta": {
42
41
  "recharts": {
43
42
  "optional": true
44
- },
45
- "@dhx/trial-richtext": {
46
- "optional": true
47
43
  }
48
44
  },
49
45
  "devDependencies": {
50
- "@dhx/trial-richtext": "file:../../Downloads/richtext",
51
46
  "@testing-library/jest-dom": "^6.4.2",
52
47
  "@testing-library/react": "^14.2.2",
53
48
  "@types/react": "^18.2.67",