@cozeloop/components 0.0.2 → 0.0.3-beta-1769665914778
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/README.md +82 -1
- package/dist/es/index.css +645 -0
- package/dist/es/index.mjs +6089 -0
- package/dist/es/loopIcons.mjs +3 -0
- package/dist/es/rslib-runtime.mjs +40 -0
- package/dist/es/static/svg/select.svg +1 -0
- package/dist/lib/base-search-select/base-search-form-select.d.ts +3 -0
- package/dist/lib/base-search-select/base-search-select.d.ts +12 -0
- package/dist/lib/base-search-select/index.d.ts +3 -0
- package/dist/lib/base-search-select/types.d.ts +13 -0
- package/dist/lib/base-search-select/utils.d.ts +8 -0
- package/dist/lib/basic-card/index.d.ts +7 -0
- package/dist/lib/card-pane/index.d.ts +5 -0
- package/dist/lib/chip-select/index.d.ts +2 -0
- package/dist/lib/code-editor/index.d.ts +3 -0
- package/dist/lib/code-editor-with-loading/index.d.ts +10 -0
- package/dist/lib/codemirror-editor/code-editor.d.ts +23 -0
- package/dist/lib/codemirror-editor/index.d.ts +6 -0
- package/dist/lib/codemirror-editor/json-editor.d.ts +19 -0
- package/dist/lib/codemirror-editor/raw-code-editor.d.ts +20 -0
- package/dist/lib/codemirror-editor/raw-text-editor.d.ts +11 -0
- package/dist/lib/codemirror-editor/text-editor.d.ts +23 -0
- package/dist/lib/codemirror-editor/themes/coze-dark.d.ts +1 -0
- package/dist/lib/codemirror-editor/themes/coze-light.d.ts +1 -0
- package/dist/lib/collapse-card/index.d.ts +14 -0
- package/dist/lib/collapse-item/index.d.ts +7 -0
- package/dist/lib/collapsible-card/index.d.ts +13 -0
- package/dist/{types → lib}/column-manage-storage/index.d.ts +6 -6
- package/dist/lib/columns-select/index.d.ts +19 -0
- package/dist/lib/copyable/index.d.ts +5 -0
- package/dist/lib/edit-icon-button/index.d.ts +8 -0
- package/dist/lib/footer-actions/index.d.ts +15 -0
- package/dist/{types → lib}/hooks/use-infinite-scroll.d.ts +12 -12
- package/dist/lib/hooks/use-mouse-down-offset.d.ts +9 -0
- package/dist/lib/hooks/use-unsave-leave-warning.d.ts +15 -0
- package/dist/lib/id-render/icon-button-container.d.ts +8 -0
- package/dist/lib/id-render/index.d.ts +7 -0
- package/dist/lib/index-controller/record-navigation.d.ts +6 -0
- package/dist/lib/index-controller/use-item-index-controller.d.ts +47 -0
- package/dist/lib/index.d.ts +71 -0
- package/dist/{types → lib}/infinite-scroll-table/index.d.ts +6 -6
- package/dist/lib/info-tooltip/index.d.ts +9 -0
- package/dist/lib/input-components/radio-button.d.ts +14 -0
- package/dist/lib/input-slider/index.d.ts +15 -0
- package/dist/lib/input-with-count/index.d.ts +2 -0
- package/dist/lib/jump-button/jump-icon-button.d.ts +4 -0
- package/dist/{types → lib}/large-txt-render/index.d.ts +2 -2
- package/dist/lib/layout/content.d.ts +7 -0
- package/dist/lib/layout/header.d.ts +7 -0
- package/dist/lib/layout/index.d.ts +12 -0
- package/dist/lib/layout/tabs.d.ts +6 -0
- package/dist/lib/lazy-load-component/index.d.ts +5 -0
- package/dist/lib/logic-editor/index.d.ts +3 -0
- package/dist/lib/logic-editor/logic-editor.d.ts +15 -0
- package/dist/lib/logic-editor/logic-left-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-operator-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-right-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-types.d.ts +53 -0
- package/dist/lib/logic-editor/utils.d.ts +2 -0
- package/dist/lib/logic-expr/consts.d.ts +2 -0
- package/dist/lib/logic-expr/expr-group-render.d.ts +2 -0
- package/dist/lib/logic-expr/expr-render.d.ts +2 -0
- package/dist/lib/logic-expr/index.d.ts +2 -0
- package/dist/lib/logic-expr/logic-expr.d.ts +2 -0
- package/dist/lib/logic-expr/logic-not.d.ts +10 -0
- package/dist/lib/logic-expr/logic-toggle.d.ts +12 -0
- package/dist/lib/logic-expr/types.d.ts +79 -0
- package/dist/lib/loop-icons/index.d.ts +1 -0
- package/dist/lib/loop-radio-group/index.d.ts +2 -0
- package/dist/lib/multi-part-editor/components/image-item-renderer.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.d.ts +10 -0
- package/dist/lib/multi-part-editor/components/url-input-modal.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/video-item-renderer.d.ts +14 -0
- package/dist/lib/multi-part-editor/index.d.ts +3 -0
- package/dist/lib/multi-part-editor/multi-part-render.d.ts +10 -0
- package/dist/lib/multi-part-editor/type.d.ts +81 -0
- package/dist/lib/multi-part-editor/upload-button.d.ts +23 -0
- package/dist/lib/multi-part-editor/utils.d.ts +16 -0
- package/dist/lib/open-detail-button/index.d.ts +6 -0
- package/dist/lib/page-content/index.d.ts +20 -0
- package/dist/lib/primary-page/index.d.ts +1 -0
- package/dist/lib/primary-page/primary-header.d.ts +14 -0
- package/dist/lib/primary-title/index.d.ts +6 -0
- package/dist/lib/resizable-side-sheet/index.d.ts +10 -0
- package/dist/{types → lib}/resize-sidesheet/index.d.ts +4 -3
- package/dist/lib/resize-sidesheet/use-drag.d.ts +11 -0
- package/dist/lib/schema-editor/index.d.ts +11 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field-item.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/base-input.d.ts +8 -0
- package/dist/lib/semi-schema-form/components/tmpls/description-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/error-list.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/field-error.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/field.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.d.ts +11 -0
- package/dist/lib/semi-schema-form/components/tmpls/index.d.ts +2 -0
- package/dist/lib/semi-schema-form/components/tmpls/object-field.d.ts +8 -0
- package/dist/lib/semi-schema-form/components/tmpls/submit.d.ts +4 -0
- package/dist/lib/semi-schema-form/components/tmpls/title-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/widgets/checkbox.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/index.d.ts +2 -0
- package/dist/lib/semi-schema-form/components/widgets/radio.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/range.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/select.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/textarea.d.ts +6 -0
- package/dist/lib/semi-schema-form/index.d.ts +4 -0
- package/dist/lib/sentinel-form/enum.d.ts +8 -0
- package/dist/lib/sentinel-form/index.d.ts +20 -0
- package/dist/lib/step-nav/index.d.ts +12 -0
- package/dist/{types → lib}/table/index.d.ts +1 -1
- package/dist/lib/table/sort-icon.d.ts +8 -0
- package/dist/lib/table/table-with-pagination.d.ts +21 -0
- package/dist/lib/table/table-without-pagniation.d.ts +6 -0
- package/dist/lib/table-batch-operate/table-batch-operation.d.ts +9 -0
- package/dist/lib/table-batch-operate/use-batch-operate.d.ts +30 -0
- package/dist/lib/table-col-actions/index.d.ts +24 -0
- package/dist/lib/table-cols-config/index.d.ts +11 -0
- package/dist/lib/table-cols-config/type.d.ts +6 -0
- package/dist/lib/table-cols-config/use-hidden-col-keys.d.ts +5 -0
- package/dist/lib/table-cols-config/util.d.ts +3 -0
- package/dist/lib/table-empty/index.d.ts +2 -0
- package/dist/lib/table-header/index.d.ts +14 -0
- package/dist/{types → lib}/tabs/index.d.ts +1 -1
- package/dist/lib/text-area-pro/index.d.ts +6 -0
- package/dist/lib/text-with-copy/index.d.ts +14 -0
- package/dist/lib/title-with-sub/index.d.ts +7 -0
- package/dist/lib/tooltip-when-disabled/index.d.ts +6 -0
- package/dist/lib/tooltip-with-disabled/index.d.ts +5 -0
- package/dist/lib/upload/index.d.ts +9 -0
- package/dist/lib/user-profile/index.d.ts +9 -0
- package/dist/lib/utils/basic.d.ts +2 -0
- package/dist/lib/version-list/version-descriptions.d.ts +15 -0
- package/dist/lib/version-list/version-item.d.ts +9 -0
- package/dist/lib/version-list/version-list.d.ts +11 -0
- package/dist/lib/version-list/version-switch-panel.d.ts +5 -0
- package/package.json +47 -35
- package/dist/es/collapsible-card/index.js +0 -45
- package/dist/es/collapsible-card/index.module.js +0 -5
- package/dist/es/collapsible-card/index_module.css +0 -48
- package/dist/es/column-manage-storage/index.js +0 -73
- package/dist/es/columns-select/index.js +0 -219
- package/dist/es/hooks/use-infinite-scroll.js +0 -178
- package/dist/es/hooks/use-mouse-down-offset.js +0 -41
- package/dist/es/id-render/icon-button-container.js +0 -61
- package/dist/es/id-render/index.js +0 -78
- package/dist/es/index.js +0 -66
- package/dist/es/infinite-scroll-table/index.js +0 -98
- package/dist/es/input-slider/index.js +0 -123
- package/dist/es/input-slider/index.module.js +0 -5
- package/dist/es/input-slider/index_module.css +0 -21
- package/dist/es/large-txt-render/index.js +0 -38
- package/dist/es/page-content/index.js +0 -108
- package/dist/es/primary-page/index.js +0 -4
- package/dist/es/primary-page/primary-header.js +0 -38
- package/dist/es/resize-sidesheet/index.js +0 -100
- package/dist/es/resize-sidesheet/index.module.js +0 -5
- package/dist/es/resize-sidesheet/index_module.css +0 -9
- package/dist/es/resize-sidesheet/use-drag.js +0 -31
- package/dist/es/table/index.js +0 -56
- package/dist/es/table/index.module.js +0 -5
- package/dist/es/table/index_module.css +0 -90
- package/dist/es/table/sort-icon.js +0 -105
- package/dist/es/table/table-with-pagination.js +0 -112
- package/dist/es/table/table-without-pagniation.js +0 -74
- package/dist/es/table-col-actions/index.js +0 -103
- package/dist/es/table-header/index.js +0 -68
- package/dist/es/table-header/index.module.js +0 -5
- package/dist/es/table-header/index_module.css +0 -3
- package/dist/es/tabs/index.js +0 -42
- package/dist/es/tabs/index.module.js +0 -5
- package/dist/es/tabs/index_module.css +0 -37
- package/dist/es/text-with-copy/index.js +0 -71
- package/dist/es/tooltip-with-disabled/index.js +0 -49
- package/dist/es/utils/basic.js +0 -44
- package/dist/es/utils/rect.js +0 -37
- package/dist/lib/collapsible-card/index.js +0 -79
- package/dist/lib/collapsible-card/index.module.js +0 -25
- package/dist/lib/collapsible-card/index_module.css +0 -48
- package/dist/lib/column-manage-storage/index.js +0 -98
- package/dist/lib/columns-select/index.js +0 -241
- package/dist/lib/hooks/use-infinite-scroll.js +0 -195
- package/dist/lib/hooks/use-mouse-down-offset.js +0 -65
- package/dist/lib/id-render/icon-button-container.js +0 -89
- package/dist/lib/id-render/index.js +0 -112
- package/dist/lib/index.js +0 -110
- package/dist/lib/infinite-scroll-table/index.js +0 -126
- package/dist/lib/input-slider/index.js +0 -154
- package/dist/lib/input-slider/index.module.js +0 -25
- package/dist/lib/input-slider/index_module.css +0 -21
- package/dist/lib/large-txt-render/index.js +0 -62
- package/dist/lib/page-content/index.js +0 -136
- package/dist/lib/primary-page/index.js +0 -28
- package/dist/lib/primary-page/primary-header.js +0 -72
- package/dist/lib/resize-sidesheet/index.js +0 -129
- package/dist/lib/resize-sidesheet/index.module.js +0 -25
- package/dist/lib/resize-sidesheet/index_module.css +0 -9
- package/dist/lib/resize-sidesheet/use-drag.js +0 -55
- package/dist/lib/table/index.js +0 -88
- package/dist/lib/table/index.module.js +0 -25
- package/dist/lib/table/index_module.css +0 -90
- package/dist/lib/table/sort-icon.js +0 -137
- package/dist/lib/table/table-with-pagination.js +0 -146
- package/dist/lib/table/table-without-pagniation.js +0 -108
- package/dist/lib/table-col-actions/index.js +0 -123
- package/dist/lib/table-header/index.js +0 -96
- package/dist/lib/table-header/index.module.js +0 -25
- package/dist/lib/table-header/index_module.css +0 -3
- package/dist/lib/tabs/index.js +0 -74
- package/dist/lib/tabs/index.module.js +0 -25
- package/dist/lib/tabs/index_module.css +0 -37
- package/dist/lib/text-with-copy/index.js +0 -105
- package/dist/lib/tooltip-with-disabled/index.js +0 -71
- package/dist/lib/utils/basic.js +0 -78
- package/dist/lib/utils/rect.js +0 -65
- package/dist/types/collapsible-card/index.d.ts +0 -22
- package/dist/types/columns-select/index.d.ts +0 -29
- package/dist/types/hooks/use-mouse-down-offset.d.ts +0 -9
- package/dist/types/id-render/icon-button-container.d.ts +0 -12
- package/dist/types/id-render/index.d.ts +0 -13
- package/dist/types/index.d.ts +0 -19
- package/dist/types/input-slider/index.d.ts +0 -14
- package/dist/types/page-content/index.d.ts +0 -36
- package/dist/types/primary-page/index.d.ts +0 -1
- package/dist/types/primary-page/primary-header.d.ts +0 -17
- package/dist/types/resize-sidesheet/use-drag.d.ts +0 -10
- package/dist/types/table/sort-icon.d.ts +0 -13
- package/dist/types/table/table-with-pagination.d.ts +0 -14
- package/dist/types/table/table-without-pagniation.d.ts +0 -8
- package/dist/types/table-col-actions/index.d.ts +0 -21
- package/dist/types/table-header/index.d.ts +0 -20
- package/dist/types/text-with-copy/index.d.ts +0 -24
- package/dist/types/tooltip-with-disabled/index.d.ts +0 -9
- package/dist/types/utils/basic.d.ts +0 -1
- package/dist/types/utils/rect.d.ts +0 -10
package/dist/es/tabs/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import { jsx } from "react/jsx-runtime";
|
|
33
|
-
import cs from "classnames";
|
|
34
|
-
import { Tabs } from "@coze-arch/coze-design";
|
|
35
|
-
import styles from "./index.module";
|
|
36
|
-
const LoopTabs = (props) => {
|
|
37
|
-
const _a = props, { className } = _a, rest = __objRest(_a, ["className"]);
|
|
38
|
-
return /* @__PURE__ */ jsx(Tabs, __spreadProps(__spreadValues({}, rest), { className: cs(styles.tabs, className) }));
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
LoopTabs
|
|
42
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.tabs_98a2e {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
}
|
|
5
|
-
.tabs_98a2e .semi-tabs-bar-card.semi-tabs-bar-top .semi-tabs-tab:first-of-type {
|
|
6
|
-
margin-left: 24px;
|
|
7
|
-
}
|
|
8
|
-
.tabs_98a2e .semi-tabs-tab-card.semi-tabs-tab-top.semi-tabs-tab {
|
|
9
|
-
height: 36px;
|
|
10
|
-
padding-top: 6px;
|
|
11
|
-
padding-bottom: 6px;
|
|
12
|
-
color: var(--semi-color-text-0);
|
|
13
|
-
background-color: #F6F8FA;
|
|
14
|
-
border: 1px solid var(--semi-color-border);
|
|
15
|
-
border-top-left-radius: 4px;
|
|
16
|
-
border-top-right-radius: 4px;
|
|
17
|
-
}
|
|
18
|
-
.tabs_98a2e .semi-tabs-tab-card.semi-tabs-tab-top.semi-tabs-tab-active {
|
|
19
|
-
color: rgb(var(--coze-up-brand-9));
|
|
20
|
-
background: linear-gradient(to bottom, rgb(var(--coze-up-brand-9)) 2px, transparent 2px);
|
|
21
|
-
border-top: 1px solid rgb(var(--coze-up-brand-9));
|
|
22
|
-
border-bottom: 1px solid var(--semi-color-bg-2);
|
|
23
|
-
}
|
|
24
|
-
.tabs_98a2e .semi-tabs-content {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
flex: 1 1;
|
|
27
|
-
padding: 0;
|
|
28
|
-
}
|
|
29
|
-
.tabs_98a2e .semi-tabs-pane {
|
|
30
|
-
height: 100%;
|
|
31
|
-
}
|
|
32
|
-
.tabs_98a2e .semi-tabs-pane-motion-overlay {
|
|
33
|
-
height: 100%;
|
|
34
|
-
}
|
|
35
|
-
.tabs_98a2e .semi-tag-large {
|
|
36
|
-
height: 20px;
|
|
37
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import { IconCozCopy } from "@coze-arch/coze-design/icons";
|
|
4
|
-
import { IconButton, Tooltip, Typography } from "@coze-arch/coze-design";
|
|
5
|
-
import { handleCopy } from "../utils/basic";
|
|
6
|
-
function TextWithCopy({
|
|
7
|
-
displayText,
|
|
8
|
-
copyTooltipText,
|
|
9
|
-
content,
|
|
10
|
-
className,
|
|
11
|
-
maxWidth,
|
|
12
|
-
style,
|
|
13
|
-
textClassName,
|
|
14
|
-
textType = "secondary",
|
|
15
|
-
onlyIconCopy
|
|
16
|
-
}) {
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
-
"div",
|
|
19
|
-
{
|
|
20
|
-
className: classNames("flex items-center justify-start gap-1", className),
|
|
21
|
-
style,
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ jsx(
|
|
24
|
-
Typography.Text,
|
|
25
|
-
{
|
|
26
|
-
className: classNames(
|
|
27
|
-
"max-w-full",
|
|
28
|
-
{
|
|
29
|
-
"cursor-pointer": !onlyIconCopy
|
|
30
|
-
},
|
|
31
|
-
textClassName
|
|
32
|
-
),
|
|
33
|
-
type: textType,
|
|
34
|
-
style: { maxWidth },
|
|
35
|
-
ellipsis: {
|
|
36
|
-
showTooltip: { opts: { theme: "dark", content } }
|
|
37
|
-
},
|
|
38
|
-
onClick: onlyIconCopy ? void 0 : (e) => {
|
|
39
|
-
content && handleCopy(content);
|
|
40
|
-
e == null ? void 0 : e.stopPropagation();
|
|
41
|
-
},
|
|
42
|
-
children: displayText || content || ""
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
content ? /* @__PURE__ */ jsx(Tooltip, { content: copyTooltipText || "复制内容", theme: "dark", children: /* @__PURE__ */ jsx(
|
|
46
|
-
IconButton,
|
|
47
|
-
{
|
|
48
|
-
size: "mini",
|
|
49
|
-
color: "secondary",
|
|
50
|
-
className: "flex-shrink-0 !w-[20px] !h-[20px]",
|
|
51
|
-
icon: /* @__PURE__ */ jsx(
|
|
52
|
-
IconCozCopy,
|
|
53
|
-
{
|
|
54
|
-
className: "",
|
|
55
|
-
onClick: (e) => {
|
|
56
|
-
content && handleCopy(content);
|
|
57
|
-
e == null ? void 0 : e.stopPropagation();
|
|
58
|
-
},
|
|
59
|
-
fontSize: 14,
|
|
60
|
-
fill: "var(--semi-color-text-2)"
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
) }) : null
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
TextWithCopy
|
|
71
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
33
|
-
import { Tooltip } from "@coze-arch/coze-design";
|
|
34
|
-
function TooltipWhenDisabled(_a) {
|
|
35
|
-
var _b = _a, {
|
|
36
|
-
children,
|
|
37
|
-
disabled
|
|
38
|
-
} = _b, rest = __objRest(_b, [
|
|
39
|
-
"children",
|
|
40
|
-
"disabled"
|
|
41
|
-
]);
|
|
42
|
-
if (disabled) {
|
|
43
|
-
return /* @__PURE__ */ jsx(Tooltip, __spreadProps(__spreadValues({}, rest), { children }));
|
|
44
|
-
}
|
|
45
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
TooltipWhenDisabled
|
|
49
|
-
};
|
package/dist/es/utils/basic.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __async = (__this, __arguments, generator) => {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
var fulfilled = (value) => {
|
|
4
|
-
try {
|
|
5
|
-
step(generator.next(value));
|
|
6
|
-
} catch (e) {
|
|
7
|
-
reject(e);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var rejected = (value) => {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.throw(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
import copy from "copy-to-clipboard";
|
|
22
|
-
import { Toast } from "@coze-arch/coze-design";
|
|
23
|
-
const handleCopy = (value, hideToast) => __async(void 0, null, function* () {
|
|
24
|
-
try {
|
|
25
|
-
copy(value);
|
|
26
|
-
!hideToast && Toast.success({
|
|
27
|
-
content: "复制成功",
|
|
28
|
-
showClose: false,
|
|
29
|
-
zIndex: 99999
|
|
30
|
-
});
|
|
31
|
-
return Promise.resolve(true);
|
|
32
|
-
} catch (e) {
|
|
33
|
-
Toast.warning({
|
|
34
|
-
content: "复制失败",
|
|
35
|
-
showClose: false,
|
|
36
|
-
zIndex: 99999
|
|
37
|
-
});
|
|
38
|
-
console.error(e);
|
|
39
|
-
return Promise.resolve(false);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
export {
|
|
43
|
-
handleCopy
|
|
44
|
-
};
|
package/dist/es/utils/rect.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const isBrowser = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
2
|
-
const getScrollTop = (el) => {
|
|
3
|
-
if (el === document || el === document.documentElement || el === document.body) {
|
|
4
|
-
return Math.max(
|
|
5
|
-
window.pageYOffset,
|
|
6
|
-
document.documentElement.scrollTop,
|
|
7
|
-
document.body.scrollTop
|
|
8
|
-
);
|
|
9
|
-
}
|
|
10
|
-
return el.scrollTop;
|
|
11
|
-
};
|
|
12
|
-
const getScrollHeight = (el) => el.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
|
|
13
|
-
const getClientHeight = (el) => el.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
|
14
|
-
function getTargetElement(target, defaultElement) {
|
|
15
|
-
if (!isBrowser) {
|
|
16
|
-
return void 0;
|
|
17
|
-
}
|
|
18
|
-
if (!target) {
|
|
19
|
-
return defaultElement;
|
|
20
|
-
}
|
|
21
|
-
let targetElement;
|
|
22
|
-
if (typeof target === "function") {
|
|
23
|
-
targetElement = target();
|
|
24
|
-
} else if ("current" in target) {
|
|
25
|
-
targetElement = target.current;
|
|
26
|
-
} else {
|
|
27
|
-
targetElement = target;
|
|
28
|
-
}
|
|
29
|
-
return targetElement;
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
getClientHeight,
|
|
33
|
-
getScrollHeight,
|
|
34
|
-
getScrollTop,
|
|
35
|
-
getTargetElement,
|
|
36
|
-
isBrowser
|
|
37
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var collapsible_card_exports = {};
|
|
30
|
-
__export(collapsible_card_exports, {
|
|
31
|
-
CollapsibleCard: () => CollapsibleCard
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(collapsible_card_exports);
|
|
34
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_classnames = __toESM(require("classnames"));
|
|
36
|
-
var import_icons = require("@coze-arch/coze-design/icons");
|
|
37
|
-
var import_coze_design = require("@coze-arch/coze-design");
|
|
38
|
-
var import_index = __toESM(require("./index.module"));
|
|
39
|
-
function CollapsibleCard({
|
|
40
|
-
title,
|
|
41
|
-
children,
|
|
42
|
-
actionBtns,
|
|
43
|
-
className,
|
|
44
|
-
style,
|
|
45
|
-
isExpand,
|
|
46
|
-
setIsExpand,
|
|
47
|
-
hideExpand
|
|
48
|
-
}) {
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_coze_design.Card, { className: (0, import_classnames.default)(import_index.default.card, className), style, bordered: false, children: [
|
|
50
|
-
title || actionBtns ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default["card-header"], children: [
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_coze_design.Typography.Text, { className: import_index.default["card-title"], children: [
|
|
52
|
-
title,
|
|
53
|
-
children && !hideExpand ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
import_icons.IconCozArrowUpFill,
|
|
55
|
-
{
|
|
56
|
-
className: (0, import_classnames.default)(import_index.default["chevron-icon"], {
|
|
57
|
-
[import_index.default["chevron-icon-close"]]: !isExpand
|
|
58
|
-
}),
|
|
59
|
-
onClick: () => setIsExpand == null ? void 0 : setIsExpand(!isExpand)
|
|
60
|
-
}
|
|
61
|
-
) : null
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: actionBtns })
|
|
64
|
-
] }) : null,
|
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
-
"div",
|
|
67
|
-
{
|
|
68
|
-
className: (0, import_classnames.default)(import_index.default["card-content"], {
|
|
69
|
-
[import_index.default.active]: isExpand
|
|
70
|
-
}),
|
|
71
|
-
children
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
] });
|
|
75
|
-
}
|
|
76
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
77
|
-
0 && (module.exports = {
|
|
78
|
-
CollapsibleCard
|
|
79
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var index_module_exports = {};
|
|
20
|
-
__export(index_module_exports, {
|
|
21
|
-
default: () => index_module_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(index_module_exports);
|
|
24
|
-
var import_index_module = require("./index_module.css");
|
|
25
|
-
var index_module_default = { "card": "card_42a41", "card-header": "card-header_42a41", "card-title": "card-title_42a41", "chevron-icon": "chevron-icon_42a41", "chevron-icon-close": "chevron-icon-close_42a41", "card-content": "card-content_42a41", "active": "active_42a41" };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable declaration-no-important */
|
|
2
|
-
.card_42a41 {
|
|
3
|
-
background: transparent !important;
|
|
4
|
-
border-radius: 0 !important;
|
|
5
|
-
}
|
|
6
|
-
.card_42a41 .semi-card-body {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
gap: 8px;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
height: 100%;
|
|
12
|
-
padding: 0;
|
|
13
|
-
}
|
|
14
|
-
.card_42a41 .card-header_42a41 {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: space-between;
|
|
18
|
-
height: 24px;
|
|
19
|
-
min-height: 24px;
|
|
20
|
-
padding: 10px 20px 0;
|
|
21
|
-
}
|
|
22
|
-
.card_42a41 .card-title_42a41 {
|
|
23
|
-
position: relative;
|
|
24
|
-
display: flex;
|
|
25
|
-
gap: 4px;
|
|
26
|
-
align-items: center;
|
|
27
|
-
font-weight: 600;
|
|
28
|
-
}
|
|
29
|
-
.card_42a41 .card-title_42a41 .chevron-icon_42a41 {
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
transition: transform 0.3s;
|
|
32
|
-
}
|
|
33
|
-
.card_42a41 .card-title_42a41 .chevron-icon_42a41.chevron-icon-close_42a41 {
|
|
34
|
-
transform: rotate(180deg);
|
|
35
|
-
}
|
|
36
|
-
.card_42a41 .card-title_42a41 .chevron-icon_42a41:hover {
|
|
37
|
-
color: var(--semi-color-primary);
|
|
38
|
-
}
|
|
39
|
-
.card_42a41 .card-content_42a41 {
|
|
40
|
-
height: 0;
|
|
41
|
-
opacity: 0;
|
|
42
|
-
transition: height 0.2s, opacity 0.2s;
|
|
43
|
-
}
|
|
44
|
-
.card_42a41 .card-content_42a41.active_42a41 {
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
height: 100%;
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
var __export = (target, all) => {
|
|
24
|
-
for (var name in all)
|
|
25
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
-
};
|
|
27
|
-
var __copyProps = (to, from, except, desc) => {
|
|
28
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
-
for (let key of __getOwnPropNames(from))
|
|
30
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
-
}
|
|
33
|
-
return to;
|
|
34
|
-
};
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
-
var column_manage_storage_exports = {};
|
|
37
|
-
__export(column_manage_storage_exports, {
|
|
38
|
-
DATASET_COLUMN_STORAGE_KEY: () => DATASET_COLUMN_STORAGE_KEY,
|
|
39
|
-
dealColumnsWithStorage: () => dealColumnsWithStorage,
|
|
40
|
-
getColumnManageStorage: () => getColumnManageStorage,
|
|
41
|
-
setColumnsManageStorage: () => setColumnsManageStorage
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(column_manage_storage_exports);
|
|
44
|
-
var import_lodash_es = require("lodash-es");
|
|
45
|
-
var import_toolkit = require("@cozeloop/toolkit");
|
|
46
|
-
const DATASET_COLUMN_STORAGE_KEY = "dataset-column";
|
|
47
|
-
const getColumnManageStorage = (storageKey) => {
|
|
48
|
-
const storage = localStorage.getItem(storageKey);
|
|
49
|
-
return (0, import_toolkit.safeJsonParse)(storage || "{}") || {};
|
|
50
|
-
};
|
|
51
|
-
const setColumnsManageStorage = (storageKey, columns) => {
|
|
52
|
-
if (!storageKey) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const data = {};
|
|
56
|
-
columns.forEach((column, index) => {
|
|
57
|
-
var _a;
|
|
58
|
-
data[column.key] = {
|
|
59
|
-
index,
|
|
60
|
-
checked: (_a = column.checked) != null ? _a : true
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
localStorage.setItem(storageKey, JSON.stringify(data));
|
|
64
|
-
};
|
|
65
|
-
const dealColumnsWithStorage = (storageKey, columns) => {
|
|
66
|
-
const sort = getColumnManageStorage(storageKey);
|
|
67
|
-
if (!sort || (0, import_lodash_es.isEmpty)(sort)) {
|
|
68
|
-
return columns;
|
|
69
|
-
}
|
|
70
|
-
const newColumns = [...columns || []].sort((a, b) => {
|
|
71
|
-
var _a, _b, _c, _d;
|
|
72
|
-
const indexA = (_b = (_a = sort[a.key]) == null ? void 0 : _a.index) != null ? _b : Infinity;
|
|
73
|
-
const indexB = (_d = (_c = sort[b.key]) == null ? void 0 : _c.index) != null ? _d : Infinity;
|
|
74
|
-
if (indexA !== Infinity && indexB !== Infinity) {
|
|
75
|
-
return indexA - indexB;
|
|
76
|
-
}
|
|
77
|
-
if (indexA !== Infinity) {
|
|
78
|
-
return -1;
|
|
79
|
-
}
|
|
80
|
-
if (indexB !== Infinity) {
|
|
81
|
-
return 1;
|
|
82
|
-
}
|
|
83
|
-
return 0;
|
|
84
|
-
});
|
|
85
|
-
return newColumns.map((column) => {
|
|
86
|
-
var _a, _b;
|
|
87
|
-
return __spreadProps(__spreadValues({}, column), {
|
|
88
|
-
checked: (_b = (_a = sort[column.key]) == null ? void 0 : _a.checked) != null ? _b : true
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
-
0 && (module.exports = {
|
|
94
|
-
DATASET_COLUMN_STORAGE_KEY,
|
|
95
|
-
dealColumnsWithStorage,
|
|
96
|
-
getColumnManageStorage,
|
|
97
|
-
setColumnsManageStorage
|
|
98
|
-
});
|