Skip to content

Commit a070514

Browse files
authored
Merge branch '4.6' into IBX-10519-add-footer-box-shadow
2 parents 14f3bf3 + 50c7b19 commit a070514

File tree

43 files changed

+1245
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1245
-123
lines changed

.github/workflows/browser-tests.yaml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ jobs:
1818
test-setup-phase-2: '--profile=setup --suite=content-translation --mode=standard'
1919
job-count: 2
2020
timeout: 40
21-
secrets:
22-
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
23-
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
24-
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
25-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
21+
secrets: inherit
2622
admin-ui-headless:
2723
name: "AdminUI-Headless"
2824
uses: ibexa/gh-workflows/.github/workflows/browser-tests.yml@main
@@ -33,14 +29,7 @@ jobs:
3329
test-setup-phase-2: '--profile=setup --suite=content-translation --mode=standard'
3430
job-count: 2
3531
timeout: 40
36-
secrets:
37-
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
38-
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
39-
TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}
40-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
41-
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
42-
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
43-
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
32+
secrets: inherit
4433
admin-ui-experience-commerce:
4534
name: "AdminUI-Experience/Commerce"
4635
uses: ibexa/gh-workflows/.github/workflows/browser-tests.yml@main
@@ -51,14 +40,7 @@ jobs:
5140
test-setup-phase-2: '--profile=setup --suite=content-translation --mode=standard'
5241
job-count: 2
5342
timeout: 40
54-
secrets:
55-
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
56-
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
57-
TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}
58-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
59-
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
60-
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
61-
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
43+
secrets: inherit
6244
page-builder:
6345
name: "Basic Page Builder tests"
6446
uses: ibexa/gh-workflows/.github/workflows/browser-tests.yml@main
@@ -67,10 +49,4 @@ jobs:
6749
test-suite: '--profile=browser --suite=personas'
6850
test-setup-phase-1: '--profile=setup --suite=personas --tags=@setup --mode=standard'
6951
timeout: 40
70-
secrets:
71-
AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }}
72-
AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }}
73-
AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
74-
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
75-
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
76-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
52+
secrets: inherit

phpstan-baseline.neon

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6642,12 +6642,6 @@ parameters:
66426642
count: 1
66436643
path: src/lib/Form/DataTransformer/DateIntervalTransformer.php
66446644

6645-
-
6646-
message: '#^Method Ibexa\\AdminUi\\Form\\DataTransformer\\DateIntervalTransformer\:\:transform\(\) has Symfony\\Component\\Form\\Exception\\TransformationFailedException in PHPDoc @throws tag but it''s not thrown\.$#'
6647-
identifier: throws.unusedType
6648-
count: 1
6649-
path: src/lib/Form/DataTransformer/DateIntervalTransformer.php
6650-
66516645
-
66526646
message: '#^Method Ibexa\\AdminUi\\Form\\DataTransformer\\DateIntervalTransformer\:\:transform\(\) has parameter \$value with no value type specified in iterable type array\.$#'
66536647
identifier: missingType.iterableValue
@@ -6876,12 +6870,6 @@ parameters:
68766870
count: 1
68776871
path: src/lib/Form/DataTransformer/LanguageTransformer.php
68786872

6879-
-
6880-
message: '#^Method Ibexa\\AdminUi\\Form\\DataTransformer\\LanguageTransformer\:\:transform\(\) has Symfony\\Component\\Form\\Exception\\TransformationFailedException in PHPDoc @throws tag but it''s not thrown\.$#'
6881-
identifier: throws.unusedType
6882-
count: 1
6883-
path: src/lib/Form/DataTransformer/LanguageTransformer.php
6884-
68856873
-
68866874
message: '#^Class Ibexa\\AdminUi\\Form\\DataTransformer\\LocationTransformer implements generic interface Symfony\\Component\\Form\\DataTransformerInterface but does not specify its types\: T, R$#'
68876875
identifier: missingType.generics
@@ -7104,12 +7092,6 @@ parameters:
71047092
count: 1
71057093
path: src/lib/Form/DataTransformer/UserTransformer.php
71067094

7107-
-
7108-
message: '#^Method Ibexa\\AdminUi\\Form\\DataTransformer\\UserTransformer\:\:transform\(\) has Symfony\\Component\\Form\\Exception\\TransformationFailedException in PHPDoc @throws tag but it''s not thrown\.$#'
7109-
identifier: throws.unusedType
7110-
count: 1
7111-
path: src/lib/Form/DataTransformer/UserTransformer.php
7112-
71137095
-
71147096
message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#'
71157097
identifier: function.alreadyNarrowedType
@@ -12660,24 +12642,6 @@ parameters:
1266012642
count: 1
1266112643
path: src/lib/Translation/Extractor/PolicyTranslationExtractor.php
1266212644

