@zgfe/business-lib 1.0.22 → 1.0.23-alpha.0
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/dnd/demo/index.js +7 -1
- package/es/dnd/demo/styles/index.less +14 -0
- package/es/dnd/index.d.ts +5 -1
- package/es/dnd/index.js +9 -2
- package/es/dnd/item.d.ts +4 -0
- package/es/dnd/item.js +9 -0
- package/es/dnd/types.d.ts +8 -3
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/userCondition/conditions/textDesc.js +6 -4
- package/es/userCondition/demo/index.js +3 -2
- package/package.json +2 -2
package/es/dnd/demo/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { BizDnd } from '@zgfe/business-lib';
|
|
3
|
+
import styles from './styles/index.less';
|
|
2
4
|
export default (function () {
|
|
3
|
-
return /*#__PURE__*/React.createElement("div", null,
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizDnd.Container, {
|
|
6
|
+
className: styles.container
|
|
7
|
+
}, /*#__PURE__*/React.createElement(BizDnd.Item, {
|
|
8
|
+
className: styles.item
|
|
9
|
+
}, "xxx")));
|
|
4
10
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
.container {
|
|
3
|
+
padding: @padding-md;
|
|
4
|
+
border: 1px solid @border-color-base;
|
|
5
|
+
border-radius: @border-radius-normal;
|
|
6
|
+
}
|
|
7
|
+
.item {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
width: 300px;
|
|
10
|
+
height: 150px;
|
|
11
|
+
text-align: center;
|
|
12
|
+
background: @background-color-base;
|
|
13
|
+
border-radius: @border-radius-normal;
|
|
14
|
+
}
|
package/es/dnd/index.d.ts
CHANGED
package/es/dnd/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import BizDndItem from './item';
|
|
2
3
|
|
|
3
|
-
var
|
|
4
|
-
return /*#__PURE__*/React.createElement("div",
|
|
4
|
+
var Container = function Container(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: "".concat(props.className)
|
|
7
|
+
}, props.children);
|
|
5
8
|
};
|
|
6
9
|
|
|
10
|
+
var BizDnd = {
|
|
11
|
+
Container: Container,
|
|
12
|
+
Item: BizDndItem
|
|
13
|
+
};
|
|
7
14
|
export default BizDnd;
|
package/es/dnd/item.d.ts
ADDED
package/es/dnd/item.js
ADDED
package/es/dnd/types.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export declare namespace DndTypes {
|
|
2
|
-
interface
|
|
2
|
+
interface ContainerProps {
|
|
3
3
|
className?: string;
|
|
4
|
-
itemClassName?: string;
|
|
5
|
-
draddingClassName?: string;
|
|
6
4
|
tempClassName?: string;
|
|
5
|
+
onChange?: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface ItemProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
draddingClassName?: string;
|
|
10
|
+
keyField: string;
|
|
11
|
+
data: Record<string, any>;
|
|
7
12
|
}
|
|
8
13
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ import BizAddToScene from './addToScene';
|
|
|
24
24
|
import BizAddToPanel from './addToPanel';
|
|
25
25
|
import setGlobalConfig from './config';
|
|
26
26
|
import BizCycleTime from './cycleTime';
|
|
27
|
-
|
|
27
|
+
import BizDnd from './dnd';
|
|
28
|
+
export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
|
|
28
29
|
export type { UserGroupTypes } from './userGroup/types';
|
|
29
30
|
export type { BizSelectTypes } from './select/types';
|
|
30
31
|
export type { AttributeSelect } from './attributeSelector/types';
|
package/es/index.js
CHANGED
|
@@ -23,4 +23,5 @@ import BizAddToScene from './addToScene';
|
|
|
23
23
|
import BizAddToPanel from './addToPanel';
|
|
24
24
|
import setGlobalConfig from './config';
|
|
25
25
|
import BizCycleTime from './cycleTime';
|
|
26
|
-
|
|
26
|
+
import BizDnd from './dnd';
|
|
27
|
+
export { BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizUserGroup, IconFont, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
|
|
@@ -27,17 +27,19 @@ var Text = function Text(props) {
|
|
|
27
27
|
userTagsData = _useContext3.userTagsData;
|
|
28
28
|
|
|
29
29
|
function render() {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
var data = condition;
|
|
31
|
+
|
|
32
|
+
if (data.labels) {
|
|
33
|
+
return renderTags(data);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
if (condition.eventId === '-4') {
|
|
36
|
+
if (String(condition.eventId) === '-4') {
|
|
35
37
|
return renderPeriod({
|
|
36
38
|
before: '活跃于'
|
|
37
39
|
}, condition.runPeriod);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
if (condition.eventId === '-3') {
|
|
42
|
+
if (String(condition.eventId) === '-3') {
|
|
41
43
|
return renderPeriod({
|
|
42
44
|
before: '新增于'
|
|
43
45
|
}, condition.runPeriod);
|
|
@@ -150,7 +150,7 @@ var getTagList = Promise.resolve([{
|
|
|
150
150
|
}]);
|
|
151
151
|
var data = {
|
|
152
152
|
json: [[{
|
|
153
|
-
eventId:
|
|
153
|
+
eventId: -4,
|
|
154
154
|
attrs: [],
|
|
155
155
|
runPeriod: {
|
|
156
156
|
operator: 'relative',
|
|
@@ -161,7 +161,7 @@ var data = {
|
|
|
161
161
|
values: ['1']
|
|
162
162
|
}
|
|
163
163
|
}, {
|
|
164
|
-
eventId:
|
|
164
|
+
eventId: -3,
|
|
165
165
|
attrs: [],
|
|
166
166
|
runPeriod: {
|
|
167
167
|
operator: 'absolute',
|
|
@@ -276,6 +276,7 @@ export default (function () {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
var descDom = /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
279
|
+
textMode: true,
|
|
279
280
|
defaultValue: defaultValue,
|
|
280
281
|
onChange: onChange,
|
|
281
282
|
eventAttrNum: 3,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23-alpha.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react": "^16.12.0 || ^17.0.0",
|
|
59
59
|
"yorkie": "^2.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "0d63dcffad7ca36d53427e53dd5743ef8531c1ad"
|
|
62
62
|
}
|