@e1011/es-kit 1.0.50 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +1 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js +1 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js.map +1 -1
- package/dist/lib/cjs/src/core/utils/helpers/cancelableDelayedFunction.js +2 -0
- package/dist/lib/cjs/src/core/utils/helpers/cancelableDelayedFunction.js.map +1 -0
- package/dist/lib/cjs/src/core/utils/helpers/objectOperations.js +1 -1
- package/dist/lib/cjs/src/core/utils/helpers/objectOperations.js.map +1 -1
- package/dist/lib/cjs/src/index.js +1 -1
- package/dist/lib/esm/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +1 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconWC.js +1 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
- package/dist/lib/esm/src/core/utils/helpers/cancelableDelayedFunction.js +2 -0
- package/dist/lib/esm/src/core/utils/helpers/cancelableDelayedFunction.js.map +1 -0
- package/dist/lib/esm/src/core/utils/helpers/objectOperations.js +1 -1
- package/dist/lib/esm/src/core/utils/helpers/objectOperations.js.map +1 -1
- package/dist/lib/esm/src/index.js +1 -1
- package/dist/lib/src/core/ui/components/container/FBox.js +0 -1
- package/dist/lib/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/lib/src/core/ui/components/icon/IconBase.js +2 -2
- package/dist/lib/src/core/ui/components/icon/IconBase.js.map +1 -1
- package/dist/lib/src/core/ui/components/icon/IconWC.js +4 -5
- package/dist/lib/src/core/ui/components/icon/IconWC.js.map +1 -1
- package/dist/lib/src/core/utils/helpers/cancelableDelayedFunction.js +9 -0
- package/dist/lib/src/core/utils/helpers/cancelableDelayedFunction.js.map +1 -0
- package/dist/lib/src/core/utils/helpers/index.js +1 -0
- package/dist/lib/src/core/utils/helpers/index.js.map +1 -1
- package/dist/lib/src/core/utils/helpers/objectOperations.js +17 -0
- package/dist/lib/src/core/utils/helpers/objectOperations.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/ui/components/container/FBox.d.ts +1 -1
- package/dist/types/src/core/ui/components/container/FBox.d.ts.map +1 -1
- package/dist/types/src/core/ui/components/icon/IconWC.d.ts.map +1 -1
- package/dist/types/src/core/utils/helpers/cancelableDelayedFunction.d.ts +3 -0
- package/dist/types/src/core/utils/helpers/cancelableDelayedFunction.d.ts.map +1 -0
- package/dist/types/src/core/utils/helpers/index.d.ts +1 -0
- package/dist/types/src/core/utils/helpers/index.d.ts.map +1 -1
- package/dist/types/src/core/utils/helpers/objectOperations.d.ts +1 -0
- package/dist/types/src/core/utils/helpers/objectOperations.d.ts.map +1 -1
- package/dist/ui/esm/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/ui/esm/src/core/ui/components/icon/IconBase.js +1 -1
- package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
- package/dist/ui/esm/src/core/ui/components/icon/IconWC.js +1 -1
- package/dist/ui/esm/src/core/ui/components/icon/IconWC.js.map +1 -1
- package/dist/ui/src/core/ui/components/container/FBox.js.map +1 -1
- package/dist/ui/src/core/ui/components/icon/IconBase.js +1 -1
- package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
- package/dist/ui/src/core/ui/components/icon/IconWC.js +1 -1
- package/dist/ui/src/core/ui/components/icon/IconWC.js.map +1 -1
- package/dist/utils/esm/src/core/utils/helpers/cancelableDelayedFunction.js +2 -0
- package/dist/utils/esm/src/core/utils/helpers/cancelableDelayedFunction.js.map +1 -0
- package/dist/utils/esm/src/core/utils/helpers/objectOperations.js +1 -1
- package/dist/utils/esm/src/core/utils/helpers/objectOperations.js.map +1 -1
- package/dist/utils/esm/src/core/utils/index.js +1 -1
- package/dist/utils/src/core/utils/helpers/cancelableDelayedFunction.js +2 -0
- package/dist/utils/src/core/utils/helpers/cancelableDelayedFunction.js.map +1 -0
- package/dist/utils/src/core/utils/helpers/objectOperations.js +1 -1
- package/dist/utils/src/core/utils/helpers/objectOperations.js.map +1 -1
- package/dist/utils/src/core/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n
|
|
1
|
+
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n} & CSSProperties\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (key.substr(0, 4) === 'data') {\n restProps[key] = value\n } else {\n cssProps[key] = value\n }\n })\n return [restProps, cssProps]\n }, [props])\n\n const styles = useMemo(() => (\n {\n ...cssProps,\n ...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align as string) } : {}),\n ...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify as string) } : {}),\n ...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),\n ...style,\n }\n ), [cssProps, style])\n\n return (\n <div\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...restProps}\n >\n {children}\n </div>\n )\n})\n\nFBoxRefForwarded.displayName = 'FBoxRefForwarded'\n\nexport const FBox: FC<FBoxProps> = memo<FBoxProps>(FBoxRefForwarded)\n\n\nFBox.displayName = 'FBox'\n\n\n// default flex centralized, 100% width and height\n// export const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n// {\n// width: props.width || '100%',\n// height: props.height || '100%',\n// justify: props.justify || 'center',\n// align: props.align || 'center',\n// ...props,\n// }\n// ))``)\n\n// export const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// ...props,\n// }))``)\n\n// export const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// style: {\n// text: 'blue',\n// padding: '1rem',\n// border: '1px solid green',\n// },\n// ...props,\n// }))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","FBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","_ref$className","className","props","_objectWithoutProperties","objectWithoutProperties","_excluded","_useMemo","useMemo","restProps","cssProps","Object","entries","forEach","_ref2","_ref3","_slicedToArray","key","substr","_useMemo2","styles","_objectSpread","objectSpread2","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","FBox","memo"],"mappings":"6iBAgCMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAmB,SAACC,GAAc,OAA0BA,GAASJ,EAAaI,IAAmBA,CAAK,EAG1GC,EAAmBC,EAAUA,YAAC,SAAAC,EAEtBC,GAA+C,IAD3DC,EAAKF,EAALE,MAAOC,EAAQH,EAARG,SAAUC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAC,wBAAAT,EAAAU,GAEnDC,EAA8BC,EAAAA,SAAQ,WACpC,IAAMC,EAAqC,CAAA,EACrCC,EAAoC,CAAA,EAS1C,OAPAC,OAAOC,QAAQT,GAAOU,SAAQ,SAAAC,GAAkB,IAAAC,EAAAC,EAAAA,cAAAF,EAAA,GAAhBG,EAAGF,EAAA,GAAEtB,EAAKsB,EAAA,GACf,SAArBE,EAAIC,OAAO,EAAG,GAChBT,EAAUQ,GAAOxB,EAEjBiB,EAASO,GAAOxB,CAEpB,IACO,CAACgB,EAAWC,EACrB,GAAG,CAACP,IAAOgB,EAAAH,EAAAA,cAAAT,EAAA,GAZJE,EAASU,EAAA,GAAET,EAAQS,EAAA,GAcpBC,EAASZ,EAAAA,SAAQ,WAAA,OAAAa,EAAAC,cAAAD,gBAAAA,EAAAA,cAAAA,EAAAC,cAAAD,mBAEhBX,GACCA,EAASa,MAAQ,CAAEC,WAAYhC,EAAiBkB,EAASa,QAAqB,CAAE,GAChFb,EAASe,QAAU,CAAEC,eAAgBlC,EAAiBkB,EAASe,UAAuB,CAAE,GACxFf,EAASiB,UAAY,CAAEC,cAAelB,EAASiB,WAAc,CAAE,GAChE7B,EAAK,GAET,CAACY,EAAUZ,IAEd,OACE+B,MAAAC,cAAA,MAAAC,UAAA,CACElC,IAAKA,EACLG,SAAUA,EACVE,UAAS,GAAA8B,OAAMC,EAAgB,gBAAeD,KAAAA,OAAI9B,GAClDJ,MAAOsB,GACHX,GAEHV,EAGP,IAEAL,EAAiBwC,YAAc,uBAElBC,EAAsBC,EAAIA,KAAY1C,GAGnDyC,EAAKD,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"),r=require("./icon.module.scss.js"),i=o.memo((function(i){var t=i.iconUrl,c=i.minWidth,n=void 0===c?"1rem":c,a=i.minHeight,s=void 0===a?"1rem":a,l=i.size,u=i.fontSize,d=i.width,m=i.height,h=i.color,p=void 0===h?"currentColor":h,v=i.className,j=void 0===v?"":v,b=i.children,f=o.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":
|
|
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"),r=require("./icon.module.scss.js"),i=o.memo((function(i){var t=i.iconUrl,c=i.minWidth,n=void 0===c?"1rem":c,a=i.minHeight,s=void 0===a?"1rem":a,l=i.size,u=i.fontSize,d=i.width,m=i.height,h=i.color,p=void 0===h?"currentColor":h,v=i.className,j=void 0===v?"":v,b=i.children,f=o.useMemo((function(){return e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":n||"auto","--min-height":s||"auto","--width":l||d,"--height":l||m},u?{fontSize:u}:{}),t?{"--icon-url":"url(".concat(t,")")}:{}),t?{"--icon-color":p}:{"--icon-content-color":p})}),[n,s,l,d,m,u,t,p]);return React.createElement("span",{className:"".concat(r["icon-base"]," icon-base ").concat(j),style:f},!t&&b&&b)}));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, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<any> & {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\nexport const IconBase = memo<IconBaseType>(({\n iconUrl, minWidth = '1rem', minHeight = '1rem',\n
|
|
1
|
+
{"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<any> & {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\nexport const IconBase = memo<IconBaseType>(({\n iconUrl, minWidth = '1rem', minHeight = '1rem', size,\n fontSize, width, height, color = 'currentColor', className = '', children,\n}: IconBaseType) => {\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || 'auto',\n '--min-height': minHeight || 'auto',\n '--width': size || width,\n '--height': size || height,\n ...(fontSize ? { fontSize } : {}),\n ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n }\n ), [minWidth, minHeight, size, width, height, fontSize, iconUrl, color])\n\n return (\n <span\n className={`${(classes as any)['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","_ref$minWidth","minWidth","_ref$minHeight","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","styles","useMemo","_objectSpread","objectSpread2","concat","React","createElement","classes","style","displayName"],"mappings":"8QAgBaA,EAAWC,EAAAA,MAAmB,SAAAC,GAGvB,IAFlBC,EAAOD,EAAPC,QAAOC,EAAAF,EAAEG,SAAAA,OAAW,IAAHD,EAAG,OAAMA,EAAAE,EAAAJ,EAAEK,UAAAA,OAAY,IAAHD,EAAG,OAAMA,EAAEE,EAAIN,EAAJM,KAChDC,EAAQP,EAARO,SAAUC,EAAKR,EAALQ,MAAOC,EAAMT,EAANS,OAAMC,EAAAV,EAAEW,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAZ,EAAEa,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQd,EAARc,SAE3DC,EAASC,EAAAA,SAAQ,WAAA,OAAAC,EAAAC,cAAAD,EAAAC,cAAAD,gBAAA,CAEnB,cAAed,GAAY,OAC3B,eAAgBE,GAAa,OAC7B,UAAWC,GAAQE,EACnB,WAAYF,GAAQG,GAChBF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BN,EAAU,CAAE,aAAY,OAAAkB,OAASlB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBU,GAAU,CAAE,uBAAwBA,GAAO,GAE5E,CAACR,EAAUE,EAAWC,EAAME,EAAOC,EAAQF,EAAUN,EAASU,IAEjE,OACES,MAAAC,cAAA,OAAA,CACER,UAAS,GAAAM,OAAMG,EAAgB,aAAYH,eAAAA,OAAcN,GACzDU,MAAOR,IAEJd,GAAWa,GAAaA,EAGjC,IAEAhB,EAAS0B,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"),require("../../../../../node_modules/core-js/modules/es.
|
|
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"),require("../../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../../node_modules/core-js/modules/es.object.entries.js");var t,i=require("../../../utils/webComponents/webComponent.utils.js"),n=require("./icon.module.scss.js"),s=document.createElement("template");s.innerHTML='<span class="icon-base"></span>';var o=i.ced("icon-base")(t=function(t){e.inherits(r,t);var o=e.createSuper(r);function r(){var t;e.classCallCheck(this,r);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return(t=o.call.apply(o,[this].concat(s))).content=void 0,t.mainElement=void 0,t.iconUrl=void 0,t.minWidth=void 0,t.minHeight=void 0,t.width=void 0,t.height=void 0,t.size=void 0,t.fontSize=void 0,t.color=void 0,t.render=function(){if(t.mainElement=t.mainElement||t.querySelector(".icon-base"),t.mainElement){t.classList.add(n["icon-base-parent"]),t.mainElement.classList.add(n["icon-base"]);var i=e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":t.minWidth||"auto","--min-height":t.minHeight||"auto","--width":t.size||t.width,"--height":t.size||t.height},t.fontSize?{"font-size":t.fontSize||"unset"}:{}),t.iconUrl?{"--icon-url":"url(".concat(t.iconUrl,")")}:{}),t.iconUrl?{"--icon-color":t.color}:{"--icon-content-color":t.color});t.mainElement.innerHTML=t.iconUrl?"":t.content||"",t.mainElement.setAttribute("style",Object.entries(i).map((function(t){var i=e.slicedToArray(t,2),n=i[0],s=i[1];return"".concat(n,": ").concat(s,";")})).join(" "))}},t}return e.createClass(r,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=s.innerHTML,i.resolveAttributes(this,r.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),r}(e.wrapNativeSuper(HTMLElement)))||t,r={IconBaseWC:o};exports.IconBaseWC=r,exports.default=o;
|
|
2
2
|
//# sourceMappingURL=IconWC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n
|
|
1
|
+
{"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || 'auto',\n '--min-height': this.minHeight || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconBaseWC = {\n IconBaseWC: IconBase,\n}\n"],"names":["template","document","createElement","innerHTML","IconBase","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","objectSpread2","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconBaseWC"],"mappings":"gdAMMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAAiC,IAejCC,EADpBC,MAAI,YAAYC,CAAAC,WAAAC,GAAAC,WAAAL,EAAAI,GAAA,IAAAE,EAAAC,cAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,sBAAAT,GAAA,IAAA,IAAAU,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,E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C,CAAA,CAjDA,OAiDAwC,EAAAC,YAAAjD,EAAA,CAAA,CAAA6C,IAAA,oBAAAC,MA/CD,WACM5B,KAAKnB,YACPmB,KAAKE,QAAUF,KAAKE,SAAWF,KAAKnB,WAAamB,KAAKgC,aAAa,YAGrEhC,KAAKnB,UAAYH,EAASG,UAE1BoD,EAAAA,kBAAkBjC,KAAMlB,EAASoD,oBAEjClC,KAAKY,QACP,GAAC,CAAAe,IAAA,2BAAAC,MAED,SAAyBO,EAAkBC,EAAgCC,GACxD,cAAbF,IACFnC,KAAKsC,UAAaD,GAAqB,GACnCrC,KAAKsC,YACPtC,KAAKc,UAAUyB,OAAOvC,KAAKsC,WAC3BtC,KAAKc,UAAUC,IAAIf,KAAKsC,aAK5BtC,KAAKmC,GAAYE,EACjBrC,KAAKY,QACP,IAAC,CAAA,CAAAe,IAAA,qBAAAa,IA5BD,WACE,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,KAAC1D,CAAA,EAAA2D,kBAvBmCC,gBAAWzD,EAoFpC0D,EAAa,CACxBA,WAAY7D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.cancelableSetInterval=function(e){var t=setInterval(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:100);return function(){return clearInterval(t)}},exports.cancelableSetTimeout=function(e){var t=setTimeout(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:100);return function(){return clearTimeout(t)}};
|
|
2
|
+
//# sourceMappingURL=cancelableDelayedFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelableDelayedFunction.js","sources":["../../../../../../../src/core/utils/helpers/cancelableDelayedFunction.ts"],"sourcesContent":["export const cancelableSetInterval = (func: () => void, delay = 100) => {\n const timeoutInterval = setInterval(func, delay)\n\n return () => clearInterval(timeoutInterval)\n}\n\nexport const cancelableSetTimeout = (func: () => void, delay = 100) => {\n const timeoutInterval = setTimeout(func, delay)\n\n return () => clearTimeout(timeoutInterval)\n}\n"],"names":["func","timeoutInterval","setInterval","arguments","length","undefined","clearInterval","setTimeout","clearTimeout"],"mappings":"kGAAqC,SAACA,GAAkC,IAChEC,EAAkBC,YAAYF,EADuBG,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAG9D,OAAO,WAAA,OAAMG,cAAcL,EAAgB,CAC7C,+BAEoC,SAACD,GAAkC,IAC/DC,EAAkBM,WAAWP,EADuBG,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAG7D,OAAO,WAAA,OAAMK,aAAaP,EAAgB,CAC5C"}
|
|
@@ -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.iterator.js"),require("../../../../node_modules/core-js/modules/es.object.to-string.js"),require("../../../../node_modules/core-js/modules/es.set.constructor.js"),require("../../../../node_modules/core-js/modules/es.string.iterator.js"),require("../../../../node_modules/core-js/modules/web.dom-collections.iterator.js"),require("../../../../node_modules/core-js/modules/es.array.from.js"),require("../../../../node_modules/core-js/modules/web.dom-collections.for-each.js"),require("../../../../node_modules/core-js/modules/es.object.entries.js"),require("../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../node_modules/core-js/modules/es.array.concat.js"),require("../../../../node_modules/core-js/modules/es.array.slice.js"),require("../../../../node_modules/core-js/modules/es.array.reduce.js");var r=["graphQL"],o=function(e){return"".concat(e)};exports.arrayToObjectTree=function(r){var o;return function r(t){return t.reduce((function(t,s,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../node_modules/core-js/modules/es.array.iterator.js"),require("../../../../node_modules/core-js/modules/es.object.to-string.js"),require("../../../../node_modules/core-js/modules/es.set.constructor.js"),require("../../../../node_modules/core-js/modules/es.string.iterator.js"),require("../../../../node_modules/core-js/modules/web.dom-collections.iterator.js"),require("../../../../node_modules/core-js/modules/es.array.from.js"),require("../../../../node_modules/core-js/modules/web.dom-collections.for-each.js"),require("../../../../node_modules/core-js/modules/es.object.entries.js"),require("../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../node_modules/core-js/modules/es.array.concat.js"),require("../../../../node_modules/core-js/modules/es.array.slice.js"),require("../../../../node_modules/core-js/modules/es.array.reduce.js");var r=["graphQL"],o=function(e){return"".concat(e)};exports.arrayToObjectTree=function(r){var o;return function r(t){return t.reduce((function(t,n,s,c){var i=e.objectSpread2({},t);if("string"==typeof n&&(i[n]={name:n},o||(o=i[n]),0===s&&Array.isArray(c[1])&&(o=i[n])),Array.isArray(n)){var a=o;s>1?(i[n[0]]=i[n[0]]||{name:n[0]},a=i[n[0]],i=e.objectSpread2(e.objectSpread2({},i),r(n))):a.children=r(n)}return i}),{})}(r)},exports.chunkArray=function(e){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=[],t=e.length,n=0;n<t;n+=r){var s=e.slice(n,n+r);o.push(s)}return o},exports.duplicatesInArray=function(e){var r=new Set(e);if(Array.from(r).length!==e.length){var o={},t={};return e.forEach((function(e){void 0!==t[String(e)]?(o[String(e)]=t[String(e)]+1,t[String(e)]+=1):t[String(e)]=1})),o}return null},exports.formatJsonString=function o(t,n,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=c.graphQL,a=e.objectWithoutProperties(c,r);if(!i)return JSON.stringify(t,n,s);var u=[];return Object.entries(t).forEach((function(r){var t=e.slicedToArray(r,2),c=t[0],d=t[1],l="".concat(c,": ");"object"!==e.typeof(d)||Array.isArray(d)?l+=JSON.stringify(d):l+="".concat(o(d,n,s,e.objectSpread2({graphQL:i},a))),u.push(l)})),"{".concat(u.join(", "),"}")},exports.formatObj=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;return"object"===e.typeof(r)?Object.entries(r).map((function(r){var o=e.slicedToArray(r,2),t=o[0],c=o[1];return"".concat(s(t),": ").concat(n(c))})).join(t):""},exports.formatObj2=function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;return"object"===e.typeof(t)&&Array.isArray(t)?t.map((function(e){return r(e,n,s,c)})).join(n):"object"===e.typeof(t)?Object.entries(t).map((function(o){var t=e.slicedToArray(o,2),n=t[0],i=t[1],a=c(n),u=s("object"===e.typeof(i)?r(i):i);return"".concat(a?"".concat(a,": "):"").concat(u)})).join(n):""};
|
|
2
2
|
//# sourceMappingURL=objectOperations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectOperations.js","sources":["../../../../../../../src/core/utils/helpers/objectOperations.ts"],"sourcesContent":["export const duplicatesInArray = (arr: unknown[]): null | Record<string, number> => {\n const setFromArr = new Set(arr)\n\n if (Array.from(setFromArr).length !== arr.length) {\n const foundDuplicates: Record<string, number> = {}\n const itemsMap: Record<string, number> = {}\n\n arr.forEach((item: unknown) => {\n if (itemsMap[String(item)] !== undefined) {\n foundDuplicates[String(item)] = itemsMap[String(item)] + 1\n itemsMap[String(item)] += 1\n } else {\n itemsMap[String(item)] = 1\n }\n })\n return foundDuplicates\n }\n return null\n}\n\ntype Replacer = ((this: any, key: string, value: any) => any) | undefined\ntype Options = {\n graphQL?: boolean\n [key: string]: any\n}\n\nexport const formatJsonString = (\n value: any,\n replacer?: Replacer | undefined,\n space?: string | number | undefined,\n { graphQL, ...options }: Options = {},\n): string => {\n if (!graphQL) {\n return JSON.stringify(value, replacer, space)\n }\n const strValues: string[] = []\n\n Object.entries(value).forEach(([key, value]) => {\n let str = `${key}: `\n\n if (typeof value === 'object' && !Array.isArray(value)) {\n str += `${formatJsonString(value, replacer, space, { graphQL, ...options })}`\n } else {\n str += JSON.stringify(value)\n }\n strValues.push(str)\n })\n return `{${strValues.join(', ')}}`\n}\n\nconst simpleIdentiy = (value: string | number) => `${value}`\n\nexport const formatObj = (\n obj: Record<string, string | number>,\n delimiter = ', ',\n mapValue: ((value: string | number) => string) = simpleIdentiy,\n mapKey: ((value: string | number) => string) = simpleIdentiy,\n): string => (typeof obj === 'object'\n ? Object.entries(obj).map(([key, value]) => `${mapKey(key)}: ${mapValue(value)}`).join(delimiter)\n : '')\n\nexport const chunkArray = (dataArray: any[], chunkSize = 100): (any[])[] => {\n const result = []\n\n const len = dataArray.length\n\n for (let i = 0; i < len; i += chunkSize) {\n const chunk = dataArray.slice(i, i + chunkSize)\n\n result.push(chunk)\n }\n return result\n}\n\nexport type TreeNodeStr = (string | TreeNodeStr)[]\n\ntype TreeNode = {\n name: string\n children?: Record<string, TreeNode>\n}\n\n// ['app', ['user', 'dashboard', ['ui', ['header', 'footer', 'menu'], 'realTime']]]\n\nexport const arrayToObjectTree = (itemsInTree: TreeNodeStr[]) => {\n let previousParent: TreeNode\n\n const innerMake = (items: TreeNodeStr[]): Record<string, TreeNode> => {\n const treeObject: Record<string, TreeNode> = items.reduce((tree: Record<string, TreeNode>, item, index, array) => {\n let resolvedTree: Record<string, TreeNode> = { ...tree }\n\n if (typeof item === 'string') {\n resolvedTree[item] = { name: item }\n if (!previousParent) {\n previousParent = resolvedTree[item]\n }\n\n if (index === 0 && Array.isArray(array[1])) {\n previousParent = resolvedTree[item]\n }\n }\n if (Array.isArray(item)) {\n let parent = previousParent\n\n if (index > 1) {\n resolvedTree[item[0] as string] = resolvedTree[item[0] as string] || { name: item[0] }\n parent = resolvedTree[item[0] as string]\n\n resolvedTree = { ...resolvedTree, ...innerMake(item as TreeNodeStr[]) }\n } else {\n parent.children = innerMake(item as TreeNodeStr[])\n }\n }\n return resolvedTree\n }, {})\n\n return treeObject\n }\n\n return innerMake(itemsInTree)\n}\n"],"names":["simpleIdentiy","value","concat","itemsInTree","previousParent","innerMake","items","reduce","tree","item","index","array","resolvedTree","_objectSpread","name","Array","isArray","parent","children","dataArray","chunkSize","arguments","length","undefined","result","len","i","chunk","slice","push","arr","setFromArr","Set","from","foundDuplicates","itemsMap","forEach","String","formatJsonString","replacer","space","_ref","graphQL","options","_objectWithoutProperties","objectWithoutProperties","_excluded","JSON","stringify","strValues","Object","entries","_ref2","_ref3","_slicedToArray","key","str","_typeof","join","obj","delimiter","mapValue","mapKey","map","_ref4","_ref5"],"mappings":"+gCAkDMA,EAAgB,SAACC,GAAsB,MAAAC,GAAAA,OAAQD,EAAK,
|
|
1
|
+
{"version":3,"file":"objectOperations.js","sources":["../../../../../../../src/core/utils/helpers/objectOperations.ts"],"sourcesContent":["export const duplicatesInArray = (arr: unknown[]): null | Record<string, number> => {\n const setFromArr = new Set(arr)\n\n if (Array.from(setFromArr).length !== arr.length) {\n const foundDuplicates: Record<string, number> = {}\n const itemsMap: Record<string, number> = {}\n\n arr.forEach((item: unknown) => {\n if (itemsMap[String(item)] !== undefined) {\n foundDuplicates[String(item)] = itemsMap[String(item)] + 1\n itemsMap[String(item)] += 1\n } else {\n itemsMap[String(item)] = 1\n }\n })\n return foundDuplicates\n }\n return null\n}\n\ntype Replacer = ((this: any, key: string, value: any) => any) | undefined\ntype Options = {\n graphQL?: boolean\n [key: string]: any\n}\n\nexport const formatJsonString = (\n value: any,\n replacer?: Replacer | undefined,\n space?: string | number | undefined,\n { graphQL, ...options }: Options = {},\n): string => {\n if (!graphQL) {\n return JSON.stringify(value, replacer, space)\n }\n const strValues: string[] = []\n\n Object.entries(value).forEach(([key, value]) => {\n let str = `${key}: `\n\n if (typeof value === 'object' && !Array.isArray(value)) {\n str += `${formatJsonString(value, replacer, space, { graphQL, ...options })}`\n } else {\n str += JSON.stringify(value)\n }\n strValues.push(str)\n })\n return `{${strValues.join(', ')}}`\n}\n\nconst simpleIdentiy = (value: string | number) => `${value}`\n\nexport const formatObj = (\n obj: Record<string, string | number>,\n delimiter = ', ',\n mapValue: ((value: string | number) => string) = simpleIdentiy,\n mapKey: ((value: string | number) => string) = simpleIdentiy,\n): string => (typeof obj === 'object'\n ? Object.entries(obj).map(([key, value]) => `${mapKey(key)}: ${mapValue(value)}`).join(delimiter)\n : '')\n\n\nexport const formatObj2 = (\n obj: Record<string, string | number>,\n delimiter = ', ',\n mapValue: ((value: string | number) => string) = simpleIdentiy,\n mapKey: ((value: string | number) => string) = simpleIdentiy,\n): string => {\n if (typeof obj === 'object' && Array.isArray(obj)) {\n return obj\n .map((objValue) => formatObj2(objValue, delimiter, mapValue, mapKey))\n .join(delimiter)\n }\n\n if (typeof obj === 'object') {\n return Object.entries(obj)\n .map(([key, value]) => {\n const mappedKey = mapKey(key)\n const mappedValue = mapValue(typeof value === 'object' ? formatObj2(value) : value)\n\n return `${mappedKey ? `${mappedKey}: ` : ''}${mappedValue}`\n })\n .join(delimiter)\n }\n return ''\n}\n\n\n\n\n\nexport const chunkArray = (dataArray: any[], chunkSize = 100): (any[])[] => {\n const result = []\n\n const len = dataArray.length\n\n for (let i = 0; i < len; i += chunkSize) {\n const chunk = dataArray.slice(i, i + chunkSize)\n\n result.push(chunk)\n }\n return result\n}\n\nexport type TreeNodeStr = (string | TreeNodeStr)[]\n\ntype TreeNode = {\n name: string\n children?: Record<string, TreeNode>\n}\n\n// ['app', ['user', 'dashboard', ['ui', ['header', 'footer', 'menu'], 'realTime']]]\n\nexport const arrayToObjectTree = (itemsInTree: TreeNodeStr[]) => {\n let previousParent: TreeNode\n\n const innerMake = (items: TreeNodeStr[]): Record<string, TreeNode> => {\n const treeObject: Record<string, TreeNode> = items.reduce((tree: Record<string, TreeNode>, item, index, array) => {\n let resolvedTree: Record<string, TreeNode> = { ...tree }\n\n if (typeof item === 'string') {\n resolvedTree[item] = { name: item }\n if (!previousParent) {\n previousParent = resolvedTree[item]\n }\n\n if (index === 0 && Array.isArray(array[1])) {\n previousParent = resolvedTree[item]\n }\n }\n if (Array.isArray(item)) {\n let parent = previousParent\n\n if (index > 1) {\n resolvedTree[item[0] as string] = resolvedTree[item[0] as string] || { name: item[0] }\n parent = resolvedTree[item[0] as string]\n\n resolvedTree = { ...resolvedTree, ...innerMake(item as TreeNodeStr[]) }\n } else {\n parent.children = innerMake(item as TreeNodeStr[])\n }\n }\n return resolvedTree\n }, {})\n\n return treeObject\n }\n\n return innerMake(itemsInTree)\n}\n"],"names":["simpleIdentiy","value","concat","itemsInTree","previousParent","innerMake","items","reduce","tree","item","index","array","resolvedTree","_objectSpread","name","Array","isArray","parent","children","dataArray","chunkSize","arguments","length","undefined","result","len","i","chunk","slice","push","arr","setFromArr","Set","from","foundDuplicates","itemsMap","forEach","String","formatJsonString","replacer","space","_ref","graphQL","options","_objectWithoutProperties","objectWithoutProperties","_excluded","JSON","stringify","strValues","Object","entries","_ref2","_ref3","_slicedToArray","key","str","_typeof","join","obj","delimiter","mapValue","mapKey","map","_ref4","_ref5","formatObj2","objValue","_ref6","_ref7","mappedKey","mappedValue"],"mappings":"+gCAkDMA,EAAgB,SAACC,GAAsB,MAAAC,GAAAA,OAAQD,EAAK,4BA+DzB,SAACE,GAChC,IAAIC,EAkCJ,OAhCkB,SAAZC,EAAaC,GA6BjB,OA5B6CA,EAAMC,QAAO,SAACC,EAAgCC,EAAMC,EAAOC,GACtG,IAAIC,EAAsCC,EAAAA,cAAA,CAAA,EAAQL,GAYlD,GAVoB,iBAATC,IACTG,EAAaH,GAAQ,CAAEK,KAAML,GACxBL,IACHA,EAAiBQ,EAAaH,IAGlB,IAAVC,GAAeK,MAAMC,QAAQL,EAAM,MACrCP,EAAiBQ,EAAaH,KAG9BM,MAAMC,QAAQP,GAAO,CACvB,IAAIQ,EAASb,EAETM,EAAQ,GACVE,EAAaH,EAAK,IAAgBG,EAAaH,EAAK,KAAiB,CAAEK,KAAML,EAAK,IAClFQ,EAASL,EAAaH,EAAK,IAE3BG,EAAYC,EAAAA,cA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AAAc,EAAA,GAAhBb,EAAGc,EAAA,GAAEpE,EAAKoE,EAAA,GACTC,EAAYR,EAAOP,GACnBgB,EAAcV,EAA0B,WAAjBJ,EAAAA,OAAOxD,GAAqBiE,EAAWjE,GAASA,GAE7E,MAAA,GAAAC,OAAUoE,EAAS,GAAApE,OAAMoE,EAAS,MAAO,IAAEpE,OAAGqE,EAChD,IACCb,KAAKE,GAEH,EACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useTranslations.js"),o=require("./core/hooks/useOutsideClick.js"),s=require("./core/hooks/useResize.js"),i=require("./core/utils/helpers/birthnumber.validator.js"),a=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),n=require("./core/utils/helpers/fileValidator.js"),l=require("./core/utils/helpers/date.js"),p=require("./core/utils/helpers/deviceInfo.js"),c=require("./core/utils/helpers/emailMatcher.js"),u=require("./core/utils/helpers/file.js"),x=require("./core/utils/helpers/objectOperations.js"),m=require("./core/utils/helpers/other.js"),d=require("./core/utils/helpers/textValueOperations.js"),T=require("./core/utils/helpers/valueOperations.js"),v=require("./core/utils/keyExtractor.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useTranslations.js"),o=require("./core/hooks/useOutsideClick.js"),s=require("./core/hooks/useResize.js"),i=require("./core/utils/helpers/birthnumber.validator.js"),a=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),n=require("./core/utils/helpers/fileValidator.js"),l=require("./core/utils/helpers/date.js"),p=require("./core/utils/helpers/deviceInfo.js"),c=require("./core/utils/helpers/emailMatcher.js"),u=require("./core/utils/helpers/file.js"),x=require("./core/utils/helpers/objectOperations.js"),m=require("./core/utils/helpers/other.js"),d=require("./core/utils/helpers/textValueOperations.js"),T=require("./core/utils/helpers/valueOperations.js"),v=require("./core/utils/helpers/cancelableDelayedFunction.js"),h=require("./core/utils/keyExtractor.js"),F=require("./core/utils/date.js"),g=require("./core/utils/webComponents/webComponent.utils.js"),j=require("./core/ui/utils/style.js"),b=require("./core/ui/components/container/FBox.js"),C=require("./core/ui/components/container/Flex.js"),f=require("./core/ui/components/container/Placeholder.js"),S=require("./core/ui/components/container/Container.js"),q=require("./core/ui/components/container/ResizableContainer.js"),I=require("./core/ui/components/field/Field.js"),D=require("./core/ui/components/dividers/DividerLine.js"),O=require("./core/ui/components/icon/IconBase.js"),y=require("./core/ui/components/icon/Icon.js"),z=require("./core/ui/components/icon/IconWC.js"),V=require("./core/constants/ui.constants.js");exports.useApi=e.useApi,exports.useToggle=r.useToggle,exports.createSafeT=t.createSafeT,exports.setUseTranslation=t.setUseTranslation,exports.useTranslations=t.useTranslations,exports.useOutsideClick=o.useOutsideClick,exports.useResize=s.useResize,exports.isBirthNumberValid=i.isBirthNumberValid,exports.getMatch=a.getMatch,exports.isValidFormat=a.isValidFormat,exports.isValidModulo11=a.isValidModulo11,exports.parse=a.parse,exports.regex=a.regex,exports.parseCSVdata=n.parseCSVdata,exports.validateCSVFile=n.validateCSVFile,exports.validateCSVlines=n.validateCSVlines,exports.validateJSONFile=n.validateJSONFile,exports.validateLineCellTrimmed=n.validateLineCellTrimmed,exports.validateLineNumColumns=n.validateLineNumColumns,exports.validateSDFFile=n.validateSDFFile,exports.DATE_FORMAT=l.DATE_FORMAT,exports.formatDateToTimestamp=l.formatDateToTimestamp,exports.getDate=l.getDate,exports.getDeviceId=p.getDeviceId,exports.emailMatch=c.emailMatch,exports.emailMatcher=c.emailMatcher,exports.regexBuilder=c.regexBuilder,exports.cleanCsvLines=u.cleanCsvLines,exports.formatFilePath=u.formatFilePath,exports.arrayToObjectTree=x.arrayToObjectTree,exports.chunkArray=x.chunkArray,exports.duplicatesInArray=x.duplicatesInArray,exports.formatJsonString=x.formatJsonString,exports.formatObj=x.formatObj,exports.formatObj2=x.formatObj2,exports.debounce=m.debounce,exports.delay=m.delay,exports.memoize=m.memoize,exports.memoizeComplex=m.memoizeComplex,exports.memoizer=m.memoizer,exports.nestedTernary=m.nestedTernary,exports.escapeRegExp=d.escapeRegExp,exports.fileNameExt=d.fileNameExt,exports.findStringInText=d.findStringInText,exports.normalizeString=d.normalizeString,exports.removeWhitespaces=d.removeWhitespaces,exports.sanitizeId=d.sanitizeId,exports.sanitizePathId=d.sanitizePathId,exports.toLowerCase=d.toLowerCase,exports.toUpperCase=d.toUpperCase,exports.truncateText=d.truncateText,Object.defineProperty(exports,"Operation",{enumerable:!0,get:function(){return T.Operation}}),exports.decrementValue=T.decrementValue,exports.incerementValue=T.incerementValue,exports.numberDefined=T.numberDefined,exports.numberOperation=T.numberOperation,exports.restrictNumberInLimits=T.restrictNumberInLimits,exports.setValue=T.setValue,exports.cancelableSetInterval=v.cancelableSetInterval,exports.cancelableSetTimeout=v.cancelableSetTimeout,exports.keyExtractor=h.keyExtractor,exports.keyExtractorFunction=h.keyExtractorFunction,exports.dateRangeFormat=F.dateRangeFormat,exports.getDateTime=F.getDateTime,exports.getTimeFromNow=F.getTimeFromNow,exports.getTimeFromNowOriginal=F.getTimeFromNowOriginal,exports.getTimeTo=F.getTimeTo,exports.ced=g.ced,exports.createResolveAttribute=g.createResolveAttribute,exports.customElementDefine=g.customElementDefine,exports.resolveAttributes=g.resolveAttributes,exports.calculateColors=j.calculateColors,exports.calculatePercColor=j.calculatePercColor,exports.convertHex=j.convertHex,exports.convertRGB=j.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return j.defaultFontSize}}),exports.pxToRem=j.pxToRem,exports.resolveStyleValue=j.resolveStyleValue,exports.setDefaultFontSize=j.setDefaultFontSize,exports.toHex=j.toHex,exports.FBox=b.FBox,exports.Flex=C.Flex,exports.FlexTight=C.FlexTight,exports.FlexTightStyled=C.FlexTightStyled,exports.FlexWrapper=C.FlexWrapper,exports.Placeholder=f.Placeholder,exports.Container=S.Container,exports.ResizableContainer=q.ResizableContainer,exports.Field=I.Field,exports.FieldWrapper=I.FieldWrapper,exports.Select=I.Select,exports.setIconColor=I.setIconColor,exports.setIconComponent=I.setIconComponent,exports.DividerHorizontal=D.DividerHorizontal,exports.DividerLine=D.DividerLine,exports.DividerVertical=D.DividerVertical,exports.IconBase=O.IconBase,exports.Icon=y.Icon,exports.IconBaseWC=z.IconBaseWC,Object.defineProperty(exports,"EventName",{enumerable:!0,get:function(){return V.EventName}});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n
|
|
1
|
+
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n} & CSSProperties\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (key.substr(0, 4) === 'data') {\n restProps[key] = value\n } else {\n cssProps[key] = value\n }\n })\n return [restProps, cssProps]\n }, [props])\n\n const styles = useMemo(() => (\n {\n ...cssProps,\n ...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align as string) } : {}),\n ...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify as string) } : {}),\n ...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),\n ...style,\n }\n ), [cssProps, style])\n\n return (\n <div\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...restProps}\n >\n {children}\n </div>\n )\n})\n\nFBoxRefForwarded.displayName = 'FBoxRefForwarded'\n\nexport const FBox: FC<FBoxProps> = memo<FBoxProps>(FBoxRefForwarded)\n\n\nFBox.displayName = 'FBox'\n\n\n// default flex centralized, 100% width and height\n// export const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n// {\n// width: props.width || '100%',\n// height: props.height || '100%',\n// justify: props.justify || 'center',\n// align: props.align || 'center',\n// ...props,\n// }\n// ))``)\n\n// export const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// ...props,\n// }))``)\n\n// export const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// style: {\n// text: 'blue',\n// padding: '1rem',\n// border: '1px solid green',\n// },\n// ...props,\n// }))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","FBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","_ref$className","className","props","_objectWithoutProperties","_excluded","_useMemo","useMemo","restProps","cssProps","Object","entries","forEach","_ref2","_ref3","_slicedToArray","key","substr","_useMemo2","styles","_objectSpread","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","FBox","memo"],"mappings":"klBAgCMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAGRC,EAAmB,SAACC,GAAc,OAA0BA,GAASJ,EAAaI,IAAmBA,CAAK,EAG1GC,EAAmBC,GAAW,SAAAC,EAEtBC,GAA+C,IAD3DC,EAAKF,EAALE,MAAOC,EAAQH,EAARG,SAAUC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAR,EAAAS,GAEnDC,EAA8BC,GAAQ,WACpC,IAAMC,EAAqC,CAAA,EACrCC,EAAoC,CAAA,EAS1C,OAPAC,OAAOC,QAAQR,GAAOS,SAAQ,SAAAC,GAAkB,IAAAC,EAAAC,EAAAF,EAAA,GAAhBG,EAAGF,EAAA,GAAErB,EAAKqB,EAAA,GACf,SAArBE,EAAIC,OAAO,EAAG,GAChBT,EAAUQ,GAAOvB,EAEjBgB,EAASO,GAAOvB,CAEpB,IACO,CAACe,EAAWC,EACrB,GAAG,CAACN,IAAOe,EAAAH,EAAAT,EAAA,GAZJE,EAASU,EAAA,GAAET,EAAQS,EAAA,GAcpBC,EAASZ,GAAQ,WAAA,OAAAa,EAAAA,EAAAA,EAAAA,EAAAA,KAEhBX,GACCA,EAASY,MAAQ,CAAEC,WAAY9B,EAAiBiB,EAASY,QAAqB,CAAE,GAChFZ,EAASc,QAAU,CAAEC,eAAgBhC,EAAiBiB,EAASc,UAAuB,CAAE,GACxFd,EAASgB,UAAY,CAAEC,cAAejB,EAASgB,WAAc,CAAE,GAChE3B,EAAK,GAET,CAACW,EAAUX,IAEd,OACE6B,MAAAC,cAAA,MAAAC,EAAA,CACEhC,IAAKA,EACLG,SAAUA,EACVE,UAAS,GAAA4B,OAAMC,EAAgB,gBAAeD,KAAAA,OAAI5B,GAClDJ,MAAOqB,GACHX,GAEHT,EAGP,IAEAL,EAAiBsC,YAAc,uBAElBC,EAAsBC,EAAgBxC,GAGnDuC,EAAKD,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{objectSpread2 as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as e,useMemo as i}from"react";import r from"./icon.module.scss.js";var t=e((function(e){var t=e.iconUrl,
|
|
1
|
+
import{objectSpread2 as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as e,useMemo as i}from"react";import r from"./icon.module.scss.js";var t=e((function(e){var t=e.iconUrl,c=e.minWidth,n=void 0===c?"1rem":c,a=e.minHeight,s=void 0===a?"1rem":a,l=e.size,m=e.fontSize,d=e.width,u=e.height,h=e.color,p=void 0===h?"currentColor":h,f=e.className,v=void 0===f?"":f,g=e.children,j=i((function(){return o(o(o({"--min-width":n||"auto","--min-height":s||"auto","--width":l||d,"--height":l||u},m?{fontSize:m}:{}),t?{"--icon-url":"url(".concat(t,")")}:{}),t?{"--icon-color":p}:{"--icon-content-color":p})}),[n,s,l,d,u,m,t,p]);return React.createElement("span",{className:"".concat(r["icon-base"]," icon-base ").concat(v),style:j},!t&&g&&g)}));t.displayName="IconBase";export{t 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, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<any> & {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\nexport const IconBase = memo<IconBaseType>(({\n iconUrl, minWidth = '1rem', minHeight = '1rem',\n
|
|
1
|
+
{"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<any> & {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\nexport const IconBase = memo<IconBaseType>(({\n iconUrl, minWidth = '1rem', minHeight = '1rem', size,\n fontSize, width, height, color = 'currentColor', className = '', children,\n}: IconBaseType) => {\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || 'auto',\n '--min-height': minHeight || 'auto',\n '--width': size || width,\n '--height': size || height,\n ...(fontSize ? { fontSize } : {}),\n ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n }\n ), [minWidth, minHeight, size, width, height, fontSize, iconUrl, color])\n\n return (\n <span\n className={`${(classes as any)['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","_ref$minWidth","minWidth","_ref$minHeight","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","styles","useMemo","_objectSpread","concat","React","createElement","classes","style","displayName"],"mappings":"+OAgBaA,EAAWC,GAAmB,SAAAC,GAGvB,IAFlBC,EAAOD,EAAPC,QAAOC,EAAAF,EAAEG,SAAAA,OAAW,IAAHD,EAAG,OAAMA,EAAAE,EAAAJ,EAAEK,UAAAA,OAAY,IAAHD,EAAG,OAAMA,EAAEE,EAAIN,EAAJM,KAChDC,EAAQP,EAARO,SAAUC,EAAKR,EAALQ,MAAOC,EAAMT,EAANS,OAAMC,EAAAV,EAAEW,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAZ,EAAEa,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQd,EAARc,SAE3DC,EAASC,GAAQ,WAAA,OAAAC,EAAAA,EAAAA,EAAA,CAEnB,cAAed,GAAY,OAC3B,eAAgBE,GAAa,OAC7B,UAAWC,GAAQE,EACnB,WAAYF,GAAQG,GAChBF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BN,EAAU,CAAE,aAAY,OAAAiB,OAASjB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBU,GAAU,CAAE,uBAAwBA,GAAO,GAE5E,CAACR,EAAUE,EAAWC,EAAME,EAAOC,EAAQF,EAAUN,EAASU,IAEjE,OACEQ,MAAAC,cAAA,OAAA,CACEP,UAAS,GAAAK,OAAMG,EAAgB,aAAYH,eAAAA,OAAcL,GACzDS,MAAOP,IAEJd,GAAWa,GAAaA,EAGjC,IAEAhB,EAASyB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inherits as e,createSuper as t,createClass as i,classCallCheck as n,objectSpread2 as s,slicedToArray as o,wrapNativeSuper as
|
|
1
|
+
import{inherits as e,createSuper as t,createClass as i,classCallCheck as n,objectSpread2 as s,slicedToArray as o,wrapNativeSuper as a}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import"../../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../../node_modules/core-js/modules/es.object.entries.js";import{ced as r,resolveAttributes as c}from"../../../utils/webComponents/webComponent.utils.js";import l from"./icon.module.scss.js";var m,d=document.createElement("template");d.innerHTML='<span class="icon-base"></span>';var h=r("icon-base")(m=function(a){e(m,a);var r=t(m);function m(){var e;n(this,m);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return(e=r.call.apply(r,[this].concat(i))).content=void 0,e.mainElement=void 0,e.iconUrl=void 0,e.minWidth=void 0,e.minHeight=void 0,e.width=void 0,e.height=void 0,e.size=void 0,e.fontSize=void 0,e.color=void 0,e.render=function(){if(e.mainElement=e.mainElement||e.querySelector(".icon-base"),e.mainElement){e.classList.add(l["icon-base-parent"]),e.mainElement.classList.add(l["icon-base"]);var t=s(s(s({"--min-width":e.minWidth||"auto","--min-height":e.minHeight||"auto","--width":e.size||e.width,"--height":e.size||e.height},e.fontSize?{"font-size":e.fontSize||"unset"}:{}),e.iconUrl?{"--icon-url":"url(".concat(e.iconUrl,")")}:{}),e.iconUrl?{"--icon-color":e.color}:{"--icon-content-color":e.color});e.mainElement.innerHTML=e.iconUrl?"":e.content||"",e.mainElement.setAttribute("style",Object.entries(t).map((function(e){var t=o(e,2),i=t[0],n=t[1];return"".concat(i,": ").concat(n,";")})).join(" "))}},e}return i(m,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=d.innerHTML,c(this,m.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),m}(a(HTMLElement)))||m,u={IconBaseWC:h};export{u as IconBaseWC,h as default};
|
|
2
2
|
//# sourceMappingURL=IconWC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n
|
|
1
|
+
{"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport default class IconBase extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconBase.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || 'auto',\n '--min-height': this.minHeight || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconBaseWC = {\n IconBaseWC: IconBase,\n}\n"],"names":["template","document","createElement","innerHTML","IconBase","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconBaseWC"],"mappings":"giBAMMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAAiC,IAejCC,EADpBC,EAAI,YAAYC,CAAAC,WAAAC,GAAAC,EAAAL,EAAAI,GAAA,IAAAE,EAAAC,EAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,OAAAT,GAAA,IAAA,IAAAU,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAyEd,OAzEcP,EAAAF,EAAAU,KAAAC,MAAAX,EAAA,CAAAY,MAAAC,OAAAN,KAEfO,aAAO,EAAAZ,EAEPa,iBAAW,EAAAb,EAEXc,aAAO,EAAAd,EAEPe,cAAQ,EAAAf,EAERgB,eAAS,EAAAhB,EAETiB,WAAK,EAAAjB,EAELkB,YAAM,EAAAlB,EAENmB,UAAI,EAAAnB,EAEJoB,cAAQ,EAAApB,EAERqB,WAAK,EAAArB,EAgCLsB,OAAS,WAEP,GADAtB,EAAKa,YAAcb,EAAKa,aAAeb,EAAKuB,cAAc,cACrDvB,EAAKa,YAAV,CAGAb,EAAKwB,UAAUC,IAAIC,EAAQ,qBAC3B1B,EAAKa,YAAYW,UAAU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BAAAY,IA5BD,WACE,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,KAACxD,CAAA,EAAAyD,EAvBmCC,gBAAWvD,EAoFpCwD,EAAa,CACxBA,WAAY3D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=function(t){var n=setInterval(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:100);return function(){return clearInterval(n)}},n=function(t){var n=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:100);return function(){return clearTimeout(n)}};export{t as cancelableSetInterval,n as cancelableSetTimeout};
|
|
2
|
+
//# sourceMappingURL=cancelableDelayedFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelableDelayedFunction.js","sources":["../../../../../../../src/core/utils/helpers/cancelableDelayedFunction.ts"],"sourcesContent":["export const cancelableSetInterval = (func: () => void, delay = 100) => {\n const timeoutInterval = setInterval(func, delay)\n\n return () => clearInterval(timeoutInterval)\n}\n\nexport const cancelableSetTimeout = (func: () => void, delay = 100) => {\n const timeoutInterval = setTimeout(func, delay)\n\n return () => clearTimeout(timeoutInterval)\n}\n"],"names":["cancelableSetInterval","func","timeoutInterval","setInterval","arguments","length","undefined","clearInterval","cancelableSetTimeout","setTimeout","clearTimeout"],"mappings":"IAAaA,EAAwB,SAACC,GAAkC,IAChEC,EAAkBC,YAAYF,EADuBG,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAG9D,OAAO,WAAA,OAAMG,cAAcL,EAAgB,CAC7C,EAEaM,EAAuB,SAACP,GAAkC,IAC/DC,EAAkBO,WAAWR,EADuBG,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,KAG7D,OAAO,WAAA,OAAMM,aAAaR,EAAgB,CAC5C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{objectWithoutProperties as r,slicedToArray as e,typeof as o,objectSpread2 as t}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../node_modules/core-js/modules/es.array.iterator.js";import"../../../../node_modules/core-js/modules/es.object.to-string.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.array.from.js";import"../../../../node_modules/core-js/modules/web.dom-collections.for-each.js";import"../../../../node_modules/core-js/modules/es.object.entries.js";import"../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../node_modules/core-js/modules/es.array.concat.js";import"../../../../node_modules/core-js/modules/es.array.slice.js";import"../../../../node_modules/core-js/modules/es.array.reduce.js";var
|
|
1
|
+
import{objectWithoutProperties as r,slicedToArray as e,typeof as o,objectSpread2 as t}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../node_modules/core-js/modules/es.array.iterator.js";import"../../../../node_modules/core-js/modules/es.object.to-string.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.array.from.js";import"../../../../node_modules/core-js/modules/web.dom-collections.for-each.js";import"../../../../node_modules/core-js/modules/es.object.entries.js";import"../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../node_modules/core-js/modules/es.array.concat.js";import"../../../../node_modules/core-js/modules/es.array.slice.js";import"../../../../node_modules/core-js/modules/es.array.reduce.js";var n=["graphQL"],s=function(r){var e=new Set(r);if(Array.from(e).length!==r.length){var o={},t={};return r.forEach((function(r){void 0!==t[String(r)]?(o[String(r)]=t[String(r)]+1,t[String(r)]+=1):t[String(r)]=1})),o}return null},i=function s(i,c,a){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},d=u.graphQL,l=r(u,n);if(!d)return JSON.stringify(i,c,a);var m=[];return Object.entries(i).forEach((function(r){var n=e(r,2),i=n[0],u=n[1],j="".concat(i,": ");"object"!==o(u)||Array.isArray(u)?j+=JSON.stringify(u):j+="".concat(s(u,c,a,t({graphQL:d},l))),m.push(j)})),"{".concat(m.join(", "),"}")},c=function(r){return"".concat(r)},a=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c;return"object"===o(r)?Object.entries(r).map((function(r){var o=e(r,2),t=o[0],i=o[1];return"".concat(s(t),": ").concat(n(i))})).join(t):""},u=function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c;return"object"===o(t)&&Array.isArray(t)?t.map((function(e){return r(e,n,s,i)})).join(n):"object"===o(t)?Object.entries(t).map((function(t){var n=e(t,2),c=n[0],a=n[1],u=i(c),d=s("object"===o(a)?r(a):a);return"".concat(u?"".concat(u,": "):"").concat(d)})).join(n):""},d=function(r){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,o=[],t=r.length,n=0;n<t;n+=e){var s=r.slice(n,n+e);o.push(s)}return o},l=function(r){var e;return function r(o){return o.reduce((function(o,n,s,i){var c=t({},o);if("string"==typeof n&&(c[n]={name:n},e||(e=c[n]),0===s&&Array.isArray(i[1])&&(e=c[n])),Array.isArray(n)){var a=e;s>1?(c[n[0]]=c[n[0]]||{name:n[0]},a=c[n[0]],c=t(t({},c),r(n))):a.children=r(n)}return c}),{})}(r)};export{l as arrayToObjectTree,d as chunkArray,s as duplicatesInArray,i as formatJsonString,a as formatObj,u as formatObj2};
|
|
2
2
|
//# sourceMappingURL=objectOperations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectOperations.js","sources":["../../../../../../../src/core/utils/helpers/objectOperations.ts"],"sourcesContent":["export const duplicatesInArray = (arr: unknown[]): null | Record<string, number> => {\n const setFromArr = new Set(arr)\n\n if (Array.from(setFromArr).length !== arr.length) {\n const foundDuplicates: Record<string, number> = {}\n const itemsMap: Record<string, number> = {}\n\n arr.forEach((item: unknown) => {\n if (itemsMap[String(item)] !== undefined) {\n foundDuplicates[String(item)] = itemsMap[String(item)] + 1\n itemsMap[String(item)] += 1\n } else {\n itemsMap[String(item)] = 1\n }\n })\n return foundDuplicates\n }\n return null\n}\n\ntype Replacer = ((this: any, key: string, value: any) => any) | undefined\ntype Options = {\n graphQL?: boolean\n [key: string]: any\n}\n\nexport const formatJsonString = (\n value: any,\n replacer?: Replacer | undefined,\n space?: string | number | undefined,\n { graphQL, ...options }: Options = {},\n): string => {\n if (!graphQL) {\n return JSON.stringify(value, replacer, space)\n }\n const strValues: string[] = []\n\n Object.entries(value).forEach(([key, value]) => {\n let str = `${key}: `\n\n if (typeof value === 'object' && !Array.isArray(value)) {\n str += `${formatJsonString(value, replacer, space, { graphQL, ...options })}`\n } else {\n str += JSON.stringify(value)\n }\n strValues.push(str)\n })\n return `{${strValues.join(', ')}}`\n}\n\nconst simpleIdentiy = (value: string | number) => `${value}`\n\nexport const formatObj = (\n obj: Record<string, string | number>,\n delimiter = ', ',\n mapValue: ((value: string | number) => string) = simpleIdentiy,\n mapKey: ((value: string | number) => string) = simpleIdentiy,\n): string => (typeof obj === 'object'\n ? Object.entries(obj).map(([key, value]) => `${mapKey(key)}: ${mapValue(value)}`).join(delimiter)\n : '')\n\nexport const chunkArray = (dataArray: any[], chunkSize = 100): (any[])[] => {\n const result = []\n\n const len = dataArray.length\n\n for (let i = 0; i < len; i += chunkSize) {\n const chunk = dataArray.slice(i, i + chunkSize)\n\n result.push(chunk)\n }\n return result\n}\n\nexport type TreeNodeStr = (string | TreeNodeStr)[]\n\ntype TreeNode = {\n name: string\n children?: Record<string, TreeNode>\n}\n\n// ['app', ['user', 'dashboard', ['ui', ['header', 'footer', 'menu'], 'realTime']]]\n\nexport const arrayToObjectTree = (itemsInTree: TreeNodeStr[]) => {\n let previousParent: TreeNode\n\n const innerMake = (items: TreeNodeStr[]): Record<string, TreeNode> => {\n const treeObject: Record<string, TreeNode> = items.reduce((tree: Record<string, TreeNode>, item, index, array) => {\n let resolvedTree: Record<string, TreeNode> = { ...tree }\n\n if (typeof item === 'string') {\n resolvedTree[item] = { name: item }\n if (!previousParent) {\n previousParent = resolvedTree[item]\n }\n\n if (index === 0 && Array.isArray(array[1])) {\n previousParent = resolvedTree[item]\n }\n }\n if (Array.isArray(item)) {\n let parent = previousParent\n\n if (index > 1) {\n resolvedTree[item[0] as string] = resolvedTree[item[0] as string] || { name: item[0] }\n parent = resolvedTree[item[0] as string]\n\n resolvedTree = { ...resolvedTree, ...innerMake(item as TreeNodeStr[]) }\n } else {\n parent.children = innerMake(item as TreeNodeStr[])\n }\n }\n return resolvedTree\n }, {})\n\n return treeObject\n }\n\n return innerMake(itemsInTree)\n}\n"],"names":["duplicatesInArray","arr","setFromArr","Set","Array","from","length","foundDuplicates","itemsMap","forEach","item","undefined","String","formatJsonString","value","replacer","space","_ref","arguments","graphQL","options","_objectWithoutProperties","_excluded","JSON","stringify","strValues","Object","entries","_ref2","_ref3","_slicedToArray","key","str","concat","_typeof","isArray","_objectSpread","push","join","simpleIdentiy","formatObj","obj","delimiter","mapValue","mapKey","map","_ref4","_ref5","chunkArray","dataArray","chunkSize","result","len","i","chunk","slice","arrayToObjectTree","itemsInTree","previousParent","innerMake","items","reduce","tree","index","array","resolvedTree","name","parent","children"],"mappings":"k/BAAaA,EAAoB,SAACC,GAChC,IAAMC,EAAa,IAAIC,IAAIF,GAE3B,GAAIG,MAAMC,KAAKH,GAAYI,SAAWL,EAAIK,OAAQ,CAChD,IAAMC,EAA0C,CAAA,EAC1CC,EAAmC,CAAA,EAUzC,OARAP,EAAIQ,SAAQ,SAACC,QACoBC,IAA3BH,EAASI,OAAOF,KAClBH,EAAgBK,OAAOF,IAASF,EAASI,OAAOF,IAAS,EACzDF,EAASI,OAAOF,KAAU,GAE1BF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,IAAEwB,KAAKI,GACrF,EAAE,
|
|
1
|
+
{"version":3,"file":"objectOperations.js","sources":["../../../../../../../src/core/utils/helpers/objectOperations.ts"],"sourcesContent":["export const duplicatesInArray = (arr: unknown[]): null | Record<string, number> => {\n const setFromArr = new Set(arr)\n\n if (Array.from(setFromArr).length !== arr.length) {\n const foundDuplicates: Record<string, number> = {}\n const itemsMap: Record<string, number> = {}\n\n arr.forEach((item: unknown) => {\n if (itemsMap[String(item)] !== undefined) {\n foundDuplicates[String(item)] = itemsMap[String(item)] + 1\n itemsMap[String(item)] += 1\n } else {\n itemsMap[String(item)] = 1\n }\n })\n return foundDuplicates\n }\n return null\n}\n\ntype Replacer = ((this: any, key: string, value: any) => any) | undefined\ntype Options = {\n graphQL?: boolean\n [key: string]: any\n}\n\nexport const formatJsonString = (\n value: any,\n replacer?: Replacer | undefined,\n space?: string | number | undefined,\n { graphQL, ...options }: Options = {},\n): string => {\n if (!graphQL) {\n return JSON.stringify(value, replacer, space)\n }\n const strValues: string[] = []\n\n Object.entries(value).forEach(([key, value]) => {\n let str = `${key}: `\n\n if (typeof value === 'object' && !Array.isArray(value)) {\n str += `${formatJsonString(value, replacer, space, { graphQL, ...options })}`\n } else {\n str += JSON.stringify(value)\n }\n strValues.push(str)\n })\n return `{${strValues.join(', ')}}`\n}\n\nconst simpleIdentiy = (value: string | number) => `${value}`\n\nexport const formatObj = (\n obj: Record<string, string | number>,\n delimiter = ', ',\n mapValue: ((value: string | number) => string) = simpleIdentiy,\n mapKey: ((value: string | number) => string) = simpleIdentiy,\n): string => (typeof obj === 'object'\n ? Object.entries(obj).map(([key, value]) => `${mapKey(key)}: ${mapValue(value)}`).join(delimiter)\n : '')\n\n\nexport const formatObj2 = (\n obj: Record<string, string | number>,\n delimiter = ', ',\n mapValue: ((value: string | number) => string) = simpleIdentiy,\n mapKey: ((value: string | number) => string) = simpleIdentiy,\n): string => {\n if (typeof obj === 'object' && Array.isArray(obj)) {\n return obj\n .map((objValue) => formatObj2(objValue, delimiter, mapValue, mapKey))\n .join(delimiter)\n }\n\n if (typeof obj === 'object') {\n return Object.entries(obj)\n .map(([key, value]) => {\n const mappedKey = mapKey(key)\n const mappedValue = mapValue(typeof value === 'object' ? formatObj2(value) : value)\n\n return `${mappedKey ? `${mappedKey}: ` : ''}${mappedValue}`\n })\n .join(delimiter)\n }\n return ''\n}\n\n\n\n\n\nexport const chunkArray = (dataArray: any[], chunkSize = 100): (any[])[] => {\n const result = []\n\n const len = dataArray.length\n\n for (let i = 0; i < len; i += chunkSize) {\n const chunk = dataArray.slice(i, i + chunkSize)\n\n result.push(chunk)\n }\n return result\n}\n\nexport type TreeNodeStr = (string | TreeNodeStr)[]\n\ntype TreeNode = {\n name: string\n children?: Record<string, TreeNode>\n}\n\n// ['app', ['user', 'dashboard', ['ui', ['header', 'footer', 'menu'], 'realTime']]]\n\nexport const arrayToObjectTree = (itemsInTree: TreeNodeStr[]) => {\n let previousParent: TreeNode\n\n const innerMake = (items: TreeNodeStr[]): Record<string, TreeNode> => {\n const treeObject: Record<string, TreeNode> = items.reduce((tree: Record<string, TreeNode>, item, index, array) => {\n let resolvedTree: Record<string, TreeNode> = { ...tree }\n\n if (typeof item === 'string') {\n resolvedTree[item] = { name: item }\n if (!previousParent) {\n previousParent = resolvedTree[item]\n }\n\n if (index === 0 && Array.isArray(array[1])) {\n previousParent = resolvedTree[item]\n }\n }\n if (Array.isArray(item)) {\n let parent = previousParent\n\n if (index > 1) {\n resolvedTree[item[0] as string] = resolvedTree[item[0] as string] || { name: item[0] }\n parent = resolvedTree[item[0] as string]\n\n resolvedTree = { ...resolvedTree, ...innerMake(item as TreeNodeStr[]) }\n } else {\n parent.children = innerMake(item as TreeNodeStr[])\n }\n }\n return resolvedTree\n }, {})\n\n return treeObject\n }\n\n return innerMake(itemsInTree)\n}\n"],"names":["duplicatesInArray","arr","setFromArr","Set","Array","from","length","foundDuplicates","itemsMap","forEach","item","undefined","String","formatJsonString","value","replacer","space","_ref","arguments","graphQL","options","_objectWithoutProperties","_excluded","JSON","stringify","strValues","Object","entries","_ref2","_ref3","_slicedToArray","key","str","concat","_typeof","isArray","_objectSpread","push","join","simpleIdentiy","formatObj","obj","delimiter","mapValue","mapKey","map","_ref4","_ref5","formatObj2","objValue","_ref6","_ref7","mappedKey","mappedValue","chunkArray","dataArray","chunkSize","result","len","i","chunk","slice","arrayToObjectTree","itemsInTree","previousParent","innerMake","items","reduce","tree","index","array","resolvedTree","name","parent","children"],"mappings":"k/BAAaA,EAAoB,SAACC,GAChC,IAAMC,EAAa,IAAIC,IAAIF,GAE3B,GAAIG,MAAMC,KAAKH,GAAYI,SAAWL,EAAIK,OAAQ,CAChD,IAAMC,EAA0C,CAAA,EAC1CC,EAAmC,CAAA,EAUzC,OARAP,EAAIQ,SAAQ,SAACC,QACoBC,IAA3BH,EAASI,OAAOF,KAClBH,EAAgBK,OAAOF,IAASF,EAASI,OAAOF,IAAS,EACzDF,EAASI,OAAOF,KAAU,GAE1BF,EAASI,OAAOF,IAAS,CAE7B,IACOH,CACT,CACA,OAAO,IACT,EAQaM,EAAmB,SAAnBA,EACXC,EACAC,EACAC,GAEW,IAAAC,EAAAC,UAAAZ,OAAA,QAAAK,IAAAO,UAAA,GAAAA,UAAA,GADwB,CAAE,EAAnCC,EAAOF,EAAPE,QAAYC,EAAOC,EAAAJ,EAAAK,GAErB,IAAKH,EACH,OAAOI,KAAKC,UAAUV,EAAOC,EAAUC,GAEzC,IAAMS,EAAsB,GAY5B,OAVAC,OAAOC,QAAQb,GAAOL,SAAQ,SAAAmB,GAAkB,IAAAC,EAAAC,EAAAF,EAAA,GAAhBG,EAAGF,EAAA,GAAEf,EAAKe,EAAA,GACpCG,EAAG,GAAAC,OAAMF,EAAO,MAEC,WAAjBG,EAAOpB,IAAuBV,MAAM+B,QAAQrB,GAG9CkB,GAAOT,KAAKC,UAAUV,GAFtBkB,GAAG,GAAAC,OAAOpB,EAAiBC,EAAOC,EAAUC,EAAKoB,EAAA,CAAIjB,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GAAqBkC,EAAWlC,GAASA,GAE7E,MAAA,GAAAmB,OAAUmB,EAAS,GAAAnB,OAAMmB,EAAS,MAAO,IAAEnB,OAAGoB,EAChD,IACCf,KAAKI,GAEH,EACT,EAMaY,EAAa,SAACC,GAKzB,IAL0E,IAA/BC,EAAStC,UAAAZ,OAAA,QAAAK,IAAAO,UAAA,GAAAA,UAAA,GAAG,IACjDuC,EAAS,GAETC,EAAMH,EAAUjD,OAEbqD,EAAI,EAAGA,EAAID,EAAKC,GAAKH,EAAW,CACvC,IAAMI,EAAQL,EAAUM,MAAMF,EAAGA,EAAIH,GAErCC,EAAOpB,KAAKuB,EACd,CACA,OAAOH,CACT,EAWaK,EAAoB,SAACC,GAChC,IAAIC,EAkCJ,OAhCkB,SAAZC,EAAaC,GA6BjB,OA5B6CA,EAAMC,QAAO,SAACC,EAAgC1D,EAAM2D,EAAOC,GACtG,IAAIC,EAAsCnC,EAAA,CAAA,EAAQgC,GAYlD,GAVoB,iBAAT1D,IACT6D,EAAa7D,GAAQ,CAAE8D,KAAM9D,GACxBsD,IACHA,EAAiBO,EAAa7D,IAGlB,IAAV2D,GAAejE,MAAM+B,QAAQmC,EAAM,MACrCN,EAAiBO,EAAa7D,KAG9BN,MAAM+B,QAAQzB,GAAO,CACvB,IAAI+D,EAAST,EAETK,EAAQ,GACVE,EAAa7D,EAAK,IAAgB6D,EAAa7D,EAAK,KAAiB,CAAE8D,KAAM9D,EAAK,IAClF+D,EAASF,EAAa7D,EAAK,IAE3B6D,EAAYnC,EAAAA,EAAA,CAAA,EAAQmC,GAAiBN,EAAUvD,KAE/C+D,EAAOC,SAAWT,EAAUvD,EAEhC,CACA,OAAO6D,CACR,GAAE,CAAE,GAKAN,CAAUF,EACnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.js";export{createSafeT,setUseTranslation,useTranslations}from"./core/hooks/useTranslations.js";export{useOutsideClick}from"./core/hooks/useOutsideClick.js";export{useResize}from"./core/hooks/useResize.js";export{isBirthNumberValid}from"./core/utils/helpers/birthnumber.validator.js";export{getMatch,isValidFormat,isValidModulo11,parse,regex}from"./core/utils/helpers/birthnumberCZSKvalidator.js";export{parseCSVdata,validateCSVFile,validateCSVlines,validateJSONFile,validateLineCellTrimmed,validateLineNumColumns,validateSDFFile}from"./core/utils/helpers/fileValidator.js";export{DATE_FORMAT,formatDateToTimestamp,getDate}from"./core/utils/helpers/date.js";export{getDeviceId}from"./core/utils/helpers/deviceInfo.js";export{emailMatch,emailMatcher,regexBuilder}from"./core/utils/helpers/emailMatcher.js";export{cleanCsvLines,formatFilePath}from"./core/utils/helpers/file.js";export{arrayToObjectTree,chunkArray,duplicatesInArray,formatJsonString,formatObj}from"./core/utils/helpers/objectOperations.js";export{debounce,delay,memoize,memoizeComplex,memoizer,nestedTernary}from"./core/utils/helpers/other.js";export{escapeRegExp,fileNameExt,findStringInText,normalizeString,removeWhitespaces,sanitizeId,sanitizePathId,toLowerCase,toUpperCase,truncateText}from"./core/utils/helpers/textValueOperations.js";export{Operation,decrementValue,incerementValue,numberDefined,numberOperation,restrictNumberInLimits,setValue}from"./core/utils/helpers/valueOperations.js";export{keyExtractor,keyExtractorFunction}from"./core/utils/keyExtractor.js";export{dateRangeFormat,getDateTime,getTimeFromNow,getTimeFromNowOriginal,getTimeTo}from"./core/utils/date.js";export{ced,createResolveAttribute,customElementDefine,resolveAttributes}from"./core/utils/webComponents/webComponent.utils.js";export{calculateColors,calculatePercColor,convertHex,convertRGB,defaultFontSize,pxToRem,resolveStyleValue,setDefaultFontSize,toHex}from"./core/ui/utils/style.js";export{FBox}from"./core/ui/components/container/FBox.js";export{Flex,FlexTight,FlexTightStyled,FlexWrapper}from"./core/ui/components/container/Flex.js";export{Placeholder}from"./core/ui/components/container/Placeholder.js";export{Container}from"./core/ui/components/container/Container.js";export{ResizableContainer}from"./core/ui/components/container/ResizableContainer.js";export{Field,FieldWrapper,Select,setIconColor,setIconComponent}from"./core/ui/components/field/Field.js";export{DividerHorizontal,DividerLine,DividerVertical}from"./core/ui/components/dividers/DividerLine.js";export{IconBase}from"./core/ui/components/icon/IconBase.js";export{Icon}from"./core/ui/components/icon/Icon.js";export{IconBaseWC}from"./core/ui/components/icon/IconWC.js";export{EventName}from"./core/constants/ui.constants.js";
|
|
1
|
+
export{useApi}from"./core/hooks/useApi.js";export{useToggle}from"./core/hooks/useToggle.js";export{createSafeT,setUseTranslation,useTranslations}from"./core/hooks/useTranslations.js";export{useOutsideClick}from"./core/hooks/useOutsideClick.js";export{useResize}from"./core/hooks/useResize.js";export{isBirthNumberValid}from"./core/utils/helpers/birthnumber.validator.js";export{getMatch,isValidFormat,isValidModulo11,parse,regex}from"./core/utils/helpers/birthnumberCZSKvalidator.js";export{parseCSVdata,validateCSVFile,validateCSVlines,validateJSONFile,validateLineCellTrimmed,validateLineNumColumns,validateSDFFile}from"./core/utils/helpers/fileValidator.js";export{DATE_FORMAT,formatDateToTimestamp,getDate}from"./core/utils/helpers/date.js";export{getDeviceId}from"./core/utils/helpers/deviceInfo.js";export{emailMatch,emailMatcher,regexBuilder}from"./core/utils/helpers/emailMatcher.js";export{cleanCsvLines,formatFilePath}from"./core/utils/helpers/file.js";export{arrayToObjectTree,chunkArray,duplicatesInArray,formatJsonString,formatObj,formatObj2}from"./core/utils/helpers/objectOperations.js";export{debounce,delay,memoize,memoizeComplex,memoizer,nestedTernary}from"./core/utils/helpers/other.js";export{escapeRegExp,fileNameExt,findStringInText,normalizeString,removeWhitespaces,sanitizeId,sanitizePathId,toLowerCase,toUpperCase,truncateText}from"./core/utils/helpers/textValueOperations.js";export{Operation,decrementValue,incerementValue,numberDefined,numberOperation,restrictNumberInLimits,setValue}from"./core/utils/helpers/valueOperations.js";export{cancelableSetInterval,cancelableSetTimeout}from"./core/utils/helpers/cancelableDelayedFunction.js";export{keyExtractor,keyExtractorFunction}from"./core/utils/keyExtractor.js";export{dateRangeFormat,getDateTime,getTimeFromNow,getTimeFromNowOriginal,getTimeTo}from"./core/utils/date.js";export{ced,createResolveAttribute,customElementDefine,resolveAttributes}from"./core/utils/webComponents/webComponent.utils.js";export{calculateColors,calculatePercColor,convertHex,convertRGB,defaultFontSize,pxToRem,resolveStyleValue,setDefaultFontSize,toHex}from"./core/ui/utils/style.js";export{FBox}from"./core/ui/components/container/FBox.js";export{Flex,FlexTight,FlexTightStyled,FlexWrapper}from"./core/ui/components/container/Flex.js";export{Placeholder}from"./core/ui/components/container/Placeholder.js";export{Container}from"./core/ui/components/container/Container.js";export{ResizableContainer}from"./core/ui/components/container/ResizableContainer.js";export{Field,FieldWrapper,Select,setIconColor,setIconComponent}from"./core/ui/components/field/Field.js";export{DividerHorizontal,DividerLine,DividerVertical}from"./core/ui/components/dividers/DividerLine.js";export{IconBase}from"./core/ui/components/icon/IconBase.js";export{Icon}from"./core/ui/components/icon/Icon.js";export{IconBaseWC}from"./core/ui/components/icon/IconWC.js";export{EventName}from"./core/constants/ui.constants.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -13,7 +13,6 @@ const FBoxRefForwarded = forwardRef(({ style, children, tabIndex, className = ''
|
|
|
13
13
|
const restProps = {};
|
|
14
14
|
const cssProps = {};
|
|
15
15
|
Object.entries(props).forEach(([key, value]) => {
|
|
16
|
-
console.log('key', key, 'value', value);
|
|
17
16
|
if (key.substr(0, 4) === 'data') {
|
|
18
17
|
restProps[key] = value;
|
|
19
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/FBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAyB,OAAO,EAAiB,UAAU,EAAa,MAAM,OAAO,CAAA;AAGlG,OAAO,OAAO,MAAM,oBAAoB,CAAA;AA6BxC,MAAM,YAAY,GAA2B;IAC3C,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,YAAY;IAC1B,GAAG,EA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AC,CAAC,CAAA;IAErB,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,GAAI,OAAe,CAAC,cAAc,CAAC,IAAI,SAAS,EAAE,EAC7D,KAAK,EAAE,MAAuB,KAC1B,SAAS,YAEZ,QAAQ,GACL,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEjD,MAAM,CAAC,MAAM,IAAI,GAAkB,IAAI,CAAY,gBAAgB,CAAC,CAAA;AAGpE,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA"}
|
|
@@ -3,8 +3,8 @@ import { memo, useMemo } from 'react';
|
|
|
3
3
|
import classes from './icon.module.scss';
|
|
4
4
|
export const IconBase = memo(({ iconUrl, minWidth = '1rem', minHeight = '1rem', size, fontSize, width, height, color = 'currentColor', className = '', children, }) => {
|
|
5
5
|
const styles = useMemo(() => ({
|
|
6
|
-
'--min-width':
|
|
7
|
-
'--min-height':
|
|
6
|
+
'--min-width': minWidth || 'auto',
|
|
7
|
+
'--min-height': minHeight || 'auto',
|
|
8
8
|
'--width': size || width,
|
|
9
9
|
'--height': size || height,
|
|
10
10
|
...(fontSize ? { fontSize } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconBase.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,IAAI,EAAE,OAAO,EAAqB,MAAM,OAAO,CAAA;AAEvE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAcxC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAe,CAAC,EAC1C,OAAO,EAAE,QAAQ,GAAG,MAAM,EAAE,SAAS,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"IconBase.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"names":[],"mappings":";AAAA,O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,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA"}
|
|
@@ -20,10 +20,10 @@ let IconBase = IconBase_1 = class IconBase extends HTMLElement {
|
|
|
20
20
|
this.classList.add(classes['icon-base-parent']);
|
|
21
21
|
this.mainElement.classList.add(classes['icon-base']);
|
|
22
22
|
const styles = {
|
|
23
|
-
'--min-width':
|
|
24
|
-
'--min-height':
|
|
25
|
-
'--width': this.size || this.width
|
|
26
|
-
'--height': this.size || this.height
|
|
23
|
+
'--min-width': this.minWidth || 'auto',
|
|
24
|
+
'--min-height': this.minHeight || 'auto',
|
|
25
|
+
'--width': this.size || this.width,
|
|
26
|
+
'--height': this.size || this.height,
|
|
27
27
|
...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),
|
|
28
28
|
...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),
|
|
29
29
|
...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),
|
|
@@ -50,7 +50,6 @@ let IconBase = IconBase_1 = class IconBase extends HTMLElement {
|
|
|
50
50
|
this.classList.remove(this.className);
|
|
51
51
|
this.classList.add(this.className);
|
|
52
52
|
}
|
|
53
|
-
return;
|
|
54
53
|
}
|
|
55
54
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
56
55
|
// @ts-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconWC.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/icon/IconWC.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AAExF,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAIxC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;AAEnD,QAAQ,CAAC,SAAS,GAAG,iCAAiC,CAAA;AAevC,IAAM,QAAQ,gBAAd,MAAM,QAAS,SAAQ,WAAW;IAAlC;;
|
|
1
|
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AAE;YAC5B,IAAI,CAAC,SAAS,GAAI,MAAiB,IAAI,EAAE,CAAA;YACzC,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;gBACrC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;aACnC;SACF;QACD,6DAA6D;QAC7D,aAAa;QACb,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAA;QACvB,IAAI,CAAC,MAAM,EAAE,CAAA;IACf,CAAC;CAwBF,CAAA;AAzEoB,QAAQ;IAD5B,GAAG,CAAC,WAAW,CAAC;GACI,QAAQ,CAyE5B;eAzEoB,QAAQ;AAoF7B,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,UAAU,EAAE,QAAQ;CACrB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const cancelableSetInterval = (func, delay = 100) => {
|
|
2
|
+
const timeoutInterval = setInterval(func, delay);
|
|
3
|
+
return () => clearInterval(timeoutInterval);
|
|
4
|
+
};
|
|
5
|
+
export const cancelableSetTimeout = (func, delay = 100) => {
|
|
6
|
+
const timeoutInterval = setTimeout(func, delay);
|
|
7
|
+
return () => clearTimeout(timeoutInterval);
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=cancelableDelayedFunction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelableDelayedFunction.js","sourceRoot":"","sources":["../../../../../../src/core/utils/helpers/cancelableDelayedFunction.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAgB,EAAE,KAAK,GAAG,GAAG,EAAE,EAAE;IACrE,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAEhD,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAA;AAC7C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAgB,EAAE,KAAK,GAAG,GAAG,EAAE,EAAE;IACpE,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAE/C,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,CAAA;AAC5C,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/core/utils/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,oBAAoB,CAAA;AAClC,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/core/utils/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,oBAAoB,CAAA;AAClC,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA"}
|