@e1011/es-kit 1.0.120 → 1.0.124

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 (59) hide show
  1. package/dist/hooks/esm/index.css +30 -30
  2. package/dist/hooks/index.css +30 -30
  3. package/dist/lib/cjs/node_modules/core-js/modules/es.object.keys.js +2 -0
  4. package/dist/lib/cjs/node_modules/core-js/modules/es.object.keys.js.map +1 -0
  5. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  6. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  7. package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  8. package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  9. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +1 -1
  10. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
  11. package/dist/lib/cjs/src/core/utils/helpers/fileValidator.js +1 -1
  12. package/dist/lib/cjs/src/core/utils/helpers/fileValidator.js.map +1 -1
  13. package/dist/lib/esm/node_modules/core-js/modules/es.object.keys.js +2 -0
  14. package/dist/lib/esm/node_modules/core-js/modules/es.object.keys.js.map +1 -0
  15. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  16. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  17. package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  18. package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  19. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +1 -1
  20. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  21. package/dist/lib/esm/src/core/utils/helpers/fileValidator.js +1 -1
  22. package/dist/lib/esm/src/core/utils/helpers/fileValidator.js.map +1 -1
  23. package/dist/lib/src/core/ui/components/container/CollapsibleContainer.js +4 -1
  24. package/dist/lib/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  25. package/dist/lib/src/core/ui/components/container/ResizableContainer.js +0 -3
  26. package/dist/lib/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  27. package/dist/lib/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  28. package/dist/lib/src/core/ui/components/icon/IconBase.js +10 -3
  29. package/dist/lib/src/core/ui/components/icon/IconBase.js.map +1 -1
  30. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  31. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts +3 -2
  32. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts.map +1 -1
  33. package/dist/types/src/core/ui/components/container/ResizableContainer.d.ts.map +1 -1
  34. package/dist/types/src/core/ui/components/dividers/DividerLine.d.ts.map +1 -1
  35. package/dist/types/src/core/ui/components/icon/IconBase.d.ts +2 -1
  36. package/dist/types/src/core/ui/components/icon/IconBase.d.ts.map +1 -1
  37. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  38. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  39. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  40. package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  41. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js +1 -1
  42. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  43. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js +1 -1
  44. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  45. package/dist/ui/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  46. package/dist/ui/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  47. package/dist/ui/src/core/ui/components/icon/IconBase.js +1 -1
  48. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  49. package/dist/utils/esm/index.css +30 -30
  50. package/dist/utils/esm/node_modules/core-js/modules/es.object.keys.js +2 -0
  51. package/dist/utils/esm/node_modules/core-js/modules/es.object.keys.js.map +1 -0
  52. package/dist/utils/esm/src/core/utils/helpers/fileValidator.js +1 -1
  53. package/dist/utils/esm/src/core/utils/helpers/fileValidator.js.map +1 -1
  54. package/dist/utils/index.css +30 -30
  55. package/dist/utils/node_modules/core-js/modules/es.object.keys.js +2 -0
  56. package/dist/utils/node_modules/core-js/modules/es.object.keys.js.map +1 -0
  57. package/dist/utils/src/core/utils/helpers/fileValidator.js +1 -1
  58. package/dist/utils/src/core/utils/helpers/fileValidator.js.map +1 -1
  59. package/package.json +6 -5
