@colijnit/transaction 12.1.5 → 12.1.6

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 (36) hide show
  1. package/app/component/checkout/{retail-transaction-checkout/retail-transaction-checkout.component.d.ts → checkout-transaction/checkout-transaction.component.d.ts} +1 -1
  2. package/app/component/checkout/ione-checkout.component.d.ts +0 -2
  3. package/app/component/{common → core}/icon/icon.component.d.ts +0 -0
  4. package/app/component/{common → core}/image-display/image-display.component.d.ts +0 -0
  5. package/app/component/{common → core}/no-image-display/no-image-display.component.d.ts +0 -0
  6. package/app/component/service-order/transaction-manager/transaction-manager.component.d.ts +1 -1
  7. package/app/component/shopping-cart/ione-shopping-cart.component.d.ts +1 -1
  8. package/app/component/shopping-cart/shopping-cart-manager/shopping-cart-manager.component.d.ts +1 -1
  9. package/{enum → app/enum}/position-grid-row.enum.d.ts +0 -0
  10. package/app/service/transaction-event.service.d.ts +1 -1
  11. package/bundles/colijnit-transaction.umd.js +283 -284
  12. package/bundles/colijnit-transaction.umd.js.map +1 -1
  13. package/colijnit-transaction.d.ts +23 -23
  14. package/colijnit-transaction.metadata.json +1 -1
  15. package/esm2015/app/component/checkout/checkout-transaction/checkout-transaction.component.js +53 -0
  16. package/esm2015/app/component/checkout/ione-checkout.component.js +2 -4
  17. package/esm2015/app/component/checkout/ione-checkout.module.js +3 -3
  18. package/esm2015/app/component/core/core.module.js +4 -4
  19. package/esm2015/app/component/{common → core}/icon/icon.component.js +1 -1
  20. package/esm2015/app/component/core/image-display/image-display.component.js +41 -0
  21. package/esm2015/app/component/core/no-image-display/no-image-display.component.js +26 -0
  22. package/esm2015/app/component/service-order/service-order.component.js +2 -2
  23. package/esm2015/app/component/service-order/transaction-manager/transaction-manager.component.js +2 -2
  24. package/esm2015/app/component/shopping-cart/ione-shopping-cart.component.js +2 -2
  25. package/esm2015/app/component/shopping-cart/shopping-cart/shopping-cart.component.js +3 -3
  26. package/esm2015/app/component/shopping-cart/shopping-cart-manager/shopping-cart-manager.component.js +2 -2
  27. package/esm2015/app/enum/position-grid-row.enum.js +6 -0
  28. package/esm2015/app/service/transaction-event.service.js +1 -1
  29. package/esm2015/colijnit-transaction.js +24 -24
  30. package/fesm2015/colijnit-transaction.js +301 -302
  31. package/fesm2015/colijnit-transaction.js.map +1 -1
  32. package/package.json +1 -1
  33. package/esm2015/app/component/checkout/retail-transaction-checkout/retail-transaction-checkout.component.js +0 -53
  34. package/esm2015/app/component/common/image-display/image-display.component.js +0 -41
  35. package/esm2015/app/component/common/no-image-display/no-image-display.component.js +0 -26
  36. package/esm2015/enum/position-grid-row.enum.js +0 -6
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, EventEmitter, Component, Input, Output, ChangeDetectorRef, ViewChild, Pipe, HostBinding, NgModule, Directive, ContentChild, ViewContainerRef } from '@angular/core';
3
+ import { Injectable, EventEmitter, Component, ViewChild, Output, ChangeDetectorRef, Input, Pipe, HostBinding, NgModule, Directive, ContentChild, ViewContainerRef } from '@angular/core';
4
4
  import { BehaviorSubject, Subject, throwError } from 'rxjs';
5
5
  import { Options } from '@colijnit/ioneconnector/build/model/options';
6
6
  import { CustomerFullObject } from '@colijnit/transactionapi/build/model/customer-full-object.bo';
@@ -36,6 +36,7 @@ import { LineOperationStatus } from '@colijnit/transactionapi/build/model/line-o
36
36
  import { TransactionInfo } from '@colijnit/transactionapi/build/model/transaction-info.bo';
37
37
  import { PendingReasonType } from '@colijnit/transactionapi/build/enum/pending-reason-type.enum';
38
38
  import { PromptService, FormComponent, CoSidebarComponent, CoreComponentsIcon, IconCacheService, IconModule, InputTextModule, InputCheckboxModule, InputRadioButtonModule, FormModule, InputComboBoxModule, InputDatePickerModule, InputNumberPickerModule, CoDialogModule, CoDialogPromptModule, ButtonModule, MultiSelectListModule, DropDownModule, PopupModule, CoSidebarModule, CoGridModule, CoRichTextEditorModule } from '@colijnit/corecomponents_v12';
39
+ import { FlexModule } from '@angular/flex-layout';
39
40
  import { CommunicationType } from '@colijnit/transactionapi/build/enum/communication-type.enum';
40
41
  import { ContactOption } from '@colijnit/transactionapi/build/model/contact-option.bo';
41
42
  import { RelationNameKind } from '@colijnit/transactionapi/build/enum/relation-name-kind.enum';
@@ -44,7 +45,6 @@ import { GenderType } from '@colijnit/transactionapi/build/enum/gender-type.enum
44
45
  import { BusinessObjectUtils } from '@colijnit/transactionapi/build/utils/business-object-utils';
