valtech-components 4.0.1008 → 4.0.1010

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.
@@ -70,7 +70,7 @@ import fixWebmDuration from 'fix-webm-duration';
70
70
  * Current version of valtech-components.
71
71
  * This is automatically updated during the publish process.
72
72
  */
73
- const VERSION = '4.0.1008';
73
+ const VERSION = '4.0.1010';
74
74
 
75
75
  function evaluateValtechAccess(rule, context, features = {}, visitedFeatures = new Set()) {
76
76
  if (rule == null)
@@ -39456,6 +39456,456 @@ const SURVEY_RESPONSE_I18N = {
39456
39456
  },
39457
39457
  };
39458
39458
 
39459
+ /** Defaults de `rows` por preset cuando el consumer no lo especifica. */
39460
+ const SKELETON_LAYOUT_DEFAULT_ROWS = {
39461
+ form: 3,
39462
+ list: 5,
39463
+ article: 3,
39464
+ cards: 4,
39465
+ detail: 4,
39466
+ hero: 3,
39467
+ };
39468
+
39469
+ /**
39470
+ * `val-skeleton-layout`
39471
+ *
39472
+ * Skeleton de página **preset-driven**. En vez de que cada vista componga
39473
+ * átomos `val-skeleton` a mano, declara una shape y este organism arma el
39474
+ * placeholder completo. Estándar único para loading states en todo el factory.
39475
+ *
39476
+ * Presets: `form` · `list` · `article` · `cards` · `detail` · `hero`.
39477
+ *
39478
+ * Extender = agregar un valor a `SkeletonLayoutPreset` + un `@case` acá.
39479
+ * Los consumers no cambian.
39480
+ *
39481
+ * @example
39482
+ * ```html
39483
+ * @if (loading()) {
39484
+ * <val-skeleton-layout [props]="{ preset: 'form', rows: 3, showAvatar: true }" />
39485
+ * } @else {
39486
+ * ...contenido real...
39487
+ * }
39488
+ * ```
39489
+ */
39490
+ class SkeletonLayoutComponent {
39491
+ constructor() {
39492
+ this.props_ = signal({ preset: 'list' }, {
39493
+ equal: (a, b) => a === b || JSON.stringify(a) === JSON.stringify(b),
39494
+ });
39495
+ /** Props con defaults aplicados. */
39496
+ this.resolved = computed(() => this.props_());
39497
+ /** Shimmer on/off — default on. */
39498
+ this.anim = computed(() => this.resolved().animated !== false);
39499
+ /** Array `[0..rows)` para los `@for`. rows del prop o default del preset. */
39500
+ this.rowsArray = computed(() => {
39501
+ const p = this.resolved();
39502
+ const preset = p.preset;
39503
+ const count = p.rows && p.rows > 0 ? Math.floor(p.rows) : SKELETON_LAYOUT_DEFAULT_ROWS[preset];
39504
+ return Array.from({ length: count }, (_, i) => i);
39505
+ });
39506
+ /** True si el consumer fijó `columns` explícito → manda su grid (inline).
39507
+ * Si no, el preset cards usa el grid responsive mobile-first (.sk-cards--auto). */
39508
+ this.hasExplicitColumns = computed(() => this.resolved().columns != null);
39509
+ /** `grid-template-columns` para el preset cards con `columns` explícito. */
39510
+ this.gridColumns = computed(() => {
39511
+ const cols = this.resolved().columns ?? 2;
39512
+ return `repeat(${Math.max(1, cols)}, 1fr)`;
39513
+ });
39514
+ }
39515
+ set props(value) {
39516
+ if (value)
39517
+ this.props_.set(value);
39518
+ }
39519
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SkeletonLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39520
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SkeletonLayoutComponent, isStandalone: true, selector: "val-skeleton-layout", inputs: { props: "props" }, ngImport: i0, template: `
39521
+ <div class="val-skeleton-layout" [class]="resolved().cssClass || ''" aria-busy="true" aria-live="polite">
39522
+ @switch (resolved().preset) {
39523
+ <!-- FORM — avatar opcional + N fields (label+input) + botón -->
39524
+ @case ('form') {
39525
+ @if (resolved().showAvatar) {
39526
+ <div class="sk-form__avatar">
39527
+ <val-skeleton
39528
+ [props]="{
39529
+ type: 'avatar',
39530
+ width: '96px',
39531
+ height: '96px',
39532
+ circle: true,
39533
+ animated: anim(),
39534
+ }"
39535
+ />
39536
+ <div class="sk-form__avatar-meta">
39537
+ <val-skeleton
39538
+ [props]="{
39539
+ type: 'text',
39540
+ width: '150px',
39541
+ height: '18px',
39542
+ animated: anim(),
39543
+ }"
39544
+ />
39545
+ <val-skeleton
39546
+ [props]="{
39547
+ type: 'text',
39548
+ width: '190px',
39549
+ height: '13px',
39550
+ animated: anim(),
39551
+ }"
39552
+ />
39553
+ <val-skeleton
39554
+ [props]="{
39555
+ type: 'text',
39556
+ width: '110px',
39557
+ height: '13px',
39558
+ animated: anim(),
39559
+ }"
39560
+ />
39561
+ </div>
39562
+ </div>
39563
+ }
39564
+ <div class="sk-form__fields">
39565
+ @for (i of rowsArray(); track i) {
39566
+ <div class="sk-form__field">
39567
+ <val-skeleton
39568
+ [props]="{
39569
+ type: 'text',
39570
+ width: '90px',
39571
+ height: '13px',
39572
+ animated: anim(),
39573
+ }"
39574
+ />
39575
+ <val-skeleton
39576
+ [props]="{
39577
+ type: 'custom',
39578
+ width: '100%',
39579
+ height: '48px',
39580
+ borderRadius: '12px',
39581
+ animated: anim(),
39582
+ }"
39583
+ />
39584
+ </div>
39585
+ }
39586
+ @if (resolved().showButton !== false) {
39587
+ <val-skeleton
39588
+ [props]="{
39589
+ type: 'custom',
39590
+ width: '100%',
39591
+ height: '48px',
39592
+ borderRadius: '24px',
39593
+ animated: anim(),
39594
+ }"
39595
+ />
39596
+ }
39597
+ </div>
39598
+ }
39599
+
39600
+ <!-- LIST — N filas list-item (el átomo ya trae icono + 2 líneas) -->
39601
+ @case ('list') {
39602
+ <div class="sk-list">
39603
+ @for (i of rowsArray(); track i) {
39604
+ <val-skeleton [props]="{ type: 'list-item', animated: anim() }" />
39605
+ }
39606
+ </div>
39607
+ }
39608
+
39609
+ <!-- ARTICLE — título + meta + párrafos -->
39610
+ @case ('article') {
39611
+ <div class="sk-article">
39612
+ @if (resolved().showTitle !== false) {
39613
+ <val-skeleton
39614
+ [props]="{
39615
+ type: 'text',
39616
+ width: '70%',
39617
+ height: '30px',
39618
+ animated: anim(),
39619
+ }"
39620
+ />
39621
+ <val-skeleton
39622
+ [props]="{
39623
+ type: 'text',
39624
+ width: '40%',
39625
+ height: '14px',
39626
+ animated: anim(),
39627
+ }"
39628
+ />
39629
+ }
39630
+ @for (i of rowsArray(); track i) {
39631
+ <val-skeleton [props]="{ type: 'paragraph', lines: 4, animated: anim() }" />
39632
+ }
39633
+ </div>
39634
+ }
39635
+
39636
+ <!-- CARDS — grid de N card blocks -->
39637
+ @case ('cards') {
39638
+ <!-- Sin columns explícito, grid responsive mobile-first (1 col en
39639
+ mobile, 2 en 640, 3 en 960) que espeja el grid estandar de las
39640
+ vistas del factory. Con columns explícito, el consumer manda
39641
+ (inline). Antes era fijo a 2 columnas, apretado en mobile. -->
39642
+ <div
39643
+ class="sk-cards"
39644
+ [class.sk-cards--auto]="!hasExplicitColumns()"
39645
+ [style.grid-template-columns]="hasExplicitColumns() ? gridColumns() : null"
39646
+ >
39647
+ @for (i of rowsArray(); track i) {
39648
+ <val-skeleton [props]="{ type: 'card', animated: anim() }" />
39649
+ }
39650
+ </div>
39651
+ }
39652
+
39653
+ <!-- DETAIL — N filas key-value -->
39654
+ @case ('detail') {
39655
+ <div class="sk-detail">
39656
+ @for (i of rowsArray(); track i) {
39657
+ <div class="sk-detail__row">
39658
+ <val-skeleton
39659
+ [props]="{
39660
+ type: 'text',
39661
+ width: '110px',
39662
+ height: '14px',
39663
+ animated: anim(),
39664
+ }"
39665
+ />
39666
+ <val-skeleton
39667
+ [props]="{
39668
+ type: 'text',
39669
+ width: '160px',
39670
+ height: '14px',
39671
+ animated: anim(),
39672
+ }"
39673
+ />
39674
+ </div>
39675
+ }
39676
+ </div>
39677
+ }
39678
+
39679
+ <!-- HERO — banner grande + filas de contenido -->
39680
+ @case ('hero') {
39681
+ <div class="sk-hero">
39682
+ @if (resolved().showTitle !== false) {
39683
+ <val-skeleton
39684
+ [props]="{
39685
+ type: 'custom',
39686
+ width: '100%',
39687
+ height: '140px',
39688
+ borderRadius: '20px',
39689
+ animated: anim(),
39690
+ }"
39691
+ />
39692
+ }
39693
+ <div class="sk-hero__rows">
39694
+ @for (i of rowsArray(); track i) {
39695
+ <val-skeleton
39696
+ [props]="{
39697
+ type: 'custom',
39698
+ width: '100%',
39699
+ height: '72px',
39700
+ borderRadius: '14px',
39701
+ animated: anim(),
39702
+ }"
39703
+ />
39704
+ }
39705
+ </div>
39706
+ </div>
39707
+ }
39708
+ }
39709
+ </div>
39710
+ `, isInline: true, styles: [":host{display:block;width:100%}.val-skeleton-layout{width:100%}.sk-form__avatar{display:flex;align-items:center;gap:16px;padding:16px 0}.sk-form__avatar-meta{display:flex;flex-direction:column;gap:8px}.sk-form__fields{padding:16px 0;display:flex;flex-direction:column;gap:18px}.sk-form__field{display:flex;flex-direction:column;gap:8px}.sk-list{display:flex;flex-direction:column;gap:10px;padding:8px 0}.sk-article{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-cards{display:grid;gap:12px;padding:8px 0}.sk-cards--auto{grid-template-columns:1fr}@media (min-width: 640px){.sk-cards--auto{grid-template-columns:repeat(2,1fr)}}@media (min-width: 960px){.sk-cards--auto{grid-template-columns:repeat(3,1fr)}}.sk-detail{display:flex;flex-direction:column;gap:14px;padding:8px 0}.sk-detail__row{display:flex;align-items:center;justify-content:space-between;gap:16px}.sk-hero{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-hero__rows{display:flex;flex-direction:column;gap:12px}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "val-skeleton", inputs: ["props"] }] }); }
39711
+ }
39712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SkeletonLayoutComponent, decorators: [{
39713
+ type: Component,
39714
+ args: [{ selector: 'val-skeleton-layout', standalone: true, imports: [SkeletonComponent], template: `
39715
+ <div class="val-skeleton-layout" [class]="resolved().cssClass || ''" aria-busy="true" aria-live="polite">
39716
+ @switch (resolved().preset) {
39717
+ <!-- FORM — avatar opcional + N fields (label+input) + botón -->
39718
+ @case ('form') {
39719
+ @if (resolved().showAvatar) {
39720
+ <div class="sk-form__avatar">
39721
+ <val-skeleton
39722
+ [props]="{
39723
+ type: 'avatar',
39724
+ width: '96px',
39725
+ height: '96px',
39726
+ circle: true,
39727
+ animated: anim(),
39728
+ }"
39729
+ />
39730
+ <div class="sk-form__avatar-meta">
39731
+ <val-skeleton
39732
+ [props]="{
39733
+ type: 'text',
39734
+ width: '150px',
39735
+ height: '18px',
39736
+ animated: anim(),
39737
+ }"
39738
+ />
39739
+ <val-skeleton
39740
+ [props]="{
39741
+ type: 'text',
39742
+ width: '190px',
39743
+ height: '13px',
39744
+ animated: anim(),
39745
+ }"
39746
+ />
39747
+ <val-skeleton
39748
+ [props]="{
39749
+ type: 'text',
39750
+ width: '110px',
39751
+ height: '13px',
39752
+ animated: anim(),
39753
+ }"
39754
+ />
39755
+ </div>
39756
+ </div>
39757
+ }
39758
+ <div class="sk-form__fields">
39759
+ @for (i of rowsArray(); track i) {
39760
+ <div class="sk-form__field">
39761
+ <val-skeleton
39762
+ [props]="{
39763
+ type: 'text',
39764
+ width: '90px',
39765
+ height: '13px',
39766
+ animated: anim(),
39767
+ }"
39768
+ />
39769
+ <val-skeleton
39770
+ [props]="{
39771
+ type: 'custom',
39772
+ width: '100%',
39773
+ height: '48px',
39774
+ borderRadius: '12px',
39775
+ animated: anim(),
39776
+ }"
39777
+ />
39778
+ </div>
39779
+ }
39780
+ @if (resolved().showButton !== false) {
39781
+ <val-skeleton
39782
+ [props]="{
39783
+ type: 'custom',
39784
+ width: '100%',
39785
+ height: '48px',
39786
+ borderRadius: '24px',
39787
+ animated: anim(),
39788
+ }"
39789
+ />
39790
+ }
39791
+ </div>
39792
+ }
39793
+
39794
+ <!-- LIST — N filas list-item (el átomo ya trae icono + 2 líneas) -->
39795
+ @case ('list') {
39796
+ <div class="sk-list">
39797
+ @for (i of rowsArray(); track i) {
39798
+ <val-skeleton [props]="{ type: 'list-item', animated: anim() }" />
39799
+ }
39800
+ </div>
39801
+ }
39802
+
39803
+ <!-- ARTICLE — título + meta + párrafos -->
39804
+ @case ('article') {
39805
+ <div class="sk-article">
39806
+ @if (resolved().showTitle !== false) {
39807
+ <val-skeleton
39808
+ [props]="{
39809
+ type: 'text',
39810
+ width: '70%',
39811
+ height: '30px',
39812
+ animated: anim(),
39813
+ }"
39814
+ />
39815
+ <val-skeleton
39816
+ [props]="{
39817
+ type: 'text',
39818
+ width: '40%',
39819
+ height: '14px',
39820
+ animated: anim(),
39821
+ }"
39822
+ />
39823
+ }
39824
+ @for (i of rowsArray(); track i) {
39825
+ <val-skeleton [props]="{ type: 'paragraph', lines: 4, animated: anim() }" />
39826
+ }
39827
+ </div>
39828
+ }
39829
+
39830
+ <!-- CARDS — grid de N card blocks -->
39831
+ @case ('cards') {
39832
+ <!-- Sin columns explícito, grid responsive mobile-first (1 col en
39833
+ mobile, 2 en 640, 3 en 960) que espeja el grid estandar de las
39834
+ vistas del factory. Con columns explícito, el consumer manda
39835
+ (inline). Antes era fijo a 2 columnas, apretado en mobile. -->
39836
+ <div
39837
+ class="sk-cards"
39838
+ [class.sk-cards--auto]="!hasExplicitColumns()"
39839
+ [style.grid-template-columns]="hasExplicitColumns() ? gridColumns() : null"
39840
+ >
39841
+ @for (i of rowsArray(); track i) {
39842
+ <val-skeleton [props]="{ type: 'card', animated: anim() }" />
39843
+ }
39844
+ </div>
39845
+ }
39846
+
39847
+ <!-- DETAIL — N filas key-value -->
39848
+ @case ('detail') {
39849
+ <div class="sk-detail">
39850
+ @for (i of rowsArray(); track i) {
39851
+ <div class="sk-detail__row">
39852
+ <val-skeleton
39853
+ [props]="{
39854
+ type: 'text',
39855
+ width: '110px',
39856
+ height: '14px',
39857
+ animated: anim(),
39858
+ }"
39859
+ />
39860
+ <val-skeleton
39861
+ [props]="{
39862
+ type: 'text',
39863
+ width: '160px',
39864
+ height: '14px',
39865
+ animated: anim(),
39866
+ }"
39867
+ />
39868
+ </div>
39869
+ }
39870
+ </div>
39871
+ }
39872
+
39873
+ <!-- HERO — banner grande + filas de contenido -->
39874
+ @case ('hero') {
39875
+ <div class="sk-hero">
39876
+ @if (resolved().showTitle !== false) {
39877
+ <val-skeleton
39878
+ [props]="{
39879
+ type: 'custom',
39880
+ width: '100%',
39881
+ height: '140px',
39882
+ borderRadius: '20px',
39883
+ animated: anim(),
39884
+ }"
39885
+ />
39886
+ }
39887
+ <div class="sk-hero__rows">
39888
+ @for (i of rowsArray(); track i) {
39889
+ <val-skeleton
39890
+ [props]="{
39891
+ type: 'custom',
39892
+ width: '100%',
39893
+ height: '72px',
39894
+ borderRadius: '14px',
39895
+ animated: anim(),
39896
+ }"
39897
+ />
39898
+ }
39899
+ </div>
39900
+ </div>
39901
+ }
39902
+ }
39903
+ </div>
39904
+ `, styles: [":host{display:block;width:100%}.val-skeleton-layout{width:100%}.sk-form__avatar{display:flex;align-items:center;gap:16px;padding:16px 0}.sk-form__avatar-meta{display:flex;flex-direction:column;gap:8px}.sk-form__fields{padding:16px 0;display:flex;flex-direction:column;gap:18px}.sk-form__field{display:flex;flex-direction:column;gap:8px}.sk-list{display:flex;flex-direction:column;gap:10px;padding:8px 0}.sk-article{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-cards{display:grid;gap:12px;padding:8px 0}.sk-cards--auto{grid-template-columns:1fr}@media (min-width: 640px){.sk-cards--auto{grid-template-columns:repeat(2,1fr)}}@media (min-width: 960px){.sk-cards--auto{grid-template-columns:repeat(3,1fr)}}.sk-detail{display:flex;flex-direction:column;gap:14px;padding:8px 0}.sk-detail__row{display:flex;align-items:center;justify-content:space-between;gap:16px}.sk-hero{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-hero__rows{display:flex;flex-direction:column;gap:12px}\n"] }]
39905
+ }], propDecorators: { props: [{
39906
+ type: Input
39907
+ }] } });
39908
+
39459
39909
  const NAMESPACE$4 = 'SurveyResponse';
