@osovitny/anatoly 3.17.85 → 3.17.87

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.
Files changed (43) hide show
  1. package/esm2022/lib/billing/billing.module.mjs +17 -7
  2. package/esm2022/lib/billing/components/braintree/braintree.component.mjs +2 -2
  3. package/esm2022/lib/billing/components/exports.mjs +8 -5
  4. package/esm2022/lib/billing/components/index.mjs +7 -4
  5. package/esm2022/lib/billing/components/order-summary/order-summary.component.mjs +152 -0
  6. package/esm2022/lib/billing/components/payment-methods/payment-methods.component.mjs +105 -0
  7. package/esm2022/lib/billing/components/payment-options/payment-options.component.mjs +97 -0
  8. package/esm2022/lib/billing/components/stripe/stripe.component.mjs +2 -2
  9. package/esm2022/lib/billing/services/payments.service.mjs +2 -2
  10. package/esm2022/lib/billing/utils.mjs +2 -2
  11. package/esm2022/lib/core/consts/app-settings.mjs +2 -2
  12. package/esm2022/lib/core/consts/formats.mjs +2 -2
  13. package/esm2022/lib/core/consts/ga.mjs +2 -2
  14. package/esm2022/lib/core/consts/storageKeys.mjs +2 -2
  15. package/esm2022/lib/core/converts/dateConvert.mjs +1 -2
  16. package/esm2022/lib/core/enums/billing.mjs +2 -2
  17. package/esm2022/lib/core/enums/enums.mjs +2 -2
  18. package/esm2022/lib/iam/configs.mjs +1 -2
  19. package/esm2022/lib/iam/consts.mjs +1 -2
  20. package/esm2022/lib/ui/components/base/components/edit.component.mjs +5 -2
  21. package/esm2022/lib/ui/components/base/components/enum-edit.component.mjs +7 -1
  22. package/esm2022/lib/ui/dialogs/contact-us/contact-us.dialog.mjs +2 -3
  23. package/esm2022/lib/ui/dialogs/exports.mjs +1 -2
  24. package/esm2022/lib/ui/dialogs/index.mjs +1 -2
  25. package/esm2022/lib/ui/directives/exports.mjs +1 -2
  26. package/esm2022/lib/ui/directives/hover.directive.mjs +1 -2
  27. package/esm2022/lib/ui/directives/index.mjs +1 -2
  28. package/esm2022/lib/ui/directives/native-element.directive.mjs +1 -2
  29. package/esm2022/lib/ui/forms/exports.mjs +1 -2
  30. package/esm2022/lib/ui/forms/index.mjs +1 -2
  31. package/fesm2022/osovitny-anatoly.mjs +762 -426
  32. package/fesm2022/osovitny-anatoly.mjs.map +1 -1
  33. package/lib/billing/billing.module.d.ts +12 -8
  34. package/lib/billing/components/exports.d.ts +7 -4
  35. package/lib/billing/components/index.d.ts +2 -2
  36. package/lib/billing/components/order-summary/order-summary.component.d.ts +22 -0
  37. package/lib/billing/components/payment-methods/payment-methods.component.d.ts +20 -0
  38. package/lib/billing/components/payment-options/payment-options.component.d.ts +18 -0
  39. package/lib/ui/components/base/components/edit.component.d.ts +2 -1
  40. package/lib/ui/components/base/components/enum-edit.component.d.ts +2 -0
  41. package/lib/ui/components/index.d.ts +1 -1
  42. package/lib/ui/pipes/index.d.ts +1 -1
  43. package/package.json +1 -1