45
46
  import { FunctionUtils } from '@colijnit/transactionapi/build/utils/function-utils';
46
47
  import { Address } from '@colijnit/transactionapi/build/model/address.bo';
47
- import { FlexModule } from '@angular/flex-layout';
48
48
  import { MatStepperModule } from '@angular/material/stepper';
49
49
  import { CommonModule } from '@angular/common';
50
50
  import { DomSanitizer } from '@angular/platform-browser';
@@ -2403,6 +2403,237 @@ TransactionEventService.decorators = [
2403
2403
  { type: Injectable, args: [{ providedIn: "root" },] }
2404
2404
  ];
2405
2405
 
2406
+ class CheckoutLoginComponent {
2407
+ constructor() {
2408
+ this.createNewAccountSubmit = new EventEmitter();
2409
+ this.continueWithoutSubmit = new EventEmitter();
2410
+ this.loginSubmit = new EventEmitter();
2411
+ this.userEmailAddress = "";
2412
+ this.userNewEmailAddress = "";
2413
+ this.userPassword = "";
2414
+ this.continueWithoutAccount = false;
2415
+ this.company = "<bedrijf>";
2416
+ }
2417
+ ngOnInit() {
2418
+ }
2419
+ login() {
2420
+ this.loginSubmit.emit();
2421
+ }
2422
+ submit() {
2423
+ this.loginForm.submit();
2424
+ }
2425
+ createAccountSubmit() {
2426
+ this.accountForm.submit();
2427
+ }
2428
+ continueSubmit() {
2429
+ this.continueWithoutAccount = true;
2430
+ this.accountForm.submit();
2431
+ }
2432
+ accountLogin() {
2433
+ if (this.continueWithoutAccount) {
2434
+ this.continueWithoutSubmit.emit();
2435
+ }
2436
+ else {
2437
+ this.createNewAccountSubmit.emit();
2438
+ }
2439
+ }
2440
+ }
2441
+ CheckoutLoginComponent.decorators = [
2442
+ { type: Component, args: [{
2443
+ selector: "checkout-login",
2444
+ template: `
2445
+ <h1>{{ "LOGIN" | localize}}</h1>
2446
+ <div class="users">
2447
+ <co-form #loginForm (validSubmit)="login()">
2448
+ <div class="existing-user">
2449
+ <p><strong>{{ "EXISTING_CUSTOMERS" | localize }}</strong></p>
2450
+ <co-input-text
2451
+ [(model)]="userEmailAddress"
2452
+ [placeholder]="'EMAIL_ADDRESS' | localize "
2453
+ [type]="'email'"
2454
+ required
2455
+ ></co-input-text>
2456
+
2457
+ <co-input-text
2458
+ [(model)]="userPassword"
2459
+ [placeholder]="'PASSWORD' | localize "
2460
+ [type]="'password'"
2461
+ required
2462
+ ></co-input-text>
2463
+ <div class="login-button">
2464
+ <co-button
2465
+ [label]="'LOGIN' | localize" (click)="submit()"
2466
+ ></co-button>
2467
+ </div>
2468
+ </div>
2469
+ </co-form>
2470
+
2471
+ <co-form #accountForm (validSubmit)="accountLogin()">
2472
+ <div class="new-user">
2473
+ <p class="boxedbottom">
2474
+ <strong>{{ "NEW_AT" | localize}}{{company}}</strong>
2475
+ <br/>{{ "CREATE_ACCOUNT_IN_2_MIN" | localize }}
2476
+ </p>
2477
+ <div class="new-user-e-mail">
2478
+ <co-input-text
2479
+ [(model)]="userNewEmailAddress"
2480
+ [placeholder]="'EMAIL_ADDRESS' | localize "
2481
+ [type]="'email'"
2482
+ required
2483
+ ></co-input-text>
2484
+ </div>
2485
+ <div class="login-button">
2486
+ <co-button
2487
+ [label]="'CREATE_ACCOUNT' | localize"
2488
+ (click)="createAccountSubmit()"
2489
+ ></co-button>
2490
+ <co-button
2491
+ [label]="'CONTINUE_WITHOUT_ACCOUNT' | localize"
2492
+ (click)="continueSubmit()"
2493
+ ></co-button>
2494
+ </div>
2495
+ </div>
2496
+ </co-form>
2497
+ </div>
2498
+ `,
2499
+ styles: [".users{display:flex;flex-direction:row}.users co-form{width:50%}.existing-user{padding-right:2rem;margin-bottom:0;border-right:1px solid #aaa}.new-user{padding-left:2rem}.new-user-e-mail{padding-top:2.6rem}.boxedbottom{margin-bottom:.5rem}.login-button{display:flex;margin-top:10px}.login-button co-button{margin-right:10px}\n"]
2500
+ },] }
2501
+ ];
2502
+ CheckoutLoginComponent.ctorParameters = () => [];
2503
+ CheckoutLoginComponent.propDecorators = {
2504
+ loginForm: [{ type: ViewChild, args: ["loginForm",] }],
2505
+ accountForm: [{ type: ViewChild, args: ["accountForm",] }],
2506
+ createNewAccountSubmit: [{ type: Output }],
2507
+ continueWithoutSubmit: [{ type: Output }],
2508
+ loginSubmit: [{ type: Output }]
2509
+ };
2510
+
2511
+ class IoneCheckoutComponent {
2512
+ constructor(_changeDetector, _optionsService, _connector, _dictionary, _service, transactionEvents, _promptService, globalEvents) {
2513
+ this._changeDetector = _changeDetector;
2514
+ this._optionsService = _optionsService;
2515
+ this._connector = _connector;
2516
+ this._dictionary = _dictionary;
2517
+ this._service = _service;
2518
+ this.transactionEvents = transactionEvents;
2519
+ this._promptService = _promptService;
2520
+ this.globalEvents = globalEvents;
2521
+ this.upAndLoaded = false;
2522
+ this.show = false;
2523
+ this.loggedIn = false;
2524
+ this._subscriptions = [];
2525
+ this._remoteOptions = true;
2526
+ this._publicOptions = true;
2527
+ this._applicationUser = false;
2528
+ this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
2529
+ this._subscriptions.push(this.transactionEvents.loggedIn.subscribe(() => {
2530
+ this.loggedIn = true;
2531
+ }));
2532
+ }
2533
+ set options(value) {
2534
+ if (value) {
2535
+ let options;
2536
+ if (typeof value === "string") {
2537
+ options = JSON.parse(value);
2538
+ }
2539
+ else {
2540
+ options = value;
2541
+ }
2542
+ this._publicOptions = true;
2543
+ this._optionsService.initialize(options).then();
2544
+ }
2545
+ }
2546
+ set applicationUser(value) {
2547
+ this._applicationUser = value;
2548
+ this._service.applicationUser = this.applicationUser;
2549
+ }
2550
+ get transactionNr() {
2551
+ return this._service.currentTransaction.transactionNr;
2552
+ }
2553
+ get applicationUser() {
2554
+ return this._applicationUser;
2555
+ }
2556
+ ngOnInit() {
2557
+ if (!this._publicOptions) {
2558
+ this._optionsService.initializeDevelopmentOptions(this._remoteOptions);
2559
+ }
2560
+ }
2561
+ ngOnDestroy() {
2562
+ this._subscriptions.forEach(subscription => subscription.unsubscribe());
2563
+ }
2564
+ _handleSettingsLoaded(loaded) {
2565
+ return __awaiter(this, void 0, void 0, function* () {
2566
+ if (loaded) {
2567
+ yield this._initConnection().then();
2568
+ this.upAndLoaded = true;
2569
+ }
2570
+ });
2571
+ }
2572
+ _initConnection() {
2573
+ return __awaiter(this, void 0, void 0, function* () {
2574
+ yield this._connector.connect(this._optionsService.options);
2575
+ if (this._optionsService.options.url) {
2576
+ this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
2577
+ }
2578
+ yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
2579
+ setTimeout(() => {
2580
+ this._changeDetector.detectChanges();
2581
+ });
2582
+ });
2583
+ }
2584
+ loginSubmit() {
2585
+ this.globalEvents.addUserRelationShoppingCartModule.next({ user: this.checkoutLogin.userEmailAddress, pw: this.checkoutLogin.userPassword });
2586
+ this.loggedIn = true;
2587
+ }
2588
+ continueWithoutAccount() {
2589
+ this.closeLogin();
2590
+ this.loggedIn = true;
2591
+ this.transactionEvents.addNewUserToShoppingCartModule.next(this.checkoutLogin.userNewEmailAddress);
2592
+ }
2593
+ createNewAccount() {
2594
+ this.closeLogin();
2595
+ this.transactionEvents.addNewUserToShoppingCartModule.next(this.checkoutLogin.userNewEmailAddress);
2596
+ }
2597
+ closeLogin() {
2598
+ this.loggedIn = true;
2599
+ this.show = true;
2600
+ }
2601
+ }
2602
+ IoneCheckoutComponent.decorators = [
2603
+ { type: Component, args: [{
2604
+ selector: "ione-checkout",
2605
+ template: `
2606
+ <ng-container *ngIf="show && (applicationUser || loggedIn)">
2607
+ <app-checkout-transaction></app-checkout-transaction>
2608
+ </ng-container>
2609
+
2610
+
2611
+ <div *ngIf="show && !applicationUser && !loggedIn">
2612
+ <checkout-login
2613
+ #checkoutLogin
2614
+ (continueWithoutSubmit)="continueWithoutAccount()"
2615
+ (createNewAccountSubmit)="createNewAccount()"
2616
+ ></checkout-login>
2617
+ </div>
2618
+ `
2619
+ },] }
2620
+ ];
2621
+ IoneCheckoutComponent.ctorParameters = () => [
2622
+ { type: ChangeDetectorRef },
2623
+ { type: OptionsService },
2624
+ { type: IOneConnectorAdapterService },
2625
+ { type: DictionaryService },
2626
+ { type: TransactionService },
2627
+ { type: TransactionEventService },
2628
+ { type: PromptService },
2629
+ { type: TransactionEventService }
2630
+ ];
2631
+ IoneCheckoutComponent.propDecorators = {
2632
+ checkoutLogin: [{ type: ViewChild, args: [CheckoutLoginComponent,] }],
2633
+ options: [{ type: Input }],
2634
+ applicationUser: [{ type: Input }]
2635
+ };
2636
+
2406
2637
  var CheckoutSteps;
