spyne 0.14.8 → 0.17.3

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 (88) hide show
  1. package/.travis.yml +2 -2
  2. package/karma.conf.js +27 -20
  3. package/lib/channel-action-filter.test.2418910233.js +20 -0
  4. package/lib/channel-dom.test.1490741340.js +20 -0
  5. package/lib/channel-fetch-util.test.3681936279.js +20 -0
  6. package/lib/channel-fetch.test.380764798.js +20 -0
  7. package/lib/channel-payload-class.test.2325155642.js +20 -0
  8. package/lib/channel-payload-filter.test.1598505124.js +20 -0
  9. package/lib/channel-route.test.921296320.js +20 -0
  10. package/lib/channel-stream-item.test.159699696.js +20 -0
  11. package/lib/channel-ui.test.291129654.js +20 -0
  12. package/lib/channel-util-dom.test.181212370.js +20 -0
  13. package/lib/channel.test.706832124.js +20 -0
  14. package/lib/commons.js +50363 -0
  15. package/lib/dom-el-selectors.test.3296414834.js +20 -0
  16. package/lib/dom-el-template.test.1459850380.js +20 -0
  17. package/lib/dom-el.test.2449130808.js +20 -0
  18. package/lib/frp-tools.test.1620088187.js +20 -0
  19. package/lib/import.test.723835576.js +20 -0
  20. package/lib/index.test.2146503294.js +20 -0
  21. package/lib/plugins-methods.test.3482246428.js +20 -0
  22. package/lib/route-utils.test.2932649409.js +20 -0
  23. package/lib/runtime.js +174 -0
  24. package/lib/spyne-app-properties.test.485192211.js +20 -0
  25. package/lib/spyne-app.test.4150724251.js +20 -0
  26. package/lib/spyne-plugin.test.3993976219.js +20 -0
  27. package/lib/spyne.js +15477 -18467
  28. package/lib/spyne.min.js +2 -12
  29. package/lib/spyne.min.js.LICENSE.txt +10 -0
  30. package/lib/url-utils.test.3668806082.js +20 -0
  31. package/lib/view-stream-broadcaster.test.2534955231.js +20 -0
  32. package/lib/view-stream-enhancer-loader.test.3395418180.js +20 -0
  33. package/lib/view-stream-enhancer.test.1043626253.js +20 -0
  34. package/lib/view-stream.test.1765314964.js +20 -0
  35. package/package.json +37 -65
  36. package/src/spyne/channels/channel-fetch-class.js +24 -1
  37. package/src/spyne/channels/channel-payload-class.js +102 -11
  38. package/src/spyne/channels/channel-proxy.js +6 -4
  39. package/src/spyne/channels/channel.js +66 -6
  40. package/src/spyne/channels/channels-config.js +2 -2
  41. package/src/spyne/channels/{channels-delegator.js → channels-map.js} +37 -21
  42. package/src/spyne/channels/spyne-channel-lifecycle.js +1 -1
  43. package/src/spyne/channels/spyne-channel-route.js +95 -15
  44. package/src/spyne/channels/spyne-channel-ui.js +1 -0
  45. package/src/spyne/channels/spyne-channel-window.js +60 -20
  46. package/src/spyne/spyne-app.js +181 -0
  47. package/src/spyne/spyne-plugins.js +146 -0
  48. package/src/spyne/spyne.js +11 -139
  49. package/src/spyne/utils/channel-fetch-util.js +1 -1
  50. package/src/spyne/utils/channel-payload-filter.js +166 -30
  51. package/src/spyne/utils/frp-tools.js +21 -1
  52. package/src/spyne/utils/mixins/base-streams-mixins.js +1 -0
  53. package/src/spyne/utils/spyne-app-properties.js +213 -0
  54. package/src/spyne/utils/spyne-logger.js +18 -0
  55. package/src/spyne/utils/spyne-plugins-methods.js +105 -0
  56. package/src/spyne/utils/spyne-scroll-lock.js +95 -0
  57. package/src/spyne/utils/spyne-utils-channel-route-url.js +2 -1
  58. package/src/spyne/utils/spyne-utils-channel-route.js +3 -1
  59. package/src/spyne/utils/spyne-utils-channel-window.js +2 -2
  60. package/src/spyne/views/dom-element-template.js +52 -23
  61. package/src/spyne/views/dom-element.js +11 -2
  62. package/src/spyne/views/view-stream-broadcaster.js +3 -3
  63. package/src/spyne/views/view-stream-payload.js +76 -15
  64. package/src/spyne/views/view-stream-selector.js +2 -2
  65. package/src/spyne/views/view-stream.js +219 -115
  66. package/src/tests/channels/channel-fetch.test.js +102 -0
  67. package/src/tests/channels/channel-payload-class.test.js +149 -0
  68. package/src/tests/channels/channel-payload-filter.test.js +298 -0
  69. package/src/tests/channels/channel-route.test.js +76 -1
  70. package/src/tests/channels/channel-stream-item.test.js +3 -2
  71. package/src/tests/channels/channel.test.js +38 -0
  72. package/src/tests/channels/route-utils.test.js +1 -1
  73. package/src/tests/index.js +0 -1
  74. package/src/tests/index.test.js +6 -0
  75. package/src/tests/mocks/channel-payload-data.js +93 -1
  76. package/src/tests/mocks/msf-user-data-small.json +4103 -0
  77. package/src/tests/mocks/msf-user-data.json +47035 -0
  78. package/src/tests/mocks/utils-data.js +20 -2
  79. package/src/tests/spyne-app.test.js +27 -0
  80. package/src/tests/spyne-plugin.test.js +49 -0
  81. package/src/tests/utils/channel-action-filter.test.js +22 -11
  82. package/src/tests/utils/channel-data-packet-generator.unused.js +119 -0
  83. package/src/tests/utils/plugins-methods.test.js +103 -0
  84. package/src/tests/utils/spyne-app-properties.test.js +11 -0
  85. package/src/tests/views/dom-el-selectors.test.js +1 -1
  86. package/webpack.config.js +30 -15
  87. package/lib/spyne.js.map +0 -1
  88. package/src/spyne/utils/viewstream-dom-utils.js +0 -8
