@cool-office/drawing-ui 0.0.0-stage → 1.2.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.
Files changed (155) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +40 -2
  3. package/lib/cjs/index.js +5691 -0
  4. package/lib/cjs/locale/ar-SA.js +110 -0
  5. package/lib/cjs/locale/ca-ES.js +110 -0
  6. package/lib/cjs/locale/de-DE.js +110 -0
  7. package/lib/cjs/locale/en-US.js +125 -0
  8. package/lib/cjs/locale/es-ES.js +110 -0
  9. package/lib/cjs/locale/fa-IR.js +110 -0
  10. package/lib/cjs/locale/fr-FR.js +110 -0
  11. package/lib/cjs/locale/id-ID.js +110 -0
  12. package/lib/cjs/locale/it-IT.js +110 -0
  13. package/lib/cjs/locale/ja-JP.js +110 -0
  14. package/lib/cjs/locale/ko-KR.js +110 -0
  15. package/lib/cjs/locale/pl-PL.js +110 -0
  16. package/lib/cjs/locale/pt-BR.js +110 -0
  17. package/lib/cjs/locale/ru-RU.js +110 -0
  18. package/lib/cjs/locale/sk-SK.js +110 -0
  19. package/lib/cjs/locale/vi-VN.js +110 -0
  20. package/lib/cjs/locale/zh-CN.js +110 -0
  21. package/lib/cjs/locale/zh-HK.js +110 -0
  22. package/lib/cjs/locale/zh-TW.js +110 -0
  23. package/lib/es/index.js +5637 -0
  24. package/lib/es/locale/ar-SA.js +110 -0
  25. package/lib/es/locale/ca-ES.js +110 -0
  26. package/lib/es/locale/de-DE.js +110 -0
  27. package/lib/es/locale/en-US.js +125 -0
  28. package/lib/es/locale/es-ES.js +110 -0
  29. package/lib/es/locale/fa-IR.js +110 -0
  30. package/lib/es/locale/fr-FR.js +110 -0
  31. package/lib/es/locale/id-ID.js +110 -0
  32. package/lib/es/locale/it-IT.js +110 -0
  33. package/lib/es/locale/ja-JP.js +110 -0
  34. package/lib/es/locale/ko-KR.js +110 -0
  35. package/lib/es/locale/pl-PL.js +110 -0
  36. package/lib/es/locale/pt-BR.js +110 -0
  37. package/lib/es/locale/ru-RU.js +110 -0
  38. package/lib/es/locale/sk-SK.js +110 -0
  39. package/lib/es/locale/vi-VN.js +110 -0
  40. package/lib/es/locale/zh-CN.js +110 -0
  41. package/lib/es/locale/zh-HK.js +110 -0
  42. package/lib/es/locale/zh-TW.js +110 -0
  43. package/lib/index.css +738 -0
  44. package/lib/index.js +5637 -0
  45. package/lib/locale/ar-SA.js +110 -0
  46. package/lib/locale/ca-ES.js +110 -0
  47. package/lib/locale/de-DE.js +110 -0
  48. package/lib/locale/en-US.js +125 -0
  49. package/lib/locale/es-ES.js +110 -0
  50. package/lib/locale/fa-IR.js +110 -0
  51. package/lib/locale/fr-FR.js +110 -0
  52. package/lib/locale/id-ID.js +110 -0
  53. package/lib/locale/it-IT.js +110 -0
  54. package/lib/locale/ja-JP.js +110 -0
  55. package/lib/locale/ko-KR.js +110 -0
  56. package/lib/locale/pl-PL.js +110 -0
  57. package/lib/locale/pt-BR.js +110 -0
  58. package/lib/locale/ru-RU.js +110 -0
  59. package/lib/locale/sk-SK.js +110 -0
  60. package/lib/locale/vi-VN.js +110 -0
  61. package/lib/locale/zh-CN.js +110 -0
  62. package/lib/locale/zh-HK.js +110 -0
  63. package/lib/locale/zh-TW.js +110 -0
  64. package/lib/types/commands/operations/drawing-align.operation.d.ts +43 -0
  65. package/lib/types/commands/operations/drawing-arrange.operation.d.ts +29 -0
  66. package/lib/types/commands/operations/drawing-group.operation.d.ts +37 -0
  67. package/lib/types/commands/operations/image-crop.operation.d.ts +38 -0
  68. package/lib/types/commands/operations/image-reset-size.operation.d.ts +17 -0
  69. package/lib/types/config/config.d.ts +22 -0
  70. package/lib/types/controllers/components.controller.d.ts +24 -0
  71. package/lib/types/controllers/drawing-update.controller.d.ts +49 -0
  72. package/lib/types/controllers/image-cropper.controller.d.ts +51 -0
  73. package/lib/types/controllers/image-update.controller.d.ts +37 -0
  74. package/lib/types/controllers/mobile/components.controller.d.ts +20 -0
  75. package/lib/types/controllers/mobile/image-cropper.controller.d.ts +51 -0
  76. package/lib/types/controllers/mobile/image-update.controller.d.ts +39 -0
  77. package/lib/types/controllers/mobile/ui.controller.d.ts +27 -0
  78. package/lib/types/controllers/ui.controller.d.ts +25 -0
  79. package/lib/types/controllers/utils.d.ts +31 -0
  80. package/lib/types/index.d.ts +43 -0
  81. package/lib/types/locale/ar-SA.d.ts +18 -0
  82. package/lib/types/locale/ca-ES.d.ts +18 -0
  83. package/lib/types/locale/de-DE.d.ts +18 -0
  84. package/lib/types/locale/en-US.d.ts +126 -0
  85. package/lib/types/locale/es-ES.d.ts +18 -0
  86. package/lib/types/locale/fa-IR.d.ts +18 -0
  87. package/lib/types/locale/fr-FR.d.ts +18 -0
  88. package/lib/types/locale/id-ID.d.ts +18 -0
  89. package/lib/types/locale/it-IT.d.ts +18 -0
  90. package/lib/types/locale/ja-JP.d.ts +18 -0
  91. package/lib/types/locale/ko-KR.d.ts +18 -0
  92. package/lib/types/locale/pl-PL.d.ts +18 -0
  93. package/lib/types/locale/pt-BR.d.ts +18 -0
  94. package/lib/types/locale/ru-RU.d.ts +18 -0
  95. package/lib/types/locale/sk-SK.d.ts +18 -0
  96. package/lib/types/locale/types.d.ts +18 -0
  97. package/lib/types/locale/vi-VN.d.ts +18 -0
  98. package/lib/types/locale/zh-CN.d.ts +18 -0
  99. package/lib/types/locale/zh-HK.d.ts +18 -0
  100. package/lib/types/locale/zh-TW.d.ts +18 -0
  101. package/lib/types/menu/align.menu.d.ts +28 -0
  102. package/lib/types/menu/arrange.menu.d.ts +24 -0
  103. package/lib/types/menu/group.menu.d.ts +22 -0
  104. package/lib/types/menu/schema.d.ts +17 -0
  105. package/lib/types/mobile-plugin.d.ts +29 -0
  106. package/lib/types/plugin.d.ts +29 -0
  107. package/lib/types/services/drawing-image-clip.service.d.ts +48 -0
  108. package/lib/types/services/drawing-render.service.d.ts +52 -0
  109. package/lib/types/utils/clipboard-image.d.ts +25 -0
  110. package/lib/types/utils/config.d.ts +18 -0
  111. package/lib/types/utils/get-update-params.d.ts +19 -0
  112. package/lib/types/utils/image-crop-transform.d.ts +31 -0
  113. package/lib/types/utils/rotate-enabled.d.ts +19 -0
  114. package/lib/types/views/crop/MobileCropActions.d.ts +16 -0
  115. package/lib/types/views/crop/image-cropper-object.d.ts +49 -0
  116. package/lib/types/views/image-popup-menu/ImagePopupMenu.d.ts +46 -0
  117. package/lib/types/views/image-popup-menu/MobileImagePopupMenu.d.ts +26 -0
  118. package/lib/types/views/image-popup-menu/component-name.d.ts +17 -0
  119. package/lib/types/views/image-preview/mobile-image-preview-button.d.ts +37 -0
  120. package/lib/types/views/object-list-panel/MobileObjectListPanel.d.ts +17 -0
  121. package/lib/types/views/object-list-panel/ObjectListPanelBase.d.ts +174 -0
  122. package/lib/types/views/object-list-panel/object-list-panel-layer.d.ts +21 -0
  123. package/lib/types/views/panel/DrawingAlign.d.ts +21 -0
  124. package/lib/types/views/panel/DrawingArrange.d.ts +21 -0
  125. package/lib/types/views/panel/DrawingCommonPanel.d.ts +26 -0
  126. package/lib/types/views/panel/DrawingGroup.d.ts +21 -0
  127. package/lib/types/views/panel/DrawingTransform.d.ts +21 -0
  128. package/lib/types/views/panel/ImageCropper.d.ts +22 -0
  129. package/lib/types/views/panel/MobileDrawingArrange.d.ts +22 -0
  130. package/lib/types/views/panel/MobileDrawingControls.d.ts +32 -0
  131. package/lib/types/views/panel/MobileImageCropper.d.ts +17 -0
  132. package/lib/types/views/panel/component-name.d.ts +20 -0
  133. package/lib/types/views/panel/drawing-transform-rotation.d.ts +26 -0
  134. package/lib/types/views/panel/use-image-cropper.d.ts +31 -0
  135. package/lib/umd/index.js +13 -0
  136. package/lib/umd/locale/ar-SA.js +1 -0
  137. package/lib/umd/locale/ca-ES.js +1 -0
  138. package/lib/umd/locale/de-DE.js +1 -0
  139. package/lib/umd/locale/en-US.js +1 -0
  140. package/lib/umd/locale/es-ES.js +1 -0
  141. package/lib/umd/locale/fa-IR.js +1 -0
  142. package/lib/umd/locale/fr-FR.js +1 -0
  143. package/lib/umd/locale/id-ID.js +1 -0
  144. package/lib/umd/locale/it-IT.js +1 -0
  145. package/lib/umd/locale/ja-JP.js +1 -0
  146. package/lib/umd/locale/ko-KR.js +1 -0
  147. package/lib/umd/locale/pl-PL.js +1 -0
  148. package/lib/umd/locale/pt-BR.js +1 -0
  149. package/lib/umd/locale/ru-RU.js +1 -0
  150. package/lib/umd/locale/sk-SK.js +1 -0
  151. package/lib/umd/locale/vi-VN.js +1 -0
  152. package/lib/umd/locale/zh-CN.js +1 -0
  153. package/lib/umd/locale/zh-HK.js +1 -0
  154. package/lib/umd/locale/zh-TW.js +1 -0
  155. package/package.json +84 -3
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { ComponentProps, ComponentType, FocusEvent, KeyboardEvent, ReactNode } from 'react';
17
+ import { Input } from '@cool-office/design';
18
+ export interface IObjectListPanelCapabilities {
19
+ arrange?: boolean;
20
+ description?: boolean;
21
+ locate?: boolean;
22
+ name?: boolean;
23
+ reorder?: boolean;
24
+ selectable?: boolean;
25
+ visible?: boolean;
26
+ }
27
+ type ObjectListFilterMode = 'all' | 'hidden' | 'locked';
28
+ export interface IObjectListPanelItem {
29
+ id: string;
30
+ name: string;
31
+ description?: string;
32
+ visible: boolean;
33
+ selectable?: boolean;
34
+ disabled?: boolean;
35
+ level?: number;
36
+ isGroup?: boolean;
37
+ expanded?: boolean;
38
+ canMoveForward?: boolean;
39
+ canMoveBackward?: boolean;
40
+ canReorder?: boolean;
41
+ parentId?: string;
42
+ sectionId?: string;
43
+ sectionTitle?: string;
44
+ capabilities?: IObjectListPanelCapabilities;
45
+ }
46
+ export interface IObjectListPanelLabels {
47
+ title: string;
48
+ empty: string;
49
+ showAll: string;
50
+ hideAll: string;
51
+ lockAll?: string;
52
+ unlockAll?: string;
53
+ moveForward: string;
54
+ moveBackward: string;
55
+ close: string;
56
+ show: string;
57
+ hide: string;
58
+ lock: string;
59
+ unlock: string;
60
+ lockHint?: string;
61
+ unlockHint?: string;
62
+ name: string;
63
+ nameInput: string;
64
+ description: string;
65
+ descriptionPlaceholder: string;
66
+ details: string;
67
+ noSelection: string;
68
+ locate: string;
69
+ expand: string;
70
+ collapse: string;
71
+ dragToReorder: string;
72
+ search: string;
73
+ filterAll: string;
74
+ filterHidden: string;
75
+ filterLocked: string;
76
+ sectionCanvas: string;
77
+ sectionFloating: string;
78
+ }
79
+ export type ObjectListPanelTypeNameKey = 'chart' | 'connector' | 'container' | 'dom' | 'group' | 'image' | 'object' | 'placeholder' | 'shape' | 'smartArt' | 'table' | 'text' | 'unit' | 'video';
80
+ export interface IObjectListPanelBaseProps {
81
+ items: IObjectListPanelItem[];
82
+ selectedIds: string[];
83
+ allObjectIds?: string[];
84
+ allItems?: Pick<IObjectListPanelItem, 'id' | 'visible' | 'selectable' | 'disabled' | 'capabilities'>[];
85
+ focusedId?: string | null;
86
+ renderPermissionAction?: (item: IObjectListPanelItem) => ReactNode;
87
+ labels: IObjectListPanelLabels;
88
+ showHeader?: boolean;
89
+ capabilities?: IObjectListPanelCapabilities;
90
+ onSelect: (objectId: string, multiSelect: boolean) => void;
91
+ onSetVisible: (objectIds: string[], visible: boolean) => void;
92
+ onCommitName: (objectId: string, value: string) => void;
93
+ onCommitDescription: (objectId: string, value: string) => void;
94
+ onMoveForward?: (objectId: string) => void;
95
+ onMoveBackward?: (objectId: string) => void;
96
+ onToggleExpanded?: (objectId: string) => void;
97
+ onToggleSelectable?: (objectId: string) => void;
98
+ onSetSelectable?: (objectIds: string[], selectable: boolean) => void;
99
+ onLocate?: (objectId: string) => void;
100
+ onReorder?: (sourceObjectId: string, targetObjectId: string) => void;
101
+ }
102
+ export declare function hasCapability(panelCapabilities: IObjectListPanelCapabilities | undefined, item: Pick<IObjectListPanelItem, 'capabilities'> | null | undefined, key: keyof IObjectListPanelCapabilities, fallback?: boolean): boolean;
103
+ export declare function useObjectListPanel(props: IObjectListPanelBaseProps): {
104
+ selectedIdSet: Set<string>;
105
+ draggingId: string | null;
106
+ setDraggingId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
107
+ searchQuery: string;
108
+ setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
109
+ filterMode: ObjectListFilterMode;
110
+ setFilterMode: import("react").Dispatch<import("react").SetStateAction<ObjectListFilterMode>>;
111
+ collapsedSectionIds: Set<string>;
112
+ selectedItem: IObjectListPanelItem | null;
113
+ visibleItems: IObjectListPanelItem[];
114
+ visibleItemSections: {
115
+ id: string;
116
+ title: string;
117
+ items: IObjectListPanelItem[];
118
+ }[];
119
+ showSectionHeaders: boolean;
120
+ visibilityItems: Pick<IObjectListPanelItem, "id" | "disabled" | "selectable" | "visible" | "capabilities">[];
121
+ selectableItems: Pick<IObjectListPanelItem, "id" | "disabled" | "selectable" | "visible" | "capabilities">[];
122
+ allVisible: boolean;
123
+ allLocked: boolean;
124
+ canMoveForward: boolean;
125
+ canMoveBackward: boolean;
126
+ showArrangeControls: boolean;
127
+ showLocateControl: boolean;
128
+ canReorder: boolean;
129
+ handleDrop: (targetId: string) => void;
130
+ toggleSectionCollapsed: (sectionId: string) => void;
131
+ };
132
+ export declare function ObjectListPanelBase(props: IObjectListPanelBaseProps): import("react").JSX.Element;
133
+ export interface IObjectListRowProps {
134
+ permissionAction?: ReactNode;
135
+ item: IObjectListPanelItem;
136
+ selected: boolean;
137
+ labels: IObjectListPanelLabels;
138
+ showLock: boolean;
139
+ showName: boolean;
140
+ showVisible: boolean;
141
+ draggable: boolean;
142
+ dragging: boolean;
143
+ onSelect: (multiSelect: boolean) => void;
144
+ onToggleExpanded: () => void;
145
+ onToggleVisible: () => void;
146
+ onToggleSelectable: () => void;
147
+ onCommitName: (value: string) => void;
148
+ onDragStart: () => void;
149
+ onDragEnd: () => void;
150
+ onDrop: () => void;
151
+ }
152
+ export declare function ObjectDetailsEditor(props: {
153
+ item: IObjectListPanelItem | null;
154
+ InputComponent?: ComponentType<ComponentProps<typeof Input>>;
155
+ descriptionClassName?: string;
156
+ labels: IObjectListPanelLabels;
157
+ showName: boolean;
158
+ showDescription: boolean;
159
+ onCommitName: (value: string) => void;
160
+ onCommitDescription: (value: string) => void;
161
+ }): import("react").JSX.Element;
162
+ export type IDrawingObjectListItem = IObjectListPanelItem;
163
+ export type IDrawingObjectListPanelLabels = IObjectListPanelLabels;
164
+ export type IDrawingObjectListPanelProps = IObjectListPanelBaseProps;
165
+ export declare function useObjectListRow({ item, onCommitName }: Pick<IObjectListRowProps, 'item' | 'onCommitName'>): {
166
+ draftName: string;
167
+ setDraftName: import("react").Dispatch<import("react").SetStateAction<string>>;
168
+ disabled: boolean;
169
+ level: number;
170
+ locked: boolean;
171
+ handleBlur: (event: FocusEvent<HTMLInputElement>) => void;
172
+ handleKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
173
+ };
174
+ export {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { DrawingType } from '@cool-office/core';
17
+ export declare const OBJECT_LIST_FLOATING_SECTION_ID = "floating";
18
+ export declare const OBJECT_LIST_CANVAS_SECTION_ID = "canvas";
19
+ export type ObjectListPanelSectionId = typeof OBJECT_LIST_FLOATING_SECTION_ID | typeof OBJECT_LIST_CANVAS_SECTION_ID;
20
+ export declare function isFloatingObjectListDrawingType(drawingType: DrawingType | null | undefined): boolean;
21
+ export declare function getObjectListPanelSectionIdForDrawingType(drawingType: DrawingType | null | undefined): ObjectListPanelSectionId;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ export interface IDrawingAlignProps {
18
+ drawings: IDrawingParam[];
19
+ alignShow: boolean;
20
+ }
21
+ export declare const DrawingAlign: (props: IDrawingAlignProps) => import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ export interface IDrawingArrangeProps {
18
+ arrangeShow: boolean;
19
+ drawings: IDrawingParam[];
20
+ }
21
+ export declare const DrawingArrange: (props: IDrawingArrangeProps) => import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ export interface IDrawingCommonPanelProps {
18
+ drawings: IDrawingParam[];
19
+ hasArrange?: boolean;
20
+ hasTransform?: boolean;
21
+ hasAlign?: boolean;
22
+ hasCropper?: boolean;
23
+ hasGroup?: boolean;
24
+ onCropStart?: () => void;
25
+ }
26
+ export declare const DrawingCommonPanel: (props: IDrawingCommonPanelProps) => import("react").JSX.Element | null;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ export interface IDrawingGroupProps {
18
+ drawings: IDrawingParam[];
19
+ hasGroup: boolean;
20
+ }
21
+ export declare const DrawingGroup: (props: IDrawingGroupProps) => import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ export interface IDrawingTransformProps {
18
+ transformShow: boolean;
19
+ drawings: IDrawingParam[];
20
+ }
21
+ export declare const DrawingTransform: (props: IDrawingTransformProps) => import("react").JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ export interface IImageCropperProps {
18
+ drawings: IDrawingParam[];
19
+ cropperShow: boolean;
20
+ onCropStart?: () => void;
21
+ }
22
+ export declare const ImageCropper: (props: IImageCropperProps) => import("react").JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ interface IMobileDrawingArrangeProps {
18
+ arrangeShow: boolean;
19
+ drawings: IDrawingParam[];
20
+ }
21
+ export declare function MobileDrawingArrange(props: IMobileDrawingArrangeProps): import("react").JSX.Element;
22
+ export {};
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ interface IMobileDrawingTransformProps {
18
+ transformShow: boolean;
19
+ drawings: IDrawingParam[];
20
+ }
21
+ interface IMobileDrawingAlignProps {
22
+ drawings: IDrawingParam[];
23
+ alignShow: boolean;
24
+ }
25
+ interface IMobileDrawingGroupProps {
26
+ drawings: IDrawingParam[];
27
+ hasGroup: boolean;
28
+ }
29
+ export declare function MobileDrawingTransform(props: IMobileDrawingTransformProps): import("react").JSX.Element | null;
30
+ export declare function MobileDrawingAlign(props: IMobileDrawingAlignProps): import("react").JSX.Element;
31
+ export declare function MobileDrawingGroup(props: IMobileDrawingGroupProps): import("react").JSX.Element;
32
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IImageCropperProps } from './ImageCropper';
17
+ export declare function MobileImageCropper(props: IImageCropperProps): import("react").JSX.Element | null;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const DRAWING_ARRANGE_COMPONENT = "drawing-ui.arrange";
17
+ export declare const IMAGE_CROPPER_COMPONENT = "drawing-ui.cropper";
18
+ export declare const DRAWING_TRANSFORM_COMPONENT = "drawing-ui.transform";
19
+ export declare const DRAWING_ALIGN_COMPONENT = "drawing-ui.align";
20
+ export declare const DRAWING_GROUP_COMPONENT = "drawing-ui.group";
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDrawingParam } from '@cool-office/core';
17
+ interface IDrawingTransformRotationChangeHandlerOptions {
18
+ rotateEnabled: boolean;
19
+ drawingParam: Pick<IDrawingParam, 'unitId' | 'subUnitId' | 'drawingId' | 'drawingType'>;
20
+ setRotation: (rotation: number) => void;
21
+ emitUpdate: (updateParams: IDrawingParam[]) => void;
22
+ notifyChange: () => void;
23
+ }
24
+ export declare function isDrawingTransformRotationDisabled(rotateEnabled: boolean): boolean;
25
+ export declare function createDrawingTransformRotationChangeHandler(options: IDrawingTransformRotationChangeHandlerOptions): (val: number | null) => void;
26
+ export {};
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IImageCropperProps } from './ImageCropper';
17
+ import { LocaleService } from '@cool-office/core';
18
+ import { CropType } from '../../commands/operations/image-crop.operation';
19
+ export declare function useImageCropper(props: IImageCropperProps): {
20
+ drawingParam: import("@cool-office/core").IDrawingParam;
21
+ cropperShow: boolean;
22
+ localeService: LocaleService;
23
+ cropValue: CropType;
24
+ cropOptions: {
25
+ label: string;
26
+ value: CropType;
27
+ }[];
28
+ handleCropChange: (value: string | number | boolean) => void;
29
+ onCropperBtnClick: (val: CropType) => Promise<void>;
30
+ ShapeClipPicker: any;
31
+ };