@flatbiz/antd 5.0.42 → 5.0.43
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/{color-picker-BYGCHXn2.js → color-picker-D8Tiiut0.js} +2 -2
- package/dist/{color-picker-BYGCHXn2.js.map → color-picker-D8Tiiut0.js.map} +1 -1
- package/dist/color-picker-wrapper/index.js +2 -2
- package/dist/copy-BbkSnxi9.js +93 -0
- package/dist/copy-BbkSnxi9.js.map +1 -0
- package/dist/copy-wrapper/index.d.ts +7 -1
- package/dist/copy-wrapper/index.js +4 -35
- package/dist/copy-wrapper/index.js.map +1 -1
- package/dist/delete-node/index.js +2 -2
- package/dist/{delete-node-BIETvJjg.js → delete-node-BXaXf6fO.js} +2 -2
- package/dist/{delete-node-BIETvJjg.js.map → delete-node-BXaXf6fO.js.map} +1 -1
- package/dist/dialog-drag-modal/index.js +2 -2
- package/dist/{drag-Dr-jbsnU.js → drag-Bn9b0R-o.js} +2 -2
- package/dist/{drag-Dr-jbsnU.js.map → drag-Bn9b0R-o.js.map} +1 -1
- package/dist/{drag-xBmmIPTD.js → drag-Dxvr0bSy.js} +2 -2
- package/dist/{drag-xBmmIPTD.js.map → drag-Dxvr0bSy.js.map} +1 -1
- package/dist/drag-editable-card/index.js +4 -4
- package/dist/drag-editable-table/index.js +2 -2
- package/dist/drag-editable-table-pro/index.js +2 -2
- package/dist/{drag-modal-CyiFlQrA.js → drag-modal-C3Azghu3.js} +14 -14
- package/dist/{drag-modal-CyiFlQrA.js.map → drag-modal-C3Azghu3.js.map} +1 -1
- package/dist/drag-table/index.js +2 -2
- package/dist/{drag-table-B5s0LEwN.js → drag-table-Dk8HllSn.js} +2 -2
- package/dist/{drag-table-B5s0LEwN.js.map → drag-table-Dk8HllSn.js.map} +1 -1
- package/dist/easy-table/index.js +1 -1
- package/dist/editable-card/index.js +3 -3
- package/dist/{editable-card-CnYsG1xL.js → editable-card-tyOSUivy.js} +2 -2
- package/dist/{editable-card-CnYsG1xL.js.map → editable-card-tyOSUivy.js.map} +1 -1
- package/dist/{editable-card-DdXga629.js → editable-card-zY9wCgE6.js} +4 -4
- package/dist/{editable-card-DdXga629.js.map → editable-card-zY9wCgE6.js.map} +1 -1
- package/dist/editable-field/index.js +2 -2
- package/dist/{editable-field-BH6M_S9W.js → editable-field-DBiVpCRE.js} +2 -2
- package/dist/{editable-field-BH6M_S9W.js.map → editable-field-DBiVpCRE.js.map} +1 -1
- package/dist/icon-wrapper/index.d.ts +1 -0
- package/dist/icon-wrapper/index.js +1 -1
- package/dist/{icon-wrapper-DfWj_rer.js → icon-wrapper-DE97bI14.js} +6 -2
- package/dist/icon-wrapper-DE97bI14.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +17 -32
- package/dist/index.js.map +1 -1
- package/dist/rich-text-viewer/index.js +2 -2
- package/dist/{rich-text-viewer-CPAJ3JD1.js → rich-text-viewer-FVi2i8nv.js} +2 -2
- package/dist/{rich-text-viewer-CPAJ3JD1.js.map → rich-text-viewer-FVi2i8nv.js.map} +1 -1
- package/dist/tree-modal/index.js +1 -1
- package/dist/tree-modal-selector/index.js +1 -1
- package/package.json +1 -1
- package/dist/copy-BQVsCFXm.js +0 -283
- package/dist/copy-BQVsCFXm.js.map +0 -1
- package/dist/icon-wrapper-DfWj_rer.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { Fragment } from 'react';
|
|
|
7
7
|
import { Popover, Tooltip } from 'antd';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
|
-
var _excluded = ["gap", "size", "hideHoverBgColor", "onClick", "className", "hidden", "style", "icon", "position", "text", "hoverTips", "tipsType"];
|
|
10
|
+
var _excluded = ["gap", "size", "hideHoverBgColor", "onClick", "className", "hidden", "style", "wrapperStyle", "icon", "position", "text", "hoverTips", "tipsType"];
|
|
11
11
|
var IconWrapper = function IconWrapper(props) {
|
|
12
12
|
var gap = props.gap,
|
|
13
13
|
size = props.size,
|
|
@@ -16,6 +16,7 @@ var IconWrapper = function IconWrapper(props) {
|
|
|
16
16
|
className = props.className,
|
|
17
17
|
hidden = props.hidden,
|
|
18
18
|
style = props.style,
|
|
19
|
+
wrapperStyle = props.wrapperStyle,
|
|
19
20
|
icon = props.icon,
|
|
20
21
|
position = props.position,
|
|
21
22
|
text = props.text,
|
|
@@ -59,6 +60,7 @@ var IconWrapper = function IconWrapper(props) {
|
|
|
59
60
|
if (tipsType === 'popover') {
|
|
60
61
|
return /*#__PURE__*/jsx("div", {
|
|
61
62
|
className: "icon-wrapper-wrapper",
|
|
63
|
+
style: wrapperStyle,
|
|
62
64
|
children: /*#__PURE__*/jsx(Popover, _objectSpread2(_objectSpread2({
|
|
63
65
|
content: hoverTips
|
|
64
66
|
}, otherProps), {}, {
|
|
@@ -68,6 +70,7 @@ var IconWrapper = function IconWrapper(props) {
|
|
|
68
70
|
}
|
|
69
71
|
return /*#__PURE__*/jsx("div", {
|
|
70
72
|
className: "icon-wrapper-wrapper",
|
|
73
|
+
style: wrapperStyle,
|
|
71
74
|
children: /*#__PURE__*/jsx(Tooltip, _objectSpread2(_objectSpread2({
|
|
72
75
|
title: hoverTips
|
|
73
76
|
}, otherProps), {}, {
|
|
@@ -77,9 +80,10 @@ var IconWrapper = function IconWrapper(props) {
|
|
|
77
80
|
}
|
|
78
81
|
return /*#__PURE__*/jsx("div", {
|
|
79
82
|
className: "icon-wrapper-wrapper",
|
|
83
|
+
style: wrapperStyle,
|
|
80
84
|
children: _content
|
|
81
85
|
});
|
|
82
86
|
};
|
|
83
87
|
|
|
84
88
|
export { IconWrapper as I };
|
|
85
|
-
//# sourceMappingURL=icon-wrapper-
|
|
89
|
+
//# sourceMappingURL=icon-wrapper-DE97bI14.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-wrapper-DE97bI14.js","sources":["@flatbiz/antd/src/icon-wrapper/icon-wrapper.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement, ReactNode } from 'react';\nimport { Fragment } from 'react';\nimport { Popover, Tooltip } from 'antd';\nimport { isUndefined } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport './style.less';\n\nexport type IconWrapperProps = {\n hoverTips?: string | ReactElement;\n /**\n * 提示类型\n * @default 'tooltip'\n */\n tipsType?: 'popover' | 'tooltip';\n icon?: ReactNode;\n style?: CSSProperties;\n wrapperStyle?: CSSProperties;\n text?: string | ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n onClick?: (event) => void;\n hideHoverBgColor?: boolean;\n hidden?: boolean;\n /** 图标对比文字的位置,默认:brefore */\n position?: 'before' | 'after';\n /** 图标与文字之间的间距 */\n gap?: number;\n};\nexport const IconWrapper = (props: IconWrapperProps) => {\n const {\n gap,\n size,\n hideHoverBgColor,\n onClick,\n className,\n hidden,\n style,\n wrapperStyle,\n icon,\n position,\n text,\n hoverTips,\n tipsType,\n ...otherProps\n } = props;\n const gapNew = isUndefined(gap) ? 5 : gap;\n const classNameNew = classNames(\n 'icon-wrapper',\n `icon-wrapper-${size || 'middle'}`,\n {\n 'icon-wrapper-hidden-hover-bgcolor': hideHoverBgColor,\n 'icon-wrapper-tigger': !!Object.keys(props).find((item) =>\n item.startsWith('on')\n ),\n },\n\n className\n );\n\n if (hidden) return <Fragment />;\n\n const _content =\n position === 'after' ? (\n <span\n className={classNameNew}\n style={style}\n onClick={onClick}\n {...otherProps}\n >\n {text ? (\n <span\n className=\"icon-wrapper-text\"\n style={icon ? { marginRight: gapNew } : {}}\n >\n {text}\n </span>\n ) : null}\n {icon}\n </span>\n ) : (\n <span\n className={classNameNew}\n style={style}\n onClick={onClick}\n {...otherProps}\n >\n {icon}\n {text ? (\n <span\n className=\"icon-wrapper-text\"\n style={icon ? { marginLeft: gapNew } : {}}\n >\n {text}\n </span>\n ) : null}\n </span>\n );\n if (hoverTips) {\n if (tipsType === 'popover') {\n return (\n <div className=\"icon-wrapper-wrapper\" style={wrapperStyle}>\n <Popover content={hoverTips} {...otherProps}>\n {_content}\n </Popover>\n </div>\n );\n }\n return (\n <div className=\"icon-wrapper-wrapper\" style={wrapperStyle}>\n <Tooltip title={hoverTips} {...otherProps}>\n {_content}\n </Tooltip>\n </div>\n );\n }\n return (\n <div className=\"icon-wrapper-wrapper\" style={wrapperStyle}>\n {_content}\n </div>\n );\n};\n"],"names":["IconWrapper","props","gap","size","hideHoverBgColor","onClick","className","hidden","style","wrapperStyle","icon","position","text","hoverTips","tipsType","otherProps","_objectWithoutProperties","_excluded","gapNew","_isUndefined","classNameNew","_classNames","concat","Object","keys","find","item","startsWith","_jsx","Fragment","_content","_jsxs","_objectSpread","children","marginRight","marginLeft","Popover","content","Tooltip","title"],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -877,7 +877,13 @@ export type CopyWrapperProps = {
|
|
|
877
877
|
copyAfterMsg?: string;
|
|
878
878
|
/** 复制鼠标悬浮提示 */
|
|
879
879
|
hoverTips?: string | ((trigger: any) => string);
|
|
880
|
+
/** 设置icon后失效 */
|
|
880
881
|
iconStyle?: CSSProperties;
|
|
882
|
+
/** 自定义文本,显示在复制按钮前 */
|
|
883
|
+
text?: ReactNode;
|
|
884
|
+
hiddenTips?: boolean;
|
|
885
|
+
/** 自定义复制前icon图标 */
|
|
886
|
+
icon?: ReactNode;
|
|
881
887
|
};
|
|
882
888
|
export declare const CopyWrapper: (props: CopyWrapperProps) => import("react").JSX.Element;
|
|
883
889
|
export type CssHoverProps = {
|
|
@@ -4072,6 +4078,7 @@ export type IconWrapperProps = {
|
|
|
4072
4078
|
tipsType?: "popover" | "tooltip";
|
|
4073
4079
|
icon?: ReactNode;
|
|
4074
4080
|
style?: CSSProperties;
|
|
4081
|
+
wrapperStyle?: CSSProperties;
|
|
4075
4082
|
text?: string | ReactElement;
|
|
4076
4083
|
className?: string;
|
|
4077
4084
|
size?: "small" | "middle" | "large";
|
package/dist/index.js
CHANGED
|
@@ -157,18 +157,18 @@ export { C as CardWrapper } from './card-wrapper-C8YADYlW.js';
|
|
|
157
157
|
export { C as CascaderWrapper } from './cascader-wrapper-BFCjHaa9.js';
|
|
158
158
|
export { CheckList } from './check-list/index.js';
|
|
159
159
|
export { C as CheckboxWrapper } from './checkbox-wrapper-BOIS5kIz.js';
|
|
160
|
-
export { C as ColorPickerWrapper } from './color-picker-
|
|
160
|
+
export { C as ColorPickerWrapper } from './color-picker-D8Tiiut0.js';
|
|
161
161
|
export { C as ConfigProviderWrapper } from './config-provider-wrapper-C72dPUJZ.js';
|
|
162
|
-
export { C as CopyWrapper } from './copy-
|
|
162
|
+
export { C as CopyWrapper } from './copy-BbkSnxi9.js';
|
|
163
163
|
export { C as CssNodeHover } from './css-node-hover-2asP-4iL.js';
|
|
164
164
|
export { D as DataRender } from './data-render-U7RkK7OY.js';
|
|
165
165
|
export { D as DatePickerWrapper } from './date-picker-wrapper-D0_g483p.js';
|
|
166
166
|
export { D as DateRangePickerWrapper } from './date-range-picker-wrapper-BYOsf0I5.js';
|
|
167
167
|
export { D as DateRangePickerWrapperFormItem } from './date-range-picker-wrapper-form-item-C_ClxVlZ.js';
|
|
168
|
-
export { D as DeleteNode } from './delete-node-
|
|
168
|
+
export { D as DeleteNode } from './delete-node-BXaXf6fO.js';
|
|
169
169
|
export { d as dialogAlert } from './dialog-alert-CDsZqePQ.js';
|
|
170
170
|
export { d as dialogConfirm } from './dialog-confirm-Dc6IMRm7.js';
|
|
171
|
-
export { d as dialogDragModal } from './drag-modal-
|
|
171
|
+
export { d as dialogDragModal } from './drag-modal-C3Azghu3.js';
|
|
172
172
|
export { d as dialogDrawer } from './dialog-drawer-JEjoR512.js';
|
|
173
173
|
export { D as DialogDrawerContent } from './content-B5Twifti.js';
|
|
174
174
|
export { d as dialogLoading } from './dialog-loading-Bm6n4_3R.js';
|
|
@@ -176,17 +176,17 @@ export { d as dialogModal } from './dialog-modal-DLWmy5GR.js';
|
|
|
176
176
|
export { d as dialogPreviewImage } from './preview-image-BCBOv4h_.js';
|
|
177
177
|
export { D as DragCollapse } from './drag-collapse-DhZ1V5P6.js';
|
|
178
178
|
export { D as DragCollapseFormList } from './drag-collapse-D2mbeDvD.js';
|
|
179
|
-
export { D as DragEditableCard } from './editable-card-
|
|
180
|
-
export { D as DragEditableTable } from './drag-
|
|
181
|
-
export { D as DragEditableTablePro } from './drag-
|
|
179
|
+
export { D as DragEditableCard } from './editable-card-zY9wCgE6.js';
|
|
180
|
+
export { D as DragEditableTable } from './drag-Bn9b0R-o.js';
|
|
181
|
+
export { D as DragEditableTablePro } from './drag-Dxvr0bSy.js';
|
|
182
182
|
export { D as DragFormList } from './drag-form-list-BrIW06Ex.js';
|
|
183
|
-
export { D as DragTable } from './drag-table-
|
|
183
|
+
export { D as DragTable } from './drag-table-Dk8HllSn.js';
|
|
184
184
|
export { D as DropdownMenuWrapper } from './dropdown-menu-wrapper-BE3Liqoh.js';
|
|
185
185
|
export { d as dynamicNode } from './dynamic-node-B_An5owN.js';
|
|
186
186
|
export { E as EasyForm } from './form-ByFljQr9.js';
|
|
187
187
|
export { EasyTable } from './easy-table/index.js';
|
|
188
|
-
export { E as EditableCard } from './editable-card-
|
|
189
|
-
export { E as EditableField } from './editable-field-
|
|
188
|
+
export { E as EditableCard } from './editable-card-tyOSUivy.js';
|
|
189
|
+
export { E as EditableField } from './editable-field-DBiVpCRE.js';
|
|
190
190
|
export { E as EditableFieldProvider } from './editable-field-provider-DqKcZQYP.js';
|
|
191
191
|
export { E as EditableTable } from './editable-table-Bsch15kT.js';
|
|
192
192
|
export { E as EditableTablePro } from './editable-table-pro-B12YG7J_.js';
|
|
@@ -209,7 +209,7 @@ export { F as FormListWrapper } from './form-list-wrapper-BTSuq_pI.js';
|
|
|
209
209
|
export { F as FormWrapper } from './form-wrapper-DBDMN0mN.js';
|
|
210
210
|
export { FullScreen } from './full-screen/index.js';
|
|
211
211
|
export { G as Gap } from './gap-5v_ndf2v.js';
|
|
212
|
-
export { I as IconWrapper } from './icon-wrapper-
|
|
212
|
+
export { I as IconWrapper } from './icon-wrapper-DE97bI14.js';
|
|
213
213
|
export { I as InputSearchWrapper } from './input-search-wrapper-dVFSFf3t.js';
|
|
214
214
|
export { I as InputTextAreaWrapper } from './input-text-area-wrapper-CRi9fWSJ.js';
|
|
215
215
|
export { I as InputWrapper } from './input-wrapper-hEJP2UIk.js';
|
|
@@ -233,7 +233,7 @@ export { R as RelationTree } from './relation-tree-BMas57Ck.js';
|
|
|
233
233
|
export { R as RequestStatus } from './request-status-5M9DP8-J.js';
|
|
234
234
|
export { R as ResizableDrawer } from './drawer-BITwshmb.js';
|
|
235
235
|
export { R as RichTextEditor } from './rich-text-editor-cqzUxX_s.js';
|
|
236
|
-
export { R as RichTextViewer } from './rich-text-viewer-
|
|
236
|
+
export { R as RichTextViewer } from './rich-text-viewer-FVi2i8nv.js';
|
|
237
237
|
export { R as RollLocationCenter } from './center-DgQUmnwe.js';
|
|
238
238
|
export { R as RollLocationInView } from './in-view-XeG6cIRO.js';
|
|
239
239
|
export { R as RuleDescribe } from './rule-describe-BkkX7ukt.js';
|
|
@@ -326,32 +326,16 @@ import 'dayjs/locale/zh-cn.js';
|
|
|
326
326
|
import '@ant-design/icons/es/icons/CopyOutlined.js';
|
|
327
327
|
import '@ant-design/icons/es/icons/CheckOutlined.js';
|
|
328
328
|
import 'copy-to-clipboard';
|
|
329
|
-
import '@dimjs/utils/json/parse';
|
|
330
|
-
import '@dimjs/utils/pick/pick';
|
|
331
|
-
import '@dimjs/utils/uri/param-str-to-json';
|
|
332
|
-
import '@flatbiz/antd';
|
|
333
|
-
import '@dimjs/utils/uri/modify-query-string';
|
|
334
|
-
import '@dimjs/utils/uri/uri-parse';
|
|
335
|
-
import 'react-is';
|
|
336
|
-
import 'react-dom/client';
|
|
337
|
-
import '@dimjs/utils/uri/get-query-string';
|
|
338
|
-
import '@wove/react/exception';
|
|
339
|
-
import '@dimjs/utils/tree/find-ancestors';
|
|
340
|
-
import '@dimjs/utils/env/get-env-name';
|
|
341
|
-
import '@ant-design/icons/es/icons/MenuFoldOutlined.js';
|
|
342
|
-
import '@ant-design/icons/es/icons/MenuUnfoldOutlined.js';
|
|
343
|
-
import '@ant-design/icons/es/icons/UserOutlined.js';
|
|
344
|
-
import '@ant-design/icons/es/icons/LogoutOutlined.js';
|
|
345
|
-
import '@ant-design/icons/es/icons/CaretDownOutlined.js';
|
|
346
|
-
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
347
|
-
import '@dimjs/utils/array/array-remove';
|
|
348
|
-
import '@dimjs/model-react';
|
|
349
329
|
import './time-Cv4_lLXu.js';
|
|
350
330
|
import '@ant-design/icons/es/icons/DeleteOutlined.js';
|
|
331
|
+
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
332
|
+
import 'react-dom/client';
|
|
351
333
|
import './_commonjsHelpers-nJh5OW6J.js';
|
|
334
|
+
import 'react-is';
|
|
352
335
|
import 'react-dom';
|
|
353
336
|
import './context-BjWI-TkR.js';
|
|
354
337
|
import './dom-DJxTwF3J.js';
|
|
338
|
+
import '@dimjs/utils/array/array-remove';
|
|
355
339
|
import '@dnd-kit/core';
|
|
356
340
|
import '@dnd-kit/sortable';
|
|
357
341
|
import '@ant-design/icons/es/icons/DragOutlined.js';
|
|
@@ -373,6 +357,7 @@ import 'react-resizable';
|
|
|
373
357
|
import '@tinymce/tinymce-react';
|
|
374
358
|
import '@ant-design/icons/es/icons/PlusCircleOutlined.js';
|
|
375
359
|
import '@ant-design/icons/es/icons/FullscreenOutlined.js';
|
|
360
|
+
import '@dimjs/model-react';
|
|
376
361
|
import '@dimjs/utils/json/sort';
|
|
377
362
|
import 'pubsub-js';
|
|
378
363
|
import 'react-split';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import './../rich-text-editor/index.css';
|
|
|
6
6
|
import './index.css';
|
|
7
7
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
8
8
|
|
|
9
|
-
export { R as RichTextViewer } from '../rich-text-viewer-
|
|
9
|
+
export { R as RichTextViewer } from '../rich-text-viewer-FVi2i8nv.js';
|
|
10
10
|
import '@ant-design/icons/es/icons/FullscreenOutlined.js';
|
|
11
11
|
import '@dimjs/utils/class-names/class-names';
|
|
12
12
|
import '@wove/react/hooks';
|
|
@@ -18,7 +18,7 @@ import '@flatbiz/utils';
|
|
|
18
18
|
import '../use-responsive-point-Bp3D3lZT.js';
|
|
19
19
|
import 'antd';
|
|
20
20
|
import '@dimjs/utils/uuid/uuid';
|
|
21
|
-
import '../icon-wrapper-
|
|
21
|
+
import '../icon-wrapper-DE97bI14.js';
|
|
22
22
|
import '@dimjs/lang/is-undefined';
|
|
23
23
|
import 'react/jsx-runtime';
|
|
24
24
|
import '../rich-text-editor-cqzUxX_s.js';
|
|
@@ -7,7 +7,7 @@ import { a as _slicedToArray } from './_rollupPluginBabelHelpers-BspM60Sw.js';
|
|
|
7
7
|
import { useState, useRef } from 'react';
|
|
8
8
|
import { useKeyPress } from 'ahooks';
|
|
9
9
|
import { fbaHooks } from './fba-hooks/index.js';
|
|
10
|
-
import { I as IconWrapper } from './icon-wrapper-
|
|
10
|
+
import { I as IconWrapper } from './icon-wrapper-DE97bI14.js';
|
|
11
11
|
import { R as RichTextEditor } from './rich-text-editor-cqzUxX_s.js';
|
|
12
12
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
13
|
|
|
@@ -77,4 +77,4 @@ var RichTextViewer = function RichTextViewer(props) {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
export { RichTextViewer as R };
|
|
80
|
-
//# sourceMappingURL=rich-text-viewer-
|
|
80
|
+
//# sourceMappingURL=rich-text-viewer-FVi2i8nv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-viewer-
|
|
1
|
+
{"version":3,"file":"rich-text-viewer-FVi2i8nv.js","sources":["@flatbiz/antd/src/rich-text-viewer/rich-text-viewer.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement } from 'react';\nimport { useRef, useState } from 'react';\nimport { useKeyPress } from 'ahooks';\nimport type { Editor as TinyMCEEditor } from 'tinymce';\nimport { FullscreenOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport { IconWrapper } from '../icon-wrapper/index.js';\nimport { RichTextEditor } from '../rich-text-editor/index.js';\nimport './style.less';\n\ntype RichTextViewerProps = {\n value: string;\n className?: string;\n style?: CSSProperties;\n fullscreen?: boolean;\n onInit?: (editor: TinyMCEEditor) => void;\n children?: ReactElement;\n fullscreenIconTips?: string;\n};\n\n/**\n * 预览 RichTextEditor 生成的富文本数据\n * ```\n * 1. 通过 onInit 属性可获取实例:editor\n * 2. 如果高度发生变更,可执行 editor.execCommand('mceAutoResize');\n *\n * ```\n * @param props\n * @returns\n */\nexport const RichTextViewer = (props: RichTextViewerProps) => {\n const [isFixed, setIsFixed] = useState(false);\n const editorRef = useRef<TinyMCEEditor>();\n\n useKeyPress(\n () => true,\n (event) => {\n if (event.type === 'keyup' && event.key === 'Escape' && isFixed) {\n setIsFixed(false);\n }\n },\n { events: ['keydown', 'keyup'] }\n );\n\n const onChangeFixed = hooks.useCallbackRef(() => {\n setIsFixed(!isFixed);\n });\n const onInit = hooks.useCallbackRef((_, editor: TinyMCEEditor) => {\n editorRef.current = editor;\n props.onInit?.(editor);\n });\n\n fbaHooks.useEffectCustom(() => {\n editorRef.current?.editorCommands.execCommand('mceAutoResize');\n }, [props.value]);\n\n return (\n <div\n className={classNames(\n 'fba-editor-viewer',\n { 'fba-editor-viewer-fixed': isFixed },\n props.className\n )}\n style={props.style}\n >\n {props.children}\n {props.fullscreen && props.value && (\n <div className=\"fba-editor-viewer-icon\">\n <IconWrapper\n hoverTips={props.fullscreenIconTips}\n icon={<FullscreenOutlined />}\n onClick={onChangeFixed}\n />\n </div>\n )}\n <RichTextEditor\n value={props.value}\n onInit={onInit}\n imgPreview\n disabled\n init={{\n plugins: 'autoresize',\n menubar: false,\n toolbar: '',\n statusbar: false,\n readonly: true,\n }}\n />\n </div>\n );\n};\n"],"names":["RichTextViewer","props","_useState","useState","_useState2","_slicedToArray","isFixed","setIsFixed","editorRef","useRef","useKeyPress","event","type","key","events","onChangeFixed","_hooks","useCallbackRef","onInit","_","editor","_props$onInit","current","call","fbaHooks","useEffectCustom","_editorRef$current","editorCommands","execCommand","value","_jsxs","className","_classNames","style","children","fullscreen","_jsx","IconWrapper","hoverTips","fullscreenIconTips","icon","_FullscreenOutlined","onClick","RichTextEditor","imgPreview","disabled","init","plugins","menubar","toolbar","statusbar","readonly"],"mappings":"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"}
|
package/dist/tree-modal/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { isObject } from '@dimjs/lang/is-object';
|
|
|
25
25
|
import { F as FlexLayout } from '../flex-layout-BGtMe7zr.js';
|
|
26
26
|
import _CloseOutlined from '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
27
27
|
import { C as CssNodeHover } from '../css-node-hover-2asP-4iL.js';
|
|
28
|
-
import { I as IconWrapper } from '../icon-wrapper-
|
|
28
|
+
import { I as IconWrapper } from '../icon-wrapper-DE97bI14.js';
|
|
29
29
|
import { T as TextOverflow } from '../text-overflow-C42UFIyh.js';
|
|
30
30
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
31
31
|
import { TreeWrapper } from '../tree-wrapper/index.js';
|
|
@@ -32,7 +32,7 @@ import '@dimjs/utils/class-names/class-names';
|
|
|
32
32
|
import 'react/jsx-runtime';
|
|
33
33
|
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
34
34
|
import '../css-node-hover-2asP-4iL.js';
|
|
35
|
-
import '../icon-wrapper-
|
|
35
|
+
import '../icon-wrapper-DE97bI14.js';
|
|
36
36
|
import '@dimjs/lang/is-undefined';
|
|
37
37
|
import '../text-overflow-C42UFIyh.js';
|
|
38
38
|
import '@dimjs/lang/is-string';
|
package/package.json
CHANGED
package/dist/copy-BQVsCFXm.js
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
2
|
-
|
|
3
|
-
import _CopyOutlined from '@ant-design/icons/es/icons/CopyOutlined.js';
|
|
4
|
-
import _CheckOutlined from '@ant-design/icons/es/icons/CheckOutlined.js';
|
|
5
|
-
import { a as _slicedToArray$1, b as _objectSpread2 } from './_rollupPluginBabelHelpers-BspM60Sw.js';
|
|
6
|
-
import { createContext, useContext, useState, useEffect, useMemo } from 'react';
|
|
7
|
-
import copy from 'copy-to-clipboard';
|
|
8
|
-
import { Layout } from 'antd';
|
|
9
|
-
import '@dimjs/utils/class-names/class-names';
|
|
10
|
-
import { getGlobalData } from '@flatbiz/utils';
|
|
11
|
-
import '@wove/react/hooks';
|
|
12
|
-
import { parse } from '@dimjs/utils/json/parse';
|
|
13
|
-
import '@dimjs/utils/pick/pick';
|
|
14
|
-
import '@dimjs/utils/uri/param-str-to-json';
|
|
15
|
-
import { jsx } from 'react/jsx-runtime';
|
|
16
|
-
import '@dimjs/lang/is-promise';
|
|
17
|
-
import '@flatbiz/antd';
|
|
18
|
-
import '@dimjs/utils/uri/modify-query-string';
|
|
19
|
-
import '@dimjs/utils/uri/uri-parse';
|
|
20
|
-
import '@dimjs/lang/is-array';
|
|
21
|
-
import '@dimjs/lang/is-undefined';
|
|
22
|
-
import 'react-is';
|
|
23
|
-
import { createCtx as createCtx$1 } from '@wove/react/create-ctx';
|
|
24
|
-
import 'react-dom/client';
|
|
25
|
-
import '@dimjs/utils/uri/get-query-string';
|
|
26
|
-
import '@dimjs/utils/extend/extend';
|
|
27
|
-
import '@dimjs/utils/get/get';
|
|
28
|
-
import '@dimjs/lang/is-string';
|
|
29
|
-
import '@wove/react/exception';
|
|
30
|
-
import '@dimjs/utils/tree/find-ancestors';
|
|
31
|
-
import '@dimjs/utils/env/get-env-name';
|
|
32
|
-
import '@dimjs/lang/is-plain-object';
|
|
33
|
-
import '@ant-design/icons/es/icons/MenuFoldOutlined.js';
|
|
34
|
-
import '@ant-design/icons/es/icons/MenuUnfoldOutlined.js';
|
|
35
|
-
import '@ant-design/icons/es/icons/UserOutlined.js';
|
|
36
|
-
import '@ant-design/icons/es/icons/LogoutOutlined.js';
|
|
37
|
-
import '@ant-design/icons/es/icons/CaretDownOutlined.js';
|
|
38
|
-
import '@ant-design/icons/es/icons/LoadingOutlined.js';
|
|
39
|
-
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
40
|
-
import '@ant-design/icons/es/icons/RedoOutlined.js';
|
|
41
|
-
import '@dimjs/utils/array/array-remove';
|
|
42
|
-
import { Model } from '@dimjs/model-react';
|
|
43
|
-
import { I as IconWrapper } from './icon-wrapper-DfWj_rer.js';
|
|
44
|
-
|
|
45
|
-
/* eslint-disable */
|
|
46
|
-
var message;
|
|
47
|
-
function _arrayLikeToArray(r, a) {
|
|
48
|
-
(null == a || a > r.length) && (a = r.length);
|
|
49
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
50
|
-
return n;
|
|
51
|
-
}
|
|
52
|
-
function _arrayWithHoles(r) {
|
|
53
|
-
if (Array.isArray(r)) return r;
|
|
54
|
-
}
|
|
55
|
-
function _classCallCheck(a, n) {
|
|
56
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
57
|
-
}
|
|
58
|
-
function _defineProperties(e, r) {
|
|
59
|
-
for (var t = 0; t < r.length; t++) {
|
|
60
|
-
var o = r[t];
|
|
61
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function _createClass(e, r, t) {
|
|
65
|
-
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
66
|
-
writable: false
|
|
67
|
-
}), e;
|
|
68
|
-
}
|
|
69
|
-
function _defineProperty(e, r, t) {
|
|
70
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
71
|
-
value: t,
|
|
72
|
-
enumerable: true,
|
|
73
|
-
configurable: true,
|
|
74
|
-
writable: true
|
|
75
|
-
}) : e[r] = t, e;
|
|
76
|
-
}
|
|
77
|
-
function _iterableToArrayLimit(r, l) {
|
|
78
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
79
|
-
if (null != t) {
|
|
80
|
-
var e,
|
|
81
|
-
n,
|
|
82
|
-
i,
|
|
83
|
-
u,
|
|
84
|
-
a = [],
|
|
85
|
-
f = true,
|
|
86
|
-
o = false;
|
|
87
|
-
try {
|
|
88
|
-
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
89
|
-
} catch (r) {
|
|
90
|
-
o = true, n = r;
|
|
91
|
-
} finally {
|
|
92
|
-
try {
|
|
93
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
94
|
-
} finally {
|
|
95
|
-
if (o) throw n;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return a;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
function _nonIterableRest() {
|
|
102
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
103
|
-
}
|
|
104
|
-
function _slicedToArray(r, e) {
|
|
105
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
106
|
-
}
|
|
107
|
-
function _toPrimitive(t, r) {
|
|
108
|
-
if ("object" != typeof t || !t) return t;
|
|
109
|
-
var e = t[Symbol.toPrimitive];
|
|
110
|
-
if (void 0 !== e) {
|
|
111
|
-
var i = e.call(t, r);
|
|
112
|
-
if ("object" != typeof i) return i;
|
|
113
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
114
|
-
}
|
|
115
|
-
return String(t);
|
|
116
|
-
}
|
|
117
|
-
function _toPropertyKey(t) {
|
|
118
|
-
var i = _toPrimitive(t, "string");
|
|
119
|
-
return "symbol" == typeof i ? i : i + "";
|
|
120
|
-
}
|
|
121
|
-
function _unsupportedIterableToArray(r, a) {
|
|
122
|
-
if (r) {
|
|
123
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
124
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
125
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* A helper to create a Context and Provider with no upfront default value, and
|
|
131
|
-
* without having to check for undefined all the time.
|
|
132
|
-
*/
|
|
133
|
-
function createCtx() {
|
|
134
|
-
var ctx = /*#__PURE__*/createContext(undefined);
|
|
135
|
-
function useCtx() {
|
|
136
|
-
var c = useContext(ctx);
|
|
137
|
-
if (c === undefined) throw new Error('useCtx must be inside a Provider with a value');
|
|
138
|
-
return c;
|
|
139
|
-
}
|
|
140
|
-
return [useCtx, ctx.Provider]; // 'as const' makes TypeScript infer a tuple
|
|
141
|
-
}
|
|
142
|
-
var _createCtx$1 = createCtx(),
|
|
143
|
-
_createCtx2$1 = _slicedToArray(_createCtx$1, 2);
|
|
144
|
-
_createCtx2$1[0];
|
|
145
|
-
_createCtx2$1[1];
|
|
146
|
-
var _createCtx3 = createCtx(),
|
|
147
|
-
_createCtx4 = _slicedToArray(_createCtx3, 2);
|
|
148
|
-
_createCtx4[0];
|
|
149
|
-
_createCtx4[1];
|
|
150
|
-
var IFrameEvents = /*#__PURE__*/function (IFrameEvents) {
|
|
151
|
-
/**
|
|
152
|
-
* 接收从子iframe通知过来的消息, 或者父window发出的通知的消息
|
|
153
|
-
*/
|
|
154
|
-
IFrameEvents["messageReceived"] = "messageReceived";
|
|
155
|
-
return IFrameEvents;
|
|
156
|
-
}({});
|
|
157
|
-
var IFRAME_EVENT_FLAG = "FLATBIZ-LAYOUT";
|
|
158
|
-
var IframeEventEmitter = /*#__PURE__*/function () {
|
|
159
|
-
function IframeEventEmitter() {
|
|
160
|
-
_classCallCheck(this, IframeEventEmitter);
|
|
161
|
-
_defineProperty(this, "events", {});
|
|
162
|
-
}
|
|
163
|
-
return _createClass(IframeEventEmitter, [{
|
|
164
|
-
key: "on",
|
|
165
|
-
value: function on(name, listener) {
|
|
166
|
-
if (!this.events[name]) {
|
|
167
|
-
this.events[name] = [];
|
|
168
|
-
}
|
|
169
|
-
this.events[name].push(listener);
|
|
170
|
-
return this;
|
|
171
|
-
}
|
|
172
|
-
}, {
|
|
173
|
-
key: "off",
|
|
174
|
-
value: function off(name, listenerToRemove) {
|
|
175
|
-
if (this.events[name]) {
|
|
176
|
-
this.events[name] = this.events[name].filter(function (listener) {
|
|
177
|
-
return listener !== listenerToRemove;
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
return this;
|
|
181
|
-
}
|
|
182
|
-
}, {
|
|
183
|
-
key: "emit",
|
|
184
|
-
value: function emit(name, data) {
|
|
185
|
-
var handlers = this.events[name] || [];
|
|
186
|
-
if (handlers.length) {
|
|
187
|
-
for (var index = 0; index < handlers.length; index++) {
|
|
188
|
-
var handler = handlers[index];
|
|
189
|
-
if (handler) {
|
|
190
|
-
handler(data);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return this;
|
|
195
|
-
}
|
|
196
|
-
}]);
|
|
197
|
-
}();
|
|
198
|
-
var iframeEvent = new IframeEventEmitter();
|
|
199
|
-
window.addEventListener('message', function (e) {
|
|
200
|
-
try {
|
|
201
|
-
var _parse = parse(e.data),
|
|
202
|
-
type = _parse.type,
|
|
203
|
-
data = _parse.data;
|
|
204
|
-
// 忽略框架外的消息通讯传递
|
|
205
|
-
if (type === IFRAME_EVENT_FLAG) {
|
|
206
|
-
iframeEvent.emit(IFrameEvents.messageReceived, data);
|
|
207
|
-
}
|
|
208
|
-
} catch (_error) {
|
|
209
|
-
/** */
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
var _createCtx = createCtx$1(),
|
|
213
|
-
_createCtx2 = _slicedToArray(_createCtx, 2);
|
|
214
|
-
_createCtx2[0];
|
|
215
|
-
_createCtx2[1];
|
|
216
|
-
var globalData = getGlobalData();
|
|
217
|
-
globalData.appName || 'flatbiz-layout';
|
|
218
|
-
Layout.Sider;
|
|
219
|
-
var defaultState = {
|
|
220
|
-
isDark: undefined
|
|
221
|
-
};
|
|
222
|
-
var ProLayoutModel = {
|
|
223
|
-
actions: {
|
|
224
|
-
onSetTheme: function onSetTheme(theme) {
|
|
225
|
-
return new Promise(function ($return, $error) {
|
|
226
|
-
return $return(function (state) {
|
|
227
|
-
state.isDark = theme === 'dark';
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
state: defaultState
|
|
233
|
-
};
|
|
234
|
-
Model({
|
|
235
|
-
ProLayoutModel: ProLayoutModel
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
var CopyWrapper = function CopyWrapper(props) {
|
|
239
|
-
var _useState = useState(false),
|
|
240
|
-
_useState2 = _slicedToArray$1(_useState, 2),
|
|
241
|
-
trigger = _useState2[0],
|
|
242
|
-
setTrigger = _useState2[1];
|
|
243
|
-
var onClick = function onClick() {
|
|
244
|
-
if (trigger) return;
|
|
245
|
-
setTrigger(true);
|
|
246
|
-
var copyText = typeof props.copyText === 'function' ? props.copyText() : props.copyText;
|
|
247
|
-
copy(copyText);
|
|
248
|
-
if (props.copyAfterMsg) {
|
|
249
|
-
message.success(props.copyAfterMsg);
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
useEffect(function () {
|
|
253
|
-
if (trigger) {
|
|
254
|
-
setTimeout(function () {
|
|
255
|
-
setTrigger(false);
|
|
256
|
-
}, 1000);
|
|
257
|
-
}
|
|
258
|
-
}, [trigger]);
|
|
259
|
-
var hoverTips = useMemo(function () {
|
|
260
|
-
if (typeof props.hoverTips === 'function') {
|
|
261
|
-
return props.hoverTips(trigger);
|
|
262
|
-
}
|
|
263
|
-
if (props.hoverTips) return props.hoverTips;
|
|
264
|
-
return '复制';
|
|
265
|
-
}, [props, trigger]);
|
|
266
|
-
return /*#__PURE__*/jsx(IconWrapper, {
|
|
267
|
-
hoverTips: hoverTips,
|
|
268
|
-
text: trigger ? /*#__PURE__*/jsx(_CheckOutlined, {
|
|
269
|
-
style: _objectSpread2({
|
|
270
|
-
color: 'var(--color-primary)'
|
|
271
|
-
}, props.iconStyle)
|
|
272
|
-
}) : /*#__PURE__*/jsx(_CopyOutlined, {
|
|
273
|
-
style: _objectSpread2({
|
|
274
|
-
color: 'var(--color-primary)'
|
|
275
|
-
}, props.iconStyle)
|
|
276
|
-
}),
|
|
277
|
-
size: "small",
|
|
278
|
-
onClick: onClick
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
export { CopyWrapper as C };
|
|
283
|
-
//# sourceMappingURL=copy-BQVsCFXm.js.map
|