@@ -1,8 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Inject, EventEmitter, Output, Pipe, APP_INITIALIZER, Injector, NgModule, Component, Input, ChangeDetectionStrategy, ViewChild, ViewEncapsulation, Directive, HostBinding, HostListener, Optional, SkipSelf } from '@angular/core';
3
- import * as dropin from 'braintree-web-drop-in';
4
- import * as i2$1 from '@angular/forms';
5
- import { FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
6
3
  import js_beautify from 'js-beautify';
7
4
  import * as i1 from '@angular/router';
8
5
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
@@ -25,7 +22,10 @@ import * as i1$4 from 'ngx-toastr';
25
22
  import { ToastrModule } from 'ngx-toastr';
26
23
  import * as i1$5 from '@angular/platform-browser';
27
24
  import { v4 } from 'uuid';
28
- import * as i2 from '@progress/kendo-angular-dialog';
25
+ import * as i2 from '@angular/forms';
26
+ import { FormControl, Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
27
+ import * as dropin from 'braintree-web-drop-in';
28
+ import * as i2$1 from '@progress/kendo-angular-dialog';
29
29
  import { DialogsModule } from '@progress/kendo-angular-dialog';
30
30
  import { loadStripe } from '@stripe/stripe-js';
31
31
  import * as i1$6 from '@fortawesome/angular-fontawesome';
@@ -85,7 +85,7 @@ const ClientApps = AppCoreSettings?.clientApps;
85
85
  Created:
86
86
  1 Apr 2024
87
87
 
88
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
88
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
89
89
  </file>
90
90
  */
91
91
  function getAppSettingsById(id) {
@@ -127,7 +127,7 @@ const AppSettings = getAppSettingsByName(AppName);
127
127
  Created:
128
128
  1 Apr 2024
129
129
 
130
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
130
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
131
131
  </file>
132
132
  */
133
133
  const dateTimeFormats = {
@@ -153,7 +153,7 @@ const timeFormats = {
153
153
  Created:
154
154
  11 Nov 2024
155
155
 
156
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
156
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
157
157
  </file>
158
158
  */
159
159
  const GAEvents = {
@@ -494,7 +494,6 @@ function isValidTimezoneIANAString(timeZoneString) {
494
494
 
495
495
  Authors:
496
496
  Vadim Osovitny vadim.osovitny@osovitny.com
497
- Anatoly Osovitny anatoly.osovitny@osovitny.com
498
497
 
499
498
  Created:
500
499
  09 Feb 2024
@@ -592,7 +591,7 @@ class XmlFormatter {
592
591
  Created:
593
592
  11 Nov 2024
594
593
 
595
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
594
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
596
595
  </file>
597
596
  */
598
597
  var DiscountCodeType;
@@ -643,7 +642,7 @@ var PaymentStage;
643
642
  Created:
644
643
  11 Nov 2024
645
644
 
646
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
645
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
647
646
  </file>
648
647
  */
649
648
  var DataViewType;
@@ -861,7 +860,6 @@ class MSALRedirect {
861
860
 
862
861
  Authors:
863
862
  Vadim Osovitny vadim.osovitny@osovitny.com
864
- Anatoly Osovitny anatoly.osovitny@osovitny.com
865
863
 
866
864
  Created:
867
865
  20 Sep 2023
@@ -1068,7 +1066,7 @@ class Stopwatch {
1068
1066
  Created:
1069
1067
  28 Apr 2024
1070
1068
 
1071
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
1069
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1072
1070
  </file>
1073
1071
  */
1074
1072
  const AppContextStorageKeys = {
@@ -3729,210 +3727,6 @@ class ComponentBase {
3729
3727
  }] }); })();
3730
3728
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ComponentBase, { className: "ComponentBase", filePath: "lib\\ui\\components\\base\\components\\component.ts", lineNumber: 26 }); })();
3731
3729
 
3732
- /*
3733
- <file>
3734
- Project:
3735
- @osovitny/anatoly
3736
-
3737
- Authors:
3738
- Vadim Osovitny vadim.osovitny@osovitny.com
3739
- Anatoly Osovitny anatoly.osovitny@osovitny.com
3740
-
3741
- Created:
3742
- 20 Nov 2017
3743
-
3744
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3745
- </file>
3746
- */
3747
- //Node
3748
- class EditComponentBase extends ComponentBase {
3749
- constructor() {
3750
- super();
3751
- //Modes
3752
- this.isAddMode = false;
3753
- this.isEditMode = false;
3754
- this.formSubmitted = false;
3755
- this.controlName = null;
3756
- this.isEditMode = QSUtils.idExists();
3757
- this.isAddMode = !this.isEditMode;
3758
- }
3759
- isControlValid(name, frmGroup = null) {
3760
- return !this.isControlInvalid(name, frmGroup);
3761
- }
3762
- isControlInvalid(name, frmGroup = null) {
3763
- if (typeof name === "undefined" || name == "") {
3764
- return false;
3765
- }
3766
- let fg = frmGroup ? frmGroup : this.formGroup;
3767
- if (!fg) {
3768
- return false;
3769
- }
3770
- let control = fg.get(name);
3771
- if (control) {
3772
- return ((this.formSubmitted && control.invalid) || (control.touched && control.invalid));
3773
- }
3774
- return false;
3775
- }
3776
- //FormGroup functions
3777
- getFormValue(name, frmGroup = null) {
3778
- let fg = frmGroup ? frmGroup : this.formGroup;
3779
- return fg.controls[name].value;
3780
- }
3781
- setFormValue(name, value, frmGroup = null) {
3782
- let fg = frmGroup ? frmGroup : this.formGroup;
3783
- fg.controls[name].setValue(value);
3784
- }
3785
- getFormGroupValue(groupName, name, frmGroup = null) {
3786
- let fg = frmGroup ? frmGroup : this.formGroup;
3787
- return fg.controls[groupName].get(name).value;
3788
- }
3789
- setFormGroupValue(groupName, name, value, frmGroup = null) {
3790
- let fg = frmGroup ? frmGroup : this.formGroup;
3791
- fg.controls[groupName].get(name).setValue(value);
3792
- }
3793
- /**
3794
- * Add control to form group
3795
- * @param name
3796
- * @param formControl
3797
- * @param frmGroup
3798
- */
3799
- addControl(name, formControl, frmGroup = null) {
3800
- let fg = frmGroup ? frmGroup : this.formGroup;
3801
- fg.addControl(name, formControl);
3802
- }
3803
- /**
3804
- * Removes control from form group
3805
- * @param name
3806
- * @param frmGroup
3807
- */
3808
- removeControl(name, frmGroup = null) {
3809
- let fg = frmGroup ? frmGroup : this.formGroup;
3810
- if (fg.get(name)) {
3811
- fg.removeControl(name);
3812
- }
3813
- }
3814
- /**
3815
- * return new form control
3816
- * @param formState
3817
- * @param validatorOrOpts
3818
- * @param asyncValidator
3819
- */
3820
- createFormControl(formState, validatorOrOpts, asyncValidator) {
3821
- return new FormControl(formState, validatorOrOpts, asyncValidator);
3822
- }
3823
- /**
3824
- * Set error to control
3825
- * @param controlName formControl name
3826
- * @param err error expect {erroname: boolean} format
3827
- * @param frmGroup
3828
- */
3829
- setControlError(controlName, err, frmGroup = null) {
3830
- let fg = frmGroup ? frmGroup : this.formGroup;
3831
- fg.get(controlName)?.setErrors(err);
3832
- }
3833
- /**
3834
- * Set {invalid: true} for the specified form
3835
- * @param controlName form control name
3836
- * @param frmGroup
3837
- */
3838
- setInValidError(controlName, frmGroup = null) {
3839
- let fg = frmGroup ? frmGroup : this.formGroup;
3840
- fg.get(controlName)?.setErrors({ invalid: true });
3841
- }
3842
- /**
3843
- * returns formgroup controls.
3844
- * main use case is used in html pages
3845
- */
3846
- get fc() {
3847
- return this.formGroup.controls;
3848
- }
3849
- get isNgModelBased() {
3850
- return this.controlName == null;
3851
- }
3852
- static { this.ɵfac = function EditComponentBase_Factory(t) { return new (t || EditComponentBase)(); }; }
3853
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EditComponentBase, selectors: [["ng-component"]], inputs: { formGroup: "formGroup", formSubmitted: "formSubmitted", controlName: "controlName" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function EditComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
3854
- }
3855
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EditComponentBase, [{
3856
- type: Component,
3857
- args: [{
3858
- template: ''
3859
- }]
3860
- }], () => [], { formGroup: [{
3861
- type: Input
3862
- }], formSubmitted: [{
3863
- type: Input
3864
- }], controlName: [{
3865
- type: Input
3866
- }] }); })();
3867
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EditComponentBase, { className: "EditComponentBase", filePath: "lib\\ui\\components\\base\\components\\edit.component.ts", lineNumber: 28 }); })();
3868
-
3869
- /*
3870
- <file>
3871
- Project:
3872
- @osovitny/anatoly
3873
-
3874
- Authors:
3875
- Vadim Osovitny vadim.osovitny@osovitny.com
3876
- Anatoly Osovitny anatoly.osovitny@osovitny.com
3877
-
3878
- Created:
3879
- 24 Jan 2022
3880
-
3881
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3882
- </file>
3883
- */
3884
- //Node
3885
- class DialogBase extends EditComponentBase {
3886
- get isOpen() {
3887
- return this._isOpen;
3888
- }
3889
- set isOpen(value) {
3890
- if (value) {
3891
- if (this.osOnBeforeOpen) {
3892
- this.osOnBeforeOpen();
3893
- }
3894
- this.opened.emit();
3895
- }
3896
- this._isOpen = value;
3897
- }
3898
- constructor() {
3899
- super();
3900
- //Private
3901
- this._isOpen = false;
3902
- //Public
3903
- this.themeColor = "primary";
3904
- //Events
3905
- this.opened = new EventEmitter();
3906
- this.closed = new EventEmitter();
3907
- }
3908
- open() {
3909
- this.isOpen = true;
3910
- }
3911
- close(returnValue = "OK") {
3912
- this.isOpen = false;
3913
- this.closed.emit(returnValue);
3914
- }
3915
- cancel() {
3916
- this.isOpen = false;
3917
- this.closed.emit(-1);
3918
- }
3919
- static { this.ɵfac = function DialogBase_Factory(t) { return new (t || DialogBase)(); }; }
3920
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DialogBase, selectors: [["ng-component"]], inputs: { isOpen: "isOpen" }, outputs: { opened: "opened", closed: "closed" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function DialogBase_Template(rf, ctx) { }, encapsulation: 2 }); }
3921
- }
3922
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DialogBase, [{
3923
- type: Component,
3924
- args: [{
3925
- template: ''
3926
- }]
3927
- }], () => [], { isOpen: [{
3928
- type: Input
3929
- }], opened: [{
3930
- type: Output
3931
- }], closed: [{
3932
- type: Output
3933
- }] }); })();
3934
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DialogBase, { className: "DialogBase", filePath: "lib\\ui\\components\\base\\dialog.ts", lineNumber: 27 }); })();
3935
-
3936
3730
  /*
3937
3731
  <file>
3938
3732
  Project:
@@ -4001,162 +3795,731 @@ class PaymentsApiService extends ApiServiceBase {
4001
3795
 
4002
3796
  Authors:
4003
3797
  Vadim Osovitny vadim.osovitny@osovitny.com
4004
- Dhruv Agarwal dhruv.agarwal@osovitny.com
3798
+ Dhruv Agarwal dhruv.agarwal@osovitny.com
3799
+
3800
+ Created:
3801
+ 11 Aug 2024
3802
+
3803
+ Details:
3804
+ https://blog.thoughtram.io/angular/2017/02/21/using-zones-in-angular-for-better-performance.html
3805
+
3806
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3807
+ </file>
3808
+ */
3809
+ //Node
3810
+ class PaymentsService {
3811
+ constructor(zone, api, ns, ga) {
3812
+ this.zone = zone;
3813
+ this.api = api;
3814
+ this.ns = ns;
3815
+ this.ga = ga;
3816
+ this.paymentInProgress = false;
3817
+ this.isPaymentFailed = false;
3818
+ this.subtotal = 0;
3819
+ this.discountCode = null;
3820
+ this.discountPercentage = null;
3821
+ this.discountAmount = null;
3822
+ this.total = 0;
3823
+ this.currency = 'USD';
3824
+ //Private Streams
3825
+ this._discountCodeApplied = new Subject();
3826
+ this._paymentAdded = new Subject();
3827
+ this._showStripeDialog = new Subject();
3828
+ this._showBraintreeDialog = new Subject();
3829
+ //Public Streams
3830
+ this.discountCodeApplied$ = this._discountCodeApplied.asObservable();
3831
+ this.paymentAdded$ = this._paymentAdded.asObservable();
3832
+ this.showStripeDialog$ = this._showStripeDialog.asObservable();
3833
+ this.showBraintreeDialog$ = this._showBraintreeDialog.asObservable();
3834
+ }
3835
+ setDefaults() {
3836
+ }
3837
+ setValues() {
3838
+ }
3839
+ //fires
3840
+ fireDiscountCodeApplied() {
3841
+ this._discountCodeApplied.next(this.discountCode);
3842
+ }
3843
+ firePaymentAdded(paymentId) {
3844
+ this._paymentAdded.next(paymentId);
3845
+ }
3846
+ //Public
3847
+ init() {
3848
+ this.setDefaults();
3849
+ this.setValues();
3850
+ }
3851
+ resetState() {
3852
+ this.subtotal = 0;
3853
+ this.total = 0;
3854
+ }
3855
+ getTotal() {
3856
+ let subtotal = this.subtotal;
3857
+ if (this.discountAmount != 0) {
3858
+ subtotal = subtotal - this.discountAmount;
3859
+ }
3860
+ else if (this.discountPercentage != 0) {
3861
+ subtotal = subtotal - (subtotal * (this.discountPercentage / 100));
3862
+ subtotal = +subtotal.toFixed(2);
3863
+ }
3864
+ return subtotal > 0 ? subtotal : 0;
3865
+ }
3866
+ //DiscountCode
3867
+ applyDiscountCode(discountCode, data) {
3868
+ if (!data) {
3869
+ return;
3870
+ }
3871
+ this.discountCode = discountCode;
3872
+ if (data.amount) {
3873
+ this.discountPercentage = 0;
3874
+ this.discountAmount = parseInt(data.amount);
3875
+ }
3876
+ else if (data.percentage) {
3877
+ this.discountPercentage = parseInt(data.percentage);
3878
+ this.discountAmount = 0;
3879
+ }
3880
+ this.fireDiscountCodeApplied();
3881
+ }
3882
+ getDiscountCodeAsString() {
3883
+ if (this.discountAmount > 0) {
3884
+ return "$" + this.discountAmount;
3885
+ }
3886
+ else if (this.discountPercentage > 0) {
3887
+ return this.discountPercentage + "%";
3888
+ }
3889
+ return '$0';
3890
+ }
3891
+ openStripePaymentDialog() {
3892
+ this._showStripeDialog.next(true);
3893
+ }
3894
+ openBraintreePaymentDialog() {
3895
+ this._showBraintreeDialog.next(true);
3896
+ }
3897
+ closeBraintreePaymentDialog() {
3898
+ this._showBraintreeDialog.next(false);
3899
+ }
3900
+ createStripeSession(title, description, image) {
3901
+ const amount = this.getTotal();
3902
+ const currency = this.currency;
3903
+ return this.api.createStripeSession(amount, currency, title, description, image);
3904
+ }
3905
+ createBraintreeToken() {
3906
+ return this.api.createBraintreeToken();
3907
+ }
3908
+ pay(paidFor, payId, payStatus, payDetails) {
3909
+ //GA
3910
+ this.ga.event(GABillingEvents.payment);
3911
+ let paidForAsString = JSON.stringify(paidFor);
3912
+ let payType = this.selectedPaymentType;
3913
+ let payMethod = this.selectedPaymentMethod;
3914
+ //Amount
3915
+ let subtotal = this.subtotal;
3916
+ let promoCode = this.discountCode;
3917
+ let total = this.getTotal();
3918
+ let currency = this.currency;
3919
+ if (total == 0) {
3920
+ payMethod = PaymentMethod.None;
3921
+ }
3922
+ this.zone.run(() => {
3923
+ this.api.pay(paidForAsString, payMethod,
3924
+ //Amount
3925
+ subtotal, promoCode, total, currency,
3926
+ //Payment method details (PayPal/Stripe/Braintree)
3927
+ payId, payStatus, payDetails, (data) => {
3928
+ if (!data || !data?.isPaymentValid) {
3929
+ this.paymentFailed(PaymentStage.External);
3930
+ return;
3931
+ }
3932
+ if (payMethod == PaymentMethod.CreditCard) {
3933
+ //this.closeBraintreePaymentDialog();
3934
+ }
3935
+ this.paymentInProgress = false;
3936
+ this.firePaymentAdded(data.paymentId);
3937
+ }, () => {
3938
+ this.paymentFailed(PaymentStage.External);
3939
+ });
3940
+ });
3941
+ }
3942
+ paymentFailed(stage) {
3943
+ this.paymentStage = stage;
3944
+ this.paymentInProgress = false;
3945
+ this.isPaymentFailed = true;
3946
+ this.ns.error("Payment Failed");
3947
+ }
3948
+ static { this.ɵfac = function PaymentsService_Factory(t) { return new (t || PaymentsService)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(PaymentsApiService), i0.ɵɵinject(NotificationService), i0.ɵɵinject(GoogleAnalyticsService)); }; }
3949
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PaymentsService, factory: PaymentsService.ɵfac }); }
3950
+ }
3951
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentsService, [{
3952
+ type: Injectable
3953
+ }], () => [{ type: i0.NgZone }, { type: PaymentsApiService }, { type: NotificationService }, { type: GoogleAnalyticsService }], null); })();
3954
+
3955
+ /*
3956
+ <file>
3957
+ Project:
3958
+ @osovitny/anatoly
3959
+
3960
+ Authors:
3961
+ Vadim Osovitny vadim.osovitny@osovitny.com
3962
+
3963
+ Created:
3964
+ 4 Jun 2024
3965
+
3966
+ Copyright (c) 2017-2025 Osovitny Inc. All rights reserved.
3967
+ </file>
3968
+ */
3969
+ //Node
3970
+ class DiscountCodesApiService extends ApiServiceBase {
3971
+ constructor(http) {
3972
+ super(http);
3973
+ this.http = http;
3974
+ this.baseUrl = `${ApiUrl}/billing/discountCodes`;
3975
+ }
3976
+ getDiscountCode(code) {
3977
+ return this.get('getDiscountCode', { code });
3978
+ }
3979
+ static { this.ɵfac = function DiscountCodesApiService_Factory(t) { return new (t || DiscountCodesApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
3980
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DiscountCodesApiService, factory: DiscountCodesApiService.ɵfac }); }
3981
+ }
3982
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DiscountCodesApiService, [{
3983
+ type: Injectable
3984
+ }], () => [{ type: i1$1.HttpClient }], null); })();
3985
+
3986
+ /*
3987
+ <file>
3988
+ Project:
3989
+ @osovitny/anatoly
3990
+
3991
+ Authors:
3992
+ Vadim Osovitny vadim.osovitny@osovitny.com
3993
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
3994
+
3995
+ Created:
3996
+ 29 May 2024
3997
+
3998
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3999
+ </file>
4000
+ */
4001
+ //Node
4002
+ const _c0$h = a0 => ({ "show": a0 });
4003
+ function OrderSummaryComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
4004
+ const _r2 = i0.ɵɵgetCurrentView();
4005
+ i0.ɵɵelementStart(0, "div", 12)(1, "div", 13)(2, "input", 14);
4006
+ i0.ɵɵlistener("ngModelChange", function OrderSummaryComponent_Conditional_17_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.promoCode = $event); });
4007
+ i0.ɵɵelementEnd();
4008
+ i0.ɵɵelementStart(3, "button", 15);
4009
+ i0.ɵɵlistener("click", function OrderSummaryComponent_Conditional_17_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onApplyPromoCode()); });
4010
+ i0.ɵɵtext(4, "Apply");
4011
+ i0.ɵɵelementEnd()()();
4012
+ } if (rf & 2) {
4013
+ const ctx_r0 = i0.ɵɵnextContext();
4014
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0$h, ctx_r0.showPromoCode));
4015
+ i0.ɵɵadvance(2);
4016
+ i0.ɵɵproperty("ngModel", ctx_r0.promoCode);
4017
+ } }
4018
+ const _c1$1 = ["*"];
4019
+ class OrderSummaryComponent extends ComponentBase {
4020
+ constructor(ps, api, ns) {
4021
+ super();
4022
+ this.ps = ps;
4023
+ this.api = api;
4024
+ this.ns = ns;
4025
+ this.showPromoCode = false;
4026
+ }
4027
+ ngOnInit() {
4028
+ this.setDefaults();
4029
+ this.setValues();
4030
+ }
4031
+ setDefaults() { }
4032
+ setValues() { }
4033
+ //Tos
4034
+ toTotal() {
4035
+ return this.ps.getTotal();
4036
+ }
4037
+ //Events
4038
+ onTogglePromoCode() {
4039
+ this.showPromoCode = !this.showPromoCode;
4040
+ }
4041
+ onApplyPromoCode() {
4042
+ if (!this.promoCode) {
4043
+ this.ns.info("Please enter a promo code");
4044
+ return;
4045
+ }
4046
+ this.api.getDiscountCode(this.promoCode).subscribe({
4047
+ next: (data) => {
4048
+ if (!data) {
4049
+ this.ns.error("Invalid Promo Code");
4050
+ return;
4051
+ }
4052
+ switch (data.status) {
4053
+ case DiscountCodeStatus.Exist:
4054
+ this.ps.applyDiscountCode(this.promoCode, data.code);
4055
+ this.discount = this.ps.getDiscountCodeAsString();
4056
+ this.ns.success("Discount applied successfully");
4057
+ break;
4058
+ case DiscountCodeStatus.NotFound:
4059
+ this.ns.error("Invalid Promo Code");
4060
+ break;
4061
+ case DiscountCodeStatus.AlreadyUsed:
4062
+ this.ns.error("Promo Code already applied");
4063
+ break;
4064
+ default:
4065
+ this.ns.error("Invalid Promo Code");
4066
+ break;
4067
+ }
4068
+ },
4069
+ error: (e) => {
4070
+ this.ns.error();
4071
+ },
4072
+ });
4073
+ }
4074
+ static { this.ɵfac = function OrderSummaryComponent_Factory(t) { return new (t || OrderSummaryComponent)(i0.ɵɵdirectiveInject(PaymentsService), i0.ɵɵdirectiveInject(DiscountCodesApiService), i0.ɵɵdirectiveInject(NotificationService)); }; }
4075
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OrderSummaryComponent, selectors: [["anatoly-billing-order-summary"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1$1, decls: 30, vars: 7, consts: [[1, "card"], [1, "card-header"], [1, "card-title"], [1, "card-body"], [1, "order-summary"], [1, "subtotal"], [1, "divider"], [1, "add-promo-code", 3, "ngClass", "click"], [1, "has-arrow"], ["class", "add-promo-code", 3, "ngClass"], [1, "discounts"], [1, "total"], [1, "add-promo-code", 3, "ngClass"], [1, "promo-code"], ["type", "text", "placeholder", "Promo code", 1, "input-text", 3, "ngModel", "ngModelChange"], [1, "btn", 3, "click"]], template: function OrderSummaryComponent_Template(rf, ctx) { if (rf & 1) {
4076
+ i0.ɵɵprojectionDef();
4077
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h2");
4078
+ i0.ɵɵtext(4, "Order Summary");
4079
+ i0.ɵɵelementEnd()()();
4080
+ i0.ɵɵelementStart(5, "div", 3)(6, "div", 4);
4081
+ i0.ɵɵprojection(7);
4082
+ i0.ɵɵelementStart(8, "div", 5)(9, "span");
4083
+ i0.ɵɵtext(10, "Subtotal:");
4084
+ i0.ɵɵelementEnd();
4085
+ i0.ɵɵelementStart(11, "strong");
4086
+ i0.ɵɵtext(12);
4087
+ i0.ɵɵelementEnd()();
4088
+ i0.ɵɵelement(13, "div", 6);
4089
+ i0.ɵɵelementStart(14, "div", 7);
4090
+ i0.ɵɵlistener("click", function OrderSummaryComponent_Template_div_click_14_listener() { return ctx.onTogglePromoCode(); });
4091
+ i0.ɵɵelementStart(15, "span", 8);
4092
+ i0.ɵɵtext(16, "Add a Promo Code:");
4093
+ i0.ɵɵelementEnd()();
4094
+ i0.ɵɵtemplate(17, OrderSummaryComponent_Conditional_17_Template, 5, 4, "div", 9);
4095
+ i0.ɵɵelement(18, "div", 6);
4096
+ i0.ɵɵelementStart(19, "div", 10)(20, "span");
4097
+ i0.ɵɵtext(21, "Discounts & Savings:");
4098
+ i0.ɵɵelementEnd();
4099
+ i0.ɵɵelementStart(22, "strong");
4100
+ i0.ɵɵtext(23);
4101
+ i0.ɵɵelementEnd()();
4102
+ i0.ɵɵelement(24, "div", 6);
4103
+ i0.ɵɵelementStart(25, "div", 11)(26, "span");
4104
+ i0.ɵɵtext(27, "Total:");
4105
+ i0.ɵɵelementEnd();
4106
+ i0.ɵɵelementStart(28, "strong");
4107
+ i0.ɵɵtext(29);
4108
+ i0.ɵɵelementEnd()()()()();
4109
+ } if (rf & 2) {
4110
+ i0.ɵɵadvance(12);
4111
+ i0.ɵɵtextInterpolate1("$", ctx.ps.subtotal, "");
4112
+ i0.ɵɵadvance(2);
4113
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$h, ctx.showPromoCode));
4114
+ i0.ɵɵadvance(3);
4115
+ i0.ɵɵconditional(17, ctx.showPromoCode ? 17 : -1);
4116
+ i0.ɵɵadvance(6);
4117
+ i0.ɵɵtextInterpolate(ctx.discount);
4118
+ i0.ɵɵadvance(6);
4119
+ i0.ɵɵtextInterpolate1("$", ctx.toTotal(), "");
4120
+ } }, dependencies: [i1$2.NgClass, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel], encapsulation: 2 }); }
4121
+ }
4122
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrderSummaryComponent, [{
4123
+ type: Component,
4124
+ args: [{ selector: "anatoly-billing-order-summary", template: "<div class='card'>\r\n <div class='card-header'>\r\n <div class='card-title'>\r\n <h2>Order Summary</h2>\r\n </div>\r\n </div>\r\n <div class='card-body'>\r\n <div class='order-summary'>\r\n <ng-content></ng-content>\r\n\r\n <div class='subtotal'>\r\n <span>Subtotal:</span><strong>${{ ps.subtotal }}</strong>\r\n </div>\r\n <div class='divider'></div>\r\n <div class=\"add-promo-code\" [ngClass]=\"{ 'show': showPromoCode }\" (click)=\"onTogglePromoCode()\">\r\n <span class='has-arrow'>Add a Promo Code:</span>\r\n </div>\r\n\r\n @if (showPromoCode) {\r\n <div class=\"add-promo-code\" [ngClass]=\"{ 'show': showPromoCode }\">\r\n <div class=\"promo-code\">\r\n <input type=\"text\" [(ngModel)]=\"promoCode\" class=\"input-text\" placeholder=\"Promo code\">\r\n <button class=\"btn\" (click)=\"onApplyPromoCode()\">Apply</button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class='divider'></div>\r\n <div class='discounts'>\r\n <span>Discounts & Savings:</span>\r\n <strong>{{ discount }}</strong>\r\n </div>\r\n <div class='divider'></div>\r\n <div class='total'>\r\n <span>Total:</span>\r\n <strong>${{ toTotal() }}</strong>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
4125
+ }], () => [{ type: PaymentsService }, { type: DiscountCodesApiService }, { type: NotificationService }], null); })();
4126
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OrderSummaryComponent, { className: "OrderSummaryComponent", filePath: "lib\\billing\\components\\order-summary\\order-summary.component.ts", lineNumber: 31 }); })();
4127
+
4128
+ /*
4129
+ <file>
4130
+ Project:
4131
+ @osovitny/anatoly
4132
+
4133
+ Authors:
4134
+ Vadim Osovitny vadim.osovitny@osovitny.com
4135
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
4136
+
4137
+ Created:
4138
+ 29 May 2024
4139
+
4140
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4141
+ </file>
4142
+ */
4143
+ //Node
4144
+ function PaymentMethodsComponent_For_9_Template(rf, ctx) { if (rf & 1) {
4145
+ const _r7 = i0.ɵɵgetCurrentView();
4146
+ i0.ɵɵelementStart(0, "li", 5);
4147
+ i0.ɵɵlistener("click", function PaymentMethodsComponent_For_9_Template_li_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r7); const item_r1 = restoredCtx.$implicit; const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.onPaymentSelect(item_r1)); });
4148
+ i0.ɵɵelementStart(1, "div", 6);
4149
+ i0.ɵɵtext(2);
4150
+ i0.ɵɵelementEnd();
4151
+ i0.ɵɵelementStart(3, "div", 7);
4152
+ i0.ɵɵelement(4, "img", 8);
4153
+ i0.ɵɵelementEnd()();
4154
+ } if (rf & 2) {
4155
+ const item_r1 = ctx.$implicit;
4156
+ i0.ɵɵclassProp("selected", item_r1.selected);
4157
+ i0.ɵɵadvance(2);
4158
+ i0.ɵɵtextInterpolate1("Pay with ", item_r1.title, "");
4159
+ i0.ɵɵadvance(2);
4160
+ i0.ɵɵpropertyInterpolate1("src", "./dist/@lib/images/payment-icons/", item_r1.icon, ".png", i0.ɵɵsanitizeUrl)("alt", "payment-icon ", item_r1.title, "");
4161
+ } }
4162
+ class PaymentMethodsComponent extends ComponentBase {
4163
+ constructor(ps) {
4164
+ super();
4165
+ this.ps = ps;
4166
+ this.paymentMethods = [
4167
+ { id: PaymentMethod.CreditCard, title: "", icon: "cards", selected: true },
4168
+ { id: PaymentMethod.PayPal, title: "", icon: "paypal", selected: false },
4169
+ { id: PaymentMethod.Stripe, title: "", icon: "stripe", selected: false },
4170
+ { id: PaymentMethod.Venmo, title: "", icon: "venmo", selected: false },
4171
+ {
4172
+ id: PaymentMethod.ApplePay,
4173
+ title: "",
4174
+ icon: "applepay",
4175
+ selected: false,
4176
+ },
4177
+ {
4178
+ id: PaymentMethod.GooglePay,
4179
+ title: "",
4180
+ icon: "googlepay",
4181
+ selected: false,
4182
+ },
4183
+ {
4184
+ id: PaymentMethod.DigitalWallet,
4185
+ title: "",
4186
+ icon: "wallet",
4187
+ selected: false,
4188
+ },
4189
+ ];
4190
+ }
4191
+ ngOnInit() {
4192
+ this.setDefaults();
4193
+ this.setValues();
4194
+ }
4195
+ setDefaults() {
4196
+ let selectedPM = this.paymentMethods.filter((value) => value.selected == true)[0];
4197
+ this.ps.selectedPaymentMethod = selectedPM.id;
4198
+ }
4199
+ setValues() { }
4200
+ //Events
4201
+ onPaymentSelect(paymentMethod) {
4202
+ //1. Unselect items
4203
+ this.paymentMethods.forEach((payment) => (payment.selected = false));
4204
+ //2. Set selected PaymentMethod
4205
+ paymentMethod.selected = true;
4206
+ this.ps.selectedPaymentMethod = paymentMethod.id;
4207
+ }
4208
+ static { this.ɵfac = function PaymentMethodsComponent_Factory(t) { return new (t || PaymentMethodsComponent)(i0.ɵɵdirectiveInject(PaymentsService)); }; }
4209
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaymentMethodsComponent, selectors: [["anatoly-billing-payment-methods"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 10, vars: 0, consts: [[1, "card", "p-0", "mb-3"], [1, "card-header"], [1, "card-title"], [1, "card-body"], [1, "payment__select-method"], [3, "click"], [1, "payment-name"], [1, "icon-img"], [3, "src", "alt"], [3, "selected"]], template: function PaymentMethodsComponent_Template(rf, ctx) { if (rf & 1) {
4210
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h2");
4211
+ i0.ɵɵtext(4, "Select a payment method");
4212
+ i0.ɵɵelementEnd()()();
4213
+ i0.ɵɵelementStart(5, "div", 3)(6, "div", 4)(7, "ul");
4214
+ i0.ɵɵrepeaterCreate(8, PaymentMethodsComponent_For_9_Template, 5, 5, "li", 9, i0.ɵɵrepeaterTrackByIdentity);
4215
+ i0.ɵɵelementEnd()()()();
4216
+ } if (rf & 2) {
4217
+ i0.ɵɵadvance(8);
4218
+ i0.ɵɵrepeater(ctx.paymentMethods);
4219
+ } }, encapsulation: 2 }); }
4220
+ }
4221
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentMethodsComponent, [{
4222
+ type: Component,
4223
+ args: [{ selector: "anatoly-billing-payment-methods", template: "<div class='card p-0 mb-3'>\r\n <div class='card-header'>\r\n <div class='card-title'>\r\n <h2>Select a payment method</h2>\r\n </div>\r\n </div>\r\n <div class='card-body'>\r\n <div class='payment__select-method'>\r\n <ul>\r\n @for (item of paymentMethods; track item) {\r\n <li (click)='onPaymentSelect(item)' [class.selected]='item.selected'>\r\n <div class='payment-name'>Pay with {{ item.title }}</div>\r\n <div class='icon-img'>\r\n <img src='./dist/@lib/images/payment-icons/{{item.icon}}.png' alt='payment-icon {{item.title}}'>\r\n </div>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
4224
+ }], () => [{ type: PaymentsService }], null); })();
4225
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaymentMethodsComponent, { className: "PaymentMethodsComponent", filePath: "lib\\billing\\components\\payment-methods\\payment-methods.component.ts", lineNumber: 29 }); })();
4226
+
4227
+ /*
4228
+ <file>
4229
+ Project:
4230
+ @osovitny/anatoly
4231
+
4232
+ Authors:
4233
+ Vadim Osovitny vadim.osovitny@osovitny.com
4234
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
4235
+
4236
+ Created:
4237
+ 29 May 2024
4238
+
4239
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4240
+ </file>
4241
+ */
4242
+ //Node
4243
+ const _c0$g = a0 => ({ "active": a0 });
4244
+ class PaymentOptionsComponent extends ComponentBase {
4245
+ constructor(ps) {
4246
+ super();
4247
+ this.ps = ps;
4248
+ this.change = new EventEmitter();
4249
+ }
4250
+ ngOnInit() {
4251
+ this.setDefaults();
4252
+ this.setValues();
4253
+ }
4254
+ setDefaults() {
4255
+ this.ps.selectedPaymentType = PaymentType.FullPayment;
4256
+ }
4257
+ setValues() { }
4258
+ //Events
4259
+ onPaymentTypeSelect(pt) {
4260
+ this.ps.selectedPaymentType = pt;
4261
+ this.change.emit();
4262
+ }
4263
+ static { this.ɵfac = function PaymentOptionsComponent_Factory(t) { return new (t || PaymentOptionsComponent)(i0.ɵɵdirectiveInject(PaymentsService)); }; }
4264
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaymentOptionsComponent, selectors: [["anatoly-billing-payment-options"]], inputs: { priceWeekly: "priceWeekly", priceUpfront: "priceUpfront", numberOfWeeks: "numberOfWeeks" }, outputs: { change: "change" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 19, vars: 9, consts: [[1, "payment-options"], [1, "pay-weekly", 3, "ngClass", "click"], [1, "info"], [1, "price"], [1, "pay-upfront", 3, "ngClass", "click"]], template: function PaymentOptionsComponent_Template(rf, ctx) { if (rf & 1) {
4265
+ i0.ɵɵelementStart(0, "div", 0)(1, "h4");
4266
+ i0.ɵɵtext(2, "Payment options");
4267
+ i0.ɵɵelementEnd();
4268
+ i0.ɵɵelementStart(3, "div", 1);
4269
+ i0.ɵɵlistener("click", function PaymentOptionsComponent_Template_div_click_3_listener() { return ctx.onPaymentTypeSelect(2); });
4270
+ i0.ɵɵelementStart(4, "div", 2)(5, "h4");
4271
+ i0.ɵɵtext(6, "Pay weekly");
4272
+ i0.ɵɵelementEnd();
4273
+ i0.ɵɵelementStart(7, "p");
4274
+ i0.ɵɵtext(8, "Cancel anytime");
4275
+ i0.ɵɵelementEnd()();
4276
+ i0.ɵɵelementStart(9, "div", 3);
4277
+ i0.ɵɵtext(10);
4278
+ i0.ɵɵelementEnd()();
4279
+ i0.ɵɵelementStart(11, "div", 4);
4280
+ i0.ɵɵlistener("click", function PaymentOptionsComponent_Template_div_click_11_listener() { return ctx.onPaymentTypeSelect(1); });
4281
+ i0.ɵɵelementStart(12, "div", 2)(13, "h4");
4282
+ i0.ɵɵtext(14, "Pay upfront");
4283
+ i0.ɵɵelementEnd();
4284
+ i0.ɵɵelementStart(15, "p");
4285
+ i0.ɵɵtext(16);
4286
+ i0.ɵɵelementEnd()();
4287
+ i0.ɵɵelementStart(17, "div", 3);
4288
+ i0.ɵɵtext(18);
4289
+ i0.ɵɵelementEnd()()();
4290
+ } if (rf & 2) {
4291
+ i0.ɵɵadvance(3);
4292
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$g, ctx.ps.selectedPaymentType == 2));
4293
+ i0.ɵɵadvance(7);
4294
+ i0.ɵɵtextInterpolate1("$", ctx.priceWeekly, "");
4295
+ i0.ɵɵadvance();
4296
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$g, ctx.ps.selectedPaymentType == 1));
4297
+ i0.ɵɵadvance(5);
4298
+ i0.ɵɵtextInterpolate1("Covers the full ", ctx.numberOfWeeks, " weeks ");
4299
+ i0.ɵɵadvance(2);
4300
+ i0.ɵɵtextInterpolate1("$", ctx.priceUpfront, "");
4301
+ } }, dependencies: [i1$2.NgClass], encapsulation: 2 }); }
4302
+ }
4303
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentOptionsComponent, [{
4304
+ type: Component,
4305
+ args: [{ selector: "anatoly-billing-payment-options", template: "<div class='payment-options'>\r\n <h4>Payment options</h4>\r\n <div (click)='onPaymentTypeSelect(2)' [ngClass]='{\"active\": ps.selectedPaymentType == 2 }' class='pay-weekly'>\r\n <div class='info'>\r\n <h4>Pay weekly</h4>\r\n <p>Cancel anytime</p>\r\n </div>\r\n <div class='price'>${{ priceWeekly }}</div>\r\n </div>\r\n\r\n <div (click)='onPaymentTypeSelect(1)' [ngClass]='{\"active\": ps.selectedPaymentType == 1 }' class='pay-upfront'>\r\n <div class='info'>\r\n <h4>Pay upfront</h4>\r\n <p>Covers the full {{ numberOfWeeks }} weeks </p>\r\n </div>\r\n <div class='price'>${{ priceUpfront }}</div>\r\n </div>\r\n</div>\r\n" }]
4306
+ }], () => [{ type: PaymentsService }], { priceWeekly: [{
4307
+ type: Input
4308
+ }], priceUpfront: [{
4309
+ type: Input
4310
+ }], numberOfWeeks: [{
4311
+ type: Input
4312
+ }], change: [{
4313
+ type: Output
4314
+ }] }); })();
4315
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaymentOptionsComponent, { className: "PaymentOptionsComponent", filePath: "lib\\billing\\components\\payment-options\\payment-options.component.ts", lineNumber: 29 }); })();
4316
+
4317
+ /*
4318
+ <file>
4319
+ Project:
4320
+ @osovitny/anatoly
4321
+
4322
+ Authors:
4323
+ Vadim Osovitny vadim.osovitny@osovitny.com
4324
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
4325
+
4326
+ Created:
4327
+ 20 Nov 2017
4328
+
4329
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4330
+ </file>
4331
+ */
4332
+ //Node
4333
+ class EditComponentBase extends ComponentBase {
4334
+ constructor() {
4335
+ super();
4336
+ //Modes
4337
+ this.isAddMode = false;
4338
+ this.isEditMode = false;
4339
+ this.formSubmitted = false;
4340
+ this.controlName = null;
4341
+ this.controlTitle = null;
4342
+ this.isEditMode = QSUtils.idExists();
4343
+ this.isAddMode = !this.isEditMode;
4344
+ }
4345
+ isControlValid(name, frmGroup = null) {
4346
+ return !this.isControlInvalid(name, frmGroup);
4347
+ }
4348
+ isControlInvalid(name, frmGroup = null) {
4349
+ if (typeof name === "undefined" || name == "") {
4350
+ return false;
4351
+ }
4352
+ let fg = frmGroup ? frmGroup : this.formGroup;
4353
+ if (!fg) {
4354
+ return false;
4355
+ }
4356
+ let control = fg.get(name);
4357
+ if (control) {
4358
+ return ((this.formSubmitted && control.invalid) || (control.touched && control.invalid));
4359
+ }
4360
+ return false;
4361
+ }
4362
+ //FormGroup functions
4363
+ getFormValue(name, frmGroup = null) {
4364
+ let fg = frmGroup ? frmGroup : this.formGroup;
4365
+ return fg.controls[name].value;
4366
+ }
4367
+ setFormValue(name, value, frmGroup = null) {
4368
+ let fg = frmGroup ? frmGroup : this.formGroup;
4369
+ fg.controls[name].setValue(value);
4370
+ }
4371
+ getFormGroupValue(groupName, name, frmGroup = null) {
4372
+ let fg = frmGroup ? frmGroup : this.formGroup;
4373
+ return fg.controls[groupName].get(name).value;
4374
+ }
4375
+ setFormGroupValue(groupName, name, value, frmGroup = null) {
4376
+ let fg = frmGroup ? frmGroup : this.formGroup;
4377
+ fg.controls[groupName].get(name).setValue(value);
4378
+ }
4379
+ /**
4380
+ * Add control to form group
4381
+ * @param name
4382
+ * @param formControl
4383
+ * @param frmGroup
4384
+ */
4385
+ addControl(name, formControl, frmGroup = null) {
4386
+ let fg = frmGroup ? frmGroup : this.formGroup;
4387
+ fg.addControl(name, formControl);
4388
+ }
4389
+ /**
4390
+ * Removes control from form group
4391
+ * @param name
4392
+ * @param frmGroup
4393
+ */
4394
+ removeControl(name, frmGroup = null) {
4395
+ let fg = frmGroup ? frmGroup : this.formGroup;
4396
+ if (fg.get(name)) {
4397
+ fg.removeControl(name);
4398
+ }
4399
+ }
4400
+ /**
4401
+ * return new form control
4402
+ * @param formState
4403
+ * @param validatorOrOpts
4404
+ * @param asyncValidator
4405
+ */
4406
+ createFormControl(formState, validatorOrOpts, asyncValidator) {
4407
+ return new FormControl(formState, validatorOrOpts, asyncValidator);
4408
+ }
4409
+ /**
4410
+ * Set error to control
4411
+ * @param controlName formControl name
4412
+ * @param err error expect {erroname: boolean} format
4413
+ * @param frmGroup
4414
+ */
4415
+ setControlError(controlName, err, frmGroup = null) {
4416
+ let fg = frmGroup ? frmGroup : this.formGroup;
4417
+ fg.get(controlName)?.setErrors(err);
4418
+ }
4419
+ /**
4420
+ * Set {invalid: true} for the specified form
4421
+ * @param controlName form control name
4422
+ * @param frmGroup
4423
+ */
4424
+ setInValidError(controlName, frmGroup = null) {
4425
+ let fg = frmGroup ? frmGroup : this.formGroup;
4426
+ fg.get(controlName)?.setErrors({ invalid: true });
4427
+ }
4428
+ /**
4429
+ * returns formgroup controls.
4430
+ * main use case is used in html pages
4431
+ */
4432
+ get fc() {
4433
+ return this.formGroup.controls;
4434
+ }
4435
+ get isNgModelBased() {
4436
+ return this.controlName == null;
4437
+ }
4438
+ static { this.ɵfac = function EditComponentBase_Factory(t) { return new (t || EditComponentBase)(); }; }
4439
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EditComponentBase, selectors: [["ng-component"]], inputs: { formGroup: "formGroup", formSubmitted: "formSubmitted", controlName: "controlName", controlTitle: "controlTitle" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function EditComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
4440
+ }
4441
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EditComponentBase, [{
4442
+ type: Component,
4443
+ args: [{
4444
+ template: ''
4445
+ }]
4446
+ }], () => [], { formGroup: [{
4447
+ type: Input
4448
+ }], formSubmitted: [{
4449
+ type: Input
4450
+ }], controlName: [{
4451
+ type: Input
4452
+ }], controlTitle: [{
4453
+ type: Input
4454
+ }] }); })();
4455
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EditComponentBase, { className: "EditComponentBase", filePath: "lib\\ui\\components\\base\\components\\edit.component.ts", lineNumber: 28 }); })();
4456
+
4457
+ /*
4458
+ <file>
4459
+ Project:
4460
+ @osovitny/anatoly
4461
+
4462
+ Authors:
4463
+ Vadim Osovitny vadim.osovitny@osovitny.com
4464
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
4005
4465
 
4006
4466
  Created:
4007
- 11 Aug 2024
4008
-
4009
- Details:
4010
- https://blog.thoughtram.io/angular/2017/02/21/using-zones-in-angular-for-better-performance.html
4467
+ 24 Jan 2022
4011
4468
 
4012
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
4469
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4013
4470
  </file>
4014
4471
  */
