@osovitny/anatoly 3.20.1 → 3.20.3

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.
@@ -615,9 +615,9 @@ function BuyAccessButtonComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
615
615
  } if (rf & 2) {
616
616
  const ctx_r1 = i0.ɵɵnextContext(2);
617
617
  i0.ɵɵadvance();
618
- i0.ɵɵproperty("ngIf", ctx_r1.plan == ctx_r1.currentPlan);
618
+ i0.ɵɵproperty("ngIf", ctx_r1.plan == ctx_r1.currentPlanId);
619
619
  i0.ɵɵadvance();
620
- i0.ɵɵproperty("ngIf", ctx_r1.plan != ctx_r1.currentPlan);
620
+ i0.ɵɵproperty("ngIf", ctx_r1.plan != ctx_r1.currentPlanId);
621
621
  } }
622
622
  function BuyAccessButtonComponent_div_0_Template(rf, ctx) { if (rf & 1) {
623
623
  i0.ɵɵelementStart(0, "div");
@@ -633,7 +633,7 @@ class BuyAccessButtonComponent {
633
633
  this.appContext = appContext;
634
634
  this.contextUpdated = false;
635
635
  this.isUserSignedIn = false;
636
- this.currentPlan = -1;
636
+ this.currentPlanId = -1;
637
637
  this.visibleIfUserSignedIn = false;
638
638
  //Outputs
639
639
  this.planselect = new EventEmitter();
@@ -651,8 +651,8 @@ class BuyAccessButtonComponent {
651
651
  }
652
652
  this.isUserSignedIn = context.isUserSignedIn;
653
653
  if (this.isUserSignedIn) {
654
- let billing = context.billing.profile;
655
- this.currentPlan = billing.billingPlan;
654
+ let profile = context.billing.profile;
655
+ this.currentPlanId = profile.planId;
656
656
  }
657
657
  this.contextUpdated = true;
658
658
  });
@@ -670,7 +670,7 @@ class BuyAccessButtonComponent {
670
670
  }
671
671
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BuyAccessButtonComponent, [{
672
672
  type: Component,
673
- args: [{ selector: 'anatoly-billing-buyaccess-button', standalone: false, template: "<div *ngIf=\"contextUpdated\">\r\n <!--\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classes=\"btn btn-block btn-primary\" />\r\n </div>\r\n -->\r\n\r\n <div *ngIf=\"isUserSignedIn && visibleIfUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"plan != currentPlan\"\r\n (click)=\"onPlanSelect()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n" }]
673
+ args: [{ selector: 'anatoly-billing-buyaccess-button', standalone: false, template: "<div *ngIf=\"contextUpdated\">\r\n <!--\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classes=\"btn btn-block btn-primary\" />\r\n </div>\r\n -->\r\n\r\n <div *ngIf=\"isUserSignedIn && visibleIfUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\" *ngIf=\"plan == currentPlanId\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\" *ngIf=\"plan != currentPlanId\"\r\n (click)=\"onPlanSelect()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n" }]
674
674
  }], () => [{ type: AppContextService }], { plan: [{
675
675
  type: Input
676
676
  }], visibleIfUserSignedIn: [{
@@ -759,9 +759,9 @@ class SubscribePlanButtonComponent {
759
759
  }
760
760
  this.isUserSignedIn = context.isUserSignedIn;
761
761
  if (this.isUserSignedIn) {
762
- let billing = context.billing.profile;
763
- this.currentPlanId = billing.planId;
764
- this.requestedPlanId = billing.requestedPlanId ?? -1;
762
+ let profile = context.billing.profile;
763
+ this.currentPlanId = profile.planId;
764
+ this.requestedPlanId = profile.requestedPlanId ?? -1;
765
765
  }
766
766
  this.contextUpdated = true;
767
767
  });
@@ -4279,6 +4279,21 @@ class Utils {
4279
4279
  */
4280
4280
  //consts
4281
4281
 
4282
+ /*
4283
+ <file>
4284
+ Project:
4285
+ @osovitny/anatoly
4286
+
4287
+ Authors:
4288
+ Vadim Osovitny vadim.osovitny@osovitny.com
4289
+
4290
+ Created:
4291
+ 11 Nov 2024
4292
+
4293
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4294
+ </file>
4295
+ */
4296
+
4282
4297
  /*
4283
4298
  <file>
4284
4299
  Project:
@@ -4302,6 +4317,8 @@ class ComponentBase {
4302
4317
  this.dataLoading = true;
4303
4318
  this.dataLoaded = false;
4304
4319
  this.dataFound = false;
4320
+ //Inputs
4321
+ this.mode = Mode.View;
4305
4322
  this.title = '';
4306
4323
  this.isTitleVisible = true;
4307
4324
  this.isRequired = false;
@@ -4333,14 +4350,16 @@ class ComponentBase {
4333
4350
  this.dataFound = found;
4334
4351
  }
4335
4352
  static { this.ɵfac = function ComponentBase_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ComponentBase)(); }; }
4336
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ComponentBase, selectors: [["ng-component"]], inputs: { classes: "classes", title: "title", isTitleVisible: "isTitleVisible", isRequired: "isRequired" }, decls: 0, vars: 0, template: function ComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
4353
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ComponentBase, selectors: [["ng-component"]], inputs: { mode: "mode", classes: "classes", title: "title", isTitleVisible: "isTitleVisible", isRequired: "isRequired" }, decls: 0, vars: 0, template: function ComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
4337
4354
  }
4338
4355
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ComponentBase, [{
4339
4356
  type: Component,
4340
4357
  args: [{
4341
4358
  template: ''
4342
4359
  }]
4343
- }], () => [], { classes: [{
4360
+ }], () => [], { mode: [{
4361
+ type: Input
4362
+ }], classes: [{
4344
4363
  type: Input
4345
4364
  }], title: [{
4346
4365
  type: Input
@@ -4349,7 +4368,7 @@ class ComponentBase {
4349
4368
  }], isRequired: [{
4350
4369
  type: Input
4351
4370
  }] }); })();
4352
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ComponentBase, { className: "ComponentBase", filePath: "lib/ui/components/base/components/component.ts", lineNumber: 25 }); })();
4371
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ComponentBase, { className: "ComponentBase", filePath: "lib/ui/components/base/components/component.ts", lineNumber: 26 }); })();
4353
4372
 
4354
4373
  /*
4355
4374
  <file>
@@ -5110,21 +5129,6 @@ class DialogBase extends EditComponentBase {
5110
5129
  }] }); })();
5111
5130
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DialogBase, { className: "DialogBase", filePath: "lib/ui/components/base/dialog.ts", lineNumber: 28 }); })();
5112
5131
 
5113
- /*
5114
- <file>
5115
- Project:
5116
- @osovitny/anatoly
5117
-
5118
- Authors:
5119
- Vadim Osovitny vadim.osovitny@osovitny.com
5120
-
5121
- Created:
5122
- 11 Nov 2024
5123
-
5124
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
5125
- </file>
5126
- */
5127
-
5128
5132
  /*
5129
5133
  <file>
5130
5134
  Project: