@indice/ng-components 0.2.20 → 0.2.25

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # INDICE ANGULAR Components
2
-
3
- Indice common components for Angular 2+
4
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
1
+ # INDICE ANGULAR Components
2
+
3
+ Indice common components for Angular 2+
4
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
@@ -252,10 +252,16 @@
252
252
  r[k] = a[j];
253
253
  return r;
254
254
  }
255
- function __spreadArray(to, from) {
256
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
257
- to[j] = from[i];
258
- return to;
255
+ function __spreadArray(to, from, pack) {
256
+ if (pack || arguments.length === 2)
257
+ for (var i = 0, l = from.length, ar; i < l; i++) {
258
+ if (ar || !(i in from)) {
259
+ if (!ar)
260
+ ar = Array.prototype.slice.call(from, 0, i);
261
+ ar[i] = from[i];
262
+ }
263
+ }
264
+ return to.concat(ar || Array.prototype.slice.call(from));
259
265
  }
260
266
  function __await(v) {
261
267
  return this instanceof __await ? (this.v = v, this) : new __await(v);
@@ -620,6 +626,7 @@
620
626
  Icons.Add = "ms-Icon ms-Icon--Add";
621
627
  Icons.SendEmail = "ms-Icon ms-Icon--NewMail";
622
628
  Icons.Filter = "ms-Icon ms-Icon--Filter";
629
+ Icons.Export = "ms-Icon ms-Icon--ExcelDocument";
623
630
  Icons.TilesView = "ms-Icon ms-Icon--AppIconDefault";
624
631
  Icons.TableView = "ms-Icon ms-Icon--Table";
625
632
  Icons.MapView = "ms-Icon ms-Icon--MapPin";
@@ -1070,7 +1077,7 @@
1070
1077
  ListViewEmptyStateComponent.decorators = [
1071
1078
  { type: i0.Component, args: [{
1072
1079
  selector: 'lib-list-view-empty-state',
1073
- template: "<div class=\"p-20\">\n <div class=\"text-center p-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"mx-auto h-12 w-12 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4\" />\n </svg>\n <h3 class=\"mt-2 text-sm font-medium text-gray-900\">{{title}}</h3>\n <p class=\"mt-1 text-sm text-gray-500\">\n {{subTitle}}\n </p>\n <div class=\"mt-6\" *ngIf=\"false\">\n <button type=\"button\" class=\"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-gray-500\">\n <!-- Heroicon name: solid/plus -->\n <svg class=\"-ml-1 mr-2 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path vector-effect=\"non-scaling-stroke\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\" />\n </svg>\n {{newItemLabel}}\n </button>\n </div>\n </div>\n</div>\n"
1080
+ template: "<div class=\"p-20\">\r\n <div class=\"text-center p-2\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"mx-auto h-12 w-12 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4\" />\r\n </svg>\r\n <h3 class=\"mt-2 text-sm font-medium text-gray-900\">{{title}}</h3>\r\n <p class=\"mt-1 text-sm text-gray-500\">\r\n {{subTitle}}\r\n </p>\r\n <div class=\"mt-6\" *ngIf=\"false\">\r\n <button type=\"button\" class=\"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-gray-500\">\r\n <!-- Heroicon name: solid/plus -->\r\n <svg class=\"-ml-1 mr-2 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\r\n <path vector-effect=\"non-scaling-stroke\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\" />\r\n </svg>\r\n {{newItemLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n"
1074
1081
  },] }
1075
1082
  ];
1076
1083
  ListViewEmptyStateComponent.ctorParameters = function () { return []; };
@@ -1537,7 +1544,7 @@
1537
1544
  ToggleComponent.decorators = [
1538
1545
  { type: i0.Component, args: [{
1539
1546
  selector: 'lib-toggle',
1540
- template: "<button type=\"button\"\r\n [ngClass]=\"value ? 'enabled' : 'disabled'\"\r\n class=\"toggle-button\"\r\n role=\"switch\"\r\n aria-checked=\"false\"\r\n aria-labelledby=\"isPrivate\"\r\n (click)=\"changeValue()\"\r\n (blur)=\"onBlur($event)\"\r\n value=\"{{value}}\"\r\n [disabled]=\"disabled\"\r\n [title]=\"disabled ? '\u03A4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B9\u03B4\u03C9\u03C4\u03B9\u03BA\u03CC' : '\u0399\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03CC'\">\r\n <span aria-hidden=\"true\"\r\n [ngClass]=\"value ? 'enabled-anim' : 'disabled-anim'\"\r\n class=\"toggle-span\"></span>\r\n</button>",
1547
+ template: "<button type=\"button\"\n [ngClass]=\"value ? 'enabled' : 'disabled'\"\n class=\"toggle-button\"\n role=\"switch\"\n aria-checked=\"false\"\n aria-labelledby=\"isPrivate\"\n (click)=\"changeValue()\"\n (blur)=\"onBlur($event)\"\n value=\"{{value}}\"\n [disabled]=\"disabled\"\n [title]=\"disabled ? '\u03A4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B9\u03B4\u03C9\u03C4\u03B9\u03BA\u03CC' : '\u0399\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03CC'\">\n <span aria-hidden=\"true\"\n [ngClass]=\"value ? 'enabled-anim' : 'disabled-anim'\"\n class=\"toggle-span\"></span>\n</button>",
1541
1548
  providers: [
1542
1549
  {
1543
1550
  provide: forms.NG_VALUE_ACCESSOR,
@@ -2028,8 +2035,10 @@
2028
2035
  this.onAction = new i0.EventEmitter();
2029
2036
  // tslint:disable-next-line:no-output-on-prefix
2030
2037
  this.onSearch = new i0.EventEmitter();
2038
+ console.log("constructor: " + this.busy);
2031
2039
  }
2032
2040
  ViewLayoutComponent.prototype.ngOnInit = function () {
2041
+ console.log("init: " + this.busy);
2033
2042
  };
2034
2043
  ViewLayoutComponent.prototype.emitActionClick = function (action) {
2035
2044
  this.onAction.emit(action);
@@ -2072,7 +2081,7 @@
2072
2081
  ViewLayoutComponent.decorators = [
2073
2082
  { type: i0.Component, args: [{
2074
2083
  selector: 'lib-view-layout',
2075
- template: "<header *ngIf=\"header\" class=\"view-layout-paddings\">\r\n\r\n <div class=\"view-layout-title-container\">\r\n <div class=\"view-layout-title-container-inner\">\r\n <i *ngIf=\"icon\" [class]=\"icon + ' title-icon'\"\r\n aria-hidden=\"true\"></i>\r\n <h1 [class]=\"busy ? 'view-layout-title-busy' : 'view-layout-title'\">\r\n {{title}}\r\n </h1>\r\n </div>\r\n <div *ngIf=\"metaItems && metaItems.length > 0\" class=\"meta-container\">\r\n <ng-container *ngFor=\"let meta of metaItems\">\r\n <div class=\"meta-container-inner\">\r\n <i *ngIf=\"meta.icon\" [class]=\"meta.icon + ' meta-icon'\" aria-hidden=\"true\"></i>\r\n <span class=\"meta-text\">{{meta.text}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"view-layout-title-container-sm\">\r\n <div class=\"view-layout-title-container-sm-inner\">\r\n <i *ngIf=\"icon\" [class]=\"icon + ' title-icon-sm'\"\r\n aria-hidden=\"true\"></i>\r\n <h1 [class]=\"busy ? 'view-layout-title-busy-sm' : 'view-layout-title-sm'\">\r\n {{title}}\r\n </h1>\r\n <div *ngIf=\"metaItems && metaItems.length > 0\"\r\n class=\"meta-container-sm\">\r\n <ng-container *ngFor=\"let meta of metaItems\">\r\n <div class=\"meta-container-sm-inner\">\r\n <i *ngIf=\"meta.icon\"\r\n [class]=\"meta.icon + ' meta-icon-sm'\"\r\n aria-hidden=\"true\"></i>\r\n <span class=\"meta-text\">{{meta.text}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex items-center justify-end\">\r\n <ng-container *ngFor=\"let action of actions\"\r\n [ngSwitch]=\"action.type\">\r\n <ng-container *ngSwitchCase=\"'switch-view'\">\r\n <button [disabled]=\"view==action.param\"\r\n type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 disabled:opacity-50 btn-view-header\"\r\n (click)=\"switchViewActionClick(action)\">\r\n <span class=\"inline-block relative\">\r\n <i [class]=\"action.icon\"></i>\r\n <span *ngIf=\"view==action.param\"\r\n class=\"selected-view-indicator\"></span>\r\n </span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <label for=\"search\"\r\n class=\"sr-only\">Search</label>\r\n <div class=\"search-container\">\r\n <div class=\"pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center\">\r\n <!--<svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z\" clip-rule=\"evenodd\" />\r\n </svg>-->\r\n </div>\r\n <input id=\"search\"\r\n #search\r\n class=\"search-input\"\r\n [placeholder]=\"searchPlaceholder\"\r\n type=\"search\"\r\n name=\"search\"\r\n (input)=\"searchActionType(search.value)\">\r\n </div>\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"btn-view-header rounded-l-none\"\r\n (click)=\"searchActionClick(action, search.value)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'router-link'\">\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 btn-view-header\"\r\n (click)=\"routerLinkActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n\r\n <!---->\r\n <ng-container *ngSwitchDefault>\r\n <button type=\"button\"\r\n class=\"ml-1 btn-view-header\"\r\n (click)=\"emitActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!-- component -->\r\n<div [class]=\"fluid ? 'view-container-fluid' : 'view-container'\">\r\n <ng-content></ng-content>\r\n</div>\r\n"
2084
+ template: "<header *ngIf=\"header\" class=\"view-layout-paddings\">\r\n\r\n <div class=\"view-layout-title-container\">\r\n <div class=\"view-layout-title-container-inner\">\r\n <i *ngIf=\"icon\" [class]=\"icon + ' title-icon'\"\r\n aria-hidden=\"true\"></i>\r\n <h1 [class]=\"busy ? 'view-layout-title-busy' : 'view-layout-title'\">\r\n {{title}}\r\n </h1>\r\n </div>\r\n <div *ngIf=\"metaItems && metaItems.length > 0\" class=\"meta-container\">\r\n <ng-container *ngFor=\"let meta of metaItems\">\r\n <div class=\"meta-container-inner\">\r\n <i *ngIf=\"meta.icon\" [class]=\"meta.icon + ' meta-icon'\" aria-hidden=\"true\"></i>\r\n <span class=\"meta-text\">{{meta.text}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"view-layout-title-container-sm\">\r\n <div class=\"view-layout-title-container-sm-inner\">\r\n <i *ngIf=\"icon\" [class]=\"icon + ' title-icon-sm'\"\r\n aria-hidden=\"true\"></i>\r\n <h1 [class]=\"busy !== null && busy ? 'view-layout-title-busy-sm' : 'view-layout-title-sm'\">\r\n {{title}}\r\n </h1>\r\n <div *ngIf=\"metaItems && metaItems.length > 0\"\r\n class=\"meta-container-sm\">\r\n <ng-container *ngFor=\"let meta of metaItems\">\r\n <div class=\"meta-container-sm-inner\">\r\n <i *ngIf=\"meta.icon\"\r\n [class]=\"meta.icon + ' meta-icon-sm'\"\r\n aria-hidden=\"true\"></i>\r\n <span class=\"meta-text\">{{meta.text}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex items-center justify-end\">\r\n <ng-container *ngFor=\"let action of actions\"\r\n [ngSwitch]=\"action.type\">\r\n <ng-container *ngSwitchCase=\"'switch-view'\">\r\n <button [disabled]=\"view==action.param\"\r\n type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 disabled:opacity-50 btn-view-header\"\r\n (click)=\"switchViewActionClick(action)\">\r\n <span class=\"inline-block relative\">\r\n <i [class]=\"action.icon\"></i>\r\n <span *ngIf=\"view==action.param\"\r\n class=\"selected-view-indicator\"></span>\r\n </span>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <label for=\"search\"\r\n class=\"sr-only\">Search</label>\r\n <div class=\"search-container\">\r\n <div class=\"pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center\">\r\n <!--<svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z\" clip-rule=\"evenodd\" />\r\n </svg>-->\r\n </div>\r\n <input id=\"search\"\r\n #search\r\n class=\"search-input\"\r\n [placeholder]=\"searchPlaceholder\"\r\n type=\"search\"\r\n name=\"search\"\r\n (input)=\"searchActionType(search.value)\">\r\n </div>\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"btn-view-header rounded-l-none\"\r\n (click)=\"searchActionClick(action, search.value)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'router-link'\">\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 btn-view-header\"\r\n (click)=\"routerLinkActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n\r\n <!---->\r\n <ng-container *ngSwitchDefault>\r\n <button type=\"button\"\r\n class=\"ml-1 btn-view-header\"\r\n (click)=\"emitActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!-- component -->\r\n<div [class]=\"fluid ? 'view-container-fluid' : 'view-container'\">\r\n <ng-content></ng-content>\r\n</div>\r\n"
2076
2085
  },] }
2077
2086
  ];
2078
2087
  ViewLayoutComponent.ctorParameters = function () { return [
@@ -2565,21 +2574,15 @@
2565
2574
  this.routeSub$.unsubscribe();
2566
2575
  }
2567
2576
  };
2568
- BaseListComponent.prototype.getViewActions = function () {
2569
- var actions = [
2577
+ BaseListComponent.prototype.ngOnInit = function () {
2578
+ var _this = this;
2579
+ this.actions = [
2570
2580
  new ViewAction('search', null, null, Icons.Search, 'αναζήτηση'),
2571
2581
  new ViewAction('refresh', null, null, Icons.Refresh, 'ανανέωση στοιχείων')
2572
2582
  ];
2573
2583
  if (this.newItemLink) {
2574
- actions.push(new RouterViewAction(Icons.Add, this.newItemLink, 'rightpane', 'προσθήκη νέας εγγραφής;'));
2584
+ this.actions.push(new RouterViewAction(Icons.Add, this.newItemLink, 'rightpane', 'προσθήκη νέας εγγραφής;'));
2575
2585
  }
2576
- return rxjs.of(actions);
2577
- };
2578
- BaseListComponent.prototype.ngOnInit = function () {
2579
- var _this = this;
2580
- this.getViewActions().subscribe(function (actions) {
2581
- _this.actions = actions || [];
2582
- });
2583
2586
  this.metaItems = [
2584
2587
  { key: 'count', icon: Icons.ItemsCount, text: 'παρακαλώ περιμένετε...' }
2585
2588
  ];
@@ -2591,7 +2594,7 @@
2591
2594
  }
2592
2595
  // changing the view mode does not require reloading...
2593
2596
  _this.view = params.get('view') || ListViewType.Tiles;
2594
- // console.log('route changes ', this.view);
2597
+ //console.log('route changes ', this.view);
2595
2598
  // if (params.get('search') !== this.search) {
2596
2599
  // this.searchChanged(params.get('search'));
2597
2600
  // }
@@ -2631,14 +2634,14 @@
2631
2634
  });
2632
2635
  };
2633
2636
  BaseListComponent.prototype.actionHandler = function ($event) {
2634
- // console.log('BaseListComponent actionHandler', $event);
2637
+ //console.log('BaseListComponent actionHandler', $event);
2635
2638
  if ($event.key === 'refresh') {
2636
2639
  this.refresh();
2637
2640
  }
2638
2641
  };
2639
2642
  BaseListComponent.prototype.load = function () {
2640
2643
  var _this = this;
2641
- // console.log('BaseListComponent LOAD');
2644
+ //console.log('BaseListComponent LOAD');
2642
2645
  this.count = 0;
2643
2646
  this.items = null;
2644
2647
  this.loadItems().subscribe(function (result) {