diff --git a/.gitignore b/.gitignore
index 7026e200fd..fee6267cf6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,9 @@ package-lock.json
composer.lock
/var
tsconfig.json
+.button-migration/*.log
+
+# Migration tool runtime state
+.button-migration/
+migrations/*/.migration-state/
+*.migration.log
diff --git a/composer.json b/composer.json
index 97beea181e..3385484998 100644
--- a/composer.json
+++ b/composer.json
@@ -27,6 +27,7 @@
"ibexa/content-forms": "~6.0.x-dev",
"ibexa/core": "~6.0.x-dev",
"ibexa/design-engine": "~6.0.x-dev",
+ "ibexa/design-system-twig": "~6.0.x-dev",
"ibexa/rest": "~6.0.x-dev",
"ibexa/search": "~6.0.x-dev",
"ibexa/twig-components": "~6.0.x-dev",
diff --git a/features/standard/UserCreation.feature b/features/standard/UserCreation.feature
index 7f0e523f09..6b914081e3 100644
--- a/features/standard/UserCreation.feature
+++ b/features/standard/UserCreation.feature
@@ -37,8 +37,8 @@ Feature: User management
| First name | testuseredited |
| Last name | lastnameedited |
And I set content fields for user
- | label | Username | Password | Confirm password | Email |
- | User account | testuser | Test123456 | Test123456 | test@test.org |
+ | label | Username | Password | Confirm password | Email | Enabled |
+ | User account | testuser | Test123456 | Test123456 | test@test.org | Yes |
And I perform the "Save and close" action
Then I should be on Content view Page for "Users/testuseredited lastnameedited"
And content attributes equal
diff --git a/src/bundle/Resources/encore/ibexa.css.config.js b/src/bundle/Resources/encore/ibexa.css.config.js
index 62dfba962e..7dfada06f7 100644
--- a/src/bundle/Resources/encore/ibexa.css.config.js
+++ b/src/bundle/Resources/encore/ibexa.css.config.js
@@ -5,6 +5,7 @@ module.exports = (Encore) => {
path.resolve(__dirname, '../public/scss/ibexa-bootstrap.scss'),
path.resolve(__dirname, '../public/scss/ibexa.scss'),
path.resolve(__dirname, '../public/scss/ui/ibexa-modules.scss'),
+ path.resolve(__dirname, '../public/scss/ibexa-ids-assets.scss'),
path.resolve('./vendor/ibexa/admin-ui-assets/src/bundle/Resources/public/vendors/flatpickr/dist/flatpickr.min.css'),
path.resolve(
'./vendor/ibexa/admin-ui-assets/src/bundle/Resources/public/vendors/flatpickr/dist/plugins/confirmDate/confirmDate.css',
@@ -18,6 +19,7 @@ module.exports = (Encore) => {
])
.addEntry('ibexa-admin-ui-security-base-css', [
path.resolve(__dirname, '../public/scss/ibexa-bootstrap.scss'),
+ path.resolve('./vendor/ibexa/admin-ui-assets/src/bundle/Resources/public/vendors/ids-assets/dist/css/styles.css'),
path.resolve(__dirname, '../public/scss/ibexa.scss'),
]);
};
diff --git a/src/bundle/Resources/encore/ibexa.js.config.js b/src/bundle/Resources/encore/ibexa.js.config.js
index 30b8296fd9..2e9b2cb849 100644
--- a/src/bundle/Resources/encore/ibexa.js.config.js
+++ b/src/bundle/Resources/encore/ibexa.js.config.js
@@ -49,6 +49,7 @@ const layout = [
path.resolve(__dirname, '../public/js/scripts/admin.focus.mode.js'),
path.resolve(__dirname, '../public/js/scripts/sidebar/main.menu.js'),
path.resolve(__dirname, '../public/js/scripts/admin.input.text.js'),
+ path.resolve('./vendor/ibexa/design-system-twig/src/bundle/Resources/public/ts/init_components.ts'),
path.resolve(__dirname, '../public/js/scripts/admin.table.js'),
path.resolve(__dirname, '../public/js/scripts/core/collapse.js'),
path.resolve(__dirname, '../public/js/scripts/admin.dropdown.js'),
@@ -247,9 +248,13 @@ module.exports = (Encore) => {
])
.addEntry('ibexa-admin-ui-login-js', [
path.resolve(__dirname, '../public/js/scripts/admin.input.text.js'),
+ path.resolve('./vendor/ibexa/design-system-twig/src/bundle/Resources/public/ts/init_components.ts'),
path.resolve(__dirname, '../public/js/scripts/login.js'),
])
- .addEntry('ibexa-admin-ui-reset-password-js', [path.resolve(__dirname, '../public/js/scripts/admin.input.text.js')])
+ .addEntry('ibexa-admin-ui-reset-password-js', [
+ path.resolve(__dirname, '../public/js/scripts/admin.input.text.js'),
+ path.resolve('./vendor/ibexa/design-system-twig/src/bundle/Resources/public/ts/init_components.ts'),
+ ])
.addEntry('ibexa-admin-ui-user-invitation-modal', [path.resolve(__dirname, '../public/js/scripts/user.invitation.modal.js')])
.addEntry('ibexa-admin-ui-tabs-js', [
path.resolve(__dirname, '../public/js/scripts/admin.location.tab.js'),
diff --git a/src/bundle/Resources/public/js/scripts/admin.contenttype.copy.js b/src/bundle/Resources/public/js/scripts/admin.contenttype.copy.js
index af8a99514c..42494971e4 100644
--- a/src/bundle/Resources/public/js/scripts/admin.contenttype.copy.js
+++ b/src/bundle/Resources/public/js/scripts/admin.contenttype.copy.js
@@ -1,5 +1,5 @@
(function (global, doc, ibexa, Routing) {
- const copyButtons = doc.querySelectorAll('.ibexa-btn--copy-content-type');
+ const copyButtons = doc.querySelectorAll('.ids-btn--copy-content-type');
const copyContentType = ({ currentTarget }) => {
const contentTypeCopyForm = doc.querySelector('form[name="content_type_copy"]');
const contentTypeIdentifierInput = contentTypeCopyForm.querySelector('#content_type_copy_content_type');
diff --git a/src/bundle/Resources/public/js/scripts/admin.contenttype.edit.js b/src/bundle/Resources/public/js/scripts/admin.contenttype.edit.js
index eb8935244d..383d2f8e72 100644
--- a/src/bundle/Resources/public/js/scripts/admin.contenttype.edit.js
+++ b/src/bundle/Resources/public/js/scripts/admin.contenttype.edit.js
@@ -1,7 +1,7 @@
(function (global, doc, ibexa, Routing, Translator, bootstrap) {
const SELECTOR_INPUTS_TO_VALIDATE = '.ibexa-input[required]:not([disabled]):not([hidden])';
const SELETOR_FIELD_INPUTS =
- '.ibexa-input-text-wrapper:not(.ibexa-input-text-wrapper--search) > input.ibexa-input--text:not([hidden]):not(ibexa-input-text-wrapper--search)';
+ '.ids-input-text .ids-input:not([hidden]), .ibexa-input-text-wrapper:not(.ibexa-input-text-wrapper--search) > input.ibexa-input:not([hidden]):not(.ibexa-input--date)';
const MATRIX_COLUMN_ID_PATTERN = /^\w[\w:-]*$/;
const MATRIX_COLUMN_ID_ERROR_CLASS = 'ibexa-matrix-settings__identifier-error';
const TIMEOUT_REMOVE_HIGHLIGHT = 3000;
@@ -381,7 +381,7 @@
const isMatrixColumnId = input.classList.contains('ibexa-input--matrix-column-identifier');
const isMatrixColumnIdInvalid = !isInputEmpty && isMatrixColumnId && !MATRIX_COLUMN_ID_PATTERN.test(input.value);
const field = input.closest('.form-group');
- const labelNode = field?.querySelector('.ibexa-label');
+ const labelNode = field?.querySelector('.ids-label');
const errorNode = field?.querySelector('.ibexa-form-error');
const isInvalid = isInputEmpty || isMatrixColumnIdInvalid;
diff --git a/src/bundle/Resources/public/js/scripts/admin.contenttype.relation.default.location.js b/src/bundle/Resources/public/js/scripts/admin.contenttype.relation.default.location.js
index 6525c48b14..fffb04627c 100644
--- a/src/bundle/Resources/public/js/scripts/admin.contenttype.relation.default.location.js
+++ b/src/bundle/Resources/public/js/scripts/admin.contenttype.relation.default.location.js
@@ -53,7 +53,7 @@ import * as middleEllipsisHelper from '@ibexa-admin-ui/src/bundle/Resources/publ
};
const resetStartingLocation = ({ currentTarget }) => {
const container = currentTarget.closest('.ibexa-default-location');
- const udwBtn = container.querySelector('.ibexa-btn--udw-relation-default-location');
+ const udwBtn = container.querySelector('.ids-btn--udw-relation-default-location');
const pathSelector = container.querySelector('.ibexa-default-location__path-selector');
const { relationRootInputSelector } = udwBtn.dataset;
@@ -62,7 +62,7 @@ import * as middleEllipsisHelper from '@ibexa-admin-ui/src/bundle/Resources/publ
pathSelector.classList.remove('ibexa-default-location__path-selector--filled');
};
const attachEvents = (container) => {
- const udwBtn = container.querySelector('.ibexa-btn--udw-relation-default-location');
+ const udwBtn = container.querySelector('.ids-btn--udw-relation-default-location');
const deleteBtn = container.querySelector(SELECTOR_RESET_STARTING_LOCATION_BTN);
const choices = container.querySelectorAll('input[type="radio"]');
@@ -71,12 +71,15 @@ import * as middleEllipsisHelper from '@ibexa-admin-ui/src/bundle/Resources/publ
choices.forEach((choice) => choice.addEventListener('change', toggleDisabledState.bind(null, container), false));
};
const toggleDisabledState = (container) => {
- const locationBtn = container.querySelector('.ibexa-btn--udw-relation-default-location');
+ const locationBtn = container.querySelector('.ids-btn--udw-relation-default-location');
const deleteBtn = container.querySelector(SELECTOR_RESET_STARTING_LOCATION_BTN);
const isDisabled = !container.querySelector('input[value="1"]').checked;
- locationBtn.classList.toggle('disabled', isDisabled);
- deleteBtn?.classList.toggle('disabled', isDisabled);
+ locationBtn.disabled = isDisabled;
+
+ if (deleteBtn) {
+ deleteBtn.disabled = isDisabled;
+ }
};
doc.body.addEventListener(
diff --git a/src/bundle/Resources/public/js/scripts/admin.context.menu.js b/src/bundle/Resources/public/js/scripts/admin.context.menu.js
index 1d3c82ee53..03b25f5d95 100644
--- a/src/bundle/Resources/public/js/scripts/admin.context.menu.js
+++ b/src/bundle/Resources/public/js/scripts/admin.context.menu.js
@@ -7,11 +7,13 @@
const menuButtons = [
...adaptedItemsContainer.querySelectorAll(
- '.ibexa-context-menu__item > .ibexa-btn:not(.ibexa-btn--more), .ibexa-context-menu__item > .ibexa-split-btn',
+ '.ibexa-context-menu__item > .ibexa-btn:not(.ibexa-btn--more), .ibexa-context-menu__item > .ids-btn:not(.ibexa-btn--more), .ibexa-context-menu__item > .ibexa-split-btn',
),
];
const popupMenuElement = adaptedItemsContainer.querySelector('.ibexa-context-menu__item--more .ibexa-multilevel-popup-menu');
const showPopupButton = adaptedItemsContainer.querySelector('.ibexa-btn--more');
+ const getButtonLabel = (button) => button.querySelector('.ids-btn__label, .ibexa-btn__label')?.textContent ?? '';
+ const getItemButton = (item) => item.querySelector('.ids-btn, .ibexa-btn');
if (!showPopupButton) {
return;
@@ -24,7 +26,7 @@
return adaptedItemsContainer.querySelector('.ibexa-context-menu__item');
},
onAdapted: (visibleItems, hiddenItems) => {
- const hiddenButtonsIds = [...hiddenItems].map((item) => item.querySelector('.ibexa-btn').id);
+ const hiddenButtonsIds = [...hiddenItems].map((item) => getItemButton(item)?.id).filter(Boolean);
const topBranchItems = multilevelPopupMenu.getBranchItems(topBranch);
topBranchItems.forEach((branchItem) => {
@@ -51,7 +53,7 @@
const mainBtn = menuButton.querySelector('.ibexa-split-btn__main-btn');
const splitBtn = menuButton.querySelector('.ibexa-split-btn__toggle-btn');
const relatedMainBtnId = mainBtn.id;
- const mainBtnLabel = mainBtn.querySelector('.ibexa-btn__label').textContent;
+ const mainBtnLabel = getButtonLabel(mainBtn);
const {
alternativeMainBtnLabel: mainBtnAlternativeLabel,
alternativeMainBtnSublabel: mainBtnAlternativeSublabel,
@@ -60,7 +62,7 @@
const subitemsBtns = [...splitBtn.branchElement.querySelectorAll('.ibexa-popup-menu__item-content')];
const subitems = subitemsBtns.map((subitemBtn) => {
- const subitemLabel = subitemBtn.querySelector('.ibexa-btn__label').textContent;
+ const subitemLabel = getButtonLabel(subitemBtn);
const relatedSubitemBtnId = subitemBtn.id;
return {
@@ -108,7 +110,7 @@
}
const relatedBtnId = menuButton.id;
- const label = menuButton.querySelector('.ibexa-btn__label').textContent;
+ const label = getButtonLabel(menuButton);
return {
label,
diff --git a/src/bundle/Resources/public/js/scripts/admin.limitation.pick.js b/src/bundle/Resources/public/js/scripts/admin.limitation.pick.js
index 0a89be4347..aaf413933d 100644
--- a/src/bundle/Resources/public/js/scripts/admin.limitation.pick.js
+++ b/src/bundle/Resources/public/js/scripts/admin.limitation.pick.js
@@ -176,7 +176,7 @@
udwRoot = ReactDOMClient.createRoot(udwContainer);
udwRoot.render(
React.createElement(ibexa.modules.UniversalDiscovery, {
- onConfirm: handleUdwConfirm.bind(this, event.target),
+ onConfirm: handleUdwConfirm.bind(this, event.currentTarget),
onCancel: closeUDW,
title,
multiple: true,
diff --git a/src/bundle/Resources/public/js/scripts/admin.location.add.custom_url.js b/src/bundle/Resources/public/js/scripts/admin.location.add.custom_url.js
index 8668cff04f..ba398b6ff5 100644
--- a/src/bundle/Resources/public/js/scripts/admin.location.add.custom_url.js
+++ b/src/bundle/Resources/public/js/scripts/admin.location.add.custom_url.js
@@ -4,15 +4,23 @@
if (modal) {
const discardBtns = modal.querySelectorAll('[data-bs-dismiss="modal"]');
const submitBtn = modal.querySelector('#custom_url_add_add');
- const input = modal.querySelector('[required="required"]');
+ const input = modal.querySelector('#custom_url_add_path') || modal.querySelector('[name="custom_url_add[path]"]');
const siteRootCheckbox = modal.querySelector('[name="custom_url_add[site_root]"]');
const toggleButtonState = () => {
+ if (!input || !submitBtn) {
+ return;
+ }
+
const hasValue = input.value.trim().length !== 0;
const methodName = hasValue ? 'removeAttribute' : 'setAttribute';
submitBtn[methodName]('disabled', true);
};
const clearValues = () => {
+ if (!input) {
+ return;
+ }
+
input.value = '';
toggleButtonState();
};
@@ -20,11 +28,21 @@
const isChecked = event.target.checked;
const siteAccessSelect = modal.querySelector('.ibexa-custom-url-from__item--siteacces .ibexa-dropdown');
+ if (!siteAccessSelect) {
+ return;
+ }
+
siteAccessSelect.classList.toggle('ibexa-dropdown--is-disabled', isChecked);
};
- input.addEventListener('input', toggleButtonState, false);
- siteRootCheckbox.addEventListener('change', toggleSiteAccessSelect, false);
+ if (input) {
+ input.addEventListener('input', toggleButtonState, false);
+ }
+
+ if (siteRootCheckbox) {
+ siteRootCheckbox.addEventListener('change', toggleSiteAccessSelect, false);
+ }
+
discardBtns.forEach((btn) => btn.addEventListener('click', clearValues, false));
}
})(window, window.document);
diff --git a/src/bundle/Resources/public/js/scripts/admin.location.add.translation.js b/src/bundle/Resources/public/js/scripts/admin.location.add.translation.js
index f63ae54c3e..ef9bff4e12 100644
--- a/src/bundle/Resources/public/js/scripts/admin.location.add.translation.js
+++ b/src/bundle/Resources/public/js/scripts/admin.location.add.translation.js
@@ -9,7 +9,7 @@
if (!modal) {
return;
}
- const buttonCreate = modal.querySelector('.ibexa-btn--create-translation');
+ const buttonCreate = modal.querySelector('.ids-btn--create-translation');
if (!buttonCreate) {
return;
}
diff --git a/src/bundle/Resources/public/js/scripts/admin.location.view.js b/src/bundle/Resources/public/js/scripts/admin.location.view.js
index 9690526b75..4a7dea5085 100644
--- a/src/bundle/Resources/public/js/scripts/admin.location.view.js
+++ b/src/bundle/Resources/public/js/scripts/admin.location.view.js
@@ -29,7 +29,7 @@ import { checkIsContainer } from './helpers/content.type.helper';
bootstrap.Modal.getOrCreateInstance(doc.querySelector('#version-draft-conflict-modal')).hide();
};
const attachModalListeners = (wrapper) => {
- const addDraftButton = wrapper.querySelector('.ibexa-btn--add-draft');
+ const addDraftButton = wrapper.querySelector('.ids-btn--add-draft');
const conflictModal = doc.querySelector('#version-draft-conflict-modal');
if (addDraftButton) {
@@ -37,7 +37,7 @@ import { checkIsContainer } from './helpers/content.type.helper';
}
wrapper
- .querySelectorAll('.ibexa-btn--prevented')
+ .querySelectorAll('.ids-btn--prevented')
.forEach((btn) => btn.addEventListener('click', (event) => event.preventDefault(), false));
if (conflictModal) {
diff --git a/src/bundle/Resources/public/js/scripts/admin.notifications.filters.js b/src/bundle/Resources/public/js/scripts/admin.notifications.filters.js
index 33fb21d9d9..71f31fc1f9 100644
--- a/src/bundle/Resources/public/js/scripts/admin.notifications.filters.js
+++ b/src/bundle/Resources/public/js/scripts/admin.notifications.filters.js
@@ -1,8 +1,9 @@
(function (global, doc) {
+ const SELECTOR_FILTER_CHECKBOX = '.ids-input--checkbox:not([name="dropdown-checkbox"])';
const searchForm = doc.querySelector('.ibexa-list-search-form');
const filtersContainerNode = doc.querySelector('.ibexa-list-filters');
- const applyFiltersBtn = filtersContainerNode.querySelector('.ibexa-btn--apply');
- const clearFiltersBtn = filtersContainerNode.querySelector('.ibexa-btn--clear');
+ const applyFiltersBtn = filtersContainerNode.querySelector('.ids-btn--apply');
+ const clearFiltersBtn = filtersContainerNode.querySelector('.ids-btn--clear');
const statusFilterNode = filtersContainerNode.querySelector('.ibexa-list-filters__item--statuses');
const typeFilterNode = filtersContainerNode.querySelector('.ibexa-list-filters__item--type');
const datetimeFilterNodes = filtersContainerNode.querySelectorAll('.ibexa-list-filters__item--date-time .ibexa-picker');
@@ -13,9 +14,7 @@
}
const sourceSelect = filterNode.querySelector('.ibexa-list-filters__item-content .ibexa-dropdown__source .ibexa-input--select');
- const checkboxes = filterNode.querySelectorAll(
- '.ibexa-list-filters__item-content .ibexa-input--checkbox:not([name="dropdown-checkbox"])',
- );
+ const checkboxes = filterNode.querySelectorAll(`.ibexa-list-filters__item-content ${SELECTOR_FILTER_CHECKBOX}`);
const timePicker = filterNode.querySelector('.ibexa-date-time-picker__input');
if (sourceSelect) {
@@ -45,9 +44,7 @@
return;
}
- const checkboxes = filterNode.querySelectorAll(
- '.ibexa-list-filters__item-content .ibexa-input--checkbox:not([name="dropdown-checkbox"])',
- );
+ const checkboxes = filterNode.querySelectorAll(`.ibexa-list-filters__item-content ${SELECTOR_FILTER_CHECKBOX}`);
checkboxes.forEach((checkbox) => {
checkbox.addEventListener('change', filterChange, false);
});
@@ -80,7 +77,7 @@
}
const select = filterNode.querySelector('.ibexa-dropdown__source .ibexa-input--select');
- const checkedCheckboxes = filterNode.querySelectorAll('.ibexa-input--checkbox:checked');
+ const checkedCheckboxes = filterNode.querySelectorAll(`${SELECTOR_FILTER_CHECKBOX}:checked`);
if (isNodeDatePicker(filterNode)) {
const timePicker = filterNode.querySelector('.ibexa-date-time-picker__input');
diff --git a/src/bundle/Resources/public/js/scripts/admin.notifications.list.js b/src/bundle/Resources/public/js/scripts/admin.notifications.list.js
index e17cdcb55a..10ab3a0dee 100644
--- a/src/bundle/Resources/public/js/scripts/admin.notifications.list.js
+++ b/src/bundle/Resources/public/js/scripts/admin.notifications.list.js
@@ -1,6 +1,7 @@
import { isFirefox } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/browser.helper.js';
(function (global, doc, ibexa, Translator, Routing) {
+ const SELECTOR_NOTIFICATION_CHECKBOX = '.ibexa-notification-list__mark-row-checkbox';
const SELECTOR_MODAL_ITEM = '.ibexa-notifications-modal__item';
const SELECTOR_GO_TO_NOTIFICATION = '.ibexa-notification-view-all__show';
const SELECTOR_TOGGLE_NOTIFICATION = '.ibexa-notification-view-all__mail';
@@ -10,7 +11,7 @@ import { isFirefox } from '@ibexa-admin-ui/src/bundle/Resources/public/js/script
const markAsReadBtn = doc.querySelector('.ibexa-notification-list__btn-mark-as-read');
const deleteBtn = doc.querySelector('.ibexa-notification-list__btn-delete');
const notificationsCheckboxes = [
- ...doc.querySelectorAll('.ibexa-notification-list .ibexa-table__cell--has-checkbox .ibexa-input--checkbox'),
+ ...doc.querySelectorAll(`.ibexa-notification-list .ibexa-table__cell--has-checkbox ${SELECTOR_NOTIFICATION_CHECKBOX}`),
];
const notificationsTable = doc.querySelector('.ibexa-table--notifications');
const uncheckCheckboxesEvent = new CustomEvent('ibexa-uncheck-checkboxes', {
diff --git a/src/bundle/Resources/public/js/scripts/admin.search.autocomplete.js b/src/bundle/Resources/public/js/scripts/admin.search.autocomplete.js
index 96adaa9c01..b2abddd3ce 100644
--- a/src/bundle/Resources/public/js/scripts/admin.search.autocomplete.js
+++ b/src/bundle/Resources/public/js/scripts/admin.search.autocomplete.js
@@ -10,7 +10,7 @@
}
const globalSearchInput = globalSearch.querySelector('.ibexa-global-search__input');
- const clearBtn = globalSearch.querySelector(' .ibexa-input-text-wrapper__action-btn--clear');
+ const clearBtn = globalSearch.querySelector('.ids-clear-btn, .ibexa-input-text-wrapper__action-btn--clear');
const autocompleteNode = globalSearch.querySelector('.ibexa-global-search__autocomplete');
const autocompleteListNode = globalSearch.querySelector('.ibexa-global-search__autocomplete-list');
const autocompleteResultsCountNumber = globalSearch.querySelector('.ibexa-global-search__autocomplete-total-count-number');
@@ -152,6 +152,6 @@
};
globalSearchInput.addEventListener('keyup', handleTyping, false);
- clearBtn.addEventListener('click', hideAutocomplete, false);
+ clearBtn?.addEventListener('click', hideAutocomplete, false);
doc.addEventListener('keydown', focusSearch, false);
})(window, document, window.ibexa, window.Routing, window.Translator);
diff --git a/src/bundle/Resources/public/js/scripts/admin.search.filters.js b/src/bundle/Resources/public/js/scripts/admin.search.filters.js
index 7f6b1dcc1c..f5a2e6783b 100644
--- a/src/bundle/Resources/public/js/scripts/admin.search.filters.js
+++ b/src/bundle/Resources/public/js/scripts/admin.search.filters.js
@@ -1,14 +1,16 @@
+import Chip from '@ibexa-design-system/src/bundle/Resources/public/ts/components/chip';
+
(function (global, doc, ibexa, flatpickr, React, ReactDOMClient) {
const { escapeHTML, escapeHTMLAttribute } = ibexa.helpers.text;
const { dangerouslySetInnerHTML } = ibexa.helpers.dom;
const { getInstance } = ibexa.helpers.objectInstances;
let getUsersTimeout;
- const SELECTOR_TAG = '.ibexa-tag';
+ const SELECTOR_TAG = '.ids-chip';
const token = doc.querySelector('meta[name="CSRF-Token"]').content;
const siteaccess = doc.querySelector('meta[name="SiteAccess"]').content;
const filters = doc.querySelector('.ibexa-filters');
- const clearBtn = filters.querySelector('.ibexa-btn--clear');
- const applyBtn = filters.querySelector('.ibexa-btn--apply');
+ const clearBtn = filters.querySelector('.ids-btn--clear');
+ const applyBtn = filters.querySelector('.ids-btn--apply');
const contentTypeSelect = doc.querySelector('.ibexa-filters__item--content-type .ibexa-filters__select');
const sectionSelect = doc.querySelector('.ibexa-filters__item--section .ibexa-filters__select');
const lastModifiedSelectNode = doc.querySelector('.ibexa-filters__item--modified .ibexa-filters__select');
@@ -35,7 +37,7 @@
const lastCreatedPeriod = doc.querySelector(lastCreatedPeriodSelector);
const lastCreatedStartDate = doc.querySelector(lastCreatedStartDateSelector);
const lastCreatedEndDate = doc.querySelector(lastCreatedEndDateSelector);
- const creatorInput = doc.querySelector('.ibexa-filters__item--creator .ibexa-input');
+ const creatorInput = doc.querySelector('.ibexa-filters__item--creator input:not([type="hidden"])');
const isInitializedCreatorInput = !!creatorInput.value;
const searchCreatorInput = doc.querySelector('#search_creator');
const usersList = doc.querySelector('.ibexa-filters__item--creator .ibexa-filters__user-list');
@@ -108,6 +110,7 @@
const methodName = isEnabled ? 'removeAttribute' : 'setAttribute';
applyBtn[methodName]('disabled', !isEnabled);
+ // ids-btn--disabled class no longer needed - native [disabled] attribute handles styling
};
const toggleDatesSelectVisibility = (event, select, dateRange) => {
const datesRangeNode = doc.querySelector(event.target.dataset.targetSelector);
@@ -234,7 +237,7 @@
form.submit();
};
const clearContentType = (event) => {
- const checkbox = doc.querySelector(event.currentTarget.dataset.targetSelector);
+ const checkbox = doc.querySelector(event.currentTarget.closest('.ids-chip').dataset.targetSelector);
checkbox.checked = false;
removeSearchTag(event);
@@ -265,6 +268,21 @@
'last-modified': (event) => clearDataRange(event, lastModifiedSelect, lastModifiedDateRange),
'last-created': (event) => clearDataRange(event, lastCreatedSelect, lastCreatedDateRange),
};
+ const initSearchTagChips = () => {
+ for (const tagType in clearSearchTagBtnMethods) {
+ const chips = doc.querySelectorAll(`.ibexa-search-criteria-tags__tag--${tagType}.ids-chip`);
+
+ chips.forEach((chip) => {
+ if (!chip.dataset.idsInitialized) {
+ const chipInstance = new Chip(chip);
+
+ chipInstance.init();
+ }
+
+ chip.addEventListener('ids:chip:delete:before', clearSearchTagBtnMethods[tagType], false);
+ });
+ }
+ };
const showMoreContentTypes = (event) => {
const btn = event.currentTarget;
const contentTypesList = btn
@@ -315,11 +333,7 @@
sectionSelect.addEventListener('change', toggleDisabledStateOnApplyBtn, false);
}
- for (const tagType in clearSearchTagBtnMethods) {
- const tagBtns = doc.querySelectorAll(`.ibexa-tag__remove-btn--${tagType}`);
-
- tagBtns.forEach((btn) => btn.addEventListener('click', clearSearchTagBtnMethods[tagType], false));
- }
+ initSearchTagChips();
lastModifiedPeriod.addEventListener('change', toggleDisabledStateOnApplyBtn, false);
lastModifiedStartDate.addEventListener('change', toggleDisabledStateOnApplyBtn, false);
diff --git a/src/bundle/Resources/public/js/scripts/admin.section.list.js b/src/bundle/Resources/public/js/scripts/admin.section.list.js
index e0b630d227..997177771e 100644
--- a/src/bundle/Resources/public/js/scripts/admin.section.list.js
+++ b/src/bundle/Resources/public/js/scripts/admin.section.list.js
@@ -1,5 +1,5 @@
(function (global, doc, ibexa, React, ReactDOMClient) {
- const btns = doc.querySelectorAll('.ibexa-btn--open-udw');
+ const btns = doc.querySelectorAll('.ids-btn--open-udw');
const udwContainer = doc.getElementById('react-udw');
let udwRoot = null;
const closeUDW = () => udwRoot.unmount();
diff --git a/src/bundle/Resources/public/js/scripts/admin.section.view.js b/src/bundle/Resources/public/js/scripts/admin.section.view.js
index 5754137b0a..2dd3d0f25a 100644
--- a/src/bundle/Resources/public/js/scripts/admin.section.view.js
+++ b/src/bundle/Resources/public/js/scripts/admin.section.view.js
@@ -1,5 +1,5 @@
(function (global, doc, ibexa, React, ReactDOMClient) {
- const btns = doc.querySelectorAll('.ibexa-btn--open-udw');
+ const btns = doc.querySelectorAll('.ids-btn--open-udw, .ids-btn--open-udw');
const udwContainer = doc.getElementById('react-udw');
let udwRoot = null;
const closeUDW = () => udwRoot.unmount();
diff --git a/src/bundle/Resources/public/js/scripts/admin.table.js b/src/bundle/Resources/public/js/scripts/admin.table.js
index cd95832999..325c822c9c 100644
--- a/src/bundle/Resources/public/js/scripts/admin.table.js
+++ b/src/bundle/Resources/public/js/scripts/admin.table.js
@@ -1,4 +1,5 @@
(function (global, doc) {
+ const SELECTOR_TABLE_CHECKBOX = '.ids-input--checkbox';
const ibexaTables = doc.querySelectorAll('.ibexa-table');
const setMainCheckboxState = (mainCheckbox, subCheckboxes, event) => {
const isFromJS = event?.detail?.isFromJS ?? false;
@@ -61,9 +62,9 @@
}
const mainCheckboxIndex = [...headCells].indexOf(headCellWithCheckbox);
- const mainCheckbox = headCellWithCheckbox.querySelector('.ibexa-input--checkbox');
+ const mainCheckbox = headCellWithCheckbox.querySelector(SELECTOR_TABLE_CHECKBOX);
const subCheckboxes = tableBody.querySelectorAll(
- `.ibexa-table__cell--has-checkbox:nth-child(${mainCheckboxIndex + 1}) .ibexa-input--checkbox`,
+ `.ibexa-table__cell--has-checkbox:nth-child(${mainCheckboxIndex + 1}) ${SELECTOR_TABLE_CHECKBOX}`,
);
if (!mainCheckbox) {
@@ -138,7 +139,7 @@
const uncheckCheckboxes = (table) => {
const mainCheckbox = table.querySelector('.ibexa-table__header-cell-checkbox');
- const subCheckboxes = [...table.querySelectorAll('.ibexa-table__cell--has-checkbox .ibexa-input--checkbox')];
+ const subCheckboxes = [...table.querySelectorAll(`.ibexa-table__cell--has-checkbox ${SELECTOR_TABLE_CHECKBOX}`)];
mainCheckbox.checked = false;
mainCheckbox.indeterminate = false;
diff --git a/src/bundle/Resources/public/js/scripts/admin.trash.js b/src/bundle/Resources/public/js/scripts/admin.trash.js
index 9c6ac384f3..bcd7dfc9f0 100644
--- a/src/bundle/Resources/public/js/scripts/admin.trash.js
+++ b/src/bundle/Resources/public/js/scripts/admin.trash.js
@@ -16,7 +16,7 @@
const { numberOfSubitems } = event.detail;
const sendToTrashModal = document.querySelector('.ibexa-modal--trash-location');
const modalBody = sendToTrashModal.querySelector('.modal-body');
- const modalSendToTrashButton = sendToTrashModal.querySelector('.modal-footer .ibexa-btn--confirm-send-to-trash');
+ const modalSendToTrashButton = sendToTrashModal.querySelector('.modal-footer .ids-btn--confirm-send-to-trash');
const { contentName } = sendToTrashModal.dataset;
if (numberOfSubitems) {
diff --git a/src/bundle/Resources/public/js/scripts/admin.trash.list.js b/src/bundle/Resources/public/js/scripts/admin.trash.list.js
index c65abaa918..3e64523160 100644
--- a/src/bundle/Resources/public/js/scripts/admin.trash.list.js
+++ b/src/bundle/Resources/public/js/scripts/admin.trash.list.js
@@ -17,10 +17,9 @@
const sortDirection = doc.querySelector('#trash_search_sort_direction');
const creatorInput = doc.querySelector('.ibexa-trash-search-form__item--creator .ibexa-trash-search-form__input');
const usersList = doc.querySelector('.ibexa-trash-search-form__item--creator .ibexa-trash-search-form__user-list');
- const resetCreatorBtn = doc.querySelector('.ibexa-btn--reset-creator');
const searchCreatorInput = doc.querySelector('#trash_search_creator');
const sortableColumns = doc.querySelectorAll('.ibexa-table__sort-column');
- const btns = doc.querySelectorAll('.ibexa-btn--open-udw');
+ const btns = doc.querySelectorAll('.ids-btn--open-udw, .ids-btn--open-udw');
const udwContainer = doc.getElementById('react-udw');
const autoSendNodes = doc.querySelectorAll('.ibexa-trash-search-form__item--auto-send');
const errorMessage = Translator.trans(/* @Desc("Cannot fetch user list") */ 'trash.user_list.error', {}, 'ibexa_trash_ui');
@@ -95,12 +94,6 @@
updateTrashForm([event.target]);
enableButtons();
};
- const handleResetUser = () => {
- searchCreatorInput.value = '';
-
- creatorInput.value = '';
- creatorInput.removeAttribute('disabled');
- };
const handleClickOutsideUserList = (event) => {
if (event.target.closest('.ibexa-trash-search-form__item--creator')) {
return;
@@ -173,13 +166,23 @@
doc.querySelector('body').removeEventListener('click', handleClickOutsideUserList, false);
}
};
+ const handleCreatorInputChange = (event) => {
+ if (event.target.value !== '') {
+ return;
+ }
+
+ searchCreatorInput.value = '';
+ creatorInput.removeAttribute('readonly');
+ usersList.classList.add('ibexa-trash-search-form__user-list--hidden');
+ doc.querySelector('body').removeEventListener('click', handleClickOutsideUserList, false);
+ };
const handleSelectUser = (event) => {
searchCreatorInput.value = event.target.dataset.id;
usersList.classList.add('ibexa-trash-search-form__user-list--hidden');
creatorInput.value = event.target.dataset.name;
- creatorInput.setAttribute('disabled', true);
+ creatorInput.setAttribute('readonly', true);
doc.querySelector('body').removeEventListener('click', handleClickOutsideUserList, false);
formSearch.submit();
@@ -251,9 +254,9 @@
autoSendNodes.forEach((node) => node.addEventListener('change', handleAutoSubmitNodes, false));
sortableColumns.forEach((column) => column.addEventListener('click', sortTrashItems, false));
trashedTypeInput.addEventListener('change', toggleDatesSelectVisibility, false);
- creatorInput.addEventListener('keyup', handleTyping, false);
+ creatorInput.addEventListener('input', handleTyping, false);
+ creatorInput.addEventListener('input', handleCreatorInputChange, false);
usersList.addEventListener('click', handleSelectUser, false);
- resetCreatorBtn.addEventListener('click', handleResetUser, false);
updateTrashForm(trashRestoreCheckboxes);
enableButtons();
trashRestoreCheckboxes.forEach((checkbox) => checkbox.addEventListener('change', handleCheckboxChange, false));
diff --git a/src/bundle/Resources/public/js/scripts/admin.url.wildcards.create.js b/src/bundle/Resources/public/js/scripts/admin.url.wildcards.create.js
index a957dc5937..b748ff9edb 100644
--- a/src/bundle/Resources/public/js/scripts/admin.url.wildcards.create.js
+++ b/src/bundle/Resources/public/js/scripts/admin.url.wildcards.create.js
@@ -7,8 +7,12 @@
const discardBtns = modal.querySelectorAll('[data-bs-dismiss="modal"]');
const submitBtn = modal.querySelector('[type="submit"]');
- const inputs = [...modal.querySelectorAll('[required="required"]')];
+ const inputs = [...modal.querySelectorAll('[required], [required="required"]')];
const toggleButtonState = () => {
+ if (!submitBtn || inputs.length === 0) {
+ return;
+ }
+
const isInvalid = inputs.some((input) => input.value.trim().length === 0);
const methodName = isInvalid ? 'setAttribute' : 'removeAttribute';
diff --git a/src/bundle/Resources/public/js/scripts/admin.version.edit.conflict.js b/src/bundle/Resources/public/js/scripts/admin.version.edit.conflict.js
index da4114023c..e28b703ad6 100644
--- a/src/bundle/Resources/public/js/scripts/admin.version.edit.conflict.js
+++ b/src/bundle/Resources/public/js/scripts/admin.version.edit.conflict.js
@@ -41,5 +41,5 @@
.catch(showErrorNotification);
};
- doc.querySelectorAll('.ibexa-btn--content-draft-edit').forEach((button) => button.addEventListener('click', editVersion, false));
+ doc.querySelectorAll('.ids-btn--content-draft-edit').forEach((button) => button.addEventListener('click', editVersion, false));
})(window, window.document, window.bootstrap, window.ibexa, window.Translator, window.Routing);
diff --git a/src/bundle/Resources/public/js/scripts/button.content.edit.js b/src/bundle/Resources/public/js/scripts/button.content.edit.js
index e16ad17bdd..d286f6417b 100644
--- a/src/bundle/Resources/public/js/scripts/button.content.edit.js
+++ b/src/bundle/Resources/public/js/scripts/button.content.edit.js
@@ -35,14 +35,14 @@
wrapper.innerHTML = modalHtml;
const conflictModal = doc.querySelector('#version-draft-conflict-modal');
- const addDraftButton = wrapper.querySelector('.ibexa-btn--add-draft');
+ const addDraftButton = wrapper.querySelector('.ids-btn--add-draft');
if (addDraftButton) {
addDraftButton.addEventListener('click', addDraft, false);
}
wrapper
- .querySelectorAll('.ibexa-btn--prevented')
+ .querySelectorAll('.ids-btn--prevented')
.forEach((btn) => btn.addEventListener('click', (wrapperBtnEvent) => wrapperBtnEvent.preventDefault(), false));
bootstrap.Modal.getOrCreateInstance(conflictModal).show();
@@ -80,5 +80,5 @@
.catch(showErrorNotification);
};
- doc.querySelectorAll('.ibexa-btn--content-edit').forEach((button) => button.addEventListener('click', editVersion, false));
+ doc.querySelectorAll('.ids-btn--content-edit').forEach((button) => button.addEventListener('click', editVersion, false));
})(window, window.document, window.bootstrap, window.ibexa, window.Translator, window.Routing);
diff --git a/src/bundle/Resources/public/js/scripts/button.prevent.default.js b/src/bundle/Resources/public/js/scripts/button.prevent.default.js
index 0e9039e75a..7bf575388d 100644
--- a/src/bundle/Resources/public/js/scripts/button.prevent.default.js
+++ b/src/bundle/Resources/public/js/scripts/button.prevent.default.js
@@ -1,3 +1,3 @@
(function (global, doc) {
- doc.querySelectorAll('.ibexa-btn--prevented').forEach((btn) => btn.addEventListener('click', (event) => event.preventDefault(), false));
+ doc.querySelectorAll('.ids-btn--prevented').forEach((btn) => btn.addEventListener('click', (event) => event.preventDefault(), false));
})(window, window.document);
diff --git a/src/bundle/Resources/public/js/scripts/button.state.toggle.js b/src/bundle/Resources/public/js/scripts/button.state.toggle.js
index a06a27b90f..e17acd6ac0 100644
--- a/src/bundle/Resources/public/js/scripts/button.state.toggle.js
+++ b/src/bundle/Resources/public/js/scripts/button.state.toggle.js
@@ -1,8 +1,9 @@
(function (global, doc) {
+ const SELECTOR_TABLE_CHECKBOX = '.ids-input--checkbox';
const toggleForms = doc.querySelectorAll('.ibexa-toggle-btn-state');
toggleForms.forEach((toggleForm) => {
- const checkboxes = [...toggleForm.querySelectorAll('.ibexa-table__cell--has-checkbox .ibexa-input--checkbox')];
+ const checkboxes = [...toggleForm.querySelectorAll(`.ibexa-table__cell--has-checkbox ${SELECTOR_TABLE_CHECKBOX}`)];
const buttonRemove = doc.querySelector(toggleForm.dataset.toggleButtonId);
if (!buttonRemove) {
diff --git a/src/bundle/Resources/public/js/scripts/button.translation.edit.js b/src/bundle/Resources/public/js/scripts/button.translation.edit.js
index c6de4dfd00..7181521a01 100644
--- a/src/bundle/Resources/public/js/scripts/button.translation.edit.js
+++ b/src/bundle/Resources/public/js/scripts/button.translation.edit.js
@@ -2,11 +2,11 @@
class EditTranslation {
constructor(config) {
this.container = config.container;
- this.toggler = config.container.querySelector('.ibexa-btn--translations-list-toggler');
+ this.toggler = config.container.querySelector('.ids-btn--translations-list-toggler');
this.extraActionsContainer = config.container.querySelector('.ibexa-extra-actions');
this.closeBtn = config.container.querySelector('.ibexa-extra-actions__close-btn');
this.confirmBtn = config.container.querySelector('.ibexa-extra-actions__confirm-btn');
- this.languagesBtns = config.container.querySelectorAll('.ibexa-btn--select-language');
+ this.languagesBtns = config.container.querySelectorAll('.ids-btn--select-language');
this.backdrop = config.backdrop;
this.tableNode = null;
@@ -64,8 +64,8 @@
this.confirmBtn.dataset.languageCode = languageCode;
this.confirmBtn.disabled = false;
- this.languagesBtns.forEach((btn) => btn.classList.remove('ibexa-btn--active'));
- event.currentTarget.classList.add('ibexa-btn--active');
+ this.languagesBtns.forEach((btn) => btn.classList.remove('ids-btn--active'));
+ event.currentTarget.classList.add('ids-btn--active');
}
resetLanguageSelector() {
@@ -73,7 +73,7 @@
this.confirmBtn.dataset.languageCode = null;
this.confirmBtn.disabled = true;
- this.languagesBtns.forEach((btn) => btn.classList.remove('ibexa-btn--active'));
+ this.languagesBtns.forEach((btn) => btn.classList.remove('ids-btn--active'));
}
init() {
diff --git a/src/bundle/Resources/public/js/scripts/button.trigger.js b/src/bundle/Resources/public/js/scripts/button.trigger.js
index bd1092535d..3e93ad4777 100644
--- a/src/bundle/Resources/public/js/scripts/button.trigger.js
+++ b/src/bundle/Resources/public/js/scripts/button.trigger.js
@@ -2,7 +2,7 @@
doc.addEventListener(
'DOMContentLoaded',
() => {
- const buttons = doc.querySelectorAll('.ibexa-btn--trigger');
+ const buttons = doc.querySelectorAll('.ids-btn--trigger');
const trigger = (event) => {
event.preventDefault();
diff --git a/src/bundle/Resources/public/js/scripts/core/dropdown.js b/src/bundle/Resources/public/js/scripts/core/dropdown.js
index f0beec4be2..e2a3e8da96 100644
--- a/src/bundle/Resources/public/js/scripts/core/dropdown.js
+++ b/src/bundle/Resources/public/js/scripts/core/dropdown.js
@@ -48,7 +48,7 @@
this.itemsFixedWrapperContainer = this.container.querySelector('.ibexa-dropdown__items-fixed-wrapper');
this.itemsContainer = this.container.querySelector('.ibexa-dropdown__items');
this.itemsListContainer = this.itemsContainer.querySelector('.ibexa-dropdown__items-list');
- this.itemsFilterInput = this.itemsContainer.querySelector('.ibexa-dropdown__items-filter');
+ this.itemsFilterInput = this.itemsContainer.querySelector('.ibexa-dropdown__items-filter-wrapper .ids-input');
this.itemsListFilterEmptyContainer = this.itemsContainer.querySelector('.ibexa-dropdown__items-list-filter-empty');
this.selectionTogglerBtn = this.itemsContainer.querySelector('.ibexa-dropdown__selection-toggler-btn');
@@ -152,7 +152,7 @@
this.sourceInput.querySelectorAll('option').forEach((option) => (option.selected = false));
this.itemsListContainer.querySelectorAll('.ibexa-dropdown__item--selected').forEach((option) => {
- const checkbox = option.querySelector('.ibexa-input--checkbox');
+ const checkbox = option.querySelector('.ibexa-dropdown__item-checkbox');
option.classList.remove('ibexa-dropdown__item--selected');
@@ -211,7 +211,11 @@
const value = this.getValueFromElement(element);
if (value && !this.canSelectOnlyOne) {
- element.querySelector('.ibexa-input').checked = selected;
+ const checkbox = element.querySelector('.ibexa-dropdown__item-checkbox');
+
+ if (checkbox) {
+ checkbox.checked = selected;
+ }
}
this.itemsListContainer.querySelector(`[data-value=${value}]`).classList.toggle('ibexa-dropdown__item--selected', selected);
@@ -314,7 +318,11 @@
itemSelected.classList.remove('ibexa-dropdown__item--selected');
if (!this.canSelectOnlyOne) {
- itemSelected.querySelector('.ibexa-input').checked = false;
+ const checkbox = itemSelected.querySelector('.ibexa-dropdown__item-checkbox');
+
+ if (checkbox) {
+ checkbox.checked = false;
+ }
}
if (optionSelect) {
diff --git a/src/bundle/Resources/public/js/scripts/core/toggle.button.js b/src/bundle/Resources/public/js/scripts/core/toggle.button.js
index 19bf315f33..31ef39f7d4 100644
--- a/src/bundle/Resources/public/js/scripts/core/toggle.button.js
+++ b/src/bundle/Resources/public/js/scripts/core/toggle.button.js
@@ -4,7 +4,11 @@
class ToggleButton {
constructor(config) {
this.toggleNode = config.toggleNode;
- this.inputsSelector = config?.inputsSelector || 'input';
+ this.inputsSelector =
+ config?.inputsSelector || (this.toggleNode.classList.contains('ids-toggle') ? '.ids-toggle__source input' : 'input');
+ this.checkedClass = this.toggleNode.classList.contains('ids-toggle') ? 'ids-toggle--checked' : 'ibexa-toggle--is-checked';
+ this.disabledClass = this.toggleNode.classList.contains('ids-toggle') ? 'ids-toggle--disabled' : 'ibexa-toggle--is-disabled';
+ this.focusedClass = this.toggleNode.classList.contains('ids-toggle') ? 'ids-toggle--focused' : 'ibexa-toggle--is-focused';
this.toggleState = this.toggleState.bind(this);
this.addFocus = this.addFocus.bind(this);
@@ -18,18 +22,18 @@
const toggler = event.currentTarget;
- if (toggler.classList.contains('ibexa-toggle--is-disabled')) {
+ if (toggler.classList.contains(this.disabledClass)) {
return;
}
- const isChecked = toggler.classList.toggle('ibexa-toggle--is-checked');
+ const isChecked = toggler.classList.toggle(this.checkedClass);
if (toggler.classList.contains('ibexa-toggle--radio')) {
const valueToSet = isChecked ? 1 : 0;
toggler.querySelector(`.form-check input[value="${valueToSet}"]`).checked = true;
} else {
- const toggleInput = toggler.querySelector('.ibexa-toggle__input');
+ const toggleInput = toggler.querySelector(this.inputsSelector);
toggleInput.checked = isChecked;
toggleInput.dispatchEvent(new Event('change'));
@@ -39,25 +43,25 @@
addFocus(event) {
event.preventDefault();
- const toggler = event.currentTarget.closest('.ibexa-toggle');
+ const toggler = event.currentTarget.closest('.ibexa-toggle, .ids-toggle');
- if (toggler.classList.contains('ibexa-toggle--is-disabled')) {
+ if (toggler.classList.contains(this.disabledClass)) {
return;
}
- toggler.classList.add('ibexa-toggle--is-focused');
+ toggler.classList.add(this.focusedClass);
}
removeFocus(event) {
event.preventDefault();
- const toggler = event.currentTarget.closest('.ibexa-toggle');
+ const toggler = event.currentTarget.closest('.ibexa-toggle, .ids-toggle');
- if (toggler.classList.contains('ibexa-toggle--is-disabled')) {
+ if (toggler.classList.contains(this.disabledClass)) {
return;
}
- toggler.classList.remove('ibexa-toggle--is-focused');
+ toggler.classList.remove(this.focusedClass);
}
toggleStateOnSpacePressed(event) {
diff --git a/src/bundle/Resources/public/js/scripts/cotf/create.js b/src/bundle/Resources/public/js/scripts/cotf/create.js
index d4e938c51c..721a159aea 100644
--- a/src/bundle/Resources/public/js/scripts/cotf/create.js
+++ b/src/bundle/Resources/public/js/scripts/cotf/create.js
@@ -1,5 +1,5 @@
(function (global, doc, ibexa, React, ReactDOMClient, Translator, Routing) {
- const btns = doc.querySelectorAll('.ibexa-btn--cotf-create');
+ const btns = doc.querySelectorAll('.ids-btn--cotf-create');
const udwContainer = doc.getElementById('react-udw');
let udwRoot = null;
const closeUDW = () => udwRoot.unmount();
diff --git a/src/bundle/Resources/public/js/scripts/details.js b/src/bundle/Resources/public/js/scripts/details.js
index e0d0e11297..3d8a9d4103 100644
--- a/src/bundle/Resources/public/js/scripts/details.js
+++ b/src/bundle/Resources/public/js/scripts/details.js
@@ -1,7 +1,7 @@
(function (global, doc) {
const showMoreBtns = doc.querySelectorAll('.ibexa-details__show-more-btn');
const toggleShowMore = (ellipsizedContent, showMoreBtn) => {
- const showMoreIcon = showMoreBtn.querySelector('.ibexa-details__show-more-btn-icon');
+ const showMoreIcon = showMoreBtn.querySelector('.ids-btn__icon');
const showMoreLabel = showMoreBtn.querySelector('.ibexa-details__show-more-label');
const showLessLabel = showMoreBtn.querySelector('.ibexa-details__show-less-label');
const ellipsizedLinesNo = getComputedStyle(ellipsizedContent).getPropertyValue('--ibexa-details__ellipsized-lines-no');
diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_author.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_author.js
index 117997bd48..1fd31d76d8 100644
--- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_author.js
+++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_author.js
@@ -1,6 +1,7 @@
(function (global, doc, ibexa) {
- const SELECTOR_REMOVE_AUTHOR = '.ibexa-btn--remove-author';
+ const SELECTOR_REMOVE_AUTHOR = '.ids-btn--remove-author';
const SELECTOR_AUTHOR = '.ibexa-data-source__author';
+ const SELECTOR_AUTHOR_CHECKBOX = '.ibexa-data-source__author-checkbox';
const SELECTOR_FIELD = '.ibexa-field-edit--ibexa_author';
const SELECTOR_LABEL = '.ibexa-data-source__label';
const SELECTOR_FIELD_EMAIL = '.ibexa-data-source__field--email';
@@ -104,17 +105,17 @@
toggleBulkDeleteButtonState(event) {
const container = event.target.closest(SELECTOR_FIELD);
- const checkboxes = container.querySelectorAll('.ibexa-input--checkbox');
+ const checkboxes = container.querySelectorAll(SELECTOR_AUTHOR_CHECKBOX);
const isAnyCheckboxSelected = [...checkboxes].some((checkbox) => checkbox.checked);
- const bulkDeleteButton = container.querySelector('.ibexa-btn--bulk-remove-author');
+ const bulkDeleteButton = container.querySelector('.ids-btn--bulk-remove-author');
bulkDeleteButton.toggleAttribute('disabled', !isAnyCheckboxSelected);
}
removeSelectedItems(event) {
const container = event.target.closest(SELECTOR_FIELD);
- const selectedCheckboxes = container.querySelectorAll('.ibexa-input--checkbox:checked');
- const bulkDeleteButton = container.querySelector('.ibexa-btn--bulk-remove-author');
+ const selectedCheckboxes = container.querySelectorAll(`${SELECTOR_AUTHOR_CHECKBOX}:checked`);
+ const bulkDeleteButton = container.querySelector('.ids-btn--bulk-remove-author');
selectedCheckboxes.forEach((checkbox) => checkbox.closest(SELECTOR_AUTHOR).remove());
@@ -123,7 +124,7 @@
const authorsRowsExist = !!container.querySelector(SELECTOR_AUTHOR);
if (!authorsRowsExist) {
- container.querySelector('.ibexa-btn--add-author').click();
+ container.querySelector('.ids-btn--add-author').click();
}
this.updateDisabledState(container);
@@ -246,19 +247,19 @@
},
{
isValueValidator: false,
- selector: '.ibexa-data-source__author .ibexa-input--checkbox',
+ selector: `.ibexa-data-source__author ${SELECTOR_AUTHOR_CHECKBOX}`,
eventName: 'change',
callback: 'toggleBulkDeleteButtonState',
},
{
isValueValidator: false,
- selector: '.ibexa-btn--bulk-remove-author',
+ selector: '.ids-btn--bulk-remove-author',
eventName: 'click',
callback: 'removeSelectedItems',
},
{
isValueValidator: false,
- selector: '.ibexa-btn--add-author',
+ selector: '.ids-btn--add-author',
eventName: 'click',
callback: 'addItem',
},
diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js
index 00825473c5..bf3189f868 100644
--- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js
+++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_gmap_location.js
@@ -453,8 +453,8 @@
const longitudeInput = field.querySelector(SELECTOR_LON_INPUT);
const latitudeInput = field.querySelector(SELECTOR_LAT_INPUT);
const areCoordsSet = !!longitudeInput.value.length && !!latitudeInput.value.length;
- const locateMeBtn = field.querySelector('.ibexa-data-source__locate-me .btn');
- const searchBtn = field.querySelector('.ibexa-btn--search-by-address');
+ const locateMeBtn = field.querySelector('.ibexa-data-source__locate-me .ids-btn--locate-me');
+ const searchBtn = field.querySelector('.ids-btn--search-by-address');
const mapContainer = field.querySelector('.ibexa-data-source__map');
let mapConfig = {
zoom: areCoordsSet ? 15 : 1,
diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js
index ac7bc1945d..7c8449d027 100644
--- a/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js
+++ b/src/bundle/Resources/public/js/scripts/fieldType/ibexa_keyword.js
@@ -61,7 +61,7 @@
invalidStateSelectors: [SELECTOR_TAGGIFY, SELECTOR_LABEL],
},
{
- selector: `${SELECTOR_FIELD} .ibexa-data-source__input.form-control`,
+ selector: `${SELECTOR_FIELD} .ibexa-data-source__input`,
eventName: 'change',
callback: 'validateKeywords',
errorNodeSelectors: [SELECTOR_ERROR_NODE],
@@ -70,7 +70,7 @@
],
});
- const keywordInput = field.querySelector('.ibexa-data-source__input-wrapper .ibexa-data-source__input.form-control');
+ const keywordInput = field.querySelector('.ibexa-data-source__input-wrapper .ibexa-data-source__input');
class EzKeywordTaggify extends ibexa.core.Taggify {
afterTagsUpdate() {
const tags = [...this.tags];
diff --git a/src/bundle/Resources/public/js/scripts/filters.action.btns.js b/src/bundle/Resources/public/js/scripts/filters.action.btns.js
index ea1569d8f3..5afef34a45 100644
--- a/src/bundle/Resources/public/js/scripts/filters.action.btns.js
+++ b/src/bundle/Resources/public/js/scripts/filters.action.btns.js
@@ -5,7 +5,7 @@
const clearBtn = container.querySelector('.ibexa-adaptive-filters__clear-btn');
const applyBtn = container.querySelector('.ibexa-adaptive-filters__submit-btn');
const dropdownNodes = [...container.querySelectorAll('.ibexa-dropdown')];
- const textInputNodes = [...container.querySelectorAll('.ibexa-input--text')];
+ const textInputNodes = [...container.querySelectorAll('.ids-input')];
const dateInputNodes = [...container.querySelectorAll('.ibexa-input--date')];
const originalValuesMap = new Map();
const dropdownSelectionsEqual = (selection1, selection2) => {
diff --git a/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js b/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js
index 9057dae6d7..1e1f8a1c4f 100644
--- a/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js
+++ b/src/bundle/Resources/public/js/scripts/helpers/form.validation.helper.js
@@ -1,6 +1,9 @@
import { getTranslator } from './context.helper';
import { getIconPath } from './icon.helper';
+const SELECTOR_INPUT = '.ids-input, .ibexa-input';
+const SELECTOR_LABEL = '.ids-label';
+
const formatErrorLine = (errorMessage) => {
const errorIcon = `
{% endblock %}
{% block footer_content %}
-
- {{ 'version.conflict.form.continue'|trans|desc('Continue') }}
-
-
+
+ {{ 'version.conflict.form.continue'|trans({}, 'ibexa_version_conflict')|desc('Continue') }}
+
+
+ {{ 'version.conflict.form.cancel'|trans({}, 'ibexa_version_conflict')|desc('Cancel') }}
+
{% endblock %}
{% endembed %}
diff --git a/src/bundle/Resources/views/themes/admin/content/tab/content.html.twig b/src/bundle/Resources/views/themes/admin/content/tab/content.html.twig
index 9686cd352f..0b4591ac82 100644
--- a/src/bundle/Resources/views/themes/admin/content/tab/content.html.twig
+++ b/src/bundle/Resources/views/themes/admin/content/tab/content.html.twig
@@ -5,7 +5,7 @@
{% if languages|length > 1 %}