@para-ui/core 4.0.62 → 4.0.64

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.
@@ -23,7 +23,7 @@ import '../_verture/index-ca413216.js';
23
23
  * @date 2022/09/06 18:00
24
24
  * @description 存放富文本编辑器的一些默认配置
25
25
  */
26
- var TOOL_BAR_CONFIG = ['headerSelect', 'blockquote', '|', 'bold', 'underline', 'italic', {
26
+ const TOOL_BAR_CONFIG = ['headerSelect', 'blockquote', '|', 'bold', 'underline', 'italic', {
27
27
  key: 'group-more-style',
28
28
  title: '更多',
29
29
  iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',
@@ -59,8 +59,8 @@ var zh = {
59
59
  };
60
60
 
61
61
  var localeJson = {
62
- zh: zh,
63
- en: en
62
+ zh,
63
+ en
64
64
  };
65
65
 
66
66
  var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-text-editor.is-error .text-editor-content {\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-text-editor .w-e-max-length-info {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-text-editor .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item {\n padding-left: 0;\n padding-right: 0;\n display: flex;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button {\n flex: 1;\n display: flex;\n justify-content: flex-start;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v4-text-editor .text-editor-content {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v4-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false]:hover {\n cursor: not-allowed;\n}\n.paraui-v4-text-editor .preview-mode > div:nth-child(1) {\n border-bottom: none;\n}";
package/Upload/index.js CHANGED
@@ -22,9 +22,9 @@ import Image$1 from '../Image/index.js';
22
22
  import OperateBtn from '../OperateBtn/index.js';
23
23
  import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-5317fc89.js';
24
24
  import { UUID } from '@paraview/lib';
25
+ import { B as Button } from '../_verture/index-98ae8a30.js';
25
26
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
26
27
  import Forbid from '@para-ui/icons/Forbid';
27
- import { B as Button } from '../_verture/index-98ae8a30.js';
28
28
  import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
29
29
  import Cropper from 'react-easy-crop';
30
30
  import PlusCircle from '@para-ui/icons/PlusCircle';
@@ -148,7 +148,7 @@ var processUploadFiles = function processUploadFiles(maxAllowed, uploadedFiles,
148
148
  return _toConsumableArray(newUploadedFiles);
149
149
  };
150
150
 
151
- var css_248z$4 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午3:08\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-upload-list-text .upload-list-item {\n margin-top: 10px;\n position: relative;\n}\n.paraui-v4-upload-list-text .upload-list-item-info {\n display: flex;\n align-items: center;\n line-height: 30px;\n font-size: 14px;\n color: rgb(29, 33, 38);\n border-radius: 4px;\n transition: background-color 0.3s;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text {\n position: relative;\n display: inline-flex;\n align-items: center;\n width: 440px;\n height: 30px;\n background-color: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item {\n display: flex;\n align-items: center;\n flex: 1;\n padding-left: 10px;\n max-width: 76%;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item .upload-list-text-name {\n margin-left: 8px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item .upload-list-text-name {\n color: rgb(29, 33, 38);\n text-decoration: none;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item .upload-list-text-name:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item-error {\n color: rgb(244, 66, 66);\n cursor: pointer;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item-error .upload-list-text-name,\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item-error .upload-list-text-name:hover {\n color: rgb(244, 66, 66);\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon {\n line-height: 0;\n opacity: 1;\n transition: opacity 0.3s;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon svg {\n color: inherit;\n font-size: 18px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions svg {\n font-size: 18px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions svg:hover {\n background-color: rgb(234, 236, 241);\n border-radius: 2px;\n}\n.paraui-v4-upload-list-text .upload-list-item .upload-list-actions {\n margin-left: auto;\n margin-right: 10px;\n}\n.paraui-v4-upload-list-text .upload-list-item .upload-list-actions > span {\n display: flex;\n align-items: center;\n}\n.paraui-v4-upload-list-picture {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-error {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(246, 103, 103);\n border-radius: 4px;\n color: rgb(246, 103, 103);\n}\n.paraui-v4-upload-list-picture .upload-list-picture-error > svg {\n font-size: 30px;\n color: rgb(244, 66, 66);\n margin-bottom: 6px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-error-name {\n font-size: 14px;\n color: rgb(244, 66, 66);\n padding: 0 10px;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item {\n position: relative;\n display: inline-block;\n width: 100px;\n height: 100px;\n margin-right: 16px;\n border-radius: 4px;\n cursor: default;\n overflow: hidden;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item::before {\n content: \" \";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: rgba(29, 33, 38, 0.9);\n border-radius: 4px;\n opacity: 0;\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item img {\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-file {\n font-size: 100px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filea {\n fill: none;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-fileb {\n opacity: 0.4;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filec {\n fill: #2e65e6;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filed {\n fill: #5783eb;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filee {\n fill: #ffb900;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filef {\n fill: #fff;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-name {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0 10px;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n background-color: rgba(29, 33, 38, 0.9);\n border-radius: 0 0 4px 4px;\n color: rgb(255, 255, 255);\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n line-height: 0;\n cursor: pointer;\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions svg {\n color: rgb(255, 255, 255);\n transition: all 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions svg:hover {\n background-color: rgba(255, 255, 255, 0.3);\n border-radius: 2px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly)::before {\n opacity: 1;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly) .upload-list-actions {\n opacity: 1;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly) .upload-list-picture-name {\n opacity: 0;\n}\n\n.paraui-v4-upload-drag .paraui-v4-upload-list-text .upload-list-item-info .upload-list-text {\n width: 590px;\n}";
151
+ var css_248z$4 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/11 下午3:08\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-upload-list-text .upload-list-item {\n margin-top: 10px;\n position: relative;\n}\n.paraui-v4-upload-list-text .upload-list-item-info {\n display: flex;\n align-items: center;\n line-height: 30px;\n font-size: 14px;\n color: rgb(29, 33, 38);\n border-radius: 4px;\n transition: background-color 0.3s;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text {\n position: relative;\n display: inline-flex;\n align-items: center;\n width: 440px;\n height: 30px;\n background-color: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item {\n display: flex;\n align-items: center;\n flex: 1;\n padding-left: 10px;\n max-width: 76%;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item .upload-list-text-name {\n margin-left: 8px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item .upload-list-text-name {\n color: rgb(29, 33, 38);\n text-decoration: none;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item .upload-list-text-name:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item-error {\n color: rgb(244, 66, 66);\n cursor: pointer;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item-error .upload-list-text-name,\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-text-item-error .upload-list-text-name:hover {\n color: rgb(244, 66, 66);\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon {\n line-height: 0;\n opacity: 1;\n transition: opacity 0.3s;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-fileicon svg {\n color: inherit;\n font-size: 18px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions svg {\n font-size: 18px;\n}\n.paraui-v4-upload-list-text .upload-list-item-info .upload-list-text .upload-list-actions svg:hover {\n background-color: rgb(234, 236, 241);\n border-radius: 2px;\n}\n.paraui-v4-upload-list-text .upload-list-item .upload-list-actions {\n margin-left: auto;\n margin-right: 10px;\n}\n.paraui-v4-upload-list-text .upload-list-item .upload-list-actions > span {\n display: flex;\n align-items: center;\n}\n.paraui-v4-upload-list-picture {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-error {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(246, 103, 103);\n border-radius: 4px;\n color: rgb(246, 103, 103);\n}\n.paraui-v4-upload-list-picture .upload-list-picture-error > svg {\n font-size: 30px;\n color: rgb(244, 66, 66);\n margin-bottom: 6px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-error-name {\n font-size: 14px;\n color: rgb(244, 66, 66);\n padding: 0 10px;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item {\n position: relative;\n display: inline-block;\n width: 100px;\n height: 100px;\n margin-right: 16px;\n border-radius: 4px;\n cursor: default;\n overflow: hidden;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item::before {\n content: \" \";\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n background-color: rgba(29, 33, 38, 0.9);\n border-radius: 4px;\n opacity: 0;\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item img {\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-file {\n font-size: 100px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filea {\n fill: none;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-fileb {\n opacity: 0.4;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filec {\n fill: #2e65e6;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filed {\n fill: #5783eb;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filee {\n fill: #ffb900;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-filef {\n fill: #fff;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-picture-name {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0 10px;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n background-color: rgba(29, 33, 38, 0.9);\n border-radius: 0 0 4px 4px;\n color: rgb(255, 255, 255);\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n line-height: 0;\n transition: 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions svg {\n color: rgb(255, 255, 255);\n transition: all 0.3s;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions svg:hover {\n background-color: rgba(255, 255, 255, 0.3);\n border-radius: 2px;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item .upload-list-actions-delete-disabled svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly)::before {\n opacity: 1;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly) .upload-list-actions {\n opacity: 1;\n}\n.paraui-v4-upload-list-picture .upload-list-picture-item:hover:not(.upload-list-picture-item-readonly) .upload-list-picture-name {\n opacity: 0;\n}\n\n.paraui-v4-upload-drag .paraui-v4-upload-list-text .upload-list-item-info .upload-list-text {\n width: 590px;\n}";
152
152
  styleInject(css_248z$4);
153
153
 
154
154
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
@@ -256,7 +256,8 @@ var UploadList = function UploadList(props) {
256
256
  readonly = props.readonly,
257
257
  operateBtnProps = props.operateBtnProps,
258
258
  actionRender = props.actionRender,
259
- onPreview = props.onPreview;
259
+ onPreview = props.onPreview,
260
+ disabled = props.disabled;
260
261
  var _useState = useState([]),
261
262
  _useState2 = _slicedToArray(_useState, 2),
262
263
  uploadList = _useState2[0],
@@ -344,7 +345,9 @@ var UploadList = function UploadList(props) {
344
345
  });
345
346
  if (showRemoveIcon && !readonly && !file.isDefault) list.push({
346
347
  icon: removeIcon || jsx(Delete, {}),
347
- key: 'delete'
348
+ key: 'delete',
349
+ disabled: disabled,
350
+ className: disabled ? 'upload-list-actions-delete-disabled' : ''
348
351
  });
349
352
  if (!list.length) return null;
350
353
  var onClick = function onClick(item, e) {
@@ -377,10 +380,12 @@ var UploadList = function UploadList(props) {
377
380
  return !readonly && !file.isDefault && jsx("div", Object.assign({
378
381
  className: 'upload-list-actions'
379
382
  }, {
380
- children: showRemoveIcon && jsx("span", Object.assign({
383
+ children: showRemoveIcon && jsx(Button.IconButton, Object.assign({
384
+ variant: "text",
381
385
  onClick: function onClick(evt) {
382
386
  return handleRemove(file, evt);
383
- }
387
+ },
388
+ disabled: disabled
384
389
  }, {
385
390
  children: removeIcon || jsx(Delete, {})
386
391
  }))
@@ -1009,7 +1014,8 @@ var ImageUpload = function ImageUpload(props) {
1009
1014
  itemRender: itemRender,
1010
1015
  onPreview: onPreview,
1011
1016
  actionRender: actionRender,
1012
- operateBtnProps: operateBtnProps
1017
+ operateBtnProps: operateBtnProps,
1018
+ disabled: props.disabled
1013
1019
  });
1014
1020
  };
1015
1021
  //渲染内容 avatar
@@ -1875,7 +1881,8 @@ const InternalUpload = props => {
1875
1881
  actionRender: actionRender,
1876
1882
  onPreview: onPreview,
1877
1883
  showPreviewIcon: showPreviewIcon,
1878
- previewIcon: previewIcon
1884
+ previewIcon: previewIcon,
1885
+ disabled: props.disabled
1879
1886
  });
1880
1887
  //渲染上传按钮
1881
1888
  const renderButton = () => {
@@ -205,4 +205,6 @@ export interface UploadListProps<T = any> {
205
205
  operateBtnProps?: (file: UploadFile, actions: IActions) => OperateBtnListProps;
206
206
  /**点击文件链接或预览图标时的回调, 返回值为false时,阻止组件默认的预览*/
207
207
  onPreview?: (file: UploadFile<T>, event?: React.MouseEvent) => Promise<Boolean | void>;
208
+ /**是否禁用*/
209
+ disabled?: boolean;
208
210
  }
package/index.js CHANGED
@@ -33,7 +33,7 @@ export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
33
33
  export { default as Empty } from './Empty/index.js';
34
34
  export { default as FieldForm } from './FieldForm/index.js';
35
35
  export { default as Form } from './Form/index.js';
36
- export { F as FormItem } from './_verture/index-0163a7b0.js';
36
+ export { F as FormItem } from './_verture/index-99984222.js';
37
37
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-e3beaf4b.js';
38
38
  export { G as GlobalContext, c as changeConfirmLocale, g as getConfirmLocale } from './_verture/index-ca413216.js';
39
39
  export { default as Help } from './Help/index.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "4.0.62",
4
+ "version": "4.0.64",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",