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
package/fesm5/ngx-ode-ui.js
CHANGED
|
@@ -1380,9 +1380,9 @@ var ListComponent = /** @class */ (function (_super) {
|
|
|
1380
1380
|
/* Store pipe */
|
|
1381
1381
|
_this.self = _this;
|
|
1382
1382
|
_this._storedElements = [];
|
|
1383
|
-
_this.model = [];
|
|
1384
1383
|
_this.searchPlaceholder = 'search';
|
|
1385
1384
|
_this.noResultsLabel = 'list.results.no.items';
|
|
1385
|
+
_this.placeholder = 'list.placeholder';
|
|
1386
1386
|
_this.isSearchActive = true;
|
|
1387
1387
|
_this.searchInput = false;
|
|
1388
1388
|
_this.inputChange = new EventEmitter();
|
|
@@ -1427,8 +1427,8 @@ var ListComponent = /** @class */ (function (_super) {
|
|
|
1427
1427
|
ListComponent.decorators = [
|
|
1428
1428
|
{ type: Component, args: [{
|
|
1429
1429
|
selector: 'ode-list',
|
|
1430
|
-
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",
|
|
1431
|
-
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}"]
|
|
1430
|
+
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",
|
|
1431
|
+
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}"]
|
|
1432
1432
|
}] }
|
|
1433
1433
|
];
|
|
1434
1434
|
/** @nocollapse */
|
|
@@ -1443,6 +1443,7 @@ var ListComponent = /** @class */ (function (_super) {
|
|
|
1443
1443
|
limit: [{ type: Input }],
|
|
1444
1444
|
searchPlaceholder: [{ type: Input }],
|
|
1445
1445
|
noResultsLabel: [{ type: Input }],
|
|
1446
|
+
placeholder: [{ type: Input }],
|
|
1446
1447
|
isSearchActive: [{ type: Input }],
|
|
1447
1448
|
searchInput: [{ type: Input }],
|
|
1448
1449
|
searchSubmit: [{ type: Input }],
|
|
@@ -1477,6 +1478,8 @@ if (false) {
|
|
|
1477
1478
|
/** @type {?} */
|
|
1478
1479
|
ListComponent.prototype.noResultsLabel;
|
|
1479
1480
|
/** @type {?} */
|
|
1481
|
+
ListComponent.prototype.placeholder;
|
|
1482
|
+
/** @type {?} */
|
|
1480
1483
|
ListComponent.prototype.isSearchActive;
|
|
1481
1484
|
/** @type {?} */
|
|
1482
1485
|
ListComponent.prototype.searchInput;
|
|
@@ -5240,6 +5243,95 @@ if (false) {
|
|
|
5240
5243
|
DropdownComponent.prototype.onDropdown;
|
|
5241
5244
|
}
|
|
5242
5245
|
|
|
5246
|
+
/**
|
|
5247
|
+
* @fileoverview added by tsickle
|
|
5248
|
+
* Generated from: lib/components/search-toolbar/search-toolbar.component.ts
|
|
5249
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5250
|
+
*/
|
|
5251
|
+
/**
|
|
5252
|
+
* Search Toolbar component.
|
|
5253
|
+
* Used within List component, Search Toolbar will display following information:
|
|
5254
|
+
* - Label of the search filter section (example: 'Search by')
|
|
5255
|
+
* - List of search type filters (example: 'Name', 'Email' , ...)
|
|
5256
|
+
* - Number of items returned by the search
|
|
5257
|
+
*
|
|
5258
|
+
* ```
|
|
5259
|
+
* <ode-search-toolbar
|
|
5260
|
+
* [label]="'user.searchType.label'"
|
|
5261
|
+
* [searchTypes]="searchTypes"
|
|
5262
|
+
* [nbItem]="nbUser || 0"
|
|
5263
|
+
* [nbItemLabel]="'list.results.users'"
|
|
5264
|
+
* (selectSearchType)="handleSelectSearchType($event)"
|
|
5265
|
+
* >
|
|
5266
|
+
* </ode-search-toolbar>
|
|
5267
|
+
* ```
|
|
5268
|
+
*/
|
|
5269
|
+
var SearchToolbarComponent = /** @class */ (function (_super) {
|
|
5270
|
+
__extends(SearchToolbarComponent, _super);
|
|
5271
|
+
function SearchToolbarComponent(injector) {
|
|
5272
|
+
var _this = _super.call(this, injector) || this;
|
|
5273
|
+
_this.nbItem = 0;
|
|
5274
|
+
_this.selectSearchType = new EventEmitter();
|
|
5275
|
+
return _this;
|
|
5276
|
+
}
|
|
5277
|
+
/**
|
|
5278
|
+
* @return {?}
|
|
5279
|
+
*/
|
|
5280
|
+
SearchToolbarComponent.prototype.ngOnInit = /**
|
|
5281
|
+
* @return {?}
|
|
5282
|
+
*/
|
|
5283
|
+
function () {
|
|
5284
|
+
if (this.searchTypes && this.searchTypes.length > 0) {
|
|
5285
|
+
this.selectedSearchTypeValue = this.searchTypes[0].value;
|
|
5286
|
+
}
|
|
5287
|
+
};
|
|
5288
|
+
/**
|
|
5289
|
+
* @param {?} searchTypeValue
|
|
5290
|
+
* @return {?}
|
|
5291
|
+
*/
|
|
5292
|
+
SearchToolbarComponent.prototype.handleSearchTypeClick = /**
|
|
5293
|
+
* @param {?} searchTypeValue
|
|
5294
|
+
* @return {?}
|
|
5295
|
+
*/
|
|
5296
|
+
function (searchTypeValue) {
|
|
5297
|
+
this.selectedSearchTypeValue = searchTypeValue;
|
|
5298
|
+
this.selectSearchType.emit(searchTypeValue);
|
|
5299
|
+
};
|
|
5300
|
+
SearchToolbarComponent.decorators = [
|
|
5301
|
+
{ type: Component, args: [{
|
|
5302
|
+
selector: 'ode-search-toolbar',
|
|
5303
|
+
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",
|
|
5304
|
+
styles: [".search-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px}.search-toolbar .search-toolbar-label{font-size:.9em}"]
|
|
5305
|
+
}] }
|
|
5306
|
+
];
|
|
5307
|
+
/** @nocollapse */
|
|
5308
|
+
SearchToolbarComponent.ctorParameters = function () { return [
|
|
5309
|
+
{ type: Injector }
|
|
5310
|
+
]; };
|
|
5311
|
+
SearchToolbarComponent.propDecorators = {
|
|
5312
|
+
label: [{ type: Input }],
|
|
5313
|
+
searchTypes: [{ type: Input }],
|
|
5314
|
+
nbItem: [{ type: Input }],
|
|
5315
|
+
nbItemLabel: [{ type: Input }],
|
|
5316
|
+
selectSearchType: [{ type: Output }]
|
|
5317
|
+
};
|
|
5318
|
+
return SearchToolbarComponent;
|
|
5319
|
+
}(OdeComponent));
|
|
5320
|
+
if (false) {
|
|
5321
|
+
/** @type {?} */
|
|
5322
|
+
SearchToolbarComponent.prototype.label;
|
|
5323
|
+
/** @type {?} */
|
|
5324
|
+
SearchToolbarComponent.prototype.searchTypes;
|
|
5325
|
+
/** @type {?} */
|
|
5326
|
+
SearchToolbarComponent.prototype.nbItem;
|
|
5327
|
+
/** @type {?} */
|
|
5328
|
+
SearchToolbarComponent.prototype.nbItemLabel;
|
|
5329
|
+
/** @type {?} */
|
|
5330
|
+
SearchToolbarComponent.prototype.selectSearchType;
|
|
5331
|
+
/** @type {?} */
|
|
5332
|
+
SearchToolbarComponent.prototype.selectedSearchTypeValue;
|
|
5333
|
+
}
|
|
5334
|
+
|
|
5243
5335
|
/**
|
|
5244
5336
|
* @fileoverview added by tsickle
|
|
5245
5337
|
* Generated from: lib/ngx-ode-ui.module.ts
|
|
@@ -5324,7 +5416,8 @@ var NgxOdeUiModule = /** @class */ (function () {
|
|
|
5324
5416
|
BytesPipe,
|
|
5325
5417
|
KeysPipe,
|
|
5326
5418
|
LengthPipe,
|
|
5327
|
-
DropdownComponent
|
|
5419
|
+
DropdownComponent,
|
|
5420
|
+
SearchToolbarComponent
|
|
5328
5421
|
],
|
|
5329
5422
|
imports: [
|
|
5330
5423
|
CommonModule,
|
|
@@ -5362,6 +5455,7 @@ var NgxOdeUiModule = /** @class */ (function () {
|
|
|
5362
5455
|
PagerComponent,
|
|
5363
5456
|
EllipsisComponent,
|
|
5364
5457
|
DropdownComponent,
|
|
5458
|
+
SearchToolbarComponent,
|
|
5365
5459
|
// directives
|
|
5366
5460
|
AnchorDirective,
|
|
5367
5461
|
DynamicTemplateDirective,
|
|
@@ -5398,5 +5492,5 @@ var NgxOdeUiModule = /** @class */ (function () {
|
|
|
5398
5492
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5399
5493
|
*/
|
|
5400
5494
|
|
|
5401
|
-
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 };
|
|
5495
|
+
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 };
|
|
5402
5496
|
//# sourceMappingURL=ngx-ode-ui.js.map
|