glib-web 0.5.77 → 0.5.78

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 (130) hide show
  1. package/README.md +0 -0
  2. package/action.js +167 -167
  3. package/actions/analytics/logEvent.js +0 -0
  4. package/actions/cables/push.js +0 -0
  5. package/actions/dialogs/notification.js +0 -0
  6. package/actions/http/patch.js +0 -0
  7. package/actions/panels/scrollTo.js +18 -18
  8. package/actions/panels/scrollToBottom.js +0 -0
  9. package/actions/timeouts/set.js +20 -20
  10. package/actions/windows/close.js +0 -0
  11. package/actions/windows/closeAll.js +0 -0
  12. package/actions/windows/closeWithReload.js +0 -0
  13. package/actions/windows/refreshState.js +5 -5
  14. package/actions/windows/reload.js +0 -0
  15. package/actions/ws/push.js +0 -0
  16. package/app.vue +180 -180
  17. package/components/_button.vue +101 -101
  18. package/components/_dropdownMenu.vue +76 -76
  19. package/components/_icon.vue +50 -50
  20. package/components/avatar.vue +16 -16
  21. package/components/banners/alert.vue +0 -0
  22. package/components/banners/select.vue +82 -82
  23. package/components/component.vue +222 -222
  24. package/components/fields/_patternText.vue +61 -61
  25. package/components/fields/_select.vue +86 -86
  26. package/components/fields/autocomplete.vue +73 -73
  27. package/components/fields/check.vue +104 -104
  28. package/components/fields/creditCard.vue +0 -0
  29. package/components/fields/dynamicGroup.vue +0 -0
  30. package/components/fields/hidden.vue +0 -0
  31. package/components/fields/location.vue +0 -0
  32. package/components/fields/newRichText.vue +0 -0
  33. package/components/fields/phone/countries.js +315 -315
  34. package/components/fields/phone/field.vue +348 -348
  35. package/components/fields/phone/sprite.css +1071 -1071
  36. package/components/fields/radio.vue +64 -64
  37. package/components/fields/radioGroup.vue +0 -0
  38. package/components/fields/rating.vue +0 -0
  39. package/components/fields/richText.vue +0 -0
  40. package/components/fields/select.vue +17 -17
  41. package/components/fields/stripe/stripeFields.vue +93 -93
  42. package/components/fields/stripe/stripeIndividualFields.vue +207 -207
  43. package/components/fields/stripeExternalAccount.vue +135 -135
  44. package/components/fields/text.vue +0 -0
  45. package/components/fields/textarea.vue +0 -0
  46. package/components/fields/timeZone.vue +22 -22
  47. package/components/fields/timer.vue +83 -83
  48. package/components/h1.vue +28 -28
  49. package/components/h2.vue +20 -20
  50. package/components/h3.vue +22 -22
  51. package/components/h4.vue +20 -20
  52. package/components/h5.vue +20 -20
  53. package/components/h6.vue +20 -20
  54. package/components/icon.vue +25 -25
  55. package/components/label.vue +62 -62
  56. package/components/map.vue +0 -0
  57. package/components/mixins/events.js +178 -178
  58. package/components/mixins/generic.js +0 -0
  59. package/components/mixins/list/autoload.js +0 -0
  60. package/components/mixins/styles.js +221 -221
  61. package/components/mixins/table/autoload.js +0 -0
  62. package/components/mixins/text.js +20 -20
  63. package/components/mixins/ws/actionCable.js +48 -48
  64. package/components/mixins/ws/phoenixSocket.js +0 -0
  65. package/components/panels/carousel.vue +55 -55
  66. package/components/panels/flow.vue +81 -81
  67. package/components/panels/form.vue +126 -126
  68. package/components/panels/list.vue +0 -0
  69. package/components/panels/scroll.vue +0 -0
  70. package/components/panels/table.vue +0 -0
  71. package/components/panels/ul.vue +34 -34
  72. package/components/panels/vertical.vue +0 -0
  73. package/components/panels/web.vue +11 -11
  74. package/components/spacer.vue +0 -0
  75. package/components/switch.vue +42 -42
  76. package/extensions/string.js +21 -21
  77. package/index.js +195 -195
  78. package/nav/content.vue +0 -0
  79. package/nav/dialog.vue +127 -127
  80. package/nav/snackbar.vue +0 -0
  81. package/package.json +42 -42
  82. package/static/plugins/alignment/alignment.js +0 -0
  83. package/static/plugins/alignment/alignment.min.js +0 -0
  84. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  85. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  86. package/static/plugins/blockcode/blockcode.js +0 -0
  87. package/static/plugins/blockcode/blockcode.min.js +0 -0
  88. package/static/plugins/clips/clips.js +0 -0
  89. package/static/plugins/clips/clips.min.js +0 -0
  90. package/static/plugins/counter/counter.js +0 -0
  91. package/static/plugins/counter/counter.min.js +0 -0
  92. package/static/plugins/definedlinks/definedlinks.js +0 -0
  93. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  94. package/static/plugins/handle/handle.js +0 -0
  95. package/static/plugins/handle/handle.min.js +0 -0
  96. package/static/plugins/icons/icons.js +0 -0
  97. package/static/plugins/icons/icons.min.js +0 -0
  98. package/static/plugins/imageposition/imageposition.js +0 -0
  99. package/static/plugins/imageposition/imageposition.min.js +0 -0
  100. package/static/plugins/inlineformat/inlineformat.js +0 -0
  101. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  102. package/static/plugins/removeformat/removeformat.js +0 -0
  103. package/static/plugins/removeformat/removeformat.min.js +0 -0
  104. package/static/plugins/selector/selector.js +0 -0
  105. package/static/plugins/selector/selector.min.js +0 -0
  106. package/static/plugins/specialchars/specialchars.js +0 -0
  107. package/static/plugins/specialchars/specialchars.min.js +0 -0
  108. package/static/plugins/textdirection/textdirection.js +0 -0
  109. package/static/plugins/textdirection/textdirection.min.js +0 -0
  110. package/static/plugins/textexpander/textexpander.js +0 -0
  111. package/static/plugins/textexpander/textexpander.min.js +0 -0
  112. package/static/plugins/underline/underline.js +0 -0
  113. package/static/plugins/underline/underline.min.js +0 -0
  114. package/static/redactorx.css +0 -0
  115. package/static/redactorx.js +0 -0
  116. package/static/redactorx.min.css +0 -0
  117. package/static/redactorx.min.js +0 -0
  118. package/static/redactorx.usm.min.js +0 -0
  119. package/templates/_menu.vue +38 -38
  120. package/templates/comment.vue +202 -202
  121. package/templates/featured.vue +32 -32
  122. package/templates/thumbnail.vue +138 -138
  123. package/templates/unsupported.vue +12 -12
  124. package/utils/app.js +0 -0
  125. package/utils/hash.js +0 -0
  126. package/utils/helper.js +0 -0
  127. package/utils/history.js +70 -70
  128. package/utils/http.js +209 -209
  129. package/utils/launch.js +135 -135
  130. package/utils/private/ws.js +0 -0
