@seamly/web-ui 18.3.0 → 19.0.0-beta.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 (109) hide show
  1. package/build/dist/lib/index.debug.js +349 -74
  2. package/build/dist/lib/index.debug.min.js +1 -1
  3. package/build/dist/lib/index.debug.min.js.LICENSE.txt +108 -8
  4. package/build/dist/lib/index.js +6103 -5988
  5. package/build/dist/lib/index.min.js +1 -1
  6. package/build/dist/lib/index.min.js.LICENSE.txt +1 -1
  7. package/build/dist/lib/standalone.js +2414 -2226
  8. package/build/dist/lib/standalone.min.js +1 -1
  9. package/build/dist/lib/standalone.min.js.LICENSE.txt +1 -1
  10. package/build/dist/lib/storage.js +8 -1
  11. package/build/dist/lib/storage.min.js +1 -1
  12. package/build/dist/lib/style-guide.js +1517 -785
  13. package/build/dist/lib/style-guide.min.js +1 -1
  14. package/build/dist/lib/styles.css +1 -1
  15. package/package.json +27 -28
  16. package/src/javascripts/api/index.js +25 -40
  17. package/src/javascripts/api/producer.js +3 -6
  18. package/src/javascripts/config.js +3 -3
  19. package/src/javascripts/domains/app/actions.js +28 -11
  20. package/src/javascripts/domains/app/hooks.js +6 -0
  21. package/src/javascripts/domains/app/index.js +3 -0
  22. package/src/javascripts/domains/app/reducer.js +16 -0
  23. package/src/javascripts/domains/app/selectors.js +8 -0
  24. package/src/javascripts/domains/app/utils.js +4 -0
  25. package/src/javascripts/domains/config/actions.js +1 -3
  26. package/src/javascripts/domains/config/middleware.js +0 -4
  27. package/src/javascripts/domains/config/reducer.js +2 -13
  28. package/src/javascripts/domains/config/selectors.js +3 -3
  29. package/src/javascripts/domains/config/utils.js +4 -0
  30. package/src/javascripts/domains/forms/actions.js +1 -3
  31. package/src/javascripts/domains/forms/reducer.js +1 -2
  32. package/src/javascripts/domains/forms/selectors.js +2 -2
  33. package/src/javascripts/domains/forms/utils.js +5 -0
  34. package/src/javascripts/domains/i18n/actions.js +20 -0
  35. package/src/javascripts/domains/i18n/hooks.js +38 -0
  36. package/src/javascripts/domains/i18n/index.js +5 -84
  37. package/src/javascripts/domains/i18n/reducer.js +64 -0
  38. package/src/javascripts/domains/i18n/selectors.js +15 -0
  39. package/src/javascripts/domains/i18n/utils.js +4 -0
  40. package/src/javascripts/domains/interrupt/actions.js +1 -3
  41. package/src/javascripts/domains/interrupt/reducer.js +1 -2
  42. package/src/javascripts/domains/interrupt/selectors.js +3 -2
  43. package/src/javascripts/domains/interrupt/utils.js +4 -0
  44. package/src/javascripts/domains/redux/hooks.js +1 -0
  45. package/src/javascripts/domains/store/index.js +7 -1
  46. package/src/javascripts/domains/translations/actions.js +1 -3
  47. package/src/javascripts/domains/translations/components/chat-status.js +1 -1
  48. package/src/javascripts/domains/translations/components/options-dialog/form.js +11 -6
  49. package/src/javascripts/domains/translations/index.js +1 -0
  50. package/src/javascripts/domains/translations/middleware.js +43 -0
  51. package/src/javascripts/domains/translations/reducer.js +2 -9
  52. package/src/javascripts/domains/translations/selectors.js +2 -2
  53. package/src/javascripts/domains/translations/utils.js +4 -0
  54. package/src/javascripts/index.js +3 -0
  55. package/src/javascripts/lib/engine/index.js +1 -0
  56. package/src/javascripts/lib/mutex.js +30 -0
  57. package/src/javascripts/lib/redux-helpers/index.js +55 -16
  58. package/src/javascripts/lib/store/providers/session-storage.js +6 -1
  59. package/src/javascripts/style-guide/components/app.js +7 -2
  60. package/src/javascripts/style-guide/components/static-core.js +9 -3
  61. package/src/javascripts/style-guide/states.js +8 -8
  62. package/src/javascripts/style-guide/style-guide-engine.js +14 -11
  63. package/src/javascripts/ui/components/conversation/event/divider/variants/new-translation.js +1 -1
  64. package/src/javascripts/ui/components/conversation/event/upload.js +2 -2
  65. package/src/javascripts/ui/components/core/seamly-activity-monitor.js +2 -0
  66. package/src/javascripts/ui/components/core/seamly-event-subscriber.js +2 -0
  67. package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +1 -7
  68. package/src/javascripts/ui/components/core/seamly-new-notifications.js +5 -6
  69. package/src/javascripts/ui/components/core/seamly-read-state.js +6 -4
  70. package/src/javascripts/ui/components/entry/text-entry/hooks.js +6 -4
  71. package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +10 -3
  72. package/src/javascripts/ui/components/entry/upload/file-upload-form.js +6 -3
  73. package/src/javascripts/ui/components/entry/upload/index.js +8 -3
  74. package/src/javascripts/ui/components/faq/faq.js +2 -2
  75. package/src/javascripts/ui/components/layout/app-frame.js +11 -8
  76. package/src/javascripts/ui/components/layout/interrupt.js +6 -2
  77. package/src/javascripts/ui/components/warnings/resume-conversation-prompt.js +1 -1
  78. package/src/javascripts/ui/components/widgets/upload-progress.js +1 -1
  79. package/src/javascripts/ui/hooks/seamly-api-hooks.js +0 -6
  80. package/src/javascripts/ui/hooks/seamly-entry-hooks.js +17 -21
  81. package/src/javascripts/ui/hooks/seamly-hooks.js +0 -1
  82. package/src/javascripts/ui/hooks/use-seamly-commands.js +5 -6
  83. package/src/javascripts/ui/hooks/use-seamly-visibility.js +3 -5
  84. package/src/javascripts/ui/hooks/use-single-file-upload.js +4 -1
  85. package/src/javascripts/ui/utils/general-utils.js +6 -13
  86. package/src/stylesheets/1-settings/_config.scss +2 -1
  87. package/src/stylesheets/3-app/_app.scss +3 -4
  88. package/src/stylesheets/5-components/_faq.scss +3 -8
  89. package/src/stylesheets/5-components/_modal.scss +3 -3
  90. package/webpack/config.package.js +0 -18
  91. package/webpack/config.site.js +6 -0
  92. package/webpack/defaults.js +0 -3
  93. package/CHANGELOG.md +0 -573
  94. package/build/dist/translations/de-informal.js +0 -274
  95. package/build/dist/translations/de-informal.min.js +0 -1
  96. package/build/dist/translations/en.js +0 -274
  97. package/build/dist/translations/en.min.js +0 -1
  98. package/build/dist/translations/es-informal.js +0 -280
  99. package/build/dist/translations/es-informal.min.js +0 -1
  100. package/build/dist/translations/nl-formal.js +0 -274
  101. package/build/dist/translations/nl-formal.min.js +0 -1
  102. package/build/dist/translations/nl-informal.js +0 -274
  103. package/build/dist/translations/nl-informal.min.js +0 -1
  104. package/src/javascripts/lib/i18n.js +0 -46
  105. package/translations/de-informal.js +0 -235
  106. package/translations/en.js +0 -232
  107. package/translations/es-informal.js +0 -241
  108. package/translations/nl-formal.js +0 -228
  109. package/translations/nl-informal.js +0 -228
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.1
2
+ * focus-trap 6.7.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
 
