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.
- package/bundles/ngx-ode-ui.umd.js +420 -12
- package/bundles/ngx-ode-ui.umd.js.map +1 -1
- package/bundles/ngx-ode-ui.umd.min.js +1 -1
- package/bundles/ngx-ode-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/datepicker/datepicker.component.js +42 -4
- package/esm2015/lib/components/dropdown/dropdown.component.js +76 -0
- package/esm2015/lib/components/list/list.component.js +25 -4
- package/esm2015/lib/components/list-checkable/list-checkable.component.js +137 -0
- package/esm2015/lib/components/multi-combo/multi-combo.component.js +2 -2
- package/esm2015/lib/components/search-input/search-input.component.js +26 -3
- package/esm2015/lib/components/search-toolbar/search-toolbar.component.js +84 -0
- package/esm2015/lib/ngx-ode-ui.module.js +11 -2
- package/esm2015/ngx-ode-ui.js +4 -2
- package/esm2015/public-api.js +2 -1
- package/esm5/lib/components/datepicker/datepicker.component.js +47 -4
- package/esm5/lib/components/dropdown/dropdown.component.js +81 -0
- package/esm5/lib/components/list/list.component.js +25 -4
- package/esm5/lib/components/list-checkable/list-checkable.component.js +148 -0
- package/esm5/lib/components/multi-combo/multi-combo.component.js +2 -2
- package/esm5/lib/components/search-input/search-input.component.js +30 -5
- package/esm5/lib/components/search-toolbar/search-toolbar.component.js +93 -0
- package/esm5/lib/ngx-ode-ui.module.js +11 -2
- package/esm5/ngx-ode-ui.js +4 -2
- package/esm5/public-api.js +2 -1
- package/fesm2015/ngx-ode-ui.js +390 -11
- package/fesm2015/ngx-ode-ui.js.map +1 -1
- package/fesm5/ngx-ode-ui.js +418 -13
- package/fesm5/ngx-ode-ui.js.map +1 -1
- package/lib/components/datepicker/datepicker.component.d.ts +2 -0
- package/lib/components/dropdown/dropdown.component.d.ts +36 -0
- package/lib/components/list/list.component.d.ts +7 -1
- package/lib/components/list-checkable/list-checkable.component.d.ts +55 -0
- package/lib/components/search-input/search-input.component.d.ts +5 -0
- package/lib/components/search-toolbar/search-toolbar.component.d.ts +34 -0
- package/ngx-ode-ui.d.ts +2 -0
- package/ngx-ode-ui.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -605,6 +605,7 @@
|
|
|
605
605
|
_this.labelsService = labelsService;
|
|
606
606
|
_this.innerValue = '';
|
|
607
607
|
_this.disabled = false;
|
|
608
|
+
_this._readonly = false;
|
|
608
609
|
_this.enableTime = false;
|
|
609
610
|
_this.placeholder = '';
|
|
610
611
|
_this.changeDate = new core.EventEmitter();
|
|
@@ -640,6 +641,30 @@
|
|
|
640
641
|
enumerable: true,
|
|
641
642
|
configurable: true
|
|
642
643
|
});
|
|
644
|
+
Object.defineProperty(DatepickerComponent.prototype, "readonly", {
|
|
645
|
+
get: /**
|
|
646
|
+
* @return {?}
|
|
647
|
+
*/
|
|
648
|
+
function () {
|
|
649
|
+
return this._readonly;
|
|
650
|
+
},
|
|
651
|
+
set: /**
|
|
652
|
+
* @param {?} val
|
|
653
|
+
* @return {?}
|
|
654
|
+
*/
|
|
655
|
+
function (val) {
|
|
656
|
+
this._readonly = val;
|
|
657
|
+
if (this.datePickerInst && this.datePickerInst.altInput) {
|
|
658
|
+
// Apply the readonly attribute addition/removal to the visible input (wrapped)
|
|
659
|
+
if (val)
|
|
660
|
+
this.datePickerInst.altInput.setAttribute('readonly', "");
|
|
661
|
+
else
|
|
662
|
+
this.datePickerInst.altInput.removeAttribute('readonly');
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
enumerable: true,
|
|
666
|
+
configurable: true
|
|
667
|
+
});
|
|
643
668
|
/**
|
|
644
669
|
* @return {?}
|
|
645
670
|
*/
|
|
@@ -647,6 +672,7 @@
|
|
|
647
672
|
* @return {?}
|
|
648
673
|
*/
|
|
649
674
|
function () {
|
|
675
|
+
var _this = this;
|
|
650
676
|
_super.prototype.ngAfterViewInit.call(this);
|
|
651
677
|
// add attr data-input, mandatory for the picker to work in wrap mode
|
|
652
678
|
this.renderer.setAttribute(this.inputElement.nativeElement, 'data-input', '');
|
|
@@ -673,12 +699,25 @@
|
|
|
673
699
|
enableTime: this.enableTime,
|
|
674
700
|
minDate: this.minDate,
|
|
675
701
|
maxDate: this.maxDate,
|
|
676
|
-
clickOpens:
|
|
702
|
+
clickOpens: false,
|
|
677
703
|
wrap: true,
|
|
678
704
|
// to add input decoration (calendar icon and delete icon)
|
|
679
705
|
locale: datePickerLocale
|
|
680
706
|
};
|
|
681
707
|
this.datePickerInst = new Flatpickr(this.datePickerElement.nativeElement, options);
|
|
708
|
+
if (!this.disabled) {
|
|
709
|
+
this.datePickerInst.altInput.addEventListener('click', (/**
|
|
710
|
+
* @param {?} e
|
|
711
|
+
* @return {?}
|
|
712
|
+
*/
|
|
713
|
+
function (e) {
|
|
714
|
+
if (!_this.readonly) {
|
|
715
|
+
_this.datePickerInst.toggle();
|
|
716
|
+
}
|
|
717
|
+
}));
|
|
718
|
+
}
|
|
719
|
+
// Force updating the date input readonly attribute :
|
|
720
|
+
this.readonly = this._readonly;
|
|
682
721
|
};
|
|
683
722
|
/**
|
|
684
723
|
* @return {?}
|
|
@@ -741,8 +780,9 @@
|
|
|
741
780
|
DatepickerComponent.decorators = [
|
|
742
781
|
{ type: core.Component, args: [{
|
|
743
782
|
selector: 'ode-date-picker',
|
|
744
|
-
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",
|
|
745
|
-
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR]
|
|
783
|
+
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",
|
|
784
|
+
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
|
|
785
|
+
styles: [".hidden{visibility:hidden}"]
|
|
746
786
|
}] }
|
|
747
787
|
];
|
|
748
788
|
/** @nocollapse */
|
|
@@ -756,6 +796,7 @@
|
|
|
756
796
|
inputElement: [{ type: core.ViewChild, args: ['inputRef', { static: false },] }],
|
|
757
797
|
model: [{ type: core.ViewChild, args: [forms.NgModel, { static: false },] }],
|
|
758
798
|
disabled: [{ type: core.Input }],
|
|
799
|
+
readonly: [{ type: core.Input }],
|
|
759
800
|
enableTime: [{ type: core.Input }],
|
|
760
801
|
placeholder: [{ type: core.Input }],
|
|
761
802
|
minDate: [{ type: core.Input }],
|
|
@@ -784,6 +825,8 @@
|
|
|
784
825
|
/** @type {?} */
|
|
785
826
|
DatepickerComponent.prototype.disabled;
|
|
786
827
|
/** @type {?} */
|
|
828
|
+
DatepickerComponent.prototype._readonly;
|
|
829
|
+
/** @type {?} */
|
|
787
830
|
DatepickerComponent.prototype.enableTime;
|
|
788
831
|
/** @type {?} */
|
|
789
832
|
DatepickerComponent.prototype.placeholder;
|
|
@@ -1574,9 +1617,12 @@
|
|
|
1574
1617
|
/* Store pipe */
|
|
1575
1618
|
_this.self = _this;
|
|
1576
1619
|
_this._storedElements = [];
|
|
1577
|
-
_this.model = [];
|
|
1578
1620
|
_this.searchPlaceholder = 'search';
|
|
1579
1621
|
_this.noResultsLabel = 'list.results.no.items';
|
|
1622
|
+
_this.placeholder = 'list.placeholder';
|
|
1623
|
+
_this.isSearchActive = true;
|
|
1624
|
+
_this.isSearchButtonDisabled = false;
|
|
1625
|
+
_this.searchInput = false;
|
|
1580
1626
|
_this.inputChange = new core.EventEmitter();
|
|
1581
1627
|
_this.onSelect = new core.EventEmitter();
|
|
1582
1628
|
_this.listChange = new core.EventEmitter();
|
|
@@ -1619,8 +1665,8 @@
|
|
|
1619
1665
|
ListComponent.decorators = [
|
|
1620
1666
|
{ type: core.Component, args: [{
|
|
1621
1667
|
selector: 'ode-list',
|
|
1622
|
-
template: "<ode-search-input
|
|
1623
|
-
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}"]
|
|
1668
|
+
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",
|
|
1669
|
+
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}"]
|
|
1624
1670
|
}] }
|
|
1625
1671
|
];
|
|
1626
1672
|
/** @nocollapse */
|
|
@@ -1635,6 +1681,12 @@
|
|
|
1635
1681
|
limit: [{ type: core.Input }],
|
|
1636
1682
|
searchPlaceholder: [{ type: core.Input }],
|
|
1637
1683
|
noResultsLabel: [{ type: core.Input }],
|
|
1684
|
+
placeholder: [{ type: core.Input }],
|
|
1685
|
+
isSearchActive: [{ type: core.Input }],
|
|
1686
|
+
isSearchButtonDisabled: [{ type: core.Input }],
|
|
1687
|
+
searchInput: [{ type: core.Input }],
|
|
1688
|
+
searchDelay: [{ type: core.Input }],
|
|
1689
|
+
searchSubmit: [{ type: core.Input }],
|
|
1638
1690
|
inputChange: [{ type: core.Output }],
|
|
1639
1691
|
onSelect: [{ type: core.Output }],
|
|
1640
1692
|
listChange: [{ type: core.Output }],
|
|
@@ -1666,6 +1718,18 @@
|
|
|
1666
1718
|
/** @type {?} */
|
|
1667
1719
|
ListComponent.prototype.noResultsLabel;
|
|
1668
1720
|
/** @type {?} */
|
|
1721
|
+
ListComponent.prototype.placeholder;
|
|
1722
|
+
/** @type {?} */
|
|
1723
|
+
ListComponent.prototype.isSearchActive;
|
|
1724
|
+
/** @type {?} */
|
|
1725
|
+
ListComponent.prototype.isSearchButtonDisabled;
|
|
1726
|
+
/** @type {?} */
|
|
1727
|
+
ListComponent.prototype.searchInput;
|
|
1728
|
+
/** @type {?} */
|
|
1729
|
+
ListComponent.prototype.searchDelay;
|
|
1730
|
+
/** @type {?} */
|
|
1731
|
+
ListComponent.prototype.searchSubmit;
|
|
1732
|
+
/** @type {?} */
|
|
1669
1733
|
ListComponent.prototype.inputChange;
|
|
1670
1734
|
/** @type {?} */
|
|
1671
1735
|
ListComponent.prototype.onSelect;
|
|
@@ -1683,6 +1747,150 @@
|
|
|
1683
1747
|
ListComponent.prototype.ngClass;
|
|
1684
1748
|
}
|
|
1685
1749
|
|
|
1750
|
+
/**
|
|
1751
|
+
* @fileoverview added by tsickle
|
|
1752
|
+
* Generated from: lib/components/list-checkable/list-checkable.component.ts
|
|
1753
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1754
|
+
*/
|
|
1755
|
+
var ListCheckableComponent = /** @class */ (function (_super) {
|
|
1756
|
+
__extends(ListCheckableComponent, _super);
|
|
1757
|
+
function ListCheckableComponent(injector) {
|
|
1758
|
+
var _this = _super.call(this, injector) || this;
|
|
1759
|
+
_this.model = [];
|
|
1760
|
+
_this.noResultsLabel = 'list.results.no.items';
|
|
1761
|
+
_this.readOnly = false;
|
|
1762
|
+
_this.onCheck = new core.EventEmitter();
|
|
1763
|
+
_this.listChange = new core.EventEmitter();
|
|
1764
|
+
_this.scrolledDown = new core.EventEmitter();
|
|
1765
|
+
_this.areAllChecked = (/**
|
|
1766
|
+
* @return {?}
|
|
1767
|
+
*/
|
|
1768
|
+
function () { return false; });
|
|
1769
|
+
_this.isChecked = (/**
|
|
1770
|
+
* @param {?=} arg
|
|
1771
|
+
* @return {?}
|
|
1772
|
+
*/
|
|
1773
|
+
function (arg) { return false; });
|
|
1774
|
+
_this.isDisabled = (/**
|
|
1775
|
+
* @param {?=} arg
|
|
1776
|
+
* @return {?}
|
|
1777
|
+
*/
|
|
1778
|
+
function (arg) { return false; });
|
|
1779
|
+
_this.ngClass = (/**
|
|
1780
|
+
* @param {?=} arg
|
|
1781
|
+
* @return {?}
|
|
1782
|
+
*/
|
|
1783
|
+
function (arg) { return ({}); });
|
|
1784
|
+
/* Store pipe */
|
|
1785
|
+
_this.self = _this;
|
|
1786
|
+
_this._storedElements = [];
|
|
1787
|
+
return _this;
|
|
1788
|
+
}
|
|
1789
|
+
Object.defineProperty(ListCheckableComponent.prototype, "storedElements", {
|
|
1790
|
+
get: /**
|
|
1791
|
+
* @return {?}
|
|
1792
|
+
*/
|
|
1793
|
+
function () {
|
|
1794
|
+
return this._storedElements;
|
|
1795
|
+
},
|
|
1796
|
+
set: /**
|
|
1797
|
+
* @param {?} list
|
|
1798
|
+
* @return {?}
|
|
1799
|
+
*/
|
|
1800
|
+
function (list) {
|
|
1801
|
+
this._storedElements = list;
|
|
1802
|
+
this.listChange.emit(list);
|
|
1803
|
+
},
|
|
1804
|
+
enumerable: true,
|
|
1805
|
+
configurable: true
|
|
1806
|
+
});
|
|
1807
|
+
/**
|
|
1808
|
+
* @param {?} checkAll
|
|
1809
|
+
* @return {?}
|
|
1810
|
+
*/
|
|
1811
|
+
ListCheckableComponent.prototype.toggleAll = /**
|
|
1812
|
+
* @param {?} checkAll
|
|
1813
|
+
* @return {?}
|
|
1814
|
+
*/
|
|
1815
|
+
function (checkAll) {
|
|
1816
|
+
var _this = this;
|
|
1817
|
+
this.model.forEach((/**
|
|
1818
|
+
* @param {?} item
|
|
1819
|
+
* @return {?}
|
|
1820
|
+
*/
|
|
1821
|
+
function (item) {
|
|
1822
|
+
/** @type {?} */
|
|
1823
|
+
var isChecked = _this.isChecked(item);
|
|
1824
|
+
if (!_this.isDisabled(item)
|
|
1825
|
+
&& ((isChecked && !checkAll) || (!isChecked && checkAll))) {
|
|
1826
|
+
_this.onCheck.emit({ item: item, checked: checkAll });
|
|
1827
|
+
}
|
|
1828
|
+
}));
|
|
1829
|
+
};
|
|
1830
|
+
ListCheckableComponent.decorators = [
|
|
1831
|
+
{ type: core.Component, args: [{
|
|
1832
|
+
selector: 'ode-list-checkable',
|
|
1833
|
+
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",
|
|
1834
|
+
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}"]
|
|
1835
|
+
}] }
|
|
1836
|
+
];
|
|
1837
|
+
/** @nocollapse */
|
|
1838
|
+
ListCheckableComponent.ctorParameters = function () { return [
|
|
1839
|
+
{ type: core.Injector }
|
|
1840
|
+
]; };
|
|
1841
|
+
ListCheckableComponent.propDecorators = {
|
|
1842
|
+
model: [{ type: core.Input }],
|
|
1843
|
+
filters: [{ type: core.Input }],
|
|
1844
|
+
sort: [{ type: core.Input }],
|
|
1845
|
+
limit: [{ type: core.Input }],
|
|
1846
|
+
noResultsLabel: [{ type: core.Input }],
|
|
1847
|
+
readOnly: [{ type: core.Input }],
|
|
1848
|
+
onCheck: [{ type: core.Output }],
|
|
1849
|
+
listChange: [{ type: core.Output }],
|
|
1850
|
+
scrolledDown: [{ type: core.Output }],
|
|
1851
|
+
templateRef: [{ type: core.ContentChild, args: [core.TemplateRef, { static: false },] }],
|
|
1852
|
+
areAllChecked: [{ type: core.Input }],
|
|
1853
|
+
isChecked: [{ type: core.Input }],
|
|
1854
|
+
isDisabled: [{ type: core.Input }],
|
|
1855
|
+
ngClass: [{ type: core.Input }]
|
|
1856
|
+
};
|
|
1857
|
+
return ListCheckableComponent;
|
|
1858
|
+
}(ngxOdeCore.OdeComponent));
|
|
1859
|
+
if (false) {
|
|
1860
|
+
/** @type {?} */
|
|
1861
|
+
ListCheckableComponent.prototype.model;
|
|
1862
|
+
/** @type {?} */
|
|
1863
|
+
ListCheckableComponent.prototype.filters;
|
|
1864
|
+
/** @type {?} */
|
|
1865
|
+
ListCheckableComponent.prototype.sort;
|
|
1866
|
+
/** @type {?} */
|
|
1867
|
+
ListCheckableComponent.prototype.limit;
|
|
1868
|
+
/** @type {?} */
|
|
1869
|
+
ListCheckableComponent.prototype.noResultsLabel;
|
|
1870
|
+
/** @type {?} */
|
|
1871
|
+
ListCheckableComponent.prototype.readOnly;
|
|
1872
|
+
/** @type {?} */
|
|
1873
|
+
ListCheckableComponent.prototype.onCheck;
|
|
1874
|
+
/** @type {?} */
|
|
1875
|
+
ListCheckableComponent.prototype.listChange;
|
|
1876
|
+
/** @type {?} */
|
|
1877
|
+
ListCheckableComponent.prototype.scrolledDown;
|
|
1878
|
+
/** @type {?} */
|
|
1879
|
+
ListCheckableComponent.prototype.templateRef;
|
|
1880
|
+
/** @type {?} */
|
|
1881
|
+
ListCheckableComponent.prototype.areAllChecked;
|
|
1882
|
+
/** @type {?} */
|
|
1883
|
+
ListCheckableComponent.prototype.isChecked;
|
|
1884
|
+
/** @type {?} */
|
|
1885
|
+
ListCheckableComponent.prototype.isDisabled;
|
|
1886
|
+
/** @type {?} */
|
|
1887
|
+
ListCheckableComponent.prototype.ngClass;
|
|
1888
|
+
/** @type {?} */
|
|
1889
|
+
ListCheckableComponent.prototype.self;
|
|
1890
|
+
/** @type {?} */
|
|
1891
|
+
ListCheckableComponent.prototype._storedElements;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1686
1894
|
/**
|
|
1687
1895
|
* @fileoverview added by tsickle
|
|
1688
1896
|
* Generated from: lib/components/message-box/message-box.component.ts
|
|
@@ -2494,7 +2702,7 @@
|
|
|
2494
2702
|
MultiComboComponent.decorators = [
|
|
2495
2703
|
{ type: core.Component, args: [{
|
|
2496
2704
|
selector: 'ode-multi-combo',
|
|
2497
|
-
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",
|
|
2705
|
+
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",
|
|
2498
2706
|
host: {
|
|
2499
2707
|
'(document:click)': 'onClick($event)',
|
|
2500
2708
|
},
|
|
@@ -2985,6 +3193,10 @@
|
|
|
2985
3193
|
var _this = _super.call(this, injector) || this;
|
|
2986
3194
|
_this._elRef = _elRef;
|
|
2987
3195
|
_this._renderer = _renderer;
|
|
3196
|
+
/* Inputs / Outputs / View */
|
|
3197
|
+
_this.isSearchActive = false;
|
|
3198
|
+
_this.isSearchButtonDisabled = false;
|
|
3199
|
+
_this.searchInput = false;
|
|
2988
3200
|
_this._delay = 200;
|
|
2989
3201
|
_this.onChange = new core.EventEmitter();
|
|
2990
3202
|
/* Internal logic */
|
|
@@ -2998,9 +3210,7 @@
|
|
|
2998
3210
|
function () {
|
|
2999
3211
|
return this._delay;
|
|
3000
3212
|
},
|
|
3001
|
-
|
|
3002
|
-
set: /* Inputs / Outputs / View */
|
|
3003
|
-
/**
|
|
3213
|
+
set: /**
|
|
3004
3214
|
* @param {?} d
|
|
3005
3215
|
* @return {?}
|
|
3006
3216
|
*/
|
|
@@ -3087,10 +3297,21 @@
|
|
|
3087
3297
|
function (str) {
|
|
3088
3298
|
this.$searchTerms.next(str);
|
|
3089
3299
|
};
|
|
3300
|
+
/**
|
|
3301
|
+
* @return {?}
|
|
3302
|
+
*/
|
|
3303
|
+
SearchInputComponent.prototype.handleSubmit = /**
|
|
3304
|
+
* @return {?}
|
|
3305
|
+
*/
|
|
3306
|
+
function () {
|
|
3307
|
+
this.searchSubmit();
|
|
3308
|
+
this.searchBox.nativeElement.value = '';
|
|
3309
|
+
};
|
|
3090
3310
|
SearchInputComponent.decorators = [
|
|
3091
3311
|
{ type: core.Component, args: [{
|
|
3092
3312
|
selector: 'ode-search-input',
|
|
3093
|
-
template: "<input type=\"search\" #searchBox (input)=\"search(searchBox.value)\"
|
|
3313
|
+
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)\"/> -->",
|
|
3314
|
+
styles: [":host .search-container{margin:0;display:flex}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}"]
|
|
3094
3315
|
}] }
|
|
3095
3316
|
];
|
|
3096
3317
|
/** @nocollapse */
|
|
@@ -3100,6 +3321,10 @@
|
|
|
3100
3321
|
{ type: core.Renderer2 }
|
|
3101
3322
|
]; };
|
|
3102
3323
|
SearchInputComponent.propDecorators = {
|
|
3324
|
+
isSearchActive: [{ type: core.Input }],
|
|
3325
|
+
isSearchButtonDisabled: [{ type: core.Input }],
|
|
3326
|
+
searchInput: [{ type: core.Input }],
|
|
3327
|
+
searchSubmit: [{ type: core.Input }],
|
|
3103
3328
|
delay: [{ type: core.Input }],
|
|
3104
3329
|
onChange: [{ type: core.Output }],
|
|
3105
3330
|
searchBox: [{ type: core.ViewChild, args: ['searchBox', { static: false },] }]
|
|
@@ -3107,6 +3332,14 @@
|
|
|
3107
3332
|
return SearchInputComponent;
|
|
3108
3333
|
}(ngxOdeCore.OdeComponent));
|
|
3109
3334
|
if (false) {
|
|
3335
|
+
/** @type {?} */
|
|
3336
|
+
SearchInputComponent.prototype.isSearchActive;
|
|
3337
|
+
/** @type {?} */
|
|
3338
|
+
SearchInputComponent.prototype.isSearchButtonDisabled;
|
|
3339
|
+
/** @type {?} */
|
|
3340
|
+
SearchInputComponent.prototype.searchInput;
|
|
3341
|
+
/** @type {?} */
|
|
3342
|
+
SearchInputComponent.prototype.searchSubmit;
|
|
3110
3343
|
/**
|
|
3111
3344
|
* @type {?}
|
|
3112
3345
|
* @private
|
|
@@ -5191,6 +5424,172 @@
|
|
|
5191
5424
|
return el.triggerEventHandler('click', null);
|
|
5192
5425
|
}
|
|
5193
5426
|
|
|
5427
|
+
/**
|
|
5428
|
+
* @fileoverview added by tsickle
|
|
5429
|
+
* Generated from: lib/components/dropdown/dropdown.component.ts
|
|
5430
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5431
|
+
*/
|
|
5432
|
+
/**
|
|
5433
|
+
* DropdownComponent is an alternative to the MonoSelectComponent.
|
|
5434
|
+
* Accept everything inside <ng-content> but should work with <ode-list> component
|
|
5435
|
+
*
|
|
5436
|
+
* Simple Dropdown Component without search:
|
|
5437
|
+
* [isSearchActive] can be set to false to disable search input in <ode-list>
|
|
5438
|
+
* ```
|
|
5439
|
+
* <ode-dropdown
|
|
5440
|
+
* [name]="option_name"
|
|
5441
|
+
* [isDropdownOpened]="a_boolean"
|
|
5442
|
+
* (onDropdown)="toggle_func"
|
|
5443
|
+
* >
|
|
5444
|
+
* <ode-list
|
|
5445
|
+
* [model]="model"
|
|
5446
|
+
* [filters]="filters"
|
|
5447
|
+
* (onSelect)="func_to_select_elem($event)"
|
|
5448
|
+
* (inputChange)="a_string_for_input_value = $event"
|
|
5449
|
+
* noResultsLabel="text_to_display"
|
|
5450
|
+
* searchPlaceholder="default_placeholder_text"
|
|
5451
|
+
* >
|
|
5452
|
+
* <ng-template let-item>
|
|
5453
|
+
* <div>{{ item.name }}</div>
|
|
5454
|
+
* </ng-template>
|
|
5455
|
+
* </ode-list>
|
|
5456
|
+
* </ode-dropdown>
|
|
5457
|
+
* `̀``
|
|
5458
|
+
*/
|
|
5459
|
+
var DropdownComponent = /** @class */ (function (_super) {
|
|
5460
|
+
__extends(DropdownComponent, _super);
|
|
5461
|
+
function DropdownComponent(injector) {
|
|
5462
|
+
var _this = _super.call(this, injector) || this;
|
|
5463
|
+
_this.name = '';
|
|
5464
|
+
_this.isDropdownOpened = false;
|
|
5465
|
+
_this.onDropdown = new core.EventEmitter();
|
|
5466
|
+
return _this;
|
|
5467
|
+
}
|
|
5468
|
+
/**
|
|
5469
|
+
* @return {?}
|
|
5470
|
+
*/
|
|
5471
|
+
DropdownComponent.prototype.ngOnInit = /**
|
|
5472
|
+
* @return {?}
|
|
5473
|
+
*/
|
|
5474
|
+
function () {
|
|
5475
|
+
_super.prototype.ngOnInit.call(this);
|
|
5476
|
+
};
|
|
5477
|
+
DropdownComponent.decorators = [
|
|
5478
|
+
{ type: core.Component, args: [{
|
|
5479
|
+
selector: 'ode-dropdown',
|
|
5480
|
+
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",
|
|
5481
|
+
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)}"]
|
|
5482
|
+
}] }
|
|
5483
|
+
];
|
|
5484
|
+
/** @nocollapse */
|
|
5485
|
+
DropdownComponent.ctorParameters = function () { return [
|
|
5486
|
+
{ type: core.Injector }
|
|
5487
|
+
]; };
|
|
5488
|
+
DropdownComponent.propDecorators = {
|
|
5489
|
+
name: [{ type: core.Input }],
|
|
5490
|
+
isDropdownOpened: [{ type: core.Input }],
|
|
5491
|
+
onDropdown: [{ type: core.Output }]
|
|
5492
|
+
};
|
|
5493
|
+
return DropdownComponent;
|
|
5494
|
+
}(ngxOdeCore.OdeComponent));
|
|
5495
|
+
if (false) {
|
|
5496
|
+
/** @type {?} */
|
|
5497
|
+
DropdownComponent.prototype.name;
|
|
5498
|
+
/** @type {?} */
|
|
5499
|
+
DropdownComponent.prototype.isDropdownOpened;
|
|
5500
|
+
/** @type {?} */
|
|
5501
|
+
DropdownComponent.prototype.onDropdown;
|
|
5502
|
+
}
|
|
5503
|
+
|
|
5504
|
+
/**
|
|
5505
|
+
* @fileoverview added by tsickle
|
|
5506
|
+
* Generated from: lib/components/search-toolbar/search-toolbar.component.ts
|
|
5507
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5508
|
+
*/
|
|
5509
|
+
/**
|
|
5510
|
+
* Search Toolbar component.
|
|
5511
|
+
* Used within List component, Search Toolbar will display following information:
|
|
5512
|
+
* - Label of the search filter section (example: 'Search by')
|
|
5513
|
+
* - List of search type filters (example: 'Name', 'Email' , ...)
|
|
5514
|
+
* - Number of items returned by the search
|
|
5515
|
+
*
|
|
5516
|
+
* ```
|
|
5517
|
+
* <ode-search-toolbar
|
|
5518
|
+
* [label]="'user.searchType.label'"
|
|
5519
|
+
* [searchTypes]="searchTypes"
|
|
5520
|
+
* [nbItem]="nbUser || 0"
|
|
5521
|
+
* [nbItemLabel]="'list.results.users'"
|
|
5522
|
+
* (selectSearchType)="handleSelectSearchType($event)"
|
|
5523
|
+
* >
|
|
5524
|
+
* </ode-search-toolbar>
|
|
5525
|
+
* ```
|
|
5526
|
+
*/
|
|
5527
|
+
var SearchToolbarComponent = /** @class */ (function (_super) {
|
|
5528
|
+
__extends(SearchToolbarComponent, _super);
|
|
5529
|
+
function SearchToolbarComponent(injector) {
|
|
5530
|
+
var _this = _super.call(this, injector) || this;
|
|
5531
|
+
_this.nbItem = 0;
|
|
5532
|
+
_this.selectSearchType = new core.EventEmitter();
|
|
5533
|
+
return _this;
|
|
5534
|
+
}
|
|
5535
|
+
/**
|
|
5536
|
+
* @return {?}
|
|
5537
|
+
*/
|
|
5538
|
+
SearchToolbarComponent.prototype.ngOnInit = /**
|
|
5539
|
+
* @return {?}
|
|
5540
|
+
*/
|
|
5541
|
+
function () {
|
|
5542
|
+
if (this.searchTypes && this.searchTypes.length > 0) {
|
|
5543
|
+
this.selectedSearchTypeValue = this.searchTypes[0].value;
|
|
5544
|
+
}
|
|
5545
|
+
};
|
|
5546
|
+
/**
|
|
5547
|
+
* @param {?} searchTypeValue
|
|
5548
|
+
* @return {?}
|
|
5549
|
+
*/
|
|
5550
|
+
SearchToolbarComponent.prototype.handleSearchTypeClick = /**
|
|
5551
|
+
* @param {?} searchTypeValue
|
|
5552
|
+
* @return {?}
|
|
5553
|
+
*/
|
|
5554
|
+
function (searchTypeValue) {
|
|
5555
|
+
this.selectedSearchTypeValue = searchTypeValue;
|
|
5556
|
+
this.selectSearchType.emit(searchTypeValue);
|
|
5557
|
+
};
|
|
5558
|
+
SearchToolbarComponent.decorators = [
|
|
5559
|
+
{ type: core.Component, args: [{
|
|
5560
|
+
selector: 'ode-search-toolbar',
|
|
5561
|
+
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",
|
|
5562
|
+
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}"]
|
|
5563
|
+
}] }
|
|
5564
|
+
];
|
|
5565
|
+
/** @nocollapse */
|
|
5566
|
+
SearchToolbarComponent.ctorParameters = function () { return [
|
|
5567
|
+
{ type: core.Injector }
|
|
5568
|
+
]; };
|
|
5569
|
+
SearchToolbarComponent.propDecorators = {
|
|
5570
|
+
label: [{ type: core.Input }],
|
|
5571
|
+
searchTypes: [{ type: core.Input }],
|
|
5572
|
+
nbItem: [{ type: core.Input }],
|
|
5573
|
+
nbItemLabel: [{ type: core.Input }],
|
|
5574
|
+
selectSearchType: [{ type: core.Output }]
|
|
5575
|
+
};
|
|
5576
|
+
return SearchToolbarComponent;
|
|
5577
|
+
}(ngxOdeCore.OdeComponent));
|
|
5578
|
+
if (false) {
|
|
5579
|
+
/** @type {?} */
|
|
5580
|
+
SearchToolbarComponent.prototype.label;
|
|
5581
|
+
/** @type {?} */
|
|
5582
|
+
SearchToolbarComponent.prototype.searchTypes;
|
|
5583
|
+
/** @type {?} */
|
|
5584
|
+
SearchToolbarComponent.prototype.nbItem;
|
|
5585
|
+
/** @type {?} */
|
|
5586
|
+
SearchToolbarComponent.prototype.nbItemLabel;
|
|
5587
|
+
/** @type {?} */
|
|
5588
|
+
SearchToolbarComponent.prototype.selectSearchType;
|
|
5589
|
+
/** @type {?} */
|
|
5590
|
+
SearchToolbarComponent.prototype.selectedSearchTypeValue;
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5194
5593
|
/**
|
|
5195
5594
|
* @fileoverview added by tsickle
|
|
5196
5595
|
* Generated from: lib/ngx-ode-ui.module.ts
|
|
@@ -5239,6 +5638,7 @@
|
|
|
5239
5638
|
LightBoxComponent,
|
|
5240
5639
|
LightboxConfirmComponent,
|
|
5241
5640
|
ListComponent,
|
|
5641
|
+
ListCheckableComponent,
|
|
5242
5642
|
MonoSelectComponent,
|
|
5243
5643
|
MultiSelectComponent,
|
|
5244
5644
|
MultiComboComponent,
|
|
@@ -5273,7 +5673,9 @@
|
|
|
5273
5673
|
LocalizedDatePipe,
|
|
5274
5674
|
BytesPipe,
|
|
5275
5675
|
KeysPipe,
|
|
5276
|
-
LengthPipe
|
|
5676
|
+
LengthPipe,
|
|
5677
|
+
DropdownComponent,
|
|
5678
|
+
SearchToolbarComponent
|
|
5277
5679
|
],
|
|
5278
5680
|
imports: [
|
|
5279
5681
|
common.CommonModule,
|
|
@@ -5290,6 +5692,7 @@
|
|
|
5290
5692
|
LightBoxComponent,
|
|
5291
5693
|
LightboxConfirmComponent,
|
|
5292
5694
|
ListComponent,
|
|
5695
|
+
ListCheckableComponent,
|
|
5293
5696
|
MonoSelectComponent,
|
|
5294
5697
|
MultiSelectComponent,
|
|
5295
5698
|
MultiComboComponent,
|
|
@@ -5309,6 +5712,8 @@
|
|
|
5309
5712
|
SpinnerCubeComponent,
|
|
5310
5713
|
PagerComponent,
|
|
5311
5714
|
EllipsisComponent,
|
|
5715
|
+
DropdownComponent,
|
|
5716
|
+
SearchToolbarComponent,
|
|
5312
5717
|
// directives
|
|
5313
5718
|
AnchorDirective,
|
|
5314
5719
|
DynamicTemplateDirective,
|
|
@@ -5355,6 +5760,7 @@
|
|
|
5355
5760
|
exports.LightBoxComponent = LightBoxComponent;
|
|
5356
5761
|
exports.LightboxConfirmComponent = LightboxConfirmComponent;
|
|
5357
5762
|
exports.LimitPipe = LimitPipe;
|
|
5763
|
+
exports.ListCheckableComponent = ListCheckableComponent;
|
|
5358
5764
|
exports.ListComponent = ListComponent;
|
|
5359
5765
|
exports.LocalizedDatePipe = LocalizedDatePipe;
|
|
5360
5766
|
exports.MessageBoxComponent = MessageBoxComponent;
|
|
@@ -5389,6 +5795,8 @@
|
|
|
5389
5795
|
exports.standardise = standardise;
|
|
5390
5796
|
exports.toDecimal = toDecimal;
|
|
5391
5797
|
exports.trim = trim;
|
|
5798
|
+
exports.ɵa = DropdownComponent;
|
|
5799
|
+
exports.ɵb = SearchToolbarComponent;
|
|
5392
5800
|
|
|
5393
5801
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5394
5802
|
|