chore: migrate components (#893)
Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: daoyoucloud/tachybase#893
This commit is contained in:
parent
8c156c35d2
commit
8a789c70f1
@ -40,6 +40,7 @@ const external = [
|
|||||||
'@nocobase/resourcer',
|
'@nocobase/resourcer',
|
||||||
'@nocobase/sdk',
|
'@nocobase/sdk',
|
||||||
'@tachybase/schema',
|
'@tachybase/schema',
|
||||||
|
'@tachybase/components',
|
||||||
'@nocobase/server',
|
'@nocobase/server',
|
||||||
'@nocobase/test',
|
'@nocobase/test',
|
||||||
'@nocobase/utils',
|
'@nocobase/utils',
|
||||||
@ -100,7 +101,6 @@ const external = [
|
|||||||
'@dnd-kit/utilities',
|
'@dnd-kit/utilities',
|
||||||
|
|
||||||
// formily 相关
|
// formily 相关
|
||||||
'@formily/antd-v5',
|
|
||||||
'@formily/core',
|
'@formily/core',
|
||||||
'@formily/react',
|
'@formily/react',
|
||||||
'@formily/json-schema',
|
'@formily/json-schema',
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
"@dnd-kit/sortable": "^6.0.0",
|
"@dnd-kit/sortable": "^6.0.0",
|
||||||
"@dnd-kit/utilities": "^3.2.2",
|
"@dnd-kit/utilities": "^3.2.2",
|
||||||
"@emotion/css": "^11.7.1",
|
"@emotion/css": "^11.7.1",
|
||||||
"@formily/antd-v5": "^1.1.9",
|
|
||||||
"@nocobase/evaluators": "workspace:*",
|
"@nocobase/evaluators": "workspace:*",
|
||||||
"@nocobase/sdk": "workspace:*",
|
"@nocobase/sdk": "workspace:*",
|
||||||
"@nocobase/utils": "workspace:*",
|
"@nocobase/utils": "workspace:*",
|
||||||
|
"@tachybase/components": "workspace:*",
|
||||||
"@tachybase/schema": "workspace:*",
|
"@tachybase/schema": "workspace:*",
|
||||||
"ahooks": "^3.7.2",
|
"ahooks": "^3.7.2",
|
||||||
"antd": "5.16.1",
|
"antd": "5.16.1",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, FormLayout } from '@formily/antd-v5';
|
import { FormItem, FormLayout } from '@tachybase/components';
|
||||||
import { ArrayField } from '@tachybase/schema';
|
import { ArrayField } from '@tachybase/schema';
|
||||||
import { connect, useField, useForm } from '@tachybase/schema';
|
import { connect, useField, useForm } from '@tachybase/schema';
|
||||||
import { Checkbox, Table, Tag } from 'antd';
|
import { Checkbox, Table, Tag } from 'antd';
|
||||||
|
@ -6,7 +6,6 @@ import * as dndKitModifiers from '@dnd-kit/modifiers';
|
|||||||
import * as dndKitSortable from '@dnd-kit/sortable';
|
import * as dndKitSortable from '@dnd-kit/sortable';
|
||||||
import * as dndKitUtilities from '@dnd-kit/utilities';
|
import * as dndKitUtilities from '@dnd-kit/utilities';
|
||||||
import * as emotionCss from '@emotion/css';
|
import * as emotionCss from '@emotion/css';
|
||||||
import * as formilyAntdV5 from '@formily/antd-v5';
|
|
||||||
import * as formilyCore from '@tachybase/schema';
|
import * as formilyCore from '@tachybase/schema';
|
||||||
import * as formilyJsonSchema from '@tachybase/schema';
|
import * as formilyJsonSchema from '@tachybase/schema';
|
||||||
import * as formilyPath from '@tachybase/schema';
|
import * as formilyPath from '@tachybase/schema';
|
||||||
@ -19,6 +18,7 @@ import * as nocobaseEvaluators from '@nocobase/evaluators/client';
|
|||||||
import * as nocobaseClientUtils from '@nocobase/utils/client';
|
import * as nocobaseClientUtils from '@nocobase/utils/client';
|
||||||
import * as nocobaseSDK from '@nocobase/sdk';
|
import * as nocobaseSDK from '@nocobase/sdk';
|
||||||
import * as nocobaseSchema from '@tachybase/schema';
|
import * as nocobaseSchema from '@tachybase/schema';
|
||||||
|
import * as nocobaseComponents from '@tachybase/components';
|
||||||
import { dayjs } from '@nocobase/utils/client';
|
import { dayjs } from '@nocobase/utils/client';
|
||||||
import * as ahooks from 'ahooks';
|
import * as ahooks from 'ahooks';
|
||||||
import * as antd from 'antd';
|
import * as antd from 'antd';
|
||||||
@ -60,7 +60,6 @@ export function defineGlobalDeps(requirejs: RequireJS) {
|
|||||||
requirejs.define('react-i18next', () => reactI18next);
|
requirejs.define('react-i18next', () => reactI18next);
|
||||||
|
|
||||||
// formily
|
// formily
|
||||||
requirejs.define('@formily/antd-v5', () => formilyAntdV5);
|
|
||||||
requirejs.define('@formily/core', () => formilyCore);
|
requirejs.define('@formily/core', () => formilyCore);
|
||||||
requirejs.define('@formily/react', () => formilyReact);
|
requirejs.define('@formily/react', () => formilyReact);
|
||||||
requirejs.define('@formily/shared', () => formilyShared);
|
requirejs.define('@formily/shared', () => formilyShared);
|
||||||
@ -79,6 +78,7 @@ export function defineGlobalDeps(requirejs: RequireJS) {
|
|||||||
requirejs.define('@nocobase/evaluators/client', () => nocobaseEvaluators);
|
requirejs.define('@nocobase/evaluators/client', () => nocobaseEvaluators);
|
||||||
requirejs.define('@nocobase/sdk', () => nocobaseSDK);
|
requirejs.define('@nocobase/sdk', () => nocobaseSDK);
|
||||||
requirejs.define('@tachybase/schema', () => nocobaseSchema);
|
requirejs.define('@tachybase/schema', () => nocobaseSchema);
|
||||||
|
requirejs.define('@tachybase/components', () => nocobaseComponents);
|
||||||
|
|
||||||
// dnd-kit 相关
|
// dnd-kit 相关
|
||||||
requirejs.define('@dnd-kit/accessibility', () => dndKitAccessibility);
|
requirejs.define('@dnd-kit/accessibility', () => dndKitAccessibility);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { DownOutlined, PlusOutlined } from '@ant-design/icons';
|
import { DownOutlined, PlusOutlined } from '@ant-design/icons';
|
||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema, useField, useForm } from '@tachybase/schema';
|
import { ISchema, useField, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import { Button, Dropdown, MenuProps } from 'antd';
|
import { Button, Dropdown, MenuProps } from 'antd';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { useField, useForm } from '@tachybase/schema';
|
import { useField, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import { Button, Dropdown, MenuProps } from 'antd';
|
import { Button, Dropdown, MenuProps } from 'antd';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema } from '@tachybase/schema';
|
import { ISchema } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import { Button, Dropdown, MenuProps } from 'antd';
|
import { Button, Dropdown, MenuProps } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema, useForm } from '@tachybase/schema';
|
import { ISchema, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema, useForm } from '@tachybase/schema';
|
import { ISchema, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema, useForm } from '@tachybase/schema';
|
import { ISchema, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema, useForm } from '@tachybase/schema';
|
import { ISchema, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import { omit, set } from 'lodash';
|
import { omit, set } from 'lodash';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { useField, useForm } from '@tachybase/schema';
|
import { useField, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { SyncOutlined } from '@ant-design/icons';
|
import { SyncOutlined } from '@ant-design/icons';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { createForm } from '@tachybase/schema';
|
import { createForm } from '@tachybase/schema';
|
||||||
import { useField, useForm } from '@tachybase/schema';
|
import { useField, useForm } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { ISchema } from '@tachybase/schema';
|
import { ISchema } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import {
|
import {
|
||||||
Action,
|
Action,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormDrawer, FormLayout } from '@formily/antd-v5';
|
import { FormDrawer, FormLayout } from '@tachybase/components';
|
||||||
import { createForm } from '@tachybase/schema';
|
import { createForm } from '@tachybase/schema';
|
||||||
import { ISchema } from '@tachybase/schema';
|
import { ISchema } from '@tachybase/schema';
|
||||||
import { FormContext, SchemaOptionsContext } from '@tachybase/schema';
|
import { FormContext, SchemaOptionsContext } from '@tachybase/schema';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, FormLayout } from '@formily/antd-v5';
|
import { FormItem, FormLayout } from '@tachybase/components';
|
||||||
import { registerValidateRules } from '@tachybase/schema';
|
import { registerValidateRules } from '@tachybase/schema';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { defaultProps, operators } from './properties';
|
import { defaultProps, operators } from './properties';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayCollapse, FormLayout } from '@formily/antd-v5';
|
import { ArrayCollapse, FormLayout } from '@tachybase/components';
|
||||||
import { Field } from '@tachybase/schema';
|
import { Field } from '@tachybase/schema';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema } from '@tachybase/schema';
|
import { ISchema } from '@tachybase/schema';
|
||||||
import { useField, useFieldSchema } from '@tachybase/schema';
|
import { useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
@ -18,7 +18,7 @@ import {
|
|||||||
} from '../../../../schema-settings';
|
} from '../../../../schema-settings';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { FixedBlockDesignerItem } from '../../../../schema-component/antd/page/FixedBlockDesignerItem';
|
import { FixedBlockDesignerItem } from '../../../../schema-component/antd/page/FixedBlockDesignerItem';
|
||||||
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
||||||
import { setDataLoadingModeSettingsItem, useDataLoadingMode } from '../details-multi/setDataLoadingModeSettingsItem';
|
import { setDataLoadingModeSettingsItem, useDataLoadingMode } from '../details-multi/setDataLoadingModeSettingsItem';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayCollapse, FormLayout } from '@formily/antd-v5';
|
import { ArrayCollapse, FormLayout } from '@tachybase/components';
|
||||||
import { Field } from '@tachybase/schema';
|
import { Field } from '@tachybase/schema';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -26,7 +26,7 @@ import { SchemaSettingsModalItem, VariableInput, getShouldChange } from '../../.
|
|||||||
import { SchemaSettingsDataScope } from '../../../../schema-settings/SchemaSettingsDataScope';
|
import { SchemaSettingsDataScope } from '../../../../schema-settings/SchemaSettingsDataScope';
|
||||||
import { useLocalVariables, useVariables } from '../../../../variables';
|
import { useLocalVariables, useVariables } from '../../../../variables';
|
||||||
// import { useCollectionField } from '../utils';
|
// import { useCollectionField } from '../utils';
|
||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { useCollectionField } from '../../../../data-source';
|
import { useCollectionField } from '../../../../data-source';
|
||||||
|
|
||||||
export const SchemaSettingsSortingRule = function SortRuleConfigure(props) {
|
export const SchemaSettingsSortingRule = function SortRuleConfigure(props) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { SchemaOptionsContext } from '@tachybase/schema';
|
import { SchemaOptionsContext } from '@tachybase/schema';
|
||||||
import React, { useCallback, useContext } from 'react';
|
import React, { useCallback, useContext } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { SchemaOptionsContext } from '@tachybase/schema';
|
import { SchemaOptionsContext } from '@tachybase/schema';
|
||||||
import React, { useCallback, useContext } from 'react';
|
import React, { useCallback, useContext } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { SchemaOptionsContext } from '@tachybase/schema';
|
import { SchemaOptionsContext } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
import React, { useCallback, useContext } from 'react';
|
import React, { useCallback, useContext } from 'react';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayTable } from '@formily/antd-v5';
|
import { ArrayTable } from '@tachybase/components';
|
||||||
import { Field, onFieldValueChange } from '@tachybase/schema';
|
import { Field, onFieldValueChange } from '@tachybase/schema';
|
||||||
import { ISchema, useField, useFieldSchema, useForm, useFormEffects } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema, useForm, useFormEffects } from '@tachybase/schema';
|
||||||
import { isValid, uid } from '@tachybase/schema';
|
import { isValid, uid } from '@tachybase/schema';
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
NumberPicker,
|
NumberPicker,
|
||||||
Submit,
|
Submit,
|
||||||
} from '@formily/antd-v5';
|
} from '@tachybase/components';
|
||||||
import { Field, createForm, onFieldValueChange } from '@tachybase/schema';
|
import { Field, createForm, onFieldValueChange } from '@tachybase/schema';
|
||||||
import { connect, createSchemaField, observer, useField, useForm, useFormEffects } from '@tachybase/schema';
|
import { connect, createSchemaField, observer, useField, useForm, useFormEffects } from '@tachybase/schema';
|
||||||
import { Select } from 'antd';
|
import { Select } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems, FormItem } from '@formily/antd-v5';
|
import { ArrayItems, FormItem } from '@tachybase/components';
|
||||||
import { createForm, onFormValuesChange } from '@tachybase/schema';
|
import { createForm, onFormValuesChange } from '@tachybase/schema';
|
||||||
import { FormProvider, connect, createSchemaField, observer, useField, useFieldSchema } from '@tachybase/schema';
|
import { FormProvider, connect, createSchemaField, observer, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems, FormItem } from '@formily/antd-v5';
|
import { ArrayItems, FormItem } from '@tachybase/components';
|
||||||
import {
|
import {
|
||||||
FormProvider,
|
FormProvider,
|
||||||
connect,
|
connect,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { RecursionField, useField, useFieldSchema, observer } from '@tachybase/schema';
|
import { RecursionField, useField, useFieldSchema, observer } from '@tachybase/schema';
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { CollectionProvider_deprecated } from '../../../collection-manager';
|
import { CollectionProvider_deprecated } from '../../../collection-manager';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { RecursionField, SchemaOptionsContext, observer, useField, useFieldSchema } from '@tachybase/schema';
|
import { RecursionField, SchemaOptionsContext, observer, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { ACLCollectionProvider, useACLActionParamsContext } from '../../../acl';
|
import { ACLCollectionProvider, useACLActionParamsContext } from '../../../acl';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { LoadingOutlined } from '@ant-design/icons';
|
import { LoadingOutlined } from '@ant-design/icons';
|
||||||
import { ArrayCollapse, ArrayItems, FormLayout } from '@formily/antd-v5';
|
import { ArrayCollapse, ArrayItems, FormLayout } from '@tachybase/components';
|
||||||
import { Field } from '@tachybase/schema';
|
import { Field } from '@tachybase/schema';
|
||||||
import { ISchema, connect, mapProps, mapReadPretty, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, connect, mapProps, mapReadPretty, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Cascader, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Cascader, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { ArrayField } from '@tachybase/schema';
|
import { ArrayField } from '@tachybase/schema';
|
||||||
import { useField } from '@tachybase/schema';
|
import { useField } from '@tachybase/schema';
|
||||||
import { action } from '@tachybase/schema';
|
import { action } from '@tachybase/schema';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: 组
|
* title: 组
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: 勾选
|
* title: 勾选
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Checkbox, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { ExtendCollectionsProvider, CollectionSelect, FormProvider, SchemaComponent } from '@nocobase/client';
|
import { ExtendCollectionsProvider, CollectionSelect, FormProvider, SchemaComponent } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { usePrefixCls } from '@formily/antd-v5/esm/__builtins__';
|
import { usePrefixCls } from '@tachybase/components';
|
||||||
import { connect, mapProps, mapReadPretty } from '@tachybase/schema';
|
import { connect, mapProps, mapReadPretty } from '@tachybase/schema';
|
||||||
import { ColorPicker as AntdColorPicker } from 'antd';
|
import { ColorPicker as AntdColorPicker } from 'antd';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { usePrefixCls } from '@formily/antd-v5/esm/__builtins__';
|
import { usePrefixCls } from '@tachybase/components/esm/__builtins__';
|
||||||
import type { ColorPickerProps as AntdColorPickerProps } from 'antd/es/color-picker';
|
import type { ColorPickerProps as AntdColorPickerProps } from 'antd/es/color-picker';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: ColorPicker
|
* title: ColorPicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { ColorPicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { ColorPicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: 勾选
|
* title: 勾选
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { ColorSelect, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { ColorSelect, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Cron, FormProvider, SchemaComponent } from '@nocobase/client';
|
import { Cron, FormProvider, SchemaComponent } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { CronSet, FormProvider, SchemaComponent } from '@nocobase/client';
|
import { CronSet, FormProvider, SchemaComponent } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { usePrefixCls } from '@formily/antd-v5/esm/__builtins__';
|
|
||||||
import { isArr } from '@tachybase/schema';
|
import { isArr } from '@tachybase/schema';
|
||||||
import { getDefaultFormat, str2moment } from '@nocobase/utils/client';
|
import { getDefaultFormat, str2moment } from '@nocobase/utils/client';
|
||||||
import type {
|
import type {
|
||||||
@ -8,6 +7,7 @@ import type {
|
|||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { usePrefixCls } from '../__builtins__';
|
||||||
|
|
||||||
type Composed = {
|
type Composed = {
|
||||||
DatePicker: React.FC<AntdDatePickerProps>;
|
DatePicker: React.FC<AntdDatePickerProps>;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker
|
* title: DatePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker
|
* title: DatePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker.RangePicker
|
* title: DatePicker.RangePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker (GMT)
|
* title: DatePicker (GMT)
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker
|
* title: DatePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker.RangePicker
|
* title: DatePicker.RangePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker.RangePicker
|
* title: DatePicker.RangePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker.RangePicker
|
* title: DatePicker.RangePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker
|
* title: DatePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker
|
* title: DatePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: DatePicker
|
* title: DatePicker
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { DatePicker, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Details, FormProvider, Input, SchemaComponent } from '@nocobase/client';
|
import { Details, FormProvider, Input, SchemaComponent } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayCollapse, FormLayout } from '@formily/antd-v5';
|
import { ArrayCollapse, FormLayout } from '@tachybase/components';
|
||||||
import { Field } from '@tachybase/schema';
|
import { Field } from '@tachybase/schema';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { FormItem as Item } from '@formily/antd-v5';
|
import { FormItem as Item } from '@tachybase/components';
|
||||||
import { Field } from '@tachybase/schema';
|
import { Field } from '@tachybase/schema';
|
||||||
import { observer, useField, useFieldSchema } from '@tachybase/schema';
|
import { observer, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import React, { useEffect, useMemo } from 'react';
|
import React, { useEffect, useMemo } from 'react';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayCollapse, FormLayout } from '@formily/antd-v5';
|
import { ArrayCollapse, FormLayout } from '@tachybase/components';
|
||||||
import { Field } from '@tachybase/schema';
|
import { Field } from '@tachybase/schema';
|
||||||
import { ISchema, Schema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, Schema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { uid } from '@tachybase/schema';
|
import { uid } from '@tachybase/schema';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { SchemaSettings } from '../../../application/schema-settings';
|
import { SchemaSettings } from '../../../application/schema-settings';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { createForm, Field, Form as FormilyForm, onFieldInit, onFormInputChange } from '@tachybase/schema';
|
import { createForm, Field, Form as FormilyForm, onFieldInit, onFormInputChange } from '@tachybase/schema';
|
||||||
import { FieldContext, FormContext, observer, RecursionField, useField, useFieldSchema } from '@tachybase/schema';
|
import { FieldContext, FormContext, observer, RecursionField, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { reaction } from '@tachybase/schema';
|
import { reaction } from '@tachybase/schema';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { createForm } from '@tachybase/schema';
|
import { createForm } from '@tachybase/schema';
|
||||||
import { FieldContext, FormContext, observer, RecursionField, useField, useFieldSchema } from '@tachybase/schema';
|
import { FieldContext, FormContext, observer, RecursionField, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { Options, Result } from 'ahooks/es/useRequest/src/types';
|
import { Options, Result } from 'ahooks/es/useRequest/src/types';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@nocobase/client';
|
import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import { Card } from 'antd';
|
import { Card } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import { Card } from 'antd';
|
import { Card } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@nocobase/client';
|
import { Action, Form, SchemaComponent, SchemaComponentProvider, useCloseAction } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import {
|
import {
|
||||||
APIClientProvider,
|
APIClientProvider,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Action, Form, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import { Card } from 'antd';
|
import { Card } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem, Input } from '@formily/antd-v5';
|
import { FormItem, Input } from '@tachybase/components';
|
||||||
import { ISchema, observer, useForm } from '@tachybase/schema';
|
import { ISchema, observer, useForm } from '@tachybase/schema';
|
||||||
import { Action, Form, FormUseValues, SchemaComponent, SchemaComponentProvider, useRequest } from '@nocobase/client';
|
import { Action, Form, FormUseValues, SchemaComponent, SchemaComponentProvider, useRequest } from '@nocobase/client';
|
||||||
import { Card } from 'antd';
|
import { Card } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { ISchema, observer } from '@tachybase/schema';
|
import { ISchema, observer } from '@tachybase/schema';
|
||||||
import {
|
import {
|
||||||
Action,
|
Action,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { createForm } from '@tachybase/schema';
|
import { createForm } from '@tachybase/schema';
|
||||||
import { FormContext, useField, useFieldSchema } from '@tachybase/schema';
|
import { FormContext, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import React, { createContext, useContext, useEffect, useMemo } from 'react';
|
import React, { createContext, useContext, useEffect, useMemo } from 'react';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import { Slider } from 'antd';
|
import { Slider } from 'antd';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { CloseOutlined, LoadingOutlined } from '@ant-design/icons';
|
import { CloseOutlined, LoadingOutlined } from '@ant-design/icons';
|
||||||
import { useFormLayout } from '@formily/antd-v5';
|
import { useFormLayout } from '@tachybase/components';
|
||||||
import { connect, mapProps, mapReadPretty } from '@tachybase/schema';
|
import { connect, mapProps, mapReadPretty } from '@tachybase/schema';
|
||||||
import { isValid } from '@tachybase/schema';
|
import { isValid } from '@tachybase/schema';
|
||||||
import { Button, Space } from 'antd';
|
import { Button, Space } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { IconPicker, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { IconPicker, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { InputNumber, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { usePrefixCls } from '@formily/antd-v5/esm/__builtins__';
|
|
||||||
import { Typography } from 'antd';
|
import { Typography } from 'antd';
|
||||||
import { InputProps, TextAreaProps } from 'antd/es/input';
|
import { InputProps, TextAreaProps } from 'antd/es/input';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
@ -7,20 +6,11 @@ import React from 'react';
|
|||||||
import { useCompile } from '../..';
|
import { useCompile } from '../..';
|
||||||
import { EllipsisWithTooltip } from './EllipsisWithTooltip';
|
import { EllipsisWithTooltip } from './EllipsisWithTooltip';
|
||||||
import { HTMLEncode } from './shared';
|
import { HTMLEncode } from './shared';
|
||||||
|
import { usePrefixCls } from '@tachybase/components';
|
||||||
|
|
||||||
type Composed = {
|
export const ReadPretty = () => null;
|
||||||
Input: React.FC<InputProps & { ellipsis?: any }>;
|
|
||||||
URL: React.FC<InputProps>;
|
|
||||||
TextArea: React.FC<
|
|
||||||
TextAreaProps & { ellipsis?: any; text?: any; addonBefore?: any; suffix?: any; addonAfter?: any; autop?: boolean }
|
|
||||||
>;
|
|
||||||
Html: any;
|
|
||||||
JSON: React.FC<TextAreaProps & { space: number }>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const ReadPretty: Composed = () => null;
|
const _Input = (props: InputProps & { ellipsis?: any }) => {
|
||||||
|
|
||||||
ReadPretty.Input = (props) => {
|
|
||||||
const prefixCls = usePrefixCls('description-input', props);
|
const prefixCls = usePrefixCls('description-input', props);
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
return (
|
return (
|
||||||
@ -34,7 +24,16 @@ ReadPretty.Input = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ReadPretty.TextArea = (props) => {
|
const _TextArea = (
|
||||||
|
props: TextAreaProps & {
|
||||||
|
ellipsis?: any;
|
||||||
|
text?: any;
|
||||||
|
addonBefore?: any;
|
||||||
|
suffix?: any;
|
||||||
|
addonAfter?: any;
|
||||||
|
autop?: boolean;
|
||||||
|
},
|
||||||
|
) => {
|
||||||
const prefixCls = usePrefixCls('description-textarea', props);
|
const prefixCls = usePrefixCls('description-textarea', props);
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
const value = compile(props.value ?? '');
|
const value = compile(props.value ?? '');
|
||||||
@ -75,7 +74,7 @@ function convertToText(html: string) {
|
|||||||
return text?.replace(/[\n\r]/g, '') || '';
|
return text?.replace(/[\n\r]/g, '') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadPretty.Html = (props) => {
|
const _Html = (props: InputProps & { autop: boolean; ellipsis: boolean }) => {
|
||||||
const prefixCls = usePrefixCls('description-textarea', props);
|
const prefixCls = usePrefixCls('description-textarea', props);
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
const value = compile(props.value ?? '');
|
const value = compile(props.value ?? '');
|
||||||
@ -104,11 +103,11 @@ ReadPretty.Html = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ReadPretty.URL = (props) => {
|
const _URL = (props: InputProps) => {
|
||||||
const prefixCls = usePrefixCls('description-url', props);
|
const prefixCls = usePrefixCls('description-url', props);
|
||||||
const content = props.value && (
|
const content = props.value && (
|
||||||
<Typography.Link ellipsis target={'_blank'} href={props.value as any}>
|
<Typography.Link ellipsis target={'_blank'} href={props.value as any}>
|
||||||
{props.value}
|
{props.value?.toString()}
|
||||||
</Typography.Link>
|
</Typography.Link>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
@ -122,7 +121,7 @@ ReadPretty.URL = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ReadPretty.JSON = (props) => {
|
const _JSON = (props: TextAreaProps & { space: number }) => {
|
||||||
const prefixCls = usePrefixCls('json', props);
|
const prefixCls = usePrefixCls('json', props);
|
||||||
return (
|
return (
|
||||||
<pre
|
<pre
|
||||||
@ -141,3 +140,9 @@ ReadPretty.JSON = (props) => {
|
|||||||
</pre>
|
</pre>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ReadPretty.Input = _Input;
|
||||||
|
ReadPretty.TextArea = _TextArea;
|
||||||
|
ReadPretty.URL = _URL;
|
||||||
|
ReadPretty.Html = _Html;
|
||||||
|
ReadPretty.TextArea = _TextArea;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Application, Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Input, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { createForm } from '@tachybase/schema';
|
import { createForm } from '@tachybase/schema';
|
||||||
import { FormContext, useField } from '@tachybase/schema';
|
import { FormContext, useField } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ArrayItems } from '@formily/antd-v5';
|
import { ArrayItems } from '@tachybase/components';
|
||||||
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: Markdown
|
* title: Markdown
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Markdown, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Markdown, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: Markdown.Void
|
* title: Markdown.Void
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { observer, useField } from '@tachybase/schema';
|
import { observer, useField } from '@tachybase/schema';
|
||||||
import { Markdown, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Markdown, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { TreeSelect } from '@formily/antd-v5';
|
import { TreeSelect } from '@tachybase/components';
|
||||||
import { Field, onFieldChange } from '@tachybase/schema';
|
import { Field, onFieldChange } from '@tachybase/schema';
|
||||||
import { ISchema, Schema, useField, useFieldSchema } from '@tachybase/schema';
|
import { ISchema, Schema, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import { PageHeader as AntdPageHeader } from '@ant-design/pro-layout';
|
import { PageHeader as AntdPageHeader } from '@ant-design/pro-layout';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@tachybase/components';
|
||||||
import { Schema, SchemaOptionsContext, useFieldSchema } from '@tachybase/schema';
|
import { Schema, SchemaOptionsContext, useFieldSchema } from '@tachybase/schema';
|
||||||
import { Button, Tabs } from 'antd';
|
import { Button, Tabs } from 'antd';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: Password
|
* title: Password
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: Check strength
|
* title: Check strength
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Password, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Percent, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Percent, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: Preview
|
* title: Preview
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Preview from '../Preview';
|
import Preview from '../Preview';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Field, createForm } from '@tachybase/schema';
|
import { Field, createForm } from '@tachybase/schema';
|
||||||
import { FormContext, RecursionField, observer, useField, useFieldSchema } from '@tachybase/schema';
|
import { FormContext, RecursionField, observer, useField, useFieldSchema } from '@tachybase/schema';
|
||||||
import React, { useMemo, useRef } from 'react';
|
import React, { useMemo, useRef } from 'react';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* title: Basic
|
* title: Basic
|
||||||
* desc: The simplest use.
|
* desc: The simplest use.
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* title: Radio Group
|
* title: Radio Group
|
||||||
* desc: A group of radio components.
|
* desc: A group of radio components.
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* title: Radio Group with color
|
* title: Radio Group with color
|
||||||
*/
|
*/
|
||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { Radio, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FormItem } from '@formily/antd-v5';
|
import { FormItem } from '@tachybase/components';
|
||||||
import { RichText, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
import { RichText, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import 'react-quill/dist/quill.snow.css'; // ES6
|
import 'react-quill/dist/quill.snow.css'; // ES6
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user