-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1396 from plone/petschki-contentbrowser-component…
…registry `pat-contentbrowser` component registry
- Loading branch information
Showing
8 changed files
with
209 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"@11ty/eleventy-upgrade-help": "2", | ||
"@patternslib/pat-code-editor": "4.0.1", | ||
"@patternslib/patternslib": "9.9.16", | ||
"@plone/registry": "^1.7.0", | ||
"@plone/registry": "^2.1.0", | ||
"backbone": "1.4.1", | ||
"backbone.paginator": "2.0.8", | ||
"bootstrap": "5.3.3", | ||
|
@@ -134,5 +134,6 @@ | |
], | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
This file contains 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script> | ||
import { getContext } from "svelte"; | ||
import { resolveIcon } from "./utils"; | ||
// current item index of parent iteration | ||
export let idx; | ||
// item data | ||
export let item; | ||
// parent method to remove selected item from list | ||
const unselectItem = getContext("unselectItem"); | ||
</script> | ||
|
||
<div class="selected-item border border-secondary-subtle rounded p-2 mb-1 bg-body-tertiary" data-uuid={item.UID}> | ||
<div class="item-info"> | ||
<!-- svelte-ignore a11y-missing-attribute --> | ||
<button | ||
class="btn btn-link btn-sm link-secondary" | ||
on:click={() => unselectItem(idx)} | ||
><svg use:resolveIcon={{ iconName: "x-circle" }} /></button | ||
> | ||
<div> | ||
<span class="item-title">{item.Title}</span><br /> | ||
<span class="small">{item.path}</span> | ||
</div> | ||
</div> | ||
{#if item.getURL && (item.getIcon || item.portal_type === "Image")}<img | ||
src="{item.getURL}/@@images/image/mini" | ||
alt={item.Title} | ||
/>{/if} | ||
</div> | ||
|
||
<style> | ||
.selected-item { | ||
display: flex; | ||
flex-wrap: nowrap; | ||
align-items: start; | ||
justify-content: space-between; | ||
cursor: move; | ||
} | ||
.selected-item > * { | ||
margin-right: 0.5rem; | ||
display: block; | ||
} | ||
.selected-item button { | ||
cursor: pointer; | ||
padding: 0 0.375rem 0.374rem 0; | ||
} | ||
.selected-item .item-info { | ||
display: flex; | ||
align-items: start; | ||
} | ||
.selected-item > img { | ||
object-fit: cover; | ||
width: 95px; | ||
height: 95px; | ||
} | ||
</style> |
This file contains 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.