frst-components 0.20.43 → 0.20.44
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/index.js +73 -88
- package/dist/src/components/IJ/learningCycleCard/components/menu/index.d.ts.map +1 -1
- package/dist/src/components/IJ/learningCycleCard/components/menu/menuStyle.d.ts.map +1 -1
- package/dist/src/components/LXP/accordionTrack/contentCoursesTrails.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11028,7 +11028,7 @@ const useStyles = core.makeStyles((theme) => {
|
|
|
11028
11028
|
return {
|
|
11029
11029
|
popoverRoot: {
|
|
11030
11030
|
backgroundColor: color,
|
|
11031
|
-
maxWidth: 200
|
|
11031
|
+
maxWidth: 200
|
|
11032
11032
|
},
|
|
11033
11033
|
content: {
|
|
11034
11034
|
padding: theme.spacing(2),
|
|
@@ -11041,71 +11041,71 @@ const useStyles = core.makeStyles((theme) => {
|
|
|
11041
11041
|
'&[x-placement*="bottom"] $arrow': {
|
|
11042
11042
|
top: 0,
|
|
11043
11043
|
left: 0,
|
|
11044
|
-
marginTop:
|
|
11044
|
+
marginTop: '-0.71em',
|
|
11045
11045
|
marginLeft: 4,
|
|
11046
11046
|
marginRight: 4,
|
|
11047
|
-
|
|
11048
|
-
transformOrigin:
|
|
11047
|
+
'&::before': {
|
|
11048
|
+
transformOrigin: '0 100%'
|
|
11049
11049
|
}
|
|
11050
11050
|
},
|
|
11051
11051
|
'&[x-placement*="top"] $arrow': {
|
|
11052
11052
|
bottom: 0,
|
|
11053
11053
|
left: 0,
|
|
11054
|
-
marginBottom:
|
|
11054
|
+
marginBottom: '-0.71em',
|
|
11055
11055
|
marginLeft: 4,
|
|
11056
11056
|
marginRight: 4,
|
|
11057
|
-
|
|
11058
|
-
transformOrigin:
|
|
11057
|
+
'&::before': {
|
|
11058
|
+
transformOrigin: '100% 0'
|
|
11059
11059
|
}
|
|
11060
11060
|
},
|
|
11061
11061
|
'&[x-placement*="right"] $arrow': {
|
|
11062
11062
|
left: 0,
|
|
11063
|
-
marginLeft:
|
|
11064
|
-
height:
|
|
11065
|
-
width:
|
|
11063
|
+
marginLeft: '-0.71em',
|
|
11064
|
+
height: '1em',
|
|
11065
|
+
width: '0.71em',
|
|
11066
11066
|
marginTop: 4,
|
|
11067
11067
|
marginBottom: 4,
|
|
11068
|
-
|
|
11069
|
-
transformOrigin:
|
|
11068
|
+
'&::before': {
|
|
11069
|
+
transformOrigin: '100% 100%'
|
|
11070
11070
|
}
|
|
11071
11071
|
},
|
|
11072
11072
|
'&[x-placement*="left"] $arrow': {
|
|
11073
11073
|
right: 0,
|
|
11074
|
-
marginRight:
|
|
11075
|
-
height:
|
|
11076
|
-
width:
|
|
11074
|
+
marginRight: '-0.71em',
|
|
11075
|
+
height: '1em',
|
|
11076
|
+
width: '0.71em',
|
|
11077
11077
|
marginTop: 4,
|
|
11078
11078
|
marginBottom: 4,
|
|
11079
|
-
|
|
11080
|
-
transformOrigin:
|
|
11079
|
+
'&::before': {
|
|
11080
|
+
transformOrigin: '0 0'
|
|
11081
11081
|
}
|
|
11082
11082
|
}
|
|
11083
11083
|
},
|
|
11084
11084
|
// Stolen from https://github.com/mui-org/material-ui/blob/next/packages/material-ui/src/Tooltip/Tooltip.js
|
|
11085
11085
|
arrow: {
|
|
11086
|
-
overflow:
|
|
11087
|
-
position:
|
|
11088
|
-
width:
|
|
11089
|
-
height:
|
|
11090
|
-
boxSizing:
|
|
11086
|
+
overflow: 'hidden',
|
|
11087
|
+
position: 'absolute',
|
|
11088
|
+
width: '1em',
|
|
11089
|
+
height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,
|
|
11090
|
+
boxSizing: 'border-box',
|
|
11091
11091
|
color,
|
|
11092
|
-
|
|
11092
|
+
'&::before': {
|
|
11093
11093
|
content: '""',
|
|
11094
|
-
margin:
|
|
11095
|
-
display:
|
|
11096
|
-
width:
|
|
11097
|
-
height:
|
|
11094
|
+
margin: 'auto',
|
|
11095
|
+
display: 'block',
|
|
11096
|
+
width: '100%',
|
|
11097
|
+
height: '100%',
|
|
11098
11098
|
boxShadow: theme.shadows[2],
|
|
11099
|
-
backgroundColor:
|
|
11100
|
-
transform:
|
|
11101
|
-
}
|
|
11099
|
+
backgroundColor: 'currentColor',
|
|
11100
|
+
transform: 'rotate(45deg)'
|
|
11101
|
+
}
|
|
11102
11102
|
}
|
|
11103
11103
|
};
|
|
11104
11104
|
});
|
|
11105
11105
|
function ContentCoursesTrails(props) {
|
|
11106
11106
|
const [OpenPopper, setOpenPopper] = React.useState(false);
|
|
11107
11107
|
const [checked, setChecked] = React.useState(true);
|
|
11108
|
-
|
|
11108
|
+
React.useState(true);
|
|
11109
11109
|
const [show, setShow] = React.useState(true);
|
|
11110
11110
|
const [ElementPopover, setElementPopover] = React.useState(null);
|
|
11111
11111
|
const [ElementPopoverPublish, setElementPopoverPublish] = React.useState(null);
|
|
@@ -11117,15 +11117,15 @@ function ContentCoursesTrails(props) {
|
|
|
11117
11117
|
// const refContainer = useRef(null);
|
|
11118
11118
|
React.useEffect(() => {
|
|
11119
11119
|
setPublishing(props.publishStatus);
|
|
11120
|
-
setOpenPopper(props.publishStatus ===
|
|
11120
|
+
setOpenPopper(props.publishStatus === 'pending');
|
|
11121
11121
|
}, [props.publishStatus]);
|
|
11122
11122
|
React.useEffect(() => {
|
|
11123
11123
|
setNameTrail(props.TrailName);
|
|
11124
11124
|
console.log('props.TrailName', props.TrailName);
|
|
11125
11125
|
}, [props.TrailName]);
|
|
11126
11126
|
React.useEffect(() => {
|
|
11127
|
-
if (props.publishStatus && props.publishStatus ===
|
|
11128
|
-
console.log(
|
|
11127
|
+
if (props.publishStatus && props.publishStatus === 'processing') {
|
|
11128
|
+
console.log(' . --- Startando Verificacao Publicacao', props.trailId);
|
|
11129
11129
|
setTimeout(() => {
|
|
11130
11130
|
checkStatusPublish();
|
|
11131
11131
|
}, 5000);
|
|
@@ -11135,82 +11135,67 @@ function ContentCoursesTrails(props) {
|
|
|
11135
11135
|
setChecked(checkedValue);
|
|
11136
11136
|
props.handleChangeCheck(checkedValue);
|
|
11137
11137
|
};
|
|
11138
|
-
const handleChangePrivate = (checkedValue) => {
|
|
11139
|
-
setCheckedPrivate(checkedValue);
|
|
11140
|
-
props.handleChangePrivate(!checkedValue);
|
|
11141
|
-
};
|
|
11142
11138
|
const changeSelect = () => {
|
|
11143
11139
|
setShow(!show);
|
|
11144
11140
|
};
|
|
11145
|
-
const handleClickActiveNameTrail = () => {
|
|
11146
|
-
if (active) {
|
|
11147
|
-
return setActive(false);
|
|
11148
|
-
}
|
|
11149
|
-
else {
|
|
11150
|
-
setActive(true);
|
|
11151
|
-
}
|
|
11152
|
-
};
|
|
11153
11141
|
const checkStatusPublish = async () => {
|
|
11154
11142
|
let publicacao = await props.handlePublicarCheck(props.trailId);
|
|
11155
11143
|
console.log(props.trailId, 'publicacao', publicacao);
|
|
11156
11144
|
setPublishing(publicacao);
|
|
11157
11145
|
if (publicacao) {
|
|
11158
|
-
if (publicacao ===
|
|
11146
|
+
if (publicacao === 'processing') {
|
|
11159
11147
|
setTimeout(() => {
|
|
11160
11148
|
checkStatusPublish();
|
|
11161
11149
|
}, 5000);
|
|
11162
11150
|
}
|
|
11163
11151
|
}
|
|
11164
11152
|
};
|
|
11165
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(ContainerHeader, { className:
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
}, onKeyPress: (event) => {
|
|
11171
|
-
if (event.key === 'Enter') {
|
|
11172
|
-
if (nameTrail) {
|
|
11173
|
-
setActive(false);
|
|
11174
|
-
props.handleChangeTrailName(nameTrail);
|
|
11175
|
-
}
|
|
11176
|
-
}
|
|
11177
|
-
} }), jsxRuntime.jsx(Button$5, { handleClick: async () => {
|
|
11178
|
-
setActive(false);
|
|
11179
|
-
}, label: "Cancelar", variant: 'link' }), jsxRuntime.jsx(Button$5, { handleClick: async () => {
|
|
11153
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(ContainerHeader, { className: 'opened', active: props.ativo, children: [jsxRuntime.jsx(ContentTrailName, { active: active, children: !active ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TypographyTrailName, { children: nameTrail }), jsxRuntime.jsx(Select, { onClick: changeSelect, children: show === true ? jsxRuntime.jsx(VectorUp, {}) : jsxRuntime.jsx(VectorDown, {}) })] })) : (jsxRuntime.jsxs(ContainerInputNameTrail, { children: [jsxRuntime.jsx("input", { placeholder: props.txtPlacerolderInputNameTrail ? props.txtPlacerolderInputNameTrail : 'Digite o nome da trilha', value: nameTrail, onChange: (e) => {
|
|
11154
|
+
setNameTrail(e.target.value);
|
|
11155
|
+
}, onKeyPress: (event) => {
|
|
11156
|
+
if (event.key === 'Enter') {
|
|
11157
|
+
if (nameTrail) {
|
|
11180
11158
|
setActive(false);
|
|
11181
11159
|
props.handleChangeTrailName(nameTrail);
|
|
11182
|
-
}
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
},
|
|
11201
|
-
|
|
11202
|
-
|
|
11160
|
+
}
|
|
11161
|
+
}
|
|
11162
|
+
} }), jsxRuntime.jsx(Button$5, { handleClick: async () => {
|
|
11163
|
+
setActive(false);
|
|
11164
|
+
}, label: 'Cancelar', variant: "link" }), jsxRuntime.jsx(Button$5, { handleClick: async () => {
|
|
11165
|
+
setActive(false);
|
|
11166
|
+
props.handleChangeTrailName(nameTrail);
|
|
11167
|
+
}, label: 'Salvar', variant: "primary" })] })) }), props.showButtonActive && (jsxRuntime.jsxs(ContentActiveHeader, { children: [!active && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(TypographyActiveHeader, { active: props.ativo, style: { fontWeight: props.ativo ? 700 : 400 }, children: [props.txtAtivarTrilha ? props.txtAtivarTrilha : 'Ativar trilha', jsxRuntime.jsx(Switch__default["default"], { onChange: handleChange, checked: props.ativo, height: 16, width: 40, checkedIcon: false, uncheckedIcon: false, handleDiameter: 24, onHandleColor: "#ffffff", offHandleColor: "#ffffff", onColor: "#FF4D0D", offColor: "#757575", activeBoxShadow: props.ativo ? '0 0 2px 2px #FF4D0D' : '0 0 2px 2px #757575', boxShadow: props.ativo ? '0 0 2px 2px #FF4D0D' : '0 0 2px 2px #757575' })] }) })), jsxRuntime.jsxs(TypographyActiveHeader, { active: props.ativo, style: { fontWeight: props.ativo ? 700 : 400 }, children: [jsxRuntime.jsx(Button$5, { id: `btnPublish${props.id}`, handleMount: (element) => {
|
|
11168
|
+
let el = document.getElementById(element);
|
|
11169
|
+
setElementPopoverPublish(el ? el : null);
|
|
11170
|
+
}, handleClick: async () => {
|
|
11171
|
+
setPublishing('processing');
|
|
11172
|
+
await props.handlePublicarTrilha(props);
|
|
11173
|
+
checkStatusPublish();
|
|
11174
|
+
}, startIcon: Publishing === 'processing' && (jsxRuntime.jsx(Loading, { sizeLoading: "small", loadColor: "#a5a5a5", style: { width: 40 } })), label: Publishing === 'pending' ? 'Publicar' : Publishing === 'complete' ? 'Publicado' : 'Publicando...', variant: "secondary", disabled: Publishing === 'pending' ? false : true }), jsxRuntime.jsx(core.Popper, { id: Publishing === 'pending' ? `btnPublishPopper${props.id}` : undefined, open: OpenPopper, anchorEl: ElementPopoverPublish ? ElementPopoverPublish : null, placement: 'top', className: classes.popper, transition: true, modifiers: {
|
|
11175
|
+
preventOverflow: {
|
|
11176
|
+
enabled: true,
|
|
11177
|
+
boundariesElement: 'window'
|
|
11178
|
+
},
|
|
11179
|
+
arrow: {
|
|
11180
|
+
enabled: true,
|
|
11181
|
+
element: arrowRef
|
|
11182
|
+
}
|
|
11183
|
+
}, children: ({ TransitionProps }) => (jsxRuntime.jsx(core.Fade, { ...TransitionProps, timeout: 350, children: jsxRuntime.jsx(core.Paper, { children: jsxRuntime.jsx(core.ClickAwayListener, { onClickAway: () => {
|
|
11184
|
+
setOpenPopper(false);
|
|
11185
|
+
}, children: jsxRuntime.jsxs(core.Paper, { className: classes.popoverRoot, children: [jsxRuntime.jsx("span", { className: classes.arrow, ref: setArrowRef }), jsxRuntime.jsx(core.Box, { className: classes.content, children: "Ap\u00F3s realizar todas as altera\u00E7\u00F5es na trilha, \u00E9 necess\u00E1rio clicar em publicar para que o conte\u00FAdo editado esteja dispon\u00EDvel" })] }) }) }) })) }, props)] }), jsxRuntime.jsx(IconVerticalHeader, { onClick: (element) => {
|
|
11186
|
+
setElementPopover(element.currentTarget);
|
|
11187
|
+
}, children: jsxRuntime.jsx("div", { style: { marginRight: 8 }, children: jsxRuntime.jsx(MoreVertical, { fill: props.ativo ? '#000000' : '#bdbdbd' }) }) })] })), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(PopOver, { element: ElementPopover, onClosePopover: () => {
|
|
11203
11188
|
setElementPopover(null);
|
|
11204
|
-
}, variant: 'upRight', children: jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column', padding: 0 }, children: [jsxRuntime.jsx(PopOverItem, { label: props.txtTrailsPopOverEdit ? props.txtTrailsPopOverEdit :
|
|
11205
|
-
|
|
11206
|
-
handleClickActiveNameTrail()
|
|
11189
|
+
}, variant: 'upRight', children: jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column', padding: 0 }, children: [jsxRuntime.jsx(PopOverItem, { label: props.txtTrailsPopOverEdit ? props.txtTrailsPopOverEdit : 'Editar trilha', onClick: () => {
|
|
11190
|
+
props.handlePopOverTrailEdit(props.id);
|
|
11191
|
+
// handleClickActiveNameTrail()
|
|
11207
11192
|
setElementPopover(null);
|
|
11208
|
-
} }), jsxRuntime.jsx(PopOverItem, { label: props.txtTrailsPopOverDelete ? props.txtTrailsPopOverDelete :
|
|
11193
|
+
} }), jsxRuntime.jsx(PopOverItem, { label: props.txtTrailsPopOverDelete ? props.txtTrailsPopOverDelete : 'Excluir trilha', onClick: () => {
|
|
11209
11194
|
setElementPopover(null);
|
|
11210
11195
|
setTimeout(() => {
|
|
11211
11196
|
props.handlePopOverTrailDelete(props.id);
|
|
11212
11197
|
}, 500);
|
|
11213
|
-
}, icon: jsxRuntime.jsx(Trash, { fill:
|
|
11198
|
+
}, icon: jsxRuntime.jsx(Trash, { fill: "#C00F00" }), noBorder: true, isFontBold: true, color: '#C00F00' })] }) }) })] }), show && props.children] }));
|
|
11214
11199
|
}
|
|
11215
11200
|
|
|
11216
11201
|
function ContentCourses(data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/IJ/learningCycleCard/components/menu/index.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE;;;CAAA,eAiFnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuStyle.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"menuStyle.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/IJ/learningCycleCard/components/menu/menuStyle.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oEAuBxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentCoursesTrails.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/accordionTrack/contentCoursesTrails.tsx"],"names":[],"mappings":";AACA,OAAO,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"contentCoursesTrails.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/accordionTrack/contentCoursesTrails.tsx"],"names":[],"mappings":";AACA,OAAO,4BAA4B,CAAA;AA6FnC,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,GAAG,eAmRtD"}
|