Commit Graph

35072 Commits

Author SHA1 Message Date
Andy Butland
73d2f207d0 Merge branch 'main' into v17/dev 2025-08-04 12:41:50 +02:00
Mads Rasmussen
a630febf67 Docs: Storybook clean up round 1 (#19673)
* delete internal stories

* more clean up

* more cleanup

* move to generic components

* clean up

* move body layout

* move story

* Move icon stories

* remove prefilled color

* Update icon.element.ts

* rename story

* Replace UUIFormControlMixin with UmbFormControlMixin

Refactors all relevant input and form control components to use the new UmbFormControlMixin from '@umbraco-cms/backoffice/validation' instead of the deprecated UUIFormControlMixin. This change improves consistency and aligns with updated validation handling in the codebase.

* Revert "Merge branch 'v16/bugfix/use-umb-form-control-mixin' into v16/docs/storybook-clean-up"

This reverts commit 7fa70b87c74189bc448e17360bf22f68d162b5fb, reversing
changes made to 8fe739179087193ce23b24cfe68e0d13c1237025.

* simplify name

* Add discard changes modal stories

* add error viewer modal

* fix stories

* rename

* fix date story

* add story for input with alias

* add story for popover layout

* add story for dropdown

* add args

* register core manifests

* register entity action bundle + list

* add stack example

* clean up

* Create data-type-input.stories.ts

* change overview story to docs

* rename to docs

* rename to docs

* Update icon.stories.ts

* Update preview.js

* remove overview story

* rename default story

* load more manifests

* import all manifests

* Update preview.js

* Update preview.js

* provide all stores + global contexts

* Update data-type-input.stories.ts

* add user input and ref stories

* add storybook auth context

* set the initial storybook language

* use isoCode param

* fix input-language component

* delete broken stories

* fix icon picker story

* fix mock member ids

* Fix query parameter name in item handler

Changed the query parameter from 'paths' to 'path' in the item handler to correctly retrieve item paths from the request. This ensures the handler processes requests as expected.

* Update user item handler to use user mock DB

Replaces the document mock database with the user mock database in the user item handler to ensure correct data source is used for user-related requests.

* Add config to checkbox list story

Introduces a sample configuration to the checkbox list Storybook story, providing predefined options for demonstration and testing purposes.

* Add config to select property editor story

Introduces a sample UmbPropertyEditorConfigCollection to the select property editor Storybook story, providing predefined options for demonstration and testing purposes.

* Add config to radio button list Storybook story

Introduces a sample UmbPropertyEditorConfigCollection to the radio button list

* Refactor slider story to use config collection

Replaces inline config array with UmbPropertyEditorConfigCollection for the slider property editor story.

* Delete property-editor-ui-label.stories.ts

* Group releated UIs

* Remove multi-url picker Storybook file

* add input stylesheet story

* add back localization stories

* Delete property-editor-config.stories.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-08-04 09:27:50 +02:00
hifi-phil
39a5362de8 Add testing to workspace counter examples (#19838)
* update workspace example

* Update readme for workspace counter example

* update workspace counter examples readme

* Update examples workspace counter to include some testing

* Update glob pattern for text examples for windows
2025-08-02 12:36:23 +02:00
Lee Kelleher
a1d1c5492a Tiptap RTE: Custom CSS Variables for min/max height/width (#19841)
* Adds CSS variables to `umb-input-tiptap`

to set the min/max height/width of the RTE.

* Moves "dimensions" config to the base RTE element

so can be reused with other RTE-based property-editors.

* Sets the CSS variables in the Tiptap property-editor element

* Code tidyup for RTE base element imports

* Corrects localization text of RTE dimensions description

As it's a fixed height/width as opposed to a maximum height/width.

* The CSS variable fallback value 'unset' should not be quoted.

CSS keywords like 'unset' should be unquoted, while string values should be quoted.
2025-08-01 07:16:02 +02:00
Lee Kelleher
7199ed0310 Media Table Collection View: Adds support for Label Templates (#19842)
Media Table Collection View: add label template support

Fixes #19835.
2025-08-01 06:49:33 +02:00
NguyenThuyLan
8d6096636d Add drag and drop to blockgrid area (#19383)
* Add drag and drop to blockgrid area

* Adds `UmbChangeEvent` trigger

* Removes `updated` method

Puts `sorter.setModel` in the `value` setter,
so that the sorter is set on initial value.

* Imports sort order

Removed `UmbTextStyles`, as not used here

* Changed the cursor type to "move"

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-31 16:17:13 +00:00
NguyenThuyLan
4483f47668 V16: Fix issue not display hidden tab name (#19370)
Fix issue not display hidden tab name

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-31 14:29:41 +00:00
Lee Kelleher
965408df57 Tiptap RTE: Block selection (#19811)
* Removed `cursor: not-allowed` style

* Sets the `umb-rte-block` `user-select` to `all`

* Adds an "invisible" selection background to `umb-ref-rte-block`

* Sets the `umb-ufm-render` text-content to be visible

* Adds `aria-hidden` attribute

* Bumped version of test helper

* Fixed the failing tests due to UI changes

* Adds `pointer-events: none` to selection-background

---------

Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
2025-07-31 09:39:30 +00:00
Andy Butland
c6bc4ef49a Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package.json
2025-07-30 11:30:10 +02:00
hifi-phil
133796f2dd V16/docs work extensions example (#19809)
* update workspace example

* Update readme for workspace counter example

* update workspace counter examples readme
2025-07-30 07:44:23 +02:00
Lucas Bach Bisgaard
34989307db Change hardcoded text to be translatedeable (#19745)
* Change hardcoded text to be translatedeable

* Added the `count` value to the localization

---------

Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-29 17:01:22 +00:00
Lee Kelleher
fb9a9b38a8 Tiptap RTE: Include Tiptap's default styles (#19805)
* Disables Tiptap's `injectCSS` option

This option would inject the default CSS styles into
the `window.document`, which are never applied to
the component's shadow DOM.

* Add Tiptap's default styles to "rte-content.css"

The `caret-color` rule (line 93) resolves issue #19791.
2025-07-29 07:58:41 +02:00
NguyenThuyLan
75c7d00b53 Fix issue unsaved changes always displayed when trying to move away from blueprint (#19804)
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-07-29 07:21:17 +02:00
Andy Butland
5c57d03d6d Merge branch 'release/16.1'
# Conflicts:
#	version.json
2025-07-24 09:22:37 +02:00
Lee Kelleher
12141d2d61 Tiptap RTE: Clear Formatting, resets nodes to "paragraph" (#19781)
Fixes #19752
2025-07-24 07:07:29 +02:00
Andy Butland
a5612107a6 Bumped version to 16.1.0. 2025-07-24 06:48:27 +02:00
Andy Butland
a6c311977c Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2025-07-23 17:03:30 +02:00
Ben White
0507d1a0c8 Fix missing tag suggestions when no culture available. (#19694)
Allow undefined culture when obtaining tag matches

Co-authored-by: Ben White <b.white@rocburn.com>
2025-07-23 12:25:00 +02:00
Laura Neto
04ac8d3ea9 Merge branch 'main' into v17/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2025-07-22 15:39:26 +02:00
Andy Butland
ca1476f7c7 Fires the updated event when content types are updated (#19768)
* Fires the updated event when content types are updated.

* Housekeeping: separating/sorting import types

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-22 12:22:11 +00:00
Andy Butland
d7a32a31a1 Reloads the template tree when creating a document type with a template (#19769)
* Reloads the template tree when creating a document type with a template.

* Housekeeping: separating/sorting import types

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-07-22 10:46:04 +00:00
Lee Kelleher
df9b387175 Repository Details Manager: Prevent making requests for empty arrays (#19731)
* fix: Prevent Repository Details Manager making requests for empty arrays

Fixes #19604

* Reworked to pass the `uniques` through to the `#requestNewDetails()` method

The unique values are included as a closure,
persisting after the `#init` promise is resolved.
Rather than call `getUniques()` to get an async'd value.

* Updated with Copilot suggestions

https://github.com/umbraco/Umbraco-CMS/pull/19731#discussion_r2221512463
2025-07-22 08:16:38 +00:00
Lee Kelleher
1ec9641c9d Updated OpenApi and TypeScript API (Siblings endpoints) (#19759)
Latest OpenApi TypeScript API code generation
2025-07-21 08:40:29 +00:00
NguyenThuyLan
5c05fd2877 Template with Block List field with Inline Editing Mode causes Collection List View to shrink (#19754)
Fix issue template is shrunk when enable inline editing mode in collection list view in block list field

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-07-21 10:17:02 +02:00
Andy Butland
7458143bb8 Restored indentation following merge of Danish translations in #19740. 2025-07-21 09:27:54 +02:00
Lucas Bach Bisgaard
2a83e405a7 add missing translation for DA (#19740)
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
2025-07-21 09:26:30 +02:00
Laura Neto
0bcc26a811 Allow saving blueprints with validation errors (#19748)
Ignore validation result when saving blueprint
2025-07-21 07:55:12 +02:00
Lucas Bach Bisgaard
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
Andy Butland
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
Laura Neto
2ce647738f Merge branch 'main' into v17/dev
# Conflicts:
#	version.json
2025-07-14 15:41:34 +02:00
Jacob Overgaard
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 Overgaard
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
NguyenThuyLan
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
Jacob Overgaard
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 Kelleher
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
Lee Kelleher
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
Lee Kelleher
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
Lee Kelleher
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 Kelleher
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
Andy Butland
0b1bd16b9d Merge branch 'main' into v17/dev 2025-07-08 09:26:54 +02:00
Mads Rasmussen
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 Rasmussen
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 Rasmussen
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
Jacob Overgaard
aa90253d71 build(deps): bump @umbraco-ui from 1.14.1 to 1.14.2 (#19656) 2025-07-03 11:27:37 +02:00
Jacob Overgaard
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
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
Mads Rasmussen
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 Overgaard
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ø
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
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