39460
39910
  /** Code del backend cuando la invitación de esa persona ya se respondió. */
39461
39911
  const INVITE_USED_CODE = 'SURVEY_INVITE_ALREADY_USED';
@@ -39823,7 +40273,9 @@ class SurveyResponseComponent {
39823
40273
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SurveyResponseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39824
40274
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SurveyResponseComponent, isStandalone: true, selector: "val-survey-response", inputs: { props: "props" }, outputs: { submitted: "submitted" }, viewQueries: [{ propertyName: "formComponent", first: true, predicate: FormComponent, descendants: true }], ngImport: i0, template: `
39825
40275
  @if (loading()) {
39826
- <div class="survey-response__loading" aria-hidden="true"></div>
40276
+ <div class="survey-response__loading">
40277
+ <val-skeleton-layout [props]="{ preset: 'form', rows: 4, showAvatar: false }" />
40278
+ </div>
39827
40279
  } @else if (loadError()) {
39828
40280
  <val-empty-state [props]="loadErrorState()" />
39829
40281
  } @else if (alreadyAnswered()) {
@@ -39903,7 +40355,7 @@ class SurveyResponseComponent {
39903
40355
  }
39904
40356
  }
39905
40357
  }
39906
- `, isInline: true, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__header-image,.survey-response__success-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--val-radius-md, 12px)}.survey-response__success{align-items:center;text-align:center}.survey-response__success-image{max-width:320px}.survey-response__success-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.95rem;font-weight:600}.survey-response__steps{display:flex;gap:6px}.survey-response__step{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:999px;color:var(--ion-color-medium, #92949c);font-size:.8125rem;font-weight:700}.survey-response__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-response__actions{display:flex;justify-content:flex-end;gap:8px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{min-height:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }, { kind: "component", type: EmptyStateComponent, selector: "val-empty-state", inputs: ["props"] }, { kind: "component", type: FormComponent, selector: "val-form", inputs: ["props"], outputs: ["onSubmit", "onValueChange", "onInvalid", "onSelectChange"] }] }); }
40358
+ `, isInline: true, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__header-image,.survey-response__success-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--val-radius-md, 12px)}.survey-response__success{align-items:center;text-align:center}.survey-response__success-image{max-width:320px}.survey-response__success-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.95rem;font-weight:600}.survey-response__steps{display:flex;gap:6px}.survey-response__step{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:999px;color:var(--ion-color-medium, #92949c);font-size:.8125rem;font-weight:700}.survey-response__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-response__actions{display:flex;justify-content:flex-end;gap:8px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }, { kind: "component", type: EmptyStateComponent, selector: "val-empty-state", inputs: ["props"] }, { kind: "component", type: FormComponent, selector: "val-form", inputs: ["props"], outputs: ["onSubmit", "onValueChange", "onInvalid", "onSelectChange"] }, { kind: "component", type: SkeletonLayoutComponent, selector: "val-skeleton-layout", inputs: ["props"] }] }); }
39907
40359
  }
39908
40360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SurveyResponseComponent, decorators: [{
39909
40361
  type: Component,
@@ -39923,9 +40375,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
39923
40375
  ButtonComponent,
39924
40376
  EmptyStateComponent,
39925
40377
  FormComponent,
40378
+ SkeletonLayoutComponent,
39926
40379
  ], template: `
39927
40380
  @if (loading()) {
39928
- <div class="survey-response__loading" aria-hidden="true"></div>
40381
+ <div class="survey-response__loading">
40382
+ <val-skeleton-layout [props]="{ preset: 'form', rows: 4, showAvatar: false }" />
40383
+ </div>
39929
40384
  } @else if (loadError()) {
39930
40385
  <val-empty-state [props]="loadErrorState()" />
39931
40386
  } @else if (alreadyAnswered()) {
@@ -40005,7 +40460,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
40005
40460
  }
40006
40461
  }
40007
40462
  }
