@cozeloop/components 0.0.12-beta-1773303070577 → 0.0.12-beta-1773633875853

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/es/index.mjs CHANGED
@@ -1,20 +1,18 @@
1
1
  import "./index.css";
2
2
  import "./static/svg/select.svg";
3
- import __rslib_svgr_url__1__ from "./static/svg/audio-icon.svg";
4
- import __rslib_svgr_url__2__ from "./static/svg/video-icon.svg";
5
3
  import { __webpack_require__ } from "./rslib-runtime.mjs";
6
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
5
  import { arrayMove, sortableContainer as external_react_sortable_hoc_sortableContainer, sortableElement, sortableHandle } from "react-sortable-hoc";
8
6
  import react, { Fragment as external_react_Fragment, forwardRef, isValidElement, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
9
7
  import { I18n as i18n_I18n } from "@cozeloop/i18n";
10
- import { IconCozArrowDown, IconCozArrowLeft, IconCozArrowRight, IconCozCheckMarkCircleFill, IconCozCheckMarkFill, IconCozContent, IconCozCopy, IconCozCross, IconCozCrossCircleFill, IconCozCrossCircleFillPalette, IconCozCrossFill, IconCozDownload, IconCozEye, IconCozFilter, IconCozHandle, IconCozImage, IconCozImageArrowUp, IconCozImageBroken, IconCozInfoCircle, IconCozLongArrowTopRight, IconCozLongArrowUp, IconCozMore, IconCozPencil, IconCozPlayCircle, IconCozPlus, IconCozPlusCircle, IconCozQuestionMarkCircle, IconCozRefresh, IconCozSetting, IconCozTableSetting, IconCozTrashCan, IconCozVideo, IconCozWarningCircle } from "@coze-arch/coze-design/icons";
11
- import { AudioPlayer, Banner, Button, ButtonGroup, Cascader, Checkbox, Col, Collapse, CozAvatar, CozInputNumber, CozPagination, DatePicker, Descriptions, Divider, Dropdown, Empty, EmptyState, Form, IconButton, Image, ImagePreview, Input, List, Loading, LoadingButton, Menu, Modal, Popover, Radio, RadioGroup, Row, Select, SideSheet, Skeleton, Slider, Space, Spin, Switch, Table, Tabs, Tag, TextArea, Toast, Tooltip, Typography, Upload, VideoPlayer, withField } from "@coze-arch/coze-design";
8
+ import { IconCozArrowDown, IconCozArrowLeft, IconCozArrowRight, IconCozCheckMarkCircleFill, IconCozCheckMarkFill, IconCozContent, IconCozCopy, IconCozCross, IconCozCrossCircleFill, IconCozCrossFill, IconCozEye, IconCozFilter, IconCozHandle, IconCozImage, IconCozImageArrowUp, IconCozImageBroken, IconCozInfoCircle, IconCozLongArrowTopRight, IconCozLongArrowUp, IconCozMore, IconCozPencil, IconCozPlayCircle, IconCozPlus, IconCozPlusCircle, IconCozQuestionMarkCircle, IconCozRefresh, IconCozSetting, IconCozTableSetting, IconCozTrashCan, IconCozVideo, IconCozWarningCircle } from "@coze-arch/coze-design/icons";
9
+ import { Banner, Button, ButtonGroup, Cascader, Checkbox, Col, Collapse, CozAvatar, CozInputNumber, CozPagination, DatePicker, Descriptions, Divider, Dropdown, Empty, EmptyState, Form, IconButton, Image, ImagePreview, Input, List, Loading, Menu, Modal, Popover, Radio, RadioGroup, Row, Select, SideSheet, Skeleton, Slider, Space, Spin, Switch, Table, Tabs, Tag, TextArea, Toast, Tooltip, Typography, Upload, withField } from "@coze-arch/coze-design";
12
10
  import classnames from "classnames";
13
11
  import { IconCozIllus404, IconCozIllus404Dark, IconCozIllusEmpty, IconCozIllusEmptyDark, IconCozIllusError, IconCozIllusErrorDark, IconCozIllusLock, IconCozIllusLockDark, IconCozIllusNone, IconCozIllusNoneDark } from "@coze-arch/coze-design/illustrations";
14
12
  import { useDebounceFn, useInfiniteScroll, useLatest, useMemoizedFn, useRequest, useSize } from "ahooks";
15
- import { cloneDeep, debounce, get, isEmpty as external_lodash_es_isEmpty, isFunction, isInteger, isNull, isNumber, isObject, isString, isUndefined, set } from "lodash-es";
13
+ import { cloneDeep, debounce, get, isEmpty as external_lodash_es_isEmpty, isInteger, isNull, isNumber, isObject, isString, isUndefined, set } from "lodash-es";
16
14
  import copy_to_clipboard from "copy-to-clipboard";
17
- import { fileDownload, formatTimestampToString, safeJsonParse, sleep as toolkit_sleep } from "@cozeloop/toolkit";
15
+ import { formatTimestampToString, safeJsonParse, sleep as toolkit_sleep } from "@cozeloop/toolkit";
18
16
  import _monaco_editor_react, { DiffEditor, loader } from "@monaco-editor/react";
19
17
  import sortablejs from "sortablejs";
20
18
  import { nanoid } from "nanoid";
@@ -35,7 +33,6 @@ import { python } from "@coze-editor/editor/language-python";
35
33
  import { json } from "@coze-editor/editor/language-json";
36
34
  import { mixLanguages } from "@coze-editor/editor";
37
35
  import { EditorView, keymap } from "@codemirror/view";
38
- import { markdownLanguage } from "@codemirror/lang-markdown";
39
36
  import { goLanguage } from "@codemirror/lang-go";
40
37
  import preset_universal from "@coze-editor/editor/preset-universal";
41
38
  var external_react_sortable_hoc_namespaceObject = {};
@@ -255,14 +252,15 @@ const LoopTable = ({ className, ...props })=>/*#__PURE__*/ jsx(Table, {
255
252
  ...props,
256
253
  id: index_module["loop-table"]
257
254
  });
258
- const IconButtonContainer = /*#__PURE__*/ forwardRef(({ icon, className, style, onClick, active, disabled, ...rest }, ref)=>/*#__PURE__*/ jsx("div", {
259
- ref: ref,
255
+ function IconButtonContainer({ icon, className, style, onClick, active, disabled, ...rest }) {
256
+ return /*#__PURE__*/ jsx("div", {
260
257
  ...rest,
261
258
  onClick: onClick,
262
259
  style: style,
263
260
  className: classnames('inline-flex items-center justify-center shrink-0 w-5 h-5 rounded-[4px] text-sm text-[var(--coz-fg-secondary)] ', active && !disabled ? 'bg-[var(--coz-mg-plus)]' : '', disabled ? 'cursor-not-allowed' : 'cursor-pointer hover:text-[var(--coz-fg-primary)] hover:bg-[var(--coz-mg-plus)]', className),
264
261
  children: icon
265
- }));
262
+ });
263
+ }
266
264
  const activeColor = 'rgb(var(--coze-up-brand-9))';
267
265
  const unActiveColor = 'var(--coz-fg-dim)';
268
266
  const IconSortArrow = ({ sortOrder, ...rest })=>{
@@ -803,8 +801,7 @@ function VersionDescriptions({ version, className }) {
803
801
  className: "!text-[13px]",
804
802
  children: /*#__PURE__*/ jsx(UserProfile, {
805
803
  name: submitter?.name,
806
- avatarUrl: submitter?.avatar_url,
807
- userNameClassName: "!max-w-[130px]"
804
+ avatarUrl: submitter?.avatar_url
808
805
  })
809
806
  }),
810
807
  isDraft ? null : /*#__PURE__*/ jsx(Descriptions.Item, {
@@ -834,7 +831,7 @@ function VersionItem({ version, active, className, onClick }) {
834
831
  })
835
832
  }),
