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.
@@ -1224,6 +1224,7 @@ class ListComponent extends OdeComponent {
1224
1224
  this.model = [];
1225
1225
  this.searchPlaceholder = 'search';
1226
1226
  this.noResultsLabel = 'list.results.no.items';
1227
+ this.searchInput = false;
1227
1228
  this.inputChange = new EventEmitter();
1228
1229
  this.onSelect = new EventEmitter();
1229
1230
  this.listChange = new EventEmitter();
@@ -1262,7 +1263,7 @@ class ListComponent extends OdeComponent {
1262
1263
  ListComponent.decorators = [
1263
1264
  { type: Component, args: [{
1264
1265
  selector: 'ode-list',
1265
- 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",
1266
+ 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",
1266
1267
  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}"]
1267
1268
  }] }
1268
1269
  ];
@@ -1278,6 +1279,8 @@ ListComponent.propDecorators = {
1278
1279
  limit: [{ type: Input }],
1279
1280
  searchPlaceholder: [{ type: Input }],
1280
1281
  noResultsLabel: [{ type: Input }],
1282
+ searchInput: [{ type: Input }],
1283
+ searchSubmit: [{ type: Input }],
1281
1284
  inputChange: [{ type: Output }],
1282
1285
  onSelect: [{ type: Output }],
1283
1286
  listChange: [{ type: Output }],
@@ -1307,6 +1310,10 @@ if (false) {
1307
1310
  /** @type {?} */
1308
1311
  ListComponent.prototype.noResultsLabel;
1309
1312
  /** @type {?} */
1313
+ ListComponent.prototype.searchInput;
1314
+ /** @type {?} */
1315
+ ListComponent.prototype.searchSubmit;
1316
+ /** @type {?} */
1310
1317
  ListComponent.prototype.inputChange;
1311
1318
  /** @type {?} */
1312
1319
  ListComponent.prototype.onSelect;
@@ -1324,6 +1331,141 @@ if (false) {
1324
1331
  ListComponent.prototype.ngClass;
1325
1332
  }
1326
1333
 
1334
+ /**
1335
+ * @fileoverview added by tsickle
1336
+ * Generated from: lib/components/list-checkable/list-checkable.component.ts
1337
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1338
+ */
1339
+ class ListCheckableComponent extends OdeComponent {
1340
+ /**
1341
+ * @param {?} injector
1342
+ */
1343
+ constructor(injector) {
1344
+ super(injector);
1345
+ this.model = [];
1346
+ this.noResultsLabel = 'list.results.no.items';
1347
+ this.readOnly = false;
1348
+ this.onCheck = new EventEmitter();
1349
+ this.listChange = new EventEmitter();
1350
+ this.scrolledDown = new EventEmitter();
1351
+ this.areAllChecked = (/**
1352
+ * @return {?}
1353
+ */
1354
+ () => false);
1355
+ this.isChecked = (/**
1356
+ * @param {?=} arg
1357
+ * @return {?}
1358
+ */
1359
+ (arg) => false);
1360
+ this.isDisabled = (/**
1361
+ * @param {?=} arg
1362
+ * @return {?}
1363
+ */
1364
+ (arg) => false);
1365
+ this.ngClass = (/**
1366
+ * @param {?=} arg
1367
+ * @return {?}
1368
+ */
1369
+ (arg) => ({}));
1370
+ /* Store pipe */
1371
+ this.self = this;
1372
+ this._storedElements = [];
1373
+ }
1374
+ /**
1375
+ * @param {?} list
1376
+ * @return {?}
1377
+ */
1378
+ set storedElements(list) {
1379
+ this._storedElements = list;
1380
+ this.listChange.emit(list);
1381
+ }
1382
+ /**
1383
+ * @return {?}
1384
+ */
1385
+ get storedElements() {
1386
+ return this._storedElements;
1387
+ }
1388
+ /**
1389
+ * @param {?} checkAll
1390
+ * @return {?}
1391
+ */
1392
+ toggleAll(checkAll) {
1393
+ this.model.forEach((/**
1394
+ * @param {?} item
1395
+ * @return {?}
1396
+ */
1397
+ item => {
1398
+ /** @type {?} */
1399
+ const isChecked = this.isChecked(item);
1400
+ if (!this.isDisabled(item)
1401
+ && ((isChecked && !checkAll) || (!isChecked && checkAll))) {
1402
+ this.onCheck.emit({ item: item, checked: checkAll });
1403
+ }
1404
+ }));
1405
+ }
1406
+ }
1407
+ ListCheckableComponent.decorators = [
1408
+ { type: Component, args: [{
1409
+ selector: 'ode-list-checkable',
1410
+ 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",
1411
+ 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}"]
1412
+ }] }
1413
+ ];
1414
+ /** @nocollapse */
1415
+ ListCheckableComponent.ctorParameters = () => [
1416
+ { type: Injector }
1417
+ ];
1418
+ ListCheckableComponent.propDecorators = {
1419
+ model: [{ type: Input }],
1420
+ filters: [{ type: Input }],
1421
+ sort: [{ type: Input }],
1422
+ limit: [{ type: Input }],
1423
+ noResultsLabel: [{ type: Input }],
1424
+ readOnly: [{ type: Input }],
1425
+ onCheck: [{ type: Output }],
1426
+ listChange: [{ type: Output }],
1427
+ scrolledDown: [{ type: Output }],
1428
+ templateRef: [{ type: ContentChild, args: [TemplateRef, { static: false },] }],
1429
+ areAllChecked: [{ type: Input }],
1430
+ isChecked: [{ type: Input }],
1431
+ isDisabled: [{ type: Input }],
1432
+ ngClass: [{ type: Input }]
1433
+ };
1434
+ if (false) {
1435
+ /** @type {?} */
1436
+ ListCheckableComponent.prototype.model;
1437
+ /** @type {?} */
1438
+ ListCheckableComponent.prototype.filters;
1439
+ /** @type {?} */
1440
+ ListCheckableComponent.prototype.sort;
1441
+ /** @type {?} */
1442
+ ListCheckableComponent.prototype.limit;
1443
+ /** @type {?} */
1444
+ ListCheckableComponent.prototype.noResultsLabel;
1445
+ /** @type {?} */
1446
+ ListCheckableComponent.prototype.readOnly;
1447
+ /** @type {?} */
1448
+ ListCheckableComponent.prototype.onCheck;
1449
+ /** @type {?} */
1450
+ ListCheckableComponent.prototype.listChange;
1451
+ /** @type {?} */
1452
+ ListCheckableComponent.prototype.scrolledDown;
1453
+ /** @type {?} */
1454
+ ListCheckableComponent.prototype.templateRef;
1455
+ /** @type {?} */
1456
+ ListCheckableComponent.prototype.areAllChecked;
1457
+ /** @type {?} */
1458
+ ListCheckableComponent.prototype.isChecked;
1459
+ /** @type {?} */
1460
+ ListCheckableComponent.prototype.isDisabled;
1461
+ /** @type {?} */
1462
+ ListCheckableComponent.prototype.ngClass;
1463
+ /** @type {?} */
1464
+ ListCheckableComponent.prototype.self;
1465
+ /** @type {?} */
1466
+ ListCheckableComponent.prototype._storedElements;
1467
+ }
1468
+
1327
1469
  /**
1328
1470
  * @fileoverview added by tsickle
1329
1471
  * Generated from: lib/components/message-box/message-box.component.ts
@@ -2017,7 +2159,7 @@ class MultiComboComponent extends OdeComponent {
2017
2159
  MultiComboComponent.decorators = [
2018
2160
  { type: Component, args: [{
2019
2161
  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",
2162
+ 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
2163
  host: {
2022
2164
  '(document:click)': 'onClick($event)',
2023
2165
  },
@@ -2461,12 +2603,13 @@ class SearchInputComponent extends OdeComponent {
2461
2603
  super(injector);
2462
2604
  this._elRef = _elRef;
2463
2605
  this._renderer = _renderer;
2606
+ /* Inputs / Outputs / View */
2607
+ this.searchInput = false;
2464
2608
  this._delay = 200;
2465
2609
  this.onChange = new EventEmitter();
2466
2610
  /* Internal logic */
2467
2611
  this.$searchTerms = new Subject();
2468
2612
  }
2469
- /* Inputs / Outputs / View */
2470
2613
  /**
2471
2614
  * @param {?} d
2472
2615
  * @return {?}
@@ -2545,7 +2688,8 @@ class SearchInputComponent extends OdeComponent {
2545
2688
  SearchInputComponent.decorators = [
2546
2689
  { type: Component, args: [{
2547
2690
  selector: 'ode-search-input',
2548
- template: "<input type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/>\n"
2691
+ 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)\"/>",
2692
+ 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}"]
2549
2693
  }] }
2550
2694
  ];
2551
2695
  /** @nocollapse */
@@ -2555,11 +2699,17 @@ SearchInputComponent.ctorParameters = () => [
2555
2699
  { type: Renderer2 }
2556
2700
  ];
2557
2701
  SearchInputComponent.propDecorators = {
2702
+ searchInput: [{ type: Input }],
2703
+ searchSubmit: [{ type: Input }],
2558
2704
  delay: [{ type: Input }],
2559
2705
  onChange: [{ type: Output }],
2560
2706
  searchBox: [{ type: ViewChild, args: ['searchBox', { static: false },] }]
2561
2707
  };
2562
2708
  if (false) {
2709
+ /** @type {?} */
2710
+ SearchInputComponent.prototype.searchInput;
2711
+ /** @type {?} */
2712
+ SearchInputComponent.prototype.searchSubmit;
2563
2713
  /**
2564
2714
  * @type {?}
2565
2715
  * @private
@@ -4540,6 +4690,7 @@ NgxOdeUiModule.decorators = [
4540
4690
  LightBoxComponent,
4541
4691
  LightboxConfirmComponent,
4542
4692
  ListComponent,
4693
+ ListCheckableComponent,
4543
4694
  MonoSelectComponent,
4544
4695
  MultiSelectComponent,
4545
4696
  MultiComboComponent,
@@ -4591,6 +4742,7 @@ NgxOdeUiModule.decorators = [
4591
4742
  LightBoxComponent,
4592
4743
  LightboxConfirmComponent,
4593
4744
  ListComponent,
4745
+ ListCheckableComponent,
4594
4746
  MonoSelectComponent,
4595
4747
  MultiSelectComponent,
4596
4748
  MultiComboComponent,
@@ -4644,5 +4796,5 @@ NgxOdeUiModule.decorators = [
4644
4796
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4645
4797
  */
4646
4798
 
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 };
4799
+ 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 };
4648
4800
  //# sourceMappingURL=ngx-ode-ui.js.map