@@ -246,7 +246,14 @@ function store(key) {
246
246
  const KEY = 'cvco.' + key;
247
247
  return {
248
248
  get() {
249
- return JSON.parse(sessionStorage.getItem(KEY));
249
+ const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')];
250
+ let val;
251
+
252
+ do {
253
+ val = sessionStorage.getItem(candidates[0]);
254
+ } while (candidates.shift() && !val);
255
+
256
+ return JSON.parse(val);
250
257
  },
251
258
 
252
259
  set(value) {
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see storage.min.js.LICENSE.txt */
2
- (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}e.r(t),e.d(t,{appStorageProvider:()=>r,cookieStorageProvider:()=>i,sessionStorageProvider:()=>a});const o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in i)i[s]&&(a+="; "+s,!0!==i[s]&&(a+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+a}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),a=i.slice(1).join("=");try{var s=decodeURIComponent(i[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function i(e={}){return function(t){const r="cvco."+t;return{get(){const e=o.get(r);return e?JSON.parse(e):null},set(t){t&&o.set(r,JSON.stringify(t),e)}}}}function a(e){const t="cvco."+e;return{get:()=>JSON.parse(sessionStorage.getItem(t)),set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}module.exports=t})();
2
+ (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}e.r(t),e.d(t,{appStorageProvider:()=>r,cookieStorageProvider:()=>i,sessionStorageProvider:()=>s});const o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(n[a]=t.read(s,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function i(e={}){return function(t){const r="cvco."+t;return{get(){const e=o.get(r);return e?JSON.parse(e):null},set(t){t&&o.set(r,JSON.stringify(t),e)}}}}function s(e){const t="cvco."+e;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let r;do{r=sessionStorage.getItem(e[0])}while(e.shift()&&!r);return JSON.parse(r)},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}module.exports=t})();