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
package/fesm2015/ngx-ode-ui.js
CHANGED
|
@@ -353,6 +353,7 @@ class DatepickerComponent extends OdeComponent {
|
|
|
353
353
|
this.labelsService = labelsService;
|
|
354
354
|
this.innerValue = '';
|
|
355
355
|
this.disabled = false;
|
|
356
|
+
this._readonly = false;
|
|
356
357
|
this.enableTime = false;
|
|
357
358
|
this.placeholder = '';
|
|
358
359
|
this.changeDate = new EventEmitter();
|
|
@@ -383,6 +384,26 @@ class DatepickerComponent extends OdeComponent {
|
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* @param {?} val
|
|
389
|
+
* @return {?}
|
|
390
|
+
*/
|
|
391
|
+
set readonly(val) {
|
|
392
|
+
this._readonly = val;
|
|
393
|
+
if (this.datePickerInst && this.datePickerInst.altInput) {
|
|
394
|
+
// Apply the readonly attribute addition/removal to the visible input (wrapped)
|
|
395
|
+
if (val)
|
|
396
|
+
this.datePickerInst.altInput.setAttribute('readonly', "");
|
|
397
|
+
else
|
|
398
|
+
this.datePickerInst.altInput.removeAttribute('readonly');
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* @return {?}
|
|
403
|
+
*/
|
|
404
|
+
get readonly() {
|
|
405
|
+
return this._readonly;
|
|
406
|
+
}
|
|
386
407
|
/**
|
|
387
408
|
* @return {?}
|
|
388
409
|
*/
|
|
@@ -413,12 +434,25 @@ class DatepickerComponent extends OdeComponent {
|
|
|
413
434
|
enableTime: this.enableTime,
|
|
414
435
|
minDate: this.minDate,
|
|
415
436
|
maxDate: this.maxDate,
|
|
416
|
-
clickOpens:
|
|
437
|
+
clickOpens: false,
|
|
417
438
|
wrap: true,
|
|
418
439
|
// to add input decoration (calendar icon and delete icon)
|
|
419
440
|
locale: datePickerLocale
|
|
420
441
|
};
|
|
421
442
|
this.datePickerInst = new Flatpickr(this.datePickerElement.nativeElement, options);
|
|
443
|
+
if (!this.disabled) {
|
|
444
|
+
this.datePickerInst.altInput.addEventListener('click', (/**
|
|
445
|
+
* @param {?} e
|
|
446
|
+
* @return {?}
|
|
447
|
+
*/
|
|
448
|
+
e => {
|
|
449
|
+
if (!this.readonly) {
|
|
450
|
+
this.datePickerInst.toggle();
|
|
451
|
+
}
|
|
452
|
+
}));
|
|
453
|
+
}
|
|
454
|
+
// Force updating the date input readonly attribute :
|
|
455
|
+
this.readonly = this._readonly;
|
|
422
456
|
}
|
|
423
457
|
/**
|
|
424
458
|
* @return {?}
|
|
@@ -463,8 +497,9 @@ class DatepickerComponent extends OdeComponent {
|
|
|
463
497
|
DatepickerComponent.decorators = [
|
|
464
498
|
{ type: Component, args: [{
|
|
465
499
|
selector: 'ode-date-picker',
|
|
466
|
-
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",
|
|
467
|
-
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR]
|
|
500
|
+
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",
|
|
501
|
+
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
|
|
502
|
+
styles: [".hidden{visibility:hidden}"]
|
|
468
503
|
}] }
|
|
469
504
|
];
|
|
470
505
|
/** @nocollapse */
|
|
@@ -478,6 +513,7 @@ DatepickerComponent.propDecorators = {
|
|
|
478
513
|
inputElement: [{ type: ViewChild, args: ['inputRef', { static: false },] }],
|
|
479
514
|
model: [{ type: ViewChild, args: [NgModel, { static: false },] }],
|
|
480
515
|
disabled: [{ type: Input }],
|
|
516
|
+
readonly: [{ type: Input }],
|
|
481
517
|
enableTime: [{ type: Input }],
|
|
482
518
|
placeholder: [{ type: Input }],
|
|
483
519
|
minDate: [{ type: Input }],
|
|
@@ -504,6 +540,8 @@ if (false) {
|
|
|
504
540
|
/** @type {?} */
|
|
505
541
|
DatepickerComponent.prototype.disabled;
|
|
506
542
|
/** @type {?} */
|
|
543
|
+
DatepickerComponent.prototype._readonly;
|
|
544
|
+
/** @type {?} */
|
|
507
545
|
DatepickerComponent.prototype.enableTime;
|
|
508
546
|
/** @type {?} */
|
|
509
547
|
DatepickerComponent.prototype.placeholder;
|
|
@@ -1221,9 +1259,12 @@ class ListComponent extends OdeComponent {
|
|
|
1221
1259
|
/* Store pipe */
|
|
1222
1260
|
this.self = this;
|
|
1223
1261
|
this._storedElements = [];
|
|
1224
|
-
this.model = [];
|
|
1225
1262
|
this.searchPlaceholder = 'search';
|
|
1226
1263
|
this.noResultsLabel = 'list.results.no.items';
|
|
1264
|
+
this.placeholder = 'list.placeholder';
|
|
1265
|
+
this.isSearchActive = true;
|
|
1266
|
+
this.isSearchButtonDisabled = false;
|
|
1267
|
+
this.searchInput = false;
|
|
1227
1268
|
this.inputChange = new EventEmitter();
|
|
1228
1269
|
this.onSelect = new EventEmitter();
|
|
1229
1270
|
this.listChange = new EventEmitter();
|
|
@@ -1262,8 +1303,8 @@ class ListComponent extends OdeComponent {
|
|
|
1262
1303
|
ListComponent.decorators = [
|
|
1263
1304
|
{ type: Component, args: [{
|
|
1264
1305
|
selector: 'ode-list',
|
|
1265
|
-
template: "<ode-search-input
|
|
1266
|
-
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}"]
|
|
1306
|
+
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",
|
|
1307
|
+
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}"]
|
|
1267
1308
|
}] }
|
|
1268
1309
|
];
|
|
1269
1310
|
/** @nocollapse */
|
|
@@ -1278,6 +1319,12 @@ ListComponent.propDecorators = {
|
|
|
1278
1319
|
limit: [{ type: Input }],
|
|
1279
1320
|
searchPlaceholder: [{ type: Input }],
|
|
1280
1321
|
noResultsLabel: [{ type: Input }],
|
|
1322
|
+
placeholder: [{ type: Input }],
|
|
1323
|
+
isSearchActive: [{ type: Input }],
|
|
1324
|
+
isSearchButtonDisabled: [{ type: Input }],
|
|
1325
|
+
searchInput: [{ type: Input }],
|
|
1326
|
+
searchDelay: [{ type: Input }],
|
|
1327
|
+
searchSubmit: [{ type: Input }],
|
|
1281
1328
|
inputChange: [{ type: Output }],
|
|
1282
1329
|
onSelect: [{ type: Output }],
|
|
1283
1330
|
listChange: [{ type: Output }],
|
|
@@ -1307,6 +1354,18 @@ if (false) {
|
|
|
1307
1354
|
/** @type {?} */
|
|
1308
1355
|
ListComponent.prototype.noResultsLabel;
|
|
1309
1356
|
/** @type {?} */
|
|
1357
|
+
ListComponent.prototype.placeholder;
|
|
1358
|
+
/** @type {?} */
|
|
1359
|
+
ListComponent.prototype.isSearchActive;
|
|
1360
|
+
/** @type {?} */
|
|
1361
|
+
ListComponent.prototype.isSearchButtonDisabled;
|
|
1362
|
+
/** @type {?} */
|
|
1363
|
+
ListComponent.prototype.searchInput;
|
|
1364
|
+
/** @type {?} */
|
|
1365
|
+
ListComponent.prototype.searchDelay;
|
|
1366
|
+
/** @type {?} */
|
|
1367
|
+
ListComponent.prototype.searchSubmit;
|
|
1368
|
+
/** @type {?} */
|
|
1310
1369
|
ListComponent.prototype.inputChange;
|
|
1311
1370
|
/** @type {?} */
|
|
1312
1371
|
ListComponent.prototype.onSelect;
|
|
@@ -1324,6 +1383,141 @@ if (false) {
|
|
|
1324
1383
|
ListComponent.prototype.ngClass;
|
|
1325
1384
|
}
|
|
1326
1385
|
|
|
1386
|
+
/**
|
|
1387
|
+
* @fileoverview added by tsickle
|
|
1388
|
+
* Generated from: lib/components/list-checkable/list-checkable.component.ts
|
|
1389
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1390
|
+
*/
|
|
1391
|
+
class ListCheckableComponent extends OdeComponent {
|
|
1392
|
+
/**
|
|
1393
|
+
* @param {?} injector
|
|
1394
|
+
*/
|
|
1395
|
+
constructor(injector) {
|
|
1396
|
+
super(injector);
|
|
1397
|
+
this.model = [];
|
|
1398
|
+
this.noResultsLabel = 'list.results.no.items';
|
|
1399
|
+
this.readOnly = false;
|
|
1400
|
+
this.onCheck = new EventEmitter();
|
|
1401
|
+
this.listChange = new EventEmitter();
|
|
1402
|
+
this.scrolledDown = new EventEmitter();
|
|
1403
|
+
this.areAllChecked = (/**
|
|
1404
|
+
* @return {?}
|
|
1405
|
+
*/
|
|
1406
|
+
() => false);
|
|
1407
|
+
this.isChecked = (/**
|
|
1408
|
+
* @param {?=} arg
|
|
1409
|
+
* @return {?}
|
|
1410
|
+
*/
|
|
1411
|
+
(arg) => false);
|
|
1412
|
+
this.isDisabled = (/**
|
|
1413
|
+
* @param {?=} arg
|
|
1414
|
+
* @return {?}
|
|
1415
|
+
*/
|
|
1416
|
+
(arg) => false);
|
|
1417
|
+
this.ngClass = (/**
|
|
1418
|
+
* @param {?=} arg
|
|
1419
|
+
* @return {?}
|
|
1420
|
+
*/
|
|
1421
|
+
(arg) => ({}));
|
|
1422
|
+
/* Store pipe */
|
|
1423
|
+
this.self = this;
|
|
1424
|
+
this._storedElements = [];
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* @param {?} list
|
|
1428
|
+
* @return {?}
|
|
1429
|
+
*/
|
|
1430
|
+
set storedElements(list) {
|
|
1431
|
+
this._storedElements = list;
|
|
1432
|
+
this.listChange.emit(list);
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* @return {?}
|
|
1436
|
+
*/
|
|
1437
|
+
get storedElements() {
|
|
1438
|
+
return this._storedElements;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* @param {?} checkAll
|
|
1442
|
+
* @return {?}
|
|
1443
|
+
*/
|
|
1444
|
+
toggleAll(checkAll) {
|
|
1445
|
+
this.model.forEach((/**
|
|
1446
|
+
* @param {?} item
|
|
1447
|
+
* @return {?}
|
|
1448
|
+
*/
|
|
1449
|
+
item => {
|
|
1450
|
+
/** @type {?} */
|
|
1451
|
+
const isChecked = this.isChecked(item);
|
|
1452
|
+
if (!this.isDisabled(item)
|
|
1453
|
+
&& ((isChecked && !checkAll) || (!isChecked && checkAll))) {
|
|
1454
|
+
this.onCheck.emit({ item: item, checked: checkAll });
|
|
1455
|
+
}
|
|
1456
|
+
}));
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
ListCheckableComponent.decorators = [
|
|
1460
|
+
{ type: Component, args: [{
|
|
1461
|
+
selector: 'ode-list-checkable',
|
|
1462
|
+
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",
|
|
1463
|
+
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}"]
|
|
1464
|
+
}] }
|
|
1465
|
+
];
|
|
1466
|
+
/** @nocollapse */
|
|
1467
|
+
ListCheckableComponent.ctorParameters = () => [
|
|
1468
|
+
{ type: Injector }
|
|
1469
|
+
];
|
|
1470
|
+
ListCheckableComponent.propDecorators = {
|
|
1471
|
+
model: [{ type: Input }],
|
|
1472
|
+
filters: [{ type: Input }],
|
|
1473
|
+
sort: [{ type: Input }],
|
|
1474
|
+
limit: [{ type: Input }],
|
|
1475
|
+
noResultsLabel: [{ type: Input }],
|
|
1476
|
+
readOnly: [{ type: Input }],
|
|
1477
|
+
onCheck: [{ type: Output }],
|
|
1478
|
+
listChange: [{ type: Output }],
|
|
1479
|
+
scrolledDown: [{ type: Output }],
|
|
1480
|
+
templateRef: [{ type: ContentChild, args: [TemplateRef, { static: false },] }],
|
|
1481
|
+
areAllChecked: [{ type: Input }],
|
|
1482
|
+
isChecked: [{ type: Input }],
|
|
1483
|
+
isDisabled: [{ type: Input }],
|
|
1484
|
+
ngClass: [{ type: Input }]
|
|
1485
|
+
};
|
|
1486
|
+
if (false) {
|
|
1487
|
+
/** @type {?} */
|
|
1488
|
+
ListCheckableComponent.prototype.model;
|
|
1489
|
+
/** @type {?} */
|
|
1490
|
+
ListCheckableComponent.prototype.filters;
|
|
1491
|
+
/** @type {?} */
|
|
1492
|
+
ListCheckableComponent.prototype.sort;
|
|
1493
|
+
/** @type {?} */
|
|
1494
|
+
ListCheckableComponent.prototype.limit;
|
|
1495
|
+
/** @type {?} */
|
|
1496
|
+
ListCheckableComponent.prototype.noResultsLabel;
|
|
1497
|
+
/** @type {?} */
|
|
1498
|
+
ListCheckableComponent.prototype.readOnly;
|
|
1499
|
+
/** @type {?} */
|
|
1500
|
+
ListCheckableComponent.prototype.onCheck;
|
|
1501
|
+
/** @type {?} */
|
|
1502
|
+
ListCheckableComponent.prototype.listChange;
|
|
1503
|
+
/** @type {?} */
|
|
1504
|
+
ListCheckableComponent.prototype.scrolledDown;
|
|
1505
|
+
/** @type {?} */
|
|
1506
|
+
ListCheckableComponent.prototype.templateRef;
|
|
1507
|
+
/** @type {?} */
|
|
1508
|
+
ListCheckableComponent.prototype.areAllChecked;
|
|
1509
|
+
/** @type {?} */
|
|
1510
|
+
ListCheckableComponent.prototype.isChecked;
|
|
1511
|
+
/** @type {?} */
|
|
1512
|
+
ListCheckableComponent.prototype.isDisabled;
|
|
1513
|
+
/** @type {?} */
|
|
1514
|
+
ListCheckableComponent.prototype.ngClass;
|
|
1515
|
+
/** @type {?} */
|
|
1516
|
+
ListCheckableComponent.prototype.self;
|
|
1517
|
+
/** @type {?} */
|
|
1518
|
+
ListCheckableComponent.prototype._storedElements;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1327
1521
|
/**
|
|
1328
1522
|
* @fileoverview added by tsickle
|
|
1329
1523
|
* Generated from: lib/components/message-box/message-box.component.ts
|
|
@@ -2017,7 +2211,7 @@ class MultiComboComponent extends OdeComponent {
|
|
|
2017
2211
|
MultiComboComponent.decorators = [
|
|
2018
2212
|
{ type: Component, args: [{
|
|
2019
2213
|
selector: 'ode-multi-combo',
|
|
2020
|
-
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",
|
|
2214
|
+
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",
|
|
2021
2215
|
host: {
|
|
2022
2216
|
'(document:click)': 'onClick($event)',
|
|
2023
2217
|
},
|
|
@@ -2461,12 +2655,15 @@ class SearchInputComponent extends OdeComponent {
|
|
|
2461
2655
|
super(injector);
|
|
2462
2656
|
this._elRef = _elRef;
|
|
2463
2657
|
this._renderer = _renderer;
|
|
2658
|
+
/* Inputs / Outputs / View */
|
|
2659
|
+
this.isSearchActive = false;
|
|
2660
|
+
this.isSearchButtonDisabled = false;
|
|
2661
|
+
this.searchInput = false;
|
|
2464
2662
|
this._delay = 200;
|
|
2465
2663
|
this.onChange = new EventEmitter();
|
|
2466
2664
|
/* Internal logic */
|
|
2467
2665
|
this.$searchTerms = new Subject();
|
|
2468
2666
|
}
|
|
2469
|
-
/* Inputs / Outputs / View */
|
|
2470
2667
|
/**
|
|
2471
2668
|
* @param {?} d
|
|
2472
2669
|
* @return {?}
|
|
@@ -2541,11 +2738,19 @@ class SearchInputComponent extends OdeComponent {
|
|
|
2541
2738
|
search(str) {
|
|
2542
2739
|
this.$searchTerms.next(str);
|
|
2543
2740
|
}
|
|
2741
|
+
/**
|
|
2742
|
+
* @return {?}
|
|
2743
|
+
*/
|
|
2744
|
+
handleSubmit() {
|
|
2745
|
+
this.searchSubmit();
|
|
2746
|
+
this.searchBox.nativeElement.value = '';
|
|
2747
|
+
}
|
|
2544
2748
|
}
|
|
2545
2749
|
SearchInputComponent.decorators = [
|
|
2546
2750
|
{ type: Component, args: [{
|
|
2547
2751
|
selector: 'ode-search-input',
|
|
2548
|
-
template: "<input type=\"search\" #searchBox (input)=\"search(searchBox.value)\"
|
|
2752
|
+
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)\"/> -->",
|
|
2753
|
+
styles: [":host .search-container{margin:0;display:flex}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}"]
|
|
2549
2754
|
}] }
|
|
2550
2755
|
];
|
|
2551
2756
|
/** @nocollapse */
|
|
@@ -2555,11 +2760,23 @@ SearchInputComponent.ctorParameters = () => [
|
|
|
2555
2760
|
{ type: Renderer2 }
|
|
2556
2761
|
];
|
|
2557
2762
|
SearchInputComponent.propDecorators = {
|
|
2763
|
+
isSearchActive: [{ type: Input }],
|
|
2764
|
+
isSearchButtonDisabled: [{ type: Input }],
|
|
2765
|
+
searchInput: [{ type: Input }],
|
|
2766
|
+
searchSubmit: [{ type: Input }],
|
|
2558
2767
|
delay: [{ type: Input }],
|
|
2559
2768
|
onChange: [{ type: Output }],
|
|
2560
2769
|
searchBox: [{ type: ViewChild, args: ['searchBox', { static: false },] }]
|
|
2561
2770
|
};
|
|
2562
2771
|
if (false) {
|
|
2772
|
+
/** @type {?} */
|
|
2773
|
+
SearchInputComponent.prototype.isSearchActive;
|
|
2774
|
+
/** @type {?} */
|
|
2775
|
+
SearchInputComponent.prototype.isSearchButtonDisabled;
|
|
2776
|
+
/** @type {?} */
|
|
2777
|
+
SearchInputComponent.prototype.searchInput;
|
|
2778
|
+
/** @type {?} */
|
|
2779
|
+
SearchInputComponent.prototype.searchSubmit;
|
|
2563
2780
|
/**
|
|
2564
2781
|
* @type {?}
|
|
2565
2782
|
* @private
|
|
@@ -4500,6 +4717,162 @@ function clickOn(el) {
|
|
|
4500
4717
|
return el.triggerEventHandler('click', null);
|
|
4501
4718
|
}
|
|
4502
4719
|
|
|
4720
|
+
/**
|
|
4721
|
+
* @fileoverview added by tsickle
|
|
4722
|
+
* Generated from: lib/components/dropdown/dropdown.component.ts
|
|
4723
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4724
|
+
*/
|
|
4725
|
+
/**
|
|
4726
|
+
* DropdownComponent is an alternative to the MonoSelectComponent.
|
|
4727
|
+
* Accept everything inside <ng-content> but should work with <ode-list> component
|
|
4728
|
+
*
|
|
4729
|
+
* Simple Dropdown Component without search:
|
|
4730
|
+
* [isSearchActive] can be set to false to disable search input in <ode-list>
|
|
4731
|
+
* ```
|
|
4732
|
+
* <ode-dropdown
|
|
4733
|
+
* [name]="option_name"
|
|
4734
|
+
* [isDropdownOpened]="a_boolean"
|
|
4735
|
+
* (onDropdown)="toggle_func"
|
|
4736
|
+
* >
|
|
4737
|
+
* <ode-list
|
|
4738
|
+
* [model]="model"
|
|
4739
|
+
* [filters]="filters"
|
|
4740
|
+
* (onSelect)="func_to_select_elem($event)"
|
|
4741
|
+
* (inputChange)="a_string_for_input_value = $event"
|
|
4742
|
+
* noResultsLabel="text_to_display"
|
|
4743
|
+
* searchPlaceholder="default_placeholder_text"
|
|
4744
|
+
* >
|
|
4745
|
+
* <ng-template let-item>
|
|
4746
|
+
* <div>{{ item.name }}</div>
|
|
4747
|
+
* </ng-template>
|
|
4748
|
+
* </ode-list>
|
|
4749
|
+
* </ode-dropdown>
|
|
4750
|
+
* `̀``
|
|
4751
|
+
*/
|
|
4752
|
+
class DropdownComponent extends OdeComponent {
|
|
4753
|
+
/**
|
|
4754
|
+
* @param {?} injector
|
|
4755
|
+
*/
|
|
4756
|
+
constructor(injector) {
|
|
4757
|
+
super(injector);
|
|
4758
|
+
this.name = '';
|
|
4759
|
+
this.isDropdownOpened = false;
|
|
4760
|
+
this.onDropdown = new EventEmitter();
|
|
4761
|
+
}
|
|
4762
|
+
/**
|
|
4763
|
+
* @return {?}
|
|
4764
|
+
*/
|
|
4765
|
+
ngOnInit() {
|
|
4766
|
+
super.ngOnInit();
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
DropdownComponent.decorators = [
|
|
4770
|
+
{ type: Component, args: [{
|
|
4771
|
+
selector: 'ode-dropdown',
|
|
4772
|
+
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",
|
|
4773
|
+
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)}"]
|
|
4774
|
+
}] }
|
|
4775
|
+
];
|
|
4776
|
+
/** @nocollapse */
|
|
4777
|
+
DropdownComponent.ctorParameters = () => [
|
|
4778
|
+
{ type: Injector }
|
|
4779
|
+
];
|
|
4780
|
+
DropdownComponent.propDecorators = {
|
|
4781
|
+
name: [{ type: Input }],
|
|
4782
|
+
isDropdownOpened: [{ type: Input }],
|
|
4783
|
+
onDropdown: [{ type: Output }]
|
|
4784
|
+
};
|
|
4785
|
+
if (false) {
|
|
4786
|
+
/** @type {?} */
|
|
4787
|
+
DropdownComponent.prototype.name;
|
|
4788
|
+
/** @type {?} */
|
|
4789
|
+
DropdownComponent.prototype.isDropdownOpened;
|
|
4790
|
+
/** @type {?} */
|
|
4791
|
+
DropdownComponent.prototype.onDropdown;
|
|
4792
|
+
}
|
|
4793
|
+
|
|
4794
|
+
/**
|
|
4795
|
+
* @fileoverview added by tsickle
|
|
4796
|
+
* Generated from: lib/components/search-toolbar/search-toolbar.component.ts
|
|
4797
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4798
|
+
*/
|
|
4799
|
+
/**
|
|
4800
|
+
* Search Toolbar component.
|
|
4801
|
+
* Used within List component, Search Toolbar will display following information:
|
|
4802
|
+
* - Label of the search filter section (example: 'Search by')
|
|
4803
|
+
* - List of search type filters (example: 'Name', 'Email' , ...)
|
|
4804
|
+
* - Number of items returned by the search
|
|
4805
|
+
*
|
|
4806
|
+
* ```
|
|
4807
|
+
* <ode-search-toolbar
|
|
4808
|
+
* [label]="'user.searchType.label'"
|
|
4809
|
+
* [searchTypes]="searchTypes"
|
|
4810
|
+
* [nbItem]="nbUser || 0"
|
|
4811
|
+
* [nbItemLabel]="'list.results.users'"
|
|
4812
|
+
* (selectSearchType)="handleSelectSearchType($event)"
|
|
4813
|
+
* >
|
|
4814
|
+
* </ode-search-toolbar>
|
|
4815
|
+
* ```
|
|
4816
|
+
*/
|
|
4817
|
+
class SearchToolbarComponent extends OdeComponent {
|
|
4818
|
+
/**
|
|
4819
|
+
* @param {?} injector
|
|
4820
|
+
*/
|
|
4821
|
+
constructor(injector) {
|
|
4822
|
+
super(injector);
|
|
4823
|
+
this.nbItem = 0;
|
|
4824
|
+
this.selectSearchType = new EventEmitter();
|
|
4825
|
+
}
|
|
4826
|
+
/**
|
|
4827
|
+
* @return {?}
|
|
4828
|
+
*/
|
|
4829
|
+
ngOnInit() {
|
|
4830
|
+
if (this.searchTypes && this.searchTypes.length > 0) {
|
|
4831
|
+
this.selectedSearchTypeValue = this.searchTypes[0].value;
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
/**
|
|
4835
|
+
* @param {?} searchTypeValue
|
|
4836
|
+
* @return {?}
|
|
4837
|
+
*/
|
|
4838
|
+
handleSearchTypeClick(searchTypeValue) {
|
|
4839
|
+
this.selectedSearchTypeValue = searchTypeValue;
|
|
4840
|
+
this.selectSearchType.emit(searchTypeValue);
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
SearchToolbarComponent.decorators = [
|
|
4844
|
+
{ type: Component, args: [{
|
|
4845
|
+
selector: 'ode-search-toolbar',
|
|
4846
|
+
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",
|
|
4847
|
+
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}"]
|
|
4848
|
+
}] }
|
|
4849
|
+
];
|
|
4850
|
+
/** @nocollapse */
|
|
4851
|
+
SearchToolbarComponent.ctorParameters = () => [
|
|
4852
|
+
{ type: Injector }
|
|
4853
|
+
];
|
|
4854
|
+
SearchToolbarComponent.propDecorators = {
|
|
4855
|
+
label: [{ type: Input }],
|
|
4856
|
+
searchTypes: [{ type: Input }],
|
|
4857
|
+
nbItem: [{ type: Input }],
|
|
4858
|
+
nbItemLabel: [{ type: Input }],
|
|
4859
|
+
selectSearchType: [{ type: Output }]
|
|
4860
|
+
};
|
|
4861
|
+
if (false) {
|
|
4862
|
+
/** @type {?} */
|
|
4863
|
+
SearchToolbarComponent.prototype.label;
|
|
4864
|
+
/** @type {?} */
|
|
4865
|
+
SearchToolbarComponent.prototype.searchTypes;
|
|
4866
|
+
/** @type {?} */
|
|
4867
|
+
SearchToolbarComponent.prototype.nbItem;
|
|
4868
|
+
/** @type {?} */
|
|
4869
|
+
SearchToolbarComponent.prototype.nbItemLabel;
|
|
4870
|
+
/** @type {?} */
|
|
4871
|
+
SearchToolbarComponent.prototype.selectSearchType;
|
|
4872
|
+
/** @type {?} */
|
|
4873
|
+
SearchToolbarComponent.prototype.selectedSearchTypeValue;
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4503
4876
|
/**
|
|
4504
4877
|
* @fileoverview added by tsickle
|
|
4505
4878
|
* Generated from: lib/ngx-ode-ui.module.ts
|
|
@@ -4540,6 +4913,7 @@ NgxOdeUiModule.decorators = [
|
|
|
4540
4913
|
LightBoxComponent,
|
|
4541
4914
|
LightboxConfirmComponent,
|
|
4542
4915
|
ListComponent,
|
|
4916
|
+
ListCheckableComponent,
|
|
4543
4917
|
MonoSelectComponent,
|
|
4544
4918
|
MultiSelectComponent,
|
|
4545
4919
|
MultiComboComponent,
|
|
@@ -4574,7 +4948,9 @@ NgxOdeUiModule.decorators = [
|
|
|
4574
4948
|
LocalizedDatePipe,
|
|
4575
4949
|
BytesPipe,
|
|
4576
4950
|
KeysPipe,
|
|
4577
|
-
LengthPipe
|
|
4951
|
+
LengthPipe,
|
|
4952
|
+
DropdownComponent,
|
|
4953
|
+
SearchToolbarComponent
|
|
4578
4954
|
],
|
|
4579
4955
|
imports: [
|
|
4580
4956
|
CommonModule,
|
|
@@ -4591,6 +4967,7 @@ NgxOdeUiModule.decorators = [
|
|
|
4591
4967
|
LightBoxComponent,
|
|
4592
4968
|
LightboxConfirmComponent,
|
|
4593
4969
|
ListComponent,
|
|
4970
|
+
ListCheckableComponent,
|
|
4594
4971
|
MonoSelectComponent,
|
|
4595
4972
|
MultiSelectComponent,
|
|
4596
4973
|
MultiComboComponent,
|
|
@@ -4610,6 +4987,8 @@ NgxOdeUiModule.decorators = [
|
|
|
4610
4987
|
SpinnerCubeComponent,
|
|
4611
4988
|
PagerComponent,
|
|
4612
4989
|
EllipsisComponent,
|
|
4990
|
+
DropdownComponent,
|
|
4991
|
+
SearchToolbarComponent,
|
|
4613
4992
|
// directives
|
|
4614
4993
|
AnchorDirective,
|
|
4615
4994
|
DynamicTemplateDirective,
|
|
@@ -4644,5 +5023,5 @@ NgxOdeUiModule.decorators = [
|
|
|
4644
5023
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4645
5024
|
*/
|
|
4646
5025
|
|
|
4647
|
-
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, 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 };
|
|
5026
|
+
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 };
|
|
4648
5027
|
//# sourceMappingURL=ngx-ode-ui.js.map
|