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.
@@ -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.isSearchActive = true;
1386
1387
  _this.searchInput = false;
1387
1388
  _this.inputChange = new EventEmitter();
1388
1389
  _this.onSelect = new EventEmitter();
@@ -1426,7 +1427,7 @@ var ListComponent = /** @class */ (function (_super) {
1426
1427
  ListComponent.decorators = [
1427
1428
  { type: Component, args: [{
1428
1429
  selector: 'ode-list',
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",
1430
+ 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",
1430
1431
  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}"]
1431
1432
  }] }
1432
1433
  ];
@@ -1442,6 +1443,7 @@ var ListComponent = /** @class */ (function (_super) {
1442
1443
  limit: [{ type: Input }],
1443
1444
  searchPlaceholder: [{ type: Input }],
1444
1445
  noResultsLabel: [{ type: Input }],
1446
+ isSearchActive: [{ type: Input }],
1445
1447
  searchInput: [{ type: Input }],
1446
1448
  searchSubmit: [{ type: Input }],
1447
1449
  inputChange: [{ type: Output }],
@@ -1475,6 +1477,8 @@ if (false) {
1475
1477
  /** @type {?} */
1476
1478
  ListComponent.prototype.noResultsLabel;
1477
1479
  /** @type {?} */
1480
+ ListComponent.prototype.isSearchActive;
1481
+ /** @type {?} */
1478
1482
  ListComponent.prototype.searchInput;
1479
1483
  /** @type {?} */
1480
1484
  ListComponent.prototype.searchSubmit;
@@ -2943,6 +2947,7 @@ var SearchInputComponent = /** @class */ (function (_super) {
2943
2947
  _this._elRef = _elRef;
2944
2948
  _this._renderer = _renderer;
2945
2949
  /* Inputs / Outputs / View */
2950
+ _this.isSearchActive = false;
2946
2951
  _this.searchInput = false;
2947
2952
  _this._delay = 200;
2948
2953
  _this.onChange = new EventEmitter();
@@ -3058,6 +3063,7 @@ var SearchInputComponent = /** @class */ (function (_super) {
3058
3063
  { type: Renderer2 }
3059
3064
  ]; };
3060
3065
  SearchInputComponent.propDecorators = {
3066
+ isSearchActive: [{ type: Input }],
3061
3067
  searchInput: [{ type: Input }],
3062
3068
  searchSubmit: [{ type: Input }],
3063
3069
  delay: [{ type: Input }],
@@ -3067,6 +3073,8 @@ var SearchInputComponent = /** @class */ (function (_super) {
3067
3073
  return SearchInputComponent;
3068
3074
  }(OdeComponent));
3069
3075
  if (false) {
3076
+ /** @type {?} */
3077
+ SearchInputComponent.prototype.isSearchActive;
3070
3078
  /** @type {?} */
3071
3079
  SearchInputComponent.prototype.searchInput;
3072
3080
  /** @type {?} */
@@ -5155,6 +5163,83 @@ function clickOn(el) {
5155
5163
  return el.triggerEventHandler('click', null);
5156
5164
  }
5157
5165
 
5166
+ /**
5167
+ * @fileoverview added by tsickle
5168
+ * Generated from: lib/components/dropdown/dropdown.component.ts
5169
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5170
+ */
5171
+ /**
5172
+ * DropdownComponent is an alternative to the MonoSelectComponent.
5173
+ * Accept everything inside <ng-content> but should work with <ode-list> component
5174
+ *
5175
+ * Simple Dropdown Component without search:
5176
+ * [isSearchActive] can be set to false to disable search input in <ode-list>
5177
+ * ```
5178
+ * <ode-dropdown
5179
+ * [name]="option_name"
5180
+ * [isDropdownOpened]="a_boolean"
5181
+ * (onDropdown)="toggle_func"
5182
+ * >
5183
+ * <ode-list
5184
+ * [model]="model"
5185
+ * [filters]="filters"
5186
+ * (onSelect)="func_to_select_elem($event)"
5187
+ * (inputChange)="a_string_for_input_value = $event"
5188
+ * noResultsLabel="text_to_display"
5189
+ * searchPlaceholder="default_placeholder_text"
5190
+ * >
5191
+ * <ng-template let-item>
5192
+ * <div>{{ item.name }}</div>
5193
+ * </ng-template>
5194
+ * </ode-list>
5195
+ * </ode-dropdown>
5196
+ * `̀``
5197
+ */
5198
+ var DropdownComponent = /** @class */ (function (_super) {
5199
+ __extends(DropdownComponent, _super);
5200
+ function DropdownComponent(injector) {
5201
+ var _this = _super.call(this, injector) || this;
5202
+ _this.name = '';
5203
+ _this.isDropdownOpened = false;
5204
+ _this.onDropdown = new EventEmitter();
5205
+ return _this;
5206
+ }
5207
+ /**
5208
+ * @return {?}
5209
+ */
5210
+ DropdownComponent.prototype.ngOnInit = /**
5211
+ * @return {?}
5212
+ */
5213
+ function () {
5214
+ _super.prototype.ngOnInit.call(this);
5215
+ };
5216
+ DropdownComponent.decorators = [
5217
+ { type: Component, args: [{
5218
+ selector: 'ode-dropdown',
5219
+ 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",
5220
+ 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)}"]
5221
+ }] }
5222
+ ];
5223
+ /** @nocollapse */
5224
+ DropdownComponent.ctorParameters = function () { return [
5225
+ { type: Injector }
5226
+ ]; };
5227
+ DropdownComponent.propDecorators = {
5228
+ name: [{ type: Input }],
5229
+ isDropdownOpened: [{ type: Input }],
5230
+ onDropdown: [{ type: Output }]
5231
+ };
5232
+ return DropdownComponent;
5233
+ }(OdeComponent));
5234
+ if (false) {
5235
+ /** @type {?} */
5236
+ DropdownComponent.prototype.name;
5237
+ /** @type {?} */
5238
+ DropdownComponent.prototype.isDropdownOpened;
5239
+ /** @type {?} */
5240
+ DropdownComponent.prototype.onDropdown;
5241
+ }
5242
+
5158
5243
  /**
5159
5244
  * @fileoverview added by tsickle
5160
5245
  * Generated from: lib/ngx-ode-ui.module.ts
@@ -5238,7 +5323,8 @@ var NgxOdeUiModule = /** @class */ (function () {
5238
5323
  LocalizedDatePipe,
5239
5324
  BytesPipe,
5240
5325
  KeysPipe,
5241
- LengthPipe
5326
+ LengthPipe,
5327
+ DropdownComponent
5242
5328
  ],
5243
5329
  imports: [
5244
5330
  CommonModule,
@@ -5275,6 +5361,7 @@ var NgxOdeUiModule = /** @class */ (function () {
5275
5361
  SpinnerCubeComponent,
5276
5362
  PagerComponent,
5277
5363
  EllipsisComponent,
5364
+ DropdownComponent,
5278
5365
  // directives
5279
5366
  AnchorDirective,
5280
5367
  DynamicTemplateDirective,
@@ -5311,5 +5398,5 @@ var NgxOdeUiModule = /** @class */ (function () {
5311
5398
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5312
5399
  */
5313
5400
 
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 };
5401
+ 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 };
5315
5402
  //# sourceMappingURL=ngx-ode-ui.js.map