# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## \[1.34.0] - 2026-09-08

* Update type definitions for `NodeSelector` and `ListSelector` to reflect the `selectable` prop based on the `type` prop.
* Extend JSDoc with descriptions for all props in components.

## \[1.33.1] - 2026-06-17

* Restore hidden input for focus management.
* Do not read required asterisk with screens readers.

## \[1.33.0] - 2026-06-09

* Add `expandable` prop for Panel component to make it collapsible.
* Handle nested Panel components properly with correct heading levels and context.
* Add `headingLevel` prop for Panel component to allow custom heading levels.

## \[1.32.1] - 2026-06-04

* Add missing styling for help text in Checkbox.

## \[1.32.0] - 2026-06-04

* Add `description` prop for Checkbox.
* Add missing types for prop `icon` in CustomList.

## \[1.31.0] - 2026-04-10

* Add error messages for when fetching data for `ImageSelector` and `RepositoryNodeSelector` fails due to lack of permissions or REST-API being disabled or restricted.
* New `fetchRestApi` utility function for fetching data from the REST-API with proper error handling.
* Add missing default slot for `TextList` component.
* Set label as `undefined` correclty in `RadioGroup`.

## \[1.30.1] - 2026-02-25

* Improve type definitions for `createAppProps` and `createConfigApp` to correctly infer the props.

## \[1.30.0] - 2026-02-25

* Add a `res.render({})` call for `createAppProps` and `createAppContext` to correctly render the size selector in widget configs.
* Deprecate `createAppProps(props)`, use `createAppProps(props, res)` instead.
* Value in `Checkbox` component now has a default value of `undefined`.

## \[1.29.1] - 2025-08-22

* Update type definitions.

## \[1.29.0] - 2025-07-31

* Add function to add items to `CustomList`.

## \[1.28.2] - 2025-06-05

* Swap places of `description` prop and slot for Svelte 5 compatibility.

## \[1.28.1] - 2025-05-19

* Remove `readonly` prop from `NodeSelector` since it’s not applicable.

## \[1.28.0] - 2025-05-15

* Add a `description` prop and slot to most components.

## \[1.27.17] - 2025-05-08

* Update type definitions.
* App decimals prop to `NumberSpinner`.
* Fix documentation links.

## \[1.27.16] - 2025-03-11

* Update type definitions.

## \[1.27.15] - 2025-02-21

* Update references to `@soleil/config-validate` to `@soleil-se/config-validate`.

## \[1.27.14] - 2025-02-21

* Fix links and README references.

## \[1.27.13] - 2025-02-21

* Disallow the selection folders in `ImageSelector`.
* Move data holder in `CheckboxGroup` for correct margins.
* Fixa margins for help text in form groups.

## \[1.27.12] - 2025-01-30

* Properly clear value in `DropdownSelector`.

## \[1.27.11] - 2025-01-10

* Add definitions for new types in components.

## \[1.27.10] - 2025-01-10

* Value in `CheckboxGroup` should always be an array.

## \[1.27.9] - 2024-11-29

* Value was always an array in CustomSelector.

## \[1.27.8] - 2024-11-26

* Templates in `CustomList` was not working properly in Svelte 5.

## \[1.27.7] - 2024-11-12

* Handle single values in `CustomSelector` without throwing an error.

## \[1.27.6] - 2024-11-08

* Call `window.sv.setValues` in `createConfigApp` to set values outside of the app, for example widget size.

## \[1.27.5] - 2024-10-23

* Handle numerical values in `CustomSelector` when using `multiple` correctly.

## \[1.27.4] - 2024-09-30

* Add missing labels for buttons in sortable lists (CustomList, TextList).

## \[1.27.3] - 2024-09-26

* Add TypeScript definitions for API functions and move all type declarations to the types folder.

## \[1.27.2] - 2024-08-19

* Custom template for CustomSelector options and results now works properly with `multiple` prop.

## \[1.27.1] - 2024-08-12

* Adjust import paths for components in index.js.

