@teamix/pro 1.2.33 → 1.3.1
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/pro.css +1 -1
- package/dist/pro.js +17242 -17233
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-form.d.ts +9 -4
- package/es/actions/dialog-form.js +16 -9
- package/es/form/Filter/AdvancedFilter.js +4 -4
- package/es/form/Filter/LightFilter.js +22 -15
- package/es/form/Filter/index.js +200 -106
- package/es/form/Filter/useSpecialProps.d.ts +1 -1
- package/es/form/Filter/useSpecialProps.js +9 -9
- package/es/form/ProForm/index.js +4 -4
- package/es/form/ProForm/index.scss +8 -8
- package/es/form/SchemaForm/index.js +4 -4
- package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/es/form/SchemaForm/initializeRequest.js +40 -5
- package/es/form/SchemaForm/reactions.d.ts +2 -2
- package/es/form/SchemaForm/reactions.js +39 -21
- package/es/form/typing.d.ts +10 -2
- package/es/index.d.ts +4 -4
- package/es/index.js +4 -4
- package/es/nocode/configurators/PageHeader.js +2 -2
- package/es/page-header/index.js +7 -3
- package/es/table/components/Layout/index.js +2 -2
- package/es/table/components/Pagination/index.js +11 -1
- package/es/table/components/ToolBar/Fullscreen.js +32 -4
- package/es/table/index.js +70 -40
- package/es/table/index.scss +6 -0
- package/es/table/typing.d.ts +10 -6
- package/es/table/utils/columnRender.js +1 -1
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +59 -72
- package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
- package/es/timeline/index.d.ts +10 -0
- package/es/{step → timeline}/index.js +33 -57
- package/es/timeline/index.scss +7 -0
- package/es/timeline/typing.d.ts +101 -0
- package/es/{step → timeline}/typing.js +0 -0
- package/lib/actions/dialog-form.d.ts +9 -4
- package/lib/actions/dialog-form.js +16 -9
- package/lib/form/Filter/AdvancedFilter.js +4 -4
- package/lib/form/Filter/LightFilter.js +21 -15
- package/lib/form/Filter/index.js +199 -105
- package/lib/form/Filter/useSpecialProps.d.ts +1 -1
- package/lib/form/Filter/useSpecialProps.js +8 -8
- package/lib/form/ProForm/index.js +4 -4
- package/lib/form/ProForm/index.scss +8 -8
- package/lib/form/SchemaForm/index.js +4 -4
- package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRequest.js +40 -5
- package/lib/form/SchemaForm/reactions.d.ts +2 -2
- package/lib/form/SchemaForm/reactions.js +38 -20
- package/lib/form/typing.d.ts +10 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +10 -10
- package/lib/nocode/configurators/PageHeader.js +2 -2
- package/lib/page-header/index.js +6 -2
- package/lib/table/components/Layout/index.js +2 -2
- package/lib/table/components/Pagination/index.js +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +30 -3
- package/lib/table/index.js +70 -40
- package/lib/table/index.scss +6 -0
- package/lib/table/typing.d.ts +10 -6
- package/lib/table/utils/columnRender.js +1 -1
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +58 -72
- package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
- package/lib/timeline/index.d.ts +10 -0
- package/lib/{step → timeline}/index.js +38 -58
- package/lib/timeline/index.scss +7 -0
- package/lib/timeline/typing.d.ts +101 -0
- package/lib/{step → timeline}/typing.js +0 -0
- package/package.json +1 -1
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
- package/es/step/ProStepItem/components/HozStepItem/index.js +0 -235
- package/es/step/ProStepItem/components/HozStepItem/index.scss +0 -279
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
- package/es/step/ProStepItem/index.d.ts +0 -4
- package/es/step/ProStepItem/index.js +0 -57
- package/es/step/index.d.ts +0 -9
- package/es/step/typing.d.ts +0 -96
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
- package/lib/step/ProStepItem/components/HozStepItem/index.js +0 -258
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +0 -279
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
- package/lib/step/ProStepItem/index.d.ts +0 -4
- package/lib/step/ProStepItem/index.js +0 -69
- package/lib/step/index.d.ts +0 -9
- package/lib/step/typing.d.ts +0 -96
@@ -5,15 +5,50 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
+
var _utils = require("@teamix/utils");
|
9
|
+
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
+
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
13
|
+
|
8
14
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9
15
|
|
16
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
17
|
+
|
18
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19
|
+
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
21
|
+
|
22
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
23
|
+
|
24
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
25
|
+
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
27
|
+
|
10
28
|
var initializeRequest = function initializeRequest(requestConfig, suffix) {
|
11
29
|
if (requestConfig) {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
30
|
+
if ((0, _utils.isArr)(requestConfig)) {
|
31
|
+
var reactionsMap = [];
|
32
|
+
var scopeMap = {};
|
33
|
+
requestConfig.forEach(function (item, index) {
|
34
|
+
var _initializeRequest = initializeRequest(item, "".concat(suffix).concat(index)),
|
35
|
+
reactions = _initializeRequest.reactions,
|
36
|
+
scope = _initializeRequest.scope;
|
37
|
+
|
38
|
+
reactionsMap = [].concat(_toConsumableArray(reactionsMap), _toConsumableArray(reactions));
|
39
|
+
scopeMap = _objectSpread(_objectSpread({}, scopeMap), scope);
|
40
|
+
});
|
41
|
+
return {
|
42
|
+
reactions: reactionsMap,
|
43
|
+
scope: scopeMap
|
44
|
+
};
|
45
|
+
} else {
|
46
|
+
var requestConfigName = "$requestConfig_".concat(suffix);
|
47
|
+
return {
|
48
|
+
reactions: ["{{$common($request,".concat(requestConfigName, ",context)}}")],
|
49
|
+
scope: _defineProperty({}, requestConfigName, requestConfig)
|
50
|
+
};
|
51
|
+
}
|
17
52
|
}
|
18
53
|
|
19
54
|
return {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ProFormRequestConfig } from '../typing';
|
2
|
-
declare const $request: (field: any, requestConfig: ProFormRequestConfig, context: any) => Promise<unknown>;
|
2
|
+
declare const $request: (field: any, requestConfig: ProFormRequestConfig, context: any, type: 'request' | 'validator' | 'dataSource') => Promise<unknown>;
|
3
3
|
declare const $common: (services: any, requestConfig: ProFormRequestConfig, context: any) => (field: any) => any;
|
4
4
|
declare const $validator: (services: any, requestConfig: ProFormRequestConfig, context: any) => (value: any, rules: any, { field }: any) => any;
|
5
|
-
declare const $dataSource: (services: any, requestConfig: ProFormRequestConfig, context: any) => (field: any) => any;
|
5
|
+
declare const $dataSource: (services: any, requestConfig: ProFormRequestConfig, context: any, readPretty: any) => (field: any) => any;
|
6
6
|
export { $request, $common, $dataSource, $validator };
|
@@ -14,14 +14,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
14
14
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
15
15
|
|
16
16
|
// 配置请求
|
17
|
-
var $request = function $request(field, requestConfig, context) {
|
17
|
+
var $request = function $request(field, requestConfig, context, type) {
|
18
18
|
var _field$data;
|
19
19
|
|
20
|
-
var refresh = field === null || field === void 0 ? void 0 : (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.refresh;
|
21
20
|
var beforeRequest = requestConfig.beforeRequest,
|
22
21
|
onSuccess = requestConfig.onSuccess;
|
23
|
-
var refreshResult = (0, _utils.isPlainObj)(refresh) ? refresh : {};
|
24
22
|
var beforeRequestResult = (0, _utils.isFn)(beforeRequest) ? beforeRequest(field, context) : {};
|
23
|
+
/**
|
24
|
+
* // 主动触发的请求刷新
|
25
|
+
*/
|
26
|
+
// 触发所有配置的请求
|
27
|
+
|
28
|
+
var refresh = (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.refresh;
|
29
|
+
var refreshResult = (0, _utils.isPureObj)(refresh) ? refresh : {};
|
25
30
|
return (0, _utils.doCommonRequest)(_objectSpread(_objectSpread({}, requestConfig), {}, {
|
26
31
|
params: _objectSpread(_objectSpread(_objectSpread({}, requestConfig.params), beforeRequestResult), refreshResult),
|
27
32
|
beforeRequest: function beforeRequest() {
|
@@ -38,7 +43,7 @@ exports.$request = $request;
|
|
38
43
|
|
39
44
|
var $common = function $common(services, requestConfig, context) {
|
40
45
|
return function (field) {
|
41
|
-
return services(field, requestConfig, context).then(function (res) {
|
46
|
+
return services(field, requestConfig, context, 'request').then(function (res) {
|
42
47
|
return requestConfig.onComplete && requestConfig.onComplete(res, field, context);
|
43
48
|
});
|
44
49
|
};
|
@@ -50,7 +55,7 @@ exports.$common = $common;
|
|
50
55
|
var $validator = function $validator(services, requestConfig, context) {
|
51
56
|
return function (value, rules, _ref) {
|
52
57
|
var field = _ref.field;
|
53
|
-
return services(field, requestConfig, context).then(function (res) {
|
58
|
+
return services(field, requestConfig, context, 'validator').then(function (res) {
|
54
59
|
return requestConfig.onComplete && requestConfig.onComplete(res, field, context);
|
55
60
|
});
|
56
61
|
};
|
@@ -59,28 +64,41 @@ var $validator = function $validator(services, requestConfig, context) {
|
|
59
64
|
|
60
65
|
exports.$validator = $validator;
|
61
66
|
|
62
|
-
var $dataSource = function $dataSource(services, requestConfig, context) {
|
67
|
+
var $dataSource = function $dataSource(services, requestConfig, context, readPretty) {
|
63
68
|
return function (field) {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
+
if (!readPretty) {
|
70
|
+
field.setState({
|
71
|
+
loading: true,
|
72
|
+
readOnly: true
|
73
|
+
});
|
74
|
+
}
|
75
|
+
|
76
|
+
return services(field, requestConfig, context, 'dataSource').then(function (res) {
|
69
77
|
var isValueInDataSource = (0, _utils.getValueByValue)(res, field.value);
|
70
78
|
var clearValue = isValueInDataSource ? {} : {
|
71
79
|
value: undefined
|
72
80
|
};
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
81
|
+
|
82
|
+
if (!readPretty) {
|
83
|
+
field.setState(_objectSpread({
|
84
|
+
dataSource: res,
|
85
|
+
loading: false,
|
86
|
+
readOnly: false
|
87
|
+
}, clearValue));
|
88
|
+
} else {
|
89
|
+
field.setState({
|
90
|
+
dataSource: res
|
91
|
+
});
|
92
|
+
}
|
93
|
+
|
78
94
|
return requestConfig.onComplete && requestConfig.onComplete(res, field, context);
|
79
95
|
}).catch(function () {
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
96
|
+
if (!readPretty) {
|
97
|
+
field.setState({
|
98
|
+
loading: false,
|
99
|
+
readOnly: false
|
100
|
+
});
|
101
|
+
}
|
84
102
|
});
|
85
103
|
};
|
86
104
|
};
|
package/lib/form/typing.d.ts
CHANGED
@@ -10,6 +10,10 @@ declare type FieldDisplayTypes = 'none' | 'hidden' | 'visible';
|
|
10
10
|
export interface ProFormInitializeItem {
|
11
11
|
(item: ProFormSchemaItem, props?: any): ProFormSchemaItem;
|
12
12
|
}
|
13
|
+
/**
|
14
|
+
* ProForm 实例类型
|
15
|
+
*/
|
16
|
+
export declare type ProFormType = FormType;
|
13
17
|
declare type IBaseComponent = 'Input' | 'Password' | 'TextArea' | 'NumberPicker' | 'Percent' | 'Money' | 'Select' | 'MultipleSelect' | 'TreeSelect' | 'Cascader' | 'MultipleCascader' | 'ArbitraryCascader' | 'Radio' | 'Checkbox' | 'Switch' | 'DatePicker' | 'TimePicker' | 'DateTimePicker' | 'WeekPicker' | 'MonthPicker' | 'YearPicker' | 'QuarterPicker' | 'DateRangePicker' | 'TimeRangePicker' | 'DateTimeRangePicker' | 'WeekRangePicker' | 'MonthRangePicker' | 'YearRangePicker' | 'QuarterRangePicker' | 'Transfer' | 'Upload' | 'ColorPicker' | 'ColorRadio' | 'IconPicker' | 'JsonInput' | 'TagPicker' | 'MultipleTagPicker' | 'Range' | 'Search' | 'SelectGroup';
|
14
18
|
declare type IButtonComponent = 'Submit' | 'Reset';
|
15
19
|
declare type IComboComponent = 'ArrayCards' | 'ArrayCards.Addition' | 'ArrayCards.Remove' | 'ArrayCards.MoveUp' | 'ArrayCards.MoveDown' | 'ArrayCards.Index' | 'ArrayCollapse' | 'ArrayCollapse.CollapsePanel' | 'ArrayCollapse.Addition' | 'ArrayCollapse.Remove' | 'ArrayCollapse.MoveUp' | 'ArrayCollapse.MoveDown' | 'ArrayCollapse.Index' | 'ArrayTable' | 'ArrayTable.Column' | 'ArrayTable.SortHandle' | 'ArrayTable.Addition' | 'ArrayTable.Remove' | 'ArrayTable.MoveDown' | 'ArrayTable.MoveUp' | 'ArrayTable.Index' | 'ArrayItems' | 'ArrayItems.Item' | 'ArrayItems.SortHandle' | 'ArrayItems.Addition' | 'ArrayItems.Remove' | 'ArrayItems.MoveDown' | 'ArrayItems.MoveUp' | 'ArrayItems.Index' | 'Editable' | 'Editable.Popover' | 'Editable.Dialog' | 'Editable.Drawer';
|
@@ -44,7 +48,7 @@ export interface ProFormSchemaItem {
|
|
44
48
|
readPretty?: boolean | string;
|
45
49
|
pattern?: FieldPatternTypes;
|
46
50
|
default?: any;
|
47
|
-
request?: ProFormRequestConfig;
|
51
|
+
request?: ProFormRequestConfig | ProFormRequestConfig[];
|
48
52
|
data?: AnyObject;
|
49
53
|
}
|
50
54
|
export declare type ProFormSchema = ProFormSchemaItem[];
|
@@ -63,12 +67,14 @@ export interface ProFormProps extends IFormLayoutProps {
|
|
63
67
|
onChange?: (values: any, fieldValue?: any, fieldName?: any) => any;
|
64
68
|
onSubmit?: ((values: any) => any) | CommonRequestConfig;
|
65
69
|
onSubmitFailed?: (feedbacks: IFormFeedback[]) => void;
|
70
|
+
onInitialComplete?: (form: FormType) => void;
|
66
71
|
}
|
67
72
|
export interface FilterProps extends ProFormProps {
|
68
73
|
form: FormType;
|
69
74
|
defaultFilterValue?: string;
|
75
|
+
activeFilterValueRef?: React.MutableRefObject<any>;
|
76
|
+
forceClear?: boolean;
|
70
77
|
onReset?: (payload?: any) => void;
|
71
|
-
onResetClick?: () => void;
|
72
78
|
}
|
73
79
|
export interface QueryFilterLayoutProps {
|
74
80
|
prefixCls?: string;
|
@@ -92,6 +98,8 @@ export interface QueryFilterProps extends ProFormProps {
|
|
92
98
|
purePanel?: boolean;
|
93
99
|
/** 面板是否默认展开,仅在 mode='panel' 时生效 */
|
94
100
|
expand?: boolean;
|
101
|
+
/** 是否强制清除 */
|
102
|
+
forceClear?: boolean;
|
95
103
|
/** 顶部筛选区前缀 */
|
96
104
|
addonBefore?: ReactNode;
|
97
105
|
/** 顶部筛选区后缀 */
|
package/lib/index.d.ts
CHANGED
@@ -9,7 +9,7 @@ import ProPageHeader from './page-header';
|
|
9
9
|
import ProTable from './table';
|
10
10
|
import ProSkeleton from './skeleton';
|
11
11
|
import utils from './utils';
|
12
|
-
import {
|
12
|
+
import { ProTimeline } from './timeline';
|
13
13
|
import * as nocode from './nocode';
|
14
14
|
import * as templates from './templates';
|
15
15
|
export * from './actions';
|
@@ -23,6 +23,6 @@ export * from './page-header';
|
|
23
23
|
export * from './skeleton';
|
24
24
|
export * from './table';
|
25
25
|
export * from './utils';
|
26
|
-
export * from './
|
27
|
-
declare const version = "1.
|
28
|
-
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable,
|
26
|
+
export * from './timeline';
|
27
|
+
declare const version = "1.3.1";
|
28
|
+
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProTimeline, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
@@ -18,7 +18,7 @@ var _exportNames = {
|
|
18
18
|
ProTable: true,
|
19
19
|
ProSkeleton: true,
|
20
20
|
utils: true,
|
21
|
-
|
21
|
+
ProTimeline: true,
|
22
22
|
nocode: true,
|
23
23
|
templates: true
|
24
24
|
};
|
@@ -70,16 +70,16 @@ Object.defineProperty(exports, "ProSkeleton", {
|
|
70
70
|
return _skeleton.default;
|
71
71
|
}
|
72
72
|
});
|
73
|
-
Object.defineProperty(exports, "
|
73
|
+
Object.defineProperty(exports, "ProTable", {
|
74
74
|
enumerable: true,
|
75
75
|
get: function get() {
|
76
|
-
return
|
76
|
+
return _table.default;
|
77
77
|
}
|
78
78
|
});
|
79
|
-
Object.defineProperty(exports, "
|
79
|
+
Object.defineProperty(exports, "ProTimeline", {
|
80
80
|
enumerable: true,
|
81
81
|
get: function get() {
|
82
|
-
return
|
82
|
+
return _timeline.ProTimeline;
|
83
83
|
}
|
84
84
|
});
|
85
85
|
Object.defineProperty(exports, "hooks", {
|
@@ -239,16 +239,16 @@ Object.keys(_utils).forEach(function (key) {
|
|
239
239
|
});
|
240
240
|
});
|
241
241
|
|
242
|
-
var
|
242
|
+
var _timeline = require("./timeline");
|
243
243
|
|
244
|
-
Object.keys(
|
244
|
+
Object.keys(_timeline).forEach(function (key) {
|
245
245
|
if (key === "default" || key === "__esModule") return;
|
246
246
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
247
|
-
if (key in exports && exports[key] ===
|
247
|
+
if (key in exports && exports[key] === _timeline[key]) return;
|
248
248
|
Object.defineProperty(exports, key, {
|
249
249
|
enumerable: true,
|
250
250
|
get: function get() {
|
251
|
-
return
|
251
|
+
return _timeline[key];
|
252
252
|
}
|
253
253
|
});
|
254
254
|
});
|
@@ -285,5 +285,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
285
285
|
// 设置图标源
|
286
286
|
_icon.default.setConfig(_utils.default.getTeamixIconConfig());
|
287
287
|
|
288
|
-
var version = '1.
|
288
|
+
var version = '1.3.1';
|
289
289
|
exports.version = version;
|
@@ -88,11 +88,11 @@ var schema = [{
|
|
88
88
|
}, {
|
89
89
|
name: 'iconColor',
|
90
90
|
title: '图标颜色',
|
91
|
-
component: '
|
91
|
+
component: 'ColorPicker'
|
92
92
|
}, {
|
93
93
|
name: 'iconBackgroundColor',
|
94
94
|
title: '图标背景颜色',
|
95
|
-
component: '
|
95
|
+
component: 'ColorPicker'
|
96
96
|
}, {
|
97
97
|
name: 'iconBackgroundType',
|
98
98
|
title: '图标背景形状',
|
package/lib/page-header/index.js
CHANGED
@@ -88,8 +88,12 @@ var getColorAndStyle = function getColorAndStyle(color, backgroundColor, backgro
|
|
88
88
|
var isColorPresetColor = (0, _utils.isPresetColor)(color);
|
89
89
|
var isBgColorPresetColor = (0, _utils.isPresetColor)(backgroundColor);
|
90
90
|
var className = (0, _classnames2.default)((_classnames = {}, _defineProperty(_classnames, "".concat((0, _utils.getColorClassName)(color)), isColorPresetColor), _defineProperty(_classnames, "".concat((0, _utils.getBackgroundColorClassName)(backgroundColor)), isBgColorPresetColor), _defineProperty(_classnames, "".concat(cls("bg-type-".concat(backgroundType))), !!backgroundType), _classnames));
|
91
|
-
var styleColor = isColorPresetColor ?
|
92
|
-
var styleBgColor = isBgColorPresetColor ?
|
91
|
+
var styleColor = isColorPresetColor ? (0, _utils.getColor)(color) : color;
|
92
|
+
var styleBgColor = isBgColorPresetColor ? (0, _utils.getColor)(backgroundColor) : backgroundColor; // debugger;
|
93
|
+
// console.log('color', color);
|
94
|
+
// console.log('backgroundColor', backgroundColor);
|
95
|
+
// console.log('styleBgColor', styleBgColor);
|
96
|
+
|
93
97
|
var style = {
|
94
98
|
color: styleColor,
|
95
99
|
backgroundColor: styleBgColor
|
@@ -172,13 +172,13 @@ var Layout = function Layout(props) {
|
|
172
172
|
className: cls('wrapper')
|
173
173
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
174
174
|
className: cls('left')
|
175
|
-
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header))
|
175
|
+
}, header && /*#__PURE__*/_react.default.createElement(_utils.Header, _objectSpread({}, header))), /*#__PURE__*/_react.default.createElement("div", {
|
176
176
|
className: cls('right')
|
177
177
|
}, extra && /*#__PURE__*/_react.default.createElement(_QuickAction.default, {
|
178
178
|
actionRef: actionRef,
|
179
179
|
quickAction: extra,
|
180
180
|
rowSelection: rowSelection
|
181
|
-
}), !(dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema4 = dataFilter.schema) === null || _dataFilter$schema4 === void 0 ? void 0 : _dataFilter$schema4.length) && renderQueryFilter())
|
181
|
+
}), !(dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema3 = dataFilter.schema) === null || _dataFilter$schema3 === void 0 ? void 0 : _dataFilter$schema3.length) && renderQueryFilter())), (dataFilter === null || dataFilter === void 0 ? void 0 : (_dataFilter$schema4 = dataFilter.schema) === null || _dataFilter$schema4 === void 0 ? void 0 : _dataFilter$schema4.length) && renderQueryFilter());
|
182
182
|
} else if (!header && mainAction) {
|
183
183
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderQueryFilter());
|
184
184
|
} else if (!header && !mainAction) {
|
@@ -64,6 +64,13 @@ var _default = function _default(props) {
|
|
64
64
|
responsiveProps = _useResponsiveProps.responsiveProps,
|
65
65
|
paginationWrapperRef = _useResponsiveProps.ref;
|
66
66
|
|
67
|
+
(0, _react.useEffect)(function () {
|
68
|
+
// size='mini' 模式下 current 受控
|
69
|
+
if (responsiveProps === 'mini') {
|
70
|
+
setCurrentPage(current);
|
71
|
+
}
|
72
|
+
}, [current]);
|
73
|
+
|
67
74
|
var _useState = (0, _react.useState)(false),
|
68
75
|
_useState2 = _slicedToArray(_useState, 2),
|
69
76
|
visible = _useState2[0],
|
@@ -100,6 +107,9 @@ var _default = function _default(props) {
|
|
100
107
|
text: true,
|
101
108
|
onMouseEnter: function onMouseEnter() {
|
102
109
|
return setVisible(true);
|
110
|
+
},
|
111
|
+
style: {
|
112
|
+
lineHeight: '18px'
|
103
113
|
}
|
104
114
|
}, (0, _utils.getMessage)('total', {
|
105
115
|
total: total
|
@@ -25,7 +25,8 @@ var FullScreen = function FullScreen(props) {
|
|
25
25
|
actionRef = props.actionRef;
|
26
26
|
var _actionRef$current = actionRef.current,
|
27
27
|
normalDataFilterForm = _actionRef$current.normalDataFilterForm,
|
28
|
-
fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm
|
28
|
+
fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm,
|
29
|
+
filterEnableRef = _actionRef$current.filterEnableRef;
|
29
30
|
|
30
31
|
var closeByESC = function closeByESC(e) {
|
31
32
|
if (visible && e.code === 'Escape') {
|
@@ -44,12 +45,38 @@ var FullScreen = function FullScreen(props) {
|
|
44
45
|
}, [visible, actionRef]);
|
45
46
|
|
46
47
|
var afterClose = function afterClose() {
|
47
|
-
|
48
|
+
// 判断全屏前后筛选表单值是否有改变
|
49
|
+
var n = JSON.stringify((0, _utils.getValidValues)(normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.values));
|
50
|
+
var f = JSON.stringify((0, _utils.getValidValues)(fullscreenDataFilterForm === null || fullscreenDataFilterForm === void 0 ? void 0 : fullscreenDataFilterForm.values));
|
51
|
+
|
52
|
+
if (n === f) {
|
53
|
+
// 关闭全屏后,表单值未变化,开启普通表单onFilter
|
54
|
+
filterEnableRef.current.normal = true;
|
55
|
+
} else {
|
56
|
+
// 关闭全屏后,表单值有变化,修改表单值
|
57
|
+
normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm === null || fullscreenDataFilterForm === void 0 ? void 0 : fullscreenDataFilterForm.values);
|
58
|
+
} // 关闭全屏后,关闭全屏表单onFilter
|
59
|
+
|
60
|
+
|
61
|
+
filterEnableRef.current.fullscreen = false;
|
48
62
|
}; // 全屏开启之后
|
49
63
|
|
50
64
|
|
51
65
|
var afterOpen = function afterOpen() {
|
52
|
-
|
66
|
+
// 判断全屏前后筛选表单值是否有改变
|
67
|
+
var n = JSON.stringify((0, _utils.getValidValues)(normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.values));
|
68
|
+
var f = JSON.stringify((0, _utils.getValidValues)(fullscreenDataFilterForm === null || fullscreenDataFilterForm === void 0 ? void 0 : fullscreenDataFilterForm.values));
|
69
|
+
|
70
|
+
if (n === f) {
|
71
|
+
// 全屏后,表单值未变化,开启全屏表单onFilter
|
72
|
+
filterEnableRef.current.fullscreen = true;
|
73
|
+
} else {
|
74
|
+
// 全屏后,表单值变化,修改表单值
|
75
|
+
fullscreenDataFilterForm === null || fullscreenDataFilterForm === void 0 ? void 0 : fullscreenDataFilterForm.setValues(normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.values);
|
76
|
+
} // 全屏后,关闭普通表单onFilter
|
77
|
+
|
78
|
+
|
79
|
+
filterEnableRef.current.normal = false; // 消息提示
|
53
80
|
|
54
81
|
_components.Message.show({
|
55
82
|
type: 'notice',
|