ngx-ode-ui 3.12.0-dev.2 → 3.12.0-dev.7

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.
@@ -1383,6 +1383,7 @@ var ListComponent = /** @class */ (function (_super) {
1383
1383
  _this.model = [];
1384
1384
  _this.searchPlaceholder = 'search';
1385
1385
  _this.noResultsLabel = 'list.results.no.items';
1386
+ _this.searchInput = false;
1386
1387
  _this.inputChange = new EventEmitter();
1387
1388
  _this.onSelect = new EventEmitter();
1388
1389
  _this.listChange = new EventEmitter();
@@ -1425,7 +1426,7 @@ var ListComponent = /** @class */ (function (_super) {
1425
1426
  ListComponent.decorators = [
1426
1427
  { type: Component, args: [{
1427
1428
  selector: 'ode-list',
1428
- template: "<ode-search-input [attr.placeholder]=\"searchPlaceholder | translate\" (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",
1429
+ 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",
1429
1430
  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
1431
  }] }
1431
1432
  ];
@@ -1441,6 +1442,8 @@ var ListComponent = /** @class */ (function (_super) {
1441
1442
  limit: [{ type: Input }],
1442
1443
  searchPlaceholder: [{ type: Input }],
1443
1444
  noResultsLabel: [{ type: Input }],
1445
+ searchInput: [{ type: Input }],
1446
+ searchSubmit: [{ type: Input }],
1444
1447
  inputChange: [{ type: Output }],
1445
1448
  onSelect: [{ type: Output }],
1446
1449
  listChange: [{ type: Output }],
@@ -1472,6 +1475,10 @@ if (false) {
1472
1475
  /** @type {?} */
1473
1476
  ListComponent.prototype.noResultsLabel;
1474
1477
  /** @type {?} */
1478
+ ListComponent.prototype.searchInput;
1479
+ /** @type {?} */
1480
+ ListComponent.prototype.searchSubmit;
1481
+ /** @type {?} */
1475
1482
  ListComponent.prototype.inputChange;
1476
1483
  /** @type {?} */
1477
1484
  ListComponent.prototype.onSelect;
@@ -1489,6 +1496,150 @@ if (false) {
1489
1496
  ListComponent.prototype.ngClass;
1490
1497
  }
1491
1498
 
1499
+ /**
1500
+ * @fileoverview added by tsickle
1501
+ * Generated from: lib/components/list-checkable/list-checkable.component.ts
1502
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1503
+ */
1504
+ var ListCheckableComponent = /** @class */ (function (_super) {
1505
+ __extends(ListCheckableComponent, _super);
1506
+ function ListCheckableComponent(injector) {
1507
+ var _this = _super.call(this, injector) || this;
1508
+ _this.model = [];
1509
+ _this.noResultsLabel = 'list.results.no.items';
1510
+ _this.readOnly = false;
1511
+ _this.onCheck = new EventEmitter();
1512
+ _this.listChange = new EventEmitter();
1513
+ _this.scrolledDown = new EventEmitter();
1514
+ _this.areAllChecked = (/**
1515
+ * @return {?}
1516
+ */
1517
+ function () { return false; });
1518
+ _this.isChecked = (/**
1519
+ * @param {?=} arg
1520
+ * @return {?}
1521
+ */
1522
+ function (arg) { return false; });
1523
+ _this.isDisabled = (/**
1524
+ * @param {?=} arg
1525
+ * @return {?}
1526
+ */
1527
+ function (arg) { return false; });
1528
+ _this.ngClass = (/**
1529
+ * @param {?=} arg
1530
+ * @return {?}
1531
+ */
1532
+ function (arg) { return ({}); });
1533
+ /* Store pipe */
1534
+ _this.self = _this;
1535
+ _this._storedElements = [];
1536
+ return _this;
1537
+ }
1538
+ Object.defineProperty(ListCheckableComponent.prototype, "storedElements", {
1539
+ get: /**
1540
+ * @return {?}
1541
+ */
1542
+ function () {
1543
+ return this._storedElements;
1544
+ },
1545
+ set: /**
1546
+ * @param {?} list
1547
+ * @return {?}
1548
+ */
1549
+ function (list) {
1550
+ this._storedElements = list;
1551
+ this.listChange.emit(list);
1552
+ },
1553
+ enumerable: true,
1554
+ configurable: true
1555
+ });
1556
+ /**
1557
+ * @param {?} checkAll
1558
+ * @return {?}
1559
+ */
1560
+ ListCheckableComponent.prototype.toggleAll = /**
1561
+ * @param {?} checkAll
1562
+ * @return {?}
1563
+ */
1564
+ function (checkAll) {
1565
+ var _this = this;
1566
+ this.model.forEach((/**
1567
+ * @param {?} item
1568
+ * @return {?}
1569
+ */
1570
+ function (item) {
1571
+ /** @type {?} */
1572
+ var isChecked = _this.isChecked(item);
1573
+ if (!_this.isDisabled(item)
1574
+ && ((isChecked && !checkAll) || (!isChecked && checkAll))) {
1575
+ _this.onCheck.emit({ item: item, checked: checkAll });
1576
+ }
1577
+ }));
1578
+ };
1579
+ ListCheckableComponent.decorators = [
1580
+ { type: Component, args: [{
1581
+ selector: 'ode-list-checkable',
1582
+ 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",
1583
+ 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}"]
1584
+ }] }
1585
+ ];
1586
+ /** @nocollapse */
1587
+ ListCheckableComponent.ctorParameters = function () { return [
1588
+ { type: Injector }
1589
+ ]; };
1590
+ ListCheckableComponent.propDecorators = {
1591
+ model: [{ type: Input }],
1592
+ filters: [{ type: Input }],
1593
+ sort: [{ type: Input }],
1594
+ limit: [{ type: Input }],
1595
+ noResultsLabel: [{ type: Input }],
1596
+ readOnly: [{ type: Input }],
1597
+ onCheck: [{ type: Output }],
1598
+ listChange: [{ type: Output }],
1599
+ scrolledDown: [{ type: Output }],
1600
+ templateRef: [{ type: ContentChild, args: [TemplateRef, { static: false },] }],
1601
+ areAllChecked: [{ type: Input }],
1602
+ isChecked: [{ type: Input }],
1603
+ isDisabled: [{ type: Input }],
1604
+ ngClass: [{ type: Input }]
1605
+ };
1606
+ return ListCheckableComponent;
1607
+ }(OdeComponent));
1608
+ if (false) {
1609
+ /** @type {?} */
1610
+ ListCheckableComponent.prototype.model;
1611
+ /** @type {?} */
1612
+ ListCheckableComponent.prototype.filters;
1613
+ /** @type {?} */
1614
+ ListCheckableComponent.prototype.sort;
1615
+ /** @type {?} */
1616
+ ListCheckableComponent.prototype.limit;
1617
+ /** @type {?} */
1618
+ ListCheckableComponent.prototype.noResultsLabel;
1619
+ /** @type {?} */
1620
+ ListCheckableComponent.prototype.readOnly;
1621
+ /** @type {?} */
1622
+ ListCheckableComponent.prototype.onCheck;
1623
+ /** @type {?} */
1624
+ ListCheckableComponent.prototype.listChange;
1625
+ /** @type {?} */
1626
+ ListCheckableComponent.prototype.scrolledDown;
1627
+ /** @type {?} */
1628
+ ListCheckableComponent.prototype.templateRef;
1629
+ /** @type {?} */
1630
+ ListCheckableComponent.prototype.areAllChecked;
1631
+ /** @type {?} */
1632
+ ListCheckableComponent.prototype.isChecked;
1633
+ /** @type {?} */
1634
+ ListCheckableComponent.prototype.isDisabled;
1635
+ /** @type {?} */
1636
+ ListCheckableComponent.prototype.ngClass;
1637
+ /** @type {?} */
1638
+ ListCheckableComponent.prototype.self;
1639
+ /** @type {?} */
1640
+ ListCheckableComponent.prototype._storedElements;
1641
+ }
1642
+
1492
1643
  /**
1493
1644
  * @fileoverview added by tsickle
1494
1645
  * Generated from: lib/components/message-box/message-box.component.ts
@@ -2300,7 +2451,7 @@ var MultiComboComponent = /** @class */ (function (_super) {
2300
2451
  MultiComboComponent.decorators = [
2301
2452
  { type: Component, args: [{
2302
2453
  selector: 'ode-multi-combo',
2303
- 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",
2454
+ 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",
2304
2455
  host: {
2305
2456
  '(document:click)': 'onClick($event)',
2306
2457
  },
@@ -2791,6 +2942,8 @@ var SearchInputComponent = /** @class */ (function (_super) {
2791
2942
  var _this = _super.call(this, injector) || this;
2792
2943
  _this._elRef = _elRef;
2793
2944
  _this._renderer = _renderer;
2945
+ /* Inputs / Outputs / View */
2946
+ _this.searchInput = false;
2794
2947
  _this._delay = 200;
2795
2948
  _this.onChange = new EventEmitter();
2796
2949
  /* Internal logic */
@@ -2804,9 +2957,7 @@ var SearchInputComponent = /** @class */ (function (_super) {
2804
2957
  function () {
2805
2958
  return this._delay;
2806
2959
  },
2807
- /* Inputs / Outputs / View */
2808
- set: /* Inputs / Outputs / View */
2809
- /**
2960
+ set: /**
2810
2961
  * @param {?} d
2811
2962
  * @return {?}
2812
2963
  */
@@ -2896,7 +3047,8 @@ var SearchInputComponent = /** @class */ (function (_super) {
2896
3047
  SearchInputComponent.decorators = [
2897
3048
  { type: Component, args: [{
2898
3049
  selector: 'ode-search-input',
2899
- template: "<input type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/>\n"
3050
+ template: "<form\n *ngIf=\"searchInput\"\n class=\"search-container\"\n (ngSubmit)=\"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\">\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)\"/>",
3051
+ styles: [":host .search-container{margin:0;display:flex}:host .search-input{border:1px solid rgba(0,0,0,.1)}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}"]
2900
3052
  }] }
2901
3053
  ];
2902
3054
  /** @nocollapse */
@@ -2906,6 +3058,8 @@ var SearchInputComponent = /** @class */ (function (_super) {
2906
3058
  { type: Renderer2 }
2907
3059
  ]; };
2908
3060
  SearchInputComponent.propDecorators = {
3061
+ searchInput: [{ type: Input }],
3062
+ searchSubmit: [{ type: Input }],
2909
3063
  delay: [{ type: Input }],
2910
3064
  onChange: [{ type: Output }],
2911
3065
  searchBox: [{ type: ViewChild, args: ['searchBox', { static: false },] }]
@@ -2913,6 +3067,10 @@ var SearchInputComponent = /** @class */ (function (_super) {
2913
3067
  return SearchInputComponent;
2914
3068
  }(OdeComponent));
2915
3069
  if (false) {
3070
+ /** @type {?} */
3071
+ SearchInputComponent.prototype.searchInput;
3072
+ /** @type {?} */
3073
+ SearchInputComponent.prototype.searchSubmit;
2916
3074
  /**
2917
3075
  * @type {?}
2918
3076
  * @private
@@ -5045,6 +5203,7 @@ var NgxOdeUiModule = /** @class */ (function () {
5045
5203
  LightBoxComponent,
5046
5204
  LightboxConfirmComponent,
5047
5205
  ListComponent,
5206
+ ListCheckableComponent,
5048
5207
  MonoSelectComponent,
5049
5208
  MultiSelectComponent,
5050
5209
  MultiComboComponent,
@@ -5096,6 +5255,7 @@ var NgxOdeUiModule = /** @class */ (function () {
5096
5255
  LightBoxComponent,
5097
5256
  LightboxConfirmComponent,
5098
5257
  ListComponent,
5258
+ ListCheckableComponent,
5099
5259
  MonoSelectComponent,
5100
5260
  MultiSelectComponent,
5101
5261
  MultiComboComponent,
@@ -5151,5 +5311,5 @@ var NgxOdeUiModule = /** @class */ (function () {
5151
5311
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5152
5312
  */
5153
5313
 
5154
- 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 };
5314
+ 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 };
5155
5315
  //# sourceMappingURL=ngx-ode-ui.js.map