boomack 0.12.0 → 0.13.0

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 (159) hide show
  1. package/client/public/css/main.css +2 -0
  2. package/client/public/js/client.js +40 -44
  3. package/client/themes/blue-night/properties.json +1 -0
  4. package/client/themes/blue-night/{semantic.min.css → semantic.full.min.css} +403 -403
  5. package/client/themes/blue-night/semantic.full.min.js +11 -0
  6. package/client/themes/blue-night/semantic.slim.min.css +99 -0
  7. package/client/themes/blue-night/semantic.slim.min.js +11 -0
  8. package/client/themes/dark/properties.json +1 -0
  9. package/client/themes/dark/{semantic.min.css → semantic.full.min.css} +403 -403
  10. package/client/themes/dark/semantic.full.min.js +11 -0
  11. package/client/themes/dark/semantic.slim.min.css +99 -0
  12. package/client/themes/dark/semantic.slim.min.js +11 -0
  13. package/client/themes/default/properties.json +1 -0
  14. package/client/themes/default/{semantic.min.css → semantic.full.min.css} +403 -403
  15. package/client/themes/default/semantic.full.min.js +11 -0
  16. package/client/themes/default/semantic.slim.min.css +99 -0
  17. package/client/themes/default/semantic.slim.min.js +11 -0
  18. package/client/themes/green-night/properties.json +1 -0
  19. package/client/themes/green-night/{semantic.min.css → semantic.full.min.css} +403 -403
  20. package/client/themes/green-night/semantic.full.min.js +11 -0
  21. package/client/themes/green-night/semantic.slim.min.css +99 -0
  22. package/client/themes/green-night/semantic.slim.min.js +11 -0
  23. package/client/themes/iron/properties.json +1 -0
  24. package/client/themes/iron/{semantic.min.css → semantic.full.min.css} +403 -403
  25. package/client/themes/iron/semantic.full.min.js +11 -0
  26. package/client/themes/iron/semantic.slim.min.css +99 -0
  27. package/client/themes/iron/semantic.slim.min.js +11 -0
  28. package/client/themes/red-night/properties.json +1 -0
  29. package/client/themes/red-night/{semantic.min.css → semantic.full.min.css} +403 -403
  30. package/client/themes/red-night/semantic.full.min.js +11 -0
  31. package/client/themes/red-night/semantic.slim.min.css +99 -0
  32. package/client/themes/red-night/semantic.slim.min.js +11 -0
  33. package/client/themes/science/properties.json +1 -0
  34. package/client/themes/science/{semantic.min.css → semantic.full.min.css} +403 -403
  35. package/client/themes/science/semantic.full.min.js +11 -0
  36. package/client/themes/science/semantic.slim.min.css +99 -0
  37. package/client/themes/science/semantic.slim.min.js +11 -0
  38. package/client/vendor/fonts/brand-icons.svg +3570 -3570
  39. package/client/vendor/fonts/icons.svg +4938 -4938
  40. package/client/vendor/fonts/outline-icons.svg +803 -803
  41. package/client/vendor/js/jquery.min.js +2 -2
  42. package/client/views/parts/head.ejs +2 -2
  43. package/client/views/parts/slot.ejs +6 -1
  44. package/default-config.yaml +7 -3
  45. package/package.json +3 -8
  46. package/server-build/index.js +9 -6
  47. package/server-build/middleware/data-parser.js +2 -2
  48. package/server-build/model/display-request.js +17 -0
  49. package/server-build/model/layout.js +3 -0
  50. package/server-build/model/layout.test.js +4 -0
  51. package/server-build/pipeline/format.js +9 -6
  52. package/server-build/pipeline/load.js +0 -1
  53. package/server-build/pipeline/render.js +14 -3
  54. package/server-build/pipeline/store.js +0 -1
  55. package/server-build/pipeline.js +24 -10
  56. package/server-build/pipeline.test.js +5 -2
  57. package/server-build/plugins/csv.js +15 -8
  58. package/server-build/plugins/dev.js +1 -0
  59. package/server-build/plugins/highlight.js +7 -28
  60. package/server-build/plugins/highlight.types.js +124 -0
  61. package/server-build/plugins/http.js +1 -1
  62. package/server-build/plugins/markdown.js +5 -4
  63. package/server-build/plugins/network.js +1 -0
  64. package/server-build/plugins/shell.js +8 -0
  65. package/server-build/plugins/tcp.js +141 -0
  66. package/server-build/plugins/udp.js +22 -36
  67. package/server-build/routes/export.js +12 -0
  68. package/server-build/routes/media-types.js +4 -1
  69. package/server-build/routes/panels.js +2 -0
  70. package/server-build/routes/web-client.js +34 -7
  71. package/server-build/service/config.js +71 -3
  72. package/server-build/service/panels.js +43 -18
  73. package/server-build/service/payload-encoding.js +29 -0
  74. package/server-build/service/persistence.js +9 -1
  75. package/server-build/service/resources.js +11 -0
  76. package/server-build/service/response-messages.js +1 -0
  77. package/server-build/typedefs.js +1 -0
  78. package/server-build/utils.js +17 -5
  79. package/server-build/utils.test.js +10 -4
  80. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-300.woff +0 -0
  81. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-300.woff2 +0 -0
  82. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-300italic.woff +0 -0
  83. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-300italic.woff2 +0 -0
  84. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-700.woff +0 -0
  85. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-700.woff2 +0 -0
  86. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-700italic.woff +0 -0
  87. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-700italic.woff2 +0 -0
  88. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-italic.woff +0 -0
  89. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-italic.woff2 +0 -0
  90. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-regular.woff +0 -0
  91. package/client/themes/blue-night/fonts/lato-v16-latin-ext_latin-regular.woff2 +0 -0
  92. package/client/themes/blue-night/fonts/signika-v10-latin-ext_latin-600.woff +0 -0
  93. package/client/themes/blue-night/fonts/signika-v10-latin-ext_latin-600.woff2 +0 -0
  94. package/client/themes/blue-night/fonts/signika-v10-latin-ext_latin-700.woff +0 -0
  95. package/client/themes/blue-night/fonts/signika-v10-latin-ext_latin-700.woff2 +0 -0
  96. package/client/themes/blue-night/fonts/signika-v10-latin-ext_latin-regular.woff +0 -0
  97. package/client/themes/blue-night/fonts/signika-v10-latin-ext_latin-regular.woff2 +0 -0
  98. package/client/themes/blue-night/semantic.min.js +0 -11
  99. package/client/themes/dark/semantic.min.js +0 -11
  100. package/client/themes/default/semantic.min.js +0 -11
  101. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-300.woff +0 -0
  102. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-300.woff2 +0 -0
  103. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-300italic.woff +0 -0
  104. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-300italic.woff2 +0 -0
  105. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-700.woff +0 -0
  106. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-700.woff2 +0 -0
  107. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-700italic.woff +0 -0
  108. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-700italic.woff2 +0 -0
  109. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-italic.woff +0 -0
  110. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-italic.woff2 +0 -0
  111. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-regular.woff +0 -0
  112. package/client/themes/green-night/fonts/lato-v16-latin-ext_latin-regular.woff2 +0 -0
  113. package/client/themes/green-night/fonts/signika-v10-latin-ext_latin-600.woff +0 -0
  114. package/client/themes/green-night/fonts/signika-v10-latin-ext_latin-600.woff2 +0 -0
  115. package/client/themes/green-night/fonts/signika-v10-latin-ext_latin-700.woff +0 -0
  116. package/client/themes/green-night/fonts/signika-v10-latin-ext_latin-700.woff2 +0 -0
  117. package/client/themes/green-night/fonts/signika-v10-latin-ext_latin-regular.woff +0 -0
  118. package/client/themes/green-night/fonts/signika-v10-latin-ext_latin-regular.woff2 +0 -0
  119. package/client/themes/green-night/semantic.min.js +0 -11
  120. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-300.woff +0 -0
  121. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-300.woff2 +0 -0
  122. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-300italic.woff +0 -0
  123. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-300italic.woff2 +0 -0
  124. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-700.woff +0 -0
  125. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-700.woff2 +0 -0
  126. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-700italic.woff +0 -0
  127. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-700italic.woff2 +0 -0
  128. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-italic.woff +0 -0
  129. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-italic.woff2 +0 -0
  130. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-regular.woff +0 -0
  131. package/client/themes/iron/fonts/lato-v16-latin-ext_latin-regular.woff2 +0 -0
  132. package/client/themes/iron/fonts/signika-v10-latin-ext_latin-600.woff +0 -0
  133. package/client/themes/iron/fonts/signika-v10-latin-ext_latin-600.woff2 +0 -0
  134. package/client/themes/iron/fonts/signika-v10-latin-ext_latin-700.woff +0 -0
  135. package/client/themes/iron/fonts/signika-v10-latin-ext_latin-700.woff2 +0 -0
  136. package/client/themes/iron/fonts/signika-v10-latin-ext_latin-regular.woff +0 -0
  137. package/client/themes/iron/fonts/signika-v10-latin-ext_latin-regular.woff2 +0 -0
  138. package/client/themes/iron/semantic.min.js +0 -11
  139. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-300.woff +0 -0
  140. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-300.woff2 +0 -0
  141. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-300italic.woff +0 -0
  142. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-300italic.woff2 +0 -0
  143. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-700.woff +0 -0
  144. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-700.woff2 +0 -0
  145. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-700italic.woff +0 -0
  146. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-700italic.woff2 +0 -0
  147. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-italic.woff +0 -0
  148. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-italic.woff2 +0 -0
  149. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-regular.woff +0 -0
  150. package/client/themes/red-night/fonts/lato-v16-latin-ext_latin-regular.woff2 +0 -0
  151. package/client/themes/red-night/fonts/signika-v10-latin-ext_latin-600.woff +0 -0
  152. package/client/themes/red-night/fonts/signika-v10-latin-ext_latin-600.woff2 +0 -0
  153. package/client/themes/red-night/fonts/signika-v10-latin-ext_latin-700.woff +0 -0
  154. package/client/themes/red-night/fonts/signika-v10-latin-ext_latin-700.woff2 +0 -0
  155. package/client/themes/red-night/fonts/signika-v10-latin-ext_latin-regular.woff +0 -0
  156. package/client/themes/red-night/fonts/signika-v10-latin-ext_latin-regular.woff2 +0 -0
  157. package/client/themes/red-night/semantic.min.js +0 -11
  158. package/client/themes/science/semantic.min.js +0 -11
  159. package/client/vendor/js/semantic.min.js +0 -11
