@vadem/ui 0.0.0-stage → 0.0.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/LICENSE-lucide.txt +43 -0
- package/README.md +19 -2
- package/fesm2022/vadem-ui-accordion.mjs +139 -0
- package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
- package/fesm2022/vadem-ui-active-filters.mjs +355 -0
- package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert.mjs +266 -0
- package/fesm2022/vadem-ui-alert.mjs.map +1 -0
- package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
- package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/vadem-ui-avatar.mjs +219 -0
- package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
- package/fesm2022/vadem-ui-badge.mjs +86 -0
- package/fesm2022/vadem-ui-badge.mjs.map +1 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
- package/fesm2022/vadem-ui-button.mjs +220 -0
- package/fesm2022/vadem-ui-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-calendar.mjs +1314 -0
- package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
- package/fesm2022/vadem-ui-card.mjs +271 -0
- package/fesm2022/vadem-ui-card.mjs.map +1 -0
- package/fesm2022/vadem-ui-character-count.mjs +269 -0
- package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
- package/fesm2022/vadem-ui-chart.mjs +1984 -0
- package/fesm2022/vadem-ui-chart.mjs.map +1 -0
- package/fesm2022/vadem-ui-checkbox.mjs +67 -0
- package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
- package/fesm2022/vadem-ui-color-picker.mjs +815 -0
- package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-command.mjs +735 -0
- package/fesm2022/vadem-ui-command.mjs.map +1 -0
- package/fesm2022/vadem-ui-copy-button.mjs +375 -0
- package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-description-list.mjs +59 -0
- package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-dialog.mjs +587 -0
- package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-dropzone.mjs +176 -0
- package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
- package/fesm2022/vadem-ui-editable-text.mjs +641 -0
- package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-empty-state.mjs +175 -0
- package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
- package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
- package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-field.mjs +583 -0
- package/fesm2022/vadem-ui-field.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-preview.mjs +532 -0
- package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-size.mjs +83 -0
- package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
- package/fesm2022/vadem-ui-icon.mjs +303 -0
- package/fesm2022/vadem-ui-icon.mjs.map +1 -0
- package/fesm2022/vadem-ui-input.mjs +120 -0
- package/fesm2022/vadem-ui-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-kbd.mjs +286 -0
- package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
- package/fesm2022/vadem-ui-keyboard.mjs +105 -0
- package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +443 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -0
- package/fesm2022/vadem-ui-menu.mjs +637 -0
- package/fesm2022/vadem-ui-menu.mjs.map +1 -0
- package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
- package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-number-input.mjs +264 -0
- package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-otp-input.mjs +86 -0
- package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-pagination.mjs +353 -0
- package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
- package/fesm2022/vadem-ui-password-input.mjs +213 -0
- package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-popover.mjs +178 -0
- package/fesm2022/vadem-ui-popover.mjs.map +1 -0
- package/fesm2022/vadem-ui-progress.mjs +331 -0
- package/fesm2022/vadem-ui-progress.mjs.map +1 -0
- package/fesm2022/vadem-ui-radio.mjs +39 -0
- package/fesm2022/vadem-ui-radio.mjs.map +1 -0
- package/fesm2022/vadem-ui-range-slider.mjs +561 -0
- package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-rating.mjs +404 -0
- package/fesm2022/vadem-ui-rating.mjs.map +1 -0
- package/fesm2022/vadem-ui-relative-time.mjs +217 -0
- package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
- package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
- package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
- package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/vadem-ui-search-input.mjs +307 -0
- package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-segmented.mjs +297 -0
- package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
- package/fesm2022/vadem-ui-select.mjs +1462 -0
- package/fesm2022/vadem-ui-select.mjs.map +1 -0
- package/fesm2022/vadem-ui-sidebar.mjs +493 -0
- package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
- package/fesm2022/vadem-ui-skeleton.mjs +106 -0
- package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
- package/fesm2022/vadem-ui-slider.mjs +60 -0
- package/fesm2022/vadem-ui-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-splitter.mjs +438 -0
- package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
- package/fesm2022/vadem-ui-stat.mjs +369 -0
- package/fesm2022/vadem-ui-stat.mjs.map +1 -0
- package/fesm2022/vadem-ui-stepper.mjs +483 -0
- package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
- package/fesm2022/vadem-ui-switch.mjs +45 -0
- package/fesm2022/vadem-ui-switch.mjs.map +1 -0
- package/fesm2022/vadem-ui-table.mjs +593 -0
- package/fesm2022/vadem-ui-table.mjs.map +1 -0
- package/fesm2022/vadem-ui-tabs.mjs +405 -0
- package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
- package/fesm2022/vadem-ui-tag-input.mjs +685 -0
- package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
- package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
- package/fesm2022/vadem-ui-time-input.mjs +430 -0
- package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-timeline.mjs +313 -0
- package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
- package/fesm2022/vadem-ui-toast.mjs +397 -0
- package/fesm2022/vadem-ui-toast.mjs.map +1 -0
- package/fesm2022/vadem-ui-toolbar.mjs +396 -0
- package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
- package/fesm2022/vadem-ui-tooltip.mjs +218 -0
- package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
- package/fesm2022/vadem-ui-tree.mjs +551 -0
- package/fesm2022/vadem-ui-tree.mjs.map +1 -0
- package/fesm2022/vadem-ui-upload-list.mjs +408 -0
- package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +4 -0
- package/fesm2022/vadem-ui.mjs.map +1 -0
- package/fonts/jetbrains-mono/OFL.txt +93 -0
- package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
- package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
- package/fonts/manrope/OFL.txt +93 -0
- package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/package.json +306 -3
- package/styles/base.css +160 -0
- package/styles/components/accordion.css +130 -0
- package/styles/components/active-filters.css +42 -0
- package/styles/components/alert-dialog.css +34 -0
- package/styles/components/alert.css +159 -0
- package/styles/components/autocomplete.css +97 -0
- package/styles/components/avatar.css +90 -0
- package/styles/components/badge.css +91 -0
- package/styles/components/breadcrumbs.css +94 -0
- package/styles/components/button.css +174 -0
- package/styles/components/calendar.css +186 -0
- package/styles/components/card.css +206 -0
- package/styles/components/character-count.css +41 -0
- package/styles/components/chart.css +308 -0
- package/styles/components/checkbox.css +115 -0
- package/styles/components/color-picker.css +158 -0
- package/styles/components/command.css +175 -0
- package/styles/components/copy-button.css +58 -0
- package/styles/components/date-range-picker.css +153 -0
- package/styles/components/description-list.css +69 -0
- package/styles/components/dialog.css +334 -0
- package/styles/components/dropzone.css +89 -0
- package/styles/components/editable-text.css +58 -0
- package/styles/components/empty-state.css +72 -0
- package/styles/components/expandable-text.css +24 -0
- package/styles/components/field.css +148 -0
- package/styles/components/file-preview.css +65 -0
- package/styles/components/form-error-summary.css +71 -0
- package/styles/components/icon.css +38 -0
- package/styles/components/index.css +80 -0
- package/styles/components/input.css +171 -0
- package/styles/components/kbd.css +42 -0
- package/styles/components/menu.css +168 -0
- package/styles/components/multi-select.css +156 -0
- package/styles/components/navigation-list.css +147 -0
- package/styles/components/number-input.css +33 -0
- package/styles/components/otp-input.css +26 -0
- package/styles/components/pagination.css +127 -0
- package/styles/components/password-input.css +20 -0
- package/styles/components/popover.css +93 -0
- package/styles/components/progress-ring.css +112 -0
- package/styles/components/progress.css +162 -0
- package/styles/components/radio.css +117 -0
- package/styles/components/range-slider.css +158 -0
- package/styles/components/rating.css +100 -0
- package/styles/components/reorder-list.css +143 -0
- package/styles/components/scroll-area.css +39 -0
- package/styles/components/search-input.css +25 -0
- package/styles/components/segmented.css +136 -0
- package/styles/components/select.css +257 -0
- package/styles/components/sidebar.css +105 -0
- package/styles/components/skeleton.css +83 -0
- package/styles/components/slider.css +132 -0
- package/styles/components/splitter.css +83 -0
- package/styles/components/stat.css +62 -0
- package/styles/components/stepper.css +236 -0
- package/styles/components/switch.css +107 -0
- package/styles/components/table.css +195 -0
- package/styles/components/tabs.css +198 -0
- package/styles/components/tag-input.css +138 -0
- package/styles/components/text-highlight.css +22 -0
- package/styles/components/time-input.css +96 -0
- package/styles/components/timeline.css +182 -0
- package/styles/components/toast.css +146 -0
- package/styles/components/toolbar.css +72 -0
- package/styles/components/tooltip.css +93 -0
- package/styles/components/tree.css +88 -0
- package/styles/components/upload-list.css +113 -0
- package/styles/fonts.css +67 -0
- package/styles/index.css +14 -0
- package/styles/reset.css +57 -0
- package/styles/tokens/primitives.css +364 -0
- package/styles/tokens/semantic.css +233 -0
- package/types/vadem-ui-accordion.d.ts +43 -0
- package/types/vadem-ui-active-filters.d.ts +73 -0
- package/types/vadem-ui-alert-dialog.d.ts +87 -0
- package/types/vadem-ui-alert.d.ts +64 -0
- package/types/vadem-ui-autocomplete.d.ts +156 -0
- package/types/vadem-ui-avatar.d.ts +59 -0
- package/types/vadem-ui-badge.d.ts +25 -0
- package/types/vadem-ui-breadcrumbs.d.ts +22 -0
- package/types/vadem-ui-button.d.ts +52 -0
- package/types/vadem-ui-calendar.d.ts +327 -0
- package/types/vadem-ui-card.d.ts +58 -0
- package/types/vadem-ui-character-count.d.ts +71 -0
- package/types/vadem-ui-chart.d.ts +452 -0
- package/types/vadem-ui-checkbox.d.ts +20 -0
- package/types/vadem-ui-color-picker.d.ts +171 -0
- package/types/vadem-ui-command.d.ts +145 -0
- package/types/vadem-ui-copy-button.d.ts +90 -0
- package/types/vadem-ui-date-range-picker.d.ts +216 -0
- package/types/vadem-ui-description-list.d.ts +15 -0
- package/types/vadem-ui-dialog.d.ts +174 -0
- package/types/vadem-ui-dropzone.d.ts +73 -0
- package/types/vadem-ui-editable-text.d.ts +141 -0
- package/types/vadem-ui-empty-state.d.ts +34 -0
- package/types/vadem-ui-expandable-text.d.ts +52 -0
- package/types/vadem-ui-field.d.ts +180 -0
- package/types/vadem-ui-file-preview.d.ts +108 -0
- package/types/vadem-ui-file-size.d.ts +18 -0
- package/types/vadem-ui-form-error-summary.d.ts +46 -0
- package/types/vadem-ui-icon.d.ts +152 -0
- package/types/vadem-ui-input.d.ts +31 -0
- package/types/vadem-ui-kbd.d.ts +66 -0
- package/types/vadem-ui-keyboard.d.ts +61 -0
- package/types/vadem-ui-locale.d.ts +241 -0
- package/types/vadem-ui-menu.d.ts +132 -0
- package/types/vadem-ui-navigation-list.d.ts +28 -0
- package/types/vadem-ui-number-input.d.ts +39 -0
- package/types/vadem-ui-otp-input.d.ts +15 -0
- package/types/vadem-ui-pagination.d.ts +96 -0
- package/types/vadem-ui-password-input.d.ts +36 -0
- package/types/vadem-ui-popover.d.ts +48 -0
- package/types/vadem-ui-progress.d.ts +95 -0
- package/types/vadem-ui-radio.d.ts +11 -0
- package/types/vadem-ui-range-slider.d.ts +136 -0
- package/types/vadem-ui-rating.d.ts +95 -0
- package/types/vadem-ui-relative-time.d.ts +58 -0
- package/types/vadem-ui-reorder-list.d.ts +120 -0
- package/types/vadem-ui-scroll-area.d.ts +13 -0
- package/types/vadem-ui-search-input.d.ts +58 -0
- package/types/vadem-ui-segmented.d.ts +76 -0
- package/types/vadem-ui-select.d.ts +303 -0
- package/types/vadem-ui-sidebar.d.ts +70 -0
- package/types/vadem-ui-skeleton.d.ts +28 -0
- package/types/vadem-ui-slider.d.ts +17 -0
- package/types/vadem-ui-splitter.d.ts +99 -0
- package/types/vadem-ui-stat.d.ts +101 -0
- package/types/vadem-ui-stepper.d.ts +108 -0
- package/types/vadem-ui-switch.d.ts +10 -0
- package/types/vadem-ui-table.d.ts +172 -0
- package/types/vadem-ui-tabs.d.ts +101 -0
- package/types/vadem-ui-tag-input.d.ts +170 -0
- package/types/vadem-ui-text-highlight.d.ts +27 -0
- package/types/vadem-ui-time-input.d.ts +47 -0
- package/types/vadem-ui-timeline.d.ts +54 -0
- package/types/vadem-ui-toast.d.ts +104 -0
- package/types/vadem-ui-toolbar.d.ts +80 -0
- package/types/vadem-ui-tooltip.d.ts +71 -0
- package/types/vadem-ui-tree.d.ts +123 -0
- package/types/vadem-ui-upload-list.d.ts +70 -0
- package/types/vadem-ui.d.ts +1 -0
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, booleanAttribute, computed, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { VdButton } from "@vadem/ui/button";
|
|
4
|
+
import { VdField } from "@vadem/ui/field";
|
|
5
|
+
import { VdIcon } from "@vadem/ui/icon";
|
|
6
|
+
import { VdInput } from "@vadem/ui/input";
|
|
7
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
8
|
+
function vdEditableTextLimit(value) {
|
|
9
|
+
return value !== null && Number.isFinite(value) && value >= 0 ? Math.floor(value) : null;
|
|
10
|
+
}
|
|
11
|
+
function vdEditableTextIssue(value, required, limit) {
|
|
12
|
+
if (required && !value.trim()) return "required";
|
|
13
|
+
if (limit !== null && value.length > limit) return "tooLong";
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
var VdEditableText = class VdEditableText {
|
|
17
|
+
value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
18
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
19
|
+
save = input(...ngDevMode ? [void 0, { debugName: "save" }] : /* istanbul ignore next */ []);
|
|
20
|
+
disabled = input(false, {
|
|
21
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
22
|
+
transform: booleanAttribute
|
|
23
|
+
});
|
|
24
|
+
required = input(false, {
|
|
25
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
26
|
+
transform: booleanAttribute
|
|
27
|
+
});
|
|
28
|
+
maxLength = input(null, ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
|
|
29
|
+
hint = input(...ngDevMode ? [void 0, { debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
30
|
+
emptyText = input(...ngDevMode ? [void 0, { debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
31
|
+
editLabel = input(...ngDevMode ? [void 0, { debugName: "editLabel" }] : /* istanbul ignore next */ []);
|
|
32
|
+
saveLabel = input(...ngDevMode ? [void 0, { debugName: "saveLabel" }] : /* istanbul ignore next */ []);
|
|
33
|
+
cancelLabel = input(...ngDevMode ? [void 0, { debugName: "cancelLabel" }] : /* istanbul ignore next */ []);
|
|
34
|
+
savingText = input(...ngDevMode ? [void 0, { debugName: "savingText" }] : /* istanbul ignore next */ []);
|
|
35
|
+
savedText = input(...ngDevMode ? [void 0, { debugName: "savedText" }] : /* istanbul ignore next */ []);
|
|
36
|
+
saveErrorText = input(...ngDevMode ? [void 0, { debugName: "saveErrorText" }] : /* istanbul ignore next */ []);
|
|
37
|
+
requiredText = input(...ngDevMode ? [void 0, { debugName: "requiredText" }] : /* istanbul ignore next */ []);
|
|
38
|
+
tooLongText = input(...ngDevMode ? [void 0, { debugName: "tooLongText" }] : /* istanbul ignore next */ []);
|
|
39
|
+
saveFailed = output();
|
|
40
|
+
t = vdTexts("editableText", {
|
|
41
|
+
emptyText: this.emptyText,
|
|
42
|
+
editLabel: this.editLabel,
|
|
43
|
+
saveLabel: this.saveLabel,
|
|
44
|
+
cancelLabel: this.cancelLabel,
|
|
45
|
+
savingText: this.savingText,
|
|
46
|
+
savedText: this.savedText,
|
|
47
|
+
saveErrorText: this.saveErrorText,
|
|
48
|
+
requiredText: this.requiredText,
|
|
49
|
+
tooLongText: this.tooLongText
|
|
50
|
+
});
|
|
51
|
+
editing = signal(false, ...ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []);
|
|
52
|
+
saving = signal(false, ...ngDevMode ? [{ debugName: "saving" }] : /* istanbul ignore next */ []);
|
|
53
|
+
draft = signal("", ...ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []);
|
|
54
|
+
issue = signal(null, ...ngDevMode ? [{ debugName: "issue" }] : /* istanbul ignore next */ []);
|
|
55
|
+
limit = computed(() => vdEditableTextLimit(this.maxLength()), ...ngDevMode ? [{ debugName: "limit" }] : /* istanbul ignore next */ []);
|
|
56
|
+
feedback = computed(() => {
|
|
57
|
+
const text = this.t();
|
|
58
|
+
switch (this.issue()) {
|
|
59
|
+
case "required": return text.requiredText;
|
|
60
|
+
case "tooLong": return text.tooLongText(this.limit() ?? 0);
|
|
61
|
+
case "save": return text.saveErrorText;
|
|
62
|
+
default: return "";
|
|
63
|
+
}
|
|
64
|
+
}, ...ngDevMode ? [{ debugName: "feedback" }] : /* istanbul ignore next */ []);
|
|
65
|
+
announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
|
|
66
|
+
composing = false;
|
|
67
|
+
host = inject(ElementRef).nativeElement;
|
|
68
|
+
editor = viewChild("editor", {
|
|
69
|
+
...ngDevMode ? { debugName: "editor" } : /* istanbul ignore next */ {},
|
|
70
|
+
read: ElementRef
|
|
71
|
+
});
|
|
72
|
+
trigger = viewChild("trigger", {
|
|
73
|
+
...ngDevMode ? { debugName: "trigger" } : /* istanbul ignore next */ {},
|
|
74
|
+
read: ElementRef
|
|
75
|
+
});
|
|
76
|
+
injector = inject(Injector);
|
|
77
|
+
destroyed = false;
|
|
78
|
+
constructor() {
|
|
79
|
+
inject(DestroyRef).onDestroy(() => {
|
|
80
|
+
this.destroyed = true;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
focusAfterRender(target) {
|
|
84
|
+
afterNextRender(() => {
|
|
85
|
+
const element = target === "editor" ? this.editor()?.nativeElement : this.trigger()?.nativeElement;
|
|
86
|
+
element?.focus();
|
|
87
|
+
if (target === "editor") element?.select();
|
|
88
|
+
}, { injector: this.injector });
|
|
89
|
+
}
|
|
90
|
+
begin() {
|
|
91
|
+
if (this.disabled() || this.editing()) return;
|
|
92
|
+
this.draft.set(this.value());
|
|
93
|
+
this.issue.set(null);
|
|
94
|
+
this.announcement.set("");
|
|
95
|
+
this.composing = false;
|
|
96
|
+
this.editing.set(true);
|
|
97
|
+
this.focusAfterRender("editor");
|
|
98
|
+
}
|
|
99
|
+
changeDraft(event) {
|
|
100
|
+
if (this.saving() || this.disabled()) return;
|
|
101
|
+
this.draft.set(event.target.value);
|
|
102
|
+
this.issue.set(null);
|
|
103
|
+
this.announcement.set("");
|
|
104
|
+
}
|
|
105
|
+
onKeydown(event) {
|
|
106
|
+
if (this.composing || event.isComposing || event.keyCode === 229) return;
|
|
107
|
+
if (event.key === "Enter") {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
if (!this.saving()) this.commit();
|
|
110
|
+
}
|
|
111
|
+
if (event.key === "Escape" && !this.saving()) {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
this.cancel();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
cancel() {
|
|
118
|
+
if (this.saving() || this.disabled()) return;
|
|
119
|
+
this.finish();
|
|
120
|
+
this.issue.set(null);
|
|
121
|
+
this.announcement.set("");
|
|
122
|
+
}
|
|
123
|
+
async commit() {
|
|
124
|
+
if (!this.editing() || this.saving() || this.disabled() || this.composing) return;
|
|
125
|
+
const candidate = this.draft();
|
|
126
|
+
const issue = vdEditableTextIssue(candidate, this.required(), this.limit());
|
|
127
|
+
this.issue.set(issue);
|
|
128
|
+
if (issue) {
|
|
129
|
+
this.announcement.set(this.feedback());
|
|
130
|
+
this.focusAfterRender("editor");
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const previous = this.value();
|
|
134
|
+
if (candidate === previous) {
|
|
135
|
+
this.finish();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
this.saving.set(true);
|
|
139
|
+
this.announcement.set(this.t().savingText);
|
|
140
|
+
try {
|
|
141
|
+
await this.save()?.(candidate);
|
|
142
|
+
if (this.destroyed) return;
|
|
143
|
+
if (this.value() === previous) this.value.set(candidate);
|
|
144
|
+
this.announcement.set(this.t().savedText);
|
|
145
|
+
this.finish();
|
|
146
|
+
} catch (error) {
|
|
147
|
+
if (this.destroyed) return;
|
|
148
|
+
this.issue.set("save");
|
|
149
|
+
this.announcement.set(this.t().saveErrorText);
|
|
150
|
+
this.saveFailed.emit(error);
|
|
151
|
+
} finally {
|
|
152
|
+
if (!this.destroyed) this.saving.set(false);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
finish() {
|
|
156
|
+
const hadFocus = this.host.contains(this.host.ownerDocument.activeElement);
|
|
157
|
+
this.editing.set(false);
|
|
158
|
+
if (hadFocus) this.focusAfterRender("trigger");
|
|
159
|
+
}
|
|
160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
161
|
+
minVersion: "12.0.0",
|
|
162
|
+
version: "22.2.1",
|
|
163
|
+
ngImport: i0,
|
|
164
|
+
type: VdEditableText,
|
|
165
|
+
deps: [],
|
|
166
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
167
|
+
});
|
|
168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
169
|
+
minVersion: "17.0.0",
|
|
170
|
+
version: "22.2.1",
|
|
171
|
+
type: VdEditableText,
|
|
172
|
+
isStandalone: true,
|
|
173
|
+
selector: "vd-editable-text",
|
|
174
|
+
inputs: {
|
|
175
|
+
value: {
|
|
176
|
+
classPropertyName: "value",
|
|
177
|
+
publicName: "value",
|
|
178
|
+
isSignal: true,
|
|
179
|
+
isRequired: false,
|
|
180
|
+
transformFunction: null
|
|
181
|
+
},
|
|
182
|
+
label: {
|
|
183
|
+
classPropertyName: "label",
|
|
184
|
+
publicName: "label",
|
|
185
|
+
isSignal: true,
|
|
186
|
+
isRequired: true,
|
|
187
|
+
transformFunction: null
|
|
188
|
+
},
|
|
189
|
+
save: {
|
|
190
|
+
classPropertyName: "save",
|
|
191
|
+
publicName: "save",
|
|
192
|
+
isSignal: true,
|
|
193
|
+
isRequired: false,
|
|
194
|
+
transformFunction: null
|
|
195
|
+
},
|
|
196
|
+
disabled: {
|
|
197
|
+
classPropertyName: "disabled",
|
|
198
|
+
publicName: "disabled",
|
|
199
|
+
isSignal: true,
|
|
200
|
+
isRequired: false,
|
|
201
|
+
transformFunction: null
|
|
202
|
+
},
|
|
203
|
+
required: {
|
|
204
|
+
classPropertyName: "required",
|
|
205
|
+
publicName: "required",
|
|
206
|
+
isSignal: true,
|
|
207
|
+
isRequired: false,
|
|
208
|
+
transformFunction: null
|
|
209
|
+
},
|
|
210
|
+
maxLength: {
|
|
211
|
+
classPropertyName: "maxLength",
|
|
212
|
+
publicName: "maxLength",
|
|
213
|
+
isSignal: true,
|
|
214
|
+
isRequired: false,
|
|
215
|
+
transformFunction: null
|
|
216
|
+
},
|
|
217
|
+
hint: {
|
|
218
|
+
classPropertyName: "hint",
|
|
219
|
+
publicName: "hint",
|
|
220
|
+
isSignal: true,
|
|
221
|
+
isRequired: false,
|
|
222
|
+
transformFunction: null
|
|
223
|
+
},
|
|
224
|
+
emptyText: {
|
|
225
|
+
classPropertyName: "emptyText",
|
|
226
|
+
publicName: "emptyText",
|
|
227
|
+
isSignal: true,
|
|
228
|
+
isRequired: false,
|
|
229
|
+
transformFunction: null
|
|
230
|
+
},
|
|
231
|
+
editLabel: {
|
|
232
|
+
classPropertyName: "editLabel",
|
|
233
|
+
publicName: "editLabel",
|
|
234
|
+
isSignal: true,
|
|
235
|
+
isRequired: false,
|
|
236
|
+
transformFunction: null
|
|
237
|
+
},
|
|
238
|
+
saveLabel: {
|
|
239
|
+
classPropertyName: "saveLabel",
|
|
240
|
+
publicName: "saveLabel",
|
|
241
|
+
isSignal: true,
|
|
242
|
+
isRequired: false,
|
|
243
|
+
transformFunction: null
|
|
244
|
+
},
|
|
245
|
+
cancelLabel: {
|
|
246
|
+
classPropertyName: "cancelLabel",
|
|
247
|
+
publicName: "cancelLabel",
|
|
248
|
+
isSignal: true,
|
|
249
|
+
isRequired: false,
|
|
250
|
+
transformFunction: null
|
|
251
|
+
},
|
|
252
|
+
savingText: {
|
|
253
|
+
classPropertyName: "savingText",
|
|
254
|
+
publicName: "savingText",
|
|
255
|
+
isSignal: true,
|
|
256
|
+
isRequired: false,
|
|
257
|
+
transformFunction: null
|
|
258
|
+
},
|
|
259
|
+
savedText: {
|
|
260
|
+
classPropertyName: "savedText",
|
|
261
|
+
publicName: "savedText",
|
|
262
|
+
isSignal: true,
|
|
263
|
+
isRequired: false,
|
|
264
|
+
transformFunction: null
|
|
265
|
+
},
|
|
266
|
+
saveErrorText: {
|
|
267
|
+
classPropertyName: "saveErrorText",
|
|
268
|
+
publicName: "saveErrorText",
|
|
269
|
+
isSignal: true,
|
|
270
|
+
isRequired: false,
|
|
271
|
+
transformFunction: null
|
|
272
|
+
},
|
|
273
|
+
requiredText: {
|
|
274
|
+
classPropertyName: "requiredText",
|
|
275
|
+
publicName: "requiredText",
|
|
276
|
+
isSignal: true,
|
|
277
|
+
isRequired: false,
|
|
278
|
+
transformFunction: null
|
|
279
|
+
},
|
|
280
|
+
tooLongText: {
|
|
281
|
+
classPropertyName: "tooLongText",
|
|
282
|
+
publicName: "tooLongText",
|
|
283
|
+
isSignal: true,
|
|
284
|
+
isRequired: false,
|
|
285
|
+
transformFunction: null
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
outputs: {
|
|
289
|
+
value: "valueChange",
|
|
290
|
+
saveFailed: "saveFailed"
|
|
291
|
+
},
|
|
292
|
+
host: {
|
|
293
|
+
properties: {
|
|
294
|
+
"attr.data-state": "editing() ? saving() ? \"saving\" : issue() ? \"error\" : \"editing\" : \"idle\"",
|
|
295
|
+
"attr.data-disabled": "disabled() ? \"\" : null"
|
|
296
|
+
},
|
|
297
|
+
classAttribute: "vd-editable-text"
|
|
298
|
+
},
|
|
299
|
+
viewQueries: [{
|
|
300
|
+
propertyName: "editor",
|
|
301
|
+
first: true,
|
|
302
|
+
predicate: ["editor"],
|
|
303
|
+
descendants: true,
|
|
304
|
+
read: ElementRef,
|
|
305
|
+
isSignal: true
|
|
306
|
+
}, {
|
|
307
|
+
propertyName: "trigger",
|
|
308
|
+
first: true,
|
|
309
|
+
predicate: ["trigger"],
|
|
310
|
+
descendants: true,
|
|
311
|
+
read: ElementRef,
|
|
312
|
+
isSignal: true
|
|
313
|
+
}],
|
|
314
|
+
ngImport: i0,
|
|
315
|
+
template: `
|
|
316
|
+
@if (editing()) {
|
|
317
|
+
<vd-field [label]="label()" [hint]="hint()" [error]="feedback() || undefined">
|
|
318
|
+
<input
|
|
319
|
+
#editor
|
|
320
|
+
vdInput
|
|
321
|
+
type="text"
|
|
322
|
+
[value]="draft()"
|
|
323
|
+
[required]="required()"
|
|
324
|
+
[attr.maxlength]="limit()"
|
|
325
|
+
[disabled]="disabled()"
|
|
326
|
+
[readOnly]="saving()"
|
|
327
|
+
[invalid]="!!issue()"
|
|
328
|
+
(input)="changeDraft($event)"
|
|
329
|
+
(keydown)="onKeydown($event)"
|
|
330
|
+
(compositionstart)="composing = true"
|
|
331
|
+
(compositionend)="composing = false"
|
|
332
|
+
/>
|
|
333
|
+
</vd-field>
|
|
334
|
+
<div class="vd-editable-text__actions">
|
|
335
|
+
<button
|
|
336
|
+
vdButton
|
|
337
|
+
variant="primary"
|
|
338
|
+
[disabled]="disabled()"
|
|
339
|
+
[loading]="saving()"
|
|
340
|
+
(click)="commit()"
|
|
341
|
+
>
|
|
342
|
+
{{ t().saveLabel }}
|
|
343
|
+
</button>
|
|
344
|
+
<button vdButton variant="ghost" [disabled]="disabled() || saving()" (click)="cancel()">
|
|
345
|
+
{{ t().cancelLabel }}
|
|
346
|
+
</button>
|
|
347
|
+
</div>
|
|
348
|
+
} @else {
|
|
349
|
+
<span class="vd-editable-text__label">{{ label() }}</span>
|
|
350
|
+
<button
|
|
351
|
+
#trigger
|
|
352
|
+
vdButton
|
|
353
|
+
variant="ghost"
|
|
354
|
+
class="vd-editable-text__trigger"
|
|
355
|
+
[disabled]="disabled()"
|
|
356
|
+
[attr.aria-label]="t().editLabel(label(), value() || t().emptyText)"
|
|
357
|
+
(click)="begin()"
|
|
358
|
+
>
|
|
359
|
+
<span class="vd-editable-text__value" [attr.data-empty]="value() ? null : ''">{{
|
|
360
|
+
value() || t().emptyText
|
|
361
|
+
}}</span>
|
|
362
|
+
<vd-icon name="pencil" slot="end" />
|
|
363
|
+
</button>
|
|
364
|
+
}
|
|
365
|
+
<span class="vd-visually-hidden" role="status" aria-atomic="true">{{ announcement() }}</span>
|
|
366
|
+
`,
|
|
367
|
+
isInline: true,
|
|
368
|
+
dependencies: [
|
|
369
|
+
{
|
|
370
|
+
kind: "component",
|
|
371
|
+
type: VdButton,
|
|
372
|
+
selector: "button[vdButton], a[vdButton]",
|
|
373
|
+
inputs: [
|
|
374
|
+
"variant",
|
|
375
|
+
"size",
|
|
376
|
+
"disabled",
|
|
377
|
+
"loading",
|
|
378
|
+
"iconOnly",
|
|
379
|
+
"type"
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
kind: "component",
|
|
384
|
+
type: VdField,
|
|
385
|
+
selector: "vd-field",
|
|
386
|
+
inputs: [
|
|
387
|
+
"label",
|
|
388
|
+
"hint",
|
|
389
|
+
"descriptionIds",
|
|
390
|
+
"error"
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
kind: "component",
|
|
395
|
+
type: VdIcon,
|
|
396
|
+
selector: "vd-icon",
|
|
397
|
+
inputs: ["name", "label"]
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
kind: "directive",
|
|
401
|
+
type: VdInput,
|
|
402
|
+
selector: "input[vdInput], textarea[vdInput]",
|
|
403
|
+
inputs: ["size"]
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
407
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
411
|
+
minVersion: "12.0.0",
|
|
412
|
+
version: "22.2.1",
|
|
413
|
+
ngImport: i0,
|
|
414
|
+
type: VdEditableText,
|
|
415
|
+
decorators: [{
|
|
416
|
+
type: Component,
|
|
417
|
+
args: [{
|
|
418
|
+
selector: "vd-editable-text",
|
|
419
|
+
imports: [
|
|
420
|
+
VdButton,
|
|
421
|
+
VdField,
|
|
422
|
+
VdIcon,
|
|
423
|
+
VdInput
|
|
424
|
+
],
|
|
425
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
426
|
+
encapsulation: ViewEncapsulation.None,
|
|
427
|
+
host: {
|
|
428
|
+
class: "vd-editable-text",
|
|
429
|
+
"[attr.data-state]": "editing() ? saving() ? \"saving\" : issue() ? \"error\" : \"editing\" : \"idle\"",
|
|
430
|
+
"[attr.data-disabled]": "disabled() ? \"\" : null"
|
|
431
|
+
},
|
|
432
|
+
template: `
|
|
433
|
+
@if (editing()) {
|
|
434
|
+
<vd-field [label]="label()" [hint]="hint()" [error]="feedback() || undefined">
|
|
435
|
+
<input
|
|
436
|
+
#editor
|
|
437
|
+
vdInput
|
|
438
|
+
type="text"
|
|
439
|
+
[value]="draft()"
|
|
440
|
+
[required]="required()"
|
|
441
|
+
[attr.maxlength]="limit()"
|
|
442
|
+
[disabled]="disabled()"
|
|
443
|
+
[readOnly]="saving()"
|
|
444
|
+
[invalid]="!!issue()"
|
|
445
|
+
(input)="changeDraft($event)"
|
|
446
|
+
(keydown)="onKeydown($event)"
|
|
447
|
+
(compositionstart)="composing = true"
|
|
448
|
+
(compositionend)="composing = false"
|
|
449
|
+
/>
|
|
450
|
+
</vd-field>
|
|
451
|
+
<div class="vd-editable-text__actions">
|
|
452
|
+
<button
|
|
453
|
+
vdButton
|
|
454
|
+
variant="primary"
|
|
455
|
+
[disabled]="disabled()"
|
|
456
|
+
[loading]="saving()"
|
|
457
|
+
(click)="commit()"
|
|
458
|
+
>
|
|
459
|
+
{{ t().saveLabel }}
|
|
460
|
+
</button>
|
|
461
|
+
<button vdButton variant="ghost" [disabled]="disabled() || saving()" (click)="cancel()">
|
|
462
|
+
{{ t().cancelLabel }}
|
|
463
|
+
</button>
|
|
464
|
+
</div>
|
|
465
|
+
} @else {
|
|
466
|
+
<span class="vd-editable-text__label">{{ label() }}</span>
|
|
467
|
+
<button
|
|
468
|
+
#trigger
|
|
469
|
+
vdButton
|
|
470
|
+
variant="ghost"
|
|
471
|
+
class="vd-editable-text__trigger"
|
|
472
|
+
[disabled]="disabled()"
|
|
473
|
+
[attr.aria-label]="t().editLabel(label(), value() || t().emptyText)"
|
|
474
|
+
(click)="begin()"
|
|
475
|
+
>
|
|
476
|
+
<span class="vd-editable-text__value" [attr.data-empty]="value() ? null : ''">{{
|
|
477
|
+
value() || t().emptyText
|
|
478
|
+
}}</span>
|
|
479
|
+
<vd-icon name="pencil" slot="end" />
|
|
480
|
+
</button>
|
|
481
|
+
}
|
|
482
|
+
<span class="vd-visually-hidden" role="status" aria-atomic="true">{{ announcement() }}</span>
|
|
483
|
+
`
|
|
484
|
+
}]
|
|
485
|
+
}],
|
|
486
|
+
ctorParameters: () => [],
|
|
487
|
+
propDecorators: {
|
|
488
|
+
value: [{
|
|
489
|
+
type: i0.Input,
|
|
490
|
+
args: [{
|
|
491
|
+
isSignal: true,
|
|
492
|
+
alias: "value",
|
|
493
|
+
required: false
|
|
494
|
+
}]
|
|
495
|
+
}, {
|
|
496
|
+
type: i0.Output,
|
|
497
|
+
args: ["valueChange"]
|
|
498
|
+
}],
|
|
499
|
+
label: [{
|
|
500
|
+
type: i0.Input,
|
|
501
|
+
args: [{
|
|
502
|
+
isSignal: true,
|
|
503
|
+
alias: "label",
|
|
504
|
+
required: true
|
|
505
|
+
}]
|
|
506
|
+
}],
|
|
507
|
+
save: [{
|
|
508
|
+
type: i0.Input,
|
|
509
|
+
args: [{
|
|
510
|
+
isSignal: true,
|
|
511
|
+
alias: "save",
|
|
512
|
+
required: false
|
|
513
|
+
}]
|
|
514
|
+
}],
|
|
515
|
+
disabled: [{
|
|
516
|
+
type: i0.Input,
|
|
517
|
+
args: [{
|
|
518
|
+
isSignal: true,
|
|
519
|
+
alias: "disabled",
|
|
520
|
+
required: false
|
|
521
|
+
}]
|
|
522
|
+
}],
|
|
523
|
+
required: [{
|
|
524
|
+
type: i0.Input,
|
|
525
|
+
args: [{
|
|
526
|
+
isSignal: true,
|
|
527
|
+
alias: "required",
|
|
528
|
+
required: false
|
|
529
|
+
}]
|
|
530
|
+
}],
|
|
531
|
+
maxLength: [{
|
|
532
|
+
type: i0.Input,
|
|
533
|
+
args: [{
|
|
534
|
+
isSignal: true,
|
|
535
|
+
alias: "maxLength",
|
|
536
|
+
required: false
|
|
537
|
+
}]
|
|
538
|
+
}],
|
|
539
|
+
hint: [{
|
|
540
|
+
type: i0.Input,
|
|
541
|
+
args: [{
|
|
542
|
+
isSignal: true,
|
|
543
|
+
alias: "hint",
|
|
544
|
+
required: false
|
|
545
|
+
}]
|
|
546
|
+
}],
|
|
547
|
+
emptyText: [{
|
|
548
|
+
type: i0.Input,
|
|
549
|
+
args: [{
|
|
550
|
+
isSignal: true,
|
|
551
|
+
alias: "emptyText",
|
|
552
|
+
required: false
|
|
553
|
+
}]
|
|
554
|
+
}],
|
|
555
|
+
editLabel: [{
|
|
556
|
+
type: i0.Input,
|
|
557
|
+
args: [{
|
|
558
|
+
isSignal: true,
|
|
559
|
+
alias: "editLabel",
|
|
560
|
+
required: false
|
|
561
|
+
}]
|
|
562
|
+
}],
|
|
563
|
+
saveLabel: [{
|
|
564
|
+
type: i0.Input,
|
|
565
|
+
args: [{
|
|
566
|
+
isSignal: true,
|
|
567
|
+
alias: "saveLabel",
|
|
568
|
+
required: false
|
|
569
|
+
}]
|
|
570
|
+
}],
|
|
571
|
+
cancelLabel: [{
|
|
572
|
+
type: i0.Input,
|
|
573
|
+
args: [{
|
|
574
|
+
isSignal: true,
|
|
575
|
+
alias: "cancelLabel",
|
|
576
|
+
required: false
|
|
577
|
+
}]
|
|
578
|
+
}],
|
|
579
|
+
savingText: [{
|
|
580
|
+
type: i0.Input,
|
|
581
|
+
args: [{
|
|
582
|
+
isSignal: true,
|
|
583
|
+
alias: "savingText",
|
|
584
|
+
required: false
|
|
585
|
+
}]
|
|
586
|
+
}],
|
|
587
|
+
savedText: [{
|
|
588
|
+
type: i0.Input,
|
|
589
|
+
args: [{
|
|
590
|
+
isSignal: true,
|
|
591
|
+
alias: "savedText",
|
|
592
|
+
required: false
|
|
593
|
+
}]
|
|
594
|
+
}],
|
|
595
|
+
saveErrorText: [{
|
|
596
|
+
type: i0.Input,
|
|
597
|
+
args: [{
|
|
598
|
+
isSignal: true,
|
|
599
|
+
alias: "saveErrorText",
|
|
600
|
+
required: false
|
|
601
|
+
}]
|
|
602
|
+
}],
|
|
603
|
+
requiredText: [{
|
|
604
|
+
type: i0.Input,
|
|
605
|
+
args: [{
|
|
606
|
+
isSignal: true,
|
|
607
|
+
alias: "requiredText",
|
|
608
|
+
required: false
|
|
609
|
+
}]
|
|
610
|
+
}],
|
|
611
|
+
tooLongText: [{
|
|
612
|
+
type: i0.Input,
|
|
613
|
+
args: [{
|
|
614
|
+
isSignal: true,
|
|
615
|
+
alias: "tooLongText",
|
|
616
|
+
required: false
|
|
617
|
+
}]
|
|
618
|
+
}],
|
|
619
|
+
saveFailed: [{
|
|
620
|
+
type: i0.Output,
|
|
621
|
+
args: ["saveFailed"]
|
|
622
|
+
}],
|
|
623
|
+
editor: [{
|
|
624
|
+
type: i0.ViewChild,
|
|
625
|
+
args: ["editor", {
|
|
626
|
+
read: ElementRef,
|
|
627
|
+
isSignal: true
|
|
628
|
+
}]
|
|
629
|
+
}],
|
|
630
|
+
trigger: [{
|
|
631
|
+
type: i0.ViewChild,
|
|
632
|
+
args: ["trigger", {
|
|
633
|
+
read: ElementRef,
|
|
634
|
+
isSignal: true
|
|
635
|
+
}]
|
|
636
|
+
}]
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
export { VdEditableText };
|
|
640
|
+
|
|
641
|
+
//# sourceMappingURL=vadem-ui-editable-text.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-editable-text.mjs","names":[],"sources":["../../../projects/ui/editable-text/src/core/editable-text.ts","../../../projects/ui/editable-text/src/editable-text.ts"],"sourcesContent":["/** Native maxlength counts UTF-16 units; malformed limits add no constraint. */\nexport function vdEditableTextLimit(value: number | null): number | null {\n return value !== null && Number.isFinite(value) && value >= 0 ? Math.floor(value) : null;\n}\n\nexport function vdEditableTextIssue(\n value: string,\n required: boolean,\n limit: number | null,\n): 'required' | 'tooLong' | null {\n if (required && !value.trim()) return 'required';\n if (limit !== null && value.length > limit) return 'tooLong';\n return null;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n Injector,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { VdButton } from '@vadem/ui/button';\nimport { VdField } from '@vadem/ui/field';\nimport { VdIcon } from '@vadem/ui/icon';\nimport { VdInput } from '@vadem/ui/input';\nimport { vdTexts } from '@vadem/ui/locale';\nimport { vdEditableTextIssue, vdEditableTextLimit } from './core/editable-text';\n\nexport type VdEditableTextSave = (value: string) => void | Promise<void>;\n\n/** A committed value with a separate draft and explicit application-owned persistence. */\n@Component({\n selector: 'vd-editable-text',\n imports: [VdButton, VdField, VdIcon, VdInput],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'vd-editable-text',\n '[attr.data-state]': 'editing() ? saving() ? \"saving\" : issue() ? \"error\" : \"editing\" : \"idle\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n },\n template: `\n @if (editing()) {\n <vd-field [label]=\"label()\" [hint]=\"hint()\" [error]=\"feedback() || undefined\">\n <input\n #editor\n vdInput\n type=\"text\"\n [value]=\"draft()\"\n [required]=\"required()\"\n [attr.maxlength]=\"limit()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"saving()\"\n [invalid]=\"!!issue()\"\n (input)=\"changeDraft($event)\"\n (keydown)=\"onKeydown($event)\"\n (compositionstart)=\"composing = true\"\n (compositionend)=\"composing = false\"\n />\n </vd-field>\n <div class=\"vd-editable-text__actions\">\n <button\n vdButton\n variant=\"primary\"\n [disabled]=\"disabled()\"\n [loading]=\"saving()\"\n (click)=\"commit()\"\n >\n {{ t().saveLabel }}\n </button>\n <button vdButton variant=\"ghost\" [disabled]=\"disabled() || saving()\" (click)=\"cancel()\">\n {{ t().cancelLabel }}\n </button>\n </div>\n } @else {\n <span class=\"vd-editable-text__label\">{{ label() }}</span>\n <button\n #trigger\n vdButton\n variant=\"ghost\"\n class=\"vd-editable-text__trigger\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"t().editLabel(label(), value() || t().emptyText)\"\n (click)=\"begin()\"\n >\n <span class=\"vd-editable-text__value\" [attr.data-empty]=\"value() ? null : ''\">{{\n value() || t().emptyText\n }}</span>\n <vd-icon name=\"pencil\" slot=\"end\" />\n </button>\n }\n <span class=\"vd-visually-hidden\" role=\"status\" aria-atomic=\"true\">{{ announcement() }}</span>\n `,\n})\nexport class VdEditableText {\n readonly value = model('');\n readonly label = input.required<string>();\n readonly save = input<VdEditableTextSave>();\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly maxLength = input<number | null>(null);\n readonly hint = input<string>();\n readonly emptyText = input<string>();\n readonly editLabel = input<(label: string, value: string) => string>();\n readonly saveLabel = input<string>();\n readonly cancelLabel = input<string>();\n readonly savingText = input<string>();\n readonly savedText = input<string>();\n readonly saveErrorText = input<string>();\n readonly requiredText = input<string>();\n readonly tooLongText = input<(limit: number) => string>();\n readonly saveFailed = output<unknown>();\n protected readonly t = vdTexts('editableText', {\n emptyText: this.emptyText,\n editLabel: this.editLabel,\n saveLabel: this.saveLabel,\n cancelLabel: this.cancelLabel,\n savingText: this.savingText,\n savedText: this.savedText,\n saveErrorText: this.saveErrorText,\n requiredText: this.requiredText,\n tooLongText: this.tooLongText,\n });\n protected readonly editing = signal(false);\n protected readonly saving = signal(false);\n protected readonly draft = signal('');\n protected readonly issue = signal<'required' | 'tooLong' | 'save' | null>(null);\n protected readonly limit = computed(() => vdEditableTextLimit(this.maxLength()));\n protected readonly feedback = computed(() => {\n const text = this.t();\n switch (this.issue()) {\n case 'required':\n return text.requiredText;\n case 'tooLong':\n return text.tooLongText(this.limit() ?? 0);\n case 'save':\n return text.saveErrorText;\n default:\n return '';\n }\n });\n protected readonly announcement = signal('');\n protected composing = false;\n private readonly host: HTMLElement = inject(ElementRef).nativeElement;\n private readonly editor = viewChild('editor', { read: ElementRef });\n private readonly trigger = viewChild('trigger', {\n read: ElementRef,\n });\n private readonly injector = inject(Injector);\n private destroyed = false;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n });\n }\n\n private focusAfterRender(target: 'editor' | 'trigger'): void {\n afterNextRender(\n () => {\n const element =\n target === 'editor' ? this.editor()?.nativeElement : this.trigger()?.nativeElement;\n element?.focus();\n if (target === 'editor') (element as HTMLInputElement | undefined)?.select();\n },\n { injector: this.injector },\n );\n }\n\n protected begin(): void {\n if (this.disabled() || this.editing()) return;\n this.draft.set(this.value());\n this.issue.set(null);\n this.announcement.set('');\n this.composing = false;\n this.editing.set(true);\n this.focusAfterRender('editor');\n }\n\n protected changeDraft(event: Event): void {\n if (this.saving() || this.disabled()) return;\n this.draft.set((event.target as HTMLInputElement).value);\n this.issue.set(null);\n this.announcement.set('');\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.composing || event.isComposing || event.keyCode === 229) return;\n if (event.key === 'Enter') {\n event.preventDefault();\n if (!this.saving()) void this.commit();\n }\n if (event.key === 'Escape' && !this.saving()) {\n event.preventDefault();\n event.stopPropagation();\n this.cancel();\n }\n }\n\n protected cancel(): void {\n if (this.saving() || this.disabled()) return;\n this.finish();\n this.issue.set(null);\n this.announcement.set('');\n }\n\n protected async commit(): Promise<void> {\n if (!this.editing() || this.saving() || this.disabled() || this.composing) return;\n const candidate = this.draft();\n const issue = vdEditableTextIssue(candidate, this.required(), this.limit());\n this.issue.set(issue);\n if (issue) {\n this.announcement.set(this.feedback());\n this.focusAfterRender('editor');\n return;\n }\n const previous = this.value();\n if (candidate === previous) {\n this.finish();\n return;\n }\n this.saving.set(true);\n this.announcement.set(this.t().savingText);\n try {\n await this.save()?.(candidate);\n if (this.destroyed) return;\n if (this.value() === previous) this.value.set(candidate);\n this.announcement.set(this.t().savedText);\n this.finish();\n } catch (error: unknown) {\n if (this.destroyed) return;\n this.issue.set('save');\n this.announcement.set(this.t().saveErrorText);\n this.saveFailed.emit(error);\n } finally {\n if (!this.destroyed) this.saving.set(false);\n }\n }\n\n private finish(): void {\n const hadFocus = this.host.contains(this.host.ownerDocument.activeElement);\n this.editing.set(false);\n if (hadFocus) this.focusAfterRender('trigger');\n }\n}\n"],"mappings":";;;;;;;AACA,SAAgB,oBAAoB,OAAoB;CACtD,OAAO,UAAU,QAAQ,O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