12663-
-
12664-
message: '#^Method Ibexa\\AdminUi\\Translation\\Extractor\\SortingTranslationExtractor\:\:extract\(\) has no return type specified\.$#'
12665-
identifier: missingType.return
12666-
count: 1
12667-
path: src/lib/Translation/Extractor/SortingTranslationExtractor.php
12668-
12669-
-
12670-
message: '#^Property Ibexa\\AdminUi\\Translation\\Extractor\\SortingTranslationExtractor\:\:\$defaultTranslations has no type specified\.$#'
12671-
identifier: missingType.property
12672-
count: 1
12673-
path: src/lib/Translation/Extractor/SortingTranslationExtractor.php
12674-
12675-
-
12676-
message: '#^Property Ibexa\\AdminUi\\Translation\\Extractor\\SortingTranslationExtractor\:\:\$domain has no type specified\.$#'
12677-
identifier: missingType.property
12678-
count: 1
12679-
path: src/lib/Translation/Extractor/SortingTranslationExtractor.php
12680-
1268112645
-
1268212646
message: '#^Method Ibexa\\AdminUi\\UI\\Action\\FormUiActionMapper\:\:map\(\) has parameter \$form with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
1268312647
identifier: missingType.generics

src/bundle/Resources/config/services/services.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ services:
88

99
Ibexa\AdminUi\Service\MetaFieldType\MetaFieldDefinitionServiceInterface:
1010
'@Ibexa\AdminUi\Service\MetaFieldType\MetaFieldDefinitionService'
11+
12+
Ibexa\AdminUi\ContentType\ContentTypeFieldsByExpressionService: ~
13+
14+
Ibexa\Contracts\AdminUi\ContentType\ContentTypeFieldsByExpressionServiceInterface:
15+
'@Ibexa\AdminUi\ContentType\ContentTypeFieldsByExpressionService'

src/bundle/Resources/config/services/utils.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,13 @@ services:
66

77
Ibexa\AdminUi\Util\:
88
resource: "../../../../lib/Util"
9+
10+
Ibexa\AdminUi\Util\ContentTypeFieldsExpressionParserInterface:
11+
alias: Ibexa\AdminUi\Util\ContentTypeFieldsExpressionParser
12+
13+
Ibexa\AdminUi\Util\ContentTypeFieldsExpressionParser: ~
14+
15+
Ibexa\AdminUi\Util\ContentTypeFieldsExtractorInterface:
16+
alias: Ibexa\AdminUi\Util\ContentTypeFieldsExtractor
17+
18+
Ibexa\AdminUi\Util\ContentTypeFieldsExtractor: ~