4015
4472
  //Node
4016
- class PaymentsService {
4017
- constructor(zone, api, ns, ga) {
4018
- this.zone = zone;
4019
- this.api = api;
4020
- this.ns = ns;
4021
- this.ga = ga;
4022
- this.paymentInProgress = false;
4023
- this.isPaymentFailed = false;
4024
- this.subtotal = 0;
4025
- this.discountCode = null;
4026
- this.discountPercentage = null;
4027
- this.discountAmount = null;
4028
- this.total = 0;
4029
- this.currency = 'USD';
4030
- //Private Streams
4031
- this._discountCodeApplied = new Subject();
4032
- this._paymentAdded = new Subject();
4033
- this._showStripeDialog = new Subject();
4034
- this._showBraintreeDialog = new Subject();
4035
- //Public Streams
4036
- this.discountCodeApplied$ = this._discountCodeApplied.asObservable();
4037
- this.paymentAdded$ = this._paymentAdded.asObservable();
4038
- this.showStripeDialog$ = this._showStripeDialog.asObservable();
4039
- this.showBraintreeDialog$ = this._showBraintreeDialog.asObservable();
4040
- }
4041
- setDefaults() {
4042
- }
4043
- setValues() {
4044
- }
4045
- //fires
4046
- fireDiscountCodeApplied() {
4047
- this._discountCodeApplied.next(this.discountCode);
4048
- }
4049
- firePaymentAdded(paymentId) {
4050
- this._paymentAdded.next(paymentId);
4051
- }
4052
- //Public
4053
- init() {
4054
- this.setDefaults();
4055
- this.setValues();
4056
- }
4057
- resetState() {
4058
- this.subtotal = 0;
4059
- this.total = 0;
4060
- }
4061
- getTotal() {
4062
- let subtotal = this.subtotal;
4063
- if (this.discountAmount != 0) {
4064
- subtotal = subtotal - this.discountAmount;
4065
- }
4066
- else if (this.discountPercentage != 0) {
4067
- subtotal = subtotal - (subtotal * (this.discountPercentage / 100));
4068
- subtotal = +subtotal.toFixed(2);
4069
- }
4070
- return subtotal > 0 ? subtotal : 0;
4071
- }
4072
- //DiscountCode
4073
- applyDiscountCode(discountCode, data) {
4074
- if (!data) {
4075
- return;
4076
- }
4077
- this.discountCode = discountCode;
4078
- if (data.amount) {
4079
- this.discountPercentage = 0;
4080
- this.discountAmount = parseInt(data.amount);
4081
- }
4082
- else if (data.percentage) {
4083
- this.discountPercentage = parseInt(data.percentage);
4084
- this.discountAmount = 0;
4085
- }
4086
- this.fireDiscountCodeApplied();
4473
+ class DialogBase extends EditComponentBase {
4474
+ get isOpen() {
4475
+ return this._isOpen;
4087
4476
  }
4088
- getDiscountCodeAsString() {
4089
- if (this.discountAmount > 0) {
4090
- return "$" + this.discountAmount;
4091
- }
4092
- else if (this.discountPercentage > 0) {
4093
- return this.discountPercentage + "%";
4477
+ set isOpen(value) {
4478
+ if (value) {
4479
+ if (this.osOnBeforeOpen) {
4480
+ this.osOnBeforeOpen();
4481
+ }
4482
+ this.opened.emit();
4094
4483
  }
4095
- return '$0';
4096
- }
4097
- openStripePaymentDialog() {
4098
- this._showStripeDialog.next(true);
4099
- }
4100
- openBraintreePaymentDialog() {
4101
- this._showBraintreeDialog.next(true);
4102
- }
4103
- closeBraintreePaymentDialog() {
4104
- this._showBraintreeDialog.next(false);
4484
+ this._isOpen = value;
4105
4485
  }
4106
- createStripeSession(title, description, image) {
4107
- const amount = this.getTotal();
4108
- const currency = this.currency;
4109
- return this.api.createStripeSession(amount, currency, title, description, image);
4486
+ constructor() {
4487
+ super();
4488
+ //Private
4489
+ this._isOpen = false;
4490
+ //Public
4491
+ this.themeColor = "primary";
4492
+ //Events
4493
+ this.opened = new EventEmitter();
4494
+ this.closed = new EventEmitter();
4110
4495
  }
4111
- createBraintreeToken() {
4112
- return this.api.createBraintreeToken();
4496
+ open() {
4497
+ this.isOpen = true;
4113
4498
  }
4114
- pay(paidFor, payId, payStatus, payDetails) {
4115
- //GA
4116
- this.ga.event(GABillingEvents.payment);
4117
- let paidForAsString = JSON.stringify(paidFor);
4118
- let payType = this.selectedPaymentType;
4119
- let payMethod = this.selectedPaymentMethod;
4120
- //Amount
4121
- let subtotal = this.subtotal;
4122
- let promoCode = this.discountCode;
4123
- let total = this.getTotal();
4124
- let currency = this.currency;
4125
- if (total == 0) {
4126
- payMethod = PaymentMethod.None;
4127
- }
4128
- this.zone.run(() => {
4129
- this.api.pay(paidForAsString, payMethod,
4130
- //Amount
4131
- subtotal, promoCode, total, currency,
4132
- //Payment method details (PayPal/Stripe/Braintree)
4133
- payId, payStatus, payDetails, (data) => {
4134
- if (!data || !data?.isPaymentValid) {
4135
- this.paymentFailed(PaymentStage.External);
4136
- return;
4137
- }
4138
- if (payMethod == PaymentMethod.CreditCard) {
4139
- //this.closeBraintreePaymentDialog();
4140
- }
4141
- this.paymentInProgress = false;
4142
- this.firePaymentAdded(data.paymentId);
4143
- }, () => {
4144
- this.paymentFailed(PaymentStage.External);
4145
- });
4146
- });
4499
+ close(returnValue = "OK") {
4500
+ this.isOpen = false;
4501
+ this.closed.emit(returnValue);
4147
4502
  }
4148
- paymentFailed(stage) {
4149
- this.paymentStage = stage;
4150
- this.paymentInProgress = false;
4151
- this.isPaymentFailed = true;
4152
- this.ns.error("Payment Failed");
4503
+ cancel() {
4504
+ this.isOpen = false;
4505
+ this.closed.emit(-1);
4153
4506
  }
4154
- static { this.ɵfac = function PaymentsService_Factory(t) { return new (t || PaymentsService)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(PaymentsApiService), i0.ɵɵinject(NotificationService), i0.ɵɵinject(GoogleAnalyticsService)); }; }
4155
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PaymentsService, factory: PaymentsService.ɵfac }); }
4507
+ static { this.ɵfac = function DialogBase_Factory(t) { return new (t || DialogBase)(); }; }
4508
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DialogBase, selectors: [["ng-component"]], inputs: { isOpen: "isOpen" }, outputs: { opened: "opened", closed: "closed" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function DialogBase_Template(rf, ctx) { }, encapsulation: 2 }); }
4156
4509
  }
4157
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentsService, [{
4158
- type: Injectable
4159
- }], () => [{ type: i0.NgZone }, { type: PaymentsApiService }, { type: NotificationService }, { type: GoogleAnalyticsService }], null); })();
4510
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DialogBase, [{
4511
+ type: Component,
4512
+ args: [{
4513
+ template: ''
4514
+ }]
4515
+ }], () => [], { isOpen: [{
4516
+ type: Input
4517
+ }], opened: [{
4518
+ type: Output
4519
+ }], closed: [{
4520
+ type: Output
4521
+ }] }); })();
4522
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DialogBase, { className: "DialogBase", filePath: "lib\\ui\\components\\base\\dialog.ts", lineNumber: 27 }); })();
4160
4523
 
