@e1011/es-kit 1.1.22 → 1.1.26

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 (135) hide show
  1. package/dist/hooks/esm/index.css +198 -198
  2. package/dist/hooks/esm/node_modules/gsap/CSSPlugin.js +11 -0
  3. package/dist/hooks/esm/node_modules/gsap/CSSPlugin.js.map +1 -0
  4. package/dist/hooks/esm/node_modules/gsap/gsap-core.js +11 -0
  5. package/dist/hooks/esm/node_modules/gsap/gsap-core.js.map +1 -0
  6. package/dist/hooks/esm/node_modules/gsap/index.js +2 -0
  7. package/dist/hooks/esm/node_modules/gsap/index.js.map +1 -0
  8. package/dist/hooks/esm/src/core/hooks/index.js +1 -1
  9. package/dist/hooks/esm/src/core/hooks/useAnimation.js +2 -0
  10. package/dist/hooks/esm/src/core/hooks/useAnimation.js.map +1 -0
  11. package/dist/hooks/esm/src/core/hooks/useClassNames.js.map +1 -1
  12. package/dist/hooks/esm/src/core/hooks/useIntersectionObserver.js +2 -0
  13. package/dist/hooks/esm/src/core/hooks/useIntersectionObserver.js.map +1 -0
  14. package/dist/hooks/esm/src/core/hooks/useOutsideClick.js.map +1 -1
  15. package/dist/hooks/esm/src/core/hooks/useParseProps.js.map +1 -1
  16. package/dist/hooks/esm/src/core/hooks/useResize.js.map +1 -1
  17. package/dist/hooks/esm/src/core/hooks/useThemePreference.js +1 -1
  18. package/dist/hooks/esm/src/core/hooks/useThemePreference.js.map +1 -1
  19. package/dist/hooks/esm/src/core/hooks/useToggle.js.map +1 -1
  20. package/dist/hooks/index.css +198 -198
  21. package/dist/hooks/node_modules/gsap/CSSPlugin.js +11 -0
  22. package/dist/hooks/node_modules/gsap/CSSPlugin.js.map +1 -0
  23. package/dist/hooks/node_modules/gsap/gsap-core.js +11 -0
  24. package/dist/hooks/node_modules/gsap/gsap-core.js.map +1 -0
  25. package/dist/hooks/node_modules/gsap/index.js +2 -0
  26. package/dist/hooks/node_modules/gsap/index.js.map +1 -0
  27. package/dist/hooks/src/core/hooks/index.js +1 -1
  28. package/dist/hooks/src/core/hooks/useAnimation.js +2 -0
  29. package/dist/hooks/src/core/hooks/useAnimation.js.map +1 -0
  30. package/dist/hooks/src/core/hooks/useClassNames.js.map +1 -1
  31. package/dist/hooks/src/core/hooks/useIntersectionObserver.js +2 -0
  32. package/dist/hooks/src/core/hooks/useIntersectionObserver.js.map +1 -0
  33. package/dist/hooks/src/core/hooks/useOutsideClick.js.map +1 -1
  34. package/dist/hooks/src/core/hooks/useParseProps.js.map +1 -1
  35. package/dist/hooks/src/core/hooks/useResize.js.map +1 -1
  36. package/dist/hooks/src/core/hooks/useThemePreference.js +1 -1
  37. package/dist/hooks/src/core/hooks/useThemePreference.js.map +1 -1
  38. package/dist/hooks/src/core/hooks/useToggle.js.map +1 -1
  39. package/dist/lib/cjs/node_modules/gsap/CSSPlugin.js +11 -0
  40. package/dist/lib/cjs/node_modules/gsap/CSSPlugin.js.map +1 -0
  41. package/dist/lib/cjs/node_modules/gsap/gsap-core.js +11 -0
  42. package/dist/lib/cjs/node_modules/gsap/gsap-core.js.map +1 -0
  43. package/dist/lib/cjs/node_modules/gsap/index.js +2 -0
  44. package/dist/lib/cjs/node_modules/gsap/index.js.map +1 -0
  45. package/dist/lib/cjs/src/core/hooks/useAnimation.js +2 -0
  46. package/dist/lib/cjs/src/core/hooks/useAnimation.js.map +1 -0
  47. package/dist/lib/cjs/src/core/hooks/useClassNames.js.map +1 -1
  48. package/dist/lib/cjs/src/core/hooks/useIntersectionObserver.js +2 -0
  49. package/dist/lib/cjs/src/core/hooks/useIntersectionObserver.js.map +1 -0
  50. package/dist/lib/cjs/src/core/hooks/useOutsideClick.js.map +1 -1
  51. package/dist/lib/cjs/src/core/hooks/useParseProps.js.map +1 -1
  52. package/dist/lib/cjs/src/core/hooks/useResize.js.map +1 -1
  53. package/dist/lib/cjs/src/core/hooks/useThemePreference.js +1 -1
  54. package/dist/lib/cjs/src/core/hooks/useThemePreference.js.map +1 -1
  55. package/dist/lib/cjs/src/core/hooks/useToggle.js.map +1 -1
  56. package/dist/lib/cjs/src/core/ui/components/atoms/icons.js +1 -1
  57. package/dist/lib/cjs/src/core/ui/components/atoms/icons.js.map +1 -1
  58. package/dist/lib/cjs/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  59. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
  60. package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js.map +1 -1
  61. package/dist/lib/cjs/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  62. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  63. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  64. package/dist/lib/cjs/src/index.js +1 -1
  65. package/dist/lib/esm/node_modules/gsap/CSSPlugin.js +11 -0
  66. package/dist/lib/esm/node_modules/gsap/CSSPlugin.js.map +1 -0
  67. package/dist/lib/esm/node_modules/gsap/gsap-core.js +11 -0
  68. package/dist/lib/esm/node_modules/gsap/gsap-core.js.map +1 -0
  69. package/dist/lib/esm/node_modules/gsap/index.js +2 -0
  70. package/dist/lib/esm/node_modules/gsap/index.js.map +1 -0
  71. package/dist/lib/esm/src/core/hooks/useAnimation.js +2 -0
  72. package/dist/lib/esm/src/core/hooks/useAnimation.js.map +1 -0
  73. package/dist/lib/esm/src/core/hooks/useClassNames.js.map +1 -1
  74. package/dist/lib/esm/src/core/hooks/useIntersectionObserver.js +2 -0
  75. package/dist/lib/esm/src/core/hooks/useIntersectionObserver.js.map +1 -0
  76. package/dist/lib/esm/src/core/hooks/useOutsideClick.js.map +1 -1
  77. package/dist/lib/esm/src/core/hooks/useParseProps.js.map +1 -1
  78. package/dist/lib/esm/src/core/hooks/useResize.js.map +1 -1
  79. package/dist/lib/esm/src/core/hooks/useThemePreference.js +1 -1
  80. package/dist/lib/esm/src/core/hooks/useThemePreference.js.map +1 -1
  81. package/dist/lib/esm/src/core/hooks/useToggle.js.map +1 -1
  82. package/dist/lib/esm/src/core/ui/components/atoms/icons.js +1 -1
  83. package/dist/lib/esm/src/core/ui/components/atoms/icons.js.map +1 -1
  84. package/dist/lib/esm/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  85. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  86. package/dist/lib/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
  87. package/dist/lib/esm/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  88. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  89. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  90. package/dist/lib/esm/src/index.js +1 -1
  91. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  92. package/dist/types/src/core/hooks/index.d.ts +2 -0
  93. package/dist/types/src/core/hooks/index.d.ts.map +1 -1
  94. package/dist/types/src/core/hooks/useAnimation.d.ts +23 -0
  95. package/dist/types/src/core/hooks/useAnimation.d.ts.map +1 -0
  96. package/dist/types/src/core/hooks/useClassNames.d.ts +6 -0
  97. package/dist/types/src/core/hooks/useClassNames.d.ts.map +1 -1
  98. package/dist/types/src/core/hooks/useIntersectionObserver.d.ts +28 -0
  99. package/dist/types/src/core/hooks/useIntersectionObserver.d.ts.map +1 -0
  100. package/dist/types/src/core/hooks/useOutsideClick.d.ts +14 -0
  101. package/dist/types/src/core/hooks/useOutsideClick.d.ts.map +1 -1
  102. package/dist/types/src/core/hooks/useParseProps.d.ts +5 -0
  103. package/dist/types/src/core/hooks/useParseProps.d.ts.map +1 -1
  104. package/dist/types/src/core/hooks/useResize.d.ts +23 -0
  105. package/dist/types/src/core/hooks/useResize.d.ts.map +1 -1
  106. package/dist/types/src/core/hooks/useThemePreference.d.ts +37 -1
  107. package/dist/types/src/core/hooks/useThemePreference.d.ts.map +1 -1
  108. package/dist/types/src/core/hooks/useToggle.d.ts +17 -2
  109. package/dist/types/src/core/hooks/useToggle.d.ts.map +1 -1
  110. package/dist/types/src/core/ui/components/atoms/icons.d.ts.map +1 -1
  111. package/dist/ui/esm/src/core/hooks/useOutsideClick.js.map +1 -1
  112. package/dist/ui/esm/src/core/hooks/useParseProps.js.map +1 -1
  113. package/dist/ui/esm/src/core/hooks/useResize.js.map +1 -1
  114. package/dist/ui/esm/src/core/ui/components/atoms/icons.js +1 -1
  115. package/dist/ui/esm/src/core/ui/components/atoms/icons.js.map +1 -1
  116. package/dist/ui/esm/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  117. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  118. package/dist/ui/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
  119. package/dist/ui/esm/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  120. package/dist/ui/src/core/hooks/useOutsideClick.js.map +1 -1
  121. package/dist/ui/src/core/hooks/useParseProps.js.map +1 -1
  122. package/dist/ui/src/core/hooks/useResize.js.map +1 -1
  123. package/dist/ui/src/core/ui/components/atoms/icons.js +1 -1
  124. package/dist/ui/src/core/ui/components/atoms/icons.js.map +1 -1
  125. package/dist/ui/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -1
  126. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  127. package/dist/ui/src/core/ui/components/icon/IconWC.js.map +1 -1
  128. package/dist/ui/src/core/ui/components/molecules/popup/Popup.js.map +1 -1
  129. package/dist/utils/esm/index.css +198 -198
  130. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  131. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  132. package/dist/utils/index.css +198 -198
  133. package/dist/utils/src/core/utils/appState/peregrineMQ/peregrineMQ.js.map +1 -1
  134. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  135. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\n onClick?: (event?: MouseEvent<HTMLSpanElement> | undefined) => void\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props\n}: IconBaseType) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","cursor","onClickProps","role","tabIndex","React","createElement","_extends","extends","classes","default","displayName"],"mappings":"8KAqBaA,EAA6BC,EAAIA,MAAeC,IAGzC,IAH0CC,QAC5DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,KAAYC,GACjFb,EACb,MAAMc,EAAiBb,GAAWc,EAAYA,aAACd,GAEzCe,EAASC,EAAAA,SAAQ,KACrB,CACE,cAAef,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,CAAE,KAC5BS,EAAiB,CAAE,aAAc,OAAOA,MAAsB,CAAE,KAChEA,EAAiB,CAAE,eAAgBN,GAAU,CAAE,uBAAwBA,MACvEI,EAAU,CAAEM,OAAQ,WAAc,CAAE,KACrCP,KAEJ,CAACT,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUS,EAAgBN,EAAOI,EAASD,IAElFQ,EAAeF,WAAQ,IAAOL,EAAW,CAC7CA,UACAQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EAAAC,QACMZ,CAAAA,EAAAA,EACAM,EAAY,CAChBV,UAAW,GAAGiB,EAAOC,QAAC,0BAA0BlB,IAChDE,MAAOK,KAEJF,GAAkBJ,GAAaA,EAC7B,IAIXZ,EAAS8B,YAAc"}
