@tinya-code/gas-admin-ui 0.0.0-stage → 0.1.0-alpha.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 (136) hide show
  1. package/README.md +63 -2
  2. package/fesm2022/tinya-code-gas-admin-ui-api.service-CZrUeclM.mjs +281 -0
  3. package/fesm2022/tinya-code-gas-admin-ui-api.service-CZrUeclM.mjs.map +1 -0
  4. package/fesm2022/tinya-code-gas-admin-ui-badge-EeCA_l-o.mjs +84 -0
  5. package/fesm2022/tinya-code-gas-admin-ui-badge-EeCA_l-o.mjs.map +1 -0
  6. package/fesm2022/tinya-code-gas-admin-ui-bar-chart-G7sEMSBY.mjs +140 -0
  7. package/fesm2022/tinya-code-gas-admin-ui-bar-chart-G7sEMSBY.mjs.map +1 -0
  8. package/fesm2022/tinya-code-gas-admin-ui-boolean-B2ASKL0E.mjs +113 -0
  9. package/fesm2022/tinya-code-gas-admin-ui-boolean-B2ASKL0E.mjs.map +1 -0
  10. package/fesm2022/tinya-code-gas-admin-ui-button-BQjNW8KB.mjs +163 -0
  11. package/fesm2022/tinya-code-gas-admin-ui-button-BQjNW8KB.mjs.map +1 -0
  12. package/fesm2022/tinya-code-gas-admin-ui-calendar-view-r-RXDE37.mjs +1022 -0
  13. package/fesm2022/tinya-code-gas-admin-ui-calendar-view-r-RXDE37.mjs.map +1 -0
  14. package/fesm2022/tinya-code-gas-admin-ui-chart-line-BjdlKHoH.mjs +278 -0
  15. package/fesm2022/tinya-code-gas-admin-ui-chart-line-BjdlKHoH.mjs.map +1 -0
  16. package/fesm2022/tinya-code-gas-admin-ui-condition-evaluator-BBzWUuHl.mjs +101 -0
  17. package/fesm2022/tinya-code-gas-admin-ui-condition-evaluator-BBzWUuHl.mjs.map +1 -0
  18. package/fesm2022/tinya-code-gas-admin-ui-currency-BvuF3Z63.mjs +141 -0
  19. package/fesm2022/tinya-code-gas-admin-ui-currency-BvuF3Z63.mjs.map +1 -0
  20. package/fesm2022/tinya-code-gas-admin-ui-data-source.service-LD8AM3Rn.mjs +89 -0
  21. package/fesm2022/tinya-code-gas-admin-ui-data-source.service-LD8AM3Rn.mjs.map +1 -0
  22. package/fesm2022/tinya-code-gas-admin-ui-date-1SJGXZrd.mjs +107 -0
  23. package/fesm2022/tinya-code-gas-admin-ui-date-1SJGXZrd.mjs.map +1 -0
  24. package/fesm2022/tinya-code-gas-admin-ui-display-badge-fwk6sDU7.mjs +140 -0
  25. package/fesm2022/tinya-code-gas-admin-ui-display-badge-fwk6sDU7.mjs.map +1 -0
  26. package/fesm2022/tinya-code-gas-admin-ui-display-date-D7zLiDiG.mjs +119 -0
  27. package/fesm2022/tinya-code-gas-admin-ui-display-date-D7zLiDiG.mjs.map +1 -0
  28. package/fesm2022/tinya-code-gas-admin-ui-display-file-BiIhqvQC.mjs +125 -0
  29. package/fesm2022/tinya-code-gas-admin-ui-display-file-BiIhqvQC.mjs.map +1 -0
  30. package/fesm2022/tinya-code-gas-admin-ui-display-image-C1dhnZi1.mjs +152 -0
  31. package/fesm2022/tinya-code-gas-admin-ui-display-image-C1dhnZi1.mjs.map +1 -0
  32. package/fesm2022/tinya-code-gas-admin-ui-display-list-DOEuUbGe.mjs +211 -0
  33. package/fesm2022/tinya-code-gas-admin-ui-display-list-DOEuUbGe.mjs.map +1 -0
  34. package/fesm2022/tinya-code-gas-admin-ui-display-number-DDMzr4Hn.mjs +116 -0
  35. package/fesm2022/tinya-code-gas-admin-ui-display-number-DDMzr4Hn.mjs.map +1 -0
  36. package/fesm2022/tinya-code-gas-admin-ui-display-text-B8CdVNpv.mjs +111 -0
  37. package/fesm2022/tinya-code-gas-admin-ui-display-text-B8CdVNpv.mjs.map +1 -0
  38. package/fesm2022/tinya-code-gas-admin-ui-email-CT_O5ihA.mjs +107 -0
  39. package/fesm2022/tinya-code-gas-admin-ui-email-CT_O5ihA.mjs.map +1 -0
  40. package/fesm2022/tinya-code-gas-admin-ui-empty-state-BMc0QtoT.mjs +109 -0
  41. package/fesm2022/tinya-code-gas-admin-ui-empty-state-BMc0QtoT.mjs.map +1 -0
  42. package/fesm2022/tinya-code-gas-admin-ui-error-mapper.service-Ci0UpXtV.mjs +45 -0
  43. package/fesm2022/tinya-code-gas-admin-ui-error-mapper.service-Ci0UpXtV.mjs.map +1 -0
  44. package/fesm2022/tinya-code-gas-admin-ui-field-aria-BD1Wiggc.mjs +50 -0
  45. package/fesm2022/tinya-code-gas-admin-ui-field-aria-BD1Wiggc.mjs.map +1 -0
  46. package/fesm2022/tinya-code-gas-admin-ui-field-node-CIK6KNN_.mjs +24 -0
  47. package/fesm2022/tinya-code-gas-admin-ui-field-node-CIK6KNN_.mjs.map +1 -0
  48. package/fesm2022/tinya-code-gas-admin-ui-field-path-B4-FTBGZ.mjs +27 -0
  49. package/fesm2022/tinya-code-gas-admin-ui-field-path-B4-FTBGZ.mjs.map +1 -0
  50. package/fesm2022/tinya-code-gas-admin-ui-file-Dg2N3XQ2.mjs +408 -0
  51. package/fesm2022/tinya-code-gas-admin-ui-file-Dg2N3XQ2.mjs.map +1 -0
  52. package/fesm2022/tinya-code-gas-admin-ui-form-view-BwGupSbi.mjs +4514 -0
  53. package/fesm2022/tinya-code-gas-admin-ui-form-view-BwGupSbi.mjs.map +1 -0
  54. package/fesm2022/tinya-code-gas-admin-ui-format-badge-CK8ct5Wk.mjs +82 -0
  55. package/fesm2022/tinya-code-gas-admin-ui-format-badge-CK8ct5Wk.mjs.map +1 -0
  56. package/fesm2022/tinya-code-gas-admin-ui-format-boolean-ClzezZz-.mjs +105 -0
  57. package/fesm2022/tinya-code-gas-admin-ui-format-boolean-ClzezZz-.mjs.map +1 -0
  58. package/fesm2022/tinya-code-gas-admin-ui-format-currency-CVmniKml.mjs +65 -0
  59. package/fesm2022/tinya-code-gas-admin-ui-format-currency-CVmniKml.mjs.map +1 -0
  60. package/fesm2022/tinya-code-gas-admin-ui-format-date-Dr1YsDd_.mjs +65 -0
  61. package/fesm2022/tinya-code-gas-admin-ui-format-date-Dr1YsDd_.mjs.map +1 -0
  62. package/fesm2022/tinya-code-gas-admin-ui-format-number-CWCjpI4n.mjs +65 -0
  63. package/fesm2022/tinya-code-gas-admin-ui-format-number-CWCjpI4n.mjs.map +1 -0
  64. package/fesm2022/tinya-code-gas-admin-ui-format-text-DBOgJkH0.mjs +59 -0
  65. package/fesm2022/tinya-code-gas-admin-ui-format-text-DBOgJkH0.mjs.map +1 -0
  66. package/fesm2022/tinya-code-gas-admin-ui-format-thumbnail-PCRvxWKt.mjs +94 -0
  67. package/fesm2022/tinya-code-gas-admin-ui-format-thumbnail-PCRvxWKt.mjs.map +1 -0
  68. package/fesm2022/tinya-code-gas-admin-ui-gap-sorting-iTdy_DYG.mjs +72 -0
  69. package/fesm2022/tinya-code-gas-admin-ui-gap-sorting-iTdy_DYG.mjs.map +1 -0
  70. package/fesm2022/tinya-code-gas-admin-ui-group-h7-O8tt4.mjs +238 -0
  71. package/fesm2022/tinya-code-gas-admin-ui-group-h7-O8tt4.mjs.map +1 -0
  72. package/fesm2022/tinya-code-gas-admin-ui-image-Bjw9ImlS.mjs +416 -0
  73. package/fesm2022/tinya-code-gas-admin-ui-image-Bjw9ImlS.mjs.map +1 -0
  74. package/fesm2022/tinya-code-gas-admin-ui-kanban-view-CeGueI57.mjs +439 -0
  75. package/fesm2022/tinya-code-gas-admin-ui-kanban-view-CeGueI57.mjs.map +1 -0
  76. package/fesm2022/tinya-code-gas-admin-ui-key-value-nVdgg5at.mjs +513 -0
  77. package/fesm2022/tinya-code-gas-admin-ui-key-value-nVdgg5at.mjs.map +1 -0
  78. package/fesm2022/tinya-code-gas-admin-ui-list-CMzl9MkX.mjs +637 -0
  79. package/fesm2022/tinya-code-gas-admin-ui-list-CMzl9MkX.mjs.map +1 -0
  80. package/fesm2022/tinya-code-gas-admin-ui-metric-card-DnGMQL8l.mjs +127 -0
  81. package/fesm2022/tinya-code-gas-admin-ui-metric-card-DnGMQL8l.mjs.map +1 -0
  82. package/fesm2022/tinya-code-gas-admin-ui-multiselect-CuWwAfdY.mjs +251 -0
  83. package/fesm2022/tinya-code-gas-admin-ui-multiselect-CuWwAfdY.mjs.map +1 -0
  84. package/fesm2022/tinya-code-gas-admin-ui-notification.service-LjSULER6.mjs +66 -0
  85. package/fesm2022/tinya-code-gas-admin-ui-notification.service-LjSULER6.mjs.map +1 -0
  86. package/fesm2022/tinya-code-gas-admin-ui-number-JNr7glc8.mjs +114 -0
  87. package/fesm2022/tinya-code-gas-admin-ui-number-JNr7glc8.mjs.map +1 -0
  88. package/fesm2022/tinya-code-gas-admin-ui-phone-jR417hPf.mjs +116 -0
  89. package/fesm2022/tinya-code-gas-admin-ui-phone-jR417hPf.mjs.map +1 -0
  90. package/fesm2022/tinya-code-gas-admin-ui-quick-actions-DCQ6emmF.mjs +235 -0
  91. package/fesm2022/tinya-code-gas-admin-ui-quick-actions-DCQ6emmF.mjs.map +1 -0
  92. package/fesm2022/tinya-code-gas-admin-ui-radio-mode-DxvN07DY.mjs +8 -0
  93. package/fesm2022/tinya-code-gas-admin-ui-radio-mode-DxvN07DY.mjs.map +1 -0
  94. package/fesm2022/tinya-code-gas-admin-ui-readonly-text-BL7-4qie.mjs +124 -0
  95. package/fesm2022/tinya-code-gas-admin-ui-readonly-text-BL7-4qie.mjs.map +1 -0
  96. package/fesm2022/tinya-code-gas-admin-ui-record-list-BiZfnd_7.mjs +249 -0
  97. package/fesm2022/tinya-code-gas-admin-ui-record-list-BiZfnd_7.mjs.map +1 -0
  98. package/fesm2022/tinya-code-gas-admin-ui-relation-B3W3Ynsp.mjs +309 -0
  99. package/fesm2022/tinya-code-gas-admin-ui-relation-B3W3Ynsp.mjs.map +1 -0
  100. package/fesm2022/tinya-code-gas-admin-ui-relation-drawer.service-B0kT8EiW.mjs +39 -0
  101. package/fesm2022/tinya-code-gas-admin-ui-relation-drawer.service-B0kT8EiW.mjs.map +1 -0
  102. package/fesm2022/tinya-code-gas-admin-ui-render-registry-B_D5Jhp9.mjs +546 -0
  103. package/fesm2022/tinya-code-gas-admin-ui-render-registry-B_D5Jhp9.mjs.map +1 -0
  104. package/fesm2022/tinya-code-gas-admin-ui-rolldown-runtime-DpJrqANO.mjs +11 -0
  105. package/fesm2022/tinya-code-gas-admin-ui-schema-catalog-CDrz9pVN.mjs +131 -0
  106. package/fesm2022/tinya-code-gas-admin-ui-schema-catalog-CDrz9pVN.mjs.map +1 -0
  107. package/fesm2022/tinya-code-gas-admin-ui-seed-CNbQtREA.mjs +80 -0
  108. package/fesm2022/tinya-code-gas-admin-ui-seed-CNbQtREA.mjs.map +1 -0
  109. package/fesm2022/tinya-code-gas-admin-ui-select-DzaRfHXO.mjs +292 -0
  110. package/fesm2022/tinya-code-gas-admin-ui-select-DzaRfHXO.mjs.map +1 -0
  111. package/fesm2022/tinya-code-gas-admin-ui-skeleton-DnWK0tcZ.mjs +119 -0
  112. package/fesm2022/tinya-code-gas-admin-ui-skeleton-DnWK0tcZ.mjs.map +1 -0
  113. package/fesm2022/tinya-code-gas-admin-ui-slug-DU58cbiY.mjs +158 -0
  114. package/fesm2022/tinya-code-gas-admin-ui-slug-DU58cbiY.mjs.map +1 -0
  115. package/fesm2022/tinya-code-gas-admin-ui-source-options-B9R4mw8-.mjs +26 -0
  116. package/fesm2022/tinya-code-gas-admin-ui-source-options-B9R4mw8-.mjs.map +1 -0
  117. package/fesm2022/tinya-code-gas-admin-ui-status-progress-DmeG8htE.mjs +205 -0
  118. package/fesm2022/tinya-code-gas-admin-ui-status-progress-DmeG8htE.mjs.map +1 -0
  119. package/fesm2022/tinya-code-gas-admin-ui-string-list-gleasqzD.mjs +432 -0
  120. package/fesm2022/tinya-code-gas-admin-ui-string-list-gleasqzD.mjs.map +1 -0
  121. package/fesm2022/tinya-code-gas-admin-ui-template-interpolator-ewv7CkNX.mjs +36 -0
  122. package/fesm2022/tinya-code-gas-admin-ui-template-interpolator-ewv7CkNX.mjs.map +1 -0
  123. package/fesm2022/tinya-code-gas-admin-ui-text-CUPmL7W_.mjs +107 -0
  124. package/fesm2022/tinya-code-gas-admin-ui-text-CUPmL7W_.mjs.map +1 -0
  125. package/fesm2022/tinya-code-gas-admin-ui-textarea-CGLSIW13.mjs +223 -0
  126. package/fesm2022/tinya-code-gas-admin-ui-textarea-CGLSIW13.mjs.map +1 -0
  127. package/fesm2022/tinya-code-gas-admin-ui-time-BcHzsTWf.mjs +107 -0
  128. package/fesm2022/tinya-code-gas-admin-ui-time-BcHzsTWf.mjs.map +1 -0
  129. package/fesm2022/tinya-code-gas-admin-ui-upload.service-C1g545w5.mjs +60 -0
  130. package/fesm2022/tinya-code-gas-admin-ui-upload.service-C1g545w5.mjs.map +1 -0
  131. package/fesm2022/tinya-code-gas-admin-ui-url-GO4LZi__.mjs +141 -0
  132. package/fesm2022/tinya-code-gas-admin-ui-url-GO4LZi__.mjs.map +1 -0
  133. package/fesm2022/tinya-code-gas-admin-ui.mjs +4400 -0
  134. package/fesm2022/tinya-code-gas-admin-ui.mjs.map +1 -0
  135. package/package.json +31 -3
  136. package/types/tinya-code-gas-admin-ui.d.ts +3091 -0