4161
4524
  /*
4162
4525
  <file>
@@ -4172,7 +4535,7 @@ class PaymentsService {
4172
4535
  Description:
4173
4536
  Credit Card payment form via braintree integration
4174
4537
 
4175
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
4538
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4176
4539
  </file>
4177
4540
  */
4178
4541
  //Node
@@ -4289,7 +4652,7 @@ class BraintreeDialog extends DialogBase {
4289
4652
  i0.ɵɵtemplate(0, BraintreeDialog_Conditional_0_Template, 11, 3, "div", 0);
4290
4653
  } if (rf & 2) {
4291
4654
  i0.ɵɵconditional(0, ctx.visible ? 0 : -1);
4292
- } }, dependencies: [i2.DialogComponent, i2.DialogTitleBarComponent, i2.DialogActionsComponent], encapsulation: 2 }); }
4655
+ } }, dependencies: [i2$1.DialogComponent, i2$1.DialogTitleBarComponent, i2$1.DialogActionsComponent], encapsulation: 2 }); }
4293
4656
  }
4294
4657
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BraintreeDialog, [{
4295
4658
  type: Component,
@@ -4861,7 +5224,7 @@ class PaypalButtonComponent extends ComponentBase {
4861
5224
  Description:
4862
5225
  Credit Card payment form via stripe integration
4863
5226
 
4864
- Copyright (c) 2016-2024 Osovitny Inc. All rights reserved.
5227
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4865
5228
  </file>
4866
5229
  */
4867
5230
  //Node
@@ -4931,7 +5294,7 @@ class StripeDialog extends DialogBase {
4931
5294
  i0.ɵɵtemplate(0, StripeDialog_Conditional_0_Template, 6, 3, "div", 0);
4932
5295
  } if (rf & 2) {
4933
5296
  i0.ɵɵconditional(0, ctx.visible ? 0 : -1);
4934
- } }, dependencies: [i2.DialogComponent, i2.DialogTitleBarComponent], encapsulation: 2 }); }
5297
+ } }, dependencies: [i2$1.DialogComponent, i2$1.DialogTitleBarComponent], encapsulation: 2 }); }
4935
5298
  }