836
833
  /*#__PURE__*/ jsx("div", {
837
- className: `grow min-w-0 overflow-hidden px-2 pt-2 rounded-m ${active ? 'bg-gray-100' : ''} group-hover:bg-gray-100`,
834
+ className: `grow px-2 pt-2 rounded-m ${active ? 'bg-gray-100' : ''} group-hover:bg-gray-100`,
838
835
  children: /*#__PURE__*/ jsx(VersionDescriptions, {
839
836
  version: version
840
837
  })
@@ -1960,28 +1957,6 @@ function OpenDetailButton({ url, className }) {
1960
1957
  })
1961
1958
  });
1962
1959
  }
1963
- function LinkButton({ tooltip, onClick, onAsyncClick, link = true, children, className }) {
1964
- const [loading, setLoading] = useState(false);
1965
- return /*#__PURE__*/ jsx(Tooltip, {
1966
- trigger: tooltip ? 'hover' : 'custom',
1967
- content: tooltip,
1968
- children: /*#__PURE__*/ jsx("span", {
1969
- className: className,
1970
- children: /*#__PURE__*/ jsx(Typography.Text, {
1971
- link: link,
1972
- onClick: ()=>{
1973
- if (!isFunction(onAsyncClick)) onClick?.();
1974
- if (loading) return;
1975
- setLoading(true);
1976
- onAsyncClick?.().finally(()=>{
1977
- setLoading(false);
1978
- });
1979
- },
1980
- children: children
1981
- })
1982
- })
1983
- }, tooltip);
1984
- }
1985
1960
  function EditIconButton({ disabled, className, onClick, ...rest }) {
1986
1961
  return /*#__PURE__*/ jsx(IconCozPencil, {
1987
1962
  ...rest,
@@ -4518,15 +4493,9 @@ function FooterActions({ confirmBtnProps: { text: confirmBtnText, ...confirmBtnP
4518
4493
  function TableEmpty({ className, ...props }) {
4519
4494
  return /*#__PURE__*/ jsx(EmptyState, {
4520
4495
  className: classnames('my-10', className),
4521
- icon: /*#__PURE__*/ jsx(IconCozIllusNone, {
4522
- width: "160",
4523
- height: "160"
4524
- }),
4525
- darkModeIcon: /*#__PURE__*/ jsx(IconCozIllusNoneDark, {
4526
- width: "160",
4527
- height: "160"
4528
- }),
4529
- title: i18n_I18n.t('no_data'),
4496
+ icon: /*#__PURE__*/ jsx(IconCozIllusNone, {}),
4497
+ darkModeIcon: /*#__PURE__*/ jsx(IconCozIllusNoneDark, {}),
4498
+ description: i18n_I18n.t('no_data'),
4530
4499
  ...props
4531
4500
  });
4532
4501
  }
@@ -5691,9 +5660,6 @@ languages.register("typescript", typescript);
5691
5660
  languages.register('go', {
5692
5661
  language: goLanguage
5693
5662
  });
5694
- languages.register('markdown', {
5695
- language: markdownLanguage
5696
- });
5697
5663
  themes.register('coze-light', cozeLight);
5698
5664
  themes.register('coze-dark', cozeDark);
5699
5665
  const minHeightOption = (value)=>EditorView.theme({
@@ -5729,20 +5695,6 @@ const lineHeightOption = (value)=>EditorView.theme({
5729
5695
  lineHeight: 'number' == typeof value ? `${value}px` : 'string' == typeof value ? value : 'unset'
5730
5696
  }
5731
5697
  });
5732
- const backgroundColorOption = (value)=>EditorView.theme({
5733
- '&.cm-editor': {
5734
- backgroundColor: value ? `${value} !important` : 'unset'
5735
- },
5736
- '.cm-gutters': {
5737
- backgroundColor: value ? `${value} !important` : 'unset'
5738
- },
5739
- '.cm-activeLineGutter': {
5740
- backgroundColor: value ? `${value} !important` : 'unset'
5741
- },
5742
- '.cm-line': {
5743
- backgroundColor: value ? `${value} !important` : 'unset'
5744
- }
5745
- });
5746
5698
  function createStyleOptions() {
5747
5699
  return [
5748
5700
  react_option('minHeight', minHeightOption),
@@ -5750,8 +5702,7 @@ function createStyleOptions() {
5750
5702
  react_option('editorHeight', heightOption),
5751
5703
  react_option('borderRadius', borderRadiusOption),
5752
5704
  react_option('padding', paddingOption),
5753
- react_option('lineHeight', lineHeightOption),
5754
- react_option('backgroundColor', backgroundColorOption)
5705
+ react_option('lineHeight', lineHeightOption)
5755
5706
  ];
5756
5707
  }
5757
5708
  const builtinExtensions = [
@@ -5791,11 +5742,6 @@ const text_editor_lineHeightOption = (value)=>EditorView.theme({
5791
5742
  lineHeight: 'number' == typeof value ? `${value}px` : 'string' == typeof value ? value : 'unset'
5792
5743
  }
5793
5744
  });
5794
- const text_editor_backgroundColorOption = (value)=>EditorView.theme({
5795
- '.cm-content, .cm-gutter, .cm-right-gutter': {
5796
- backgroundColor: value ? `${value} !important` : 'unset'
5797
- }
5798
- });
5799
5745
  const extensions = [
5800
5746
  mixLanguages({}),
5801
5747
  RawEditorTheme,
@@ -5808,8 +5754,7 @@ const extensions = [
5808
5754
  const CodeMirrorTextEditor = createRenderer([
5809
5755
  ...preset_universal,
5810
5756
  react_option('minHeight', text_editor_minHeightOption),
5811
- react_option('lineHeight', text_editor_lineHeightOption),
5812
- react_option('backgroundColor', text_editor_backgroundColorOption)
5757
+ react_option('lineHeight', text_editor_lineHeightOption)
5813
5758
  ], extensions);
5814
5759
  const json_editor_extensions = [
5815
5760
  EditorView.theme({
@@ -5848,7 +5793,7 @@ const transformer = transformerCreator((text)=>{
5848
5793
  return text;
5849
5794
  });
5850
5795
  const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
5851
- const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur, backgroundColor } = props;
5796
+ const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur } = props;
5852
5797
  const apiRef = useRef(null);
5853
5798
  const handleChange = useCallback((e)=>{
5854
5799
  if ('function' == typeof onChange) onChange(e.value);
@@ -5901,8 +5846,7 @@ const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
5901
5846
  borderRadius,
5902
5847
  padding,
5903
5848
  fontSize: 13,
5904
- lineHeight: 20,
5905
- backgroundColor
5849
+ lineHeight: 20
5906
5850
  },
5907
5851
  didMount: (api)=>apiRef.current = api,
5908
5852
  extensions: json_editor_extensions,
@@ -5913,7 +5857,7 @@ const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
5913
5857
  });
5914
5858
  });
5915
5859
  const CodeMirrorRawTextEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
5916
- const { value, onChange, placeholder, className, minHeight, readonly, backgroundColor } = props;
5860
+ const { value, onChange, placeholder, className, minHeight, readonly } = props;
5917
5861
  const apiRef = useRef(null);
5918
5862
  const handleChange = useCallback((e)=>{
5919
5863
  if ('function' == typeof onChange) onChange(e.value);
@@ -5940,8 +5884,7 @@ const CodeMirrorRawTextEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
5940
5884
  minHeight,
5941
5885
  fontSize: 13,
5942
5886
  editable: !readonly,
5943
- lineHeight: 20,
5944
- backgroundColor
5887
+ lineHeight: 20
5945
5888
  },
5946
5889
  didMount: (api)=>apiRef.current = api
5947
5890
  })
@@ -5985,7 +5928,7 @@ const raw_code_editor_transformer = transformerCreator((text)=>{
5985
5928
  return text;
5986
5929
  });
5987
5930
  const CodeMirrorRawCodeEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
5988
- const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur, language = 'shell', backgroundColor } = props;
5931
+ const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur, language = 'shell' } = props;
5989
5932
  const apiRef = useRef(null);
5990
5933
  const handleChange = useCallback((e)=>{
5991
5934
  if ('function' == typeof onChange) onChange(e.value);
@@ -6038,8 +5981,7 @@ const CodeMirrorRawCodeEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
6038
5981
  borderRadius,
6039
5982
  padding,
6040
5983
  fontSize: 13,
6041
- lineHeight: 20,
6042
- backgroundColor
5984
+ lineHeight: 20
6043
5985
  },
6044
5986
  didMount: (api)=>apiRef.current = api,
6045
5987
  extensions: raw_code_editor_extensions,
@@ -6049,37 +5991,23 @@ const CodeMirrorRawCodeEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
6049
5991
  })
6050
5992
  });
6051
5993
  });
