@colijnit/transaction 12.1.43 → 12.1.44
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.
- package/bundles/colijnit-transaction.umd.js +133 -133
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/transaction-search/service/transaction-search.service.js +25 -1
- package/esm2015/lib/component/transaction-search/transaction-search.component.js +34 -56
- package/fesm2015/colijnit-transaction.js +158 -158
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/transaction-search/service/transaction-search.service.d.ts +10 -0
- package/lib/component/transaction-search/transaction-search.component.d.ts +2 -10
- package/package.json +1 -1
- package/colijnit-transaction-12.1.43.tgz +0 -0
|
@@ -65,7 +65,7 @@ import { ResolveHeaderPendingReasonRequest } from '@colijnit/transactionapi/buil
|
|
|
65
65
|
import { DocDeliveryBatch } from '@colijnit/transactionapi/build/model/doc-delivery-batch.bo';
|
|
66
66
|
import { NULL_CUSTOMER_FULL_OBJECT, NULL_RELATION_OBJECT } from '@colijnit/transactionapi/build/model/nul-relation-object';
|
|
67
67
|
import { RelationKind } from '@colijnit/transactionapi/build/enum/relation-kind.enum';
|
|
68
|
-
import { FormMasterService, CoDialogModule, ButtonModule, CollapsibleModule, InputCheckboxModule, InputTextModule, InputComboBoxModule, FormModule, InputRadioButtonModule, IconModule, InputListboxModule, DropDownModule, ClickoutsideModule, InputTextComponent, InputSearchModule, InputDatePickerComponent, InputDatePickerModule, InputNumberPickerModule, PriceDisplayPipeModule, Carousel3dModule, InputTextareaComponent, InputTextareaModule, CoDialogPromptModule, MultiSelectListModule, PopupModule, CoSidebarModule, CoGridModule, CoRichTextEditorModule, CarouselModule, ColumnAlign, SimpleGridColumnDirective, SimpleGridModule, GridToolbarButtonModule,
|
|
68
|
+
import { FormMasterService, CoDialogModule, ButtonModule, CollapsibleModule, InputCheckboxModule, InputTextModule, InputComboBoxModule, FormModule, InputRadioButtonModule, IconModule, InputListboxModule, DropDownModule, ClickoutsideModule, InputTextComponent, InputSearchModule, InputDatePickerComponent, InputDatePickerModule, InputNumberPickerModule, PriceDisplayPipeModule, Carousel3dModule, InputTextareaComponent, InputTextareaModule, CoDialogPromptModule, MultiSelectListModule, PopupModule, CoSidebarModule, CoGridModule, CoRichTextEditorModule, CarouselModule, ColumnAlign, SimpleGridColumnDirective, SimpleGridModule, GridToolbarButtonModule, CoOrientation, CoDirection, InputDateRangePickerModule, FilterItemModule, PaginationModule, PaginationBarModule, IconCollapseHandleModule } from '@colijnit/corecomponents_v12';
|
|
69
69
|
import { FlexModule } from '@angular/flex-layout';
|
|
70
70
|
import { AddressType } from '@colijnit/transactionapi/build/enum/address-type.enum';
|
|
71
71
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
@@ -15639,11 +15639,149 @@ var SearchViewMode;
|
|
|
15639
15639
|
SearchViewMode[SearchViewMode["SideBar"] = 1] = "SideBar";
|
|
15640
15640
|
})(SearchViewMode || (SearchViewMode = {}));
|
|
15641
15641
|
|
|
15642
|
+
var SearchBarViewMode;
|
|
15643
|
+
(function (SearchBarViewMode) {
|
|
15644
|
+
SearchBarViewMode[SearchBarViewMode["Expanded"] = 0] = "Expanded";
|
|
15645
|
+
SearchBarViewMode[SearchBarViewMode["Collapsed"] = 1] = "Collapsed";
|
|
15646
|
+
})(SearchBarViewMode || (SearchBarViewMode = {}));
|
|
15647
|
+
class TransactionSearchComponent {
|
|
15648
|
+
constructor(transactionSearchService) {
|
|
15649
|
+
this.transactionSearchService = transactionSearchService;
|
|
15650
|
+
this.searchViewModes = SearchViewMode;
|
|
15651
|
+
this.orientations = CoOrientation;
|
|
15652
|
+
this.directionRight = CoDirection.Right;
|
|
15653
|
+
this.transactionClick = new EventEmitter();
|
|
15654
|
+
this.searchViewModeChange = new EventEmitter();
|
|
15655
|
+
}
|
|
15656
|
+
set transactionType(value) {
|
|
15657
|
+
this._transactionType = value;
|
|
15658
|
+
this.transactionSearchService.transactionType = this._transactionType;
|
|
15659
|
+
}
|
|
15660
|
+
get transactionType() {
|
|
15661
|
+
return this._transactionType;
|
|
15662
|
+
}
|
|
15663
|
+
showClass() {
|
|
15664
|
+
return true;
|
|
15665
|
+
}
|
|
15666
|
+
onTransactionClick(transaction) {
|
|
15667
|
+
if (this.transactionSearchService.activeSearchViewMode === this.searchViewModes.FullScreen) {
|
|
15668
|
+
this.collapseSearchBar();
|
|
15669
|
+
}
|
|
15670
|
+
this._scrollToTop();
|
|
15671
|
+
this.transactionClick.emit(transaction);
|
|
15672
|
+
}
|
|
15673
|
+
onSearchViewResizeClick() {
|
|
15674
|
+
if (this.transactionSearchService.activeSearchViewMode === this.searchViewModes.SideBar) {
|
|
15675
|
+
this.transactionSearchService.activeSearchViewMode = this.searchViewModes.FullScreen;
|
|
15676
|
+
}
|
|
15677
|
+
else {
|
|
15678
|
+
this.transactionSearchService.activeSearchViewMode = this.searchViewModes.SideBar;
|
|
15679
|
+
}
|
|
15680
|
+
this.searchViewModeChange.emit(this.transactionSearchService.activeSearchViewMode);
|
|
15681
|
+
}
|
|
15682
|
+
onSideCollapseHandleClick() {
|
|
15683
|
+
this.toggleSearchBar();
|
|
15684
|
+
}
|
|
15685
|
+
toggleSearchBar() {
|
|
15686
|
+
if (this.transactionSearchService.collapsed || this.transactionSearchService.fullscreen) {
|
|
15687
|
+
this.expandSearchBar();
|
|
15688
|
+
}
|
|
15689
|
+
else {
|
|
15690
|
+
this.collapseSearchBar();
|
|
15691
|
+
}
|
|
15692
|
+
}
|
|
15693
|
+
collapseSearchBar() {
|
|
15694
|
+
this.transactionSearchService.activeSearchViewMode = this.searchViewModes.SideBar;
|
|
15695
|
+
this.transactionSearchService.activeSearchBarViewMode = SearchBarViewMode.Collapsed;
|
|
15696
|
+
this.searchViewModeChange.emit(this.searchViewModes.SideBar);
|
|
15697
|
+
}
|
|
15698
|
+
expandSearchBar() {
|
|
15699
|
+
this.transactionSearchService.activeSearchViewMode = this.searchViewModes.SideBar;
|
|
15700
|
+
this.transactionSearchService.activeSearchBarViewMode = SearchBarViewMode.Expanded;
|
|
15701
|
+
this.searchViewModeChange.emit(this.searchViewModes.SideBar);
|
|
15702
|
+
}
|
|
15703
|
+
calculateClasses() {
|
|
15704
|
+
return {
|
|
15705
|
+
'fullscreen': this.transactionSearchService.fullscreen,
|
|
15706
|
+
'sidebar': !this.transactionSearchService.fullscreen,
|
|
15707
|
+
'collapsed': this.transactionSearchService.collapsed,
|
|
15708
|
+
'expanded': !this.transactionSearchService.collapsed,
|
|
15709
|
+
};
|
|
15710
|
+
}
|
|
15711
|
+
_scrollToTop() {
|
|
15712
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
15713
|
+
}
|
|
15714
|
+
}
|
|
15715
|
+
TransactionSearchComponent.decorators = [
|
|
15716
|
+
{ type: Component, args: [{
|
|
15717
|
+
selector: 'co-transaction-search',
|
|
15718
|
+
template: `
|
|
15719
|
+
<div class="transaction-search-main-wrapper">
|
|
15720
|
+
<div class="transaction-search-wrapper"
|
|
15721
|
+
[ngClass]="calculateClasses()">
|
|
15722
|
+
<div class="transaction-filter-wrapper narrow-scrollbar"
|
|
15723
|
+
[ngClass]="calculateClasses()"
|
|
15724
|
+
*ngIf="transactionSearchService.showFilterSidebar" @showHideFilterSidebar>
|
|
15725
|
+
<co-transaction-filter
|
|
15726
|
+
[transactionType]="transactionType"
|
|
15727
|
+
[activeSearchViewMode]="transactionSearchService.activeSearchViewMode"
|
|
15728
|
+
(closeButtonClick)="transactionSearchService.handleHideFilter()"
|
|
15729
|
+
(resetFilterClick)="transactionSearchService.handleResetFilter()"></co-transaction-filter>
|
|
15730
|
+
</div>
|
|
15731
|
+
<div class="transaction-search-result-wrapper"
|
|
15732
|
+
[class.fullscreen]="transactionSearchService.fullscreen"
|
|
15733
|
+
[class.sidebar]="!transactionSearchService.fullscreen"
|
|
15734
|
+
[class.collapsed]="transactionSearchService.collapsed"
|
|
15735
|
+
[class.expanded]="!transactionSearchService.collapsed"
|
|
15736
|
+
>
|
|
15737
|
+
<co-transaction-search-result
|
|
15738
|
+
[transactionType]="transactionType"
|
|
15739
|
+
[activeSearchViewMode]="transactionSearchService.activeSearchViewMode"
|
|
15740
|
+
(filterClick)="transactionSearchService.toggleFilter()"
|
|
15741
|
+
(transactionClick)="onTransactionClick($event)"
|
|
15742
|
+
(resizeClick)="onSearchViewResizeClick()"
|
|
15743
|
+
(closeClick)="collapseSearchBar()"
|
|
15744
|
+
></co-transaction-search-result>
|
|
15745
|
+
</div>
|
|
15746
|
+
</div>
|
|
15747
|
+
<div class="transaction-search-content-wrapper"
|
|
15748
|
+
[class.fullscreen]="transactionSearchService.fullscreen"
|
|
15749
|
+
[class.sidebar]="!transactionSearchService.fullscreen"
|
|
15750
|
+
[class.collapsed]="transactionSearchService.collapsed"
|
|
15751
|
+
[class.expanded]="!transactionSearchService.collapsed"
|
|
15752
|
+
>
|
|
15753
|
+
<ng-content></ng-content>
|
|
15754
|
+
</div>
|
|
15755
|
+
</div>
|
|
15756
|
+
`,
|
|
15757
|
+
animations: [
|
|
15758
|
+
trigger("showHideFilterSidebar", [
|
|
15759
|
+
state("void", style({ transform: 'translateX(-100%)' })),
|
|
15760
|
+
state("*", style({ transform: 'translateX(0)' })),
|
|
15761
|
+
transition("void <=> *", animate("200ms ease-in-out"))
|
|
15762
|
+
])
|
|
15763
|
+
],
|
|
15764
|
+
encapsulation: ViewEncapsulation.None
|
|
15765
|
+
},] }
|
|
15766
|
+
];
|
|
15767
|
+
TransactionSearchComponent.ctorParameters = () => [
|
|
15768
|
+
{ type: TransactionSearchService }
|
|
15769
|
+
];
|
|
15770
|
+
TransactionSearchComponent.propDecorators = {
|
|
15771
|
+
transactionType: [{ type: Input }],
|
|
15772
|
+
transactionClick: [{ type: Output }],
|
|
15773
|
+
searchViewModeChange: [{ type: Output }],
|
|
15774
|
+
showClass: [{ type: HostBinding, args: ["class.co-transaction-search",] }]
|
|
15775
|
+
};
|
|
15776
|
+
|
|
15642
15777
|
class TransactionSearchService {
|
|
15643
15778
|
constructor(_transactionService) {
|
|
15644
15779
|
this._transactionService = _transactionService;
|
|
15645
15780
|
this.searchRequest = new TransactionSearchViewRequest();
|
|
15646
15781
|
this.previousSearchRequest = new TransactionSearchViewRequest();
|
|
15782
|
+
this.activeSearchViewMode = SearchViewMode.FullScreen;
|
|
15783
|
+
this.activeSearchBarViewMode = SearchBarViewMode.Expanded;
|
|
15784
|
+
this.showFilterSidebar = false;
|
|
15647
15785
|
this.transactions = [];
|
|
15648
15786
|
this.labelBasedOnTransactionType = new Map([
|
|
15649
15787
|
[TransactionKind.SalesOrder, "SALESORDERS"],
|
|
@@ -15703,6 +15841,25 @@ class TransactionSearchService {
|
|
|
15703
15841
|
isNewGeneralSearch() {
|
|
15704
15842
|
return this.previousSearchRequest && this.previousSearchRequest.general !== this.searchRequest.general;
|
|
15705
15843
|
}
|
|
15844
|
+
get fullscreen() {
|
|
15845
|
+
return this.activeSearchViewMode === SearchViewMode.FullScreen;
|
|
15846
|
+
}
|
|
15847
|
+
get collapsed() {
|
|
15848
|
+
return this.activeSearchBarViewMode === SearchBarViewMode.Collapsed;
|
|
15849
|
+
}
|
|
15850
|
+
toggleFilter() {
|
|
15851
|
+
this.showFilterSidebar = !this.showFilterSidebar;
|
|
15852
|
+
}
|
|
15853
|
+
handleHideFilter() {
|
|
15854
|
+
this.showFilterSidebar = false;
|
|
15855
|
+
}
|
|
15856
|
+
handleResetFilter() {
|
|
15857
|
+
this.resetFilters();
|
|
15858
|
+
this.showFilterSidebar = false;
|
|
15859
|
+
setTimeout(() => {
|
|
15860
|
+
this.showFilterSidebar = true;
|
|
15861
|
+
}, 10);
|
|
15862
|
+
}
|
|
15706
15863
|
}
|
|
15707
15864
|
TransactionSearchService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionSearchService_Factory() { return new TransactionSearchService(i0.ɵɵinject(TransactionService)); }, token: TransactionSearchService, providedIn: "root" });
|
|
15708
15865
|
TransactionSearchService.decorators = [
|
|
@@ -18034,163 +18191,6 @@ ShoppingCartModule.decorators = [
|
|
|
18034
18191
|
},] }
|
|
18035
18192
|
];
|
|
18036
18193
|
|
|
18037
|
-
var SearchBarViewMode;
|
|
18038
|
-
(function (SearchBarViewMode) {
|
|
18039
|
-
SearchBarViewMode[SearchBarViewMode["Expanded"] = 0] = "Expanded";
|
|
18040
|
-
SearchBarViewMode[SearchBarViewMode["Collapsed"] = 1] = "Collapsed";
|
|
18041
|
-
})(SearchBarViewMode || (SearchBarViewMode = {}));
|
|
18042
|
-
class TransactionSearchComponent {
|
|
18043
|
-
constructor(_transactionSearchService) {
|
|
18044
|
-
this._transactionSearchService = _transactionSearchService;
|
|
18045
|
-
this.searchViewModes = SearchViewMode;
|
|
18046
|
-
this.orientations = CoOrientation;
|
|
18047
|
-
this.directionRight = CoDirection.Right;
|
|
18048
|
-
this.activeSearchViewMode = SearchViewMode.FullScreen;
|
|
18049
|
-
this.activeSearchBarViewMode = SearchBarViewMode.Expanded;
|
|
18050
|
-
this.showFilterSidebar = false;
|
|
18051
|
-
this.transactionClick = new EventEmitter();
|
|
18052
|
-
this.searchViewModeChange = new EventEmitter();
|
|
18053
|
-
}
|
|
18054
|
-
set transactionType(value) {
|
|
18055
|
-
this._transactionType = value;
|
|
18056
|
-
this._transactionSearchService.transactionType = this._transactionType;
|
|
18057
|
-
}
|
|
18058
|
-
get transactionType() {
|
|
18059
|
-
return this._transactionType;
|
|
18060
|
-
}
|
|
18061
|
-
showClass() {
|
|
18062
|
-
return true;
|
|
18063
|
-
}
|
|
18064
|
-
get fullscreen() {
|
|
18065
|
-
return this.activeSearchViewMode === SearchViewMode.FullScreen;
|
|
18066
|
-
}
|
|
18067
|
-
get collapsed() {
|
|
18068
|
-
return this.activeSearchBarViewMode === SearchBarViewMode.Collapsed;
|
|
18069
|
-
}
|
|
18070
|
-
toggleFilter() {
|
|
18071
|
-
this.showFilterSidebar = !this.showFilterSidebar;
|
|
18072
|
-
}
|
|
18073
|
-
handleHideFilter() {
|
|
18074
|
-
this.showFilterSidebar = false;
|
|
18075
|
-
}
|
|
18076
|
-
handleResetFilter() {
|
|
18077
|
-
this._transactionSearchService.resetFilters();
|
|
18078
|
-
this.showFilterSidebar = false;
|
|
18079
|
-
setTimeout(() => {
|
|
18080
|
-
this.showFilterSidebar = true;
|
|
18081
|
-
}, 10);
|
|
18082
|
-
}
|
|
18083
|
-
onTransactionClick(transaction) {
|
|
18084
|
-
if (this.activeSearchViewMode === this.searchViewModes.FullScreen) {
|
|
18085
|
-
this.collapseSearchBar();
|
|
18086
|
-
}
|
|
18087
|
-
this._scrollToTop();
|
|
18088
|
-
this.transactionClick.emit(transaction);
|
|
18089
|
-
}
|
|
18090
|
-
onSearchViewResizeClick() {
|
|
18091
|
-
if (this.activeSearchViewMode === this.searchViewModes.SideBar) {
|
|
18092
|
-
this.activeSearchViewMode = this.searchViewModes.FullScreen;
|
|
18093
|
-
}
|
|
18094
|
-
else {
|
|
18095
|
-
this.activeSearchViewMode = this.searchViewModes.SideBar;
|
|
18096
|
-
}
|
|
18097
|
-
this.searchViewModeChange.emit(this.activeSearchViewMode);
|
|
18098
|
-
}
|
|
18099
|
-
onSideCollapseHandleClick() {
|
|
18100
|
-
this.toggleSearchBar();
|
|
18101
|
-
}
|
|
18102
|
-
toggleSearchBar() {
|
|
18103
|
-
if (this.collapsed || this.fullscreen) {
|
|
18104
|
-
this.expandSearchBar();
|
|
18105
|
-
}
|
|
18106
|
-
else {
|
|
18107
|
-
this.collapseSearchBar();
|
|
18108
|
-
}
|
|
18109
|
-
}
|
|
18110
|
-
collapseSearchBar() {
|
|
18111
|
-
this.activeSearchViewMode = this.searchViewModes.SideBar;
|
|
18112
|
-
this.activeSearchBarViewMode = SearchBarViewMode.Collapsed;
|
|
18113
|
-
this.searchViewModeChange.emit(this.activeSearchViewMode);
|
|
18114
|
-
}
|
|
18115
|
-
expandSearchBar() {
|
|
18116
|
-
this.activeSearchViewMode = this.searchViewModes.SideBar;
|
|
18117
|
-
this.activeSearchBarViewMode = SearchBarViewMode.Expanded;
|
|
18118
|
-
this.searchViewModeChange.emit(this.activeSearchViewMode);
|
|
18119
|
-
}
|
|
18120
|
-
calculateClasses() {
|
|
18121
|
-
return {
|
|
18122
|
-
'fullscreen': this.fullscreen,
|
|
18123
|
-
'sidebar': !this.fullscreen,
|
|
18124
|
-
'collapsed': this.collapsed,
|
|
18125
|
-
'expanded': !this.collapsed,
|
|
18126
|
-
};
|
|
18127
|
-
}
|
|
18128
|
-
_scrollToTop() {
|
|
18129
|
-
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
18130
|
-
}
|
|
18131
|
-
}
|
|
18132
|
-
TransactionSearchComponent.decorators = [
|
|
18133
|
-
{ type: Component, args: [{
|
|
18134
|
-
selector: 'co-transaction-search',
|
|
18135
|
-
template: `
|
|
18136
|
-
<div class="transaction-search-main-wrapper">
|
|
18137
|
-
<div class="transaction-search-wrapper"
|
|
18138
|
-
[ngClass]="calculateClasses()">
|
|
18139
|
-
<div class="transaction-filter-wrapper narrow-scrollbar"
|
|
18140
|
-
[ngClass]="calculateClasses()"
|
|
18141
|
-
*ngIf="showFilterSidebar" @showHideFilterSidebar>
|
|
18142
|
-
<co-transaction-filter
|
|
18143
|
-
[transactionType]="transactionType"
|
|
18144
|
-
[activeSearchViewMode]="activeSearchViewMode"
|
|
18145
|
-
(closeButtonClick)="handleHideFilter()"
|
|
18146
|
-
(resetFilterClick)="handleResetFilter()"></co-transaction-filter>
|
|
18147
|
-
</div>
|
|
18148
|
-
<div class="transaction-search-result-wrapper"
|
|
18149
|
-
[class.fullscreen]="fullscreen"
|
|
18150
|
-
[class.sidebar]="!fullscreen"
|
|
18151
|
-
[class.collapsed]="collapsed"
|
|
18152
|
-
[class.expanded]="!collapsed"
|
|
18153
|
-
>
|
|
18154
|
-
<co-transaction-search-result
|
|
18155
|
-
[transactionType]="transactionType"
|
|
18156
|
-
[activeSearchViewMode]="activeSearchViewMode"
|
|
18157
|
-
(filterClick)="toggleFilter()"
|
|
18158
|
-
(transactionClick)="onTransactionClick($event)"
|
|
18159
|
-
(resizeClick)="onSearchViewResizeClick()"
|
|
18160
|
-
(closeClick)="collapseSearchBar()"
|
|
18161
|
-
></co-transaction-search-result>
|
|
18162
|
-
</div>
|
|
18163
|
-
</div>
|
|
18164
|
-
<div class="transaction-search-content-wrapper"
|
|
18165
|
-
[class.fullscreen]="fullscreen"
|
|
18166
|
-
[class.sidebar]="!fullscreen"
|
|
18167
|
-
[class.collapsed]="collapsed"
|
|
18168
|
-
[class.expanded]="!collapsed"
|
|
18169
|
-
>
|
|
18170
|
-
<ng-content></ng-content>
|
|
18171
|
-
</div>
|
|
18172
|
-
</div>
|
|
18173
|
-
`,
|
|
18174
|
-
animations: [
|
|
18175
|
-
trigger("showHideFilterSidebar", [
|
|
18176
|
-
state("void", style({ transform: 'translateX(-100%)' })),
|
|
18177
|
-
state("*", style({ transform: 'translateX(0)' })),
|
|
18178
|
-
transition("void <=> *", animate("200ms ease-in-out"))
|
|
18179
|
-
])
|
|
18180
|
-
],
|
|
18181
|
-
encapsulation: ViewEncapsulation.None
|
|
18182
|
-
},] }
|
|
18183
|
-
];
|
|
18184
|
-
TransactionSearchComponent.ctorParameters = () => [
|
|
18185
|
-
{ type: TransactionSearchService }
|
|
18186
|
-
];
|
|
18187
|
-
TransactionSearchComponent.propDecorators = {
|
|
18188
|
-
transactionType: [{ type: Input }],
|
|
18189
|
-
transactionClick: [{ type: Output }],
|
|
18190
|
-
searchViewModeChange: [{ type: Output }],
|
|
18191
|
-
showClass: [{ type: HostBinding, args: ["class.co-transaction-search",] }]
|
|
18192
|
-
};
|
|
18193
|
-
|
|
18194
18194
|
class TransactionFilterComponent {
|
|
18195
18195
|
constructor(_mappingService, _compFactoryResolver, appRef, injector, searchService) {
|
|
18196
18196
|
this._mappingService = _mappingService;
|