@cozeloop/components 0.0.5 → 0.0.7-beta-1766595012100
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 +11 -27
- package/dist/es/{index.js → index.mjs} +495 -449
- package/dist/lib/code-editor-with-loading/index.d.ts +10 -0
- package/dist/lib/codemirror-editor/code-editor.d.ts +23 -2
- package/dist/lib/codemirror-editor/index.d.ts +2 -0
- package/dist/lib/codemirror-editor/json-editor.d.ts +1 -1
- package/dist/lib/codemirror-editor/raw-code-editor.d.ts +20 -0
- package/dist/lib/codemirror-editor/text-editor.d.ts +23 -2
- package/dist/lib/collapse-card/index.d.ts +2 -1
- package/dist/lib/copyable/index.d.ts +5 -0
- package/dist/lib/hooks/use-unsave-leave-warning.d.ts +4 -1
- package/dist/lib/index.d.ts +5 -5
- package/dist/lib/logic-editor/logic-editor.d.ts +2 -4
- package/dist/lib/logic-editor/logic-types.d.ts +6 -2
- package/dist/lib/loop-icons/index.d.ts +1 -0
- package/dist/lib/multi-part-editor/type.d.ts +1 -1
- package/dist/lib/provider/index.d.ts +10 -9
- package/dist/lib/table/sort-icon.d.ts +3 -3
- package/package.json +23 -25
- package/dist/lib/base-search-select/base-search-form-select.js +0 -6
- package/dist/lib/base-search-select/base-search-form-select.js.map +0 -1
- package/dist/lib/base-search-select/base-search-select.js +0 -127
- package/dist/lib/base-search-select/base-search-select.js.map +0 -1
- package/dist/lib/base-search-select/index.js +0 -3
- package/dist/lib/base-search-select/index.js.map +0 -1
- package/dist/lib/base-search-select/types.js +0 -2
- package/dist/lib/base-search-select/types.js.map +0 -1
- package/dist/lib/base-search-select/utils.js +0 -48
- package/dist/lib/base-search-select/utils.js.map +0 -1
- package/dist/lib/basic-card/index.js +0 -4
- package/dist/lib/basic-card/index.js.map +0 -1
- package/dist/lib/card-pane/index.js +0 -9
- package/dist/lib/card-pane/index.js.map +0 -1
- package/dist/lib/chip-select/index.js +0 -6
- package/dist/lib/chip-select/index.js.map +0 -1
- package/dist/lib/code-editor/index.js +0 -9
- package/dist/lib/code-editor/index.js.map +0 -1
- package/dist/lib/code-usage/index.d.ts +0 -14
- package/dist/lib/code-usage/index.js +0 -31
- package/dist/lib/code-usage/index.js.map +0 -1
- package/dist/lib/codemirror-editor/code-editor.js +0 -108
- package/dist/lib/codemirror-editor/code-editor.js.map +0 -1
- package/dist/lib/codemirror-editor/index.js +0 -5
- package/dist/lib/codemirror-editor/index.js.map +0 -1
- package/dist/lib/codemirror-editor/json-editor.js +0 -97
- package/dist/lib/codemirror-editor/json-editor.js.map +0 -1
- package/dist/lib/codemirror-editor/raw-text-editor.js +0 -32
- package/dist/lib/codemirror-editor/raw-text-editor.js.map +0 -1
- package/dist/lib/codemirror-editor/text-editor.js +0 -44
- package/dist/lib/codemirror-editor/text-editor.js.map +0 -1
- package/dist/lib/codemirror-editor/themes/coze-dark.js +0 -113
- package/dist/lib/codemirror-editor/themes/coze-dark.js.map +0 -1
- package/dist/lib/codemirror-editor/themes/coze-light.js +0 -119
- package/dist/lib/codemirror-editor/themes/coze-light.js.map +0 -1
- package/dist/lib/collapse-card/index.js +0 -31
- package/dist/lib/collapse-card/index.js.map +0 -1
- package/dist/lib/collapsible-card/index.js +0 -13
- package/dist/lib/collapsible-card/index.js.map +0 -1
- package/dist/lib/column-manage-storage/index.js +0 -48
- package/dist/lib/column-manage-storage/index.js.map +0 -1
- package/dist/lib/columns-select/index.js +0 -77
- package/dist/lib/columns-select/index.js.map +0 -1
- package/dist/lib/edit-icon-button/index.js +0 -13
- package/dist/lib/edit-icon-button/index.js.map +0 -1
- package/dist/lib/footer-actions/index.js +0 -9
- package/dist/lib/footer-actions/index.js.map +0 -1
- package/dist/lib/hooks/use-infinite-scroll.js +0 -133
- package/dist/lib/hooks/use-infinite-scroll.js.map +0 -1
- package/dist/lib/hooks/use-mouse-down-offset.js +0 -39
- package/dist/lib/hooks/use-mouse-down-offset.js.map +0 -1
- package/dist/lib/hooks/use-unsave-leave-warning.js +0 -33
- package/dist/lib/hooks/use-unsave-leave-warning.js.map +0 -1
- package/dist/lib/id-render/icon-button-container.js +0 -8
- package/dist/lib/id-render/icon-button-container.js.map +0 -1
- package/dist/lib/id-render/index.js +0 -21
- package/dist/lib/id-render/index.js.map +0 -1
- package/dist/lib/index-controller/record-navigation.js +0 -9
- package/dist/lib/index-controller/record-navigation.js.map +0 -1
- package/dist/lib/index-controller/use-item-index-controller.js +0 -123
- package/dist/lib/index-controller/use-item-index-controller.js.map +0 -1
- package/dist/lib/index.js +0 -76
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/infinite-scroll-table/index.js +0 -34
- package/dist/lib/infinite-scroll-table/index.js.map +0 -1
- package/dist/lib/info-tooltip/index.js +0 -9
- package/dist/lib/info-tooltip/index.js.map +0 -1
- package/dist/lib/input-components/radio-button.js +0 -21
- package/dist/lib/input-components/radio-button.js.map +0 -1
- package/dist/lib/input-slider/index.js +0 -81
- package/dist/lib/input-slider/index.js.map +0 -1
- package/dist/lib/input-with-count/index.js +0 -7
- package/dist/lib/input-with-count/index.js.map +0 -1
- package/dist/lib/jump-button/jump-icon-button.js +0 -7
- package/dist/lib/jump-button/jump-icon-button.js.map +0 -1
- package/dist/lib/large-txt-render/index.js +0 -26
- package/dist/lib/large-txt-render/index.js.map +0 -1
- package/dist/lib/layout/content.js +0 -5
- package/dist/lib/layout/content.js.map +0 -1
- package/dist/lib/layout/header.js +0 -6
- package/dist/lib/layout/header.js.map +0 -1
- package/dist/lib/layout/index.js +0 -9
- package/dist/lib/layout/index.js.map +0 -1
- package/dist/lib/layout/tabs.js +0 -10
- package/dist/lib/layout/tabs.js.map +0 -1
- package/dist/lib/lazy-load-component/index.js +0 -42
- package/dist/lib/lazy-load-component/index.js.map +0 -1
- package/dist/lib/logic-editor/index.js +0 -3
- package/dist/lib/logic-editor/index.js.map +0 -1
- package/dist/lib/logic-editor/logic-editor.js +0 -69
- package/dist/lib/logic-editor/logic-editor.js.map +0 -1
- package/dist/lib/logic-editor/logic-left-render.js +0 -60
- package/dist/lib/logic-editor/logic-left-render.js.map +0 -1
- package/dist/lib/logic-editor/logic-operator-render.js +0 -29
- package/dist/lib/logic-editor/logic-operator-render.js.map +0 -1
- package/dist/lib/logic-editor/logic-right-render.js +0 -25
- package/dist/lib/logic-editor/logic-right-render.js.map +0 -1
- package/dist/lib/logic-editor/logic-types.js +0 -136
- package/dist/lib/logic-editor/logic-types.js.map +0 -1
- package/dist/lib/logic-editor/utils.js +0 -18
- package/dist/lib/logic-editor/utils.js.map +0 -1
- package/dist/lib/logic-expr/consts.js +0 -5
- package/dist/lib/logic-expr/consts.js.map +0 -1
- package/dist/lib/logic-expr/expr-group-render.js +0 -61
- package/dist/lib/logic-expr/expr-group-render.js.map +0 -1
- package/dist/lib/logic-expr/expr-render.js +0 -85
- package/dist/lib/logic-expr/expr-render.js.map +0 -1
- package/dist/lib/logic-expr/index.js +0 -2
- package/dist/lib/logic-expr/index.js.map +0 -1
- package/dist/lib/logic-expr/logic-expr.js +0 -187
- package/dist/lib/logic-expr/logic-expr.js.map +0 -1
- package/dist/lib/logic-expr/logic-not.js +0 -21
- package/dist/lib/logic-expr/logic-not.js.map +0 -1
- package/dist/lib/logic-expr/logic-toggle.js +0 -33
- package/dist/lib/logic-expr/logic-toggle.js.map +0 -1
- package/dist/lib/logic-expr/types.js +0 -2
- package/dist/lib/logic-expr/types.js.map +0 -1
- package/dist/lib/loop-radio-group/index.js +0 -7
- package/dist/lib/loop-radio-group/index.js.map +0 -1
- package/dist/lib/multi-part-editor/components/image-item-renderer.js +0 -57
- package/dist/lib/multi-part-editor/components/image-item-renderer.js.map +0 -1
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.js +0 -25
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.js.map +0 -1
- package/dist/lib/multi-part-editor/components/url-input-modal.js +0 -150
- package/dist/lib/multi-part-editor/components/url-input-modal.js.map +0 -1
- package/dist/lib/multi-part-editor/components/video-item-renderer.js +0 -57
- package/dist/lib/multi-part-editor/components/video-item-renderer.js.map +0 -1
- package/dist/lib/multi-part-editor/index.js +0 -300
- package/dist/lib/multi-part-editor/index.js.map +0 -1
- package/dist/lib/multi-part-editor/multi-part-render.js +0 -40
- package/dist/lib/multi-part-editor/multi-part-render.js.map +0 -1
- package/dist/lib/multi-part-editor/type.js +0 -25
- package/dist/lib/multi-part-editor/type.js.map +0 -1
- package/dist/lib/multi-part-editor/upload-button.js +0 -103
- package/dist/lib/multi-part-editor/upload-button.js.map +0 -1
- package/dist/lib/multi-part-editor/utils.js +0 -43
- package/dist/lib/multi-part-editor/utils.js.map +0 -1
- package/dist/lib/open-detail-button/index.js +0 -11
- package/dist/lib/open-detail-button/index.js.map +0 -1
- package/dist/lib/page-content/index.js +0 -23
- package/dist/lib/page-content/index.js.map +0 -1
- package/dist/lib/primary-page/index.js +0 -2
- package/dist/lib/primary-page/index.js.map +0 -1
- package/dist/lib/primary-page/primary-header.js +0 -4
- package/dist/lib/primary-page/primary-header.js.map +0 -1
- package/dist/lib/primary-title/index.js +0 -8
- package/dist/lib/primary-title/index.js.map +0 -1
- package/dist/lib/provider/index.js +0 -43
- package/dist/lib/provider/index.js.map +0 -1
- package/dist/lib/resizable-side-sheet/index.js +0 -32
- package/dist/lib/resizable-side-sheet/index.js.map +0 -1
- package/dist/lib/resize-sidesheet/index.js +0 -15
- package/dist/lib/resize-sidesheet/index.js.map +0 -1
- package/dist/lib/resize-sidesheet/use-drag.js +0 -30
- package/dist/lib/resize-sidesheet/use-drag.js.map +0 -1
- package/dist/lib/schema-editor/index.js +0 -5
- package/dist/lib/schema-editor/index.js.map +0 -1
- package/dist/lib/search-form/index.d.ts +0 -15
- package/dist/lib/search-form/index.js +0 -77
- package/dist/lib/search-form/index.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js +0 -19
- package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/array-field.js +0 -39
- package/dist/lib/semi-schema-form/components/tmpls/array-field.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/base-input.js +0 -32
- package/dist/lib/semi-schema-form/components/tmpls/base-input.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/description-field.js +0 -13
- package/dist/lib/semi-schema-form/components/tmpls/description-field.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/error-list.js +0 -14
- package/dist/lib/semi-schema-form/components/tmpls/error-list.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/field-error.js +0 -16
- package/dist/lib/semi-schema-form/components/tmpls/field-error.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/field.js +0 -21
- package/dist/lib/semi-schema-form/components/tmpls/field.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.js +0 -29
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/index.js +0 -31
- package/dist/lib/semi-schema-form/components/tmpls/index.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/object-field.js +0 -81
- package/dist/lib/semi-schema-form/components/tmpls/object-field.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/submit.js +0 -13
- package/dist/lib/semi-schema-form/components/tmpls/submit.js.map +0 -1
- package/dist/lib/semi-schema-form/components/tmpls/title-field.js +0 -12
- package/dist/lib/semi-schema-form/components/tmpls/title-field.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/checkbox.js +0 -26
- package/dist/lib/semi-schema-form/components/widgets/checkbox.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.js +0 -27
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/index.js +0 -15
- package/dist/lib/semi-schema-form/components/widgets/index.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/radio.js +0 -27
- package/dist/lib/semi-schema-form/components/widgets/radio.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/range.js +0 -26
- package/dist/lib/semi-schema-form/components/widgets/range.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/select.js +0 -44
- package/dist/lib/semi-schema-form/components/widgets/select.js.map +0 -1
- package/dist/lib/semi-schema-form/components/widgets/textarea.js +0 -18
- package/dist/lib/semi-schema-form/components/widgets/textarea.js.map +0 -1
- package/dist/lib/semi-schema-form/index.js +0 -9
- package/dist/lib/semi-schema-form/index.js.map +0 -1
- package/dist/lib/sentinel-form/enum.js +0 -15
- package/dist/lib/sentinel-form/enum.js.map +0 -1
- package/dist/lib/sentinel-form/index.js +0 -289
- package/dist/lib/sentinel-form/index.js.map +0 -1
- package/dist/lib/step-nav/index.js +0 -13
- package/dist/lib/step-nav/index.js.map +0 -1
- package/dist/lib/table/index.js +0 -6
- package/dist/lib/table/index.js.map +0 -1
- package/dist/lib/table/sort-icon.js +0 -30
- package/dist/lib/table/sort-icon.js.map +0 -1
- package/dist/lib/table/table-with-pagination.js +0 -74
- package/dist/lib/table/table-with-pagination.js.map +0 -1
- package/dist/lib/table/table-without-pagniation.js +0 -37
- package/dist/lib/table/table-without-pagniation.js.map +0 -1
- package/dist/lib/table-batch-operate/table-batch-operation.js +0 -14
- package/dist/lib/table-batch-operate/table-batch-operation.js.map +0 -1
- package/dist/lib/table-batch-operate/use-batch-operate.js +0 -71
- package/dist/lib/table-batch-operate/use-batch-operate.js.map +0 -1
- package/dist/lib/table-col-actions/index.js +0 -35
- package/dist/lib/table-col-actions/index.js.map +0 -1
- package/dist/lib/table-cols-config/index.js +0 -57
- package/dist/lib/table-cols-config/index.js.map +0 -1
- package/dist/lib/table-cols-config/type.js +0 -2
- package/dist/lib/table-cols-config/type.js.map +0 -1
- package/dist/lib/table-cols-config/use-hidden-col-keys.js +0 -32
- package/dist/lib/table-cols-config/use-hidden-col-keys.js.map +0 -1
- package/dist/lib/table-cols-config/util.js +0 -39
- package/dist/lib/table-cols-config/util.js.map +0 -1
- package/dist/lib/table-empty/index.js +0 -10
- package/dist/lib/table-empty/index.js.map +0 -1
- package/dist/lib/table-header/index.js +0 -11
- package/dist/lib/table-header/index.js.map +0 -1
- package/dist/lib/tabs/index.js +0 -9
- package/dist/lib/tabs/index.js.map +0 -1
- package/dist/lib/text-area-pro/index.js +0 -10
- package/dist/lib/text-area-pro/index.js.map +0 -1
- package/dist/lib/text-with-copy/index.js +0 -24
- package/dist/lib/text-with-copy/index.js.map +0 -1
- package/dist/lib/title-with-sub/index.js +0 -6
- package/dist/lib/title-with-sub/index.js.map +0 -1
- package/dist/lib/tooltip-when-disabled/index.js +0 -9
- package/dist/lib/tooltip-when-disabled/index.js.map +0 -1
- package/dist/lib/tooltip-with-disabled/index.js +0 -9
- package/dist/lib/tooltip-with-disabled/index.js.map +0 -1
- package/dist/lib/tsconfig.build.tsbuildinfo +0 -1
- package/dist/lib/upload/index.js +0 -25
- package/dist/lib/upload/index.js.map +0 -1
- package/dist/lib/user-profile/index.js +0 -21
- package/dist/lib/user-profile/index.js.map +0 -1
- package/dist/lib/utils/basic.js +0 -29
- package/dist/lib/utils/basic.js.map +0 -1
- package/dist/lib/version-list/version-descriptions.js +0 -14
- package/dist/lib/version-list/version-descriptions.js.map +0 -1
- package/dist/lib/version-list/version-item.js +0 -6
- package/dist/lib/version-list/version-item.js.map +0 -1
- package/dist/lib/version-list/version-list.js +0 -11
- package/dist/lib/version-list/version-list.js.map +0 -1
- package/dist/lib/version-list/version-switch-panel.js +0 -10
- package/dist/lib/version-list/version-switch-panel.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type editor } from '../code-editor';
|
|
2
|
+
export declare const codeOptionsConfig: editor.IStandaloneEditorConstructionOptions;
|
|
3
|
+
interface CodeEditorWithLoadingProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const CodeEditorWithLoading: ({ value, onChange, disabled, className, }: CodeEditorWithLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
text: string;
|
|
5
|
+
cursorOffset?: number;
|
|
6
|
+
scrollIntoView?: boolean;
|
|
7
|
+
userEvent?: string;
|
|
8
|
+
}], void> | import("@coze-editor/editor/react").APIPluginSpec<"getCursorPosition", [], number> | import("@coze-editor/editor/react").APIPluginSpec<"setCursorPosition", [pos: number], void> | import("@coze-editor/editor/react").APIPluginSpec<"focus", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"blur", [], void> | import("@coze-editor/editor/react").APIPluginSpec<"disableKeybindings", [keys: string[]], 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").APIPluginSpec<"transformTextInSelection", [transformer: (text: string) => string | undefined], void> | import("@coze-editor/editor/react").APIPluginSpec<"getSelection", [], {
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
anchor: number;
|
|
12
|
+
head: number;
|
|
13
|
+
}> | import("@coze-editor/editor/react").APIPluginSpec<"getLineInfoAtPosition", [pos: number], import("@codemirror/state").Line> | import("@coze-editor/editor/react").EventPluginSpec<"selectionChange", {
|
|
14
|
+
selection: {
|
|
15
|
+
from: number;
|
|
16
|
+
to: number;
|
|
17
|
+
head: number;
|
|
18
|
+
anchor: number;
|
|
19
|
+
};
|
|
20
|
+
update: import("@codemirror/view").ViewUpdate;
|
|
21
|
+
}> | import("@coze-editor/editor/react").EventPluginSpec<"change", {
|
|
22
|
+
value: string;
|
|
23
|
+
}> | 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").OptionPluginSpec<"tabSize", number> | import("@coze-editor/editor/react").OptionPluginSpec<"scrollBeyondLastLine", boolean> | import("@coze-editor/editor/react").OptionPluginSpec<"uri", string> | import("@coze-editor/editor/react").OptionPluginSpec<"theme", string> | import("@coze-editor/editor/react").OptionPluginSpec<"languageId", string> | import("@coze-editor/editor/react").OptionPluginSpec<"transformer", import("@coze-editor/editor/preset-code").Transformer> | import("@coze-editor/editor/react").OptionPluginSpec<"overlayScrollbar", unknown> | import("@coze-editor/editor/react").OptionPluginSpec<"lineNumbersGutter", unknown> | import("@coze-editor/editor/react").OptionPluginSpec<"foldGutter", unknown> | import("@coze-editor/editor/react").OptionPluginSpec<"colorizeBrackets", unknown> | import("@coze-editor/editor/react").APIPluginSpec<"validate", [], void>)[]>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export { EditorProvider } from '@coze-editor/editor/react';
|
|
1
2
|
export { CodeMirrorCodeEditor } from './code-editor';
|
|
2
3
|
export { CodeMirrorTextEditor } from './text-editor';
|
|
3
4
|
export { CodeMirrorJsonEditor } from './json-editor';
|
|
4
5
|
export { CodeMirrorRawTextEditor } from './raw-text-editor';
|
|
6
|
+
export { CodeMirrorRawCodeEditor } from './raw-code-editor';
|
|
@@ -9,7 +9,7 @@ interface BaseJsonEditorProps {
|
|
|
9
9
|
readonly?: boolean;
|
|
10
10
|
minHeight?: string | number;
|
|
11
11
|
maxHeight?: string | number;
|
|
12
|
-
|
|
12
|
+
editorHeight?: string | number;
|
|
13
13
|
padding?: string | number;
|
|
14
14
|
borderRadius?: string | number;
|
|
15
15
|
onFocus?: () => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface BaseCodeEditorProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
dataTestID?: string;
|
|
7
|
+
placeholder?: string | HTMLElement;
|
|
8
|
+
isDarkTheme?: boolean;
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
minHeight?: string | number;
|
|
11
|
+
maxHeight?: string | number;
|
|
12
|
+
editorHeight?: string | number;
|
|
13
|
+
padding?: string | number;
|
|
14
|
+
borderRadius?: string | number;
|
|
15
|
+
language?: string;
|
|
16
|
+
onFocus?: () => void;
|
|
17
|
+
onBlur?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const CodeMirrorRawCodeEditor: React.ForwardRefExoticComponent<BaseCodeEditorProps & React.RefAttributes<unknown>>;
|
|
20
|
+
export {};
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
text: string;
|
|
5
|
+
cursorOffset?: number;
|
|
6
|
+
scrollIntoView?: boolean;
|
|
7
|
+
userEvent?: string;
|
|
8
|
+
}], void> | import("@coze-editor/editor/react").APIPluginSpec<"setCursorPosition", [pos: number], void> | import("@coze-editor/editor/react").APIPluginSpec<"disableKeybindings", [keys: string[]], void> | import("@coze-editor/editor/react").APIPluginSpec<"transformTextInSelection", [transformer: (text: string) => string | undefined], void> | import("@coze-editor/editor/react").APIPluginSpec<"getSelection", [], {
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
anchor: number;
|
|
12
|
+
head: number;
|
|
13
|
+
}> | import("@coze-editor/editor/react").APIPluginSpec<"getLineInfoAtPosition", [pos: number], import("@codemirror/state").Line> | import("@coze-editor/editor/react").EventPluginSpec<"selectionChange", {
|
|
14
|
+
selection: {
|
|
15
|
+
from: number;
|
|
16
|
+
to: number;
|
|
17
|
+
head: number;
|
|
18
|
+
anchor: number;
|
|
19
|
+
};
|
|
20
|
+
update: import("@codemirror/view").ViewUpdate;
|
|
21
|
+
}> | import("@coze-editor/editor/react").EventPluginSpec<"change", {
|
|
22
|
+
value: string;
|
|
23
|
+
}>)[]>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
interface CollapseCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
2
3
|
className?: string;
|
|
3
4
|
title: React.ReactNode;
|
|
4
5
|
children: React.ReactNode;
|
|
@@ -6,7 +6,10 @@ interface UnsaveLeaveWarningProps {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* 离开页面时的警告
|
|
9
|
-
*
|
|
9
|
+
* 触发时机:关闭浏览器、关闭浏览器标签页、刷新页面
|
|
10
|
+
*
|
|
11
|
+
* 注意:此钩子只处理浏览器层面的离开警告(beforeunload事件)
|
|
12
|
+
* React Router 导航离开处理需要用户自己在组件中使用 useBlocker 或其他方式实现
|
|
10
13
|
*/
|
|
11
14
|
export declare const useUnsaveLeaveWarning: ({ block, message, }: UnsaveLeaveWarningProps) => void;
|
|
12
15
|
export {};
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ColumnSelector, type ColumnItem } from './columns-select';
|
|
2
2
|
export { TooltipWhenDisabled, type TooltipWhenDisabledProps, } from './tooltip-when-disabled';
|
|
3
3
|
export { TooltipWithDisabled } from './tooltip-with-disabled';
|
|
4
|
+
export { Copyable } from './copyable';
|
|
4
5
|
export { LoopTable } from './table';
|
|
5
6
|
export { TableWithPagination, DEFAULT_PAGE_SIZE, PAGE_SIZE_OPTIONS, getStoragePageSize, type TableWithPaginationProps, } from './table/table-with-pagination';
|
|
6
7
|
export { PageError, PageLoading, PageNoAuth, PageNoContent, PageNotFound, FullPage, } from './page-content';
|
|
@@ -31,7 +32,7 @@ export { TableColsConfig, type TableColsConfigProps, type ColumnPropsPro, type C
|
|
|
31
32
|
export { TableWithoutPagination } from './table/table-without-pagniation';
|
|
32
33
|
export { TableBatchOperate } from './table-batch-operate/table-batch-operation';
|
|
33
34
|
export { useBatchOperate, type BatchOperateStore, } from './table-batch-operate/use-batch-operate';
|
|
34
|
-
export { useItemIndexController } from './index-controller/use-item-index-controller';
|
|
35
|
+
export { useItemIndexController, type IndexControllerStore, } from './index-controller/use-item-index-controller';
|
|
35
36
|
export { IndexControllerView } from './index-controller/record-navigation';
|
|
36
37
|
export { BaseSearchSelect, BaseSearchFormSelect, type BaseSelectProps, type LoadOptionByIds, } from './base-search-select';
|
|
37
38
|
export { OpenDetailButton } from './open-detail-button';
|
|
@@ -55,16 +56,15 @@ export { LazyLoadComponent } from './lazy-load-component';
|
|
|
55
56
|
export { TextAreaPro, type Props as TextAreaProProps } from './text-area-pro';
|
|
56
57
|
export { InputWithCount } from './input-with-count';
|
|
57
58
|
export { LoopRadioGroup } from './loop-radio-group';
|
|
58
|
-
export { UsageItem, SupportedLang } from './code-usage';
|
|
59
59
|
export { Layout } from './layout';
|
|
60
|
-
export { SearchForm, type SearchFormRef, type SearchFormFilterRecord, } from './search-form';
|
|
61
60
|
export { TitleWithSub } from './title-with-sub';
|
|
62
|
-
export { CozeLoopProvider,
|
|
61
|
+
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';
|
|
66
65
|
export { SemiSchemaForm, type SemiSchemaFormInstance, schemaValidators, } from './semi-schema-form';
|
|
67
66
|
export { ResizableSideSheet } from './resizable-side-sheet';
|
|
68
67
|
export { SentinelForm, type SentinelFormRef, type SentinelFormApi, } from './sentinel-form';
|
|
69
|
-
export { CodeMirrorCodeEditor, CodeMirrorTextEditor, CodeMirrorJsonEditor, CodeMirrorRawTextEditor, } from './codemirror-editor';
|
|
68
|
+
export { CodeMirrorCodeEditor, CodeMirrorTextEditor, CodeMirrorJsonEditor, CodeMirrorRawTextEditor, CodeMirrorRawCodeEditor, EditorProvider, } from './codemirror-editor';
|
|
70
69
|
export { SchemaEditor } from './schema-editor';
|
|
70
|
+
export { CodeEditorWithLoading } from './code-editor-with-loading';
|
|
@@ -7,10 +7,8 @@ export declare function LogicEditor({ fields, disabled, value, popoverProps, too
|
|
|
7
7
|
value?: LogicFilter | undefined;
|
|
8
8
|
popoverProps?: PopoverProps;
|
|
9
9
|
tooltip?: React.ReactNode;
|
|
10
|
-
/** 是否过滤空条件 */
|
|
11
|
-
|
|
12
|
-
/** 字段选择开启级联模式 */
|
|
13
|
-
enableCascadeMode?: boolean;
|
|
10
|
+
/** 是否过滤空条件 */ clearEmptyCondition?: boolean;
|
|
11
|
+
/** 字段选择开启级联模式 */ enableCascadeMode?: boolean;
|
|
14
12
|
onChange?: (val?: LogicFilter) => void;
|
|
15
13
|
onConfirm?: (val?: LogicFilter) => void;
|
|
16
14
|
onClose?: () => void;
|
|
@@ -45,5 +45,9 @@ export interface LogicDataType {
|
|
|
45
45
|
operations: LogicOperation[];
|
|
46
46
|
setter: LogicSetter;
|
|
47
47
|
}
|
|
48
|
-
export declare const baseOperations: LogicOperation[];
|
|
49
|
-
export declare const
|
|
48
|
+
export declare const baseOperations: () => LogicOperation[];
|
|
49
|
+
export declare const stringOperations: () => LogicOperation[];
|
|
50
|
+
export declare const numberOperations: () => LogicOperation[];
|
|
51
|
+
export declare const dateOperations: () => LogicOperation[];
|
|
52
|
+
export declare const selectOperations: () => LogicOperation[];
|
|
53
|
+
export declare function useDataTypeList(): LogicDataType[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@arco-iconbox/react-cozeloop-icons';
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
export type I18nFunction = (key: string, options?: Record<string, unknown>, fallbackText?: string) => string;
|
|
3
|
-
export interface I18nObject {
|
|
4
|
-
t: I18nFunction;
|
|
5
|
-
language?: string;
|
|
6
|
-
}
|
|
7
2
|
interface CozeLoopContextValue {
|
|
8
|
-
|
|
3
|
+
resources?: {
|
|
4
|
+
'zh-CN': {
|
|
5
|
+
translation: Record<string, string>;
|
|
6
|
+
};
|
|
7
|
+
'en-US': {
|
|
8
|
+
translation: Record<string, string>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
defaultLanguage?: string;
|
|
9
12
|
sendEvent?: (name: string, params: Record<string, unknown>, target?: HTMLElement | string | null) => void;
|
|
10
13
|
}
|
|
11
14
|
interface CozeLoopProviderProps extends CozeLoopContextValue {
|
|
12
15
|
children: ReactNode;
|
|
13
16
|
}
|
|
14
|
-
export declare function CozeLoopProvider({ children,
|
|
15
|
-
export declare function useI18n(): I18nObject;
|
|
17
|
+
export declare function CozeLoopProvider({ children, defaultLanguage, resources, sendEvent, }: CozeLoopProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export declare function useReportEvent(): (name: string, params: Record<string, unknown>, target?: HTMLElement | string | null) => void;
|
|
17
|
-
export declare function useCozeLoopContext(): CozeLoopContextValue;
|
|
18
19
|
export {};
|
|
@@ -3,6 +3,6 @@ export declare const IconSortArrow: ({ sortOrder, ...rest }: {
|
|
|
3
3
|
sortOrder?: "ascend" | "descend" | boolean;
|
|
4
4
|
} & SVGAttributes<HTMLOrSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
/** 表格排序专用图标 */
|
|
6
|
-
export
|
|
7
|
-
sortOrder?:
|
|
8
|
-
})
|
|
6
|
+
export declare const createLoopTableSortIcon: () => ({ sortOrder }: {
|
|
7
|
+
sortOrder?: "ascend" | "descend" | boolean;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cozeloop/components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7-beta-1766595012100",
|
|
4
4
|
"description": "common components for cozeloop",
|
|
5
5
|
"author": "houtao.zzj@bytedance.com",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./loop-icons": "./dist/loop-icons/index.js"
|
|
9
|
+
},
|
|
6
10
|
"main": "dist/es/index.js",
|
|
11
|
+
"typesVersions": {
|
|
12
|
+
"*": {
|
|
13
|
+
"loop-icons": [
|
|
14
|
+
"./src/loop-icons/index.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
7
18
|
"scripts": {
|
|
8
19
|
"build": "exit 0",
|
|
9
20
|
"build:sdk": "npm run clean && rslib build && npx tsc -b tsconfig.build.json",
|
|
@@ -13,14 +24,17 @@
|
|
|
13
24
|
"test:cov": "exit 0"
|
|
14
25
|
},
|
|
15
26
|
"dependencies": {
|
|
27
|
+
"@arco-iconbox/react-cozeloop-icons": "0.0.3",
|
|
16
28
|
"@codemirror/commands": "^6.3.3",
|
|
29
|
+
"@codemirror/lang-go": "^6.0.1",
|
|
17
30
|
"@codemirror/state": "^6.4.1",
|
|
18
31
|
"@codemirror/view": "^6.34.1",
|
|
19
32
|
"@coze-arch/coze-design": "0.0.7-alpha.985c0d",
|
|
20
|
-
"@coze-editor/editor": "0.1.0-alpha.
|
|
21
|
-
"@cozeloop/api-schema": "
|
|
22
|
-
"@cozeloop/hooks": "
|
|
23
|
-
"@cozeloop/
|
|
33
|
+
"@coze-editor/editor": "0.1.0-alpha.577152",
|
|
34
|
+
"@cozeloop/api-schema": "0.1.5",
|
|
35
|
+
"@cozeloop/hooks": "0.0.1",
|
|
36
|
+
"@cozeloop/i18n": "0.0.1",
|
|
37
|
+
"@cozeloop/toolkit": "0.0.4",
|
|
24
38
|
"@monaco-editor/react": "^4.5.2",
|
|
25
39
|
"@rjsf/core": "~5.24.9",
|
|
26
40
|
"@rjsf/utils": "~5.24.9",
|
|
@@ -37,30 +51,14 @@
|
|
|
37
51
|
"react-sortable-hoc": "2.0.0",
|
|
38
52
|
"sortablejs": "~1.15.2"
|
|
39
53
|
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@coze-arch/bot-typings": "workspace:*",
|
|
42
|
-
"@coze-arch/eslint-config": "workspace:*",
|
|
43
|
-
"@coze-arch/ts-config": "workspace:*",
|
|
44
|
-
"@cozeloop/rsbuild-config-saas": "workspace:*",
|
|
45
|
-
"@cozeloop/tailwind-config": "workspace:*",
|
|
46
|
-
"@rslib/core": "~0.11.0",
|
|
47
|
-
"@types/lodash-es": "^4.17.10",
|
|
48
|
-
"@types/react": "18.2.37",
|
|
49
|
-
"@types/react-dom": "18.2.15",
|
|
50
|
-
"@vitest/coverage-v8": "~3.0.5",
|
|
51
|
-
"happy-dom": "^20.0.10",
|
|
52
|
-
"react-dom": "~18.2.0",
|
|
53
|
-
"react-router-dom": "^6.22.0",
|
|
54
|
-
"tsconfig-paths": "4.1.0",
|
|
55
|
-
"vite": "^4.3.9",
|
|
56
|
-
"vite-plugin-svgr": "~3.3.0",
|
|
57
|
-
"vitest": "~3.0.5"
|
|
58
|
-
},
|
|
59
54
|
"peerDependencies": {},
|
|
55
|
+
"publishRegistries": [
|
|
56
|
+
"npm"
|
|
57
|
+
],
|
|
60
58
|
"module": "dist/es/index.js",
|
|
61
59
|
"types": "dist/lib/index.d.ts",
|
|
62
60
|
"files": [
|
|
63
61
|
"dist",
|
|
64
62
|
"README.md"
|
|
65
63
|
]
|
|
66
|
-
}
|
|
64
|
+
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { withField } from '@coze-arch/coze-design';
|
|
3
|
-
import BaseSearchSelect from './base-search-select';
|
|
4
|
-
const BaseSearchFormSelect = withField((props) => _jsx(BaseSearchSelect, { ...props }));
|
|
5
|
-
export default BaseSearchFormSelect;
|
|
6
|
-
//# sourceMappingURL=base-search-form-select.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-search-form-select.js","sourceRoot":"","sources":["../../../src/base-search-select/base-search-form-select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,oBAAoB,GAA8B,SAAS,CAC/D,CAAC,KAAsB,EAAE,EAAE,CAAC,KAAC,gBAAgB,OAAK,KAAK,GAAI,CAC5D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { isNull, isUndefined } from 'lodash-es';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
import { useRequest } from 'ahooks';
|
|
7
|
-
import { IconCozRefresh } from '@coze-arch/coze-design/icons';
|
|
8
|
-
import { Select, Tooltip, Button, } from '@coze-arch/coze-design';
|
|
9
|
-
import { getOptionsNotInList, transformValueToArray } from './utils';
|
|
10
|
-
import styles from './index.module.less';
|
|
11
|
-
/**
|
|
12
|
-
* 基础选择器组件
|
|
13
|
-
* 解决两个主要问题:
|
|
14
|
-
* 1. 初始选中值不在第一页数据中导致只显示ID
|
|
15
|
-
* 2. 搜索后选中值不在结果中导致只显示ID
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line @coze-arch/max-line-per-function
|
|
18
|
-
const BaseSearchSelect = (props) => {
|
|
19
|
-
const { optionList: _optionList, loadOptionByIds, value, defaultValue, onSearch, renderSelectedItem, onChangeWithObject, onDropdownVisibleChange, showRefreshBtn, onClickRefresh, disabledCacheOptions, } = props;
|
|
20
|
-
// 是否在搜索中
|
|
21
|
-
const [searchWord, setSearchWord] = useState('');
|
|
22
|
-
const [refreshFlag, setRefreshFlag] = useState([]);
|
|
23
|
-
const [dropdownVisible, setDropdownVisible] = useState(false);
|
|
24
|
-
const optionMapRef = useRef({});
|
|
25
|
-
const optionList = useMemo(() => _optionList || [], [_optionList]);
|
|
26
|
-
const isOptionListNotExists = useMemo(() => !_optionList, [_optionList]);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (isOptionListNotExists) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
// 每次 optionList 变化, 将 optionList 中的 option 添加到 optionMapRef 中缓存
|
|
32
|
-
(optionList || []).forEach(item => {
|
|
33
|
-
optionMapRef.current[item?.value] = item;
|
|
34
|
-
});
|
|
35
|
-
}, [optionList]);
|
|
36
|
-
// 初始化
|
|
37
|
-
useRequest(async () => {
|
|
38
|
-
const initialValue = value || defaultValue;
|
|
39
|
-
// 1. 判断 list 有没有value, 有则不发请求
|
|
40
|
-
if (isUndefined(initialValue) ||
|
|
41
|
-
isNull(initialValue) ||
|
|
42
|
-
initialValue === '' ||
|
|
43
|
-
!loadOptionByIds) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
// 2. 判断 optionList 中有没有 value 中不存在的 选项, 有则不发请求
|
|
47
|
-
const optionsNotInList = getOptionsNotInList({
|
|
48
|
-
value: initialValue,
|
|
49
|
-
optionList,
|
|
50
|
-
onChangeWithObject,
|
|
51
|
-
});
|
|
52
|
-
if (optionsNotInList.length === 0) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
try {
|
|
56
|
-
const payload = transformValueToArray(value, onChangeWithObject);
|
|
57
|
-
const fetchOptions = await loadOptionByIds(payload);
|
|
58
|
-
if (fetchOptions) {
|
|
59
|
-
setRefreshFlag([]);
|
|
60
|
-
optionMapRef.current = {
|
|
61
|
-
...optionMapRef.current,
|
|
62
|
-
...fetchOptions.reduce((acc, item) => {
|
|
63
|
-
acc[item?.value] = item;
|
|
64
|
-
return acc;
|
|
65
|
-
}, {}),
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
console.error('Failed to load selected option:', error);
|
|
71
|
-
}
|
|
72
|
-
}, {
|
|
73
|
-
refreshDeps: [value],
|
|
74
|
-
});
|
|
75
|
-
/**
|
|
76
|
-
* 最后展示的选项
|
|
77
|
-
*/
|
|
78
|
-
const cacheOptions = useMemo(() => {
|
|
79
|
-
// searchWord 表示处于搜索中, 不应该展示不在选项列表中的选项
|
|
80
|
-
if (!value || searchWord || disabledCacheOptions) {
|
|
81
|
-
return optionList;
|
|
82
|
-
}
|
|
83
|
-
const optionsNotInList = getOptionsNotInList({
|
|
84
|
-
value,
|
|
85
|
-
optionList,
|
|
86
|
-
onChangeWithObject,
|
|
87
|
-
});
|
|
88
|
-
// value 所有选项都在选项列表中, 直接返回
|
|
89
|
-
if (optionsNotInList.length === 0) {
|
|
90
|
-
return optionList;
|
|
91
|
-
}
|
|
92
|
-
// value 不在选项列表, 则对value进行处理, 前面已经处理为arr了
|
|
93
|
-
// 所以这里可以直接按arr 处理 返回缓存中的选项
|
|
94
|
-
const optionsInCache = optionsNotInList.map(k => optionMapRef.current[k]);
|
|
95
|
-
// 有可能存在远端数据被删除,id无法拉去到的情况
|
|
96
|
-
const newOptions = [...optionsInCache, ...optionList].filter(Boolean);
|
|
97
|
-
return newOptions;
|
|
98
|
-
}, [optionList, value, searchWord, refreshFlag]);
|
|
99
|
-
/**
|
|
100
|
-
* 选中项渲染, 如果list中没有, 从缓存中拿当前的选种值
|
|
101
|
-
*/
|
|
102
|
-
const RenderSelectedItem = useCallback((optionNode, multipleProps) => {
|
|
103
|
-
const renderOpt = optionMapRef.current[optionNode?.value] || optionNode;
|
|
104
|
-
if (renderSelectedItem) {
|
|
105
|
-
return renderSelectedItem(renderOpt, multipleProps);
|
|
106
|
-
}
|
|
107
|
-
// 多选
|
|
108
|
-
if (multipleProps) {
|
|
109
|
-
return {
|
|
110
|
-
isRenderInTag: true,
|
|
111
|
-
content: renderOpt?.label || renderOpt?.value,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return renderOpt?.label || renderOpt?.value;
|
|
115
|
-
}, [renderSelectedItem]);
|
|
116
|
-
return (_jsx(Select, { suffix: showRefreshBtn && dropdownVisible ? (_jsx(Tooltip, { theme: "dark", content: "\u5237\u65B0", children: _jsxs("div", { className: "flex flex-row items-center", children: [_jsx(Button, { className: "!h-6 !w-6", icon: _jsx(IconCozRefresh, {}), size: "small", color: "secondary", onClick: () => onClickRefresh?.() }), _jsx("div", { className: "h-3 w-0 border-0 border-l border-solid coz-stroke-primary ml-[2px]" })] }) })) : null, ...props, onDropdownVisibleChange: visible => {
|
|
117
|
-
setDropdownVisible(visible);
|
|
118
|
-
onDropdownVisibleChange?.(visible);
|
|
119
|
-
}, dropdownClassName: classNames(styles['select-dropdown-style'], props.dropdownClassName), optionList: isOptionListNotExists ? undefined : cacheOptions, renderSelectedItem: RenderSelectedItem, onSearch: (vs, e) => {
|
|
120
|
-
setSearchWord(vs);
|
|
121
|
-
if (onSearch) {
|
|
122
|
-
onSearch?.(vs, e);
|
|
123
|
-
}
|
|
124
|
-
} }));
|
|
125
|
-
};
|
|
126
|
-
export default BaseSearchSelect;
|
|
127
|
-
//# sourceMappingURL=base-search-select.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-search-select.js","sourceRoot":"","sources":["../../../src/base-search-select/base-search-select.tsx"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAEL,MAAM,EAEN,OAAO,EACP,MAAM,GACP,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGrE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;;;GAKG;AACH,4DAA4D;AAC5D,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IAClD,MAAM,EACJ,UAAU,EAAE,WAAW,EACvB,eAAe,EACf,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,oBAAoB,GACrB,GAAG,KAAK,CAAC;IAEV,SAAS;IACT,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,MAAM,CAA8B,EAAE,CAAC,CAAC;IAE7D,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE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kBAA0C,EAC9D,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;YAClB,aAAa,CAAC,EAAE,CAAC,CAAC;YAClB,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base-search-select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/base-search-select/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
export const transformValueToArray = (value, onChangeWithObject = false) => {
|
|
3
|
-
// 对象传入
|
|
4
|
-
if (onChangeWithObject) {
|
|
5
|
-
// 对象数组
|
|
6
|
-
if (Array.isArray(value)) {
|
|
7
|
-
return value.map(item => item?.value || '').filter(Boolean);
|
|
8
|
-
}
|
|
9
|
-
// 单个对象
|
|
10
|
-
return value?.value ? [value?.value] : [];
|
|
11
|
-
}
|
|
12
|
-
// 普通数组 或 字符串
|
|
13
|
-
return Array.isArray(value) ? value : [value];
|
|
14
|
-
};
|
|
15
|
-
// 过滤 value 中不在 optionlist 中的 option
|
|
16
|
-
export const filterValueNotInOptionList = (value, optionSet, onChangeWithObject = false) => {
|
|
17
|
-
if (onChangeWithObject) {
|
|
18
|
-
// 对象数组
|
|
19
|
-
if (Array.isArray(value)) {
|
|
20
|
-
return value
|
|
21
|
-
.filter(item => !optionSet.has(item?.value))
|
|
22
|
-
.map(it => it?.value);
|
|
23
|
-
}
|
|
24
|
-
// 单个对象
|
|
25
|
-
return optionSet.has(value?.value) ? [] : [value?.value];
|
|
26
|
-
}
|
|
27
|
-
if (Array.isArray(value)) {
|
|
28
|
-
return value.filter(item => !optionSet.has(item));
|
|
29
|
-
}
|
|
30
|
-
if (typeof value === 'string' || typeof value === 'number') {
|
|
31
|
-
return optionSet.has(value) ? [] : [value];
|
|
32
|
-
}
|
|
33
|
-
return [];
|
|
34
|
-
};
|
|
35
|
-
export const getOptionsNotInList = ({ value, optionList, onChangeWithObject = false, }) => {
|
|
36
|
-
// 集合
|
|
37
|
-
const existingValues = new Set(optionList.map(item => item.value));
|
|
38
|
-
// 找到 value 里面不在选项列表中的选项
|
|
39
|
-
const optionsNotInList = filterValueNotInOptionList(value, existingValues, onChangeWithObject);
|
|
40
|
-
return optionsNotInList;
|
|
41
|
-
};
|
|
42
|
-
export const initialValueChecker = (value, optionList, onChangeWithObject = false) => {
|
|
43
|
-
if (typeof value === 'string') {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
return value;
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/base-search-select/utils.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,KAAU,EACV,kBAAkB,GAAG,KAAK,EACL,EAAE;IACvB,OAAO;IACP,IAAI,kBAAkB,EAAE,CAAC;QACvB,OAAO;QACP,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO;QACP,OA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AAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,KAAK,EACL,UAAU,EACV,kBAAkB,GAAG,KAAK,GAK3B,EAAE,EAAE;IACH,KAAK;IACL,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAEnE,wBAAwB;IACxB,MAAM,gBAAgB,GAAG,0BAA0B,CACjD,KAAK,EACL,cAAc,EACd,kBAAkB,CACnB,CAAC;IACF,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAU,EACV,UAAiB,EACjB,kBAAkB,GAAG,KAAK,EAC1B,EAAE;IACF,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
export const BasicCard = ({ title, children, className }) => (_jsxs("div", { className: classNames('border border-solid coz-stroke-plus rounded-[6px] overflow-hidden', className), children: [_jsx("div", { className: "text-sm font-medium px-4 h-[44px] flex items-center coze-fg-primary bg-[#F7F7FC]", children: title }), children ? _jsx("div", { className: "p-4 bg-white", children: children }) : null] }));
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/basic-card/index.tsx"],"names":[],"mappings":";AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAQpC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAa,EAAE,EAAE,CAAC,CACtE,eACE,SAAS,EAAE,UAAU,CACnB,mEAAmE,EACnE,SAAS,CACV,aAED,cAAK,SAAS,EAAC,kFAAkF,YAC9F,KAAK,GACF,EACL,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,cAAc,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IAC7D,CACP,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import styles from './index.module.less';
|
|
4
|
-
export function CardPane({ hoverShadow, className, ...props }) {
|
|
5
|
-
return (_jsx("div", { className: classNames(styles.container, {
|
|
6
|
-
[styles.shadow]: hoverShadow,
|
|
7
|
-
}, className), ...props }));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/card-pane/index.tsx"],"names":[],"mappings":";AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAOzC,MAAM,UAAU,QAAQ,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiB;IAC1E,OAAO,CACL,cACE,SAAS,EAAE,UAAU,CACnB,MAAM,CAAC,SAAS,EAChB;YACE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW;SAC7B,EACD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import cls from 'classnames';
|
|
3
|
-
import { Select } from '@coze-arch/coze-design';
|
|
4
|
-
import styles from './index.module.less';
|
|
5
|
-
export const ChipSelect = (props) => (_jsx(Select, { ...props, className: cls(styles.select, props.className) }));
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/chip-select/index.tsx"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAoB,MAAM,wBAAwB,CAAC;AAElE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAkB,EAAE,EAAE,CAAC,CAChD,KAAC,MAAM,OAAK,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,GAAI,CACtE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference path="../types.d.ts" />
|
|
2
|
-
export { default as CodeEditor, DiffEditor } from '@monaco-editor/react';
|
|
3
|
-
import { loader } from '@monaco-editor/react';
|
|
4
|
-
loader.config({
|
|
5
|
-
paths: {
|
|
6
|
-
vs: MONACO_UNPKG ?? 'https://unpkg.com/monaco-editor@0.43.0/min/vs',
|
|
7
|
-
},
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code-editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGzE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,EAAE,EAAE,YAAY,IAAI,+CAA+C;KACpE;CACF,CAAC,CAAC"}
|