@wizishop/angular-components 0.0.199 → 0.0.202

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wizishop/ng-wizi-bulma'), require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-perfect-scrollbar'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/overlay'), require('@angular/cdk/table'), require('@angular/animations'), require('ngx-chips'), require('@ngx-translate/core'), require('@angular/router'), require('ngx-autosize'), require('ngx-scrollbar'), require('ngx-scrollbar/reached-event')) :
3
- typeof define === 'function' && define.amd ? define('@wizishop/angular-components', ['exports', '@wizishop/ng-wizi-bulma', '@angular/core', '@angular/common', '@angular/forms', 'ngx-perfect-scrollbar', 'rxjs', 'rxjs/operators', '@angular/cdk/overlay', '@angular/cdk/table', '@angular/animations', 'ngx-chips', '@ngx-translate/core', '@angular/router', 'ngx-autosize', 'ngx-scrollbar', 'ngx-scrollbar/reached-event'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['angular-components'] = {}), global['ng-wizi-bulma'], global.ng.core, global.ng.common, global.ng.forms, global['ngx-perfect-scrollbar'], global.rxjs, global.rxjs.operators, global.ng.cdk.overlay, global.ng.cdk.table, global.ng.animations, global['ngx-chips'], global['@ngx-translate/core'], global.ng.router, global.ngxAutosize, global.ngxScrollbar, global.reachedEvent));
5
- }(this, (function (exports, i1$1, i0, common, forms, ngxPerfectScrollbar, rxjs, operators, i1, table, animations, ngxChips, core, router, ngxAutosize, ngxScrollbar, reachedEvent) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@wizishop/ng-wizi-bulma'), require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-perfect-scrollbar'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/overlay'), require('@angular/cdk/table'), require('@angular/animations'), require('ngx-chips'), require('@ngx-translate/core'), require('@angular/router'), require('ngx-autosize'), require('ngx-scrollbar'), require('ngx-scrollbar/reached-event'), require('@angular/cdk/drag-drop')) :
3
+ typeof define === 'function' && define.amd ? define('@wizishop/angular-components', ['exports', '@wizishop/ng-wizi-bulma', '@angular/core', '@angular/common', '@angular/forms', 'ngx-perfect-scrollbar', 'rxjs', 'rxjs/operators', '@angular/cdk/overlay', '@angular/cdk/table', '@angular/animations', 'ngx-chips', '@ngx-translate/core', '@angular/router', 'ngx-autosize', 'ngx-scrollbar', 'ngx-scrollbar/reached-event', '@angular/cdk/drag-drop'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wizishop = global.wizishop || {}, global.wizishop['angular-components'] = {}), global['ng-wizi-bulma'], global.ng.core, global.ng.common, global.ng.forms, global['ngx-perfect-scrollbar'], global.rxjs, global.rxjs.operators, global.ng.cdk.overlay, global.ng.cdk.table, global.ng.animations, global['ngx-chips'], global['@ngx-translate/core'], global.ng.router, global.ngxAutosize, global.ngxScrollbar, global.reachedEvent, global.ng.cdk.dragDrop));
5
+ }(this, (function (exports, i1$1, i0, common, forms, ngxPerfectScrollbar, rxjs, operators, i1, table, animations, ngxChips, core, router, ngxAutosize, ngxScrollbar, reachedEvent, dragDrop) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -4569,6 +4569,55 @@
4569
4569
  ];
4570
4570
  WrapperMultipleBlockComponent.ctorParameters = function () { return []; };
4571
4571
 
4572
+ var DraganddropListComponent = /** @class */ (function () {
4573
+ function DraganddropListComponent() {
4574
+ this.disable = false;
4575
+ this.backgroundColor = '#fff';
4576
+ this.showTriggerSave = false;
4577
+ this.itemsChange = new i0.EventEmitter();
4578
+ }
4579
+ DraganddropListComponent.prototype.drop = function (event) {
4580
+ if (!this.disable) {
4581
+ dragDrop.moveItemInArray(this.items, event.previousIndex, event.currentIndex);
4582
+ this.itemsChange.emit(this.items);
4583
+ }
4584
+ };
4585
+ DraganddropListComponent.prototype.delete = function (index) {
4586
+ if (!this.disable) {
4587
+ this.items = this.items.filter(function (value, i) { return i !== index; });
4588
+ this.itemsChange.emit(this.items);
4589
+ }
4590
+ };
4591
+ DraganddropListComponent.prototype.saveField = function (index, event) {
4592
+ this.items[index] = event.target.value;
4593
+ this.itemsChange.emit(this.items);
4594
+ };
4595
+ DraganddropListComponent.prototype.addField = function () {
4596
+ this.showTriggerSave = true;
4597
+ };
4598
+ DraganddropListComponent.prototype.saveNewField = function (event) {
4599
+ this.items.push(event.target.value);
4600
+ this.itemsChange.emit(this.items);
4601
+ this.showTriggerSave = false;
4602
+ };
4603
+ return DraganddropListComponent;
4604
+ }());
4605
+ DraganddropListComponent.decorators = [
4606
+ { type: i0.Component, args: [{
4607
+ selector: 'wac-draganddrop-list',
4608
+ template: "<div class=\"wac-draganddrop-list\" *ngIf=\"!disable\" [style.backgroundColor]=\"backgroundColor\">\n <div class=\"wac-draganddrop-list__wrapper\" [cdkDropListLockAxis]=\"'y'\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" [style.backgroundColor]=\"backgroundColor\" *ngFor=\"let item of items;let i = index;\" cdkDrag>\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span (mousedown)=\"$event.stopPropagation()\" class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [value]=\"item\" [extraClasses]=\"'transparent'\" (keyup.enter)=\"saveField(i, $event)\" (focusout)=\"saveField(i, $event)\"></wac-input>\n </span>\n </div>\n <div (mousedown)=\"$event.stopPropagation()\">\n <wac-button [iconFontSize]=\"'14px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-trash-can'\" [extraClasses]=\"'is-danger'\" (click)=\"delete(i)\"></wac-button>\n </div>\n </div>\n <div class=\"wac-draganddrop-list__wrapper__item wac-draganddrop-list__wrapper__item--trigger\" *ngIf=\"showTriggerSave\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [extraClasses]=\"'transparent'\" (keyup.enter)=\"saveNewField($event)\" (focusout)=\"saveNewField($event)\"></wac-input>\n </span>\n </div>\n </div>\n </div>\n <div class=\"wac-draganddrop-list__add\" *ngIf=\"max && !showTriggerSave\">\n <div class=\"wac-draganddrop-list__add__btn\" *ngIf=\"max > items.length\">\n <wac-button [extraClasses]=\"'is-success'\" [label]=\"labelBtnAdd\" (click)=\"addField()\"></wac-button>\n </div>\n </div>\n</div>\n\n<div class=\"wac-draganddrop-list wac-draganddrop-list--disabled\" *ngIf=\"disable\">\n <div class=\"wac-draganddrop-list__wrapper\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n </div>\n </div>\n</div>\n",
4609
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
4610
+ },] }
4611
+ ];
4612
+ DraganddropListComponent.propDecorators = {
4613
+ items: [{ type: i0.Input }],
4614
+ disable: [{ type: i0.Input }],
4615
+ max: [{ type: i0.Input }],
4616
+ labelBtnAdd: [{ type: i0.Input }],
4617
+ backgroundColor: [{ type: i0.Input }],
4618
+ itemsChange: [{ type: i0.Output }]
4619
+ };
4620
+
4572
4621
  var components = [
4573
4622
  TagComponent,
4574
4623
  TabComponent,
@@ -4619,7 +4668,8 @@
4619
4668
  ConfirmDeleteComponent,
4620
4669
  MosaicComponent,
4621
4670
  ContentWithButtonsComponent,
4622
- WrapperMultipleBlockComponent
4671
+ WrapperMultipleBlockComponent,
4672
+ DraganddropListComponent
4623
4673
  ];
4624
4674
  var exportsFromModule = [
4625
4675
  PaginationComponent,
@@ -4653,6 +4703,7 @@
4653
4703
  SharedPipes,
4654
4704
  table.CdkTableModule,
4655
4705
  ngxChips.TagInputModule,
4706
+ dragDrop.DragDropModule,
4656
4707
  PaginationModule,
4657
4708
  TableModule,
4658
4709
  InputSearchModule,
@@ -4734,6 +4785,7 @@
4734
4785
  exports.ContentWithButtonsComponent = ContentWithButtonsComponent;
4735
4786
  exports.DebounceKeyupDirective = DebounceKeyupDirective;
4736
4787
  exports.DeleteComponent = DeleteComponent;
4788
+ exports.DraganddropListComponent = DraganddropListComponent;
4737
4789
  exports.DropdownComponent = DropdownComponent;
4738
4790
  exports.FiltersComponent = FiltersComponent;
4739
4791
  exports.FiltersTableService = FiltersTableService;