@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,601 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, ViewEncapsulation, afterRenderEffect, booleanAttribute, computed, effect, inject, input, model, output, signal } from "@angular/core";
|
|
3
|
+
import { VdButton } from "@vadem/ui/button";
|
|
4
|
+
import { vdUniqueId } from "@vadem/ui/field";
|
|
5
|
+
import { VdIcon } from "@vadem/ui/icon";
|
|
6
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
7
|
+
function vdReorderValid(items) {
|
|
8
|
+
const ids = /* @__PURE__ */ new Set();
|
|
9
|
+
for (const item of items) {
|
|
10
|
+
if (typeof item.id !== "string" || !item.id.trim() || ids.has(item.id)) return false;
|
|
11
|
+
ids.add(item.id);
|
|
12
|
+
}
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
function vdReorderMove(items, from, to) {
|
|
16
|
+
if (!Number.isInteger(from) || !Number.isInteger(to) || from < 0 || to < 0 || from >= items.length || to >= items.length || from === to) return items;
|
|
17
|
+
const next = [...items];
|
|
18
|
+
const [item] = next.splice(from, 1);
|
|
19
|
+
next.splice(to, 0, item);
|
|
20
|
+
return next;
|
|
21
|
+
}
|
|
22
|
+
function vdReorderTarget(y, rows) {
|
|
23
|
+
if (!Number.isFinite(y) || !rows.length) return -1;
|
|
24
|
+
const index = rows.findIndex((row) => y < row.bottom);
|
|
25
|
+
return index < 0 ? rows.length - 1 : index;
|
|
26
|
+
}
|
|
27
|
+
var VdReorderList = class VdReorderList {
|
|
28
|
+
items = model([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
29
|
+
disabled = input(false, {
|
|
30
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
31
|
+
transform: booleanAttribute
|
|
32
|
+
});
|
|
33
|
+
label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
|
|
34
|
+
instructions = input(...ngDevMode ? [void 0, { debugName: "instructions" }] : /* istanbul ignore next */ []);
|
|
35
|
+
upText = input(...ngDevMode ? [void 0, { debugName: "upText" }] : /* istanbul ignore next */ []);
|
|
36
|
+
downText = input(...ngDevMode ? [void 0, { debugName: "downText" }] : /* istanbul ignore next */ []);
|
|
37
|
+
emptyText = input(...ngDevMode ? [void 0, { debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
38
|
+
invalidText = input(...ngDevMode ? [void 0, { debugName: "invalidText" }] : /* istanbul ignore next */ []);
|
|
39
|
+
movedText = input(...ngDevMode ? [void 0, { debugName: "movedText" }] : /* istanbul ignore next */ []);
|
|
40
|
+
canceledText = input(...ngDevMode ? [void 0, { debugName: "canceledText" }] : /* istanbul ignore next */ []);
|
|
41
|
+
reordered = output();
|
|
42
|
+
t = vdTexts("reorderList", {
|
|
43
|
+
label: this.label,
|
|
44
|
+
instructions: this.instructions,
|
|
45
|
+
upText: this.upText,
|
|
46
|
+
downText: this.downText,
|
|
47
|
+
emptyText: this.emptyText,
|
|
48
|
+
invalidText: this.invalidText,
|
|
49
|
+
movedText: this.movedText,
|
|
50
|
+
canceledText: this.canceledText
|
|
51
|
+
});
|
|
52
|
+
valid = computed(() => vdReorderValid(this.items()), ...ngDevMode ? [{ debugName: "valid" }] : /* istanbul ignore next */ []);
|
|
53
|
+
instructionsId = vdUniqueId("vd-reorder-instructions");
|
|
54
|
+
draggingId = signal(null, ...ngDevMode ? [{ debugName: "draggingId" }] : /* istanbul ignore next */ []);
|
|
55
|
+
drop = signal(null, ...ngDevMode ? [{ debugName: "drop" }] : /* istanbul ignore next */ []);
|
|
56
|
+
messages = signal([], ...ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []);
|
|
57
|
+
host = inject(ElementRef).nativeElement;
|
|
58
|
+
drag = null;
|
|
59
|
+
focus = null;
|
|
60
|
+
serial = 0;
|
|
61
|
+
constructor() {
|
|
62
|
+
effect(() => {
|
|
63
|
+
const items = this.items(), disabled = this.disabled(), valid = this.valid();
|
|
64
|
+
if (this.drag && (disabled || !valid || items !== this.drag.items)) this.finish(true);
|
|
65
|
+
const active = this.host.ownerDocument.activeElement;
|
|
66
|
+
const row = active && this.host.contains(active) ? active.closest("[data-reorder-id]") : null;
|
|
67
|
+
this.focus = row && active ? {
|
|
68
|
+
element: active,
|
|
69
|
+
id: row.dataset["reorderId"],
|
|
70
|
+
index: Number(row.dataset["index"]),
|
|
71
|
+
action: active.dataset["action"]
|
|
72
|
+
} : null;
|
|
73
|
+
});
|
|
74
|
+
afterRenderEffect(() => {
|
|
75
|
+
this.items();
|
|
76
|
+
this.disabled();
|
|
77
|
+
this.valid();
|
|
78
|
+
const focus = this.focus;
|
|
79
|
+
this.focus = null;
|
|
80
|
+
if (!focus) return;
|
|
81
|
+
const active = this.host.ownerDocument.activeElement;
|
|
82
|
+
if (active === focus.element && !focus.element.matches(":disabled")) {
|
|
83
|
+
if (focus.action) focus.element.scrollIntoView({
|
|
84
|
+
block: "nearest",
|
|
85
|
+
inline: "nearest",
|
|
86
|
+
behavior: "instant"
|
|
87
|
+
});
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (active && active !== this.host.ownerDocument.body && active !== focus.element) return;
|
|
91
|
+
const rows = this.rows();
|
|
92
|
+
const row = rows.find((row) => row.dataset["reorderId"] === focus.id) ?? rows[Math.min(focus.index, rows.length - 1)];
|
|
93
|
+
const buttons = row ? Array.from(row.querySelectorAll("button:not(:disabled)")) : [];
|
|
94
|
+
const target = (focus.action ? buttons.find((button) => button.dataset["action"] === focus.action) ?? buttons[0] : null) ?? (this.disabled() ? null : row) ?? this.list();
|
|
95
|
+
target?.focus({ preventScroll: true });
|
|
96
|
+
if (focus.action) target?.scrollIntoView({
|
|
97
|
+
block: "nearest",
|
|
98
|
+
inline: "nearest",
|
|
99
|
+
behavior: "instant"
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
inject(DestroyRef).onDestroy(() => this.finish(false));
|
|
103
|
+
}
|
|
104
|
+
move(id, delta) {
|
|
105
|
+
if (this.disabled() || !this.valid() || this.drag) return;
|
|
106
|
+
const from = this.items().findIndex((item) => item.id === id);
|
|
107
|
+
this.commit(from, from + delta, "buttons");
|
|
108
|
+
}
|
|
109
|
+
commit(from, to, method) {
|
|
110
|
+
const items = this.items(), next = vdReorderMove(items, from, to);
|
|
111
|
+
if (next === items) return;
|
|
112
|
+
const item = items[from];
|
|
113
|
+
this.items.set(next);
|
|
114
|
+
this.announce(this.t().movedText(item.label, to + 1, items.length));
|
|
115
|
+
this.reordered.emit({
|
|
116
|
+
id: item.id,
|
|
117
|
+
fromIndex: from,
|
|
118
|
+
toIndex: to,
|
|
119
|
+
method
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
start(event, id) {
|
|
123
|
+
if (!event.isPrimary || event.button !== 0 || this.disabled() || !this.valid() || this.items().length < 2 || this.drag) return;
|
|
124
|
+
const handle = event.currentTarget;
|
|
125
|
+
if (typeof handle.setPointerCapture !== "function") return;
|
|
126
|
+
try {
|
|
127
|
+
handle.setPointerCapture(event.pointerId);
|
|
128
|
+
} catch {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
const row = handle.closest("[data-reorder-id]");
|
|
133
|
+
if (row && !row.contains(this.host.ownerDocument.activeElement)) row.focus({ preventScroll: true });
|
|
134
|
+
const from = this.items().findIndex((item) => item.id === id);
|
|
135
|
+
this.drag = {
|
|
136
|
+
pointer: event.pointerId,
|
|
137
|
+
handle,
|
|
138
|
+
items: this.items(),
|
|
139
|
+
id,
|
|
140
|
+
from,
|
|
141
|
+
x: event.clientX,
|
|
142
|
+
y: event.clientY,
|
|
143
|
+
active: false,
|
|
144
|
+
to: from
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
pointerMove(event) {
|
|
148
|
+
const drag = this.drag;
|
|
149
|
+
if (!drag || drag.pointer !== event.pointerId) return;
|
|
150
|
+
if (event.buttons === 0 || this.disabled() || this.items() !== drag.items) {
|
|
151
|
+
this.finish(true);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (!drag.active && Math.hypot(event.clientX - drag.x, event.clientY - drag.y) < 4) return;
|
|
155
|
+
drag.active = true;
|
|
156
|
+
this.draggingId.set(drag.id);
|
|
157
|
+
drag.to = this.target(event.clientX, event.clientY);
|
|
158
|
+
this.drop.set(drag.to < 0 || drag.to === drag.from ? null : {
|
|
159
|
+
id: drag.items[drag.to].id,
|
|
160
|
+
edge: drag.to > drag.from ? "after" : "before"
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
end(event) {
|
|
164
|
+
const drag = this.drag;
|
|
165
|
+
if (!drag || drag.pointer !== event.pointerId) return;
|
|
166
|
+
const to = this.target(event.clientX, event.clientY);
|
|
167
|
+
const commit = drag.active && to >= 0 && !this.disabled() && this.items() === drag.items;
|
|
168
|
+
this.finish(!commit);
|
|
169
|
+
if (commit) this.commit(drag.from, to, "pointer");
|
|
170
|
+
}
|
|
171
|
+
pointerCancel(event) {
|
|
172
|
+
if (event.pointerId === this.drag?.pointer) this.finish(true);
|
|
173
|
+
}
|
|
174
|
+
key(event) {
|
|
175
|
+
if (!this.drag || event.isComposing || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
176
|
+
if (event.key === "Escape" || event.key === "Tab") {
|
|
177
|
+
if (event.key === "Escape") {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
event.stopPropagation();
|
|
180
|
+
}
|
|
181
|
+
this.finish(true);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
target(x, y) {
|
|
185
|
+
const list = this.list();
|
|
186
|
+
if (!list) return -1;
|
|
187
|
+
const rect = list.getBoundingClientRect();
|
|
188
|
+
if (x < rect.left || x > rect.right || y < rect.top || y > rect.bottom) return -1;
|
|
189
|
+
return vdReorderTarget(y, this.rows().map((row) => row.getBoundingClientRect()));
|
|
190
|
+
}
|
|
191
|
+
finish(announce) {
|
|
192
|
+
const drag = this.drag;
|
|
193
|
+
this.drag = null;
|
|
194
|
+
this.draggingId.set(null);
|
|
195
|
+
this.drop.set(null);
|
|
196
|
+
if (!drag) return;
|
|
197
|
+
if (drag.handle.hasPointerCapture?.(drag.pointer)) drag.handle.releasePointerCapture(drag.pointer);
|
|
198
|
+
if (announce && drag.active) this.announce(this.t().canceledText(drag.items[drag.from].label));
|
|
199
|
+
}
|
|
200
|
+
announce(text) {
|
|
201
|
+
this.messages.set([{
|
|
202
|
+
serial: ++this.serial,
|
|
203
|
+
text
|
|
204
|
+
}]);
|
|
205
|
+
}
|
|
206
|
+
list() {
|
|
207
|
+
return this.host.querySelector("ol");
|
|
208
|
+
}
|
|
209
|
+
rows() {
|
|
210
|
+
return Array.from(this.host.querySelectorAll("[data-reorder-id]"));
|
|
211
|
+
}
|
|
212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
213
|
+
minVersion: "12.0.0",
|
|
214
|
+
version: "22.2.1",
|
|
215
|
+
ngImport: i0,
|
|
216
|
+
type: VdReorderList,
|
|
217
|
+
deps: [],
|
|
218
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
219
|
+
});
|
|
220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
221
|
+
minVersion: "17.0.0",
|
|
222
|
+
version: "22.2.1",
|
|
223
|
+
type: VdReorderList,
|
|
224
|
+
isStandalone: true,
|
|
225
|
+
selector: "vd-reorder-list",
|
|
226
|
+
inputs: {
|
|
227
|
+
items: {
|
|
228
|
+
classPropertyName: "items",
|
|
229
|
+
publicName: "items",
|
|
230
|
+
isSignal: true,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
},
|
|
234
|
+
disabled: {
|
|
235
|
+
classPropertyName: "disabled",
|
|
236
|
+
publicName: "disabled",
|
|
237
|
+
isSignal: true,
|
|
238
|
+
isRequired: false,
|
|
239
|
+
transformFunction: null
|
|
240
|
+
},
|
|
241
|
+
label: {
|
|
242
|
+
classPropertyName: "label",
|
|
243
|
+
publicName: "label",
|
|
244
|
+
isSignal: true,
|
|
245
|
+
isRequired: false,
|
|
246
|
+
transformFunction: null
|
|
247
|
+
},
|
|
248
|
+
instructions: {
|
|
249
|
+
classPropertyName: "instructions",
|
|
250
|
+
publicName: "instructions",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
},
|
|
255
|
+
upText: {
|
|
256
|
+
classPropertyName: "upText",
|
|
257
|
+
publicName: "upText",
|
|
258
|
+
isSignal: true,
|
|
259
|
+
isRequired: false,
|
|
260
|
+
transformFunction: null
|
|
261
|
+
},
|
|
262
|
+
downText: {
|
|
263
|
+
classPropertyName: "downText",
|
|
264
|
+
publicName: "downText",
|
|
265
|
+
isSignal: true,
|
|
266
|
+
isRequired: false,
|
|
267
|
+
transformFunction: null
|
|
268
|
+
},
|
|
269
|
+
emptyText: {
|
|
270
|
+
classPropertyName: "emptyText",
|
|
271
|
+
publicName: "emptyText",
|
|
272
|
+
isSignal: true,
|
|
273
|
+
isRequired: false,
|
|
274
|
+
transformFunction: null
|
|
275
|
+
},
|
|
276
|
+
invalidText: {
|
|
277
|
+
classPropertyName: "invalidText",
|
|
278
|
+
publicName: "invalidText",
|
|
279
|
+
isSignal: true,
|
|
280
|
+
isRequired: false,
|
|
281
|
+
transformFunction: null
|
|
282
|
+
},
|
|
283
|
+
movedText: {
|
|
284
|
+
classPropertyName: "movedText",
|
|
285
|
+
publicName: "movedText",
|
|
286
|
+
isSignal: true,
|
|
287
|
+
isRequired: false,
|
|
288
|
+
transformFunction: null
|
|
289
|
+
},
|
|
290
|
+
canceledText: {
|
|
291
|
+
classPropertyName: "canceledText",
|
|
292
|
+
publicName: "canceledText",
|
|
293
|
+
isSignal: true,
|
|
294
|
+
isRequired: false,
|
|
295
|
+
transformFunction: null
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
outputs: {
|
|
299
|
+
items: "itemsChange",
|
|
300
|
+
reordered: "reordered"
|
|
301
|
+
},
|
|
302
|
+
host: {
|
|
303
|
+
listeners: { "keydown": "key($event)" },
|
|
304
|
+
properties: { "attr.data-state": "!valid() ? \"invalid\" : !items().length ? \"empty\" : disabled() ? \"disabled\" : draggingId() ? \"dragging\" : \"idle\"" },
|
|
305
|
+
classAttribute: "vd-reorder-list"
|
|
306
|
+
},
|
|
307
|
+
ngImport: i0,
|
|
308
|
+
template: `
|
|
309
|
+
<p class="vd-visually-hidden" [id]="instructionsId">{{ t().instructions }}</p>
|
|
310
|
+
<ol
|
|
311
|
+
class="vd-reorder-list__list"
|
|
312
|
+
role="list"
|
|
313
|
+
tabindex="-1"
|
|
314
|
+
[attr.aria-label]="t().label"
|
|
315
|
+
[attr.aria-describedby]="instructionsId"
|
|
316
|
+
>
|
|
317
|
+
@if (!valid()) {
|
|
318
|
+
<li class="vd-reorder-list__empty">{{ t().invalidText }}</li>
|
|
319
|
+
} @else {
|
|
320
|
+
@for (item of items(); track item.id; let index = $index) {
|
|
321
|
+
<li
|
|
322
|
+
class="vd-reorder-list__item"
|
|
323
|
+
tabindex="-1"
|
|
324
|
+
[attr.data-reorder-id]="item.id"
|
|
325
|
+
[attr.data-index]="index"
|
|
326
|
+
[attr.data-dragging]="draggingId() === item.id ? '' : null"
|
|
327
|
+
[attr.data-drop]="drop()?.id === item.id ? drop()?.edge : null"
|
|
328
|
+
>
|
|
329
|
+
<span
|
|
330
|
+
class="vd-reorder-list__grip"
|
|
331
|
+
[attr.data-disabled]="disabled() || items().length < 2 ? '' : null"
|
|
332
|
+
aria-hidden="true"
|
|
333
|
+
(pointerdown)="start($event, item.id)"
|
|
334
|
+
(pointermove)="pointerMove($event)"
|
|
335
|
+
(pointerup)="end($event)"
|
|
336
|
+
(pointercancel)="pointerCancel($event)"
|
|
337
|
+
(lostpointercapture)="pointerCancel($event)"
|
|
338
|
+
><vd-icon name="arrow-up-down"
|
|
339
|
+
/></span>
|
|
340
|
+
<div class="vd-reorder-list__body">
|
|
341
|
+
<div class="vd-reorder-list__title">
|
|
342
|
+
<span class="vd-reorder-list__position" aria-hidden="true">{{ index + 1 }}</span
|
|
343
|
+
><bdi>{{ item.label }}</bdi>
|
|
344
|
+
</div>
|
|
345
|
+
@if (item.description) {
|
|
346
|
+
<p class="vd-reorder-list__description">{{ item.description }}</p>
|
|
347
|
+
}
|
|
348
|
+
</div>
|
|
349
|
+
<div class="vd-reorder-list__actions">
|
|
350
|
+
<button
|
|
351
|
+
vdButton
|
|
352
|
+
variant="ghost"
|
|
353
|
+
size="sm"
|
|
354
|
+
type="button"
|
|
355
|
+
data-action="up"
|
|
356
|
+
[disabled]="disabled() || index === 0"
|
|
357
|
+
[attr.aria-label]="t().upText + ': ' + item.label"
|
|
358
|
+
(click)="move(item.id, -1)"
|
|
359
|
+
>
|
|
360
|
+
<vd-icon name="arrow-up" slot="start" />{{ t().upText }}
|
|
361
|
+
</button>
|
|
362
|
+
<button
|
|
363
|
+
vdButton
|
|
364
|
+
variant="ghost"
|
|
365
|
+
size="sm"
|
|
366
|
+
type="button"
|
|
367
|
+
data-action="down"
|
|
368
|
+
[disabled]="disabled() || index === items().length - 1"
|
|
369
|
+
[attr.aria-label]="t().downText + ': ' + item.label"
|
|
370
|
+
(click)="move(item.id, 1)"
|
|
371
|
+
>
|
|
372
|
+
<vd-icon name="arrow-down" slot="start" />{{ t().downText }}
|
|
373
|
+
</button>
|
|
374
|
+
</div>
|
|
375
|
+
</li>
|
|
376
|
+
} @empty {
|
|
377
|
+
<li class="vd-reorder-list__empty">{{ t().emptyText }}</li>
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
</ol>
|
|
381
|
+
<p class="vd-visually-hidden" role="status" aria-atomic="true">
|
|
382
|
+
@for (message of messages(); track message.serial) {
|
|
383
|
+
<span>{{ message.text }}</span>
|
|
384
|
+
}
|
|
385
|
+
</p>
|
|
386
|
+
`,
|
|
387
|
+
isInline: true,
|
|
388
|
+
dependencies: [{
|
|
389
|
+
kind: "component",
|
|
390
|
+
type: VdButton,
|
|
391
|
+
selector: "button[vdButton], a[vdButton]",
|
|
392
|
+
inputs: [
|
|
393
|
+
"variant",
|
|
394
|
+
"size",
|
|
395
|
+
"disabled",
|
|
396
|
+
"loading",
|
|
397
|
+
"iconOnly",
|
|
398
|
+
"type"
|
|
399
|
+
]
|
|
400
|
+
}, {
|
|
401
|
+
kind: "component",
|
|
402
|
+
type: VdIcon,
|
|
403
|
+
selector: "vd-icon",
|
|
404
|
+
inputs: ["name", "label"]
|
|
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: VdReorderList,
|
|
415
|
+
decorators: [{
|
|
416
|
+
type: Component,
|
|
417
|
+
args: [{
|
|
418
|
+
selector: "vd-reorder-list",
|
|
419
|
+
imports: [VdButton, VdIcon],
|
|
420
|
+
template: `
|
|
421
|
+
<p class="vd-visually-hidden" [id]="instructionsId">{{ t().instructions }}</p>
|
|
422
|
+
<ol
|
|
423
|
+
class="vd-reorder-list__list"
|
|
424
|
+
role="list"
|
|
425
|
+
tabindex="-1"
|
|
426
|
+
[attr.aria-label]="t().label"
|
|
427
|
+
[attr.aria-describedby]="instructionsId"
|
|
428
|
+
>
|
|
429
|
+
@if (!valid()) {
|
|
430
|
+
<li class="vd-reorder-list__empty">{{ t().invalidText }}</li>
|
|
431
|
+
} @else {
|
|
432
|
+
@for (item of items(); track item.id; let index = $index) {
|
|
433
|
+
<li
|
|
434
|
+
class="vd-reorder-list__item"
|
|
435
|
+
tabindex="-1"
|
|
436
|
+
[attr.data-reorder-id]="item.id"
|
|
437
|
+
[attr.data-index]="index"
|
|
438
|
+
[attr.data-dragging]="draggingId() === item.id ? '' : null"
|
|
439
|
+
[attr.data-drop]="drop()?.id === item.id ? drop()?.edge : null"
|
|
440
|
+
>
|
|
441
|
+
<span
|
|
442
|
+
class="vd-reorder-list__grip"
|
|
443
|
+
[attr.data-disabled]="disabled() || items().length < 2 ? '' : null"
|
|
444
|
+
aria-hidden="true"
|
|
445
|
+
(pointerdown)="start($event, item.id)"
|
|
446
|
+
(pointermove)="pointerMove($event)"
|
|
447
|
+
(pointerup)="end($event)"
|
|
448
|
+
(pointercancel)="pointerCancel($event)"
|
|
449
|
+
(lostpointercapture)="pointerCancel($event)"
|
|
450
|
+
><vd-icon name="arrow-up-down"
|
|
451
|
+
/></span>
|
|
452
|
+
<div class="vd-reorder-list__body">
|
|
453
|
+
<div class="vd-reorder-list__title">
|
|
454
|
+
<span class="vd-reorder-list__position" aria-hidden="true">{{ index + 1 }}</span
|
|
455
|
+
><bdi>{{ item.label }}</bdi>
|
|
456
|
+
</div>
|
|
457
|
+
@if (item.description) {
|
|
458
|
+
<p class="vd-reorder-list__description">{{ item.description }}</p>
|
|
459
|
+
}
|
|
460
|
+
</div>
|
|
461
|
+
<div class="vd-reorder-list__actions">
|
|
462
|
+
<button
|
|
463
|
+
vdButton
|
|
464
|
+
variant="ghost"
|
|
465
|
+
size="sm"
|
|
466
|
+
type="button"
|
|
467
|
+
data-action="up"
|
|
468
|
+
[disabled]="disabled() || index === 0"
|
|
469
|
+
[attr.aria-label]="t().upText + ': ' + item.label"
|
|
470
|
+
(click)="move(item.id, -1)"
|
|
471
|
+
>
|
|
472
|
+
<vd-icon name="arrow-up" slot="start" />{{ t().upText }}
|
|
473
|
+
</button>
|
|
474
|
+
<button
|
|
475
|
+
vdButton
|
|
476
|
+
variant="ghost"
|
|
477
|
+
size="sm"
|
|
478
|
+
type="button"
|
|
479
|
+
data-action="down"
|
|
480
|
+
[disabled]="disabled() || index === items().length - 1"
|
|
481
|
+
[attr.aria-label]="t().downText + ': ' + item.label"
|
|
482
|
+
(click)="move(item.id, 1)"
|
|
483
|
+
>
|
|
484
|
+
<vd-icon name="arrow-down" slot="start" />{{ t().downText }}
|
|
485
|
+
</button>
|
|
486
|
+
</div>
|
|
487
|
+
</li>
|
|
488
|
+
} @empty {
|
|
489
|
+
<li class="vd-reorder-list__empty">{{ t().emptyText }}</li>
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
</ol>
|
|
493
|
+
<p class="vd-visually-hidden" role="status" aria-atomic="true">
|
|
494
|
+
@for (message of messages(); track message.serial) {
|
|
495
|
+
<span>{{ message.text }}</span>
|
|
496
|
+
}
|
|
497
|
+
</p>
|
|
498
|
+
`,
|
|
499
|
+
host: {
|
|
500
|
+
class: "vd-reorder-list",
|
|
501
|
+
"[attr.data-state]": "!valid() ? \"invalid\" : !items().length ? \"empty\" : disabled() ? \"disabled\" : draggingId() ? \"dragging\" : \"idle\"",
|
|
502
|
+
"(keydown)": "key($event)"
|
|
503
|
+
},
|
|
504
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
505
|
+
encapsulation: ViewEncapsulation.None
|
|
506
|
+
}]
|
|
507
|
+
}],
|
|
508
|
+
ctorParameters: () => [],
|
|
509
|
+
propDecorators: {
|
|
510
|
+
items: [{
|
|
511
|
+
type: i0.Input,
|
|
512
|
+
args: [{
|
|
513
|
+
isSignal: true,
|
|
514
|
+
alias: "items",
|
|
515
|
+
required: false
|
|
516
|
+
}]
|
|
517
|
+
}, {
|
|
518
|
+
type: i0.Output,
|
|
519
|
+
args: ["itemsChange"]
|
|
520
|
+
}],
|
|
521
|
+
disabled: [{
|
|
522
|
+
type: i0.Input,
|
|
523
|
+
args: [{
|
|
524
|
+
isSignal: true,
|
|
525
|
+
alias: "disabled",
|
|
526
|
+
required: false
|
|
527
|
+
}]
|
|
528
|
+
}],
|
|
529
|
+
label: [{
|
|
530
|
+
type: i0.Input,
|
|
531
|
+
args: [{
|
|
532
|
+
isSignal: true,
|
|
533
|
+
alias: "label",
|
|
534
|
+
required: false
|
|
535
|
+
}]
|
|
536
|
+
}],
|
|
537
|
+
instructions: [{
|
|
538
|
+
type: i0.Input,
|
|
539
|
+
args: [{
|
|
540
|
+
isSignal: true,
|
|
541
|
+
alias: "instructions",
|
|
542
|
+
required: false
|
|
543
|
+
}]
|
|
544
|
+
}],
|
|
545
|
+
upText: [{
|
|
546
|
+
type: i0.Input,
|
|
547
|
+
args: [{
|
|
548
|
+
isSignal: true,
|
|
549
|
+
alias: "upText",
|
|
550
|
+
required: false
|
|
551
|
+
}]
|
|
552
|
+
}],
|
|
553
|
+
downText: [{
|
|
554
|
+
type: i0.Input,
|
|
555
|
+
args: [{
|
|
556
|
+
isSignal: true,
|
|
557
|
+
alias: "downText",
|
|
558
|
+
required: false
|
|
559
|
+
}]
|
|
560
|
+
}],
|
|
561
|
+
emptyText: [{
|
|
562
|
+
type: i0.Input,
|
|
563
|
+
args: [{
|
|
564
|
+
isSignal: true,
|
|
565
|
+
alias: "emptyText",
|
|
566
|
+
required: false
|
|
567
|
+
}]
|
|
568
|
+
}],
|
|
569
|
+
invalidText: [{
|
|
570
|
+
type: i0.Input,
|
|
571
|
+
args: [{
|
|
572
|
+
isSignal: true,
|
|
573
|
+
alias: "invalidText",
|
|
574
|
+
required: false
|
|
575
|
+
}]
|
|
576
|
+
}],
|
|
577
|
+
movedText: [{
|
|
578
|
+
type: i0.Input,
|
|
579
|
+
args: [{
|
|
580
|
+
isSignal: true,
|
|
581
|
+
alias: "movedText",
|
|
582
|
+
required: false
|
|
583
|
+
}]
|
|
584
|
+
}],
|
|
585
|
+
canceledText: [{
|
|
586
|
+
type: i0.Input,
|
|
587
|
+
args: [{
|
|
588
|
+
isSignal: true,
|
|
589
|
+
alias: "canceledText",
|
|
590
|
+
required: false
|
|
591
|
+
}]
|
|
592
|
+
}],
|
|
593
|
+
reordered: [{
|
|
594
|
+
type: i0.Output,
|
|
595
|
+
args: ["reordered"]
|
|
596
|
+
}]
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
export { VdReorderList };
|
|
600
|
+
|
|
601
|
+
//# sourceMappingURL=vadem-ui-reorder-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-reorder-list.mjs","names":[],"sources":["../../../projects/ui/reorder-list/src/core/reorder-list.ts","../../../projects/ui/reorder-list/src/reorder-list.ts"],"sourcesContent":["export function vdReorderValid(items: readonly { id: string }[]): boolean {\n const ids = new Set<string>();\n for (const item of items) {\n if (typeof item.id !== 'string' || !item.id.trim() || ids.has(item.id)) return false;\n ids.add(item.id);\n }\n return true;\n}\n\nexport function vdReorderMove<T>(items: readonly T[], from: number, to: number): readonly T[] {\n if (\n !Number.isInteger(from) ||\n !Number.isInteger(to) ||\n from < 0 ||\n to < 0 ||\n from >= items.length ||\n to >= items.length ||\n from === to\n )\n return items;\n const next = [...items];\n const [item] = next.splice(from, 1);\n next.splice(to, 0, item);\n return next;\n}\n\n/** Existing stationary row rectangles; gaps resolve to the following row. */\nexport function vdReorderTarget(\n y: number,\n rows: readonly { top: number; bottom: number }[],\n): number {\n if (!Number.isFinite(y) || !rows.length) return -1;\n const index = rows.findIndex((row) => y < row.bottom);\n return index < 0 ? rows.length - 1 : index;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { VdButton } from '@vadem/ui/button';\nimport { vdUniqueId } from '@vadem/ui/field';\nimport { VdIcon } from '@vadem/ui/icon';\nimport { vdTexts } from '@vadem/ui/locale';\nimport { vdReorderMove, vdReorderTarget, vdReorderValid } from './core/reorder-list';\n\nexport interface VdReorderListItem {\n readonly id: string;\n readonly label: string;\n readonly description?: string;\n}\nexport interface VdReorderListChange {\n readonly id: string;\n readonly fromIndex: number;\n readonly toIndex: number;\n readonly method: 'buttons' | 'pointer';\n}\ninterface Drag {\n pointer: number;\n handle: HTMLElement;\n items: readonly VdReorderListItem[];\n id: string;\n from: number;\n x: number;\n y: number;\n active: boolean;\n to: number;\n}\ninterface Focus {\n element: HTMLElement;\n id: string;\n index: number;\n action: string | undefined;\n}\n\n@Component({\n selector: 'vd-reorder-list',\n imports: [VdButton, VdIcon],\n template: `\n <p class=\"vd-visually-hidden\" [id]=\"instructionsId\">{{ t().instructions }}</p>\n <ol\n class=\"vd-reorder-list__list\"\n role=\"list\"\n tabindex=\"-1\"\n [attr.aria-label]=\"t().label\"\n [attr.aria-describedby]=\"instructionsId\"\n >\n @if (!valid()) {\n <li class=\"vd-reorder-list__empty\">{{ t().invalidText }}</li>\n } @else {\n @for (item of items(); track item.id; let index = $index) {\n <li\n class=\"vd-reorder-list__item\"\n tabindex=\"-1\"\n [attr.data-reorder-id]=\"item.id\"\n [attr.data-index]=\"index\"\n [attr.data-dragging]=\"draggingId() === item.id ? '' : null\"\n [attr.data-drop]=\"drop()?.id === item.id ? drop()?.edge : null\"\n >\n <span\n class=\"vd-reorder-list__grip\"\n [attr.data-disabled]=\"disabled() || items().length < 2 ? '' : null\"\n aria-hidden=\"true\"\n (pointerdown)=\"start($event, item.id)\"\n (pointermove)=\"pointerMove($event)\"\n (pointerup)=\"end($event)\"\n (pointercancel)=\"pointerCancel($event)\"\n (lostpointercapture)=\"pointerCancel($event)\"\n ><vd-icon name=\"arrow-up-down\"\n /></span>\n <div class=\"vd-reorder-list__body\">\n <div class=\"vd-reorder-list__title\">\n <span class=\"vd-reorder-list__position\" aria-hidden=\"true\">{{ index + 1 }}</span\n ><bdi>{{ item.label }}</bdi>\n </div>\n @if (item.description) {\n <p class=\"vd-reorder-list__description\">{{ item.description }}</p>\n }\n </div>\n <div class=\"vd-reorder-list__actions\">\n <button\n vdButton\n variant=\"ghost\"\n size=\"sm\"\n type=\"button\"\n data-action=\"up\"\n [disabled]=\"disabled() || index === 0\"\n [attr.aria-label]=\"t().upText + ': ' + item.label\"\n (click)=\"move(item.id, -1)\"\n >\n <vd-icon name=\"arrow-up\" slot=\"start\" />{{ t().upText }}\n </button>\n <button\n vdButton\n variant=\"ghost\"\n size=\"sm\"\n type=\"button\"\n data-action=\"down\"\n [disabled]=\"disabled() || index === items().length - 1\"\n [attr.aria-label]=\"t().downText + ': ' + item.label\"\n (click)=\"move(item.id, 1)\"\n >\n <vd-icon name=\"arrow-down\" slot=\"start\" />{{ t().downText }}\n </button>\n </div>\n </li>\n } @empty {\n <li class=\"vd-reorder-list__empty\">{{ t().emptyText }}</li>\n }\n }\n </ol>\n <p class=\"vd-visually-hidden\" role=\"status\" aria-atomic=\"true\">\n @for (message of messages(); track message.serial) {\n <span>{{ message.text }}</span>\n }\n </p>\n `,\n host: {\n class: 'vd-reorder-list',\n '[attr.data-state]':\n '!valid() ? \"invalid\" : !items().length ? \"empty\" : disabled() ? \"disabled\" : draggingId() ? \"dragging\" : \"idle\"',\n '(keydown)': 'key($event)',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class VdReorderList {\n readonly items = model<readonly VdReorderListItem[]>([]);\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly label = input<string>();\n readonly instructions = input<string>();\n readonly upText = input<string>();\n readonly downText = input<string>();\n readonly emptyText = input<string>();\n readonly invalidText = input<string>();\n readonly movedText = input<(label: string, position: number, total: number) => string>();\n readonly canceledText = input<(label: string) => string>();\n readonly reordered = output<VdReorderListChange>();\n protected readonly t = vdTexts('reorderList', {\n label: this.label,\n instructions: this.instructions,\n upText: this.upText,\n downText: this.downText,\n emptyText: this.emptyText,\n invalidText: this.invalidText,\n movedText: this.movedText,\n canceledText: this.canceledText,\n });\n protected readonly valid = computed(() => vdReorderValid(this.items()));\n protected readonly instructionsId = vdUniqueId('vd-reorder-instructions');\n protected readonly draggingId = signal<string | null>(null);\n protected readonly drop = signal<{ id: string; edge: 'before' | 'after' } | null>(null);\n protected readonly messages = signal<readonly { serial: number; text: string }[]>([]);\n private readonly host: HTMLElement = inject(ElementRef).nativeElement;\n private drag: Drag | null = null;\n private focus: Focus | null = null;\n private serial = 0;\n\n constructor() {\n effect(() => {\n const items = this.items(),\n disabled = this.disabled(),\n valid = this.valid();\n if (this.drag && (disabled || !valid || items !== this.drag.items)) this.finish(true);\n const active = this.host.ownerDocument.activeElement as HTMLElement | null;\n const row =\n active && this.host.contains(active)\n ? active.closest<HTMLElement>('[data-reorder-id]')\n : null;\n this.focus =\n row && active\n ? {\n element: active,\n id: row.dataset['reorderId']!,\n index: Number(row.dataset['index']),\n action: active.dataset['action'],\n }\n : null;\n });\n afterRenderEffect(() => {\n this.items();\n this.disabled();\n this.valid();\n const focus = this.focus;\n this.focus = null;\n if (!focus) return;\n const active = this.host.ownerDocument.activeElement;\n if (active === focus.element && !focus.element.matches(':disabled')) {\n if (focus.action)\n focus.element.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: 'instant',\n });\n return;\n }\n if (active && active !== this.host.ownerDocument.body && active !== focus.element) return;\n const rows = this.rows();\n const row =\n rows.find((row) => row.dataset['reorderId'] === focus.id) ??\n rows[Math.min(focus.index, rows.length - 1)];\n const buttons = row\n ? Array.from(row.querySelectorAll<HTMLButtonElement>('button:not(:disabled)'))\n : [];\n const action = focus.action\n ? (buttons.find((button) => button.dataset['action'] === focus.action) ?? buttons[0])\n : null;\n const target = action ?? (this.disabled() ? null : row) ?? this.list();\n target?.focus({ preventScroll: true });\n if (focus.action)\n target?.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'instant' });\n });\n inject(DestroyRef).onDestroy(() => this.finish(false));\n }\n protected move(id: string, delta: number): void {\n if (this.disabled() || !this.valid() || this.drag) return;\n const from = this.items().findIndex((item) => item.id === id);\n this.commit(from, from + delta, 'buttons');\n }\n private commit(from: number, to: number, method: VdReorderListChange['method']): void {\n const items = this.items(),\n next = vdReorderMove(items, from, to);\n if (next === items) return;\n const item = items[from];\n this.items.set(next);\n this.announce(this.t().movedText(item.label, to + 1, items.length));\n this.reordered.emit({ id: item.id, fromIndex: from, toIndex: to, method });\n }\n protected start(event: PointerEvent, id: string): void {\n if (\n !event.isPrimary ||\n event.button !== 0 ||\n this.disabled() ||\n !this.valid() ||\n this.items().length < 2 ||\n this.drag\n )\n return;\n const handle = event.currentTarget as HTMLElement;\n if (typeof handle.setPointerCapture !== 'function') return;\n try {\n handle.setPointerCapture(event.pointerId);\n } catch {\n return;\n }\n event.preventDefault();\n const row = handle.closest<HTMLElement>('[data-reorder-id]');\n if (row && !row.contains(this.host.ownerDocument.activeElement))\n row.focus({ preventScroll: true });\n const from = this.items().findIndex((item) => item.id === id);\n this.drag = {\n pointer: event.pointerId,\n handle,\n items: this.items(),\n id,\n from,\n x: event.clientX,\n y: event.clientY,\n active: false,\n to: from,\n };\n }\n protected pointerMove(event: PointerEvent): void {\n const drag = this.drag;\n if (!drag || drag.pointer !== event.pointerId) return;\n if (event.buttons === 0 || this.disabled() || this.items() !== drag.items) {\n this.finish(true);\n return;\n }\n if (!drag.active && Math.hypot(event.clientX - drag.x, event.clientY - drag.y) < 4) return;\n drag.active = true;\n this.draggingId.set(drag.id);\n drag.to = this.target(event.clientX, event.clientY);\n this.drop.set(\n drag.to < 0 || drag.to === drag.from\n ? null\n : { id: drag.items[drag.to].id, edge: drag.to > drag.from ? 'after' : 'before' },\n );\n }\n protected end(event: PointerEvent): void {\n const drag = this.drag;\n if (!drag || drag.pointer !== event.pointerId) return;\n const to = this.target(event.clientX, event.clientY);\n const commit = drag.active && to >= 0 && !this.disabled() && this.items() === drag.items;\n this.finish(!commit);\n if (commit) this.commit(drag.from, to, 'pointer');\n }\n protected pointerCancel(event: PointerEvent): void {\n if (event.pointerId === this.drag?.pointer) this.finish(true);\n }\n protected key(event: KeyboardEvent): void {\n if (!this.drag || event.isComposing || event.altKey || event.ctrlKey || event.metaKey) return;\n if (event.key === 'Escape' || event.key === 'Tab') {\n if (event.key === 'Escape') {\n event.preventDefault();\n event.stopPropagation();\n }\n this.finish(true);\n }\n }\n private target(x: number, y: number): number {\n const list = this.list();\n if (!list) return -1;\n const rect = list.getBoundingClientRect();\n if (x < rect.left || x > rect.right || y < rect.top || y > rect.bottom) return -1;\n return vdReorderTarget(\n y,\n this.rows().map((row) => row.getBoundingClientRect()),\n );\n }\n private finish(announce: boolean): void {\n const drag = this.drag;\n this.drag = null;\n this.draggingId.set(null);\n this.drop.set(null);\n if (!drag) return;\n if (drag.handle.hasPointerCapture?.(drag.pointer))\n drag.handle.releasePointerCapture(drag.pointer);\n if (announce && drag.active) this.announce(this.t().canceledText(drag.items[drag.from].label));\n }\n private announce(text: string): void {\n this.messages.set([{ serial: ++this.serial, text }]);\n }\n private list(): HTMLOListElement | null {\n return this.host.querySelector('ol');\n }\n private rows(): HTMLElement[] {\n return Array.from(this.host.querySelectorAll<HTMLElement>('[data-reorder-id]'));\n }\n}\n"],"mappings":";;;;;;AAAA,SAAgB,eAAe,OAAgC;CAC7D,MAAM,sBAAM,IAAI,IAAG;CACnB,KAAK,MAAM,QAAQ,OAA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