@arsedizioni/ars-utils 22.1.5 → 22.5.2
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 +158 -10
- package/clipper.ui/clipper.scss +564 -0
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +11 -7
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +609 -0
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +591 -0
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-core.mjs +270 -1449
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +14 -4108
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +962 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +506 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +450 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +184 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +825 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +708 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +426 -0
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +531 -0
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +54 -1227
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1049 -0
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +263 -0
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +4 -3
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +53 -0
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +517 -0
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +246 -0
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils.mjs +13 -12
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/help/package.json +4 -0
- package/package.json +80 -14
- package/styles/ui.colors.scss +23 -0
- package/support.ui/package.json +4 -0
- package/tinymce/package.json +4 -0
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1 -2
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +4 -1
- package/types/arsedizioni-ars-utils-core.d.ts +684 -1004
- package/types/arsedizioni-ars-utils-core.date.d.ts +304 -0
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +159 -0
- package/types/arsedizioni-ars-utils-ui.application.d.ts +10 -2022
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +413 -0
- package/types/arsedizioni-ars-utils-ui.d.ts +183 -566
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +224 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +228 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +47 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +309 -0
- package/types/arsedizioni-ars-utils-ui.files.d.ts +271 -0
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +163 -0
- package/types/arsedizioni-ars-utils-ui.help.d.ts +220 -0
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +650 -0
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +73 -0
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +23 -0
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +345 -0
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +63 -0
- package/types/arsedizioni-ars-utils.d.ts +4 -10
- package/ui.tinymce/README.md +12 -0
- package/ui.tinymce/langs/it.js +466 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-ui.shell.mjs","sources":["../../../projects/ars-utils/ui.shell/busy-timer.ts","../../../projects/ars-utils/ui.shell/shell-busy/shell-busy.component.ts","../../../projects/ars-utils/ui.shell/shell-busy/shell-busy.component.html","../../../projects/ars-utils/ui.shell/shell-message/shell-message.component.ts","../../../projects/ars-utils/ui.shell/shell-message/shell-message.component.html","../../../projects/ars-utils/ui.shell/shell.service.ts","../../../projects/ars-utils/ui.shell/public_api.ts","../../../projects/ars-utils/ui.shell/arsedizioni-ars-utils-ui.shell.ts"],"sourcesContent":["import { Subscription, timer } from 'rxjs';\nimport { tap } from 'rxjs/operators';\nimport type { ShellService } from './shell.service';\n\n/**\n * Shows the busy overlay only if the operation is still running after a debounce delay, so that\n * an operation that answers in 30 ms never makes the screen flash.\n *\n * Whoever creates one owns it: {@link clear} must be called when the operation ends, otherwise\n * the overlay appears after the fact and stays.\n */\nexport class BusyTimer {\n private readonly subscription: Subscription;\n\n /**\n * Arms the timer.\n * @param shellService - The service that owns the overlay. A `DialogService` is accepted too,\n * since it extends `ShellService`.\n * @param due - Delay in milliseconds before the overlay appears. Defaults to `100`.\n * @param message - Text to display. Defaults to `'Operazione in corso...'`.\n */\n constructor(\n private readonly shellService: ShellService,\n due: number = 100,\n message: string = 'Operazione in corso...'\n ) {\n this.subscription = timer(due).pipe(tap(() => this.shellService.busy(message))).subscribe();\n }\n\n /**\n * Disarms the timer and takes the overlay away.\n * @returns void\n */\n clear(): void {\n this.subscription.unsubscribe();\n this.shellService.clearBusy();\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, signal } from '@angular/core';\nimport { SafeHtmlPipe } from '@arsedizioni/ars-utils/core';\n\n/** Visual style of the busy indicator. */\nexport type ShellBusyType = 'bar' | 'spinner' | 'wait' | 'hourglass';\n\n/** Progress mode of the bar and of the spinner. */\nexport type ShellBusyMode = 'determinate' | 'indeterminate';\n\n/** Circumference of the spinner circle, in user units. Kept here so the template stays arithmetic-free. */\nconst SPINNER_CIRCUMFERENCE = 2 * Math.PI * 31.5;\n\n/**\n * Overlay that blocks interaction while an operation is running, in the four styles the\n * applications use: progress bar, spinner, hourglass and bare wait.\n *\n * Reproduces `mat-progress-bar` and `mat-progress-spinner` in CSS and SVG rather than importing\n * them, because this overlay is shown from the boot path — an HTTP interceptor calls it before\n * any route exists — and `ui.shell` exists precisely so that path costs no Material.\n *\n * The instance is created once by {@link ShellService} and then reused: showing and hiding is a\n * class on the host, never a `createComponent`, so the 40-odd calls a screen costs nothing.\n */\n@Component({\n selector: 'ars-shell-busy',\n templateUrl: './shell-busy.component.html',\n styleUrl: './shell-busy.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SafeHtmlPipe],\n host: { '[class.ars-hidden]': '!visible()' }\n})\nexport class ShellBusyComponent {\n\n /** Whether the overlay is on screen. Hidden with `display: none`, so it costs no layout. */\n readonly visible = signal(false);\n\n /** Visual style of the indicator. */\n readonly type = signal<ShellBusyType>('bar');\n\n /** Current progress value (0-100), used when {@link progressMode} is `'determinate'`. */\n readonly progress = signal(0);\n\n /** Progress mode of the bar and of the spinner. */\n readonly progressMode = signal<ShellBusyMode>('indeterminate');\n\n /** Message displayed above the indicator. */\n readonly message = signal('');\n\n /** Circumference of the spinner circle, bound to `stroke-dasharray`. */\n protected readonly circumference = SPINNER_CIRCUMFERENCE;\n\n /** Length of the spinner arc still to be drawn, derived from {@link progress}. */\n protected readonly dashOffset = computed(\n () => SPINNER_CIRCUMFERENCE * (1 - Math.min(Math.max(this.progress(), 0), 100) / 100)\n );\n\n /**\n * Updates the overlay state.\n *\n * Same contract as the `BusyDialogComponent` it replaces, down to the two implicit rules that\n * callers rely on: an empty message keeps the previous text (so `wait()` does not wipe it), and\n * a progress above zero forces `'determinate'` whatever the caller passed.\n * @param message - New message to display. An empty string preserves the current one.\n * @param progress - Current progress value (0-100). Above zero it forces determinate mode.\n * @param progressMode - Progress mode to use. Defaults to `'indeterminate'`.\n * @param type - Visual style to use. Defaults to `'bar'`.\n * @returns void\n */\n set(\n message: string,\n progress: number,\n progressMode: ShellBusyMode = 'indeterminate',\n type: ShellBusyType = 'bar'\n ): void {\n if (message) this.message.set(message);\n if (type) this.type.set(type);\n this.progress.set(progress);\n this.progressMode.set(progress > 0 ? 'determinate' : progressMode);\n }\n}\n","<div class=\"scrim\"></div>\n\n@if (type() === 'hourglass' || type() === 'wait') {\n<div class=\"bare\">\n <svg class=\"hourglass\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M6 2h12v6l-4 4 4 4v6H6v-6l4-4-4-4zm2 2v3.2l4 4 4-4V4zm0 16h8v-3.2l-4-4-4 4z\" />\n </svg>\n @if (type() === 'hourglass' && message()) {\n <div class=\"message\" [innerHTML]=\"message() | safeHtml\"></div>\n }\n</div>\n} @else {\n<div class=\"panel\" role=\"status\" aria-live=\"polite\">\n @if (message()) {\n <div class=\"message\" [innerHTML]=\"message() | safeHtml\"></div>\n }\n\n @if (type() === 'bar') {\n <div class=\"bar\" [class.indeterminate]=\"progressMode() === 'indeterminate'\">\n <div class=\"bar-fill\" [style.width.%]=\"progressMode() === 'determinate' ? progress() : null\"></div>\n </div>\n } @else if (type() === 'spinner') {\n <svg class=\"spinner\" [class.indeterminate]=\"progressMode() === 'indeterminate'\" viewBox=\"0 0 70 70\"\n aria-hidden=\"true\">\n <circle class=\"track\" cx=\"35\" cy=\"35\" r=\"31.5\"></circle>\n <circle class=\"arc\" cx=\"35\" cy=\"35\" r=\"31.5\" [style.stroke-dasharray]=\"circumference\"\n [style.stroke-dashoffset]=\"progressMode() === 'determinate' ? dashOffset() : null\"></circle>\n </svg>\n }\n\n @if (progress() > 0) {\n <div class=\"percent\"><b>{{ progress() }}%</b></div>\n }\n</div>\n}\n","import {\n ChangeDetectionStrategy, Component, DestroyRef, ElementRef,\n HostListener, afterNextRender, inject, output, signal, viewChild\n} from '@angular/core';\nimport { SafeHtmlPipe } from '@arsedizioni/ars-utils/core';\nimport { ShellMessageData } from '../definitions';\n\n/**\n * The shell's message panel: a modal that looks like a Material dialog and owes nothing to\n * Material.\n *\n * It exists because shell, interceptors, guards and app initializers must be able to say\n * \"the session is gone\" before a single route has been loaded, and paying for `mat-dialog`,\n * `cdk/overlay` and the rest of that stack on the boot path costs the initial bundle more\n * than every route of the application put together. The look is matched through CSS custom\n * properties (`--ars-*` first, Material's `--mat-sys-*` next, a literal last), so an\n * application that themes Material gets the same surface here for free.\n *\n * Instantiated imperatively by {@link ShellService}, never declared in a template: that is\n * what lets an interceptor open it.\n */\n@Component({\n selector: 'ars-shell-message',\n templateUrl: './shell-message.component.html',\n styleUrl: './shell-message.component.scss',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SafeHtmlPipe]\n})\nexport class ShellMessageComponent {\n\n /** Emitted when the user dismisses the message, whichever way they did it. */\n readonly closed = output<void>();\n\n private readonly panel = viewChild.required<ElementRef<HTMLElement>>('panel');\n private readonly okButton = viewChild.required<ElementRef<HTMLButtonElement>>('ok');\n\n /** Unique id tying the panel to its heading for assistive technology. */\n protected readonly titleId = `ars-shell-message-title-${Math.random().toString(36).slice(2, 10)}`;\n\n /** Current content, with the defaults the shell relies on already applied. */\n protected readonly data = signal<ShellMessageData>({ message: '', title: 'Informazioni', okCaption: 'Ok', width: 500 });\n\n /** True for a moment after a successful copy, so the button can acknowledge it. */\n protected readonly copied = signal(false);\n\n private dismissTimer?: ReturnType<typeof setTimeout>;\n private copiedTimer?: ReturnType<typeof setTimeout>;\n private closing = false;\n\n constructor() {\n afterNextRender(() => this.okButton().nativeElement.focus());\n inject(DestroyRef).onDestroy(() => {\n clearTimeout(this.dismissTimer);\n clearTimeout(this.copiedTimer);\n });\n }\n\n /**\n * Replaces the content shown by the panel and restarts the auto-dismiss timer.\n *\n * Called on an already open panel by `ShellService.error()` so that a burst of failures\n * updates one message instead of stacking modals nobody can dismiss.\n * @param data - The new content to display.\n * @returns void\n */\n setData(data: ShellMessageData): void {\n this.data.set({ title: 'Informazioni', okCaption: 'Ok', width: 500, ...data });\n this.scheduleDismiss(this.data().dismissAfter);\n }\n\n /**\n * Dismisses the panel. Safe to call more than once: only the first call is announced.\n * @returns void\n */\n close(): void {\n if (this.closing) return;\n this.closing = true;\n clearTimeout(this.dismissTimer);\n this.closed.emit();\n }\n\n /**\n * Closes the panel on Escape, mirroring a Material dialog opened with the default config.\n * @param e - The keyboard event captured at document level.\n * @returns void\n */\n @HostListener('document:keydown', ['$event'])\n protected onKeydown(e: KeyboardEvent): void {\n if (e.key === 'Escape') {\n e.preventDefault();\n this.close();\n return;\n }\n if (e.key === 'Tab') this.trapFocus(e);\n }\n\n /**\n * Keeps Tab inside the panel while the message is up.\n *\n * A hand-rolled two-element version of what `cdk/a11y` does, which is all this panel needs:\n * it never holds more than the copy button and the dismiss button.\n * @param e - The Tab keydown event.\n * @returns void\n */\n private trapFocus(e: KeyboardEvent): void {\n const focusable = Array.from(\n this.panel().nativeElement.querySelectorAll<HTMLElement>('button:not([disabled]), [href], [tabindex]:not([tabindex=\"-1\"])')\n );\n if (!focusable.length) return;\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = document.activeElement;\n\n if (e.shiftKey && (active === first || !this.panel().nativeElement.contains(active))) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && active === last) {\n e.preventDefault();\n first.focus();\n }\n }\n\n /**\n * (Re)schedules the auto-dismiss timer, cancelling any pending one so a timer armed for an\n * earlier message can never close a newer one.\n * @param dismissAfter - Delay in milliseconds; no-op when falsy.\n * @returns void\n */\n private scheduleDismiss(dismissAfter?: number): void {\n clearTimeout(this.dismissTimer);\n this.dismissTimer = undefined;\n if (dismissAfter) this.dismissTimer = setTimeout(() => this.close(), dismissAfter);\n }\n\n /**\n * Copies the message and its details to the clipboard, as both HTML and plain text.\n *\n * Unlike `InfoDialogComponent` there is no toast to report the outcome — the shell has no\n * toast — so the button itself acknowledges it for a moment.\n * @returns A promise that resolves once the copy has been attempted.\n */\n protected async copy(): Promise<void> {\n const content = this.panel().nativeElement.querySelector<HTMLElement>('.content');\n if (!content) return;\n try {\n await navigator.clipboard.write([\n new ClipboardItem({\n 'text/html': new Blob([content.innerHTML], { type: 'text/html' }),\n 'text/plain': new Blob([content.innerText], { type: 'text/plain' })\n })\n ]);\n this.copied.set(true);\n clearTimeout(this.copiedTimer);\n this.copiedTimer = setTimeout(() => this.copied.set(false), 1500);\n } catch {\n // Clipboard permission denied or the document is not focused: nothing worth interrupting\n // the user for, and the text is on screen anyway.\n }\n }\n}\n","<div class=\"scrim\" (click)=\"close()\"></div>\n\n<div #panel class=\"panel\" role=\"alertdialog\" aria-modal=\"true\" [attr.aria-labelledby]=\"titleId\"\n [style.max-width.px]=\"data().width\">\n\n <h2 class=\"title\" [id]=\"titleId\" [innerHTML]=\"data().title | safeHtml\"></h2>\n\n <div class=\"content\">\n @if (data().message) {\n <div class=\"message\" [innerHTML]=\"data().message | safeHtml\"></div>\n }\n @if (data().details) {\n <div class=\"details-box\">\n <div class=\"details-separator\"></div>\n <p class=\"details-label\">Dettaglio:</p>\n <div class=\"details\">\n <div [innerHTML]=\"data().details | safeHtml\"></div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"actions\">\n <button type=\"button\" class=\"icon-button\" (click)=\"copy()\"\n [title]=\"copied() ? 'Copiato negli appunti' : 'Copia negli appunti'\" aria-label=\"Copia negli appunti\">\n @if (copied()) {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z\" /></svg>\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path\n d=\"M16 1H4a2 2 0 0 0-2 2v14h2V3h12zm3 4H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m0 16H8V7h11z\" /></svg>\n }\n </button>\n <button #ok type=\"button\" class=\"flat-button\" (click)=\"close()\">{{ data().okCaption }}</button>\n </div>\n</div>\n","import { ApplicationRef, ComponentRef, EnvironmentInjector, Service, createComponent, inject } from '@angular/core';\nimport { SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { Observable, Subscription } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport { BusyTimer } from './busy-timer';\nimport { ShellMessageData, ShellMessageRef } from './definitions';\nimport { ShellBusyComponent, ShellBusyMode, ShellBusyType } from './shell-busy/shell-busy.component';\nimport { ShellMessageComponent } from './shell-message/shell-message.component';\n\n/** Grace period before the busy overlay is actually taken away, in milliseconds. */\nconst CLEAR_BUSY_GRACE = 500;\n\n/**\n * Everything the application can say to the user without asking anything back: a message, an\n * error, and the wait overlay. No Angular Material behind any of it.\n *\n * `DialogService` extends this class, so a route component injects `DialogService` and has both\n * halves; shell, HTTP interceptors, route guards and app initializers inject `ShellService` and\n * pay for neither `mat-dialog` nor `cdk/overlay` on the boot path — measured at 445 KB of the\n * 905 KB initial bundle on myARS, more than every route of the application put together.\n *\n * The methods keep the parameter order of the `DialogService` ones they came from, so no call\n * site changed when they moved here.\n *\n * ## Stacking\n *\n * Outside the CDK overlay stack the order is a fixed z-index: the busy overlay sits at 1090 and\n * the message at 1100, both above the `cdk-overlay-container` (1000). So an error raised while a\n * Material dialog is open lands on top of it, which is what an error should do, and the busy\n * overlay covers the dialog it belongs to. The one case a fixed number cannot express is a dialog\n * opened while the overlay is still up — `DialogService.open()` takes the busy away immediately\n * rather than with the grace period, precisely so that case cannot happen.\n */\n@Service()\nexport class ShellService {\n\n private readonly appRef = inject(ApplicationRef);\n private readonly environmentInjector = inject(EnvironmentInjector);\n\n private messageRef?: ComponentRef<ShellMessageComponent>;\n private messageKind?: 'info' | 'error';\n private resolveClosed?: () => void;\n private previousOverflow?: string;\n private previouslyFocused?: HTMLElement;\n\n private busyRef?: ComponentRef<ShellBusyComponent>;\n private busyVisible = false;\n private busyActionSubscription?: Subscription;\n private clearBusyTimer?: ReturnType<typeof setTimeout>;\n\n // ---------------------------------------------------------------------------\n // Messages\n // ---------------------------------------------------------------------------\n\n /**\n * Shows an informational message.\n * @param message - HTML message to display.\n * @param title - Heading. Defaults to `'Informazioni'`.\n * @param okCaption - Dismiss button label. Defaults to `'Ok'`.\n * @param width - Maximum panel width in pixels. Defaults to `500`.\n * @param dismissAfter - Auto-close delay in milliseconds (optional).\n * @param details - Optional secondary details text.\n * @returns A handle over the open message, or `null` outside the browser.\n */\n info(\n message: string,\n title: string = 'Informazioni',\n okCaption: string = 'Ok',\n width: number = 500,\n dismissAfter?: number,\n details?: string\n ): ShellMessageRef | null {\n this.clearBusy();\n return this.showMessage('info', { message, title, okCaption, width, dismissAfter, details });\n }\n\n /**\n * Shows an error message. When one is already on screen its content is replaced in place: a\n * failing API answers many requests at once, and each of them must not add a panel of its own.\n * @param message - HTML error message to display.\n * @param log - Optional technical log or stack trace shown in the details panel.\n * @param title - Heading. Defaults to `'Errore'`.\n * @param okCaption - Dismiss button label. Defaults to `'Ok'`.\n * @param width - Maximum panel width in pixels. Defaults to `500`.\n * @param dismissAfter - Auto-close delay in milliseconds (optional).\n * @returns A handle over the open message, or `null` outside the browser.\n */\n error(\n message: string,\n log?: string,\n title: string = 'Errore',\n okCaption: string = 'Ok',\n width: number = 500,\n dismissAfter?: number\n ): ShellMessageRef | null {\n this.clearBusy();\n return this.showMessage('error', { message, title, okCaption, width, dismissAfter, details: log });\n }\n\n /**\n * Closes the message currently on screen, if any. Does not touch the busy overlay.\n * @returns void\n */\n closeMessage(): void {\n if (!this.messageRef) return;\n\n const ref = this.messageRef;\n this.messageRef = undefined;\n this.messageKind = undefined;\n\n this.appRef.detachView(ref.hostView);\n ref.destroy();\n\n if (this.previousOverflow !== undefined) {\n document.body.style.overflow = this.previousOverflow;\n this.previousOverflow = undefined;\n }\n this.previouslyFocused?.focus();\n this.previouslyFocused = undefined;\n\n this.resolveClosed?.();\n this.resolveClosed = undefined;\n }\n\n /**\n * Opens the message panel, or updates the one already open when it is showing the same kind of\n * message.\n * @param kind - Whether this is an informational or an error message.\n * @param data - The content to display.\n * @returns A handle over the open message, or `null` outside the browser.\n */\n private showMessage(kind: 'info' | 'error', data: ShellMessageData): ShellMessageRef | null {\n if (!SystemUtils.isBrowser()) return null;\n\n if (this.messageRef && this.messageKind === kind) {\n this.messageRef.instance.setData(data);\n this.messageRef.changeDetectorRef.detectChanges();\n return this.messageHandle();\n }\n\n // A message of a different kind replaces the one on screen rather than stacking on it.\n this.closeMessage();\n\n const ref = createComponent(ShellMessageComponent, { environmentInjector: this.environmentInjector });\n ref.instance.setData(data);\n ref.instance.closed.subscribe(() => this.closeMessage());\n\n this.previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : undefined;\n this.previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n\n this.appRef.attachView(ref.hostView);\n document.body.appendChild(ref.location.nativeElement as HTMLElement);\n\n this.messageRef = ref;\n this.messageKind = kind;\n return this.messageHandle();\n }\n\n /**\n * Builds the handle returned to callers, wiring its `closed` promise to the current message.\n * @returns The handle over the message currently on screen.\n */\n private messageHandle(): ShellMessageRef {\n const closed = new Promise<void>(resolve => { this.resolveClosed = resolve; });\n return { close: () => this.closeMessage(), closed };\n }\n\n // ---------------------------------------------------------------------------\n // Busy overlay\n // ---------------------------------------------------------------------------\n\n /**\n * Shows or updates the busy overlay.\n *\n * Called dozens of times per screen, so it creates nothing after the first time: the component\n * is built once and then kept, and showing it again is a class on the host element. The state\n * is written to signals and checked synchronously before returning, so the message on screen is\n * always the last one asked for — a second `busy()` in the same task never leaves the previous\n * text behind.\n * @param message - Text to display. An empty string keeps the current one.\n * @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.\n * @param progressMode - Progress mode. Defaults to `'indeterminate'`.\n * @param type - Visual style of the overlay. Defaults to `'bar'`.\n * @param action - Optional observable; the overlay is dismissed when it first emits. It\n * replaces the one passed to a previous call, which is unsubscribed.\n * @returns `true` if the overlay was brought up by this call, `false` if it was already up.\n */\n setBusy(\n message: string,\n progress: number = -1,\n progressMode: ShellBusyMode = 'indeterminate',\n type: ShellBusyType = 'bar',\n action?: Observable<unknown>\n ): boolean {\n if (!SystemUtils.isBrowser()) return false;\n\n // Cancel any pending clearBusy(): it must never take away an overlay just asked for.\n clearTimeout(this.clearBusyTimer);\n this.clearBusyTimer = undefined;\n\n const created = !this.busyVisible;\n const ref = this.ensureBusy();\n ref.instance.set(message, progress, progressMode, type);\n ref.instance.visible.set(true);\n this.busyVisible = true;\n ref.changeDetectorRef.detectChanges();\n\n // The action always replaces the previous one. Keeping the first, as the previous\n // implementation did, meant the overlay outlived the operation that was actually running.\n this.busyActionSubscription?.unsubscribe();\n this.busyActionSubscription = action?.pipe(first()).subscribe(() => this.clearBusy());\n\n return created;\n }\n\n /**\n * Shows or updates the busy overlay using the progress-bar style.\n * @param message - Text to display inside the overlay.\n * @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.\n * @param progressMode - Progress mode. Defaults to `'indeterminate'`.\n * @param action - Optional observable; the overlay is dismissed when it emits.\n * @returns `true` if the overlay was brought up by this call.\n */\n busy(\n message: string,\n progress: number = -1,\n progressMode: ShellBusyMode = 'indeterminate',\n action?: Observable<unknown>\n ): boolean {\n return this.setBusy(message, progress, progressMode, 'bar', action);\n }\n\n /**\n * Shows or updates the busy overlay using the spinner style.\n * @param message - Text to display inside the overlay.\n * @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.\n * @param progressMode - Progress mode. Defaults to `'indeterminate'`.\n * @param action - Optional observable; the overlay is dismissed when it emits.\n * @returns `true` if the overlay was brought up by this call.\n */\n busySpinner(\n message: string,\n progress: number = -1,\n progressMode: ShellBusyMode = 'indeterminate',\n action?: Observable<unknown>\n ): boolean {\n return this.setBusy(message, progress, progressMode, 'spinner', action);\n }\n\n /**\n * Shows or updates the busy overlay using the hourglass style.\n * @param message - Text to display inside the overlay.\n * @param action - Optional observable; the overlay is dismissed when it emits.\n * @returns `true` if the overlay was brought up by this call.\n */\n busyHourglass(message: string, action?: Observable<unknown>): boolean {\n return this.setBusy(message, -1, 'indeterminate', 'hourglass', action);\n }\n\n /**\n * Shows a bare wait indicator, with no panel and no message.\n * @param action - Optional observable; the overlay is dismissed when it emits.\n * @returns `true` if the overlay was brought up by this call.\n */\n wait(action?: Observable<unknown>): boolean {\n return this.setBusy('', -1, 'indeterminate', 'wait', action);\n }\n\n /**\n * Returns a {@link BusyTimer} that brings the overlay up only if the operation is still running\n * after a debounce delay.\n * @param message - Text to display. Defaults to `'Operazione in corso...'`.\n * @param due - Delay in milliseconds before the overlay appears. Defaults to `100`.\n * @returns A timer that must be disposed with `clear()` when the operation ends.\n */\n busyTimer(message: string = 'Operazione in corso...', due: number = 100): BusyTimer {\n return new BusyTimer(this, due, message);\n }\n\n /**\n * Takes the busy overlay away.\n *\n * By default it waits a short grace period, so that a chain of quick operations does not make\n * the overlay blink between one and the next; any `setBusy()` in the meantime cancels the\n * pending removal. Pass `true` when something is about to be drawn underneath it and the wait\n * would be visible — that is what `DialogService.open()` does.\n * @param immediate - When `true`, removes the overlay without waiting for the grace period.\n * @returns void\n */\n clearBusy(immediate: boolean = false): void {\n clearTimeout(this.clearBusyTimer);\n this.clearBusyTimer = undefined;\n\n if (immediate) {\n this.hideBusy();\n return;\n }\n this.clearBusyTimer = setTimeout(() => {\n this.clearBusyTimer = undefined;\n this.hideBusy();\n }, CLEAR_BUSY_GRACE);\n }\n\n /**\n * Hides the busy overlay without destroying it, so the next call can reuse the instance.\n * @returns void\n */\n private hideBusy(): void {\n this.busyActionSubscription?.unsubscribe();\n this.busyActionSubscription = undefined;\n if (!this.busyVisible) return;\n this.busyVisible = false;\n this.busyRef?.instance.visible.set(false);\n this.busyRef?.changeDetectorRef.detectChanges();\n }\n\n /**\n * Returns the busy component, creating and attaching it the first time it is needed.\n * @returns The reused busy component reference.\n */\n private ensureBusy(): ComponentRef<ShellBusyComponent> {\n if (this.busyRef) return this.busyRef;\n\n const ref = createComponent(ShellBusyComponent, { environmentInjector: this.environmentInjector });\n this.appRef.attachView(ref.hostView);\n document.body.appendChild(ref.location.nativeElement as HTMLElement);\n this.busyRef = ref;\n return ref;\n }\n}\n","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.shell\n */\nexport * from './definitions';\nexport * from './busy-timer';\nexport * from './shell.service';\nexport * from './shell-message/shell-message.component';\nexport * from './shell-busy/shell-busy.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":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,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,aAA4B,CAAC;AACpE,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG;AAClB,QAAA,OAAO,GAAG;IACZ;8GAvSW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB;;;ACjCD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { output, inject, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions, MatDialogClose } from '@angular/material/dialog';
|
|
4
|
+
import { SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
5
|
+
import * as i3 from '@angular/material/button';
|
|
6
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
+
import * as i2 from '@arsedizioni/ars-utils/ui';
|
|
8
|
+
import { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';
|
|
9
|
+
import * as i1 from '@angular/forms';
|
|
10
|
+
import { FormsModule } from '@angular/forms';
|
|
11
|
+
import { EditorComponent } from '@tinymce/tinymce-angular';
|
|
12
|
+
|
|
13
|
+
class TinymceUtils {
|
|
14
|
+
/**
|
|
15
|
+
* Returns `true` when the user agent currently prefers a dark color scheme.
|
|
16
|
+
* Evaluated on demand (not frozen at module load) and SSR-safe.
|
|
17
|
+
*/
|
|
18
|
+
static prefersDark() {
|
|
19
|
+
return typeof window !== 'undefined'
|
|
20
|
+
&& typeof window.matchMedia === 'function'
|
|
21
|
+
&& window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
22
|
+
}
|
|
23
|
+
/** URL of the TinyMCE script hosted on the Tiny Cloud CDN. */
|
|
24
|
+
static { this.CDN_URL = 'https://cdn.tiny.cloud/1/5lnoc6ohmpjau6zyzgqyhyf52cueoennkcs8v1yfoak57ku9/tinymce/7/tinymce.min.js'; }
|
|
25
|
+
/** URL of the locally bundled TinyMCE script. */
|
|
26
|
+
static { this.LOCAL_URL = '/assets/tinymce/tinymce.min.js'; }
|
|
27
|
+
/**
|
|
28
|
+
* Full-featured TinyMCE base configuration with all standard plugins and toolbar.
|
|
29
|
+
*/
|
|
30
|
+
static { this.TinymceConfig = {
|
|
31
|
+
base_url: 'assets/tinymce',
|
|
32
|
+
suffix: '.min',
|
|
33
|
+
license_key: 'gpl', // per evitare il warning riportarla direttamente nell'html: <editor licenseKey="gpl" ...></editor>
|
|
34
|
+
language: 'it',
|
|
35
|
+
language_url: "assets/tinymce/langs/it.js",
|
|
36
|
+
height: 500,
|
|
37
|
+
width: '100%',
|
|
38
|
+
min_height: 250,
|
|
39
|
+
ui_mode: 'split',
|
|
40
|
+
onboarding: false,
|
|
41
|
+
branding: false,
|
|
42
|
+
convert_urls: false,
|
|
43
|
+
quickbars_insert_toolbar: false,
|
|
44
|
+
quickbars_selection_toolbar: 'removeformat | bold italic | superscript subscript | quicklink h2 h3 blockquote',
|
|
45
|
+
fullpage_default_doctype: '<!DOCTYPE html>',
|
|
46
|
+
fullpage_default_encoding: 'UTF-8',
|
|
47
|
+
fullpage_default_font_family: '\'Helvetica Neue\', sans-serif', // '\'Times New Roman\', Georgia, Serif',
|
|
48
|
+
fullpage_default_xml_pi: false,
|
|
49
|
+
fullpage_hide_in_source_view: false,
|
|
50
|
+
browser_spellcheck: true,
|
|
51
|
+
spellchecker_language: 'it_IT',
|
|
52
|
+
save_enablewhendirty: true,
|
|
53
|
+
custom_undo_redo_levels: 50,
|
|
54
|
+
nonbreaking_force_tab: true, // inserisce 3 per ogni pressione di TAB
|
|
55
|
+
nonbreaking_wrap: false,
|
|
56
|
+
help_tabs: ['shortcuts', 'keyboardnav', 'versions'],
|
|
57
|
+
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',
|
|
58
|
+
menubar: false,
|
|
59
|
+
skin: TinymceUtils.prefersDark() ? "oxide-dark" : "oxide",
|
|
60
|
+
content_css: TinymceUtils.prefersDark() ? "dark" : "default",
|
|
61
|
+
toolbar: [
|
|
62
|
+
'fullscreen | undo redo searchreplace | code openCodeMirrorButton preview fullpage | link image media insertMediaButton charmap nonbreaking | table tableprops tabledelete',
|
|
63
|
+
'bold italic superscript subscript forecolor backcolor | alignleft aligncenter alignright alignjustify | removeformat | bullist numlist checklist'
|
|
64
|
+
],
|
|
65
|
+
style_formats: [
|
|
66
|
+
{
|
|
67
|
+
title: 'Immagini float', items: [
|
|
68
|
+
{
|
|
69
|
+
title: 'Immagine a SX',
|
|
70
|
+
selector: 'img',
|
|
71
|
+
styles: { float: 'left', margin: '0 10px 0 10px' }
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'Immagine a DX',
|
|
75
|
+
selector: 'img',
|
|
76
|
+
styles: { float: 'right', margin: '0 10px 0 10px' }
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: 'Formati', items: [
|
|
82
|
+
{ title: 'Grassetto', format: 'bold' },
|
|
83
|
+
{ title: 'Corsivo', format: 'italic' },
|
|
84
|
+
{ title: 'Sottolineato', format: 'underline' },
|
|
85
|
+
{ title: 'Barrato', format: 'strikethrough' },
|
|
86
|
+
{ title: 'Superscript', format: 'superscript' },
|
|
87
|
+
{ title: 'Subscript', format: 'subscript' },
|
|
88
|
+
{ title: 'Codice', format: 'code' }
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
formats: {
|
|
93
|
+
underline: { inline: 'span', styles: { 'text-decoration': 'underline' }, exact: true },
|
|
94
|
+
strikethrough: { inline: 'span', styles: { 'text-decoration': 'line-through' }, exact: true }
|
|
95
|
+
},
|
|
96
|
+
insertdatetime_formats: ['%d/%m/%Y', '%d %b %Y', '%A, %d %B %Y'],
|
|
97
|
+
link_default_target: '_blank',
|
|
98
|
+
link_title: true,
|
|
99
|
+
link_assume_external_targets: 'https',
|
|
100
|
+
link_class_list: [
|
|
101
|
+
{ title: 'Nessuno', value: '' },
|
|
102
|
+
{ title: 'Rilevante', value: 'relevant' },
|
|
103
|
+
],
|
|
104
|
+
link_context_toolbar: true,
|
|
105
|
+
link_quicklink: true,
|
|
106
|
+
rel_list: false,
|
|
107
|
+
image_advtab: true,
|
|
108
|
+
paste_data_images: true,
|
|
109
|
+
image_caption: true,
|
|
110
|
+
image_title: true,
|
|
111
|
+
automatic_uploads: true,
|
|
112
|
+
images_reuse_filename: true,
|
|
113
|
+
images_upload_credentials: true,
|
|
114
|
+
file_picker_types: 'file image',
|
|
115
|
+
}; }
|
|
116
|
+
/**
|
|
117
|
+
* Compact TinyMCE configuration with autoresize, bottom toolbar, and grouped toolbar buttons.
|
|
118
|
+
* Extends `TinymceConfig` with reduced height and a simplified toolbar.
|
|
119
|
+
*/
|
|
120
|
+
static { this.TinymceCompactConfig = Object.assign(structuredClone(this.TinymceConfig), {
|
|
121
|
+
height: 200,
|
|
122
|
+
width: '100%',
|
|
123
|
+
suffix: '.min',
|
|
124
|
+
license_key: 'gpl',
|
|
125
|
+
ui_mode: 'split',
|
|
126
|
+
min_height: 200,
|
|
127
|
+
max_height: 500,
|
|
128
|
+
quickbars_insert_toolbar: 'quickimage hr',
|
|
129
|
+
quickbars_selection_toolbar: 'removeformat | bold italic | superscript subscript | quicklink h2 h3 blockquote',
|
|
130
|
+
plugins: 'advlist anchor autolink autosave autoresize charmap code image insertdatetime link lists media table nonbreaking preview quickbars searchreplace visualblocks visualchars',
|
|
131
|
+
statusbar: false,
|
|
132
|
+
menubar: false,
|
|
133
|
+
contextmenu: false,
|
|
134
|
+
toolbar_location: 'bottom',
|
|
135
|
+
toolbar: ['undo redo | quickimage | formatgroup paragraphgroup '],
|
|
136
|
+
toolbar_groups: {
|
|
137
|
+
formatgroup: {
|
|
138
|
+
icon: 'format',
|
|
139
|
+
tooltip: 'Formatting',
|
|
140
|
+
items: 'bold italic underline superscript subscript | forecolor backcolor | removeformat'
|
|
141
|
+
},
|
|
142
|
+
paragraphgroup: {
|
|
143
|
+
icon: 'paragraph',
|
|
144
|
+
tooltip: 'Paragraph format',
|
|
145
|
+
items: 'h1 h2 h3 | bullist numlist | alignleft aligncenter alignright alignjustify | indent outdent'
|
|
146
|
+
},
|
|
147
|
+
insertgroup: {
|
|
148
|
+
icon: 'plus',
|
|
149
|
+
tooltip: 'Insert',
|
|
150
|
+
items: 'quickimage media | link charmap nonbreaking | table tableprops tabledelete'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
formats: {
|
|
154
|
+
underline: { inline: 'span', styles: { 'text-decoration': 'underline' }, exact: true },
|
|
155
|
+
strikethrough: { inline: 'span', styles: { 'text-decoration': 'line-through' }, exact: true }
|
|
156
|
+
},
|
|
157
|
+
link_default_target: '_blank',
|
|
158
|
+
link_title: true,
|
|
159
|
+
link_assume_external_targets: 'https',
|
|
160
|
+
link_class_list: [],
|
|
161
|
+
}); }
|
|
162
|
+
/**
|
|
163
|
+
* Extended compact TinyMCE configuration that adds fullscreen support and an insert group.
|
|
164
|
+
* Extends `TinymceCompactConfig`.
|
|
165
|
+
*/
|
|
166
|
+
static { this.TinymceCompactExtendedConfig = Object.assign(structuredClone(this.TinymceCompactConfig), {
|
|
167
|
+
license_key: 'gpl',
|
|
168
|
+
ui_mode: 'split',
|
|
169
|
+
plugins: 'advlist anchor autolink autosave autoresize charmap code image insertdatetime fullscreen link lists media table nonbreaking preview quickbars searchreplace visualblocks visualchars',
|
|
170
|
+
toolbar: ['undo redo | quickimage insertgroup | formatgroup paragraphgroup | code | fullscreen '],
|
|
171
|
+
}); }
|
|
172
|
+
/**
|
|
173
|
+
* Inject the TinyMCE script tag into the document head if it is not already present.
|
|
174
|
+
* @param useCDN - When `true`, loads from the Tiny Cloud CDN; otherwise uses the local asset.
|
|
175
|
+
*/
|
|
176
|
+
static loadTinyMCEScript(useCDN) {
|
|
177
|
+
if (typeof document === 'undefined')
|
|
178
|
+
return; // SSR: no-op
|
|
179
|
+
const url = useCDN === true ? this.CDN_URL : this.LOCAL_URL;
|
|
180
|
+
if (!document.querySelector(`script[src="${url}"]`)) {
|
|
181
|
+
const script = document.createElement('script');
|
|
182
|
+
script.src = url;
|
|
183
|
+
script.referrerPolicy = 'origin';
|
|
184
|
+
script.onerror = () => console.error(`Impossibile caricare lo script TinyMCE da: ${url}`);
|
|
185
|
+
document.head.appendChild(script);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
class FullScreenEditorComponent {
|
|
191
|
+
constructor() {
|
|
192
|
+
/** Emitted with the edited text when the user saves. */
|
|
193
|
+
this.saving = output();
|
|
194
|
+
this.dialogRef = inject((MatDialogRef));
|
|
195
|
+
/** Dialog configuration, injected and exposed as a signal. */
|
|
196
|
+
this.dialogData = signal((() => {
|
|
197
|
+
const data = inject(MAT_DIALOG_DATA) ?? {};
|
|
198
|
+
return { ...data, text: data.text ?? '' };
|
|
199
|
+
})(), /* @ts-ignore */
|
|
200
|
+
...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
|
|
201
|
+
/** Whether the editor is in read-only mode. */
|
|
202
|
+
this.disabled = signal(false, /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
204
|
+
/** Current editor content, kept as a plain field for [(ngModel)] two-way binding. */
|
|
205
|
+
this.text = '';
|
|
206
|
+
/** TinyMCE editor configuration. */
|
|
207
|
+
this.tinymceConfig = {};
|
|
208
|
+
const data = this.dialogData();
|
|
209
|
+
this.text = data.text;
|
|
210
|
+
if (data.configuration) {
|
|
211
|
+
this.tinymceConfig = { ...data.configuration, license_key: 'gpl' };
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.tinymceConfig = SystemUtils.clone(TinymceUtils.TinymceCompactExtendedConfig);
|
|
215
|
+
}
|
|
216
|
+
this.tinymceConfig['toolbar'] = ['undo redo | formatgroup paragraphgroup insertgroup | code openCodeMirrorButton'];
|
|
217
|
+
this.disabled.set(data.disabled ?? false);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Save the current editor content and close the dialog.
|
|
221
|
+
*/
|
|
222
|
+
ok() {
|
|
223
|
+
this.saving.emit(this.text ?? '');
|
|
224
|
+
setTimeout(() => {
|
|
225
|
+
this.dialogRef.close();
|
|
226
|
+
}, 500);
|
|
227
|
+
}
|
|
228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FullScreenEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
229
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: FullScreenEditorComponent, isStandalone: true, selector: "ng-component", outputs: { saving: "saving" }, ngImport: i0, template: "<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", styles: [".mat-mdc-dialog-content{height:calc(100% - 52px)!important;max-height:calc(100% - 52px)!important}::ng-deep .full-screen-editor>.tox-tinymce{height:100%!important}\n"], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "readonly", "disabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i2.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
230
|
+
}
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: FullScreenEditorComponent, decorators: [{
|
|
232
|
+
type: Component,
|
|
233
|
+
args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogContent, EditorComponent, FormsModule, MatDialogActions, FlexLayoutModule,
|
|
234
|
+
MatButtonModule, MatDialogClose], template: "<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", styles: [".mat-mdc-dialog-content{height:calc(100% - 52px)!important;max-height:calc(100% - 52px)!important}::ng-deep .full-screen-editor>.tox-tinymce{height:100%!important}\n"] }]
|
|
235
|
+
}], ctorParameters: () => [], propDecorators: { saving: [{ type: i0.Output, args: ["saving"] }] } });
|
|
236
|
+
|
|
237
|
+
/*
|
|
238
|
+
* Public API Surface of @arsedizioni/ars-utils/ui.tinymce
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Generated bundle index. Do not edit.
|
|
243
|
+
*/
|
|
244
|
+
|
|
245
|
+
export { FullScreenEditorComponent, TinymceUtils };
|
|
246
|
+
//# sourceMappingURL=arsedizioni-ars-utils-ui.tinymce.mjs.map
|
|
@@ -0,0 +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,YAAY,EAAE,4BAA4B;AAC1C,QAAA,MAAM,EAAE,GAAG;AACX,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,UAAU,EAAE,GAAG;AACf,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,UAAU,EAAE,KAAK;AACjB,QAAA,QAAQ,EAAE,KAAK;AACf,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,wBAAwB,EAAE,KAAK;AAC/B,QAAA,2BAA2B,EAAE,iFAAiF;AAC9G,QAAA,wBAAwB,EAAE,iBAAiB;AAC3C,QAAA,yBAAyB,EAAE,OAAO;QAClC,4BAA4B,EAAE,gCAAgC;AAC9D,QAAA,uBAAuB,EAAE,KAAK;AAC9B,QAAA,4BAA4B,EAAE,KAAK;AACnC,QAAA,kBAAkB,EAAE,IAAI;AACxB,QAAA,qBAAqB,EAAE,OAAO;AAC9B,QAAA,oBAAoB,EAAE,IAAI;AAC1B,QAAA,uBAAuB,E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AA,eAAA,EAAA,eAAA,EAAA,eAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,kBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAC1F,eAAe,oXAAE,cAAc,EAAA,QAAA,EAAA,sCAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,MAAA,EAAA,kBAAA,EAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEtB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;AAGI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,WACtC,CAAC,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB;wBAC1F,eAAe,EAAE,cAAc,CAAC,EAAA,QAAA,EAAA,s+BAAA,EAAA,MAAA,EAAA,CAAA,uKAAA,CAAA,EAAA;;;AEvBpC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
export * from '@arsedizioni/ars-utils/core';
|
|
2
|
-
export * from '@arsedizioni/ars-utils/ui';
|
|
3
|
-
export * from '@arsedizioni/ars-utils/ui.application';
|
|
4
|
-
export * from '@arsedizioni/ars-utils/support.common';
|
|
5
|
-
export * from '@arsedizioni/ars-utils/support.ui';
|
|
6
|
-
export * from '@arsedizioni/ars-utils/help';
|
|
7
|
-
export * from '@arsedizioni/ars-utils/clipper.common';
|
|
8
|
-
export * from '@arsedizioni/ars-utils/clipper.ui';
|
|
9
|
-
export * from '@arsedizioni/ars-utils/tinymce';
|
|
10
|
-
export * from '@arsedizioni/ars-utils/evolution.common';
|
|
11
|
-
|
|
12
1
|
/*
|
|
13
|
-
* Public API Surface of ars-utils
|
|
2
|
+
* Public API Surface of @arsedizioni/ars-utils
|
|
3
|
+
*
|
|
4
|
+
* Questo entry point NON ri-esporta gli altri: un barrel unico vanificherebbe
|
|
5
|
+
* il code splitting, perche' basterebbe un import per agganciare il grafo di
|
|
6
|
+
* tutta la libreria. Importare sempre dall'entry point specifico, es.:
|
|
7
|
+
*
|
|
8
|
+
* import { SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
9
|
+
* import { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';
|
|
10
|
+
* import { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';
|
|
14
11
|
*/
|
|
12
|
+
/** Version of the library, aligned with the supported Angular major. */
|
|
13
|
+
const ARS_UTILS_VERSION = '22.1.5';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Generated bundle index. Do not edit.
|
|
18
17
|
*/
|
|
18
|
+
|
|
19
|
+
export { ARS_UTILS_VERSION };
|
|
19
20
|
//# sourceMappingURL=arsedizioni-ars-utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils.mjs","sources":["../../../projects/ars-utils/public_api.ts","../../../projects/ars-utils/arsedizioni-ars-utils.ts"],"sourcesContent":["/*\
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils.mjs","sources":["../../../projects/ars-utils/public_api.ts","../../../projects/ars-utils/arsedizioni-ars-utils.ts"],"sourcesContent":["/*\n * Public API Surface of @arsedizioni/ars-utils\n *\n * Questo entry point NON ri-esporta gli altri: un barrel unico vanificherebbe\n * il code splitting, perche' basterebbe un import per agganciare il grafo di\n * tutta la libreria. Importare sempre dall'entry point specifico, es.:\n *\n * import { SystemUtils } from '@arsedizioni/ars-utils/core';\n * import { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\n * import { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\n */\n\n/** Version of the library, aligned with the supported Angular major. */\nexport const ARS_UTILS_VERSION = '22.1.5';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;AAUG;AAEH;AACO,MAAM,iBAAiB,GAAG;;ACbjC;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arsedizioni/ars-utils",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.5.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "software@arsedizioni.it",
|
|
6
6
|
"name": "Fabio Buscaroli, Alberto Doria"
|
|
@@ -17,7 +17,25 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"date-fns": "^4",
|
|
20
|
-
"file-saver": "^2"
|
|
20
|
+
"file-saver": "^2",
|
|
21
|
+
"@azure/msal-angular": "^6",
|
|
22
|
+
"@azure/msal-browser": "^5",
|
|
23
|
+
"@tinymce/tinymce-angular": "^9",
|
|
24
|
+
"tinymce": "^8"
|
|
25
|
+
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"@azure/msal-angular": {
|
|
28
|
+
"optional": true
|
|
29
|
+
},
|
|
30
|
+
"@azure/msal-browser": {
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
"@tinymce/tinymce-angular": {
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
"tinymce": {
|
|
37
|
+
"optional": true
|
|
38
|
+
}
|
|
21
39
|
},
|
|
22
40
|
"dependencies": {
|
|
23
41
|
"tslib": "^2.8.0"
|
|
@@ -44,26 +62,22 @@
|
|
|
44
62
|
"types": "./types/arsedizioni-ars-utils-core.d.ts",
|
|
45
63
|
"default": "./fesm2022/arsedizioni-ars-utils-core.mjs"
|
|
46
64
|
},
|
|
65
|
+
"./core.date": {
|
|
66
|
+
"types": "./types/arsedizioni-ars-utils-core.date.d.ts",
|
|
67
|
+
"default": "./fesm2022/arsedizioni-ars-utils-core.date.mjs"
|
|
68
|
+
},
|
|
69
|
+
"./core.markdown": {
|
|
70
|
+
"types": "./types/arsedizioni-ars-utils-core.markdown.d.ts",
|
|
71
|
+
"default": "./fesm2022/arsedizioni-ars-utils-core.markdown.mjs"
|
|
72
|
+
},
|
|
47
73
|
"./evolution.common": {
|
|
48
74
|
"types": "./types/arsedizioni-ars-utils-evolution.common.d.ts",
|
|
49
75
|
"default": "./fesm2022/arsedizioni-ars-utils-evolution.common.mjs"
|
|
50
76
|
},
|
|
51
|
-
"./help": {
|
|
52
|
-
"types": "./types/arsedizioni-ars-utils-help.d.ts",
|
|
53
|
-
"default": "./fesm2022/arsedizioni-ars-utils-help.mjs"
|
|
54
|
-
},
|
|
55
77
|
"./support.common": {
|
|
56
78
|
"types": "./types/arsedizioni-ars-utils-support.common.d.ts",
|
|
57
79
|
"default": "./fesm2022/arsedizioni-ars-utils-support.common.mjs"
|
|
58
80
|
},
|
|
59
|
-
"./support.ui": {
|
|
60
|
-
"types": "./types/arsedizioni-ars-utils-support.ui.d.ts",
|
|
61
|
-
"default": "./fesm2022/arsedizioni-ars-utils-support.ui.mjs"
|
|
62
|
-
},
|
|
63
|
-
"./tinymce": {
|
|
64
|
-
"types": "./types/arsedizioni-ars-utils-tinymce.d.ts",
|
|
65
|
-
"default": "./fesm2022/arsedizioni-ars-utils-tinymce.mjs"
|
|
66
|
-
},
|
|
67
81
|
"./ui": {
|
|
68
82
|
"types": "./types/arsedizioni-ars-utils-ui.d.ts",
|
|
69
83
|
"default": "./fesm2022/arsedizioni-ars-utils-ui.mjs"
|
|
@@ -72,9 +86,61 @@
|
|
|
72
86
|
"types": "./types/arsedizioni-ars-utils-ui.application.d.ts",
|
|
73
87
|
"default": "./fesm2022/arsedizioni-ars-utils-ui.application.mjs"
|
|
74
88
|
},
|
|
89
|
+
"./ui.controls": {
|
|
90
|
+
"types": "./types/arsedizioni-ars-utils-ui.controls.d.ts",
|
|
91
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.controls.mjs"
|
|
92
|
+
},
|
|
93
|
+
"./ui.dialogs": {
|
|
94
|
+
"types": "./types/arsedizioni-ars-utils-ui.dialogs.d.ts",
|
|
95
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./ui.dialogs.auth": {
|
|
98
|
+
"types": "./types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts",
|
|
99
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs"
|
|
100
|
+
},
|
|
101
|
+
"./ui.dialogs.prompt": {
|
|
102
|
+
"types": "./types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts",
|
|
103
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs"
|
|
104
|
+
},
|
|
105
|
+
"./ui.dialogs.select": {
|
|
106
|
+
"types": "./types/arsedizioni-ars-utils-ui.dialogs.select.d.ts",
|
|
107
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs"
|
|
108
|
+
},
|
|
109
|
+
"./ui.files": {
|
|
110
|
+
"types": "./types/arsedizioni-ars-utils-ui.files.d.ts",
|
|
111
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.files.mjs"
|
|
112
|
+
},
|
|
113
|
+
"./ui.filters": {
|
|
114
|
+
"types": "./types/arsedizioni-ars-utils-ui.filters.d.ts",
|
|
115
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.filters.mjs"
|
|
116
|
+
},
|
|
117
|
+
"./ui.help": {
|
|
118
|
+
"types": "./types/arsedizioni-ars-utils-ui.help.d.ts",
|
|
119
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.help.mjs"
|
|
120
|
+
},
|
|
121
|
+
"./ui.navigation": {
|
|
122
|
+
"types": "./types/arsedizioni-ars-utils-ui.navigation.d.ts",
|
|
123
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.navigation.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./ui.notifications": {
|
|
126
|
+
"types": "./types/arsedizioni-ars-utils-ui.notifications.d.ts",
|
|
127
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.notifications.mjs"
|
|
128
|
+
},
|
|
75
129
|
"./ui.oauth": {
|
|
76
130
|
"types": "./types/arsedizioni-ars-utils-ui.oauth.d.ts",
|
|
77
131
|
"default": "./fesm2022/arsedizioni-ars-utils-ui.oauth.mjs"
|
|
132
|
+
},
|
|
133
|
+
"./ui.paginator": {
|
|
134
|
+
"types": "./types/arsedizioni-ars-utils-ui.paginator.d.ts",
|
|
135
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.paginator.mjs"
|
|
136
|
+
},
|
|
137
|
+
"./ui.shell": {
|
|
138
|
+
"types": "./types/arsedizioni-ars-utils-ui.shell.d.ts",
|
|
139
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.shell.mjs"
|
|
140
|
+
},
|
|
141
|
+
"./ui.tinymce": {
|
|
142
|
+
"types": "./types/arsedizioni-ars-utils-ui.tinymce.d.ts",
|
|
143
|
+
"default": "./fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs"
|
|
78
144
|
}
|
|
79
145
|
},
|
|
80
146
|
"sideEffects": false,
|
package/styles/ui.colors.scss
CHANGED
|
@@ -20,6 +20,22 @@
|
|
|
20
20
|
--ars-color-divider: #757d87;
|
|
21
21
|
--ars-color-overlay: rgba(255, 255, 255, 0.75);
|
|
22
22
|
--ars-color-background: #f7faf8;
|
|
23
|
+
// Dialog surface: shared by the Material dialogs and by ui.shell, which reproduces
|
|
24
|
+
// their look without Material. Each one resolves to the app Material theme when there is
|
|
25
|
+
// one, and to a literal when there is not.
|
|
26
|
+
--ars-dialog-background-color: var(--mat-sys-surface-container-high, #e6eae8);
|
|
27
|
+
--ars-color-on-primary: var(--mat-sys-on-primary, #ffffff);
|
|
28
|
+
--ars-scrim-color: rgba(0, 0, 0, 0.32);
|
|
29
|
+
--ars-dialog-radius: 28px;
|
|
30
|
+
--ars-dialog-elevation: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.3);
|
|
31
|
+
// Busy overlay and progress indicators (ui.shell reproduces them without Material)
|
|
32
|
+
--ars-busy-scrim-color: rgba(0, 0, 0, 0.42);
|
|
33
|
+
--ars-progress-track-color: var(--mat-sys-surface-container-highest, #d5dbd8);
|
|
34
|
+
--ars-busy-bare-color: #ffffff;
|
|
35
|
+
// Stacking: cdk-overlay-container sits at 1000, so the shell overlays go above it and the
|
|
36
|
+
// busy one below the message, which is the order the CDK stack used to give for free.
|
|
37
|
+
--ars-shell-z-index: 1100;
|
|
38
|
+
--ars-busy-z-index: 1090;
|
|
23
39
|
// Drawer
|
|
24
40
|
--ars-drawer-background-color: #eff1ef;
|
|
25
41
|
--ars-drawer-divider-color: #6f7977;
|
|
@@ -61,6 +77,13 @@
|
|
|
61
77
|
--ars-color-overlay: rgba(0, 0, 0, 0.65);
|
|
62
78
|
--ars-color-background: #101413;
|
|
63
79
|
|
|
80
|
+
// Dialog surface
|
|
81
|
+
--ars-dialog-background-color: var(--mat-sys-surface-container-high, #282a29);
|
|
82
|
+
--ars-color-on-primary: var(--mat-sys-on-primary, #00382f);
|
|
83
|
+
--ars-scrim-color: rgba(0, 0, 0, 0.6);
|
|
84
|
+
// Busy overlay and progress indicators
|
|
85
|
+
--ars-busy-scrim-color: rgba(0, 0, 0, 0.6);
|
|
86
|
+
--ars-progress-track-color: var(--mat-sys-surface-container-highest, #3a3d3c);
|
|
64
87
|
// Drawer
|
|
65
88
|
--ars-drawer-background-color: #212223;
|
|
66
89
|
--ars-drawer-divider-color: #899390;
|