src/bundle/Resources/encore/ibexa.js.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const layout = [
4040
path.resolve(__dirname, '../public/js/scripts/admin.picker.js'),
4141
path.resolve(__dirname, '../public/js/scripts/admin.notifications.modal.js'),
4242
path.resolve(__dirname, '../public/js/scripts/sidebar/side.panel.js'),
43+
path.resolve(__dirname, '../public/js/scripts/quick.action.manager.js'),
4344
path.resolve(__dirname, '../public/js/scripts/admin.location.add.translation.js'),
4445
path.resolve(__dirname, '../public/js/scripts/admin.form.autosubmit.js'),
4546
path.resolve(__dirname, '../public/js/scripts/admin.anchor.navigation'),

src/bundle/Resources/public/js/scripts/admin.back.to.top.js

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
1-
(function (global, doc) {
1+
(function (global, doc, ibexa) {
22
const backToTopBtn = doc.querySelector('.ibexa-back-to-top__btn');
3+
const backToTop = doc.querySelector('.ibexa-back-to-top');
34
const backToTopAnchor = doc.querySelector('.ibexa-back-to-top-anchor');
45
const backToTopScrollContainer = doc.querySelector('.ibexa-back-to-top-scroll-container');
56

67
if (!backToTopBtn || !backToTopAnchor || !backToTopScrollContainer) {
78
return;
89
}
910

11+
const checkIsVisible = () => {
12+
if (!backToTop) {
13+
return false;
14+
}
15+
16+
return backToTopBtn.classList.contains('ibexa-back-to-top__btn--visible');
17+
};
1018
const backToTopBtnTitle = backToTopBtn.querySelector('.ibexa-back-to-top__title');
1119
let currentBackToTopAnchorHeight = backToTopAnchor.offsetHeight;
1220
const setBackToTopBtnTextVisibility = (container) => {
1321
const isTitleVisible = Math.abs(container.scrollHeight - container.scrollTop - container.clientHeight) <= 2;
22+
const shouldBeVisible = container.scrollTop !== 0;
23+
24+
if (backToTopBtn.classList.contains('ibexa-back-to-top__btn--visible') && !shouldBeVisible) {
25+
backToTopBtn.classList.remove('ibexa-back-to-top__btn--visible');
26+
}
27+
28+
if (!backToTopBtn.classList.contains('ibexa-back-to-top__btn--visible') && shouldBeVisible) {
29+
backToTopBtn.classList.add('ibexa-back-to-top__btn--visible');
30+
ibexa.quickAction.recalculateButtonsLayout();
31+
}
1432

15-
backToTopBtn.classList.toggle('ibexa-back-to-top__btn--visible', container.scrollTop !== 0);
1633
backToTopBtn.classList.toggle('ibexa-btn--no-text', !isTitleVisible);
1734
backToTopBtnTitle.classList.toggle('ibexa-back-to-top__title--visible', isTitleVisible);
1835
};
@@ -37,6 +54,14 @@
3754

3855
setBackToTopBtnTextVisibility(backToTopScrollContainer);
3956
});
57+
const config = {
58+
id: 'back-to-top',
59+
zIndex: 10,
60+
container: backToTop,
61+
priority: 100,
62+
checkVisibility: checkIsVisible,
63+
};
4064

65+
ibexa.quickAction.registerButton(config);
4166
resizeObserver.observe(backToTopAnchor);
42-
})(window, window.document);
67+
})(window, window.document, window.ibexa);

src/bundle/Resources/public/js/scripts/core/backdrop.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
if (this.backdrop) {
2929
this.backdrop.remove();
3030
this.backdrop = null;
31+
this.extraClasses = [];
3132
}
3233
}
3334

src/bundle/Resources/public/js/scripts/core/date.time.picker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ class DateTimePicker {
136136

137137
init() {
138138
const flatpickr = getFlatpickr();
139+
140+
this.flatpickrConfig.static = this.inputField.dataset.isStatic === 'true';
139141
this.flatpickrInstance = flatpickr(this.inputField, this.flatpickrConfig);
140142

141143
this.inputField.addEventListener('input', this.onInput, false);

src/bundle/Resources/public/js/scripts/core/multilevel.popup.menu.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
(function (global, doc, ibexa, Popper) {
2+
const { escapeHTML } = ibexa.helpers.text;
3+
const { dangerouslyInsertAdjacentHTML } = ibexa.helpers.dom;
4+
25
class MultilevelPopupMenu {
36
constructor(config) {
47
this.container = config.container;
@@ -359,9 +362,11 @@
359362
const itemTemplate = !!href ? itemTemplateLink : itemTemplateBtn;
360363

361364
const container = doc.createElement('div');
362-
const renderedItem = itemTemplate.replaceAll('{{ label }}', label).replaceAll('{{ sublabel }}', sublabel);
365+
const renderedItem = itemTemplate
366+
.replaceAll('{{ label }}', escapeHTML(label))
367+
.replaceAll('{{ sublabel }}', escapeHTML(sublabel));
363368

364-
container.insertAdjacentHTML('beforeend', renderedItem);
369+
dangerouslyInsertAdjacentHTML(container, 'beforeend', renderedItem);
365370

366371
const newItemElement = container.querySelector('.ibexa-popup-menu__item');
367372
const newItemContentElement = newItemElement.querySelector('.ibexa-popup-menu__item-content');

src/bundle/Resources/public/js/scripts/fieldType/ezimageasset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
previewImg.classList.toggle('d-none', image === null);
154154
previewAlt.value = image.alternativeText;
155155
previewActionPreview.setAttribute('href', destinationLocationUrl);
156-
assetNameContainer.innerHTML = destinationContentName;
156+
assetNameContainer.innerText = destinationContentName;
157157
assetNameContainer.setAttribute('href', destinationLocationUrl);
158158

159159
this.inputDestinationContentId.value = destinationContentId;

0 commit comments

Comments
 (0)