@lucca-front/ng 21.1.0-rc.0 → 21.1.0-rc.1
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/fesm2022/lucca-front-ng-a11y.mjs +6 -6
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +16 -48
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +2 -2
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +5 -5
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +51 -0
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs +135 -0
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-button.mjs +21 -0
- package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +41 -15
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +37 -7
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +21 -6
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-color.mjs +28 -0
- package/fesm2022/lucca-front-ng-color.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-comment.mjs +20 -18
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +7 -9
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +0 -2
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +14 -14
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +68 -49
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +13 -1
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +6 -6
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +66 -99
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +48 -40
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +8 -24
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +33 -10
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +10 -1
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +66 -8
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +11 -75
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +12 -0
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +40 -34
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +14 -13
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +3 -0
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +25 -10
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-header.mjs +3 -0
- package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +19 -5
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +4 -4
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +2 -2
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +91 -74
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +110 -41
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +28 -5
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +3 -3
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +31 -26
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +5 -2
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-icon.mjs +15 -0
- package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +12 -0
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +7 -7
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +21 -6
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +17 -5
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +36 -7
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +8 -2
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +22 -14
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +31 -28
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +3 -0
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +10 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +227 -337
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +9 -0
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +29 -5
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +11 -5
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +1 -33
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +30 -20
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-bar.mjs +12 -5
- package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +38 -21
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +8 -8
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +5 -2
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +9 -3
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +16 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +20 -14
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +65 -14
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs +25 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +12 -0
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +6 -0
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-text-flow.mjs +20 -0
- package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-time.mjs +63 -24
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-toast.mjs +5 -5
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +13 -27
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +6 -6
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +20 -36
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs +30 -0
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
- package/package.json +19 -3
- package/schematics/action-icon/index.js +4 -5
- package/schematics/action-icon/migration.js +3 -4
- package/schematics/action-icon/migration.spec.js +8 -8
- package/schematics/alignment-utilities/index.js +3 -4
- package/schematics/alignment-utilities/migration.spec.js +8 -8
- package/schematics/cdn-urls/index.js +3 -4
- package/schematics/cdn-urls/migration.js +7 -9
- package/schematics/cdn-urls/migration.spec.js +8 -8
- package/schematics/class-prefix/index.js +3 -4
- package/schematics/class-prefix/migration.spec.js +8 -8
- package/schematics/collection.json +10 -0
- package/schematics/color-text/index.js +3 -4
- package/schematics/color-text/migration.spec.js +8 -8
- package/schematics/component-path/index.js +3 -4
- package/schematics/component-path/migration.spec.js +8 -8
- package/schematics/empty-state-title/index.js +5 -7
- package/schematics/empty-state-title/migration.spec.js +5 -5
- package/schematics/lib/index.js +29 -0
- package/schematics/lib/local-deps/package-lock.json +2 -0
- package/schematics/lib/local-deps/package.json +1 -2
- package/schematics/lib/schematic.utils.js +5 -0
- package/schematics/lu-button/index.js +3 -4
- package/schematics/lu-button/migration.js +5 -11
- package/schematics/lu-button/migration.spec.js +5 -5
- package/schematics/lu-container/index.js +23 -0
- package/schematics/lu-container/migration.js +116 -0
- package/schematics/lu-container/migration.spec.js +23 -0
- package/schematics/lu-container/schema.json +23 -0
- package/schematics/lu-icon/index.js +3 -4
- package/schematics/lu-icon/migration.js +8 -14
- package/schematics/lu-icon/migration.spec.js +5 -5
- package/schematics/lu-loading/index.js +23 -0
- package/schematics/lu-loading/migration.js +136 -0
- package/schematics/lu-loading/migration.spec.js +23 -0
- package/schematics/lu-loading/schema.json +28 -0
- package/schematics/lu-select/index.js +3 -4
- package/schematics/lu-select/migration.js +18 -21
- package/schematics/lu-select/migration.spec.js +5 -5
- package/schematics/lu-select/util.js +17 -19
- package/schematics/lu-text-input/index.js +3 -4
- package/schematics/lu-text-input/migration.js +22 -28
- package/schematics/lu-text-input/migration.spec.js +5 -5
- package/schematics/new-icons/index.js +5 -6
- package/schematics/new-icons/migration.js +11 -16
- package/schematics/new-icons/migration.spec.js +8 -8
- package/schematics/palettes/index.js +3 -4
- package/schematics/palettes/migration.spec.js +8 -8
- package/schematics/tokens-radius/index.js +3 -4
- package/schematics/tokens-radius/migration.spec.js +8 -8
- package/schematics/tokens-spacing/index.js +3 -4
- package/schematics/tokens-spacing/migration.spec.js +8 -8
- package/schematics/tokens-typo/index.js +3 -4
- package/schematics/tokens-typo/migration.spec.js +8 -8
- package/src/components/cdk/_overlay.scss +5 -0
- package/src/definitions/option/_option-item.scss +1 -0
- package/types/lucca-front-ng-a11y.d.ts +3 -3
- package/types/lucca-front-ng-api.d.ts +1 -19
- package/types/lucca-front-ng-breadcrumbs.d.ts +9 -9
- package/types/lucca-front-ng-bubble-icon.d.ts +20 -0
- package/types/lucca-front-ng-bubble-illustration.d.ts +24 -0
- package/types/lucca-front-ng-button.d.ts +21 -0
- package/types/lucca-front-ng-callout.d.ts +33 -3
- package/types/lucca-front-ng-chip.d.ts +33 -3
- package/types/lucca-front-ng-clear.d.ts +21 -6
- package/types/lucca-front-ng-color.d.ts +12 -0
- package/types/lucca-front-ng-comment.d.ts +19 -11
- package/types/lucca-front-ng-container.d.ts +4 -4
- package/types/lucca-front-ng-core-select.d.ts +21 -16
- package/types/lucca-front-ng-core.d.ts +23 -2
- package/types/lucca-front-ng-data-table.d.ts +2 -2
- package/types/lucca-front-ng-date.d.ts +6 -24
- package/types/lucca-front-ng-date2.d.ts +6 -5
- package/types/lucca-front-ng-department.d.ts +3 -12
- package/types/lucca-front-ng-dialog.d.ts +12 -5
- package/types/lucca-front-ng-divider.d.ts +10 -0
- package/types/lucca-front-ng-empty-state.d.ts +21 -3
- package/types/lucca-front-ng-establishment.d.ts +3 -39
- package/types/lucca-front-ng-fancy-box.d.ts +12 -0
- package/types/lucca-front-ng-file-upload.d.ts +18 -8
- package/types/lucca-front-ng-filter-pills.d.ts +6 -5
- package/types/lucca-front-ng-footer.d.ts +3 -0
- package/types/lucca-front-ng-form-field.d.ts +12 -3
- package/types/lucca-front-ng-form-header.d.ts +3 -0
- package/types/lucca-front-ng-form.d.ts +9 -5
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +16 -16
- package/types/lucca-front-ng-forms.d.ts +41 -12
- package/types/lucca-front-ng-gauge.d.ts +25 -0
- package/types/lucca-front-ng-grid.d.ts +1 -1
- package/types/lucca-front-ng-highlight-data.d.ts +36 -15
- package/types/lucca-front-ng-horizontal-navigation.d.ts +3 -0
- package/types/lucca-front-ng-icon.d.ts +15 -0
- package/types/lucca-front-ng-inline-message.d.ts +12 -0
- package/types/lucca-front-ng-input.d.ts +2 -2
- package/types/lucca-front-ng-link.d.ts +17 -2
- package/types/lucca-front-ng-listbox.d.ts +16 -4
- package/types/lucca-front-ng-listing.d.ts +33 -2
- package/types/lucca-front-ng-main-layout.d.ts +6 -0
- package/types/lucca-front-ng-mobile-push.d.ts +9 -2
- package/types/lucca-front-ng-multi-select.d.ts +26 -24
- package/types/lucca-front-ng-new-badge.d.ts +3 -0
- package/types/lucca-front-ng-numeric-badge.d.ts +9 -0
- package/types/lucca-front-ng-option.d.ts +86 -149
- package/types/lucca-front-ng-page-header.d.ts +9 -0
- package/types/lucca-front-ng-pagination.d.ts +26 -2
- package/types/lucca-front-ng-plg-push.d.ts +8 -2
- package/types/lucca-front-ng-popover.d.ts +1 -20
- package/types/lucca-front-ng-popover2.d.ts +8 -6
- package/types/lucca-front-ng-progress-bar.d.ts +9 -0
- package/types/lucca-front-ng-read-more.d.ts +25 -10
- package/types/lucca-front-ng-resource-card.d.ts +6 -0
- package/types/lucca-front-ng-scroll-box.d.ts +4 -1
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +7 -1
- package/types/lucca-front-ng-segmented-control.d.ts +16 -1
- package/types/lucca-front-ng-simple-select.d.ts +5 -4
- package/types/lucca-front-ng-skeleton.d.ts +61 -6
- package/types/lucca-front-ng-sortable-list.d.ts +24 -0
- package/types/lucca-front-ng-status-badge.d.ts +12 -0
- package/types/lucca-front-ng-tag.d.ts +6 -0
- package/types/lucca-front-ng-text-flow.d.ts +8 -0
- package/types/lucca-front-ng-time.d.ts +22 -16
- package/types/lucca-front-ng-toast.d.ts +2 -2
- package/types/lucca-front-ng-tooltip.d.ts +7 -14
- package/types/lucca-front-ng-user-popover.d.ts +6 -7
- package/types/lucca-front-ng-user.d.ts +6 -15
- package/types/lucca-front-ng-vertical-navigation.d.ts +30 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, input, booleanAttribute, viewChild, ElementRef, contentChildren, signal, computed, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, DestroyRef, ViewContainerRef, TemplateRef, viewChildren
|
|
2
|
+
import { InjectionToken, inject, input, booleanAttribute, viewChild, ElementRef, contentChildren, signal, computed, effect, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, DestroyRef, ViewContainerRef, TemplateRef, viewChildren } from '@angular/core';
|
|
3
3
|
import { ButtonComponent } from '@lucca-front/ng/button';
|
|
4
|
-
import {
|
|
4
|
+
import { intlInputOptions } from '@lucca-front/ng/core';
|
|
5
5
|
import { IconComponent } from '@lucca-front/ng/icon';
|
|
6
6
|
import { LuTooltipTriggerDirective } from '@lucca-front/ng/tooltip';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
7
8
|
import { CommonModule } from '@angular/common';
|
|
8
|
-
import * as i1 from '@angular/forms';
|
|
9
|
+
import * as i1$1 from '@angular/forms';
|
|
9
10
|
import { NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule, FormGroup, Validators } from '@angular/forms';
|
|
10
11
|
import { registerHistory, createEmptyHistoryState } from '@lexical/history';
|
|
11
12
|
import { $isRootTextContentEmpty, $canShowPlaceholderCurry } from '@lexical/text';
|
|
12
13
|
import { mergeRegister, $getNearestNodeOfType } from '@lexical/utils';
|
|
13
|
-
import { FormFieldComponent, InputDirective } from '@lucca-front/ng/form-field';
|
|
14
|
+
import { FormFieldComponent, InputDirective, ɵPresentationDisplayDefaultDirective as _PresentationDisplayDefaultDirective } from '@lucca-front/ng/form-field';
|
|
14
15
|
import { createEditor, $getRoot, $createTextNode, createCommand, $getSelection, $isRangeSelection, $isTextNode, $createParagraphNode, COMMAND_PRIORITY_NORMAL, SELECTION_CHANGE_COMMAND, INSERT_PARAGRAPH_COMMAND, DecoratorNode, TextNode, $getNodeByKey, FORMAT_TEXT_COMMAND } from 'lexical';
|
|
15
16
|
import { $isAtNodeEnd, $setBlocksType } from '@lexical/selection';
|
|
16
17
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
@@ -48,6 +49,16 @@ const INITIAL_UPDATE_TAG = 'initial-update';
|
|
|
48
49
|
const SKIP_DOM_SELECTION_TAG = 'skip-dom-selection';
|
|
49
50
|
const RICH_TEXT_PLUGIN_COMPONENT = new InjectionToken('RichTextPlugin');
|
|
50
51
|
class RichTextInputComponent {
|
|
52
|
+
#richTextFormatter;
|
|
53
|
+
#formField;
|
|
54
|
+
#customNodes;
|
|
55
|
+
#allPlugins;
|
|
56
|
+
#isTouched;
|
|
57
|
+
#onChange;
|
|
58
|
+
#onTouch;
|
|
59
|
+
#cleanup;
|
|
60
|
+
#focusedPlugin;
|
|
61
|
+
#editor;
|
|
51
62
|
constructor() {
|
|
52
63
|
this.#richTextFormatter = inject(RICH_TEXT_FORMATTER);
|
|
53
64
|
this.#formField = inject(FormFieldComponent, { optional: true });
|
|
@@ -55,9 +66,8 @@ class RichTextInputComponent {
|
|
|
55
66
|
this.disableSpellcheck = input(false, { ...(ngDevMode ? { debugName: "disableSpellcheck" } : {}), transform: booleanAttribute });
|
|
56
67
|
this.autoResize = input(false, { ...(ngDevMode ? { debugName: "autoResize" } : {}), transform: booleanAttribute });
|
|
57
68
|
this.hideToolbar = input(false, { ...(ngDevMode ? { debugName: "hideToolbar" } : {}), transform: booleanAttribute });
|
|
58
|
-
this.content = viewChild
|
|
59
|
-
|
|
60
|
-
});
|
|
69
|
+
this.content = viewChild('content', { ...(ngDevMode ? { debugName: "content" } : {}), read: ElementRef });
|
|
70
|
+
this.contentPresentation = viewChild('contentPresentation', { ...(ngDevMode ? { debugName: "contentPresentation" } : {}), read: ElementRef });
|
|
61
71
|
this.pluginComponents = contentChildren(RICH_TEXT_PLUGIN_COMPONENT, { ...(ngDevMode ? { debugName: "pluginComponents" } : {}), descendants: true });
|
|
62
72
|
this.currentCanShowPlaceholder = signal(false, ...(ngDevMode ? [{ debugName: "currentCanShowPlaceholder" }] : []));
|
|
63
73
|
this.isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
@@ -68,17 +78,17 @@ class RichTextInputComponent {
|
|
|
68
78
|
this.#allPlugins = computed(() => this.#flattenPlugins(this.pluginComponents()), ...(ngDevMode ? [{ debugName: "#allPlugins" }] : []));
|
|
69
79
|
this.#isTouched = signal(false, ...(ngDevMode ? [{ debugName: "#isTouched" }] : []));
|
|
70
80
|
this.#focusedPlugin = 0;
|
|
81
|
+
effect(() => {
|
|
82
|
+
if (this.#formField?.presentation() && this.contentPresentation()) {
|
|
83
|
+
this.#editor?.setRootElement(this.contentPresentation()?.nativeElement);
|
|
84
|
+
this.#editor?.setEditable(false);
|
|
85
|
+
}
|
|
86
|
+
else if (this.content()) {
|
|
87
|
+
this.#editor?.setRootElement(this.content()?.nativeElement);
|
|
88
|
+
this.#editor?.setEditable(true);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
71
91
|
}
|
|
72
|
-
#richTextFormatter;
|
|
73
|
-
#formField;
|
|
74
|
-
#customNodes;
|
|
75
|
-
#allPlugins;
|
|
76
|
-
#isTouched;
|
|
77
|
-
#onChange;
|
|
78
|
-
#onTouch;
|
|
79
|
-
#cleanup;
|
|
80
|
-
#focusedPlugin;
|
|
81
|
-
#editor;
|
|
82
92
|
ngOnInit() {
|
|
83
93
|
this.#editor = createEditor({
|
|
84
94
|
theme: {
|
|
@@ -92,7 +102,6 @@ class RichTextInputComponent {
|
|
|
92
102
|
nodes: [...this.#customNodes()],
|
|
93
103
|
});
|
|
94
104
|
this.#cleanup = mergeRegister(this.#richTextFormatter.registerTextPlugin(this.#editor), registerHistory(this.#editor, createEmptyHistoryState(), 300), this.#editor.registerUpdateListener((payload) => this.#onEditorUpdate(payload)));
|
|
95
|
-
this.#editor.setRootElement(this.content().nativeElement);
|
|
96
105
|
this.pluginComponents().forEach((plugin) => plugin.setEditorInstance(this.#editor));
|
|
97
106
|
if (this.#allPlugins().length > 0) {
|
|
98
107
|
this.#allPlugins()[this.#focusedPlugin].tabindex?.set(0);
|
|
@@ -109,7 +118,7 @@ class RichTextInputComponent {
|
|
|
109
118
|
}, { tag: updateTags });
|
|
110
119
|
}
|
|
111
120
|
else if (!this.#editor?.getEditorState().isEmpty()) {
|
|
112
|
-
this.#editor
|
|
121
|
+
this.#editor?.update(() => {
|
|
113
122
|
const root = $getRoot();
|
|
114
123
|
root.clear();
|
|
115
124
|
}, { tag: updateTags });
|
|
@@ -132,13 +141,13 @@ class RichTextInputComponent {
|
|
|
132
141
|
const nextFocusedPlugin = this.#focusedPlugin + direction < 0 ? plugins.length - 1 : (this.#focusedPlugin + direction) % plugins.length;
|
|
133
142
|
if (plugins[nextFocusedPlugin].tabindex()) {
|
|
134
143
|
plugins[this.#focusedPlugin].tabindex?.set(-1);
|
|
135
|
-
plugins[nextFocusedPlugin].tabindex
|
|
144
|
+
plugins[nextFocusedPlugin].tabindex?.set(0);
|
|
136
145
|
}
|
|
137
146
|
this.#focusedPlugin = nextFocusedPlugin;
|
|
138
147
|
plugins[this.#focusedPlugin].focus();
|
|
139
148
|
}
|
|
140
149
|
focus() {
|
|
141
|
-
this.content()
|
|
150
|
+
this.content()?.nativeElement.focus();
|
|
142
151
|
}
|
|
143
152
|
touch() {
|
|
144
153
|
this.#isTouched.set(true);
|
|
@@ -155,9 +164,9 @@ class RichTextInputComponent {
|
|
|
155
164
|
});
|
|
156
165
|
}
|
|
157
166
|
#onEditorUpdate({ tags, dirtyElements }) {
|
|
158
|
-
const isComposing = this.#editor
|
|
167
|
+
const isComposing = this.#editor?.isComposing();
|
|
159
168
|
if (!tags.has(INITIAL_UPDATE_TAG) && dirtyElements.size) {
|
|
160
|
-
this.#editor
|
|
169
|
+
this.#editor?.read(() => {
|
|
161
170
|
let result = '';
|
|
162
171
|
// ignore empty nodes
|
|
163
172
|
if (!$isRootTextContentEmpty(isComposing, false)) {
|
|
@@ -167,7 +176,7 @@ class RichTextInputComponent {
|
|
|
167
176
|
this.#onChange?.(result);
|
|
168
177
|
});
|
|
169
178
|
}
|
|
170
|
-
const currentCanShowPlaceholder = this.#editor
|
|
179
|
+
const currentCanShowPlaceholder = this.#editor?.getEditorState().read($canShowPlaceholderCurry(isComposing));
|
|
171
180
|
this.currentCanShowPlaceholder.set(currentCanShowPlaceholder);
|
|
172
181
|
}
|
|
173
182
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -177,18 +186,20 @@ class RichTextInputComponent {
|
|
|
177
186
|
useExisting: forwardRef(() => RichTextInputComponent),
|
|
178
187
|
multi: true,
|
|
179
188
|
},
|
|
180
|
-
], queries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div class=\"richTextField\" [class.is-disabled]=\"isDisabled()\" [class.mod-autoResize]=\"autoResize()\">\n\t<div\n\t\t#content\n\t\tluInput\n\t\tclass=\"richTextField-content textFlow\"\n\t\trole=\"textbox\"\n\t\t[attr.contenteditable]=\"!isDisabled()\"\n\t\t[attr.aria-disabled]=\"isDisabled()\"\n\t\t[attr.aria-placeholder]=\"currentCanShowPlaceholder() ? placeholder() : null\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.spellcheck]=\"!disableSpellcheck()\"\n\t\t(blur)=\"touch()\"\n\t></div>\n\t@if (currentCanShowPlaceholder()) {\n\t\t<div aria-hidden=\"true\" class=\"richTextField-content-placeholder\">{{ placeholder() }}</div>\n\t}\n\t<div\n\t\tclass=\"richTextField-toolbar\"\n\t\t[class.pr-u-displayNone]=\"hideToolbar()\"\n\t\t(keydown.arrowleft)=\"focusSiblingPlugin($event, -1)\"\n\t\t(keydown.arrowRight)=\"focusSiblingPlugin($event, 1)\"\n\t\trole=\"toolbar\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.aria-controls]=\"formFieldId()\"\n\t>\n\t\t<ng-
|
|
189
|
+
], queries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "contentPresentation", first: true, predicate: ["contentPresentation"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div class=\"richTextField\" [class.is-disabled]=\"isDisabled()\" [class.mod-autoResize]=\"autoResize()\">\n\t<div\n\t\t#content\n\t\tluInput\n\t\tclass=\"richTextField-content textFlow\"\n\t\trole=\"textbox\"\n\t\t[attr.contenteditable]=\"!isDisabled()\"\n\t\t[attr.aria-disabled]=\"isDisabled()\"\n\t\t[attr.aria-placeholder]=\"currentCanShowPlaceholder() ? placeholder() : null\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.spellcheck]=\"!disableSpellcheck()\"\n\t\t(blur)=\"touch()\"\n\t></div>\n\t@if (currentCanShowPlaceholder()) {\n\t\t<div aria-hidden=\"true\" class=\"richTextField-content-placeholder\">{{ placeholder() }}</div>\n\t}\n\t<div\n\t\tclass=\"richTextField-toolbar\"\n\t\t[class.pr-u-displayNone]=\"hideToolbar()\"\n\t\t(keydown.arrowleft)=\"focusSiblingPlugin($event, -1)\"\n\t\t(keydown.arrowRight)=\"focusSiblingPlugin($event, 1)\"\n\t\trole=\"toolbar\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.aria-controls]=\"formFieldId()\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"toolsProjection\" />\n\t</div>\n</div>\n\n<ng-container *luPresentationDisplayDefault>\n\t<span class=\"pr-u-displayNone\">\n\t\t<ng-container *ngTemplateOutlet=\"toolsProjection\" />\n\t</span>\n\t<div #contentPresentation class=\"textFlow\"></div>\n</ng-container>\n\n<ng-template #toolsProjection>\n\t<ng-content />\n</ng-template>\n", styles: ["@layer components{.richTextField{--components-richTextField-borderColor: var(--pr-t-color-input-border);--components-richTextField-backgroundColor: var(--pr-t-color-input-background);--components-richTextField-color: var(--pr-t-color-input-text);--components-richTextField-toolbar-backgroundColor: var(--palettes-neutral-25);--components-richTextField-toolbar-display: block;--components-richTextField-resize: vertical;--components-richTextField-height: 3lh;--components-richTextField-minHeight: 2lh;--components-richTextField-maxHeight: 90dvh;--components-richTextField-placeholder-color: var(--pr-t-color-input-text-placeholder);display:flex;flex-direction:column;flex-grow:1;overflow:auto;background-color:var(--components-richTextField-backgroundColor);color:var(--components-richTextField-color);border-color:var(--components-richTextField-borderColor);border-style:solid;border-width:1px;border-radius:var(--pr-t-border-radius-input);resize:var(--components-richTextField-resize);min-block-size:calc(var(--components-richTextField-minHeight) + var(--pr-t-spacings-800) + var(--pr-t-spacings-25));max-block-size:var(--components-richTextField-maxHeight);block-size:calc(var(--components-richTextField-height) + var(--pr-t-spacings-800) + var(--pr-t-spacings-25))}.richTextField:has(.richTextField-toolbar-formatting):has(.richTextField-toolbar-chips){min-block-size:calc(var(--components-richTextField-minHeight) + var(--pr-t-spacings-800) + var(--pr-t-spacings-25) + var(--pr-t-spacings-600))}.richTextField:has(.richTextField-toolbar-formatting):has(.richTextField-toolbar-chips) .richTextField-toolbar-chips{border-block-start:1px solid var(--palettes-neutral-200);padding-block-start:var(--pr-t-spacings-100)}.richTextField:has(.richTextField-toolbar-formatting):has(.richTextField-toolbar-chips) .richTextField-toolbar-formatting{padding-block-end:var(--pr-t-spacings-100)}.richTextField-toolbar{display:var(--components-richTextField-toolbar-display);background-color:var(--components-richTextField-toolbar-backgroundColor);border-radius:0 0 var(--pr-t-border-radius-input) var(--pr-t-border-radius-input);padding:var(--pr-t-spacings-100);overflow:hidden;animation-name:fadeIn;animation-duration:var(--commons-animations-durations-fast);animation-delay:var(--commons-animations-durations-fast);opacity:0;flex-shrink:0;animation-fill-mode:forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.richTextField-toolbar-formatting{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--pr-t-spacings-400);flex-shrink:0}.richTextField-toolbar-formatting:empty{display:none}.richTextField-toolbar-col{display:flex;flex-wrap:wrap;align-items:center;row-gap:var(--pr-t-spacings-100);margin-inline-start:calc(var(--pr-t-spacings-400) * -1)}.richTextField-toolbar-col-group{display:flex;flex-wrap:wrap;align-items:center}.richTextField-toolbar-col-group:not(:only-child){position:relative;margin-inline-start:var(--pr-t-spacings-400)}.richTextField-toolbar-col-group:not(:only-child):before{content:\"\";position:absolute;inset:var(--pr-t-spacings-100) auto var(--pr-t-spacings-100) calc(var(--pr-t-spacings-400) / -2);inline-size:2px;border-radius:var(--pr-t-border-radius-full);background-color:var(--palettes-neutral-300)}.richTextField-toolbar-col-group .richTextField-toolbar-col-group{display:contents}.richTextField-toolbar-chips{display:flex;flex-wrap:wrap;gap:var(--pr-t-spacings-50);padding-block-start:0;border-block-start:0}.richTextField-toolbar-chips-chip{border:0}.richTextField-toolbar-chips-chip:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField-content{padding:var(--pr-t-spacings-100);outline:none;overflow:auto;flex-grow:1}.richTextField-content-chip{vertical-align:middle}.richTextField-content-chip:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField-content-placeholder{position:absolute;pointer-events:none;padding:var(--pr-t-spacings-100);-webkit-user-select:none;user-select:none;color:var(--components-richTextField-placeholder-color)}}@layer mods{.richTextField:has(.richTextField-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField:hover{--components-richTextField-borderColor: var(--pr-t-color-input-border-hover)}.richTextField:has(.richTextField-content[aria-invalid=true]){--components-richTextField-borderColor: var(--pr-t-color-input-border-critical);--components-richTextField-backgroundColor: var(--pr-t-color-input-background-critical);--components-richTextField-placeholder-color: var(--pr-t-color-input-text-placeholder-critical)}.richTextField:has(.richTextField-content[aria-invalid=true]):hover{--components-richTextField-borderColor: var(--pr-t-color-input-border-critical-hover)}.richTextField.is-disabled{--components-richTextField-backgroundColor: var(--pr-t-color-input-background-disabled);--components-richTextField-toolbar-backgroundColor: var(--pr-t-color-input-background-disabled);--components-richTextField-toolbar-display: none;--components-richTextField-color: var(--pr-t-color-input-text-disabled);--components-richTextField-borderColor: var(--pr-t-color-input-border)}.richTextField.mod-autoResize{--components-richTextField-minHeight: 3lh;--components-richTextField-height: auto;--components-richTextField-resize: none}}@layer mods{.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700))}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-600, var(--palettes-product-600))}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:active{--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:disabled{--components-button-color: var(--commons-disabled-background);--components-button-backgroundColor: var(--palettes-neutral-500)}}\n"], dependencies: [{ kind: "directive", type: InputDirective, selector: "[luInput]", inputs: ["luInputStandalone"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: _PresentationDisplayDefaultDirective, selector: "[luPresentationDisplayDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
181
190
|
}
|
|
182
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextInputComponent, decorators: [{
|
|
183
192
|
type: Component,
|
|
184
|
-
args: [{ selector: 'lu-rich-text-input', imports: [InputDirective, CommonModule], encapsulation: ViewEncapsulation.None, providers: [
|
|
193
|
+
args: [{ selector: 'lu-rich-text-input', imports: [InputDirective, CommonModule, _PresentationDisplayDefaultDirective], encapsulation: ViewEncapsulation.None, providers: [
|
|
185
194
|
{
|
|
186
195
|
provide: NG_VALUE_ACCESSOR,
|
|
187
196
|
useExisting: forwardRef(() => RichTextInputComponent),
|
|
188
197
|
multi: true,
|
|
189
198
|
},
|
|
190
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"richTextField\" [class.is-disabled]=\"isDisabled()\" [class.mod-autoResize]=\"autoResize()\">\n\t<div\n\t\t#content\n\t\tluInput\n\t\tclass=\"richTextField-content textFlow\"\n\t\trole=\"textbox\"\n\t\t[attr.contenteditable]=\"!isDisabled()\"\n\t\t[attr.aria-disabled]=\"isDisabled()\"\n\t\t[attr.aria-placeholder]=\"currentCanShowPlaceholder() ? placeholder() : null\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.spellcheck]=\"!disableSpellcheck()\"\n\t\t(blur)=\"touch()\"\n\t></div>\n\t@if (currentCanShowPlaceholder()) {\n\t\t<div aria-hidden=\"true\" class=\"richTextField-content-placeholder\">{{ placeholder() }}</div>\n\t}\n\t<div\n\t\tclass=\"richTextField-toolbar\"\n\t\t[class.pr-u-displayNone]=\"hideToolbar()\"\n\t\t(keydown.arrowleft)=\"focusSiblingPlugin($event, -1)\"\n\t\t(keydown.arrowRight)=\"focusSiblingPlugin($event, 1)\"\n\t\trole=\"toolbar\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.aria-controls]=\"formFieldId()\"\n\t>\n\t\t<ng-
|
|
191
|
-
}], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disableSpellcheck: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSpellcheck", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], hideToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideToolbar", required: false }] }], content: [{ type: i0.ViewChild, args: ['content', { ...{
|
|
199
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"richTextField\" [class.is-disabled]=\"isDisabled()\" [class.mod-autoResize]=\"autoResize()\">\n\t<div\n\t\t#content\n\t\tluInput\n\t\tclass=\"richTextField-content textFlow\"\n\t\trole=\"textbox\"\n\t\t[attr.contenteditable]=\"!isDisabled()\"\n\t\t[attr.aria-disabled]=\"isDisabled()\"\n\t\t[attr.aria-placeholder]=\"currentCanShowPlaceholder() ? placeholder() : null\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.spellcheck]=\"!disableSpellcheck()\"\n\t\t(blur)=\"touch()\"\n\t></div>\n\t@if (currentCanShowPlaceholder()) {\n\t\t<div aria-hidden=\"true\" class=\"richTextField-content-placeholder\">{{ placeholder() }}</div>\n\t}\n\t<div\n\t\tclass=\"richTextField-toolbar\"\n\t\t[class.pr-u-displayNone]=\"hideToolbar()\"\n\t\t(keydown.arrowleft)=\"focusSiblingPlugin($event, -1)\"\n\t\t(keydown.arrowRight)=\"focusSiblingPlugin($event, 1)\"\n\t\trole=\"toolbar\"\n\t\t[attr.aria-labelledby]=\"formFieldId() + '-label'\"\n\t\t[attr.aria-controls]=\"formFieldId()\"\n\t>\n\t\t<ng-container *ngTemplateOutlet=\"toolsProjection\" />\n\t</div>\n</div>\n\n<ng-container *luPresentationDisplayDefault>\n\t<span class=\"pr-u-displayNone\">\n\t\t<ng-container *ngTemplateOutlet=\"toolsProjection\" />\n\t</span>\n\t<div #contentPresentation class=\"textFlow\"></div>\n</ng-container>\n\n<ng-template #toolsProjection>\n\t<ng-content />\n</ng-template>\n", styles: ["@layer components{.richTextField{--components-richTextField-borderColor: var(--pr-t-color-input-border);--components-richTextField-backgroundColor: var(--pr-t-color-input-background);--components-richTextField-color: var(--pr-t-color-input-text);--components-richTextField-toolbar-backgroundColor: var(--palettes-neutral-25);--components-richTextField-toolbar-display: block;--components-richTextField-resize: vertical;--components-richTextField-height: 3lh;--components-richTextField-minHeight: 2lh;--components-richTextField-maxHeight: 90dvh;--components-richTextField-placeholder-color: var(--pr-t-color-input-text-placeholder);display:flex;flex-direction:column;flex-grow:1;overflow:auto;background-color:var(--components-richTextField-backgroundColor);color:var(--components-richTextField-color);border-color:var(--components-richTextField-borderColor);border-style:solid;border-width:1px;border-radius:var(--pr-t-border-radius-input);resize:var(--components-richTextField-resize);min-block-size:calc(var(--components-richTextField-minHeight) + var(--pr-t-spacings-800) + var(--pr-t-spacings-25));max-block-size:var(--components-richTextField-maxHeight);block-size:calc(var(--components-richTextField-height) + var(--pr-t-spacings-800) + var(--pr-t-spacings-25))}.richTextField:has(.richTextField-toolbar-formatting):has(.richTextField-toolbar-chips){min-block-size:calc(var(--components-richTextField-minHeight) + var(--pr-t-spacings-800) + var(--pr-t-spacings-25) + var(--pr-t-spacings-600))}.richTextField:has(.richTextField-toolbar-formatting):has(.richTextField-toolbar-chips) .richTextField-toolbar-chips{border-block-start:1px solid var(--palettes-neutral-200);padding-block-start:var(--pr-t-spacings-100)}.richTextField:has(.richTextField-toolbar-formatting):has(.richTextField-toolbar-chips) .richTextField-toolbar-formatting{padding-block-end:var(--pr-t-spacings-100)}.richTextField-toolbar{display:var(--components-richTextField-toolbar-display);background-color:var(--components-richTextField-toolbar-backgroundColor);border-radius:0 0 var(--pr-t-border-radius-input) var(--pr-t-border-radius-input);padding:var(--pr-t-spacings-100);overflow:hidden;animation-name:fadeIn;animation-duration:var(--commons-animations-durations-fast);animation-delay:var(--commons-animations-durations-fast);opacity:0;flex-shrink:0;animation-fill-mode:forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.richTextField-toolbar-formatting{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--pr-t-spacings-400);flex-shrink:0}.richTextField-toolbar-formatting:empty{display:none}.richTextField-toolbar-col{display:flex;flex-wrap:wrap;align-items:center;row-gap:var(--pr-t-spacings-100);margin-inline-start:calc(var(--pr-t-spacings-400) * -1)}.richTextField-toolbar-col-group{display:flex;flex-wrap:wrap;align-items:center}.richTextField-toolbar-col-group:not(:only-child){position:relative;margin-inline-start:var(--pr-t-spacings-400)}.richTextField-toolbar-col-group:not(:only-child):before{content:\"\";position:absolute;inset:var(--pr-t-spacings-100) auto var(--pr-t-spacings-100) calc(var(--pr-t-spacings-400) / -2);inline-size:2px;border-radius:var(--pr-t-border-radius-full);background-color:var(--palettes-neutral-300)}.richTextField-toolbar-col-group .richTextField-toolbar-col-group{display:contents}.richTextField-toolbar-chips{display:flex;flex-wrap:wrap;gap:var(--pr-t-spacings-50);padding-block-start:0;border-block-start:0}.richTextField-toolbar-chips-chip{border:0}.richTextField-toolbar-chips-chip:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField-content{padding:var(--pr-t-spacings-100);outline:none;overflow:auto;flex-grow:1}.richTextField-content-chip{vertical-align:middle}.richTextField-content-chip:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField-content-placeholder{position:absolute;pointer-events:none;padding:var(--pr-t-spacings-100);-webkit-user-select:none;user-select:none;color:var(--components-richTextField-placeholder-color)}}@layer mods{.richTextField:has(.richTextField-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField:hover{--components-richTextField-borderColor: var(--pr-t-color-input-border-hover)}.richTextField:has(.richTextField-content[aria-invalid=true]){--components-richTextField-borderColor: var(--pr-t-color-input-border-critical);--components-richTextField-backgroundColor: var(--pr-t-color-input-background-critical);--components-richTextField-placeholder-color: var(--pr-t-color-input-text-placeholder-critical)}.richTextField:has(.richTextField-content[aria-invalid=true]):hover{--components-richTextField-borderColor: var(--pr-t-color-input-border-critical-hover)}.richTextField.is-disabled{--components-richTextField-backgroundColor: var(--pr-t-color-input-background-disabled);--components-richTextField-toolbar-backgroundColor: var(--pr-t-color-input-background-disabled);--components-richTextField-toolbar-display: none;--components-richTextField-color: var(--pr-t-color-input-text-disabled);--components-richTextField-borderColor: var(--pr-t-color-input-border)}.richTextField.mod-autoResize{--components-richTextField-minHeight: 3lh;--components-richTextField-height: auto;--components-richTextField-resize: none}}@layer mods{.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700))}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:hover{--components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));--components-button-backgroundColor: var(--palettes-600, var(--palettes-product-600))}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:active{--components-button-backgroundColor: var(--palettes-800, var(--palettes-product-800))}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px}.richTextField-toolbar-button.button.mod-onlyIcon[aria-pressed=true]:disabled{--components-button-color: var(--commons-disabled-background);--components-button-backgroundColor: var(--palettes-neutral-500)}}\n"] }]
|
|
200
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disableSpellcheck: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSpellcheck", required: false }] }], autoResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoResize", required: false }] }], hideToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideToolbar", required: false }] }], content: [{ type: i0.ViewChild, args: ['content', { ...{
|
|
201
|
+
read: ElementRef,
|
|
202
|
+
}, isSignal: true }] }], contentPresentation: [{ type: i0.ViewChild, args: ['contentPresentation', { ...{
|
|
192
203
|
read: ElementRef,
|
|
193
204
|
}, isSignal: true }] }], pluginComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => RICH_TEXT_PLUGIN_COMPONENT), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
194
205
|
|
|
@@ -474,7 +485,7 @@ function registerClearFormat(editor) {
|
|
|
474
485
|
class ClearFormatComponent {
|
|
475
486
|
constructor() {
|
|
476
487
|
this.#registeredCommands = () => { };
|
|
477
|
-
this.intl =
|
|
488
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
478
489
|
this.element = viewChild('element', { ...(ngDevMode ? { debugName: "element" } : {}), read: (ElementRef) });
|
|
479
490
|
this.tabindex = signal(-1, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
480
491
|
this.isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
@@ -498,12 +509,12 @@ class ClearFormatComponent {
|
|
|
498
509
|
this.element().nativeElement.focus();
|
|
499
510
|
}
|
|
500
511
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ClearFormatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
501
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: ClearFormatComponent, isStandalone: true, selector: "lu-rich-text-plugin-clear-format", host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
512
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: ClearFormatComponent, isStandalone: true, selector: "lu-rich-text-plugin-clear-format", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
502
513
|
{
|
|
503
514
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
504
515
|
useExisting: forwardRef(() => ClearFormatComponent),
|
|
505
516
|
},
|
|
506
|
-
], viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl.clearFormat\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatClear\" [alt]=\"intl.clearFormat\" />\n</button>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[luButton],a[luButton]", inputs: ["size", "block", "critical", "delete", "disclosure", "palette", "state", "luButton"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
517
|
+
], viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl().clearFormat\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatClear\" [alt]=\"intl().clearFormat\" />\n</button>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[luButton],a[luButton]", inputs: ["size", "block", "critical", "delete", "disclosure", "palette", "state", "luButton"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
507
518
|
}
|
|
508
519
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ClearFormatComponent, decorators: [{
|
|
509
520
|
type: Component,
|
|
@@ -514,8 +525,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
514
525
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
515
526
|
useExisting: forwardRef(() => ClearFormatComponent),
|
|
516
527
|
},
|
|
517
|
-
], template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl.clearFormat\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatClear\" [alt]=\"intl.clearFormat\" />\n</button>\n" }]
|
|
518
|
-
}], propDecorators: { element: [{ type: i0.ViewChild, args: ['element', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
528
|
+
], template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl().clearFormat\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatClear\" [alt]=\"intl().clearFormat\" />\n</button>\n" }]
|
|
529
|
+
}], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], element: [{ type: i0.ViewChild, args: ['element', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
519
530
|
|
|
520
531
|
const FORMAT_HEADINGS = createCommand('FORMAT_HEADINGS');
|
|
521
532
|
function registerHeadings(editor) {
|
|
@@ -551,17 +562,17 @@ class HeadingsComponent {
|
|
|
551
562
|
this.element = viewChild('selectRef', ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
552
563
|
this.tabindex = signal(-1, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
553
564
|
this.maxHeadingLevel = input(6, ...(ngDevMode ? [{ debugName: "maxHeadingLevel" }] : []));
|
|
554
|
-
this.headingOptions = computed(() => Object.keys(this.headingLabels).slice(0, this.maxHeadingLevel() + 1), ...(ngDevMode ? [{ debugName: "headingOptions" }] : []));
|
|
555
|
-
this.intl =
|
|
556
|
-
this.headingLabels = {
|
|
557
|
-
paragraph: [this.intl.headings0, 0],
|
|
558
|
-
h1: [this.intl.headings1, 1],
|
|
559
|
-
h2: [this.intl.headings2, 2],
|
|
560
|
-
h3: [this.intl.headings3, 3],
|
|
561
|
-
h4: [this.intl.headings4, 4],
|
|
562
|
-
h5: [this.intl.headings5, 5],
|
|
563
|
-
h6: [this.intl.headings6, 6],
|
|
564
|
-
};
|
|
565
|
+
this.headingOptions = computed(() => Object.keys(this.headingLabels()).slice(0, this.maxHeadingLevel() + 1), ...(ngDevMode ? [{ debugName: "headingOptions" }] : []));
|
|
566
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
567
|
+
this.headingLabels = computed(() => ({
|
|
568
|
+
paragraph: [this.intl().headings0, 0],
|
|
569
|
+
h1: [this.intl().headings1, 1],
|
|
570
|
+
h2: [this.intl().headings2, 2],
|
|
571
|
+
h3: [this.intl().headings3, 3],
|
|
572
|
+
h4: [this.intl().headings4, 4],
|
|
573
|
+
h5: [this.intl().headings5, 5],
|
|
574
|
+
h6: [this.intl().headings6, 6],
|
|
575
|
+
}), ...(ngDevMode ? [{ debugName: "headingLabels" }] : []));
|
|
565
576
|
this.formControl = new FormControl('paragraph');
|
|
566
577
|
this.#registeredCommands = () => { };
|
|
567
578
|
}
|
|
@@ -589,12 +600,12 @@ class HeadingsComponent {
|
|
|
589
600
|
}
|
|
590
601
|
}
|
|
591
602
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: HeadingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
592
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: HeadingsComponent, isStandalone: true, selector: "lu-rich-text-plugin-headings", inputs: { maxHeadingLevel: { classPropertyName: "maxHeadingLevel", publicName: "maxHeadingLevel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
603
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: HeadingsComponent, isStandalone: true, selector: "lu-rich-text-plugin-headings", inputs: { maxHeadingLevel: { classPropertyName: "maxHeadingLevel", publicName: "maxHeadingLevel", isSignal: true, isRequired: false, transformFunction: null }, intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
593
604
|
{
|
|
594
605
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
595
606
|
useExisting: forwardRef(() => HeadingsComponent),
|
|
596
607
|
},
|
|
597
|
-
], viewQueries: [{ propertyName: "element", first: true, predicate: ["selectRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<lu-form-field [label]=\"intl.headingsLabel\" size=\"S\" hiddenLabel class=\"mod-width20\">\n\t<lu-simple-select [options]=\"headingOptions()\" [formControl]=\"formControl\" #selectRef [inputTabindex]=\"tabindex()\">\n\t\t<ng-container *luOption=\"let heading; select: selectRef\">{{ headingLabels[heading][0] }}</ng-container>\n\t</lu-simple-select>\n</lu-form-field>\n", dependencies: [{ kind: "component", type: LuSimpleSelectInputComponent, selector: "lu-simple-select", inputs: ["autocomplete"] }, { kind: "component", type: FormFieldComponent, selector: "lu-form-field", inputs: ["label", "hiddenLabel", "rolePresentationLabel", "inline", "statusControl", "tooltip", "tag", "AI", "iconAItooltip", "iconAIalt", "width", "invalid", "inlineMessage", "errorInlineMessage", "inlineMessageState", "size", "extraDescribedBy", "layout", "counter", "presentation"], outputs: ["rolePresentationLabelChange", "layoutChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: LuOptionDirective, selector: "[luOption]", inputs: ["luOptionSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
608
|
+
], viewQueries: [{ propertyName: "element", first: true, predicate: ["selectRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<lu-form-field [label]=\"intl().headingsLabel\" size=\"S\" hiddenLabel class=\"mod-width20\">\n\t<lu-simple-select [options]=\"headingOptions()\" [formControl]=\"formControl\" #selectRef [inputTabindex]=\"tabindex()\">\n\t\t<ng-container *luOption=\"let heading; select: selectRef\">{{ headingLabels()[heading][0] }}</ng-container>\n\t</lu-simple-select>\n</lu-form-field>\n", dependencies: [{ kind: "component", type: LuSimpleSelectInputComponent, selector: "lu-simple-select", inputs: ["intl", "autocomplete"] }, { kind: "component", type: FormFieldComponent, selector: "lu-form-field", inputs: ["intl", "label", "hiddenLabel", "rolePresentationLabel", "inline", "statusControl", "tooltip", "tag", "AI", "iconAItooltip", "iconAIalt", "width", "invalid", "inlineMessage", "errorInlineMessage", "inlineMessageState", "size", "extraDescribedBy", "layout", "counter", "presentation"], outputs: ["rolePresentationLabelChange", "layoutChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: LuOptionDirective, selector: "[luOption]", inputs: ["luOptionSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
598
609
|
}
|
|
599
610
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: HeadingsComponent, decorators: [{
|
|
600
611
|
type: Component,
|
|
@@ -605,14 +616,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
605
616
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
606
617
|
useExisting: forwardRef(() => HeadingsComponent),
|
|
607
618
|
},
|
|
608
|
-
], template: "<lu-form-field [label]=\"intl.headingsLabel\" size=\"S\" hiddenLabel class=\"mod-width20\">\n\t<lu-simple-select [options]=\"headingOptions()\" [formControl]=\"formControl\" #selectRef [inputTabindex]=\"tabindex()\">\n\t\t<ng-container *luOption=\"let heading; select: selectRef\">{{ headingLabels[heading][0] }}</ng-container>\n\t</lu-simple-select>\n</lu-form-field>\n" }]
|
|
609
|
-
}], propDecorators: { element: [{ type: i0.ViewChild, args: ['selectRef', { isSignal: true }] }], maxHeadingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeadingLevel", required: false }] }] } });
|
|
619
|
+
], template: "<lu-form-field [label]=\"intl().headingsLabel\" size=\"S\" hiddenLabel class=\"mod-width20\">\n\t<lu-simple-select [options]=\"headingOptions()\" [formControl]=\"formControl\" #selectRef [inputTabindex]=\"tabindex()\">\n\t\t<ng-container *luOption=\"let heading; select: selectRef\">{{ headingLabels()[heading][0] }}</ng-container>\n\t</lu-simple-select>\n</lu-form-field>\n" }]
|
|
620
|
+
}], propDecorators: { element: [{ type: i0.ViewChild, args: ['selectRef', { isSignal: true }] }], maxHeadingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeadingLevel", required: false }] }], intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }] } });
|
|
610
621
|
|
|
611
622
|
class LinkDialogComponent {
|
|
612
623
|
constructor() {
|
|
613
624
|
this.dialogData = injectDialogData();
|
|
614
625
|
this.dialogRef = injectDialogRef();
|
|
615
|
-
this.intl =
|
|
626
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
616
627
|
this.formGroup = new FormGroup({
|
|
617
628
|
href: new FormControl(this.dialogData, Validators.required),
|
|
618
629
|
});
|
|
@@ -628,12 +639,12 @@ class LinkDialogComponent {
|
|
|
628
639
|
this.dialogRef.close(undefined);
|
|
629
640
|
}
|
|
630
641
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: LinkDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
631
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: LinkDialogComponent, isStandalone: true, selector: "lu-rich-text-plugin-link-dialog", ngImport: i0, template: "<lu-dialog>\n\t<form class=\"dialog-form\" (submit)=\"save()\" [formGroup]=\"formGroup\">\n\t\t<lu-dialog-content>\n\t\t\t<lu-form-field [label]=\"intl.linksHref\">\n\t\t\t\t<lu-text-input formControlName=\"href\" type=\"url\" [placeholder]=\"intl.linksPlaceholder\" />\n\t\t\t</lu-form-field>\n\t\t</lu-dialog-content>\n\t\t<lu-dialog-footer>\n\t\t\t@if (dialogData) {\n\t\t\t\t<div class=\"footer-content\">\n\t\t\t\t\t<button type=\"button\" luButton=\"ghost\" delete (click)=\"deleteLink()\">{{ intl.linksDelete }}</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div class=\"footer-actions\">\n\t\t\t\t<button type=\"submit\" luButton>{{ intl.linksSubmit }}</button>\n\t\t\t\t<button type=\"button\" luButton=\"ghost\" luDialogDismiss>{{ intl.linksCancel }}</button>\n\t\t\t</div>\n\t\t</lu-dialog-footer>\n\t</form>\n</lu-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "lu-dialog", inputs: ["stacked"] }, { kind: "component", type: DialogContentComponent, selector: "lu-dialog-content" }, { kind: "component", type: DialogFooterComponent, selector: "lu-dialog-footer" }, { kind: "component", type: FormFieldComponent, selector: "lu-form-field", inputs: ["label", "hiddenLabel", "rolePresentationLabel", "inline", "statusControl", "tooltip", "tag", "AI", "iconAItooltip", "iconAIalt", "width", "invalid", "inlineMessage", "errorInlineMessage", "inlineMessageState", "size", "extraDescribedBy", "layout", "counter", "presentation"], outputs: ["rolePresentationLabelChange", "layoutChange"] }, { kind: "component", type: TextInputComponent, selector: "lu-text-input", inputs: ["mask", "placeholder", "autocomplete", "hasClearer", "hasSearchIcon", "valueAlignRight", "prefix", "suffix", "searchIcon", "type"], outputs: ["blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[luButton],a[luButton]", inputs: ["size", "block", "critical", "delete", "disclosure", "palette", "state", "luButton"] }, { kind: "directive", type: DialogDismissDirective, selector: "[luDialogDismiss]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
642
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: LinkDialogComponent, isStandalone: true, selector: "lu-rich-text-plugin-link-dialog", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<lu-dialog>\n\t<form class=\"dialog-form\" (submit)=\"save()\" [formGroup]=\"formGroup\">\n\t\t<lu-dialog-content>\n\t\t\t<lu-form-field [label]=\"intl().linksHref\">\n\t\t\t\t<lu-text-input formControlName=\"href\" type=\"url\" [placeholder]=\"intl().linksPlaceholder\" />\n\t\t\t</lu-form-field>\n\t\t</lu-dialog-content>\n\t\t<lu-dialog-footer>\n\t\t\t@if (dialogData) {\n\t\t\t\t<div class=\"footer-content\">\n\t\t\t\t\t<button type=\"button\" luButton=\"ghost\" delete (click)=\"deleteLink()\">{{ intl().linksDelete }}</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div class=\"footer-actions\">\n\t\t\t\t<button type=\"submit\" luButton>{{ intl().linksSubmit }}</button>\n\t\t\t\t<button type=\"button\" luButton=\"ghost\" luDialogDismiss>{{ intl().linksCancel }}</button>\n\t\t\t</div>\n\t\t</lu-dialog-footer>\n\t</form>\n</lu-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "lu-dialog", inputs: ["stacked"] }, { kind: "component", type: DialogContentComponent, selector: "lu-dialog-content" }, { kind: "component", type: DialogFooterComponent, selector: "lu-dialog-footer" }, { kind: "component", type: FormFieldComponent, selector: "lu-form-field", inputs: ["intl", "label", "hiddenLabel", "rolePresentationLabel", "inline", "statusControl", "tooltip", "tag", "AI", "iconAItooltip", "iconAIalt", "width", "invalid", "inlineMessage", "errorInlineMessage", "inlineMessageState", "size", "extraDescribedBy", "layout", "counter", "presentation"], outputs: ["rolePresentationLabelChange", "layoutChange"] }, { kind: "component", type: TextInputComponent, selector: "lu-text-input", inputs: ["intl", "mask", "placeholder", "autocomplete", "hasClearer", "hasSearchIcon", "valueAlignRight", "prefix", "suffix", "searchIcon", "type"], outputs: ["blur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[luButton],a[luButton]", inputs: ["size", "block", "critical", "delete", "disclosure", "palette", "state", "luButton"] }, { kind: "directive", type: DialogDismissDirective, selector: "[luDialogDismiss]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
632
643
|
}
|
|
633
644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: LinkDialogComponent, decorators: [{
|
|
634
645
|
type: Component,
|
|
635
|
-
args: [{ selector: 'lu-rich-text-plugin-link-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DialogComponent, DialogContentComponent, DialogFooterComponent, FormFieldComponent, TextInputComponent, ReactiveFormsModule, ButtonComponent, DialogDismissDirective], template: "<lu-dialog>\n\t<form class=\"dialog-form\" (submit)=\"save()\" [formGroup]=\"formGroup\">\n\t\t<lu-dialog-content>\n\t\t\t<lu-form-field [label]=\"intl.linksHref\">\n\t\t\t\t<lu-text-input formControlName=\"href\" type=\"url\" [placeholder]=\"intl.linksPlaceholder\" />\n\t\t\t</lu-form-field>\n\t\t</lu-dialog-content>\n\t\t<lu-dialog-footer>\n\t\t\t@if (dialogData) {\n\t\t\t\t<div class=\"footer-content\">\n\t\t\t\t\t<button type=\"button\" luButton=\"ghost\" delete (click)=\"deleteLink()\">{{ intl.linksDelete }}</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div class=\"footer-actions\">\n\t\t\t\t<button type=\"submit\" luButton>{{ intl.linksSubmit }}</button>\n\t\t\t\t<button type=\"button\" luButton=\"ghost\" luDialogDismiss>{{ intl.linksCancel }}</button>\n\t\t\t</div>\n\t\t</lu-dialog-footer>\n\t</form>\n</lu-dialog>\n" }]
|
|
636
|
-
}] });
|
|
646
|
+
args: [{ selector: 'lu-rich-text-plugin-link-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DialogComponent, DialogContentComponent, DialogFooterComponent, FormFieldComponent, TextInputComponent, ReactiveFormsModule, ButtonComponent, DialogDismissDirective], template: "<lu-dialog>\n\t<form class=\"dialog-form\" (submit)=\"save()\" [formGroup]=\"formGroup\">\n\t\t<lu-dialog-content>\n\t\t\t<lu-form-field [label]=\"intl().linksHref\">\n\t\t\t\t<lu-text-input formControlName=\"href\" type=\"url\" [placeholder]=\"intl().linksPlaceholder\" />\n\t\t\t</lu-form-field>\n\t\t</lu-dialog-content>\n\t\t<lu-dialog-footer>\n\t\t\t@if (dialogData) {\n\t\t\t\t<div class=\"footer-content\">\n\t\t\t\t\t<button type=\"button\" luButton=\"ghost\" delete (click)=\"deleteLink()\">{{ intl().linksDelete }}</button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div class=\"footer-actions\">\n\t\t\t\t<button type=\"submit\" luButton>{{ intl().linksSubmit }}</button>\n\t\t\t\t<button type=\"button\" luButton=\"ghost\" luDialogDismiss>{{ intl().linksCancel }}</button>\n\t\t\t</div>\n\t\t</lu-dialog-footer>\n\t</form>\n</lu-dialog>\n" }]
|
|
647
|
+
}], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }] } });
|
|
637
648
|
|
|
638
649
|
const FORMAT_LINK = createCommand('FORMAT_LINK');
|
|
639
650
|
function registerLink(editor) {
|
|
@@ -761,7 +772,7 @@ class LinkComponent {
|
|
|
761
772
|
this.tabindex = signal(-1, ...(ngDevMode ? [{ debugName: "tabindex" }] : []));
|
|
762
773
|
this.active = signal(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
|
|
763
774
|
this.isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
764
|
-
this.intl =
|
|
775
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
765
776
|
this.#registeredCommands = () => { };
|
|
766
777
|
PopoverLinkNode.setViewContainerRef(this.#viewContainerRef);
|
|
767
778
|
PopoverAutoLinkNode.setViewContainerRef(this.#viewContainerRef);
|
|
@@ -842,13 +853,13 @@ class LinkComponent {
|
|
|
842
853
|
this.isDisabled.set(isDisabled);
|
|
843
854
|
}
|
|
844
855
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: LinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
845
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: LinkComponent, isStandalone: true, selector: "lu-rich-text-plugin-link", host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
856
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: LinkComponent, isStandalone: true, selector: "lu-rich-text-plugin-link", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
846
857
|
provideLuDialog(),
|
|
847
858
|
{
|
|
848
859
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
849
860
|
useExisting: forwardRef(() => LinkComponent),
|
|
850
861
|
},
|
|
851
|
-
], viewQueries: [{ propertyName: "linkNodeTemplate", first: true, predicate: ["linkNodeTemplate"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "element", first: true, predicate: ["element"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl.linksLabel\"\n\t[attr.aria-pressed]=\"active()\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatLink\" [alt]=\"intl.linksLabel\" />\n</button>\n\n<ng-template #linkNodeTemplate let-href=\"href\" let-title=\"title\" let-target=\"target\">\n\t<a [href]=\"href\" [title]=\"title\" [target]=\"target\" [luPopover2]=\"popover\" #trigger=\"luPopover2\"></a>\n\t<ng-template #popover>\n\t\t<div class=\"popover-contentOptional linkPopover\">\n\t\t\t<a [href]=\"href\" luLink external class=\"pr-u-ellipsis\">{{ href }}</a>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); dispatchCommand()\"\n\t\t\t\t[luTooltip]=\"intl.linksLabel\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"officePen\" [alt]=\"intl.linksLabel\" />\n\t\t\t</button>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); deleteLink()\"\n\t\t\t\t[luTooltip]=\"intl.linksDelete\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"trashDelete\" [alt]=\"intl.linksDelete\" />\n\t\t\t</button>\n\t\t</div>\n\t</ng-template>\n</ng-template>\n", styles: [".linkPopover{display:flex;justify-items:center;gap:var(--pr-t-spacings-50);max-width:20rem}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[luButton],a[luButton]", inputs: ["size", "block", "critical", "delete", "disclosure", "palette", "state", "luButton"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "directive", type: PopoverDirective, selector: "[luPopover2]", inputs: ["luPopover2", "luPopoverPosition", "luPopoverDisabled", "luPopoverTrigger", "customPositions", "luPopoverNoCloseButton", "luPopoverAnchor", "luPopoverOpenDelay", "luPopoverCloseDelay"], outputs: ["luPopoverTriggerChange", "luPopoverClosed", "luPopoverOpened"], exportAs: ["luPopover2"] }, { kind: "component", type: LinkComponent$1, selector: "a[luLink], button[luLink]", inputs: ["href", "luLink", "disabled", "decorationHover", "external"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
862
|
+
], viewQueries: [{ propertyName: "linkNodeTemplate", first: true, predicate: ["linkNodeTemplate"], descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "element", first: true, predicate: ["element"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl().linksLabel\"\n\t[attr.aria-pressed]=\"active()\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatLink\" [alt]=\"intl().linksLabel\" />\n</button>\n\n<ng-template #linkNodeTemplate let-href=\"href\" let-title=\"title\" let-target=\"target\">\n\t<a [href]=\"href\" [title]=\"title\" [target]=\"target\" [luPopover2]=\"popover\" #trigger=\"luPopover2\"></a>\n\t<ng-template #popover>\n\t\t<div class=\"popover-contentOptional linkPopover\">\n\t\t\t<a [href]=\"href\" luLink external class=\"pr-u-ellipsis\">{{ href }}</a>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); dispatchCommand()\"\n\t\t\t\t[luTooltip]=\"intl().linksLabel\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"officePen\" [alt]=\"intl().linksLabel\" />\n\t\t\t</button>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); deleteLink()\"\n\t\t\t\t[luTooltip]=\"intl().linksDelete\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"trashDelete\" [alt]=\"intl().linksDelete\" />\n\t\t\t</button>\n\t\t</div>\n\t</ng-template>\n</ng-template>\n", styles: [".linkPopover{display:flex;justify-items:center;gap:var(--pr-t-spacings-50);max-width:20rem}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[luButton],a[luButton]", inputs: ["size", "block", "critical", "delete", "disclosure", "palette", "state", "luButton"] }, { kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "directive", type: PopoverDirective, selector: "[luPopover2]", inputs: ["intl", "luPopover2", "luPopoverPosition", "overlayScrollStrategy", "luPopoverDisabled", "luPopoverTrigger", "customPositions", "luPopoverNoCloseButton", "luPopoverAnchor", "luPopoverOpenDelay", "luPopoverCloseDelay"], outputs: ["luPopoverTriggerChange", "luPopoverClosed", "luPopoverOpened"], exportAs: ["luPopover2"] }, { kind: "component", type: LinkComponent$1, selector: "a[luLink], button[luLink]", inputs: ["intl", "href", "luLink", "disabled", "decorationHover", "external"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
852
863
|
}
|
|
853
864
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: LinkComponent, decorators: [{
|
|
854
865
|
type: Component,
|
|
@@ -860,8 +871,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
860
871
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
861
872
|
useExisting: forwardRef(() => LinkComponent),
|
|
862
873
|
},
|
|
863
|
-
], template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl.linksLabel\"\n\t[attr.aria-pressed]=\"active()\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatLink\" [alt]=\"intl.linksLabel\" />\n</button>\n\n<ng-template #linkNodeTemplate let-href=\"href\" let-title=\"title\" let-target=\"target\">\n\t<a [href]=\"href\" [title]=\"title\" [target]=\"target\" [luPopover2]=\"popover\" #trigger=\"luPopover2\"></a>\n\t<ng-template #popover>\n\t\t<div class=\"popover-contentOptional linkPopover\">\n\t\t\t<a [href]=\"href\" luLink external class=\"pr-u-ellipsis\">{{ href }}</a>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); dispatchCommand()\"\n\t\t\t\t[luTooltip]=\"intl.linksLabel\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"officePen\" [alt]=\"intl.linksLabel\" />\n\t\t\t</button>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); deleteLink()\"\n\t\t\t\t[luTooltip]=\"intl.linksDelete\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"trashDelete\" [alt]=\"intl.linksDelete\" />\n\t\t\t</button>\n\t\t</div>\n\t</ng-template>\n</ng-template>\n", styles: [".linkPopover{display:flex;justify-items:center;gap:var(--pr-t-spacings-50);max-width:20rem}\n"] }]
|
|
864
|
-
}], ctorParameters: () => [], propDecorators: { linkNodeTemplate: [{ type: i0.ViewChild, args: ['linkNodeTemplate', { ...{ read: TemplateRef }, isSignal: true }] }], element: [{ type: i0.ViewChild, args: ['element', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
874
|
+
], template: "<button\n\t#element\n\tluButton=\"ghost\"\n\ttype=\"button\"\n\tsize=\"S\"\n\t(click)=\"dispatchCommand()\"\n\t[luTooltip]=\"intl().linksLabel\"\n\t[attr.aria-pressed]=\"active()\"\n\tluTooltipOnlyForDisplay\n\t[attr.tabindex]=\"tabindex()\"\n\t[disabled]=\"isDisabled()\"\n\tclass=\"richTextField-toolbar-button\"\n>\n\t<lu-icon icon=\"formatLink\" [alt]=\"intl().linksLabel\" />\n</button>\n\n<ng-template #linkNodeTemplate let-href=\"href\" let-title=\"title\" let-target=\"target\">\n\t<a [href]=\"href\" [title]=\"title\" [target]=\"target\" [luPopover2]=\"popover\" #trigger=\"luPopover2\"></a>\n\t<ng-template #popover>\n\t\t<div class=\"popover-contentOptional linkPopover\">\n\t\t\t<a [href]=\"href\" luLink external class=\"pr-u-ellipsis\">{{ href }}</a>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); dispatchCommand()\"\n\t\t\t\t[luTooltip]=\"intl().linksLabel\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"officePen\" [alt]=\"intl().linksLabel\" />\n\t\t\t</button>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tluButton=\"ghost\"\n\t\t\t\tsize=\"XS\"\n\t\t\t\t(click)=\"trigger.close(); deleteLink()\"\n\t\t\t\t[luTooltip]=\"intl().linksDelete\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<lu-icon icon=\"trashDelete\" [alt]=\"intl().linksDelete\" />\n\t\t\t</button>\n\t\t</div>\n\t</ng-template>\n</ng-template>\n", styles: [".linkPopover{display:flex;justify-items:center;gap:var(--pr-t-spacings-50);max-width:20rem}\n"] }]
|
|
875
|
+
}], ctorParameters: () => [], propDecorators: { linkNodeTemplate: [{ type: i0.ViewChild, args: ['linkNodeTemplate', { ...{ read: TemplateRef }, isSignal: true }] }], element: [{ type: i0.ViewChild, args: ['element', { ...{ read: (ElementRef) }, isSignal: true }] }], intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }] } });
|
|
865
876
|
|
|
866
877
|
const FORMAT_LIST = createCommand('FORMAT_LIST');
|
|
867
878
|
function registerListsGlobal(editor) {
|
|
@@ -951,7 +962,7 @@ class ListStyleToolbarComponent {
|
|
|
951
962
|
constructor() {
|
|
952
963
|
this.#registeredCommands = () => { };
|
|
953
964
|
this.pluginComponents = viewChildren(RICH_TEXT_PLUGIN_COMPONENT, ...(ngDevMode ? [{ debugName: "pluginComponents" }] : []));
|
|
954
|
-
this.intl =
|
|
965
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
955
966
|
}
|
|
956
967
|
#registeredCommands;
|
|
957
968
|
setEditorInstance(editor) {
|
|
@@ -968,12 +979,12 @@ class ListStyleToolbarComponent {
|
|
|
968
979
|
this.#registeredCommands();
|
|
969
980
|
}
|
|
970
981
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ListStyleToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
971
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: ListStyleToolbarComponent, isStandalone: true, selector: "lu-rich-text-toolbar-list-style", host: { attributes: { "role": "radiogroup" }, classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
982
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: ListStyleToolbarComponent, isStandalone: true, selector: "lu-rich-text-toolbar-list-style", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radiogroup" }, classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
972
983
|
{
|
|
973
984
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
974
985
|
useExisting: forwardRef(() => ListStyleToolbarComponent),
|
|
975
986
|
},
|
|
976
|
-
], viewQueries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], ngImport: i0, template: "<lu-rich-text-plugin-list format=\"bullet\" [tooltip]=\"intl.listsBulletLabel\" icon=\"formatBulletedList\" />\n<lu-rich-text-plugin-list format=\"number\" [tooltip]=\"intl.listsNumberedLabel\" icon=\"formatNumberedList\" />\n", dependencies: [{ kind: "component", type: ListFormatComponent, selector: "lu-rich-text-plugin-list", inputs: ["format", "icon", "tooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
987
|
+
], viewQueries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], ngImport: i0, template: "<lu-rich-text-plugin-list format=\"bullet\" [tooltip]=\"intl().listsBulletLabel\" icon=\"formatBulletedList\" />\n<lu-rich-text-plugin-list format=\"number\" [tooltip]=\"intl().listsNumberedLabel\" icon=\"formatNumberedList\" />\n", dependencies: [{ kind: "component", type: ListFormatComponent, selector: "lu-rich-text-plugin-list", inputs: ["format", "icon", "tooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
977
988
|
}
|
|
978
989
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: ListStyleToolbarComponent, decorators: [{
|
|
979
990
|
type: Component,
|
|
@@ -985,8 +996,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
985
996
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
986
997
|
useExisting: forwardRef(() => ListStyleToolbarComponent),
|
|
987
998
|
},
|
|
988
|
-
], imports: [ListFormatComponent], template: "<lu-rich-text-plugin-list format=\"bullet\" [tooltip]=\"intl.listsBulletLabel\" icon=\"formatBulletedList\" />\n<lu-rich-text-plugin-list format=\"number\" [tooltip]=\"intl.listsNumberedLabel\" icon=\"formatNumberedList\" />\n" }]
|
|
989
|
-
}], propDecorators: { pluginComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => RICH_TEXT_PLUGIN_COMPONENT), { isSignal: true }] }] } });
|
|
999
|
+
], imports: [ListFormatComponent], template: "<lu-rich-text-plugin-list format=\"bullet\" [tooltip]=\"intl().listsBulletLabel\" icon=\"formatBulletedList\" />\n<lu-rich-text-plugin-list format=\"number\" [tooltip]=\"intl().listsNumberedLabel\" icon=\"formatNumberedList\" />\n" }]
|
|
1000
|
+
}], propDecorators: { pluginComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => RICH_TEXT_PLUGIN_COMPONENT), { isSignal: true }] }], intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }] } });
|
|
990
1001
|
|
|
991
1002
|
class TagNode extends DecoratorNode {
|
|
992
1003
|
#tagKey;
|
|
@@ -1042,6 +1053,12 @@ class TagNode extends DecoratorNode {
|
|
|
1042
1053
|
}
|
|
1043
1054
|
createDOM(_config, editor) {
|
|
1044
1055
|
if (TagNode.#viewContainerRef) {
|
|
1056
|
+
if (!editor.isEditable()) {
|
|
1057
|
+
this.#componentRef?.destroy();
|
|
1058
|
+
const span = document.createElement('span');
|
|
1059
|
+
span.textContent = this.#tagDescription ?? this.#tagKey;
|
|
1060
|
+
return span;
|
|
1061
|
+
}
|
|
1045
1062
|
// Create the component
|
|
1046
1063
|
this.#componentRef = TagNode.#viewContainerRef.createComponent(ChipComponent);
|
|
1047
1064
|
// Set inputs on the component instance
|
|
@@ -1066,7 +1083,7 @@ class TagNode extends DecoratorNode {
|
|
|
1066
1083
|
throw new Error('ViewContainerRef is not set for TagNode. Ensure it is initialized before creating TagNode instances.');
|
|
1067
1084
|
}
|
|
1068
1085
|
updateDOM(prevNode, _dom, _config) {
|
|
1069
|
-
return this.#tagDescription !== prevNode.#tagDescription || this.#tagKey !== prevNode.#tagKey || this.#disabled !== prevNode.#disabled;
|
|
1086
|
+
return this.#tagDescription !== prevNode.#tagDescription || this.#tagKey !== prevNode.#tagKey || this.#disabled !== prevNode.#disabled || this.#componentRef !== prevNode.#componentRef;
|
|
1070
1087
|
}
|
|
1071
1088
|
remove(preserveEmptyParent) {
|
|
1072
1089
|
super.remove(preserveEmptyParent);
|
|
@@ -1148,7 +1165,7 @@ class RichTextPluginTagComponent {
|
|
|
1148
1165
|
#registeredCommands;
|
|
1149
1166
|
constructor() {
|
|
1150
1167
|
this.#viewContainerRef = inject(ViewContainerRef);
|
|
1151
|
-
this.intl =
|
|
1168
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
1152
1169
|
this.tags = input.required(...(ngDevMode ? [{ debugName: "tags" }] : []));
|
|
1153
1170
|
this.isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isDisabled" }] : []));
|
|
1154
1171
|
this.focusIndex = signal(0, ...(ngDevMode ? [{ debugName: "focusIndex" }] : []));
|
|
@@ -1230,12 +1247,12 @@ class RichTextPluginTagComponent {
|
|
|
1230
1247
|
this.#registeredCommands();
|
|
1231
1248
|
}
|
|
1232
1249
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextPluginTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1233
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: RichTextPluginTagComponent, isStandalone: true, selector: "lu-rich-text-plugin-tag", inputs: { tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
1250
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: RichTextPluginTagComponent, isStandalone: true, selector: "lu-rich-text-plugin-tag", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, tags: { classPropertyName: "tags", publicName: "tags", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
1234
1251
|
{
|
|
1235
1252
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
1236
1253
|
useExisting: forwardRef(() => RichTextPluginTagComponent),
|
|
1237
1254
|
},
|
|
1238
|
-
], viewQueries: [{ propertyName: "focusableElements", predicate: ["tagButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div class=\"richTextField-toolbar-chips\" (keydown.arrowleft)=\"focusTag($event, -1)\" (keydown.arrowRight)=\"focusTag($event, 1)\">\n\t<span aria-hidden=\"true\">{{ intl.insertTag }}</span>\n\t@for (tag of tags(); track tag) {\n\t\t<lu-chip\n\t\t\t[attr.tabindex]=\"isDisabled() ? null : $first ? 0 : -1\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t(click)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.space)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.enter)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\tclass=\"richTextField-toolbar-chips-chip\"\n\t\t\tpalette=\"product\"\n\t\t\t#tagButton\n\t\t\tunkillable\n\t\t>\n\t\t\t<span class=\"pr-u-mask\">{{ intl.insertTag }}</span>\n\t\t\t{{ tag.description }}\n\t\t</lu-chip>\n\t}\n</div>\n", styles: ["@layer components{.chip{--components-chip-font: var(--pr-t-font-body-S);--components-chip-backgroundColor: var(--palettes-100, var(--palettes-neutral-100));--components-chip-color: var(--palettes-800, var(--pr-t-color-text));--components-chip-borderRadius: var(--pr-t-border-radius-default);--components-chip-kill-size: .75rem;--components-chip-kill-disk-color: var(--palettes-800, var(--palettes-neutral-800));--components-chip-kill-cross-color: var(--palettes-text, var(--palettes-neutral-text));--components-chip-kill-background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16' fill='none'%3E%3Cpath d='M5.80473 4.86192C5.54438 4.60157 5.12227 4.60157 4.86192 4.86192C4.60157 5.12227 4.60157 5.54438 4.86192 5.80473L7.05718 7.99999L4.86192 10.1953C4.60157 10.4556 4.60157 10.8777 4.86192 11.1381C5.12227 11.3984 5.54438 11.3984 5.80473 11.1381L7.99999 8.9428L10.1953 11.1381C10.4556 11.3984 10.8777 11.3984 11.1381 11.1381C11.3984 10.8777 11.3984 10.4556 11.1381 10.1953L8.9428 7.99999L11.1381 5.80473C11.3984 5.54438 11.3984 5.12227 11.1381 4.86192C10.8777 4.60157 10.4556 4.60157 10.1953 4.86192L7.99999 7.05718L5.80473 4.86192Z' fill='currentColor'/%3E%3C/svg%3E\");--components-chip-fontSize: var(--pr-t-font-body-S-fontSize);--components-chip-lineHeight: var(--pr-t-font-body-S-lineHeight);background-color:var(--components-chip-backgroundColor);border:none;border-radius:var(--components-chip-borderRadius);color:var(--components-chip-color);display:inline-flex;align-items:center;position:relative;vertical-align:middle;padding-block:calc(var(--pr-t-spacings-50) / 2);padding-inline:var(--pr-t-spacings-100);font:var(--components-chip-font);max-inline-size:100%}.chip .lucca-icon{--icon-size: 1rem;margin-inline-end:var(--pr-t-spacings-50)}.chip-content{outline:none}.chip-kill{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:\"main\";place-items:center;inline-size:var(--pr-t-spacings-300);block-size:var(--pr-t-spacings-300);margin:calc(var(--pr-t-spacings-75) * -1);margin-inline-start:var(--pr-t-spacings-25);flex-shrink:0;cursor:pointer}.chip-kill:before,.chip-kill:after{content:\"\";grid-area:main;inline-size:var(--components-chip-kill-size);block-size:var(--components-chip-kill-size)}.chip-kill:before{border-radius:var(--pr-t-border-radius-full);background-color:var(--components-chip-kill-disk-color)}.chip-kill:after{-webkit-mask-image:var(--components-chip-kill-background-image);mask-image:var(--components-chip-kill-background-image);-webkit-mask-size:var(--components-chip-kill-size);mask-size:var(--components-chip-kill-size);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:var(--components-chip-kill-cross-color)}.chip-kill:hover{--components-chip-kill-disk-color: var(--palettes-700, var(--palettes-neutral-700))}.chip-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:-4px;border-radius:var(--pr-t-border-radius-full)}.chip-kill:active{--components-chip-kill-disk-color: var(--palettes-900, var(--palettes-neutral-900))}}@layer mods{.chip.mod-S{--components-chip-font: var(--pr-t-font-body-XS);--components-chip-borderRadius: var(--pr-t-border-radius-small)}.chip.mod-S .lucca-icon{--icon-size: .75rem}.chip.mod-unkillable .chip-kill{display:none}.chip.mod-clickable{cursor:pointer;text-decoration:none}.chip.is-disabled{--components-chip-backgroundColor: var(--palettes-neutral-200);--components-chip-color: var(--pr-t-color-text-subtle)}.chip.is-disabled .chip-kill{display:none}.chip:has(.chip-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}}\n"], dependencies: [{ kind: "component", type: ChipComponent, selector: "lu-chip, button[luChip], a[luChip]", inputs: ["withEllipsis", "unkillable", "palette", "disabled", "size", "state", "icon"], outputs: ["kill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1255
|
+
], viewQueries: [{ propertyName: "focusableElements", predicate: ["tagButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<div class=\"richTextField-toolbar-chips\" (keydown.arrowleft)=\"focusTag($event, -1)\" (keydown.arrowRight)=\"focusTag($event, 1)\">\n\t<span aria-hidden=\"true\">{{ intl().insertTag }}</span>\n\t@for (tag of tags(); track tag) {\n\t\t<lu-chip\n\t\t\t[attr.tabindex]=\"isDisabled() ? null : $first ? 0 : -1\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t(click)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.space)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.enter)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\tclass=\"richTextField-toolbar-chips-chip\"\n\t\t\tpalette=\"product\"\n\t\t\t#tagButton\n\t\t\tunkillable\n\t\t>\n\t\t\t<span class=\"pr-u-mask\">{{ intl().insertTag }}</span>\n\t\t\t{{ tag.description }}\n\t\t</lu-chip>\n\t}\n</div>\n", styles: ["@layer components{.chip{--components-chip-font: var(--pr-t-font-body-S);--components-chip-backgroundColor: var(--palettes-100, var(--palettes-neutral-100));--components-chip-color: var(--palettes-800, var(--pr-t-color-text));--components-chip-borderRadius: var(--pr-t-border-radius-default);--components-chip-kill-size: .75rem;--components-chip-kill-disk-color: var(--palettes-800, var(--palettes-neutral-800));--components-chip-kill-cross-color: var(--palettes-text, var(--palettes-neutral-text));--components-chip-kill-background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16' fill='none'%3E%3Cpath d='M5.80473 4.86192C5.54438 4.60157 5.12227 4.60157 4.86192 4.86192C4.60157 5.12227 4.60157 5.54438 4.86192 5.80473L7.05718 7.99999L4.86192 10.1953C4.60157 10.4556 4.60157 10.8777 4.86192 11.1381C5.12227 11.3984 5.54438 11.3984 5.80473 11.1381L7.99999 8.9428L10.1953 11.1381C10.4556 11.3984 10.8777 11.3984 11.1381 11.1381C11.3984 10.8777 11.3984 10.4556 11.1381 10.1953L8.9428 7.99999L11.1381 5.80473C11.3984 5.54438 11.3984 5.12227 11.1381 4.86192C10.8777 4.60157 10.4556 4.60157 10.1953 4.86192L7.99999 7.05718L5.80473 4.86192Z' fill='currentColor'/%3E%3C/svg%3E\");--components-chip-fontSize: var(--pr-t-font-body-S-fontSize);--components-chip-lineHeight: var(--pr-t-font-body-S-lineHeight);background-color:var(--components-chip-backgroundColor);border:none;border-radius:var(--components-chip-borderRadius);color:var(--components-chip-color);display:inline-flex;align-items:center;position:relative;vertical-align:middle;padding-block:calc(var(--pr-t-spacings-50) / 2);padding-inline:var(--pr-t-spacings-100);font:var(--components-chip-font);max-inline-size:100%}.chip .lucca-icon{--icon-size: 1rem;margin-inline-end:var(--pr-t-spacings-50)}.chip-content{outline:none}.chip-kill{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:\"main\";place-items:center;inline-size:var(--pr-t-spacings-300);block-size:var(--pr-t-spacings-300);margin:calc(var(--pr-t-spacings-75) * -1);margin-inline-start:var(--pr-t-spacings-25);flex-shrink:0;cursor:pointer}.chip-kill:before,.chip-kill:after{content:\"\";grid-area:main;inline-size:var(--components-chip-kill-size);block-size:var(--components-chip-kill-size)}.chip-kill:before{border-radius:var(--pr-t-border-radius-full);background-color:var(--components-chip-kill-disk-color)}.chip-kill:after{-webkit-mask-image:var(--components-chip-kill-background-image);mask-image:var(--components-chip-kill-background-image);-webkit-mask-size:var(--components-chip-kill-size);mask-size:var(--components-chip-kill-size);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:var(--components-chip-kill-cross-color)}.chip-kill:hover{--components-chip-kill-disk-color: var(--palettes-700, var(--palettes-neutral-700))}.chip-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:-4px;border-radius:var(--pr-t-border-radius-full)}.chip-kill:active{--components-chip-kill-disk-color: var(--palettes-900, var(--palettes-neutral-900))}}@layer mods{.chip.mod-S{--components-chip-font: var(--pr-t-font-body-XS);--components-chip-borderRadius: var(--pr-t-border-radius-small)}.chip.mod-S .lucca-icon{--icon-size: .75rem}.chip.mod-unkillable .chip-kill{display:none}.chip.mod-clickable{cursor:pointer;text-decoration:none}.chip.is-disabled{--components-chip-backgroundColor: var(--palettes-neutral-200);--components-chip-color: var(--pr-t-color-text-subtle)}.chip.is-disabled .chip-kill{display:none}.chip:has(.chip-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}}\n"], dependencies: [{ kind: "component", type: ChipComponent, selector: "lu-chip, button[luChip], a[luChip]", inputs: ["intl", "withEllipsis", "unkillable", "palette", "disabled", "size", "state", "icon"], outputs: ["kill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1239
1256
|
}
|
|
1240
1257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextPluginTagComponent, decorators: [{
|
|
1241
1258
|
type: Component,
|
|
@@ -1244,8 +1261,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1244
1261
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
1245
1262
|
useExisting: forwardRef(() => RichTextPluginTagComponent),
|
|
1246
1263
|
},
|
|
1247
|
-
], template: "<div class=\"richTextField-toolbar-chips\" (keydown.arrowleft)=\"focusTag($event, -1)\" (keydown.arrowRight)=\"focusTag($event, 1)\">\n\t<span aria-hidden=\"true\">{{ intl.insertTag }}</span>\n\t@for (tag of tags(); track tag) {\n\t\t<lu-chip\n\t\t\t[attr.tabindex]=\"isDisabled() ? null : $first ? 0 : -1\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t(click)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.space)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.enter)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\tclass=\"richTextField-toolbar-chips-chip\"\n\t\t\tpalette=\"product\"\n\t\t\t#tagButton\n\t\t\tunkillable\n\t\t>\n\t\t\t<span class=\"pr-u-mask\">{{ intl.insertTag }}</span>\n\t\t\t{{ tag.description }}\n\t\t</lu-chip>\n\t}\n</div>\n", styles: ["@layer components{.chip{--components-chip-font: var(--pr-t-font-body-S);--components-chip-backgroundColor: var(--palettes-100, var(--palettes-neutral-100));--components-chip-color: var(--palettes-800, var(--pr-t-color-text));--components-chip-borderRadius: var(--pr-t-border-radius-default);--components-chip-kill-size: .75rem;--components-chip-kill-disk-color: var(--palettes-800, var(--palettes-neutral-800));--components-chip-kill-cross-color: var(--palettes-text, var(--palettes-neutral-text));--components-chip-kill-background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16' fill='none'%3E%3Cpath d='M5.80473 4.86192C5.54438 4.60157 5.12227 4.60157 4.86192 4.86192C4.60157 5.12227 4.60157 5.54438 4.86192 5.80473L7.05718 7.99999L4.86192 10.1953C4.60157 10.4556 4.60157 10.8777 4.86192 11.1381C5.12227 11.3984 5.54438 11.3984 5.80473 11.1381L7.99999 8.9428L10.1953 11.1381C10.4556 11.3984 10.8777 11.3984 11.1381 11.1381C11.3984 10.8777 11.3984 10.4556 11.1381 10.1953L8.9428 7.99999L11.1381 5.80473C11.3984 5.54438 11.3984 5.12227 11.1381 4.86192C10.8777 4.60157 10.4556 4.60157 10.1953 4.86192L7.99999 7.05718L5.80473 4.86192Z' fill='currentColor'/%3E%3C/svg%3E\");--components-chip-fontSize: var(--pr-t-font-body-S-fontSize);--components-chip-lineHeight: var(--pr-t-font-body-S-lineHeight);background-color:var(--components-chip-backgroundColor);border:none;border-radius:var(--components-chip-borderRadius);color:var(--components-chip-color);display:inline-flex;align-items:center;position:relative;vertical-align:middle;padding-block:calc(var(--pr-t-spacings-50) / 2);padding-inline:var(--pr-t-spacings-100);font:var(--components-chip-font);max-inline-size:100%}.chip .lucca-icon{--icon-size: 1rem;margin-inline-end:var(--pr-t-spacings-50)}.chip-content{outline:none}.chip-kill{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:\"main\";place-items:center;inline-size:var(--pr-t-spacings-300);block-size:var(--pr-t-spacings-300);margin:calc(var(--pr-t-spacings-75) * -1);margin-inline-start:var(--pr-t-spacings-25);flex-shrink:0;cursor:pointer}.chip-kill:before,.chip-kill:after{content:\"\";grid-area:main;inline-size:var(--components-chip-kill-size);block-size:var(--components-chip-kill-size)}.chip-kill:before{border-radius:var(--pr-t-border-radius-full);background-color:var(--components-chip-kill-disk-color)}.chip-kill:after{-webkit-mask-image:var(--components-chip-kill-background-image);mask-image:var(--components-chip-kill-background-image);-webkit-mask-size:var(--components-chip-kill-size);mask-size:var(--components-chip-kill-size);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:var(--components-chip-kill-cross-color)}.chip-kill:hover{--components-chip-kill-disk-color: var(--palettes-700, var(--palettes-neutral-700))}.chip-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:-4px;border-radius:var(--pr-t-border-radius-full)}.chip-kill:active{--components-chip-kill-disk-color: var(--palettes-900, var(--palettes-neutral-900))}}@layer mods{.chip.mod-S{--components-chip-font: var(--pr-t-font-body-XS);--components-chip-borderRadius: var(--pr-t-border-radius-small)}.chip.mod-S .lucca-icon{--icon-size: .75rem}.chip.mod-unkillable .chip-kill{display:none}.chip.mod-clickable{cursor:pointer;text-decoration:none}.chip.is-disabled{--components-chip-backgroundColor: var(--palettes-neutral-200);--components-chip-color: var(--pr-t-color-text-subtle)}.chip.is-disabled .chip-kill{display:none}.chip:has(.chip-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}}\n"] }]
|
|
1248
|
-
}], ctorParameters: () => [], propDecorators: { tags: [{ type: i0.Input, args: [{ isSignal: true, alias: "tags", required: true }] }], focusableElements: [{ type: i0.ViewChildren, args: ['tagButton', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
1264
|
+
], template: "<div class=\"richTextField-toolbar-chips\" (keydown.arrowleft)=\"focusTag($event, -1)\" (keydown.arrowRight)=\"focusTag($event, 1)\">\n\t<span aria-hidden=\"true\">{{ intl().insertTag }}</span>\n\t@for (tag of tags(); track tag) {\n\t\t<lu-chip\n\t\t\t[attr.tabindex]=\"isDisabled() ? null : $first ? 0 : -1\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t(click)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.space)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\t(keyup.enter)=\"!isDisabled() ? insertTag(tag) : null\"\n\t\t\tclass=\"richTextField-toolbar-chips-chip\"\n\t\t\tpalette=\"product\"\n\t\t\t#tagButton\n\t\t\tunkillable\n\t\t>\n\t\t\t<span class=\"pr-u-mask\">{{ intl().insertTag }}</span>\n\t\t\t{{ tag.description }}\n\t\t</lu-chip>\n\t}\n</div>\n", styles: ["@layer components{.chip{--components-chip-font: var(--pr-t-font-body-S);--components-chip-backgroundColor: var(--palettes-100, var(--palettes-neutral-100));--components-chip-color: var(--palettes-800, var(--pr-t-color-text));--components-chip-borderRadius: var(--pr-t-border-radius-default);--components-chip-kill-size: .75rem;--components-chip-kill-disk-color: var(--palettes-800, var(--palettes-neutral-800));--components-chip-kill-cross-color: var(--palettes-text, var(--palettes-neutral-text));--components-chip-kill-background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='16' fill='none'%3E%3Cpath d='M5.80473 4.86192C5.54438 4.60157 5.12227 4.60157 4.86192 4.86192C4.60157 5.12227 4.60157 5.54438 4.86192 5.80473L7.05718 7.99999L4.86192 10.1953C4.60157 10.4556 4.60157 10.8777 4.86192 11.1381C5.12227 11.3984 5.54438 11.3984 5.80473 11.1381L7.99999 8.9428L10.1953 11.1381C10.4556 11.3984 10.8777 11.3984 11.1381 11.1381C11.3984 10.8777 11.3984 10.4556 11.1381 10.1953L8.9428 7.99999L11.1381 5.80473C11.3984 5.54438 11.3984 5.12227 11.1381 4.86192C10.8777 4.60157 10.4556 4.60157 10.1953 4.86192L7.99999 7.05718L5.80473 4.86192Z' fill='currentColor'/%3E%3C/svg%3E\");--components-chip-fontSize: var(--pr-t-font-body-S-fontSize);--components-chip-lineHeight: var(--pr-t-font-body-S-lineHeight);background-color:var(--components-chip-backgroundColor);border:none;border-radius:var(--components-chip-borderRadius);color:var(--components-chip-color);display:inline-flex;align-items:center;position:relative;vertical-align:middle;padding-block:calc(var(--pr-t-spacings-50) / 2);padding-inline:var(--pr-t-spacings-100);font:var(--components-chip-font);max-inline-size:100%}.chip .lucca-icon{--icon-size: 1rem;margin-inline-end:var(--pr-t-spacings-50)}.chip-content{outline:none}.chip-kill{padding:0;border:0;inline-size:100%;background-color:transparent;color:inherit;text-align:start;display:block;font:inherit;display:grid;grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:\"main\";place-items:center;inline-size:var(--pr-t-spacings-300);block-size:var(--pr-t-spacings-300);margin:calc(var(--pr-t-spacings-75) * -1);margin-inline-start:var(--pr-t-spacings-25);flex-shrink:0;cursor:pointer}.chip-kill:before,.chip-kill:after{content:\"\";grid-area:main;inline-size:var(--components-chip-kill-size);block-size:var(--components-chip-kill-size)}.chip-kill:before{border-radius:var(--pr-t-border-radius-full);background-color:var(--components-chip-kill-disk-color)}.chip-kill:after{-webkit-mask-image:var(--components-chip-kill-background-image);mask-image:var(--components-chip-kill-background-image);-webkit-mask-size:var(--components-chip-kill-size);mask-size:var(--components-chip-kill-size);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:var(--components-chip-kill-cross-color)}.chip-kill:hover{--components-chip-kill-disk-color: var(--palettes-700, var(--palettes-neutral-700))}.chip-kill:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:-4px;border-radius:var(--pr-t-border-radius-full)}.chip-kill:active{--components-chip-kill-disk-color: var(--palettes-900, var(--palettes-neutral-900))}}@layer mods{.chip.mod-S{--components-chip-font: var(--pr-t-font-body-XS);--components-chip-borderRadius: var(--pr-t-border-radius-small)}.chip.mod-S .lucca-icon{--icon-size: .75rem}.chip.mod-unkillable .chip-kill{display:none}.chip.mod-clickable{cursor:pointer;text-decoration:none}.chip.is-disabled{--components-chip-backgroundColor: var(--palettes-neutral-200);--components-chip-color: var(--pr-t-color-text-subtle)}.chip.is-disabled .chip-kill{display:none}.chip:has(.chip-content:focus-visible){outline:2px solid var(--palettes-product-700);outline-offset:2px}}\n"] }]
|
|
1265
|
+
}], ctorParameters: () => [], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], tags: [{ type: i0.Input, args: [{ isSignal: true, alias: "tags", required: true }] }], focusableElements: [{ type: i0.ViewChildren, args: ['tagButton', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
1249
1266
|
|
|
1250
1267
|
function registerFormatSelectionChange(editor, format, onselectionchange) {
|
|
1251
1268
|
return editor.registerCommand(SELECTION_CHANGE_COMMAND, () => {
|
|
@@ -1311,7 +1328,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1311
1328
|
class TextStyleToolbarComponent {
|
|
1312
1329
|
constructor() {
|
|
1313
1330
|
this.pluginComponents = viewChildren(RICH_TEXT_PLUGIN_COMPONENT, ...(ngDevMode ? [{ debugName: "pluginComponents" }] : []));
|
|
1314
|
-
this.intl =
|
|
1331
|
+
this.intl = input(...intlInputOptions(LU_RICH_TEXT_INPUT_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
1315
1332
|
}
|
|
1316
1333
|
setEditorInstance(editor) {
|
|
1317
1334
|
this.pluginComponents().forEach((plugin) => plugin.setEditorInstance(editor));
|
|
@@ -1320,12 +1337,12 @@ class TextStyleToolbarComponent {
|
|
|
1320
1337
|
this.pluginComponents().forEach((plugin) => plugin.setDisabledState(isDisabled));
|
|
1321
1338
|
}
|
|
1322
1339
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TextStyleToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1323
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: TextStyleToolbarComponent, isStandalone: true, selector: "lu-rich-text-toolbar-text-style", host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
1340
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: TextStyleToolbarComponent, isStandalone: true, selector: "lu-rich-text-toolbar-text-style", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "richTextField-toolbar-col-group" }, providers: [
|
|
1324
1341
|
{
|
|
1325
1342
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
1326
1343
|
useExisting: forwardRef(() => TextStyleToolbarComponent),
|
|
1327
1344
|
},
|
|
1328
|
-
], viewQueries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], ngImport: i0, template: "<lu-rich-text-plugin-text-style icon=\"formatTextBold\" [tooltip]=\"intl.stylesBold\" format=\"bold\" />\n<lu-rich-text-plugin-text-style icon=\"formatTextItalic\" [tooltip]=\"intl.stylesItalic\" format=\"italic\" />\n<lu-rich-text-plugin-text-style icon=\"
|
|
1345
|
+
], viewQueries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], ngImport: i0, template: "<lu-rich-text-plugin-text-style icon=\"formatTextBold\" [tooltip]=\"intl().stylesBold\" format=\"bold\" />\n<lu-rich-text-plugin-text-style icon=\"formatTextItalic\" [tooltip]=\"intl().stylesItalic\" format=\"italic\" />\n<lu-rich-text-plugin-text-style icon=\"formatTextStrikethrough\" [tooltip]=\"intl().stylesStrikethrough\" format=\"strikethrough\" />\n", dependencies: [{ kind: "component", type: TextStyleComponent, selector: "lu-rich-text-plugin-text-style", inputs: ["format", "icon", "tooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1329
1346
|
}
|
|
1330
1347
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TextStyleToolbarComponent, decorators: [{
|
|
1331
1348
|
type: Component,
|
|
@@ -1336,8 +1353,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1336
1353
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
1337
1354
|
useExisting: forwardRef(() => TextStyleToolbarComponent),
|
|
1338
1355
|
},
|
|
1339
|
-
], template: "<lu-rich-text-plugin-text-style icon=\"formatTextBold\" [tooltip]=\"intl.stylesBold\" format=\"bold\" />\n<lu-rich-text-plugin-text-style icon=\"formatTextItalic\" [tooltip]=\"intl.stylesItalic\" format=\"italic\" />\n<lu-rich-text-plugin-text-style icon=\"
|
|
1340
|
-
}], propDecorators: { pluginComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => RICH_TEXT_PLUGIN_COMPONENT), { isSignal: true }] }] } });
|
|
1356
|
+
], template: "<lu-rich-text-plugin-text-style icon=\"formatTextBold\" [tooltip]=\"intl().stylesBold\" format=\"bold\" />\n<lu-rich-text-plugin-text-style icon=\"formatTextItalic\" [tooltip]=\"intl().stylesItalic\" format=\"italic\" />\n<lu-rich-text-plugin-text-style icon=\"formatTextStrikethrough\" [tooltip]=\"intl().stylesStrikethrough\" format=\"strikethrough\" />\n" }]
|
|
1357
|
+
}], propDecorators: { pluginComponents: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => RICH_TEXT_PLUGIN_COMPONENT), { isSignal: true }] }], intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }] } });
|
|
1341
1358
|
|
|
1342
1359
|
class RichTextInputToolbarComponent {
|
|
1343
1360
|
constructor() {
|
|
@@ -1358,7 +1375,7 @@ class RichTextInputToolbarComponent {
|
|
|
1358
1375
|
provide: RICH_TEXT_PLUGIN_COMPONENT,
|
|
1359
1376
|
useExisting: forwardRef(() => RichTextInputToolbarComponent),
|
|
1360
1377
|
},
|
|
1361
|
-
], viewQueries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"richTextField-toolbar-col\">\n\t<lu-rich-text-toolbar-text-style />\n\t<lu-rich-text-plugin-headings />\n\t<lu-rich-text-toolbar-list-style />\n\t<lu-rich-text-plugin-link />\n</div>\n<div class=\"richTextField-toolbar-col\">\n\t<lu-rich-text-plugin-clear-format />\n</div>\n", dependencies: [{ kind: "component", type: TextStyleToolbarComponent, selector: "lu-rich-text-toolbar-text-style" }, { kind: "component", type: ListStyleToolbarComponent, selector: "lu-rich-text-toolbar-list-style" }, { kind: "component", type: HeadingsComponent, selector: "lu-rich-text-plugin-headings", inputs: ["maxHeadingLevel"] }, { kind: "component", type: LinkComponent, selector: "lu-rich-text-plugin-link" }, { kind: "component", type: ClearFormatComponent, selector: "lu-rich-text-plugin-clear-format" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1378
|
+
], viewQueries: [{ propertyName: "pluginComponents", predicate: RICH_TEXT_PLUGIN_COMPONENT, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"richTextField-toolbar-col\">\n\t<lu-rich-text-toolbar-text-style />\n\t<lu-rich-text-plugin-headings />\n\t<lu-rich-text-toolbar-list-style />\n\t<lu-rich-text-plugin-link />\n</div>\n<div class=\"richTextField-toolbar-col\">\n\t<lu-rich-text-plugin-clear-format />\n</div>\n", dependencies: [{ kind: "component", type: TextStyleToolbarComponent, selector: "lu-rich-text-toolbar-text-style", inputs: ["intl"] }, { kind: "component", type: ListStyleToolbarComponent, selector: "lu-rich-text-toolbar-list-style", inputs: ["intl"] }, { kind: "component", type: HeadingsComponent, selector: "lu-rich-text-plugin-headings", inputs: ["maxHeadingLevel", "intl"] }, { kind: "component", type: LinkComponent, selector: "lu-rich-text-plugin-link", inputs: ["intl"] }, { kind: "component", type: ClearFormatComponent, selector: "lu-rich-text-plugin-clear-format", inputs: ["intl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1362
1379
|
}
|
|
1363
1380
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RichTextInputToolbarComponent, decorators: [{
|
|
1364
1381
|
type: Component,
|