40008
- `, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__header-image,.survey-response__success-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--val-radius-md, 12px)}.survey-response__success{align-items:center;text-align:center}.survey-response__success-image{max-width:320px}.survey-response__success-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.95rem;font-weight:600}.survey-response__steps{display:flex;gap:6px}.survey-response__step{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:999px;color:var(--ion-color-medium, #92949c);font-size:.8125rem;font-weight:700}.survey-response__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-response__actions{display:flex;justify-content:flex-end;gap:8px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{min-height:120px}\n"] }]
40463
+ `, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__header-image,.survey-response__success-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--val-radius-md, 12px)}.survey-response__success{align-items:center;text-align:center}.survey-response__success-image{max-width:320px}.survey-response__success-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.95rem;font-weight:600}.survey-response__steps{display:flex;gap:6px}.survey-response__step{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:999px;color:var(--ion-color-medium, #92949c);font-size:.8125rem;font-weight:700}.survey-response__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-response__actions{display:flex;justify-content:flex-end;gap:8px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{display:block}\n"] }]
40009
40464
  }], ctorParameters: () => [], propDecorators: { props: [{
40010
40465
  type: Input
40011
40466
  }], submitted: [{
@@ -41851,19 +42306,21 @@ class SurveyBuilderComponent {
41851
42306
  (changed)="draftQuestion($event)"
41852
42307
  (save)="applyQuestion($event)"
41853
42308
  />
41854
- <val-button
41855
- [props]="{
41856
- token: 'q-done-' + row.id,
41857
- text: t('doneEditing'),
41858
- color: 'dark',
41859
- fill: 'solid',
41860
- shape: 'round',
41861
- size: 'default',
41862
- type: 'button',
41863
- state: 'ENABLED',
41864
- }"
41865
- (onClick)="editor.submit()"
41866
- />
42309
+ <div class="survey-builder__row-editor-actions">
42310
+ <val-button
42311
+ [props]="{
42312
+ token: 'q-done-' + row.id,
42313
+ text: t('doneEditing'),
42314
+ color: 'dark',
42315
+ fill: 'solid',
42316
+ shape: 'round',
42317
+ size: 'default',
42318
+ type: 'button',
42319
+ state: 'ENABLED',
42320
+ }"
42321
+ (onClick)="editor.submit()"
42322
+ />
42323
+ </div>
41867
42324
  </div>
41868
42325
  }
41869
42326
  </div>
@@ -41919,7 +42376,7 @@ class SurveyBuilderComponent {
41919
42376
  <val-button [props]="saveProps()" (onClick)="save()" />
41920
42377
  }
41921
42378
  </div>
41922
- `, isInline: true, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__presentation{display:flex;flex-direction:column;gap:12px;padding-top:4px}.survey-builder__section,.survey-builder__review{display:flex;flex-direction:column;gap:12px}.survey-builder__steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:16px;margin-bottom:12px}.survey-builder__step{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:8px;background:var(--ion-card-background, var(--ion-background-color, #fff));color:var(--ion-color-medium-shade, #6b6675);font-size:.8125rem;font-weight:700;cursor:pointer}.survey-builder__step span{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:999px;background:var(--ion-color-light, #f4f5f8);color:inherit;font-size:.75rem}.survey-builder__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.survey-builder__review{padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__review strong{color:var(--ion-text-color, #000)}.survey-builder__review span:not(.survey-builder__questions-label){color:var(--ion-color-medium, #92949c);font-size:.875rem}.survey-builder__image-field{display:flex;flex-direction:column;gap:10px}.survey-builder__image-preview{position:relative;width:100%}.survey-builder__image-preview img{display:block;width:100%;aspect-ratio:16 / 9;object-fit:contain;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:8px;background:var(--ion-color-light, #f4f5f8)}.survey-builder__image-clear{position:absolute;top:8px;right:8px;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:999px;background:#0009;color:#fff;cursor:pointer}.survey-builder__image-upload{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:2px dashed var(--ion-color-dark, #2f2c3a);border-radius:20px;color:var(--ion-color-dark, #2f2c3a);font-size:.875rem;font-weight:600;cursor:pointer}.survey-builder__image-upload:hover{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__image-upload--loading{opacity:.7;cursor:default}.survey-builder__image-upload ion-spinner{width:16px;height:16px}.survey-builder__image-upload input{display:none}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__optional-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.875rem;line-height:1.35}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }, { kind: "component", type: FormFieldComponent, selector: "val-form-field", inputs: ["label"] }, { kind: "component", type: FieldSchemaEditorComponent, selector: "val-field-schema-editor", inputs: ["props"], outputs: ["save", "changed"] }] }); }
42379
+ `, isInline: true, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__presentation{display:flex;flex-direction:column;gap:12px;padding-top:4px}.survey-builder__section,.survey-builder__review{display:flex;flex-direction:column;gap:12px}.survey-builder__steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:16px;margin-bottom:12px}.survey-builder__step{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:8px;background:var(--ion-card-background, var(--ion-background-color, #fff));color:var(--ion-color-medium-shade, #6b6675);font-size:.8125rem;font-weight:700;cursor:pointer}.survey-builder__step span{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:999px;background:var(--ion-color-light, #f4f5f8);color:inherit;font-size:.75rem}.survey-builder__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.survey-builder__review{padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__review strong{color:var(--ion-text-color, #000)}.survey-builder__review span:not(.survey-builder__questions-label){color:var(--ion-color-medium, #92949c);font-size:.875rem}.survey-builder__image-field{display:flex;flex-direction:column;gap:10px}.survey-builder__image-preview{position:relative;width:100%}.survey-builder__image-preview img{display:block;width:100%;aspect-ratio:16 / 9;object-fit:contain;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:8px;background:var(--ion-color-light, #f4f5f8)}.survey-builder__image-clear{position:absolute;top:8px;right:8px;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:999px;background:#0009;color:#fff;cursor:pointer}.survey-builder__image-upload{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:2px dashed var(--ion-color-dark, #2f2c3a);border-radius:20px;color:var(--ion-color-dark, #2f2c3a);font-size:.875rem;font-weight:600;cursor:pointer}.survey-builder__image-upload:hover{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__image-upload--loading{opacity:.7;cursor:default}.survey-builder__image-upload ion-spinner{width:16px;height:16px}.survey-builder__image-upload input{display:none}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__optional-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.875rem;line-height:1.35}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__row-editor-actions{display:flex;justify-content:flex-end}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }, { kind: "component", type: FormFieldComponent, selector: "val-form-field", inputs: ["label"] }, { kind: "component", type: FieldSchemaEditorComponent, selector: "val-field-schema-editor", inputs: ["props"], outputs: ["save", "changed"] }] }); }
41923
42380
  }
41924
42381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SurveyBuilderComponent, decorators: [{
41925
42382
  type: Component,
@@ -42183,19 +42640,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
42183
42640
  (changed)="draftQuestion($event)"
42184
42641
  (save)="applyQuestion($event)"
42185
42642
  />
42186
- <val-button
42187
- [props]="{
42188
- token: 'q-done-' + row.id,
42189
- text: t('doneEditing'),
42190
- color: 'dark',
42191
- fill: 'solid',
42192
- shape: 'round',
42193
- size: 'default',
42194
- type: 'button',
42195
- state: 'ENABLED',
42196
- }"
42197
- (onClick)="editor.submit()"
42198
- />
42643
+ <div class="survey-builder__row-editor-actions">
42644
+ <val-button
42645
+ [props]="{
42646
+ token: 'q-done-' + row.id,
42647
+ text: t('doneEditing'),
42648
+ color: 'dark',
42649
+ fill: 'solid',
42650
+ shape: 'round',
42651
+ size: 'default',
42652
+ type: 'button',
42653
+ state: 'ENABLED',
42654
+ }"
42655
+ (onClick)="editor.submit()"
42656
+ />
42657
+ </div>
42199
42658
  </div>
42200
42659
  }
42201
42660
  </div>
@@ -42251,7 +42710,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
42251
42710
  <val-button [props]="saveProps()" (onClick)="save()" />
42252
42711
  }
