-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate Image with AI for Image Fields (#30335)
### Parent Issue #30062 ### Summary This pull request focuses on integrating the `primeng/dynamicdialog` module into the block editor and AI image prompt functionalities. It includes changes to import necessary services, update component providers, and refactor the AI image prompt extension to use dynamic dialogs. ### Integration of `primeng/dynamicdialog`: * [`core-web/libs/block-editor/src/lib/block-editor.module.ts`](diffhunk://#diff-8baf52e51d62118783206bb31ceefa1afcd8a4b9400cfb935614e5a1171d5cf4R9): Added `DynamicDialogModule` to the imports and module declarations. [[1]](diffhunk://#diff-8baf52e51d62118783206bb31ceefa1afcd8a4b9400cfb935614e5a1171d5cf4R9) [[2]](diffhunk://#diff-8baf52e51d62118783206bb31ceefa1afcd8a4b9400cfb935614e5a1171d5cf4R61) * [`core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.ts`](diffhunk://#diff-266eab162f8661e695c3e40956692fa3696fbd4e8cd3e0352ea9e01f90b13609R19-R20): Imported `DialogService` and `DotMessageService` and updated the component providers to include `DialogService`. [[1]](diffhunk://#diff-266eab162f8661e695c3e40956692fa3696fbd4e8cd3e0352ea9e01f90b13609R19-R20) [[2]](diffhunk://#diff-266eab162f8661e695c3e40956692fa3696fbd4e8cd3e0352ea9e01f90b13609L34-R36) [[3]](diffhunk://#diff-266eab162f8661e695c3e40956692fa3696fbd4e8cd3e0352ea9e01f90b13609R80) [[4]](diffhunk://#diff-266eab162f8661e695c3e40956692fa3696fbd4e8cd3e0352ea9e01f90b13609R123-R124) [[5]](diffhunk://#diff-266eab162f8661e695c3e40956692fa3696fbd4e8cd3e0352ea9e01f90b13609L461-R466) * [`core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.extension.ts`](diffhunk://#diff-689103c18ebe5e9dd00423ab7d493e5bf2570c867ec3b67ffef6dfd51ad62bfcL3-R7): Refactored `AIImagePromptExtension` to use `DialogService` and `DotMessageService` for creating dynamic dialogs. [[1]](diffhunk://#diff-689103c18ebe5e9dd00423ab7d493e5bf2570c867ec3b67ffef6dfd51ad62bfcL3-R7) [[2]](diffhunk://#diff-689103c18ebe5e9dd00423ab7d493e5bf2570c867ec3b67ffef6dfd51ad62bfcL31-R34) [[3]](diffhunk://#diff-689103c18ebe5e9dd00423ab7d493e5bf2570c867ec3b67ffef6dfd51ad62bfcL74-R82) * [`core-web/libs/block-editor/src/lib/extensions/ai-image-prompt/ai-image-prompt.plugin.ts`](diffhunk://#diff-c7ed359690f2aff854a493cbbe30b539d13e742964e9aa5794c7afd4b0a81c18L7-R23): Updated the AI image prompt plugin to manage dialog lifecycle and interactions using `DialogService` and `DotMessageService`. [[1]](diffhunk://#diff-c7ed359690f2aff854a493cbbe30b539d13e742964e9aa5794c7afd4b0a81c18L7-R23) [[2]](diffhunk://#diff-c7ed359690f2aff854a493cbbe30b539d13e742964e9aa5794c7afd4b0a81c18L37-L38) [[3]](diffhunk://#diff-c7ed359690f2aff854a493cbbe30b539d13e742964e9aa5794c7afd4b0a81c18L47-R65) [[4]](diffhunk://#diff-c7ed359690f2aff854a493cbbe30b539d13e742964e9aa5794c7afd4b0a81c18L107-R109) ### Removal of Deprecated Components: * [`core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component.html`](diffhunk://#diff-23b6d93662589dabff9ce186485da98e3e53b435fcbcf0a889e3f5c3008915fcL2): Removed the deprecated `dot-ai-image-prompt` component. ### Test and Storybook Updates: * [`core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component.spec.ts`](diffhunk://#diff-d01a58af8fedbafd245fa8166ab7aeb806f756bb643d7b81c9b0d396bfddb89dR12): Updated test providers to include `DialogService` and removed deprecated stores. [[1]](diffhunk://#diff-d01a58af8fedbafd245fa8166ab7aeb806f756bb643d7b81c9b0d396bfddb89dR12) [[2]](diffhunk://#diff-d01a58af8fedbafd245fa8166ab7aeb806f756bb643d7b81c9b0d396bfddb89dR26) [[3]](diffhunk://#diff-d01a58af8fedbafd245fa8166ab7aeb806f756bb643d7b81c9b0d396bfddb89dL34-R36) [[4]](diffhunk://#diff-d01a58af8fedbafd245fa8166ab7aeb806f756bb643d7b81c9b0d396bfddb89dL93-R103) [[5]](diffhunk://#diff-d01a58af8fedbafd245fa8166ab7aeb806f756bb643d7b81c9b0d396bfddb89dL589-R592) * [`core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component.stories.ts`](diffhunk://#diff-24e79acf5790caefe96f0fcf5072694a1be1e6fc85ab88480d8244c78e05e78cL2-R6): Updated Storybook configuration to use `provideHttpClient` and `DotMessageService`. [[1]](diffhunk://#diff-24e79acf5790caefe96f0fcf5072694a1be1e6fc85ab88480d8244c78e05e78cL2-R6) [[2]](diffhunk://#diff-24e79acf5790caefe96f0fcf5072694a1be1e6fc85ab88480d8244c78e05e78cR35-L37) ### Miscellaneous: * [`core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component.ts`](diffhunk://#diff-06beb921499e762bd5f4d25d68d0a24a22477acf79372fb0350ee6d9a7b0c01aL4-R10): Removed unused imports and updated to use `takeUntilDestroyed` for cleanup. [[1]](diffhunk://#diff-06beb921499e762bd5f4d25d68d0a24a22477acf79372fb0350ee6d9a7b0c01aL4-R10) [[2]](diffhunk://#diff-06beb921499e762bd5f4d25d68d0a24a22477acf79372fb0350ee6d9a7b0c01aL24-R28) [[3]](diffhunk://#diff-06beb921499e762bd5f4d25d68d0a24a22477acf79372fb0350ee6d9a7b0c01aL50-R50) [[4]](diffhunk://#diff-06beb921499e762bd5f4d25d68d0a24a22477acf79372fb0350ee6d9a7b0c01aL90) * [`core-web/libs/dotcms-scss/angular/dotcms-theme/components/_dialog.scss`](diffhunk://#diff-123bc2019d92d71d5d2d93da360b73b30eefd6efb45c2c4686e92f6ed2995c68R112-R121): Added styles for transparent AI dialog masks.
- Loading branch information
Showing
23 changed files
with
727 additions
and
472 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
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
1 change: 0 additions & 1 deletion
1
...src/lib/fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component.html
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
Oops, something went wrong.