Skip to content

Commit

Permalink
feat: add creatable select widget
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Dec 13, 2023
1 parent 88daac9 commit f0ae2d7
Show file tree
Hide file tree
Showing 12 changed files with 653 additions and 57 deletions.
31 changes: 29 additions & 2 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,42 @@ global.store = mockStore({
},
content: {
create: {},
data: {
'@id': 'http://localhost:3000/my-page',
},
subrequests: [],
},
connected_data_parameters: {},
connected_data_parameters: {
byContextPath: {},
},
});

const mockReactRouter = jest.requireActual('react-router');
const mockSemanticComponents = jest.requireActual('semantic-ui-react');
const mockComponents = jest.requireActual('@plone/volto/components');

jest.mock('react-router', () => {
return {
...mockReactRouter,
withRouter: (WrappedComponent) => {
return (props) => {
return (
<WrappedComponent
{...props}
location={{
pathname: '/path/to/content',
search: '',
hash: '',
state: null,
key: '5nvxpbdafa',
}}
/>
);
};
},
};
});

jest.mock('semantic-ui-react', () => ({
...mockSemanticComponents,
Popup: ({ content, trigger }) => {
Expand All @@ -32,7 +60,6 @@ jest.mock('semantic-ui-react', () => ({

jest.doMock('@plone/volto/components', () => {
return {
__esModule: true,
...mockComponents,
Toast: ({ children }) => <div className="toast">{children}</div>,
SidebarPortal: ({ children }) => <div id="sidebar">{children}</div>,
Expand Down
55 changes: 55 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,62 @@ msgstr ""
msgid "CSS height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Choices
msgid "Choices"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Close
msgid "Close"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Default
msgid "Default"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Description
msgid "Description"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No options
msgid "No options"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No value
msgid "No value"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Required
msgid "Required"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Select…
msgid "Select…"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Short Name
msgid "Short Name"
msgstr ""

#: Blocks/EmbedTableauVisualization/schema
# defaultMessage: Tableau height
msgid "Tableau height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Title
msgid "Title"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Used for programmatic access to the fieldset.
msgid "Used for programmatic access to the fieldset."
msgstr ""
55 changes: 55 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,62 @@ msgstr ""
msgid "CSS height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Choices
msgid "Choices"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Close
msgid "Close"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Default
msgid "Default"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Description
msgid "Description"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No options
msgid "No options"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No value
msgid "No value"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Required
msgid "Required"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Select…
msgid "Select…"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Short Name
msgid "Short Name"
msgstr ""

#: Blocks/EmbedTableauVisualization/schema
# defaultMessage: Tableau height
msgid "Tableau height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Title
msgid "Title"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Used for programmatic access to the fieldset.
msgid "Used for programmatic access to the fieldset."
msgstr ""
55 changes: 55 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,62 @@ msgstr ""
msgid "CSS height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Choices
msgid "Choices"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Close
msgid "Close"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Default
msgid "Default"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Description
msgid "Description"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No options
msgid "No options"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No value
msgid "No value"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Required
msgid "Required"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Select…
msgid "Select…"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Short Name
msgid "Short Name"
msgstr ""

#: Blocks/EmbedTableauVisualization/schema
# defaultMessage: Tableau height
msgid "Tableau height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Title
msgid "Title"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Used for programmatic access to the fieldset.
msgid "Used for programmatic access to the fieldset."
msgstr ""
55 changes: 55 additions & 0 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,62 @@ msgstr ""
msgid "CSS height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Choices
msgid "Choices"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Close
msgid "Close"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Default
msgid "Default"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Description
msgid "Description"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No options
msgid "No options"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No value
msgid "No value"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Required
msgid "Required"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Select…
msgid "Select…"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Short Name
msgid "Short Name"
msgstr ""

#: Blocks/EmbedTableauVisualization/schema
# defaultMessage: Tableau height
msgid "Tableau height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Title
msgid "Title"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Used for programmatic access to the fieldset.
msgid "Used for programmatic access to the fieldset."
msgstr ""
57 changes: 56 additions & 1 deletion locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2023-11-29T13:30:10.494Z\n"
"POT-Creation-Date: 2023-12-13T10:32:08.626Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
Expand All @@ -18,7 +18,62 @@ msgstr ""
msgid "CSS height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Choices
msgid "Choices"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Close
msgid "Close"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Default
msgid "Default"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Description
msgid "Description"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No options
msgid "No options"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: No value
msgid "No value"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Required
msgid "Required"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Select…
msgid "Select…"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Short Name
msgid "Short Name"
msgstr ""

#: Blocks/EmbedTableauVisualization/schema
# defaultMessage: Tableau height
msgid "Tableau height"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Title
msgid "Title"
msgstr ""

#: Widgets/CreatableSelectWidget
# defaultMessage: Used for programmatic access to the fieldset.
msgid "Used for programmatic access to the fieldset."
msgstr ""
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
"cypress:open": "make cypress-open",
"prepare": "husky install"
}
}
}
Loading

0 comments on commit f0ae2d7

Please sign in to comment.