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,99 +1,99 @@
1
- import arraysEquals from './arraysEquals.js';
2
-
3
- // Store info for a connected prop
4
- export class ConnectedPropData {
5
- constructor(path, inFunc, outFunc) {
6
- this.path = path;
7
- this.inFunc = inFunc;
8
- this.outFunc = outFunc;
9
- }
10
-
11
- // Comparison for shouldComponentUpdate
12
- equals(o) {
13
- if (!o) {
14
- return false;
15
- }
16
- if (!(o instanceof ConnectedPropData)) {
17
- return false;
18
- }
19
-
20
- if (Array.isArray(o.path)) {
21
- if (!arraysEquals(o.path, this.path)) {
22
- return false;
23
- }
24
- } else {
25
- if (o.path !== this.path) {
26
- return false;
27
- }
28
- }
29
-
30
- if (o.inFunc !== this.inFunc || o.outFunc !== this.outFunc) {
31
- return false;
32
- }
33
-
34
- return true;
35
- }
36
- }
37
-
38
- // This class has only one enumerable property: _connectedProp.
39
- // When using the spread syntax ...C(), it adds _connectedProp to the props.
40
- export class ConnectedProp {
41
- constructor(path, inFunc, outFunc) {
42
- this._connectedProp = new ConnectedPropData(path, inFunc, outFunc);
43
- }
44
-
45
- get path() {
46
- return this._connectedProp.path;
47
- }
48
-
49
- set path(value) {
50
- this._connectedProp.path = value;
51
- }
52
-
53
- get inFunc() {
54
- return this._connectedProp.inFunc;
55
- }
56
-
57
- set inFunc(value) {
58
- this._connectedProp.inFunc = value;
59
- }
60
-
61
- get outFunc() {
62
- return this._connectedProp.outFunc;
63
- }
64
-
65
- set outFunc(value) {
66
- this._connectedProp.outFunc = value;
67
- }
68
-
69
- // Comparison for shouldComponentUpdate
70
- equals(o) {
71
- if (!o) {
72
- return false;
73
- }
74
- if (!(o instanceof ConnectedProp)) {
75
- return false;
76
- }
77
-
78
- if (!this._connectedProp.equals(o._connectedProp)) {
79
- return false;
80
- }
81
-
82
- return true;
83
- }
84
- }
85
-
86
- /**
87
- * Create a connected prop.
88
- *
89
- * See "withC" function for more information.
90
- *
91
- * @param {*} path - A relative or absolute path in the state.
92
- * @param {*} inFunc - Function to modify the value when it is read from the state.
93
- * @param {*} outFunc - Function to modify the value before writing it to the state.
94
- *
95
- * @returns {ConnectedProp} - A connected prop
96
- */
97
- export default function C(path, inFunc, outFunc) {
98
- return new ConnectedProp(path, inFunc, outFunc);
99
- }
1
+ import arraysEquals from './arraysEquals.js';
2
+
3
+ // Store info for a connected prop
4
+ export class ConnectedPropData {
5
+ constructor(path, inFunc, outFunc) {
6
+ this.path = path;
7
+ this.inFunc = inFunc;
8
+ this.outFunc = outFunc;
9
+ }
10
+
11
+ // Comparison for shouldComponentUpdate
12
+ equals(o) {
13
+ if (!o) {
14
+ return false;
15
+ }
16
+ if (!(o instanceof ConnectedPropData)) {
17
+ return false;
18
+ }
19
+
20
+ if (Array.isArray(o.path)) {
21
+ if (!arraysEquals(o.path, this.path)) {
22
+ return false;
23
+ }
24
+ } else {
25
+ if (o.path !== this.path) {
26
+ return false;
27
+ }
28
+ }
29
+
30
+ if (o.inFunc !== this.inFunc || o.outFunc !== this.outFunc) {
31
+ return false;
32
+ }
33
+
34
+ return true;
35
+ }
36
+ }
37
+
38
+ // This class has only one enumerable property: _connectedProp.
39
+ // When using the spread syntax ...C(), it adds _connectedProp to the props.
40
+ export class ConnectedProp {
41
+ constructor(path, inFunc, outFunc) {
42
+ this._connectedProp = new ConnectedPropData(path, inFunc, outFunc);
43
+ }
44
+
45
+ get path() {
46
+ return this._connectedProp.path;
47
+ }
48
+
49
+ set path(value) {
50
+ this._connectedProp.path = value;
51
+ }
52
+
53
+ get inFunc() {
54
+ return this._connectedProp.inFunc;
55
+ }
56
+
57
+ set inFunc(value) {
58
+ this._connectedProp.inFunc = value;
59
+ }
60
+
61
+ get outFunc() {
62
+ return this._connectedProp.outFunc;
63
+ }
64
+
65
+ set outFunc(value) {
66
+ this._connectedProp.outFunc = value;
67
+ }
68
+
69
+ // Comparison for shouldComponentUpdate
70
+ equals(o) {
71
+ if (!o) {
72
+ return false;
73
+ }
74
+ if (!(o instanceof ConnectedProp)) {
75
+ return false;
76
+ }
77
+
78
+ if (!this._connectedProp.equals(o._connectedProp)) {
79
+ return false;
80
+ }
81
+
82
+ return true;
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Create a connected prop.
88
+ *
89
+ * See "withC" function for more information.
90
+ *
91
+ * @param {*} path - A relative or absolute path in the state.
92
+ * @param {*} inFunc - Function to modify the value when it is read from the state.
93
+ * @param {*} outFunc - Function to modify the value before writing it to the state.
94
+ *
95
+ * @returns {ConnectedProp} - A connected prop
96
+ */
97
+ export default function C(path, inFunc, outFunc) {
98
+ return new ConnectedProp(path, inFunc, outFunc);
99
+ }
@@ -1,16 +1,16 @@
1
- export default function joinModels(baseModel, nextModel) {
2
- if (typeof nextModel === 'string') {
3
- // Add nextModel after baseModel if nextModel is relative
4
- if (nextModel.startsWith('.')) {
5
- if (nextModel === '.') {
6
- return baseModel;
7
- }
8
- if (!baseModel) {
9
- return nextModel.substring(1); // Remove '.'
10
- }
11
- return `${baseModel}${nextModel}`;
12
- }
13
- return nextModel;
14
- }
15
- return baseModel;
16
- }
1
+ export default function joinModels(baseModel, nextModel) {
2
+ if (typeof nextModel === 'string') {
3
+ // Add nextModel after baseModel if nextModel is relative
4
+ if (nextModel.startsWith('.')) {
5
+ if (nextModel === '.') {
6
+ return baseModel;
7
+ }
8
+ if (!baseModel) {
9
+ return nextModel.substring(1); // Remove '.'
10
+ }
11
+ return `${baseModel}${nextModel}`;
12
+ }
13
+ return nextModel;
14
+ }
15
+ return baseModel;
16
+ }