@baohu/canvas-editor-ui 1.1.0 → 1.3.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.
@@ -12,6 +12,7 @@ export declare class EditorUI {
12
12
  private mode;
13
13
  private renderChange;
14
14
  constructor(container: HTMLElement, options?: IEditorUIOptions);
15
+ private registerControlContextMenu;
15
16
  private syncMode;
16
17
  getPageSize(): number;
17
18
  setMode(mode: EditorMode): void;
@@ -0,0 +1,61 @@
1
+ import { ControlType } from '@baohu/canvas-editor';
2
+ import type Editor from '@baohu/canvas-editor';
3
+ import type { IElement } from '@baohu/canvas-editor';
4
+ import type { ILocale } from '../locale';
5
+ type IControl = NonNullable<IElement['control']>;
6
+ export interface IControlPanelOptions {
7
+ editor: Editor;
8
+ locale: ILocale;
9
+ type?: ControlType;
10
+ controlId?: string;
11
+ control?: IControl;
12
+ }
13
+ export declare class ControlPanel {
14
+ private options;
15
+ private locale;
16
+ private isEdit;
17
+ private draft;
18
+ private originValue;
19
+ private originValueSets;
20
+ private activeTab;
21
+ private mask;
22
+ private container;
23
+ private tabs;
24
+ private body;
25
+ private error;
26
+ private keydownHandler;
27
+ private id;
28
+ constructor(options: IControlPanelOptions);
29
+ private createDraft;
30
+ private isOptionType;
31
+ private isMultiple;
32
+ private getValueSets;
33
+ private getValue;
34
+ private render;
35
+ private getTabList;
36
+ private renderContent;
37
+ private renderBasic;
38
+ private renderOption;
39
+ private renderRule;
40
+ private renderStyle;
41
+ private renderAdvanced;
42
+ private appendItem;
43
+ private appendGroup;
44
+ private appendTip;
45
+ private appendInput;
46
+ private appendSelect;
47
+ private appendSwitch;
48
+ private appendColor;
49
+ private appendField;
50
+ private appendDraftField;
51
+ private appendValidationField;
52
+ private appendJsonField;
53
+ private appendFlexDirection;
54
+ private appendValueSets;
55
+ private validate;
56
+ private getProperties;
57
+ private confirm;
58
+ close(): void;
59
+ private dispose;
60
+ }
61
+ export {};
@@ -1,6 +1,8 @@
1
1
  export { EditorUI, createEditorUI } from './EditorUI';
2
2
  export { Dialog } from './components/Dialog';
3
3
  export type { IDialogField, IDialogOptions, IDialogResult } from './components/Dialog';
4
+ export { ControlPanel } from './components/ControlPanel';
5
+ export type { IControlPanelOptions } from './components/ControlPanel';
4
6
  export { defaultLocale } from './locale';
5
7
  export type { ILocale } from './locale';
6
8
  export { DEFAULT_TOOLBAR, FONT_LIST, SIZE_LIST } from './toolbar/items';
@@ -36,7 +36,6 @@ export declare const defaultLocale: {
36
36
  hyperlinkUrl: string;
37
37
  separator: string;
38
38
  pageBreak: string;
39
- control: string;
40
39
  controlType: string;
41
40
  controlText: string;
42
41
  controlSelect: string;
@@ -46,8 +45,85 @@ export declare const defaultLocale: {
46
45
  controlNumber: string;
47
46
  controlPlaceholder: string;
48
47
  controlValueSets: string;
49
- controlValueSetsPlaceholder: string;
50
48
  controlDateFormat: string;
49
+ controlAdd: string;
50
+ controlProperty: string;
51
+ controlTabBasic: string;
52
+ controlTabOption: string;
53
+ controlTabRule: string;
54
+ controlTabStyle: string;
55
+ controlTabAdvanced: string;
56
+ controlTypeDisabled: string;
57
+ controlValue: string;
58
+ controlDefaultValue: string;
59
+ controlChecked: string;
60
+ controlConceptId: string;
61
+ controlGroupId: string;
62
+ controlGroupText: string;
63
+ controlPreText: string;
64
+ controlPostText: string;
65
+ controlPrefix: string;
66
+ controlPostfix: string;
67
+ controlGroupLayout: string;
68
+ controlMinWidth: string;
69
+ controlRowFlex: string;
70
+ controlIndentation: string;
71
+ controlIndentationRowStart: string;
72
+ controlIndentationValueStart: string;
73
+ controlDefault: string;
74
+ controlBorder: string;
75
+ controlMultiSelect: string;
76
+ controlMultiSelectDelimiter: string;
77
+ controlInputAble: string;
78
+ controlMarkType: string;
79
+ controlCheckboxMin: string;
80
+ controlCheckboxMax: string;
81
+ controlFlexDirection: string;
82
+ controlFlexRow: string;
83
+ controlFlexColumn: string;
84
+ controlValueSetValue: string;
85
+ controlValueSetCode: string;
86
+ controlValueSetCodePlaceholder: string;
87
+ controlAddValueSet: string;
88
+ controlRemove: string;
89
+ controlDateFormatTip: string;
90
+ controlCalculatorDisabled: string;
91
+ controlGroupRule: string;
92
+ controlDeletable: string;
93
+ controlDisabled: string;
94
+ controlPasteDisabled: string;
95
+ controlHide: string;
96
+ controlRequired: string;
97
+ controlGroupValidation: string;
98
+ controlMinLength: string;
99
+ controlMaxLength: string;
100
+ controlPattern: string;
101
+ controlMin: string;
102
+ controlMax: string;
103
+ controlInteger: string;
104
+ controlPrecision: string;
105
+ controlMinDate: string;
106
+ controlMaxDate: string;
107
+ controlMinChecked: string;
108
+ controlMaxChecked: string;
109
+ controlValidationMessage: string;
110
+ controlGroupValueStyle: string;
111
+ controlGroupBackground: string;
112
+ controlActiveBackground: string;
113
+ controlDisabledBackground: string;
114
+ controlExistValueBackground: string;
115
+ controlNoValueBackground: string;
116
+ controlUnset: string;
117
+ controlClear: string;
118
+ controlCompute: string;
119
+ controlComputeTip: string;
120
+ controlCascade: string;
121
+ controlExtension: string;
122
+ controlErrorJson: string;
123
+ controlErrorValueSetsEmpty: string;
124
+ controlErrorValueSetValue: string;
125
+ controlErrorValueSetCode: string;
126
+ controlErrorNumber: string;
51
127
  checkbox: string;
52
128
  checkboxCross: string;
53
129
  checkboxCheck: string;
@@ -80,6 +156,8 @@ export declare const defaultLocale: {
80
156
  modeForm: string;
81
157
  modePrint: string;
82
158
  modeDesign: string;
159
+ modeGraffiti: string;
160
+ modeTrace: string;
83
161
  fullscreen: string;
84
162
  };
85
163
  export type ILocale = typeof defaultLocale;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baohu/canvas-editor-ui",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Toolbar, statusbar and dialogs for @baohu/canvas-editor, framework-agnostic",
5
5
  "license": "MIT",
6
6
  "main": "./dist/canvas-editor-ui.umd.js",
@@ -30,7 +30,7 @@
30
30
  "@baohu/canvas-editor": ">=1.0.5-baohu.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@baohu/canvas-editor": "1.0.5-baohu.3",
33
+ "@baohu/canvas-editor": "1.0.5-baohu.5",
34
34
  "vite-plugin-css-injected-by-js": "^3.5.2"
35
35
  },
36
36
  "scripts": {