ngx-ode-ui 3.12.0-dev.7 → 3.12.0-dev.8
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 +90 -2
- package/bundles/ngx-ode-ui.umd.js.map +1 -1
- package/bundles/ngx-ode-ui.umd.min.js +2 -2
- package/bundles/ngx-ode-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/dropdown/dropdown.component.js +76 -0
- package/esm2015/lib/components/list/list.component.js +6 -2
- package/esm2015/lib/components/search-input/search-input.component.js +5 -1
- package/esm2015/lib/ngx-ode-ui.module.js +5 -2
- package/esm2015/ngx-ode-ui.js +2 -1
- package/esm5/lib/components/dropdown/dropdown.component.js +81 -0
- package/esm5/lib/components/list/list.component.js +6 -2
- package/esm5/lib/components/search-input/search-input.component.js +5 -1
- package/esm5/lib/ngx-ode-ui.module.js +5 -2
- package/esm5/ngx-ode-ui.js +2 -1
- package/fesm2015/ngx-ode-ui.js +87 -3
- package/fesm2015/ngx-ode-ui.js.map +1 -1
- package/fesm5/ngx-ode-ui.js +90 -3
- package/fesm5/ngx-ode-ui.js.map +1 -1
- package/lib/components/dropdown/dropdown.component.d.ts +36 -0
- package/lib/components/list/list.component.d.ts +1 -0
- package/lib/components/search-input/search-input.component.d.ts +1 -0
- package/ngx-ode-ui.d.ts +1 -0
- package/ngx-ode-ui.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1577,6 +1577,7 @@
|
|
|
1577
1577
|
_this.model = [];
|
|
1578
1578
|
_this.searchPlaceholder = 'search';
|
|
1579
1579
|
_this.noResultsLabel = 'list.results.no.items';
|
|
1580
|
+
_this.isSearchActive = true;
|
|
1580
1581
|
_this.searchInput = false;
|
|
1581
1582
|
_this.inputChange = new core.EventEmitter();
|
|
1582
1583
|
_this.onSelect = new core.EventEmitter();
|
|
@@ -1620,7 +1621,7 @@
|
|
|
1620
1621
|
ListComponent.decorators = [
|
|
1621
1622
|
{ type: core.Component, args: [{
|
|
1622
1623
|
selector: 'ode-list',
|
|
1623
|
-
template: "<ode-search-input\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",
|
|
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",
|
|
1624
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}"]
|
|
1625
1626
|
}] }
|
|
1626
1627
|
];
|
|
@@ -1636,6 +1637,7 @@
|
|
|
1636
1637
|
limit: [{ type: core.Input }],
|
|
1637
1638
|
searchPlaceholder: [{ type: core.Input }],
|
|
1638
1639
|
noResultsLabel: [{ type: core.Input }],
|
|
1640
|
+
isSearchActive: [{ type: core.Input }],
|
|
1639
1641
|
searchInput: [{ type: core.Input }],
|
|
1640
1642
|
searchSubmit: [{ type: core.Input }],
|
|
1641
1643
|
inputChange: [{ type: core.Output }],
|
|
@@ -1669,6 +1671,8 @@
|
|
|
1669
1671
|
/** @type {?} */
|
|
1670
1672
|
ListComponent.prototype.noResultsLabel;
|
|
1671
1673
|
/** @type {?} */
|
|
1674
|
+
ListComponent.prototype.isSearchActive;
|
|
1675
|
+
/** @type {?} */
|
|
1672
1676
|
ListComponent.prototype.searchInput;
|
|
1673
1677
|
/** @type {?} */
|
|
1674
1678
|
ListComponent.prototype.searchSubmit;
|
|
@@ -3137,6 +3141,7 @@
|
|
|
3137
3141
|
_this._elRef = _elRef;
|
|
3138
3142
|
_this._renderer = _renderer;
|
|
3139
3143
|
/* Inputs / Outputs / View */
|
|
3144
|
+
_this.isSearchActive = false;
|
|
3140
3145
|
_this.searchInput = false;
|
|
3141
3146
|
_this._delay = 200;
|
|
3142
3147
|
_this.onChange = new core.EventEmitter();
|
|
@@ -3252,6 +3257,7 @@
|
|
|
3252
3257
|
{ type: core.Renderer2 }
|
|
3253
3258
|
]; };
|
|
3254
3259
|
SearchInputComponent.propDecorators = {
|
|
3260
|
+
isSearchActive: [{ type: core.Input }],
|
|
3255
3261
|
searchInput: [{ type: core.Input }],
|
|
3256
3262
|
searchSubmit: [{ type: core.Input }],
|
|
3257
3263
|
delay: [{ type: core.Input }],
|
|
@@ -3261,6 +3267,8 @@
|
|
|
3261
3267
|
return SearchInputComponent;
|
|
3262
3268
|
}(ngxOdeCore.OdeComponent));
|
|
3263
3269
|
if (false) {
|
|
3270
|
+
/** @type {?} */
|
|
3271
|
+
SearchInputComponent.prototype.isSearchActive;
|
|
3264
3272
|
/** @type {?} */
|
|
3265
3273
|
SearchInputComponent.prototype.searchInput;
|
|
3266
3274
|
/** @type {?} */
|
|
@@ -5349,6 +5357,83 @@
|
|
|
5349
5357
|
return el.triggerEventHandler('click', null);
|
|
5350
5358
|
}
|
|
5351
5359
|
|
|
5360
|
+
/**
|
|
5361
|
+
* @fileoverview added by tsickle
|
|
5362
|
+
* Generated from: lib/components/dropdown/dropdown.component.ts
|
|
5363
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5364
|
+
*/
|
|
5365
|
+
/**
|
|
5366
|
+
* DropdownComponent is an alternative to the MonoSelectComponent.
|
|
5367
|
+
* Accept everything inside <ng-content> but should work with <ode-list> component
|
|
5368
|
+
*
|
|
5369
|
+
* Simple Dropdown Component without search:
|
|
5370
|
+
* [isSearchActive] can be set to false to disable search input in <ode-list>
|
|
5371
|
+
* ```
|
|
5372
|
+
* <ode-dropdown
|
|
5373
|
+
* [name]="option_name"
|
|
5374
|
+
* [isDropdownOpened]="a_boolean"
|
|
5375
|
+
* (onDropdown)="toggle_func"
|
|
5376
|
+
* >
|
|
5377
|
+
* <ode-list
|
|
5378
|
+
* [model]="model"
|
|
5379
|
+
* [filters]="filters"
|
|
5380
|
+
* (onSelect)="func_to_select_elem($event)"
|
|
5381
|
+
* (inputChange)="a_string_for_input_value = $event"
|
|
5382
|
+
* noResultsLabel="text_to_display"
|
|
5383
|
+
* searchPlaceholder="default_placeholder_text"
|
|
5384
|
+
* >
|
|
5385
|
+
* <ng-template let-item>
|
|
5386
|
+
* <div>{{ item.name }}</div>
|
|
5387
|
+
* </ng-template>
|
|
5388
|
+
* </ode-list>
|
|
5389
|
+
* </ode-dropdown>
|
|
5390
|
+
* `̀``
|
|
5391
|
+
*/
|
|
5392
|
+
var DropdownComponent = /** @class */ (function (_super) {
|
|
5393
|
+
__extends(DropdownComponent, _super);
|
|
5394
|
+
function DropdownComponent(injector) {
|
|
5395
|
+
var _this = _super.call(this, injector) || this;
|
|
5396
|
+
_this.name = '';
|
|
5397
|
+
_this.isDropdownOpened = false;
|
|
5398
|
+
_this.onDropdown = new core.EventEmitter();
|
|
5399
|
+
return _this;
|
|
5400
|
+
}
|
|
5401
|
+
/**
|
|
5402
|
+
* @return {?}
|
|
5403
|
+
*/
|
|
5404
|
+
DropdownComponent.prototype.ngOnInit = /**
|
|
5405
|
+
* @return {?}
|
|
5406
|
+
*/
|
|
5407
|
+
function () {
|
|
5408
|
+
_super.prototype.ngOnInit.call(this);
|
|
5409
|
+
};
|
|
5410
|
+
DropdownComponent.decorators = [
|
|
5411
|
+
{ type: core.Component, args: [{
|
|
5412
|
+
selector: 'ode-dropdown',
|
|
5413
|
+
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",
|
|
5414
|
+
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-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)}"]
|
|
5415
|
+
}] }
|
|
5416
|
+
];
|
|
5417
|
+
/** @nocollapse */
|
|
5418
|
+
DropdownComponent.ctorParameters = function () { return [
|
|
5419
|
+
{ type: core.Injector }
|
|
5420
|
+
]; };
|
|
5421
|
+
DropdownComponent.propDecorators = {
|
|
5422
|
+
name: [{ type: core.Input }],
|
|
5423
|
+
isDropdownOpened: [{ type: core.Input }],
|
|
5424
|
+
onDropdown: [{ type: core.Output }]
|
|
5425
|
+
};
|
|
5426
|
+
return DropdownComponent;
|
|
5427
|
+
}(ngxOdeCore.OdeComponent));
|
|
5428
|
+
if (false) {
|
|
5429
|
+
/** @type {?} */
|
|
5430
|
+
DropdownComponent.prototype.name;
|
|
5431
|
+
/** @type {?} */
|
|
5432
|
+
DropdownComponent.prototype.isDropdownOpened;
|
|
5433
|
+
/** @type {?} */
|
|
5434
|
+
DropdownComponent.prototype.onDropdown;
|
|
5435
|
+
}
|
|
5436
|
+
|
|
5352
5437
|
/**
|
|
5353
5438
|
* @fileoverview added by tsickle
|
|
5354
5439
|
* Generated from: lib/ngx-ode-ui.module.ts
|
|
@@ -5432,7 +5517,8 @@
|
|
|
5432
5517
|
LocalizedDatePipe,
|
|
5433
5518
|
BytesPipe,
|
|
5434
5519
|
KeysPipe,
|
|
5435
|
-
LengthPipe
|
|
5520
|
+
LengthPipe,
|
|
5521
|
+
DropdownComponent
|
|
5436
5522
|
],
|
|
5437
5523
|
imports: [
|
|
5438
5524
|
common.CommonModule,
|
|
@@ -5469,6 +5555,7 @@
|
|
|
5469
5555
|
SpinnerCubeComponent,
|
|
5470
5556
|
PagerComponent,
|
|
5471
5557
|
EllipsisComponent,
|
|
5558
|
+
DropdownComponent,
|
|
5472
5559
|
// directives
|
|
5473
5560
|
AnchorDirective,
|
|
5474
5561
|
DynamicTemplateDirective,
|
|
@@ -5550,6 +5637,7 @@
|
|
|
5550
5637
|
exports.standardise = standardise;
|
|
5551
5638
|
exports.toDecimal = toDecimal;
|
|
5552
5639
|
exports.trim = trim;
|
|
5640
|
+
exports.ɵa = DropdownComponent;
|
|
5553
5641
|
|
|
5554
5642
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5555
5643
|
|