1
+ {"version":3,"file":"IconBase.js","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\n onClick?: (event?: MouseEvent<HTMLSpanElement> | undefined) => void\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props\n}: IconBaseType) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","cursor","onClickProps","role","tabIndex","React","createElement","_extends","extends","classes","default","displayName"],"mappings":"8KAqBaA,EAA6BC,EAAIA,MAAeC,IAGzC,IAH0CC,QAC5DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,KAAYC,GACjFb,EACb,MAAMc,EAAiBb,GAAWc,EAAYA,aAACd,GAEzCe,EAASC,EAAAA,SAAQ,KACrB,CACE,cAAef,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BS,EAAiB,CAAE,aAAc,OAAOA,MAAsB,MAC9DA,EAAiB,CAAE,eAAgBN,GAAU,CAAE,uBAAwBA,MACvEI,EAAU,CAAEM,OAAQ,WAAc,MACnCP,KAEJ,CAACT,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUS,EAAgBN,EAAOI,EAASD,IAElFQ,EAAeF,WAAQ,IAAOL,EAAW,CAC7CA,UACAQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EAAAC,QACMZ,CAAAA,EAAAA,EACAM,EAAY,CAChBV,UAAW,GAAGiB,EAAOC,QAAC,0BAA0BlB,IAChDE,MAAOK,KAEJF,GAAkBJ,GAAaA,EAC7B,IAIXZ,EAAS8B,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconWC.js","sources":["../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport class ESIcon extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes(): string[] {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback(): void {\n if (this.content || this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, ESIcon.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null): void {\n if (attrName === 'className' || attrName === 'classname' || attrName === 'class') {\n if (typeof newVal === 'string') {\n this.classList.remove(newVal as string)\n this.classList.add(newVal as string)\n }\n }\n if (!this.color) {\n this.color = 'currentColor'\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = (newVal as string) || ''\n this.render()\n }\n\n render = (): void => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width || '1rem',\n '--height': this.size || this.height || '1rem',\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const ESIconBase = {\n ESIconBase: ESIcon,\n}\n"],"names":["template","document","createElement","innerHTML","ESIcon","ced","_dec","_class","HTMLElement","constructor","super","arguments","this","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","default","styles","setAttribute","Object","entries","map","_ref","key","value","join","observedAttributes","connectedCallback","getAttribute","resolveAttributes","attributeChangedCallback","attrName","oldVal","newVal","remove","ESIconBase"],"mappings":"sHAKA,MAAMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAcrB,IACaC,EADZC,EAAAA,IAAI,YAAYC,CAAAC,EAAjB,MACaH,UAAeI,YAAYC,WAAAA,GAAAC,SAAAC,WAAAC,KACtCC,aAAO,EAAAD,KAEPE,iBAAW,EAAAF,KAEXG,aAAO,EAAAH,KAEPI,cAAQ,EAAAJ,KAERK,eAAS,EAAAL,KAETM,WAAK,EAAAN,KAELO,YAAM,EAAAP,KAENQ,UAAI,EAAAR,KAEJS,cAAQ,EAAAT,KAERU,WAAK,EAAAV,KAkCLW,OAAS,KAEP,GADAX,KAAKE,YAAcF,KAAKE,aAAeF,KAAKY,cAAc,eACrDZ,KAAKE,YACR,OAEFF,KAAKa,UAAUC,IAAIC,EAAAA,QAAQ,qBAC3Bf,KAAKE,YAAYW,UAAUC,IAAIC,EAAOC,QAAC,cAEvC,MAAMC,EAAS,CACb,cAAejB,KAAKI,UAAYJ,KAAKQ,MAAQR,KAAKM,OAAS,OAC3D,eAAgBN,KAAKK,WAAaL,KAAKQ,MAAQR,KAAKO,QAAU,OAC9D,UAAWP,KAAKQ,MAAQR,KAAKM,OAAS,OACtC,WAAYN,KAAKQ,MAAQR,KAAKO,QAAU,UACpCP,KAAKS,SAAW,CAAE,YAAaT,KAAKS,UAAY,SAAY,CAAE,KAC9DT,KAAKG,QAAU,CAAE,aAAc,OAAOH,KAAKG,YAAe,CAAE,KAC5DH,KAAKG,QAAU,CAAE,eAAgBH,KAAKU,OAAU,CAAE,uBAAwBV,KAAKU,QAGrFV,KAAKE,YAAYX,UAAYS,KAAKG,QAAU,GAAMH,KAAKC,SAAW,GAElED,KAAKE,YAAYgB,aAAa,QAASC,OAAOC,QAAQH,GAAQI,KAAIC,IAAA,IAAEC,EAAKC,GAAMF,EAAA,MAAK,GAAGC,MAAQC,IAAQ,IAAEC,KAAK,KAAK,CACpH,CArDD,6BAAWC,GACT,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,CAEAC,iBAAAA,IACM3B,KAAKC,SAAWD,KAAKT,aACvBS,KAAKC,QAAUD,KAAKC,SAAWD,KAAKT,WAAaS,KAAK4B,aAAa,YAGrE5B,KAAKT,UAAYH,EAASG,UAE1BsC,EAAAA,kBAAkB7B,KAAMR,EAAOkC,oBAE/B1B,KAAKW,QACP,CAEAmB,wBAAAA,CAAyBC,EAAkBC,EAAgCC,GACxD,cAAbF,GAAyC,cAAbA,GAAyC,UAAbA,GACpC,iBAAXE,IACTjC,KAAKa,UAAUqB,OAAOD,GACtBjC,KAAKa,UAAUC,IAAImB,IAGlBjC,KAAKU,QACRV,KAAKU,MAAQ,gBAIfV,KAAK+B,GAAaE,GAAqB,GACvCjC,KAAKW,QACP,KAwBDhB,EAWM,MAAMwC,EAAa,CACxBA,WAAY3C"}
1
+ {"version":3,"file":"IconWC.js","sources":["../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport class ESIcon extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes(): string[] {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback(): void {\n if (this.content || this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, ESIcon.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null): void {\n if (attrName === 'className' || attrName === 'classname' || attrName === 'class') {\n if (typeof newVal === 'string') {\n this.classList.remove(newVal as string)\n this.classList.add(newVal as string)\n }\n }\n if (!this.color) {\n this.color = 'currentColor'\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = (newVal as string) || ''\n this.render()\n }\n\n render = (): void => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width || '1rem',\n '--height': this.size || this.height || '1rem',\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const ESIconBase = {\n ESIconBase: ESIcon,\n}\n"],"names":["template","document","createElement","innerHTML","ESIcon","ced","_dec","_class","HTMLElement","constructor","super","arguments","this","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","default","styles","setAttribute","Object","entries","map","_ref","key","value","join","observedAttributes","connectedCallback","getAttribute","resolveAttributes","attributeChangedCallback","attrName","oldVal","newVal","remove","ESIconBase"],"mappings":"sHAKA,MAAMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAcrB,IACaC,EADZC,EAAAA,IAAI,YAAYC,CAAAC,EAAjB,MACaH,UAAeI,YAAYC,WAAAA,GAAAC,SAAAC,WAAAC,KACtCC,aAAO,EAAAD,KAEPE,iBAAW,EAAAF,KAEXG,aAAO,EAAAH,KAEPI,cAAQ,EAAAJ,KAERK,eAAS,EAAAL,KAETM,WAAK,EAAAN,KAELO,YAAM,EAAAP,KAENQ,UAAI,EAAAR,KAEJS,cAAQ,EAAAT,KAERU,WAAK,EAAAV,KAkCLW,OAAS,KAEP,GADAX,KAAKE,YAAcF,KAAKE,aAAeF,KAAKY,cAAc,eACrDZ,KAAKE,YACR,OAEFF,KAAKa,UAAUC,IAAIC,EAAAA,QAAQ,qBAC3Bf,KAAKE,YAAYW,UAAUC,IAAIC,EAAOC,QAAC,cAEvC,MAAMC,EAAS,CACb,cAAejB,KAAKI,UAAYJ,KAAKQ,MAAQR,KAAKM,OAAS,OAC3D,eAAgBN,KAAKK,WAAaL,KAAKQ,MAAQR,KAAKO,QAAU,OAC9D,UAAWP,KAAKQ,MAAQR,KAAKM,OAAS,OACtC,WAAYN,KAAKQ,MAAQR,KAAKO,QAAU,UACpCP,KAAKS,SAAW,CAAE,YAAaT,KAAKS,UAAY,SAAY,MAC5DT,KAAKG,QAAU,CAAE,aAAc,OAAOH,KAAKG,YAAe,MAC1DH,KAAKG,QAAU,CAAE,eAAgBH,KAAKU,OAAU,CAAE,uBAAwBV,KAAKU,QAGrFV,KAAKE,YAAYX,UAAYS,KAAKG,QAAU,GAAMH,KAAKC,SAAW,GAElED,KAAKE,YAAYgB,aAAa,QAASC,OAAOC,QAAQH,GAAQI,KAAIC,IAAA,IAAEC,EAAKC,GAAMF,EAAA,MAAK,GAAGC,MAAQC,IAAQ,IAAEC,KAAK,KAAK,CACpH,CArDD,6BAAWC,GACT,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,CAEAC,iBAAAA,IACM3B,KAAKC,SAAWD,KAAKT,aACvBS,KAAKC,QAAUD,KAAKC,SAAWD,KAAKT,WAAaS,KAAK4B,aAAa,YAGrE5B,KAAKT,UAAYH,EAASG,UAE1BsC,EAAAA,kBAAkB7B,KAAMR,EAAOkC,oBAE/B1B,KAAKW,QACP,CAEAmB,wBAAAA,CAAyBC,EAAkBC,EAAgCC,GACxD,cAAbF,GAAyC,cAAbA,GAAyC,UAAbA,GACpC,iBAAXE,IACTjC,KAAKa,UAAUqB,OAAOD,GACtBjC,KAAKa,UAAUC,IAAImB,IAGlBjC,KAAKU,QACRV,KAAKU,MAAQ,gBAIfV,KAAK+B,GAAaE,GAAqB,GACvCjC,KAAKW,QACP,KAwBDhB,EAWM,MAAMwC,EAAa,CACxBA,WAAY3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.js","sources":["../../../../../../../../src/core/ui/components/molecules/popup/Popup.tsx"],"sourcesContent":["import {\n cloneElement, memo, PropsWithChildren, FC, ReactNode, CSSProperties, useMemo, ReactElement,\n} from 'react'\n\nimport { Popover as PopoverLite } from '../popover/PopoverLite'\nimport { HeadlineTertiary as H3 } from '../../atoms/text'\nimport { IconBase } from '../../icon'\nimport { DividerLine } from '../../dividers'\nimport { LayoutBox } from '../../container'\nimport { closeIconJSX } from '../../atoms/icons'\n\nimport classes from './popup.module.scss'\nimport classesOverlay from './popup.overlay.module.scss'\nimport { PopupAnimateVariant, PopupProps } from './popup.types'\n\n\n/**\n * Styles for the Popup component.\n *\n * @typedef {Object} PopupStyles\n * @property {Object} inner - The inner styles for the popup.\n * @property {CSSProperties} content - The styles for the popup content.\n */\n\nconst styles: {\n popup: {\n inner: Record<string, Record<string, string>>\n }\n\n} = {\n popup: {\n inner: {\n [PopupAnimateVariant.SLIDE_DOWN]: { '--slideYFrom': '-48px' },\n [PopupAnimateVariant.SLIDE_UP]: { '--slideYFrom': '48px' },\n [PopupAnimateVariant.SLIDE_RIGHT]: { '--slideXFrom': '-64px' },\n [PopupAnimateVariant.SLIDE_LEFT]: { '--slideXFrom': '64px' },\n },\n },\n}\n\n/**\n * Popup component.\n *\n * @type {React.FC<PopupProps>}\n * @returns {React.ReactElement} The Popup.\n */\nexport const Popup: FC<PopupProps> = memo<PopupProps>(({\n title = 'Popup\\'s title',\n children,\n components = {},\n isModal = true,\n hideOnClickOutside = false,\n hideOnContentClick = false,\n animateVariant = PopupAnimateVariant.SLIDE_UP,\n hasHeader = true,\n hasCloseIcon = true,\n width,\n height,\n style,\n ...props\n}: PopupProps) => {\n /**\n * The ContentComponent to render.\n *\n * @type {ComponentType}\n */\n const ContentComponent = components?.ContentComponent\n\n /**\n * The popup styles.\n *\n * @type {CSSProperties}\n */\n const styles = useMemo(() => ({\n ...(width ? { '--popup-width': width } : {}),\n ...(height ? { '--popup-height': height } : {}),\n ...style,\n }), [height, style, width])\n\n return (\n <PopoverLite\n clickable\n isPopup\n isModal={isModal}\n hideOnContentClick={hideOnContentClick}\n hideOnClickOutside={hideOnClickOutside}\n modalOverlayClassName={classesOverlay['popup-modal-overlay']}\n {...props}\n >\n <p>{/* Placeholder element to avoid error with no children */}</p>\n <PopupContent\n title={title}\n hasHeader={hasHeader}\n hasCloseIcon={hasCloseIcon}\n animateVariant={animateVariant}\n popupStyle={styles}\n >\n {/* Render children if ContentComponent is not provided */}\n {(!ContentComponent && children) && children}\n {/* Render ContentComponent if children are not provided */}\n {(!children && ContentComponent) && <ContentComponent />}\n </PopupContent>\n </PopoverLite>\n )\n})\n\n/**\n * The display name of the Popup component.\n *\n * @type {string}\n */\nPopup.displayName = 'Popup'\n\ntype PopupContentProps = PropsWithChildren<unknown> & {\n title?: string\n forwardedRef?: ForwardedRef['forwardedRef']\n animateVariant?: PopupProps['animateVariant']\n popupStyle?: CSSProperties\n hasHeader?: boolean\n hasCloseIcon?: boolean\n closeIconURL?: string\n hide?: () => void\n}\n\n/**\n * The PopupContent component.\n *\n * @param {PopupContentProps} props The props for the PopupContent component.\n * @returns {React.ReactElement} The PopupContent.\n */\nconst PopupContent = memo(({\n title,\n forwardedRef,\n hide,\n children,\n animateVariant,\n popupStyle,\n hasHeader = true,\n hasCloseIcon = true,\n closeIconURL,\n ...props\n}: PopupContentProps) => {\n /**\n * The ContentRemapped element.\n *\n * @type {React.ReactElement[] | React.ReactElement}\n */\n const ContentRemapped = children && Array.isArray(children)\n ? children.filter((child: ReactNode | ReactElement) => !!child)\n .map((child: ReactElement, index: number) => cloneElement(\n // eslint-disable-next-line react/no-array-index-key\n child, { key: index, ...child.props, hide, ...props },\n ))\n : <div>Pseudo Content</div>\n\n return (\n <div className={`${classes['popup-container']}`} ref={forwardedRef} style={popupStyle}>\n <LayoutBox\n className={`${classes['popup-container-inner']}`}\n style={animateVariant ? styles.popup.inner[animateVariant] : null}\n >\n {hasHeader && (\n <>\n <LayoutBox justify='space-between' align='start' width='100%' padding='20px 20px 16px 20px'>\n <H3>{title}</H3>\n {hasCloseIcon && (\n <div\n onClick={hide}\n onKeyDown={hide}\n role='button'\n tabIndex={-1}\n className={classes['close-button']}\n >\n {closeIconURL && <IconBase iconUrl={closeIconURL} />}\n {!closeIconURL && (\n <IconBase>\n {closeIconJSX}\n </IconBase>\n )}\n </div>\n )}\n </LayoutBox>\n <DividerLine length='100%' />\n </>\n )}\n <div className={classes['popup-container-inner-div']}>\n {ContentRemapped && ContentRemapped}\n </div>\n </LayoutBox>\n </div>\n )\n})\n\n/**\n * The display name of the PopupContent component.\n *\n * @type {string}\n */\nPopupContent.displayName = 'PopupContent'\n"],"names":["styles","popup","inner","PopupAnimateVariant","SLIDE_DOWN","SLIDE_UP","SLIDE_RIGHT","SLIDE_LEFT","Popup","memo","_ref","title","children","components","isModal","hideOnClickOutside","hideOnContentClick","animateVariant","hasHeader","hasCloseIcon","width","height","style","props","ContentComponent","useMemo","React","createElement","PopoverLite","Popover","_extends","clickable","isPopup","modalOverlayClassName","classesOverlay","default","PopupContent","popupStyle","displayName","_ref2","forwardedRef","hide","closeIconURL","ContentRemapped","Array","isArray","filter","child","map","index","cloneElement","key","className","classes","ref","LayoutBox","Fragment","justify","align","padding","H3","onClick","onKeyDown","role","tabIndex","IconBase","iconUrl","closeIconJSX","DividerLine","length"],"mappings":"6cAwBA,MAAMA,EAKF,CACFC,MAAO,CACLC,MAAO,CACL,CAACC,EAAAA,oBAAoBC,YAAa,CAAE,eAAgB,SACpD,CAACD,EAAAA,oBAAoBE,UAAW,CAAE,eAAgB,QAClD,CAACF,EAAAA,oBAAoBG,aAAc,CAAE,eAAgB,SACrD,CAACH,EAAAA,oBAAoBI,YAAa,CAAE,eAAgB,WAW7CC,EAAwBC,EAAIA,MAAaC,IAcpC,IAdqCC,MACrDA,EAAQ,gBAAgBC,SACxBA,EAAQC,WACRA,EAAa,CAAE,EAAAC,QACfA,GAAU,EAAIC,mBACdA,GAAqB,EAAKC,mBAC1BA,GAAqB,EAAKC,eAC1BA,EAAiBd,EAAmBA,oBAACE,SAAQa,UAC7CA,GAAY,EAAIC,aAChBA,GAAe,EAAIC,MACnBA,EAAKC,OACLA,EAAMC,MACNA,KACGC,GACQb,EAMX,MAAMc,EAAmBX,GAAYW,iBAO/BxB,EAASyB,EAAAA,SAAQ,KAAO,IACxBL,EAAQ,CAAE,gBAAiBA,GAAU,CAAE,KACvCC,EAAS,CAAE,iBAAkBA,GAAW,CAAE,KAC3CC,KACD,CAACD,EAAQC,EAAOF,IAEpB,OACEM,MAAAC,cAACC,EAAWC,QAAAC,UAAA,CACVC,WAAS,EACTC,SAAO,EACPlB,QAASA,EACTE,mBAAoBA,EACpBD,mBAAoBA,EACpBkB,sBAAuBC,EAAcC,QAAC,wBAClCZ,GAEJG,MAAAC,cAAA,IAAA,MACAD,MAAAC,cAACS,EAAY,CACXzB,MAAOA,EACPO,UAAWA,EACXC,aAAc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AKyB,UAAWC,EAAOlB,QAAC,8BACrBQ,GAAmBA,IAGpB,IASVP,EAAaE,YAAc"}
1
+ {"version":3,"file":"Popup.js","sources":["../../../../../../../../src/core/ui/components/molecules/popup/Popup.tsx"],"sourcesContent":["import {\n cloneElement, memo, PropsWithChildren, FC, ReactNode, CSSProperties, useMemo, ReactElement,\n} from 'react'\n\nimport { Popover as PopoverLite } from '../popover/PopoverLite'\nimport { HeadlineTertiary as H3 } from '../../atoms/text'\nimport { IconBase } from '../../icon'\nimport { DividerLine } from '../../dividers'\nimport { LayoutBox } from '../../container'\nimport { closeIconJSX } from '../../atoms/icons'\n\nimport classes from './popup.module.scss'\nimport classesOverlay from './popup.overlay.module.scss'\nimport { PopupAnimateVariant, PopupProps } from './popup.types'\n\n\n/**\n * Styles for the Popup component.\n *\n * @typedef {Object} PopupStyles\n * @property {Object} inner - The inner styles for the popup.\n * @property {CSSProperties} content - The styles for the popup content.\n */\n\nconst styles: {\n popup: {\n inner: Record<string, Record<string, string>>\n }\n\n} = {\n popup: {\n inner: {\n [PopupAnimateVariant.SLIDE_DOWN]: { '--slideYFrom': '-48px' },\n [PopupAnimateVariant.SLIDE_UP]: { '--slideYFrom': '48px' },\n [PopupAnimateVariant.SLIDE_RIGHT]: { '--slideXFrom': '-64px' },\n [PopupAnimateVariant.SLIDE_LEFT]: { '--slideXFrom': '64px' },\n },\n },\n}\n\n/**\n * Popup component.\n *\n * @type {React.FC<PopupProps>}\n * @returns {React.ReactElement} The Popup.\n */\nexport const Popup: FC<PopupProps> = memo<PopupProps>(({\n title = 'Popup\\'s title',\n children,\n components = {},\n isModal = true,\n hideOnClickOutside = false,\n hideOnContentClick = false,\n animateVariant = PopupAnimateVariant.SLIDE_UP,\n hasHeader = true,\n hasCloseIcon = true,\n width,\n height,\n style,\n ...props\n}: PopupProps) => {\n /**\n * The ContentComponent to render.\n *\n * @type {ComponentType}\n */\n const ContentComponent = components?.ContentComponent\n\n /**\n * The popup styles.\n *\n * @type {CSSProperties}\n */\n const styles = useMemo(() => ({\n ...(width ? { '--popup-width': width } : {}),\n ...(height ? { '--popup-height': height } : {}),\n ...style,\n }), [height, style, width])\n\n return (\n <PopoverLite\n clickable\n isPopup\n isModal={isModal}\n hideOnContentClick={hideOnContentClick}\n hideOnClickOutside={hideOnClickOutside}\n modalOverlayClassName={classesOverlay['popup-modal-overlay']}\n {...props}\n >\n <p>{/* Placeholder element to avoid error with no children */}</p>\n <PopupContent\n title={title}\n hasHeader={hasHeader}\n hasCloseIcon={hasCloseIcon}\n animateVariant={animateVariant}\n popupStyle={styles}\n >\n {/* Render children if ContentComponent is not provided */}\n {(!ContentComponent && children) && children}\n {/* Render ContentComponent if children are not provided */}\n {(!children && ContentComponent) && <ContentComponent />}\n </PopupContent>\n </PopoverLite>\n )\n})\n\n/**\n * The display name of the Popup component.\n *\n * @type {string}\n */\nPopup.displayName = 'Popup'\n\ntype PopupContentProps = PropsWithChildren<unknown> & {\n title?: string\n forwardedRef?: ForwardedRef['forwardedRef']\n animateVariant?: PopupProps['animateVariant']\n popupStyle?: CSSProperties\n hasHeader?: boolean\n hasCloseIcon?: boolean\n closeIconURL?: string\n hide?: () => void\n}\n\n/**\n * The PopupContent component.\n *\n * @param {PopupContentProps} props The props for the PopupContent component.\n * @returns {React.ReactElement} The PopupContent.\n */\nconst PopupContent = memo(({\n title,\n forwardedRef,\n hide,\n children,\n animateVariant,\n popupStyle,\n hasHeader = true,\n hasCloseIcon = true,\n closeIconURL,\n ...props\n}: PopupContentProps) => {\n /**\n * The ContentRemapped element.\n *\n * @type {React.ReactElement[] | React.ReactElement}\n */\n const ContentRemapped = children && Array.isArray(children)\n ? children.filter((child: ReactNode | ReactElement) => !!child)\n .map((child: ReactElement, index: number) => cloneElement(\n // eslint-disable-next-line react/no-array-index-key\n child, { key: index, ...child.props, hide, ...props },\n ))\n : <div>Pseudo Content</div>\n\n return (\n <div className={`${classes['popup-container']}`} ref={forwardedRef} style={popupStyle}>\n <LayoutBox\n className={`${classes['popup-container-inner']}`}\n style={animateVariant ? styles.popup.inner[animateVariant] : null}\n >\n {hasHeader && (\n <>\n <LayoutBox justify='space-between' align='start' width='100%' padding='20px 20px 16px 20px'>\n <H3>{title}</H3>\n {hasCloseIcon && (\n <div\n onClick={hide}\n onKeyDown={hide}\n role='button'\n tabIndex={-1}\n className={classes['close-button']}\n >\n {closeIconURL && <IconBase iconUrl={closeIconURL} />}\n {!closeIconURL && (\n <IconBase>\n {closeIconJSX}\n </IconBase>\n )}\n </div>\n )}\n </LayoutBox>\n <DividerLine length='100%' />\n </>\n )}\n <div className={classes['popup-container-inner-div']}>\n {ContentRemapped && ContentRemapped}\n </div>\n </LayoutBox>\n </div>\n )\n})\n\n/**\n * The display name of the PopupContent component.\n *\n * @type {string}\n */\nPopupContent.displayName = 'PopupContent'\n"],"names":["styles","popup","inner","PopupAnimateVariant","SLIDE_DOWN","SLIDE_UP","SLIDE_RIGHT","SLIDE_LEFT","Popup","memo","_ref","title","children","components","isModal","hideOnClickOutside","hideOnContentClick","animateVariant","hasHeader","hasCloseIcon","width","height","style","props","ContentComponent","useMemo","React","createElement","PopoverLite","Popover","_extends","clickable","isPopup","modalOverlayClassName","classesOverlay","default","PopupContent","popupStyle","displayName","_ref2","forwardedRef","hide","closeIconURL","ContentRemapped","Array","isArray","filter","child","map","index","cloneElement","key","className","classes","ref","LayoutBox","Fragment","justify","align","padding","H3","onClick","onKeyDown","role","tabIndex","IconBase","iconUrl","closeIconJSX","DividerLine","length"],"mappings":"6cAwBA,MAAMA,EAKF,CACFC,MAAO,CACLC,MAAO,CACL,CAACC,EAAAA,oBAAoBC,YAAa,CAAE,eAAgB,SACpD,CAACD,EAAAA,oBAAoBE,UAAW,CAAE,eAAgB,QAClD,CAACF,EAAAA,oBAAoBG,aAAc,CAAE,eAAgB,SACrD,CAACH,EAAAA,oBAAoBI,YAAa,CAAE,eAAgB,WAW7CC,EAAwBC,EAAIA,MAAaC,IAcpC,IAdqCC,MACrDA,EAAQ,gBA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MAAA,CAAKyB,UAAW,GAAGC,UAAQ,qBAAsBC,IAAKd,EAAclB,MAAOe,GACzEX,MAAAC,cAAC4B,YAAS,CACRH,UAAW,GAAGC,UAAQ,2BACtB/B,MAAOL,EAAiBjB,EAAOC,MAAMC,MAAMe,GAAkB,MAE5DC,GACCQ,MAAAC,cAAAD,MAAA8B,SACE9B,KAAAA,MAAAC,cAAC4B,YAAS,CAACE,QAAQ,gBAAgBC,MAAM,QAAQtC,MAAM,OAAOuC,QAAQ,uBACpEjC,MAAAC,cAACiC,EAAAA,iBAAE,KAAEjD,GACJQ,GACCO,MAAAC,cAAA,MAAA,CACEkC,QAASpB,EACTqB,UAAWrB,EACXsB,KAAK,SACLC,UAAW,EACXZ,UAAWC,EAAOlB,QAAC,iBAElBO,GAAgBhB,MAAAC,cAACsC,WAAQ,CAACC,QAASxB,KAClCA,GACAhB,MAAAC,cAACsC,EAAQA,cACNE,EAAAA,gBAMXzC,MAAAC,cAACyC,EAAAA,YAAW,CAACC,OAAO,UAGxB3C,MAAAC,cAAA,MAAA,CAAKyB,UAAWC,EAAOlB,QAAC,8BACrBQ,GAAmBA,IAGpB,IASVP,EAAaE,YAAc"}
@@ -1,35 +1,30 @@
1
- .CollapsibleContainer-module_collapsible-container__u0Jmm {
2
- transform-origin: 0% 0%;
3
- opacity: 0;
4
- overflow: clip;
5
- }
6
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
7
- transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
8
- will-change: opacity, height, max-height;
9
- }
10
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
11
- height: 0;
12
- max-height: 0;
13
- opacity: 0;
1
+ .divider-module_divider-line__6CesR {
2
+ position: relative;
3
+ display: block;
4
+ transition: opacity, width, height 250ms ease-in-out;
5
+ background-color: var(--color);
6
+ opacity: var(--opacity);
14
7
  }
