- updated async tables;

- fixed typo;
- added some QOL;
This commit is contained in:
Vitalii Kiiko
2025-03-18 14:21:08 +01:00
parent 8a62213bad
commit 033994b759
19 changed files with 446 additions and 61 deletions

View File

@@ -74,6 +74,7 @@ const Fileupload = ({
}
const confirmDelete = (event, file) => {
console.log('confirmDelete', file)
confirmPopup({
target: event.currentTarget,
message: __('Sei sicuro di cancellare il file?', 'gepafin'),

View File

@@ -8,6 +8,7 @@ import { __ } from '@wordpress/i18n';
import { Editor } from 'primereact/editor';
import BlockingOverlay from '../../../BlockingOverlay';
import { Button } from 'primereact/button';
import { isNil } from 'ramda';
const Delta = Quill.import('delta');
@@ -53,15 +54,17 @@ const Wysiwyg = ({
<>
<BlockingOverlay shouldDisplay={disabled}/>
<label htmlFor={fieldName} className={classNames({ 'p-error': errors[fieldName] })}>
{label}{config.required || config.isRequired ? <span className="appForm__field--required">*</span> : null}
{label}{config.required || config.isRequired ?
<span className="appForm__field--required">*</span> : null}
</label>
<Button
label={__('Cancella testo', 'gepafin')}
type="button"
severity="warning"
outlined
onClick={handleCleanValue}
/>
{!isNil(setDataFn)
? <Button
label={__('Cancella testo', 'gepafin')}
type="button"
severity="warning"
outlined
onClick={handleCleanValue}
/> : null}
<Controller
name={fieldName}
control={control}
@@ -77,8 +80,8 @@ const Wysiwyg = ({
modules={{
clipboard: {
matchers: [
[ Node.ELEMENT_NODE, function(node, delta) {
const ops = delta.ops.map((op) => ({insert: op.insert}));
[Node.ELEMENT_NODE, function (node, delta) {
const ops = delta.ops.map((op) => ({ insert: op.insert }));
return new Delta(ops)
}]
]