goblin-laboratory 2.2.1 → 2.2.2
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/.editorconfig +9 -9
- package/.eslintrc.js +28 -28
- package/.zou-flow +3 -3
- package/README.md +107 -107
- package/carnotzet.js +10 -10
- package/config.js +13 -13
- package/laboratory.js +13 -13
- package/lib/.webpack-config.js +53 -53
- package/lib/carnotzet.js +118 -118
- package/lib/helpers.js +16 -16
- package/lib/index.js +66 -66
- package/package.json +47 -47
- package/widgets/connect-helpers/arrayEquals.js +5 -5
- package/widgets/connect-helpers/arraysEquals.js +24 -24
- package/widgets/connect-helpers/c.js +99 -99
- package/widgets/connect-helpers/join-models.js +16 -16
- package/widgets/connect-helpers/with-c.js +276 -276
- package/widgets/devtools.js +5 -5
- package/widgets/disconnect-overlay/styles.js +50 -50
- package/widgets/disconnect-overlay/widget.js +40 -40
- package/widgets/fields-view/widget.js +34 -34
- package/widgets/form/index.js +79 -79
- package/widgets/frame/widget.js +47 -47
- package/widgets/frontend-form/reducer.js +18 -18
- package/widgets/frontend-form/widget.js +15 -15
- package/widgets/importer/default.js +14 -14
- package/widgets/importer/importer.js +54 -53
- package/widgets/importer/index.js +4 -4
- package/widgets/index-browsers.js +195 -195
- package/widgets/index-electron-ws.js +153 -153
- package/widgets/index-electron.js +69 -69
- package/widgets/index.js +1 -1
- package/widgets/laboratory/service.js +542 -542
- package/widgets/laboratory/widget.js +98 -98
- package/widgets/maintenance/styles.js +38 -38
- package/widgets/maintenance/widget.js +65 -65
- package/widgets/props-binder/widget.js +48 -48
- package/widgets/renderer.js +85 -85
- package/widgets/root/index.js +54 -54
- package/widgets/searchkit/index.js +68 -68
- package/widgets/store/backend-reducer.js +116 -116
- package/widgets/store/commands-reducer.js +14 -14
- package/widgets/store/middlewares.js +171 -171
- package/widgets/store/network-reducer.js +23 -23
- package/widgets/store/root-reducer.js +35 -35
- package/widgets/store/store.js +40 -40
- package/widgets/store/widgets-reducer.js +95 -95
- package/widgets/theme-context/js-to-css.js +20 -20
- package/widgets/theme-context/widget.js +130 -130
- package/widgets/view/index.js +31 -31
- package/widgets/widget/index.js +1205 -1205
- package/widgets/widget/utils/connect.js +47 -47
- package/widgets/widget/utils/connectBackend.js +48 -48
- package/widgets/widget/utils/connectWidget.js +31 -31
- package/widgets/widget/utils/manifest.txt +134 -134
- package/widgets/widget/utils/shallowEqualShredder.js +36 -36
- package/widgets/widget/utils/widgets-actions.js +21 -21
- package/widgets/widget/utils/wrapMapStateToProps.js +26 -26
- package/widgets/with-desktop-id/widget.js +20 -20
- package/widgets/with-model/context.js +5 -5
- package/widgets/with-model/widget.js +42 -42
- package/widgets/with-workitem/widget.js +30 -30
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
//T:2019-02-27
|
|
2
|
-
|
|
3
|
-
export default function wrapMapStateToProps(mapStateToProps) {
|
|
4
|
-
if (
|
|
5
|
-
typeof mapStateToProps === 'string' ||
|
|
6
|
-
mapStateToProps instanceof String
|
|
7
|
-
) {
|
|
8
|
-
return (state) => {
|
|
9
|
-
return {
|
|
10
|
-
[mapStateToProps]: state.get(mapStateToProps),
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (typeof mapStateToProps === 'object' && mapStateToProps !== null) {
|
|
16
|
-
return (state) => {
|
|
17
|
-
const props = {};
|
|
18
|
-
Object.keys(mapStateToProps).forEach((key) => {
|
|
19
|
-
props[key] = state.get(mapStateToProps[key]);
|
|
20
|
-
});
|
|
21
|
-
return props;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return mapStateToProps;
|
|
26
|
-
}
|
|
1
|
+
//T:2019-02-27
|
|
2
|
+
|
|
3
|
+
export default function wrapMapStateToProps(mapStateToProps) {
|
|
4
|
+
if (
|
|
5
|
+
typeof mapStateToProps === 'string' ||
|
|
6
|
+
mapStateToProps instanceof String
|
|
7
|
+
) {
|
|
8
|
+
return (state) => {
|
|
9
|
+
return {
|
|
10
|
+
[mapStateToProps]: state.get(mapStateToProps),
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (typeof mapStateToProps === 'object' && mapStateToProps !== null) {
|
|
16
|
+
return (state) => {
|
|
17
|
+
const props = {};
|
|
18
|
+
Object.keys(mapStateToProps).forEach((key) => {
|
|
19
|
+
props[key] = state.get(mapStateToProps[key]);
|
|
20
|
+
});
|
|
21
|
+
return props;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return mapStateToProps;
|
|
26
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import Widget from 'goblin-laboratory/widgets/widget';
|
|
3
|
-
|
|
4
|
-
export default class WithDesktopId extends Widget {
|
|
5
|
-
getChildContext() {
|
|
6
|
-
return {
|
|
7
|
-
desktopId: this.props.desktopId,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
static get childContextTypes() {
|
|
12
|
-
return {
|
|
13
|
-
desktopId: PropTypes.string,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
render() {
|
|
18
|
-
return this.props.children;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import Widget from 'goblin-laboratory/widgets/widget';
|
|
3
|
+
|
|
4
|
+
export default class WithDesktopId extends Widget {
|
|
5
|
+
getChildContext() {
|
|
6
|
+
return {
|
|
7
|
+
desktopId: this.props.desktopId,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static get childContextTypes() {
|
|
12
|
+
return {
|
|
13
|
+
desktopId: PropTypes.string,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
return this.props.children;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const ModelContext = React.createContext();
|
|
4
|
-
|
|
5
|
-
export default ModelContext;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const ModelContext = React.createContext();
|
|
4
|
+
|
|
5
|
+
export default ModelContext;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import Widget from 'goblin-laboratory/widgets/widget';
|
|
4
|
-
import joinModels from '../connect-helpers/join-models';
|
|
5
|
-
import ModelContext from './context';
|
|
6
|
-
|
|
7
|
-
export default class WithModel extends Widget {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
getChildContext() {
|
|
13
|
-
const model = joinModels(this.context.model, this.props.model);
|
|
14
|
-
return {
|
|
15
|
-
model,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
static get childContextTypes() {
|
|
20
|
-
return {
|
|
21
|
-
model: PropTypes.string,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
render() {
|
|
26
|
-
return (
|
|
27
|
-
<ModelContext.Consumer>
|
|
28
|
-
{(modelContext) => {
|
|
29
|
-
const model = joinModels(
|
|
30
|
-
modelContext || this.context.model,
|
|
31
|
-
this.props.model
|
|
32
|
-
);
|
|
33
|
-
return (
|
|
34
|
-
<ModelContext.Provider value={model}>
|
|
35
|
-
{this.props.children}
|
|
36
|
-
</ModelContext.Provider>
|
|
37
|
-
);
|
|
38
|
-
}}
|
|
39
|
-
</ModelContext.Consumer>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import Widget from 'goblin-laboratory/widgets/widget';
|
|
4
|
+
import joinModels from '../connect-helpers/join-models';
|
|
5
|
+
import ModelContext from './context';
|
|
6
|
+
|
|
7
|
+
export default class WithModel extends Widget {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
getChildContext() {
|
|
13
|
+
const model = joinModels(this.context.model, this.props.model);
|
|
14
|
+
return {
|
|
15
|
+
model,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static get childContextTypes() {
|
|
20
|
+
return {
|
|
21
|
+
model: PropTypes.string,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
render() {
|
|
26
|
+
return (
|
|
27
|
+
<ModelContext.Consumer>
|
|
28
|
+
{(modelContext) => {
|
|
29
|
+
const model = joinModels(
|
|
30
|
+
modelContext || this.context.model,
|
|
31
|
+
this.props.model
|
|
32
|
+
);
|
|
33
|
+
return (
|
|
34
|
+
<ModelContext.Provider value={model}>
|
|
35
|
+
{this.props.children}
|
|
36
|
+
</ModelContext.Provider>
|
|
37
|
+
);
|
|
38
|
+
}}
|
|
39
|
+
</ModelContext.Consumer>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import Widget from 'goblin-laboratory/widgets/widget';
|
|
3
|
-
|
|
4
|
-
export default class WithWorkitem extends Widget {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
getChildContext() {
|
|
10
|
-
return {
|
|
11
|
-
readonly: this.props.readonly,
|
|
12
|
-
id: this.props.id,
|
|
13
|
-
entityId: this.props.entityId,
|
|
14
|
-
dragServiceId: this.props.dragServiceId,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static get childContextTypes() {
|
|
19
|
-
return {
|
|
20
|
-
readonly: PropTypes.any,
|
|
21
|
-
id: PropTypes.string,
|
|
22
|
-
entityId: PropTypes.string,
|
|
23
|
-
dragServiceId: PropTypes.string,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
render() {
|
|
28
|
-
return this.props.children;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import Widget from 'goblin-laboratory/widgets/widget';
|
|
3
|
+
|
|
4
|
+
export default class WithWorkitem extends Widget {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
getChildContext() {
|
|
10
|
+
return {
|
|
11
|
+
readonly: this.props.readonly,
|
|
12
|
+
id: this.props.id,
|
|
13
|
+
entityId: this.props.entityId,
|
|
14
|
+
dragServiceId: this.props.dragServiceId,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static get childContextTypes() {
|
|
19
|
+
return {
|
|
20
|
+
readonly: PropTypes.any,
|
|
21
|
+
id: PropTypes.string,
|
|
22
|
+
entityId: PropTypes.string,
|
|
23
|
+
dragServiceId: PropTypes.string,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
render() {
|
|
28
|
+
return this.props.children;
|
|
29
|
+
}
|
|
30
|
+
}
|