15
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
16
- height: var(--prop-value);
17
- max-height: var(--prop-value);
18
- opacity: 1;
8
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
9
+ height: var(--length);
10
+ left: var(--left);
11
+ width: var(--width);
12
+ margin: var(--margin);
19
13
  }
20
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
21
- transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
22
- will-change: opacity, width, max-width;
14
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
15
+ width: var(--length);
16
+ left: var(--left);
17
+ height: var(--height);
18
+ margin: var(--margin);
23
19
  }
24
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
25
- width: 0;
26
- max-width: 0;
27
- opacity: 0;
20
+ .errorBoundary-module_errorBoundary__gk9ps {
21
+ background: #EFEFEF;
22
+ width: 100%;
23
+ height: 100%;
28
24
  }
29
- .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
30
- width: var(--prop-value);
31
- max-width: var(--prop-value);
32
- opacity: 1;
25
+
26
+ .errorBoundary-module_StyledIcon__IYHiU {
27
+ margin-right: 10px;
33
28
  }
34
29
  .icon-module_icon-base-parent__nOMvW {
35
30
  line-height: 1px !important;
@@ -61,34 +56,6 @@
61
56
  width: var(--height);
62
57
  height: var(--width);
63
58
  }
64
- .errorBoundary-module_errorBoundary__gk9ps {
65
- background: #EFEFEF;
66
- width: 100%;
67
- height: 100%;
68
- }
69
-
70
- .errorBoundary-module_StyledIcon__IYHiU {
71
- margin-right: 10px;
72
- }
73
- .divider-module_divider-line__6CesR {
74
- position: relative;
75
- display: block;
76
- transition: opacity, width, height 250ms ease-in-out;
77
- background-color: var(--color);
78
- opacity: var(--opacity);
79
- }
80
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
81
- height: var(--length);
82
- left: var(--left);
83
- width: var(--width);
84
- margin: var(--margin);
85
- }
86
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
87
- width: var(--length);
88
- left: var(--left);
89
- height: var(--height);
90
- margin: var(--margin);
91
- }
92
59
  .field-module_field__UfKm3 {
93
60
  opacity: 1;
94
61
  pointer-events: auto;
@@ -163,29 +130,38 @@
163
130
  .field-module_field__UfKm3 label {
164
131
  text-align: left;
165
132
  }
166
- .layoutBox-module_layout-box__ZIID8 {
167
- display: flex;
168
- position: relative;
169
- flex-direction: row;
170
- flex: 0;
171
- flex-grow: 0;
172
- flex-shrink: 0;
173
- flex-basis: auto;
174
- flex-wrap: nowrap;
175
- gap: 0;
176
- text-align: left;
177
- justify-content: flex-start;
178
- align-items: flex-start;
179
- align-self: auto;
180
- margin: 0;
181
- padding: 0;
182
- width: auto;
183
- height: auto;
184
- max-width: none;
185
- max-height: none;
186
- min-width: 0;
187
- min-height: 0;
188
- border-radius: initial;
133
+ .CollapsibleContainer-module_collapsible-container__u0Jmm {
134
+ transform-origin: 0% 0%;
135
+ opacity: 0;
136
+ overflow: clip;
137
+ }
138
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
139
+ transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
140
+ will-change: opacity, height, max-height;
141
+ }
142
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
143
+ height: 0;
144
+ max-height: 0;
145
+ opacity: 0;
146
+ }
147
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
148
+ height: var(--prop-value);
149
+ max-height: var(--prop-value);
150
+ opacity: 1;
151
+ }
152
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
153
+ transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
154
+ will-change: opacity, width, max-width;
155
+ }
156
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
157
+ width: 0;
158
+ max-width: 0;
159
+ opacity: 0;
160
+ }
161
+ .CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
162
+ width: var(--prop-value);
163
+ max-width: var(--prop-value);
164
+ opacity: 1;
189
165
  }
