@cozeloop/components 0.0.12-beta-1772259372242 → 0.0.12-beta-1773302245651
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.css +2 -2
- package/dist/es/index.mjs +83 -96
- package/dist/es/loopIcons.mjs +1 -0
- package/dist/es/rslib-runtime.mjs +40 -0
- package/dist/lib/codemirror-editor/code-editor.d.ts +1 -1
- package/dist/lib/codemirror-editor/json-editor.d.ts +1 -0
- package/dist/lib/codemirror-editor/raw-code-editor.d.ts +1 -0
- package/dist/lib/codemirror-editor/raw-text-editor.d.ts +1 -0
- package/dist/lib/codemirror-editor/text-editor.d.ts +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/primary-page/primary-header.d.ts +2 -1
- package/dist/lib/schema-editor/index.d.ts +2 -1
- package/package.json +6 -4
- package/dist/lib/provider/index.d.ts +0 -19
package/dist/es/index.css
CHANGED
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
height: 42px;
|
|
33
33
|
color: var(--coz-fg-plus);
|
|
34
34
|
background: var(--coz-bg, #f0f0f7);
|
|
35
|
+
background-color: var(--coz-bg, #f0f0f7);
|
|
35
36
|
border-bottom: 1px solid var(--line-color-border-2, #eaedf1);
|
|
36
37
|
padding: 5px 20px;
|
|
37
38
|
font-size: 13px;
|
|
38
39
|
font-weight: 500;
|
|
39
40
|
line-height: 20px;
|
|
40
|
-
background-color: var(--coz-bg, #f0f0f7) !important;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
#loop-table-ZtuuXn .semi-table-row-head:before {
|
|
44
|
-
background-color: var(--coz-bg, #f0f0f7)
|
|
44
|
+
background-color: var(--coz-bg, #f0f0f7);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
#loop-table-ZtuuXn .semi-table-row {
|
package/dist/es/index.mjs
CHANGED
|
@@ -2,10 +2,11 @@ import "./index.css";
|
|
|
2
2
|
import "./static/svg/select.svg";
|
|
3
3
|
import __rslib_svgr_url__1__ from "./static/svg/audio-icon.svg";
|
|
4
4
|
import __rslib_svgr_url__2__ from "./static/svg/video-icon.svg";
|
|
5
|
+
import { __webpack_require__ } from "./rslib-runtime.mjs";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { arrayMove, sortableContainer as external_react_sortable_hoc_sortableContainer, sortableElement, sortableHandle } from "react-sortable-hoc";
|
|
7
|
-
import react, { Fragment as external_react_Fragment,
|
|
8
|
-
import { I18n as i18n_I18n
|
|
8
|
+
import react, { Fragment as external_react_Fragment, forwardRef, isValidElement, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
9
|
+
import { I18n as i18n_I18n } from "@cozeloop/i18n";
|
|
9
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";
|
|
10
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";
|
|
11
12
|
import classnames from "classnames";
|
|
@@ -21,10 +22,11 @@ import { ContentType } from "@cozeloop/api-schema/evaluation";
|
|
|
21
22
|
import { ItemErrorType, StorageProvider } from "@cozeloop/api-schema/data";
|
|
22
23
|
import { ContentType as prompt_ContentType } from "@cozeloop/api-schema/prompt";
|
|
23
24
|
import { withTheme } from "@rjsf/core";
|
|
24
|
-
import
|
|
25
|
+
import { defaultKeymap, history as commands_history, historyKeymap } from "@codemirror/commands";
|
|
25
26
|
import { TranslatableString, ariaDescribedByIds, canExpand, enumOptionsIndexForValue, enumOptionsValueForIndex, errorId, examplesId, getInputProps, getSubmitButtonOptions, getTemplate, getUiOptions, optionId, rangeSpec } from "@rjsf/utils";
|
|
26
27
|
import { useMouseDownOffset as hooks_useMouseDownOffset } from "@cozeloop/hooks";
|
|
27
28
|
import dayjs from "dayjs";
|
|
29
|
+
import { useReportEvent } from "@cozeloop/config-provider";
|
|
28
30
|
import { EditorProvider, createRenderer, option as react_option } from "@coze-editor/editor/react";
|
|
29
31
|
import preset_code, { createTheme, languages, tags, themes, transformerCreator } from "@coze-editor/editor/preset-code";
|
|
30
32
|
import { typescript } from "@coze-editor/editor/language-typescript";
|
|
@@ -33,31 +35,9 @@ import { python } from "@coze-editor/editor/language-python";
|
|
|
33
35
|
import { json } from "@coze-editor/editor/language-json";
|
|
34
36
|
import { mixLanguages } from "@coze-editor/editor";
|
|
35
37
|
import { EditorView, keymap } from "@codemirror/view";
|
|
38
|
+
import { markdownLanguage } from "@codemirror/lang-markdown";
|
|
36
39
|
import { goLanguage } from "@codemirror/lang-go";
|
|
37
40
|
import preset_universal from "@coze-editor/editor/preset-universal";
|
|
38
|
-
import { defaultKeymap, history as commands_history, historyKeymap } from "@codemirror/commands";
|
|
39
|
-
var __webpack_require__ = {};
|
|
40
|
-
(()=>{
|
|
41
|
-
__webpack_require__.d = (exports, definition)=>{
|
|
42
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: definition[key]
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
})();
|
|
48
|
-
(()=>{
|
|
49
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
50
|
-
})();
|
|
51
|
-
(()=>{
|
|
52
|
-
__webpack_require__.r = (exports)=>{
|
|
53
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
54
|
-
value: 'Module'
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(exports, '__esModule', {
|
|
57
|
-
value: true
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
})();
|
|
61
41
|
var external_react_sortable_hoc_namespaceObject = {};
|
|
62
42
|
__webpack_require__.r(external_react_sortable_hoc_namespaceObject);
|
|
63
43
|
__webpack_require__.d(external_react_sortable_hoc_namespaceObject, {
|
|
@@ -1076,11 +1056,11 @@ const dealColumnsWithStorage = (storageKey, columns)=>{
|
|
|
1076
1056
|
checked: sort[column.key]?.checked ?? true
|
|
1077
1057
|
}));
|
|
1078
1058
|
};
|
|
1079
|
-
const PrimaryPage = ({ pageTitle, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps })=>/*#__PURE__*/ jsxs("div", {
|
|
1059
|
+
const PrimaryPage = ({ pageTitle, renderCustomHeader, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps })=>/*#__PURE__*/ jsxs("div", {
|
|
1080
1060
|
className: classnames('pt-2 pb-3 h-full max-h-full flex flex-col', className),
|
|
1081
1061
|
...restProps,
|
|
1082
1062
|
children: [
|
|
1083
|
-
pageTitle || titleSlot ? /*#__PURE__*/ jsxs("div", {
|
|
1063
|
+
renderCustomHeader ? renderCustomHeader : pageTitle || titleSlot ? /*#__PURE__*/ jsxs("div", {
|
|
1084
1064
|
className: classnames('flex items-center justify-between py-4 px-6', headerClassName),
|
|
1085
1065
|
children: [
|
|
1086
1066
|
/*#__PURE__*/ jsx("div", {
|
|
@@ -4518,40 +4498,6 @@ function TitleWithSub({ title, subTitle, className }) {
|
|
|
4518
4498
|
]
|
|
4519
4499
|
});
|
|
4520
4500
|
}
|
|
4521
|
-
const CozeLoopContext = /*#__PURE__*/ createContext({});
|
|
4522
|
-
function CozeLoopProvider({ children, defaultLanguage, resources, sendEvent }) {
|
|
4523
|
-
const isInitialized = useRef(false);
|
|
4524
|
-
const [initialized, setInitialized] = useState(false);
|
|
4525
|
-
useEffect(()=>{
|
|
4526
|
-
if (resources && !isInitialized.current) initIntl({
|
|
4527
|
-
lng: defaultLanguage,
|
|
4528
|
-
resources
|
|
4529
|
-
}).then(()=>{
|
|
4530
|
-
isInitialized.current = true;
|
|
4531
|
-
setInitialized(true);
|
|
4532
|
-
}).catch((error)=>{
|
|
4533
|
-
console.error('Error initializing intl:', error);
|
|
4534
|
-
isInitialized.current = true;
|
|
4535
|
-
setInitialized(true);
|
|
4536
|
-
});
|
|
4537
|
-
}, [
|
|
4538
|
-
resources,
|
|
4539
|
-
defaultLanguage
|
|
4540
|
-
]);
|
|
4541
|
-
if (!initialized) return /*#__PURE__*/ jsx(PageLoading, {});
|
|
4542
|
-
return /*#__PURE__*/ jsx(CozeLoopContext.Provider, {
|
|
4543
|
-
value: {
|
|
4544
|
-
sendEvent
|
|
4545
|
-
},
|
|
4546
|
-
children: children
|
|
4547
|
-
});
|
|
4548
|
-
}
|
|
4549
|
-
function useReportEvent() {
|
|
4550
|
-
const context = useContext(CozeLoopContext);
|
|
4551
|
-
return context.sendEvent ?? ((name, params)=>{
|
|
4552
|
-
console.info(name, params);
|
|
4553
|
-
});
|
|
4554
|
-
}
|
|
4555
4501
|
function FooterActions({ confirmBtnProps: { text: confirmBtnText, ...confirmBtnProps } = {}, cancelBtnProps: { text: cancelBtnText, ...cancelBtnProps } = {} }) {
|
|
4556
4502
|
return /*#__PURE__*/ jsxs("div", {
|
|
4557
4503
|
className: "flex justify-end",
|
|
@@ -4572,9 +4518,15 @@ function FooterActions({ confirmBtnProps: { text: confirmBtnText, ...confirmBtnP
|
|
|
4572
4518
|
function TableEmpty({ className, ...props }) {
|
|
4573
4519
|
return /*#__PURE__*/ jsx(EmptyState, {
|
|
4574
4520
|
className: classnames('my-10', className),
|
|
4575
|
-
icon: /*#__PURE__*/ jsx(IconCozIllusNone, {
|
|
4576
|
-
|
|
4577
|
-
|
|
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'),
|
|
4578
4530
|
...props
|
|
4579
4531
|
});
|
|
4580
4532
|
}
|
|
@@ -5192,15 +5144,6 @@ const ResizableSideSheet = (props)=>{
|
|
|
5192
5144
|
]
|
|
5193
5145
|
});
|
|
5194
5146
|
};
|
|
5195
|
-
var enum_EventNames = /*#__PURE__*/ function(EventNames) {
|
|
5196
|
-
EventNames["INIT_LOOP_FORM"] = "init_loop_form";
|
|
5197
|
-
EventNames["LOOP_FORM_FIELD_VALIDATE_ERROR"] = "loop_form_field_validate_error";
|
|
5198
|
-
EventNames["LOOP_FORM_SUBMIT_INTERFACE_ERROR"] = "loop_form_submit_interface_error";
|
|
5199
|
-
EventNames["LOOP_FORM_SUBMIT_SUCCESS"] = "loop_form_submit_success";
|
|
5200
|
-
EventNames["LOOP_FORM_FIELD_CHANGE_TIMELINE"] = "loop_form_field_change_timeline";
|
|
5201
|
-
EventNames["LOOP_FORM_CLOSE"] = "loop_form_close";
|
|
5202
|
-
return EventNames;
|
|
5203
|
-
}({});
|
|
5204
5147
|
function safeStringify(obj) {
|
|
5205
5148
|
return JSON.stringify(obj, (_, value)=>{
|
|
5206
5149
|
if (/*#__PURE__*/ isValidElement(value)) return '[ReactElement]';
|
|
@@ -5226,7 +5169,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5226
5169
|
validateErrorCount.current = validateErrorCount.current + 1;
|
|
5227
5170
|
const validateErrorTime = Date.now();
|
|
5228
5171
|
const errorKeys = Object.keys(error) || [];
|
|
5229
|
-
sendEvent(
|
|
5172
|
+
sendEvent("loop_form_field_validate_error", {
|
|
5230
5173
|
form_id: formID,
|
|
5231
5174
|
session_id: sessionID,
|
|
5232
5175
|
form_item_error_count: errorKeys.length,
|
|
@@ -5240,7 +5183,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5240
5183
|
if (isInterfaceError) {
|
|
5241
5184
|
firstValidateSuccess.current = false;
|
|
5242
5185
|
interfaceErrorCount.current = interfaceErrorCount.current + 1;
|
|
5243
|
-
sendEvent?.(
|
|
5186
|
+
sendEvent?.("loop_form_submit_interface_error", {
|
|
5244
5187
|
form_id: formID,
|
|
5245
5188
|
session_id: sessionID,
|
|
5246
5189
|
form_interface_error_detail: JSON.stringify(error || {}),
|
|
@@ -5254,7 +5197,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5254
5197
|
const formItemShow = Object.keys(values);
|
|
5255
5198
|
const formItemFilled = formItemShow.filter((key)=>values[key]);
|
|
5256
5199
|
const successTime = Date.now();
|
|
5257
|
-
sendEvent?.(
|
|
5200
|
+
sendEvent?.("loop_form_submit_success", {
|
|
5258
5201
|
form_id: formID,
|
|
5259
5202
|
session_id: sessionID,
|
|
5260
5203
|
form_complete_consume_time: Date.now() - startTimeRef.current,
|
|
@@ -5362,7 +5305,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5362
5305
|
};
|
|
5363
5306
|
const onFormClose = ()=>{
|
|
5364
5307
|
const closeTime = Date.now();
|
|
5365
|
-
sendEvent?.(
|
|
5308
|
+
sendEvent?.("loop_form_close", {
|
|
5366
5309
|
form_id: formIdRef.current,
|
|
5367
5310
|
session_id: sessionIdRef.current,
|
|
5368
5311
|
form_no_operation: noOperation.current,
|
|
@@ -5405,7 +5348,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5405
5348
|
useEffect(()=>{
|
|
5406
5349
|
if (sessionID && formID) {
|
|
5407
5350
|
const initTime = Date.now();
|
|
5408
|
-
sendEvent?.(
|
|
5351
|
+
sendEvent?.("init_loop_form", {
|
|
5409
5352
|
form_id: formID,
|
|
5410
5353
|
session_id: sessionID,
|
|
5411
5354
|
time: initTime,
|
|
@@ -5416,7 +5359,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5416
5359
|
if (formID && sessionID && !flushedRef.current) {
|
|
5417
5360
|
flushedRef.current = true;
|
|
5418
5361
|
try {
|
|
5419
|
-
sendEvent?.(
|
|
5362
|
+
sendEvent?.("loop_form_field_change_timeline", {
|
|
5420
5363
|
form_id: formID,
|
|
5421
5364
|
session_id: sessionID,
|
|
5422
5365
|
time_line: JSON.stringify(operationTimelineRef.current)
|
|
@@ -5440,7 +5383,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
|
|
|
5440
5383
|
if (!fid || !sid) return;
|
|
5441
5384
|
flushedRef.current = true;
|
|
5442
5385
|
try {
|
|
5443
|
-
sendEvent?.(
|
|
5386
|
+
sendEvent?.("loop_form_field_change_timeline", {
|
|
5444
5387
|
form_id: fid,
|
|
5445
5388
|
session_id: sid,
|
|
5446
5389
|
time_line: JSON.stringify(operationTimelineRef.current)
|
|
@@ -5748,6 +5691,9 @@ languages.register("typescript", typescript);
|
|
|
5748
5691
|
languages.register('go', {
|
|
5749
5692
|
language: goLanguage
|
|
5750
5693
|
});
|
|
5694
|
+
languages.register('markdown', {
|
|
5695
|
+
language: markdownLanguage
|
|
5696
|
+
});
|
|
5751
5697
|
themes.register('coze-light', cozeLight);
|
|
5752
5698
|
themes.register('coze-dark', cozeDark);
|
|
5753
5699
|
const minHeightOption = (value)=>EditorView.theme({
|
|
@@ -5783,6 +5729,20 @@ const lineHeightOption = (value)=>EditorView.theme({
|
|
|
5783
5729
|
lineHeight: 'number' == typeof value ? `${value}px` : 'string' == typeof value ? value : 'unset'
|
|
5784
5730
|
}
|
|
5785
5731
|
});
|
|
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
|
+
});
|
|
5786
5746
|
function createStyleOptions() {
|
|
5787
5747
|
return [
|
|
5788
5748
|
react_option('minHeight', minHeightOption),
|
|
@@ -5790,7 +5750,8 @@ function createStyleOptions() {
|
|
|
5790
5750
|
react_option('editorHeight', heightOption),
|
|
5791
5751
|
react_option('borderRadius', borderRadiusOption),
|
|
5792
5752
|
react_option('padding', paddingOption),
|
|
5793
|
-
react_option('lineHeight', lineHeightOption)
|
|
5753
|
+
react_option('lineHeight', lineHeightOption),
|
|
5754
|
+
react_option('backgroundColor', backgroundColorOption)
|
|
5794
5755
|
];
|
|
5795
5756
|
}
|
|
5796
5757
|
const builtinExtensions = [
|
|
@@ -5830,6 +5791,11 @@ const text_editor_lineHeightOption = (value)=>EditorView.theme({
|
|
|
5830
5791
|
lineHeight: 'number' == typeof value ? `${value}px` : 'string' == typeof value ? value : 'unset'
|
|
5831
5792
|
}
|
|
5832
5793
|
});
|
|
5794
|
+
const text_editor_backgroundColorOption = (value)=>EditorView.theme({
|
|
5795
|
+
'.cm-content, .cm-gutter, .cm-right-gutter': {
|
|
5796
|
+
backgroundColor: value ? `${value} !important` : 'unset'
|
|
5797
|
+
}
|
|
5798
|
+
});
|
|
5833
5799
|
const extensions = [
|
|
5834
5800
|
mixLanguages({}),
|
|
5835
5801
|
RawEditorTheme,
|
|
@@ -5842,7 +5808,8 @@ const extensions = [
|
|
|
5842
5808
|
const CodeMirrorTextEditor = createRenderer([
|
|
5843
5809
|
...preset_universal,
|
|
5844
5810
|
react_option('minHeight', text_editor_minHeightOption),
|
|
5845
|
-
react_option('lineHeight', text_editor_lineHeightOption)
|
|
5811
|
+
react_option('lineHeight', text_editor_lineHeightOption),
|
|
5812
|
+
react_option('backgroundColor', text_editor_backgroundColorOption)
|
|
5846
5813
|
], extensions);
|
|
5847
5814
|
const json_editor_extensions = [
|
|
5848
5815
|
EditorView.theme({
|
|
@@ -5881,7 +5848,7 @@ const transformer = transformerCreator((text)=>{
|
|
|
5881
5848
|
return text;
|
|
5882
5849
|
});
|
|
5883
5850
|
const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
5884
|
-
const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur } = props;
|
|
5851
|
+
const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur, backgroundColor } = props;
|
|
5885
5852
|
const apiRef = useRef(null);
|
|
5886
5853
|
const handleChange = useCallback((e)=>{
|
|
5887
5854
|
if ('function' == typeof onChange) onChange(e.value);
|
|
@@ -5927,14 +5894,15 @@ const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
|
5927
5894
|
theme: isDarkTheme ? 'coze-dark' : 'coze-light',
|
|
5928
5895
|
languageId: 'json',
|
|
5929
5896
|
editable: !readonly,
|
|
5930
|
-
transformer,
|
|
5897
|
+
transformer: transformer,
|
|
5931
5898
|
minHeight,
|
|
5932
5899
|
maxHeight,
|
|
5933
5900
|
editorHeight,
|
|
5934
5901
|
borderRadius,
|
|
5935
5902
|
padding,
|
|
5936
5903
|
fontSize: 13,
|
|
5937
|
-
lineHeight: 20
|
|
5904
|
+
lineHeight: 20,
|
|
5905
|
+
backgroundColor
|
|
5938
5906
|
},
|
|
5939
5907
|
didMount: (api)=>apiRef.current = api,
|
|
5940
5908
|
extensions: json_editor_extensions,
|
|
@@ -5945,7 +5913,7 @@ const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
|
5945
5913
|
});
|
|
5946
5914
|
});
|
|
5947
5915
|
const CodeMirrorRawTextEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5948
|
-
const { value, onChange, placeholder, className, minHeight, readonly } = props;
|
|
5916
|
+
const { value, onChange, placeholder, className, minHeight, readonly, backgroundColor } = props;
|
|
5949
5917
|
const apiRef = useRef(null);
|
|
5950
5918
|
const handleChange = useCallback((e)=>{
|
|
5951
5919
|
if ('function' == typeof onChange) onChange(e.value);
|
|
@@ -5972,7 +5940,8 @@ const CodeMirrorRawTextEditor = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
5972
5940
|
minHeight,
|
|
5973
5941
|
fontSize: 13,
|
|
5974
5942
|
editable: !readonly,
|
|
5975
|
-
lineHeight: 20
|
|
5943
|
+
lineHeight: 20,
|
|
5944
|
+
backgroundColor
|
|
5976
5945
|
},
|
|
5977
5946
|
didMount: (api)=>apiRef.current = api
|
|
5978
5947
|
})
|
|
@@ -6016,7 +5985,7 @@ const raw_code_editor_transformer = transformerCreator((text)=>{
|
|
|
6016
5985
|
return text;
|
|
6017
5986
|
});
|
|
6018
5987
|
const CodeMirrorRawCodeEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
6019
|
-
const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur, language = 'shell' } = props;
|
|
5988
|
+
const { value, onChange, placeholder, className, isDarkTheme, readonly, minHeight = '100px', maxHeight, editorHeight, padding, borderRadius, onFocus, onBlur, language = 'shell', backgroundColor } = props;
|
|
6020
5989
|
const apiRef = useRef(null);
|
|
6021
5990
|
const handleChange = useCallback((e)=>{
|
|
6022
5991
|
if ('function' == typeof onChange) onChange(e.value);
|
|
@@ -6069,7 +6038,8 @@ const CodeMirrorRawCodeEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
|
6069
6038
|
borderRadius,
|
|
6070
6039
|
padding,
|
|
6071
6040
|
fontSize: 13,
|
|
6072
|
-
lineHeight: 20
|
|
6041
|
+
lineHeight: 20,
|
|
6042
|
+
backgroundColor
|
|
6073
6043
|
},
|
|
6074
6044
|
didMount: (api)=>apiRef.current = api,
|
|
6075
6045
|
extensions: raw_code_editor_extensions,
|
|
@@ -6079,23 +6049,37 @@ const CodeMirrorRawCodeEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
|
|
|
6079
6049
|
})
|
|
6080
6050
|
});
|
|
6081
6051
|
});
|
|
6082
|
-
const SchemaEditor = ({ value, onChange, placeholder, readOnly, language, className })=>/*#__PURE__*/ jsx("div", {
|
|
6083
|
-
className: classnames('w-full h-[500px] border border-solid
|
|
6084
|
-
'opacity-70': readOnly
|
|
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
|
|
6085
6056
|
}, className),
|
|
6057
|
+
style: backgroundColor ? {
|
|
6058
|
+
backgroundColor
|
|
6059
|
+
} : void 0,
|
|
6086
6060
|
children: 'json' === language ? /*#__PURE__*/ jsx(CodeMirrorJsonEditor, {
|
|
6087
6061
|
className: "w-full h-full overflow-y-auto",
|
|
6088
6062
|
onChange: onChange,
|
|
6089
6063
|
value: value || '',
|
|
6090
6064
|
placeholder: placeholder,
|
|
6091
6065
|
readonly: readOnly,
|
|
6092
|
-
borderRadius: 4
|
|
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
|
|
6093
6076
|
}) : /*#__PURE__*/ jsx(CodeMirrorRawTextEditor, {
|
|
6094
6077
|
className: "w-full h-full overflow-y-auto",
|
|
6095
6078
|
onChange: onChange,
|
|
6096
6079
|
value: value || '',
|
|
6097
6080
|
placeholder: placeholder,
|
|
6098
|
-
readonly: readOnly
|
|
6081
|
+
readonly: readOnly,
|
|
6082
|
+
backgroundColor: backgroundColor
|
|
6099
6083
|
})
|
|
6100
6084
|
});
|
|
6101
6085
|
const code_editor_with_loading_index_module = {
|
|
@@ -6414,4 +6398,7 @@ function VideoRender({ videoName, videoUrl, showDownload, deletion, upload, size
|
|
|
6414
6398
|
]
|
|
6415
6399
|
});
|
|
6416
6400
|
}
|
|
6417
|
-
|
|
6401
|
+
var src_DEFAULT_FILE_COUNT = 20;
|
|
6402
|
+
var src_DEFAULT_PART_COUNT = 50;
|
|
6403
|
+
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 };
|
package/dist/es/loopIcons.mjs
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "./index.css";
|
|
2
|
+
var __webpack_modules__ = {};
|
|
3
|
+
var __webpack_module_cache__ = {};
|
|
4
|
+
function __webpack_require__(moduleId) {
|
|
5
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
6
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
7
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
8
|
+
exports: {}
|
|
9
|
+
};
|
|
10
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
11
|
+
return module.exports;
|
|
12
|
+
}
|
|
13
|
+
__webpack_require__.m = __webpack_modules__;
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.add = function(modules) {
|
|
16
|
+
Object.assign(__webpack_require__.m, modules);
|
|
17
|
+
};
|
|
18
|
+
})();
|
|
19
|
+
(()=>{
|
|
20
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
21
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: definition[key]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
(()=>{
|
|
28
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
29
|
+
})();
|
|
30
|
+
(()=>{
|
|
31
|
+
__webpack_require__.r = (exports)=>{
|
|
32
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
33
|
+
value: 'Module'
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, '__esModule', {
|
|
36
|
+
value: true
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
export { __webpack_require__ };
|
|
@@ -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").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").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: {
|
|
2
2
|
from: number;
|
|
3
3
|
to: number;
|
|
4
4
|
text: string;
|
|
@@ -14,6 +14,7 @@ interface BaseJsonEditorProps {
|
|
|
14
14
|
borderRadius?: string | number;
|
|
15
15
|
onFocus?: () => void;
|
|
16
16
|
onBlur?: () => void;
|
|
17
|
+
backgroundColor?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare const CodeMirrorJsonEditor: React.ForwardRefExoticComponent<BaseJsonEditorProps & React.RefAttributes<unknown>>;
|
|
19
20
|
export {};
|
|
@@ -15,6 +15,7 @@ interface BaseCodeEditorProps {
|
|
|
15
15
|
language?: string;
|
|
16
16
|
onFocus?: () => void;
|
|
17
17
|
onBlur?: () => void;
|
|
18
|
+
backgroundColor?: string;
|
|
18
19
|
}
|
|
19
20
|
export declare const CodeMirrorRawCodeEditor: React.ForwardRefExoticComponent<BaseCodeEditorProps & React.RefAttributes<unknown>>;
|
|
20
21
|
export {};
|
|
@@ -6,6 +6,7 @@ interface CodeMirrorRawTextEditorProps {
|
|
|
6
6
|
dataTestID?: string;
|
|
7
7
|
placeholder?: string | HTMLElement;
|
|
8
8
|
minHeight?: string | number;
|
|
9
|
+
backgroundColor?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const CodeMirrorRawTextEditor: import("react").ForwardRefExoticComponent<CodeMirrorRawTextEditorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
12
|
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").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").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: {
|
|
2
2
|
from: number;
|
|
3
3
|
to: number;
|
|
4
4
|
text: string;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ export { InputWithCount } from './input-with-count';
|
|
|
59
59
|
export { LoopRadioGroup } from './loop-radio-group';
|
|
60
60
|
export { Layout } from './layout';
|
|
61
61
|
export { TitleWithSub } from './title-with-sub';
|
|
62
|
-
export { CozeLoopProvider, useReportEvent } from './provider';
|
|
63
62
|
export { FooterActions } from './footer-actions';
|
|
64
63
|
export { TableEmpty } from './table-empty';
|
|
65
64
|
export { CardPane } from './card-pane';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
interface PrimaryPageHeaderProps {
|
|
3
3
|
pageTitle?: ReactNode;
|
|
4
|
+
renderCustomHeader?: ReactNode;
|
|
4
5
|
filterSlot?: ReactNode;
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
headerClassName?: string;
|
|
@@ -9,5 +10,5 @@ interface PrimaryPageHeaderProps {
|
|
|
9
10
|
className?: string;
|
|
10
11
|
titleSlot?: ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export declare const PrimaryPage: ({ pageTitle, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps }: PrimaryPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const PrimaryPage: ({ pageTitle, renderCustomHeader, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps }: PrimaryPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -6,6 +6,7 @@ interface SchemaEditorProps {
|
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
showLineNumbs?: boolean;
|
|
8
8
|
className?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare const SchemaEditor: ({ value, onChange, placeholder, readOnly, language, className, }: SchemaEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const SchemaEditor: ({ value, onChange, placeholder, readOnly, language, className, backgroundColor, }: SchemaEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cozeloop/components",
|
|
3
|
-
"version": "0.0.12-beta-
|
|
3
|
+
"version": "0.0.12-beta-1773302245651",
|
|
4
4
|
"description": "common components for cozeloop",
|
|
5
5
|
"author": "houtao.zzj@bytedance.com",
|
|
6
6
|
"exports": {
|
|
@@ -30,13 +30,15 @@
|
|
|
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",
|
|
33
34
|
"@codemirror/state": "^6.4.1",
|
|
34
35
|
"@codemirror/view": "^6.34.1",
|
|
35
|
-
"@coze-arch/coze-design": "0.0.7-alpha.
|
|
36
|
-
"@coze-editor/editor": "0.1.0-alpha.
|
|
36
|
+
"@coze-arch/coze-design": "0.0.7-alpha.5f0418",
|
|
37
|
+
"@coze-editor/editor": "0.1.0-alpha.02803c",
|
|
37
38
|
"@cozeloop/api-schema": "0.1.6",
|
|
39
|
+
"@cozeloop/config-provider": "0.0.12-beta-1773302245651",
|
|
38
40
|
"@cozeloop/hooks": "0.0.1",
|
|
39
|
-
"@cozeloop/i18n": "0.0.
|
|
41
|
+
"@cozeloop/i18n": "0.0.12-beta-1773302245651",
|
|
40
42
|
"@cozeloop/toolkit": "0.0.5",
|
|
41
43
|
"@monaco-editor/react": "^4.5.2",
|
|
42
44
|
"@rjsf/core": "~5.24.9",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
interface CozeLoopContextValue {
|
|
3
|
-
resources?: {
|
|
4
|
-
'zh-CN': {
|
|
5
|
-
translation: Record<string, string>;
|
|
6
|
-
};
|
|
7
|
-
'en-US': {
|
|
8
|
-
translation: Record<string, string>;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
defaultLanguage?: string;
|
|
12
|
-
sendEvent?: (name: string, params: Record<string, unknown>, target?: HTMLElement | string | null) => void;
|
|
13
|
-
}
|
|
14
|
-
interface CozeLoopProviderProps extends CozeLoopContextValue {
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
}
|
|
17
|
-
export declare function CozeLoopProvider({ children, defaultLanguage, resources, sendEvent, }: CozeLoopProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function useReportEvent(): (name: string, params: Record<string, unknown>, target?: HTMLElement | string | null) => void;
|
|
19
|
-
export {};
|