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

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.
@@ -4975,16 +4975,25 @@
4975
4975
  this.onDateChange(false, false);
4976
4976
  };
4977
4977
  TimePickerDropdownComponent.prototype.onHourChange = function (event) {
4978
+ var _a;
4979
+ var max = +event.target.max;
4980
+ var min = +event.target.min;
4978
4981
  var hour = +event.target.value;
4979
- this.date.setHours(hour);
4982
+ (_a = this.date) === null || _a === void 0 ? void 0 : _a.setHours(hour > max ? max : hour < min ? min : hour);
4980
4983
  };
4981
4984
  TimePickerDropdownComponent.prototype.onMinuteChange = function (event) {
4985
+ var _a;
4986
+ var max = +event.target.max;
4987
+ var min = +event.target.min;
4982
4988
  var minute = +event.target.value;
4983
- this.date.setMinutes(minute);
4989
+ (_a = this.date) === null || _a === void 0 ? void 0 : _a.setMinutes(minute > max ? max : minute < min ? min : minute);
4984
4990
  };
4985
4991
  TimePickerDropdownComponent.prototype.onSecondChange = function (event) {
4992
+ var _a;
4993
+ var max = +event.target.max;
4994
+ var min = +event.target.min;
4986
4995
  var seconds = +event.target.value;
4987
- this.date.setSeconds(seconds);
4996
+ (_a = this.date) === null || _a === void 0 ? void 0 : _a.setSeconds(seconds > max ? max : seconds < min ? min : seconds);
4988
4997
  };
4989
4998
  TimePickerDropdownComponent.prototype.onDateChange = function (close, reset) {
4990
4999
  if (this.date != null) {
@@ -4995,7 +5004,7 @@
4995
5004
  return TimePickerDropdownComponent;
4996
5005
  }());
4997
5006
  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 });
5007
+ 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
5008
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TimePickerDropdownComponent, decorators: [{
5000
5009
  type: i0.Component,
5001
5010
  args: [{
@@ -5066,6 +5075,22 @@
5066
5075
  enumerable: false,
5067
5076
  configurable: true
5068
5077
  });
5078
+ Object.defineProperty(TimePickerComponent.prototype, "timeFormat", {
5079
+ get: function () {
5080
+ var timeFormat = 'H:mm';
5081
+ if (this.options != null) {
5082
+ if (this.options.showSeconds) {
5083
+ timeFormat += ':ss';
5084
+ }
5085
+ if (this.options.timeFormat === '12') {
5086
+ timeFormat = timeFormat.toLowerCase() + ' a';
5087
+ }
5088
+ }
5089
+ return timeFormat;
5090
+ },
5091
+ enumerable: false,
5092
+ configurable: true
5093
+ });
5069
5094
  TimePickerComponent.prototype.hide = function (event) {
5070
5095
  if (event.key === 'Escape') {
5071
5096
  this.dispose();
@@ -5161,7 +5186,7 @@
5161
5186
  useExisting: i0.forwardRef(function () { return TimePickerComponent; }),
5162
5187
  multi: true
5163
5188
  }
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 });
5189
+ ], 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
5190
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.0", ngImport: i0__namespace, type: TimePickerComponent, decorators: [{
5166
5191
  type: i0.Component,
5167
5192
  args: [{