190
166
  .lazyComponent-module_loader__brMEW {
191
167
  position: relative;
@@ -230,6 +206,126 @@
230
206
  stroke-dashoffset: -124;
231
207
  }
232
208
  }
209
+ .layoutBox-module_layout-box__ZIID8 {
210
+ display: flex;
211
+ position: relative;
212
+ flex-direction: row;
213
+ flex: 0;
214
+ flex-grow: 0;
215
+ flex-shrink: 0;
216
+ flex-basis: auto;
217
+ flex-wrap: nowrap;
218
+ gap: 0;
219
+ text-align: left;
220
+ justify-content: flex-start;
221
+ align-items: flex-start;
222
+ align-self: auto;
223
+ margin: 0;
224
+ padding: 0;
225
+ width: auto;
226
+ height: auto;
227
+ max-width: none;
228
+ max-height: none;
229
+ min-width: 0;
230
+ min-height: 0;
231
+ border-radius: initial;
232
+ }
233
+ :root {
234
+ --divider-line: #4a4b4b;
235
+ }
236
+
237
+ .popup-module_overflow-hidden__uimg4, .popup-module_text-truncate__y-5c1 {
238
+ overflow: hidden !important;
239
+ }
240
+
241
+ .popup-module_text-nowrap__eDCv3, .popup-module_text-truncate__y-5c1 {
242
+ white-space: nowrap !important;
243
+ }
244
+
245
+ .popup-module_text-ellipsis__yu8nx, .popup-module_text-truncate__y-5c1 {
246
+ text-overflow: ellipsis !important;
247
+ }
248
+
249
+ .popup-module_popup-container__PJ0oQ {
250
+ --popup-width: 60vw;
251
+ --popup-height: 50vh;
252
+ position: fixed;
253
+ width: var(--popup-width);
254
+ height: var(--popup-height);
255
+ --slideXFrom: 0;
256
+ --slideYFrom: 0;
257
+ will-change: opacity;
258
+ transition: opacity 300ms ease-in-out;
259
+ opacity: 0;
260
+ visibility: hidden;
261
+ pointer-events: none;
262
+ }
263
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz {
264
+ position: relative;
265
+ flex-direction: column;
266
+ align-items: start;
267
+ width: 100%;
268
+ height: 100%;
269
+ overflow-x: clip;
270
+ background-color: #090A0A;
271
+ border-radius: 4px;
272
+ box-shadow: 0px 10px 20px 4px rgba(0, 0, 0, 0.15);
273
+ transition: transform 350ms ease-out;
274
+ will-change: transform;
275
+ transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
276
+ }
277
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz button {
278
+ margin-bottom: 0;
279
+ }
280
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx {
281
+ cursor: pointer;
282
+ line-height: 1px;
283
+ background-color: rgba(255, 255, 255, 0);
284
+ }
285
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx .icon-base {
286
+ background-color: #FDDA0D;
287
+ width: 9px !important;
288
+ height: 9px !important;
289
+ line-height: 1px !important;
290
+ }
291
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx:hover .icon-base {
292
+ background-color: #FFEA00;
293
+ }
294
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm {
295
+ width: 100%;
296
+ height: 100%;
297
+ padding: 24px;
298
+ overflow-y: auto;
299
+ display: flex;
300
+ }
301
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm > * {
302
+ overflow-y: auto;
303
+ }
304
+ .popup-module_popup-container__PJ0oQ[data-show] {
305
+ opacity: 1;
306
+ visibility: visible;
307
+ pointer-events: all;
308
+ }
309
+ .popup-module_popup-container__PJ0oQ[data-show] .popup-module_popup-container-inner__n83Cz {
310
+ transform: translateX(0) translateY(0);
311
+ }
312
+ .popup-module_popup-container__PJ0oQ[data-show=false] {
313
+ opacity: 0;
314
+ visibility: hidden;
315
+ pointer-events: none;
316
+ }
317
+ .popup-module_popup-container__PJ0oQ[data-show=false] .popup-module_popup-container-inner__n83Cz {
318
+ transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
319
+ }
320
+
321
+ .cui-theme-dark .popup-module_popup-container-inner__n83Cz {
322
+ background-color: #090A0A;
323
+ color: #F4F4F4;
324
+ }
325
+ .cui-theme-light .popup-module_popup-container-inner__n83Cz {
326
+ background-color: #090A0A;
327
+ color: #F4F4F4;
328
+ }
233
329
  :root {
234
330
  --divider-line: #4a4b4b;
235
331
  }
