-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Picker data source: Add support for pickable filters #20491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
leekelleher
merged 8 commits into
release/17.0
from
v17/hotfix/picker-data-source-pickable-filter
Oct 14, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dda6590
add pickable to vs code dictionary
madsrasmussen 6f0880a
set up types for pickable filters in data sources
madsrasmussen dd6f812
pass search pickable filter to search result
madsrasmussen 0baabea
apply filter config in document data source example
madsrasmussen 2086d6a
add pickable filters to custom tree example
madsrasmussen 866d82b
Update input-entity-data.context.ts
madsrasmussen 2d5351e
remove unused
madsrasmussen 97d1d01
Update types.ts
madsrasmussen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| { | ||
| "cSpell.words": [ | ||
| "backoffice", | ||
| "pickable", | ||
| "Pickable", | ||
| "unprovide", | ||
| "Unproviding" | ||
| ], | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
...mbraco.Web.UI.Client/src/packages/core/picker-data-source/collection-data-source/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| import type { UmbPickerDataSource } from '../data-source/types.js'; | ||
| import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection'; | ||
| import type { UmbItemModel } from '@umbraco-cms/backoffice/entity-item'; | ||
| import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; | ||
|
|
||
| export interface UmbPickerCollectionDataSource extends UmbPickerDataSource, UmbCollectionRepository, UmbApi {} | ||
| export interface UmbPickerCollectionDataSource<CollectionItemType extends UmbItemModel = UmbItemModel> | ||
| extends UmbPickerDataSource, | ||
| UmbCollectionRepository<CollectionItemType>, | ||
| UmbApi { | ||
| collectionPickableFilter?: (item: CollectionItemType) => boolean; | ||
| } |
5 changes: 4 additions & 1 deletion
5
src/Umbraco.Web.UI.Client/src/packages/core/picker-data-source/data-source/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| import type { UmbItemModel } from '@umbraco-cms/backoffice/entity-item'; | ||
| import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; | ||
| import type { UmbItemRepository } from '@umbraco-cms/backoffice/repository'; | ||
| import type { UmbConfigCollectionModel } from '@umbraco-cms/backoffice/utils'; | ||
|
|
||
| export interface UmbPickerDataSource extends UmbItemRepository<any>, UmbApi { | ||
| export interface UmbPickerDataSource<PickedItemType extends UmbItemModel = UmbItemModel> | ||
| extends UmbItemRepository<PickedItemType>, | ||
| UmbApi { | ||
| setConfig?(config: UmbConfigCollectionModel | undefined): void; | ||
| getConfig?(): UmbConfigCollectionModel | undefined; | ||
| } |
9 changes: 7 additions & 2 deletions
9
...mbraco.Web.UI.Client/src/packages/core/picker-data-source/searchable-data-source/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| import type { UmbPickerDataSource } from '../types.js'; | ||
| import type { UmbSearchRepository } from '@umbraco-cms/backoffice/search'; | ||
| import type { UmbSearchRepository, UmbSearchResultItemModel } from '@umbraco-cms/backoffice/search'; | ||
|
|
||
| export interface UmbPickerSearchableDataSource extends UmbPickerDataSource, UmbSearchRepository<any> {} | ||
| export interface UmbPickerSearchableDataSource< | ||
| SearchResultItemType extends UmbSearchResultItemModel = UmbSearchResultItemModel, | ||
| > extends UmbPickerDataSource, | ||
| UmbSearchRepository<SearchResultItemType> { | ||
| searchPickableFilter?: (searchItem: SearchResultItemType) => boolean; | ||
| } |
11 changes: 9 additions & 2 deletions
11
src/Umbraco.Web.UI.Client/src/packages/core/picker-data-source/tree-data-source/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| import type { UmbPickerDataSource } from '../data-source/types.js'; | ||
| import type { UmbApi } from '@umbraco-cms/backoffice/extension-api'; | ||
| import type { UmbTreeRepository } from '@umbraco-cms/backoffice/tree'; | ||
| import type { UmbTreeItemModel, UmbTreeRepository, UmbTreeRootModel } from '@umbraco-cms/backoffice/tree'; | ||
|
|
||
| export interface UmbPickerTreeDataSource extends UmbPickerDataSource, UmbTreeRepository, UmbApi {} | ||
| export interface UmbPickerTreeDataSource< | ||
| TreeItemType extends UmbTreeItemModel = UmbTreeItemModel, | ||
| TreeRootType extends UmbTreeRootModel = UmbTreeRootModel, | ||
| > extends UmbPickerDataSource, | ||
| UmbTreeRepository<TreeItemType, TreeRootType>, | ||
| UmbApi { | ||
| treePickableFilter?: (item: TreeItemType) => boolean; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.