ngx-ode-ui 3.12.0-dev.2 → 3.12.0-dev.20

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 (38) hide show
  1. package/bundles/ngx-ode-ui.umd.js +420 -12
  2. package/bundles/ngx-ode-ui.umd.js.map +1 -1
  3. package/bundles/ngx-ode-ui.umd.min.js +1 -1
  4. package/bundles/ngx-ode-ui.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/datepicker/datepicker.component.js +42 -4
  6. package/esm2015/lib/components/dropdown/dropdown.component.js +76 -0
  7. package/esm2015/lib/components/list/list.component.js +25 -4
  8. package/esm2015/lib/components/list-checkable/list-checkable.component.js +137 -0
  9. package/esm2015/lib/components/multi-combo/multi-combo.component.js +2 -2
  10. package/esm2015/lib/components/search-input/search-input.component.js +26 -3
  11. package/esm2015/lib/components/search-toolbar/search-toolbar.component.js +84 -0
  12. package/esm2015/lib/ngx-ode-ui.module.js +11 -2
  13. package/esm2015/ngx-ode-ui.js +4 -2
  14. package/esm2015/public-api.js +2 -1
  15. package/esm5/lib/components/datepicker/datepicker.component.js +47 -4
  16. package/esm5/lib/components/dropdown/dropdown.component.js +81 -0
  17. package/esm5/lib/components/list/list.component.js +25 -4
  18. package/esm5/lib/components/list-checkable/list-checkable.component.js +148 -0
  19. package/esm5/lib/components/multi-combo/multi-combo.component.js +2 -2
  20. package/esm5/lib/components/search-input/search-input.component.js +30 -5
  21. package/esm5/lib/components/search-toolbar/search-toolbar.component.js +93 -0
  22. package/esm5/lib/ngx-ode-ui.module.js +11 -2
  23. package/esm5/ngx-ode-ui.js +4 -2
  24. package/esm5/public-api.js +2 -1
  25. package/fesm2015/ngx-ode-ui.js +390 -11
  26. package/fesm2015/ngx-ode-ui.js.map +1 -1
  27. package/fesm5/ngx-ode-ui.js +418 -13
  28. package/fesm5/ngx-ode-ui.js.map +1 -1
  29. package/lib/components/datepicker/datepicker.component.d.ts +2 -0
  30. package/lib/components/dropdown/dropdown.component.d.ts +36 -0
  31. package/lib/components/list/list.component.d.ts +7 -1
  32. package/lib/components/list-checkable/list-checkable.component.d.ts +55 -0
  33. package/lib/components/search-input/search-input.component.d.ts +5 -0
  34. package/lib/components/search-toolbar/search-toolbar.component.d.ts +34 -0
  35. package/ngx-ode-ui.d.ts +2 -0
  36. package/ngx-ode-ui.metadata.json +1 -1
  37. package/package.json +1 -1
  38. package/public-api.d.ts +1 -0
