* Create sign provider collection and call registered providers on rendering a page of tree item view models.
Re-work tree controller constructors to provide registered providers as a collection.
* Stub implementation of sign provider for documents with a scheduled publish pending.
* Complete implementation of tree sign for pending scheduled publish.
* Added integration test for new method on IContentService.
* Added unit test for HasScheduleSignProvider.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Tidied usings and clarified method header comments.
* Adding a fixed prefix to all future signs, and removing the provider property
* Adding a sign for protected tree documents.
* Adding IsProtectedSignProviderTest.cs & correcting HasScheduleSignProviderTests.cs to no longer assert the provider
* Fixing minor things in accordance with CR
* Adding collection items compatibility
* Introduced IHasSigns interface to provide more re-use across trees and collections.
Fixed updates to base content controllers (no need to introduce a new type variable).
Removed passing entities for populating tree signs (we aren't using it, so simplifies things).
* Refactoring a bit to make existing code less duplicated and fixing some constructor obsoletion
* Introducing a has pending changes sign.
* Applying changes based on CR
* Introducing tests for HasPendingChangesSignProvider.cs and stopped the use of contentService
* Introducing tests for HasPendingChangesSignProvider.cs and slight logic change
* Introduced HasCollectionSignProvider.cs and tests.
* Introducing collection signs to Media Tree & Media Collection items
* Introducing Plain Items and tests. Refactoring tests as well
* Introduced alternative CanProvideSigns() implementation on IsProtectedSignProvider.cs
* Slight refactoring to reduce bloating.
* Adding [ActivatorUtilitiesConstructor] since it threw an error otherwise
* Minor cleanup.
* Updated OpenApi.json.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
* Updated hey-api as the client-fetch is bundled as part of @hey-api/openapi-ts in newer versions
* Regenerated a new package-lock.json file
* Fix typescript issue
* Update templates/UmbracoExtension/Client/package.json
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Updated client dependencies
* Vite, TypeScript, hey-api
* Chalk & Cross-Env for the generate-client script
* Explicitly remove package-lock.json as it will be out of sync due to UMBRACO_VERSION_FROM_TEMPLATE
* Regenerated Hey API client that now ships client rather than dependancy
* Vite and Hey-API were already out of date (updated to the very latest)
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* extend controller base
* extend controller base
* add package for management api
* add signalr as external package
* connect to server event hub
* do no act on undefined
* add event subject
* correct alias
* export token
* add helper methods
* cache server responses
* fix import
* use helpers
* add detail request manager
* implement for document type
* implement for data type
* add method for update
* add support for create method
* align code
* Update detail-request.manager.ts
* move explicit naming
* move into folder
* collect server code in folder
* add implementation for data type request manager
* implement for document type
* only cache when we have connection to the server events
* update
* fix imports
* introduce item cache
* call trough get items controller
* remove log
* add unit tests for item cache
* Create cache.test.ts
* use sync method to lookup data type item
* use correct alias
* remove unused code
* split detail cache invalidation from request manager
* introduce item cache invalidation manager
* remove unused
* invalidate documents when document types changes
* align naming
* add method to get unique
* use server model instead of mapping
* call method
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* extend controller base
* extend controller base
* add package for management api
* add signalr as external package
* connect to server event hub
* do no act on undefined
* add event subject
* correct alias
* export token
* add helper methods
* cache server responses
* fix import
* use helpers
* add detail request manager
* implement for document type
* implement for data type
* add method for update
* add support for create method
* align code
* Update detail-request.manager.ts
* move explicit naming
* move into folder
* collect server code in folder
* add implementation for data type request manager
* implement for document type
* only cache when we have connection to the server events
* update
* fix imports
* Create cache.test.ts
* use sync method to lookup data type item
* use correct alias
* fix some test which are not running
* resolve code review comments
* Moved cleaned up tests to unit tests (as they are unit tests, not integration tests).
Removed tests marked as no longer necessary.
Update tests name to better reflect test case.
* Made explict test faster so it could run on the pipeline.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* move variant fragment split logic into splitview manager
* further centralise split logic into umbVariantId
* show segment selector if any exist
* invariant null
* chore: run eslint:fix
* chore(eslint): generate a UBM_ constant
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Bind 'action-executed' event handler to class instance
Updated the event listener for 'action-executed' to bind the handler to the class instance, ensuring correct 'this' context when the event is triggered.
* fix: make it clear that the clearUploads button is used to "Clear file(s)" and not necessarily remove them (from the dropzone)
* fix: adds extra null-check to avoid browser error on failed uploads
* fix: adds check that no media files are added twice (or more) to the media picker
* fix: adds try/catch around confirm modal to avoid browser error in case user cancels
* fix: change from deprecated 'complete' event to 'change' event and filter out non-successful files
* chore: sort imports
* feat: renders the 'add' button even if the limits have been exceeded
* feat: shows all values as cards even if the media item does not exist so the user has a chance to update the value
* feat: shows all values as cards even if the media item does not exist so the user has a chance to update the value
* feat: adds localization to the media picker context
* feat: uses the media picker context to control the picker
this also fixes an issue where already selected items were not preselected when opening the picker again
* feat: adds a bit of margin between the dropzone and media picker itself
* clean up old stuff in validation form control mixin
* ensure validation trigger when value is changed
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/property-editor-ui-content-picker.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added configuration option UseStrictDomainMatching, which allows control over whether content is routed without a matching domain.
* Fixed typo in comment.
* Addressed comments from code review.
* Optimize document and media seeding by looking up from database in batches.
* Ensure null values aren't stored in the cache when checking existance.
* Fixed failing integration tests.
* Resolved issue with not writing to the L1 cache on an L2 hit.
* Tidied up and populated XML header comments.
* Address issue raised in code review.
* Content picker search with start node configured not taking user start nodes into account (#19800)
* Fix users being able to see nodes they don't have access to when using the picker search
* Readability and naming improvements
* Additional fixes
* Adjust tests
* Additional fixes
* Small improvement
* Replaced the root ids with constants
* Update src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
# Conflicts:
# src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs
# src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
# src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs
# src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
# tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/BackOfficeExamineSearcherTests.cs
* Add new constructor without unused and obsolete parameters
* Use non obsolete constructor in tests
* Add `dataTypeId` as parameter in document and media search endpoints to get `ignoreUserStartNodes` value
* Update backend API generated typed client
* Updated picker search to pass in data type unique
* Move data type retrieval to UmbPickerContext
* Adjust the controller constructors to make it non breaking
* Adjust controller methods to make non-breaking.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix moving properties between groups sometimes clearing their values
* Small adjustment
* Fix failing integration test
The mapping method was only setting the property group when it was not null, but for orphaned properties we want to specifically set it to null.
* Adjust 'Can_Move_Properties_To_Another_Container' integration test to check more scenarios and that values are kept
* Adjust to add isElement variable in test (as previously)
* build(eslint): replace local rules with naming conventions
* revert relative js extension imports
* remove unused local rule
* build(eslint): uses recommended setup for import plugin
* chore(eslint): conver const to function to follow naming conventions
* chore: removes old file
* build(eslint): allows Ufm as prefix
* build(eslint): allows 'name' and 'extensions' as exports (umbraco-package.ts)
* build(eslint): typescript rules should ignore storybook
* chore(eslint): ignores eslint for vite definitions
* build(eslint): allows UPPER_CASE for properties
* build(eslint): ignores umbraco-package.ts files (unconventional exports)
* chore(storybook): fixes property editor stylesheet picker
* build(eslint): allows Manifest as prefix on interfaces
* build(eslint): allows underscore on protected members
* build(eslint): allows Meta as prefix on interfaces
* build(eslint): allows PascalCase for public members
* build(eslint): disables enforcement of booleans with verbs for now as it is too harsh
* chore(eslint): add private modifiers as required
* deprecates invalid constant name to replace with Umb prefix
* renames MediaValueType to comply with naming conventions
* chore(eslint): disable naming conventions for local router-slot package
* chore(eslint): follow naming conventions
* chore(eslint): disable naming conventions for property editor interfaces
* chore(eslint): follow naming conventions
* chore(storybook): fix story
* chore(eslint): follow naming conventions
* build(eslint): allows `_host` as public variable
* chore(eslint): follow naming conventions
* build(eslint): allows double leading underscore on public members
* build(eslint): matches #private and public modifiers
* build(eslint): ignores language files
* chore(eslint): ignores umbraco package file
* chore(eslint): follow naming conventions
* storybook lang
* chore(eslint): follow naming conventions
* chore(eslint): follow naming conventions
* chore(eslint): make _manager a little more open
* chore(eslint): some properties should be protected
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* proxy type for UrlParametersRecord
* _items deprecated property
* bring back ConditionTypes type
* bring back _items for trash bulk action
* ignorer deprecated proxies
* keep settingsDataContentTypeKey for satefy
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Tiptap RTE: Set row/group min-height to prevent layout shift
* Added `box-sizing: border-box`
* Adds loaded state to the editor
so that the border only appears once it's ready.
* Refactored toolbar to reduce the number of re-renders
* Refactored statusbar to reduce the number of re-renders
* RTE mock data updates
* TODO comment typo correction
* Corrected typo in class name
This could technically be a breaking-change, but since the class name
conflicted with the exported `UmbTiptapToolbarFontFamilyExtensionApi`,
then no one could use it anyway. ¯\_(ツ)_/¯
* Tiptap extension code tidy-up
Also, makes use of `this.name` instead of hardcoded strings.
* Tiptap RTE: Makes embedded-media truly inline
by using a `<span>` instead of a `<div>`.
* Cosmetically aligns the selection styles
* Adds `UmbEmbeddedMediaOptions` to strongly-type the `inline` option
* Added tests for updating a variant block list with invalid text
* Added tests for updating a variant block grid with invalid text
* Bumped version of test helper
* Make the tests for updating content with invalid text in a block run in the pipeline
* Cleaned up
* Updated test text
* Reverted npm command
* Fix CheckboxList UI not updating when values are set programmatically
* WIP
* Added unit tests for the new functionality in the checkbox list element.
As requested by Copilot, here are some unit tests to ensure this addition passes all of the possible edge cases mentioned.
* Small change based on CoPilot feedback
Removed a check that was redundant and removed a unit test that was also not needed for the current PR and fixed one of the other tests.
* Fixing code quality issues highlighted in the unit tests
* Fix CheckboxList UI not updating when values are set programmatically
* WIP
* Standardizes property editor UI state management
Introduces a utility for managing the state of property editor UI elements
when their values are set programmatically.
This ensures that UI components like dropdowns, checkbox lists, and selects
correctly reflect the selected values, especially when these values are
updated via code rather than direct user interaction.
The changes include:
- A mixin to simplify state updates
- A helper function to ensure values are handled as arrays
- Consistent state updating logic across components.
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/select/property-editor-ui-select.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed the hard coded label
* Fixed the short-circuit issue raised by co-pilot
* Fixing more co-pilot suggestions
Also cleaned up the test files based on the JSDocs suggestions.
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/dropdown/property-editor-ui-dropdown.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactors checkbox and dropdown tests
Refactors checkbox-list and dropdown property editor UI tests to share common test utilities, reducing code duplication and improving maintainability.
Uses Sets for faster selection lookup in `updateItemsState` function.
* Fixing CodeScene suggestion based on "String Heavy Function Arguments"
* Fix for an issue that was stopping the Bellissima build.
* Improves property editor UI state updates
Ensures UI updates in checkbox list, dropdown and select property editors only occur when necessary.
Avoids unnecessary re-renders by comparing the updated state with the current state, and only triggering an update if there are actual changes.
This improves performance and prevents potential issues caused by excessive re-rendering.
* Changes based on feedback from @nielslyngsoe
* removing unnecessary call to requestUpdate
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Removed two unnecessary delete clauses when removing content types (they are looking for user group Ids, but we are deleting a content type).
* Renamed table name constant with obsoletion to better reflect name and contents of table.
* Added granular permission for property value records to delete clauses when deleting a document type.
* Delete property value permissions for removed property types.
* Added integration tests to verify behaviour.
* Added `action` kind for `menuItem` extension-type
* Adds `<umb-tiptap-menu>` component
* Adds support for `menu` extensions to the `<umb-cascading-menu-popover>` component
* Adds support for `menu` extensions to the `tiptapToolbarExtension` extension-type
* Adds support for `menu` extensions to the `<umb-tiptap-toolbar-menu>` component
* Adds manifests for table column/row menus
Deprecates the `umb-tiptap-table-column-menu` and `umb-tiptap-table-row-menu` components.
* Adds table column menu actions
* Adds table row menu actions
* Adds table cell menu actions
* Adds table (general) menu actions
* Replaces table toolbar menu with the new `menu` extensions
* Adds `UMB_TIPTAP_RTE_CONTEXT`
so that the menu actions can access the Editor instance.
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/actions/table-properties.action.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* `UmbTiptapMenuElement` doesn't use the `editor` property
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds support for the "folders only" flag on retrieving siblings of a node.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated test code.
* Removed double secondary ordering by node Id and ensured we include this clause for all sort orders.
* Ensure that ordering by node Id is always added only once and last, and only if it's not already been included in the order by clause.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated the block editor validation message
* Updated tests for schedule publishing after unselecting all languages
* Added tests for sibdlingsOfType extension
* Updated tests due to test helper changes
* Bumped version of test helper
* Added release tag for regression issue
* Make tests for siblingsOfType run in the pipeline
* Reverted npm command
* Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer.
* Generalised JSON serialization encoder factory to work for all System.Tex.Json serializers.
Added the serializer's name as a parameter to allow for different encodings per serializer if required.
* Fixed tests by removing use of obsolete constructors.
* Removed name parameter and used a generic type instead.
* RTE: Restore deleted blocks
Maintains a state of unused (deleted) blocks,
that could be restored later, e.g. with Tiptap RTE's undo action.
Fixes#19637
* Updated with @copilot suggestions
* Fixes restored block state on variant documents