@trismegisto/angular 2.1.1 → 3.0.0

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.
Files changed (37) hide show
  1. package/fesm2022/trismegisto-angular-data-grid.mjs +32 -18
  2. package/fesm2022/trismegisto-angular-data-grid.mjs.map +1 -1
  3. package/fesm2022/trismegisto-angular-i18n.mjs +22 -2
  4. package/fesm2022/trismegisto-angular-i18n.mjs.map +1 -1
  5. package/fesm2022/trismegisto-angular-list-editor.mjs +320 -0
  6. package/fesm2022/trismegisto-angular-list-editor.mjs.map +1 -0
  7. package/fesm2022/trismegisto-angular-motion.mjs +58 -4
  8. package/fesm2022/trismegisto-angular-motion.mjs.map +1 -1
  9. package/fesm2022/trismegisto-angular-reorder-list.mjs +5 -3
  10. package/fesm2022/trismegisto-angular-reorder-list.mjs.map +1 -1
  11. package/fesm2022/trismegisto-angular-settings.mjs +11 -2
  12. package/fesm2022/trismegisto-angular-settings.mjs.map +1 -1
  13. package/fesm2022/trismegisto-angular-toast.mjs +24 -3
  14. package/fesm2022/trismegisto-angular-toast.mjs.map +1 -1
  15. package/fesm2022/trismegisto-angular-zoom.mjs +16 -1
  16. package/fesm2022/trismegisto-angular-zoom.mjs.map +1 -1
  17. package/fesm2022/trismegisto-angular.mjs +3 -2
  18. package/fesm2022/trismegisto-angular.mjs.map +1 -1
  19. package/package.json +9 -5
  20. package/types/trismegisto-angular-data-grid.d.ts +18 -9
  21. package/types/trismegisto-angular-data-grid.d.ts.map +1 -1
  22. package/types/trismegisto-angular-i18n.d.ts +20 -1
  23. package/types/trismegisto-angular-i18n.d.ts.map +1 -1
  24. package/types/trismegisto-angular-list-editor.d.ts +167 -0
  25. package/types/trismegisto-angular-list-editor.d.ts.map +1 -0
  26. package/types/trismegisto-angular-motion.d.ts +32 -1
  27. package/types/trismegisto-angular-motion.d.ts.map +1 -1
  28. package/types/trismegisto-angular-reorder-list.d.ts +3 -1
  29. package/types/trismegisto-angular-reorder-list.d.ts.map +1 -1
  30. package/types/trismegisto-angular-settings.d.ts +4 -1
  31. package/types/trismegisto-angular-settings.d.ts.map +1 -1
  32. package/types/trismegisto-angular-toast.d.ts +17 -1
  33. package/types/trismegisto-angular-toast.d.ts.map +1 -1
  34. package/types/trismegisto-angular-zoom.d.ts +9 -0
  35. package/types/trismegisto-angular-zoom.d.ts.map +1 -1
  36. package/types/trismegisto-angular.d.ts +3 -2
  37. package/types/trismegisto-angular.d.ts.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trismegisto-angular-list-editor.mjs","sources":["../../src/list-editor/icons.generated.ts","../../src/list-editor/list-editor.component.ts","../../src/list-editor/list-editor.component.html","../../src/list-editor/index.ts","../../src/list-editor/trismegisto-angular-list-editor.ts"],"sourcesContent":["// GERADO por scripts/generate-internal-icons.mjs — não editar à mão.\n// Ícones que esta pasta usa por dentro; cada @Component/@Directive daqui os registra com\n// `readonly #icons = useHermesIcons(LIST_EDITOR_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_CHECK,\n ICON_EXCLAMATION_TRIANGLE,\n ICON_PENCIL,\n ICON_PLUS,\n} from '@trismegisto/angular/icon';\n\nexport const LIST_EDITOR_ICONS: readonly RegisteredIcon[] = [ICON_CHECK, ICON_EXCLAMATION_TRIANGLE, ICON_PENCIL, ICON_PLUS];\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n afterNextRender,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n ListEditorRejection,\n ListEditorValidator,\n ListEditorValue,\n buildListEditorItem,\n checkListEditorItem,\n formatMessage,\n listEditorDescription,\n listEditorTitle,\n pluralMessage,\n} from '@trismegisto/primitives';\nimport { ButtonComponent } from '@trismegisto/angular/button';\nimport { HermesFormFieldBase } from '@trismegisto/angular/forms';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { IconComponent, useHermesIcons } from '@trismegisto/angular/icon';\nimport { IconButtonComponent } from '@trismegisto/angular/icon-button';\nimport { InputComponent } from '@trismegisto/angular/input';\nimport {\n ReorderListComponent,\n ReorderListItem,\n ReorderListMove,\n ReorderListRemoval,\n} from '@trismegisto/angular/reorder-list';\nimport { LIST_EDITOR_ICONS } from './icons.generated';\n\n/** Item acrescentado pelo campo: o item (já aparado) e a posição em que entrou. */\nexport interface ListEditorAdded<T extends ListEditorValue = ListEditorValue> {\n readonly item: T;\n readonly index: number;\n}\n\n/** Item removido pelo ✕: o item e a posição que ocupava. */\nexport interface ListEditorRemoved<T extends ListEditorValue = ListEditorValue> {\n readonly item: T;\n readonly index: number;\n}\n\n/** Item reordenado (arrasto ou teclado): o item, a posição de origem e a de destino. */\nexport interface ListEditorMoved<T extends ListEditorValue = ListEditorValue> {\n readonly item: T;\n readonly from: number;\n readonly to: number;\n}\n\n/** Item editado (`editable`): o valor novo, o anterior e a posição. */\nexport interface ListEditorEdited<T extends ListEditorValue = ListEditorValue> {\n readonly item: T;\n readonly previous: T;\n readonly index: number;\n}\n\nconst optionalNumber = (value: unknown): number | null =>\n value === null || value === undefined || value === '' ? null : numberAttribute(value, NaN);\n\nlet sequence = 0;\n\n/**\n * Editor de lista (`hm-list-editor`): um campo para acrescentar itens e, embaixo, a lista ordenável dos\n * itens (o `hm-reorder-list`: arrasto pela alça e teclado), com ✕ por item e edição opcional. Para listas\n * curtas em que a ORDEM importa: URIs de redirecionamento, funcionalidades de um plano, etapas.\n *\n * ```html\n * <!-- texto simples -->\n * <hm-list-editor label=\"Redirect URIs\" placeholder=\"https://app.exemplo.com/callback\" [validate]=\"url\" formControlName=\"redirectUris\" />\n * <!-- título + descrição -->\n * <hm-list-editor pair label=\"Funcionalidades\" [(items)]=\"features\" editable />\n * ```\n *\n * - **Modos**: texto simples (`string[]`, um campo) ou `pair` (`{ title, description }[]`, dois campos;\n * na lista o título em destaque e a descrição como texto de apoio embaixo). O tipo é genérico\n * (`ListEditorComponent<T>`); no modo par, campos extras do app (`id`, `sortOrder`...) sobrevivem à edição.\n * - **Adicionar**: Enter em qualquer campo ou o botão \"Adicionar\". O texto é aparado; vazio, repetido\n * (`allowDuplicates`, `ignoreCase`), acima do `max` ou recusado por `validate` mostra o erro no campo e\n * não entra. Depois de adicionar, os campos limpam e o foco volta ao primeiro.\n * - **Reordenar e remover**: os do `hm-reorder-list` (alça, Espaço/setas, ✕ com foco no vizinho). A lista\n * esvaziada devolve o foco ao campo.\n * - **Editar** (`editable`): o lápis do item leva o texto aos campos; o botão vira \"Salvar\" (Enter salva,\n * Esc ou \"Cancelar\" desistem) e o foco volta ao lápis do item.\n * - **Valor**: `[(items)]`, Reactive Forms ou `[(ngModel)]` (ver `HermesFormFieldBase`). `readonly` mostra\n * só a lista, sem campo nem ações; `disabled` mantém tudo visível e inoperante.\n *\n * Acessibilidade: grupo nomeado pelo `label`; a lista é um grupo \"Itens de {label}\"; uma região viva\n * educada anuncia adição, edição e (pelo `hm-reorder-list`) remoção; os movimentos são anunciados pelo\n * serviço de arrastar e soltar.\n */\n@Component({\n selector: 'hm-list-editor',\n imports: [ButtonComponent, IconButtonComponent, IconComponent, InputComponent, ReorderListComponent],\n templateUrl: './list-editor.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-list-editor-host', '(focusout)': 'onFocusOut($event)' },\n})\nexport class ListEditorComponent<T extends ListEditorValue = string> extends HermesFormFieldBase<readonly T[]> {\n readonly #icons = useHermesIcons(LIST_EDITOR_ICONS);\n\n /** Os itens, na ordem atual. Two-way: recebe a lista nova a cada adição, remoção, edição ou movimento. */\n readonly items = model<readonly T[]>([]);\n /** Nome da lista (visível, salvo `labelHidden`). */\n readonly label = input.required<string>();\n readonly labelHidden = input(false, { transform: booleanAttribute });\n readonly hint = input('');\n /** Exemplo no campo de texto (ou no título, no modo par). */\n readonly placeholder = input('');\n /** Exemplo no campo de descrição (modo par). */\n readonly descriptionPlaceholder = input('');\n /** Itens com título + descrição (`{ title, description }`) em vez de texto simples. */\n readonly pair = input(false, { transform: booleanAttribute });\n /** Rótulo do campo de texto simples (fica só para leitor de tela). Vazio = catálogo (\"Novo item\"). */\n readonly itemLabel = input('');\n /** Rótulo do campo de título (modo par). Vazio = catálogo (\"Título\"). */\n readonly titleLabel = input('');\n /** Rótulo do campo de descrição (modo par). Vazio = catálogo (\"Descrição\"). */\n readonly descriptionLabel = input('');\n /** Texto do botão de adicionar. Vazio = catálogo (\"Adicionar\"). */\n readonly addLabel = input('');\n /** Texto da lista vazia. Vazio = catálogo (\"Nenhum item na lista.\"). */\n readonly emptyText = input('');\n /** No modo par, a descrição também é obrigatória. */\n readonly descriptionRequired = input(false, { transform: booleanAttribute });\n /** Aceita itens repetidos (comparados pelo texto, ou pelo título no modo par). */\n readonly allowDuplicates = input(false, { transform: booleanAttribute });\n /** Ao procurar repetidos, ignora maiúsculas/minúsculas. */\n readonly ignoreCase = input(false, { transform: booleanAttribute });\n /** Quantidade máxima de itens (`null` = sem limite). Com limite, o rótulo mostra \"{n} de {max}\". */\n readonly max = input<number | null, unknown>(null, { transform: optionalNumber });\n /** Validação do item novo/editado: devolve a mensagem de erro ou `null`. */\n readonly validate = input<ListEditorValidator<T> | null>(null);\n /** Lápis por item para editar o texto no lugar. */\n readonly editable = input(false, { transform: booleanAttribute });\n /** Só leitura: mostra a lista, sem campo, alças nem ações. */\n readonly readonly = input(false, { transform: booleanAttribute });\n\n readonly added = output<ListEditorAdded<T>>();\n readonly removed = output<ListEditorRemoved<T>>();\n readonly moved = output<ListEditorMoved<T>>();\n readonly edited = output<ListEditorEdited<T>>();\n\n protected readonly valueModel = this.items;\n\n readonly #catalog = inject(HERMES_MESSAGES);\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #injector = inject(Injector);\n\n protected readonly text = computed(() => this.#catalog.listEditor);\n readonly #locale = computed(() => this.#catalog.meta.locale);\n\n protected readonly id = `hm-list-editor-${++sequence}`;\n protected readonly labelId = `${this.id}-label`;\n protected readonly hintId = `${this.id}-hint`;\n protected readonly errorId = `${this.id}-error`;\n\n protected readonly draftTitle = signal('');\n protected readonly draftDescription = signal('');\n protected readonly rejection = signal<ListEditorRejection | null>(null);\n /** Id (da linha) do item em edição. */\n protected readonly editingId = signal<string | null>(null);\n protected readonly announcement = signal('');\n\n // Ids estáveis por linha (o `hm-reorder-list` rastreia por id). Valores vindos de fora (writeValue,\n // binding) ganham ids novos; as mudanças feitas aqui levam os ids junto.\n #ids: string[] = [];\n #idsFor: readonly T[] | null = null;\n #previous: readonly T[] = [];\n\n protected readonly values = computed<readonly T[]>(() => this.items() ?? []);\n\n protected readonly rows = computed<ReorderListItem[]>(() => {\n const list = this.values();\n if (list !== this.#idsFor) {\n this.#ids = list.map(() => this.#newId());\n this.#idsFor = list;\n }\n return list.map((value, index) => {\n const description = listEditorDescription(value);\n return { id: this.#ids[index], label: listEditorTitle(value), ...(description ? { description } : {}) };\n });\n });\n\n /** Posição do item em edição (-1 = adicionando). Some sozinho se o item sair da lista. */\n protected readonly editingIndex = computed(() => {\n this.rows();\n const id = this.editingId();\n return id === null ? -1 : this.#ids.indexOf(id);\n });\n\n protected readonly firstFieldLabel = computed(() =>\n this.pair() ? this.titleLabel() || this.text().title : this.itemLabel() || this.text().item,\n );\n protected readonly secondFieldLabel = computed(() => this.descriptionLabel() || this.text().description);\n protected readonly listLabel = computed(() => formatMessage(this.text().list, { label: this.label() }));\n protected readonly emptyLabel = computed(() => this.emptyText() || this.text().empty);\n protected readonly submitLabel = computed(() =>\n this.editingIndex() >= 0 ? this.text().save : this.addLabel() || this.text().add,\n );\n\n protected readonly countText = computed(() => {\n const max = this.max();\n return max === null ? '' : formatMessage(this.text().count, { count: this.values().length, max });\n });\n\n /** Erro mostrado no primeiro campo (texto ou título). */\n protected readonly firstError = computed(() => {\n const rejection = this.rejection();\n if (!rejection || rejection.reason === 'emptyDescription') return '';\n return this.#rejectionText(rejection);\n });\n\n /** Erro mostrado no campo de descrição (modo par). */\n protected readonly secondError = computed(() =>\n this.rejection()?.reason === 'emptyDescription' ? this.text().requiredDescription : '',\n );\n\n protected readonly describedBy = computed(\n () => [this.hint() ? this.hintId : '', this.errorText() ? this.errorId : ''].filter(Boolean).join(' ') || null,\n );\n\n protected editLabel(row: ReorderListItem): string {\n return formatMessage(this.text().edit, { label: row.label });\n }\n\n protected onTitleInput(value: string | number | null): void {\n this.draftTitle.set(value == null ? '' : String(value));\n this.rejection.set(null);\n }\n\n protected onDescriptionInput(value: string | number | null): void {\n this.draftDescription.set(value == null ? '' : String(value));\n if (this.rejection()?.reason === 'emptyDescription') this.rejection.set(null);\n }\n\n /** Enter adiciona (ou salva); Esc, durante a edição, desiste. */\n protected onFieldKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' && !event.isComposing) {\n event.preventDefault();\n this.submit();\n } else if ((event.key === 'Escape' || event.key === 'Esc') && this.editingIndex() >= 0) {\n event.preventDefault();\n this.cancelEdit();\n }\n }\n\n /** Adiciona o item dos campos (ou salva a edição), se ele passar nas regras. */\n submit(): void {\n if (this.isDisabled() || this.readonly()) return;\n const list = this.values();\n const editing = this.editingIndex();\n const previous = editing >= 0 ? list[editing] : null;\n const item = buildListEditorItem<T>(this.pair(), this.draftTitle(), this.draftDescription(), previous);\n const rejection = checkListEditorItem(item, list, {\n allowDuplicates: this.allowDuplicates(),\n ignoreCase: this.ignoreCase(),\n max: this.max(),\n descriptionRequired: this.descriptionRequired(),\n validate: this.validate(),\n editing: editing >= 0 ? editing : null,\n });\n if (rejection) {\n this.rejection.set(rejection);\n this.#focusField(rejection.reason === 'emptyDescription' ? 1 : 0);\n return;\n }\n this.rejection.set(null);\n this.draftTitle.set('');\n this.draftDescription.set('');\n const label = listEditorTitle(item);\n\n if (previous !== null) {\n const next = list.map((value, index) => (index === editing ? item : value));\n this.#publish(next, [...this.#ids]);\n this.editingId.set(null);\n this.edited.emit({ item, previous, index: editing });\n this.#announce(formatMessage(this.text().edited, { label }));\n this.#focusEditButton(editing);\n return;\n }\n\n const next = [...list, item];\n this.#publish(next, [...this.#ids, this.#newId()]);\n this.added.emit({ item, index: next.length - 1 });\n this.#announce(formatMessage(this.text().added, { label }));\n this.#focusField(0);\n }\n\n /** Leva o item aos campos para editar. */\n protected startEdit(index: number): void {\n if (this.isDisabled() || this.readonly()) return;\n this.rows();\n const value = this.values()[index];\n if (value === undefined) return;\n this.editingId.set(this.#ids[index]);\n this.draftTitle.set(listEditorTitle(value));\n this.draftDescription.set(listEditorDescription(value));\n this.rejection.set(null);\n this.#announce(formatMessage(this.text().editing, { label: listEditorTitle(value) }));\n this.#focusField(0);\n }\n\n /** Desiste da edição: limpa os campos e devolve o foco ao lápis do item. */\n protected cancelEdit(): void {\n const index = this.editingIndex();\n this.editingId.set(null);\n this.draftTitle.set('');\n this.draftDescription.set('');\n this.rejection.set(null);\n if (index >= 0) this.#focusEditButton(index);\n }\n\n /** Lista nova vinda do `hm-reorder-list` (soltou num lugar novo ou removeu pelo ✕). */\n protected onRowsChange(rows: readonly ReorderListItem[]): void {\n const list = this.values();\n const byId = new Map(this.#ids.map((id, index) => [id, list[index]] as const));\n const next = rows.filter((row) => byId.has(row.id)).map((row) => byId.get(row.id) as T);\n this.#previous = list;\n this.#publish(next, rows.filter((row) => byId.has(row.id)).map((row) => row.id));\n }\n\n protected onRowMoved(move: ReorderListMove): void {\n const item = this.values()[move.to];\n if (item !== undefined) this.moved.emit({ item, from: move.from, to: move.to });\n }\n\n protected onRowRemoved(removal: ReorderListRemoval): void {\n const item = this.#previous[removal.index];\n if (item !== undefined) this.removed.emit({ item, index: removal.index });\n // Item em edição removido: os campos voltam a \"adicionar\".\n if (this.editingId() !== null && this.editingIndex() < 0) this.cancelEdit();\n // Lista vazia: o foco vai para o campo (o `hm-reorder-list` o poria na mensagem de vazio).\n if (!this.values().length) this.#focusField(0);\n }\n\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (next && this.#host.nativeElement.contains(next)) return;\n // O foco também sai quando o editor é tirado da página (um modal fechando, um @if): isso acontece no meio da\n // detecção de mudanças, e marcar \"tocado\" ali muda o que o template já leu (NG0100 em modo dev). Fica para logo\n // depois, e só se o editor ainda está na página.\n queueMicrotask(() => {\n if (this.#host.nativeElement.isConnected) this.markTouched();\n });\n }\n\n #publish(next: readonly T[], ids: string[]): void {\n this.#ids = ids;\n this.#idsFor = next;\n this.commit(next);\n }\n\n #newId(): string {\n return `${this.id}-item-${++sequence}`;\n }\n\n #rejectionText(rejection: ListEditorRejection): string {\n const text = this.text();\n switch (rejection.reason) {\n case 'empty':\n return text.required;\n case 'emptyDescription':\n return text.requiredDescription;\n case 'duplicate':\n return formatMessage(text.duplicate, { label: this.draftTitle().trim() });\n case 'limit':\n return pluralMessage(text.limit, this.max() ?? 0, this.#locale());\n default:\n return rejection.message ?? '';\n }\n }\n\n #announce(message: string): void {\n // Limpa antes: a mesma frase duas vezes seguidas não seria anunciada de novo.\n this.announcement.set('');\n queueMicrotask(() => this.announcement.set(message));\n }\n\n #focusField(position: 0 | 1): void {\n afterNextRender(\n () => this.#host.nativeElement.querySelectorAll<HTMLInputElement>('.hm-list-editor__field input')[position]?.focus(),\n { injector: this.#injector },\n );\n }\n\n #focusEditButton(index: number): void {\n afterNextRender(\n () =>\n this.#host.nativeElement\n .querySelectorAll<HTMLElement>('.hm-list-editor__edit button')\n [index]?.focus(),\n { injector: this.#injector },\n );\n }\n}\n","<div\n class=\"hm-list-editor\"\n [class.hm-list-editor--pair]=\"pair()\"\n [class.hm-list-editor--disabled]=\"isDisabled()\"\n [class.hm-list-editor--readonly]=\"readonly()\"\n [class.hm-list-editor--invalid]=\"!!errorText()\"\n role=\"group\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n <!-- Rótulo e texto de apoio antes dos campos: quem lê de cima para baixo vê a orientação antes de digitar. -->\n <div class=\"hm-list-editor__header\">\n <div class=\"hm-list-editor__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-list-editor__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-list-editor__required\">{{ fieldText.required }}</span>\n }\n @if (countText()) {\n <span class=\"hm-list-editor__count\">{{ countText() }}</span>\n }\n </div>\n @if (hint()) {\n <p class=\"hm-list-editor__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n </div>\n\n @if (!readonly()) {\n <!-- Campo(s) de adicionar: Enter em qualquer campo adiciona (ou salva a edição). -->\n <div class=\"hm-list-editor__add\" (keydown)=\"onFieldKeydown($event)\">\n <div class=\"hm-list-editor__fields\">\n <hm-input\n class=\"hm-list-editor__field\"\n [label]=\"firstFieldLabel()\"\n [labelHidden]=\"!pair()\"\n [placeholder]=\"placeholder()\"\n [value]=\"draftTitle()\"\n [error]=\"firstError()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onTitleInput($event)\"\n />\n @if (pair()) {\n <hm-input\n class=\"hm-list-editor__field\"\n [label]=\"secondFieldLabel()\"\n [placeholder]=\"descriptionPlaceholder()\"\n [value]=\"draftDescription()\"\n [error]=\"secondError()\"\n [disabled]=\"isDisabled()\"\n (valueChange)=\"onDescriptionInput($event)\"\n />\n }\n </div>\n <div class=\"hm-list-editor__actions\">\n <hm-button\n class=\"hm-list-editor__submit\"\n emphasis=\"medium\"\n [icon]=\"editingIndex() >= 0 ? 'check' : 'plus'\"\n [disabled]=\"isDisabled()\"\n (clicked)=\"submit()\"\n >\n {{ submitLabel() }}\n </hm-button>\n @if (editingIndex() >= 0) {\n <hm-button class=\"hm-list-editor__cancel\" emphasis=\"minimal\" [disabled]=\"isDisabled()\" (clicked)=\"cancelEdit()\">\n {{ text().cancel }}\n </hm-button>\n }\n </div>\n </div>\n\n <hm-reorder-list\n class=\"hm-list-editor__list\"\n [items]=\"rows()\"\n [label]=\"listLabel()\"\n labelHidden\n removable\n [emptyText]=\"emptyLabel()\"\n [disabled]=\"isDisabled()\"\n (itemsChange)=\"onRowsChange($event)\"\n (moved)=\"onRowMoved($event)\"\n (removed)=\"onRowRemoved($event)\"\n >\n <ng-template let-row let-index=\"index\">\n <div class=\"hm-list-editor__row\" [class.hm-list-editor__row--editing]=\"editingIndex() === index\">\n <span class=\"hm-list-editor__text\">\n <span class=\"hm-list-editor__title\">{{ row.label }}</span>\n @if (row.description) {\n <span class=\"hm-list-editor__description\">{{ row.description }}</span>\n }\n </span>\n @if (editable()) {\n <hm-icon-button\n class=\"hm-list-editor__edit\"\n icon=\"pencil\"\n emphasis=\"subtle\"\n size=\"small\"\n [label]=\"editLabel(row)\"\n [disabled]=\"isDisabled()\"\n (clicked)=\"startEdit(index)\"\n />\n }\n </div>\n </ng-template>\n </hm-reorder-list>\n } @else {\n @if (rows().length) {\n <ul class=\"hm-list-editor__static\" [attr.aria-label]=\"listLabel()\">\n @for (row of rows(); track row.id) {\n <li class=\"hm-list-editor__static-item\">\n <span class=\"hm-list-editor__title\">{{ row.label }}</span>\n @if (row.description) {\n <span class=\"hm-list-editor__description\">{{ row.description }}</span>\n }\n </li>\n }\n </ul>\n } @else {\n <p class=\"hm-list-editor__empty\">{{ emptyLabel() }}</p>\n }\n }\n\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n\n @if (errorText()) {\n <p class=\"hm-list-editor__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n","// Ponto de import `@trismegisto/angular/list-editor` (secundário do ng-packagr): o que o public-api e as outras pastas usam\n// daqui. Ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './list-editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAWO,MAAM,iBAAiB,GAA8B,CAAC,UAAU,EAAE,yBAAyB,EAAE,WAAW,EAAE,SAAS,CAAC;;ACuD3H,MAAM,cAAc,GAAG,CAAC,KAAc,KAC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EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKxF,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,CAAC,mBAEnF,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAA,QAAA,EAAA,yqJAAA,EAAA;;;AEzG5E;AACA;;ACDA;;AAEG;;"}
