@nocobase/client 0.10.0-alpha.2 → 0.10.0-alpha.4
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/es/acl/Configuration/MenuItemsProvider.js +3 -3
- package/es/application/Application.js +2 -2
- package/es/auth/SigninPage.js +12 -9
- package/es/block-provider/GanttBlockProvider.js +5 -4
- package/es/block-provider/TableBlockProvider.d.ts +1 -0
- package/es/block-provider/TableBlockProvider.js +51 -17
- package/es/collection-manager/Configuration/AddCollectionAction.js +31 -25
- package/es/collection-manager/Configuration/AddFieldAction.js +45 -32
- package/es/collection-manager/Configuration/AddSubFieldAction.js +24 -19
- package/es/collection-manager/Configuration/ConfigurationTabs.js +57 -50
- package/es/collection-manager/hooks/useOptions.js +39 -36
- package/es/collection-manager/interfaces/integer.js +1 -1
- package/es/collection-manager/interfaces/number.js +3 -3
- package/es/collection-manager/interfaces/percent.js +3 -3
- package/es/formula/Expression.js +66 -46
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +1 -0
- package/es/hooks/useAdminSchemaUid.d.ts +1 -0
- package/es/hooks/useAdminSchemaUid.js +6 -0
- package/es/hooks/useMenuItem.d.ts +37 -0
- package/es/hooks/useMenuItem.js +93 -0
- package/es/index.d.ts +2 -3
- package/es/index.js +3 -4
- package/es/locale/en_US.d.ts +3 -1
- package/es/locale/en_US.js +4 -2
- package/es/locale/es_ES.d.ts +1 -1
- package/es/locale/es_ES.js +1 -1
- package/es/locale/ja_JP.d.ts +3 -1
- package/es/locale/ja_JP.js +4 -2
- package/es/locale/pt_BR.d.ts +1 -1
- package/es/locale/pt_BR.js +1 -1
- package/es/locale/ru_RU.d.ts +1 -1
- package/es/locale/ru_RU.js +1 -1
- package/es/locale/zh_CN.d.ts +3 -1
- package/es/locale/zh_CN.js +3 -1
- package/es/pm/Card.js +5 -5
- package/es/pm/PluginManagerLink.js +16 -12
- package/es/pm/index.d.ts +2 -1
- package/es/pm/index.js +36 -22
- package/es/route-switch/antd/admin-layout/index.js +5 -5
- package/es/schema-component/antd/action/Action.Designer.js +3 -5
- package/es/schema-component/antd/action/Action.Drawer.js +1 -1
- package/es/schema-component/antd/action/ActionBar.js +1 -1
- package/es/schema-component/antd/association-field/Editable.js +1 -2
- package/es/schema-component/antd/association-field/Nester.js +7 -1
- package/es/schema-component/antd/association-field/SubTable.js +1 -1
- package/es/schema-component/antd/calendar/DeleteEvent.js +1 -1
- package/es/schema-component/antd/cascader/Cascader.js +1 -1
- package/es/schema-component/antd/form-item/FormItem.js +10 -3
- package/es/schema-component/antd/form-v2/Form.js +2 -2
- package/es/schema-component/antd/gantt/components/gantt/gantt.js +0 -1
- package/es/schema-component/antd/gantt/components/grid/grid-body.js +3 -3
- package/es/schema-component/antd/gantt/components/task-item/bar/bar-small.js +1 -1
- package/es/schema-component/antd/gantt/components/task-item/task-item.js +1 -1
- package/es/schema-component/antd/gantt/helpers/bar-helper.d.ts +1 -1
- package/es/schema-component/antd/gantt/helpers/bar-helper.js +4 -4
- package/es/schema-component/antd/gantt/helpers/other-helper.js +3 -1
- package/es/schema-component/antd/grid/Grid.js +2 -2
- package/es/schema-component/antd/grid-card/GridCard.Designer.js +3 -4
- package/es/schema-component/antd/grid-card/GridCard.Item.js +3 -3
- package/es/schema-component/antd/index.less +1 -3
- package/es/schema-component/antd/list/List.Decorator.js +3 -3
- package/es/schema-component/antd/list/List.Item.js +2 -2
- package/es/schema-component/antd/list/List.d.ts +2 -2
- package/es/schema-component/antd/list/List.js +6 -6
- package/es/schema-component/antd/menu/Menu.js +306 -156
- package/es/schema-component/antd/page/Page.js +29 -23
- package/es/schema-component/antd/remote-select/RemoteSelect.js +60 -10
- package/es/schema-component/antd/remote-select/utils.d.ts +4 -0
- package/es/schema-component/antd/remote-select/utils.js +31 -0
- package/es/schema-component/antd/table-v2/FilterDynamicComponent.js +17 -2
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +51 -12
- package/es/schema-component/antd/table-v2/Table.js +28 -47
- package/es/schema-component/antd/table-v2/utils.d.ts +0 -1
- package/es/schema-component/antd/table-v2/utils.js +0 -28
- package/es/schema-component/antd/tabs/Tabs.js +35 -22
- package/es/schema-component/antd/tabs/context.d.ts +1 -1
- package/es/schema-component/antd/upload/ReadPretty.js +7 -3
- package/es/schema-component/antd/variable/VariableSelect.js +1 -1
- package/es/schema-component/common/utils/uitls.d.ts +1 -0
- package/es/schema-component/common/utils/uitls.js +1 -1
- package/es/schema-initializer/SchemaInitializer.d.ts +7 -2
- package/es/schema-initializer/SchemaInitializer.js +158 -103
- package/es/schema-initializer/SelectCollection.d.ts +1 -2
- package/es/schema-initializer/SelectCollection.js +19 -16
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
- package/es/schema-initializer/buttons/TableActionInitializers.js +5 -5
- package/es/schema-initializer/buttons/TableColumnInitializers.js +3 -2
- package/es/schema-initializer/components/CreateRecordAction.js +37 -27
- package/es/schema-initializer/components/assigned-field/AssignedField.js +2 -1
- package/es/schema-initializer/items/CalendarBlockInitializer.js +2 -2
- package/es/schema-initializer/utils.d.ts +0 -1
- package/es/schema-initializer/utils.js +40 -25
- package/es/schema-settings/SchemaSettings.js +110 -29
- package/es/schema-settings/VariableInput/hooks/useFormVariable.d.ts +19 -0
- package/es/schema-settings/VariableInput/hooks/useFormVariable.js +89 -0
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +8 -0
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.js +77 -0
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +5 -12
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.js +19 -3
- package/es/schema-templates/BlockTemplateDetails.js +5 -1
- package/es/schema-templates/BlockTemplatePage.js +4 -1
- package/es/user/ChangePassword.d.ts +1 -2
- package/es/user/ChangePassword.js +30 -26
- package/es/user/CurrentUser.js +172 -141
- package/es/user/EditProfile.d.ts +1 -2
- package/es/user/EditProfile.js +30 -24
- package/es/user/LanguageSettings.d.ts +1 -2
- package/es/user/LanguageSettings.js +67 -64
- package/es/user/SigninPage.js +25 -22
- package/es/user/SwitchRole.d.ts +1 -2
- package/es/user/SwitchRole.js +54 -49
- package/es/user/ThemeSettings.d.ts +1 -2
- package/es/user/ThemeSettings.js +56 -52
- package/lib/acl/Configuration/MenuItemsProvider.js +3 -3
- package/lib/application/Application.js +2 -2
- package/lib/auth/SigninPage.js +25 -22
- package/lib/block-provider/GanttBlockProvider.js +5 -4
- package/lib/block-provider/TableBlockProvider.d.ts +1 -0
- package/lib/block-provider/TableBlockProvider.js +53 -17
- package/lib/collection-manager/Configuration/AddCollectionAction.js +29 -23
- package/lib/collection-manager/Configuration/AddFieldAction.js +43 -30
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +22 -17
- package/lib/collection-manager/Configuration/ConfigurationTabs.js +57 -49
- package/lib/collection-manager/hooks/useOptions.js +39 -36
- package/lib/collection-manager/interfaces/integer.js +1 -1
- package/lib/collection-manager/interfaces/number.js +3 -3
- package/lib/collection-manager/interfaces/percent.js +3 -3
- package/lib/formula/Expression.js +64 -44
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +11 -0
- package/lib/hooks/useAdminSchemaUid.d.ts +1 -0
- package/lib/hooks/useAdminSchemaUid.js +13 -0
- package/lib/hooks/useMenuItem.d.ts +37 -0
- package/lib/hooks/useMenuItem.js +108 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.js +22 -33
- package/lib/locale/en_US.d.ts +3 -1
- package/lib/locale/en_US.js +4 -2
- package/lib/locale/es_ES.d.ts +1 -1
- package/lib/locale/es_ES.js +1 -1
- package/lib/locale/ja_JP.d.ts +3 -1
- package/lib/locale/ja_JP.js +4 -2
- package/lib/locale/pt_BR.d.ts +1 -1
- package/lib/locale/pt_BR.js +1 -1
- package/lib/locale/ru_RU.d.ts +1 -1
- package/lib/locale/ru_RU.js +1 -1
- package/lib/locale/zh_CN.d.ts +3 -1
- package/lib/locale/zh_CN.js +3 -1
- package/lib/pm/Card.js +6 -6
- package/lib/pm/PluginManagerLink.js +15 -10
- package/lib/pm/index.d.ts +2 -1
- package/lib/pm/index.js +37 -23
- package/lib/route-switch/antd/admin-layout/index.js +4 -4
- package/lib/schema-component/antd/action/Action.Designer.js +2 -4
- package/lib/schema-component/antd/action/Action.Drawer.js +1 -1
- package/lib/schema-component/antd/association-field/Editable.js +0 -1
- package/lib/schema-component/antd/association-field/Nester.js +6 -0
- package/lib/schema-component/antd/association-field/SubTable.js +1 -1
- package/lib/schema-component/antd/calendar/DeleteEvent.js +1 -1
- package/lib/schema-component/antd/cascader/Cascader.js +1 -1
- package/lib/schema-component/antd/form-item/FormItem.js +10 -3
- package/lib/schema-component/antd/form-v2/Form.js +2 -2
- package/lib/schema-component/antd/gantt/components/gantt/gantt.js +0 -1
- package/lib/schema-component/antd/gantt/components/grid/grid-body.js +2 -2
- package/lib/schema-component/antd/gantt/components/task-item/bar/bar-small.js +1 -1
- package/lib/schema-component/antd/gantt/components/task-item/task-item.js +1 -1
- package/lib/schema-component/antd/gantt/helpers/bar-helper.d.ts +1 -1
- package/lib/schema-component/antd/gantt/helpers/bar-helper.js +4 -4
- package/lib/schema-component/antd/gantt/helpers/other-helper.js +3 -1
- package/lib/schema-component/antd/grid/Grid.js +1 -1
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +4 -5
- package/lib/schema-component/antd/grid-card/GridCard.Item.js +8 -8
- package/lib/schema-component/antd/index.less +1 -3
- package/lib/schema-component/antd/list/List.Decorator.js +3 -3
- package/lib/schema-component/antd/list/List.Item.js +6 -6
- package/lib/schema-component/antd/list/List.d.ts +2 -2
- package/lib/schema-component/antd/list/List.js +24 -24
- package/lib/schema-component/antd/menu/Menu.js +304 -154
- package/lib/schema-component/antd/page/Page.js +29 -23
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +57 -7
- package/lib/schema-component/antd/remote-select/utils.d.ts +4 -0
- package/lib/schema-component/antd/remote-select/utils.js +41 -0
- package/lib/schema-component/antd/table-v2/FilterDynamicComponent.js +17 -2
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +50 -11
- package/lib/schema-component/antd/table-v2/Table.js +26 -45
- package/lib/schema-component/antd/table-v2/utils.d.ts +0 -1
- package/lib/schema-component/antd/table-v2/utils.js +0 -29
- package/lib/schema-component/antd/tabs/Tabs.js +34 -21
- package/lib/schema-component/antd/tabs/context.d.ts +1 -1
- package/lib/schema-component/antd/upload/ReadPretty.js +7 -3
- package/lib/schema-component/antd/variable/VariableSelect.js +1 -1
- package/lib/schema-component/common/utils/uitls.d.ts +1 -0
- package/lib/schema-component/common/utils/uitls.js +3 -1
- package/lib/schema-initializer/SchemaInitializer.d.ts +7 -2
- package/lib/schema-initializer/SchemaInitializer.js +155 -101
- package/lib/schema-initializer/SelectCollection.d.ts +1 -2
- package/lib/schema-initializer/SelectCollection.js +22 -17
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -1
- package/lib/schema-initializer/buttons/TableActionInitializers.js +5 -5
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +2 -1
- package/lib/schema-initializer/components/CreateRecordAction.js +35 -25
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +2 -1
- package/lib/schema-initializer/items/CalendarBlockInitializer.js +9 -9
- package/lib/schema-initializer/utils.d.ts +0 -1
- package/lib/schema-initializer/utils.js +41 -25
- package/lib/schema-settings/SchemaSettings.js +106 -27
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.d.ts +19 -0
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.js +96 -0
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.d.ts +8 -0
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.js +84 -0
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +5 -12
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +19 -3
- package/lib/schema-templates/BlockTemplateDetails.js +5 -1
- package/lib/schema-templates/BlockTemplatePage.js +5 -2
- package/lib/user/ChangePassword.d.ts +1 -2
- package/lib/user/ChangePassword.js +30 -26
- package/lib/user/CurrentUser.js +166 -135
- package/lib/user/EditProfile.d.ts +1 -2
- package/lib/user/EditProfile.js +31 -25
- package/lib/user/LanguageSettings.d.ts +1 -2
- package/lib/user/LanguageSettings.js +66 -63
- package/lib/user/SigninPage.js +25 -22
- package/lib/user/SwitchRole.d.ts +1 -2
- package/lib/user/SwitchRole.js +57 -51
- package/lib/user/ThemeSettings.d.ts +1 -2
- package/lib/user/ThemeSettings.js +59 -54
- package/package.json +9 -8
- package/es/settings-form/SettingsForm.d.ts +0 -13
- package/es/settings-form/SettingsForm.js +0 -309
- package/es/settings-form/index.d.ts +0 -1
- package/es/settings-form/index.js +0 -1
- package/lib/settings-form/SettingsForm.d.ts +0 -13
- package/lib/settings-form/SettingsForm.js +0 -320
- package/lib/settings-form/index.d.ts +0 -1
- package/lib/settings-form/index.js +0 -16
|
@@ -101,5 +101,5 @@ export var TaskItem = function TaskItem(props) {
|
|
|
101
101
|
y: isProjectBar ? task.y - 8 : isTextInside ? task.y + taskHeight * 0.5 : task.y + taskHeight * 0.65,
|
|
102
102
|
className: isProjectBar ? cx(projectLabel) : isTextInside ? cx(barLabel) : cx(barLabel) && cx(barLabelOutside),
|
|
103
103
|
ref: textRef
|
|
104
|
-
}, isProjectBar ? "".concat(task.name, ":
|
|
104
|
+
}, isProjectBar && getYmd(task.start) && getYmd(task.end) ? "".concat(task.name, ": ").concat(getYmd(task.start), " ~ ").concat(getYmd(task.end)) : task.name));
|
|
105
105
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Task } from '../types/public-types';
|
|
2
1
|
import { BarTask } from '../types/bar-task';
|
|
3
2
|
import { BarMoveAction } from '../types/gantt-task-actions';
|
|
3
|
+
import { Task } from '../types/public-types';
|
|
4
4
|
export declare const convertToBarTasks: (tasks: Task[], dates: Date[], columnWidth: number, rowHeight: number, taskHeight: number, barCornerRadius: number, handleWidth: number, rtl: boolean, barProgressColor: string, barProgressSelectedColor: string, barBackgroundColor: string, barBackgroundSelectedColor: string, projectProgressColor: string, projectProgressSelectedColor: string, projectBackgroundColor: string, projectBackgroundSelectedColor: string, milestoneBackgroundColor: string, milestoneBackgroundSelectedColor: string) => BarTask[];
|
|
5
5
|
export declare const progressWithByParams: (taskX1: number, taskX2: number, progress: number, rtl: boolean) => number[];
|
|
6
6
|
export declare const progressByProgressWidth: (progressWidth: number, barTask: BarTask) => number;
|
|
@@ -58,7 +58,7 @@ var convertToBar = function convertToBar(task, index, dates, columnWidth, rowHei
|
|
|
58
58
|
var typeInternal = task.type;
|
|
59
59
|
if (typeInternal === 'task' && x2 - x1 < handleWidth * 2) {
|
|
60
60
|
typeInternal = 'smalltask';
|
|
61
|
-
x2 = x1 + handleWidth * 2;
|
|
61
|
+
x2 = x1 > 0 ? x1 + handleWidth * 2 : x1;
|
|
62
62
|
}
|
|
63
63
|
var _progressWithByParams = progressWithByParams(x1, x2, task.progress, rtl),
|
|
64
64
|
_progressWithByParams2 = _slicedToArray(_progressWithByParams, 2),
|
|
@@ -126,16 +126,16 @@ var taskXCoordinate = function taskXCoordinate(xDate, dates, columnWidth) {
|
|
|
126
126
|
var remainderMillis = (xDate === null || xDate === void 0 ? void 0 : xDate.getTime()) - ((_dates$index = dates[index]) === null || _dates$index === void 0 ? void 0 : _dates$index.getTime());
|
|
127
127
|
var percentOfInterval = remainderMillis / (((_dates = dates[index + 1]) === null || _dates === void 0 ? void 0 : _dates.getTime()) - ((_dates$index2 = dates[index]) === null || _dates$index2 === void 0 ? void 0 : _dates$index2.getTime()));
|
|
128
128
|
var x = index * columnWidth + percentOfInterval * columnWidth;
|
|
129
|
-
return x;
|
|
129
|
+
return isNaN(x) ? 0 : x;
|
|
130
130
|
};
|
|
131
131
|
var taskXCoordinateRTL = function taskXCoordinateRTL(xDate, dates, columnWidth) {
|
|
132
132
|
var x = taskXCoordinate(xDate, dates, columnWidth);
|
|
133
133
|
x += columnWidth;
|
|
134
|
-
return x;
|
|
134
|
+
return isNaN(x) ? 0 : x;
|
|
135
135
|
};
|
|
136
136
|
var taskYCoordinate = function taskYCoordinate(index, rowHeight, taskHeight) {
|
|
137
137
|
var y = index * rowHeight + (rowHeight - taskHeight) / 2;
|
|
138
|
-
return y;
|
|
138
|
+
return isNaN(y) ? 0 : y;
|
|
139
139
|
};
|
|
140
140
|
export var progressWithByParams = function progressWithByParams(taskX1, taskX2, progress, rtl) {
|
|
141
141
|
var progressWidth = (taskX2 - taskX1) * progress * 0.01;
|
|
@@ -61,5 +61,7 @@ export var sortTasks = function sortTasks(taskA, taskB) {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
export var getYmd = function getYmd(date) {
|
|
64
|
-
|
|
64
|
+
if (!isNaN(date.getTime())) {
|
|
65
|
+
return date.getFullYear() + '/' + "".concat(date.getMonth() + 1) + '/' + date.getDate();
|
|
66
|
+
}
|
|
65
67
|
};
|
|
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
import { useDndContext, useDndMonitor, useDraggable, useDroppable } from '@dnd-kit/core';
|
|
16
16
|
import { css } from '@emotion/css';
|
|
17
|
-
import {
|
|
17
|
+
import { RecursionField, Schema, observer, useField, useFieldSchema } from '@formily/react';
|
|
18
18
|
import { uid } from '@formily/shared';
|
|
19
19
|
import cls from 'classnames';
|
|
20
20
|
import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -341,7 +341,7 @@ Grid.Row = observer(function () {
|
|
|
341
341
|
cols: cols
|
|
342
342
|
}
|
|
343
343
|
}, /*#__PURE__*/React.createElement("div", {
|
|
344
|
-
className: cls('nb-grid-row', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n
|
|
344
|
+
className: cls('nb-grid-row', css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n /* z-index: 0; */\n "])))),
|
|
345
345
|
style: {
|
|
346
346
|
margin: showDivider ? '0 calc(-1 * var(--nb-spacing))' : null
|
|
347
347
|
}
|
|
@@ -4,21 +4,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import { useFieldSchema, useField } from '@formily/react';
|
|
8
|
-
import React, { useMemo } from 'react';
|
|
9
7
|
import { ArrayItems } from '@formily/antd';
|
|
8
|
+
import { useField, useFieldSchema } from '@formily/react';
|
|
10
9
|
import { Slider } from 'antd';
|
|
11
10
|
import _ from 'lodash';
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
13
|
import { useCollection, useCollectionFilterOptions, useSortFields } from '../../../collection-manager';
|
|
14
14
|
import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings';
|
|
15
15
|
import { useSchemaTemplate } from '../../../schema-templates';
|
|
16
|
+
import { SchemaComponentOptions } from '../../core';
|
|
16
17
|
import { useDesignable } from '../../hooks';
|
|
17
18
|
import { removeNullCondition } from '../filter';
|
|
18
19
|
import { FilterDynamicComponent } from '../table-v2/FilterDynamicComponent';
|
|
19
|
-
import { SchemaComponentOptions } from '../../core';
|
|
20
20
|
import { defaultColumnCount, gridSizes, pageSizeOptions, screenSizeMaps, screenSizeTitleMaps } from './options';
|
|
21
|
-
Slider;
|
|
22
21
|
var columnCountMarks = [1, 2, 3, 4, 6, 8, 12, 24].reduce(function (obj, cur) {
|
|
23
22
|
obj[cur] = cur;
|
|
24
23
|
return obj;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Card } from 'antd';
|
|
5
3
|
import { css } from '@emotion/css';
|
|
6
4
|
import { useField } from '@formily/react';
|
|
5
|
+
import { Card } from 'antd';
|
|
6
|
+
import React from 'react';
|
|
7
7
|
import { RecordSimpleProvider } from '../../../record-provider';
|
|
8
8
|
var itemCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n height: 100%;\n flex-direction: column;\n justify-content: space-between;\n gap: 8px;\n"])));
|
|
9
9
|
export var GridCardItem = function GridCardItem(props) {
|
|
10
10
|
var field = useField();
|
|
11
11
|
return /*#__PURE__*/React.createElement(Card, {
|
|
12
|
-
className: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
12
|
+
className: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 100%;\n > .ant-card-body {\n padding: 24px 24px 0px;\n height: 100%;\n }\n .nb-action-bar button {\n margin-bottom: 10px;\n }\n "])))
|
|
13
13
|
}, /*#__PURE__*/React.createElement("div", {
|
|
14
14
|
className: itemCss
|
|
15
15
|
}, /*#__PURE__*/React.createElement(RecordSimpleProvider, {
|
|
@@ -42,7 +42,5 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
html body {
|
|
45
|
-
--adm-font-family: -apple-system,
|
|
46
|
-
Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji,
|
|
47
|
-
Segoe UI Symbol;
|
|
45
|
+
--adm-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
|
|
48
46
|
}
|
|
@@ -6,11 +6,11 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
9
|
+
import { css, cx } from '@emotion/css';
|
|
10
|
+
import { FormLayout } from '@formily/antd';
|
|
9
11
|
import { createForm } from '@formily/core';
|
|
10
12
|
import { FormContext, useField } from '@formily/react';
|
|
11
|
-
import { css, cx } from '@emotion/css';
|
|
12
13
|
import React, { createContext, useContext, useEffect, useMemo } from 'react';
|
|
13
|
-
import { FormLayout } from '@formily/antd';
|
|
14
14
|
import { BlockProvider, useBlockRequestContext } from '../../../block-provider';
|
|
15
15
|
export var ListBlockContext = /*#__PURE__*/createContext({});
|
|
16
16
|
var InternalListBlockProvider = function InternalListBlockProvider(props) {
|
|
@@ -40,7 +40,7 @@ var InternalListBlockProvider = function InternalListBlockProvider(props) {
|
|
|
40
40
|
}, /*#__PURE__*/React.createElement(FormLayout, {
|
|
41
41
|
layout: 'vertical'
|
|
42
42
|
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-description-input {\n line-height: 34px;\n }\n .ant-formily-item-feedback-layout-loose {\n
|
|
43
|
+
className: cx(css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-description-input {\n line-height: 34px;\n }\n .ant-formily-item-feedback-layout-loose {\n display: inline;\n }\n "]))))
|
|
44
44
|
}, props.children))));
|
|
45
45
|
};
|
|
46
46
|
export var ListBlockProvider = function ListBlockProvider(props) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import { css } from '@emotion/css';
|
|
5
4
|
import { useField } from '@formily/react';
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import { RecordSimpleProvider } from '../../../record-provider';
|
|
7
|
-
var itemCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n // gap: 8px;\n padding: 5px 0;\n border-bottom: 1px solid #f0f0f0;\n"])));
|
|
7
|
+
var itemCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n flex-direction: column;\n // gap: 8px;\n padding: 4px 5px 0;\n border-bottom: 1px solid #f0f0f0;\n"])));
|
|
8
8
|
export var ListItem = function ListItem(props) {
|
|
9
9
|
var field = useField();
|
|
10
10
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ListDesigner } from './List.Designer';
|
|
2
|
-
import { ListBlockProvider } from './List.Decorator';
|
|
3
1
|
import React from 'react';
|
|
2
|
+
import { ListBlockProvider } from './List.Decorator';
|
|
3
|
+
import { ListDesigner } from './List.Designer';
|
|
4
4
|
import { ListItem } from './List.Item';
|
|
5
5
|
export declare const List: ((props: any) => React.JSX.Element) & {
|
|
6
6
|
Item: typeof ListItem;
|
|
@@ -12,18 +12,18 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
12
12
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
import { ListDesigner } from './List.Designer';
|
|
16
|
-
import { ListBlockProvider, useListBlockContext, useListItemProps } from './List.Decorator';
|
|
17
|
-
import React, { useCallback, useState } from 'react';
|
|
18
|
-
import { RecursionField, Schema, useField, useFieldSchema } from '@formily/react';
|
|
19
15
|
import { css, cx } from '@emotion/css';
|
|
16
|
+
import { RecursionField, Schema, useField, useFieldSchema } from '@formily/react';
|
|
20
17
|
import { List as AntdList } from 'antd';
|
|
21
|
-
import {
|
|
18
|
+
import React, { useCallback, useState } from 'react';
|
|
22
19
|
import { SortableItem } from '../../common';
|
|
23
20
|
import { SchemaComponentOptions } from '../../core';
|
|
24
21
|
import { useDesigner } from '../../hooks';
|
|
22
|
+
import { useListActionBarProps } from './hooks';
|
|
23
|
+
import { ListBlockProvider, useListBlockContext, useListItemProps } from './List.Decorator';
|
|
24
|
+
import { ListDesigner } from './List.Designer';
|
|
25
25
|
import { ListItem } from './List.Item';
|
|
26
|
-
var designerCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-bottom: var(--nb-spacing);\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: rgba(241, 139, 98, 0.06);\n border: 0;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: #f18b62;\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n"])));
|
|
26
|
+
var designerCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-bottom: var(--nb-spacing);\n .nb-action-bar {\n margin-top: 10px;\n }\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: rgba(241, 139, 98, 0.06);\n border: 0;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: #f18b62;\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n"])));
|
|
27
27
|
var InternalList = function InternalList(props) {
|
|
28
28
|
var _service$data, _field$value;
|
|
29
29
|
var _useListBlockContext = useListBlockContext(),
|