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.
Files changed (62) hide show
  1. package/.editorconfig +9 -9
  2. package/.eslintrc.js +28 -28
  3. package/.zou-flow +3 -3
  4. package/README.md +107 -107
  5. package/carnotzet.js +10 -10
  6. package/config.js +13 -13
  7. package/laboratory.js +13 -13
  8. package/lib/.webpack-config.js +53 -53
  9. package/lib/carnotzet.js +118 -118
  10. package/lib/helpers.js +16 -16
  11. package/lib/index.js +66 -66
  12. package/package.json +47 -47
  13. package/widgets/connect-helpers/arrayEquals.js +5 -5
  14. package/widgets/connect-helpers/arraysEquals.js +24 -24
  15. package/widgets/connect-helpers/c.js +99 -99
  16. package/widgets/connect-helpers/join-models.js +16 -16
  17. package/widgets/connect-helpers/with-c.js +276 -276
  18. package/widgets/devtools.js +5 -5
  19. package/widgets/disconnect-overlay/styles.js +50 -50
  20. package/widgets/disconnect-overlay/widget.js +40 -40
  21. package/widgets/fields-view/widget.js +34 -34
  22. package/widgets/form/index.js +79 -79
  23. package/widgets/frame/widget.js +47 -47
  24. package/widgets/frontend-form/reducer.js +18 -18
  25. package/widgets/frontend-form/widget.js +15 -15
  26. package/widgets/importer/default.js +14 -14
  27. package/widgets/importer/importer.js +54 -53
  28. package/widgets/importer/index.js +4 -4
  29. package/widgets/index-browsers.js +195 -195
  30. package/widgets/index-electron-ws.js +153 -153
  31. package/widgets/index-electron.js +69 -69
  32. package/widgets/index.js +1 -1
  33. package/widgets/laboratory/service.js +542 -542
  34. package/widgets/laboratory/widget.js +98 -98
  35. package/widgets/maintenance/styles.js +38 -38
  36. package/widgets/maintenance/widget.js +65 -65
  37. package/widgets/props-binder/widget.js +48 -48
  38. package/widgets/renderer.js +85 -85
  39. package/widgets/root/index.js +54 -54
  40. package/widgets/searchkit/index.js +68 -68
  41. package/widgets/store/backend-reducer.js +116 -116
  42. package/widgets/store/commands-reducer.js +14 -14
  43. package/widgets/store/middlewares.js +171 -171
  44. package/widgets/store/network-reducer.js +23 -23
  45. package/widgets/store/root-reducer.js +35 -35
  46. package/widgets/store/store.js +40 -40
  47. package/widgets/store/widgets-reducer.js +95 -95
  48. package/widgets/theme-context/js-to-css.js +20 -20
  49. package/widgets/theme-context/widget.js +130 -130
  50. package/widgets/view/index.js +31 -31
  51. package/widgets/widget/index.js +1205 -1205
  52. package/widgets/widget/utils/connect.js +47 -47
  53. package/widgets/widget/utils/connectBackend.js +48 -48
  54. package/widgets/widget/utils/connectWidget.js +31 -31
  55. package/widgets/widget/utils/manifest.txt +134 -134
  56. package/widgets/widget/utils/shallowEqualShredder.js +36 -36
  57. package/widgets/widget/utils/widgets-actions.js +21 -21
  58. package/widgets/widget/utils/wrapMapStateToProps.js +26 -26
  59. package/widgets/with-desktop-id/widget.js +20 -20
  60. package/widgets/with-model/context.js +5 -5
  61. package/widgets/with-model/widget.js +42 -42
  62. 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
+ }