@plone/volto 15.0.0-alpha.0 → 15.0.0-alpha.11

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.
Files changed (236) hide show
  1. package/.eslintrc +1 -1
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +7 -6
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -1
  4. package/.github/workflows/{core-sandbox.yml → coresandbox.yml} +1 -1
  5. package/.github/workflows/docs.yml +15 -55
  6. package/.storybook/main.js +3 -9
  7. package/CHANGELOG.md +140 -2
  8. package/CODE_OF_CONDUCT.md +0 -1
  9. package/COMMITLINT.md +19 -21
  10. package/README.md +2 -1
  11. package/SECURITY.md +0 -1
  12. package/addon-registry.js +20 -12
  13. package/create-addons-loader.js +1 -1
  14. package/cypress/support/commands.js +3 -1
  15. package/dist/assets.json +1 -0
  16. package/dist/chunks.json +571 -0
  17. package/dist/loadable-stats.json +2070 -0
  18. package/dist/public/android-chrome-192x192.png +0 -0
  19. package/dist/public/android-chrome-512x512.png +0 -0
  20. package/dist/public/apple-touch-icon.png +0 -0
  21. package/dist/public/favicon-16x16.png +0 -0
  22. package/dist/public/favicon-32x32.png +0 -0
  23. package/dist/public/favicon.ico +0 -0
  24. package/dist/public/icon.svg +13 -0
  25. package/dist/public/index.html.spa +34 -0
  26. package/dist/public/robots.txt +2 -0
  27. package/dist/public/site.webmanifest +19 -0
  28. package/dist/public/static/css/14.803b450c.chunk.css +409 -0
  29. package/dist/public/static/css/3.a3490306.chunk.css +2 -0
  30. package/dist/public/static/css/client.0ead607b.chunk.css +8 -0
  31. package/dist/public/static/css/plone-volto-components-manage-Widgets-DatetimeWidget.77a7ad0d.chunk.css +2 -0
  32. package/dist/public/static/js/0.3e794c57.chunk.js +2 -0
  33. package/dist/public/static/js/1.fece2b93.chunk.js +3 -0
  34. package/dist/public/static/js/1.fece2b93.chunk.js.LICENSE.txt +8 -0
  35. package/dist/public/static/js/14.803b450c.chunk.js +3 -0
  36. package/dist/public/static/js/14.803b450c.chunk.js.LICENSE.txt +146 -0
  37. package/dist/public/static/js/15.c1eb25b4.chunk.js +3 -0
  38. package/dist/public/static/js/15.c1eb25b4.chunk.js.LICENSE.txt +8 -0
  39. package/dist/public/static/js/16.70e24cba.chunk.js +2 -0
  40. package/dist/public/static/js/17.f03d2a82.chunk.js +2 -0
  41. package/dist/public/static/js/18.0f0b1dfa.chunk.js +2 -0
  42. package/dist/public/static/js/19.61ef8815.chunk.js +3 -0
  43. package/dist/public/static/js/19.61ef8815.chunk.js.LICENSE.txt +8 -0
  44. package/dist/public/static/js/20.6b37f925.chunk.js +2 -0
  45. package/dist/public/static/js/21.8704b265.chunk.js +2 -0
  46. package/dist/public/static/js/22.5a2b56ff.chunk.js +2 -0
  47. package/dist/public/static/js/23.a53c8d7b.chunk.js +2 -0
  48. package/dist/public/static/js/24.d44c620a.chunk.js +2 -0
  49. package/dist/public/static/js/25.3129d6c8.chunk.js +2 -0
  50. package/dist/public/static/js/26.9dfad319.chunk.js +2 -0
  51. package/dist/public/static/js/27.efbb318a.chunk.js +2 -0
  52. package/dist/public/static/js/28.b4840d60.chunk.js +2 -0
  53. package/dist/public/static/js/29.690d4b54.chunk.js +2 -0
  54. package/dist/public/static/js/3.a3490306.chunk.js +2 -0
  55. package/dist/public/static/js/30.5f174f94.chunk.js +2 -0
  56. package/dist/public/static/js/31.4a7cf109.chunk.js +2 -0
  57. package/dist/public/static/js/32.2247dcf7.chunk.js +2 -0
  58. package/dist/public/static/js/33.87874f33.chunk.js +2 -0
  59. package/dist/public/static/js/34.aec37d56.chunk.js +3 -0
  60. package/dist/public/static/js/34.aec37d56.chunk.js.LICENSE.txt +37 -0
  61. package/dist/public/static/js/35.73887e02.chunk.js +3 -0
  62. package/dist/public/static/js/35.73887e02.chunk.js.LICENSE.txt +7 -0
  63. package/dist/public/static/js/36.19d2e05a.chunk.js +3 -0
  64. package/dist/public/static/js/36.19d2e05a.chunk.js.LICENSE.txt +14 -0
  65. package/dist/public/static/js/37.96925a5f.chunk.js +3 -0
  66. package/dist/public/static/js/37.96925a5f.chunk.js.LICENSE.txt +8 -0
  67. package/dist/public/static/js/38.701a2e85.chunk.js +2 -0
  68. package/dist/public/static/js/39.4cbf0549.chunk.js +2 -0
  69. package/dist/public/static/js/4.bdc4a5c5.chunk.js +2 -0
  70. package/dist/public/static/js/6.69ba4792.chunk.js +2 -0
  71. package/dist/public/static/js/client.0ead607b.chunk.js +2 -0
  72. package/dist/public/static/js/draft-js-lib-isSoftNewlineEvent.ad4b1307.chunk.js +2 -0
  73. package/dist/public/static/js/moment.dfd83abb.chunk.js +2 -0
  74. package/dist/public/static/js/plone-volto-components-manage-Widgets-DatetimeWidget.77a7ad0d.chunk.js +2 -0
  75. package/dist/public/static/js/plone-volto-components-theme-View-EventView.c500936a.chunk.js +2 -0
  76. package/dist/public/static/js/react-dates.d94a34ee.chunk.js +2 -0
  77. package/dist/public/static/js/react-select.43f17559.chunk.js +2 -0
  78. package/dist/public/static/js/react-simple-code-editor.484ec69f.chunk.js +2 -0
  79. package/dist/public/static/js/runtime~client.c0921d19.js +2 -0
  80. package/dist/public/static/media/Logo.16e25cdf.svg +21 -0
  81. package/dist/public/static/media/block-image.8a4a14d5.svg +8 -0
  82. package/dist/public/static/media/block-maps.731e84f6.svg +7 -0
  83. package/dist/public/static/media/block-video.832fa3ff.svg +7 -0
  84. package/dist/public/static/media/default-image.9451b251.svg +13 -0
  85. package/dist/public/static/media/flags.9c74e172.png +0 -0
  86. package/dist/public/static/media/icons.022583c4.svg +320 -0
  87. package/dist/public/static/media/icons.06400145.ttf +0 -0
  88. package/dist/public/static/media/icons.dbc1ef8b.eot +0 -0
  89. package/dist/public/static/media/icons.df45b7de.woff +0 -0
  90. package/dist/server.js +2 -0
  91. package/docker-compose.yml +15 -10
  92. package/locales/ca/LC_MESSAGES/volto.po +33 -9
  93. package/locales/ca.json +1 -1
  94. package/locales/de/LC_MESSAGES/volto.po +33 -9
  95. package/locales/de.json +1 -1
  96. package/locales/en/LC_MESSAGES/volto.po +33 -9
  97. package/locales/en.json +1 -1
  98. package/locales/es/LC_MESSAGES/volto.po +33 -9
  99. package/locales/es.json +1 -1
  100. package/locales/eu/LC_MESSAGES/volto.po +33 -9
  101. package/locales/eu.json +1 -1
  102. package/locales/fr/LC_MESSAGES/volto.po +33 -9
  103. package/locales/fr.json +1 -1
  104. package/locales/it/LC_MESSAGES/volto.po +33 -9
  105. package/locales/it.json +1 -1
  106. package/locales/ja/LC_MESSAGES/volto.po +33 -9
  107. package/locales/ja.json +1 -1
  108. package/locales/nl/LC_MESSAGES/volto.po +33 -9
  109. package/locales/nl.json +1 -1
  110. package/locales/pt/LC_MESSAGES/volto.po +33 -9
  111. package/locales/pt.json +1 -1
  112. package/locales/pt_BR/LC_MESSAGES/volto.po +33 -9
  113. package/locales/pt_BR.json +1 -1
  114. package/locales/ro/LC_MESSAGES/volto.po +33 -9
  115. package/locales/ro.json +1 -1
  116. package/locales/volto.pot +34 -10
  117. package/logos/Logo.png +0 -0
  118. package/logos/volto-colorful.png +0 -0
  119. package/logos/volto-colorful.svg +35 -0
  120. package/logos/volto-guide.png +0 -0
  121. package/logos/volto-h-transparent.svg +6 -0
  122. package/logos/volto-transparent.png +0 -0
  123. package/logos/volto-transparent.svg +19 -0
  124. package/logos/volto-transparent2.svg +5 -0
  125. package/logos/volto-yellow.svg +29 -0
  126. package/logos/volto.sketch +0 -0
  127. package/netlify.toml +2 -0
  128. package/package.json +22 -12
  129. package/pyvenv.cfg +3 -0
  130. package/razzle.config.js +17 -13
  131. package/src/actions/language/language.js +23 -11
  132. package/src/actions/lazyLibraries/lazyLibraries.js +8 -4
  133. package/src/components/index.js +2 -0
  134. package/src/components/manage/Add/Add.jsx +1 -1
  135. package/src/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +1 -2
  136. package/src/components/manage/AnchorPlugin/components/LinkButton/index.jsx +15 -6
  137. package/src/components/manage/AnchorPlugin/index.jsx +12 -5
  138. package/src/components/manage/AnchorPlugin/utils/EditorUtils.js +8 -7
  139. package/src/components/manage/Blocks/Description/Edit.jsx +33 -19
  140. package/src/components/manage/Blocks/Description/Edit.test.jsx +6 -0
  141. package/src/components/manage/Blocks/HeroImageLeft/Edit.jsx +37 -26
  142. package/src/components/manage/Blocks/HeroImageLeft/Edit.test.jsx +6 -0
  143. package/src/components/manage/Blocks/Listing/View.jsx +1 -1
  144. package/src/components/manage/Blocks/Search/README.md +20 -0
  145. package/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx +16 -3
  146. package/src/components/manage/Blocks/Search/components/DateRangeFacet.jsx +120 -0
  147. package/src/components/manage/Blocks/Search/components/DateRangeFacet.test.jsx +34 -0
  148. package/src/components/manage/Blocks/Search/components/DateRangeFacetFilterListEntry.jsx +39 -0
  149. package/src/components/manage/Blocks/Search/components/Facets.jsx +24 -25
  150. package/src/components/manage/Blocks/Search/components/FilterList.jsx +37 -67
  151. package/src/components/manage/Blocks/Search/components/FilterList.test.jsx +49 -1
  152. package/src/components/manage/Blocks/Search/components/SelectFacet.jsx +9 -0
  153. package/src/components/manage/Blocks/Search/components/SelectFacetFilterListEntry.jsx +42 -0
  154. package/src/components/manage/Blocks/Search/components/SelectStyling.jsx +1 -1
  155. package/src/components/manage/Blocks/Search/components/ToggleFacet.jsx +38 -0
  156. package/src/components/manage/Blocks/Search/components/ToggleFacetFilterListEntry.jsx +39 -0
  157. package/src/components/manage/Blocks/Search/components/base.js +52 -0
  158. package/src/components/manage/Blocks/Search/components/index.js +5 -0
  159. package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +68 -27
  160. package/src/components/manage/Blocks/Search/schema.js +7 -4
  161. package/src/components/manage/Blocks/Search/utils.js +16 -0
  162. package/src/components/manage/Blocks/Table/Cell.jsx +40 -14
  163. package/src/components/manage/Blocks/Table/Cell.test.jsx +7 -1
  164. package/src/components/manage/Blocks/Table/Edit.jsx +7 -3
  165. package/src/components/manage/Blocks/Table/Edit.test.jsx +6 -0
  166. package/src/components/manage/Blocks/Table/View.jsx +2 -2
  167. package/src/components/manage/Blocks/Text/Edit.jsx +56 -14
  168. package/src/components/manage/Blocks/Text/Edit.test.jsx +7 -1
  169. package/src/components/manage/Blocks/Text/View.jsx +2 -2
  170. package/src/components/manage/Blocks/Title/Edit.jsx +25 -13
  171. package/src/components/manage/Blocks/Title/Edit.test.jsx +6 -0
  172. package/src/components/manage/Contents/ContentsIndexHeader.test.jsx +2 -1
  173. package/src/components/manage/Contents/ContentsUploadModal.jsx +3 -1
  174. package/src/components/manage/Multilingual/CreateTranslation.jsx +1 -1
  175. package/src/components/manage/Multilingual/TranslationObject.jsx +1 -1
  176. package/src/components/manage/Pluggable/index.js +1 -1
  177. package/src/components/manage/Preferences/PersonalPreferences.jsx +1 -1
  178. package/src/components/manage/Sidebar/Sidebar.jsx +5 -1
  179. package/src/components/manage/Toolbar/Toolbar.jsx +3 -1
  180. package/src/components/manage/UniversalLink/UniversalLink.jsx +5 -2
  181. package/src/components/manage/Widgets/DatetimeWidget.jsx +3 -1
  182. package/src/components/manage/Widgets/IdWidget.jsx +234 -0
  183. package/src/components/manage/Widgets/IdWidget.stories.jsx +21 -0
  184. package/src/components/manage/Widgets/IdWidget.test.jsx +135 -0
  185. package/src/components/manage/Widgets/SelectAutoComplete.jsx +2 -2
  186. package/src/components/manage/Widgets/UrlWidget.jsx +1 -1
  187. package/src/components/manage/Widgets/WysiwygWidget.jsx +45 -19
  188. package/src/components/manage/Widgets/WysiwygWidget.test.jsx +7 -1
  189. package/src/components/theme/ContactForm/ContactForm.jsx +1 -1
  190. package/src/components/theme/EventDetails/EventDetails.jsx +140 -0
  191. package/src/components/theme/EventDetails/EventDetails.test.jsx +87 -0
  192. package/src/components/theme/LanguageSelector/LanguageSelector.js +2 -18
  193. package/src/components/theme/Login/Login.jsx +3 -1
  194. package/src/components/theme/MultilingualRedirector/MultilingualRedirector.jsx +10 -31
  195. package/src/components/theme/View/EventView.jsx +62 -140
  196. package/src/components/theme/View/LinkView.jsx +3 -3
  197. package/src/components/theme/View/NewsItemView.jsx +44 -35
  198. package/src/components/theme/View/View.jsx +5 -1
  199. package/src/config/Blocks.jsx +31 -0
  200. package/src/config/Loadables.jsx +22 -0
  201. package/src/config/RichTextEditor/Blocks.jsx +25 -20
  202. package/src/config/RichTextEditor/Plugins.jsx +38 -31
  203. package/src/config/RichTextEditor/Styles.jsx +48 -44
  204. package/src/config/RichTextEditor/index.js +25 -0
  205. package/src/config/Widgets.jsx +2 -0
  206. package/src/config/index.js +15 -18
  207. package/src/helpers/Api/Api.js +20 -4
  208. package/src/helpers/Extensions/index.js +1 -1
  209. package/src/helpers/Extensions/withBlockExtensions.js +4 -0
  210. package/src/helpers/Extensions/withBlockExtensions.test.js +26 -1
  211. package/src/helpers/Url/Url.js +41 -1
  212. package/src/helpers/Url/Url.test.js +7 -0
  213. package/src/helpers/Url/urlRegex.js +7 -1
  214. package/src/helpers/index.js +3 -0
  215. package/src/middleware/api.js +35 -3
  216. package/src/server.jsx +20 -6
  217. package/src/start-client.jsx +2 -2
  218. package/src/store.js +1 -1
  219. package/test-setup-config.js +22 -7
  220. package/theme/themes/pastanaga/extras/blocks.less +29 -0
  221. package/theme/themes/pastanaga/extras/contents.less +6 -0
  222. package/{webpack-bundle-analyze-plugin.js → webpack-plugins/webpack-bundle-analyze-plugin.js} +0 -0
  223. package/{webpack-less-plugin.js → webpack-plugins/webpack-less-plugin.js} +0 -0
  224. package/{webpack-relative-resolver.js → webpack-plugins/webpack-relative-resolver.js} +0 -0
  225. package/{webpack-root-resolver.js → webpack-plugins/webpack-root-resolver.js} +0 -0
  226. package/{webpack-sentry-plugin.js → webpack-plugins/webpack-sentry-plugin.js} +0 -0
  227. package/{webpack-svg-plugin.js → webpack-plugins/webpack-svg-plugin.js} +0 -0
  228. package/.surgeignore +0 -2
  229. package/Dockerfile.slim +0 -27
  230. package/patches/fixprettier.patch +0 -11
  231. package/patches/fixstylelint.patch +0 -11
  232. package/src/components/manage/AnchorPlugin/utils/URLUtils.js +0 -36
  233. package/src/components/manage/AnchorPlugin/utils/mailRegex.js +0 -2
  234. package/src/components/manage/AnchorPlugin/utils/telRegex.js +0 -1
  235. package/src/components/manage/AnchorPlugin/utils/urlRegex.js +0 -54
  236. package/styleguide.config.js +0 -42