@@ -1,221 +1,221 @@
1
- import Hash from "../../utils/hash";
2
- import Vue from "vue";
3
-
4
- var jsonLogic = require("json-logic-js");
5
-
6
- // jsonLogic.add_operation("add_ms", function(a, b) {
7
- // if (Utils.type.isString(a)) {
8
- // const newValue = new Date(new Date(a).getTime() + b * 1000);
9
- // return newValue.toISOString();
10
- // }
11
- // return null;
12
- // });
13
- export default {
14
- data: function() {
15
- return {
16
- _fieldModels: {},
17
- fieldName: null,
18
- fieldModel: null,
19
-
20
- // Some components do not support null or empty string value, so we need to use an intermediary value.
21
- // See https://github.com/vuetifyjs/vuetify/issues/8876
22
- vuetifyEmptyString: "<EMPTY_STRING>"
23
- };
24
- },
25
- computed: {
26
- display() {
27
- const conditions = this.spec.showIf;
28
- if (conditions) {
29
- return jsonLogic.apply(conditions, this.$data._fieldModels)
30
- ? this.$displayValue()
31
- : "none";
32
- } else {
33
- return this.$displayValue();
34
- }
35
- }
36
- },
37
- watch: {
38
- fieldModel: function(val, oldVal) {
39
- if (val === this.vuetifyEmptyString) {
40
- val = "";
41
- }
42
- // Make the field property observable for dynamic showing/hiding
43
- Vue.set(
44
- this.$data._fieldModels,
45
- this.fieldName,
46
- this.$internalizeValue(val)
47
- );
48
-
49
- // this.$saveValue(val);
50
- // Vue.set(this.$data._fieldModels, this.fieldName, val);
51
- }
52
- },
53
- methods: {
54
- // TODO: Deprecated
55
- genericStyles(spec) {
56
- return this.$styles(spec);
57
- },
58
- // NOTE: Styles are dynamic, do not save it in $ready().
59
- $styles(spec) {
60
- const properties = spec || this.spec;
61
- const styles = {
62
- // color: properties.color,
63
- // "background-color": properties.backgroundColor,
64
- // "text-align": properties.textAlign
65
- };
66
-
67
- Utils.type.ifString(properties.color, val => (styles["color"] = val));
68
-
69
- Utils.type.ifString(
70
- properties.backgroundColor,
71
- val => (styles["background-color"] = val)
72
- );
73
-
74
- Utils.type.ifString(
75
- properties.textAlign,
76
- val => (styles["text-align"] = val)
77
- );
78
-
79
- // const padding = properties.padding;
80
- // if (Utils.type.isObject(padding)) {
81
- // Utils.type.ifNumber(
82
- // padding.top,
83
- // top => (styles["padding-top"] = `${top}px`)
84
- // );
85
- // Utils.type.ifNumber(
86
- // padding.bottom,
87
- // bottom => (styles["padding-bottom"] = `${bottom}px`)
88
- // );
89
- // Utils.type.ifNumber(
90
- // padding.left,
91
- // left => (styles["padding-left"] = `${left}px`)
92
- // );
93
- // Utils.type.ifNumber(
94
- // padding.right,
95
- // right => (styles["padding-right"] = `${right}px`)
96
- // );
97
- // }
98
-
99
- Utils.type.ifObject(properties.padding, padding => {
100
- Utils.type.ifNumber(
101
- padding.top,
102
- top => (styles["padding-top"] = `${top}px`)
103
- );
104
- Utils.type.ifNumber(
105
- padding.bottom,
106
- bottom => (styles["padding-bottom"] = `${bottom}px`)
107
- );
108
- Utils.type.ifNumber(
109
- padding.left,
110
- left => (styles["padding-left"] = `${left}px`)
111
- );
112
- Utils.type.ifNumber(
113
- padding.right,
114
- right => (styles["padding-right"] = `${right}px`)
115
- );
116
- });
117
-
118
- Utils.type.ifString(
119
- this.$length(properties.width),
120
- val => (styles["width"] = val)
121
- );
122
- Utils.type.ifString(
123
- this.$length(properties.height),
124
- val => (styles["height"] = val)
125
- );
126
-
127
- Utils.type.ifObject(
128
- properties.onClick,
129
- () => (styles["cursor"] = "pointer")
130
- );
131
-
132
- // This is the main reason styles have to be used in a dynamic way.
133
- this._updateDisplay(styles, properties);
134
-
135
- return new Hash(styles);
136
- },
137
- $length: function(length) {
138
- if (Utils.type.isString(length) || Utils.type.isNumber(length)) {
139
- switch (length) {
140
- case "wrapContent":
141
- return null;
142
- case "matchParent":
143
- return "100%";
144
- default:
145
- return `${length}px`;
146
- }
147
- }
148
- return null;
149
- },
150
- $builtinColor(styleClasses) {
151
- let color = null;
152
- Utils.type.ifArray(styleClasses, classes => {
153
- for (const val of ["success", "info", "warning", "error"]) {
154
- if (classes.remove(val)) {
155
- color = val;
156
- }
157
- }
158
- });
159
- return color;
160
- },
161
- _updateDisplay(styles, properties) {
162
- Utils.type.ifObject(
163
- properties.showIf,
164
- () => (styles["display"] = this.display)
165
- );
166
- Utils.type.ifObject(properties.valueIf, logic => {
167
- const newValue = jsonLogic.apply(logic, this.$data._fieldModels);
168
- this.fieldModel = this._sanitizeValue(this.$externalizeValue(newValue));
169
- });
170
- },
171
- $displayValue() {
172
- return "block"; // To be overridden
173
- },
174
- _sanitizeValue(val) {
175
- return Utils.type.isNotNull(val) ? this.$sanitizeValue(val) : null;
176
- },
177
- $sanitizeValue(val) {
178
- return val; // To be overridden
179
- },
180
- $internalizeValue(val) {
181
- return val;
182
- },
183
- $externalizeValue(val) {
184
- return val;
185
- },
186
- _linkFieldModels() {
187
- const hasCondition = this.spec && this.spec.showIf;
188
- const name = Utils.app.vueName(this);
189
- const isField = name && name.startsWith("fields-");
190
- if (hasCondition || isField) {
191
- const form = this.$closest("panels-form");
192
- if (form != null) {
193
- this.$data._fieldModels = form.$data._fieldModels;
194
- }
195
-
196
- // Has to be executed before $ready(). This executes regardless of whether a form is found because fields
197
- // may be used without a form.
198
- this.fieldName = this.spec.name;
199
- this.fieldModel = this._sanitizeValue(this.spec.value);
200
- }
201
- },
202
- $classes(spec) {
203
- const properties = spec || this.spec;
204
- const componentName = Utils.app.componentName(properties.view);
205
- const classes = (properties.styleClasses || []).concat(componentName);
206
-
207
- Utils.type.ifArray(properties.styleClasses, val => {
208
- if (val.includes("card")) {
209
- classes.push("v-card");
210
- classes.push("v-sheet");
211
- classes.push("theme--light");
212
-
213
- if (val.includes("outlined")) {
214
- classes.push("v-sheet--outlined");
215
- }
216
- }
217
- });
218
- return classes;
219
- }
220
- }
221
- };
1
+ import Hash from "../../utils/hash";
2
+ import Vue from "vue";
3
+
4
+ var jsonLogic = require("json-logic-js");
5
+
6
+ // jsonLogic.add_operation("add_ms", function(a, b) {
7
+ // if (Utils.type.isString(a)) {
8
+ // const newValue = new Date(new Date(a).getTime() + b * 1000);
9
+ // return newValue.toISOString();
10
+ // }
11
+ // return null;
12
+ // });
13
+ export default {
14
+ data: function() {
15
+ return {
16
+ _fieldModels: {},
17
+ fieldName: null,
18
+ fieldModel: null,
19
+
20
+ // Some components do not support null or empty string value, so we need to use an intermediary value.
21
+ // See https://github.com/vuetifyjs/vuetify/issues/8876
22
+ vuetifyEmptyString: "<EMPTY_STRING>"
23
+ };
24
+ },
25
+ computed: {
26
+ display() {
27
+ const conditions = this.spec.showIf;
28
+ if (conditions) {
29
+ return jsonLogic.apply(conditions, this.$data._fieldModels)
30
+ ? this.$displayValue()
31
+ : "none";
32
+ } else {
33
+ return this.$displayValue();
34
+ }
35
+ }
36
+ },
37
+ watch: {
38
+ fieldModel: function(val, oldVal) {
39
+ if (val === this.vuetifyEmptyString) {
40
+ val = "";
41
+ }
42
+ // Make the field property observable for dynamic showing/hiding
43
+ Vue.set(
44
+ this.$data._fieldModels,
45
+ this.fieldName,
46
+ this.$internalizeValue(val)
47
+ );
48
+
49
+ // this.$saveValue(val);
50
+ // Vue.set(this.$data._fieldModels, this.fieldName, val);
51
+ }
52
+ },
53
+ methods: {
54
+ // TODO: Deprecated
55
+ genericStyles(spec) {
56
+ return this.$styles(spec);
57
+ },
58
+ // NOTE: Styles are dynamic, do not save it in $ready().
59
+ $styles(spec) {
60
+ const properties = spec || this.spec;
61
+ const styles = {
62
+ // color: properties.color,
63
+ // "background-color": properties.backgroundColor,
64
+ // "text-align": properties.textAlign
65
+ };
66
+
67
+ Utils.type.ifString(properties.color, val => (styles["color"] = val));
68
+
69
+ Utils.type.ifString(
70
+ properties.backgroundColor,
71
+ val => (styles["background-color"] = val)
72
+ );
73
+
74
+ Utils.type.ifString(
75
+ properties.textAlign,
76
+ val => (styles["text-align"] = val)
77
+ );
78
+
79
+ // const padding = properties.padding;
80
+ // if (Utils.type.isObject(padding)) {
81
+ // Utils.type.ifNumber(
82
+ // padding.top,
83
+ // top => (styles["padding-top"] = `${top}px`)
84
+ // );
85
+ // Utils.type.ifNumber(
86
+ // padding.bottom,
87
+ // bottom => (styles["padding-bottom"] = `${bottom}px`)
88
+ // );
89
+ // Utils.type.ifNumber(
90
+ // padding.left,
91
+ // left => (styles["padding-left"] = `${left}px`)
92
+ // );
93
+ // Utils.type.ifNumber(
94
+ // padding.right,
95
+ // right => (styles["padding-right"] = `${right}px`)
96
+ // );
97
+ // }
98
+
99
+ Utils.type.ifObject(properties.padding, padding => {
100
+ Utils.type.ifNumber(
101
+ padding.top,
102
+ top => (styles["padding-top"] = `${top}px`)
103
+ );
104
+ Utils.type.ifNumber(
105
+ padding.bottom,
106
+ bottom => (styles["padding-bottom"] = `${bottom}px`)
107
+ );
108
+ Utils.type.ifNumber(
109
+ padding.left,
110
+ left => (styles["padding-left"] = `${left}px`)
111
+ );
112
+ Utils.type.ifNumber(
113
+ padding.right,
114
+ right => (styles["padding-right"] = `${right}px`)
115
+ );
116
+ });
117
+
118
+ Utils.type.ifString(
119
+ this.$length(properties.width),
120
+ val => (styles["width"] = val)
121
+ );
122
+ Utils.type.ifString(
123
+ this.$length(properties.height),
124
+ val => (styles["height"] = val)
125
+ );
126
+
127
+ Utils.type.ifObject(
128
+ properties.onClick,
129
+ () => (styles["cursor"] = "pointer")
130
+ );
131
+
132
+ // This is the main reason styles have to be used in a dynamic way.
133
+ this._updateDisplay(styles, properties);
134
+
135
+ return new Hash(styles);
136
+ },
137
+ $length: function(length) {
138
+ if (Utils.type.isString(length) || Utils.type.isNumber(length)) {
139
+ switch (length) {
140
+ case "wrapContent":
141
+ return null;
142
+ case "matchParent":
143
+ return "100%";
144
+ default:
145
+ return `${length}px`;
146
+ }
147
+ }
148
+ return null;
149
+ },
150
+ $builtinColor(styleClasses) {
151
+ let color = null;
152
+ Utils.type.ifArray(styleClasses, classes => {
153
+ for (const val of ["success", "info", "warning", "error"]) {
154
+ if (classes.remove(val)) {
155
+ color = val;
156
+ }
157
+ }
158
+ });
159
+ return color;
160
+ },
161
+ _updateDisplay(styles, properties) {
162
+ Utils.type.ifObject(
163
+ properties.showIf,
164
+ () => (styles["display"] = this.display)
165
+ );
166
+ Utils.type.ifObject(properties.valueIf, logic => {
167
+ const newValue = jsonLogic.apply(logic, this.$data._fieldModels);
168
+ this.fieldModel = this._sanitizeValue(this.$externalizeValue(newValue));
169
+ });
170
+ },
171
+ $displayValue() {
172
+ return "block"; // To be overridden
173
+ },
174
+ _sanitizeValue(val) {
175
+ return Utils.type.isNotNull(val) ? this.$sanitizeValue(val) : null;
176
+ },
177
+ $sanitizeValue(val) {
178
+ return val; // To be overridden
179
+ },
180
+ $internalizeValue(val) {
181
+ return val;
182
+ },
183
+ $externalizeValue(val) {
184
+ return val;
185
+ },
186
+ _linkFieldModels() {
187
+ const hasCondition = this.spec && this.spec.showIf;
188
+ const name = Utils.app.vueName(this);
189
+ const isField = name && name.startsWith("fields-");
190
+ if (hasCondition || isField) {
191
+ const form = this.$closest("panels-form");
192
+ if (form != null) {
193
+ this.$data._fieldModels = form.$data._fieldModels;
194
+ }
195
+
196
+ // Has to be executed before $ready(). This executes regardless of whether a form is found because fields
197
+ // may be used without a form.
198
+ this.fieldName = this.spec.name;
199
+ this.fieldModel = this._sanitizeValue(this.spec.value);
200
+ }
201
+ },
202
+ $classes(spec) {
203
+ const properties = spec || this.spec;
204
+ const componentName = Utils.app.componentName(properties.view);
205
+ const classes = (properties.styleClasses || []).concat(componentName);
206
+
207
+ Utils.type.ifArray(properties.styleClasses, val => {
208
+ if (val.includes("card")) {
209
+ classes.push("v-card");
210
+ classes.push("v-sheet");
211
+ classes.push("theme--light");
212
+
213
+ if (val.includes("outlined")) {
214
+ classes.push("v-sheet--outlined");
215
+ }
216
+ }
217
+ });
218
+ return classes;
219
+ }
220
+ }
221
+ };
File without changes
@@ -1,20 +1,20 @@
1
- export default {
2
- methods: {
3
- textStyles(spec) {
4
- const styles = this.$styles(spec);
5
-
6
- switch (this.spec.textAlign) {
7
- case "center":
8
- styles["text-align"] = "center";
9
- break;
10
- case "right":
11
- styles["text-align"] = "right";
12
- break;
13
- default:
14
- styles["text-align"] = "left";
15
- }
16
-
17
- return styles;
18
- }
19
- }
20
- };
1
+ export default {
2
+ methods: {
3
+ textStyles(spec) {
4
+ const styles = this.$styles(spec);
5
+
6
+ switch (this.spec.textAlign) {
7
+ case "center":
8
+ styles["text-align"] = "center";
9
+ break;
10
+ case "right":
11
+ styles["text-align"] = "right";
12
+ break;
13
+ default:
14
+ styles["text-align"] = "left";
15
+ }
16
+
17
+ return styles;
18
+ }
19
+ }
20
+ };
@@ -1,48 +1,48 @@
1
- import { createConsumer } from "@rails/actioncable";
2
-
3
- const consumer = createConsumer();
4
-
5
- export default {
6
- data: function() {
7
- return {
8
- _wsSocket: null
9
- };
10
- },
11
- methods: {
12
- $wsInitActionCable(spec) {
13
- const component = this;
14
- Utils.type.ifObject(
15
- spec,
16
- ws => {
17
- const channelName = ws.channel;
18
- const subscription = Object.assign({}, ws.params, {
19
- channel: channelName
20
- });
21
-
22
- console.log("Connecting to channel", subscription);
23
-
24
- consumer.subscriptions.create(subscription, {
25
- connected() {
26
- const ws = window.vueApp.actionCable;
27
- ws.channels[channelName] = this;
28
- console.log("Connected to channel", channelName);
29
- },
30
-
31
- disconnected() {},
32
-
33
- received(data) {
34
- const action = data.action;
35
- const payload = { ...action, filterKey: ws.filterKey };
36
- if (ws.filterKey === data.filterKey) {
37
- GLib.action.execute(payload, null, component);
38
- }
39
- }
40
- });
41
- },
42
- () => {
43
- // this._wsDisconnectSocket();
44
- }
45
- );
46
- }
47
- }
48
- };
1
+ import { createConsumer } from "@rails/actioncable";
2
+
3
+ const consumer = createConsumer();
4
+
5
+ export default {
6
+ data: function() {
7
+ return {
8
+ _wsSocket: null
9
+ };
10
+ },
11
+ methods: {
12
+ $wsInitActionCable(spec) {
13
+ const component = this;
14
+ Utils.type.ifObject(
15
+ spec,
16
+ ws => {
17
+ const channelName = ws.channel;
18
+ const subscription = Object.assign({}, ws.params, {
19
+ channel: channelName
20
+ });
21
+
22
+ console.log("Connecting to channel", subscription);
23
+
24
+ consumer.subscriptions.create(subscription, {
25
+ connected() {
26
+ const ws = window.vueApp.actionCable;
27
+ ws.channels[channelName] = this;
28
+ console.log("Connected to channel", channelName);
29
+ },
30
+
31
+ disconnected() {},
32
+
33
+ received(data) {
34
+ const action = data.action;
35
+ const payload = { ...action, filterKey: ws.filterKey };
36
+ if (ws.filterKey === data.filterKey) {
37
+ GLib.action.execute(payload, null, component);
38
+ }
39
+ }
40
+ });
41
+ },
42
+ () => {
43
+ // this._wsDisconnectSocket();
44
+ }
45
+ );
46
+ }
47
+ }
48
+ };
File without changes