@xsmusices/ui 1.43.1 → 1.44.2

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" | "profile" | "normal">;
124
+ size: _angular_core.InputSignal<"small" | "normal" | "profile">;
125
125
  isLink: _angular_core.InputSignal<boolean>;
126
126
  showBorder: _angular_core.InputSignal<boolean>;
127
127
  rounded: _angular_core.InputSignal<boolean>;
@@ -244,7 +244,7 @@ declare class XSItemCardComponent {
244
244
  get typeForImage(): XSGenericItemType;
245
245
  get isVerified(): boolean | "";
246
246
  get isLiked(): boolean | undefined;
247
- get truncateForEvent(): 16 | 19 | 30 | 18 | 21 | 28 | 31 | 33;
247
+ get truncateForEvent(): 16 | 30 | 18 | 19 | 21 | 28 | 31 | 33;
248
248
  private getNavigationPath;
249
249
  onClickItem(event?: Event): void;
250
250
  onClickEditItem(): void;
@@ -334,7 +334,7 @@ declare class XSItemsSliderTitleButtonsComponent {
334
334
  manage: _angular_core.InputSignal<boolean>;
335
335
  state: _angular_core.InputSignal<boolean>;
336
336
  total: _angular_core.InputSignal<number>;
337
- view: _angular_core.InputSignal<"list" | "cards">;
337
+ view: _angular_core.InputSignal<"cards" | "list">;
338
338
  hasViewButtons: _angular_core.InputSignal<boolean>;
339
339
  hasSoundcloudItems: _angular_core.InputSignal<boolean>;
340
340
  tabs: _angular_core.InputSignal<{
@@ -347,7 +347,7 @@ declare class XSItemsSliderTitleButtonsComponent {
347
347
  }>;
348
348
  texts: _angular_core.InputSignal<XSItemsSliderTexts>;
349
349
  isPlayingAll: _angular_core.InputSignal<boolean>;
350
- onClickChangeView: _angular_core.OutputEmitterRef<"list" | "cards">;
350
+ onClickChangeView: _angular_core.OutputEmitterRef<"cards" | "list">;
351
351
  onClickPlayAll: _angular_core.OutputEmitterRef<void>;
352
352
  onClickSort: _angular_core.OutputEmitterRef<void>;
353
353
  onChangeState: _angular_core.OutputEmitterRef<void>;
@@ -393,7 +393,7 @@ declare class XSItemsSliderComponent implements AfterViewInit, OnDestroy, OnInit
393
393
  items: _angular_core.InputSignal<XSItemData[]>;
394
394
  typeFrom: _angular_core.InputSignal<XSItemData | undefined>;
395
395
  total: _angular_core.InputSignal<number>;
396
- view: _angular_core.ModelSignal<"list" | "cards">;
396
+ view: _angular_core.ModelSignal<"cards" | "list">;
397
397
  hasViewButtons: _angular_core.InputSignal<boolean>;
398
398
  loading: _angular_core.InputSignal<{
399
399
  items: boolean;
@@ -514,7 +514,7 @@ declare class XSButtonComponent {
514
514
  ariaLabel: _angular_core.InputSignal<string | undefined>;
515
515
  borderRadius: _angular_core.InputSignal<string | undefined>;
516
516
  isGrouped: _angular_core.ModelSignal<boolean>;
517
- groupPosition: _angular_core.ModelSignal<"middle" | "first" | "last" | undefined>;
517
+ groupPosition: _angular_core.ModelSignal<"first" | "middle" | "last" | undefined>;
518
518
  click: _angular_core.OutputEmitterRef<MouseEvent>;
519
519
  onClick: _angular_core.OutputEmitterRef<MouseEvent>;
520
520
  protected _normalizedIcon: _angular_core.Signal<XSButtonIcon | null>;
@@ -2041,7 +2041,7 @@ declare class XSButtonGroupService {
2041
2041
  declare class XSIconComponent {
2042
2042
  private library;
2043
2043
  icon: _angular_core.InputSignal<string | string[] | [IconPrefix, IconName] | _fortawesome_fontawesome_common_types.IconLookup>;
2044
- size: _angular_core.InputSignal<"sm" | "lg" | "normal" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl">;
2044
+ size: _angular_core.InputSignal<"sm" | "normal" | "xs" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl">;
2045
2045
  class: _angular_core.InputSignal<string>;
2046
2046
  resolvedIcon: _angular_core.Signal<IconProp | IconDefinition>;
2047
2047
  isValidIcon: _angular_core.Signal<boolean>;
@@ -2302,9 +2302,9 @@ declare class XSImageComponent {
2302
2302
  alt: _angular_core.InputSignal<string | undefined>;
2303
2303
  width: _angular_core.InputSignal<string | number | undefined>;
2304
2304
  height: _angular_core.InputSignal<string | number | undefined>;
2305
- size: _angular_core.InputSignal<"sm" | "md" | "lg" | "xs" | "xl" | "2xl" | "full" | undefined>;
2306
- rounded: _angular_core.InputSignal<"sm" | "none" | "md" | "lg" | "xl" | "2xl" | "full" | "3xl" | undefined>;
2307
- objectFit: _angular_core.InputSignal<"fill" | "none" | "contain" | "cover" | "scale-down" | undefined>;
2305
+ size: _angular_core.InputSignal<"md" | "sm" | "xs" | "lg" | "xl" | "2xl" | "full" | undefined>;
2306
+ rounded: _angular_core.InputSignal<"md" | "sm" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | undefined>;
2307
+ objectFit: _angular_core.InputSignal<"cover" | "fill" | "none" | "contain" | "scale-down" | undefined>;
2308
2308
  clickable: _angular_core.InputSignal<boolean | undefined>;
2309
2309
  item: _angular_core.InputSignal<XSImageItem | null | undefined>;
2310
2310
  typeItem: _angular_core.InputSignal<string | undefined>;
@@ -2354,7 +2354,7 @@ declare class XSStatsCardComponent {
2354
2354
  likes?: number;
2355
2355
  comments?: number;
2356
2356
  } | undefined>;
2357
- type: _angular_core.InputSignal<"visits" | "comments" | "likes">;
2357
+ type: _angular_core.InputSignal<"comments" | "likes" | "visits">;
2358
2358
  stats: _angular_core.InputSignal<{
2359
2359
  currentValue: number;
2360
2360
  differencePercent: string;
@@ -3201,8 +3201,8 @@ declare class XSListComponent {
3201
3201
  initialLoading: _angular_core.InputSignal<boolean>;
3202
3202
  columns: _angular_core.InputSignal<1 | 2 | 3>;
3203
3203
  isLink: _angular_core.InputSignal<boolean>;
3204
- size: _angular_core.InputSignal<"small" | "profile" | "normal">;
3205
- hasScroll: _angular_core.InputSignal<boolean | "mobile" | "lg" | "xl">;
3204
+ size: _angular_core.InputSignal<"small" | "normal" | "profile">;
3205
+ hasScroll: _angular_core.InputSignal<boolean | "lg" | "xl" | "mobile">;
3206
3206
  class: _angular_core.InputSignal<string | undefined>;
3207
3207
  rounded: _angular_core.InputSignal<boolean>;
3208
3208
  showChevron: _angular_core.InputSignal<boolean>;
@@ -3266,7 +3266,7 @@ type XSFormlyOptions = FormlyFormOptions;
3266
3266
  declare class XSFormlyComponent implements AfterViewInit {
3267
3267
  private translateService;
3268
3268
  form: FormGroup<{}>;
3269
- readonly layout: _angular_core.InputSignal<"stack" | "grid">;
3269
+ readonly layout: _angular_core.InputSignal<"grid" | "stack">;
3270
3270
  readonly gridClass: _angular_core.InputSignal<string>;
3271
3271
  readonly size: _angular_core.InputSignal<"normal" | "compact">;
3272
3272
  readonly fields: _angular_core.InputSignal<XSFormlyFields>;
@@ -3562,7 +3562,7 @@ declare class XSBodyOverflowService {
3562
3562
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<XSBodyOverflowService>;
3563
3563
  }
3564
3564
 
3565
- type XSModalType = 'bottom-sheet' | 'centered';
3565
+ type XSModalType = 'bottom-sheet' | 'centered' | 'side-panel';
3566
3566
  interface XSModalInjectedComponent<T = unknown> {
3567
3567
  modalData?: T;
3568
3568
  modalResult?: {
@@ -3580,6 +3580,12 @@ interface XSModalOptions {
3580
3580
  title?: string;
3581
3581
  subTitle?: string;
3582
3582
  buttons?: XSButtonI[];
3583
+ /**
3584
+ * Reservado: actualmente sin efecto en el layout (el contenido
3585
+ * ya desplaza de forma independiente y el footer es persistente
3586
+ * por construcción flex). Se conserva por compatibilidad para
3587
+ * un futuro control de overflow del contenido.
3588
+ */
3583
3589
  hasOverflow?: boolean;
3584
3590
  closeOnBackdropClick?: boolean;
3585
3591
  }
@@ -4673,7 +4679,7 @@ declare class XSProfileExclusiveComponent {
4673
4679
  exclusive?: boolean;
4674
4680
  }>;
4675
4681
  readonly type: _angular_core.InputSignal<"artist" | "media">;
4676
- readonly subType: _angular_core.InputSignal<"podcast" | "radioshow" | "set" | "track" | undefined>;
4682
+ readonly subType: _angular_core.InputSignal<"set" | "track" | "podcast" | "radioshow" | undefined>;
4677
4683
  readonly message: _angular_core.InputSignal<string>;
4678
4684
  readonly link: _angular_core.InputSignal<boolean>;
4679
4685
  urlLogo: string;
@@ -4764,7 +4770,7 @@ interface ProfileImageItem {
4764
4770
  declare class XSProfileImageComponent implements OnInit {
4765
4771
  readonly item: _angular_core.InputSignal<ProfileImageItem>;
4766
4772
  readonly type: _angular_core.InputSignal<"artist" | "event" | "equipment" | "media" | "organization" | "site">;
4767
- readonly subType: _angular_core.InputSignal<"club" | "collective" | "festival" | "label" | "medio" | "podcast" | "promoter" | "radio" | "radioshow" | "set" | "track" | undefined>;
4773
+ readonly subType: _angular_core.InputSignal<"club" | "festival" | "set" | "track" | "podcast" | "radioshow" | "promoter" | "label" | "collective" | "radio" | "medio" | undefined>;
4768
4774
  readonly totalDays: _angular_core.InputSignal<number | undefined>;
4769
4775
  readonly heightImage: _angular_core.InputSignal<number>;
4770
4776
  readonly viewTransitionName: _angular_core.InputSignal<string | undefined>;
@@ -4995,7 +5001,7 @@ declare class XSSendScraperComponent implements OnInit {
4995
5001
  protected stepLabels: _angular_core.Signal<string[]>;
4996
5002
  protected showSourceSelection: _angular_core.Signal<boolean>;
4997
5003
  protected canSearch: _angular_core.Signal<boolean>;
4998
- protected primaryVariant: _angular_core.Signal<"soundcloud" | "youtube">;
5004
+ protected primaryVariant: _angular_core.Signal<"youtube" | "soundcloud">;
4999
5005
  protected activeFormFields: _angular_core.Signal<FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
5000
5006
  [additionalProperties: string]: any;
5001
5007
  }>[]>;
@@ -5473,7 +5479,7 @@ declare class XSTableItemsComponent<TType extends string = XSTableHeaderType, TI
5473
5479
  getRemainingPercentage(item: TItem): number;
5474
5480
  getUrlStatsPage: (item: TItem) => string;
5475
5481
  getNameOrCategoryEvent(event: string, type: 'name' | 'category' | 'value'): string | null;
5476
- getSubStatePromotion(item: TItem): "finished" | "inProgress" | "schedule";
5482
+ getSubStatePromotion(item: TItem): "schedule" | "finished" | "inProgress";
5477
5483
  getColorForType(type: string): string;
5478
5484
  getColorForStyle(style: TItem): string;
5479
5485
  getLevelName: (item: TItem) => string | undefined;
@@ -5595,7 +5601,7 @@ declare class XSItemTypeComponent {
5595
5601
  itemType: _angular_core.InputSignal<XSGenericItemType>;
5596
5602
  isLink: _angular_core.InputSignal<boolean>;
5597
5603
  showChevron: _angular_core.InputSignal<boolean>;
5598
- size: _angular_core.InputSignal<"small" | "profile" | "normal">;
5604
+ size: _angular_core.InputSignal<"small" | "normal" | "profile">;
5599
5605
  rounded: _angular_core.InputSignal<boolean>;
5600
5606
  loading: _angular_core.InputSignal<boolean>;
5601
5607
  readonly onClick: _angular_core.OutputEmitterRef<XSItemData>;
@@ -5607,7 +5613,7 @@ declare abstract class XSItemTypeBaseComponent {
5607
5613
  item: _angular_core.InputSignal<XSItemData>;
5608
5614
  isLink: _angular_core.InputSignal<boolean>;
5609
5615
  showChevron: _angular_core.InputSignal<boolean>;
5610
- size: _angular_core.InputSignal<"small" | "profile" | "normal">;
5616
+ size: _angular_core.InputSignal<"small" | "normal" | "profile">;
5611
5617
  rounded: _angular_core.InputSignal<boolean>;
5612
5618
  loading: _angular_core.InputSignal<boolean>;
5613
5619
  readonly onClick: _angular_core.OutputEmitterRef<XSItemData>;
@@ -5825,7 +5831,7 @@ declare class XSMapInfoBlockComponent implements OnChanges {
5825
5831
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<XSMapInfoBlockComponent, "xs-map-info-block", never, { "item": { "alias": "item"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "subtype": { "alias": "subtype"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "showEvents": { "alias": "showEvents"; "required": false; "isSignal": true; }; }, { "type": "typeChange"; "subtype": "subtypeChange"; "clickItem": "clickItem"; "clickEvent": "clickEvent"; "closeClick": "closeClick"; }, never, ["[custom-info]", "*"], true, never>;
5826
5832
  }
5827
5833
 
5828
- declare const STANDALONE_PIPES: (typeof XSDateFormatPipe | typeof CountryFlagPipe | typeof ImageApiPipe | typeof TruncateTextPipe | typeof SliceArrayPipe | typeof DateLongPipe | typeof NumberDaysPipe | typeof VisitsMonthTotalPipe | typeof RandomImagePipe | typeof TimeAgoPipe | typeof TableLinkPipe | typeof TitleMediaPipe | typeof SocialPipe | typeof IncludeEventPipe | typeof FilterArrayPipe | typeof XSFindLabelByValuePipe)[];
5834
+ declare const STANDALONE_PIPES: (typeof CountryFlagPipe | typeof CountryNamePipe | typeof DateLongPipe | typeof XSDateFormatPipe | typeof ImageApiPipe | typeof SliceArrayPipe | typeof TruncateTextPipe | typeof NumberDaysPipe | typeof VisitsMonthTotalPipe | typeof RandomImagePipe | typeof TimeAgoPipe | typeof TableLinkPipe | typeof TitleMediaPipe | typeof SocialPipe | typeof IncludeEventPipe | typeof FilterArrayPipe | typeof XSFindLabelByValuePipe)[];
5829
5835
 
5830
5836
  declare const LIB_STORIES: Array<() => Promise<any>>;
5831
5837
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsmusices/ui",
3
- "version": "1.43.1",
3
+ "version": "1.44.2",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -1,199 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, inject, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { XSModalService, XSModalImageSearchComponent, XSButtonComponent } from './xsmusices-ui.mjs';
4
-
5
- class ModalExampleComponent {
6
- activeModal = input(...(ngDevMode ? [undefined, { debugName: "activeModal" }] : []));
7
- modalService = inject(XSModalService);
8
- openConfirm() {
9
- this.modalService
10
- .openConfirm({
11
- title: 'Confirmar eliminación',
12
- subTitle: '¿Estás seguro de que quieres eliminar este elemento?',
13
- labelAccept: 'Sí, eliminar',
14
- labelCancel: 'Cancelar',
15
- type: 'centered',
16
- })
17
- .subscribe((_result) => { });
18
- }
19
- openInfo() {
20
- this.modalService
21
- .openInfo({
22
- title: 'Información importante',
23
- info: '<p>Este es un mensaje <strong>importante</strong> que el usuario debe leer.</p><p>Contiene información crítica sobre el sistema.</p>',
24
- labelClose: 'Entendido',
25
- type: 'centered',
26
- })
27
- .subscribe(() => { });
28
- }
29
- openInput() {
30
- this.modalService
31
- .openInput({
32
- title: 'Ingrese su nombre',
33
- subTitle: 'Necesitamos su nombre para continuar',
34
- placeholder: 'Escriba su nombre aquí...',
35
- minLength: 2,
36
- maxLength: 50,
37
- labelAccept: 'Guardar',
38
- labelCancel: 'Cancelar',
39
- type: 'centered',
40
- })
41
- .subscribe((_result) => { });
42
- }
43
- openClaim() {
44
- this.modalService
45
- .openClaim({
46
- title: 'Reclamar elemento',
47
- subTitle: 'Esta acción requiere justificación',
48
- warningMsg: '¿Estás seguro de que quieres reclamar este elemento?',
49
- enterReason: 'Por favor explica el motivo de la reclamación',
50
- labelAccept: 'Reclamar',
51
- labelCancel: 'Cancelar',
52
- type: 'centered',
53
- })
54
- .subscribe((_result) => { });
55
- }
56
- openImageSearch() {
57
- this.modalService
58
- .open(XSModalImageSearchComponent, {
59
- type: 'bottom-sheet',
60
- title: 'Scraping de imágenes',
61
- subTitle: 'Busca y selecciona una imagen',
62
- data: {
63
- q: 'music',
64
- searchImages: async (query, limit) => {
65
- const images = Array.from({ length: limit }, (_, i) => `https://picsum.photos/seed/${encodeURIComponent(query)}${i}/300/300`);
66
- return { images };
67
- },
68
- },
69
- })
70
- .subscribe((_result) => { });
71
- }
72
- openImageSearchWithSources() {
73
- const mockSoundcloudSearch = async (query) => {
74
- return {
75
- images: [
76
- `https://picsum.photos/seed/soundcloud-${encodeURIComponent(query)}/300/300`,
77
- ],
78
- };
79
- };
80
- const mockGoogleSearch = async (query, limit, start) => {
81
- const totalResults = 15;
82
- const offset = start ?? 1;
83
- const images = Array.from({ length: Math.min(limit, totalResults - offset + 1) }, (_, i) => `https://picsum.photos/seed/${encodeURIComponent(query)}-g-${offset + i}/300/300`);
84
- return { images, totalResults };
85
- };
86
- this.modalService
87
- .open(XSModalImageSearchComponent, {
88
- type: 'bottom-sheet',
89
- title: 'Scraping de imágenes',
90
- subTitle: 'Busca en Google Images y SoundCloud',
91
- data: {
92
- q: 'music',
93
- sources: [
94
- {
95
- id: 'google',
96
- label: 'Google Images',
97
- searchImages: mockGoogleSearch,
98
- },
99
- {
100
- id: 'soundcloud',
101
- label: 'SoundCloud',
102
- searchImages: mockSoundcloudSearch,
103
- },
104
- ],
105
- },
106
- })
107
- .subscribe((_result) => { });
108
- }
109
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ModalExampleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
110
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: ModalExampleComponent, isStandalone: true, selector: "modal-example", inputs: { activeModal: { classPropertyName: "activeModal", publicName: "activeModal", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "modal-example-host": "" } }, ngImport: i0, template: " <div class=\"p-4\">\n <div class=\"grid grid-cols-1 gap-4\">\n @if (activeModal() === 'confirm' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Confirmaci\u00F3n'\"\n (onClick)=\"openConfirm()\"\n ></xs-button>\n }\n @if (activeModal() === 'info' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Informaci\u00F3n'\"\n (onClick)=\"openInfo()\"\n ></xs-button>\n }\n @if (activeModal() === 'input' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Input'\"\n (onClick)=\"openInput()\"\n ></xs-button>\n }\n @if (activeModal() === 'claim' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Reclamo'\"\n (onClick)=\"openClaim()\"\n ></xs-button>\n }\n @if (\n activeModal() === 'imageSearch' || !activeModal()\n ) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de B\u00FAsqueda de Im\u00E1genes'\"\n (onClick)=\"openImageSearch()\"\n class=\"mb-2\"\n ></xs-button>\n }\n @if (\n activeModal() === 'imageSearchSources' ||\n !activeModal()\n ) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir con Google + SoundCloud'\"\n (onClick)=\"openImageSearchWithSources()\"\n ></xs-button>\n }\n </div>\n </div>\n", dependencies: [{ kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
111
- }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: ModalExampleComponent, decorators: [{
113
- type: Component,
114
- args: [{ selector: 'modal-example', host: { 'modal-example-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [XSButtonComponent], template: " <div class=\"p-4\">\n <div class=\"grid grid-cols-1 gap-4\">\n @if (activeModal() === 'confirm' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Confirmaci\u00F3n'\"\n (onClick)=\"openConfirm()\"\n ></xs-button>\n }\n @if (activeModal() === 'info' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Informaci\u00F3n'\"\n (onClick)=\"openInfo()\"\n ></xs-button>\n }\n @if (activeModal() === 'input' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Input'\"\n (onClick)=\"openInput()\"\n ></xs-button>\n }\n @if (activeModal() === 'claim' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Reclamo'\"\n (onClick)=\"openClaim()\"\n ></xs-button>\n }\n @if (\n activeModal() === 'imageSearch' || !activeModal()\n ) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de B\u00FAsqueda de Im\u00E1genes'\"\n (onClick)=\"openImageSearch()\"\n class=\"mb-2\"\n ></xs-button>\n }\n @if (\n activeModal() === 'imageSearchSources' ||\n !activeModal()\n ) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir con Google + SoundCloud'\"\n (onClick)=\"openImageSearchWithSources()\"\n ></xs-button>\n }\n </div>\n </div>\n" }]
115
- }], propDecorators: { activeModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeModal", required: false }] }] } });
116
-
117
- const story = {
118
- id: 'modal',
119
- name: 'Modal',
120
- type: 'component',
121
- subtype: 'Base',
122
- status: 'active',
123
- usage: ['admin', 'app', 'monitor'],
124
- updated: '2026-05-30T12:00:00.000Z',
125
- created: '2025-07-29T15:06:52.383Z',
126
- description: 'Componente Modal con diferentes tipos predefinidos y soporte multi-idioma automático con traducciones expandidas.',
127
- component: ModalExampleComponent,
128
- selector: 'xs-modal',
129
- multilanguage: true,
130
- inputs: [
131
- {
132
- key: 'activeModal',
133
- label: 'Modal activo',
134
- type: 'select',
135
- options: [
136
- 'confirm',
137
- 'info',
138
- 'input',
139
- 'claim',
140
- 'imageSearch',
141
- 'imageSearchSources',
142
- ],
143
- default: null,
144
- },
145
- ],
146
- examples: [
147
- {
148
- name: 'Confirm Modal',
149
- description: 'Modal de confirmación para acciones del usuario',
150
- inputs: {
151
- activeModal: 'confirm',
152
- },
153
- },
154
- {
155
- name: 'Info Modal',
156
- description: 'Modal de información para mostrar mensajes al usuario',
157
- inputs: {
158
- activeModal: 'info',
159
- },
160
- },
161
- {
162
- name: 'Input Modal',
163
- description: 'Modal para solicitar entrada de datos del usuario',
164
- inputs: {
165
- activeModal: 'input',
166
- },
167
- },
168
- {
169
- name: 'Claim Modal',
170
- description: 'Modal de reclamación con campo de justificación',
171
- inputs: {
172
- activeModal: 'claim',
173
- },
174
- },
175
- {
176
- name: 'Image Search Modal',
177
- description: 'Modal de búsqueda de imágenes con input y resultados en grid',
178
- inputs: {
179
- activeModal: 'imageSearch',
180
- },
181
- },
182
- {
183
- name: 'Image Search con Google + SoundCloud',
184
- description: 'Modal de búsqueda de imágenes con múltiples fuentes: Google Images y SoundCloud',
185
- inputs: {
186
- activeModal: 'imageSearchSources',
187
- },
188
- },
189
- ],
190
- coverage: {
191
- statements: 38,
192
- branches: 11,
193
- functions: 45,
194
- lines: 38,
195
- },
196
- };
197
-
198
- export { story };
199
- //# sourceMappingURL=xsmusices-ui-xs-modal.xsstory-B96CYHF0.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"xsmusices-ui-xs-modal.xsstory-B96CYHF0.mjs","sources":["../../../projects/xs-ui/src/lib/components/base/modal/modal-example.component.ts","../../../projects/xs-ui/src/lib/components/base/modal/modal-example.component.html","../../../projects/xs-ui/src/lib/components/base/modal/xs-modal.xsstory.ts"],"sourcesContent":["import {\n Component,\n input,\n inject,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { XSModalService } from './xs-modal.service';\nimport { XSButtonComponent } from '../button/xs-button.component';\nimport { XSModalImageSearchComponent } from './types/image-search/xs-modal-image-search.component';\n\n@Component({\n selector: 'modal-example',\n host: { 'modal-example-host': '' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [XSButtonComponent],\n templateUrl: './modal-example.component.html',\n})\nexport class ModalExampleComponent {\n activeModal = input<\n | 'confirm'\n | 'info'\n | 'input'\n | 'claim'\n | 'imageSearch'\n | 'imageSearchSources'\n | null\n >();\n\n private modalService = inject(XSModalService);\n\n openConfirm(): void {\n this.modalService\n .openConfirm({\n title: 'Confirmar eliminación',\n subTitle:\n '¿Estás seguro de que quieres eliminar este elemento?',\n labelAccept: 'Sí, eliminar',\n labelCancel: 'Cancelar',\n type: 'centered',\n })\n .subscribe((_result) => {});\n }\n\n openInfo(): void {\n this.modalService\n .openInfo({\n title: 'Información importante',\n info: '<p>Este es un mensaje <strong>importante</strong> que el usuario debe leer.</p><p>Contiene información crítica sobre el sistema.</p>',\n labelClose: 'Entendido',\n type: 'centered',\n })\n .subscribe(() => {});\n }\n\n openInput(): void {\n this.modalService\n .openInput({\n title: 'Ingrese su nombre',\n subTitle: 'Necesitamos su nombre para continuar',\n placeholder: 'Escriba su nombre aquí...',\n minLength: 2,\n maxLength: 50,\n labelAccept: 'Guardar',\n labelCancel: 'Cancelar',\n type: 'centered',\n })\n .subscribe((_result) => {});\n }\n\n openClaim(): void {\n this.modalService\n .openClaim({\n title: 'Reclamar elemento',\n subTitle: 'Esta acción requiere justificación',\n warningMsg:\n '¿Estás seguro de que quieres reclamar este elemento?',\n enterReason:\n 'Por favor explica el motivo de la reclamación',\n labelAccept: 'Reclamar',\n labelCancel: 'Cancelar',\n type: 'centered',\n })\n .subscribe((_result) => {});\n }\n\n openImageSearch(): void {\n this.modalService\n .open(XSModalImageSearchComponent, {\n type: 'bottom-sheet',\n title: 'Scraping de imágenes',\n subTitle: 'Busca y selecciona una imagen',\n data: {\n q: 'music',\n searchImages: async (query: string, limit: number) => {\n const images = Array.from(\n { length: limit },\n (_, i) =>\n `https://picsum.photos/seed/${encodeURIComponent(query)}${i}/300/300`,\n );\n return { images };\n },\n },\n })\n .subscribe((_result) => {});\n }\n\n openImageSearchWithSources(): void {\n const mockSoundcloudSearch = async (query: string) => {\n return {\n images: [\n `https://picsum.photos/seed/soundcloud-${encodeURIComponent(query)}/300/300`,\n ],\n };\n };\n\n const mockGoogleSearch = async (\n query: string,\n limit: number,\n start?: number,\n ) => {\n const totalResults = 15;\n const offset = start ?? 1;\n const images = Array.from(\n { length: Math.min(limit, totalResults - offset + 1) },\n (_, i) =>\n `https://picsum.photos/seed/${encodeURIComponent(query)}-g-${offset + i}/300/300`,\n );\n return { images, totalResults };\n };\n\n this.modalService\n .open(XSModalImageSearchComponent, {\n type: 'bottom-sheet',\n title: 'Scraping de imágenes',\n subTitle: 'Busca en Google Images y SoundCloud',\n data: {\n q: 'music',\n sources: [\n {\n id: 'google',\n label: 'Google Images',\n searchImages: mockGoogleSearch,\n },\n {\n id: 'soundcloud',\n label: 'SoundCloud',\n searchImages: mockSoundcloudSearch,\n },\n ],\n },\n })\n .subscribe((_result) => {});\n }\n}\n"," <div class=\"p-4\">\n <div class=\"grid grid-cols-1 gap-4\">\n @if (activeModal() === 'confirm' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Confirmación'\"\n (onClick)=\"openConfirm()\"\n ></xs-button>\n }\n @if (activeModal() === 'info' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Información'\"\n (onClick)=\"openInfo()\"\n ></xs-button>\n }\n @if (activeModal() === 'input' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Input'\"\n (onClick)=\"openInput()\"\n ></xs-button>\n }\n @if (activeModal() === 'claim' || !activeModal()) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Reclamo'\"\n (onClick)=\"openClaim()\"\n ></xs-button>\n }\n @if (\n activeModal() === 'imageSearch' || !activeModal()\n ) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir Modal de Búsqueda de Imágenes'\"\n (onClick)=\"openImageSearch()\"\n class=\"mb-2\"\n ></xs-button>\n }\n @if (\n activeModal() === 'imageSearchSources' ||\n !activeModal()\n ) {\n <xs-button\n variant=\"primary\"\n [label]=\"'Abrir con Google + SoundCloud'\"\n (onClick)=\"openImageSearchWithSources()\"\n ></xs-button>\n }\n </div>\n </div>\n","import { StoryMeta } from '../../../story.types';\nimport { ModalExampleComponent } from './modal-example.component';\n\nexport const story: StoryMeta = {\n id: 'modal',\n name: 'Modal',\n type: 'component',\n subtype: 'Base',\n status: 'active',\n usage: ['admin', 'app', 'monitor'],\n updated: '2026-05-30T12:00:00.000Z',\n created: '2025-07-29T15:06:52.383Z',\n description:\n 'Componente Modal con diferentes tipos predefinidos y soporte multi-idioma automático con traducciones expandidas.',\n component: ModalExampleComponent,\n selector: 'xs-modal',\n multilanguage: true,\n inputs: [\n {\n key: 'activeModal',\n label: 'Modal activo',\n type: 'select',\n options: [\n 'confirm',\n 'info',\n 'input',\n 'claim',\n 'imageSearch',\n 'imageSearchSources',\n ],\n default: null,\n },\n ],\n examples: [\n {\n name: 'Confirm Modal',\n description:\n 'Modal de confirmación para acciones del usuario',\n inputs: {\n activeModal: 'confirm',\n },\n },\n {\n name: 'Info Modal',\n description:\n 'Modal de información para mostrar mensajes al usuario',\n inputs: {\n activeModal: 'info',\n },\n },\n {\n name: 'Input Modal',\n description:\n 'Modal para solicitar entrada de datos del usuario',\n inputs: {\n activeModal: 'input',\n },\n },\n {\n name: 'Claim Modal',\n description:\n 'Modal de reclamación con campo de justificación',\n inputs: {\n activeModal: 'claim',\n },\n },\n {\n name: 'Image Search Modal',\n description:\n 'Modal de búsqueda de imágenes con input y resultados en grid',\n inputs: {\n activeModal: 'imageSearch',\n },\n },\n {\n name: 'Image Search con Google + SoundCloud',\n description:\n 'Modal de búsqueda de imágenes con múltiples fuentes: Google Images y SoundCloud',\n inputs: {\n activeModal: 'imageSearchSources',\n },\n },\n ],\n coverage: {\n statements: 38,\n branches: 11,\n functions: 45,\n lines: 38,\n },\n};\n"],"names":[],"mappings":";;;;MAiBa,qBAAqB,CAAA;IAChC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAQhB;AAEK,IAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;IAE7C,WAAW,GAAA;AACT,QAAA,IAAI,CAAC;AACF,aAAA,WAAW,CAAC;AACX,YAAA,KAAK,EAAE,uBAAuB;AAC9B,YAAA,QAAQ,EACN,sDAAsD;AACxD,YAAA,WAAW,EAAE,cAAc;AAC3B,YAAA,WAAW,EAAE,UAAU;AACvB,YAAA,IAAI,EAAE,UA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