@@ -18,11 +18,30 @@ import {
18
18
  blockStyleFn,
19
19
  listBlockTypes,
20
20
  } from '@plone/volto/config/RichTextEditor/Blocks';
21
+ import FromHTMLCustomBlockFn from '@plone/volto/config/RichTextEditor/FromHTML';
21
22
  import { contentIcons } from '@plone/volto/config/ContentIcons';
22
23
 
23
- import FromHTMLCustomBlockFn from '@plone/volto/config/RichTextEditor/FromHTML';
24
24
  import { controlPanelsIcons } from '@plone/volto/config/ControlPanels';
25
25
 
26
+ // we need to do a redefinition here because of circular import issues
27
+ // because draftjs-based components are not really tested, this is basically
28
+ // dummy code.
29
+ const richtextEditorSettings = (props) => {
30
+ return {
31
+ extendedBlockRenderMap,
32
+ blockStyleFn,
33
+ listBlockTypes,
34
+ FromHTMLCustomBlockFn,
35
+ // richTextEditorPlugins: plugins,
36
+ // richTextEditorInlineToolbarButtons: inlineToolbarButtons,
37
+ };
38
+ };
39
+
40
+ const richtextViewSettings = {
41
+ ToHTMLRenderers,
42
+ ToHTMLOptions,
43
+ };
44
+
26
45
  config.set('settings', {
27
46
  apiPath: 'http://localhost:8080/Plone',
28
47
  defaultLanguage: 'en',
@@ -30,12 +49,8 @@ config.set('settings', {
30
49
  defaultPageSize: 25,
31
50
  isMultilingual: false,
32
51
  nonContentRoutes,
33
- extendedBlockRenderMap,
34
- blockStyleFn,
35
- listBlockTypes,
36
- FromHTMLCustomBlockFn,
37
- ToHTMLRenderers,
38
- ToHTMLOptions,
52
+ richtextEditorSettings,
53
+ richtextViewSettings,
39
54
  contentIcons: contentIcons,
40
55
  loadables,
41
56
  lazyBundles: {
@@ -1057,4 +1057,33 @@ body.has-toolbar.has-sidebar-collapsed .ui.wrapper > .ui.inner.block.full {
1057
1057
  height: 28px !important;
1058
1058
  }
1059
1059
  }
1060
+
1061
+ .daterange-facet {
1062
+ .ui.date-input input {
1063
+ height: auto;
1064
+ }
1065
+
1066
+ .ui-button {
1067
+ margin: 0;
1068
+ }
1069
+
1070
+ .DateInput {
1071
+ width: 40%;
1072
+ min-width: 75px;
1073
+ }
1074
+
1075
+ .DateRangePickerInput_arrow_svg {
1076
+ margin: 0 6px;
1077
+ }
1078
+
1079
+ .DateRangePicker_picker {
1080
+ z-index: 10;
1081
+ }
1082
+
1083
+ .radio {
1084
+ display: flex;
1085
+ min-height: 37px;
1086
+ align-items: center;
1087
+ }
1088
+ }
1060
1089
  }
@@ -167,3 +167,9 @@
167
167
  word-break: break-all;
168
168
  }
169
169
  }
170
+
171
+ .contenttype-event {
172
+ h1.documentFirstHeading {
173
+ display: flex;
174
+ }
175
+ }
package/.surgeignore DELETED
@@ -1,2 +0,0 @@
1
- *
2
- !cypress/videos
package/Dockerfile.slim DELETED
@@ -1,27 +0,0 @@
1
- FROM node:12-stretch-slim
2
-
3
- RUN runDeps="openssl ca-certificates patch" \
4
- && apt-get update \
5
- && apt-get install -y --no-install-recommends $runDeps \
6
- && apt-get clean \
7
- && rm -rf /var/lib/apt/lists/*
8
-
9
- RUN mkdir -p /opt/frontend \
10
- && chown -R node /opt/frontend
11
-
12
- WORKDIR /opt/frontend/
13
- RUN npm install -g yo @plone/generator-volto wait-on
14
-
15
- USER node
16
- RUN yo --no-insight @plone/volto --no-interactive
17
-
18
- RUN RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn \
19
- && RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn build \
20
- && rm -rf /home/node/.cache
21
-
22
- COPY entrypoint.sh /
23
-
24
- EXPOSE 3000 3001 4000 4001
25
-
26
- ENTRYPOINT ["/entrypoint.sh"]
27
- CMD ["yarn", "start:prod"]
@@ -1,11 +0,0 @@
1
- --- node_modules/prettier/index.js 2019-11-14 20:05:13.844000000 +0100
2
- +++ index-patched.js 2019-11-15 23:35:37.326000000 +0100
3
- @@ -37420,7 +37420,7 @@
4
- var type$9 = "markup";
5
- var group$8 = "CSS";
6
- var extensions$9 = [
7
- - ".less"
8
- + ".less", "overrides"
9
- ];
10
- var tmScope$9 = "source.css.less";
11
- var aceMode$9 = "less";
@@ -1,11 +0,0 @@
1
- --- /Users/sneridagh/Development/plone/volto/node_modules/stylelint/lib/getPostcssResult.js 2019-11-14 20:05:13.849000000 +0100
2
- +++ getPostcssResult-patched.js 2019-11-16 14:27:19.985147119 +0100
3
- @@ -80,6 +80,8 @@
4
- }
5
-
6
- syntax = dynamicRequire(syntax);
7
- + } else if (options.filePath && /\.(overrides)$/.test(options.filePath)) {
8
- + syntax = dynamicRequire('postcss-less');
9
- } else if (
10
- !(options.codeProcessors && options.codeProcessors.length) ||
11
- (options.filePath && /\.(scss|sass|less)$/.test(options.filePath))
@@ -1,36 +0,0 @@
1
- import prependHttp from 'prepend-http';
2
- import urlRegex from './urlRegex';
3
- import mailRegex from './mailRegex';
4
- import telRegex from './telRegex';
5
-
6
- export default {
7
- isUrl(text) {
8
- return urlRegex().test(text);
9
- },
10
-
11
- isMail(text) {
12
- return mailRegex().test(text);
13
- },
14
-
15
- isTelephone(text) {
16
- return telRegex().test(text);
17
- },
18
-
19
- normaliseMail(email) {
20
- if (email.toLowerCase().startsWith('mailto:')) {
21
- return email;
22
- }
23
- return `mailto:${email}`;
24
- },
25
-
26
- normalizeTelephone(tel) {
27
- if (tel.toLowerCase().startsWith('tel:')) {
28
- return tel;
29
- }
30
- return `tel:${tel}`;
31
- },
32
-
33
- normalizeUrl(url) {
34
- return prependHttp(url);
35
- },
36
- };
@@ -1,2 +0,0 @@
1
- export default () =>
2
- /^((mailto:[^<>()/[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i;
@@ -1 +0,0 @@
1
- export default () => /^[tel:]*[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s./0-9]*$/g;
@@ -1,54 +0,0 @@
1
- /* eslint-disable arrow-body-style */
2
- /* eslint-disable no-confusing-arrow */
3
- import tlds from 'tlds';
4
-
5
- const v4 =
6
- '(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}';
7
- const v6seg = '[0-9a-fA-F]{1,4}';
8
- const v6 = `
9
- (
10
- (?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
11
- (?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
12
- (?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
13
- (?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
14
- (?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
15
- (?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
16
- (?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
17
- (?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
18
- )(%[0-9a-zA-Z]{1,})? // %eth0 %1
19
- `
20
- .replace(/\s*\/\/.*$/gm, '')
21
- .replace(/\n/g, '')
22
- .trim();
23
-
24
- const ipRegex = (opts) =>
25
- opts && opts.exact
26
- ? new RegExp(`(?:^${v4}$)|(?:^${v6}$)`)
27
- : new RegExp(`(?:${v4})|(?:${v6})`, 'g');
28
-
29
- ipRegex.v4 = (opts) =>
30
- opts && opts.exact ? new RegExp(`^${v4}$`) : new RegExp(v4, 'g');
31
- ipRegex.v6 = (opts) =>
32
- opts && opts.exact ? new RegExp(`^${v6}$`) : new RegExp(v6, 'g');
33
-
34
- export default (_opts) => {
35
- const opts = Object.assign({ strict: true }, _opts);
36
- const protocol = `(?:(?:[a-z]+:)?//)${opts.strict ? '' : '?'}`;
37
- const auth = '(?:\\S+(?::\\S*)?@)?';
38
- const ip = ipRegex.v4().source;
39
- const host = '(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)';
40
- const domain =
41
- '(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*';
42
- const tld = `(?:\\.${
43
- opts.strict
44
- ? '(?:[a-z\\u00a1-\\uffff]{2,})'
45
- : `(?:${tlds.sort((a, b) => b.length - a.length).join('|')})`
46
- })\\.?`;
47
- const port = '(?::\\d{2,5})?';
48
- const path = '(?:[/?#][^\\s"]*)?';
49
- const regex = `(?:${protocol}|www\\.)${auth}(?:localhost|${ip}|${host}${domain}${tld})${port}${path}`;
50
-
51
- return opts.exact
52
- ? new RegExp(`(?:^${regex}$)`, 'i')
53
- : new RegExp(regex, 'ig');
54
- };
@@ -1,42 +0,0 @@
1
- module.exports = {
2
- components: 'src/components/**/*.jsx',
3
- ignore: ['**/*.test.jsx', '**/Contents/Contents*jsx', '**/Tile/Tile.jsx'],
4
- verbose: true,
5
- title: 'Volto Style Guide',
6
- showCode: true,
7
- showUsage: true,
8
- sections: [
9
- {
10
- name: 'Introduction',
11
- content: 'docs/introduction.md',
12
- },
13
- {
14
- name: 'Theme',
15
- components: 'src/components/theme/**/*.jsx',
16
- content: 'docs/theme.md',
17
- },
18
- {
19
- name: 'Manage',
20
- components: 'src/components/manage/**/*.jsx',
21
- content: 'docs/manage.md',
22
- },
23
- ],
24
- webpackConfig: {
25
- module: {
26
- rules: [
27
- {
28
- test: /\.jsx?$/,
29
- exclude: /node_modules/,
30
- loader: 'babel-loader',
31
- },
32
- {
33
- test: /\.(woff|woff2|ttf|eot|svg|png|gif|jpg)(\?v=\d+\.\d+\.\d+)?$/,
34
- loader: 'url-loader',
35
- options: {
36
- limit: 10000,
37
- },
38
- },
39
- ],
40
- },
41
- },
42
- };