@zgfe/modules-page 1.0.1-alpha.13 → 1.0.1-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,6 +89,7 @@ var SearchPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
89
89
|
className: "".concat(classPrefix, "-item"),
|
|
90
90
|
key: field.key
|
|
91
91
|
}), /*#__PURE__*/React.createElement(BizUserGroup, {
|
|
92
|
+
enableTags: true,
|
|
92
93
|
enableDelete: fields.length > 1,
|
|
93
94
|
onDelete: function onDelete() {
|
|
94
95
|
return remove(index);
|
|
@@ -2,7 +2,7 @@ import { BizSelectTypes } from '@zgfe/business-lib';
|
|
|
2
2
|
import { FormValue, SearchValue } from './types';
|
|
3
3
|
export declare const formValue: (source?: SearchValue, userGroupList?: BizSelectTypes.Option[]) => FormValue;
|
|
4
4
|
export declare const formatValue: (source: FormValue) => {
|
|
5
|
-
userGroup: number[];
|
|
5
|
+
userGroup: (number | string[])[];
|
|
6
6
|
pageTitle: string | undefined;
|
|
7
7
|
pageUrl: string | undefined;
|
|
8
8
|
pageGroup: number | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { util } from '@zgfe/business-lib';
|
|
1
2
|
import _ from 'lodash';
|
|
2
3
|
export var formValue = function formValue(source, userGroupList) {
|
|
3
4
|
var data = _.cloneDeep(source) || {};
|
|
@@ -33,7 +34,16 @@ export var formatValue = function formatValue(source) {
|
|
|
33
34
|
var data = _.cloneDeep(source) || {};
|
|
34
35
|
var group = [];
|
|
35
36
|
(_data$userGroup2 = data.userGroup) === null || _data$userGroup2 === void 0 ? void 0 : _data$userGroup2.forEach(function (item) {
|
|
36
|
-
if (item) {
|
|
37
|
+
if (util.isArray(item)) {
|
|
38
|
+
var childGroup = [];
|
|
39
|
+
item.forEach(function (cItem) {
|
|
40
|
+
var name = '';
|
|
41
|
+
if (!cItem || !cItem.length) return;
|
|
42
|
+
name = "".concat(cItem[1].id, ":").concat(cItem[2].layerLabelName || cItem[2].layerLabelId);
|
|
43
|
+
childGroup.push(name);
|
|
44
|
+
});
|
|
45
|
+
group.push(childGroup);
|
|
46
|
+
} else if (item !== null && item !== void 0 && item.id) {
|
|
37
47
|
group.push(item.id);
|
|
38
48
|
}
|
|
39
49
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-page",
|
|
3
|
-
"version": "1.0.1-alpha.
|
|
3
|
+
"version": "1.0.1-alpha.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"prettier": "^2.2.1",
|
|
51
51
|
"yorkie": "^2.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "a74833c61c01b230f1144fc3c745289f5a02a8ad"
|
|
54
54
|
}
|