42253
42712
  </div>
42254
- `, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__presentation{display:flex;flex-direction:column;gap:12px;padding-top:4px}.survey-builder__section,.survey-builder__review{display:flex;flex-direction:column;gap:12px}.survey-builder__steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:16px;margin-bottom:12px}.survey-builder__step{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:8px;background:var(--ion-card-background, var(--ion-background-color, #fff));color:var(--ion-color-medium-shade, #6b6675);font-size:.8125rem;font-weight:700;cursor:pointer}.survey-builder__step span{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:999px;background:var(--ion-color-light, #f4f5f8);color:inherit;font-size:.75rem}.survey-builder__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.survey-builder__review{padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__review strong{color:var(--ion-text-color, #000)}.survey-builder__review span:not(.survey-builder__questions-label){color:var(--ion-color-medium, #92949c);font-size:.875rem}.survey-builder__image-field{display:flex;flex-direction:column;gap:10px}.survey-builder__image-preview{position:relative;width:100%}.survey-builder__image-preview img{display:block;width:100%;aspect-ratio:16 / 9;object-fit:contain;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:8px;background:var(--ion-color-light, #f4f5f8)}.survey-builder__image-clear{position:absolute;top:8px;right:8px;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:999px;background:#0009;color:#fff;cursor:pointer}.survey-builder__image-upload{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:2px dashed var(--ion-color-dark, #2f2c3a);border-radius:20px;color:var(--ion-color-dark, #2f2c3a);font-size:.875rem;font-weight:600;cursor:pointer}.survey-builder__image-upload:hover{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__image-upload--loading{opacity:.7;cursor:default}.survey-builder__image-upload ion-spinner{width:16px;height:16px}.survey-builder__image-upload input{display:none}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__optional-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.875rem;line-height:1.35}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"] }]
42713
+ `, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__presentation{display:flex;flex-direction:column;gap:12px;padding-top:4px}.survey-builder__section,.survey-builder__review{display:flex;flex-direction:column;gap:12px}.survey-builder__steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:16px;margin-bottom:12px}.survey-builder__step{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .12));border-radius:8px;background:var(--ion-card-background, var(--ion-background-color, #fff));color:var(--ion-color-medium-shade, #6b6675);font-size:.8125rem;font-weight:700;cursor:pointer}.survey-builder__step span{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:999px;background:var(--ion-color-light, #f4f5f8);color:inherit;font-size:.75rem}.survey-builder__step--active{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.survey-builder__review{padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__review strong{color:var(--ion-text-color, #000)}.survey-builder__review span:not(.survey-builder__questions-label){color:var(--ion-color-medium, #92949c);font-size:.875rem}.survey-builder__image-field{display:flex;flex-direction:column;gap:10px}.survey-builder__image-preview{position:relative;width:100%}.survey-builder__image-preview img{display:block;width:100%;aspect-ratio:16 / 9;object-fit:contain;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:8px;background:var(--ion-color-light, #f4f5f8)}.survey-builder__image-clear{position:absolute;top:8px;right:8px;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:999px;background:#0009;color:#fff;cursor:pointer}.survey-builder__image-upload{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:2px dashed var(--ion-color-dark, #2f2c3a);border-radius:20px;color:var(--ion-color-dark, #2f2c3a);font-size:.875rem;font-weight:600;cursor:pointer}.survey-builder__image-upload:hover{border-color:var(--ion-color-primary);color:var(--ion-color-primary)}.survey-builder__image-upload--loading{opacity:.7;cursor:default}.survey-builder__image-upload ion-spinner{width:16px;height:16px}.survey-builder__image-upload input{display:none}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__optional-note{margin:0;color:var(--ion-color-medium, #92949c);font-size:.875rem;line-height:1.35}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__row-editor-actions{display:flex;justify-content:flex-end}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"] }]
42255
42714
  }], ctorParameters: () => [], propDecorators: { props: [{
42256
42715
  type: Input
42257
42716
  }], saved: [{
@@ -56534,456 +56993,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
56534
56993
  type: Output
56535
56994
  }] } });
