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.
@@ -7,4 +7,5 @@
7
7
  * Generated bundle index. Do not edit.
8
8
  */
9
9
  export { DynamicModuleImportsService, InputFileService, LabelsService, SpinnerService, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DatepickerComponent, EllipsisComponent, FormErrorsComponent, FormFieldComponent, ItemTreeComponent, LightBoxComponent, LightboxConfirmComponent, ListComponent, ListCheckableComponent, icons, MessageBoxComponent, MessageStickerComponent, MonoSelectComponent, MultiComboComponent, MultiSelectComponent, PanelSectionComponent, PortalComponent, PushPanelComponent, SearchInputComponent, SideLayoutComponent, SidePanelComponent, SpinnerCubeComponent, PagerComponent, TooltipComponent, UploadFilesComponent, SimpleSelectComponent, StepComponent, WizardComponent, DynamicComponentDirective, ComponentDescriptor, AnchorDirective, DragAndDropFilesDirective, DynamicTemplateDirective, ObjectURLDirective, BytesPipe, FilterPipe, FlattenObjectArrayPipe, KeysPipe, LimitPipe, LocalizedDatePipe, OrderPipe, StorePipe, LengthPipe, toDecimal, getUnit, UNITS, trim, standardise, removeAccents, getText, clickOn, NgxOdeUiModule } from './public-api';
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW9kZS11aS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1vZGUtdWkvIiwic291cmNlcyI6WyJuZ3gtb2RlLXVpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBSUEsaWhDQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
10
+ export { DropdownComponent as ɵa } from './lib/components/dropdown/dropdown.component';
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW9kZS11aS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1vZGUtdWkvIiwic291cmNlcyI6WyJuZ3gtb2RlLXVpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBSUEsaWhDQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsaUJBQWlCLElBQUksRUFBRSxFQUFDLE1BQU0sOENBQThDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG5cbmV4cG9ydCB7RHJvcGRvd25Db21wb25lbnQgYXMgybVhfSBmcm9tICcuL2xpYi9jb21wb25lbnRzL2Ryb3Bkb3duL2Ryb3Bkb3duLmNvbXBvbmVudCc7Il19
@@ -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.isSearchActive = true;
1227
1228
  this.searchInput = false;
1228
1229
  this.inputChange = new EventEmitter();
1229
1230
  this.onSelect = new EventEmitter();
@@ -1263,7 +1264,7 @@ class ListComponent extends OdeComponent {
1263
1264
  ListComponent.decorators = [
1264
1265
  { type: Component, args: [{
1265
1266
  selector: 'ode-list',
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",
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",
1267
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}"]
1268
1269
  }] }
1269
1270
  ];
