@arsedizioni/ars-utils 22.5.9 → 22.5.11
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/README.md +7 -4
- package/clipper.common/README.md +3 -6
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +20 -692
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +27 -774
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +486 -119
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/package.json +1 -5
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +21 -751
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +5 -193
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +240 -28
- package/ui.tinymce/README.md +82 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-ui.tinymce.mjs","sources":["../../../projects/ars-utils/ui.tinymce/utils.ts","../../../projects/ars-utils/ui.tinymce/full-screen-editor/full-screen-editor.component.ts","../../../projects/ars-utils/ui.tinymce/full-screen-editor/full-screen-editor.component.html","../../../projects/ars-utils/ui.tinymce/public_api.ts","../../../projects/ars-utils/ui.tinymce/arsedizioni-ars-utils-ui.tinymce.ts"],"sourcesContent":["export class TinymceUtils {\n /**\n * Returns `true` when the user agent currently prefers a dark color scheme.\n * Evaluated on demand (not frozen at module load) and SSR-safe.\n */\n private static prefersDark(): boolean {\n return typeof window !== 'undefined'\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n\n /** URL of the TinyMCE script hosted on the Tiny Cloud CDN. */\n static readonly CDN_URL = 'https://cdn.tiny.cloud/1/5lnoc6ohmpjau6zyzgqyhyf52cueoennkcs8v1yfoak57ku9/tinymce/7/tinymce.min.js';\n /** URL of the locally bundled TinyMCE script. */\n static readonly LOCAL_URL = '/assets/tinymce/tinymce.min.js';\n\n /**\n * Full-featured TinyMCE base configuration with all standard plugins and toolbar.\n */\n static TinymceConfig: Record<string, any> = {\n base_url: 'assets/tinymce',\n suffix: '.min',\n license_key: 'gpl', // per evitare il warning riportarla direttamente nell'html: <editor licenseKey=\"gpl\" ...></editor>\n language: 'it',\n language_url: \"assets/tinymce/langs/it.js\",\n height: 500,\n width: '100%',\n min_height: 250,\n ui_mode: 'split',\n onboarding: false,\n branding: false,\n convert_urls: false,\n quickbars_insert_toolbar: false,\n quickbars_selection_toolbar: 'removeformat | bold italic | superscript subscript | quicklink h2 h3 blockquote',\n fullpage_default_doctype: '<!DOCTYPE html>',\n fullpage_default_encoding: 'UTF-8',\n fullpage_default_font_family: '\\'Helvetica Neue\\', sans-serif', // '\\'Times New Roman\\', Georgia, Serif',\n fullpage_default_xml_pi: false,\n fullpage_hide_in_source_view: false,\n browser_spellcheck: true,\n spellchecker_language: 'it_IT',\n save_enablewhendirty: true,\n custom_undo_redo_levels: 50,\n nonbreaking_force_tab: true, // inserisce 3 per ogni pressione di TAB\n nonbreaking_wrap: false,\n help_tabs: ['shortcuts', 'keyboardnav', 'versions'],\n plugins: 'advlist anchor autolink autosave charmap code fullscreen help hr image insertdatetime link lists media table nonbreaking paste preview print quickbars searchreplace textpattern visualblocks visualchars',\n menubar: false,\n skin: TinymceUtils.prefersDark() ? \"oxide-dark\" : \"oxide\",\n content_css: TinymceUtils.prefersDark() ? \"dark\" : \"default\",\n toolbar: [\n 'fullscreen | undo redo searchreplace | code openCodeMirrorButton preview fullpage | link image media insertMediaButton charmap nonbreaking | table tableprops tabledelete',\n 'bold italic superscript subscript forecolor backcolor | alignleft aligncenter alignright alignjustify | removeformat | bullist numlist checklist'\n ],\n style_formats: [\n {\n title: 'Immagini float', items: [\n {\n title: 'Immagine a SX',\n selector: 'img',\n styles: { float: 'left', margin: '0 10px 0 10px' }\n },\n {\n title: 'Immagine a DX',\n selector: 'img',\n styles: { float: 'right', margin: '0 10px 0 10px' }\n }\n ]\n },\n {\n title: 'Formati', items: [\n { title: 'Grassetto', format: 'bold' },\n { title: 'Corsivo', format: 'italic' },\n { title: 'Sottolineato', format: 'underline' },\n { title: 'Barrato', format: 'strikethrough' },\n { title: 'Superscript', format: 'superscript' },\n { title: 'Subscript', format: 'subscript' },\n { title: 'Codice', format: 'code' }\n ]\n }],\n formats: {\n underline: { inline: 'span', styles: { 'text-decoration': 'underline' }, exact: true },\n strikethrough: { inline: 'span', styles: { 'text-decoration': 'line-through' }, exact: true }\n },\n insertdatetime_formats: ['%d/%m/%Y', '%d %b %Y', '%A, %d %B %Y'],\n link_default_target: '_blank',\n link_title: true,\n link_assume_external_targets: 'https',\n link_class_list: [\n { title: 'Nessuno', value: '' },\n { title: 'Rilevante', value: 'relevant' },\n ],\n link_context_toolbar: true,\n link_quicklink: true,\n rel_list: false,\n image_advtab: true,\n paste_data_images: true,\n image_caption: true,\n image_title: true,\n automatic_uploads: true,\n images_reuse_filename: true,\n images_upload_credentials: true,\n file_picker_types: 'file image',\n };\n\n /**\n * Compact TinyMCE configuration with autoresize, bottom toolbar, and grouped toolbar buttons.\n * Extends `TinymceConfig` with reduced height and a simplified toolbar.\n */\n static TinymceCompactConfig: Record<string, any> = Object.assign(structuredClone(this.TinymceConfig), {\n height: 200,\n width: '100%',\n suffix: '.min',\n license_key: 'gpl',\n ui_mode: 'split',\n min_height: 200,\n max_height: 500,\n quickbars_insert_toolbar: 'quickimage hr',\n quickbars_selection_toolbar: 'removeformat | bold italic | superscript subscript | quicklink h2 h3 blockquote',\n plugins: 'advlist anchor autolink autosave autoresize charmap code image insertdatetime link lists media table nonbreaking preview quickbars searchreplace visualblocks visualchars',\n statusbar: false,\n menubar: false,\n contextmenu: false,\n toolbar_location: 'bottom',\n toolbar: ['undo redo | quickimage | formatgroup paragraphgroup '],\n toolbar_groups: {\n formatgroup: {\n icon: 'format',\n tooltip: 'Formatting',\n items: 'bold italic underline superscript subscript | forecolor backcolor | removeformat'\n },\n paragraphgroup: {\n icon: 'paragraph',\n tooltip: 'Paragraph format',\n items: 'h1 h2 h3 | bullist numlist | alignleft aligncenter alignright alignjustify | indent outdent'\n },\n insertgroup: {\n icon: 'plus',\n tooltip: 'Insert',\n items: 'quickimage media | link charmap nonbreaking | table tableprops tabledelete'\n }\n },\n formats: {\n underline: { inline: 'span', styles: { 'text-decoration': 'underline' }, exact: true },\n strikethrough: { inline: 'span', styles: { 'text-decoration': 'line-through' }, exact: true }\n },\n link_default_target: '_blank',\n link_title: true,\n link_assume_external_targets: 'https',\n link_class_list: [],\n });\n\n /**\n * Extended compact TinyMCE configuration that adds fullscreen support and an insert group.\n * Extends `TinymceCompactConfig`.\n */\n static TinymceCompactExtendedConfig: Record<string, any> = Object.assign(structuredClone(this.TinymceCompactConfig), {\n license_key: 'gpl',\n ui_mode: 'split',\n plugins: 'advlist anchor autolink autosave autoresize charmap code image insertdatetime fullscreen link lists media table nonbreaking preview quickbars searchreplace visualblocks visualchars',\n toolbar: ['undo redo | quickimage insertgroup | formatgroup paragraphgroup | code | fullscreen '],\n });\n\n\n /**\n * Inject the TinyMCE script tag into the document head if it is not already present.\n * @param useCDN - When `true`, loads from the Tiny Cloud CDN; otherwise uses the local asset.\n */\n static loadTinyMCEScript(useCDN?: boolean): void {\n if (typeof document === 'undefined') return; // SSR: no-op\n const url = useCDN === true ? this.CDN_URL : this.LOCAL_URL;\n if (!document.querySelector(`script[src=\"${url}\"]`)) {\n const script = document.createElement('script');\n script.src = url;\n script.referrerPolicy = 'origin';\n script.onerror = () =>\n console.error(`Impossibile caricare lo script TinyMCE da: ${url}`);\n document.head.appendChild(script);\n }\n }\n}","import { ChangeDetectionStrategy, Component, inject, output, signal } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';\nimport { SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { TinymceUtils } from '../utils';\nimport { MatButtonModule } from '@angular/material/button';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport { FormsModule } from '@angular/forms';\nimport { EditorComponent } from '@tinymce/tinymce-angular';\n\nexport interface FullScreenEditorDialogData {\n text: string;\n configuration: Record<string, any>;\n infoButtonLabel?: string;\n onShowInfo?: Function,\n disabled?: boolean;\n}\n\n@Component({\n templateUrl: './full-screen-editor.component.html',\n styleUrls: ['./full-screen-editor.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogContent, EditorComponent, FormsModule, MatDialogActions, FlexLayoutModule,\n MatButtonModule, MatDialogClose]\n})\nexport class FullScreenEditorComponent {\n\n /** Emitted with the edited text when the user saves. */\n readonly saving = output<string>();\n private readonly dialogRef = inject(MatDialogRef<FullScreenEditorComponent>);\n /** Dialog configuration, injected and exposed as a signal. */\n protected readonly dialogData = signal<FullScreenEditorDialogData>((() => {\n const data: FullScreenEditorDialogData = inject(MAT_DIALOG_DATA) ?? {};\n return { ...data, text: data.text ?? '' };\n })());\n /** Whether the editor is in read-only mode. */\n protected readonly disabled = signal<boolean>(false);\n /** Current editor content, kept as a plain field for [(ngModel)] two-way binding. */\n protected text = '';\n /** TinyMCE editor configuration. */\n protected tinymceConfig: Record<string, any> = {};\n\n constructor() {\n const data = this.dialogData();\n this.text = data.text;\n if (data.configuration) {\n this.tinymceConfig = { ...data.configuration, license_key: 'gpl' };\n } else {\n this.tinymceConfig = SystemUtils.clone(TinymceUtils.TinymceCompactExtendedConfig);\n }\n this.tinymceConfig['toolbar'] = ['undo redo | formatgroup paragraphgroup insertgroup | code openCodeMirrorButton'];\n this.disabled.set(data.disabled ?? false);\n }\n\n\n /**\n * Save the current editor content and close the dialog.\n */\n protected ok(): void {\n this.saving.emit(this.text ?? '');\n setTimeout(() => {\n this.dialogRef.close();\n }, 500);\n }\n}\n","<mat-dialog-content style=\"padding: 10px 10px 0 10px\">\r\n <editor style=\"height: 100%;\" [init]=\"tinymceConfig\" class=\"full-screen-editor\" [disabled]=\"disabled()\"\r\n [(ngModel)]=\"text\" licenseKey=\"gpl\">\r\n </editor>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"50\">\r\n @if(dialogData().onShowInfo) {\r\n <button mat-stroked-button (click)=\"dialogData().onShowInfo()\">{{dialogData().infoButtonLabel ?? 'Informazioni'}}\r\n </button>\r\n }\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n @if (disabled()) {\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Chiudi</button>\r\n } @else {\r\n <button mat-flat-button (click)=\"ok()\">Salva</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\r\n }\r\n </div>\r\n </div>\r\n</mat-dialog-actions>\r\n","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.tinymce\n */\nexport * from './utils';\nexport * from './full-screen-editor/full-screen-editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAAa,YAAY,CAAA;AACvB;;;AAGG;AACK,IAAA,OAAO,WAAW,GAAA;QACxB,OAAO,OAAO,MAAM,KAAK;AACpB,eAAA,OAAO,MAAM,CAAC,UAAU,KAAK;AAC7B,eAAA,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO;IAChE;;aAGgB,IAAA,CAAA,OAAO,GAAG,oGAAoG,CAAC;;aAE/G,IAAA,CAAA,SAAS,GAAG,gCAAgC,CAAC;AAE7D;;AAEG;AACI,IAAA,SAAA,IAAA,CAAA,aAAa,GAAwB;AAC1C,QAAA,QAAQ,EAAE,gBAAgB;AAC1B,QAAA,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,KAAK;AAClB,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,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,gBAAgB;wBAC1F,eAAe,EAAE,cAAc,CAAC,EAAA,QAAA,EAAA,s+BAAA,EAAA,MAAA,EAAA,CAAA,uKAAA,CAAA,EAAA;;;AEvBpC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-ui.tinymce.mjs","sources":["../../../projects/ars-utils/ui.tinymce/utils.ts","../../../projects/ars-utils/ui.tinymce/tinymce-loader.service.ts","../../../projects/ars-utils/ui.tinymce/tinymce-editor.directive.ts","../../../projects/ars-utils/ui.tinymce/editor/editor.component.ts","../../../projects/ars-utils/ui.tinymce/editor/editor.component.html","../../../projects/ars-utils/ui.tinymce/public_api.ts","../../../projects/ars-utils/ui.tinymce/arsedizioni-ars-utils-ui.tinymce.ts"],"sourcesContent":["import type { RawEditorOptions } from 'tinymce';\n\n/**\n * The editor profiles the applications ask for, ready to be handed to\n * `[tinymceConfig]` on {@link TinymceEditorDirective}.\n *\n * They describe **what the editor offers** — plugins, toolbar, formats, link and image\n * behaviour — and nothing else. Everything about *loading* TinyMCE (`base_url`, `suffix`,\n * `language`, `language_url`, `license_key`) and about the *theme* (`skin`, `content_css`)\n * belongs to `TinymceLoaderService` and to the directive, which resolve them against the\n * document base href and against `ThemeService`: a preset repeating them could only get them\n * wrong, and used to — the old ones pinned a relative `assets/tinymce` that broke under a\n * sub-path, and read the skin from `prefers-color-scheme` instead of the theme the user chose.\n *\n * Uploads are the same story: `automatic_uploads`, `paste_data_images` and `file_picker_types`\n * follow the `tinymceImageUploader` input, so an editor without a handler cannot end up\n * offering an upload tab that leads nowhere.\n *\n * Each accessor returns a **fresh deep copy**: a caller that tweaks a returned object — as the\n * editor dialog does with its toolbar — cannot corrupt the preset for everyone else.\n */\nexport class TinymceUtils {\n\n /**\n * Everything TinyMCE 8 open source has to offer, for a full-page editor.\n *\n * Adapted from the TinyMCE 5 profile the library used to ship: `paste`, `print`, `hr`,\n * `textpattern` and the `fullpage_*` options no longer exist (paste and text patterns moved\n * into the core, `fullpage` and `print` were dropped in v6), and `checklist`,\n * `openCodeMirrorButton` and `insertMediaButton` are premium or application-specific buttons\n * that a self-hosted GPL build has no way to render.\n */\n private static readonly FULL: RawEditorOptions = {\n height: 500,\n width: '100%',\n min_height: 250,\n onboarding: false,\n browser_spellcheck: true,\n custom_undo_redo_levels: 50,\n // Three per TAB, and no wrapping of the inserted spaces.\n nonbreaking_force_tab: true,\n nonbreaking_wrap: false,\n help_tabs: ['shortcuts', 'keyboardnav', 'versions'],\n menubar: false,\n plugins: 'advlist anchor autolink autosave charmap code fullscreen help image insertdatetime'\n + ' link lists media nonbreaking pagebreak preview quickbars searchreplace table'\n + ' visualblocks visualchars',\n toolbar: [\n 'fullscreen | undo redo searchreplace | code preview | link image media charmap nonbreaking | table tableprops tabledelete',\n 'bold italic superscript subscript forecolor backcolor | alignleft aligncenter alignright alignjustify | removeformat | bullist numlist'\n ],\n quickbars_insert_toolbar: false,\n quickbars_selection_toolbar: 'removeformat | bold italic | superscript subscript | quicklink h2 h3 blockquote',\n style_formats: [\n {\n title: 'Immagini float', items: [\n { title: 'Immagine a SX', selector: 'img', styles: { float: 'left', margin: '0 10px 0 10px' } },\n { title: 'Immagine a DX', selector: 'img', styles: { float: 'right', margin: '0 10px 0 10px' } }\n ]\n },\n {\n title: 'Formati', items: [\n { title: 'Grassetto', format: 'bold' },\n { title: 'Corsivo', format: 'italic' },\n { title: 'Sottolineato', format: 'underline' },\n { title: 'Barrato', format: 'strikethrough' },\n { title: 'Superscript', format: 'superscript' },\n { title: 'Subscript', format: 'subscript' },\n { title: 'Codice', format: 'code' }\n ]\n }\n ],\n // Spans with an inline style rather than <u>/<strike>: the content travels by e-mail, where\n // the presentational tags are the first thing a client strips.\n formats: {\n underline: { inline: 'span', styles: { 'text-decoration': 'underline' }, exact: true },\n strikethrough: { inline: 'span', styles: { 'text-decoration': 'line-through' }, exact: true }\n },\n insertdatetime_formats: ['%d/%m/%Y', '%d %b %Y', '%A, %d %B %Y'],\n link_default_target: '_blank',\n link_title: true,\n link_assume_external_targets: 'https',\n link_class_list: [\n { title: 'Nessuno', value: '' },\n { title: 'Rilevante', value: 'relevant' },\n ],\n link_context_toolbar: true,\n link_quicklink: true,\n image_advtab: true,\n image_caption: true,\n image_title: true,\n };\n\n /**\n * The one for a field inside a form: it grows with the text instead of owning the page, the\n * toolbar sits under it and collapses into groups, and there is no status bar or context menu\n * to compete with the form around it.\n */\n private static readonly COMPACT: RawEditorOptions = {\n ...TinymceUtils.FULL,\n height: 200,\n min_height: 200,\n max_height: 500,\n statusbar: false,\n contextmenu: false,\n toolbar_location: 'bottom',\n plugins: 'advlist anchor autolink autoresize autosave charmap code image insertdatetime'\n + ' link lists media nonbreaking preview quickbars searchreplace table'\n + ' visualblocks visualchars',\n toolbar: ['undo redo | quickimage | formatgroup paragraphgroup'],\n toolbar_groups: {\n formatgroup: {\n icon: 'format',\n tooltip: 'Formattazione',\n items: 'bold italic underline superscript subscript | forecolor backcolor | removeformat'\n },\n paragraphgroup: {\n icon: 'paragraph',\n tooltip: 'Formato paragrafo',\n items: 'h1 h2 h3 | bullist numlist | alignleft aligncenter alignright alignjustify | indent outdent'\n },\n insertgroup: {\n icon: 'plus',\n tooltip: 'Inserisci',\n items: 'quickimage media | link charmap nonbreaking | table tableprops tabledelete'\n }\n },\n quickbars_insert_toolbar: 'quickimage',\n link_class_list: [],\n };\n\n /** The compact one plus full screen, the insert group and the source view. */\n private static readonly COMPACT_EXTENDED: RawEditorOptions = {\n ...TinymceUtils.COMPACT,\n plugins: 'advlist anchor autolink autoresize autosave charmap code fullscreen image'\n + ' insertdatetime link lists media nonbreaking preview quickbars searchreplace table'\n + ' visualblocks visualchars',\n toolbar: ['undo redo | quickimage insertgroup | formatgroup paragraphgroup | code | fullscreen'],\n };\n\n /**\n * The full-page profile.\n * @returns A fresh copy of the configuration, safe to modify.\n */\n static get TinymceConfig(): RawEditorOptions {\n return structuredClone(TinymceUtils.FULL);\n }\n\n /**\n * The in-form profile.\n * @returns A fresh copy of the configuration, safe to modify.\n */\n static get TinymceCompactConfig(): RawEditorOptions {\n return structuredClone(TinymceUtils.COMPACT);\n }\n\n /**\n * The in-form profile with full screen and source view.\n * @returns A fresh copy of the configuration, safe to modify.\n */\n static get TinymceCompactExtendedConfig(): RawEditorOptions {\n return structuredClone(TinymceUtils.COMPACT_EXTENDED);\n }\n}\n","import { Service } from '@angular/core';\nimport type { TinyMCE } from 'tinymce';\n\ndeclare global {\n interface Window {\n tinymce?: TinyMCE;\n }\n}\n\n/**\n * Loads the self-hosted TinyMCE bundle on demand.\n *\n * TinyMCE is deliberately NOT imported by any module: a static import would pull ~500 kB into\n * whichever chunk referenced it, and the editor is needed by exactly one dialog. The library is\n * copied to `assets/tinymce` by the build (see `angular.json`) and injected here as a plain\n * `<script>` the first time an editor is created, so it costs nothing until then and is served\n * from the browser cache afterwards. Loading it this way also lets TinyMCE resolve its own theme,\n * model, plugins and skin relative to `base_url`, which is how the self-hosted distribution\n * expects to work.\n */\n@Service()\nexport class TinymceLoaderService {\n\n /** The in-flight (or completed) load, so concurrent editors share a single script tag. */\n private pending?: Promise<TinyMCE>;\n\n /**\n * The absolute URL of the TinyMCE asset folder, resolved against the document base href so the\n * app keeps working when it is served from a sub-path.\n * @returns The base URL, without a trailing slash.\n */\n get baseUrl(): string {\n return new URL('assets/tinymce', document.baseURI).href.replace(/\\/$/, '');\n }\n\n /**\n * Loads TinyMCE, reusing the script already injected by a previous call.\n * @returns A promise resolving with the global TinyMCE instance.\n */\n load(): Promise<TinyMCE> {\n if (window.tinymce) return Promise.resolve(window.tinymce);\n\n // A failed load clears `pending`, so a later attempt can retry instead of being stuck on the\n // rejected promise forever (e.g. the first open happened while the network was down).\n this.pending ??= new Promise<TinyMCE>((resolve, reject) => {\n const script = document.createElement('script');\n script.src = `${this.baseUrl}/tinymce.min.js`;\n script.async = true;\n script.referrerPolicy = 'origin';\n script.onload = () => {\n if (window.tinymce) {\n resolve(window.tinymce);\n } else {\n this.pending = undefined;\n reject(new Error('TinyMCE caricato ma non disponibile.'));\n }\n };\n script.onerror = () => {\n this.pending = undefined;\n script.remove();\n reject(new Error('Impossibile caricare l\\'editor.'));\n };\n document.head.appendChild(script);\n });\n\n return this.pending;\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n OnDestroy,\n OnInit,\n forwardRef,\n inject,\n input,\n output\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThemeService } from '@arsedizioni/ars-utils/core';\nimport type { Editor, RawEditorOptions } from 'tinymce';\nimport { TinymceLoaderService } from './tinymce-loader.service';\n\n/** Uploads one image and resolves with the URL to reference it by. */\nexport type TinymceImageUploader = (file: File) => Promise<string>;\n\n/**\n * How the editor presents itself.\n *\n * `fixed` is the classic editor: the content lives in an iframe and the toolbar sits above it,\n * pinned so it stays reachable while the surrounding container scrolls.\n *\n * `inline` edits the host element in place, with no iframe and no chrome until the user focuses\n * it, at which point the toolbar floats over the content. It needs an ordinary element to edit —\n * a `<div>` — because there is nothing to render inside a `<textarea>`.\n */\nexport type TinymceToolbarMode = 'fixed' | 'inline';\n\n/**\n * Turns a `<textarea>` into a rich text editor backed by the self-hosted TinyMCE bundle, and wires\n * it to Angular forms as a `ControlValueAccessor`, so `[(ngModel)]`, `required` and the\n * pristine/dirty state keep working exactly as they do on a plain control.\n *\n * The library itself is fetched on demand by <see cref=\"TinymceLoaderService\"/>: nothing about\n * TinyMCE reaches the bundle until an editor is actually created.\n *\n * Usage: `<textarea tinymceEditor [(ngModel)]=\"item.text\" name=\"text\" required></textarea>`\n *\n */\n@Directive({\n // Both hosts are accepted because the two modes need different ones: the classic editor\n // replaces a textarea, the inline editor edits a div in place.\n selector: 'textarea[tinymceEditor], div[tinymceEditor]',\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TinymceEditorDirective),\n multi: true\n }]\n})\nexport class TinymceEditorDirective implements ControlValueAccessor, OnInit, OnDestroy {\n\n /** Extra TinyMCE options, merged over (and able to override) the defaults below. */\n readonly tinymceConfig = input<RawEditorOptions>({});\n\n /** Whether the toolbar is pinned above the content (`fixed`) or floats on focus (`inline`). */\n readonly tinymceToolbarMode = input<TinymceToolbarMode>('fixed');\n\n /**\n * Handler invoked for every image dropped, pasted or picked in the editor. When not provided\n * the upload tab is hidden and only images referenced by URL can be inserted.\n */\n readonly tinymceImageUploader = input<TinymceImageUploader | undefined>(undefined);\n\n /** Emitted once the editor is up, for callers that want to enable UI only when it is usable. */\n readonly ready = output<Editor>();\n\n /** Emitted when the editor could not be loaded or initialised. */\n readonly failed = output<Error>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly loader = inject(TinymceLoaderService);\n private readonly themeService = inject(ThemeService);\n private readonly changeDetector = inject(ChangeDetectorRef);\n\n private editor?: Editor;\n /** True while the editor is showing itself full screen. */\n private fullscreen = false;\n /** True once the directive has been destroyed, so a late init resolves into a no-op. */\n private destroyed = false;\n /**\n * True while the directive itself is pushing a value into the editor. TinyMCE raises the same\n * content events for a programmatic `setContent` as for a keystroke, so without this flag\n * `writeValue` would immediately echo back through `onChange` and mark a freshly loaded form\n * as dirty.\n */\n private writingValue = false;\n /** The value received before the editor existed, applied as soon as it does. */\n private value = '';\n private disabled = false;\n\n private onChange: (value: string) => void = () => { /* set by Angular forms */ };\n private onTouched: () => void = () => { /* set by Angular forms */ };\n\n /**\n * Leaves full screen on Escape, for the keystrokes that happen outside the content: with the\n * classic editor the content is an iframe, and a keydown in there never reaches this document.\n * Bound on the capture phase and stopped, so a dialog hosting the editor does not take the\n * Escape and close, throwing the edit away when the user only meant to leave full screen.\n */\n private readonly onDocumentKeydown = (event: KeyboardEvent): void => {\n if (!this.shouldEscapeLeaveFullscreen(event)) return;\n event.preventDefault();\n event.stopPropagation();\n this.exitFullscreen();\n };\n\n /**\n * Loads TinyMCE and initialises the editor over the host textarea.\n * @returns A promise that completes once the editor is ready (or has failed).\n */\n async ngOnInit(): Promise<void> {\n try {\n const tinymce = await this.loader.load();\n if (this.destroyed) return;\n\n const dark = this.themeService.getTheme() === 'dark';\n const uploader = this.tinymceImageUploader();\n const inline = this.tinymceToolbarMode() === 'inline';\n\n // Caught here rather than left to TinyMCE, which would fail deep inside its own setup\n // with a message that says nothing about the actual mistake.\n if (inline && this.host.nativeElement.tagName === 'TEXTAREA') {\n throw new Error('La modalità inline richiede un <div>, non un <textarea>.');\n }\n\n // TinyMCE ships its language packs outside the npm package, so `it.js` is committed\n // under `src/assets/tinymce/langs/`: the existing `src/assets` build rule publishes it\n // exactly where TinyMCE looks for it, relative to `base_url`.\n const defaults: RawEditorOptions = {\n // Self-hosting TinyMCE 8 requires an explicit license key: without one the editor\n // refuses to start. 'gpl' selects the GPLv2+ terms.\n license_key: 'gpl',\n language: 'it',\n branding: false,\n promotion: false,\n menubar: false,\n statusbar: false,\n resize: false,\n // Pins the toolbar while the container scrolls. In inline mode it is what keeps\n // the floating toolbar attached to the text instead of drifting off with it.\n toolbar_sticky: true,\n // An inline editor takes the size of the element it edits; only the classic one\n // has a box of its own to dimension.\n ...(inline ? {} : { height: 360 }),\n // The dialog body scrolls, and 'split' is what keeps the toolbar menus anchored\n // to the editor while it does: the popup sink is attached next to the editor, so\n // it shares its scrolling ancestry. It does NOT affect the modal dialogs — those\n // always go to <body> — which is why the CDK overlay has to be kept out of the\n // top layer (see OVERLAY_DEFAULT_CONFIG in app.config.ts).\n ui_mode: 'split',\n skin: dark ? 'oxide-dark' : 'oxide',\n content_css: dark ? 'dark' : 'default',\n // Absolute URLs must survive untouched: the content ends up in an e-mail, where a\n // relative image path resolves against nothing.\n convert_urls: false,\n plugins: 'advlist autolink lists link image table charmap searchreplace code fullscreen',\n toolbar: 'undo redo | blocks | bold italic underline | forecolor backcolor'\n + ' | bullist numlist | link image table | removeformat code fullscreen',\n content_style: 'body { font-family: Arial, Helvetica, sans-serif; font-size: 14px; }',\n // Pasted and dropped images go through the same upload path as the image dialog.\n automatic_uploads: !!uploader,\n paste_data_images: !!uploader,\n images_file_types: 'jpeg,jpg,png,gif,webp',\n file_picker_types: uploader ? 'image' : '',\n images_upload_handler: uploader\n ? (blobInfo) => uploader(new File([blobInfo.blob()], blobInfo.filename(), { type: blobInfo.blob().type }))\n : undefined,\n };\n\n await tinymce.init({\n ...defaults,\n // The caller's profile wins over every default above: that is what the presets in\n // `TinymceUtils` are for.\n ...this.tinymceConfig(),\n // Not negotiable, whatever the profile says. `target` and `base_url` are resolved\n // here and nowhere else, `inline` is the input's job, and replacing `setup` would\n // unhook the editor from the form and leave a ControlValueAccessor that never\n // reports a change.\n target: this.host.nativeElement,\n base_url: this.loader.baseUrl,\n inline,\n setup: (editor: Editor) => {\n // Typing, toolbar commands, undo/redo and programmatic inserts all have to\n // reach the form; the guard keeps our own writes from bouncing back.\n editor.on('change input undo redo SetContent', () => {\n if (this.writingValue) return;\n this.value = editor.getContent();\n this.onChange(this.value);\n this.changeDetector.markForCheck();\n });\n editor.on('blur', () => {\n this.onTouched();\n this.changeDetector.markForCheck();\n });\n editor.on('FullscreenStateChanged', (event) => {\n this.handleFullscreenChanged((event as unknown as { state?: boolean }).state === true);\n });\n // The content of a classic editor lives in an iframe, so its keystrokes are\n // only visible from the editor itself.\n editor.on('keydown', (event) => {\n if (!this.shouldEscapeLeaveFullscreen(event)) return;\n event.preventDefault();\n event.stopPropagation();\n this.exitFullscreen();\n });\n editor.on('init', () => {\n this.editor = editor;\n this.applyValue(this.value);\n this.applyDisabled(this.disabled);\n this.ready.emit(editor);\n this.changeDetector.markForCheck();\n });\n },\n });\n } catch (error) {\n if (this.destroyed) return;\n this.failed.emit(error instanceof Error ? error : new Error(String(error)));\n this.changeDetector.markForCheck();\n }\n }\n\n /**\n * Tears the editor down. TinyMCE keeps global state per instance, so leaving it behind when a\n * dialog closes leaks both DOM and editor registrations.\n * @returns void\n */\n ngOnDestroy(): void {\n this.destroyed = true;\n // Removing the editor does not raise the full-screen event, so the session is closed by\n // hand here: the Escape listener would otherwise stay attached to the document forever.\n this.releaseFullscreen();\n this.editor?.remove();\n this.editor = undefined;\n }\n\n /**\n * Decides whether an Escape press means \"leave full screen\": it does whenever the editor is\n * full screen, full stop. While full screen the editor owns Escape, and the press is stopped\n * here so it can never reach the dialog hosting it — leaving full screen must not also throw\n * away what is being written.\n * @param event The keyboard event, from the document or from the editor's content.\n * @returns True when full screen should be left.\n */\n private shouldEscapeLeaveFullscreen(event: KeyboardEvent): boolean {\n return event.key === 'Escape' && this.fullscreen;\n }\n\n /**\n * Asks the editor to leave full screen. Safe to call when it is not in full screen.\n * @returns void\n */\n private exitFullscreen(): void {\n if (!this.fullscreen) return;\n this.editor?.execCommand('mceFullScreen');\n }\n\n /**\n * Attaches or detaches everything that only makes sense while the editor is full screen.\n * @param state True when the editor has just entered full screen.\n * @returns void\n */\n private handleFullscreenChanged(state: boolean): void {\n if (state === this.fullscreen) return;\n this.fullscreen = state;\n\n if (state) {\n document.addEventListener('keydown', this.onDocumentKeydown, true);\n } else {\n this.releaseFullscreen();\n }\n\n this.changeDetector.markForCheck();\n }\n\n /**\n * Detaches the listener that only makes sense while the editor is full screen.\n * @returns void\n */\n private releaseFullscreen(): void {\n document.removeEventListener('keydown', this.onDocumentKeydown, true);\n this.fullscreen = false;\n }\n\n /**\n * Pushes a value coming from the form into the editor.\n * @param value The new content, or null/undefined for an empty editor.\n * @returns void\n */\n writeValue(value: string | null | undefined): void {\n this.value = value ?? '';\n this.applyValue(this.value);\n }\n\n /**\n * Registers the callback used to report content changes to the form.\n * @param fn The callback supplied by Angular forms.\n * @returns void\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Registers the callback used to report the first blur to the form.\n * @param fn The callback supplied by Angular forms.\n * @returns void\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Enables or disables editing.\n * @param isDisabled True to switch the editor to read-only.\n * @returns void\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.applyDisabled(isDisabled);\n }\n\n /**\n * Writes content into the editor when it exists, guarding against the echo described on\n * <see cref=\"writingValue\"/>.\n * @param value The content to write.\n * @returns void\n */\n private applyValue(value: string): void {\n const editor = this.editor;\n if (!editor) return;\n // Comparing with the serialized content avoids resetting the caret on every form patch\n // that did not actually change anything.\n if (editor.getContent() === value) return;\n this.writingValue = true;\n try {\n editor.setContent(value);\n } finally {\n this.writingValue = false;\n }\n }\n\n /**\n * Applies the disabled state to the editor when it exists.\n * @param isDisabled True to switch the editor to read-only.\n * @returns void\n */\n private applyDisabled(isDisabled: boolean): void {\n this.editor?.mode.set(isDisabled ? 'readonly' : 'design');\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, output, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef } from '@angular/material/dialog';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport type { RawEditorOptions } from 'tinymce';\nimport { TinymceEditorDirective } from '../tinymce-editor.directive';\nimport { TinymceUtils } from '../utils';\n\nexport interface TinyMceEditorDialogData {\n text: string;\n configuration: RawEditorOptions;\n infoButtonLabel?: string;\n onShowInfo?: Function,\n disabled?: boolean;\n}\n\n/**\n * A dialog that is nothing but an editor: the caller hands it a text and gets the edited one\n * back through {@link saving}.\n *\n * The editor is {@link TinymceEditorDirective} on a plain `<textarea>`, so this dialog costs\n * exactly what any other editor in the application costs — the TinyMCE bundle is fetched on\n * first use and nothing about it reaches the initial chunk.\n */\n@Component({\n templateUrl: './editor.component.html',\n styleUrls: ['./editor.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatDialogContent, TinymceEditorDirective, FormsModule, MatDialogActions, FlexLayoutModule,\n MatButtonModule, MatDialogClose]\n})\nexport class TinyMceEditorComponent {\n\n /** Emitted with the edited text when the user saves. */\n readonly saving = output<string>();\n private readonly dialogRef = inject(MatDialogRef<TinyMceEditorComponent>);\n /** Dialog configuration, injected and exposed as a signal. */\n protected readonly dialogData = signal<TinyMceEditorDialogData>((() => {\n const data: TinyMceEditorDialogData = inject(MAT_DIALOG_DATA) ?? {};\n return { ...data, text: data.text ?? '' };\n })());\n /** Whether the editor is in read-only mode. */\n protected readonly disabled = signal<boolean>(false);\n /** Current editor content, kept as a plain field for [(ngModel)] two-way binding. */\n protected text = '';\n /** The profile handed to the editor directive, merged over its defaults. */\n protected tinymceConfig: RawEditorOptions = {};\n\n constructor() {\n const data = this.dialogData();\n this.text = data.text;\n // The accessor already returns a private copy, so the toolbar override below cannot leak\n // into the preset shared with the rest of the application.\n this.tinymceConfig = data.configuration\n ? { ...data.configuration }\n : TinymceUtils.TinymceCompactExtendedConfig;\n // No full screen: the editor already owns the whole dialog.\n this.tinymceConfig.toolbar = ['undo redo | quickimage insertgroup | formatgroup paragraphgroup | code'];\n this.disabled.set(data.disabled ?? false);\n }\n\n\n /**\n * Save the current editor content and close the dialog.\n */\n protected ok(): void {\n this.saving.emit(this.text ?? '');\n setTimeout(() => {\n this.dialogRef.close();\n }, 500);\n }\n}\n","<mat-dialog-content style=\"padding: 10px 10px 0 10px\">\r\n <textarea tinymceEditor class=\"full-screen-editor\" name=\"text\" [tinymceConfig]=\"tinymceConfig\"\r\n [disabled]=\"disabled()\" [(ngModel)]=\"text\"></textarea>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"50\">\r\n @if(dialogData().onShowInfo) {\r\n <button mat-stroked-button (click)=\"dialogData().onShowInfo()\">{{dialogData().infoButtonLabel ?? 'Informazioni'}}\r\n </button>\r\n }\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n @if (disabled()) {\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Chiudi</button>\r\n } @else {\r\n <button mat-flat-button (click)=\"ok()\">Salva</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\r\n }\r\n </div>\r\n </div>\r\n</mat-dialog-actions>\r\n","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.tinymce\n */\nexport * from './utils';\nexport * from './tinymce-loader.service';\nexport * from './tinymce-editor.directive';\nexport * from './editor/editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;AAkBG;MACU,YAAY,CAAA;AAEvB;;;;;;;;AAQG;AACqB,IAAA,SAAA,IAAA,CAAA,IAAI,GAAqB;AAC/C,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,UAAU,EAAE,GAAG;AACf,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,kBAAkB,EAAE,IAAI;AACxB,QAAA,uBAAuB,EAAE,EAAE;;AAE3B,QAAA,qBAAqB,EAAE,IAAI;AAC3B,QAAA,gBAAgB,EAAE,KAAK;AACvB,QAAA,SAAS,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC;AACnD,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,OAAO,EAAE;cACL;cACA,2BAA2B;AAC/B,QAAA,OAAO,EAAE;YACP,2HAA2H;YAC3H;AACD,SAAA;AACD,QAAA,wBAAwB,EAAE,KAAK;AAC/B,QAAA,2BAA2B,EAAE,iFAAiF;AAC9G,QAAA,aAAa,EAAE;AACb,YAAA;AACE,gBAAA,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE;AAC9B,oBAAA,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE;AAC/F,oBAAA,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,E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uBAAuB,CAAC,MAAM,WACtC,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB;wBACjG,eAAe,EAAE,cAAc,CAAC,EAAA,QAAA,EAAA,89BAAA,EAAA,MAAA,EAAA,CAAA,uKAAA,CAAA,EAAA;;;AE/BpC;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arsedizioni/ars-utils",
|
|
3
|
-
"version": "22.5.
|
|
3
|
+
"version": "22.5.11",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "software@arsedizioni.it",
|
|
6
6
|
"name": "Fabio Buscaroli, Alberto Doria"
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"file-saver": "^2",
|
|
21
21
|
"@azure/msal-angular": "^6",
|
|
22
22
|
"@azure/msal-browser": "^5",
|
|
23
|
-
"@tinymce/tinymce-angular": "^9",
|
|
24
23
|
"tinymce": "^8"
|
|
25
24
|
},
|
|
26
25
|
"peerDependenciesMeta": {
|
|
@@ -30,9 +29,6 @@
|
|
|
30
29
|
"@azure/msal-browser": {
|
|
31
30
|
"optional": true
|
|
32
31
|
},
|
|
33
|
-
"@tinymce/tinymce-angular": {
|
|
34
|
-
"optional": true
|
|
35
|
-
},
|
|
36
32
|
"tinymce": {
|
|
37
33
|
"optional": true
|
|
38
34
|
}
|