@@ -1,7 +1,7 @@
1
- import { isPlatformBrowser } from '@angular/common';
1
+ import { isPlatformBrowser, DOCUMENT } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { input, inject, ElementRef, PLATFORM_ID, signal, computed, effect, untracked, afterNextRender, DestroyRef, ChangeDetectionStrategy, Component, Injector, Directive, booleanAttribute, output } from '@angular/core';
4
- import { prefersReducedMotion, countValueAt, parseCssDuration, flipDelta } from '@trismegisto/primitives';
3
+ import { input, inject, ElementRef, PLATFORM_ID, signal, computed, effect, untracked, afterNextRender, DestroyRef, ChangeDetectionStrategy, Component, Injector, Directive, booleanAttribute, output, Injectable } from '@angular/core';
4
+ import { prefersReducedMotion, countValueAt, parseCssDuration, flipDelta, motionPreferenceOf, normalizeMotionPreference, applyMotionPreference } from '@trismegisto/primitives';
5
5
  import { HermesI18nService } from '@trismegisto/angular/i18n';
6
6
 
7
7
  /**
@@ -341,6 +341,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
341
341
  }]
342
342
  }], ctorParameters: () => [], propDecorators: { hmRevealDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "hmRevealDelay", required: false }] }], hmRevealThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "hmRevealThreshold", required: false }] }], hmRevealOnce: [{ type: i0.Input, args: [{ isSignal: true, alias: "hmRevealOnce", required: false }] }], revealed: [{ type: i0.Output, args: ["revealed"] }] } });
343
343
 
344
+ const REDUCE_QUERY = '(prefers-reduced-motion: reduce)';
345
+ /**
346
+ * Movimento do app: a escolha da pessoa (`'system'`, `'reduce'`, `'full'`) por cima do
347
+ * `prefers-reduced-motion` do sistema operacional.
348
+ *
349
+ * A escolha vira `data-motion` no `<html>` (ver `HERMES_MOTION_ATTRIBUTE` em `@trismegisto/primitives`), que
350
+ * é o único lugar onde ela mora: o CSS do `@trismegisto/core` (transições, animações, rolagem suave) e
351
+ * `prefersReducedMotion()` (número animado, FLIP, revelação, carrossel, rolagem dos visualizadores) leem
352
+ * dali antes da media query. Quem persiste a escolha é o app (no spine, `SpinePreferencesService`).
353
+ *
354
+ * ```ts
355
+ * readonly motion = inject(HermesMotionService);
356
+ * motion.setPreference('reduce'); // reduz mesmo com o sistema animando
357
+ * // @if (!motion.reduced()) { animação }
358
+ * ```
359
+ */
360
+ class HermesMotionService {
361
+ #document = inject(DOCUMENT);
362
+ #view = isPlatformBrowser(inject(PLATFORM_ID)) ? this.#document.defaultView : null;
363
+ #root = this.#view ? this.#document.documentElement : null;
364
+ #query = typeof this.#view?.matchMedia === 'function' ? this.#view.matchMedia(REDUCE_QUERY) : null;
365
+ #system = signal(!!this.#query?.matches, ...(ngDevMode ? [{ debugName: "#system" }] : /* istanbul ignore next */ []));
366
+ #preference = signal(motionPreferenceOf(this.#root), ...(ngDevMode ? [{ debugName: "#preference" }] : /* istanbul ignore next */ []));
367
+ /** A escolha: `'system'` (segue o sistema), `'reduce'` (sempre reduz) ou `'full'` (nunca reduz). */
368
+ preference = this.#preference.asReadonly();
369
+ /** O sistema operacional pede menos movimento (acompanha a troca com a página aberta). */
370
+ systemReduced = this.#system.asReadonly();
371
+ /** Vale reduzir agora: a escolha, ou o sistema quando a escolha é `'system'`. */
372
+ reduced = computed(() => {
373
+ const preference = this.#preference();
374
+ return preference === 'system' ? this.#system() : preference === 'reduce';
375
+ }, ...(ngDevMode ? [{ debugName: "reduced" }] : /* istanbul ignore next */ []));
376
+ constructor() {
377
+ const query = this.#query;
378
+ if (!query)
379
+ return;
380
+ const onChange = (event) => this.#system.set(event.matches);
381
+ query.addEventListener?.('change', onChange);
382
+ inject(DestroyRef).onDestroy(() => query.removeEventListener?.('change', onChange));
383
+ }
384
+ /** Troca a escolha na hora (o que não for `reduce`/`full` vira `system`). */
385
+ setPreference(preference) {
386
+ const value = normalizeMotionPreference(preference);
387
+ this.#preference.set(value);
388
+ applyMotionPreference(this.#root, value);
389
+ }
390
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: HermesMotionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
391
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: HermesMotionService, providedIn: 'root' });
392
+ }
393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: HermesMotionService, decorators: [{
394
+ type: Injectable,
395
+ args: [{ providedIn: 'root' }]
396
+ }], ctorParameters: () => [] });
397
+
344
398
  // Ponto de import `@trismegisto/angular/motion` (secundário do ng-packagr): número animado,
