@xsmusices/ui 2.0.0-rc.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -121,7 +121,7 @@ interface XSItemData {
121
121
 
122
122
  declare class XSItemActionComponent {
123
123
  item: _angular_core.InputSignal<XSItemData>;
124
- size: _angular_core.InputSignal<"small" | "normal" | "profile">;
124
+ size: _angular_core.InputSignal<"profile" | "small" | "normal">;
125
125
  isLink: _angular_core.InputSignal<boolean>;
126
126
  showBorder: _angular_core.InputSignal<boolean>;
127
127
  rounded: _angular_core.InputSignal<boolean>;
@@ -1635,7 +1635,7 @@ declare class XSChatConversationInfoComponent {
1635
1635
  }>;
1636
1636
  readonly otherUserId: _angular_core.Signal<string>;
1637
1637
  readonly displayName: _angular_core.Signal<string>;
1638
- readonly displayUser: _angular_core.Signal<XSChatUser | XSChatItem | null>;
1638
+ readonly displayUser: _angular_core.Signal<XSChatItem | XSChatUser | null>;
1639
1639
  readonly displayUserType: _angular_core.Signal<string>;
1640
1640
  readonly displayCountry: _angular_core.Signal<string>;
1641
1641
  readonly displayUserRole: _angular_core.Signal<string>;
@@ -1758,7 +1758,7 @@ declare class XSButtonGroupService {
1758
1758
  declare class XSIconComponent {
1759
1759
  private library;
1760
1760
  icon: _angular_core.InputSignal<string | string[] | [IconPrefix, IconName] | _fortawesome_fontawesome_common_types.IconLookup>;
1761
- size: _angular_core.InputSignal<"sm" | "normal" | "xs" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl">;
1761
+ size: _angular_core.InputSignal<"normal" | "sm" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl">;
1762
1762
  class: _angular_core.InputSignal<string>;
1763
1763
  resolvedIcon: _angular_core.Signal<IconProp | IconDefinition>;
1764
1764
  isValidIcon: _angular_core.Signal<boolean>;
@@ -2019,9 +2019,9 @@ declare class XSImageComponent {
2019
2019
  alt: _angular_core.InputSignal<string | undefined>;
2020
2020
  width: _angular_core.InputSignal<string | number | undefined>;
2021
2021
  height: _angular_core.InputSignal<string | number | undefined>;
2022
- size: _angular_core.InputSignal<"md" | "sm" | "xs" | "lg" | "xl" | "2xl" | "full" | undefined>;
2023
- rounded: _angular_core.InputSignal<"md" | "sm" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | undefined>;
2024
- objectFit: _angular_core.InputSignal<"cover" | "fill" | "none" | "contain" | "scale-down" | undefined>;
2022
+ size: _angular_core.InputSignal<"md" | "sm" | "lg" | "xs" | "xl" | "2xl" | "full" | undefined>;
2023
+ rounded: _angular_core.InputSignal<"md" | "sm" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | undefined>;
2024
+ objectFit: _angular_core.InputSignal<"fill" | "none" | "cover" | "contain" | "scale-down" | undefined>;
2025
2025
  clickable: _angular_core.InputSignal<boolean | undefined>;
2026
2026
  item: _angular_core.InputSignal<XSImageItem | null | undefined>;
2027
2027
  typeItem: _angular_core.InputSignal<string | undefined>;
@@ -2071,7 +2071,7 @@ declare class XSStatsCardComponent {
2071
2071
  likes?: number;
2072
2072
  comments?: number;
2073
2073
  } | undefined>;
2074
- type: _angular_core.InputSignal<"comments" | "likes" | "visits">;
2074
+ type: _angular_core.InputSignal<"visits" | "comments" | "likes">;
2075
2075
  stats: _angular_core.InputSignal<{
2076
2076
  currentValue: number;
2077
2077
  differencePercent: string;
@@ -3010,15 +3010,15 @@ interface StoryMeta<T = unknown> {
3010
3010
 
3011
3011
  declare class XSListComponent {
3012
3012
  data: _angular_core.InputSignal<XSListConfigI[]>;
3013
- variant: _angular_core.InputSignal<"action" | "type">;
3013
+ variant: _angular_core.InputSignal<"type" | "action">;
3014
3014
  type: _angular_core.InputSignal<XSGenericItemType | undefined>;
3015
3015
  label: _angular_core.InputSignal<string | undefined>;
3016
3016
  loadingAll: _angular_core.InputSignal<boolean>;
3017
3017
  initialLoading: _angular_core.InputSignal<boolean>;
3018
- columns: _angular_core.InputSignal<1 | 2 | 3>;
3018
+ columns: _angular_core.InputSignal<1 | 3 | 2>;
3019
3019
  isLink: _angular_core.InputSignal<boolean>;
3020
- size: _angular_core.InputSignal<"small" | "normal" | "profile">;
3021
- hasScroll: _angular_core.InputSignal<boolean | "lg" | "xl" | "mobile">;
3020
+ size: _angular_core.InputSignal<"profile" | "small" | "normal">;
3021
+ hasScroll: _angular_core.InputSignal<boolean | "mobile" | "lg" | "xl">;
3022
3022
  class: _angular_core.InputSignal<string | undefined>;
3023
3023
  rounded: _angular_core.InputSignal<boolean>;
3024
3024
  showChevron: _angular_core.InputSignal<boolean>;
@@ -4241,6 +4241,9 @@ declare class XSFormlyUploadImageComponent extends XSFormlyBaseComponent impleme
4241
4241
  fileInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
4242
4242
  previewUrl?: string;
4243
4243
  isDragging: boolean;
4244
+ mode: 'file' | 'url';
4245
+ urlInput: string;
4246
+ urlError: string;
4244
4247
  private readonly valueChangesSub;
4245
4248
  private translateService;
4246
4249
  private readonly changeDetectorRef;
@@ -4249,6 +4252,11 @@ declare class XSFormlyUploadImageComponent extends XSFormlyBaseComponent impleme
4249
4252
  get hintText(): string;
4250
4253
  get changeButtonLabel(): string;
4251
4254
  get removeButtonLabel(): string;
4255
+ get modeFileLabel(): string;
4256
+ get modeUrlLabel(): string;
4257
+ get urlPlaceholder(): string;
4258
+ get urlApplyLabel(): string;
4259
+ get urlInvalidMessage(): string;
4252
4260
  get isFieldDisabled(): boolean;
4253
4261
  ngOnInit(): void;
4254
4262
  private syncPreview;
@@ -4257,6 +4265,11 @@ declare class XSFormlyUploadImageComponent extends XSFormlyBaseComponent impleme
4257
4265
  onDragOver(event: DragEvent): void;
4258
4266
  openFilePicker(): void;
4259
4267
  private processFile;
4268
+ private isHttpUrl;
4269
+ private syncMode;
4270
+ setMode(mode: 'file' | 'url'): void;
4271
+ onUrlInput(event: Event): void;
4272
+ applyUrl(): void;
4260
4273
  clearFile(event: MouseEvent): void;
4261
4274
  private revokeOldUrl;
4262
4275
  ngOnDestroy(): void;
@@ -4738,7 +4751,7 @@ declare abstract class XSItemTypeBaseComponent {
4738
4751
  item: _angular_core.InputSignal<XSItemData>;
4739
4752
  isLink: _angular_core.InputSignal<boolean>;
4740
4753
  showChevron: _angular_core.InputSignal<boolean>;
4741
- size: _angular_core.InputSignal<"small" | "normal" | "profile">;
4754
+ size: _angular_core.InputSignal<"profile" | "small" | "normal">;
4742
4755
  rounded: _angular_core.InputSignal<boolean>;
4743
4756
  loading: _angular_core.InputSignal<boolean>;
4744
4757
  readonly onClick: _angular_core.OutputEmitterRef<XSItemData>;
@@ -4763,7 +4776,7 @@ declare class XSItemTypeComponent {
4763
4776
  itemType: _angular_core.InputSignal<XSGenericItemType>;
4764
4777
  isLink: _angular_core.InputSignal<boolean>;
4765
4778
  showChevron: _angular_core.InputSignal<boolean>;
4766
- size: _angular_core.InputSignal<"small" | "normal" | "profile">;
4779
+ size: _angular_core.InputSignal<"profile" | "small" | "normal">;
4767
4780
  rounded: _angular_core.InputSignal<boolean>;
4768
4781
  loading: _angular_core.InputSignal<boolean>;
4769
4782
  readonly onClick: _angular_core.OutputEmitterRef<XSItemData>;
@@ -5426,7 +5439,7 @@ declare class XSTableItemsVisitsComponent {
5426
5439
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<XSTableItemsVisitsComponent, "xs-table-items-visits", never, { "header": { "alias": "header"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5427
5440
  }
5428
5441
 
5429
- declare const STANDALONE_PIPES: (typeof CountryFlagPipe | typeof CountryNamePipe | typeof DateLongPipe | typeof XSDateFormatPipe | typeof ImageApiPipe | typeof SliceArrayPipe | typeof TruncateTextPipe | typeof NumberToMonthPipe | typeof NumberDaysPipe | typeof VisitsMonthTotalPipe | typeof RandomImagePipe | typeof TimeAgoPipe | typeof TableLinkPipe | typeof TitleMediaPipe | typeof SocialPipe | typeof IncludeEventPipe | typeof FilterArrayPipe | typeof XSFindLabelByValuePipe)[];
5442
+ declare const STANDALONE_PIPES: (typeof CountryFlagPipe | typeof ImageApiPipe | typeof VisitsMonthTotalPipe | typeof CountryNamePipe | typeof DateLongPipe | typeof XSDateFormatPipe | typeof SliceArrayPipe | typeof TruncateTextPipe | typeof NumberToMonthPipe | typeof NumberDaysPipe | typeof RandomImagePipe | typeof TimeAgoPipe | typeof TableLinkPipe | typeof TitleMediaPipe | typeof SocialPipe | typeof IncludeEventPipe | typeof FilterArrayPipe | typeof XSFindLabelByValuePipe)[];
5430
5443
 
5431
5444
  declare const LIB_STORIES: Array<() => Promise<any>>;
5432
5445
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsmusices/ui",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -19,8 +19,7 @@
19
19
  "files": [
20
20
  "fesm2022",
21
21
  "index.d.ts",
22
- "styles",
23
- "MIGRATION.md"
22
+ "styles"
24
23
  ],
25
24
  "peerDependencies": {
26
25
  "@angular/common": "^20.0.0",
@@ -45,4 +44,4 @@
45
44
  "sideEffects": false,
46
45
  "module": "fesm2022/xsmusices-ui.mjs",
47
46
  "typings": "index.d.ts"
48
- }
47
+ }
package/MIGRATION.md DELETED
@@ -1,167 +0,0 @@
1
- # Migración 1.44.x → 2.0.0
2
-
3
- Guía de actualización para consumidores de `@xsmusices/ui` desde la línea
4
- `1.44.x` a la major `2.0.0`.
5
-
6
- > Alcance exacto: esta guía cubre los cambios que contiene `2.0.0-rc.1`
7
- > (incluye la retirada de `xs-send-scraper`; ver sección propia). Si vienes
8
- > de una `rc.0`, el único cambio adicional respecto a ella es esa retirada.
9
-
10
- ## Por qué una major
11
-
12
- La versión 2.0.0 elimina componentes y símbolos que no tenían consumidores
13
- productivos conocidos (verificados en App, Admin y Demo) o que habían sido
14
- sustituidos por alternativas mejores dentro de la propia librería. Todo lo
15
- retirado es **breaking**: si tu proyecto importa alguno de estos símbolos,
16
- debes migrar antes de subir a `^2.0.0`.
17
-
18
- Diferencias generales respecto a `1.44.x`:
19
-
20
- - Menos componentes, misma funcionalidad cubierta por la familia `xs-item-*`,
21
- `xs-select`, `xs-modal` y estados vacíos.
22
- - Los barrels raíz (`@xsmusices/ui`) ya no re-exportan símbolos internos de
23
- stories; la vía oficial de catálogo es `LIB_STORIES`.
24
- - `xs-map` exige identificador explícito (`mapId` requerido).
25
-
26
- ## Componentes retirados
27
-
28
- | Selector | Símbolo(s) | Qué cubría | Alternativa | Qué hacer |
29
- |---|---|---|---|---|
30
- | `xs-select-modal` | `XSSelectModalComponent`, `XSSelectModalOption`, `XSSelectModalConfig` | Selección en modal | `XSSelectComponent` + `XSModalService` (ambos vigentes) | Sustituir por `xs-select` dentro de un modal abierto con el servicio de modales |
31
- | `xs-date-range-picker` | `XSDateRangePickerComponent`, `XSDateRange`, `XSDateRangePreset`, `XSDateRangePickerModalData`, `XSDateDayInfo` | Rango de fechas en modal | Sin equivalente directo en la librería | Usar `<input type="date">` nativo o campo Formly, o mantener una copia local del componente retirado |
32
- | `xs-item-card` | `XSItemCardComponent`, `ItemCardTextsI` | Tarjeta de item | Familia `xs-item-*` vigente (`XSItemTypeComponent` + tipos, `item-compact`, `item-action`) | Migrar a `xs-item-type` con el tipo correspondiente |
33
- | `xs-items-slider` | `XSItemsSliderComponent`, `XSItemsSliderTitleButtonsComponent`, `XSItemsSliderConfig`, `XSItemsSliderTexts` | Carrusel de items con botones de título | Sin equivalente directo en la librería | Componer con `xs-list`/`xs-scroll-area` o mantener copia local |
34
- | `xs-profile-current-event` | `XSProfileCurrentEventComponent`, `XSProfileCurrentEventTexts` | Evento actual del perfil | `XSProfileTopsComponent` / `XSProfileInfoComponent` | Migrar al bloque de perfil vigente más cercano |
35
- | `xs-profile-exclusive` | `XSProfileExclusiveComponent` | Marca de contenido exclusivo | `XSBadgeComponent` / `XSIconComponent` | Sustituir por badge o icono |
36
- | `xs-profile-image` | `XSProfileImageComponent` | Imagen de perfil | `XSImageComponent` (`xs-image`, vigente) | Sustituir por `xs-image` |
37
- | `xs-profile-random-flag` | `XSProfileRandomFlagComponent` | Bandera aleatoria del perfil | `CountryFlagPipe` (vigente) | Sustituir por el pipe de bandera |
38
- | `xs-profile-skeleton` | `XSProfileSkeletonComponent` | Esqueleto de carga del perfil | `XSEmptyStateComponent` o skeleton propio | Sustituir por estado vacío o mantener copia local |
39
- | `xs-profile-verified` | `XSProfileVerifiedComponent` | Marca de verificado | `XSBadgeComponent` / `XSIconComponent` | Sustituir por badge o icono |
40
- | `xs-skeleton-for-slider` | `XSSkeletonForSliderComponent` | Esqueleto de carga para sliders | Sin equivalente directo en la librería | Mantener copia local si se necesita |
41
-
42
- Siguen vigentes los bloques de perfil usados por App: `XSProfileInfoComponent`,
43
- `XSProfileCommentsComponent` y `XSProfileTopsComponent`.
44
-
45
- ## Types e interfaces retirados
46
-
47
- Se eliminan junto a sus componentes (ver tabla anterior):
48
-
49
- - `XSSelectModalOption`, `XSSelectModalConfig`
50
- - `XSDateRange`, `XSDateRangePreset`, `XSDateRangePickerModalData`, `XSDateDayInfo`
51
- - `ItemCardTextsI`
52
- - `XSItemsSliderConfig`, `XSItemsSliderTexts`
53
- - `XSProfileCurrentEventTexts`
54
-
55
- No hay renombrados: los símbolos simplemente dejan de existir. Si tu código los
56
- importa, TypeScript fallará en `tsc`/`ngc` señalando cada uso.
57
-
58
- ## Otros cambios incompatibles
59
-
60
- ### Fin de `export { story }` desde el barrel raíz
61
-
62
- Antes la raíz re-exportaba la story del spinner:
63
-
64
- ```ts
65
- // 1.44.x — ya no existe en 2.0.0
66
- import { story } from '@xsmusices/ui';
67
- ```
68
-
69
- La vía oficial para el catálogo es `LIB_STORIES` (sigue vigente):
70
-
71
- ```ts
72
- // 2.0.0
73
- import { LIB_STORIES } from '@xsmusices/ui';
74
- ```
75
-
76
- ### Eliminación de `getSecondLineContent()`
77
-
78
- El método público `getSecondLineContent()` de
79
- `XSItemTypeLastVisitComponent` (devolvía `item()['location']`) se ha eliminado
80
- porque el template interno ya no lo usa. Si lo llamabas desde fuera, lee el
81
- campo directamente:
82
-
83
- ```ts
84
- // 1.44.x
85
- const line = component.getSecondLineContent();
86
-
87
- // 2.0.0
88
- const line = String(item['location'] ?? 'Ubicación desconocida');
89
- ```
90
-
91
- ### `mapId` requerido en `xs-map` (y `xs-maplibre`)
92
-
93
- Antes el identificador se autogeneraba:
94
-
95
- ```ts
96
- // 1.44.x (interno de la librería)
97
- private static mapIdCounter = 0;
98
- mapId = input(XSMapComponent.generateUniqueId()); // map-<timestamp>-<n>
99
- ```
100
-
101
- Ahora es un input requerido sin valor por defecto:
102
-
103
- ```ts
104
- // 2.0.0 (interno de la librería)
105
- mapId = input<string>();
106
- ```
107
-
108
- En tus plantillas debes pasarlo siempre explícito (y único por página si hay
109
- varios mapas):
110
-
111
- ```html
112
- <!-- 1.44.x: funcionaba sin mapId -->
113
- <xs-map [center]="center" [items]="items" />
114
-
115
- <!-- 2.0.0: mapId obligatorio -->
116
- <xs-map mapId="contact-map" [center]="center" [items]="items" />
117
- ```
118
-
119
- Sin `mapId`, Angular (AOT/`ngc`) falla por input requerido.
120
-
121
- ### Nuevo input opcional `tileUrl` en `xs-map` (no breaking, desde 2.0.0-rc.0)
122
-
123
- Añadido para entornos cuyo proveedor de tiles exige clave (el proveedor por
124
- defecto, CARTO dark, empezó a exigir API key):
125
-
126
- ```html
127
- <xs-map mapId="demo-map" tileUrl="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
128
- ```
129
-
130
- Sin `tileUrl` el comportamiento es el mismo que en `1.44.x`.
131
-
132
- ## Checklist de migración `1.44.x` → `2.0.0`
133
-
134
- 1. Sube la dependencia a `2.0.0` (o `2.0.0-rc.0` con dist-tag `next` para probar).
135
- 2. Ejecuta `npx tsc --noEmit`: cada import de un símbolo retirado falla aquí.
136
- 3. Sustituye componentes según la tabla (select-modal, item-card, profile-*).
137
- 4. Para date-range-picker, items-slider y skeletons: decide entre alternativa
138
- nativa o copia local (no hay equivalente en la librería).
139
- 5. Reemplaza `import { story }` por `import { LIB_STORIES }`.
140
- 6. Elimina llamadas a `getSecondLineContent()` (lee `item()['location']`).
141
- 7. Añade `mapId` explícito a cada `<xs-map>` y `<xs-maplibre>`.
142
- 8. Ejecuta `ng build` (AOT) y los tests del consumidor.
143
- 9. Revisa visualmente mapas, listas y perfiles.
144
-
145
- ## Componente retirado en rc.1: `xs-send-scraper`
146
-
147
- | Selector | Símbolo(s) | Qué ofrecía |
148
- |---|---|---|
149
- | `xs-send-scraper` | `XSSendScraperComponent`, `SendScraperMode`, `SendScraperSource`, `SendScraperLabels`, `SendScraperResult`, `SendScraperTrackResult`, `SendScraperProfileResult` | Flujo de envío con stepper (fuente → URL → preview/duplicados → formulario proyectado) para artistas, organizaciones y media vía scraping de SoundCloud/YouTube |
150
-
151
- **Alternativa para consumidores que lo utilizaban:** la funcionalidad vive ahora
152
- en App (`app-send-scraper`, implementación propia desacoplada de la librería,
153
- documentada en XS-918). Opciones:
154
-
155
- - **App:** nada que hacer; usa su `SendScraperComponent` propio desde XS-917.
156
- - **Consumidores externos:** si dependías de `xs-send-scraper`, fija
157
- `@xsmusices/ui@1.44.x` o copia el componente a tu proyecto (sus únicas
158
- dependencias compartidas eran stepper, icon, button, formly, pipes,
159
- `XSTranslateService` y `XS_API_URL`, todas sustituibles).
160
-
161
- No quedan otros consumidores productivos conocidos (Admin sin referencias;
162
- Demo solo lo listaba en el catálogo de stories).
163
-
164
- ## Cambios futuros
165
-
166
- No hay más retiradas planificadas para la `2.0.0` estable. La API de `rc.1`
167
- es la propuesta para `latest`.