@@ -410,102 +506,6 @@
410
506
  .cui-theme-light .button-module_button__NDMQS {
411
507
  color: #090A0A;
412
508
  }
413
- :root {
414
- --divider-line: #4a4b4b;
415
- }
416
-
417
- .popup-module_overflow-hidden__uimg4, .popup-module_text-truncate__y-5c1 {
418
- overflow: hidden !important;
419
- }
420
-
421
- .popup-module_text-nowrap__eDCv3, .popup-module_text-truncate__y-5c1 {
422
- white-space: nowrap !important;
423
- }
424
-
425
- .popup-module_text-ellipsis__yu8nx, .popup-module_text-truncate__y-5c1 {
426
- text-overflow: ellipsis !important;
427
- }
428
-
429
- .popup-module_popup-container__PJ0oQ {
430
- --popup-width: 60vw;
431
- --popup-height: 50vh;
432
- position: fixed;
433
- width: var(--popup-width);
434
- height: var(--popup-height);
435
- --slideXFrom: 0;
436
- --slideYFrom: 0;
437
- will-change: opacity;
438
- transition: opacity 300ms ease-in-out;
439
- opacity: 0;
440
- visibility: hidden;
441
- pointer-events: none;
442
- }
443
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz {
444
- position: relative;
445
- flex-direction: column;
446
- align-items: start;
447
- width: 100%;
448
- height: 100%;
449
- overflow-x: clip;
450
- background-color: #090A0A;
451
- border-radius: 4px;
452
- box-shadow: 0px 10px 20px 4px rgba(0, 0, 0, 0.15);
453
- transition: transform 350ms ease-out;
454
- will-change: transform;
455
- transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
456
- }
457
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz button {
458
- margin-bottom: 0;
459
- }
460
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx {
461
- cursor: pointer;
462
- line-height: 1px;
463
- background-color: rgba(255, 255, 255, 0);
464
- }
465
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx .icon-base {
466
- background-color: #FDDA0D;
467
- width: 9px !important;
468
- height: 9px !important;
469
- line-height: 1px !important;
470
- }
471
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx:hover .icon-base {
472
- background-color: #FFEA00;
473
- }
474
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm {
475
- width: 100%;
476
- height: 100%;
477
- padding: 24px;
478
- overflow-y: auto;
479
- display: flex;
480
- }
481
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm > * {
482
- overflow-y: auto;
483
- }
484
- .popup-module_popup-container__PJ0oQ[data-show] {
485
- opacity: 1;
486
- visibility: visible;
487
- pointer-events: all;
488
- }
489
- .popup-module_popup-container__PJ0oQ[data-show] .popup-module_popup-container-inner__n83Cz {
490
- transform: translateX(0) translateY(0);
491
- }
492
- .popup-module_popup-container__PJ0oQ[data-show=false] {
493
- opacity: 0;
494
- visibility: hidden;
495
- pointer-events: none;
496
- }
497
- .popup-module_popup-container__PJ0oQ[data-show=false] .popup-module_popup-container-inner__n83Cz {
498
- transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
499
- }
500
-
501
- .cui-theme-dark .popup-module_popup-container-inner__n83Cz {
502
- background-color: #090A0A;
503
- color: #F4F4F4;
504
- }
505
- .cui-theme-light .popup-module_popup-container-inner__n83Cz {
506
- background-color: #090A0A;
507
- color: #F4F4F4;
508
- }
509
509
  .flowLayout-module_flowLayout__VHpnY {
510
510
  overflow: auto;
511
511
  }
