ngx-ode-ui 3.12.0-dev.16 → 3.12.0-dev.19
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 +59 -5
- 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/list/list.component.js +9 -2
- package/esm2015/lib/components/search-input/search-input.component.js +6 -2
- package/esm5/lib/components/datepicker/datepicker.component.js +47 -4
- package/esm5/lib/components/list/list.component.js +9 -2
- package/esm5/lib/components/search-input/search-input.component.js +6 -2
- package/fesm2015/ngx-ode-ui.js +54 -5
- package/fesm2015/ngx-ode-ui.js.map +1 -1
- package/fesm5/ngx-ode-ui.js +59 -5
- package/fesm5/ngx-ode-ui.js.map +1 -1
- package/lib/components/datepicker/datepicker.component.d.ts +2 -0
- package/lib/components/list/list.component.d.ts +2 -0
- package/lib/components/search-input/search-input.component.d.ts +1 -0
- package/ngx-ode-ui.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -1578,6 +1621,7 @@
|
|
|
1578
1621
|
_this.noResultsLabel = 'list.results.no.items';
|
|
1579
1622
|
_this.placeholder = 'list.placeholder';
|
|
1580
1623
|
_this.isSearchActive = true;
|
|
1624
|
+
_this.isSearchButtonDisabled = false;
|
|
1581
1625
|
_this.searchInput = false;
|
|
1582
1626
|
_this.inputChange = new core.EventEmitter();
|
|
1583
1627
|
_this.onSelect = new core.EventEmitter();
|
|
@@ -1621,7 +1665,7 @@
|
|
|
1621
1665
|
ListComponent.decorators = [
|
|
1622
1666
|
{ type: core.Component, args: [{
|
|
1623
1667
|
selector: 'ode-list',
|
|
1624
|
-
template: "<ode-search-input\n *ngIf=\"isSearchActive\"\n [searchInput]=\"searchInput\"\n [searchSubmit]=\"searchSubmit\"\n [attr.placeholder]=\"searchPlaceholder | translate\"\n (onChange)=\"inputChange.emit($event)\"
|
|
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",
|
|
1625
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}"]
|
|
1626
1670
|
}] }
|
|
1627
1671
|
];
|
|
@@ -1639,7 +1683,9 @@
|
|
|
1639
1683
|
noResultsLabel: [{ type: core.Input }],
|
|
1640
1684
|
placeholder: [{ type: core.Input }],
|
|
1641
1685
|
isSearchActive: [{ type: core.Input }],
|
|
1686
|
+
isSearchButtonDisabled: [{ type: core.Input }],
|
|
1642
1687
|
searchInput: [{ type: core.Input }],
|
|
1688
|
+
searchDelay: [{ type: core.Input }],
|
|
1643
1689
|
searchSubmit: [{ type: core.Input }],
|
|
1644
1690
|
inputChange: [{ type: core.Output }],
|
|
1645
1691
|
onSelect: [{ type: core.Output }],
|
|
@@ -1676,8 +1722,12 @@
|
|
|
1676
1722
|
/** @type {?} */
|
|
1677
1723
|
ListComponent.prototype.isSearchActive;
|
|
1678
1724
|
/** @type {?} */
|
|
1725
|
+
ListComponent.prototype.isSearchButtonDisabled;
|
|
1726
|
+
/** @type {?} */
|
|
1679
1727
|
ListComponent.prototype.searchInput;
|
|
1680
1728
|
/** @type {?} */
|
|
1729
|
+
ListComponent.prototype.searchDelay;
|
|
1730
|
+
/** @type {?} */
|
|
1681
1731
|
ListComponent.prototype.searchSubmit;
|
|
1682
1732
|
/** @type {?} */
|
|
1683
1733
|
ListComponent.prototype.inputChange;
|
|
@@ -3145,6 +3195,7 @@
|
|
|
3145
3195
|
_this._renderer = _renderer;
|
|
3146
3196
|
/* Inputs / Outputs / View */
|
|
3147
3197
|
_this.isSearchActive = false;
|
|
3198
|
+
_this.isSearchButtonDisabled = false;
|
|
3148
3199
|
_this.searchInput = false;
|
|
3149
3200
|
_this._delay = 200;
|
|
3150
3201
|
_this.onChange = new core.EventEmitter();
|
|
@@ -3249,7 +3300,7 @@
|
|
|
3249
3300
|
SearchInputComponent.decorators = [
|
|
3250
3301
|
{ type: core.Component, args: [{
|
|
3251
3302
|
selector: 'ode-search-input',
|
|
3252
|
-
template: "<form\n class=\"search-container\"\n (ngSubmit)=\"searchInput && searchSubmit()\">\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\">\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)\"/> -->",
|
|
3303
|
+
template: "<form\n class=\"search-container\"\n (ngSubmit)=\"searchInput && searchSubmit()\">\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)\"/> -->",
|
|
3253
3304
|
styles: [":host .search-container{margin:0;display:flex}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}"]
|
|
3254
3305
|
}] }
|
|
3255
3306
|
];
|
|
@@ -3261,6 +3312,7 @@
|
|
|
3261
3312
|
]; };
|
|
3262
3313
|
SearchInputComponent.propDecorators = {
|
|
3263
3314
|
isSearchActive: [{ type: core.Input }],
|
|
3315
|
+
isSearchButtonDisabled: [{ type: core.Input }],
|
|
3264
3316
|
searchInput: [{ type: core.Input }],
|
|
3265
3317
|
searchSubmit: [{ type: core.Input }],
|
|
3266
3318
|
delay: [{ type: core.Input }],
|
|
@@ -3273,6 +3325,8 @@
|
|
|
3273
3325
|
/** @type {?} */
|
|
3274
3326
|
SearchInputComponent.prototype.isSearchActive;
|
|
3275
3327
|
/** @type {?} */
|
|
3328
|
+
SearchInputComponent.prototype.isSearchButtonDisabled;
|
|
3329
|
+
/** @type {?} */
|
|
3276
3330
|
SearchInputComponent.prototype.searchInput;
|
|
3277
3331
|
/** @type {?} */
|
|
3278
3332
|
SearchInputComponent.prototype.searchSubmit;
|