4936
5299
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StripeDialog, [{
4937
5300
  type: Component,
@@ -4961,7 +5324,6 @@ class StripeDialog extends DialogBase {
4961
5324
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
4962
5325
  </file>
4963
5326
  */
4964
- //braintree
4965
5327
 
4966
5328
  /*
4967
5329
  <file>
@@ -4969,7 +5331,7 @@ class StripeDialog extends DialogBase {
4969
5331
  Atlas Cross
4970
5332
 
4971
5333
  Authors:
4972
- Leon Malyan leon.malyan@atlascross.io
5334
+ Leon Malyan leon.malyan@osovitny.com
4973
5335
 
4974
5336
  Created:
4975
5337
  25 May 2024
@@ -5257,37 +5619,6 @@ class CurrenciesStorageService {
5257
5619
  type: Injectable
5258
5620
  }], () => [{ type: AppContextService }, { type: CurrenciesApiService }], null); })();
5259
5621
 
5260
- /*
5261
- <file>
5262
- Project:
5263
- @osovitny/anatoly
5264
-
5265
- Authors:
5266
- Vadim Osovitny vadim.osovitny@osovitny.com
5267
-
5268
- Created:
5269
- 4 Jun 2024
5270
-
5271
- Copyright (c) 2017-2025 Osovitny Inc. All rights reserved.
5272
- </file>
5273
- */
5274
- //Node
5275
- class DiscountCodesApiService extends ApiServiceBase {
5276
- constructor(http) {
5277
- super(http);
5278
- this.http = http;
5279
- this.baseUrl = `${ApiUrl}/billing/discountCodes`;
5280
- }
5281
- getDiscountCode(code) {
5282
- return this.get('getDiscountCode', { code });
5283
- }
5284
- static { this.ɵfac = function DiscountCodesApiService_Factory(t) { return new (t || DiscountCodesApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
5285
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DiscountCodesApiService, factory: DiscountCodesApiService.ɵfac }); }
5286
- }
5287
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DiscountCodesApiService, [{
5288
- type: Injectable
5289
- }], () => [{ type: i1$1.HttpClient }], null); })();
5290
-
5291
5622
  /*
5292
5623
  <file>
5293
5624
  Project:
@@ -5445,7 +5776,13 @@ class EnumEditComponentBase extends EditComponentBase {
5445
5776
  this.valueChange = new EventEmitter();
5446
5777
  }
5447
5778
  ngOnInit() {
5779
+ this.setDefaults();
5780
+ this.setValues();
5781
+ }
5782
+ setDefaults() {
5448
5783
  this.renderItems();
5784
+ }
5785
+ setValues() {
5449
5786
  if (!this.selectedValue) {
5450
5787
  this.reset();
5451
5788
  }
@@ -6619,7 +6956,6 @@ class Copy2ClipboardComponent {
6619
6956
  @osovitny/anatoly
6620
6957
 
6621
6958
  Authors:
6622
- Vadim Osovitny vadim.osovitny@osovitny.com
6623
6959
  Anatoly Osovitny anatoly.osovitny@osovitny.com
6624
6960
 
6625
6961
  Created:
@@ -6638,7 +6974,7 @@ class NativeElementDirective {
6638
6974
  // sets the localization key to the control
6639
6975
  this.control.control.nativeElement = this.el.nativeElement;
6640
6976
  }
6641
- static { this.ɵfac = function NativeElementDirective_Factory(t) { return new (t || NativeElementDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2$1.NgControl)); }; }
6977
+ static { this.ɵfac = function NativeElementDirective_Factory(t) { return new (t || NativeElementDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.NgControl)); }; }
6642
6978
  static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: NativeElementDirective, selectors: [["", "formControl", ""], ["", "formControlName", ""]] }); }
6643
6979
  }
6644
6980
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NativeElementDirective, [{
@@ -6646,7 +6982,7 @@ class NativeElementDirective {
6646
6982
  args: [{
6647
6983
  selector: '[formControl], [formControlName]'
6648
6984
  }]
6649
- }], () => [{ type: i0.ElementRef }, { type: i2$1.NgControl }], null); })();
6985
+ }], () => [{ type: i0.ElementRef }, { type: i2.NgControl }], null); })();
6650
6986
 
6651
6987
  /*
6652
6988
  <file>
@@ -6919,7 +7255,7 @@ class UrlSlugComponent extends EditComponentBase {
6919
7255
  i0.ɵɵproperty("formControlName", ctx.controlName);
6920
7256
  i0.ɵɵadvance();
6921
7257
  i0.ɵɵproperty("ngIf", ctx.isGoButtonVisible);
6922
- } }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
7258
+ } }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
6923
7259
  }
6924
7260
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UrlSlugComponent, [{
6925
7261
  type: Component,
@@ -7013,7 +7349,7 @@ class CountryDropdownlist extends EditComponentBase {
7013
7349
  i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
7014
7350
  i0.ɵɵadvance();
7015
7351
  i0.ɵɵproperty("ngIf", !ctx.isNgModelBased);
7016
- } }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$1.NgSelectOption, i2$1.ɵNgSelectMultipleOption, i2$1.SelectControlValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, NativeElementDirective], encapsulation: 2 }); }
7352
+ } }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective], encapsulation: 2 }); }
7017
7353
  }
7018
7354
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CountryDropdownlist, [{
7019
7355
  type: Component,
@@ -7116,7 +7452,7 @@ class TimezoneDropdownlist extends EditComponentBase {
7116
7452
  i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
7117
7453
  i0.ɵɵadvance();
7118
7454
  i0.ɵɵproperty("ngIf", !ctx.isNgModelBased);
7119
- } }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$1.NgSelectOption, i2$1.ɵNgSelectMultipleOption, i2$1.SelectControlValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, NativeElementDirective], encapsulation: 2 }); }
7455
+ } }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective], encapsulation: 2 }); }
7120
7456
  }
7121
7457
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimezoneDropdownlist, [{
7122
7458
  type: Component,
@@ -7491,7 +7827,7 @@ class FormsHtmlEditorComponent extends HtmlEditorComponentBase {
7491
7827
  i0.ɵɵproperty("formControlName", ctx.editorFormKey)("froalaEditor", ctx.options);
7492
7828
  i0.ɵɵadvance();
7493
7829
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted)("controlName", ctx.editorFormKey);
7494
- } }, dependencies: [i1$2.NgClass, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, i3.FroalaEditorDirective, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
7830
+ } }, dependencies: [i1$2.NgClass, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, i3.FroalaEditorDirective, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
7495
7831
  }
7496
7832
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormsHtmlEditorComponent, [{
7497
7833
  type: Component,
@@ -7776,7 +8112,7 @@ class ContactUsForm extends EditComponentBase {
7776
8112
  onTopicChange(event) {
7777
8113
  this.selectedTopic = event.target.value;
7778
8114
  }
7779
- static { this.ɵfac = function ContactUsForm_Factory(t) { return new (t || ContactUsForm)(i0.ɵɵdirectiveInject(i1$8.ReCaptchaV3Service), i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(AppContextService), i0.ɵɵdirectiveInject(EmailsApiService), i0.ɵɵdirectiveInject(NotificationService)); }; }
8115
+ static { this.ɵfac = function ContactUsForm_Factory(t) { return new (t || ContactUsForm)(i0.ɵɵdirectiveInject(i1$8.ReCaptchaV3Service), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(AppContextService), i0.ɵɵdirectiveInject(EmailsApiService), i0.ɵɵdirectiveInject(NotificationService)); }; }
7780
8116
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContactUsForm, selectors: [["anatoly-forms-contactus-form"]], inputs: { showActionButtons: "showActionButtons" }, outputs: { submit: "submit" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 39, vars: 31, consts: [["novalidate", "", 3, "formGroup", "ngSubmit"], [3, "formGroup", "visible"], [1, "contact-us"], [1, "row"], [1, "form-fields", "col-6"], [1, "form-topic", 3, "ngClass"], [1, "form-select-wrapper"], [1, "assistive-text"], ["formControlName", "topic", 1, "form-select", 3, "change"], [3, "value", 4, "ngFor", "ngForOf"], ["controlName", "topic", "controlTitle", "topic", 3, "formGroup", "formSubmitted"], [1, "form-name", 3, "ngClass"], ["formControlName", "name", "placeholder", "Name *", "type", "text", 1, "form-control"], ["controlName", "name", "controlTitle", "name", 3, "formGroup", "formSubmitted"], [1, "form-email", 3, "ngClass"], ["formControlName", "email", "placeholder", "E-mail *", "type", "text", 1, "form-control"], [4, "ngIf"], ["controlName", "email", "controlTitle", "email", 3, "formGroup", "formSubmitted"], [1, "form-subject", 3, "ngClass"], ["formControlName", "subject", "placeholder", "Subject *", "type", "text", 1, "form-control"], ["controlName", "subject", "controlTitle", "subject", 3, "formGroup", "formSubmitted"], [1, "col-6"], [1, "form-message", 3, "ngClass"], ["formControlName", "message", "name", "message", "placeholder", "Message *", "rows", "4", "type", "text"], ["controlName", "message", "controlTitle", "message", 3, "formGroup", "formSubmitted"], [1, "row", "form-footer"], [1, "col"], ["class", "btn btn-success", "type", "submit", 3, "btn-primary", 4, "ngIf"], [3, "value"], ["type", "submit", 1, "btn", "btn-success"]], template: function ContactUsForm_Template(rf, ctx) { if (rf & 1) {
7781
8117
  i0.ɵɵelementStart(0, "form", 0);
7782
8118
  i0.ɵɵlistener("ngSubmit", function ContactUsForm_Template_form_ngSubmit_0_listener() { return ctx.onSubmit(); });
@@ -7848,12 +8184,12 @@ class ContactUsForm extends EditComponentBase {
7848
8184
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
7849
8185
  i0.ɵɵadvance(3);
7850
8186
  i0.ɵɵproperty("ngIf", ctx.showActionButtons);
7851
- } }, dependencies: [i1$2.NgClass, i1$2.NgForOf, i1$2.NgIf, i2$1.ɵNgNoValidate, i2$1.NgSelectOption, i2$1.ɵNgSelectMultipleOption, i2$1.DefaultValueAccessor, i2$1.SelectControlValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, NativeElementDirective, FormValidationSummaryComponent, ItemValidationSummaryComponent], encapsulation: 2 }); }
8187
+ } }, dependencies: [i1$2.NgClass, i1$2.NgForOf, i1$2.NgIf, i2.ɵNgNoValidate, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.DefaultValueAccessor, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, NativeElementDirective, FormValidationSummaryComponent, ItemValidationSummaryComponent], encapsulation: 2 }); }
7852
8188
  }
7853
8189
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContactUsForm, [{
7854
8190
  type: Component,
7855
8191
  args: [{ selector: 'anatoly-forms-contactus-form', template: "<form (ngSubmit)='onSubmit()' [formGroup]='formGroup' novalidate>\r\n <anatoly-form-validation-summary [formGroup]='formGroup'\r\n [visible]='formSubmitted && formGroup.invalid'></anatoly-form-validation-summary>\r\n\r\n <div class='contact-us'>\r\n <div class=\"row\">\r\n <div class='form-fields col-6'>\r\n <p>What can we help you with?</p>\r\n <div [ngClass]=\"{'has-error': isControlInvalid('topic') }\" class='form-topic'>\r\n <div class='form-select-wrapper'>\r\n <label class='assistive-text'>Topic *</label>\r\n <select (change)='onTopicChange($event)' class='form-select' formControlName='topic'>\r\n <option *ngFor='let topic of topicList' [value]='topic.value'>{{ topic.value }} </option>\r\n </select>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n controlName='topic'\r\n controlTitle='topic'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{'has-error': isControlInvalid('name') }\" class='form-name'>\r\n <label class='assistive-text'>Name *</label>\r\n <input class='form-control' formControlName='name' placeholder='Name *' type='text'>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n controlName='name'\r\n controlTitle='name'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div [ngClass]=\"{'has-error': isControlInvalid('email') }\" class='form-email'>\r\n <label class='assistive-text'>E-mail * </label>\r\n <input class='form-control' formControlName='email' placeholder='E-mail *' type='text' />\r\n <p *ngIf='!isUserSignedIn'>Please indicate the email used for your MailEx login if you already have an account</p>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n controlName='email'\r\n controlTitle='email'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div [ngClass]=\"{'has-error': isControlInvalid('subject') }\" class='form-subject'>\r\n <label class='assistive-text'>Subject *</label>\r\n <input class='form-control' formControlName='subject' placeholder='Subject *' type='text' />\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n controlName='subject'\r\n controlTitle='subject'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n </div>\r\n <div class='col-6'>\r\n <div [ngClass]=\"{'has-error': isControlInvalid('message') }\" class='form-message'>\r\n <label class='assistive-text'>Message *</label>\r\n <textarea formControlName='message' name='message' placeholder='Message *' rows='4'\r\n type='text'></textarea>\r\n <anatoly-item-validation-summary [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'\r\n controlName='message'\r\n controlTitle='message'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row form-footer\">\r\n <div class=\"col\">\r\n <button *ngIf='showActionButtons'\r\n [class.btn-primary]='!formGroup.invalid'\r\n class='btn btn-success'\r\n type='submit'>\r\n Submit\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n" }]
7856
- }], () => [{ type: i1$8.ReCaptchaV3Service }, { type: i2$1.FormBuilder }, { type: AppContextService }, { type: EmailsApiService }, { type: NotificationService }], { showActionButtons: [{
8192
+ }], () => [{ type: i1$8.ReCaptchaV3Service }, { type: i2.FormBuilder }, { type: AppContextService }, { type: EmailsApiService }, { type: NotificationService }], { showActionButtons: [{
7857
8193
  type: Input
7858
8194
  }], submit: [{
7859
8195
  type: Output
@@ -7866,7 +8202,6 @@ class ContactUsForm extends EditComponentBase {
7866
8202
  @osovitny/anatoly
7867
8203
 
7868
8204
  Authors:
7869
- Vadim Osovitny vadim.osovitny@osovitny.com
7870
8205
  Anatoly Osovitny anatoly.osovitny@osovitny.com
7871
8206
 
7872
8207
  Created:
@@ -7921,7 +8256,7 @@ class ContactUsDialog extends DialogBase {
7921
8256
  i0.ɵɵtemplate(0, ContactUsDialog_kendo_dialog_0_Template, 10, 2, "kendo-dialog", 0);
7922
8257
  } if (rf & 2) {
7923
8258
  i0.ɵɵproperty("ngIf", ctx.isOpen);
7924
- } }, dependencies: [i1$2.NgIf, i2.DialogComponent, i2.DialogActionsComponent, ContactUsForm], encapsulation: 2 }); }
8259
+ } }, dependencies: [i1$2.NgIf, i2$1.DialogComponent, i2$1.DialogActionsComponent, ContactUsForm], encapsulation: 2 }); }
7925
8260
  }
7926
8261
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContactUsDialog, [{
7927
8262
  type: Component,
@@ -7930,7 +8265,7 @@ class ContactUsDialog extends DialogBase {
7930
8265
  type: ViewChild,
7931
8266
  args: ['contactusform']
7932
8267
  }] }); })();
7933
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContactUsDialog, { className: "ContactUsDialog", filePath: "lib\\ui\\dialogs\\contact-us\\contact-us.dialog.ts", lineNumber: 28 }); })();
8268
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ContactUsDialog, { className: "ContactUsDialog", filePath: "lib\\ui\\dialogs\\contact-us\\contact-us.dialog.ts", lineNumber: 27 }); })();
7934
8269
 
7935
8270
  /*
7936
8271
  <file>
@@ -7938,7 +8273,6 @@ class ContactUsDialog extends DialogBase {
7938
8273
  @osovitny/anatoly
7939
8274
 
7940
8275
  Authors:
7941
- Vadim Osovitny vadim.osovitny@osovitny.com
7942
8276
  Anatoly Osovitny anatoly.osovitny@osovitny.com
7943
8277
 
7944
8278
  Created:
@@ -7954,7 +8288,6 @@ class ContactUsDialog extends DialogBase {
7954
8288
  @osovitny/anatoly
7955
8289
 
7956
8290
  Authors:
7957
- Vadim Osovitny vadim.osovitny@osovitny.com
7958
8291
  Anatoly Osovitny anatoly.osovitny@osovitny.com
7959
8292
 
7960
8293
  Created:
@@ -8003,7 +8336,6 @@ class HoveringDirective {
8003
8336
  @osovitny/anatoly
8004
8337
 
8005
8338
  Authors:
8006
- Vadim Osovitny vadim.osovitny@osovitny.com
8007
8339
  Anatoly Osovitny anatoly.osovitny@osovitny.com
8008
8340
 
8009
8341
  Created:
@@ -8167,7 +8499,7 @@ class AddressComponent extends EditComponentBase {
8167
8499
  let usState = event.target.value;
8168
8500
  this.change.emit(usState);
8169
8501
  }
8170
- static { this.ɵfac = function AddressComponent_Factory(t) { return new (t || AddressComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(CoreApiService)); }; }
8502
+ static { this.ɵfac = function AddressComponent_Factory(t) { return new (t || AddressComponent)(i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(CoreApiService)); }; }
8171
8503
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddressComponent, selectors: [["anatoly-forms-address"]], inputs: { address: "address" }, outputs: { change: "change" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 29, vars: 29, consts: [["classes", "card-primary card-outline"], [3, "title", 4, "ngIf"], [1, "row", 3, "formGroup"], [1, "form-group", "col-12", 3, "ngClass"], [1, "col-form-label", "required"], ["type", "text", "formControlName", "address_street", "placeholder", "Street Address", 1, "form-control"], ["controlName", "address_street", "controlTitle", "Street", 3, "formGroup", "formSubmitted"], ["type", "text", "formControlName", "address_street2", "placeholder", "Apartment, suite, unit, building, floor, etc.", 1, "form-control"], ["controlName", "address_street2", "controlTitle", "Street2", 3, "formGroup", "formSubmitted"], [1, "form-group", "col-3", 3, "ngClass"], ["type", "text", "formControlName", "address_city", "placeholder", "City", 1, "form-control"], ["controlName", "address_city", "controlTitle", "City", 3, "formGroup", "formSubmitted"], ["class", "form-group col-3", 3, "ngClass", 4, "ngIf"], ["type", "text", "formControlName", "address_zipcode", "placeholder", "zipcode", 1, "form-control"], ["controlName", "address_zipcode", "controlTitle", "zipcode", 3, "formGroup", "formSubmitted"], ["formControlName", "address_country", "data-placeholder", "Select a Country", 1, "form-control", 3, "change"], [3, "value", 4, "ngFor", "ngForOf"], ["controlName", "address_country", "controlTitle", "Country", 3, "formGroup", "formSubmitted"], [3, "title"], ["formControlName", "address_stateOrRegion", 1, "form-control", 3, "change"], ["controlName", "address_stateOrRegion", "controlTitle", "State", 3, "formGroup", "formSubmitted"], [3, "value"]], template: function AddressComponent_Template(rf, ctx) { if (rf & 1) {
8172
8504
  i0.ɵɵelementStart(0, "anatoly-card", 0);
8173
8505
  i0.ɵɵtemplate(1, AddressComponent_anatoly_card_header_1_Template, 1, 1, "anatoly-card-header", 1);
@@ -8228,12 +8560,12 @@ class AddressComponent extends EditComponentBase {
8228
8560
  i0.ɵɵproperty("ngForOf", ctx.countryData);
8229
8561
  i0.ɵɵadvance();
8230
8562
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
8231
- } }, dependencies: [i1$2.NgClass, i1$2.NgForOf, i1$2.NgIf, i2$1.NgSelectOption, i2$1.ɵNgSelectMultipleOption, i2$1.DefaultValueAccessor, i2$1.SelectControlValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, CardComponent, CardHeaderComponent, CardBodyComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
8563
+ } }, dependencies: [i1$2.NgClass, i1$2.NgForOf, i1$2.NgIf, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.DefaultValueAccessor, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, CardComponent, CardHeaderComponent, CardBodyComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
8232
8564
  }
8233
8565
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressComponent, [{
8234
8566
  type: Component,
8235
8567
  args: [{ selector: 'anatoly-forms-address', template: "<anatoly-card classes='card-primary card-outline'>\r\n <anatoly-card-header *ngIf='isTitleVisible' [title]='title'></anatoly-card-header>\r\n <anatoly-card-body>\r\n <div class='row' [formGroup]='formGroup'>\r\n <div class='form-group col-12' [ngClass]=\"{'has-error': isControlInvalid('address_street')}\" >\r\n <label class='col-form-label required'>Street Address</label>\r\n <input type='text' class='form-control' formControlName='address_street' placeholder='Street Address'>\r\n <anatoly-item-validation-summary controlName='address_street'\r\n controlTitle='Street'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n <div class='form-group col-12' [ngClass]=\"{'has-error': isControlInvalid('address_street2')}\" >\r\n <input type='text' class='form-control' formControlName='address_street2' placeholder='Apartment, suite, unit, building, floor, etc.'>\r\n <anatoly-item-validation-summary controlName='address_street2'\r\n controlTitle='Street2'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n <div class='form-group col-3' [ngClass]=\"{'has-error': isControlInvalid('address_city')}\">\r\n <label class='col-form-label required'>City</label>\r\n <input type='text' class='form-control' formControlName='address_city' placeholder='City'>\r\n <anatoly-item-validation-summary controlName='address_city'\r\n controlTitle='City'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n <div class='form-group col-3' *ngIf=\"formGroup.value.address_country == 'US'\" [ngClass]=\"{'has-error': isControlInvalid('address_stateOrRegion')}\">\r\n <label class='col-form-label required'>State</label>\r\n <select class='form-control' (change)='onUSStateChange($event)' formControlName='address_stateOrRegion'>\r\n <option *ngFor='let state of usStateData' [value]='state.code'>{{state.name}}</option>\r\n </select>\r\n <anatoly-item-validation-summary controlName='address_stateOrRegion'\r\n controlTitle='State'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n <div class='form-group col-3' [ngClass]=\"{'has-error': isControlInvalid('address_zipcode')}\" >\r\n <label class='col-form-label required'>zipcode</label>\r\n <input type='text' class='form-control' formControlName='address_zipcode' placeholder='zipcode'>\r\n <anatoly-item-validation-summary controlName='address_zipcode'\r\n controlTitle='zipcode'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n <div class='form-group col-3' [ngClass]=\"{'has-error': isControlInvalid('address_country')}\">\r\n <label class='col-form-label required'>Country</label>\r\n <select class='form-control' (change)='onCountryChange($event)' formControlName='address_country' data-placeholder='Select a Country'>\r\n <option *ngFor='let country of countryData' [value]='country.code'>{{country.name}}</option>\r\n </select>\r\n <anatoly-item-validation-summary controlName='address_country'\r\n controlTitle='Country'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n </div>\r\n </anatoly-card-body>\r\n</anatoly-card>\r\n" }]
8236
- }], () => [{ type: i2$1.FormBuilder }, { type: CoreApiService }], { address: [{
8568
+ }], () => [{ type: i2.FormBuilder }, { type: CoreApiService }], { address: [{
8237
8569
  type: Input
8238
8570
  }], change: [{
8239
8571
  type: Output
@@ -8312,7 +8644,7 @@ class CompanyComponent extends EditComponentBase {
8312
8644
  };
8313
8645
  return JSON.stringify(data);
8314
8646
  }
8315
- static { this.ɵfac = function CompanyComponent_Factory(t) { return new (t || CompanyComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder)); }; }
8647
+ static { this.ɵfac = function CompanyComponent_Factory(t) { return new (t || CompanyComponent)(i0.ɵɵdirectiveInject(i2.FormBuilder)); }; }
8316
8648
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CompanyComponent, selectors: [["anatoly-forms-company"]], inputs: { company: "company" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 24, vars: 22, consts: [["classes", "card-primary card-outline"], [3, "title", 4, "ngIf"], [1, "row", 3, "formGroup"], [1, "form-group", "col-6", 3, "ngClass"], [1, "col-form-label"], ["type", "text", "formControlName", "company_name", "placeholder", "Company Name", 1, "form-control"], ["controlName", "company_name", "controlTitle", "Company Name", 3, "formGroup", "formSubmitted"], ["type", "tel", "formControlName", "company_phone", "placeholder", "Company Phone", 1, "form-control"], ["controlName", "company_phone", "controlTitle", "Company Phone", 3, "formGroup", "formSubmitted"], ["type", "email", "formControlName", "company_email", "placeholder", "Company Email", 1, "form-control"], ["controlName", "company_email", "controlTitle", "Company Email", 3, "formGroup", "formSubmitted"], ["type", "url", "placeholder", "https://example.com", "pattern", "https://.*", "size", "30", "formControlName", "company_websiteUrl", 1, "form-control"], ["controlName", "company_websiteUrl", "controlTitle", "Company website url", 3, "formGroup", "formSubmitted"], [3, "title"]], template: function CompanyComponent_Template(rf, ctx) { if (rf & 1) {
8317
8649
  i0.ɵɵelementStart(0, "anatoly-card", 0);
8318
8650
  i0.ɵɵtemplate(1, CompanyComponent_anatoly_card_header_1_Template, 1, 1, "anatoly-card-header", 1);
@@ -8357,12 +8689,12 @@ class CompanyComponent extends EditComponentBase {
8357
8689
  i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(20, _c0, ctx.isControlInvalid("company_websiteUrl")));
8358
8690
  i0.ɵɵadvance(4);
8359
8691
  i0.ɵɵproperty("formGroup", ctx.formGroup)("formSubmitted", ctx.formSubmitted);
8360
- } }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2$1.DefaultValueAccessor, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.PatternValidator, i2$1.FormGroupDirective, i2$1.FormControlName, CardComponent, CardHeaderComponent, CardBodyComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
8692
+ } }, dependencies: [i1$2.NgClass, i1$2.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.PatternValidator, i2.FormGroupDirective, i2.FormControlName, CardComponent, CardHeaderComponent, CardBodyComponent, NativeElementDirective, ItemValidationSummaryComponent], encapsulation: 2 }); }
8361
8693
  }
8362
8694
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CompanyComponent, [{
8363
8695
  type: Component,
8364
8696
  args: [{ selector: 'anatoly-forms-company', template: "<anatoly-card classes='card-primary card-outline'>\r\n <anatoly-card-header *ngIf='isTitleVisible' [title]='title'></anatoly-card-header>\r\n <anatoly-card-body>\r\n <div [formGroup]='formGroup' class='row'>\r\n <div class='form-group col-6' [ngClass]=\"{'has-error': isControlInvalid('company_name') }\">\r\n <label class='col-form-label'>Name</label>\r\n <input type='text' class='form-control' formControlName='company_name' placeholder='Company Name'>\r\n <anatoly-item-validation-summary controlName='company_name'\r\n controlTitle='Company Name'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group col-6' [ngClass]=\"{'has-error': isControlInvalid('company_phone') }\">\r\n <label class='col-form-label'>Phone</label>\r\n <input type='tel' class='form-control' formControlName='company_phone' placeholder='Company Phone'>\r\n <anatoly-item-validation-summary controlName='company_phone'\r\n controlTitle='Company Phone'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group col-6' [ngClass]=\"{'has-error': isControlInvalid('company_email') }\">\r\n <label class='col-form-label'>Email</label>\r\n <input type='email' class='form-control' formControlName='company_email' placeholder='Company Email'>\r\n <anatoly-item-validation-summary controlName='company_email'\r\n controlTitle='Company Email'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n <div class='form-group col-6' [ngClass]=\"{'has-error': isControlInvalid('company_websiteUrl') }\">\r\n <label class='col-form-label'>Website Url</label>\r\n <input type='url' placeholder='https://example.com' pattern='https://.*' size='30'\r\n class='form-control' formControlName='company_websiteUrl'>\r\n <anatoly-item-validation-summary controlName='company_websiteUrl'\r\n controlTitle='Company website url'\r\n [formGroup]='formGroup'\r\n [formSubmitted]='formSubmitted'>\r\n </anatoly-item-validation-summary>\r\n </div>\r\n\r\n </div>\r\n </anatoly-card-body>\r\n</anatoly-card>\r\n" }]
8365
- }], () => [{ type: i2$1.FormBuilder }], { company: [{
8697
+ }], () => [{ type: i2.FormBuilder }], { company: [{
8366
8698
  type: Input
8367
8699
  }] }); })();
8368
8700
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CompanyComponent, { className: "CompanyComponent", filePath: "lib\\ui\\forms\\components\\company\\company.component.ts", lineNumber: 28 }); })();
@@ -8373,7 +8705,6 @@ class CompanyComponent extends EditComponentBase {
8373
8705
  @osovitny/anatoly
8374
8706
 
8375
8707
  Authors:
8376
- Vadim Osovitny vadim.osovitny@osovitny.com
8377
8708
  Anatoly Osovitny anatoly.osovitny@osovitny.com
8378
8709
 
8379
8710
  Created:
@@ -8686,7 +9017,6 @@ class AnatolyDataModule {
8686
9017
 
8687
9018
  Authors:
8688
9019
  Vadim Osovitny vadim.osovitny@osovitny.com
8689
- Anatoly Osovitny anatoly.osovitny@osovitny.com
8690
9020
 
8691
9021
  Created:
8692
9022
  2 May 2023
@@ -9183,11 +9513,14 @@ class KendoModule {
9183
9513
  </file>
9184
9514
  */
