@masterteam/system-settings
v0.0.12
Published
`mt-system-settings` loads and updates the host's system settings through the configured `apiBasePath` (default: `settings`).
Readme
@masterteam/system-settings
mt-system-settings loads and updates the host's system settings through the
configured apiBasePath (default: settings).
General Settings Layout
The responsive general-settings grid contains three cards:
- Date, Time & Weekend for date/time formats and weekend days. The stored timezone region is preserved but is not editable from this card.
- Currency for the default currency and display format.
- Explore Experience for the default Explore view.
Host Cache Contract
After a successful getsystemsettings response, and again after a successful
updatesystemsettings request, the component stores the complete canonical
SystemSetting[] array in:
localStorage['systemSettings.settings']Consumers must resolve settings by their key; array position is not an
identity. The Currency value keeps the backend contract unchanged:
{
key: 'Currency',
label: 'Currency',
description: 'Currency',
value: {
name: 'SAR',
unit: { en: 'SAR', ar: 'ريال سعودي' },
format: '{0:#,0.00}',
},
}The cache is written only after the backend request succeeds. Unavailable or blocked browser storage does not convert a successful API operation into a UI error.