@@ -1,5 +1,6 @@
1
- import { FC, ReactNode, CSSProperties } from 'react';
2
- export type CollapsibleContainerProps = {
1
+ import { FC, ReactNode, CSSProperties, PropsWithChildren } from 'react';
2
+ import { LayoutBoxProps } from './layoutBox.types';
3
+ export type CollapsibleContainerProps = PropsWithChildren & LayoutBoxProps & {
3
4
  collapsed?: boolean;
4
5
  collapseHandler?: (collapsed: boolean) => void;
5
6
  children?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleContainer.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA0B,SAAS,EAAuC,aAAa,EAAE,MAAM,OAAO,CAAA;AAYjH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,aAAa,CAAA;AAEjB,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAmD7D,CAAA"}
1
+ {"version":3,"file":"CollapsibleContainer.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA0B,SAAS,EACP,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAKtF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAQlD,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,GAAG,cAAc,GAAG;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,aAAa,CAAA;AAEjB,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAsD7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableContainer.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+D,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAItG,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAmBD,eAAO,MAAM,kBAAkB,0CA4E9B,CAAA"}
1
+ {"version":3,"file":"ResizableContainer.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+D,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAItG,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAgBD,eAAO,MAAM,kBAAkB,0CA4E9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLine.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,EAAE,EAA0B,MAAM,OAAO,CAAA;AAIxD,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,YAAY,CA+BvC,CAAA;AAIF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,YAAY,CACyB,CAAA;AAGtE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,YAAY,CACc,CAAA"}
1
+ {"version":3,"file":"DividerLine.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,EAAE,EAA0B,MAAM,OAAO,CAAA;AAKxD,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,YAAY,CA+BvC,CAAA;AAIF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,YAAY,CACyB,CAAA;AAGtE,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,YAAY,CACc,CAAA"}
@@ -1,4 +1,4 @@
1
- import { CSSProperties, FC, PropsWithChildren } from 'react';
1
+ import { CSSProperties, FC, PropsWithChildren, MouseEvent } from 'react';
2
2
  export type IconBaseType = PropsWithChildren<unknown> & {
3
3
  id?: string;
4
4
  iconUrl?: string;
@@ -11,6 +11,7 @@ export type IconBaseType = PropsWithChildren<unknown> & {
11
11
  color?: string;
12
12
  className?: string;
13
13
  style?: CSSProperties;
14
+ onClick?: (event?: MouseEvent<HTMLSpanElement> | undefined) => void;
14
15
  };
15
16
  export declare const IconBase: FC<IconBaseType>;
16
17
  //# sourceMappingURL=IconBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiB,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAI3E,MAAM,MAAM,YAAY,GAAG,iBA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,CAAA;CACpE,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,YAAY,CAmCpC,CAAA"}
@@ -1,2 +1,2 @@
1
- import{objectWithoutProperties as e,slicedToArray as o,objectSpread2 as r,extends as a}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as l,useRef as t,useState as n,useEffect as s,useLayoutEffect as i,useMemo as c}from"react";import{useParseProps as p}from"../../../hooks/useParseProps.js";import d from"./CollapsibleContainer.module.scss.js";var u=["collapsed","collapseHandler","children","horizontal","className"],h={width:"scrollWidth",height:"scrollHeight"},m=l((function(l){var m=l.collapsed,v=void 0!==m&&m,f=l.collapseHandler,j=l.children,x=l.horizontal,b=void 0!==x&&x,g=l.className,P=void 0===g?"":g,w=e(l,u),y=t(null),C=n(0),H=o(C,2),N=H[0],z=H[1],_=p(w),W=_.dataProps,k=_.restProps,A=!b;s((function(){null==f||f(v)}),[f,v]),i((function(){if(null!=y&&y.current){var e=A?"height":"width";z(y.current[h[e]])}}),[y,A]);var B=c((function(){return r({"--prop-name":A?"height":"width","--prop-max-name":A?"max-height":"max-width","--prop-value":"".concat(N,"px")},k)}),[A,k,N]),E=c((function(){var e=[A?d.vertical:d.horizontal];return v&&N&&null!=N&&e.push(d.collapsed),!v&&N&&null!=N&&e.push(d.expanded),e.join(" ")}),[v,N,A]);return React.createElement("div",a({className:"".concat(d["collapsible-container"]," ").concat(E," ").concat(P," "),ref:y,style:B},W),j)}));m.displayName="CollapsibleContainer";export{m as CollapsibleContainer};
1
+ import{objectWithoutProperties as e,slicedToArray as o,objectSpread2 as r,extends as a}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as l,useRef as t,useState as n,useEffect as s,useLayoutEffect as i,useMemo as c}from"react";import{useParseProps as p}from"../../../hooks/useParseProps.js";import u from"./CollapsibleContainer.module.scss.js";var d=["collapsed","collapseHandler","children","horizontal","className"],h={width:"scrollWidth",height:"scrollHeight"},m=l((function(l){var m=l.collapsed,f=void 0!==m&&m,v=l.collapseHandler,j=l.children,x=l.horizontal,b=void 0!==x&&x,g=l.className,P=void 0===g?"":g,w=e(l,d),y=t(null),C=n(0),H=o(C,2),N=H[0],z=H[1],_=p(w),T=_.dataProps,W=_.restProps,k=!b;s((function(){null==v||v(f)}),[v,f]),i((function(){if(null!=y&&y.current){var e=k?"height":"width";setTimeout((function(){z(y.current[h[e]])}),100)}}),[y,k]);var A=c((function(){return r({"--prop-name":k?"height":"width","--prop-max-name":k?"max-height":"max-width","--prop-value":"".concat(N,"px")},W)}),[k,W,N]),B=c((function(){var e=[k?u.vertical:u.horizontal];return f&&N&&null!=N&&e.push(u.collapsed),!f&&N&&null!=N&&e.push(u.expanded),e.join(" ")}),[f,N,k]);return React.createElement("div",a({className:"".concat(u["collapsible-container"]," ").concat(B," ").concat(P," "),ref:y,style:A},T),j)}));m.displayName="CollapsibleContainer";export{m as CollapsibleContainer};
2
2
  //# sourceMappingURL=CollapsibleContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleContainer.js","sources":["../../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode, useEffect, useLayoutEffect, useMemo, CSSProperties } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport classes from './CollapsibleContainer.module.scss'\n\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', ...props\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const { dataProps, restProps: style } = useParseProps(props)\n\n const vertical = !horizontal\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useLayoutEffect(() => {\n if (containerRef?.current) {\n const propName = vertical ? 'height' : 'width'\n\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, [containerRef, vertical])\n\n const styleProps: CSSProperties = useMemo(() => ({\n '--prop-name': vertical ? 'height' : 'width',\n '--prop-max-name': vertical ? 'max-height' : 'max-width',\n '--prop-value': `${contentProp}px`,\n ...style,\n } as CSSProperties), [vertical, style, contentProp])\n\n const classNames = useMemo(() => {\n const classNames = [vertical ? classes.vertical : classes.horizontal]\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.collapsed)\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.expanded)\n }\n return classNames.join(' ')\n }, [collapsed, contentProp, vertical])\n\n return (\n <div\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n {...dataProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","_ref$collapsed","collapsed","collapseHandler","children","_ref$horizontal","horizontal","_ref$className","className","props","_objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","contentProp","setContentProp","_useParseProps","useParseProps","dataProps","style","restProps","vertical","useEffect","useLayoutEffect","current","propName","styleProps","useMemo","_objectSpread","concat","classNames","classes","push","expanded","join","React","createElement","_extends","ref","displayName"],"mappings":"ggBAOMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,GAAK,SAAAC,GAEvC,IAAAC,EAAAD,EAD/BE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,WAAAA,OAAa,I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sibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode,\n useEffect, useLayoutEffect, useMemo, CSSProperties, PropsWithChildren } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport classes from './CollapsibleContainer.module.scss'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = PropsWithChildren & LayoutBoxProps & {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', ...props\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const { dataProps, restProps: style } = useParseProps(props)\n\n const vertical = !horizontal\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useLayoutEffect(() => {\n if (containerRef?.current) {\n const propName = vertical ? 'height' : 'width'\n\n // TODO test with requestAnimationFrame\n setTimeout(() => {\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }, 100)\n }\n }, [containerRef, vertical])\n\n const styleProps: CSSProperties = useMemo(() => ({\n '--prop-name': vertical ? 'height' : 'width',\n '--prop-max-name': vertical ? 'max-height' : 'max-width',\n '--prop-value': `${contentProp}px`,\n ...style,\n } as CSSProperties), [vertical, style, contentProp])\n\n const classNames = useMemo(() => {\n const classNames = [vertical ? classes.vertical : classes.horizontal]\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.collapsed)\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.expanded)\n }\n return classNames.join(' ')\n }, [collapsed, contentProp, vertical])\n\n return (\n <div\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n {...dataProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","_ref$collapsed","collapsed","collapseHandler","children","_ref$horizontal","horizontal","_ref$className","className","props","_objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","contentProp","setContentProp","_useParseProps","useParseProps","dataProps","style","restProps","vertical","useEffect","useLayoutEffect","current","propName","setTimeout","styleProps","useMemo","_objectSpread","concat","classNames","classes","push","expanded","join","React","createElement","_extends","ref","displayName"],"mappings":"ggBASMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,GAAK,SAAAC,GAEvC,IAAAC,EAAAD,EAD/BE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,WAAAA,OAAa,IAAHD,GAAQA,EAAAE,EAAAP,EAAEQ,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAV,EAAAW,GAEpFC,EAAeC,EAAuB,MAC5CC,EAAsCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAA1CI,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAElCI,EAAwCC,EAAcZ,GAA9Ca,EAASF,EAATE,UAAsBC,EAAKH,EAAhBI,UAEbC,GAAYnB,EAElBoB,GAAU,WACRvB,SAAAA,EAAkBD,EACpB,GAAG,CAACC,EAAiBD,IAErByB,GAAgB,WACd,GAAIf,SAAAA,EAAcgB,QAAS,CACzB,IAAMC,EAAWJ,EAAW,SAAW,QAGvCK,YAAW,WACTX,EAAgBP,EAAagB,QAAgBjC,EAAmBkC,IACjE,GAAE,IACL,CACF,GAAG,CAACjB,EAAca,IAElB,IAAMM,EAA4BC,GAAQ,WAAA,OAAAC,EAAA,CACxC,cAAeR,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAc,GAAAS,OAAKhB,EAAW,OAC3BK,EACc,GAAE,CAACE,EAAUF,EAAOL,IAEjCiB,EAAaH,GAAQ,WACzB,IAAMG,EAAa,CAACV,EAAWW,EAAQX,SAAWW,EAAQ9B,YAQ1D,OANIJ,GAAagB,GAAbhB,MAA4BgB,GAC9BiB,EAAWE,KAAKD,EAAQlC,YAErBA,GAAagB,GAAd,MAA6BA,GAC/BiB,EAAWE,KAAKD,EAAQE,UAEnBH,EAAWI,KAAK,IACxB,GAAE,CAACrC,EAAWgB,EAAaO,IAE5B,OACEe,MAAAC,cAAA,MAAAC,EAAA,CACElC,UAAS0B,GAAAA,OAAKE,EAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAI1B,EAAa,KAC7EmC,IAAK/B,EACLW,MAAOQ,GACHT,GAEHlB,EAGP,IAEAN,EAAqB8C,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, useState, useRef, useMemo, useLayoutEffect, RefObject, PropsWithChildren } from 'react'\nimport debounce from 'lodash-es/debounce'\n\nimport { LayoutBox } from './LayoutBox'\nimport { LayoutBoxProps } from './layoutBox.types'\n\nexport type ResizableContainerProps = LayoutBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\ntype WrapperSize = {width: undefined | number; height: undefined | number}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 111,\n left: 0,\n pointerEvents: 'none',\n // backgroundColor: '#FF000040',\n },\n empty: {\n pointerEvents: 'none',\n // background: '#FF000040',\n // border: '1px solid #0000FF40',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n\n const lastResizeWidthRef = useRef<{ width: number; height: number }>({ width: 0, height: 0 })\n\n const [containerSize, setContainerSize]\n = useState<WrapperSize>({ width: undefined, height: undefined })\n\n const debouncedResizeWrapper = useMemo(() => debounce((entries) => {\n const newResizeWidth = entries[0].contentRect.width\n const newResizeHeight = entries[0].contentRect.height\n\n if (lastResizeWidthRef.current?.width === newResizeWidth\n && lastResizeWidthRef.current?.height === newResizeHeight) {\n return\n }\n lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight }\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }, debounceDelay), [debounceDelay])\n\n useLayoutEffect(() => {\n let resizeObserver: ResizeObserver\n let containerElement: HTMLElement\n\n if (containerRef?.current) {\n containerElement = containerRef?.current\n resizeObserver = new ResizeObserver(debouncedResizeWrapper)\n resizeObserver.observe(containerElement as Element)\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }\n return () => {\n resizeObserver?.unobserve?.(containerElement as Element)\n }\n }, [debouncedResizeWrapper, containerRef])\n\n // END RESIZING\n\n return (\n <LayoutBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <LayoutBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (\n <LayoutBox\n width={`${Math.max(containerSize?.width || 200, 200) || 200}px`}\n height={`${Math.max(containerSize?.height || 200, 200) || 200}px`}\n style={styles.empty}\n />\n )}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </LayoutBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","_ref$debounceDelay","debounceDelay","props","_objectWithoutProperties","_excluded","containerRef","useRef","lastResizeWidthRef","width","height","_useState","useState","undefined","_useState2","_slicedToArray","containerSize","setContainerSize","debouncedResizeWrapper","useMemo","debounce","entries","_lastResizeWidthRef$c","_lastResizeWidthRef$c2","_containerRef$current","_containerRef$current2","newResizeWidth","contentRect","newResizeHeight","current","clientWidth","clientHeight","useLayoutEffect","resizeObserver","containerElement","_containerRef$current3","_containerRef$current4","ResizeObserver","observe","_resizeObserver","_resizeObserver$unobs","unobserve","call","React","createElement","LayoutBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"uWAkBMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,IACRC,KAAM,EACNC,cAAe,QAGjBC,MAAO,CACLD,cAAe,SAMNE,EAAqBC,GAChC,SAAAC,GAA0E,IAAvEC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,cAAAA,OAAgB,IAAHD,EAAG,IAAGA,EAAKE,EAAKC,EAAAL,EAAAM,GAClCC,EAAeC,IAEfC,EAAqBD,EAA0C,CAAEE,MAAO,EAAGC,OAAQ,IAEzFC,EACEC,EAAsB,CAAEH,WAAOI,EAAWH,YAAQG,IAAYC,EAAAC,EAAAJ,EAAA,GADzDK,EAAaF,EAAA,GAAEG,EAAgBH,EAAA,GAGhCI,EAAyBC,GAAQ,WAAA,OAAMC,GAAS,SAACC,GAAY,IAAAC,EAAAC,EAAAC,EAAAC,EAC3DC,EAAiBL,EAAQ,GAAGM,YAAYlB,MACxCmB,EAAkBP,EAAQ,GAAGM,YAAYjB,QAEjBY,QAA1BA,EAAAd,EAAmBqB,eAAnBP,IAA0BA,OAA1BA,EAAAA,EAA4Bb,SAAUiB,IACb,QAA1BH,EAAAf,EAAmBqB,eAAO,IAAAN,OAAA,EAA1BA,EAA4Bb,UAAWkB,IAG1CpB,EAAmBqB,QAAU,CAAEpB,MAAOiB,EAAgBhB,OAAQkB,GAE9DX,EAAiB,CACfR,MAAOH,SAAqBkB,QAATA,EAAZlB,EAAcuB,eAAdL,IAAqBA,SAArBA,EAAuBM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eN,WAInC,IAGFb,EAAmB2D,YAAc"}
1
+ {"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, useState, useRef, useMemo, useLayoutEffect, RefObject, PropsWithChildren } from 'react'\nimport debounce from 'lodash-es/debounce'\n\nimport { LayoutBox } from './LayoutBox'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nexport type ResizableContainerProps = LayoutBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\ntype WrapperSize = {width: undefined | number; height: undefined | number}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 111,\n left: 0,\n pointerEvents: 'none',\n },\n empty: {\n pointerEvents: 'none',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n\n const lastResizeWidthRef = useRef<{ width: number; height: number }>({ width: 0, height: 0 })\n\n const [containerSize, setContainerSize]\n = useState<WrapperSize>({ width: undefined, height: undefined })\n\n const debouncedResizeWrapper = useMemo(() => debounce((entries) => {\n const newResizeWidth = entries[0].contentRect.width\n const newResizeHeight = entries[0].contentRect.height\n\n if (lastResizeWidthRef.current?.width === newResizeWidth\n && lastResizeWidthRef.current?.height === newResizeHeight) {\n return\n }\n lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight }\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }, debounceDelay), [debounceDelay])\n\n useLayoutEffect(() => {\n let resizeObserver: ResizeObserver\n let containerElement: HTMLElement\n\n if (containerRef?.current) {\n containerElement = containerRef?.current\n resizeObserver = new ResizeObserver(debouncedResizeWrapper)\n resizeObserver.observe(containerElement as Element)\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }\n return () => {\n resizeObserver?.unobserve?.(containerElement as Element)\n }\n }, [debouncedResizeWrapper, containerRef])\n\n // END RESIZING\n\n return (\n <LayoutBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <LayoutBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (\n <LayoutBox\n width={`${Math.max(containerSize?.width || 200, 200) || 200}px`}\n height={`${Math.max(containerSize?.height || 200, 200) || 200}px`}\n style={styles.empty}\n />\n )}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </LayoutBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","_ref$debounceDelay","debounceDelay","props","_objectWithoutProperties","_excluded","containerRef","useRef","lastResizeWidthRef","width","height","_useState","useState","undefined","_useState2","_slicedToArray","containerSize","setContainerSize","debouncedResizeWrapper","useMemo","debounce","entries","_lastResizeWidthRef$c","_lastResizeWidthRef$c2","_containerRef$current","_containerRef$current2","newResizeWidth","contentRect","newResizeHeight","current","clientWidth","clientHeight","useLayoutEffect","resizeObserver","containerElement","_containerRef$current3","_containerRef$current4","ResizeObserver","observe","_resizeObserver","_resizeObserver$unobs","unobserve","call","React","createElement","LayoutBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"uWAmBMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,IACRC,KAAM,EACNC,cAAe,QAEjBC,MAAO,CACLD,cAAe,SAINE,EAAqBC,GAChC,SAAAC,GAA0E,IAAvEC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,cAAAA,OAAgB,IAAHD,EAAG,IAAGA,EAAKE,EAAKC,EAAAL,EAAAM,GAClCC,EAAeC,IAEfC,EAAqBD,EA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CAAChB,EAAwBZ,IAK1BqC,MAAAC,cAACC,EAASC,EAAA,CACRrC,MAAM,OACNC,OAAO,OACPqC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACN9C,GAEJwC,MAAAC,cAACC,EAAS,CACRK,MAAO5D,EAAOC,KACdkB,MAAM,OACNC,OAAO,OACPyC,IAAK7C,KAELN,GACF2C,MAAAC,cAACC,EAAS,CACRpC,MAAK,GAAA2C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeP,QAAS,IAAK,MAAQ,IAAQ,MAChEC,OAAM,GAAA0C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeN,SAAU,IAAK,MAAQ,IAAQ,MAClEwC,MAAO5D,EAAOM,QAGfI,IAAYA,aAAAA,EAAAA,EAAW,CACtBU,OAAM0C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeN,SAAU,IAAO,MAC3CD,MAAK2C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeP,QAAS,IAAO,MACzC8C,WAAYvC,UAAAA,EAAeN,WAInC,IAGFb,EAAmB2D,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLine.js","sources":["../../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"4OAkBaA,EAAgCC,GAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,GAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,GAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAQnB,SAAWmB,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
1
+ {"version":3,"file":"DividerLine.js","sources":["../../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"4OAmBaA,EAAgCC,GAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,GAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,GAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAQnB,SAAWmB,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
@@ -1,2 +1,2 @@
1
- import{objectWithoutProperties as e,objectSpread2 as o,extends as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as i,useMemo as r}from"react";import n from"./icon.module.scss.js";var c=["iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style"],s=i((function(i){var s=i.iconUrl,a=i.minWidth,l=i.minHeight,m=i.size,h=i.fontSize,d=i.width,u=i.height,p=i.color,f=void 0===p?"currentColor":p,g=i.className,j=void 0===g?"":g,b=i.children,v=i.style,y=e(i,c),z=r((function(){return o(o(o(o({"--min-width":a||m||d||"auto","--min-height":l||m||u||"auto","--width":m||d||"1rem","--height":m||u||"1rem"},h?{fontSize:h}:{}),s?{"--icon-url":"url(".concat(s,")")}:{}),s?{"--icon-color":f}:{"--icon-content-color":f}),v)}),[a,m,d,l,u,h,s,f,v]);return React.createElement("span",t({},y,{className:"".concat(n["icon-base"]," icon-base ").concat(j),style:z}),!s&&b&&b)}));s.displayName="IconBase";export{s as IconBase};
1
+ import{objectWithoutProperties as o,objectSpread2 as e,extends as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as i,useMemo as n}from"react";import r from"./icon.module.scss.js";var c=["iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick"],s=i((function(i){var s=i.iconUrl,a=i.minWidth,l=i.minHeight,m=i.size,u=i.fontSize,h=i.width,d=i.height,p=i.color,f=void 0===p?"currentColor":p,b=i.className,g=void 0===b?"":b,j=i.children,y=i.style,v=i.onClick,w=o(i,c),z=n((function(){return e(e(e(e(e({"--min-width":a||m||h||"auto","--min-height":l||m||d||"auto","--width":m||h||"1rem","--height":m||d||"1rem"},u?{fontSize:u}:{}),s?{"--icon-url":"url(".concat(s,")")}:{}),s?{"--icon-color":f}:{"--icon-content-color":f}),v?{cursor:"pointer"}:{}),y)}),[a,m,h,l,d,u,s,f,v,y]),k=n((function(){return v?{onClick:v,onkeyDown:v,role:"button",tabIndex:-1}:{}}),[v]);return React.createElement("span",t({},w,k,{className:"".concat(r["icon-base"]," icon-base ").concat(g),style:z}),!s&&j&&j)}));s.displayName="IconBase";export{s as IconBase};
2
2
  //# sourceMappingURL=IconBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\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 style?: CSSProperties\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, ...props\n}: IconBaseType) => {\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 ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, style])\n\n return (\n <span\n {...props}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","style","props","_objectWithoutProperties","_excluded","styles","useMemo","_objectSpread","concat","React","createElement","_extends","classes","displayName"],"mappings":"wYAkBaA,EAA6BC,GAAmB,SAAAC,GAGzC,IAFlBC,EAAOD,EAAPC,QAASC,EAAQF,EAARE,SAAUC,EAASH,EAATG,UAAWC,EAAIJ,EAAJI,KAC9BC,EAAQL,EAARK,SAAUC,EAAKN,EAALM,MAAOC,EAAMP,EAANO,OAAMC,EAAAR,EAAES,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAV,EAAEW,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQZ,EAARY,SAAUC,EAAKb,EAALa,MAAUC,EAAKC,EAAAf,EAAAgB,GAEpFC,EAASC,GAAQ,WAAA,OAAAC,EAAAA,EAAAA,EAAAA,EAAA,CAEnB,cAAejB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,QAC1BF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BJ,EAAU,CAAE,aAAY,OAAAmB,OAASnB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBQ,GAAU,CAAE,uBAAwBA,IACjEI,EAEN,GAAE,CAACX,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUJ,EAASQ,EAAOI,IAExE,OACEQ,MAAAC,cAAAC,OAAAA,KACMT,EAAK,CACTH,UAAS,GAAAS,OAAKI,EAAQ,aAAYJ,eAAAA,OAAcT,GAChDE,MAAOI,KAEJhB,GAAWW,GAAaA,EAGjC,IAEAd,EAAS2B,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'\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\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 style?: CSSProperties\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 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 ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onkeyDown: 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 {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","style","onClick","props","_objectWithoutProperties","_excluded","styles","useMemo","_objectSpread","concat","cursor","onClickProps","onkeyDown","role","tabIndex","React","createElement","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ict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),l=require("../../../hooks/useParseProps.js"),a=require("./CollapsibleContainer.module.scss.js"),o=["collapsed","collapseHandler","children","horizontal","className"],t={width:"scrollWidth",height:"scrollHeight"},s=r.memo((function(s){var n=s.collapsed,i=void 0!==n&&n,u=s.collapseHandler,c=s.children,d=s.horizontal,p=void 0!==d&&d,h=s.className,f=void 0===h?"":h,m=e.objectWithoutProperties(s,o),v=r.useRef(null),j=r.useState(0),P=e.slicedToArray(j,2),b=P[0],x=P[1],g=l.useParseProps(m),y=g.dataProps,C=g.restProps,q=!p;r.useEffect((function(){null==u||u(i)}),[u,i]),r.useLayoutEffect((function(){if(null!=v&&v.current){var e=q?"height":"width";x(v.current[t[e]])}}),[v,q]);var _=r.useMemo((function(){return e.objectSpread2({"--prop-name":q?"height":"width","--prop-max-name":q?"max-height":"max-width","--prop-value":"".concat(b,"px")},C)}),[q,C,b]),w=r.useMemo((function(){var e=[q?a.default.vertical:a.default.horizontal];return i&&b&&null!=b&&e.push(a.default.collapsed),!i&&b&&null!=b&&e.push(a.default.expanded),e.join(" ")}),[i,b,q]);return React.createElement("div",e.extends({className:"".concat(a.default["collapsible-container"]," ").concat(w," ").concat(f," "),ref:v,style:_},y),c)}));s.displayName="CollapsibleContainer",exports.CollapsibleContainer=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var r=require("react"),l=require("../../../hooks/useParseProps.js"),a=require("./CollapsibleContainer.module.scss.js"),t=["collapsed","collapseHandler","children","horizontal","className"],o={width:"scrollWidth",height:"scrollHeight"},s=r.memo((function(s){var n=s.collapsed,i=void 0!==n&&n,u=s.collapseHandler,c=s.children,d=s.horizontal,p=void 0!==d&&d,h=s.className,f=void 0===h?"":h,m=e.objectWithoutProperties(s,t),v=r.useRef(null),j=r.useState(0),P=e.slicedToArray(j,2),b=P[0],x=P[1],g=l.useParseProps(m),y=g.dataProps,C=g.restProps,q=!p;r.useEffect((function(){null==u||u(i)}),[u,i]),r.useLayoutEffect((function(){if(null!=v&&v.current){var e=q?"height":"width";setTimeout((function(){x(v.current[o[e]])}),100)}}),[v,q]);var _=r.useMemo((function(){return e.objectSpread2({"--prop-name":q?"height":"width","--prop-max-name":q?"max-height":"max-width","--prop-value":"".concat(b,"px")},C)}),[q,C,b]),w=r.useMemo((function(){var e=[q?a.default.vertical:a.default.horizontal];return i&&b&&null!=b&&e.push(a.default.collapsed),!i&&b&&null!=b&&e.push(a.default.expanded),e.join(" ")}),[i,b,q]);return React.createElement("div",e.extends({className:"".concat(a.default["collapsible-container"]," ").concat(w," ").concat(f," "),ref:v,style:_},y),c)}));s.displayName="CollapsibleContainer",exports.CollapsibleContainer=s;
2
2
  //# sourceMappingURL=CollapsibleContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleContainer.js","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode, useEffect, useLayoutEffect, useMemo, CSSProperties } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport classes from './CollapsibleContainer.module.scss'\n\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', ...props\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const { dataProps, restProps: style } = useParseProps(props)\n\n const vertical = !horizontal\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useLayoutEffect(() => {\n if (containerRef?.current) {\n const propName = vertical ? 'height' : 'width'\n\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, [containerRef, vertical])\n\n const styleProps: CSSProperties = useMemo(() => ({\n '--prop-name': vertical ? 'height' : 'width',\n '--prop-max-name': vertical ? 'max-height' : 'max-width',\n '--prop-value': `${contentProp}px`,\n ...style,\n } as CSSProperties), [vertical, style, contentProp])\n\n const classNames = useMemo(() => {\n const classNames = [vertical ? classes.vertical : classes.horizontal]\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.collapsed)\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.expanded)\n }\n return classNames.join(' ')\n }, [collapsed, contentProp, vertical])\n\n return (\n <div\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n {...dataProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","_ref$collapsed","collapsed","collapseHandler","children","_ref$horizontal","horizontal","_ref$className","className","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","contentProp","setContentProp","_useParseProps","useParseProps","dataProps","style","restProps","vertical","useEffect","useLayoutEffect","current","propName","styleProps","useMemo","_objectSpread","concat","classNames","classes","push","expanded","join","React","createElement","_extends","ref","displayName"],"mappings":"iZAOMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,EAAAA,MAAK,SAAAC,GAEvC,IAAAC,EAAAD,EAD/BE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,WAAAA,OAAa,IAAHD,GAAQA,EAAAE,EAAAP,EAA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3,"file":"CollapsibleContainer.js","sources":["../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode,\n useEffect, useLayoutEffect, useMemo, CSSProperties, PropsWithChildren } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport classes from './CollapsibleContainer.module.scss'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = PropsWithChildren & LayoutBoxProps & {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', ...props\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const { dataProps, restProps: style } = useParseProps(props)\n\n const vertical = !horizontal\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useLayoutEffect(() => {\n if (containerRef?.current) {\n const propName = vertical ? 'height' : 'width'\n\n // TODO test with requestAnimationFrame\n setTimeout(() => {\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }, 100)\n }\n }, [containerRef, vertical])\n\n const styleProps: CSSProperties = useMemo(() => ({\n '--prop-name': vertical ? 'height' : 'width',\n '--prop-max-name': vertical ? 'max-height' : 'max-width',\n '--prop-value': `${contentProp}px`,\n ...style,\n } as CSSProperties), [vertical, style, contentProp])\n\n const classNames = useMemo(() => {\n const classNames = [vertical ? classes.vertical : classes.horizontal]\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.collapsed)\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.expanded)\n }\n return classNames.join(' ')\n }, [collapsed, contentProp, vertical])\n\n return (\n <div\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n {...dataProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","_ref$collapsed","collapsed","collapseHandler","children","_ref$horizontal","horizontal","_ref$className","className","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","contentProp","setContentProp","_useParseProps","useParseProps","dataProps","style","restProps","vertical","useEffect","useLayoutEffect","current","propName","setTimeout","styleProps","useMemo","_objectSpread","concat","classNames","classes","push","expanded","join","React","createElement","_extends","ref","displayName"],"mappings":"iZASMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,EAAAA,MAAK,SAAAC,GAEvC,IAAAC,EAAAD,EAD/BE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,WAAAA,OAAa,IAAHD,GAAQA,EAAAE,EAAAP,EAAEQ,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAC,wBAAAX,EAAAY,GAEpFC,EAAeC,SAAuB,MAC5CC,EAAsCC,EAAQA,SAAC,GAAEC,EAAAC,EAAAA,cAAAH,EAAA,GAA1CI,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAElCI,EAAwCC,EAAaA,cAACb,GAA9Cc,EAASF,EAATE,UAAsBC,EAAKH,EAAhBI,UAEbC,GAAYpB,EAElBqB,EAAAA,WAAU,WACRxB,SAAAA,EAAkBD,EACpB,GAAG,CAACC,EAAiBD,IAErB0B,EAAAA,iBAAgB,WACd,GAAIf,SAAAA,EAAcgB,QAAS,CACzB,IAAMC,EAAWJ,EAAW,SAAW,QAGvCK,YAAW,WACTX,EAAgBP,EAAagB,QAAgBlC,EAAmBmC,IACjE,GAAE,IACL,CACF,GAAG,CAACjB,EAAca,IAElB,IAAMM,EAA4BC,EAAAA,SAAQ,WAAA,OAAAC,gBAAA,CACxC,cAAeR,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAc,GAAAS,OAAKhB,EAAW,OAC3BK,EACc,GAAE,CAACE,EAAUF,EAAOL,IAEjCiB,EAAaH,EAAAA,SAAQ,WACzB,IAAMG,EAAa,CAACV,EAAWW,EAAAA,QAAQX,SAAWW,EAAAA,QAAQ/B,YAQ1D,OANIJ,GAAaiB,GAAbjB,MAA4BiB,GAC9BiB,EAAWE,KAAKD,UAAQnC,YAErBA,GAAaiB,GAAd,MAA6BA,GAC/BiB,EAAWE,KAAKD,UAAQE,UAEnBH,EAAWI,KAAK,IACxB,GAAE,CAACtC,EAAWiB,EAAaO,IAE5B,OACEe,MAAAC,cAAA,MAAAC,UAAA,CACEnC,UAAS2B,GAAAA,OAAKE,EAAAA,QAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAI3B,EAAa,KAC7EoC,IAAK/B,EACLW,MAAOQ,GACHT,GAEHnB,EAGP,IAEAN,EAAqB+C,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, useState, useRef, useMemo, useLayoutEffect, RefObject, PropsWithChildren } from 'react'\nimport debounce from 'lodash-es/debounce'\n\nimport { LayoutBox } from './LayoutBox'\nimport { LayoutBoxProps } from './layoutBox.types'\n\nexport type ResizableContainerProps = LayoutBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\ntype WrapperSize = {width: undefined | number; height: undefined | number}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 111,\n left: 0,\n pointerEvents: 'none',\n // backgroundColor: '#FF000040',\n },\n empty: {\n pointerEvents: 'none',\n // background: '#FF000040',\n // border: '1px solid #0000FF40',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n\n const lastResizeWidthRef = useRef<{ width: number; height: number }>({ width: 0, height: 0 })\n\n const [containerSize, setContainerSize]\n = useState<WrapperSize>({ width: undefined, height: undefined })\n\n const debouncedResizeWrapper = useMemo(() => debounce((entries) => {\n const newResizeWidth = entries[0].contentRect.width\n const newResizeHeight = entries[0].contentRect.height\n\n if (lastResizeWidthRef.current?.width === newResizeWidth\n && lastResizeWidthRef.current?.height === newResizeHeight) {\n return\n }\n lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight }\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }, debounceDelay), [debounceDelay])\n\n useLayoutEffect(() => {\n let resizeObserver: ResizeObserver\n let containerElement: HTMLElement\n\n if (containerRef?.current) {\n containerElement = containerRef?.current\n resizeObserver = new ResizeObserver(debouncedResizeWrapper)\n resizeObserver.observe(containerElement as Element)\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }\n return () => {\n resizeObserver?.unobserve?.(containerElement as Element)\n }\n }, [debouncedResizeWrapper, containerRef])\n\n // END RESIZING\n\n return (\n <LayoutBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <LayoutBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (\n <LayoutBox\n width={`${Math.max(containerSize?.width || 200, 200) || 200}px`}\n height={`${Math.max(containerSize?.height || 200, 200) || 200}px`}\n style={styles.empty}\n />\n )}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </LayoutBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","_ref$debounceDelay","debounceDelay","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","lastResizeWidthRef","width","height","_useState","useState","undefined","_useState2","_slicedToArray","containerSize","setContainerSize","debouncedResizeWrapper","useMemo","debounce","entries","_lastResizeWidthRef$c","_lastResizeWidthRef$c2","_containerRef$current","_containerRef$current2","newResizeWidth","contentRect","newResizeHeight","current","clientWidth","clientHeight","useLayoutEffect","resizeObserver","containerElement","_containerRef$current3","_containerRef$current4","ResizeObserver","observe","_resizeObserver","_resizeObserver$unobs","unobserve","call","React","createElement","LayoutBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"uRAkBMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,IACRC,KAAM,EACNC,cAAe,QAGjBC,MAAO,CACLD,cAAe,SAMNE,EAAqBC,EAAAA,MAChC,SAAAC,GAA0E,IAAvEC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,cAAAA,OAAgB,IAAHD,EAAG,IAAGA,EAAKE,EAAKC,EAAAC,wBAAAN,EAAAO,GAClCC,EAAeC,EAAAA,SAEfC,EAAqBD,EAAAA,OAA0C,CAAEE,MAAO,EAAGC,OAAQ,IAEzFC,EACEC,EAAAA,SAAsB,CAAEH,WAAOI,EAAWH,YAAQG,IAAYC,EAAAC,EAAAA,cAAAJ,EAAA,GADzDK,EAAaF,EAAA,GAAEG,EAAgBH,EAAA,GAGhCI,EAAyBC,EAAAA,SAAQ,WAAA,OAAMC,EAAAA,SAAS,SAACC,GAAY,IAAAC,EAAAC,EAAAC,EAAAC,EAC3DC,EAAiBL,EAAQ,GAAGM,YAAYlB,MACxCmB,EAAkBP,EAAQ,GAAGM,YAAYjB,QAEjBY,QAA1BA,EAAAd,EAAmBqB,eAAnBP,IAA0BA,OAA1BA,EAAAA,EAA4Bb,SAAUiB,IAC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AAAA,EAAeN,SAAU,IAAK,MAAQ,IAAQ,MAClEwC,MAAO7D,EAAOM,QAGfI,IAAYA,aAAAA,EAAAA,EAAW,CACtBW,OAAM0C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeN,SAAU,IAAO,MAC3CD,MAAK2C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeP,QAAS,IAAO,MACzC8C,WAAYvC,UAAAA,EAAeN,WAInC,IAGFd,EAAmB4D,YAAc"}
1
+ {"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, useState, useRef, useMemo, useLayoutEffect, RefObject, PropsWithChildren } from 'react'\nimport debounce from 'lodash-es/debounce'\n\nimport { LayoutBox } from './LayoutBox'\nimport { LayoutBoxProps } from './layoutBox.types'\n\n\nexport type ResizableContainerProps = LayoutBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\ntype WrapperSize = {width: undefined | number; height: undefined | number}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 111,\n left: 0,\n pointerEvents: 'none',\n },\n empty: {\n pointerEvents: 'none',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n\n const lastResizeWidthRef = useRef<{ width: number; height: number }>({ width: 0, height: 0 })\n\n const [containerSize, setContainerSize]\n = useState<WrapperSize>({ width: undefined, height: undefined })\n\n const debouncedResizeWrapper = useMemo(() => debounce((entries) => {\n const newResizeWidth = entries[0].contentRect.width\n const newResizeHeight = entries[0].contentRect.height\n\n if (lastResizeWidthRef.current?.width === newResizeWidth\n && lastResizeWidthRef.current?.height === newResizeHeight) {\n return\n }\n lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight }\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }, debounceDelay), [debounceDelay])\n\n useLayoutEffect(() => {\n let resizeObserver: ResizeObserver\n let containerElement: HTMLElement\n\n if (containerRef?.current) {\n containerElement = containerRef?.current\n resizeObserver = new ResizeObserver(debouncedResizeWrapper)\n resizeObserver.observe(containerElement as Element)\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }\n return () => {\n resizeObserver?.unobserve?.(containerElement as Element)\n }\n }, [debouncedResizeWrapper, containerRef])\n\n // END RESIZING\n\n return (\n <LayoutBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <LayoutBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (\n <LayoutBox\n width={`${Math.max(containerSize?.width || 200, 200) || 200}px`}\n height={`${Math.max(containerSize?.height || 200, 200) || 200}px`}\n style={styles.empty}\n />\n )}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </LayoutBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","_ref$debounceDelay","debounceDelay","props","_objectWithoutProperties","objectWithoutProperties","_excluded","containerRef","useRef","lastResizeWidthRef","width","height","_useState","useState","undefined","_useState2","_slicedToArray","containerSize","setContainerSize","debouncedResizeWrapper","useMemo","debounce","entries","_lastResizeWidthRef$c","_lastResizeWidthRef$c2","_containerRef$current","_containerRef$current2","newResizeWidth","contentRect","newResizeHeight","current","clientWidth","clientHeight","useLayoutEffect","resizeObserver","containerElement","_containerRef$current3","_containerRef$current4","ResizeObserver","observe","_resizeObserver","_resizeObserver$unobs","unobserve","call","React","createElement","LayoutBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"uRAmBMA,EA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AQJ,GAEvBjB,EAAiB,CACfR,MAAOH,SAAqB6B,QAATA,EAAZ7B,EAAcuB,eAAdM,IAAqBA,SAArBA,EAAuBL,YAC9BpB,OAAQJ,SAAqB,QAAT8B,EAAZ9B,EAAcuB,eAAO,IAAAO,SAArBA,EAAuBL,gBAGnC,OAAO,WAAM,IAAAQ,EAAAC,EACG,QAAdD,EAAAN,SAAcO,IAAAD,GAAWC,QAAXA,EAAdD,EAAgBE,qBAASD,GAAzBA,EAAAE,KAAAH,EAA4BL,GAEhC,GAAG,CAAChB,EAAwBZ,IAK1BqC,MAAAC,cAACC,EAASA,UAAAC,UAAA,CACRrC,MAAM,OACNC,OAAO,OACPqC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACN/C,GAEJyC,MAAAC,cAACC,EAAAA,UAAS,CACRK,MAAO7D,EAAOC,KACdmB,MAAM,OACNC,OAAO,OACPyC,IAAK7C,KAELP,GACF4C,MAAAC,cAACC,EAAAA,UAAS,CACRpC,MAAK,GAAA2C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeP,QAAS,IAAK,MAAQ,IAAQ,MAChEC,OAAM,GAAA0C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeN,SAAU,IAAK,MAAQ,IAAQ,MAClEwC,MAAO7D,EAAOM,QAGfI,IAAYA,aAAAA,EAAAA,EAAW,CACtBW,OAAM0C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeN,SAAU,IAAO,MAC3CD,MAAK2C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeP,QAAS,IAAO,MACzC8C,WAAYvC,UAAAA,EAAeN,WAInC,IAGFd,EAAmB4D,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLine.js","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"iRAkBaA,EAAgCC,EAAAA,MAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,EAAAA,SAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,EAAAA,SAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAAA,QAAQnB,SAAWmB,EAAAA,QAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAO,QAAS,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
1
+ {"version":3,"file":"DividerLine.js","sources":["../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"iRAmBaA,EAAgCC,EAAAA,MAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,EAAAA,SAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,EAAAA,SAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAAA,QAAQnB,SAAWmB,EAAAA,QAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAO,QAAS,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,EAAAA,MAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,UAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var o=require("react"),t=require("./icon.module.scss.js"),r=["iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style"],i=o.memo((function(i){var c=i.iconUrl,n=i.minWidth,s=i.minHeight,a=i.size,l=i.fontSize,u=i.width,d=i.height,h=i.color,m=void 0===h?"currentColor":h,p=i.className,j=void 0===p?"":p,b=i.children,f=i.style,g=e.objectWithoutProperties(i,r),v=o.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":n||a||u||"auto","--min-height":s||a||d||"auto","--width":a||u||"1rem","--height":a||d||"1rem"},l?{fontSize:l}:{}),c?{"--icon-url":"url(".concat(c,")")}:{}),c?{"--icon-color":m}:{"--icon-content-color":m}),f)}),[n,a,u,s,d,l,c,m,f]);return React.createElement("span",e.extends({},g,{className:"".concat(t.default["icon-base"]," icon-base ").concat(j),style:v}),!c&&b&&b)}));i.displayName="IconBase",exports.IconBase=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js");var o=require("react"),t=require("./icon.module.scss.js"),r=["iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick"],i=o.memo((function(i){var n=i.iconUrl,c=i.minWidth,s=i.minHeight,a=i.size,l=i.fontSize,u=i.width,d=i.height,m=i.color,h=void 0===m?"currentColor":m,p=i.className,b=void 0===p?"":p,j=i.children,f=i.style,S=i.onClick,g=e.objectWithoutProperties(i,r),v=o.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":c||a||u||"auto","--min-height":s||a||d||"auto","--width":a||u||"1rem","--height":a||d||"1rem"},l?{fontSize:l}:{}),n?{"--icon-url":"url(".concat(n,")")}:{}),n?{"--icon-color":h}:{"--icon-content-color":h}),S?{cursor:"pointer"}:{}),f)}),[c,a,u,s,d,l,n,h,S,f]),y=o.useMemo((function(){return S?{onClick:S,onkeyDown:S,role:"button",tabIndex:-1}:{}}),[S]);return React.createElement("span",e.extends({},g,y,{className:"".concat(t.default["icon-base"]," icon-base ").concat(b),style:v}),!n&&j&&j)}));i.displayName="IconBase",exports.IconBase=i;
2
2
  //# sourceMappingURL=IconBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\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 style?: CSSProperties\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, ...props\n}: IconBaseType) => {\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 ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, style])\n\n return (\n <span\n {...props}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","style","props","_objectWithoutProperties","objectWithoutProperties","_excluded","styles","useMemo","_objectSpread","objectSpread2","concat","React","createElement","_extends","classes","displayName"],"mappings":"6XAkBaA,EAA6BC,EAAAA,MAAmB,SAAAC,GAGzC,IAFlBC,EAAOD,EAAPC,QAASC,EAAQF,EAARE,SAAUC,EAASH,EAATG,UAAWC,EAAIJ,EAAJI,KAC9BC,EAAQL,EAARK,SAAUC,EAAKN,EAALM,MAAOC,EAAMP,EAANO,OAAMC,EAAAR,EAAES,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAV,EAAEW,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQZ,EAARY,SAAUC,EAAKb,EAALa,MAAUC,EAAKC,EAAAC,wBAAAhB,EAAAiB,GAEpFC,EAASC,EAAAA,SAAQ,WAAA,OAAAC,gBAAAA,EAAAA,cAAAA,EAAAC,cAAAD,gBAAA,CAEnB,cAAelB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,QAC1BF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BJ,EAAU,CAAE,aAAY,OAAAqB,OAASrB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBQ,GAAU,CAAE,uBAAwBA,IACjEI,EAEN,GAAE,CAACX,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUJ,EAASQ,EAAOI,IAExE,OACEU,MAAAC,cAAAC,OAAAA,EAAAA,WACMX,EAAK,CACTH,UAAS,GAAAW,OAAKI,EAAO,QAAC,aAAYJ,eAAAA,OAAcX,GAChDE,MAAOK,KAEJjB,GAAWW,GAAaA,EAGjC,IAEAd,EAAS6B,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'\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\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 style?: CSSProperties\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 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 ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onkeyDown: 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 {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","style","onClick","props","_objectWithoutProperties","objectWithoutProperties","_excluded","styles","useMemo","_objectSpread","objectSpread2","concat","cursor","onClickProps","onkeyDown","role","tabIndex","React","createElement","_extends","classes","displayName"],"mappings":"uYAmBaA,EAA6BC,EAAAA,MAAmB,SAAAC,GAGzC,IAFlBC,EAAOD,EAAPC,QAASC,EAAQF,EAARE,SAAUC,EAASH,EAATG,UAAWC,EAAIJ,EAAJI,KAC9BC,EAAQL,EAARK,SAAUC,EAAKN,EAALM,MAAOC,EAAMP,EAANO,OAAMC,EAAAR,EAAES,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAV,EAAEW,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQZ,EAARY,SAAUC,EAAKb,EAALa,MAAOC,EAAOd,EAAPc,QAAYC,EAAKC,EAAAC,wBAAAjB,EAAAkB,GAE7FC,EAASC,EAAAA,SAAQ,WAAA,OAAAC,EAAAC,cAAAD,EAAAC,cAAAD,gBAAAA,EAAAA,cAAAA,EAAAA,cAAA,CAEnB,cAAenB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,QAC1BF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BJ,EAAU,CAAE,aAAY,OAAAsB,OAAStB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBQ,GAAU,CAAE,uBAAwBA,IAChEK,EAAU,CAAEU,OAAQ,WAAc,CAAE,GACrCX,EAEN,GAAE,CAACX,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUJ,EAASQ,EAAOK,EAASD,IAE3EY,EAAeL,EAAAA,SAAQ,WAAA,OAAON,EAAW,CAC7CA,QAAAA,EACAY,UAAWZ,EACXa,KAAM,SACNC,UAAW,GACR,EAAE,GAAG,CAACd,IAEX,OACEe,MAAAC,cAAA,OAAAC,EAAA,QACMhB,CAAAA,EAAAA,EACAU,EAAY,CAChBd,UAAS,GAAAY,OAAKS,EAAO,QAAC,aAAYT,eAAAA,OAAcZ,GAChDE,MAAOM,KAEJlB,GAAWW,GAAaA,EAGjC,IAEAd,EAASmC,YAAc"}
@@ -1,3 +1,33 @@
1
+ .icon-module_icon-base-parent__nOMvW {
2
+ line-height: 1px !important;
3
+ }
4
+
5
+ .icon-module_icon-base__S0tHf {
6
+ min-width: var(--min-width);
7
+ min-height: var(--min-height);
8
+ width: var(--width) !important;
9
+ height: var(--height) !important;
10
+ line-height: 1px !important;
11
+ background-color: var(--icon-color);
12
+ color: var(--icon-content-color);
13
+ background-repeat: no-repeat;
14
+ mask-image: var(--icon-url);
15
+ -webkit-mask-image: var(--icon-url);
16
+ mask-repeat: no-repeat;
17
+ -webkit-mask-repeat: no-repeat;
18
+ mask-size: contain;
19
+ -webkit-mask-size: contain;
20
+ mask-position: center;
21
+ -webkit-mask-position: center;
22
+ display: inline-block;
23
+ will-change: transform;
24
+ transform: translate3d(0, 0, 0);
25
+ }
26
+ .icon-module_icon-base__S0tHf svg {
27
+ fill: var(--icon-content-color);
28
+ width: var(--height);
29
+ height: var(--width);
30
+ }
1
31
  .divider-module_divider-line__6CesR {
2
32
  position: relative;
3
33
  display: block;
@@ -41,36 +71,6 @@
41
71
  min-height: 0;
42
72
  border-radius: initial;
43
73
  }
44
- .icon-module_icon-base-parent__nOMvW {
45
- line-height: 1px !important;
46
- }
47
-
48
- .icon-module_icon-base__S0tHf {
49
- min-width: var(--min-width);
50
- min-height: var(--min-height);
51
- width: var(--width) !important;
52
- height: var(--height) !important;
53
- line-height: 1px !important;
54
- background-color: var(--icon-color);
55
- color: var(--icon-content-color);
56
- background-repeat: no-repeat;
57
- mask-image: var(--icon-url);
58
- -webkit-mask-image: var(--icon-url);
59
- mask-repeat: no-repeat;
60
- -webkit-mask-repeat: no-repeat;
61
- mask-size: contain;
62
- -webkit-mask-size: contain;
63
- mask-position: center;
64
- -webkit-mask-position: center;
65
- display: inline-block;
66
- will-change: transform;
67
- transform: translate3d(0, 0, 0);
68
- }
69
- .icon-module_icon-base__S0tHf svg {
70
- fill: var(--icon-content-color);
71
- width: var(--height);
72
- height: var(--width);
73
- }
74
74
  .CollapsibleContainer-module_collapsible-container__u0Jmm {
75
75
  transform-origin: 0% 0%;
76
76
  opacity: 0;
@@ -0,0 +1,2 @@
1
+ import{_ as t}from"../internals/export.js";import{t as r}from"../internals/to-object.js";import{o}from"../internals/object-keys.js";import{f as s}from"../internals/fails.js";var e=r,n=o;t({target:"Object",stat:!0,forced:s((function(){n(1)}))},{keys:function(t){return n(e(t))}});
2
+ //# sourceMappingURL=es.object.keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.object.keys.js","sources":["../../../../../../node_modules/core-js/modules/es.object.keys.js"],"sourcesContent":["var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n"],"names":["toObject","require$$1","nativeKeys","require$$2","require$$0","target","stat","forced","require$$3","keys","it"],"mappings":"8KAAA,IACIA,EAAWC,EACXC,EAAaC,EAFTC,EASN,CAAEC,OAAQ,SAAUC,MAAM,EAAMC,OANtBC,GAEoB,WAAcN,EAAW,EAAG,KAIK,CAC/DO,KAAM,SAAcC,GAClB,OAAOR,EAAWF,EAASU,GAC5B"}
@@ -1,2 +1,2 @@
1
- import{toConsumableArray as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../node_modules/core-js/modules/es.regexp.exec.js";import"../../../../node_modules/core-js/modules/es.string.split.js";import"../../../../node_modules/core-js/modules/es.string.trim.js";import"../../../../node_modules/core-js/modules/es.array.splice.js";import"../../../../node_modules/core-js/modules/es.object.to-string.js";import"../../../../node_modules/core-js/modules/web.dom-collections.for-each.js";import"../../../../node_modules/core-js/modules/es.array.includes.js";import"../../../../node_modules/core-js/modules/es.regexp.to-string.js";import"../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../node_modules/core-js/modules/es.array.iterator.js";import"../../../../node_modules/core-js/modules/es.set.constructor.js";import"../../../../node_modules/core-js/modules/es.string.iterator.js";import"../../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import{fileNameExt as r}from"./textValueOperations.js";var n=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:";",n=e.split("\r\n");n.length<=1&&(n=e.split("\n"));var o=n.shift(),l=o?o.split(r):null;return{firstLine:o,lines:n,columns:l,numColumns:l?l.length:0}},o=function(e,r,n,o){return e.length!==r?{message:"errors.uploadInput.file.line.invalid",params:{line:n,index:o+1}}:null},l=function(e,r,n,o){return e!==e.trim()?{message:"errors.uploadInput.file.cell.invalid",params:{line:r,cell:e,lineIndex:n,cellIndex:o}}:null},s=function(e,r){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";",s=[],t=e.length;t--;)""!==e[t].trim()&&""!==e[t].split(";").join("").trim()||e.splice(t,1);var i=null,u=null,d=null;return e.forEach((function(e,t){i=e.split(n),(u=o(i,r,e,t))&&s.push(u),i.forEach((function(r,n){(d=l(r,e,t,n))&&s.push(d)}))})),s},t=function(o,l){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";";if(o)if("csv"===r(o.name)&&["text/csv","text/plain","application/vnd.ms-excel"].includes(o.type)){var i=new FileReader;i.readAsText(o),i.onloadend=function(){var r=i.result?i.result.toString():"",o=n(r,t),u=o.numColumns,d=o.lines;if(u<2)l(["errors.uploadInput.file.numColumns"]);else if((null==d?void 0:d.length)<1)l(["errors.uploadInput.file.numLines"]);else{var a=s(d,u,t).map((function(e){return null!=e&&e.message?JSON.stringify(e):String(e)})),m=e(new Set(a)).map((function(e){return JSON.parse(e)}));l&&l(m.length?m:null)}},i.onerror=function(e){}}else l(["errors.uploadInput.file.invalid"]);else l(["errors.uploadInput.file.empty"])},i=function(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";";if(e)if("sdf"===r(e.name)){var s=new FileReader;s.readAsText(e),s.onloadend=function(){var e=s.result?s.result.toString():"",r=n(e,l).lines;(null==r?void 0:r.length)<1?o(["errors.uploadInput.file.numLines"]):o&&o(null)},s.onerror=function(e){}}else o(["errors.uploadInput.file.invalid"]);else o(["errors.uploadInput.file.empty"])},u=function(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";";if(e)if("json"===r(e.name)){var s=new FileReader;s.readAsText(e),s.onloadend=function(){var e=s.result?s.result.toString():"";try{var r=JSON.parse(e);JSON.stringify(r)}catch(e){return void o(["errors.uploadInput.file.invalid"])}var t=n(e,l).lines;(null==t?void 0:t.length)<1?o(["errors.uploadInput.file.numLines"]):o&&o(null)},s.onerror=function(e){}}else o(["errors.uploadInput.file.invalid"]);else o(["errors.uploadInput.file.empty"])};export{n as parseCSVdata,t as validateCSVFile,s as validateCSVlines,u as validateJSONFile,l as validateLineCellTrimmed,o as validateLineNumColumns,i as validateSDFFile};
1
+ import{toConsumableArray as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../node_modules/core-js/modules/es.regexp.exec.js";import"../../../../node_modules/core-js/modules/es.string.split.js";import"../../../../node_modules/core-js/modules/es.string.trim.js";import"../../../../node_modules/core-js/modules/es.array.splice.js";import"../../../../node_modules/core-js/modules/es.object.to-string.js";import"../../../../node_modules/core-js/modules/web.dom-collections.for-each.js";import"../../../../node_modules/core-js/modules/es.array.includes.js";import"../../../../node_modules/core-js/modules/es.regexp.to-string.js";import"../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../node_modules/core-js/modules/es.array.iterator.js";import"../../../../node_modules/core-js/modules/es.set.constructor.js";import"../../../../node_modules/core-js/modules/es.string.iterator.js";import"../../../../node_modules/core-js/modules/web.dom-collections.iterator.js";import"../../../../node_modules/core-js/modules/es.object.keys.js";import{fileNameExt as r}from"./textValueOperations.js";var o=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:";",o=e.split("\r\n");o.length<=1&&(o=e.split("\n"));var n=o.shift(),l=n?n.split(r):null;return{firstLine:n,lines:o,columns:l,numColumns:l?l.length:0}},n=function(e,r,o,n){return e.length!==r?{message:"errors.uploadInput.file.line.invalid",params:{line:o,index:n+1}}:null},l=function(e,r,o,n){return e!==e.trim()?{message:"errors.uploadInput.file.cell.invalid",params:{line:r,cell:e,lineIndex:o,cellIndex:n}}:null},s=function(e,r){for(var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";",s=[],t=e.length;t--;)""!==e[t].trim()&&""!==e[t].split(";").join("").trim()||e.splice(t,1);var i=null,u=null,d=null;return e.forEach((function(e,t){i=e.split(o),(u=n(i,r,e,t))&&s.push(u),i.forEach((function(r,o){(d=l(r,e,t,o))&&s.push(d)}))})),s},t=function(n,l){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";";if(n)if("csv"===r(n.name)&&["text/csv","text/plain","application/vnd.ms-excel"].includes(n.type)){var i=new FileReader;i.readAsText(n),i.onloadend=function(){var r=i.result?i.result.toString():"",n=o(r,t),u=n.numColumns,d=n.lines;if(u<2)l(["errors.uploadInput.file.numColumns"]);else if((null==d?void 0:d.length)<1)l(["errors.uploadInput.file.numLines"]);else{var a=s(d,u,t).map((function(e){return null!=e&&e.message?JSON.stringify(e):String(e)})),m=e(new Set(a)).map((function(e){return JSON.parse(e)}));l&&l(m.length?m:null)}},i.onerror=function(e){}}else l(["errors.uploadInput.file.invalid"]);else l(["errors.uploadInput.file.empty"])},i=function(e,n){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";";if(e)if("sdf"===r(e.name)){var s=new FileReader;s.readAsText(e),s.onloadend=function(){var e=s.result?s.result.toString():"",r=o(e,l).lines;(null==r?void 0:r.length)<1?n(["errors.uploadInput.file.numLines"]):n&&n(null)},s.onerror=function(e){}}else n(["errors.uploadInput.file.invalid"]);else n(["errors.uploadInput.file.empty"])},u=function(e,n){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:";";if(e)if("json"===r(e.name)){var s=new FileReader;s.readAsText(e),s.onloadend=function(){var e=s.result?s.result.toString():"";try{var r=JSON.parse(e);JSON.stringify(r)}catch(e){return void n(["errors.uploadInput.file.invalid"])}var t=o(e,l).lines;(null==t?void 0:t.length)<1?n(["errors.uploadInput.file.numLines"]):n&&n(null)},s.onerror=function(e){}}else n(["errors.uploadInput.file.invalid"]);else n(["errors.uploadInput.file.empty"])};export{o as parseCSVdata,t as validateCSVFile,s as validateCSVlines,u as validateJSONFile,l as validateLineCellTrimmed,n as validateLineNumColumns,i as validateSDFFile};
2
2
  //# sourceMappingURL=fileValidator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fileValidator.js","sources":["../../../../../../../src/core/utils/helpers/fileValidator.ts"],"sourcesContent":["import { fileNameExt } from './textValueOperations'\n\nexport const parseCSVdata = (data: string, columnDelimiter = ';'): {\n firstLine: string\n lines: string[]\n columns: null | string[]\n numColumns: number\n} => {\n let lines: string[] = data.split('\\r\\n')\n\n if (lines.length <= 1) {\n lines = data.split('\\n')\n }\n\n const firstLine: string = lines.shift() as string\n const columns: null | string[] = firstLine ? firstLine.split(columnDelimiter) : null\n const numColumns: number = columns ? columns.length : 0\n\n return {\n firstLine,\n lines,\n columns,\n numColumns,\n }\n}\n\nexport const validateLineNumColumns\n = (lineColumns: Array<string>, numColumns: number, line: string, index: number): ErrorMessage | null => {\n if (lineColumns.length !== numColumns) {\n // errors.push(`Line number of cells is not equal to the number of columns: \"${line}, index: ${index}\"`)\n return {\n message: 'errors.uploadInput.file.line.invalid',\n params: { line, index: index + 1 } } as ErrorMessage\n }\n return null\n }\n\nexport const validateLineCellTrimmed\n = (cell: string, line: string, lineIndex: number, cellIndex: number): ErrorMessage | null => {\n if (cell !== cell.trim()) {\n return {\n message: 'errors.uploadInput.file.cell.invalid',\n params: {\n line, cell, lineIndex, cellIndex,\n },\n } as ErrorMessage\n }\n return null\n }\n\nexport const validateCSVlines = (lines: string[], numColumns: number, columnDelimiter = ';'): ErrorMessage[] => {\n const errors: ErrorMessage[] = []\n // lines without first line of columns (hence the index + 1 in error message)\n let linesNum = lines.length\n\n // eslint-disable-next-line no-cond-assign\n // eslint-disable-next-line no-plusplus\n while (linesNum--) {\n if (lines[linesNum].trim() === '' || lines[linesNum].split(';').join('').trim() === '') {\n lines.splice(linesNum, 1)\n }\n }\n\n let lineColumns = null\n let errorLineNumColumns = null\n let errorLineCellNotTrimmed = null\n\n lines.forEach((line, index) => {\n lineColumns = line.split(columnDelimiter)\n\n errorLineNumColumns = validateLineNumColumns(lineColumns, numColumns, line, index)\n errorLineNumColumns && errors.push(errorLineNumColumns)\n\n lineColumns.forEach((cell, cellIndex) => {\n errorLineCellNotTrimmed = validateLineCellTrimmed(cell, line, index, cellIndex)\n errorLineCellNotTrimmed && errors.push(errorLineCellNotTrimmed)\n })\n })\n\n return errors\n}\n\n/*\n// maybe add aditional mime types\nhttp://fileformats.archiveteam.org/wiki/CSV\n['text/csv','application/csv', 'text/x-csv',\n'application/x-csv', 'text/x-comma-separated-values', 'text/comma-separated-values']\n*/\n\nexport type ErrorMessage = {\n message: string\n params: Record<string, string | number>\n}\n\nexport const validateCSVFile\n= (file: File, callBack: (errors?: (ErrorMessage | string)[] | null) => void, columnDelimiter = ';'): void => {\n if (!file) {\n callBack(['errors.uploadInput.file.empty'])\n return\n }\n if (fileNameExt(file.name) !== 'csv' || !['text/csv', 'text/plain', 'application/vnd.ms-excel'].includes(file.type)) {\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n const reader = new FileReader()\n\n reader.readAsText(file)\n reader.onloadend = () => {\n const data = reader.result ? reader.result.toString() : ''\n\n const { numColumns, lines } = parseCSVdata(data, columnDelimiter)\n\n if (numColumns < 2) {\n callBack(['errors.uploadInput.file.numColumns'])\n return\n }\n\n if (lines?.length < 1) {\n callBack(['errors.uploadInput.file.numLines'])\n return\n }\n\n const errors: (ErrorMessage | string)[] = validateCSVlines(lines, numColumns, columnDelimiter)\n\n const flatErrors: string[] = errors.map((errorMsg: ErrorMessage | string) => (\n (errorMsg as ErrorMessage)?.message ? JSON.stringify(errorMsg) : String(errorMsg)))\n\n const errorsArray: string[] = [...new Set(flatErrors)].map((serialized: string) => JSON.parse(serialized))\n\n // callBack && callBack(errorsArray.length ? errorsArray?.splice?.(0, 6) : null)\n callBack && callBack(errorsArray.length ? errorsArray : null)\n }\n\n reader.onerror = (error) => {\n console.error(error)\n }\n}\n\nexport const validateSDFFile\n= (file: File, callBack: (errors?: (ErrorMessage | string)[] | null) => void, columnDelimiter = ';'): void => {\n if (!file) {\n callBack(['errors.uploadInput.file.empty'])\n return\n }\n if (fileNameExt(file.name) !== 'sdf') {\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n const reader = new FileReader()\n\n reader.readAsText(file)\n reader.onloadend = () => {\n const data = reader.result ? reader.result.toString() : ''\n\n const { lines } = parseCSVdata(data, columnDelimiter)\n\n if (lines?.length < 1) {\n callBack(['errors.uploadInput.file.numLines'])\n return\n }\n\n callBack && callBack(null)\n }\n\n reader.onerror = (error) => {\n console.error(error)\n }\n}\n\nexport const validateJSONFile\n= (file: File, callBack: (errors?: (ErrorMessage | string)[] | null) => void, columnDelimiter = ';'): void => {\n if (!file) {\n callBack(['errors.uploadInput.file.empty'])\n return\n }\n if (fileNameExt(file.name) !== 'json') {\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n const reader = new FileReader()\n\n reader.readAsText(file)\n reader.onloadend = () => {\n const data = reader.result ? reader.result.toString() : ''\n\n try {\n const parsed = JSON.parse(data)\n\n JSON.stringify(parsed)\n } catch (error) {\n console.error(error)\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n\n const { lines } = parseCSVdata(data, columnDelimiter)\n\n if (lines?.length < 1) {\n callBack(['errors.uploadInput.file.numLines'])\n return\n }\n\n callBack && callBack(null)\n }\n\n reader.onerror = (error) => {\n console.error(error)\n }\n}\n"],"names":["parseCSVdata","data","columnDelimiter","arguments","length","undefined","lines","split","firstLine","shift","columns","numColumns","validateLineNumColumns","lineColumns","line","index","message","params","validateLineCellTrimmed","cell","lineIndex","cellIndex","trim","validateCSVlines","errors","linesNum","join","splice","errorLineNumColumns","errorLineCellNotTrimmed","forEach","push","validateCSVFile","file","callBack","fileNameExt","name","includes","type","reader","FileReader","readAsText","onloadend","result","toString","_parseCSVdata","flatErrors","map","errorMsg","JSON","stringify","String","errorsArray","_toConsumableArray","Set","serialized","parse","onerror","error","validateSDFFile","validateJSONFile","parsed"],"mappings":"4iCAEaA,EAAe,SAACC,GAKxB,IALsCC,EAAeC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAMvDG,EAAkBL,EAAKM,MAAM,QAE7BD,EAAMF,QAAU,IAClBE,EAAQL,EAAKM,MAAM,OAGrB,IAAMC,EAAoBF,EAAMG,QAC1BC,EAA2BF,EAAYA,EAAUD,MAAML,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AAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAC9F,GAAK8B,EAIL,GAA+B,SAA3BE,EAAYF,EAAKG,MAArB,CAIA,IAAMG,EAAS,IAAIC,WAEnBD,EAAOE,WAAWR,GAClBM,EAAOG,UAAY,WACjB,IAAMzC,EAAOsC,EAAOI,OAASJ,EAAOI,OAAOC,WAAa,GAExD,IACE,IAAMiB,EAASZ,KAAKO,MAAMvD,GAE1BgD,KAAKC,UAAUW,EAChB,CAAC,MAAOH,GAGP,YADAxB,EAAS,CAAC,mCAEZ,CAEA,IAAQ5B,EAAUN,EAAaC,EAAMC,GAA7BI,OAEJA,aAAK,EAALA,EAAOF,QAAS,EAClB8B,EAAS,CAAC,qCAIZA,GAAYA,EAAS,OAGvBK,EAAOkB,QAAU,SAACC,IA3BlB,MAFExB,EAAS,CAAC,yCAJVA,EAAS,CAAC,iCAoCd"}
1
+ {"version":3,"file":"fileValidator.js","sources":["../../../../../../../src/core/utils/helpers/fileValidator.ts"],"sourcesContent":["import { fileNameExt } from './textValueOperations'\n\nexport const parseCSVdata = (data: string, columnDelimiter = ';'): {\n firstLine: string\n lines: string[]\n columns: null | string[]\n numColumns: number\n} => {\n let lines: string[] = data.split('\\r\\n')\n\n if (lines.length <= 1) {\n lines = data.split('\\n')\n }\n\n const firstLine: string = lines.shift() as string\n const columns: null | string[] = firstLine ? firstLine.split(columnDelimiter) : null\n const numColumns: number = columns ? columns.length : 0\n\n return {\n firstLine,\n lines,\n columns,\n numColumns,\n }\n}\n\nexport const validateLineNumColumns\n = (lineColumns: Array<string>, numColumns: number, line: string, index: number): ErrorMessage | null => {\n if (lineColumns.length !== numColumns) {\n // errors.push(`Line number of cells is not equal to the number of columns: \"${line}, index: ${index}\"`)\n return {\n message: 'errors.uploadInput.file.line.invalid',\n params: { line, index: index + 1 } } as ErrorMessage\n }\n return null\n }\n\nexport const validateLineCellTrimmed\n = (cell: string, line: string, lineIndex: number, cellIndex: number): ErrorMessage | null => {\n if (cell !== cell.trim()) {\n return {\n message: 'errors.uploadInput.file.cell.invalid',\n params: {\n line, cell, lineIndex, cellIndex,\n },\n } as ErrorMessage\n }\n return null\n }\n\nexport const validateCSVlines = (lines: string[], numColumns: number, columnDelimiter = ';'): ErrorMessage[] => {\n const errors: ErrorMessage[] = []\n // lines without first line of columns (hence the index + 1 in error message)\n let linesNum = lines.length\n\n // eslint-disable-next-line no-cond-assign\n // eslint-disable-next-line no-plusplus\n while (linesNum--) {\n if (lines[linesNum].trim() === '' || lines[linesNum].split(';').join('').trim() === '') {\n lines.splice(linesNum, 1)\n }\n }\n\n let lineColumns = null\n let errorLineNumColumns = null\n let errorLineCellNotTrimmed = null\n\n lines.forEach((line, index) => {\n lineColumns = line.split(columnDelimiter)\n\n errorLineNumColumns = validateLineNumColumns(lineColumns, numColumns, line, index)\n errorLineNumColumns && errors.push(errorLineNumColumns)\n\n lineColumns.forEach((cell, cellIndex) => {\n errorLineCellNotTrimmed = validateLineCellTrimmed(cell, line, index, cellIndex)\n errorLineCellNotTrimmed && errors.push(errorLineCellNotTrimmed)\n })\n })\n\n return errors\n}\n\n/*\n// maybe add aditional mime types\nhttp://fileformats.archiveteam.org/wiki/CSV\n['text/csv','application/csv', 'text/x-csv',\n'application/x-csv', 'text/x-comma-separated-values', 'text/comma-separated-values']\n*/\n\nexport type ErrorMessage = {\n message: string\n params: Record<string, string | number>\n}\n\nexport const validateCSVFile\n= (file: File, callBack: (errors?: (ErrorMessage | string)[] | null) => void, columnDelimiter = ';'): void => {\n if (!file) {\n callBack(['errors.uploadInput.file.empty'])\n return\n }\n if (fileNameExt(file.name) !== 'csv' || !['text/csv', 'text/plain', 'application/vnd.ms-excel'].includes(file.type)) {\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n const reader = new FileReader()\n\n reader.readAsText(file)\n reader.onloadend = () => {\n const data = reader.result ? reader.result.toString() : ''\n\n const { numColumns, lines } = parseCSVdata(data, columnDelimiter)\n\n if (numColumns < 2) {\n callBack(['errors.uploadInput.file.numColumns'])\n return\n }\n\n if (lines?.length < 1) {\n callBack(['errors.uploadInput.file.numLines'])\n return\n }\n\n const errors: (ErrorMessage | string)[] = validateCSVlines(lines, numColumns, columnDelimiter)\n\n const flatErrors: string[] = errors.map((errorMsg: ErrorMessage | string) => (\n (errorMsg as ErrorMessage)?.message ? JSON.stringify(errorMsg) : String(errorMsg)))\n\n const errorsArray: string[] = [...new Set(flatErrors)].map((serialized: string) => JSON.parse(serialized))\n\n // callBack && callBack(errorsArray.length ? errorsArray?.splice?.(0, 6) : null)\n callBack && callBack(errorsArray.length ? errorsArray : null)\n }\n\n reader.onerror = (error) => {\n console.error(error)\n }\n}\n\nexport const validateSDFFile\n= (file: File, callBack: (errors?: (ErrorMessage | string)[] | null) => void, columnDelimiter = ';'): void => {\n if (!file) {\n callBack(['errors.uploadInput.file.empty'])\n return\n }\n if (fileNameExt(file.name) !== 'sdf') {\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n const reader = new FileReader()\n\n reader.readAsText(file)\n reader.onloadend = () => {\n const data = reader.result ? reader.result.toString() : ''\n\n const { lines } = parseCSVdata(data, columnDelimiter)\n\n if (lines?.length < 1) {\n callBack(['errors.uploadInput.file.numLines'])\n return\n }\n\n callBack && callBack(null)\n }\n\n reader.onerror = (error) => {\n console.error(error)\n }\n}\n\nexport const validateJSONFile\n= (file: File, callBack: (errors?: (ErrorMessage | string)[] | null) => void, columnDelimiter = ';'): void => {\n if (!file) {\n callBack(['errors.uploadInput.file.empty'])\n return\n }\n if (fileNameExt(file.name) !== 'json') {\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n const reader = new FileReader()\n\n reader.readAsText(file)\n reader.onloadend = () => {\n const data = reader.result ? reader.result.toString() : ''\n\n try {\n const parsed = JSON.parse(data)\n\n JSON.stringify(parsed)\n } catch (error) {\n console.error(error)\n callBack(['errors.uploadInput.file.invalid'])\n return\n }\n\n const { lines } = parseCSVdata(data, columnDelimiter)\n\n if (lines?.length < 1) {\n callBack(['errors.uploadInput.file.numLines'])\n return\n }\n\n callBack && callBack(null)\n }\n\n reader.onerror = (error) => {\n console.error(error)\n }\n}\n"],"names":["parseCSVdata","data","columnDelimiter","arguments","length","undefined","lines","split","firstLine","shift","columns","numColumns","validateLineNumColumns","lineColumns","line","index","message","params","validateLineCellTrimmed","cell","lineIndex","cellIndex","trim","validateCSVlines","errors","linesNum","join","splice","errorLineNumColumns","errorLineCellNotTrimmed","forEach","push","validateCSVFile","file","callBack","fileNameExt","name","includes","type","reader","FileReader","readAsText","onloadend","result","toString","_parseCSVdata","flatErrors","map","errorMsg","JSON","stringify","String","errorsArray","_toConsumableArray","Set","serialized","parse","onerror","error","validateSDFFile","validateJSONFile","parsed"],"mappings":"+mCAEaA,EAAe,SAACC,GAKxB,IALsCC,EAAeC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAMvDG,EAAkBL,EAAKM,MAAM,QAE7BD,EAAMF,QAAU,IAClBE,EAAQL,EAAKM,MAAM,OAGrB,IAAMC,EAAoBF,EAAMG,QAC1BC,EAA2BF,EAAYA,EAAUD,MAAML,GAAmB,KAGhF,MAAO,CACLM,UAAAA,EACAF,MAAAA,EACAI,QAAAA,EACAC,WANyBD,EAAUA,EAAQN,OAAS,EAQxD,EAEaQ,EACT,SAACC,EAA4BF,EAAoBG,EAAcC,GAC/D,OAAIF,EAAYT,SAAWO,EAElB,CACLK,QAAS,uCACTC,OAAQ,CAAEH,KAAAA,EAAMC,MAAOA,EAAQ,IAE5B,IACT,EAEWG,EACT,SAACC,EAAcL,EAAcM,EAAmBC,GAChD,OAAIF,IAASA,EAAKG,OACT,CACLN,QAAS,uCACTC,OAAQ,CACNH,KAAAA,EAAMK,KAAAA,EAAMC,UAAAA,EAAWC,UAAAA,IAItB,IACT,EAEWE,EAAmB,SAACjB,EAAiBK,GAOhD,IAP8G,IAA1CT,EAAeC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,G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AC,yCAJVA,EAAS,CAAC,iCAoCd"}
@@ -1,3 +1,33 @@
1
+ .icon-module_icon-base-parent__nOMvW {
2
+ line-height: 1px !important;
3
+ }
4
+
5
+ .icon-module_icon-base__S0tHf {
6
+ min-width: var(--min-width);
7
+ min-height: var(--min-height);
8
+ width: var(--width) !important;
9
+ height: var(--height) !important;
10
+ line-height: 1px !important;
11
+ background-color: var(--icon-color);
12
+ color: var(--icon-content-color);
13
+ background-repeat: no-repeat;
14
+ mask-image: var(--icon-url);
15
+ -webkit-mask-image: var(--icon-url);
16
+ mask-repeat: no-repeat;
17
+ -webkit-mask-repeat: no-repeat;
18
+ mask-size: contain;
19
+ -webkit-mask-size: contain;
20
+ mask-position: center;
21
+ -webkit-mask-position: center;
22
+ display: inline-block;
23
+ will-change: transform;
24
+ transform: translate3d(0, 0, 0);
25
+ }
26
+ .icon-module_icon-base__S0tHf svg {
27
+ fill: var(--icon-content-color);
28
+ width: var(--height);
29
+ height: var(--width);
30
+ }
1
31
  .divider-module_divider-line__6CesR {
2
32
  position: relative;
3
33
  display: block;
@@ -41,36 +71,6 @@
41
71
  min-height: 0;
42
72
  border-radius: initial;
43
73
  }
44
- .icon-module_icon-base-parent__nOMvW {
45
- line-height: 1px !important;
46
- }
47
-
48
- .icon-module_icon-base__S0tHf {
49
- min-width: var(--min-width);
50
- min-height: var(--min-height);
51
- width: var(--width) !important;
52
- height: var(--height) !important;
53
- line-height: 1px !important;
54
- background-color: var(--icon-color);
55
- color: var(--icon-content-color);
56
- background-repeat: no-repeat;
57
- mask-image: var(--icon-url);
58
- -webkit-mask-image: var(--icon-url);
59
- mask-repeat: no-repeat;
60
- -webkit-mask-repeat: no-repeat;
61
- mask-size: contain;
62
- -webkit-mask-size: contain;
63
- mask-position: center;
64
- -webkit-mask-position: center;
65
- display: inline-block;
66
- will-change: transform;
67
- transform: translate3d(0, 0, 0);
68
- }
69
- .icon-module_icon-base__S0tHf svg {
70
- fill: var(--icon-content-color);
71
- width: var(--height);
72
- height: var(--width);
73
- }
74
74
  .CollapsibleContainer-module_collapsible-container__u0Jmm {
75
75
  transform-origin: 0% 0%;
76
76
  opacity: 0;
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("../internals/export.js"),t=require("../internals/to-object.js"),r=require("../internals/object-keys.js"),s=require("../internals/fails.js"),i=e._export,n=t.toObject,o=r.objectKeys;i({target:"Object",stat:!0,forced:(0,s.fails)((function(){o(1)}))},{keys:function(e){return o(n(e))}});
2
+ //# sourceMappingURL=es.object.keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.object.keys.js","sources":["../../../../../node_modules/core-js/modules/es.object.keys.js"],"sourcesContent":["var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n"],"names":["$","require$$0","toObject","require$$1","nativeKeys","require$$2","target","stat","forced","fails","require$$3","keys","it"],"mappings":"wKAAIA,EAAIC,EAAAA,QACJC,EAAWC,EAAAA,SACXC,EAAaC,EAAAA,WAOjBL,EAAE,CAAEM,OAAQ,SAAUC,MAAM,EAAMC,QAJRC,EAFdC,EAAAA,QAEoB,WAAcN,EAAW,EAAG,KAIK,CAC/DO,KAAM,SAAcC,GAClB,OAAOR,EAAWF,EAASU,GAC5B"}