@@ -0,0 +1,111 @@
1
+ import { t as Badge } from "./tinya-code-gas-admin-ui-badge-EeCA_l-o.mjs";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, computed, input } from "@angular/core";
4
+ var FieldDisplayText = class FieldDisplayText {
5
+ field = input.required(...ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []);
6
+ value = input(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
7
+ chip = input(false, ...ngDevMode ? [{ debugName: "chip" }] : /* istanbul ignore next */ []);
8
+ texto = computed(() => String(this.value()), ...ngDevMode ? [{ debugName: "texto" }] : /* istanbul ignore next */ []);
9
+ static ɵfac = i0.ɵɵngDeclareFactory({
10
+ minVersion: "12.0.0",
11
+ version: "22.2.3",
12
+ ngImport: i0,
13
+ type: FieldDisplayText,
14
+ deps: [],
15
+ target: i0.ɵɵFactoryTarget.Component
16
+ });
17
+ static ɵcmp = i0.ɵɵngDeclareComponent({
18
+ minVersion: "17.0.0",
19
+ version: "22.2.3",
20
+ type: FieldDisplayText,
21
+ isStandalone: true,
22
+ selector: "app-field-display-text",
23
+ inputs: {
24
+ field: {
25
+ classPropertyName: "field",
26
+ publicName: "field",
27
+ isSignal: true,
28
+ isRequired: true,
29
+ transformFunction: null
30
+ },
31
+ value: {
32
+ classPropertyName: "value",
33
+ publicName: "value",
34
+ isSignal: true,
35
+ isRequired: false,
36
+ transformFunction: null
37
+ },
38
+ chip: {
39
+ classPropertyName: "chip",
40
+ publicName: "chip",
41
+ isSignal: true,
42
+ isRequired: false,
43
+ transformFunction: null
44
+ }
45
+ },
46
+ ngImport: i0,
47
+ template: `
48
+ @if (chip()) {
49
+ <app-badge [label]="texto()" />
50
+ } @else {
51
+ {{ texto() }}
52
+ }
53
+ `,
54
+ isInline: true,
55
+ dependencies: [{
56
+ kind: "component",
57
+ type: Badge,
58
+ selector: "app-badge",
59
+ inputs: ["label", "kind"]
60
+ }]
61
+ });
62
+ };
63
+ i0.ɵɵngDeclareClassMetadata({
64
+ minVersion: "12.0.0",
65
+ version: "22.2.3",
66
+ ngImport: i0,
67
+ type: FieldDisplayText,
68
+ decorators: [{
69
+ type: Component,
70
+ args: [{
71
+ selector: "app-field-display-text",
72
+ imports: [Badge],
73
+ template: `
74
+ @if (chip()) {
75
+ <app-badge [label]="texto()" />
76
+ } @else {
77
+ {{ texto() }}
78
+ }
79
+ `
80
+ }]
81
+ }],
82
+ propDecorators: {
83
+ field: [{
84
+ type: i0.Input,
85
+ args: [{
86
+ isSignal: true,
87
+ alias: "field",
88
+ required: true
89
+ }]
90
+ }],
91
+ value: [{
92
+ type: i0.Input,
93
+ args: [{
94
+ isSignal: true,
95
+ alias: "value",
96
+ required: false
97
+ }]
98
+ }],
99
+ chip: [{
100
+ type: i0.Input,
101
+ args: [{
102
+ isSignal: true,
103
+ alias: "chip",
104
+ required: false
105
+ }]
106
+ }]
107
+ }
108
+ });
109
+ export { FieldDisplayText };
110
+
111
+ //# sourceMappingURL=tinya-code-gas-admin-ui-display-text-B8CdVNpv.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-display-text-B8CdVNpv.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/fields/display/display-text.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\n\nimport { Badge } from '../../shared/components/badge/badge';\nimport type { FieldSchema } from '../../core/models/schema.model';\n\n/**\n * Display por defecto de los tipos textuales (R4.1 · modo `display`).\n *\n * Toma el valor crudo del registro —no el árbol del formulario— y lo pinta\n * como texto: el `default` de `formatValue` de `detail-view`, que era donde\n * caían `text`, `textarea`, `slug`, `url`, `email`, `phone`, `readonly-text`,\n * `relation`, `group`, `key-value`, `string-list`, `multiselect` y `time`.\n *\n * `String(raw)` conserva el comportamiento previo (un array sale `a,b`; un\n * objeto sale `[object Object]`): R4.2 pide que «los 7 detalles rendericen\n * igual», así que la paridad manda sobre la estética.\n *\n * Todos los display declaran `field`, `value` y `chip` aunque no los usen:\n * el host les pasa la misma forma a los 6 y `ngComponentOutletInputs` no\n * admite claves que el componente no declare.\n */\n@Component({\n selector: 'app-field-display-text',\n imports: [Badge],\n template: `\n @if (chip()) {\n <app-badge [label]=\"texto()\" />\n } @else {\n {{ texto() }}\n }\n `,\n})\nexport class FieldDisplayText {\n /** Campo que se pinta. Lo usa el tipo; acá sólo tipa la forma común. */\n readonly field = input.required<FieldSchema>();\n /** Valor crudo del registro. El host ya filtró el vacío (`—`). */\n readonly value = input<unknown>(null);\n /** `true` en la cabecera: el texto se pinta como chip compacto. */\n readonly chip = input(false);\n\n protected readonly texto = computed(() => String(this.value()));\n}\n"],"mappings":";;;AAgCA,IAAa,mBAAb,MAAa,iBAAgB;CAElB,QAAQ,MAAM,SAAuB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAErC,QAAQ,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAE5B,OAAO,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAET,QAAQ,eAAe,OAAO,KAAK,MAAK,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CARpD,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAhB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAgB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UARjB;;;;;;;EAMT,UAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAPS;GAAK,UAAA;GAAA,QAAA,CAAA,SAAA,MAAA;EAAA,CAAA;CAAA,CAAA;;AASJ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAX5B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,KAAK;GACf,UAAU;;;;;;;EAOX,CAAA"}
@@ -0,0 +1,107 @@
1
+ import { n as FieldAria } from "./tinya-code-gas-admin-ui-field-aria-BD1Wiggc.mjs";
2
+ import { t as childTree } from "./tinya-code-gas-admin-ui-field-node-CIK6KNN_.mjs";
3
+ import * as i0 from "@angular/core";
4
+ import { Component, computed, input } from "@angular/core";
5
+ import { FormField } from "@angular/forms/signals";
6
+ var FieldEmail = class FieldEmail {
7
+ field = input.required(...ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []);
8
+ tree = input.required(...ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []);
9
+ node = computed(() => childTree(this.tree(), this.field().key), ...ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []);
10
+ state = computed(() => this.node()(), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
11
+ static ɵfac = i0.ɵɵngDeclareFactory({
12
+ minVersion: "12.0.0",
13
+ version: "22.2.3",
14
+ ngImport: i0,
15
+ type: FieldEmail,
16
+ deps: [],
17
+ target: i0.ɵɵFactoryTarget.Component
18
+ });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({
20
+ minVersion: "17.1.0",
21
+ version: "22.2.3",
22
+ type: FieldEmail,
23
+ isStandalone: true,
24
+ selector: "app-field-email",
25
+ inputs: {
26
+ field: {
27
+ classPropertyName: "field",
28
+ publicName: "field",
29
+ isSignal: true,
30
+ isRequired: true,
31
+ transformFunction: null
32
+ },
33
+ tree: {
34
+ classPropertyName: "tree",
35
+ publicName: "tree",
36
+ isSignal: true,
37
+ isRequired: true,
38
+ transformFunction: null
39
+ }
40
+ },
41
+ ngImport: i0,
42
+ template: `
43
+ <input
44
+ type="email"
45
+ class="field-input"
46
+ [id]="state().name()"
47
+ [formField]="node()"
48
+ [placeholder]="field().placeholder ?? ''"
49
+ />
50
+ `,
51
+ isInline: true,
52
+ dependencies: [{
53
+ kind: "directive",
54
+ type: FieldAria,
55
+ selector: "input[id], select[id], textarea[id], output[id]"
56
+ }, {
57
+ kind: "directive",
58
+ type: FormField,
59
+ selector: "[formField]",
60
+ inputs: ["formField"],
61
+ exportAs: ["formField"]
62
+ }]
63
+ });
64
+ };
65
+ i0.ɵɵngDeclareClassMetadata({
66
+ minVersion: "12.0.0",
67
+ version: "22.2.3",
68
+ ngImport: i0,
69
+ type: FieldEmail,
70
+ decorators: [{
71
+ type: Component,
72
+ args: [{
73
+ selector: "app-field-email",
74
+ imports: [FieldAria, FormField],
75
+ template: `
76
+ <input
77
+ type="email"
78
+ class="field-input"
79
+ [id]="state().name()"
80
+ [formField]="node()"
81
+ [placeholder]="field().placeholder ?? ''"
82
+ />
83
+ `
84
+ }]
85
+ }],
86
+ propDecorators: {
87
+ field: [{
88
+ type: i0.Input,
89
+ args: [{
90
+ isSignal: true,
91
+ alias: "field",
92
+ required: true
93
+ }]
94
+ }],
95
+ tree: [{
96
+ type: i0.Input,
97
+ args: [{
98
+ isSignal: true,
99
+ alias: "tree",
100
+ required: true
101
+ }]
102
+ }]
103
+ }
104
+ });
105
+ export { FieldEmail };
106
+
107
+ //# sourceMappingURL=tinya-code-gas-admin-ui-email-CT_O5ihA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-email-CT_O5ihA.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/fields/email/email.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\nimport { FormField } from '@angular/forms/signals';\n\nimport type { EmailField } from '../../core/models/schema.model';\nimport { FieldAria } from '../field-aria';\nimport { childTree, type RootTree } from '../field-node';\n\n/** Input de correo (base.md §5.1); la validación `email()` llega en Fase 10. */\n@Component({\n selector: 'app-field-email',\n imports: [FieldAria, FormField],\n template: `\n <input\n type=\"email\"\n class=\"field-input\"\n [id]=\"state().name()\"\n [formField]=\"node()\"\n [placeholder]=\"field().placeholder ?? ''\"\n />\n `,\n})\nexport class FieldEmail {\n readonly field = input.required<EmailField>();\n readonly tree = input.required<RootTree>();\n\n protected readonly node = computed(() => childTree<string>(this.tree(), this.field().key));\n protected readonly state = computed(() => this.node()());\n}\n"],"mappings":";;;;;AAqBA,IAAa,aAAb,MAAa,WAAU;CACZ,QAAQ,MAAM,SAAsB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACpC,OAAO,MAAM,SAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEvB,OAAO,eAAe,UAAkB,KAAK,KAAI,GAAI,KAAK,MAAK,CAAE,CAAC,GAAG,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACvE,QAAQ,eAAe,KAAK,KAAI,CAAE,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAL7C,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAU,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAV,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAU,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,MAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UAVX;;;;;;;;;EAQT,UAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MATS;GAAS,UAAA;EAAA,GAAA;GAAA,MAAA;GAAA,MAAE;GAAS,UAAA;GAAA,QAAA,CAAA,WAAA;GAAA,UAAA,CAAA,WAAA;EAAA,CAAA;CAAA,CAAA;;AAWnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EAbtB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,WAAW,SAAS;GAC9B,UAAU;;;;;;;;;EASX,CAAA"}
@@ -0,0 +1,109 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Component, input } from "@angular/core";
3
+ import { LucideInbox } from "@lucide/angular";
4
+ var EmptyState = class EmptyState {
5
+ title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
6
+ message = input("", ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
7
+ static ɵfac = i0.ɵɵngDeclareFactory({
8
+ minVersion: "12.0.0",
9
+ version: "22.2.3",
10
+ ngImport: i0,
11
+ type: EmptyState,
12
+ deps: [],
13
+ target: i0.ɵɵFactoryTarget.Component
14
+ });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({
16
+ minVersion: "17.0.0",
17
+ version: "22.2.3",
18
+ type: EmptyState,
19
+ isStandalone: true,
20
+ selector: "app-empty-state",
21
+ inputs: {
22
+ title: {
23
+ classPropertyName: "title",
24
+ publicName: "title",
25
+ isSignal: true,
26
+ isRequired: true,
27
+ transformFunction: null
28
+ },
29
+ message: {
30
+ classPropertyName: "message",
31
+ publicName: "message",
32
+ isSignal: true,
33
+ isRequired: false,
34
+ transformFunction: null
35
+ }
36
+ },
37
+ host: { attributes: { "role": "status" } },
38
+ ngImport: i0,
39
+ template: `
40
+ <div
41
+ class="flex flex-col items-center gap-2 rounded-xl border border-dashed border-neutral/30 px-6 py-12 text-center"
42
+ >
43
+ <svg lucideInbox size="32" class="text-neutral" />
44
+ <h2 class="font-display text-base font-semibold">{{ title() }}</h2>
45
+ @if (message()) {
46
+ <p class="text-sm text-neutral">{{ message() }}</p>
47
+ }
48
+ <div class="mt-2">
49
+ <ng-content />
50
+ </div>
51
+ </div>
52
+ `,
53
+ isInline: true,
54
+ dependencies: [{
55
+ kind: "component",
56
+ type: LucideInbox,
57
+ selector: "svg[lucideInbox]"
58
+ }]
59
+ });
60
+ };
61
+ i0.ɵɵngDeclareClassMetadata({
62
+ minVersion: "12.0.0",
63
+ version: "22.2.3",
64
+ ngImport: i0,
65
+ type: EmptyState,
66
+ decorators: [{
67
+ type: Component,
68
+ args: [{
69
+ selector: "app-empty-state",
70
+ imports: [LucideInbox],
71
+ host: { role: "status" },
72
+ template: `
73
+ <div
74
+ class="flex flex-col items-center gap-2 rounded-xl border border-dashed border-neutral/30 px-6 py-12 text-center"
75
+ >
76
+ <svg lucideInbox size="32" class="text-neutral" />
77
+ <h2 class="font-display text-base font-semibold">{{ title() }}</h2>
78
+ @if (message()) {
79
+ <p class="text-sm text-neutral">{{ message() }}</p>
80
+ }
81
+ <div class="mt-2">
82
+ <ng-content />
83
+ </div>
84
+ </div>
85
+ `
86
+ }]
87
+ }],
88
+ propDecorators: {
89
+ title: [{
90
+ type: i0.Input,
91
+ args: [{
92
+ isSignal: true,
93
+ alias: "title",
94
+ required: true
95
+ }]
96
+ }],
97
+ message: [{
98
+ type: i0.Input,
99
+ args: [{
100
+ isSignal: true,
101
+ alias: "message",
102
+ required: false
103
+ }]
104
+ }]
105
+ }
106
+ });
107
+ export { EmptyState as t };
108
+
109
+ //# sourceMappingURL=tinya-code-gas-admin-ui-empty-state-BMc0QtoT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-empty-state-BMc0QtoT.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/shared/components/empty-state/empty-state.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { LucideInbox } from '@lucide/angular';\n\n/**\n * Estado vacío universal (structure.md §6). El contenido proyectado es la\n * acción opcional (normalmente un `button[app-button]`).\n */\n@Component({\n selector: 'app-empty-state',\n imports: [LucideInbox],\n host: { role: 'status' },\n template: `\n <div\n class=\"flex flex-col items-center gap-2 rounded-xl border border-dashed border-neutral/30 px-6 py-12 text-center\"\n >\n <svg lucideInbox size=\"32\" class=\"text-neutral\" />\n <h2 class=\"font-display text-base font-semibold\">{{ title() }}</h2>\n @if (message()) {\n <p class=\"text-sm text-neutral\">{{ message() }}</p>\n }\n <div class=\"mt-2\">\n <ng-content />\n </div>\n </div>\n `,\n})\nexport class EmptyState {\n readonly title = input.required<string>();\n readonly message = input('');\n}\n"],"mappings":";;;AA0BA,IAAa,aAAb,MAAa,WAAU;CACZ,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAFjB,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAU,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAV,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAU,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,QAAA,SAAA,EAAA;EAAA,UAAA;EAAA,UAfX;;;;;;;;;;;;;;EAaT,UAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAfS;GAAW,UAAA;EAAA,CAAA;CAAA,CAAA;;AAiBV,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EAnBtB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,WAAW;GACrB,MAAM,EAAE,MAAM,SAAQ;GACtB,UAAU;;;;;;;;;;;;;;EAcX,CAAA"}
@@ -0,0 +1,45 @@
1
+ import { s as ApiError } from "./tinya-code-gas-admin-ui-api.service-CZrUeclM.mjs";
2
+ import * as i0 from "@angular/core";
3
+ import { Service } from "@angular/core";
4
+ var ErrorMapperService = class ErrorMapperService {
5
+ map(error) {
6
+ if (error instanceof ApiError) {
7
+ const fields = {};
8
+ for (const issue of error.issues) if (issue.path) fields[issue.path] = issue.message;
9
+ if (error.fieldPath && fields[error.fieldPath] === void 0) fields[error.fieldPath] = error.message;
10
+ if (Object.keys(fields).length > 0) return { fields };
11
+ }
12
+ return {
13
+ fields: {},
14
+ general: this.messageOf(error)
15
+ };
16
+ }
17
+ messageOf(error) {
18
+ if (error instanceof Error) return error.message;
19
+ return "Error inesperado";
20
+ }
21
+ static ɵfac = i0.ɵɵngDeclareFactory({
22
+ minVersion: "12.0.0",
23
+ version: "22.2.3",
24
+ ngImport: i0,
25
+ type: ErrorMapperService,
26
+ deps: [],
27
+ target: i0.ɵɵFactoryTarget.Service
28
+ });
29
+ static ɵprov = i0.ɵɵngDeclareService({
30
+ minVersion: "22.0.0",
31
+ version: "22.2.3",
32
+ ngImport: i0,
33
+ type: ErrorMapperService
34
+ });
35
+ };
36
+ i0.ɵɵngDeclareClassMetadata({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.3",
39
+ ngImport: i0,
40
+ type: ErrorMapperService,
41
+ decorators: [{ type: Service }]
42
+ });
43
+ export { ErrorMapperService as t };
44
+
45
+ //# sourceMappingURL=tinya-code-gas-admin-ui-error-mapper.service-Ci0UpXtV.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-error-mapper.service-Ci0UpXtV.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/core/services/error-mapper.service.ts"],"sourcesContent":["import { Service } from '@angular/core';\n\nimport { ApiError } from '../models/api.model';\n\nexport interface MappedError {\n /** Errores por ruta de campo (ej. `faq[2].answer`); se pintan en el campo exacto. */\n fields: Record<string, string>;\n /** Mensaje general; presente cuando el error no tiene ruta de campo (base.md §10). */\n general?: string;\n}\n\n/**\n * Convierte un error recibido en el formato que consume la UI:\n * rutas de campo para pintar el error donde corresponde, o mensaje general.\n *\n * Un422 trae VARIOS issues con ruta (`error.errors[]`, auth.md §6); cada uno\n * se convierte en `fields[path] = mensaje`, que es exactamente la clave que\n * después resuelve el host como `serverErrors[prefix + key]`. Si al final no\n * hay ninguna ruta pintable (error sin `errors[]`, issue sin `path`), el\n * mensaje del sobre queda en `general` como hasta ahora (base.md §10).\n */\n@Service()\nexport class ErrorMapperService {\n map(error: unknown): MappedError {\n if (error instanceof ApiError) {\n const fields: Record<string, string> = {};\n for (const issue of error.issues) {\n if (issue.path) {\n fields[issue.path] = issue.message;\n }\n }\n // Sobre con `path` suelto (sin `errors[]`): misma historia, un campo.\n if (error.fieldPath && fields[error.fieldPath] === undefined) {\n fields[error.fieldPath] = error.message;\n }\n if (Object.keys(fields).length > 0) {\n return { fields };\n }\n }\n return { fields: {}, general: this.messageOf(error) };\n }\n\n messageOf(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n return 'Error inesperado';\n }\n}\n"],"mappings":";;;AAsBA,IAAa,qBAAb,MAAa,mBAAkB;CAC7B,IAAI,OAAc;EAChB,IAAI,iBAAiB,UAAU;GAC7B,MAAM,SAAiC,CAAA;GACvC,KAAK,MAAM,SAAS,MAAM,QACxB,IAAI,MAAM,MACR,OAAO,MAAM,QAAQ,MAAM;GAI/B,IAAI,MAAM,aAAa,OAAO,MAAM,eAAe,QACjD,OAAO,MAAM,aAAa,MAAM;GAElC,IAAI,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,GAC/B,OAAO,EAAE,OAAM;EAEnB;EACA,OAAO;GAAE,QAAQ,CAAA;GAAI,SAAS,KAAK,UAAU,KAAK;EAAC;CACrD;CAEA,UAAU,OAAc;EACtB,IAAI,iBAAiB,OACnB,OAAO,MAAM;EAEf,OAAO;CACT;CAzBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAkB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAlB,OAAA,QAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;CAAkB,CAAA;;AAAlB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA,EAD9B,MAAA,QAAA,CAAA"}
@@ -0,0 +1,50 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, InjectionToken, computed, inject } from "@angular/core";
3
+ const FIELD_ARIA = new InjectionToken("FIELD_ARIA");
4
+ var FieldAria = class FieldAria {
5
+ ctx = inject(FIELD_ARIA, { optional: true });
6
+ ariaInvalid = computed(() => this.ctx ? String(this.ctx.invalid()) : null, ...ngDevMode ? [{ debugName: "ariaInvalid" }] : /* istanbul ignore next */ []);
7
+ ariaRequired = computed(() => this.ctx ? String(this.ctx.required()) : null, ...ngDevMode ? [{ debugName: "ariaRequired" }] : /* istanbul ignore next */ []);
8
+ ariaDescribedBy = computed(() => this.ctx?.describedBy() ?? null, ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
9
+ static ɵfac = i0.ɵɵngDeclareFactory({
10
+ minVersion: "12.0.0",
11
+ version: "22.2.3",
12
+ ngImport: i0,
13
+ type: FieldAria,
14
+ deps: [],
15
+ target: i0.ɵɵFactoryTarget.Directive
16
+ });
17
+ static ɵdir = i0.ɵɵngDeclareDirective({
18
+ minVersion: "14.0.0",
19
+ version: "22.2.3",
20
+ type: FieldAria,
21
+ isStandalone: true,
22
+ selector: "input[id], select[id], textarea[id], output[id]",
23
+ host: { properties: {
24
+ "attr.aria-invalid": "ariaInvalid()",
25
+ "attr.aria-required": "ariaRequired()",
26
+ "attr.aria-describedby": "ariaDescribedBy()"
27
+ } },
28
+ ngImport: i0
29
+ });
30
+ };
31
+ i0.ɵɵngDeclareClassMetadata({
32
+ minVersion: "12.0.0",
33
+ version: "22.2.3",
34
+ ngImport: i0,
35
+ type: FieldAria,
36
+ decorators: [{
37
+ type: Directive,
38
+ args: [{
39
+ selector: "input[id], select[id], textarea[id], output[id]",
40
+ host: {
41
+ "[attr.aria-invalid]": "ariaInvalid()",
42
+ "[attr.aria-required]": "ariaRequired()",
43
+ "[attr.aria-describedby]": "ariaDescribedBy()"
44
+ }
45
+ }]
46
+ }]
47
+ });
48
+ export { FieldAria as n, FIELD_ARIA as t };
49
+
50
+ //# sourceMappingURL=tinya-code-gas-admin-ui-field-aria-BD1Wiggc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-field-aria-BD1Wiggc.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/fields/field-aria.ts"],"sourcesContent":["import { Directive, InjectionToken, computed, inject, type Signal } from '@angular/core';\n\n/**\n * Contexto de accesibilidad que `app-field-host` expone a los controles.\n *\n * El host conoce la ayuda y el error (ambos viven en SU plantilla), pero el\n * `<input>` real vive dentro de un componente hijo distinto por cada tipo de\n * campo. En lugar de pasar dos inputs por cada uno de los 14 controles, el\n * host provee este contexto y cada control importa `FieldAria`, que lo lee\n * por DI y lo vuelca en el elemento.\n *\n * Selector por `[id]`: casa sólo con el elemento que ya recibe el `for` de la\n * etiqueta, así el mismo id es ancla de label y de `aria-describedby`. Los\n * controles fuera de un `app-field-host` inyectan `null` y no emiten nada.\n */\nexport interface FieldAriaContext {\n /** `id` del texto de ayuda y/o del error, separados por espacio. */\n readonly describedBy: Signal<string | null>;\n /** `true` cuando el campo muestra error visible (mismo criterio que el mensaje). */\n readonly invalid: Signal<boolean>;\n /**\n * Requerido por schema. Necesario porque la marca visual `*` desaparece en\n * los recursos donde mandan los `(opcional)` (§2): sin este atributo el\n * requerimiento quedaría sólo en pantalla.\n */\n readonly required: Signal<boolean>;\n}\n\nexport const FIELD_ARIA = new InjectionToken<FieldAriaContext>('FIELD_ARIA');\n\n/**\n * Vincula `aria-invalid` y `aria-describedby` a un control de formulario.\n *\n * `aria-invalid` se emite SIEMPRE (`\"true\"`/`\"false\"`, nunca ausente) para\n * que el atributo sea inspeccionable en cualquier estado; `aria-describedby`\n * se omite cuando no hay ni ayuda ni error, que es el caso por defecto.\n * `aria-required` sigue la misma regla que `aria-invalid`.\n *\n * Convención con `role=\"alert\"` en el mensaje de error: el `alert` anuncia el\n * error en el momento en que aparece (fallo de submit), mientras que\n * `aria-describedby` lo lee al enfocar el campo. Son momentos distintos; no\n * compiten.\n */\n@Directive({\n selector: 'input[id], select[id], textarea[id], output[id]',\n host: {\n '[attr.aria-invalid]': 'ariaInvalid()',\n '[attr.aria-required]': 'ariaRequired()',\n '[attr.aria-describedby]': 'ariaDescribedBy()',\n },\n})\nexport class FieldAria {\n private readonly ctx = inject(FIELD_ARIA, { optional: true });\n\n protected readonly ariaInvalid = computed(() => (this.ctx ? String(this.ctx.invalid()) : null));\n\n protected readonly ariaRequired = computed(() => (this.ctx ? String(this.ctx.required()) : null));\n\n protected readonly ariaDescribedBy = computed(() => this.ctx?.describedBy() ?? null);\n}\n"],"mappings":";;AA4BA,MAAa,aAAa,IAAI,eAAiC,YAAY;AAuB3E,IAAa,YAAb,MAAa,UAAS;CACH,MAAM,OAAO,YAAY,EAAE,UAAU,KAAI,CAAE;CAEzC,cAAc,eAAgB,KAAK,MAAM,OAAO,KAAK,IAAI,QAAO,CAAE,IAAI,MAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAE5E,eAAe,eAAgB,KAAK,MAAM,OAAO,KAAK,IAAI,SAAQ,CAAE,IAAI,MAAM,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAE9E,kBAAkB,eAAe,KAAK,KAAK,YAAW,KAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CAPzE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAS,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAS,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,YAAA;GAAA,qBAAA;GAAA,sBAAA;GAAA,yBAAA;EAAA,EAAA;EAAA,UAAA;CAAA,CAAA;;AAAT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EARrB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,uBAAuB;IACvB,wBAAwB;IACxB,2BAA2B;GAC5B;EACF,CAAA"}
@@ -0,0 +1,24 @@
1
+ function childTree(parent, key) {
2
+ const child = parent[key];
3
+ if (child === void 0) throw new Error(`El formulario no contiene el campo "${key}".`);
4
+ return child;
5
+ }
6
+ function groupTree(parent, key) {
7
+ return childTree(parent, key);
8
+ }
9
+ function listTree(parent, key) {
10
+ return childTree(parent, key);
11
+ }
12
+ function itemTree(items, index) {
13
+ const item = items[index];
14
+ if (item === void 0) throw new Error(`La lista no contiene el índice ${index}.`);
15
+ return item;
16
+ }
17
+ function stringItemTree(items, index) {
18
+ const item = items[index];
19
+ if (item === void 0) throw new Error(`La lista no contiene el índice ${index}.`);
20
+ return item;
21
+ }
22
+ export { stringItemTree as a, listTree as i, groupTree as n, itemTree as r, childTree as t };
23
+
24
+ //# sourceMappingURL=tinya-code-gas-admin-ui-field-node-CIK6KNN_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-field-node-CIK6KNN_.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/fields/field-node.ts"],"sourcesContent":["/**\n * Acceso dinámico a los subárboles de un formulario cuyo modelo es\n * `Record<string, unknown>` (decisión Fase 10: el tipado del modelo como\n * Record permite indexar con cualquier clave, pero el acceso se centraliza\n * aquí porque devuelve `undefined` en el tipo).\n *\n * Fase 11: los contenedores (`group`, `list`) se resuelven igual, más los\n * índices de las listas (`itemTree`).\n */\n\nimport type { FieldTree } from '@angular/forms/signals';\n\nimport type { FieldSchema } from '../core/models/schema.model';\n\n/** Árbol de un formulario con modelo dinámico. */\nexport type RootTree = FieldTree<Record<string, unknown>>;\n\n/**\n * Contexto que el `ng-template` del `list` recibe por `ngTemplateOutlet`\n * para renderizar los campos de un ítem. El template vive en el despachador\n * (`field-host`) porque es el único que puede instanciar `app-field-host`;\n * el list lo instancia una vez por ítem con este contexto.\n */\nexport interface ListChildContext {\n fields: readonly FieldSchema[];\n tree: RootTree;\n /** Prefijo de ruta de los errores del backend para este nivel (`faq[2].`). */\n prefix: string;\n errors: Record<string, string>;\n exists: boolean;\n /** `itemDisplay: 'row'` → los campos van en flujo compacto, no en grilla. */\n row: boolean;\n /** Clase `sm:col-span-*` de un campo (literal: Tailwind v4 es JIT). */\n colSpan: (width?: number) => string;\n}\n\n/** Subárbol del hijo directo bajo `key`. Lanza un error claro si el modelo no\n * contiene la clave (los modelos se siembran con los `default` del schema\n * antes de llamar a `form()`).\n */\nexport function childTree<T>(parent: RootTree, key: string): FieldTree<T> {\n const child = (parent as unknown as Record<string, FieldTree<T> | undefined>)[key];\n if (child === undefined) {\n throw new Error(`El formulario no contiene el campo \"${key}\".`);\n }\n return child;\n}\n\n/** Subárbol de un campo `list`/`group` cuyo valor es un objeto. */\nexport function groupTree(parent: RootTree, key: string): RootTree {\n return childTree<Record<string, unknown>>(parent, key);\n}\n\n/** Subárbol de un campo `list` (los ítems se acceden por índice). */\nexport function listTree<T>(parent: RootTree, key: string): FieldTree<T[]> {\n return childTree<T[]>(parent, key);\n}\n\n/**\n * Ítem de una lista como árbol navegable.\n *\n * **Los nodos de ítem se atan a la identidad del elemento**, no al índice:\n * tras un cambio del arreglo el nodo viejo queda huérfano y leerlo lanza\n * `NG01904 «Orphan field»`. Por eso este helper se llama SIEMPRE fresco, en\n * cada render/computed — nunca se cachea un nodo entre mutaciones.\n *\n * El `as unknown` es porque `FieldTree<Item, number>` no es assignable a\n * `RootTree` (le falta el index signature de `string`), pero se navega igual.\n */\nexport function itemTree<T>(items: FieldTree<T[]>, index: number): RootTree {\n const item = items[index];\n if (item === undefined) {\n throw new Error(`La lista no contiene el índice ${index}.`);\n }\n return item as unknown as RootTree;\n}\n\n/**\n * Ítem escalar de un `string-list` como nodo (`FieldTree<string>`), listo\n * para `[formField]`. Mismo criterio de frescura que `itemTree`.\n */\nexport function stringItemTree(items: FieldTree<string[]>, index: number): FieldTree<string> {\n const item = items[index] as FieldTree<string> | undefined;\n if (item === undefined) {\n throw new Error(`La lista no contiene el índice ${index}.`);\n }\n return item;\n}\n"],"mappings":"AAwCA,SAAgB,UAAa,QAAkB,KAAW;CACxD,MAAM,QAAS,OAA+D;CAC9E,IAAI,UAAU,QACZ,MAAM,IAAI,MAAM,uCAAuC,IAAG,GAAI;CAEhE,OAAO;AACT;AAGA,SAAgB,UAAU,QAAkB,KAAW;CACrD,OAAO,UAAmC,QAAQ,GAAG;AACvD;AAGA,SAAgB,SAAY,QAAkB,KAAW;CACvD,OAAO,UAAe,QAAQ,GAAG;AACnC;AAaA,SAAgB,SAAY,OAAuB,OAAa;CAC9D,MAAM,OAAO,MAAM;CACnB,IAAI,SAAS,QACX,MAAM,IAAI,MAAM,kCAAkC,MAAK,EAAG;CAE5D,OAAO;AACT;AAMA,SAAgB,eAAe,OAA4B,OAAa;CACtE,MAAM,OAAO,MAAM;CACnB,IAAI,SAAS,QACX,MAAM,IAAI,MAAM,kCAAkC,MAAK,EAAG;CAE5D,OAAO;AACT"}
@@ -0,0 +1,27 @@
1
+ function parsePath(path) {
2
+ const segments = [];
3
+ for (const part of path.split(".")) {
4
+ if (part === "") continue;
5
+ const match = /^([^[\]]*)((?:\[\d+\])+)$/.exec(part);
6
+ if (match) {
7
+ const key = match[1];
8
+ if (key !== "") segments.push(key);
9
+ for (const bracket of match[2].matchAll(/\[(\d+)\]/g)) segments.push(Number(bracket[1]));
10
+ } else segments.push(part);
11
+ }
12
+ return segments;
13
+ }
14
+ function getValue(source, path) {
15
+ let current = source;
16
+ for (const segment of parsePath(path)) {
17
+ if (current === null || current === void 0 || typeof current !== "object") return;
18
+ if (typeof segment === "number") {
19
+ if (!Array.isArray(current)) return;
20
+ current = current[segment];
21
+ } else current = current[segment];
22
+ }
23
+ return current;
24
+ }
25
+ export { getValue as t };
26
+
27
+ //# sourceMappingURL=tinya-code-gas-admin-ui-field-path-B4-FTBGZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tinya-code-gas-admin-ui-field-path-B4-FTBGZ.mjs","names":[],"sources":["../../../projects/gas-admin-ui/src/lib/shared/utils/field-path.ts"],"sourcesContent":["/**\n * Lectura de valores por ruta (ej. `faq[2].answer`, `address.city`) —\n * celdas del listado y valores anidados de los singleton (base.md §10).\n */\n\n/** Segmentos de una ruta: claves de objeto y índices de arreglo. */\nexport type PathSegment = string | number;\n\n/** `faq[2].answer` → `['faq', 2, 'answer']`. */\nexport function parsePath(path: string): PathSegment[] {\n const segments: PathSegment[] = [];\n for (const part of path.split('.')) {\n if (part === '') {\n continue;\n }\n const match = /^([^[\\]]*)((?:\\[\\d+\\])+)$/.exec(part);\n if (match) {\n const key = match[1];\n if (key !== '') {\n segments.push(key);\n }\n for (const bracket of match[2].matchAll(/\\[(\\d+)\\]/g)) {\n segments.push(Number(bracket[1]));\n }\n } else {\n segments.push(part);\n }\n }\n return segments;\n}\n\n/** Lee el valor en `path`; `undefined` si algún tramo no existe. */\nexport function getValue<T = unknown>(source: unknown, path: string): T | undefined {\n let current: unknown = source;\n for (const segment of parsePath(path)) {\n if (current === null || current === undefined || typeof current !== 'object') {\n return undefined;\n }\n if (typeof segment === 'number') {\n if (!Array.isArray(current)) {\n return undefined;\n }\n current = current[segment];\n } else {\n current = (current as Record<string, unknown>)[segment];\n }\n }\n return current as T;\n}\n"],"mappings":"AASA,SAAgB,UAAU,MAAY;CACpC,MAAM,WAA0B,CAAA;CAChC,KAAK,MAAM,QAAQ,KAAK,MAAM,GAAG,GAAG;EAClC,IAAI,SAAS,IACX;EAEF,MAAM,QAAQ,4BAA4B,KAAK,IAAI;EACnD,IAAI,OAAO;GACT,MAAM,MAAM,MAAM;GAClB,IAAI,QAAQ,IACV,SAAS,KAAK,GAAG;GAEnB,KAAK,MAAM,WAAW,MAAM,EAAE,CAAC,SAAS,YAAY,GAClD,SAAS,KAAK,OAAO,QAAQ,EAAE,CAAC;EAEpC,OACE,SAAS,KAAK,IAAI;CAEtB;CACA,OAAO;AACT;AAGA,SAAgB,SAAsB,QAAiB,MAAY;CACjE,IAAI,UAAmB;CACvB,KAAK,MAAM,WAAW,UAAU,IAAI,GAAG;EACrC,IAAI,YAAY,QAAQ,YAAY,UAAa,OAAO,YAAY,UAClE;EAEF,IAAI,OAAO,YAAY,UAAU;GAC/B,IAAI,CAAC,MAAM,QAAQ,OAAO,GACxB;GAEF,UAAU,QAAQ;EACpB,OACE,UAAW,QAAoC;CAEnD;CACA,OAAO;AACT"}