Skip to content

Commit

Permalink
fix conflicts with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
tedw87 committed Sep 5, 2024
2 parents 8d295f7 + 3945a06 commit 801f4fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import React from 'react';
import { v4 as uuid } from 'uuid';
import { Icon } from '@plone/volto/components';
import { default as TokenWidgetEdit } from '@plone/volto/components/manage/Widgets/TokenWidget';
import SelectAutoCompleteWidget from '@plone/volto/components/manage/Widgets/SelectAutoComplete';
import { serializeNodesToText } from '@plone/volto-slate/editor/render';
import { nanoid } from '@plone/volto-slate/utils';

import InpageNavigation from '@eeacms/volto-eea-design-system/ui/InpageNavigation/InpageNavigation';
import CustomCSS from '@eeacms/volto-eea-website-theme/components/theme/CustomCSS/CustomCSS';
import DraftBackground from '@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground';
Expand All @@ -10,9 +18,6 @@ import { DateWidget } from '@eeacms/volto-eea-website-theme/components/theme/Wid
import { DatetimeWidget } from '@eeacms/volto-eea-website-theme/components/theme/Widgets/DatetimeWidget';
import CreatableSelectWidget from '@eeacms/volto-eea-website-theme/components/theme/Widgets/CreatableSelectWidget';

import { Icon } from '@plone/volto/components';
import { default as TokenWidgetEdit } from '@plone/volto/components/manage/Widgets/TokenWidget';
import { serializeNodesToText } from '@plone/volto-slate/editor/render';
import Tag from '@eeacms/volto-eea-design-system/ui/Tag/Tag';

import {
Expand All @@ -32,11 +37,8 @@ import okMiddleware from './middleware/ok';
import voltoCustomMiddleware from './middleware/voltoCustom';
import installSlate from './slate';
import { print } from './reducers';
import { nanoid } from '@plone/volto-slate/utils';
import { v4 as uuid } from 'uuid';

import * as eea from './config';
import React from 'react';

const restrictedBlocks = ['imagesGrid', 'teaser', 'dataFigure', 'plotly_chart'];

Expand Down Expand Up @@ -330,14 +332,18 @@ const applyConfig = (config) => {
if (config.blocks.blocksConfig.hero) {
config.blocks.blocksConfig.hero.copyrightPrefix = 'Image';
}
// Custom Widgets

config.widgets.id.other_organisations = TokenWidgetEdit;
config.widgets.views.widget.date = DateWidget;
// Custom Widgets
config.widgets.views.widget.datetime = DatetimeWidget;
config.widgets.views.widget.date = DateWidget;
config.widgets.views.id.topics = TopicsWidget;
config.widgets.views.id.subjects = TokenWidget;
config.widgets.views.widget.tags = TokenWidget;
config.widgets.widget.creatable_select = CreatableSelectWidget;
config.widgets.vocabulary['plone.app.vocabularies.Users'] =
SelectAutoCompleteWidget;

// /voltoCustom.css express-middleware
// /ok express-middleware - see also: https://github.com/plone/volto/pull/4432
if (__SERVER__) {
Expand Down
2 changes: 2 additions & 0 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ describe('applyConfig', () => {
},
widget: {},
id: {},
vocabulary: {},
},
settings: {
eea: {
Expand Down Expand Up @@ -247,6 +248,7 @@ describe('applyConfig', () => {
},
widget: {},
id: {},
vocabulary: {},
},
settings: {
eea: {},
Expand Down

0 comments on commit 801f4fc

Please sign in to comment.