ngx-ode-ui 3.12.0-dev.10 → 3.12.0-dev.14
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 +99 -4
- 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/list/list.component.js +7 -4
- package/esm2015/lib/components/search-toolbar/search-toolbar.component.js +84 -0
- package/esm2015/lib/ngx-ode-ui.module.js +5 -2
- package/esm2015/ngx-ode-ui.js +2 -1
- package/esm5/lib/components/list/list.component.js +7 -4
- package/esm5/lib/components/search-toolbar/search-toolbar.component.js +93 -0
- package/esm5/lib/ngx-ode-ui.module.js +5 -2
- package/esm5/ngx-ode-ui.js +2 -1
- package/fesm2015/ngx-ode-ui.js +92 -5
- package/fesm2015/ngx-ode-ui.js.map +1 -1
- package/fesm5/ngx-ode-ui.js +99 -5
- package/fesm5/ngx-ode-ui.js.map +1 -1
- package/lib/components/list/list.component.d.ts +2 -1
- package/lib/components/search-toolbar/search-toolbar.component.d.ts +34 -0
- package/ngx-ode-ui.d.ts +1 -0
- package/ngx-ode-ui.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1574,9 +1574,9 @@
|
|
|
1574
1574
|
/* Store pipe */
|
|
1575
1575
|
_this.self = _this;
|
|
1576
1576
|
_this._storedElements = [];
|
|
1577
|
-
_this.model = [];
|
|
1578
1577
|
_this.searchPlaceholder = 'search';
|
|
1579
1578
|
_this.noResultsLabel = 'list.results.no.items';
|
|
1579
|
+
_this.placeholder = 'list.placeholder';
|
|
1580
1580
|
_this.isSearchActive = true;
|
|
1581
1581
|
_this.searchInput = false;
|
|
1582
1582
|
_this.inputChange = new core.EventEmitter();
|
|
@@ -1621,8 +1621,8 @@
|
|
|
1621
1621
|
ListComponent.decorators = [
|
|
1622
1622
|
{ type: core.Component, args: [{
|
|
1623
1623
|
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)\"></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",
|
|
1625
|
-
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}"]
|
|
1624
|
+
template: "<ode-search-input\n *ngIf=\"isSearchActive\"\n [searchInput]=\"searchInput\"\n [searchSubmit]=\"searchSubmit\"\n [attr.placeholder]=\"searchPlaceholder | translate\"\n (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 <ul *ngIf=\"!model\">\n <li class=\"placeholder\">{{ placeholder | translate }}</li>\n </ul>\n</div>\n",
|
|
1625
|
+
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:50px;text-align:center}ul li.placeholder:hover{cursor:default!important;background-color:inherit!important}ul li.disabled{pointer-events:none}.list-wrapper{min-height:30vh}"]
|
|
1626
1626
|
}] }
|
|
1627
1627
|
];
|
|
1628
1628
|
/** @nocollapse */
|
|
@@ -1637,6 +1637,7 @@
|
|
|
1637
1637
|
limit: [{ type: core.Input }],
|
|
1638
1638
|
searchPlaceholder: [{ type: core.Input }],
|
|
1639
1639
|
noResultsLabel: [{ type: core.Input }],
|
|
1640
|
+
placeholder: [{ type: core.Input }],
|
|
1640
1641
|
isSearchActive: [{ type: core.Input }],
|
|
1641
1642
|
searchInput: [{ type: core.Input }],
|
|
1642
1643
|
searchSubmit: [{ type: core.Input }],
|
|
@@ -1671,6 +1672,8 @@
|
|
|
1671
1672
|
/** @type {?} */
|
|
1672
1673
|
ListComponent.prototype.noResultsLabel;
|
|
1673
1674
|
/** @type {?} */
|
|
1675
|
+
ListComponent.prototype.placeholder;
|
|
1676
|
+
/** @type {?} */
|
|
1674
1677
|
ListComponent.prototype.isSearchActive;
|
|
1675
1678
|
/** @type {?} */
|
|
1676
1679
|
ListComponent.prototype.searchInput;
|
|
@@ -5434,6 +5437,95 @@
|
|
|
5434
5437
|
DropdownComponent.prototype.onDropdown;
|
|
5435
5438
|
}
|
|
5436
5439
|
|
|
5440
|
+
/**
|
|
5441
|
+
* @fileoverview added by tsickle
|
|
5442
|
+
* Generated from: lib/components/search-toolbar/search-toolbar.component.ts
|
|
5443
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5444
|
+
*/
|
|
5445
|
+
/**
|
|
5446
|
+
* Search Toolbar component.
|
|
5447
|
+
* Used within List component, Search Toolbar will display following information:
|
|
5448
|
+
* - Label of the search filter section (example: 'Search by')
|
|
5449
|
+
* - List of search type filters (example: 'Name', 'Email' , ...)
|
|
5450
|
+
* - Number of items returned by the search
|
|
5451
|
+
*
|
|
5452
|
+
* ```
|
|
5453
|
+
* <ode-search-toolbar
|
|
5454
|
+
* [label]="'user.searchType.label'"
|
|
5455
|
+
* [searchTypes]="searchTypes"
|
|
5456
|
+
* [nbItem]="nbUser || 0"
|
|
5457
|
+
* [nbItemLabel]="'list.results.users'"
|
|
5458
|
+
* (selectSearchType)="handleSelectSearchType($event)"
|
|
5459
|
+
* >
|
|
5460
|
+
* </ode-search-toolbar>
|
|
5461
|
+
* ```
|
|
5462
|
+
*/
|
|
5463
|
+
var SearchToolbarComponent = /** @class */ (function (_super) {
|
|
5464
|
+
__extends(SearchToolbarComponent, _super);
|
|
5465
|
+
function SearchToolbarComponent(injector) {
|
|
5466
|
+
var _this = _super.call(this, injector) || this;
|
|
5467
|
+
_this.nbItem = 0;
|
|
5468
|
+
_this.selectSearchType = new core.EventEmitter();
|
|
5469
|
+
return _this;
|
|
5470
|
+
}
|
|
5471
|
+
/**
|
|
5472
|
+
* @return {?}
|
|
5473
|
+
*/
|
|
5474
|
+
SearchToolbarComponent.prototype.ngOnInit = /**
|
|
5475
|
+
* @return {?}
|
|
5476
|
+
*/
|
|
5477
|
+
function () {
|
|
5478
|
+
if (this.searchTypes && this.searchTypes.length > 0) {
|
|
5479
|
+
this.selectedSearchTypeValue = this.searchTypes[0].value;
|
|
5480
|
+
}
|
|
5481
|
+
};
|
|
5482
|
+
/**
|
|
5483
|
+
* @param {?} searchTypeValue
|
|
5484
|
+
* @return {?}
|
|
5485
|
+
*/
|
|
5486
|
+
SearchToolbarComponent.prototype.handleSearchTypeClick = /**
|
|
5487
|
+
* @param {?} searchTypeValue
|
|
5488
|
+
* @return {?}
|
|
5489
|
+
*/
|
|
5490
|
+
function (searchTypeValue) {
|
|
5491
|
+
this.selectedSearchTypeValue = searchTypeValue;
|
|
5492
|
+
this.selectSearchType.emit(searchTypeValue);
|
|
5493
|
+
};
|
|
5494
|
+
SearchToolbarComponent.decorators = [
|
|
5495
|
+
{ type: core.Component, args: [{
|
|
5496
|
+
selector: 'ode-search-toolbar',
|
|
5497
|
+
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",
|
|
5498
|
+
styles: [".search-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px}.search-toolbar .search-toolbar-label{font-size:.9em}"]
|
|
5499
|
+
}] }
|
|
5500
|
+
];
|
|
5501
|
+
/** @nocollapse */
|
|
5502
|
+
SearchToolbarComponent.ctorParameters = function () { return [
|
|
5503
|
+
{ type: core.Injector }
|
|
5504
|
+
]; };
|
|
5505
|
+
SearchToolbarComponent.propDecorators = {
|
|
5506
|
+
label: [{ type: core.Input }],
|
|
5507
|
+
searchTypes: [{ type: core.Input }],
|
|
5508
|
+
nbItem: [{ type: core.Input }],
|
|
5509
|
+
nbItemLabel: [{ type: core.Input }],
|
|
5510
|
+
selectSearchType: [{ type: core.Output }]
|
|
5511
|
+
};
|
|
5512
|
+
return SearchToolbarComponent;
|
|
5513
|
+
}(ngxOdeCore.OdeComponent));
|
|
5514
|
+
if (false) {
|
|
5515
|
+
/** @type {?} */
|
|
5516
|
+
SearchToolbarComponent.prototype.label;
|
|
5517
|
+
/** @type {?} */
|
|
5518
|
+
SearchToolbarComponent.prototype.searchTypes;
|
|
5519
|
+
/** @type {?} */
|
|
5520
|
+
SearchToolbarComponent.prototype.nbItem;
|
|
5521
|
+
/** @type {?} */
|
|
5522
|
+
SearchToolbarComponent.prototype.nbItemLabel;
|
|
5523
|
+
/** @type {?} */
|
|
5524
|
+
SearchToolbarComponent.prototype.selectSearchType;
|
|
5525
|
+
/** @type {?} */
|
|
5526
|
+
SearchToolbarComponent.prototype.selectedSearchTypeValue;
|
|
5527
|
+
}
|
|
5528
|
+
|
|
5437
5529
|
/**
|
|
5438
5530
|
* @fileoverview added by tsickle
|
|
5439
5531
|
* Generated from: lib/ngx-ode-ui.module.ts
|
|
@@ -5518,7 +5610,8 @@
|
|
|
5518
5610
|
BytesPipe,
|
|
5519
5611
|
KeysPipe,
|
|
5520
5612
|
LengthPipe,
|
|
5521
|
-
DropdownComponent
|
|
5613
|
+
DropdownComponent,
|
|
5614
|
+
SearchToolbarComponent
|
|
5522
5615
|
],
|
|
5523
5616
|
imports: [
|
|
5524
5617
|
common.CommonModule,
|
|
@@ -5556,6 +5649,7 @@
|
|
|
5556
5649
|
PagerComponent,
|
|
5557
5650
|
EllipsisComponent,
|
|
5558
5651
|
DropdownComponent,
|
|
5652
|
+
SearchToolbarComponent,
|
|
5559
5653
|
// directives
|
|
5560
5654
|
AnchorDirective,
|
|
5561
5655
|
DynamicTemplateDirective,
|
|
@@ -5638,6 +5732,7 @@
|
|
|
5638
5732
|
exports.toDecimal = toDecimal;
|
|
5639
5733
|
exports.trim = trim;
|
|
5640
5734
|
exports.ɵa = DropdownComponent;
|
|
5735
|
+
exports.ɵb = SearchToolbarComponent;
|
|
5641
5736
|
|
|
5642
5737
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5643
5738
|
|