@alpaca-editor/contenthub 1.0.4155 → 1.0.4157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpaca-editor/contenthub",
3
- "version": "1.0.4155",
3
+ "version": "1.0.4157",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -30,7 +30,6 @@
30
30
  "postcss": "^8.5.3",
31
31
  "react": "^19.0.0",
32
32
  "react-dom": "^19.0.0",
33
- "tailwindcss": "^4.0.14",
34
- "primereact": "10.9.1"
33
+ "tailwindcss": "^4.0.14"
35
34
  }
36
- }
35
+ }
@@ -4,21 +4,23 @@ import { DamSelectorProps, DamImageValue, ContentHubExtension } from "./types";
4
4
 
5
5
  export const DamSelectorButton: ClientFieldButton = {
6
6
  label: "Open Content Hub",
7
- icon: "pi pi-external-link",
7
+ icon: "ExternalLink",
8
8
  clientAction: async ({ editContext, field }) => {
9
- const contentHubConfig = editContext!.configuration.extensions.contentHub as ContentHubExtension;
9
+ const contentHubConfig = editContext!.configuration.extensions
10
+ .contentHub as ContentHubExtension;
10
11
  console.log("contentHubConfig", contentHubConfig);
11
-
12
+
12
13
  const data = await editContext.openDialog<DamImageValue, DamSelectorProps>(
13
- DamSelector, {
14
+ DamSelector,
15
+ {
14
16
  contentHubHost: contentHubConfig.contentHubHost,
15
17
  contentHubBrowsePage: contentHubConfig.contentHubBrowsePage,
16
- externalRedirectKey: contentHubConfig.externalRedirectKey
18
+ externalRedirectKey: contentHubConfig.externalRedirectKey,
17
19
  }
18
- )
19
-
20
- if (data != null){
21
- const rawValue = `<image src="${data?.public_link}" dam-id="${data?.['dam-id']}" width="${data?.width}" height="${data?.height}" alt="${data?.alt}" dam-content-type="Image" thumbnailsrc="${data?.thumbnailsrc}" />`;
20
+ );
21
+
22
+ if (data != null) {
23
+ const rawValue = `<image src="${data?.public_link}" dam-id="${data?.["dam-id"]}" width="${data?.width}" height="${data?.height}" alt="${data?.alt}" dam-content-type="Image" thumbnailsrc="${data?.thumbnailsrc}" />`;
22
24
 
23
25
  editContext!.operations.editField({
24
26
  field: field.descriptor,
@@ -30,4 +32,4 @@ export const DamSelectorButton: ClientFieldButton = {
30
32
  isGenerator: false,
31
33
  id: "open-contenthub-dam",
32
34
  description: "Opens the Content Hub DAM to select an image",
33
- }
35
+ };