@@ -1279,6 +1280,7 @@ ListComponent.propDecorators = {
1279
1280
  limit: [{ type: Input }],
1280
1281
  searchPlaceholder: [{ type: Input }],
1281
1282
  noResultsLabel: [{ type: Input }],
1283
+ isSearchActive: [{ type: Input }],
1282
1284
  searchInput: [{ type: Input }],
1283
1285
  searchSubmit: [{ type: Input }],
1284
1286
  inputChange: [{ type: Output }],
@@ -1310,6 +1312,8 @@ if (false) {
1310
1312
  /** @type {?} */
1311
1313
  ListComponent.prototype.noResultsLabel;
1312
1314
  /** @type {?} */
1315
+ ListComponent.prototype.isSearchActive;
1316
+ /** @type {?} */
1313
1317
  ListComponent.prototype.searchInput;
1314
1318
  /** @type {?} */
1315
1319
  ListComponent.prototype.searchSubmit;
@@ -2604,6 +2608,7 @@ class SearchInputComponent extends OdeComponent {
2604
2608
  this._elRef = _elRef;
2605
2609
  this._renderer = _renderer;
2606
2610
  /* Inputs / Outputs / View */
2611
+ this.isSearchActive = false;
2607
2612
  this.searchInput = false;
2608
2613
  this._delay = 200;
2609
2614
  this.onChange = new EventEmitter();
@@ -2699,6 +2704,7 @@ SearchInputComponent.ctorParameters = () => [
2699
2704
  { type: Renderer2 }
2700
2705
  ];
2701
2706
  SearchInputComponent.propDecorators = {
2707
+ isSearchActive: [{ type: Input }],
2702
2708
  searchInput: [{ type: Input }],
2703
2709
  searchSubmit: [{ type: Input }],
2704
2710
  delay: [{ type: Input }],
@@ -2706,6 +2712,8 @@ SearchInputComponent.propDecorators = {
2706
2712
  searchBox: [{ type: ViewChild, args: ['searchBox', { static: false },] }]
2707
2713
  };
2708
2714
  if (false) {
2715
+ /** @type {?} */
2716
+ SearchInputComponent.prototype.isSearchActive;
2709
2717
  /** @type {?} */
2710
2718
  SearchInputComponent.prototype.searchInput;
2711
2719
  /** @type {?} */
@@ -4650,6 +4658,80 @@ function clickOn(el) {
4650
4658
  return el.triggerEventHandler('click', null);
4651
4659
  }
4652
4660
 
4661
+ /**
4662
+ * @fileoverview added by tsickle
4663
+ * Generated from: lib/components/dropdown/dropdown.component.ts
4664
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4665
+ */
4666
+ /**
4667
+ * DropdownComponent is an alternative to the MonoSelectComponent.
4668
+ * Accept everything inside <ng-content> but should work with <ode-list> component
4669
+ *
4670
+ * Simple Dropdown Component without search:
4671
+ * [isSearchActive] can be set to false to disable search input in <ode-list>
4672
+ * ```
4673
+ * <ode-dropdown
4674
+ * [name]="option_name"
4675
+ * [isDropdownOpened]="a_boolean"
4676
+ * (onDropdown)="toggle_func"
4677
+ * >
4678
+ * <ode-list
4679
+ * [model]="model"
4680
+ * [filters]="filters"
4681
+ * (onSelect)="func_to_select_elem($event)"
4682
+ * (inputChange)="a_string_for_input_value = $event"
4683
+ * noResultsLabel="text_to_display"
4684
+ * searchPlaceholder="default_placeholder_text"
4685
+ * >
4686
+ * <ng-template let-item>
4687
+ * <div>{{ item.name }}</div>
4688
+ * </ng-template>
4689
+ * </ode-list>
4690
+ * </ode-dropdown>
4691
+ * `̀``
4692
+ */
4693
+ class DropdownComponent extends OdeComponent {
4694
+ /**
4695
+ * @param {?} injector
4696
+ */
4697
+ constructor(injector) {
4698
+ super(injector);
4699
+ this.name = '';
4700
+ this.isDropdownOpened = false;
4701
+ this.onDropdown = new EventEmitter();
4702
+ }
4703
+ /**
4704
+ * @return {?}
4705
+ */
4706
+ ngOnInit() {
4707
+ super.ngOnInit();
4708
+ }
4709
+ }
4710
+ DropdownComponent.decorators = [
4711
+ { type: Component, args: [{
4712
+ selector: 'ode-dropdown',
4713
+ 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",
4714
+ 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)}"]
4715
+ }] }
4716
+ ];
4717
+ /** @nocollapse */
4718
+ DropdownComponent.ctorParameters = () => [
4719
+ { type: Injector }
4720
+ ];
4721
+ DropdownComponent.propDecorators = {
4722
+ name: [{ type: Input }],
4723
+ isDropdownOpened: [{ type: Input }],
4724
+ onDropdown: [{ type: Output }]
4725
+ };
4726
+ if (false) {
4727
+ /** @type {?} */
4728
+ DropdownComponent.prototype.name;
4729
+ /** @type {?} */
4730
+ DropdownComponent.prototype.isDropdownOpened;
4731
+ /** @type {?} */
4732
+ DropdownComponent.prototype.onDropdown;
4733
+ }
4734
+
4653
4735
  /**
4654
4736
  * @fileoverview added by tsickle
4655
4737
  * Generated from: lib/ngx-ode-ui.module.ts
@@ -4725,7 +4807,8 @@ NgxOdeUiModule.decorators = [
4725
4807
  LocalizedDatePipe,
4726
4808
  BytesPipe,
4727
4809
  KeysPipe,
4728
- LengthPipe
4810
+ LengthPipe,
4811
+ DropdownComponent
4729
4812
  ],
4730
4813
  imports: [
4731
4814
  CommonModule,
@@ -4762,6 +4845,7 @@ NgxOdeUiModule.decorators = [
4762
4845
  SpinnerCubeComponent,
4763
4846
  PagerComponent,
4764
4847
  EllipsisComponent,
4848
+ DropdownComponent,
4765
4849
  // directives
4766
4850
  AnchorDirective,
4767
4851
  DynamicTemplateDirective,
@@ -4796,5 +4880,5 @@ NgxOdeUiModule.decorators = [
4796
4880
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4797
4881
  */
4798
4882
 
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 };
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 };
4800
4884
  //# sourceMappingURL=ngx-ode-ui.js.map