@cloudbase/weda-ui 3.4.13 → 3.4.14
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/configs/components/dataView.js +3 -0
- package/dist/configs/components/echart.js +505 -0
- package/dist/configs/components/listView.js +1 -0
- package/dist/configs/components/wd-official-account.js +1 -0
- package/dist/configs/index.js +2 -0
- package/dist/web/actions/showMessage/index.js +1 -1
- package/dist/web/actions/showMessage/style.js +2 -0
- package/dist/web/actions/showModal/index.js +1 -1
- package/dist/web/actions/showModal/style.js +2 -0
- package/dist/web/components/button/index.js +1 -1
- package/dist/web/components/button/style.js +2 -0
- package/dist/web/components/calendar/index.js +1 -1
- package/dist/web/components/calendar/style.js +2 -0
- package/dist/web/components/carousel/index.js +1 -1
- package/dist/web/components/carousel/style.js +2 -0
- package/dist/web/components/chart/common/echarts.js +1 -0
- package/dist/web/components/chart/statisticsCard/index.js +1 -1
- package/dist/web/components/chart/statisticsCard/style.js +2 -0
- package/dist/web/components/customer-service/customer-service.js +1 -0
- package/dist/web/components/echart/echart.js +82 -0
- package/dist/web/components/echart/index.js +3 -0
- package/dist/web/components/flow/process/constants.js +3 -1
- package/dist/web/components/form/checkbox/index.js +1 -0
- package/dist/web/components/form/checkbox/style.js +2 -0
- package/dist/web/components/form/enumSelect/index.js +2 -0
- package/dist/web/components/form/enumSelect/style.js +1 -0
- package/dist/web/components/form/form/index.js +1 -1
- package/dist/web/components/form/form/style.js +2 -0
- package/dist/web/components/form/formcell/index.js +1 -1
- package/dist/web/components/form/formcell/style.js +2 -0
- package/dist/web/components/form/input/index.js +1 -1
- package/dist/web/components/form/input/style.js +2 -0
- package/dist/web/components/form/location/common/mapChoose.js +1 -1
- package/dist/web/components/form/location/common/selectModal.js +1 -1
- package/dist/web/components/form/location/common/style.js +3 -0
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +1 -1
- package/dist/web/components/form/location/components/LocationH5/style.js +2 -0
- package/dist/web/components/form/location/components/LocationPC/location.PC.js +1 -1
- package/dist/web/components/form/location/components/LocationPC/style.js +2 -0
- package/dist/web/components/form/location/index.js +1 -1
- package/dist/web/components/form/location/style.js +1 -0
- package/dist/web/components/form/radio/index.js +1 -1
- package/dist/web/components/form/radio/style.js +2 -0
- package/dist/web/components/form/select/allTimePicker/calendar.js +1 -1
- package/dist/web/components/form/select/allTimePicker/index.js +1 -1
- package/dist/web/components/form/select/allTimePicker/style.js +3 -0
- package/dist/web/components/form/select/dropdown-select/h5.js +1 -1
- package/dist/web/components/form/select/dropdown-select/pc.js +1 -1
- package/dist/web/components/form/select/dropdown-select/style.js +2 -0
- package/dist/web/components/form/select/index.js +2 -1
- package/dist/web/components/form/select/moment-locale.js +1 -0
- package/dist/web/components/form/select/status/allEmpty.js +1 -1
- package/dist/web/components/form/select/status/empty.js +1 -1
- package/dist/web/components/form/select/status/loading.js +1 -1
- package/dist/web/components/form/select/status/retry.js +1 -1
- package/dist/web/components/form/select/status/style.js +2 -0
- package/dist/web/components/form/select/style.js +2 -0
- package/dist/web/components/form/select/year.js +1 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/h5.js +1 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/pc.js +1 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/style.js +2 -0
- package/dist/web/components/form/selectMultiple/index.css +37 -0
- package/dist/web/components/form/selectMultiple/index.js +1 -0
- package/dist/web/components/form/selectMultiple/status/allEmpty.js +1 -1
- package/dist/web/components/form/selectMultiple/status/empty.js +1 -1
- package/dist/web/components/form/selectMultiple/status/loading.js +1 -1
- package/dist/web/components/form/selectMultiple/status/retry.js +1 -1
- package/dist/web/components/form/selectMultiple/status/style.js +2 -0
- package/dist/web/components/form/selectMultiple/style.js +2 -0
- package/dist/web/components/form/switch/index.js +1 -0
- package/dist/web/components/form/switch/style.js +2 -0
- package/dist/web/components/form/textarea/index.js +1 -1
- package/dist/web/components/form/textarea/style.js +2 -0
- package/dist/web/components/form/tips/index.js +1 -1
- package/dist/web/components/form/tips/style.js +3 -0
- package/dist/web/components/form/uploader/index.js +1 -1
- package/dist/web/components/form/uploader/style.js +2 -0
- package/dist/web/components/form/uploaderFile/index.js +1 -1
- package/dist/web/components/form/uploaderFile/style.js +2 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +0 -1
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +1 -1
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/style.js +3 -0
- package/dist/web/components/form-checkbox/index.js +1 -0
- package/dist/web/components/form-date/index.js +1 -0
- package/dist/web/components/form-depart-tree-select/index.js +1 -0
- package/dist/web/components/form-image-uploader/index.js +1 -0
- package/dist/web/components/form-image-uploader/style.js +1 -0
- package/dist/web/components/form-input/index.js +1 -0
- package/dist/web/components/form-location/index.js +1 -0
- package/dist/web/components/form-multi-region/index.js +1 -0
- package/dist/web/components/form-phone/index.js +1 -0
- package/dist/web/components/form-radio/index.js +1 -0
- package/dist/web/components/form-rich-text/index.js +1 -0
- package/dist/web/components/form-select/index.js +1 -0
- package/dist/web/components/form-select-multiple/index.js +1 -0
- package/dist/web/components/form-switch/index.js +1 -0
- package/dist/web/components/form-text-area/index.js +1 -0
- package/dist/web/components/form-time/index.js +1 -0
- package/dist/web/components/form-upload-file/index.js +1 -0
- package/dist/web/components/form-url/index.js +1 -0
- package/dist/web/components/form-user-tree-select/index.js +1 -0
- package/dist/web/components/formdetail/index.js +1 -1
- package/dist/web/components/formdetail/style.js +2 -0
- package/dist/web/components/graphicCard/index.js +1 -1
- package/dist/web/components/graphicCard/style.js +2 -0
- package/dist/web/components/grid/col.js +1 -1
- package/dist/web/components/grid/grid.js +1 -2
- package/dist/web/components/grid/row.js +1 -1
- package/dist/web/components/grid/style.js +2 -0
- package/dist/web/components/image/index.js +1 -1
- package/dist/web/components/image/style.js +2 -0
- package/dist/web/components/index.js +2 -31
- package/dist/web/components/link/index.js +1 -1
- package/dist/web/components/link/style.js +2 -0
- package/dist/web/components/listView/index.js +1 -1
- package/dist/web/components/listView/style.js +2 -0
- package/dist/web/components/lottery/index.js +5 -3
- package/dist/web/components/lottery/style.js +2 -0
- package/dist/web/components/modal/modal.h5.js +1 -1
- package/dist/web/components/modal/modal.pc.js +1 -0
- package/dist/web/components/modal/style.js +3 -0
- package/dist/web/components/navLayout/index.js +1 -1
- package/dist/web/components/navLayout/style.js +3 -0
- package/dist/web/components/navigationBar/index.js +1 -1
- package/dist/web/components/navigationBar/style.js +2 -0
- package/dist/web/components/pageLayout/PageContent/index.js +1 -1
- package/dist/web/components/pageLayout/PageContent/style.js +2 -0
- package/dist/web/components/pageLayout/index.js +1 -1
- package/dist/web/components/pageLayout/style.js +2 -0
- package/dist/web/components/phone/index.js +1 -0
- package/dist/web/components/phoneCode/index.js +1 -0
- package/dist/web/components/picker/datePicker.js +1 -0
- package/dist/web/components/picker/picker.js +1 -0
- package/dist/web/components/picker/style.js +1 -0
- package/dist/web/components/picker/timePicker.js +1 -0
- package/dist/web/components/qrcode/qr-code.js +1 -0
- package/dist/web/components/richText/index.js +7 -5
- package/dist/web/components/richText/style.js +2 -0
- package/dist/web/components/richTextView/index.js +1 -1
- package/dist/web/components/richTextView/style.js +2 -0
- package/dist/web/components/scrollView/index.js +1 -0
- package/dist/web/components/scrollView/style.js +1 -0
- package/dist/web/components/share/index.js +1 -0
- package/dist/web/components/statusContent/index.js +1 -1
- package/dist/web/components/statusContent/style.js +2 -0
- package/dist/web/components/style.js +5 -0
- package/dist/web/components/swiper/index.js +1 -1
- package/dist/web/components/swiper/style.js +2 -0
- package/dist/web/components/table/BaseTable.js +1 -2
- package/dist/web/components/table/ExportFileModalByApi/index.js +1 -1
- package/dist/web/components/table/ExportFileModalByApi/style.js +3 -0
- package/dist/web/components/table/Form/Location.js +1 -1
- package/dist/web/components/table/Form/style.js +2 -0
- package/dist/web/components/table/ImportFileModal/index.js +1 -1
- package/dist/web/components/table/ImportFileModal/style.js +2 -0
- package/dist/web/components/table/ImportFileModalByApi/index.js +0 -2
- package/dist/web/components/table/ImportFileModalByApi/style.js +3 -0
- package/dist/web/components/table/SelectableBlock/index.js +1 -1
- package/dist/web/components/table/SelectableBlock/style.js +2 -0
- package/dist/web/components/table/UserDepartment/ViewCell.js +1 -1
- package/dist/web/components/table/UserDepartment/style.js +2 -0
- package/dist/web/components/table/index.js +1 -1
- package/dist/web/components/table/style.js +4 -0
- package/dist/web/components/tabs/index.js +1 -0
- package/dist/web/components/tabs/style.js +2 -0
- package/dist/web/components/tabs/tabs.h5.js +0 -1
- package/dist/web/components/text/index.js +1 -1
- package/dist/web/components/text/style.js +3 -0
- package/dist/web/components/uploaderFileView/index.js +1 -1
- package/dist/web/components/uploaderFileView/style.js +2 -0
- package/dist/web/components/uploaderView/index.js +1 -1
- package/dist/web/components/uploaderView/style.js +2 -0
- package/dist/web/components/userInfo/index.js +1 -0
- package/dist/web/components/wd-bubble/wd-bubble.js +1 -0
- package/dist/web/components/wd-button/wd-button.js +1 -0
- package/dist/web/components/wd-form/index.js +1 -0
- package/dist/web/components/wd-icon/wd-icon.js +1 -1
- package/dist/web/components/wd-image/index.js +1 -0
- package/dist/web/components/wd-link/wd-link.js +1 -0
- package/dist/web/components/wd-official-account/index.js +1 -1
- package/dist/web/components/wd-official-account/style.js +2 -0
- package/dist/web/components/wd-table/components/ExportFileModalByApi/ExportFileModalByApi.js +1 -1
- package/dist/web/components/wd-table/components/ExportFileModalByApi/index.js +7 -14
- package/dist/web/components/wd-table/components/ExportFileModalByApi/style.js +2 -0
- package/dist/web/components/wd-table/components/FieldRender/Form/Location.js +1 -1
- package/dist/web/components/wd-table/components/FieldRender/Form/style.js +2 -0
- package/dist/web/components/wd-table/components/FieldRender/UserDepartment/ViewCell.js +1 -1
- package/dist/web/components/wd-table/components/FieldRender/UserDepartment/style.js +2 -0
- package/dist/web/components/wd-table/components/ImportFileModalByApi/index.js +1 -0
- package/dist/web/components/wd-table/components/ImportFileModalByApi/style.js +1 -0
- package/dist/web/components/wd-table/wd-table.js +1 -0
- package/dist/web/components/wd-text/wd-text.js +1 -0
- package/dist/web/components/web-view/style.js +2 -0
- package/dist/web/components/web-view/web-view.js +1 -1
- package/dist/web/components/wedaVideo/index.js +1 -2
- package/dist/web/components/wedaVideo/style.js +4 -0
- package/dist/web/utils/platform.js +1 -1
- package/package.json +16 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import classNames from '../../utils/classnames';
|
|
4
|
+
import './style';
|
|
4
5
|
export default function ScrollView({ id, scrollX = false, scrollY = true, style, scrollTop, scrollLeft, scrollIntoView, className, children, upperThreshold = 50, lowerThreshold = 50, events, }) {
|
|
5
6
|
const [toUpper, setToUpper] = React.useState(false);
|
|
6
7
|
const [toLower, setToLower] = React.useState(false);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../style';
|
|
@@ -7,6 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { Bubble, ConfigProvider } from 'tea-component';
|
|
9
9
|
import Button from '../../components/button';
|
|
10
|
+
import '../style';
|
|
10
11
|
// @ts-ignore忽略ts交验
|
|
11
12
|
// eslint-disable-next-line rulesdir/no-phantom-deps,import/no-unresolved
|
|
12
13
|
import { autorun } from 'mobx';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import './
|
|
3
|
+
import './style';
|
|
4
4
|
const BLOCK_NAME = 'weda-list-view';
|
|
5
5
|
export default function StatusContent(props) {
|
|
6
6
|
const { emptyText, component, isH5, icon = 'empty' } = props;
|
|
@@ -4,8 +4,8 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
5
|
import Swipe from 'react-easy-swipe';
|
|
6
6
|
import { useDebouncedCallback, useEventListener, useResizeObserver, } from '@react-hookz/web';
|
|
7
|
-
import './index.css';
|
|
8
7
|
import { emptyObject } from '../../utils/constant';
|
|
8
|
+
import './style';
|
|
9
9
|
export default function Swiper({ children, className, style, autoplay = true, circular = true, vertical = false, indicatorDots, indicatorColor = 'rgba(200, 200, 200, 0.9)', indicatorActiveColor = 'rgba(0, 0, 0, 0.9)', duration = 500, interval = 5000, current = 0, events = emptyObject, id, }) {
|
|
10
10
|
const originChildrenRef = useRef(null);
|
|
11
11
|
const [realChildren, setRealChildren] = useState([]);
|
|
@@ -18,8 +18,7 @@ import { exportData } from '../../utils/file';
|
|
|
18
18
|
import { DataSource, getDataSourceByName, getPrimaryField, getDataSourceFieldsWithAuth, } from '../../utils/datasource';
|
|
19
19
|
import { getUuid, getFieldsTypeName } from '../../utils/tool';
|
|
20
20
|
import EmptyContent from '../statusContent';
|
|
21
|
-
import './
|
|
22
|
-
// eslint-disable-next-line prettier/prettier
|
|
21
|
+
import './style';
|
|
23
22
|
const { sortable, radioable, selectable, pageable, autotip, injectable } = Table.addons;
|
|
24
23
|
/**
|
|
25
24
|
* 基础表格
|
|
@@ -3,7 +3,7 @@ import { useState, useEffect } from 'react';
|
|
|
3
3
|
import { Modal, Button, Radio, Form, Table, Checkbox, Icon, List, Status, Bubble, } from 'tea-component';
|
|
4
4
|
import { useImportingStatus } from '../hooks/useImportingStatus';
|
|
5
5
|
import { callWedaApi } from '../../../utils/tcb';
|
|
6
|
-
import './
|
|
6
|
+
import './style';
|
|
7
7
|
const { selectable, scrollable } = Table.addons;
|
|
8
8
|
export function ExportFileModalByApi({ onCancel, visible, fields, selectedKeysList, handleInOrOutRecordModealVisible, dbName, where, whereList, orderBy, orderType, tableColumns, }) {
|
|
9
9
|
const [step, setStep] = useState('fieldMap');
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import classNames from '../../../utils/classnames';
|
|
4
4
|
import { Form, Input, Text } from 'tea-component';
|
|
5
|
-
import './
|
|
5
|
+
import './style';
|
|
6
6
|
export const locationProperties = {
|
|
7
7
|
address: {
|
|
8
8
|
title: '地点',
|
|
@@ -7,7 +7,7 @@ import csvTemplate from './csvTemplate.json';
|
|
|
7
7
|
import { validateHandle, fieldsValidateTypeGenerate, formatTableDate, } from './validate';
|
|
8
8
|
import { submitFormatter } from './submitFormatter';
|
|
9
9
|
import { useEnumContext } from '../../../utils/hooks/context';
|
|
10
|
-
import './
|
|
10
|
+
import './style';
|
|
11
11
|
// 下载模版
|
|
12
12
|
const getCSVTemplate = (fields, datasourceTitle) => {
|
|
13
13
|
const header = [];
|
|
@@ -5,8 +5,6 @@ import { UploadCSVFile } from './uploadCSVFile';
|
|
|
5
5
|
import { alertErrorMessage } from '../../../utils/platform';
|
|
6
6
|
import { deepClone } from '../../../utils/tool';
|
|
7
7
|
import { useImportingStatus } from '../hooks/useImportingStatus';
|
|
8
|
-
import '../ImportFileModal/index.css';
|
|
9
|
-
import './index.css';
|
|
10
8
|
import { callWedaApi } from '../../../utils/tcb';
|
|
11
9
|
// 字段映射
|
|
12
10
|
const FileTitleDropdown = ({ fileHeader, fileItem, upddateFileJsonMap }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'tea-component';
|
|
3
3
|
import { getRelationData } from './utils';
|
|
4
|
-
import './
|
|
4
|
+
import './style';
|
|
5
5
|
export const ViewCell = ({ data, showType, relation }) => {
|
|
6
6
|
if (showType === 'tree') {
|
|
7
7
|
return _jsx(Text, { verticalAlign: "middle", children: (data === null || data === void 0 ? void 0 : data.content) || '-' });
|
|
@@ -8,7 +8,7 @@ import classNames from '../../utils/classnames';
|
|
|
8
8
|
import { TABLE_BUTTONS, TABLE_SETTINGS, TABLE_SLOT_PREFIX, GLOBAL_BUTTON, } from '../../utils/constant';
|
|
9
9
|
import { EnumHoc } from '../../utils/hooks/EnumHoc';
|
|
10
10
|
import { alertErrorMessage } from '../../utils/platform';
|
|
11
|
-
import './
|
|
11
|
+
import './style';
|
|
12
12
|
/**
|
|
13
13
|
* 列表组件
|
|
14
14
|
*/
|
|
@@ -4,6 +4,7 @@ import { CommonErrorBoundary } from '../common/error-boundary';
|
|
|
4
4
|
// import { fallback } from '../../utils/loading-fallback';
|
|
5
5
|
import TabsH5 from './tabs.h5';
|
|
6
6
|
import TabsPc from './tabs.pc';
|
|
7
|
+
import './style';
|
|
7
8
|
function TabsImpl(props) {
|
|
8
9
|
const platform = usePlatform();
|
|
9
10
|
if ((props === null || props === void 0 ? void 0 : props.showType) === 'pc') {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import './index.css';
|
|
3
2
|
import classNames from '../../utils/classnames';
|
|
4
3
|
import { useSyncValue } from '../../utils/hooks/useSyncValue';
|
|
5
4
|
import { useCustomCompareEffect, useSyncedRef } from '@react-hookz/web';
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import classNames from '../../utils/classnames';
|
|
4
4
|
import { textToString } from '../../utils/platform';
|
|
5
|
-
import './
|
|
5
|
+
import './style';
|
|
6
6
|
export default function Text({ text, maxLines, space, tips, userSelect, style, className, events, id, level, contenteditable, onInput, onBlur, }) {
|
|
7
7
|
const textStyle = React.useMemo(() => ({
|
|
8
8
|
WebkitLineClamp: maxLines,
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { UploadFilePc } from '../form/uploaderFile/uploadFile.pc';
|
|
4
4
|
import { UploadFileH5 } from '../form/uploaderFile/uploadFile.h5';
|
|
5
5
|
import { filterStrList, isCloudFileID, downloadFile, usePlatform, transFileCloudidToName, } from '../../utils/platform';
|
|
6
|
-
import './index.css';
|
|
7
6
|
import { useTempUrl } from '../../utils/hooks/use-cloud-id-temp-url';
|
|
7
|
+
import './style';
|
|
8
8
|
const CLASS_PREFIX = 'weda-uploader-file-view';
|
|
9
9
|
/**
|
|
10
10
|
* 上传文件回显,传showType强制展示某端样式,否则根据平台自动判断
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { TcbImage } from '../form/uploader/uploader.pc';
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
|
-
import './index.css';
|
|
6
5
|
import { emptyObject } from '../../utils/constant';
|
|
6
|
+
import './style';
|
|
7
7
|
const CLASS_PREFIX = 'g-uploader-view';
|
|
8
8
|
/**
|
|
9
9
|
* 图片上传-展示组件
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Bubble, ConfigProvider } from 'tea-component';
|
|
3
3
|
import Button from '../../components/button';
|
|
4
|
+
import '../style';
|
|
4
5
|
const UserInfo = (props) => (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(Bubble, { content: "\u8BE5\u7EC4\u4EF6\u5FC5\u987B\u5728\u5C0F\u7A0B\u5E8F\u771F\u5B9E\u73AF\u5883\u4F7F\u7528\u624D\u80FD\u591F\u770B\u5230\u5B9E\u9645\u6548\u679C\u3002", children: _jsx(Button, { ...props }) }) }));
|
|
5
6
|
export default UserInfo;
|
|
@@ -3,6 +3,7 @@ import { forwardRef, useImperativeHandle } from 'react';
|
|
|
3
3
|
import { Bubble, ConfigProvider } from 'tea-component';
|
|
4
4
|
import classNames from '../../utils/classnames';
|
|
5
5
|
import { isInIde, usePlatform } from '../../utils/platform';
|
|
6
|
+
import '../style';
|
|
6
7
|
export const WdBubble = forwardRef(function WdBubble({ trigger, placement, promptTheme, arrowPointAtCenter, openDelay, closeDelay, bubbleContent, bubbleChildren, events, id, style, className, }, ref) {
|
|
7
8
|
const platform = usePlatform();
|
|
8
9
|
// Widget API,挂载组件只读属性和组件方法
|
|
@@ -9,6 +9,7 @@ import { textToString, usePlatform } from '../../utils/platform';
|
|
|
9
9
|
import { convertLegacyEnum, filterPropsWithOn } from '../../utils/tool';
|
|
10
10
|
import { WD_BUTTON_THEME, WD_BUTTON_VARIANT, WD_BUTTON_SIZE, WD_BUTTON_ICON_TYPE, WD_BUTTON_ICON_POSITION, WD_BUTTON_TYPE, } from '../../../enum';
|
|
11
11
|
import { WdIcon } from '../index';
|
|
12
|
+
import '../style';
|
|
12
13
|
export const WdButton = forwardRef(function WdButton(props, ref) {
|
|
13
14
|
const { text, size: _size = 'md', theme: _theme = 'secondary', variant: _variant = 'base', iconType: _iconType = 'none', iconSource = 'inner', icon: _icon, iconSrc, iconPosition: _iconPosition = 'before', block, formType: _formType, disabled, events = emptyObject, className, style, id, loading,
|
|
14
15
|
// 组件 widget 实例,后续可能会更改接口
|
|
@@ -16,6 +16,7 @@ import lodashGet from 'lodash.get';
|
|
|
16
16
|
import isObjectEqual from '../../utils/isObjectEqual';
|
|
17
17
|
import { useDataSource } from '../../utils/hooks/useDataSource';
|
|
18
18
|
import { WdForm as FormUi } from './wd-form';
|
|
19
|
+
import '../style';
|
|
19
20
|
const SET_VALUE_DEBOUNCE_TIMEOUT = 200;
|
|
20
21
|
const logger = debug('wd-form');
|
|
21
22
|
const WdForm = React.forwardRef(function WdForm(props, ref) {
|
|
@@ -6,7 +6,7 @@ import { useConfig } from '../../utils/config-context';
|
|
|
6
6
|
import { usePlatform } from '../../utils/platform';
|
|
7
7
|
import { convertLegacyEnum } from '../../utils/tool';
|
|
8
8
|
import { WD_ICON_TYPE, WD_ICON_SIZE } from '../../../enum';
|
|
9
|
-
|
|
9
|
+
import '../style';
|
|
10
10
|
export const WdIcon = forwardRef(function WdIcon({ type: _type = 'inner', name, src, size: _size, events = emptyObject, className, style: _style, id, color: _color, ...props }, ref) {
|
|
11
11
|
const [isError, setIsError] = useState(false);
|
|
12
12
|
const platform = usePlatform();
|
|
@@ -5,6 +5,7 @@ import { ImageInner } from './image';
|
|
|
5
5
|
import { emptyObject } from '../../utils/constant';
|
|
6
6
|
import { useTempUrl } from '../../utils/hooks/use-cloud-id-temp-url';
|
|
7
7
|
import { useConfig } from '../../utils/config-context';
|
|
8
|
+
import '../style';
|
|
8
9
|
export default forwardRef(function WdImage({
|
|
9
10
|
// 系统属性
|
|
10
11
|
className, events = emptyObject, style,
|
|
@@ -5,6 +5,7 @@ import { emptyObject } from '../../utils/constant';
|
|
|
5
5
|
import { useConfig } from '../../utils/config-context';
|
|
6
6
|
import { usePlatform } from '../../utils/platform';
|
|
7
7
|
import { WdIcon } from '../index';
|
|
8
|
+
import '../style';
|
|
8
9
|
export const WdLink = forwardRef(function WdLink({ content, url, isOpenInNewWindow, params, iconType, iconSource = 'inner', icon, iconSrc, iconPosition = 'before', disabled, enableSlot = true, contentSlot, events = emptyObject, className, style, id, ...props }, ref) {
|
|
9
10
|
const platform = usePlatform();
|
|
10
11
|
// 样式
|
|
@@ -11,7 +11,7 @@ import { WdButton } from '../../components/wd-button';
|
|
|
11
11
|
// @ts-ignore忽略ts交验
|
|
12
12
|
// eslint-disable-next-line rulesdir/no-phantom-deps,import/no-unresolved
|
|
13
13
|
import { autorun } from 'mobx';
|
|
14
|
-
import './
|
|
14
|
+
import './style';
|
|
15
15
|
export default function WdOfficialAccount(props) {
|
|
16
16
|
var _a, _b;
|
|
17
17
|
const { className, id, style } = props;
|
package/dist/web/components/wd-table/components/ExportFileModalByApi/ExportFileModalByApi.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ConfigProvider } from 'tea-component';
|
|
3
3
|
import { ExportFileModalByApi as ExportFileModalByApiFromTable } from '../../../table/ExportFileModalByApi';
|
|
4
|
-
import './
|
|
4
|
+
import './style';
|
|
5
5
|
export function ExportFileModalByApi({ onCancel, visible, fields, selectedKeysList, handleInOrOutRecordModalVisible, dbName, whereList, where, orderBy, orderType, tableColumns, }) {
|
|
6
6
|
return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(ExportFileModalByApiFromTable, { onCancel: onCancel, visible: visible, fields: fields, selectedKeysList: selectedKeysList, handleInOrOutRecordModealVisible: handleInOrOutRecordModalVisible, dbName: dbName, where: where, whereList: whereList, orderBy: orderBy, orderType: orderType, tableColumns: tableColumns }) }));
|
|
7
7
|
}
|
|
@@ -4,24 +4,17 @@ import { formatDataToXlsx, filterCustomFields } from '../FieldRender';
|
|
|
4
4
|
import { getFieldsTypeName } from '../../../../utils/tool';
|
|
5
5
|
import { alertErrorMessage } from '../../../../utils/platform';
|
|
6
6
|
import { exportData } from '../../../../utils/file';
|
|
7
|
-
import './
|
|
7
|
+
import './style';
|
|
8
8
|
/**
|
|
9
9
|
* 后端导出弹窗
|
|
10
10
|
*/
|
|
11
11
|
export const ExportFileModal = ({ fields, columns, isExportFileModalByApiVisible, selectedKeys, dbName, query, whereList, setIsExportFileModalByApiVisible, setIsInOrOutRecordModalVisible, }) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return false;
|
|
19
|
-
return true;
|
|
20
|
-
})) === null || _a === void 0 ? void 0 : _a.sort((a, b) => (a === null || a === void 0 ? void 0 : a['x-index']) - (b === null || b === void 0 ? void 0 : b['x-index']))) === null || _b === void 0 ? void 0 : _b.filter((item) => {
|
|
21
|
-
// 筛选出列管理字段
|
|
22
|
-
const isVisible = columns === null || columns === void 0 ? void 0 : columns.findIndex((column) => (column === null || column === void 0 ? void 0 : column.key) === (item === null || item === void 0 ? void 0 : item.name) && (column === null || column === void 0 ? void 0 : column.isExport));
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
24
|
-
return isVisible != -1;
|
|
12
|
+
const supportFields = [];
|
|
13
|
+
columns.forEach((i) => {
|
|
14
|
+
const field = fields.find((field) => field.name === i.key);
|
|
15
|
+
if (field && (i === null || i === void 0 ? void 0 : i.isExport)) {
|
|
16
|
+
supportFields.push(field);
|
|
17
|
+
}
|
|
25
18
|
});
|
|
26
19
|
// 没有数据标识默认加上数据标识字段
|
|
27
20
|
const isExitId = supportFields === null || supportFields === void 0 ? void 0 : supportFields.findIndex((item) => (item === null || item === void 0 ? void 0 : item.name) === '_id');
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import classNames from '../../../../../utils/classnames';
|
|
4
4
|
import { Form, Input, Text } from 'tea-component';
|
|
5
|
-
import './
|
|
5
|
+
import './style';
|
|
6
6
|
export const locationProperties = {
|
|
7
7
|
address: {
|
|
8
8
|
title: '地点',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'tea-component';
|
|
3
3
|
import { getRelationData } from './utils';
|
|
4
|
-
import './
|
|
4
|
+
import './style';
|
|
5
5
|
export const ViewCell = ({ data, showType, relation }) => {
|
|
6
6
|
if (showType === 'tree') {
|
|
7
7
|
return _jsx(Text, { verticalAlign: "middle", children: (data === null || data === void 0 ? void 0 : data.content) || '-' });
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ImportFileModalByApi as ImportFileModalByApiFromTable } from '../../../table/ImportFileModalByApi';
|
|
3
3
|
import { alertErrorMessage } from '../../../../utils/platform';
|
|
4
4
|
import { ConfigProvider } from 'tea-component';
|
|
5
|
+
import './style';
|
|
5
6
|
/**
|
|
6
7
|
* 后端导入弹窗
|
|
7
8
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../components/table/ImportFileModalByApi/style';
|
|
@@ -22,6 +22,7 @@ import { Mock } from './mock';
|
|
|
22
22
|
import { getTableColumns, slotRender, mapColumKey, } from './components/FieldRender';
|
|
23
23
|
import Modal from '../modal';
|
|
24
24
|
import { WdButton } from '../wd-button';
|
|
25
|
+
import '../style';
|
|
25
26
|
const _defaultPageIndex = 1;
|
|
26
27
|
const _defaultPageSize = 10;
|
|
27
28
|
const TableOption = memo(function TableOption({ slots, ...props }) {
|
|
@@ -6,6 +6,7 @@ import { textToString, usePlatform } from '../../utils/platform';
|
|
|
6
6
|
import { convertLegacyProps } from './convert-legacy-props';
|
|
7
7
|
import { convertLegacyEnum } from '../../utils/tool';
|
|
8
8
|
import { WD_TEXT_LEVEL, WD_TEXT_MAX_LINES } from '../../../enum';
|
|
9
|
+
import '../style';
|
|
9
10
|
export const WdText = forwardRef(function WdText({ className, style, id, level: _level = 'body-default', text, overflow, maxLines: _maxLines, space, tips, userSelect, events, contenteditable, onInput, onBlur, ...props }, ref) {
|
|
10
11
|
const platform = usePlatform();
|
|
11
12
|
// 兼容旧版组件的属性值
|
|
@@ -5,7 +5,7 @@ import { useConfig } from '../../utils/config-context';
|
|
|
5
5
|
import { isInIde, usePlatform } from '../../utils/platform';
|
|
6
6
|
import { Bubble } from 'tea-component';
|
|
7
7
|
import EmptyContent from '../statusContent';
|
|
8
|
-
import './
|
|
8
|
+
import './style';
|
|
9
9
|
export const WebView = forwardRef(function WebView({ link, events, className, style }, ref) {
|
|
10
10
|
const platform = usePlatform();
|
|
11
11
|
const iframeRef = useRef(null);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import videojs from 'video.js';
|
|
4
|
-
import 'video.js/dist/video-js.css';
|
|
5
|
-
import './index.css';
|
|
6
4
|
import { usePlatform, isCloudFileID, isInIde } from '../../utils/platform';
|
|
7
5
|
import classNames from '../../utils/classnames';
|
|
8
6
|
import { ConfigProvider, Icon } from 'tea-component';
|
|
9
7
|
import { useTempUrl } from '../../utils/hooks/use-cloud-id-temp-url';
|
|
8
|
+
import './style';
|
|
10
9
|
const { useEffect, useRef, useMemo, useState } = React;
|
|
11
10
|
const MimetypesKind = {
|
|
12
11
|
opus: 'video/ogg',
|
|
@@ -152,7 +152,7 @@ export const isWXIDE = () => /wechatideplugin/i.test(navigator.userAgent);
|
|
|
152
152
|
export const resolveStaticResourceUrl = (path) => {
|
|
153
153
|
var _a, _b;
|
|
154
154
|
try {
|
|
155
|
-
// eslint-disable-next-line no-unsafe-optional-chaining
|
|
155
|
+
// eslint-disable-next-line no-unsafe-optional-chaining
|
|
156
156
|
const resourceUrl = (_b = (_a = window === null || window === void 0 ? void 0 : window.app) === null || _a === void 0 ? void 0 : _a.__internal__) === null || _b === void 0 ? void 0 : _b.resolveStaticResourceUrl(path);
|
|
157
157
|
return resourceUrl;
|
|
158
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/weda-ui",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.14",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index",
|
|
6
6
|
"miniprogram": "mpdist",
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"**/*.{css,scss,less}",
|
|
16
|
+
"src/web/utils/date.js",
|
|
17
|
+
"src/web/**/style.js",
|
|
18
|
+
"src/web/**/style.ts",
|
|
19
|
+
"src/web/**/style/*",
|
|
20
|
+
"src/web/components/chart/common/echarts.ts",
|
|
21
|
+
"src/web/components/flow/**/*",
|
|
22
|
+
"src/web/components/flow-*/**/*",
|
|
23
|
+
"src/web/components/form/userOrgSelect/**/*",
|
|
24
|
+
"src/web/components/form/select/moment-locale.{ts,js}",
|
|
25
|
+
"src/web/components/form-input-hooks/validator.ts"
|
|
26
|
+
],
|
|
14
27
|
"publishConfig": {
|
|
15
28
|
"access": "public"
|
|
16
29
|
},
|
|
@@ -74,6 +87,7 @@
|
|
|
74
87
|
"dayjs": "^1.10.7",
|
|
75
88
|
"destr": "^1.1.1",
|
|
76
89
|
"echarts": "^5.3.0",
|
|
90
|
+
"echarts-for-react": "^3.0.2",
|
|
77
91
|
"jsonexport": "3.2.0",
|
|
78
92
|
"kedao": "^0.1.24",
|
|
79
93
|
"lodash.get": "^4.4.2",
|
|
@@ -160,6 +174,7 @@
|
|
|
160
174
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
161
175
|
"eslint-plugin-rulesdir": "^0.2.1",
|
|
162
176
|
"eslint-plugin-storybook": "^0.6.11",
|
|
177
|
+
"eslint-plugin-tree-shaking": "^1.10.0",
|
|
163
178
|
"fs-extra": "^10.1.0",
|
|
164
179
|
"glob": "^8.0.3",
|
|
165
180
|
"gulp": "^4.0.2",
|