9185
9515
  const COMPONENTS$1 = [
9516
+ OrderSummaryComponent,
9517
+ PaymentMethodsComponent,
9518
+ PaymentOptionsComponent,
9186
9519
  PaypalButtonComponent,
9187
9520
  PayPalComponent,
9188
9521
  //Dialogs
9189
9522
  BraintreeDialog,
9190
- StripeDialog
9523
+ StripeDialog,
9191
9524
  ];
9192
9525
 
9193
9526
  /*
@@ -9214,6 +9547,8 @@ class AnatolyBillingModule {
9214
9547
  PayPalScriptService,
9215
9548
  PaymentsService
9216
9549
  ], imports: [CommonModule,
9550
+ ReactiveFormsModule,
9551
+ FormsModule,
9217
9552
  FaModule,
9218
9553
  KendoModule] }); }
9219
9554
  }
@@ -9222,6 +9557,8 @@ class AnatolyBillingModule {
9222
9557
  args: [{
9223
9558
  imports: [
9224
9559
  CommonModule,
9560
+ ReactiveFormsModule,
9561
+ FormsModule,
9225
9562
  FaModule,
9226
9563
  KendoModule
9227
9564
  ],
@@ -9238,9 +9575,11 @@ class AnatolyBillingModule {
9238
9575
  ]
9239
9576
  }]
9240
9577
  }], null, null); })();
9241
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyBillingModule, { declarations: [PaypalButtonComponent, PayPalComponent, BraintreeDialog, StripeDialog], imports: [CommonModule,
9578
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyBillingModule, { declarations: [OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, PaypalButtonComponent, PayPalComponent, BraintreeDialog, StripeDialog], imports: [CommonModule,
9579
+ ReactiveFormsModule,
9580
+ FormsModule,
9242
9581
  FaModule,
9243
- KendoModule], exports: [PaypalButtonComponent, PayPalComponent, BraintreeDialog, StripeDialog] }); })();
9582
+ KendoModule], exports: [OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, PaypalButtonComponent, PayPalComponent, BraintreeDialog, StripeDialog] }); })();
9244
9583
 
9245
9584
  /*
9246
9585
  <file>
@@ -9292,7 +9631,6 @@ const MAIN_COMPONENTS = [
9292
9631
  @osovitny/anatoly
9293
9632
 
9294
9633
  Authors:
9295
- Vadim Osovitny vadim.osovitny@osovitny.com
9296
9634
  Anatoly Osovitny anatoly.osovitny@osovitny.com
9297
9635
 
9298
9636
  Created:
@@ -9311,7 +9649,6 @@ const DIALOGS = [
9311
9649
  @osovitny/anatoly
9312
9650
 
9313
9651
  Authors:
9314
- Vadim Osovitny vadim.osovitny@osovitny.com
9315
9652
  Anatoly Osovitny anatoly.osovitny@osovitny.com
9316
9653
 
9317
9654
  Created:
@@ -9331,7 +9668,6 @@ const DIRECTIVES = [
9331
9668
  @osovitny/anatoly
9332
9669
 
9333
9670
  Authors:
9334
- Vadim Osovitny vadim.osovitny@osovitny.com
9335
9671
  Anatoly Osovitny anatoly.osovitny@osovitny.com
9336
9672
 
9337
9673
  Created:
@@ -9516,5 +9852,5 @@ class AnatolyModule {
9516
9852
  * Generated bundle index. Do not edit.
9517
9853
  */