2407
2638
  (function (CheckoutSteps) {
2408
2639
  CheckoutSteps[CheckoutSteps["Overview"] = 0] = "Overview";
@@ -3572,305 +3803,23 @@ CheckoutComponent.propDecorators = {
3572
3803
  stepper: [{ type: ViewChild, args: ["stepper",] }]
3573
3804
  };
3574
3805
 
3575
- class RetailTransactionCheckoutComponent {
3576
- constructor(service) {
3577
- this.service = service;
3806
+ class CheckoutOverviewRelationAddressComponent {
3807
+ constructor(_dictionary, _connector) {
3808
+ this._dictionary = _dictionary;
3809
+ this._connector = _connector;
3810
+ this.countries = [];
3811
+ this.fields = { text: "description", value: "code" };
3812
+ this.postalCodeCheckErrorMessage = "";
3813
+ this._prevPostalCodeForCheck = "";
3578
3814
  }
3579
- get canPrevious() {
3580
- var _a;
3581
- return this.checkout && ((_a = this.checkout.stepper) === null || _a === void 0 ? void 0 : _a.selectedIndex) !== 0;
3815
+ set address(address) {
3816
+ this._address = address;
3582
3817
  }
3583
- get canContinue() {
3584
- var _a;
3585
- return this.checkout && ((_a = this.checkout.stepper) === null || _a === void 0 ? void 0 : _a.selectedIndex) !== 3;
3586
- }
3587
- get started() {
3588
- var _a;
3589
- return this.checkout && ((_a = this.checkout.stepper) === null || _a === void 0 ? void 0 : _a.selectedIndex) === 0;
3590
- }
3591
- get finished() {
3592
- return this.checkout && this.checkout.finished;
3593
- }
3594
- continueCheckout() {
3595
- this.checkout.continue();
3596
- }
3597
- previousCheckout() {
3598
- this.checkout.previous();
3599
- }
3600
- }
3601
- RetailTransactionCheckoutComponent.decorators = [
3602
- { type: Component, args: [{
3603
- selector: "app-retail-transaction-checkout",
3604
- template: `
3605
- <ng-container [ngTemplateOutlet]="content"></ng-container>
3606
- <app-checkout class="checkout"></app-checkout>
3607
- <ng-container [ngTemplateOutlet]="content"></ng-container>
3608
- <ng-template #content>
3609
- <div class="checkout-retail-viewport checkout-row-end">
3610
- <co-button [label]="'BACK'| localize" [disabled]="!canPrevious" (click)="previousCheckout()"></co-button>
3611
- <co-button [label]="'CONTINUE'| localize" [disabled]="!canContinue" (click)="continueCheckout()"></co-button>
3612
- </div>
3613
- </ng-template>
3614
- `,
3615
- styles: [".checkout-retail-viewport{max-width:60%;margin-left:20%}.checkout-row-end{display:flex;flex-direction:row;grid-column-gap:10px;-moz-column-gap:10px;column-gap:10px;justify-content:flex-end}\n"]
3616
- },] }
3617
- ];
3618
- RetailTransactionCheckoutComponent.ctorParameters = () => [
3619
- { type: TransactionService }
3620
- ];
3621
- RetailTransactionCheckoutComponent.propDecorators = {
3622
- checkout: [{ type: ViewChild, args: [CheckoutComponent, { static: true },] }]
3623
- };
3624
-
3625
- class CheckoutLoginComponent {
3626
- constructor() {
3627
- this.createNewAccountSubmit = new EventEmitter();
3628
- this.continueWithoutSubmit = new EventEmitter();
3629
- this.loginSubmit = new EventEmitter();
3630
- this.userEmailAddress = "";
3631
- this.userNewEmailAddress = "";
3632
- this.userPassword = "";
3633
- this.continueWithoutAccount = false;
3634
- this.company = "<bedrijf>";
3635
- }
3636
- ngOnInit() {
3637
- }
3638
- login() {
3639
- this.loginSubmit.emit();
3640
- }
3641
- submit() {
3642
- this.loginForm.submit();
3643
- }
3644
- createAccountSubmit() {
3645
- this.accountForm.submit();
3646
- }
3647
- continueSubmit() {
3648
- this.continueWithoutAccount = true;
3649
- this.accountForm.submit();
3650
- }
3651
- accountLogin() {
3652
- if (this.continueWithoutAccount) {
3653
- this.continueWithoutSubmit.emit();
3654
- }
3655
- else {
3656
- this.createNewAccountSubmit.emit();
3657
- }
3658
- }
3659
- }
3660
- CheckoutLoginComponent.decorators = [
3661
- { type: Component, args: [{
3662
- selector: "checkout-login",
3663
- template: `
3664
- <h1>{{ "LOGIN" | localize}}</h1>
3665
- <div class="users">
3666
- <co-form #loginForm (validSubmit)="login()">
3667
- <div class="existing-user">
3668
- <p><strong>{{ "EXISTING_CUSTOMERS" | localize }}</strong></p>
3669
- <co-input-text
3670
- [(model)]="userEmailAddress"
3671
- [placeholder]="'EMAIL_ADDRESS' | localize "
3672
- [type]="'email'"
3673
- required
3674
- ></co-input-text>
3675
-
3676
- <co-input-text
3677
- [(model)]="userPassword"
3678
- [placeholder]="'PASSWORD' | localize "
3679
- [type]="'password'"
3680
- required
3681
- ></co-input-text>
3682
- <div class="login-button">
3683
- <co-button
3684
- [label]="'LOGIN' | localize" (click)="submit()"
3685
- ></co-button>
3686
- </div>
3687
- </div>
3688
- </co-form>
3689
-
3690
- <co-form #accountForm (validSubmit)="accountLogin()">
3691
- <div class="new-user">
3692
- <p class="boxedbottom">
3693
- <strong>{{ "NEW_AT" | localize}}{{company}}</strong>
3694
- <br/>{{ "CREATE_ACCOUNT_IN_2_MIN" | localize }}
3695
- </p>
3696
- <div class="new-user-e-mail">
3697
- <co-input-text
3698
- [(model)]="userNewEmailAddress"
3699
- [placeholder]="'EMAIL_ADDRESS' | localize "
3700
- [type]="'email'"
3701
- required
3702
- ></co-input-text>
3703
- </div>
3704
- <div class="login-button">
3705
- <co-button
3706
- [label]="'CREATE_ACCOUNT' | localize"
3707
- (click)="createAccountSubmit()"
3708
- ></co-button>
3709
- <co-button
3710
- [label]="'CONTINUE_WITHOUT_ACCOUNT' | localize"
3711
- (click)="continueSubmit()"
3712
- ></co-button>
3713
- </div>
3714
- </div>
3715
- </co-form>
3716
- </div>
3717
- `,
3718
- styles: [".users{display:flex;flex-direction:row}.users co-form{width:50%}.existing-user{padding-right:2rem;margin-bottom:0;border-right:1px solid #aaa}.new-user{padding-left:2rem}.new-user-e-mail{padding-top:2.6rem}.boxedbottom{margin-bottom:.5rem}.login-button{display:flex;margin-top:10px}.login-button co-button{margin-right:10px}\n"]
3719
- },] }
3720
- ];
3721
- CheckoutLoginComponent.ctorParameters = () => [];
3722
- CheckoutLoginComponent.propDecorators = {
3723
- loginForm: [{ type: ViewChild, args: ["loginForm",] }],
3724
- accountForm: [{ type: ViewChild, args: ["accountForm",] }],
3725
- createNewAccountSubmit: [{ type: Output }],
3726
- continueWithoutSubmit: [{ type: Output }],
3727
- loginSubmit: [{ type: Output }]
3728
- };
3729
-
3730
- class IoneCheckoutComponent {
3731
- constructor(_changeDetector, _optionsService, _connector, _dictionary, _service, transactionEvents, _promptService, globalEvents) {
3732
- this._changeDetector = _changeDetector;
3733
- this._optionsService = _optionsService;
3734
- this._connector = _connector;
3735
- this._dictionary = _dictionary;
3736
- this._service = _service;
3737
- this.transactionEvents = transactionEvents;
3738
- this._promptService = _promptService;
3739
- this.globalEvents = globalEvents;
3740
- this.upAndLoaded = false;
3741
- this.show = false;
3742
- this.loggedIn = false;
3743
- this._subscriptions = [];
3744
- this._remoteOptions = true;
3745
- this._publicOptions = true;
3746
- this._applicationUser = false;
3747
- this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)));
3748
- this._subscriptions.push(this.transactionEvents.loggedIn.subscribe(() => {
3749
- this.loggedIn = true;
3750
- }));
3751
- }
3752
- set options(value) {
3753
- if (value) {
3754
- let options;
3755
- if (typeof value === "string") {
3756
- options = JSON.parse(value);
3757
- }
3758
- else {
3759
- options = value;
3760
- }
3761
- this._publicOptions = true;
3762
- this._optionsService.initialize(options).then();
3763
- }
3764
- }
3765
- set applicationUser(value) {
3766
- this._applicationUser = value;
3767
- this._service.applicationUser = this.applicationUser;
3768
- }
3769
- get transactionNr() {
3770
- return this._service.currentTransaction.transactionNr;
3771
- }
3772
- get applicationUser() {
3773
- return this._applicationUser;
3774
- }
3775
- ngOnInit() {
3776
- if (!this._publicOptions) {
3777
- this._optionsService.initializeDevelopmentOptions(this._remoteOptions);
3778
- }
3779
- }
3780
- ngOnDestroy() {
3781
- this._subscriptions.forEach(subscription => subscription.unsubscribe());
3782
- }
3783
- _handleSettingsLoaded(loaded) {
3784
- return __awaiter(this, void 0, void 0, function* () {
3785
- if (loaded) {
3786
- yield this._initConnection().then();
3787
- this.upAndLoaded = true;
3788
- }
3789
- });
3790
- }
3791
- _initConnection() {
3792
- return __awaiter(this, void 0, void 0, function* () {
3793
- yield this._connector.connect(this._optionsService.options);
3794
- if (this._optionsService.options.url) {
3795
- this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
3796
- }
3797
- yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
3798
- setTimeout(() => {
3799
- this._changeDetector.detectChanges();
3800
- });
3801
- });
3802
- }
3803
- loginSubmit() {
3804
- this.globalEvents.addUserRelationShoppingCartModule.next({ user: this.checkoutLogin.userEmailAddress, pw: this.checkoutLogin.userPassword });
3805
- this.loggedIn = true;
3806
- }
3807
- continueWithoutAccount() {
3808
- this.closeLogin();
3809
- this.loggedIn = true;
3810
- this.transactionEvents.addNewUserToShoppingCartModule.next(this.checkoutLogin.userNewEmailAddress);
3811
- }
3812
- createNewAccount() {
3813
- this.closeLogin();
3814
- this.transactionEvents.addNewUserToShoppingCartModule.next(this.checkoutLogin.userNewEmailAddress);
3815
- }
3816
- closeLogin() {
3817
- this.loggedIn = true;
3818
- this.show = true;
3819
- }
3820
- }
3821
- IoneCheckoutComponent.decorators = [
3822
- { type: Component, args: [{
3823
- selector: "ione-checkout",
3824
- template: `
3825
- <ng-container *ngIf="show && (applicationUser || loggedIn)">
3826
- <app-retail-transaction-checkout></app-retail-transaction-checkout>
3827
- </ng-container>
3828
-
3829
-
3830
- <div *ngIf="show && !applicationUser && !loggedIn">
3831
- <checkout-login
3832
- #checkoutLogin
3833
- (continueWithoutSubmit)="continueWithoutAccount()"
3834
- (createNewAccountSubmit)="createNewAccount()"
3835
- ></checkout-login>
3836
- </div>
3837
- `
3838
- },] }
3839
- ];
3840
- IoneCheckoutComponent.ctorParameters = () => [
3841
- { type: ChangeDetectorRef },
3842
- { type: OptionsService },
3843
- { type: IOneConnectorAdapterService },
3844
- { type: DictionaryService },
3845
- { type: TransactionService },
3846
- { type: TransactionEventService },
3847
- { type: PromptService },
3848
- { type: TransactionEventService }
3849
- ];
3850
- IoneCheckoutComponent.propDecorators = {
3851
- retailCheckout: [{ type: ViewChild, args: [RetailTransactionCheckoutComponent,] }],
3852
- checkoutLogin: [{ type: ViewChild, args: [CheckoutLoginComponent,] }],
3853
- options: [{ type: Input }],
3854
- applicationUser: [{ type: Input }]
3855
- };
3856
-
3857
- class CheckoutOverviewRelationAddressComponent {
3858
- constructor(_dictionary, _connector) {
3859
- this._dictionary = _dictionary;
3860
- this._connector = _connector;
3861
- this.countries = [];
3862
- this.fields = { text: "description", value: "code" };
3863
- this.postalCodeCheckErrorMessage = "";
3864
- this._prevPostalCodeForCheck = "";
3865
- }
3866
- set address(address) {
3867
- this._address = address;
3868
- }
3869
- get address() {
3870
- if (this._address === undefined) {
3871
- this._address = new Address();
3872
- }
3873
- return this._address;
3818
+ get address() {
3819
+ if (this._address === undefined) {
3820
+ this._address = new Address();
3821
+ }
3822
+ return this._address;
3874
3823
  }
3875
3824
  ngOnInit() {
3876
3825
  return __awaiter(this, void 0, void 0, function* () {
@@ -3962,6 +3911,56 @@ CheckoutOverviewRelationAddressComponent.propDecorators = {
3962
3911
  address: [{ type: Input }]
3963
3912
  };
3964
3913
 
3914
+ class CheckoutTransactionComponent {
3915
+ constructor(service) {
3916
+ this.service = service;
3917
+ }
3918
+ get canPrevious() {
3919
+ var _a;
3920
+ return this.checkout && ((_a = this.checkout.stepper) === null || _a === void 0 ? void 0 : _a.selectedIndex) !== 0;
3921
+ }
3922
+ get canContinue() {
3923
+ var _a;
3924
+ return this.checkout && ((_a = this.checkout.stepper) === null || _a === void 0 ? void 0 : _a.selectedIndex) !== 3;
3925
+ }
3926
+ get started() {
3927
+ var _a;
3928
+ return this.checkout && ((_a = this.checkout.stepper) === null || _a === void 0 ? void 0 : _a.selectedIndex) === 0;
3929
+ }
3930
+ get finished() {
3931
+ return this.checkout && this.checkout.finished;
3932
+ }
3933
+ continueCheckout() {
3934
+ this.checkout.continue();
3935
+ }
3936
+ previousCheckout() {
3937
+ this.checkout.previous();
3938
+ }
3939
+ }
3940
+ CheckoutTransactionComponent.decorators = [
3941
+ { type: Component, args: [{
3942
+ selector: "app-checkout-transaction",
3943
+ template: `
3944
+ <ng-container [ngTemplateOutlet]="content"></ng-container>
3945
+ <app-checkout class="checkout"></app-checkout>
3946
+ <ng-container [ngTemplateOutlet]="content"></ng-container>
3947
+ <ng-template #content>
3948
+ <div class="checkout-transaction-viewport checkout-row-end">
3949
+ <co-button [label]="'BACK'| localize" [disabled]="!canPrevious" (click)="previousCheckout()"></co-button>
3950
+ <co-button [label]="'CONTINUE'| localize" [disabled]="!canContinue" (click)="continueCheckout()"></co-button>
3951
+ </div>
3952
+ </ng-template>
3953
+ `,
3954
+ styles: [".checkout-transaction-viewport{max-width:60%;margin-left:20%}.checkout-row-end{display:flex;flex-direction:row;grid-column-gap:10px;-moz-column-gap:10px;column-gap:10px;justify-content:flex-end}\n"]
3955
+ },] }
3956
+ ];
3957
+ CheckoutTransactionComponent.ctorParameters = () => [
3958
+ { type: TransactionService }
3959
+ ];
3960
+ CheckoutTransactionComponent.propDecorators = {
3961
+ checkout: [{ type: ViewChild, args: [CheckoutComponent, { static: true },] }]
3962
+ };
3963
+
3965
3964
  class CheckoutOverviewDeliveryAddressComponent {
3966
3965
  constructor(service) {
3967
3966
  this.service = service;
@@ -4452,7 +4451,7 @@ IoneCheckoutModule.decorators = [
4452
4451
  CheckoutOverviewRelationEditComponent,
4453
4452
  CheckoutOverviewRelationAddressComponent,
4454
4453
  CheckoutOverviewDeliveryEditComponent,
4455
- RetailTransactionCheckoutComponent,
4454
+ CheckoutTransactionComponent,
4456
4455
  CheckoutOverviewDeliveryAddressComponent,
4457
4456
  CheckOutRelationSuggestionsListComponent,
4458
4457
  CheckOutRelationSuggestionsListItemComponent,
@@ -5196,7 +5195,7 @@ ShoppingCartComponent.decorators = [
5196
5195
  </co-form>
5197
5196
  </co-dialog>
5198
5197
  `,
5199
- styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.shopping-cart-totals{padding-bottom:20px}.shopping-cart-totals{padding-top:20px}.cart-header{margin-top:20px}.cart-header{margin-bottom:20px}.cart-header .view-mode-buttons{margin-left:11px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{background-color:#fff;opacity:1;display:flex;flex-direction:column;height:100%;color:#22313c}.cart-header{display:flex;justify-content:space-between}.cart-header .cart-header-label{font-weight:bold}.cart-header .view-mode-buttons{display:flex;flex-direction:row}.cart-header .view-mode-buttons co-button{padding:0}.cart-header .view-mode-buttons co-button ::ng-deep co-button{border-radius:0}.cart-header .view-mode-buttons co-button:first-child ::ng-deep co-button{border-radius:3px}.cart-header .view-mode-buttons co-button:nth-child(2) ::ng-deep co-button{border-top-left-radius:3px;border-bottom-left-radius:3px}.cart-header .view-mode-buttons co-button:last-child ::ng-deep co-button{border-top-right-radius:3px;border-bottom-right-radius:3px}.cart-lines{display:flex;height:100%;overflow:auto}.shopping-cart-totals{align-items:flex-end}.shopping-cart-totals>div{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.shopping-cart-totals>div span:last-of-type{min-width:6em;text-align:right}.shopping-cart-totals div:last-of-type{font-weight:bold}\n", ":host .shopping-cart-viewport{max-width:60%;margin-left:20%}:host .shopping-cart-row-end{display:flex;flex-direction:row;grid-column-gap:10px;-moz-column-gap:10px;column-gap:10px;justify-content:flex-end}\n"]
5198
+ styles: ["html,body{height:100%}body{margin:0;font-family:Roboto,\"Helvetica Neue\",sans-serif}.flex-center{display:flex}.flex-center{flex-direction:row}.flex-center{align-items:center!important;justify-content:center!important}.shopping-cart-totals{padding-bottom:20px}.shopping-cart-totals{padding-top:20px}.cart-header{margin-top:20px}.cart-header{margin-bottom:20px}.cart-header .view-mode-buttons{margin-left:11px}.triangle{border-radius:3px}.full-width{width:100%}.flex-center{margin:10px 0}:host{background-color:#fff;opacity:1;display:flex;flex-direction:column;height:100%;color:#22313c}:host .shopping-cart-viewport{max-width:60%;margin-left:20%}:host .shopping-cart-row-end{display:flex;flex-direction:row;grid-column-gap:10px;-moz-column-gap:10px;column-gap:10px;justify-content:flex-end}.cart-header{display:flex;justify-content:space-between}.cart-header .cart-header-label{font-weight:bold}.cart-header .view-mode-buttons{display:flex;flex-direction:row}.cart-header .view-mode-buttons co-button{padding:0}.cart-header .view-mode-buttons co-button ::ng-deep co-button{border-radius:0}.cart-header .view-mode-buttons co-button:first-child ::ng-deep co-button{border-radius:3px}.cart-header .view-mode-buttons co-button:nth-child(2) ::ng-deep co-button{border-top-left-radius:3px;border-bottom-left-radius:3px}.cart-header .view-mode-buttons co-button:last-child ::ng-deep co-button{border-top-right-radius:3px;border-bottom-right-radius:3px}.cart-lines{display:flex;height:100%;overflow:auto}.shopping-cart-totals{align-items:flex-end}.shopping-cart-totals>div{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.shopping-cart-totals>div span:last-of-type{min-width:6em;text-align:right}.shopping-cart-totals div:last-of-type{font-weight:bold}\n"]
5200
5199
  },] }
5201
5200
  ];
5202
5201
  ShoppingCartComponent.ctorParameters = () => [
@@ -8294,5 +8293,5 @@ IoneServiceOrderModule.decorators = [
8294
8293
  * Generated bundle index. Do not edit.
8295
8294
  */
8296
8295
 
8297
- export { IoneCheckoutComponent, IoneCheckoutModule, IoneServiceOrderComponent, IoneServiceOrderModule, IoneShoppingCartComponent, IoneShoppingCartModule, RetailTransactionCheckoutComponent as ɵa, CheckoutComponent as ɵb, ShoppingCartManagerComponent as ɵba, ShoppingCartComponent as ɵbb, ShoppingCartLineComponent as ɵbc, StockStatusIndicatorComponent as ɵbd, CharacteristicAnswerComponent as ɵbe, TemplateWrapperDirective as ɵbf, DefaultOkCancelButtonsComponent as ɵbg, ServiceOrderComponent as ɵbh, TransactionBaseComponent as ɵbi, TransactionArticleTextComponent as ɵbj, TransactionManagerComponent as ɵbk, TransactionOrderTotalsComponent as ɵbl, TransactionOrderLineViewComponent as ɵbm, TransactionOrderLinesComponent as ɵbn, TransactionRelationAddressComponent as ɵbo, TransactionArticleTextOverviewComponent as ɵbp, TransactionEditArticleTextComponent as ɵbq, TransactionSidebarRightComponent as ɵbr, TransactionLineAccordionComponent as ɵbs, TransactionHeaderBlockComponent as ɵbt, TransactionRelationEditComponent as ɵbu, TransactionServiceSummaryComponent as ɵbv, TransactionSummaryBlockComponent as ɵbw, TransactionServiceStatusComponent as ɵbx, TransactionOrderSummaryComponent as ɵby, TransactionPaymentInfoComponent as ɵbz, CheckoutOverviewComponent as ɵc, TransactionArticleSummaryComponent as ɵca, TransactionDeliverySummaryComponent as ɵcb, TransactionProductContractSummaryComponent as ɵcc, TransactionProductSummaryComponent as ɵcd, WarehouseComponent as ɵce, CheckoutOverviewBlockComponent as ɵd, CheckoutOverviewRelationEditComponent as ɵe, TransactionService as ɵf, IOneConnectorAdapterService as ɵg, CheckoutOverviewDeliveryEditComponent as ɵh, DictionaryService as ɵi, CheckoutLoginComponent as ɵj, OptionsService as ɵk, TransactionEventService as ɵl, CoreModule as ɵm, AppendPipe as ɵn, DeliveryTimePipe as ɵo, DateDurationPipe as ɵp, LocalizePipe as ɵq, CoCurrencyPipe as ɵr, SafeStylePipe as ɵs, ImageDisplayComponent as ɵt, NoImageDisplayComponent as ɵu, IconComponent as ɵv, CheckoutOverviewRelationAddressComponent as ɵw, CheckoutOverviewDeliveryAddressComponent as ɵx, CheckOutRelationSuggestionsListComponent as ɵy, CheckOutRelationSuggestionsListItemComponent as ɵz };
8296
+ export { IoneCheckoutComponent, IoneCheckoutModule, IoneServiceOrderComponent, IoneServiceOrderModule, IoneShoppingCartComponent, IoneShoppingCartModule, CheckoutLoginComponent as ɵa, OptionsService as ɵb, ShoppingCartManagerComponent as ɵba, ShoppingCartComponent as ɵbb, ShoppingCartLineComponent as ɵbc, StockStatusIndicatorComponent as ɵbd, CharacteristicAnswerComponent as ɵbe, TemplateWrapperDirective as ɵbf, DefaultOkCancelButtonsComponent as ɵbg, ServiceOrderComponent as ɵbh, TransactionBaseComponent as ɵbi, TransactionArticleTextComponent as ɵbj, TransactionManagerComponent as ɵbk, TransactionOrderTotalsComponent as ɵbl, TransactionOrderLineViewComponent as ɵbm, TransactionOrderLinesComponent as ɵbn, TransactionRelationAddressComponent as ɵbo, TransactionArticleTextOverviewComponent as ɵbp, TransactionEditArticleTextComponent as ɵbq, TransactionSidebarRightComponent as ɵbr, TransactionLineAccordionComponent as ɵbs, TransactionHeaderBlockComponent as ɵbt, TransactionRelationEditComponent as ɵbu, TransactionServiceSummaryComponent as ɵbv, TransactionSummaryBlockComponent as ɵbw, TransactionServiceStatusComponent as ɵbx, TransactionOrderSummaryComponent as ɵby, TransactionPaymentInfoComponent as ɵbz, IOneConnectorAdapterService as ɵc, TransactionArticleSummaryComponent as ɵca, TransactionDeliverySummaryComponent as ɵcb, TransactionProductContractSummaryComponent as ɵcc, TransactionProductSummaryComponent as ɵcd, WarehouseComponent as ɵce, DictionaryService as ɵd, TransactionService as ɵe, TransactionEventService as ɵf, CoreModule as ɵg, AppendPipe as ɵh, DeliveryTimePipe as ɵi, DateDurationPipe as ɵj, LocalizePipe as ɵk, CoCurrencyPipe as ɵl, SafeStylePipe as ɵm, ImageDisplayComponent as ɵn, NoImageDisplayComponent as ɵo, IconComponent as ɵp, CheckoutComponent as ɵq, CheckoutOverviewComponent as ɵr, CheckoutOverviewBlockComponent as ɵs, CheckoutOverviewRelationEditComponent as ɵt, CheckoutOverviewDeliveryEditComponent as ɵu, CheckoutOverviewRelationAddressComponent as ɵv, CheckoutTransactionComponent as ɵw, CheckoutOverviewDeliveryAddressComponent as ɵx, CheckOutRelationSuggestionsListComponent as ɵy, CheckOutRelationSuggestionsListItemComponent as ɵz };
8298
8297
  //# sourceMappingURL=colijnit-transaction.js.map