# 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).

## [Unreleased]

## [1.4.0] - 2023-11-07
### Changed
- Upgrade dependency libraries of template-annotation ([MGNLFE-511](https://jira.magnolia-cms.com/browse/MGNLFE-511))
- Changes listeners variable scope from global scope to page scope ([MGNLFE-428](https://jira.magnolia-cms.com/browse/MGNLFE-428))
- Apply the same code format and linter for all ([MGNLFE-350](https://jira.magnolia-cms.com/browse/MGNLFE-350))

### Removed
- Remove iframe checks ([MGNLFE-155](https://jira.magnolia-cms.com/browse/MGNLFE-155))

## [1.3.2] - 2023-02-06
### Changed
- Check for null value before using `variant` variable ([MGNLFE-404](https://jira.magnolia-cms.com/browse/MGNLFE-404))

## [1.3.1] - 2022-10-31
### Changed
- Check `window` object before initializing `PageEditorBridge` ([MGNLFE-335](https://jira.magnolia-cms.com/browse/MGNLFE-335))

### Fixed
- Create variants for component with area not working properly ([MGNLFE-309](https://jira.magnolia-cms.com/browse/MGNLFE-309))

## [1.3.0] - 2022-08-11
### Added
- Simplify usage of frontend-helpers with magnoliaContext ([MGNLFE-232](https://jira.magnolia-cms.com/browse/MGNLFE-232), [MGNLFE-303](https://jira.magnolia-cms.com/browse/MGNLFE-303))

### Changed
- Use relative url to build magnolia context object ([MGNLFE-280](https://jira.magnolia-cms.com/browse/MGNLFE-280))

### Fixed
- Navigation between pages ([MGNLFE-187](https://jira.magnolia-cms.com/browse/MGNLFE-187))
- Add content exists check when accessing content['@path'] ([MGNLFE-216](https://jira.magnolia-cms.com/browse/MGNLFE-216))
- Greenbars sometimes not appearing on a SSG project ([MGNLFE-208](https://jira.magnolia-cms.com/browse/MGNLFE-208))
- Refresh call inconsistency and reduce refresh calls ([MGNLFE_281](https://jira.magnolia-cms.com/browse/MGNLFE-281))

### Deprecated
- Template definitions endpoint deprecated ([MGNLFE-229](https://jira.magnolia-cms.com/browse/MGNLFE-229))

## [1.2.1-beta] - 2022-06-17
### Changed
- Checks mgnlFrameReady function is ready before calling it ([MGNLFE-208](https://jira.magnolia-cms.com/browse/MGNLFE-208))

## [1.2.0] - 2021-12-14

## [1.2.0-beta] - 2021-11-26
### Added
- Synchronize selected variants with server side ([MGNLFE-500](https://jira.magnolia-cms.com/browse/PAGES-500))

## [1.1.2] - 2021-10-27
### Changed
- Return original content when inPreviewAsVisitor ([MGNLFE-139](https://jira.magnolia-cms.com/browse/MGNLFE-139))
- Hide deprecation messages until page navigation in angular and vue is fixed ([MGNLFE-138](https://jira.magnolia-cms.com/browse/MGNLFE-138))
- Print warning message regarding SSR in dev mode only ([MGNLFE-140](https://jira.magnolia-cms.com/browse/MGNLFE-140))

## [1.1.1] - 2021-10-14
### Changed
- Render selected variant also in preview. ([MGNLFE-134](https://jira.magnolia-cms.com/browse/MGNLFE-134))

## [1.1.0] - 2021-10-12
### Added
- Add PageEditorBridge service to support externally hosted SPA ([MGNLFE-108](https://jira.magnolia-cms.com/browse/MGNLFE-108), [MGNLFE-130](https://jira.magnolia-cms.com/browse/MGNLFE-130), [MGNLFE-109](https://jira.magnolia-cms.com/browse/MGNLFE-109))
- Add global.mgnlInPageEditor check for SSR ([MGNLFE-118](https://jira.magnolia-cms.com/browse/MGNLFE-118))
- Provision empty area nodes in the content ([MGNLFE-117](https://jira.magnolia-cms.com/browse/MGNLFE-117))

### Changed
- Remove unnecessary functions from PersonalizationService ([MGNLFE-124](https://jira.magnolia-cms.com/browse/MGNLFE-124))

## [1.1.0-beta2] - 2021-08-05
### Added
- Forward all preview prefix parameters to the REST endpoint ([MGNLFE-103](https://jira.magnolia-cms.com/browse/MGNLFE-103))
- Call refresh on component and area changes. ([MGNLFE-100](https://jira.magnolia-cms.com/browse/MGNLFE-100))
- Accommodate `inEditor` and `inPreview` checks for externally hosted SPA.

## [1.1.0-beta] - 2021-07-05
### Added
- `PersonalizationService` is added to help build stateless queries and get personalization contents. ([MGNLFE-95](https://jira.magnolia-cms.com/browse/MGNLFE-95))

## [1.0.6] - 2021-02-08
### Added
- Log a warning when a template ID is not mapped to any component. ([MGNLFE-50](https://jira.magnolia-cms.com/browse/MGNLFE-50))
- New callback for refreshing Page Editor after the frame is ready. ([MGNLFE-85](https://jira.magnolia-cms.com/browse/MGNLFE-85))

## [1.0.5] - 2020-07-21
### Added
- Allow using dialogs at area level. ([MGNLFE-58](https://jira.magnolia-cms.com/browse/MGNLFE-58))

## [1.0.4] - 2020-06-23

## [1.0.3] - 2020-06-23

## [1.0.2] - 2020-05-25
### Added
- `inEditorPreview()` method added to `EditorContextHelper`. ([MGNLFE-42](https://jira.magnolia-cms.com/browse/MGNLFE-42))

### Changed
- `inEditor()` and `inEditorPreview()` methods are now consistent with FreeMarker templating functions. ([MGNLFE-45](https://jira.magnolia-cms.com/browse/MGNLFE-45))

## [1.0.1] - 2020-04-29
### Added
- Introduced changelog file.
- Provide global object `this` to enable webpack builds. ([MGNLFE-23](https://jira.magnolia-cms.com/browse/MGNLFE-23))
- Add `EditorContextHelper` for checking whether the app is running in Page Editor, and for refreshing the control bars. ([MGNLFE-31](https://jira.magnolia-cms.com/browse/MGNLFE-31), [MGNLFE-26](https://jira.magnolia-cms.com/browse/MGNLFE-26))

## [1.0.0] - 2020-03-27
### Added
- first release

[Unreleased]: https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/template-annotations
[1.4.0]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.4.0
[1.3.2]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.3.2
[1.3.1]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.3.1
[1.3.0]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.3.0
[1.2.1-beta]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.2.1-beta
[1.2.0]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.2.0
[1.2.0-beta]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.2.0-beta
[1.1.2]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.1.2
[1.1.1]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.1.1
[1.1.0]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.1.0
[1.1.0-beta2]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.1.0-beta2
[1.1.0-beta]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.1.0-beta
[1.0.6]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.6
[1.0.5]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.5
[1.0.4]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.4
[1.0.3]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.3
[1.0.2]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.2
[1.0.1]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.1
[1.0.0]: https://www.npmjs.com/package/@magnolia/template-annotations/v/1.0.0
