intelicoreact 1.8.66 → 1.8.67

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.
@@ -18,7 +18,7 @@ export interface ITagProps extends IUniProps {
18
18
  popupClassName?: string;
19
19
  id?: string;
20
20
  isNoDismiss?: boolean;
21
- onClick?: (id?: string) => void;
21
+ onClick?: (id?: string, event?: React.MouseEvent<HTMLDivElement>) => void;
22
22
  isFreezed?: boolean;
23
23
  readOnly?: boolean;
24
24
  }
@@ -1 +1 @@
1
- function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,u=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(u)throw r}}return a}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return f}});var n=require("react/jsx-runtime"),r=i(require("classnames")),o=function(e,t){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(require("react")),a=require("react-dom"),l=require("react-feather"),u=i(require("../../Layout/Spinner"));function i(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function s(){}require("./Tag.scss");var f=function(e){var i,c,f=e.value,d=e.className,p=e.style,v=e.label,m=e.warning,y=e.isWarningHint,g=e.removeItem,b=e.name,h=e.isPopup,j=e.popupInfoContent,w=e.popupClassName,x=e.id,_=e.isNoDismiss,O=e.onClick,M=void 0===O?s:O,P=e.testId,k=(0,o.useRef)(null),N=t((0,o.useState)(!1),2),S=N[0],C=N[1],E=t((0,o.useState)(!1),2),q=E[0],A=E[1],I=null!=(c=null==k||null==(i=k.current)?void 0:i.getBoundingClientRect())?c:{},L=I.x,W=I.y,D=I.height,R=I.width,T=window.scrollY,B=(0,o.useMemo)(function(){if(!q||!(null==k?void 0:k.current))return{};var e,t=null==k||null==(e=k.current)?void 0:e.getBoundingClientRect(),n=t.x,r=t.y,o=t.height,a=t.width;return{left:"".concat(n,"px"),top:"".concat(r+T,"px"),transform:"translate(calc(-1 * calc(100% - ".concat(a/2+22,"px)), ").concat(o+10,"px)")}},[q,L,W,R,D,T]),z=(0,o.useMemo)(function(){var e,t={};return"#242424"===(null!=(e=null==p?void 0:p.backgroundColor)?e:null==p?void 0:p.background)&&(t.color="#fff"),t},[p]),H=function(){h&&A(!q),M(x)},U=function(){A(!1)};return(0,o.useEffect)(function(){return document.addEventListener("click",U,!0),function(){document.removeEventListener("click",U,!0)}},[]),(0,o.useEffect)(function(){var e=function(){A(!1)};return window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[]),(0,n.jsxs)("div",{onMouseEnter:function(){return C(!0)},onMouseLeave:function(){return C(!1)},"data-testid":void 0===P?"tag":P,role:"listitem","aria-label":"Tag: ".concat(v||b),className:(0,r.default)("tag",d,{"tag-warn":m}),style:null!=p?p:{},onClick:function(){return H()},ref:k,children:[m&&"string"==typeof m&&(0,n.jsx)(l.AlertTriangle,{className:"advanced-tags--warning-icon mr5","aria-label":"Warning"}),m&&"string"==typeof m&&S&&(void 0===y||y)&&(0,n.jsx)("div",{className:"tag__warn-hint",role:"tooltip",children:m}),(0,n.jsx)("span",{className:"tag__label",style:z,children:v||b}),g&&!(void 0===_||_)&&(0,n.jsx)("button",{type:"button",onClick:function(e){null==e||e.preventDefault(),null==e||e.stopPropagation(),g(f)},"aria-label":"Remove ".concat(v||b),className:"tag__button",children:(0,n.jsx)(l.X,{className:"color--text"})}),q&&(0,a.createPortal)((0,n.jsx)("div",{id:"tagPopup".concat(f),className:(0,r.default)("tag__popup",w),style:B,children:j||(0,n.jsx)(u.default,{size:"small"})}),document.getElementById("root"))]})};
1
+ function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,u=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(u)throw r}}return a}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}}(t,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return f}});var n=require("react/jsx-runtime"),r=i(require("classnames")),o=function(e,t){if(e&&e.__esModule)return e;if(null===e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}(require("react")),a=require("react-dom"),l=require("react-feather"),u=i(require("../../Layout/Spinner"));function i(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function s(){}require("./Tag.scss");var f=function(e){var i,c,f=e.value,d=e.className,p=e.style,v=e.label,m=e.warning,y=e.isWarningHint,g=e.removeItem,b=e.name,h=e.isPopup,j=e.popupInfoContent,w=e.popupClassName,x=e.id,_=e.isNoDismiss,O=e.onClick,M=void 0===O?s:O,P=e.testId,k=(0,o.useRef)(null),N=t((0,o.useState)(!1),2),S=N[0],C=N[1],E=t((0,o.useState)(!1),2),q=E[0],A=E[1],I=null!=(c=null==k||null==(i=k.current)?void 0:i.getBoundingClientRect())?c:{},L=I.x,W=I.y,D=I.height,R=I.width,T=window.scrollY,B=(0,o.useMemo)(function(){if(!q||!(null==k?void 0:k.current))return{};var e,t=null==k||null==(e=k.current)?void 0:e.getBoundingClientRect(),n=t.x,r=t.y,o=t.height,a=t.width;return{left:"".concat(n,"px"),top:"".concat(r+T,"px"),transform:"translate(calc(-1 * calc(100% - ".concat(a/2+22,"px)), ").concat(o+10,"px)")}},[q,L,W,R,D,T]),z=(0,o.useMemo)(function(){var e,t={};return"#242424"===(null!=(e=null==p?void 0:p.backgroundColor)?e:null==p?void 0:p.background)&&(t.color="#fff"),t},[p]),H=function(e){h&&A(!q),M(x,e)},U=function(){A(!1)};return(0,o.useEffect)(function(){return document.addEventListener("click",U,!0),function(){document.removeEventListener("click",U,!0)}},[]),(0,o.useEffect)(function(){var e=function(){A(!1)};return window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[]),(0,n.jsxs)("div",{onMouseEnter:function(){return C(!0)},onMouseLeave:function(){return C(!1)},"data-testid":void 0===P?"tag":P,role:"listitem","aria-label":"Tag: ".concat(v||b),className:(0,r.default)("tag",d,{"tag-warn":m}),style:null!=p?p:{},onClick:function(e){return H(e)},ref:k,children:[m&&"string"==typeof m&&(0,n.jsx)(l.AlertTriangle,{className:"advanced-tags--warning-icon mr5","aria-label":"Warning"}),m&&"string"==typeof m&&S&&(void 0===y||y)&&(0,n.jsx)("div",{className:"tag__warn-hint",role:"tooltip",children:m}),(0,n.jsx)("span",{className:"tag__label",style:z,children:v||b}),g&&!(void 0===_||_)&&(0,n.jsx)("button",{type:"button",onClick:function(e){null==e||e.preventDefault(),null==e||e.stopPropagation(),g(f)},"aria-label":"Remove ".concat(v||b),className:"tag__button",children:(0,n.jsx)(l.X,{className:"color--text"})}),q&&(0,a.createPortal)((0,n.jsx)("div",{id:"tagPopup".concat(f),className:(0,r.default)("tag__popup",w),style:B,children:j||(0,n.jsx)(u.default,{size:"small"})}),document.getElementById("root"))]})};
@@ -1 +1 @@
1
- function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){var n;n=r[e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return t}function r(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r.push.apply(r,n)}return r})(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var l=[],u=!0,o=!1;try{for(i=i.call(t);!(u=(r=i.next()).done)&&(l.push(r.value),!e||l.length!==e);u=!0);}catch(t){o=!0,n=t}finally{try{u||null==i.return||i.return()}finally{if(o)throw n}}return l}}(t,e)||i(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(e,r)}}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return d}});var l=require("react/jsx-runtime"),u=f(require("classnames")),o=require("react"),a=require("react-feather"),c=require("../../../Functions/utils"),s=f(require("../Tag/Tag"));function f(t){return t&&t.__esModule?t:{default:t}}require("./TagList.scss");var d=function(f){var d,m,p,v=f.disabled,g=f.className,y=f.onTagClick,b=f.removeItem,h=f.items,w=f.withToggle,j=void 0===w||w,O=f.disableShowMore,S=void 0!==O&&O,N=f.shownItemsCount,_=void 0===N?"auto":N,I=f.testId,x=f.refProp,P=f.renderOrder,k=f.onEditClick,C=f.onToggleRenderAll,E=(0,o.useRef)(null),A=n((0,o.useState)([]),2),R=A[0],T=A[1],q=n((0,o.useState)(-1),2),D=q[0],L=q[1],M=n((0,o.useState)(-1),2),B=M[0],z=M[1],F=n((0,o.useState)(!j),2),U=F[0],W=F[1],$=null!=(p=null==E||null==(m=E.current)||null==(d=m.getBoundingClientRect())?void 0:d.width)?p:-1,G=function(t){W(t),null==C||C(t)},H=function(e){if("number"==typeof _)return _;var r,n="function"==typeof k?60:32,l=R.reduce(function(r,l,u){var o,a,c,s,f,d,m=l.itemRef;if(r.skip)return r;var p=(null==m?void 0:m.current)&&window.getComputedStyle(m.current),v=[Number.parseInt((null!=(s=null==(c=m.current)||null==(a=c.getBoundingClientRect())?void 0:a.width)?s:0).toString(),10),Number.parseInt((null!=(f=null==p?void 0:p.marginLeft)?f:0).toString(),10),Number.parseInt((null!=(d=null==p?void 0:p.marginRight)?d:0).toString(),10)].reduce(function(t,e){return Number.isNaN(e)||(t+=e),t},0);return!Number.isNaN(v)&&v>0&&v+r.width<e-n||0===u?r={count:r.count+1,width:r.width+v,items:((function(e){if(Array.isArray(e))return t(e)})(o=r.items)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||i(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{w:v,r:null==m?void 0:m.current}])}:r.skip=!0,r},{count:0,width:0,items:[],skip:!1});return(null==l||null==(r=l.items)?void 0:r.length)===1&&l.items[0].r&&R.length>1&&(l.items[0].r.style.maxWidth="".concat(e-n-8,"px")),null==l?void 0:l.count},J=function(t,e){null==e||e()};return(0,o.useEffect)(function(){L(-1),z(-1),G(!1),T(h.map(function(t){return r(e({},t),{itemRef:(0,o.createRef)()})}))},[h]),(0,o.useLayoutEffect)(function(){if(j&&-1!==$&&-1===D){var t,e=$;0===e&&(e=Number.parseInt(((null==E?void 0:E.current)?null==(t=window.getComputedStyle(null==E?void 0:E.current))?void 0:t.width:0).toString())),Number.isNaN(e)||L(H(e))}},[R,$,null==E?void 0:E.current]),(0,o.useLayoutEffect)(function(){z(D)},[D]),(0,o.useEffect)(function(){z(U?null==R?void 0:R.length:D)},[U]),(0,o.useEffect)(function(){(null==E?void 0:E.current)&&x&&(x.current=null==E?void 0:E.current)},[null==E?void 0:E.current]),(0,l.jsxs)("div",{"data-testid":void 0===I?"test-taglist":I,className:(0,u.default)("tag-list_wrapper","".concat(B===(null==R?void 0:R.length)&&j&&-1!==D&&D!==(null==R?void 0:R.length)?"tag-list_wrapper--all-items":"tag-list_wrapper--only-static-items"),g,{"tag-list_wrapper--disabled":v}),style:{visibility:-1===D?"hidden":"visible",zIndex:-1===D?"-1":"auto"},ref:E,children:[(null!=P?P:R.map(function(t){var e=t.value,r=t.id;return null!=r?r:e})).map(function(t,n){var i,u,o=R.find(function(e){var r=e.value,n=e.id;return n?n===t:!!r&&r===t});if(!o)return null;var a=-1!==B&&-1!==D&&n>=B;return(0,l.jsx)("div",{className:"tag-list_wrapper_item ".concat(a?"tag-list_wrapper_item--hidden":""),ref:(0,c.checkedRef)(null==o?void 0:o.itemRef),children:(0,l.jsx)(s.default,r(e({testId:"test-taglist-item-".concat(null!=(i=null==o?void 0:o.id)?i:null==o?void 0:o.value)},o),{onClick:y,removeItem:b}))},"tag-list-item-".concat(null!=(u=null==o?void 0:o.id)?u:null==o?void 0:o.value))}),function(){if("number"==typeof _&&(null==R?void 0:R.length)<_||!(null==R?void 0:R.length)||S)return null;var t=R.length-B;return 0!==t&&j&&-1!==D?(0,l.jsx)(s.default,{label:"+".concat(t),className:"tag-list_wrapper_render-more",onClick:S?function(){}:function(t){return J(t,function(){return G(!0)})}}):null}(),B===(null==R?void 0:R.length)&&j&&-1!==D&&D!==(null==R?void 0:R.length)?(0,l.jsx)(s.default,{label:"...",className:"tag-list_wrapper_hide-more",onClick:function(t){return J(t,function(){return G(!1)})}}):null,"function"==typeof k&&(0,l.jsx)("div",{className:"tag-list__edit-trigger",children:(0,l.jsx)(a.Edit3,{onClick:k})})]})};
1
+ function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r;r=n[e],e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})}return t}function n(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,l=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=l){var i=[],u=!0,o=!1;try{for(l=l.call(t);!(u=(n=l.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){o=!0,r=t}finally{try{u||null==l.return||l.return()}finally{if(o)throw r}}return i}}(t,e)||l(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t(e,n)}}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return d}});var i=require("react/jsx-runtime"),u=f(require("classnames")),o=require("react"),a=require("react-feather"),c=require("../../../Functions/utils"),s=f(require("../Tag/Tag"));function f(t){return t&&t.__esModule?t:{default:t}}require("./TagList.scss");var d=function(f){var d,p,m,v=f.disabled,g=f.className,y=f.onTagClick,b=f.removeItem,h=f.items,w=f.withToggle,j=void 0===w||w,O=f.disableShowMore,S=void 0!==O&&O,N=f.shownItemsCount,_=void 0===N?"auto":N,I=f.testId,P=f.refProp,x=f.renderOrder,k=f.onEditClick,C=f.onToggleRenderAll,E=(0,o.useRef)(null),A=r((0,o.useState)([]),2),R=A[0],T=A[1],q=r((0,o.useState)(-1),2),D=q[0],L=q[1],M=r((0,o.useState)(-1),2),B=M[0],z=M[1],F=r((0,o.useState)(!j),2),U=F[0],W=F[1],$=null!=(m=null==E||null==(p=E.current)||null==(d=p.getBoundingClientRect())?void 0:d.width)?m:-1,G=function(t,e){W(t),null==C||C(t),null==e||e.stopPropagation(),null==e||e.preventDefault()},H=function(e){if("number"==typeof _)return _;var n,r="function"==typeof k?60:32,i=R.reduce(function(n,i,u){var o,a,c,s,f,d,p=i.itemRef;if(n.skip)return n;var m=(null==p?void 0:p.current)&&window.getComputedStyle(p.current),v=[Number.parseInt((null!=(s=null==(c=p.current)||null==(a=c.getBoundingClientRect())?void 0:a.width)?s:0).toString(),10),Number.parseInt((null!=(f=null==m?void 0:m.marginLeft)?f:0).toString(),10),Number.parseInt((null!=(d=null==m?void 0:m.marginRight)?d:0).toString(),10)].reduce(function(t,e){return Number.isNaN(e)||(t+=e),t},0);return!Number.isNaN(v)&&v>0&&v+n.width<e-r||0===u?n={count:n.count+1,width:n.width+v,items:((function(e){if(Array.isArray(e))return t(e)})(o=n.items)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||l(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([{w:v,r:null==p?void 0:p.current}])}:n.skip=!0,n},{count:0,width:0,items:[],skip:!1});return(null==i||null==(n=i.items)?void 0:n.length)===1&&i.items[0].r&&R.length>1&&(i.items[0].r.style.maxWidth="".concat(e-r-8,"px")),null==i?void 0:i.count},J=function(t,e){null==e||e()};return(0,o.useEffect)(function(){L(-1),z(-1),G(!1,null),T(h.map(function(t){return n(e({},t),{itemRef:(0,o.createRef)()})}))},[h]),(0,o.useLayoutEffect)(function(){if(j&&-1!==$&&-1===D){var t,e=$;0===e&&(e=Number.parseInt(((null==E?void 0:E.current)?null==(t=window.getComputedStyle(null==E?void 0:E.current))?void 0:t.width:0).toString())),Number.isNaN(e)||L(H(e))}},[R,$,null==E?void 0:E.current]),(0,o.useLayoutEffect)(function(){z(D)},[D]),(0,o.useEffect)(function(){z(U?null==R?void 0:R.length:D)},[U]),(0,o.useEffect)(function(){(null==E?void 0:E.current)&&P&&(P.current=null==E?void 0:E.current)},[null==E?void 0:E.current]),(0,i.jsxs)("div",{"data-testid":void 0===I?"test-taglist":I,className:(0,u.default)("tag-list_wrapper","".concat(B===(null==R?void 0:R.length)&&j&&-1!==D&&D!==(null==R?void 0:R.length)?"tag-list_wrapper--all-items":"tag-list_wrapper--only-static-items"),g,{"tag-list_wrapper--disabled":v}),style:{visibility:-1===D?"hidden":"visible",zIndex:-1===D?"-1":"auto"},ref:E,children:[(null!=x?x:R.map(function(t){var e=t.value,n=t.id;return null!=n?n:e})).map(function(t,r){var l,u,o=R.find(function(e){var n=e.value,r=e.id;return r?r===t:!!n&&n===t});if(!o)return null;var a=-1!==B&&-1!==D&&r>=B;return(0,i.jsx)("div",{className:"tag-list_wrapper_item ".concat(a?"tag-list_wrapper_item--hidden":""),ref:(0,c.checkedRef)(null==o?void 0:o.itemRef),children:(0,i.jsx)(s.default,n(e({testId:"test-taglist-item-".concat(null!=(l=null==o?void 0:o.id)?l:null==o?void 0:o.value)},o),{onClick:y,removeItem:b}))},"tag-list-item-".concat(null!=(u=null==o?void 0:o.id)?u:null==o?void 0:o.value))}),function(){if("number"==typeof _&&(null==R?void 0:R.length)<_||!(null==R?void 0:R.length)||S)return null;var t=R.length-B;return 0!==t&&j&&-1!==D?(0,i.jsx)(s.default,{label:"+".concat(t),className:"tag-list_wrapper_render-more",onClick:S?function(){}:function(t,e){return J(t,function(){return G(!0,e)})}}):null}(),B===(null==R?void 0:R.length)&&j&&-1!==D&&D!==(null==R?void 0:R.length)?(0,i.jsx)(s.default,{label:"...",className:"tag-list_wrapper_hide-more",onClick:function(t,e){return J(t,function(){return G(!1,e)})}}):null,"function"==typeof k&&(0,i.jsx)("div",{className:"tag-list__edit-trigger",children:(0,i.jsx)(a.Edit3,{onClick:k})})]})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.8.66",
3
+ "version": "1.8.67",
4
4
  "description": "",
5
5
  "author": "Andrey Isakov",
6
6
  "license": "ISC",