@festo-ui/angular 3.0.0-pre-20211222.2 → 3.0.0-pre-20220117.1

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.
@@ -1259,12 +1259,17 @@
1259
1259
  var TabPaneComponent = /** @class */ (function () {
1260
1260
  function TabPaneComponent() {
1261
1261
  this.tabPaneId = "tab-panel-content-" + ++TabPaneComponent.nextId;
1262
+ this.changesSubject = new rxjs.Subject();
1263
+ this.changes$ = this.changesSubject.asObservable();
1262
1264
  }
1265
+ TabPaneComponent.prototype.ngOnChanges = function () {
1266
+ this.changesSubject.next(true);
1267
+ };
1263
1268
  return TabPaneComponent;
1264
1269
  }());
1265
1270
  TabPaneComponent.nextId = 0;
1266
1271
  TabPaneComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TabPaneComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1267
- TabPaneComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: TabPaneComponent, selector: "fng-tab-pane", inputs: { id: "id", name: "name", icon: "icon", active: "active", isVisible: "isVisible" }, ngImport: i0__namespace, template: "<div role=\"tabpanel\" [id]=\"tabPaneId\" [attr.aria-labelledby]=\"tabId\" [class.fng-show]=\"isVisible\" [class.fng-hide]=\"!isVisible\">\n <ng-content></ng-content>\n</div>\n", styles: [".fng-show{display:block}.fng-hide{display:none}\n"] });
1272
+ TabPaneComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: TabPaneComponent, selector: "fng-tab-pane", inputs: { id: "id", name: "name", icon: "icon", active: "active", isVisible: "isVisible" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div role=\"tabpanel\" [id]=\"tabPaneId\" [attr.aria-labelledby]=\"tabId\" [class.fng-show]=\"isVisible\" [class.fng-hide]=\"!isVisible\">\n <ng-content></ng-content>\n</div>\n", styles: [".fng-show{display:block}.fng-hide{display:none}\n"] });
1268
1273
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TabPaneComponent, decorators: [{
1269
1274
  type: i0.Component,
1270
1275
  args: [{
@@ -1300,6 +1305,7 @@
1300
1305
  this.tabs = [];
1301
1306
  this.useCompactDensity = true;
1302
1307
  this.activeTab = null;
1308
+ this.complete = new rxjs.Subject();
1303
1309
  this.injectedWindow = this.document.defaultView;
1304
1310
  }
1305
1311
  TabsComponent.prototype.ngAfterContentInit = function () {
@@ -1341,6 +1347,11 @@
1341
1347
  if (this.elemScrollArea != null) {
1342
1348
  this.resizeObserver.observe(this.elemScrollArea);
1343
1349
  }
1350
+ this.handleTabPaneChanges();
1351
+ };
1352
+ TabsComponent.prototype.ngOnDestroy = function () {
1353
+ this.complete.next(true);
1354
+ this.complete.unsubscribe();
1344
1355
  };
1345
1356
  TabsComponent.prototype.showTabPane = function (id) {
1346
1357
  var _a;
@@ -1391,6 +1402,7 @@
1391
1402
  };
1392
1403
  TabsComponent.prototype.initTabs = function () {
1393
1404
  var _this = this;
1405
+ this.tabs = [];
1394
1406
  this.panes.map(function (pane, i) {
1395
1407
  pane.tabId = _this.componentId + '-tab-' + i;
1396
1408
  var tab = {
@@ -1402,6 +1414,7 @@
1402
1414
  _this.tabs.push(tab);
1403
1415
  });
1404
1416
  this.initActiveTab();
1417
+ this.cd.detectChanges();
1405
1418
  };
1406
1419
  TabsComponent.prototype.initActiveTab = function () {
1407
1420
  var activeTab = this.tabs.find(function (tab) { return !!tab.active; });
@@ -1413,6 +1426,16 @@
1413
1426
  this.activeTab = activeTab;
1414
1427
  }
1415
1428
  };
1429
+ TabsComponent.prototype.handleTabPaneChanges = function () {
1430
+ var _this = this;
1431
+ // first subscribe to any changes in tab pane, so that the tabs in this view wiil be updated
1432
+ this.panes.forEach(function (pane) {
1433
+ pane.changes$.pipe(operators.takeUntil(_this.complete)).subscribe(function () {
1434
+ // on changes in a tab pane, we init the tabs again
1435
+ _this.initTabs();
1436
+ });
1437
+ });
1438
+ };
1416
1439
  TabsComponent.prototype.scrollTo = function (scrollX) {
1417
1440
  var currentScrollX = this.getScrollPosition();
1418
1441
  var safeScrollX = this.clampScrollValue(scrollX);
@@ -4975,16 +4998,25 @@
4975
4998
  this.onDateChange(false, false);
4976
4999
  };
4977
5000
  TimePickerDropdownComponent.prototype.onHourChange = function (event) {
5001
+ var _a;
5002
+ var max = +event.target.max;
5003
+ var min = +event.target.min;
4978
5004
  var hour = +event.target.value;
4979
- this.date.setHours(hour);
5005
+ (_a = this.date) === null || _a === void 0 ? void 0 : _a.setHours(hour > max ? max : hour < min ? min : hour);
4980
5006
  };
4981
5007
  TimePickerDropdownComponent.prototype.onMinuteChange = function (event) {
5008
+ var _a;
5009
+ var max = +event.target.max;
5010
+ var min = +event.target.min;
4982
5011
  var minute = +event.target.value;
4983
- this.date.setMinutes(minute);
5012
+ (_a = this.date) === null || _a === void 0 ? void 0 : _a.setMinutes(minute > max ? max : minute < min ? min : minute);
4984
5013
  };
4985
5014
  TimePickerDropdownComponent.prototype.onSecondChange = function (event) {
5015
+ var _a;
5016
+ var max = +event.target.max;
5017
+ var min = +event.target.min;
4986
5018
  var seconds = +event.target.value;
4987
- this.date.setSeconds(seconds);
5019
+ (_a = this.date) === null || _a === void 0 ? void 0 : _a.setSeconds(seconds > max ? max : seconds < min ? min : seconds);
4988
5020
  };
4989
5021
  TimePickerDropdownComponent.prototype.onDateChange = function (close, reset) {
4990
5022
  if (this.date != null) {
@@ -4995,7 +5027,7 @@
4995
5027
  return TimePickerDropdownComponent;
4996
5028
  }());
4997
5029
  TimePickerDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TimePickerDropdownComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
4998
- TimePickerDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: TimePickerDropdownComponent, selector: "fng-time-picker-dropdown", inputs: { date: "date", showSeconds: "showSeconds", timeFormat: "timeFormat" }, outputs: { dateChange: "dateChange" }, host: { listeners: { "document:keydown": "hide($event)" } }, viewQueries: [{ propertyName: "hoursInput", first: true, predicate: ["hoursInput"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"fwe-timepicker\" [class.fwe-timepicker-am-pm]=\"timeFormat === '12'\">\n <div class=\"fwe-timepicker-spinners\">\n <div class=\"fwe-timepicker-spinners-hours\">\n <button type=\"button\" aria-label=\"hour up\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onHourUp()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-expand\"></i>\n </button>\n <input #hoursInput\n aria-label=\"hours value\"\n class=\"fwe-timepicker-hide-spinners\"\n type=\"number\"\n min=\"0\"\n tabindex=\"1\"\n [value]=\"date | date: (timeFormat === '12' ? 'hh' : 'HH')\"\n [attr.max]=\"timeFormat === '12' ? 12 : 23\"\n (input)=\"onHourChange($event)\"\n />\n <button type=\"button\" aria-label=\"hour down\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onHourDown()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-collapse\"></i>\n </button>\n </div>\n <div class=\"fwe-timepicker-spinners-minutes\">\n <button type=\"button\" aria-label=\"minute up\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onMinuteUp()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-expand\"></i>\n </button>\n <input\n aria-label=\"minutes value\"\n class=\"fwe-timepicker-hide-spinners\"\n type=\"number\"\n min=\"0\"\n max=\"59\"\n tabindex=\"2\"\n [value]=\"date | date:'mm'\"\n (input)=\"onMinuteChange($event)\"\n />\n <button type=\"button\" aria-label=\"minute down\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onMinuteDown()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-collapse\"></i>\n </button>\n </div>\n <div *ngIf=\"showSeconds\" class=\"fwe-timepicker-spinners-seconds\">\n <button type=\"button\" aria-label=\"seconds up\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onSecondUp()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-expand\"></i>\n </button>\n <input\n aria-label=\"seconds value\"\n class=\"fwe-timepicker-hide-spinners\"\n type=\"number\"\n min=\"0\"\n max=\"59\"\n tabindex=\"3\"\n [value]=\"date | date:'ss'\"\n (input)=\"onSecondChange($event)\"\n />\n <button type=\"button\" aria-label=\"seconds down\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onSecondDown()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-collapse\"></i>\n </button>\n </div>\n </div>\n <span *ngIf=\"timeFormat === '12'\" class=\"fwe-badge fwe-badge-control\">\n {{ date | date:'a' }}\n </span>\n</div>\n", styles: [".border-hero{border-color:var(--fwe-hero)!important}.fwe-timepicker{width:100%;max-width:100%}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "date": i1__namespace.DatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
5030
+ TimePickerDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.0", type: TimePickerDropdownComponent, selector: "fng-time-picker-dropdown", inputs: { date: "date", showSeconds: "showSeconds", timeFormat: "timeFormat" }, outputs: { dateChange: "dateChange" }, host: { listeners: { "document:keydown": "hide($event)" } }, viewQueries: [{ propertyName: "hoursInput", first: true, predicate: ["hoursInput"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"fwe-timepicker\" [class.fwe-timepicker-am-pm]=\"timeFormat === '12'\">\n <div class=\"fwe-timepicker-spinners\">\n <div class=\"fwe-timepicker-spinners-hours\">\n <button type=\"button\" aria-label=\"hour up\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onHourUp()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-expand\"></i>\n </button>\n <input #hoursInput\n aria-label=\"hours value\"\n class=\"fwe-timepicker-hide-spinners\"\n type=\"number\"\n min=\"0\"\n tabindex=\"1\"\n step=\"1\"\n [value]=\"date | date: (timeFormat === '12' ? 'hh' : 'HH')\"\n [attr.max]=\"timeFormat === '12' ? 12 : 23\"\n (input)=\"onHourChange($event)\"\n />\n <button type=\"button\" aria-label=\"hour down\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onHourDown()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-collapse\"></i>\n </button>\n </div>\n <div class=\"fwe-timepicker-spinners-minutes\">\n <button type=\"button\" aria-label=\"minute up\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onMinuteUp()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-expand\"></i>\n </button>\n <input\n aria-label=\"minutes value\"\n class=\"fwe-timepicker-hide-spinners\"\n type=\"number\"\n min=\"0\"\n max=\"59\"\n step=\"1\"\n tabindex=\"2\"\n [value]=\"date | date:'mm'\"\n (input)=\"onMinuteChange($event)\"\n />\n <button type=\"button\" aria-label=\"minute down\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onMinuteDown()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-collapse\"></i>\n </button>\n </div>\n <div *ngIf=\"showSeconds\" class=\"fwe-timepicker-spinners-seconds\">\n <button type=\"button\" aria-label=\"seconds up\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onSecondUp()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-expand\"></i>\n </button>\n <input\n aria-label=\"seconds value\"\n class=\"fwe-timepicker-hide-spinners\"\n type=\"number\"\n min=\"0\"\n max=\"59\"\n step=\"1\"\n tabindex=\"3\"\n [value]=\"date | date:'ss'\"\n (input)=\"onSecondChange($event)\"\n />\n <button type=\"button\" aria-label=\"seconds down\" class=\"fwe-btn fwe-btn-link fwe-dark\" (click)=\"onSecondDown()\">\n <i aria-hidden=\"true\" class=\"fwe-icon fwe-icon-arrows-collapse\"></i>\n </button>\n </div>\n </div>\n <span *ngIf=\"timeFormat === '12'\" class=\"fwe-badge fwe-badge-control\">\n {{ date | date:'a' }}\n </span>\n</div>\n", styles: [".border-hero{border-color:var(--fwe-hero)!important}.fwe-timepicker{width:100%;max-width:100%}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "date": i1__namespace.DatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
4999
5031
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TimePickerDropdownComponent, decorators: [{
5000
5032
  type: i0.Component,
5001
5033
  args: [{
@@ -5066,6 +5098,22 @@
5066
5098
  enumerable: false,
5067
5099
  configurable: true
5068
5100
  });
5101
+ Object.defineProperty(TimePickerComponent.prototype, "timeFormat", {
5102
+ get: function () {
5103
+ var timeFormat = 'H:mm';
5104
+ if (this.options != null) {
5105
+ if (this.options.showSeconds) {
5106
+ timeFormat += ':ss';
5107
+ }
5108
+ if (this.options.timeFormat === '12') {
5109
+ timeFormat = timeFormat.toLowerCase() + ' a';
5110
+ }
5111
+ }
5112
+ return timeFormat;
5113
+ },
5114
+ enumerable: false,
5115
+ configurable: true
5116
+ });
5069
5117
  TimePickerComponent.prototype.hide = function (event) {
5070
5118
  if (event.key === 'Escape') {
5071
5119
  this.dispose();
@@ -5161,7 +5209,7 @@
5161
5209
  useExisting: i0.forwardRef(function () { return TimePickerComponent; }),
5162
5210
  multi: true
5163
5211
  }
5164
- ], viewQueries: [{ propertyName: "connector", first: true, predicate: ["connector"], descendants: true, static: true }], ngImport: i0__namespace, template: "<label #connector class=\"fng-time-picker fwe-input-text fwe-input-text-icon\" (click)=\"toggle($event)\">\n <i class=\"fwe-icon fwe-icon-time-time\" [class.fwe-color-hero]=\"timePickerRef != null\" [class.fwe-color-control-disabled]=\"disabled\"></i>\n <input\n aria-label=\"picked time\"\n type=\"text\"\n readonly\n [required]=\"required === true || null\"\n [class.fwe-border-hero]=\"timePickerRef != null\"\n [value]=\"value | date: (options?.timeFormat === '12' ? 'h:mm a' : 'H:mm')\"\n [disabled]=\"disabled\"\n />\n <span class=\"fwe-input-text-label\"><ng-content></ng-content></span>\n <span *ngIf=\"hint\" class=\"fwe-input-text-info\">{{ hint }}</span>\n <span *ngIf=\"error\" class=\"fwe-input-text-invalid\">{{ error }}</span>\n</label>\n", styles: [".fng-first-child-fullwidth fng-time-picker-dropdown{width:100%}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "date": i1__namespace.DatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
5212
+ ], viewQueries: [{ propertyName: "connector", first: true, predicate: ["connector"], descendants: true, static: true }], ngImport: i0__namespace, template: "<label #connector class=\"fng-time-picker fwe-input-text fwe-input-text-icon\" (click)=\"toggle($event)\">\n <i class=\"fwe-icon fwe-icon-time-time\" [class.fwe-color-hero]=\"timePickerRef != null\" [class.fwe-color-control-disabled]=\"disabled\"></i>\n <input\n aria-label=\"picked time\"\n type=\"text\"\n readonly\n [required]=\"required === true || null\"\n [class.fwe-border-hero]=\"timePickerRef != null\"\n [value]=\"value | date: timeFormat\"\n [disabled]=\"disabled\"\n />\n <span class=\"fwe-input-text-label\"><ng-content></ng-content></span>\n <span *ngIf=\"hint\" class=\"fwe-input-text-info\">{{ hint }}</span>\n <span *ngIf=\"error\" class=\"fwe-input-text-invalid\">{{ error }}</span>\n</label>\n", styles: [".fng-first-child-fullwidth fng-time-picker-dropdown{width:100%}\n"], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "date": i1__namespace.DatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
5165
5213
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TimePickerComponent, decorators: [{
5166
5214
  type: i0.Component,
5167
5215
  args: [{