9518
9854
 
9519
- export { AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AuthService, AuthenticationGuard, BaseGoService, BillingUtils, BraintreeDialog, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, ClientApps, CompanyComponent, ComponentBase, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, CountryDropdownlist, CurrenciesApiService, CurrenciesStorageService, DOM, DataPagerComponent, DataViewType, DateConvert, DefaultEditorOptions, DialogBase, DigitalMarketingService, DiscountCodeStatus, DiscountCodeType, DiscountCodesApiService, EditComponentBase, EditPageBase, EmailsApiService, EnumEditComponentBase, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, GABillingEvents, GAEvents, GlobalErrorHandler, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, HtmlEditorComponentBase, IdleService, InjectorInstance, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10NUrl, L10nUtils, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, MSALUtils, NativeElementDirective, NodataComponent, NotificationService, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, QSUtils, ReplaceTextPipe, SafeHtmlPipe, ScriptService, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, dateFormats, dateTimeFormats, getAppSettingsById, getAppSettingsByName, is, localizationInitializerFactory, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
9855
+ export { AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AuthService, AuthenticationGuard, BaseGoService, BillingUtils, BraintreeDialog, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, ClientApps, CompanyComponent, ComponentBase, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, CountryDropdownlist, CurrenciesApiService, CurrenciesStorageService, DOM, DataPagerComponent, DataViewType, DateConvert, DefaultEditorOptions, DialogBase, DigitalMarketingService, DiscountCodeStatus, DiscountCodeType, DiscountCodesApiService, EditComponentBase, EditPageBase, EmailsApiService, EnumEditComponentBase, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, GABillingEvents, GAEvents, GlobalErrorHandler, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, HtmlEditorComponentBase, IdleService, InjectorInstance, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10NUrl, L10nUtils, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, MSALUtils, NativeElementDirective, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, QSUtils, ReplaceTextPipe, SafeHtmlPipe, ScriptService, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, dateFormats, dateTimeFormats, getAppSettingsById, getAppSettingsByName, is, localizationInitializerFactory, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
9520
9856
  //# sourceMappingURL=osovitny-anatoly.mjs.map