@@ -411,6 +411,7 @@ var DatepickerComponent = /** @class */ (function (_super) {
411
411
  _this.labelsService = labelsService;
412
412
  _this.innerValue = '';
413
413
  _this.disabled = false;
414
+ _this._readonly = false;
414
415
  _this.enableTime = false;
415
416
  _this.placeholder = '';
416
417
  _this.changeDate = new EventEmitter();
@@ -446,6 +447,30 @@ var DatepickerComponent = /** @class */ (function (_super) {
446
447
  enumerable: true,
447
448
  configurable: true
448
449
  });
450
+ Object.defineProperty(DatepickerComponent.prototype, "readonly", {
451
+ get: /**
452
+ * @return {?}
453
+ */
454
+ function () {
455
+ return this._readonly;
456
+ },
457
+ set: /**
458
+ * @param {?} val
459
+ * @return {?}
460
+ */
461
+ function (val) {
462
+ this._readonly = val;
463
+ if (this.datePickerInst && this.datePickerInst.altInput) {
464
+ // Apply the readonly attribute addition/removal to the visible input (wrapped)
465
+ if (val)
466
+ this.datePickerInst.altInput.setAttribute('readonly', "");
467
+ else
468
+ this.datePickerInst.altInput.removeAttribute('readonly');
469
+ }
470
+ },
471
+ enumerable: true,
472
+ configurable: true
473
+ });
449
474
  /**
450
475
  * @return {?}
451
476
  */
@@ -453,6 +478,7 @@ var DatepickerComponent = /** @class */ (function (_super) {
453
478
  * @return {?}
454
479
  */
455
480
  function () {
481
+ var _this = this;
456
482
  _super.prototype.ngAfterViewInit.call(this);
457
483
  // add attr data-input, mandatory for the picker to work in wrap mode
458
484
  this.renderer.setAttribute(this.inputElement.nativeElement, 'data-input', '');
@@ -479,12 +505,25 @@ var DatepickerComponent = /** @class */ (function (_super) {
479
505
  enableTime: this.enableTime,
480
506
  minDate: this.minDate,
481
507
  maxDate: this.maxDate,
482
- clickOpens: !this.disabled,
508
+ clickOpens: false,
483
509
  wrap: true,
484
510
  // to add input decoration (calendar icon and delete icon)
485
511
  locale: datePickerLocale
486
512
  };
487
513
  this.datePickerInst = new Flatpickr(this.datePickerElement.nativeElement, options);
514
+ if (!this.disabled) {
515
+ this.datePickerInst.altInput.addEventListener('click', (/**
516
+ * @param {?} e
517
+ * @return {?}
518
+ */
519
+ function (e) {
520
+ if (!_this.readonly) {
521
+ _this.datePickerInst.toggle();
522
+ }
523
+ }));
524
+ }
525
+ // Force updating the date input readonly attribute :
526
+ this.readonly = this._readonly;
488
527
  };
489
528
  /**
490
529
  * @return {?}
@@ -547,8 +586,9 @@ var DatepickerComponent = /** @class */ (function (_super) {
547
586
  DatepickerComponent.decorators = [
548
587
  { type: Component, args: [{
549
588
  selector: 'ode-date-picker',
550
- template: "<div class=\"flatpickr\" #datePickerElement>\n <input type=\"date\" [(ngModel)]=\"value\" [ngClass]=\"{ 'cursor-default': disabled }\" placeholder=\"{{ placeholder }}\" #inputRef>\n <a *ngIf=\"!disabled\" data-toggle [title]=\"labels('datepicker.open')\"><i class=\"fa fa-calendar open\" aria-hidden=\"true\"></i></a>\n <a *ngIf=\"!disabled\" data-clear [title]=\"labels('datepicker.delete')\"><i class=\"fa fa-times delete\" aria-hidden=\"true\"></i></a>\n</div>\n",
551
- providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR]
589
+ template: "<div class=\"flatpickr\" #datePickerElement>\n <input type=\"date\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [ngClass]=\"{ 'cursor-default': disabled }\" placeholder=\"{{ placeholder }}\" #inputRef>\n <a *ngIf=\"!disabled\" [class.hidden]=\"readonly\" data-toggle [title]=\"labels('datepicker.open')\"><i class=\"fa fa-calendar open\" aria-hidden=\"true\"></i></a>\n <a *ngIf=\"!disabled\" [class.hidden]=\"readonly\" data-clear [title]=\"labels('datepicker.delete')\"><i class=\"fa fa-times delete\" aria-hidden=\"true\"></i></a>\n</div>\n",
590
+ providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
591
+ styles: [".hidden{visibility:hidden}"]
552
592
  }] }
553
593
  ];
554
594
  /** @nocollapse */
@@ -562,6 +602,7 @@ var DatepickerComponent = /** @class */ (function (_super) {
562
602
  inputElement: [{ type: ViewChild, args: ['inputRef', { static: false },] }],
563
603
  model: [{ type: ViewChild, args: [NgModel, { static: false },] }],
564
604
  disabled: [{ type: Input }],
605
+ readonly: [{ type: Input }],
565
606
  enableTime: [{ type: Input }],
566
607
  placeholder: [{ type: Input }],
567
608
  minDate: [{ type: Input }],
@@ -590,6 +631,8 @@ if (false) {
590
631
  /** @type {?} */
591
632
  DatepickerComponent.prototype.disabled;
592
633
  /** @type {?} */
634
+ DatepickerComponent.prototype._readonly;
635
+ /** @type {?} */
593
636
  DatepickerComponent.prototype.enableTime;
594
637
  /** @type {?} */
595
638
  DatepickerComponent.prototype.placeholder;
@@ -1380,9 +1423,12 @@ var ListComponent = /** @class */ (function (_super) {
1380
1423
  /* Store pipe */
1381
1424
  _this.self = _this;
1382
1425
  _this._storedElements = [];
1383
- _this.model = [];
1384
1426
  _this.searchPlaceholder = 'search';
1385
1427
  _this.noResultsLabel = 'list.results.no.items';
1428
+ _this.placeholder = 'list.placeholder';
1429
+ _this.isSearchActive = true;
1430
+ _this.isSearchButtonDisabled = false;
1431
+ _this.searchInput = false;
1386
1432
  _this.inputChange = new EventEmitter();
1387
1433
  _this.onSelect = new EventEmitter();
1388
1434
  _this.listChange = new EventEmitter();
@@ -1425,8 +1471,8 @@ var ListComponent = /** @class */ (function (_super) {
1425
1471
  ListComponent.decorators = [
1426
1472
  { type: Component, args: [{
1427
1473
  selector: 'ode-list',
1428
- template: "<ode-search-input [attr.placeholder]=\"searchPlaceholder | translate\" (onChange)=\"inputChange.emit($event)\"></ode-search-input>\n<div class=\"toolbar\">\n <ng-content select=\"[toolbar]\"></ng-content>\n</div>\n<div class=\"list-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\">\n <ul>\n <li *ngFor=\"let item of model | filter: filters | filter: inputFilter | store:self:'storedElements' | orderBy: sort | slice: 0:limit\"\n (click)=\"onSelect.emit(item)\"\n [class.selected]=\"isSelected(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n class=\"lct-list-item\">\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\">\n </ng-template>\n </li>\n </ul>\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\">{{ noResultsLabel | translate }}</li>\n </ul>\n</div>\n",
1429
- styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{cursor:pointer;border-top:1px solid #ddd;padding:10px}ul li.disabled{pointer-events:none}"]
1474
+ template: "<ode-search-input\n *ngIf=\"isSearchActive\"\n [isSearchButtonDisabled]=\"isSearchButtonDisabled\"\n [searchInput]=\"searchInput\"\n [searchSubmit]=\"searchSubmit\"\n [delay]=\"searchDelay\"\n [attr.placeholder]=\"searchPlaceholder | translate\"\n (onChange)=\"inputChange.emit($event)\"\n>\n</ode-search-input>\n\n<div class=\"toolbar\">\n <ng-content select=\"[toolbar]\"></ng-content>\n</div>\n\n<div\n class=\"list-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\"\n>\n <ul>\n <li\n *ngFor=\"let item of model | filter: filters | filter: inputFilter | store:self:'storedElements' | orderBy: sort | slice: 0:limit\"\n (click)=\"onSelect.emit(item)\"\n [class.selected]=\"isSelected(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n class=\"lct-list-item\"\n >\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\">\n </ng-template>\n </li>\n </ul>\n\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\">{{ noResultsLabel | translate }}</li>\n </ul>\n\n <ul *ngIf=\"!model\">\n <li class=\"placeholder\">{{ placeholder | translate }}</li>\n </ul>\n</div>\n",
1475
+ styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{cursor:pointer;border-top:1px solid #ddd;padding:10px}ul li.no-results{padding:50px;text-align:center;font-style:italic}ul li.no-results:hover{cursor:default!important;background-color:inherit!important}ul li.placeholder{color:#aaa;padding:2rem;text-align:left}ul li.placeholder:hover{cursor:default!important;background-color:inherit!important}ul li.disabled{pointer-events:none}"]
1430
1476
  }] }
1431
1477
  ];
1432
1478
  /** @nocollapse */
@@ -1441,6 +1487,12 @@ var ListComponent = /** @class */ (function (_super) {
1441
1487
  limit: [{ type: Input }],
1442
1488
  searchPlaceholder: [{ type: Input }],
1443
1489
  noResultsLabel: [{ type: Input }],
1490
+ placeholder: [{ type: Input }],
1491
+ isSearchActive: [{ type: Input }],
1492
+ isSearchButtonDisabled: [{ type: Input }],
1493
+ searchInput: [{ type: Input }],
1494
+ searchDelay: [{ type: Input }],
1495
+ searchSubmit: [{ type: Input }],
1444
1496
  inputChange: [{ type: Output }],
1445
1497
  onSelect: [{ type: Output }],
1446
1498
  listChange: [{ type: Output }],
@@ -1472,6 +1524,18 @@ if (false) {
1472
1524
  /** @type {?} */
1473
1525
  ListComponent.prototype.noResultsLabel;
1474
1526
  /** @type {?} */
1527
+ ListComponent.prototype.placeholder;
1528
+ /** @type {?} */
1529
+ ListComponent.prototype.isSearchActive;
1530
+ /** @type {?} */
1531
+ ListComponent.prototype.isSearchButtonDisabled;
1532
+ /** @type {?} */
1533
+ ListComponent.prototype.searchInput;
1534
+ /** @type {?} */
1535
+ ListComponent.prototype.searchDelay;
1536
+ /** @type {?} */
1537
+ ListComponent.prototype.searchSubmit;
1538
+ /** @type {?} */
1475
1539
  ListComponent.prototype.inputChange;
1476
1540
  /** @type {?} */
1477
1541
  ListComponent.prototype.onSelect;
@@ -1489,6 +1553,150 @@ if (false) {
1489
1553
  ListComponent.prototype.ngClass;
1490
1554
  }
1491
1555
 
1556
+ /**
1557
+ * @fileoverview added by tsickle
1558
+ * Generated from: lib/components/list-checkable/list-checkable.component.ts
1559
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1560
+ */
1561
+ var ListCheckableComponent = /** @class */ (function (_super) {
1562
+ __extends(ListCheckableComponent, _super);
1563
+ function ListCheckableComponent(injector) {
1564
+ var _this = _super.call(this, injector) || this;
1565
+ _this.model = [];
1566
+ _this.noResultsLabel = 'list.results.no.items';
1567
+ _this.readOnly = false;
1568
+ _this.onCheck = new EventEmitter();
1569
+ _this.listChange = new EventEmitter();
1570
+ _this.scrolledDown = new EventEmitter();
1571
+ _this.areAllChecked = (/**
1572
+ * @return {?}
1573
+ */
1574
+ function () { return false; });
1575
+ _this.isChecked = (/**
1576
+ * @param {?=} arg
1577
+ * @return {?}
1578
+ */
1579
+ function (arg) { return false; });
1580
+ _this.isDisabled = (/**
1581
+ * @param {?=} arg
1582
+ * @return {?}
1583
+ */
1584
+ function (arg) { return false; });
1585
+ _this.ngClass = (/**
1586
+ * @param {?=} arg
1587
+ * @return {?}
1588
+ */
1589
+ function (arg) { return ({}); });
1590
+ /* Store pipe */
1591
+ _this.self = _this;
1592
+ _this._storedElements = [];
1593
+ return _this;
1594
+ }
1595
+ Object.defineProperty(ListCheckableComponent.prototype, "storedElements", {
1596
+ get: /**
1597
+ * @return {?}
1598
+ */
1599
+ function () {
1600
+ return this._storedElements;
1601
+ },
1602
+ set: /**
1603
+ * @param {?} list
1604
+ * @return {?}
1605
+ */
1606
+ function (list) {
1607
+ this._storedElements = list;
1608
+ this.listChange.emit(list);
1609
+ },
1610
+ enumerable: true,
1611
+ configurable: true
1612
+ });
1613
+ /**
1614
+ * @param {?} checkAll
1615
+ * @return {?}
1616
+ */
1617
+ ListCheckableComponent.prototype.toggleAll = /**
1618
+ * @param {?} checkAll
1619
+ * @return {?}
1620
+ */
1621
+ function (checkAll) {
1622
+ var _this = this;
1623
+ this.model.forEach((/**
1624
+ * @param {?} item
1625
+ * @return {?}
1626
+ */
1627
+ function (item) {
1628
+ /** @type {?} */
1629
+ var isChecked = _this.isChecked(item);
1630
+ if (!_this.isDisabled(item)
1631
+ && ((isChecked && !checkAll) || (!isChecked && checkAll))) {
1632
+ _this.onCheck.emit({ item: item, checked: checkAll });
1633
+ }
1634
+ }));
1635
+ };
1636
+ ListCheckableComponent.decorators = [
1637
+ { type: Component, args: [{
1638
+ selector: 'ode-list-checkable',
1639
+ template: "<div class=\"list-checkable-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\">\n\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\"><span>{{ noResultsLabel | translate }}</span></li>\n </ul>\n \n <ul>\n <li class=\"select-all\" \n [class.checked]=\"areAllChecked()\"\n *ngIf=\"!readOnly\">\n <label>\n <span>{{(areAllChecked() ? 'ux.multiselect.deselect-all' : 'ux.multiselect.select-all') | translate}}</span>\n <input type=\"checkbox\" [checked]=\"areAllChecked()\" (change)=\"toggleAll($event.target.checked)\" />\n </label>\n </li>\n\n <li class=\"lct-list-checkable-item\" \n [class.checked]=\"isChecked(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n *ngFor=\"let item of model | filter: filters | store:self:'storedElements' | orderBy: sort | slice: 0:limit\">\n <label>\n <span>\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template> \n </span>\n <input *ngIf=\"!readOnly\" type=\"checkbox\" \n [disabled]=\"isDisabled(item)\"\n [checked]=\"isChecked(item)\"\n (change)=\"onCheck.emit({item:item, checked:$event.target.checked})\"/>\n </label>\n </li>\n </ul>\n\n</div>\n",
1640
+ styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{border-top:1px solid #ddd;width:-webkit-fill-available;width:-moz-available;display:flex}ul li:not(.checked){color:#939393}ul li.disabled{pointer-events:none}ul li.select-all{background-color:#ff83520a;color:#5b6472}ul li.select-all span{text-align:right}ul li label{cursor:pointer;width:100%;display:flex}ul li label:hover{background-color:#eaedf2}ul li label span{padding:7px 15px;width:100%}ul li label input[type=checkbox]{margin-right:15px;-ms-grid-row-align:center;align-self:center}"]
1641
+ }] }
1642
+ ];
1643
+ /** @nocollapse */
1644
+ ListCheckableComponent.ctorParameters = function () { return [
1645
+ { type: Injector }
1646
+ ]; };
1647
+ ListCheckableComponent.propDecorators = {
1648
+ model: [{ type: Input }],
1649
+ filters: [{ type: Input }],
1650
+ sort: [{ type: Input }],
1651
+ limit: [{ type: Input }],
1652
+ noResultsLabel: [{ type: Input }],
1653
+ readOnly: [{ type: Input }],
1654
+ onCheck: [{ type: Output }],
1655
+ listChange: [{ type: Output }],
1656
+ scrolledDown: [{ type: Output }],
1657
+ templateRef: [{ type: ContentChild, args: [TemplateRef, { static: false },] }],
1658
+ areAllChecked: [{ type: Input }],
1659
+ isChecked: [{ type: Input }],
1660
+ isDisabled: [{ type: Input }],
1661
+ ngClass: [{ type: Input }]
1662
+ };
1663
+ return ListCheckableComponent;
1664
+ }(OdeComponent));
1665
+ if (false) {
1666
+ /** @type {?} */
1667
+ ListCheckableComponent.prototype.model;
1668
+ /** @type {?} */
1669
+ ListCheckableComponent.prototype.filters;
1670
+ /** @type {?} */
1671
+ ListCheckableComponent.prototype.sort;
1672
+ /** @type {?} */
1673
+ ListCheckableComponent.prototype.limit;
1674
+ /** @type {?} */
1675
+ ListCheckableComponent.prototype.noResultsLabel;
1676
+ /** @type {?} */
1677
+ ListCheckableComponent.prototype.readOnly;
1678
+ /** @type {?} */
1679
+ ListCheckableComponent.prototype.onCheck;
1680
+ /** @type {?} */
1681
+ ListCheckableComponent.prototype.listChange;
1682
+ /** @type {?} */
1683
+ ListCheckableComponent.prototype.scrolledDown;
1684
+ /** @type {?} */
1685
+ ListCheckableComponent.prototype.templateRef;
1686
+ /** @type {?} */
1687
+ ListCheckableComponent.prototype.areAllChecked;
1688
+ /** @type {?} */
1689
+ ListCheckableComponent.prototype.isChecked;
1690
+ /** @type {?} */
1691
+ ListCheckableComponent.prototype.isDisabled;
1692
+ /** @type {?} */
1693
+ ListCheckableComponent.prototype.ngClass;
1694
+ /** @type {?} */
1695
+ ListCheckableComponent.prototype.self;
1696
+ /** @type {?} */
1697
+ ListCheckableComponent.prototype._storedElements;
1698
+ }
1699
+
1492
1700
  /**
1493
1701
  * @fileoverview added by tsickle
1494
1702
  * Generated from: lib/components/message-box/message-box.component.ts
@@ -2300,7 +2508,7 @@ var MultiComboComponent = /** @class */ (function (_super) {
2300
2508
  MultiComboComponent.decorators = [
2301
2509
  { type: Component, args: [{
2302
2510
  selector: 'ode-multi-combo',
2303
- template: "<button (click)=\"toggleVisibility()\"\n [ngClass]=\"{ opened: show }\"\n [disabled]=\"disabled\">\n {{ title }}\n</button>\n<div [ngClass]=\"{ hidden: !show }\">\n <div class=\"options\">\n <button class=\"select-all\" (click)=\"selectAll()\" *ngIf=\"!maxSelected\"\n [title]=\"labels('select.all')\">{{ labels('select.all') }}</button>\n <button class=\"deselect-all\" (click)=\"deselectAll()\"\n [title]=\"labels('deselect.all')\">{{ labels('deselect.all') }}</button>\n </div>\n <div *ngIf=\"filter\" class=\"filter\">\n <ode-search-input (onChange)=\"search.input = $event\" [attr.placeholder]=\"labels('search')\"></ode-search-input>\n </div>\n <ul>\n <li *ngFor=\"let item of _comboModel | filter: getFilter() | orderBy: orderBy | store: self:'filteredComboModel'\"\n (click)=\"toggleItem(item)\"\n [ngClass]=\"{ selected: isSelected(item) }\"\n [attr.disabled]=\"isDisabled()\">\n {{ displayItem(item) | translate }}\n </li>\n </ul>\n</div>\n",
2511
+ template: "<button (click)=\"toggleVisibility()\"\n [ngClass]=\"{ opened: show }\"\n [disabled]=\"disabled\"\n type=\"button\">\n {{ title }}\n</button>\n<div [ngClass]=\"{ hidden: !show }\">\n <div class=\"options\">\n <button class=\"select-all\" (click)=\"selectAll()\" *ngIf=\"!maxSelected\"\n [title]=\"labels('select.all')\" type=\"button\">{{ labels('select.all') }}</button>\n <button class=\"deselect-all\" (click)=\"deselectAll()\"\n [title]=\"labels('deselect.all')\" type=\"button\">{{ labels('deselect.all') }}</button>\n </div>\n <div *ngIf=\"filter\" class=\"filter\">\n <ode-search-input (onChange)=\"search.input = $event\" [attr.placeholder]=\"labels('search')\"></ode-search-input>\n </div>\n <ul>\n <li *ngFor=\"let item of _comboModel | filter: getFilter() | orderBy: orderBy | store: self:'filteredComboModel'\"\n (click)=\"toggleItem(item)\"\n [ngClass]=\"{ selected: isSelected(item) }\"\n [attr.disabled]=\"isDisabled()\">\n {{ displayItem(item) | translate }}\n </li>\n </ul>\n</div>\n",
2304
2512
  host: {
2305
2513
  '(document:click)': 'onClick($event)',
2306
2514
  },
@@ -2791,6 +2999,10 @@ var SearchInputComponent = /** @class */ (function (_super) {
2791
2999
  var _this = _super.call(this, injector) || this;
2792
3000
  _this._elRef = _elRef;
2793
3001
  _this._renderer = _renderer;
3002
+ /* Inputs / Outputs / View */
3003
+ _this.isSearchActive = false;
3004
+ _this.isSearchButtonDisabled = false;
3005
+ _this.searchInput = false;
2794
3006
  _this._delay = 200;
2795
3007
  _this.onChange = new EventEmitter();
2796
3008
  /* Internal logic */
@@ -2804,9 +3016,7 @@ var SearchInputComponent = /** @class */ (function (_super) {
2804
3016
  function () {
2805
3017
  return this._delay;
2806
3018
  },
2807
- /* Inputs / Outputs / View */
2808
- set: /* Inputs / Outputs / View */
2809
- /**
3019
+ set: /**
2810
3020
  * @param {?} d
2811
3021
  * @return {?}
2812
3022
  */
@@ -2893,10 +3103,21 @@ var SearchInputComponent = /** @class */ (function (_super) {
2893
3103
  function (str) {
2894
3104
  this.$searchTerms.next(str);
2895
3105
  };
3106
+ /**
3107
+ * @return {?}
3108
+ */
3109
+ SearchInputComponent.prototype.handleSubmit = /**
3110
+ * @return {?}
3111
+ */
3112
+ function () {
3113
+ this.searchSubmit();
3114
+ this.searchBox.nativeElement.value = '';
3115
+ };
2896
3116
  SearchInputComponent.decorators = [
2897
3117
  { type: Component, args: [{
2898
3118
  selector: 'ode-search-input',
2899
- template: "<input type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/>\n"
3119
+ template: "<form\n class=\"search-container\"\n (ngSubmit)=\"searchInput && handleSubmit()\">\n <input\n #searchBox\n class=\"search-input\"\n name=\"searchTerm\"\n type=\"search\"\n (input)=\"search(searchBox.value)\" />\n <button class=\"search-button\" *ngIf=\"searchInput\" [attr.disabled]=\"isSearchButtonDisabled ? true : null\">\n <i class=\"fa fa-search is-size-4 search-icon\"></i>\n </button>\n</form>\n\n<!-- <input *ngIf=\"!searchInput\" type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/> -->",
3120
+ styles: [":host .search-container{margin:0;display:flex}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}"]
2900
3121
  }] }
2901
3122
  ];
2902
3123
  /** @nocollapse */
@@ -2906,6 +3127,10 @@ var SearchInputComponent = /** @class */ (function (_super) {
2906
3127
  { type: Renderer2 }
2907
3128
  ]; };
2908
3129
  SearchInputComponent.propDecorators = {
3130
+ isSearchActive: [{ type: Input }],
3131
+ isSearchButtonDisabled: [{ type: Input }],
3132
+ searchInput: [{ type: Input }],
3133
+ searchSubmit: [{ type: Input }],
2909
3134
  delay: [{ type: Input }],
2910
3135
  onChange: [{ type: Output }],
2911
3136
  searchBox: [{ type: ViewChild, args: ['searchBox', { static: false },] }]
@@ -2913,6 +3138,14 @@ var SearchInputComponent = /** @class */ (function (_super) {
2913
3138
  return SearchInputComponent;
2914
3139
  }(OdeComponent));
2915
3140
  if (false) {
3141
+ /** @type {?} */
3142
+ SearchInputComponent.prototype.isSearchActive;
3143
+ /** @type {?} */
3144
+ SearchInputComponent.prototype.isSearchButtonDisabled;
3145
+ /** @type {?} */
3146
+ SearchInputComponent.prototype.searchInput;
3147
+ /** @type {?} */
3148
+ SearchInputComponent.prototype.searchSubmit;
2916
3149
  /**
2917
3150
  * @type {?}
2918
3151
  * @private
@@ -4997,6 +5230,172 @@ function clickOn(el) {
4997
5230
  return el.triggerEventHandler('click', null);
4998
5231
  }
4999
5232
 
5233
+ /**
5234
+ * @fileoverview added by tsickle
5235
+ * Generated from: lib/components/dropdown/dropdown.component.ts
5236
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5237
+ */
5238
+ /**
5239
+ * DropdownComponent is an alternative to the MonoSelectComponent.
5240
+ * Accept everything inside <ng-content> but should work with <ode-list> component
5241
+ *
5242
+ * Simple Dropdown Component without search:
5243
+ * [isSearchActive] can be set to false to disable search input in <ode-list>
5244
+ * ```
5245
+ * <ode-dropdown
5246
+ * [name]="option_name"
5247
+ * [isDropdownOpened]="a_boolean"
5248
+ * (onDropdown)="toggle_func"
5249
+ * >
5250
+ * <ode-list
5251
+ * [model]="model"
5252
+ * [filters]="filters"
5253
+ * (onSelect)="func_to_select_elem($event)"
5254
+ * (inputChange)="a_string_for_input_value = $event"
5255
+ * noResultsLabel="text_to_display"
5256
+ * searchPlaceholder="default_placeholder_text"
5257
+ * >
5258
+ * <ng-template let-item>
5259
+ * <div>{{ item.name }}</div>
5260
+ * </ng-template>
5261
+ * </ode-list>
5262
+ * </ode-dropdown>
5263
+ * `̀``
5264
+ */
5265
+ var DropdownComponent = /** @class */ (function (_super) {
5266
+ __extends(DropdownComponent, _super);
5267
+ function DropdownComponent(injector) {
5268
+ var _this = _super.call(this, injector) || this;
5269
+ _this.name = '';
5270
+ _this.isDropdownOpened = false;
5271
+ _this.onDropdown = new EventEmitter();
5272
+ return _this;
5273
+ }
5274
+ /**
5275
+ * @return {?}
5276
+ */
5277
+ DropdownComponent.prototype.ngOnInit = /**
5278
+ * @return {?}
5279
+ */
5280
+ function () {
5281
+ _super.prototype.ngOnInit.call(this);
5282
+ };
5283
+ DropdownComponent.decorators = [
5284
+ { type: Component, args: [{
5285
+ selector: 'ode-dropdown',
5286
+ template: "<div class=\"dropdown\" [ngClass]=\"isDropdownOpened ? 'open' : ''\">\n <button (click)=\"onDropdown.emit()\" class=\"dropdown-trigger\">\n <span class=\"cell-ellipsis\">{{ name }}</span> <i class=\"fonticon arrow-select\"></i>\n </button>\n <div class=\"dropdown-list\">\n <ng-content></ng-content>\n </div>\n</div>\n",
5287
+ styles: [".dropdown{position:relative;width:230px;box-sizing:border-box}.dropdown *{box-sizing:border-box}.dropdown-trigger{cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between;padding:12px 16px;font-size:14px;color:#4a4a4a;text-transform:uppercase;text-align:left;width:100%;border-radius:8px;border:1px solid #7a7a7a;background-color:#fff}.dropdown-trigger>span{display:inline-block;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dropdown-trigger i.arrow-select{display:inline-block;float:none!important;padding-left:0;transform:rotate(180deg);transform-origin:center center}.dropdown-trigger:hover{color:#4a4a4a;border-color:#7a7a7a;background-color:#fff}.dropdown-trigger:hover i.arrow-select{color:#4a4a4a!important}.dropdown-list{display:none;position:absolute;overflow:hidden;z-index:2;top:100%;left:0;right:0;width:316px;box-shadow:0 4px 12px 0 rgba(0,0,0,.15);border-radius:8px;background-color:#fff}.dropdown::ng-deep ode-list li{justify-content:flex-start}.dropdown::ng-deep ode-list input[type=search]{padding:12px 16px}.dropdown.open .dropdown-list{display:block}.dropdown.open i.arrow-select{transform:rotate(0)}"]
5288
+ }] }
5289
+ ];
5290
+ /** @nocollapse */
5291
+ DropdownComponent.ctorParameters = function () { return [
5292
+ { type: Injector }
5293
+ ]; };
5294
+ DropdownComponent.propDecorators = {
5295
+ name: [{ type: Input }],
5296
+ isDropdownOpened: [{ type: Input }],
5297
+ onDropdown: [{ type: Output }]
5298
+ };
5299
+ return DropdownComponent;
5300
+ }(OdeComponent));
5301
+ if (false) {
5302
+ /** @type {?} */
5303
+ DropdownComponent.prototype.name;
5304
+ /** @type {?} */
5305
+ DropdownComponent.prototype.isDropdownOpened;
5306
+ /** @type {?} */
5307
+ DropdownComponent.prototype.onDropdown;
5308
+ }
5309
+
5310
+ /**
5311
+ * @fileoverview added by tsickle
5312
+ * Generated from: lib/components/search-toolbar/search-toolbar.component.ts
5313
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5314
+ */
5315
+ /**
5316
+ * Search Toolbar component.
5317
+ * Used within List component, Search Toolbar will display following information:
5318
+ * - Label of the search filter section (example: 'Search by')
5319
+ * - List of search type filters (example: 'Name', 'Email' , ...)
5320
+ * - Number of items returned by the search
5321
+ *
5322
+ * ```
5323
+ * <ode-search-toolbar
5324
+ * [label]="'user.searchType.label'"
5325
+ * [searchTypes]="searchTypes"
5326
+ * [nbItem]="nbUser || 0"
5327
+ * [nbItemLabel]="'list.results.users'"
5328
+ * (selectSearchType)="handleSelectSearchType($event)"
5329
+ * >
5330
+ * </ode-search-toolbar>
5331
+ * ```
5332
+ */
5333
+ var SearchToolbarComponent = /** @class */ (function (_super) {
5334
+ __extends(SearchToolbarComponent, _super);
5335
+ function SearchToolbarComponent(injector) {
5336
+ var _this = _super.call(this, injector) || this;
5337
+ _this.nbItem = 0;
5338
+ _this.selectSearchType = new EventEmitter();
5339
+ return _this;
5340
+ }
5341
+ /**
5342
+ * @return {?}
5343
+ */
5344
+ SearchToolbarComponent.prototype.ngOnInit = /**
5345
+ * @return {?}
5346
+ */
5347
+ function () {
5348
+ if (this.searchTypes && this.searchTypes.length > 0) {
5349
+ this.selectedSearchTypeValue = this.searchTypes[0].value;
5350
+ }
5351
+ };
5352
+ /**
5353
+ * @param {?} searchTypeValue
5354
+ * @return {?}
5355
+ */
5356
+ SearchToolbarComponent.prototype.handleSearchTypeClick = /**
5357
+ * @param {?} searchTypeValue
5358
+ * @return {?}
5359
+ */
5360
+ function (searchTypeValue) {
5361
+ this.selectedSearchTypeValue = searchTypeValue;
5362
+ this.selectSearchType.emit(searchTypeValue);
5363
+ };
5364
+ SearchToolbarComponent.decorators = [
5365
+ { type: Component, args: [{
5366
+ selector: 'ode-search-toolbar',
5367
+ template: "<div class=\"search-toolbar\">\n <div class=\"search-toolbar-label\">\n <s5l>{{ label }}</s5l>\n <button\n *ngFor=\"let searchType of searchTypes\"\n class=\"button has-left-margin-5\"\n [ngClass]=\"{\n 'is-selected': searchType.value === selectedSearchTypeValue\n }\"\n (click)=\"handleSearchTypeClick(searchType.value)\"\n >\n <s5l>{{ searchType.label }}</s5l>\n </button>\n </div>\n <div>\n <strong class=\"badge\">{{ nbItem }} <s5l>{{ nbItemLabel }}</s5l></strong>\n </div>\n</div>\n",
5368
+ styles: [".search-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px}.search-toolbar .search-toolbar-label{font-size:.85rem}.search-toolbar .search-toolbar-label .button{padding:4px 12px;border-radius:20px;font-size:12px;border-width:2px;border-color:#ff8d2e}"]
5369
+ }] }
5370
+ ];
5371
+ /** @nocollapse */
5372
+ SearchToolbarComponent.ctorParameters = function () { return [
5373
+ { type: Injector }
5374
+ ]; };
5375
+ SearchToolbarComponent.propDecorators = {
5376
+ label: [{ type: Input }],
5377
+ searchTypes: [{ type: Input }],
5378
+ nbItem: [{ type: Input }],
5379
+ nbItemLabel: [{ type: Input }],
5380
+ selectSearchType: [{ type: Output }]
5381
+ };
5382
+ return SearchToolbarComponent;
5383
+ }(OdeComponent));
5384
+ if (false) {
5385
+ /** @type {?} */
5386
+ SearchToolbarComponent.prototype.label;
5387
+ /** @type {?} */
5388
+ SearchToolbarComponent.prototype.searchTypes;
5389
+ /** @type {?} */
5390
+ SearchToolbarComponent.prototype.nbItem;
5391
+ /** @type {?} */
5392
+ SearchToolbarComponent.prototype.nbItemLabel;
5393
+ /** @type {?} */
5394
+ SearchToolbarComponent.prototype.selectSearchType;
5395
+ /** @type {?} */
5396
+ SearchToolbarComponent.prototype.selectedSearchTypeValue;
5397
+ }
5398
+
5000
5399
  /**
5001
5400
  * @fileoverview added by tsickle
5002
5401
  * Generated from: lib/ngx-ode-ui.module.ts
@@ -5045,6 +5444,7 @@ var NgxOdeUiModule = /** @class */ (function () {
5045
5444
  LightBoxComponent,
5046
5445
  LightboxConfirmComponent,
5047
5446
  ListComponent,
5447
+ ListCheckableComponent,
5048
5448
  MonoSelectComponent,
5049
5449
  MultiSelectComponent,
5050
5450
  MultiComboComponent,
@@ -5079,7 +5479,9 @@ var NgxOdeUiModule = /** @class */ (function () {
5079
5479
  LocalizedDatePipe,
5080
5480
  BytesPipe,
5081
5481
  KeysPipe,
5082
- LengthPipe
5482
+ LengthPipe,
5483
+ DropdownComponent,
5484
+ SearchToolbarComponent
5083
5485
  ],
5084
5486
  imports: [
5085
5487
  CommonModule,
@@ -5096,6 +5498,7 @@ var NgxOdeUiModule = /** @class */ (function () {
5096
5498
  LightBoxComponent,
5097
5499
  LightboxConfirmComponent,
5098
5500
  ListComponent,
5501
+ ListCheckableComponent,
5099
5502
  MonoSelectComponent,
5100
5503
  MultiSelectComponent,
5101
5504
  MultiComboComponent,
@@ -5115,6 +5518,8 @@ var NgxOdeUiModule = /** @class */ (function () {
5115
5518
  SpinnerCubeComponent,
5116
5519
  PagerComponent,
5117
5520
  EllipsisComponent,
5521
+ DropdownComponent,
5522
+ SearchToolbarComponent,
5118
5523
  // directives
5119
5524
  AnchorDirective,
5120
5525
  DynamicTemplateDirective,
@@ -5151,5 +5556,5 @@ var NgxOdeUiModule = /** @class */ (function () {
5151
5556
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5152
5557
  */
5153
5558
 
5154
- export { AnchorDirective, BytesPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, ComponentDescriptor, DatepickerComponent, DragAndDropFilesDirective, DynamicComponentDirective, DynamicModuleImportsService, DynamicTemplateDirective, EllipsisComponent, FilterPipe, FlattenObjectArrayPipe, FormErrorsComponent, FormFieldComponent, InputFileService, ItemTreeComponent, KeysPipe, LabelsService, LengthPipe, LightBoxComponent, LightboxConfirmComponent, LimitPipe, ListComponent, LocalizedDatePipe, MessageBoxComponent, MessageStickerComponent, MonoSelectComponent, MultiComboComponent, MultiSelectComponent, NgxOdeUiModule, ObjectURLDirective, OrderPipe, PagerComponent, PanelSectionComponent, PortalComponent, PushPanelComponent, SearchInputComponent, SideLayoutComponent, SidePanelComponent, SimpleSelectComponent, SpinnerCubeComponent, SpinnerService, StepComponent, StorePipe, TooltipComponent, UNITS, UploadFilesComponent, WizardComponent, clickOn, getText, getUnit, icons, removeAccents, standardise, toDecimal, trim };
5559
+ export { AnchorDirective, BytesPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, ComponentDescriptor, DatepickerComponent, DragAndDropFilesDirective, DynamicComponentDirective, DynamicModuleImportsService, DynamicTemplateDirective, EllipsisComponent, FilterPipe, FlattenObjectArrayPipe, FormErrorsComponent, FormFieldComponent, InputFileService, ItemTreeComponent, KeysPipe, LabelsService, LengthPipe, LightBoxComponent, LightboxConfirmComponent, LimitPipe, ListCheckableComponent, ListComponent, LocalizedDatePipe, MessageBoxComponent, MessageStickerComponent, MonoSelectComponent, MultiComboComponent, MultiSelectComponent, NgxOdeUiModule, ObjectURLDirective, OrderPipe, PagerComponent, PanelSectionComponent, PortalComponent, PushPanelComponent, SearchInputComponent, SideLayoutComponent, SidePanelComponent, SimpleSelectComponent, SpinnerCubeComponent, SpinnerService, StepComponent, StorePipe, TooltipComponent, UNITS, UploadFilesComponent, WizardComponent, clickOn, getText, getUnit, icons, removeAccents, standardise, toDecimal, trim, DropdownComponent as ɵa, SearchToolbarComponent as ɵb };
5155
5560
  //# sourceMappingURL=ngx-ode-ui.js.map