@seamly/web-ui 22.3.0-beta.2 → 22.3.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.
- package/build/dist/lib/components.js +162 -161
- package/build/dist/lib/components.js.map +1 -1
- package/build/dist/lib/components.min.js +1 -1
- package/build/dist/lib/components.min.js.map +1 -1
- package/build/dist/lib/hooks.js +162 -161
- package/build/dist/lib/hooks.js.map +1 -1
- package/build/dist/lib/hooks.min.js +1 -1
- package/build/dist/lib/hooks.min.js.map +1 -1
- package/build/dist/lib/index.debug.js +158 -86
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +348 -190
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/build/dist/lib/standalone.js +764 -201
- package/build/dist/lib/standalone.js.map +1 -1
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.map +1 -1
- package/build/dist/lib/storage.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +202 -188
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/styles-default-implementation.css +1 -1
- package/build/dist/lib/styles.css +1 -1
- package/build/dist/lib/utils.js +202 -188
- package/build/dist/lib/utils.js.map +1 -1
- package/build/dist/lib/utils.min.js +1 -1
- package/build/dist/lib/utils.min.js.map +1 -1
- package/package.json +1 -1
- package/src/javascripts/api/conversation-connector.ts +6 -9
- package/src/javascripts/ui/components/core/seamly-event-subscriber.ts +20 -15
|
@@ -139,32 +139,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
139
139
|
/* harmony export */ Component: () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.Component),
|
|
140
140
|
/* harmony export */ Fragment: () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.Fragment),
|
|
141
141
|
/* harmony export */ PureComponent: () => (/* binding */ w),
|
|
142
|
-
/* harmony export */ StrictMode: () => (/* binding */
|
|
143
|
-
/* harmony export */ Suspense: () => (/* binding */
|
|
142
|
+
/* harmony export */ StrictMode: () => (/* binding */ yn),
|
|
143
|
+
/* harmony export */ Suspense: () => (/* binding */ U),
|
|
144
144
|
/* harmony export */ SuspenseList: () => (/* binding */ V),
|
|
145
145
|
/* harmony export */ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: () => (/* binding */ ln),
|
|
146
|
-
/* harmony export */ cloneElement: () => (/* binding */
|
|
146
|
+
/* harmony export */ cloneElement: () => (/* binding */ hn),
|
|
147
147
|
/* harmony export */ createContext: () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.createContext),
|
|
148
148
|
/* harmony export */ createElement: () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.createElement),
|
|
149
149
|
/* harmony export */ createFactory: () => (/* binding */ fn),
|
|
150
150
|
/* harmony export */ createPortal: () => (/* binding */ z),
|
|
151
151
|
/* harmony export */ createRef: () => (/* reexport safe */ preact__WEBPACK_IMPORTED_MODULE_0__.createRef),
|
|
152
|
-
/* harmony export */ "default": () => (/* binding */
|
|
153
|
-
/* harmony export */ findDOMNode: () => (/* binding */
|
|
154
|
-
/* harmony export */ flushSync: () => (/* binding */
|
|
152
|
+
/* harmony export */ "default": () => (/* binding */ wn),
|
|
153
|
+
/* harmony export */ findDOMNode: () => (/* binding */ dn),
|
|
154
|
+
/* harmony export */ flushSync: () => (/* binding */ mn),
|
|
155
155
|
/* harmony export */ forwardRef: () => (/* binding */ k),
|
|
156
156
|
/* harmony export */ hydrate: () => (/* binding */ J),
|
|
157
|
+
/* harmony export */ isElement: () => (/* binding */ Cn),
|
|
158
|
+
/* harmony export */ isFragment: () => (/* binding */ sn),
|
|
157
159
|
/* harmony export */ isValidElement: () => (/* binding */ an),
|
|
158
160
|
/* harmony export */ lazy: () => (/* binding */ M),
|
|
159
161
|
/* harmony export */ memo: () => (/* binding */ x),
|
|
160
162
|
/* harmony export */ render: () => (/* binding */ G),
|
|
161
|
-
/* harmony export */ startTransition: () => (/* binding */
|
|
162
|
-
/* harmony export */ unmountComponentAtNode: () => (/* binding */
|
|
163
|
-
/* harmony export */ unstable_batchedUpdates: () => (/* binding */
|
|
164
|
-
/* harmony export */ useDeferredValue: () => (/* binding */
|
|
165
|
-
/* harmony export */ useInsertionEffect: () => (/* binding */
|
|
166
|
-
/* harmony export */ useSyncExternalStore: () => (/* binding */
|
|
167
|
-
/* harmony export */ useTransition: () => (/* binding */
|
|
163
|
+
/* harmony export */ startTransition: () => (/* binding */ _n),
|
|
164
|
+
/* harmony export */ unmountComponentAtNode: () => (/* binding */ vn),
|
|
165
|
+
/* harmony export */ unstable_batchedUpdates: () => (/* binding */ pn),
|
|
166
|
+
/* harmony export */ useDeferredValue: () => (/* binding */ bn),
|
|
167
|
+
/* harmony export */ useInsertionEffect: () => (/* binding */ gn),
|
|
168
|
+
/* harmony export */ useSyncExternalStore: () => (/* binding */ En),
|
|
169
|
+
/* harmony export */ useTransition: () => (/* binding */ Sn),
|
|
168
170
|
/* harmony export */ version: () => (/* binding */ cn)
|
|
169
171
|
/* harmony export */ });
|
|
170
172
|
/* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
|
|
@@ -172,9 +174,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
172
174
|
/* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
|
|
173
175
|
/* harmony import */ var preact_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(preact_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
|
174
176
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
175
|
-
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in preact_hooks__WEBPACK_IMPORTED_MODULE_1__) if(["default","Component","Fragment","createContext","createElement","createRef","Children","PureComponent","StrictMode","Suspense","SuspenseList","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createFactory","createPortal","findDOMNode","flushSync","forwardRef","hydrate","isValidElement","lazy","memo","render","startTransition","unmountComponentAtNode","unstable_batchedUpdates","useDeferredValue","useInsertionEffect","useSyncExternalStore","useTransition","version"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => preact_hooks__WEBPACK_IMPORTED_MODULE_1__[__WEBPACK_IMPORT_KEY__]
|
|
177
|
+
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in preact_hooks__WEBPACK_IMPORTED_MODULE_1__) if(["default","Component","Fragment","createContext","createElement","createRef","Children","PureComponent","StrictMode","Suspense","SuspenseList","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","cloneElement","createFactory","createPortal","findDOMNode","flushSync","forwardRef","hydrate","isElement","isFragment","isValidElement","lazy","memo","render","startTransition","unmountComponentAtNode","unstable_batchedUpdates","useDeferredValue","useInsertionEffect","useSyncExternalStore","useTransition","version"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => preact_hooks__WEBPACK_IMPORTED_MODULE_1__[__WEBPACK_IMPORT_KEY__]
|
|
176
178
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
177
|
-
function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function E(n,t){return n===t&&(0!==n||1/n==1/t)||n!=n&&t!=t}function w(n){this.props=n}function x(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(w.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var R=preact__WEBPACK_IMPORTED_MODULE_0__.options.__b;preact__WEBPACK_IMPORTED_MODULE_0__.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=N,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var A=function(n,t){return null==n?null:(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)((0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).map(t))},O={map:A,forEach:A,count:function(n){return n?(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).length:0},only:function(n){var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray},T=preact__WEBPACK_IMPORTED_MODULE_0__.options.__e;preact__WEBPACK_IMPORTED_MODULE_0__.options.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r)};var I=preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount;function L(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)})),n}function U(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return U(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function D(){this.__u=0,this.t=null,this.__b=null}function F(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return (0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(r,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null}preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),I&&I(n)},(D.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=F(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=U(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},D.prototype.componentWillUnmount=function(){this.t=[]},D.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=L(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,n.fallback);return i&&(i.__h=null),[(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function P(n){return this.getChildContext=function(){return n.context},n.children}function j(n){var e=this,r=n.i;e.componentWillUnmount=function(){(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)((0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(P,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function z(n,e){var r=(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(j,{__v:n,i:e});return r.containerInfo=e,r}(V.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__a=function(n){var t=this,e=F(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u()};e?e(o):o()}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t)})};var B="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,H=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Z=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Y=/[A-Z0-9]/g,$="undefined"!=typeof document,q=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function G(n,t,e){return null==t.__k&&(t.textContent=""),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(n,t),"function"==typeof e&&e(),n?n.__c:null}function J(n,t,e){return (0,preact__WEBPACK_IMPORTED_MODULE_0__.hydrate)(n,t),"function"==typeof e&&e(),n?n.__c:null}preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var K=preact__WEBPACK_IMPORTED_MODULE_0__.options.event;function Q(){}function X(){return this.cancelBubble}function nn(){return this.defaultPrevented}preact__WEBPACK_IMPORTED_MODULE_0__.options.event=function(n){return K&&(n=K(n)),n.persist=Q,n.isPropagationStopped=X,n.isDefaultPrevented=nn,n.nativeEvent=n};var tn,en={enumerable:!1,configurable:!0,get:function(){return this.class}},rn=preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode;preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||$&&"children"===o&&"noscript"===e||"class"===o||"className"===o)){var l=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===l?o="ondblclick":"onchange"!==l||"input"!==e&&"textarea"!==e||q(t.type)?"onfocus"===l?o="onfocusin":"onblur"===l?o="onfocusout":Z.test(o)?o=l:-1===e.indexOf("-")&&H.test(o)?o=o.replace(Y,"-$&").toLowerCase():null===i&&(i=void 0):l=o="oninput","oninput"===l&&u[o=l]&&(o="oninputCapture"),u[o]=i}}"select"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),"select"==e&&null!=u.defaultValue&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",en)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=B,rn&&rn(n)};var un=preact__WEBPACK_IMPORTED_MODULE_0__.options.__r;preact__WEBPACK_IMPORTED_MODULE_0__.options.__r=function(n){un&&un(n),tn=n.__c};var on=preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed;preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed=function(n){on&&on(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value),tn=null};var ln={ReactCurrentDispatcher:{current:{readContext:function(n){return tn.__n[n.__c].props.value}}}},cn="17.0.2";function fn(n){return preact__WEBPACK_IMPORTED_MODULE_0__.createElement.bind(null,n)}function an(n){return!!n&&n.$$typeof===B}function sn(n){return an(n)?preact__WEBPACK_IMPORTED_MODULE_0__.cloneElement.apply(null,arguments):n}function hn(n){return!!n.__k&&((0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,n),!0)}function vn(n){return n&&(n.base||1===n.nodeType&&n)||null}var dn=function(n,t){return n(t)},pn=function(n,t){return n(t)},mn=preact__WEBPACK_IMPORTED_MODULE_0__.Fragment;function yn(n){n()}function _n(n){return n}function bn(){return[!1,yn]}var Sn=preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect;function gn(n,t){var e=t(),r=(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState)({h:{__:e,v:t}}),u=r[0].h,o=r[1];return (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(function(){u.__=e,u.v=t,E(u.__,t())||o({h:u})},[n,e,t]),(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function(){return E(u.__,u.v())||o({h:u}),n(function(){E(u.__,u.v())||o({h:u})})},[n]),e}var Cn={useState:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState,useId:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useId,useReducer:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useReducer,useEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect,useLayoutEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect,useInsertionEffect:Sn,useTransition:bn,useDeferredValue:_n,useSyncExternalStore:gn,startTransition:yn,useRef:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useRef,useImperativeHandle:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle,useMemo:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useMemo,useCallback:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useCallback,useContext:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useContext,useDebugValue:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useDebugValue,version:"17.0.2",Children:O,render:G,hydrate:J,unmountComponentAtNode:hn,createPortal:z,createElement:preact__WEBPACK_IMPORTED_MODULE_0__.createElement,createContext:preact__WEBPACK_IMPORTED_MODULE_0__.createContext,createFactory:fn,cloneElement:sn,createRef:preact__WEBPACK_IMPORTED_MODULE_0__.createRef,Fragment:preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,isValidElement:an,findDOMNode:vn,Component:preact__WEBPACK_IMPORTED_MODULE_0__.Component,PureComponent:w,memo:x,forwardRef:k,flushSync:pn,unstable_batchedUpdates:dn,StrictMode:mn,Suspense:D,SuspenseList:V,lazy:M,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ln};
|
|
179
|
+
function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function E(n,t){return n===t&&(0!==n||1/n==1/t)||n!=n&&t!=t}function w(n){this.props=n}function x(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:C(this.props,n)}function u(e){return this.shouldComponentUpdate=r,(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(w.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var R=preact__WEBPACK_IMPORTED_MODULE_0__.options.__b;preact__WEBPACK_IMPORTED_MODULE_0__.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=N,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var A=function(n,t){return null==n?null:(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)((0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).map(t))},O={map:A,forEach:A,count:function(n){return n?(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n).length:0},only:function(n){var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n);if(1!==t.length)throw"Children.only";return t[0]},toArray:preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray},T=preact__WEBPACK_IMPORTED_MODULE_0__.options.__e;preact__WEBPACK_IMPORTED_MODULE_0__.options.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r)};var F=preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount;function I(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return I(n,t,e)})),n}function L(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function U(){this.__u=0,this.t=null,this.__b=null}function D(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function M(n){var e,r,u;function o(o){if(e||(e=n()).then(function(n){r=n.default||n},function(n){u=n}),u)throw u;if(!r)throw e;return (0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(r,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null}preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),F&&F(n)},(U.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=D(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=L(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},U.prototype.componentWillUnmount=function(){this.t=[]},U.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=I(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,n.fallback);return i&&(i.__h=null),[(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2]}};function P(n){return this.getChildContext=function(){return n.context},n.children}function j(n){var e=this,r=n.i;e.componentWillUnmount=function(){(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)((0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(P,{context:e.context},n.__v),e.l)}function z(n,e){var r=(0,preact__WEBPACK_IMPORTED_MODULE_0__.createElement)(j,{__v:n,i:e});return r.containerInfo=e,r}(V.prototype=new preact__WEBPACK_IMPORTED_MODULE_0__.Component).__a=function(n){var t=this,e=D(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u()};e?e(o):o()}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t)})};var B="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,H=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Z=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Y=/[A-Z0-9]/g,$="undefined"!=typeof document,q=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function G(n,t,e){return null==t.__k&&(t.textContent=""),(0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(n,t),"function"==typeof e&&e(),n?n.__c:null}function J(n,t,e){return (0,preact__WEBPACK_IMPORTED_MODULE_0__.hydrate)(n,t),"function"==typeof e&&e(),n?n.__c:null}preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(preact__WEBPACK_IMPORTED_MODULE_0__.Component.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var K=preact__WEBPACK_IMPORTED_MODULE_0__.options.event;function Q(){}function X(){return this.cancelBubble}function nn(){return this.defaultPrevented}preact__WEBPACK_IMPORTED_MODULE_0__.options.event=function(n){return K&&(n=K(n)),n.persist=Q,n.isPropagationStopped=X,n.isDefaultPrevented=nn,n.nativeEvent=n};var tn,en={enumerable:!1,configurable:!0,get:function(){return this.class}},rn=preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode;preact__WEBPACK_IMPORTED_MODULE_0__.options.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||$&&"children"===o&&"noscript"===e||"class"===o||"className"===o)){var l=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===l?o="ondblclick":"onchange"!==l||"input"!==e&&"textarea"!==e||q(t.type)?"onfocus"===l?o="onfocusin":"onblur"===l?o="onfocusout":Z.test(o)?o=l:-1===e.indexOf("-")&&H.test(o)?o=o.replace(Y,"-$&").toLowerCase():null===i&&(i=void 0):l=o="oninput","oninput"===l&&u[o=l]&&(o="oninputCapture"),u[o]=i}}"select"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),"select"==e&&null!=u.defaultValue&&(u.value=(0,preact__WEBPACK_IMPORTED_MODULE_0__.toChildArray)(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",en)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=B,rn&&rn(n)};var un=preact__WEBPACK_IMPORTED_MODULE_0__.options.__r;preact__WEBPACK_IMPORTED_MODULE_0__.options.__r=function(n){un&&un(n),tn=n.__c};var on=preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed;preact__WEBPACK_IMPORTED_MODULE_0__.options.diffed=function(n){on&&on(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value),tn=null};var ln={ReactCurrentDispatcher:{current:{readContext:function(n){return tn.__n[n.__c].props.value}}}},cn="17.0.2";function fn(n){return preact__WEBPACK_IMPORTED_MODULE_0__.createElement.bind(null,n)}function an(n){return!!n&&n.$$typeof===B}function sn(n){return an(n)&&n.type===preact__WEBPACK_IMPORTED_MODULE_0__.Fragment}function hn(n){return an(n)?preact__WEBPACK_IMPORTED_MODULE_0__.cloneElement.apply(null,arguments):n}function vn(n){return!!n.__k&&((0,preact__WEBPACK_IMPORTED_MODULE_0__.render)(null,n),!0)}function dn(n){return n&&(n.base||1===n.nodeType&&n)||null}var pn=function(n,t){return n(t)},mn=function(n,t){return n(t)},yn=preact__WEBPACK_IMPORTED_MODULE_0__.Fragment;function _n(n){n()}function bn(n){return n}function Sn(){return[!1,_n]}var gn=preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect,Cn=an;function En(n,t){var e=t(),r=(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState)({h:{__:e,v:t}}),u=r[0].h,o=r[1];return (0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(function(){u.__=e,u.v=t,E(u.__,t())||o({h:u})},[n,e,t]),(0,preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function(){return E(u.__,u.v())||o({h:u}),n(function(){E(u.__,u.v())||o({h:u})})},[n]),e}var wn={useState:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useState,useId:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useId,useReducer:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useReducer,useEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useEffect,useLayoutEffect:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect,useInsertionEffect:gn,useTransition:Sn,useDeferredValue:bn,useSyncExternalStore:En,startTransition:_n,useRef:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useRef,useImperativeHandle:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle,useMemo:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useMemo,useCallback:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useCallback,useContext:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useContext,useDebugValue:preact_hooks__WEBPACK_IMPORTED_MODULE_1__.useDebugValue,version:"17.0.2",Children:O,render:G,hydrate:J,unmountComponentAtNode:vn,createPortal:z,createElement:preact__WEBPACK_IMPORTED_MODULE_0__.createElement,createContext:preact__WEBPACK_IMPORTED_MODULE_0__.createContext,createFactory:fn,cloneElement:hn,createRef:preact__WEBPACK_IMPORTED_MODULE_0__.createRef,Fragment:preact__WEBPACK_IMPORTED_MODULE_0__.Fragment,isValidElement:an,isElement:Cn,isFragment:sn,findDOMNode:dn,Component:preact__WEBPACK_IMPORTED_MODULE_0__.Component,PureComponent:w,memo:x,forwardRef:k,flushSync:mn,unstable_batchedUpdates:pn,StrictMode:yn,Suspense:U,SuspenseList:V,lazy:M,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ln};
|
|
178
180
|
//# sourceMappingURL=compat.module.js.map
|
|
179
181
|
|
|
180
182
|
|
|
@@ -1183,6 +1185,15 @@ var Ajax = class {
|
|
|
1183
1185
|
};
|
|
1184
1186
|
|
|
1185
1187
|
// js/phoenix/longpoll.js
|
|
1188
|
+
var arrayBufferToBase64 = (buffer) => {
|
|
1189
|
+
let binary = "";
|
|
1190
|
+
let bytes = new Uint8Array(buffer);
|
|
1191
|
+
let len = bytes.byteLength;
|
|
1192
|
+
for (let i = 0; i < len; i++) {
|
|
1193
|
+
binary += String.fromCharCode(bytes[i]);
|
|
1194
|
+
}
|
|
1195
|
+
return btoa(binary);
|
|
1196
|
+
};
|
|
1186
1197
|
var LongPoll = class {
|
|
1187
1198
|
constructor(endPoint) {
|
|
1188
1199
|
this.endPoint = null;
|
|
@@ -1260,6 +1271,9 @@ var LongPoll = class {
|
|
|
1260
1271
|
});
|
|
1261
1272
|
}
|
|
1262
1273
|
send(body) {
|
|
1274
|
+
if (typeof body !== "string") {
|
|
1275
|
+
body = arrayBufferToBase64(body);
|
|
1276
|
+
}
|
|
1263
1277
|
if (this.currentBatch) {
|
|
1264
1278
|
this.currentBatch.push(body);
|
|
1265
1279
|
} else if (this.awaitingBatchAck) {
|
|
@@ -1998,12 +2012,14 @@ class ConversationConnector {
|
|
|
1998
2012
|
url: splittedUrl,
|
|
1999
2013
|
params
|
|
2000
2014
|
} = split_url_params(this.url);
|
|
2001
|
-
this.socket
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2015
|
+
if (!this.socket) {
|
|
2016
|
+
this.socket = new Socket(splittedUrl, {
|
|
2017
|
+
params: Object.assign(Object.assign({}, params), {
|
|
2018
|
+
v: apiVersion
|
|
2019
|
+
})
|
|
2020
|
+
});
|
|
2021
|
+
this.socket.connect();
|
|
2022
|
+
}
|
|
2007
2023
|
this.channel = this.socket.channel(this.channelTopic, {
|
|
2008
2024
|
authorization: `Bearer ${this.accessToken}`,
|
|
2009
2025
|
channelName: this.channelName
|
|
@@ -2068,8 +2084,6 @@ class ConversationConnector {
|
|
|
2068
2084
|
ready: false,
|
|
2069
2085
|
currentState: 'join_channel_erred'
|
|
2070
2086
|
});
|
|
2071
|
-
// @ts-ignore
|
|
2072
|
-
this.channel.socket.disconnect();
|
|
2073
2087
|
}).receive('timeout', () => {
|
|
2074
2088
|
log('[CHANEL][JOIN] Networking issue. Still waiting...');
|
|
2075
2089
|
});
|
|
@@ -2077,10 +2091,7 @@ class ConversationConnector {
|
|
|
2077
2091
|
disconnect() {
|
|
2078
2092
|
var _a;
|
|
2079
2093
|
(_a = this.channel) === null || _a === void 0 ? void 0 : _a.leave().receive('ok', () => {
|
|
2080
|
-
var _a, _b;
|
|
2081
2094
|
log('[CHANNEL][LEAVE] OK');
|
|
2082
|
-
(_a = this.socket) === null || _a === void 0 ? void 0 : _a.remove(this.channel);
|
|
2083
|
-
(_b = this.socket) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
2084
2095
|
__classPrivateFieldSet(this, _ConversationConnector_connectionListeners, [], "f");
|
|
2085
2096
|
});
|
|
2086
2097
|
}
|
|
@@ -2622,7 +2633,7 @@ _API_ready = new WeakMap(), _API_externalId = new WeakMap(), _API_conversationAu
|
|
|
2622
2633
|
return {
|
|
2623
2634
|
clientName: "@seamly/web-ui",
|
|
2624
2635
|
clientVariant: api_classPrivateFieldGet(this, _API_layoutMode, "f"),
|
|
2625
|
-
clientVersion: "22.3.0-beta.
|
|
2636
|
+
clientVersion: "22.3.0-beta.3",
|
|
2626
2637
|
currentUrl: window.location.toString(),
|
|
2627
2638
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
2628
2639
|
timezone: getTimeZone(),
|
|
@@ -2658,42 +2669,41 @@ const setBatch = newBatch => batch = newBatch; // Supply a getter just to skip d
|
|
|
2658
2669
|
const getBatch = () => batch;
|
|
2659
2670
|
;// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js
|
|
2660
2671
|
|
|
2661
|
-
const ContextKey = Symbol.for(`react-redux-context
|
|
2662
|
-
const gT = globalThis
|
|
2672
|
+
const ContextKey = Symbol.for(`react-redux-context`);
|
|
2673
|
+
const gT = typeof globalThis !== "undefined" ? globalThis :
|
|
2674
|
+
/* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
|
|
2675
|
+
{};
|
|
2663
2676
|
|
|
2664
2677
|
function getContext() {
|
|
2665
|
-
|
|
2678
|
+
var _gT$ContextKey;
|
|
2679
|
+
|
|
2680
|
+
if (!compat_module.createContext) return {};
|
|
2681
|
+
const contextMap = (_gT$ContextKey = gT[ContextKey]) != null ? _gT$ContextKey : gT[ContextKey] = new Map();
|
|
2682
|
+
let realContext = contextMap.get(compat_module.createContext);
|
|
2666
2683
|
|
|
2667
2684
|
if (!realContext) {
|
|
2668
|
-
realContext =
|
|
2685
|
+
realContext = compat_module.createContext(null);
|
|
2669
2686
|
|
|
2670
2687
|
if (false) {}
|
|
2671
2688
|
|
|
2672
|
-
|
|
2689
|
+
contextMap.set(compat_module.createContext, realContext);
|
|
2673
2690
|
}
|
|
2674
2691
|
|
|
2675
2692
|
return realContext;
|
|
2676
2693
|
}
|
|
2677
2694
|
|
|
2678
|
-
const Context_ReactReduxContext = /*#__PURE__*/
|
|
2679
|
-
get(_, handler) {
|
|
2680
|
-
const target = getContext(); // @ts-ignore
|
|
2681
|
-
|
|
2682
|
-
return (_target, ...args) => Reflect[handler](target, ...args);
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
}));
|
|
2695
|
+
const Context_ReactReduxContext = /*#__PURE__*/getContext();
|
|
2686
2696
|
/* harmony default export */ const Context = ((/* unused pure expression or super */ null && (Context_ReactReduxContext)));
|
|
2687
2697
|
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useReduxContext.js
|
|
2688
2698
|
|
|
2689
2699
|
|
|
2690
2700
|
|
|
2691
|
-
/**
|
|
2692
|
-
* Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level
|
|
2693
|
-
* hook that you should usually not need to call directly.
|
|
2694
|
-
*
|
|
2695
|
-
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
2696
|
-
* @returns {Function} A `useReduxContext` hook bound to the specified context.
|
|
2701
|
+
/**
|
|
2702
|
+
* Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level
|
|
2703
|
+
* hook that you should usually not need to call directly.
|
|
2704
|
+
*
|
|
2705
|
+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
2706
|
+
* @returns {Function} A `useReduxContext` hook bound to the specified context.
|
|
2697
2707
|
*/
|
|
2698
2708
|
function createReduxContextHook(context = Context_ReactReduxContext) {
|
|
2699
2709
|
return function useReduxContext() {
|
|
@@ -2704,21 +2714,21 @@ function createReduxContextHook(context = Context_ReactReduxContext) {
|
|
|
2704
2714
|
return contextValue;
|
|
2705
2715
|
};
|
|
2706
2716
|
}
|
|
2707
|
-
/**
|
|
2708
|
-
* A hook to access the value of the `ReactReduxContext`. This is a low-level
|
|
2709
|
-
* hook that you should usually not need to call directly.
|
|
2710
|
-
*
|
|
2711
|
-
* @returns {any} the value of the `ReactReduxContext`
|
|
2712
|
-
*
|
|
2713
|
-
* @example
|
|
2714
|
-
*
|
|
2715
|
-
* import React from 'react'
|
|
2716
|
-
* import { useReduxContext } from 'react-redux'
|
|
2717
|
-
*
|
|
2718
|
-
* export const CounterComponent = () => {
|
|
2719
|
-
* const { store } = useReduxContext()
|
|
2720
|
-
* return <div>{store.getState()}</div>
|
|
2721
|
-
* }
|
|
2717
|
+
/**
|
|
2718
|
+
* A hook to access the value of the `ReactReduxContext`. This is a low-level
|
|
2719
|
+
* hook that you should usually not need to call directly.
|
|
2720
|
+
*
|
|
2721
|
+
* @returns {any} the value of the `ReactReduxContext`
|
|
2722
|
+
*
|
|
2723
|
+
* @example
|
|
2724
|
+
*
|
|
2725
|
+
* import React from 'react'
|
|
2726
|
+
* import { useReduxContext } from 'react-redux'
|
|
2727
|
+
*
|
|
2728
|
+
* export const CounterComponent = () => {
|
|
2729
|
+
* const { store } = useReduxContext()
|
|
2730
|
+
* return <div>{store.getState()}</div>
|
|
2731
|
+
* }
|
|
2722
2732
|
*/
|
|
2723
2733
|
|
|
2724
2734
|
const useReduxContext_useReduxContext = /*#__PURE__*/createReduxContextHook();
|
|
@@ -2737,11 +2747,11 @@ const initializeUseSelector = fn => {
|
|
|
2737
2747
|
};
|
|
2738
2748
|
|
|
2739
2749
|
const refEquality = (a, b) => a === b;
|
|
2740
|
-
/**
|
|
2741
|
-
* Hook factory, which creates a `useSelector` hook bound to a given context.
|
|
2742
|
-
*
|
|
2743
|
-
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
2744
|
-
* @returns {Function} A `useSelector` hook bound to the specified context.
|
|
2750
|
+
/**
|
|
2751
|
+
* Hook factory, which creates a `useSelector` hook bound to a given context.
|
|
2752
|
+
*
|
|
2753
|
+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
2754
|
+
* @returns {Function} A `useSelector` hook bound to the specified context.
|
|
2745
2755
|
*/
|
|
2746
2756
|
|
|
2747
2757
|
|
|
@@ -2781,28 +2791,28 @@ function createSelectorHook(context = Context_ReactReduxContext) {
|
|
|
2781
2791
|
return selectedState;
|
|
2782
2792
|
};
|
|
2783
2793
|
}
|
|
2784
|
-
/**
|
|
2785
|
-
* A hook to access the redux store's state. This hook takes a selector function
|
|
2786
|
-
* as an argument. The selector is called with the store state.
|
|
2787
|
-
*
|
|
2788
|
-
* This hook takes an optional equality comparison function as the second parameter
|
|
2789
|
-
* that allows you to customize the way the selected state is compared to determine
|
|
2790
|
-
* whether the component needs to be re-rendered.
|
|
2791
|
-
*
|
|
2792
|
-
* @param {Function} selector the selector function
|
|
2793
|
-
* @param {Function=} equalityFn the function that will be used to determine equality
|
|
2794
|
-
*
|
|
2795
|
-
* @returns {any} the selected state
|
|
2796
|
-
*
|
|
2797
|
-
* @example
|
|
2798
|
-
*
|
|
2799
|
-
* import React from 'react'
|
|
2800
|
-
* import { useSelector } from 'react-redux'
|
|
2801
|
-
*
|
|
2802
|
-
* export const CounterComponent = () => {
|
|
2803
|
-
* const counter = useSelector(state => state.counter)
|
|
2804
|
-
* return <div>{counter}</div>
|
|
2805
|
-
* }
|
|
2794
|
+
/**
|
|
2795
|
+
* A hook to access the redux store's state. This hook takes a selector function
|
|
2796
|
+
* as an argument. The selector is called with the store state.
|
|
2797
|
+
*
|
|
2798
|
+
* This hook takes an optional equality comparison function as the second parameter
|
|
2799
|
+
* that allows you to customize the way the selected state is compared to determine
|
|
2800
|
+
* whether the component needs to be re-rendered.
|
|
2801
|
+
*
|
|
2802
|
+
* @param {Function} selector the selector function
|
|
2803
|
+
* @param {Function=} equalityFn the function that will be used to determine equality
|
|
2804
|
+
*
|
|
2805
|
+
* @returns {any} the selected state
|
|
2806
|
+
*
|
|
2807
|
+
* @example
|
|
2808
|
+
*
|
|
2809
|
+
* import React from 'react'
|
|
2810
|
+
* import { useSelector } from 'react-redux'
|
|
2811
|
+
*
|
|
2812
|
+
* export const CounterComponent = () => {
|
|
2813
|
+
* const counter = useSelector(state => state.counter)
|
|
2814
|
+
* return <div>{counter}</div>
|
|
2815
|
+
* }
|
|
2806
2816
|
*/
|
|
2807
2817
|
|
|
2808
2818
|
const useSelector_useSelector = /*#__PURE__*/createSelectorHook();
|
|
@@ -3092,31 +3102,31 @@ const initStateUpdates = () => EMPTY_ARRAY;
|
|
|
3092
3102
|
function strictEqual(a, b) {
|
|
3093
3103
|
return a === b;
|
|
3094
3104
|
}
|
|
3095
|
-
/**
|
|
3096
|
-
* Infers the type of props that a connector will inject into a component.
|
|
3105
|
+
/**
|
|
3106
|
+
* Infers the type of props that a connector will inject into a component.
|
|
3097
3107
|
*/
|
|
3098
3108
|
|
|
3099
3109
|
|
|
3100
3110
|
let hasWarnedAboutDeprecatedPureOption = false;
|
|
3101
|
-
/**
|
|
3102
|
-
* Connects a React component to a Redux store.
|
|
3103
|
-
*
|
|
3104
|
-
* - Without arguments, just wraps the component, without changing the behavior / props
|
|
3105
|
-
*
|
|
3106
|
-
* - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior
|
|
3107
|
-
* is to override ownProps (as stated in the docs), so what remains is everything that's
|
|
3108
|
-
* not a state or dispatch prop
|
|
3109
|
-
*
|
|
3110
|
-
* - When 3rd param is passed, we don't know if ownProps propagate and whether they
|
|
3111
|
-
* should be valid component props, because it depends on mergeProps implementation.
|
|
3112
|
-
* As such, it is the user's responsibility to extend ownProps interface from state or
|
|
3113
|
-
* dispatch props or both when applicable
|
|
3114
|
-
*
|
|
3115
|
-
* @param mapStateToProps A function that extracts values from state
|
|
3116
|
-
* @param mapDispatchToProps Setup for dispatching actions
|
|
3117
|
-
* @param mergeProps Optional callback to merge state and dispatch props together
|
|
3118
|
-
* @param options Options for configuring the connection
|
|
3119
|
-
*
|
|
3111
|
+
/**
|
|
3112
|
+
* Connects a React component to a Redux store.
|
|
3113
|
+
*
|
|
3114
|
+
* - Without arguments, just wraps the component, without changing the behavior / props
|
|
3115
|
+
*
|
|
3116
|
+
* - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior
|
|
3117
|
+
* is to override ownProps (as stated in the docs), so what remains is everything that's
|
|
3118
|
+
* not a state or dispatch prop
|
|
3119
|
+
*
|
|
3120
|
+
* - When 3rd param is passed, we don't know if ownProps propagate and whether they
|
|
3121
|
+
* should be valid component props, because it depends on mergeProps implementation.
|
|
3122
|
+
* As such, it is the user's responsibility to extend ownProps interface from state or
|
|
3123
|
+
* dispatch props or both when applicable
|
|
3124
|
+
*
|
|
3125
|
+
* @param mapStateToProps A function that extracts values from state
|
|
3126
|
+
* @param mapDispatchToProps Setup for dispatching actions
|
|
3127
|
+
* @param mergeProps Optional callback to merge state and dispatch props together
|
|
3128
|
+
* @param options Options for configuring the connection
|
|
3129
|
+
*
|
|
3120
3130
|
*/
|
|
3121
3131
|
|
|
3122
3132
|
function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
@@ -3162,7 +3172,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3162
3172
|
};
|
|
3163
3173
|
|
|
3164
3174
|
function ConnectFunction(props) {
|
|
3165
|
-
const [propsContext, reactReduxForwardedRef, wrapperProps] = useMemo(() => {
|
|
3175
|
+
const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => {
|
|
3166
3176
|
// Distinguish between actual "data" props that were passed to the wrapper component,
|
|
3167
3177
|
// and values needed to control behavior (forwarded refs, alternate context instances).
|
|
3168
3178
|
// To maintain the wrapperProps object reference, memoize this destructuring.
|
|
@@ -3173,14 +3183,14 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3173
3183
|
|
|
3174
3184
|
return [props.context, reactReduxForwardedRef, wrapperProps];
|
|
3175
3185
|
}, [props]);
|
|
3176
|
-
const ContextToUse = useMemo(() => {
|
|
3186
|
+
const ContextToUse = React.useMemo(() => {
|
|
3177
3187
|
// Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.
|
|
3178
3188
|
// Memoize the check that determines which context instance we should use.
|
|
3179
3189
|
return propsContext && propsContext.Consumer && // @ts-ignore
|
|
3180
3190
|
isContextConsumer( /*#__PURE__*/React.createElement(propsContext.Consumer, null)) ? propsContext : Context;
|
|
3181
3191
|
}, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available
|
|
3182
3192
|
|
|
3183
|
-
const contextValue = useContext(ContextToUse); // The store _must_ exist as either a prop or in context.
|
|
3193
|
+
const contextValue = React.useContext(ContextToUse); // The store _must_ exist as either a prop or in context.
|
|
3184
3194
|
// We'll check to see if it _looks_ like a Redux store first.
|
|
3185
3195
|
// This allows us to pass through a `store` prop that is just a plain value.
|
|
3186
3196
|
|
|
@@ -3192,12 +3202,12 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3192
3202
|
|
|
3193
3203
|
const store = didStoreComeFromProps ? props.store : contextValue.store;
|
|
3194
3204
|
const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;
|
|
3195
|
-
const childPropsSelector = useMemo(() => {
|
|
3205
|
+
const childPropsSelector = React.useMemo(() => {
|
|
3196
3206
|
// The child props selector needs the store reference as an input.
|
|
3197
3207
|
// Re-create this selector whenever the store changes.
|
|
3198
3208
|
return defaultSelectorFactory(store.dispatch, selectorFactoryOptions);
|
|
3199
3209
|
}, [store]);
|
|
3200
|
-
const [subscription, notifyNestedSubs] = useMemo(() => {
|
|
3210
|
+
const [subscription, notifyNestedSubs] = React.useMemo(() => {
|
|
3201
3211
|
if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component
|
|
3202
3212
|
// connected to the store via props shouldn't use subscription from context, or vice versa.
|
|
3203
3213
|
|
|
@@ -3211,7 +3221,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3211
3221
|
}, [store, didStoreComeFromProps, contextValue]); // Determine what {store, subscription} value should be put into nested context, if necessary,
|
|
3212
3222
|
// and memoize that value to avoid unnecessary context updates.
|
|
3213
3223
|
|
|
3214
|
-
const overriddenContextValue = useMemo(() => {
|
|
3224
|
+
const overriddenContextValue = React.useMemo(() => {
|
|
3215
3225
|
if (didStoreComeFromProps) {
|
|
3216
3226
|
// This component is directly subscribed to a store from props.
|
|
3217
3227
|
// We don't want descendants reading from this store - pass down whatever
|
|
@@ -3226,20 +3236,20 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3226
3236
|
});
|
|
3227
3237
|
}, [didStoreComeFromProps, contextValue, subscription]); // Set up refs to coordinate values between the subscription effect and the render logic
|
|
3228
3238
|
|
|
3229
|
-
const lastChildProps = useRef();
|
|
3230
|
-
const lastWrapperProps = useRef(wrapperProps);
|
|
3231
|
-
const childPropsFromStoreUpdate = useRef();
|
|
3232
|
-
const renderIsScheduled = useRef(false);
|
|
3233
|
-
const isProcessingDispatch = useRef(false);
|
|
3234
|
-
const isMounted = useRef(false);
|
|
3235
|
-
const latestSubscriptionCallbackError = useRef();
|
|
3239
|
+
const lastChildProps = React.useRef();
|
|
3240
|
+
const lastWrapperProps = React.useRef(wrapperProps);
|
|
3241
|
+
const childPropsFromStoreUpdate = React.useRef();
|
|
3242
|
+
const renderIsScheduled = React.useRef(false);
|
|
3243
|
+
const isProcessingDispatch = React.useRef(false);
|
|
3244
|
+
const isMounted = React.useRef(false);
|
|
3245
|
+
const latestSubscriptionCallbackError = React.useRef();
|
|
3236
3246
|
useIsomorphicLayoutEffect(() => {
|
|
3237
3247
|
isMounted.current = true;
|
|
3238
3248
|
return () => {
|
|
3239
3249
|
isMounted.current = false;
|
|
3240
3250
|
};
|
|
3241
3251
|
}, []);
|
|
3242
|
-
const actualChildPropsSelector = useMemo(() => {
|
|
3252
|
+
const actualChildPropsSelector = React.useMemo(() => {
|
|
3243
3253
|
const selector = () => {
|
|
3244
3254
|
// Tricky logic here:
|
|
3245
3255
|
// - This render may have been triggered by a Redux store update that produced new child props
|
|
@@ -3263,7 +3273,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3263
3273
|
// about useLayoutEffect in SSR, so we try to detect environment and fall back to
|
|
3264
3274
|
// just useEffect instead to avoid the warning, since neither will run anyway.
|
|
3265
3275
|
|
|
3266
|
-
const subscribeForReact = useMemo(() => {
|
|
3276
|
+
const subscribeForReact = React.useMemo(() => {
|
|
3267
3277
|
const subscribe = reactListener => {
|
|
3268
3278
|
if (!subscription) {
|
|
3269
3279
|
return () => {};
|
|
@@ -3299,7 +3309,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3299
3309
|
}); // Now that all that's done, we can finally try to actually render the child component.
|
|
3300
3310
|
// We memoize the elements for the rendered child component as an optimization.
|
|
3301
3311
|
|
|
3302
|
-
const renderedWrappedComponent = useMemo(() => {
|
|
3312
|
+
const renderedWrappedComponent = React.useMemo(() => {
|
|
3303
3313
|
return (
|
|
3304
3314
|
/*#__PURE__*/
|
|
3305
3315
|
// @ts-ignore
|
|
@@ -3310,7 +3320,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps, {
|
|
|
3310
3320
|
}, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering
|
|
3311
3321
|
// that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.
|
|
3312
3322
|
|
|
3313
|
-
const renderedChild = useMemo(() => {
|
|
3323
|
+
const renderedChild = React.useMemo(() => {
|
|
3314
3324
|
if (shouldHandleStateChanges) {
|
|
3315
3325
|
// If this component is subscribed to store updates, we need to pass its own
|
|
3316
3326
|
// subscription instance down to our descendants. That means rendering the same
|
|
@@ -3367,7 +3377,7 @@ function Provider({
|
|
|
3367
3377
|
stabilityCheck = 'once',
|
|
3368
3378
|
noopCheck = 'once'
|
|
3369
3379
|
}) {
|
|
3370
|
-
const contextValue =
|
|
3380
|
+
const contextValue = compat_module.useMemo(() => {
|
|
3371
3381
|
const subscription = Subscription_createSubscription(store);
|
|
3372
3382
|
return {
|
|
3373
3383
|
store,
|
|
@@ -3377,7 +3387,7 @@ function Provider({
|
|
|
3377
3387
|
noopCheck
|
|
3378
3388
|
};
|
|
3379
3389
|
}, [store, serverState, stabilityCheck, noopCheck]);
|
|
3380
|
-
const previousState =
|
|
3390
|
+
const previousState = compat_module.useMemo(() => store.getState(), [store]);
|
|
3381
3391
|
useIsomorphicLayoutEffect_useIsomorphicLayoutEffect(() => {
|
|
3382
3392
|
const {
|
|
3383
3393
|
subscription
|
|
@@ -3396,7 +3406,7 @@ function Provider({
|
|
|
3396
3406
|
}, [contextValue, previousState]);
|
|
3397
3407
|
const Context = context || Context_ReactReduxContext; // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype
|
|
3398
3408
|
|
|
3399
|
-
return /*#__PURE__*/compat_module
|
|
3409
|
+
return /*#__PURE__*/compat_module.createElement(Context.Provider, {
|
|
3400
3410
|
value: contextValue
|
|
3401
3411
|
}, children);
|
|
3402
3412
|
}
|
|
@@ -3405,11 +3415,11 @@ function Provider({
|
|
|
3405
3415
|
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useStore.js
|
|
3406
3416
|
|
|
3407
3417
|
|
|
3408
|
-
/**
|
|
3409
|
-
* Hook factory, which creates a `useStore` hook bound to a given context.
|
|
3410
|
-
*
|
|
3411
|
-
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
3412
|
-
* @returns {Function} A `useStore` hook bound to the specified context.
|
|
3418
|
+
/**
|
|
3419
|
+
* Hook factory, which creates a `useStore` hook bound to a given context.
|
|
3420
|
+
*
|
|
3421
|
+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
3422
|
+
* @returns {Function} A `useStore` hook bound to the specified context.
|
|
3413
3423
|
*/
|
|
3414
3424
|
|
|
3415
3425
|
function createStoreHook(context = Context_ReactReduxContext) {
|
|
@@ -3424,31 +3434,31 @@ function createStoreHook(context = Context_ReactReduxContext) {
|
|
|
3424
3434
|
return store;
|
|
3425
3435
|
};
|
|
3426
3436
|
}
|
|
3427
|
-
/**
|
|
3428
|
-
* A hook to access the redux store.
|
|
3429
|
-
*
|
|
3430
|
-
* @returns {any} the redux store
|
|
3431
|
-
*
|
|
3432
|
-
* @example
|
|
3433
|
-
*
|
|
3434
|
-
* import React from 'react'
|
|
3435
|
-
* import { useStore } from 'react-redux'
|
|
3436
|
-
*
|
|
3437
|
-
* export const ExampleComponent = () => {
|
|
3438
|
-
* const store = useStore()
|
|
3439
|
-
* return <div>{store.getState()}</div>
|
|
3440
|
-
* }
|
|
3437
|
+
/**
|
|
3438
|
+
* A hook to access the redux store.
|
|
3439
|
+
*
|
|
3440
|
+
* @returns {any} the redux store
|
|
3441
|
+
*
|
|
3442
|
+
* @example
|
|
3443
|
+
*
|
|
3444
|
+
* import React from 'react'
|
|
3445
|
+
* import { useStore } from 'react-redux'
|
|
3446
|
+
*
|
|
3447
|
+
* export const ExampleComponent = () => {
|
|
3448
|
+
* const store = useStore()
|
|
3449
|
+
* return <div>{store.getState()}</div>
|
|
3450
|
+
* }
|
|
3441
3451
|
*/
|
|
3442
3452
|
|
|
3443
3453
|
const useStore_useStore = /*#__PURE__*/createStoreHook();
|
|
3444
3454
|
;// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useDispatch.js
|
|
3445
3455
|
|
|
3446
3456
|
|
|
3447
|
-
/**
|
|
3448
|
-
* Hook factory, which creates a `useDispatch` hook bound to a given context.
|
|
3449
|
-
*
|
|
3450
|
-
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
3451
|
-
* @returns {Function} A `useDispatch` hook bound to the specified context.
|
|
3457
|
+
/**
|
|
3458
|
+
* Hook factory, which creates a `useDispatch` hook bound to a given context.
|
|
3459
|
+
*
|
|
3460
|
+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
|
|
3461
|
+
* @returns {Function} A `useDispatch` hook bound to the specified context.
|
|
3452
3462
|
*/
|
|
3453
3463
|
|
|
3454
3464
|
function createDispatchHook(context = Context_ReactReduxContext) {
|
|
@@ -3460,26 +3470,26 @@ function createDispatchHook(context = Context_ReactReduxContext) {
|
|
|
3460
3470
|
return store.dispatch;
|
|
3461
3471
|
};
|
|
3462
3472
|
}
|
|
3463
|
-
/**
|
|
3464
|
-
* A hook to access the redux `dispatch` function.
|
|
3465
|
-
*
|
|
3466
|
-
* @returns {any|function} redux store's `dispatch` function
|
|
3467
|
-
*
|
|
3468
|
-
* @example
|
|
3469
|
-
*
|
|
3470
|
-
* import React, { useCallback } from 'react'
|
|
3471
|
-
* import { useDispatch } from 'react-redux'
|
|
3472
|
-
*
|
|
3473
|
-
* export const CounterComponent = ({ value }) => {
|
|
3474
|
-
* const dispatch = useDispatch()
|
|
3475
|
-
* const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])
|
|
3476
|
-
* return (
|
|
3477
|
-
* <div>
|
|
3478
|
-
* <span>{value}</span>
|
|
3479
|
-
* <button onClick={increaseCounter}>Increase counter</button>
|
|
3480
|
-
* </div>
|
|
3481
|
-
* )
|
|
3482
|
-
* }
|
|
3473
|
+
/**
|
|
3474
|
+
* A hook to access the redux `dispatch` function.
|
|
3475
|
+
*
|
|
3476
|
+
* @returns {any|function} redux store's `dispatch` function
|
|
3477
|
+
*
|
|
3478
|
+
* @example
|
|
3479
|
+
*
|
|
3480
|
+
* import React, { useCallback } from 'react'
|
|
3481
|
+
* import { useDispatch } from 'react-redux'
|
|
3482
|
+
*
|
|
3483
|
+
* export const CounterComponent = ({ value }) => {
|
|
3484
|
+
* const dispatch = useDispatch()
|
|
3485
|
+
* const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])
|
|
3486
|
+
* return (
|
|
3487
|
+
* <div>
|
|
3488
|
+
* <span>{value}</span>
|
|
3489
|
+
* <button onClick={increaseCounter}>Increase counter</button>
|
|
3490
|
+
* </div>
|
|
3491
|
+
* )
|
|
3492
|
+
* }
|
|
3483
3493
|
*/
|
|
3484
3494
|
|
|
3485
3495
|
const useDispatch = /*#__PURE__*/createDispatchHook();
|
|
@@ -14007,21 +14017,25 @@ const SeamlyEventSubscriber = () => {
|
|
|
14007
14017
|
}
|
|
14008
14018
|
}, [api, api.connectionInfo, api.conversation.socket, dispatch]);
|
|
14009
14019
|
(0,hooks_.useEffect)(() => {
|
|
14010
|
-
api.conversation.
|
|
14011
|
-
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14020
|
+
if (api.connectionInfo && api.conversation.socket) {
|
|
14021
|
+
api.conversation.onConnection(({
|
|
14022
|
+
currentState
|
|
14023
|
+
}) => {
|
|
14024
|
+
if (currentState === 'join_channel_erred') {
|
|
14025
|
+
const seamlyGeneralError = new SeamlyGeneralError();
|
|
14026
|
+
dispatch(setInterrupt({
|
|
14027
|
+
name: seamlyGeneralError.name,
|
|
14028
|
+
message: seamlyGeneralError.message,
|
|
14029
|
+
langKey: seamlyGeneralError.langKey,
|
|
14030
|
+
originalEvent: seamlyGeneralError.originalEvent,
|
|
14031
|
+
originalError: seamlyGeneralError.originalError,
|
|
14032
|
+
action: seamlyGeneralError.action
|
|
14033
|
+
}));
|
|
14034
|
+
return true;
|
|
14035
|
+
}
|
|
14036
|
+
return false;
|
|
14037
|
+
});
|
|
14038
|
+
}
|
|
14025
14039
|
}, [api, api.connectionInfo, api.conversation.channel, dispatch]);
|
|
14026
14040
|
(0,hooks_.useEffect)(() => {
|
|
14027
14041
|
if (api.connectionInfo) {
|