@kitconcept/volto-light-theme 3.1.2 → 3.2.0

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 (118) hide show
  1. package/.changelog.draft +11 -0
  2. package/CHANGELOG.md +3 -567
  3. package/build/messages/src/components/Anontools/Anontools.json +10 -0
  4. package/build/messages/src/components/Blocks/Button/schema.json +6 -0
  5. package/build/messages/src/components/Blocks/EventMetadata/View.json +30 -0
  6. package/build/messages/src/components/Blocks/Image/Edit.json +10 -0
  7. package/build/messages/src/components/Blocks/Image/ImageSidebar.json +18 -0
  8. package/build/messages/src/components/Blocks/Image/schema.json +10 -0
  9. package/build/messages/src/components/Blocks/Listing/ListingBody.json +26 -0
  10. package/build/messages/src/components/Blocks/Search/TopSideFacets.json +10 -0
  11. package/build/messages/src/components/Blocks/Search/components/SearchDetails.json +10 -0
  12. package/build/messages/src/components/Blocks/Search/components/SearchInput.json +6 -0
  13. package/build/messages/src/components/Blocks/Slider/DefaultBody.json +18 -0
  14. package/build/messages/src/components/Blocks/Slider/schema.json +14 -0
  15. package/build/messages/src/components/Blocks/schema.json +6 -0
  16. package/build/messages/src/components/Breadcrumbs/Breadcrumbs.json +10 -0
  17. package/build/messages/src/components/Footer/Footer.json +30 -0
  18. package/build/messages/src/components/Header/Header.json +6 -0
  19. package/build/messages/src/components/LanguageSelector/LanguageSelector.json +6 -0
  20. package/build/messages/src/components/Logo/Logo.json +10 -0
  21. package/build/messages/src/components/MobileNavigation/MobileNavigation.json +26 -0
  22. package/build/messages/src/components/Navigation/Navigation.json +10 -0
  23. package/build/messages/src/components/SearchWidget/IntranetSearchWidget.json +14 -0
  24. package/build/messages/src/components/SearchWidget/SearchWidget.json +10 -0
  25. package/build/messages/src/components/Theme/EventView.json +6 -0
  26. package/build/messages/src/components/Widgets/AlignWidget.json +22 -0
  27. package/build/messages/src/index.json +10 -0
  28. package/locales/de/LC_MESSAGES/volto.po +7 -7
  29. package/locales/en/LC_MESSAGES/volto.po +7 -7
  30. package/locales/es/LC_MESSAGES/volto.po +10 -9
  31. package/locales/eu/LC_MESSAGES/volto.po +10 -9
  32. package/locales/pt_BR/volto.po +7 -7
  33. package/locales/volto.pot +8 -8
  34. package/package.json +8 -26
  35. package/src/components/Blocks/Image/Edit.jsx +14 -14
  36. package/src/components/Blocks/Image/ImageSidebar.jsx +3 -3
  37. package/src/components/Blocks/Image/View.jsx +17 -17
  38. package/src/components/Footer/Footer.jsx +2 -2
  39. package/src/components/Header/Header.jsx +12 -12
  40. package/src/theme/_header.scss +1 -1
  41. package/.dockerignore +0 -1
  42. package/.editorconfig +0 -34
  43. package/.eslintignore +0 -6
  44. package/.eslintrc +0 -53
  45. package/.github/workflows/acceptance.yml +0 -98
  46. package/.github/workflows/changelog.yml +0 -43
  47. package/.github/workflows/code.yml +0 -16
  48. package/.github/workflows/deploy.yml +0 -105
  49. package/.github/workflows/unit.yml +0 -16
  50. package/.prettierignore +0 -3
  51. package/.prettierrc +0 -12
  52. package/.stylelintrc +0 -32
  53. package/.yarn/releases/yarn-3.2.3.cjs +0 -783
  54. package/.yarnrc.yml +0 -3
  55. package/Makefile +0 -174
  56. package/README.md +0 -453
  57. package/UPGRADE-GUIDE.md +0 -38
  58. package/acceptance/.gitkeep +0 -0
  59. package/acceptance/ci-a11y.yml +0 -31
  60. package/acceptance/ci.yml +0 -29
  61. package/acceptance/cypress/.gitkeep +0 -0
  62. package/acceptance/cypress/fixtures/broccoli.jpg +0 -0
  63. package/acceptance/cypress/fixtures/example.json +0 -5
  64. package/acceptance/cypress/fixtures/file.pdf +0 -0
  65. package/acceptance/cypress/fixtures/halfdome2022.jpg +0 -0
  66. package/acceptance/cypress/fixtures/image.png +0 -0
  67. package/acceptance/cypress/plugins/index.js +0 -17
  68. package/acceptance/cypress/support/commands.js +0 -23
  69. package/acceptance/cypress/support/e2e.js +0 -23
  70. package/acceptance/cypress/support/reset-fixture.js +0 -45
  71. package/acceptance/cypress/support/slate.js +0 -14
  72. package/acceptance/cypress/tests/.gitkeep +0 -0
  73. package/acceptance/cypress/tests/a11y/accordionBlock.cy.js +0 -30
  74. package/acceptance/cypress/tests/a11y/basic.cy.js +0 -26
  75. package/acceptance/cypress/tests/a11y/buttonBlock.cy.js +0 -18
  76. package/acceptance/cypress/tests/a11y/eventContenttype.cy.js +0 -18
  77. package/acceptance/cypress/tests/a11y/fileContenttype.cy.js +0 -18
  78. package/acceptance/cypress/tests/a11y/gridBlock.cy.js +0 -18
  79. package/acceptance/cypress/tests/a11y/gridImageBlock.cy.js +0 -18
  80. package/acceptance/cypress/tests/a11y/gridListingBlock.cy.js +0 -18
  81. package/acceptance/cypress/tests/a11y/gridTeaserBlock.cy.js +0 -18
  82. package/acceptance/cypress/tests/a11y/gridTextBlock.cy.js +0 -33
  83. package/acceptance/cypress/tests/a11y/headingBlock.cy.js +0 -18
  84. package/acceptance/cypress/tests/a11y/highlightBlock.cy.js +0 -18
  85. package/acceptance/cypress/tests/a11y/imageBlock.cy.js +0 -18
  86. package/acceptance/cypress/tests/a11y/imageContenttype.cy.js +0 -18
  87. package/acceptance/cypress/tests/a11y/introductionBlock.cy.js +0 -18
  88. package/acceptance/cypress/tests/a11y/linkContenttype.cy.js +0 -18
  89. package/acceptance/cypress/tests/a11y/listingBlock.cy.js +0 -31
  90. package/acceptance/cypress/tests/a11y/mapsBlock.cy.js +0 -27
  91. package/acceptance/cypress/tests/a11y/newsItemContenttype.cy.js +0 -27
  92. package/acceptance/cypress/tests/a11y/pageContent.cy.js +0 -27
  93. package/acceptance/cypress/tests/a11y/searchBlock.cy.js +0 -18
  94. package/acceptance/cypress/tests/a11y/separatorBlock.cy.js +0 -28
  95. package/acceptance/cypress/tests/a11y/tableBlock.cy.js +0 -26
  96. package/acceptance/cypress/tests/a11y/teaserBlock.cy.js +0 -18
  97. package/acceptance/cypress/tests/a11y/textBlock.cy.js +0 -18
  98. package/acceptance/cypress/tests/a11y/tocBlock.cy.js +0 -18
  99. package/acceptance/cypress/tests/a11y/videoBlock.cy.js +0 -27
  100. package/acceptance/cypress/tests/main/basic.cy.js +0 -71
  101. package/acceptance/cypress/tests/main/blocks-map.cy.js +0 -56
  102. package/acceptance/cypress/tests/main/blocks-table.cy.js +0 -127
  103. package/acceptance/cypress/tests/main/listing-grid.cy.js +0 -77
  104. package/acceptance/cypress/tests/main/nav.cy.js +0 -54
  105. package/acceptance/cypress/tests/main/site-action.cy.js +0 -16
  106. package/acceptance/cypress.config.js +0 -17
  107. package/acceptance/docker-compose-a11y.yml +0 -55
  108. package/acceptance/docker-compose.yml +0 -53
  109. package/acceptance/package.json +0 -5
  110. package/acceptance/yarn.lock +0 -2638
  111. package/devops/stacks/light-theme.kitconcept.io.yml +0 -66
  112. package/dockerfiles/Dockerfile +0 -32
  113. package/dockerfiles/Dockerfile.acceptance +0 -19
  114. package/dockerfiles/Dockerfile.dev +0 -24
  115. package/dockerfiles/docker-compose.yml +0 -56
  116. package/dockerfiles/helper.py +0 -132
  117. package/volto-light-theme.png +0 -0
  118. package/volto.config.js +0 -7
