Commit Graph

35471 Commits

Author SHA1 Message Date
Jacob Overgaard
92b5d11c95 Backoffice Preview: Adds notice that the site is not real (#20864)
feat: adds notice to the static backoffice site explaining to the reader that the content is not real
2025-11-17 18:31:55 +01:00
Jacob Overgaard
a89437e309 test: uses a real non-date value for testing 2025-11-17 17:17:59 +01:00
dependabot[bot]
b8c31350fb Bump the npm_and_yarn group across 2 directories with 1 update (#20863)
Bumps the npm_and_yarn group with 1 update in the /src/Umbraco.Web.UI.Client directory: [js-yaml](https://github.com/nodeca/js-yaml).
Bumps the npm_and_yarn group with 1 update in the /src/Umbraco.Web.UI.Login directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 16:01:59 +00:00
Jacob Overgaard
bf35477399 chore: fixes merge conflict 2025-11-17 16:59:25 +01:00
Jacob Overgaard
9035f160fe Merge remote-tracking branch 'origin/release/17.0' 2025-11-17 16:37:58 +01:00
Niels Lyngsø
08990b9147 Document input: Find variant name (#20853)
* ability to override get name

* implement document name method
2025-11-17 14:41:47 +00:00
Engiber Lozada
eae35a27ab Block Entry Context: Update the settingsPropertyValueByAlias to observe settings. (#20861)
Replaced content for settings in the settingsPropertyValueByAlias.
2025-11-17 13:54:30 +00:00
Niels Lyngsø
b868a349de Block list: ensure block items stay top-aligned when sorting (#20842)
ensure block items stay top-aligned when sorting
2025-11-15 08:32:18 +01:00
Kenn Jacobsen
ba7d550a74 Move access/refresh tokens to secure cookies (V17) (#20820)
* Move access/refresh tokens to secure cookies (#20779)

* feat: adds the `credentials: include` header to all manual requests

* feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true)

* feat: configures the auto-generated fetch client from hey-api to include credentials by default

* Add OpenIddict handler to hide tokens from the back-office client

* Make back-office token redaction optional (default false)

* Clear back-office token cookies on logout

* Add configuration for backoffice cookie settings

* Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings

* Use the "__Host-" prefix for cookie names

* docs: adds documentation on cookie settings

* build: sets up launch profile for vscode with new cookie recommended settings

* docs: adds extra note around SameSite settings

* docs: adds extra note around SameSite settings

* Respect sites that do not use HTTPS

* Explicitly invalidate potentially valid, old refresh tokens that should no longer be used

* Removed obsolete const

---------

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

* Remove configuration option

* Invalidate all existing access tokens on upgrade

* docs: updates recommended settings for development

* build: removes non-existing variable

* Skip flaky test

* Bumped version of our test helpers to fix failing tests

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-11-14 17:10:57 +01:00
Engiber Lozada
01b300336b Property Editors: Added form control and mandatory support to editors in picker group(Color, Content, Date, Document, Eye dropper, Multi URL). (#20684)
* Added form control support to color picker.

* Avoid submit when readonly is true.

* Added mandatory support.

* Added form control support to date picker.

* Removed an unused import.

* Added form control and mandatory support to document picker.

* Added form control support to Eye dropper.

* Added. mandatory support for multi url picker also bind inner input in the eye dropper.

* Removed unused import.

* fix update of value

* fixing not needed override of get and set methods

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-11-14 14:04:20 +00:00
Eric
6b4503cc7b Content Sorting: increase modal size (#20835)
Modal size increase for sorting content
2025-11-14 14:42:30 +01:00
Engiber Lozada
73847d1eff Property Editors: Added form control and mandatory support to editors in rich content group(Code editor, Markdown, Block grid) (#20693)
* Added mandatory support for block grid property editor.

* Added form control and mandatory support to code editor.

* Added form control and mandatory support to markdown editor.

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-11-13 20:57:27 +00:00
Engiber Lozada
e549217e66 Content Type Designer: Use input-with-alias and implement regex validation for Alias. (#20755)
* Implemented input-with-alias in the content-type-design-editor.

* Added auto-generate-alias property to the input and revert deletion of checkAliasAutoGenerate method.

* Added form-validation-message.

* Added validation to the input-with-alias element to avoid special characters.
2025-11-13 20:42:48 +00:00
Engiber Lozada
8b076597b3 Entity Sign: Improve Firefox visibility and add focus support. (#20733)
* Chenged right and left position of the infobox.

* Added focus support to open the modal.

* Moved tabindex out the constructor and added support for enter and space keys.
2025-11-13 20:37:54 +00:00
Engiber Lozada
bbd30363a2 Media Picker: Remove duplicate loaders in media cards. (#20793)
* Removed isLoding condition from the rich media input and let the thumbnail handle the loader.

* Removed unused import.

* change loader and adjust lit property configuration

* update reflect configuration

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-11-13 20:38:32 +01:00
Jacob Overgaard
c48103cd30 bump lockfile 2025-11-13 15:16:23 +01:00
Jacob Overgaard
931041c635 Merge remote-tracking branch 'origin/v16/dev' 2025-11-13 14:19:10 +01:00
Mathias Helsengren
714fbf3119 Keyboard navigation: Return to opening element after modal close (#20782)
Removed the detroy from the modelContext.
It being destroyed prevented the uui-button getting into focus again after closing the modal.
2025-11-13 12:55:45 +01:00
Jacob Overgaard
eeda55c06f Preview: Add validation support to Save and Preview button (closes #20616) (#20805)
* chore(mock): adds missing try/catch around document lookup

* fix: lets the 'save and preview' button extend the 'save' button to follow the same logic in terms of when it enables/disabled - it did not have much logic before

* fix: runs validation from the server when save and previewing to ensure the UI shows what is missing
2025-11-13 11:25:17 +00:00
Mads Rasmussen
20180c3180 Collection Item Picker: support icon colors (#20787)
Update icon usage in collection menu and example data

Replaces <uui-icon> with <umb-icon> in the default collection menu item element to support colors. Also updates example picker data source items to showcase color support.
2025-11-13 12:16:59 +01:00
Mads Rasmussen
89d487e449 Picker Data Source: update getConfigValue with alias-based type safety (#20802)
* Improve type safety in getConfigValue function

* Refactor config typing in example document picker

* Update index.ts

* add unit tests
2025-11-13 10:57:18 +01:00
Andy Butland
597eb58063 Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-11-13 10:48:51 +01:00
Engiber Lozada
d4d4b8a50a Content Type Designer: Always register root route to support drag-and-drop into empty Generic tab. (#20809)
Always register root route to enable drag-drop on empty Generic tab.
2025-11-13 09:19:33 +01:00
Kenn Jacobsen
49ba89c22a Move access/refresh tokens to secure cookies (#20779)
* feat: adds the `credentials: include` header to all manual requests

* feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true)

* feat: configures the auto-generated fetch client from hey-api to include credentials by default

* Add OpenIddict handler to hide tokens from the back-office client

* Make back-office token redaction optional (default false)

* Clear back-office token cookies on logout

* Add configuration for backoffice cookie settings

* Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings

* Use the "__Host-" prefix for cookie names

* docs: adds documentation on cookie settings

* build: sets up launch profile for vscode with new cookie recommended settings

* docs: adds extra note around SameSite settings

* docs: adds extra note around SameSite settings

* Respect sites that do not use HTTPS

* Explicitly invalidate potentially valid, old refresh tokens that should no longer be used

* Removed obsolete const

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-11-13 08:19:42 +01:00
Andy Butland
14f4c54312 Bumped version to 17.0.0-rc3. 2025-11-13 07:11:35 +01:00
Andy Butland
c295271757 Bumped version to 16.4.0-rc2. 2025-11-13 06:39:10 +01:00
Niels Lyngsø
31072bab51 Stop using promise.reject to avoid the promise to resolve. (#20790) 2025-11-11 13:43:28 +00:00
Warren Buckley
9ad4a7eeba Adds Clear Clipboard button & logic (#20757)
* Adds new dictionary/localization item for the clipboard dialog clear all prompt

* Removes the wrapping uui-box and moved inside the component itself

* Adds Clear Clipboard button and logic

* Adds uui-box from outer components consuimg this into this component
* Adds a header to uui-box
* Adds a conditional uui-button when we have items in clipboard
* Adds confirm dialog/prompt to ask if user wants to clear all items

* Adds in general_clipboard item to use in the UUI-box header

* Removes extra space & moves the requestItems outside the for loop

* Be a better citizen

Make sure the promise for the modal is caught and we return out early if user explictiy cancels modal or presses ESC

* Cleanup my noisy comments for a re-review

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-11-11 11:50:23 +00:00
Mathias Helsengren
d8198d2f5c Accessibility: Adding a label attribute for <uui-button> in news dashboard (#20780)
Added 'label attribute to the uui-button in the umb-news.card.element + Removing the redundant text for uui-button since label attribute is now present
2025-11-11 06:33:31 +01:00
Niels Lyngsø
12b483ff05 Fix block list inline mode (#20745)
* Fix block list inline mode

https://github.com/umbraco/Umbraco-CMS/issues/20618

* Fixed potential runtime errors

* Code cleanup

* Fixed Code Health Review

* Revert some changes

Commented out unused state properties and related code.

* Remove commented-out state property in block workspace view

* fix localization

* no need for question mark after ids, they should be presented as required

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-11-10 17:42:16 +01:00
Niels Lyngsø
43688148ae Cherry pick #20745 2025-11-10 17:40:58 +01:00
Andrej Davidovic
9fa382e84d Fix block list inline mode (#20745)
* Fix block list inline mode

https://github.com/umbraco/Umbraco-CMS/issues/20618

* Fixed potential runtime errors

* Code cleanup

* Fixed Code Health Review

* Revert some changes

Commented out unused state properties and related code.

* Remove commented-out state property in block workspace view

* fix localization

* no need for question mark after ids, they should be presented as required

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-11-10 16:17:30 +00:00
Jacob Overgaard
ab51aac5c6 Backoffice Item Pickers: Show error for missing items in 10 picker types (closes #19329, #20270, #20367) (#20762)
* Add errorDetail property to umb-entity-item-ref

Add optional errorDetail property to display additional context
(such as file paths or IDs) in error states. This enhances the
error display to show both the error message and relevant details.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Make _removeItem protected in UmbPickerInputContext

Change #removeItem from private to protected to allow subclasses
to reuse the removal logic while customizing the confirmation dialog.
This enables better extensibility for specialized picker contexts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix static file picker to show error state for missing files

Update umb-input-static-file to observe statuses and render based
on item state (loading, error, success). When a static file is
missing (API returns empty array), displays error state with alert
icon and file path detail using umb-entity-item-ref.

Also adds standalone property support for proper single-item styling.

Fixes #19329

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show file path in static file remove confirmation dialog

Override requestRemoveItem in UmbStaticFilePickerInputContext to
display the file path instead of "Not found" in the confirmation
dialog when removing missing static files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show GUID in document picker error state

Display the document GUID as errorDetail when a document is
not found (deleted/gone). This provides useful context for
editors to identify which document was referenced.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show GUID in document picker remove confirmation dialog

Display the document GUID instead of "Not found" in the remove
confirmation dialog when the document no longer exists. This
provides useful context for editors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: apply the temp model which the context uses

* Refactor: Move requestRemoveItem logic to base UmbPickerInputContext

Eliminated duplicate code across three picker contexts by:
- Adding protected getItemDisplayName() method to base class
- Moving requestRemoveItem implementation to base class
- Removing duplicate implementations from document, member, and static file pickers
- Static file picker overrides getItemDisplayName() to show file path

Net reduction: 19 lines of code (69 removed, 50 added)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Document Type Picker: Show error state for missing items (fixes #20367)

Apply the same error state handling to the document type picker that was
implemented for static files, documents, and members. When a referenced
document type is missing or deleted:

- Show error state with the GUID as errorDetail
- Allow removal with proper confirmation dialog
- Use umb-entity-item-ref for error display
- Use uui-ref-node-document-type for successful items

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Additional pickers: Show error states for missing items in user, language, media-type, member-type, member-group, and user-group pickers

Apply the same error state handling pattern to six additional picker types:
- user-input: Users
- input-language: Languages
- input-media-type: Media types
- input-member-type: Member types
- input-member-group: Member groups
- user-group-input: User groups

All pickers now:
- Observe statuses from UmbRepositoryItemsManager
- Show error state with GUID when referenced item is missing/deleted
- Use umb-entity-item-ref for error display
- Use specialized components (uui-ref-node, umb-user-group-ref, etc.) for successful items
- Allow removal with proper confirmation dialog showing GUID

Maintains code reusability by using the base class requestRemoveItem method
with getItemDisplayName() for consistent error handling across all pickers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Lint: Remove unused 'when' imports from input-media-type and user-group-input

* Refactor: Add #renderItem helper method to all pickers for consistency

- Add #renderItem to user-input (extracted from inline repeat callback)
- Change _renderItem to #renderItem in user-group-input for consistency
- Change _renderItem to #renderItem in input-static-file for consistency

All 10 pickers now use consistent #renderItem helper method pattern,
improving code readability and maintainability as suggested by @nielslyngsoe

* `import` sorting

* Corrected (old) JSDoc typos

* Markup tidy-up

* exported `UmbPropertyEditorUIStaticFilePickerElement` as `element`

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-11-10 12:57:24 +00:00
Niels Lyngsø
afec900204 Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs
2025-11-10 12:46:47 +01:00
Jacob Overgaard
89989d60ce Templates: Fix "Discard changes?" dialog after creating template with master template (fixes #20262) (#20749)
Moves the _data.updateCurrent() call inside the updateLayoutBlock conditional
in setMasterTemplate(). This prevents spurious change detection when loading
templates from the server, while maintaining proper change tracking when users
actually modify the master template via the UI.

This completes the fix started in PR #20529 which added the updateLayoutBlock
parameter but inadvertently left the data model update outside the conditional.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-10 11:00:43 +00:00
Niels Lyngsø
bce85e1e88 Package section: use command icon for migrations, remove prop (#20775)
change icon and remove ability to customize
2025-11-10 09:38:53 +00:00
Niels Lyngsø
e39b05f44d Property type: Vary in the same way as the owner Document Type (#20751)
set new property type preset to vary if document type varies
2025-11-10 10:28:40 +01:00
Niels Lyngsø
2067db1c3c Content Workspace: not displaying varying composition values in a not varying context (Fixes #20707) (#20758)
* only vary if context varies

* add controller aliases to these observations
2025-11-10 10:05:56 +01:00
Luuk Peters
04918ec3d2 Slider property editor: Fix for preset value handling of enableRange (#20772)
Fix config value access in UmbSliderPropertyValuePreset

Updated the `UmbSliderPropertyValuePreset` class to ensure the `.value` property is accessed for configuration items. This change improves the accuracy of retrieving `enableRange`, `min`, `max`, and `step` values, addressing potential bugs in value processing.

Co-authored-by: Luuk Peters <Luuk.Peters@proudnerds.com>
2025-11-09 22:38:16 +01:00
Warren Buckley
aae316e17e Localization: Supply the display name to the localization key for the alt and title attributes of the 2FA QR code image (#20770)
Simple fix to supply the display name to the localization key for the 2FA QR Code Image
2025-11-09 13:41:41 +01:00
Niels Lyngsø
f4a7a2d9be Reset password localization + format (#20750)
localizations + format
2025-11-06 10:43:46 +00:00
Niels Lyngsø
f11b8ffae9 User Workspace: localize password mismatch feedback (#20747)
localize
2025-11-06 09:01:51 +00:00
Andy Butland
2e85f1bbf8 Dependencies: Update node development dependency to latest secure version of current major (17) (#20735)
Update node development dependency to latest secure version of current major.
2025-11-05 20:57:55 +01:00
Andy Butland
7502a38033 Dependencies: Update dotnet sdk and node development dependency to latest secure version of current major (16) (#20734)
* Update dotnet sdk and node development dependency to latest secure version of current major.

* Update package-lock.json.
2025-11-05 20:02:11 +01:00
Jacob Overgaard
594c3f4eac Rich Text Editor: The media picker skips the "edit media" dialog when editing an image (closes #20066) (#20740)
* fix: Tiptap Media Picker: Skip media picker modal when editing existing images

Fixes the media picker workflow to match v13 behavior where clicking
an existing image directly opens the alt text/caption editor instead
of forcing users to re-select the same image from the media library.

Also fixes caption text extraction to properly read from the figcaption
node using Tiptap's NodeSelection API instead of unreliable attribute-based
approach.

Changes:
- Skip media picker when currentMediaUdi exists (lines 77-92)
- Extract caption from NodeSelection.node using descendants() (lines 55-73)
- Add NodeSelection export to tiptap externals for proper typing

* Refactor: Extract nested logic from media picker execute method

Reduces cyclomatic complexity from 15 to 1 by extracting conditional
logic into focused private helper methods. Addresses CodeScene warnings
for complex method and nested conditionals (bumpy road smell).

Created helper methods:
- #extractMediaUdi, #extractCaption, #findFigcaptionText
- #getMediaGuid, #updateImageWithMetadata

No functional changes - improves maintainability and testability.
2025-11-05 14:51:16 +00:00
NguyenThuyLan
72d7ed438f Property Editors: Hide "add button" when maximum configuration is 1 (fixes #20407) (#20738)
Hide add button when max 1

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-11-05 12:12:04 +00:00
Mathias Helsengren
297c5d3824 Header: Adjusted button focus border color contrast (#20562)
Made use of the uui-button outline overwrite to change the focus border color to be the contrast color of the header.
2025-11-05 11:04:59 +00:00
Jacob Overgaard
b22d3ddc00 Auth: Cleans up stale or completed auth details from storage (#20725)
* fix: cleans up stale PKCE keys after auth regardless of success or error

* fix: cleans up stale PKCE data on logout
2025-11-04 14:10:04 +01:00
Jacob Overgaard
5739049f90 Merge remote-tracking branch 'origin/v16/dev' 2025-11-04 14:09:18 +01:00
Jacob Overgaard
fa5c53b571 Auth: Cleans up stale or completed auth details from storage (#20725)
* fix: cleans up stale PKCE keys after auth regardless of success or error

* fix: cleans up stale PKCE data on logout
2025-11-04 11:31:34 +00:00