@@ -386,10 +386,12 @@ iframe.isolated-slot-content {
386
386
  }
387
387
  .slot.content-scale .slot-content {
388
388
  width: 100%;
389
+ overflow-x: hidden;
389
390
  height: auto;
390
391
  }
391
392
  .layout-grid .slot.content-scale .slot-content {
392
393
  height: 100%;
394
+ overflow-y: hidden;
393
395
  }
394
396
  .slot.content-scale .slot-content > img,
395
397
  .slot.content-scale .slot-content > video
@@ -188,7 +188,7 @@ window.boomack = window.boomack || {};
188
188
  } catch (err) {
189
189
  console.log("Presistent slot resize handler on '" + slotId + "' threw", err);
190
190
  }
191
- })
191
+ });
192
192
  _.forEach(slotResizeHandlers[slotId], handler => {
193
193
  try {
194
194
  handler(size, zoomedSize);
@@ -276,12 +276,16 @@ window.boomack = window.boomack || {};
276
276
  return $(`.slot:not(#slot-${slotId})`);
277
277
  }
278
278
 
279
- function notifySlotContent(slotE, cmd) {
280
- slotE.removeClass('empty');
281
- slotE.find('.slot-toolbar .cmd-clear').removeClass('disabled');
282
- setData(slotE, 'ts', cmd.ts);
283
- setData(slotE, 'sequence-no', cmd.no);
284
- setData(slotE, 'max-sequence-no', cmd.no);
279
+ function notifySlotContent(slotE, cmd, { visible, repetition }) {
280
+ if (visible) {
281
+ slotE.removeClass('empty');
282
+ slotE.find('.slot-toolbar .cmd-clear').removeClass('disabled');
283
+ setData(slotE, 'ts', cmd.ts);
284
+ setData(slotE, 'sequence-no', cmd.no);
285
+ }
286
+ if (!repetition) {
287
+ setData(slotE, 'max-sequence-no', cmd.no);
288
+ }
285
289
  updateHistoryButtons(slotE, cmd.no);
286
290
  }
287
291
 
@@ -334,6 +338,8 @@ window.boomack = window.boomack || {};
334
338
  const histSize = Math.min(maxSequenceNo, history + 1);
335
339
  if (maxSequenceNo < 1 || histSize < 1) {
336
340
  txtHistoryE.html('&ndash;&nbsp;/&nbsp;&ndash;');
341
+ } else if (maxSequenceNo - sequenceNo >= histSize) {
342
+ txtHistoryE.html('&ndash;&nbsp;/&nbsp;' + histSize);
337
343
  } else {
338
344
  txtHistoryE.html(pos + '&nbsp;/&nbsp;' + histSize);
339
345
  }
@@ -351,7 +357,7 @@ window.boomack = window.boomack || {};
351
357
  let count = 0;
352
358
  for (let i = 0; i < childNodes.length; i++) {
353
359
  const n = childNodes[i];
354
- if (n.nodeType == Node.COMMENT_NODE && n.textContent == CONTENT_SEPARATOR_TEXT) {
360
+ if (n.nodeType === Node.COMMENT_NODE && n.textContent === CONTENT_SEPARATOR_TEXT) {
355
361
  count++;
356
362
  }
357
363
  }
@@ -373,8 +379,13 @@ window.boomack = window.boomack || {};
373
379
  }
374
380
 
375
381
  function incrementExtensionsCount(slotId, slotE, contentE) {
376
- const count = getExtensionsCount(slotId, slotE, contentE);
377
- updateExtensionsCount(slotId, slotE, count + 1);
382
+ let count = extensionCounts[slotId];
383
+ if (count === undefined) {
384
+ count = countExtensions(contentE);
385
+ updateExtensionsCount(slotId, slotE, count);
386
+ } else {
387
+ updateExtensionsCount(slotId, slotE, count + 1);
388
+ }
378
389
  }
379
390
 
380
391
  function updateVersion(slotE, version) {
@@ -385,9 +396,9 @@ window.boomack = window.boomack || {};
385
396
  let count = getExtensionsCount(slotId, slotE, contentE);
386
397
  const contentN = contentE[0];
387
398
  if (extend !== 'end' && extend !== 'begin') return;
388
- while (count - 1 > limit) {
399
+ while (count > limit) {
389
400
  const n = extend === 'begin' ? contentN.lastChild : contentN.firstChild;
390
- if (n.nodeType == Node.COMMENT_NODE && n.textContent == CONTENT_SEPARATOR_TEXT) {
401
+ if (n.nodeType === Node.COMMENT_NODE && n.textContent === CONTENT_SEPARATOR_TEXT) {
391
402
  count--;
392
403
  }
393
404
  contentN.removeChild(n);
@@ -411,7 +422,12 @@ window.boomack = window.boomack || {};
411
422
  slotE.find('.slot-content-box')
412
423
  .each(function () { this.style = {}; })
413
424
  .find('.slot-content-wrapper')
414
- .each(function () { this.style = {}; })
425
+ .each(function () {
426
+ // preserve the filter from the slot configuration
427
+ var oldFilter = this.style.filter;
428
+ this.style = {};
429
+ this.style.filter = oldFilter;
430
+ })
415
431
  .find('.slot-content')
416
432
  .each(function () { this.style = {}; });
417
433
  }
@@ -444,9 +460,8 @@ window.boomack = window.boomack || {};
444
460
  }
445
461
  setData(slotE, 'scale', cmd.scale);
446
462
  setData(slotE, 'align', cmd.align);
447
- updateSlotZoom(slotE);
448
463
  const contentBox = slotE.find('.slot-content-box');
449
- contentBox.css('background', cmd.background || '');
464
+ contentBox.css('background', cmd.background ? replaceThemeProps(cmd.background) : '');
450
465
  const contentWrapperE = slotE.find('.slot-content-wrapper');
451
466
  const contentE = slotE.find('.slot-content');
452
467
  const iframeE = slotE.find('iframe.isolated-slot-content');
@@ -461,6 +476,7 @@ window.boomack = window.boomack || {};
461
476
  updateContentElement(slotE, cmd);
462
477
  contentWrapperE.show();
463
478
  }
479
+ updateSlotZoom(slotE);
464
480
  }
465
481
 
466
482
  let socket = null;
@@ -498,7 +514,7 @@ window.boomack = window.boomack || {};
498
514
  }
499
515
 
500
516
  function displayMediaItem(envelope) {
501
- if (!checkSerialNumber(envelope.sn)) return;
517
+ if (!envelope.repetition && !checkSerialNumber(envelope.sn)) return;
502
518
  if (envelope.newSlot) {
503
519
  const newSlotE = $(envelope.newSlot);
504
520
  const index = newSlotE.data('index');
@@ -522,14 +538,14 @@ window.boomack = window.boomack || {};
522
538
  // handle race condition of extensions
523
539
  if (cmd.version <= Number.parseInt(slotE.data('version'))) return;
524
540
  }
525
- if (slotE.hasClass('paused')) {
526
- notifySlotContent(slotE, cmd);
541
+ if (!envelope.repetition && slotE.hasClass('paused')) {
542
+ notifySlotContent(slotE, cmd, { visible: false, repetition: envelope.repetition });
527
543
  return;
528
544
  }
529
545
  const titleE = slotE.find('.txt-title');
530
546
  titleE.html(cmd.title || '');
531
- notifySlotContent(slotE, cmd);
532
547
  clearSlotResizeHandlers(slotE.data('slot-id'));
548
+ notifySlotContent(slotE, cmd, { visible: true, repetition: envelope.repetition });
533
549
  const extensionLimit = Number.parseInt(slotE.data('extension-limit') || 0);
534
550
  if (!empty && cmd.extend == 'begin') {
535
551
  contentE.prepend(cmd.content + '<!--' + CONTENT_SEPARATOR_TEXT + '-->');
@@ -739,6 +755,7 @@ window.boomack = window.boomack || {};
739
755
  slotE.addClass('maximized');
740
756
  cmdMaximize.removeClass('alternate');
741
757
  }
758
+ window.dispatchEvent(new Event('resize'));
742
759
  };
743
760
 
744
761
  ctx.cmdClear = function (slotId) {
@@ -751,18 +768,7 @@ window.boomack = window.boomack || {};
751
768
  const slotE = getSlot(slotId);
752
769
  if (!slotE) return;
753
770
  const no = Number.parseInt(slotE.data('sequence-no')) - 1;
754
- if (!isValidHistoryNo(slotE, no)) return;
755
- const titleE = slotE.find('.txt-title');
756
- $.get('/panels/' + ctx.panelId + '/slots/' + slotId + '/history/' + no,
757
- (displayCommand, status) => {
758
- trace('History call status', status);
759
- ctx.run(function () {
760
- titleE.html(displayCommand.title || '');
761
- showContentWithRequirements(slotE, displayCommand);
762
- setData(slotE, 'sequence-no', no);
763
- updateHistoryButtons(slotE);
764
- });
765
- }, 'json');
771
+ socket.emit('redisplay', ctx.panelId, slotId, no);
766
772
  };
767
773
 
768
774
  ctx.cmdHistoryForward = function (slotId) {
@@ -770,18 +776,7 @@ window.boomack = window.boomack || {};
770
776
  const slotE = getSlot(slotId);
771
777
  if (!slotE) return;
772
778
  const no = Number.parseInt(slotE.data('sequence-no')) + 1;
773
- if (!isValidHistoryNo(slotE, no)) return;
774
- const titleE = slotE.find('.txt-title');
775
- $.get('/panels/' + ctx.panelId + '/slots/' + slotId + '/history/' + no,
776
- (displayCommand, status) => {
777
- trace('History call status', status);
778
- ctx.run(function () {
779
- titleE.html(displayCommand.title || '');
780
- showContentWithRequirements(slotE, displayCommand);
781
- setData(slotE, 'sequence-no', no);
782
- updateHistoryButtons(slotE);
783
- });
784
- }, 'json');
779
+ socket.emit('redisplay', ctx.panelId, slotId, no);
785
780
  };
786
781
 
787
782
  ctx.cmdTogglePause = function (slotId) {
@@ -793,7 +788,8 @@ window.boomack = window.boomack || {};
793
788
  slotE.removeClass('paused');
794
789
  cmdPause.removeClass('pause');
795
790
  cmdPause.addClass('play');
796
- socket.emit('refresh-slot', ctx.panelId, slotId);
791
+ const maxNo = Number.parseInt(slotE.data('max-sequence-no'));
792
+ socket.emit('redisplay', ctx.panelId, slotId, maxNo);
797
793
  } else {
798
794
  slotE.addClass('paused');
799
795
  cmdPause.removeClass('play');
@@ -2,6 +2,7 @@
2
2
  "dark": true,
3
3
  "monoColor": [0, 0, 1],
4
4
  "saturation": 0,
5
+ "border-radius": 6,
5
6
 
6
7
  "headline-font-family": "Roboto, 'Helvetica Neue', Arial, Helvetica, sans-serif",
7
8
  "headline-font-weight": "600",