@@ -1,66 +0,0 @@
1
- version: '3.3'
2
-
3
- services:
4
-
5
- frontend:
6
- image: ghcr.io/kitconcept/voltolighttheme-frontend:${STACK_PARAM:-latest}
7
- environment:
8
- RAZZLE_INTERNAL_API_PATH: http://light-theme-kitconcept-io_backend:8080/Plone
9
- depends_on:
10
- - backend
11
- networks:
12
- - public
13
- healthcheck:
14
- disable: true
15
- deploy:
16
- replicas: 2
17
- placement:
18
- constraints:
19
- - node.labels.type == app
20
- - node.labels.env == staging
21
- labels:
22
- - traefik.enable=true
23
- - traefik.docker.network=public
24
- - traefik.constraint-label=public
25
- # Service
26
- - traefik.http.services.svc-lighttheme-stg-front.loadbalancer.server.port=3000
27
- # Middlewares
28
- # Routers
29
- ## light-theme.kitconcept.io
30
- - traefik.http.routers.rt-lighttheme-stg-front.rule=Host(`light-theme.kitconcept.io`)
31
- - traefik.http.routers.rt-lighttheme-stg-front.entrypoints=https
32
- - traefik.http.routers.rt-lighttheme-stg-front.tls=true
33
- - traefik.http.routers.rt-lighttheme-stg-front.tls.certresolver=le
34
- - traefik.http.routers.rt-lighttheme-stg-front.service=svc-lighttheme-stg-front
35
- - traefik.http.routers.rt-lighttheme-stg-front.middlewares=gzip
36
-
37
- backend:
38
- image: ghcr.io/kitconcept/voltolighttheme:latest
39
- networks:
40
- - public
41
- deploy:
42
- replicas: 1
43
- placement:
44
- constraints:
45
- - node.labels.type == app
46
- - node.labels.env == staging
47
- labels:
48
- - traefik.enable=true
49
- - traefik.docker.network=public
50
- - traefik.constraint-label=public
51
- # Service
52
- - traefik.http.services.svc-lighttheme-stg-backend.loadbalancer.server.port=8080
53
- # Middleware
54
- - "traefik.http.middlewares.mw-lighttheme-stg-backend-vhm.replacepathregex.regex=^/\\+\\+api\\+\\+($$|/.*)"
55
- - "traefik.http.middlewares.mw-lighttheme-stg-backend-vhm.replacepathregex.replacement=/VirtualHostBase/https/light-theme.kitconcept.io/Plone/++api++/VirtualHostRoot/$$1"
56
- # Router ++api++
57
- - traefik.http.routers.rt-lighttheme-stg-backend.rule=Host(`light-theme.kitconcept.io`) && (PathPrefix(`/++api++`))
58
- - traefik.http.routers.rt-lighttheme-stg-backend.entrypoints=https
59
- - traefik.http.routers.rt-lighttheme-stg-backend.tls=true
60
- - traefik.http.routers.rt-lighttheme-stg-backend.service=svc-lighttheme-stg-backend
61
- - traefik.http.routers.rt-lighttheme-stg-backend.middlewares=gzip,mw-lighttheme-stg-backend-vhm
62
-
63
- networks:
64
- public:
65
- external: true
66
- driver: overlay
@@ -1,32 +0,0 @@
1
- # syntax=docker/dockerfile:1
2
- ARG VOLTO_VERSION
3
- FROM plone/frontend-builder:${VOLTO_VERSION} as builder
4
-
5
- ARG ADDON_NAME
6
- ARG ADDON_PATH
7
-
8
- ENV THEME='@kitconcept/volto-light-theme'
9
-
10
- # Copy helper.py as /setupAddon
11
- COPY dockerfiles/helper.py /setupAddon
12
-
13
- # Copy addon code
14
- COPY --chown=node:node ./ /app/src/addons/${ADDON_PATH}/
15
-
16
- # Install
17
- RUN <<EOT
18
- set -e
19
- /setupAddon
20
- yarn install --network-timeout 1000000
21
- yarn build
22
- rm -rf cache omelette .yarn/cache
23
- EOT
24
-
25
- FROM plone/frontend-prod-config:${VOLTO_VERSION}
26
-
27
- LABEL maintainer="kitconcept GmbH <contact@kitconcept.com>" \
28
- org.label-schema.name="ghcr.io/kitconcept/lighttheme" \
29
- org.label-schema.description="Volto project with @kitconcept/volto-light-theme" \
30
- org.label-schema.vendor="kitconcept GmbH"
31
-
32
- COPY --from=builder /app/ /app/
@@ -1,19 +0,0 @@
1
- # syntax=docker/dockerfile:1
2
- ARG VOLTO_VERSION
3
- FROM plone/frontend-dev:${VOLTO_VERSION}
4
-
5
- ARG ADDON_NAME
6
- ARG ADDON_PATH
7
-
8
- # Copy helper.py as /setupAddon
9
- COPY dockerfiles/helper.py /setupAddon
10
-
11
- # Copy volto.config.js
12
- COPY --chown=node:node volto.config.js* /app/
13
-
14
- COPY --chown=node:node package.json /app/src/addons/${ADDON_PATH}/
15
-
16
- RUN <<EOT
17
- /setupAddon
18
- yarn install --network-timeout 1000000
19
- EOT
@@ -1,24 +0,0 @@
1
- # syntax=docker/dockerfile:1
2
- ARG VOLTO_VERSION
3
- FROM plone/frontend-dev:${VOLTO_VERSION}
4
-
5
- ARG ADDON_NAME
6
- ARG ADDON_PATH
7
-
8
- # Copy helper.py as /setupAddon
9
- COPY dockerfiles/helper.py /setupAddon
10
-
11
- # Copy linter / prettier configs
12
- COPY --chown=node:node .eslintignore* .prettierignore* /app/
13
-
14
- # Copy volto.config.js
15
- COPY --chown=node:node volto.config.js* /app/
16
-
17
- # Copy jsconfig.json configuration
18
- COPY --chown=node:node package.json /app/src/addons/${ADDON_PATH}/
19
-
20
- RUN <<EOT
21
- set -e
22
- /setupAddon
23
- yarn install --network-timeout 1000000
24
- EOT
@@ -1,56 +0,0 @@
1
- version: "3"
2
-
3
- services:
4
-
5
- addon-dev:
6
- build:
7
- context: ../
8
- dockerfile: ./dockerfiles/Dockerfile.dev
9
- args:
10
- ADDON_NAME: "${ADDON_NAME}"
11
- ADDON_PATH: "${ADDON_PATH}"
12
- VOLTO_VERSION: "${VOLTO_VERSION:-17}"
13
- volumes:
14
- - ${CURRENT_DIR}:/app/src/addons/${ADDON_PATH}/
15
- environment:
16
- # RAZZLE_INTERNAL_API_PATH: http://backend:8080/Plone
17
- # In case that you want to connect to and outside (non-docker) local instance
18
- # coment the above, use the next line
19
- RAZZLE_INTERNAL_API_PATH: http://host.docker.internal:8080/Plone
20
- RAZZLE_API_PATH: http://localhost:8080/Plone
21
- HOST: 0.0.0.0
22
- depends_on:
23
- - backend
24
- ports:
25
- - 3000:3000
26
- - 3001:3001
27
- tty: true
28
- profiles:
29
- - dev
30
-
31
- addon-live:
32
- build:
33
- context: ../
34
- dockerfile: ./dockerfiles/Dockerfile
35
- args:
36
- ADDON_NAME: "${ADDON_NAME}"
37
- ADDON_PATH: "${ADDON_PATH}"
38
- VOLTO_VERSION: "${VOLTO_VERSION:-17}"
39
- environment:
40
- RAZZLE_INTERNAL_API_PATH: http://backend:8080/Plone
41
- RAZZLE_API_PATH: http://localhost:8080/Plone
42
- ports:
43
- - 3000:3000
44
- tty: true
45
- profiles:
46
- - live
47
-
48
- backend:
49
- image: ghcr.io/kitconcept/voltolighttheme:latest
50
- environment:
51
- CORS_: true
52
- ports:
53
- - 8080:8080
54
- profiles:
55
- - dev
56
- - live
@@ -1,132 +0,0 @@
1
- #!/usr/bin/python3
2
- """Addon support for Volto."""
3
- from pathlib import Path
4
- from typing import Tuple
5
-
6
- import json
7
- import logging
8
- import os
9
-
10
-
11
- logger = logging.getLogger("Volto Helper")
12
-
13
-
14
- def get_jsconfig_path():
15
- primary_path = (APP_FOLDER / "tsconfig.json").resolve()
16
- fallback_path = (APP_FOLDER / "jsconfig.json").resolve()
17
-
18
- if primary_path.exists():
19
- return primary_path
20
- elif fallback_path.exists():
21
- return fallback_path
22
- else:
23
- return None
24
-
25
-
26
- APP_FOLDER = Path("/app").resolve()
27
- PACKAGE_JSON_PATH = (APP_FOLDER / "package.json").resolve()
28
- JSCONFIG_PATH = get_jsconfig_path()
29
- VOLTOCONFIGPATH = (APP_FOLDER / "volto.config.js").resolve()
30
-
31
-
32
- ADDON_NAME = os.environ.get("ADDON_NAME", "")
33
- ADDITIONAL_ADDONS = os.environ.get("ADDITIONAL_ADDONS", "")
34
-
35
-
36
- def add_packages_to_package_json(config: dict, packages: dict) -> dict:
37
- """Add addons to the main `package.json`."""
38
- addons = config.get("addons", [])
39
- workspaces = config.get("workspaces", [])
40
- for pkg_name, pkg_path in packages.items():
41
- if not VOLTOCONFIGPATH.exists():
42
- addons.append(pkg_name)
43
- workspace_path = pkg_path.replace("/src", "")
44
- workspaces.append(f"src/{workspace_path}")
45
- config["addons"] = addons
46
- config["workspaces"] = workspaces
47
- return config
48
-
49
-
50
- def parse_jsonconfig(config: dict) -> dict:
51
- """Parse existing `jsconfig.json`."""
52
- packages = {}
53
- config_paths = config.get("compilerOptions", {}).get("paths", {})
54
- for pkg_name, pkg_path in config_paths.items():
55
- if isinstance(pkg_path, list):
56
- packages[pkg_name] = pkg_path[0]
57
- return packages
58
-
59
-
60
- def parse_addon_name(addon_name: str) -> Tuple[str, str]:
61
- """Parse the addon name and return also its probable path."""
62
- if addon_name.startswith("@"):
63
- _, path = addon_name.split("/")
64
- return addon_name, path
65
- return addon_name, addon_name
66
-
67
-
68
- def addon_to_package_json(config: dict, addon_name: str, addon_path: str) -> dict:
69
- """Add a single addon to main `package.json`."""
70
- project_addons = config["addons"]
71
- project_dependencies = config["dependencies"]
72
- # Process package.json for the addon
73
- workspace_path = f"src/addons/{addon_path}"
74
- addon_path = (APP_FOLDER / workspace_path).resolve()
75
- addon_config = json.load(open(addon_path / "package.json"))
76
- # Process peerDependencies
77
- peer_dependencies = addon_config.get("peerDependencies", {})
78
- for dependency_name, version in peer_dependencies.items():
79
- if dependency_name in project_dependencies:
80
- continue
81
- project_dependencies[dependency_name] = version
82
- # Process peerAddons
83
- peer_addons = addon_config.get("peerAddons", [])
84
- for name in peer_addons:
85
- if name in project_addons:
86
- continue
87
- project_addons.append(name)
88
- # Add our addon to addons and to workspaces
89
- project_addons.append(addon_name)
90
- workspaces = config.get("workspaces", [])
91
- workspaces.append(workspace_path)
92
-
93
- config["addons"] = project_addons
94
- config["dependencies"] = project_dependencies
95
- config["workspaces"] = workspaces
96
- return config
97
-
98
-
99
- def addon_to_jsconfig_json(config: dict, addon_name: str, addon_path: str) -> dict:
100
- """Add a single addon to `jsconfig.json`."""
101
- if "compilerOptions" not in config:
102
- config["compilerOptions"] = {}
103
- if "paths" not in config:
104
- config["compilerOptions"]["paths"] = {}
105
-
106
- config["compilerOptions"]["paths"][addon_name] = [f"addons/{addon_path}/src"]
107
- return config
108
-
109
-
110
- if ADDON_NAME:
111
- logger.info("Processing the ADDON_NAME variable.")
112
- SETTINGS = (
113
- (addon_to_package_json, PACKAGE_JSON_PATH),
114
- (addon_to_jsconfig_json, JSCONFIG_PATH),
115
- )
116
- addon_name, addon_path = parse_addon_name(ADDON_NAME)
117
- for func, path in SETTINGS:
118
- data = func(json.load(open(path)), addon_name=addon_name, addon_path=addon_path)
119
- json.dump(data, open(path, "w"), indent=2)
120
- else:
121
- packages = {}
122
- if JSCONFIG_PATH.exists():
123
- packages = parse_jsonconfig(json.load(open(JSCONFIG_PATH)))
124
-
125
- if not packages:
126
- logger.warning("Existing jsconfig.json does not contain packages.")
127
- else:
128
- logger.info("Processing existing jsconfig.json.")
129
- package_json = json.load(open(PACKAGE_JSON_PATH))
130
- # Process package_json
131
- package_json = add_packages_to_package_json(package_json, packages)
132
- json.dump(package_json, open(PACKAGE_JSON_PATH, "w"), indent=2)
Binary file
package/volto.config.js DELETED
@@ -1,7 +0,0 @@
1
- const addons = [];
2
- const theme = '@kitconcept/volto-light-theme';
3
-
4
- module.exports = {
5
- addons,
6
- theme,
7
- };