@colijnit/transaction 12.1.25 → 12.1.26

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.
@@ -11431,9 +11431,6 @@
11431
11431
  TransactionSearchSalesOrderGridComponent.prototype.showClass = function () {
11432
11432
  return true;
11433
11433
  };
11434
- TransactionSearchSalesOrderGridComponent.prototype.onTransactionClick = function (event) {
11435
- console.log(this.searchService.transactions.length);
11436
- };
11437
11434
  return TransactionSearchSalesOrderGridComponent;
11438
11435
  }(TransactionSearchGridBaseComponent));
11439
11436
  TransactionSearchSalesOrderGridComponent.decorators = [
@@ -13017,15 +13014,22 @@
13017
13014
  },] }
13018
13015
  ];
13019
13016
 
13017
+ exports.SearchBarViewMode = void 0;
13018
+ (function (SearchBarViewMode) {
13019
+ SearchBarViewMode[SearchBarViewMode["Expanded"] = 0] = "Expanded";
13020
+ SearchBarViewMode[SearchBarViewMode["Collapsed"] = 1] = "Collapsed";
13021
+ })(exports.SearchBarViewMode || (exports.SearchBarViewMode = {}));
13020
13022
  var TransactionSearchComponent = /** @class */ (function () {
13021
13023
  function TransactionSearchComponent(_transactionSearchService) {
13022
13024
  this._transactionSearchService = _transactionSearchService;
13023
13025
  this.searchViewModes = SearchViewMode;
13026
+ this.orientations = corecomponents_v12.CoOrientation;
13027
+ this.directionRight = corecomponents_v12.CoDirection.Right;
13024
13028
  this.activeSearchViewMode = SearchViewMode.FullScreen;
13025
- this.closeClick = new i0.EventEmitter();
13029
+ this.activeSearchBarViewMode = exports.SearchBarViewMode.Expanded;
13030
+ this.showFilterSidebar = false;
13026
13031
  this.transactionClick = new i0.EventEmitter();
13027
13032
  this.searchViewModeChange = new i0.EventEmitter();
13028
- this.showFilterSidebar = false;
13029
13033
  }
13030
13034
  Object.defineProperty(TransactionSearchComponent.prototype, "transactionType", {
13031
13035
  get: function () {
@@ -13048,6 +13052,13 @@
13048
13052
  enumerable: false,
13049
13053
  configurable: true
13050
13054
  });
13055
+ Object.defineProperty(TransactionSearchComponent.prototype, "collapsed", {
13056
+ get: function () {
13057
+ return this.activeSearchBarViewMode === exports.SearchBarViewMode.Collapsed;
13058
+ },
13059
+ enumerable: false,
13060
+ configurable: true
13061
+ });
13051
13062
  TransactionSearchComponent.prototype.toggleFilter = function () {
13052
13063
  this.showFilterSidebar = !this.showFilterSidebar;
13053
13064
  };
@@ -13058,12 +13069,18 @@
13058
13069
  var _this = this;
13059
13070
  this._transactionSearchService.resetFilters();
13060
13071
  this.showFilterSidebar = false;
13061
- setTimeout(function () { _this.showFilterSidebar = true; }, 10);
13072
+ setTimeout(function () {
13073
+ _this.showFilterSidebar = true;
13074
+ }, 10);
13062
13075
  };
13063
13076
  TransactionSearchComponent.prototype.onTransactionClick = function (transaction) {
13077
+ if (this.activeSearchViewMode === this.searchViewModes.FullScreen) {
13078
+ this.collapseSearchBar();
13079
+ }
13080
+ this._scrollToTop();
13064
13081
  this.transactionClick.emit(transaction);
13065
13082
  };
13066
- TransactionSearchComponent.prototype.onResizeClick = function () {
13083
+ TransactionSearchComponent.prototype.onSearchViewResizeClick = function () {
13067
13084
  if (this.activeSearchViewMode === this.searchViewModes.SideBar) {
13068
13085
  this.activeSearchViewMode = this.searchViewModes.FullScreen;
13069
13086
  }
@@ -13072,12 +13089,44 @@
13072
13089
  }
13073
13090
  this.searchViewModeChange.emit(this.activeSearchViewMode);
13074
13091
  };
13092
+ TransactionSearchComponent.prototype.onSideCollapseHandleClick = function () {
13093
+ this.toggleSearchBar();
13094
+ };
13095
+ TransactionSearchComponent.prototype.toggleSearchBar = function () {
13096
+ if (this.collapsed || this.fullscreen) {
13097
+ this.expandSearchBar();
13098
+ }
13099
+ else {
13100
+ this.collapseSearchBar();
13101
+ }
13102
+ };
13103
+ TransactionSearchComponent.prototype.collapseSearchBar = function () {
13104
+ this.activeSearchViewMode = this.searchViewModes.SideBar;
13105
+ this.activeSearchBarViewMode = exports.SearchBarViewMode.Collapsed;
13106
+ this.searchViewModeChange.emit(this.activeSearchViewMode);
13107
+ };
13108
+ TransactionSearchComponent.prototype.expandSearchBar = function () {
13109
+ this.activeSearchViewMode = this.searchViewModes.SideBar;
13110
+ this.activeSearchBarViewMode = exports.SearchBarViewMode.Expanded;
13111
+ this.searchViewModeChange.emit(this.activeSearchViewMode);
13112
+ };
13113
+ TransactionSearchComponent.prototype.calculateClasses = function () {
13114
+ return {
13115
+ 'fullscreen': this.fullscreen,
13116
+ 'sidebar': !this.fullscreen,
13117
+ 'collapsed': this.collapsed,
13118
+ 'expanded': !this.collapsed,
13119
+ };
13120
+ };
13121
+ TransactionSearchComponent.prototype._scrollToTop = function () {
13122
+ document.documentElement.scrollTop = 0;
13123
+ };
13075
13124
  return TransactionSearchComponent;
13076
13125
  }());
