nira-falcon 0.0.5 → 0.0.7

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.
@@ -735,24 +735,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
735
735
  }] } });
736
736
 
737
737
  class CoreSelectComponent {
738
- set titleKey(data) {
739
- this._titleKey = data;
740
- this.hasTitleKey = true;
741
- this.init();
742
- }
743
- set valueKey(data) {
744
- this._valueKey = data;
745
- this.hasValueKey = true;
746
- this.init();
747
- }
748
738
  set items(data) {
749
739
  this._items = data;
750
- this.hasItems = true;
751
740
  this.init();
752
741
  }
753
742
  set defaultValue(data) {
754
743
  this._defaultValue = data;
755
- this.hasDefaultValue = true;
756
744
  this.init();
757
745
  }
758
746
  constructor(cdr) {
@@ -761,38 +749,27 @@ class CoreSelectComponent {
761
749
  this.newItems = [];
762
750
  this.isOpenMenu = false;
763
751
  this._items = [];
764
- this._defaultValue = undefined;
765
- this.initCounter = 0;
766
- this.hasTitleKey = false;
767
- this.hasValueKey = false;
768
- this.hasItems = false;
769
- this.hasDefaultValue = false;
752
+ this.canHighlightBackground = false;
770
753
  this.label = '';
771
754
  this.disabled = false;
772
755
  this.onItemSelected = new EventEmitter();
773
756
  this.inputFormControl = new FormControl('', []);
774
757
  }
775
758
  init() {
776
- if (this.hasTitleKey &&
777
- this.hasValueKey &&
778
- this.hasItems &&
779
- this.hasDefaultValue) {
780
- this.newItems = this.changeItemsType(this._items);
781
- const item = this.newItems.find((item) => item.value == this._defaultValue);
782
- if (!this._defaultValue || this._defaultValue === null)
783
- return;
784
- this.inputFormControl.setValue(this._defaultValue);
785
- this.onItemSelect(this.newItems.find((item) => item.value == this._defaultValue), false);
786
- }
759
+ this.titleKeyObject = this.titleKey;
760
+ this.valueKeyObject = this.valueKey;
761
+ this.newItems = this.changeItemsType(this._items);
762
+ this.inputFormControl.setValue(this._defaultValue);
763
+ this.onItemSelect(this.newItems.find((item) => item.value == this._defaultValue), false);
787
764
  }
788
- ngAfterViewInit() {
789
- this.cdr.detectChanges();
765
+ ngOnInit() {
766
+ this.init();
790
767
  }
791
768
  changeItemsType(items) {
792
769
  return items.map((item) => {
793
770
  return {
794
- title: item[this._titleKey],
795
- value: item[this._valueKey],
771
+ title: item[this.titleKeyObject],
772
+ value: item[this.valueKeyObject],
796
773
  };
797
774
  });
798
775
  }
@@ -805,8 +782,12 @@ class CoreSelectComponent {
805
782
  if (isFromUi)
806
783
  this.inputFormControl.markAsTouched();
807
784
  this.isOpenMenu = false;
785
+ if (!selectedItem) {
786
+ this.selectedItem = {};
787
+ return;
788
+ }
808
789
  this.selectedItem = selectedItem;
809
- const mainItem = this._items.find((item) => item[this._valueKey] === selectedItem.value);
790
+ const mainItem = this._items.find((item) => item[this.valueKeyObject] === selectedItem.value);
810
791
  this.inputFormControl.setValue(selectedItem.value);
811
792
  this.onItemSelected.emit(mainItem);
812
793
  }
@@ -815,23 +796,21 @@ class CoreSelectComponent {
815
796
  this.inputFormControl.markAsTouched();
816
797
  }
817
798
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CoreSelectComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
818
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CoreSelectComponent, selector: "core-select", inputs: { titleKey: "titleKey", valueKey: "valueKey", items: "items", defaultValue: "defaultValue", label: "label", disabled: "disabled", inputFormControl: "inputFormControl" }, outputs: { onItemSelected: "onItemSelected" }, ngImport: i0, template: "<div tabindex=\"-1\" class=\"dropdown\" (focusout)=\"focusOut()\">\r\n <div\r\n class=\"select\"\r\n [ngClass]=\"{\r\n 'select-clicked': isOpenMenu,\r\n 'disable-selector': disabled,\r\n selectError: inputFormControl.touched && inputFormControl.errors\r\n }\"\r\n (click)=\"openMenuClick()\"\r\n >\r\n <span\r\n class=\"placeholder-top\"\r\n *ngIf=\"(selectedItem | json) != ({} | json)\"\r\n >{{ label }}</span\r\n >\r\n <arrow-down-icon\r\n class=\"caret h-6\"\r\n [ngClass]=\"{ 'caret-rotate': isOpenMenu }\"\r\n ></arrow-down-icon>\r\n\r\n <span\r\n [ngClass]=\"[\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? 'placeholder'\r\n : 'selected'\r\n ]\"\r\n >{{\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? label\r\n : selectedItem.title\r\n }}</span\r\n >\r\n </div>\r\n <ul class=\"menu\" [ngClass]=\"{ 'menu-open': isOpenMenu }\">\r\n <li\r\n *ngFor=\"let item of newItems\"\r\n [ngClass]=\"{ active: item == selectedItem }\"\r\n (click)=\"onItemSelect(item, true)\"\r\n >\r\n {{ item.title }}\r\n </li>\r\n </ul>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n inputFormControl.touched &&\r\n inputFormControl.errors?.['required']\"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n</div>\r\n", styles: [".dropdown{min-width:15em;position:relative;width:100%;min-width:120px}.dropdown .disable-selector{background-color:var(--default-selector-disable-background-color)!important;border:1px dashed var(--default-selector-disable-border-color)!important;cursor:no-drop!important}.dropdown .select{background:var(--default-selector-background-color);color:var(--default-selector-text-color);display:flex;justify-content:space-between;flex-direction:row-reverse;align-items:center;border:1px solid var(--default-selector-border-color);border-radius:4px;padding:8px;cursor:pointer;transition:background .3s;font-size:12px;-webkit-user-select:none;user-select:none}.dropdown .select:hover{background:var(--default-selector-hover-color)}.dropdown .select .selected{padding-inline:12px;font-size:14px;color:#000000b3;-webkit-user-select:none;user-select:none}.dropdown .select .placeholder-top{position:absolute;right:13px;background:var(--default-selector-label-background-color);top:-8px;padding-inline:6px;font-size:11px;color:var(--default-selector-label-text--color)}.dropdown .select .caret{fill:var(--default-selector-icon-color);color:#595c5f;-webkit-user-select:none;user-select:none}.dropdown .select .caret-rotate{transform:rotate(180deg)}.dropdown .select .placeholder{color:var(--default-selector-placeholder-text-color);padding-inline:16px}.dropdown .select-clicked{border:1px solid rgba(19,92,175,.397)}.dropdown .menu{list-style:none;padding-inline:0px;background:var(--default-selector-menu-background-color);border:1px solid var(--default-selector-menu-border-color);box-shadow:0 .5em 1em #0003;border-radius:.5em;color:var(--default-selector-menu-text-color);position:absolute;top:40px;left:50%;width:100%;transform:translate(-50%);opacity:0;display:none;transition:0,2s;z-index:10;max-height:200px;overflow:auto}.dropdown .menu li{padding:.7em .5em;margin:.3em 0;margin-inline:4px;border-radius:.5em;font-size:14px;text-align:start;cursor:pointer}.dropdown .menu li:hover{background:var(--default-selector-menu-item-hover-color)}.dropdown .menu .active{background:var(--default-selector-menu-item-active-color)}.dropdown .menu-open{display:block;opacity:1}.dropdown .label-error{color:var(--default-selector-validation-text-color);font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.dropdown .selectError{border:1px solid var(--default-selector-validation-border-color)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.JsonPipe, name: "json" }] }); }
799
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CoreSelectComponent, selector: "core-select", inputs: { titleKey: "titleKey", valueKey: "valueKey", canHighlightBackground: "canHighlightBackground", items: "items", defaultValue: "defaultValue", label: "label", disabled: "disabled", inputFormControl: "inputFormControl" }, outputs: { onItemSelected: "onItemSelected" }, ngImport: i0, template: "<div tabindex=\"-1\" class=\"dropdown\" (focusout)=\"focusOut()\">\r\n <div\r\n class=\"select\"\r\n [ngClass]=\"{\r\n 'select-clicked': isOpenMenu,\r\n 'highlight-background':\r\n canHighlightBackground &&\r\n (selectedItem | json) === ({} | json) &&\r\n !(inputFormControl.touched && inputFormControl.errors),\r\n selectError: inputFormControl.touched && inputFormControl.errors ,\r\n 'disable-selector': disabled,\r\n\r\n }\"\r\n (click)=\"openMenuClick()\"\r\n >\r\n <span\r\n class=\"placeholder-top\"\r\n *ngIf=\"(selectedItem | json) != ({} | json)\"\r\n >{{ label }}</span\r\n >\r\n <arrow-down-icon\r\n class=\"caret fill-secondary-text-color h-6\"\r\n [ngClass]=\"{ 'caret-rotate': isOpenMenu }\"\r\n ></arrow-down-icon>\r\n\r\n <span\r\n [ngClass]=\"[\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? 'placeholder'\r\n : 'selected'\r\n ]\"\r\n >{{\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? label\r\n : selectedItem.title\r\n }}</span\r\n >\r\n </div>\r\n <ul class=\"menu\" [ngClass]=\"{ 'menu-open': isOpenMenu }\">\r\n <li\r\n *ngFor=\"let item of newItems\"\r\n [ngClass]=\"{ active: item == selectedItem }\"\r\n (click)=\"onItemSelect(item, true)\"\r\n >\r\n {{ item.title }}\r\n </li>\r\n </ul>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n inputFormControl.touched &&\r\n inputFormControl.errors?.['required']\"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n</div>\r\n", styles: [".dropdown{min-width:15em;position:relative;width:100%;min-width:120px}.dropdown .disable-selector{background-color:#f7f7f7!important;border:1px dashed #ced4da!important;cursor:no-drop!important}.dropdown .highlight-background{background-color:#dcf6ff!important}.dropdown .select{background:#fff;color:#304050;display:flex;height:42px;justify-content:space-between;flex-direction:row-reverse;align-items:center;border:1px solid #ced4da;border-radius:4px;padding:8px;cursor:pointer;transition:background .3s;font-size:12px;-webkit-user-select:none;user-select:none}.dropdown .select:hover{background:#fbfbfb}.dropdown .select .selected{padding-inline:12px;font-size:14px;color:#000000b3;-webkit-user-select:none;user-select:none}.dropdown .select .placeholder-top{position:absolute;right:13px;background:#fff;top:-8px;padding-inline:6px;font-size:11px;color:#888}.dropdown .select .caret{color:#595c5f;-webkit-user-select:none;user-select:none}.dropdown .select .caret-rotate{transform:rotate(180deg)}.dropdown .select .placeholder{color:#888;padding-inline:16px}.dropdown .select-clicked{border:1px solid rgba(19,92,175,.397)}.dropdown .menu{list-style:none;padding-inline:0px;background:#fff;border:1px #e3e8f1 solid;box-shadow:0 .5em 1em #0003;border-radius:.5em;color:#595c5f;position:absolute;top:40px;left:50%;width:100%;transform:translate(-50%);opacity:0;display:none;transition:0,2s;z-index:10;max-height:200px;overflow:auto}.dropdown .menu li{padding:.7em .5em;margin:.3em 0;margin-inline:4px;border-radius:.5em;font-size:14px;text-align:start;cursor:pointer}.dropdown .menu li:hover{background:#f6f6f6}.dropdown .menu .active{background:#ced4da}.dropdown .menu-open{display:block;opacity:1}.dropdown .label-error{color:red;font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.dropdown .selectError{border:1px solid #fe5f5f!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.JsonPipe, name: "json" }] }); }
819
800
  }
820
801
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CoreSelectComponent, decorators: [{
821
802
  type: Component,
822
- args: [{ selector: 'core-select', template: "<div tabindex=\"-1\" class=\"dropdown\" (focusout)=\"focusOut()\">\r\n <div\r\n class=\"select\"\r\n [ngClass]=\"{\r\n 'select-clicked': isOpenMenu,\r\n 'disable-selector': disabled,\r\n selectError: inputFormControl.touched && inputFormControl.errors\r\n }\"\r\n (click)=\"openMenuClick()\"\r\n >\r\n <span\r\n class=\"placeholder-top\"\r\n *ngIf=\"(selectedItem | json) != ({} | json)\"\r\n >{{ label }}</span\r\n >\r\n <arrow-down-icon\r\n class=\"caret h-6\"\r\n [ngClass]=\"{ 'caret-rotate': isOpenMenu }\"\r\n ></arrow-down-icon>\r\n\r\n <span\r\n [ngClass]=\"[\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? 'placeholder'\r\n : 'selected'\r\n ]\"\r\n >{{\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? label\r\n : selectedItem.title\r\n }}</span\r\n >\r\n </div>\r\n <ul class=\"menu\" [ngClass]=\"{ 'menu-open': isOpenMenu }\">\r\n <li\r\n *ngFor=\"let item of newItems\"\r\n [ngClass]=\"{ active: item == selectedItem }\"\r\n (click)=\"onItemSelect(item, true)\"\r\n >\r\n {{ item.title }}\r\n </li>\r\n </ul>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n inputFormControl.touched &&\r\n inputFormControl.errors?.['required']\"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n</div>\r\n", styles: [".dropdown{min-width:15em;position:relative;width:100%;min-width:120px}.dropdown .disable-selector{background-color:var(--default-selector-disable-background-color)!important;border:1px dashed var(--default-selector-disable-border-color)!important;cursor:no-drop!important}.dropdown .select{background:var(--default-selector-background-color);color:var(--default-selector-text-color);display:flex;justify-content:space-between;flex-direction:row-reverse;align-items:center;border:1px solid var(--default-selector-border-color);border-radius:4px;padding:8px;cursor:pointer;transition:background .3s;font-size:12px;-webkit-user-select:none;user-select:none}.dropdown .select:hover{background:var(--default-selector-hover-color)}.dropdown .select .selected{padding-inline:12px;font-size:14px;color:#000000b3;-webkit-user-select:none;user-select:none}.dropdown .select .placeholder-top{position:absolute;right:13px;background:var(--default-selector-label-background-color);top:-8px;padding-inline:6px;font-size:11px;color:var(--default-selector-label-text--color)}.dropdown .select .caret{fill:var(--default-selector-icon-color);color:#595c5f;-webkit-user-select:none;user-select:none}.dropdown .select .caret-rotate{transform:rotate(180deg)}.dropdown .select .placeholder{color:var(--default-selector-placeholder-text-color);padding-inline:16px}.dropdown .select-clicked{border:1px solid rgba(19,92,175,.397)}.dropdown .menu{list-style:none;padding-inline:0px;background:var(--default-selector-menu-background-color);border:1px solid var(--default-selector-menu-border-color);box-shadow:0 .5em 1em #0003;border-radius:.5em;color:var(--default-selector-menu-text-color);position:absolute;top:40px;left:50%;width:100%;transform:translate(-50%);opacity:0;display:none;transition:0,2s;z-index:10;max-height:200px;overflow:auto}.dropdown .menu li{padding:.7em .5em;margin:.3em 0;margin-inline:4px;border-radius:.5em;font-size:14px;text-align:start;cursor:pointer}.dropdown .menu li:hover{background:var(--default-selector-menu-item-hover-color)}.dropdown .menu .active{background:var(--default-selector-menu-item-active-color)}.dropdown .menu-open{display:block;opacity:1}.dropdown .label-error{color:var(--default-selector-validation-text-color);font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.dropdown .selectError{border:1px solid var(--default-selector-validation-border-color)!important}\n"] }]
803
+ args: [{ selector: 'core-select', template: "<div tabindex=\"-1\" class=\"dropdown\" (focusout)=\"focusOut()\">\r\n <div\r\n class=\"select\"\r\n [ngClass]=\"{\r\n 'select-clicked': isOpenMenu,\r\n 'highlight-background':\r\n canHighlightBackground &&\r\n (selectedItem | json) === ({} | json) &&\r\n !(inputFormControl.touched && inputFormControl.errors),\r\n selectError: inputFormControl.touched && inputFormControl.errors ,\r\n 'disable-selector': disabled,\r\n\r\n }\"\r\n (click)=\"openMenuClick()\"\r\n >\r\n <span\r\n class=\"placeholder-top\"\r\n *ngIf=\"(selectedItem | json) != ({} | json)\"\r\n >{{ label }}</span\r\n >\r\n <arrow-down-icon\r\n class=\"caret fill-secondary-text-color h-6\"\r\n [ngClass]=\"{ 'caret-rotate': isOpenMenu }\"\r\n ></arrow-down-icon>\r\n\r\n <span\r\n [ngClass]=\"[\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? 'placeholder'\r\n : 'selected'\r\n ]\"\r\n >{{\r\n label.length > 0 && (selectedItem | json) == ({} | json)\r\n ? label\r\n : selectedItem.title\r\n }}</span\r\n >\r\n </div>\r\n <ul class=\"menu\" [ngClass]=\"{ 'menu-open': isOpenMenu }\">\r\n <li\r\n *ngFor=\"let item of newItems\"\r\n [ngClass]=\"{ active: item == selectedItem }\"\r\n (click)=\"onItemSelect(item, true)\"\r\n >\r\n {{ item.title }}\r\n </li>\r\n </ul>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n inputFormControl.touched &&\r\n inputFormControl.errors?.['required']\"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n</div>\r\n", styles: [".dropdown{min-width:15em;position:relative;width:100%;min-width:120px}.dropdown .disable-selector{background-color:#f7f7f7!important;border:1px dashed #ced4da!important;cursor:no-drop!important}.dropdown .highlight-background{background-color:#dcf6ff!important}.dropdown .select{background:#fff;color:#304050;display:flex;height:42px;justify-content:space-between;flex-direction:row-reverse;align-items:center;border:1px solid #ced4da;border-radius:4px;padding:8px;cursor:pointer;transition:background .3s;font-size:12px;-webkit-user-select:none;user-select:none}.dropdown .select:hover{background:#fbfbfb}.dropdown .select .selected{padding-inline:12px;font-size:14px;color:#000000b3;-webkit-user-select:none;user-select:none}.dropdown .select .placeholder-top{position:absolute;right:13px;background:#fff;top:-8px;padding-inline:6px;font-size:11px;color:#888}.dropdown .select .caret{color:#595c5f;-webkit-user-select:none;user-select:none}.dropdown .select .caret-rotate{transform:rotate(180deg)}.dropdown .select .placeholder{color:#888;padding-inline:16px}.dropdown .select-clicked{border:1px solid rgba(19,92,175,.397)}.dropdown .menu{list-style:none;padding-inline:0px;background:#fff;border:1px #e3e8f1 solid;box-shadow:0 .5em 1em #0003;border-radius:.5em;color:#595c5f;position:absolute;top:40px;left:50%;width:100%;transform:translate(-50%);opacity:0;display:none;transition:0,2s;z-index:10;max-height:200px;overflow:auto}.dropdown .menu li{padding:.7em .5em;margin:.3em 0;margin-inline:4px;border-radius:.5em;font-size:14px;text-align:start;cursor:pointer}.dropdown .menu li:hover{background:#f6f6f6}.dropdown .menu .active{background:#ced4da}.dropdown .menu-open{display:block;opacity:1}.dropdown .label-error{color:red;font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.dropdown .selectError{border:1px solid #fe5f5f!important}\n"] }]
823
804
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { titleKey: [{
824
- type: Input,
825
- args: [{ required: true }]
805
+ type: Input
826
806
  }], valueKey: [{
827
- type: Input,
828
- args: [{ required: true }]
807
+ type: Input
808
+ }], canHighlightBackground: [{
809
+ type: Input
829
810
  }], items: [{
830
- type: Input,
831
- args: [{ required: true }]
811
+ type: Input
832
812
  }], defaultValue: [{
833
- type: Input,
834
- args: [{ required: false }]
813
+ type: Input
835
814
  }], label: [{
836
815
  type: Input
837
816
  }], disabled: [{
@@ -2115,12 +2094,26 @@ class CoreTimePickerComponent {
2115
2094
  this.onBlurEmit = new EventEmitter();
2116
2095
  this.placeholder = '';
2117
2096
  this.canHighlightBackground = false;
2097
+ this.setCurrentTime = false;
2118
2098
  this.inputFormControl = new FormControl('', []);
2119
2099
  this.selectedTime = '';
2120
2100
  this.maxLength = 2000;
2121
2101
  }
2122
2102
  ngOnInit() {
2123
2103
  this.inputFormControl.addValidators(Validators.minLength(5));
2104
+ if (this.setCurrentTime) {
2105
+ var currentTime = new Date();
2106
+ this.selectedTime =
2107
+ String(currentTime.getHours().toString().length > 1
2108
+ ? currentTime.getHours().toString()
2109
+ : '0' + currentTime.getHours().toString()) +
2110
+ ':' +
2111
+ String(currentTime.getMinutes().toString().length > 1
2112
+ ? currentTime.getMinutes().toString()
2113
+ : '0' + currentTime.getMinutes().toString());
2114
+ this.inputFormControl.setValue(this.selectedTime);
2115
+ this.onSelect.emit(this.selectedTime);
2116
+ }
2124
2117
  }
2125
2118
  showSelectTimeModal() {
2126
2119
  const modal = this.niraModalService.open(TimePickerModalComponent, {
@@ -2152,7 +2145,6 @@ class CoreTimePickerComponent {
2152
2145
  .toString()
2153
2146
  .replace(/\B(?=(\d{2})+(?!\d))/g, ':');
2154
2147
  console.log(formatValue);
2155
- console.log(this.inputFormControl);
2156
2148
  this.inputFormControl.setValue(formatValue);
2157
2149
  }
2158
2150
  if (!this.inputFormControl.errors) {
@@ -2180,11 +2172,11 @@ class CoreTimePickerComponent {
2180
2172
  }
2181
2173
  }
2182
2174
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CoreTimePickerComponent, deps: [{ token: i1$1.NiraModalService }], target: i0.ɵɵFactoryTarget.Component }); }
2183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CoreTimePickerComponent, selector: "core-time-picker", inputs: { placeholder: "placeholder", canHighlightBackground: "canHighlightBackground", inputFormControl: "inputFormControl", defaultValue: "defaultValue", maxLength: "maxLength" }, outputs: { onSelect: "onSelect", onBlurEmit: "onBlurEmit" }, ngImport: i0, template: "<div>\r\n <div\r\n class=\"container-input\"\r\n [ngClass]=\"{\r\n error:\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n }\"\r\n >\r\n <time-icon\r\n (click)=\"showSelectTimeModal()\"\r\n class=\"absolute left-3 top-3 fill-secondary-text-color h-5\"\r\n ></time-icon>\r\n <input\r\n [type]=\"'text'\"\r\n class=\"a-input-style have-value\"\r\n (keyup)=\"change($event)\"\r\n [formControl]=\"inputFormControl\"\r\n (blur)=\"onBlur()\"\r\n (paste)=\"onPaste($event)\"\r\n (keypress)=\"onKeyPress()\"\r\n [ngClass]=\"{\r\n 'have-value': inputFormControl.value.toString().length > 0,\r\n 'highlight-background':\r\n canHighlightBackground &&\r\n inputFormControl.value.toString().length === 0 &&\r\n !(\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n ),\r\n }\"\r\n />\r\n\r\n <label *ngIf=\"placeholder.length > 0\">{{ placeholder }} </label>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['required']\r\n \"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n ><span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['minlength']\r\n \"\r\n >\u0641\u0648\u0631\u0645\u062A \u0633\u0627\u0639\u062A \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container{position:relative}input{border:1px solid var(--default-time-picker-border-color);border-radius:.25rem}.highlight-background{background-color:var(--default-time-picker-highlight-background-color)!important}.icon-style{position:absolute;right:16px;top:16px;cursor:pointer;font-size:16px}.icon-style-email{position:absolute;right:16px;top:16px}.a-input-style{height:42px;width:100%;padding:16px;outline:none;caret-color:#020202b3;background-color:var(--default-time-picker-background-color);color:#000000b3;box-sizing:border-box}.a-input-style:focus{background-color:var(--default-time-picker-background-focus-color);border-radius:3px;border:1px solid var(--default-time-picker-border-focus-color)}.a-input-style::placeholder{height:15px;font-style:normal;font-weight:400;font-size:12px;line-height:15px;letter-spacing:-.03em;color:var(--default-time-picker-placeholder-color)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-text-fill-color:rgba(255,255,255,0)}input:-webkit-autofill.have-value,input:-webkit-autofill:hover.have-value,input:-webkit-autofill:focus.have-value{-webkit-text-fill-color:#181818!important}input[type=time]::-webkit-calendar-picker-indicator{display:none;background:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.label-error{color:red;font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.label-number{color:#6a6a6a}.error input{border:1px solid #fe5f5f}.container-input{background:#fff;position:relative}.container-input .disable-input{background-color:#f7f7f7;border:1px dashed #ced4da;pointer-events:none}.container-input label{position:absolute;right:20px;top:12px;color:gray;font-size:12px;padding:0 8px;border-radius:15px;pointer-events:none;transition:.2s}.container-input input:focus+label,.container-input input.have-value+label{top:-10px;font-size:10px;z-index:3}.container-input input:focus+label:after,.container-input input.have-value+label:after{content:\"\";display:block;background:#fff;position:absolute;width:100%;height:1px;top:10px;right:0;transition:.3s;z-index:-1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TimeIconComponent, selector: "time-icon" }] }); }
2175
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CoreTimePickerComponent, selector: "core-time-picker", inputs: { placeholder: "placeholder", canHighlightBackground: "canHighlightBackground", setCurrentTime: "setCurrentTime", inputFormControl: "inputFormControl", defaultValue: "defaultValue", maxLength: "maxLength" }, outputs: { onSelect: "onSelect", onBlurEmit: "onBlurEmit" }, ngImport: i0, template: "<div>\r\n <div\r\n class=\"container-input\"\r\n [ngClass]=\"{\r\n error:\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n }\"\r\n >\r\n <time-icon\r\n (click)=\"showSelectTimeModal()\"\r\n class=\"absolute left-3 top-3 fill-secondary-text-color h-5\"\r\n ></time-icon>\r\n <input\r\n [type]=\"'text'\"\r\n class=\"a-input-style have-value\"\r\n (keyup)=\"change($event)\"\r\n [formControl]=\"inputFormControl\"\r\n (blur)=\"onBlur()\"\r\n (paste)=\"onPaste($event)\"\r\n (keypress)=\"onKeyPress()\"\r\n [ngClass]=\"{\r\n 'have-value': inputFormControl.value.toString().length > 0,\r\n 'highlight-background':\r\n canHighlightBackground &&\r\n inputFormControl.value.toString().length === 0 &&\r\n !(\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n ),\r\n }\"\r\n />\r\n\r\n <label *ngIf=\"placeholder.length > 0\">{{ placeholder }} </label>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['required']\r\n \"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n ><span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['minlength']\r\n \"\r\n >\u0641\u0631\u0645\u062A \u0633\u0627\u0639\u062A \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container{position:relative}input:focus{border:2px solid blue}input{border:1px solid #ced4da;border-radius:.25rem}.highlight-background{background-color:#dcf6ff!important}.icon-style{position:absolute;right:16px;top:16px;cursor:pointer;font-size:16px}.icon-style-email{position:absolute;right:16px;top:16px}.a-input-style{height:42px;width:100%;padding:16px;outline:none;caret-color:#020202b3;background-color:#f2f4f726;color:#000000b3;box-sizing:border-box}.a-input-style:focus{background-color:#f2f4f70d;border-radius:3px;border:1px solid rgba(19,92,175,.397)}.a-input-style::placeholder{height:15px;font-style:normal;font-weight:400;font-size:12px;line-height:15px;letter-spacing:-.03em;color:#c2c2c2b3}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-text-fill-color:rgba(255,255,255,0)}input:-webkit-autofill.have-value,input:-webkit-autofill:hover.have-value,input:-webkit-autofill:focus.have-value{-webkit-text-fill-color:#181818!important}input[type=time]::-webkit-calendar-picker-indicator{display:none;background:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.label-error{color:red;font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.label-number{color:#6a6a6a}.error input{border:1px solid #fe5f5f}.container-input{background:#fff;position:relative}.container-input .disable-input{background-color:#f7f7f7;border:1px dashed #ced4da;pointer-events:none}.container-input label{position:absolute;right:20px;top:12px;color:gray;font-size:12px;padding:0 8px;border-radius:15px;pointer-events:none;transition:.2s}.container-input input:focus+label,.container-input input.have-value+label{top:-10px;font-size:10px;z-index:3}.container-input input:focus+label:after,.container-input input.have-value+label:after{content:\"\";display:block;background:#fff;position:absolute;width:100%;height:1px;top:10px;right:0;transition:.3s;z-index:-1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TimeIconComponent, selector: "time-icon" }] }); }
2184
2176
  }
2185
2177
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CoreTimePickerComponent, decorators: [{
2186
2178
  type: Component,
2187
- args: [{ selector: 'core-time-picker', template: "<div>\r\n <div\r\n class=\"container-input\"\r\n [ngClass]=\"{\r\n error:\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n }\"\r\n >\r\n <time-icon\r\n (click)=\"showSelectTimeModal()\"\r\n class=\"absolute left-3 top-3 fill-secondary-text-color h-5\"\r\n ></time-icon>\r\n <input\r\n [type]=\"'text'\"\r\n class=\"a-input-style have-value\"\r\n (keyup)=\"change($event)\"\r\n [formControl]=\"inputFormControl\"\r\n (blur)=\"onBlur()\"\r\n (paste)=\"onPaste($event)\"\r\n (keypress)=\"onKeyPress()\"\r\n [ngClass]=\"{\r\n 'have-value': inputFormControl.value.toString().length > 0,\r\n 'highlight-background':\r\n canHighlightBackground &&\r\n inputFormControl.value.toString().length === 0 &&\r\n !(\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n ),\r\n }\"\r\n />\r\n\r\n <label *ngIf=\"placeholder.length > 0\">{{ placeholder }} </label>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['required']\r\n \"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n ><span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['minlength']\r\n \"\r\n >\u0641\u0648\u0631\u0645\u062A \u0633\u0627\u0639\u062A \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container{position:relative}input{border:1px solid var(--default-time-picker-border-color);border-radius:.25rem}.highlight-background{background-color:var(--default-time-picker-highlight-background-color)!important}.icon-style{position:absolute;right:16px;top:16px;cursor:pointer;font-size:16px}.icon-style-email{position:absolute;right:16px;top:16px}.a-input-style{height:42px;width:100%;padding:16px;outline:none;caret-color:#020202b3;background-color:var(--default-time-picker-background-color);color:#000000b3;box-sizing:border-box}.a-input-style:focus{background-color:var(--default-time-picker-background-focus-color);border-radius:3px;border:1px solid var(--default-time-picker-border-focus-color)}.a-input-style::placeholder{height:15px;font-style:normal;font-weight:400;font-size:12px;line-height:15px;letter-spacing:-.03em;color:var(--default-time-picker-placeholder-color)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-text-fill-color:rgba(255,255,255,0)}input:-webkit-autofill.have-value,input:-webkit-autofill:hover.have-value,input:-webkit-autofill:focus.have-value{-webkit-text-fill-color:#181818!important}input[type=time]::-webkit-calendar-picker-indicator{display:none;background:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.label-error{color:red;font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.label-number{color:#6a6a6a}.error input{border:1px solid #fe5f5f}.container-input{background:#fff;position:relative}.container-input .disable-input{background-color:#f7f7f7;border:1px dashed #ced4da;pointer-events:none}.container-input label{position:absolute;right:20px;top:12px;color:gray;font-size:12px;padding:0 8px;border-radius:15px;pointer-events:none;transition:.2s}.container-input input:focus+label,.container-input input.have-value+label{top:-10px;font-size:10px;z-index:3}.container-input input:focus+label:after,.container-input input.have-value+label:after{content:\"\";display:block;background:#fff;position:absolute;width:100%;height:1px;top:10px;right:0;transition:.3s;z-index:-1}\n"] }]
2179
+ args: [{ selector: 'core-time-picker', template: "<div>\r\n <div\r\n class=\"container-input\"\r\n [ngClass]=\"{\r\n error:\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n }\"\r\n >\r\n <time-icon\r\n (click)=\"showSelectTimeModal()\"\r\n class=\"absolute left-3 top-3 fill-secondary-text-color h-5\"\r\n ></time-icon>\r\n <input\r\n [type]=\"'text'\"\r\n class=\"a-input-style have-value\"\r\n (keyup)=\"change($event)\"\r\n [formControl]=\"inputFormControl\"\r\n (blur)=\"onBlur()\"\r\n (paste)=\"onPaste($event)\"\r\n (keypress)=\"onKeyPress()\"\r\n [ngClass]=\"{\r\n 'have-value': inputFormControl.value.toString().length > 0,\r\n 'highlight-background':\r\n canHighlightBackground &&\r\n inputFormControl.value.toString().length === 0 &&\r\n !(\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors\r\n ),\r\n }\"\r\n />\r\n\r\n <label *ngIf=\"placeholder.length > 0\">{{ placeholder }} </label>\r\n <div class=\"label-error overflow-hidden\">\r\n <span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['required']\r\n \"\r\n >\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u062E\u0627\u0644\u06CC \u0627\u0633\u062A</span\r\n ><span\r\n *ngIf=\"\r\n (inputFormControl.touched || inputFormControl.dirty) &&\r\n inputFormControl.errors?.['minlength']\r\n \"\r\n >\u0641\u0631\u0645\u062A \u0633\u0627\u0639\u062A \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A</span\r\n >\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".container{position:relative}input:focus{border:2px solid blue}input{border:1px solid #ced4da;border-radius:.25rem}.highlight-background{background-color:#dcf6ff!important}.icon-style{position:absolute;right:16px;top:16px;cursor:pointer;font-size:16px}.icon-style-email{position:absolute;right:16px;top:16px}.a-input-style{height:42px;width:100%;padding:16px;outline:none;caret-color:#020202b3;background-color:#f2f4f726;color:#000000b3;box-sizing:border-box}.a-input-style:focus{background-color:#f2f4f70d;border-radius:3px;border:1px solid rgba(19,92,175,.397)}.a-input-style::placeholder{height:15px;font-style:normal;font-weight:400;font-size:12px;line-height:15px;letter-spacing:-.03em;color:#c2c2c2b3}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-text-fill-color:rgba(255,255,255,0)}input:-webkit-autofill.have-value,input:-webkit-autofill:hover.have-value,input:-webkit-autofill:focus.have-value{-webkit-text-fill-color:#181818!important}input[type=time]::-webkit-calendar-picker-indicator{display:none;background:none}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.label-error{color:red;font-size:13px;margin-block-start:4px;min-height:21px;width:100%;display:inline-block!important;text-align:start}.label-number{color:#6a6a6a}.error input{border:1px solid #fe5f5f}.container-input{background:#fff;position:relative}.container-input .disable-input{background-color:#f7f7f7;border:1px dashed #ced4da;pointer-events:none}.container-input label{position:absolute;right:20px;top:12px;color:gray;font-size:12px;padding:0 8px;border-radius:15px;pointer-events:none;transition:.2s}.container-input input:focus+label,.container-input input.have-value+label{top:-10px;font-size:10px;z-index:3}.container-input input:focus+label:after,.container-input input.have-value+label:after{content:\"\";display:block;background:#fff;position:absolute;width:100%;height:1px;top:10px;right:0;transition:.3s;z-index:-1}\n"] }]
2188
2180
  }], ctorParameters: function () { return [{ type: i1$1.NiraModalService }]; }, propDecorators: { onSelect: [{
2189
2181
  type: Output
2190
2182
  }], onBlurEmit: [{
@@ -2193,6 +2185,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2193
2185
  type: Input
2194
2186
  }], canHighlightBackground: [{
2195
2187
  type: Input
2188
+ }], setCurrentTime: [{
2189
+ type: Input
2196
2190
  }], inputFormControl: [{
2197
2191
  type: Input
2198
2192
  }], defaultValue: [{