@reltio/remotes 1.4.1482 → 1.4.1484

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/3469.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3469],{53469:(e,t,l)=>{l.r(t),l.d(t,{default:()=>Z});var a=l(8598),r=l(36138),n=l(22664),o=l(39450),i=l(585),s=l(24328),c=l.n(s),p=l(52730),u=l(44443),f=l(47401),m=l(56259),d=l(98884),g=l(67268),v=l(22243);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},b.apply(this,arguments)}const y=e=>{let{layoutItemConfig:t,views:l,onToggleFullscreen:a,isFullscreen:r,className:n,onRemove:o,children:i,style:s}=e,p=function(e,t){if(null==e)return{};var l,a,r=function(e,t){if(null==e)return{};var l,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)l=n[a],t.indexOf(l)>=0||(r[l]=e[l]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)l=n[a],t.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}(e,["layoutItemConfig","views","onToggleFullscreen","isFullscreen","className","onRemove","children","style"]);const u=l.find((e=>{let{config:l}=e;return t.i===l.id}));if(!u)return null;const{config:f}=u;return c().createElement("div",b({style:s,className:n},p),v.Z.getComponent({type:f.component,config:f,onRemove:o,onToggleFullscreen:a,isFullscreen:r}),i)};var h=l(79692);const x=(0,h.Z)({pageWrapper:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},content:{display:"flex",overflow:"hidden",height:"100%"},rightPanel:{overflowY:"auto",backgroundColor:"#FFF",borderLeft:"solid 1px rgba(0, 0, 0, 0.12)",width:"490px",minWidth:"490px",maxWidth:"490px"},mainPanel:{flex:"1 1 auto",overflow:"auto",backgroundColor:"#F9F9F9"}}),w=(0,s.memo)((e=>{let{views:t,layout:l,onLayoutChanged:a}=e;const r=x();return c().createElement("div",{className:r.pageWrapper},c().createElement("div",{className:r.content},c().createElement("div",{className:r.mainPanel},c().createElement(g.Z,{LayoutItem:y,views:t,layout:l,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"}))))})),E=(0,h.Z)({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"}});var P=l(94079),N=l(71153),C=l.n(N),T=l(17440);const k=(0,h.Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},attributeType:{display:"flex",flexWrap:"wrap"},badge:{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px",backgroundColor:"#0071ce",color:"#f5f5f5"}}))),I=e=>{let{label:t,attributeType:l,className:a,classes:r,children:n}=e;const o=k({classes:r});return(0,T.isNil)(l)?null:c().createElement("div",{className:C()(o.profileBandWrapper,a)},c().createElement("div",{className:o.profileBand},c().createElement(P.Avatar,{className:C()(o.profileIcon,o.imageProfileIcon)}),c().createElement("div",{className:o.profileInfo},c().createElement("div",null,c().createElement(P.Typography,{variant:"h6",className:o.label},(0,f.idV)(t))),c().createElement("div",{className:o.specialInfo},c().createElement("div",{className:o.attributeType},c().createElement(P.Typography,{className:C()(o.badge,a),component:"div"},(0,f.idV)(l.label))))),n&&c().createElement("div",null,n)))};var F=l(49885);const O=(0,s.memo)((e=>{let{config:t,attributeTypeUri:l,value:a}=e;const r=E(),[n,o]=(0,s.useState)(""),i=(0,p.useSelector)(F.ZP.selectors.getMetadata),u=(0,p.useSelector)(F.ZP.selectors.getAttributePresentations),g=(0,f.zeJ)(i,l);(0,s.useEffect)((()=>{(0,f.kR6)({attributeType:g,attributePresentations:u,value:a}).then((e=>o(e)))}),[g,u,a]);const v=(0,f.BlA)({value:(0,f.QZu)(g)?a:(e=>Object.values(e[0])[0])(a),attributeType:g}),b=(0,s.useMemo)((()=>t.views.map((e=>({config:e})))),[t]),[y,h]=(0,s.useState)();(0,s.useEffect)((()=>{const e=(0,f.sFD)(t.layout,t.views);h(e)}),[t]);const x=(0,s.useCallback)((e=>h(e)),[]);return c().createElement("div",{className:r.perspectiveView},c().createElement(m.I.Provider,{value:v},c().createElement(I,{label:n,attributeType:g}),c().createElement(d.DX,null,y&&c().createElement(w,{layout:y,onLayoutChanged:x,views:b}))))})),S=(0,r.createGenerateClassName)({productionPrefix:"pivotingPerspective",disableGlobal:!0}),Z=e=>{let{config:t,attributeTypeUri:l,value:s,store:f,onResize:m}=e;return c().createElement(p.Provider,{store:f},c().createElement(o.m.Provider,{value:t.id},c().createElement(r.StylesProvider,{generateClassName:S},c().createElement(n.MuiPickersUtilsProvider,{utils:a.Z},c().createElement(u.Z,{handleHeight:!0,onResize:(e,t)=>null==m?void 0:m(Math.floor(e),Math.floor(t))}),t&&c().createElement(O,{value:s,config:t,attributeTypeUri:l}),c().createElement(i.Z,null)))))}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3469],{53469:(e,t,l)=>{l.r(t),l.d(t,{default:()=>Z});var a=l(8598),r=l(36138),n=l(22664),o=l(39450),i=l(585),s=l(24328),c=l.n(s),p=l(52730),u=l(44443),f=l(47401),m=l(56259),d=l(98884),g=l(67268),v=l(22243);function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},y.apply(this,arguments)}const b=e=>{let{layoutItemConfig:t,views:l,onToggleFullscreen:a,isFullscreen:r,className:n,onRemove:o,children:i,style:s}=e,p=function(e,t){if(null==e)return{};var l,a,r=function(e,t){if(null==e)return{};var l,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)l=n[a],t.indexOf(l)>=0||(r[l]=e[l]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)l=n[a],t.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}(e,["layoutItemConfig","views","onToggleFullscreen","isFullscreen","className","onRemove","children","style"]);const u=l.find((e=>{let{config:l}=e;return t.i===l.id}));if(!u)return null;const{config:f}=u;return c().createElement("div",y({style:s,className:n},p),v.Z.getComponent({type:f.component,config:f,onRemove:o,onToggleFullscreen:a,isFullscreen:r}),i)};var h=l(79692);const x=(0,h.Z)({pageWrapper:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},content:{display:"flex",overflow:"hidden",height:"100%"},rightPanel:{overflowY:"auto",backgroundColor:"#FFF",borderLeft:"solid 1px rgba(0, 0, 0, 0.12)",width:"490px",minWidth:"490px",maxWidth:"490px"},mainPanel:{flex:"1 1 auto",overflow:"auto",backgroundColor:"#F9F9F9"}}),w=(0,s.memo)((e=>{let{views:t,layout:l,onLayoutChanged:a}=e;const r=x();return c().createElement("div",{className:r.pageWrapper},c().createElement("div",{className:r.content},c().createElement("div",{className:r.mainPanel},c().createElement(g.Z,{LayoutItem:b,views:t,layout:l,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"}))))})),E=(0,h.Z)({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"}});var P=l(94079),N=l(71153),T=l.n(N),k=l(17440);const C=(0,h.Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},attributeType:{display:"flex",flexWrap:"wrap"},badge:{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px",backgroundColor:"#0071ce",color:"#f5f5f5"}}))),I=e=>{let{label:t,attributeType:l,className:a,classes:r,children:n}=e;const o=C({classes:r});return(0,k.isNil)(l)?null:c().createElement("div",{className:T()(o.profileBandWrapper,a)},c().createElement("div",{className:o.profileBand},c().createElement(P.Avatar,{className:T()(o.profileIcon,o.imageProfileIcon)}),c().createElement("div",{className:o.profileInfo},c().createElement("div",null,c().createElement(P.Typography,{variant:"h6",className:o.label},(0,f.idV)(t))),c().createElement("div",{className:o.specialInfo},c().createElement("div",{className:o.attributeType},c().createElement(P.Typography,{className:T()(o.badge,a),component:"div"},(0,f.idV)(l.label))))),n&&c().createElement("div",null,n)))};var F=l(49885);const O=(0,s.memo)((e=>{let{config:t,attributeTypeUri:l,value:a}=e;const r=E(),[n,o]=(0,s.useState)(""),i=(0,p.useSelector)(F.ZP.selectors.getMetadata),u=(0,p.useSelector)(F.ZP.selectors.getAttributePresentations),g=(0,f.zeJ)(i,l);(0,s.useEffect)((()=>{(0,f.kR6)({attributeType:g,attributePresentations:u,value:a}).then((e=>o(e)))}),[g,u,a]);const v=(0,f.Uk3)(l),y=(0,f.BlA)({value:(0,f.QZu)(g)?a:(e=>Object.values(e[0])[0])(a),attributeType:g,entityType:v}),b=(0,s.useMemo)((()=>t.views.map((e=>({config:e})))),[t]),[h,x]=(0,s.useState)();(0,s.useEffect)((()=>{const e=(0,f.sFD)(t.layout,t.views);x(e)}),[t]);const P=(0,s.useCallback)((e=>x(e)),[]);return c().createElement("div",{className:r.perspectiveView},c().createElement(m.I.Provider,{value:y},c().createElement(I,{label:n,attributeType:g}),c().createElement(d.DX,null,h&&c().createElement(w,{layout:h,onLayoutChanged:P,views:b}))))})),S=(0,r.createGenerateClassName)({productionPrefix:"pivotingPerspective",disableGlobal:!0}),Z=e=>{let{config:t,attributeTypeUri:l,value:s,store:f,onResize:m}=e;return c().createElement(p.Provider,{store:f},c().createElement(o.m.Provider,{value:t.id},c().createElement(r.StylesProvider,{generateClassName:S},c().createElement(n.MuiPickersUtilsProvider,{utils:a.Z},c().createElement(u.Z,{handleHeight:!0,onResize:(e,t)=>null==m?void 0:m(Math.floor(e),Math.floor(t))}),t&&c().createElement(O,{value:s,config:t,attributeTypeUri:l}),c().createElement(i.Z,null)))))}}}]);
2
2
  //# sourceMappingURL=3469.js.map
package/3469.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"3469.js","mappings":"0fAgBO,MAAMA,EAAqB,IAUrB,IAVsB,iBAC/BC,EAD+B,MAE/BC,EAF+B,mBAG/BC,EAH+B,aAI/BC,EAJ+B,UAK/BC,EAL+B,SAM/BC,EACAC,SAAUC,EAPqB,MAQ/BC,GAES,EADNC,E,kXACM,+GACT,MAAMC,EAAOT,EAAMU,MAAK,QAAC,OAACC,GAAF,SAAcZ,EAA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oB7G,MAAOuG,UCvD9FS,GAAoBC,EAAAA,EAAAA,yBAAwB,CAC9CC,iBAAkB,sBAClBC,eAAe,ICXnB,EDsB4B,IAA+D,IAA9D,OAACxG,EAAD,iBAAS0E,EAAT,MAA2BC,EAA3B,MAAkC8B,EAAlC,SAAyCC,GAAqB,EACvF,OACI,kBAAC,EAAAC,SAAD,CAAUF,MAAOA,GACb,kBAACG,EAAA,WAAD,CAAwBjC,MAAO3E,EAAOE,IAClC,kBAAC,EAAA2G,eAAD,CAAgBR,kBAAmBA,GAC/B,kBAAC,EAAAS,wBAAD,CAAyBC,MAAOC,EAAAA,GAC5B,kBAAC,IAAD,CACIC,cAAY,EACZP,SAAU,CAACxF,EAAOT,IAAWiG,MAAAA,OAAnB,EAAmBA,EAAWQ,KAAKC,MAAMjG,GAAQgG,KAAKC,MAAM1G,MAEzET,GACG,kBAAC,EAAD,CACI2E,MAAOA,EACP3E,OAAQA,EACR0E,iBAAkBA,IAG1B,kBAAC0C,EAAA,EAAD","sources":["webpack://@reltio/remotes/../pivoting/src/components/PivotingLayoutItem/PivotingLayoutItem.tsx","webpack://@reltio/remotes/../pivoting/src/components/PivotingLayout/styles.ts","webpack://@reltio/remotes/../pivoting/src/components/PivotingLayout/PivotingLayout.tsx","webpack://@reltio/remotes/../pivoting/src/perspective/styles.ts","webpack://@reltio/remotes/../pivoting/src/components/PivotingProfileBand/styles.ts","webpack://@reltio/remotes/../pivoting/src/components/PivotingProfileBand/PivotingProfileBand.tsx","webpack://@reltio/remotes/../pivoting/src/perspective/PivotingPerspective.tsx","webpack://@reltio/remotes/../pivoting/src/perspective/index.tsx","webpack://@reltio/remotes/./src/pivoting.ts"],"sourcesContent":["import React from 'react';\nimport {ViewsFactory} from '@reltio/dashboard';\nimport {ReactGridLayoutItem} from '@reltio/components';\nimport {PivotingView} from '../../types';\n\ntype Props = {\n className?: string;\n isFullscreen: boolean;\n style: React.CSSProperties;\n onToggleFullscreen: (id: string) => void;\n onRemove: (id: string) => void;\n views: PivotingView[];\n layoutItemConfig: ReactGridLayoutItem;\n children: React.ReactNode;\n};\n\nexport const PivotingLayoutItem = ({\n layoutItemConfig,\n views,\n onToggleFullscreen,\n isFullscreen,\n className,\n onRemove,\n children: ResizeComponent,\n style,\n ...props\n}: Props) => {\n const view = views.find(({config}) => layoutItemConfig.i === config.id);\n if (!view) {\n return null;\n }\n\n const {config} = view;\n return (\n <div style={style} className={className} {...props}>\n {ViewsFactory.getComponent({\n type: config.component,\n config,\n onRemove,\n onToggleFullscreen,\n isFullscreen\n })}\n {ResizeComponent}\n </div>\n );\n};\n","import {makeStyles} from '@material-ui/core/styles';\n\nconst configWidth = 490;\n\nexport const useStyles = makeStyles({\n pageWrapper: {\n height: '100%',\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n display: 'flex',\n overflow: 'hidden',\n height: '100%'\n },\n rightPanel: {\n overflowY: 'auto',\n backgroundColor: '#FFF',\n borderLeft: 'solid 1px rgba(0, 0, 0, 0.12)',\n width: `${configWidth}px`,\n minWidth: `${configWidth}px`,\n maxWidth: `${configWidth}px`\n },\n mainPanel: {\n flex: '1 1 auto',\n overflow: 'auto',\n backgroundColor: '#F9F9F9'\n }\n});\n","import React, {memo} from 'react';\nimport {ReltioGridLayoutItem} from '@reltio/mdm-sdk';\nimport {ReltioGridLayout} from '@reltio/components';\nimport {PivotingView} from '../../types';\nimport {PivotingLayoutItem} from '../PivotingLayoutItem/PivotingLayoutItem';\nimport {useStyles} from './styles';\n\ntype Props = {\n views: PivotingView[];\n layout: ReltioGridLayoutItem[];\n onLayoutChanged: (layout: ReltioGridLayoutItem[]) => void;\n};\n\nconst PivotingLayout = ({views, layout, onLayoutChanged}: Props) => {\n const styles = useStyles();\n\n return (\n <div className={styles.pageWrapper}>\n <div className={styles.content}>\n <div className={styles.mainPanel}>\n <ReltioGridLayout\n LayoutItem={PivotingLayoutItem}\n views={views}\n layout={layout}\n onLayoutChanged={onLayoutChanged}\n draggableHandle=\".viewDraggableHandle\"\n />\n </div>\n </div>\n </div>\n );\n};\n\nexport default memo(PivotingLayout);\n","import {makeStyles} from '@material-ui/core/styles';\n\nexport const useStyles = makeStyles({\n perspectiveView: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif',\n display: 'flex',\n flexDirection: 'column'\n }\n});\n","import {makeStyles} from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n profileBandWrapper: {\n // especially for IE (overflow fix)\n flexShrink: 0\n },\n profileBand: {\n display: 'flex',\n padding: '16px 12px 16px 16px',\n alignItems: 'flex-start',\n backgroundColor: '#fff',\n boxShadow: 'inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);',\n\n '&:after': {\n content: '\"\"',\n minHeight: 'inherit',\n fontSize: 0\n }\n },\n profileIcon: {\n marginRight: '12px'\n },\n imageProfileIcon: {\n width: '48px',\n height: '48px'\n },\n profileInfo: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1 1 50%'\n },\n label: {\n lineHeight: '1.2',\n letterSpacing: '0.25px',\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n\n '&+ $specialInfo': {\n marginTop: '4px'\n }\n },\n specialInfo: {\n display: 'flex',\n justifyContent: 'space-between',\n flexWrap: 'wrap',\n width: '100%',\n marginTop: '8px'\n },\n attributeType: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n badge: {\n padding: '2px 8px 3px',\n borderRadius: '2px',\n fontSize: '13px',\n fontWeight: 500,\n lineHeight: '15px',\n display: 'inline-flex',\n marginRight: '16px',\n backgroundColor: '#0071ce',\n color: '#f5f5f5'\n }\n}));\n\nexport default useStyles;\n","import {Avatar as Avatar} from '@material-ui/core';\nimport {Typography as Typography} from '@material-ui/core';\nimport {AttributeType, getLabel} from '@reltio/mdm-sdk';\nimport classnames from 'classnames';\nimport {isNil} from 'ramda';\nimport React from 'react';\nimport useStyles from './styles';\n\ntype Props = {\n label: string;\n attributeType: AttributeType;\n className?: string;\n classes?: Record<string, string>;\n children?: React.ReactNode;\n};\nconst PivotingProfileBand = ({label, attributeType, className, classes, children}: Props) => {\n const styles = useStyles({classes});\n\n if (isNil(attributeType)) {\n return null;\n }\n return (\n <div className={classnames(styles.profileBandWrapper, className)}>\n <div className={styles.profileBand}>\n <Avatar className={classnames(styles.profileIcon, styles.imageProfileIcon)} />\n <div className={styles.profileInfo}>\n <div>\n <Typography variant=\"h6\" className={styles.label}>\n {getLabel(label)}\n </Typography>\n </div>\n <div className={styles.specialInfo}>\n <div className={styles.attributeType}>\n <Typography className={classnames(styles.badge, className)} component=\"div\">\n {getLabel(attributeType.label)}\n </Typography>\n </div>\n </div>\n </div>\n {children && <div>{children}</div>}\n </div>\n </div>\n );\n};\n\nexport default PivotingProfileBand;\n","import React, {memo, useCallback, useEffect, useMemo, useState} from 'react';\nimport {\n AttributePresentations,\n convertPivotingValueToSearchFilters,\n PivotingPerspectiveConfig,\n findAttributeTypeByUri,\n getPivotingLabel,\n isNested,\n Metadata,\n PivotingValue,\n PrimitiveValue,\n removeUnsupportedLayoutItems,\n ReltioGridLayoutItem\n} from '@reltio/mdm-sdk';\nimport {ReloadFacetProvider, SearchFiltersContext} from '@reltio/components';\nimport PivotingLayout from '../components/PivotingLayout/PivotingLayout';\nimport {useStyles} from './styles';\nimport PivotingProfileBand from '../components/PivotingProfileBand/PivotingProfileBand';\nimport {useSelector} from 'react-redux';\nimport mdmModule from '@reltio/mdm-module';\n\ntype Props = {\n config: PivotingPerspectiveConfig;\n attributeTypeUri: string;\n value: PivotingValue[];\n};\n\nconst PivotingPerspective = ({config, attributeTypeUri, value}: Props) => {\n const styles = useStyles();\n const [label, setLabel] = useState('');\n const metadata: Metadata = useSelector(mdmModule.selectors.getMetadata);\n const attributePresentations: AttributePresentations = useSelector(mdmModule.selectors.getAttributePresentations);\n const attributeType = findAttributeTypeByUri(metadata, attributeTypeUri);\n\n useEffect(() => {\n getPivotingLabel({attributeType, attributePresentations, value}).then((label) => setLabel(label));\n }, [attributeType, attributePresentations, value]);\n const getFirstValue = (value: PivotingValue[]) => Object.values(value[0])[0];\n\n const filters = convertPivotingValueToSearchFilters({\n value: isNested(attributeType) ? value : (getFirstValue(value) as PrimitiveValue),\n attributeType\n });\n\n const pivotingViews = useMemo(\n () =>\n config.views.map((view) => ({\n config: view\n })),\n [config]\n );\n\n const [layout, setLayout] = useState<ReltioGridLayoutItem[]>();\n useEffect(() => {\n const newLayout = removeUnsupportedLayoutItems(config.layout, config.views);\n setLayout(newLayout);\n }, [config]);\n\n const handleLayoutChange = useCallback((layout: ReltioGridLayoutItem[]) => setLayout(layout), []);\n\n return (\n <div className={styles.perspectiveView}>\n <SearchFiltersContext.Provider value={filters}>\n <PivotingProfileBand label={label} attributeType={attributeType} />\n <ReloadFacetProvider>\n {layout && (\n <PivotingLayout layout={layout} onLayoutChanged={handleLayoutChange} views={pivotingViews} />\n )}\n </ReloadFacetProvider>\n </SearchFiltersContext.Provider>\n </div>\n );\n};\n\nexport default memo(PivotingPerspective);\n","import MomentUtils from '@date-io/moment';\nimport {createGenerateClassName, StylesProvider} from '@material-ui/core/styles';\nimport {MuiPickersUtilsProvider} from '@material-ui/pickers';\nimport {ErrorPopup, ViewIdContext} from '@reltio/components';\nimport {DashboardPerspectiveConfig, PivotingValue} from '@reltio/mdm-sdk';\nimport React from 'react';\nimport {Provider} from 'react-redux';\nimport ReactResizeDetector from 'react-resize-detector';\nimport {Store} from 'redux';\nimport PivotingPerspectiveView from './PivotingPerspective';\n\nconst generateClassName = createGenerateClassName({\n productionPrefix: 'pivotingPerspective',\n disableGlobal: true\n});\n\ntype Props = {\n config: DashboardPerspectiveConfig;\n attributeTypeUri: string;\n value: PivotingValue[];\n store: Store<unknown>;\n onResize?: (width: number, height: number) => void;\n};\n\nconst PivotingPerspective = ({config, attributeTypeUri, value, store, onResize}: Props) => {\n return (\n <Provider store={store}>\n <ViewIdContext.Provider value={config.id}>\n <StylesProvider generateClassName={generateClassName}>\n <MuiPickersUtilsProvider utils={MomentUtils}>\n <ReactResizeDetector\n handleHeight\n onResize={(width, height) => onResize?.(Math.floor(width), Math.floor(height))}\n />\n {config && (\n <PivotingPerspectiveView\n value={value}\n config={config}\n attributeTypeUri={attributeTypeUri}\n />\n )}\n <ErrorPopup />\n </MuiPickersUtilsProvider>\n </StylesProvider>\n </ViewIdContext.Provider>\n </Provider>\n );\n};\n\nexport {PivotingPerspective};\n","import {PivotingView} from '@reltio/pivoting';\n\nexport default PivotingView;\n"],"names":["PivotingLayoutItem","layoutItemConfig","views","onToggleFullscreen","isFullscreen","className","onRemove","children","ResizeComponent","style","props","view","find","config","i","id","ViewsFactory","type","component","useStyles","makeStyles","pageWrapper","height","overflow","display","flexDirection","content","rightPanel","overflowY","backgroundColor","borderLeft","width","minWidth","maxWidth","mainPanel","flex","memo","layout","onLayoutChanged","styles","ReltioGridLayout","LayoutItem","draggableHandle","perspectiveView","position","top","left","right","bottom","overflowX","fontFamily","theme","profileBandWrapper","flexShrink","profileBand","padding","alignItems","boxShadow","minHeight","fontSize","profileIcon","marginRight","imageProfileIcon","profileInfo","label","lineHeight","letterSpacing","color","palette","text","primary","wordBreak","marginTop","specialInfo","justifyContent","flexWrap","attributeType","badge","borderRadius","fontWeight","classes","isNil","classnames","Avatar","Typography","variant","getLabel","attributeTypeUri","value","setLabel","useState","metadata","useSelector","mdmModule","attributePresentations","findAttributeTypeByUri","useEffect","getPivotingLabel","then","filters","convertPivotingValueToSearchFilters","isNested","Object","values","getFirstValue","pivotingViews","useMemo","map","setLayout","newLayout","removeUnsupportedLayoutItems","handleLayoutChange","useCallback","SearchFiltersContext","generateClassName","createGenerateClassName","productionPrefix","disableGlobal","store","onResize","Provider","ViewIdContext","StylesProvider","MuiPickersUtilsProvider","utils","MomentUtils","handleHeight","Math","floor","ErrorPopup"],"sourceRoot":""}
1
+ {"version":3,"file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OACrE6G,EAAUC,KACX,CAACnG,IAEJ,MAAMqG,GAAqBC,EAAAA,EAAAA,cAAa9E,GAAmC0E,EAAU1E,IAAS,IAE9F,OACI,yBAAKhC,UAAWkC,EAAOI,iBACnB,kBAACyE,EAAA,WAAD,CAA+B5B,MAAOa,GAClC,kBAAC,EAAD,CAAqBrC,MAAOA,EAAOY,cAAeA,IAClD,kBAAC,KAAD,KACKvC,GACG,kBAAC,EAAD,CAAgBA,OAAQA,EAAQC,gBAAiB4E,EAAoBhH,MAAO0G,UC1D9FS,GAAoBC,EAAAA,EAAAA,yBAAwB,CAC9CC,iBAAkB,sBAClBC,eAAe,ICXnB,EDsB4B,IAA+D,IAA9D,OAAC3G,EAAD,iBAAS0E,EAAT,MAA2BC,EAA3B,MAAkCiC,EAAlC,SAAyCC,GAAqB,EACvF,OACI,kBAAC,EAAAC,SAAD,CAAUF,MAAOA,GACb,kBAACG,EAAA,WAAD,CAAwBpC,MAAO3E,EAAOE,IAClC,kBAAC,EAAA8G,eAAD,CAAgBR,kBAAmBA,GAC/B,kBAAC,EAAAS,wBAAD,CAAyBC,MAAOC,EAAAA,GAC5B,kBAAC,IAAD,CACIC,cAAY,EACZP,SAAU,CAAC3F,EAAOT,IAAWoG,MAAAA,OAAnB,EAAmBA,EAAWQ,KAAKC,MAAMpG,GAAQmG,KAAKC,MAAM7G,MAEzET,GACG,kBAAC,EAAD,CACI2E,MAAOA,EACP3E,OAAQA,EACR0E,iBAAkBA,IAG1B,kBAAC6C,EAAA,EAAD","sources":["webpack://@reltio/remotes/../pivoting/src/components/PivotingLayoutItem/PivotingLayoutItem.tsx","webpack://@reltio/remotes/../pivoting/src/components/PivotingLayout/styles.ts","webpack://@reltio/remotes/../pivoting/src/components/PivotingLayout/PivotingLayout.tsx","webpack://@reltio/remotes/../pivoting/src/perspective/styles.ts","webpack://@reltio/remotes/../pivoting/src/components/PivotingProfileBand/styles.ts","webpack://@reltio/remotes/../pivoting/src/components/PivotingProfileBand/PivotingProfileBand.tsx","webpack://@reltio/remotes/../pivoting/src/perspective/PivotingPerspective.tsx","webpack://@reltio/remotes/../pivoting/src/perspective/index.tsx","webpack://@reltio/remotes/./src/pivoting.ts"],"sourcesContent":["import React from 'react';\nimport {ViewsFactory} from '@reltio/dashboard';\nimport {ReactGridLayoutItem} from '@reltio/components';\nimport {PivotingView} from '../../types';\n\ntype Props = {\n className?: string;\n isFullscreen: boolean;\n style: React.CSSProperties;\n onToggleFullscreen: (id: string) => void;\n onRemove: (id: string) => void;\n views: PivotingView[];\n layoutItemConfig: ReactGridLayoutItem;\n children: React.ReactNode;\n};\n\nexport const PivotingLayoutItem = ({\n layoutItemConfig,\n views,\n onToggleFullscreen,\n isFullscreen,\n className,\n onRemove,\n children: ResizeComponent,\n style,\n ...props\n}: Props) => {\n const view = views.find(({config}) => layoutItemConfig.i === config.id);\n if (!view) {\n return null;\n }\n\n const {config} = view;\n return (\n <div style={style} className={className} {...props}>\n {ViewsFactory.getComponent({\n type: config.component,\n config,\n onRemove,\n onToggleFullscreen,\n isFullscreen\n })}\n {ResizeComponent}\n </div>\n );\n};\n","import {makeStyles} from '@material-ui/core/styles';\n\nconst configWidth = 490;\n\nexport const useStyles = makeStyles({\n pageWrapper: {\n height: '100%',\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n display: 'flex',\n overflow: 'hidden',\n height: '100%'\n },\n rightPanel: {\n overflowY: 'auto',\n backgroundColor: '#FFF',\n borderLeft: 'solid 1px rgba(0, 0, 0, 0.12)',\n width: `${configWidth}px`,\n minWidth: `${configWidth}px`,\n maxWidth: `${configWidth}px`\n },\n mainPanel: {\n flex: '1 1 auto',\n overflow: 'auto',\n backgroundColor: '#F9F9F9'\n }\n});\n","import React, {memo} from 'react';\nimport {ReltioGridLayoutItem} from '@reltio/mdm-sdk';\nimport {ReltioGridLayout} from '@reltio/components';\nimport {PivotingView} from '../../types';\nimport {PivotingLayoutItem} from '../PivotingLayoutItem/PivotingLayoutItem';\nimport {useStyles} from './styles';\n\ntype Props = {\n views: PivotingView[];\n layout: ReltioGridLayoutItem[];\n onLayoutChanged: (layout: ReltioGridLayoutItem[]) => void;\n};\n\nconst PivotingLayout = ({views, layout, onLayoutChanged}: Props) => {\n const styles = useStyles();\n\n return (\n <div className={styles.pageWrapper}>\n <div className={styles.content}>\n <div className={styles.mainPanel}>\n <ReltioGridLayout\n LayoutItem={PivotingLayoutItem}\n views={views}\n layout={layout}\n onLayoutChanged={onLayoutChanged}\n draggableHandle=\".viewDraggableHandle\"\n />\n </div>\n </div>\n </div>\n );\n};\n\nexport default memo(PivotingLayout);\n","import {makeStyles} from '@material-ui/core/styles';\n\nexport const useStyles = makeStyles({\n perspectiveView: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif',\n display: 'flex',\n flexDirection: 'column'\n }\n});\n","import {makeStyles} from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n profileBandWrapper: {\n // especially for IE (overflow fix)\n flexShrink: 0\n },\n profileBand: {\n display: 'flex',\n padding: '16px 12px 16px 16px',\n alignItems: 'flex-start',\n backgroundColor: '#fff',\n boxShadow: 'inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);',\n\n '&:after': {\n content: '\"\"',\n minHeight: 'inherit',\n fontSize: 0\n }\n },\n profileIcon: {\n marginRight: '12px'\n },\n imageProfileIcon: {\n width: '48px',\n height: '48px'\n },\n profileInfo: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1 1 50%'\n },\n label: {\n lineHeight: '1.2',\n letterSpacing: '0.25px',\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n\n '&+ $specialInfo': {\n marginTop: '4px'\n }\n },\n specialInfo: {\n display: 'flex',\n justifyContent: 'space-between',\n flexWrap: 'wrap',\n width: '100%',\n marginTop: '8px'\n },\n attributeType: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n badge: {\n padding: '2px 8px 3px',\n borderRadius: '2px',\n fontSize: '13px',\n fontWeight: 500,\n lineHeight: '15px',\n display: 'inline-flex',\n marginRight: '16px',\n backgroundColor: '#0071ce',\n color: '#f5f5f5'\n }\n}));\n\nexport default useStyles;\n","import {Avatar as Avatar} from '@material-ui/core';\nimport {Typography as Typography} from '@material-ui/core';\nimport {AttributeType, getLabel} from '@reltio/mdm-sdk';\nimport classnames from 'classnames';\nimport {isNil} from 'ramda';\nimport React from 'react';\nimport useStyles from './styles';\n\ntype Props = {\n label: string;\n attributeType: AttributeType;\n className?: string;\n classes?: Record<string, string>;\n children?: React.ReactNode;\n};\nconst PivotingProfileBand = ({label, attributeType, className, classes, children}: Props) => {\n const styles = useStyles({classes});\n\n if (isNil(attributeType)) {\n return null;\n }\n return (\n <div className={classnames(styles.profileBandWrapper, className)}>\n <div className={styles.profileBand}>\n <Avatar className={classnames(styles.profileIcon, styles.imageProfileIcon)} />\n <div className={styles.profileInfo}>\n <div>\n <Typography variant=\"h6\" className={styles.label}>\n {getLabel(label)}\n </Typography>\n </div>\n <div className={styles.specialInfo}>\n <div className={styles.attributeType}>\n <Typography className={classnames(styles.badge, className)} component=\"div\">\n {getLabel(attributeType.label)}\n </Typography>\n </div>\n </div>\n </div>\n {children && <div>{children}</div>}\n </div>\n </div>\n );\n};\n\nexport default PivotingProfileBand;\n","import React, {memo, useCallback, useEffect, useMemo, useState} from 'react';\nimport {\n AttributePresentations,\n convertPivotingValueToSearchFilters,\n getEntityUriFromAttributeUri,\n PivotingPerspectiveConfig,\n findAttributeTypeByUri,\n getPivotingLabel,\n isNested,\n Metadata,\n PivotingValue,\n PrimitiveValue,\n removeUnsupportedLayoutItems,\n ReltioGridLayoutItem\n} from '@reltio/mdm-sdk';\nimport {ReloadFacetProvider, SearchFiltersContext} from '@reltio/components';\nimport PivotingLayout from '../components/PivotingLayout/PivotingLayout';\nimport {useStyles} from './styles';\nimport PivotingProfileBand from '../components/PivotingProfileBand/PivotingProfileBand';\nimport {useSelector} from 'react-redux';\nimport mdmModule from '@reltio/mdm-module';\n\ntype Props = {\n config: PivotingPerspectiveConfig;\n attributeTypeUri: string;\n value: PivotingValue[];\n};\n\nconst PivotingPerspective = ({config, attributeTypeUri, value}: Props) => {\n const styles = useStyles();\n const [label, setLabel] = useState('');\n const metadata: Metadata = useSelector(mdmModule.selectors.getMetadata);\n const attributePresentations: AttributePresentations = useSelector(mdmModule.selectors.getAttributePresentations);\n const attributeType = findAttributeTypeByUri(metadata, attributeTypeUri);\n\n useEffect(() => {\n getPivotingLabel({attributeType, attributePresentations, value}).then((label) => setLabel(label));\n }, [attributeType, attributePresentations, value]);\n const getFirstValue = (value: PivotingValue[]) => Object.values(value[0])[0];\n const entityTypeUri = getEntityUriFromAttributeUri(attributeTypeUri);\n\n const filters = convertPivotingValueToSearchFilters({\n value: isNested(attributeType) ? value : (getFirstValue(value) as PrimitiveValue),\n attributeType,\n entityType: entityTypeUri\n });\n\n const pivotingViews = useMemo(\n () =>\n config.views.map((view) => ({\n config: view\n })),\n [config]\n );\n\n const [layout, setLayout] = useState<ReltioGridLayoutItem[]>();\n useEffect(() => {\n const newLayout = removeUnsupportedLayoutItems(config.layout, config.views);\n setLayout(newLayout);\n }, [config]);\n\n const handleLayoutChange = useCallback((layout: ReltioGridLayoutItem[]) => setLayout(layout), []);\n\n return (\n <div className={styles.perspectiveView}>\n <SearchFiltersContext.Provider value={filters}>\n <PivotingProfileBand label={label} attributeType={attributeType} />\n <ReloadFacetProvider>\n {layout && (\n <PivotingLayout layout={layout} onLayoutChanged={handleLayoutChange} views={pivotingViews} />\n )}\n </ReloadFacetProvider>\n </SearchFiltersContext.Provider>\n </div>\n );\n};\n\nexport default memo(PivotingPerspective);\n","import MomentUtils from '@date-io/moment';\nimport {createGenerateClassName, StylesProvider} from '@material-ui/core/styles';\nimport {MuiPickersUtilsProvider} from '@material-ui/pickers';\nimport {ErrorPopup, ViewIdContext} from '@reltio/components';\nimport {DashboardPerspectiveConfig, PivotingValue} from '@reltio/mdm-sdk';\nimport React from 'react';\nimport {Provider} from 'react-redux';\nimport ReactResizeDetector from 'react-resize-detector';\nimport {Store} from 'redux';\nimport PivotingPerspectiveView from './PivotingPerspective';\n\nconst generateClassName = createGenerateClassName({\n productionPrefix: 'pivotingPerspective',\n disableGlobal: true\n});\n\ntype Props = {\n config: DashboardPerspectiveConfig;\n attributeTypeUri: string;\n value: PivotingValue[];\n store: Store<unknown>;\n onResize?: (width: number, height: number) => void;\n};\n\nconst PivotingPerspective = ({config, attributeTypeUri, value, store, onResize}: Props) => {\n return (\n <Provider store={store}>\n <ViewIdContext.Provider value={config.id}>\n <StylesProvider generateClassName={generateClassName}>\n <MuiPickersUtilsProvider utils={MomentUtils}>\n <ReactResizeDetector\n handleHeight\n onResize={(width, height) => onResize?.(Math.floor(width), Math.floor(height))}\n />\n {config && (\n <PivotingPerspectiveView\n value={value}\n config={config}\n attributeTypeUri={attributeTypeUri}\n />\n )}\n <ErrorPopup />\n </MuiPickersUtilsProvider>\n </StylesProvider>\n </ViewIdContext.Provider>\n </Provider>\n );\n};\n\nexport {PivotingPerspective};\n","import {PivotingView} from '@reltio/pivoting';\n\nexport default PivotingView;\n"],"names":["PivotingLayoutItem","layoutItemConfig","views","onToggleFullscreen","isFullscreen","className","onRemove","children","ResizeComponent","style","props","view","find","config","i","id","ViewsFactory","type","component","useStyles","makeStyles","pageWrapper","height","overflow","display","flexDirection","content","rightPanel","overflowY","backgroundColor","borderLeft","width","minWidth","maxWidth","mainPanel","flex","memo","layout","onLayoutChanged","styles","ReltioGridLayout","LayoutItem","draggableHandle","perspectiveView","position","top","left","right","bottom","overflowX","fontFamily","theme","profileBandWrapper","flexShrink","profileBand","padding","alignItems","boxShadow","minHeight","fontSize","profileIcon","marginRight","imageProfileIcon","profileInfo","label","lineHeight","letterSpacing","color","palette","text","primary","wordBreak","marginTop","specialInfo","justifyContent","flexWrap","attributeType","badge","borderRadius","fontWeight","classes","isNil","classnames","Avatar","Typography","variant","getLabel","attributeTypeUri","value","setLabel","useState","metadata","useSelector","mdmModule","attributePresentations","findAttributeTypeByUri","useEffect","getPivotingLabel","then","entityTypeUri","getEntityUriFromAttributeUri","filters","convertPivotingValueToSearchFilters","isNested","Object","values","getFirstValue","entityType","pivotingViews","useMemo","map","setLayout","newLayout","removeUnsupportedLayoutItems","handleLayoutChange","useCallback","SearchFiltersContext","generateClassName","createGenerateClassName","productionPrefix","disableGlobal","store","onResize","Provider","ViewIdContext","StylesProvider","MuiPickersUtilsProvider","utils","MomentUtils","handleHeight","Math","floor","ErrorPopup"],"sourceRoot":""}