345
399
  // rearranjo FLIP e revelação ao rolar. Ao criar arquivo público novo na pasta, acrescente a linha.
346
400
 
@@ -348,5 +402,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
348
402
  * Generated bundle index. Do not edit.
349
403
  */
350
404
 
351
- export { AnimatedNumberComponent, FlipDirective, RevealDirective };
405
+ export { AnimatedNumberComponent, FlipDirective, HermesMotionService, RevealDirective };
352
406
  //# sourceMappingURL=trismegisto-angular-motion.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"trismegisto-angular-motion.mjs","sources":["../../src/motion/animated-number.component.ts","../../src/motion/flip.directive.ts","../../src/motion/reveal.directive.ts","../../src/motion/index.ts","../../src/motion/trismegisto-angular-motion.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n PLATFORM_ID,\n signal,\n untracked,\n} from '@angular/core';\nimport { countValueAt, prefersReducedMotion } from '@trismegisto/primitives';\nimport { HermesI18nService } from '@trismegisto/angular/i18n';\n\n/**\n * Exibe um valor numérico animando de `from` até `value`; a animação começa quando o elemento\n * aparece na tela (indicadores de painel, métricas de destaque).\n *\n * ```html\n * <hm-animated-number [value]=\"receita()\" [format]=\"{ style: 'currency', currency: 'BRL' }\" />\n * ```\n *\n * - Formata com `Intl.NumberFormat` no idioma atual da lib; trocar o idioma ou `format` reformata.\n * - O leitor de tela ouve só o valor final (texto oculto); a contagem é decorativa (`aria-hidden`).\n * - Espera mostrando `from` até aparecer na tela e então conta em `duration` ms. Depois, um valor novo\n * conta a partir do que está exibido.\n * - Com `prefers-reduced-motion`, no servidor ou com `duration` ≤ 0, mostra o valor final direto.\n */\n@Component({\n selector: 'hm-animated-number',\n template: `<span class=\"hm-animated-number__count\" aria-hidden=\"true\">{{ displayedText() }}</span><span\n class=\"hm-visually-hidden\"\n >{{ finalText() }}</span\n >`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-animated-number' },\n})\nexport class AnimatedNumberComponent {\n readonly value = input.required<number>();\n readonly format = input<Intl.NumberFormatOptions>({});\n /** Duração da contagem em ms. */\n readonly duration = input(1000);\n /** De onde a primeira contagem parte. */\n readonly from = input(0);\n\n private readonly i18n = inject(HermesI18nService);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Valor do quadro atual; `null` = o valor final, já formatado como tal. */\n private readonly displayed = signal<number | null>(null);\n /** Esperando entrar na vista (mostra `from`). */\n private readonly waiting = signal(false);\n private readonly visible = signal(false);\n private frame = 0;\n private observer?: IntersectionObserver;\n #settled = 0;\n\n private readonly locale = computed(() => this.i18n.messages().meta.locale);\n private readonly finalFormatter = computed(() => new Intl.NumberFormat(this.locale(), this.format()));\n // Os quadros não mostram mais casas do que o valor final mostra: a largura não oscila na contagem.\n private readonly frameFormatter = computed(() => {\n const final = this.finalFormatter();\n const shown = final.formatToParts(this.value()).find((part) => part.type === 'fraction')?.value.length ?? 0;\n const minimum = Math.min(final.resolvedOptions().minimumFractionDigits ?? 0, shown);\n try {\n return new Intl.NumberFormat(this.locale(), { ...this.format(), minimumFractionDigits: minimum, maximumFractionDigits: shown });\n } catch {\n return final;\n }\n });\n\n protected readonly finalText = computed(() => this.finalFormatter().format(this.value()));\n protected readonly displayedText = computed(() => {\n const shown = this.waiting() && this.duration() > 0 ? this.from() : this.displayed();\n return shown === null || shown === this.value() ? this.finalText() : this.frameFormatter().format(shown);\n });\n\n constructor() {\n const animated = this.browser && typeof requestAnimationFrame === 'function' && !prefersReducedMotion();\n if (animated) this.waiting.set(true);\n\n effect(() => {\n const target = this.value();\n untracked(() => {\n if (this.visible()) this.countTo(target);\n else if (!this.waiting()) this.#settled = target;\n });\n });\n\n if (animated) afterNextRender(() => this.observe());\n\n inject(DestroyRef).onDestroy(() => {\n if (this.frame) cancelAnimationFrame(this.frame);\n this.observer?.disconnect();\n });\n }\n\n private observe(): void {\n const start = () => {\n this.observer?.disconnect();\n this.observer = undefined;\n this.#settled = this.from();\n this.waiting.set(false);\n this.visible.set(true);\n this.countTo(this.value());\n };\n if (typeof IntersectionObserver === 'undefined') {\n start();\n return;\n }\n this.observer = new IntersectionObserver((entries) => {\n if (entries.some((entry) => entry.isIntersecting)) start();\n });\n this.observer.observe(this.host.nativeElement);\n }\n\n private countTo(target: number): void {\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n const origin = this.displayed() ?? this.#settled;\n const duration = this.duration();\n this.#settled = target;\n if (duration <= 0 || origin === target) {\n this.displayed.set(null);\n return;\n }\n this.displayed.set(origin);\n let startedAt: number | null = null;\n const step = (now: number) => {\n startedAt ??= now;\n const progress = (now - startedAt) / duration;\n if (progress >= 1) {\n this.frame = 0;\n this.displayed.set(null);\n return;\n }\n this.displayed.set(countValueAt(origin, target, progress));\n this.frame = requestAnimationFrame(step);\n };\n this.frame = requestAnimationFrame(step);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { afterNextRender, Directive, effect, ElementRef, inject, Injector, input, PLATFORM_ID, untracked } from '@angular/core';\nimport { FlipRect, flipDelta, parseCssDuration, prefersReducedMotion } from '@trismegisto/primitives';\n\nconst FALLBACK_DURATION = 240;\n\n/**\n * Rearranjo animado (técnica FLIP): quando a ordem dos itens muda, cada item anima o deslocamento até o\n * lugar novo, sem pulo.\n *\n * ```html\n * <ul [hmFlip]=\"sortKey()\" hmFlipItems=\"li\">\n * @for (row of sorted(); track row.id) { <li>{{ row.name }}</li> }\n * </ul>\n * ```\n *\n * - Automático: troque o valor de `hmFlip` sempre que reordenar. As posições são medidas em relação ao\n * próprio elemento, então rolar a página não conta como movimento.\n * - Manual: `#flip=\"hmFlip\"` e `flip.capture()` **antes** de mudar o estado; anima na renderização\n * seguinte.\n * - Item novo não anima; item removido não recebe nada. Foco, ordem no DOM e ARIA não são tocados.\n * - Duração e curva: `hmFlipDuration`/`hmFlipEasing`, ou os tokens `--hm-duration-standard` e\n * `--hm-ease-standard`. Com `prefers-reduced-motion` nada anima.\n */\n@Directive({\n selector: '[hmFlip]',\n exportAs: 'hmFlip',\n})\nexport class FlipDirective {\n /** Disparo: qualquer valor, trocado a cada reordenação. */\n readonly hmFlip = input<unknown>(undefined);\n /** Seletor dos itens dentro do elemento. Vazio = filhos diretos. */\n readonly hmFlipItems = input('');\n /** Duração em ms. `null` lê `--hm-duration-standard`. */\n readonly hmFlipDuration = input<number | null>(null);\n /** Curva CSS. Vazio lê `--hm-ease-standard`. */\n readonly hmFlipEasing = input('');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private positions = new Map<Element, FlipRect>();\n private captured = false;\n\n constructor() {\n if (!this.browser) return;\n let first = true;\n effect(() => {\n this.hmFlip();\n untracked(() => {\n if (first) {\n first = false;\n afterNextRender(() => (this.positions = this.measure()), { injector: this.injector });\n return;\n }\n if (this.captured) return;\n afterNextRender(() => this.play(), { injector: this.injector });\n });\n });\n }\n\n /** Guarda as posições agora; chame antes de mudar o estado. A animação sai na próxima renderização. */\n capture(): void {\n if (!this.browser || this.captured) return;\n this.positions = this.measure();\n this.captured = true;\n afterNextRender(\n () => {\n this.captured = false;\n this.play();\n },\n { injector: this.injector },\n );\n }\n\n private items(): Element[] {\n const host = this.host.nativeElement;\n const selector = this.hmFlipItems();\n return selector ? [...host.querySelectorAll(selector)] : [...host.children];\n }\n\n private measure(): Map<Element, FlipRect> {\n const origin = this.host.nativeElement.getBoundingClientRect();\n const result = new Map<Element, FlipRect>();\n for (const item of this.items()) {\n const box = item.getBoundingClientRect();\n result.set(item, { left: box.left - origin.left, top: box.top - origin.top, width: box.width, height: box.height });\n }\n return result;\n }\n\n private play(): void {\n const before = this.positions;\n const items = this.items();\n // Animação em curso falsearia a medida nova e se somaria à próxima.\n for (const item of items) item.getAnimations?.().forEach((animation) => animation.cancel());\n const after = this.measure();\n this.positions = after;\n if (prefersReducedMotion()) return;\n\n const style = getComputedStyle(this.host.nativeElement);\n const duration =\n this.hmFlipDuration() ?? parseCssDuration(style.getPropertyValue('--hm-duration-standard'), FALLBACK_DURATION);\n const easing = this.hmFlipEasing() || style.getPropertyValue('--hm-ease-standard').trim() || 'ease-out';\n\n for (const item of items) {\n const first = before.get(item);\n const last = after.get(item);\n if (!first || !last || typeof (item as HTMLElement).animate !== 'function') continue;\n const delta = flipDelta(first, last);\n if (!delta) continue;\n item.animate(\n [\n { transformOrigin: '0 0', transform: `translate(${delta.dx}px, ${delta.dy}px) scale(${delta.sx}, ${delta.sy})` },\n { transformOrigin: '0 0', transform: 'none' },\n ],\n { duration, easing },\n );\n }\n }\n}\n","import { afterNextRender, booleanAttribute, DestroyRef, Directive, ElementRef, inject, input, output, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { prefersReducedMotion } from '@trismegisto/primitives';\n\n/**\n * Revelação ao rolar: o bloco sobe um degrau e aparece quando entra na vista\n * (`IntersectionObserver`).\n *\n * **O conteúdo nunca sai da árvore de acessibilidade.** Só `opacity`/`translate` animam — nada de\n * `display: none`, `visibility: hidden` nem `aria-hidden` —, então o leitor de tela lê o bloco antes\n * de ele aparecer. E o estado inicial invisível só existe quando há como revelar:\n * - sem JavaScript, no servidor, sem `IntersectionObserver` ou com `prefers-reduced-motion`, o bloco\n * já nasce visível (a classe de espera nem é aplicada);\n * - foco por teclado dentro do bloco o revela na hora (nada focado fica invisível — WCAG 2.4.7);\n * - na impressão, tudo aparece.\n *\n * Duração e curva: `--hm-duration-slow` e `--hm-ease-decelerate`; deslocamento: `--hm-space-md`.\n * `hmRevealDelay` escalona blocos vizinhos (ex.: `[hmRevealDelay]=\"i * 60\"` num `@for`).\n */\n@Directive({\n selector: '[hmReveal]',\n exportAs: 'hmReveal',\n host: {\n class: 'hm-reveal',\n '[class.hm-reveal--pending]': 'pending()',\n '[style.--hm-reveal-delay]': \"hmRevealDelay() ? hmRevealDelay() + 'ms' : null\",\n '(focusin)': 'reveal()',\n },\n})\nexport class RevealDirective {\n /** Atraso em ms antes de revelar (para escalonar uma sequência). */\n readonly hmRevealDelay = input(0);\n /**\n * Quanto o topo do bloco precisa subir na vista para revelar, em fração da altura da vista\n * (0 a 0,9; `0.15` = quando passa dos 85% de baixo). Margem, não fração do bloco: um bloco mais\n * alto que a tela também revela.\n */\n readonly hmRevealThreshold = input(0.15);\n /** `false` esconde de novo ao sair da vista (revela a cada passagem). */\n readonly hmRevealOnce = input(true, { transform: booleanAttribute });\n /** Emite quando o bloco é revelado. */\n readonly revealed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Esperando entrar na vista (é a única fase em que o bloco fica transparente). */\n protected readonly pending = signal(false);\n private observer?: IntersectionObserver;\n\n constructor() {\n afterNextRender(() => this.observe());\n inject(DestroyRef).onDestroy(() => this.observer?.disconnect());\n }\n\n /** Revela agora (também chamado no foco por teclado). */\n reveal(): void {\n if (!this.pending()) return;\n this.pending.set(false);\n this.revealed.emit();\n if (this.hmRevealOnce()) this.observer?.disconnect();\n }\n\n private observe(): void {\n if (!this.browser || typeof IntersectionObserver === 'undefined' || prefersReducedMotion()) return;\n const inset = Math.round(Math.min(Math.max(this.hmRevealThreshold(), 0), 0.9) * 100);\n // Já na vista (ou acima dela) ao montar: fica como está, sem piscar transparente e voltar.\n const rect = this.host.nativeElement.getBoundingClientRect();\n if (rect.top < window.innerHeight * (1 - inset / 100)) {\n if (this.hmRevealOnce()) return;\n } else {\n this.pending.set(true);\n }\n this.observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n // Acima da vista (pulou com âncora ou rolagem rápida) também conta como visto.\n if (entry.isIntersecting || entry.boundingClientRect.bottom < (entry.rootBounds?.top ?? 0)) this.reveal();\n else if (!this.hmRevealOnce()) this.pending.set(true);\n }\n },\n { rootMargin: `0px 0px -${inset}% 0px` },\n );\n this.observer.observe(this.host.nativeElement);\n }\n}\n","// Ponto de import `@trismegisto/angular/motion` (secundário do ng-packagr): número animado,\n// rearranjo FLIP e revelação ao rolar. Ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './animated-number.component';\nexport * from './flip.directive';\nexport * from './reveal.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAkBA;;;;;;;;;;;;;AAaG;MAUU,uBAAuB,CAAA;AACzB,IAAA,KAAK,GAAG,KAAK,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AAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,EAAA,0BAAA,EAAA,WAAA,EAAA,yBAAA,EAAA,iDAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,WAAW;AAClB,wBAAA,4BAA4B,EAAE,WAAW;AACzC,wBAAA,2BAA2B,EAAE,iDAAiD;AAC9E,wBAAA,WAAW,EAAE,UAAU;AACxB,qBAAA;AACF,iBAAA;;;AC5BD;AACA;;ACDA;;AAEG;;"}