@@ -519,29 +519,6 @@
519
519
  width: 100%;
520
520
  min-width: 0;
521
521
  }
522
- .popup-overlay-module_popup-modal-overlay__dlJqM {
523
- z-index: 1;
524
- position: fixed;
525
- width: 100%;
526
- height: 100%;
527
- top: 0;
528
- left: 0;
529
- background: rgba(40, 80, 120, 0.8) !important;
530
- pointer-events: all;
531
- user-select: none;
532
- will-change: opacity;
533
- transition: opacity 450ms ease-in-out;
534
- opacity: 0;
535
- visibility: hidden;
536
- }
537
- .popup-overlay-module_popup-modal-overlay__dlJqM[data-show] {
538
- opacity: 1;
539
- visibility: visible;
540
- }
541
- .popup-overlay-module_popup-modal-overlay__dlJqM[data-show=false] {
542
- opacity: 0;
543
- visibility: hidden;
544
- }
545
522
  :root {
546
523
  --divider-line: #4a4b4b;
547
524
  }
@@ -656,6 +633,29 @@
656
633
  .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
657
634
  border-color: #515757 transparent transparent transparent;
658
635
  }
636
+ .popup-overlay-module_popup-modal-overlay__dlJqM {
637
+ z-index: 1;
638
+ position: fixed;
639
+ width: 100%;
640
+ height: 100%;
641
+ top: 0;
642
+ left: 0;
643
+ background: rgba(40, 80, 120, 0.8) !important;
644
+ pointer-events: all;
645
+ user-select: none;
646
+ will-change: opacity;
647
+ transition: opacity 450ms ease-in-out;
648
+ opacity: 0;
649
+ visibility: hidden;
650
+ }
651
+ .popup-overlay-module_popup-modal-overlay__dlJqM[data-show] {
652
+ opacity: 1;
653
+ visibility: visible;
654
+ }
655
+ .popup-overlay-module_popup-modal-overlay__dlJqM[data-show=false] {
656
+ opacity: 0;
657
+ visibility: hidden;
658
+ }
659
659
  :root {
660
660
  --divider-line: #4a4b4b;
661
661
  }