6052
- const SchemaEditor = ({ value, onChange, placeholder, readOnly, language, className, backgroundColor })=>/*#__PURE__*/ jsx("div", {
6053
- className: classnames('w-full h-[500px] border border-solid border-[rgba(68,83,130,0.25)] rounded-[4px] overflow-hidden relative', {
6054
- 'opacity-70': readOnly,
6055
- 'bg-white': !backgroundColor
5994
+ const SchemaEditor = ({ value, onChange, placeholder, readOnly, language, className })=>/*#__PURE__*/ jsx("div", {
5995
+ className: classnames('w-full h-[500px] border border-solid coz-stroke-primary rounded-[4px] overflow-hidden relative bg-white', {
5996
+ 'opacity-70': readOnly
6056
5997
  }, className),
6057
- style: backgroundColor ? {
6058
- backgroundColor
6059
- } : void 0,
6060
5998
  children: 'json' === language ? /*#__PURE__*/ jsx(CodeMirrorJsonEditor, {
6061
5999
  className: "w-full h-full overflow-y-auto",
6062
6000
  onChange: onChange,
6063
6001
  value: value || '',
6064
6002
  placeholder: placeholder,
6065
6003
  readonly: readOnly,
6066
- borderRadius: 4,
6067
- backgroundColor: backgroundColor
6068
- }) : language ? /*#__PURE__*/ jsx(CodeMirrorRawCodeEditor, {
6069
- className: "w-full h-full overflow-y-auto",
6070
- language: language,
6071
- onChange: onChange,
6072
- value: value || '',
6073
- placeholder: placeholder,
6074
- readonly: readOnly,
6075
- backgroundColor: backgroundColor
6004
+ borderRadius: 4
6076
6005
  }) : /*#__PURE__*/ jsx(CodeMirrorRawTextEditor, {
6077
6006
  className: "w-full h-full overflow-y-auto",
6078
6007
  onChange: onChange,
6079
6008
  value: value || '',
6080
6009
  placeholder: placeholder,
6081
- readonly: readOnly,
6082
- backgroundColor: backgroundColor
6010
+ readonly: readOnly
6083
6011
  })
6084
6012
  });
6085
6013
  const code_editor_with_loading_index_module = {
@@ -6150,255 +6078,12 @@ const CollapseItem = ({ children, open: defaultOpen, title, className })=>{
6150
6078
  ]
6151
6079
  });
6152
6080
  };
6153
- const audio_icon = __rslib_svgr_url__1__;
6154
- function AudioRender({ audioUrl, audioName, className, showDownload, deletion, upload, size = 'small' }) {
6155
- const [modalVisible, setModalVisible] = useState(false);
6156
- const iconSizeCls = 'small' === size ? 'text-[14px]' : 'text-[20px]';
6157
- return /*#__PURE__*/ jsxs("div", {
6158
- className: "flex flex-col",
6159
- onClick: (e)=>{
6160
- e.stopPropagation();
6161
- },
6162
- children: [
6163
- /*#__PURE__*/ jsxs("div", {
6164
- className: classnames('inline-block relative group', 'small' === size ? 'w-[36px] h-[36px]' : 'w-[80px] h-[80px]', className),
6165
- children: [
6166
- upload?.status === 'error' ? /*#__PURE__*/ jsx("div", {
6167
- className: classnames('w-full h-full flex items-center justify-center rounded-[6px] coz-mg-primary', 'border border-solid coz-stroke-hglt-red'),
6168
- children: /*#__PURE__*/ jsx(IconCozImageBroken, {
6169
- className: "text-[20px] coz-fg-dim"
6170
- })
6171
- }) : /*#__PURE__*/ jsx(Spin, {
6172
- spinning: upload?.status === 'loading',
6173
- wrapperClassName: "!w-full !h-full [&_.semi-spin-children]:w-full [&_.semi-spin-children]:h-full",
6174
- children: /*#__PURE__*/ jsx("img", {
6175
- src: audio_icon,
6176
- alt: audioName,
6177
- width: '100%',
6178
- height: '100%',
6179
- style: {
6180
- objectFit: 'cover',
6181
- objectPosition: 'center'
6182
- }
6183
- })
6184
- }),
6185
- /*#__PURE__*/ jsxs("div", {
6186
- className: classnames('absolute inset-0 rounded-[6px] flex gap-3 items-center justify-center', 'z-[1]', 'bg-[rgba(0,0,0,0.4)]', 'invisible group-hover:visible'),
6187
- children: [
6188
- upload?.status === 'error' ? /*#__PURE__*/ jsx(IconCozRefresh, {
6189
- className: classnames('text-white cursor-pointer', iconSizeCls),
6190
- onClick: upload?.onRetry
6191
- }) : null,
6192
- audioUrl && ![
6193
- 'error',
6194
- 'loading'
6195
- ].includes(upload?.status || 'success') ? /*#__PURE__*/ jsx(IconCozPlayCircle, {
6196
- className: classnames('text-white cursor-pointer', iconSizeCls),
6197
- onClick: ()=>setModalVisible(true)
6198
- }) : null,
6199
- showDownload ? /*#__PURE__*/ jsx(IconCozDownload, {
6200
- className: classnames('text-white cursor-pointer', iconSizeCls),
6201
- onClick: ()=>{
6202
- if (audioUrl) fileDownload(audioUrl, audioName || i18n_I18n.t('test'));
6203
- }
6204
- }) : null,
6205
- isFunction(deletion) ? /*#__PURE__*/ jsx("div", {
6206
- className: "absolute right-[-8px] top-[-8px] p-[2px] shrink-0 inline-flex justify-center items-center cursor-pointer",
6207
- onClick: ()=>deletion(),
6208
- children: /*#__PURE__*/ jsx(IconCozCrossCircleFillPalette, {})
6209
- }) : null
6210
- ]
6211
- })
6212
- ]
6213
- }),
6214
- /*#__PURE__*/ jsx(Modal, {
6215
- visible: modalVisible,
6216
- closable: false,
6217
- title: /*#__PURE__*/ jsxs("div", {
6218
- className: "w-full flex items-center justify-between",
6219
- children: [
6220
- /*#__PURE__*/ jsx(Typography.Title, {
6221
- heading: 5,
6222
- ellipsis: {
6223
- showTooltip: true
6224
- },
6225
- children: audioName || i18n_I18n.t('audio')
6226
- }),
6227
- /*#__PURE__*/ jsxs("div", {
6228
- className: "flex items-center gap-2",
6229
- children: [
6230
- /*#__PURE__*/ jsx(LoadingButton, {
6231
- color: "primary",
6232
- icon: /*#__PURE__*/ jsx(IconCozDownload, {}),
6233
- onClick: async ()=>{
6234
- if (audioUrl) await fileDownload(audioUrl, audioName || i18n_I18n.t('test'));
6235
- },
6236
- children: i18n_I18n.t('download')
6237
- }),
6238
- /*#__PURE__*/ jsx(IconButton, {
6239
- size: "large",
6240
- color: "secondary",
6241
- className: "!w-[40px] !h-[40px]",
6242
- icon: /*#__PURE__*/ jsx(IconCozCross, {}),
6243
- onClick: ()=>setModalVisible(false)
6244
- })
6245
- ]
6246
- })
6247
- ]
6248
- }),
6249
- width: 800,
6250
- onCancel: ()=>setModalVisible(false),
6251
- children: /*#__PURE__*/ jsx(AudioPlayer, {
6252
- autoPlay: false,
6253
- audioUrl: audioUrl,
6254
- theme: "light",
6255
- skipDuration: 180,
6256
- className: classnames('rounded-[8px]', '[&_.semi-audio-player-control>span:not(:first-child)]:hidden', '[&_.semi-audio-player-control_button]:!coz-stroke-primary', '[&_.semi-audio-player-slider-progress]:bg-[--coz-fg-hglt]')
6257
- })
6258
- })
6259
- ]
6260
- });
6261
- }
6262
- const video_icon = __rslib_svgr_url__2__;
6263
- function VideoRender({ videoName, videoUrl, showDownload, deletion, upload, size = 'small', className }) {
6264
- const [modalVisible, setModalVisible] = useState(false);
6265
- const [videoElementStatus, setVideoElementStatus] = useState('loading');
6266
- const iconSizeCls = 'small' === size ? 'text-[14px]' : 'text-[20px]';
6267
- return /*#__PURE__*/ jsxs("div", {
6268
- className: "flex flex-col",
6269
- onClick: (e)=>{
6270
- e.stopPropagation();
6271
- },
6272
- children: [
6273
- /*#__PURE__*/ jsxs("div", {
6274
- className: classnames('inline-block relative group', 'small' === size ? 'w-[36px] h-[36px]' : 'w-[80px] h-[80px]', className),
6275
- children: [
6276
- 'loading' === videoElementStatus || upload?.status === 'loading' ? /*#__PURE__*/ jsx(Spin, {
6277
- spinning: true,
6278
- wrapperClassName: "absolute inset-0",
6279
- children: /*#__PURE__*/ jsx("img", {
6280
- src: video_icon,
6281
- className: "w-full h-full object-cover"
6282
- })
6283
- }) : null,
6284
- 'error' === videoElementStatus || upload?.status === 'error' ? /*#__PURE__*/ jsx("div", {
6285
- className: classnames('absolute inset-0 rounded-[6px] flex items-center justify-center coz-mg-primary', {
6286
- 'border border-solid coz-stroke-hglt-red': upload?.status === 'error'
6287
- }),
6288
- children: /*#__PURE__*/ jsx(IconCozImageBroken, {
6289
- className: classnames('text-[30px] coz-fg-dim')
6290
- })
6291
- }) : null,
6292
- /*#__PURE__*/ jsx("video", {
6293
- src: videoUrl,
6294
- width: '100%',
6295
- height: '100%',
6296
- className: classnames('rounded-[6px] pointer-events-none', {
6297
- invisible: 'loaded' !== videoElementStatus || [
6298
- 'error',
6299
- 'loading'
6300
- ].includes(upload?.status || 'success')
6301
- }),
6302
- style: {
6303
- objectFit: 'cover',
6304
- objectPosition: 'center'
6305
- },
6306
- onLoadedData: ()=>setVideoElementStatus('loaded'),
6307
- onError: ()=>setVideoElementStatus('error')
6308
- }),
6309
- /*#__PURE__*/ jsx("div", {
6310
- className: classnames('absolute inset-0 flex items-center justify-center rounded-[6px]', 'bg-[rgba(0,0,0,0.2)]', 'group-hover:invisible', 'loaded' !== videoElementStatus || [
6311
- 'error',
6312
- 'loading'
6313
- ].includes(upload?.status || 'success') ? 'invisible' : 'visible'),
6314
- children: /*#__PURE__*/ jsx(IconCozPlayCircle, {
6315
- className: classnames('coz-fg-hglt-plus', iconSizeCls)
6316
- })
6317
- }),
6318
- /*#__PURE__*/ jsxs("div", {
6319
- className: classnames('absolute inset-0 flex gap-3 items-center rounded-[6px] justify-center', 'z-[1]', 'bg-[rgba(0,0,0,0.4)]', 'invisible group-hover:visible'),
6320
- children: [
6321
- upload?.status === 'error' ? /*#__PURE__*/ jsx(IconCozRefresh, {
6322
- className: classnames('text-white cursor-pointer', iconSizeCls),
6323
- onClick: upload?.onRetry
6324
- }) : null,
6325
- videoUrl && ![
6326
- 'error',
6327
- 'loading'
6328
- ].includes(upload?.status || 'success') ? /*#__PURE__*/ jsx(IconCozPlayCircle, {
6329
- className: classnames('text-white cursor-pointer', iconSizeCls),
6330
- onClick: ()=>setModalVisible(true)
6331
- }) : null,
6332
- showDownload ? /*#__PURE__*/ jsx(IconCozDownload, {
6333
- className: classnames('text-white cursor-pointer', iconSizeCls),
6334
- onClick: ()=>{
6335
- if (videoUrl) fileDownload(videoUrl, videoName || i18n_I18n.t('test'));
6336
- }
6337
- }) : null,
6338
- isFunction(deletion) ? /*#__PURE__*/ jsx("div", {
6339
- className: "absolute right-[-8px] top-[-8px] p-[2px] shrink-0 inline-flex justify-center items-center cursor-pointer",
6340
- onClick: ()=>deletion(),
6341
- children: /*#__PURE__*/ jsx(IconCozCrossCircleFillPalette, {})
6342
- }) : null
6343
- ]
6344
- })
6345
- ]
6346
- }),
6347
- /*#__PURE__*/ jsx(Modal, {
6348
- visible: modalVisible,
6349
- closable: false,
6350
- className: "[&_div:has(>.semi-videoPlayer)]:overflow-hidden",
6351
- title: /*#__PURE__*/ jsxs("div", {
6352
- className: "w-full flex items-center justify-between",
6353
- children: [
6354
- /*#__PURE__*/ jsx(Typography.Title, {
6355
- heading: 5,
6356
- ellipsis: {
6357
- showTooltip: true
6358
- },
6359
- children: videoName || i18n_I18n.t('video')
6360
- }),
6361
- /*#__PURE__*/ jsxs("div", {
6362
- className: "flex items-center gap-2",
6363
- children: [
6364
- /*#__PURE__*/ jsx(LoadingButton, {
6365
- color: "primary",
6366
- icon: /*#__PURE__*/ jsx(IconCozDownload, {}),
6367
- onClick: async ()=>{
6368
- if (videoUrl) await fileDownload(videoUrl, videoName || i18n_I18n.t('test'));
6369
- },
6370
- children: i18n_I18n.t('download')
6371
- }),
6372
- /*#__PURE__*/ jsx(IconButton, {
6373
- size: "large",
6374
- color: "secondary",
6375
- className: "!w-[40px] !h-[40px]",
6376
- icon: /*#__PURE__*/ jsx(IconCozCross, {}),
6377
- onClick: ()=>setModalVisible(false)
6378
- })
6379
- ]
6380
- })
6381
- ]
6382
- }),
6383
- width: 900,
6384
- height: 600,
6385
- onCancel: ()=>setModalVisible(false),
6386
- children: /*#__PURE__*/ jsx(VideoPlayer, {
6387
- className: "rounded-[8px] overflow-hidden",
6388
- src: videoUrl || '',
6389
- controlsList: [
6390
- 'play',
6391
- 'time',
6392
- 'volume',
6393
- 'playbackRate',
6394
- 'fullscreen'
6395
- ]
6396
- })
6397
- })
6398
- ]
6399
- });
6081
+ function src_useReportEvent() {
6082
+ return (name, params)=>{
6083
+ console.info(name, params);
6084
+ };
6400
6085
  }
6401
6086
  var src_DEFAULT_FILE_COUNT = 20;
6402
6087
  var src_DEFAULT_PART_COUNT = 50;
6403
6088
  export { default as schemaValidators } from "@rjsf/validator-ajv8";
6404
- export { AudioRender, BasicCard, CardPane, ChipSelect, CodeEditorWithLoading, CodeMirrorCodeEditor, CodeMirrorJsonEditor, CodeMirrorRawCodeEditor, CodeMirrorRawTextEditor, CodeMirrorTextEditor, CollapseCard, CollapseItem, ColumnSelector, Copyable, DEFAULT_FILE_SIZE, DEFAULT_PAGE_SIZE, DEFAULT_SUPPORTED_FORMATS, DEFAULT_VIDEO_SUPPORTED_FORMATS, DiffEditor, EditIconButton, EditorProvider, FooterActions, FullPage, IDRender, IconButtonContainer, ImageItemRenderer, IndexControllerView, InfiniteScrollTable, InfoTooltip, InputSlider, InputWithCount, JumpIconButton, LargeTxtRender, Layout, LazyLoadComponent, LinkButton, LogicEditor, LogicExpr, LoopRadioGroup, LoopTable, LoopTabs, MultiPartRender, MultipartEditor, OpenDetailButton, PAGE_SIZE_OPTIONS, PageError, PageLoading, PageNoAuth, PageNoContent, PageNotFound, PrimaryPage, PrimaryTitle, RadioButton, ResizableSideSheet, ResizeSidesheet, SchemaEditor, SemiSchemaForm, SentinelForm, StepNav, TableBatchOperate, TableColActions, TableColsConfig, TableEmpty, TableHeader, TableWithPagination, TableWithoutPagination, TextAreaPro, TextWithCopy, TitleWithSub, TooltipWhenDisabled, TooltipWithDisabled, UploadButton, UserProfile, VersionItem, VersionList, VersionSwitchPanel, VideoItemRenderer, VideoRender, _monaco_editor_react as CodeEditor, base_search_form_select as BaseSearchFormSelect, base_search_select as BaseSearchSelect, dealColumnsWithStorage, formateDecimalPlacesString, getColumnManageStorage, getStoragePageSize, handleCopy, setColumnsManageStorage, sleep, src_DEFAULT_FILE_COUNT as DEFAULT_FILE_COUNT, src_DEFAULT_PART_COUNT as DEFAULT_PART_COUNT, type_ImageStatus as MultipartRenderStatus, upload_uploadFile as uploadFile, useBatchOperate, useItemIndexController, useUnsaveLeaveWarning };
6089
+ export { BasicCard, CardPane, ChipSelect, CodeEditorWithLoading, CodeMirrorCodeEditor, CodeMirrorJsonEditor, CodeMirrorRawCodeEditor, CodeMirrorRawTextEditor, CodeMirrorTextEditor, CollapseCard, CollapseItem, ColumnSelector, Copyable, DEFAULT_FILE_SIZE, DEFAULT_PAGE_SIZE, DEFAULT_SUPPORTED_FORMATS, DEFAULT_VIDEO_SUPPORTED_FORMATS, DiffEditor, EditIconButton, EditorProvider, FooterActions, FullPage, IDRender, IconButtonContainer, ImageItemRenderer, IndexControllerView, InfiniteScrollTable, InfoTooltip, InputSlider, InputWithCount, JumpIconButton, LargeTxtRender, Layout, LazyLoadComponent, LogicEditor, LogicExpr, LoopRadioGroup, LoopTable, LoopTabs, MultiPartRender, MultipartEditor, OpenDetailButton, PAGE_SIZE_OPTIONS, PageError, PageLoading, PageNoAuth, PageNoContent, PageNotFound, PrimaryPage, PrimaryTitle, RadioButton, ResizableSideSheet, ResizeSidesheet, SchemaEditor, SemiSchemaForm, SentinelForm, StepNav, TableBatchOperate, TableColActions, TableColsConfig, TableEmpty, TableHeader, TableWithPagination, TableWithoutPagination, TextAreaPro, TextWithCopy, TitleWithSub, TooltipWhenDisabled, TooltipWithDisabled, UploadButton, UserProfile, VersionItem, VersionList, VersionSwitchPanel, VideoItemRenderer, _monaco_editor_react as CodeEditor, base_search_form_select as BaseSearchFormSelect, base_search_select as BaseSearchSelect, dealColumnsWithStorage, formateDecimalPlacesString, getColumnManageStorage, getStoragePageSize, handleCopy, setColumnsManageStorage, sleep, src_DEFAULT_FILE_COUNT as DEFAULT_FILE_COUNT, src_DEFAULT_PART_COUNT as DEFAULT_PART_COUNT, src_useReportEvent as useReportEvent, type_ImageStatus as MultipartRenderStatus, upload_uploadFile as uploadFile, useBatchOperate, useItemIndexController, useUnsaveLeaveWarning };
@@ -1,4 +1,4 @@
1
- export declare const CodeMirrorCodeEditor: (props: import("@coze-editor/editor/react").InferRendererProps<(import("@coze-editor/editor/react").OptionPluginSpec<"editorHeight", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"borderRadius", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"padding", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"lineHeight", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"backgroundColor", string | undefined> | import("@coze-editor/editor/react").ExtensionPluginSpec | import("@coze-editor/editor/react").OptionPluginSpec<"fontSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"placeholder", string | HTMLElement> | import("@coze-editor/editor/react").OptionPluginSpec<"readOnly", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"editable", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"lineWrapping", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"height", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"minHeight", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"maxHeight", string | number> | import("@coze-editor/editor/react").APIPluginSpec<"getValue", [], string> | import("@coze-editor/editor/react").APIPluginSpec<"setValue", [value: string], void> | import("@coze-editor/editor/react").APIPluginSpec<"replaceText", [options: {
1
+ export declare const CodeMirrorCodeEditor: (props: import("@coze-editor/editor/react").InferRendererProps<(import("@coze-editor/editor/react").OptionPluginSpec<"editorHeight", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"borderRadius", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"padding", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"lineHeight", string | number | undefined> | import("@coze-editor/editor/react").ExtensionPluginSpec | import("@coze-editor/editor/react").OptionPluginSpec<"fontSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"placeholder", string | HTMLElement> | import("@coze-editor/editor/react").OptionPluginSpec<"readOnly", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"editable", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"lineWrapping", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"height", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"minHeight", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"maxHeight", string | number> | import("@coze-editor/editor/react").APIPluginSpec<"getValue", [], string> | import("@coze-editor/editor/react").APIPluginSpec<"setValue", [value: string], void> | import("@coze-editor/editor/react").APIPluginSpec<"replaceText", [options: {
2
2
  from: number;
3
3
  to: number;
4
4
  text: string;
@@ -14,7 +14,6 @@ interface BaseJsonEditorProps {
14
14
  borderRadius?: string | number;
15
15
  onFocus?: () => void;
16
16
  onBlur?: () => void;
17
- backgroundColor?: string;
18
17
  }
19
18
  export declare const CodeMirrorJsonEditor: React.ForwardRefExoticComponent<BaseJsonEditorProps & React.RefAttributes<unknown>>;
20
19
  export {};
@@ -15,7 +15,6 @@ interface BaseCodeEditorProps {
15
15
  language?: string;
16
16
  onFocus?: () => void;
17
17
  onBlur?: () => void;
18
- backgroundColor?: string;
19
18
  }
20
19
  export declare const CodeMirrorRawCodeEditor: React.ForwardRefExoticComponent<BaseCodeEditorProps & React.RefAttributes<unknown>>;
21
20
  export {};
@@ -6,7 +6,6 @@ interface CodeMirrorRawTextEditorProps {
6
6
  dataTestID?: string;
7
7
  placeholder?: string | HTMLElement;
8
8
  minHeight?: string | number;
9
- backgroundColor?: string;
10
9
  }
11
10
  export declare const CodeMirrorRawTextEditor: import("react").ForwardRefExoticComponent<CodeMirrorRawTextEditorProps & import("react").RefAttributes<HTMLDivElement>>;
12
11
  export {};
@@ -1,4 +1,4 @@
1
- export declare const CodeMirrorTextEditor: (props: import("@coze-editor/editor/react").InferRendererProps<(import("@coze-editor/editor/react").OptionPluginSpec<"lineHeight", string | number | undefined> | import("@coze-editor/editor/react").OptionPluginSpec<"backgroundColor", string | undefined> | import("@coze-editor/editor/react").ExtensionPluginSpec | import("@coze-editor/editor/react").OptionPluginSpec<"fontSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"placeholder", string | HTMLElement> | import("@coze-editor/editor/react").OptionPluginSpec<"readOnly", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"editable", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"lineWrapping", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"height", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"minHeight", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"maxHeight", string | number> | import("@coze-editor/editor/react").APIPluginSpec<"getValue", [], string> | import("@coze-editor/editor/react").APIPluginSpec<"getCursorPosition", [], number> | import("@coze-editor/editor/react").APIPluginSpec<"focus", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"blur", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"updateASTDecorations", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"undo", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"redo", [], void> | import("@coze-editor/editor/react").EventPluginSpec<"focus", symbol> | import("@coze-editor/editor/react").EventPluginSpec<"blur", symbol> | import("@coze-editor/editor/react").DOMEventHandlerPluginSpec<"mousedown"> | import("@coze-editor/editor/react").DOMEventHandlerPluginSpec<"mouseup"> | import("@coze-editor/editor/react").APIPluginSpec<"setValue", [value: string], void> | import("@coze-editor/editor/react").APIPluginSpec<"replaceText", [options: {
1
+ export declare const CodeMirrorTextEditor: (props: import("@coze-editor/editor/react").InferRendererProps<(import("@coze-editor/editor/react").OptionPluginSpec<"lineHeight", string | number | undefined> | import("@coze-editor/editor/react").ExtensionPluginSpec | import("@coze-editor/editor/react").OptionPluginSpec<"fontSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"placeholder", string | HTMLElement> | import("@coze-editor/editor/react").OptionPluginSpec<"readOnly", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"editable", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"lineWrapping", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"height", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"minHeight", string | number> | import("@coze-editor/editor/react").OptionPluginSpec<"maxHeight", string | number> | import("@coze-editor/editor/react").APIPluginSpec<"getValue", [], string> | import("@coze-editor/editor/react").APIPluginSpec<"getCursorPosition", [], number> | import("@coze-editor/editor/react").APIPluginSpec<"focus", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"blur", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"updateASTDecorations", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"undo", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"redo", [], void> | import("@coze-editor/editor/react").EventPluginSpec<"focus", symbol> | import("@coze-editor/editor/react").EventPluginSpec<"blur", symbol> | import("@coze-editor/editor/react").DOMEventHandlerPluginSpec<"mousedown"> | import("@coze-editor/editor/react").DOMEventHandlerPluginSpec<"mouseup"> | import("@coze-editor/editor/react").APIPluginSpec<"setValue", [value: string], void> | import("@coze-editor/editor/react").APIPluginSpec<"replaceText", [options: {
2
2
  from: number;
3
3
  to: number;
4
4
  text: string;
@@ -1,8 +1,8 @@
1
1
  import { type DOMAttributes } from 'react';
2
- export declare const IconButtonContainer: import("react").ForwardRefExoticComponent<{
2
+ export declare function IconButtonContainer({ icon, className, style, onClick, active, disabled, ...rest }: {
3
3
  icon: React.ReactNode;
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
6
6
  disabled?: boolean;
7
7
  active?: boolean;
8
- } & DOMAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
8
+ } & DOMAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
@@ -36,7 +36,6 @@ export { useItemIndexController, type IndexControllerStore, } from './index-cont
36
36
  export { IndexControllerView } from './index-controller/record-navigation';
37
37
  export { BaseSearchSelect, BaseSearchFormSelect, type BaseSearchSelectRef, type BaseSelectProps, type LoadOptionByIds, } from './base-search-select';
38
38
  export { OpenDetailButton } from './open-detail-button';
39
- export { LinkButton } from './link-button';
40
39
  export { EditIconButton } from './edit-icon-button';
41
40
  export { CollapseCard } from './collapse-card';
42
41
  export { type Expr, type ExprGroup, type LogicOperator, type LogicExprProps, type ExprRenderProps, type ExprGroupRenderProps, type LeftRenderProps, type OperatorRenderProps, type RightRenderProps, type OperatorOption, LogicExpr, } from './logic-expr';
@@ -69,4 +68,4 @@ export { CodeMirrorCodeEditor, CodeMirrorTextEditor, CodeMirrorJsonEditor, CodeM
69
68
  export { SchemaEditor } from './schema-editor';
70
69
  export { CodeEditorWithLoading } from './code-editor-with-loading';
71
70
  export { CollapseItem } from './collapse-item';
72
- export { AudioRender, type AudioRenderProps, VideoRender, type VideoRenderProps, } from './multi-modal-dataset-item-render';
71
+ export declare function useReportEvent(): (name: string, params: Record<string, unknown>) => void;
@@ -6,7 +6,6 @@ interface SchemaEditorProps {
6
6
  placeholder?: string;
7
7
  showLineNumbs?: boolean;
8
8
  className?: string;
9
- backgroundColor?: string;
10
9
  }
11
- export declare const SchemaEditor: ({ value, onChange, placeholder, readOnly, language, className, backgroundColor, }: SchemaEditorProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const SchemaEditor: ({ value, onChange, placeholder, readOnly, language, className, }: SchemaEditorProps) => import("react/jsx-runtime").JSX.Element;
12
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cozeloop/components",
3
- "version": "0.0.12-beta-1773303070577",
3
+ "version": "0.0.12-beta-1773633875853",
4
4
  "description": "common components for cozeloop",
5
5
  "author": "houtao.zzj@bytedance.com",
6
6
  "exports": {
@@ -30,15 +30,14 @@
30
30
  "@arco-iconbox/react-cozeloop-icons": "0.0.3",
31
31
  "@codemirror/commands": "^6.3.3",
32
32
  "@codemirror/lang-go": "^6.0.1",
33
- "@codemirror/lang-markdown": "^6.3.2",
34
33
  "@codemirror/state": "^6.4.1",
35
34
  "@codemirror/view": "^6.34.1",
36
- "@coze-arch/coze-design": "0.0.7-alpha.faea50",
37
- "@coze-editor/editor": "0.1.0-alpha.02803c",
35
+ "@coze-arch/coze-design": "0.0.7-alpha.5f0418",
36
+ "@coze-editor/editor": "0.1.0-alpha.577152",
38
37
  "@cozeloop/api-schema": "0.1.6",
39
- "@cozeloop/config-provider": "0.0.11",
38
+ "@cozeloop/config-provider": "0.0.12-beta-1773633875853",
40
39
  "@cozeloop/hooks": "0.0.1",
41
- "@cozeloop/i18n": "0.0.4",
40
+ "@cozeloop/i18n": "0.0.12-beta-1773633875853",
42
41
  "@cozeloop/toolkit": "0.0.5",
43
42
  "@monaco-editor/react": "^4.5.2",
44
43
  "@rjsf/core": "~5.24.9",
@@ -1,6 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="36" height="36" rx="4" fill="#5768A1" fill-opacity="0.08"/>
3
- <path d="M8 9.2C8 8.07989 8 7.51984 8.21799 7.09202C8.40973 6.71569 8.71569 6.40973 9.09202 6.21799C9.51984 6 10.0799 6 11.2 6H20.0079C20.497 6 20.7416 6 20.9718 6.05526C21.1759 6.10425 21.3709 6.18506 21.5499 6.29472C21.7517 6.4184 21.9247 6.59135 22.2706 6.93726L27.0627 11.7294C27.4087 12.0753 27.5816 12.2483 27.7053 12.4501C27.8149 12.629 27.8957 12.8241 27.9447 13.0282C28 13.2584 28 13.503 28 13.9921V26.8C28 27.9201 28 28.4801 27.782 28.908C27.5903 29.2843 27.2843 29.5903 26.908 29.782C26.4801 30 25.9201 30 24.8 30H11.2C10.0799 30 9.51984 30 9.09202 29.782C8.71569 29.5903 8.40973 29.2843 8.21799 28.908C8 28.4801 8 27.9201 8 26.8V9.2Z" fill="#00BF40"/>
4
- <path d="M21.3334 6.77291C21.3334 6.53058 21.3334 6.40942 21.3813 6.35331C21.4228 6.30463 21.4852 6.2788 21.549 6.28382C21.6226 6.28961 21.7083 6.37528 21.8796 6.54664L27.4538 12.1208C27.6251 12.2921 27.7108 12.3778 27.7166 12.4513C27.7216 12.5152 27.6958 12.5775 27.6471 12.6191C27.591 12.667 27.4698 12.667 27.2275 12.667H24.5334C23.4132 12.667 22.8532 12.667 22.4254 12.449C22.049 12.2573 21.7431 11.9513 21.5514 11.575C21.3334 11.1472 21.3334 10.5871 21.3334 9.46703V6.77291Z" fill="white" fill-opacity="0.3"/>
5
- <path d="M16.0556 25.5C15.4445 25.5 14.9213 25.2824 14.4862 24.8472C14.051 24.4121 13.8334 23.8889 13.8334 23.2778C13.8334 22.6667 14.051 22.1435 14.4862 21.7083C14.9213 21.2731 15.4445 21.0555 16.0556 21.0555C16.2686 21.0555 16.4653 21.081 16.6459 21.1319C16.8264 21.1829 17 21.2593 17.1667 21.3611V16.3333C17.1667 15.8731 17.5398 15.5 18 15.5H21.3334V17.1667H18.6945C18.4644 17.1667 18.2778 17.3532 18.2778 17.5833V23.2778C18.2778 23.8889 18.0602 24.4121 17.625 24.8472C17.1898 25.2824 16.6667 25.5 16.0556 25.5Z" fill="white"/>
6
- </svg>
@@ -1,6 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="36" height="36" rx="4" fill="#5768A1" fill-opacity="0.08"/>
3
- <path d="M8 9.2C8 8.07989 8 7.51984 8.21799 7.09202C8.40973 6.71569 8.71569 6.40973 9.09202 6.21799C9.51984 6 10.0799 6 11.2 6H20.0079C20.497 6 20.7416 6 20.9718 6.05526C21.1759 6.10425 21.3709 6.18506 21.5499 6.29472C21.7517 6.4184 21.9247 6.59135 22.2706 6.93726L27.0627 11.7294C27.4087 12.0753 27.5816 12.2483 27.7053 12.4501C27.8149 12.629 27.8957 12.8241 27.9447 13.0282C28 13.2584 28 13.503 28 13.9921V26.8C28 27.9201 28 28.4801 27.782 28.908C27.5903 29.2843 27.2843 29.5903 26.908 29.782C26.4801 30 25.9201 30 24.8 30H11.2C10.0799 30 9.51984 30 9.09202 29.782C8.71569 29.5903 8.40973 29.2843 8.21799 28.908C8 28.4801 8 27.9201 8 26.8V9.2Z" fill="#4080FF"/>
4
- <path d="M21.3334 6.77291C21.3334 6.53058 21.3334 6.40942 21.3813 6.35331C21.4228 6.30463 21.4852 6.2788 21.549 6.28382C21.6226 6.28961 21.7083 6.37528 21.8796 6.54664L27.4538 12.1208C27.6251 12.2921 27.7108 12.3778 27.7166 12.4513C27.7216 12.5152 27.6958 12.5775 27.6471 12.6191C27.591 12.667 27.4698 12.667 27.2275 12.667H24.5334C23.4132 12.667 22.8532 12.667 22.4254 12.449C22.049 12.2573 21.7431 11.9513 21.5514 11.575C21.3334 11.1472 21.3334 10.5871 21.3334 9.46703V6.77291Z" fill="white" fill-opacity="0.3"/>
5
- <path d="M12.4447 16.6107C12.4447 16.1504 12.8178 15.7773 13.278 15.7773H19.1114C19.5716 15.7773 19.9447 16.1504 19.9447 16.6107V17.6003L21.2028 16.8925C21.7583 16.5801 22.4447 16.9815 22.4447 17.6189V21.4358C22.4447 22.0731 21.7583 22.4746 21.2028 22.1621L19.9447 21.4544V22.444C19.9447 22.9042 19.5716 23.2773 19.1114 23.2773H13.278C12.8178 23.2773 12.4447 22.9042 12.4447 22.444V16.6107ZM14.9447 19.1107C15.4049 19.1107 15.778 18.7375 15.778 18.2773C15.778 17.8171 15.4049 17.444 14.9447 17.444C14.4844 17.444 14.1114 17.8171 14.1114 18.2773C14.1114 18.7375 14.4844 19.1107 14.9447 19.1107Z" fill="white"/>
6
- </svg>
@@ -1,13 +0,0 @@
1
- import { type AnchorHTMLAttributes, type PropsWithChildren } from 'react';
2
- interface LinkButtonProps extends PropsWithChildren {
3
- tooltip?: string;
4
- onClick?: () => void;
5
- /** 若使用该参数,则会忽略 onClick,且会在 loading 期间不再触发回调 */
6
- onAsyncClick?: () => Promise<unknown>;
7
- /** @default true */
8
- link?: AnchorHTMLAttributes<HTMLAnchorElement> | boolean;
9
- className?: string;
10
- }
11
- /** typography link 形式的按钮 */
12
- export declare function LinkButton({ tooltip, onClick, onAsyncClick, link, children, className, }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,35 +0,0 @@
1
- export interface AudioRenderProps {
2
- audioUrl?: string;
3
- audioName?: string;
4
- showDownload?: boolean;
5
- /**
6
- * 删除按钮 复合参数
7
- *
8
- * - 若不展示删除按钮,则传 false | undefined
9
- * - 若展示删除按钮,则直接传回调函数
10
- *
11
- * (不叫 delete 是为了避讳 js 关键字)
12
- */
13
- deletion?: false | (() => void);
14
- /**
15
- * 上传态 展示配置
16
- *
17
- * 只有在可编辑表单中需要考虑
18
- */
19
- upload?: {
20
- /**
21
- * loading - 展示 loading 态
22
- * error - 展示 retry 按钮
23
- */
24
- status: 'success' | 'error' | 'loading';
25
- onRetry?: () => void;
26
- };
27
- /**
28
- * @enum 'small' - 整体宽高 36px;icon 宽高 14px
29
- * @enum 'medium' - 整体宽高 80px;icon 宽高 20px
30
- * @default 'small'
31
- */
32
- size?: 'small' | 'medium';
33
- className?: string;
34
- }
35
- export declare function AudioRender({ audioUrl, audioName, className, showDownload, deletion, upload, size, }: AudioRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export { AudioRender, type AudioRenderProps } from './audio-render';
2
- export { VideoRender, type VideoRenderProps } from './video-render';
@@ -1,35 +0,0 @@
1
- export interface VideoRenderProps {
2
- videoName?: string;
3
- videoUrl?: string;
4
- showDownload?: boolean;
5
- /**
6
- * 删除按钮 复合参数
7
- *
8
- * - 若不展示删除按钮,则传 false | undefined
9
- * - 若展示删除按钮,则直接传回调函数
10
- *
11
- * (不叫 delete 是为了避讳 js 关键字)
12
- */
13
- deletion?: false | (() => void);
14
- /**
15
- * 上传态 展示配置
16
- *
17
- * 只有在可编辑表单中需要考虑
18
- */
19
- upload?: {
20
- /**
21
- * loading - 展示 loading 态
22
- * error - 展示 retry 按钮
23
- */
24
- status: 'success' | 'error' | 'loading';
25
- onRetry?: () => void;
26
- };
27
- /**
28
- * @enum 'small' - 整体宽高 36px;icon 宽高 14px
29
- * @enum 'medium' - 整体宽高 80px;icon 宽高 20px
30
- * @default 'small'
31
- */
32
- size?: 'small' | 'medium';
33
- className?: string;
34
- }
35
- export declare function VideoRender({ videoName, videoUrl, showDownload, deletion, upload, size, className, }: VideoRenderProps): import("react/jsx-runtime").JSX.Element;