1
+ {"version":3,"file":"trismegisto-angular-motion.mjs","sources":["../../src/motion/animated-number.component.ts","../../src/motion/flip.directive.ts","../../src/motion/reveal.directive.ts","../../src/motion/motion.service.ts","../../src/motion/index.ts","../../src/motion/trismegisto-angular-motion.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n PLATFORM_ID,\n signal,\n untracked,\n} from '@angular/core';\nimport { countValueAt, prefersReducedMotion } from '@trismegisto/primitives';\nimport { HermesI18nService } from '@trismegisto/angular/i18n';\n\n/**\n * Exibe um valor numérico animando de `from` até `value`; a animação começa quando o elemento\n * aparece na tela (indicadores de painel, métricas de destaque).\n *\n * ```html\n * <hm-animated-number [value]=\"receita()\" [format]=\"{ style: 'currency', currency: 'BRL' }\" />\n * ```\n *\n * - Formata com `Intl.NumberFormat` no idioma atual da lib; trocar o idioma ou `format` reformata.\n * - O leitor de tela ouve só o valor final (texto oculto); a contagem é decorativa (`aria-hidden`).\n * - Espera mostrando `from` até aparecer na tela e então conta em `duration` ms. Depois, um valor novo\n * conta a partir do que está exibido.\n * - Com `prefers-reduced-motion`, no servidor ou com `duration` ≤ 0, mostra o valor final direto.\n */\n@Component({\n selector: 'hm-animated-number',\n template: `<span class=\"hm-animated-number__count\" aria-hidden=\"true\">{{ displayedText() }}</span><span\n class=\"hm-visually-hidden\"\n >{{ finalText() }}</span\n >`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-animated-number' },\n})\nexport class AnimatedNumberComponent {\n readonly value = input.required<number>();\n readonly format = input<Intl.NumberFormatOptions>({});\n /** Duração da contagem em ms. */\n readonly duration = input(1000);\n /** De onde a primeira contagem parte. */\n readonly from = input(0);\n\n private readonly i18n = inject(HermesI18nService);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Valor do quadro atual; `null` = o valor final, já formatado como tal. */\n private readonly displayed = signal<number | null>(null);\n /** Esperando entrar na vista (mostra `from`). */\n private readonly waiting = signal(false);\n private readonly visible = signal(false);\n private frame = 0;\n private observer?: IntersectionObserver;\n #settled = 0;\n\n private readonly locale = computed(() => this.i18n.messages().meta.locale);\n private readonly finalFormatter = computed(() => new Intl.NumberFormat(this.locale(), this.format()));\n // Os quadros não mostram mais casas do que o valor final mostra: a largura não oscila na contagem.\n private readonly frameFormatter = computed(() => {\n const final = this.finalFormatter();\n const shown = final.formatToParts(this.value()).find((part) => part.type === 'fraction')?.value.length ?? 0;\n const minimum = Math.min(final.resolvedOptions().minimumFractionDigits ?? 0, shown);\n try {\n return new Intl.NumberFormat(this.locale(), { ...this.format(), minimumFractionDigits: minimum, maximumFractionDigits: shown });\n } catch {\n return final;\n }\n });\n\n protected readonly finalText = computed(() => this.finalFormatter().format(this.value()));\n protected readonly displayedText = computed(() => {\n const shown = this.waiting() && this.duration() > 0 ? this.from() : this.displayed();\n return shown === null || shown === this.value() ? this.finalText() : this.frameFormatter().format(shown);\n });\n\n constructor() {\n const animated = this.browser && typeof requestAnimationFrame === 'function' && !prefersReducedMotion();\n if (animated) this.waiting.set(true);\n\n effect(() => {\n const target = this.value();\n untracked(() => {\n if (this.visible()) this.countTo(target);\n else if (!this.waiting()) this.#settled = target;\n });\n });\n\n if (animated) afterNextRender(() => this.observe());\n\n inject(DestroyRef).onDestroy(() => {\n if (this.frame) cancelAnimationFrame(this.frame);\n this.observer?.disconnect();\n });\n }\n\n private observe(): void {\n const start = () => {\n this.observer?.disconnect();\n this.observer = undefined;\n this.#settled = this.from();\n this.waiting.set(false);\n this.visible.set(true);\n this.countTo(this.value());\n };\n if (typeof IntersectionObserver === 'undefined') {\n start();\n return;\n }\n this.observer = new IntersectionObserver((entries) => {\n if (entries.some((entry) => entry.isIntersecting)) start();\n });\n this.observer.observe(this.host.nativeElement);\n }\n\n private countTo(target: number): void {\n if (this.frame) cancelAnimationFrame(this.frame);\n this.frame = 0;\n const origin = this.displayed() ?? this.#settled;\n const duration = this.duration();\n this.#settled = target;\n if (duration <= 0 || origin === target) {\n this.displayed.set(null);\n return;\n }\n this.displayed.set(origin);\n let startedAt: number | null = null;\n const step = (now: number) => {\n startedAt ??= now;\n const progress = (now - startedAt) / duration;\n if (progress >= 1) {\n this.frame = 0;\n this.displayed.set(null);\n return;\n }\n this.displayed.set(countValueAt(origin, target, progress));\n this.frame = requestAnimationFrame(step);\n };\n this.frame = requestAnimationFrame(step);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { afterNextRender, Directive, effect, ElementRef, inject, Injector, input, PLATFORM_ID, untracked } from '@angular/core';\nimport { FlipRect, flipDelta, parseCssDuration, prefersReducedMotion } from '@trismegisto/primitives';\n\nconst FALLBACK_DURATION = 240;\n\n/**\n * Rearranjo animado (técnica FLIP): quando a ordem dos itens muda, cada item anima o deslocamento até o\n * lugar novo, sem pulo.\n *\n * ```html\n * <ul [hmFlip]=\"sortKey()\" hmFlipItems=\"li\">\n * @for (row of sorted(); track row.id) { <li>{{ row.name }}</li> }\n * </ul>\n * ```\n *\n * - Automático: troque o valor de `hmFlip` sempre que reordenar. As posições são medidas em relação ao\n * próprio elemento, então rolar a página não conta como movimento.\n * - Manual: `#flip=\"hmFlip\"` e `flip.capture()` **antes** de mudar o estado; anima na renderização\n * seguinte.\n * - Item novo não anima; item removido não recebe nada. Foco, ordem no DOM e ARIA não são tocados.\n * - Duração e curva: `hmFlipDuration`/`hmFlipEasing`, ou os tokens `--hm-duration-standard` e\n * `--hm-ease-standard`. Com `prefers-reduced-motion` nada anima.\n */\n@Directive({\n selector: '[hmFlip]',\n exportAs: 'hmFlip',\n})\nexport class FlipDirective {\n /** Disparo: qualquer valor, trocado a cada reordenação. */\n readonly hmFlip = input<unknown>(undefined);\n /** Seletor dos itens dentro do elemento. Vazio = filhos diretos. */\n readonly hmFlipItems = input('');\n /** Duração em ms. `null` lê `--hm-duration-standard`. */\n readonly hmFlipDuration = input<number | null>(null);\n /** Curva CSS. Vazio lê `--hm-ease-standard`. */\n readonly hmFlipEasing = input('');\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private positions = new Map<Element, FlipRect>();\n private captured = false;\n\n constructor() {\n if (!this.browser) return;\n let first = true;\n effect(() => {\n this.hmFlip();\n untracked(() => {\n if (first) {\n first = false;\n afterNextRender(() => (this.positions = this.measure()), { injector: this.injector });\n return;\n }\n if (this.captured) return;\n afterNextRender(() => this.play(), { injector: this.injector });\n });\n });\n }\n\n /** Guarda as posições agora; chame antes de mudar o estado. A animação sai na próxima renderização. */\n capture(): void {\n if (!this.browser || this.captured) return;\n this.positions = this.measure();\n this.captured = true;\n afterNextRender(\n () => {\n this.captured = false;\n this.play();\n },\n { injector: this.injector },\n );\n }\n\n private items(): Element[] {\n const host = this.host.nativeElement;\n const selector = this.hmFlipItems();\n return selector ? [...host.querySelectorAll(selector)] : [...host.children];\n }\n\n private measure(): Map<Element, FlipRect> {\n const origin = this.host.nativeElement.getBoundingClientRect();\n const result = new Map<Element, FlipRect>();\n for (const item of this.items()) {\n const box = item.getBoundingClientRect();\n result.set(item, { left: box.left - origin.left, top: box.top - origin.top, width: box.width, height: box.height });\n }\n return result;\n }\n\n private play(): void {\n const before = this.positions;\n const items = this.items();\n // Animação em curso falsearia a medida nova e se somaria à próxima.\n for (const item of items) item.getAnimations?.().forEach((animation) => animation.cancel());\n const after = this.measure();\n this.positions = after;\n if (prefersReducedMotion()) return;\n\n const style = getComputedStyle(this.host.nativeElement);\n const duration =\n this.hmFlipDuration() ?? parseCssDuration(style.getPropertyValue('--hm-duration-standard'), FALLBACK_DURATION);\n const easing = this.hmFlipEasing() || style.getPropertyValue('--hm-ease-standard').trim() || 'ease-out';\n\n for (const item of items) {\n const first = before.get(item);\n const last = after.get(item);\n if (!first || !last || typeof (item as HTMLElement).animate !== 'function') continue;\n const delta = flipDelta(first, last);\n if (!delta) continue;\n item.animate(\n [\n { transformOrigin: '0 0', transform: `translate(${delta.dx}px, ${delta.dy}px) scale(${delta.sx}, ${delta.sy})` },\n { transformOrigin: '0 0', transform: 'none' },\n ],\n { duration, easing },\n );\n }\n }\n}\n","import { afterNextRender, booleanAttribute, DestroyRef, Directive, ElementRef, inject, input, output, PLATFORM_ID, signal } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { prefersReducedMotion } from '@trismegisto/primitives';\n\n/**\n * Revelação ao rolar: o bloco sobe um degrau e aparece quando entra na vista\n * (`IntersectionObserver`).\n *\n * **O conteúdo nunca sai da árvore de acessibilidade.** Só `opacity`/`translate` animam — nada de\n * `display: none`, `visibility: hidden` nem `aria-hidden` —, então o leitor de tela lê o bloco antes\n * de ele aparecer. E o estado inicial invisível só existe quando há como revelar:\n * - sem JavaScript, no servidor, sem `IntersectionObserver` ou com `prefers-reduced-motion`, o bloco\n * já nasce visível (a classe de espera nem é aplicada);\n * - foco por teclado dentro do bloco o revela na hora (nada focado fica invisível — WCAG 2.4.7);\n * - na impressão, tudo aparece.\n *\n * Duração e curva: `--hm-duration-slow` e `--hm-ease-decelerate`; deslocamento: `--hm-space-md`.\n * `hmRevealDelay` escalona blocos vizinhos (ex.: `[hmRevealDelay]=\"i * 60\"` num `@for`).\n */\n@Directive({\n selector: '[hmReveal]',\n exportAs: 'hmReveal',\n host: {\n class: 'hm-reveal',\n '[class.hm-reveal--pending]': 'pending()',\n '[style.--hm-reveal-delay]': \"hmRevealDelay() ? hmRevealDelay() + 'ms' : null\",\n '(focusin)': 'reveal()',\n },\n})\nexport class RevealDirective {\n /** Atraso em ms antes de revelar (para escalonar uma sequência). */\n readonly hmRevealDelay = input(0);\n /**\n * Quanto o topo do bloco precisa subir na vista para revelar, em fração da altura da vista\n * (0 a 0,9; `0.15` = quando passa dos 85% de baixo). Margem, não fração do bloco: um bloco mais\n * alto que a tela também revela.\n */\n readonly hmRevealThreshold = input(0.15);\n /** `false` esconde de novo ao sair da vista (revela a cada passagem). */\n readonly hmRevealOnce = input(true, { transform: booleanAttribute });\n /** Emite quando o bloco é revelado. */\n readonly revealed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n /** Esperando entrar na vista (é a única fase em que o bloco fica transparente). */\n protected readonly pending = signal(false);\n private observer?: IntersectionObserver;\n\n constructor() {\n afterNextRender(() => this.observe());\n inject(DestroyRef).onDestroy(() => this.observer?.disconnect());\n }\n\n /** Revela agora (também chamado no foco por teclado). */\n reveal(): void {\n if (!this.pending()) return;\n this.pending.set(false);\n this.revealed.emit();\n if (this.hmRevealOnce()) this.observer?.disconnect();\n }\n\n private observe(): void {\n if (!this.browser || typeof IntersectionObserver === 'undefined' || prefersReducedMotion()) return;\n const inset = Math.round(Math.min(Math.max(this.hmRevealThreshold(), 0), 0.9) * 100);\n // Já na vista (ou acima dela) ao montar: fica como está, sem piscar transparente e voltar.\n const rect = this.host.nativeElement.getBoundingClientRect();\n if (rect.top < window.innerHeight * (1 - inset / 100)) {\n if (this.hmRevealOnce()) return;\n } else {\n this.pending.set(true);\n }\n this.observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n // Acima da vista (pulou com âncora ou rolagem rápida) também conta como visto.\n if (entry.isIntersecting || entry.boundingClientRect.bottom < (entry.rootBounds?.top ?? 0)) this.reveal();\n else if (!this.hmRevealOnce()) this.pending.set(true);\n }\n },\n { rootMargin: `0px 0px -${inset}% 0px` },\n );\n this.observer.observe(this.host.nativeElement);\n }\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Injectable, PLATFORM_ID, computed, inject, signal } from '@angular/core';\nimport {\n type HermesMotionPreference,\n applyMotionPreference,\n motionPreferenceOf,\n normalizeMotionPreference,\n} from '@trismegisto/primitives';\n\nconst REDUCE_QUERY = '(prefers-reduced-motion: reduce)';\n\n/**\n * Movimento do app: a escolha da pessoa (`'system'`, `'reduce'`, `'full'`) por cima do\n * `prefers-reduced-motion` do sistema operacional.\n *\n * A escolha vira `data-motion` no `<html>` (ver `HERMES_MOTION_ATTRIBUTE` em `@trismegisto/primitives`), que\n * é o único lugar onde ela mora: o CSS do `@trismegisto/core` (transições, animações, rolagem suave) e\n * `prefersReducedMotion()` (número animado, FLIP, revelação, carrossel, rolagem dos visualizadores) leem\n * dali antes da media query. Quem persiste a escolha é o app (no spine, `SpinePreferencesService`).\n *\n * ```ts\n * readonly motion = inject(HermesMotionService);\n * motion.setPreference('reduce'); // reduz mesmo com o sistema animando\n * // @if (!motion.reduced()) { animação }\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class HermesMotionService {\n readonly #document = inject(DOCUMENT);\n readonly #view = isPlatformBrowser(inject(PLATFORM_ID)) ? this.#document.defaultView : null;\n readonly #root = this.#view ? this.#document.documentElement : null;\n readonly #query = typeof this.#view?.matchMedia === 'function' ? this.#view.matchMedia(REDUCE_QUERY) : null;\n readonly #system = signal(!!this.#query?.matches);\n readonly #preference = signal<HermesMotionPreference>(motionPreferenceOf(this.#root));\n\n /** A escolha: `'system'` (segue o sistema), `'reduce'` (sempre reduz) ou `'full'` (nunca reduz). */\n readonly preference = this.#preference.asReadonly();\n\n /** O sistema operacional pede menos movimento (acompanha a troca com a página aberta). */\n readonly systemReduced = this.#system.asReadonly();\n\n /** Vale reduzir agora: a escolha, ou o sistema quando a escolha é `'system'`. */\n readonly reduced = computed(() => {\n const preference = this.#preference();\n return preference === 'system' ? this.#system() : preference === 'reduce';\n });\n\n constructor() {\n const query = this.#query;\n if (!query) return;\n const onChange = (event: MediaQueryListEvent) => this.#system.set(event.matches);\n query.addEventListener?.('change', onChange);\n inject(DestroyRef).onDestroy(() => query.removeEventListener?.('change', onChange));\n }\n\n /** Troca a escolha na hora (o que não for `reduce`/`full` vira `system`). */\n setPreference(preference: HermesMotionPreference): void {\n const value = normalizeMotionPreference(preference);\n this.#preference.set(value);\n applyMotionPreference(this.#root, value);\n }\n}\n","// Ponto de import `@trismegisto/angular/motion` (secundário do ng-packagr): número animado,\n// rearranjo FLIP e revelação ao rolar. Ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './animated-number.component';\nexport * from './flip.directive';\nexport * from './reveal.directive';\nexport * from './motion.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAkBA;;;;;;;;;;;;;AAaG;MAUU,uBAAuB,CAAA;AACzB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AAChC,IAAA,MAAM,GAAG,KAAK,CAA2B,EAAE,6EAAC;;AAE5C,IAAA,QAAQ,GAAG,KAAK,CA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A,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA;;4FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC1BlC;AACA;;ACDA;;AAEG;;"}
@@ -54,6 +54,8 @@ class ReorderListComponent extends HermesFormFieldBase {
54
54
  size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
55
55
  /** Mostra em cada linha o botão que remove o item da lista. */
56
56
  removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
+ /** Texto da lista vazia. Vazio = catálogo ("Nada para ordenar."). */
58
+ emptyText = input('', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
57
59
  /** Movimento confirmado: item, posição de origem e de destino (índices a partir de 0). */
58
60
  moved = output();
59
61
  /** Item removido pelo ✕ (a lista nova já foi publicada em `items`/formulário). */
@@ -153,12 +155,12 @@ class ReorderListComponent extends HermesFormFieldBase {
153
155
  this.markTouched();
154
156
  }
155
157
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ReorderListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
156
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: ReorderListComponent, isStandalone: true, selector: "hm-reorder-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelHidden: { classPropertyName: "labelHidden", publicName: "labelHidden", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", moved: "moved", removed: "removed" }, host: { classAttribute: "hm-reorder-list-host" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"hm-reorder-list hm-reorder-list--{{ size() }}\"\n [class.hm-reorder-list--disabled]=\"isDisabled()\"\n [class.hm-reorder-list--invalid]=\"!!errorText()\"\n [class.hm-reorder-list--dragging]=\"dragging()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : groupLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n @if (label()) {\n <div class=\"hm-reorder-list__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-reorder-list__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-reorder-list__required\">{{ fieldText.required }}</span>\n }\n </div>\n }\n\n @if (displayed().length) {\n <!-- Lista orden\u00E1vel do servi\u00E7o de arrastar e soltar: a ordem nova s\u00F3 chega (via `sorted`) ao soltar. -->\n <ul\n class=\"hm-reorder-list__list\"\n [hmSortable]=\"displayed()\"\n [hmSortableLabel]=\"groupLabel()\"\n [hmSortableDisabled]=\"isDisabled()\"\n (sorted)=\"onSorted($event)\"\n >\n @for (item of displayed(); track item.id; let i = $index) {\n <li\n class=\"hm-reorder-list__item\"\n [class.hm-reorder-list__item--grabbed]=\"grabbedId() === item.id\"\n [hmDraggable]=\"item\"\n [hmDragType]=\"dragType\"\n [hmDragContained]=\"true\"\n [hmDragLabel]=\"item.label\"\n [hmDragDisabled]=\"isDisabled()\"\n (dragStarted)=\"onDragStarted(item, $event)\"\n (dragEnded)=\"onDragEnded($event)\"\n >\n <!-- A al\u00E7a \u00E9 o \u00FAnico ponto de pegar (ponteiro, toque e teclado): um bot\u00E3o com nome; o `hmDragHandle`\n p\u00F5e a descri\u00E7\u00E3o do papel, as instru\u00E7\u00F5es de teclado e o `aria-pressed`. -->\n <button\n type=\"button\"\n class=\"hm-reorder-list__handle\"\n hmDragHandle\n [attr.aria-label]=\"handleLabel(item)\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, i)\"\n (blur)=\"onHandleBlur()\"\n >\n <hm-icon shape=\"drag-handle\" />\n </button>\n <div class=\"hm-reorder-list__content\">\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\" />\n } @else {\n <span class=\"hm-reorder-list__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"hm-reorder-list__description\">{{ item.description }}</span>\n }\n }\n </div>\n <!-- Na outra ponta da linha, longe da al\u00E7a: \u00E9 a \u00FAnica a\u00E7\u00E3o destrutiva e n\u00E3o pode ser pega por engano. -->\n @if (removable()) {\n <button\n type=\"button\"\n class=\"hm-reorder-list__remove\"\n [attr.aria-label]=\"removeLabel(item)\"\n [disabled]=\"isDisabled()\"\n (click)=\"remove(item, i)\"\n >\n <hm-icon shape=\"times\" />\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <!-- tabindex=\"-1\": recebe o foco quando o \u00FAltimo item \u00E9 removido (o \u2715 acionado some). -->\n <p class=\"hm-reorder-list__empty\" tabindex=\"-1\">{{ text().empty }}</p>\n }\n\n @if (removable()) {\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n }\n\n @if (hint()) {\n <p class=\"hm-reorder-list__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-reorder-list__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SortableDirective, selector: "[hmSortable]", inputs: ["hmSortable", "hmSortableGroup", "hmSortableOrientation", "hmSortableColumns", "hmSortableLabel", "hmSortableDisabled", "hmSortableAccepts"], outputs: ["hmSortableChange", "sorted"], exportAs: ["hmSortable"] }, { kind: "directive", type: DraggableDirective, selector: "[hmDraggable]", inputs: ["hmDraggable", "hmDragType", "hmDragLabel", "hmDragDisabled", "hmDragContained", "hmDragThreshold", "hmDragTouchDelay"], outputs: ["dragStarted", "dragEnded"], exportAs: ["hmDraggable"] }, { kind: "directive", type: DragHandleDirective, selector: "[hmDragHandle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: ReorderListComponent, isStandalone: true, selector: "hm-reorder-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelHidden: { classPropertyName: "labelHidden", publicName: "labelHidden", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange", moved: "moved", removed: "removed" }, host: { classAttribute: "hm-reorder-list-host" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"hm-reorder-list hm-reorder-list--{{ size() }}\"\n [class.hm-reorder-list--disabled]=\"isDisabled()\"\n [class.hm-reorder-list--invalid]=\"!!errorText()\"\n [class.hm-reorder-list--dragging]=\"dragging()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : groupLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n @if (label()) {\n <div class=\"hm-reorder-list__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-reorder-list__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-reorder-list__required\">{{ fieldText.required }}</span>\n }\n </div>\n }\n\n @if (displayed().length) {\n <!-- Lista orden\u00E1vel do servi\u00E7o de arrastar e soltar: a ordem nova s\u00F3 chega (via `sorted`) ao soltar. -->\n <ul\n class=\"hm-reorder-list__list\"\n [hmSortable]=\"displayed()\"\n [hmSortableLabel]=\"groupLabel()\"\n [hmSortableDisabled]=\"isDisabled()\"\n (sorted)=\"onSorted($event)\"\n >\n @for (item of displayed(); track item.id; let i = $index) {\n <li\n class=\"hm-reorder-list__item\"\n [class.hm-reorder-list__item--grabbed]=\"grabbedId() === item.id\"\n [hmDraggable]=\"item\"\n [hmDragType]=\"dragType\"\n [hmDragContained]=\"true\"\n [hmDragLabel]=\"item.label\"\n [hmDragDisabled]=\"isDisabled()\"\n (dragStarted)=\"onDragStarted(item, $event)\"\n (dragEnded)=\"onDragEnded($event)\"\n >\n <!-- A al\u00E7a \u00E9 o \u00FAnico ponto de pegar (ponteiro, toque e teclado): um bot\u00E3o com nome; o `hmDragHandle`\n p\u00F5e a descri\u00E7\u00E3o do papel, as instru\u00E7\u00F5es de teclado e o `aria-pressed`. -->\n <button\n type=\"button\"\n class=\"hm-reorder-list__handle\"\n hmDragHandle\n [attr.aria-label]=\"handleLabel(item)\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, i)\"\n (blur)=\"onHandleBlur()\"\n >\n <hm-icon shape=\"drag-handle\" />\n </button>\n <div class=\"hm-reorder-list__content\">\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\" />\n } @else {\n <span class=\"hm-reorder-list__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"hm-reorder-list__description\">{{ item.description }}</span>\n }\n }\n </div>\n <!-- Na outra ponta da linha, longe da al\u00E7a: \u00E9 a \u00FAnica a\u00E7\u00E3o destrutiva e n\u00E3o pode ser pega por engano. -->\n @if (removable()) {\n <button\n type=\"button\"\n class=\"hm-reorder-list__remove\"\n [attr.aria-label]=\"removeLabel(item)\"\n [disabled]=\"isDisabled()\"\n (click)=\"remove(item, i)\"\n >\n <hm-icon shape=\"times\" />\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <!-- tabindex=\"-1\": recebe o foco quando o \u00FAltimo item \u00E9 removido (o \u2715 acionado some). -->\n <p class=\"hm-reorder-list__empty\" tabindex=\"-1\">{{ emptyText() || text().empty }}</p>\n }\n\n @if (removable()) {\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n }\n\n @if (hint()) {\n <p class=\"hm-reorder-list__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-reorder-list__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SortableDirective, selector: "[hmSortable]", inputs: ["hmSortable", "hmSortableGroup", "hmSortableOrientation", "hmSortableColumns", "hmSortableLabel", "hmSortableDisabled", "hmSortableAccepts"], outputs: ["hmSortableChange", "sorted"], exportAs: ["hmSortable"] }, { kind: "directive", type: DraggableDirective, selector: "[hmDraggable]", inputs: ["hmDraggable", "hmDragType", "hmDragLabel", "hmDragDisabled", "hmDragContained", "hmDragThreshold", "hmDragTouchDelay"], outputs: ["dragStarted", "dragEnded"], exportAs: ["hmDraggable"] }, { kind: "directive", type: DragHandleDirective, selector: "[hmDragHandle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
157
159
  }
158
160
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: ReorderListComponent, decorators: [{
159
161
  type: Component,
160
- args: [{ selector: 'hm-reorder-list', imports: [IconComponent, NgTemplateOutlet, SortableDirective, DraggableDirective, DragHandleDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-reorder-list-host' }, template: "<div\n class=\"hm-reorder-list hm-reorder-list--{{ size() }}\"\n [class.hm-reorder-list--disabled]=\"isDisabled()\"\n [class.hm-reorder-list--invalid]=\"!!errorText()\"\n [class.hm-reorder-list--dragging]=\"dragging()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : groupLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n @if (label()) {\n <div class=\"hm-reorder-list__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-reorder-list__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-reorder-list__required\">{{ fieldText.required }}</span>\n }\n </div>\n }\n\n @if (displayed().length) {\n <!-- Lista orden\u00E1vel do servi\u00E7o de arrastar e soltar: a ordem nova s\u00F3 chega (via `sorted`) ao soltar. -->\n <ul\n class=\"hm-reorder-list__list\"\n [hmSortable]=\"displayed()\"\n [hmSortableLabel]=\"groupLabel()\"\n [hmSortableDisabled]=\"isDisabled()\"\n (sorted)=\"onSorted($event)\"\n >\n @for (item of displayed(); track item.id; let i = $index) {\n <li\n class=\"hm-reorder-list__item\"\n [class.hm-reorder-list__item--grabbed]=\"grabbedId() === item.id\"\n [hmDraggable]=\"item\"\n [hmDragType]=\"dragType\"\n [hmDragContained]=\"true\"\n [hmDragLabel]=\"item.label\"\n [hmDragDisabled]=\"isDisabled()\"\n (dragStarted)=\"onDragStarted(item, $event)\"\n (dragEnded)=\"onDragEnded($event)\"\n >\n <!-- A al\u00E7a \u00E9 o \u00FAnico ponto de pegar (ponteiro, toque e teclado): um bot\u00E3o com nome; o `hmDragHandle`\n p\u00F5e a descri\u00E7\u00E3o do papel, as instru\u00E7\u00F5es de teclado e o `aria-pressed`. -->\n <button\n type=\"button\"\n class=\"hm-reorder-list__handle\"\n hmDragHandle\n [attr.aria-label]=\"handleLabel(item)\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, i)\"\n (blur)=\"onHandleBlur()\"\n >\n <hm-icon shape=\"drag-handle\" />\n </button>\n <div class=\"hm-reorder-list__content\">\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\" />\n } @else {\n <span class=\"hm-reorder-list__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"hm-reorder-list__description\">{{ item.description }}</span>\n }\n }\n </div>\n <!-- Na outra ponta da linha, longe da al\u00E7a: \u00E9 a \u00FAnica a\u00E7\u00E3o destrutiva e n\u00E3o pode ser pega por engano. -->\n @if (removable()) {\n <button\n type=\"button\"\n class=\"hm-reorder-list__remove\"\n [attr.aria-label]=\"removeLabel(item)\"\n [disabled]=\"isDisabled()\"\n (click)=\"remove(item, i)\"\n >\n <hm-icon shape=\"times\" />\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <!-- tabindex=\"-1\": recebe o foco quando o \u00FAltimo item \u00E9 removido (o \u2715 acionado some). -->\n <p class=\"hm-reorder-list__empty\" tabindex=\"-1\">{{ text().empty }}</p>\n }\n\n @if (removable()) {\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n }\n\n @if (hint()) {\n <p class=\"hm-reorder-list__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-reorder-list__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n" }]
161
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelHidden", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], moved: [{ type: i0.Output, args: ["moved"] }], removed: [{ type: i0.Output, args: ["removed"] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
162
+ args: [{ selector: 'hm-reorder-list', imports: [IconComponent, NgTemplateOutlet, SortableDirective, DraggableDirective, DragHandleDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'hm-reorder-list-host' }, template: "<div\n class=\"hm-reorder-list hm-reorder-list--{{ size() }}\"\n [class.hm-reorder-list--disabled]=\"isDisabled()\"\n [class.hm-reorder-list--invalid]=\"!!errorText()\"\n [class.hm-reorder-list--dragging]=\"dragging()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : groupLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n @if (label()) {\n <div class=\"hm-reorder-list__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-reorder-list__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-reorder-list__required\">{{ fieldText.required }}</span>\n }\n </div>\n }\n\n @if (displayed().length) {\n <!-- Lista orden\u00E1vel do servi\u00E7o de arrastar e soltar: a ordem nova s\u00F3 chega (via `sorted`) ao soltar. -->\n <ul\n class=\"hm-reorder-list__list\"\n [hmSortable]=\"displayed()\"\n [hmSortableLabel]=\"groupLabel()\"\n [hmSortableDisabled]=\"isDisabled()\"\n (sorted)=\"onSorted($event)\"\n >\n @for (item of displayed(); track item.id; let i = $index) {\n <li\n class=\"hm-reorder-list__item\"\n [class.hm-reorder-list__item--grabbed]=\"grabbedId() === item.id\"\n [hmDraggable]=\"item\"\n [hmDragType]=\"dragType\"\n [hmDragContained]=\"true\"\n [hmDragLabel]=\"item.label\"\n [hmDragDisabled]=\"isDisabled()\"\n (dragStarted)=\"onDragStarted(item, $event)\"\n (dragEnded)=\"onDragEnded($event)\"\n >\n <!-- A al\u00E7a \u00E9 o \u00FAnico ponto de pegar (ponteiro, toque e teclado): um bot\u00E3o com nome; o `hmDragHandle`\n p\u00F5e a descri\u00E7\u00E3o do papel, as instru\u00E7\u00F5es de teclado e o `aria-pressed`. -->\n <button\n type=\"button\"\n class=\"hm-reorder-list__handle\"\n hmDragHandle\n [attr.aria-label]=\"handleLabel(item)\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, i)\"\n (blur)=\"onHandleBlur()\"\n >\n <hm-icon shape=\"drag-handle\" />\n </button>\n <div class=\"hm-reorder-list__content\">\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\" />\n } @else {\n <span class=\"hm-reorder-list__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"hm-reorder-list__description\">{{ item.description }}</span>\n }\n }\n </div>\n <!-- Na outra ponta da linha, longe da al\u00E7a: \u00E9 a \u00FAnica a\u00E7\u00E3o destrutiva e n\u00E3o pode ser pega por engano. -->\n @if (removable()) {\n <button\n type=\"button\"\n class=\"hm-reorder-list__remove\"\n [attr.aria-label]=\"removeLabel(item)\"\n [disabled]=\"isDisabled()\"\n (click)=\"remove(item, i)\"\n >\n <hm-icon shape=\"times\" />\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <!-- tabindex=\"-1\": recebe o foco quando o \u00FAltimo item \u00E9 removido (o \u2715 acionado some). -->\n <p class=\"hm-reorder-list__empty\" tabindex=\"-1\">{{ emptyText() || text().empty }}</p>\n }\n\n @if (removable()) {\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n }\n\n @if (hint()) {\n <p class=\"hm-reorder-list__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-reorder-list__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n" }]
163
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelHidden", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], moved: [{ type: i0.Output, args: ["moved"] }], removed: [{ type: i0.Output, args: ["removed"] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
162
164
 
163
165
  // Ponto de import `@trismegisto/angular/reorder-list` (secundário do ng-packagr): o que o public-api e as outras pastas usam
164
166
  // daqui. Gerado em 2026-10-03; ao criar arquivo público novo na pasta, acrescente a linha.
@@ -1 +1 @@
1
- {"version":3,"file":"trismegisto-angular-reorder-list.mjs","sources":["../../src/reorder-list/icons.generated.ts","../../src/reorder-list/reorder-list.component.ts","../../src/reorder-list/reorder-list.component.html","../../src/reorder-list/index.ts","../../src/reorder-list/trismegisto-angular-reorder-list.ts"],"sourcesContent":["// GERADO por scripts/generate-internal-icons.mjs — não editar à mão.\n// Ícones que esta pasta usa por dentro; cada @Component/@Directive daqui os registra com\n// `readonly #icons = useHermesIcons(REORDER_LIST_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_DRAG_HANDLE,\n ICON_EXCLAMATION_TRIANGLE,\n ICON_TIMES,\n} from '@trismegisto/angular/icon';\n\nexport const REORDER_LIST_ICONS: readonly RegisteredIcon[] = [ICON_DRAG_HANDLE, ICON_EXCLAMATION_TRIANGLE, ICON_TIMES];\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n TemplateRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { formatMessage, moveItem } from '@trismegisto/primitives';\nimport { HermesFormFieldBase } from '@trismegisto/angular/forms';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { HermesDragVia, HermesSortEvent } from '@trismegisto/angular/drag-drop';\nimport { DragHandleDirective, DraggableDirective, HermesDragEndEvent } from '@trismegisto/angular/drag-drop';\nimport { SortableDirective } from '@trismegisto/angular/drag-drop';\nimport { IconComponent } from '@trismegisto/angular/icon';\nimport { useHermesIcons } from '@trismegisto/angular/icon';\nimport { REORDER_LIST_ICONS } from './icons.generated';\n\n/** Um item da lista ordenável. */\nexport interface ReorderListItem {\n readonly id: string;\n readonly label: string;\n /** Texto de apoio sob o rótulo. */\n readonly description?: string;\n}\n\nexport type ReorderListSize = 'small' | 'medium' | 'large';\n\n/** Movimento concluído (soltou num lugar diferente de onde pegou). */\nexport interface ReorderListMove {\n readonly item: ReorderListItem;\n readonly from: number;\n readonly to: number;\n}\n\n/** Item removido pelo botão de remover (`removable`): o item e a posição que ocupava (a partir de 0). */\nexport interface ReorderListRemoval {\n readonly item: ReorderListItem;\n readonly index: number;\n}\n\n/** Contexto do template de item (`<ng-template let-item let-index=\"index\">`). */\nexport interface ReorderListItemContext {\n readonly $implicit: ReorderListItem;\n readonly index: number;\n}\n\n/** Tipo de arrasto dos itens: zonas e listas que filtram por tipo não recebem itens de um `hm-reorder-list`. */\nconst DRAG_TYPE = 'hm-reorder-list';\n\nlet sequence = 0;\n\n/**\n * Lista reordenável (`hm-reorder-list`) por arrasto **e** por teclado. A interação é a do serviço genérico\n * de arrastar e soltar do Hermes (`[hmSortable]` + `[hmDraggable]` + `[hmDragHandle]`, coordenados pelo\n * `HermesDragDropService`).\n *\n * ```html\n * <hm-reorder-list label=\"Ordem das colunas\" [(items)]=\"colunas\" />\n * <hm-reorder-list label=\"Etapas\" formControlName=\"etapas\">\n * <ng-template let-item let-index=\"index\">{{ index + 1 }}. {{ item.label }}</ng-template>\n * </hm-reorder-list>\n * ```\n *\n * - **Arrasto**: pela alça, com Pointer Events — mouse, caneta e toque (a alça tem `touch-action: none`:\n * o toque começa na hora, sem toque longo). Uma prévia do item segue o ponteiro e um placeholder mostra\n * onde ele vai cair; soltar confirma; Esc ou um ponteiro cancelado desfazem.\n * - **Teclado**: na alça, Espaço/Enter pega; ↑/↓ escolhem a posição (Home/End vão às pontas), marcada pelo\n * placeholder — o item fica no lugar, com o foco; Espaço/Enter solta; Esc cancela; sair da alça (Tab) com\n * o item pego **cancela**. Sem nada pego, ↑/↓/Home/End levam o foco a outra alça.\n * - **Valor**: `[(items)]` (ou o formulário: Reactive Forms/`[(ngModel)]`) recebe a lista na ordem nova\n * **ao soltar** — durante o movimento nada é publicado. `moved` informa item, origem e destino.\n * - **Remover** (`removable`): cada linha ganha, à direita e longe da alça, um ✕ \"Remover {item}\". Ele\n * publica a lista sem o item (como o soltar publica a ordem nova) e emite `removed` com item e posição.\n * O foco vai para o ✕ do vizinho (o seguinte; no fim da lista, o anterior; sem nenhum, a mensagem de\n * lista vazia) e uma região viva educada anuncia \"Removido da lista: {item}\". Use quando a lista É o\n * conteúdo (passos, fila); a ordem das colunas de uma tabela, por exemplo, reordena mas não se apaga.\n *\n * Acessibilidade: cada alça é um botão \"Reordenar {item}\" com `aria-roledescription` (\"item arrastável\"),\n * `aria-describedby` nas instruções de teclado e `aria-pressed` enquanto o item está pego; a região viva do\n * serviço anuncia cada passo com o nome da lista (\"Ler sobre Etapas, posição 2 de 5\"). Em\n * `prefers-reduced-motion`, sem transições; em `forced-colors`, item pego e placeholder em `Highlight`.\n */\n@Component({\n selector: 'hm-reorder-list',\n imports: [IconComponent, NgTemplateOutlet, SortableDirective, DraggableDirective, DragHandleDirective],\n templateUrl: './reorder-list.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-reorder-list-host' },\n})\nexport class ReorderListComponent extends HermesFormFieldBase<readonly ReorderListItem[]> {\n readonly #icons = useHermesIcons(REORDER_LIST_ICONS);\n /** Os itens, na ordem atual. Two-way: recebe a ordem nova ao soltar. */\n readonly items = model<readonly ReorderListItem[]>([]);\n /** Nome da lista (visível, salvo `labelHidden`). Vazio = catálogo (\"Lista ordenável\"), só para leitor de tela. */\n readonly label = input('');\n readonly labelHidden = input(false, { transform: booleanAttribute });\n readonly hint = input('');\n readonly size = input<ReorderListSize>('medium');\n /** Mostra em cada linha o botão que remove o item da lista. */\n readonly removable = input(false, { transform: booleanAttribute });\n /** Movimento confirmado: item, posição de origem e de destino (índices a partir de 0). */\n readonly moved = output<ReorderListMove>();\n /** Item removido pelo ✕ (a lista nova já foi publicada em `items`/formulário). */\n readonly removed = output<ReorderListRemoval>();\n\n protected readonly valueModel = this.items;\n protected readonly itemTemplate = contentChild<TemplateRef<ReorderListItemContext>>(TemplateRef);\n private readonly catalog = inject(HERMES_MESSAGES);\n protected readonly text = computed(() => this.catalog.reorderList);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n /** Texto da região viva educada (anúncio de remoção). */\n protected readonly announcement = signal('');\n\n protected readonly dragType = DRAG_TYPE;\n protected readonly id = `hm-reorder-list-${++sequence}`;\n protected readonly labelId = `${this.id}-label`;\n protected readonly hintId = `${this.id}-hint`;\n protected readonly errorId = `${this.id}-error`;\n\n /** Item pego agora, e por qual via (vem dos eventos do `[hmDraggable]`). */\n private readonly grabbed = signal<{ readonly id: string; readonly via: HermesDragVia } | null>(null);\n\n protected readonly displayed = computed(() => this.items() ?? []);\n protected readonly grabbedId = computed(() => this.grabbed()?.id ?? null);\n protected readonly dragging = computed(() => this.grabbed()?.via === 'pointer');\n\n protected readonly groupLabel = computed(() => this.label() || this.text().label);\n protected readonly describedBy = computed(\n () => [this.hint() ? this.hintId : '', this.errorText() ? this.errorId : ''].filter(Boolean).join(' ') || null,\n );\n\n protected handleLabel(item: ReorderListItem): string {\n return formatMessage(this.text().handle, { label: item.label });\n }\n\n protected removeLabel(item: ReorderListItem): string {\n return formatMessage(this.text().remove, { label: item.label });\n }\n\n /** ✕ acionado: publica a lista sem o item, anuncia e leva o foco ao vizinho. */\n protected remove(item: ReorderListItem, index: number): void {\n if (this.isDisabled()) return;\n const next = this.displayed().filter((candidate) => candidate.id !== item.id);\n this.commit(next);\n this.markTouched();\n this.removed.emit({ item, index });\n this.announce(formatMessage(this.text().removed, { label: item.label }));\n // O ✕ acionado deixa de existir: sem mover o foco, ele cairia no <body>.\n afterNextRender(\n () => {\n const root = this.host.nativeElement;\n const buttons = root.querySelectorAll<HTMLElement>('.hm-reorder-list__remove');\n const target = buttons[Math.min(index, buttons.length - 1)] ?? root.querySelector<HTMLElement>('.hm-reorder-list__empty');\n target?.focus();\n },\n { injector: this.injector },\n );\n }\n\n private announce(message: string): void {\n // Limpa antes: a mesma frase duas vezes seguidas não seria anunciada de novo.\n this.announcement.set('');\n queueMicrotask(() => this.announcement.set(message));\n }\n\n /** Sem nada pego, ↑/↓/Home/End andam entre as alças. Com o item pego, as teclas são do serviço. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n if (this.isDisabled() || this.grabbed()) return;\n const last = this.displayed().length - 1;\n let target: number;\n switch (event.key) {\n case 'ArrowUp':\n case 'Up':\n target = Math.max(index - 1, 0);\n break;\n case 'ArrowDown':\n case 'Down':\n target = Math.min(index + 1, last);\n break;\n case 'Home':\n target = 0;\n break;\n case 'End':\n target = last;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.host.nativeElement.querySelectorAll<HTMLElement>('.hm-reorder-list__handle')[target]?.focus();\n }\n\n protected onDragStarted(item: ReorderListItem, via: HermesDragVia): void {\n this.grabbed.set({ id: item.id, via });\n }\n\n protected onDragEnded(event: HermesDragEndEvent): void {\n this.grabbed.set(null);\n if (event.via === 'pointer') this.markTouched();\n }\n\n /** Soltou num lugar diferente (o serviço não emite ao voltar ao mesmo lugar): publica a ordem nova. */\n protected onSorted(event: HermesSortEvent<ReorderListItem>): void {\n const { previousIndex: from, index: to } = event;\n if (!event.sameContainer || from === to) return;\n this.commit(moveItem(event.container, from, to));\n this.moved.emit({ item: event.data, from, to });\n }\n\n protected onHandleBlur(): void {\n this.markTouched();\n }\n}\n","<div\n class=\"hm-reorder-list hm-reorder-list--{{ size() }}\"\n [class.hm-reorder-list--disabled]=\"isDisabled()\"\n [class.hm-reorder-list--invalid]=\"!!errorText()\"\n [class.hm-reorder-list--dragging]=\"dragging()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : groupLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n @if (label()) {\n <div class=\"hm-reorder-list__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-reorder-list__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-reorder-list__required\">{{ fieldText.required }}</span>\n }\n </div>\n }\n\n @if (displayed().length) {\n <!-- Lista ordenável do serviço de arrastar e soltar: a ordem nova só chega (via `sorted`) ao soltar. -->\n <ul\n class=\"hm-reorder-list__list\"\n [hmSortable]=\"displayed()\"\n [hmSortableLabel]=\"groupLabel()\"\n [hmSortableDisabled]=\"isDisabled()\"\n (sorted)=\"onSorted($event)\"\n >\n @for (item of displayed(); track item.id; let i = $index) {\n <li\n class=\"hm-reorder-list__item\"\n [class.hm-reorder-list__item--grabbed]=\"grabbedId() === item.id\"\n [hmDraggable]=\"item\"\n [hmDragType]=\"dragType\"\n [hmDragContained]=\"true\"\n [hmDragLabel]=\"item.label\"\n [hmDragDisabled]=\"isDisabled()\"\n (dragStarted)=\"onDragStarted(item, $event)\"\n (dragEnded)=\"onDragEnded($event)\"\n >\n <!-- A alça é o único ponto de pegar (ponteiro, toque e teclado): um botão com nome; o `hmDragHandle`\n põe a descrição do papel, as instruções de teclado e o `aria-pressed`. -->\n <button\n type=\"button\"\n class=\"hm-reorder-list__handle\"\n hmDragHandle\n [attr.aria-label]=\"handleLabel(item)\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, i)\"\n (blur)=\"onHandleBlur()\"\n >\n <hm-icon shape=\"drag-handle\" />\n </button>\n <div class=\"hm-reorder-list__content\">\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\" />\n } @else {\n <span class=\"hm-reorder-list__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"hm-reorder-list__description\">{{ item.description }}</span>\n }\n }\n </div>\n <!-- Na outra ponta da linha, longe da alça: é a única ação destrutiva e não pode ser pega por engano. -->\n @if (removable()) {\n <button\n type=\"button\"\n class=\"hm-reorder-list__remove\"\n [attr.aria-label]=\"removeLabel(item)\"\n [disabled]=\"isDisabled()\"\n (click)=\"remove(item, i)\"\n >\n <hm-icon shape=\"times\" />\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <!-- tabindex=\"-1\": recebe o foco quando o último item é removido (o ✕ acionado some). -->\n <p class=\"hm-reorder-list__empty\" tabindex=\"-1\">{{ text().empty }}</p>\n }\n\n @if (removable()) {\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n }\n\n @if (hint()) {\n <p class=\"hm-reorder-list__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-reorder-list__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n","// Ponto de import `@trismegisto/angular/reorder-list` (secundário do ng-packagr): o que o public-api e as outras pastas usam\n// daqui. Gerado em 2026-10-03; ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './reorder-list.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAUO,MAAM,kBAAkB,GAA8B,CAAC,gBAAgB,EAAE,yBAAyB,EAAE,UAAU,CAAC;;AC8CtH;AACA,MAAM,SAAS,GAAG,iBAAiB;AAEnC,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AAQG,MAAO,oBAAqB,SAAQ,mBAA+C,CAAA;AAC9E,IAAA,MAAM,GAAG,cAAc,CAAC,kBAAkB,CAAC;;AAE3C,IAAA,KAAK,GAAG,KAAK,CAA6B,EAAE,4EAAC;;AAE7C,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;IACjB,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAC3D,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE,2EAAC;AAChB,IAAA,IAAI,GAAG,K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,EAAE,sBAAsB,EAAE,EAAA,QAAA,EAAA,o4HAAA,EAAA;2xBAmB6C,WAAW,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpHjG;AACA;;ACDA;;AAEG;;"}
1
+ {"version":3,"file":"trismegisto-angular-reorder-list.mjs","sources":["../../src/reorder-list/icons.generated.ts","../../src/reorder-list/reorder-list.component.ts","../../src/reorder-list/reorder-list.component.html","../../src/reorder-list/index.ts","../../src/reorder-list/trismegisto-angular-reorder-list.ts"],"sourcesContent":["// GERADO por scripts/generate-internal-icons.mjs — não editar à mão.\n// Ícones que esta pasta usa por dentro; cada @Component/@Directive daqui os registra com\n// `readonly #icons = useHermesIcons(REORDER_LIST_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_DRAG_HANDLE,\n ICON_EXCLAMATION_TRIANGLE,\n ICON_TIMES,\n} from '@trismegisto/angular/icon';\n\nexport const REORDER_LIST_ICONS: readonly RegisteredIcon[] = [ICON_DRAG_HANDLE, ICON_EXCLAMATION_TRIANGLE, ICON_TIMES];\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n TemplateRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { formatMessage, moveItem } from '@trismegisto/primitives';\nimport { HermesFormFieldBase } from '@trismegisto/angular/forms';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { HermesDragVia, HermesSortEvent } from '@trismegisto/angular/drag-drop';\nimport { DragHandleDirective, DraggableDirective, HermesDragEndEvent } from '@trismegisto/angular/drag-drop';\nimport { SortableDirective } from '@trismegisto/angular/drag-drop';\nimport { IconComponent } from '@trismegisto/angular/icon';\nimport { useHermesIcons } from '@trismegisto/angular/icon';\nimport { REORDER_LIST_ICONS } from './icons.generated';\n\n/** Um item da lista ordenável. */\nexport interface ReorderListItem {\n readonly id: string;\n readonly label: string;\n /** Texto de apoio sob o rótulo. */\n readonly description?: string;\n}\n\nexport type ReorderListSize = 'small' | 'medium' | 'large';\n\n/** Movimento concluído (soltou num lugar diferente de onde pegou). */\nexport interface ReorderListMove {\n readonly item: ReorderListItem;\n readonly from: number;\n readonly to: number;\n}\n\n/** Item removido pelo botão de remover (`removable`): o item e a posição que ocupava (a partir de 0). */\nexport interface ReorderListRemoval {\n readonly item: ReorderListItem;\n readonly index: number;\n}\n\n/** Contexto do template de item (`<ng-template let-item let-index=\"index\">`). */\nexport interface ReorderListItemContext {\n readonly $implicit: ReorderListItem;\n readonly index: number;\n}\n\n/** Tipo de arrasto dos itens: zonas e listas que filtram por tipo não recebem itens de um `hm-reorder-list`. */\nconst DRAG_TYPE = 'hm-reorder-list';\n\nlet sequence = 0;\n\n/**\n * Lista reordenável (`hm-reorder-list`) por arrasto **e** por teclado. A interação é a do serviço genérico\n * de arrastar e soltar do Hermes (`[hmSortable]` + `[hmDraggable]` + `[hmDragHandle]`, coordenados pelo\n * `HermesDragDropService`).\n *\n * ```html\n * <hm-reorder-list label=\"Ordem das colunas\" [(items)]=\"colunas\" />\n * <hm-reorder-list label=\"Etapas\" formControlName=\"etapas\">\n * <ng-template let-item let-index=\"index\">{{ index + 1 }}. {{ item.label }}</ng-template>\n * </hm-reorder-list>\n * ```\n *\n * - **Arrasto**: pela alça, com Pointer Events — mouse, caneta e toque (a alça tem `touch-action: none`:\n * o toque começa na hora, sem toque longo). Uma prévia do item segue o ponteiro e um placeholder mostra\n * onde ele vai cair; soltar confirma; Esc ou um ponteiro cancelado desfazem.\n * - **Teclado**: na alça, Espaço/Enter pega; ↑/↓ escolhem a posição (Home/End vão às pontas), marcada pelo\n * placeholder — o item fica no lugar, com o foco; Espaço/Enter solta; Esc cancela; sair da alça (Tab) com\n * o item pego **cancela**. Sem nada pego, ↑/↓/Home/End levam o foco a outra alça.\n * - **Valor**: `[(items)]` (ou o formulário: Reactive Forms/`[(ngModel)]`) recebe a lista na ordem nova\n * **ao soltar** — durante o movimento nada é publicado. `moved` informa item, origem e destino.\n * - **Remover** (`removable`): cada linha ganha, à direita e longe da alça, um ✕ \"Remover {item}\". Ele\n * publica a lista sem o item (como o soltar publica a ordem nova) e emite `removed` com item e posição.\n * O foco vai para o ✕ do vizinho (o seguinte; no fim da lista, o anterior; sem nenhum, a mensagem de\n * lista vazia) e uma região viva educada anuncia \"Removido da lista: {item}\". Use quando a lista É o\n * conteúdo (passos, fila); a ordem das colunas de uma tabela, por exemplo, reordena mas não se apaga.\n *\n * Acessibilidade: cada alça é um botão \"Reordenar {item}\" com `aria-roledescription` (\"item arrastável\"),\n * `aria-describedby` nas instruções de teclado e `aria-pressed` enquanto o item está pego; a região viva do\n * serviço anuncia cada passo com o nome da lista (\"Ler sobre Etapas, posição 2 de 5\"). Em\n * `prefers-reduced-motion`, sem transições; em `forced-colors`, item pego e placeholder em `Highlight`.\n */\n@Component({\n selector: 'hm-reorder-list',\n imports: [IconComponent, NgTemplateOutlet, SortableDirective, DraggableDirective, DragHandleDirective],\n templateUrl: './reorder-list.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'hm-reorder-list-host' },\n})\nexport class ReorderListComponent extends HermesFormFieldBase<readonly ReorderListItem[]> {\n readonly #icons = useHermesIcons(REORDER_LIST_ICONS);\n /** Os itens, na ordem atual. Two-way: recebe a ordem nova ao soltar. */\n readonly items = model<readonly ReorderListItem[]>([]);\n /** Nome da lista (visível, salvo `labelHidden`). Vazio = catálogo (\"Lista ordenável\"), só para leitor de tela. */\n readonly label = input('');\n readonly labelHidden = input(false, { transform: booleanAttribute });\n readonly hint = input('');\n readonly size = input<ReorderListSize>('medium');\n /** Mostra em cada linha o botão que remove o item da lista. */\n readonly removable = input(false, { transform: booleanAttribute });\n /** Texto da lista vazia. Vazio = catálogo (\"Nada para ordenar.\"). */\n readonly emptyText = input('');\n /** Movimento confirmado: item, posição de origem e de destino (índices a partir de 0). */\n readonly moved = output<ReorderListMove>();\n /** Item removido pelo ✕ (a lista nova já foi publicada em `items`/formulário). */\n readonly removed = output<ReorderListRemoval>();\n\n protected readonly valueModel = this.items;\n protected readonly itemTemplate = contentChild<TemplateRef<ReorderListItemContext>>(TemplateRef);\n private readonly catalog = inject(HERMES_MESSAGES);\n protected readonly text = computed(() => this.catalog.reorderList);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n /** Texto da região viva educada (anúncio de remoção). */\n protected readonly announcement = signal('');\n\n protected readonly dragType = DRAG_TYPE;\n protected readonly id = `hm-reorder-list-${++sequence}`;\n protected readonly labelId = `${this.id}-label`;\n protected readonly hintId = `${this.id}-hint`;\n protected readonly errorId = `${this.id}-error`;\n\n /** Item pego agora, e por qual via (vem dos eventos do `[hmDraggable]`). */\n private readonly grabbed = signal<{ readonly id: string; readonly via: HermesDragVia } | null>(null);\n\n protected readonly displayed = computed(() => this.items() ?? []);\n protected readonly grabbedId = computed(() => this.grabbed()?.id ?? null);\n protected readonly dragging = computed(() => this.grabbed()?.via === 'pointer');\n\n protected readonly groupLabel = computed(() => this.label() || this.text().label);\n protected readonly describedBy = computed(\n () => [this.hint() ? this.hintId : '', this.errorText() ? this.errorId : ''].filter(Boolean).join(' ') || null,\n );\n\n protected handleLabel(item: ReorderListItem): string {\n return formatMessage(this.text().handle, { label: item.label });\n }\n\n protected removeLabel(item: ReorderListItem): string {\n return formatMessage(this.text().remove, { label: item.label });\n }\n\n /** ✕ acionado: publica a lista sem o item, anuncia e leva o foco ao vizinho. */\n protected remove(item: ReorderListItem, index: number): void {\n if (this.isDisabled()) return;\n const next = this.displayed().filter((candidate) => candidate.id !== item.id);\n this.commit(next);\n this.markTouched();\n this.removed.emit({ item, index });\n this.announce(formatMessage(this.text().removed, { label: item.label }));\n // O ✕ acionado deixa de existir: sem mover o foco, ele cairia no <body>.\n afterNextRender(\n () => {\n const root = this.host.nativeElement;\n const buttons = root.querySelectorAll<HTMLElement>('.hm-reorder-list__remove');\n const target = buttons[Math.min(index, buttons.length - 1)] ?? root.querySelector<HTMLElement>('.hm-reorder-list__empty');\n target?.focus();\n },\n { injector: this.injector },\n );\n }\n\n private announce(message: string): void {\n // Limpa antes: a mesma frase duas vezes seguidas não seria anunciada de novo.\n this.announcement.set('');\n queueMicrotask(() => this.announcement.set(message));\n }\n\n /** Sem nada pego, ↑/↓/Home/End andam entre as alças. Com o item pego, as teclas são do serviço. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n if (this.isDisabled() || this.grabbed()) return;\n const last = this.displayed().length - 1;\n let target: number;\n switch (event.key) {\n case 'ArrowUp':\n case 'Up':\n target = Math.max(index - 1, 0);\n break;\n case 'ArrowDown':\n case 'Down':\n target = Math.min(index + 1, last);\n break;\n case 'Home':\n target = 0;\n break;\n case 'End':\n target = last;\n break;\n default:\n return;\n }\n event.preventDefault();\n this.host.nativeElement.querySelectorAll<HTMLElement>('.hm-reorder-list__handle')[target]?.focus();\n }\n\n protected onDragStarted(item: ReorderListItem, via: HermesDragVia): void {\n this.grabbed.set({ id: item.id, via });\n }\n\n protected onDragEnded(event: HermesDragEndEvent): void {\n this.grabbed.set(null);\n if (event.via === 'pointer') this.markTouched();\n }\n\n /** Soltou num lugar diferente (o serviço não emite ao voltar ao mesmo lugar): publica a ordem nova. */\n protected onSorted(event: HermesSortEvent<ReorderListItem>): void {\n const { previousIndex: from, index: to } = event;\n if (!event.sameContainer || from === to) return;\n this.commit(moveItem(event.container, from, to));\n this.moved.emit({ item: event.data, from, to });\n }\n\n protected onHandleBlur(): void {\n this.markTouched();\n }\n}\n","<div\n class=\"hm-reorder-list hm-reorder-list--{{ size() }}\"\n [class.hm-reorder-list--disabled]=\"isDisabled()\"\n [class.hm-reorder-list--invalid]=\"!!errorText()\"\n [class.hm-reorder-list--dragging]=\"dragging()\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"label() ? null : groupLabel()\"\n [attr.aria-describedby]=\"describedBy()\"\n>\n @if (label()) {\n <div class=\"hm-reorder-list__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-reorder-list__label\" [id]=\"labelId\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-reorder-list__required\">{{ fieldText.required }}</span>\n }\n </div>\n }\n\n @if (displayed().length) {\n <!-- Lista ordenável do serviço de arrastar e soltar: a ordem nova só chega (via `sorted`) ao soltar. -->\n <ul\n class=\"hm-reorder-list__list\"\n [hmSortable]=\"displayed()\"\n [hmSortableLabel]=\"groupLabel()\"\n [hmSortableDisabled]=\"isDisabled()\"\n (sorted)=\"onSorted($event)\"\n >\n @for (item of displayed(); track item.id; let i = $index) {\n <li\n class=\"hm-reorder-list__item\"\n [class.hm-reorder-list__item--grabbed]=\"grabbedId() === item.id\"\n [hmDraggable]=\"item\"\n [hmDragType]=\"dragType\"\n [hmDragContained]=\"true\"\n [hmDragLabel]=\"item.label\"\n [hmDragDisabled]=\"isDisabled()\"\n (dragStarted)=\"onDragStarted(item, $event)\"\n (dragEnded)=\"onDragEnded($event)\"\n >\n <!-- A alça é o único ponto de pegar (ponteiro, toque e teclado): um botão com nome; o `hmDragHandle`\n põe a descrição do papel, as instruções de teclado e o `aria-pressed`. -->\n <button\n type=\"button\"\n class=\"hm-reorder-list__handle\"\n hmDragHandle\n [attr.aria-label]=\"handleLabel(item)\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, i)\"\n (blur)=\"onHandleBlur()\"\n >\n <hm-icon shape=\"drag-handle\" />\n </button>\n <div class=\"hm-reorder-list__content\">\n @if (itemTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\" />\n } @else {\n <span class=\"hm-reorder-list__item-label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"hm-reorder-list__description\">{{ item.description }}</span>\n }\n }\n </div>\n <!-- Na outra ponta da linha, longe da alça: é a única ação destrutiva e não pode ser pega por engano. -->\n @if (removable()) {\n <button\n type=\"button\"\n class=\"hm-reorder-list__remove\"\n [attr.aria-label]=\"removeLabel(item)\"\n [disabled]=\"isDisabled()\"\n (click)=\"remove(item, i)\"\n >\n <hm-icon shape=\"times\" />\n </button>\n }\n </li>\n }\n </ul>\n } @else {\n <!-- tabindex=\"-1\": recebe o foco quando o último item é removido (o ✕ acionado some). -->\n <p class=\"hm-reorder-list__empty\" tabindex=\"-1\">{{ emptyText() || text().empty }}</p>\n }\n\n @if (removable()) {\n <div class=\"hm-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n }\n\n @if (hint()) {\n <p class=\"hm-reorder-list__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-reorder-list__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ errorText() }}\n </p>\n }\n</div>\n","// Ponto de import `@trismegisto/angular/reorder-list` (secundário do ng-packagr): o que o public-api e as outras pastas usam\n// daqui. Gerado em 2026-10-03; ao criar arquivo público novo na pasta, acrescente a linha.\nexport * from './reorder-list.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAUO,MAAM,kBAAkB,GAA8B,CAAC,gBAAgB,EAAE,yBAAyB,EAAE,UAAU,CAAC;;AC8CtH;AACA,MAAM,SAAS,GAAG,iBAAiB;AAEnC,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AAQG,MAAO,oBAAqB,SAAQ,mBAA+C,CAAA;AAC9E,IAAA,MAAM,GAAG,cAAc,CAAC,kBAAkB,CAAC;;AAE3C,IAAA,KAAK,GAAG,KAAK,CAA6B,EAAE,4EAAC;;AAE7C,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;IACjB,WAAW,G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,8PAAE,mBAAmB,EAAA,QAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAK1F,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,CAAC,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAErF,uBAAuB,CAAC,MAAM,QACzC,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAA,QAAA,EAAA,m5HAAA,EAAA;63BAqB6C,WAAW,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtHjG;AACA;;ACDA;;AAEG;;"}
@@ -29,6 +29,9 @@ let sequence$2 = 0;
29
29
  * configurações. `stacked` põe o controle embaixo do texto, para controles largos
30
30
  * (grade de cores, tabela).
31
31
  *
32
+ * Detalhe que não cabe numa descrição de uma linha vai num `hm-toggletip` com o atributo `rowHelp`, ao lado
33
+ * do rótulo; conteúdo com `rowDescription` entra logo abaixo da descrição (um link, um aviso).
34
+ *
32
35
  * Some sozinha quando há busca no diálogo e nem o rótulo, nem a descrição, nem `keywords` casam
33
36
  * (a não ser que a própria seção case — aí a seção inteira aparece). Fora de um diálogo, é só uma
34
37
  * linha de layout.
@@ -49,7 +52,10 @@ class SettingsRowComponent {
49
52
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: SettingsRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50
53
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: SettingsRowComponent, isStandalone: true, selector: "hm-settings-row", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, keywords: { classPropertyName: "keywords", publicName: "keywords", isSignal: true, isRequired: false, transformFunction: null }, stacked: { classPropertyName: "stacked", publicName: "stacked", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.hm-settings-row--stacked": "stacked()", "hidden": "!visible()" }, classAttribute: "hm-settings-row" }, ngImport: i0, template: `
51
54
  <div class="hm-settings-row__text">
52
- <span class="hm-settings-row__label" [id]="labelId">{{ label() }}</span>
55
+ <span class="hm-settings-row__label-line">
56
+ <span class="hm-settings-row__label" [id]="labelId">{{ label() }}</span>
57
+ <ng-content select="[rowHelp]" />
58
+ </span>
53
59
  @if (description()) {
54
60
  <span class="hm-settings-row__description">{{ description() }}</span>
55
61
  }
@@ -66,7 +72,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImpo
66
72
  selector: 'hm-settings-row',
67
73
  template: `
68
74
  <div class="hm-settings-row__text">
69
- <span class="hm-settings-row__label" [id]="labelId">{{ label() }}</span>
75
+ <span class="hm-settings-row__label-line">
76
+ <span class="hm-settings-row__label" [id]="labelId">{{ label() }}</span>
77
+ <ng-content select="[rowHelp]" />
78
+ </span>
70
79
  @if (description()) {
71
80
  <span class="hm-settings-row__description">{{ description() }}</span>
72
81
  }