codexly-ui 0.12.47 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10446,6 +10446,23 @@ class ClxWizardComponent {
10446
10446
  prevLabel = input('Anterior', ...(ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []));
10447
10447
  nextLabel = input('Siguiente', ...(ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []));
10448
10448
  finishLabel = input('Finalizar', ...(ngDevMode ? [{ debugName: "finishLabel" }] : /* istanbul ignore next */ []));
10449
+ /** Which step to land on when the wizard first renders — for restoring an in-progress flow (e.g.
10450
+ * a saved draft, or state re-hydrated after an external redirect) rather than always starting
10451
+ * fresh at step 0. Applied once, in ngAfterContentInit, and clamped to a valid index; deliberately
10452
+ * bypasses the `linear` guard that goTo()/next() enforce for user-driven navigation — that guard
10453
+ * exists to stop a customer from skipping ahead of steps they haven't filled in yet, which doesn't
10454
+ * apply here: the caller is asserting those earlier steps are ALREADY valid (e.g. their own
10455
+ * signals were just re-prefilled from a backend order), not trying to skip past them. Consumers
10456
+ * are responsible for that guarantee — this input trusts it rather than re-validating each
10457
+ * skipped step, since isValid() reflects the CURRENT signal state, which the caller controls. */
10458
+ initialStep = input(undefined, ...(ngDevMode ? [{ debugName: "initialStep" }] : /* istanbul ignore next */ []));
10459
+ /** Hides the built-in "Finalizar" button on the LAST step only (every other step's own "Siguiente"
10460
+ * button is unaffected) — for a caller that needs its own custom action there instead (e.g. a
10461
+ * payment gateway's own branded button rendered inside that step's own projected content, which
10462
+ * must trigger the exact same submit logic the wizard's own (finish) output would have, so the
10463
+ * step's own isValid still gates whether that custom button is meaningful to show/enable — this
10464
+ * input only removes the wizard's OWN redundant generic button, nothing about validation). */
10465
+ hideFinishButton = input(false, ...(ngDevMode ? [{ debugName: "hideFinishButton" }] : /* istanbul ignore next */ []));
10449
10466
  // ── Outputs ────────────────────────────────────────────────────────────────
10450
10467
  stepChange = output();
10451
10468
  finish = output();
@@ -10458,12 +10475,20 @@ class ClxWizardComponent {
10458
10475
  // ── Lifecycle ──────────────────────────────────────────────────────────────
10459
10476
  ngAfterContentInit() {
10460
10477
  this._steps = this._stepQuery.toArray();
10478
+ this._applyInitialStep();
10461
10479
  this._syncActiveAttrs();
10462
10480
  this._stepQuery.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
10463
10481
  this._steps = this._stepQuery.toArray();
10464
10482
  this._syncActiveAttrs();
10465
10483
  });
10466
10484
  }
10485
+ _applyInitialStep() {
10486
+ const requested = this.initialStep();
10487
+ if (requested == null)
10488
+ return;
10489
+ const clamped = Math.min(Math.max(requested, 0), this._lastIndex());
10490
+ this._currentIndex.set(clamped);
10491
+ }
10467
10492
  _syncActiveAttrs() {
10468
10493
  this._steps.forEach((step, i) => {
10469
10494
  step.nativeEl.setAttribute('data-active', String(i === this._currentIndex()));
@@ -10554,7 +10579,7 @@ class ClxWizardComponent {
10554
10579
  return `${base} border-2 border-clx-border text-clx-text-subtle bg-clx-surface ${ptr}`;
10555
10580
  }
10556
10581
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxWizardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10557
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxWizardComponent, isStandalone: true, selector: "clx-wizard", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, activeTextColor: { classPropertyName: "activeTextColor", publicName: "activeTextColor", isSignal: true, isRequired: false, transformFunction: null }, underlineColor: { classPropertyName: "underlineColor", publicName: "underlineColor", isSignal: true, isRequired: false, transformFunction: null }, stepColor: { classPropertyName: "stepColor", publicName: "stepColor", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, prevLabel: { classPropertyName: "prevLabel", publicName: "prevLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, finishLabel: { classPropertyName: "finishLabel", publicName: "finishLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepChange: "stepChange", finish: "finish" }, queries: [{ propertyName: "_stepQuery", predicate: ClxStepComponent }], ngImport: i0, template: `
10582
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxWizardComponent, isStandalone: true, selector: "clx-wizard", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, activeTextColor: { classPropertyName: "activeTextColor", publicName: "activeTextColor", isSignal: true, isRequired: false, transformFunction: null }, underlineColor: { classPropertyName: "underlineColor", publicName: "underlineColor", isSignal: true, isRequired: false, transformFunction: null }, stepColor: { classPropertyName: "stepColor", publicName: "stepColor", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, prevLabel: { classPropertyName: "prevLabel", publicName: "prevLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, finishLabel: { classPropertyName: "finishLabel", publicName: "finishLabel", isSignal: true, isRequired: false, transformFunction: null }, initialStep: { classPropertyName: "initialStep", publicName: "initialStep", isSignal: true, isRequired: false, transformFunction: null }, hideFinishButton: { classPropertyName: "hideFinishButton", publicName: "hideFinishButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepChange: "stepChange", finish: "finish" }, queries: [{ propertyName: "_stepQuery", predicate: ClxStepComponent }], ngImport: i0, template: `
10558
10583
  <div [class]="_rootClass()">
10559
10584
 
10560
10585
  <!-- ══ HORIZONTAL: clx-tabs indicator ═══════════════════════════════ -->
@@ -10643,7 +10668,7 @@ class ClxWizardComponent {
10643
10668
  [disabled]="!_currentStepValid()"
10644
10669
  (click)="next()"
10645
10670
  >{{ nextLabel() }}</button>
10646
- } @else {
10671
+ } @else if (!hideFinishButton()) {
10647
10672
  <button
10648
10673
  clx-button
10649
10674
  type="button"
@@ -10752,7 +10777,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
10752
10777
  [disabled]="!_currentStepValid()"
10753
10778
  (click)="next()"
10754
10779
  >{{ nextLabel() }}</button>
10755
- } @else {
10780
+ } @else if (!hideFinishButton()) {
10756
10781
  <button
10757
10782
  clx-button
10758
10783
  type="button"
@@ -10769,7 +10794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
10769
10794
  </div>
10770
10795
  </div>
10771
10796
  `, styles: ["@keyframes clx-wizard-fade-slide{0%{opacity:0;transform:translate(10px)}to{opacity:1;transform:translate(0)}}.clx-wizard-step-enter{animation:clx-wizard-fade-slide .22s cubic-bezier(.4,0,.2,1) both}@keyframes clx-wizard-fill{0%{width:0%}to{width:100%}}.clx-wizard-connector-fill{animation:clx-wizard-fill .3s ease both}clx-step[data-active=false]{display:none}\n"] }]
10772
- }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], activeTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTextColor", required: false }] }], underlineColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlineColor", required: false }] }], stepColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepColor", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], prevLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevLabel", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }], finishLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "finishLabel", required: false }] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }], finish: [{ type: i0.Output, args: ["finish"] }], _stepQuery: [{
10797
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], activeTextColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTextColor", required: false }] }], underlineColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlineColor", required: false }] }], stepColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepColor", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], prevLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevLabel", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }], finishLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "finishLabel", required: false }] }], initialStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialStep", required: false }] }], hideFinishButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideFinishButton", required: false }] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }], finish: [{ type: i0.Output, args: ["finish"] }], _stepQuery: [{
10773
10798
  type: ContentChildren,
10774
10799
  args: [ClxStepComponent]
10775
10800
  }] } });