Compare commits

..
2035 Commits
Author SHA1 Message Date
Nhu DinhandGitHub 59f9bf290d Build: V15 Disable schedule nightly E2E trigger (#22203)
Disable schedule nightly E2E trigger
2026-03-20 17:00:08 +07:00
b6b8f54c65 V15 QA Added the authorization integration tests (#18419)
* Added authorization integration tests

* Removed unnecessary tests and update tests for preview controller

* Updated to use the newest changes from v15/dev and added an override for the AuthenticateClientAsync to use the userGroupKey

* Updated CompatibilitySuppressions to include changes from integration tests

* Updated pipelines

* Skips managementApi tests

* Only run necessary tests

* Added new schema per fixture to reduce test setup time

* Fixed failing tests

* Updated test setup

* Updated test

* Added suppression

* Fixed failing tests

* Updated addOnTeardown methods to protected

* Added method for clearing the host

* Added teardown

* Updated model usage

* Added a lot of cleanup for memory leak issues when running tests

* Added CompatibilitySuppressions.xml

* Updated tests

* Cleaned up

* Adjusted base classes

* Updated pipeline

* Updated CompatibilitySuppressions.xml

* Updated test logging

* Fixed reponse

* Updated condition to skip tests

* Updated tests, not done

* Reworked test to expect correct responses with correct setup

* Updated tests

* More updates to tests

* Updated tests

* Cleaned up tests

* Updated setup

* Cleaned up tests to match setup

* Cleaned up setup

* Removed suppression

* Fixed tests

* Move order of checks

* Fix naming

* Formatting

* Dispose of host

* Keep track of if we're disposed

* Compat suppression

* Dont dispose

* Fix failing tests

* removed unused virtual

* Updated CompatibilitySuppressions.xml

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-10-06 20:49:09 +02:00
Andreas ZerbstandGitHub 50139ee506 E2E Pipeline: QA Remove continue on error condition (#20356)
* Removed continue on error

* Planted flaky test for testing on pipeline

* Fixed test
2025-10-03 09:39:05 +07:00
Andreas ZerbstandGitHub 62947b2862 V15 QA Added external login provider tests and split pipeline into templates (#20049)
* Added setup for external login

* Started on yaml

* Added test file

* Updated pipeline

* Use env vars

* Added env variables and commented out test we don't need to run

* Removed list from matrix

* Updated condition

* Updated package path

* Updated testFolder

* double slash

* Updated condition

* Updated condition again

* Added port

* Removed redundant values

* Set as env vars

* Added env vars beneath matrix

* Get env

* Updated naming

* Updated usage of values

* Added a check for client id, to see if value set

* Moved env out of pool

* Tried moving env

* Trying to fix the env being empty

* Removed env

* Updated name of variable

* Fixed A cyclical reference

* Updated typo

* More logging

* Reverted change

* Added env

* Added env to tests

* Cleaned up

* Added yaml template files

* Updated nighly pipepline to use templates

* Updated sln

* Split yaml into templates for e2e setup

* Updated pipeline

* Updated solution file

* Set value

* Added if statement

* Added variables

* Set default values

* Updated values

* Updated condition

* Run multiple tests

* Added env

* Updated from parameter to variable

* Fixed condition

* Fixed condition to use actual value

* Updated npx wait on command

* Updated pwsh

* Updated port again

* Updated port value

* Updated wait on

* Updated condition

* Restructured

* Updated var

* Updated run application steps

* Added echo

* Updated to boolean

* Updated conditions

* Updated test template usage

* Added databaseType

* Added another databaseType

* Split up templates

* Fixed indentation

* Updated condition

* updated path

* removed build from path

* Updated conditions for azureAd

* Fixed indentation

* Updated to single qoutes

* Cleaned up

* Removed unused file

* Clarified namin

* Moved

* Updated pipeline, not done

* Updated locator

* Updated pipelines

* Updated test helpers package

* Skipped build stage for default app settings tests

* Updated password var

* Updated locators

* Updated defaultconfig build setup

* Split E2E stage in two

* Added parameter for skipping integration tests

* Cleaned up

* Added ASPNETCORE_URLS
2025-09-05 08:42:58 +02:00
Andreas ZerbstandGitHub 1748a08f7b V15 QA updated failing acceptance tests on the nightly pipeline (#19882)
* Updated tests

* Bumped test helpers
2025-08-11 09:05:17 +02:00
Andreas ZerbstandGitHub 3264d58f13 V15 QA acceptance tests with appsettings (#19550)
* Start of appsetting

* Updated setup of playwright

* Adjusted the pipeline

* Updated appsetting

* Added install test

* Added comments

* Updated pipeline

* Updated development app settings

* Commented tests out

* comment

* Added if statement

* Updated pipeline

* Fixed condition

* Changed to production

* Added a log

* Updated copy item

* Added

* Updated app settings

* Updated pipeline

* Moved playwright login

* Updated pipeline

* Updated app setting

* Updated nightly

* Updated appsettings

* Updated get

* Updated wait on

* Updated appsettings

* Updated connection string

* Updates

* Skips code

* Updated variable

* Updated pipeline

* We want to always retain the trace, to see if the test runs as expected on the pipeline

* Added a temporary wait till port is open

* Fixed condition

* Added missing tcp for wait on

* Updated URL env

* Updated setup

* Fixed string

* Updated locator

* Split tests into SQLite and SQLServer

* Updated pipeline to run all tests

* Retain trace on failure

* Added testFolder var

* Added appsettings and program for delivery api tests

* Updated playwright config

* Split test runners into defaultconfig and different app settings

* Added delivery api tests

* Cleaned up tests

* Bumped version

* Updated pipeline

* Small fixes

* Added password

* Updated connection string

* Fixed

* Removed quotes

* Removed unnecessary connection string

* Added missing password

* Cleaned up

* Cleaned up

* Cleaned up

* Updated to use helpers

* Bumped version

* Updated helper usage

* Added password to variables and a condition

* Added check

* Indented value

* Fixed condition

* More updates

* Updated variable
2025-08-05 11:22:03 +02:00
Andy Butland b6be468b3a Merge branch 'v15/dev' of https://github.com/umbraco/Umbraco-CMS into v15/dev 2025-07-29 07:18:37 +02:00
Andy Butland 3ec88aab65 Merge branch 'release/15.4.4' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-07-29 07:18:24 +02:00
da43086017 Merge commit from fork
Co-authored-by: kjac <kja@umbraco.dk>
2025-07-29 05:10:52 +02:00
d62fe5e315 Fix issue with use of EF Core scopes within notification handlers (take 2 - handling scopes with a base parent) (#19797)
* Add integration tests that shows the problem

* Fix the problem and add explenation

* Improved comments slightly to help when we come back here!
Moved tests alongside existing ones related to scopes.
Removed long running attribute from tests (they are quite fast).

* Fixed casing in comment.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-25 13:10:44 +02:00
Andy Butland 852192a5d2 Bumped package.json version to 15.4.4. 2025-07-24 09:27:21 +02:00
Andy Butland f4498c3d05 Bumped version to 15.4.4. 2025-07-21 11:56:22 +02:00
Nhu DinhandGitHub b045b33049 V15 QA Removed unused API acceptance tests (#19680)
Removed unused API acceptance tests
2025-07-09 10:11:37 +07:00
LiliandGitHub 32a4fbebd5 V15 Bugfix: Horizontal scrollbar in Media section #19479 (#19541)
fix to stop the scroll bar appearing in the media section.
2025-06-30 14:52:35 +02:00
Andy Butland cc2f1df78e Merge branch 'release/15.4.3' into v15/dev
# Conflicts:
#	version.json
2025-06-10 11:43:50 +02:00
Andy ButlandandCopilot 9b2fd1253b Optimize initialization of document URLs on start-up (#19498)
* Optimize initialization of document URLs on startup.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-10 10:31:26 +02:00
Andy Butland 024697f3bf Bumped version to 15.4.3 2025-06-10 10:28:55 +02:00
Andy Butland d8b76575ca Merge branch 'v15/dev' of https://github.com/umbraco/Umbraco-CMS into v15/dev 2025-06-03 07:04:56 +02:00
Andy Butland 5b00312158 Merge branch 'release/15.4.2' into v15/dev
# Conflicts:
#	version.json
2025-06-03 07:04:43 +02:00
Andy ButlandandGitHub d920e93d1e Merge commit from fork 2025-06-03 05:21:11 +02:00
MoleandGitHub feba51a49d Use correct service name in obsoletion method (#19398)
Use correct service in obsoletion method
2025-05-23 09:46:16 +00:00
Andy Butland 853c1acf7e Bumped version to 15.4.2 2025-05-20 13:10:02 +01:00
3f10bd8c21 Added logging and try/catch around retrieval of references, so we don't block critical operations following an incompatible data type change (#18576)
* Added logging and try/catch around retrieval of references, so we don't block critical operations following an incompatible data type change.

* Added a little more detail to the log message.

* Added a little more detail to the log message.

* Fix unittest mock dependency

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-05-19 10:54:22 +02:00
Andreas ZerbstandGitHub b13eb8aaf8 V15 Added second level block acceptance tests (#19264) 2025-05-12 09:23:55 +00:00
Andreas ZerbstandGitHub 275478066e V15 QA complex block grid test (#18347) 2025-05-08 11:12:37 +02:00
Andreas ZerbstandGitHub b01def0872 V15 QA added a fix for flaky integration tests run on SQL Server Linux (#18965) 2025-05-08 08:53:29 +02:00
Nhu DinhandGitHub b106305167 V15 QA Added acceptance tests for tiptap style select (#19234) 2025-05-06 07:15:30 +00:00
Nhu DinhandGitHub 103631de15 V15 QA Updated the build stage to align with the azure pipelines yml (#19235) 2025-05-06 06:59:32 +00:00
Andy Butland 1b19ca7cdb Merge branch 'release/15.4.1' into v15/dev
# Conflicts:
#	version.json
2025-05-05 10:31:48 +02:00
Andy ButlandandGitHub 0ad020f0ce Restored interface methods on obsolete IBackgroundTaskQueue (#19223)
* Restore interface methods on obsolete IBackgroundTaskQueue.

* Fixed typos in comment.
2025-05-05 07:38:31 +02:00
Andy Butland fc1455e0d8 Bumped version to 15.4.1. 2025-05-03 17:28:44 +02:00
Andy Butland 793534c627 Merge branch 'release/15.4' into v15/dev
# Conflicts:
#	version.json
2025-05-01 07:38:58 +02:00
Andy Butland 15a8b4066a Bumped version to 15.4.0. 2025-04-30 15:04:08 +02:00
Andy ButlandandGitHub 38f6e2b0da Updates Examine to latest patch release. (#19193) 2025-04-30 09:57:55 +02:00
Andy Butland 14f60a108a V13: Clear Member Username Cache in Load Balanced Environments (#19191)
* Clear usernamekey

* Odd explaining comment

* Update src/Umbraco.Core/Cache/Refreshers/Implement/MemberCacheRefresher.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Make UserNameCachePrefix readonly for better immutabilityly

* Move prefix to CacheKeys constants

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	src/Umbraco.Core/Cache/CacheKeys.cs
2025-04-29 18:10:44 +02:00
Jacob Overgaard 10518ed454 Merge branch 'release/15.4' into v15/dev 2025-04-29 15:51:45 +02:00
Jacob Overgaard 375a0b4388 bump to 15.4.0-rc3 2025-04-29 15:34:59 +02:00
Jacob OvergaardandGitHub 6300ccc211 fix: The server path is not appended to stylesheets before load in Backoffice (#19192)
* build(deps): bump tiptap from 2.11.5 to 2.11.7

* fix: prepends the system `/css` folder to stylesheets before attempting to load them

* fix: adds more safety around path assumptions

* chore: eslint fix

* fix: prepend only the system path to picked stylesheets
2025-04-29 13:33:26 +00:00
Jacob Overgaard 5b6f544d2a build: restores some of the behavior from V13 in relation to StaticAssets (#19189)
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
2025-04-29 13:10:29 +02:00
Jacob Overgaard a1379f13a0 Merge branch 'contrib' into v15/dev 2025-04-29 13:05:06 +02:00
Jacob OvergaardandGitHub 38e9781fc5 build: restores some of the behavior from V13 in relation to StaticAssets (#19189)
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
2025-04-29 13:04:24 +02:00
Nhu DinhandGitHub dfc6ead6d5 V15 Added acceptance tests for tiptap statusbar (#19131)
* Updated tests for tiptap RTE

* Moved tests for titptap toolbar to another class

* Added tests for titptap toolbar

* Added tests for tiptap statusbar

* Bumped version

* Make tiptap tests run in the pipeline

* Bumped version

* Reverted npm command
2025-04-29 07:39:56 +00:00
Andy Butland 30a431f870 Merge branch 'release/15.4' into v15/dev 2025-04-28 14:37:26 +02:00
e932fa5404 Webhook log authorization and file system path checks (#19177)
* Add authorization for webhooks to item and log endpoints.

* Remove full path details from exception when requesting a path outside of the physical file system's root.

* Added missing usings.

* Revert changes to the webhook items API

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-04-28 12:10:43 +00:00
Lotte PitcherandSebastiaan Janssen 3579c4ac9e readme shield for forum 2025-04-28 12:57:51 +02:00
Sebastiaan Janssen 671751b618 Merge branch 'v15/dev' into contrib 2025-04-28 12:55:17 +02:00
Nhu DinhandGitHub 3b6e4a96f1 V15 QA Added acceptance tests for bulk trash dialog (#19125)
* Added tests for bulk trash content dialog

* Updated tests for trash content dialog

* Added tests for trash and bulk trash media dialog

* Moved trash content tests into a folder

* Bumped version

* Make trash tests run in the pipeline

* Make trash tests run in the pipeline

* Fixed comments

* Reverted npm command
2025-04-26 09:59:03 +07:00
mole 83e580c3a7 Fix nuget publish stage 2025-04-25 13:31:34 +02:00
Andy Butlandandmole 31ee35e721 Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project (#19077)
* Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project.

* Fix nullability

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-24 13:18:57 +02:00
MoleandKenn Jacobsen cf0f3f1380 V15: Ensure elements cache is cleared on subscribers in load balanced scenarios (#19128)
* Clear elementscache from cache refreshers

* Add very simple test ensuring the elements cache is cleared

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-24 13:18:53 +02:00
b4528cf963 Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project (#19077)
* Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project.

* Fix nullability

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-24 13:18:29 +02:00
cb1ec988ce V15: Ensure elements cache is cleared on subscribers in load balanced scenarios (#19128)
* Clear elementscache from cache refreshers

* Add very simple test ensuring the elements cache is cleared

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-24 13:15:30 +02:00
Sven Geusensandkjac 31c3f5ae0c Remove fake null checks as they are no longer needed after merge into v16 (#19109) 2025-04-24 12:28:54 +02:00
Warren BuckleyandGitHub 15643135ba Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124) 2025-04-24 12:25:58 +02:00
Sven Geusensandkjac 297ceaf0aa Remove fake null checks as they are no longer needed after merge into v16 (#19109) 2025-04-24 11:46:41 +02:00
Andy Butland 8e87f2260c Bumped version in dev branch to 15.5.0-rc. 2025-04-22 09:52:10 +02:00
Andy Butland 927e4d8cad Merge branch 'release/15.4' into v15/dev 2025-04-22 09:45:15 +02:00
Lotte PitcherandGitHub cd71e5666a Incorrect forum and security urls when raising issue (#19080) 2025-04-22 06:51:08 +02:00
Sven GeusensandMigaroez c38faec74b V15/fix/sub variant block deletion (#18802)
* Fix

* Editors with access should be able to clear a blocklist value

* Writeup around block element level variation

* Dissallow values to be removed a limited language user does not have permissions to

* Remove commented out code

* improved comments

* Improve expose list for limited language access sub variant block lists
2025-04-21 10:37:14 +02:00
Sven GeusensandGitHub c86a6fa8e5 V15/fix/sub variant block deletion (#18802)
* Fix

* Editors with access should be able to clear a blocklist value

* Writeup around block element level variation

* Dissallow values to be removed a limited language user does not have permissions to

* Remove commented out code

* improved comments

* Improve expose list for limited language access sub variant block lists
2025-04-21 10:30:12 +02:00
Andy Butlandandleekelleher 1e521760df Removes tree actions from tree selection in duplicate document dialog. (#19053)
(cherry picked from commit 1ccb5cc09e)
2025-04-16 18:23:26 +01:00
Andy ButlandandGitHub 1ccb5cc09e Removes tree actions from tree selection in duplicate document dialog. (#19053) 2025-04-16 18:21:39 +01:00
Jacob Overgaard 12ca71558a Merge branch 'release/15.4' into v15/dev 2025-04-16 14:48:09 +02:00
Jacob Overgaard 8b759cf3a4 bump version to 15.4.0-rc2 2025-04-16 14:47:55 +02:00
Jacob Overgaard 25fffd4173 Merge remote-tracking branch 'origin/release/15.4' into v15/dev 2025-04-16 14:47:02 +02:00
29c0151460 Scaffold content for content templates serverside (#19054)
* Scaffold content for content templates serverside

* Generated client types and methods from API.

* Retrieve scaffolded blueprint when creating documents from a blueprint.

* Use introduced helper method on existing read.

* Cleaned up imports.

* feat: moves scaffold service logic to data source and make shallow repository method

* feat: follows UmbDataSourceResponse interface and reorders public/private methods

* Bumped version to 15.4.0-r2.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-16 12:39:07 +00:00
Migaroez beb60065bb Merge branch 'release/15.4' into v15/dev 2025-04-15 14:40:19 +02:00
Jacob Overgaard cc9c33bfe6 fix: adds missing export 2025-04-15 12:57:57 +02:00
Jacob Overgaard 6edffd9f08 docs: fix import path 2025-04-15 12:23:37 +02:00
Jacob Overgaard 7e57396960 Merge branch 'contrib' into v15/dev 2025-04-15 09:21:11 +02:00
Andy Butland 981f173a79 Clarified "too many" entries validation message. (#19040) 2025-04-15 08:35:49 +02:00
Andy ButlandandGitHub 83fe87ca88 Clarified "too many" entries validation message. (#19040) 2025-04-15 06:34:58 +00:00
Andy Butland 432dda8c47 Adds some missing mime types to ensure uploaded audio and video displays with preview. (#19039) 2025-04-15 08:04:11 +02:00
Andy ButlandandGitHub ae078bf96b Adds some missing mime types to ensure uploaded audio and video displays with preview. (#19039) 2025-04-15 08:03:10 +02:00
6455f96e51 CONTRIBUTING.md - fix incorrect link to contributing-first-issue.md (#19038)
Co-authored-by: Andrew Lacey <AndrewL@if.co.nz>
2025-04-15 06:35:10 +02:00
Andy Butlandandkjac a9fc88d7e6 Make sure not to early return when verifying ancestor path is published without completing scope (#19029)
* Make sure not to early return when verifying ancestor path is published without completing scope.

* Added comment.
2025-04-14 17:46:57 +02:00
Andy ButlandandGitHub 76e2103551 Make sure not to early return when verifying ancestor path is published without completing scope (#19029)
* Make sure not to early return when verifying ancestor path is published without completing scope.

* Added comment.
2025-04-14 17:45:57 +02:00
340ae6c474 Document 3rd Party Licenses (#19027)
* specifies the license for base64-js

* specifies the license for router-slot

* specifies the license for contentment/bytes

* adds a general third-party notices file for all direct dependency libraries

* merge separate licenses for icon packs into NOTICES.txt

* updates lee kelleher permission

* updates the name of DOMPurify

* adds Element Internals Polyfill

* capitalize names

* Update src/Umbraco.Web.UI.Client/src/packages/core/utils/bytes/bytes.function.ts

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>

* adds babel

* adds eslint

* adds hey-api/openapi-ts

* adds open web components

* adds playwright

* adds rollup

* adds storybook

* adds cross-env

* adds glob

* adds globals

* adds madge

* adds msw

* adds playwright-msw

* adds prettier

* adds remark-gfm

* adds svgo

* adds tiny-glob

* adds tsc-alias

* adds typedoc

* adds typescript

* adds typescript-eslint

* adds typescript-json-schema

* adds vite-plugin-static-copy

* adds vite-tsconfig-paths

* adds web component analyzer

* adds rollup-plugin-esbuild

* adds rollup-plugin-import-css

* adds rollup plugins as general license

---------

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
2025-04-14 16:01:14 +02:00
Kenn JacobsenandGitHub 7495c3c7b2 Treat content schedule dates as UTC (#19028) 2025-04-14 14:50:02 +02:00
Sebastiaan Janssen 449c94f08d Merge branch 'v15/dev' into contrib 2025-04-14 14:22:36 +02:00
83b92666ac Use maximum available value for JSON serialization depth (#19001)
* Use maximum available value for JSON serialization depth.

* Updated unittests with best practices

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-14 13:50:19 +02:00
Henrik GedionsenandSebastiaan Janssen b7bf30744a Use GetIdsFromPathReversed to avoid allocating the string values of the integers parsed 2025-04-14 11:19:08 +02:00
dependabot[bot]andJacob Overgaard 9e97f6028b Bump vite from 6.2.5 to 6.2.6 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 11:01:59 +02:00
f9496e8067 Ensure dates read from the database are treated as local when constructing entities (2) (#19013)
* Revert "Ensure dates read from the database are treated as local when constructing entities (#18989)"

This reverts commit 7b10d39d66.

* Avoid system dates stored with local server time being defaulted to UTC on database read.

* ContentScheduleDto.Date is UTC

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-04-14 10:55:36 +02:00
dependabot[bot]andJacob Overgaard 8ba3a4d926 Bump vite from 6.2.5 to 6.2.6 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 10:22:22 +02:00
Nhu DinhandGitHub 7fe6971a61 V15 Updated acceptance tests for unsupported invariant content item with variant blocks (#18919)
* Updated tests for invariant block grid with variant blocks

* Updated tests for invariant block list with variant blocks

* Updated tests for invariant document with variant blocks

* Bumped version

* Changed npm command

* Updated isValidationMessageVisible

* Fixed name

* Fixed comments

* Reverted npm command
2025-04-12 08:59:31 +00:00
Andy Butlandandmole 7b10d39d66 Ensure dates read from the database are treated as local when constructing entities (#18989)
* Ensure dates read from the database are treated as local when constructing entities.

* Fixed typos in comments.
2025-04-11 13:19:13 +02:00
Andy ButlandandGitHub 9ef2b37be4 Ensure dates read from the database are treated as local when constructing entities (#18989)
* Ensure dates read from the database are treated as local when constructing entities.

* Fixed typos in comments.
2025-04-11 09:32:05 +02:00
Nhu DinhandGitHub 516d62a348 V15 Added acceptance tests for the mandatory property editor in a content or a block (#18920)
* Added tests for mandatory checkboxlist in a content

* Added tests for mandatory dropdown in a content

* Added tests for mandatory media picker in a content

* Added tests for mandatory radiobox in a content

* Added tests for block grid with mandatory property editors

* Added tests for block list with mandatory property editors

* Bumped version

* Cleaned up

* Changed npm command

* Fixed comments

* Fixed comments

* Reverted
2025-04-11 03:13:36 +00:00
Niels LyngsøandGitHub 97b3023e14 make sure only to prepend relative URLs (#18998) 2025-04-10 14:56:14 +01:00
Niels Lyngsø ff30b4f686 Merge branch 'contrib' into v15/dev 2025-04-09 16:56:48 +02:00
dependabot[bot]andJacob Overgaard 6bca91a52f Bump koa from 2.15.3 to 2.16.1 in /src/Umbraco.Web.UI.Client
Bumps [koa](https://github.com/koajs/koa) from 2.15.3 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](https://github.com/koajs/koa/compare/2.15.3...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 15:57:36 +02:00
164b80af0e Display content type names on dynamic node query steps (#18742)
* Display content type names on dynamic node query steps.

* Refactored to use `UmbRepositoryItemsManager` observable

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 11:47:25 +00:00
Niels LyngsøandGitHub ba0028c03d Feature: Use uui invalid color (Awaiting new UUI version) (#18273)
* display validation on save + use uui-color-invalid

* update css vars

* use standalone color for property layout

* remove color from label

* fix badge

* fix create button color

* clean up

* correct badge colors
2025-04-09 10:14:26 +00:00
6f38a57c8a Document permission inheritance in UI (#18935)
* check the full path for permissions

* fix race condition

* wip update permission when variants change

* Populate ancestor keys on document tree response items.

* Populate ancestor keys on document collection response items.

* Update OpenApi.json

* generate server models

* update types

* map data

* add ancestor context

* set ancestors in context

* use ancestor context in tree

* clean up

* provide ancestor context from a collection item

* provide ancestor context from structure context

* Use array of objects rather than Ids for the ancestor collection.

* Update OpenApi.json.

* add ancestor data to mocks

* set ancestors ids in mocks

* omit ancestors for recycle bin item

* use correct models for document blueprint mock data

* remove constructor

* mock documents for testing

* add user group permission test data

* wip document user permission condition tests

* generate new server models

* update data efter server models update

* clean up

* Update entity-actions-table-column-view.element.ts

* longer time for not found to appear

* use arg

* observe alias

* set new the right place

* remove const

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-09 11:08:28 +02:00
Andy ButlandandGitHub a0e3ca601e Aggregate document permissions for current user in API response (#18721)
* Create integration test verifying existing behaviour.

* Aggregate permissions per document for the current user response.

* Refactoring following Codescene warnings.
2025-04-09 10:57:50 +02:00
1a9d8e3a5d Fixes label of enable/prevent clean up button after update (#18946)
* Update enable cleanup button text on toggle.

* Handle console error visible on cancel of rollback dialog.

* Return value from `umb-rollback-modal`

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 08:15:00 +00:00
76f27726c5 V15: User password resetting notification (#18679)
* Introduce UserPasswordResettingNotification

* Removed changes to IUserService interface.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-09 09:28:12 +02:00
d9d66465f6 Allow save of empty translations for dictionary items (#18980)
* Allow save of empty translations for dictionary items.

* Updated Open API schema to match request model update

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-04-09 09:19:48 +02:00
947afdbc1e Amend root content routing and ensure trailing slashes as configured (#18958)
* Amend root content routing and ensure trailing slashes as configured

* Fix false positives at root + add more tests

* Awaited async method and resolved warning around readonly.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-09 07:46:24 +02:00
Lee KelleherandGitHub 134c8006c0 umb-localize encode HTML arguments (#18960)
* Moves `escapeHTML` call from localization controller to `umb-localize` element

* Adds supporting unit-test

* Removed unit-test

as it is now expected that the localization
controller will return literal HTML markup.

* Updated import path

* Removed extra call to `text()`
2025-04-08 12:32:36 +00:00
Andreas ZerbstandGitHub 86e7343f99 V15 QA added clipboard test for not being able to copy to root when block is not allowed at root (#18937)
* Added clipboard test

* Bumped version

* Updated to use the name

* Run all tests on the pipeline

* Reverted command
2025-04-08 09:53:07 +02:00
dependabot[bot]andJacob Overgaard 10ecc99d74 Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 09:23:23 +02:00
84d0ae3ea2 V15 QA Fixing the failing media acceptance tests (#18881)
* Fixed the function name due to test helper changes

* Updated assertion steps due to UI changes

* Added more waits

* Bumped version

* Increase timeout

* Reverted

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-04-08 12:41:32 +07:00
Andy Butland aa76f782ef Merge branch 'release/15.3.1' into v15/dev 2025-04-08 07:17:01 +02:00
Andy ButlandandGitHub 06a2a500b3 Merge commit from fork
* Prevent path traveral vulnerability with upload of temporary files.

* Used BadRequest instead of NotFound for invalid file name response.
2025-04-08 05:03:40 +02:00
Niels LyngsøandGitHub 17a5218a58 fix 18367 (#18956) 2025-04-07 18:45:22 +02:00
Niels LyngsøandGitHub 4c9084238c Feature: discard changes for block workspace (#18930)
* make getHasUnpersistedChanges public

* Discard changes impl for Block Workspace
2025-04-07 18:42:31 +02:00
9c03422222 Data type References UI: Workspace + Delete (#18914)
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* generate server models

* add extension slot

* register data type reference info app

* add reference data mappers

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* generate new models

* update models

* register ref item

* remove debugger

* render types

* register member type property type ref

* register media type property type ref

* Renamed model and constants from code review feedback.

* register reference workspace info app kind

* use kind for document references

* use kind for media references

* use kind for member references

* use deleteWithRelation kind when deleting data types

* fix manifest types

* fix types

* Update types.gen.ts

* update code to fit new server models

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-07 16:24:29 +00:00
Sebastiaan Janssen b61b9dbd5e Merge branch 'v15/dev' into contrib 2025-04-07 16:58:22 +02:00
HenrikandGitHub d9a31d337a Avoid allocating strings for parsing comma separated int values (#18199) 2025-04-07 16:56:59 +02:00
Henrik GedionsenandSebastiaan Janssen 822c8374ef Avoid allocating new empty arrays, reuse existing empty array 2025-04-07 16:31:31 +02:00
Henrik GedionsenandSebastiaan Janssen 4239f0fc06 Remove unneeded double seek 2025-04-07 16:24:31 +02:00
Henrik GedionsenandSebastiaan Janssen db43799d0f Avoid some heap allocations 2025-04-07 16:23:45 +02:00
HenrikandGitHub 2723e4f77c Avoid unneeded Dictionary operations (#18890) 2025-04-07 15:02:28 +02:00
Jacob Welander JensenandGitHub f926316751 V15/fix/18595 (#18925)
* fix for #18595

* updates the en.ts
2025-04-07 14:53:01 +02:00
Mads RasmussenandGitHub b991976fd3 Fix modal route registration circular import (#18953)
* fix modal route registration circular import

* Update modal-route-registration.controller.ts
2025-04-07 11:39:09 +00:00
Mads RasmussenandGitHub c0f820a05c remove segment toggle for elements (#18949) 2025-04-07 11:41:27 +02:00
Mads RasmussenandGitHub f6d93ef0ba fix circular icon import (#18952) 2025-04-07 11:39:51 +02:00
Andy ButlandandGitHub 3d1e17b07f Integration tests for content publishing with ancestor unpublished (#18941)
* Resolved warnings in test class.

* Refactor regions into partial classes.

* Aligned test names.

* Variable name refactoring.

* Added tests for unpublished paths.

* Adjust tests to verify current behaviour.

* Cleaned up project file.
2025-04-07 10:04:11 +02:00
ae423decc3 Add raw value validation to multiple text strings property editor (#18936)
* Add raw value validation to multiple text strings property editor

* Added additional assert on unit test and comment on validation logic.

* Don't remove items to obtain a valid value

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-07 09:40:17 +02:00
dependabot[bot]andJacob Overgaard 1d9a031c1c Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-07 08:56:42 +02:00
Andy ButlandandGitHub 4078e83634 Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined (#18763)
* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined.

* Added tests to verify functionality.

* Added reference to previous PR.

* Referenced second PR.

* Assemble URLs for all cultures, not just the default.

* Revert previous update.

* Display an original URL if we have one.
2025-04-07 08:18:06 +02:00
Nikolaj Geisle 4b016317f9 Skip lock tests 2025-04-04 17:34:08 +02:00
1f4c19d484 Updated management API endpoint and model for data type references to align with that used for documents, media etc. (#18905)
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* Renamed model and constants from code review feedback.

* Fix typo

* Fix multiple enumeration

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-04 15:10:06 +02:00
fd77074d57 Added management API endpoint, service and repository for retrieval of references from the recycle bin (#18882)
* Added management API endpoint, service and repository for retrieval of references from the recycle bin.

* Update src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/ReferencedByDocumentRecycleBinController.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed unused code.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-04 12:52:39 +00:00
Niels LyngsøandGitHub bf74636f26 make getHasUnpersistedChanges public (#18929) 2025-04-04 12:42:35 +00:00
Jacob Overgaard 1aff4c69f0 Merge remote-tracking branch 'origin/contrib' into v15/dev 2025-04-04 14:21:38 +02:00
Jacob Overgaard c139015019 removes autogenerated workflows 2025-04-04 14:10:45 +02:00
dependabot[bot]andJacob Overgaard 90a34e17ca Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.2.4
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 14:05:44 +02:00
Niels LyngsøandGitHub 806f10e52a V15/bugfix/fix route issue from 18859 (#18931)
* unique check

* unique for workspace empty path

* more unique routes
2025-04-04 11:20:29 +02:00
Niels LyngsøandGitHub 788e5cd678 remove unnecessary code (#18927) 2025-04-04 11:18:30 +02:00
Andy ButlandandGitHub ebd5fb4d0c Fixes save of empty, invariant block list on variant content. (#18932) 2025-04-04 10:14:24 +02:00
Andy ButlandandGitHub 5f3ce28032 Clear roots before rebuilding navigation dictionary (#18766)
* Clear roots before rebuilding navigation dictionary.

* Added tests to verify fix.

* Correct test implementation.

* Convert integration tests with method overloads into test cases.

* Integration test compatibility supressions.
2025-04-04 09:14:48 +02:00
ad7053af36 Move publish with descendants to a background task with polling (#18497)
* Use background queue for database cache rebuild and track rebuilding status.

* Updated OpenApi.json and client-side types.

* Updated client to poll for completion of database rebuild.

* Move IBackgroundTaskQueue to core and prepare publish branch to run as background task.

* Endpoints for retrieval of status and result from branch publish operations.

* Poll and retrieve result for publish with descendants.

* Handled issues from testing.

* Rework to single controller for status and result.

* Updated client side sdk.

* OpenApi post dev merge gen

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-04 07:42:26 +02:00
Andy ButlandandGitHub 6247f54976 Adds ancestor ID details on document tree and collection responses (#18909)
* Populate ancestor keys on document tree response items.

* Populate ancestor keys on document collection response items.

* Update OpenApi.json

* Use array of objects rather than Ids for the ancestor collection.

* Update OpenApi.json.
2025-04-04 06:51:29 +02:00
Andy ButlandandGitHub 3e6b9313e5 Only apply validation on content update to variant cultures where the editor has permission for the culture (#18778)
* Only apply validation on content update to variant cultures where the editor has permission for the culture.

* Remove inadvertent comment updates.

* Fixed failing integration test.
2025-04-03 22:09:40 +02:00
7d41791543 Ensure has children reflects only items with folder children when folders only are queried. (#18790)
* Ensure has children reflects only items with folder children when folders only are queried.

* Added supression for change to integration test public code.

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-03 21:55:34 +02:00
Niels Lyngsø 157b7d14eb Merge branch 'v15/dev' into contrib 2025-04-03 21:32:22 +02:00
Lee KelleherandGitHub f3658bf356 Tiptap RTE: Style Menu extension kind (#18918)
* Adds 'styleMenu' Tiptap toolbar extension kind

* Adds icons for `<h4>` and `<p>` tags

* Adds commands to HTML Global Attributes extension

for setting the `class` and `id` attributes.

* Renamed "default-tiptap-toolbar-element.api.ts" file

The "element" part was confusing.

* Toolbar Menu: uses correct `item` value

* Cascading Menu: adds localization for the label

* Adds `label` attribute to UUI components

for accessibility.

* Toolbar Menu: uses correct `appearance` value

* Removed unrequired `api` from Style Select

* Destructs the `item.data` object
2025-04-03 11:44:57 +02:00
Andy ButlandandGitHub e4b3104399 Remove admin permission on user configuration, allowing users with user section access only to manaage users and groups. (#18848) 2025-04-03 10:51:45 +02:00
Jacob Overgaard 9db62a2c0c ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2025-04-03 09:07:16 +02:00
Jacob Overgaard 3cd6fcfe67 ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2025-04-03 09:03:45 +02:00
Jacob Overgaard 3b736d8c73 ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2025-04-03 09:01:41 +02:00
bbfe40d733 Fix issue preventing blueprint derived values from being scaffolded (#18917)
* Fix issue preventing blueprint derived values from being scaffolded.

* fix manipulating frooen array

* compare with variantId as well

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-03 06:45:14 +02:00
Kenn JacobsenandGitHub 9d30d5b11c Fix pagination for users restricted by start nodes (#18907)
* Fix pagination for users restricted by start nodes

* Default implementation to avoid breakage

* Review comments

* Fix failing test

* Add media start node tests
2025-04-02 09:34:52 +02:00
Niels LyngsøandGitHub 11c19847cf Feature: highlight invariant doc with variant blocks is unsupported (#18806)
* mark variant blocks in invariant docs as invalid

* implement RTE Blocks
2025-04-02 11:25:34 +07:00
8e0912cbf1 Only prevent the unpublish or delete of a related item when configured to do so if it is related as a child, not as a parent (#18886)
* Only prevent the unpubkish or delete of a related item when configured to do so if it is related as a child, not as a parent.

* Fixed incorect parameter names.

* Fixed failing integration tests.

* Use using variable instead to reduce nesting

* Applied suggestions from code review.

* Used simple using statement throughout RelationService for consistency.

* Applied XML header comments consistently.

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-01 15:49:49 +02:00
Jacob OvergaardandGitHub bf89eae07f V15: Block package should not import from itself (#18902)
* fix: avoids circular dependencies by realising the 'block' package was importing from itself

* chore: lowers requirement to 9 after fixes

* chore: removes unused file
2025-04-01 12:02:35 +00:00
Jacob OvergaardandGitHub 19e873c7ad V15: File upload should use better Image & SVG preview (#18900)
* feat: uses `<uui-card-media />` to preview svg's

* fix: svg preview should support potentially very large images

* fix: adds alt attribute

* fix: adds `<uui-card-media />` for image previews as well

* fix: ensures all previews have at least a "title" attribute
2025-04-01 11:13:41 +00:00
Jacob OvergaardandGitHub d4acd53fd5 fix: fixes an issue where the serverUrl was shown twice and changes the component to use <uui-card-media /> instead (#18899) 2025-04-01 11:36:27 +01:00
Sebastiaan Janssen 85fc189ee8 Merge branch 'v15/dev' into contrib 2025-04-01 12:27:28 +02:00
Jeavon LeopoldandSebastiaan Janssen a48a70595a Check for NRT directory when populating LuceneIndexFolder 2025-04-01 11:57:40 +02:00
Sebastiaan Janssen 0f539088fa Amend PR 18741 2025-04-01 11:52:32 +02:00
Warren BuckleyandGitHub 80233a7850 Add in a VSCode .code-worskpace file (#18741) 2025-04-01 11:50:55 +02:00
Markus JohanssonandGitHub 1dd10eabd4 Use StringComparison.Ordinal in hot paths (#18893) 2025-04-01 11:39:22 +02:00
Warren BuckleyandGitHub e7a52de097 Updates telemetry dashboard UI (#18743)
* Update temeltry dashboard UI

* Uses headline prop/attr to set the header
* Uses a normal h3 rather than a h2 with H3 uui css class
* Updates the UUI slider to not show the value of 0,1,2 as not that useful to see when changing the slider

* Updates translation as it had a weirdly places br mid sentance
2025-04-01 11:29:57 +02:00
Jacob Overgaard 40a2d75282 Merge branch 'release/15.3.1' into v15/dev 2025-04-01 10:34:15 +02:00
Sebastiaan Janssen 7fb9df9b19 Merge branch 'v15/dev' into contrib 2025-04-01 10:15:54 +02:00
Andy ButlandandJacob Overgaard 1720692d3d Ensures date comparisons in schedule integration tests are made only on the datetime part to the second (#18894)
* Ensures date comparisons in schedule integration tests are made only on the date part.

* Include time part to the second.

* Ensure Kind is retained when truncating a date.

* Retain Kind for all truncation levels.
2025-04-01 09:45:35 +02:00
Andy ButlandandGitHub b798925ddb Adds webp to mime type map to support preview on upload file property editor. (#18863) 2025-04-01 09:18:31 +02:00
dependabot[bot]andJacob Overgaard f4caabaa98 Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 09:17:56 +02:00
Andy ButlandandGitHub b1dbd80a07 Adds allow-same-origin to preview IFRAME. (#18895) 2025-04-01 09:07:08 +02:00
Andy ButlandandGitHub 882a0427e4 Ensures date comparisons in schedule integration tests are made only on the datetime part to the second (#18894)
* Ensures date comparisons in schedule integration tests are made only on the date part.

* Include time part to the second.

* Ensure Kind is retained when truncating a date.

* Retain Kind for all truncation levels.
2025-04-01 09:06:24 +02:00
d978a10b61 Fix: #18707 (#18859)
* observe condition changes

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.context.ts

* enable extension to be updated by late appended conditions

* update route when routes change

* remove commented code

* Update src/Umbraco.Web.UI.Client/src/libs/extension-api/registry/extension.registry.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update src/Umbraco.Web.UI.Client/src/libs/extension-api/registry/extension.registry.test.ts"

This reverts commit b8d1dd793d.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-31 20:41:36 +02:00
Niels LyngsøandGitHub 7200b7b623 Bugfix: #18473 (#18765)
* add more icons

* add group id for inspection

* make outline style to make it not look disabled

* ensure that inherited has entries

* ensure current route is updated accordingly

* data marks

* shared across cultures tag

* fix sidebar group headline size
2025-03-31 14:18:47 +00:00
Andy ButlandandGitHub f200da48d8 Revert rather than prevent updates to sensitive properties on members without sensitive data access (#18794)
* Revert rather than prevent updates to sensitive properties on members without sensitive data access.

* Added suppression for integration test updates.
2025-03-31 15:16:41 +02:00
Jacob Overgaard fc815db80b bump version to 15.3.1 2025-03-31 14:48:54 +02:00
c5a3778ce7 Fix issue text overflow when user name is too long (#18587)
* Fix issue text overflow when user name is too long

* add ellipsis at the end of the text

* Bumped version of test helper

* Fixed document type design tab tests due to test helper changes

* Amends based on Niels' feedback

+ other code formatting tweaks.

* chore: remove unknown attribute on uui-tag

* fix: adds fallback text and uses `<umb-localize />` where applicable

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-31 12:41:32 +00:00
Jacob Overgaard 8c1dfe5431 chore: fix lint errors 2025-03-31 14:07:32 +02:00
Jacob Overgaard 4cd43b264d fix: adds localization for "Unnamed" 2025-03-31 14:06:45 +02:00
Niels LyngsøandGitHub 3e835cd949 set circular dependency limit to 9 (#18786) 2025-03-31 13:55:26 +02:00
88b1b9de13 V15: bump @umbraco-ui/uui from 1.12.2 to 1.13.0
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-03-31 13:50:23 +02:00
98e0615338 V15: Revert "Fix: RTE markup props not up to date issue" (#18879)
* Revert "simplifying the use of props (#18430)"

This reverts commit 347e898190.

* do not set value if identical check

cherry-picked from c03a8afab5

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-03-31 13:13:00 +02:00
Nhu DinhandGitHub e18cdab185 V15 QA Added acceptance tests for inline editing mode (#18874)
* Added tests for block list with inline editing mode

* Added tests to create a document type witha block with inline editing mode

* Added tests for block grid inline editing mode

* Bumped version

* Changed npm commands

* Reverted npm command
2025-03-31 09:33:17 +00:00
26907f202f hotfix: context provider should not destroy instance (#18864)
* do not destroy instance

* Update src/Umbraco.Web.UI.Client/src/libs/context-api/provide/context-provider.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-31 10:51:45 +02:00
Jacob OvergaardandGitHub 13d95f31f2 test: removes two tests that fails because of a non-fixated runtime (#18876)
i.e. the tests depend on a specific time interval, but the test runner does not guarantee that, and the tests are not strictly necessary anyway
2025-03-31 08:14:50 +00:00
Niels LyngsøandGitHub c422c82f21 await setup method (#18831) 2025-03-31 10:09:10 +02:00
Niels LyngsøandGitHub ae87f9ccd4 Implement context base for a few last contexts (#18865)
* do not destroy instance

* UmbDashboardHealthCheckElement

* correct last contexts to use context-base

* informing user that Umb.Condition.MenuAlias does not work

* parse host to Section Context
2025-03-31 10:02:25 +02:00
Niels LyngsøandGitHub 3359562e32 make the deprecation discoverable from TSC (#18856) 2025-03-31 09:56:42 +02:00
0e3c8dab8f Unpublish Document: Align UX of referenced items with trash and delete (#18860)
* Added member reference type model.

* Updated client-side types and sdk.

* Render member relations on the member info view.

* Add relation type for related member with migration.

* Extend tests for track relations to include member relations.

* Extend tests for relation repository.

* Extend tests for relation service.

* Addressed comments from Copilot review.

* Add relation notification to member deletion.

* Removed unused import.

* Updates from code review.

* make ref element globally available

* align naming

* use new reference list

* add interfaces for config

* export const

* Fixed failing integration tests.

* apply interface

* deprecate interface with wrong name

* fix import

* disable unpublish button when item or descendants are referenced

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-31 09:52:46 +02:00
Lan Nguyen ThuyandJacob Overgaard 4d8406bb64 fix fix select all checkbox in scheduled publishing 2025-03-31 09:24:47 +02:00
dependabot[bot]andJacob Overgaard 2bc549bbc4 Bump vite from 6.2.2 to 6.2.3 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 09:19:08 +02:00
Mads RasmussenandGitHub e8b7d9daee use uui-dialog-layout for all save + publishing dialogs (#18871) 2025-03-31 09:08:07 +02:00
Niels Lyngsø 48ac4b546e enable changing data-path on an existing context 2025-03-28 20:27:26 +01:00
Niels Lyngsø eb5c57fb94 do not destroy instance 2025-03-28 19:45:44 +01:00
468ca9ae94 Member relation tracking (#18852)
* Added member reference type model.

* Updated client-side types and sdk.

* Render member relations on the member info view.

* Add relation type for related member with migration.

* Extend tests for track relations to include member relations.

* Extend tests for relation repository.

* Extend tests for relation service.

* Addressed comments from Copilot review.

* Add relation notification to member deletion.

* Removed unused import.

* Updates from code review.

* export const

* Fixed failing integration tests.

* deprecate interface with wrong name

* fix import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-28 15:34:25 +00:00
Niels Lyngsø 95cd6797cc Merge branch 'contrib' into v15/dev 2025-03-28 12:57:55 +01:00
Niels LyngsøandGitHub 6f63837dbc make load more 100% wide (#18821) 2025-03-28 11:49:07 +01:00
Andy ButlandandGitHub 6dc4eca607 Fixes null reference exception triggered when configuring to hide disabled users in the backoffice (#18823)
* Fixes null reference exception triggered when configuring to hide disabled users in the backoffice.

* Updated integration test suppressions.
2025-03-28 11:24:52 +01:00
Andy Butland aca908c549 Adds MemberTwoFactorLoginService. (#18810) 2025-03-28 11:20:38 +01:00
Andy ButlandandGitHub 685a05827e Adds MemberTwoFactorLoginService. (#18810) 2025-03-28 11:16:03 +01:00
Mads RasmussenandGitHub 07080604b9 Render Property "vary by segment"-toggle (#18813)
* render toggle for vary by segment

* use property-layout for appearance

* simplify labels

* remove duplicates

* render tag for vary by segment
2025-03-28 08:49:38 +01:00
Lee KelleherandGitHub 85176d1bf6 Fixes localization culture case-sensitive check (#18849)
Fixes #18801.
2025-03-27 15:24:45 +00:00
Jacob OvergaardandGitHub 52bf6bc412 feat: disables the internal dropzone if multiple=false and an upload is in progress (#18847)
you need to clear the files/queue before trying to upload something else, unless multiple=true
2025-03-27 14:20:36 +00:00
Lee KelleherandGitHub 47e09efec6 Fixes Dropdown property-editor validation (#18845) 2025-03-27 12:39:09 +00:00
9761ef899b Populate parent key on move and copy notifications (#18837)
* Populate parent key on move and copy notifications.

* Remove forgotten fixme

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2025-03-27 10:33:01 +00:00
Jacob OvergaardandGitHub 164868f32a V15: Improve the dropzone for Upload Field (#18840)
* feat: maps up the CANCELLED status

* feat: uses the new dropzone input to render the dropzone

* feat: adds support for differing server urls

* chore: avoids a breaking change by storing the temporary file
2025-03-27 10:22:03 +00:00
Jacob OvergaardandGitHub a71ebe1902 V15: Improve the dropzone for Image Cropper (#18838)
* feat: uses the umb-dropzone-input to render the dropzone

* feat: loads in the blob url rather than reading the file into memory AND appends the server url

* chore: lit 3 compat

* feat: uses the umb-dropzone-input to render the dropzone

* Revert "feat: uses the umb-dropzone-input to render the dropzone"

This reverts commit bc1a6ae7df.

* feat: creates an object url directly from the File rather than the Blob

* feat: revokes the file data url from object storage

* feat: revokes object url on disconnect
2025-03-27 10:11:37 +00:00
Nhu DinhandGitHub 94f0add4d9 V15 Added acceptance tests for data type default configuration (#18740)
* Added tests for Approved Color default configuration

* Updated tests for Approved Color configuration

* Added tests for ChecklboxList configuration

* Added tests for Data type default configuration - part 1

* Added tests for data type configuration and updated tests due to test helper changes

* Added more steps to verify the default configuration

* Added tests for the default configuration and refactoring code

* Added steps to verify the TinyMCE default configuration

* Bumped version

* Fixed tests due to test helper changes

* Make all Data Type tests run in the pipeline

* Updated assertion steps

* Fixed format

* Bumped version

* Bumped version

* Comment failing tests

* Reverted npm command
2025-03-27 03:42:13 +00:00
Niels LyngsøandGitHub 9c88326681 lint corrections (#18833) 2025-03-26 19:36:17 +01:00
95e89f8481 Avoid a hash key generation and lookup when inserting in the LockingMechanism (#18243)
* Avoid a hash key generation and lookup when inserting in the LockingMechanism

* Added comments for CollectionsMarshal.GetValueRefOrAddDefault

* Added further comments and tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-26 16:55:03 +01:00
b25bcdc436 Fix bug uploading an image via the Media Picker is no longer automatically selected (#18667)
* Fix bug uploading an image via the Media Picker is no longer automatically selected

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* remove submit modal

* fix: avoids overriding the dropzone manager as that does not work with inheritance

* fix: set disabling of folders correctly

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-26 15:04:19 +00:00
028da4545e Reduce CPU time when initiating RepositoryCacheKeys (#18267)
* Avoid an unneeded lookups in the Keys dictionary when initiating key cache

* Add further comments and unit tests around updated code.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-26 16:01:53 +01:00
Kenn JacobsenandGitHub 37035e6e7f Clean up leftover block item data when changing element variance (#18804) 2025-03-26 11:27:23 +01:00
Nhu DinhandGitHub f8c35bb7e9 V15 QA Added acceptance tests for user group default configuration (#18800)
* Updated userGroup tests due to test helper changes

* Added tests for user group default configuration

* Bumped version

* Fixed due to test helper changes

* Reverted npm command
2025-03-26 09:55:22 +00:00
Mads RasmussenandGitHub 056434fa27 fix preset logic (#18815) 2025-03-26 10:32:57 +01:00
Kenn JacobsenandGitHub e32eb06ddf Obsolete a few unused things. (#18814) 2025-03-26 10:24:09 +01:00
Niels LyngsøandGitHub 76dd141d86 implement validation context (#18808) 2025-03-26 10:12:25 +01:00
dependabot[bot]andJacob Overgaard 54601d42e2 Bump vite from 6.2.2 to 6.2.3 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-26 09:25:04 +01:00
Andy Butland 619e025e7a Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-26 08:00:24 +01:00
Andy ButlandandGitHub 609e9f43e1 Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-26 07:37:04 +01:00
Mathias HelsengrenandGitHub ccc70fc786 Changes for the debug tag that makes it look better in dark mode (#18791) 2025-03-25 17:28:53 +01:00
Mathias HelsengrenandGitHub b5bffdfada Adjusting some of the colors for the dark theme so the ui looks a bit better when using dark theme (#18792) 2025-03-25 17:28:24 +01:00
Niels LyngsøandGitHub 0dd4443b75 Feature: validation synchronization as opt in (#18798)
* allow for this word

* getMessages

* split inherit and sync method

* sync feature

* rename sync report

* auto report + impl

* remove log

* double inheritance test

* one more test
2025-03-25 15:48:07 +01:00
Jacob OvergaardandGitHub 10f37494b6 V15: umb-dropzone extends umb-input-dropzone (#18784)
* feat: umb-dropzone should extend umb-input-dropzone

moves the umb-dropzone back into the media package and extends the umb-input-dropzone for common logic

* feat: adds a UmbDropzoneMediaManager class to handle media specifically

* chore: sort imports

* feat: adds a browse() method

* removes unused export

* use correct import

* fix: document and media type import should use other dropzone

* docs(storybook): remove old argument

* feat: adds umb-dropzone-media element and deprecates umb-dropzone element

* feat: use umb-dropzone-media instead

* adds export for dropzone

* feat: adds a slot to show an additional text above the dropzone graphics

* feat: the dropzone should fill out its host component

* feat: adds back a text to describe where to drop files

* remove unused import

* fix: removes overflow to allow full border
2025-03-25 14:09:41 +00:00
Kenn JacobsenandGitHub 2711ac07ac Only validate invariant properties when strictly necessary (#18729) 2025-03-25 12:58:01 +01:00
Lee KelleherandGitHub 80e092069b Tiptap RTE: Statusbar extension type (#18789) 2025-03-25 12:52:27 +01:00
Sebastiaan Janssen c23e2eb6f2 Merge branch 'v15/dev' into contrib 2025-03-25 10:44:16 +01:00
Mads RasmussenandJacob Overgaard 25837e66fc fix dropzone circular 2025-03-24 16:35:41 +01:00
Mads Rasmussen 3be766fe2a fix build 2025-03-24 16:04:44 +01:00
Mads RasmussenandGitHub 34649db5c9 Block Grid: Fix circular dependencies (#18782)
* Update input-rich-media.element.ts

* fix circular

* fixes circular dependencies in the validation module

* Update bind-to-validation.lit-directive.ts

* fix workspace circular

* Update error-viewer-modal.token.ts

* move contexts next to component

* fix import errors

* import local components from one file

* lint

* import in property editor file

* fix import

* remove duplicate import
2025-03-24 14:46:34 +00:00
4c679a5f4c Update input-rich-media.element.ts (#18772)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-24 14:10:13 +00:00
Niels LyngsøandGitHub 0331cd154b Update 01_bug_report.yml (#18513) 2025-03-24 14:59:10 +01:00
36c66177fc Feature: Tree expansion state (#18227)
* implement tree expansion logic

* wip test example

* support complex expansion

* extend entity

* extend with model

* Update tree-item-context.interface.ts

* use expansion model to observe open state

* clean up

* fall back to tree context

* Update default-tree.context.ts

* Update default-tree.context.ts

* Update default-tree.context.ts

* clean up

* simplify model and state

* refactor to manager

* remove test data

* Update default-tree.context.ts

* rename

* add get method

* rename to collapse

* all collapse all method

* fix collapse logic

* add js docs

* add tests for expansion manager

* do not load children if the item is already open

* Update tree-item-element-base.ts

* config to expand tree root in pickers

* expand tree root for duplicate to

* Update tree-expansion-manager.test.ts

* make methods async

* use array state

* add isExpanded helper

* refactor to use isExpanded helper

* fix type issues

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-03-24 14:49:09 +01:00
Mads RasmussenandGitHub ad443c7b13 fix circular (#18773) 2025-03-24 14:47:04 +01:00
Mads RasmussenandGitHub 0b6fe91fd3 Validation: Fixes circular dependencies in the validation module (#18774)
* fixes circular dependencies in the validation module

* Update bind-to-validation.lit-directive.ts
2025-03-24 14:39:18 +01:00
Mads RasmussenandGitHub ee496d2730 fix workspace circular (#18775) 2025-03-24 14:32:00 +01:00
Mads RasmussenandGitHub 384b9bdb65 Update error-viewer-modal.token.ts (#18776) 2025-03-24 14:31:40 +01:00
Jacob OvergaardandGitHub 63113c4552 V15: New dropzone component available for the Backoffice (#18753)
* create a symlink between local Client .vscode snippets and global snippets for ease of use

* fix: no need to specify `Element` in the snippet as that is pulled from the filename

Because of our convention with `x.element.ts` you would have ended up with `UmbXElementElement`

* feat: adds new component `umb-input-dropzone`

* docs(storybook): more stories

* feat: construct the temporary files centrally along with an `AbortController` and use its signal

* feat: makes UmbInputDropzone form aware

* feat: introduces a change event

* chore: temporary changes before changing upload field

* feat: adds default slot

* docs: adds jsdocs

* feat: adds more properties

* feat: adds dashed styling

* feat: adds multiple support

* feat: allows to cancel file

* feat: separate **cancel** and **remove**

* fix stylibg

* move dropzone element

* move input-dropzone into dropzone package

* feat: introduces a 'dropzone' package

* import for backward compatibility

* remove ambigious export

* reexport everything from dropzone

* fix import

* cleanup test files

* use correct import paths

* test: make sure folder exists before writing to it

* adds export for modals

* adds entrypoint for dropzone package

* use the AbortController directly on the temporary file object

* uses correct icon name

* feat: adds ability to remove all files and cancel the request

* feat: adds styling for the uploader

and enables it to work in multiple mode with classes over id's

* do not let the content exceed its boundaries

* feat: formats progress with 2 decimals

* feat: formats with 0 decimals

* fix: returns cancel error

* fix: maps cancel errors back to the uploadable item

* fix: do not proceed with media items if the request was cancelled

* chore: mark exports from media <- dropzone as deprecated

* fix: use correct attribute and remove a todo with localizations

* fix: use correct attribute and remove a todo with localizations

* fix: allow to specify parent through attribute

* feat: align attribute `disableFolderUpload` between dropzone components
2025-03-24 13:17:48 +00:00
Sven GeusensandGitHub 39cad5b2ea Add variancy information to reference response model (#18645)
* Made variant info available on DocumentReferenceResponseModel

* Fix scope issue

* PR Feedback + correct scoping
2025-03-24 12:10:30 +01:00
Andy ButlandandGitHub 30633fe728 Only validate for duplicate member email address when configured to do so (#18747)
* Only validate for duplicate member email address when configured to do so.

* Lookup member after creation by user name rather than email, as only the former is guaranteed to be unique.
2025-03-24 12:02:50 +01:00
Andy ButlandandGitHub 394210a8f7 Uses correct preview cookie same site and secure settings to allow preview mode to flow between links in the preview frame (#18640)
* Uses correct preview cookie same site and secure settings to allow preview mode to flow between links in the preview frame.

* Fixed comment.
2025-03-21 15:20:08 +01:00
Niels LyngsøandGitHub 45b0e43b89 Feature: validation variant filtering + up-front validation path translation (#18561)
* implement console.warn

* variant specific validation contexts

* getByType method

* test for getByType

* corrected test

* no need for fallback here

* revert

* support path starting with array query

* draft

* scoped json path mapper

* JSDocs correction

* rename function

* umbQueryMapperForJsonPaths

* JSDocs

* Validation Path Translation manager

* Validation Property Path Translation Manager

* rename

* rename folder

* rename folder correction

* impl for server validation context

* rename

* .

* clean up

* re introduce queryConstructor

* correct mappers

* correct imports

* implement path translator

* content detail path translator

* test with extension type propertyValidationPathTranslator

* implement translator system for block editors

* validation fixes to prevent issues
2025-03-21 12:59:06 +01:00
Niels LyngsøandGitHub c21da38c32 rename icon and regenerate icons (#18754) 2025-03-21 11:36:46 +01:00
Niels LyngsøandGitHub ef751ca699 style adjustments (#18757) 2025-03-21 11:35:37 +01:00
Niels LyngsøandGitHub 52debc3010 make numbers go right side (#18759) 2025-03-21 11:34:36 +01:00
Niels LyngsøandGitHub a38a9b29a3 addd var(--umb-card-medium-min-width) (#18760) 2025-03-21 11:34:03 +01:00
Jacob Overgaard e346ac2bee build: add emptyOutDir to base vite config to ensure modules are emptied before build
this does not have any effect on the release build since it always starts from fresh - it is mostly to ensure no dev files are left behind locally
2025-03-21 11:05:57 +01:00
Andreas ZerbstandGitHub 425901636e V15 QA updated nightly pipeline tests (#18746)
* Removed tests for removed features

* Fixed failing tests

* Bumped version
2025-03-21 08:03:28 +00:00
Niels Lyngsø d9f17b36c6 Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Client/src/packages/multi-url-picker/property-editor/property-editor-ui-multi-url-picker.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/property-editors/multiple-text-string/property-editor-ui-multiple-text-string.element.ts
#	version.json
2025-03-20 18:53:11 +01:00
Lee KelleherandGitHub 5fe5a16158 Tiptap RTE: Table Properties toolbar menu + modal (#18751)
* Tiptap Table Properties modal

* Attempting to reduce the cyclomatic complexity
2025-03-20 17:36:28 +01:00
131c9cda6f hotfix #18735 (#18750)
* fix multiple text string validation

* notify about messages

* cherry picked fix

* protection again unnecessary calls

* json path cherry pick + tests

* validation message change lock

* cherry pick from control lifecycle

* optimization

* propagate errors

* cherry picked sync

* query umb-input-multiple-text-string

* remove unused import

* remove optional chain expression

* use !

* outcomment the error handling

* outcomment more promise rejection error

* Fixed issue with multi URL picker.

* remove unesecary warning

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-20 16:22:05 +00:00
Niels LyngsøandGitHub e999d3977c change button look (#18678) 2025-03-20 12:55:29 +01:00
Sven Geusens f7854b8c95 Version bump 2025-03-20 11:08:38 +01:00
Jacob Overgaard 0f98b8342c Update branches (v16)
Removed v12, added v15 and v16
2025-03-20 10:49:02 +01:00
dependabot[bot]andJacob Overgaard b13f90046d Bump esbuild and vite in /src/Umbraco.Web.UI.Client
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.1 and updates ancestor dependency [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). These dependencies need to be updated together.


Updates `esbuild` from 0.24.2 to 0.25.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.2...v0.25.1)

Updates `vite` from 6.1.0 to 6.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: indirect
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 10:15:54 +01:00
Jacob Overgaard 304db8c28a Merge branch 'v15/dev' into contrib 2025-03-20 09:42:56 +01:00
dependabot[bot]andJacob Overgaard 723d3be905 Bump esbuild and vite in /src/Umbraco.Web.UI.Login
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.1 and updates ancestor dependency [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). These dependencies need to be updated together.


Updates `esbuild` from 0.24.2 to 0.25.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.2...v0.25.1)

Updates `vite` from 6.1.0 to 6.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: indirect
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 09:35:07 +01:00
Andy Butlandandkjac 5f37cd3d20 Make preview check for delivery API content case insensitive. (#18731) 2025-03-20 06:56:43 +01:00
Warren BuckleyandGitHub 203cc0e380 Updates dashboard to use uui-box headline property/attribute & place button in header-actions (#18736) 2025-03-19 23:29:56 +00:00
442de9a803 remove open config (#18592)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-19 20:24:25 +00:00
Mads RasmussenandGitHub eea6b9b2f1 Feature: Language Item Ref (#18521)
* add entity type to interface

* use item-ref in language input

* register ref item
2025-03-19 20:51:25 +01:00
b3b1ce2dcd Bugfix: block culture permissions (#18665)
* always allow copy

* add back readonly check

* render pencil icon if the property is read only

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-03-19 19:42:04 +00:00
69b69a5fc1 V15: Change drag and drop icon (#18519)
* register new drag icons

* use drag icon in sort-children-of modal

* update drag icons

* only use the vertical icon style

* Update property-editor-ui-image-crops.element.ts

* rename to grib

* reset formatting for merge conflict

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-19 19:39:18 +00:00
Mads RasmussenandGitHub 605cda9224 Bugfix: Document granular user permission preset (#18651)
* pass fallback permissions to document granular permissions

* set as preset

* clean up
2025-03-19 19:36:12 +00:00
b65ad4e234 Fix focal point drag not working on firefox (#18674)
* fix focal point drag not working on firefox

* prevent reacting to left click

* only left click for drag

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-19 16:15:34 +00:00
Jacob OvergaardandGitHub 4e680c88bb build(deps): bump @umbraco-ui/uui from 1.13.0-rc.1 to 1.13.0-rc.2 (#18677) 2025-03-19 15:20:09 +00:00
Jacob OvergaardandGitHub e8f991f485 V15: Adds accepted image types for image cropper (#18715)
* fix: adds accepted image types for image cropper

* chore: cleanup imports and types

* feat: adds a loader until all prerequisites have been resolved for image cropper

* feat: adds method to share temp file configuration
2025-03-19 12:36:51 +00:00
leekelleherandJacob Overgaard 66891333a8 Refactored the Tiptap Table toolbar button
to only show the table actions when the table is active,
otherwise show the Insert Table feature.
2025-03-19 13:26:04 +01:00
Lee KelleherandGitHub 044c9d2c87 Tiptap RTE: Table column/row bubble menu (#18708)
* Code formatting

* Icons for Tiptap table row/column actions

* Combined Tiptap exports

Removed extra constant

* Added Table Column Menu

* Added Table Row Menu

Made the bubble menu reusable
2025-03-19 13:25:13 +01:00
Andy ButlandandGitHub 7b0c419ace Adds detail of how many characters you are over when validating text fields for length. (#18722) 2025-03-19 12:02:40 +01:00
Jacob Overgaard 6ec1b9f1e4 build(deps-dev): bump storybook from 8.5.7 to 8.6.7 and run necessary migrations 2025-03-19 10:14:59 +01:00
Andy ButlandandGitHub 18069633b2 Used documented settings for the media seed cache. (#18723) 2025-03-19 09:47:12 +01:00
b24c29c647 V15: Extend search endpoints (#18634)
* Extend content type search endpoint

* Refactor to be able to specify trashed or not

* Simplify and extract into own method

* Fix breaking ctor

* Make non actions in controllers

* Fox up search service

* Add third ctor to avoid errors

* Update query to filter by is element

* Also implement for media

* Minor formatting and clean-up

* Re-introduce (and obsolete) the previous constructor

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-03-19 09:12:44 +01:00
Andreas ZerbstandGitHub f3f7fcc051 V15 QA added acceptance tests for block list variants (#18654)
* Moved tests

* Added variant tests

* Updated usage of helper

* Added tests

* Cleaned up

* Bumped version and added test command
2025-03-18 11:17:07 +00:00
Andreas ZerbstandGitHub b6fa93edac V15 QA added Tip Tap block variant acceptance tests (#18668)
* Moved tests

* Added variant tests for tiptap

* Updated file name

* Added test command

* Bumped package lock file

* removed npm command

* Bumped test helpers
2025-03-18 10:37:11 +00:00
Andy ButlandandGitHub b07a24ba55 Added clarifying comments to the logic for granular permissions. (#18705) 2025-03-18 11:08:30 +01:00
Andy ButlandandGitHub 42cb9b5c1e Removes one of the two duplicate ContentPublishingNotification publishings. (#18702) 2025-03-18 10:52:32 +01:00
Andreas ZerbstandGitHub 88657c1bb0 V15 QA added acceptance tests for block grid variants (#18658)
* Added block grid variant tests

* Bumped version

* Updated command to run tests on pipeline

* Removed test command

* Fixed comment
2025-03-18 09:35:28 +00:00
Andy ButlandandGitHub e91a25dcb6 Restrict valid API user client IDs to 100 characters. (#18688) 2025-03-18 06:33:24 +01:00
Lee KelleherandGitHub 81e63e7fa9 Tiptap RTE: Added data-mark attributes (#18689)
Tiptap: adds `data-mark` attributes to RTE, toolbar and toolbar items.
2025-03-18 11:22:20 +07:00
Andy ButlandandGitHub 2f9d58fc68 Fixes link for access to composition from document type property outside of group. (#18686) 2025-03-17 11:16:35 +01:00
Niels Lyngsø e9ba06929f Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	version.json
2025-03-17 11:09:18 +01:00
Andy Butland a5da305093 Merge remote-tracking branch 'origin/v13/dev' into v15/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs
#	src/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Authorization/MediaPermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Authorization/PermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs
#	src/Umbraco.Web.UI.Client/lib/tinymce/langs/da.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-cards.less
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
#	src/Umbraco.Web.UI.Client/src/views/users/views/users/users.html
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandlerTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/MediaPermissionsQueryStringHandlerTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/MediaPermissionsResourceHandlerTests.cs
2025-03-17 09:20:40 +01:00
Andy ButlandandGitHub e1e5f527e4 Updates dependency on Examine to 3.7. (#18676) 2025-03-17 09:13:09 +01:00
Niels Lyngsø f4e0e38824 Merge branch 'contrib' into v15/dev 2025-03-14 10:21:27 +01:00
Niels Lyngsø fa09ce6214 justify tag 2025-03-14 10:20:23 +01:00
Lee KelleherandGitHub dd8fb66300 Content Picker: Filter out invalid entity types (#18660)
* Reverted `elementName` constant

+ code tidy-up

* Filter out values that don't match the configured entity-type

Fixes #18476

* Notifies the user of invalid data/configuration

with an option to remove invalid data.
2025-03-14 09:55:45 +01:00
Lee KelleherandGitHub a02db287ce Tiptap RTE: Text Indent extension + toolbar items (#18672)
* Tiptap: Text Indent extension

* Updates indent manifest icons
2025-03-13 14:52:58 +00:00
e9c97f8c9b Allow multiple URL segments per document (#18603)
* Code tidy - XML header comments, method ordering, warning resolution.

* Add extension method for retrieving all URL segments for a document.

* Cache and persist multiple URL segments per document.

* Allowed segment providers to terminate or allow additional segments.
Set up currently failing integration test for expected routes.

* Resolved cache issue to ensure passing new integration tests.

* Fixed failing integration test.

* Test class naming tidy up.

* Added resolution and persistance of a primary segment, to retain previous behaviour when a single segment is retrieved.

* Further integration tests.

* Resolved backward compatibility of interface.

* Supress amends made to integration tests.

* Aligned naming of integration tests.

* Removed unused using, added XML header comment.

* Throw on missing table in migration.

* Code clean-up.

* Fix multiple enumeration

* Used default on migrated column.

* Use 1 over true for default value.

* Remove unused logger

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-13 12:47:46 +00:00
Lan Nguyen ThuyandJacob Overgaard f016dbd223 Fix issue text overflow when user name is too long 2025-03-13 11:07:57 +01:00
Mathias HelsengrenandJacob Overgaard da5669d9fc Remove the hardcoded color for the text in error message 2025-03-13 11:04:30 +01:00
Jacob Overgaard 74aa3d9676 bump version to 15.4.0-rc 2025-03-13 10:46:43 +01:00
Niels LyngsøandGitHub c671668e45 remove min height and max height configuration options (#18648) 2025-03-12 21:33:37 +01:00
Niels LyngsøandGitHub e337821d0e align search icon vertical (#18657) 2025-03-12 21:23:41 +01:00
leekelleherandJacob Overgaard 95fcf645dc Awaits super.openPicker() 2025-03-12 13:35:35 +01:00
Andy Butland b2aa04ae1a Merge branch 'release/13.7.2' into v13/dev
# Conflicts:
#	version.json
2025-03-12 12:18:45 +01:00
Nhu DinhandGitHub d3c6c87378 V15 QA Added acceptance tests for trash reference by (#18627)
* Added tests for Trash content

* Verified the reference headline

* Updated tests

* Added more tests for trash content

* Updated due to test helper changes

* Bumped version

* Maked trash content tests run in the pipeline

* Fixed comments

* Reverted smokeTest command
2025-03-12 09:58:41 +00:00
Niels LyngsøandGitHub b3e192916d correct labels (#18650) 2025-03-12 09:17:20 +00:00
Andreas ZerbstandGitHub dfe100d7fc V15 QA added block grid with areas tests (#18641)
* Started testing block areas

* Added tests

* Added more tests

* Finished tests

* Moved tests

* Skipped tests

* Fixed comments

* Runs the created tests on the pipeline

* Reverted test command
2025-03-12 09:10:38 +00:00
Andreas ZerbstandGitHub 3420748b35 V15 QA reduced amount of browser downloaded on pipeline to reduce download time (#18642)
* Updated pipeline

* Fixed command
2025-03-12 09:40:03 +01:00
Andy ButlandandGitHub e270adc50f Reverts UI updates from publish with desdendants dialog. (#18647) 2025-03-12 08:10:34 +01:00
Andy Butlandandkjac de282d0fbf Reverts UI updates from publish with descendants dialog (15) (#18646)
* Reverts UI updates from publish with descendants dialog.

* Removed unused variable.
2025-03-12 08:01:00 +01:00
Andy ButlandandGitHub ce9460161f Reverts UI updates from publish with descendants dialog (15) (#18646)
* Reverts UI updates from publish with descendants dialog.

* Removed unused variable.
2025-03-12 07:59:37 +01:00
Andy Butland fd5b8de533 Bumped version to 13.7.2 2025-03-12 07:25:35 +01:00
Andy Butland e3d9b042c2 Avoids collection was modified issue when flowing identities to the authenticated user's principal. (#18527) 2025-03-12 07:24:50 +01:00
Andy ButlandandGitHub 54931472f8 Corrects obsoletion message on ITwoFactorLoginService. (#18623) 2025-03-11 17:55:33 +00:00
df6a88b4d5 V15: Enable umbraco-extension client to auto-build (#18597)
* feat: adds autobuild of umbraco extensions created by the dotnet template

* adds file extensions to imports to follow the esmodule convention + apply formatting

* build(deps): upgrade hey-api, vite, typescript and generate new api

* chore: formatting

* clean up actions as client is now automatically being built when starting the site

* revert change with UMBRACO_VERSION_FROM_TEMPLATE

* revert if(includeExample)

* use template name

* use template name

* feat: update the way it sets the auth token

* add back in IncludeExample if

* fix: rename allowPackageTelemetry to allowTelemetry because that is what it is actually called

* `.csproj` amends

- Adds `BeforeTargets` to "BuildClient" target
- Adds "package.json" to "RestoreClient" target input
- Removes extra parameters from `npm i` command

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-03-11 16:14:47 +00:00
Jacob OvergaardandGitHub 2cc9d2cab0 fix: adds back support for legacy AllowPackageTelemetry (#18644)
Due to an unfortunate mistake in the Umbraco.Cms.Targets generated JSON schema, we alluded to supporting `allowPackageTelemetry` in the JSON files, however the backend didn't support this.
2025-03-11 15:51:38 +00:00
Jacob OvergaardandGitHub c0b6317da8 V15: Reduce the size of the package json schema (#18643)
* chore: combine similar commands

* fix: add specific ignore on tinymce

* fix: override the RawEditorOptions types from tinymce

this ensures that we do not have 70k lines of schema in the generated schema

* fix: import only from the extension-registry

this will automatically find all registered UmbExtensionManifest regardless of which package is imported
2025-03-11 15:50:26 +00:00
leekelleherandJacob Overgaard b2f69691d6 Adds validation to Checkbox List property editor 2025-03-11 14:33:34 +01:00
b684bf0a69 Prevents attempt to move an item to itself as a parent (#18550)
* Prevents attempt to move an item to itself as a parent.

* add default tree item type

* use pickable filter

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-11 13:30:24 +01:00
Niels LyngsøandGitHub 3586f137fc avoid indifferences on property-entry property order (#18530) 2025-03-11 12:30:14 +01:00
Lee KelleherandGitHub 434dd50021 Merge pull request #18633 from umbraco/v15/fix-bug/rte-code-editor-modal-pretty-print
Fix bug RTE code editor modal - pretty print not working
2025-03-11 10:55:49 +00:00
Andy ButlandandGitHub 863d3d11c6 Updates sort property and direction together to avoid intermittent failures (#18590)
* Updates sort property and direction together to avoid intermittent failures.

* Removed debug code.
2025-03-11 11:38:14 +01:00
Niels LyngsøandGitHub d906fc346d use change event (#18631) 2025-03-11 09:19:19 +00:00
PhyxionNLandGitHub ced3db8542 Add NuGet badge (#18583) 2025-03-11 10:09:35 +01:00
Andy Butland 1f2afbaa1d Bumped version to 15.3.0-rc2. 2025-03-11 09:45:50 +01:00
Andy Butland e8e1b6ef33 Merge commit from fork
* Tighten management API endpoint access rules.

* Bumped version to 15.2.1.
2025-03-11 09:42:58 +01:00
Andy Butland 4803b4303d bumped imagesharp to prevent CVE-2025-27598 (#18602)
# Conflicts:
#	Directory.Packages.props
2025-03-11 09:42:47 +01:00
leekelleherandJacob Overgaard a48d8a4110 Adds validation to Radio Button List property editor
Fixes #18268
2025-03-11 09:34:31 +01:00
leekelleherandJacob Overgaard c1671f4e9b Adds validation to Dropdown List property editor
Fixes #17271
2025-03-11 09:32:35 +01:00
Andy Butland be4d4bef39 Merge branch 'release/15.2.3' into v15/dev
# Conflicts:
#	version.json
2025-03-11 09:27:22 +01:00
Andy Butland f4ae796b30 Merge branch 'v13/dev' of https://github.com/umbraco/Umbraco-CMS into v13/dev 2025-03-11 09:18:25 +01:00
Andy Butland 367d0386b6 Merge branch 'release/13.7.1' into v13/dev
# Conflicts:
#	version.json
2025-03-11 09:18:12 +01:00
Lan Nguyen Thuy 1d48261b7b fix bug rte code editor modal pretty print not working 2025-03-11 13:39:55 +07:00
Andy ButlandandGitHub ebb6a580dc Merge commit from fork
* Tighten management API endpoint access rules.

* Bumped version to 15.2.1.
2025-03-11 05:11:36 +01:00
5b54bed406 Merge commit from fork
* Fixed parsing of node if in content and media permission querystring handlers to retrieve expected value when multiple are provided in the querystring.

* Add HttpPost attributes to backoffice endpoints that should only accept post requests.

* Bumped version to 13.6.1.

* Narrow PermissionQueryString parsing to the releveant UmbracoObjectType

* Add missed update from v10

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-11 05:11:08 +01:00
Nhu DinhandGitHub bc488d78e4 V15 QA Fixed the failing acceptance tests due to UI changes (#18617)
* Fixed the failing tests

* Bumped version

* Fixed can allow bulk trash in the media section

* Fixed notification message
2025-03-10 14:46:22 +00:00
Anders BjernerandMichael Latouche d3b60277d7 Fixed typo in TinyMCE's da.js 2025-03-10 15:38:50 +01:00
a51cbd3ee9 Added description to block list properties hide content editor (#18619)
* Added description to block list properties hide content editor

* Update the description to use localization

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
2025-03-10 13:50:28 +00:00
458eb2e52f Tiptap RTE: Anchor extension + toolbar item (#18575)
* Tiptap: Anchor extension

* Corrected import; fixed the build

* Removed icon, mistakenly added to this branch

it was intended for the Character Map feature.

* Updated dialog style

* Scoped the Anchor modal to Tiptap package

Exported modal alias constant.

* Tweaked selected Anchor styling

* Localizes public labels

* Exported Anchor constants correctly

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-10 13:22:57 +00:00
Lee KelleherandGitHub 7ef11621dd Tiptap RTE: Character Map modal + toolbar item (#18577)
* Tiptap: Character Map extension

* Added missing icon! 🤦

* Added missing manifests

for the CharMap modal

* CharMap dialog styles

* Scoped the Character Map modal to Tiptap package

Exported modal alias constant.
2025-03-10 13:40:58 +01:00
Andy Butland 0d066c4ccc Merge branch 'release/15.3' into v15/dev 2025-03-10 12:04:42 +01:00
Andy ButlandandGitHub 4fe168f540 Removed obsolete integration test. (#18604) 2025-03-10 11:19:40 +01:00
Andy ButlandandGitHub 0d79a1f443 Fixed issue with max validation using default 0 value. (#18616) 2025-03-10 10:57:23 +01:00
Andy Butland ead277ed3e bumped imagesharp to prevent CVE-2025-27598 (#18602)
# Conflicts:
#	Directory.Packages.props
2025-03-09 08:51:18 +01:00
Andy Butland c35d7d18a8 Merge remote-tracking branch 'origin/v13/dev' into v15/dev
# Conflicts:
#	Directory.Packages.props
2025-03-09 08:46:24 +01:00
twoday-rolandkockandAndy Butland 2ec6ff4ebc bumped imagesharp to prevent CVE-2025-27598 (#18602) 2025-03-09 08:43:52 +01:00
twoday-rolandkockandGitHub 78a8d017a2 bumped imagesharp to prevent CVE-2025-27598 (#18602) 2025-03-09 08:41:06 +01:00
Anders ReusandGitHub 50c3756eb0 V15 QA added test for issue 18555 (#18601)
* Added accceptance test for issue 18555

* Bumped version
2025-03-07 13:51:26 +01:00
Sven Geusens c757f9fcb0 Merge remote-tracking branch 'origin/release/15.3' into v15/dev 2025-03-07 09:13:15 +01:00
Niels LyngsøandGitHub c03b1612b6 update UUI (#18593) 2025-03-06 18:55:14 +00:00
Mads RasmussenandGitHub a79095a869 Support root/area allowed types when pasting in Block Grid (#18480)
* poc allowed root types

* optional filter

* wip custom paste action for block grid

* pass filter

* add filter to property action

* add js docs

* add type

* add type

* add type

* implment filter for block grid areas

* use correct types

* use correct types

* clean up

* update root paste

* clean up

* fix grid paste filter

* fix linter

* Update clipboard.property-context.ts
2025-03-06 14:20:47 +01:00
MoleandGitHub 95c892000d V15: Add textbox and text area serverside validation (#18596)
* Add validation to TextOnlyValueEditor

* Fix tests

* Add tests
2025-03-06 12:19:28 +00:00
Andy ButlandandGitHub 7b6cef6083 Added missing translations for dictionary import. (#18551) 2025-03-06 12:40:42 +01:00
Nikolaj GeisleandGitHub cb78e524d8 Remove duplicate webhook registration (#18594) 2025-03-06 11:24:48 +00:00
Lee KelleherandGitHub 5bf63c2fa8 Tiptap: Block extension config refresh (#18569)
Refreshes the UI after the Block extension
option has been set as enabled/disabled.

Fixes #18541
2025-03-06 11:42:44 +01:00
Lee KelleherandGitHub a939f8ee1c Chore: Tiptap code sweep 2 (#18579)
* Updates "rte-content.css" to share the Macro Holder style

* Tiptap toolbar menu padding

* Removed unnecessary `isActive` for Embedded Media toolbar button

* Adds scroll container to available toolbar item selection

* Toolbar config: adds style for "menu" items

* Adds missing mappings for the TinyMCE toolbar conversion

* Updates toolbar "menu" styling
2025-03-06 11:41:51 +01:00
29b4056f68 Added server side validation for the Multi Url Picker. (#18589)
* Plumbing

* Handle null value

* Add tests

* Fix error found in tests

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-06 09:52:55 +00:00
45ea6a3cfc Server side validation for property editors (multiple text strings) (#18581)
* Server-side validation for multiple text strings property editor.

* Added unit tests for block list min/max server validation.

* Add danish translations

* Add test showing issue

* Fix issue

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-06 09:48:48 +00:00
6d0dd82781 Move database cache rebuild to a background task with polling (#18496)
* Use background queue for database cache rebuild and track rebuilding status.

* Updated OpenApi.json and client-side types.

* Updated client to poll for completion of database rebuild.

* Update src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs

Co-authored-by: Sven Geusens <sge@umbraco.dk>

* Removed unnecessary obsolete attribute.

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-06 10:23:00 +01:00
7b422598f9 [V15] Align reserved property endpoints code and usage (#18319)
* Remove/enhance duplicate code

contentTypeEditing Services now use the IReservedFieldNamesService to determine invalid property alias values.

* Let Modelsbuilder define it's reserved property alias names

* Update, add tests + fix false positives

* Removed config check to register modelsbuilder required reserved properties

* Updated unittests regarding removed check of modelsbuilder mode

* Fix merge

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-06 09:16:00 +01:00
Niels LyngsøandGitHub 52bb32205b JSDocs update (#18586) 2025-03-06 09:15:30 +01:00
Niels Lyngsø 8a68457421 Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/MediaPicker3PropertyEditor.cs
#	src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/document-type/document-type-workspace-editor.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/media-type-workspace-editor.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/members/member-type/workspace/member-type-workspace-editor.element.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DecimalValueEditorTests.cs
2025-03-05 15:33:48 +01:00
Sven Geusens 04fa0df886 Fix pipeline api docs generation dependancy generation. 2025-03-05 15:18:26 +01:00
Kenn JacobsenandGitHub 11d9b3a1bd Match source block both on culture and alias (#18582) 2025-03-05 14:23:33 +01:00
84d5b7aa52 Server side validation for property editors (drop-down and checkbox list) (#18564)
* WIP...

* Localization and unit tests for multiple value property editor validation.

* Localization fixes.

* Clarified XML header comment.

* Add danish translations

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-05 12:17:31 +00:00
Sven GeusensandGitHub 0cead6f10a Fix Rich text block validation path (#18578)
* Made BlockEditorValidator itemDataGroups.Path overridable

* PR feedback
2025-03-05 12:42:29 +01:00
Andy Butland 62690194cf Fixed failing unit test following merge from v13/dev. 2025-03-05 11:47:27 +01:00
Markus JohanssonandGitHub 900938edd0 V15: Added uui-box around ungrouped properties during block editing (#18571) (#18572) 2025-03-05 08:44:49 +01:00
Mads RasmussenandGitHub bf7efbc268 fix custom views for block list and block rte (#18565) 2025-03-05 08:38:11 +01:00
Lee KelleherandGitHub 00e7602b55 V15: Resolves "Save and Preview" backoffice refresh (#18568)
* Reverted `elementName` constant

* Ensures the backoffice preview URL has correct slashes
2025-03-05 08:12:54 +01:00
Andy Butland 7a9e1b66d9 Merge remote-tracking branch 'origin/v13/dev' into v15/merge-from-13 2025-03-05 06:46:13 +01:00
1a205d8727 Handle multiline statements in migrations (#18478)
* Handle multiline statements in migrations

* Fixed failing unit tests and incorrect obsoletion.

* Fixed failing integration tests.

* Applied suggestion from code review.

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-04 17:27:33 +01:00
867d405992 Provide custom required validator for block list and toggle (#18474)
* Provide custom required validator for block list.

* Adds a custom required validator for the toggle to ensure the value provided is true.

* Remove unnecessary usings

* Remove redundant interface and base constructor

* Remove unnecessary interface

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-04 15:25:10 +00:00
a99c581ab5 V15: Add MNTP serverside validation (#18526)
* Add amount validator

* Add ObjectTypeValidator to MNTP

* Move validate startnode to helper method

* Validate allowed type

* Fix tests

* Added some XML header comments and resolved nit-picky warnings.

* Further XML comments.

* Fix null validation case

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-04 16:06:05 +01:00
Mads RasmussenandGitHub 85883cee85 Feature: Has Children Condition (#18161)
* add children to reload translation

* add has children condition + context

* export

* register manifests

* set hasChildren value for tree items

* add condition to document tree item

* add has children condition to sort children of document

* add conditions for media

* add entity trashed event

* dispatch event when entity is trashed

* remove double event listeners

* export action class

* Update default-tree.context.ts

* wip reload tree when entity is trashed

* move into data folder

* clean up listeners

* move manifest

* wip reload root

* clean up

* add recycle bin tree item

* use for media

* pass entity types through manifest + add recycle bin tree item kind

* remove custom implementation for document recycle bin

* use kind

* rename to supportedEntityTypes

* Update recycle-bin-tree-item.context.ts

* clean up

* remove condition

* only show empty recycle bin if it has children

* remove of sort children
2025-03-04 14:22:22 +00:00
Andy Butland b9cbce561c Merge branch 'release/15.3' of https://github.com/umbraco/Umbraco-CMS into release/15.3 2025-03-04 14:54:44 +01:00
Andy ButlandandMole 51223f44ff Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints (#18508)
* Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints.

* Fixed typo in comment.

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 14:54:30 +01:00
0f9c2332e0 Adds unit tests for RequiredValidator. (#18471)
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 13:49:37 +00:00
Andy Butlandandmole 7629b85861 Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints (#18508)
* Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints.

* Fixed typo in comment.

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 14:47:22 +01:00
a7f5b142e9 Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints (#18508)
* Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints.

* Fixed typo in comment.

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 13:46:54 +00:00
Andy Butland d164892619 Handle create and update validation for media picker. (#18537) 2025-03-04 14:09:07 +01:00
Andy ButlandandGitHub ca6da751f2 Handle create and update validation for media picker. (#18537) 2025-03-04 14:08:08 +01:00
Nikolaj GeisleandGitHub 8d289846e1 Update nuget packages (#18559) 2025-03-04 13:49:11 +01:00
Mads RasmussenandGitHub 5358c0346e remove the word folder in label (#18485) 2025-03-04 12:21:51 +00:00
6d5b6a4553 Server side validation for property editors (colour picker) (#18557)
* Added server-side validation for colour picker.

* Minor refactor.

* Add danish translation

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-04 12:13:37 +00:00
Andy ButlandandGitHub 396b5ea211 Avoids collection was modified issue when flowing identities to the authenticated user's principal. (#18527) 2025-03-04 12:12:29 +01:00
Mads Rasmussen 7e4dda7bab fix block grid custom views 2025-03-04 12:11:01 +01:00
Mads RasmussenandGitHub 3491afefbb fix block grid custom views (#18558) 2025-03-04 12:09:56 +01:00
Andy ButlandandGitHub 3cf9099f56 Remove version from models builder generated code header when configured to do so. (#18501) 2025-03-04 11:52:20 +01:00
Andy Butland d167a60373 Correct handling of step values of zero. (#18532) 2025-03-04 11:51:19 +01:00
Andy ButlandandGitHub 92cb355f4d Correct handling of step values of zero. (#18532) 2025-03-04 11:18:23 +01:00
Mads RasmussenandGitHub fb11191fd1 Feature: Content Type Workspace Editor Header Element (#18520)
* add content-type-workspace-editor-header element

* use for document type

* use in media and member type workspaces

* fix type errors
2025-03-04 10:10:57 +01:00
Andy Butlandandkjac b650e7984e Fixes multiple available constructors exception for execute template query constructor. (#18552) 2025-03-04 10:04:06 +01:00
30186e0bdd V15 QA Fixing the failing acceptance tests 03032025 (#18549)
* Fixed Content tests with slider

* Updated Content tests with true/false

* Fixed due to api helper changes

* Updated tests related to the user has no permission due to an issue

* Added .fixme for Content tests with tiptap

* Bumped version

* Fixed tests for renaming a media

* Added .fixme for the failing tests due to the actual issues

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-03-04 09:00:45 +00:00
Jacob OvergaardandGitHub 2b24b40a75 V15: Workspace buttons cannot be overwritten in all cases (#18525)
* fix: consider that overwrites can be strings OR arrays

* chore: formatting

* chore(mock): use correct javascript for mock plugins

* chore: uses intersection helper method to save on code

* fix: should work without requesting extra update to the the extensions controller refreshing the state
2025-03-04 08:54:38 +00:00
Andy ButlandandGitHub 09bcede957 Fixes multiple available constructors exception for execute template query constructor. (#18552) 2025-03-04 09:51:36 +01:00
Chris HoustonandSebastiaan Janssen 998b6f9296 Fixes the Fatal icon text so it's readable in Dark Mode. (#18375) 2025-03-04 09:45:33 +01:00
2826678049 Added option for filtering the content types allowed as children based on the parent node (#18380)
* Added option for filtering the content types allowed as children based on the parent node.

* Updated OpenApi.json.

* Apply suggestions from code review

Co-authored-by: Sven Geusens <sge@umbraco.dk>

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-04 09:34:17 +01:00
Kenn JacobsenandGitHub 67ed38f6a2 Guard against element type mismatch at document type creation (#18529) 2025-03-04 09:29:29 +01:00
Mads RasmussenandGitHub fbe2cfacd8 set additionalOptions on the rollback entity action (#18489) 2025-03-04 09:18:53 +01:00
Andy ButlandandGitHub e8ff21987b Fixed grammer of unauthorized message. (#18553) 2025-03-04 08:37:09 +01:00
Andy Butland b9250c20e9 Merge branch 'v15/dev' into contrib 2025-03-04 07:43:10 +01:00
Jacob OvergaardandGitHub e9ef05057e V15: Adds migration of data type configuration when changing property editor UI (#18534)
* feat: adds comparer to keep useful data around when migrating from one property editor ui to another

this is really useful when migrating from tinymce to tiptap for example

* stores values in property to access later
2025-03-03 21:22:36 +00:00
Mathias HelsengrenandJacob Overgaard 8379cba15d Changed so the the logviewer's date input is using the umb-input-date instead, gave the umb-input-date a color-scheme option, and added the color-scheme dark, for the darkmode css. 2025-03-03 22:02:39 +01:00
51cce234f4 V15: Allows certain adjustments of the logo (#18499)
* feat: uses the app-logo component to show the large logo

* feat: rename and publish CSS variables to modify the logo

* feat: sets size of logo to 55px to match login screen

* feat: adds css variables to customize the dimensions of the login logo

* fix: uses `ifDefined` in case logo is not defined

* fix: uses the intrinsic logo path from `when()`

* Fixed up import types

* uses the intrinsic alternative logo path from `when()`

* feat: changes logo based on theme

* feat: forces dark theme on the header logo

* feat: adds blue logomark

* feat: adds logo-alternative path to the backend

* chore: minify logos

* feat: optimises logo sizes

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-03-03 15:54:22 +00:00
865a2cd83a Added tests and localization to radio button validation (#18512)
* Added tests and localization to radio button validation.

* Remove unnecessary ToString

* Add danish translations

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-03 12:23:55 +00:00
Andy ButlandandGitHub 33d83e1491 Added obsoletion messages for unused interface and implementation for cache rebuilds (#18524) 2025-03-03 13:16:23 +01:00
Andy ButlandandGitHub f6b4ddf598 Localize the email property editor validation and add tests (#18461)
* Localize the email property editor validation and add tests.

* Reverted trim to ensure behaviour for whitespace is unchanged.
2025-03-03 13:13:50 +01:00
Nhu DinhandGitHub 2ebc6badd7 V15 QA Publish E2E test results in the Azure pipeline (#18498)
* Updated playwright config to export the Junit report

* Published the Junit report

* Fixed

* Updated outputDir

* Make one test failed

* Changed npm command

* Fixed outputFile

* Updated folder to export test result

* Make another tests failed

* Updated publish test results job

* Changed testSQLite command

* Updated testRunTitle

* Changed npm command

* Updated testRunTitle

* Reverted

* Fixed comment

* Make some tests failed to test

* Reverted
2025-03-03 13:11:07 +07:00
Mads Rasmussen 2bb894c038 15.3: Hotfix: Content type discard changes (#18490)
* wrap in entity detail workspace element

* use element on media type and member type

* add developer console warning

* sync current data with owner content type

* Update content-type-workspace-context-base.ts

* fix lint error
2025-02-28 20:15:47 +01:00
Lee KelleherandGitHub 3ef9d64f1a Tiptap RTE: Stylesheets (#18502)
* Copies the "TinyMCE Stylesheets Property Editor UI" to the Templating/Stylesheet package

* Deprecates the "TinyMCE Stylesheets Property Editor UI"

as it may be used in 3rd party extensions.

TinyMCE will be removed in v16, but this deprecation notice in 15.4
will at least notify that the "Umb.PropertyEditorUi.StylesheetPicker"
UI can be used.

* Updates TinyMCE to use the Stylesheet Picker UI

* Prevent Stylesheet folders from being picked

+ UI tweaks

* Updates Stylesheet mock data

* Stylesheet Rule Input - removes Edit button

uses `@open` event for UI consistency with other pickers.

* Updates pangram

* Amending to be "header" instead of "heading"

* Adds "stylesheets" config to Tiptap data-type

* Updates RTE styles for Tiptap

Moves "StarterKit" styles to the RTE Essentials extension registration.

Scopes TinyMCE in "rte-content.css" (for now).
2025-02-28 15:37:52 +00:00
Andy ButlandandJacob Overgaard a20f11e48f Makes a few labels friendlier for screen readers. 2025-02-28 16:07:56 +01:00
Mads RasmussenandGitHub 4795609973 Removet the Tip tap placeholder text (#18486) 2025-02-28 14:01:54 +01:00
Mads RasmussenandGitHub 8e7809d37e align tags (#18487) 2025-02-28 13:56:05 +01:00
Mads RasmussenandGitHub 96febee559 add mandatory attribute (#18488) 2025-02-28 13:55:06 +01:00
Mads RasmussenandGitHub 9dfa110cb8 15.3: Hotfix: Content type discard changes (#18490)
* wrap in entity detail workspace element

* use element on media type and member type

* add developer console warning

* sync current data with owner content type

* Update content-type-workspace-context-base.ts

* fix lint error
2025-02-28 13:38:54 +01:00
Andy Butland 82eeb0737b Merge remote-tracking branch 'origin/v13/dev' into v15/merge-from-13
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
2025-02-28 07:40:43 +01:00
Andy Butland 451b5f96e7 Use windows for build agent to avoid hanging issues with Linux. 2025-02-28 06:57:35 +01:00
Andy Butland 15ebae5025 Bumped version to 13.7.1. 2025-02-28 06:57:00 +01:00
Andy Butland 64024e418f Bumped version to 15.2.3. 2025-02-28 06:48:13 +01:00
Nhu DinhandGitHub a7a6eb8af6 V15 QA Fixing the failing acceptance tests in the nightly build (#18466)
* Updated permission name due to UI changes

* Added skip to flaky tests

* Add skip to flaky tests

* Bumped version

* Updated content tests due to test helper changes
2025-02-27 11:44:39 +00:00
Lee KelleherandGitHub f6ab6eea75 Tiptap RTE: Reusable toolbar menu component (#18483)
* Adds Tiptap Toolbar Menu extension kind

a reusable menu component.

Removes the `unique` property for menu-items.

* Implements Font Family as toolbar menu kind

* Implements Font Size as toolbar menu kind

* Implements Style Select as toolbar menu kind

* Implements Table as toolbar menu kind

* Markup amends

* Mock data RTE content addition

* "TextDirection" manifest correction

* Text Align: made to be toggleable
2025-02-27 09:52:44 +00:00
Lee KelleherandGitHub 9809db4179 Tiptap: Text color + background color (#18482)
adds a reusable "color picker button" kind extension type.
2025-02-27 09:42:25 +01:00
Andy Butland 32bfbadb8e Merge branch 'release/13.7.0' into v13/dev
# Conflicts:
#	version.json
2025-02-27 06:47:15 +01:00
Nikolaj GeisleandGitHub 2bdeefec16 Pass preview to GetEntryOptions (#18470) 2025-02-26 21:48:03 +00:00
Kenn JacobsenandGitHub 5ed09ebefa Backport ShowUnroutableContentWarnings to V13 (#18479) 2025-02-26 20:13:27 +01:00
Niels LyngsøandGitHub 07bb2d1840 Feature: RTE blocks validation (#18453)
* restructure block list code a bit for better readability

* improve error message

* block list validation

* validation for RTE Blocks

* rte blocks validation
2025-02-26 13:10:59 +00:00
Niels Lyngsø 207bd7283c DX to inform about why there is a discard changes 2025-02-26 12:48:39 +01:00
Niels LyngsøandGitHub afe4a56ca7 createContainer shuld duplicate none owner parent containers (#18462) 2025-02-26 09:29:36 +01:00
Lee KelleherandGitHub 40fc911234 Tiptap: Text Direction extension + toolbar buttons (#18459)
for bidi support, right-to-left; left-to-right.
2025-02-26 08:38:46 +01:00
Andy Butland eaea7a67ba Bump version to 13.7.0. 2025-02-26 08:14:26 +01:00
Jacob OvergaardandGitHub e5d5f03818 V15: Schedule only languages you have access to (#18433)
* fix: shows all languages but only lets user click on available languages

same logic as used in publish modal

* fix: only adds "selected" languages to the value output

otherwise the server will not accept values from languages you do not have access to

* mark private properties
2025-02-25 14:58:20 +00:00
Niels LyngsøandGitHub ef4bef80d7 Fix: content structure promise (#18456)
* client validation for textarea

* keep response
2025-02-25 14:58:09 +00:00
Lee KelleherandGitHub 6938225c83 Chore: Tiptap code sweep (#18447)
* Streamlined Tiptap extension code for consistency

* Corrected `Umb.Kind.TiptapToolbar.Button` manifest

* Simplified the Tiptap placeholder text

* Media Upload: de-duplicated blobUrl 

* Simplified CSS

* Sets rendered Image CSS to 100% width rather than adding `width: 100%` to the `<img>` markup/content.
2025-02-25 14:49:39 +00:00
Mads RasmussenandGitHub 492eb639df implement pagination (#18441) 2025-02-25 15:28:21 +01:00
Niels LyngsøandGitHub 32da5a2358 Feature: enforce block variations to be present in all mandatory languages (#18280)
* no need to re-request cause application refreshes when user changes

* implement promise to retrieve languages

* expose on all mandatory languages, to ensure the right mandatory effect
2025-02-25 14:13:37 +00:00
Lee KelleherandGitHub 0794ff9bf5 Tiptap: Trailing Node extension (#18446) 2025-02-25 15:04:14 +01:00
Lee KelleherandGitHub 5db67ae6b9 Tiptap RTE: Table selection styling (#18444)
* Tiptap table: amend "selected" color

* Tiptap table: correct cell border

for selection.
2025-02-25 15:03:04 +01:00
Lee KelleherandGitHub 52063f04f2 Tiptap RTE: configuration localizations (#18125)
* Adds localizations for general RTE settings

* Adds localizations for Tiptap settings

* Adds "Edit source code" localization

For Tiptap's View Source Code modal headline.

* Added more Tiptap RTE localizations

Applied to TinyMCE where relevant.
2025-02-25 15:02:27 +01:00
4e5512fd8f Feature: Simpler app language request (#18278)
* no need to re-request cause application refreshes when user changes

* implement promise to retrieve languages

* add back the isAuth observable

* Update app-language.context.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-25 13:33:06 +00:00
Andreas ZerbstandGitHub 2e5a5b65fd V15 QA fixed flaky language tests (#18451)
* Added wait for flaky test

* Updated version
2025-02-25 13:06:52 +00:00
ebc38f4cb3 Server side validation for property editors (integer, decimal and slider) (#18428)
* Server side validation for integer property value editor.

* Apply suggestions from code review

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Applied further changes from code review.

* Localized validation messages.

* Added server-side validation for decimal property editor.

* Added server-side validation for slider property editor.

* Moved repeated step validation into a helper method.

* Add danish translations

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-02-25 13:33:20 +01:00
Niels LyngsøandGitHub fe71f571bb Feature: Property Value Preset (#18423)
* property value preset type

* add version to comment

* move clone controller

* add JSDocs

* sort getByTypeAndFilter

* builder

* updates for extension type

* unit test

* test weight

* dynamic filter depending on situation

* async test

* combine ui and schema test

* make block creation async

* commit todos

* proper deprecation

* value can be undefined

* toggle preset api

* ability to observe and get all languages

* default config field

* change only to expose all Cultures

* Variant Presets

* fix test

* implementation for blocks

* TODO

* improve comment

* implement for ContentTypes

* always set culture and segment for variant values

* only set values that got a value

* todo notes

* also resolve init when createScaffold

* property-value-preset.Slider

* leaving some concept code for another time

* enable undefined

* revert

* sort properties when creating

* refactor into setCurrentData

* refactor to content data manager

* Keep order from persisted data

* refactor to also cover updateCurrent

* add type safety by making persisted partial as well

* lint corrections

* preset for markdown

* refactor to work with frozen data

* implement for MarkDown

* compare based on object properties not object as a whole

* only update persisted data in regards to what was saved

* fix tests
2025-02-25 12:33:01 +00:00
74eb66ef86 V15: Serverside Media Picker Validation (#18429)
* Add TypedJsonValidator to avoid duplicate serialization

* Add allowed type validator

* Validate multiple media toggle

* Add startnode validator

* Fix tests

* Add validation tests

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Add XML docs

* Remove unnecessary obsolete constructor

* Avoid multiple checks

* Use value instead of specific member names

* Remove test

* Optimize StartNodeValidator

* Clarify Validates_Allowed_Type

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-25 13:26:16 +01:00
790c451df1 Published status filtering (#18281)
* Initial refactor (pending more tests)

* Fix structural querying across changing publish states + add tests accordingly

* Add tests to validate ancestor and descendant order

* Remove axis querying from published status filtering

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-02-25 13:25:33 +01:00
Jacob OvergaardandGitHub c19b2286b3 feat: adds validation on date from/to inputs in the schedule modal (#18437) 2025-02-25 11:55:26 +00:00
Andy ButlandandGitHub 913205e614 Restored minimal default permissions for the writer user group. (#18449) 2025-02-25 10:29:54 +00:00
8c931d59bd Add Localization to Documentation Types - Structure - Collection (#18396)
* Localization changes to Documentation Types - Structure - Collection

* added the collections to en-us too

* Delete src/Umbraco.Web.UI/Umbraco.Web.UI.sln

* Adds collection:noItemsTitle

* Adds collection:noItemsTitle

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-25 09:03:02 +00:00
Niels LyngsøandGitHub 33ee1447cc Fix #18431 (#18445)
* Keep order from persisted data

* refactor to also cover updateCurrent
2025-02-25 09:44:31 +01:00
leekelleherandJacob Overgaard e448f4b174 Added TinyMCE toolbar to Tiptap toolbar mappings
for the Font and Style items.
2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 3dfec52d55 Toolbar style tweaks 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 86942c34d8 Enhanced Span extension
Changed to be a `Mark`, as `Node`s aren't allowed within paragraphs.

Unregistered the `TextStyle` extension,
as it conflicts with the global `style` attribute feature.
2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 85179dcfd3 Updated mock data 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 5037cc321f Tiptap TextStyle tweaks 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard da26fd1a3c Updates TinyMCE mock data
to show the font buttons in the toolbar
2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard d30af299ef Tiptap: adds Font Size toolbar button 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 9f00e968a6 Tiptap: adds Font Family toolbar button 2025-02-25 09:13:31 +01:00
Niels LyngsøandGitHub a4f385ba01 Fix: remember validation state when creating (#18432)
* only reset state and load if its a new unique

* related clean up

* return response promise
2025-02-24 22:09:43 +01:00
Niels LyngsøandGitHub 347e898190 simplifying the use of props (#18430) 2025-02-24 18:50:29 +00:00
Kenn JacobsenandGitHub 3e291894e5 Fix validation for blocks in variant block editors (#18438) 2025-02-24 18:47:37 +01:00
Mads RasmussenandGitHub c431a5abfe Implement create options for Member Types + Fix issue when single option is a link (#18310)
* implement create options for member types

* export path consts

* add support for first action being a link

* add comment
2025-02-24 13:49:36 +00:00
a482ab239a Feature: Bulk Delete/Trash referenced by (#18393)
* add trash confirm modal

* make referenceRepo optional + adjust styling

* add referenceRepository to media trash action

* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add null check

* change to use entity-item-ref element

* register media item ref

* add fallback element

* show 3 references

* wip data mapper concept

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* Added $type to ReferenceResponseModels

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* generate server models

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* add fallback

* use ref list

* use reference items for media

* make mapper name more generic

* make default ref item always readonly

* export types

* temp fake variants array

* add variants array to model

* Update media-references-workspace-info-app.element.ts

* add variants to model

* hardcode fake array

* register media ref item

* update mock data

* dot not allow conditions for data mappers

* add data mapper

* prefix info routes

* prefix all ref routes

* return undefined if there is not edit path

* add types for reference data source + repository

* split trash with relation into its own action

* render descendants with references

* fix length check

* set standalone attribute

* implement for media

* move trash

* wip delete with relation

* move to element

* fix name collision

* require data source identifier

* use management api mapper

* add management api mapper

* fix type errors

* Update index.ts

* align naming

* show references when deleting a document

* Update delete-with-relation-modal.element.ts

* use deleteWithRelation kind for media

* clean up

* localize trash

* fix type

* Update trash-with-relation.action.ts

* override confirm methods in trash and delete actions

* Update index.ts

* export constants

* Limit referenced-by document and media endpoints to references only.

* Update document-reference-table.element.ts

* add methods to get bulk references for documents

* wip bulk trash

* add todo comment

* implement path pattern for media item

* clean up

* more clean up

* sort imports

* member edit path pattern

* clean up

* remove unused variant id

* export extension types

* wip bulk trash with relation

* debounce incoming events

* look up items + notify

* add todo

* temp solution to make it non breaking

* add bulk delete

* better description

* implement methods for are referenced

* change to use bulk trash with relation

* implement delete with relation kind

* deprecation warnings

* move files

* move files

* export const

* use correct kind

* align naming

* upper case Trash

* correct uui-text impl

* add comment about the v2 name

* fix circular depdendencies

* rename const

* split to module

* import global components

* more explicit naming

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-24 14:03:26 +01:00
Mads RasmussenandGitHub 5011241a54 remove unused href (#18413) 2025-02-24 13:47:49 +01:00
70be31b8f8 Added obsoletion methods for extension methods to be removed in Umbraco 16 (#18394)
* Added obsoletion methods for extension methods to be removed in Umbraco 16.

* Updated obsolete messages to reference Umbraco 17

* Fix typo

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-02-24 12:27:04 +00:00
Niels LyngsøandJacob Overgaard 6b50797693 also correct blocks despite markup haven't been touched in this session 2025-02-24 08:41:16 +01:00
Mads RasmussenandGitHub f64eb1261d set value so items can be removed (#18404) 2025-02-24 07:31:31 +00:00
Andy ButlandandGitHub a81cec963d Fixes count of message displayed when more than the maximum amount of blocks are added to a block list. (#18418) 2025-02-23 19:48:28 +01:00
Andy ButlandandGitHub de2114b8c5 Adds warning to publish descendants dialog when force re-publish is selected. (#18409) 2025-02-22 09:39:58 +01:00
Andy ButlandandGitHub c3b51301cc Adds warning to publish descendants dialog when force re-publish is selected (15) (#18410) 2025-02-21 23:17:23 +01:00
Jacob OvergaardandGitHub d5e2efbbaa V15: A user cannot switch back to the default language (#18414)
* chore: prettier

* fix: loads all extensions everytime but register only new localizations

this ensures that the browser is updated even if you switch back to a previously loaded language

* test: adds a test to check if we can switch between already loaded languages
2025-02-21 15:58:23 +00:00
a0ddaefaa1 Add localization for Approved color/Color Picker Data type (#18411)
* Add localization for Approved color/Color Picker Data type

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-21 11:50:08 +01:00
Andy ButlandandGitHub c5c64f2b54 Ported changes from Umbraco 13 around not throwing exceptions with identity IDs that can't be parsed to an integer or GUID (#18389)
* Ported changes from Umbraco 13 around not throwing exceptions with identity IDs that can't be parsed to an integer or GUID.

* Revert async changes (better done systemically in a separate update).
2025-02-21 09:48:34 +01:00
368f6eb02d V15: Dont delete when referenced setting is enabled (#18359)
* Take content settings into account

* Implement test

* Amend error message

* Move new enums to have same values

* Update to check in ServiceBase

* Fix empty recycle bin

* Return proper operation status

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Fix according to feedback

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-02-21 07:07:13 +01:00
Niels Lyngsø 21a071675e correct uui-text impl 2025-02-20 16:33:19 +01:00
2c20902c9b Feature: Delete/Trash referenced by (#18351)
* add trash confirm modal

* make referenceRepo optional + adjust styling

* add referenceRepository to media trash action

* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add null check

* change to use entity-item-ref element

* register media item ref

* add fallback element

* show 3 references

* wip data mapper concept

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* Added $type to ReferenceResponseModels

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* generate server models

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* add fallback

* use ref list

* use reference items for media

* make mapper name more generic

* make default ref item always readonly

* export types

* temp fake variants array

* add variants array to model

* Update media-references-workspace-info-app.element.ts

* add variants to model

* hardcode fake array

* register media ref item

* update mock data

* dot not allow conditions for data mappers

* add data mapper

* prefix info routes

* prefix all ref routes

* return undefined if there is not edit path

* add types for reference data source + repository

* split trash with relation into its own action

* render descendants with references

* fix length check

* set standalone attribute

* implement for media

* move trash

* wip delete with relation

* move to element

* fix name collision

* require data source identifier

* use management api mapper

* add management api mapper

* fix type errors

* Update index.ts

* align naming

* show references when deleting a document

* Update delete-with-relation-modal.element.ts

* use deleteWithRelation kind for media

* clean up

* localize trash

* fix type

* Update trash-with-relation.action.ts

* override confirm methods in trash and delete actions

* Update index.ts

* export constants

* Limit referenced-by document and media endpoints to references only.

* Update document-reference-table.element.ts

* add todo comment

* implement path pattern for media item

* clean up

* more clean up

* sort imports

* member edit path pattern

* clean up

* remove unused variant id

* export extension types

* align naming

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-20 15:29:40 +00:00
78554f81f3 Feature: Data mapping extension + aligning reference lists (#18318)
* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add fallback element

* wip data mapper concept

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* Added $type to ReferenceResponseModels

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* generate server models

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* add fallback

* use ref list

* use reference items for media

* make mapper name more generic

* make default ref item always readonly

* export types

* temp fake variants array

* add variants array to model

* Update media-references-workspace-info-app.element.ts

* add variants to model

* hardcode fake array

* register media ref item

* update mock data

* dot not allow conditions for data mappers

* add data mapper

* prefix info routes

* prefix all ref routes

* return undefined if there is not edit path

* fix name collision

* require data source identifier

* use management api mapper

* add management api mapper

* fix type errors

* Update index.ts

* align naming

* add todo comment

* implement path pattern for media item

* clean up

* more clean up

* sort imports

* member edit path pattern

* clean up

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-20 15:48:02 +01:00
DitteKKoustrupandGitHub 60eb55cefe Add Localization to Document Type - Settings - Vary by Culture and Segments (#18397) 2025-02-20 15:20:49 +01:00
MoleandGitHub ec77b2fa1b Check null in cachevalue for (#18395) 2025-02-20 14:14:57 +01:00
Niels LyngsøandGitHub 54dafd4031 update documentation for a simpler and more clear read (#18381) 2025-02-20 10:55:45 +00:00
Jacob OvergaardandGitHub 7a7602f1bb V15: Update Backoffice NPM dependencies (#18376)
* build(deps-dev): update storybook from 8.4.7 to 8.5.6

* build(deps): update tiptap from 2.11.2 to 2.11.5

* build(deps-dev): update eslint stuff to latest

* build(deps): update element-internals-polyfill from 1.3.12 to 1.3.13

* build(deps): update marked from 15.0.6 to 15.0.7

* build(deps-dev): update vite from 5.4.14 to 6.1.0

* build(deps-dev): update globals to 15.15.0 (eslint dependency)

* build(deps): update icon libraries to latest

* build(deps-dev): update prettier from 3.4.2 to 3.5.1

* chore: generate consts

* build(deps-dev): update test-related libraries

* feat: copy over code from the tiny base64-js library because it is not exported as esm and has not been updated in 4 years

* build(deps-dev): remove dependency from base64-js

* build(deps-dev): upgrade rollup dependencies

* test: disable tests for tinyce

* build(deps-dev): update @babel/core to 7.26.9

* build(deps): update storybook to latest

* build(deps-dev): update types

* build(deps-dev): update typedoc from 0.27.6 to 0.27.7

* build(deps-dev): update @rollup/plugin-commonjs to latest

* build(deps): import tiny as default and re-export as module and default to make everyone happy (and avoid commonjs pitfalls)

* build: remove dependency on commonjs to build externals

* build(deps-dev): uninstall @rollup/plugin-commonjs as it is no longer needed

* test: reenable tinymce tests

* fix: sets a default label

this mistake was highlighted by the test runner

* test: reenable tinymce tests

* build: ignores autogenerated test file

* build: adds github error logging to icon generator

* build: log as error

* build: adds tests for generate:* scripts

* build: optimises icons with svgo to remove useless things like comments

this also ensures that icons are unchanged when we upgrade icon library packages as they would normally include things like versions as comments in the files
2025-02-20 10:29:54 +00:00
Niels LyngsøandGitHub 5401a85828 Feature: Support Handle Selector in Sorter (#18356)
* implement handleSelector configuration option for Sorter Controller

* improve sorting of Content Type Groups

* fix ignorerSelector

* remove button from default ignorer

* block grid type group sorter use handle

* fix content type group sorter style

* handle for Block List Entries

* adjustments for block list and grid
2025-02-20 11:14:58 +01:00
37fd4f6ff6 Toggle property Value labels and validation (#18333)
* localizations

* toggle validation

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-20 09:41:33 +00:00
Sven Geusens 3a9ab25e28 Merge branch 'release/15.2.2' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-02-20 10:12:31 +01:00
Niels LyngsøandGitHub 59819e0639 use super.value to trigger validation check (#18303) 2025-02-20 09:56:05 +01:00
Niels LyngsøandGitHub 31bbd7ecfc Merge pull request #18224 from umbraco/v15/feature/block-grid-block-type-validation
Feature: block grid block type area/root validation
2025-02-20 09:50:30 +01:00
Niels LyngsøandGitHub edff2c1c8c Chore: Block Manager + Variant ID Polishing (#18321)
* use observablePart()

* methods for variant ID

* move into a gotManager method
2025-02-20 09:35:53 +01:00
Andy ButlandandGitHub b10a11b5b7 Disable webhook firing if disable in configuration. (#18386) 2025-02-19 15:50:08 +01:00
Lee KelleherandGitHub 040d4fe363 Tiptap RTE: Table extension enhancements (#18365)
* Tiptap: Adds custom button for Table

Provides a popover with table menu actions.

* Moved Table extension to its own folder

* Extended the Tiptap `Table` extensions

* Amended table toolbar actions to have `focus()`

* Markup amends

* Fix up Tiptap mock data

* [WIP] Table column/row bubble menu

* Tiptap, enabled content check for invalid markup

* [WIP] Tiptap toolbar cascading menu items

* Tiptap: relocated Block extension

from "plugins" folder to "extensions" subfolder.

* Table toolbar, moved the menu to the API

* `UmbTiptapToolbarElementApiBase`, made `execute` concrete

so that it becomes optional in extended classes.

* Adds "default" toolbar element API

which does nothing, but satisfies the extension loader controller.

* `@ts-ignore` the `.showPopover()` and `.hidePopover()` calls

* Updated Tiptap toolbar mock data-type.data

to match TinyMCE toolbar layout.

* Implemented "Cascading Menu Popover" as a standalone component

* Reworked Table toolbar to use cascading menu

* [WIP] Tiptap bubble menu

* Adds Tiptap Cascading Menu Popover

Example with a Style Select menu, with default (hard coded) options,
similar to TinyMCE's unconfigured Style Select menu.

* Small code tidy ups

* Added "Insert Table" component

* Removed Table Bubble Menu feature (temporarily)

as its development isn't ready yet.

* Removed `umb-tiptap-hover-menu` component

as it wasn't been used.
I expect this will become the bubble menu feature.
2025-02-19 13:00:23 +01:00
Andy ButlandandGitHub 64607ddbaa Disable webhook firing if disable in configuration. (#18383) 2025-02-19 12:17:04 +01:00
leekelleherandJacob Overgaard 28fb7ad67e Refactors loading core Tipap extension
The unit test doesn't register the manifests, so we'll need
to hard code loading the "Rich Text Essentials" extension.
2025-02-19 12:01:22 +01:00
Jacob Overgaard effa40fabb build(deps-dev): update npm dependencies 2025-02-19 09:49:17 +01:00
Andy ButlandandGitHub f389cc9aa3 Modified AspNetCoreRequestAccessor to gracefully handle the absence of an HttpContext (#18369) 2025-02-19 08:46:14 +00:00
Andy ButlandandSven Geusens c198e192da Modified AspNetCoreRequestAccessor to handle absensce of an HttpContext. 2025-02-19 09:18:26 +01:00
Chris HoustonandGitHub ac3b17b390 Fixes the Fatal icon text so it's readable in Dark Mode. (#18375) 2025-02-18 22:00:19 +01:00
Mads RasmussenandGitHub c216d692c2 Feature: Display current variant item name (#18311)
* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add fallback element

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* fix type errors

* Update index.ts

* clean up

* use path pattern
2025-02-18 19:52:05 +01:00
Jacob Overgaard fdebb66fc8 Merge remote-tracking branch 'origin/contrib' into v15/dev 2025-02-18 16:26:27 +01:00
dependabot[bot]andJacob Overgaard 7ac57790ff Bump dompurify from 3.2.3 to 3.2.4 in /src/Umbraco.Web.UI.Login
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 16:08:07 +01:00
leekelleherandJacob Overgaard b3b85b8a6a Adds Tiptap Cascading Menu Popover
Example with a Style Select menu, with default (hard coded) options,
similar to TinyMCE's unconfigured Style Select menu.
2025-02-18 16:07:34 +01:00
Sven Geusens 3a753f4317 Bump version 2025-02-18 13:57:31 +01:00
Andy ButlandandGitHub 96bbed5abf On retrieving other URLs, don't attempt to walk up the navigation structure to find parents when content is trashed. (#18355) 2025-02-18 13:31:40 +01:00
Niels LyngsøandGitHub 04eb94d958 use display contents instead of setting a height (#18363) 2025-02-18 12:20:33 +01:00
Sven Geusens e0d1267f7b Loosen the RTEValue datacontract to improve migrations (#18349) 2025-02-18 11:30:02 +01:00
Sven Geusens fe9ea4766a Merge branch 'release/15.2.1' into v15/dev
# Conflicts:
#	version.json
2025-02-18 11:25:45 +01:00
Sven Geusens a9f9cd7811 Merge branch 'v15/dev' of https://github.com/umbraco/Umbraco-CMS into v15/dev 2025-02-18 11:25:00 +01:00
dependabot[bot]andJacob Overgaard 5c2e4da1ce Bump dompurify from 3.2.3 to 3.2.4 in /src/Umbraco.Web.UI.Client
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 11:12:11 +01:00
leekelleherandJacob Overgaard 9e0614ff74 Tiptap: relocated the Block extension 2025-02-18 11:11:38 +01:00
leekelleherandJacob Overgaard 50b891a79a Updates Tiptap mock data
and story.
2025-02-18 11:11:00 +01:00
Sven Geusens 01fc5998df Merge branch 'v14/dev' into v15/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/FileSystemMainDomLock.cs
#	src/Umbraco.Web.Common/Views/UmbracoViewPage.cs
2025-02-18 11:09:52 +01:00
Andy ButlandandGitHub 82d13b50b6 Limit referenced-by document and media endpoints to references only. (#18354) 2025-02-18 10:04:00 +01:00
Sven Geusens 9e7a36865a Merge branch 'v13/dev' into v14/dev
Revert #18249 as it is reimplemented for v15
Revert #18320 as the new architecture explictly throws an error

# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/Services/MemberService.cs
#	src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Infrastructure/Security/MemberUserStore.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/EntityController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MemberController.cs
#	src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
#	src/Umbraco.Web.BackOffice/Controllers/UsersController.cs
#	src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.BackOfficeAuth.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Filters/MemberSaveModelValidator.cs
#	src/Umbraco.Web.BackOffice/Filters/MemberSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
#	src/Umbraco.Web.Common/RuntimeMinification/SmidgeOptionsSetup.cs
#	src/Umbraco.Web.Common/RuntimeMinification/SmidgeRuntimeMinifier.cs
#	src/Umbraco.Web.Common/Views/UmbracoViewPage.cs
#	src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbuttongroup.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbtabbedcontent.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/publicaccess.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/users.resource.js
#	src/Umbraco.Web.UI.Client/src/common/services/assets.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediaentryeditor/mediaentryeditor.controller.js
#	src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html
#	src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html
#	src/Umbraco.Web.UI.Client/src/views/content/content.create.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js
#	src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html
#	src/Umbraco.Web.UI.Client/src/views/webhooks/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/views/webhooks/edit.html
#	src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js
#	src/Umbraco.Web.UI.Client~HEAD
#	src/Umbraco.Web.UI.Login/src/auth.element.ts
#	tests/Umbraco.TestData/UmbracoTestDataController.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberUserStoreTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Controllers/MemberControllerUnitTests.cs
#	version.json
2025-02-17 19:25:45 +01:00
ed63f278c2 V15: Save the variant before scheduling (#18344)
* feat: adds validation checks and saves a version when scheduling content

* chore: adds mock handler for validate

* docs: adds documentation for umbracoPath

* chore: adds deprecation and todos

* feat: adds a method to output a list format

* test: adds test for list format

* feat: rename to list

* feat: adds localization for scheduling

* feat: adds notifications for publishing by action

* test: fixes naming

* feat: adds notification for publishing in bulk

* feat: fixes todo by adding localization

* feat: adds notification when publishing from workspace

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-17 16:31:34 +00:00
Lee KelleherandGitHub e753e2cbf0 Markdown Editor: adds "Default value" support (#18326) 2025-02-17 17:01:41 +01:00
Sven GeusensandGitHub d87a84be14 Loosen the RTEValue datacontract to improve migrations (#18349) 2025-02-17 15:27:22 +01:00
Mads Rasmussen 8bbb12da5a generate server models + fix client 2025-02-17 13:47:02 +01:00
MoleandGitHub c76d764598 V15: Only cache items if all ancestors are published (#18337)
* Introduce IsDocumentPublishedInAnyCulture

Sometimes we don't care about culture

* Check ancestor path when resolving cache items

* Fix tests

* Rebuild NavigationService

* Only set node if it has a published ancestor path

* Remove branch when unpublished

* Add tests

* Add seed test

* Consider published ancestor path when seeding documents

* Introduce MediaBreadthFirstKeyProviderTests

This is needed since the logic of document and media is no longer the same

* Remove unused services

* Move assert page to helper

* Add variant tests

* Add tests

* Filter keys in ContentTypeSeedKeyProvider

* Fix tests

* Add failing test showing refreshing issue

* Don't blow up if we can't resolve the node from navigation cache

Turns out that this can actually happen :D Should be fine to just return false

* Refactor cache refresher check

* Make NavigationQueryService service protected

* Add comment on how to refactor breadth first key provider

* Refactor if statement
2025-02-17 12:51:33 +01:00
Andy ButlandandGitHub db1d999721 Avoid exception when attempting to find member by Id when Id is not an expected Guid or integer, as can be the case with external member providers. (#18320) 2025-02-17 12:47:52 +01:00
Andy ButlandandGitHub 18047a7cfb Only filter post retrieval of entities for start nodes if working with entities that support start nodes. (#18287) 2025-02-17 12:45:51 +01:00
Andy ButlandandGitHub 69e251ad17 Adding additional document collection properties to align model with item response (#18309)
* Added IsTrashed to document collection model.

* Add IsProtected to document collection response model.

* Rework to do setting of IsProtected within the mapper.

* Remove use of service in map definition.

* Refactor document and media by key endpoints to use presentation factories.

* Set IsProtected property.

* Introduced base presentation factory interface for content.
2025-02-17 12:27:53 +01:00
Andy ButlandandGitHub def7ebd48c Html encodes the user's name in the invite email. (#18343) 2025-02-17 12:25:12 +01:00
8f9c8cbaee Allow for multiple backoffice hosts (#18302)
* Allow for multiple backoffice hosts

* Update src/Umbraco.Cms.Api.Management/Security/BackOfficeApplicationManager.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-17 11:49:49 +01:00
89d4563e24 V15: Add a button to clear schedule (#18339)
* chore(mock): adds handling for publishing schedules

* chore: removes unused translation key

* feat: shows a message when a culture has pending changes that are not saved

* feat: optimises pending changes text

* feat(UmbInputDateElement): extends the UUIInputElement rather than using it internally, which allows for more advanced form usage as well as usage of its slots

* feat: adds a Clear button on each date field to more easily clear a schedule

* feat: optimises localization with text from the real button

* Display the remove button if the datetime input has a value

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-17 10:48:40 +00:00
Jacob OvergaardandGitHub a485194228 V15: Show duration on time displays (#18341)
* feat: adds a method to output a list format

* test: adds test for list format

* feat: adds a method to show a compounded relative time

* test: improves test to be absolute

* feat: allows dates to be strings

* chore: fixes lit warnings

* feat: adds compounded time to document info view

* feat: rename to list

* feat: use the Intl.DurationFormat API to format durations

* test: adds test for string dates

* feat: times should always be absolute

* feat: adds duration to the umb-localize-date element

* feat: adds support to set your own title

* revert changes

* feat: adds localization to calculate duration past or future

* feat: adds danish localization
2025-02-17 10:43:53 +00:00
leekelleher a6e8b23e42 Fixes broken stories/test. 2025-02-17 09:26:40 +00:00
Niels LyngsøandGitHub 8bbe0533c3 Close active modal if its begin unregistered (#18285) 2025-02-17 09:11:28 +01:00
Lee KelleherandGitHub 5379fec2d3 Data Type create option description (#18338)
* Added description for Data Type create option

* Updated "create_folderDescription" in English fallback

as it had previously been updated in English US only.

* US to GB typo correction
2025-02-14 15:37:41 +00:00
Andreas ZerbstandGitHub 2ae903ef1b V15 QA fixed failing nightly acceptance tests (#18340)
* Start updates

* Fixed tests

* Another fix

* Bumped version

* Updated pipeline

* Removed and

* Cleaned up
2025-02-14 13:49:14 +00:00
Lee KelleherandGitHub 66cf0874bb Code Editor Modal, adds localization support (#18325) 2025-02-14 08:36:23 +01:00
Lee KelleherandGitHub fe7db00450 Property actions: adds localization support (#18323)
also streamlined the icon render code
2025-02-14 08:35:55 +01:00
Lee KelleherandGitHub b38ef14475 LinkedIn icon, adds currentColor fill (#18322) 2025-02-14 08:35:15 +01:00
leekelleherandJacob Overgaard 2cfc4afdaa Content dashboard, CSS tweaks
To tighten up the info boxes, adds drop-shadow.
2025-02-14 08:34:55 +01:00
leekelleherandJacob Overgaard d023ae3f18 Help Header App, code tidy-up 2025-02-14 08:33:44 +01:00
Lee KelleherandGitHub fde00546e8 Removing the propertyEditorSchemaAlias for "Accepted Upload Types" (#18330)
So that it doesn't show up as an available Property Editor in the list.
2025-02-13 19:24:28 +00:00
ee05e5d779 Removes collection action state (#18212)
* remove collection action state

* clean up

* Update collection-action-button.element.ts

* use ellipsis character

* JSDocs

* TODO note

* add more options

* TODO

* additionalOptions for Collection Actions

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-13 20:19:06 +01:00
Nhu DinhandGitHub 8ea58c13eb Make all smoke tests run in the pipeline (#18316) 2025-02-13 18:55:40 +01:00
d1dc45302b Resolves issues related to the setting of a schedule for content publishing (#17868)
* Render scheduled publish and unpublish on content info workspace view.

* Populate previously saved schedule on set schedule dialog.

* Hide workspace button actions that require a saved document when the document is new.

* Convert between local and server time when saving and displaying schedule.

* Fix issues with clearing of previously set schedule.

* Updated OpenApi.json to align with APi amends.

* Added missing constant.

* Fixes following merge.

* Fixed schedule mapping for invariant content.

* Fixed display of publishing/pending changes on info workspace view.

* Removed debug code.

* fix: adds missing localization keys

fixes #18297

* chore: eslint

* fix: render only the selectAll checkbox when more than one language is present

* feat: adds last edited date

* feat: adds 'last published' date

* fix: format input datetimes to datetime-local

* fix: converts the datetime string to an ISO format before sending to the server

this way we ensure the datetime contains the offset

* chore: adds more types to ensure type safety

* chore: use initialized boolean

* fix: makes schedule modal options-based to isolate the `selection` to the actual values

* docs: fix comment

* docs: adds comment

* fix: use helper function to update selection

* revert commit to prevent breaking change

* chore: eslint

* Whitespace tidy-up

* fix: stores a copy of the prevalues to be able to update that internally before finally setting the value from the updated internal values upon submit

* chore: removes unused function

* fix: unifies any pickable filters into one function

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-13 15:43:58 +00:00
Mads RasmussenandGitHub 3b7a76843a Update picker-search-result-item-element-base.ts (#18308) 2025-02-13 13:41:45 +00:00
Mads RasmussenandGitHub c5303426b0 Feature: Entity Item Ref Extension (#18265)
* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add fallback element

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* use addUniquePaths for modal registration
2025-02-13 11:15:25 +01:00
Andreas ZerbstandGitHub b360762f1f V15 QA disabled SQLite test workers for acceptance tests (#18306)
* Added a parameter that by default skips the sqlite acceptance tests

* Added timeout for flaky test

* Removed continue on error

* Created tests that fails to ensure that the update is working as expected

* Fixed tests
2025-02-13 10:35:05 +01:00
Nhu DinhandGitHub edeac44566 V15 QA Added acceptance tests for Create options (#18314)
* Added tests for document type create option

* Renamed and added tests for document type create options

* Added tests for data type create options

* Added tests for media type create options

* Fixed tests to create media type folder

* Bumped version

* Make all Create option tests run in the pipeline
2025-02-13 16:05:13 +07:00
Niels LyngsøandGitHub a7bd578f56 Prevent saving or publishing not created variants (#18312)
* prevent actions from handling not created variants

* extend pickable filter locally on the modal
2025-02-13 08:54:40 +01:00
Niels LyngsøandGitHub 5f9b192cbf fix peek error circular reference (#18307)
* move error viewer modal

* late import for peek error
2025-02-12 14:34:25 +01:00
8c2b1ebdc5 V13: Introduce publishNotifications method on IMembershipMemberService (#18207)
* Introduce publishNotifications method on IMembershipMemberService.cs

* Fix test

* Add PublishNotificationSaveOptions

* Fix up according to comments

* Use numeric values for flag enum

* Update src/Umbraco.Core/Services/MemberService.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Update src/Umbraco.Core/Services/MemberService.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-12 13:30:41 +01:00
Andy ButlandandGitHub 9227517a50 Split force for publish descendants into separate options for publish unpublish and re-publish unedited (13) (#18249)
* Split force for publish descendents into separate options for publish unpublish and re-publish unedited.

* Added integration task verifying updated behaviour.

* Variant integration test.

* Update test data controller.

* Remove usued function parameters.

* Refactor to enum.

* Fixed flags enum.

* Variable name refactor.

* Applied changes from code review.

* Refactored method name.

* Aligned js boolean checks.
2025-02-12 11:30:27 +00:00
Niels LyngsøandGitHub ead29a2567 Merge pull request #18221 from umbraco/v15/feature/block-type-element-not-found
Feature: block type element not found
2025-02-12 12:17:49 +01:00
Andy ButlandandGitHub 59c2205e60 Split force for publish descendants into separate options for publish unpublish and re-publish unedited (15) (#18270)
* Port server-side updates from 13 implementation.

* Update openapi.json

* Update typed client.

* Ported over front-end amend from 13.

* Handled edge case of publishing invariant root with variant descendants.

* Refactor to enum.

* Resolved CodeScene warning.

* Resolved CodeScene warning.

* Resolved CodeScene warning.

* Applied suggestions from code review.

* Reverted breaking change in integration tests.

* Refactored method name.
2025-02-12 12:04:58 +01:00
Niels LyngsøandGitHub ac522aba35 Merge pull request #18172 from umbraco/v15/feature/reworking-error-notifications
Feature: reworking error toast notifications
2025-02-12 11:39:34 +01:00
Mads RasmussenandGitHub db49fb3042 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications 2025-02-12 11:07:34 +01:00
Mads RasmussenandGitHub 64efd73dd8 Update peek-error.controller.ts
remove console log
2025-02-12 11:02:37 +01:00
Niels LyngsøandGitHub 9c621607d4 Fix: #17676 (#18298)
* fix 17676

* localize
2025-02-12 10:53:21 +01:00
Niels LyngsøandGitHub 3d8400302a Feature: workspace action additional options ellipsis (#18299)
* adding types and default kind element

* switch to use ?? for code consistency

* add data-mark

* move listener last

* fix tsc

* save action additionalOptions

* hasAdditionalOptions for Save and Publish

* remove unused import

* type arg

* rename to _retrieveWorkspaceContext
2025-02-12 10:16:12 +01:00
Niels LyngsøandGitHub f906d28de6 Fix: #18272 (#18300)
* only localize if string

* better types of localize string

* test for string update
2025-02-12 09:51:00 +01:00
Andy Butland 5322d0f7b5 Bumped version to 13.8.0-rc. 2025-02-12 08:13:58 +01:00
Andy ButlandandGitHub a282cc5691 Backport use of thread delay over sleep and handle dispose in FileSystemMainDomLock (#18151)
* Backport use of thread delay over sleep and handle dispose in FileSystemMainDomLock (from PRs #18119 and #18147)

* Applied suggestion from code review.
2025-02-12 08:06:50 +01:00
Niels LyngsøandGitHub fdfbd5fc33 Merge branch 'v15/dev' into v15/feature/block-type-element-not-found 2025-02-11 22:09:35 +01:00
Niels LyngsøandGitHub ac53a6d50f Merge branch 'v15/dev' into v15/feature/reworking-error-notifications 2025-02-11 22:09:04 +01:00
Niels LyngsøandGitHub ea3e761808 Merge branch 'v15/dev' into v15/feature/block-grid-block-type-validation 2025-02-11 22:08:45 +01:00
Andy ButlandandGitHub 048f8bcdf9 Fixed userResource request to get all users. (#18105) 2025-02-11 17:06:18 +01:00
5ee351a6bc Added $type to ReferenceResponseModels (#18293)
* Added $type to ReferenceResponseModels

* Updated OpenApi.json and client-side types.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-11 14:00:07 +00:00
6e20e14542 V15/feature/history cleanup localization (#18295)
* Add localize to headline

* Translate from en to dk

---------

Co-authored-by: Annica <abf@umbraco.dk>
2025-02-11 13:23:59 +00:00
Andreas ZerbstandGitHub 7949a5ba53 V15 QA added clipboard acceptance tests (#18245)
* Added small start for clipboard

* Added more tests

* Added tests

* Added more tests

* More tests

* Bumped version

* Updated tests

* Added tests to run

* Bumped version

* Fixes based on comments

* Reverted npm commands
2025-02-11 13:49:09 +01:00
Andy ButlandandGitHub 7bcbc748d4 URL encodes member user names when passing information for public access setting such that those with user names as emails containing a plus will be included in the rule. (#18142) 2025-02-11 13:36:19 +01:00
Sven GeusensandGitHub 649cfcab58 Custom Partial variancy support for RTE as it uses a wrapped model (#18290) 2025-02-11 12:45:09 +01:00
Zeegaan bb47b7e019 bump version 2025-02-11 12:28:22 +01:00
5457521f19 Fixing the background color of the "re-login" screen when your session has timed out. (#18284)
* Updated modal background color

The background color of the authentication modal has been updated to use a CSS variable for better customization. The default value remains the same.

* Update umb-app-auth-modal.element.ts to use less specific css custom property

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-11 09:59:06 +00:00
Jacob OvergaardandGitHub 15cba0afd7 feat: bump minimum required node.js version from 20 to 22 and remove upper limit (#18274) 2025-02-11 08:33:32 +00:00
dependabot[bot]andJacob Overgaard 447b36ab67 Bump vite from 5.4.11 to 5.4.14 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.14/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 09:24:40 +01:00
Andy ButlandandGitHub f30e6cfe7f Prevents folder selection in media picker when used from the multi URL picker. (#18288) 2025-02-11 09:18:01 +01:00
Nhu DinhandGitHub 1663bc4179 V15 QA Added acceptance tests for the content with block list and block grid (#18026)
* Added tests for content with block grid

* Fixed the test for block grid as api helper changes

* Added tests for content with block lists

* Updated tests for content with block grid

* Updated tests for content with block list

* Updated code due to the test helper changes

* Bumped version

* Make all Content tests run in the pipeline

* Reverted

* Make all Content tests run in the pipeline

* Reverted

* Added step to choose element type

* Added more waits

* Fixed failing tests due to UI changes

* Fixed typo

* Fixed typo

* Fixed the failing test

* Bumped version

* Added the tests for move blocks

* Reverted
2025-02-11 13:30:12 +07:00
Lee KelleherandGitHub 3724a45576 Picker search result item icons for Documents and Members (#18250)
* Refactored `UmbDefaultPickerSearchResultItemElement`

Abstracted to `UmbPickerSearchResultItemElementBase` for reuse

* Exported types

* Adds element for 'Umb.PickerSearchResultItem.Document'

to handle the icon (and, in future, the URL/route)

* Adds element for 'Umb.PickerSearchResultItem.Member'

to handle the icon.
2025-02-10 15:38:34 +01:00
Niels LyngsøandGitHub 4d931e55ca Fix: #18209 (#18276)
* first render ones a option is available

* simpler logic
2025-02-10 15:23:36 +01:00
Niels LyngsøandGitHub 37cc67c6d2 use fewer redirects (#18271) 2025-02-10 15:16:50 +01:00
Andy ButlandandGitHub 026e80e026 Avoid an exception on sign out when the principal is populated from an incomplete external login (#18078)
* Avoid an exception on signout when the principal is populated from an incomplete external login.

* Tidied up comment.
2025-02-10 12:51:35 +01:00
Nhu DinhandGitHub 978a068d3c V15 QA Updated acceptance tests for Link Picker (#18231)
* Added tests to ensure that the empty link is not accepted in url picker

* Added tests to ensure that the empty link is not accepted in tiptap

* Updated link picker tests due to UX changes

* Cleaned up

* Make Content tests run in the pipeline

* Added tests for unpublished document

* Fixed comments

* Bumped version

* Cleaned up

* Updated test name

* Reverted

* Bumped version
2025-02-10 17:02:00 +07:00
Andy ButlandandGitHub 8f6d1bc7b8 Add validation to prevent update of a user or member to an invalid username. (#18263)
Avoid password manager updates of user name field on user details screen.
2025-02-10 10:52:41 +01:00
Andy ButlandandGitHub a3b77cff63 Add validation to prevent update of a user or member to an invalid username (13) (#18261)
* Add validation to prevent update of a user or member to an invalid username.

* Avoid password manager updates of user name field on user details screen.
2025-02-10 10:40:53 +01:00
f14922baae Adds name and description to webhooks (#18217)
* Model, service, test and migration updates to add name and description to webhook.

* Update typed client models.

* Fixed migration.

* Front-end rendering and update of name and description.

* Updated OpenApi.json

* Reworked integration tests to avoid breaking change.

* add name and description to editor header

* remove name and description properties

* render name as first column in the table

* remove focus from url

* remove required from name

* add parentheses to align UX

* add webhook paths

* use edit path const in collection

* add paths for root

* remove unused

* remove unused state

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-10 09:23:22 +01:00
25a3788255 V15 QA Fixing the acceptance tests for Create Option due to UI changes (#18262)
* Fixed the tests for creating media type due to UI changes

* Updated tests related to create data type due to UI changes

* Bumped version

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-02-10 13:37:24 +07:00
KaritaandGitHub 03690fb330 RTE property editor settings translation for DK&US (#18264) 2025-02-07 15:26:19 +01:00
Niels LyngsøandGitHub ad02cab653 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications 2025-02-07 12:46:29 +01:00
Mads RasmussenandGitHub 6df7ff4322 replace temp event hack with context and skipHost (#18242) 2025-02-07 12:45:49 +01:00
Niels LyngsøandGitHub 4ca68d6995 Add client-side validation for RTE (#18257) 2025-02-07 11:43:04 +00:00
Kenn JacobsenandGitHub 62f46667d2 Remove the hard upper limit for SQL write lock timeout (#18260) 2025-02-07 06:37:11 +00:00
Sven GeusensandGitHub 280cb7f2b1 Fix issues in newly added buttongroup localization (#18254)
* Fix #18253 nullref exception

* Fix #18239 by listening to broader scope changes
2025-02-07 07:00:34 +01:00
KaritaandGitHub 066045f139 Granular permissions translation DK, EN, US (#18251)
* Translation for user permissions DK and EN

* Added UI Culture variants for EN-US user permissions section

* removed redundant line

* improved consistency for wording, and moved keys under user

* Translated granular permissions label and description EN, US, DK
2025-02-07 06:38:12 +01:00
Niels LyngsøandGitHub d27b037d07 Merge branch 'v15/dev' into v15/feature/block-grid-block-type-validation 2025-02-06 20:50:02 +01:00
Niels LyngsøandGitHub a639fe07e2 Merge branch 'v15/dev' into v15/feature/block-type-element-not-found 2025-02-06 20:49:50 +01:00
Niels Lyngsø 1aa177fba1 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts
2025-02-06 20:49:14 +01:00
Niels Lyngsø 460c0b3253 change order of Acceptance Test scripts 2025-02-06 20:48:07 +01:00
Lee KelleherandGitHub deeeaf4107 Creating a Template via a new DocType (#18247)
uses the doc-type name, so that the server
can case it appropriately for the template filename.
re: https://github.com/umbraco/Umbraco-CMS/issues/17458#issuecomment-2639213085
2025-02-06 15:51:00 +01:00
Andy ButlandandGitHub 82fcede59a Management API authorization for requests to rollback. (#18240) 2025-02-06 11:03:07 +01:00
Sven Geusens 57c3279849 Merge branch 'release/15.2' into v15/dev and bump version
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/user/user/conditions/allow-change-password/manifests.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/entity-actions/manifests.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/constants.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.repository.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.store.token.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/manifests.ts
#	version.json
2025-02-06 10:39:40 +01:00
Niels LyngsøandGitHub cf8cead8a9 Update README.md (#18238) 2025-02-05 21:26:18 +01:00
Niels LyngsøandGitHub f2944b089a correct manifest (#18237) 2025-02-05 21:23:32 +01:00
fa9ae32a1a Update build and contributing docs (#18223)
* Updates to build and contributing guide.

* Update .github/BUILD.md

Co-authored-by: Sven Geusens <sge@umbraco.dk>

* Add npm ci.

* Apply suggestions from code review

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>

* Update .github/BUILD.md

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2025-02-05 16:26:53 +01:00
Sven GeusensandGitHub 41b769687f Make invariant variant merge for blocks capable of detecting sub layouts (#18234) 2025-02-05 16:21:14 +01:00
Andy ButlandandGitHub 42e7b37d5d Renamed URL picker document link to content (more familiar to editors). (#18236) 2025-02-05 15:09:28 +00:00
Niels Lyngsø e2fd2afabd mark options as deprecated and avoid lint issue on the argument not used 2025-02-05 15:49:47 +01:00
Lee KelleherandGitHub 664d68e541 Decimal umb-property-editor-ui-number fixes (#18233)
* Numeric: renamed `#parseInt` function to `#parseNumber`

* Numeric: Changed to use `@change` event

* Number input: `max="Infinity"` was invalid markup

We don't need to always set the `min` and `max` attributes.
Leave the browser to do its thing.

* Decimal: adds input `step` config
2025-02-05 15:26:06 +01:00
095a73132c Review: Allow Duplicate Email for Members (#16202)
* init

* Aligned default values on security settings.

* Added validator for security settings.

* Provide default implementation for get members by email.

* Refactored constructor of MemberController.

* Validate on unique member email only when configured to do so.

* Further code tidy and use of DI in constructor.

* Used new constructor in tests.

* Add unit test for modified behaviour.

* Removed validator for security settings (it's not necessary, I got confused with users and members).

* Spelling.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-05 12:38:40 +01:00
KaritaandGitHub cce67b055c Entity permission translation for US, UK and DK (#18225)
* Translation for user permissions DK and EN

* Added UI Culture variants for EN-US user permissions section

* removed redundant line

* improved consistency for wording, and moved keys under user
2025-02-05 10:44:09 +00:00
67a66cb2cc Bugfix: Reload recycle bin on trashed entity (#18228)
* add entity trashed event

* dispatch event when entity is trashed

* remove double event listeners

* export action class

* Update default-tree.context.ts

* wip reload tree when entity is trashed

* move into data folder

* clean up listeners

* move manifest

* wip reload root

* clean up

* add recycle bin tree item

* use for media

* pass entity types through manifest + add recycle bin tree item kind

* remove custom implementation for document recycle bin

* use kind

* rename to supportedEntityTypes

* Update recycle-bin-tree-item.context.ts

* clean up

* Update recycle-bin-tree-item.context.ts

* Update recycle-bin-tree-item.context.ts

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-02-05 08:35:06 +00:00
Nikolaj Geisle 6249ac92b5 bump version.json 2025-02-05 08:50:18 +01:00
Niels Lyngsø ec48503b5a style update 2025-02-04 20:38:36 +01:00
Niels Lyngsø c0a215be98 isAllowed impl 2025-02-04 16:32:30 +01:00
Niels Lyngsø acb3f01f69 revert 2025-02-04 16:32:15 +01:00
Niels Lyngsø 00b92d8a57 tsc corrections 2025-02-04 15:15:13 +01:00
Niels Lyngsø c741ba2228 remove responsibility to retrieving block type 2025-02-04 15:13:17 +01:00
Niels Lyngsø 079c77006b Merge branch 'v15/dev' into v15/feature/block-grid-block-type-validation
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
2025-02-04 14:42:10 +01:00
Niels LyngsøandGitHub b4e59de79f Merge branch 'v15/dev' into v15/feature/block-type-element-not-found 2025-02-04 14:40:33 +01:00
Niels Lyngsø cbd17483a1 append error with reload 2025-02-04 14:38:04 +01:00
Niels Lyngsø ce2f50ce59 update status logic 2025-02-04 14:22:52 +01:00
Niels Lyngsø 49c4a60ecf block-type element type not found 2025-02-04 13:48:19 +01:00
Niels Lyngsø c8bdc99662 move prop 2025-02-04 13:46:45 +01:00
Niels Lyngsø c73cc469b6 invalid binding for grid 2025-02-04 13:45:39 +01:00
97046b9546 Update src/Umbraco.Web.UI.Client/src/packages/core/notification/controllers/peek-error/peek-error-notification.element.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-04 13:44:33 +01:00
cab07ba6f6 Update src/Umbraco.Web.UI.Client/src/packages/core/notification/modals/error-viewer/error-viewer-modal.token.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-04 13:44:25 +01:00
e034a64723 Update src/Umbraco.Web.UI.Client/src/packages/core/notification/extractUmbNotificationColor.function.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-04 13:44:18 +01:00
Lee KelleherandGitHub 14b8eee1db RTE TinyMCE: Compares previous value in #onChange event (#18219)
* TinyMCE input: Compares previous value in onChange

Fixes #18132

* Chore: import type ordering
2025-02-04 13:10:17 +01:00
Andy Butland cfb0fc23ac Merge branch 'v13/dev' into v13/contrib 2025-02-04 12:35:49 +01:00
6620aca9fe Cache null dictionary values by key (#15576)
* Add CacheNullValues option to RepositoryCachePolicy

* Cache null values in DictionaryByKeyRepository

* Fixed issue with nullable reference.

* Updated logic for caching of null values.

* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Made the NullValueRepresentation overwritable in a generic manner

* Improve generic NullValueCachePolicyResolver

* Revert Commits and clarify logic with comment

This reverts commit 8befb43792 "Improve generic NullValueCachePolicyResolver"
Also reverts 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner
And 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner

* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-02-04 12:29:21 +01:00
Mads RasmussenandGitHub 9c5768e1ab Deprecate get unique param on UmbPickerInputContext and UmbRepositoryItemsManager (#18216)
* Add a deprecation warning for the getUnique param

* fix import

* add specific version number

* remove block usage

* remove input rich media usage

* explicit version

* deprecate getUnique method in picker context

* remove get unique method
2025-02-04 12:18:35 +01:00
2422a02b23 Set Smidge cachebuster type (#18198)
* Set Smidge cachebuster type

* Amend exception and fix typo

* Minor tweak to comment and exception message.

---------

Co-authored-by: Simon Hartfield <simon.hartfield@googlemail.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-04 11:00:44 +00:00
Nhu DinhandGitHub 52aa18c7d1 V15 QA Added acceptance tests to verify the SVG thumbnail (#17966)
* Added tests to verify the media thumbnail

* Added tests to verify the media thumbnail

* Bumped version

* Make the SVG tests run in the pipeline

* Cleaned code

* Updated smokeTest command

* Reverted

* Updated the thumbnail file for audio

* Reverted
2025-02-04 13:37:44 +07:00
1c68e3d825 Added deliveries workspace view to the webhook details workspace (#18175)
* Added deliveries workspace view to the webhook details workspace.

* Front-end linting fixes.

* rename to unique

* update filter value

* make delivery feature folder

* move delivery workspace view for delivery feature folder

* correct details workspace view label and pathname to match name

* remove unused alias

* use singular form to align naming

* remove pagination as the default collection kind already includes this

* show icon

* remove double registration

* add observables for webhook data, add get methods + add jsdocs

* align UX with languages

* remove hardcoded fake name + make url the link

* remove redundant url in table

* render status code as tag

* use tags for enabled/disabled webhook state to align with users

* make the name more explicit

* move webhook root to a feature folder

* export consts

* fix webhook collection pagination

* move menu item manifests into root folder

* move webhook delivery filering responsibility from repo to workspace view

* reorganize

* move workspace

* fix import

* move entity actions

* export delivery consts

* dot not export const

* rename folder

* update name

* make event feature folder

* export consts

* move repository files

* more clean up

* split types

* add deprecation warning for a temp method

* bring back url to deliveries table

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-04 06:36:38 +01:00
b4a9dc0770 V13: Fix members while using basic auth. (#18206)
* Flow additional identities to new principal

* Add extension to more easily get member identity

* Ensure the member is used instead of the backoffice user in `MemberManager`

* Update snippet

* Fix the comment that I broke

* Update src/Umbraco.Web.Common/Extensions/MemberClaimsPrincipalExtensions.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-03 19:48:08 +01:00
Niels LyngsøandGitHub deca4c8916 Merge pull request #18182 from umbraco/v15/bugfix/18000
Fix: Unsupported Block (18000)
2025-02-03 19:21:38 +01:00
6aaa9d8081 Corrected rendering of member type icons on create button and picker (#18203)
* Corrected rendering of member type icons on create button and picker.

* Removed debug code.

* Member Picker: sets icon

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 17:10:08 +00:00
Niels LyngsøandGitHub ee51f2af5b Merge pull request #18194 from umbraco/v15/bugfix/17206
Fix: 17206
2025-02-03 18:05:19 +01:00
fc8ae20e70 Localize reference block labels and properties in the block editing experience (#18201)
* Localize reference block labels and properties in the block editing experience.

* Revert description update.

* Block entry: localize content-type name

* Block entry: localize delete confirm modal

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 16:44:15 +00:00
1f4b3e2599 V15: Add progress UI to the Upload Field property editor (#18188)
* feat: uses a blob url over a FileReader to get the temporary file's blob and mimetype

* feat: adds styling to temporary file badge

* use correct styling

* feat: adds uploader ui to track progress of uploaded files

* chore: check for potentially undefined promises

* feat: adds an `AbortSignal` to the xhr requests to allow for the request to be aborted

* feat: adds an `AbortSignal` through the stack to upload a file

* feat: cancel the ongoing request if the user removes the file during an upload

* Code/markup tidy-up

Added "Cancel" button, from @bjarnef's suggestion.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 15:44:00 +00:00
Mads RasmussenandGitHub 1e5bfd8c3a Feature: Media Type Create Options (#18196)
* use extension point for media type create options

* register collection action
2025-02-03 15:42:02 +00:00
Niels Lyngsø 81be464dae added comment 2025-02-03 16:22:50 +01:00
Niels Lyngsø ebad05aa4c validation for Block Type Configurations 2025-02-03 16:22:14 +01:00
Niels LyngsøandGitHub 02b3ec40ab Merge branch 'v15/dev' into v15/bugfix/18000 2025-02-03 15:49:30 +01:00
Jacob Welander JensenandGitHub 058f901293 V15/feature/toggle property editor UI (#18171)
* update the setting for the toggle satet

* update the setting for the toggle satet

* adds a fallback label if no ariaLabel is set in the manifest, using toggleFor
2025-02-03 15:48:34 +01:00
f1cdf50cdd V15: Show server configuration when configuring the Upload Field (#18185)
* feat: shows notification when no suitable media type is found

* chore: rearrange imports

* feat: use a forward ref to find the dropzone

* chore: rearrange imports

* chore(mock): send back correct header

* feat: avoid using the context consumer to get a token, but instead mimick the OpenAPI generator

* chore(mock): allow more file types

* chore(mock): create more upload fields

* chore(mock): also look for mediaPicker fields

* chore(mock): improve media mock db

* chore(mock): add missing endpoints

* chore(mock): update media data

* chore(mock): fix aliases for media grid and table

* chore(mock): add urls to media

* chore(mock): adds missing endpoint for imaging

* fix: reverse order of properties to overwrite existing status

* feat: listen to progress updates on upload and update the `progress` property

* feat: adds tracking of upload progress to placeholders

* feat: bind the progress number up on the temporary file badge to indicate upload status

* feat: optimises progress calculation and makes the badge bigger to be able to show the progress in percent

* feat: allow text to be normal

* chore: use correct localization

* feat: shows error status for anything that isn't waiting or complete

* feat: makes `progress` optional

* feat: adds repository+store for temporary file configuration

* chore(mock): adds mock endpoint for temporary file configuration

* feat: set progress for createTemporaryFiles

* feat: allows a `whitespace` option to notifications

* feat: validates uploads before trying to query the server

* feat: adds `formatBytes` function to format numbers

* chore: export all consts

* feat: exports bytes function

* feat: set decimals to default to 2, which works nicely with the Intl numberformat

* feat: use `formatBytes` to format the error message

* chore(mock): set max file size for mock to 1.4 GB

* feat: adds localization

* Update src/Umbraco.Web.UI.Client/src/packages/core/utils/bytes/bytes.function.ts

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>

* chore: add end character to comment

* feat: binds multiple text string to validation

* chore: fixes event type

* feat: adds new property editor ui for accepted file types

* feat: changes the upload field to use the property editor ui for accepted file types

* adds localization

* Markup/style refactoring/streamlining

* Renamed "Accepted Types" to "Accepted Upload Types"

---------

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 13:57:55 +00:00
Andy ButlandandGitHub e7411244fd Show notifications menu only to users with permission for the feature. (#18184) 2025-02-03 13:24:58 +01:00
Lee KelleherandGitHub ee231c7bae Corrects filename label on the Upload File component (#18205)
* Corrects input upload filename label

Fixes #18195

* Refactored input upload file code
2025-02-03 12:12:19 +00:00
Kenn JacobsenandGitHub 9f357173c3 Enforce user start nodes for media uploads through the RTE (#18204) 2025-02-03 12:50:23 +01:00
Niels Lyngsø 13bcf16644 revert 2025-01-31 21:31:36 +01:00
Niels Lyngsø 89219d8327 Revert "no need to run validators when we already do so on update"
This reverts commit 23659061a2.
2025-01-31 21:30:43 +01:00
Niels Lyngsø 0ae33f8cbc Revert "Reapply "correct initial value set and remove private version""
This reverts commit 317cc5c6f1.
2025-01-31 21:30:13 +01:00
Niels Lyngsø 317cc5c6f1 Reapply "correct initial value set and remove private version"
This reverts commit ce7c6e010d.
2025-01-31 21:29:16 +01:00
Niels Lyngsø ce7c6e010d Revert "correct initial value set and remove private version"
This reverts commit 09072b6946.
2025-01-31 21:28:28 +01:00
Niels LyngsøandGitHub 40f671dca6 Merge branch 'v15/dev' into v15/bugfix/18000 2025-01-31 21:26:37 +01:00
Jacob OvergaardandGitHub 2cdcacb9a8 V15/feature/notification-whitespace (#18190)
* feat: adds `white-space: pre-line` to all notification messages

* chore: remove invalid values
2025-01-31 21:26:19 +01:00
Niels Lyngsø 2fe2b46670 communicate with console error if it fails 2025-01-31 21:17:45 +01:00
Niels Lyngsø 09072b6946 correct initial value set and remove private version 2025-01-31 21:13:09 +01:00
Niels Lyngsø 23659061a2 no need to run validators when we already do so on update 2025-01-31 21:11:14 +01:00
Niels Lyngsø ae540f66d3 correcting logic 2025-01-31 21:06:07 +01:00
Niels Lyngsø 0b7ed5d6f9 make sure to trigger validation system by using super.value 2025-01-31 20:37:16 +01:00
Andy Butland 3157601724 Merge branch 'v15/dev' into contrib 2025-01-31 16:17:43 +01:00
Andy Butland 7dc6e3ed5b Merge branch 'v13/dev' into v13/contrib 2025-01-31 16:16:22 +01:00
09b3bd14c0 v14: Async healthchecks (#17090)
* Make block editor base classes public

* Update BlockEditorValues.cs

Change to trigger a new build for #16774

* Make healthchecks fully async

* Updated obsolete comments to reference next but one major.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-31 16:13:49 +01:00
def9bd096f Less parsing, allocation & LINQ when splitting strings (#18048)
* Less parsing, allocation & LINQ when splitting strings

* Added unit test verifying refactoring of GetIdsFromPathReversed.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-31 14:22:57 +00:00
Gareth WrightandGitHub 5dfff212d0 Update auth.element.ts (#18192)
auth_username => general_username
2025-01-31 14:59:25 +01:00
17615f966b Fix out of memory of 2gb+ (max 4gb) error introduced by #14657 SVG xss security fix (#17421)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-31 13:46:56 +00:00
Kenn JacobsenandGitHub 7a2d6b6c63 More robust resolving of Delivery API redirects (#18160) 2025-01-31 14:26:07 +01:00
3829b0963f V15/sort by selected icons (#18158)
* adds back the custom icon for the content nodes and give a hover effect to indicate that it is grabable, and applys the choosen color

* Update sort-children-of-modal.element.ts

* switches to use the umb-icon and updates styling

* removes the backoffice host

* Update appsettings.Development.template.json

* Update sort-children-of-modal.element.ts

* Update sort-children-of-modal.element.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-31 13:09:55 +00:00
Lee KelleherandGitHub 9323d8b0e7 Introduces getStyles() for Tiptap extensions (#18075) 2025-01-31 13:24:12 +01:00
85a81b3d6f Ensure min/max property editor settings are valid before rendering for content editing (#17881)
* Ensure min/max property editor settings are valid before rendering for content editing.

* Display message when URL picker data type configuration is not valid.

* Reverted 'umb-input-multi-url' changes

* Added console warnings for misconfigured min/max values

Also adds `label` property for UUI elements

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-31 13:23:14 +01:00
Lee KelleherandGitHub bb755188b5 User Group picker modal: adds filter input (#18159)
Fixes #16452.
2025-01-31 13:20:55 +01:00
Niels LyngsøandGitHub 7c5c3fd2d8 Merge pull request #18154 from umbraco/v15/feature/enable-document-rollback-as-entity-action
Rollback as entity action + Picker data updates
2025-01-31 12:59:58 +01:00
Niels LyngsøandGitHub 0480a3287f Merge pull request #18189 from umbraco/v15/bugfix/range-input-simpler-infinite-max-indication
ensure default in Infinity
2025-01-31 12:54:15 +01:00
Niels LyngsøandGitHub 341534c5de Merge pull request #18162 from umbraco/v15/feature/hide-icons
Feature: hide icons
2025-01-31 12:40:16 +01:00
Niels LyngsøandGitHub 9896119b8e Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-31 12:28:43 +01:00
Niels Lyngsø da3bc9a6a8 no more need for a max 2025-01-31 12:15:31 +01:00
Mads Rasmussen a2378e6b5f use unique instead of discriminator 2025-01-31 12:15:10 +01:00
Niels Lyngsø f155369540 ensure default in Infinity 2025-01-31 12:13:15 +01:00
Kenn JacobsenandGitHub 147bdf22bf Use variant context for determining requested culture (#18176) 2025-01-31 11:34:25 +01:00
Niels LyngsøandGitHub d4cfe4d99c Merge pull request #18183 from umbraco/15.2/hotfix/clipboard-delete-confirm-dialog
Hotfix: Clipboard confirm delete labels
2025-01-31 11:21:04 +01:00
Kenn JacobsenandGitHub 50ff23b661 Don't assume HtmlString when inserting default values in templates (#18144) 2025-01-31 11:19:33 +01:00
Niels LyngsøandGitHub 30c4408f18 Merge pull request #18014 from umbraco/v15/feature/workspace-info-app-extension
Feature: workspace info app extension
2025-01-31 11:11:48 +01:00
Mads Rasmussen 4dfe421c2f format translations 2025-01-31 10:47:18 +01:00
HenrikandGitHub c64ec51305 Nonbreaking performance tweaks (#17106)
* Avoid doing multiple lookups in dictionaries, avoid doing string interpolation & adding single char strings to a StringBuilder, made some private/internal classes & some private methods static when possible, use FrozenSet for InvalidFileNameChars

* Avoid some array + list allocations & async methods and made some private methods static

* Avoid double lookup of XML attribute (and double null check) & avoid an unneeded lookup before writing to a dictionary

* Avoid some double lookups

# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextService.cs

* Avoid double lookups

# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextService.cs

* Avoid double lookups

* List AsSpan, also to trigger a new build that hopefully goes through

* Avoid concatting strings when using writer & more static

* Updated CollectionBenchmarks to show that ToArray isn't always the fastest & Lists can be iterated nearly as fast as arrays (and that ToList is nearly as fast as ToArray on IReadOnlyLists in .NET 8)

* Fix rebase

* Use explicit types ❤️ (I thought it was the other way round...)

# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextService.cs

* Reduce number of lines in HtmlStringUtilities.Truncate to pass code quality analysis

* Avoid double lookups & allocating empty arrays

* Use native List Find instead of LINQ
2025-01-31 10:31:06 +01:00
Mads Rasmussen 415b1a2b43 no need to localize headline here 2025-01-31 10:16:18 +01:00
Mads Rasmussen c7da283172 simplify args 2025-01-31 10:14:22 +01:00
Niels Lyngsø 412fe69a36 lint fixes 2025-01-31 10:13:38 +01:00
Niels LyngsøandGitHub 8219d1d8c1 Merge branch 'v15/dev' into v15/bugfix/18000 2025-01-31 10:03:02 +01:00
Mads Rasmussen 0c6bef0e17 add comment 2025-01-31 09:54:58 +01:00
Mads Rasmussen 42dbfbe5c6 rename to message 2025-01-31 09:44:31 +01:00
Mads Rasmussen dab3977ebf Update index.ts 2025-01-31 09:27:38 +01:00
Mads Rasmussen 6c618ff9ec Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-31 09:26:46 +01:00
Andreas ZerbstandGitHub c448190e0b V15 QA added fixes for flaky/failing acceptance tests (#18149)
* Fixed tests

* More fixes

* More fixes

* Skipped waits

* Added necessary updates to tests

* Bumped versions

* Removed skipped waits

* Removed more waits

* Cleaned up PR

* Updated tests

* Bumped version

* Added more timeout
2025-01-31 08:58:15 +01:00
Mads Rasmussen be7fe21099 add timeouts 2025-01-30 23:15:47 +01:00
Mads Rasmussen 9827cfd87e Update localization.controller.ts 2025-01-30 23:12:17 +01:00
Mads Rasmussen 90c66f68c8 translate confirm label 2025-01-30 22:46:31 +01:00
Mads Rasmussen 451810dc73 add danish translation 2025-01-30 22:44:32 +01:00
Mads Rasmussen c3d510dfe9 add token 2025-01-30 22:44:19 +01:00
Mads Rasmussen be61daebf5 export consts 2025-01-30 22:37:15 +01:00
Mads Rasmussen 4f3e4948a8 translate manifest strings 2025-01-30 22:37:09 +01:00
Mads Rasmussen fe97cbeb7f add tests 2025-01-30 22:36:50 +01:00
Mads Rasmussen 25ca146eee handle strings with args in localize controller 2025-01-30 22:36:39 +01:00
Mads Rasmussen 1872a9a139 add keys to manifest 2025-01-30 22:35:59 +01:00
Mads Rasmussen 071d4fb98a add clipboard translations 2025-01-30 22:35:45 +01:00
Mads Rasmussen fe009278cc allow passing headline and content string through manifest 2025-01-30 22:35:23 +01:00
Niels Lyngsø 11e2614fe5 unsupported block list 2025-01-30 22:33:14 +01:00
Niels Lyngsø 1f494939ca Block Grid unsupported block 2025-01-30 21:55:30 +01:00
Andy ButlandandGitHub 739a24b8c5 Fixed name of True/False property editor schema manifest. (#18179) 2025-01-30 20:02:51 +00:00
Mads Rasmussen 357128151c remove unused 2025-01-30 17:03:30 +01:00
Mads Rasmussen 54e4a26d77 update consts 2025-01-30 17:02:13 +01:00
Sven Geusens 343867f6ee Merge branch 'release/13.6' into v13/dev and version bump
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
#	version.json
2025-01-30 16:27:49 +01:00
MoleandGitHub 6668f3a867 V15: Add authorization to create (#18169)
* Add failing tests

* Re-add auth
2025-01-30 16:00:33 +01:00
Mads Rasmussen 4aae502572 add layout element 2025-01-30 14:57:40 +01:00
Niels LyngsøandGitHub c1f74f4aab Merge pull request #18094 from umbraco/v15/bugfix/offline-notifcation
Bugfix: show notification when offline
2025-01-30 14:51:53 +01:00
Niels Lyngsø d1fa73c462 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts
2025-01-30 14:22:01 +01:00
Mads Rasmussen b840fec228 wrap in layout element 2025-01-30 14:19:19 +01:00
Mads Rasmussen 5e7065b7db add layout element 2025-01-30 14:18:35 +01:00
Niels Lyngsø 69e36a3b94 fix json display 2025-01-30 14:15:44 +01:00
Niels Lyngsø 32a2bab4f0 todo 2025-01-30 14:15:32 +01:00
Bjarke BergandSven Geusens b9837ac77c Optimize Azure pipeline (#17674)
* Only fetch single commit

* Hopefully fixes Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.

* Do not checkout again

* More test pipeline

* Another attempt

* yet another attempt

* more attempts

* Revert "more attempts"

This reverts commit 5694d97ba6.

* Test without building backoffice and login explicitly

* Fix mem leak in integration tests

* Fixes sqlserver lock test
# Conflicts:
#	build/azure-pipelines.yml
2025-01-30 14:10:05 +01:00
Niels Lyngsø 2ca4e0e1bd remove max-height setting from code-block 2025-01-30 14:01:51 +01:00
Niels Lyngsø 7d703cc9bd peek error modal 2025-01-30 14:01:31 +01:00
Niels Lyngsø 6f9e66de8a localizations 2025-01-30 14:00:27 +01:00
Jacob OvergaardandGitHub 22d974e748 V15: Client should validate maxFileSize and allowed/disallowed file types from server configuration (#18163)
* feat: shows notification when no suitable media type is found

* chore: rearrange imports

* feat: use a forward ref to find the dropzone

* chore: rearrange imports

* chore(mock): send back correct header

* feat: avoid using the context consumer to get a token, but instead mimick the OpenAPI generator

* chore(mock): allow more file types

* chore(mock): create more upload fields

* chore(mock): also look for mediaPicker fields

* chore(mock): improve media mock db

* chore(mock): add missing endpoints

* chore(mock): update media data

* chore(mock): fix aliases for media grid and table

* chore(mock): add urls to media

* chore(mock): adds missing endpoint for imaging

* fix: reverse order of properties to overwrite existing status

* feat: listen to progress updates on upload and update the `progress` property

* feat: adds tracking of upload progress to placeholders

* feat: bind the progress number up on the temporary file badge to indicate upload status

* feat: optimises progress calculation and makes the badge bigger to be able to show the progress in percent

* feat: allow text to be normal

* chore: use correct localization

* feat: shows error status for anything that isn't waiting or complete

* feat: makes `progress` optional

* feat: adds repository+store for temporary file configuration

* chore(mock): adds mock endpoint for temporary file configuration

* feat: set progress for createTemporaryFiles

* feat: allows a `whitespace` option to notifications

* feat: validates uploads before trying to query the server

* feat: adds `formatBytes` function to format numbers

* chore: export all consts

* feat: exports bytes function

* feat: set decimals to default to 2, which works nicely with the Intl numberformat

* feat: use `formatBytes` to format the error message

* chore(mock): set max file size for mock to 1.4 GB

* feat: adds localization
2025-01-30 12:54:17 +00:00
Sven Geusens bb73ec6c68 Set release version 2025-01-30 09:52:50 +01:00
Niels Lyngsø 0006a9bd87 peek error notification element + controller/method 2025-01-29 22:59:40 +01:00
Andy ButlandandGitHub ee2d7bbb1b Excluded tags from trashed content (#18164) 2025-01-29 21:10:11 +01:00
Mads Rasmussen b4f80fda42 Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-29 19:47:30 +01:00
Niels LyngsøandGitHub e124ce91cb Merge branch 'v15/dev' into v15/feature/hide-icons 2025-01-29 14:02:05 +01:00
MoleandGitHub 1752be989d V15: Fix Url Preview (#18072)
* Make URL overview align with the old routing

This means including custom url providers, other URLS, etc.

* Move implementation to its own provider

* Handle could not get url

* Migrate intergration tests to new implementation
2025-01-29 13:59:58 +01:00
Niels Lyngsø e05eb849c0 update script + remove empty lines 2025-01-29 13:59:54 +01:00
Niels Lyngsø 7cd1c75845 deprecation note 2025-01-29 13:56:29 +01:00
Niels Lyngsø 638eef03a1 update icons 2025-01-29 13:55:07 +01:00
Niels Lyngsø fccd203bdc refactor to use hidden as the property for legacy and internal icons 2025-01-29 13:55:01 +01:00
Andy ButlandandGitHub 5d48bc7371 Provides an option to remove the inessential version number from the generated models (#18081)
* Provides an option to remove the inessential version number from the generated models.

* Clarified comment.
2025-01-29 13:33:49 +01:00
Jason ElkinandGitHub 55b5d7eecd Fix task return and apply correct disposal pattern for FileSystemMainDomLock (#18147) 2025-01-29 12:13:50 +00:00
Jacob OvergaardandGitHub ab98ea58b5 V15: Show upload progress for dropped files in the Media Library (#18148)
* feat: shows notification when no suitable media type is found

* chore: rearrange imports

* feat: use a forward ref to find the dropzone

* chore: rearrange imports

* chore(mock): send back correct header

* feat: avoid using the context consumer to get a token, but instead mimick the OpenAPI generator

* chore(mock): allow more file types

* chore(mock): create more upload fields

* chore(mock): also look for mediaPicker fields

* chore(mock): improve media mock db

* chore(mock): add missing endpoints

* chore(mock): update media data

* chore(mock): fix aliases for media grid and table

* chore(mock): add urls to media

* chore(mock): adds missing endpoint for imaging

* fix: reverse order of properties to overwrite existing status

* feat: listen to progress updates on upload and update the `progress` property

* feat: adds tracking of upload progress to placeholders

* feat: bind the progress number up on the temporary file badge to indicate upload status

* feat: optimises progress calculation and makes the badge bigger to be able to show the progress in percent

* feat: allow text to be normal

* chore: use correct localization

* feat: shows error status for anything that isn't waiting or complete

* feat: makes `progress` optional
2025-01-29 11:02:29 +00:00
Kenn JacobsenandGitHub 9c6e3ff928 Elements level property cache should cache by variation (#18080) 2025-01-29 12:00:01 +01:00
Mads Rasmussen 0a8ac3b2a4 Merge branch 'v15/feature/enable-document-rollback-as-entity-action' of https://github.com/umbraco/Umbraco-CMS into v15/feature/enable-document-rollback-as-entity-action 2025-01-29 11:16:56 +01:00
Mads Rasmussen 99cb36b29d remove unused 2025-01-29 11:16:54 +01:00
Mads RasmussenandGitHub 7f8a4ab8c5 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-29 11:08:04 +01:00
Kenn JacobsenandGitHub 59a4649528 Do not allow editing read-only properties by clicking their labels (#18152)
* Do not allow editing read-only properties by clicking their labels

* Simplify the fix :)

* Fix linting issue
2025-01-29 10:29:58 +01:00
Andy ButlandandGitHub f54b6033ab Added Resharper test assemblies to exclude list on TypeFinder. (#18145) 2025-01-29 10:27:17 +01:00
Andy ButlandandGitHub bca74e0277 Pass user Id to audit when saving and deleting members. (#18120) 2025-01-29 10:14:34 +01:00
Mads RasmussenandGitHub 1e50714d1b Set document to readonly when a user is not allowed to create / update (#18076)
* split manifest file

* use const

* use const

* use const

* require permission to create or update to render save action

* require permission to update to render "save and preview"

* require permission to update + publish to render "save and publish"

* keep button as it is extendable

* keep buttons as they are extendable

* set readonly state based on user permission

* render readonly tag for invariant documents

* remove double array

* return permitted state in callback

* disable save button if all variants are read only

* rename private method

* split check on create vs update

* clear state when resetting the state

* add null check

* remove unused

* Update document-user-permission.condition.ts

* change translation to browse

* remove create permission
2025-01-29 09:06:58 +00:00
Mads Rasmussen 6b94a20043 dispatch event from detail-workspace-base 2025-01-29 10:05:36 +01:00
Mads Rasmussen 0b5e760fd5 correct name 2025-01-29 10:04:57 +01:00
469fd14aff Bugfix: Content Picker Search - support allowed content types config (#18042)
* add option to interface

* pass config to picker

* add option to interface

* force type

* add request args to type

* pass allowed content types as request args

* add comments

* allow for passing type

* more type safety

* use correct types

* use correct types

* add js docs

* remove debugger + map to only pass id to server

* add js docs

* align naming

* add null check

* align types

* implement allowedContentTypes for member search

* fix imports

* add types for media search

* add and use const

* align picker interfaces

* align models

* add entity type

* filter for null value

* explicit naming

* rename field

* use query params

* Implement content type scoped search in item search controllers

* Fix bad naming

* generate server models

* wire up backend

* generate server models

* add selectable filter to member picker

* Update member-picker-modal.element.ts

* Fix indexed search for specific member and media types

* export consts

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-01-29 08:23:32 +00:00
Mads Rasmussen 017777f8a4 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-29 08:00:12 +01:00
Andy ButlandandGitHub ad45494aa5 Fixes rollback of variant page name. (#18136) 2025-01-29 07:50:48 +01:00
Andy Butland c8856bcf22 Obsolete unused configuration property. 2025-01-29 06:30:07 +01:00
Mads Rasmussen 675e9ab17f Merge branch 'v15/dev' into v15/bugfix/offline-notifcation 2025-01-28 18:32:30 +01:00
Mads Rasmussen 633cce5fd8 show online notification 2025-01-28 18:31:41 +01:00
Mads Rasmussen 08a621b117 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-28 18:10:08 +01:00
Mads Rasmussen aa5c58f753 use reload 2025-01-28 17:15:27 +01:00
Mads Rasmussen e6cc9cfc6c reload items 2025-01-28 14:59:59 +01:00
Mads Rasmussen 4ff07d3556 remove unused 2025-01-28 14:48:05 +01:00
Mads Rasmussen ee1dff2e50 Update rollback-modal.element.ts 2025-01-28 14:34:41 +01:00
Mads Rasmussen ff71caf5a3 Update index.ts 2025-01-28 14:29:30 +01:00
Mads Rasmussen 15342ea2bc remove detail from event 2025-01-28 14:28:39 +01:00
Mads Rasmussen fc55f5eb7f listen to events on entity updates 2025-01-28 14:25:26 +01:00
Mads Rasmussen 7ac2fff839 dispatch event when content is saved 2025-01-28 14:24:57 +01:00
Mads Rasmussen 0a78648175 add event discriminator option 2025-01-28 14:04:35 +01:00
Mads Rasmussen 80b8d6f89f remove from document workspace 2025-01-28 13:40:32 +01:00
Jacob OvergaardandGitHub bf340cd7d4 fix: remove unused parameters and documentation (#18095)
this fixes an issue where unused parameters were published as supported, but they were in fact never supported.
2025-01-28 10:53:00 +00:00
Andy Butland 313417cb91 Tidied up XML header comment in ITagQuery. 2025-01-28 10:52:21 +01:00
Niels LyngsøandGitHub f2b337a0be Merge pull request #18109 from umbraco/v15/bugfix/media-picker-mandatory-validation
Fix: media picker mandatory validation
2025-01-28 10:26:10 +01:00
Niels LyngsøandGitHub c4ab3bd8e9 Merge pull request #18108 from umbraco/v15/bugfix/17372
Fix: Mandatory for Image Cropper (17372)
2025-01-28 10:13:41 +01:00
Andy Butlandandnikolajlauridsen 28019e47a9 Added a check that we have a route before attempting to include it in the other URLs for a published document. (#18135) 2025-01-28 10:11:25 +01:00
Andy ButlandandGitHub f1e69dd16e Added a check that we have a route before attempting to include it in the other URLs for a published document. (#18135) 2025-01-28 10:10:08 +01:00
Jacob OvergaardandGitHub ea63d08989 V15: Media library crashes when uploading large files (#18113)
* chore(mock): adds endpoint handler for allowed media types

* feat: adds new event `UmbDropzoneSubmittedEvent`

* fix: do not await unnecessarily

* fix: simplify error checking

* fix: only proceed if array contains elements

* feat: adds support to render an error state

* fix: react to error state on temporary file badges

* fix: cancel events and simplify error check and react to any status changes

* feat: adds new tryXhrRequest function

* fix: use tryXhrRequest to upload all temporary files

* fix: use error types from hey-api as a temporary solution

* fix: changes limit from int32 to long (64-bit) to allow larger files to be uploaded

* fix: set default baseURL

* fix: use same unique

* fix: do not overwrite status

* fix: adds progress callback for tinymce

* generate openapi.json

* Revert "generate openapi.json"

This reverts commit 3c723e0155.

* Revert "fix: changes limit from int32 to long (64-bit) to allow larger files to be uploaded"

This reverts commit c883a45508.

* chore: generate OpenApi.json
2025-01-28 08:50:43 +00:00
Niels Lyngsø f7f0891d3b remove nothing import 2025-01-28 09:26:07 +01:00
Niels LyngsøandGitHub eeafb3cbc6 Merge pull request #18092 from umbraco/v15/feature/reject-validation-promise
Feature: Clean up validation messages
2025-01-28 09:23:03 +01:00
Niels LyngsøandGitHub c72fa4866b Merge branch 'v15/dev' into v15/bugfix/media-picker-mandatory-validation 2025-01-28 09:14:29 +01:00
Niels Lyngsø 424eef4c93 fix min validation check + emptying cards 2025-01-28 08:50:35 +01:00
Andy ButlandandJacob Overgaard 151e0a89fb Refreshed display of check results after all checks are complete. 2025-01-28 08:45:42 +01:00
Niels Lyngsø 2755372f46 Merge branch 'v15/dev' into v15/bugfix/17372 2025-01-28 08:15:48 +01:00
Niels Lyngsø 677a8594df only check valueMissing if required 2025-01-28 08:15:07 +01:00
Mads Rasmussen bf5caf6aea disable submit button until a version is selected 2025-01-27 21:53:47 +01:00
Mads Rasmussen 11800845e2 render empty states 2025-01-27 21:46:52 +01:00
Mads Rasmussen 77f6ac87c6 submit modal 2025-01-27 15:50:55 +01:00
Mads Rasmussen 1048234d80 reload workspace on entity detail updated event 2025-01-27 15:45:19 +01:00
Mads Rasmussen a68ff52bae change weight 2025-01-27 14:13:51 +01:00
Mads Rasmussen eda13964c9 Update rollback-modal.element.ts
hide box if there are no cultures
2025-01-27 14:13:43 +01:00
Mads Rasmussen d343ab3bce styling adjustments 2025-01-27 14:06:17 +01:00
Mads Rasmussen 7e68573628 support invariant documents 2025-01-27 13:51:33 +01:00
Lee KelleherandGitHub d90002247d Feature: Tiptap: Generic markup support (#18124)
* Adds "HTML Global Attributes" Tiptap extension

This is to add `class`, `id` and `data-*` attributes
to any markup within Tiptap contents.

* Adds "Span" element Tiptap extension

to support generic markup modifications.

* Adds "Div" element Tiptap extension

to support generic markup modifications.

Also modifies "umbEmbeddedMedia" to check explicitly
for the `umb-embed-holder` class name. This is to differentiate
from the generic `div` tag.

* Adds "Rich Text Essentials" Tiptap extension

Previously this was a faux extension, but it is now real.

This extension adds the core extensions for Umbraco RTE support.
e.g. StarterKit, et al, and the new global attributes and generic elements.

* Reverts `elementName` constant
2025-01-27 12:29:44 +00:00
Mads Rasmussen 43005c72db extract logic from rendering 2025-01-27 13:02:50 +01:00
Mads Rasmussen 4988162b36 update naming 2025-01-27 12:53:12 +01:00
Mads Rasmussen 6d31a0ae6c get name from language 2025-01-27 12:39:39 +01:00
Mads Rasmussen 01eed53d42 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-27 12:23:30 +01:00
Mads RasmussenandGitHub 1e89b5a1e0 Bugfix: Align collection item entity actions with menu item entity actions (#18118) 2025-01-27 12:03:09 +01:00
Lee KelleherandGitHub 8f212aec3b Feature: Code Editor modal, adds pretty-print support (#18123)
* Reverts `elementName` constant

* Adds `formatOnLoad` option

* Code editor modal markup tidyup

* Wires up `formatOnLoad` with Tiptap's view-source action
2025-01-27 11:57:32 +01:00
bc3881707e updated the link picker modal and the property editors using it. (#18059)
* updated the link picker modal and the property editors using it.

* updated the last language

* some minor updates to the code so that it uses the correct actions

* Minor change in the language key that is being used.

* use camel case

* use "add" and "update" without "link"

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-27 09:49:02 +00:00
2648d17cb6 Updated the dialog label for User -> Assign Access -> Media Start nodes (#18043)
* Updated the dialog label User - Assign Access - Media Start nodes

* Minor change to the modal headline

* update based on review.

* updated the languages based on review

* updated based on review

* Small update based on review on PR

* use generic choose media for the media dialog

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-27 09:45:22 +00:00
Jason ElkinandGitHub 1395d498b7 Use Task Delay instead of Thread.Sleep (#18119) 2025-01-27 09:36:02 +00:00
Mads Rasmussen 719f50024f Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-25 12:50:38 +01:00
Mads Rasmussen d636bba451 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-25 12:50:03 +01:00
Niels LyngsøandGitHub 380492145b remove sidebar padding bottom (#18087) 2025-01-24 22:35:17 +01:00
Niels LyngsøandGitHub 9c02fb419f implement with empty path instead of redirect (#18112) 2025-01-24 22:32:10 +01:00
Mads Rasmussen 55141df271 Update en.ts 2025-01-24 21:44:25 +01:00
7850078623 Redirect to the published URL when exiting preview (#18114)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-24 18:46:28 +00:00
44bf3b77b3 Make it possible to reset media picker crops (#18110)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-24 13:41:30 +00:00
c9758edfb1 V15: Add authorization to saves (#18111)
* Re-add authorization

* Add test plumbing

* Add test helper

* Add happy path test

* Remove usage of negation

* Minor DRYup of test code.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-24 13:45:56 +01:00
Niels Lyngsø e6785d3223 media picker validation 2025-01-24 11:37:26 +01:00
Niels Lyngsø c6c7d043dd implement focus for content picker 2025-01-24 11:37:11 +01:00
Niels Lyngsø 517f3c909c no need to set pristine cause it begin done by checkValidity 2025-01-24 11:37:00 +01:00
Niels Lyngsø fb3609db0a allow for undefined 2025-01-24 11:36:40 +01:00
Niels Lyngsø b8928bac0b fix observation controller instance property 2025-01-24 11:35:52 +01:00
Niels LyngsøandGitHub 4a6740bfd4 Merge branch 'v15/dev' into v15/bugfix/17372 2025-01-24 11:32:19 +01:00
Niels Lyngsø c6f11ab4b2 implement validation for mandatory 2025-01-24 11:30:47 +01:00
Andy ButlandandJacob Overgaard af662fe0e1 Allowed retrieval of current user configuration when accessing user profile as a non-admin user (#18099)
* Allowed retrieval of current user configuration when accessing user profile as a non-admin user.

* Update src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.repository.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-24 10:56:29 +01:00
jonat123andGitHub 1d9704d8b1 Fixed wrong localization for button on image crops (#18106) 2025-01-24 09:51:23 +00:00
1e5e9d4c24 Allowed retrieval of current user configuration when accessing user profile as a non-admin user (#18099)
* Allowed retrieval of current user configuration when accessing user profile as a non-admin user.

* Update src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.repository.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-24 09:41:03 +00:00
Kenn JacobsenandGitHub 8485458896 Add clientside validation to webhook events (#18089) 2025-01-23 17:01:55 +01:00
Kenn JacobsenandGitHub 160710bbc5 Fix parsing exception for RTEs (#18085) 2025-01-23 16:53:26 +01:00
Niels LyngsøandGitHub 7b00033c42 Fix: 17764 (#18093)
* Add property value model type

* make the element a Form Control
2025-01-23 14:21:00 +00:00
Mads Rasmussen 1db821ffcb show notification when offline 2025-01-23 14:37:54 +01:00
Niels Lyngsø ec508918d3 reject and clear messages 2025-01-23 14:36:26 +01:00
Nikolaj Geisle 3d253f5f06 bump version 2025-01-23 11:15:26 +01:00
Nikolaj Geisle 64287d7e1a Merge branch 'release/13.5.3' into release/13.6
# Conflicts:
#	version.json
2025-01-23 11:14:47 +01:00
Nikolaj Geisle 776e7313d0 Merge branch 'release/15.2' into v15/dev 2025-01-23 11:08:50 +01:00
Niels Lyngsø 27aef0b435 fix test 2025-01-23 10:58:33 +01:00
Nikolaj GeisleandGitHub 0562757114 Replace paths, so they are equal on every OS (#18071)
* Replace paths, so they are equal on every OS

* Don't use Path.Combine
2025-01-22 13:47:24 +01:00
Andy ButlandandGitHub edc78a5a4c Handles migration case where an expected constraint is renamed but the constraint does not exist. (#18063) 2025-01-22 12:26:06 +01:00
Nikolaj GeisleandGitHub c847a111fe 15: Convert pagesize properly to skip and take (#18069)
* convert pagesize properly to skip and take

* Obsolete pagesize & pageIndex GetAll method
2025-01-22 10:39:26 +01:00
98ff36b6a8 Validates and prevents save when providing a number outside of the configured range. (#17991)
* Validates and prevents save when providing a number outside of the configured range.

* Refactored to make use of `UmbFormControlMixin`

This flags the property layout container to be invalid (with prompt).
Adds localization keys.

* Corrected localization parameter order

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-22 09:18:39 +00:00
Zeegaan da07a24155 Don't treat warnings as error 2025-01-22 10:15:50 +01:00
Jacob Overgaard f67a900cc1 bump version to 15.3.0-rc 2025-01-22 10:15:21 +01:00
Zeegaan 99090fd933 Merge branch 'refs/heads/release/15.1.2' into release/15.2
# Conflicts:
#	version.json
2025-01-22 09:53:50 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ff44cf3a14 Bump vite from 5.4.11 to 5.4.14 in /src/Umbraco.Web.UI.Login (#18066)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.14/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 08:16:40 +00:00
c158a0d77e Fix: Block validation (Refactor of context-api proxy from Clipboard Feature) (#18038)
* set data path

* use prop setting

* move prop

* type

* clean up

* validation messages test

* remove import

* remove import

* refactor property context proxy to property actions scope only

* clean up

* remove proxy

* find block data

* clean up block clipboard entry data

* check if areas exisists

* test with empty area

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-22 08:50:17 +01:00
dependabot[bot]andJacob Overgaard 3eca03a735 Bump @umbraco-cms/backoffice in /src/Umbraco.Web.UI.Login
Bumps [@umbraco-cms/backoffice](https://github.com/umbraco/Umbraco-CMS) from 15.0.0 to 15.1.2.
- [Release notes](https://github.com/umbraco/Umbraco-CMS/releases)
- [Commits](https://github.com/umbraco/Umbraco-CMS/compare/release-15.0.0...release-15.1.2)

---
updated-dependencies:
- dependency-name: "@umbraco-cms/backoffice"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 08:36:11 +01:00
Niels LyngsøandGitHub a9bf90053a enable areas to be undefined (#18057) 2025-01-21 19:38:41 +01:00
Niels LyngsøandGitHub 800873c2f1 Fix settings value begin indifference (#18022) 2025-01-21 16:43:11 +00:00
Sven Geusens 880f49abdb Merge branch 'v14/dev' into v15/dev 2025-01-21 16:54:05 +01:00
Andy Butland f79b0f8fa7 Fix schema defined in JSON schema tool definition after merge from 13. 2025-01-21 16:51:27 +01:00
Andy Butland 8056a59a10 Fix schema defined in JSON schema tool definition after merge from 13. 2025-01-21 15:52:31 +01:00
Jacob Overgaard 8105a99b9e Merge branch 'v15/dev' into release/15.2 2025-01-21 15:27:02 +01:00
Andy ButlandandGitHub fcb3d7c60a Fixes rendering of the font icons used for buttons in the code editor. (#18053) 2025-01-21 15:25:57 +01:00
Jacob Overgaard ba1606ef18 Merge branch 'v15/dev' into release/15.2 2025-01-21 15:18:01 +01:00
Lee KelleherandGitHub 9c1aeababf Sets max-height for Workspace Variant Selector scroll container (#18051)
Fixes #17680
2025-01-21 15:16:14 +01:00
Andy ButlandandGitHub edce7e6340 Localize the recycle bin tree root. (#18060) 2025-01-21 15:14:40 +01:00
jonat123andGitHub 90fd0f5945 Updated the dialog label for the User - Assign Access - Groups (#18037) 2025-01-21 14:00:45 +01:00
1a18d6c035 Replaced deprecated navigator.platform with navigator.userAgent for platform detection. (#17373)
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-21 13:56:40 +01:00
jonat123andGitHub 87c84615a6 updated the modal headline (#18050) 2025-01-21 13:28:44 +01:00
jonat123andGitHub dea2793f76 Updated the dialog labels for Member -> Choose Groups (#18046) 2025-01-21 13:26:02 +01:00
jonat123andGitHub bebb1a8677 Updated the dialog label for the User Picker label (#18034) 2025-01-21 13:20:51 +01:00
jonat123andGitHub 5f8878d012 Updated the dialog label for the Member Group Picker. (#18033) 2025-01-21 13:05:16 +01:00
Sven Geusens a42beb88bf Merge branch 'v15/dev' into release/15.2 2025-01-21 10:22:31 +01:00
Sven Geusens f96ac32b2b Merge branch 'v14/dev' into v15/dev
# Conflicts:
#	Directory.Packages.props
#	src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderAuthExtensions.cs
#	src/Umbraco.Cms.Api.Delivery/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs
#	src/Umbraco.Cms.Api.Management/OpenApi.json
#	src/Umbraco.Infrastructure/Examine/ExamineIndexRebuilder.cs
#	src/Umbraco.Infrastructure/PropertyEditors/MediaPicker3PropertyEditor.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	tests/Directory.Packages.props
2025-01-21 10:17:46 +01:00
Andy Butland 3e877182b5 Merge branch 'v13/contrib' into v13/dev 2025-01-21 09:47:20 +01:00
Martin VennevoldandGitHub 0e4f883bc1 Fix create child issue in list view with infinite editor (#13355). (#17637) 2025-01-21 09:44:22 +01:00
Andy Butland 265cc62ab8 Merge branch 'release/13.6' into v13/dev 2025-01-21 09:21:36 +01:00
Andy Butland 800c16970e Merge branch 'release/13.6' of https://github.com/umbraco/Umbraco-CMS into release/13.6 2025-01-21 09:20:11 +01:00
Andy Butland 6bd11bf233 Fixes failing front-end unit test to align with new behaviour from PR #17818 (
Allow skipSelect blueprints only when one blueprint exists).
2025-01-21 09:19:31 +01:00
Kenn Jacobsen a2fd82a3f3 Add NoopCurrentMemberClaimsProvider so Umbraco can boot without the Delivery API enabled (#18049) 2025-01-21 09:13:31 +01:00
Kenn JacobsenandSven Geusens 56c0aebd76 Add NoopCurrentMemberClaimsProvider so Umbraco can boot without the Delivery API enabled (#18049) 2025-01-21 09:12:20 +01:00
Kenn JacobsenandGitHub 7567990da1 Add NoopCurrentMemberClaimsProvider so Umbraco can boot without the Delivery API enabled (#18049) 2025-01-21 09:10:43 +01:00
Zeegaan c7d157bbfd build on ubuntu 2025-01-21 09:02:00 +01:00
Kenn Jacobsen 4d3be0a761 Partial revert of #17854 (#18040) 2025-01-21 08:52:33 +01:00
Kenn JacobsenandNikolaj Geisle bbd34310ab Fix various routing and preview issues for the Delivery API in V15 (#18036)
* Fix various routing and preview issues for the Delivery API in V15

* Fix breaking change in ctor

* Fix ambigious constructors

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-01-21 08:52:14 +01:00
Kenn JacobsenandGitHub 2a73cfefbb Partial revert of #17854 (#18040) 2025-01-21 08:48:57 +01:00
Sven Geusens 4b9771c0eb Merge branch 'v13/dev' into v14/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderAuthExtensions.cs
#	src/Umbraco.Cms.Persistence.EFCore/Locking/SqlServerEFCoreDistributedLockingMechanism.cs
#	src/Umbraco.Core/Configuration/Models/RichTextEditorSettings.cs
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Authorization/ContentPermissionsResourceHandler.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.BackOffice/Trees/StaticFilesTreeController.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbuttongroup.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js
#	src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js.js
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediaentryeditor/mediaentryeditor.less
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/propertysettings/propertysettings.html
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.html
#	src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/sendtopublish.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js
#	src/Umbraco.Web.UI.Client~HEAD
#	src/Umbraco.Web.UI.Login/package-lock.json
#	src/Umbraco.Web.UI.Login/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorContent.spec.ts
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs
#	tools/Umbraco.JsonSchema/UmbracoCmsSchema.cs
#	version.json
2025-01-21 08:47:38 +01:00
Nikolaj Geisle 2161edb871 Bump version 2025-01-21 07:41:06 +01:00
Matthew CareandGitHub 5c0cdf5e58 Fix health check link (#17828)
"Back to overview" would push the wrong url to the history, which would break things if you reloaded your page
2025-01-21 07:30:07 +01:00
c00e86e0ea Fix various routing and preview issues for the Delivery API in V15 (#18036)
* Fix various routing and preview issues for the Delivery API in V15

* Fix breaking change in ctor

* Fix ambigious constructors

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-01-20 22:27:10 +01:00
Nikolaj Geisle 31fbd29879 Merge remote-tracking branch 'origin/contrib' into v15/dev 2025-01-20 21:12:23 +01:00
1a80b4d169 V15: Main entity name field lacks placeholder and auto-focus (#18041)
* fix: adds placeholder text to the main entity name field

* fix: use forward ref to execute the `.focus()` method on the uui input when it gets rendered

* Fixed up `type` imports

Removed erogenous closing `</div>` + prettify formatting.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-20 19:30:25 +00:00
Nikolaj Geisle e77e9c5691 Format sql statement (#17354)
(cherry picked from commit aa9f194d76)
2025-01-20 18:27:54 +01:00
Nikolaj Geisle e934a943b5 build on windows 2025-01-20 17:37:04 +01:00
Ronald BarendseandNikolaj Geisle 559c6c9f31 Merge commit from fork
* Add TimedScope

* Use TimedScope in login endpoint

* Use seperate default duration and only calculate average of actual successful responses

* Only return detailed error responses if credentials are valid

* Cancel timed scope when credentials are valid

* Add UserDefaultFailedLoginDuration and UserMinimumFailedLoginDuration settings
2025-01-20 14:58:31 +01:00
Ronald BarendseandGitHub 839b6816f2 Merge commit from fork
* Add TimedScope

* Use TimedScope in login endpoint

* Use seperate default duration and only calculate average of actual successful responses

* Only return detailed error responses if credentials are valid

* Cancel timed scope when credentials are valid

* Add UserDefaultFailedLoginDuration and UserMinimumFailedLoginDuration settings
2025-01-20 14:54:14 +01:00
Jacob Overgaard 081858f627 chore(mock): fixes permissions for mock server 2025-01-20 14:46:18 +01:00
d4f8754f93 Merge commit from fork
* Escape HTML in strings provided as arguments for client-side localization.

* Used HTML sanitizer from dependency.

* Moved sanitization to controller.

* Fixed path to dependency.

* fix: move constants to their own respective files to avoid circular dependencies

* fix: import through import map

* fix: import `sanitizeHTML` from importmap

* chore: consts

* feat: add more ops/sec to `term` function

* fix: check specifically for `typeof 'undefined'` before determining if an arg is valid or not

in case where the sanitizer removes everything so the arg is just an empty string (`""`) we still want it to replace the token, i.e. with the empty string

* test: add tests to verify localization controller xss

* chore: try to improve ops/sec and readability of the `term` function

* test: add more tests for the sanitizer

* fix(dictionary workspace): rely on localization sanitization

* feat: adds new function to escape html entities

* fix: use `escapeHTML` to escape/encode only HTML entities

* test: update test to reflect correct escape

* test: add tests for sanitizeHTML and escapeHTML

* fix: update function to not escape all quotes as people may want to keep those

* chore: formatting

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-20 14:43:27 +01:00
Andy ButlandandGitHub 95eb58587b Merge commit from fork 2025-01-20 14:14:28 +01:00
Andy ButlandandGitHub df0358162b Merge commit from fork 2025-01-20 14:14:28 +01:00
Sven GeusensandGitHub 0e06c47ed7 Regression fix: searcher skip 10k not possible (#17977)
* Add new examine lucene option to restore functionality of earlier version

* Add reason comment for maxSkipTake
2025-01-20 14:00:46 +01:00
dab932329b V15: Link Picker Modal UX Flow (#17994)
* Link Picker: reworked modal UX flow

* Tweaked "Target" description

* Link Picker modal tweaks

* Localized "Reset URL" confirm modal

* Awaits validation on picker change

* Added `data-mark` attributes

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-20 13:46:34 +01:00
51823a7671 v15: Remove old values from checkboxlist (#17936)
* Remove old values from checkboxlist

* Add validator for MultipleValueEditor

* chore: adds mocked "published" handler

* chore(mock): adds multiple dropdown

* chore(mock): adds dropdown multiple to 'all properties'

* adds localization

* feat: adds support to show invalid/legacy options

* feat: show invalid/legacy options to let the user decide what to do

* Add validator for radio buttons

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-20 13:39:02 +01:00
Andy ButlandandGitHub 171ada26cc Allow for filtering of document type allowed children and allowed at root when creating new content. (#18029)
* Creates IContentTypeFilterService with a "no-op" implementation for filtering the content types available for selection at root and as children.

* Rework to collection so packages and implementors can stack filters if they need to.
2025-01-20 12:26:07 +01:00
Niels LyngsøandGitHub ef478cf5d1 Merge pull request #17970 from umbraco/v15/bugfix/save-image-when-changing-focal-point
Fixes bug change focal point of Image Cropper can not save image
2025-01-20 12:15:22 +01:00
Andy Butland 72cae41653 Merge branch 'v15/dev' into contrib 2025-01-20 11:47:52 +01:00
25628a8b76 Lucene Package Update to Address CVE-2024-43383 (#17942)
* Update Lucene Package to 4.8.0-beta00017

* Add Package Reference

---------

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2025-01-20 11:45:35 +01:00
Callum WhyteandAndy Butland 7552e315fb Allow skipSelect blueprints only when one blueprint exists (#17818) 2025-01-20 11:45:26 +01:00
Niels LyngsøandGitHub bb8ef2ceff Merge branch 'v15/dev' into v15/bugfix/save-image-when-changing-focal-point 2025-01-20 11:41:48 +01:00
HenrikandGitHub ed08923b46 Use the new more efficient .NET 9 Lock type (#18015) 2025-01-20 11:41:13 +01:00
Niels Lyngsø 3f57a503e9 fix focal point reset 2025-01-20 11:40:51 +01:00
Tommy EngerandGitHub 87916eb9cf 17760 - improved the Norwegian lang file (#17778)
* 17760 - improved the norwegain lang file

* 17760 - some corrections for the Norwegian lang file
2025-01-20 10:06:24 +00:00
Jacob OvergaardandGitHub 3b6cdbe595 V15: "New version available" text is not reverified after an upgrade (#18013)
* fix: compare current version with the stored version

this ensures that if you come from an older version of Umbraco, we re-verify the upgrade-check to remove the message

* chore: update version in mock handler

* set "new version" button to a positive color

* feat: use modal data to pass on info to new-version modal element

* Amended `type` import
2025-01-20 09:37:05 +00:00
Callum WhyteandGitHub d15b5b221e Allow skipSelect blueprints only when one blueprint exists (#17818) 2025-01-20 10:27:54 +01:00
60e3fa97a9 Lucene Package Update to Address CVE-2024-43383 (#17942)
* Update Lucene Package to 4.8.0-beta00017

* Add Package Reference

---------

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2025-01-20 10:04:02 +01:00
Sebastiaan Janssen 7c9e04f38c Merge branch 'contrib' into v15/dev 2025-01-20 09:55:35 +01:00
Mads RasmussenandGitHub a6b9f201b3 Feature: Data type create options (#18023)
* add folder create option action kind

* register data type create options

* register folder collection actions

* use kind for document type folder option

* fix types

* fix weight

* update translations

* add icon label, description

* add deprecation warning
2025-01-20 08:27:57 +00:00
6c1c851d8a Fix: Improve sorter placement algorithm (#18021)
* improve sorting algorithm

* fix block type input

* make confirm modal localizable

* rename method

* clean up

* clean up

* improve code

* Fix creating Block Types in Groups

* remove #moveData

* lint fixes

* remove unused

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-20 08:10:50 +00:00
Mads RasmussenandGitHub 4353027655 Feature: Media Type Folder workspace (#18028)
* add manifests for media type tree item children

* export consts

* export path consts
2025-01-20 07:53:26 +00:00
Kenn JacobsenandGitHub 0d61890999 First content item at root should not have special meaning when routing (#18016) 2025-01-20 07:26:38 +01:00
Jacob OvergaardandGitHub cd5470f779 V15: Current User Group Id Condition (#18011)
* feat: adds userGroupIds to the current user model

* feat: generate new types

* feat: adds function to check for two array intersections

* feat: maps up userGroupIds

* feat: adds new condition to verify user's groups

* chore: add mocked data

* chore: add generated consts

* change structure of config to match other conditions

match, oneOf, allOf, noneOf

* rename condition from "group" to "groupId"

* feat: inherit from base `UserPresentationBase` to have a shared foundation across user models
2025-01-17 20:37:54 +00:00
Mads RasmussenandGitHub 0bcb3c59da Register create button for document type folders (#18010) 2025-01-17 14:04:02 +01:00
Mads Rasmussen a271822f02 wip decouple of workspace 2025-01-17 13:25:09 +01:00
Mads Rasmussen 724cda740f remove condition in manifest 2025-01-17 12:28:20 +01:00
Mads Rasmussen c12f6a2273 Update media-links-workspace-info-app.element.ts 2025-01-17 09:53:05 +01:00
Mads Rasmussen e3dd44f357 split media links into info app 2025-01-17 09:51:55 +01:00
Mads Rasmussen 4a728d88c2 remove double box 2025-01-17 09:29:55 +01:00
Mads Rasmussen a9039389f4 register references 2025-01-17 09:28:05 +01:00
Niels LyngsøandGitHub 2288ce5d87 readme updates (#18007) 2025-01-17 09:17:03 +01:00
Mads Rasmussen 61c3f529e5 move url files into folder 2025-01-17 08:43:42 +01:00
Mads Rasmussen dc7f02f121 register media history 2025-01-16 22:25:39 +01:00
Mads Rasmussen 810b7d6de3 remove double box containers + adjust styling 2025-01-16 21:05:03 +01:00
Niels LyngsøandGitHub 1e59d8895f Merge pull request #18008 from umbraco/v15/bugfix/fixing-empty-groups-appear-in-add-content-modal
Fix: Empty groups appear in block grid editor Add content UI
2025-01-16 20:56:41 +01:00
Mads Rasmussen df8da92344 wrap apps in a box element 2025-01-16 20:53:32 +01:00
Mads Rasmussen faf13c3f9e localize labels 2025-01-16 18:54:54 +01:00
Mads Rasmussen 6a6353d01b add types for the extension point 2025-01-16 18:50:01 +01:00
Mads Rasmussen f5c0e15716 Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-16 18:30:43 +01:00
Mathias Helsengren 42997ee93c Fixing Empty groups appear in block grid editor Add content UI 2025-01-16 16:06:46 +01:00
Mads Rasmussen daf2e18cd2 get unique from context 2025-01-16 15:55:43 +01:00
e00290f400 Feature: Clipboard (#17820)
* wip clipboard context + tests

* clean up property action module + register copy action

* split manifests

* add clipboard module

* import type

* export type

* mark all methods async

* scaffold copy + paste property actions

* scaffold workspace, collection, repo + data sources

* remove references to language

* register detail manifests

* call repo when creating

* load clipboard collection data

* remove debugger

* register clipboard item picker modal

* return value from picker

* accept native error

* clean up data source

* add tests for error states

* make clipboard local storage manager

* add clip entry entity type

* create unique in scaffold

* add clipboard entry item data

* align naming

* move around

* name alignment

* fix imports

* fix missing entityType

* clean up

* use picker input context

* remove unused context

* Update clipboard.context.ts

* map to item model

* poc paste property action

* register copy/paste as kinds

* lint fix

* add tests

* rename test

* add repository tests

* register delete clipboard action + enable action dropdown outside of context menu

* remove notifcation

* export entity type

* temp use repo instead of context

* delete unused copy property action

* make data source non breaking

* Update vite.config.ts

* add icons for clipboard copy, paste + entry

* remove unused

* return if there is no property value

* add kind interfaces

* pass entry type for copy and paste

* register clipboard for block list

* implement filter on entry type

* delete unused context

* remove references

* rename data to value and don't force an array

* make icons and single value

* allow to add create and update dates for clipboard entries

* use clipboard icon

* add create and update dates

* export constants

* don't set as an array

* reload picker content

* add copy to clipboard button to block list entry

* make picker element

* allow to pick multiple

* remove generic block list clipboard actions

* Revert "remove generic block list clipboard actions"

This reverts commit 6ea65a02ce.

* add get methods

* wip construct block clipboard entry value

* add method to get exposes + add jsdocs

* add expose

* remove todo + add jsdocs

* move clipboard out of core package

* add package files

* load package again

* render entry icon

* render correct icon

* remove clipboard from core vite.config

* Update package-lock.json

* wip copy/paste resolvers

* allow multiple accepted entry types

* move logic to resolvers

* transforming clipboard block value to fit block list

* wip copy/paste resolvers

* clean up

* remove unused

* fix missing exports

* fix tests

* return clipboard entry unique from modal

* Update block-list-entries.context.ts

* clipboard feature: clipboard property value cloner (#17824)

* restructure of property package

* content data merge controller tests

* deprecate meta from propertyValueResolver

* temp work

* temp

* poc

* rename to cloner

* stached block value cloner work

* block list implementation

* correct property value implementation

* RTE Block Property Value Cloner

* Block Grid Value Cloner

* update with comments

* try out cloner

* wip translators

* Revert "delete unused context"

This reverts commit ec31ae55aa.

* move translator + cloner logic to context

* clean up

* implement read from clipboard in block list property editor

* remove debugger

* values array

* handle paste

* Update types.ts

* move files

* Update clipboard-local-storage.manager.ts

* set both create and update date when creating a clipboard entry

* align naming

* handle paste

* clean up + wip block grid translators

* updates types

* add grid block copy translator

* only allow paste translator to handle a single value

* align copy and paste translators

* remove debugger

* move to folders

* add block const

* rename

* add tests

* Update index.ts

* use correct type

* add tests for UmbBlockListToBlockClipboardCopyTranslator

* fix tests

* add translator tests

* add tests

* organize

* organize

* clean up translator tests

* align naming

* remove unused button

* only render copy property action if property has a value

* use constants

* copy single grid block

* get block grid property value from clipboard entry

* add clear method to extension registry + add js docs

* Update index.ts

* add tests for copy value resolver

* add icon for clipboard

* use clipboard icon in modal

* add tests

* remove unused setting

* fix log

* only create array once

* filter for supported paste translators

* use write method instead of duplicating the code

* add condition config type

* use config type

* Update manifests.ts

* add support for multi picker

* move multiple look up logic to context

* add js docs

* add js docs

* remove unused

* remove unused

* remove unused

* implement paste translator filtering for block catalogue modal

* temp color translator

* adding a UmbPropertyValueDataPotentiallyWithEditorAlias

* simplify observer

* append user unique to local storage key

* remove temp color picker clipboard implementations

* more explicit extension type name

* more renaming

* type specifications

* fix test and missing type

* more types for test

* renaming of paste translators

* rename folder

* rename value resolvers

* correct variable name

* wip tests for clipboard context

* clean up tests correctly

* add more tests for clipboard context

* Update clipboard.context.test.ts

* use after each for clean up

* fix test that times out

* correct name

* optimize

* remove webkit

* newest first when picking

* use fingerprint local storage key to obfuscate user id

* rename method

* use const

* set content max length

* return object including the selection uniques

* show confirm dialog before pasting value

* only show confirm dialog if there is a value

* Feature: clipboard block insert (#17935)

* insert methods

* fix originData

* move logic to base class

* progress on Grid and RTE

* correct for Block Grid paste implementation

* update async across

* remove expose from block clipboard entry model

* remove expose from grid block clipboard entry

* remove todo

* wip move value expand responsibility

* wip split clipboard context

* experiment with an extendable property context

* create propertyContexts + proxy events

* rename methods

* move proxy to context + update grid copy logic

* split tests

* remove unused

* add property context extension type

* fix tests

* fix tests

* reorganize

* Update clipboard.property-context.ts

* use context

* register property context clipboard kind

* register for block grid

* remove redundant code

* rename to replace

* Revert "rename to replace"

This reverts commit eb0535edcf.

* rename prop

* rename label

* improve block clean-up abilities

* Update rte-base.element.ts

* make local get of clipboard context

* add asyncFilter option to the type

* add is compatible method to the interface

* support asyncFilter in picker

* add compatability check for block list

* more explicit name

* wip implementation of filter

* add compatability checks

* add temp types

* add clipboard filtering for grid and list

* lint corrections

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-01-16 15:50:09 +01:00
Mads Rasmussen 49aae77b8e align naming 2025-01-16 15:18:16 +01:00
Mads Rasmussen 4026e03606 register references as an extension 2025-01-16 15:15:56 +01:00
Mads Rasmussen 04f7da81ec register links and history as info apps 2025-01-16 15:07:54 +01:00
Mads RasmussenandGitHub 434bac788f Feature: Data Type Folder workspace (#17996)
* implement folder workspace view for data types

* Update index.ts

* export consts
2025-01-16 11:52:52 +00:00
Sven Geusens fd1bd51aff bump version 2025-01-16 10:10:04 +01:00
Sven Geusens b12620af9c Merge branch 'release/13.6' into v13/dev 2025-01-16 10:08:43 +01:00
Sven Geusens d1af59fdf0 Merge branch 'v13/dev' into release/13.6 2025-01-15 22:13:42 +01:00
Andreas ZerbstandGitHub 1b050ebc47 V13 QA added parallelization for E2E tests (#17995)
* Added script for running tests

* Added parallelization for our E2E tests

* Removed line

* Removed condition
2025-01-15 22:12:45 +01:00
Sven Geusens ff3e457c58 Merge branch 'v13/dev' into release/13.6 2025-01-15 20:55:41 +01:00
Andy ButlandandGitHub 2ffaede07b Added a maxlength setting to the regular expression pattern field. (#17982) 2025-01-15 20:54:54 +01:00
mcl-szandMatthew-Wise 53060e1ec5 Remove __Key field from Backoffice Search if query is not a Guid
When a short search query is used, irrelevant results may arise because the query appears in the Key guide.
2025-01-15 19:11:53 +00:00
Sven GeusensandGitHub 2a83f57262 Do not re-map schedule modal on error as it leads to broken bindings (#17990) 2025-01-15 17:35:23 +01:00
Sebastiaan Janssen 37343b24bb Merge branch 'contrib' into v15/dev 2025-01-15 16:54:02 +01:00
Mads RasmussenandGitHub aaa025f85e close modal for create options with links (#17988) 2025-01-15 15:02:15 +00:00
Kenn JacobsenandGitHub 5be9193978 Do not show "Save and preview" by default (#17986) 2025-01-15 15:42:37 +01:00
Niels LyngsøandSven Geusens d3f264fc54 Fix: only fire event when instance is available (issue 17847) (#17987)
* only fire event when instance is available

* avoid js issue when no markup
2025-01-15 14:01:33 +01:00
Niels LyngsøandGitHub 04ea002bf3 Fix: only fire event when instance is available (issue 17847) (#17987)
* only fire event when instance is available

* avoid js issue when no markup
2025-01-15 13:56:53 +01:00
a29f51049b Link to content type and/or template from content/media/member info workspace view only if current user has access to settings (#17965)
* Link to content type and/or template from content/media/member info workspace view only if current user has access to sections.

* Fixed HTML

* add const for condition alias

* export const

* return permitted value in onChange callback

* use condition to check for access

* implement across content

* replace strings with consts

* replace strings with const

* remove attr with the ifDefined directive

* allow to pass in callback type

* Pass callback type

* Update index.ts

* add tests for UmbSectionUserPermissionCondition

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-15 13:46:01 +01:00
Kenn JacobsenandGitHub 8f42a3a0ea Make the RTE handle inline elements gracefully for JSON (#17983) 2025-01-15 11:26:03 +01:00
b8ee161e08 V15 QA updated our E2E pipeline to output test artifacts in a clearer way (#17826)
* Updated pipeline to publish acceptance test artifacts for each os. and to run tests from npm command

* Adjustment to the targetPath

* Publish all in results folder

* Moved folder

* Reverted changes

* Added all results in test folder

* Updated naming

* Used semicolon

* Additional semicolons

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-15 10:21:36 +01:00
Jacob OvergaardandGitHub c8547d9ff0 Build: Detect circular dependencies with Madge (#17924)
* feat: adds script to run madge in a CI environment

* build: adds check for circular dependencies

* build: move actions higher up

* build: only print annotation once

* build: make script not fail CI until dependencies are fixed
2025-01-15 09:19:43 +00:00
Kenn JacobsenandGitHub 4dd8fbe25d Enforce the "Save and preview" button after when switching content app (#17985) 2025-01-15 09:55:00 +01:00
Nikolaj GeisleandGitHub 1c468e2088 Implement IsLockedOut on base class instead (#17979) 2025-01-15 08:53:15 +01:00
Sven GeusensandGitHub ee727c43e1 Added localizations for composite key of missing New (media) Audit item (#17981) 2025-01-14 21:08:47 +01:00
1347074330 V15: Adds validation to all entity workspaces (#17980)
* chore: add validation to mocked endpoints

* feat: create new base context `UmbEntityNamedDetailWorkspaceContextBase` to use for named entities

* feat: extend from `UmbEntityNamedDetailWorkspaceContextBase` to be able to save some code

* feat: allow to pass on the generic parameters

* feat: add type-safety property

* chore: remove duplicate code by extending from correct interface

* chore: fix type casting

* feat: make class abstract and add explanatory comment

* feat: Extend from UmbEntityNamedDetailWorkspaceContextBase to ensure all workspaces with a name follows the same interface

this allows the workspace to act as a UmbNamableWorkspace

* feat: adds a few needed properties to umb-workspace-header-name-editable

* fix: use <umb-workspace-header-name-editable> for partial views

* fix: bind to validation for templates

* chore: remove unused css

* fix(script editor): use `<umb-workspace-header-name-editable />` for the name field

* fix(stylesheet editor): use `<umb-workspace-header-name-editable />` for the name field

* chore: add missing mock endpoint for `tree/data-type/ancestors`

* chore: adds mocks for relations and relation-types

* chore: remove unused handlers

* feat: adds **readonly** to `<umb-input-with-alias />`

* fix: use `<umb-input-with-alias />` for relation type workspace editor

* chore: adds missing handler for package configuration (marketplace url)

* fix(packages): adds validation and data-marks to the package section

* feat: adds a validation context for all entity detail workspaces

* chore: remove duplicated validation contexts as that is now being set by their base class

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-14 17:14:28 +00:00
Jacob OvergaardandGitHub c3134cbb9d V15: Add abstraction for named entity detail workspaces (#17959)
* chore: add validation to mocked endpoints

* feat: create new base context `UmbEntityNamedDetailWorkspaceContextBase` to use for named entities

* feat: extend from `UmbEntityNamedDetailWorkspaceContextBase` to be able to save some code

* feat: allow to pass on the generic parameters

* feat: add type-safety property

* chore: remove duplicate code by extending from correct interface

* chore: fix type casting

* feat: make class abstract and add explanatory comment
2025-01-14 16:38:24 +00:00
Jacob OvergaardandGitHub 395213946b build(deps): update @microsoft/signalr from 7.0.12 to 8.0.7 (#17973) 2025-01-14 15:44:52 +00:00
Niels LyngsøandGitHub b5e48062b3 Merge pull request #17943 from umbraco/v15/feature/no-callback-then-destroy
Feature: no callback then destroy
2025-01-14 16:26:11 +01:00
Andy ButlandandGitHub ed0b236208 Resets send to approval dialog on close such that when re-opening the selection and operation can still be triggered. (#17956) 2025-01-14 16:25:26 +01:00
Jacob Overgaard 836d526be8 Merge branch 'v15/dev' of https://github.com/umbraco/Umbraco-CMS into v15/dev 2025-01-14 16:06:15 +01:00
Jacob Overgaard e49374d3f0 deps(build-dev): bump simple-icons from 13.21.0 to 14.2.0 and regenerate **icon-linkedin** 2025-01-14 16:06:12 +01:00
Jacob Overgaard 95f7aff360 hotfix: restore icon-layers due to renaming 2025-01-14 16:00:58 +01:00
Niels LyngsøandGitHub f86919410c Merge pull request #17978 from umbraco/v15/chore/lint-corrections
Lint corrections
2025-01-14 16:00:08 +01:00
Kenn JacobsenandGitHub 8d56e75257 Add Vary header to all content API operations (#17962)
* Add Vary header to all content API operations

* Make attribute sealed
2025-01-14 15:54:19 +01:00
Niels LyngsøandGitHub baecd565cc Fix: 17428 (#17976)
* method to extract json query properties

* fix issue when validation context has been destroyed

* method to remove and get validation messages

* param key

* do not assign a controller alias to this observation

* clean up delete method

* clean up validation messages

* remove unused imports
2025-01-14 15:52:54 +01:00
Mathias HelsengrenandGitHub 482af686a0 Updated the npm packages (#17975)
* Updated the npm packages

* generated server api and icons
2025-01-14 15:50:33 +01:00
Jacob OvergaardandGitHub b3c27415d1 build(deps): bump @umbraco-ui/uui from 1.11.0 to 1.12.2 (#17972) 2025-01-14 15:48:34 +01:00
Niels Lyngsø bd0031d4cf lint auto corrections 2025-01-14 15:00:31 +01:00
Justin NevilleandNikolaj Geisle 9839b0ee66 Fixes issue with the IVirtualPageController not setting PublishedRequest content via FindContent (#15121)
* Fixes issue https://github.com/umbraco/Umbraco-CMS/issues/12834

* Re-worked based on feedback

* Use dependency injection

* Only call new constructor

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
(cherry picked from commit fd9c1a0e9c)
2025-01-14 13:57:00 +01:00
f3f57f9748 Improve YSOD rendering in the client (#17940)
* Conditionally render error details and make sure something is rendered

* V13 QA updated locator for failing E2E test (#17825)

* Added timeouts

* Nullcheck user in Content permission handlers (#17846)

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-14 13:38:07 +01:00
fd9c1a0e9c Fixes issue with the IVirtualPageController not setting PublishedRequest content via FindContent (#15121)
* Fixes issue https://github.com/umbraco/Umbraco-CMS/issues/12834

* Re-worked based on feedback

* Use dependency injection

* Only call new constructor

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-01-14 13:32:09 +01:00
Nikolaj GeisleandGitHub 85d16a4354 V13: Show validation error, when saving invalid media (#17961)
* Don't save invalid media

* Revert "Don't save invalid media"

This reverts commit c4b6acf542.

* Still allow save, but show validation error, not popup error

* Add clarifying comment
2025-01-14 11:18:36 +01:00
Kenn JacobsenandGitHub c0517c3562 Allow filtering for multiple content types (#17960) 2025-01-14 10:40:45 +01:00
Kenn JacobsenandGitHub d6e7f83e3b Published Content should handle "is previewing" (#17957) 2025-01-14 10:39:39 +01:00
Kenn JacobsenandGitHub 6fc728c3d7 Make the Delivery API "ancestors" selector work with preview (#17938) (#17950) 2025-01-14 10:39:03 +01:00
Lan Nguyen Thuy 5afa4b069b add temporaryFileId to value when chaning focal point 2025-01-14 15:31:58 +07:00
92e535a1c9 V13 QA updated locator for failing E2E test (#17825)
* Added timeouts

* Nullcheck user in Content permission handlers (#17846)

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-14 09:12:41 +01:00
Niels LyngsøandGitHub 45603e2689 rule to accept element base for abstract element class names (#17969) 2025-01-14 08:59:41 +01:00
Sebastiaan JanssenandGitHub c4021e27e5 Fixing problem on Linux where dotnet run fails because we try to set an IIS config (#17903)
* Don't add a blanket rule to allow synchronous IO, should not be necessary for the new management API

* Add obsolete warning

* Catch errors while adding global rule to allow synchronous IO, which fails on non-windows machines

* Some updates based on PR feedback
2025-01-14 01:32:43 +01:00
Kenn JacobsenandGitHub 7411c2552b Added integration test to verify the Delivery API contract (#17949) 2025-01-13 15:15:37 +01:00
KrügerGitHubDESKTOP-16T01G5\Umbraco <obk@umbraco.dk>leekelleher
42f49eb564 Visual update to user group modal (#17934)
* Initial commit of changes

* final touches on styling

* Refactored to observe and resolve the document/media node names

---------

Co-authored-by: DESKTOP-16T01G5\Umbraco <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-13 13:17:05 +00:00
Andy ButlandandGitHub f2410f376e Corrected property names and structure used in JSON schema generation for configuration of default data to install. (#17946) 2025-01-13 11:05:51 +01:00
MoleandGitHub 44c30807fa Handle invariant domains (#17937) 2025-01-13 08:52:43 +01:00
Kenn JacobsenandGitHub a9313c1367 Make the Delivery API "ancestors" selector work with preview (#17938) 2025-01-13 07:47:14 +01:00
Niels Lyngsø 80e94023d2 destroy if observer has no callback 2025-01-10 20:29:07 +01:00
Niels LyngsøandGitHub 3873b5b595 Merge pull request #17929 from umbraco/v15/bugfix/17312
Fix/Feature: Introducing Route Path Addendum
2025-01-10 19:51:00 +01:00
leekelleher 533a644e12 Removed console.log
Updated typo in test.
2025-01-10 17:24:29 +00:00
MoleandGitHub aaad9c0b23 V15: Notification Hub (#17776)
* Initial stab at how this could look

* Authorization PoC wip

* Add connection manager

* Add DI to its own class

* Use enum instead of string

* Use groups

* Refactor group management into its own service

* Update a users groups when it's saved

* Add saved events

* Wire up deleted notifications

* Ensure update date and create date is the same

* Cleanup

* Minor cleanup

* Remove unusued usings

* Move route to constant

* Add docstrings to server event router

* Fix and suppress warnings

* Refactor to authorizer pattern

* Update EventType

* Remove unused enums

* Add trashed events

* Notify current user that they've been updated

* Add broadcast

We don't need it, but seems like a thing that a server event router should be able to do.

* Add ServerEventRouterTests

* Add ServerEventUserManagerTests

* Use TimeProvider

* Remove principal null check

* Don't assign event type

* Minor cleanup

* Rename AuthorizedEventSources

* Change permission for relations

* Exctract event authorization into its own service

* Add some tests

* Update name

* Add forgotten file

* Rmember to add to DI
2025-01-10 09:36:44 +01:00
Niels LyngsøandGitHub 7932eb9aae Merge pull request #17928 from umbraco/v15/bugfix/fix-omitted-callback
Fix omitted callback
2025-01-10 09:11:44 +01:00
Niels Lyngsø e9865eb503 correct imports 2025-01-10 08:57:08 +01:00
Niels Lyngsø b2690a373d mark for deprecated 2025-01-09 22:21:01 +01:00
Niels Lyngsø 252f2f5d04 rename to inherit addendum 2025-01-09 22:16:40 +01:00
Niels Lyngsø 3ccb10d7c0 implement/replace existing unique router paths 2025-01-09 22:08:07 +01:00
Nikolaj GeisleandGitHub 58d6404ec8 V14: Reintroduce BackOfficeUserManagerAuditer (#17349)
* Reintroduce BackOfficeUserManagerAuditer

* Cleanup legacy code

* Notify user logout on logout
2025-01-09 21:14:24 +01:00
Niels Lyngsø 2c8117c8a5 addendum implemented 2025-01-09 21:12:57 +01:00
Niels Lyngsø 81ebf3fc02 Merge branch 'v15/bugfix/fix-omitted-callback' into v15/bugfix/17312 2025-01-09 20:51:49 +01:00
Niels Lyngsø 82b740e3ef extra test 2025-01-09 20:49:50 +01:00
Niels Lyngsø bd456a1dfa correct null case 2025-01-09 20:28:58 +01:00
Niels Lyngsø f862736163 make sure callback can be undefined 2025-01-09 20:23:28 +01:00
Niels Lyngsø 989781c94d use addendum 2025-01-09 20:17:24 +01:00
Niels Lyngsø 756fa05c46 improve test 2025-01-09 20:04:11 +01:00
Andy ButlandandGitHub 75e7bb48ea Render all URLs in document workspace info tab and ensure protocol-less links can be used to access the intended URL. (#17926)
* Render all URLs in document workspace info tab and ensure protocol-less links can be used to access the intended URL.

* Removed unused import.

* Removed scheme from resolved URL.
2025-01-09 16:19:33 +01:00
Niels Lyngsø d879919d75 correct path generation 2025-01-09 14:29:49 +01:00
0eb6a16017 Reload children of destination after duplicate of content (#17878)
* Reload children of destination after duplicate of content.

* Revert changes to generic duplicate to action.

* Don't assume entity type of duplicated item is the same as the destination. Instead treat as "document" unless destination unique is null, when it will be "document-root".

* add todo back

* remove console log

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-09 14:24:33 +01:00
Nikolaj GeisleandJacob Overgaard 53a5813189 V15: Dont create invalid media (#17534)
* Don't allow create when there is validation errors

* Fix tests

* Add tests

* Fix last test

* Fix more tests

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-09 12:21:54 +01:00
Niels Lyngsø 0eef5e5801 context 2025-01-09 11:39:51 +01:00
Niels LyngsøandGitHub 6fdb898467 ensure controller host destroys sub controllers (#17916) 2025-01-09 10:15:42 +01:00
Nikolaj Geisleandkjac 5b3b9d770a V13: Add rcl files to static files tree (#17671)
* Refactor to use IWebhostEnvironment for wwwroot files.

* Obsolete ctor

* Add ActivatorUtiiliesConstructor

* Refactor logic to include folders

* Fix so we can see files in wwwroot/App_Plugins

* Cosmetic: Use invariant comparison for the "umbraco" folder".

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-01-09 10:02:34 +01:00
4a54215fa1 V13: Add rcl files to static files tree (#17671)
* Refactor to use IWebhostEnvironment for wwwroot files.

* Obsolete ctor

* Add ActivatorUtiiliesConstructor

* Refactor logic to include folders

* Fix so we can see files in wwwroot/App_Plugins

* Cosmetic: Use invariant comparison for the "umbraco" folder".

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-01-09 09:36:32 +01:00
Niels Lyngsø 8f9bfb4143 move router-slot component 2025-01-09 08:43:38 +01:00
Kenn JacobsenandGitHub 0565eeebd5 Do not allow editing read-only properties (#17915) 2025-01-09 06:59:32 +01:00
Niels LyngsøandGitHub cce056b7de Merge pull request #17912 from umbraco/v15/bugfix/block-list-amount-validation-message
Block list amount valivation message
2025-01-08 16:36:05 +01:00
Niels Lyngsø 77c064af89 prettier update 2025-01-08 16:02:36 +01:00
Andy ButlandandGitHub bfff224c3e Display variant selection on unpublish only if the document is variant (#17893)
* Display variant selection on unpublish only if the document is variant.

* Allow for publish and unpublish of variant and invariant content.

* Added integration tests for amends to ContentPublishingService.

* Fixed assert.

* Fixed assert and used consistent language codes.

* Further integration tests.
2025-01-08 15:07:56 +01:00
f9c52b7ebc Feature: improve collection wording (#17914)
* improve wording for collection configuration

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-01-08 12:57:14 +01:00
Andy ButlandandGitHub cbd162b3c7 Allow sort of children by name and create date (#17904)
* Added create date to document and media children endpoints.

* Sort by name or create date for documents and media.

* Fix build issues.

* Only render column headers for sorting if all pages of children are loaded.

* Add indicator and debounce sorting by column headers.
2025-01-08 12:46:12 +01:00
e425f0ba41 Improve document schedule (#17535)
* Expose schedule date for on document get endpoint

* typo fix

* stupid stuff

* Enable content scheduling features in the publishing service

* Replace obsoleted non async calls

* Add content scheduling test

* Publush and schedule combination test

* More invariantCulture notation allignment and more tests

* Link up api with updated document scheduling

* More invariant culture notation allignment

* Fix breaking change

* Return expected status codes.

* Fix constructor

* Forward Default implementation to actual core implementation

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Forward default implementation to core implementation

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Make content with scheduling retrieval scope safe

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2025-01-08 12:39:34 +01:00
413398afc6 Use data type configuration to determine default value for empty toggle and slider property values (#17854)
* Use data type configuration to determine default value for empty toggle property values.

* Added/updated unit tests.

* Fixed failing integration tests.

* Applied similar default value display for the slider property editor and aligned implementation of true/false with this.

* Fixed unit tests.

* Removed "duplicate" JsonPropertyName attributes and added a custom TypeInfoResolver for data type configuration so we can re-use the existing ConfigurationField attributes.

* Minor cleanup

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2025-01-08 11:42:13 +01:00
Lan Nguyen Thuy bfd2d35e13 Block list amount valivation message 2025-01-08 17:13:59 +07:00
b7f424756c V15: Dont create invalid media (#17534)
* Don't allow create when there is validation errors

* Fix tests

* Add tests

* Fix last test

* Fix more tests

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-08 10:50:53 +01:00
Andy ButlandandGitHub c7b05d5455 Fixed infinite loop triggered when requesting media by ID in a folder via the media delivery API. (#17876) 2025-01-08 10:42:08 +01:00
Andy ButlandandGitHub e7ee7c63c3 Fix to GetCultureFromDomains extensions following changes to routing and published content cache (#17884) 2025-01-08 10:29:06 +01:00
22e993f44c V15: Change password should not be shown when local login is disabled (#17900)
* feat: include the option whether a login provider has disabled local login

* feat: include information whether change password or two factor is allowed

* generate new OpenApi.json

* generate new ts client

* feat: request the server configuration and include in the UmbAppContext

* fix: for login screen, check that a provider did not disable the local login

* fix: use UmbAppContext to fetch the version check period

* chore: remove unused method

* revert current user configuration changes

* generate new ts client

* fix: add condition for "allow password change" on the change password button

* fix: create new IsDefaultKind condition to separate change password logic

* fix: update "allow change password" and "allow mfa" conditions to take the user configuration into consideration

* chore: export consts

* remove falsely named attribute that happens to not be useful anyway

* chore: revamp logic for early return to make it more readable

* convert `isInitialized` to a Promise as it is only being resolved once anyway, which then additionally saves a call to `this.observe` in the conditions

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-08 09:27:59 +00:00
Niels LyngsøandGitHub fd7f6bbfc9 Merge pull request #17877 from umbraco/v15/bugfix/intermittent-issue-rendering-granular-permissions-for-user-group
Timing updates for rendering and preparation of user group granular permissions details to resolve intermittent error on race condition
2025-01-08 10:07:30 +01:00
Niels LyngsøandGitHub 0a483e6551 Merge branch 'v15/dev' into v15/bugfix/intermittent-issue-rendering-granular-permissions-for-user-group 2025-01-08 09:36:01 +01:00
Niels Lyngsø 7ac941de77 remove comment 2025-01-08 09:35:09 +01:00
e5e5e8cb11 V15: Warn when content is unroutable (#17837)
* Add notification handler

* Add IsContentPublished that bypasses caching

* Add clarifying comment

* Refactor, to never hit the db

* Remove old comment

* Don't add warnings if disabled

* Dedicated configuration option to suppress unroutable content warnings

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-01-08 09:14:14 +01:00
bf9ba16039 Add workspace view path const (#17880)
* use path const for workspace view

* get base path and active path from router context

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-01-07 19:26:10 +01:00
79c8652ca4 Implemented sorting for media picker crops (#17879)
* Implemented sorting for media picker crops.

* Removed unused type import.

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-07 19:15:58 +01:00
Sven Geusensandnikolajlauridsen 52fbb34ddd Nullcheck user in Content permission handlers (#17846) 2025-01-07 15:07:42 +01:00
Sven GeusensandGitHub c96dc7eaa1 Nullcheck user in Content permission handlers (#17846) 2025-01-07 14:52:40 +01:00
Niels LyngsøandGitHub 56d4ffc2e8 Merge pull request #17905 from umbraco/v15/feature/remove-one-circular-dependency
Feature: emove one circular dependency
2025-01-07 14:26:30 +01:00
Andy ButlandandGitHub 376c496597 Ensure sort order is used when rendering the list of allowed documents that can be created under an item in the content section, and allowed for sorting of selected allowed content types (#17875)
* Ensure sort order is used when rendering the list of allowed documents that can be created under an item in the content section.

* Fixed issue preventing sorting of the allowed content types.
2025-01-07 14:01:11 +01:00
Niels Lyngsø f3b09f3489 remove circular dependency 2025-01-07 13:42:41 +01:00
Niels Lyngsø ce494a8bc9 Merge branch 'v15/dev' into v15/bugfix/intermittent-issue-rendering-granular-permissions-for-user-group
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-slot/extension-slot.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-with-api-slot/extension-with-api-slot.element.ts
2025-01-07 13:30:24 +01:00
Niels Lyngsø 87c48c379b use extension slot 2025-01-07 13:29:09 +01:00
Niels Lyngsø 12ab1d6da2 fix types 2025-01-07 13:28:59 +01:00
1fdf32f404 V15: Document Type Create Options (#17669)
* Refactors `umb-ref-item` to inherit from `uui-ref-node`

To extend, rather than reinvent the wheel.

* Updates components using `umb-ref-item` with `select-only` attribute

* Updates `umb-entity-create-option-action-list-modal` to use `umb-ref-item`

instead of `uui-ref-node`, so we can use `umb-icon`
(with color support) and UI consistency.

* Adds `headline` property for Create Option modal

* Changes 'Umb.EntityAction.DocumentType.Create' to use `kind: 'create'`

Deprecates `umb-document-type-create-options-modal` and token.

* Adds `entityCreateOptionAction` extensions for Document Types

- Document Type (default)
- Document Type with Template
- Element Type
- Folder

* Tweaks Create Options modal to submit upon selection

* corrections

* remove headline option

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-07 12:28:00 +00:00
Niels LyngsøandJacob Overgaard 263a6d8d61 update property container id when container changed 2025-01-07 13:21:19 +01:00
Niels LyngsøandGitHub 601f61fc39 end drag with mouse move event (#17902) 2025-01-07 13:20:40 +01:00
Niels LyngsøandGitHub 622e343ac5 Fix #14541: hide "Publish with descendants" when not yet created (#17853)
* Hide Publish with Descendants if item is not yet created

* registere condition
2025-01-07 13:17:08 +01:00
Niels LyngsøandGitHub b7a2302ca7 Feature: Minor performance optimization from investigation (#17888)
* assigning event when created, to align with other event

* revert
2025-01-07 11:45:02 +01:00
Niels LyngsøandGitHub 113059c2d1 Refactor workspace context creation logic (#17885)
* rename arg for better readin

* use nothing

* parse args and implement single mode

* make single mode work with conditions

* implement UmbExtensionsElementAndApiInitializer in workspace element

* move workspace initialization to workspace element

* do not parse host, as it already happens

* implement initializer single mode for extension slot elements
2025-01-07 11:37:21 +01:00
Nikolaj GeisleandGitHub 5482f6b5ca Order by sortorder (#17898) 2025-01-07 11:33:24 +01:00
Nikolaj GeisleandGitHub 66f2b60141 V15: Add webhooklogs endpoint (#17838)
* Add webhook logs endpoint

* Add attribute routing

* Add to open api json
2025-01-07 11:18:32 +01:00
Niels LyngsøandGitHub e4c5da18d5 Fix #17758: V15 - Race condition breaks navigation between documents (#17857)
* clean up compositions

* use getItemByUnique method

* clean up

* a few notes
2025-01-07 11:01:31 +01:00
Andy Butland dce3b94813 Bumped version to 15.1.2. 2025-01-07 10:13:54 +01:00
Niels LyngsøandGitHub df3f0cef82 Fix: select app language (#17849)
* fix selection data

* remove unused import
2025-01-07 09:46:10 +01:00
Andy ButlandandGitHub f3ecd94a75 Call change event after update of multiple text string order. (#17899) 2025-01-07 09:32:52 +01:00
Sebastiaan JanssenandGitHub ba58c6323c Don't add a blanket rule to allow synchronous IO, should not be necessary for the new management API (#17886)
* Don't add a blanket rule to allow synchronous IO, should not be necessary for the new management API

* Add obsolete warning
2025-01-07 09:25:41 +01:00
Niels LyngsøandGitHub 432d083ad3 Merge branch 'v15/dev' into v15/bugfix/intermittent-issue-rendering-granular-permissions-for-user-group 2025-01-07 08:36:16 +01:00
Sven GeusensandGitHub 1cd9e3e83f Fix variant invariancy with limited language (#17707)
* Add a way to configure IUmbracobuilder on a per testcase basis

* New logic for invariantVariantMerging

* bugfix

* Undo formatting changes

* Undo more automatic formatting

* Last automatic formatting correction

* Cleanup ConfigureBuilderAttribute

* Made propertyEditor tests internal
2025-01-06 14:58:00 +01:00
Jacob OvergaardandGitHub 99f572837a Merge pull request #17896 from umbraco/v15/bugfix/support-svg-in-thumbnail-endpoint
v15: Support SVGs in thumbnail endpoint
2025-01-06 14:01:19 +01:00
Nikolaj Geisle 8dfeea1a50 Convert to absolute url 2025-01-06 13:30:27 +01:00
Nikolaj Geisle f1c3611001 Add clause for svg's and clarifying comment 2025-01-06 12:56:56 +01:00
Jacob Overgaard f19409ba5b Revert "bump version"
This reverts commit 679c42ef90.
2025-01-06 12:51:10 +01:00
Jacob Overgaard 679c42ef90 bump version 2025-01-06 12:46:03 +01:00
09575599ad Fix Umbraco.Tests.Common warnings. (#17172)
* Fix async warning.

* Fix MediaFileManager warning.

* Fix TypeLoader warning.

* Fix CodeBase warning.

* Fix ContentTypeEditingBuilder warning.

* Fix _containerKey warning.

* Fix _key warning.

* Fix issues due to merge with contrib

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2025-01-03 17:59:50 +01:00
Sebastiaan Janssen aaa44a20cb Merge branch 'v15/dev' into contrib 2025-01-03 12:12:05 +01:00
Nhu DinhandGitHub 0a86dc5107 V15 QA Added acceptance tests for the Content with Tiptap (#17851)
* Added tests for content with tiptap - not done

* Updated tests - not done

* Addes tests for create content with non-empty RTE tiptap

* Added Content tests for tiptap

* Cleaned up

* Updated tests for Content with tiptap due to test helper changes

* Make all the Content tests run in the pipeline

* Fixed comment

* Reverted
2025-01-03 14:23:12 +07:00
Andy Butland a3c45c0fe9 Removed debug code. 2025-01-02 10:02:56 +00:00
Andy Butland ed72a692b6 Timing updates for rendering and preparation of user group granular permissions details to resolve intermittent error on race condition 2025-01-02 09:36:40 +00:00
Andreas ZerbstandGitHub a954051d98 V15 QA updated flaky E2E tests (#17845)
* Updated tests

* More cleanup

* Removed log

* Bumped version

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultiURLPicker.spec.ts

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeDesignTab.spec.ts

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts
2024-12-20 08:03:27 +01:00
Niels LyngsøandJacob Overgaard a582732429 change route setup 2024-12-19 09:02:23 +01:00
Niels LyngsøandGitHub a4017e6dce Feature: block 'draft' tag (#17640)
* not-yet-exposed

* add tag

* implement id for expose button

* implement tag for grid

* style

* use plus icon in rte blocks

* empty commit
2024-12-19 08:56:03 +01:00
Sven GeusensandGitHub 0a56aaaf54 Fix mistakes in 15.0.0 migrations (#17814)
* Fix ConvertLocalLinks migration and add a new migration in case the old one has already run

* RebuildCache

* Clear cache means clear ALL caches

* Fix Block Markup recursion

* Fix Unittest mock constructor
2024-12-18 15:24:43 +01:00
e8c4fb96de Feature: Published Document Pending Changes (#17812)
* implement validation for media and prepare for member

* remove import

* port code from backoffice repo

* move repo into publishing module

* port get published methods

* cleanup

* wip render state

* align state UI

* post merge clean up

* move publish modal

* move schedule modal

* move unpublish modal

* move publish action and bulk action

* move unpublish action + bulk action

* lint fix

* Update document-workspace.context.ts

* wip move publishing methods to publishing context

* move publish with descendants

* fix more references

* Update document-publishing.workspace-context.ts

* export entity action

* add return type

* temp internal methods

* use repository response type

* expose methods for other contexts to use

* use public methods

* call publishing context methods

* fix import

* move manager into folder

* organise in folders

* add get method to get variants with changes

* preselect variants with pending changes

* observe data changes

* render pending changes client state

* observe unique

* Update document-publishing.server.data-source.ts

* use correct key

* clean up

* expose persisted data

* rename arg

* use persisted data instead of current

* add reload method

* reload data after publish

* remove headline

* handle all publish actions the same

* reset state as the first thing when creating + loading

* add method to get variants

* only load published if document has a published variant

* remove variants from observer

* add public method to get the changed variants

* align preselection with current logic

* add deprecation util

* add method deprecation warnings

* remove unused publish method

* move publishing workspace actions into publishing module

* use publishing context

* clean up

* add tests for published pending changes manager

* handle server the same way

* process pending changes when persisted data changes

* remove buggy updateDate

* remove unused

* lint fix

* add publish method back to avoid a breaking change

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2024-12-18 13:03:32 +00:00
Kenn JacobsenandGitHub b6351f9f33 Make parallel block editor migration optional (#17827) 2024-12-18 13:41:07 +01:00
b0b4571686 Bugfix: missing links for invariant documents with hostnames (#17808)
* always render the links we get from the server

* render information about links with no url

* pass correct state value

* Update document-workspace-view-info-links.element.ts

* reuse empty link, culture markup

* remove state from urls

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2024-12-18 13:11:13 +01:00
545d64df25 V15: Handle empty permissions (#17801)
* Handle empty permissions

* Add tests

* Add a few more asserts to the tests

* Move dependency injection to test itself

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2024-12-17 13:26:27 +01:00
Kenn JacobsenandGitHub 7a3862e926 Support segments from querystring in preview (#17819) 2024-12-17 12:37:49 +01:00
Nikolaj GeisleandGitHub 77b6e6e6d9 override PerformGetAll (#17822) 2024-12-16 13:35:02 +01:00
Elitsa MarinovskaandGitHub 32d0cb477e V14: Adding the ability to conditionally serialize version bound properties for the Delivery API (#16731)
* Property level versioning for the Delivery API using a custom System.Text.Json resolver

* Adding a converter base class that custom converters can implement

* Revert resolver

* Use IHttpContextAccessor for the API version

* Fix attribute and checks in ShouldIncludeProperty

* Fix enumeration

* Fix comment

* Unit tests

* Refactoring

* Remove Assert.Multiple where no needed
2024-12-16 11:34:55 +01:00
Jacob Overgaard fe8f81bc23 docs: add instructions on how to use vs code 2024-12-16 10:46:54 +01:00
Jacob OvergaardandGitHub 726412a655 Add launch tasks for VS Code (#17772)
* feat: add two launch tasks to start a vite server and attach to an existing vite server

* build(deps-dev): install and use cross-env for vite commands

* build: add mocked launch task

* build: add prompt to check if msw should be on or off

* build: defaults

* build: rename launch task

* build: add compound to start backend and frontend at the same time
2024-12-16 10:46:24 +01:00
Nikolaj GeisleandElitsa 838294efe1 V13: Clear username cache (#17815)
* Clear member username cache on delete

* Also refresh cache on update
2024-12-16 10:36:26 +02:00
Mads RasmussenandGitHub 70272f1a1a Chore: Remove client tests that doesn't do anything but trouble (#17813)
* remove tests

* Delete upgrader-view.test.ts
2024-12-16 09:03:13 +01:00
Nikolaj GeisleandElitsa d451390d78 V13: Clear username cache (#17815)
* Clear member username cache on delete

* Also refresh cache on update
2024-12-16 09:56:54 +02:00
Elitsa MarinovskaandGitHub 3304c6f472 Enable anonymous calls to HandleLogout action (#17807) 2024-12-16 07:26:12 +01:00
Nikolaj GeisleandGitHub 34f09fa260 V13: Clear username cache (#17815)
* Clear member username cache on delete

* Also refresh cache on update
2024-12-16 08:18:30 +02:00
419a8e1166 Feature: media server validation (#17591)
* implement validation for media and prepare for member

* remove import

* use repository response type

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-12-13 15:38:08 +01:00
Mads Rasmussen e87d1fc2dc Revert "Delete upgrader-view.test.ts"
This reverts commit ab58499d92.
2024-12-13 13:48:40 +01:00
Mads Rasmussen ab58499d92 Delete upgrader-view.test.ts 2024-12-13 13:47:27 +01:00
Niels LyngsøandGitHub 9b27184708 Merge pull request #17755 from umbraco/v15/feature/first-round-of-data-marks
Feature: Adding first round of data marks
2024-12-13 13:30:05 +01:00
Jacob Overgaard fd4efd38cd Merge branch 'v13/dev' into release/13.6 2024-12-13 10:07:46 +01:00
Jacob Overgaard e4e9bfc3e9 bump version to 13.6.0-rc2 2024-12-13 09:58:13 +01:00
Jacob Overgaard 3774dbe38c Merge remote-tracking branch 'origin/v13/contrib' into v13/dev 2024-12-13 09:56:46 +01:00
Dan ListerandJacob Overgaard 4ef50642ad Fixed an issue where bold markdown would not work inside a property description 2024-12-13 09:53:36 +01:00
Mads RasmussenandGitHub a85f82fcf7 make msw quiet in tests (#17809) 2024-12-13 09:51:51 +01:00
e61bbe0dc3 Update src/Umbraco.Web.UI.Client/src/packages/core/section/section-sidebar/section-sidebar.element.ts
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2024-12-13 08:38:26 +01:00
Bjarke BergandGitHub 0b9855c045 Merge pull request #17762 from umbraco/v15/task/media-picker-min-max-validation
V15 min/max validator for mediapicker
2024-12-13 08:28:27 +01:00
Bjarke BergandGitHub cb88cbba43 Merge pull request #17761 from umbraco/v14/task/media-picker-min-max-validation
V14 min/max validator for mediapicker
2024-12-13 08:28:13 +01:00
Sven Geusens cd25c9a318 Merge branch 'release/15.1.1' into v15/dev
# Conflicts:
#	src/Umbraco.Core/Extensions/PublishedContentExtensions.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2024-12-12 16:36:45 +01:00
Niels LyngsøandGitHub 4f3dd044f6 Merge pull request #17804 from umbraco/v15/hotfix/rte-blocks
V15: RTE blocks do not work in an empty RTE editor
2024-12-12 12:53:48 +01:00
Niels LyngsøandGitHub 2d428cc0fc Hotfix: ensure we export all extension types (#17787)
* export all Extension Manifest Types

* clean up

* lint fix
2024-12-12 12:36:33 +01:00
Bjarke BergandGitHub f95fb78022 Merge pull request #17800 from umbraco/v13/bugfix/corrupt-examine-dashboard
Make sure Examine dashboard still functions when an index is corrupt
2024-12-12 12:07:06 +01:00
Bjarke BergandGitHub 09200198a0 Merge pull request #17794 from umbraco/v15/bugfix/corrupt-examine-index-dashboard
Make sure Examine dashboard still functions when an index is corrupt
2024-12-12 11:54:34 +01:00
Jacob Overgaard 5c54e033cc fix: duplicate logic from block list to accept blocks in an otherwise undefined value field 2024-12-12 11:45:27 +01:00
Sven Geusens f833350218 Fix broken logger in tests 2024-12-12 11:06:43 +01:00
Kenn JacobsenandGitHub c26b45db59 Don't overwrite ancestor configurations for public access (#17797)
* Don't overwrite ancestor configurations for public access (#17709)

* Fix spacings
2024-12-12 10:46:25 +01:00
Sven Geusens 2dbdaa1056 Fix breaking change 2024-12-12 10:03:04 +01:00
Sven Geusens 0f9a8bde61 Broadend the error catching when building the examine dashboard 2024-12-12 09:38:35 +01:00
Sebastiaan Janssen a72ffc8542 Merge branch 'v15/dev' into contrib 2024-12-12 09:37:30 +01:00
Nikolaj GeisleandGitHub 64982a1afd Check if language has changed when updating domains (#17790) 2024-12-12 08:47:35 +01:00
Andreas Zerbst fd08ed3032 Updated last data-marks 2024-12-12 08:29:35 +01:00
Bjarke BergandGitHub 4f6fda796f Merge pull request #17779 from umbraco/v15/hotfix/fix-friendly-content-extension-performance
* Refactor .Children to use PublishStatusQuery

* Fix descendants

* Fix ancestors

* Fix siblings

* Handle empty string in published status service

* Fix unit test

* Fixes issue found in tests

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-12-11 19:18:49 +01:00
Bjarke Berg c22dc2f12e Fixes issue found in tests 2024-12-11 18:40:46 +01:00
Nikolaj Geisle d6f493737a Fix unit test 2024-12-11 17:48:11 +01:00
Niels LyngsøandGitHub 968cb1a981 Hotfix: Browser navigation between Documents (#17783)
use `replaceState` over `pushState`
2024-12-11 16:32:38 +01:00
Niels LyngsøandJacob Overgaard 5f291bab22 no need to redirect when removing tab. router handles this fine 2024-12-11 16:16:14 +01:00
Niels LyngsøandJacob Overgaard eec7b01f1c use push state 2024-12-11 16:14:57 +01:00
Niels LyngsøandGitHub 66c13e5dae Merge pull request #17781 from umbraco/v15/hotfix/tinymce-links
V15: TinyMce triggers navigation when clicking links
2024-12-11 15:59:43 +01:00
Bjarke Berg 721eee27c7 Handle empty string in published status service 2024-12-11 15:50:00 +01:00
Mads RasmussenandGitHub 89061f1486 V15: Chore: Fix msw in client test runner (#17777)
* remove unused

* Update index.ts

* add local files

* use fetch instead of import
2024-12-11 15:46:27 +01:00
Jacob Overgaard ccd365104a fix: trigger only on a-tags inside our own block elements
Tinymce inserts links using the a-tag, which is triggering our navigation because we cannot control tinymce's rendering. We can however control which links we trigger on the for the 'click' event by using `composedPath()` and ensuring that we are inside one of the block entry elements.
2024-12-11 15:42:28 +01:00
Jacob Overgaard 5bf07bda9b chore: formatting 2024-12-11 15:41:22 +01:00
Andreas Zerbst 87e8a305b6 Switched to actions and colon 2024-12-11 15:16:56 +01:00
Zeegaan 0928379aeb Fix siblings 2024-12-11 15:12:09 +01:00
Zeegaan c6a420579e Fix ancestors 2024-12-11 14:56:44 +01:00
5322e382f3 Merge pull request #17774 from umbraco/15.1/hotfix/block-editors-discard-changes-on-startup
* prevent the block list editor from setting an empty value on startup
* prevent block grid from setting and initial empty block object value
* fix import

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2024-12-11 14:53:54 +01:00
Niels LyngsøandGitHub 5cffe11651 Merge branch 'release/15.1' into 15.1/hotfix/block-editors-discard-changes-on-startup 2024-12-11 14:53:22 +01:00
Niels Lyngsø ffd1d471d7 fix import 2024-12-11 14:51:00 +01:00
Sven Geusens 9b562018fb Bump versions 2024-12-11 14:09:38 +01:00
Zeegaan b916490ef3 Fix descendants 2024-12-11 14:04:55 +01:00
Sven Geusens 2f8866a65a Bump client versions 2024-12-11 13:59:12 +01:00
Sven Geusens 6458a552e1 Merge branch 'release/15.1' into v15/dev
# Conflicts:
#	build/azure-pipelines.yml
2024-12-11 13:56:24 +01:00
Sven Geusens 129d369c1a Version bump to release 2024-12-11 13:46:38 +01:00
Sven Geusens dd2c591a5b Merge branch 'release/13.6' into v13/dev 2024-12-11 13:45:35 +01:00
Mads Rasmussen 8ccc394f88 prevent block grid from setting and initial empty block object value 2024-12-11 12:14:33 +01:00
Mads Rasmussen d5144540f7 prevent the block list editor from setting an empty value on startup 2024-12-11 12:09:17 +01:00
Zeegaan 869838db0c Refactor .Children to use PublishStatusQuery 2024-12-11 11:16:11 +01:00
Sven Geusens bb2fe14248 Added a link with more information regarding corrupt indexes 2024-12-11 10:28:12 +01:00
Nhu DinhandGitHub de92f1caac V15 QA Fixing the failing tests in the pipeline (#17718)
* Updated tests for content with media picker

* Fixed tests for content with multi url picker

* Skip tests for update action permission as it is removed now

* Fixed tests for list view media

* Fixed notification

* Updated method name due to api helper changes

* Fixed tests for welcome

* Fixed test for deleting a tab in a document type

* Updated expectation test result due to UI changes

* Updated create stylesheet method

* Fixed tests due to the action for selecting media item changes

* Bumped version

* Fixed expected result

* Fixed due to test helper changes

* Added more waits
2024-12-11 10:44:28 +07:00
Jacob Overgaard 2cfd52a941 build: overwrite existing files to quiet the extractor 2024-12-10 15:31:17 +01:00
Jacob Overgaard 888c96e777 build: change the fetchDepth to version the backoffice package 2024-12-10 15:14:58 +01:00
Sven Geusens 7aa0ff0985 rebuilder bugfix 2024-12-10 13:43:54 +01:00
Sven Geusens 73f7f4c0ba Handle examine corrupt index status 2024-12-10 13:42:39 +01:00
Sven Geusens b867979a5d Return different status for likely corupt indexes 2024-12-10 13:40:57 +01:00
Sebastiaan Janssen f139aae524 Merge branch 'v15/dev' into contrib 2024-12-10 12:42:55 +01:00
dc2dc090f0 V15 QA Added tests for rendering content with member picker, multi url picker and media picker (#17717)
* Added test for rendering content with member picker value

* Added tests for rendering content with multiple media picker

* Added tests for rendering content with multi url picker

* Bumped version

* Updated tests for member picker

* Make all rendering content tests run in the pipeline

* Bumped version

* Fixed indentation

* Added clean for media

* Reverted

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2024-12-10 17:55:27 +07:00
MoleandGitHub 03eb878d30 V15: Fix docker (#17722)
* Bump dotnet version

* Ensure LF line endings for shell scripts
2024-12-10 10:25:50 +01:00
Nhu DinhandGitHub e9758321ce V14 Added Content tests with Approved Color (#16725)
* Added Content tests with Approved Color

* Bumped version of test helper

* Make Content tests run in the pipeline

* Using custom datatype builder instead of changing the default approved color data type

* Updated variables

* Fixed comment

* Make all Content tests run in the pipeline

* Reverted
2024-12-10 14:52:46 +07:00
Nikolaj GeisleandGitHub 82e58eae3e V14: cherry pick #17656 (#17763)
* V15: Fix webhook RTE serialization (#17656)

* Make base type resolver class

* Add new webhook serializer

* fix comment

* Update src/Umbraco.Infrastructure/Serialization/ContentJsonTypeResolverBase.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Update src/Umbraco.Core/Services/WebhookRequestService.cs

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
(cherry picked from commit 6f081785e6)

* Add back missing usings
2024-12-09 16:09:54 +01:00
Sven Geusens de78560343 Fix unit test mocks 2024-12-09 15:08:22 +01:00
Sven Geusens ddeb25395a Fix unit test mocks 2024-12-09 15:08:12 +01:00
Niels Lyngsø 717d3f608f remove duplicate workspace data-mark 2024-12-09 14:51:31 +01:00
Sven Geusens 329e42cf73 v15 implementation of f569553d79 2024-12-09 14:34:57 +01:00
Sven Geusens f569553d79 Added min/max validator for mediapicker3 2024-12-09 14:26:14 +01:00
6f081785e6 V15: Fix webhook RTE serialization (#17656)
* Make base type resolver class

* Add new webhook serializer

* fix comment

* Update src/Umbraco.Infrastructure/Serialization/ContentJsonTypeResolverBase.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Update src/Umbraco.Core/Services/WebhookRequestService.cs

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2024-12-09 14:20:19 +01:00
Niels Lyngsø ef00033a98 rename to workspace-split-view 2024-12-09 14:06:08 +01:00
Niels Lyngsø 412b953d26 remove another todo 2024-12-09 14:05:26 +01:00
Niels Lyngsø 96050d434f remove todo 2024-12-09 14:05:07 +01:00
Niels Lyngsø 71caa214d7 add split-view data-mark 2024-12-09 14:04:23 +01:00
Niels Lyngsø 96e4964122 change to use group name 2024-12-09 14:00:41 +01:00
Kenn JacobsenandNikolaj Geisle 16749a724d Add (un)publishing details to TreeChange notifications (#17757)
(cherry picked from commit 404a62aa0b)
2024-12-09 11:42:53 +01:00
Kenn JacobsenandNikolaj Geisle a627930b58 Warn about un-routable content at publish time (#17705)
(cherry picked from commit 2d9cfc880b)
2024-12-09 11:42:46 +01:00
Niels Lyngsø 2e00b8af90 Merge branch 'v15/dev' into v15/feature/first-round-of-data-marks 2024-12-09 11:40:40 +01:00
Niels Lyngsø c8de9b6084 re-run export test 2024-12-09 11:40:20 +01:00
Niels Lyngsø a54fd0d55f add const 2024-12-09 11:40:14 +01:00
Kenn JacobsenandGitHub 404a62aa0b Add (un)publishing details to TreeChange notifications (#17757) 2024-12-09 11:36:48 +01:00
Kenn JacobsenandGitHub 2d9cfc880b Warn about un-routable content at publish time (#17705) 2024-12-09 11:07:32 +01:00
nikolajlauridsen e757b90ee1 Bump to final 2024-12-09 10:51:08 +01:00
Kenn JacobsenandGitHub ee8bdfc4ac Add "user info" endpoint for the Delivery API (#17719)
* Add "user info" endpoint for the Delivery API

* Add comment about public and unsealed class
2024-12-09 09:57:21 +01:00
nikolajlauridsen ca57e7f516 Set version 2024-12-09 09:15:01 +01:00
Kenn JacobsenandGitHub 49330b458c Support minimal APIs in OpenAPI spec and Swagger UI (#17622) 2024-12-09 06:58:29 +01:00
Niels Lyngsø 3dc9b15afe Add data-marks 2024-12-07 19:45:38 +01:00
Nikolaj Geisleandnikolajlauridsen e368710364 V15: Add custom serializer for hybrid cache (#17727)
* Add custom serializer

* Add migration to rebuild cache

* Rename migration namespace to 15.1

* Also clear media cache

* Remove failed cache items

* Refactor to only use keys for document cache repository

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-12-06 13:22:02 +01:00
1c859e75ca V15: Add custom serializer for hybrid cache (#17727)
* Add custom serializer

* Add migration to rebuild cache

* Rename migration namespace to 15.1

* Also clear media cache

* Remove failed cache items

* Refactor to only use keys for document cache repository

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-12-06 13:20:57 +01:00
Jacob Overgaard ce6d4c34e2 fix: use _logoUrl when rendering the logo 2024-12-06 11:17:07 +01:00
Nikolaj GeisleandGitHub 0617182160 Use init instead of rebuild when refreshing cache (#17739) 2024-12-05 20:56:54 +01:00
88f97261ad Explicit endpoints returning the Login and BackOffice logos and background (#17696)
* Created explicit endpoints returning the login image instead of leaking the configuration. Thereby some hardcoded values have been changed, but the url will now be the same every time.

* Remove magic concatenation for action lookup

* remove unused backoffice asset (login.jpg)

* remove unused umbraco logo assets

* add manifest handlers

* add mock handlers for the `security/back-office/graphics` endpoints to the backoffice

* add mock handlers for the `security/back-office/graphics` endpoints to the login screen

* chore: update msw service worker

* feat: make static assets available for consumption without copying them from the login project

* update consts with new location for static assets

* feat: prefix login assets with `login-`

* remove unused asset `logo.png`

* feat: introduce a `/back-office/graphics/logo` endpoint to serve the logo "mark" used throughout all applications

* feat: use the alternative logo for disabled javascript warning

* feat: use the umbraco logo on the NoNodes.cshtml page

* Do not expose the new readme in the package

* feat: add logo.svg

* feat: add `umb-app-logo` element to display the backoffice logo including server url and appropriate tags

* feat: use the new `umb-app-logo` element relevant places and make sure to add the serverUrl in front of other graphics

* feat: move logic to connectedCallback to prevent error from non-existing element

* revert usage of HideBackOfficeLogo

* feat: add alt text to logos

* feat: add obsolete message and a hint to use BackOfficeLogo insted

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-12-05 12:21:33 +01:00
Jacob Overgaard db7c78b899 chore: import version in server handler 2024-12-05 10:26:49 +01:00
Jacob Overgaard 3367a30914 Merge remote-tracking branch 'origin/release/15.1' into v15/dev 2024-12-05 10:24:49 +01:00
Niels LyngsøandGitHub 7440b9d83d Feat: Content Property Datatset Context Token (#17723)
* introduce UMB_CONTENT_PROPERTY_DATASET_CONTEXT

* Updating List and RTE
2024-12-05 10:17:52 +01:00
Niels LyngsøandGitHub 79ce50bce8 Feature: update tiptap styling (#17728)
* clean-up styling

* fix element names

* fix isEmpty method

* updated text
2024-12-05 10:17:08 +01:00
4c009abc99 V15 RC: Tiptap should only target valid block elements (#17712)
* fix: make sure we only target valid blocks

This is to say we should remove any invalid block elements to clean up the DOM. A block element is considered invalid if it does not have the `data-content-key` attribute.

* build(deps): bump tiptap from 2.10.2 to 2.10.3

this fixes a potential issue with link creations

* revert the 'leaf node specification'

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2024-12-05 09:25:34 +01:00
Niels LyngsøandJacob Overgaard c68a39cad6 make load wait until value is set 2024-12-05 09:02:43 +01:00
f048cfe62d v14: DecimalConverter - add check for integer (#17679)
* Add check for integer

* Fix typo

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-12-04 15:18:12 +01:00
Jacob Overgaard 24e872f0d5 Merge remote-tracking branch 'origin/release/15.1' into v15/dev 2024-12-04 14:00:47 +01:00
Jacob OvergaardandGitHub 34cad5ffef fix: Blocks do not work in the rich text editors (#17711)
* fix: do not add attributes or html elements to custom elements before they are created

Due to the way browsers treat custom elements, they are not allowed to add attributes and/or child elements upon creation. They must wait until the `connectedCallback`. That means any controller that wants to add elements should also wait until the host is connected (`hostConnected`).

* test: add generic tests for rte block elements

* chore: cleanup imports
2024-12-04 12:28:10 +01:00
Nikolaj GeisleandElitsa 9cab0e8bb1 Add content to TreeAccessTemplate (#17694) 2024-12-04 11:08:57 +01:00
Mads RasmussenandGitHub e8d46340ac Hotfix: Don't request urls every time the document name updates (#17710)
* split observables so we don't request url when variantsOptions changes

* clean up events +  debounce requests

* add loading state

* clear lookup before requesting new urls
2024-12-04 11:04:02 +01:00
Mads RasmussenandJacob Overgaard 9f9aaa6f16 do not set icon color if item is active 2024-12-04 11:01:24 +01:00
Niels LyngsøandGitHub 594036c3d9 make blocks auto expose on insert (#17724) 2024-12-04 10:59:47 +01:00
Nikolaj GeisleandGitHub 9ff67a33ed Add content to TreeAccessTemplate (#17694) 2024-12-04 10:57:14 +01:00
Niels LyngsøandGitHub 3caffa2756 Ensure all UMB_ constants is exported (#17683)
* export consts

* remove lexer

* init work on test for all consts to be exported

* temporary solution to working test

* fix test

* fix one consts

* update package-lock

* remove imports

* fix auto generation of test

* correct test

* important mistake correction

* fix workspace

* fix webhooks

* fix users

* UMB_CREATE_USER_CLIENT_CREDENTIAL_MODAL_ALIAS

* fix user group

* fix tree const exports

* tiptap const exports

* fix templates consts export

* tags

* stylesheets

* static files

* settings

* static file system

* section

* search

* scripts

* fix tsc

* relation

* relation-type

* recycle bin

* property type

* picker

* partial views

* tsc corrections

* fix circular

* package

* member

* member type

* move constants to constants file

* member group + documnet type

* media

* media-type

* revert tsconfig change

* log viewer

* language

* imaging

* healt check

* entity actions

* user permissions

* adjust test text

* document

* update consts

* document type etc

* blueprint

* dictionary

* data-type

* current-user

* culture

* content-type

* circular dependency

* block-list

* block-grid

* fix type import

* auto lint fixes

* fix tsc

* update test

* make sure always to call check-const-generation

* fix circular dependencies

* consts for content package
2024-12-04 10:39:06 +01:00
MoleandGitHub 8ea0267ebc Fix integration test output (#17682)
* Change output

* Fix teardown output
2024-12-04 09:57:02 +01:00
Andreas Zerbst 07c236cdc2 Bumped version of testhelpers 2024-12-04 08:44:22 +01:00
Andreas Zerbst ece803a6b3 V15 QA added parallelization for the integration tests (#17713)
* Added parallelization for our integration tests

* Updated yaml

* Moved filter command to variable definition

* Escape quotes

* Updated testFilter

* Added testFilter for SQlite

* Cleaned up filter

* Added comments

(cherry picked from commit 2f2da4854a)
2024-12-04 08:42:45 +01:00
Andreas ZerbstandAndreas Zerbst 3cf90ac6b4 V15 QA add parallelization of e2e tests (#17691)
* Tries parallelizing the E2E tests

* Updated variable

* Updated SqlServer

* Updated playwright config

* Bumped to use 3 shards

* Implemented shards on nightly pipeline

* Fixed indentation

* Added a smokeTest

* Updated test to run

* Added test command

* Update Templates.spec.ts

(cherry picked from commit 303758d1b2)
2024-12-04 08:41:29 +01:00
Andreas ZerbstandAndreas Zerbst e87cd0a1bc V15 QA updated E2E tests to match changes (#17625)
* Updated locators

* Added waits

* Updated clickDeleteButton

* Bumped version

(cherry picked from commit 01a19b8a9f)
2024-12-04 08:41:24 +01:00
Andreas ZerbstandGitHub 2f2da4854a V15 QA added parallelization for the integration tests (#17713)
* Added parallelization for our integration tests

* Updated yaml

* Moved filter command to variable definition

* Escape quotes

* Updated testFilter

* Added testFilter for SQlite

* Cleaned up filter

* Added comments
2024-12-03 17:35:24 +01:00
Bjarke BergandGitHub 2f388b3f91 Fixes https://github.com/umbraco/Umbraco-CMS/issues/17614 (#17687) 2024-12-03 13:50:36 +01:00
MoleandGitHub 380f3f7e87 Clear elements cache instead of refreshing it (#17708) 2024-12-03 13:40:05 +01:00
394bbde4b0 V15 Added acceptance tests for Tiptap data type (#17675)
* Added tests for Tiptap data type

* Removed tests for adding a toolbar item as the drag and drop is not working

* Fixed the variable name

* Added tests for TinyMCE data type

* Added tests for RTE data type

* Updated tests for delete toolbar row in Tiptap

* Updated tests for rich text editor data type

* Updated tests for tiny MCE data type

* Updated tests for content with tiny MCE rich text editor

* Renamed tests as there are 2 types of rich text editor

* Bumped version

* Make all data type tests in the pipeline

* Updated tests for Tiptap and TinyMCE due to api helper changes

* Fixed comments

* Update TinyMCE.spec.ts

Removed line

* Reverted

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2024-12-03 15:58:17 +07:00
Bjarke BergandGitHub b55d484863 Updated NuGet Packages for v13 (#17704)
* Update nuget packages

* Cherry pick fixes from v15

* Fixed: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items

* rollback update in tool
2024-12-03 08:51:23 +01:00
Ronald BarendseandGitHub ed0058a503 Fix PanicException: failed to get child with id= after updating content types (#17702)
* Remove tree node from hierarchy after clearing branch

* Refactor ClearBranchLocked to split clearing child and siblings
2024-12-03 08:00:18 +01:00
Mads RasmussenandGitHub 437fcba4e5 fix: store first rte value (#17699) 2024-12-02 21:23:39 +01:00
Mads RasmussenandGitHub 8141b6b07e Hotfix: unnecessary Discard Changes dialog for RTEs (#17692)
* remove code duplication

* remove unused code

* allow value to be undefined

* dot not build model if we have no markup

* do update the layout value if we don't get any layouts

* reset internals if there are no value

* clear value if tiny mce doesn't have any markup

* clear value if tip tap doesn't have any markup

* add method to check if tip tap element is empty

* use method to check for empty tip tap
2024-12-02 14:48:28 +01:00
Andreas ZerbstandGitHub 303758d1b2 V15 QA add parallelization of e2e tests (#17691)
* Tries parallelizing the E2E tests

* Updated variable

* Updated SqlServer

* Updated playwright config

* Bumped to use 3 shards

* Implemented shards on nightly pipeline

* Fixed indentation

* Added a smokeTest

* Updated test to run

* Added test command

* Update Templates.spec.ts
2024-12-02 14:48:15 +01:00
Andreas ZerbstandGitHub 01a19b8a9f V15 QA updated E2E tests to match changes (#17625)
* Updated locators

* Added waits

* Updated clickDeleteButton

* Bumped version
2024-12-02 12:00:54 +01:00
21e3518a69 Fix copy document with descendants onto self (#17661)
* Filter self out of descedants for self onto self copy

* Optimized code

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-12-01 13:02:47 +01:00
Jacob Overgaard ceafa83cc7 build: update the repository link 2024-11-29 15:36:28 +01:00
Jacob Overgaard 42f62d30df build: use the backoffice template in both build jobs 2024-11-29 14:55:35 +01:00
5b1d72e802 Chore: Enable MSW in web/test-runner + add tests for state manager + isCurrentUser util (#17584)
* add tests for UmbEntityWorkspaceDataManager

* add tests for umbObjectToPropertyValueArray

* remove unused

* split into individual files

* get from window

* fix import

* setup msw

* temp removal of different mock states

* add service worker

* add tests for isCurrentUser util

* Update package.json

* silence more text logs

* fix race condition

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2024-11-29 13:21:00 +01:00
c4b0bdeadf Bugfix: Redirect when server file is renamed (#17663)
* make args protected + type generic

* add rename event

* get new name and unique from modal

* dispatch event when file is renamed

* get unique from entity context

* poc redirect after rename

* move logic to controller

* dont render code editor if content is undefined

* remove unused styling

* set unique after create

* use replace state

* set additionalOptions for rename action

* Update workspace-redirect.controller.ts

* add focus to name input

* add rename redirect controller

* clean up

* split render methods

* Update script-workspace.context.ts

* implement EntityDetailWorkspaceBase for stylesheets

* remove unused

* don't render code editor if there is no content

* add rename redirect controller

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2024-11-29 13:12:31 +01:00
mjpraxisandMichael Latouche d0799b1b9d Change meta tag "apple-mobile-web-app-capable" with "mobile-web-app-capable" 2024-11-29 12:28:05 +01:00
nikolajlauridsen c0cef3493c Bump version 2024-11-29 12:22:13 +01:00
Bjarke Bergandnikolajlauridsen 07d77aa465 Optimize Azure pipeline (#17674)
* Only fetch single commit

* Hopefully fixes Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.

* Do not checkout again

* More test pipeline

* Another attempt

* yet another attempt

* more attempts

* Revert "more attempts"

This reverts commit 5694d97ba6.

* Test without building backoffice and login explicitly

* Fix mem leak in integration tests

* Fixes sqlserver lock test
2024-11-29 12:21:36 +01:00
Bjarke BergandGitHub bce58a5a25 Optimize Azure pipeline (#17674)
* Only fetch single commit

* Hopefully fixes Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.

* Do not checkout again

* More test pipeline

* Another attempt

* yet another attempt

* more attempts

* Revert "more attempts"

This reverts commit 5694d97ba6.

* Test without building backoffice and login explicitly

* Fix mem leak in integration tests

* Fixes sqlserver lock test
2024-11-29 12:20:19 +01:00
nikolajlauridsen 61d5105c61 Bump version 2024-11-29 09:19:55 +01:00
nikolajlauridsen d1d2d73f19 Merge remote-tracking branch 'origin/release/15.1' into v15/dev 2024-11-29 09:19:29 +01:00
Nhu DinhandGitHub 428c91725b V15 QA Added acceptance tests for rendering content with different uploaded files (#17660)
* Added tests for rendering content with upload file

* Bumped version

* Make all tests for rendering content run in the pipeline

* Fixed command

* Reverted
2024-11-29 10:41:10 +07:00
f7d719af06 V15: Utilizing content type filtering for navigation data instead of .OfType<T>() (#17639)
* Implement GetContentTypeAliasForType which will replace the need for .OfType<T>();

* Refactor EnumerateAncestorsOrSelfInternal to be generic and extracting checks

* Add types to implementation referencing the old non-generic method

* Using

* Replace Ancestors.OfType<T> implementation

* Refactor EnumerateDescendantsOrSelfInternal to be generic

* Fixing references by adding IPublishedContent type param

* Cleanup + removing unused method

* Replace Descendants.OfType<T> implementation

* Remove unnecessary enumeration

* Updating Children.OfType<T>() implementation

* Adding correct types

* Fixing SiblingsAndSelf implementation

* Refactor TryYieldSelfOfType

* Remove nested checks

* Add comments and retrieval of content type alias from T in the private helper methods

* Simplify implementation based on review comments

* Add case when you get all root keys without a type

* Refactoring

* Renaming + review comments

* Rewrite SiblingsAndSelf

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-11-28 17:18:18 +01:00
Jacob OvergaardandGitHub b0aed393d6 fix: keep the lead char when editing an existing link (#17667) 2024-11-28 14:04:59 +00:00
Jesper MayntzhusenandJacob Overgaard d5a674271c Update README.txt
Fixed broken link
2024-11-28 14:31:59 +01:00
nikolajlauridsen 3203f64c2d Bump version to test template 2024-11-28 12:26:38 +01:00
nikolajlauridsen 6507497307 Revert "Hardcode version to have a working build"
This reverts commit fba183d816.
2024-11-28 12:25:53 +01:00
nikolajlauridsen afe9604920 Don't pack template.json 2024-11-28 10:12:13 +01:00
Niels Lyngsø 3dbb626cfb Merge branch 'release/15.1' into v15/dev 2024-11-27 19:39:25 +01:00
Niels LyngsøandGitHub 7177a29b5d build(deps): update @umbraco-ui/uui from 1.12.1 to 1.12.2 (#17657)
* update uui

* remove temp fix

* revert mockServiceWorker change

* fix document collection paths
2024-11-27 17:18:44 +01:00
Sven Geusens c29e0e92ed Fix merge issues 2024-11-27 16:20:18 +01:00
Sven Geusens c2f16b7eb0 Merge branch 'v14/dev' into v15/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Core/MonitorLock.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	src/Umbraco.PublishedCache.NuCache/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.PublishedCache.NuCache/SnapDictionary.cs
#	src/Umbraco.Web.Common/Authorization/AuthorizationPolicies.cs
#	src/Umbraco.Web.UI.Client~v14_dev
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/playwright.config.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithCustomDataType.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDocumentTypeProperties/ContentWithAllowAtRoot.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDocumentTypeProperties/ContentWithAllowVaryByCulture.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDocumentTypeProperties/ContentWithAllowedChildNodes.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDocumentTypeProperties/ContentWithAllowedTemplates.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDocumentTypeProperties/ContentWithCollections.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithListViewContent.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/DataTypeFolder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/ListViewMedia.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/Media.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Members/MemberGroups.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/CreatedPackages.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/PackagesPackages.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithApprovedColor.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithCheckboxList.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithContentPicker.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithDatePicker.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithDropdown.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithImageCropper.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithNumeric.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithRadiobox.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithTags.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithTextarea.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithTextstring.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/RenderingContent/RenderingContentWithTrueFalse.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeFolder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/DocumentType/DocumentTypeTemplatesTab.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/MediaType/MediaTypeFolder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/PartialView/PartialViewFolder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Script/Script.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Script/ScriptFolder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/Stylesheet/StylesheetFolder.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/ContentStartNodes.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/MediaStartNodes.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/User/UICulture.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/ContentStartNodes.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/DefaultPermissionsInContent.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/MediaStartNodes.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/Permissions/UserGroup/MemberSection.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/User.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Users/UserGroups.spec.ts
2024-11-27 15:10:20 +01:00
Sven Geusens 28756d449b Rectify v13 in v14 merge 2024-11-27 14:35:22 +01:00
Sven Geusens 38a96db369 Merge branch 'v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Cms.Imaging.ImageSharp/ConfigureImageSharpMiddlewareOptions.cs
#	src/Umbraco.Core/Models/AuditItem.cs
#	src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbtabbedcontent.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/media/umbmedianodeinfo.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js
#	src/Umbraco.Web.UI.Client/src/common/services/mediahelper.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/rte-blockeditor-clipboard.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/user.service.js
#	src/Umbraco.Web.UI.Client/src/less/components/umb-media-grid.less
#	src/Umbraco.Web.UI.Client/src/views/components/media/umbimagepreview/umb-image-preview.html
#	src/Umbraco.Web.UI.Client/src/views/components/media/umbimagepreview/umbimagepreview.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js
#	src/Umbraco.Web.UI.Client/src/views/templates/edit.html
#	src/Umbraco.Web.UI.Client~HEAD
#	src/Umbraco.Web.UI.Login/package-lock.json
#	src/Umbraco.Web.UI.Login/package.json
#	src/Umbraco.Web.UI.Login/src/auth.element.ts
#	src/Umbraco.Web.UI.Login/src/components/pages/login.page.element.ts
#	src/Umbraco.Web.UI.Login/src/index.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Routing/UmbracoRequestPathsTests.cs
2024-11-27 14:04:41 +01:00
nikolajlauridsen fba183d816 Hardcode version to have a working build 2024-11-27 12:43:14 +01:00
Jacob OvergaardandGitHub 44ec0e66d9 V15: Debug missing contexts (#17645)
* fix: wait a frame before calculating events, which allows the debug callback to "fill up" the instances map

* Revert "fix: wait a frame before calculating events, which allows the debug callback to "fill up" the instances map"

This reverts commit a8a2bdbb05.

* fix: assign the inner object (`event.instances`) directly to a state and perform the "massaging" only when it updates

this ensures that any live changes to the inner object are reflected in the UI
2024-11-27 12:22:36 +01:00
Kenn Jacobsen 444c87469c Add ASCII file name conversion (#17580)
(cherry picked from commit 4590739fa5)
(cherry picked from commit 3d1505d4c6)
2024-11-27 09:23:54 +01:00
Kenn Jacobsen 3d1505d4c6 Add ASCII file name conversion (#17580)
(cherry picked from commit 4590739fa5)
2024-11-27 09:14:26 +01:00
Nikolaj GeisleandGitHub 5200181ea2 make system media types clonable (#17641) 2024-11-27 07:33:13 +01:00
Sven Geusens a1ea203281 Merge branch 'v10/dev' into v13/dev
# Conflicts:
#	src/Directory.Packages.props
#	src/Umbraco.Infrastructure/Manifest/ManifestParser.cs
2024-11-26 21:08:22 +01:00
Lee KelleherandGitHub 4f3f2efbdc Adds UFM Link component (#17636)
to support the Multi-URL Picker editor.
2024-11-26 14:45:09 +01:00
Lee KelleherandGitHub bea12b7a50 UFM: ContentName, adds support for Media Picker (#17635) 2024-11-26 14:34:40 +01:00
Elitsa MarinovskaandGitHub 334cb4701f Apply content type filter on self as well (#17581) 2024-11-26 13:14:26 +01:00
nikolajlauridsen 75f1beed9d Fix version number 2024-11-26 12:24:31 +01:00
nikolajlauridsen 475faba5fd Use newer ubuntu image 2024-11-26 12:07:26 +01:00
Kenn JacobsenandGitHub 4590739fa5 Add ASCII file name conversion (#17580) 2024-11-26 11:26:44 +01:00
7c617f2976 Revert #14234 add update error message for DB connection failures (#17612)
* Revert #14234

* Make the boot failure message more descriptive when unable to connect to DB

* Update src/Umbraco.Infrastructure/Runtime/RuntimeState.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Revert changes

* Obsolete InstallMissingDatabase from V16

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2024-11-26 11:06:40 +01:00
Ronald BarendseandGitHub e5e077c426 Remove legacy Umbraco.Web (merged from v8) 2024-11-26 10:01:30 +01:00
Bjarke BergandSven Geusens 2846325a8a Fixes routing issues (#17572)
* Child of second root should also hide root path and backoffice needs to show all domains for each language.

* Fixes routing issues based on findings https://github.com/umbraco/Umbraco-CMS/pull/17572#issuecomment-2486219574

* Revert "Fixes routing issues based on findings https://github.com/umbraco/Umbraco-CMS/pull/17572#issuecomment-2486219574"

This reverts commit ba7fb5cc90.

* Fix urls of descendants of non-first roots do not show the root urlsegment when HideTopLevel is true
2024-11-26 09:59:09 +01:00
Bjarke BergandGitHub 29837fe59d Fixes routing issues (#17572)
* Child of second root should also hide root path and backoffice needs to show all domains for each language.

* Fixes routing issues based on findings https://github.com/umbraco/Umbraco-CMS/pull/17572#issuecomment-2486219574

* Revert "Fixes routing issues based on findings https://github.com/umbraco/Umbraco-CMS/pull/17572#issuecomment-2486219574"

This reverts commit ba7fb5cc90.

* Fix urls of descendants of non-first roots do not show the root urlsegment when HideTopLevel is true
2024-11-26 09:55:51 +01:00
nikolajlauridsen 37be8120ea Merge remote-tracking branch 'origin/release/15.1' into release/15.1 2024-11-26 09:10:14 +01:00
Jacob Overgaardandnikolajlauridsen 72596bd853 fix: should check specifically for if pathname is undefined or empty 2024-11-26 09:09:48 +01:00
Jacob OvergaardandMads Rasmussen 1b3782f2b0 fix: should check specifically for if pathname is undefined or empty 2024-11-26 09:09:47 +01:00
Jacob Overgaard 134ec77da0 fix: should check specifically for if pathname is undefined or empty 2024-11-26 09:08:22 +01:00
Mads Rasmussen b6551d63b7 fix merge error 2024-11-26 08:38:21 +01:00
Mads Rasmussen e42fa14da5 generate management api types 2024-11-26 08:38:10 +01:00
Bjarke BergandGitHub 87ab29aa39 Updated nuget packages (#17632) 2024-11-25 18:23:08 +01:00
16a5f8d138 Media Picker: only allow navigating to folders/media with children + other fixes (#17617)
* only allow navigating into folders or item with children

* export media search provider

* mark search on media item repo as deprecated

* use media search provider for searching

* rename method

* change the look of the upload button

* only render checkbox if we are not in the root

* clear search when navigating

* add type

* set value so it gets updated when cleared

* default to search within an item

* hide breadcrumb if searching in root

* scope search on server

* Update media-picker-modal.element.ts

* hide breadcrumb when doing a global search within another item

* add selection mode

* remove unused state

* handle start node when searching

* fix if wrong order

* fix type error

* pass start node to breadcrumb

* handle start node in breadcrumb

* make start node optional

* map data

* clean up

* Update media-picker-folder-path.element.ts

* add searching load indicator

* don't show unique in detail

* Add information to item response model

* Update OpenApi.json

* generate new server models

* update mocks

* move interface to types

* add hasChildren and parent to media item model interface

* fix import

* map data

* map media item

* treat tree item and search result the same

* Fix: bump uui version (#17626)

* lint fix

* temp fix for media selection

* UX corrections for media selection

* temp uui fix for media picker modal

* fix table selection mode

* fix search from when having a start node

* remove private

* wait for all missing parts before create table items

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2024-11-25 18:16:19 +01:00
Jacob OvergaardandGitHub 5856fd9612 V15: npm updates 2024-11-15 (#17545)
* build(deps): bump storybook from 8.3.5 to 8.4.4

* reenable public folder (with msw file) for storybook

* build(deps-dev): bump vite from 5.4.6 to 5.4.11

* build(deps-dev): bump babel and rollup

* build(deps-dev): bump typedoc from 0.26.5 to 0.26.11

* build(deps-dev): bump @hey-api/openapi-ts from 0.52.11 to 0.55.3

regenerated all models and migrated the config

* build(deps-dev): bump eslint from 9.7.0 to 9.14.0 including related deps

* build(deps-dev): bump all @types packages

* build(deps-dev): bump lucide to 0.459.0 and simple-icons to 13.16.0

regenerate icons:

- renamed `box-select` to `square-dashed`

* build(deps): bump marked from 14.1.0 to 15.0.0

* build(deps): bump monaco-editor from 0.50.0 to 0.52.0

* build(deps): bump dumpurify from 3.1.6 to 3.2.0

* build(deps): make changes based on the dompurify upgrade where types are now an inherent part of the package

* build(deps): bump diff from 5.2.0 to 7.0.0

* build(deps): bump element-internals-polyfill from 1.3.11 to 1.3.12

* build(deps): bump lit from 3.2.0 to 3.2.1

* build(deps-dev): bump globals from 15.8.0 to 15.12.0 (eslint dependency)

* build(deps-dev): bump storybook dependencies

* build(deps-dev): bump @web/dev-server deps

* build(deps-dev): bump typescript from 5.5.3 to 5.6.3

* build(deps): bump uuid from 10.0.0 to 11.0.3 thereby eliminating the @types/uuid module

* build(deps): bump tinymce-i18n from 24.7.15 to 24.11.11

* build(deps): bump all deps to latest and use backoffice global types for extension manifests

* chore: change import path

* build(deps-dev): bump rollup/plugin-commonjs to 26.0.3 for compatibility reasons

* feat: replace outdated 'webworker-loader' with manual paths to monaco's web workers since they are esmodules anyway

* build(deps-dev): bump storybook from 8.4.4 to 8.4.5

* build(deps): bump tiptap from 2.9.1 to 2.10.2

* build(deps): bump dompurify from 3.2.0 to 3.2.1

* build(deps): bump tinymce-i18n from 24.11.11 to 24.11.25

* build(deps): bump static icons

* build(deps): bump marked from 15.0.0 to 15.0.2

* build(deps-dev): bump eslint + deps

* build(deps-dev): bump vite + rollup dependencies

* build(deps-dev): bump @playwright/test from 1.48.2 to 1.49.0

* build(deps-dev): bump @hey-api/openapi-ts from 0.55.3 to 0.57.1

generated new services

* build(deps-dev): bump @types/mocha

* build(deps): bump typescript from 5.6.3 to 5.7.2
2024-11-25 16:47:13 +00:00
Jacob OvergaardandGitHub 2383fbcd70 V15: Show a loader during the login procedures rather than oddly styled content (#17618)
* feat: show only a loader on a default login flow

if the flow fails, the app-error component will be shown, or if the flow is initialised inside a popup (i.e. the session was lost)

* fix: hasOwnOpener did not recognize the local vite url as its own pathname

it should work better by checking the `startsWith` comparing the pathname, and besides, it seems to work better for the understanding of the function to inverse the true/false check

* chore: adjust imports

* chore: formatting
2024-11-25 16:32:02 +00:00
Lee KelleherandGitHub 9141f61708 V13: Dropzone, upload complete callback with processed file array (#17631)
* Dropzone, upload complete callback with processed file array

* Media card: cosmetic fix for image border-radius

The image's square corners were poking out.
2024-11-25 15:51:16 +01:00
ba4120050f Add cache key to GetByUserName (#17350)
* Add cache key to GetByUserName

* Remove constants

* create new cache policy for member repository

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-11-25 15:27:22 +01:00
9c76f5cb37 Handle "expose" for variant elements with all invariant properties (#17621)
Co-authored-by: Elitsa <elm@umbraco.dk>
2024-11-25 15:14:45 +01:00
Nikolaj Geisle 772c523a23 Validate email for member models (#17532)
* Validate email for member models

* Add null check or more test cases

* return invalid when not a valid email

* Cleanup

* remove private method in favor of extension

* Remove non used, using statement

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
(cherry picked from commit 6b0f8e7b7c)
2024-11-25 13:56:45 +01:00
6b0f8e7b7c Validate email for member models (#17532)
* Validate email for member models

* Add null check or more test cases

* return invalid when not a valid email

* Cleanup

* remove private method in favor of extension

* Remove non used, using statement

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-11-25 13:55:40 +01:00
MoleandGitHub 7162efc865 V15: Add information to item endpoints (#17623)
* Add information to item response model

* Update OpenApi.json
2024-11-25 13:32:01 +01:00
Mads RasmussenandGitHub ef470ed757 Fix: bump uui version (#17626) 2024-11-25 13:17:43 +01:00
Elitsa MarinovskaandGitHub 4a19d899dd V15: Update navigation references in Partial Views (#17613)
* Inject and pass-in parameters to use the respective PublishedContentExtensions methods

* Fix view comments

* Other fixes
2024-11-25 10:30:43 +01:00
Jacob Overgaard 75ba6b7492 Merge remote-tracking branch 'origin/contrib' into v15/dev 2024-11-24 22:02:41 +01:00
Kenn JacobsenandGitHub cbd4dc6e0d Handle "all slashes" routes (#17596) 2024-11-22 09:06:10 +01:00
3d3b5d53d6 Update terminology in ListView acceptance tests. (#17265)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-11-21 16:30:59 +01:00
c7014e159b Sort manifest file paths alphabetically (#14466)
* Sort manifest file paths alphabetically

* Update src/Umbraco.Infrastructure/Manifest/ManifestParser.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2024-11-21 16:19:48 +01:00
leekelleherandJacob Overgaard e2d4f3e0de Passes entityType to bulk actions 2024-11-21 16:18:16 +01:00
44384c0613 Aligning Settings welcome dashboard headlines (#17609)
* use box headline for headlines

* Settings welcome dashboard amends

`rel=noopener` is automatically implemented
by the browser for `target=_blank` links.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-11-21 14:34:48 +00:00
Lee KelleherandGitHub f899be9640 V15: Collection Bulk Action Permissions conditions (#17593)
* Deprecated TypeScript exports

* Removed the Bulk Action Permission condition

* Removed the "bulkActionPermissions" configuration

It's now based on manifest/extension conditions.

* Added user permission checks for documents

(media do not yet have entity permissions)

* Added console warning for 'bulk-action-permissions' editor
2024-11-21 13:37:38 +01:00
b402c1ffe3 Fixed issue where old images was not deleted when removed from the upload property editor, when it did not send null value. (#17587)
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2024-11-21 12:54:38 +01:00
PhyxionNLandGitHub 5518c709aa Fixes TipTap toolbar wrapping 2024-11-21 11:32:26 +00:00
390dde0492 Feature: Make discard changes work for modals (#17515)
* make sure to close the modal when submit was completed

* rename to _closeModal

* remove comments

* correction route registration

* implement general collection workspace path builder

* fix lint errors

* change item to entity

* remove unsued

* add entityType param

* use correct entity type

* change section view into dashboard

* router context holding paths as observables

* adapt modal context logic to become cancellable

* fix router-slot

* remove temp fix

* close none routable modals when navigating routable modal

* update uui

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-11-21 10:52:12 +01:00
Sven Geusensandnikolajlauridsen 9febbc7db1 Distinguish between default zero and intentional zero sort order for new documents (#17517)
* Distinguish between default value and initial zero

* Update special value comment documentation

* Redid solution with dirty/new entity tracking

* rework copy branch sortorder fix

* Change == false to is false

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2024-11-21 09:09:25 +01:00
6971ded138 Distinguish between default zero and intentional zero sort order for new documents (#17517)
* Distinguish between default value and initial zero

* Update special value comment documentation

* Redid solution with dirty/new entity tracking

* rework copy branch sortorder fix

* Change == false to is false

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2024-11-21 09:07:22 +01:00
Kenn JacobsenandGitHub ec8e10f406 Fix RTE console error when blocks are not available (#17582) 2024-11-21 08:53:59 +01:00
Lee KelleherandGitHub 918448f419 V15: Collection: Adds "Name" to Order By options (#17600)
* Adds "Name" option to the Collection Order By configuration

* Localizes column headers
2024-11-21 08:45:51 +01:00
c363b785da Renaming of policy (#17594)
* Add access to datatypes if you have access to member section

* Rename policy

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-11-20 19:02:30 +01:00
85f1f81390 Change icons of media types (#16290)
* Change icons of media types

* feat: install icons `audio-lines` and `origami` from lucide

* feat: update the default icon for audio to `icon-audio-lines` and the default icon for vector graphics to `icon-origami`

* chore: add more mocked media types

* chore: add missing endpoint for media-type ancestors

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-11-20 15:46:49 +01:00
Niels LyngsøandGitHub 40cc8e1c84 update uui (#17595) 2024-11-20 15:25:30 +01:00
leekelleherandJacob Overgaard f4618d7d2b Sets Tiptap's default configuration 2024-11-20 13:35:36 +01:00
30430d7c26 Add access to datatypes if you have access to member section (#17569)
Co-authored-by: Elitsa <elm@umbraco.dk>
2024-11-20 13:09:55 +01:00
Andreas ZerbstandGitHub 13c351897f V15 QA cherrypicked playwright config changes (#17563)
* V14 QA updated playwright config (#17544)

* Only run windows SQL Server

* Updated timeout and retry count

* Updated condition

* Fixed indentation

* Skipped

(cherry picked from commit 33eb4dd5a4)

* Update playwright.config.ts
2024-11-20 12:19:46 +01:00
8f56b23335 Feature: expose button for block custom views (#17577)
* make a expose button overlay not exposed block with a custom view

* fix merge gone wrong

* Update block-list-entry.element.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-11-20 11:44:40 +01:00
61192ba3a0 Fix: 17533 (#17579)
* fix styling of placeholder on list

* make sure to only setup items that uses the same Sorter Controller identifier

* make sure identifier is unique for each variant

* correct comments

* style grid block

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-11-20 11:25:21 +01:00
01d66875b2 Fix: 17274 (#17578)
* remove log

* styling of inline editing expose button

* mock data for blocks

* fix settings values

* fix setting config

* remove console logs

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-11-20 11:07:30 +01:00
Niels Lyngsø 3ee43e2f1d only skip validation for documents 2024-11-20 10:53:56 +01:00
Niels Lyngsø 4cc3a654f9 media validation repository 2024-11-20 10:53:37 +01:00
EalseandJacob Overgaard 3233b24a4e fix: infinite editor stuck in create action (#15945) 2024-11-20 10:00:50 +01:00
Anders BjernerandJacob Overgaard 5775e9cb18 Added fix for <umb-button-group /> label issues 2024-11-20 09:59:27 +01:00
Niels LyngsøandGitHub 69e8a61cdd order props so they fit what came in (#17585) 2024-11-20 09:16:17 +01:00
Bjarke BergandGitHub b7713f9386 Partly revert of https://github.com/umbraco/Umbraco-CMS/pull/17539 due to cross platform issues (#17583) 2024-11-20 08:53:34 +01:00
MoleandGitHub 570005f5e1 Run both cms and package migrations in upgrader (#17575)
* Run both cms and package migrations in upgrader

* Use correct setting
2024-11-20 08:38:33 +01:00
Andreas ZerbstandGitHub e398e2807f V15 QA cherrypicked tests from v14 (#17540)
* Cherrypicked tests from 14

* Removed property

* Updates

* Updated tests

* Skip test

* Bumped version

* Bumped version

* Added smoke tag to tests
2024-11-20 08:12:44 +01:00
Jacob Overgaard 6a7a15d534 latest mockServiceWorker.js generated 2024-11-19 13:51:28 +01:00
07b7c26fd9 Feature: Build static assets conditionally for Backoffice and Login (#17527)
* feat: conditionally install and build the 'login' and 'backoffice' targets depending on source files

* feat: remove the preconditions target, because we are now compiling a file list to check if we need to build

* feat: remove the 'clean' targets, because the project will be cleaned if any of the compiled file lists do not exist

* feat: remove the preserve.* files as they are no longer needed

* Enable default content items again

* Remove package.json from restore target inputs

* Include generated files as static assets after build

* Clean up project files

* Exclude CS0618 warning as error and fix CA2264

* Exclude CS0612 warning as error

* Suppress removal of test fixture

* Use separate property/item groups for backoffice and login project

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2024-11-19 13:29:39 +01:00
1e9182cfa4 V14: Use decimal in slider property editor (#17568)
* Allow SliderPropertyEditor to use decimals

* Add tests

* Boyscout unittest update

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-11-19 11:14:53 +01:00
Niels LyngsøandGitHub 0f86cad8fa re-introduce service worker (#17574) 2024-11-19 09:51:49 +01:00
Mads RasmussenandGitHub 5718616bf3 Bugfix: Scoped Content Picker Search (#17481)
* add searchFrom to request args type

* add search from to picker search manager config

* pass startNode to config

* get default setting from config

* pass to server

* remove unused import
2024-11-19 09:18:53 +01:00
310ccdc011 Fix: Add "Not Found" empty state to detail workspaces (#17489)
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2024-11-19 09:14:41 +01:00
kasparboelkjeldsenandBjarke Berg 7cc8f844f7 Support for SMTP OAuth authentication through easier IEmailSenderClient implementation (#17484)
* Implement IEmailSenderClient interface and implementation

In an effort to support oauth 2 and other schemes, we extract a emailsenderclient interface, allowing to replace default smtp client with one that fits the usecase, without having to implement all of Umbracos logic that builds the mimemessage

* fix test

* Documentation

* EmailMessageExtensions public, use EmailMessage in interface and impl.

* move mimemessage into implementation

* revert EmailMessageExtensions back to internal

* use StaticServiceProvider to avoid breaking change

* Fix test after changing constructor

* revert constructor change and add new constructor an obsoletes

* Moved a paranthesis so it will build in release-mode

(cherry picked from commit bff321e6f5)
2024-11-19 08:49:35 +01:00
kasparboelkjeldsenandGitHub bff321e6f5 Support for SMTP OAuth authentication through easier IEmailSenderClient implementation (#17484)
* Implement IEmailSenderClient interface and implementation

In an effort to support oauth 2 and other schemes, we extract a emailsenderclient interface, allowing to replace default smtp client with one that fits the usecase, without having to implement all of Umbracos logic that builds the mimemessage

* fix test

* Documentation

* EmailMessageExtensions public, use EmailMessage in interface and impl.

* move mimemessage into implementation

* revert EmailMessageExtensions back to internal

* use StaticServiceProvider to avoid breaking change

* Fix test after changing constructor

* revert constructor change and add new constructor an obsoletes

* Moved a paranthesis so it will build in release-mode
2024-11-19 08:48:20 +01:00
Bjarne FyrstenborgandLaura Neto fbaa3440f2 Don't shrink crops container on right side 2024-11-18 20:11:48 +01:00
2d69eb66ef Feature: Content Type Workspace Context Base (#17542)
* Create content-type-workspace-context-base.ts

* make detail model with entityType

* allow repository alias

* export base class

* fix type check

* add method to get unpersisted changes

* remove duplicate code

* remove duplicate code

* remove duplicate code

* wip porting code to the base class

* improve extendability

* clean up

* clean up

* move logic to base

* allow to preset the scaffold

* pass preset

* add public tag

* clean up

* simplify the number of places we store the entity type

* add js docs

* rename private method to clear

* remove debugger

* use flag instead of a data state

* set persisted data after create + update

* Update entity-detail-workspace-base.ts

* add js docs

* add protected tag

* call super

* make linter happy

* add comment

* type casting

* no need create observables for unique and entityType it is already handled

* add null check

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-11-18 15:03:15 +01:00
Bjarne FyrstenborgandJacob Overgaard e662468ecc Set TinyMCE to readonly 2024-11-18 08:51:04 +01:00
Andreas ZerbstandGitHub 33eb4dd5a4 V14 QA updated playwright config (#17544)
* Only run windows SQL Server

* Updated timeout and retry count

* Updated condition

* Fixed indentation

* Skipped
2024-11-18 08:30:50 +01:00
Nhu DinhandGitHub 66569f7fa8 V15 QA Fixed TODO tests (#17488)
* Fixed todo of content tests with image cropper

* Fixed TODO in partial view tests

* Fixed waits

* Fixed TODO in Media type design tab tests

* Fixed TODO tests for document type template tab

* Fixed TODO tests for document type setting tab

* Cleaned up

* Fixed Todo tests for document type design tab

* Removed skip tests

* Added comment

* Fixed flaky member group tests

* Removed skip tests

* Cleaned up

* Fixed TODO tests for media

* Fixed TODO tests for dictionary

* Fixed TODO tests for Content info tab

* Fixed TODO tests

* Bumped version

* Cleaned up

* Updated tests due to UI changes

* Fixed failing tests

* Bumped version

* Fixed failing tests for Content Picker, Block setting due to UI changes

* Bumped version
2024-11-18 05:59:11 +00:00
Bjarne FyrstenborgandMatthew-Wise c8efc30654 Fallback value when setttings element type doesn't exists as it can have reference, but no available element type 2024-11-17 17:05:28 +00:00
c846633ff9 Fixes to templates: Do not allow deletion of masters and ensure file names are pascal case (#17539)
* Make template file names start with capical character

* https://github.com/umbraco/Umbraco-CMS/issues/16443

Also ensure master templates cannot be deleted

* Fix test

* Do not check breaking changes in integration tests

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-11-16 20:30:43 +01:00
Jacob Overgaard a8705bef78 chore: restore test setup from backoffice repo 2024-11-15 13:12:32 +01:00
Jacob Overgaard a315aa9603 chore: remove unused import 2024-11-15 13:03:39 +01:00
Bjarke BergandGitHub ba8092fac7 Fixes https://github.com/umbraco/Umbraco-CMS/issues/17506 (#17536)
Now the validation of ClientId has a max of 255 characters
2024-11-15 09:40:26 +01:00
Niels LyngsøandGitHub 5c8d460224 Feature: Block workspace modal size from block type (#17501)
* correct ctrl alias

* move types

* undefined as an overlay size option

* make modal size an observable

* change set size order

* remove log
2024-11-15 08:36:47 +01:00
Bjarke Berg 29bab94d4d Enable package validation 2024-11-14 19:49:34 +01:00
Bjarke Berg d7b98a2f00 Use catch all for urls what ends with a path (#17468)
(cherry picked from commit 3c0f7a03ba)
2024-11-14 12:29:40 +01:00
Sebastiaan Janssen 021c178257 Merge branch 'contrib' into v15/dev 2024-11-14 11:34:37 +01:00
Sebastiaan Janssen 9056851eed Revert "Making Culture Invariant When Validating Date to negate deferent formats (#17257)"
This reverts commit dabaeac262.

# Conflicts:
#	src/Umbraco.Core/PropertyEditors/Validators/DateTimeValidator.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/Validators/DateTimeValidatorTests.cs
2024-11-14 11:29:50 +01:00
Zeegaan b8b96f05d1 Merge branch 'release/15.0' into v15/dev
# Conflicts:
#	Directory.Build.props
#	version.json
2024-11-14 09:03:28 +01:00
Jacob Overgaard b4609e0388 docs: improve BUILD.md with new backoffice info 2024-11-13 16:37:56 +01:00
Jacob Overgaard 6b85584c02 fix vscode build tasks 2024-11-13 16:37:46 +01:00
Niels LyngsøandGitHub 16d825a502 Feature: close content detail workspace when complete (#17498)
* make sure to close the modal when submit was completed

* rename to _closeModal

* remove comments
2024-11-13 14:58:47 +01:00
Mads RasmussenandGitHub e328249d31 Cleanup: remove unused alias (#17487)
* remove unused alias

* remove unused imports
2024-11-13 13:23:41 +00:00
Bjarke BergandGitHub a342734117 Fix issue with when the last template was removed the template reference-object was not returned as null (#17516) 2024-11-13 13:13:40 +00:00
Sven Geusensandnikolajlauridsen 9edd21a3b0 Made some membertype endpoints available for member related actions (#17440)
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-11-13 13:47:37 +01:00
Jacob Overgaard ba684a8e55 ignore vite cache folder 2024-11-12 15:44:56 +01:00
Bjarke Berg 3cbf7fb32f Fixed warnings-as-errors issues 2024-11-12 13:55:23 +01:00
leekelleherandJacob Overgaard 5963945fc2 Updated OpenApi.json and TypeScript client 2024-11-12 12:56:27 +01:00
Sebastiaan Janssen 7b51a0bb64 Merge branch 'contrib' into v15/dev 2024-11-12 12:36:29 +01:00
Sebastiaan Janssen b00c84a36a Revert "sort the children of a parent content after either deleting or moving its child content (#17315)"
This reverts commit 6705de0329.
2024-11-12 12:23:53 +01:00
Bjarke Berg c9fa2a57d7 Merge branch 'release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
#	src/Umbraco.Core/Extensions/PublishedContentExtensions.cs
#	src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/ContentNavigationServiceBaseTests.cs
2024-11-12 12:14:50 +01:00
Sebastiaan Janssen 178c5dcb83 Merge branch 'v15/dev' into contrib 2024-11-12 10:19:03 +01:00
leekelleherandJacob Overgaard f9162293d7 Fixes Document Workspace Info Link error
Ensures that `_unique` has value. This was previously throwing
an error, but given how `observeMultiple` works, it is expected that
`_unique` may be `undefined` when navigating away from the Info view.
2024-11-12 09:17:52 +01:00
Sebastiaan Janssen 0c668ee3f4 Don't track generated file for both the Web.UI.Client and Web.UI.Login projects 2024-11-11 13:15:31 +01:00
Sebastiaan Janssen 61724b99c4 Don't change the license 2024-11-11 13:02:33 +01:00
Sebastiaan Janssen 704cbab321 Don't track generated file 2024-11-11 13:00:20 +01:00
Andreas ZerbstandGitHub 7010ff1d26 V14 QA added rich text editor with stylesheet test (#17449)
* Rte tests

* Cleaned up

* Bumped version

* Added ensure not exists
2024-11-11 10:47:41 +01:00
Niels LyngsøandGitHub 5f1cb0e70d Feature: minor UI updates (#17475)
* use auto-heigth and auto-width

* adjust sidebar menu h3
2024-11-11 10:23:02 +01:00
Andreas ZerbstandGitHub 6acdf21eab V14 QA user groups permissions tests (#17429)
* Added tests for userGroup

* Clean up

* Updated userGroup tests

* Updated tests

* Updated tests

* Cleane up

* Cleaned up

* Bumped versions

* Run user tests

* Cleaned up

* Added permission tests

* Added tests, not done

* Updated tests

* Fixed tests

* Cleaned up

* Bumped version

* More cleanup

* Run user tests

* Added wait

* Added tests and cleaned up naming

* Bumped versions

* Reverted smokeTest command
2024-11-11 09:45:22 +01:00
Andreas ZerbstandGitHub a5479bc96e V14 QA members section user tests (#17448)
* Added tests for the members

* Cleaned up tests

* Bumped version

* Removed skip
2024-11-11 09:43:57 +01:00
1d936d240d Made some membertype endpoints available for member related actions (#17440)
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-11-11 09:02:56 +01:00
Jacob OvergaardandGitHub 1757dd0ada Run CodeQL without building the solution (#17473)
* run codeql without building the solution

* restore dotnet

* Revert "restore dotnet"

This reverts commit 3e22bc1a76.

* Revert "run codeql without building the solution"

This reverts commit 9ceaea7781.

* use global.json for codeql

* do not build solution
2024-11-09 16:07:40 +01:00
Jacob Overgaard 6bf3c5078d codeql: test against main branch 2024-11-09 15:32:39 +01:00
marwaldvandJacob Overgaard 79d117026f Add swiss languages as backoffice languages
Add missing backoffice languages as properties etc. are translated via translation section (e.g. with "#Backoffice Settings"). At the moment the swiss languages always need to be added via the umbraco/Config folder.
2024-11-09 12:29:44 +01:00
Jacob Overgaard 6981c7d0c1 upload .gitignore 2024-11-09 12:25:14 +01:00
Jacob Overgaard 2c8f1ce6b7 remove tests that are already included in azure-pipelines 2024-11-09 12:17:18 +01:00
Jacob Overgaard 0642e4d4bf set default working-directory 2024-11-09 11:29:05 +01:00
Jacob Overgaard bd66e2bc0d Merge remote-tracking branch 'origin/contrib' into v15/dev 2024-11-09 11:25:23 +01:00
dependabot[bot]andJacob Overgaard c8c0753a75 Bump @umbraco-cms/backoffice in /src/Umbraco.Web.UI.Login
Bumps [@umbraco-cms/backoffice](https://github.com/umbraco/Umbraco.CMS.Backoffice) from 14.2.0 to 14.3.1.
- [Release notes](https://github.com/umbraco/Umbraco.CMS.Backoffice/releases)
- [Commits](https://github.com/umbraco/Umbraco.CMS.Backoffice/commits)

---
updated-dependencies:
- dependency-name: "@umbraco-cms/backoffice"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-09 11:25:12 +01:00
Jacob Overgaard 5860651532 Merge remote-tracking branch 'origin/contrib' into v15/dev 2024-11-09 11:23:45 +01:00
Jacob Overgaard 05bada148c chore: lint errors 2024-11-09 11:21:52 +01:00
Jacob Overgaard f1c46b0fef update generated file 2024-11-09 11:16:35 +01:00
Jacob Overgaard 77a6e3a277 update package lockfile 2024-11-09 11:16:27 +01:00
Jacob Overgaard 165e3a4629 fix: add required 'override' modifier 2024-11-09 11:16:13 +01:00
Jacob Overgaard 0fd4ef50f1 rename to avoid clash with keyword 'source' 2024-11-09 11:16:01 +01:00
Jacob Overgaard ac1a9d86bb fetch all history to make NBGV happy 2024-11-09 11:03:18 +01:00
Jacob Overgaard 0e562a1d02 move linting and testing of the backoffice into its own workflow as those jobs are too inefficient on azure pipelines 2024-11-09 11:01:41 +01:00
Jacob Overgaard cba55adb43 merge codeql analysis 2024-11-09 10:54:17 +01:00
Jacob Overgaard 4dfa44ef21 update backoffice README 2024-11-09 10:47:25 +01:00
Jacob Overgaard 86b34bb62e merge LICENSE files 2024-11-09 10:40:02 +01:00
Jacob Overgaard 3513dcc6d6 remove .sonarlint folder 2024-11-09 10:29:21 +01:00
Jacob Overgaard 9016731838 merge github build action with azure pipelines 2024-11-09 10:28:23 +01:00
Jacob Overgaard a84bc773d4 removed old workflows 2024-11-09 10:21:09 +01:00
Jacob Overgaard 4de8e2c1e5 merge codeql setup 2024-11-09 10:21:00 +01:00
Jacob Overgaard 6928037412 remove old github files 2024-11-09 10:10:22 +01:00
Jacob Overgaard 4322a7d673 move RELEASE_INSTRUCTION.md 2024-11-09 10:10:17 +01:00
Jacob Overgaard 5fbf08f2fb merge release.yml 2024-11-09 10:10:02 +01:00
Jacob Overgaard fe86243907 convert backoffice contribution guidelines 2024-11-09 10:05:23 +01:00
Jacob Overgaard d18f15793b remove old issue templates 2024-11-09 10:05:14 +01:00
Jacob Overgaard e51c3dfd70 Merge submodule contents for src/Umbraco.Web.UI.Client/main 2024-11-09 09:55:57 +01:00
Jacob Overgaard 6004cbb70c Remove submodule src/Umbraco.Web.UI.Client 2024-11-09 09:55:30 +01:00
Jacob Overgaard 4e2f7b93da Update backoffice submodule 2024-11-09 09:52:05 +01:00
Niels LyngsøandGitHub 940342766f Merge pull request #2529 from umbraco/v15/chore/rename-tiptap-extension-files
Chore: rename tiptap extension files
2024-11-08 14:26:25 +01:00
Niels Lyngsø 2d4f5b6d9c rename files 2024-11-08 14:18:10 +01:00
Casper LundgreenandGitHub 2709054bdb Fix NameIdentifier is not an integer. (TryParse implemented) (#17414)
Issue: 17383
2024-11-08 13:27:53 +01:00
Niels LyngsøandGitHub d17495d561 Merge pull request #2528 from umbraco/v15/feature/media-image-component
Feature: initial work on media image component
2024-11-08 12:38:06 +01:00
Sven Geusensandnikolajlauridsen 0acdd26850 Made some stylesheet endpoints available for document/media/member related actions (#17442) 2024-11-08 12:19:10 +01:00
Sven GeusensandGitHub 868beea0dd Made some stylesheet endpoints available for document/media/member related actions (#17442) 2024-11-08 12:18:13 +01:00
Niels Lyngsø 1f6484c500 initial work on media image component 2024-11-08 11:56:07 +01:00
Niels LyngsøandGitHub f6c8867df0 Merge pull request #2527 from umbraco/v15/feature/block-area-component
V15/feature/block area component
2024-11-08 11:01:33 +01:00
Niels LyngsøandGitHub 69bcf846ff Merge pull request #2525 from umbraco/v15/feature/block-grid-create-button
Feature: Block Grid — make area create button hide on drag
2024-11-08 10:59:18 +01:00
Mads RasmussenandGitHub e33500c214 Merge pull request #2526 from umbraco/v15/feature/make-extension-slot-destroy-on-disconnect
Remove attached on destroy
2024-11-08 10:58:49 +01:00
Niels Lyngsø 7cfdb23527 clean jsdocs 2024-11-08 10:36:51 +01:00
Niels Lyngsø 1fa21e1668 block area component 2024-11-08 10:35:33 +01:00
MoleandGitHub 2d4230c001 Include create date in audit item (#17447) 2024-11-08 08:58:38 +01:00
Niels Lyngsø 7856c481d8 remove attached on destroy 2024-11-08 08:58:25 +01:00
Lee KelleherandGitHub 327b5d3ea1 Bugfix: Tiptap Link Picker, fixes anchor with an empty URL (#2522)
Tiptap Link Picker, fixes anchor with an empty URL

it was previous appending the anchor to a  stringified `null`.
2024-11-08 08:54:20 +01:00
Niels Lyngsø 979b0ba11a append part attributes 2024-11-08 08:20:55 +01:00
Niels Lyngsø c43ef54121 make area create button hide on drag 2024-11-08 07:57:07 +01:00
2f4b198ad3 [V15] Updated dotnet template for Umbraco Packages with Bellisima (#17108)
* [WIP] Create Umbraco/Bellissima Package

* Removes existing 'UmbracoPackage'

This is because the RCL based one will be the only one going forward

* Rename existing UmbracoPackageRCL to UmbracoPackage

* Drop the mentions of RCL in the identifiers

* CodeQL GitHub Action is complaining due to V15 wanting v9 .NET

* Rename UmbracoPackage template to UmbracoExtension

As this will only scaffold an extension and not other bits for a package such as Nuget, Github Actions & other things needed to be done to ship out a package

* Remove package lock as npm install by the OS should generate this and can differ between Windows, Linux/OSX

* Move JS clientside stuff into a folder called Client

Will allow us to ignore the folder if or when doing a dotnet pack with a rule in CSProj

* Add in .VSCode recommened extensions file to get the useful Lit Extension for completions in VSCode

* For now remove the example dashboard & prop editor

* Add a simple entrypoint

* Fix path for primary output after rename

* Use link suggested from Lotte

* Use backofficeEntryPoint as entryPoint is deprecated

* Update the umbraco-package.json to opt into telemetry as per PR suggestion

* Improve commented code to include a link to docs

* Improve readme from suggestions

* Updates package.json to use latest Vite & TS

Copies the tsconfig from the default scaffolding of vite lit-ts CLI

* Adds the base property suggestion from Jacob & puts in a comment as to what its used for

* Work in progress from hackathon day/afternoon

* Hey-API generating a HTTP Client had changed and was a PITA to figure out what had changed

Things to do for next time:
Include these files if they include --include-samples flag

* constants.ts
* Controllers/
* Composers/
* client/src/api
* client/src/dashboards/
* client/src/entrypoints

Change file contents
* client/src/bundle.manifests.ts
* client/src/package.json (extra dependencies)

* Adds in new property/flag/switch for dotnet new template

* Warren cant spell Whether 🙈

* Update template.json to exclude the sample files if flag is not set/false

* Make SLN happy/build

* Conditional content in files for IncludeExample flag/switch

* Need to include the content otherwise it doesnt get packed by nuget

* Fix the path for the openapi-ts-config.ts file to be included/excluded

* Use the project name from the dotnet new to help name manifests

* Update namespaces so they get updated when dotnet new templatge is run with the --name

* Updated example

* Fix up VS Code recommended extension for Lit VSCode

Should be .json not a .ts

* Fix up build - as we dont use the imported UmbCurrentUserContext

* Remove the relative path to the JSON schema as unable to know path to the web project

* Typo fix as spooted by Rich

* Update templates/UmbracoExtension/.template.config/template.json

Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>

* Adds a --site-domain flag/switch to use for setting the domain prefix

Sets a default value of https://localhost:5000
We have no way of knowing what URL/domain the site is running at for the Umbraco website project

* Rename stuff so its not 'example' & only have ping if include-examples is not set

* As agreed with Lotte makes sense we always generate OpenAPI & TS client

* Update umbraco-extension description

* Generic node script to generate the TS client

Checks if it can connect to it first and prompts user to ensure Umbraco site running or perhaps they need to change the URL in package.json for the node script

* Generated API has conditional stuff in now to have just Ping or the more examples based on switch/flag

* Adds symbols safeNamespace and safeName

safeNamespace uses the one built in and then safeName, depends on the cleaned namespace to then use a custom transform (forms) to then use a regex replace on . and _ to ensure we have a nicer name still for namespaces, class names, URL/routes for the swagger etc...

* change to use Umbraco.Extension as sourcename - check \.template.config\readme.md for 'placeholder' guidance

* use '-sd' as shortname for site-domain as otherwise shows up as '-p:d'

* fix typescript build error  when not including examples

* use provided name for API description as always being added

* Missing renames of Contrioller stuff with Lotte @ hackathon

* We missed the ctor

* Titlecase the API URLs for Swagger/API Controller

* dashboard tweaks

* Missing [Server] on Whats the Time Modal/UUI-box

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>
Co-authored-by: Lotte Pitcher <github@lottepitcher.co.uk>
2024-11-08 06:55:43 +00:00
Niels LyngsøandGitHub 221ab62725 Merge pull request #1507 from enkelmedia/1506-custom-modal
Feature/Proposal: Added support for element factory for modal manager context
2024-11-07 22:22:43 +01:00
Niels Lyngsø 67416ab19d fix closing nested routers modals 2024-11-07 22:15:10 +01:00
Niels Lyngsø fe1df993d5 use fillBackground prop 2024-11-07 21:51:35 +01:00
Niels Lyngsø 62a66248e9 refactor to use init method 2024-11-07 21:51:13 +01:00
Niels Lyngsø 5adcc43351 fx imports 2024-11-07 21:45:40 +01:00
Niels Lyngsø 7e7e45c8f6 Merge branch 'main' into 1506-custom-modal
# Conflicts:
#	src/packages/core/modal/component/modal.element.ts
2024-11-07 21:41:54 +01:00
Lee KelleherandGitHub fd20f6955c Bugfix: Disables Link Picker modal submit button (#2521)
Link Picker modal, disables submit button

if URL or querystring are not set.
2024-11-07 21:31:31 +01:00
Niels LyngsøandGitHub e356c7f278 Merge pull request #2446 from umbraco/v15/feature/folder-children-collection-workspace-view
Feature: Folder Children Collection Workspace View
2024-11-07 21:28:36 +01:00
Niels Lyngsø e7aefbe268 remove destroy function 2024-11-07 21:21:07 +01:00
Niels Lyngsø 393f0079c4 remove [] 2024-11-07 21:13:41 +01:00
Mads RasmussenandGitHub 2b8933e94f Merge branch 'main' into v15/feature/folder-children-collection-workspace-view 2024-11-07 20:04:09 +01:00
Mads Rasmussen 54f9f7c315 fix lint errors 2024-11-07 19:57:12 +01:00
Mads Rasmussen 17e5efdbf2 add todo 2024-11-07 19:55:18 +01:00
Steve MorganandGitHub 62336e4e28 Bugfix: creating new doc type properties sort order doesn't count existing properties - puts it at top (+1) (#2523)
Bug 17457

https://github.com/umbraco/Umbraco-CMS/issues/17457

Creating new doc type properties sort order doesn't count existing properties.

Looking at this it seems that the hardwork is done to workout the sort order and assign it to preset but it's not returned undefined was (probably as a dev placeholder that's gone unnoticed!).
2024-11-07 18:06:52 +00:00
Steve MorganandGitHub 0d85b56ec2 Bugfix: Corrects "Public access" notification typo (#2524)
Spelling correction
2024-11-07 17:51:32 +00:00
Niels LyngsøandGitHub 5c7956d84e Merge pull request #2146 from enkelmedia/routed-modal-issue
Fixes with `umb-route-slot` inside routed modal
2024-11-07 17:00:03 +01:00
Niels Lyngsø 0ac646517c simplifying 2024-11-07 16:52:53 +01:00
Niels Lyngsø 287e2a54cc use match.route.path 2024-11-07 16:50:46 +01:00
Frederik Lundbeck JørgensenandBusra Sengul 7a8ba96682 append 'YouTube Live' url scheme regex to Youtube embed provider class 2024-11-07 18:41:53 +03:00
Nathaniel NunesandGitHub 6705de0329 sort the children of a parent content after either deleting or moving its child content (#17315) 2024-11-07 15:41:30 +00:00
Niels Lyngsø 090a74d9b9 clean up 2024-11-07 15:55:34 +01:00
Niels Lyngsø e281c0fa2e call _updateRouterPath 2024-11-07 15:46:21 +01:00
Niels Lyngsø 0d0f22a1f9 fix firstUpdated callback in case where parent is also newly created 2024-11-07 15:46:08 +01:00
Niels Lyngsø a26d49e5b7 clean up 2024-11-07 15:45:45 +01:00
Mads Rasmussen bf616609fa manual merges 2024-11-07 15:35:35 +01:00
Mads Rasmussen 97455f2de4 Merge branch 'main' into v15/feature/folder-children-collection-workspace-view 2024-11-07 15:28:32 +01:00
Niels Lyngsø 4dcd2b1729 Merge branch 'main' into routed-modal-issue 2024-11-07 15:11:16 +01:00
Niels Lyngsø ff6e0fb406 Merge branch 'release/15.0' 2024-11-07 14:58:10 +01:00
Niels LyngsøandGitHub a64a1d4031 Merge pull request #2519 from umbraco/v15/feature/fix-block-grid-editor-circular-imports-take-1
Feature: Fix imports for circular deps
2024-11-07 14:29:58 +01:00
Niels Lyngsø 6540f3914b Merge branch 'main' into v15/feature/fix-block-grid-editor-circular-imports-take-1
# Conflicts:
#	src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts
2024-11-07 14:22:56 +01:00
Niels Lyngsø ae9c5dccc0 fix imports 2024-11-07 14:21:10 +01:00
Niels LyngsøandGitHub c5688dda28 Merge pull request #2515 from rickbutterfield/bugfix/block-list-custom-views-fix
[v14.2+] Allow custom views to load correctly for Block List
2024-11-07 14:21:09 +01:00
Niels LyngsøandGitHub 607b596f2c Merge pull request #2513 from umbraco/v15/feature/grid-inline-editing-fixes
Feature: Block Grid inline editing + Extension Initializers change
2024-11-07 14:18:21 +01:00
Niels LyngsøandGitHub 04c9e8f4ac Merge branch 'main' into bugfix/block-list-custom-views-fix 2024-11-07 14:13:38 +01:00
Niels Lyngsø 1740816d64 Merge branch 'main' into v15/feature/grid-inline-editing-fixes
# Conflicts:
#	src/packages/core/content/property-dataset-context/element-property-dataset.context.ts
2024-11-07 14:10:58 +01:00
Niels LyngsøandGitHub b1a054f3ed Merge pull request #2483 from umbraco/v15/feature/content-workspace-base
Feature: Content Detail Workspace Base
2024-11-07 14:09:03 +01:00
Niels Lyngsø 5f3e992ca7 fix const name 2024-11-07 14:04:32 +01:00
Niels Lyngsø a2d449de95 move dictionary create action to top 2024-11-07 14:01:11 +01:00
Niels Lyngsø 6cc417580a update member manifests 2024-11-07 13:57:28 +01:00
Niels Lyngsø f6bdb8dc90 sort props to align with data source 2024-11-07 13:53:06 +01:00
Niels LyngsøandGitHub e2303eca88 Merge branch 'main' into v15/feature/grid-inline-editing-fixes 2024-11-07 13:14:51 +01:00
Niels Lyngsø 14b388bfd8 lint fixes 2024-11-07 13:06:14 +01:00
Mads Rasmussen cccd0790d5 fix import 2024-11-07 12:20:40 +01:00
Mads Rasmussen d4d2aeecd6 temp duplicate styling as we shouldn't depend on another elements styles unless we extend it 2024-11-07 12:16:34 +01:00
Mads Rasmussen 75aa555bc9 use relative imports 2024-11-07 12:00:33 +01:00
Mads Rasmussen 18fae3d1f8 use relative imports 2024-11-07 11:56:35 +01:00
Mads Rasmussen 5cfba1588d fix circular import 2024-11-07 11:35:57 +01:00
Mads Rasmussen 59ece1f5a1 use relative imports inside module 2024-11-07 11:29:59 +01:00
Mads Rasmussen d5447641b7 use relative imports inside a module 2024-11-07 11:27:04 +01:00
Niels LyngsøandGitHub ce99552975 Merge branch 'main' into routed-modal-issue 2024-11-07 11:20:30 +01:00
Mads Rasmussen d91292267d remove circular dependency + deprecate export 2024-11-07 11:20:01 +01:00
Mads Rasmussen 6beb239cde Merge branch 'main' into v15/feature/content-workspace-base 2024-11-07 10:30:18 +01:00
Mads Rasmussen 6aab8bff47 Merge branch 'release/15.0' 2024-11-07 10:30:01 +01:00
Niels LyngsøandGitHub 4d084083f8 Merge branch 'main' into v15/feature/content-workspace-base 2024-11-07 09:11:40 +01:00
Niels LyngsøandGitHub 5282355dcc Merge pull request #2517 from warrenbuckley/patch-1
Fixes duplicate alias that fails npm run compile
2024-11-06 20:55:35 +01:00
Warren BuckleyandGitHub 540f829a2f Fixes duplicate alias that fails npm run compile
Fixes issue when running `npm run compile`

```
examples/ufm-custom-component/index.ts:12:4 - error TS1117: An object literal cannot have multiple properties with the same name.

12    alias: 'myCustomComponent',
      ~~~~~


Found 1 error in examples/ufm-custom-component/index.ts:12
```
2024-11-06 19:35:38 +00:00
2576594d92 Fix bug: No matching error display between New password and Confirm password (#2384)
* Fix bug: No matching error display between New password and Confirm password

* Refactored to use built-in validation

Wires up most localization keys.

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-11-06 17:18:25 +00:00
Sebastiaan Janssen ece5a3ae26 Merge branch 'v15/dev' into contrib 2024-11-06 16:38:14 +00:00
Nikolaj Geisle 79059d60f5 Merge branch 'release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client
#	version.json
2024-11-06 17:36:01 +01:00
Rick ButterfieldandGitHub 42bdc8703c Merge branch 'main' into bugfix/block-list-custom-views-fix 2024-11-06 15:41:42 +00:00
0c99b31285 Feature: Add Swiss backoffice localizations (#2503)
* Add swiss languages as backoffice languages

* Added Swiss localizations to manifest

* De-duplicated localizations

To reduce lines of duplicated code, (from the German, French
and Italian localizations), those localizations are imported at runtime.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-11-06 15:28:48 +00:00
Sebastiaan Janssen 2949658cb5 Merge branch 'v15/dev' into contrib
# Conflicts:
#	src/Umbraco.Core/PropertyEditors/Validators/t.cs
2024-11-06 15:18:36 +00:00
Rick ButterfieldandGitHub 3e7d6341e9 Allow checking for this._contentTypeAlias before #extensionSlotFilterMethod runs 2024-11-06 13:41:56 +00:00
Mads Rasmussen 9932f24d5c Merge branch 'main' into v15/feature/content-workspace-base 2024-11-06 14:05:54 +01:00
Niels Lyngsø d2be6adba1 comment on risky business 2024-11-06 14:05:27 +01:00
Mads Rasmussen 660fe5f22a Merge branch 'main' of https://github.com/umbraco/Umbraco.CMS.Backoffice 2024-11-06 14:00:34 +01:00
Mads Rasmussen c9f296814d Merge branch 'release/15.0' 2024-11-06 14:00:24 +01:00
Mads RasmussenandNiels Lyngsø b4b63abe32 ensure scaffolding is done before initializing the redirect controller 2024-11-06 14:00:04 +01:00
Niels LyngsøandGitHub 4b28569e91 Merge branch 'main' into v15/feature/grid-inline-editing-fixes 2024-11-06 13:59:30 +01:00
Mads Rasmussen e9d0041628 Merge branch 'main' into v15/feature/content-workspace-base 2024-11-06 13:58:05 +01:00
Mads Rasmussen ae4882aa95 Merge branch 'main' of https://github.com/umbraco/Umbraco.CMS.Backoffice 2024-11-06 13:57:28 +01:00
Mads Rasmussen 1efff16e39 Merge branch 'release/15.0' 2024-11-06 13:57:17 +01:00
Niels Lyngsø ec4c08f399 update destroy method 2024-11-06 13:55:43 +01:00
4ddfd0d37f [v14.2+] Fix Block Grid layoutStylesheet not using correct URL (#2512)
* Update block-grid-manager.context.ts

* Renames field to `serverUrl`

Uses `URL()` object to handle slashes in constructing the URL path.

* Tidied up imports

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-11-06 12:44:23 +00:00
Niels Lyngsø c5340c186b give block workspace origin data to work from 2024-11-06 13:42:45 +01:00
Niels Lyngsø ff69e28fdb update JSDocs 2024-11-06 13:24:18 +01:00
Niels Lyngsø 39768664d9 make host optionally be a method 2024-11-06 13:01:15 +01:00
c7b4b5142e Feature: reusable table column view components (#2448)
* add boolean + entity actions global table column layouts

* use entity actions in extension insights

* Update user-table-collection-view.element.ts

* Update user-group-table-collection-view.element.ts

* Update member-table-collection-view.element.ts

* Update language-table-collection-view.element.ts

* Update member-group-table-collection-view.element.ts

* align alias

* stop click event

* delete unused code

* use global components

* add entity actions to document and media

* move to entity action module

* Update localize.element.stories.ts

* change layout to view

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2024-11-06 11:38:22 +00:00
Niels LyngsøandGitHub bc65d7403f Merge branch 'main' into v15/feature/grid-inline-editing-fixes 2024-11-06 10:28:21 +01:00
24ec0ee4cb Optimize tracked references (#16996)
* Optimed sql for checking if a list documents is tracked by a reference

* Remove unoptimzed method and update Media controller too

* Revert spacing, formatting and unneeded code change

This partially reverts commit d32b6acf4f.

* Cleanup temporary renaming

* Add default implementations

* Fix merge issue

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-11-06 10:27:04 +01:00
Lee KelleherandGitHub 9f9ae6549b Chore: Upgraded Tiptap dependencies to 2.9.1 (#2511)
* Upgraded Tiptap dependencies to v2.9.1

* Uninstalled @tiptap/extension-text-style dependency

as it's now part of @tiptap/starter-kit
2024-11-06 10:21:22 +01:00
Niels LyngsøandGitHub 1b1411f49e Merge pull request #2476 from umbraco/v15/feature/disable-readonly-when-unpulish-and-publish
Feature: Disable readonly languages when publishing and unpublishing a document
2024-11-06 10:18:32 +01:00
Nhu DinhandGitHub 2d027ce9a1 V14 QA Added acceptance tests for rendering content with content picker (#17378)
* Added tests for rendering content with content picker

* Bumped version

* Make all the tests for rendering content run in the pipeline

* Reverted
2024-11-06 16:09:37 +07:00
0bf2fbc24f Fix has pending package migrations (#17423)
* update submodule

* update submodule

* Reintroduce a favicon (#17422)

* Fixes issue where package name was compared to package id, so packages had pending migrations from the management api endpoint, without actually have it.

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2024-11-06 09:56:26 +01:00
Mads RasmussenandGitHub bda1c40243 Merge branch 'main' into v15/feature/content-workspace-base 2024-11-06 09:14:59 +01:00
Niels Lyngsø 3d74060456 fix infinite layout update 2024-11-05 22:17:33 +01:00
Niels Lyngsø 3298f961f9 remove unused import 2024-11-05 21:04:13 +01:00
Niels Lyngsø 1944e1a3e2 temp removal of umbDestroyOnDisconnect 2024-11-05 20:52:15 +01:00
Niels Lyngsø ccf41d694b Merge branch 'main' into v15/feature/grid-inline-editing-fixes 2024-11-05 20:43:30 +01:00
Niels Lyngsø 4936b7debc update style 2024-11-05 20:40:10 +01:00
Niels Lyngsø 4edf1bad7d update to life cycle of extension initializers 2024-11-05 20:11:53 +01:00
Niels Lyngsø 861c91c981 error to help general error discovery 2024-11-05 16:29:51 +01:00
Niels Lyngsø b835d94a24 can be destroyed multiple times 2024-11-05 16:28:59 +01:00
Niels Lyngsø 171ea8422d remove event listener 2024-11-05 16:25:42 +01:00
Niels Lyngsø 3653d61713 remember provider host for validation context 2024-11-05 16:23:55 +01:00
Niels Lyngsø 0e5fd13028 validation translators ctrl alias 2024-11-05 15:38:26 +01:00
Niels Lyngsø 0d436fc7d7 visual corrections 2024-11-05 14:44:15 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8d96ddf7db Bump @playwright/test from 1.46.1 to 1.48.2 (#2506)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.46.1 to 1.48.2.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.46.1...v1.48.2)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-05 13:23:03 +00:00
Niels Lyngsø bd9fa6fb04 Merge branch 'main' into routed-modal-issue
# Conflicts:
#	src/packages/tiny-mce/vite.config.ts
2024-11-05 13:22:35 +01:00
Niels LyngsøandGitHub cc3ad6f3ce Merge branch 'main' into 1506-custom-modal 2024-11-05 13:17:32 +01:00
Niels Lyngsø 1b7a13977b correct variant selector look 2024-11-05 11:13:57 +01:00
Niels Lyngsø 7230f48ae5 jsdocs 2024-11-05 10:56:05 +01:00
Niels Lyngsø 2d1203b2c5 correct comment 2024-11-05 10:47:39 +01:00
Niels Lyngsø c96d5fd2b2 jsdocs updates 2024-11-05 10:47:11 +01:00
Niels Lyngsø 655f34f22d author on comment 2024-11-05 10:44:38 +01:00
Niels Lyngsø 2941b35013 use slotchange callback + clean up 2024-11-05 10:41:52 +01:00
Niels Lyngsø e7272791e5 Merge branch 'main' into v15/feature/content-workspace-base 2024-11-05 10:36:51 +01:00
Bjarke Berg 21a3c31d77 Fixed stupid build warnings that is handled like errors 2024-11-05 10:26:15 +01:00
Niels LyngsøandGitHub 8346c21203 Merge pull request #2444 from enkelmedia/example-validation-context-server-error
Fix for issue with multiple server-validation errors
2024-11-05 10:24:36 +01:00
Niels LyngsøandGitHub 674c3e85b2 Merge branch 'main' into example-validation-context-server-error 2024-11-05 10:17:15 +01:00
Niels LyngsøandGitHub e525ea1336 Update bind-server-validation-to-form-control.controller.ts
revert observeSymbol
2024-11-05 10:15:37 +01:00
Niels Lyngsø d91cddfe18 update submodule 2024-11-05 10:09:08 +01:00
Niels LyngsøandGitHub 8424cdf8c2 Feat: condition config types as a generic for extension registry (#2473)
get condition config types as a generic for extension registry
2024-11-05 09:06:59 +00:00
Bjarke Berg 336bd997f1 Merge remote-tracking branch 'origin/release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertBlockEditorPropertiesBase.cs
#	src/Umbraco.Web.UI.Client
2024-11-05 09:14:08 +01:00
Niels Lyngsø c8cbbcc608 update submodule 2024-11-05 09:10:17 +01:00
42f0a5dc53 [v15] Update obsoletion message for IPublishedContent.Parent and IPublishedContent.Children to better alternatives (#17419)
* Make block editor base classes public

* Update BlockEditorValues.cs

Change to trigger a new build for #16774

* Update IPublishedContent.cs

Provide better suggestions for alternatives to `Childrent` and `Parent`

* Updated obsolete message

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2024-11-04 16:51:18 +01:00
Niels Lyngsø 45cf2a11ef Merge branch 'main' into v15/feature/content-workspace-base
# Conflicts:
#	src/packages/documents/documents/workspace/document-workspace.context.ts
2024-11-04 15:30:01 +01:00
Niels Lyngsø 4dffbf3bcb resolve merge conflict 2024-11-04 15:06:32 +01:00
Niels Lyngsø 37e93b5274 Merge branch 'release/15.0'
# Conflicts:
#	src/assets/lang/ar.ts
#	src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts
#	src/packages/block/block/workspace/block-element-manager.ts
#	src/packages/core/collection/manifests.ts
#	src/packages/ufm/index.ts
2024-11-04 15:02:04 +01:00
Lee KelleherandNiels Lyngsø 036d14453f Hotfix: UFM alias prefixes (#2510)
* Adds `alias` to UFM component registrations

* Adds support for `alias` prefix in UFM syntax

e.g. `{(alias:|marker)(text)}` would be `{umbContentName: propertyAlias}` or `{~propertyAlias}`

* UFM Content Name: adds warning for using the `~` prefix marker

The `~` prefix will be deprecated in a future major release.
2024-11-04 14:59:01 +01:00
Niels Lyngsø c1b9599fed update vite.config for core package 2024-11-04 14:59:01 +01:00
Niels Lyngsø 6b320415cc jsdocs 2024-11-04 14:59:01 +01:00
Niels Lyngsø b2af81ba7e constants 2024-11-04 14:59:01 +01:00
Niels Lyngsø d0a3ae8ba9 update all-packages list 2024-11-04 14:59:01 +01:00
Niels Lyngsø e0fca6fa7b type export 2024-11-04 14:59:01 +01:00
Niels Lyngsø 3c4c4cb0f2 lint corrections 2024-11-04 14:59:00 +01:00
Mads RasmussenandNiels Lyngsø 6d166e288b align with modal 2024-11-04 14:58:48 +01:00
Mads RasmussenandNiels Lyngsø fe0ab5239c filter + add types 2024-11-04 14:58:48 +01:00
Mads RasmussenandNiels Lyngsø f57e7ce0a0 add create collection action kind 2024-11-04 14:58:47 +01:00
Mads RasmussenandNiels Lyngsø 8afd063438 move create modal into create folder 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 7d14b03a37 clean up 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 51387abeef clean up 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø e2456ae669 extract to base class 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 1a0fa44497 null check + render correct icon 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø f8a7a36bd3 pass args to api 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 05ff09dbbf switch between button and link state 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 6c9b172169 get ref for item 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 11198d2470 remove default kind and require in on the base 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 9b99fbc362 add module 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø 170a813010 add default kind 2024-11-04 14:58:32 +01:00
Mads RasmussenandNiels Lyngsø db65391d3a render icon from manifest 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø 38dc028d5a render as ref item 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø 340dff742c remove element from create action option manifest 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø 69958b4370 use constants 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø c7aaab7261 rename file 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø bafd508fd7 rename button 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø 6acdda0385 render create options 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø 811951b8b6 import after restructure 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø 0664c6e5ca restructure modules 2024-11-04 14:58:31 +01:00
Mads RasmussenandNiels Lyngsø ff73e5e542 setup common action and generic modal 2024-11-04 14:57:28 +01:00
Mads RasmussenandNiels Lyngsø 53c514e26f register user entity create option actions 2024-11-04 14:57:28 +01:00
Mads RasmussenandNiels Lyngsø 87ea24eb39 export manifests 2024-11-04 14:57:28 +01:00
Mads RasmussenandNiels Lyngsø 5ab629c6f9 use entityCreateOptionAction entity type 2024-11-04 14:57:28 +01:00
Mads RasmussenandNiels Lyngsø 7507c74d51 Update index.ts 2024-11-04 14:57:28 +01:00
Mads RasmussenandNiels Lyngsø bb25b881e9 register create options 2024-11-04 14:57:04 +01:00
Mads RasmussenandNiels Lyngsø 824a250df4 add global-components folder 2024-11-04 14:57:04 +01:00
Mads RasmussenandNiels Lyngsø 42fe0c3819 wip add entity-create-option-action extension point 2024-11-04 14:57:04 +01:00
Lee KelleherandNiels Lyngsø 59790431c4 Bugfix: Block Type card thunbnail image path/URL (#2480)
Block Type Cards: Fixed image URL

Removed the backoffice path from the URL,
as the image paths are relative to the root of the website.
2024-11-04 14:57:04 +01:00
leekelleherandNiels Lyngsø 52f03b9c38 Detail repository save returns updated model
previously returned the original model,
prior to any server updates, e.g. updated date.
2024-11-04 14:56:50 +01:00
Niels Lyngsø 083ed9d192 deprecate ManifestTypes 2024-11-04 14:56:50 +01:00
Mads RasmussenandNiels Lyngsø 6756ef0769 Hotfix: Correct user enable notification (#2487)
* show localized notification when user is enabled

* localize disable messages
2024-11-04 14:56:49 +01:00
Mads RasmussenandNiels Lyngsø a4e75f40d0 Hotfix: Publish with decendants structure reload (#2486)
* ensure we always have the latest variant data

* use enum value

* Update document-tree-item.element.ts

* only dispatch event if there is no error

* reload structure after publish with descendants

* only request update if it succeeds

* rename private method
2024-11-04 14:56:49 +01:00
Mads RasmussenandNiels Lyngsø e96013ac29 Bugfix: Hide template input when there are no allowed templates (#2484)
hide template input when there are no allowed templates
2024-11-04 14:56:24 +01:00
Mads RasmussenandNiels Lyngsø c848d4569f align naming 2024-11-04 14:56:24 +01:00
Lee KelleherandNiels Lyngsø 4c50f15cc5 Bugfix: Prevent delete a template when has children (#2479)
* Adds "Template Has No Children Condition"

to prevent the "delete" action being displayed
for templates that have child templates.

* Removed condition config type

it didn't have any configurable properties.

Lazy-loaded the manifest api.

* Renamed "Template Has No Children" condition

to "Template Allow Delete Action" condition.
2024-11-04 14:56:24 +01:00
Niels Lyngsø 6f6b4a7466 imports 2024-11-04 14:56:24 +01:00
Niels Lyngsø e718367f15 move abstract classes out of types 2024-11-04 14:56:23 +01:00
Niels Lyngsø 3b152b68da fix tsc 2024-11-04 14:55:59 +01:00
Niels Lyngsø 002b4baf47 ufm types 2024-11-04 14:55:25 +01:00
Niels Lyngsø 5533926e6a tip tap extensions 2024-11-04 14:54:41 +01:00
Niels Lyngsø f28cacd79d move section types 2024-11-04 14:54:41 +01:00
Niels Lyngsø f9ffce9e00 export condition types 2024-11-04 14:54:41 +01:00
Niels Lyngsø 419e00e494 add CollectionBulkActionPermissionConditionConfig 2024-11-04 14:54:41 +01:00
Niels Lyngsø 1890dfeb43 export types 2024-11-04 14:54:41 +01:00
Niels Lyngsø ef77734a5d user conditions 2024-11-04 14:54:41 +01:00
Niels Lyngsø 1726702c45 is admin 2024-11-04 14:54:41 +01:00
Niels Lyngsø 7bf0875041 remove reference 2024-11-04 14:54:41 +01:00
Niels Lyngsø 55e84d0564 refactor collection conditions 2024-11-04 14:54:41 +01:00
Niels Lyngsø 5a460a15c6 exort more types 2024-11-04 14:54:41 +01:00
Niels Lyngsø 8513e0918d more exports 2024-11-04 14:54:41 +01:00
Niels Lyngsø a87afb69ba document exports 2024-11-04 14:54:41 +01:00
Niels Lyngsø 27c1cc952a clean up 2024-11-04 14:54:41 +01:00
Niels Lyngsø ebbe5a955c update to use == in JSON Path Queries 2024-11-04 14:53:46 +01:00
Niels Lyngsø f0734cfef4 variant block validation 2024-11-04 14:53:46 +01:00
69d9cfab9a Allow for the document create options to be opened on space/enter clicked (#2501)
allow for the document create options to be opened on space/enter clicked

Co-authored-by: Nathaniel Nunes <n.nunes@clerkswell.com>
2024-11-04 13:36:14 +00:00
e93b86bdae Feature: Set the URL field as required and focus on it (#2500)
* Feature: Set the URL field as required and focus on it

* Added mandatory asterix to webhook url label

---------

Co-authored-by: Nathaniel Nunes <n.nunes@clerkswell.com>
2024-11-04 13:07:26 +00:00
nikolajlauridsen 72bc3f8306 Fix merge error 2024-11-04 12:54:52 +01:00
nikolajlauridsen 8f86ac1bd1 Merge branch 'release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Core/Services/DocumentUrlService.cs
2024-11-04 12:49:38 +01:00
e50a1dc015 Migrate old locallinks formats (#17307)
* Initial working localLinks migration

* Cleanup

* Refactor for extendability part 1

* Refactor part 2

* Fixed circular dependency

* Made sure all the extendable logic for the migration is marked as obsolete for v18

* Refactor to use Interface and non circular references instead

* Use Npco for SQLserver compatibility and include media properties too

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-11-04 12:29:55 +01:00
Lee KelleherandGitHub 4c4566cda5 Feature: Document Workspace Info Link State (#2497)
Adds document link state

to the workspace info links component.
2024-10-29 22:09:41 +00:00
Sebastiaan JanssenandGitHub 2ff0a3fd3d fix: prevent copying of the node_modules directory (#17331)
As noted in #16659, everything from `App_Plugins` is copied into the web
output. This is unneeded and in the case of the `node_modules` directory
unwanted behavior, these files are sources and not output that Umbracco
needs to serve packages/extensions.

The old behavior has led to many of the "path too long" errors we've
been seeing while building extensions.
2024-10-29 23:06:56 +01:00
Lee KelleherandGitHub b3ce981fad Feature: Markdown Editor toolbar styling (#2498)
Stylizes the Markdown Editor toolbar

to align with the Tiptap RTE toolbar style.
2024-10-29 23:01:51 +01:00
Mads RasmussenandGitHub 7708e84378 Merge branch 'main' into v15/feature/disable-readonly-when-unpulish-and-publish 2024-10-29 17:17:34 +01:00
Mads RasmussenandGitHub f461b637c0 Merge branch 'main' into v15/feature/content-workspace-base 2024-10-29 17:17:15 +01:00
Nikolaj Brask-NielsenandGitHub 7c8b1432f2 feat: Add validation hints to unnamed tabs (#2493) 2024-10-29 11:03:50 +00:00
5926517207 Bugfix: Word wraps long Data Type names in picker (#2496)
Fix for 17036

Co-authored-by: Debasish Gracias <d.gracias@clerkswell.com>
2024-10-29 10:36:39 +00:00
Lee KelleherandGitHub d26fdcaedf Feature: Document Workspace Info reload components (#2492)
* Adds Document URL Repository

* Extracts Document Workspace Info Links to its own component

Refactored to use the new Document URL Repository.

Plus other housekeeping on the main Document Workspace Info component.

* Refactored Document Workspace Info History component

to listen for the "Request Reload Structure" event

* Refactored Document Workspace Info Reference component
2024-10-29 09:08:42 +01:00
leekelleherandJacob Overgaard 40c7bc9582 Tiptap toolbar, background color + box shadow 2024-10-29 09:07:34 +01:00
Lee KelleherandGitHub ca4ff01934 Feature: Tiptap "Clear Formatting" toolbar action (#2494)
Tiptap: adds "Clear Formatting" toolbar action
2024-10-29 09:07:02 +01:00
Mads RasmussenandGitHub df77096ef6 Merge branch 'main' into v15/feature/disable-readonly-when-unpulish-and-publish 2024-10-28 19:47:07 +01:00
Mads RasmussenandGitHub 10364bff54 Merge branch 'main' into v15/feature/content-workspace-base 2024-10-28 19:46:45 +01:00
Sebastiaan Janssen 7faceb365b Merge branch 'v15/dev' into contrib 2024-10-28 17:11:47 +01:00
Bjarne FyrstenborgandGitHub 4863745181 Content type group sorting placeholder (#2471)
* Make it more clear when content type groups are re-arranged

* Hide header slot with input
2024-10-28 14:07:06 +00:00
Bjarke Berg e92a1b73f0 Formatting and disable warningsaserrors on tests 2024-10-28 13:19:46 +01:00
Bjarke Berg aceadc1ed7 Fixed formatting and comment warnings/errors 2024-10-28 12:58:28 +01:00
Bjarke Berg 9a80328224 Merge remote-tracking branch 'origin/release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts
#	version.json
2024-10-28 12:32:39 +01:00
Bjarne FyrstenborgandGitHub c9f8f62b84 Tags matchlist on top of following markdown toolbar (#2489)
Set z-index of matchlist to ensure on top of following markdown toolbar
2024-10-28 10:28:00 +00:00
Andreas ZerbstandGitHub b1d9085c83 V14 QA Added user groups acceptance tests (#17344)
* Added tests for userGroup

* Clean up

* Updated userGroup tests

* Updated tests

* Updated tests

* Cleane up

* Cleaned up

* Bumped versions

* Run user tests

* Cleaned up

* Added method for checking if the document tree is empty

* Bumped version

* Reverted
2024-10-28 11:11:28 +01:00
Nhu DinhandGitHub 41da2e2cf3 V14 Added acceptance tests for the List View Media and custom data type in Content section (#17025)
* Added Content tests with custom data type

* Added tests for List View Media data type in Media section

* Updated method name due to api helper changes

* Updated the assertion of Content tests with custom data type

* Bumped version of test helper

* Make all Content tests run in the pipeline

* Skipped test for code editor as it is removed

* Fixed comment

* Make Media tests running in the pipeline

* Bumped version

* Updated code due to ui helper changes

* Bumped version of test helper

* Updated tests for bulk trash in the media section

* Fixed notification message

* Make Content tests and Media tests run in the pipeline

* Added more waits

* Reverted
2024-10-28 10:53:33 +07:00
Owain JonesandGitHub 15f42f9ba9 Update Welsh lang file (#17368)
* Update Welsh lang file

* Adjusted newlines
2024-10-26 02:37:52 +02:00
Mads Rasmussen c7f0f3a9cd sort variants 2024-10-25 14:53:30 +02:00
Mads Rasmussen 1f2fc8a05e include context in the class name 2024-10-25 14:19:36 +02:00
Mads RasmussenandGitHub 0c0ff1ec0a Merge pull request #2470 from bjarnef/bug/content-type-design-editor-property-zindex
Remove z-index from header in content type design editor property
2024-10-25 14:10:54 +02:00
Nhu DinhandGitHub 76fcf19b15 V14 QA Added acceptance tests for rendering content with Dropdown, Radiobutton and ImageCropper (#17357)
* Added tests for rendering content with numeric

* Added tests for rendering content with textarea

* Added tests for rendering content with approved color

* Added tests for rendering content with numeric

* Added tests for rendering content with tags

* Added tests for rendering content with textarea

* Updated tests for rendering content with textstring due to test helper changes

* Added tests for rendering content with truefalse

* Bumped version of test helper

* Make all tests for rendering content run in the pipeline

* Fixed comments

* Removed blank lines

* Fixed name

* Make all smoke tests run in the pipeline

* Added tests for rendering content with dropdown

* Added tests for rendering content with Image Cropper - not done

* Updated tests for rendering content due to ui helper changes

* Updated tests for rendering content with image cropper

* Updated tests due to the api helper changes

* Bumped version of test helper

* Make all the tests for rendering content run in the pipeline

* Removed blank lines

* Format code

* Fixed test name

* Reverted
2024-10-25 18:19:53 +07:00
Niels LyngsøandGitHub 7792b2efa9 Merge pull request #2474 from umbraco/v15/feature/disable-readonly-languages-when-unpublishing
Feature: Add read only tag for read only languages in app language select
2024-10-25 11:58:31 +02:00
Niels LyngsøandGitHub a3a4ea020a Merge branch 'main' into v15/feature/disable-readonly-languages-when-unpublishing 2024-10-25 11:50:51 +02:00
Niels Lyngsø 64f018da37 en + da translation 2024-10-25 11:45:32 +02:00
Niels LyngsøandGitHub e96b049364 Merge pull request #2475 from umbraco/v15/feature/store-selected-app-language-in-local-storage
Feature: save selected app language in local storage
2024-10-25 11:32:02 +02:00
Nhu DinhandGitHub 11ccafeb97 V14 QA Added tests for rendering content with checkboxlist and date picker (#17332)
* Added tests for rendering content with numeric

* Added tests for rendering content with textarea

* Added tests for rendering content with approved color

* Added tests for rendering content with numeric

* Added tests for rendering content with tags

* Added tests for rendering content with textarea

* Updated tests for rendering content with textstring due to test helper changes

* Added tests for rendering content with truefalse

* Added tests for rendering content with checkbox list

* Added tests for rendering content with date picker - not done

* Updated tests for rendering content with date picker

* Updated tests for rendering content due to ui helper changes

* Bumped version

* Removed blank lines

* Make Rendering Content tests run in the pipeline

* Changed method name due to test helper changes

* Reverted
2024-10-25 15:16:28 +07:00
Mads Rasmussen 3c24dad37d add label 2024-10-24 23:10:36 +02:00
Mads Rasmussen bc5b730eef add null check 2024-10-24 23:04:09 +02:00
Mads Rasmussen b657b2806b render new variant selector for in document workspace 2024-10-24 22:59:49 +02:00
Mads Rasmussen 237d54281f add specific variant selector for documents 2024-10-24 22:59:29 +02:00
Mads Rasmussen 9cadee65d9 make current variant selector more generic 2024-10-24 22:59:13 +02:00
Mads Rasmussen aa6ce937ed allow to slot in custom variant selectors 2024-10-24 22:58:45 +02:00
Mads Rasmussen 7979805682 export element 2024-10-24 22:58:07 +02:00
Mads Rasmussen faf7af2a08 remove 2024-10-24 15:07:29 +02:00
Nikolaj Geisle 226819de21 Format sql statement (#17354)
(cherry picked from commit aa9f194d76)
2024-10-24 15:07:04 +02:00
Mads Rasmussen b4103f9f16 align order 2024-10-24 14:46:41 +02:00
Mads Rasmussen 53710a40b7 add check for repository 2024-10-24 14:46:33 +02:00
Nikolaj GeisleandGitHub aa9f194d76 Format sql statement (#17354) 2024-10-24 14:45:23 +02:00
Mads Rasmussen bccdc9a6ab align resetState 2024-10-24 14:34:09 +02:00
Mads Rasmussen bb42171f3c implement on document blueprint 2024-10-24 14:26:53 +02:00
Mads RasmussenandGitHub 31073c6a8c Merge branch 'main' into v15/feature/content-workspace-base 2024-10-24 13:30:25 +02:00
Mads Rasmussen a22a42e1e7 Update types.ts 2024-10-24 13:23:24 +02:00
Mads Rasmussen 71c909b23f add js docs 2024-10-24 13:14:06 +02:00
Mads Rasmussen 3a3066c79d add js docs 2024-10-24 12:44:41 +02:00
Mads Rasmussen 145b02b719 add readonly back 2024-10-24 12:27:46 +02:00
leekelleher 4e125d079b Merge branch 'release/15.0' 2024-10-24 11:26:42 +01:00
Mads Rasmussen 43221d50ce add abstract method createPropertyDatasetContext 2024-10-24 11:23:34 +02:00
Mads Rasmussen 5a46d5a29e Merge branch 'main' into v15/feature/content-workspace-base 2024-10-24 10:48:53 +02:00
Mads Rasmussen d32d9e1f98 add public to public methods 2024-10-24 10:48:00 +02:00
Mads Rasmussen fbfc1f35fd add more docs 2024-10-24 10:45:29 +02:00
leekelleher 3198f1f00c Merge branch 'release/15.0' 2024-10-24 09:45:27 +01:00
Mads Rasmussen 050e5c5d44 add docs 2024-10-24 10:41:58 +02:00
Mads Rasmussen 4cc95e4c78 add js docs 2024-10-24 10:09:59 +02:00
Nikolaj GeisleandZeegaan 73d70ba9fc Swap to windows vm for build (#17348)
(cherry picked from commit 199a2f4619)
2024-10-24 09:47:59 +02:00
Nikolaj GeisleandGitHub 199a2f4619 Swap to windows vm for build (#17348) 2024-10-24 09:45:59 +02:00
Mads Rasmussen 87e7db05aa deprecate getContentTypeId and implement getContentTypeUnique 2024-10-24 09:35:37 +02:00
Mads Rasmussen 8a4e26b1c6 pass types 2024-10-24 09:26:14 +02:00
Mads Rasmussen ca55f5ab9a add js docs 2024-10-24 09:19:30 +02:00
Mads Rasmussen 9502edf77c set variant scaffold 2024-10-24 09:19:23 +02:00
Mads Rasmussen 6d74f45afa add setVariantScaffold method 2024-10-24 09:18:55 +02:00
Mads Rasmussen 22fc7743f9 update types 2024-10-23 22:04:28 +02:00
Mads Rasmussen 6e6f0a6dde pass save modal 2024-10-23 22:04:20 +02:00
Mads Rasmussen b598c63f5e pass in modal token 2024-10-23 21:39:38 +02:00
Mads Rasmussen dfe85fce01 add variant picker interface 2024-10-23 21:39:18 +02:00
Mads Rasmussen cae8502262 use correct local type 2024-10-23 20:31:46 +02:00
Mads Rasmussen 10ccfbaa76 align local type names 2024-10-23 20:30:31 +02:00
Mads Rasmussen b1f9314909 pass types 2024-10-23 20:29:54 +02:00
Mads Rasmussen c2e22cc266 pass variant option model 2024-10-23 20:27:05 +02:00
Mads Rasmussen 20c33efd96 pass content type model 2024-10-23 20:19:35 +02:00
Mads Rasmussen 796592cb2c use correct unique type 2024-10-23 20:19:23 +02:00
Mads Rasmussen 907c1c58fa add back observables for create and update date 2024-10-23 20:16:11 +02:00
Mads Rasmussen 9a24b37dce call create scaffold in member workspace context 2024-10-23 20:12:26 +02:00
Mads Rasmussen 3383be99c7 type casting 2024-10-23 20:08:46 +02:00
Mads Rasmussen 602822e43f use create scaffold method 2024-10-23 20:08:38 +02:00
Mads Rasmussen 7a839dc85c make UmbContentDetailModel generic and pass variant model type 2024-10-23 20:08:06 +02:00
Mads Rasmussen fadd4c77cd wip implement base class on member workspace 2024-10-23 19:07:49 +02:00
Mads Rasmussen f19f36c982 remove unused 2024-10-23 18:52:45 +02:00
Mads Rasmussen 19b4861c94 move more logic to base class 2024-10-23 18:52:04 +02:00
Mads Rasmussen 7f597fd4ec remove duplicated code 2024-10-23 17:14:52 +02:00
Mads Rasmussen bea918687d provide entity context 2024-10-23 17:14:41 +02:00
Mads Rasmussen 8813ff5dbd wip implement UmbContentDetailWorkspaceBase for media workspace context 2024-10-23 15:31:49 +02:00
Mads Rasmussen c8a46dc11d add check for data 2024-10-23 15:31:32 +02:00
Mads Rasmussen ca244eca8e temp move back 2024-10-23 15:31:19 +02:00
Mads Rasmussen 5ce331c56e move more logic to content detail workspace base 2024-10-23 15:12:51 +02:00
Mads Rasmussen 8dcb8272bc add methods to get parent data 2024-10-23 14:54:30 +02:00
Mads Rasmussen 0c45aefd49 wip move common logic to content workspace context base 2024-10-23 14:19:43 +02:00
Mads Rasmussen fe53897e32 add content detail context class scaffold 2024-10-23 13:22:41 +02:00
Mads Rasmussen 48eda8ab44 rename and deprecate the old name 2024-10-23 13:10:33 +02:00
Lee KelleherandGitHub 9df26e95d7 Feature: Link Picker modal refactor (#2477)
* Adds `hideTarget` flag

* Sets default modal size to "medium"

* Code tidy-up

* Updates "defaultdialogs_linkinternal" localizations

to remove the `:` suffix (from all languages)

* Applied `standalone` to single Document Picker item

* Adds `icon` to the document/media detail types

* Link Picker modal: total refactor!

Swaps the inline trees with input pickers.
Makes use of `<umb-property-layout>` component.
+ plenty of TLC in the UI/UX!

* Sets the `allowedMediaTypeIds` for media picker filtering

e.g. folders are not selectable
2024-10-23 12:56:27 +02:00
Zeegaan 6435ff0bb3 Merge remote-tracking branch 'origin/release/14.3' into v14/dev
# Conflicts:
#	version.json
2024-10-23 09:03:05 +02:00
Zeegaan f7729508cf Merge branch 'release/13.5' into v13/dev
# Conflicts:
#	version.json
2024-10-23 08:57:30 +02:00
Zeegaan 31e1acce67 Merge remote-tracking branch 'origin/release/10.8.7' into v10/dev
# Conflicts:
#	version.json
2024-10-23 08:48:08 +02:00
Andreas ZerbstandGitHub aa1f3df76b Updated to match locator (#17334) 2024-10-23 08:37:24 +02:00
Andreas ZerbstandAndreas Zerbst 126bce7721 V14 QA Skip Users tests on Sqlite (#17330)
* Split sqlite test because we run into db locks

* Uses the new command

(cherry picked from commit 728dc89909)
2024-10-22 13:13:42 +02:00
Andreas ZerbstandGitHub 728dc89909 V14 QA Skip Users tests on Sqlite (#17330)
* Split sqlite test because we run into db locks

* Uses the new command
2024-10-22 13:12:42 +02:00
Mads Rasmussen 2f9068ed09 disable readonly languages when publishing 2024-10-22 10:10:21 +02:00
Mads Rasmussen bd16e017b6 disable readonly languages when unpublishing 2024-10-22 10:07:28 +02:00
Lee KelleherandGitHub 07a9196320 TreatWarningsAsErrors: adds condition to check not in debug compilation mode (#17327) 2024-10-22 09:55:33 +02:00
Mads Rasmussen 6c47c1f3e2 add jsdocs 2024-10-22 09:35:26 +02:00
Mads Rasmussen fe4ef62977 add methods to get current user data 2024-10-22 09:28:39 +02:00
Nhu DinhandGitHub e36dc1f554 V14 QA Added the acceptance tests for rendering content with different value (#17293)
* Added tests for rendering content with numeric

* Added tests for rendering content with textarea

* Added tests for rendering content with approved color

* Added tests for rendering content with numeric

* Added tests for rendering content with tags

* Added tests for rendering content with textarea

* Updated tests for rendering content with textstring due to test helper changes

* Added tests for rendering content with truefalse

* Bumped version of test helper

* Make all tests for rendering content run in the pipeline

* Fixed comments

* Removed blank lines

* Fixed name

* Make all smoke tests run in the pipeline
2024-10-22 10:26:59 +07:00
Mads RasmussenandGitHub f4e7e13c18 Merge branch 'v15/feature/disable-readonly-languages-when-unpublishing' into v15/feature/store-selected-app-language-in-local-storage 2024-10-21 20:32:50 +02:00
Mads RasmussenandGitHub 527ccebdd5 Merge branch 'main' into v15/feature/disable-readonly-languages-when-unpublishing 2024-10-21 20:27:25 +02:00
Mads Rasmussen b095902bf5 store selected app language in local storage 2024-10-21 20:12:34 +02:00
Mads Rasmussen 9a23ad2e50 check for access to all languages 2024-10-21 19:46:29 +02:00
Mads Rasmussen 5deab9571d localize read only text 2024-10-21 19:19:02 +02:00
Mads Rasmussen 99deec9ac2 render tag in app language selector 2024-10-21 16:07:35 +02:00
Andreas ZerbstandGitHub f3c3b25657 Fixed test (#17325) 2024-10-21 14:47:45 +02:00
7c54064f59 Bugfix: Tiptap RTE custom dimensions configuration (#2469)
* tiptop min height configuration

* Removed `min-height`; credit to @innovoix

* Clarified the use of `display:flex`

* Changed to use `height` instead of `min-height`

as this will control the maximum height of the editor input area.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-10-21 11:05:39 +00:00
Mads Rasmussen 4bcca9928b render readonly tag in app language dropdown 2024-10-21 12:54:58 +02:00
Sven GeusensandNikolaj Geisle 3431f76320 Prevents XSS when viewing an uploaded SVG
from the media-info and image-preview components.
2024-10-21 12:50:12 +02:00
ElitsaandNikolaj Geisle 1bc5466a8d Update the HttpContext's user with the authenticated user's principal 2024-10-21 12:45:38 +02:00
ElitsaandNikolaj Geisle d83daf44d3 Reduce the time when getRemainingTimeoutSeconds request is made from 30s to 20s, so fewer calls are made 2024-10-21 12:44:40 +02:00
ElitsaandNikolaj Geisle 2ad5ecd5d5 Make sure that the client shows the login screen as close to the server's timout time as possible 2024-10-21 12:44:39 +02:00
Sven GeusensandNikolaj Geisle 35c51a029a Prevents XSS when viewing an uploaded SVG
from the media-info and image-preview components.
2024-10-21 12:42:06 +02:00
ElitsaandNikolaj Geisle 8c1128c85b Update the HttpContext's user with the authenticated user's principal 2024-10-21 12:41:42 +02:00
ElitsaandNikolaj Geisle c9021ab2d2 Reduce the time when getRemainingTimeoutSeconds request is made from 30s to 20s, so fewer calls are made 2024-10-21 12:41:18 +02:00
ElitsaandNikolaj Geisle 67a71f8f82 Make sure that the client shows the login screen as close to the server's timout time as possible 2024-10-21 12:41:17 +02:00
Andreas ZerbstandAndreas Zerbst 6caf53ed2e Updated version of messagepack (#17321)
(cherry picked from commit 8a22672c7f)
(cherry picked from commit 6399f235f2)
2024-10-21 11:54:26 +02:00
Emanuel GustafzonandGitHub 6cf6019706 Chore: Change "Select member" to "Choose Member" + Swedish localization (#2472)
change member picker model from select member/ members to choose and also added selectMember and members varible in swedish localisation file
2024-10-21 10:52:45 +01:00
Andreas ZerbstandAndreas Zerbst 97d74f39e7 Updated version of messagepack (#17321)
(cherry picked from commit 8a22672c7f)
2024-10-21 11:49:13 +02:00
Andreas ZerbstandAndreas Zerbst edd0a4a4a9 Updated message pack (#17320)
(cherry picked from commit 11270eaaf5)
2024-10-21 11:46:43 +02:00
Andreas ZerbstandAndreas Zerbst 0d7d6ac940 Updated version of messagepack (#17321)
(cherry picked from commit 8a22672c7f)
(cherry picked from commit 6399f235f2)
2024-10-21 11:27:26 +02:00
Andreas ZerbstandAndreas Zerbst 6399f235f2 Updated version of messagepack (#17321)
(cherry picked from commit 8a22672c7f)
2024-10-21 11:17:50 +02:00
Andreas ZerbstandGitHub 8a22672c7f Updated version of messagepack (#17321) 2024-10-21 11:15:59 +02:00
Andreas ZerbstandGitHub 11270eaaf5 Updated message pack (#17320) 2024-10-21 11:00:47 +02:00
Justin NevilleandGitHub 1e32d59ecb Query for media using the full file path as well as the original file path for files that contain the sizes in the file name (i.e. image_200x200.jpg) (#17314) 2024-10-21 09:53:17 +02:00
Bjarke BergandGitHub 4be183a20d Do not rely on NuCache to do key/id lookups (#17291)
* Fixes #17182

* Ensure wait-on is installed
2024-10-21 09:49:34 +02:00
Niels Lyngsø 706464f8e4 Merge branch 'release/15.0' 2024-10-18 13:39:10 +02:00
Kenn JacobsenandGitHub eab27123dd MNTP: Re-initialize contextual dialog options upon content creation (#17301) 2024-10-18 09:39:29 +02:00
Kenn JacobsenandGitHub a6253957c8 MNTP: Improve site and root context for dynamic root (#17303) 2024-10-18 09:17:17 +02:00
Bjarne Fyrstenborg 47103073a5 Remove z-index from header in content type design editor property 2024-10-18 00:49:57 +02:00
Lee KelleherandGitHub dc215171c4 Feature: Collection Toolbar Filter Field (#2467)
* Sets `umb-collection-action-bundle` to use `display:contents`

This should only display if the component has any contents.

* Refactored Dictionary collection toolbar

* Refactored Document collection toolbar

Deprecates `umb-document-collection-toolbar`

* Refactored Media collection toolbar

Deprecates `umb-media-collection-toolbar`

* Refactored Extension collection toolbar

Enables support for future Create and Views functionality.

* Exported collection element classes as `element`

deprecated the "default" export

* Adds `elementName` constant

* Refactored UserGroup collection toolbar

Deprecates `umb-user-group-collection-header`

* Code formatting

* Added `umb-collection-filter-field` component

Reusable filter field for a collection toolbar.

* Used `umb-collection-filter-field` component

on existing collections, removed duplicated code.

* Reverted adding `elementName` constant

Seems that this may cause issues with the eslint plugin
(for ensuring element names start with "umb-").
2024-10-17 13:38:45 +02:00
Søren KottalandGitHub 2067e0dc58 Removes unnecessary margin in ufm-render-element (#2461) 2024-10-17 10:31:12 +01:00
Jacob OvergaardandGitHub a8f5631144 V13: Update @umbraco-ui/uui to 1.11.0 (#17281)
* build(deps): update @umbraco-ui/uui from 1.7.1 to 1.11.0

* fix: umb-login-element no attributes

Cherry-picked a fix from V14 where the custom login input component was no longer needed, which was fixed because it errors out. This simplifies the login form.

* cherry-pick code to handle 'enter' click from v14
2024-10-17 10:25:02 +01:00
Andreas ZerbstandGitHub 60ddff1ce2 Fixed build errors (#17298) 2024-10-17 10:49:33 +02:00
Andreas ZerbstandAndreas Zerbst 0a496b2e52 Updated to string.empty (#17294)
(cherry picked from commit ba1080541b)
2024-10-17 10:13:26 +02:00
Andreas ZerbstandGitHub ba1080541b Updated to string.empty (#17294) 2024-10-17 09:59:41 +02:00
Jacob Overgaard 1581eb61d3 V15: Rich Text Editor links do not work with query strings and anchors (#17288)
* fix: anchors and query strings do not work

Since the change from UDIs to localLinks in href, the pattern matched a little too much in the href section completely ignoring any "extras" such as querystrings and anchors after the locallink, which meant that the locallink did not get replaced at all if they were present. This is fixed by limiting the regexp a bit.

* fix: legacy links do not follow the same regexp as new links

Because we are no longer matching the whole `href` attribute but only some of its contents, we need to fix up the old pattern. It has been extended with matching groups that follow the same pattern as the new links.

* feat: allow a-tags to be multiline

example:

```html
<a
  type="document"
  href="/{localLink:<GUID>}">
Test
</a>
```

* fix: split regex into two parts: first a tokenizer for a-tags and then a type-finder

* fix: ensure only "document" and "media" are matching to speed up the pattern

* feat: allow a-tags to be multiline

(cherry picked from commit 35e8f2e460)
2024-10-17 09:06:48 +02:00
Jacob Overgaard 85e55845a3 update backoffice submodule 2024-10-17 09:02:51 +02:00
Jacob Overgaard 4f4f6787dc Merge remote-tracking branch 'origin/release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Core/Services/DocumentUrlService.cs
#	src/Umbraco.Web.UI.Client
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/ContentNavigationServiceBaseTests.cs
2024-10-17 09:02:19 +02:00
Jacob Overgaard 790f15afcc Merge branch 'release/15.0' 2024-10-16 21:19:12 +02:00
Jacob Overgaard 13d50a6ca2 Merge branch 'release/15.0' 2024-10-16 17:13:13 +02:00
Niels LyngsøandGitHub 8c9cf71f05 Merge pull request #2466 from umbraco/v15/chore/simplify-validation-promise-code
Chore: simplify code
2024-10-16 17:11:02 +02:00
Niels Lyngsø 67c0fcee35 simplify code 2024-10-16 16:26:05 +02:00
Jason ElkinandNikolaj Geisle 6d98162e19 Unlock form after unsuccessful save and publish. (#17285)
(cherry picked from commit ee37ad0f4b)
2024-10-16 15:09:31 +02:00
Jason ElkinandGitHub ee37ad0f4b Unlock form after unsuccessful save and publish. (#17285) 2024-10-16 15:08:37 +02:00
Niels LyngsøandGitHub 0600bd3fa7 Merge pull request #2445 from umbraco/v15/feature/property-dataset-properties-observable
feature: property-dataset properties observable & Block Workspace Alignment
2024-10-16 14:15:38 +02:00
c53cb49496 Adjust Image Cropper handle (focal point) (#1021)
* Adjust Image Cropper focal point to be consistent with Color Area handle

* Make focus point focusable via keyboard

* Update import of utils from uui

* Make focal point accessible via keyboard

* Move logic to function

* Reset coords

* Remove reset coords

* Reset coords if focal point is updated to center

* Format document

* Set focal point property instead

* Formatting

* Fix warnings

* Width and height

* Remove added outline so we can see when focal point has focus via keyboard

* Reset coords

* Cleanup

* Update import

* Cleanup

* Use UmbChangeEvent

* Adjust elements

* Import drag for uui

* Cleanup styling

* Cleanup

* Remove unnecessary events

* Container is HTMLElement

* Check focal point updated

* Fix conflicts after merge

* Null check

* Update correct element types

* Revert to custom event

* Cleanup console

* Don't hide overflow, so focal point is not cut off on edges on image

* Add margin top at actions so focal point doesn't overlap buttons

* Top margin at actions

* Crosshair cursor when focal point is not hidden

* Cancel update focal point

* Add move cursor to viewport image

* Use crop label

* Add missing label

* Disable draggable of image as in old backoffice

* Fix previous merge conflicts

* Update src/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Remove disconnectedCallback

* Ignore in the debug element

* Add custom event for focal point change

* Import type

* Replace with UmbImageCropChangeEvent

* Use UmbFocalPointModel

* Move set focal pont style to setter

* Update custom event name

* Localize focal point label

* Fix import of UmbFocalPointModel type

* Localize buttons

* Update labels

* Combine imports

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-16 14:13:57 +02:00
Jacob Overgaard 6c6a525619 Merge remote-tracking branch 'origin/release/15.0' 2024-10-16 13:49:21 +02:00
Andreas ZerbstandGitHub 2b3a91757d V14 QA added user permission tests (#17226)
* Added test

* Small changes

* Added content start node tests

* Added media start node tests

* Cleaned up

* More updates

* Cleaned up

* Added wait

* Cleaned up

* Bumped helpers

* Updated to run user tests

* Fixed user tests

* Bumped helpers

* Added missing semicolon

* Fixes based on comments

* Run smoke tests
2024-10-16 13:26:36 +02:00
Niels Lyngsø d95cfbc331 remove await for live editing config 2024-10-16 13:20:49 +02:00
Niels Lyngsø b76e95dd62 liveEditing value can be undefined, therefor custom promise 2024-10-16 13:19:42 +02:00
Niels Lyngsø 288ba4e0a6 destroy block list elements 2024-10-16 13:13:35 +02:00
Andreas ZerbstandGitHub 00563013b6 V14 QA Updated package E2E tests (#17236)
* Updated tests

* Cleaned package tests

* Updated package test file

* Bumped version

* Added missing semicolons

* Run all smoke tests

* Run smoke tests
2024-10-16 12:46:24 +02:00
Ronald BarendseandBjarke Berg 378d4ecfef Fix ContentStore locking exceptions in async code (#17246)
* Add ContentCache test

* Use SemaphoreSlim as write lock

* Apply lock imrpovements to SnapDictionary

* Obsolete unused MonitorLock

(cherry picked from commit c3db3457e7)
2024-10-16 12:34:44 +02:00
Andreas ZerbstandBjarke Berg a497f3f4dd Updated nuget package (#17286)
(cherry picked from commit 5183391a86)
2024-10-16 12:24:31 +02:00
Bjarke BergandGitHub 2d71b5a63b Updated image sharp to a non vulnerable version (#17290) 2024-10-16 12:16:38 +02:00
Niels Lyngsø 704d2bea78 clean up 2024-10-16 12:04:05 +02:00
Niels Lyngsø c79001a7b6 remove if 2024-10-16 12:03:41 +02:00
Niels Lyngsø 5493c0a2a1 implement expose button for rte block 2024-10-16 12:03:35 +02:00
Niels Lyngsø 0bb54c6af6 clean up 2024-10-16 11:58:16 +02:00
Niels Lyngsø dbca6ef78d block list entry expose ability 2024-10-16 11:54:36 +02:00
Niels Lyngsø f66990551c general expose button for grid 2024-10-16 11:50:56 +02:00
Niels Lyngsø f99b542ece expose button for no content editor block 2024-10-16 11:40:04 +02:00
Niels Lyngsø d192f9ea55 fix live editing mode 2024-10-16 10:53:41 +02:00
Niels Lyngsø 928a3352bf property editor ui name, using label value 2024-10-16 10:33:03 +02:00
Bjarke BergandGitHub f4f83bccbe Added an explicit dependency to Microsoft.Extensions.Caching.Memory to force it to use a non-vulnerable version (#17287) 2024-10-16 10:25:17 +02:00
Niels Lyngsø 85ed0c6194 Merge branch 'main' into v15/feature/property-dataset-properties-observable
# Conflicts:
#	src/packages/core/content/index.ts
2024-10-16 10:20:20 +02:00
Niels Lyngsø eb18359a59 Merge branch 'release/15.0' 2024-10-16 10:15:06 +02:00
Andreas ZerbstandGitHub 5183391a86 Updated nuget package (#17286) 2024-10-16 10:07:25 +02:00
Niels Lyngsø ecede7f3ad Merge branch 'release/15.0' into v15/feature/property-dataset-properties-observable 2024-10-16 09:08:55 +02:00
e3d0acc8a2 Adds CONST for 'Umb.Condition.WorkspaceAlias' (#2454)
* Add a const for 'Umb.Condition.WorkspaceAlias'

* Update usages 'Umb.Condition.WorkspaceAlias' of to the new CONST

* Somehow accidently deleted .nvmrc

* Change from 'src/packages/core/workspace/conditions/const.js' to '@umbraco-cms/backoffice/workspace' as the import

* Another fix from the build errors from GitHub - didnt come up locally which was weird

* Update src/packages/core/workspace/conditions/workspace-alias.condition.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Renames the consts as agreed in the PR and adds the deprecated notice

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-15 09:17:11 +02:00
Søren KottalandGitHub b92f0052fa Adds gap between grouped buttons in settings welcome dashboard (#2457)
* Adds gap between grouped buttons to prevent them from sticking together on small screens

* Gremlins :)
2024-10-14 17:45:38 +02:00
Markus Johansson c41a994a07 Merge branch 'main' of https://github.com/umbraco/Umbraco.CMS.Backoffice into 1506-custom-modal 2024-10-14 17:31:08 +02:00
Markus Johansson 68fefbca84 Cleanup, worked on example and added comments 2024-10-14 17:30:10 +02:00
Markus Johansson caeab9a21b Adjusting custom modal implementation, rename factory, change to support import element 2024-10-14 17:18:49 +02:00
Warren BuckleyandJacob Overgaard e2b8a788f6 Fixes #17254 Making 'Umb.Section.Content' as a const UMB_CONTENT_SECTION_ALIAS that can be imported 2024-10-14 15:04:52 +02:00
Søren KottalandJacob Overgaard 62050e9cb6 fixes icon alignment in links in redirect dashboard 2024-10-14 14:58:10 +02:00
Jacob Overgaard 4726335a7d fix: only set the ?readonly attribute on the swatches element since it handles setting it on the colors afterwards 2024-10-14 11:19:20 +02:00
d4a2453075 Adds read-only mode to Color Picker Property Editor (#2451)
* Adds read-only mode to Color Picker Property Editor

Implemented the read-only mode of the Color Picker Property Editor UI to close https://github.com/umbraco/Umbraco-CMS/issues/17045.

* feat: forward the `readonly` attribute to the swatch* elements

* chore: rearrange properties in the element

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-14 08:12:55 +00:00
Jacob Overgaard f30e86efd3 Merge branch 'release/15.0' 2024-10-14 10:02:35 +02:00
db7a683dc9 Chore: Update's VS Code new UmbLitElement code snippet (#2449)
* Reworked VSCode code snippet for creating new `UmbLitElement` classes

* Removed ctor

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Marks `styles` as `readonly`

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Removes `elementName` constant

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-14 07:56:33 +00:00
Allen SmithandJacob Overgaard 3015c3813f Update instruction text for Collection elements. 2024-10-14 09:27:54 +02:00
Lee KelleherandGitHub 8e39004c59 Chore: Lee's code sweep (during Hacktoberfest '24) (#2450)
* Removed my outdated TODO comments

* Manifest Picker code tidy-up

* Attribute tidy-up

Things I'd picked up during development

* Corrects Storybook control type for `umb-localize` key

* Ran `npm run lint:fix`
2024-10-14 08:44:19 +02:00
Nhu DinhandGitHub 0551976126 V14 QA Added acceptance tests for notification message (#17195)
* Updated step to verify the notification message

* Added tests for notification message

* Bumped version

* Updated expected notification message

* Bumped version
2024-10-14 13:26:55 +07:00
Nhu DinhandGitHub da2a4d1713 V14 QA Added the acceptance tests for rendering content with textstring (#17247)
* Added tests for textstring in the rendered content

* Updated tests for rendering content with textstring

* Added tests for rendering content with numeric

* Added tests for rendering content with textarea

* Removed tests

* Bumped version

* Make all tests for rendering content run in the pipeline

* Make all smoke tests run in the pipeline
2024-10-14 11:57:52 +07:00
Matthew WiseandSebastiaan Janssen e4dbf4ce9f fix(#17220): added a sort to the mapping so the UI reflects the database 2024-10-12 18:07:29 +02:00
Ibrahim Muhammad NadaandGitHub dabaeac262 Making Culture Invariant When Validating Date to negate deferent formats (#17257)
* CultureInfo.InvariantCulture,

* adding unitTests by @Matthew-Wise
2024-10-12 14:33:17 +01:00
Jason ProtheroandMichael Latouche 421a3a9bd9 Fix stylecop errors with function parameters on separate lines 2024-10-12 02:00:56 +02:00
Niels Lyngsø 1d2e6bce8b remove unused import 2024-10-12 00:16:17 +02:00
Niels Lyngsø bae776eca8 remove return and clean up 2024-10-11 23:59:29 +02:00
Niels Lyngsø 020ad62581 destroy and clean up and more 2024-10-11 23:52:57 +02:00
Niels Lyngsø 8a74976d9b more destroy 2024-10-11 23:31:05 +02:00
Niels Lyngsø 578609c050 revert 2024-10-11 23:30:56 +02:00
Markus Johansson 9844f2d1cd Cleanup example and moved dashboard to content-section 2024-10-11 23:18:10 +02:00
Markus Johansson e5d23a5d65 Add ctrl alias to UmbBindServerValidationToFormControl 2024-10-11 23:10:53 +02:00
Markus Johansson dee2a25085 Extended validation demo with multiple tabs
(cherry picked from commit 207dd3e55c8b965ce688057efc36b1594f98f92d)
2024-10-11 23:05:50 +02:00
Niels Lyngsø df910a808e A11Y label for text box property editor input 2024-10-11 22:58:32 +02:00
Niels Lyngsø a67ad61e80 controller aliases 2024-10-11 22:37:51 +02:00
Niels Lyngsø 4feb7e77de clean up code 2024-10-11 22:11:04 +02:00
Niels Lyngsø d38da0eb80 runtime clean up 2024-10-11 21:26:01 +02:00
Niels Lyngsø 6e368faa27 remove console.log 2024-10-11 21:11:16 +02:00
Niels Lyngsø 5a2b4f6634 adapt createThisFor and fix grid inline property 2024-10-11 21:10:50 +02:00
Mads Rasmussen 5bddc07187 Merge branch 'v15/feature/reusable-table-column-layouts' into v15/feature/folder-children-collection-workspace-view 2024-10-11 21:06:35 +02:00
Mads Rasmussen 1472a6488d Update localize.element.stories.ts 2024-10-11 21:02:37 +02:00
Mads Rasmussen 497b6f94df move to entity action module 2024-10-11 20:50:31 +02:00
Mads RasmussenandGitHub d71c9af9c8 Merge branch 'main' into v15/feature/reusable-table-column-layouts 2024-10-11 20:42:30 +02:00
Niels Lyngsø b166b04ed0 remove temp files 2024-10-11 20:17:20 +02:00
Niels Lyngsø 13afb93968 Merge branch 'main' into v15/feature/property-dataset-properties-observable 2024-10-11 19:06:26 +02:00
Mads Rasmussen ad2bf52538 add entity actions 2024-10-11 17:59:03 +02:00
Mads Rasmussen 52a07b4815 Merge branch 'v15/feature/reusable-table-column-layouts' into v15/feature/folder-children-collection-workspace-view 2024-10-11 17:55:31 +02:00
Mads Rasmussen 27cc55c94b add entity actions to document and media 2024-10-11 17:55:14 +02:00
Mads Rasmussen 4ab86792a4 use global components 2024-10-11 16:49:43 +02:00
Mads Rasmussen 2ba9729bd0 delete unused code 2024-10-11 16:44:36 +02:00
Mads Rasmussen f3404bdc40 stop click event 2024-10-11 16:44:18 +02:00
Mads Rasmussen a3e4e891c2 align alias 2024-10-11 16:44:06 +02:00
Mads Rasmussen 96dbd95c03 Update member-group-table-collection-view.element.ts 2024-10-11 16:43:51 +02:00
Mads Rasmussen d49a7c0097 Update language-table-collection-view.element.ts 2024-10-11 16:43:45 +02:00
Mads Rasmussen e8a12820c1 Update member-table-collection-view.element.ts 2024-10-11 16:43:36 +02:00
Mads Rasmussen 628db16f39 Update user-group-table-collection-view.element.ts 2024-10-11 16:43:31 +02:00
Mads Rasmussen 2f6e00876b Update user-table-collection-view.element.ts 2024-10-11 16:43:24 +02:00
Niels LyngsøandGitHub 4d754c1bd2 Merge pull request #2410 from umbraco/v15/feature/select-all-option-in-publishing-dialogs
Feature: Select all variants option in publishing dialogs
2024-10-11 16:30:06 +02:00
Niels Lyngsø 1f56d3c263 small refactor 2024-10-11 16:22:59 +02:00
Mads Rasmussen 70080d895e use entity actions in extension insights 2024-10-11 15:49:00 +02:00
Mads Rasmussen 3d6529506d add boolean + entity actions global table column layouts 2024-10-11 15:48:36 +02:00
Mads Rasmussen 92a1313701 add element type column 2024-10-11 15:10:42 +02:00
Niels LyngsøandGitHub 4c48e81e19 Merge branch 'main' into example-validation-context-server-error 2024-10-11 14:45:39 +02:00
Mads RasmussenandGitHub a5df883776 Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-11 14:37:31 +02:00
Mads Rasmussen ae4d723266 Merge branch 'main' into v15/feature/folder-children-collection-workspace-view 2024-10-11 14:29:40 +02:00
Mads Rasmussen 91b41e78cd fix types 2024-10-11 14:29:13 +02:00
Mads Rasmussen da61d96618 remove double export 2024-10-11 14:25:59 +02:00
Mads Rasmussen acdf48bd84 clean up 2024-10-11 14:25:53 +02:00
Mads Rasmussen 34c10bae6e Update manifests.ts 2024-10-11 14:10:40 +02:00
Niels Lyngsø 49c9528ae9 fix rendering 2024-10-11 14:07:39 +02:00
Niels Lyngsø d6c6eddb3c parse config to block list elements 2024-10-11 13:23:14 +02:00
JesmoDevandJacob Overgaard a689b1c961 adds formatting to source blocks and excldues decorators 2024-10-11 13:15:48 +02:00
Niels Lyngsø b93914a489 Merge branch 'main' into v15/feature/property-dataset-properties-observable
# Conflicts:
#	src/packages/block/block/workspace/block-workspace.context.ts
2024-10-11 13:15:26 +02:00
Lone IversenandGitHub 9ddd64c429 Feature: Media Collection Placeholders (#2439)
* mediacollection placeholder logic

* media collection placeholder showing

* make observables available

* complete option for temp badge

* placeholder entity

* placeholder logic

* remove consolelog

* update todo and jdocs
2024-10-11 13:09:42 +02:00
Niels Lyngsø 01d6103822 lint 2024-10-11 13:02:58 +02:00
Mads Rasmussen 760be9fbdc clean up 2024-10-11 12:55:49 +02:00
Mads Rasmussen 4a60a0d72d clean up 2024-10-11 12:27:28 +02:00
Nhu DinhandGitHub 9f5867bdf8 V14 QA Fixing the failing acceptance tests in the pipeline v14 (#17214)
* Added more waits

* Updated assert steps

* Fixed api method name

* Added more waits to avoid the failing test in window

* Updated tests due to business changes

* Added more waits to avoid the failing tests in window

* Updated test due to Ui changes

* Bumped version

* Bumped version of test helper

* Bumped version
2024-10-11 12:15:49 +02:00
Mads RasmussenandGitHub 9d0391242a Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-11 12:12:58 +02:00
dependabot[bot]andJacob Overgaard 76930c4a0e Bump @types/chai from 4.3.17 to 5.0.0
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.3.17 to 5.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: "@types/chai"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 12:01:13 +02:00
Niels Lyngsø 7be0e0dcbd refactor inline 2024-10-11 11:58:18 +02:00
Niels Lyngsø bb878d33f9 get name from entry context use it for block workspace 2024-10-11 10:38:36 +02:00
Niels Lyngsø 536e703458 Merge branch 'main' into v15/feature/property-dataset-properties-observable 2024-10-11 10:35:34 +02:00
Niels LyngsøandGitHub f0422c6984 Merge pull request #2431 from umbraco/v15/hotfix/readonly-block-grid-property-editor-ui
Feature: Readonly Block Grid Property Editor UI
2024-10-11 10:35:33 +02:00
Niels Lyngsø c4d17a8d33 refactor block workspace and co 2024-10-11 10:35:18 +02:00
Mads Rasmussen eb999f6363 Merge branch 'main' into v15/hotfix/readonly-block-grid-property-editor-ui 2024-10-11 10:28:27 +02:00
Ronald BarendseandBjarke Berg 30b114d538 Fix ContentStore locking exceptions in async code (#17246)
* Add ContentCache test

* Use SemaphoreSlim as write lock

* Apply lock imrpovements to SnapDictionary

* Obsolete unused MonitorLock

(cherry picked from commit c3db3457e7)
2024-10-11 09:47:31 +02:00
Ronald BarendseandGitHub c3db3457e7 Fix ContentStore locking exceptions in async code (#17246)
* Add ContentCache test

* Use SemaphoreSlim as write lock

* Apply lock imrpovements to SnapDictionary

* Obsolete unused MonitorLock
2024-10-11 09:45:01 +02:00
3e620f2b68 Make Grid List Create Button Respect the Translation of a document type (#2435)
* fix label

* Make umb-block-workspace-view-edit Respect Translations as well

* fix umb-workspace-editor

* Update src/libs/localization-api/localization.controller.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/block/block-type/components/block-type-card/block-type-card.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/block/block/workspace/views/edit/block-workspace-view-edit.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Update src/packages/block/block/workspace/block-workspace-editor.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix: ensure strings are actual strings at runtime

* fix: allow LocalizationController#string to receive unknown values to support various usecases

* test: add tests for undefined|unknown scenarios

* fix: translate the name of the entity as well

* fix: localize create labels

* fix: localize only when data changes

* chore: fix sonarcloud issues

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-11 09:32:09 +02:00
Mads Rasmussen 5eb03d3a97 Merge branch 'main' into v15/feature/folder-children-collection-workspace-view 2024-10-11 08:57:17 +02:00
Mads RasmussenandGitHub b51b375a98 Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-11 08:54:32 +02:00
Jacob Overgaard 396fd6c3e4 Merge branch 'release/15.0' 2024-10-11 08:34:48 +02:00
72b0e6f30d Fix: Block Editors — use create labels and hide 'edit'-action if no properties (#2424)
use create labels and hide edit if no properties

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-11 06:32:48 +00:00
Markus Johansson b2c002ba09 fix: Removed constants from bind-server-validation controller #17231 2024-10-10 21:30:05 +02:00
Markus Johansson a7c9a024c6 Updated example again to use form. in path 2024-10-10 21:28:25 +02:00
Markus Johansson 33fde19770 Updated example for validation context 2024-10-10 21:12:27 +02:00
Markus Johansson ba96750ec0 Added example of multiple server errors in single context 2024-10-10 20:57:20 +02:00
Sven GeusensandGitHub 7787af2df1 Fix install url detection (#17241) 2024-10-10 18:09:11 +02:00
0bf6f85e25 Storybook 8 Upgrade (#2440)
* upgrade storybook to 8.3.5

* remove packages no longer needed

* fix: overwrite storybooks favicon

* chore: replace deprecated `Story` with `StoryFn`

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-10 14:16:24 +00:00
Jacob Overgaard 0489d879eb Merge remote-tracking branch 'origin/release/15.0' 2024-10-10 15:45:19 +02:00
Niels Lyngsø 7fef7ffcdb invariant dataset impl 2024-10-10 14:55:24 +02:00
Niels Lyngsø 4cefc40988 content dataset impl 2024-10-10 14:55:18 +02:00
Niels LyngsøandGitHub 44d5610a27 Merge pull request #2423 from umbraco/v15/feature/ufm-as-text
UFM as text
2024-10-10 14:54:10 +02:00
Niels Lyngsø 40db46c920 object-to-property-value-array 2024-10-10 14:53:37 +02:00
leekelleher 9f9b83a9dd Traverse the Shadow DOM children
to gather text content.
2024-10-10 13:45:50 +01:00
Niels Lyngsø 8ef41d6e02 refactor 2024-10-10 12:37:27 +02:00
Mads Rasmussen fe4da10202 reorganize entity location 2024-10-10 12:18:19 +02:00
Sebastiaan Janssen b839135e71 Merge branch 'v15/dev' into contrib 2024-10-10 11:22:00 +02:00
Bjarke Berg 2fa5ccc267 Update client 2024-10-10 11:14:19 +02:00
Bjarke Berg 6e0ab4dd7e Merge remote-tracking branch 'origin/release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.PublishedCache.HybridCache/Services/MediaCacheService.cs
#	src/Umbraco.Web.UI.Client
#	tests/Umbraco.Tests.Common/Builders/MediaTypeEditingBuilder.cs
2024-10-10 11:11:08 +02:00
Mads Rasmussen 639d57f1cb register modal routes for editing 2024-10-10 11:05:42 +02:00
Mads Rasmussen 6dd95d0a14 don't make pagination take up space 2024-10-10 10:48:48 +02:00
Mads Rasmussen 2a568b31fd Merge branch 'main' into v15/feature/folder-children-collection-workspace-view 2024-10-10 10:27:52 +02:00
Niels LyngsøandGitHub db54469c4a Merge pull request #2436 from umbraco/v15/feature/collection-empty-state
Bugfix: Collection empty state
2024-10-10 10:24:59 +02:00
Mads Rasmussen 170a122dc7 Merge branch 'v15/feature/collection-empty-state' into v15/feature/folder-children-collection-workspace-view 2024-10-10 09:54:23 +02:00
Mads Rasmussen a81f4386e3 prevent empty state flash 2024-10-10 09:41:22 +02:00
Mads Rasmussen 9084ef3693 add todo 2024-10-10 08:48:39 +02:00
Mads Rasmussen 61385e502f hide router instead of removing it 2024-10-09 22:18:06 +02:00
Mads Rasmussen 30371a5d87 remove custom empty state implementations 2024-10-09 20:31:34 +02:00
Mads Rasmussen bf62b4131e render collection empty state if there are no items 2024-10-09 20:12:47 +02:00
Mads Rasmussen 2cc9166c60 export consts + temp conditions for testing purposes 2024-10-09 18:20:18 +02:00
Jacob Overgaard 302ab14b3f Merge branch 'release/15.0' 2024-10-09 17:40:41 +02:00
Mads Rasmussen bfc0c0de36 split workspace into folders 2024-10-09 17:37:33 +02:00
Mads Rasmussen bd13662635 wip render tree item children in collection 2024-10-09 16:11:05 +02:00
Mads Rasmussen bc31895eee Merge branch 'main' into v15/feature/folder-children-collection-workspace-view 2024-10-09 15:10:53 +02:00
Mads Rasmussen 5709b09f4c Update block-workspace.context.ts 2024-10-09 14:54:46 +02:00
Mads RasmussenandGitHub 112d7b981e Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-09 14:51:30 +02:00
Mads Rasmussen 8f8694cb46 Merge branch 'main' into v15/hotfix/readonly-block-grid-property-editor-ui 2024-10-09 14:50:44 +02:00
Mads Rasmussen ee68f17533 update unique 2024-10-09 14:48:13 +02:00
Mads Rasmussen 0b91c782b9 hide inline create buttons when readonly 2024-10-09 14:32:24 +02:00
Niels Lyngsø b899228bcc Merge branch 'main' into v15/feature/property-dataset-properties-observable 2024-10-09 14:27:21 +02:00
Mads Rasmussen d856f8fc95 remove inline create button when readonly 2024-10-09 14:24:06 +02:00
Wojciech WróbelandJacob Overgaard 3730109cce Fixed issue #17225. The 'code' html element added as valid to RTE configuration 2024-10-09 14:19:38 +02:00
e5a99d423c Feature: Temporary Manager Chunksize and Callback (#2432)
Allow to set a chunk size and batch up uploads

Co-authored-by: Nikolaj Brask-Nielsen <nikolajgive@gmail.com>
2024-10-09 12:10:52 +00:00
Mads Rasmussen 650f386888 Update block-grid-entries.element.ts 2024-10-09 14:08:00 +02:00
Mads Rasmussen 70fc6472b9 rename internal method 2024-10-09 13:51:09 +02:00
Mads Rasmussen a13216d3ff observe readonly 2024-10-09 13:45:34 +02:00
Mads Rasmussen b3b192eaa0 split render method 2024-10-09 13:44:23 +02:00
Mads Rasmussen 60b8d7e320 add readonly state manager to block entry context 2024-10-09 13:42:31 +02:00
Mads Rasmussen 89e7ed9a2f remove prop implementation 2024-10-09 13:42:10 +02:00
Mads Rasmussen 764128b816 disable buttons when readonly 2024-10-09 13:11:48 +02:00
Mads Rasmussen 4364a701d4 observe readonly 2024-10-09 13:10:29 +02:00
Niels Lyngsø b588cc890c implementation in progress 2024-10-09 12:30:00 +02:00
Niels Lyngsø c8cee5c028 JSDocs + await 2024-10-09 12:15:16 +02:00
Niels Lyngsø 685ed0b65a JSDocs 2024-10-09 12:15:07 +02:00
Niels Lyngsø ae0d5416e8 optimize observable part 2024-10-09 12:15:01 +02:00
Niels Lyngsø a0e050d090 implement properties observable for base property dataset 2024-10-09 12:14:49 +02:00
Mads Rasmussen efe15163da remove debugger 2024-10-09 12:14:33 +02:00
Mads Rasmussen f1e8ec2750 disable create/paste buttons instead of removing them 2024-10-09 12:14:17 +02:00
Mads Rasmussen 26f83d73b2 add specific localization to save modal title 2024-10-09 11:52:53 +02:00
Mads Rasmussen 771b55cdaf Revert "update save headline"
This reverts commit eb0ebb20be.
2024-10-09 11:33:36 +02:00
Jacob Overgaard fb67d30bfb Merge branch 'release/15.0' 2024-10-09 11:19:42 +02:00
Mads RasmussenandGitHub d5daa3223e Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-09 10:48:37 +02:00
Niels LyngsøandGitHub 73177f0cc6 Merge pull request #2409 from umbraco/v15/feature/use-uui-ref-href-for-document-type-input
V15/feature/use uui ref href for document type input
2024-10-09 10:45:45 +02:00
Mads RasmussenandGitHub 7fdb75e790 Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-09 10:32:00 +02:00
Niels LyngsøandGitHub 3cfd091f5d Merge pull request #2425 from umbraco/v15/feature/minor-custom-view-example-update
Chore: Block Custom View — update comment and example
2024-10-09 10:30:58 +02:00
ccd02cf2a9 Fix internal class being returned from media cache service (#17213)
* update backoffice submodule

* update backoffice submodule

* Fix internal class being returned from media cache service

Return the correct models from the media cache service

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-10-09 08:39:22 +02:00
0e07decfd8 Bugfix: Allow/disallow multiple files for dropzone (#2429)
* Bugfix: Allow/disallow multiple files for dropzone

---------

Co-authored-by: Nikolaj Brask-Nielsen <nikolajgive@gmail.com>
2024-10-09 08:31:33 +02:00
Lone IversenandGitHub 5173ff4de9 Bugfix: Uploadfield file preview shows file extension (#2426) 2024-10-08 15:56:53 +01:00
b65993c97a V15: Upload folders in dropzone (#2116)
* handling of folders in dropzone

* consolelog

* load bar

* request folders, skip OS files, cleanup

* cleanup

* deprecated

* remove comments dropzone

* remove unused interface

* mime util

* setup mime and constructor

* update

* setup types and saving

* remove observe

* rename method in repo

* destroy first when total is completed

* ordering and cleanup

* comment

* move logic back to dropzone manager

* document and media type imports

* scaffold

* update util

* update types

* update progress, cleanup in dropzone manager

* from switch to if statement

* sonarcloud pratice

* css disabled

* Fixed @sonarcloud issues

* Added deprecation notices on renamed methods

* file extension

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-10-08 12:57:06 +00:00
Niels Lyngsø 77cb1e39a5 update comment and example 2024-10-08 13:36:56 +02:00
Nikolaj Geisle b814608c06 Bump version 2024-10-08 12:34:23 +02:00
Niels Lyngsø e71440b4c7 rename method to toString() 2024-10-08 08:25:50 +02:00
Niels Lyngsø 2afcf96614 move light-dom declaration to base element 2024-10-08 07:53:07 +02:00
Niels Lyngsø ab3dc36d9e ufm as text 2024-10-07 21:31:18 +02:00
Mads Rasmussen 4aa83ffced set readonly state on block manager from ui editor elements 2024-10-07 15:55:49 +02:00
Mads Rasmussen 6ecc3de2ea let block context observe block manager 2024-10-07 15:55:33 +02:00
Mads Rasmussen 014952503a add readonly state manager to block manager 2024-10-07 15:55:17 +02:00
Jacob Overgaard ed63b51e46 update backoffice submodule 2024-10-07 15:46:21 +02:00
Jacob Overgaard ea608cc630 update backoffice submodule 2024-10-07 15:46:06 +02:00
Niels LyngsøandGitHub faa76000bb Merge pull request #2416 from umbraco/v15/feature/improve-icon-generation
Feat: improve generation feedback
2024-10-07 15:38:58 +02:00
Jacob OvergaardandGitHub d809f77661 Merge pull request #2422 from umbraco/v15/bugfix/sync-en
V15: Ensure all localization variables are present in the default language
2024-10-07 15:02:58 +02:00
Jacob Overgaard f4fb118b9a fix: ensure the fallback language en.ts has all of the same variables as the other languages, namely en-us had a few new variables 2024-10-07 14:45:47 +02:00
Jacob Overgaard 69f01c7a59 chore: eslint 2024-10-07 14:45:04 +02:00
Mads Rasmussen 7272f03724 add readonly prop 2024-10-07 14:12:31 +02:00
Mads Rasmussen fe2e84348d remove unused constructor 2024-10-07 14:12:17 +02:00
2a58e43216 Feature: Adds the missing dictionary to search (#2419)
* Feature: Adds the missing dictionary to search

* Tweaks import sorting

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-10-07 11:56:00 +00:00
Jacob Overgaard b1291d5757 update backoffice submodule 2024-10-07 13:45:33 +02:00
Jacob Overgaard 4cfe498628 update backoffice submodule 2024-10-07 13:45:04 +02:00
Jacob Overgaard 42912dd5c9 update backoffice submodule 2024-10-07 13:44:18 +02:00
Jacob Overgaard b9bf22481f chore: fix linting 2024-10-07 13:22:59 +02:00
Mads Rasmussen 59d4d18db5 update manifest with supportReadOnly 2024-10-07 13:22:30 +02:00
Jacob OvergaardandGitHub 63f855764f Merge commit from fork
* fix: remove unwanted HTML from translation values

* feat: add a general sanitizeHTML function

* fix: use the `sanitizeHTML` function where values are showed in the Backoffice
2024-10-07 13:14:49 +02:00
Lone IversenandGitHub bd30a2e047 Feature: Dictionary Searchbar (#2415) 2024-10-07 11:42:01 +01:00
Nikolaj Geisle 9bab74d30e Bump version.json 2024-10-07 11:55:34 +02:00
Nikolaj Geisle 865787db1d Bump version.json 2024-10-07 11:48:41 +02:00
Sean ThorneandGitHub cde3b2ad67 style: increase z-index of element in installer layout (#2413) 2024-10-07 11:29:48 +02:00
Niels LyngsøandGitHub 93a652ee86 Merge branch 'main' into v15/feature/improve-icon-generation 2024-10-07 11:27:24 +02:00
Niels Lyngsø 6131d739ed improve generation feedback 2024-10-07 11:26:49 +02:00
Ibrahim Muhammad NadaandGitHub 5024fff539 fix: Tweak Arabic translations (#2414)
* tweak translations

* commit

* fix الأطفال
2024-10-07 11:26:33 +02:00
Mads Rasmussen c7c3a58956 wip 2024-10-07 09:50:00 +02:00
Mads RasmussenandGitHub 83ca4cb22d Merge pull request #2411 from umbraco/v15/feature/property-type-cleanup
Chore: Property Type Clean up
2024-10-07 09:17:26 +02:00
Niels Lyngsø b6ebf04bd5 clean up 2024-10-04 15:33:58 +02:00
Jacob Overgaard e538de9355 update backoffice submodule 2024-10-04 13:23:39 +02:00
Mads RasmussenandGitHub 8d70e9ccd6 Merge branch 'main' into v15/feature/select-all-option-in-publishing-dialogs 2024-10-04 13:04:02 +02:00
Mads Rasmussen be813bcd14 Update document-variant-language-picker.element.ts 2024-10-04 13:02:14 +02:00
Niels Lyngsø e31352a25b clean up 2024-10-04 12:29:01 +02:00
Niels Lyngsø 0fae1e012d remove id attr 2024-10-04 12:28:28 +02:00
Niels Lyngsø 4752744bd9 simpler code 2024-10-04 12:27:24 +02:00
Niels Lyngsø c85faf1632 use Path for path generation 2024-10-04 12:27:06 +02:00
Niels Lyngsø 7f13076a1f use href, remove edit button 2024-10-04 12:24:49 +02:00
Mads Rasmussen 12d1d766d1 localize select all 2024-10-04 12:17:55 +02:00
Mads Rasmussen b1f6768ab3 add select all option to schedule 2024-10-04 12:06:16 +02:00
Mads Rasmussen 7df449538b fix spacing 2024-10-04 11:42:03 +02:00
Mads Rasmussen eb0ebb20be update save headline 2024-10-04 11:15:07 +02:00
Mads Rasmussen 8dd5263dae toggle checkbox when everything is selected 2024-10-04 11:13:22 +02:00
Mads Rasmussen cffed6fdb2 filter uniques 2024-10-04 10:45:07 +02:00
Mads Rasmussen 72f9bedf15 add get filter method 2024-10-04 10:36:44 +02:00
Niels LyngsøandGitHub 3c88f8cc0a Merge pull request #2405 from umbraco/v15.1/chore/test-string-functions
Chore: Add unit tests for string functions
2024-10-04 10:07:23 +02:00
Mads Rasmussen bf0a9d5b34 prevent selection if it contains a not allowed item 2024-10-04 10:02:26 +02:00
Mads Rasmussen 45aec9a8a2 Merge branch 'v15.1/chore/test-string-functions' of https://github.com/umbraco/Umbraco.CMS.Backoffice into v15.1/chore/test-string-functions 2024-10-04 09:21:54 +02:00
Mads Rasmussen 68c39aaecb Update path-folder-name.function.ts 2024-10-04 09:21:49 +02:00
Mads RasmussenandGitHub 7c70f3b1e0 Merge branch 'main' into v15.1/chore/test-string-functions 2024-10-04 09:18:49 +02:00
Niels LyngsøandGitHub 4cf1784aa5 Merge pull request #2205 from EmanuelGustafzon/temp/16511
Issue 16511, add time for when user last logged in, in the grid user card
2024-10-04 09:11:50 +02:00
Niels Lyngsø 2a3bad0cb7 Merge branch 'main' into temp/16511 2024-10-04 09:05:21 +02:00
asawyermarathonandGitHub c6ebbc706b feat: Added more padding/gap in context menu, #16696 (#2407) 2024-10-04 08:58:22 +02:00
Niels LyngsøandGitHub fb22ed4588 Merge pull request #2408 from umbraco/v15/feature/publish-modal-mandatory
Feature: Handle mandatory languages in publish'ish dialogs
2024-10-04 08:55:50 +02:00
Niels LyngsøandGitHub 3624a349b7 Merge branch 'main' into v15.1/chore/test-string-functions 2024-10-04 08:54:12 +02:00
Niels LyngsøandGitHub 2c6cec41e3 Merge pull request #2404 from umbraco/v15.1/chore/debounce-test
Chore: Add unit tests for the debounce function
2024-10-04 08:53:32 +02:00
Niels LyngsøandGitHub 190f6f6320 Merge pull request #2402 from umbraco/v15.1/chore/state-manager-tests
Chore: Add unit tests for the state manager
2024-10-04 08:52:47 +02:00
Niels LyngsøandGitHub 8a76c7c3df Merge pull request #2403 from umbraco/v15.1/chore/math-tests
Chore: Add unit tests for math functions
2024-10-04 08:52:30 +02:00
Niels LyngsøandGitHub 01828512e5 Merge pull request #2406 from umbraco/feature/add-ar-language
Added arabic language
2024-10-04 08:51:44 +02:00
Mads Rasmussen 89f20946dc add select all option 2024-10-04 08:31:31 +02:00
Niels Lyngsø 65fa26a440 move comments 2024-10-03 21:04:07 +02:00
Niels Lyngsø 1f76a3a299 use nothing 2024-10-03 20:58:36 +02:00
Niels LyngsøandGitHub d0bbc7e850 Update settings.json 2024-10-03 20:48:33 +02:00
Niels Lyngsø 1c76ed4e18 require all or no mandatory for unpublishing 2024-10-03 20:44:56 +02:00
Niels Lyngsø 2baf64597b TODO 2024-10-03 20:44:33 +02:00
Niels Lyngsø a8659208f4 mark word as begin okay 2024-10-03 20:44:21 +02:00
Niels Lyngsø 14b0a8b7df JSDocs 2024-10-03 20:39:39 +02:00
Niels Lyngsø e7d838f29d make static again 2024-10-03 20:39:33 +02:00
Niels Lyngsø 8b2228594a publish with descendants require mandatory languages 2024-10-03 20:13:05 +02:00
Niels Lyngsø b39670716c publish modal, require not published mandatory languages 2024-10-03 20:12:28 +02:00
Bjarke Berg d2ae0b235d Move to top on top due to ar being sorted before bs 2024-10-03 09:43:54 +02:00
Bjarke Berg 51f2bf2c5a Added arabic language (I have no clue about the text in the file, btw) 2024-10-03 09:41:18 +02:00
Bjarke Berg c58a7b7b23 Merge remote-tracking branch 'origin/release/14.3' into v14/dev 2024-10-03 07:50:18 +02:00
Mads Rasmussen 218cb435fa Create string-or-string-array-contains.function.test.ts 2024-10-02 20:32:41 +02:00
Mads Rasmussen b73a2fe644 add docs 2024-10-02 20:32:37 +02:00
Mads Rasmussen 50f98f0c6b Create increment-string.function.test.ts 2024-10-02 20:25:25 +02:00
Mads Rasmussen 77c143cc51 add docs 2024-10-02 20:25:22 +02:00
Mads Rasmussen 04bfbdb6e8 clean up 2024-10-02 20:25:14 +02:00
Mads Rasmussen c2bf077521 Create from-camel-case.function.test.ts 2024-10-02 19:11:08 +02:00
Mads Rasmussen 81c7a92ae8 clean up files 2024-10-02 18:47:45 +02:00
Mads Rasmussen 6980ff015d Create debounce.function.test.ts 2024-10-02 18:29:59 +02:00
Mads Rasmussen 70780cadd2 Create inverse-lerp.test.ts 2024-10-02 18:21:31 +02:00
Mads Rasmussen ceae6781a0 Create lerp.test.ts 2024-10-02 18:18:49 +02:00
Mads Rasmussen 8d34e53bbc add tests 2024-10-02 16:44:19 +02:00
Mads Rasmussen 730bc34ac9 add tests 2024-10-02 16:38:35 +02:00
Mads Rasmussen bc9b55dbc5 add tests for isWithinRect 2024-10-02 16:15:57 +02:00
Mads Rasmussen c6eaa33577 add tests for getAccumulatedValueOfIndex 2024-10-02 15:14:30 +02:00
Mads Rasmussen 9371923762 add tests for distance 2024-10-02 14:38:17 +02:00
Sebastiaan Janssen 4090829fe8 Ignore warnings about using obsolete members in Umbraco.Tests.UnitTests.csproj and Umbraco.Core.csproj
LocalFileSystemTemporaryFileRepository: Don't pass null to a method that doesn't accept nullable argument - https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2264
Fix remaining warning marked as error
2024-10-02 14:37:37 +02:00
Mads Rasmussen 205254cdb0 add clamp tests 2024-10-02 14:17:43 +02:00
Mads Rasmussen 9423cf069f add tests for the state manager 2024-10-02 13:58:41 +02:00
Jacob Overgaard 0a70beb1a9 Merge branch 'v15/dev' into contrib 2024-10-02 13:42:07 +02:00
Jacob Overgaard 8a65f63434 Merge branch 'release/15.0' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client
#	tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCacheTemplateTests.cs
#	version.json
2024-10-02 13:39:33 +02:00
e15b7f2214 V15 QA Hybrid Cache added media cache tests and fixed media cache refreshing (#17160)
* Add cache refresher

* make public as needed for serialization

* Use content type cache to get content type out

* Refactor to use ContentCacheNode model, that goes in the memory cache

* Remove content node kit as its not needed

* Implement tests for ensuring caching

* Implement better asserts

* Implement published property

* Refactor to use mapping

* Rename to document tests

* Update to test properties

* Create more tests

* Refactor mock tests into own file

* Update property test

* Fix published version of content

* Change default cache level to elements

* Refactor to always have draft

* Refactor to not use PublishedModelFactory

* Added tests

* Added and updated tests

* Fixed tests

* Don't return empty object with id

* More tests

* Added key

* Another key

* Refactor CacheService to be responsible for using the hybrid cache

* Use notification handler to remove deleted content from cache

* Add more tests for missing functions

* Implement missing methods

* Remove HasContent as it pertains to routing

* Fik up test

* formatting

* refactor variable names

* Implement variant tests

* Map all the published content properties

* Get item out of cache first, to assert updated

* Implement member cache

* Add member test

* Implement media cache

* Implement property tests for media tests

* Refactor tests to use extension method

* Add more media tests

* Refactor properties to no longer have element caching

* Don't use property cache level

* Start implementing seeding

* Only seed when main

* Add Immutable for performance

* Implement permanent seeding of content

* Implement cache settings

* Implement tests for seeding

* Update package version

* start refactoring nurepo

* Refactor so draft & published nodes are cached individually

* Refactor RefreshContent to take node instead of IContent

* Refactor media to also use cache nodes

* Remove member from repo as it isn't cached

* Refactor media to not include preview, as media has no draft

* create new benchmark project

* POC Integration benchmarks with custom api controllers

* Start implementing content picker tests

* Implement domain cache

* Rework content cache to implement interface

* Start implementing elements cache

* Implement published snapshot service

* Publish snapshot tests

* Use snapshot for elements cache

* Create test proving we don't clear cache when updating content picker

* Clear entire elements cache

* Remove properties from element cache, when content gets updated.

* Rename methods to async

* Refactor to use old cache interfaces instead of new ones

* Remove snapshot, as it is no longer needed

* Fix tests building

* Refactor domaincache to not have snapshots

* Delete benchmarks

* Delete benchmarks

* Add HybridCacheProject to Umbraco

* Add comment to route value transformer

* Implement is draft

* remove snapshot from property

* V15 updated the hybrid caching integration tests to use ContentEditingService (#16947)

* Added builder extension withParentKey

* Created builder with ContentEditingService

* Added usage of the ContentEditingService to SETUP

* Started using ContentEditingService builder in tests

* Updated builder extensions

* Fixed builder

* Clean up

* Clean up, not done

* Added Ids

* Remove entries from cache on delete

* Fix up seeding logic

* Don't register hybrid cache twice

* Change seeded entry options

* Update hybrid cache package

* Fix up published property to work with delivery api again

* Fix dependency injection to work with tests

* Fix naming

* Dont make caches nullable

* Make content node sealed

* Remove path and other unused from content node

* Remove hacky 2 phase ctor

* Refactor to actually set content templates

* Remove umbraco context

* Remove "HasBy" methods

* rename property data

* Delete obsolete legacy stuff

* Add todo for making expiration configurable

* Add todo in UmbracoContext

* Add clarifying comment in content factory

* Remove xml stuff from published property

* Fix according to review

* Make content type cache injectible

* Make content type cache injectible

* Rename to database cache repository

* Rename to document cache

* Add TODO

* Refactor to async

* Rename to async

* Make everything async

* Remove duplicate line from json schema

* Move Hybrid cache project

* Remove leftover file

* Refactor to use keys

* Refactor published content to no longer have content data, as it is on the node itself

* Refactor to member to use proper content node ctor

* Move tests to own folder

* Add immutable objects to property and content data for performance

* Make property data public

* Fix member caching to be singleton

* Obsolete GetContentType

* Remove todo

* Fix naming

* Fix lots of exposed errors due to scope test

* Add final scope tests

* Rename to document cache service

* Rename test files

* Create new doc type tests

* Add ignore to tests

* Start implementing refresh for content type save

* Clear contenttype cache when contenttype is updated

* Fix test

Teh contenttype is not upated unless the property is dirty

* Updated tests

* Added tests

* Use init for ContentSourceDto

* Startup of setup

* Fix get by key in PublishedContentTypeCache

* Remove ContentType from PublishedContentTypeCache when contenttype is deleted

* Created interfaces for the builder with the necessary properties

* Created builder for PropertyTypeContainer

* Created builder for PropertyTypeEditing

* Created builder for PropertyTypeValidationEditing

* Made adjustments to the builder

* Updated name of usage

* Commented out to test

* Cleaned up builders

* Updated integration test setup

* Moved tests

* Added interface

* Add IDocumentSeedKeyProvider and migrate existing logic to seed key provider

* Added functionality to the INavigationQueryService to get root keys

* Fixed issue with navigation

* Created helper to Convert a IContentType to ContentTypeUpdateModel

* Added interfaces

* Added builder

* Cleaned up builders and added fixes

* Added tests for PublishedContentTypeCache

* Applied changes in builder

* Add BreadthFirstKeyProvider

* Use ISet for seedkey providers

* Implement GetContentSource by key

* Seed the cache with keys provided by seed key providers

* Builder updates

* Test setup updates

* Updated tests

* Dont require contenttype keys for seeding

* Fix cache settings

* Don't inject cache settings into SeedingNotificationHandler

* Fix tests

* Use enlistment for setting updated cache item

* Pin seeded nodes for longer

* Fix BreadthFirstKeyProvider

* Fix ContentTypeSeedKeyProvider

* Fix tests

* Only seed published documents

* Only cache published if contentCacheNode is not draft

* Fix incorrect templateId

* Removed unnecessary setup

* initialized value

* Fixed template test

* Removed test

* Updated tests

* Removed code that was not used

* Removed unused cacheSettings

* Re-organize to support media cache seeding

* Add MediaBreadthFirstKeyProvider

* Seed media

* Don't use IdKeyMap when removing content from cache

* Don't clear IdKeyMap in DocumentCacheService

* Add unit tests

* Don't use IdKeyMap when deleting media

* Add default value to timespan

* Use cancellation tokens when doing loop

* Fixed Models Builder error

* Builder testing

* Media test

* Created builders

* Updated method from getByKey to getById to maintain structure

* Updated test setup

* Moved tests

* Cleaned up builders

* Added helper

* Added space

* Updated tests

* Cleaned setup

* Added tests for MediaTypes

* Uncommented tests

* Added builder extensions

* Added interfaces for builder methods

* Updated to use interface pattern

* Updated name

* Used builder

* Cleaned up test

* Added media scope tests

* Removed PropertyTypeModelBuilder

* moved PropertyTypeModelBuilder to PropertyTypeEditingBuilder

* Removed constructor

* Removed duplicate

* Fixed naming

* Reverted

* Removed space

* Added todos

* Removed only run on linux

* Commet out DocumentHybridCacheTemplateTest again

This is fixed in the release branch

* Update media when media type is updated

* Remove todo the tests pass now

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-10-02 13:36:26 +02:00
Sebastiaan Janssen f0c1a49410 Fix failing CodeQL due to needing .NET 9 2024-10-02 12:58:29 +02:00
Sebastiaan Janssen c2d83808a5 Merge branch 'v15/dev' into contrib
# Conflicts:
#	src/Umbraco.Infrastructure/PublishedContentQuery.cs
#	src/Umbraco.PublishedCache.NuCache/ContentCache.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentNodeKitSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs
#	src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/PublishedCache/PublishContentCacheTests.cs
2024-10-02 12:35:20 +02:00
Jacob Overgaard f88e2c5be2 internal: rename category in github release notes 2024-10-02 12:34:23 +02:00
Jacob Overgaard a8d6342530 Merge branch 'release/15.0' 2024-10-02 12:33:48 +02:00
MoleandGitHub 6985187d4d Update dotnet version in template (#17170) 2024-10-02 09:08:30 +02:00
Jacob Overgaard 390a934d65 chore: set version to 15.1.0 2024-10-02 07:57:15 +02:00
Bjarke Berg 32c00f9a09 Merge remote-tracking branch 'origin/release/14.3' into release/14.3 2024-10-01 17:40:35 +02:00
Nhu DinhandGitHub 31399c3b15 V15 Fixed the failing smoke tests in the pipeline v15 (#17158)
* Fixed the failing tests of Member Group due to UI changes

* Fixed the failing tests of Member due to UI changes

* Fixed the failing tests of User due to UI changes

* Fixed failing tests for Dictionary and Document Type

* Updated tests due to test helper changes

* Bumped version

* Updated assert steps due to the response changes

* Updated tests due to api helper changes

* Updated tests due to UI changes

* Fixed tests for delete partial view

* Fixed tests

* Added more waits

* Updated assert steps

* Fixed failing tests for Block Grid and Media

* Added more waits

* Added skip tests

* Removed waits time

* Updated assertion steps for User

* Added todo

* Updated tests due to api helper changes

* Bumped version

* Added skip tests
2024-10-01 20:49:17 +07:00
Jacob Overgaard 5e4d15be93 bump version to 15.1.0 2024-10-01 15:22:19 +02:00
Bjarke Berg 348f1f2bae Change webhook permissions to require webhook tree access for all endpoints 2024-10-01 07:58:41 +02:00
Jacob Overgaard 73c8d8e0f9 Merge remote-tracking branch 'origin/release/14.3' into release/14.3 2024-09-30 10:24:17 +02:00
Jacob Overgaard 2d7c00f27f update backoffice submodule 2024-09-30 10:24:03 +02:00
Andreas ZerbstandGitHub 4fae91d55c V14 QA added content tests with list view content (#17115)
* Added tests for List view

* More tests

* Added rest of test

* Bumped version

* Fixed failing tests

* Added tests and fixed comments

* Cleaned up tests

* Bumped testhelpers

* Bumped again

* Set condition to only run sql server when enabled

* Run all content test

* Reverted changes
2024-09-27 17:32:44 +02:00
Sebastiaan Janssen 8d81c70391 Merge branch 'v15/dev' into contrib 2024-09-27 09:09:18 +02:00
Sebastiaan Janssen 6c08f69801 Merge branch 'contrib' into v14/dev 2024-09-27 09:04:32 +02:00
Sebastiaan Janssen 910fb4062b Merge branch 'v14/dev' into contrib 2024-09-27 08:54:49 +02:00
Bjarke Berg f2e4e44db1 Merge remote-tracking branch 'origin/release/14.3' into v14/dev 2024-09-27 07:47:59 +02:00
Bjarke Berg d57d12d54d Fixed imagesharp 2 also 2024-09-27 07:43:12 +02:00
NguyenThuyLanandBjarke Berg 46604909be Fix error format code (#17146)
* update ImageSharpMiddlewareOption for fixing invalid width and height (#17126)

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>

* Fix issue format parameters

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>

(cherry picked from commit 9a12eea495)
2024-09-27 07:42:30 +02:00
9a12eea495 Fix error format code (#17146)
* update ImageSharpMiddlewareOption for fixing invalid width and height (#17126)

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>

* Fix issue format parameters

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2024-09-27 07:41:55 +02:00
NguyenThuyLanandBjarke Berg 762d72b018 update ImageSharpMiddlewareOption for fixing invalid width and height (#17126)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
(cherry picked from commit 9b19d63a6a)
2024-09-27 07:40:42 +02:00
Nhu DinhandGitHub 45f43a6b7a V14 Added Content tests with different document types properties (#17131)
* Added tests for Allow At Root property

* Added Content tests for Allowed Child Nodes property

* Added Content tests for the Allow at root property

* Added Content tests for the Allowed child node property

* Added Content tests for the Collection property

* Added Content tests with allow vary by culture

* Added more waits

* Updated tests due to api helper changes

* Added Content tests with allowed templates

* Bumped version of test helper

* Updated code due to api helper changes

* Fixed naming
2024-09-27 10:36:15 +07:00
Jacob Overgaard c9c9374de1 update backoffice submodule 2024-09-26 14:39:12 +02:00
Jacob Overgaard 6bd558c016 update backoffice submodule 2024-09-26 14:38:27 +02:00
Bjarke Berg f1cddd91c6 Missing context complete
(cherry picked from commit fdb9cfa3e7)
2024-09-26 09:55:19 +02:00
Bjarke Berg fdb9cfa3e7 Missing context complete 2024-09-26 09:54:43 +02:00
Bjarke Berg 63a487bc0b Merge remote-tracking branch 'origin/v13/dev' into v13/dev 2024-09-26 07:54:43 +02:00
Ronald BarendseandBjarke Berg a40eadcfce Add RemoveDefault() extension method to fluent API for CMS webhook events (#15424)
* Add RemoveDefault extension method

* Move default webhook event types to single list

(cherry picked from commit 8f26263178)
2024-09-26 07:54:26 +02:00
Ronald BarendseandGitHub 8f26263178 Add RemoveDefault() extension method to fluent API for CMS webhook events (#15424)
* Add RemoveDefault extension method

* Move default webhook event types to single list
2024-09-26 07:52:39 +02:00
9b19d63a6a update ImageSharpMiddlewareOption for fixing invalid width and height (#17126)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2024-09-25 13:19:09 +02:00
dependabot[bot]andJacob Overgaard 99125ef5cc Bump rollup from 4.21.3 to 4.22.4 in /src/Umbraco.Web.UI.Login
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.3 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.3...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-24 14:43:07 +02:00
Emma L GarlandandGitHub ac575662ac Resolved more warnings, and marked more warning types as errors (#16991)
* Fix warnings SA1111, SA1028, SA1500, IDE1270  in Umbraco.Web.Website, and updated rules.

* Remove warnings: IDE0270: Null check can be simplified

* More SqlServer project warnings resolved

* CS0105 namespace appeared already

* Suppress warning until implementation:

#pragma warning disable CS0162 // Unreachable code detected
#pragma warning disable CS0618 // Type or member is obsolete

CS0162 remove unreachable code
SA1028 remove trailing whitespace
SA1106 no empty statements
CS1570 malformed XML
CS1572 corrected xml parameter
CS1573 param tag added
IDE0007 var not explicit
IDE0008 explicit not var
IDE0057 simplify substring
IDE0074 compound assignment
CA1825 array.empty

Down to 3479 warnings

* - SA1116, SA117 params on same line
- IDE0057 substring simplified

Specific warnings for Umbraco.Tests.Benchmarks

* Fixed IDE0074 compound assignment and added specific warnings for Umbraco.Tests.Common

* Specific warnings for Umbraco.Tests.Integration and Umbraco.Tests.Common

Fixed:

- SA1111, SA1116, SA117 params and line formatting (not all as there are many)
- SA1122 string.Empty
- IDE0057 simplify substring
- IDE0044,IDE0044 make field readonly
- IDE1006 naming rule violation (add _)
- SA1111 closing parenthesis on line of last parameter
- SA1649 filename match type name
- SA1312,SA1306 lowercase variable and field names

* Fixed various warnings where they are more straight-forward, including:

- SA1649 file name match type name
- SA111 parenthesis on line of last parameter
- IDE0028 simplify collection initializer
- SA1306 lower-case letter field
- IDE044 readonly field
- SA1122 string.Empty
- SA1116 params same line
- IDE1006 upper casing
- IDE0041 simplify null check

Updated the following projects to only list their remaining specific warning codes:

- Umbraco.Tests.UnitTests

Typo in `Umbraco.Web.Website` project

* Reverted test change

* Now 1556 warnings.

Fixed various warnings where they are more straight-forward, including:

- SA1111/SA1116/SA1119 parenthesis
- SA1117 params
- SA1312 lowercase variable
- SA1121 built-in type
- SA1500/SA1513/SA1503 formatting braces
- SA1400 declare access modifier
- SA1122 string.Empty
- SA1310 no underscore
- IDE0049 name simplified
- IDE0057 simplify substring
- IDE0074 compound assignment
- IDE0032 use auto-property
- IDE0037 simplify member name
- IDE0008 explicit type not var
- IDE0016/IDE0270/IDE0041 simplify null checks
- IDE0048/SA1407 clarity in arithmetic
- IDE1006 correct param names
- IDE0042 deconstruct variable
- IDE0044 readonly
- IDE0018 inline variable declarations
- IDE0074/IDE0054 compound assignment
- IDE1006 naming
- CS1573 param XML
- CS0168 unused variable

Comment formatting in project files for consistency.

Updated all projects to only list remaining specific warning codes as warnings instead of errors (errors is now default).

* Type not var, and more warning exceptions

* Tweaked merge issue, readded comment about rollback

* Readded comment re rollback.

* Readded comments

* Comment tweak

* Comment tweak
2024-09-24 12:56:28 +01:00
Terence BurridgeandSebastiaan Janssen 6939472f37 Update valid reasons not to have a template on a content node to include having a redirect field
Cherry-picked from: 385a5345b1
2024-09-23 14:30:13 +02:00
Sebastiaan Janssen 0387307301 Merge branch 'v13/dev' into v13/contrib 2024-09-23 14:27:48 +02:00
Bjarke Berg 25a5dde8e9 Merge remote-tracking branch 'origin/release/13.5' into v13/dev
# Conflicts:
#	version.json
2024-09-18 12:55:35 +02:00
Bjarke Berg 2e068bb73e Merge remote-tracking branch 'origin/release/13.5' into release/13.5 2024-09-17 14:51:05 +02:00
Bjarke Berg 842cacde19 Bump version 2024-09-17 14:50:57 +02:00
Dennis ÖhmanandSebastiaan Janssen 6a453a0910 v13.5 - New Swedish translation crashes Umbraco, removed duplicate areas. (#17059)
Cherry-picked from d64bf5de22
2024-09-17 14:04:22 +02:00
Sebastiaan Janssen ff9903b14d Merge branch 'v13/contrib' of https://github.com/umbraco/Umbraco-CMS into v13/contrib 2024-09-17 13:58:37 +02:00
Dennis ÖhmanandGitHub d64bf5de22 v13.5 - New Swedish translation crashes Umbraco, removed duplicate areas. (#17059) 2024-09-17 13:56:58 +02:00
Sebastiaan Janssen 9300d867fb Merge branch 'v13/dev' into v13/contrib 2024-09-17 13:12:04 +02:00
Niels LyngsøandGitHub eb0f8b5c24 fire change event (#17078) 2024-09-17 10:06:16 +02:00
Niels LyngsøandGitHub d58768f26d utilize lock unlock events for readonly mode while saving (#17077) 2024-09-17 09:52:00 +02:00
Niels LyngsøandGitHub 3667217053 only resolve if value is present (#17070) 2024-09-17 09:51:47 +02:00
3e6116fcba No longer shows success message if content moving is cancelled (#15051)
* Fix for issue https://github.com/umbraco/Umbraco-CMS/issues/13923
 - Added AttemptMove method to the ContentService
 - Updated ContentController PostMove method to return ValidationProblem whenever the node is not moved

* Align changes with V14 solution. Make it non breaking.

---------

Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
2024-09-05 14:08:48 +02:00
Sebastiaan Janssen bff293213d Merge branch 'v13/dev' into v13/contrib 2024-09-03 11:01:39 +02:00
a47a1775f2 Prevent templates being editable when using Production runtime mode (#16923)
Co-authored-by: Nick Hoang <nick@codeberwery.com>
Co-authored-by: Jason Elkin <jason@bumpdigital.co.uk>
2024-09-03 00:54:32 +01:00
Jason Elkin b2a2df7a8a Ignore Visual Studio's generated launchSettings file. 2024-08-28 14:08:52 +01:00
EmanuelGustafzon 9242047f95 add local time for when user logged in last 2024-08-10 12:51:43 +02:00
Mads RasmussenandGitHub 29ff38af78 Merge branch 'main' into routed-modal-issue 2024-08-06 10:38:47 +02:00
Niels Lyngsø 5d4d6c36e8 note 2024-08-06 10:32:11 +02:00
Niels Lyngsø beac7794fd more corrections 2024-08-06 10:29:39 +02:00
Niels Lyngsø 97d7943ba5 prettier 2024-08-06 10:25:19 +02:00
Niels Lyngsø 5ac8813ba0 remove timeout 2024-08-06 10:21:43 +02:00
Niels Lyngsø c40795af0a remove test route 2024-08-06 10:21:28 +02:00
Niels Lyngsø e2d097f03a more clean up 2024-08-06 10:20:56 +02:00
Niels Lyngsø fa7ae1e180 clean up 2024-08-06 10:19:24 +02:00
Niels Lyngsø cdf46a7813 Merge branch 'main' into routed-modal-issue
# Conflicts:
#	src/packages/tiny-mce/vite.config.ts
2024-08-06 10:15:49 +02:00
Markus Johansson 3140c90f38 #16834 potential fix for um-router-slot 2024-07-27 16:43:43 +02:00
Markus Johansson 2fd3d86335 Added example of modal route with issue 2024-07-27 15:55:00 +02:00
Jacob OvergaardandGitHub f9dfbc44fc Merge branch 'main' into v14/chore/bundle-tiny-mce 2024-07-26 14:40:36 +02:00
Jacob OvergaardandGitHub 2fb3c0b66b Merge branch 'main' into v14/chore/bundle-tiny-mce 2024-07-26 14:35:49 +02:00
Jacob Overgaard 73161076af fix: move assignment to state 2024-07-26 11:50:11 +02:00
Jacob Overgaard 07fa420758 chore: linting 2024-07-26 11:45:22 +02:00
Jacob Overgaard e0cbe77ea0 chore: linting 2024-07-26 11:44:47 +02:00
Jacob Overgaard 7ed1640527 add fallback for tinymce 2024-07-26 11:37:31 +02:00
Jacob Overgaard 365dee916c update lockfile 2024-07-26 11:29:47 +02:00
Jacob Overgaard 0d2c794c6d Merge branch 'main' into v14/chore/bundle-tiny-mce 2024-07-26 11:29:33 +02:00
Jacob OvergaardandGitHub b4b1becffc Merge branch 'main' into v14/chore/bundle-tiny-mce 2024-07-25 18:04:51 +02:00
Jacob OvergaardandGitHub 2802e41f9a Merge branch 'main' into v14/chore/bundle-tiny-mce 2024-07-25 14:49:20 +02:00
Jacob Overgaard f565797a3c feat: add bundling for the 'tiny-mce' package 2024-07-25 13:14:55 +02:00
Markus Johansson dc79d138b8 #1506 Fixed typos 2024-03-31 03:56:28 +02:00
Markus Johansson 1483cf84ec #1506 Added support for element factory for modal manager context 2024-03-31 03:52:22 +02:00
5297 changed files with 142567 additions and 51605 deletions
+1
View File
@@ -46,6 +46,7 @@
*.xml text=auto
*.resx text=auto
*.yml text eol=lf core.whitespace whitespace=tab-in-indent,trailing-space,tabwidth=2
*.sh eol=lf
*.csproj text=auto merge=union
*.vbproj text=auto merge=union
+86 -79
View File
@@ -1,11 +1,13 @@
# Umbraco CMS Build
This guide will explain how you can build the Umbraco CMS from the source code. You will most likely want to do this if your are setting up a local development environment for contributing code updates to the project. You will need this in order to develop and test your fix or feature.
## Are you sure?
In order to use Umbraco as a CMS and build your website with it, you should not build it yourself. If you're reading this then you're trying to contribute to Umbraco or you're debugging a complex issue.
- Are you about to [create a pull request for Umbraco][contribution guidelines]?
- Are you trying to get to the bottom of a problem in your existing Umbraco installation?
- Are you about to [create a pull request for Umbraco][contribution guidelines]?
- Are you trying to get to the bottom of a problem in your existing Umbraco installation?
If the answer is yes, please read on. Otherwise, make sure to head on over [to the download page](https://our.umbraco.com/download) and start using Umbraco CMS as intended.
@@ -13,18 +15,7 @@ If the answer is yes, please read on. Otherwise, make sure to head on over [to t
↖️ You can jump to any section by using the "table of contents" button ( ![Table of contents icon](img/tableofcontentsicon.svg) ) above.
## Getting Started:
To run umbraco, we first need to initialize the client git submodule:
* Execute `git submodule update --init` to get the files into Umbraco.Web.UI.Client project
* If you are going to work on the Backoffice, you can either go to the Umbraco.Web.UI.Client folder and check out a new branch or set it up in your IDE, which will allow you to commit to each repository simultaneously:
* **Rider**: Preferences -> Version Control -> Directory Mappings -> Click the '+' sign
* If you get a white page delete Umbraco.Cms.StaticAssets\wwwroot\umbraco folder and run `npm ci && npm run build:for:cms` inside Umbraco.Web.UI.Client folder to clear out any leftover files from older versions.
### Latest version
* If you want to get the latest changes from the client repository, run `git submodule update` again which will pull the latest main branch.
## Debugging source locally
## Working with the Umbraco source code
Did you read ["Are you sure"](#are-you-sure)?
@@ -32,82 +23,109 @@ Did you read ["Are you sure"](#are-you-sure)?
If you want to run a build without debugging, see [Building from source](#building-from-source) below. This runs the build in the same way it is run on our build servers.
#### Debugging with VS Code
If you've got this far and are keen to get stuck in helping us fix a bug or implement a feature, great! Please read on...
In order to build the Umbraco source code locally with Visual Studio Code, first make sure you have the following installed.
### Prerequisites
* [Visual Studio Code](https://code.visualstudio.com/)
* [dotnet SDK v7+](https://dotnet.microsoft.com/en-us/download)
* [Node.js v14+](https://nodejs.org/en/download/)
* npm v7+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
In order to work with the Umbraco source code locally, first make sure you have the following installed.
Open the root folder of the repository in Visual Studio Code.
- Your favourite IDE: [Visual Studio 2022 v17+ with .NET 7+](https://visualstudio.microsoft.com/vs/), [Rider](https://www.jetbrains.com/rider/) or [Visual Studio Code](https://code.visualstudio.com/)
- [dotnet SDK v9+](https://dotnet.microsoft.com/en-us/download)
- [Node.js v20+](https://nodejs.org/en/download/)
- npm v10+ (installed with Node.js)
- [Git command line](https://git-scm.com/download/)
To build the front end you'll need to open the command pallet (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and run `>Tasks: Run Task` followed by `Client Watch` and then run the `Client Build` task in the same way.
### Familiarizing yourself with the code
You can also run the tasks manually on the command line:
Umbraco is a .NET application using C#. The solution is broken down into multiple projects. There are several class libraries. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes.
There are two web projects in the solution with client-side assets based on TypeScript, `Umbraco.Web.UI.Client` and `Umbraco.Web.UI.Login`.
There are a few different ways to work locally when implementing features or fixing issues with the Umbraco CMS. Depending on whether you are working solely on the front-end, solely on the back-end, or somewhere in between, you may find different workflows work best for you.
Here are some suggestions based on how we work on developing Umbraco at HQ.
### First checkout
When you first clone the source code, build the whole solution via your IDE. You can then start the `Umbraco.Web.UI` project via the IDE or the command line and should find everything across front and back-end is built and running.
```
cd src\Umbraco.Web.UI.Client
npm i
npm run dev
cd <solution root>\src\Umbraco.Web.UI
dotnet run --no-build
```
If you just want to build the UI Client to `Umbraco.Web.UI` then instead of running `dev`, you can do: `npm run build`.
When the page loads in your web browser, you can follow the installer to set up a database for debugging. When complete, you will have an empty Umbraco installation to begin working with. You may also wish to install a [starter kit][https://marketplace.umbraco.com/category/themes-&-starter-kits] to ease your debugging.
The login screen is a different frontend build, for that one you can run it as follows:
### Back-end only changes
If you are working on back-end only features, when switching branches or pulling down the latest from GitHub, you will find the front-end getting rebuilt periodically when you look to build the back-end changes. This can take a while and slow you down. So if for a period of time you don't care about changes in the front-end, you can disable this build step.
Go to `Umbraco.Cms.StaticAssets.csproj` and comment out the following lines of MsBuild by adding a REM statement in front:
```
cd src\Umbraco.Web.UI.Login
npm i
npm run dev
REM npm ci --no-fund --no-audit --prefer-offline
REM npm run build:for:cms
```
If you just want to build the Login screen to `Umbraco.Web.UI` then instead of running `dev`, you can do: `npm run build`.
Just be careful not to include this change in your PR.
**The initial Gulp build might take a long time - don't worry, this will be faster on subsequent runs.**
### Front-end only changes
You might run into [Gulp quirks](#gulp-quirks).
The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
To run the C# portion of the project, either hit <kbd>F5</kbd> to begin debugging, or manually using the command line:
Conversely, if you are working on front-end only, you want to build the back-end once and then run it. Before you do so, update the configuration in `appSettings.json` to add the following under `Umbraco:Cms:Security`:
```
dotnet watch --project .\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj
"BackOfficeHost": "http://localhost:5173",
"AuthorizeCallbackPathName": "/oauth_complete",
"AuthorizeCallbackLogoutPathName": "/logout",
"AuthorizeCallbackErrorPathName": "/error"
```
**The initial C# build might take a _really_ long time (seriously, go and make a cup of coffee!) - but don't worry, this will be faster on subsequent runs.**
Then run Umbraco from the command line.
When the page eventually loads in your web browser, you can follow the installer to set up a database for debugging. You may also wish to install a [starter kit][starter kits] to ease your debugging.
```
cd <solution root>\src\Umbraco.Web.UI
dotnet run --no-build
```
#### Debugging with Visual Studio
In another terminal window, run the following to watch the front-end changes and launch Umbraco using the URL indicated from this task.
In order to build the Umbraco source code locally with Visual Studio, first make sure you have the following installed.
```
cd <solution root>\src\Umbraco.Web.UI.Client
npm run dev:server
```
* [Visual Studio 2022 v17+ with .NET 7+](https://visualstudio.microsoft.com/vs/) ([the community edition is free](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) for you to use to contribute to Open Source projects)
* [Node.js v14+](https://nodejs.org/en/download/)
* npm v7+ (installed with Node.js)
* [Git command line](https://git-scm.com/download/)
You'll find as you make changes to the front-end files, the updates will be picked up and your browser refreshed automatically.
The easiest way to get started is to open `umbraco.sln` in Visual Studio.
> [!NOTE]
> The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
To build the front end, you'll first need to run `cd src\Umbraco.Web.UI.Client && npm install` in the command line (or `cd src\Umbraco.Web.UI.Client; npm install` in PowerShell). Then find the Task Runner Explorer (View → Other Windows → Task Runner Explorer) and run the `build` task under `Gulpfile.js`. You may need to refresh the Task Runner Explorer before the tasks load.
Whilst most of the backoffice code lives in `Umbraco.Web.UI.Client`, the login screen is in a separate project. If you do any work with that you can build with:
If you're working on the backoffice, you may wish to run the `dev` command instead while you're working with it, so changes are copied over to the appropriate directories and you can refresh your browser to view the results of your changes.
```
cd <solution root>\src\Umbraco.Web.UI.Login
npm run build
```
**The initial Gulp build might take a long time - don't worry, this will be faster on subsequent runs.**
In both front-end projects, if you've refreshed your branch from the latest on GitHub you may need to update front-end dependencies.
You might run into [Gulp quirks](#gulp-quirks).
To do that, run:
The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
```
npm ci --no-fund --no-audit --prefer-offline
```
"The rest" is a C# based codebase, which is mostly ASP.NET Core MVC based. You can make changes, build them in Visual Studio, and hit <kbd>F5</kbd> to see the result.
### Full-stack changes
**The initial C# build might take a _really_ long time (seriously, go and make a cup of coffee!) - but don't worry, this will be faster on subsequent runs.**
If working across both front and back-end, follow both methods and use `dotnet watch`, or re-run `dotnet run` (or `dotnet build` followed by `dotnet run --no-build`) whenever you need to update the back-end code.
When the page eventually loads in your web browser, you can follow the installer to set up a database for debugging. You may also wish to install a [starter kit][starter kits] to ease your debugging.
Request and response models used by the management APIs are made available client-side as generated code. If you make changes to the management API, you can re-generate the typed client code with:
```
cd <solution root>\src\Umbraco.Web.UI.Client
npm run generate:server-api-dev
```
Please also update the `OpenApi.json` file held in the solution by copying and pasting the output from `/umbraco/swagger/management/swagger.json`.
## Building from source
@@ -115,7 +133,7 @@ Did you read ["Are you sure"](#are-you-sure)?
Do note that this is only required if you want to test out your custom changes in a separate site (not the one in the Umbraco.Web.UI), if you just want to test your changes you can run the included test site using: `dotnet run` from `src/Umbraco.Web.UI/`
You may want to build a set of NuGet packages with your changes, this can be done using the dotnet pack command.
You may want to build a set of NuGet packages with your changes, this can be done using the dotnet pack command.
First enter the root of the project in a command line environment, and then use the following command to build the NuGet packages:
@@ -127,17 +145,18 @@ You can then add these as a local NuGet feed using the following command:
`dotnet nuget add source <Path to Build.Out folder> -n MyLocalFeed`
This will add a local nuget feed with the name "MyLocalFeed" and you'll now be able to use your custom built NuGet packages.
This will add a local nuget feed with the name "MyLocalFeed" and you'll now be able to use your custom built NuGet packages.
### Cleaning up
Once the solution has been used to run a site, one may want to "reset" the solution in order to run a fresh new site again.
The easiest way to do this by deleting the following files and folders:
* src/Umbraco.Web.UI/appsettings.json
* src/Umbraco.Web.UI/umbraco/Data
You only have to remove the connection strings from the appsettings, but removing the data folder ensures that the sqlite database gets deleted too.
- src/Umbraco.Web.UI/appsettings.json
- src/Umbraco.Web.UI/umbraco/Data
You only have to remove the connection strings from the appsettings, but removing the data folder ensures that the sqlite database gets deleted too.
Next time you run a build the `appsettings.json` file will be re-created in its default state.
@@ -145,13 +164,14 @@ This will leave media files and views around, but in most cases, it will be enou
To perform a more complete clear, you will want to also delete the content of the media, views, scripts... directories.
The following command will force remove all untracked files and directories, whether they are ignored by Git or not. Combined with `git reset` it can recreate a pristine working directory.
The following command will force remove all untracked files and directories, whether they are ignored by Git or not. Combined with `git reset` it can recreate a pristine working directory.
git clean -xdf .
For git documentation see:
* git [clean](<https://git-scm.com/docs/git-clean>)
* git [reset](<https://git-scm.com/docs/git-reset>)
- git [clean](https://git-scm.com/docs/git-clean)
- git [reset](https://git-scm.com/docs/git-reset)
## Azure DevOps
@@ -165,18 +185,5 @@ The produced artifacts are published in a container that can be downloaded from
Git might have issues dealing with long file paths during build. You may want/need to enable `core.longpaths` support (see [this page](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) for details).
### Gulp Quirks
You may need to run the following commands to set up gulp properly:
```
npm cache clean --force
npm ci
npm run build
```
[ contribution guidelines]: CONTRIBUTING.md "Read the guide to contributing for more details on contributing to Umbraco"
[ starter kits ]: https://our.umbraco.com/packages/?category=Starter%20Kits&version=9 "Browse starter kits available for v9 on Our "
[ contribution guidelines]: CONTRIBUTING.md "Read the guide to contributing for more details on contributing to Umbraco"
[ disable browser caching ]: https://techwiser.com/disable-cache-google-chrome-firefox "Instructions on how to disable browser caching in Chrome and Firefox"
+22 -13
View File
@@ -4,34 +4,43 @@
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgement, and feel free to propose changes to this document in a pull request.
## Getting Started
We have a guide on [what to consider before you start](contributing-before-you-start.md) and more detailed guides at the end of this article.
The following steps are a quick-start guide:
## Contribution guide
This guide describes each step to make your first contribution:
1. **Fork**
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](img/forkrepository.png)
2. **Clone**
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
![Clone the fork](img/clonefork.png)
![Clone the fork](img/clonefork.png)
3. **Switch to the correct branch**
Switch to the `contrib` branch
4. **Build**
4. **Branch out**
Build your fork of Umbraco locally [as described in the build documentation](BUILD.md), you can build with any IDE that supports dotnet or the command line.
Create a new branch based on `contrib` and name it after the issue you're fixing, For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
5. **Branch**
Please follow this format for branches: `v{major}/{feature|bugfix|task}/{issue}-{description}`.
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp/12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `contrib`, create a new branch first.
This is a development branch for the particular issue you're working on, in this case a bug-fix for issue number `18132` that affects Umbraco v.15.
Don't commit to `contrib`, create a new branch first.
5. **Build or run a Development Server**
You can build or run a Development Server with any IDE that supports DotNet or the command line.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
6. **Change**
@@ -41,7 +50,7 @@ The following steps are a quick-start guide:
Done? Yay! 🎉
Remember to commit to your new `temp` branch, and don't commit to `contrib`. Then you can push the changes up to your fork on GitHub.
Remember to commit to your branch. When it's ready push the changes to your fork on GitHub.
8. **Create pull request**
@@ -52,7 +61,7 @@ The following steps are a quick-start guide:
## Further contribution guides
- [Before you start](contributing-before-you-start.md)
- [Finding your first issue: Up for grabs](contributing-before-you-start.md)
- [Finding your first issue: Up for grabs](contributing-first-issue.md)
- [Contributing to the new backoffice](https://docs.umbraco.com/umbraco-backoffice/)
- [Unwanted changes](contributing-unwanted-changes.md)
- [Other ways to contribute](contributing-other-ways-to-contribute.md)
+2 -2
View File
@@ -6,8 +6,8 @@ body:
- type: input
id: "version"
attributes:
label: "Which Umbraco version are you using? (Please write the *exact* version, example: 10.1.0)"
description: "Use the help icon in the Umbraco backoffice to find the version you're using"
label: "Which Umbraco version are you using?"
description: "Please write the *exact* version, example: `10.1.0`. Use the help icon in the Umbraco backoffice to find the version you're using"
validations:
required: true
- type: textarea
+2 -2
View File
@@ -4,11 +4,11 @@ contact_links:
url: https://github.com/umbraco/Umbraco-CMS/discussions/new?category=features-and-ideas
about: Start a new discussion when you have ideas or feature requests, eventually discussions can turn into plans
- name: ⁉️ Support Question
url: https://our.umbraco.com
url: https://forum.umbraco.com
about: This issue tracker is NOT meant for support questions. If you have a question, please join us on the forum.
- name: 📖 Documentation Issue
url: https://github.com/umbraco/UmbracoDocs/issues
about: Documentation issues should be reported on the Umbraco documentation repository.
- name: 🔐 Security Issue
url: https://umbraco.com/about-us/trust-center/security-and-umbraco/how-to-report-a-vulnerability-in-umbraco/
url: https://umbraco.com/trust-center/security-and-umbraco/how-to-report-a-vulnerability-in-umbraco/
about: Discovered a Security Issue in Umbraco?
+5 -4
View File
@@ -1,11 +1,12 @@
# [Umbraco CMS](https://umbraco.com)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
![Mastodon Follow](https://img.shields.io/mastodon/follow/110661369750014952?domain=https%3A%2F%2Fumbracocommunity.social)
[![Chat about Umbraco on Discord](https://img.shields.io/discord/869656431308189746?logo=discord&logoColor=fff)](https://discord.gg/umbraco)
[![Read what's going on in the Umbraco Discord chat now](https://img.shields.io/badge/read-discord-blue)](https://discord-chats.umbraco.com)
[![NuGet Version](https://img.shields.io/nuget/v/Umbraco.Cms)](https://www.nuget.org/packages/Umbraco.Cms)
[![Build status](https://img.shields.io/azure-devops/build/umbraco/Umbraco%2520Cms/301?logo=azurepipelines&label=Azure%20Pipelines)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=301)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![Forum](https://img.shields.io/badge/help-forum-blue)](https://forum.umbraco.com)
[![Chat about Umbraco on Discord](https://img.shields.io/discord/869656431308189746?logo=discord&logoColor=fff)](https://discord.gg/umbraco)
![Mastodon Follow](https://img.shields.io/mastodon/follow/110661369750014952?domain=https%3A%2F%2Fumbracocommunity.social)
### Umbraco is a free and open source .NET content management system. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
@@ -1,24 +1,23 @@
# Bellissima release instructions
## Build
> _See internal documentation on the build/release workflow._
## GitHub Release Notes
To generate release notes on GitHub.
- Go to the [**Releases** area](https://github.com/umbraco/Umbraco.CMS.Backoffice/releases)
- Press the [**"Draft a new release"** button](https://github.com/umbraco/Umbraco.CMS.Backoffice/releases/new)
- In the combobox for "Choose a tag", expand then select or enter the next version number, e.g. `v14.2.0`
- If the tag does not already exist, an option labelled "Create new tag: v14.2.0 on publish" will appear, select that option
- In the combobox for "Choose a tag", expand then select or enter the next version number, e.g. `release-14.2.0`
- If the tag does not already exist, an option labelled "Create new tag: release-14.2.0 on publish" will appear, select that option
- In the combobox for "Target: main", expand then select the release branch for the next version, e.g. `release/14.2`
- In the combobox for "Previous tag: auto":
- If the next release is an RC, then you can leave as `auto`
- Otherwise, select the previous stable version, e.g. `v14.1.1`
- Otherwise, select the previous stable version, e.g. `release-14.1.1`
- Press the **"Generate release notes"** button, this will populate the main textarea
- Change the title to match the version, e.g. `14.2.0`
- Check the details, view in the "Preview" tab
- What type of release is this?
- If it's an RC, then check "Set as a pre-release"
@@ -27,5 +26,5 @@ To generate release notes on GitHub.
- If you need more time to review, press the **"Save draft"** button and you can come back to it later
- If you are ready to make the release notes public, then press **"Publish release"** button! :tada:
> If you're curious about how the content is generated, take a look at the `release.yml` configuration:
> If you're curious about how the content is generated, take a look at the `release.yml` configuration:
> https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/main/.github/release.yml
@@ -6,19 +6,14 @@ In the high probability that you are porting something from angular JS then here
Here is the LIT documentation and playground: [https://lit.dev](https://lit.dev)
### How best to find what needs converting from the old backoffice?
1. Navigate to [https://github.com/umbraco/Umbraco-CMS](https://github.com/umbraco/Umbraco-CMS)
2. Make sure you are on the `v14/dev` branch
### What is the process of contribution?
- Read the [README](README.md) to learn how to get the project up and running
- Find an issue marked as [community/up-for-grabs](https://github.com/umbraco/Umbraco.CMS.Backoffice/issues?q=is%3Aissue+is%3Aopen+label%3Acommunity%2Fup-for-grabs) - note that some are also marked [good first issue](https://github.com/umbraco/Umbraco.CMS.Backoffice/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) which indicates they are simple to get started on
- Umbraco HQ owns the Management API on the backend, so features can be worked on in the frontend only when there is an API, or otherwise if no API is required
- A contribution should be made in a fork of the repository
- Once a contribution is ready, a pull request should be made to this repository and HQ will assign a reviewer
- A pull request should always indicate what part of a feature it tries to solve, i.e. does it close the targeted issue (if any) or does the developer expect Umbraco HQ to take over
- Read the [README](README.md) to learn how to get the project up and running
- Find an issue marked as [community/up-for-grabs](https://github.com/umbraco/Umbraco.CMS.Backoffice/issues?q=is%3Aissue+is%3Aopen+label%3Acommunity%2Fup-for-grabs) - note that some are also marked [good first issue](https://github.com/umbraco/Umbraco.CMS.Backoffice/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) which indicates they are simple to get started on
- Umbraco HQ owns the Management API on the backend, so features can be worked on in the frontend only when there is an API, or otherwise if no API is required
- A contribution should be made in a fork of the repository
- Once a contribution is ready, a pull request should be made to this repository and HQ will assign a reviewer
- A pull request should always indicate what part of a feature it tries to solve, i.e. does it close the targeted issue (if any) or does the developer expect Umbraco HQ to take over
## Contributing in general terms
@@ -32,31 +27,27 @@ The management API is the colloquial term used to describe the new backoffice AP
The frontend has an API formatter that takes the OpenAPI schema file and converts it into a set of TypeScript classes and interfaces.
### Caveats
1. The backoffice can be run and tested against a real Umbraco instance by cloning down the `v14/dev` branch, but there are no guarantees about how well it works yet.
**Current schema for API:**
[https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v13/dev/src/Umbraco.Cms.Api.Management/OpenApi.json](https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v14/dev/src/Umbraco.Cms.Api.Management/OpenApi.json)
[https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v13/dev/src/Umbraco.Cms.Api.Management/OpenApi.json](https://raw.githubusercontent.com/umbraco/Umbraco-CMS/v15/dev/src/Umbraco.Cms.Api.Management/OpenApi.json)
**How to convert it:**
- Run `npm run generate:api`
- Run `npm run generate:server-api`
## A contribution example
### Example: Published Cache Status Dashboard
![Published Status Dashboard](/.github/images/contributing/published-cache-status-dashboard.png)
![Published Status Dashboard](/.github/img/contributing/published-cache-status-dashboard.png)
### Boilerplate (example using Lit)
Links for Lit examples and documentation:
- [https://lit.dev](https://lit.dev)
- [https://lit.dev/docs/](https://lit.dev/docs/)
- [https://lit.dev/playground/](https://lit.dev/playground/)
- [https://lit.dev](https://lit.dev)
- [https://lit.dev/docs/](https://lit.dev/docs/)
- [https://lit.dev/playground/](https://lit.dev/playground/)
### Functionality
@@ -132,39 +123,39 @@ To declare the Published Cache Status Dashboard as a new manifest, we need to ad
Lets go through each of these properties…
- Type: can be one of the following:
- Type: can be one of the following:
- section - examples include: `Content`, `Media`
- dashboard - a view within a section. Examples include: the welcome dashboard
- propertyEditorUi
- editorView
- propertyAction
- tree
- editor
- treeItemAction
- section - examples include: `Content`, `Media`
- dashboard - a view within a section. Examples include: the welcome dashboard
- propertyEditorUi
- editorView
- propertyAction
- tree
- editor
- treeItemAction
- Alias: is the unique key used to identify this item.
- Name: is the human-readable name for this item.
- Alias: is the unique key used to identify this item.
- Name: is the human-readable name for this item.
- ElementName: this is the customElementName declared on the element at the top of the file i.e
- ElementName: this is the customElementName declared on the element at the top of the file i.e
```typescript
@customElement('umb-dashboard-published-status')
```
- Js: references a function call to import the file that the element is declared within
- Js: references a function call to import the file that the element is declared within
- Weight: allows us to specify the order in which the dashboard will be displayed within the tabs bar
- Weight: allows us to specify the order in which the dashboard will be displayed within the tabs bar
- Meta: allows us to reference additional data - in our case, we can specify the label that is shown in the tabs bar and the pathname that will be displayed in the URL
- Meta: allows us to reference additional data - in our case, we can specify the label that is shown in the tabs bar and the pathname that will be displayed in the URL
- Conditions: allows us to specify the conditions that must be met for the dashboard to be displayed. In our case, we are specifying that the dashboard will only be displayed within the Settings section
- Conditions: allows us to specify the conditions that must be met for the dashboard to be displayed. In our case, we are specifying that the dashboard will only be displayed within the Settings section
## API mock handlers
Running the app with `npm run dev`, you will quickly notice the API requests turn into 404 errors. To hit the API, we need to add a mock handler to define the endpoints that our dashboard will call. In the case of the Published Cache Status section, we have several calls to work through. Lets start by looking at the call to retrieve the current status of the cache:
![Published Status Dashboard](/.github/images/contributing/status-of-cache.png)
![Published Status Dashboard](/.github/img/contributing/status-of-cache.png)
From the existing functionality, we can see that this is a string message that is received as part of a `GET` request from the server.
@@ -172,18 +163,18 @@ So to define this, we must first add a handler for the Published Status called `
```typescript
const { rest } = window.MockServiceWorker;
import { umbracoPath } from '@umbraco-cms/backoffice/utils';
import { umbracoPath } from "@umbraco-cms/backoffice/utils";
export const handlers = [
rest.get(umbracoPath('/published-cache/status'), (_req, res, ctx) => {
return res(
// Respond with a 200 status code
ctx.status(200),
ctx.json<string>(
'Database cache is ok. ContentStore contains 1 item and has 1 generation and 0 snapshot. MediaStore contains 5 items and has 1 generation and 0 snapshot.',
),
);
}),
rest.get(umbracoPath("/published-cache/status"), (_req, res, ctx) => {
return res(
// Respond with a 200 status code
ctx.status(200),
ctx.json<string>(
"Database cache is ok. ContentStore contains 1 item and has 1 generation and 0 snapshot. MediaStore contains 5 items and has 1 generation and 0 snapshot."
)
);
}),
];
```
@@ -193,7 +184,7 @@ It returns a `200 OK` response and a string value with the current “status”
An example `POST` is similar. Lets take the “Refresh status” button as an example:
![Published Status Dashboard](/.github/images/contributing/refresh-status.png)
![Published Status Dashboard](/.github/img/contributing/refresh-status.png)
From our existing functionality, we can see that this makes a `POST` call to the server to prompt a reload of the published cache. So we would add a new endpoint to the mock handler that would look like:
@@ -220,7 +211,7 @@ In-depth: [https://storybook.js.org/docs/web-components/get-started/introduction
Reference: [https://ambitious-stone-0033b3603.1.azurestaticapps.net/](https://ambitious-stone-0033b3603.1.azurestaticapps.net/)
- Locally: `npm run storybook`
- Locally: `npm run storybook`
For Umbraco UI stories, please navigate to [https://uui.umbraco.com/](https://uui.umbraco.com/)

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+6 -6
View File
@@ -13,13 +13,9 @@ changelog:
- title: 💥 Breaking Changes
labels:
- category/breaking
- title: 🐛 Bug Fixes
labels:
- type/bug
- category/bug
- type/improvement
- title: 📄 Documentation
labels:
- documentation
- category/documentation
- title: 🏠 Internal
labels:
@@ -29,10 +25,14 @@ changelog:
- dependencies
- title: 🌈 A11Y
labels:
- accessibility
- category/accessibility
- title: 🚀 New Features
labels:
- type/feature
- title: Other Changes
- category/feature
- type/enhancement
- category/enhancement
- title: 🐛 Bug Fixes
labels:
- '*'
+38 -29
View File
@@ -3,20 +3,26 @@ name: "Code scanning - action"
on:
push:
branches:
- '*/dev'
- '*/contrib'
- "*/dev"
- "*/contrib"
- "contrib"
- "release/*"
pull_request:
# The branches below must be a subset of the branches above
branches:
- '*/dev'
- '*/contrib'
- "*/dev"
- "*/contrib"
- "contrib"
- "release/*"
schedule:
- cron: "33 2 * * 1"
permissions:
contents: read
env:
dotnetVersion: 8.x
dotnetIncludePreviewVersions: true
dotnetVersion: 9.x
dotnetIncludePreviewVersions: "preview"
solution: umbraco.sln
buildConfiguration: SkipTests
DOTNET_NOLOGO: true
@@ -27,36 +33,39 @@ env:
jobs:
CodeQL-Build:
name: Analyze (${{ matrix.language }})
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/analyze to upload SARIF results
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Checkout
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/config/codeql-config.yml
# We use the setup-dotnet action to set up .NET Core, otherwise the CodeQL CLI will not work with preview versions.
- name: Setup .NET from global.json
uses: actions/setup-dotnet@v4
- name: Use .NET ${{ env.dotnetVersion }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.dotnetVersion }}
include-prerelease: ${{ env.dotnetIncludePreviewVersions }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/config/codeql-config.yml
- name: Run dotnet restore
run: dotnet restore ${{ env.solution }}
- name: Run dotnet build
run: dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:ContinuousIntegrationBuild=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
@@ -1,19 +1,20 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build and test
name: Test Backoffice
on:
push:
branches:
- main
- contrib
- release/*
- v*/dev
paths:
- src/Umbraco.Web.UI.Client/**
pull_request:
branches:
- main
- contrib
- release/*
- v*/dev
paths:
- src/Umbraco.Web.UI.Client/**
# Allows GitHub to use this workflow to validate the merge queue
merge_group:
@@ -27,37 +28,40 @@ env:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/Umbraco.Web.UI.Client
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
node-version-file: src/Umbraco.Web.UI.Client/.nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
cache-dependency-path: ./src/Umbraco.Web.UI.Client/package-lock.json
- run: npm ci --no-audit --no-fund --prefer-offline
- name: Check for circular dependencies
run: node devops/circular/index.js src
- run: npm run lint:errors
- run: npm run generate:tsconfig
- run: npm run generate:icons
- run: npm run build:for:cms
- run: npm run check:paths
- run: npm run generate:jsonschema:dist
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/Umbraco.Web.UI.Client
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
node-version-file: src/Umbraco.Web.UI.Client/.nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
cache-dependency-path: ./src/Umbraco.Web.UI.Client/package-lock.json
- run: npm ci --no-audit --no-fund --prefer-offline
- run: npx playwright install --with-deps
- run: npm test
- name: Upload Code Coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: code-coverage
path: coverage/
retention-days: 30
-7
View File
@@ -47,9 +47,6 @@ NDependOut/
QueryResult.htm
tools/docfx/
# Ignore rule for clearing out Belle (avoid rebuilding all the time)
preserve.belle
# csharp-docs
/build/csharp-docs/api/
/build/csharp-docs/_site/
@@ -73,10 +70,6 @@ preserve.belle
/src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/login
# Environment specific data
/src/Umbraco.Web.UI.Client/[Bb]uild/
/src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/
/src/Umbraco.Web.UI.Client/src/[Ll]ess/*.css
/src/Umbraco.Web.UI.Client/TESTS-*.xml
/src/Umbraco.Web.UI/wwwroot/[Mm]edia/
/src/Umbraco.Web.UI/App_Code/
/src/Umbraco.Web.UI/App_Plugins/
+121 -33
View File
@@ -1,35 +1,123 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\\\bNow listening on:\\\\s+(https?://\\\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
"version": "0.2.0",
"compounds": [
{
"name": "Backoffice Launch (Vite + .NET Core)",
"configurations": [
"Backoffice Launch Vite (Chrome)",
".NET Core Serve with External Auth (web)"
],
"stopAll": true,
"presentation": {
"group": "1"
}
}
],
"configurations": [
{
"name": "Backoffice Launch Vite (Chrome)",
"request": "launch",
"env": {
"VITE_UMBRACO_USE_MSW": "${input:AskForMockServer}"
},
"runtimeExecutable": "npx",
"runtimeArgs": ["vite"],
"type": "node",
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI.Client",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"smartStep": true,
"autoAttachChildProcesses": true,
"serverReadyAction": {
"killOnServerStop": true,
"action": "debugWithChrome",
"pattern": "Local: http://localhost:([0-9]+)",
"uriFormat": "http://localhost:%s",
"webRoot": "${workspaceFolder}/src/Umbraco.Web.UI.Client"
},
"presentation": {
"group": "2"
}
},
{
"name": "Backoffice Attach Vite (Chrome)",
"request": "launch",
"type": "chrome",
"smartStep": true,
"url": "http://localhost:5173/",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"webRoot": "${workspaceFolder}/src/Umbraco.Web.UI.Client",
"presentation": {
"group": "2"
}
},
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\\\bNow listening on:\\\\s+(https?://\\\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Umbraco.Web.UI/Views"
},
"presentation": {
"group": "3"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}",
"presentation": {
"group": "3"
}
},
{
"name": ".NET Core Serve with External Auth (web)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
"checkForDevCert": true,
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:44339",
"UMBRACO__CMS__SECURITY__BACKOFFICEHOST": "http://localhost:5173",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKPATHNAME": "/oauth_complete",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKLOGOUTPATHNAME": "/logout",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKERRORPATHNAME": "/error"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Umbraco.Web.UI/Views"
},
"presentation": {
"group": "3"
}
}
],
"inputs": [
{
"id": "AskForMockServer",
"type": "promptString",
"description": "Use Mock Service Worker (MSW) for Backoffice API calls (off requires a running server)?",
"default": "off"
}
]
}
+1
View File
@@ -0,0 +1 @@
../src/Umbraco.Web.UI.Client/.vscode/lit.code-snippets
+5
View File
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"unprovide"
]
}
+3 -7
View File
@@ -27,11 +27,9 @@
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "build",
"script": "build:for:cms",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": [
"$gulp-tsc"
]
"problemMatcher": []
},
{
"label": "Client Watch",
@@ -41,9 +39,7 @@
"type": "npm",
"script": "dev",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": [
"$gulp-tsc"
]
"problemMatcher": []
},
{
"label": "Dotnet build",
+12 -6
View File
@@ -14,15 +14,21 @@
<NeutralLanguage>en-US</NeutralLanguage>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- TODO: [NU5104] Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU5104</WarningsNotAsErrors>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
[NU5104] Warning As Error: A stable release of a package should not have a prerelease dependency. Either modify the version spec of dependency
-->
<NoWarn>$(NoWarn),NU5104,SA1309</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors),NU5104,SA1600</WarningsNotAsErrors>
</PropertyGroup>
<!-- SourceLink -->
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
@@ -33,8 +39,8 @@
<!-- Package Validation -->
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>false</EnablePackageValidation>
<PackageValidationBaselineVersion>14.0.0</PackageValidationBaselineVersion>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>15.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
</PropertyGroup>
+40 -38
View File
@@ -14,25 +14,25 @@
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="9.0.0-preview.9.24556.5" />
</ItemGroup>
<!-- Umbraco packages -->
@@ -45,23 +45,23 @@
<PackageVersion Include="Asp.Versioning.Mvc" Version="8.1.0" />
<PackageVersion Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
<PackageVersion Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageVersion Include="Examine" Version="3.4.0" />
<PackageVersion Include="Examine.Core" Version="3.4.0" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.71" />
<PackageVersion Include="Examine" Version="3.7.1" />
<PackageVersion Include="Examine.Core" Version="3.7.1" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.74" />
<PackageVersion Include="JsonPatch.Net" Version="3.1.1" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="MailKit" Version="4.8.0" />
<PackageVersion Include="MailKit" Version="4.10.0" />
<PackageVersion Include="Markdown" Version="2.2.1" />
<PackageVersion Include="MessagePack" Version="2.5.192" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.3.8" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.5.4" />
<PackageVersion Include="ncrontab" Version="3.3.3" />
<PackageVersion Include="NPoco" Version="5.7.1" />
<PackageVersion Include="NPoco.SqlServer" Version="5.7.1" />
<PackageVersion Include="OpenIddict.Abstractions" Version="6.0.0-preview3.24551.41" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="6.0.0-preview3.24551.41" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="6.0.0-preview3.24551.41" />
<PackageVersion Include="Serilog" Version="4.1.0" />
<PackageVersion Include="OpenIddict.Abstractions" Version="6.1.1" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="6.1.1" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="6.1.1" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageVersion Include="Serilog.Enrichers.Process" Version="3.0.0" />
<PackageVersion Include="Serilog.Enrichers.Thread" Version="4.0.0" />
@@ -73,29 +73,31 @@
<PackageVersion Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.Map" Version="2.0.0" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.5" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.0.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.1.0" />
</ItemGroup>
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
<ItemGroup>
<!-- Both Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer bring in a vulnerable version of Azure.Identity -->
<!-- Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer brings in a vulnerable version of Azure.Identity -->
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
<!-- Both Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer bring in a vulnerable version of Azure.Identity -->
<!-- Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of System.Runtime.Caching -->
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
<!-- Dazinator.Extensions.FileProviders brings in a vulnerable version of System.Net.Http -->
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<!-- Examine brings in a vulnerable version of System.Security.Cryptography.Xml -->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="9.0.0" />
<!-- Both Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc bring in a vulnerable version of System.Text.RegularExpressions -->
<!-- Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc brings in a vulnerable version of System.Text.RegularExpressions -->
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.0" />
<!-- Both Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer, Dazinator.Extensions.FileProviders bring in legacy versions of System.Text.Encodings.Web -->
<!-- OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" />
<!-- Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer and Dazinator.Extensions.FileProviders brings in a legacy version of System.Text.Encodings.Web -->
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" />
<!-- NPoco.SqlServer bring in vulnerable version of Microsoft.Data.SqlClient -->
<!-- NPoco.SqlServer brings in a vulnerable version of Microsoft.Data.SqlClient -->
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<!-- Examine.Lucene bring in a vulnerable version of Lucene.Net.Replicator -->
<!-- Examine.Lucene brings in a vulnerable version of Lucene.Net.Replicator -->
<PackageVersion Include="Lucene.Net.Replicator" Version="4.8.0-beta00017" />
</ItemGroup>
</Project>
</Project>
+579
View File
@@ -0,0 +1,579 @@
Third-Party Notices
===================
This file contains notices and attributions for third-party software used in the Umbraco CMS project.
It is not a license and does not grant any rights to use the third-party software.
Umbraco CMS is licensed under the MIT License, which can be found in the LICENSE file.
---
@openid/AppAuth-JS: An OpenID Connect and OAuth 2.0 client library for JavaScript
URL: https://github.com/openid/AppAuth-JS
License: Apache License, Version 2.0
Copyright: 2017 Google Inc.
---
AutoFixture: Write maintainable unit tests, faster
URL: https://github.com/AutoFixture/AutoFixture
License: MIT License
Copyright: 2013 Mark Seemann
---
Asp.Versioning.Mvc: A library for ASP.NET Core versioning
URL: https://github.com/dotnet/aspnet-api-versioning
License: MIT License
Copyright: .NET Foundation and contributors
---
Babel: A JavaScript compiler
URL: https://babeljs.io/
License: MIT License
Copyright: 2014-present Sebastian McKenzie and other contributors
---
BenchmarkDotNet: Powerful .NET library for benchmarking
URL: https://github.com/dotnet/BenchmarkDotNet
License: MIT License
Copyright: .NET Foundation and Contributors
---
Bogus: A simple and sane data generator for populating objects that supports different locales.
URL: https://github.com/bchavez/Bogus
License: MIT License
Copyright: 2015 Brian Chavez
---
CommandLineParser: Terse syntax C# command line parser for .NET
URL: https://github.com/commandlineparser/commandline
License: MIT License
Copyright: 2005-2015 Giacomo Stelluti Scala & Contributors
---
cross-env: A CLI tool to set environment variables across platforms
URL: https://github.com/kentcdodds/cross-env
License: MIT License
Copyright: 2017 Kent C. Dodds
---
Dazinator.Extensions.FileProviders: A library for file provider extensions
URL: https://github.com/dazinator/Dazinator.Extensions.FileProviders
License: MIT License
Copyright: 2016 Darrell
---
DOMPurify: A DOM-only XSS sanitizer for HTML, MathML and SVG
URL: https://github.com/cure53/DOMPurify
License: Apache License, Version 2.0
Copyright: 2025 Dr.-Ing. Mario Heiderich, Cure53
---
Element Internals Polyfill: A polyfill for the Element Internals API
URL: https://github.com/calebdwilliams/element-internals-polyfill
License: MIT License
Copyright: 2021 Caleb Williams
---
Eslint: A tool for identifying and reporting on patterns in JavaScript
URL: https://eslint.org/
License: MIT License
Copyright: OpenJS Foundation and other contributors
---
Examine: A search and indexing library for .NET
URL: https://github.com/Shazwazza/Examine
License: Microsoft Public License (Ms-PL)
Copyright: 2023 Shannon Deminick
---
Glob: A library for matching file paths using glob patterns
URL: https://github.com/isaacs/node-glob
License: ISC License
Copyright: 2009-2023 Isaac Z. Schlueter and Contributors
---
Globals: A library for managing global variables in JavaScript
URL: https://github.com/sindresorhus/globals
License: MIT License
Copyright: Sindre Sorhus
---
Html Agility Pack: An HTML parser for .NET
URL: https://html-agility-pack.net/
License: MIT License
Copyright: ZZZ Projects Inc.
---
ImageSharp: A cross-platform library for processing images in .NET
URL: https://github.com/SixLabors/ImageSharp
License: Apache License, Version 2.0 under the Six Labors Split License
Copyright: Six Labors
---
jsdiff: A JavaScript text differencing implementation
URL: https://github.com/kpdecker/jsdiff
License: BSD 3-Clause License
Copyright: 2009-2015 Kevin Decker <kpdecker@gmail.com>
---
JsonPatch.Net: A library for JSON Patch (RFC 6902) in .NET
URL: https://github.com/json-everything/json-everything
License: MIT License
Copyright: .NET Foundation and Contributors
---
K4os.Compression.LZ4: A fast LZ4 compression library for .NET
URL: https://github.com/MiloszKrajewski/K4os.Compression.LZ4
License: MIT License
Copyright: 2017 Milosz Krajewski
---
Lit: A simple library for building fast, lightweight web components
URL: https://lit.dev
License: BSD 3-Clause License
Copyright: 2020 Google LLC. All rights reserved.
---
Lucide: Beautiful & consistent icons for the web
URL: https://lucide.dev/
License: ISC License
Copyright: 2013-2022 Cole Bemis
Copyright: 2022 Lucide Contributors
---
Madge: A dependency graph generator for JavaScript
URL: https://github.com/pahen/madge
License: MIT License
Copyright: 2017 Patrik Henningsson
---
MailKit: A library for sending email in .NET
URL: https://github.com/jstedfast/MailKit
License: MIT License
Copyright: 2013-2024 .NET Foundation and Contributors
---
Markdown: A library for parsing and compiling Markdown
URL: https://github.com/hey-red/Markdown
License: MIT License
Copyright: 2018 red
---
marked: A markdown parser and compiler
URL: https://marked.js.org/
License: MIT License
Copyright: 2011-2018, Christopher Jeffrey (https://github.com/chjj/)
Copyright: 2018+, MarkedJS (https://github.com/markedjs/)
---
Message Pack: The extremely fast MessagePack serializer for C#
URL: https://github.com/MessagePack-CSharp/MessagePack-CSharp
License: MIT License
Copyright: 2017 Yoshifumi Kawai and contributors
---
Miniprofiler: A mini profiler for .NET
URL: https://github.com/MiniProfiler/dotnet
License: MIT License
Copyright: .NET MiniProfiler Contributors
---
Monaco Editor: A browser-based code editor
URL: https://microsoft.github.io/monaco-editor/
License: MIT License
Copyright: 2016-present Microsoft Corporation
---
Moq: A mocking library for .NET
URL: https://github.com/moq/moq
License: BSD 3-Clause License
Copyright: 2007 Clarius Consulting, Manas Technology Solutions, InSTEDD, and Contributors.
---
Mock Service Worker (MSW): A library for mocking API requests in JavaScript
URL: https://mswjs.io/
License: MIT License
Copyright: 2018present Artem Zakharchenko
---
NCrontab: A cron schedule parser for .NET
URL: https://github.com/atifaziz/NCrontab
License: Apache License, Version 2.0
Copyright: 2001 The OpenSymphony Group
Copyright: 2008 Atif Aziz
---
Nerdbank.GitVersioning: A library for versioning .NET projects
URL: https://github.com/dotnet/Nerdbank.GitVersioning
License: MIT License
Copyright: .NET Foundation and Contributors
---
NJsonSchema: A JSON schema validator for .NET
URL: https://github.com/RicoSuter/NJsonSchema
License: MIT License
Copyright: 2022 Rico Suter
---
NPoco: A micro ORM for .NET
URL: https://github.com/schotime/NPoco
License: Apache License, Version 2.0
Copyright: Schotime
---
NUnit: A unit testing framework for .NET
URL: https://github.com/nunit/nunit
License: MIT License
Copyright: Charlie Poole, Rob Prouse and Contributors
---
Open Web Components: A set of standards and libraries for building web components
URL: https://open-wc.org/
License: MIT License
Copyright: 2018 open-wc
---
Openapi-ts: The OpenAPI to TypeScript codegen
URL: https://github.com/hey-api/openapi-ts
License: MIT License
Copyright: Hey API
---
OpenIddict: A simple and flexible OpenID Connect server for ASP.NET Core
URL: https://github.com/openiddict/openiddict-core
License: Apache License, Version 2.0
Copyright: Kévin Chalet
---
Playwright: A Node.js library to automate browser testing
URL: https://playwright.dev/
License: Apache License, Version 2.0
Copyright: 2025 Microsoft Corporation
---
Playwright-msw: A library to wrap Mock Service Worker with Playwright
URL: https://github.com/valendres/playwright-msw
License: MIT License
Copyright: 2022 Peter Weller
---
Prettier: An opinionated code formatter
URL: https://prettier.io/
License: MIT License
Copyright: James Long and contributors
---
Remark-gfm: A GitHub Flavored Markdown plugin for Remark
URL: https://github.com/remarkjs/remark-gfm
License: MIT License
Copyright: Titus Wormer
---
Rollup: A module bundler for JavaScript
URL: https://rollupjs.org/
License: MIT License
Copyright: 2015-present Rollup contributors
---
Rollup Plugins: A collection of Rollup plugins
URL: https://github.com/rollup/plugins
License: MIT License
Copyright: 2019-present Rollup Plugins contributors
---
Rollup-plugin-esbuild: A Rollup plugin for using esbuild
URL: https://github.com/egoist/rollup-plugin-esbuild
License: MIT License
Copyright: 2020 EGOIST
---
Rollup-plugin-import-css: A Rollup plugin for importing CSS files
URL: https://github.com/jleeson/rollup-plugin-import-css
License: MIT License
Copyright: 2020 Jacob Leeson
---
rxjs: Reactive Extensions for JavaScript
URL: https://rxjs.dev/
License: Apache License, Version 2.0
Copyright: 2015-present Ben Lesh <ben@benlesh.com>, Google, Inc., Netflix, Inc., Microsoft Corp., and contributors
---
Serilog: A diagnostic logging library for .NET
URL: https://github.com/serilog/serilog
License: Apache License, Version 2.0
Copyright: Serilog Contributors
---
Simple Icons: A set of SVG icons for popular brands
URL: https://simpleicons.org/
License: CC0 1.0 Universal License
Copyright: Simple Icons Contributors
---
Storybook: A UI component explorer for Web Components
URL: https://storybook.js.org/
License: MIT License
Copyright: 2024 Storybook
---
StyleCop.Analyzers: Analyzers for StyleCop
URL: https://github.com/DotNetAnalyzers/StyleCopAnalyzers
License: MIT License
Copyright: Tunnel Vision Laboratories, LLC
---
SVGO: A tool for optimizing SVG files
URL: https://svgo.dev/
License: MIT License
Copyright: Kir Belevich
---
Swashbuckle.AspNetCore: A library for generating Swagger documentation for ASP.NET Core APIs
URL: https://github.com/domaindrivendev/Swashbuckle.AspNetCore
License: MIT License
Copyright: 2016 Richard Morris
---
Tiny Glob: A tiny globbing library for Node.js
URL: https://github.com/terkelg/tiny-glob
License: MIT License
Copyright: 2018 Terkel
---
TinyMCE, version 6.x: A rich text editor for the web
URL: https://www.tiny.cloud/
License: MIT License
Copyright: 2022 Ephox Corporation DBA Tiny Technologies, Inc.
---
Tiptap: A renderless rich-text editor for the web
URL: https://tiptap.dev/
License: MIT License
Copyright: 2025 Tiptap GmbH
---
Tsc-alias: A TypeScript compiler plugin for aliasing module paths
URL: https://github.com/justkey007/tsc-alias
License: MIT License
Copyright: 2018 Justkey
---
Typedoc: A documentation generator for TypeScript projects
URL: https://typedoc.org/
License: Apache License, Version 2.0
Copyright: Gerrit Birkeland and Contributors
---
Typescript: A typed superset of JavaScript that compiles to plain JavaScript
URL: https://www.typescriptlang.org/
License: Apache License, Version 2.0
Copyright: 2012-present Microsoft Corporation
---
Typescript-eslint: A set of tools for linting TypeScript code
URL: https://github.com/typescript-eslint/typescript-eslint
License: MIT License
Copyright: 2019 typescript-eslint and other contributors
---
Typescript-json-schema: A library for generating JSON schema from TypeScript types
URL: https://github.com/YousefED/typescript-json-schema
License: BSD 3-Clause License
Copyright: 2016 typescript-json-schema contributors
---
Umbraco.Code: Provides code-level tools for Umbraco
URL: https://github.com/umbraco/Umbraco-Code
License: MIT License
Copyright: 2005-present Umbraco A/S
---
Umbraco.GitVersioning.Extensions: Utilities for Nerdbank.GitVersioning
URL: https://github.com/umbraco/Umbraco.GitVersioning.Extensions
License: MIT License
Copyright: 2005-present Umbraco A/S
---
Umbraco.JsonSchema.Extensions: Utilities for JSON schema generation
URL: https://github.com/umbraco/Umbraco.JsonSchema.Extensions
License: MIT License
Copyright: 2005-present Umbraco A/S
---
Umbraco UI Library: A set of UI components for building web applications
URL: https://uui.umbraco.com/
License: MIT License
Copyright: 2005-present Umbraco A/S
---
uuid: A library for generating unique identifiers
URL: https://github.com/uuidjs/uuid
License: MIT License
Copyright: 2010-2020 Robert Kieffer and other contributors
---
Vite: A fast build tool and development server for modern web projects
URL: https://vite.dev/
License: MIT License
Copyright: 2019-present VoidZero Inc. and Vite contributors
---
Vite-plugin-static-copy: A Vite plugin for copying static files
URL: https://github.com/sapphi-red/vite-plugin-static-copy
License: MIT License
Copyright: 2021 sapphi-red
---
Vite-tsconfig-paths: A Vite plugin for resolving TypeScript paths
URL: https://github.com/aleclarson/vite-tsconfig-paths
License: MIT License
Copyright: Alec Larson
---
Web Component Analyzer: A tool for analyzing web components
URL: https://github.com/runem/web-component-analyzer
License: MIT License
Copyright: 2019 Rune Mehlsen
+10
View File
@@ -0,0 +1,10 @@
{
"folders": [
{
"path": "src/Umbraco.Web.UI.Client"
},
{
"path": "src/Umbraco.Web.UI.Login"
}
]
}
+282 -307
View File
@@ -5,6 +5,15 @@ parameters:
displayName: Run SQL Server Integration Tests
type: boolean
default: false
- name: sqlServerLinuxAcceptanceTests
displayName: Run SQL Server Linux Acceptance Tests
type: boolean
default: false
# Skipped due to DB locks, the tests are still being run on the Nightly build
- name: sqliteAcceptanceTests
displayName: Run SQLite Acceptance Tests
type: boolean
default: false
- name: myGetDeploy
displayName: Deploy to MyGet
type: boolean
@@ -32,21 +41,21 @@ parameters:
- name: integrationNonReleaseTestFilter
displayName: TestFilter used for non-release type builds
type: string
default: '--filter TestCategory!=LongRunning&TestCategory!=NonCritical'
default: "--filter TestCategory!=LongRunning&TestCategory!=NonCritical"
- name: integrationReleaseTestFilter
displayName: TestFilter used for release type builds
type: string
default: ' '
default: " "
- name: nonWindowsIntegrationNonReleaseTestFilter
displayName: TestFilter used for non-release type builds on non Windows agents
type: string
default: '--filter TestCategory!=LongRunning&TestCategory!=NonCritical'
default: "--filter TestCategory!=LongRunning&TestCategory!=NonCritical"
- name: nonWindowsIntegrationReleaseTestFilter
displayName: TestFilter used for release type builds on non Windows agents
type: string
default: ' '
default: " "
- name: isNightly
displayName: 'Is nightly build (used for MyGet feed)'
displayName: "Is nightly build (used for MyGet feed)"
type: boolean
default: false
@@ -71,24 +80,17 @@ stages:
- job: A
displayName: Build Umbraco CMS
pool:
vmImage: 'windows-latest'
vmImage: "windows-latest"
steps:
- checkout: self
submodules: true
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
- template: templates/backoffice-install.yml
- script: npm run build:for:cms
displayName: Run build (Bellissima)
workingDirectory: src/Umbraco.Web.UI.Client
- script: npm ci --no-fund --no-audit --prefer-offline
displayName: Run npm ci (Login)
workingDirectory: src/Umbraco.Web.UI.Login
- script: npm run build
displayName: Run npm build (Login)
workingDirectory: src/Umbraco.Web.UI.Login
- task: DotNetCoreCLI@2
displayName: Run dotnet restore
inputs:
@@ -100,7 +102,7 @@ stages:
inputs:
command: build
projects: $(solution)
arguments: '--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg'
arguments: "--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg"
- task: PublishPipelineArtifact@1
displayName: Publish nupkg
inputs:
@@ -115,10 +117,12 @@ stages:
- job: B
displayName: Build Bellissima Package
pool:
vmImage: 'ubuntu-latest'
vmImage: "ubuntu-latest"
steps:
- checkout: self
submodules: true
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- script: npm run build:for:npm
displayName: Run build:for:npm
@@ -148,7 +152,7 @@ stages:
- job:
displayName: Build C# API Reference
pool:
vmImage: 'windows-latest'
vmImage: "windows-latest"
steps:
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
@@ -197,12 +201,15 @@ stages:
- job:
displayName: Build js API Reference
pool:
vmImage: 'ubuntu-latest'
vmImage: "ubuntu-latest"
variables:
BASE_PATH: /v$(umbracoMajorVersion)/ui
steps:
- checkout: self
submodules: true
submodules: false
lfs: false,
fetchDepth: 1
fetchFilter: tree:0
- template: templates/backoffice-install.yml
- script: npm run storybook:build
displayName: Build Storybook
@@ -251,14 +258,19 @@ stages:
strategy:
matrix:
Windows:
vmImage: 'windows-latest'
vmImage: "windows-latest"
Linux:
vmImage: 'ubuntu-latest'
vmImage: "ubuntu-latest"
macOS:
vmImage: 'macOS-latest'
vmImage: "macOS-latest"
pool:
vmImage: $(vmImage)
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 1
fetchFilter: tree:0
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
inputs:
@@ -272,8 +284,8 @@ stages:
displayName: Run dotnet test
inputs:
command: test
projects: 'tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj'
arguments: '--configuration $(buildConfiguration) --no-build'
projects: "tests/Umbraco.Tests.UnitTests/Umbraco.Tests.UnitTests.csproj"
arguments: "--configuration $(buildConfiguration) --no-build"
testRunTitle: Unit Tests - $(Agent.OS)
- stage: Integration
@@ -288,17 +300,43 @@ stages:
displayName: Integration Tests (SQLite)
strategy:
matrix:
# Windows:
# vmImage: 'windows-latest'
Linux:
vmImage: 'ubuntu-latest'
macOS:
vmImage: 'macOS-latest'
# Windows:
# vmImage: 'windows-latest'
# We split the tests into 3 parts for each OS to reduce the time it takes to run them on the pipeline
LinuxPart1Of3:
vmImage: "ubuntu-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
macOSPart1Of3:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
macOSPart2Of3:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
macOSPart3Of3:
vmImage: "macOS-latest"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
pool:
vmImage: $(vmImage)
variables:
Tests__Database__DatabaseType: 'Sqlite'
Tests__Database__DatabaseType: "Sqlite"
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 1
fetchFilter: tree:0
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
@@ -316,17 +354,16 @@ stages:
displayName: Run dotnet test
inputs:
command: test
projects: 'tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj'
projects: "tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
testRunTitle: Integration Tests SQLite - $(Agent.OS)
${{ if and(eq(variables['Agent.OS'],'Windows_NT'), or(variables.releaseTestFilter, parameters.forceReleaseTestFilter)) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
${{ elseif eq(variables['Agent.OS'],'Windows_NT') }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
${{ elseif or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
${{ else }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
# Integration Tests (SQL Server)
- job:
timeoutInMinutes: 180
@@ -335,15 +372,46 @@ stages:
displayName: Integration Tests (SQL Server)
strategy:
matrix:
Windows:
vmImage: 'windows-latest'
# We split the tests into 3 parts for each OS to reduce the time it takes to run them on the pipeline
WindowsPart1Of3:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
Linux:
vmImage: 'ubuntu-latest'
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
WindowsPart2Of3:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
WindowsPart3Of3:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
LinuxPart1Of3:
vmImage: "ubuntu-latest"
SA_PASSWORD: UmbracoIntegration123!
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: 'Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True'
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
SA_PASSWORD: UmbracoIntegration123!
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
SA_PASSWORD: UmbracoIntegration123!
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
pool:
vmImage: $(vmImage)
steps:
@@ -364,6 +432,33 @@ stages:
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- powershell: |
$maxAttempts = 12
$attempt = 0
$status = ""
while (($status -ne 'running') -and ($attempt -lt $maxAttempts)) {
Start-Sleep -Seconds 5
# We use the docker inspect command to check the status of the container. If the container is not running, we wait 5 seconds and try again. And if reaches 12 attempts, we fail the build.
$status = docker inspect -f '{{.State.Status}}' mssql
if ($status -ne 'running') {
Write-Host "Waiting for SQL Server to be ready... Attempt $($attempt + 1)"
$attempt++
}
}
if ($status -eq 'running') {
Write-Host "SQL Server container is running"
docker ps -a
} else {
Write-Host "SQL Server did not become ready in time. Last known status: $status"
docker logs mssql
exit 1
}
displayName: Wait for SQL Server to be ready (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
@@ -373,16 +468,16 @@ stages:
displayName: Run dotnet test
inputs:
command: test
projects: 'tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj'
projects: "tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
testRunTitle: Integration Tests SQL Server - $(Agent.OS)
${{ if and(eq(variables['Agent.OS'],'Windows_NT'), or(variables.releaseTestFilter, parameters.forceReleaseTestFilter)) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationReleaseTestFilter}}'
${{ elseif eq(variables['Agent.OS'],'Windows_NT') }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.integrationNonReleaseTestFilter}}'
${{ elseif or(variables.releaseTestFilter, parameters.forceReleaseTestFilter) }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationReleaseTestFilter}}'
${{ else }}:
arguments: '--configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build ${{parameters.nonWindowsIntegrationNonReleaseTestFilter}}'
# Stop SQL Server
- pwsh: docker stop mssql
@@ -421,132 +516,76 @@ stages:
# E2E Tests
- job:
displayName: E2E Tests (SQLite)
# currently disabled due to DB locks randomly occuring.
condition: eq(${{parameters.sqliteAcceptanceTests}}, True)
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=Umbraco;Mode=Memory;Cache=Shared;Foreign Keys=True;Pooling=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.Sqlite
DatabaseType: SQLite
strategy:
matrix:
Linux:
vmImage: 'ubuntu-latest'
Windows:
vmImage: 'windows-latest'
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
retryCountOnTaskFailure: 3
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Run application
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
DatabaseType: ${{ variables.DatabaseType }}
buildConfiguration: ${{ variables.buildConfiguration }}
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: npm run smokeTestSqlite --ignore-certificate-errors
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
- job:
displayName: E2E Tests (SQL Server)
@@ -554,147 +593,76 @@ stages:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
DatabaseType: SQLServer
strategy:
matrix:
Linux:
vmImage: 'ubuntu-latest'
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: 'Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True'
Windows:
vmImage: 'windows-latest'
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
LinuxPart1Of3:
testCommand: "npm run smokeTest -- --shard=1/3"
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run smokeTest -- --shard=2/3"
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run smokeTest -- --shard=3/3"
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTest -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTest -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run smokeTest -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Start SQL Server
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
SA_PASSWORD: ${{ variables.SA_PASSWORD }}
buildConfiguration: ${{ variables.buildConfiguration }}
DatabaseType: ${{ variables.DatabaseType }}
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Run application
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: npm run smokeTest --ignore-certificate-errors
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
###############################################
## Release
@@ -704,10 +672,12 @@ stages:
dependsOn:
- Unit
- Integration
# - E2E
- E2E
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.myGetDeploy}}))
jobs:
- job:
pool:
vmImage: "windows-latest" # NuGetCommand@2 is no longer supported on Ubuntu 24.04 so we'll use windows until an alternative is available.
displayName: Push to pre-release feed
steps:
- checkout: none
@@ -719,13 +689,13 @@ stages:
- task: NuGetCommand@2
displayName: NuGet push
inputs:
command: 'push'
command: "push"
packagesToPush: $(Build.ArtifactStagingDirectory)/**/*.nupkg
nuGetFeedType: 'external'
nuGetFeedType: "external"
${{ if eq(parameters.isNightly, true) }}:
publishFeedCredentials: 'MyGet - Umbraco Nightly'
publishFeedCredentials: "MyGet - Umbraco Nightly"
${{ else }}:
publishFeedCredentials: 'MyGet - Pre-releases'
publishFeedCredentials: "MyGet - Pre-releases"
- job:
displayName: Push to pre-release feed (npm)
steps:
@@ -749,8 +719,8 @@ stages:
- task: npmAuthenticate@0
displayName: Authenticate with npm (MyGet)
inputs:
workingFile: '$(Pipeline.Workspace)/npm/.npmrc'
customEndpoint: 'MyGet (npm) - Umbracoprereleases, MyGet (npm) - Umbraconightly'
workingFile: "$(Pipeline.Workspace)/npm/.npmrc"
customEndpoint: "MyGet (npm) - Umbracoprereleases, MyGet (npm) - Umbraconightly"
- bash: |
# Setup temp npm project to load in defaults from the local .npmrc
npm init -y
@@ -769,6 +739,8 @@ stages:
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.nuGetDeploy}}))
jobs:
- job:
pool:
vmImage: "windows-latest" # NuGetCommand@2 is no longer supported on Ubuntu 24.04 so we'll use windows until an alternative is available.
displayName: Push to NuGet
steps:
- checkout: none
@@ -780,10 +752,10 @@ stages:
- task: NuGetCommand@2
displayName: NuGet push
inputs:
command: 'push'
command: "push"
packagesToPush: $(Build.ArtifactStagingDirectory)/**/*.nupkg
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet - Umbraco.*'
nuGetFeedType: "external"
publishFeedCredentials: "NuGet - Umbraco.*"
- stage: Deploy_Npm
displayName: Npm release
@@ -804,7 +776,7 @@ stages:
displayName: Authenticate with npm
inputs:
workingFile: $(Pipeline.Workspace)/npm/.npmrc
customEndpoint: 'NPM - Umbraco Backoffice'
customEndpoint: "NPM - Umbraco Backoffice"
- script: |
# Setup temp npm project to load in defaults from the local .npmrc
npm init -y
@@ -817,7 +789,7 @@ stages:
- stage: Upload_API_Docs
pool:
vmImage: 'windows-latest' # Apparently AzureFileCopy is windows only :(
vmImage: "windows-latest" # Apparently AzureFileCopy is windows only :(
variables:
umbracoMajorVersion: $[ stageDependencies.Build.A.outputs['build.NBGV_VersionMajor'] ]
displayName: Upload API Documentation
@@ -839,14 +811,15 @@ stages:
inputs:
archiveFilePatterns: $(Build.SourcesDirectory)/csharp-docs.zip
destinationFolder: $(Build.ArtifactStagingDirectory)/csharp-docs
overwriteExistingFiles: true
- task: AzureFileCopy@4
displayName: 'Copy C# Docs to blob storage'
displayName: "Copy C# Docs to blob storage"
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/csharp-docs/*'
SourcePath: "$(Build.ArtifactStagingDirectory)/csharp-docs/*"
azureSubscription: umbraco-storage
Destination: AzureBlob
storage: umbracoapidocs
ContainerName: '$web'
ContainerName: "$web"
BlobPrefix: v$(umbracoMajorVersion)/csharp
CleanTargetBeforeCopy: true
- job:
@@ -862,14 +835,15 @@ stages:
inputs:
archiveFilePatterns: $(Build.SourcesDirectory)/ui-docs.zip
destinationFolder: $(Build.ArtifactStagingDirectory)/ui-docs
overwriteExistingFiles: true
- task: AzureFileCopy@4
displayName: 'Copy Storybook to blob storage'
displayName: "Copy Storybook to blob storage"
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/ui-docs/*'
SourcePath: "$(Build.ArtifactStagingDirectory)/ui-docs/*"
azureSubscription: umbraco-storage
Destination: AzureBlob
storage: umbracoapidocs
ContainerName: '$web'
ContainerName: "$web"
BlobPrefix: v$(umbracoMajorVersion)/ui
CleanTargetBeforeCopy: true
- job:
@@ -885,13 +859,14 @@ stages:
inputs:
archiveFilePatterns: $(Build.SourcesDirectory)/ui-api-docs.zip
destinationFolder: $(Build.ArtifactStagingDirectory)/ui-api-docs
overwriteExistingFiles: true
- task: AzureFileCopy@4
displayName: 'Copy UI API Docs to blob storage'
displayName: "Copy UI API Docs to blob storage"
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/ui-api-docs/*'
SourcePath: "$(Build.ArtifactStagingDirectory)/ui-api-docs/*"
azureSubscription: umbraco-storage
Destination: AzureBlob
storage: umbracoapidocs
ContainerName: '$web'
ContainerName: "$web"
BlobPrefix: v$(umbracoMajorVersion)/ui-api
CleanTargetBeforeCopy: true
+75
View File
@@ -0,0 +1,75 @@
parameters:
- name: testFolder
type: string
default: ''
- name: buildConfiguration
type: string
default: ''
- name: additionalEnvironmentVariables
type: boolean
default: False
steps:
- pwsh: |
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
# Update application to use necessary app settings
- pwsh: |
$sourcePath = "$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/tests/${{ parameters.testFolder }}/AdditionalSetup"
$destinationPath = "UmbracoProject"
$jsonFiles = Get-ChildItem -Path $sourcePath -Filter "*.json"
if ($jsonFiles) {
$jsonFiles | ForEach-Object {
Write-Host "Copying: $($_.FullName)"
Copy-Item -Path $_.FullName -Destination $destinationPath -Force
}
} else {
Write-Host "No JSON files found."
}
displayName: Update application to use necessary app settings
workingDirectory: $(Agent.BuildDirectory)/app
# Update application to use necessary App_Plugins
- pwsh: |
$sourcePath = "$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/tests/${{ parameters.testFolder }}/AdditionalSetup"
$destinationPath = "UmbracoProject"
$appPluginsFolders = Get-ChildItem -Path $sourcePath -Directory -Filter "App_Plugins"
if ($appPluginsFolders) {
foreach ($folder in $appPluginsFolders) {
Write-Host "Copying folder: $($folder.FullName)"
Copy-Item -Path $folder.FullName -Destination $destinationPath -Recurse -Force
}
} else {
Write-Host "No App_Plugins found."
}
displayName: Update application to use necessary app plugins
workingDirectory: $(Agent.BuildDirectory)/app
# Update application to use necessary classes
- pwsh: |
$sourcePath = "$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/tests/${{ parameters.testFolder }}/AdditionalSetup"
$destinationPath = "UmbracoProject"
$csharpFiles = Get-ChildItem -Path $sourcePath -Filter "*.cs"
if ($csharpFiles) {
$csharpFiles | ForEach-Object {
Write-Host "Copying: $($_.FullName)"
Copy-Item -Path $_.FullName -Destination $destinationPath -Force
}
} else {
Write-Host "No C# files found."
}
displayName: Update application to use necessary classes
workingDirectory: $(Agent.BuildDirectory)/app
- ${{ if eq(parameters.additionalEnvironmentVariables, False) }}:
- pwsh: |
dotnet build UmbracoProject --configuration ${{ parameters.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
@@ -0,0 +1,47 @@
parameters:
- name: SA_PASSWORD
type: string
default: ''
- name: buildConfiguration
type: string
default: ''
- name: additionalEnvironmentVariables
type: boolean
default: False
- name: DatabaseType
type: string
default: ''
steps:
# Skips the SQLServer setup if the databaseType does not match
- ${{ if eq(parameters.DatabaseType, 'SQLServer') }}:
# Start SQL Server Linux
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=${{ parameters.SA_PASSWORD }}" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Start SQL Server LocalDB Windows
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# If we want to add additional environment variables to the run step, then we will skip these
- ${{ if eq(parameters.additionalEnvironmentVariables, False) }}:
# Run application for Linux
- bash: |
nohup dotnet run --project UmbracoProject --configuration ${{ parameters.buildConfiguration }} --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
# Run application for Windows
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration ${{ parameters.buildConfiguration }} --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
+105
View File
@@ -0,0 +1,105 @@
parameters:
- name: ASPNETCORE_URLS
type: string
default: ''
- name: testCommand
type: string
default: ''
- name: port
type: string
default: ''
- name: AZUREB2CTESTUSEREMAIL
type: string
default: ''
- name: AZUREB2CTESTUSERPASSWORD
type: string
default: ''
- name: DatabaseType
type: string
default: ''
steps:
# Ensures we have the package wait-on installed
- pwsh: npm install wait-on
displayName: Install wait-on package
# Wait for either the port of the aspnetcore url
- pwsh: |
$Port = "${{ parameters.port }}"
$Url = "${{ parameters.ASPNETCORE_URLS }}"
if ($Port -ne "") {
Write-Host "Waiting on TCP port $Port"
npx wait-on -v --interval 1000 --timeout 120000 "tcp:$Port"
} else {
Write-Host "Waiting on URL $Url"
npx wait-on -v --interval 1000 --timeout 120000 "$Url"
}
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: ${{ parameters.testCommand }}
displayName: Run Playwright tests
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
AZUREADB2CTESTUSEREMAIL: ${{ parameters.AZUREB2CTESTUSEREMAIL }}
AZUREADB2CTESTUSERPASSWORD: ${{ parameters.AZUREB2CTESTUSERPASSWORD }}
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeededOrFailed(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeededOrFailed(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
- ${{ if eq(parameters.DatabaseType, 'SQLServer') }}:
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
+69
View File
@@ -0,0 +1,69 @@
parameters:
- name: nodeVersion
type: string
default: ''
- name: PlaywrightUserEmail
type: string
default: ''
- name: PlaywrightPassword
type: string
default: ''
- name: ASPNETCORE_URLS
type: string
default: ''
- name: npm_config_cache
type: string
default: ''
steps:
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
- pwsh: |
"UMBRACO_USER_LOGIN=${{ parameters.PlaywrightUserEmail }}
UMBRACO_USER_PASSWORD=${{ parameters.PlaywrightPassword }}
URL=${{ parameters.ASPNETCORE_URLS }}
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: ${{ parameters.npm_config_cache }}
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Install Template
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
displayName: Install Template
workingDirectory: $(Agent.BuildDirectory)/app
+495 -266
View File
@@ -3,13 +3,29 @@ name: Nightly_E2E_Test_$(TeamProject)_$(Build.DefinitionName)_$(SourceBranchName
pr: none
trigger: none
schedules:
- cron: '0 0 * * *'
displayName: Daily midnight build
branches:
include:
- v14/dev
- v15/dev
# schedules:
# - cron: '0 0 * * *'
# displayName: Daily midnight build
# branches:
# include:
# - v14/dev
# - v15/dev
parameters:
- name: differentAppSettingsAcceptanceTests
displayName: Run acceptance tests with different app settings
type: boolean
default: false
- name: skipDefaultConfigAcceptanceTests
displayName: Skip tests with DefaultConfig
type: boolean
default: false
- name: skipIntegrationTests
displayName: Skip integration tests
type: boolean
default: false
variables:
nodeVersion: 20
@@ -23,12 +39,6 @@ variables:
npm_config_cache: $(Pipeline.Workspace)/.npm_client
NODE_OPTIONS: --max_old_space_size=16384
parameters:
- name: runSmokeTests
displayName: Run the smoke tests
type: boolean
default: false
stages:
###############################################
## Build
@@ -38,25 +48,17 @@ stages:
- job: A
displayName: Build Umbraco CMS
pool:
vmImage: 'ubuntu-latest'
vmImage: "windows-latest"
steps:
- checkout: self
fetchDepth: 0
submodules: true
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
- template: templates/backoffice-install.yml
- script: npm run build:for:cms
displayName: Run build (Bellissima)
workingDirectory: src/Umbraco.Web.UI.Client
- script: npm ci --no-fund --no-audit --prefer-offline
displayName: Run npm ci (Login)
workingDirectory: src/Umbraco.Web.UI.Login
- script: npm run build
displayName: Run npm build (Login)
workingDirectory: src/Umbraco.Web.UI.Login
- task: DotNetCoreCLI@2
displayName: Run dotnet restore
inputs:
@@ -68,7 +70,7 @@ stages:
inputs:
command: build
projects: $(solution)
arguments: '--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg'
arguments: "--configuration $(buildConfiguration) --no-restore --property:ContinuousIntegrationBuild=true --property:GeneratePackageOnBuild=true --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg"
- task: PublishPipelineArtifact@1
displayName: Publish nupkg
inputs:
@@ -80,8 +82,237 @@ stages:
targetPath: $(Build.SourcesDirectory)
artifactName: build_output
- stage: E2E
displayName: E2E Tests
- job: B
displayName: Build Bellissima Package
pool:
vmImage: "ubuntu-latest"
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 500
- template: templates/backoffice-install.yml
- script: npm run build:for:npm
displayName: Run build:for:npm
workingDirectory: src/Umbraco.Web.UI.Client
- bash: |
echo "##[command]Running npm pack"
echo "##[debug]Output directory: $(Build.ArtifactStagingDirectory)"
mkdir $(Build.ArtifactStagingDirectory)/npm
npm pack --pack-destination $(Build.ArtifactStagingDirectory)/npm
mv .npmrc $(Build.ArtifactStagingDirectory)/npm/
displayName: Run npm pack
workingDirectory: src/Umbraco.Web.UI.Client
- task: PublishPipelineArtifact@1
displayName: Publish Bellissima npm artifact
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/npm
artifactName: npm
- stage: Integration
displayName: Integration Tests
dependsOn: Build
condition: ${{ eq(parameters.skipIntegrationTests, false) }}
jobs:
# Integration Tests (SQLite)
- job:
timeoutInMinutes: 180
displayName: Integration Tests (SQLite)
strategy:
matrix:
# Windows:
# vmImage: 'windows-latest'
# We split the tests into 4 parts for each OS to reduce the time it takes to run them on the pipeline
LinuxPart1Of4:
vmImage: "ubuntu-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
LinuxPart2Of4:
vmImage: "ubuntu-latest"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of4:
vmImage: "ubuntu-latest"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
LinuxPart4Of4:
vmImage: "ubuntu-latest"
# Filter tests that are part of the ManagementApi namespace
testFilter: "(FullyQualifiedName~ManagementApi)"
macOSPart1Of4:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
macOSPart2Of4:
vmImage: "macOS-latest"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
macOSPart3Of4:
vmImage: "macOS-latest"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
macOSPart4Of4:
vmImage: "macOS-latest"
# Filter tests that are part of the ManagementApi namespace.
testFilter: "(FullyQualifiedName~ManagementApi)"
pool:
vmImage: $(vmImage)
variables:
Tests__Database__DatabaseType: "Sqlite"
steps:
- checkout: self
submodules: false
lfs: false,
fetchDepth: 1
fetchFilter: tree:0
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
inputs:
artifact: build_output
path: $(Build.SourcesDirectory)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Test
- task: DotNetCoreCLI@2
displayName: Run dotnet test
inputs:
command: test
projects: "tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
testRunTitle: Integration Tests SQLite - $(Agent.OS)
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build'
# Integration Tests (SQL Server)
- job:
timeoutInMinutes: 180
displayName: Integration Tests (SQL Server)
variables:
SA_PASSWORD: UmbracoAcceptance123!
strategy:
matrix:
# We split the tests into 4 parts for each OS to reduce the time it takes to run them on the pipeline
WindowsPart1Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
WindowsPart2Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
WindowsPart3Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
WindowsPart4Of4:
vmImage: "windows-latest"
Tests__Database__DatabaseType: LocalDb
Tests__Database__SQLServerMasterConnectionString: N/A
# Filter tests that are part of the ManagementApi namespace.
testFilter: "(FullyQualifiedName~ManagementApi)"
LinuxPart1Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are part of the Umbraco.Infrastructure namespace but not part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure) & (FullyQualifiedName!~Umbraco.Infrastructure.Service)"
LinuxPart2Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are part of the Umbraco.Infrastructure.Service namespace
testFilter: "(FullyQualifiedName~Umbraco.Infrastructure.Service)"
LinuxPart3Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace.
testFilter: "(FullyQualifiedName!~Umbraco.Infrastructure) & (FullyQualifiedName!~ManagementApi)"
LinuxPart4Of4:
vmImage: "ubuntu-latest"
Tests__Database__DatabaseType: SqlServer
Tests__Database__SQLServerMasterConnectionString: "Server=(local);User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
# Filter tests that are part of the ManagementApi namespace.
testFilter: "(FullyQualifiedName~ManagementApi)"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download build artifacts
inputs:
artifact: build_output
path: $(Build.SourcesDirectory)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Start SQL Server
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- powershell: |
$maxAttempts = 12
$attempt = 0
$status = ""
while (($status -ne 'running') -and ($attempt -lt $maxAttempts)) {
Start-Sleep -Seconds 5
# We use the docker inspect command to check the status of the container. If the container is not running, we wait 5 seconds and try again. And if reaches 12 attempts, we fail the build.
$status = docker inspect -f '{{.State.Status}}' mssql
if ($status -ne 'running') {
Write-Host "Waiting for SQL Server to be ready... Attempt $($attempt + 1)"
$attempt++
}
}
if ($status -eq 'running') {
Write-Host "SQL Server container is running"
docker ps -a
} else {
Write-Host "SQL Server did not become ready in time. Last known status: $status"
docker logs mssql
exit 1
}
displayName: Wait for SQL Server to be ready (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Test
- task: DotNetCoreCLI@2
displayName: Run dotnet test
inputs:
command: test
projects: "tests/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj"
testRunTitle: Integration Tests SQL Server - $(Agent.OS)
arguments: '--filter "$(testFilter)" --configuration $(buildConfiguration) --no-build'
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
- stage: DefaultConfigE2E
displayName: Default Config E2E Tests
dependsOn: Build
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm_e2e
@@ -109,292 +340,290 @@ stages:
- job:
displayName: E2E Tests (SQLite)
timeoutInMinutes: 180
condition: ${{ eq(parameters.skipDefaultConfigAcceptanceTests, false) }}
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=Umbraco;Mode=Memory;Cache=Shared;Foreign Keys=True;Pooling=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.Sqlite
DatabaseType: SQLite
strategy:
matrix:
Linux:
vmImage: 'ubuntu-latest'
Windows:
vmImage: 'windows-latest'
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testFolder: "DefaultConfig"
testCommand: "npm run testSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
retryCountOnTaskFailure: 3
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Run application
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
workingDirectory: $(Agent.BuildDirectory)/app
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
DatabaseType: ${{ variables.DatabaseType }}
buildConfiguration: ${{ variables.buildConfiguration }}
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(Agent.BuildDirectory)/app
# Ensures we have the package wait-on installed
- pwsh: npm install wait-on
displayName: Install wait-on package
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- ${{ if eq(parameters.runSmokeTests, true) }}:
pwsh: npm run smokeTestSqlite --ignore-certificate-errors
${{ else }}:
pwsh: npm run testSqlite --ignore-certificate-errors
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
- job:
displayName: E2E Tests (SQL Server)
timeoutInMinutes: 180
condition: ${{ eq(parameters.skipDefaultConfigAcceptanceTests, false) }}
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
DatabaseType: SQLServer
SA_PASSWORD: UmbracoAcceptance123!
strategy:
matrix:
Linux:
vmImage: 'ubuntu-latest'
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: 'Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True'
Windows:
vmImage: 'windows-latest'
LinuxPart1Of3:
testCommand: "npm run test -- --shard=1/3"
testFolder: "DefaultConfig"
vmImage: "ubuntu-latest"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run test -- --shard=2/3"
testFolder: "DefaultConfig"
vmImage: "ubuntu-latest"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run test -- --shard=3/3"
testFolder: "DefaultConfig"
vmImage: "ubuntu-latest"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
WindowsPart1Of3:
testCommand: "npm run test -- --shard=1/3"
testFolder: "DefaultConfig"
vmImage: "windows-latest"
WindowsPart2Of3:
testCommand: "npm run test -- --shard=2/3"
testFolder: "DefaultConfig"
vmImage: "windows-latest"
WindowsPart3Of3:
testCommand: "npm run test -- --shard=3/3"
testFolder: "DefaultConfig"
vmImage: "windows-latest"
pool:
vmImage: $(vmImage)
steps:
# Setup test environment
- task: DownloadPipelineArtifact@2
displayName: Download NuGet artifacts
inputs:
artifact: nupkg
path: $(Agent.BuildDirectory)/app/nupkg
- task: NodeTool@0
displayName: Use Node.js $(nodeVersion)
inputs:
versionSpec: $(nodeVersion)
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
useGlobalJson: true
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL }}
PlaywrightPassword: ${{ variables.UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
- pwsh: |
"UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL)
UMBRACO_USER_PASSWORD=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
URL=$(ASPNETCORE_URLS)
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
# Cache and restore NPM packages
- task: Cache@2
displayName: Cache NPM packages
inputs:
key: 'npm_e2e | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json'
restoreKeys: |
npm_e2e | "$(Agent.OS)"
npm_e2e
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
displayName: Restore NPM packages
# Build application
- pwsh: |
$cmsVersion = "$(Build.BuildNumber)" -replace "\+",".g"
dotnet new nugetconfig
dotnet nuget add source ./nupkg --name Local
dotnet new install Umbraco.Templates::$cmsVersion
dotnet new umbraco --name UmbracoProject --version $cmsVersion --exclude-gitignore --no-restore --no-update-check
dotnet restore UmbracoProject
cp $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest.UmbracoProject/*.cs UmbracoProject
dotnet build UmbracoProject --configuration $(buildConfiguration) --no-restore
displayName: Restore project
workingDirectory: $(Agent.BuildDirectory)/app
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application
workingDirectory: $(Agent.BuildDirectory)/app
condition: succeeded()
# Start SQL Server
- powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest
displayName: Start SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
SA_PASSWORD: ${{ variables.SA_PASSWORD }}
buildConfiguration: ${{ variables.buildConfiguration }}
DatabaseType: ${{ variables.DatabaseType }}
- pwsh: SqlLocalDB start MSSQLLocalDB
displayName: Start SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
DatabaseType: ${{ variables.DatabaseType }}
# Run application
- stage: AdditionalConfigE2E
displayName: Additional Config E2E Tests
dependsOn: Build
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm_e2e
ASPNETCORE_URLS: https://localhost:44331
PlaywrightPassword: UmbracoAcceptance123!
PlaywrightUserEmail: playwright@umbraco.com
jobs:
- job:
displayName: E2E Tests with Different App settings (SQL Server)
condition: ${{ eq(parameters.differentAppSettingsAcceptanceTests, true) }}
timeoutInMinutes: 180
variables:
SA_PASSWORD: UmbracoAcceptance123!
DatabaseType: SQLServer
strategy:
matrix:
# UnattendedInstallConfig
WindowsUnattendedInstallConfig:
vmImage: "windows-latest"
testFolder: "UnattendedInstallConfig"
testCommand: "npx playwright test --project=unattendedInstallConfig --grep=InstallSQLServer"
port: 44331
additionalEnvironmentVariables: false
# DeliveryApiConfig
WindowsDeliveryApiConfig:
vmImage: "windows-latest"
testFolder: "DeliveryApi"
port: ''
testCommand: "npx playwright test --project=deliveryApi"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
LinuxDeliveryApiConfig:
vmImage: "ubuntu-latest"
testFolder: "DeliveryApi"
port: ''
testCommand: "npx playwright test --project=deliveryApi"
CONNECTIONSTRINGS__UMBRACODBDSN: Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: false
# ExternalLogin AzureADB2C
WindowsExternalLoginAzureADB2C:
vmImage: "windows-latest"
testFolder: "ExternalLogin\\AzureADB2C"
testCommand: "npx playwright test --project=externalLoginAzureADB2C"
port: 44331
packageName: "Microsoft.AspNetCore.Authentication.OpenIdConnect"
packageVersion: "9.0.8"
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Umbraco.mdf;Integrated Security=True
CONNECTIONSTRINGS__UMBRACODBDSN_PROVIDERNAME: Microsoft.Data.SqlClient
additionalEnvironmentVariables: true
pool:
vmImage: $(vmImage)
steps:
# Setup test environment Template
- template: nightly-E2E-setup-template.yml
parameters:
nodeVersion: ${{ variables.nodeVersion }}
PlaywrightUserEmail: ${{ variables.PlaywrightUserEmail }}
PlaywrightPassword: ${{ variables.PlaywrightPassword }}
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
npm_config_cache: ${{ variables.npm_config_cache }}
# Install NuGet package if specified in the matrix
- pwsh: |
Write-Host "Installing package $(packageName) version $(packageVersion)"
dotnet add package $(packageName) --version $(packageVersion)
displayName: "Install NuGet package: $(packageName)"
workingDirectory: $(Agent.BuildDirectory)/app/UmbracoProject
condition: and(succeeded(), ne(variables['packageName'], ''), ne(variables['packageVersion'], ''))
# Build application Template
- template: nightly-E2E-build-template.yml
parameters:
testFolder: $(testFolder)
buildConfiguration: ${{ variables.buildConfiguration }}
additionalEnvironmentVariables: ${{ eq(variables['additionalEnvironmentVariables'], true) }}
# Build application for AzureADB2C
- pwsh: |
dotnet build UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-restore
dotnet dev-certs https
displayName: Build application for AzureADB2C
workingDirectory: $(Agent.BuildDirectory)/app
env:
AZUREADB2CDOMAIN: $(AZUREB2CDOMAIN)
AZUREADB2CTENANT: $(AZUREB2CTENANT)
AZUREADB2CPOLICY: $(AZUREB2CPOLICY)
AZUREADB2CCLIENTID: $(AZUREB2CCLIENTID)
AZUREADB2CCLIENTSECRET: $(AZUREB2CCLIENTSECRET)
condition: and(succeeded(), eq(variables['testFolder'], 'ExternalLogin\AzureADB2C'))
# Run application Template
- template: nightly-E2E-run-application-template.yml
parameters:
SA_PASSWORD: ${{ variables.SA_PASSWORD }}
additionalEnvironmentVariables: ${{ eq(variables['additionalEnvironmentVariables'], true ) }}
buildConfiguration: ${{ variables.buildConfiguration }}
DatabaseType: ${{ variables.DatabaseType }}
# Run application for Linux with additional Environment Variables for Azure AD
- bash: |
nohup dotnet run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
nohup dotnet run --project UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-build --no-launch-profile > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1 &
echo "##vso[task.setvariable variable=AcceptanceTestProcessId]$!"
displayName: Run application (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['testFolder'], 'ExternalLogin\AzureADB2C'))
workingDirectory: $(Agent.BuildDirectory)/app
env:
AZUREADB2CDOMAIN: $(AZUREB2CDOMAIN)
AZUREADB2CTENANT: $(AZUREB2CTENANT)
AZUREADB2CPOLICY: $(AZUREB2CPOLICY)
AZUREADB2CCLIENTID: $(AZUREB2CCLIENTID)
AZUREADB2CCLIENTSECRET: $(AZUREB2CCLIENTSECRET)
# Run application for Windows with additional Environment Variables for Azure AD
- pwsh: |
$process = Start-Process dotnet "run --project UmbracoProject --configuration $(buildConfiguration) --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
$process = Start-Process dotnet "run --project UmbracoProject --configuration ${{ variables.buildConfiguration }} --no-build --no-launch-profile 2>&1" -PassThru -NoNewWindow -RedirectStandardOutput $(Build.ArtifactStagingDirectory)/playwright.log
Write-Host "##vso[task.setvariable variable=AcceptanceTestProcessId]$($process.Id)"
displayName: Run application (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['testFolder'], 'ExternalLogin\AzureADB2C'))
workingDirectory: $(Agent.BuildDirectory)/app
# Ensures we have the package wait-on installed
- pwsh: npm install wait-on
displayName: Install wait-on package
# Wait for application to start responding to requests
- pwsh: npx wait-on -v --interval 1000 --timeout 120000 $(ASPNETCORE_URLS)
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- ${{ if eq(parameters.runSmokeTests, true) }}:
pwsh: npm run smokeTest --ignore-certificate-errors
${{ else }}:
pwsh: npm run test --ignore-certificate-errors
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
AZUREADB2CDOMAIN: $(AZUREB2CDOMAIN)
AZUREADB2CTENANT: $(AZUREB2CTENANT)
AZUREADB2CPOLICY: $(AZUREB2CPOLICY)
AZUREADB2CCLIENTID: $(AZUREB2CCLIENTID)
AZUREADB2CCLIENTSECRET: $(AZUREB2CCLIENTSECRET)
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
}
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
# Run tests Template
- template: nightly-E2E-run-tests-template.yml
parameters:
testCommand: $(testCommand)
ASPNETCORE_URLS: ${{ variables.ASPNETCORE_URLS }}
port: $(port)
AZUREB2CTESTUSEREMAIL: $(AZUREB2CTESTUSEREMAIL)
AZUREB2CTESTUSERPASSWORD: $(AZUREB2CTESTUSERPASSWORD)
DatabaseType: ${{ variables.DatabaseType }}
+2 -1
View File
@@ -9,9 +9,10 @@ schedules:
branches:
include:
- v10/dev
- v12/dev
- v13/dev
- v14/dev
- v15/dev
- v16/dev
steps:
- checkout: none
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.DependencyInjection;
@@ -48,17 +49,15 @@ public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOpt
swaggerGenOptions.CustomOperationIds(description => _operationIdSelector.OperationId(description));
swaggerGenOptions.DocInclusionPredicate((name, api) =>
{
if (string.IsNullOrWhiteSpace(api.GroupName))
if (api.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor
&& controllerActionDescriptor.MethodInfo.HasMapToApiAttribute(name))
{
return false;
return true;
}
if (api.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
{
return controllerActionDescriptor.MethodInfo.HasMapToApiAttribute(name);
}
return false;
ApiVersionMetadata apiVersionMetadata = api.ActionDescriptor.GetApiVersionMetadata();
return apiVersionMetadata.Name == name
|| (string.IsNullOrEmpty(apiVersionMetadata.Name) && name == DefaultApiConfiguration.ApiName);
});
swaggerGenOptions.TagActionsBy(api => new[] { api.GroupName });
swaggerGenOptions.OrderActionsBy(ActionOrderBy);
@@ -70,5 +69,5 @@ public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOpt
// see https://github.com/domaindrivendev/Swashbuckle.AspNetCore#change-operation-sort-order-eg-for-ui-sorting
private static string ActionOrderBy(ApiDescription apiDesc)
=> $"{apiDesc.GroupName}_{apiDesc.ActionDescriptor.AttributeRouteInfo?.Template ?? apiDesc.ActionDescriptor.RouteValues["controller"]}_{apiDesc.ActionDescriptor.RouteValues["action"]}_{apiDesc.HttpMethod}";
=> $"{apiDesc.GroupName}_{apiDesc.ActionDescriptor.AttributeRouteInfo?.Template ?? apiDesc.ActionDescriptor.RouteValues["controller"]}_{(apiDesc.ActionDescriptor.RouteValues.TryGetValue("action", out var action) ? action : null)}_{apiDesc.HttpMethod}";
}
@@ -46,7 +46,9 @@ public static class UmbracoBuilderAuthExtensions
Paths.BackOfficeApi.LogoutEndpoint.TrimStart(Constants.CharArrays.ForwardSlash))
.SetRevocationEndpointUris(
Paths.MemberApi.RevokeEndpoint.TrimStart(Constants.CharArrays.ForwardSlash),
Paths.BackOfficeApi.RevokeEndpoint.TrimStart(Constants.CharArrays.ForwardSlash));
Paths.BackOfficeApi.RevokeEndpoint.TrimStart(Constants.CharArrays.ForwardSlash))
.SetUserInfoEndpointUris(
Paths.MemberApi.UserinfoEndpoint.TrimStart(Constants.CharArrays.ForwardSlash));
// Enable authorization code flow with PKCE
options
@@ -62,7 +64,8 @@ public static class UmbracoBuilderAuthExtensions
.UseAspNetCore()
.EnableAuthorizationEndpointPassthrough()
.EnableTokenEndpointPassthrough()
.EnableEndSessionEndpointPassthrough();
.EnableEndSessionEndpointPassthrough()
.EnableUserInfoEndpointPassthrough();
// Enable reference tokens
// - see https://documentation.openiddict.com/configuration/token-storage.html
@@ -31,6 +31,8 @@ public static class Paths
public static readonly string RevokeEndpoint = EndpointPath($"{EndpointTemplate}/revoke");
public static readonly string UserinfoEndpoint = EndpointPath($"{EndpointTemplate}/userinfo");
// NOTE: we're NOT using /api/v1.0/ here because it will clash with the Delivery API docs
private static string EndpointPath(string relativePath) => $"/umbraco/delivery/api/v1/{relativePath}";
}
@@ -3,6 +3,7 @@
<Title>Umbraco CMS - API Common</Title>
<Description>Contains the bits and pieces that are shared between the Umbraco CMS APIs.</Description>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
@@ -13,14 +14,15 @@
<PackageReference Include="Swashbuckle.AspNetCore" />
<PackageReference Include="OpenIddict.Abstractions" />
<PackageReference Include="OpenIddict.AspNetCore" />
</ItemGroup>
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens"/>
<ItemGroup>
<!-- Take top-level depedendency on OpenIddict.AspNetCore depends on a vulnerable version -->
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Core\Umbraco.Core.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
</Project>
@@ -18,7 +18,12 @@ internal sealed class DeliveryApiOutputCachePolicy : IOutputCachePolicy
.RequestServices
.GetRequiredService<IRequestPreviewService>();
context.EnableOutputCaching = requestPreviewService.IsPreview() is false;
IApiAccessService apiAccessService = context
.HttpContext
.RequestServices
.GetRequiredService<IApiAccessService>();
context.EnableOutputCaching = requestPreviewService.IsPreview() is false && apiAccessService.HasPublicAccess();
context.ResponseExpirationTimeSpan = _duration;
return ValueTask.CompletedTask;
@@ -48,7 +48,7 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
Id = AuthSchemeName,
}
},
new string[] { }
[]
}
}
};
@@ -15,6 +15,7 @@ namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiExplorerSettings(GroupName = "Content")]
[LocalizeFromAcceptLanguageHeader]
[ValidateStartItem]
[AddVaryHeader]
[OutputCache(PolicyName = Constants.DeliveryApi.OutputCache.ContentCachePolicy)]
public abstract class ContentApiControllerBase : DeliveryApiControllerBase
{
@@ -0,0 +1,28 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OpenIddict.Server.AspNetCore;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Security;
[ApiVersion("1.0")]
[ApiController]
[VersionedDeliveryApiRoute(Common.Security.Paths.MemberApi.EndpointTemplate)]
[ApiExplorerSettings(IgnoreApi = true)]
[Authorize(AuthenticationSchemes = OpenIddictServerAspNetCoreDefaults.AuthenticationScheme)]
public class CurrentMemberController : DeliveryApiControllerBase
{
private readonly ICurrentMemberClaimsProvider _currentMemberClaimsProvider;
public CurrentMemberController(ICurrentMemberClaimsProvider currentMemberClaimsProvider)
=> _currentMemberClaimsProvider = currentMemberClaimsProvider;
[HttpGet("userinfo")]
public async Task<IActionResult> Userinfo()
{
Dictionary<string, object> claims = await _currentMemberClaimsProvider.GetClaimsAsync();
return Ok(claims);
}
}
@@ -61,6 +61,7 @@ public static class UmbracoBuilderExtensions
builder.Services.AddSingleton<IApiMediaQueryService, ApiMediaQueryService>();
builder.Services.AddTransient<IMemberApplicationManager, MemberApplicationManager>();
builder.Services.AddTransient<IRequestMemberAccessService, RequestMemberAccessService>();
builder.Services.AddTransient<ICurrentMemberClaimsProvider, CurrentMemberClaimsProvider>();
builder.Services.AddScoped<IMemberClientCredentialsManager, MemberClientCredentialsManager>();
builder.Services.ConfigureOptions<ConfigureUmbracoDeliveryApiSwaggerGenOptions>();
@@ -0,0 +1,13 @@
using Microsoft.AspNetCore.Mvc.Filters;
namespace Umbraco.Cms.Api.Delivery.Filters;
public sealed class AddVaryHeaderAttribute : ActionFilterAttribute
{
private const string Vary = "Accept-Language, Preview, Start-Item";
public override void OnResultExecuting(ResultExecutingContext context)
=> context.HttpContext.Response.Headers.Vary = context.HttpContext.Response.Headers.Vary.Count > 0
? $"{context.HttpContext.Response.Headers.Vary}, {Vary}"
: Vary;
}
@@ -1,56 +1,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Infrastructure.Serialization;
namespace Umbraco.Cms.Api.Delivery.Json;
// see https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/polymorphism?pivots=dotnet-7-0
public class DeliveryApiJsonTypeResolver : DefaultJsonTypeInfoResolver
{
public override JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
{
JsonTypeInfo jsonTypeInfo = base.GetTypeInfo(type, options);
Type[] derivedTypes = GetDerivedTypes(jsonTypeInfo);
if (derivedTypes.Length > 0)
{
ConfigureJsonPolymorphismOptions(jsonTypeInfo, derivedTypes);
}
return jsonTypeInfo;
}
protected virtual Type[] GetDerivedTypes(JsonTypeInfo jsonTypeInfo)
{
if (jsonTypeInfo.Type == typeof(IApiContent))
{
return new[] { typeof(ApiContent) };
}
if (jsonTypeInfo.Type == typeof(IApiContentResponse))
{
return new[] { typeof(ApiContentResponse) };
}
if (jsonTypeInfo.Type == typeof(IRichTextElement))
{
return new[] { typeof(RichTextRootElement), typeof(RichTextGenericElement), typeof(RichTextTextElement) };
}
return Array.Empty<Type>();
}
protected void ConfigureJsonPolymorphismOptions(JsonTypeInfo jsonTypeInfo, params Type[] derivedTypes)
{
jsonTypeInfo.PolymorphismOptions = new JsonPolymorphismOptions
{
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FailSerialization,
};
foreach (Type derivedType in derivedTypes)
{
jsonTypeInfo.PolymorphismOptions.DerivedTypes.Add(new JsonDerivedType(derivedType));
}
}
}
public class DeliveryApiJsonTypeResolver : ContentJsonTypeResolverBase
{ }
@@ -0,0 +1,88 @@
using System.Reflection;
using System.Text.Json;
using System.Text.Json.Serialization;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Json;
public abstract class DeliveryApiVersionAwareJsonConverterBase<T> : JsonConverter<T>
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly JsonConverter<T> _defaultConverter = (JsonConverter<T>)JsonSerializerOptions.Default.GetConverter(typeof(T));
public DeliveryApiVersionAwareJsonConverterBase(IHttpContextAccessor httpContextAccessor)
=> _httpContextAccessor = httpContextAccessor;
/// <inheritdoc />
public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
=> _defaultConverter.Read(ref reader, typeToConvert, options);
/// <inheritdoc />
public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{
Type type = typeof(T);
var apiVersion = GetApiVersion();
// Get the properties in the specified order
PropertyInfo[] properties = type.GetProperties().OrderBy(GetPropertyOrder).ToArray();
writer.WriteStartObject();
foreach (PropertyInfo property in properties)
{
// Filter out properties based on the API version
var include = apiVersion is null || ShouldIncludeProperty(property, apiVersion.Value);
if (include is false)
{
continue;
}
var propertyName = property.Name;
writer.WritePropertyName(options.PropertyNamingPolicy?.ConvertName(propertyName) ?? propertyName);
JsonSerializer.Serialize(writer, property.GetValue(value), options);
}
writer.WriteEndObject();
}
private int? GetApiVersion()
{
HttpContext? httpContext = _httpContextAccessor.HttpContext;
ApiVersion? apiVersion = httpContext?.GetRequestedApiVersion();
return apiVersion?.MajorVersion;
}
private int GetPropertyOrder(PropertyInfo prop)
{
var attribute = prop.GetCustomAttribute<JsonPropertyOrderAttribute>();
return attribute?.Order ?? 0;
}
/// <summary>
/// Determines whether a property should be included based on version bounds.
/// </summary>
/// <param name="propertyInfo">The property info.</param>
/// <param name="version">An integer representing an API version.</param>
/// <returns><c>true</c> if the property should be included; otherwise, <c>false</c>.</returns>
private bool ShouldIncludeProperty(PropertyInfo propertyInfo, int version)
{
var attribute = propertyInfo
.GetCustomAttributes(typeof(IncludeInApiVersionAttribute), false)
.FirstOrDefault();
if (attribute is not IncludeInApiVersionAttribute apiVersionAttribute)
{
return true; // No attribute means include the property
}
// Check if the version is within the specified bounds
var isWithinMinVersion = apiVersionAttribute.MinVersion.HasValue is false || version >= apiVersionAttribute.MinVersion.Value;
var isWithinMaxVersion = apiVersionAttribute.MaxVersion.HasValue is false || version <= apiVersionAttribute.MaxVersion.Value;
return isWithinMinVersion && isWithinMaxVersion;
}
}
@@ -37,12 +37,12 @@ public abstract class ContainsFilterBase : IFilterHandler
{
GroupCollection groups = QueryParserRegex.Match(filter).Groups;
if (groups.Count != 3 || groups.ContainsKey("operator") is false || groups.ContainsKey("value") is false)
if (groups.Count != 3 || groups.TryGetValue("operator", out Group? operatorGroup) is false || groups.TryGetValue("value", out Group? valueGroup) is false)
{
return DefaultFilterOption();
}
FilterOperation? filterOperation = ParseFilterOperation(groups["operator"].Value);
FilterOperation? filterOperation = ParseFilterOperation(operatorGroup.Value);
if (filterOperation.HasValue is false)
{
return DefaultFilterOption();
@@ -51,7 +51,7 @@ public abstract class ContainsFilterBase : IFilterHandler
return new FilterOption
{
FieldName = FieldName,
Values = new[] { groups["value"].Value },
Values = [valueGroup.Value],
Operator = filterOperation.Value
};
@@ -1,6 +1,5 @@
using Umbraco.Cms.Api.Delivery.Indexing.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying.Filters;
@@ -15,15 +14,15 @@ public sealed class ContentTypeFilter : IFilterHandler
/// <inheritdoc/>
public FilterOption BuildFilterOption(string filter)
{
var alias = filter.Substring(ContentTypeSpecifier.Length);
var filterValue = filter.Substring(ContentTypeSpecifier.Length);
var negate = filterValue.StartsWith('!');
var aliases = filterValue.TrimStart('!').Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
return new FilterOption
{
FieldName = ContentTypeFilterIndexer.FieldName,
Values = alias.IsNullOrWhiteSpace() == false
? new[] { alias.TrimStart('!') }
: Array.Empty<string>(),
Operator = alias.StartsWith('!')
Values = aliases,
Operator = negate
? FilterOperation.IsNot
: FilterOperation.Is
};
@@ -1,4 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
@@ -7,16 +9,45 @@ namespace Umbraco.Cms.Api.Delivery.Querying;
public abstract class QueryOptionBase
{
private readonly IPublishedContentCache _publishedContentCache;
private readonly IRequestRoutingService _requestRoutingService;
private readonly IRequestPreviewService _requestPreviewService;
private readonly IApiDocumentUrlService _apiDocumentUrlService;
private readonly IVariationContextAccessor _variationContextAccessor;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public QueryOptionBase(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>())
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public QueryOptionBase(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IRequestCultureService requestCultureService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
: this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
{
}
public QueryOptionBase(
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
{
_publishedContentCache = publishedContentCache;
_requestRoutingService = requestRoutingService;
_requestPreviewService = requestPreviewService;
_apiDocumentUrlService = apiDocumentUrlService;
_variationContextAccessor = variationContextAccessor;
}
protected Guid? GetGuidFromQuery(string queryStringValue)
@@ -33,8 +64,9 @@ public abstract class QueryOptionBase
// Check if the passed value is a path of a content item
var contentRoute = _requestRoutingService.GetContentRoute(queryStringValue);
IPublishedContent? contentItem = _publishedContentCache.GetByRoute(contentRoute);
return contentItem?.Key;
return _apiDocumentUrlService.GetDocumentKeyByRoute(
contentRoute,
_variationContextAccessor.VariationContext?.Culture,
_requestPreviewService.IsPreview());
}
}
@@ -5,29 +5,72 @@ using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Services.Navigation;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Querying.Selectors;
public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
{
private readonly IPublishedContentCache _publishedContentCache;
private readonly IDocumentNavigationQueryService _navigationQueryService;
private const string AncestorsSpecifier = "ancestors:";
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public AncestorsSelector(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IDocumentNavigationQueryService navigationQueryService,
IRequestPreviewService requestPreviewService)
: this(
requestRoutingService,
requestPreviewService,
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>(),
navigationQueryService)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public AncestorsSelector(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IDocumentNavigationQueryService navigationQueryService)
: base(publishedContentCache, requestRoutingService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>(),
navigationQueryService)
{
_publishedContentCache = publishedContentCache;
_navigationQueryService = navigationQueryService;
}
[Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")]
public AncestorsSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService)
: this(publishedContentCache, requestRoutingService, StaticServiceProvider.Instance.GetRequiredService<IDocumentNavigationQueryService>())
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>(),
StaticServiceProvider.Instance.GetRequiredService<IDocumentNavigationQueryService>())
{
}
public AncestorsSelector(
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor,
IDocumentNavigationQueryService navigationQueryService)
: base(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
=> _navigationQueryService = navigationQueryService;
[Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")]
public AncestorsSelector(
IRequestRoutingService requestRoutingService,
IPublishedContentCache publishedContentCache,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor,
IDocumentNavigationQueryService navigationQueryService)
: this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor, navigationQueryService)
{
}
@@ -41,7 +84,7 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
var fieldValue = selector[AncestorsSpecifier.Length..];
Guid? id = GetGuidFromQuery(fieldValue);
if (id is null)
if (id is null || _navigationQueryService.TryGetAncestorsKeys(id.Value, out IEnumerable<Guid> ancestorKeys) is false)
{
// Setting the Value to "" since that would yield no results.
// It won't be appropriate to return null here since if we reached this,
@@ -53,15 +96,10 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
};
}
IPublishedContent contentItem = _publishedContentCache.GetById((Guid)id)
?? throw new InvalidOperationException("Could not obtain the content cache");
var ancestorKeys = contentItem.Ancestors(_publishedContentCache, _navigationQueryService).Select(a => a.Key.ToString("D")).ToArray();
return new SelectorOption
{
FieldName = AncestorsSelectorIndexer.FieldName,
Values = ancestorKeys
Values = ancestorKeys.Select(key => key.ToString("D")).ToArray()
};
}
}
@@ -1,5 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
@@ -9,8 +12,33 @@ public sealed class ChildrenSelector : QueryOptionBase, ISelectorHandler
{
private const string ChildrenSpecifier = "children:";
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public ChildrenSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService)
: base(publishedContentCache, requestRoutingService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>())
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public ChildrenSelector(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
: this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
{
}
public ChildrenSelector(
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
: base(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
{
}
@@ -1,5 +1,8 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Delivery.Indexing.Selectors;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Extensions;
@@ -9,8 +12,33 @@ public sealed class DescendantsSelector : QueryOptionBase, ISelectorHandler
{
private const string DescendantsSpecifier = "descendants:";
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public DescendantsSelector(IPublishedContentCache publishedContentCache, IRequestRoutingService requestRoutingService)
: base(publishedContentCache, requestRoutingService)
: this(
requestRoutingService,
StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>(),
StaticServiceProvider.Instance.GetRequiredService<IApiDocumentUrlService>(),
StaticServiceProvider.Instance.GetRequiredService<IVariationContextAccessor>())
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V17.")]
public DescendantsSelector(
IPublishedContentCache publishedContentCache,
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
: this(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
{
}
public DescendantsSelector(
IRequestRoutingService requestRoutingService,
IRequestPreviewService requestPreviewService,
IApiDocumentUrlService apiDocumentUrlService,
IVariationContextAccessor variationContextAccessor)
: base(requestRoutingService, requestPreviewService, apiDocumentUrlService, variationContextAccessor)
{
}
@@ -79,10 +79,14 @@ internal sealed class ApiContentQueryProvider : IApiContentQueryProvider
return new PagedModel<Guid>();
}
Guid[] items = results
.Where(r => r.Values.ContainsKey(ItemIdFieldName))
.Select(r => Guid.Parse(r.Values[ItemIdFieldName]))
.ToArray();
List<Guid> items = [];
foreach (ISearchResult result in results)
{
if (result.Values.TryGetValue(ItemIdFieldName, out string? value))
{
items.Add(Guid.Parse(value));
}
}
return new PagedModel<Guid>(results.TotalItemCount, items);
}
@@ -16,12 +16,18 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
private readonly IPublishedMediaCache _publishedMediaCache;
private readonly ILogger<ApiMediaQueryService> _logger;
private readonly IMediaNavigationQueryService _mediaNavigationQueryService;
private readonly IPublishedMediaStatusFilteringService _publishedMediaStatusFilteringService;
public ApiMediaQueryService(IPublishedMediaCache publishedMediaCache, ILogger<ApiMediaQueryService> logger, IMediaNavigationQueryService mediaNavigationQueryService)
public ApiMediaQueryService(
IPublishedMediaCache publishedMediaCache,
ILogger<ApiMediaQueryService> logger,
IMediaNavigationQueryService mediaNavigationQueryService,
IPublishedMediaStatusFilteringService publishedMediaStatusFilteringService)
{
_publishedMediaCache = publishedMediaCache;
_logger = logger;
_mediaNavigationQueryService = mediaNavigationQueryService;
_publishedMediaStatusFilteringService = publishedMediaStatusFilteringService;
}
/// <inheritdoc/>
@@ -71,7 +77,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
break;
}
currentChildren = resolvedMedia.Children(null, _publishedMediaCache, _mediaNavigationQueryService);
currentChildren = resolvedMedia.Children(_mediaNavigationQueryService, _publishedMediaStatusFilteringService);
}
return resolvedMedia;
@@ -104,7 +110,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
? mediaCache.GetById(parentKey)
: TryGetByPath(childrenOf, mediaCache);
return parent?.Children(null, _publishedMediaCache, _mediaNavigationQueryService) ?? Array.Empty<IPublishedContent>();
return parent?.Children(_mediaNavigationQueryService, _publishedMediaStatusFilteringService) ?? Array.Empty<IPublishedContent>();
}
private IEnumerable<IPublishedContent>? ApplyFilters(IEnumerable<IPublishedContent> source, IEnumerable<string> filters)
@@ -179,7 +185,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
}
private Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> PagedResult(IEnumerable<IPublishedContent> children, int skip, int take)
private static Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> PagedResult(IEnumerable<IPublishedContent> children, int skip, int take)
{
IPublishedContent[] childrenAsArray = children as IPublishedContent[] ?? children.ToArray();
var result = new PagedModel<Guid>
@@ -0,0 +1,44 @@
using OpenIddict.Abstractions;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Security;
namespace Umbraco.Cms.Api.Delivery.Services;
// NOTE: this is public and unsealed to allow overriding the default claims with minimal effort.
public class CurrentMemberClaimsProvider : ICurrentMemberClaimsProvider
{
private readonly IMemberManager _memberManager;
public CurrentMemberClaimsProvider(IMemberManager memberManager)
=> _memberManager = memberManager;
public virtual async Task<Dictionary<string, object>> GetClaimsAsync()
{
MemberIdentityUser? memberIdentityUser = await _memberManager.GetCurrentMemberAsync();
return memberIdentityUser is not null
? await GetClaimsForMemberIdentityAsync(memberIdentityUser)
: throw new InvalidOperationException("Could not retrieve the current member. This method should only ever be invoked when a member has been authorized.");
}
protected virtual async Task<Dictionary<string, object>> GetClaimsForMemberIdentityAsync(MemberIdentityUser memberIdentityUser)
{
var claims = new Dictionary<string, object>
{
[OpenIddictConstants.Claims.Subject] = memberIdentityUser.Key
};
if (memberIdentityUser.Name is not null)
{
claims[OpenIddictConstants.Claims.Name] = memberIdentityUser.Name;
}
if (memberIdentityUser.Email is not null)
{
claims[OpenIddictConstants.Claims.Email] = memberIdentityUser.Email;
}
claims[OpenIddictConstants.Claims.Role] = await _memberManager.GetRolesAsync(memberIdentityUser);
return claims;
}
}
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Services;
@@ -11,5 +11,5 @@ internal sealed class RequestPreviewService : RequestHeaderHandler, IRequestPrev
}
/// <inheritdoc />
public bool IsPreview() => GetHeaderValue("Preview") == "true";
public bool IsPreview() => string.Equals(GetHeaderValue("Preview"), "true", StringComparison.OrdinalIgnoreCase);
}
@@ -42,31 +42,42 @@ internal sealed class RequestRedirectService : RoutingServiceBase, IRequestRedir
{
requestedPath = requestedPath.EnsureStartsWith("/");
IPublishedContent? startItem = GetStartItem();
// must append the root content url segment if it is not hidden by config, because
// the URL tracking is based on the actual URL, including the root content url segment
if (_globalSettings.HideTopLevelNodeFromPath == false)
if (_globalSettings.HideTopLevelNodeFromPath == false && startItem?.UrlSegment != null)
{
IPublishedContent? startItem = GetStartItem();
if (startItem?.UrlSegment != null)
{
requestedPath = $"{startItem.UrlSegment.EnsureStartsWith("/")}{requestedPath}";
}
requestedPath = $"{startItem.UrlSegment.EnsureStartsWith("/")}{requestedPath}";
}
var culture = _requestCultureService.GetRequestedCulture();
// append the configured domain content ID to the path if we have a domain bound request,
// because URL tracking registers the tracked url like "{domain content ID}/{content path}"
Uri contentRoute = GetDefaultRequestUri(requestedPath);
DomainAndUri? domainAndUri = GetDomainAndUriForRoute(contentRoute);
if (domainAndUri != null)
// important: redirect URLs are always tracked without trailing slashes
requestedPath = requestedPath.TrimEnd("/");
IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath, culture);
// if a redirect URL was not found, try by appending the start item ID because URL tracking might have tracked
// a redirect with "{root content ID}/{content path}"
if (redirectUrl is null && startItem is not null)
{
requestedPath = GetContentRoute(domainAndUri, contentRoute);
culture ??= domainAndUri.Culture;
redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl($"{startItem.Id}{requestedPath}", culture);
}
// still no redirect URL found - try looking for a configured domain if we have a domain bound request,
// because URL tracking might have tracked a redirect with "{domain content ID}/{content path}"
if (redirectUrl is null)
{
Uri contentRoute = GetDefaultRequestUri(requestedPath);
DomainAndUri? domainAndUri = GetDomainAndUriForRoute(contentRoute);
if (domainAndUri is not null)
{
requestedPath = GetContentRoute(domainAndUri, contentRoute);
culture ??= domainAndUri.Culture;
redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath, culture);
}
}
// important: redirect URLs are always tracked without trailing slashes
IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath.TrimEnd("/"), culture);
IPublishedContent? content = redirectUrl != null
? _apiPublishedContentCache.GetById(redirectUrl.ContentKey)
: null;
@@ -49,9 +49,8 @@ internal sealed class RequestStartItemProvider : RequestHeaderHandler, IRequestS
_documentNavigationQueryService.TryGetRootKeys(out IEnumerable<Guid> rootKeys);
IEnumerable<IPublishedContent> rootContent = rootKeys
.Select(_publishedContentCache.GetById)
.WhereNotNull()
.Where(x => x.IsPublished() != _requestPreviewService.IsPreview());
.Select(rootKey => _publishedContentCache.GetById(_requestPreviewService.IsPreview(), rootKey))
.WhereNotNull();
_requestedStartContent = Guid.TryParse(headerValue, out Guid key)
? rootContent.FirstOrDefault(c => c.Key == key)
@@ -3,19 +3,21 @@
<Title>Umbraco CMS - Delivery API</Title>
<Description>Contains the presentation layer for the Umbraco CMS Delivery API.</Description>
</PropertyGroup>
<PropertyGroup>
<!-- TODO: [ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers and remove this override -->
<WarningsNotAsErrors>ASP0019</WarningsNotAsErrors>
<!--
TODO: Fix and remove overrides:
[ASP0019] use IHeaderDictionary.Append or the indexer to append or set headers
[CS0618/CS0612] update obsolete references
-->
<WarningsNotAsErrors>$(WarningsNotAsErrors),ASP0019,CS0618,CS0612</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.Api.Common\Umbraco.Cms.Api.Common.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<PropertyGroup>
<!-- TODO: Fix all warnings and remove this override -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
@@ -21,6 +21,7 @@ public abstract class ContentCollectionControllerBase<TContent, TCollectionRespo
protected ContentCollectionControllerBase(IUmbracoMapper mapper) => _mapper = mapper;
[Obsolete("This method is no longer used and will be removed in Umbraco 17.")]
protected IActionResult CollectionResult(ListViewPagedModel<TContent> result)
{
PagedModel<TContent> collectionItemsResult = result.Items;
@@ -47,6 +48,17 @@ public abstract class ContentCollectionControllerBase<TContent, TCollectionRespo
return Ok(pageViewModel);
}
protected IActionResult CollectionResult(List<TCollectionResponseModel> collectionResponseModels, long totalNumberOfItems)
{
var pageViewModel = new PagedViewModel<TCollectionResponseModel>
{
Items = collectionResponseModels,
Total = totalNumberOfItems,
};
return Ok(pageViewModel);
}
protected IActionResult ContentCollectionOperationStatusResult(ContentCollectionOperationStatus status, string type) =>
OperationStatusResult(status, problemDetailsBuilder => status switch
{
@@ -76,6 +76,14 @@ public abstract class ContentControllerBase : ManagementApiControllerBase
.WithTitle("Duplicate name")
.WithDetail("The supplied name is already in use for the same content type.")
.Build()),
ContentEditingOperationStatus.CannotDeleteWhenReferenced => BadRequest(problemDetailsBuilder
.WithTitle("Cannot delete a referenced content item")
.WithDetail("Cannot delete a referenced document, while the setting ContentSettings.DisableDeleteWhenReferenced is enabled.")
.Build()),
ContentEditingOperationStatus.CannotMoveToRecycleBinWhenReferenced => BadRequest(problemDetailsBuilder
.WithTitle("Cannot move a referenced document to the recycle bin")
.WithDetail("Cannot move a referenced document to the recycle bin, while the setting ContentSettings.DisableUnpublishWhenReferenced is enabled.")
.Build()),
ContentEditingOperationStatus.Unknown => StatusCode(
StatusCodes.Status500InternalServerError,
problemDetailsBuilder
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DataType;
@@ -7,10 +8,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class CopyDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -8,10 +9,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class CreateDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[VersionedApiBackOfficeRoute(Constants.UdiEntityType.DataType)]
[ApiExplorerSettings(GroupName = "Data Type")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentOrMediaOrContentTypes)]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentsOrMediaOrMembersOrContentTypes)]
public abstract class DataTypeControllerBase : ManagementApiControllerBase
{
protected IActionResult DataTypeOperationStatusResult(DataTypeOperationStatus status) =>
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
@@ -6,10 +7,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class DeleteDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DataType;
@@ -7,10 +8,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class MoveDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -0,0 +1,46 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.DataType.References;
[ApiVersion("1.0")]
public class ReferencedByDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
private readonly IRelationTypePresentationFactory _relationTypePresentationFactory;
public ReferencedByDataTypeController(IDataTypeService dataTypeService, IRelationTypePresentationFactory relationTypePresentationFactory)
{
_dataTypeService = dataTypeService;
_relationTypePresentationFactory = relationTypePresentationFactory;
}
/// <summary>
/// Gets a paged list of references for the current data type, so you can see where it is being used.
/// </summary>
[HttpGet("{id:guid}/referenced-by")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IReferenceResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<IReferenceResponseModel>>> ReferencedBy(
CancellationToken cancellationToken,
Guid id,
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _dataTypeService.GetPagedRelationsAsync(id, skip, take);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
Total = relationItems.Total,
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -10,6 +10,7 @@ using Umbraco.Cms.Core.Services.OperationStatus;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Obsolete("Please use ReferencedByDataTypeController and the referenced-by endpoint. Scheduled for removal in Umbraco 17.")]
public class ReferencesDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -8,10 +9,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class UpdateDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,14 +1,15 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.Security.Authorization.Content;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.Querying;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Extensions;
@@ -18,17 +19,42 @@ namespace Umbraco.Cms.Api.Management.Controllers.Document;
public class ByKeyDocumentController : DocumentControllerBase
{
private readonly IAuthorizationService _authorizationService;
private readonly IContentEditingService _contentEditingService;
private readonly IDocumentPresentationFactory _documentPresentationFactory;
private readonly IContentQueryService _contentQueryService;
[Obsolete("Scheduled for removal in v17")]
public ByKeyDocumentController(
IAuthorizationService authorizationService,
IContentEditingService contentEditingService,
IDocumentPresentationFactory documentPresentationFactory)
{
_authorizationService = authorizationService;
_contentEditingService = contentEditingService;
_documentPresentationFactory = documentPresentationFactory;
_contentQueryService = StaticServiceProvider.Instance.GetRequiredService<IContentQueryService>();
}
// needed for greedy selection until other constructor remains in v17
[Obsolete("Scheduled for removal in v17")]
public ByKeyDocumentController(
IAuthorizationService authorizationService,
IContentEditingService contentEditingService,
IDocumentPresentationFactory documentPresentationFactory,
IContentQueryService contentQueryService)
{
_authorizationService = authorizationService;
_documentPresentationFactory = documentPresentationFactory;
_contentQueryService = contentQueryService;
}
[ActivatorUtilitiesConstructor]
public ByKeyDocumentController(
IAuthorizationService authorizationService,
IDocumentPresentationFactory documentPresentationFactory,
IContentQueryService contentQueryService)
{
_authorizationService = authorizationService;
_documentPresentationFactory = documentPresentationFactory;
_contentQueryService = contentQueryService;
}
[HttpGet("{id:guid}")]
@@ -47,13 +73,16 @@ public class ByKeyDocumentController : DocumentControllerBase
return Forbidden();
}
IContent? content = await _contentEditingService.GetAsync(id);
if (content == null)
var contentWithScheduleAttempt = await _contentQueryService.GetWithSchedulesAsync(id);
if (contentWithScheduleAttempt.Success == false)
{
return DocumentNotFound();
return ContentQueryOperationStatusResult(contentWithScheduleAttempt.Status);
}
DocumentResponseModel model = await _documentPresentationFactory.CreateResponseModelAsync(content);
DocumentResponseModel model = await _documentPresentationFactory.CreateResponseModelAsync(
contentWithScheduleAttempt.Result!.Content,
contentWithScheduleAttempt.Result.Schedules);
return Ok(model);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -53,6 +53,7 @@ public class ByKeyPublishedDocumentController : DocumentControllerBase
}
PublishedDocumentResponseModel model = await _documentPresentationFactory.CreatePublishedResponseModelAsync(content);
return Ok(model);
}
}
@@ -1,9 +1,12 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Document.Collection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
@@ -17,15 +20,32 @@ public class ByKeyDocumentCollectionController : DocumentCollectionControllerBas
{
private readonly IContentListViewService _contentListViewService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IDocumentCollectionPresentationFactory _documentCollectionPresentationFactory;
[Obsolete("Please use the constructor taking all parameters.")]
public ByKeyDocumentCollectionController(
IContentListViewService contentListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper)
: this(
contentListViewService,
backOfficeSecurityAccessor,
mapper,
StaticServiceProvider.Instance.GetRequiredService<IDocumentCollectionPresentationFactory>())
{
}
[ActivatorUtilitiesConstructor]
public ByKeyDocumentCollectionController(
IContentListViewService contentListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper,
IDocumentCollectionPresentationFactory documentCollectionPresentationFactory)
: base(mapper)
{
_contentListViewService = contentListViewService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_documentCollectionPresentationFactory = documentCollectionPresentationFactory;
}
[HttpGet("{id:guid}")]
@@ -55,8 +75,12 @@ public class ByKeyDocumentCollectionController : DocumentCollectionControllerBas
skip,
take);
return collectionAttempt.Success
? CollectionResult(collectionAttempt.Result!)
: CollectionOperationStatusResult(collectionAttempt.Status);
if (collectionAttempt.Success is false)
{
return CollectionOperationStatusResult(collectionAttempt.Status);
}
List<DocumentCollectionResponseModel> collectionResponseModels = await _documentCollectionPresentationFactory.CreateCollectionModelAsync(collectionAttempt.Result!);
return CollectionResult(collectionResponseModels, collectionAttempt.Result!.Items.Total);
}
}
@@ -18,21 +18,18 @@ public abstract class CreateDocumentControllerBase : DocumentControllerBase
protected async Task<IActionResult> HandleRequest(CreateDocumentRequestModel requestModel, Func<Task<IActionResult>> authorizedHandler)
{
// TODO This have temporarily been uncommented, to support the client sends values from all cultures, even when the user do not have access to the languages.
// The values are ignored in the ContentEditingService
// We intentionally don't pass in cultures here.
// This is to support the client sending values for all cultures even if the user doesn't have access to the language.
// Values for unauthorized languages are later ignored in the ContentEditingService.
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionNew.ActionLetter, requestModel.Parent?.Id),
AuthorizationPolicies.ContentPermissionByResource);
// IEnumerable<string> cultures = requestModel.Variants
// .Where(v => v.Culture is not null)
// .Select(v => v.Culture!);
// AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
// User,
// ContentPermissionResource.WithKeys(ActionNew.ActionLetter, requestModel.Parent?.Id, cultures),
// AuthorizationPolicies.ContentPermissionByResource);
//
// if (!authorizationResult.Succeeded)
// {
// return Forbidden();
// }
if (authorizationResult.Succeeded is false)
{
return Forbidden();
}
return await authorizedHandler();
}
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Controllers.Content;
@@ -121,6 +121,11 @@ public abstract class DocumentControllerBase : ContentControllerBase
.WithDetail(
"Cannot handle an unpublish time that is not after the current server time.")
.Build()),
ContentPublishingOperationStatus.CannotUnpublishWhenReferenced => BadRequest(problemDetailsBuilder
.WithTitle("Cannot unpublish document when it's referenced somewhere else.")
.WithDetail(
"Cannot unpublish a referenced document, while the setting ContentSettings.DisableUnpublishWhenReferenced is enabled.")
.Build()),
ContentPublishingOperationStatus.FailedBranch => BadRequest(problemDetailsBuilder
.WithTitle("Failed branch operation")
.WithDetail("One or more items in the branch could not complete the operation.")
@@ -135,6 +140,10 @@ public abstract class DocumentControllerBase : ContentControllerBase
.WithDetail(
"An unspecified error occurred while (un)publishing. Please check the logs for additional information.")
.Build()),
ContentPublishingOperationStatus.TaskResultNotFound => NotFound(problemDetailsBuilder
.WithTitle("The result of the submitted task could not be found")
.Build()),
_ => StatusCode(StatusCodes.Status500InternalServerError, "Unknown content operation status."),
});
@@ -170,4 +179,15 @@ public abstract class DocumentControllerBase : ContentControllerBase
.WithTitle("Unknown content operation status.")
.Build()),
});
protected IActionResult ContentQueryOperationStatusResult(ContentQueryOperationStatus status)
=> OperationStatusResult(status, problemDetailsBuilder => status switch
{
ContentQueryOperationStatus.ContentNotFound => NotFound(problemDetailsBuilder
.WithTitle("The document could not be found")
.Build()),
_ => StatusCode(StatusCodes.Status500InternalServerError, problemDetailsBuilder
.WithTitle("Unknown content query status.")
.Build()),
});
}
@@ -49,7 +49,7 @@ public class GetPublicAccessDocumentController : DocumentControllerBase
}
Attempt<PublicAccessEntry?, PublicAccessOperationStatus> accessAttempt =
await _publicAccessService.GetEntryByContentKeyAsync(id);
await _publicAccessService.GetEntryByContentKeyWithoutAncestorsAsync(id);
if (accessAttempt.Success is false || accessAttempt.Result is null)
{
@@ -1,4 +1,5 @@
using Asp.Versioning;
using System.Text.Json.Serialization;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -26,12 +27,36 @@ public class SearchDocumentItemController : DocumentItemControllerBase
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
=> await SearchFromParent(cancellationToken, query, skip, take);
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
public async Task<IActionResult> SearchFromParent(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null)
=> await SearchWithTrashed(cancellationToken, query, null, skip, take, parentId);
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
[ProducesResponseType(typeof(PagedModel<DocumentItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> SearchFromParentWithAllowedTypes(
CancellationToken cancellationToken,
string query,
int skip = 0,
int take = 100,
Guid? parentId = null,
[FromQuery] IEnumerable<Guid>? allowedDocumentTypes = null) =>
await SearchWithTrashed(cancellationToken, query, null, skip, take, parentId, allowedDocumentTypes);
[HttpGet("search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedModel<DocumentItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> SearchFromParent(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null)
public async Task<IActionResult> SearchWithTrashed(
CancellationToken cancellationToken,
string query,
bool? trashed = null,
int skip = 0,
int take = 100,
Guid? parentId = null,
[FromQuery] IEnumerable<Guid>? allowedDocumentTypes = null)
{
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Document, query, parentId, skip, take);
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Document, query, parentId, allowedDocumentTypes, trashed, skip, take);
var result = new PagedModel<DocumentItemResponseModel>
{
Items = searchResult.Items.OfType<IDocumentEntitySlim>().Select(_documentPresentationFactory.CreateItemResponseModel),
@@ -46,7 +46,7 @@ public class PublishDocumentController : DocumentControllerBase
{
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionPublish.ActionLetter, id, requestModel.PublishSchedules.Where(x=>x.Culture is not null).Select(x=>x.Culture!)),
ContentPermissionResource.WithKeys(ActionPublish.ActionLetter, id, requestModel.PublishSchedules.Where(x => x.Culture is not null).Select(x=>x.Culture!)),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
@@ -54,7 +54,7 @@ public class PublishDocumentController : DocumentControllerBase
return Forbidden();
}
Attempt<CultureAndScheduleModel, ContentPublishingOperationStatus> modelResult = _documentPresentationFactory.CreateCultureAndScheduleModel(requestModel);
Attempt<List<CulturePublishScheduleModel>, ContentPublishingOperationStatus> modelResult = _documentPresentationFactory.CreateCulturePublishScheduleModels(requestModel);
if (modelResult.Success is false)
{
@@ -1,11 +1,11 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Security.Authorization.Content;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.ContentPublishing;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Security.Authorization;
@@ -35,7 +35,7 @@ public class PublishDocumentWithDescendantsController : DocumentControllerBase
[HttpPut("{id:guid}/publish-with-descendants")]
[MapToApiVersion("1.0")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(typeof(PublishWithDescendantsResultModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<IActionResult> PublishWithDescendants(CancellationToken cancellationToken, Guid id, PublishDocumentWithDescendantsRequestModel requestModel)
@@ -53,11 +53,27 @@ public class PublishDocumentWithDescendantsController : DocumentControllerBase
Attempt<ContentPublishingBranchResult, ContentPublishingOperationStatus> attempt = await _contentPublishingService.PublishBranchAsync(
id,
requestModel.Cultures,
requestModel.IncludeUnpublishedDescendants,
CurrentUserKey(_backOfficeSecurityAccessor));
BuildPublishBranchFilter(requestModel),
CurrentUserKey(_backOfficeSecurityAccessor),
true);
return attempt.Success
? Ok()
return attempt.Success && attempt.Result.AcceptedTaskId.HasValue
? Ok(new PublishWithDescendantsResultModel
{
TaskId = attempt.Result.AcceptedTaskId.Value,
IsComplete = false
})
: DocumentPublishingOperationStatusResult(attempt.Status, failedBranchItems: attempt.Result.FailedItems);
}
private static PublishBranchFilter BuildPublishBranchFilter(PublishDocumentWithDescendantsRequestModel requestModel)
{
PublishBranchFilter publishBranchFilter = PublishBranchFilter.Default;
if (requestModel.IncludeUnpublishedDescendants)
{
publishBranchFilter |= PublishBranchFilter.IncludeUnpublished;
}
return publishBranchFilter;
}
}
@@ -0,0 +1,69 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.Models.ContentPublishing;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Management.Controllers.Document;
[ApiVersion("1.0")]
public class PublishDocumentWithDescendantsResultController : DocumentControllerBase
{
private readonly IAuthorizationService _authorizationService;
private readonly IContentPublishingService _contentPublishingService;
public PublishDocumentWithDescendantsResultController(
IAuthorizationService authorizationService,
IContentPublishingService contentPublishingService)
{
_authorizationService = authorizationService;
_contentPublishingService = contentPublishingService;
}
[HttpGet("{id:guid}/publish-with-descendants/result/{taskId:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PublishWithDescendantsResultModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<IActionResult> PublishWithDescendantsResult(CancellationToken cancellationToken, Guid id, Guid taskId)
{
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.Branch(ActionPublish.ActionLetter, id),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
{
return Forbidden();
}
// Check if the publishing task has completed, if not, return the status.
var isPublishing = await _contentPublishingService.IsPublishingBranchAsync(taskId);
if (isPublishing)
{
return Ok(new PublishWithDescendantsResultModel
{
TaskId = taskId,
IsComplete = false
});
};
// If completed, get the result and return the status.
Attempt<ContentPublishingBranchResult, ContentPublishingOperationStatus> attempt = await _contentPublishingService.GetPublishBranchResultAsync(taskId);
return attempt.Success
? Ok(new PublishWithDescendantsResultModel
{
TaskId = taskId,
IsComplete = true
})
: DocumentPublishingOperationStatusResult(attempt.Status, failedBranchItems: attempt.Result.FailedItems);
}
}
@@ -0,0 +1,50 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.Document.RecycleBin;
[ApiVersion("1.0")]
public class ReferencedByDocumentRecycleBinController : DocumentRecycleBinControllerBase
{
private readonly ITrackedReferencesService _trackedReferencesService;
private readonly IRelationTypePresentationFactory _relationTypePresentationFactory;
public ReferencedByDocumentRecycleBinController(
IEntityService entityService,
IDocumentPresentationFactory documentPresentationFactory,
ITrackedReferencesService trackedReferencesService,
IRelationTypePresentationFactory relationTypePresentationFactory)
: base(entityService, documentPresentationFactory)
{
_trackedReferencesService = trackedReferencesService;
_relationTypePresentationFactory = relationTypePresentationFactory;
}
/// <summary>
/// Gets a paged list of tracked references for all items in the document recycle bin, so you can see where an item is being used.
/// </summary>
[HttpGet("referenced-by")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IReferenceResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<IReferenceResponseModel>>> ReferencedBy(
CancellationToken cancellationToken,
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForRecycleBinAsync(UmbracoObjectTypes.Document, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
Total = relationItems.Total,
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return pagedViewModel;
}
}
@@ -1,8 +1,9 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.ViewModels;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
@@ -22,7 +23,7 @@ public class AreReferencedDocumentController : DocumentControllerBase
}
/// <summary>
/// Gets a page list of the items used in any kind of relation from selected keys.
/// Gets a paged list of the items used in any kind of relation from selected keys.
/// </summary>
/// <remarks>
/// Used when bulk deleting content/media and bulk unpublishing content (delete and unpublish on List view).
@@ -37,13 +38,13 @@ public class AreReferencedDocumentController : DocumentControllerBase
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> distinctByKeyItemsWithReferencedRelations = await _trackedReferencesSkipTakeService.GetPagedItemsWithRelationsAsync(ids, skip, take, true);
PagedModel<Guid> distinctByKeyItemsWithReferencedRelations = await _trackedReferencesSkipTakeService.GetPagedKeysWithDependentReferencesAsync(ids, Constants.ObjectTypes.Document, skip, take);
var pagedViewModel = new PagedViewModel<ReferenceByIdModel>
{
Total = distinctByKeyItemsWithReferencedRelations.Total,
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(distinctByKeyItemsWithReferencedRelations.Items),
Items = _umbracoMapper.MapEnumerable<Guid, ReferenceByIdModel>(distinctByKeyItemsWithReferencedRelations.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -22,7 +22,7 @@ public class ReferencedByDocumentController : DocumentControllerBase
}
/// <summary>
/// Gets a page list of tracked references for the current item, so you can see where an item is being used.
/// Gets a paged list of tracked references for the current item, so you can see where an item is being used.
/// </summary>
/// <remarks>
/// Used by info tabs on content, media etc. and for the delete and unpublish of single items.
@@ -37,7 +37,7 @@ public class ReferencedByDocumentController : DocumentControllerBase
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, false);
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
@@ -45,6 +45,6 @@ public class ReferencedByDocumentController : DocumentControllerBase
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -22,7 +22,7 @@ public class ReferencedDescendantsDocumentController : DocumentControllerBase
}
/// <summary>
/// Gets a page list of the child nodes of the current item used in any kind of relation.
/// Gets a paged list of the descendant nodes of the current item used in any kind of relation.
/// </summary>
/// <remarks>
/// Used when deleting and unpublishing a single item to check if this item has any descending items that are in any
@@ -45,6 +45,6 @@ public class ReferencedDescendantsDocumentController : DocumentControllerBase
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,9 +1,10 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Controllers.Tree;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.Routing;
using Umbraco.Cms.Api.Management.Services.Entities;
using Umbraco.Cms.Api.Management.ViewModels;
using Umbraco.Cms.Api.Management.ViewModels.Tree;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
@@ -33,7 +34,7 @@ public abstract class DocumentTreeControllerBase : UserStartNodeTreeControllerBa
AppCaches appCaches,
IBackOfficeSecurityAccessor backofficeSecurityAccessor,
IDocumentPresentationFactory documentPresentationFactory)
: base(entityService, userStartNodeEntitiesService, dataTypeService)
: base(entityService, userStartNodeEntitiesService, dataTypeService)
{
_publicAccessService = publicAccessService;
_appCaches = appCaches;
@@ -52,8 +53,11 @@ public abstract class DocumentTreeControllerBase : UserStartNodeTreeControllerBa
if (entity is IDocumentEntitySlim documentEntitySlim)
{
responseModel.IsProtected = _publicAccessService.IsProtected(entity.Path);
responseModel.Ancestors = EntityService.GetPathKeys(entity, omitSelf: true)
.Select(x => new ReferenceByIdModel(x));
responseModel.IsTrashed = entity.Trashed;
responseModel.Id = entity.Key;
responseModel.CreateDate = entity.CreateDate;
responseModel.Variants = _documentPresentationFactory.CreateVariantsItemResponseModels(documentEntitySlim);
responseModel.DocumentType = _documentPresentationFactory.CreateDocumentTypeReferenceResponseModel(documentEntitySlim);
@@ -17,21 +17,18 @@ public abstract class UpdateDocumentControllerBase : DocumentControllerBase
protected async Task<IActionResult> HandleRequest(Guid id, UpdateDocumentRequestModel requestModel, Func<Task<IActionResult>> authorizedHandler)
{
// TODO This have temporarily been uncommented, to support the client sends values from all cultures, even when the user do not have access to the languages.
// The values are ignored in the ContentEditingService
// We intentionally don't pass in cultures here.
// This is to support the client sending values for all cultures even if the user doesn't have access to the language.
// Values for unauthorized languages are later ignored in the ContentEditingService.
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionUpdate.ActionLetter, id),
AuthorizationPolicies.ContentPermissionByResource);
// IEnumerable<string> cultures = requestModel.Variants
// .Where(v => v.Culture is not null)
// .Select(v => v.Culture!);
// AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
// User,
// ContentPermissionResource.WithKeys(ActionUpdate.ActionLetter, id, cultures),
// AuthorizationPolicies.ContentPermissionByResource);
//
// if (!authorizationResult.Succeeded)
// {
// return Forbidden();
// }
if (authorizationResult.Succeeded is false)
{
return Forbidden();
}
return await authorizedHandler();
}
@@ -1,11 +1,14 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
@@ -16,15 +19,32 @@ public class ValidateCreateDocumentController : CreateDocumentControllerBase
{
private readonly IDocumentEditingPresentationFactory _documentEditingPresentationFactory;
private readonly IContentEditingService _contentEditingService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")]
public ValidateCreateDocumentController(
IAuthorizationService authorizationService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory,
IContentEditingService contentEditingService)
: this(
authorizationService,
documentEditingPresentationFactory,
contentEditingService,
StaticServiceProvider.Instance.GetRequiredService<IBackOfficeSecurityAccessor>())
{
}
[ActivatorUtilitiesConstructor]
public ValidateCreateDocumentController(
IAuthorizationService authorizationService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory,
IContentEditingService contentEditingService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
: base(authorizationService)
{
_documentEditingPresentationFactory = documentEditingPresentationFactory;
_contentEditingService = contentEditingService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
}
[HttpPost("validate")]
@@ -36,7 +56,10 @@ public class ValidateCreateDocumentController : CreateDocumentControllerBase
=> await HandleRequest(requestModel, async () =>
{
ContentCreateModel model = _documentEditingPresentationFactory.MapCreateModel(requestModel);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result = await _contentEditingService.ValidateCreateAsync(model);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result =
await _contentEditingService.ValidateCreateAsync(
model,
CurrentUserKey(_backOfficeSecurityAccessor));
return result.Success
? Ok()
@@ -1,11 +1,14 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
@@ -17,15 +20,32 @@ public class ValidateUpdateDocumentController : UpdateDocumentControllerBase
{
private readonly IContentEditingService _contentEditingService;
private readonly IDocumentEditingPresentationFactory _documentEditingPresentationFactory;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")]
public ValidateUpdateDocumentController(
IAuthorizationService authorizationService,
IContentEditingService contentEditingService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory)
: this(
authorizationService,
contentEditingService,
documentEditingPresentationFactory,
StaticServiceProvider.Instance.GetRequiredService<IBackOfficeSecurityAccessor>())
{
}
[ActivatorUtilitiesConstructor]
public ValidateUpdateDocumentController(
IAuthorizationService authorizationService,
IContentEditingService contentEditingService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
: base(authorizationService)
{
_contentEditingService = contentEditingService;
_documentEditingPresentationFactory = documentEditingPresentationFactory;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
}
[HttpPut("{id:guid}/validate")]
@@ -62,7 +82,11 @@ public class ValidateUpdateDocumentController : UpdateDocumentControllerBase
=> await HandleRequest(id, requestModel, async () =>
{
ValidateContentUpdateModel model = _documentEditingPresentationFactory.MapValidateUpdateModel(requestModel);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result = await _contentEditingService.ValidateUpdateAsync(id, model);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result =
await _contentEditingService.ValidateUpdateAsync(
id,
model,
CurrentUserKey(_backOfficeSecurityAccessor));
return result.Success
? Ok()
@@ -0,0 +1,37 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DocumentBlueprint;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentBlueprint;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocuments)]
public class ScaffoldDocumentBlueprintController : DocumentBlueprintControllerBase
{
private readonly IContentBlueprintEditingService _contentBlueprintEditingService;
private readonly IUmbracoMapper _umbracoMapper;
public ScaffoldDocumentBlueprintController(IContentBlueprintEditingService contentBlueprintEditingService, IUmbracoMapper umbracoMapper)
{
_contentBlueprintEditingService = contentBlueprintEditingService;
_umbracoMapper = umbracoMapper;
}
[HttpGet("{id:guid}/scaffold")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(DocumentBlueprintResponseModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<IActionResult> Scaffold(CancellationToken cancellationToken, Guid id)
{
IContent? blueprint = await _contentBlueprintEditingService.GetScaffoldedAsync(id);
return blueprint is not null
? Ok(_umbracoMapper.Map<DocumentBlueprintResponseModel>(blueprint))
: DocumentBlueprintNotFound();
}
}
@@ -1,5 +1,4 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -9,7 +8,6 @@ using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
@@ -25,6 +23,15 @@ public class AllowedChildrenDocumentTypeController : DocumentTypeControllerBase
_umbracoMapper = umbracoMapper;
}
[NonAction]
[Obsolete("Use the non obsoleted method instead. Scheduled to be removed in v16")]
public async Task<IActionResult> AllowedChildrenByKey(
CancellationToken cancellationToken,
Guid id,
int skip = 0,
int take = 100)
=> await AllowedChildrenByKey(cancellationToken, id, null, skip, take);
[HttpGet("{id:guid}/allowed-children")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<AllowedDocumentType>), StatusCodes.Status200OK)]
@@ -32,10 +39,11 @@ public class AllowedChildrenDocumentTypeController : DocumentTypeControllerBase
public async Task<IActionResult> AllowedChildrenByKey(
CancellationToken cancellationToken,
Guid id,
Guid? parentContentKey = null,
int skip = 0,
int take = 100)
{
Attempt<PagedModel<IContentType>?, ContentTypeOperationStatus> attempt = await _contentTypeService.GetAllowedChildrenAsync(id, skip, take);
Attempt<PagedModel<IContentType>?, ContentTypeOperationStatus> attempt = await _contentTypeService.GetAllowedChildrenAsync(id, parentContentKey, skip, take);
if (attempt.Success is false)
{
return OperationStatusResult(attempt.Status);
@@ -1,14 +1,17 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
public class ExportDocumentTypeController : DocumentTypeControllerBase
{
private readonly IContentTypeService _contentTypeService;
@@ -1,17 +1,19 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services.ImportExport;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
public class ImportExistingDocumentTypeController : DocumentTypeControllerBase
{
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
@@ -1,17 +1,19 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services.ImportExport;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
public class ImportNewDocumentTypeController : DocumentTypeControllerBase
{
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
@@ -1,45 +1,60 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType.Item;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType.Item;
[ApiVersion("1.0")]
public class SearchDocumentTypeItemController : DocumentTypeItemControllerBase
{
private readonly IEntitySearchService _entitySearchService;
private readonly IContentTypeService _contentTypeService;
private readonly IUmbracoMapper _mapper;
private readonly IContentTypeSearchService _contentTypeSearchService;
[Obsolete("Please use ctor that only accepts IUmbracoMapper & IContentTypeSearchService, scheduled for removal in v17")]
public SearchDocumentTypeItemController(IEntitySearchService entitySearchService, IContentTypeService contentTypeService, IUmbracoMapper mapper)
: this(mapper, StaticServiceProvider.Instance.GetRequiredService<IContentTypeSearchService>())
{
_entitySearchService = entitySearchService;
_contentTypeService = contentTypeService;
_mapper = mapper;
}
[Obsolete("Please use ctor that only accepts IUmbracoMapper & IContentTypeSearchService, scheduled for removal in v17")]
// We need to have this constructor, or else we get ambiguous constructor error
public SearchDocumentTypeItemController(
IEntitySearchService entitySearchService,
IContentTypeService contentTypeService,
IUmbracoMapper mapper,
IContentTypeSearchService contentTypeSearchService)
: this(mapper, contentTypeSearchService)
{
}
[ActivatorUtilitiesConstructor]
public SearchDocumentTypeItemController(IUmbracoMapper mapper, IContentTypeSearchService contentTypeSearchService)
{
_mapper = mapper;
_contentTypeSearchService = contentTypeSearchService;
}
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
=> await SearchDocumentType(cancellationToken, query, null, skip, take);
[HttpGet("search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedModel<DocumentTypeItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
public async Task<IActionResult> SearchDocumentType(CancellationToken cancellationToken, string query, bool? isElement = null, int skip = 0, int take = 100)
{
PagedModel<IEntitySlim> searchResult = _entitySearchService.Search(UmbracoObjectTypes.DocumentType, query, skip, take);
if (searchResult.Items.Any() is false)
{
return await Task.FromResult(Ok(new PagedModel<DocumentTypeItemResponseModel> { Total = searchResult.Total }));
}
IEnumerable<IContentType> contentTypes = _contentTypeService.GetMany(searchResult.Items.Select(item => item.Key).ToArray().EmptyNull());
PagedModel<IContentType> contentTypes = await _contentTypeSearchService.SearchAsync(query, isElement, cancellationToken, skip, take);
var result = new PagedModel<DocumentTypeItemResponseModel>
{
Items = _mapper.MapEnumerable<IContentType, DocumentTypeItemResponseModel>(contentTypes),
Total = searchResult.Total
Items = _mapper.MapEnumerable<IContentType, DocumentTypeItemResponseModel>(contentTypes.Items),
Total = contentTypes.Total
};
return Ok(result);
@@ -1,10 +1,18 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentVersion;
@@ -13,13 +21,29 @@ public class RollbackDocumentVersionController : DocumentVersionControllerBase
{
private readonly IContentVersionService _contentVersionService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IAuthorizationService _authorizationService;
[ActivatorUtilitiesConstructor]
public RollbackDocumentVersionController(
IContentVersionService contentVersionService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IAuthorizationService authorizationService)
{
_contentVersionService = contentVersionService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_authorizationService = authorizationService;
}
// TODO (V16): Remove this constructor.
[Obsolete("Please use the constructor taking all parameters. This constructor will be removed in V16.")]
public RollbackDocumentVersionController(
IContentVersionService contentVersionService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
: this(
contentVersionService,
backOfficeSecurityAccessor,
StaticServiceProvider.Instance.GetRequiredService<IAuthorizationService>())
{
}
[MapToApiVersion("1.0")]
@@ -29,11 +53,29 @@ public class RollbackDocumentVersionController : DocumentVersionControllerBase
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Rollback(CancellationToken cancellationToken, Guid id, string? culture)
{
Attempt<ContentVersionOperationStatus> attempt =
Attempt<IContent?, ContentVersionOperationStatus> getContentAttempt =
await _contentVersionService.GetAsync(id);
if (getContentAttempt.Success is false || getContentAttempt.Result is null)
{
return MapFailure(getContentAttempt.Status);
}
IContent content = getContentAttempt.Result;
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionRollback.ActionLetter, content.Key),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
{
return Forbidden();
}
Attempt<ContentVersionOperationStatus> rollBackAttempt =
await _contentVersionService.RollBackAsync(id, culture, CurrentUserKey(_backOfficeSecurityAccessor));
return attempt.Success
return rollBackAttempt.Success
? Ok()
: MapFailure(attempt.Result);
: MapFailure(rollBackAttempt.Result);
}
}
@@ -61,7 +61,7 @@ public class ExecuteActionHealthCheckController : HealthCheckControllerBase
return BadRequest(invalidModelProblem);
}
HealthCheckStatus result = healthCheck.ExecuteAction(_umbracoMapper.Map<HealthCheckAction>(action)!);
HealthCheckStatus result = await healthCheck.ExecuteActionAsync(_umbracoMapper.Map<HealthCheckAction>(action)!);
return await Task.FromResult(Ok(_umbracoMapper.Map<HealthCheckResultResponseModel>(result)));
}
@@ -39,6 +39,6 @@ public class CheckHealthCheckGroupController : HealthCheckGroupControllerBase
return HealthCheckGroupNotFound();
}
return await Task.FromResult(Ok(_healthCheckGroupPresentationFactory.CreateHealthCheckGroupWithResultViewModel(group)));
return Ok(await _healthCheckGroupPresentationFactory.CreateHealthCheckGroupWithResultViewModelAsync(group));
}
}
@@ -1,9 +1,12 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Media.Collection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
@@ -17,15 +20,32 @@ public class ByKeyMediaCollectionController : MediaCollectionControllerBase
{
private readonly IMediaListViewService _mediaListViewService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IMediaCollectionPresentationFactory _mediaCollectionPresentationFactory;
[Obsolete("Please use the constructor taking all parameters.")]
public ByKeyMediaCollectionController(
IMediaListViewService mediaListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper)
: this(
mediaListViewService,
backOfficeSecurityAccessor,
mapper,
StaticServiceProvider.Instance.GetRequiredService<IMediaCollectionPresentationFactory>())
{
}
[ActivatorUtilitiesConstructor]
public ByKeyMediaCollectionController(
IMediaListViewService mediaListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper,
IMediaCollectionPresentationFactory mediaCollectionPresentationFactory)
: base(mapper)
{
_mediaListViewService = mediaListViewService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_mediaCollectionPresentationFactory = mediaCollectionPresentationFactory;
}
[HttpGet]
@@ -53,8 +73,13 @@ public class ByKeyMediaCollectionController : MediaCollectionControllerBase
skip,
take);
return collectionAttempt.Success
? CollectionResult(collectionAttempt.Result!)
: CollectionOperationStatusResult(collectionAttempt.Status);
if (collectionAttempt.Success is false)
{
return CollectionOperationStatusResult(collectionAttempt.Status);
}
List<MediaCollectionResponseModel> collectionResponseModels = await _mediaCollectionPresentationFactory.CreateCollectionModelAsync(collectionAttempt.Result!);
return CollectionResult(collectionResponseModels, collectionAttempt.Result!.Items.Total);
}
}
@@ -46,6 +46,6 @@ public class CreateMediaController : CreateMediaControllerBase
return result.Success
? CreatedAtId<ByKeyMediaController>(controller => nameof(controller.ByKey), result.Result.Content!.Key)
: ContentEditingOperationStatusResult(result.Status);
: MediaEditingOperationStatusResult(result.Status, requestModel, result.Result.ValidationResult);
});
}
@@ -26,12 +26,23 @@ public class SearchMediaItemController : MediaItemControllerBase
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
=> await SearchFromParent(cancellationToken, query, skip, take, null);
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
[ProducesResponseType(typeof(PagedModel<MediaItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> SearchFromParent(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null)
=> await SearchFromParentWithAllowedTypes(cancellationToken, query, skip, take, parentId);
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
public async Task<IActionResult> SearchFromParentWithAllowedTypes(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null, [FromQuery]IEnumerable<Guid>? allowedMediaTypes = null)
=> await SearchFromParentWithAllowedTypes(cancellationToken, query, null, skip, take, parentId);
[HttpGet("search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedModel<MediaItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> SearchFromParent(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null)
public async Task<IActionResult> SearchFromParentWithAllowedTypes(CancellationToken cancellationToken, string query, bool? trashed = null, int skip = 0, int take = 100, Guid? parentId = null, [FromQuery]IEnumerable<Guid>? allowedMediaTypes = null)
{
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Media, query, parentId, skip, take);
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Media, query, parentId, allowedMediaTypes, trashed, skip, take);
var result = new PagedModel<MediaItemResponseModel>
{
Items = searchResult.Items.OfType<IMediaEntitySlim>().Select(_mediaPresentationFactory.CreateItemResponseModel),
@@ -0,0 +1,50 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.Media.RecycleBin;
[ApiVersion("1.0")]
public class ReferencedByMediaRecycleBinController : MediaRecycleBinControllerBase
{
private readonly ITrackedReferencesService _trackedReferencesService;
private readonly IRelationTypePresentationFactory _relationTypePresentationFactory;
public ReferencedByMediaRecycleBinController(
IEntityService entityService,
IMediaPresentationFactory mediaPresentationFactory,
ITrackedReferencesService trackedReferencesService,
IRelationTypePresentationFactory relationTypePresentationFactory)
: base(entityService, mediaPresentationFactory)
{
_trackedReferencesService = trackedReferencesService;
_relationTypePresentationFactory = relationTypePresentationFactory;
}
/// <summary>
/// Gets a paged list of tracked references for all items in the media recycle bin, so you can see where an item is being used.
/// </summary>
[HttpGet("referenced-by")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IReferenceResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<IReferenceResponseModel>>> ReferencedBy(
CancellationToken cancellationToken,
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForRecycleBinAsync(UmbracoObjectTypes.Media, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
Total = relationItems.Total,
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return pagedViewModel;
}
}
@@ -1,8 +1,9 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.ViewModels;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
@@ -38,13 +39,13 @@ public class AreReferencedMediaController : MediaControllerBase
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> distinctByKeyItemsWithReferencedRelations = await _trackedReferencesSkipTakeService.GetPagedItemsWithRelationsAsync(ids, skip, take, true);
PagedModel<Guid> distinctByKeyItemsWithReferencedRelations = await _trackedReferencesSkipTakeService.GetPagedKeysWithDependentReferencesAsync(ids, Constants.ObjectTypes.Media, skip, take);
var pagedViewModel = new PagedViewModel<ReferenceByIdModel>
{
Total = distinctByKeyItemsWithReferencedRelations.Total,
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(distinctByKeyItemsWithReferencedRelations.Items),
Items = _umbracoMapper.MapEnumerable<Guid, ReferenceByIdModel>(distinctByKeyItemsWithReferencedRelations.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -37,7 +37,7 @@ public class ReferencedByMediaController : MediaControllerBase
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, false);
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
@@ -45,6 +45,6 @@ public class ReferencedByMediaController : MediaControllerBase
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -45,6 +45,6 @@ public class ReferencedDescendantsMediaController : MediaControllerBase
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Controllers.Tree;
using Umbraco.Cms.Api.Management.Factories;
@@ -50,6 +50,7 @@ public class MediaTreeControllerBase : UserStartNodeTreeControllerBase<MediaTree
{
responseModel.IsTrashed = entity.Trashed;
responseModel.Id = entity.Key;
responseModel.CreateDate = entity.CreateDate;
responseModel.Variants = _mediaPresentationFactory.CreateVariantsItemResponseModels(mediaEntitySlim);
responseModel.MediaType = _mediaPresentationFactory.CreateMediaTypeReferenceResponseModel(mediaEntitySlim);

Some files were not shown because too many files have changed in this diff Show More