@trismegisto/angular 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +2 -2
  2. package/fesm2022/trismegisto-angular-avatar-group.mjs +15 -3
  3. package/fesm2022/trismegisto-angular-avatar-group.mjs.map +1 -1
  4. package/fesm2022/trismegisto-angular-bulk-input.mjs +1 -1
  5. package/fesm2022/trismegisto-angular-bulk-input.mjs.map +1 -1
  6. package/fesm2022/trismegisto-angular-button.mjs +3 -10
  7. package/fesm2022/trismegisto-angular-button.mjs.map +1 -1
  8. package/fesm2022/trismegisto-angular-code-viewer.mjs +0 -1
  9. package/fesm2022/trismegisto-angular-code-viewer.mjs.map +1 -1
  10. package/fesm2022/trismegisto-angular-combobox-multi.mjs +4 -11
  11. package/fesm2022/trismegisto-angular-combobox-multi.mjs.map +1 -1
  12. package/fesm2022/trismegisto-angular-combobox.mjs +5 -16
  13. package/fesm2022/trismegisto-angular-combobox.mjs.map +1 -1
  14. package/fesm2022/trismegisto-angular-command-palette.mjs +28 -4
  15. package/fesm2022/trismegisto-angular-command-palette.mjs.map +1 -1
  16. package/fesm2022/trismegisto-angular-data-grid.mjs +4 -4
  17. package/fesm2022/trismegisto-angular-data-grid.mjs.map +1 -1
  18. package/fesm2022/trismegisto-angular-date-picker.mjs +6 -64
  19. package/fesm2022/trismegisto-angular-date-picker.mjs.map +1 -1
  20. package/fesm2022/trismegisto-angular-dialog.mjs +1 -1
  21. package/fesm2022/trismegisto-angular-dialog.mjs.map +1 -1
  22. package/fesm2022/trismegisto-angular-drag-drop.mjs +8 -1
  23. package/fesm2022/trismegisto-angular-drag-drop.mjs.map +1 -1
  24. package/fesm2022/trismegisto-angular-event-calendar.mjs +1 -1
  25. package/fesm2022/trismegisto-angular-event-calendar.mjs.map +1 -1
  26. package/fesm2022/trismegisto-angular-filter-bar.mjs +1 -1
  27. package/fesm2022/trismegisto-angular-filter-bar.mjs.map +1 -1
  28. package/fesm2022/trismegisto-angular-i18n.mjs +1 -9
  29. package/fesm2022/trismegisto-angular-i18n.mjs.map +1 -1
  30. package/fesm2022/trismegisto-angular-icon.mjs +2 -90
  31. package/fesm2022/trismegisto-angular-icon.mjs.map +1 -1
  32. package/fesm2022/trismegisto-angular-kanban.mjs +130 -12
  33. package/fesm2022/trismegisto-angular-kanban.mjs.map +1 -1
  34. package/fesm2022/trismegisto-angular-list-editor.mjs +1 -1
  35. package/fesm2022/trismegisto-angular-list-editor.mjs.map +1 -1
  36. package/fesm2022/trismegisto-angular-message-scroller.mjs +1 -1
  37. package/fesm2022/trismegisto-angular-message-scroller.mjs.map +1 -1
  38. package/fesm2022/trismegisto-angular-message.mjs +1 -1
  39. package/fesm2022/trismegisto-angular-message.mjs.map +1 -1
  40. package/fesm2022/trismegisto-angular-popover.mjs +3 -3
  41. package/fesm2022/trismegisto-angular-popover.mjs.map +1 -1
  42. package/fesm2022/trismegisto-angular-property-view.mjs +1 -1
  43. package/fesm2022/trismegisto-angular-property-view.mjs.map +1 -1
  44. package/fesm2022/trismegisto-angular-radio.mjs +4 -11
  45. package/fesm2022/trismegisto-angular-radio.mjs.map +1 -1
  46. package/fesm2022/trismegisto-angular-rich-text.mjs +1 -1
  47. package/fesm2022/trismegisto-angular-rich-text.mjs.map +1 -1
  48. package/fesm2022/trismegisto-angular-session-recovery.mjs +11 -13
  49. package/fesm2022/trismegisto-angular-session-recovery.mjs.map +1 -1
  50. package/fesm2022/trismegisto-angular-settings.mjs +1 -1
  51. package/fesm2022/trismegisto-angular-settings.mjs.map +1 -1
  52. package/fesm2022/trismegisto-angular-shortcut-list.mjs +1 -1
  53. package/fesm2022/trismegisto-angular-shortcut-list.mjs.map +1 -1
  54. package/fesm2022/trismegisto-angular-sidebar.mjs +0 -4
  55. package/fesm2022/trismegisto-angular-sidebar.mjs.map +1 -1
  56. package/fesm2022/trismegisto-angular-stat-group.mjs +1 -1
  57. package/fesm2022/trismegisto-angular-stat-group.mjs.map +1 -1
  58. package/fesm2022/trismegisto-angular-state-page.mjs +1 -8
  59. package/fesm2022/trismegisto-angular-state-page.mjs.map +1 -1
  60. package/fesm2022/trismegisto-angular-state-screen.mjs +1 -1
  61. package/fesm2022/trismegisto-angular-state-screen.mjs.map +1 -1
  62. package/fesm2022/trismegisto-angular-stepper.mjs +34 -32
  63. package/fesm2022/trismegisto-angular-stepper.mjs.map +1 -1
  64. package/fesm2022/trismegisto-angular-switch.mjs +4 -11
  65. package/fesm2022/trismegisto-angular-switch.mjs.map +1 -1
  66. package/fesm2022/trismegisto-angular-tab-bar.mjs +46 -2
  67. package/fesm2022/trismegisto-angular-tab-bar.mjs.map +1 -1
  68. package/fesm2022/trismegisto-angular-tag.mjs +3 -11
  69. package/fesm2022/trismegisto-angular-tag.mjs.map +1 -1
  70. package/fesm2022/trismegisto-angular-textarea.mjs +4 -11
  71. package/fesm2022/trismegisto-angular-textarea.mjs.map +1 -1
  72. package/fesm2022/trismegisto-angular-theme-builder.mjs +5 -3
  73. package/fesm2022/trismegisto-angular-theme-builder.mjs.map +1 -1
  74. package/fesm2022/trismegisto-angular-theme.mjs +1 -1
  75. package/fesm2022/trismegisto-angular-theme.mjs.map +1 -1
  76. package/fesm2022/trismegisto-angular-wizard.mjs +1 -1
  77. package/fesm2022/trismegisto-angular-wizard.mjs.map +1 -1
  78. package/fesm2022/trismegisto-angular-workspace.mjs +5 -1
  79. package/fesm2022/trismegisto-angular-workspace.mjs.map +1 -1
  80. package/fesm2022/trismegisto-angular.mjs +3 -4
  81. package/fesm2022/trismegisto-angular.mjs.map +1 -1
  82. package/package.json +5 -13
  83. package/types/trismegisto-angular-avatar-group.d.ts +11 -2
  84. package/types/trismegisto-angular-avatar-group.d.ts.map +1 -1
  85. package/types/trismegisto-angular-button.d.ts +1 -3
  86. package/types/trismegisto-angular-button.d.ts.map +1 -1
  87. package/types/trismegisto-angular-code-viewer.d.ts.map +1 -1
  88. package/types/trismegisto-angular-combobox-multi.d.ts +2 -4
  89. package/types/trismegisto-angular-combobox-multi.d.ts.map +1 -1
  90. package/types/trismegisto-angular-combobox.d.ts +1 -5
  91. package/types/trismegisto-angular-combobox.d.ts.map +1 -1
  92. package/types/trismegisto-angular-command-palette.d.ts +10 -1
  93. package/types/trismegisto-angular-command-palette.d.ts.map +1 -1
  94. package/types/trismegisto-angular-data-grid.d.ts +0 -9
  95. package/types/trismegisto-angular-data-grid.d.ts.map +1 -1
  96. package/types/trismegisto-angular-date-picker.d.ts +2 -17
  97. package/types/trismegisto-angular-date-picker.d.ts.map +1 -1
  98. package/types/trismegisto-angular-drag-drop.d.ts +8 -0
  99. package/types/trismegisto-angular-drag-drop.d.ts.map +1 -1
  100. package/types/trismegisto-angular-i18n.d.ts +1 -7
  101. package/types/trismegisto-angular-i18n.d.ts.map +1 -1
  102. package/types/trismegisto-angular-icon.d.ts +2 -5
  103. package/types/trismegisto-angular-icon.d.ts.map +1 -1
  104. package/types/trismegisto-angular-kanban.d.ts +57 -5
  105. package/types/trismegisto-angular-kanban.d.ts.map +1 -1
  106. package/types/trismegisto-angular-popover.d.ts +1 -1
  107. package/types/trismegisto-angular-popover.d.ts.map +1 -1
  108. package/types/trismegisto-angular-radio.d.ts +1 -3
  109. package/types/trismegisto-angular-radio.d.ts.map +1 -1
  110. package/types/trismegisto-angular-reorder-list.d.ts +0 -5
  111. package/types/trismegisto-angular-reorder-list.d.ts.map +1 -1
  112. package/types/trismegisto-angular-session-recovery.d.ts +6 -6
  113. package/types/trismegisto-angular-sidebar.d.ts +0 -2
  114. package/types/trismegisto-angular-sidebar.d.ts.map +1 -1
  115. package/types/trismegisto-angular-state-page.d.ts +1 -7
  116. package/types/trismegisto-angular-state-page.d.ts.map +1 -1
  117. package/types/trismegisto-angular-stepper.d.ts.map +1 -1
  118. package/types/trismegisto-angular-switch.d.ts +1 -3
  119. package/types/trismegisto-angular-switch.d.ts.map +1 -1
  120. package/types/trismegisto-angular-tab-bar.d.ts +11 -0
  121. package/types/trismegisto-angular-tab-bar.d.ts.map +1 -1
  122. package/types/trismegisto-angular-tag.d.ts +2 -4
  123. package/types/trismegisto-angular-tag.d.ts.map +1 -1
  124. package/types/trismegisto-angular-textarea.d.ts +1 -3
  125. package/types/trismegisto-angular-textarea.d.ts.map +1 -1
  126. package/types/trismegisto-angular-theme-builder.d.ts.map +1 -1
  127. package/types/trismegisto-angular-theme.d.ts +4 -3
  128. package/types/trismegisto-angular-theme.d.ts.map +1 -1
  129. package/types/trismegisto-angular-workspace.d.ts +0 -2
  130. package/types/trismegisto-angular-workspace.d.ts.map +1 -1
  131. package/types/trismegisto-angular.d.ts +3 -4
  132. package/types/trismegisto-angular.d.ts.map +1 -1
  133. package/fesm2022/trismegisto-angular-deprecation.mjs +0 -26
  134. package/fesm2022/trismegisto-angular-deprecation.mjs.map +0 -1
  135. package/fesm2022/trismegisto-angular-field.mjs +0 -35
  136. package/fesm2022/trismegisto-angular-field.mjs.map +0 -1
  137. package/types/trismegisto-angular-deprecation.d.ts +0 -11
  138. package/types/trismegisto-angular-deprecation.d.ts.map +0 -1
  139. package/types/trismegisto-angular-field.d.ts +0 -18
  140. package/types/trismegisto-angular-field.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"trismegisto-angular-property-view.mjs","sources":["../../src/property-view/icons.generated.ts","../../src/property-view/property-view.component.ts","../../src/property-view/index.ts","../../src/property-view/trismegisto-angular-property-view.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(PROPERTY_VIEW_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_ANGLE,\n ICON_TEXT,\n} from '@trismegisto/angular/icon';\n\nexport const PROPERTY_VIEW_ICONS: readonly RegisteredIcon[] = [ICON_ANGLE, ICON_TEXT];\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n} from '@angular/core';\nimport {\n PropertyDefinition,\n PropertyGroup,\n PropertySection,\n PropertyValues,\n displayDatePattern,\n filterProperties,\n formatMessage,\n groupProperties,\n pluralMessage,\n propertyDisplayText,\n validateProperties,\n} from '@trismegisto/primitives';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { DatePickerComponent } from '@trismegisto/angular/date-picker';\nimport { IconComponent } from '@trismegisto/angular/icon';\nimport { useHermesIcons } from '@trismegisto/angular/icon';\nimport { InputComponent } from '@trismegisto/angular/input';\nimport { SearchFieldComponent } from '@trismegisto/angular/search-field';\nimport { SelectComponent } from '@trismegisto/angular/select';\nimport { SwitchComponent } from '@trismegisto/angular/switch';\nimport { PROPERTY_VIEW_ICONS } from './icons.generated';\n\nexport type { PropertyDefinition, PropertyGroup, PropertyOption, PropertyType, PropertyValues } from '@trismegisto/primitives';\n\n/** Uma propriedade mudou pela edição inline (`hm-property-view` → `propertyChange`). */\nexport interface PropertyChangeEvent {\n readonly key: string;\n readonly value: unknown;\n readonly previous: unknown;\n /** Todos os valores, já com a mudança (o mesmo que `valuesChange` recebe). */\n readonly values: PropertyValues;\n /** Erro de validação da propriedade depois da mudança; `null` = válida. */\n readonly error: string | null;\n}\n\nlet sequence = 0;\n\n/**\n * Grade de propriedades nome/valor, agrupadas em seções recolhíveis, com busca e **edição inline\n * opcional** por tipo. Diferente do `hm-description-list`, que só exibe uma ficha: aqui o modelo é\n * `[(values)]` e cada linha pode virar editor.\n *\n * ```html\n * <hm-property-view [properties]=\"props\" [groups]=\"grupos\" [(values)]=\"servidor\" [editable]=\"editando\" [searchable]=\"true\" />\n * ```\n *\n * - **Somente leitura por padrão**. Com `editable`, cada propriedade (salvo `editable: false` nela)\n * vira o editor do tipo: `text`/`number` (`hm-input`), `boolean` (`hm-switch`), `select`\n * (`hm-select`, `options`), `date` (`hm-date-picker`, ISO). A mudança vai direto para `values`\n * e sai em `propertyChange`.\n * - **Validação** por propriedade: `required` e `validate(value, values)` → mensagem no editor depois\n * que a pessoa mexe nele; `validate()` (método) mostra todos e diz se está tudo válido.\n * - **Grupos**: `groups` dá a ordem e o nome; `collapsed: true` começa recolhido. Propriedade sem\n * grupo fica num bloco sem cabeçalho no topo.\n * - **Busca** (`searchable`): filtra por nome, chave e valor exibido; com termo, os grupos abrem.\n *\n * Acessibilidade: cada grupo é um `group` nomeado pelo cabeçalho; o cabeçalho é `role=\"heading\"`\n * (`headingLevel`) com um botão `aria-expanded`/`aria-controls`. As linhas são `<dt>`/`<dd>`; o editor\n * tem o nome da propriedade como rótulo (escondido da vista, o `<dt>` já mostra) e o erro ligado por\n * `aria-describedby`/`aria-invalid` (dos controles do Hermes). Valor vazio mostra \"—\" e o leitor de\n * tela ouve \"Não informado\". A contagem da busca sai numa região viva.\n */\n@Component({\n selector: 'hm-property-view',\n imports: [IconComponent, InputComponent, SwitchComponent, SelectComponent, DatePickerComponent, SearchFieldComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'hm-property-view',\n role: 'group',\n '[class.hm-property-view--editable]': 'editable()',\n '[attr.aria-label]': 'label() || text().label',\n },\n template: `\n @if (searchable()) {\n <hm-search-field\n class=\"hm-property-view__search\"\n [label]=\"text().search\"\n [placeholder]=\"text().search\"\n [labelHidden]=\"true\"\n [landmark]=\"false\"\n size=\"small\"\n [(value)]=\"term\"\n />\n }\n <p class=\"hm-property-view__sr-only\" role=\"status\">{{ term().trim() ? resultsText() : '' }}</p>\n @for (section of sections(); track section.group?.id ?? '') {\n <div\n class=\"hm-property-view__group\"\n [class.hm-property-view__group--loose]=\"!section.group\"\n [attr.role]=\"section.group ? 'group' : null\"\n [attr.aria-labelledby]=\"section.group ? toggleId(section.group) : null\"\n >\n @if (section.group; as group) {\n <div class=\"hm-property-view__heading\" role=\"heading\" [attr.aria-level]=\"headingLevel()\">\n <button\n type=\"button\"\n class=\"hm-property-view__toggle\"\n [id]=\"toggleId(group)\"\n [attr.aria-expanded]=\"isExpanded(group)\"\n [attr.aria-controls]=\"isExpanded(group) ? bodyId(group) : null\"\n (click)=\"toggle(group)\"\n >\n <hm-icon class=\"hm-property-view__chevron\" shape=\"chevron-down\" />\n <span class=\"hm-property-view__group-label\">{{ group.label }}</span>\n <span class=\"hm-property-view__group-count\" aria-hidden=\"true\">{{ section.properties.length }}</span>\n </button>\n </div>\n }\n @if (!section.group || isExpanded(section.group)) {\n <dl class=\"hm-property-view__list\" [id]=\"section.group ? bodyId(section.group) : null\">\n @for (property of section.properties; track property.key) {\n <div class=\"hm-property-view__row\" [class.hm-property-view__row--invalid]=\"!!shownError(property)\">\n <dt class=\"hm-property-view__name\">{{ property.label }}</dt>\n <dd class=\"hm-property-view__value\">\n @if (isEditing(property)) {\n @switch (property.type ?? 'text') {\n @case ('boolean') {\n <hm-switch\n class=\"hm-property-view__switch\"\n [label]=\"property.label\"\n [value]=\"!!values()[property.key]\"\n [hint]=\"property.hint ?? ''\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n @case ('select') {\n <hm-select\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"textValue(property)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event || null)\"\n >\n <option value=\"\">{{ text().selectPlaceholder }}</option>\n @for (option of property.options ?? []; track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </hm-select>\n }\n @case ('date') {\n <hm-date-picker\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"textValue(property) || null\"\n [min]=\"isoLimit(property.min)\"\n [max]=\"isoLimit(property.max)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n @case ('number') {\n <hm-input\n type=\"number\"\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"numberValue(property)\"\n [min]=\"numberLimit(property.min)\"\n [max]=\"numberLimit(property.max)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n @default {\n <hm-input\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"textValue(property)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n }\n } @else {\n @if (display(property); as shown) {\n {{ shown }}\n } @else {\n <span class=\"hm-property-view__empty\" aria-hidden=\"true\">{{ text().emptyValue }}</span>\n <span class=\"hm-property-view__sr-only\">{{ text().emptyLabel }}</span>\n }\n }\n </dd>\n </div>\n }\n </dl>\n }\n </div>\n } @empty {\n <p class=\"hm-property-view__no-results\">{{ emptyText() }}</p>\n }\n `,\n})\nexport class PropertyViewComponent {\n readonly #icons = useHermesIcons(PROPERTY_VIEW_ICONS);\n /** As propriedades (linhas), na ordem dentro de cada grupo. */\n readonly properties = input<readonly PropertyDefinition[]>([]);\n /** Os grupos (seções recolhíveis), na ordem da tela. */\n readonly groups = input<readonly PropertyGroup[]>([]);\n /** Valores por chave. Two-way: recebe a cópia com a mudança a cada edição. */\n readonly values = model<PropertyValues>({});\n /** Liga a edição inline. Padrão: somente leitura. */\n readonly editable = input(false, { transform: booleanAttribute });\n /** Mostra a busca por propriedade. */\n readonly searchable = input(false, { transform: booleanAttribute });\n /** Nome da grade para leitor de tela. Vazio = \"Propriedades\" (catálogo). */\n readonly label = input('');\n /** Nível dos cabeçalhos de grupo (`aria-level`). */\n readonly headingLevel = input(3);\n\n /** Uma propriedade foi editada. */\n readonly propertyChange = output<PropertyChangeEvent>();\n\n private readonly catalog = inject(HERMES_MESSAGES);\n protected readonly text = computed(() => this.catalog.propertyView);\n private readonly id = `hm-property-view-${++sequence}`;\n\n protected readonly term = signal('');\n /** Ids dos grupos recolhidos; recomeça pelo `collapsed` de `groups` quando eles mudam. */\n private readonly collapsedIds = linkedSignal(() => this.groups().filter((g) => g.collapsed).map((g) => g.id));\n /** Chaves em que a pessoa já mexeu (só elas mostram erro, até `validate()`). */\n private readonly touched = signal<ReadonlySet<string>>(new Set());\n private readonly showAll = signal(false);\n\n private readonly datePattern = computed(() => displayDatePattern(this.catalog.meta.locale));\n private readonly errors = computed(() => validateProperties(this.properties(), this.values(), this.text()));\n private readonly filtered = computed(() => filterProperties(this.properties(), this.term(), (p) => this.display(p)));\n protected readonly sections = computed<readonly PropertySection[]>(() => groupProperties(this.filtered(), this.groups()));\n protected readonly resultsText = computed(() =>\n pluralMessage(this.text().results, this.filtered().length, this.catalog.meta.locale),\n );\n protected readonly emptyText = computed(() =>\n this.term().trim() ? formatMessage(this.text().noResults, { term: this.term().trim() }) : this.text().empty,\n );\n\n /** Mostra o erro de todas as propriedades e devolve `true` se nenhuma tem erro. */\n validate(): boolean {\n this.showAll.set(true);\n return Object.keys(this.errors()).length === 0;\n }\n\n /** Erros atuais (chave → mensagem), mostrados ou não. */\n currentErrors(): Readonly<Record<string, string>> {\n return this.errors();\n }\n\n protected display(property: PropertyDefinition): string {\n return propertyDisplayText(property, this.values(), this.text(), this.catalog.meta.locale, this.datePattern());\n }\n\n protected isEditing(property: PropertyDefinition): boolean {\n return this.editable() && property.editable !== false;\n }\n\n protected shownError(property: PropertyDefinition): string {\n if (!this.isEditing(property)) return '';\n if (!this.showAll() && !this.touched().has(property.key)) return '';\n return this.errors()[property.key] ?? '';\n }\n\n protected isExpanded(group: PropertyGroup): boolean {\n return !!this.term().trim() || !this.collapsedIds().includes(group.id);\n }\n\n protected toggle(group: PropertyGroup): void {\n // Com busca ativa os grupos aparecem abertos; recolher sai da busca para o estado guardado.\n const expanded = this.isExpanded(group);\n this.collapsedIds.update((ids) => (expanded ? [...ids.filter((id) => id !== group.id), group.id] : ids.filter((id) => id !== group.id)));\n if (this.term().trim() && expanded) this.term.set('');\n }\n\n protected toggleId(group: PropertyGroup): string {\n return `${this.id}-${group.id}-toggle`;\n }\n\n protected bodyId(group: PropertyGroup): string {\n return `${this.id}-${group.id}-body`;\n }\n\n protected textValue(property: PropertyDefinition): string {\n const value = this.values()[property.key];\n return value === null || value === undefined ? '' : String(value);\n }\n\n protected numberValue(property: PropertyDefinition): number | null {\n const value = this.values()[property.key];\n return typeof value === 'number' ? value : value === null || value === undefined || value === '' ? null : Number(value);\n }\n\n protected numberLimit(limit: number | string | null | undefined): number | null {\n return typeof limit === 'number' ? limit : null;\n }\n\n protected isoLimit(limit: number | string | null | undefined): string | null {\n return typeof limit === 'string' ? limit : null;\n }\n\n protected commit(property: PropertyDefinition, value: unknown): void {\n const previous = this.values()[property.key];\n if (Object.is(previous, value)) return;\n const values = { ...this.values(), [property.key]: value };\n this.values.set(values);\n this.touched.update((set) => new Set(set).add(property.key));\n this.propertyChange.emit({ key: property.key, value, previous, values, error: this.errors()[property.key] ?? null });\n }\n}\n","// Ponto de import `@trismegisto/angular/property-view` (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 './property-view.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AASO,MAAM,mBAAmB,GAA8B,CAAC,UAAU,EAAE,SAAS,CAAC;;ACuCrF,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MA2IU,qBAAqB,CAAA;AACvB,IAAA,MAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC;;AAE5C,IAAA,UAAU,GAAG,KAAK,CAAgC,EAAE,iFAAC;;AAErD,IAAA,MAAM,GAAG,KAAK,CAA2B,EAAE,6EAAC;;AAE5C,IAAA,MAAM,GAAG,KAAK,CAAiB,EAAE,6EAAC;;IAElC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,UA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A,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAwIzG,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA1IjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,CAAC;oBACrH,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,oCAAoC,EAAE,YAAY;AAClD,wBAAA,mBAAmB,EAAE,yBAAyB;AAC/C,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HT,EAAA,CAAA;AACF,iBAAA;;;ACpND;AACA;;ACDA;;AAEG;;"}
1
+ {"version":3,"file":"trismegisto-angular-property-view.mjs","sources":["../../src/property-view/icons.generated.ts","../../src/property-view/property-view.component.ts","../../src/property-view/index.ts","../../src/property-view/trismegisto-angular-property-view.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(PROPERTY_VIEW_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_ANGLE,\n ICON_TEXT,\n} from '@trismegisto/angular/icon';\n\nexport const PROPERTY_VIEW_ICONS: readonly RegisteredIcon[] = [ICON_ANGLE, ICON_TEXT];\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n} from '@angular/core';\nimport {\n PropertyDefinition,\n PropertyGroup,\n PropertySection,\n PropertyValues,\n displayDatePattern,\n filterProperties,\n formatMessage,\n groupProperties,\n pluralMessage,\n propertyDisplayText,\n validateProperties,\n} from '@trismegisto/primitives';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { DatePickerComponent } from '@trismegisto/angular/date-picker';\nimport { IconComponent } from '@trismegisto/angular/icon';\nimport { useHermesIcons } from '@trismegisto/angular/icon';\nimport { InputComponent } from '@trismegisto/angular/input';\nimport { SearchFieldComponent } from '@trismegisto/angular/search-field';\nimport { SelectComponent } from '@trismegisto/angular/select';\nimport { SwitchComponent } from '@trismegisto/angular/switch';\nimport { PROPERTY_VIEW_ICONS } from './icons.generated';\n\nexport type { PropertyDefinition, PropertyGroup, PropertyOption, PropertyType, PropertyValues } from '@trismegisto/primitives';\n\n/** Uma propriedade mudou pela edição inline (`hm-property-view` → `propertyChange`). */\nexport interface PropertyChangeEvent {\n readonly key: string;\n readonly value: unknown;\n readonly previous: unknown;\n /** Todos os valores, já com a mudança (o mesmo que `valuesChange` recebe). */\n readonly values: PropertyValues;\n /** Erro de validação da propriedade depois da mudança; `null` = válida. */\n readonly error: string | null;\n}\n\nlet sequence = 0;\n\n/**\n * Grade de propriedades nome/valor, agrupadas em seções recolhíveis, com busca e **edição inline\n * opcional** por tipo. Diferente do `hm-description-list`, que só exibe uma ficha: aqui o modelo é\n * `[(values)]` e cada linha pode virar editor.\n *\n * ```html\n * <hm-property-view [properties]=\"props\" [groups]=\"grupos\" [(values)]=\"servidor\" [editable]=\"editando\" [searchable]=\"true\" />\n * ```\n *\n * - **Somente leitura por padrão**. Com `editable`, cada propriedade (salvo `editable: false` nela)\n * vira o editor do tipo: `text`/`number` (`hm-input`), `boolean` (`hm-switch`), `select`\n * (`hm-select`, `options`), `date` (`hm-date-picker`, ISO). A mudança vai direto para `values`\n * e sai em `propertyChange`.\n * - **Validação** por propriedade: `required` e `validate(value, values)` → mensagem no editor depois\n * que a pessoa mexe nele; `validate()` (método) mostra todos e diz se está tudo válido.\n * - **Grupos**: `groups` dá a ordem e o nome; `collapsed: true` começa recolhido. Propriedade sem\n * grupo fica num bloco sem cabeçalho no topo.\n * - **Busca** (`searchable`): filtra por nome, chave e valor exibido; com termo, os grupos abrem.\n *\n * Acessibilidade: cada grupo é um `group` nomeado pelo cabeçalho; o cabeçalho é `role=\"heading\"`\n * (`headingLevel`) com um botão `aria-expanded`/`aria-controls`. As linhas são `<dt>`/`<dd>`; o editor\n * tem o nome da propriedade como rótulo (escondido da vista, o `<dt>` já mostra) e o erro ligado por\n * `aria-describedby`/`aria-invalid` (dos controles do Hermes). Valor vazio mostra \"—\" e o leitor de\n * tela ouve \"Não informado\". A contagem da busca sai numa região viva.\n */\n@Component({\n selector: 'hm-property-view',\n imports: [IconComponent, InputComponent, SwitchComponent, SelectComponent, DatePickerComponent, SearchFieldComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'hm-property-view',\n role: 'group',\n '[class.hm-property-view--editable]': 'editable()',\n '[attr.aria-label]': 'label() || text().label',\n },\n template: `\n @if (searchable()) {\n <hm-search-field\n class=\"hm-property-view__search\"\n [label]=\"text().search\"\n [placeholder]=\"text().search\"\n [labelHidden]=\"true\"\n [landmark]=\"false\"\n size=\"small\"\n [(value)]=\"term\"\n />\n }\n <p class=\"hm-property-view__sr-only\" role=\"status\">{{ term().trim() ? resultsText() : '' }}</p>\n @for (section of sections(); track section.group?.id ?? '') {\n <div\n class=\"hm-property-view__group\"\n [class.hm-property-view__group--loose]=\"!section.group\"\n [attr.role]=\"section.group ? 'group' : null\"\n [attr.aria-labelledby]=\"section.group ? toggleId(section.group) : null\"\n >\n @if (section.group; as group) {\n <div class=\"hm-property-view__heading\" role=\"heading\" [attr.aria-level]=\"headingLevel()\">\n <button\n type=\"button\"\n class=\"hm-property-view__toggle\"\n [id]=\"toggleId(group)\"\n [attr.aria-expanded]=\"isExpanded(group)\"\n [attr.aria-controls]=\"isExpanded(group) ? bodyId(group) : null\"\n (click)=\"toggle(group)\"\n >\n <hm-icon class=\"hm-property-view__chevron\" shape=\"chevron-down\" />\n <span class=\"hm-property-view__group-label\">{{ group.label }}</span>\n <span class=\"hm-property-view__group-count\" aria-hidden=\"true\">{{ section.properties.length }}</span>\n </button>\n </div>\n }\n @if (!section.group || isExpanded(section.group)) {\n <dl class=\"hm-property-view__list\" [id]=\"section.group ? bodyId(section.group) : null\">\n @for (property of section.properties; track property.key) {\n <div class=\"hm-property-view__row\" [class.hm-property-view__row--invalid]=\"!!shownError(property)\">\n <dt class=\"hm-property-view__name\">{{ property.label }}</dt>\n <dd class=\"hm-property-view__value\">\n @if (isEditing(property)) {\n @switch (property.type ?? 'text') {\n @case ('boolean') {\n <hm-switch\n class=\"hm-property-view__switch\"\n [label]=\"property.label\"\n [value]=\"!!values()[property.key]\"\n [hint]=\"property.hint ?? ''\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n @case ('select') {\n <hm-select\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"textValue(property)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event || null)\"\n >\n <option value=\"\">{{ text().selectPlaceholder }}</option>\n @for (option of property.options ?? []; track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </hm-select>\n }\n @case ('date') {\n <hm-date-picker\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"textValue(property) || null\"\n [min]=\"isoLimit(property.min)\"\n [max]=\"isoLimit(property.max)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n @case ('number') {\n <hm-input\n type=\"number\"\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"numberValue(property)\"\n [min]=\"numberLimit(property.min)\"\n [max]=\"numberLimit(property.max)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n @default {\n <hm-input\n [label]=\"property.label\"\n [labelHidden]=\"true\"\n [value]=\"textValue(property)\"\n [hint]=\"property.hint ?? ''\"\n [required]=\"!!property.required\"\n [error]=\"shownError(property)\"\n (valueChange)=\"commit(property, $event)\"\n />\n }\n }\n } @else {\n @if (display(property); as shown) {\n {{ shown }}\n } @else {\n <span class=\"hm-property-view__empty\" aria-hidden=\"true\">{{ text().emptyValue }}</span>\n <span class=\"hm-property-view__sr-only\">{{ text().emptyLabel }}</span>\n }\n }\n </dd>\n </div>\n }\n </dl>\n }\n </div>\n } @empty {\n <p class=\"hm-property-view__no-results\">{{ emptyText() }}</p>\n }\n `,\n})\nexport class PropertyViewComponent {\n readonly #icons = useHermesIcons(PROPERTY_VIEW_ICONS);\n /** As propriedades (linhas), na ordem dentro de cada grupo. */\n readonly properties = input<readonly PropertyDefinition[]>([]);\n /** Os grupos (seções recolhíveis), na ordem da tela. */\n readonly groups = input<readonly PropertyGroup[]>([]);\n /** Valores por chave. Two-way: recebe a cópia com a mudança a cada edição. */\n readonly values = model<PropertyValues>({});\n /** Liga a edição inline. Padrão: somente leitura. */\n readonly editable = input(false, { transform: booleanAttribute });\n /** Mostra a busca por propriedade. */\n readonly searchable = input(false, { transform: booleanAttribute });\n /** Nome da grade para leitor de tela. Vazio = \"Propriedades\" (catálogo). */\n readonly label = input('');\n /** Nível dos cabeçalhos de grupo (`aria-level`). */\n readonly headingLevel = input(3);\n\n /** Uma propriedade foi editada. */\n readonly propertyChange = output<PropertyChangeEvent>();\n\n private readonly catalog = inject(HERMES_MESSAGES);\n protected readonly text = computed(() => this.catalog.propertyView);\n private readonly id = `hm-property-view-${++sequence}`;\n\n protected readonly term = signal('');\n /** Ids dos grupos recolhidos; recomeça pelo `collapsed` de `groups` quando eles mudam. */\n private readonly collapsedIds = linkedSignal(() => this.groups().filter((g) => g.collapsed).map((g) => g.id));\n /** Chaves em que a pessoa já mexeu (só elas mostram erro, até `validate()`). */\n private readonly touched = signal<ReadonlySet<string>>(new Set());\n private readonly showAll = signal(false);\n\n private readonly datePattern = computed(() => displayDatePattern(this.catalog.meta.locale));\n private readonly errors = computed(() => validateProperties(this.properties(), this.values(), this.text()));\n private readonly filtered = computed(() => filterProperties(this.properties(), this.term(), (p) => this.display(p)));\n protected readonly sections = computed<readonly PropertySection[]>(() => groupProperties(this.filtered(), this.groups()));\n protected readonly resultsText = computed(() =>\n pluralMessage(this.text().results, this.filtered().length, this.catalog.meta.locale),\n );\n protected readonly emptyText = computed(() =>\n this.term().trim() ? formatMessage(this.text().noResults, { term: this.term().trim() }) : this.text().empty,\n );\n\n /** Mostra o erro de todas as propriedades e devolve `true` se nenhuma tem erro. */\n validate(): boolean {\n this.showAll.set(true);\n return Object.keys(this.errors()).length === 0;\n }\n\n /** Erros atuais (chave → mensagem), mostrados ou não. */\n currentErrors(): Readonly<Record<string, string>> {\n return this.errors();\n }\n\n protected display(property: PropertyDefinition): string {\n return propertyDisplayText(property, this.values(), this.text(), this.catalog.meta.locale, this.datePattern());\n }\n\n protected isEditing(property: PropertyDefinition): boolean {\n return this.editable() && property.editable !== false;\n }\n\n protected shownError(property: PropertyDefinition): string {\n if (!this.isEditing(property)) return '';\n if (!this.showAll() && !this.touched().has(property.key)) return '';\n return this.errors()[property.key] ?? '';\n }\n\n protected isExpanded(group: PropertyGroup): boolean {\n return !!this.term().trim() || !this.collapsedIds().includes(group.id);\n }\n\n protected toggle(group: PropertyGroup): void {\n // Com busca ativa os grupos aparecem abertos; recolher sai da busca para o estado guardado.\n const expanded = this.isExpanded(group);\n this.collapsedIds.update((ids) => (expanded ? [...ids.filter((id) => id !== group.id), group.id] : ids.filter((id) => id !== group.id)));\n if (this.term().trim() && expanded) this.term.set('');\n }\n\n protected toggleId(group: PropertyGroup): string {\n return `${this.id}-${group.id}-toggle`;\n }\n\n protected bodyId(group: PropertyGroup): string {\n return `${this.id}-${group.id}-body`;\n }\n\n protected textValue(property: PropertyDefinition): string {\n const value = this.values()[property.key];\n return value === null || value === undefined ? '' : String(value);\n }\n\n protected numberValue(property: PropertyDefinition): number | null {\n const value = this.values()[property.key];\n return typeof value === 'number' ? value : value === null || value === undefined || value === '' ? null : Number(value);\n }\n\n protected numberLimit(limit: number | string | null | undefined): number | null {\n return typeof limit === 'number' ? limit : null;\n }\n\n protected isoLimit(limit: number | string | null | undefined): string | null {\n return typeof limit === 'string' ? limit : null;\n }\n\n protected commit(property: PropertyDefinition, value: unknown): void {\n const previous = this.values()[property.key];\n if (Object.is(previous, value)) return;\n const values = { ...this.values(), [property.key]: value };\n this.values.set(values);\n this.touched.update((set) => new Set(set).add(property.key));\n this.propertyChange.emit({ key: property.key, value, previous, values, error: this.errors()[property.key] ?? null });\n }\n}\n","// Ponto de import `@trismegisto/angular/property-view` (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 './property-view.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AASO,MAAM,mBAAmB,GAA8B,CAAC,UAAU,EAAE,SAAS,CAAC;;ACuCrF,IAAI,QAAQ,GAAG,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MA2IU,qBAAqB,CAAA;AACvB,IAAA,MAAM,GAAG,cAAc,CAAC,mBAAmB,CAAC;;AAE5C,IAAA,UAAU,GAAG,KAAK,CAAgC,EAAE,iFAAC;;AAErD,IAAA,MAAM,GAAG,KAAK,CAA2B,EAAE,6EAAC;;AAE5C,IAAA,MAAM,GAAG,KAAK,CAAiB,EAAE,6EAAC;;IAElC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,UAAU,GAAG,KAAK,CAAC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,CAAA,MAAA,EAAA,CAAA;;4FAwIzG,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA1IjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,oBAAoB,CAAC;oBACrH,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,oCAAoC,EAAE,YAAY;AAClD,wBAAA,mBAAmB,EAAE,yBAAyB;AAC/C,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HT,EAAA,CAAA;AACF,iBAAA;;;ACpND;AACA;;ACDA;;AAEG;;"}
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, model, input, computed, effect, untracked, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { warnDeprecated } from '@trismegisto/angular/deprecation';
2
+ import { inject, ElementRef, model, input, computed, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
4
3
  import { HermesFormFieldBase } from '@trismegisto/angular/forms';
5
4
  import { HERMES_MESSAGES } from '@trismegisto/angular/i18n';
6
5
  import { ICON_EXCLAMATION_TRIANGLE, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
@@ -28,15 +27,13 @@ class RadioComponent extends HermesFormFieldBase {
28
27
  appearance = input(undefined, ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
29
28
  layout = input(undefined, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
30
29
  hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
31
- /** @deprecated desde 0.2.0 — use `hint`. */
32
- help = input('', ...(ngDevMode ? [{ debugName: "help" }] : /* istanbul ignore next */ []));
33
30
  valueModel = this.value;
34
31
  text = this.fieldText;
35
32
  radioText = inject(HERMES_MESSAGES).radio;
36
33
  id = `hm-radio-${++nextId}`;
37
34
  helpId = `${this.id}-hint`;
38
35
  errorId = `${this.id}-error`;
39
- hintText = computed(() => this.hint() || this.help(), ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
36
+ hintText = computed(() => this.hint(), ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
40
37
  isCard = computed(() => this.appearance() === 'card', ...(ngDevMode ? [{ debugName: "isCard" }] : /* istanbul ignore next */ []));
41
38
  isInline = computed(() => this.layout() === 'inline', ...(ngDevMode ? [{ debugName: "isInline" }] : /* istanbul ignore next */ []));
42
39
  describedBy = computed(() => [this.hintText() ? this.helpId : '', this.errorText() ? this.errorId : ''].filter(Boolean).join(' ') || null, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
@@ -46,10 +43,6 @@ class RadioComponent extends HermesFormFieldBase {
46
43
  }
47
44
  constructor() {
48
45
  super();
49
- effect(() => {
50
- if (this.help())
51
- untracked(() => warnDeprecated('`help` em <hm-radio>', '`hint`'));
52
- });
53
46
  // A escolha nativa acontece antes do modelo; se o app desfizer o valor no mesmo ciclo, o binding
54
47
  // `[checked]` não vê diferença. Reafirma a marcação a partir do modelo depois de cada render.
55
48
  afterRenderEffect(() => {
@@ -90,12 +83,12 @@ class RadioComponent extends HermesFormFieldBase {
90
83
  this.markTouched();
91
84
  }
92
85
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
93
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: RadioComponent, isStandalone: true, selector: "hm-radio", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focusout": "onFocusOut($event)" } }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"hm-radio\"\n [class.hm-radio--card]=\"isCard()\"\n [class.hm-radio--inline]=\"isInline()\"\n role=\"radiogroup\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n>\n <span class=\"hm-radio__label\">{{ label() }}@if (isRequired()) {<span class=\"hm-radio__required\" aria-hidden=\"true\">{{ text.required }}</span>}</span>\n\n <div class=\"hm-radio__options\">\n @for (option of options(); track option.value; let index = $index) {\n <label\n class=\"hm-radio__row\"\n [class.hm-radio__row--checked]=\"option.value === value()\"\n [class.hm-radio__row--danger]=\"!!option.danger\"\n [class.hm-radio__row--disabled]=\"optionDisabled(option)\"\n [class.hm-radio__row--top]=\"!!(option.description || option.icon || option.disabledReason)\"\n [class.hm-radio__row--invalid]=\"!!errorText()\"\n [for]=\"optionId(index)\"\n >\n <input\n type=\"radio\"\n class=\"hm-radio__control\"\n [class.hm-radio__control--invalid]=\"!!errorText()\"\n [id]=\"optionId(index)\"\n [name]=\"id\"\n [value]=\"option.value\"\n [checked]=\"option.value === value()\"\n [disabled]=\"optionDisabled(option)\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-describedby]=\"optionDescribedBy(option, index)\"\n (change)=\"choose(option)\"\n />\n @if (option.icon) {\n <span class=\"hm-radio__option-icon\"><hm-icon [shape]=\"option.icon\" /></span>\n }\n <span class=\"hm-radio__option-text\">\n <span class=\"hm-radio__option-label\">@if (option.danger) {<hm-icon class=\"hm-radio__danger-icon\" shape=\"exclamation-triangle\" />}{{ option.label }}@if (option.danger) {<span class=\"hm-visually-hidden\">&ngsp;({{ radioText.danger }})</span>}</span>\n @if (option.description) {\n <!-- Lida pelo aria-describedby; fora do nome do r\u00E1dio para n\u00E3o ser lida duas vezes. -->\n <span class=\"hm-radio__option-description\" aria-hidden=\"true\" [id]=\"descriptionId(index)\">{{ option.description }}</span>\n }\n @if (option.disabledReason) {\n <span class=\"hm-radio__option-reason\" aria-hidden=\"true\" [id]=\"reasonId(index)\">{{ option.disabledReason }}</span>\n }\n </span>\n </label>\n }\n </div>\n\n @if (hintText()) {\n <p class=\"hm-radio__help\" [id]=\"helpId\">{{ hintText() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-radio__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: RadioComponent, isStandalone: true, selector: "hm-radio", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "focusout": "onFocusOut($event)" } }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"hm-radio\"\n [class.hm-radio--card]=\"isCard()\"\n [class.hm-radio--inline]=\"isInline()\"\n role=\"radiogroup\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n>\n <span class=\"hm-radio__label\">{{ label() }}@if (isRequired()) {<span class=\"hm-radio__required\" aria-hidden=\"true\">{{ text.required }}</span>}</span>\n\n <div class=\"hm-radio__options\">\n @for (option of options(); track option.value; let index = $index) {\n <label\n class=\"hm-radio__row\"\n [class.hm-radio__row--checked]=\"option.value === value()\"\n [class.hm-radio__row--danger]=\"!!option.danger\"\n [class.hm-radio__row--disabled]=\"optionDisabled(option)\"\n [class.hm-radio__row--top]=\"!!(option.description || option.icon || option.disabledReason)\"\n [class.hm-radio__row--invalid]=\"!!errorText()\"\n [for]=\"optionId(index)\"\n >\n <input\n type=\"radio\"\n class=\"hm-radio__control\"\n [class.hm-radio__control--invalid]=\"!!errorText()\"\n [id]=\"optionId(index)\"\n [name]=\"id\"\n [value]=\"option.value\"\n [checked]=\"option.value === value()\"\n [disabled]=\"optionDisabled(option)\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-describedby]=\"optionDescribedBy(option, index)\"\n (change)=\"choose(option)\"\n />\n @if (option.icon) {\n <span class=\"hm-radio__option-icon\"><hm-icon [shape]=\"option.icon\" /></span>\n }\n <span class=\"hm-radio__option-text\">\n <span class=\"hm-radio__option-label\">@if (option.danger) {<hm-icon class=\"hm-radio__danger-icon\" shape=\"exclamation-triangle\" />}{{ option.label }}@if (option.danger) {<span class=\"hm-visually-hidden\">&ngsp;({{ radioText.danger }})</span>}</span>\n @if (option.description) {\n <!-- Lida pelo aria-describedby; fora do nome do r\u00E1dio para n\u00E3o ser lida duas vezes. -->\n <span class=\"hm-radio__option-description\" aria-hidden=\"true\" [id]=\"descriptionId(index)\">{{ option.description }}</span>\n }\n @if (option.disabledReason) {\n <span class=\"hm-radio__option-reason\" aria-hidden=\"true\" [id]=\"reasonId(index)\">{{ option.disabledReason }}</span>\n }\n </span>\n </label>\n }\n </div>\n\n @if (hintText()) {\n <p class=\"hm-radio__help\" [id]=\"helpId\">{{ hintText() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-radio__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
94
87
  }
95
88
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: RadioComponent, decorators: [{
96
89
  type: Component,
97
90
  args: [{ selector: 'hm-radio', imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { '(focusout)': 'onFocusOut($event)' }, template: "<div\n class=\"hm-radio\"\n [class.hm-radio--card]=\"isCard()\"\n [class.hm-radio--inline]=\"isInline()\"\n role=\"radiogroup\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n>\n <span class=\"hm-radio__label\">{{ label() }}@if (isRequired()) {<span class=\"hm-radio__required\" aria-hidden=\"true\">{{ text.required }}</span>}</span>\n\n <div class=\"hm-radio__options\">\n @for (option of options(); track option.value; let index = $index) {\n <label\n class=\"hm-radio__row\"\n [class.hm-radio__row--checked]=\"option.value === value()\"\n [class.hm-radio__row--danger]=\"!!option.danger\"\n [class.hm-radio__row--disabled]=\"optionDisabled(option)\"\n [class.hm-radio__row--top]=\"!!(option.description || option.icon || option.disabledReason)\"\n [class.hm-radio__row--invalid]=\"!!errorText()\"\n [for]=\"optionId(index)\"\n >\n <input\n type=\"radio\"\n class=\"hm-radio__control\"\n [class.hm-radio__control--invalid]=\"!!errorText()\"\n [id]=\"optionId(index)\"\n [name]=\"id\"\n [value]=\"option.value\"\n [checked]=\"option.value === value()\"\n [disabled]=\"optionDisabled(option)\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-describedby]=\"optionDescribedBy(option, index)\"\n (change)=\"choose(option)\"\n />\n @if (option.icon) {\n <span class=\"hm-radio__option-icon\"><hm-icon [shape]=\"option.icon\" /></span>\n }\n <span class=\"hm-radio__option-text\">\n <span class=\"hm-radio__option-label\">@if (option.danger) {<hm-icon class=\"hm-radio__danger-icon\" shape=\"exclamation-triangle\" />}{{ option.label }}@if (option.danger) {<span class=\"hm-visually-hidden\">&ngsp;({{ radioText.danger }})</span>}</span>\n @if (option.description) {\n <!-- Lida pelo aria-describedby; fora do nome do r\u00E1dio para n\u00E3o ser lida duas vezes. -->\n <span class=\"hm-radio__option-description\" aria-hidden=\"true\" [id]=\"descriptionId(index)\">{{ option.description }}</span>\n }\n @if (option.disabledReason) {\n <span class=\"hm-radio__option-reason\" aria-hidden=\"true\" [id]=\"reasonId(index)\">{{ option.disabledReason }}</span>\n }\n </span>\n </label>\n }\n </div>\n\n @if (hintText()) {\n <p class=\"hm-radio__help\" [id]=\"helpId\">{{ hintText() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-radio__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n }\n</div>\n" }]
98
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], help: [{ type: i0.Input, args: [{ isSignal: true, alias: "help", required: false }] }] } });
91
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }] } });
99
92
 
100
93
  // Ponto de import `@trismegisto/angular/radio` (secundário do ng-packagr).
101
94
 
@@ -1 +1 @@
1
- {"version":3,"file":"trismegisto-angular-radio.mjs","sources":["../../src/radio/icons.generated.ts","../../src/radio/radio.component.ts","../../src/radio/radio.component.html","../../src/radio/index.ts","../../src/radio/trismegisto-angular-radio.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(RADIO_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_EXCLAMATION_TRIANGLE,\n} from '@trismegisto/angular/icon';\n\nexport const RADIO_ICONS: readonly RegisteredIcon[] = [ICON_EXCLAMATION_TRIANGLE];\n","import {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n untracked,\n} from '@angular/core';\nimport { warnDeprecated } from '@trismegisto/angular/deprecation';\nimport { HermesFormFieldBase } from '@trismegisto/angular/forms';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { IconComponent, useHermesIcons } from '@trismegisto/angular/icon';\nimport { RADIO_ICONS } from './icons.generated';\n\nexport interface RadioOption {\n readonly value: string;\n readonly label: string;\n /** Linha explicativa abaixo do rótulo. */\n readonly description?: string;\n /** Ícone decorativo antes do rótulo. */\n readonly icon?: string;\n /** Opção destrutiva: ganha ícone de alerta e um aviso para o leitor de tela, não só cor. */\n readonly danger?: boolean;\n /** Desabilita só esta opção. */\n readonly disabled?: boolean;\n /** Desabilita a opção e mostra o motivo embaixo dela. */\n readonly disabledReason?: string;\n}\n\n/** `list` (padrão): círculo ao lado do texto. `card`: cada opção vira um cartão clicável. */\nexport type RadioAppearance = 'list' | 'card';\n/** `stacked` (padrão): uma opção por linha. `inline`: lado a lado, quebrando linha. */\nexport type RadioLayout = 'stacked' | 'inline';\n\nlet nextId = 0;\n\n/**\n * Escolha única entre poucas opções visíveis, com rádios nativos: Tab entra no grupo, as setas trocam\n * a escolha e pulam as desabilitadas. Valor `string` (o `value` da opção marcada).\n *\n * - O grupo é `role=\"radiogroup\"` nomeado pelo `label`; obrigatório vai em `aria-required`.\n * - O erro só aparece depois que o foco sai do grupo (mover entre as opções não conta como \"tocado\").\n * - `disabledReason` explica por que a opção está bloqueada, em vez de só apagá-la.\n *\n * Funciona com Reactive Forms, `[(ngModel)]` ou `[(value)]` (ver `HermesFormFieldBase`).\n */\n@Component({\n selector: 'hm-radio',\n imports: [IconComponent],\n templateUrl: './radio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '(focusout)': 'onFocusOut($event)' },\n})\nexport class RadioComponent extends HermesFormFieldBase<string> {\n readonly #icons = useHermesIcons(RADIO_ICONS);\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model('');\n readonly label = input.required<string>();\n readonly options = input.required<readonly RadioOption[]>();\n // Sem padrão literal: `undefined` vale `list`/`stacked`.\n readonly appearance = input<RadioAppearance | undefined>(undefined);\n readonly layout = input<RadioLayout | undefined>(undefined);\n readonly hint = input('');\n /** @deprecated desde 0.2.0 — use `hint`. */\n readonly help = input('');\n\n protected readonly valueModel = this.value;\n protected readonly text = this.fieldText;\n protected readonly radioText = inject(HERMES_MESSAGES).radio;\n\n protected readonly id = `hm-radio-${++nextId}`;\n protected readonly helpId = `${this.id}-hint`;\n protected readonly errorId = `${this.id}-error`;\n\n protected readonly hintText = computed(() => this.hint() || this.help());\n protected readonly isCard = computed(() => this.appearance() === 'card');\n protected readonly isInline = computed(() => this.layout() === 'inline');\n\n protected readonly describedBy = computed(\n () => [this.hintText() ? this.helpId : '', this.errorText() ? this.errorId : ''].filter(Boolean).join(' ') || null,\n );\n\n /** Num grupo, o que falta é uma escolha: o texto padrão de \"obrigatório\" diz isso. */\n protected override errorMessages(): Readonly<Record<string, string>> {\n return { required: this.radioText.requiredError, ...this.messages() };\n }\n\n constructor() {\n super();\n effect(() => {\n if (this.help()) untracked(() => warnDeprecated('`help` em <hm-radio>', '`hint`'));\n });\n // A escolha nativa acontece antes do modelo; se o app desfizer o valor no mesmo ciclo, o binding\n // `[checked]` não vê diferença. Reafirma a marcação a partir do modelo depois de cada render.\n afterRenderEffect(() => {\n const current = this.value();\n this.options();\n for (const radio of this.#host.nativeElement.querySelectorAll<HTMLInputElement>('input.hm-radio__control')) {\n const on = radio.value === current;\n if (radio.checked !== on) radio.checked = on;\n }\n });\n }\n\n protected optionId(index: number): string {\n return `${this.id}-option-${index}`;\n }\n\n protected reasonId(index: number): string {\n return `${this.optionId(index)}-reason`;\n }\n\n protected descriptionId(index: number): string {\n return `${this.optionId(index)}-description`;\n }\n\n protected optionDescribedBy(option: RadioOption, index: number): string | null {\n const ids = [option.description ? this.descriptionId(index) : '', option.disabledReason ? this.reasonId(index) : ''];\n return ids.filter(Boolean).join(' ') || null;\n }\n\n protected optionDisabled(option: RadioOption): boolean {\n return this.isDisabled() || !!option.disabled || !!option.disabledReason;\n }\n\n protected choose(option: RadioOption): void {\n if (this.optionDisabled(option)) return;\n this.commit(option.value);\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 this.markTouched();\n }\n}\n","<div\n class=\"hm-radio\"\n [class.hm-radio--card]=\"isCard()\"\n [class.hm-radio--inline]=\"isInline()\"\n role=\"radiogroup\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n>\n <span class=\"hm-radio__label\">{{ label() }}@if (isRequired()) {<span class=\"hm-radio__required\" aria-hidden=\"true\">{{ text.required }}</span>}</span>\n\n <div class=\"hm-radio__options\">\n @for (option of options(); track option.value; let index = $index) {\n <label\n class=\"hm-radio__row\"\n [class.hm-radio__row--checked]=\"option.value === value()\"\n [class.hm-radio__row--danger]=\"!!option.danger\"\n [class.hm-radio__row--disabled]=\"optionDisabled(option)\"\n [class.hm-radio__row--top]=\"!!(option.description || option.icon || option.disabledReason)\"\n [class.hm-radio__row--invalid]=\"!!errorText()\"\n [for]=\"optionId(index)\"\n >\n <input\n type=\"radio\"\n class=\"hm-radio__control\"\n [class.hm-radio__control--invalid]=\"!!errorText()\"\n [id]=\"optionId(index)\"\n [name]=\"id\"\n [value]=\"option.value\"\n [checked]=\"option.value === value()\"\n [disabled]=\"optionDisabled(option)\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-describedby]=\"optionDescribedBy(option, index)\"\n (change)=\"choose(option)\"\n />\n @if (option.icon) {\n <span class=\"hm-radio__option-icon\"><hm-icon [shape]=\"option.icon\" /></span>\n }\n <span class=\"hm-radio__option-text\">\n <span class=\"hm-radio__option-label\">@if (option.danger) {<hm-icon class=\"hm-radio__danger-icon\" shape=\"exclamation-triangle\" />}{{ option.label }}@if (option.danger) {<span class=\"hm-visually-hidden\">&ngsp;({{ radioText.danger }})</span>}</span>\n @if (option.description) {\n <!-- Lida pelo aria-describedby; fora do nome do rádio para não ser lida duas vezes. -->\n <span class=\"hm-radio__option-description\" aria-hidden=\"true\" [id]=\"descriptionId(index)\">{{ option.description }}</span>\n }\n @if (option.disabledReason) {\n <span class=\"hm-radio__option-reason\" aria-hidden=\"true\" [id]=\"reasonId(index)\">{{ option.disabledReason }}</span>\n }\n </span>\n </label>\n }\n </div>\n\n @if (hintText()) {\n <p class=\"hm-radio__help\" [id]=\"helpId\">{{ hintText() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-radio__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n }\n</div>\n","// Ponto de import `@trismegisto/angular/radio` (secundário do ng-packagr).\nexport * from './radio.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQO,MAAM,WAAW,GAA8B,CAAC,yBAAyB,CAAC;;AC8BjF,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;;AASG;AAQG,MAAO,cAAe,SAAQ,mBAA2B,CAAA;AACpD,IAAA,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC;AACpC,IAAA,KAAK,GAAG,MAAM,CAA0B,UAAU,CAAC;AAEnD,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;AACjB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AAChC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAA0B;;AAElD,IAAA,UAAU,GAAG,KAAK,CAA8B,SAAS,iFAAC;AAC1D,IAAA,MAAM,GAAG,KAAK,CAA0B,SAAS,6EAAC;AAClD,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE,2EAAC;;AAEhB,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE,2EAAC;AAEN,IAAA,UAAU,GAAG,IAAI,CAAC,KAAK;AACvB,IAAA,IAAI,GAAG,IAAI,CAAC,SAAS;AACrB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/radio/radio.component.html","../../src/radio/index.ts","../../src/radio/trismegisto-angular-radio.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(RADIO_ICONS);`.\nimport type { RegisteredIcon } from '@trismegisto/icons';\nimport {\n ICON_EXCLAMATION_TRIANGLE,\n} from '@trismegisto/angular/icon';\n\nexport const RADIO_ICONS: readonly RegisteredIcon[] = [ICON_EXCLAMATION_TRIANGLE];\n","import {\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { HermesFormFieldBase } from '@trismegisto/angular/forms';\nimport { HERMES_MESSAGES } from '@trismegisto/angular/i18n';\nimport { IconComponent, useHermesIcons } from '@trismegisto/angular/icon';\nimport { RADIO_ICONS } from './icons.generated';\n\nexport interface RadioOption {\n readonly value: string;\n readonly label: string;\n /** Linha explicativa abaixo do rótulo. */\n readonly description?: string;\n /** Ícone decorativo antes do rótulo. */\n readonly icon?: string;\n /** Opção destrutiva: ganha ícone de alerta e um aviso para o leitor de tela, não só cor. */\n readonly danger?: boolean;\n /** Desabilita só esta opção. */\n readonly disabled?: boolean;\n /** Desabilita a opção e mostra o motivo embaixo dela. */\n readonly disabledReason?: string;\n}\n\n/** `list` (padrão): círculo ao lado do texto. `card`: cada opção vira um cartão clicável. */\nexport type RadioAppearance = 'list' | 'card';\n/** `stacked` (padrão): uma opção por linha. `inline`: lado a lado, quebrando linha. */\nexport type RadioLayout = 'stacked' | 'inline';\n\nlet nextId = 0;\n\n/**\n * Escolha única entre poucas opções visíveis, com rádios nativos: Tab entra no grupo, as setas trocam\n * a escolha e pulam as desabilitadas. Valor `string` (o `value` da opção marcada).\n *\n * - O grupo é `role=\"radiogroup\"` nomeado pelo `label`; obrigatório vai em `aria-required`.\n * - O erro só aparece depois que o foco sai do grupo (mover entre as opções não conta como \"tocado\").\n * - `disabledReason` explica por que a opção está bloqueada, em vez de só apagá-la.\n *\n * Funciona com Reactive Forms, `[(ngModel)]` ou `[(value)]` (ver `HermesFormFieldBase`).\n */\n@Component({\n selector: 'hm-radio',\n imports: [IconComponent],\n templateUrl: './radio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '(focusout)': 'onFocusOut($event)' },\n})\nexport class RadioComponent extends HermesFormFieldBase<string> {\n readonly #icons = useHermesIcons(RADIO_ICONS);\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = model('');\n readonly label = input.required<string>();\n readonly options = input.required<readonly RadioOption[]>();\n // Sem padrão literal: `undefined` vale `list`/`stacked`.\n readonly appearance = input<RadioAppearance | undefined>(undefined);\n readonly layout = input<RadioLayout | undefined>(undefined);\n readonly hint = input('');\n\n protected readonly valueModel = this.value;\n protected readonly text = this.fieldText;\n protected readonly radioText = inject(HERMES_MESSAGES).radio;\n\n protected readonly id = `hm-radio-${++nextId}`;\n protected readonly helpId = `${this.id}-hint`;\n protected readonly errorId = `${this.id}-error`;\n\n protected readonly hintText = computed(() => this.hint());\n protected readonly isCard = computed(() => this.appearance() === 'card');\n protected readonly isInline = computed(() => this.layout() === 'inline');\n\n protected readonly describedBy = computed(\n () => [this.hintText() ? this.helpId : '', this.errorText() ? this.errorId : ''].filter(Boolean).join(' ') || null,\n );\n\n /** Num grupo, o que falta é uma escolha: o texto padrão de \"obrigatório\" diz isso. */\n protected override errorMessages(): Readonly<Record<string, string>> {\n return { required: this.radioText.requiredError, ...this.messages() };\n }\n\n constructor() {\n super();\n // A escolha nativa acontece antes do modelo; se o app desfizer o valor no mesmo ciclo, o binding\n // `[checked]` não vê diferença. Reafirma a marcação a partir do modelo depois de cada render.\n afterRenderEffect(() => {\n const current = this.value();\n this.options();\n for (const radio of this.#host.nativeElement.querySelectorAll<HTMLInputElement>('input.hm-radio__control')) {\n const on = radio.value === current;\n if (radio.checked !== on) radio.checked = on;\n }\n });\n }\n\n protected optionId(index: number): string {\n return `${this.id}-option-${index}`;\n }\n\n protected reasonId(index: number): string {\n return `${this.optionId(index)}-reason`;\n }\n\n protected descriptionId(index: number): string {\n return `${this.optionId(index)}-description`;\n }\n\n protected optionDescribedBy(option: RadioOption, index: number): string | null {\n const ids = [option.description ? this.descriptionId(index) : '', option.disabledReason ? this.reasonId(index) : ''];\n return ids.filter(Boolean).join(' ') || null;\n }\n\n protected optionDisabled(option: RadioOption): boolean {\n return this.isDisabled() || !!option.disabled || !!option.disabledReason;\n }\n\n protected choose(option: RadioOption): void {\n if (this.optionDisabled(option)) return;\n this.commit(option.value);\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 this.markTouched();\n }\n}\n","<div\n class=\"hm-radio\"\n [class.hm-radio--card]=\"isCard()\"\n [class.hm-radio--inline]=\"isInline()\"\n role=\"radiogroup\"\n [attr.aria-label]=\"label()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n>\n <span class=\"hm-radio__label\">{{ label() }}@if (isRequired()) {<span class=\"hm-radio__required\" aria-hidden=\"true\">{{ text.required }}</span>}</span>\n\n <div class=\"hm-radio__options\">\n @for (option of options(); track option.value; let index = $index) {\n <label\n class=\"hm-radio__row\"\n [class.hm-radio__row--checked]=\"option.value === value()\"\n [class.hm-radio__row--danger]=\"!!option.danger\"\n [class.hm-radio__row--disabled]=\"optionDisabled(option)\"\n [class.hm-radio__row--top]=\"!!(option.description || option.icon || option.disabledReason)\"\n [class.hm-radio__row--invalid]=\"!!errorText()\"\n [for]=\"optionId(index)\"\n >\n <input\n type=\"radio\"\n class=\"hm-radio__control\"\n [class.hm-radio__control--invalid]=\"!!errorText()\"\n [id]=\"optionId(index)\"\n [name]=\"id\"\n [value]=\"option.value\"\n [checked]=\"option.value === value()\"\n [disabled]=\"optionDisabled(option)\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-describedby]=\"optionDescribedBy(option, index)\"\n (change)=\"choose(option)\"\n />\n @if (option.icon) {\n <span class=\"hm-radio__option-icon\"><hm-icon [shape]=\"option.icon\" /></span>\n }\n <span class=\"hm-radio__option-text\">\n <span class=\"hm-radio__option-label\">@if (option.danger) {<hm-icon class=\"hm-radio__danger-icon\" shape=\"exclamation-triangle\" />}{{ option.label }}@if (option.danger) {<span class=\"hm-visually-hidden\">&ngsp;({{ radioText.danger }})</span>}</span>\n @if (option.description) {\n <!-- Lida pelo aria-describedby; fora do nome do rádio para não ser lida duas vezes. -->\n <span class=\"hm-radio__option-description\" aria-hidden=\"true\" [id]=\"descriptionId(index)\">{{ option.description }}</span>\n }\n @if (option.disabledReason) {\n <span class=\"hm-radio__option-reason\" aria-hidden=\"true\" [id]=\"reasonId(index)\">{{ option.disabledReason }}</span>\n }\n </span>\n </label>\n }\n </div>\n\n @if (hintText()) {\n <p class=\"hm-radio__help\" [id]=\"helpId\">{{ hintText() }}</p>\n }\n @if (errorText()) {\n <p class=\"hm-radio__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n }\n</div>\n","// Ponto de import `@trismegisto/angular/radio` (secundário do ng-packagr).\nexport * from './radio.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQO,MAAM,WAAW,GAA8B,CAAC,yBAAyB,CAAC;;AC2BjF,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;;AASG;AAQG,MAAO,cAAe,SAAQ,mBAA2B,CAAA;AACpD,IAAA,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC;AACpC,IAAA,KAAK,GAAG,MAAM,CAA0B,UAAU,CAAC;AAEnD,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;AACjB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;AAChC,IAAA,OAAO,GAA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eSelection(this.#selection());
1260
1260
  }
1261
1261
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: RichTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1262
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: RichTextComponent, isStandalone: true, selector: "hm-rich-text", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, labelHidden: { classPropertyName: "labelHidden", publicName: "labelHidden", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, tools: { classPropertyName: "tools", publicName: "tools", isSignal: true, isRequired: false, transformFunction: null }, headingLevels: { classPropertyName: "headingLevels", publicName: "headingLevels", isSignal: true, isRequired: false, transformFunction: null }, hideToolbar: { classPropertyName: "hideToolbar", publicName: "hideToolbar", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, pasteMode: { classPropertyName: "pasteMode", publicName: "pasteMode", isSignal: true, isRequired: false, transformFunction: null }, linkProtocols: { classPropertyName: "linkProtocols", publicName: "linkProtocols", isSignal: true, isRequired: false, transformFunction: null }, allowRelativeLinks: { classPropertyName: "allowRelativeLinks", publicName: "allowRelativeLinks", isSignal: true, isRequired: false, transformFunction: null }, spellcheck: { classPropertyName: "spellcheck", publicName: "spellcheck", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", focusChange: "focusChange" }, host: { listeners: { "focusin": "onFocusIn()", "focusout": "onFocusOut($event)" }, classAttribute: "hm-rich-text" }, viewQueries: [{ propertyName: "surfaceRef", first: true, predicate: ["surface"], descendants: true, isSignal: true }, { propertyName: "linkPopover", first: true, predicate: ["linkPopover"], descendants: true, isSignal: true }, { propertyName: "linkPanel", first: true, predicate: ["linkPanel"], descendants: true, isSignal: true }, { propertyName: "caretAnchor", first: true, predicate: ["caretAnchor"], descendants: true, isSignal: true }, { propertyName: "bar", first: true, predicate: ["bar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"hm-rich-text__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-rich-text__label\" [id]=\"labelId\" (click)=\"onLabelClick()\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-rich-text__required\">{{ text.required }}</span>\n }\n</div>\n\n@if (loading()) {\n <div class=\"hm-rich-text__loading\" role=\"status\" aria-busy=\"true\" [attr.aria-label]=\"loadingLabel()\">\n <span class=\"hm-rich-text__ghost\" aria-hidden=\"true\"></span>\n </div>\n} @else {\n <div\n class=\"hm-rich-text__frame\"\n [class.hm-rich-text__frame--invalid]=\"!!errorText()\"\n [class.hm-rich-text__frame--disabled]=\"isDisabled()\"\n [class.hm-rich-text__frame--readonly]=\"readonly()\"\n (mousedown)=\"onFrameMouseDown($event)\"\n >\n @if (showToolbar()) {\n <div #bar class=\"hm-rich-text__bar\" (mousedown)=\"onBarPointerDown($event)\">\n <hm-toolbar [label]=\"toolbarLabel()\">\n @for (item of toolbarItems(); track item.key) {\n @if (item.tool === '|') {\n <span class=\"hm-rich-text__separator\" role=\"separator\" aria-orientation=\"vertical\"></span>\n } @else if (item.tool === 'blockType') {\n <hm-menu-button\n class=\"hm-rich-text__block-type\"\n closeOnCheck\n [label]=\"blockTypeLabel()\"\n [items]=\"blockTypeItems()\"\n [disabled]=\"isDisabled()\"\n (checkedChange)=\"onBlockType($event)\"\n >{{ blockKindName() }}</hm-menu-button\n >\n } @else {\n @let tool = stateOf(item.tool);\n <hm-icon-button\n #button\n class=\"hm-rich-text__tool\"\n emphasis=\"subtle\"\n [attr.data-tool]=\"item.tool\"\n [icon]=\"tool.icon\"\n [label]=\"tool.label\"\n [toggle]=\"tool.toggle\"\n [pressed]=\"tool.pressed\"\n [disabled]=\"tool.disabled\"\n [keyShortcuts]=\"tool.aria\"\n [hmTooltip]=\"tool.tooltip\"\n (clicked)=\"onTool(item.tool, button)\"\n />\n }\n }\n </hm-toolbar>\n </div>\n }\n <div class=\"hm-rich-text__body\">\n <div\n #surface\n class=\"hm-rich-text__area hm-prose\"\n [class.hm-rich-text__area--capped]=\"maxRows() !== null\"\n role=\"textbox\"\n aria-multiline=\"true\"\n [attr.contenteditable]=\"editable() ? 'true' : 'false'\"\n [attr.tabindex]=\"isDisabled() ? null : '0'\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-placeholder]=\"placeholder() && !readonly() ? placeholder() : null\"\n [attr.spellcheck]=\"spellcheck() ? 'true' : 'false'\"\n [style.--hm-rich-text-rows]=\"rows()\"\n [style.--hm-rich-text-max-rows]=\"maxRows()\"\n (beforeinput)=\"onBeforeInput($event)\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd()\"\n (paste)=\"onPaste($event)\"\n (copy)=\"onCopy($event)\"\n (cut)=\"onCut($event)\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd()\"\n (drop)=\"onDrop($event)\"\n (mousedown)=\"onAreaPointerDown()\"\n (focus)=\"onAreaFocus()\"\n (click)=\"onAreaClick($event)\"\n ></div>\n @if (showPlaceholder()) {\n <div class=\"hm-rich-text__placeholder\" aria-hidden=\"true\">{{ placeholder() }}</div>\n }\n <span #caretAnchor class=\"hm-rich-text__caret-anchor\" aria-hidden=\"true\"></span>\n </div>\n </div>\n}\n\n@if (showToolbar() && !isDisabled()) {\n <span class=\"hm-visually-hidden\" [id]=\"toolbarHintId\">{{ richText().toolbarHint }}</span>\n}\n\n@if (hint() || showCounterRow()) {\n <div class=\"hm-rich-text__footer\">\n @if (hint()) {\n <p class=\"hm-rich-text__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (showCounterRow()) {\n <p class=\"hm-rich-text__counter\" [class.hm-rich-text__counter--over]=\"overLimit()\" [id]=\"counterId\">\n @if (overLimit()) {\n <hm-icon shape=\"exclamation-triangle\" />\n }\n <span aria-hidden=\"true\">{{ counterVisible() }}</span>\n <span class=\"hm-visually-hidden\">{{ counterSpoken() }}</span>\n </p>\n }\n </div>\n}\n\n@if (errorText()) {\n <p class=\"hm-rich-text__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n}\n\n<span class=\"hm-visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</span>\n\n<hm-popover #linkPopover side=\"bottom\" align=\"start\" [heading]=\"linkHeading()\" (openChange)=\"onLinkOpenChange($event)\">\n <div #linkPanel class=\"hm-rich-text__link\" (keydown)=\"onLinkKeydown($event)\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\n <hm-input\n type=\"url\"\n autocomplete=\"url\"\n required\n [label]=\"richText().linkUrl\"\n [value]=\"linkUrl()\"\n [error]=\"linkError()\"\n (valueChange)=\"linkUrl.set($event); linkError.set('')\"\n />\n @if (linkWithText()) {\n <hm-input [label]=\"richText().linkText\" [value]=\"linkText()\" (valueChange)=\"linkText.set($event)\" />\n }\n <div class=\"hm-rich-text__link-actions\">\n <hm-button (clicked)=\"applyLink()\">{{ richText().linkApply }}</hm-button>\n @if (linkEditing()) {\n <hm-button emphasis=\"medium\" (clicked)=\"removeLink()\">{{ richText().linkRemove }}</hm-button>\n @if (linkHref(); as href) {\n <a [class]=\"openLinkClass\" [attr.href]=\"href\" target=\"_blank\" rel=\"noopener noreferrer\">{{ richText().linkOpen }}</a>\n }\n }\n <hm-button emphasis=\"minimal\" (clicked)=\"cancelLink()\">{{ richText().linkCancel }}</hm-button>\n </div>\n </div>\n</hm-popover>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "busy", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: IconButtonComponent, selector: "hm-icon-button", inputs: ["label", "icon", "solid", "iconDirection", "emphasis", "intent", "size", "disabled", "toggle", "pressed", "keyShortcuts"], outputs: ["pressedChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: InputComponent, selector: "hm-input", inputs: ["value", "label", "type", "placeholder", "icon", "labelHidden", "hint", "prefix", "suffix", "prefixIcon", "mask", "maskValue", "min", "max", "step", "stepButtons", "maxLength", "autocomplete", "inputMode"], outputs: ["valueChange"] }, { kind: "component", type: MenuButtonComponent, selector: "hm-menu-button", inputs: ["label", "icon", "items", "showArrow", "align", "side", "size", "shape", "layer", "closeOnCheck", "disabled"], outputs: ["chosen", "checkedChange"] }, { kind: "component", type: PopoverComponent, selector: "hm-popover", inputs: ["open", "heading", "headingLevel", "label", "side", "align", "arrow", "closable", "closeLabel", "closeOnOutsideClick", "openOn", "openDelay", "closeDelay"], outputs: ["openChange"] }, { kind: "component", type: ToolbarComponent, selector: "hm-toolbar", inputs: ["label"] }, { kind: "directive", type: TooltipDirective, selector: "[hmTooltip]", inputs: ["hmTooltip", "hmTooltipSide", "hmTooltipDisabled", "hmTooltipShowDelay", "hmTooltipHideDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1262
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: RichTextComponent, isStandalone: true, selector: "hm-rich-text", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, labelHidden: { classPropertyName: "labelHidden", publicName: "labelHidden", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, tools: { classPropertyName: "tools", publicName: "tools", isSignal: true, isRequired: false, transformFunction: null }, headingLevels: { classPropertyName: "headingLevels", publicName: "headingLevels", isSignal: true, isRequired: false, transformFunction: null }, hideToolbar: { classPropertyName: "hideToolbar", publicName: "hideToolbar", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, pasteMode: { classPropertyName: "pasteMode", publicName: "pasteMode", isSignal: true, isRequired: false, transformFunction: null }, linkProtocols: { classPropertyName: "linkProtocols", publicName: "linkProtocols", isSignal: true, isRequired: false, transformFunction: null }, allowRelativeLinks: { classPropertyName: "allowRelativeLinks", publicName: "allowRelativeLinks", isSignal: true, isRequired: false, transformFunction: null }, spellcheck: { classPropertyName: "spellcheck", publicName: "spellcheck", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", focusChange: "focusChange" }, host: { listeners: { "focusin": "onFocusIn()", "focusout": "onFocusOut($event)" }, classAttribute: "hm-rich-text" }, viewQueries: [{ propertyName: "surfaceRef", first: true, predicate: ["surface"], descendants: true, isSignal: true }, { propertyName: "linkPopover", first: true, predicate: ["linkPopover"], descendants: true, isSignal: true }, { propertyName: "linkPanel", first: true, predicate: ["linkPanel"], descendants: true, isSignal: true }, { propertyName: "caretAnchor", first: true, predicate: ["caretAnchor"], descendants: true, isSignal: true }, { propertyName: "bar", first: true, predicate: ["bar"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"hm-rich-text__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-rich-text__label\" [id]=\"labelId\" (click)=\"onLabelClick()\">{{ label() }}</span>\n @if (isRequired()) {\n <span class=\"hm-rich-text__required\">{{ text.required }}</span>\n }\n</div>\n\n@if (loading()) {\n <div class=\"hm-rich-text__loading\" role=\"status\" aria-busy=\"true\" [attr.aria-label]=\"loadingLabel()\">\n <span class=\"hm-rich-text__ghost\" aria-hidden=\"true\"></span>\n </div>\n} @else {\n <div\n class=\"hm-rich-text__frame\"\n [class.hm-rich-text__frame--invalid]=\"!!errorText()\"\n [class.hm-rich-text__frame--disabled]=\"isDisabled()\"\n [class.hm-rich-text__frame--readonly]=\"readonly()\"\n (mousedown)=\"onFrameMouseDown($event)\"\n >\n @if (showToolbar()) {\n <div #bar class=\"hm-rich-text__bar\" (mousedown)=\"onBarPointerDown($event)\">\n <hm-toolbar [label]=\"toolbarLabel()\">\n @for (item of toolbarItems(); track item.key) {\n @if (item.tool === '|') {\n <span class=\"hm-rich-text__separator\" role=\"separator\" aria-orientation=\"vertical\"></span>\n } @else if (item.tool === 'blockType') {\n <hm-menu-button\n class=\"hm-rich-text__block-type\"\n closeOnCheck\n [label]=\"blockTypeLabel()\"\n [items]=\"blockTypeItems()\"\n [disabled]=\"isDisabled()\"\n (checkedChange)=\"onBlockType($event)\"\n >{{ blockKindName() }}</hm-menu-button\n >\n } @else {\n @let tool = stateOf(item.tool);\n <hm-icon-button\n #button\n class=\"hm-rich-text__tool\"\n emphasis=\"subtle\"\n [attr.data-tool]=\"item.tool\"\n [icon]=\"tool.icon\"\n [label]=\"tool.label\"\n [toggle]=\"tool.toggle\"\n [pressed]=\"tool.pressed\"\n [disabled]=\"tool.disabled\"\n [keyShortcuts]=\"tool.aria\"\n [hmTooltip]=\"tool.tooltip\"\n (clicked)=\"onTool(item.tool, button)\"\n />\n }\n }\n </hm-toolbar>\n </div>\n }\n <div class=\"hm-rich-text__body\">\n <div\n #surface\n class=\"hm-rich-text__area hm-prose\"\n [class.hm-rich-text__area--capped]=\"maxRows() !== null\"\n role=\"textbox\"\n aria-multiline=\"true\"\n [attr.contenteditable]=\"editable() ? 'true' : 'false'\"\n [attr.tabindex]=\"isDisabled() ? null : '0'\"\n [attr.aria-labelledby]=\"labelId\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"isRequired() ? 'true' : null\"\n [attr.aria-invalid]=\"errorText() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : null\"\n [attr.aria-placeholder]=\"placeholder() && !readonly() ? placeholder() : null\"\n [attr.spellcheck]=\"spellcheck() ? 'true' : 'false'\"\n [style.--hm-rich-text-rows]=\"rows()\"\n [style.--hm-rich-text-max-rows]=\"maxRows()\"\n (beforeinput)=\"onBeforeInput($event)\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (compositionstart)=\"onCompositionStart()\"\n (compositionend)=\"onCompositionEnd()\"\n (paste)=\"onPaste($event)\"\n (copy)=\"onCopy($event)\"\n (cut)=\"onCut($event)\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd()\"\n (drop)=\"onDrop($event)\"\n (mousedown)=\"onAreaPointerDown()\"\n (focus)=\"onAreaFocus()\"\n (click)=\"onAreaClick($event)\"\n ></div>\n @if (showPlaceholder()) {\n <div class=\"hm-rich-text__placeholder\" aria-hidden=\"true\">{{ placeholder() }}</div>\n }\n <span #caretAnchor class=\"hm-rich-text__caret-anchor\" aria-hidden=\"true\"></span>\n </div>\n </div>\n}\n\n@if (showToolbar() && !isDisabled()) {\n <span class=\"hm-visually-hidden\" [id]=\"toolbarHintId\">{{ richText().toolbarHint }}</span>\n}\n\n@if (hint() || showCounterRow()) {\n <div class=\"hm-rich-text__footer\">\n @if (hint()) {\n <p class=\"hm-rich-text__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (showCounterRow()) {\n <p class=\"hm-rich-text__counter\" [class.hm-rich-text__counter--over]=\"overLimit()\" [id]=\"counterId\">\n @if (overLimit()) {\n <hm-icon shape=\"exclamation-triangle\" />\n }\n <span aria-hidden=\"true\">{{ counterVisible() }}</span>\n <span class=\"hm-visually-hidden\">{{ counterSpoken() }}</span>\n </p>\n }\n </div>\n}\n\n@if (errorText()) {\n <p class=\"hm-rich-text__error\" role=\"alert\" [id]=\"errorId\">\n <hm-icon shape=\"exclamation-triangle\" />\n <span>{{ errorText() }}</span>\n </p>\n}\n\n<span class=\"hm-visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</span>\n\n<hm-popover #linkPopover side=\"bottom\" align=\"start\" [heading]=\"linkHeading()\" (openChange)=\"onLinkOpenChange($event)\">\n <div #linkPanel class=\"hm-rich-text__link\" (keydown)=\"onLinkKeydown($event)\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\n <hm-input\n type=\"url\"\n autocomplete=\"url\"\n required\n [label]=\"richText().linkUrl\"\n [value]=\"linkUrl()\"\n [error]=\"linkError()\"\n (valueChange)=\"linkUrl.set($event); linkError.set('')\"\n />\n @if (linkWithText()) {\n <hm-input [label]=\"richText().linkText\" [value]=\"linkText()\" (valueChange)=\"linkText.set($event)\" />\n }\n <div class=\"hm-rich-text__link-actions\">\n <hm-button (clicked)=\"applyLink()\">{{ richText().linkApply }}</hm-button>\n @if (linkEditing()) {\n <hm-button emphasis=\"medium\" (clicked)=\"removeLink()\">{{ richText().linkRemove }}</hm-button>\n @if (linkHref(); as href) {\n <a [class]=\"openLinkClass\" [attr.href]=\"href\" target=\"_blank\" rel=\"noopener noreferrer\">{{ richText().linkOpen }}</a>\n }\n }\n <hm-button emphasis=\"minimal\" (clicked)=\"cancelLink()\">{{ richText().linkCancel }}</hm-button>\n </div>\n </div>\n</hm-popover>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "hm-button", inputs: ["emphasis", "intent", "size", "type", "icon", "iconDirection", "iconEnd", "disabled", "loading", "loadingState", "block", "link", "newTab", "caret", "inMenu", "toggle", "pressed"], outputs: ["loadingStateChange", "pressedChange", "clicked"] }, { kind: "component", type: IconButtonComponent, selector: "hm-icon-button", inputs: ["label", "icon", "solid", "iconDirection", "emphasis", "intent", "size", "disabled", "toggle", "pressed", "keyShortcuts"], outputs: ["pressedChange", "clicked"] }, { kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: InputComponent, selector: "hm-input", inputs: ["value", "label", "type", "placeholder", "icon", "labelHidden", "hint", "prefix", "suffix", "prefixIcon", "mask", "maskValue", "min", "max", "step", "stepButtons", "maxLength", "autocomplete", "inputMode"], outputs: ["valueChange"] }, { kind: "component", type: MenuButtonComponent, selector: "hm-menu-button", inputs: ["label", "icon", "items", "showArrow", "align", "side", "size", "shape", "layer", "closeOnCheck", "disabled"], outputs: ["chosen", "checkedChange"] }, { kind: "component", type: PopoverComponent, selector: "hm-popover", inputs: ["open", "heading", "headingLevel", "label", "side", "align", "arrow", "closable", "closeLabel", "closeOnOutsideClick", "openOn", "openDelay", "closeDelay"], outputs: ["openChange"] }, { kind: "component", type: ToolbarComponent, selector: "hm-toolbar", inputs: ["label"] }, { kind: "directive", type: TooltipDirective, selector: "[hmTooltip]", inputs: ["hmTooltip", "hmTooltipSide", "hmTooltipDisabled", "hmTooltipShowDelay", "hmTooltipHideDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1263
1263
  }
1264
1264
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: RichTextComponent, decorators: [{
1265
1265
  type: Component,