2026-03-13 22:21:37 +01:00
|
|
|
/**
|
|
|
|
|
* Shows/hides SSO configuration fields based on tenant SSO toggle.
|
|
|
|
|
*/
|
2026-04-13 21:31:59 +02:00
|
|
|
import { syncControlState, createConditionalToggleInit } from '../core/app-conditional-controls.js';
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
|
|
|
|
|
const initRoot = (root) => {
|
|
|
|
|
const enabledInput = root.querySelector('[data-tenant-sso-enabled]');
|
|
|
|
|
if (!(enabledInput instanceof HTMLInputElement)) {
|
feat: extend module platform with UI slots, runtime components, CLI tooling and {{userId}} search support
Completes the generic module platform that enables modules to contribute
UI elements, runtime JS components, and search resources without any
core hardcoding.
New generic UI slot types:
- topbar.right_item: module-contributed topbar buttons
- layout.body_end_template: module-contributed dialog/overlay templates
- layout.head_style: module-contributed global CSS
- runtime.component: declarative JS component registration with phase ordering
New infrastructure:
- ModuleAutoloader: PSR-4 autoloading for module-local PHP classes
- ModuleRuntimePageBuilder: symlinks module pages into runtime directory
- ModuleRuntimeAssetPublisher: publishes module CSS/JS to web/modules/
- ModulePermissionSynchronizer: syncs module permissions to DB
- CLI scripts: module-runtime-sync, module-build, module-migrate,
module-permissions-sync, module-assets-sync
- {{userId}} placeholder in SearchDataService for user-scoped search queries
- Component runtime with phased initialization (early/default/late)
- AppContainer.protectExistingBindings() to prevent module→core overwrites
- Architecture tests: ModuleStructureContractTest, CoreTemplateIsolationTest,
FrontendComponentRuntimeContractTest, AppContainerIsolationContractTest
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:19:56 +01:00
|
|
|
return null;
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const syncToggle = root.querySelector('[data-tenant-sso-sync-toggle]');
|
|
|
|
|
const sharedToggle = root.querySelector('[data-tenant-sso-shared-toggle]');
|
|
|
|
|
const enabledBlocks = root.querySelectorAll('[data-tenant-sso-when-enabled]');
|
|
|
|
|
const syncFieldsBlock = root.querySelector('[data-tenant-sso-sync-fields]');
|
|
|
|
|
const overrideDetails = root.querySelector('[data-tenant-sso-override-details]');
|
|
|
|
|
const overrideFields = root.querySelectorAll('[data-tenant-sso-override-fields]');
|
|
|
|
|
|
|
|
|
|
const updateUi = () => {
|
|
|
|
|
const ssoEnabled = enabledInput.checked;
|
|
|
|
|
const syncEnabled = syncToggle instanceof HTMLInputElement ? syncToggle.checked : false;
|
|
|
|
|
const useSharedApp = sharedToggle instanceof HTMLInputElement ? sharedToggle.checked : true;
|
|
|
|
|
|
|
|
|
|
enabledBlocks.forEach((block) => syncControlState(block, ssoEnabled));
|
|
|
|
|
syncControlState(syncFieldsBlock, ssoEnabled && syncEnabled);
|
|
|
|
|
|
|
|
|
|
if (overrideDetails instanceof HTMLElement) {
|
|
|
|
|
overrideDetails.hidden = !ssoEnabled;
|
|
|
|
|
if (!ssoEnabled && overrideDetails instanceof HTMLDetailsElement) {
|
|
|
|
|
overrideDetails.open = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
overrideFields.forEach((block) => syncControlState(block, ssoEnabled && !useSharedApp));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enabledInput.addEventListener('change', updateUi);
|
|
|
|
|
if (syncToggle instanceof HTMLInputElement) {
|
|
|
|
|
syncToggle.addEventListener('change', updateUi);
|
|
|
|
|
}
|
|
|
|
|
if (sharedToggle instanceof HTMLInputElement) {
|
|
|
|
|
sharedToggle.addEventListener('change', updateUi);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateUi();
|
feat: extend module platform with UI slots, runtime components, CLI tooling and {{userId}} search support
Completes the generic module platform that enables modules to contribute
UI elements, runtime JS components, and search resources without any
core hardcoding.
New generic UI slot types:
- topbar.right_item: module-contributed topbar buttons
- layout.body_end_template: module-contributed dialog/overlay templates
- layout.head_style: module-contributed global CSS
- runtime.component: declarative JS component registration with phase ordering
New infrastructure:
- ModuleAutoloader: PSR-4 autoloading for module-local PHP classes
- ModuleRuntimePageBuilder: symlinks module pages into runtime directory
- ModuleRuntimeAssetPublisher: publishes module CSS/JS to web/modules/
- ModulePermissionSynchronizer: syncs module permissions to DB
- CLI scripts: module-runtime-sync, module-build, module-migrate,
module-permissions-sync, module-assets-sync
- {{userId}} placeholder in SearchDataService for user-scoped search queries
- Component runtime with phased initialization (early/default/late)
- AppContainer.protectExistingBindings() to prevent module→core overwrites
- Architecture tests: ModuleStructureContractTest, CoreTemplateIsolationTest,
FrontendComponentRuntimeContractTest, AppContainerIsolationContractTest
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:19:56 +01:00
|
|
|
return () => {
|
|
|
|
|
enabledInput.removeEventListener('change', updateUi);
|
|
|
|
|
if (syncToggle instanceof HTMLInputElement) {
|
|
|
|
|
syncToggle.removeEventListener('change', updateUi);
|
|
|
|
|
}
|
|
|
|
|
if (sharedToggle instanceof HTMLInputElement) {
|
|
|
|
|
sharedToggle.removeEventListener('change', updateUi);
|
|
|
|
|
}
|
|
|
|
|
};
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
};
|
|
|
|
|
|
2026-04-13 21:31:59 +02:00
|
|
|
export const initTenantSsoToggle = createConditionalToggleInit({
|
|
|
|
|
rootSelector: '[data-tenant-sso-root]',
|
|
|
|
|
boundKey: 'tenantSsoToggleBound',
|
|
|
|
|
initRoot,
|
|
|
|
|
});
|