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.
@@ -1221,9 +1221,9 @@ class ListComponent extends OdeComponent {
1221
1221
  /* Store pipe */
1222
1222
  this.self = this;
1223
1223
  this._storedElements = [];
1224
- this.model = [];
1225
1224
  this.searchPlaceholder = 'search';
1226
1225
  this.noResultsLabel = 'list.results.no.items';
1226
+ this.placeholder = 'list.placeholder';
1227
1227
  this.isSearchActive = true;
1228
1228
  this.searchInput = false;
1229
1229
  this.inputChange = new EventEmitter();
@@ -1264,8 +1264,8 @@ class ListComponent extends OdeComponent {
1264
1264
  ListComponent.decorators = [
1265
1265
  { type: Component, args: [{
1266
1266
  selector: 'ode-list',
1267
- 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",
1268
- 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
+ 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",
1268
+ 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}"]
1269
1269
  }] }
1270
1270
  ];
1271
1271
  /** @nocollapse */
@@ -1280,6 +1280,7 @@ ListComponent.propDecorators = {
1280
1280
  limit: [{ type: Input }],
1281
1281
  searchPlaceholder: [{ type: Input }],
1282
1282
  noResultsLabel: [{ type: Input }],
1283
+ placeholder: [{ type: Input }],
1283
1284
  isSearchActive: [{ type: Input }],
1284
1285
  searchInput: [{ type: Input }],
1285
1286
  searchSubmit: [{ type: Input }],
@@ -1312,6 +1313,8 @@ if (false) {
1312
1313
  /** @type {?} */
1313
1314
  ListComponent.prototype.noResultsLabel;
1314
1315
  /** @type {?} */
1316
+ ListComponent.prototype.placeholder;
1317
+ /** @type {?} */
1315
1318
  ListComponent.prototype.isSearchActive;
1316
1319
  /** @type {?} */
1317
1320
  ListComponent.prototype.searchInput;
@@ -4732,6 +4735,88 @@ if (false) {
4732
4735
  DropdownComponent.prototype.onDropdown;
4733
4736
  }
4734
4737
 
4738
+ /**
4739
+ * @fileoverview added by tsickle
4740
+ * Generated from: lib/components/search-toolbar/search-toolbar.component.ts
4741
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4742
+ */
4743
+ /**
4744
+ * Search Toolbar component.
4745
+ * Used within List component, Search Toolbar will display following information:
4746
+ * - Label of the search filter section (example: 'Search by')
4747
+ * - List of search type filters (example: 'Name', 'Email' , ...)
4748
+ * - Number of items returned by the search
4749
+ *
4750
+ * ```
4751
+ * <ode-search-toolbar
4752
+ * [label]="'user.searchType.label'"
4753
+ * [searchTypes]="searchTypes"
4754
+ * [nbItem]="nbUser || 0"
4755
+ * [nbItemLabel]="'list.results.users'"
4756
+ * (selectSearchType)="handleSelectSearchType($event)"
4757
+ * >
4758
+ * </ode-search-toolbar>
4759
+ * ```
4760
+ */
4761
+ class SearchToolbarComponent extends OdeComponent {
4762
+ /**
4763
+ * @param {?} injector
4764
+ */
4765
+ constructor(injector) {
4766
+ super(injector);
4767
+ this.nbItem = 0;
4768
+ this.selectSearchType = new EventEmitter();
4769
+ }
4770
+ /**
4771
+ * @return {?}
4772
+ */
4773
+ ngOnInit() {
4774
+ if (this.searchTypes && this.searchTypes.length > 0) {
4775
+ this.selectedSearchTypeValue = this.searchTypes[0].value;
4776
+ }
4777
+ }
4778
+ /**
4779
+ * @param {?} searchTypeValue
4780
+ * @return {?}
4781
+ */
4782
+ handleSearchTypeClick(searchTypeValue) {
4783
+ this.selectedSearchTypeValue = searchTypeValue;
4784
+ this.selectSearchType.emit(searchTypeValue);
4785
+ }
4786
+ }
4787
+ SearchToolbarComponent.decorators = [
4788
+ { type: Component, args: [{
4789
+ selector: 'ode-search-toolbar',
4790
+ 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",
4791
+ styles: [".search-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px}.search-toolbar .search-toolbar-label{font-size:.9em}"]
4792
+ }] }
4793
+ ];
4794
+ /** @nocollapse */
4795
+ SearchToolbarComponent.ctorParameters = () => [
4796
+ { type: Injector }
4797
+ ];
4798
+ SearchToolbarComponent.propDecorators = {
4799
+ label: [{ type: Input }],
4800
+ searchTypes: [{ type: Input }],
4801
+ nbItem: [{ type: Input }],
4802
+ nbItemLabel: [{ type: Input }],
4803
+ selectSearchType: [{ type: Output }]
4804
+ };
4805
+ if (false) {
4806
+ /** @type {?} */
4807
+ SearchToolbarComponent.prototype.label;
4808
+ /** @type {?} */
4809
+ SearchToolbarComponent.prototype.searchTypes;
4810
+ /** @type {?} */
4811
+ SearchToolbarComponent.prototype.nbItem;
4812
+ /** @type {?} */
4813
+ SearchToolbarComponent.prototype.nbItemLabel;
4814
+ /** @type {?} */
4815
+ SearchToolbarComponent.prototype.selectSearchType;
4816
+ /** @type {?} */
4817
+ SearchToolbarComponent.prototype.selectedSearchTypeValue;
4818
+ }
4819
+
4735
4820
  /**
4736
4821
  * @fileoverview added by tsickle
4737
4822
  * Generated from: lib/ngx-ode-ui.module.ts
@@ -4808,7 +4893,8 @@ NgxOdeUiModule.decorators = [
4808
4893
  BytesPipe,
4809
4894
  KeysPipe,
4810
4895
  LengthPipe,
4811
- DropdownComponent
4896
+ DropdownComponent,
4897
+ SearchToolbarComponent
4812
4898
  ],
4813
4899
  imports: [
4814
4900
  CommonModule,
@@ -4846,6 +4932,7 @@ NgxOdeUiModule.decorators = [
4846
4932
  PagerComponent,
4847
4933
  EllipsisComponent,
4848
4934
  DropdownComponent,
4935
+ SearchToolbarComponent,
4849
4936
  // directives
4850
4937
  AnchorDirective,
4851
4938
  DynamicTemplateDirective,
@@ -4880,5 +4967,5 @@ NgxOdeUiModule.decorators = [
4880
4967
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4881
4968
  */
4882
4969
 
4883
- 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 };
4970
+ 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 };
4884
4971
  //# sourceMappingURL=ngx-ode-ui.js.map