@wix/site-service-renderer-configuration
v1.0.1
Published
Service exposing renderer configuration values for HIPAA compliance, site currency, routers, and URL mappings.
Maintainers
Keywords
Readme
@wix/site-service-renderer-configuration
Service exposing renderer configuration values for HIPAA compliance, site currency, routers, and URL mappings.
Install
yarn add @wix/site-service-renderer-configurationUsage
import { RendererConfigurationDefinition } from '@wix/site-service-renderer-configuration/definition'
import { RendererConfigurationService } from '@wix/site-service-renderer-configuration/implementations'
createServicesMap().addService(RendererConfigurationDefinition, RendererConfigurationService, config)
const service = servicesManager.getService(RendererConfigurationDefinition)
service.currency
service.routersMap
service.urlMappingsAPI
| Member | Type | Throws when | Description |
|---|---|---|---|
| isHipaaCompliant | boolean | never | Whether the renderer model marks the site as HIPAA-compliant. |
| currency | string | never | Site configured currency from sitePropertiesInfo.currency. |
| routersMap | Record<string, RouterConfig> | never | Map of router ID to router configuration. |
| urlMappings | Record<string, string> | never | Map of old paths to new paths for custom URL routing. |
| _updateConfig(config) | (config: Partial<IRendererConfigurationServiceConfig>) => void | never | Internal/editor API for model-update handlers. |
Configuration
IRendererConfigurationServiceConfig:
type IRendererConfigurationServiceConfig = {
isHipaaCompliant: boolean
currency: string
routersMap: Record<string, RouterConfig>
urlMappings: Record<string, string>
}
type RouterConfig = {
prefix: string
appDefinitionId: string
extensionId: string
}The provider is responsible for injecting the complete config. _updateConfig replaces only fields present in the partial config; an empty partial is a no-op.
Reactivity
This service is signal-backed. Consumers that read getters inside reactive computations will observe updates made through _updateConfig.