## \[1.27.0] - 2024-08-12

* Add type definitions for all props in components.

## \[1.26.3] - 2024-06-28

* Update dependencies.

## \[1.26.2] - 2024-05-23

* More lenient `@sitevision/api` peer dependency range.

## \[1.26.1] - 2024-05-22

* Update `@soleil/config-validate` dependency to 1.2.0.

## \[1.26.0] - 2024-05-21

* Add possibility to customize content for radio buttons in a radio group.

## \[1.25.1] - 2024-05-13

* Now possible to set default value in `SelectField` with `value` prop.

## \[1.25.0] - 2024-05-07

* Add callback to `createConfigApp` function for more flexibility when creating a config app.
* Rewrite of `CustomList` edit modal handling to work with Svelte 5.
* Remove all self closing tags in components.
* Remove `focus-visible` polyfill.

## \[1.24.1] - 2024-04-29

* Add Svelte 5 as a peer dependency.

## \[1.24.0] - 2024-04-18

* Add label slot for most components.

## \[1.23.0] - 2024-03-07

* List item templating in `CustomList` with [CustomListItemTemplate](/packages/config-svelte/components/customlist/#list-item-template).
* Trigger manual update of `CustomList` with [triggerUpdate](/packages/config-svelte/components/customlist/#dynamic-content) function.

## \[1.22.0] - 2024-02-13

* More lenient `@sitevision/api` peer dependency range.
* Try to use `window.sv.getValues()` first since `window._getValues()` is deprecated.

## \[1.21.0] - 2023-10-13

* Add `legendVisuallyHidden` prop for [RadioGroup](/packages/config-svelte/components/radiogroup) and [CheckboxGroup](/packages/config-svelte/components/checkboxgroup).
* Add `class` prop for [Panel](/packages/config-svelte/components/panel).
* Add `removable` prop for [CustomSelector](/packages/config-svelte/components/customselector).

## \[1.20.1] - 2023-09-25

* Fix element containting title in [Modal](/packages/config-svelte/components/modal).

## \[1.20.0] - 2023-09-25

* Add footer slot in [Modal](/packages/config-svelte/components/modal).

## \[1.19.0] - 2023-05-17

* Add Svelte 4 support.

## \[1.18.2] - 2023-05-17

* Add attribute `data-a11y-dialog-ignore-focus-trap` to select2 based dropdown content to remedy focus management.

## \[1.18.1] - 2023-02-27

* More lenient `@sitevision/api` peerDependency to prevent problems with their new version structure.

## \[1.18.0] - 2023-01-20

* Option templating in [CustomSelector](/packages/config-svelte/components/customselector).
* Add global Select2 styling.
* Modal now closes open Select2 dropdowns.

## \[1.17.0] - 2022-12-01

* New component: [RepositoryNodeSelector](/packages/config-svelte/components/repositorynodeselector).
* New utility API: [getAppContext](/packages/config-svelte#getappcontext).
* New server API: [createAppContext](/packages/config-svelte#context)

## \[1.16.2] - 2022-11-24

* [ListSelector](/packages/config-svelte/components/listselector) now works properly in [CustomList](/packages/config-svelte/components/customlist).

## \[1.16.1] - 2022-11-18

* Suppress `a11y-click-events-have-key-events` since the key events are handled on other elements.

## \[1.16.0] - 2022-11-09

* Add singular and plural suffix support for [NumberSpinner](/packages/config-svelte/components/numberspinner)

## \[1.15.0] - 2022-09-15

* Required was not re-evaluated properly in [InputField](/packages/config-svelte/components/inputfield), [NodeSelector](/packages/config-svelte/components/nodeselector) and [TagSelector](/packages/config-svelte/components/tagselector).
* Add `show` prop for all components to toggle visibility without re-rendering.

## \[1.14.0] - 2022-07-07

* Add default slot for [ImageSelector](/packages/config-svelte/components/imageselector).
* Margin fix for [RadioGroup](/packages/config-svelte/components/radiogroup).

## \[1.13.0] - 2022-06-23

* Add `icon` prop to CustomList for setting an icon to the list items.

## \[1.12.1] - 2022-05-24

* Fixed that values wasn’t saved properly in Modal and CustomList.

## \[1.12.0] - 2022-05-23

* New component: [Modal](/packages/config-svelte/components/modal).
* New component: [CustomList](/packages/config-svelte/components/customlist).

## \[1.10.1] - 2022-03-08

* Cast saved value to Number in [NumberSpinner](/packages/config-svelte/components/numberspinner).
* Fix reactivity for `suffix` prop in [NumberSpinner](/packages/config-svelte/components/numberspinner).

## \[1.10.0] - 2022-03-07

* Added `multiple` prop for [CustomSelector](/packages/config-svelte/components/customselector).
* First value is always selected in [RadioGroup](/packages/config-svelte/components/radiogroup) if nothing is selected.

## \[1.9.0] - 2021-12-06

* Added [CustomSelector](/packages/config-svelte/components/customselector)

## \[1.8.4] - 2021-12-03

* Removable prop was not working on NodeSelector.

## \[1.8.3] - 2021-12-01

* Remove hidden input for LinkSelector to fix bug with trashed / removed pages and files introduced in Sitevision 9.1.

## \[1.8.2] - 2021-11-26

* Use nullish coalescing when determining option value in SelectField.

## \[1.8.1] - 2021-11-19

* Empty mounting point of app since hydration is disabled.

## \[1.8.0] - 2021-11-18

* Improvements for passing server data to the app.
* Remove `hydrate` option since we’re never using SSR in config apps.
* Properly target div with id `app_root` when rendering app.

## \[1.7.0] - 2021-09-24

* Added `sortable` prop for `ListSelector`.

## \[1.6.0] - 2021-08-25

* Added I18n utility.
* Added Translations for components with translatable text.
* Spread rest props on input element in InputField.
* Docs with links to readme for each component.

## \[1.5.2] - 2021-08-18

* DropdownSelector values was not saved properly when set multiple times.

## \[1.5.1] - 2021-08-12

* Initialization when rerendering or conditionally render DropdownSelectors.

## \[1.5.0] - 2021-06-29

* Added TagSelector component

## \[1.4.0] - 2021-05-19

* TextList component rewrite.
* Remove CheckboxGroup value workaround as it’s not needed.
* Added type shorthand for ListSelector.
* Was possible to circumvent alt-text requirement in ImageSelector

## \[1.3.1] - 2021-04-29

* Default value for LinkSelector type is not set.
* ImageSelector does not clear alt-text from image archive.

## \[1.3.0] - 2021-04-28

* Added type shorthands for DropdownSelector, NodeSelector and ListSelector.
* ImageSelector component.
* Fixed scroll problems.

## \[1.2.1] - 2021-04-09

* Mail and tel values in LinkSelector are prefixed with `mailto:` and `tel:`.

## \[1.2.0] - 2021-03-30

* Mail and tel types to LinkSelector.
* Value in NumberSpinner is now left aligned.
* Fixed unable to clear value in LinkSelector.

## \[1.1.2] - 2021-03-11

* Unable to remove last item in TextList.
* TextList is not validated when `required` prop is used

## \[1.1.1] - 2021-02-02

* Added docs NumberSpinner.

## \[1.1.0] - 2021-01-29

* Added `suffix` prop to NumberSpinner.

## \[1.0.4] - 2021-01-15

* Fix ListSelector inifity loop.

## \[1.0.3] - 2021-01-11

* Remove debug output.

## \[1.0.2] - 2021-01-11

* Array destructuring not working in TextList for IE11.
* RadioGroup value not working in IE11.
* Added missing polyfills for IE11 in docs and demo.

## \[1.0.1] - 2020-12-08

* Selectable props in NodeSelector, ListSelector and DropdownSelector now also accepts a string.
* Margin on CheckboxGroup and RadioGroup controls.

## \[1.0.0] - 2020-11-20

* Initial release!