@@ -0,0 +1,95 @@
1
+ export class SpyneScrollLock {
2
+
3
+ /**
4
+ * @module SpyneScrollLock
5
+ * @type core
6
+ * @desc
7
+ * Channel Window utility that handles locking body scroll.
8
+ *
9
+ * @constructor
10
+ * @param {Number} x - = 0; Window scroll X position.
11
+ * @param {Number} y - = 0; Window scroll Y position.
12
+ *
13
+ */
14
+
15
+
16
+ constructor(x=window.scrollX,y=window.scrollY) {
17
+ this.scrollX = x;
18
+ this.scrollY = y;
19
+ this.scrollLocked = false;
20
+ this.scrollElement = undefined;
21
+ this.defaultScrollState = SpyneScrollLock.getDefaultScrollState();
22
+ /**
23
+ * TODO: GET IOS BOOL -- check window height in IOS and adjust
24
+ *
25
+ *
26
+ * */
27
+
28
+
29
+ }
30
+
31
+ static getDefaultOverflow(){
32
+ return window.getComputedStyle(document.body)['overflow'];
33
+ }
34
+
35
+ static getDefaultPosition(){
36
+ return window.getComputedStyle(document.body)['position'];
37
+
38
+ }
39
+
40
+ static getDefaultTop(){
41
+ return window.getComputedStyle(document.body)['top'];
42
+
43
+ }
44
+
45
+ static getDefaultBodyTop(){
46
+ return window.getComputedStyle(document.body)['top'];
47
+
48
+ }
49
+
50
+ static getDefaultScrollState(){
51
+ return {
52
+ position: SpyneScrollLock.getDefaultPosition(),
53
+ overflow: SpyneScrollLock.getDefaultOverflow(),
54
+ top: SpyneScrollLock.getDefaultTop(),
55
+ x: window.scrollX,
56
+ y: window.scrollY
57
+ }
58
+ }
59
+
60
+
61
+
62
+
63
+ disableBodyScroll(){
64
+
65
+
66
+ // this.defaultBodyOverflow = SpyneScrollLock.getDefaultOverflow();
67
+ this.defaultScrollState = SpyneScrollLock.getDefaultScrollState();
68
+ const {y} = this.defaultScrollState;
69
+ const bodyTopPos = `${y*-1}px`;
70
+
71
+ //console.log('disable body scroll ', this.defaultScrollState, bodyTopPos)
72
+ document.body.style.overflow = 'hidden';
73
+ document.body.style.position = 'fixed';
74
+ document.body.style.top = bodyTopPos;
75
+
76
+
77
+
78
+ }
79
+
80
+ enableBodyScroll(){
81
+ const {position, overflow, top, x, y} = this.defaultScrollState;
82
+
83
+ //console.log('Enable body scroll ', this.defaultScrollState)
84
+
85
+ document.body.style.overflow = overflow;
86
+ document.body.style.position = position;
87
+ document.body.style.top = top;
88
+ window.scrollTo(x,y);
89
+
90
+ }
91
+
92
+
93
+
94
+
95
+ }
@@ -1,4 +1,5 @@
1
1
  import {isEmpty, head, values, compose, prop, complement, isNil, allPass, reduce, filter, equals, toPairs, replace, either, propEq, __,invert,path,zipObj, reject, keys, find, assoc, is,has, when, split, always, concat, join, flatten, map, ifElse, test, findLastIndex,last, defaultTo,fromPairs } from 'ramda';