13077
13126
  TransactionSearchComponent.decorators = [
13078
13127
  { type: i0.Component, args: [{
13079
13128
  selector: 'co-transaction-search',
13080
- template: "\n <div class=\"transaction-search-wrapper\" [ngClass]=\"fullscreen ? 'fullscreen' : 'sidebar'\">\n <div class=\"transaction-filter-wrapper narrow-scrollbar\" [ngClass]=\"fullscreen ? 'fullscreen' : 'sidebar'\"\n *ngIf=\"showFilterSidebar\" @showHideFilterSidebar>\n <co-transaction-filter\n [transactionType]=\"transactionType\"\n [activeSearchViewMode]=\"activeSearchViewMode\"\n (closeButtonClick)=\"handleHideFilter()\"\n (resetFilterClick)=\"handleResetFilter()\"></co-transaction-filter>\n </div>\n <div class=\"transaction-search-result-wrapper\">\n <co-transaction-search-result\n [transactionType]=\"transactionType\"\n [activeSearchViewMode]=\"activeSearchViewMode\"\n (filterClick)=\"toggleFilter()\"\n (transactionClick)=\"onTransactionClick($event)\"\n (resizeClick)=\"onResizeClick()\"\n (closeClick)=\"closeClick.emit()\"\n ></co-transaction-search-result>\n </div>\n </div>\n <ng-content></ng-content>\n ",
13129
+ template: "\n <div class=\"transaction-search-wrapper\"\n [ngClass]=\"calculateClasses()\">\n <div class=\"transaction-filter-wrapper narrow-scrollbar\"\n [ngClass]=\"calculateClasses()\"\n *ngIf=\"showFilterSidebar\" @showHideFilterSidebar>\n <co-transaction-filter\n [transactionType]=\"transactionType\"\n [activeSearchViewMode]=\"activeSearchViewMode\"\n (closeButtonClick)=\"handleHideFilter()\"\n (resetFilterClick)=\"handleResetFilter()\"></co-transaction-filter>\n </div>\n <div class=\"transaction-search-result-wrapper\" [ngClass]=\"calculateClasses()\">\n <co-transaction-search-result\n [transactionType]=\"transactionType\"\n [activeSearchViewMode]=\"activeSearchViewMode\"\n (filterClick)=\"toggleFilter()\"\n (transactionClick)=\"onTransactionClick($event)\"\n (resizeClick)=\"onSearchViewResizeClick()\"\n (closeClick)=\"collapseSearchBar()\"\n ></co-transaction-search-result>\n </div>\n </div>\n <div class=\"transaction-search-content-wrapper\" [ngClass]=\"calculateClasses()\">\n <ng-content></ng-content>\n </div>\n\n <co-icon-collapse-handle\n class=\"for-sidebar\"\n [ngClass]=\"calculateClasses()\"\n [orientation]=\"orientations.Vertical\"\n [arrowDirection]=\"directionRight\"\n [twoArrows]=\"true\"\n (click)=\"onSideCollapseHandleClick()\">\n </co-icon-collapse-handle>\n ",
13081
13130
  animations: [
13082
13131
  animations.trigger("showHideFilterSidebar", [
13083
13132
  animations.state("void", animations.style({ transform: 'translateX(-100%)' })),
@@ -13092,7 +13141,6 @@
13092
13141
  { type: TransactionSearchService }
13093
13142
  ]; };
13094
13143
  TransactionSearchComponent.propDecorators = {
13095
- closeClick: [{ type: i0.Output }],
13096
13144
  transactionType: [{ type: i0.Input }],
13097
13145
  transactionClick: [{ type: i0.Output }],
13098
13146
  searchViewModeChange: [{ type: i0.Output }],
@@ -14384,6 +14432,7 @@
14384
14432
  });
14385
14433
  TransactionSearchResultComponent.prototype.onTransactionClick = function (transaction) {
14386
14434
  this.selectedTransaction = transaction;
14435
+ this.activeContentViewMode = this.contentViewModes.Tiles;
14387
14436
  this.transactionClick.emit(transaction);
14388
14437
  };
14389
14438
  TransactionSearchResultComponent.prototype.onResizeClick = function () {
@@ -14410,7 +14459,7 @@
14410
14459
  TransactionSearchResultComponent.decorators = [
14411
14460
  { type: i0.Component, args: [{
14412
14461
  selector: 'co-transaction-search-result',
14413
- template: "\n <div class=\"transaction-search-header-wrapper\">\n <co-transaction-search-header\n [transactionType]=\"transactionType\"\n [activeSearchViewMode]=\"activeSearchViewMode\"\n [activeContentViewMode]=\"activeContentViewMode\"\n (viewModeChange)=\"activeContentViewMode = $event\"\n (resizeClick)=\"onResizeClick()\"\n (filterButtonClick)=\"onFilterClick()\"\n (closeClick)=\"onCloseClick()\">\n </co-transaction-search-header>\n </div>\n\n <div class=\"transaction-search-result-content-tiles-wrapper\" [ngClass]=\"fullscreen ? 'fullscreen' : 'sidebar'\"\n *ngIf=\"activeContentViewMode === contentViewModes.Tiles\">\n <div class=\"transaction-tile\" *ngFor=\"let transaction of searchService.transactions\">\n <co-transaction-search-tile\n [transaction]=\"transaction\"\n [transactionType]=\"transactionType\"\n [class]=\"transaction === selectedTransaction ? 'selected' : ''\"\n (transactionClick)=\"onTransactionClick($event)\">\n </co-transaction-search-tile>\n </div>\n </div>\n\n <div class=\"transaction-search-result-content-grid-wrapper\" *ngIf=\"activeContentViewMode === contentViewModes.Grid\">\n <co-transaction-search-grid\n [transactionType]=\"transactionType\"\n (transactionClick)=\"onTransactionClick($event)\"\n ></co-transaction-search-grid>\n </div>\n <co-pagination-bar *ngIf=\"searchService.transactions?.length > 0\"\n [currentPage]=\"searchService.currentPage\"\n [itemsPerPage]=\"searchService.transactionsPerPage\"\n [totalItems]=\"searchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
14462
+ template: "\n <div class=\"transaction-search-header-wrapper\">\n <co-transaction-search-header\n [transactionType]=\"transactionType\"\n [activeSearchViewMode]=\"activeSearchViewMode\"\n [activeContentViewMode]=\"activeContentViewMode\"\n (viewModeChange)=\"activeContentViewMode = $event\"\n (resizeClick)=\"onResizeClick()\"\n (filterButtonClick)=\"onFilterClick()\"\n (closeClick)=\"onCloseClick()\">\n </co-transaction-search-header>\n </div>\n\n <div class=\"transaction-search-result-content-tiles-wrapper\" [ngClass]=\"fullscreen ? 'fullscreen' : 'sidebar'\"\n *ngIf=\"activeContentViewMode === contentViewModes.Tiles\">\n <div class=\"transaction-tile\" *ngFor=\"let transaction of searchService.transactions\">\n <co-transaction-search-tile\n [transaction]=\"transaction\"\n [transactionType]=\"transactionType\"\n [class]=\"transaction === selectedTransaction ? 'selected' : ''\"\n (transactionClick)=\"onTransactionClick($event)\">\n </co-transaction-search-tile>\n </div>\n </div>\n\n <div class=\"transaction-search-result-content-grid-wrapper\" *ngIf=\"activeContentViewMode === contentViewModes.Grid\">\n <co-transaction-search-grid\n [transactionType]=\"transactionType\"\n (transactionClick)=\"onTransactionClick($event)\"\n ></co-transaction-search-grid>\n </div>\n <co-pagination-bar *ngIf=\"searchService.transactions?.length > 0\"\n [currentPage]=\"searchService.currentPage\"\n [itemsPerPage]=\"searchService.transactionsPerPage\"\n [totalItems]=\"searchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"fullscreen\"\n [paginationRange]=\"!fullscreen ? 6 : 8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n ",
14414
14463
  encapsulation: i0.ViewEncapsulation.None
14415
14464
  },] }
14416
14465
  ];
@@ -14820,7 +14869,8 @@
14820
14869
  TransactionSearchResultModule,
14821
14870
  TransactionSalesOrderFilterModule,
14822
14871
  TransactionPurchaseOrderFilterModule,
14823
- TransactionFilterModule
14872
+ TransactionFilterModule,
14873
+ corecomponents_v12.IconCollapseHandleModule
14824
14874
  ],
14825
14875
  declarations: [
14826
14876
  TransactionSearchComponent