56536
56995
 
56537
- /** Defaults de `rows` por preset cuando el consumer no lo especifica. */
56538
- const SKELETON_LAYOUT_DEFAULT_ROWS = {
56539
- form: 3,
56540
- list: 5,
56541
- article: 3,
56542
- cards: 4,
56543
- detail: 4,
56544
- hero: 3,
56545
- };
56546
-
56547
- /**
56548
- * `val-skeleton-layout`
56549
- *
56550
- * Skeleton de página **preset-driven**. En vez de que cada vista componga
56551
- * átomos `val-skeleton` a mano, declara una shape y este organism arma el
56552
- * placeholder completo. Estándar único para loading states en todo el factory.
56553
- *
56554
- * Presets: `form` · `list` · `article` · `cards` · `detail` · `hero`.
56555
- *
56556
- * Extender = agregar un valor a `SkeletonLayoutPreset` + un `@case` acá.
56557
- * Los consumers no cambian.
56558
- *
56559
- * @example
56560
- * ```html
56561
- * @if (loading()) {
56562
- * <val-skeleton-layout [props]="{ preset: 'form', rows: 3, showAvatar: true }" />
56563
- * } @else {
56564
- * ...contenido real...
56565
- * }
56566
- * ```
56567
- */
56568
- class SkeletonLayoutComponent {
56569
- constructor() {
56570
- this.props_ = signal({ preset: 'list' }, {
56571
- equal: (a, b) => a === b || JSON.stringify(a) === JSON.stringify(b),
56572
- });
56573
- /** Props con defaults aplicados. */
56574
- this.resolved = computed(() => this.props_());
56575
- /** Shimmer on/off — default on. */
56576
- this.anim = computed(() => this.resolved().animated !== false);
56577
- /** Array `[0..rows)` para los `@for`. rows del prop o default del preset. */
56578
- this.rowsArray = computed(() => {
56579
- const p = this.resolved();
56580
- const preset = p.preset;
56581
- const count = p.rows && p.rows > 0 ? Math.floor(p.rows) : SKELETON_LAYOUT_DEFAULT_ROWS[preset];
56582
- return Array.from({ length: count }, (_, i) => i);
56583
- });
56584
- /** True si el consumer fijó `columns` explícito → manda su grid (inline).
56585
- * Si no, el preset cards usa el grid responsive mobile-first (.sk-cards--auto). */
56586
- this.hasExplicitColumns = computed(() => this.resolved().columns != null);
56587
- /** `grid-template-columns` para el preset cards con `columns` explícito. */
56588
- this.gridColumns = computed(() => {
56589
- const cols = this.resolved().columns ?? 2;
56590
- return `repeat(${Math.max(1, cols)}, 1fr)`;
56591
- });
56592
- }
56593
- set props(value) {
56594
- if (value)
56595
- this.props_.set(value);
56596
- }
56597
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SkeletonLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
56598
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SkeletonLayoutComponent, isStandalone: true, selector: "val-skeleton-layout", inputs: { props: "props" }, ngImport: i0, template: `
56599
- <div class="val-skeleton-layout" [class]="resolved().cssClass || ''" aria-busy="true" aria-live="polite">
56600
- @switch (resolved().preset) {
56601
- <!-- FORM — avatar opcional + N fields (label+input) + botón -->
56602
- @case ('form') {
56603
- @if (resolved().showAvatar) {
56604
- <div class="sk-form__avatar">
56605
- <val-skeleton
56606
- [props]="{
56607
- type: 'avatar',
56608
- width: '96px',
56609
- height: '96px',
56610
- circle: true,
56611
- animated: anim(),
56612
- }"
56613
- />
56614
- <div class="sk-form__avatar-meta">
56615
- <val-skeleton
56616
- [props]="{
56617
- type: 'text',
56618
- width: '150px',
56619
- height: '18px',
56620
- animated: anim(),
56621
- }"
56622
- />
56623
- <val-skeleton
56624
- [props]="{
56625
- type: 'text',
56626
- width: '190px',
56627
- height: '13px',
56628
- animated: anim(),
56629
- }"
56630
- />
56631
- <val-skeleton
56632
- [props]="{
56633
- type: 'text',
56634
- width: '110px',
56635
- height: '13px',
56636
- animated: anim(),
56637
- }"
56638
- />
56639
- </div>
56640
- </div>
56641
- }
56642
- <div class="sk-form__fields">
56643
- @for (i of rowsArray(); track i) {
56644
- <div class="sk-form__field">
56645
- <val-skeleton
56646
- [props]="{
56647
- type: 'text',
56648
- width: '90px',
56649
- height: '13px',
56650
- animated: anim(),
56651
- }"
56652
- />
56653
- <val-skeleton
56654
- [props]="{
56655
- type: 'custom',
56656
- width: '100%',
56657
- height: '48px',
56658
- borderRadius: '12px',
56659
- animated: anim(),
56660
- }"
56661
- />
56662
- </div>
56663
- }
56664
- @if (resolved().showButton !== false) {
56665
- <val-skeleton
56666
- [props]="{
56667
- type: 'custom',
56668
- width: '100%',
56669
- height: '48px',
56670
- borderRadius: '24px',
56671
- animated: anim(),
56672
- }"
56673
- />
56674
- }
56675
- </div>
56676
- }
56677
-
56678
- <!-- LIST — N filas list-item (el átomo ya trae icono + 2 líneas) -->
56679
- @case ('list') {
56680
- <div class="sk-list">
56681
- @for (i of rowsArray(); track i) {
56682
- <val-skeleton [props]="{ type: 'list-item', animated: anim() }" />
56683
- }
56684
- </div>
56685
- }
56686
-
56687
- <!-- ARTICLE — título + meta + párrafos -->
56688
- @case ('article') {
56689
- <div class="sk-article">
56690
- @if (resolved().showTitle !== false) {
56691
- <val-skeleton
56692
- [props]="{
56693
- type: 'text',
56694
- width: '70%',
56695
- height: '30px',
56696
- animated: anim(),
56697
- }"
56698
- />
56699
- <val-skeleton
56700
- [props]="{
56701
- type: 'text',
56702
- width: '40%',
56703
- height: '14px',
56704
- animated: anim(),
56705
- }"
56706
- />
56707
- }
56708
- @for (i of rowsArray(); track i) {
56709
- <val-skeleton [props]="{ type: 'paragraph', lines: 4, animated: anim() }" />
56710
- }
56711
- </div>
56712
- }
56713
-
56714
- <!-- CARDS — grid de N card blocks -->
56715
- @case ('cards') {
56716
- <!-- Sin columns explícito, grid responsive mobile-first (1 col en
56717
- mobile, 2 en 640, 3 en 960) que espeja el grid estandar de las
56718
- vistas del factory. Con columns explícito, el consumer manda
56719
- (inline). Antes era fijo a 2 columnas, apretado en mobile. -->
56720
- <div
56721
- class="sk-cards"
56722
- [class.sk-cards--auto]="!hasExplicitColumns()"
56723
- [style.grid-template-columns]="hasExplicitColumns() ? gridColumns() : null"
56724
- >
56725
- @for (i of rowsArray(); track i) {
56726
- <val-skeleton [props]="{ type: 'card', animated: anim() }" />
56727
- }
56728
- </div>
56729
- }
56730
-
56731
- <!-- DETAIL — N filas key-value -->
56732
- @case ('detail') {
56733
- <div class="sk-detail">
56734
- @for (i of rowsArray(); track i) {
56735
- <div class="sk-detail__row">
56736
- <val-skeleton
56737
- [props]="{
56738
- type: 'text',
56739
- width: '110px',
56740
- height: '14px',
56741
- animated: anim(),
56742
- }"
56743
- />
56744
- <val-skeleton
56745
- [props]="{
56746
- type: 'text',
56747
- width: '160px',
56748
- height: '14px',
56749
- animated: anim(),
56750
- }"
56751
- />
56752
- </div>
56753
- }
56754
- </div>
56755
- }
56756
-
56757
- <!-- HERO — banner grande + filas de contenido -->
56758
- @case ('hero') {
56759
- <div class="sk-hero">
56760
- @if (resolved().showTitle !== false) {
56761
- <val-skeleton
56762
- [props]="{
56763
- type: 'custom',
56764
- width: '100%',
56765
- height: '140px',
56766
- borderRadius: '20px',
56767
- animated: anim(),
56768
- }"
56769
- />
56770
- }
56771
- <div class="sk-hero__rows">
56772
- @for (i of rowsArray(); track i) {
56773
- <val-skeleton
56774
- [props]="{
56775
- type: 'custom',
56776
- width: '100%',
56777
- height: '72px',
56778
- borderRadius: '14px',
56779
- animated: anim(),
56780
- }"
56781
- />
56782
- }
56783
- </div>
56784
- </div>
56785
- }
56786
- }
56787
- </div>
56788
- `, isInline: true, styles: [":host{display:block;width:100%}.val-skeleton-layout{width:100%}.sk-form__avatar{display:flex;align-items:center;gap:16px;padding:16px 0}.sk-form__avatar-meta{display:flex;flex-direction:column;gap:8px}.sk-form__fields{padding:16px 0;display:flex;flex-direction:column;gap:18px}.sk-form__field{display:flex;flex-direction:column;gap:8px}.sk-list{display:flex;flex-direction:column;gap:10px;padding:8px 0}.sk-article{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-cards{display:grid;gap:12px;padding:8px 0}.sk-cards--auto{grid-template-columns:1fr}@media (min-width: 640px){.sk-cards--auto{grid-template-columns:repeat(2,1fr)}}@media (min-width: 960px){.sk-cards--auto{grid-template-columns:repeat(3,1fr)}}.sk-detail{display:flex;flex-direction:column;gap:14px;padding:8px 0}.sk-detail__row{display:flex;align-items:center;justify-content:space-between;gap:16px}.sk-hero{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-hero__rows{display:flex;flex-direction:column;gap:12px}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "val-skeleton", inputs: ["props"] }] }); }
56789
- }
56790
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SkeletonLayoutComponent, decorators: [{
56791
- type: Component,
56792
- args: [{ selector: 'val-skeleton-layout', standalone: true, imports: [SkeletonComponent], template: `
56793
- <div class="val-skeleton-layout" [class]="resolved().cssClass || ''" aria-busy="true" aria-live="polite">
56794
- @switch (resolved().preset) {
56795
- <!-- FORM — avatar opcional + N fields (label+input) + botón -->
56796
- @case ('form') {
56797
- @if (resolved().showAvatar) {
56798
- <div class="sk-form__avatar">
56799
- <val-skeleton
56800
- [props]="{
56801
- type: 'avatar',
56802
- width: '96px',
56803
- height: '96px',
56804
- circle: true,
56805
- animated: anim(),
56806
- }"
56807
- />
56808
- <div class="sk-form__avatar-meta">
56809
- <val-skeleton
56810
- [props]="{
56811
- type: 'text',
56812
- width: '150px',
56813
- height: '18px',
56814
- animated: anim(),
56815
- }"
56816
- />
56817
- <val-skeleton
56818
- [props]="{
56819
- type: 'text',
56820
- width: '190px',
56821
- height: '13px',
56822
- animated: anim(),
56823
- }"
56824
- />
56825
- <val-skeleton
56826
- [props]="{
56827
- type: 'text',
56828
- width: '110px',
56829
- height: '13px',
56830
- animated: anim(),
56831
- }"
56832
- />
56833
- </div>
56834
- </div>
56835
- }
56836
- <div class="sk-form__fields">
56837
- @for (i of rowsArray(); track i) {
56838
- <div class="sk-form__field">
56839
- <val-skeleton
56840
- [props]="{
56841
- type: 'text',
56842
- width: '90px',
56843
- height: '13px',
56844
- animated: anim(),
56845
- }"
56846
- />
56847
- <val-skeleton
56848
- [props]="{
56849
- type: 'custom',
56850
- width: '100%',
56851
- height: '48px',
56852
- borderRadius: '12px',
56853
- animated: anim(),
56854
- }"
56855
- />
56856
- </div>
56857
- }
56858
- @if (resolved().showButton !== false) {
56859
- <val-skeleton
56860
- [props]="{
56861
- type: 'custom',
56862
- width: '100%',
56863
- height: '48px',
56864
- borderRadius: '24px',
56865
- animated: anim(),
56866
- }"
56867
- />
56868
- }
56869
- </div>
56870
- }
56871
-
56872
- <!-- LIST — N filas list-item (el átomo ya trae icono + 2 líneas) -->
56873
- @case ('list') {
56874
- <div class="sk-list">
56875
- @for (i of rowsArray(); track i) {
56876
- <val-skeleton [props]="{ type: 'list-item', animated: anim() }" />
56877
- }
56878
- </div>
56879
- }
56880
-
56881
- <!-- ARTICLE — título + meta + párrafos -->
56882
- @case ('article') {
56883
- <div class="sk-article">
56884
- @if (resolved().showTitle !== false) {
56885
- <val-skeleton
56886
- [props]="{
56887
- type: 'text',
56888
- width: '70%',
56889
- height: '30px',
56890
- animated: anim(),
56891
- }"
56892
- />
56893
- <val-skeleton
56894
- [props]="{
56895
- type: 'text',
56896
- width: '40%',
56897
- height: '14px',
56898
- animated: anim(),
56899
- }"
56900
- />
56901
- }
56902
- @for (i of rowsArray(); track i) {
56903
- <val-skeleton [props]="{ type: 'paragraph', lines: 4, animated: anim() }" />
56904
- }
56905
- </div>
56906
- }
56907
-
56908
- <!-- CARDS — grid de N card blocks -->
56909
- @case ('cards') {
56910
- <!-- Sin columns explícito, grid responsive mobile-first (1 col en
56911
- mobile, 2 en 640, 3 en 960) que espeja el grid estandar de las
56912
- vistas del factory. Con columns explícito, el consumer manda
56913
- (inline). Antes era fijo a 2 columnas, apretado en mobile. -->
56914
- <div
56915
- class="sk-cards"
56916
- [class.sk-cards--auto]="!hasExplicitColumns()"
56917
- [style.grid-template-columns]="hasExplicitColumns() ? gridColumns() : null"
56918
- >
56919
- @for (i of rowsArray(); track i) {
56920
- <val-skeleton [props]="{ type: 'card', animated: anim() }" />
56921
- }
56922
- </div>
56923
- }
56924
-
56925
- <!-- DETAIL — N filas key-value -->
56926
- @case ('detail') {
56927
- <div class="sk-detail">
56928
- @for (i of rowsArray(); track i) {
56929
- <div class="sk-detail__row">
56930
- <val-skeleton
56931
- [props]="{
56932
- type: 'text',
56933
- width: '110px',
56934
- height: '14px',
56935
- animated: anim(),
56936
- }"
56937
- />
56938
- <val-skeleton
56939
- [props]="{
56940
- type: 'text',
56941
- width: '160px',
56942
- height: '14px',
56943
- animated: anim(),
56944
- }"
56945
- />
56946
- </div>
56947
- }
56948
- </div>
56949
- }
56950
-
56951
- <!-- HERO — banner grande + filas de contenido -->
56952
- @case ('hero') {
56953
- <div class="sk-hero">
56954
- @if (resolved().showTitle !== false) {
56955
- <val-skeleton
56956
- [props]="{
56957
- type: 'custom',
56958
- width: '100%',
56959
- height: '140px',
56960
- borderRadius: '20px',
56961
- animated: anim(),
56962
- }"
56963
- />
56964
- }
56965
- <div class="sk-hero__rows">
56966
- @for (i of rowsArray(); track i) {
56967
- <val-skeleton
56968
- [props]="{
56969
- type: 'custom',
56970
- width: '100%',
56971
- height: '72px',
56972
- borderRadius: '14px',
56973
- animated: anim(),
56974
- }"
56975
- />
56976
- }
56977
- </div>
56978
- </div>
56979
- }
56980
- }
56981
- </div>
56982
- `, styles: [":host{display:block;width:100%}.val-skeleton-layout{width:100%}.sk-form__avatar{display:flex;align-items:center;gap:16px;padding:16px 0}.sk-form__avatar-meta{display:flex;flex-direction:column;gap:8px}.sk-form__fields{padding:16px 0;display:flex;flex-direction:column;gap:18px}.sk-form__field{display:flex;flex-direction:column;gap:8px}.sk-list{display:flex;flex-direction:column;gap:10px;padding:8px 0}.sk-article{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-cards{display:grid;gap:12px;padding:8px 0}.sk-cards--auto{grid-template-columns:1fr}@media (min-width: 640px){.sk-cards--auto{grid-template-columns:repeat(2,1fr)}}@media (min-width: 960px){.sk-cards--auto{grid-template-columns:repeat(3,1fr)}}.sk-detail{display:flex;flex-direction:column;gap:14px;padding:8px 0}.sk-detail__row{display:flex;align-items:center;justify-content:space-between;gap:16px}.sk-hero{display:flex;flex-direction:column;gap:16px;padding:8px 0}.sk-hero__rows{display:flex;flex-direction:column;gap:12px}\n"] }]
56983
- }], propDecorators: { props: [{
56984
- type: Input
56985
- }] } });
56986
-
56987
56996
  /**
56988
56997
  * PageRefreshService — bus del pull-to-refresh estándar del factory.
56989
56998
  *