@@ -1 +1 @@
1
- {"version":3,"file":"peregrineMQ.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/peregrineMQ.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport { Callback, Config, PeregrineMQApi, SubscribersSet, UnsubscribeOptions } from './peregrineMQ.types'\n\n\nexport class PeregrineMQClearError extends Error {\n constructor() {\n super('Clearing PeregrineMQ is not allowed. Please read the documentation for more information.')\n this.name = 'PeregrineMQClearError'\n }\n}\n\n/**\n * Represents a message queue with publish/subscribe functionality.\n */\nexport class PeregrineMQ implements PeregrineMQApi {\n private id: string\n\n private config: Config = {\n allowAutoPrune: false,\n pruneInterval: 10000,\n allowClear: false,\n }\n\n /**\n * The map of channels and their subscribers sets.\n */\n private channels: Map<string, SubscribersSet> = new Map()\n\n /**\n * The map of listeners and their subscribed channels.\n */\n private listeners: Map<Callback, SubscribersSet[]> = new Map()\n\n /**\n * Adds a callback as a listener to a channel.\n * @param callback The callback function to add as a listener.\n * @param channel The channel to add the listener to.\n */\n private addListener = (callback: Callback, channel: string): void => {\n const listener = this.listeners.get(callback)\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet) {\n if (listener) {\n listener.push(subscribersSet)\n } else {\n this.listeners.set(callback, [subscribersSet])\n }\n }\n }\n\n /**\n * Removes the callback from the listeners collection if it is not subscribed to any channels.\n * @description Removes the callback only when it is not present in any other subscriberSet\n * (Ref to Map<string, SubscribersSet>).\n * @param callback The callback to remove from listeners.\n */\n private removeListener = (callback: Callback): void => {\n const channelSubscriberSets = this.listeners.get(callback)\n let isEmpty = true\n\n // eslint-disable-next-line no-restricted-syntax\n for (const channelSubscriberSet of channelSubscriberSets || []) {\n isEmpty = !channelSubscriberSet.has(callback)\n if (!isEmpty) {\n break\n }\n }\n\n if (isEmpty) {\n this.listeners.delete(callback)\n }\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param isParent Indicates if the channel is a parent channel.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n private publishToChannel = (channel: string, isParent: boolean, data?: unknown): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (!subscribersSet) {\n return isParent\n }\n\n const iterator = subscribersSet[Symbol.iterator]()\n let subscriberFunc = iterator.next().value\n\n // eslint-disable-next-line no-plusplus\n while (subscriberFunc) {\n subscriberFunc(channel, data)\n subscriberFunc = iterator.next().value\n }\n return true\n }\n\n /**\n * Creates a new instance of PeregrineMQ.\n * @param id Specific instance of PeregrineMQ identifier\n * @param config The configuration options for PeregrineMQ.\n */\n constructor(id?: string, config?: Config) {\n this.id = id || uuidv4()\n this.configure(config || {})\n }\n\n /**\n * Gets the total number of subscribers across all channels.\n */\n get length(): number {\n return [...this.channels.values()].reduce((acc, subscribersList) => acc + subscribersList.size, 0)\n }\n\n /**\n * Configures PeregrineMQ with the specified options.\n * @param config The configuration options for PeregrineMQ.\n * @returns An object containing the prune interval handler (if auto prune is enabled).\n */\n configure = (config: Config): {\n clearPruneInterval?: () => void\n restartPruneInterval?: () => void\n } => {\n this.config = config\n const { allowAutoPrune, pruneInterval } = config\n\n let pruneIntervalHandler: ReturnType<typeof setInterval>\n\n if (allowAutoPrune) {\n pruneIntervalHandler = setInterval(() => {\n this.prune()\n }, pruneInterval)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instance: PeregrineMQ = this\n\n return {\n ...(allowAutoPrune\n ? {\n clearPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n },\n restartPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n pruneIntervalHandler = setInterval(() => {\n instance.prune()\n }, pruneInterval)\n },\n }\n : {}),\n }\n }\n\n /**\n * Gets an array of all channels.\n * @returns An array of channel names.\n */\n getChannels = (): string[] => [...this.channels.keys()]\n\n /**\n * Prunes the channels with no subscribers.\n * @returns An array of pruned channel names.\n */\n prune = (): string[] => {\n const iterator = this.channels[Symbol.iterator]()\n let subscribersSet = iterator.next().value\n const prunedChannels: string[] = []\n\n // eslint-disable-next-line no-plusplus\n while (subscribersSet) {\n if (subscribersSet[1]?.size === 0) {\n prunedChannels.push(subscribersSet[0])\n this.channels.delete(subscribersSet[0])\n }\n subscribersSet = iterator.next().value\n }\n\n return prunedChannels\n }\n\n /**\n * Removes a channel and its subscribers.\n * @param channel The channel to remove.\n * @returns A boolean indicating if the channel was successfully removed.\n */\n removeChannel = (channel: string): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet && subscribersSet.size > 0) {\n const channelListeners = [...subscribersSet || []]\n\n subscribersSet.clear()\n\n let index = channelListeners.length\n\n // eslint-disable-next-line no-plusplus\n while (index--) {\n this.removeListener(channelListeners[index])\n }\n }\n\n return this.channels.delete(channel)\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n publish = <T>(channel: string, data?: T): boolean => {\n if (channel.includes('.')) {\n const nestedChannels = channel.split('.')\n\n let { length } = nestedChannels\n let failed = false\n\n // eslint-disable-next-line no-plusplus\n while (length--) {\n const result = this.publishToChannel(\n nestedChannels.slice(0, length + 1).join('.'),\n length !== nestedChannels.length - 1,\n data,\n )\n\n if (!result) {\n failed = true\n }\n }\n return !failed\n }\n\n return this.publishToChannel(channel, false, data)\n }\n\n /**\n * Subscribes a callback to a channel.\n * @param channel The channel to subscribe to.\n * @param callback The callback function to subscribe.\n * @returns A function to unsubscribe the callback.\n */\n subscribe = (channel: string, callback: Callback): () => boolean => {\n const subscribersList = this.channels.get(channel)\n\n if (subscribersList) {\n subscribersList.add(callback)\n } else {\n this.channels.set(channel, new Set([callback]))\n }\n\n this.addListener(callback, channel)\n\n return () => this.unsubscribe(callback, { channel, prune: true })\n }\n\n /**\n * Unsubscribes a callback from a channel or all channels.\n * @param callback The callback function to unsubscribe.\n * @param options Optional unsubscribe options.\n * @returns A boolean indicating if the callback was successfully unsubscribed.\n */\n unsubscribe = (callback: Callback, options?: UnsubscribeOptions): boolean => {\n const { channel, prune } = options || {}\n\n let unsubscribed = false\n\n if (channel) {\n const subscriberSet = this.channels.get(channel)\n\n unsubscribed = subscriberSet ? subscriberSet.delete(callback) : false\n if (prune && subscriberSet?.size === 0) {\n this.channels.delete(channel)\n }\n\n this.removeListener(callback)\n\n return unsubscribed\n }\n\n const subscriberSetArray = this.listeners.get(callback) || []\n\n // remove callback form listeners and all channels\n // TODO remove only if has\n // eslint-disable-next-line no-restricted-syntax\n for (const subscriberSet of subscriberSetArray) {\n unsubscribed = subscriberSet.delete(callback) as boolean\n\n if (prune && subscriberSet.size === 0) {\n this.prune()\n }\n }\n\n this.listeners.delete(callback)\n\n return unsubscribed\n }\n\n /**\n * Checks if a callback is subscribed to a specific channel or any channel.\n * @param callback The callback function to check.\n * @param channel Optional channel name to check subscription for.\n * @returns A boolean indicating if the callback is subscribed.\n */\n isSubscribed = (callback: Callback, channel?: string): boolean => {\n if (channel) {\n const subscribersList = this.channels.get(channel)\n\n return subscribersList ? subscribersList.has(callback) : false\n }\n\n return this.listeners.has(callback)\n }\n\n /**\n * Clears all channels and listeners.\n * @throws {Error} If clearing PeregrineMQ is not allowed.\n */\n clear = (): void => {\n if (this.config.allowClear) {\n this.channels.clear()\n this.listeners.clear()\n } else {\n throw new PeregrineMQClearError()\n }\n }\n\n /**\n * Returns the specific instance of PeregrineMQ.\n * @returns A string identifier of the specific instance of PeregrineMQ.\n */\n getId = (): string => this.id\n}\n"],"names":["PeregrineMQClearError","Error","constructor","super","this","name","PeregrineMQ","id","config","allowAutoPrune","pruneInterval","allowClear","channels","Map","listeners","addListener","callback","channel","listener","get","subscribersSet","push","set","removeListener","channelSubscriberSets","isEmpty","channelSubscriberSet","has","delete","publishToChannel","isParent","data","iterator","Symbol","subscriberFunc","next","value","configure","pruneIntervalHandler","setInterval","prune","instance","clearPruneInterval","clearInterval","restartPruneInterval","getChannels","keys","prunedChannels","size","removeChannel","channelListeners","clear","index","length","publish","includes","nestedChannels","split","failed","slice","join","subscribe","subscribersList","add","Set","unsubscribe","options","unsubscribed","subscriberSet","subscriberSetArray","isSubscribed","getId","uuidv4","values","reduce","acc"],"mappings":"uEAKO,MAAMA,UAA8BC,MACzCC,WAAAA,GACEC,MAAM,4FACNC,KAAKC,KAAO,uBACd,EAMK,MAAMC,EA0FXJ,WAAAA,CAAYK,EAAaC,GAAiBJ,KAzFlCG,QAAE,EAAAH,KAEFI,OAAiB,CACvBC,gBAAgB,EAChBC,cAAe,IACfC,YAAY,GAGdP,KAGQQ,SAAwC,IAAIC,IAEpDT,KAGQU,UAA6C,IAAID,IAEzDT,KAKQW,YAAc,CAACC,EAAoBC,KACzC,MAAMC,EAAWd,KAAKU,UAAUK,IAAIH,GAC9BI,EAAiBhB,KAAKQ,SAASO,IAAIF,GAErCG,IACEF,EACFA,EAASG,KAAKD,GAEdhB,KAAKU,UAAUQ,IAAIN,EAAU,CAACI,IAElC,EAGFhB,KAMQmB,eAAkBP,IACxB,MAAMQ,EAAwBpB,KAAKU,UAAUK,IAAIH,GACjD,IAAIS,GAAU,EAGd,IAAK,MAAMC,KAAwBF,GAAyB,GAE1D,GADAC,GAAWC,EAAqBC,IAAIX,IAC/BS,EACH,MAIAA,GACFrB,KAAKU,UAAUc,OAAOZ,EACxB,EAGFZ,KAOQyB,iBAAmB,CAACZ,EAAiBa,EAAmBC,KAC9D,MAAMX,EAAiBhB,KAAKQ,SAASO,IAAIF,GAEzC,IAAKG,EACH,OAAOU,EAGT,MAAME,EAAWZ,EAAea,OAAOD,YACvC,IAAIE,EAAiBF,EAASG,OAAOC,MAGrC,KAAOF,GACLA,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IAAI/C,KAAKI,OAAOG,WAId,MAAM,IAAIX,EAHVI,KAAKQ,SAASuC,QACd/C,KAAKU,UAAUqC,OAGjB,EAGF/C,KAIAmE,MAAQ,IAAcnE,KAAKG,GApOzBH,KAAKG,GAAKA,GAAMiE,IAChBpE,KAAKiC,UAAU7B,GAAU,CAAA,EAC3B,CAKA,UAAI6C,GACF,MAAO,IAAIjD,KAAKQ,SAAS6D,UAAUC,QAAO,CAACC,EAAKb,IAAoBa,EAAMb,EAAgBd,MAAM,EAClG"}
1
+ {"version":3,"file":"peregrineMQ.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/peregrineMQ.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport { Callback, Config, PeregrineMQApi, SubscribersSet, UnsubscribeOptions } from './peregrineMQ.types'\n\n\nexport class PeregrineMQClearError extends Error {\n constructor() {\n super('Clearing PeregrineMQ is not allowed. Please read the documentation for more information.')\n this.name = 'PeregrineMQClearError'\n }\n}\n\n/**\n * Represents a message queue with publish/subscribe functionality.\n */\nexport class PeregrineMQ implements PeregrineMQApi {\n private id: string\n\n private config: Config = {\n allowAutoPrune: false,\n pruneInterval: 10000,\n allowClear: false,\n }\n\n /**\n * The map of channels and their subscribers sets.\n */\n private channels: Map<string, SubscribersSet> = new Map()\n\n /**\n * The map of listeners and their subscribed channels.\n */\n private listeners: Map<Callback, SubscribersSet[]> = new Map()\n\n /**\n * Adds a callback as a listener to a channel.\n * @param callback The callback function to add as a listener.\n * @param channel The channel to add the listener to.\n */\n private addListener = (callback: Callback, channel: string): void => {\n const listener = this.listeners.get(callback)\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet) {\n if (listener) {\n listener.push(subscribersSet)\n } else {\n this.listeners.set(callback, [subscribersSet])\n }\n }\n }\n\n /**\n * Removes the callback from the listeners collection if it is not subscribed to any channels.\n * @description Removes the callback only when it is not present in any other subscriberSet\n * (Ref to Map<string, SubscribersSet>).\n * @param callback The callback to remove from listeners.\n */\n private removeListener = (callback: Callback): void => {\n const channelSubscriberSets = this.listeners.get(callback)\n let isEmpty = true\n\n // eslint-disable-next-line no-restricted-syntax\n for (const channelSubscriberSet of channelSubscriberSets || []) {\n isEmpty = !channelSubscriberSet.has(callback)\n if (!isEmpty) {\n break\n }\n }\n\n if (isEmpty) {\n this.listeners.delete(callback)\n }\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param isParent Indicates if the channel is a parent channel.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n private publishToChannel = (channel: string, isParent: boolean, data?: unknown): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (!subscribersSet) {\n return isParent\n }\n\n const iterator = subscribersSet[Symbol.iterator]()\n let subscriberFunc = iterator.next().value\n\n // eslint-disable-next-line no-plusplus\n while (subscriberFunc) {\n subscriberFunc(channel, data)\n subscriberFunc = iterator.next().value\n }\n return true\n }\n\n /**\n * Creates a new instance of PeregrineMQ.\n * @param id Specific instance of PeregrineMQ identifier\n * @param config The configuration options for PeregrineMQ.\n */\n constructor(id?: string, config?: Config) {\n this.id = id || uuidv4()\n this.configure(config || {})\n }\n\n /**\n * Gets the total number of subscribers across all channels.\n */\n get length(): number {\n return [...this.channels.values()].reduce((acc, subscribersList) => acc + subscribersList.size, 0)\n }\n\n /**\n * Configures PeregrineMQ with the specified options.\n * @param config The configuration options for PeregrineMQ.\n * @returns An object containing the prune interval handler (if auto prune is enabled).\n */\n configure = (config: Config): {\n clearPruneInterval?: () => void\n restartPruneInterval?: () => void\n } => {\n this.config = config\n const { allowAutoPrune, pruneInterval } = config\n\n let pruneIntervalHandler: ReturnType<typeof setInterval>\n\n if (allowAutoPrune) {\n pruneIntervalHandler = setInterval(() => {\n this.prune()\n }, pruneInterval)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const instance: PeregrineMQ = this\n\n return {\n ...(allowAutoPrune\n ? {\n clearPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n },\n restartPruneInterval: (): void => {\n clearInterval(pruneIntervalHandler)\n pruneIntervalHandler = setInterval(() => {\n instance.prune()\n }, pruneInterval)\n },\n }\n : {}),\n }\n }\n\n /**\n * Gets an array of all channels.\n * @returns An array of channel names.\n */\n getChannels = (): string[] => [...this.channels.keys()]\n\n /**\n * Prunes the channels with no subscribers.\n * @returns An array of pruned channel names.\n */\n prune = (): string[] => {\n const iterator = this.channels[Symbol.iterator]()\n let subscribersSet = iterator.next().value\n const prunedChannels: string[] = []\n\n // eslint-disable-next-line no-plusplus\n while (subscribersSet) {\n if (subscribersSet[1]?.size === 0) {\n prunedChannels.push(subscribersSet[0])\n this.channels.delete(subscribersSet[0])\n }\n subscribersSet = iterator.next().value\n }\n\n return prunedChannels\n }\n\n /**\n * Removes a channel and its subscribers.\n * @param channel The channel to remove.\n * @returns A boolean indicating if the channel was successfully removed.\n */\n removeChannel = (channel: string): boolean => {\n const subscribersSet = this.channels.get(channel)\n\n if (subscribersSet && subscribersSet.size > 0) {\n const channelListeners = [...subscribersSet || []]\n\n subscribersSet.clear()\n\n let index = channelListeners.length\n\n // eslint-disable-next-line no-plusplus\n while (index--) {\n this.removeListener(channelListeners[index])\n }\n }\n\n return this.channels.delete(channel)\n }\n\n /**\n * Publishes data to a channel.\n * @param channel The channel to publish the data to.\n * @param data The data to publish.\n * @returns A boolean indicating if the publication was successful.\n */\n publish = <T>(channel: string, data?: T): boolean => {\n if (channel.includes('.')) {\n const nestedChannels = channel.split('.')\n\n let { length } = nestedChannels\n let failed = false\n\n // eslint-disable-next-line no-plusplus\n while (length--) {\n const result = this.publishToChannel(\n nestedChannels.slice(0, length + 1).join('.'),\n length !== nestedChannels.length - 1,\n data,\n )\n\n if (!result) {\n failed = true\n }\n }\n return !failed\n }\n\n return this.publishToChannel(channel, false, data)\n }\n\n /**\n * Subscribes a callback to a channel.\n * @param channel The channel to subscribe to.\n * @param callback The callback function to subscribe.\n * @returns A function to unsubscribe the callback.\n */\n subscribe = (channel: string, callback: Callback): () => boolean => {\n const subscribersList = this.channels.get(channel)\n\n if (subscribersList) {\n subscribersList.add(callback)\n } else {\n this.channels.set(channel, new Set([callback]))\n }\n\n this.addListener(callback, channel)\n\n return () => this.unsubscribe(callback, { channel, prune: true })\n }\n\n /**\n * Unsubscribes a callback from a channel or all channels.\n * @param callback The callback function to unsubscribe.\n * @param options Optional unsubscribe options.\n * @returns A boolean indicating if the callback was successfully unsubscribed.\n */\n unsubscribe = (callback: Callback, options?: UnsubscribeOptions): boolean => {\n const { channel, prune } = options || {}\n\n let unsubscribed = false\n\n if (channel) {\n const subscriberSet = this.channels.get(channel)\n\n unsubscribed = subscriberSet ? subscriberSet.delete(callback) : false\n if (prune && subscriberSet?.size === 0) {\n this.channels.delete(channel)\n }\n\n this.removeListener(callback)\n\n return unsubscribed\n }\n\n const subscriberSetArray = this.listeners.get(callback) || []\n\n // remove callback form listeners and all channels\n // TODO remove only if has\n // eslint-disable-next-line no-restricted-syntax\n for (const subscriberSet of subscriberSetArray) {\n unsubscribed = subscriberSet.delete(callback) as boolean\n\n if (prune && subscriberSet.size === 0) {\n this.prune()\n }\n }\n\n this.listeners.delete(callback)\n\n return unsubscribed\n }\n\n /**\n * Checks if a callback is subscribed to a specific channel or any channel.\n * @param callback The callback function to check.\n * @param channel Optional channel name to check subscription for.\n * @returns A boolean indicating if the callback is subscribed.\n */\n isSubscribed = (callback: Callback, channel?: string): boolean => {\n if (channel) {\n const subscribersList = this.channels.get(channel)\n\n return subscribersList ? subscribersList.has(callback) : false\n }\n\n return this.listeners.has(callback)\n }\n\n /**\n * Clears all channels and listeners.\n * @throws {Error} If clearing PeregrineMQ is not allowed.\n */\n clear = (): void => {\n if (this.config.allowClear) {\n this.channels.clear()\n this.listeners.clear()\n } else {\n throw new PeregrineMQClearError()\n }\n }\n\n /**\n * Returns the specific instance of PeregrineMQ.\n * @returns A string identifier of the specific instance of PeregrineMQ.\n */\n getId = (): string => this.id\n}\n"],"names":["PeregrineMQClearError","Error","constructor","super","this","name","PeregrineMQ","id","config","allowAutoPrune","pruneInterval","allowClear","channels","Map","listeners","addListener","callback","channel","listener","get","subscribersSet","push","set","removeListener","channelSubscriberSets","isEmpty","channelSubscriberSet","has","delete","publishToChannel","isParent","data","iterator","Symbol","subscriberFunc","next","value","configure","pruneIntervalHandler","setInterval","prune","instance","clearPruneInterval","clearInterval","restartPruneInterval","getChannels","keys","prunedChannels","size","removeChannel","channelListeners","clear","index","length","publish","includes","nestedChannels","split","failed","slice","join","subscribe","subscribersList","add","Set","unsubscribe","options","unsubscribed","subscriberSet","subscriberSetArray","isSubscribed","getId","uuidv4","values","reduce","acc"],"mappings":"uEAKO,MAAMA,UAA8BC,MACzCC,WAAAA,GACEC,MAAM,4FACNC,KAAKC,KAAO,uBACd,EAMK,MAAMC,EA0FXJ,WAAAA,CAAYK,EAAaC,GAAiBJ,KAzFlCG,QAAE,EAAAH,KAEFI,OAAiB,CACvBC,gBAAgB,EAChBC,cAAe,IACfC,YAAY,GAGdP,KAGQQ,SAAwC,IAAIC,IAEpDT,KAGQU,UAA6C,IAAID,IAEzDT,KAKQW,YAAc,CAACC,EAAoBC,KACzC,MAAMC,EAAWd,KAAKU,UAAUK,IAAIH,GAC9BI,EAAiBhB,KAAKQ,SAASO,IAAIF,GAErCG,IACEF,EACFA,EAASG,KAAKD,GAEdhB,KAAKU,UAAUQ,IAAIN,EAAU,CAACI,IAElC,EAGFhB,KAMQmB,eAAkBP,IACxB,MAAMQ,EAAwBpB,KAAKU,UAAUK,IAAIH,GACjD,IAAIS,GAAU,EAGd,IAAK,MAAMC,KAAwBF,GAAyB,GAE1D,GADAC,GAAWC,EAAqBC,IAAIX,IAC/BS,EACH,MAIAA,GACFrB,KAAKU,UAAUc,OAAOZ,EACxB,EAGFZ,KAOQyB,iBAAmB,CAACZ,EAAiBa,EAAmBC,KAC9D,MAAMX,EAAiBhB,KAAKQ,SAASO,IAAIF,GAEzC,IAAKG,EACH,OAAOU,EAGT,MAAME,EAAWZ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