Skip to content

Commit

Permalink
fixes upgrade issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Jul 13, 2023
1 parent cbfc92d commit e0efabf
Show file tree
Hide file tree
Showing 557 changed files with 11,572 additions and 23,497 deletions.
20,773 changes: 7,631 additions & 13,142 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "GPL-3.0",
"repository": "/~https://github.com/claroline/Claroline",
"engines": {
"node": ">=12",
"node": ">=18",
"npm": ">=8"
},
"scripts": {
Expand All @@ -20,45 +20,42 @@
"@babel/preset-react": "^7.10.1",
"@fortawesome/fontawesome-free": "^6",
"assets-webpack-plugin": "3.9.7",
"autoprefixer": "^8.5.0",
"autoprefixer": "^10.4.0",
"babel-loader": "^8.0.0",
"bootstrap": "5.3.0-alpha3",
"classnames": "^2.2.5",
"core-js": "^3.26.1",
"cssnano": "^4.1",
"d3": "^4.4.0",
"bootstrap": "^5.3.0",
"classnames": "^2.3.2",
"core-js": "^3.31.0",
"cssnano": "^6.0.1",
"d3": "^7.8.5",
"html-react-parser": "^0.9.1",
"html2pdf.js": "^0.9.1",
"invariant": "^2.2.4",
"jquery": "2.2.4",
"jsplumb": "^2.2.11",
"less": "^4.1",
"lodash": "^4.17.21",
"mathjax": "2.7.4",
"moment": "^2.24.0",
"pdfjs-dist": "^2.12",
"postcss-cli": "^2.5.0",
"prop-types": "^15.7.2",
"pdfjs-dist": "^3.8.162",
"postcss": "^8.4.24",
"prop-types": "^15.8.1",
"react": "^16.7.0",
"react-bootstrap": "^2.7",
"react-dnd": "^7.7.0",
"react-dnd-html5-backend": "^7.0.2",
"react-dnd-touch-backend": "^0.5.2",
"react-dom": "^16.7.0",
"react-helmet": "5.2.1",
"react-helmet": "^6.1.0",
"react-redux": "^7.0.3",
"react-router-dom": "^5.0.0",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"reselect": "^4.1.8",
"sass": "^1.62.1",
"shelljs": "^0.5.3",
"swagger-ui-react": "3.51.2",
"tinycolor2": "^1.4.1",
"swagger-ui-react": "^5.1.0",
"tinycolor2": "^1.6.0",
"tinymce": "^6.3",
"@tinymce/tinymce-react": "^4.2",
"uuid": "^9.0.0",
"video.js": "7.7.4",
"video.js": "^8.3.0",
"wavesurfer.js": "2.2.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
Expand All @@ -72,5 +69,6 @@
"eslint-plugin-react": "^7.21.5",
"redux-freeze": "^0.1.7",
"webpack-dev-server": "^4.11.1"
}
},
"browserslist": ["last 2 versions"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import {PropTypes as T} from 'prop-types'
import {schemeCategory20c} from 'd3-scale'
import {schemeCategory20c} from '#/main/theme/color/utils'

import {trans} from '#/main/app/intl/translation'
import {ContentCounter} from '#/main/app/content/components/counter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const BBBServers = (props) =>
<TableRow key={i}>
<TableCell>
{server.disabled &&
<span className="label label-danger">{trans('disabled')}</span>
<span className="badge rounded-pill text-bg-danger">{trans('disabled')}</span>
}

{!server.disabled && server.limit && server.participants >= server.limit &&
<span className="label label-warning">{trans('full')}</span>
<span className="badge rounded-pill text-bg-warning">{trans('full')}</span>
}

{!server.disabled && (!server.limit || server.participants < server.limit) &&
<span className="label label-success">{trans('available')}</span>
<span className="badge rounded-pill text-bg-success">{trans('available')}</span>
}
</TableCell>
<TableCell>{server.url}</TableCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class Player extends Component {

<Button
type={CALLBACK_BUTTON}
className="btn btn-block btn-emphasis component-container"
className="w-100 btn-emphasis mb-3"
variant="btn"
label={trans('join', {}, 'bbb')}
callback={() => this.openTab()}
disabled={!this.state.ready}
Expand All @@ -112,7 +113,8 @@ class Player extends Component {
{(this.isClosed() || !isEmpty(this.props.joinStatus)) && this.props.allowRecords && this.props.bbb.record && get(this.props.lastRecording, 'media.presentation') && this.props.bbb.newTab &&
<Button
type={URL_BUTTON}
className="btn btn-block btn-emphasis"
className="w-100 btn-emphasis"
variant="btn"
label={trans('show-last-record', {}, 'actions')}
target={this.props.lastRecording.media.presentation}
primary={true}
Expand All @@ -123,7 +125,8 @@ class Player extends Component {
{this.props.bbb.newTab && this.props.allowRecords && this.props.bbb.record && !isEmpty(this.props.lastRecording) &&
<Button
type={LINK_BUTTON}
className="btn btn-block"
className="w-100"
variant="btn"
label={trans('show-records', {}, 'actions')}
target={`${this.props.path}/records`}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "/src/main/app/Resources/styles/variables";
@import "src/main/app/Resources/styles/variables";

.youtube-player-container {
& > iframe#youtube-player {
Expand Down
2 changes: 1 addition & 1 deletion src/integration/youtube/assets.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"styles": {
"entry": {
"youtube": "youtube.less"
"youtube": "youtube.scss"
}
}
}
5 changes: 3 additions & 2 deletions src/main/app/Entity/Meta/Creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ trait Creator
* The user who created the entity.
*
* @ORM\ManyToOne(targetEntity="Claroline\CoreBundle\Entity\User")
*
* @ORM\JoinColumn(onDelete="SET NULL")
*/
protected ?User $creator;
protected ?User $creator = null;

/**
* Returns the entity creator.
Expand All @@ -26,7 +27,7 @@ public function getCreator(): ?User
/**
* Sets the entity creator.
*/
public function setCreator(?User $creator = null): void
public function setCreator(User $creator = null): void
{
$this->creator = $creator;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ButtonComponent = forwardRef((props, ref) => {
props.hideLabel ? <span key="button-label" className="action-label sr-only">{props.label}</span> : props.label,
props.children,
props.subscript &&
<span key="button-subscript" className={classes('action-subscript', `${props.subscript.type} ${props.subscript.type}-${props.subscript.status || 'primary'}`)}>{props.subscript.value}</span>
<span key="button-subscript" className={classes('action-subscript badge rounded-pill', `text-bg-${props.subscript.status || 'primary'}`)}>{props.subscript.value}</span>
])
})

Expand Down
15 changes: 8 additions & 7 deletions src/main/app/Resources/modules/action/components/toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {buildToolbar} from '#/main/app/action/utils'
/**
* Creates a toolbar of actions.
*/
const StaticToolbar = props => {
const StaticToolbar = (props) => {
const toolbar = buildToolbar(props.toolbar, props.actions, props.scope)

return (0 !== toolbar.length &&
Expand All @@ -26,17 +26,18 @@ const StaticToolbar = props => {
0 !== groupIndex &&
<span
key={`separator-${groupIndex}`}
className={`${props.className}-separator`}
className={`${props.name || props.className}-separator`}
/>,
...group.map((action) =>
<Button
{...omit(action, 'name', 'className')}
id={`${props.id || props.name || ''}${action.id || action.name}`}
key={action.id || action.name}
disabled={props.disabled || action.disabled}
className={classes(`${props.name || props.className}-btn`, props.buttonName, action.className)}
className={classes(props.name ? `${props.name}-btn` : null, props.buttonName, action.className)}
tooltip={undefined !== action.tooltip ? action.tooltip : props.tooltip}
size={props.size}
size={action.size || props.size}
variant={props.variant}
onClick={action.onClick ? () => {
action.onClick()
if (props.onClick) {
Expand All @@ -59,12 +60,12 @@ implementPropTypes(StaticToolbar, ToolbarTypes, {
actions: []
})

const PromisedToolbar = props =>
const PromisedToolbar = (props) =>
<Await
for={props.actions}
placeholder={
<div className={props.className}>
<span className={classes(`${props.className}-btn`, props.buttonName, 'default')}>
<span className={classes(props.name ? `${props.name}-btn` : null, props.buttonName, 'default')}>
<span className="fa fa-fw fa-spinner fa-spin" />
</span>
</div>
Expand All @@ -81,7 +82,7 @@ implementPropTypes(PromisedToolbar, ToolbarTypes, {
)
})

const Toolbar = props => props.actions instanceof Promise ?
const Toolbar = (props) => props.actions instanceof Promise ?
<PromisedToolbar {...props} /> :
<StaticToolbar {...props} />

Expand Down
2 changes: 1 addition & 1 deletion src/main/app/Resources/modules/action/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function createActionDefinition(action) {
question: action.confirm.message,
dangerous: action.dangerous,

// forward original action to the confirm modal
// forward original action to the confirmation modal
confirmAction: Object.assign({}, omit(action, 'confirm'), {
id: actionDef.id ? `${actionDef.id}-confirm` : undefined,
label: action.confirm.button || action.label
Expand Down
43 changes: 43 additions & 0 deletions src/main/app/Resources/modules/buttons/async/components/button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, {forwardRef} from 'react'
import {useDispatch} from 'react-redux'
import omit from 'lodash/omit'

import {PropTypes as T, implementPropTypes} from '#/main/app/prop-types'
import {constants as apiConst} from '#/main/app/api/constants'
import {ApiRequest as ApiRequestTypes} from '#/main/app/api/prop-types'
import {Button as ButtonTypes} from '#/main/app/buttons/prop-types'

import {CallbackButton} from '#/main/app/buttons/callback/components/button'

/**
* Async button.
* Renders a component that will trigger an async call on click.
*/
const AsyncButton = forwardRef((props, ref) => {
const dispatch = useDispatch()

return (
<CallbackButton
{...omit(props, 'request')}
ref={ref}
callback={() => dispatch({
[apiConst.API_REQUEST]: props.request
})}
>
{props.children}
</CallbackButton>
)
})

// for debug purpose, otherwise component is named after the HOC
AsyncButton.displayName = 'AsyncButton'

implementPropTypes(AsyncButton, ButtonTypes, {
request: T.shape(
ApiRequestTypes.propTypes
).isRequired
})

export {
AsyncButton
}
52 changes: 0 additions & 52 deletions src/main/app/Resources/modules/buttons/async/containers/button.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/app/Resources/modules/buttons/async/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import {registry} from '#/main/app/buttons/registry'

// gets the button component
import {AsyncButton} from '#/main/app/buttons/async/containers/button'
import {AsyncButton} from '#/main/app/buttons/async/components/button'

const ASYNC_BUTTON = 'async'

Expand Down
Loading

0 comments on commit e0efabf

Please sign in to comment.