2
+ import {SpyneAppProperties} from './spyne-app-properties';
2
3
 
3
4
  export class SpyneUtilsChannelRouteUrl {
4
5
  constructor() {
@@ -163,7 +164,7 @@ export class SpyneUtilsChannelRouteUrl {
163
164
  return map(mapUrlProps, urlsArr);
164
165
  }
165
166
 
166
- static convertParamsToRoute(data, r = window.Spyne.config.channels.ROUTE, t, locStr) {
167
+ static convertParamsToRoute(data, r = SpyneAppProperties.config.channels.ROUTE, t, locStr) {
167
168
  const urlType = t !== undefined ? t : r.type;
168
169
  const isHash = r.isHash;
169
170
  let route = r.routes.routePath;
@@ -129,7 +129,9 @@ export class SpyneUtilsChannelRoute {
129
129
  const [key, val] = arrPair;
130
130
  const isObject = is(Object, val);
131
131
 
132
- const getLinkText = str => test(isValidStrRE, str) ? String(str).toUpperCase() : key;
132
+ const createTitle = (str)=>String(str).replace(/([-_])/g, " ").toUpperCase();
133
+
134
+ const getLinkText = str => test(isValidStrRE, str) ? createTitle(str) : key;
133
135
 
134
136
  if (key === 'routeName' || key === '404'){
135
137
  return acc;
@@ -1,4 +1,4 @@
1
- import { fromEventPattern } from 'rxjs';
1
+ import { fromEventPattern, fromEvent } from 'rxjs';
2
2
  import { map } from 'rxjs/operators';
3
3
  import {mapObjIndexed} from 'ramda';
4
4
 
@@ -66,7 +66,7 @@ export class SpyneUtilsChannelWindow {
66
66
  }
67
67
 
68
68
  static createMergedObsFromObj(config) {
69
- let mediaQueriesObj = config.mediqQueries;
69
+ let mediaQueriesObj = config.mediaQueries || config.mediqQueries;
70
70
  let arr = [];
71
71
 
72
72
  const loopQueries = (val, key, obj) => {
@@ -136,6 +136,9 @@ export class DomElementTemplate {
136
136
  constructor(template, data) {
137
137
  this.template = this.formatTemplate(template);
138
138
 
139
+ //const tempL = `template-${Math.floor(Math.random()*99999)}`
140
+ // this.tempL=tempL
141
+
139
142
  const checkForArrayData = ()=>{
140
143
  if (is(Array, data) === true) {
141
144
  data = {spyneData:data};
@@ -144,19 +147,21 @@ export class DomElementTemplate {
144
147
  }
145
148
  };
146
149
 
147
- checkForArrayData();
148
150
 
151
+ checkForArrayData();
149
152
 
150
153
  this.templateData = data;
151
154
 
155
+
152
156
  let strArr = DomElementTemplate.getStringArray(this.template);
153
157
 
158
+
154
159
  let strMatches = this.template.match(DomElementTemplate.findTmplLoopsRE());
155
160
  strMatches = strMatches === null ? [] : strMatches;
156
161
 
157
- const mapTmplLoop = (str, data) => str.replace(
158
- DomElementTemplate.parseTmplLoopsRE(),
159
- this.parseTheTmplLoop.bind(this));
162
+ const parseTmplLoopsRE = DomElementTemplate.parseTmplLoopsRE();
163
+ const parseTmplLoopFn = this.parseTheTmplLoop.bind(this);
164
+ const mapTmplLoop = (str, data) => str.replace(parseTmplLoopsRE, parseTmplLoopFn);
160
165
  const findTmplLoopsPred = includes(__, strMatches);
161
166
 
162
167
  const checkForMatches = ifElse(
@@ -165,6 +170,7 @@ export class DomElementTemplate {
165
170
  this.addParams.bind(this));
166
171
 
167
172
  this.finalArr = strArr.map(checkForMatches);
173
+
168
174
  }
169
175
 
170
176
  static getStringArray(template) {
@@ -197,11 +203,24 @@ export class DomElementTemplate {
197
203
  *
198
204
  * @desc Returns a document fragment generated from the template and any added data.
199
205
  */
206
+
207
+
200
208
  renderDocFrag() {
209
+
210
+
201
211
  const html = this.finalArr.join('');
202
- const el = document.createRange().createContextualFragment(html);
203
- window.setTimeout(this.removeThis(), 10);
212
+ const isTableSubTag = /^([^>]*?)(<){1}(\b)(thead|col|colgroup|tbody|td|tfoot|tr|th)(\b)([^\0]*)$/.test(html);
213
+ const el = isTableSubTag ? html : document.createRange().createContextualFragment(html);
214
+
215
+ window.setTimeout(this.removeThis(), 2);
204
216
  return el;
217
+
218
+ }
219
+
220
+ renderToString(){
221
+ const html = this.finalArr.join('');
222
+ window.setTimeout(this.removeThis(), 2);
223
+ return html;
205
224
  }
206
225
 
207
226
  getTemplateString() {
@@ -210,21 +229,33 @@ export class DomElementTemplate {
210
229
 
211
230
  formatTemplate(template) {
212
231
  return prop('nodeName', template)==='SCRIPT' ? template.innerHTML : template;
232
+ }
213
233
 
214
- // return typeof (template) === 'string' ? template : template.text;
234
+ getDataValFromPathStr(pathStr, dataFile){
235
+ const pathArr = String(pathStr).split('.');
236
+ const pathData = path(pathArr, dataFile);
237
+ return pathData || '';
215
238
  }
216
239
 
217
240
  addParams(str) {
241
+ //console.time(this.tempL+'9')
242
+ const re = /(\.)/gm;
243
+
218
244
  const replaceTags = (str, p1, p2, p3) => {
219
- let dataVal = compose(path(__, this.templateData), split('.'))(p2);
220
- let defaultIsEmptyStr = defaultTo('');
221
- return defaultIsEmptyStr(dataVal);
245
+ if (re.test(p2) === false && this.templateData[p2] !==undefined){
246
+ return this.templateData[p2];
247
+ }
248
+ return this.getDataValFromPathStr(p2, this.templateData);
222
249
  };
223
250
 
224
- return str.replace(DomElementTemplate.swapParamsForTagsRE(), replaceTags);
251
+ return str.replace(DomElementTemplate.swapParamsForTagsRE(), replaceTags);
252
+
225
253
  }
226
254
 
227
255
  parseTheTmplLoop(str, p1, p2, p3) {
256
+
257
+ //console.time(this.tempL+'5b')
258
+ const reDot = /(\.)/gm;
228
259
  const subStr = p3;
229
260
  let elData = this.templateData[p2];
230
261
  const parseString = (item, str) => {
@@ -233,22 +264,17 @@ export class DomElementTemplate {
233
264
  const parseObject = (obj, str) => {
234
265
  const loopObj = (str, p1, p2) => {
235
266
  // DOT SYNTAX CHECK
236
- return compose(path(__, obj), split('.'))(p2);
267
+ if (reDot.test(p2) === false && obj[p2] !==undefined) {
268
+ return obj[p2]
269
+ }
270
+
271
+ return this.getDataValFromPathStr(p2, obj);
237
272
  };
238
273
  return str.replace(DomElementTemplate.swapParamsForTagsRE(), loopObj);
239
274
  };
240
- const mapStringData = (d) => {
241
- if (typeof (d) === 'string') {
242
- //console.log("MAP STR 1 ",{d, subStr});
275
+ const mapStringData = (d) => typeof(d) === 'string' ? parseString(d, subStr) : parseObject(d, subStr);
243
276
 
244
- d = parseString(d, subStr);
245
- // console.log("MAP STR 2",{d, subStr});
246
277
 
247
- } else {
248
- d = parseObject(d, subStr);
249
- }
250
- return d;
251
- };
252
278
  if (isNil(elData) === true || isEmpty(elData)) {
253
279
  return '';
254
280
  }
@@ -256,6 +282,9 @@ export class DomElementTemplate {
256
282
  if (elData.length===undefined) {
257
283
  elData = [elData];
258
284
  }
259
- return elData.map(mapStringData).join('');
285
+
286
+ return elData.map(mapStringData).join('');
287
+
288
+
260
289
  }
261
290
  }
@@ -97,9 +97,9 @@ class DomElement {
97
97
  let addTmpl = (template) => {
98
98
  let data = this.getProp('data');
99
99
  data = is(Object, data) ? data : {};
100
-
101
100
  let frag = new DomElementTemplate(template, data).renderDocFrag();
102
- el.appendChild(frag);
101
+ const fragIsString = is(String, frag);
102
+ fragIsString ? el.innerHTML = frag : el.appendChild(frag);
103
103
  return el;
104
104
  };
105
105
  let doNothing = (el) => el;
@@ -143,6 +143,15 @@ class DomElement {
143
143
  return this.getProp('el');
144
144
  }
145
145
 
146
+ renderToHTMLString() {
147
+ this.execute();
148
+ this.props.template = undefined;
149
+ this.props.data = undefined;
150
+ this.props.attributes = undefined;
151
+ return this.getProp('el').outerHTML;
152
+ }
153
+
154
+
146
155
  returnIfDefined(obj, val) {
147
156
  if (val !== undefined) {
148
157
  let isObj = typeof (val) === 'undefined';
@@ -1,6 +1,6 @@
1
1
  import { baseStreamsMixins } from '../utils/mixins/base-streams-mixins';
2
2
  import { convertDomStringMapToObj } from '../utils/frp-tools';
3
-
3
+ import {SpyneAppProperties} from '../utils/spyne-app-properties';
4
4
  import { fromEvent } from 'rxjs';
5
5
  import { map } from 'rxjs/operators';
6
6
  import {clone, omit, path} from 'ramda';
@@ -99,10 +99,10 @@ export class ViewStreamBroadcaster {
99
99
  // run payload
100
100
  channelPayload(observable, data);
101
101
  };
102
- let isDevMode = path(['Spyne', 'config', 'debug'], window) === true;
102
+ let isDevMode = SpyneAppProperties.debug === true;
103
103
  let queryIsNil = query === undefined || query.length <= 0;
104
104
  if (queryIsNil === true && isDevMode === true) {
105
- console.warn(`Spyne Warning: The item ${selector}, does not appear to exist!`);
105
+ console.warn(`Spyne Warning: The item ${selector}, does not appear to exist in ${this.props.name} --> vsid:${this.props.vsid}!`);
106
106
  // query = this.props.el;
107
107
  // addObservable(query, event);
108
108
  } else {
@@ -1,6 +1,15 @@
1
1
  import { uiValidations } from '../channels/channels-config';
2
- import { validate } from '../utils/channel-config-validator';
2
+ import {SpyneAppProperties} from '../utils/spyne-app-properties';
3
+ //import { validate } from '../utils/channel-config-validator';
3
4
  import { gc } from '../utils/gc';
5
+ import {
6
+ compose,
7
+ clone,
8
+ fromPairs,
9
+ toPairs,
10
+ __,
11
+ lte, defaultTo, prop, is,
12
+ } from 'ramda';
4
13
 
5
14
  export class ViewStreamPayload {
6
15
  /**
@@ -18,40 +27,47 @@ export class ViewStreamPayload {
18
27
  * @param {Boolean} debug
19
28
  */
20
29
  constructor(name, observable, data, action = 'subscribe', debug = false) {
21
- this.addMixins();
22
- this.options = {
30
+ //this.addMixins();
31
+ const options = {
23
32
  'name' : name,
24
33
  'observable': observable,
25
34
  'data': data,
26
35
  'action': action
27
36
  };
28
- this.getValidationChecks(name);
37
+ // this.getValidationChecks(name);
38
+ this.sendToDirectorStream(options);
29
39
  }
30
- getValidationChecks(n) {
40
+ /* getValidationChecks(n) {
31
41
  let left = e => console.warn(e);
32
42
  let right = val => this.onRunValidations(val);
33
- const channelMap = window.Spyne.channels.map;
34
- if (channelMap.has(n) === true) {
43
+ let channelExists = SpyneAppProperties.channelsMap.testStream(n);
44
+ if (channelExists === true) {
35
45
  return right(uiValidations);
36
46
  } else {
37
47
  return left('payload Needs a Valid Stream Name!');//
38
48
  }
39
49
  }
40
50
  onRunValidations(checks) {
41
- validate(checks(), this.options).fold(
51
+ /!*validate(checks(), this.options).fold(
42
52
  this.onError.bind(this),
43
- this.onSuccess.bind(this));
53
+ this.onSuccess.bind(this));*!/
44
54
  }
45
55
  onPayloadValidated(p) {
46
56
  this.sendToDirectorStream(p);
47
- }
57
+ }*/
48
58
  sendToDirectorStream(payload) {
49
- let streamsController = window.Spyne.channels;// getGlobalParam('streamsController');
50
- let directorStream$ = streamsController.getStream('DISPATCHER');
51
- // console.log('payload is ',payload);
52
- directorStream$.next(payload);
53
- this.gc();
59
+ let directorStream$ = SpyneAppProperties.channelsMap.getStream('DISPATCHER');
60
+ const frozenPayload = ViewStreamPayload.deepClone(payload);
61
+ //console.log('payload is ',frozenPayload);
62
+ directorStream$.next(frozenPayload);
63
+ payload = undefined;
64
+
65
+ //this.gc();
66
+ //console.timeEnd(label);
67
+
68
+ delete this;
54
69
  }
70
+ /*
55
71
  onError(errors) {
56
72
  console.warn('payload failed due to:\n' + errors.map(e => '* ' + e).join('\n'));
57
73
  this.gc();
@@ -59,6 +75,51 @@ export class ViewStreamPayload {
59
75
  onSuccess(payload) {
60
76
  this.onPayloadValidated(payload);
61
77
  }
78
+ */
79
+
80
+ static deepClone(o) {
81
+ const isArr = is(Array);
82
+ const isObj = is(Object);
83
+ const isIter = ob => isArr(ob)===false && isObj(ob)===true;
84
+ const isIterable = isIter(o);
85
+ return isIterable ? compose(fromPairs, toPairs, clone)(o) : clone(o);
86
+
87
+ }
88
+
89
+
90
+
91
+ static deepFreeze(o) {
92
+ //return o;
93
+ //return Object.freeze(o);
94
+ const elIsDomElement = compose(lte(0), defaultTo(-1), prop('nodeType'));
95
+
96
+ try {
97
+ Object.freeze(o);
98
+ Object.getOwnPropertyNames(o).forEach(function(prop) {
99
+ if (o.hasOwnProperty(prop)
100
+ && elIsDomElement(o[prop]) === false
101
+ && o[prop] !== null
102
+ && (typeof o[prop] === "object" || typeof o[prop] === "function")
103
+ && !Object.isFrozen(o[prop])) {
104
+ ChannelPayload.deepFreeze(o[prop]);
105
+ }
106
+ });
107
+
108
+ } catch(e){
109
+ //console.log("FREEZE ERR ",{o,e});
110
+ return o;
111
+
112
+ }
113
+
114
+ return o;
115
+ }
116
+
117
+ static getMouseEventKeys() {
118
+ return ['altKey', 'bubbles', 'cancelBubble', 'cancelable', 'clientX', 'clientY', 'composed', 'ctrlKey', 'currentTarget', 'defaultPrevented', 'detail', 'eventPhase', 'fromElement', 'isTrusted', 'layerX', 'layerY', 'metaKey', 'movementX', 'movementY', 'offsetX', 'offsetY', 'pageX', 'pageY', 'path', 'relatedTarget', 'returnValue', 'screenX', 'screenY', 'shiftKey', 'sourceCapabilities', 'srcElement', 'target', 'timeStamp', 'toElement', 'type', 'view', 'which', 'x', 'y'];
119
+ }
120
+
121
+
122
+
62
123
  addMixins() {
63
124
  // ==================================
64
125
  // BASE CORE MIXINS
@@ -1,5 +1,5 @@
1
1
  import {head, compose, reject, split, isEmpty, path, lte, defaultTo, prop} from 'ramda';
2
-
2
+ import {SpyneAppProperties} from '../utils/spyne-app-properties';
3
3
 
4
4
  function generateSpyneSelectorId(el) {
5
5
  //const num = () => Math.floor(Math.random(10000000) * 10000000);
@@ -15,7 +15,7 @@ function generateSpyneSelectorId(el) {
15
15
  }
16
16
 
17
17
  function isDevMode(){
18
- return path(['Spyne', 'config', 'debug'], window) === true;
18
+ return SpyneAppProperties.debug === true;
19
19
  }
20
20
 
21
21