Compare commits

...
Author SHA1 Message Date
NathanWoulfe dcffbc65f4 provide document and documentType IDs to ISegmentService 2025-07-23 12:40:24 +10:00
Nhu DinhandGitHub 6d240b6a07 V16 QA Added acceptance tests for creating a document using blueprint (#19708)
* Added tests for creating content using document blueprint

* Updated tests due to api helper for document blueprint changes

* Bumped version

* Make all Blueprint tests runs in the pipeline

* Reverted npm command
2025-07-21 10:33:30 +07:00
Nhu DinhandGitHub d31b88b94a V16 Added acceptance tests for the regression issue #19529 (#19713)
* Added tests for regression issue that cannot create a variant document blueprint

* Make tests run in the pipeline

* Reverted npm command
2025-07-21 03:23:44 +00:00
Nhu DinhandGitHub 0442ddc739 V16 Added acceptance tests for the regression issue #16985 (#19712)
* Updated tests for adding a thumbnail to a block grid

* Added tests for adding a block thumbnail

* Make tests run in the pipeline

* Reverted npm command
2025-07-21 03:21:21 +00:00
3b04d54ea3 Add flag to exclude trashed media (#19746)
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
2025-07-18 14:59:06 +02:00
Kenn JacobsenandGitHub 71df46cc06 Include /.well-known/jwks in the paths covered by OpenIddict (#19749) 2025-07-18 13:48:22 +02:00
5660c6c369 Forward merge #19720 to V16 (#19735)
* Add support for programmatic creation of property types providing the data type key (#19720)

* Add support for programmatic creation of property types providing the data type key.

* Add integration tests

---------

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

* Don't use Lazy

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-18 10:47:34 +02:00
698d566b76 Populate name for content and media on URL picker if title is left empty (#19677)
* Populate name for content and media on URL picker if title is left empty.

* Display URL for manually entered URLs.

* Updates from code review.

* Reverted `elementName` constant

* Sorted imports

* Small code tidy-ups

* Added logic to render the `url` as the `name` fallback

In this case, the `detail` is left empty, giving prominence to the `url` value.

* Refactored the get name/url methods

for code consistency.

* Updated `#requestRemoveItem()` to use the item's resolved name

with a fallback to "item".

Also localized the "Remove" button label

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-15 13:31:33 +01:00
5d968afb7e Fix failing integration tests in SQL Server (#19725)
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-07-15 09:01:04 +02:00
Jacob OvergaardandGitHub 63ff9e9e32 V16: Build Backoffice externals with Vite (#19716)
* chore: revamps openid package to organise files in a 'src' folder

* feat: adds all externals as npm workspaces with a vite build

* feat: copies the correct uui assets

* feat: copies the backoffice static assets

* feat: creates the correct module for openid

* feat: copies the correct monaco-editor assets

* feat: moves monaco-editor into its package

* feat: moves dependencies to relevant external modules

* feat: gets rid of rollup

* build: uses tiny-glob instead of glob (one less dependency)

* feat: copies all css assets to dist-cms/css first, minifies them, then copies everything over to StaticAssets

* build: removes old static assets from vite static build
2025-07-14 11:47:00 +01:00
Jacob OvergaardandGitHub d95b6b7530 V16: Property editor file upload does not validate file types (#19714)
* fix: forwards the file extensions to the inner dropzone

* fix: ensures non-mimetype extensions start with a dot (.)

* chore: adds more details on how to set file extensions

* feat: adds a bit of styling to code snippets in UFM

* fix: return if no file in stream

* fix: prevents potential race condition if src changes

* chore: minor code improvement
2025-07-14 09:04:58 +01:00
Andy Butland 4deb756e64 Adds variation by the header name Accept-Language to the delivery API output cache policy (#19709)
* Adds variation by the header name Accept-Language to the develivery API output cache policy

* Removed obsolete constructor (not necessary as the class is internal).

* Introduce contants for header names.
2025-07-11 16:08:18 +02:00
543b644ed1 Fix issue forceHideContentEditorInOverlay not available in RTE (#19698)
* Fix issue forceHideContentEditorInOverlay not available in RTE

* remove href link when enable hide content editor setting:

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-07-11 07:54:03 +02:00
e6c169e566 Adds background worker to check timeout state (#19702)
* feat: converts tokenResponse into an object state

* feat: adds worker that checks token lifetime

* feat: initialises token worker to check up on tokens

* revert

* chore: defines typings for shared workers

* chore: uses correct assets url for core package

* feat: sets correct values for token check expiration

* feat: adds labels to confirm modal

* feat: separates logic for session monitoring to own controller

* feat: adds a timeout modal to correctly inform the user

* feat: opens the timeout modal (and closes it again) if a timeout occurs

* feat: log out when user clicks log out button

* feat: adds localization

* feat: sets sensible defaults for the web worker to check

* feat: adds more languages

* chore: adds more comments

* chore: removes nodejs types

* Update src/Umbraco.Web.UI.Client/src/packages/core/auth/workers/token-check.worker.ts

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

* chore: removes nodejs types

* chore: resolves cyclic imports

* chore: removes circular dependencies from the 'modal' package

* chore: redefine SharedWorkerGlobalScope because of Github Actions CI

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 13:56:03 +00:00
Lee KelleherandGitHub 3c6f222c8b Fixes Block Catalogue Modal Filter (#19700)
* Mock data updates

The `icon` is not part the block-type data.

* Adds `description` to the mock doctype model

* Refactors block catalogue modal

to make the filter/search work with a block-type's name & description.

This removes the need to use the `<umb-block-type-card>` component,
all element-type data is requested upfront.

* Reverted dev/debug change

* Abstracted out the element-type items observation to its own method

* Updated CSS rule

thanks to a Copilot suggestion.
2025-07-10 09:33:56 +00:00
Andy Butland 50282ea2e9 Bumped version to 16.2.0-rc. 2025-07-10 11:08:54 +02:00
Andy Butland a91aefc185 Added comments for no-op partial view cache invalidator. 2025-07-10 07:33:07 +02:00
Lee KelleherandGitHub 1fe29d921b UFM: JavaScript-like Expressions (#19685)
* Adds `markedExtension` extension-type

* Relocates the Component and Filter extension-type interface code files

to under "extensions"

* Moves `UfmPlugin` type to its own referencable file

* Adds UFM support for JS expressions

making use of "@heximal/expressions" library.

* Modified regex pattern to match nested braces

* try/catch for invalid JS expressions

* Capitalizing the JS in `UmbUfmJsMarkedExtensionApi` class name

for consistency and improved readability.

* Abstracted out `ufmjs()` to its own Marked extension file

making it simpler to add unit-tests.

* Fixed up types in UFM context

added JSDocs for public methods

* Adds a generic Least Recently Used (LRU) cache implementation
2025-07-09 11:34:12 +02:00
Nhu DinhandGitHub 91e19c4faf V16 QA Reverted npx command (#19699)
* Reverted npx command

* Fixed npx command
2025-07-09 09:07:05 +00:00
Nhu DinhandGitHub 60580ff8bd V16 QA Added acceptance tests for granular document permission (#19546)
* Added tests for granular document permission

* Updated tests for Webhook

* Bumped version

* Make all tests for granular permission run in the pipeline

* Added issue link for the failing tests

* Remove .skip

* Removed unnecessary tests

* Updated assertion step for create and delete document for a specific document

* Updated tests for read permission

* Fixed comments
2025-07-09 13:30:47 +07:00
Nhu DinhandGitHub 17bc6dde28 V16 QA Removed unused API acceptance tests (#19679)
Removed unused API acceptance tests
2025-07-09 03:41:01 +00:00
Andy Butland 4e6f3f6d1d Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-07-08 15:53:52 +02:00
Andy Butland 9bd3076abf Register no-op implementation of IMemberPartialViewCacheInvalidator in headless setups (#19666)
* Register no-op implementation of IMemberPartialViewCacheInvalidator in headless setups.

* Tidied usings.
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
2025-07-08 15:53:37 +02:00
05010fc707 UFM: Code tidy-up (#19687)
* Reverted `elementName` constant

* UFM base element: simplify context check

* Adds console warning if UFM filter does not exist

* Removed unnecessary casting/typing

* Apply suggestion from @Copilot

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

* Moved console warnings outside of loop

* Added "ufm-" prefix to eslint local rules

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-08 14:21:47 +02:00
Andy ButlandandGitHub 118b26a8b9 Clear member cache by older user name when member user name is updated (16) (#19690)
* Pass notification state to cache refreshers.
Pass previous user name into member saved notification state and use when refreshing cache to clear the member by keys based on this.

* Fixed issue raised in code review.

* Fixed casing for state key.

* Added removed parameter to unit tests.

* Fix breaking change.
2025-07-08 11:28:11 +02:00
Lee KelleherandGitHub e00dcef4d6 UFM: Make Block Settings data available (#19686)
* Adds support to UFM for Block settings data

Fixes #17619

* Code/markup tidy-up

makes use of Lit's `when` directive
to simplify the conditional.
2025-07-08 10:12:58 +02:00
Lee KelleherandGitHub 1f84fe4701 UFM: Adds markedExtension extension-type (#19684)
* Adds `markedExtension` extension-type

* Relocates the Component and Filter extension-type interface code files

to under "extensions"

* Moves `UfmPlugin` type to its own referencable file
2025-07-08 10:10:22 +02:00
9baf04026e V16: Siblings endpoints (#19657)
* PoC implementation

* Move to controller base

* Implement solution that seems worse, but works better

* Don't require parent key in repository method

* Fix typos

* Add siblings for data type, media type and media

* Add endpoint for template

* Add DocumentType and DocumentBlueprint controllers

* Fix naming

* Fix case if siblings are under root

* Take item ordering into account

not all entities are ordered by sort order

* Add default implementation

* Fix parentkey

* Add tests

* Format optimizations for split view

* Add test covered requirement to description

* Cover positive case and make test case output more readable

* reduce allocations

* Clarify test

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-07-07 12:53:42 +00:00
Andy ButlandandGitHub b5195ed8eb Fixes issues with creation of documents from blueprints that have populated file upload properties (#19655)
* Fixes issue where content created from blueprint would not persist file upload property values.

* Ensure a copy of a file upload is created when scaffolding content from a blueprint, like we do when copying content.

* Clarified comment.

* Removed unneeded usings.

* Fixed spelling.

* Handle create of blueprint from content to create a new uploaded file.
Handle delete of blueprint to delete uploaded files.
2025-07-07 14:15:17 +02:00
Andy ButlandandGitHub 4c87cc5fd9 Adds support for custom granular permissions when aggregating across user groups (#19660)
* Added abstraction for aggregation of granular permissions to support custom permissions.

* Refactor to move responsibility for aggregating granular permissions to the respective mappers.

* Added XML header comments for permission mappers.

* Tidied up/removed warnings in UserPresentationFactory interface and implementation.

* Optimized retrieval of documents in DocumentPermissionMapper.

* Fixed method header comment.

* Use entity service rather than content service to retrieve key and path.
2025-07-07 12:59:55 +02:00
Andy ButlandandGitHub 8b4849be05 Fix issue with preview in delivery API for MNTP property editor (#19668)
* Passes the preview flag to the cache retrieval when resolving the delivery API object for the MNTP property editor.

* Added unit test verifying fix and adjusted mocks for tests to acoomodate.

* Provided preview flag for Razor rendering.
2025-07-07 11:33:59 +02:00
PeterandGitHub 7b929a7c53 Title returns "Server Error" in non-debug mode (#19665)
* Add isDebug check for Title

* Error title has been added
2025-07-07 10:04:10 +02:00
Mads RasmussenandGitHub af52e68b6e Clean up workspace conditions folder structure (#19634)
* Refactor section conditions into subfolders

Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.

* use const

* fix build

* Refactor section alias condition to use constant

Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.

* clean up workspace conditions
2025-07-07 07:34:01 +01:00
Mads RasmussenandGitHub 05aef6a91f Hide Document/Media Collection Workspace View until the item is created (#19644)
* only show collection items workspace view when document is created

* do not pass null for collection

* only show media collection view when media is created
2025-07-07 07:31:27 +01:00
Mads RasmussenandGitHub 8489d1a63e Docs: Tree example (#19624)
* add basic collection example

* add card view example

* update example readme

* Add workspace view example with collection

* wip tree example

* clean up

* Update README.md

* Update README.md
2025-07-07 07:13:16 +01:00
PeterandGitHub e0a00bfd04 Amend accessibility modifiers on file upload property editor components to support extension (#19643)
* Logic of getting media path moved to separate method.

* TemporaryFileUploadValidator marked as public

* Typo fix.
2025-07-04 14:22:50 +02:00
Jacob Overgaard 914bc409f6 Merge branch 'release/16.1' 2025-07-03 14:16:29 +02:00
Jacob OvergaardandGitHub aa90253d71 build(deps): bump @umbraco-ui from 1.14.1 to 1.14.2 (#19656) 2025-07-03 11:27:37 +02:00
Jacob OvergaardandGitHub c9bef96c32 V16.1: Never reject a token response (#19651)
* fix: never reject a token response

If a token response is rejected, then the pipeline will also fail because it does not understand that error. Let the API interceptors do their job instead and simply return the old, now-invalid token which will prompt the API interceptors to store the request states and retry them afterwards.

* chore: removes unused timeoutsignal

* chore: captures the stale token before potentially clearing it
2025-07-02 16:10:30 +01:00
Jacob Overgaard 9cb8dc73e5 Merge branch 'release/16.1' 2025-07-02 10:21:20 +02:00
Jacob OvergaardandGitHub d10ba420f4 V16.1: 400 errors are being wrongfully ignored (#19648)
fix: allows 400 errors to have a default notification unless silenced manually by `disableNotifications`
2025-07-02 08:16:03 +00:00
Jacob OvergaardandGitHub be3a1759de GitHub: Only deploy to Azure on direct pull requests (#19647)
* build(github): check that the "close" job only runs when the appropriate label is applied

it follows that the "build" job would only have built an environment when the label was applied

* build(github): check that the action is run directly on the repository and not from a fork

this alleviates the problem that the deploymentToken for Azure only exists within the repository
2025-07-02 09:47:53 +02:00
Laura NetoandGitHub dcd8b42522 Move cache instructions pruning to background job (#19598)
* Remove pruning logic from `CacheInstructionService.ProcessInstructions()`

* Add and register `CacheInstructionsPruningJob` background job

* Add unit tests

* Remove breaking change in ICacheInstructionService

* Adjust some obsoletion messages to mention v17

* Added missing scope

* Update tests

* Fix obsoletion messages version

* Update ProcessInstructions methods summary
2025-07-01 11:17:59 +02:00
3b4639de08 Collection rendering performance improvements Part 1: Improve Entity actions render performance (#19605)
* Add null checks for editPath and name in render method

The render method now checks for the presence of both editPath and _name before rendering the button, preventing potential errors when these values are missing.

* Refactor dropdown open state handling

Replaces the public 'open' property with a private field and getter/setter to better control dropdown state. Moves popover open/close logic into the setter, removes the 'updated' lifecycle method, and conditionally renders dropdown content based on the open state.

* add opened and closed events

* dispatch opened and closed events

* Render dropdown content only when open

Introduces an _isOpen state to control rendering of the dropdown content in UmbEntityActionsBundleElement. Dropdown content is now only rendered when the dropdown is open, improving performance and preventing unnecessary DOM updates.

* Update dropdown.element.ts

* create a cache elements

* Optimize entity actions observation with IntersectionObserver

Adds an IntersectionObserver to only observe entity actions when the element is in the viewport, improving performance. Refactors element creation to use constructors, updates event handling, and ensures cleanup in disconnectedCallback.

* only observe once

* Update entity-actions-bundle.element.ts

* Update dropdown.element.ts

* Update entity-actions-bundle.element.ts

* split dropdown component

* pass compact prop

* fix label

* Update entity-actions-dropdown.element.ts

* Update entity-actions-dropdown.element.ts

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-07-01 08:37:57 +00:00
Jacob OvergaardandGitHub d5159ae4f7 V16: Upgrade Storybook from V8 to V9 (#19640)
* build(deps-dev): bump storybook from v8 to v9

* chore: run storybook v9 migrations

* chore: updates import paths for storybook-webcomponents-vite (migration)

* chore: migrates eslint for storybook config

* fix: updates old link to composed storybook so we reference the latest production uui

* chore: formats eslint config file

* chore: changes import path to build mdx stories

* chore: updates language list to reflect v16
2025-07-01 09:50:27 +02:00
Niels LyngsøandGitHub 629635e0dd observable for detecting if split view is active (#19394)
* observable for detecting if split view is active

* declare splitView manager on content detail workspace

* remove declaration as it was a double
2025-07-01 09:30:55 +02:00
Andy Butland 876d229b7e Merge branch 'v15/dev'
# Conflicts:
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Configuration/ContentSettingsExtensionsTests.cs
2025-07-01 08:28:48 +02:00
ad5a18f1ee Fix pagination in Content Delivery API Index Helper (#19606)
* Refactor descendant enumeration in DeliveryApiContentIndexHelper

Improved loop condition to allow for processing of more than 10.000 descendants for indexing.

* Add failing test for original issue.

* Renamed variable for clarity.

---------

Co-authored-by: Brynjar Þorsteinsson <brynjar@vettvangur.is>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-01 08:23:58 +02:00
Andy ButlandandGitHub cdc62d3020 Aligned jsdoc and inferred function type on UmbCurrentUserContext (#19642)
Aligned jsdoc and inferred function type on UmbCurrentUserContext.
2025-06-30 18:52:25 +02:00
Andy ButlandandGitHub 3e99c2f69d Removes full-width from toggle property editor (#19641)
* Removes full-width from toggle property editor.

* Fixed linting error.
2025-06-30 14:35:34 +00:00
Jacob Overgaard b3d86d5395 build(deps): bump @umbraco-ui/uui from 1.14.0 to 1.14.1 2025-06-30 15:30:32 +02:00
Mads RasmussenandGitHub 50327be6e7 React on late read only guard rules (#19621)
* Observe read-only guard rules in variant selector

Added observation of read-only guard rules in the workspace split view variant selector to ensure read-only cultures are updated when rules change.

* Improve save action to react to read-only rule changes

* remove unused
2025-06-30 15:22:44 +02:00
e135599c96 Fix readonly UI for create document user permission (#19554)
* Update document-workspace.context.ts

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts

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

* add check for undefined

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-30 15:19:46 +02:00
LiliandNiels Lyngsø d6a66bc4d8 V15 Bugfix: Horizontal scrollbar in Media section #19479 (#19541)
fix to stop the scroll bar appearing in the media section.
2025-06-30 14:55:52 +02: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
Mads RasmussenandGitHub 283e6b2ff0 Entity type + Entity Unique conditions (#19614)
* Add entity-type and entity-unique condition support

Introduces new condition types for entity-type and entity-unique, including their constants, types, condition implementations, and manifests. Updates exports in core entity modules to include these new features, enabling more granular extension conditions based on entity type and uniqueness.

* register conditions

* add support for oneOf

* fix self imports

* Update manifests.ts

* remove unused
2025-06-30 14:51:21 +02:00
Andy ButlandandGitHub cfbbfa004c Further fix to configuration classes using ISet, resolving regression with custom 404 pages (#19573)
Further fix to configuration classes using ISet, resolving regression with custom 404 pages.
2025-06-30 14:37:04 +02:00
b81d45901b ability to hide block actions (#19626)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-30 12:35:18 +00:00
df39026d0d set height to match workspace top bar (#19384)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-30 12:32:45 +00:00
HenrikandGitHub 880d84b030 Reduce lookups needed in ConcurrentDictionaries in ContentNavigationServiceBase (#19603)
Reduce lookups needed in ConcurrentDictionaries and sort using List.Sort, make key removal O(1) by using hashsets and avoid duplicates, remove unneeded .ToList() and other minor tweaks
2025-06-30 14:24:04 +02:00
Lee KelleherandGitHub f9c2b9594f Label property-editor, adds UFM template support (#19610)
* Adds `labelTemplate` config to Label editor

* Code tidyup for Label editor element

* Adds "format-bytes" UFM filter

* Renamed "format-bytes" to "bytes"

* Label element tidy-up + copilot amends

* Added `formatBytes` options

* Simplified condition, thanks CodeScene

* Reverted element export
2025-06-30 12:18:02 +00:00
HenrikandGitHub 1f28f1043a Avoid async await Task.FromResult, plus some other minor tweaks (#19597) 2025-06-30 14:15:22 +02:00
Andy Butland e78eee50ed Minor refactor following merge of PR #19617. 2025-06-30 14:08:50 +02:00
Davor ZlotrgandGitHub ba2072c979 fix: json serialization and deserialization for NuCacheSerializerType (#19617)
fix: json serialization and deserialization
2025-06-30 14:07:00 +02:00
Mads RasmussenandGitHub 49b95c1225 Introduce Section Alias condition const (#19633)
* Refactor section conditions into subfolders

Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.

* use const

* fix build

* Refactor section alias condition to use constant

Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.
2025-06-30 13:24:00 +02:00
14063a0b89 Add support for file upload property editor within the block list and grid (#18976)
* Fix for https://github.com/umbraco/Umbraco-CMS/issues/18872

* Parsing added for current value

* Build fix.

* Cyclomatic complexity fix

* Resolved breaking change.

* Pass content key.

* Simplified collections.

* Added unit tests to verify behaviour.

* Allow file upload on block list.

* Added unit test verifying added property.

* Added unit test verifying removed property.

* Restored null return for null value fixing failing integration tests.

* Logic has been updated according edge cases

* Logic to copy files from block list items has been added.

* Logic to delete files from block list items on content deletion has been added

* Test fix.

* Refactoring.

* WIP: Resolved breaking changes, minor refactoring.

* Consistently return null over empty, resolving failure in integration test.

* Removed unnecessary code nesting.

* Handle distinct paths.

* Handles clean up of files added via file upload in rich text blocks on delete of the content.

* Update src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs

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

* Fixed build of integration tests project.

* Handled delete of file uploads when deleting a block from an RTE using a file upload property.

* Refactored ensure of property type property populated on rich text values to a common helper extension method.

* Fixed integration tests build.

* Handle create of new file from file upload block in an RTE when the document is copied.

* Fixed failing integration tests.

* Refactored notification handlers relating to file uploads into separate classes.

* Handle nested rich text editor block with file upload when copying content.

* Handle nested rich text editor block with file upload when deleting content.

* Minor refactor.

* Integration test compatibility supressions.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
2025-06-30 13:21:10 +02:00
2cb114ffaf Fix check for pending package migration to use the package not the plan name (#19509)
* Fix check for pending package migration to use the package not plan name.

* Cover all package name/identifier permutations and fix the API output for multiple plans

* Adjusted log message to not refer to unattended migrations as migrations may be being run attended.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-06-30 10:20:11 +00:00
Jacob OvergaardandGitHub fb2aad0b1d V16: Adds a state for "forbidden" for entities that return 403 (Access denied) (#19557)
* feat: adds new localization keys for forbidden routes

* feat: ignore all 400, 401, 403, and 404 errors as they are handled by the UI

* feat: adds new elements to show forbidden routes and entities

* feat: adds generic forbidden state to base entities

* feat: injects a forbidden route component to documents

* feat: adds 'forbidden' state to media workspace

* chore: aligns document and media workspaces

* test(mock): adds user configuration endpoint

* test(mock): adds calculate-start-nodes endpoint to users

* test(mock): adds missing endpoint for 'client-credentials'

* feat: clean up old observers on entity errors

* feat: aligns UI for better DX if there is no user

* fix: returns early if there is no user, instead of trying to append properties to the object

* feat: adds 'forbidden' state to members

* feat: adds support for forbidden document blueprints

* feat: allows parent to be undefined as well as null

* feat: forbidden route for members as a state

* chore: simplify language workspace

* test: adds forbidden mock data

* test: adds missing endpoints and a check for forbidden ids
2025-06-30 10:00:11 +01:00
Jacob OvergaardGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
861afde3a0 Fix for code scanning alert no. 1719: Client-side cross-site scripting (#19607)
* Fix for code scanning alert no. 1719: Client-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat: uses built-in sanitizeHtml in backoffice

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-30 09:04:50 +01:00
Andy ButlandandGitHub 29b6c2d49e Assert dates in content editing integration tests to millisecond only (#19513)
* Assert dates in content editing integration tests to millisecond only.

* Add date time extension unit tests and refactor to switch statement.

* Removed whitespace.
2025-06-30 07:59:22 +02:00
Andy ButlandandGitHub c223d93a53 Adds XML header docs indicating usage of options on NuCacheSerializerType (#19555)
Adds XML header docs indicating usage of options on NuCacheSerializerType.
2025-06-30 07:53:09 +02:00
Niels LyngsøandGitHub c432f5a66c load more button component and styling (#19622)
* localization

* tree-load-more-button component

* implement

* ability to hide block actions

* Revert "ability to hide block actions"

This reverts commit bf8222f49b.
2025-06-29 18:39:07 +02:00
9cb0557120 Tiptap RTE: A11Y label improvements (#19531)
* a11y: Adds labels to Tiptap RTE toolbar buttons/menus

* a11y: Adds labels to Tiptap toolbar designer actions

* a11y: Adds labels to Tiptap statusbar designer actions

* a11y: Adds label to Overlay Size dropdown

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-06-27 12:10:12 +00:00
f7aab5e901 Table checkbox/icon alignment (#19615)
* Table checkboxes slotted whitespace

Fixes #19563

* Table markup tidy-up

Resolved the `style` attribute error

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-27 11:58:00 +00:00
Mads RasmussenandGitHub 75ee1e65d1 Show success/failed state for workspace buttons with additional options (#19535)
* also show success/failed state when button have additional options

* rename method

* clear timeout
2025-06-27 13:38:21 +02:00
b7be95b239 Add folder workspace icon (#19366)
* add slot for icon

* expose icon data

* render icon

* load type for scaffold

* rename

* render icon for media

* add observable for content type icon

* request data in data source

* wire up document scaffolding

* remove unused

* export server data source

* render icon for member

* rename data source to align with other detail sources

* rename data source

* remove unused styling

* remove console log

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

* remove console log

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

* remove console log

* render workspace icon for document type folders

* make folder workspace editor

* use element

* remove const

* use folder-workspace-editor for templating folders

* introduce name write guard manager

* prevent name change of file system folders

* Update script-folder-workspace-editor.element.ts

* make guard optional

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-27 13:38:01 +02:00
Laura NetoandGitHub 376a2c8ff6 V16.1: Fix broken content creation when using blueprints (#19518)
Fixes broken content creation based on blueprints

Fixes preset not overriding values in the various createScaffold methods.
2025-06-27 13:36:14 +02:00
Lee KelleherandGitHub 3e891972d0 Tiptap RTE: Adds token for statusbar context (#19530)
Tiptap: adds token for Statusbar context
2025-06-27 13:35:36 +02:00
Lee KelleherandGitHub cdf7b3dbef Tiptap RTE: Toolbar menu active highlighting (#19532)
* Adds optional parameter to Tiptap toolbar item's `isActive`

* Adds `isActive` support to toolbar menus and cascading menus

* Adds `isActive` support to the font menus

* Adds `isActive` support to the table menu

+ UI/CSS tweak

* Adds `isActive` support to the style menu API

+ refactored the commands

* Improves cascading menu popover closing

it previously didn't close the menu when an action was clicked.
2025-06-27 13:33:17 +02:00
Mads RasmussenandGitHub ede906e152 DocumentUrlDataResolver: Use UMB_VARIANT_CONTEXT instead of UMB_PROPERTY_DATASET_CONTEXT (#19537)
* change to variant context

* remove unused
2025-06-27 13:32:22 +02:00
5cafa599fa Remove trash success notifications (#19534)
* remove trash notifications

* Updated tests so we no longer use the notification for moving to recycle bin

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-06-27 13:31:08 +02:00
e3c52afbbb v16 QA Remove smoke tag from flaky test (#19611)
* Remove from smoke tag

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

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-26 13:10:58 +02:00
Kenn JacobsenandGitHub c61fc7419c Cherry picked #19540 to V16 (and fixed changed signatures) (#19592) 2025-06-26 09:16:49 +02:00
67106f0813 Add missing media exports (#19585)
* Add missing media exports

Fixes #19560 and #19561

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts

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

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 12:17:40 +00:00
55506bac3a Simplify creating content from a blueprint programmatically (#19528)
* Rename `IContentService.CreateContentFromBlueprint` to `CreateBlueprintFromContent`

In reality, this method is used by the core to create a blueprint from content, and not the other way around, which doesn't need new ids. This was causing confusion, so the old name has been marked as deprecated in favor of the new name. If developers want to create content from blueprints they should use `IContentBlueprintEditingService.GetScaffoldedAsync()` instead, which is what is used by the management api.

* Added integration tests to verify that new block ids are generated when creating content from a blueprint

* Return copy of the blueprint in `ContentBlueprintEditingService.GetScaffoldedAsync` instead of the blueprint itself

* Update CreateContentFromBlueprint xml docs to mention both replacement methods

* Fix tests for rich text blocks

* Small re-organization

* Adjusted tests that were still referencing `ContentService.CreateContentFromBlueprint`

* Add default implementation to new CreateBlueprintFromContent method

* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.GetScaffold.cs

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

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-06-24 13:43:34 +02:00
Jacob OvergaardandGitHub b41eecf58c V16: Document shows blank page when clicking an active link (#19553)
* fix: if no workspace views are found at all, show a not found page

* fix: rather than redirecting to the first available tab, which may not always be available on secondary routing, let the router display the first tab on an empty url

this mirrors how workspace views are displayed in umb-workspace-editor
2025-06-24 09:45:31 +01:00
Lee KelleherandGitHub 0a7a92287b Variant workspace breadcrumb item parentheses (#19599)
* Refactored breadcrumb variant name

The parentheses will be added to unnamed variant ancestor items.

* Adds `last-item` attribute

(for semantics)

* Imports tidy-up

* Refactored `#getHref` to early exit for `.isFolder`

Saves on the string allocation.
2025-06-24 10:10:02 +02:00
6237ddca89 Improves the layout on the create blueprint dialog (#19556)
* Improves the layout on the create blueprint dialog.

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-24 08:08:09 +00:00
Mads RasmussenandGitHub ef453ad62e Docs: Collection example (#19593)
* add basic collection example

* add card view example

* update example readme

* Add workspace view example with collection
2025-06-24 08:31:26 +01:00
Nhu DinhandGitHub e6791246e4 V16 QA Added acceptance tests for Webhook (#19545)
* Added tests for webhook

* Added tests for webhook trigger

* Bumped version

* Make all Webhook tests run in the pipeline

* Fixed comment

* Reverted npm command
2025-06-17 08:55:30 +00:00
Andy ButlandandGitHub 50272f7401 Removed duplicate/obsolete code fixing issue with document move permission checks (#19552)
Removed duplicate/obsolete code fixing issue with document move permission checks.
2025-06-13 14:41:08 +02:00
Nhu DinhandGitHub 9964e0b8ec V16 QA Added acceptance tests for granular property value permission (#19458)
* Updated due to test helper changes

* Updated user group tests due to api helper changes

* Updated tests for user group default configuration due to UI changes

* Added tests for document property value permission

* Added tests for document property value permission in content with block

* Bumped version

* Make specific tests run in the pipeline

* Added skip tag and issue link for the failing tests

* Added tests for granular property value permission

* Fixed comment

* Bumped version

* Bumped version

* Fixed comments

* Bumped version and reverted npm command

* Make all tests for user group permission run in the pipeline

* Updated smokeTest command

* Fixed comments

* Reverted npm command
2025-06-13 11:13:28 +07:00
Andy ButlandandGitHub 9d11c76ea1 Added start-up logging of document URL caching (#19538)
Added startup logging of document URL caching.
2025-06-12 22:20:44 +02:00
Andy Butland da9c6e24ce Removed unnecessary compatibility suppressions file from integration tests. 2025-06-12 13:50:29 +02:00
Jacob OvergaardandGitHub cd72dbe4ea V16: Retry requests after timeout (#19495)
* feat: fix a small-ish nitpick where extensions would reload after login

this could potentially try to re-register all private extensions after each auth signal, which is being prevented anyway because of duplicate aliases, but still nice to remove and not have to listen to

* feat: align login UI extension load with backoffice, i.e. wait for external load before registering core extensions

* build(deps): bump @hey-api to newest and re-generate client

* chore: adds extra error logging

* feat: adds retry logic to the api interceptor

* feat: warn about incomplete actions

* fix: the body was already plain text, but we need to ensure the headers say so as well

* feat: warns the user when actions could not be completed

* build(deps): update @hey-api/client-fetch

* chore: generate new api

* feat: simplify error handling to just UmbApiError and UmbCancelError

* feat: moves error notifications from interceptors into tryExecute, so you more easily can opt out of it and everything is gathered in one place

* feat: recreate responses with correct 'status' and 'statusText'

* build: stop dotnet processes after debug session

* feat: extrapolate common logic into helper method to create responses

* feat: returns a UmbProblemDetails like object on interceptors to be handled by tryExecute

* chore: deprecates duplicate, outdated UmbProblemDetails interface and type guard

* feat: uses the 'title' of the problem details object to convey the main message

* chore: 401 and 403 uses their own interceptors

* feat: show no notification if 401

* feat: uses the real request method and url (instead of the template placeholders) to tell the user what did not succeed

* feat: retry requests with no timeout/race

* feat: throttle and delay signals and disallow them from being updated from the outside

* chore: adds more logging to timeouts

* chore: optimise imports

* test: ignores any test files left in node_modules folder

* feat: uses auditTime to wait a bit before showing the timeout screen

* feat: adds 404 handling to error interceptor

* chore: cleans up after response modification

* feat: preserve only a few headers

this mimicks the v15 behavior

* feat: lets the UI handle 404 errors instead of notifying directly

* test: uses create action menu option instead to find the correct locator, and skips a seemingly unnecessary timeout
2025-06-12 12:24:11 +01:00
e89e18f5ba V16: Item and Detail Base Repository should use correct typings for return types (#19447)
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors

* fix: remove conditional instances - they should be able to be undefined

* fix: check for missing store and extract UmbProblemDetails

* fix: only append data if no error

* fix: adds error handling to missing stores and to extract the ProblemDetails object

* revert commit

* fix: ignore errors completely instead of unsetting stores

* revert commit

* chore: cleanup imports

* fix: do not unset store

* stop observation in a proper way

* stop observation of for document-user-permissions

* check for manager twice

* save action

* save action optional

* fix: ensure the right types are used for base stores

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-06-12 11:59:11 +01:00
Andy Butland cfcb708d26 Merge branch 'release/16.0' and enable package validation 2025-06-12 08:18:13 +02:00
Laura NetoandGitHub 9a96ebf812 Replace keys in Rich Text Editor blocks on clone operations (#19526)
* Regenerate keys in RTE blocks on clone operations

This was already present for BlockList and BlockGrid, but not Blocks in RTE.

* Small adjustment from code review
2025-06-12 07:03:49 +02:00
Jacob OvergaardandGitHub 9812630bb4 Prepare 16.0 release (#19523)
* Bump version to 16.0.0, update starter kit reference and enable package validation.

* Update version number in package.json.

* Re-disabled package validation (can't enable this yet).
2025-06-11 14:01:52 +02:00
Jacob OvergaardandGitHub 47bc2c2647 build(deps): bump @umbraco-ui/uui to 1.14.0 (#19524) 2025-06-11 13:57:41 +02:00
Andy Butland 1cf95be97d Re-disabled package validation (can't enable this yet). 2025-06-11 12:07:10 +02:00
Andy Butland 8396249a38 Update version number in package.json. 2025-06-11 11:56:33 +02:00
Andy Butland e231feb522 Bump version to 16.0.0, update starter kit reference and enable package validation. 2025-06-11 11:53:05 +02:00
Lee KelleherandGitHub 919b65ea19 Tiptap RTE: Style Menu action toggles (#19520)
* Tiptap style menu toggles (for classes and IDs)

Fixes #19244

* Tiptap style menu toggles (for font/color)

Fixes #19508

* Tiptap "Clear Formatting" remove classes and styles

* Tiptap font sizes, removes trailing semicolon

as the API handles the delimiter

* Tiptap global attrs: adds set/unset styles commands
2025-06-11 09:21:21 +02:00
Andy Butland 0c33a23c50 Bump version to 16.0.0-rc6. 2025-06-10 11:47:16 +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 ButlandandGitHub fe7f0558c1 Update template to reference latest LTS version (#19517)
Update template to reference latest LTS version.
2025-06-10 10:31:10 +02:00
Andy Butlandandmole ab600cb798 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>
(cherry picked from commit 8d2ff6f92a)
2025-06-10 10:29:17 +02:00
Andy Butland 024697f3bf Bumped version to 15.4.3 2025-06-10 10:28:55 +02:00
8d2ff6f92a 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:28:45 +02:00
Lee KelleherandGitHub 69224cb53c Tiptap RTE: Toolbar/statusbar config initial value state (#19514)
Tiptap configuration waits until initialized to set value

Fixes #19009
2025-06-10 08:54:33 +01:00
Andy ButlandandGitHub 3468177c0c Fix issues with removal of user logins on change to external login provider configuration (16) (#19512)
* Ensure to delete related tokens when removing logins for removed external login providers.
Ensure to avoid removing logins for members.

* Removed unnecessary <= check.
2025-06-10 08:22:02 +02:00
Andy Butland 89b2120c46 Obsoleted an unused constant ListViewMembers. 2025-06-06 13:49:52 +02:00
Andy ButlandandGitHub 6c769d6024 Adds attribute to ensure management API requests are never cached in the browser or via a CDN (#19496)
Adds attribute to ensure management API requests are never cached in the browser or via a CDN.
2025-06-06 10:41:13 +00:00
Andy Butland 67ab06715f Merge branch 'release/16.0' 2025-06-06 10:49:21 +02:00
Mads RasmussenandGitHub 82a063b1e2 Fix: V16 Variant breadcrumb wrong after creating a nested document (#19492)
fixes the breadcrumb after created a new nested document
2025-06-05 17:05:13 +01:00
Lee KelleherandGitHub 3ca09e7341 V16 Variant breadcrumbs: the parent entity-type and unique were being mixed up (#19491)
Variant breadcrumbs: the parent entity-type and unique were being mixed up
2025-06-05 16:17:38 +02:00
Jacob Overgaard b3ac82baf8 Merge branch 'release/16.0' 2025-06-05 15:44:23 +02:00
Niels LyngsøandGitHub 7f51e1ad1b Manifest Viewer to support number and boolean (#19478)
support number and boolean
2025-06-05 13:39:16 +00:00
Andreas ZerbstandGitHub c7dcbfec60 V16 QA Publish Console Error Logs (#19417)
* Updated configuration

* Updated pipeline

* Updated nightly pipeline

* Bumped version

* updated if statement
2025-06-05 11:43:00 +00:00
Andreas ZerbstandGitHub 3f57da5579 V16 QA updated notification acceptance tests (#19469)
* Updated block grid tests

* Updated notifications in tests

* Updated tests

* Added testIdAttribute

* Bumped version of testHelpers

* Added waits after creation

* Updated more tests related to notifications

* Bumped version

* Cleaned up

* updated tests

* Bumped version

* Updated tests

* bumped version
2025-06-05 09:13:16 +00:00
Jacob Overgaard 8e71305605 fix: promotes @hey-api/client-fetch from devDependencies to dependencies 2025-06-05 09:53:46 +02:00
Karl-Johan SjögrenandGitHub ce2756f399 Fixed JSDoc comment for ManifestBase.weight (#19488) 2025-06-05 09:45:14 +02:00
Jacob Overgaard 6cfba9b406 Merge branch 'release/16.0' 2025-06-04 10:01:45 +02:00
Mads RasmussenandGitHub 02f963d65c Fixes the UmbSubmittableTreeEntityWorkspaceContext token discriminator (#19475)
use correct property name in discriminator
2025-06-04 08:30:40 +01:00
8a22f243f8 V16: Localization extensions load unordered (#19474)
* chore: export useful rxjs functions

* fix: use switchMap to ensure correct loading of localization extensions

also added filter() and distinctUntilChanged() to ensure the logic is not run more often than what is needed

* test: adds tests for async localization extensions and weights

* chore: apply simpler sorting syntax

* chore: adds catchError to ensure the whole stream is not stopped because of an error

* chore: lowest weight should win

* chore: move catchError so it catches everything

* chore: returns an observable to not break the stream

* chore: reverse weight as the previous was correct

* chore: adds a true comparer function that is more efficient

* Import order sorting

* Export order sorting

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-06-03 16:40:28 +00:00
Lee KelleherandGitHub f70d1c07c1 V16-RC Tiptap style fixes (#19473)
* Fixes search filter text alignment

* Let `styleMenu` kind display as a menu

* Collapse excessive whitespace in RTE

* Ensures the RTE Capabilities are in 3 columns

* Dimensions UI fixes
2025-06-03 17:14:08 +02:00
dependabot[bot]andJacob Overgaard 29b98ba862 Bump tar-fs from 3.0.8 to 3.0.9 in /src/Umbraco.Web.UI.Client
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.0.9.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 13:41:10 +02:00
971ca17b5f Add unit test verifying dockerfile aligns with current target framework (#19445)
* Add unit test verifying dockerfile aligns with current target framework.

* 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-03 12:53:37 +02:00
Niels LyngsøandGitHub 9ab17e6299 hotfix: close modals when url changes drastically (#19466)
* close modals when router disconnectes

* correct comment

* reorder code
2025-06-03 09:14:09 +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
Andy ButlandandGitHub 50f60249ba Merge commit from fork 2025-06-03 05:21:11 +02:00
Lee KelleherandGitHub a8080d0cf4 V16 Ensures backwards compatibility of deprecated UMB_CONTENT_PROPERTY_CONTEXT (#19465)
* Ensures backwards compatibility of `UMB_CONTENT_PROPERTY_CONTEXT`

* Updates usage of deprecated `UMB_CONTENT_PROPERTY_CONTEXT` to `UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT`
2025-06-02 17:14:54 +00:00
Jacob OvergaardandGitHub e19eb66226 V16-RC: Login screen cannot load public manifests (#19453)
* chore: disable notifications for global manifest loads

* fix: registers required contexts to load public manifests

* fix: specifically for localizations, load with the same cultures and weights as the backoffice itself does

* fix: set weight to +100 to make sure custom localization extensions are loaded first

* fix: remove 'welcome' fallback to avoid a flash of unlocalized content (FO"U"C)

* fix: starting <li> tag
2025-06-02 16:07:18 +00:00
Niels LyngsøandGitHub c3f62f1506 set manifest on property editor uis (#19461) 2025-06-02 13:53:09 +00:00
Sven GeusensandGitHub d2a0cba933 V16 cherry pick of member partial cache invalidator see #19314 (#19459)
* v16 cherry pick of member partial cache invalidator see #19314

# Resolved merge conflic in src/Umbraco.Core/Cache/Refreshers/Implement/MemberCacheRefresher.cs

* Take nullmember cacheitems into account
2025-06-02 14:52:38 +02:00
Niels LyngsøandGitHub 66da4a7775 Fit: filter input styling (#19460)
do not change display for the uui-input but set a width
2025-06-02 11:49:00 +00:00
11c6ea903e Removed encoding of request to retrieve files and folders by path, to avoid double encoding via the typed client (#19457)
* Removed encoding of request to retrieve files and folders by path, to avoid double encoding via the typed client.

* fix: adjusts log viewer to encode only once and remove empty properties

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-06-02 10:42:32 +00:00
Nhu DinhandGitHub 5a56541aa5 V16 Added acceptance tests for document property value permission (#19385)
* Updated due to test helper changes

* Updated user group tests due to api helper changes

* Updated tests for user group default configuration due to UI changes

* Added tests for document property value permission

* Added tests for document property value permission in content with block

* Bumped version

* Make specific tests run in the pipeline

* Added skip tag and issue link for the failing tests

* Fixed comment

* Bumped version

* Fixed comments

* Bumped version and reverted npm command
2025-06-02 16:21:09 +07:00
Markus Johanssonandleekelleher ebe93fbbac Tiptap cannot set the top position of the toolbar (#19087)
* Fixes #19086 by making top position a variable

* #19086 Added JSDoc for cssprops

(cherry picked from commit 12049e9c03)
2025-06-02 08:08:06 +01:00
Jacob Overgaard 93873c378e Merge branch 'release/16.0' 2025-05-30 15:44:22 +02:00
Richard OckerbyandJacob Overgaard d86064e1e5 Update references to Umbraco User model (Extension Template) (#19349)
Update references to Umbraco User model

In the template dashboard, update the type reference for the umbraco user
2025-05-30 14:35:33 +02:00
Jacob OvergaardandGitHub 08400b67e6 build(deps): bump @umbraco-ui/uui from 1.14.0-rc.3 to 1.14.0-rc.4 (#19452)
* build(deps): bump @umbraco-ui/uui from 1.14.0-rc.3 to 1.14.0-rc.4

* build(deps-dev): bump internal backoffice asset from rc3 to rc4
2025-05-30 12:33:10 +00:00
Richard OckerbyandGitHub ba6a0fcfe0 Update references to Umbraco User model (Extension Template) (#19349)
Update references to Umbraco User model

In the template dashboard, update the type reference for the umbraco user
2025-05-30 14:31:17 +02:00
Laura NetoandAndy Butland 8daf7d22a7 Use the proper umb-input-date events in the log viewer date range element (#19451)
Fixes #19382 by using proper umb-input-date events

The log viewer date range input was changed from using `input` to `umb-input-date`, but the event handlers weren't updated accordingly.
2025-05-30 13:53:22 +02:00
Laura NetoandGitHub b403518986 Use the proper umb-input-date events in the log viewer date range element (#19451)
Fixes #19382 by using proper umb-input-date events

The log viewer date range input was changed from using `input` to `umb-input-date`, but the event handlers weren't updated accordingly.
2025-05-30 10:44:52 +00:00
Andy ButlandandCopilot fd3808ae38 Ensure tag operations are case insensitive on insert across database types (#19439)
* Ensure tag operations are case insensitve on insert across database types.

* Ensure tags provided in a single property are case insensitively distinct when saving the tags and relationships.

* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs

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

* Handle case sensitivity on insert with tag groups too.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-30 10:00:25 +02:00
Laura NetoandGitHub c4be7842a7 Sort available composition folders (#19373)
* Sort available composition folders

* Optimizations
2025-05-29 09:08:55 +02:00
Andy Butland 1726180b06 Merge branch 'release/16.0'
# Conflicts:
#	version.json
2025-05-29 07:59:05 +02:00
Andy Butland 3b84fe3557 Merge remote-tracking branch 'origin/v15/dev' into v16/task/merge-from-15
# Conflicts:
#	src/Umbraco.Core/PublishedCache/IPublishedCache.cs
2025-05-29 07:57:00 +02:00
Andy Butland 8dc9ec477d Bumped version to 16.0.0-rc5. 2025-05-29 07:51:18 +02:00
Jacob Overgaard d76293bacc Merge remote-tracking branch 'origin/release/16.0' 2025-05-28 17:07:59 +02:00
595e4ede69 V16 RC: Documents show "Not found" when switching between variant and invariant views, and other edge cases (#19425)
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors

* fix: remove conditional instances - they should be able to be undefined

* fix: check for missing store and extract UmbProblemDetails

* fix: only append data if no error

* fix: adds error handling to missing stores and to extract the ProblemDetails object

* revert commit

* fix: ignore errors completely instead of unsetting stores

* revert commit

* chore: cleanup imports

* fix: do not unset store

* stop observation in a proper way

* stop observation of for document-user-permissions

* check for manager twice

* save action

* save action optional

* simplify init for detail repostiory

* fix routes

* adjusting more not found routes

* fix structure manager clean up

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-28 17:06:37 +02:00
179caacf58 Throw if attempting to use the default unique media path scheme with version 7 GUIDs (#19419)
* Thow if attempting to use the default unique media path scheme with version 7 GUIDs.

* Expanded unittests, fixed null params, chose a better exception

* Use parameters in test.

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-05-28 12:49:36 +00:00
Jacob OvergaardandGitHub 434189ee47 V16: Upgrade Login dependencies to Umbraco 16 (#19433)
* build: updates login page to match Umbraco 16

* build(deps): bump heyapi to latest

* chore: simplify logic
2025-05-28 13:09:09 +01:00
b4d5c8fd51 input with alias and input range style corrections (#19441)
* fix alias input

* number range style fix + placeholder inconsistency fix

* build(deps): bump @umbraco-ui/uui to 1.14.0-rc.3

* fix property declaration

* Update src/Umbraco.Web.UI.Client/src/packages/core/components/input-number-range/input-number-range.element.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-28 09:58:57 +00:00
Laura NetoandGitHub 933fa544d7 Translations for pt (pt-PT) (#19435)
* Added translations for `pt-PT` based on the existing `en` file

* Removed translations from `pt-BR` that are the same in `pt` or not translated. Other small adjustments.

* Replace all `ligação` with `link`, as it is more commonly used

* Small typo fixes in pt-BR
2025-05-28 11:40:00 +02:00
b019f0f849 Do not set icon color if the item is selected (#19404)
* Do not set icon color if the item is selected

* Added helper method for icon version to render.

* Fixed naming of protected helper method.

* Move further logic into helper method.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-05-28 08:53:44 +00:00
Niels LyngsøandGitHub 7346a14d86 update next icon (#19424) 2025-05-27 14:54:07 +02:00
Niels LyngsøandGitHub da436f839f Block List, append missing animation keyframes (#19428)
append animation keyframes
2025-05-27 12:46:52 +02:00
Rowan BottemaandAndy Butland ecfaee3b04 Lock appropriate tree for media operations (#19422)
The MediaService currently locks the ContentTree for GetPagedOfType(s) operations, but it's querying the MediaTree. This ensures we lock the correct tree.
2025-05-27 06:59:21 +02:00
Niels Lyngsø 80183964bb Merge branch 'release/16.0' 2025-05-26 21:18:51 +02:00
Jacob Overgaard 5161a2d3b0 build(deps): bump @umbraco-ui/uui from 1.14.0-rc.1 to 1.14.0-rc.2 2025-05-26 17:14:14 +02:00
Jacob OvergaardandGitHub 25e7f1927c V16-RC: Not all types are exported from 'documents' (#19421)
fix: exports new types from documents/documents/url
2025-05-26 12:47:09 +00:00
5c7a25fdc7 Closing redirecting modals fix (#19420)
* correct for fewer rejected promises

* move set new is new

* enable router slot to back out of a redirect

* hacky fix for redirect controller

* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts

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

* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-26 14:39:39 +02:00
Jacob OvergaardandGitHub 290334baaa V16: Sub-dependencies from workspaces are missing in the main package.json file (#19416)
* fix: renames `./src` to `./dist-cms` in distributed package.json

* build: adds missing package.json to segment package

* build: adds missing package and vite.config for 'settings'

* build: adds missing package.json for 'translation'

* build: hoist all sub-dependencies to main package.json file

* build: sync lock file with workspaces

* build: join the paths (for os agnosticity)
2025-05-26 14:00:59 +02:00
Kenn JacobsenandGitHub 407e7a24da Fix rare concurrency issue in back-office auth middleware (#19418) 2025-05-26 12:25:04 +02:00
Jacob Overgaard 50172ce16a build(deps): bump @umbraco-ui/uui from 1.13.0 to 1.14.0-rc.1 2025-05-26 11:22:07 +02:00
Andy Butland aaad36aa69 Revert "Fixed issue with syntax highlighting in code editor (#19414)"
This reverts commit 3f3c9f8823.
2025-05-26 10:28:18 +02:00
Andy Butland 445652d7f4 Merge branch 'release/16.0'
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMultiURLPicker.spec.ts
#	version.json
2025-05-26 10:26:15 +02:00
3f3c9f8823 Fixed issue with syntax highlighting in code editor (#19414)
* Fixed issue with syntax highlighting in code editor.

* Update src/Umbraco.Web.UI.Client/src/packages/code-editor/property-editor/property-editor-ui-code-editor.element.ts

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

* Refactor introducing helper method.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-26 08:01:21 +00:00
95c6173b5c Ensure controller is still present (#19408)
* check controller is still present

* Update src/Umbraco.Web.UI.Client/src/libs/controller-api/controller-host.mixin.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-26 07:34:24 +00:00
f03a7d332b Introduce delay and expand path matching on Backoffice router for lazy-loaded routes (#19409)
* implement use of pathMatch: 'full' for empty redirects

* awaitStability feature for route redirects

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-26 09:25:17 +02:00
86bbdfe7d3 <umb-content-workspace-property> DX (#19399)
* introduce umb-content-workspace-property to improve dx

* make property responsible for observing the view guard

* Update src/Umbraco.Web.UI.Client/src/packages/content/content/global-components/content-workspace-property.element.ts

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

* context consumer update tests

* no need to import when exporting

* only observe aliases

* merge the two component for less complexity

* added property settings

* ensure this works with extension begin removed

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-26 09:11:39 +02:00
Niels LyngsøandGitHub 8d490783b5 Fix observe property string name (#19411) 2025-05-26 08:42:31 +02:00
Niels LyngsøandGitHub c2c4dc961c fix context api test (#19412)
context consumer update tests
2025-05-26 08:41:49 +02:00
Andy Butland 7f2a78f2fe Cleaned up constructors, regions and variables in NewDefaultUrlProvider (#19403)
Cleaned up constructors, regions and variables in NewDefaultUrlProvider.
2025-05-26 07:27:35 +02:00
Andy ButlandandGitHub 13e368ca28 Cleaned up constructors, regions and variables in NewDefaultUrlProvider (#19403)
Cleaned up constructors, regions and variables in NewDefaultUrlProvider.
2025-05-26 07:11:53 +02:00
Niels LyngsøandGitHub 366c1f9960 hotfix: correct dark theme color for variant selector (#19406)
use colors not palettes
2025-05-26 06:41:24 +02:00
Andy ButlandandGitHub ab25074711 References correct starter kit version for Umbraco 16 (#19392) 2025-05-23 16:17:31 +02:00
Andy Butland e6967a41cd Removes unnecessary newlines from rich text as JSON delivery API output (#19391)
* Removes unnecessary newlines from rich text as JSON delivery API output.

* Fix case from PR feedback.
# Conflicts:
#	src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextElementParser.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/RichTextParserTests.cs
2025-05-23 12:28:18 +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 b87ae6ce46 Fix issue with requests to delivery API by path where URL segment contains special characters (#19390) 2025-05-23 11:14:33 +02:00
Niels LyngsøandGitHub 0442b9e317 additional context name for 'content property context' (#19375)
rename to UmbPropertyTypeBasedPropertyContext
2025-05-22 21:12:19 +02:00
Andreas ZerbstandGitHub 3db0ec7efc V16 Updated nightly E2E pipeline to run correct test scripts (#19378)
* Set default to true, so we run the SQlite tests aswell

* Updated test commands to run correct tests

* Disabled Sqlite tests

* Skip flaky test
2025-05-22 11:24:46 +02:00
0f53ba8a18 fix: check for NullRepresentationInCache in AppCacheExtensions (#19350)
* fix: add appcache null check

* Moved constant into standard location.
Removed now unnecessary comment.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-05-22 08:45:30 +02:00
Niels LyngsøandGitHub 62cedeec13 V16/hotfix/ensure self destroy before clean up (#19367)
* move destroy to top

* clean up example

* use the unprovide method when disconnecting
2025-05-21 09:32:34 +00:00
Niels Lyngsø 45593c6311 Merge branch 'release/16.0'
# Conflicts:
#	version.json
2025-05-21 11:17:47 +02:00
Nikolaj Geisle 2b714d3022 bump version 2025-05-21 09:55:46 +02:00
Laura NetoandGitHub 225fed5f72 Handle user id 0 (Unknown/System) when building content version response (#19361)
Handle user id 0 (Unknown/System) when building content version response model

`IUserIdKeyResolver.GetAsync` throws an exception when a user is not found.
As user 0 does not really exist, the exception was being thrown.
We now handle this scenario to return an empty reference.
2025-05-20 17:01:03 +02:00
Andy Butland 419625a919 Optimize the member save as part of the member login process, by-passing locking and audit steps and handling only the expected update properties (#19308) 2025-05-20 15:58:27 +01:00
Mads RasmussenandGitHub ed8e9416db Fix filter when selecting elements for block types (#19369)
* fix filter

* remove console log
2025-05-20 14:29:29 +02:00
Niels LyngsøandGitHub f4515d7c2e V16/hotfix/set manifests when using create extension api (#19358)
* also set manifest when using createExtensionApi()

* set manifest when using createExtensionManifest
2025-05-20 12:17:38 +00:00
Andy Butland 853c1acf7e Bumped version to 15.4.2 2025-05-20 13:10:02 +01:00
Andreas ZerbstandGitHub b1e447d0c5 Merge pull request #19371 from umbraco/v16/merge-16-release-to-main
Merged from release/16.0 to main branch
2025-05-20 13:15:49 +02:00
Andreas Zerbst df11e438f4 Merge remote-tracking branch 'origin/release/16.0' into v16/merge-16-release-to-main
# Conflicts:
#	build/nightly-E2E-test-pipelines.yml
#	src/Umbraco.Web.UI.Client/eslint.config.js
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockGrid/VariantBlockGrid.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/BlockList/VariantBlockList.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentInfoTab.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithCheckboxList.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithDropdown.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithMediaPicker.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithRadiobox.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithTextarea.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithTextstring.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RedirectManagement.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/VariantTipTapBlocks.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Dictionary/Dictionary.spec.ts
#	version.json
2025-05-20 12:25:14 +02:00
Andreas ZerbstandGitHub e5d3927cb6 Merge pull request #19368 from umbraco/v16/merge-15-to-16-release
Merged v15 dev to release 16
2025-05-20 11:20:54 +02:00
7572ea350b Feature: Content Workspace Icon (#19292)
* add slot for icon

* expose icon data

* render icon

* load type for scaffold

* rename

* render icon for media

* add observable for content type icon

* request data in data source

* wire up document scaffolding

* remove unused

* export server data source

* render icon for member

* rename data source to align with other detail sources

* rename data source

* remove unused styling

* remove console log

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

* remove console log

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

* remove console log

* Update detail-repository-base.ts

* Update document-workspace-split-view.element.ts

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-20 11:12:19 +02:00
Karl-Johan SjögrenandGitHub ec6a38e052 Fix for invalid state in JsonBlockValueConverter when an unused layout has a nested array (#19363)
* Fix for invalid state in JsonBlockValueConverter when an unused layout has a nested array

* Improved comments as suggested by copilot review, also fixed code style miss

* Added check for malformed JSON with more closing array tokens then opening tokens
2025-05-20 10:07:50 +01:00
Andreas Zerbst 66c997a843 Skips test as there has been updates to notifications and we will need to refactor the test 2025-05-20 10:42:40 +02:00
Andreas Zerbst fc5f20745b Updated test as we do not have notifications for save/publish 2025-05-20 10:02:42 +02:00
Andreas Zerbst 6a032390c2 Merge remote-tracking branch 'origin/v15/dev' into v16/merge-15-to-16-release
# Conflicts:
#	Directory.Packages.props
#	build/nightly-E2E-test-pipelines.yml
#	src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/RichTextEditor/ContentWithTiptap.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Media/Media.spec.ts
#	version.json
2025-05-20 09:26:06 +02:00
Nhu DinhandGitHub ea8ec4e375 V16 QA Updated E2E nightly pipeline (#19355)
Disabled SQLite tests and made it run against the release/16.0 branch
2025-05-20 11:31:14 +07:00
Niels LyngsøandGitHub 2dd2329067 Resolve seen issue regarding destroyed validation context (#19359)
maybe messages has been destroyed so enable it to be undefined
2025-05-19 12:35:32 +00:00
57bec5192b Add culture awareness to the backoffice search APIs (#19322)
* Added culture parameter to search APIs and propagated it to the indexed entity search service

* Variant Culture aware search in Document and Media Pickers (#19336)

* generate types

* enable selection of entity-item-ref elements

* Update input-document.element.ts

* add culture to document search args

* pass culture param to search end point

* get variant context in document picker

* add variant context

* set culture in variant context when changing app language

* set variant context when swithing variant in a workspace

* Update content-detail-workspace-base.ts

* clean up

* remove from split view manager

* Update property-dataset-base-context.ts

* change name to fallbackCulture

* simplify

* get context instead of consuming

* make all methods async

* implement for media

* Update current-user-action.extension.ts

* allow null until we reach the server

* remove log

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* remove console.log

* add display culture

* opt-in inheritance

* set observe alias to observeAppCulture

* stop inheritance if specific cultures are set

* remove unused import

* include culture for document and media global search

* await value for get methods

* include orderCulture for document collections

* Update document-collection.context.ts

* Update document-collection.context.ts

* fix self import

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-05-19 11:59:06 +00:00
Niels LyngsøandGitHub afed7b08f8 await value for get methods (#19356) 2025-05-19 11:38:44 +00:00
Jacob OvergaardandGitHub 3d8707e536 V16 RC: HtmlImageSourceParser should not care for order of attributes (#19331)
* fix: split attribute regex into two to be able to ignore the order of attributes

* the regex should not care for the ending of the tag

* test: adds test cases to test order of attributes

* remove image sources using new regex

* adds more documentation

* adds test cases to test removal of source with and without parameters

* test for null value

* test: adds more cases for null and reversed parameters
2025-05-19 11:41:12 +01:00
930a29f3d5 Document URLs Data Resolver (#19316)
* remove padding

* add document urls data resolver

* use in url info app

* handle invariant cases

* do not render culture if all links have the same culture

* use if defined

* handle variant with no links

* Update types.ts

* fix lint errors

* get variant aware document data

* remove unused

* use media item repository

* temp remove check

* populate url

* add spacing to reference app

* reset the url when removing document or media

* add validator

* make url input required

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-05-19 12:36:40 +02:00
Niels LyngsøandGitHub dda69a1ead Hotfix: do not validate the invariant-variant entry when we vary by culture (#19326)
do not validate the variant entry when we vary by culture
2025-05-19 10:37:10 +01:00
Jacob OvergaardandGitHub 8f171564b7 V16 RC: File upload errors should be shown to the user (#19344)
fix: when a file upload error is encountered it should handle all messages coming from UmbApiError
2025-05-19 10:22:40 +01:00
Jacob OvergaardandGitHub 2c3af1b329 V16 RC: Add more debug info to System Information (#19343)
* feat: rearrange sysinfo and see if we can pull in the version from package.json directly

* fix: use correct id to select #codeblock
2025-05-19 10:17:46 +01:00
Andy ButlandandGitHub 343bb853fd Invalidate external login session on removal of provider (16) (#19289)
* Cherry-pick from 13 and adjust.

* Resolve circular dependency references and clear OpenIddict tokens on purging sessions associated with removed login providers.

* Removed out of date comment.

* Removed incorrect casing update for SQLite.
2025-05-19 11:00:15 +02: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
Mads RasmussenandGitHub 1fdeb4f251 Add explicit Global Search extension point (#19348)
* add global search extension

* render global search extension in search modal

* register document global search

* add media global search

* add data type global search

* add dictionary global search

* import manifests

* register document type global search

* add media type global search

* register member global search

* register member type global search

* register template global search

* export missing consts

* export missing consts

* export missing consts

* add conditions
2025-05-19 10:50:12 +02:00
Jacob Overgaard ceab77d911 fix: remove direct imports (they are already imported by the index barrel) 2025-05-16 14:18:15 +02:00
e959850a66 Introduce Variant Context (#19334)
* add variant context

* set culture in variant context when changing app language

* set variant context when swithing variant in a workspace

* Update content-detail-workspace-base.ts

* clean up

* remove from split view manager

* Update property-dataset-base-context.ts

* change name to fallbackCulture

* simplify

* make all methods async

* Update current-user-action.extension.ts

* remove culture and segment state

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-16 12:30:29 +02:00
e62e55d1c0 Media Picker Modal File Previews (#19335)
* Ordered `@property` setters/getters

* JSDocs + comments

* Removed unneeded CSS

* Markup code formatting

* Hides "Reset focal point" button

when focal point has default value

* Image Cropper field element: adds active state to crops

* Image Cropper Editor Field element: reduced the markup and styles

Removing duplications from inherited class

* Removed unused code from Image Cropper Focus Setter element

* Big refactor of Image Cropper Editor modal

to support File Upload Previews

* Added `<umb-file-upload-preview>`

to handle the logic of rendering the relevant `fileUploadPreview` extension.

* Refactored SVG File Upload Preview component

Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.

* Refactored General File Upload Preview component

Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.

* Refactored Image File Upload Preview component

Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.

* Refactored Audio and Video File Upload Preview component

To align code with the other file previews.

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

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-16 10:29:09 +00:00
28fc81756a Tiptap Media Picker: ImageSharp HMAC support (#19333)
* Tiptap Media Picker: Uses imaging repository

to get the resized URLs from the server.
This adds support for ImageSharp's HMAC security.

* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/toolbar/media-picker.tiptap-toolbar-api.ts

* feat: uses the actual configured image SIZE for both width and height as documented

this also deprecates the public maxWidth property

* feat: verifies that a resized image exists and use the size of that

* feat: transfer the image size calculation to the drag'n'drop uploader and ensures that imageSize() accounts for maxHeight as well

* docs: adds comment to explain why it calculates the image size

* test: adds cases for imageSize

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-16 10:17:49 +00:00
df56f1985b Fix Allow Edit Invariant config in split view (#19320)
* temp implementation

* pass correct property variant id

* check for dataset variantId

* pass dataset variant id

* more explicit unique

* pass dataset variant id

* pass correct property variant id

* rename variable

* use !

* re-fit tests with new argument

* update rule check

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-16 09:23:29 +02:00
AbdulazizandGitHub 76fcb4ade2 Change CONTRIBUTING.md to fit the new github style and also the branc… (#19246)
Change CONTRIBUTING.md to fit the new github style and also the branch to fork as there is no more contrib branch
2025-05-16 09:05:04 +02:00
c20b0ab3c9 Fix localiztion for buttons in pagination (#19006)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-05-15 22:31:28 +02:00
Jacob Overgaard 8bc3de10a2 chore: removes unused import to fix lint errors 2025-05-15 22:00:14 +02:00
Niels LyngsøandGitHub 5e212f7503 hotfix: remove current user action look and color (#19324)
remove option for color and look
2025-05-15 11:44:14 +02:00
mole 012959dc3e Bump version 2025-05-14 12:17:03 +02:00
Nhu DinhandGitHub 41bf741901 V16 QA Fixing the failing E2E tests (#19318)
* Updated nightly E2E pipeline

* Fixed failing E2E tests

* Skipped content tests wirh list view content due to an issue

* Updated tests due to UI changes

* Bumped version

* Added more waits
2025-05-14 16:10:03 +07:00
d239849cc5 Include property aliases in compatible composition check (#19277)
* add method to get all property aliases

* pass property aliases to composition modal

* put in a box + adjust spacing

* disable if doc type is not compatible for composing

* compare with what is used for composition

* add comment

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-14 10:47:43 +02:00
6fd6319b12 Ensures cultures set on content are correctly cased (#19290)
* Ensures cultures set on content are correctly cased and verifies with integration tests.

* Improved test comments.

* Move culture casing check into an extension method and use from content service.

* Deduplicated test code and added more test cases

* Only run invalid culture codes test on Windows

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-14 09:47:21 +02:00
Niels LyngsøandGitHub a84c114f54 hotfix: #19299 (#19315)
* make sure the unique follows the unique of the models type

* make sure the uniques are used to clean up

* omit #containers state for a more direct data flow

* ensure containers are refreshed correctly

* set ownerContentTypeUnique to undefined when clear
2025-05-14 09:29:55 +02:00
Andreas ZerbstandGitHub 2d5e34b49d V16 QA added a fix for a failing language test (#19311)
* Updated language helper to use data mark

* Bumped version
2025-05-13 12:49:08 +00:00
Mads RasmussenandGitHub 8878bdacd3 Close dropdown after executed action workaround (#19305)
* close dropdown workaround

* Update dropdown.element.ts
2025-05-13 12:57:03 +02:00
54f50e0686 Allow segment access to editors with access to documents, not only settings (#19291)
* Allow segment access to editors with access to documents, not only settings.

* Update src/Umbraco.Cms.Api.Management/Controllers/Segment/SegmentControllerBase.cs

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

* Cleaned up usings

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-13 10:33:34 +00:00
f784f62303 Deprecate AuditService.Write() method (#19306)
* Deprecate the AuditService.Write() method

It will be moved to a new service with the rework of the AuditService, as it relates to a different repository (umbracoLog vs umbracoAudit).

* Update obsolete message to reference V18

* Apply suggestions from code review

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

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-13 09:58:34 +00:00
Jacob Overgaard 81ae9f41e8 fix: turns off autocomplete for the main entity name field 2025-05-13 10:47:55 +02:00
Andy ButlandandGitHub b0f3009c49 Authorize copy and move destination for the create granular permission (#19303) 2025-05-13 10:00:17 +02:00
Laura NetoandGitHub b42888dffa Cannot view audit logs when they contain entries with user id 0 (#19263) 2025-05-12 12:31:16 +02:00
Andreas ZerbstandGitHub b13eb8aaf8 V15 Added second level block acceptance tests (#19264) 2025-05-12 09:23:55 +00:00
Jacob Overgaard 2b00f15d1a build: prevents public releases that matches the main branch 2025-05-12 10:33:41 +02:00
23df7f1ddc Allow selection of unpublished documents in link picker and align display of URLs (#19296)
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-05-12 07:47:22 +00:00
Mads RasmussenandGitHub 3493d9fbc4 align label with other create options (#19210) 2025-05-09 10:41:29 +00:00
Niels LyngsøandGitHub 0e73c5472a implement label for entity actions bundle (#19242) 2025-05-09 10:00:45 +00:00
Sven GeusensandGitHub 49715d6f36 Forward port of #19045 (Added custom RichTextRegexValidator to validate markup instead of JSON) (#19280) 2025-05-09 11:17:00 +02:00
f772c26e6e Improve active state check for menu and tree item (#19281)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-09 09:11:39 +00:00
1fc8b4ff7f Allow configuring collection no-items text via manifest or attribute (#19284)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-09 09:05:58 +00:00
a8f58d8f75 Simplify descriptions, labels and notification messages for publishing (#19267)
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-05-09 08:52:02 +00:00
3a39728803 hotfix: #19230 (#19285)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-09 10:23:19 +02:00
Mads RasmussenandGitHub f7bee379d7 Enforce: allowEditInvariantFromNonDefault configuration in the Backoffice UI (#19265) 2025-05-09 10:20:10 +02:00
Nhu DinhandGitHub 5d9d94a0e8 V16 QA Added acceptance tests for publishing with descendants (#19262) 2025-05-09 07:27:02 +00:00
Niels LyngsøandGitHub 713d5eff5e setup context tokens to support menu structure workspace (#19172) 2025-05-09 09:25:39 +02:00
a463c99e4c Feature: ability to drag across tabs (#19183)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-05-08 17:24:45 +02:00
Andy ButlandandGitHub 367a13b0e7 Correct the display of pending package migrations (#19276) 2025-05-08 16:14:26 +02:00
Niels LyngsøandGitHub e9a5dafc62 Fix #19221 (#19254) 2025-05-08 09:27:59 +00:00
Mads RasmussenandGitHub 822cfe9c28 Batch item rest requests (#19233) 2025-05-08 11:17:57 +02:00
Andreas ZerbstandGitHub 275478066e V15 QA complex block grid test (#18347) 2025-05-08 11:12:37 +02:00
Niels LyngsøandGitHub a5d32336fc Fix: Ensure minimum height for Block List Custom Views (#18398) (#19253) 2025-05-08 11:04:03 +02:00
Lee KelleherandGitHub 712cbe84c1 Member Type Root Collection View / Workspace (#19271) 2025-05-08 10:22:10 +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
Mads RasmussenandJacob Overgaard d1f0437daf Update eslint.config.js 2025-05-08 08:36:57 +02:00
Nikolaj Geisle a31923c1e2 Merge branch 'release/16.0'
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
2025-05-07 18:24:26 +02:00
Lee KelleherandGitHub 2c58c701ed V16: Localization refinements (#19258) 2025-05-07 14:25:25 +00:00
Jacob Overgaard f42328e46f trigger the nightly builds on the main branch 2025-05-07 12:02:31 +02:00
6de255f667 Saveable workspace interface + token (#19220)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-05-07 08:20:05 +00:00
Nhu DinhandGitHub 4d7641be97 V16 QA Updated the nightly test pipeline to run against the main branch (#19261) 2025-05-07 10:09:28 +02:00
Andy ButlandandGitHub 744ff61fb0 Handle null for retrieval of content section in unit tests (#19260) 2025-05-07 07:18:18 +00:00
Andy ButlandandGitHub 22e0720395 Log language ISO codes instead of language names (#19259) 2025-05-07 08:42:39 +02:00
AbdulazizandGitHub 89cd13df8f V16: Block selector is limited to 100 blocks (#19240) 2025-05-06 14:12:49 +02:00
AbdulazizandGitHub e55ff3e5b7 V16: Main language dropdown does not scroll (#19237) 2025-05-06 14:10:59 +02:00
2297404041 Normalize webhook payloads (#19110)
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-06 14:02:49 +02:00
41ca028023 Normalize webhook payloads (#19110)
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-05-06 14:01:11 +02:00
Andy ButlandandGitHub 0d080bdbf6 Hide the content files that come from the Microsoft.CodeAnalysis.Workspaces.Common package in the web.ui project (#19239) 2025-05-06 09:42:09 +00:00
dependabot[bot]andJacob Overgaard cdadd6c29d Bump vite from 6.2.6 to 6.3.5 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.5.
- [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.3.5/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-06 10:34:38 +02:00
Jacob OvergaardandGitHub 95bfee7c63 V16 RC: getOpenApiConfiguration().token does not work (#19217) 2025-05-06 08:43:10 +01: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
DitteKKoustrupandGitHub 489322adac Create Localization Contributing Documentation (#18412) 2025-05-05 15:46:37 +02:00
Jacob Overgaard 2d7037df4b docs: updates branch recommendation 2025-05-05 15:27:38 +02:00
Jacob Overgaard 44552ccf75 build(dev): update all github workflows with new default branch name 2025-05-05 15:26:51 +02:00
Kenn JacobsenandGitHub 6518a261f0 Revert #16058 for non-applicable settings (#19229) 2025-05-05 15:06:18 +02:00
dependabot[bot]andJacob Overgaard 6f4a8a2041 Bump vite from 6.3.2 to 6.3.5 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.3.2 to 6.3.5.
- [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.3.5/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 15:02:06 +02:00
Jacob Overgaard b2e80865b8 Merge branch 'v16/dev' into contrib 2025-05-05 14:16:22 +02:00
Jacob Overgaard 641e549bae build: bump version to 16.1.0-rc 2025-05-05 14:15:40 +02:00
Jacob Overgaard 4dd7ce1a73 Merge branch 'release/16.0' into v16/dev 2025-05-05 14:14:49 +02:00
Sebastiaan Janssen 358ab7b205 Merge branch 'v16/dev' into contrib 2025-05-05 14:12:22 +02:00
Sebastiaan Janssen 7e647c6b38 Merge branch 'contrib' of https://github.com/umbraco/Umbraco-CMS into contrib
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Login/package-lock.json
2025-05-05 14:11:45 +02:00
6ce4fbfc0c V16 QA Fixed nightly test pipeline (#19226)
* Use Windows instead

* Updated the build stage to align with the azure pipelines yml

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-05-05 10:13:50 +00:00
Andy Butland a0873f0860 Restored interface methods on obsolete IBackgroundTaskQueue (#19223)
* Restore interface methods on obsolete IBackgroundTaskQueue.

* Fixed typos in comment.
2025-05-05 10:37:33 +02:00
Andy Butland f39094fcea Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	Directory.Packages.props
2025-05-05 10:36:43 +02:00
Andy Butland 1b19ca7cdb Merge branch 'release/15.4.1' into v15/dev
# Conflicts:
#	version.json
2025-05-05 10:31:48 +02:00
Markus JohanssonandGitHub 12049e9c03 Tiptap cannot set the top position of the toolbar (#19087)
* Fixes #19086 by making top position a variable

* #19086 Added JSDoc for cssprops
2025-05-05 07:55:52 +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
d83e9f736d Changed the Image crop UI component to fit the new Backoffice UI design (#19204)
* Changed the Image crop UI component to fit the new Backoffice UI

* style adjustments

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-02 06:49:25 +00:00
dependabot[bot]andJacob Overgaard 1c1035e1ea Bump vite from 6.2.6 to 6.3.4 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.4.
- [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.3.4/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 08:34:23 +02:00
Niels LyngsøandGitHub 8a98f6034c write message when no blocks available (#19198) 2025-05-02 08:31:10 +02:00
dependabot[bot]andJacob Overgaard 03523ad90b Bump vite from 6.2.6 to 6.3.4 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.6 to 6.3.4.
- [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.3.4/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-02 08:30:42 +02:00
45c4f251fa V16 login photo (#19212)
* remove curves

* new photo

* Revert "remove curves"

This reverts commit f691d1762f.

* re-introduce curves

* fix the edge of the lines

* fix edge of lines

* use color-background for alignment with login screen

* chore: replace login image in mocks

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-05-02 08:19:25 +02:00
Nathaniel NunesandGitHub abf068934d add overflow:visible to allow the workspace action menu to be highlighted (#18391)
* add overflow:visible to allow the workspace action menu to be highlighted when tabbed into
2025-05-02 01:16:27 +02:00
Mads RasmussenandGitHub ace167f0c8 Fix filter logic (#19215)
* update filter logic

* Update input-document-type.element.ts
2025-05-01 20:59:19 +00:00
Mads RasmussenandGitHub a201bbd064 Preview segment (#19203)
* add new manifest

* wip element

* add segment to preview context

* add segment icon

* open preview route on the same server

* Update preview.context.ts

* clean up

* pass culture and segment to preview window
2025-05-01 22:21:02 +02:00
Niels Lyngsø 057fd05635 Merge branch 'release/16.0' into v16/dev
# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2025-05-01 22:13:01 +02:00
Niels Lyngsø dc4355cbe2 use FormControl value property 2025-05-01 20:59:06 +02:00
04a10c2e8d Reposition workspace entity actions (#19199)
* add border to description

* reposition menu

* reposition menu

* try and fix e2e tests

* add data-mark

* use correct function

* bump helpers

* style correction

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-01 14:44:47 +00:00
+2 60457456f9 Block Type Configuration: filter search to only include element types (#19201)
* Incorrect forum and security urls when raising issue (#19080)

* Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124)

* 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

* readme shield for forum

* Allow deselection of color picker property. (#19174)

* 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

* 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.

* filter search to only include element types

* V16 QA update failing nightly tests (#19190)

* Fixed tests

* More updates for tests

* Bumped version of testhelpers

* Fixed notifications in tests

* Last fixes

* Revert "Merge branch 'v16/dev' into v16/hotfix/filter-element-type-search-for-block-types"

This reverts commit 7b8b5c28da, reversing
changes made to 6d4ddb7077.

* disable not pickable search results

* correct use of pickable filter

---------

Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>
Co-authored-by: Warren Buckley <warren@hackmakedo.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Lotte Pitcher <github@lottepitcher.co.uk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-05-01 13:17:49 +00: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 479ea0c77d Further dependency upgrades (#19202)
* Updates dependencies on Umbraco.Code and Microsoft.CodeAnalysis.*.

* Avoids dependency warnings on build of Web.UI project.

* Bumped version to 16.0-rc2.
2025-04-30 14:10:42 +02:00
mole 65d3ace566 Bump version to rc2 2025-04-30 11:13:23 +02:00
mole 8e5f3c1cdf Merge remote-tracking branch 'origin/release/16.0' into v16/dev 2025-04-30 11:12:35 +02:00
Andreas ZerbstandGitHub acdaee6ad8 V16 QA update failing nightly tests (#19190)
* Fixed tests

* More updates for tests

* Bumped version of testhelpers

* Fixed notifications in tests

* Last fixes
2025-04-30 08:39:08 +00:00
Mads RasmussenandGitHub 2feef9c5b7 Ensure picker search config query params are always included in the server request (#19194)
* ensure picker search config query params are always included

* fix type error
2025-04-30 09:58:17 +02:00
Andy ButlandandGitHub 38f6e2b0da Updates Examine to latest patch release. (#19193) 2025-04-30 09:57:55 +02:00
Andy Butland 0a7d00182b 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:11:53 +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 63090a1df8 Merge branch 'release/15.4' into release/16.0 2025-04-29 16:01:06 +02:00
Jacob Overgaard f7a2569506 Merge branch 'v15/dev' into v16/dev 2025-04-29 15:53:57 +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
30f0b2a1a9 Open entity actions menu as pop up instead of modal (#19185)
* Open entity actions menu as pop up instead of modal

* Update entity-actions-bundle.element.ts

* Update entity-actions-bundle.element.ts

* ensure no indent for the menu items of the entity actions menu

* add scroll container

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-29 15:18:16 +02: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 9e481f3e4f 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:07:12 +02:00
Jacob Overgaard 581798f097 Merge branch 'v15/dev' into v16/dev 2025-04-29 13:06:49 +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
Kenn JacobsenandGitHub ae54b92005 Output culture variant update dates from the Delivery API (#19180) 2025-04-29 07:01:07 +02:00
Andy Butland 758a9cf1ec Allow deselection of color picker property. (#19174) 2025-04-28 16:57:48 +02:00
Andy ButlandandGitHub 5469d9841b Allow deselection of color picker property. (#19174) 2025-04-28 15:50:03 +02:00
Mads RasmussenandGitHub 65caa60496 Add copy to clipboard success notification (#19179)
* add localization

* show notification

* Update clipboard.property-context.ts
2025-04-28 13:21:05 +00:00
Andy Butlandandkjac cdba470f2d 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 14:39:39 +02:00
Andy Butland 30a431f870 Merge branch 'release/15.4' into v15/dev 2025-04-28 14:37:26 +02:00
0ee9e81b01 V16: XHR requests do not report the underlying problem details object (#19160)
* fix: detects if a request contains a problemdetails object then maps that back to the UmbApiError

* feat: uses isProblemDetailsLike everywhere and avoids showing the user a big "detail" string

* feat: disables notifications for temp file upload to handle it manually in case of special server errors

* fix: use temporary file manager for dictionary to catch all errors

* fix: uses temporary file manager to upload avatars to handle all server errors

* feat: observe on allowed image types for user avatar

* Update src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts

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

* feat: located the status code 413 directly now that the management api supports it out-of-the-box

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-28 12:13:03 +00: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
93ec790c64 Add segments support for Publish entity action (#19178)
* fix: the publish action should use the publish modal

* feat: allows the publish modal to handle invariant data

* chore: rearrange the unpublish action & modal so they are one-for-one alike with publishing

* Updated acceptance tests - add steps to interact with publish modal

* Added tests for publish variant content

* Bumped version of test helper

* handle segment

* include segments in success notification

* include segments in success message

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-04-28 11:50:20 +00:00
Mads RasmussenandGitHub b760101a17 remove entity actions for new content (#19163) 2025-04-28 13:26:50 +02:00
59d30a7c77 V16: Show modal when publishing invariant content (#19159)
* fix: the publish action should use the publish modal

* feat: allows the publish modal to handle invariant data

* chore: rearrange the unpublish action & modal so they are one-for-one alike with publishing

* Updated acceptance tests - add steps to interact with publish modal

* Added tests for publish variant content

* Bumped version of test helper

* feat: adds text to indicate you are about to publish

---------

Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-04-28 11:05:41 +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
Mads RasmussenandGitHub bd921ca9e0 Remove success notification after file rename (#19149) 2025-04-28 08:39:06 +00:00
Kenn JacobsenandGitHub 012480f396 Output the correct error status code from the Management API (#19175) 2025-04-28 07:53:44 +00:00
Niels LyngsøandGitHub 5ff7205ed0 preset values for decimal and integer + securing that we can set a value of 0 (#19173) 2025-04-28 07:41:11 +00:00
Mads RasmussenandGitHub 6bda0b9d4d remove sort children success notification from repository (#19166) 2025-04-28 08:52:35 +02:00
Mads RasmussenandGitHub 2d32437779 Entity action error handling (#19171)
* handle errors

* handle error

* entity action error handling

* error handling

* fix
2025-04-28 08:51:26 +02:00
Kenn JacobsenandGitHub 462fd483e9 Include "Accept-Segment" in the "vary" header (#19167) 2025-04-28 06:42:11 +02:00
Kenn JacobsenandGitHub 4f883b6714 Make culture specific update dates work again (#19145) 2025-04-27 08:26:15 +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
9b81bf50ab Prevent input-document type search from returning element types when not allowed (#19155)
* prevent document type picker search from returning element types when not allowed

* rename + fix modal rejection

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-25 14:17:32 +00:00
Mads RasmussenandGitHub 35721cb663 Bring back error notification when trying to delete a folder with items (#19157)
* clean up

* throw real error from repo error

* only dispatch executed event if the action was successful
2025-04-25 14:59:35 +02:00
Niels LyngsøandGitHub 6ed969c64c do not re-set promise on clear (#19152) 2025-04-25 14:51:07 +02:00
Niels LyngsøandGitHub 3c27e856b2 use new element name (#19158) 2025-04-25 12:46:23 +00:00
mole 83e580c3a7 Fix nuget publish stage 2025-04-25 13:31:34 +02:00
mole 127c4a6482 Use windows instead 2025-04-25 12:36:44 +02:00
Mads RasmussenandGitHub 6db062cb7a Remove success notification after document type export (#19151) 2025-04-25 10:18:06 +00:00
Niels LyngsøandGitHub 0349dce9c4 Implement a Context Proxy (Fix Provide event handling across proxies) (#19141)
* use it self as host

* implement UmbContextProxy

* rename to UmbContextProxyController
2025-04-25 10:10:29 +00:00
Mads RasmussenandGitHub 3d0ebfd35c Prevent Culture and Hostnames modal close on error (#19133)
* only close modal if update is succesfull

* remove positive notification
2025-04-25 11:30:47 +02:00
mole c2447907ac Pin nuget publish stages to 22.04 2025-04-25 11:23:42 +02:00
mole e7a5a5623d Revert "Use DotnetCoreCLI instead of NuGetCommand"
This reverts commit 6b8a30c3ff.
2025-04-25 11:19:48 +02:00
Niels LyngsøandGitHub c8b2ae58e0 make repositories remember their store (#19148) 2025-04-25 08:57:54 +00:00
Niels LyngsøandGitHub 514a92bd35 Fix Document-Data-Resolver to avoid Promise Rejection Error (#19142)
* improve clean-up

* fix init of UmbDocumentItemDataResolver

* make properties private

* adjust fallback logic for more performant approach
2025-04-25 10:33:29 +02:00
mole 6b8a30c3ff Use DotnetCoreCLI instead of NuGetCommand 2025-04-25 09:57:17 +02:00
Andy ButlandandGitHub 85c4fe8214 Removed population of Urls on media response model and obsoleted property (#19130)
* Obsolete Urls property on MediaResponseModel and no longer populate.

* Updated OpenApi.json

* Update client-side types.

* Client updates to align document and media URL display.

* Fixed UI linting errors.

* Fixed UI linting errors (2).

* Fixed UI linting errors (3).

* Removed change to ClientOptions.
2025-04-25 05:16:56 +00:00
ba0dcfa773 Avoid hybrid cache usage when traversing unpublished ancestors in a published context (non preview) (#19137)
* Filter Available should not return items without published ancestors when not in preview

* Update unittests mocks

* Internal documentation and minor code tidy.

* Tidied up integration tests and added new tests for the added method.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-24 21:07:40 +02:00
mole ef9a6e1821 Merge remote-tracking branch 'origin/v15/dev' into v16/dev 2025-04-24 13:19:21 +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
Kenn JacobsenandGitHub 8caf4ae3e0 Retrofit ContentEditingBaseBuilder to match new create/update models (#19129) 2025-04-24 12:28:05 +02:00
Warren BuckleyandMads Rasmussen 97ded97fc7 Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124) 2025-04-24 12:26:58 +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
b48d989659 V16: Removes all generic Created, Saved, and Deleted notifications (#19119)
* feat: removes all generic Created, Saved, and Deleted notifications

* Comment out the notification checks in acceptance tests

* Bumped version of test helper

* Fixed publish with descendants tests

* Cleaned up

* Bumped version of test helper

---------

Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-04-24 11:50:49 +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
Jacob OvergaardandGitHub 1e99d6f609 V16: Adds texts for unpublish & publish with descendants (#19118)
* feat: adds new texts for 'unpublished' action

* chore(mock): adds missing endpoints for mock data

* feat: removes old, deprecated, and hardcoded messages for unpublish

* fix: publish actions should not fail just because the notification context might not be available

* feat: the unpublish actions should mimick the publish actions

* chore(mock): adds mock endpoints for 'publish with descendants'

* feat: moves 'publish with descendants' notifications to calling workspace

* feat: adds DK translations

* feat: adds different notification for unpublishing invariant content
2025-04-24 11:32:53 +02:00
Jacob OvergaardandGitHub b8c2a3366f V16: Bumps core dependencies openapi-ts and uuid to latest (#19127)
* removes `server-api-dev` script that acts weird with base urls after upgrade of client-fetch

* build(deps): updates client-fetch and uuid dependencies
2025-04-24 11:11:36 +02:00
6d330a30eb V16: Context Api can unprovide Contexts (#19113)
* make consume return undefined

* make consume return undefined

* a few more undefined context handlings

* unprovide context

* rename

* jsdocs

* refactor UmbContextBase to not use generic types

* reset target on disconnect

* posible undefined context

* callback with undefined when disconnected

* update comment

* correct types

* correct error handling

* do not throw an error when missing

* always return permitted to onChange callback

* fix not existing store

* fix resetting structure manager

* fix requestAuditLogs

* support gone context

* support context not begin present

* use UMB_ENTITY_WORKSPACE_CONTEXT for right typing

* correct type to use UMB_SUBMITTABLE_WORKSPACE_CONTEXT

* correct context consumption

* fix tests

* fix tests

* catch modal registration that has been destroyed

* catch

* handle context unprovide

* more clean up

* fix context consumption

* Update repository-details.manager.ts

* enable store to be undefined

* enable UmbRelationTypeDetailRepository store to be undefined

* remove log

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-04-24 08:57:02 +00:00
Jacob Overgaard 607207b13b chore: updates OpenApi.json 2025-04-24 10:34:49 +02:00
Kenn JacobsenandGitHub 1dd5fe3cbc Ensure the default segment is always included in API responses (#19126) 2025-04-24 09:46:30 +02:00
Niels LyngsøandGitHub 80bf2314c6 upgrade client dependencies (#19121)
* update npm

* run icon script

* generate server end-points
2025-04-24 08:52:26 +02:00
Niels LyngsøandGitHub 8342d4b94f minor styling adjustments (#19122) 2025-04-24 08:51:17 +02:00
Mads RasmussenandGitHub 60eaef5590 Fix UI creation and updating of Document Blueprints (#19123)
* fallback to save preselected variants

* Update content-detail-workspace-base.ts
2025-04-24 07:58:08 +02:00
Andy ButlandandGitHub 3dd32642e2 Updated server-side dependencies to latest versions for Umbraco 16 (#19117)
* Updated dependencies to latest versions.

* Fixed breaking changes following dependency updates.

* Limited NUnit updates to within the current major.

* Fixed failing delivery API contract integration test.
2025-04-23 20:05:41 +02:00
Mads RasmussenandGitHub 513f980e5c Split "Sort Children"-logic to remove "illegal" import from core to packages (#19105)
* wip sortChildrenOfContent kind

* export types

* add modal token + consts

* Update manifests.ts

* add content tree item model

* wip use umb-table element

* set as prop

* render sort icon

* prevent selection when sortable

* remove unused

* clean up

* reflect sortable prop

* start implementing sortChildrenOfContent

* render name and create date

* handle date ordering

* remove unused

* clean up

* fix grab and grabbing styling for sortable table rows

* render label when no children

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

* fix styling of load more

* only allow sorting when all items are loaded

* Update index.js
2025-04-23 15:12:48 +00:00
024a450377 Added integration tests for publishing service with invalid content (#19095)
* Added integration tests for publishing service with invalid content.

* Amend test to new create/update models

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-23 15:09:39 +00:00
Niels LyngsøandGitHub 9246ecbb08 reject init when document-type failed to load (#19092) 2025-04-23 14:21:30 +00:00
b330395db0 Content Type inheritance (#19034)
* content type nesting

* TODOs

* repository detail manager

* todo

* implement unlimited compositions

* a little refactor

* warn

* clear state

* refactor to use unique

* note

* code corrections to match with types

* unique type for Array State

* implement usedForInheritance and editedTypes for Structure Manager and Compositions

* rename method

* Update repository-details.manager.ts

* avoid type casting

* align naming

* do not await

* fix race condition when switching document types fast

* remove test prop

* Update manifests.ts

* UmbMediaTypeWorkspaceContext Routes for inheritance

* import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-04-23 15:05:32 +02:00
2cf28271cd Service refactoring to "fully" enable segments (#19114)
* Refactor serverside content editing to support all variance combinations

* Fix build errors

* Reintroduce the tests ignored by #19060

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-04-23 14:54:51 +02:00
53b94a8f57 Add async methods to IFileType (#19116)
* Add GetChecksumStreamAsync and GetLengthAsync

* Obsolete CanSetPhysical, Set and GetVirtualPath

* Updated obsolete messages to reference Umbraco 18

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-23 11:38:03 +00:00
bdb7baf946 Add report for bidirectional module imports (#19112)
* add report for bidirectional module imports

* remove duplicates

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-04-23 11:35:35 +00:00
b898eb6e03 Removed population of Urls on document response model and obsoleted property (#19030)
* Removed population of Urls on document response model and obsoleted property.

* Updated readme for acceptance tests to show how to run a single test.

* Removed URLs from document models on the client-side and fixed issue with link picker stil using legacy URLs response data.

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-23 10:58:38 +00:00
Niels LyngsøandGitHub 3187d99d23 Custom validator example take2 (#19093)
* declare type and constant

* implement for example

* commit example

* fix document data

* make rte blocks optional

* remove blocks from this mock data

* fix mock data for RTE

* comment and destroy method implementation

* set to 8

* update comments

* remove console.log

* host may be undefined

* prevent duplicate messages
2025-04-23 12:47:19 +02:00
Andy ButlandandGitHub 7c98af558d Allow for configuration of log file names (#19074)
* Added configuration for the log file name and format.

* Added unit test for LoggingConfiguration.

* Rely on configuration validation to verify supported log file format arguments.

* Fixed unit test failing on build pipeline.
2025-04-23 12:28:51 +02:00
Lee KelleherandGitHub 1bddcb8d39 Imports umb-app-logo (#19103)
for displaying the backoffice logo
2025-04-23 10:11:36 +00:00
Niels LyngsøandGitHub bb3b8b2255 Merge pull request #19060 from umbraco/v15/feature/select-segment
Feature: Segments
2025-04-23 10:55:05 +02:00
85b58f2015 Custom serialization for ValidationProblemDetails to allign paths in custom and mvc error messages (#19111)
* Rowrked #18771 with a more brute force solution

* Fixes class name. Adds unit test verifying behaviour.

* Corrected test name.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-23 10:17:18 +02:00
d568e981ab V16: Implement cache tags (#19101)
* Implement tags for content cache

* Implement tags for media cache

* Refactor to only use cache and media tags

* Remove from DI

* Cleanup

* Update Nuget packages

* Apply suggestions from code review

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

* Change description to be more precise

* Minor code tidy: indents, static methods where possible, made tags methods a little terser.

* Fixed according to review

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-23 10:08:08 +02:00
Niels LyngsøandGitHub 808e56beec Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-23 10:07:37 +02:00
Andreas Zerbst 85cba7e8cb Updated locator 2025-04-23 10:02:41 +02:00
Andreas Zerbst dcf601b44e Bumped version of testHelpers 2025-04-23 10:02:26 +02:00
Niels Lyngsø 4114342de2 add observe alias 2025-04-23 09:38:10 +02:00
Niels LyngsøandGitHub 5b76d3bc04 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-23 09:32:21 +02:00
Niels LyngsøandGitHub 18a8e3bde5 implement readonly mode for umb-property-editor-ui-document-type-picker (#19089) 2025-04-23 07:12:56 +00:00
Niels LyngsøandGitHub 8849647dcd declare type and constant (#19091) 2025-04-23 07:08:08 +00:00
fcddba5c73 Update version of MiniProfiler.AspNetCore.Mvc to align with MiniProfiler.Shared. (#19107)
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-04-23 07:59:51 +02:00
64f1e17479 Segment support for the Delivery API (#19082)
* Segment support for the Delivery API

* Do not apply empty strings as variance.

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-04-23 05:45:04 +00:00
Kenn JacobsenandGitHub 4a768b694e Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-23 07:12:07 +02:00
Sven GeusensandGitHub c42237ecfa Remove fake null checks as they are no longer needed after merge into v16 (#19109) 2025-04-23 07:09:00 +02:00
Mads Rasmussen b794392df8 Delete Segments.cs 2025-04-22 15:16:49 +02:00
Mads Rasmussen 09d1615e60 only show culture options when unpublishing 2025-04-22 15:06:07 +02:00
Mads Rasmussen 7d4d8c9a79 Update document-publishing.workspace-context.ts 2025-04-22 15:01:46 +02:00
Mads Rasmussen 78877bea57 correct variant selection in save modal 2025-04-22 14:44:16 +02:00
kjac 8ef061b768 Ignore failing tests for now (will be fixed in a follow-up PR) 2025-04-22 14:13:43 +02:00
kjac 3521549ff3 Fix build errors 2025-04-22 14:10:45 +02:00
Niels Lyngsø 39046c35af refactor to remove 2025-04-22 14:08:06 +02:00
Niels Lyngsø b4f26a8ffe style "open-split-view" 2025-04-22 14:01:43 +02:00
Mads Rasmussen bdabaa80d3 Update workspace-split-view-variant-selector.element.ts 2025-04-22 13:47:01 +02:00
Mads Rasmussen 1f63e7d41b Update workspace-split-view-variant-selector.element.ts 2025-04-22 13:45:14 +02:00
Niels Lyngsø 366e8d6809 html refactor + restyling 2025-04-22 13:38:22 +02:00
Mads Rasmussen bcafffdbf0 enforce allowNonExistingSegmentsCreation config 2025-04-22 13:31:20 +02:00
Mads Rasmussen f725ea8019 remove todo 2025-04-22 12:33:29 +02:00
Kenn JacobsenandGitHub 548970a27f Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-22 12:07:04 +02:00
Mads Rasmussen 6c6e1f7336 do not render toggle if there are no segment variant options 2025-04-22 11:22:03 +02:00
Andy Butland 1dc9f8540d Merge branch 'v16/dev' of https://github.com/umbraco/Umbraco-CMS into v16/dev 2025-04-22 10:01:05 +02:00
Andy Butland 6987515cbe Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	version.json
2025-04-22 09:52:59 +02:00
Andy Butland 8e87f2260c Bumped version in dev branch to 15.5.0-rc. 2025-04-22 09:52:10 +02:00
Mads Rasmussen 2fc5880d7d Update property-workspace-view-settings.element.ts 2025-04-22 09:47:26 +02:00
Andy Butland 927e4d8cad Merge branch 'release/15.4' into v15/dev 2025-04-22 09:45:15 +02:00
Niels LyngsøandGitHub fb39711571 give tiptap a invalid border color to fit with other inputs in invalid state (#19090) 2025-04-22 08:43:12 +01:00
Andy Butland 225f4d3e09 Merge remote-tracking branch 'origin/v15/dev' into v16/dev 2025-04-22 09:33:07 +02:00
Mads Rasmussen a290601e5e fix property shared labels in content type workspace 2025-04-22 09:30:58 +02:00
Lotte PitcherandGitHub cd71e5666a Incorrect forum and security urls when raising issue (#19080) 2025-04-22 06:51:08 +02:00
Niels Lyngsø 141a4a4678 Improve error 2025-04-21 20:24:58 +02:00
Niels Lyngsø 74a9b8aae7 JSDocs for Validation Context 2025-04-21 20:24:17 +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
Lee KelleherandGitHub f69f257d12 Refines umb-localize rendering (#19075) 2025-04-17 14:45:40 +02:00
b1795da0ee Adds searchResultItem element for Media items (#19058)
* Adds `searchResultItem` for Media

Includes "trashed" state tag

* Removes trailing whitespace from manifest name

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-17 07:57:19 +00:00
Lee KelleherandGitHub 38af101605 Adds search to Document Type picker (#19062)
* Loosens the guard for an empty `query`

* Adds search to Document Type picker

* Document Type Search Provider: adds support for querying element types

* Adds `pickerSearchResultItem` element for Document Types
2025-04-17 09:25:06 +02:00
Lee KelleherandGitHub aa89eed3aa V16: Chore: Search modal code sweep (#19061)
* Removes trailing whitespace from manifest names

* Refactored default `umb-search-result-item` element

- Reverted `elementName` constant
- Replaced fallback hashtag inline SVG with "icon-shape-hexagon"
- Added "extra" div (for UI consistency)
- Reworked CSS rules

* Search modal: replaced inline icons

* Search modal: refactored markup

* Search modal: removed font-size

for consistency with the rest of the backoffice.
2025-04-17 09:24:32 +02:00
Lee KelleherandGitHub bb41647d91 Dynamic Root: refactor to use UMB_ANCESTORS_ENTITY_CONTEXT (#19032) 2025-04-17 09:23:49 +02:00
235a951f31 Transparent Focal Point (#19047)
* make focal point transparent

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.ts

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

* remove background color

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-17 09:22:52 +02:00
Lee KelleherandGitHub 804995e59e Content Picker Search: Option to exclude trashed items (#19064)
* Document Picker: support for excluding trashed items

* Media Picker: support for excluding trashed items
2025-04-17 09:21:10 +02:00
Lee KelleherandGitHub 5544823b97 Adds searchResultItem for Document Type (#19059)
Includes "Element Type" tag.
2025-04-17 09:20:12 +02:00
Lee KelleherandGitHub b9cf156e5a Update community forum links (#19065)
* Help menu: fixes Our Umbraco link

* Changes forum link from Our Umbraco

to the new Community Forum website.

* Small fixes in the Log Viewer Message

* Help Menu: flattens structure

for tighter UI.

* Replaced hot-linked favicon images

with built-in icons.
Except for Microsoft Bing.

* Corrected "Search Umbraco Forum using Google" link
2025-04-17 09:17:25 +02:00
Lee KelleherandGitHub 2fcf1c7812 Adds trashed/draft state to document search result items (#19057)
* Corrected class name

* Reverted `elementName` constant

* Replaced `UmbAppLanguageContext` type usage

with `typeof UMB_APP_LANGUAGE_CONTEXT.TYPE`.

* Refactored `render` method

- "Trashed", adds tag + faded text + strike-through
- "Draft", adds tag + faded text
- Replaced fallback hashtag icon with "icon-document"
- Reworked CSS rules
2025-04-17 09:16:30 +02:00
Niels LyngsøandGitHub a9043a543e align validation with new fetch client (#19071) 2025-04-17 09:15:54 +02:00
Niels LyngsøandGitHub cd83cb2852 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-16 22:39:31 +02:00
Niels Lyngsø b2ab769edc change varying labels in Content Type Designer 2025-04-16 22:01:46 +02:00
Mads RasmussenandGitHub 59cad092ae Cleanup last known self imports (#19067)
* clean up self imports in workspace module

* clean up media type self imports

* fix self imports in property action module

* fix self imports in propety editor module

* Update index.js

* lower threshold
2025-04-16 19:33:25 +00:00
Niels Lyngsø 70bdabf9d6 clean up unused parts 2025-04-16 20:56:10 +02:00
Niels Lyngsø 3030006e4f correct error message 2025-04-16 20:48:32 +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
Niels LyngsøandGitHub 4561394283 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-16 18:05:26 +02:00
Mads Rasmussen 6038428f79 rename 2025-04-16 15:21:11 +02:00
Mads Rasmussen d52d3aa642 add todo 2025-04-16 15:18:07 +02:00
Mads Rasmussen 20d763f443 render toggle if segmentation is enabled in the config 2025-04-16 15:17:00 +02:00
Jacob Overgaard c63ed69ee2 Merge branch 'v15/dev' into v16/dev 2025-04-16 14:54:50 +02: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
Lee KelleherandGitHub 2b6f9fb9c4 V16: Chore: Deprecate getManifest() methods (#19056)
* Deprecates `getManifest()` methods

Resolution is to use the `.manifest` property instead.

* Revised the deprecation message to improve clarity
2025-04-16 14:35:50 +02:00
Lee KelleherandGitHub 0eac3952a6 Code sweep (#19055)
Markup and style tidy-up and consistency.
Import ordering.
2025-04-16 14:34:49 +02:00
Mads Rasmussen b87e8d90e4 remove unused code 2025-04-16 14:33:09 +02:00
Jacob Overgaard 889bd0b6e4 fix a bad merge 2025-04-16 14:07:42 +02:00
Mads Rasmussen 6033daff3b add label for shared cultures and segments 2025-04-16 13:44:10 +02:00
Lee KelleherandGitHub 4cec19625f Corrects UmbLocalizationController usage in coments/docs (#19052) 2025-04-16 13:15:25 +02:00
Mads Rasmussen cc25027e65 Update element-data-manager.ts 2025-04-16 12:31:32 +02:00
Mads Rasmussen f91c0568d1 temp remove 2025-04-16 12:31:24 +02:00
Mads Rasmussen d391cff254 move 2025-04-16 11:22:49 +02:00
Mads Rasmussen 63485bca15 Update content-data-manager.ts 2025-04-16 10:49:11 +02:00
Mads Rasmussen 64915eea92 Update content-detail-workspace-base.ts 2025-04-16 10:49:05 +02:00
Mads Rasmussen fbdf69e680 Update content-data-manager.ts 2025-04-16 10:25:56 +02:00
Mads Rasmussen 13109d7342 use new tryExecute 2025-04-16 09:39:23 +02:00
Mads Rasmussen e988c5a450 move fields to variant interface 2025-04-16 09:33:40 +02:00
Mads Rasmussen eddf06e773 Merge branch 'v16/dev' into v15/feature/select-segment 2025-04-16 09:29:28 +02:00
761c76143d Make the entity search service async (#19048)
* Make the entity search service async

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

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-15 14:20:31 +00:00
Kenn JacobsenandGitHub 96c0509719 Content search abstractions to facilitate new search in the backoffice (#19046) 2025-04-15 16:18:42 +02:00
Mads RasmussenandGitHub fcc8e2fe3a Chore: Temp solution to remove user circular imports (#19021)
* remove user and document/media circular imports

* fix code order

* change MAX_CIRCULAR_DEPENDENCIES

* remove all comments from content before checking for imports

* fix self import

* fix self imports
2025-04-15 13:18:14 +00:00
Jacob Overgaard dab3975d2e Merge branch 'v15/dev' into v16/dev 2025-04-15 14:47:51 +02: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
Mads RasmussenandGitHub 3cd3abe5c8 Fix document module self import (#19035)
* fix document self import

* lower SELF_IMPORTS_THRESHOLD

* Update index.js

* Update index.js
2025-04-15 10:46:33 +00:00
Jacob Overgaard 6edffd9f08 docs: fix import path 2025-04-15 12:23:37 +02:00
Mads RasmussenandGitHub e6ab1d9a6b Move + Rename input-collection-configuration element to input-content-type-collection-configuration (#19041)
* move to content-type module

* make name more explicit

* add total to text

* update threshold

* remove completed todo
2025-04-15 09:27:06 +00:00
Mads RasmussenandGitHub 37e25c3b2b fix for member and member type (#19037) 2025-04-15 10:48:19 +02:00
Mads RasmussenandGitHub bfa9cab1cf Update theme.context.ts (#19036) 2025-04-15 10:47:58 +02:00
4087f3fab7 V16: Split media handling from UmbDropzoneManager (#19031)
* move media handling into separate class

* override manager + remove deprecated code

* remove export

* fix order

* fix export of consts

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/dropzone/media-dropzone.manager.ts

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

* fix imports

* fix wrong dropzone manager instance

* remove unused

* remove unused

* lower MAX_CIRCULAR_DEPENDENCIES

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-15 09:52:05 +02:00
Jacob Overgaard e9b0486988 Merge branch 'v15/dev' into v16/dev 2025-04-15 09:43:56 +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
Mads RasmussenandGitHub 906285120e Dont check for imports in comments (#19026)
* remove all comments from content before checking for imports

* lower treshold
2025-04-14 18:50:20 +00: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
797db55f73 Content client package (#18978)
* scaffold content package

* move content module files

* move content type module files

* update module paths

* fix imports and registration

* import package

* move content collection condition to content module

* align naming

* use consts

* fix imports

* fix import

* change circular threshold

* adjust threshold

* build the correct modules for content package

* Update package-lock.json

* Update index.js

* Update package-lock.json

* Update index.js

* move UmbPropertyStructureWorkspaceContext token and interface

* move UmbWorkspaceContentTypeAliasConditionConfig to content-type module

* fix self import

* fix self imports

* Update content-workspace-context.interface.ts

* remove type from import

* add readOnlyGuard to interface

* remove dependency on content

* move property type module into content package

* update package.json + tsconfig

* import manifests

* move build config

* Update index.js

* lint corrections

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-14 14:25:03 +00: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
8604163c91 Fix dropzone style circular imports (#19024)
* implement standalone

* remove unused style export

* Update src/Umbraco.Web.UI.Client/src/packages/media/dropzone/components/input-dropzone/input-dropzone.element.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-14 09:22:29 +00: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
Jacob OvergaardandGitHub 3939742917 V16: Replace legacy/fetch with @hey-api/client-fetch (#19002)
* feat: adds new backend-api and http-client packages and generates the api with @hey-api/client-fetch

* feat: maps generic T back to promise to avoid usage of 'any'

* feat: sets up baseUrl and auth for the new client

* feat: gets the api base url from server context instead of the http client

* feat: gets the api base url from server context instead of the http client

* feat: allows undefined token for xhr requests

* feat: changes the response object to be either type T directly (to support @hey-api/client-fetch) or the given type if the response does not contain a 'data' object

* revert interface

* feat: creates an api return type to comply with @hey-api/client-fetch

* feat: maps T back to the data model for non-api types

* feat: simplify api response to return the promise you sent to it with an optional error object

* feat: moves http related modules to the core package

* feat: updates the required type of the client for the api interceptors

* docs: removes invalid property

* feat: adds request parameters to documents

* feat: adds request parameters to imaging

* feat: adds return type to item-server-data-source-base

* feat: adds request parameters to webhooks

* feat: adds request parameters to users

* feat: renames all `requestBody` to `body` to conform with new client-fetch

* feat: uses query to take parameters in

* feat: adds data source response to tree types

* feat: adds request parameters to templating

* feat: adds request parameters to templating

* feat: adds request parameters to telemetry

* feat: adds request parameters to tags

* feat: adds request parameters to examine management

* feat: adds request parameters to relations

* feat: adds request parameters to packages

* feat: catches new api errors that are direct problem details objects

* feat: adds default interceptor to handle Umb-Generated-Resource headers

* feat: uses an error interceptor specifically to catch errors to avoid overhead

* feat: adds request parameters to members

* Revert "feat: uses an error interceptor specifically to catch errors to avoid overhead"

This reverts commit 7ffb7b29bf.

* feat: adds request parameters to media

* feat: adds request parameters to log viewer

* feat: adds request parameters to languages

* feat: adds request parameters to health check

* feat: adds request parameters to oembed

* feat: adds request parameters to documents

* feat: adds request parameters to redirect management

* feat: adds request parameters to blueprints

* feat: adds request parameters to dictionary

* feat: adds request parameters to data types

* feat: adds request parameters to temporary file

* feat: instructs delete methods to return an unknown value

* feat: allows default value to be unknown

* feat: adds request parameters to culture

* chore: import path

* feat: adds correct models to mocks

* feat: adds correct models to installer and upgrader

* feat: adds correct models to mocks

* chore: forgot to move ignore line

* chore: ignores generated files in eslint

* chore: removes old generated files

* feat: moves network connection status manager back into the main app to avoid imports from core

* chore: update imports

* feat: generate API for login screen without relying on the backoffice

* feat: uses the generated models on the login screen

* feat: sets 'credentials' to 'include' and adds it back to openapiconfiguration to avoid a breaking change

* adds back in commands moved to a workspace

* chore: vscode workspace settings formatted and useFlatConfig added for better compatibility
2025-04-14 10:21:42 +02:00
684790df70 Chore: Add script to check for "illegal" imports (#18992)
* stop webhook module from importing itself

* wip script to list all module imports from a folder

* Update package.json

* fix ufm

* fix tip tap

* order by name

* fix stylesheet module

* fix self import

* fix self import

* pass folder as a variable

* implement folder variable

* allow to pass module name + prettify log output

* check for imports from core to packages and report error

* add comments

* run as part of test

* Update package.json

* add threshold

* Update index.js

* add report of module self imports

* Update index.js

* Update index.js

* Update src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js

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

* remove self imports in /extension-api

* fix order

* fix self imports

* fix self import

* fix self imports

* fix self imports

* fix collection self import

* fix self imports

* fix self import

* Update collection-pagination.element.ts

* Update entity-action.extension.ts

* fix self imports

* lower threshold

* fix self imports

* fix self imports

* fix self imports

* fix merge

* fix tree self imports

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

* Update section.context.ts

* change threshold

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-14 07:55:20 +00: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
16ee7227ae Feature: Document Property Value Permission (#18997)
* add property visibility state manager

* implement in structure manager

* filter properties based on visibility

* wip document type structure permissions

* rename

* register entity permission for document type property

* add entity permission for media type property

* pass fallback permissions to document granular permissions

* set as preset

* clean up

* wip document type property picker

* add preset value

* Update input-document-type-structure-granular-user-permission.element.ts

* move files

* rename

* Update input-document-value-granular-user-permission.element.ts

* remove temp test

* Update manifests.ts

* remove unused

* Update input-document-value-granular-user-permission.element.ts

* rename see permission + add write permission

* fix missing type

* require property type unique

* add unique to property type

* rename to property type

* map to unique

* deprecate id on property type

* return unique from property picker

* more explicit naming

* use type

* render detail

* Update input-document-value-granular-user-permission.element.ts

* wip modal flow

* clean up

* add headlines

* hide actions

* pass preset value

* add edit permission method

* include property in permission name

* add read and write managers

* implement read and write state managers

* Update content-type-structure-manager.class.ts

* enforce property permissions

* Storage for granular permissions at property type level

* add guards

* make variant property version

* Rename server models to include "property"

* generate server types

* add permissionType to model

* add mappers to user group permission data

* add mapper to current user permission data

* destroy

* clear state

* use permission type for guard check

* add permission type

* require specific permission type

* use correct schema type

* add mappings

* clean up

* log errors

* fix mapping

* null check for icon

* use fallback if there is no forDataModel

* add translations

* sort group alphabetically

* add empty state for no verbs

* organize folders

* always require unique and variant id

* Allow storing empty lists of verbs

* pass variant id to all states

* Remove empty verbs

* add alias to name

* prevent picking the same property type multiple times

* fix lint errors

* fix create state by observing variant options

* move to workspace context

* Update document-property-value-user-permission.workspace-context.ts

* Update content-editor-properties.element.ts

* clean up

* Rename models (last time, promise!)

* Add migration for default document property value permissions

* generate new server models

* update after model changes

* Correct the default permission identifiers

* Add default permissions to newly created DBs

* Add validation and clean-up

* rename to visibility state

* rename to view

* add helpers

* apply to blocks

* Update document-property-value-user-permission.workspace-context.ts

* disable view and write state by default

* add tests for start and stopping a state

* throw errors if adding to a state that is not running

* export consts

* export consts

* fix circular

* fix circular

* set the entity type when setting values

* only apply for block in document values

* split logic

* start states for document blocks

* only apply states when state is running

* Fixed typos in test method names.

* add readonly type

* Enforce: AllowEditInvariantFromNonDefault configuration (#18758)

* add read only state

* handle read only property state in properties element

* prevent editing shared props on non default

* enforce configuration

* clean up

* set variant id

* move to property module

---------

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

* remove unnecessary messages

* make sure to destroy consumer

* Thoughts as TODO

* use Entry type

* use Entry type

* get rid of things not yet released

* clean up

* use generic methods

* TODO comment

* use generic observable

* catch if not found

* move variant id out of property type

* mega refactor temp commit

* Guard Manager

* set readOnly as a property on property editors

* further rename

* remove property state managers

* revert state manager

* fix sorting rule

* mega rename and correction

* refactor properties elements

* todo note

* clean up

* impl

* mega refactor moving permission guards to workspace

* rename

* type change

* rearrange

* correct import

* fix tests

* correct tests

* reset viewGuards block

* type correction

* refactor read only for user permissions setting

* todo note

* align property element

* await promise

* impl view guard property filtering

* correct const name

* fix fallback user permissions in mock data

* correct property type id mock data

* toggle permissions example

* complex permission

* Move migration to 16.0.

* rename fallBackToDisallowed to fallbackToNotPermitted

* clean up setReadOnlyStateForUserPermission

* capital o

* align read only naming

* rename method

* add js docs

* remove unused

* correct method name

* add js docs

* add js docs

* camel case function

* fix eslint problems

* camelcase const

* align method names

* remove unused

* fix host

* fix spelling mistake

* align naming

* fix spelling mistake

* add alias

* use read only state methods

* camel case function

* correct method name

* add js docs

* camelcase function

* camel case function

* align method names

* change method name wording

* Include document property value permissions in the current user's aggregated permissions.

* use is read only

* delete unused

* fix implementation of AllowEditInvariantFromNonDefault

* don't know what is happening here. Local is it lower on github it is higher

* Update document-workspace.context.ts

* revert to v16 dev

* simplify if statement

* make it explicit that these are ui only permissions

* add action label for read

* remove duplicates

* use read instead of browse

* align description

* use document instead of node

* make the base class abstract

* extend in test

* Update guard.manager.base.test.ts

* fix example

* style adjustment

* group styling

* refactor guard rule resolving

* remove imports

* remove console.log

* improve disconnected context consumer rejection message

* fix publishableVariantsFilter

* Update document-workspace.context.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-11 14:16:59 +02: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
Niels LyngsøandGitHub 9e9c8c986c set working directory (#18995) 2025-04-11 09:09:45 +00:00
Niels LyngsøandGitHub 3210c304fe fix appending to a froozen object (#19003) 2025-04-11 10:33:21 +02:00
Niels LyngsøandGitHub 63f2fabb5f clean up unnessecary redirect code (#19007) 2025-04-11 07:44:39 +00: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
Andy ButlandandGitHub 21283245f1 Merge pull request #18993 from umbraco/v16/merge-from-15
Merges v15/dev to v16/dev.
2025-04-10 10:28:50 +02:00
Andy Butland b02b201cab Re-applied obsoletions to tracked references repository.
Re-applied modal handling for rollback.
2025-04-10 09:52:48 +02:00
Andy Butland 0c2485adf9 Post-merge fixes. 2025-04-10 07:16:00 +02:00
Andy Butland 1bb2837254 Post-merge fixes. 2025-04-10 07:12:34 +02:00
Andy Butland 0281d800d0 Post-merge fixes. 2025-04-10 07:04:29 +02:00
Andy Butland ecbfc72323 Merge branch 'v15/dev' into v16/merge-from-15
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs
#	src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs
#	src/Umbraco.Core/Persistence/Repositories/ITrackedReferencesRepository.cs
#	src/Umbraco.Core/Services/ContentEditingService.cs
#	src/Umbraco.Core/Services/DataTypeService.cs
#	src/Umbraco.Core/Services/IContentEditingService.cs
#	src/Umbraco.Core/Services/IDataTypeService.cs
#	src/Umbraco.Core/Services/ITrackedReferencesService.cs
#	src/Umbraco.Core/Services/RelationService.cs
#	src/Umbraco.Core/Services/TrackedReferencesService.cs
#	src/Umbraco.Infrastructure/Examine/Deferred/DeliveryApiContentIndexHandleContentTypeChanges.cs
#	src/Umbraco.Infrastructure/Examine/DeliveryApiIndexingHandler.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts
#	src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts
#	src/Umbraco.Web.UI.Client/src/mocks/data/document/document.db.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/modal-registration/modal-route-registration.controller.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.context.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/router-slot.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/model.ts
#	src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/entity-action/rollback.action.ts
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/TemporaryFileServiceTests.cs
2025-04-09 22:45:56 +02:00
Kenn JacobsenandGitHub ff58fbd2b1 Make it possible to disable Examine indexes by composition (#18988) 2025-04-09 18:13:18 +02:00
Jacob OvergaardandGitHub 4778501a6e V16: Installer does not proceed from last step (#18981)
* fix: moves logic from installation step to context in order not to destroy the host for the request

* chore: removes console.warn
2025-04-09 16:40:54 +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
10e56a52f3 V16: Removes TinyMCE (server-side) (#18913)
* Create new migration

* Migrate UI to tiptap

* remember to overwrite toolbar

* Add setting to disable migration

* Add default extensions when migrating

* Remove places where editorUI alias is used

* Remove more tinyMCE stuff

* Make sure that blocks also works

* Reverted files from bad merge

* bring back value converters

* Class name casing

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 10:00:59 +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
+8 3bd66b89e1 Merge branch 'v15/dev' into v16/dev (#18971)
* 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>

* Feature: highlight invariant doc with variant blocks is unsupported (#18806)

* mark variant blocks in invariant docs as invalid

* implement RTE Blocks

* 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

* 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>

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* Remove admin permission on user configuration, allowing users with user section access only to manaage users and groups. (#18848)

* 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

* 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>

* 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.

* 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.

* 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>

* 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.

* Fixes save of empty, invariant block list on variant content. (#18932)

* remove unnecessary code (#18927)

* V15/bugfix/fix route issue from 18859 (#18931)

* unique check

* unique for workspace empty path

* more unique routes

* 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>

* removes autogenerated workflows

* make getHasUnpersistedChanges public (#18929)

* 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>

* 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>

* Skip lock tests

* 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.

* 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>

* 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>

* 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.

* fix circular icon import (#18952)

* remove segment toggle for elements (#18949)

* Fix modal route registration circular import (#18953)

* fix modal route registration circular import

* Update modal-route-registration.controller.ts

* V15/fix/18595 (#18925)

* fix for #18595

* updates the en.ts

* Avoid unneeded Dictionary operations (#18890)

* Avoid some heap allocations

* Remove unneeded double seek

* Avoid allocating new empty arrays, reuse existing empty array

* Avoid allocating strings for parsing comma separated int values (#18199)

* 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>

* Feature: discard changes for block workspace (#18930)

* make getHasUnpersistedChanges public

* Discard changes impl for Block Workspace

* fix 18367 (#18956)

* Merge commit from fork

* Prevent path traveral vulnerability with upload of temporary files.

* Used BadRequest instead of NotFound for invalid file name response.

* 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>

* 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

* build: adjusts circular ref number to 4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Migaroez <geusens@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Welander Jensen <64834767+Welander1994@users.noreply.github.com>
Co-authored-by: Henrik <hg@impact.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-04-09 09:58:01 +02: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
Mads RasmussenandGitHub 10a70a8397 Move router-slot exports to @umbraco-cms/backoffice/router (#18962)
* move router-slot files to core/router

* remove external module

* generate tsconfig

* fix imports

* ignore lint errors

* ignore diff package
2025-04-09 08:45:20 +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
Mads RasmussenandGitHub af07c42120 Remove external base64-js module (#18969)
* move base64 folder into openid

* remove from package.json and tsconfig

* import from local module
2025-04-08 12:47:39 +00: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
64e8f34f0f V16: Adds server context to store information about paths (#18967)
* fix: straightens out unnecessary imports of components and re-exports them appropriately

* fix: imports repository from file directly

* feat: introduces a "server" package and moves UmbAppContext logic to UmbServerContext

* feat: updates all cases of `UmbAppContext` -> `UmbServerContext`

* build: adjusts MAX_CIRCULAR_DEPENDENCIES from 6 to 3

* Update src/Umbraco.Web.UI.Client/devops/circular/index.js

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

* feat: removes unused interface

* build: adds server bundle to vite

* build: vite should build index barrel

* build: readjust to 5 to account for previous failed build

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-08 11:20:03 +00:00
Mads RasmussenandGitHub 6aa471479e Internalize uuid package (#18955)
* move uuid to core package package.json

* install

* remove external + generate tsconfig

* import from local node_modules

* temp accept uuid as import
2025-04-08 10:44:10 +00:00
Jacob Overgaard 8178dba674 build: set MAX_CIRCULAR_DEPENDENCIES to 6 2025-04-08 10:16:09 +02:00
Jacob Overgaard 385a8fecba build: adds another fail scenario to the circular checker if it encounters fewer dependencies than anticipated 2025-04-08 10:16:09 +02:00
Jacob Overgaard 84d8736b90 fix: removes circular dependency by stopping module from importing from itself 2025-04-08 10:16:09 +02:00
Jacob OvergaardandGitHub fd1761dcc1 V16: API error interceptor should return early if it will not execute (#18963)
* fix: resolves an unintended circular reference based on files being moved around

introduced in #18939

* fix: improves error handling to return early if interceptor does not catch a 500

* fix: adds try/catch around json parsing
2025-04-08 09:12:52 +01: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
Jacob Overgaard 6630220961 build: adjust number of max circulars to 7 2025-04-08 09:11:10 +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
Jacob OvergaardandGitHub e1f9219b93 V16: Updates openapi-ts client and deprecates tryExecuteAndNotify (#18939)
* build(deps-dev): bump @hey-api/openapi-ts from 0.61.3 to 0.66.1

* docs: adds information on how to configure new fetch-client

* feat: adds preliminary umb-prefixed error types

* fix: uses correct import path

* docs: jsdocs

* feat: optimises error reporting

* feat: maps functions into separate controllers

* feat: adds color to peek notification

* feat: moves the internal api interceptors controller and adds more interceptors

* feat: adds host to params

* feat: marks certain functions as deprecated

* feat: maps api errors to UmbErrors

* chore: removes deprecation console logs

* chore: allows any

* feat: maps xhr errors to umb errors

* feat: adds host to tryExecute

* feat: adjusts deprecation notifices and checks

* chore: adjusts deprecation notices

* chore: add .warn() to deprecation

* feat: updates login app repository

* feat: changes all `tryExecuteAndNotify` calls to `tryExecute`

* feat: copies helper functions to resources package and deprecates in notification package

* chore: removes unused imports

* feat: adds exports

* chore: removes controller that is no longer useful

* feat: marks _peekError as protected

* feat: adds support for error notifications (and to ignore them) and to cancel an ongoing request

* feat: eliminates duplicated logic in xhr controller

* feat: touches only the cloned response to allow interceptors downstream to unwrap the body

* feat: stores the host for async context

* feat: disables automatic notifications for validation data source

* feat: disables notifications where they are otherwise handled or ignored

* feat: removes deprecated code

* feat: eliminates a controller that only had a static method

* docs: adds jsdocs

* docs: adds jsdocs

* docs: adds jsdocs

* feat: returns umb-notifications response without modifying it

* feat: eliminates dependency on generated `ProblemDetails` type

* feat: eliminates dependence on generated `ApiError` type

* feat: eliminates dependence on generated `CancelError` type

* fix: removes dependency on CancelablePromise
2025-04-07 22:54:51 +01: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 6a36a797ad Fix confirm modal circular import (#18951)
* fix circular import for confirm modal

* Update open-modal.controller.ts
2025-04-07 11:40:57 +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
Lee KelleherandGitHub dc87cf800f Reverts removal of RTE Block Type Configuration property-editor (#18933)
I'd accidentally removed this in PR #18889.
Adding it back in to the "block-rte" package.
2025-04-04 14:04:45 +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
e0341f9d10 V16: Migrate TinyMCE data type configuration to Tiptap (#18843)
* Create new migration

* Migrate UI to tiptap

* remember to overwrite toolbar

* Add setting to disable migration

* Add default extensions when migrating

* Make sure that blocks also works

* Renamed classes to reference TinyMCE migration

* Defaults TinyMCE toolbar mapping to `null`

if we can't map to a known Tiptap toolbar extension (manifest alias),
then it may cause an issue with the toolbar rendering.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-03 18:52:30 +00:00
Lee KelleherandGitHub 8754caa06f V16: Stylesheet Create Options (#18911)
* Adds `entityCreateOptionAction` extensions for Stylesheets

* Deprecates `umb-stylesheet-create-options-modal` and token.

* Corrected localization labels

to resolve failing acceptance test.

* Updated @umbraco/playwright-testhelpers to 16.0.0

* Removed redundant RTE Stylesheet acceptance tests
2025-04-03 16:30:21 +00:00
Jacob OvergaardandGitHub 7d7db6bb2b V16: Vite development optimizations (#18915)
* feat: resolve TODO by removing quiet option

* feat: exclude ./src/mocks from production build

* feat: load only msw when running through vite

* feat: optimise load order

* feat: handles mocked logos with virtual path

* feat: loads mocked service worker from virtual path

* feat: loads assets from virtual path

* feat: forces MSW=on for the static build

* build: adds storybook workflow copied over from the old backoffice repository

* build: limits where the build runs

* build: adds workflow to build a static version of the backoffice upon request

* build: excludes the `/umbraco/backoffice/assets` folder from navigation fallback just in case

* build: triggers run when the workflow file itself changes

* build: triggers run when package.json changes

* build: marks the 'contrib' branch as production

* build: activates static builds on preview/* labels

* build: bumps github checkout version

* build: updates key for backoffice web app

* build: updates key for storybook

* build: disables build for release branches to preseve on preview environments
2025-04-03 15:15:04 +01: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
Lee KelleherandGitHub c3709de1d3 V16: Removes RTE Stylesheets (client-side) (#18908)
* Removed Stylesheet RTE workspace view

* Removed Stylesheet RTE Rule components

* Removed Stylesheet RTE Rule Manager

* Removed Stylesheet RTE localizations

* Removed Stylesheet RTE mock data

* Aligns the Stylesheet code editor height

with the Scripts code editor.
2025-04-02 17:02:46 +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
7e46a1c148 V16: Removes TinyMCE (client-side) (#18889)
* Removed TinyMCE client-side code

* Replaces "MaxImageSizeConfiguration" with "Integer" property-editor

* Adds "Dimensions" property-editor

Promoted from TinyMCE package code.

* Updated Tiptap property-editor label

to remove the "[Tiptap]" suffix.

* Corrected Tiptap config localization keys

* Removed TinyMCE acceptance test

* Reverted Tiptap property-editor label

to add the "[Tiptap]" suffix back in.

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-01 17:00:27 +02: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
Mads Rasmussen 250ddf319e only show the local split view 2025-04-01 15:40:58 +02:00
Mads Rasmussen 015c0cfc16 indent segments 2025-04-01 15:39:21 +02:00
Mads Rasmussen 53be19cb00 auto expand parent culture 2025-04-01 15:33:10 +02:00
Mads Rasmussen 3a93c9b9a4 set segment variant name 2025-04-01 14:44:02 +02:00
Mads Rasmussen ff39e54ec6 adjust display name 2025-04-01 14:42:31 +02:00
Jacob Overgaard dbd9218c75 Merge branch 'v15/dev' into v16/dev 2025-04-01 14:03:40 +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
Mads Rasmussen 5a6d7326d8 render segment name in input 2025-04-01 13:27:18 +02:00
Mads Rasmussen c8e9beffa1 set name input to readonly for segments 2025-04-01 13:16:21 +02: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
Mads Rasmussen e064169df5 more explicit method name 2025-04-01 13:11:19 +02:00
Mads Rasmussen d87415099c align icon 2025-04-01 13:01:10 +02:00
Mads Rasmussen 34cfa3cb62 only render segments if culture is created 2025-04-01 12:48:32 +02: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
Mads Rasmussen 9e9b1efdf3 only show culture variant options in dialogs 2025-04-01 11:03:02 +02:00
Mads Rasmussen f309117223 nest segments under cultures 2025-04-01 10:53:42 +02:00
Jacob Overgaard d1ee95c7b1 Merge branch 'v15/dev' into v16/dev 2025-04-01 10:38:34 +02:00
Jacob Overgaard 40a2d75282 Merge branch 'release/15.3.1' into v15/dev 2025-04-01 10:34:15 +02:00
Jacob Overgaard 7b4bfbb28e Merge branch 'v15/dev' into v16/dev 2025-04-01 10:31:59 +02:00
Mads Rasmussen 0ab024d7c1 remove duplicate tag 2025-04-01 10:17:37 +02:00
Sebastiaan Janssen 7fb9df9b19 Merge branch 'v15/dev' into contrib 2025-04-01 10:15:54 +02:00
Mads Rasmussen 302b58e513 Merge branch 'v15/dev' into v15/feature/select-segment 2025-04-01 10:08:46 +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
00ec63a966 Todo cleanup of abstract service being aware of implementation types (#18832)
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-03-31 09:52:34 +00: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
Lee KelleherandGitHub 19123b4799 Removed deprecated methods from ITwoFactorLoginService (#18880) 2025-03-31 11:03:01 +02: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
Niels LyngsøandGitHub 3446b77d7d Feature: context consumer auto destroys if no callback + getContext options (#18835)
* consumer destroys when no callback

* getContext can be simplification

* JSDocs

* implement options to skipHost and pass context alias matches
2025-03-31 10:32:36 +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
kjac 8d9822ea70 Fix mapping errors for invariant editing 2025-03-31 07:06:23 +02:00
kjac 15f0f44ff5 Fix segment variant mapping from API 2025-03-30 14:05:07 +02:00
kjac 043b39d553 Allow for creating and editing segment variant documents 2025-03-30 13:02:00 +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ø 1e5d29e667 Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Services/ITwoFactorLoginService.cs
#	src/Umbraco.Web.UI.Client/src/packages/media/dropzone/components/input-dropzone/input-dropzone.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/media/dropzone/dropzone-manager.class.ts
2025-03-28 13:00:56 +01: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 Rasmussen 2ff11afa95 only show button ellipsis when there are culture variants 2025-03-28 10:15:24 +01:00
Mads Rasmussen e61541a2cf fix type errors 2025-03-28 10:00:48 +01:00
Mads Rasmussen d6b40ce526 send segments when saving a culture 2025-03-28 09:43:52 +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
Mads Rasmussen f63794737a use variant id class to check 2025-03-28 08:29:39 +01:00
Mads Rasmussen 9e5c7977da check for null segment for invariant option 2025-03-28 08:27:47 +01:00
Mads Rasmussen 64eb3cdf57 fix spelling mistake 2025-03-28 08:21:25 +01:00
Mads Rasmussen 6b60ff8ade remove default language tag 2025-03-28 08:06:02 +01:00
Mads Rasmussen e1e69aeec4 handle segmented data when saving 2025-03-28 08:02:53 +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
Mads Rasmussen 746ad55a0b fix name display values 2025-03-27 14:43:59 +01:00
Mads Rasmussen cb33afba3b support segments for route fallback 2025-03-27 14:13:37 +01:00
Mads Rasmussen 98fd90409e return empty array 2025-03-27 13:39:54 +01:00
Lee KelleherandGitHub 47e09efec6 Fixes Dropdown property-editor validation (#18845) 2025-03-27 12:39:09 +00:00
Mads Rasmussen e8ba63bad4 only execute if we have proper values 2025-03-27 13:37:16 +01:00
Mads Rasmussen 5557ec4cd8 remove log 2025-03-27 11:35:32 +01:00
Mads Rasmussen dbf0e740d8 render label based on how to document varies 2025-03-27 11:34:40 +01:00
Mads Rasmussen 7a21cf5617 add observables to interface 2025-03-27 11:34:18 +01: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
Niels Lyngsø fdef134c3b lint fixes 2025-03-27 11:08:35 +01:00
Mads Rasmussen c21d160f52 render segment name 2025-03-27 10:59:50 +01:00
Nhu DinhandNiels Lyngsø bcaaf5a1f4 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 10:58:58 +01:00
Niels LyngsøandNiels Lyngsø d438d79b8c lint corrections (#18833) 2025-03-27 10:58:58 +01:00
0c7202c6d9 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-27 10:58:58 +01:00
Nhu DinhandNiels Lyngsø 361c9d9f97 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-27 10:58:58 +01:00
Mads RasmussenandNiels Lyngsø 678bce697b fix preset logic (#18815) 2025-03-27 10:58:58 +01:00
Kenn JacobsenandNiels Lyngsø b008afbb27 Obsolete a few unused things. (#18814) 2025-03-27 10:58:57 +01:00
Niels LyngsøandNiels Lyngsø 11479b22b3 implement validation context (#18808) 2025-03-27 10:58:57 +01:00
Andy ButlandandNiels Lyngsø 1c6b7698c8 Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-27 10:58:57 +01:00
Sven GeusensandGitHub 8c5fe3d52b removed syslib003 & syslib0051 obsoleted code dependencies (#18827)
Followed guidance in https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslibxxxx
2025-03-27 10:47:07 +01:00
Mads Rasmussen b873288015 do not include segments in save options 2025-03-27 10:34:06 +01:00
Mads Rasmussen 2264ce8678 use alias in spec info 2025-03-27 10:23:00 +01:00
Mads Rasmussen f296d5d2b4 render name instead of alias 2025-03-27 10:16:49 +01: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
Mads Rasmussen bc9cc83eca Merge branch 'v15/feature/property-vary-by-segment' into v15/feature/select-segment 2025-03-26 19:47:16 +01:00
Mads Rasmussen 17c4a08ae1 Merge branch 'v15/dev' into v15/feature/property-vary-by-segment 2025-03-26 19:46:31 +01: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
Mads Rasmussen f1020436d1 only show default language tag for a language 2025-03-26 15:26:49 +01:00
Mads Rasmussen b21183c562 fix types 2025-03-26 15:20:59 +01:00
Mads Rasmussen 6d974a624d Merge branch 'v15/feature/property-vary-by-segment' into v15/feature/select-segment 2025-03-26 15:18:10 +01:00
Mads Rasmussen 6ba4b36514 Merge branch 'v15/dev' into v15/feature/property-vary-by-segment 2025-03-26 15:17:51 +01:00
Mads Rasmussen 30f1ec194e include segment in active variants 2025-03-26 15:14:37 +01:00
Mads Rasmussen 2801df3c6f cast type 2025-03-26 15:14:15 +01:00
Mads Rasmussen 666f9457f3 Update content-detail-workspace-base.ts 2025-03-26 13:40:02 +01:00
Mads Rasmussen 6e42c53d79 add culture for segments 2025-03-26 13:34:10 +01:00
Mads Rasmussen 7e713cab84 append segment to spec info 2025-03-26 13:29:51 +01:00
Mads Rasmussen 0ebe465e6f add segment info to model 2025-03-26 13:25:38 +01:00
Mads Rasmussen d583169642 make variant options for segments too 2025-03-26 11:51:43 +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
Mads RasmussenandGitHub 26d66a815a Move public access files to member-public-access module (#18793)
* move to member package

* fix imports

* add module to build

* split types and consts

* export types

* add export type

* add import type
2025-03-26 08:26:18 +00: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
Niels LyngsøandGitHub d93b0002ba avoid destroying before promise has resolved. (#18811) 2025-03-26 09:25:04 +01:00
Niels Lyngsø 12f4c17f85 fix failing e2e test 2025-03-26 08:46:43 +01:00
Niels Lyngsø fd4585fba7 fix ts merge conflict 2025-03-26 08:24:52 +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
Mads Rasmussen 721e6ccb0c clean up 2025-03-25 21:48:51 +01:00
Mads Rasmussen 45ff3c3a6f wip loading segment data 2025-03-25 21:42:29 +01:00
Mads Rasmussen 21a23b8057 render tag for vary by segment 2025-03-25 20:33:26 +01:00
Mads Rasmussen 04d8b29226 remove duplicates 2025-03-25 20:30:27 +01:00
Mads Rasmussen f76d093226 simplify labels 2025-03-25 20:30:20 +01:00
Mads Rasmussen b3055fa5ce use property-layout for appearance 2025-03-25 20:24:16 +01:00
Mads Rasmussen 7f089a630a render toggle for vary by segment 2025-03-25 20:20:15 +01:00
Andy Butland 7dc9cbd9b1 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs
#	src/Umbraco.Core/Services/PropertyValidationService.cs
#	src/Umbraco.Web.UI.Client/utils/all-umb-consts/imports.ts
2025-03-25 17:56:50 +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 RasmussenandGitHub f5c307b8f1 remove duplicate keys (#18787) 2025-03-25 09:41:50 +01:00
0b0a2dc251 Added v16 to run at midnight (#18785)
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-03-25 11:06:33 +07:00
Niels LyngsøandGitHub 780f16e79b UX: Make discard changes button red (#18767)
* make discard button red

* change headline
2025-03-24 22:10:57 +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
Andy ButlandandGitHub fdea721a8e Move registration of delivery API component to infrastructure to resolve issue resolve it from controller. (#18777) 2025-03-24 13:25:06 +01: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
Niels Lyngsø 2fe83b5637 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Web/ICookieManager.cs
2025-03-21 19:42:15 +01:00
Lee KelleherandGitHub 9ee31367df V16: Removed deprecated client-side code (#18662)
* Removed duplicated "document-is-not-trashed.condition" code

* Removed deprecated code, marked for removal in Umbraco 15

(that we forgot about)

* Removed deprecated code, marked for removal in Umbraco 16

* Regenerated constants

* Reverted deletion
2025-03-21 18:56:52 +01:00
Andy ButlandandGitHub 825f791d01 Remove the non-controversial, straightforward obsoleted constructs for Umbraco 16 (#18661)
* Removed obsoletes from IConfigManipulator.

* Removed obsolete models builder extensions.

* Removed the obsolete ContentDashboardSettings.

* Removed the obsolete InstallMissingDatabase setting on GlobalSettings.

* Removed obsolete NuCache settings.

* Removed obsolete RuntimeMinificationSettings.

* Removed obsolete health check constant.

* Removed obsolete icon constant.

* Removed obsolete telemetry constant.

* Removed obsolete property and constructor on UmbracoBuilder.

* Removed obsolete constructor on AuditNotificationsHandler.

* Removed obsolete constructor on HTTP header health checks.

* Removed obsolete constructor on MediaFileManager.

* Removed obsolete GetDefaultFileContent on ViewHelper.

* Remove obsoleted methods on embed providers.

* Fix tests.

* Removed obsolete constructors on BlockEditorDataConverter.

* Removed obsolete SeedCacheDuration property on CacheSettings.

* Removed obsolete PublishCulture on ContentRepositoryExtensions.

* Removed obsolete MonitorLock.

* Removed obsolete synchronous HasSavedValues from IDataTypeUsageService and IDataTypeUsageRepository.

* Removed obsolete HasSavedPropertyValues from IPropertyTypeUsageService and IPropertyTypeUsageRepository.

* Removed obsolete methods in ITrackedReferencesService and ITrackedReferencesRepository.

* Removed obsolete DateValueEditor constructors.

* Removed obsolete GetAutomaticRelationTypesAliases.

* Removed obsolete constructor on TextOnlyValueEditor.

* Removed obsolete constructors on RegexValidator and RequiredValidator.

* Removed obsolete constructs on SliderValueConverter and TagsValueConverter.

* Removed obsolete GetContentType methods from IPublishedCache.

* Removed ContentFinderByIdPath.

* Removed obsolete constructor on DefaultMediaUrlProvider.

* Removed obsolete constructor on Domain.

* Removed obsolete constructor on PublishedRequest.

* Removed obsolete methods on CheckPermissions.

* Removed obsolete GetUserId from IBackOfficeSecurity.

* Removed obsolete methods on LegacyPasswordSecurity.

* Removed obsolete constructors on AuditService.

* Removed obsolete methods on IContentEditingService.

* Remove obsolete constructors and methods on ContentService/IContentService.

* Removed obsolete constructor in ContentTypeEditingService.

* Removed obsolete constructor in MediaTypeEditingService.

* Removed obsolete constructor in MemberTypeEditingService.

* Removed obsolete constructor in ContentTypeService.

* Removed obsolete constructors in ContentTypeServiceBase.

* Removed obsolete constructors and methods in ContentVersionService.

* Removed obsolete constructor in DataTypeUsageService.

* Removed obsolete constructor in DomainService.

* Removed obsolete constructor in FileService.

* Removes obsolete AttemptMove from IContentService.

* Removes obsolete SetPreventCleanup from IContentVersionService.

* Removes obsolete GetReferences from IDataTypeService.

* Removed obsolete SetConsentLevel from IMetricsConsentService.

* Removed obsolete methods from IPackageDataInstallation.

* Removed obsolete methods from IPackagingService.

* Removed obsolete methods on ITwoFactorLoginService.
Removed obsolete ITemporaryMediaService.

* Removed obsolete constructor from MediaService, MemberTypeService and MediaTypeService.

* More obsolete constructors.

* Removed obsoleted overloads on IPropertyValidationService.

* Fixed build for tests.

* Removed obsolete constructor for PublicAccessService, UserService and RelationService.

* Removed GetDefaultMemberType.

* Removed obsolete user group functionality from IUserService.

* Removed obsolete extension methods on IUserService.

* Removed obsolete method from ITelemetryService.

* Removed obsolete UdiParserServiceConnectors.

* Removed obsolete method on ICookieManager.

* Removed obsolete DynamicContext.

* Removed obsolete XmlHelper.

* Fixed failing integration tests.

* Removed obsoletes in Umbraco.Cms.Api.Common

* Removed obsoletes in Umbraco.Cms.Api.Delivery

* Removed obsoletes in Umbraco.Cms.Api.Management

* Removed obsoletes in Umbraco.Examine.Lucene

* Removed obsoletes in Umbraco.Infrastructure

* Fix failing delivery API contract integration test.

* Made integration tests internal.

* Removed obsoletes from web projects.

* Fix build.

* Removed Twitter OEmbed provider

* Removed obsolete constructor on PublishedDataType.

* Removed obsolete constructors on PublishedCacheBase.

* Removed the obsolete PropertyEditorTagsExtensions.

* Removed obsoletion properties on configuration response  models (#18697)

* Removed obsolete methods from server-side models.

* Update client-side types and sdk.

* Update client-side files.

* Removed obsoletion of Utf8ToAsciiConverter.ToAsciiString overload. (#18694)

* Removed obsolete method in UserService. (#18710)

* Removed obsoleted group alias keys from being publicly available. (#18682)

* Removed unneceessary ApiVersion attribute.

* Clean-up obsoletions on MemberService (#18703)

* Removed obsoleted method on MemberService, added future obsoletion to interface and updated all callers.

* Removed obsoletion on member service method that's not obsolete on the interface.
2025-03-21 17:02:31 +00: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
Jacob Overgaard fb3a56a240 Merge branch 'v15/dev' into v16/dev 2025-03-21 12:25:41 +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 0d1afcf3c7 Merge branch 'v15/dev' into v16/dev 2025-03-21 11:08:31 +01:00
Jacob Overgaard a82e0ca23a fix: add nullability check to modalManager 2025-03-21 11:07:59 +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
Andy Butland 663be397dc Merge branch 'v15/dev' into v16/dev 2025-03-21 09:11:06 +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
kjac 83aca5aa6e Merge branch 'v15/dev' into v16/dev 2025-03-20 14:52:35 +01: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
Niels Lyngsø 991b8bfb37 Merge branch 'v15/dev' into v16/dev 2025-03-18 14:42:44 +01:00
Niels Lyngsø 6c9ff96972 fix UmbContextConsumer 2025-03-18 14:41:01 +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
Niels Lyngsø 0d4acb440d fix context consumer test 2025-03-18 10:54:07 +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 Butland 3f5898ba95 Merge branch 'v15/dev' into v16/dev 2025-03-17 15:49:20 +01: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ø 939552e9f1 Merge branch 'v15/dev' into v16/dev 2025-03-17 11:09:30 +01:00
Niels Lyngsø e9ba06929f Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	version.json
2025-03-17 11:09:18 +01:00
Niels Lyngsø 0a7d0a8f8b Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-03-17 11:08:27 +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øandGitHub b9eb988d29 V16/feature: get context resolves in undefined if not found (#18611)
* implement getContext rejecter + allow for resolving in undefined

* fix test

* timeout concept

* adjustments

* adapt implementation

* ability to set timeoutFrame for faster test

* update

* make sure provider only provides when connected

* make sure action apis can fail without resolving

* make sure to await the arrival of the UMB_AUTH_CONTEXT

* no need to be async

* consume to stay up to date

* one rendering cycle approach

* adjusting context consumption part 1

* implementation adjustments

* correction patch 2

* correction patch 3

* correction batch 4

* correction batch 5

* correction batch 6
2025-03-14 14:06:45 +00: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
Andy Butland 9beb679dbf Merge branch 'v15/dev' into v16/dev 2025-03-13 10:43:42 +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 9b3da86192 Merge branch 'v15/dev' into v16/dev 2025-03-12 12:29:09 +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
1d5a4dfa3a Chore: deprecate UmbPropertyValueChangeEvent for v.16 (#18455)
* deprecate

* fix import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-11 13:51:49 +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
mole 9d7c2d4a82 add async keyword 2025-03-11 12:46:21 +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
Mads Rasmussen 0e561da146 Merge branch 'v15/dev' into v16/dev 2025-03-11 11:43:07 +01: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
Niels Lyngsø c8eb4f1d53 Merge branch 'v15/dev' into v16/dev 2025-03-10 16:54:38 +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
Niels Lyngsø 98bf623721 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs
#	src/Umbraco.Core/Configuration/Models/ContentSettings.cs
2025-03-09 21:28: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
13c788d6ec Add AsyncMigrationBase, update base classes and call async methods (#17057)
* Add AsyncMigrationBase, update base classes and call async methods

* Restored and obsoleted synchronous execution on IMigrationPlanExecutor.

* Resolved breaking changes.

* Fixed build.

* Further obsoletes.

* Fix build against v16/dev.

* Removed and obsolete code related to post-migrations.

* Removed service registration of unused interface.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 11:54:22 +01:00
780184e553 Remove UmbracoPath setting (#16037)
* Use require modifier instead of setting null-suppressed default values

* Only remove read-only properties when IgnoreReadOnlyProperties is set

* Obsolete UmbracoPath property and remove work-around for obsolete setter

* Remove UmbracoPath setting and use constant instead

* Remove usage of GetBackOfficePath

* Add IHostingEnvironment.GetBackOfficePath() extension method

* Add Constants.System.UmbracoPathSegment constant

* Update Constants.System XML docs

* Replace StringBuilder with string interpolation

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>

* Fix syntax error

* Removed uses of obsoletes.

* Further obsolete messages.

* Cleaned up usings.

* Update src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

---------

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 07:38:30 +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
561d871677 Remove await Task.FromResult() and unnecessary async modifiers (#16535)
* Remove await Task.FromResult and unnecessary async modifiers

* Remove usage of await Task.WhenAll() to avoid deadlocks

* Fix code formatting

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 06:47:37 +01:00
Andy Butland 064a71240e Merge branch 'v15/dev' into v16/dev 2025-03-03 06:43:17 +01: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 Butland 678e942a2e Merge branch 'v15/dev' into v16/dev 2025-02-21 10:01:15 +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 Butland a76344ec4c Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs
2025-02-20 09:33:29 +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
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
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 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
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
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 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
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
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
Jacob OvergaardandGitHub e77bac3088 V16: Allow MaxRequestLength to be specified as a long (#18141)
* feat: allows MaxFileSize to be specified as 64-bit rather than 32-bit to be able to accept larger files

the underlying kestrel architecture already accepts a `long` in ConfigureKestrelServerOptions.cs

* chore: removes unused configuration option

* chore: generate OpenApi.json
2025-01-29 06:31:24 +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
Jacob Overgaard 27afb3f0f3 Merge branch 'v15/dev' into v16/dev 2025-01-28 10:29:30 +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 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
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
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
822a8cc2f1 v16: Start removing scope references (#18074)
* Start removing scope references

* Update src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs

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

* Make test-only ctor internal

* Fix tests

* Dont treat warnings as errors

* Disable package validation, as this is a major

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-22 21:19:12 +01:00
Jacob Overgaard 32792b4ba4 feat: removes deprecated setting HideBackOfficeLogo 2025-01-22 14:21:54 +01:00
Jacob Overgaard 849b98cbaf bump version to 16.0.0-rc 2025-01-22 14:21:19 +01:00
Jacob Overgaard 0b3836456e Merge branch 'v15/dev' into v16/dev 2025-01-22 14:20:34 +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
Jacob Overgaard f67a900cc1 bump version to 15.3.0-rc 2025-01-22 10:15:21 +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
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
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
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 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
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
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
Andy ButlandandGitHub 95eb58587b Merge commit from fork 2025-01-20 14:14:28 +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
Callum WhyteandGitHub d15b5b221e Allow skipSelect blueprints only when one blueprint exists (#17818) 2025-01-20 10:27:54 +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
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
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
Mads Rasmussen daf2e18cd2 get unique from context 2025-01-16 15:55:43 +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
0d1cdd1bb4 Refactor setting arrays to sets (#16058)
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-12-02 15:50:23 +01:00
5377 changed files with 139659 additions and 85357 deletions
+72 -35
View File
@@ -1,5 +1,7 @@
# 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.
@@ -13,7 +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.
## Debugging source locally
## Working with the Umbraco source code
Did you read ["Are you sure"](#are-you-sure)?
@@ -21,73 +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.
> [!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.
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...
#### Debugging with VS Code
### Prerequisites
In order to build the Umbraco source code locally with Visual Studio Code, first make sure you have the following installed.
In order to work with the Umbraco source code locally, first make sure you have the following installed.
- [Visual Studio Code](https://code.visualstudio.com/)
- 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/)
Open the root folder of the repository in Visual Studio Code.
### Familiarizing yourself with the code
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 Build`.
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.
You can also run the tasks manually on the command line:
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 build:for:cms
cd <solution root>\src\Umbraco.Web.UI
dotnet run --no-build
```
If you want to make changes to the UI, you can choose to run a front-end development server. To learn more please read the Umbraco.Web.UI.Client README.md [Run against a local Umbraco instance](../src/Umbraco.Web.UI.Client/.github/README.md#run-against-a-local-umbraco-instance) for more information.
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.
To run the C# portion of the project, either hit <kbd>F5</kbd> to begin debugging, or manually using the command line:
### Front-end only changes
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 v20+](https://nodejs.org/en/download/)
- npm v10+ (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.
Umbraco 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. There are two web projects in the solution, `Umbraco.Web.UI.Client` and `Umbraco.Web.UI.Login`. They each have their own build process and can be run separately. 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. It will automatically restore and build the client projects when you run it.
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 want to watch the UI Client to `Umbraco.Web.UI` then you can open a terminal in `src/Umbraco.Web.UI.Client` where you can run `npm run dev:mock` manually. This will launch the Vite dev server on http://localhost:5173 and watch for changes with mocked API responses.
```
cd <solution root>\src\Umbraco.Web.UI.Login
npm run build
```
You can also run `npm run dev:server` to run the Vite server against a local Umbraco instance. In this case, you need to have the .NET project running and accept connections from the Vite server. Please see the Umbraco.Web.UI.Client README.md [Run against a local Umbraco instance](../src/Umbraco.Web.UI.Client/.github/README.md#run-against-a-local-umbraco-instance) for more information.
In both front-end projects, if you've refreshed your branch from the latest on GitHub you may need to update front-end dependencies.
**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.**
To do that, run:
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.
```
npm ci --no-fund --no-audit --prefer-offline
```
### Full-stack changes
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.
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
@@ -148,5 +186,4 @@ 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).
[ 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 "
[ disable browser caching ]: https://techwiser.com/disable-cache-google-chrome-firefox "Instructions on how to disable browser caching in Chrome and Firefox"
+32 -23
View File
@@ -1,58 +1,67 @@
# Contributing to Umbraco CMS
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
👍🎉 First of all, thanks for taking the time to contribute! 🎉👍
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.
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 judgment, 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)
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](img/forkrepositorynew.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)
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/cloneforknew.png)
3. **Switch to the correct branch**
Switch to the `contrib` branch
Switch to the `main` 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 `main` 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 `main`, 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 .NET or the command line.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
6. **Change**
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
7. **Commit and push**
Done? Yay! 🎉
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**
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`) you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instuctions.
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`), you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instructions.
Want to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
Would you like to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
## 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 -1
View File
@@ -114,7 +114,7 @@ To declare the Published Cache Status Dashboard as a new manifest, we need to ad
},
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
alias: UMB_SECTION_ALIAS_CONDITION_ALIAS,
match: 'Umb.Section.Settings',
},
],
+223
View File
@@ -0,0 +1,223 @@
# **Contributing to Localization in the Backoffice**
Do you want to help keep our translations accurate and up to standard? 🌍✨
Your input makes a real difference! By reviewing, refining, or suggesting improvements, you ensure that our translations remain clear, consistent, and user-friendly for everyone.
## **How Can I Contribute?**
To contribute to localization in the Backoffice, follow this step-by-step guide:
### **1. Change the Language in Backoffice**
1. Open the Backoffice, click on your profile icon in the top-right corner, and select "Edit."
![Menubar profile image](/.github/img/contributing/ProfileImage.png "Menubar profile image")
![Edit button inside profile](/.github/img/contributing/editBtn.png "Edit button inside profile")
2. Under "UI Culture," select the language you want to review from the dropdown menu.
![Dropdown of languages in Umbraco](/.github/img/contributing/uiCulture.png "Dropdown of languages in Umbraco")
### **2. Find a Translation Error**
1. Navigate through the Backoffice and check if everything is translated correctly.
2. When you find a translation error, right-click on it and select "Inspect."
3. Look for the nearest element that starts with `umb-` and has a name indicating something specific to the given location.
**Example:**
* The closest parent element should be specific, such as `umb-document-type-workspace-view-settings` instead of a generic element like `umb-property-layout.`
### **3. Find the Code in VS Code**
1. Open VS Code and search for the nearest `umb-` element you identified.
![Search for nearest umb element in code](/.github/img/contributing/searchInVsCode.png "Search for nearest umb element in code")
2. Scroll down to find `render() {` and look for the element label that needs updating.
![Find render and label in code](/.github/img/contributing/renderCode.png "Find render and label in code")
3. If the label is hardcoded, it must be updated.
**Example:**
`label="Vary by culture"`
### **4. Find the Correct Translation**
1. Open the `en.ts` or `en-us.ts` file and search for relevant keywords. \
\
**Example:**
* If the text is "Vary by culture," search for `vary`, `culture`, or `Vary by culture`.
2. Once you find the translation, take the element name and search for it in the target language file (e.g., `da-dk.ts` for Danish).
![Search for translation in language files](/.github/img/contributing/searchingThroughLanguageFiles.png "Search for translation in language files")
3. If a translation exists, insert it into the label element found earlier.
### **5. Insert the Translation**
To display the new translation correctly, insert the following code inside the label element:
`${this.localize.term('action_key')}`
Replace `action_key` with the correct translation key.
**Example:**
`${this.localize.term('contentTypeEditor_allowVaryByCulture')}`
![Localization code snippet](/.github/img/contributing/localizationCodeSnippetInCode.png "Localization code snippet")
Save the changes and return to the Backoffice to see the update.
![Changes in backoffice after changes in code](/.github/img/contributing/changedBackofficeAfterLocalization.png "Changes in backoffice after changes in code")
### **6. Commit and Push**
1. Commit your changes to a new temporary branch (avoid committing directly to `contrib`).
2. Push the changes to your fork on GitHub.
### **7. Create a Pull Request**
1. In your forked repository on GitHub (`https://github.com/[YourUsername]/Umbraco-CMS`), a banner will appear stating that you pushed a new branch.
2. Click the button to create a pull request and follow the instructions.
## **I Cant Find the Correct Translation**
If you cant find the translation you need, it may not exist yet. In this case, you can create a new action with related keys.
### **1. Ensure It Doesnt Already Exist**
Search thoroughly in `en.ts` or `en-us.ts` for all relevant keywords.
### **2. Create an Action**
1. Choose a meaningful name for the action to avoid confusion. \
\
**Example:** Translation for the Data Type "Color Picker."
* **Good name:** `colorPickerConfigurations`
* **Bad name:** `colorpicker`
2. A specific action name prevents unnecessarily long key names.
3. Define the action:
### **3. Create Keys**
1. Use clear and descriptive key names. \
\
**Example:**
* **Good name:** `colorsTitle`
* **Bad name:** `colors`
2. Add the necessary keys inside the action with proper translations.
![Action and related Keys in language files](/.github/img/contributing/actionAndKeys.png "Action and related Keys in language files")
## **I Cant Find a <code>render()</code> Code in VS Code**
In some cases, such as Data Types, the label might not be inside `render()`. Instead, it may be in a manifest file.
### 1. Search for the Text
Copy the text from the Backoffice and search for it in the code.
### 2. Open the Manifest File
Once you find the relevant manifest file, open it to confirm youre in the right place.
### 3. Change the Label
In Markdown files, localization is slightly different. Instead of:
`${this.localize.term('action_key')}`
Use: `#action_key`
**Example:**
`#colorPickerConfigurations_showLabelTitle`
### 4. Change the Description
For descriptions in Markdown files, use:
`{umbLocalize: action_key}`
**Example:**
`{umbLocalize: colorPickerConfigurations_showLabelDescription}`
### 5. Save and Verify
Once all changes are made, your manifest should look something like this:
![Localization changes to manifest files](/.github/img/contributing/finishedManifestAfterLocalizatonChanges.png "Localization changes to manifest files")
---
### Thank you
Following these steps ensures that the Umbraco Backoffice remains accessible and user-friendly in all supported languages. Thanks for contributing! 🎉
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

+57
View File
@@ -0,0 +1,57 @@
name: Backoffice Static Web Apps CI/CD
on:
push:
branches:
- main
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- src/Umbraco.Web.UI.Client/src/**
- .github/workflows/azure-backoffice.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
- v*/dev
- v*/main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/backoffice') && github.repository == github.event.pull_request.head.repo.full_name)
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: main
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/Umbraco.Web.UI.Client" # App source code path
app_build_command: "npm run build:for:static"
output_location: "dist" # Built app content directory - optional
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/backoffice') && github.repository == github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "src/Umbraco.Web.UI.Client"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
action: "close"
+58
View File
@@ -0,0 +1,58 @@
name: Storybook CI/CD
on:
push:
branches:
- main
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- src/Umbraco.Web.UI.Client/src/**
- .github/workflows/azure-storybook.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
- v*/dev
- v*/main
env:
NODE_OPTIONS: --max_old_space_size=16384
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/storybook') && github.repository == github.event.pull_request.head.repo.full_name)
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: main
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_SEA_0C7411A03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/Umbraco.Web.UI.Client" # App source code path
app_build_command: "npm run storybook:build"
output_location: "/storybook-static" # Built app content directory - optional
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'preview/storybook') && github.repository == github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "src/Umbraco.Web.UI.Client"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_SEA_0C7411A03 }}
action: "close"
+4 -4
View File
@@ -4,15 +4,15 @@ on:
push:
branches:
- "*/dev"
- "*/contrib"
- "contrib"
- "*/main"
- "main"
- "release/*"
pull_request:
# The branches below must be a subset of the branches above
branches:
- "*/dev"
- "*/contrib"
- "contrib"
- "*/main"
- "main"
- "release/*"
schedule:
- cron: "33 2 * * 1"
+6 -2
View File
@@ -3,16 +3,18 @@ name: Test Backoffice
on:
push:
branches:
- contrib
- main
- release/*
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/**
pull_request:
branches:
- contrib
- main
- release/*
- v*/dev
- v*/main
paths:
- src/Umbraco.Web.UI.Client/**
@@ -43,6 +45,8 @@ jobs:
- 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
+2
View File
@@ -62,6 +62,7 @@
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
"postDebugTask": "kill-umbraco-web-ui",
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
@@ -96,6 +97,7 @@
"stopAtEntry": false,
"requireExactSource": false,
"checkForDevCert": true,
"postDebugTask": "kill-umbraco-web-ui",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:44339",
+1
View File
@@ -0,0 +1 @@
../src/Umbraco.Web.UI.Client/.vscode/lit.code-snippets
+8
View File
@@ -0,0 +1,8 @@
{
"cSpell.words": ["unprovide"],
"eslint.useFlatConfig": true,
"eslint.workingDirectories": [
"./src/Umbraco.Web.UI.Client/",
"./src/Umbraco.Web.UI.Login/"
]
}
+85 -74
View File
@@ -1,76 +1,87 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"detail": "Builds the client and SLN",
"promptOnClose": true,
"group": "build",
"dependsOn": [
"Client Build",
"Dotnet build"
],
"problemMatcher": []
},
{
"label": "Client Install",
"detail": "install npm for Umbraco.Web.UI.Client",
"promptOnClose": true,
"type": "npm",
"script": "install",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Build",
"detail": "runs npm run build for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "build:for:cms",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Watch",
"detail": "runs npm run dev for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "dev",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Dotnet build",
"detail": "Dotnet build of SLN",
"promptOnClose": true,
"group": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/umbraco.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Dotnet watch",
"detail": "Dotnet run and watch of Web.UI",
"promptOnClose": true,
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"detail": "Builds the client and SLN",
"promptOnClose": true,
"group": "build",
"dependsOn": ["Client Build", "Dotnet build"],
"problemMatcher": []
},
{
"label": "Client Install",
"detail": "install npm for Umbraco.Web.UI.Client",
"promptOnClose": true,
"type": "npm",
"script": "install",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Build",
"detail": "runs npm run build for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "build:for:cms",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Client Watch",
"detail": "runs npm run dev for Umbraco.Web.UI.Client",
"promptOnClose": true,
"group": "build",
"type": "npm",
"script": "dev",
"path": "src/Umbraco.Web.UI.Client/",
"problemMatcher": []
},
{
"label": "Dotnet build",
"detail": "Dotnet build of SLN",
"promptOnClose": true,
"group": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/umbraco.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Dotnet watch",
"detail": "Dotnet run and watch of Web.UI",
"promptOnClose": true,
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "kill-umbraco-web-ui",
"type": "shell",
"problemMatcher": [],
"osx": {
"command": "pkill -f Umbraco.Web.UI"
},
"linux": {
"command": "pkill -f Umbraco.Web.UI"
},
"windows": {
"command": "taskkill /IM Umbraco.Web.UI.exe /F"
}
}
]
}
+2 -1
View File
@@ -20,6 +20,7 @@
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
@@ -40,7 +41,7 @@
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>15.0.0</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion>16.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
</PropertyGroup>
+55 -52
View File
@@ -5,99 +5,102 @@
</PropertyGroup>
<!-- Global packages (private, build-time packages for all projects) -->
<ItemGroup>
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<GlobalPackageReference Include="Umbraco.Code" Version="2.2.0" />
<GlobalPackageReference Include="Umbraco.Code" Version="2.3.0" />
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
</ItemGroup>
<!-- Microsoft packages -->
<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.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.Hybrid" Version="9.0.0-preview.9.24556.5" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.13.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.4" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.4" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.4" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="9.4.0" />
</ItemGroup>
<!-- Umbraco packages -->
<ItemGroup>
<PackageVersion Include="Umbraco.JsonSchema.Extensions" Version="0.3.0" />
<PackageVersion Include="Umbraco.CSharpTest.Net.Collections" Version="15.0.0" />
</ItemGroup>
<!-- Third-party packages -->
<ItemGroup>
<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.6.0" />
<PackageVersion Include="Examine.Core" Version="3.5.0" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.71" />
<PackageVersion Include="JsonPatch.Net" Version="3.1.1" />
<PackageVersion Include="Examine" Version="3.7.1" />
<PackageVersion Include="Examine.Core" Version="3.7.1" />
<PackageVersion Include="HtmlAgilityPack" Version="1.12.1" />
<PackageVersion Include="JsonPatch.Net" Version="3.3.0" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="MailKit" Version="4.8.0" />
<PackageVersion Include="MailKit" Version="4.11.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="MessagePack" Version="3.1.3" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
<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="Serilog.AspNetCore" Version="8.0.3" />
<PackageVersion Include="OpenIddict.Abstractions" Version="6.2.1" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="6.2.1" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="6.2.1" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageVersion Include="Serilog.Enrichers.Process" Version="3.0.0" />
<PackageVersion Include="Serilog.Enrichers.Thread" Version="4.0.0" />
<PackageVersion Include="Serilog.Expressions" Version="5.0.0" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="9.0.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="3.0.0" />
<PackageVersion Include="Serilog.Formatting.Compact.Reader" Version="4.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.4" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="9.0.0" />
<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.6" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.1.0" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.4" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="8.1.1" />
</ItemGroup>
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
<ItemGroup>
<!-- 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" />
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Azure.Identity" Version="1.13.2" />
<!-- Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of System.Runtime.Caching -->
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
<PackageVersion Include="System.Runtime.Caching" Version="9.0.4" />
<!-- 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" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="9.0.4" />
<!-- 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" />
<!-- 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" />
<!-- 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.8.0" />
<!-- 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" />
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.4" />
<!-- NPoco.SqlServer brings in a vulnerable version of Microsoft.Data.SqlClient -->
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.0.1" />
<!-- Examine.Lucene brings in a vulnerable version of Lucene.Net.Replicator -->
<PackageVersion Include="Lucene.Net.Replicator" Version="4.8.0-beta00017" />
</ItemGroup>
</Project>
</Project>
+571
View File
@@ -0,0 +1,571 @@
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
---
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"
}
]
}
+105 -29
View File
@@ -9,6 +9,11 @@ parameters:
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
@@ -427,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'))
@@ -484,6 +516,8 @@ 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
@@ -492,22 +526,22 @@ stages:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=1/3"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=2/3"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=3/3"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=1/3"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=2/3"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=3/3"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -533,7 +567,8 @@ stages:
"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
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json
CONSOLE_ERRORS_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/console-errors.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
@@ -586,14 +621,13 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
@@ -603,11 +637,11 @@ stages:
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
condition: and(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'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
@@ -617,13 +651,32 @@ stages:
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
# Copy console error log
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/console-errors.json) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/console-errors.json $(Build.ArtifactStagingDirectory)
}
displayName: Copy console error log
condition: succeededOrFailed()
# Publish test artifacts
- 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)"
- job:
displayName: E2E Tests (SQL Server)
variables:
@@ -634,29 +687,29 @@ stages:
matrix:
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
LinuxPart1Of3:
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
testCommand: "npm run smokeTest -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
testCommand: "npm run smokeTest -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
testCommand: "npm run smokeTest -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
testCommand: "npm run smokeTest -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
testCommand: "npm run smokeTest -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
testCommand: "npm run smokeTest -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -681,7 +734,8 @@ stages:
"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
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json
CONSOLE_ERRORS_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/console-errors.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
@@ -743,14 +797,13 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
@@ -760,20 +813,20 @@ stages:
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
condition: and(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'))
condition: and(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'))
condition: eq(variables['Agent.OS'], 'Linux')
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
condition: eq(variables['Agent.OS'], 'Windows_NT')
# Copy artifacts
- pwsh: |
@@ -783,13 +836,32 @@ stages:
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
# Copy console error log
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/console-errors.json) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/console-errors.json $(Build.ArtifactStagingDirectory)
}
displayName: Copy console error log
condition: succeededOrFailed()
# Publish test artifacts
- 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)"
###############################################
## Release
###############################################
@@ -798,10 +870,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
@@ -863,6 +937,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
+103 -37
View File
@@ -8,8 +8,16 @@ schedules:
displayName: Daily midnight build
branches:
include:
- v14/dev
- v15/dev
- release/16.0
- main
parameters:
# Skipped due to DB locks
- name: sqliteAcceptanceTests
displayName: Run SQLite Acceptance Tests
type: boolean
default: false
variables:
nodeVersion: 20
@@ -32,25 +40,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:
@@ -62,7 +62,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:
@@ -74,6 +74,33 @@ stages:
targetPath: $(Build.SourcesDirectory)
artifactName: build_output
- 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: E2E
displayName: E2E Tests
dependsOn: Build
@@ -102,6 +129,7 @@ stages:
# E2E Tests
- job:
displayName: E2E Tests (SQLite)
condition: eq(${{parameters.sqliteAcceptanceTests}}, True)
timeoutInMinutes: 180
variables:
# Connection string
@@ -111,22 +139,22 @@ stages:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run test -- --shard=1/3"
testCommand: "npm run testSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run test -- --shard=2/3"
testCommand: "npm run testSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run test -- --shard=3/3"
testCommand: "npm run testSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run test -- --shard=1/3"
testCommand: "npm run testSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run test -- --shard=2/3"
testCommand: "npm run testSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run test -- --shard=3/3"
testCommand: "npm run testSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -152,7 +180,8 @@ stages:
"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
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json
CONSOLE_ERRORS_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/console-errors.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
@@ -208,9 +237,9 @@ stages:
displayName: Wait for application
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
# Install Playwright and dependencies
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
@@ -240,6 +269,14 @@ stages:
displayName: Copy Playwright results
condition: succeededOrFailed()
# Copy console error log
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/console-errors.json) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/console-errors.json $(Build.ArtifactStagingDirectory)
}
displayName: Copy console error log
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
@@ -248,6 +285,16 @@ stages:
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)"
- job:
displayName: E2E Tests (SQL Server)
timeoutInMinutes: 180
@@ -258,29 +305,29 @@ stages:
strategy:
matrix:
LinuxPart1Of3:
testCommand: "npm run testSqlite -- --shard=1/3"
testCommand: "npm run test -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run testSqlite -- --shard=2/3"
testCommand: "npm run test -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run testSqlite -- --shard=3/3"
testCommand: "npm run test -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);Encrypt=True;TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run testSqlite -- --shard=1/3"
testCommand: "npm run test -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run testSqlite -- --shard=2/3"
testCommand: "npm run test -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run testSqlite -- --shard=3/3"
testCommand: "npm run test -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -305,7 +352,8 @@ stages:
"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
STORAGE_STAGE_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/playwright/.auth/user.json
CONSOLE_ERRORS_PATH=$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/console-errors.json" | Out-File .env
displayName: Generate .env
workingDirectory: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest
@@ -371,8 +419,8 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
@@ -411,6 +459,14 @@ stages:
displayName: Copy Playwright results
condition: succeededOrFailed()
# Copy console error log
- pwsh: |
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/console-errors.json) {
Copy-Item tests/Umbraco.Tests.AcceptanceTest/console-errors.json $(Build.ArtifactStagingDirectory)
}
displayName: Copy console error log
condition: succeededOrFailed()
# Publish
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
@@ -418,3 +474,13 @@ stages:
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)"
+1 -2
View File
@@ -9,9 +9,8 @@ schedules:
branches:
include:
- v10/dev
- v12/dev
- v13/dev
- v14/dev
- main
steps:
- checkout: none
@@ -7,7 +7,6 @@ using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.Configuration;
@@ -18,13 +17,6 @@ public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOpt
private readonly ISchemaIdSelector _schemaIdSelector;
private readonly ISubTypesSelector _subTypesSelector;
[Obsolete("Use non-obsolete constructor. This will be removed in Umbraco 16.")]
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector)
: this(operationIdSelector, schemaIdSelector, StaticServiceProvider.Instance.GetRequiredService<ISubTypesSelector>())
{ }
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector,
@@ -18,7 +18,7 @@ public class ProcessRequestContextHandler
var backOfficePathSegment = Constants.System.DefaultUmbracoPath.TrimStart(Constants.CharArrays.Tilde)
.EnsureStartsWith('/')
.EnsureEndsWith('/');
_pathsToHandle = [backOfficePathSegment, "/.well-known/openid-configuration"];
_pathsToHandle = [backOfficePathSegment, "/.well-known/openid-configuration", "/.well-known/jwks"];
}
public ValueTask HandleAsync(OpenIddictServerEvents.ProcessRequestContext context)
@@ -5,8 +5,5 @@ namespace Umbraco.Cms.Api.Common.OpenApi;
public interface IOperationIdSelector
{
[Obsolete("Use overload that only takes ApiDescription instead. This will be removed in Umbraco 15.")]
string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions);
string? OperationId(ApiDescription apiDescription);
}
@@ -16,9 +16,6 @@ public class OperationIdSelector : IOperationIdSelector
public OperationIdSelector(IEnumerable<IOperationIdHandler> operationIdHandlers)
=> _operationIdHandlers = operationIdHandlers;
[Obsolete("Use overload that only takes ApiDescription instead. This will be removed in Umbraco 15.")]
public virtual string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions) => OperationId(apiDescription);
public virtual string? OperationId(ApiDescription apiDescription)
{
IOperationIdHandler? handler = _operationIdHandlers.FirstOrDefault(h => h.CanHandle(apiDescription));
@@ -10,12 +10,12 @@ namespace Umbraco.Cms.Api.Common.OpenApi;
public class SubTypesSelector : ISubTypesSelector
{
private readonly IOptions<GlobalSettings> _settings;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IEnumerable<ISubTypesHandler> _subTypeHandlers;
private readonly IUmbracoJsonTypeInfoResolver _umbracoJsonTypeInfoResolver;
[Obsolete("The settings parameter is not required anymore, use the other constructor instead. Scheduled for removal in Umbraco 17.")]
public SubTypesSelector(
IOptions<GlobalSettings> settings,
IHostingEnvironment hostingEnvironment,
@@ -23,7 +23,18 @@ public class SubTypesSelector : ISubTypesSelector
IEnumerable<ISubTypesHandler> subTypeHandlers,
IUmbracoJsonTypeInfoResolver umbracoJsonTypeInfoResolver)
{
_settings = settings;
_hostingEnvironment = hostingEnvironment;
_httpContextAccessor = httpContextAccessor;
_subTypeHandlers = subTypeHandlers;
_umbracoJsonTypeInfoResolver = umbracoJsonTypeInfoResolver;
}
public SubTypesSelector(
IHostingEnvironment hostingEnvironment,
IHttpContextAccessor httpContextAccessor,
IEnumerable<ISubTypesHandler> subTypeHandlers,
IUmbracoJsonTypeInfoResolver umbracoJsonTypeInfoResolver)
{
_hostingEnvironment = hostingEnvironment;
_httpContextAccessor = httpContextAccessor;
_subTypeHandlers = subTypeHandlers;
@@ -32,7 +43,7 @@ public class SubTypesSelector : ISubTypesSelector
public IEnumerable<Type> SubTypes(Type type)
{
var backOfficePath = _settings.Value.GetBackOfficePath(_hostingEnvironment);
var backOfficePath = _hostingEnvironment.GetBackOfficePath();
var swaggerPath = $"{backOfficePath}/swagger";
if (_httpContextAccessor.HttpContext?.Request.Path.StartsWithSegments(swaggerPath) ?? false)
@@ -7,7 +7,7 @@ using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
using Umbraco.Extensions;
using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment;
@@ -30,24 +30,21 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
IOptions<SwaggerGenOptions> swaggerGenOptions = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<SwaggerGenOptions>>();
applicationBuilder.UseSwagger(swaggerOptions =>
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
applicationBuilder.UseSwaggerUI(swaggerUiOptions => SwaggerUiConfiguration(swaggerUiOptions, swaggerGenOptions.Value, applicationBuilder));
}
protected virtual bool SwaggerIsEnabled(IApplicationBuilder applicationBuilder)
{
IWebHostEnvironment webHostEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
return webHostEnvironment.IsProduction() is false;
}
=> applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>().IsProduction() is false;
protected virtual string SwaggerRouteTemplate(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
=> $"{GetBackOfficePath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
protected virtual string SwaggerUiRoutePrefix(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
=> $"{GetBackOfficePath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
protected virtual void SwaggerUiConfiguration(
SwaggerUIOptions swaggerUiOptions,
@@ -56,8 +53,7 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
{
swaggerUiOptions.RoutePrefix = SwaggerUiRoutePrefix(applicationBuilder);
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs
.OrderBy(x => x.Value.Title))
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs.OrderBy(x => x.Value.Title))
{
swaggerUiOptions.SwaggerEndpoint($"{name}/swagger.json", $"{apiInfo.Title}");
}
@@ -70,11 +66,6 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
swaggerUiOptions.OAuthUsePkce();
}
private string GetUmbracoPath(IApplicationBuilder applicationBuilder)
{
GlobalSettings settings = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<GlobalSettings>>().Value;
IHostingEnvironment hostingEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>();
return settings.GetBackOfficePath(hostingEnvironment);
}
private string GetBackOfficePath(IApplicationBuilder applicationBuilder)
=> applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>().GetBackOfficePath();
}
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.OutputCaching;
using Microsoft.AspNetCore.OutputCaching;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Primitives;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Caching;
@@ -7,9 +8,13 @@ namespace Umbraco.Cms.Api.Delivery.Caching;
internal sealed class DeliveryApiOutputCachePolicy : IOutputCachePolicy
{
private readonly TimeSpan _duration;
private readonly StringValues _varyByHeaderNames;
public DeliveryApiOutputCachePolicy(TimeSpan duration)
=> _duration = duration;
public DeliveryApiOutputCachePolicy(TimeSpan duration, StringValues varyByHeaderNames)
{
_duration = duration;
_varyByHeaderNames = varyByHeaderNames;
}
ValueTask IOutputCachePolicy.CacheRequestAsync(OutputCacheContext context, CancellationToken cancellationToken)
{
@@ -20,6 +25,7 @@ internal sealed class DeliveryApiOutputCachePolicy : IOutputCachePolicy
context.EnableOutputCaching = requestPreviewService.IsPreview() is false;
context.ResponseExpirationTimeSpan = _duration;
context.CacheVaryByRules.HeaderNames = _varyByHeaderNames;
return ValueTask.CompletedTask;
}
@@ -48,7 +48,7 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
Id = AuthSchemeName,
}
},
new string[] { }
[]
}
}
};
@@ -1,4 +1,3 @@
using System.Diagnostics;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -8,7 +7,6 @@ using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdContentApiController : ContentApiItemControllerBase
{
@@ -21,16 +19,6 @@ public class ByIdContentApiController : ContentApiItemControllerBase
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ById(Guid id)
=> await HandleRequest(id);
/// <summary>
/// Gets a content item by id.
/// </summary>
@@ -8,7 +8,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdsContentApiController : ContentApiItemControllerBase
{
@@ -21,15 +20,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
/// <summary>
/// Gets content items by ids.
/// </summary>
@@ -58,6 +48,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
.WhereNotNull()
.ToArray();
return await Task.FromResult(Ok(apiContentItems));
return Ok(apiContentItems);
}
}
@@ -1,17 +1,13 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByRouteContentApiController : ContentApiItemControllerBase
{
@@ -21,45 +17,6 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
private readonly IRequestMemberAccessService _requestMemberAccessService;
private const string PreviewContentRequestPathPrefix = $"/{Constants.DeliveryApi.Routing.PreviewContentPathPrefix}";
[Obsolete($"Please use the constructor that accepts {nameof(IApiContentPathResolver)}. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRedirectService,
requestPreviewService,
requestMemberAccessService,
StaticServiceProvider.Instance.GetRequiredService<IApiContentPathResolver>())
{
}
[Obsolete($"Please use the non-obsolete constructor. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService,
IApiContentPathResolver apiContentPathResolver)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRedirectService,
requestPreviewService,
requestMemberAccessService,
apiContentPathResolver)
{
}
[ActivatorUtilitiesConstructor]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
@@ -75,16 +32,6 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
_apiContentPathResolver = apiContentPathResolver;
}
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ByRoute(string path = "")
=> await HandleRequest(path);
/// <summary>
/// Gets a content item by route.
/// </summary>
@@ -117,7 +64,7 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
return deniedAccessResult;
}
return await Task.FromResult(Ok(ApiContentResponseBuilder.Build(contentItem)));
return Ok(ApiContentResponseBuilder.Build(contentItem));
}
IApiContentRoute? redirectRoute = _requestRedirectService.GetRedirectRoute(path);
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[DeliveryApiAccess]
[VersionedDeliveryApiRoute("content")]
[ApiExplorerSettings(GroupName = "Content")]
[LocalizeFromAcceptLanguageHeader]
[ContextualizeFromAcceptHeaders]
[ValidateStartItem]
[AddVaryHeader]
[OutputCache(PolicyName = Constants.DeliveryApi.OutputCache.ContentCachePolicy)]
@@ -12,7 +12,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class QueryContentApiController : ContentApiControllerBase
{
@@ -30,20 +29,6 @@ public class QueryContentApiController : ContentApiControllerBase
_requestMemberAccessService = requestMemberAccessService;
}
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
/// <summary>
/// Gets a paginated list of content item(s) from query.
/// </summary>
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models.DeliveryApi;
@@ -8,7 +8,6 @@ using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdMediaApiController : MediaApiControllerBase
{
@@ -19,14 +18,6 @@ public class ByIdMediaApiController : MediaApiControllerBase
{
}
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ById(Guid id)
=> await HandleRequest(id);
/// <summary>
/// Gets a media item by id.
/// </summary>
@@ -36,16 +27,16 @@ public class ByIdMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByIdV20(Guid id)
=> await HandleRequest(id);
public Task<IActionResult> ByIdV20(Guid id)
=> Task.FromResult(HandleRequest(id));
private async Task<IActionResult> HandleRequest(Guid id)
private IActionResult HandleRequest(Guid id)
{
IPublishedContent? media = PublishedMediaCache.GetById(id);
if (media is null)
{
return await Task.FromResult(NotFound());
return NotFound();
}
return Ok(BuildApiMediaWithCrops(media));
@@ -9,7 +9,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdsMediaApiController : MediaApiControllerBase
{
@@ -18,13 +17,6 @@ public class ByIdsMediaApiController : MediaApiControllerBase
{
}
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
/// <summary>
/// Gets media items by ids.
/// </summary>
@@ -33,10 +25,10 @@ public class ByIdsMediaApiController : MediaApiControllerBase
[HttpGet("items")]
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IEnumerable<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
public async Task<IActionResult> ItemsV20([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
public Task<IActionResult> ItemsV20([FromQuery(Name = "id")] HashSet<Guid> ids)
=> Task.FromResult(HandleRequest(ids));
private async Task<IActionResult> HandleRequest(HashSet<Guid> ids)
private IActionResult HandleRequest(HashSet<Guid> ids)
{
IPublishedContent[] mediaItems = ids
.Select(PublishedMediaCache.GetById)
@@ -47,6 +39,6 @@ public class ByIdsMediaApiController : MediaApiControllerBase
.Select(BuildApiMediaWithCrops)
.ToArray();
return await Task.FromResult(Ok(apiMediaItems));
return Ok(apiMediaItems);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.DeliveryApi;
@@ -9,7 +9,6 @@ using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByPathMediaApiController : MediaApiControllerBase
{
@@ -22,14 +21,6 @@ public class ByPathMediaApiController : MediaApiControllerBase
: base(publishedMediaCache, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ByPath(string path)
=> await HandleRequest(path);
/// <summary>
/// Gets a media item by its path.
/// </summary>
@@ -39,17 +30,17 @@ public class ByPathMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByPathV20(string path)
=> await HandleRequest(path);
public Task<IActionResult> ByPathV20(string path)
=> Task.FromResult(HandleRequest(path));
private async Task<IActionResult> HandleRequest(string path)
private IActionResult HandleRequest(string path)
{
path = DecodePath(path);
IPublishedContent? media = _apiMediaQueryService.GetByPath(path);
if (media is null)
{
return await Task.FromResult(NotFound());
return NotFound();
}
return Ok(BuildApiMediaWithCrops(media));
@@ -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;
@@ -14,7 +14,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class QueryMediaApiController : MediaApiControllerBase
{
@@ -27,19 +26,6 @@ public class QueryMediaApiController : MediaApiControllerBase
: base(publishedMediaCache, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
/// <summary>
/// Gets a paginated list of media item(s) from query.
/// </summary>
@@ -53,15 +39,15 @@ public class QueryMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<IActionResult> QueryV20(
public Task<IActionResult> QueryV20(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
=> Task.FromResult(HandleRequest(fetch, filter, sort, skip, take));
private async Task<IActionResult> HandleRequest(string? fetch, string[] filter, string[] sort, int skip, int take)
private IActionResult HandleRequest(string? fetch, string[] filter, string[] sort, int skip, int take)
{
Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> queryAttempt = _apiMediaQueryService.ExecuteQuery(fetch, filter, sort, skip, take);
@@ -79,6 +65,6 @@ public class QueryMediaApiController : MediaApiControllerBase
Items = mediaItems.Select(BuildApiMediaWithCrops)
};
return await Task.FromResult(Ok(model));
return Ok(model);
}
}
@@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using OpenIddict.Abstractions;
@@ -13,7 +12,6 @@ using OpenIddict.Server.AspNetCore;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Extensions;
@@ -33,31 +31,6 @@ public class MemberController : DeliveryApiControllerBase
private readonly DeliveryApiSettings _deliveryApiSettings;
private readonly ILogger<MemberController> _logger;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V16.")]
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
: this(memberSignInManager, memberManager, StaticServiceProvider.Instance.GetRequiredService<IMemberClientCredentialsManager>(), deliveryApiSettings, logger)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V16.")]
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IMemberClientCredentialsManager memberClientCredentialsManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
: this(memberSignInManager, memberManager, memberClientCredentialsManager, deliveryApiSettings, logger)
{
}
[ActivatorUtilitiesConstructor]
public MemberController(
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
@@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Primitives;
using Umbraco.Cms.Api.Common.DependencyInjection;
using Umbraco.Cms.Api.Delivery.Accessors;
using Umbraco.Cms.Api.Delivery.Caching;
@@ -49,6 +50,7 @@ public static class UmbracoBuilderExtensions
: provider.GetRequiredService<RequestContextOutputExpansionStrategyV2>();
});
builder.Services.AddSingleton<IRequestCultureService, RequestCultureService>();
builder.Services.AddSingleton<IRequestSegmmentService, RequestSegmentService>();
builder.Services.AddSingleton<IRequestRoutingService, RequestRoutingService>();
builder.Services.AddSingleton<IRequestRedirectService, RequestRedirectService>();
builder.Services.AddSingleton<IRequestPreviewService, RequestPreviewService>();
@@ -62,7 +64,6 @@ public static class UmbracoBuilderExtensions
builder.Services.AddTransient<IMemberApplicationManager, MemberApplicationManager>();
builder.Services.AddTransient<IRequestMemberAccessService, RequestMemberAccessService>();
builder.Services.AddTransient<ICurrentMemberClaimsProvider, CurrentMemberClaimsProvider>();
builder.Services.AddScoped<IMemberClientCredentialsManager, MemberClientCredentialsManager>();
builder.Services.ConfigureOptions<ConfigureUmbracoDeliveryApiSwaggerGenOptions>();
builder.AddUmbracoApiOpenApiUI();
@@ -110,12 +111,20 @@ public static class UmbracoBuilderExtensions
if (outputCacheSettings.ContentDuration.TotalSeconds > 0)
{
options.AddPolicy(Constants.DeliveryApi.OutputCache.ContentCachePolicy, new DeliveryApiOutputCachePolicy(outputCacheSettings.ContentDuration));
options.AddPolicy(
Constants.DeliveryApi.OutputCache.ContentCachePolicy,
new DeliveryApiOutputCachePolicy(
outputCacheSettings.ContentDuration,
new StringValues([Constants.DeliveryApi.HeaderNames.AcceptLanguage, Constants.DeliveryApi.HeaderNames.AcceptSegment, Constants.DeliveryApi.HeaderNames.StartItem])));
}
if (outputCacheSettings.MediaDuration.TotalSeconds > 0)
{
options.AddPolicy(Constants.DeliveryApi.OutputCache.MediaCachePolicy, new DeliveryApiOutputCachePolicy(outputCacheSettings.MediaDuration));
options.AddPolicy(
Constants.DeliveryApi.OutputCache.MediaCachePolicy,
new DeliveryApiOutputCachePolicy(
outputCacheSettings.MediaDuration,
Constants.DeliveryApi.HeaderNames.StartItem));
}
});
@@ -4,7 +4,7 @@ namespace Umbraco.Cms.Api.Delivery.Filters;
public sealed class AddVaryHeaderAttribute : ActionFilterAttribute
{
private const string Vary = "Accept-Language, Preview, Start-Item";
private const string Vary = "Accept-Language, Accept-Segment, Preview, Start-Item";
public override void OnResultExecuting(ResultExecutingContext context)
=> context.HttpContext.Response.Headers.Vary = context.HttpContext.Response.Headers.Vary.Count > 0
@@ -0,0 +1,53 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class ContextualizeFromAcceptHeadersAttribute : TypeFilterAttribute
{
public ContextualizeFromAcceptHeadersAttribute()
: base(typeof(LocalizeFromAcceptLanguageHeaderAttributeFilter))
{
}
private class LocalizeFromAcceptLanguageHeaderAttributeFilter : IActionFilter
{
private readonly IRequestCultureService _requestCultureService;
private readonly IRequestSegmmentService _requestSegmentService;
private readonly IVariationContextAccessor _variationContextAccessor;
public LocalizeFromAcceptLanguageHeaderAttributeFilter(
IRequestCultureService requestCultureService,
IRequestSegmmentService requestSegmentService,
IVariationContextAccessor variationContextAccessor)
{
_requestCultureService = requestCultureService;
_requestSegmentService = requestSegmentService;
_variationContextAccessor = variationContextAccessor;
}
public void OnActionExecuting(ActionExecutingContext context)
{
var requestedCulture = _requestCultureService.GetRequestedCulture().NullOrWhiteSpaceAsNull();
var requestedSegment = _requestSegmentService.GetRequestedSegment().NullOrWhiteSpaceAsNull();
if (requestedCulture.IsNullOrWhiteSpace() && requestedSegment.IsNullOrWhiteSpace())
{
return;
}
// contextualize the request
// NOTE: request culture or segment can be null here (but not both), so make sure to retain any existing
// context by means of fallback to current variation context (if available)
_variationContextAccessor.VariationContext = new VariationContext(
requestedCulture ?? _variationContextAccessor.VariationContext?.Culture,
requestedSegment ?? _variationContextAccessor.VariationContext?.Segment);
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -1,37 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Filters;
internal sealed class LocalizeFromAcceptLanguageHeaderAttribute : TypeFilterAttribute
{
public LocalizeFromAcceptLanguageHeaderAttribute()
: base(typeof(LocalizeFromAcceptLanguageHeaderAttributeFilter))
{
}
private class LocalizeFromAcceptLanguageHeaderAttributeFilter : IActionFilter
{
private readonly IRequestCultureService _requestCultureService;
public LocalizeFromAcceptLanguageHeaderAttributeFilter(IRequestCultureService requestCultureService)
=> _requestCultureService = requestCultureService;
public void OnActionExecuting(ActionExecutingContext context)
{
var requestedCulture = _requestCultureService.GetRequestedCulture();
if (requestedCulture.IsNullOrWhiteSpace())
{
return;
}
_requestCultureService.SetRequestCulture(requestedCulture);
}
public void OnActionExecuted(ActionExecutedContext context)
{
}
}
}
@@ -1,4 +1,4 @@
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Delivery.Configuration;
@@ -21,7 +21,7 @@ internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFi
operation.Parameters.Add(new OpenApiParameter
{
Name = "Accept-Language",
Name = Core.Constants.DeliveryApi.HeaderNames.AcceptLanguage,
In = ParameterLocation.Header,
Required = false,
Description = "Defines the language to return. Use this when querying language variant content items.",
@@ -33,11 +33,25 @@ internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFi
}
});
operation.Parameters.Add(new OpenApiParameter
{
Name = Core.Constants.DeliveryApi.HeaderNames.AcceptSegment,
In = ParameterLocation.Header,
Required = false,
Description = "Defines the segment to return. Use this when querying segment variant content items.",
Schema = new OpenApiSchema { Type = "string" },
Examples = new Dictionary<string, OpenApiExample>
{
{ "Default", new OpenApiExample { Value = new OpenApiString(string.Empty) } },
{ "Segment One", new OpenApiExample { Value = new OpenApiString("segment-one") } }
}
});
AddApiKey(operation);
operation.Parameters.Add(new OpenApiParameter
{
Name = "Preview",
Name = Core.Constants.DeliveryApi.HeaderNames.Preview,
In = ParameterLocation.Header,
Required = false,
Description = "Whether to request draft content.",
@@ -46,7 +60,7 @@ internal sealed class SwaggerContentDocumentationFilter : SwaggerDocumentationFi
operation.Parameters.Add(new OpenApiParameter
{
Name = "Start-Item",
Name = Core.Constants.DeliveryApi.HeaderNames.StartItem,
In = ParameterLocation.Header,
Required = false,
Description = "URL segment or GUID of a root content item.",
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
@@ -63,7 +63,7 @@ internal abstract class SwaggerDocumentationFilterBase<TBaseController>
protected void AddApiKey(OpenApiOperation operation) =>
operation.Parameters.Add(new OpenApiParameter
{
Name = "Api-Key",
Name = Core.Constants.DeliveryApi.HeaderNames.ApiKey,
In = ParameterLocation.Header,
Required = false,
Description = "API key specified through configuration to authorize access to the API.",
@@ -91,7 +91,7 @@ internal sealed class InitializeMemberApplicationNotificationHandler : INotifica
}
}
private bool ValidateRedirectUrls(Uri[] redirectUrls)
private bool ValidateRedirectUrls(IEnumerable<Uri> redirectUrls)
{
if (redirectUrls.Any() is false)
{
@@ -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,4 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DeliveryApi;
@@ -29,7 +29,7 @@ internal sealed class ApiAccessService : RequestHeaderHandler, IApiAccessService
private bool IfEnabled(Func<bool> condition) => _deliveryApiSettings.Enabled && condition();
private bool HasValidApiKey() => _deliveryApiSettings.ApiKey.IsNullOrWhiteSpace() == false
&& _deliveryApiSettings.ApiKey.Equals(GetHeaderValue("Api-Key"));
&& _deliveryApiSettings.ApiKey.Equals(GetHeaderValue(Core.Constants.DeliveryApi.HeaderNames.ApiKey));
private bool IfMediaEnabled(Func<bool> condition) => _deliveryApiSettings is { Enabled: true, Media.Enabled: true } && condition();
}
@@ -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>
@@ -2,17 +2,15 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Net.Http.Headers;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Api.Delivery.Services;
internal sealed partial class RequestCultureService : RequestHeaderHandler, IRequestCultureService
{
private readonly IVariationContextAccessor _variationContextAccessor;
public RequestCultureService(IHttpContextAccessor httpContextAccessor, IVariationContextAccessor variationContextAccessor)
: base(httpContextAccessor) =>
_variationContextAccessor = variationContextAccessor;
public RequestCultureService(IHttpContextAccessor httpContextAccessor)
: base(httpContextAccessor)
{
}
/// <inheritdoc />
public string? GetRequestedCulture()
@@ -21,15 +19,10 @@ internal sealed partial class RequestCultureService : RequestHeaderHandler, IReq
return ValidLanguageHeaderRegex().IsMatch(acceptLanguage) ? acceptLanguage : null;
}
/// <inheritdoc />
[Obsolete("Use IVariationContextAccessor to manipulate the variation context. Scheduled for removal in V17.")]
public void SetRequestCulture(string culture)
{
if (_variationContextAccessor.VariationContext?.Culture == culture)
{
return;
}
_variationContextAccessor.VariationContext = new VariationContext(culture);
// no-op
}
// at the time of writing we're introducing this to get rid of accept-language header values like "en-GB,en-US;q=0.9,en;q=0.8",
@@ -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(Core.Constants.DeliveryApi.HeaderNames.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;
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Routing;
@@ -11,14 +10,19 @@ namespace Umbraco.Cms.Api.Delivery.Services;
internal sealed class RequestRoutingService : RoutingServiceBase, IRequestRoutingService
{
private readonly IRequestCultureService _requestCultureService;
private readonly IVariationContextAccessor _variationContextAccessor;
public RequestRoutingService(
IDomainCache domainCache,
IHttpContextAccessor httpContextAccessor,
IRequestStartItemProviderAccessor requestStartItemProviderAccessor,
IRequestCultureService requestCultureService)
: base(domainCache, httpContextAccessor, requestStartItemProviderAccessor) =>
IRequestCultureService requestCultureService,
IVariationContextAccessor variationContextAccessor)
: base(domainCache, httpContextAccessor, requestStartItemProviderAccessor)
{
_requestCultureService = requestCultureService;
_variationContextAccessor = variationContextAccessor;
}
/// <inheritdoc />
public string GetContentRoute(string requestedPath)
@@ -50,9 +54,14 @@ internal sealed class RequestRoutingService : RoutingServiceBase, IRequestRoutin
}
// the Accept-Language header takes precedence over configured domain culture
if (domainAndUri.Culture != null && _requestCultureService.GetRequestedCulture().IsNullOrWhiteSpace())
if (domainAndUri.Culture != null
&& _requestCultureService.GetRequestedCulture().IsNullOrWhiteSpace()
&& _variationContextAccessor.VariationContext?.Culture != domainAndUri.Culture)
{
_requestCultureService.SetRequestCulture(domainAndUri.Culture);
// update the variation context to match the requested domain culture while retaining any contextualized segment
_variationContextAccessor.VariationContext = new VariationContext(
culture: domainAndUri.Culture,
segment: _variationContextAccessor.VariationContext?.Segment);
}
// when resolving content from a configured domain, the content cache expects the content route
@@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Services;
internal sealed class RequestSegmentService : RequestHeaderHandler, IRequestSegmmentService
{
public RequestSegmentService(IHttpContextAccessor httpContextAccessor)
: base(httpContextAccessor)
{
}
/// <inheritdoc />
public string? GetRequestedSegment()
=> GetHeaderValue(Core.Constants.DeliveryApi.HeaderNames.AcceptSegment);
}
@@ -60,5 +60,5 @@ internal sealed class RequestStartItemProvider : RequestHeaderHandler, IRequestS
}
/// <inheritdoc/>
public string? RequestedStartItem() => GetHeaderValue("Start-Item");
public string? RequestedStartItem() => GetHeaderValue(Constants.DeliveryApi.HeaderNames.StartItem);
}
@@ -36,7 +36,7 @@ internal abstract class RoutingServiceBase
}
protected static string GetContentRoute(DomainAndUri domainAndUri, Uri contentRoute)
=> $"{domainAndUri.ContentId}{DomainUtilities.PathRelativeToDomain(domainAndUri.Uri, contentRoute.AbsolutePath)}";
=> $"{domainAndUri.ContentId}{DomainUtilities.PathRelativeToDomain(domainAndUri.Uri, contentRoute.LocalPath)}"; // Use LocalPath over AbsolutePath to keep the path decoded.
protected DomainAndUri? GetDomainAndUriForRoute(Uri contentUrl)
{
@@ -22,6 +22,9 @@
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.Integration</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
@@ -24,7 +24,7 @@ public class BackOfficeLoginModel
public bool UserIsAlreadyLoggedIn { get; set; }
}
[ApiExplorerSettings(IgnoreApi=true)]
[ApiExplorerSettings(IgnoreApi = true)]
[Route(LoginPath)]
public class BackOfficeLoginController : Controller
{
@@ -51,7 +51,7 @@ public class BackOfficeLoginController : Controller
if (string.IsNullOrEmpty(model.UmbracoUrl))
{
model.UmbracoUrl = _hostingEnvironment.ToAbsolute(Constants.System.DefaultUmbracoPath);
model.UmbracoUrl = _hostingEnvironment.GetBackOfficePath();
}
if (string.IsNullOrEmpty(model.ReturnUrl))
@@ -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
{
@@ -27,6 +27,10 @@ public abstract class ContentControllerBase : ManagementApiControllerBase
.WithTitle("Content type culture variance mismatch")
.WithDetail("The content type variance did not match that of the passed content data.")
.Build()),
ContentEditingOperationStatus.ContentTypeSegmentVarianceMismatch => BadRequest(problemDetailsBuilder
.WithTitle("Content type segment variance mismatch")
.WithDetail("The content type variance did not match that of the passed content data.")
.Build()),
ContentEditingOperationStatus.NotFound => NotFound(problemDetailsBuilder
.WithTitle("The content could not be found")
.Build()),
@@ -76,6 +80,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,4 @@
using System.Globalization;
using System.Globalization;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -28,7 +28,7 @@ public class AllCultureController : CultureControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<CultureReponseModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<CultureReponseModel>> GetAll(CancellationToken cancellationToken, int skip = 0, int take = 100)
public Task<PagedViewModel<CultureReponseModel>> GetAll(CancellationToken cancellationToken, int skip = 0, int take = 100)
{
CultureInfo[] all = _cultureService.GetValidCultureInfos();
@@ -38,6 +38,6 @@ public class AllCultureController : CultureControllerBase
Total = all.Length
};
return await Task.FromResult(viewModel);
return Task.FromResult(viewModel);
}
}
@@ -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;
@@ -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;
@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.Tree;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.DataType.Tree;
public class SiblingsDataTypeTreeController : DataTypeTreeControllerBase
{
public SiblingsDataTypeTreeController(IEntityService entityService, IDataTypeService dataTypeService)
: base(entityService, dataTypeService)
{
}
[HttpGet("siblings")]
[ProducesResponseType(typeof(IEnumerable<DataTypeTreeItemResponseModel>), StatusCodes.Status200OK)]
public Task<ActionResult<IEnumerable<DataTypeTreeItemResponseModel>>> Siblings(CancellationToken cancellationToken, Guid target, int before, int after)
=> GetSiblings(target, before, after);
}
@@ -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,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Mapping;
@@ -38,6 +38,6 @@ public class AllDictionaryController : DictionaryControllerBase
Total = items.Length,
Items = _umbracoMapper.MapEnumerable<IDictionaryItem, DictionaryOverviewResponseModel>(items.Skip(skip).Take(take))
};
return await Task.FromResult(model);
return model;
}
}
@@ -28,7 +28,7 @@ public class DictionaryTreeControllerBase : NamedEntityTreeControllerBase<NamedE
protected IDictionaryItemService DictionaryItemService { get; }
protected async Task<IEnumerable<NamedEntityTreeItemResponseModel>> MapTreeItemViewModels(IEnumerable<IDictionaryItem> dictionaryItems)
=> await Task.WhenAll(dictionaryItems.Select(CreateEntityTreeItemViewModelAsync));
=> await MapTreeItemViewModelsAsync(dictionaryItems).ToArrayAsync();
protected override async Task<ActionResult<IEnumerable<NamedEntityTreeItemResponseModel>>> GetAncestors(Guid descendantKey, bool includeSelf = true)
{
@@ -54,10 +54,19 @@ public class DictionaryTreeControllerBase : NamedEntityTreeControllerBase<NamedE
}
}
NamedEntityTreeItemResponseModel[] viewModels = await Task.WhenAll(ancestors.Select(CreateEntityTreeItemViewModelAsync));
NamedEntityTreeItemResponseModel[] viewModels = await MapTreeItemViewModelsAsync(ancestors).ToArrayAsync();
return Ok(viewModels.Reverse());
}
private async IAsyncEnumerable<NamedEntityTreeItemResponseModel> MapTreeItemViewModelsAsync(IEnumerable<IDictionaryItem> dictionaryItems)
{
foreach (IDictionaryItem dictionaryItem in dictionaryItems)
{
yield return await CreateEntityTreeItemViewModelAsync(dictionaryItem);
}
}
private async Task<NamedEntityTreeItemResponseModel> CreateEntityTreeItemViewModelAsync(IDictionaryItem dictionaryItem)
{
var hasChildren = await DictionaryItemService.CountChildrenAsync(dictionaryItem.Key) > 0;
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -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);
}
}
@@ -2,6 +2,7 @@ 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.Document.Collection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Mapping;
@@ -17,15 +18,18 @@ public class ByKeyDocumentCollectionController : DocumentCollectionControllerBas
{
private readonly IContentListViewService _contentListViewService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IDocumentCollectionPresentationFactory _documentCollectionPresentationFactory;
public ByKeyDocumentCollectionController(
IContentListViewService contentListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper)
IUmbracoMapper mapper,
IDocumentCollectionPresentationFactory documentCollectionPresentationFactory)
: base(mapper)
{
_contentListViewService = contentListViewService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_documentCollectionPresentationFactory = documentCollectionPresentationFactory;
}
[HttpGet("{id:guid}")]
@@ -55,8 +59,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);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -42,12 +42,16 @@ public class CopyDocumentController : DocumentControllerBase
Guid id,
CopyDocumentRequestModel copyDocumentRequestModel)
{
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
AuthorizationResult sourceAuthorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionCopy.ActionLetter, new[] { copyDocumentRequestModel.Target?.Id, id }),
ContentPermissionResource.WithKeys(ActionCopy.ActionLetter, [id]),
AuthorizationPolicies.ContentPermissionByResource);
AuthorizationResult destinationAuthorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionNew.ActionLetter, [copyDocumentRequestModel.Target?.Id]),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
if (sourceAuthorizationResult.Succeeded is false || destinationAuthorizationResult.Succeeded is false)
{
return Forbidden();
}
@@ -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."),
});
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -24,13 +24,13 @@ public class ItemDocumentItemController : DocumentItemControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Item(
public Task<IActionResult> Item(
CancellationToken cancellationToken,
[FromQuery(Name = "id")] HashSet<Guid> ids)
{
if (ids.Count is 0)
{
return Ok(Enumerable.Empty<DocumentItemResponseModel>());
return Task.FromResult<IActionResult>(Ok(Enumerable.Empty<DocumentItemResponseModel>()));
}
IEnumerable<IDocumentEntitySlim> documents = _entityService
@@ -38,6 +38,6 @@ public class ItemDocumentItemController : DocumentItemControllerBase
.OfType<IDocumentEntitySlim>();
IEnumerable<DocumentItemResponseModel> documentItemResponseModels = documents.Select(_documentPresentationFactory.CreateItemResponseModel);
return await Task.FromResult(Ok(documentItemResponseModels));
return Task.FromResult<IActionResult>(Ok(documentItemResponseModels));
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -21,23 +21,26 @@ public class SearchDocumentItemController : DocumentItemControllerBase
_documentPresentationFactory = documentPresentationFactory;
}
[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 SearchFromParent(cancellationToken, query, skip, take);
[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,
string? culture = 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 = await _indexedEntitySearchService.SearchAsync(UmbracoObjectTypes.Document, query, parentId, allowedDocumentTypes, trashed, culture, skip, take);
var result = new PagedModel<DocumentItemResponseModel>
{
Items = searchResult.Items.OfType<IDocumentEntitySlim>().Select(_documentPresentationFactory.CreateItemResponseModel),
Total = searchResult.Total,
};
return await Task.FromResult(Ok(result));
return Ok(result);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -39,12 +39,16 @@ public class MoveDocumentController : DocumentControllerBase
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<IActionResult> Move(CancellationToken cancellationToken, Guid id, MoveDocumentRequestModel moveDocumentRequestModel)
{
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
AuthorizationResult sourceAuthorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionMove.ActionLetter, new[] { moveDocumentRequestModel.Target?.Id, id }),
ContentPermissionResource.WithKeys(ActionMove.ActionLetter, [id]),
AuthorizationPolicies.ContentPermissionByResource);
AuthorizationResult destinationAuthorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionNew.ActionLetter, [moveDocumentRequestModel.Target?.Id]),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
if (sourceAuthorizationResult.Succeeded is false || destinationAuthorizationResult.Succeeded is false)
{
return Forbidden();
}
@@ -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,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 AreReferencedDocumentController : DocumentControllerBase
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 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;
@@ -45,6 +45,6 @@ public class ReferencedDescendantsDocumentController : DocumentControllerBase
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}

Some files were not shown because too many files have changed in this diff Show More