@natec/mef-dev-ui-kit 16.2.0 → 16.2.2

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.
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ViewEncapsulation, Input, EventEmitter, Host, ContentChild, HostBinding, Output, NgModule, Injectable, ViewChild, Pipe, forwardRef, HostListener, Directive, Optional, ContentChildren, TemplateRef } from '@angular/core';
2
+ import { Component, ViewEncapsulation, Input, EventEmitter, Host, ContentChild, HostBinding, Output, NgModule, Injectable, Pipe, forwardRef, ViewChild, HostListener, Directive, Optional, ContentChildren, TemplateRef } from '@angular/core';
3
3
  import { trigger, state, style, transition, animate } from '@angular/animations';
4
4
  import * as i1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
5
+ import { CommonModule, DatePipe } from '@angular/common';
6
6
  import { Subject, of, fromEvent, merge } from 'rxjs';
7
- import * as i1$1 from '@angular/router';
8
- import * as i3 from '@angular/cdk/overlay';
9
- import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
10
7
  import * as i2 from '@angular/forms';
11
8
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
12
9
  import { TAB, DOWN_ARROW, ENTER } from '@angular/cdk/keycodes';
10
+ import * as i3 from '@angular/cdk/overlay';
11
+ import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
12
+ import * as i1$1 from '@angular/router';
13
13
  import { auditTime, startWith, map } from 'rxjs/operators';
14
14
  import * as i1$2 from '@angular/cdk/bidi';
15
15
 
@@ -577,1762 +577,2362 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
577
577
  }]
578
578
  }] });
579
579
 
580
- /**
581
- * Component representing a progress bar.
582
- *
583
- * Example of usage:
584
- *
585
- * ```
586
- * <mefdev-progress type="linear" color="blue" [thick]="true"></mefdev-progress>
587
- * <mefdev-progress type="circle" color="red" [indeterminate]="true"></mefdev-progress>
588
- * ```
589
- */
590
- class MefDevProgressComponent {
591
- _value;
592
- _value2;
593
- /**
594
- * The type of progress bar.
595
- * Possible values: "linear" | "circle".
596
- * Default value: "linear".
597
- */
598
- type;
599
- /**
600
- * The color of the progress bar.
601
- * Possible values: any valid CSS color value.
602
- * Default value: none.
603
- */
604
- color;
605
- /**
606
- * Determines whether the progress bar is thick.
607
- * Default value: false.
608
- */
609
- thick;
610
- /**
611
- * Determines whether the progress bar is indeterminate.
612
- * Default value: false.
613
- */
614
- indeterminate;
615
- /**
616
- * The value of the progress bar.
617
- * For the "circle" type, it should be a number between 0 and 100.
618
- */
619
- set value(value) {
620
- if (this.type == "circle") {
621
- this._value = (value / 100) * 360;
622
- if (this.value >= 50) {
623
- this._value2 = true;
580
+ function toBoolean(value) {
581
+ return value === '' || (value && value !== 'false');
582
+ }
583
+
584
+ /* tslint:disable:no-any */
585
+ class OptionPipe {
586
+ // TODO: enable type checking for this method
587
+ transform(options, value) {
588
+ if (value.searchText) {
589
+ let _options = options.filter(option => option.Label &&
590
+ option.Label.toLowerCase().indexOf(value.searchText.toLowerCase()) !==
591
+ -1);
592
+ if (value.tags) {
593
+ _options = options.filter(option => option.Label &&
594
+ option.Label.toLowerCase() === value.searchText.toLowerCase());
595
+ }
596
+ if (_options.length) {
597
+ return _options;
598
+ }
599
+ else {
600
+ return [
601
+ {
602
+ Value: value.value,
603
+ _value: value.value,
604
+ Disabled: value.disabled,
605
+ _disabled: value.disabled,
606
+ Label: value.notFoundContent,
607
+ _label: value.notFoundContent
608
+ }
609
+ ];
624
610
  }
625
611
  }
626
- else
627
- this._value = value;
628
- }
629
- get value() {
630
- return this._value;
631
- }
632
- /**
633
- * Additional value property.
634
- */
635
- get value2() {
636
- return this._value2;
612
+ else {
613
+ return options;
614
+ }
637
615
  }
638
- constructor() { }
639
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
640
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefDevProgressComponent, selector: "mefdev-progress", inputs: { type: "type", color: "color", thick: "thick", indeterminate: "indeterminate", value: "value" }, ngImport: i0, template: "<div *ngIf=\"type === 'bar'; else circleBlock\">\r\n <div *ngIf=\"indeterminate; else determineBarBlock\">\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar-{{ color }}\" [class.progress-bar-indeterminate]=\"indeterminate\"></div>\r\n </div>\r\n </div>\r\n <ng-template #determineBarBlock>\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar progress-bar-{{ color }}\" [ngStyle]=\"{ width: value + '%' }\"></div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n<ng-template #circleBlock>\r\n <div class=\"progress-circle-{{ color }}\" [class.progress-circle-indeterminate]=\"indeterminate\"\r\n [class.progress-circle]=\"!indeterminate\" [class.progress-circle-thick]=\"thick\">\r\n <div *ngIf=\"indeterminate; else determineBlock\"></div>\r\n <ng-template #determineBlock>\r\n <div class=\"pie\" [ngStyle]=\"_value2 && { clip: 'rect(auto, auto, auto, auto)' }\">\r\n <div class=\"left-side half-circle\" [ngStyle]=\"_value2 && { transform: 'rotate(' + value + 'deg)' }\"></div>\r\n <div class=\"right-side half-circle\" [ngStyle]=\"{\r\n transform:\r\n _value2 === true ? 'rotate(180deg)' : 'rotate(' + value + 'deg)'\r\n }\"></div>\r\n </div>\r\n <div class=\"shadow\"></div>\r\n </ng-template>\r\n </div>\r\n</ng-template>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
616
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: OptionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
617
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: OptionPipe, name: "OptionPipe" });
641
618
  }
642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevProgressComponent, decorators: [{
643
- type: Component,
644
- args: [{ selector: "mefdev-progress", template: "<div *ngIf=\"type === 'bar'; else circleBlock\">\r\n <div *ngIf=\"indeterminate; else determineBarBlock\">\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar-{{ color }}\" [class.progress-bar-indeterminate]=\"indeterminate\"></div>\r\n </div>\r\n </div>\r\n <ng-template #determineBarBlock>\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar progress-bar-{{ color }}\" [ngStyle]=\"{ width: value + '%' }\"></div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n<ng-template #circleBlock>\r\n <div class=\"progress-circle-{{ color }}\" [class.progress-circle-indeterminate]=\"indeterminate\"\r\n [class.progress-circle]=\"!indeterminate\" [class.progress-circle-thick]=\"thick\">\r\n <div *ngIf=\"indeterminate; else determineBlock\"></div>\r\n <ng-template #determineBlock>\r\n <div class=\"pie\" [ngStyle]=\"_value2 && { clip: 'rect(auto, auto, auto, auto)' }\">\r\n <div class=\"left-side half-circle\" [ngStyle]=\"_value2 && { transform: 'rotate(' + value + 'deg)' }\"></div>\r\n <div class=\"right-side half-circle\" [ngStyle]=\"{\r\n transform:\r\n _value2 === true ? 'rotate(180deg)' : 'rotate(' + value + 'deg)'\r\n }\"></div>\r\n </div>\r\n <div class=\"shadow\"></div>\r\n </ng-template>\r\n </div>\r\n</ng-template>" }]
645
- }], ctorParameters: function () { return []; }, propDecorators: { type: [{
646
- type: Input
647
- }], color: [{
648
- type: Input
649
- }], thick: [{
650
- type: Input
651
- }], indeterminate: [{
652
- type: Input
653
- }], value: [{
654
- type: Input
655
- }] } });
619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: OptionPipe, decorators: [{
620
+ type: Pipe,
621
+ args: [{ name: "OptionPipe" }]
622
+ }] });
656
623
 
657
624
  /**
658
- * Component representing a custom card.
659
- * It provides various styling and animation options for the card layout.
660
- *
661
- * Example usage:
662
- * ```
663
- * <pgcard [Title]="'Card Title'" [Type]="'default'" [MinimalHeader]="false" [ProgressType]="'circle'">
664
- * Card content goes here...
665
- * </pgcard>
666
- * ```
625
+ * complex but work well
626
+ * TODO: rebuild latter
667
627
  */
668
- class pgCard {
669
- /**
670
- * Indicates whether the card is collapsed or not.
671
- * Default: false
672
- */
673
- _isCollapsed = false;
674
- /**
675
- * Indicates whether the card is maximized or not.
676
- * Default: false
677
- */
678
- _isMaximixed = false;
679
- /**
680
- * Indicates whether the card is in loading state or not.
681
- * Default: false
682
- */
683
- _isLoading = false;
684
- /**
685
- * Indicates whether the card has a minimal header or not.
686
- * Default: false
687
- */
688
- _minimalHeader = false;
689
- /**
690
- * The message to be displayed in the card.
691
- */
692
- _message = "";
693
- /**
694
- * The type of message to be displayed in the card (e.g., success, danger, warning).
695
- * Default: "danger"
696
- */
697
- _messageType = "danger";
698
- /**
699
- * Indicates whether the message in the card is visible or not.
700
- * Default: false
701
- */
702
- _messageVisible = false;
703
- /**
704
- * The type of progress indicator to be displayed in the card (e.g., circle, bar, none).
705
- * Default: "circle"
706
- */
707
- _progressType = "circle";
708
- /**
709
- * The color of the progress indicator in the card.
710
- */
711
- _progressColor = "";
712
- /**
713
- * Indicates whether the tools (e.g., refresh, close, maximize) are shown in the card header or not.
714
- * Default: true
715
- */
716
- _showTools = true;
717
- _close_card = false;
718
- _refresh = false;
719
- _refreshColor = "light";
720
- /**
721
- * Indicates whether the close button in the card is visible or not.
722
- * Default: true
723
- */
724
- _close = true;
725
- /**
726
- * Indicates whether the toggle button in the card is visible or not.
727
- * Default: true
728
- */
729
- _toggle = true;
730
- /**
731
- * Indicates whether the maximize button in the card is visible or not.
732
- * Default: true
733
- */
734
- _maximize = true;
735
- /**
736
- * The timeout value in milliseconds for the loading state of the card.
737
- * If set to 0, the loading state will not automatically turn off.
738
- * Default: 0
739
- */
740
- _timeout = 0;
741
- /**
742
- * The title text to be displayed in the card header.
743
- */
744
- _titleText = "";
745
- /**
746
- * The border style of the card.
747
- */
748
- _card_border_style = "";
749
- /**
750
- * The type of the card (e.g., default, bordered, minimal).
751
- * Default: "default"
752
- */
753
- _type = "default";
754
- /**
755
- * Additional CSS class(es) to be added to the card header.
756
- */
757
- _extraHeaderClass = "";
758
- /**
759
- * Additional CSS class(es) to be added to the card body.
760
- */
761
- _extraBodyClass = "";
762
- /**
763
- * Additional CSS class(es) to be added to the card.
764
- */
765
- _additionalClasses = "";
766
- /**
767
- * ViewChild reference to the host content element.
768
- */
769
- _hostContent;
770
- /**
771
- * ViewChild reference to the minimal circle loading element.
772
- */
773
- minimalCircleLoading;
774
- /**
775
- * ViewChild reference to the minimal circle loading trigger element.
776
- */
777
- minimalCircleLoadingTrigger;
778
- /**
779
- * ContentChild reference to the CardTitle template.
780
- */
781
- CardTitle;
782
- /**
783
- * ContentChild reference to the CardExtraControls template.
784
- */
785
- CardExtraControls;
786
- // Input properties
787
- /**
788
- * The title text to be displayed in the card header.
789
- */
790
- set Title(value) {
791
- this._titleText = value;
792
- }
793
- get Title() {
794
- return this._titleText;
795
- }
796
- /**
797
- * The type of the card (e.g., default, bordered, minimal).
798
- * Default: "default"
799
- */
800
- set Type(value) {
801
- this._type = value;
628
+ /**
629
+ * Example of usage:
630
+ * <example-url>https://mef.dev/ui_kit_demo/view/select</example-url>
631
+ */
632
+ class MefDevSelectComponent {
633
+ _elementRef;
634
+ _renderer;
635
+ cDRef;
636
+ _allowClear = false;
637
+ _disabled = false;
638
+ _isTags = false;
639
+ _isMultiple = false;
640
+ _keepUnListOptions = false;
641
+ _showSearch = false;
642
+ _el;
643
+ _isOpen = false;
644
+ _prefixCls = "pg-select";
645
+ _classList = [];
646
+ _dropDownClassMap;
647
+ _dropDownPrefixCls = `${this._prefixCls}-dropdown`;
648
+ _selectionClassMap;
649
+ _selectionPrefixCls = `${this._prefixCls}-selection`;
650
+ _size;
651
+ _value;
652
+ _placeholder = "placeholder";
653
+ _notFoundContent = "No Content";
654
+ _searchText = "";
655
+ _triggerWidth = 0;
656
+ _selectedOption;
657
+ _operatingMultipleOption;
658
+ _selectedOptions = new Set();
659
+ _options = [];
660
+ _cacheOptions = [];
661
+ _filterOptions = [];
662
+ _tagsOptions = [];
663
+ _activeFilterOption;
664
+ _isMultiInit = false;
665
+ _dropDownPosition = "bottom";
666
+ _composing = false;
667
+ _mode;
668
+ // ngModel Access
669
+ onChange = () => null;
670
+ onTouched = () => null;
671
+ searchInputElementRef;
672
+ trigger;
673
+ dropdownUl;
674
+ SearchChange = new EventEmitter();
675
+ change = new EventEmitter();
676
+ OpenChange = new EventEmitter();
677
+ ScrollToBottom = new EventEmitter();
678
+ Filter = true;
679
+ MaxMultiple = Infinity;
680
+ FirstDefault = false;
681
+ _cdkOverlay;
682
+ set AllowClear(value) {
683
+ this._allowClear = toBoolean(value);
802
684
  }
803
- /**
804
- * Indicates whether the card has a minimal header or not.
805
- * Default: false
806
- */
807
- set MinimalHeader(value) {
808
- this._minimalHeader = value;
685
+ get AllowClear() {
686
+ return this._allowClear;
809
687
  }
810
- /**
811
- * The type of progress indicator to be displayed in the card (e.g., circle, bar, none).
812
- * Default: "circle"
813
- */
814
- set ProgressType(value) {
815
- this._progressType = value;
688
+ set KeepUnListOptions(value) {
689
+ this._keepUnListOptions = toBoolean(value);
816
690
  }
817
- /**
818
- * The color of the progress indicator in the card.
819
- */
820
- set ProgressColor(value) {
821
- this._progressColor = value;
691
+ get KeepUnListOptions() {
692
+ return this._keepUnListOptions;
822
693
  }
823
- /**
824
- * Indicates whether the card should have a refresh button or not.
825
- */
826
- set Refresh(value) {
827
- this._refresh = value;
694
+ set Mode(value) {
695
+ this._mode = value;
696
+ if (this._mode === "multiple") {
697
+ this.Multiple = true;
698
+ }
699
+ else if (this._mode === "tags") {
700
+ this.Tags = true;
701
+ }
702
+ else if (this._mode === "combobox") {
703
+ this.ShowSearch = true;
704
+ }
828
705
  }
829
- /**
830
- * The color of the refresh button in the card (e.g., light, dark).
831
- * Default: "light"
832
- */
833
- set RefreshColor(value) {
834
- this._refreshColor = value;
706
+ set Multiple(value) {
707
+ this._isMultiple = toBoolean(value);
708
+ if (this._isMultiple) {
709
+ this.ShowSearch = true;
710
+ }
835
711
  }
836
- /**
837
- * Indicates whether the card should have a maximize button or not.
838
- */
839
- set Maximize(value) {
840
- this._maximize = value;
712
+ get Multiple() {
713
+ return this._isMultiple;
841
714
  }
842
- /**
843
- * Indicates whether the card should have a close button or not.
844
- */
845
- set Close(value) {
846
- this._close = value;
715
+ set PlaceHolder(value) {
716
+ this._placeholder = value;
847
717
  }
848
- /**
849
- * Indicates whether the card should have a toggle button or not.
850
- */
851
- set Toggle(value) {
852
- this._toggle = value;
718
+ get PlaceHolder() {
719
+ return this._placeholder;
853
720
  }
854
- /**
855
- * Additional CSS class(es) to be added to the card header.
856
- */
857
- set HeaderClass(value) {
858
- this._extraHeaderClass = value;
721
+ set NotFoundContent(value) {
722
+ this._notFoundContent = value;
859
723
  }
860
- /**
861
- * Additional CSS class(es) to be added to the card body.
862
- */
863
- set BodyClass(value) {
864
- this._extraBodyClass = value;
724
+ get NotFoundContent() {
725
+ return this._notFoundContent;
865
726
  }
866
- /**
867
- * Additional CSS class(es) to be added to the card.
868
- */
869
- set AdditionalClasses(value) {
870
- this._additionalClasses = value;
727
+ set Size(value) {
728
+ // @ts-ignore
729
+ this._size = { large: "lg", small: "sm" }[value];
730
+ this.setClassMap();
871
731
  }
872
- /**
873
- * Indicates whether the tools (e.g., refresh, close, maximize) are shown in the card header or not.
874
- */
875
- set Controls(value) {
876
- this._showTools = value;
732
+ get Size() {
733
+ return this._size;
877
734
  }
878
- /**
879
- * Indicates whether the message in the card is visible or not.
880
- */
881
- set ShowMessage(value) {
882
- this._messageVisible = value;
735
+ set ShowSearch(value) {
736
+ this._showSearch = toBoolean(value);
883
737
  }
884
- /**
885
- * The message text to be displayed in the card.
886
- */
887
- set Message(value) {
888
- this._message = value;
738
+ get ShowSearch() {
739
+ return this._showSearch;
889
740
  }
890
- /**
891
- * Indicates whether the loading indicator is shown in the card or not.
892
- */
893
- set Loading(value) {
894
- this._isLoading = value;
741
+ set Tags(value) {
742
+ const isTags = toBoolean(value);
743
+ this._isTags = isTags;
744
+ this.Multiple = isTags;
895
745
  }
896
- /**
897
- * The timeout duration for the loading indicator (in milliseconds).
898
- * If set to 0, the loading indicator will be displayed indefinitely until manually dismissed.
899
- * Default: 0
900
- */
901
- set TimeOut(value) {
902
- this._timeout = value;
746
+ get Tags() {
747
+ return this._isTags;
903
748
  }
904
- /**
905
- * The border style of the card.
906
- */
907
- set CardBorderStyle(value) {
908
- this._card_border_style = value;
749
+ set Disabled(value) {
750
+ this._disabled = toBoolean(value);
751
+ this.closeDropDown();
752
+ this.setClassMap();
909
753
  }
910
- // Output properties
911
- /**
912
- * Event emitted when the refresh button is clicked.
913
- */
914
- onRefresh = new EventEmitter();
915
- // Other methods and lifecycle hooks
916
- /**
917
- * Toggles the collapsed state of the card.
918
- */
919
- toggle() {
920
- this._isCollapsed = this._isCollapsed === true ? false : true;
754
+ get Disabled() {
755
+ return this._disabled;
921
756
  }
922
- /**
923
- * Maximizes or restores the card to its original position.
924
- */
925
- maximize() {
926
- let nativeElement = this._hostContent.nativeElement;
927
- if (this._isMaximixed) {
928
- this._isMaximixed = false;
929
- nativeElement.style.left = null;
930
- nativeElement.style.top = null;
757
+ set Open(value) {
758
+ const isOpen = toBoolean(value);
759
+ if (this._isOpen === isOpen) {
760
+ return;
931
761
  }
932
- else {
933
- this._isMaximixed = true;
934
- let pagecontainer = document.querySelector(".content") ?? new Element();
935
- console.log(pagecontainer);
936
- let rect = pagecontainer.getBoundingClientRect();
937
- let elementRect = nativeElement.getBoundingClientRect();
938
- let style = window.getComputedStyle(pagecontainer);
939
- nativeElement.style.left =
940
- parseFloat(style["marginLeft"]) +
941
- parseFloat(style["paddingLeft"]) +
942
- rect.left +
943
- "px";
944
- nativeElement.style.top =
945
- parseFloat(style["padding-top"]) + rect.top + "px";
762
+ if (isOpen) {
763
+ this.scrollToActive();
764
+ this._setTriggerWidth();
765
+ }
766
+ this._isOpen = isOpen;
767
+ this.OpenChange.emit(this._isOpen);
768
+ this.setClassMap();
769
+ if (this._isOpen) {
770
+ setTimeout(() => {
771
+ this.checkDropDownScroll();
772
+ });
946
773
  }
947
774
  }
948
- /**
949
- * Dismisses the message in the card.
950
- */
951
- alertDismiss() {
952
- this._messageVisible = false;
775
+ get Open() {
776
+ return this._isOpen;
953
777
  }
954
- /**
955
- * Triggers the refresh action of the card.
956
- */
957
- refresh() {
958
- if (!this._isLoading) {
959
- this._isLoading = true;
960
- this.onRefresh.emit();
778
+ /** new -option insert or new tags insert */
779
+ // @ts-ignore
780
+ addOption = option => {
781
+ this._options.push(option);
782
+ if (!this._isTags) {
783
+ if (option.Value) {
784
+ this.updateSelectedOption(this._value);
785
+ }
786
+ else {
787
+ this.forceUpdateSelectedOption(this._value);
788
+ }
961
789
  }
962
- if (this._timeout > 0) {
963
- setTimeout(() => {
964
- this._isLoading = false;
965
- }, this._timeout);
790
+ };
791
+ /** -option remove or tags remove */
792
+ removeOption(option) {
793
+ this._options.splice(this._options.indexOf(option), 1);
794
+ if (!this._isTags) {
795
+ this.forceUpdateSelectedOption(this._value);
966
796
  }
967
797
  }
968
- /**
969
- * Closes the card.
970
- */
971
- close() {
972
- this._close_card = true;
973
- }
974
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: pgCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
975
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: pgCard, selector: "pgcard", inputs: { Title: "Title", Type: "Type", MinimalHeader: "MinimalHeader", ProgressType: "ProgressType", ProgressColor: "ProgressColor", Refresh: "Refresh", RefreshColor: "RefreshColor", Maximize: "Maximize", Close: "Close", Toggle: "Toggle", HeaderClass: "HeaderClass", BodyClass: "BodyClass", AdditionalClasses: "AdditionalClasses", Controls: "Controls", ShowMessage: "ShowMessage", Message: "Message", Loading: "Loading", TimeOut: "TimeOut", CardBorderStyle: "CardBorderStyle" }, outputs: { onRefresh: "onRefresh" }, queries: [{ propertyName: "CardTitle", first: true, predicate: ["CardTitle"], descendants: true }, { propertyName: "CardExtraControls", first: true, predicate: ["CardExtraControls"], descendants: true }], viewQueries: [{ propertyName: "_hostContent", first: true, predicate: ["hostContent"], descendants: true }, { propertyName: "minimalCircleLoading", first: true, predicate: ["minimalCircleLoading"], descendants: true }, { propertyName: "minimalCircleLoadingTrigger", first: true, predicate: ["minimalCircleLoadingTrigger"], descendants: true }], ngImport: i0, template: "<div class=\"card card-{{ _type }} {{ _additionalClasses }}\" *ngIf=\"!_close_card\" [class.card-collapsed]=\"_isCollapsed\"\r\n [class.card-maximized]=\"_isMaximixed\" #hostContent class=\"col-sm-12 col-md-6 col-lg-4\"\r\n [ngStyle]=\"{'border': _card_border_style}\">\r\n <div class=\"card-header {{ _extraHeaderClass }}\">\r\n <div class=\"card-title\">\r\n <ng-template [ngTemplateOutlet]=\"CardTitle\"></ng-template>\r\n </div>\r\n <div class=\"card-controls\" *ngIf=\"_showTools == true\">\r\n <ng-template [ngTemplateOutlet]=\"CardExtraControls\"></ng-template>\r\n <ul *ngIf=\"_minimalHeader == false; else minimalBlock\">\r\n <li *ngIf=\"_toggle == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-collapse\" (click)=\"toggle()\"><i\r\n class=\"pg pg-arrow_maximize\" [class.pg-arrow_minimize]=\"_isCollapsed\"></i></a>\r\n </li>\r\n <li *ngIf=\"_refresh == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-refresh\" (click)=\"refresh()\"><i\r\n class=\"card-icon card-icon-refresh\"></i></a>\r\n </li>\r\n <li *ngIf=\"_maximize == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-maximize\" (click)=\"maximize()\"><i\r\n class=\"card-icon card-icon-maximize\"></i></a>\r\n </li>\r\n <li *ngIf=\"_close == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-close\" (click)=\"close()\"><i\r\n class=\"card-icon card-icon-close\"></i></a>\r\n </li>\r\n </ul>\r\n <!-- <ng-template #minimalBlock>\r\n <ul>\r\n <li>\r\n <a href=\"javascript:void(0);\" (click)=\"refresh()\" class=\"card-refresh minimal\"\r\n [class.refreshing]=\"_isLoading\">\r\n <i #minimalCircleLoadingTrigger class=\"card-icon card-icon-refresh-lg-{{\r\n _refreshColor == 'light' ? 'white' : 'master'\r\n }}\" [class.fade]=\"_isLoading\"></i>\r\n <i #minimalCircleLoading class=\"card-icon-refresh-lg-white-animated\"\r\n style=\"position: absolute;top:0;left:0\" [class.active]=\"_isLoading\"\r\n [class.hide]=\"_isLoading != true\"></i>\r\n </a>\r\n </li>\r\n </ul>\r\n </ng-template> -->\r\n </div>\r\n </div>\r\n <div class=\"card-body {{ _extraBodyClass }}\" [@collapseState]=\"_isCollapsed == true ? 'inactive' : 'active'\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"pgn-wrapper\" data-position=\"top\">\r\n <div class=\"pgn pgn-bar push-on-sidebar-open\">\r\n <div class=\"alert alert-danger\">\r\n <span>{{ _message }}</span><button class=\"close\" (click)=\"alertDismiss()\" type=\"button\">\r\n <span aria-hidden=\"true\">\u00D7</span><span class=\"sr-only\">{{ 'Close' }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\" display: block;\"></div>\r\n <div [@fadeAnimation]=\"_isLoading\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\"display: block;pointer-events: none\">\r\n <mefdev-progress *ngIf=\"_minimalHeader == false\" type=\"{{ _progressType }}\" color=\"{{ _progressColor }}\"\r\n indeterminate=\"true\" class=\"\"></mefdev-progress>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MefDevProgressComponent, selector: "mefdev-progress", inputs: ["type", "color", "thick", "indeterminate", "value"] }], animations: [
976
- trigger("collapseState", [
977
- state("inactive", style({
978
- opacity: "0",
979
- height: 0,
980
- paddingBottom: "0"
981
- })),
982
- state("active", style({
983
- opacity: "1",
984
- height: "*",
985
- paddingBottom: "*"
986
- })),
987
- transition("inactive => active", animate("125ms ease-in")),
988
- transition("active => inactive", animate("125ms ease-out"))
989
- ]),
990
- trigger("fadeAnimation", [
991
- state("false", style({
992
- opacity: "0",
993
- visibility: "hidden"
994
- })),
995
- state("true", style({
996
- opacity: "1",
997
- visibility: "visible"
998
- })),
999
- transition("false => true", animate("500ms ease-in")),
1000
- transition("true => false", animate("500ms ease-out"))
1001
- ])
1002
- ], encapsulation: i0.ViewEncapsulation.None });
1003
- }
1004
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: pgCard, decorators: [{
1005
- type: Component,
1006
- args: [{ selector: "pgcard", encapsulation: ViewEncapsulation.None, animations: [
1007
- trigger("collapseState", [
1008
- state("inactive", style({
1009
- opacity: "0",
1010
- height: 0,
1011
- paddingBottom: "0"
1012
- })),
1013
- state("active", style({
1014
- opacity: "1",
1015
- height: "*",
1016
- paddingBottom: "*"
1017
- })),
1018
- transition("inactive => active", animate("125ms ease-in")),
1019
- transition("active => inactive", animate("125ms ease-out"))
1020
- ]),
1021
- trigger("fadeAnimation", [
1022
- state("false", style({
1023
- opacity: "0",
1024
- visibility: "hidden"
1025
- })),
1026
- state("true", style({
1027
- opacity: "1",
1028
- visibility: "visible"
1029
- })),
1030
- transition("false => true", animate("500ms ease-in")),
1031
- transition("true => false", animate("500ms ease-out"))
1032
- ])
1033
- ], template: "<div class=\"card card-{{ _type }} {{ _additionalClasses }}\" *ngIf=\"!_close_card\" [class.card-collapsed]=\"_isCollapsed\"\r\n [class.card-maximized]=\"_isMaximixed\" #hostContent class=\"col-sm-12 col-md-6 col-lg-4\"\r\n [ngStyle]=\"{'border': _card_border_style}\">\r\n <div class=\"card-header {{ _extraHeaderClass }}\">\r\n <div class=\"card-title\">\r\n <ng-template [ngTemplateOutlet]=\"CardTitle\"></ng-template>\r\n </div>\r\n <div class=\"card-controls\" *ngIf=\"_showTools == true\">\r\n <ng-template [ngTemplateOutlet]=\"CardExtraControls\"></ng-template>\r\n <ul *ngIf=\"_minimalHeader == false; else minimalBlock\">\r\n <li *ngIf=\"_toggle == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-collapse\" (click)=\"toggle()\"><i\r\n class=\"pg pg-arrow_maximize\" [class.pg-arrow_minimize]=\"_isCollapsed\"></i></a>\r\n </li>\r\n <li *ngIf=\"_refresh == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-refresh\" (click)=\"refresh()\"><i\r\n class=\"card-icon card-icon-refresh\"></i></a>\r\n </li>\r\n <li *ngIf=\"_maximize == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-maximize\" (click)=\"maximize()\"><i\r\n class=\"card-icon card-icon-maximize\"></i></a>\r\n </li>\r\n <li *ngIf=\"_close == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-close\" (click)=\"close()\"><i\r\n class=\"card-icon card-icon-close\"></i></a>\r\n </li>\r\n </ul>\r\n <!-- <ng-template #minimalBlock>\r\n <ul>\r\n <li>\r\n <a href=\"javascript:void(0);\" (click)=\"refresh()\" class=\"card-refresh minimal\"\r\n [class.refreshing]=\"_isLoading\">\r\n <i #minimalCircleLoadingTrigger class=\"card-icon card-icon-refresh-lg-{{\r\n _refreshColor == 'light' ? 'white' : 'master'\r\n }}\" [class.fade]=\"_isLoading\"></i>\r\n <i #minimalCircleLoading class=\"card-icon-refresh-lg-white-animated\"\r\n style=\"position: absolute;top:0;left:0\" [class.active]=\"_isLoading\"\r\n [class.hide]=\"_isLoading != true\"></i>\r\n </a>\r\n </li>\r\n </ul>\r\n </ng-template> -->\r\n </div>\r\n </div>\r\n <div class=\"card-body {{ _extraBodyClass }}\" [@collapseState]=\"_isCollapsed == true ? 'inactive' : 'active'\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"pgn-wrapper\" data-position=\"top\">\r\n <div class=\"pgn pgn-bar push-on-sidebar-open\">\r\n <div class=\"alert alert-danger\">\r\n <span>{{ _message }}</span><button class=\"close\" (click)=\"alertDismiss()\" type=\"button\">\r\n <span aria-hidden=\"true\">\u00D7</span><span class=\"sr-only\">{{ 'Close' }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\" display: block;\"></div>\r\n <div [@fadeAnimation]=\"_isLoading\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\"display: block;pointer-events: none\">\r\n <mefdev-progress *ngIf=\"_minimalHeader == false\" type=\"{{ _progressType }}\" color=\"{{ _progressColor }}\"\r\n indeterminate=\"true\" class=\"\"></mefdev-progress>\r\n </div>\r\n</div>" }]
1034
- }], propDecorators: { _hostContent: [{
1035
- type: ViewChild,
1036
- args: ["hostContent"]
1037
- }], minimalCircleLoading: [{
1038
- type: ViewChild,
1039
- args: ["minimalCircleLoading"]
1040
- }], minimalCircleLoadingTrigger: [{
1041
- type: ViewChild,
1042
- args: ["minimalCircleLoadingTrigger"]
1043
- }], CardTitle: [{
1044
- type: ContentChild,
1045
- args: ["CardTitle"]
1046
- }], CardExtraControls: [{
1047
- type: ContentChild,
1048
- args: ["CardExtraControls"]
1049
- }], Title: [{
1050
- type: Input
1051
- }], Type: [{
1052
- type: Input
1053
- }], MinimalHeader: [{
1054
- type: Input
1055
- }], ProgressType: [{
1056
- type: Input
1057
- }], ProgressColor: [{
1058
- type: Input
1059
- }], Refresh: [{
1060
- type: Input
1061
- }], RefreshColor: [{
1062
- type: Input
1063
- }], Maximize: [{
1064
- type: Input
1065
- }], Close: [{
1066
- type: Input
1067
- }], Toggle: [{
1068
- type: Input
1069
- }], HeaderClass: [{
1070
- type: Input
1071
- }], BodyClass: [{
1072
- type: Input
1073
- }], AdditionalClasses: [{
1074
- type: Input
1075
- }], Controls: [{
1076
- type: Input
1077
- }], ShowMessage: [{
1078
- type: Input
1079
- }], Message: [{
1080
- type: Input
1081
- }], Loading: [{
1082
- type: Input
1083
- }], TimeOut: [{
1084
- type: Input
1085
- }], CardBorderStyle: [{
1086
- type: Input
1087
- }], onRefresh: [{
1088
- type: Output
1089
- }] } });
1090
-
1091
- /**
1092
- * Component for displaying a card with a title, image, and description.
1093
- *
1094
- * Example of usage:
1095
- *
1096
- * ```
1097
- * <mefdev-card>
1098
- * <ng-template #card_title>
1099
- * <!-- Content for the card title -->
1100
- * </ng-template>
1101
- * <ng-template #card_footer>
1102
- * <!-- Content for the card footer -->
1103
- * </ng-template>
1104
- * </mefdev-card>
1105
- * ```
1106
- *
1107
- * <example-url>https://mef.dev/ui_kit_demo/view/card</example-url>
1108
- */
1109
- class CardComponent {
1110
- router;
1111
- /**
1112
- * The template reference to the content of the card title.
1113
- *
1114
- * @usageNotes
1115
- * ```
1116
- * <mefdev-card>
1117
- * <ng-template #card_title>
1118
- * <!-- Content for the card title -->
1119
- * </ng-template>
1120
- * </mefdev-card>
1121
- * ```
1122
- */
1123
- card_title;
1124
- /**
1125
- * The template reference to the content of the card footer.
1126
- * @usageNotes
1127
- * ```
1128
- * <mefdev-card>
1129
- * <ng-template #card_footer>
1130
- * <!-- Content for the card footer -->
1131
- * </ng-template>
1132
- * </mefdev-card>
1133
- * ```
1134
- */
1135
- card_footer;
1136
- /**
1137
- * The type of the card.
1138
- * @usageNotes
1139
- * ```
1140
- * <mefdev-card [card_type] = "'type'"></mefdev-card>
1141
- * ```
1142
- */
1143
- card_type;
1144
- /**
1145
- * The path to the image.
1146
- * @usageNotes
1147
- * ```
1148
- * <mefdev-card [img] = "'img/path/img.png'"></mefdev-card>
1149
- * ```
1150
- */
1151
- img;
1152
- /**
1153
- * The path, where user goes after click at the image.
1154
- * @usageNotes
1155
- * ```
1156
- * <mefdev-card [imgUrl] = "'Img.url'"></mefdev-card>
1157
- * ```
1158
- */
1159
- imgUrl;
1160
- /**
1161
- * The description of the card.
1162
- * @usageNotes
1163
- * ```
1164
- * <mefdev-card [description] = "'description'"></mefdev-card>
1165
- * ```
1166
- */
1167
- description;
1168
- constructor(router) {
1169
- this.router = router;
798
+ /** dropdown position changed */
799
+ onPositionChange(position) {
800
+ this._dropDownPosition = position.connectionPair.originY;
1170
801
  }
1171
- ngOnInit() {
802
+ compositionStart() {
803
+ this._composing = true;
1172
804
  }
1173
- /**
1174
- * Event handler for image click.
1175
- * Navigates to the specified URL.
1176
- */
1177
- imgClick() {
1178
- this.router.navigate(['/', this.imgUrl.toString()]);
805
+ compositionEnd() {
806
+ this._composing = false;
1179
807
  }
1180
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1181
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: CardComponent, selector: "mefdev-card", inputs: { card_type: "card_type", img: "img", imgUrl: "imgUrl", description: "description" }, queries: [{ propertyName: "card_title", first: true, predicate: ["card_title"], descendants: true }, { propertyName: "card_footer", first: true, predicate: ["card_footer"], descendants: true }], ngImport: i0, template: "\r\n <pgcard\r\n MinimalHeader=\"true\"\r\n TimeOut=\"2500\"\r\n [Refresh]=\"false\"\r\n [Close]=\"false\">\r\n\r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title body-1\" [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </ng-template>\r\n\r\n <div class=\"plugin-type\">\r\n {{ card_type }}\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"m-l-2 card-description\">\r\n <div *ngIf=\"!description || description == ''\" class=\"card-no-description\"> {{'No plugin description'}}</div>\r\n <p>\r\n {{description}}\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"col-12 mt-3 text-center card-img\"\r\n [ngStyle]=\"{'background-color': img ? 'transparent' : '#fff'}\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\" >\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n style=\"max-width: 260px; max-height: 150px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row mb-3 mt-3\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_footer\"></ng-template>\r\n </div>\r\n </div>\r\n </pgcard>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,.plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,.card-title span,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,.card-description,.card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}.card-default{background-color:#eaeaea;border-radius:5px}.card-header{height:72px}.card-title{width:70%}.plugin-type{right:20px;top:25px;position:absolute;background-color:#cf0106;border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}.card-description{height:40px;overflow-y:clip;color:#4d4d4d}.card-no-description{overflow-y:clip;height:60px;color:#929292}.card-img{padding:0;height:130px;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: pgCard, selector: "pgcard", inputs: ["Title", "Type", "MinimalHeader", "ProgressType", "ProgressColor", "Refresh", "RefreshColor", "Maximize", "Close", "Toggle", "HeaderClass", "BodyClass", "AdditionalClasses", "Controls", "ShowMessage", "Message", "Loading", "TimeOut", "CardBorderStyle"], outputs: ["onRefresh"] }] });
1182
- }
1183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardComponent, decorators: [{
1184
- type: Component,
1185
- args: [{ selector: 'mefdev-card', template: "\r\n <pgcard\r\n MinimalHeader=\"true\"\r\n TimeOut=\"2500\"\r\n [Refresh]=\"false\"\r\n [Close]=\"false\">\r\n\r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title body-1\" [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </ng-template>\r\n\r\n <div class=\"plugin-type\">\r\n {{ card_type }}\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"m-l-2 card-description\">\r\n <div *ngIf=\"!description || description == ''\" class=\"card-no-description\"> {{'No plugin description'}}</div>\r\n <p>\r\n {{description}}\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"col-12 mt-3 text-center card-img\"\r\n [ngStyle]=\"{'background-color': img ? 'transparent' : '#fff'}\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\" >\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n style=\"max-width: 260px; max-height: 150px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row mb-3 mt-3\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_footer\"></ng-template>\r\n </div>\r\n </div>\r\n </pgcard>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,.plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,.card-title span,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,.card-description,.card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}.card-default{background-color:#eaeaea;border-radius:5px}.card-header{height:72px}.card-title{width:70%}.plugin-type{right:20px;top:25px;position:absolute;background-color:#cf0106;border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}.card-description{height:40px;overflow-y:clip;color:#4d4d4d}.card-no-description{overflow-y:clip;height:60px;color:#929292}.card-img{padding:0;height:130px;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\n"] }]
1186
- }], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { card_title: [{
1187
- type: ContentChild,
1188
- args: ["card_title"]
1189
- }], card_footer: [{
1190
- type: ContentChild,
1191
- args: ["card_footer"]
1192
- }], card_type: [{
1193
- type: Input
1194
- }], img: [{
1195
- type: Input
1196
- }], imgUrl: [{
1197
- type: Input
1198
- }], description: [{
1199
- type: Input
1200
- }] } });
1201
-
1202
- var CartTypeColors;
1203
- (function (CartTypeColors) {
1204
- CartTypeColors["UNSET"] = "UNSET";
1205
- CartTypeColors["RED"] = "RED";
1206
- CartTypeColors["GREEN"] = "GREEN";
1207
- })(CartTypeColors || (CartTypeColors = {}));
1208
-
1209
- /**
1210
- * Component for displaying a long card with a title, parameters, and description.
1211
- *
1212
- * Example of usage:
1213
- *
1214
- * ```
1215
- * <medev-card-long
1216
- * [type_text]="'Type Text'"
1217
- * [type_color]="CartTypeColors.RED"
1218
- * [img]="'path/to/image.jpg'"
1219
- * [imgUrl]="'path/to/image'"
1220
- * [description]="'Card description'">
1221
- *
1222
- * <ng-template #title>
1223
- * <!-- Content for the card title -->
1224
- * </ng-template>
1225
-
1226
- * <ng-template #params>
1227
- * <!-- Content for the card parameters -->
1228
- * </ng-template>
1229
-
1230
- * <ng-template #second_col>
1231
- * <!-- Content for the second column -->
1232
- * </ng-template>
1233
-
1234
- * <ng-template #third_col>
1235
- * <!-- Content for the third column -->
1236
- * </ng-template>
1237
- * </medev-card-long>
1238
- * ```
1239
- *
1240
- * <example-url>https://mef.dev/ui_kit_demo/view/card/card-long</example-url>
1241
- */
1242
- class CardLongComponent {
1243
- router;
1244
- /**
1245
- * Template for displaying the title of the card.
1246
- * ```
1247
- * <medev-card-long>
1248
- * <ng-template #title>
1249
- * <!-- Content for the card title -->
1250
- * </ng-template>
1251
- * </medev-card-long>
1252
- * ```
1253
- */
1254
- title;
1255
- /**
1256
- * Template for displaying the parameters of the card.
1257
- * ```
1258
- * <medev-card-long>
1259
- * <ng-template #params>
1260
- * <!-- Content for the card params -->
1261
- * </ng-template>
1262
- * </medev-card-long>
1263
- * ```
1264
- */
1265
- params;
1266
- /**
1267
- * Template for displaying the content of the second column.
1268
- * ```
1269
- * <medev-card-long>
1270
- * <ng-template #second_col>
1271
- * <!-- Content for the card second column -->
1272
- * </ng-template>
1273
- * </medev-card-long>
1274
- * ```
1275
- */
1276
- second_col;
1277
- /**
1278
- * Template for displaying the content of the third column.
1279
- * ```
1280
- * <medev-card-long>
1281
- * <ng-template #third_col>
1282
- * <!-- Content for the card third column -->
1283
- * </ng-template>
1284
- * </medev-card-long>
1285
- * ```
1286
- */
1287
- third_col;
1288
- /**
1289
- * The text for the card type.
1290
- * @usageNotes
1291
- * ```
1292
- * <medev-card-long type_text = "'Type'"></<medev-card-long>
1293
- * ```
1294
- */
1295
- type_text;
1296
- /**
1297
- * The color of the card type.
1298
- * @usageNotes
1299
- * ```
1300
- * <medev-card-long type_color = "'RED'"></<medev-card-long>
1301
- * ```
1302
- * Colors: RED, UNSET, GREEN
1303
-
1304
- */
1305
- type_color = CartTypeColors.UNSET;
1306
- /**
1307
- * The path to the image.
1308
- * @usageNotes
1309
- * ```
1310
- * <mefdev-card-long [img] = "'img/path/img.png'"></mefdev-card-long>
1311
- * ```
1312
- */
1313
- img;
1314
- /**
1315
- * The path, where user goes after click at the image.
1316
- * @usageNotes
1317
- * ```
1318
- * <mefdev-card-long [imgUrl] = "'Img.url'"></mefdev-card-long>
1319
- * ```
1320
- */
1321
- imgUrl;
1322
- /**
1323
- * The description of the card.
1324
- * @usageNotes
1325
- * ```
1326
- * <mefdev-card-long [description] = "'description'"></mefdev-card-long>
1327
- * ```
1328
- */
1329
- description;
1330
- constructor(router) {
1331
- this.router = router;
808
+ /** clear single selected option */
809
+ clearSelect($event) {
810
+ if ($event) {
811
+ $event.preventDefault();
812
+ $event.stopPropagation();
813
+ } // @ts-ignore
814
+ this._selectedOption = null; // @ts-ignore
815
+ this.Value = null; // @ts-ignore
816
+ this.onChange(null);
817
+ }
818
+ /** click dropdown option by user */
819
+ clickOption(option, $event) {
820
+ if (!option) {
821
+ return;
822
+ }
823
+ this.chooseOption(option, true, $event);
824
+ this.clearSearchText();
825
+ if (!this._isMultiple) {
826
+ this.Open = false;
827
+ }
828
+ }
829
+ /** choose option */
830
+ chooseOption(option, isUserClick = false, $event) {
831
+ if ($event) {
832
+ $event.preventDefault();
833
+ $event.stopPropagation();
834
+ }
835
+ this._activeFilterOption = option;
836
+ if (option && !option.Disabled) {
837
+ if (!this.Multiple) {
838
+ this._selectedOption = option;
839
+ this._value = option.Value;
840
+ if (isUserClick) {
841
+ this.change.next(this._value);
842
+ this.onChange(option.Value);
843
+ }
844
+ }
845
+ else {
846
+ if (isUserClick) {
847
+ this.isInSet(this._selectedOptions, option)
848
+ ? this.unSelectMultipleOption(option)
849
+ : this.selectMultipleOption(option);
850
+ }
851
+ }
852
+ }
853
+ }
854
+ updateWidth(element, text) {
855
+ if (text) {
856
+ /** wait for scroll width change */ // @ts-ignore
857
+ setTimeout(_ => {
858
+ this._renderer.setStyle(element, "width", `${element.scrollWidth}px`);
859
+ });
860
+ }
861
+ else {
862
+ this._renderer.removeStyle(element, "width");
863
+ }
864
+ }
865
+ /** determine if option in set */
866
+ isInSet(set, option) {
867
+ return Array.from(set).find((data) => data.Value === option.Value);
868
+ }
869
+ /** cancel select multiple option */ // @ts-ignore
870
+ unSelectMultipleOption = (option, $event, emitChange = true) => {
871
+ this._operatingMultipleOption = option;
872
+ this._selectedOptions.delete(option);
873
+ if (emitChange) {
874
+ this.emitMultipleOptions();
875
+ }
876
+ // 对Tag进行特殊处理
877
+ if (this._isTags &&
878
+ this._options.indexOf(option) !== -1 &&
879
+ this._tagsOptions.indexOf(option) !== -1) {
880
+ this.removeOption(option);
881
+ this._tagsOptions.splice(this._tagsOptions.indexOf(option), 1);
882
+ }
883
+ if ($event) {
884
+ $event.preventDefault();
885
+ $event.stopPropagation();
886
+ }
887
+ };
888
+ /** select multiple option */
889
+ selectMultipleOption(option, $event) {
890
+ /** if tags do push to tag option */
891
+ if (this._isTags &&
892
+ this._options.indexOf(option) === -1 &&
893
+ this._tagsOptions.indexOf(option) === -1) {
894
+ this.addOption(option);
895
+ this._tagsOptions.push(option);
896
+ }
897
+ this._operatingMultipleOption = option;
898
+ if (this._selectedOptions.size < this.MaxMultiple) {
899
+ this._selectedOptions.add(option);
900
+ }
901
+ this.emitMultipleOptions();
902
+ if ($event) {
903
+ $event.preventDefault();
904
+ $event.stopPropagation();
905
+ }
906
+ }
907
+ /** emit multiple options */
908
+ emitMultipleOptions() {
909
+ if (this._isMultiInit) {
910
+ return;
911
+ }
912
+ const arrayOptions = Array.from(this._selectedOptions);
913
+ this._value = arrayOptions.map(item => item.Value);
914
+ this.onChange(this._value);
915
+ }
916
+ /** update selected option when add remove option etc */
917
+ updateSelectedOption(currentModelValue, triggerByNgModel = false) {
918
+ if (currentModelValue == null) {
919
+ return;
920
+ }
921
+ if (this.Multiple) {
922
+ const selectedOptions = this._options.filter(item => {
923
+ return item != null && currentModelValue.indexOf(item.Value) !== -1;
924
+ });
925
+ if ((this.KeepUnListOptions || this.Tags) && !triggerByNgModel) {
926
+ const _selectedOptions = Array.from(this._selectedOptions);
927
+ selectedOptions.forEach(option => {
928
+ const _exist = _selectedOptions.some(item => item._value == option._value);
929
+ if (!_exist) {
930
+ this._selectedOptions.add(option);
931
+ }
932
+ });
933
+ }
934
+ else {
935
+ this._selectedOptions = new Set();
936
+ selectedOptions.forEach(option => {
937
+ this._selectedOptions.add(option);
938
+ });
939
+ }
940
+ }
941
+ else {
942
+ const selectedOption = this._options.filter(item => {
943
+ return item != null && item.Value == currentModelValue;
944
+ });
945
+ this.chooseOption(selectedOption[0]);
946
+ }
947
+ }
948
+ forceUpdateSelectedOption(value) {
949
+ /** trigger dirty check */ // @ts-ignore
950
+ setTimeout(_ => {
951
+ this.updateSelectedOption(value);
952
+ });
953
+ }
954
+ get Value() {
955
+ return this._value;
956
+ }
957
+ set Value(value) {
958
+ this._updateValue(value);
959
+ }
960
+ clearAllSelectedOption(emitChange = true) {
961
+ this._selectedOptions.forEach(item => {
962
+ this.unSelectMultipleOption(item, null, emitChange);
963
+ });
964
+ }
965
+ handleKeyEnterEvent(event) {
966
+ /** when composing end */
967
+ if (!this._composing && this._isOpen) {
968
+ event.preventDefault();
969
+ event.stopPropagation();
970
+ this.updateFilterOption(false);
971
+ this.clickOption(this._activeFilterOption);
972
+ }
973
+ }
974
+ handleKeyBackspaceEvent(event) {
975
+ if (!this._searchText && !this._composing && this._isMultiple) {
976
+ event.preventDefault();
977
+ const lastOption = Array.from(this._selectedOptions).pop();
978
+ this.unSelectMultipleOption(lastOption);
979
+ }
1332
980
  }
1333
- ngOnInit() {
981
+ handleKeyDownEvent($event) {
982
+ if (this._isOpen) {
983
+ $event.preventDefault();
984
+ $event.stopPropagation();
985
+ this._activeFilterOption = this.nextOption(this._activeFilterOption, this._filterOptions.filter(w => !w.Disabled));
986
+ this.scrollToActive();
987
+ }
1334
988
  }
1335
- /**
1336
- * Event handler for image click.
1337
- * Navigates to the specified URL.
1338
- */
1339
- imgClick() {
1340
- this.router.navigate(['/', this.imgUrl.toString()]);
989
+ handleKeyUpEvent($event) {
990
+ if (this._isOpen) {
991
+ $event.preventDefault();
992
+ $event.stopPropagation();
993
+ this._activeFilterOption = this.preOption(this._activeFilterOption, this._filterOptions.filter(w => !w.Disabled));
994
+ this.scrollToActive();
995
+ }
996
+ }
997
+ preOption(option, options) {
998
+ return options[options.indexOf(option) - 1] || options[options.length - 1];
999
+ }
1000
+ nextOption(option, options) {
1001
+ return options[options.indexOf(option) + 1] || options[0];
1002
+ }
1003
+ clearSearchText() {
1004
+ this._searchText = "";
1005
+ this.updateFilterOption();
1006
+ }
1007
+ updateFilterOption(updateActiveFilter = true) {
1008
+ if (this.Filter) {
1009
+ this._filterOptions = new OptionPipe().transform(this._options, {
1010
+ searchText: this._searchText,
1011
+ tags: this._isTags,
1012
+ notFoundContent: this._isTags
1013
+ ? this._searchText
1014
+ : this._notFoundContent,
1015
+ disabled: !this._isTags,
1016
+ value: this._isTags ? this._searchText : "disabled"
1017
+ });
1018
+ }
1019
+ else {
1020
+ this._filterOptions = this._options;
1021
+ }
1022
+ /** TODO: cause pre & next key selection not work */
1023
+ if (updateActiveFilter && !this._selectedOption) {
1024
+ this._activeFilterOption = this._filterOptions[0];
1025
+ }
1026
+ }
1027
+ onSearchChange(searchValue) {
1028
+ this.SearchChange.emit(searchValue);
1029
+ }
1030
+ onClick(e) {
1031
+ e.preventDefault();
1032
+ if (!this._disabled) {
1033
+ this.Open = !this.Open;
1034
+ if (this.ShowSearch) {
1035
+ /** wait for search display */ // @ts-ignore
1036
+ setTimeout(_ => {
1037
+ this.searchInputElementRef.nativeElement.focus();
1038
+ });
1039
+ }
1040
+ }
1041
+ }
1042
+ onKeyDown(e) {
1043
+ const keyCode = e.keyCode;
1044
+ if (keyCode === TAB && this.Open) {
1045
+ this.Open = false;
1046
+ return;
1047
+ }
1048
+ if ((keyCode !== DOWN_ARROW && keyCode !== ENTER) || this.Open) {
1049
+ return;
1050
+ }
1051
+ e.preventDefault();
1052
+ if (!this._disabled) {
1053
+ this.Open = true;
1054
+ if (this.ShowSearch) {
1055
+ /** wait for search display */ // @ts-ignore
1056
+ setTimeout(_ => {
1057
+ this.searchInputElementRef.nativeElement.focus();
1058
+ });
1059
+ }
1060
+ }
1061
+ }
1062
+ closeDropDown() {
1063
+ if (!this.Open) {
1064
+ return;
1065
+ }
1066
+ this.onTouched();
1067
+ if (this.Multiple) {
1068
+ this._renderer.removeStyle(this.searchInputElementRef.nativeElement, "width");
1069
+ }
1070
+ this.clearSearchText();
1071
+ this.Open = false;
1072
+ }
1073
+ setClassMap() {
1074
+ this._classList.forEach(_className => {
1075
+ this._renderer.removeClass(this._el, _className);
1076
+ }); // @ts-ignore
1077
+ this._classList = [
1078
+ this._prefixCls,
1079
+ this._mode === "combobox" && `${this._prefixCls}-combobox`,
1080
+ !this._disabled && `${this._prefixCls}-enabled`,
1081
+ this._disabled && `${this._prefixCls}-disabled`,
1082
+ this._isOpen && `${this._prefixCls}-open`,
1083
+ this._showSearch && `${this._prefixCls}-show-search`,
1084
+ this._size && `${this._prefixCls}-${this._size}`
1085
+ ].filter(item => {
1086
+ return !!item;
1087
+ });
1088
+ this._classList.forEach(_className => {
1089
+ this._renderer.addClass(this._el, _className);
1090
+ });
1091
+ this._selectionClassMap = {
1092
+ [this._selectionPrefixCls]: true,
1093
+ [`${this._selectionPrefixCls}--single`]: !this.Multiple,
1094
+ [`${this._selectionPrefixCls}--multiple`]: this.Multiple
1095
+ };
1096
+ }
1097
+ setDropDownClassMap() {
1098
+ this._dropDownClassMap = {
1099
+ [this._dropDownPrefixCls]: true,
1100
+ ["component-select"]: this._mode === "combobox",
1101
+ [`${this._dropDownPrefixCls}--single`]: !this.Multiple,
1102
+ [`${this._dropDownPrefixCls}--multiple`]: this.Multiple,
1103
+ [`${this._dropDownPrefixCls}-placement-bottomLeft`]: this._dropDownPosition === "bottom",
1104
+ [`${this._dropDownPrefixCls}-placement-topLeft`]: this._dropDownPosition === "top"
1105
+ };
1106
+ }
1107
+ scrollToActive() {
1108
+ /** wait for dropdown display */ // @ts-ignore
1109
+ setTimeout(_ => {
1110
+ if (this._activeFilterOption && this._activeFilterOption.Value) {
1111
+ const index = this._filterOptions.findIndex(option => option.Value === this._activeFilterOption.Value);
1112
+ try {
1113
+ const scrollPane = this.dropdownUl.nativeElement.children[index];
1114
+ // TODO: scrollIntoViewIfNeeded is not a standard API, why doing so?
1115
+ /* tslint:disable-next-line:no-any */
1116
+ scrollPane.scrollIntoViewIfNeeded(false);
1117
+ }
1118
+ catch (e) { }
1119
+ }
1120
+ });
1121
+ }
1122
+ flushComponentState() {
1123
+ this.updateFilterOption();
1124
+ if (!this.Multiple) {
1125
+ this.updateSelectedOption(this._value);
1126
+ }
1127
+ else {
1128
+ if (this._value) {
1129
+ this.updateSelectedOption(this._value);
1130
+ }
1131
+ }
1132
+ }
1133
+ _setTriggerWidth() {
1134
+ this._triggerWidth = this._getTriggerRect().width;
1135
+ /** should remove after after https://github.com/angular/material2/pull/8765 merged **/
1136
+ if (this._cdkOverlay && this._cdkOverlay.overlayRef) {
1137
+ this._cdkOverlay.overlayRef.updateSize({
1138
+ width: this._triggerWidth
1139
+ });
1140
+ }
1141
+ }
1142
+ _getTriggerRect() {
1143
+ return this.trigger.nativeElement.getBoundingClientRect();
1144
+ }
1145
+ writeValue(value) {
1146
+ this._updateValue(value, false);
1147
+ }
1148
+ registerOnChange(fn) {
1149
+ this.onChange = fn;
1150
+ }
1151
+ registerOnTouched(fn) {
1152
+ this.onTouched = fn;
1153
+ }
1154
+ setDisabledState(isDisabled) {
1155
+ this.Disabled = isDisabled;
1156
+ }
1157
+ dropDownScroll(ul) {
1158
+ if (ul && ul.scrollHeight - ul.scrollTop === ul.clientHeight) {
1159
+ this.ScrollToBottom.emit(true);
1160
+ }
1161
+ }
1162
+ checkDropDownScroll() {
1163
+ if (this.dropdownUl &&
1164
+ this.dropdownUl.nativeElement.scrollHeight ===
1165
+ this.dropdownUl.nativeElement.clientHeight) {
1166
+ this.ScrollToBottom.emit(true);
1167
+ }
1168
+ }
1169
+ constructor(_elementRef, _renderer, cDRef) {
1170
+ this._elementRef = _elementRef;
1171
+ this._renderer = _renderer;
1172
+ this.cDRef = cDRef;
1173
+ this._el = this._elementRef.nativeElement;
1174
+ }
1175
+ ngAfterContentInit() {
1176
+ if (this._value != null) {
1177
+ this.flushComponentState();
1178
+ }
1341
1179
  }
1342
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardLongComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
1343
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: CardLongComponent, selector: "medev-card-long", inputs: { type_text: "type_text", type_color: "type_color", img: "img", imgUrl: "imgUrl", description: "description" }, queries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }, { propertyName: "params", first: true, predicate: ["params"], descendants: true }, { propertyName: "second_col", first: true, predicate: ["second_col"], descendants: true }, { propertyName: "third_col", first: true, predicate: ["third_col"], descendants: true }], ngImport: i0, template: "\r\n <pgcard \r\n MinimalHeader=\"true\" \r\n TimeOut=\"2500\" \r\n [Refresh]=\"false\" \r\n [Close]=\"false\"\r\n >\r\n \r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title\" [ngTemplateOutlet]=\"title\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template #CardExtraControls>\r\n <div class=\"plugin-type\" \r\n [ngClass] = \"{\r\n 'b-color-Light-Gray-1': type_color === 'UNSET',\r\n 'b-color-Red': type_color === 'RED',\r\n 'b-color-Green': type_color === 'GREEN'}\">\r\n {{type_text}}\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"row h-100 m-b-10\">\r\n <div class=\"col-lg-3 col-12 card-col\">\r\n <div class=\"row\">\r\n <div class=\"col-12 card-img m-b-10\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\">\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n height=\"110px\" \r\n style=\"max-width: 110px; max-height: 110px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div> \r\n </div>\r\n <div class=\"col-12 m-t-2 body-6 text-dark params-block\">\r\n <ng-template [ngTemplateOutlet]=\"params\"></ng-template> \r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-lg-5 col-12 card-col\">\r\n <ng-template [ngTemplateOutlet]=\"second_col\"></ng-template> \r\n </div>\r\n \r\n <div class=\"col-lg-4 col-12 card-col mt-lg-0 mt-5\">\r\n <ng-template [ngTemplateOutlet]=\"third_col\"></ng-template> \r\n </div> \r\n\r\n </div>\r\n </pgcard>", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,:host::ng-deep .card-title span,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,:host::ng-deep .plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,:host::ng-deep .card-description,:host::ng-deep .card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}:host::ng-deep .params-block .row{margin-top:.75em}:host::ng-deep .params-block .row:last-child{margin-bottom:.75em}:host::ng-deep .card-col{min-height:220px}:host::ng-deep .header-link{opacity:1}:host::ng-deep .card-default{background-color:#f3f3f3;border-radius:5px}:host::ng-deep .card-title{width:80%;color:#000}:host::ng-deep .plugin-type{border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}:host::ng-deep .card-description{height:40px;overflow-y:clip;color:#4d4d4d}:host::ng-deep .card-no-description{overflow-y:clip;height:60px;color:#929292}:host::ng-deep .card-img{padding:0;height:130px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: pgCard, selector: "pgcard", inputs: ["Title", "Type", "MinimalHeader", "ProgressType", "ProgressColor", "Refresh", "RefreshColor", "Maximize", "Close", "Toggle", "HeaderClass", "BodyClass", "AdditionalClasses", "Controls", "ShowMessage", "Message", "Loading", "TimeOut", "CardBorderStyle"], outputs: ["onRefresh"] }] });
1344
- }
1345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardLongComponent, decorators: [{
1346
- type: Component,
1347
- args: [{ selector: 'medev-card-long', template: "\r\n <pgcard \r\n MinimalHeader=\"true\" \r\n TimeOut=\"2500\" \r\n [Refresh]=\"false\" \r\n [Close]=\"false\"\r\n >\r\n \r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title\" [ngTemplateOutlet]=\"title\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template #CardExtraControls>\r\n <div class=\"plugin-type\" \r\n [ngClass] = \"{\r\n 'b-color-Light-Gray-1': type_color === 'UNSET',\r\n 'b-color-Red': type_color === 'RED',\r\n 'b-color-Green': type_color === 'GREEN'}\">\r\n {{type_text}}\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"row h-100 m-b-10\">\r\n <div class=\"col-lg-3 col-12 card-col\">\r\n <div class=\"row\">\r\n <div class=\"col-12 card-img m-b-10\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\">\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n height=\"110px\" \r\n style=\"max-width: 110px; max-height: 110px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div> \r\n </div>\r\n <div class=\"col-12 m-t-2 body-6 text-dark params-block\">\r\n <ng-template [ngTemplateOutlet]=\"params\"></ng-template> \r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-lg-5 col-12 card-col\">\r\n <ng-template [ngTemplateOutlet]=\"second_col\"></ng-template> \r\n </div>\r\n \r\n <div class=\"col-lg-4 col-12 card-col mt-lg-0 mt-5\">\r\n <ng-template [ngTemplateOutlet]=\"third_col\"></ng-template> \r\n </div> \r\n\r\n </div>\r\n </pgcard>", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,:host::ng-deep .card-title span,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,:host::ng-deep .plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,:host::ng-deep .card-description,:host::ng-deep .card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}:host::ng-deep .params-block .row{margin-top:.75em}:host::ng-deep .params-block .row:last-child{margin-bottom:.75em}:host::ng-deep .card-col{min-height:220px}:host::ng-deep .header-link{opacity:1}:host::ng-deep .card-default{background-color:#f3f3f3;border-radius:5px}:host::ng-deep .card-title{width:80%;color:#000}:host::ng-deep .plugin-type{border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}:host::ng-deep .card-description{height:40px;overflow-y:clip;color:#4d4d4d}:host::ng-deep .card-no-description{overflow-y:clip;height:60px;color:#929292}:host::ng-deep .card-img{padding:0;height:130px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\n"] }]
1348
- }], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { title: [{
1349
- type: ContentChild,
1350
- args: ["title"]
1351
- }], params: [{
1352
- type: ContentChild,
1353
- args: ["params"]
1354
- }], second_col: [{
1355
- type: ContentChild,
1356
- args: ["second_col"]
1357
- }], third_col: [{
1358
- type: ContentChild,
1359
- args: ["third_col"]
1360
- }], type_text: [{
1361
- type: Input
1362
- }], type_color: [{
1363
- type: Input
1364
- }], img: [{
1365
- type: Input
1366
- }], imgUrl: [{
1367
- type: Input
1368
- }], description: [{
1369
- type: Input
1370
- }] } });
1371
-
1372
- /**
1373
- * Component for displaying a simple card with a title.
1374
- *
1375
- * Example of usage:
1376
- *```
1377
- * <medev-card-simple [disabled]="true">
1378
- * <ng-template #card_title>
1379
- * <!-- Content for the card title -->
1380
- * </ng-template>
1381
- * </medev-card-simple>
1382
- *```
1383
- *
1384
- * <example-url>https://mef.dev/ui_kit_demo/view/card/card-simple</example-url>
1385
- */
1386
- class CardSimpleComponent {
1387
- /**
1388
- * Determines whether the card is disabled or not.
1389
- */
1390
- isDisabled = false;
1391
- /**
1392
- * Template for displaying the title of the card.
1393
- *```
1394
- * <medev-card-simple>
1395
- * <ng-template #card_title>
1396
- * <h3>Card Title</h3>
1397
- * </ng-template>
1398
- * </medev-card-simple>
1399
- *```
1400
- */
1401
- card_title;
1402
- constructor() { }
1403
1180
  ngOnInit() {
1181
+ this.updateFilterOption();
1182
+ this.setClassMap();
1183
+ this.setDropDownClassMap();
1404
1184
  }
1405
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardSimpleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1406
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: CardSimpleComponent, selector: "medev-card-simple", inputs: { isDisabled: ["disabled", "isDisabled"] }, queries: [{ propertyName: "card_title", first: true, predicate: ["card_title"], descendants: true }], ngImport: i0, template: "<div class=\"card-simple\" [ngClass]=\"{ 'unused-block':isDisabled }\">\r\n <div class=\"row m-2 body-1\" *ngIf=\"card_title\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </div>\r\n </div>\r\n <div class=\"row m-2\">\r\n <div class=\"col-12\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.card-simple{background-color:#f3f3f3;padding:.5em;border-radius:5px}.unused-block{opacity:.6;pointer-events:none}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1407
- }
1408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardSimpleComponent, decorators: [{
1409
- type: Component,
1410
- args: [{ selector: 'medev-card-simple', template: "<div class=\"card-simple\" [ngClass]=\"{ 'unused-block':isDisabled }\">\r\n <div class=\"row m-2 body-1\" *ngIf=\"card_title\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </div>\r\n </div>\r\n <div class=\"row m-2\">\r\n <div class=\"col-12\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.card-simple{background-color:#f3f3f3;padding:.5em;border-radius:5px}.unused-block{opacity:.6;pointer-events:none}\n"] }]
1411
- }], ctorParameters: function () { return []; }, propDecorators: { isDisabled: [{
1412
- type: Input,
1413
- args: ["disabled"]
1414
- }], card_title: [{
1415
- type: ContentChild,
1416
- args: ["card_title"]
1417
- }] } });
1418
-
1419
- function toBoolean(value) {
1420
- return value === '' || (value && value !== 'false');
1421
- }
1422
-
1423
- /* tslint:disable:no-any */
1424
- class OptionPipe {
1425
- // TODO: enable type checking for this method
1426
- transform(options, value) {
1427
- if (value.searchText) {
1428
- let _options = options.filter(option => option.Label &&
1429
- option.Label.toLowerCase().indexOf(value.searchText.toLowerCase()) !==
1430
- -1);
1431
- if (value.tags) {
1432
- _options = options.filter(option => option.Label &&
1433
- option.Label.toLowerCase() === value.searchText.toLowerCase());
1185
+ ngAfterContentChecked() {
1186
+ if (this._cacheOptions !== this._options) {
1187
+ /** update filter option after every content check cycle */
1188
+ this.updateFilterOption();
1189
+ this._cacheOptions = this._options;
1190
+ }
1191
+ else {
1192
+ this.updateFilterOption(false);
1193
+ }
1194
+ if (this.FirstDefault) {
1195
+ if (!this._value && this._options) {
1196
+ if (this._options[0] !== undefined && this._options[0].Value) {
1197
+ this.chooseOption(this._options[0], false);
1198
+ setTimeout(() => {
1199
+ this.onChange(this._options[0].Value);
1200
+ });
1201
+ }
1434
1202
  }
1435
- if (_options.length) {
1436
- return _options;
1203
+ }
1204
+ }
1205
+ _updateValue(value, emitChange = true) {
1206
+ if (this._value === value) {
1207
+ return;
1208
+ }
1209
+ if (value == null && this.Multiple) {
1210
+ this._value = [];
1211
+ }
1212
+ else {
1213
+ this._value = value;
1214
+ }
1215
+ if (!this.Multiple) {
1216
+ if (value == null) { // @ts-ignore
1217
+ this._selectedOption = null;
1437
1218
  }
1438
1219
  else {
1439
- return [
1440
- {
1441
- Value: value.value,
1442
- _value: value.value,
1443
- Disabled: value.disabled,
1444
- _disabled: value.disabled,
1445
- Label: value.notFoundContent,
1446
- _label: value.notFoundContent
1447
- }
1448
- ];
1220
+ this.updateSelectedOption(value);
1449
1221
  }
1450
1222
  }
1451
1223
  else {
1452
- return options;
1224
+ if (value) {
1225
+ if (value.length === 0) {
1226
+ this.clearAllSelectedOption(emitChange);
1227
+ }
1228
+ else {
1229
+ this.updateSelectedOption(value, true);
1230
+ }
1231
+ }
1232
+ else if (value == null) {
1233
+ this.clearAllSelectedOption(emitChange);
1234
+ }
1453
1235
  }
1454
1236
  }
1455
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: OptionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1456
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: OptionPipe, name: "OptionPipe" });
1237
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1238
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefDevSelectComponent, selector: "mefdev-select", inputs: { Filter: "Filter", MaxMultiple: "MaxMultiple", FirstDefault: "FirstDefault", AllowClear: "AllowClear", KeepUnListOptions: "KeepUnListOptions", Mode: "Mode", Multiple: "Multiple", PlaceHolder: "PlaceHolder", NotFoundContent: "NotFoundContent", Size: "Size", ShowSearch: "ShowSearch", Tags: "Tags", Disabled: "Disabled", Open: "Open" }, outputs: { SearchChange: "SearchChange", change: "change", OpenChange: "OpenChange", ScrollToBottom: "ScrollToBottom" }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, providers: [
1239
+ {
1240
+ provide: NG_VALUE_ACCESSOR,
1241
+ useExisting: forwardRef(() => MefDevSelectComponent),
1242
+ multi: true
1243
+ }
1244
+ ], viewQueries: [{ propertyName: "searchInputElementRef", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "dropdownUl", first: true, predicate: ["dropdownUl"], descendants: true }, { propertyName: "_cdkOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }], ngImport: i0, template: "<div tabindex=\"0\" #trigger cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" [ngClass]=\"_selectionClassMap\"\r\n (keydown.Enter)=\"handleKeyEnterEvent($event)\" (keydown.Backspace)=\"handleKeyBackspaceEvent($event)\"\r\n (keydown.ArrowUp)=\"handleKeyUpEvent($event)\" (keydown.ArrowDown)=\"handleKeyDownEvent($event)\">\r\n\r\n <!-- \u0423\u0432\u0435\u0441\u044C \u0441\u0435\u043B\u0435\u043A\u0442-->\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"!ShowSearch\">\r\n <div class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"!_selectedOption\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n <div class=\"pg-select-selection-selected-value\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n </div>\r\n <!--C\u043F\u0438\u0441\u043E\u043A options-->\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"ShowSearch\">\r\n <div [hidden]=\"_searchText||(!Open&&_selectedOption)||_selectedOptions.size\"\r\n class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"(!_composing)&&_selectedOption\">\r\n {{ _selectedOption.Label }}\r\n </ng-template>\r\n <ng-template [ngIf]=\"(!_composing)&&(!_selectedOption)\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n\r\n\r\n <!--\u041C\u0443\u043B\u044C\u0442\u0438\u0441\u0435\u043B\u0435\u043A\u0442-->\r\n <ul *ngIf=\"Multiple\"> \r\n <li *ngFor=\"let option of _selectedOptions\" [@tagAnimation] [attr.title]=\"option?.Label || option?.Value\"\r\n class=\"pg-select-selection__choice\" style=\"-webkit-user-select: none;\">\r\n <span class=\"pg-select-selection__choice__remove\" (click)=\"unSelectMultipleOption(option,$event)\"></span>\r\n <div class=\"pg-select-selection__choice__content\">{{ option?.Label }}</div>\r\n </li>\r\n <li class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd();updateWidth(searchInput,_searchText);\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\"\r\n (keydown)=\"updateWidth(searchInput,_searchText)\" (input)=\"updateWidth(searchInput,_searchText)\"\r\n (blur)=\"onTouched()\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span></div>\r\n </li>\r\n </ul>\r\n <div *ngIf=\"!Multiple\" class=\"pg-select-selection-selected-value\" [hidden]=\"!(_selectedOption?.Label)||Open\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n <div *ngIf=\"!Multiple\" [hidden]=\"!Open\" class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (blur)=\"onTouched()\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd()\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n <span (click)=\"onTouched();clearSelect($event)\" class=\"pg-select-selection__clear\" style=\"-webkit-user-select: none;\"\r\n *ngIf=\"_selectedOption?.Label&&AllowClear&&!Multiple\">\r\n </span>\r\n <span class=\"pg-select-arrow\"><b></b></span>\r\n</div>\r\n<ng-template cdkConnectedOverlay cdkConnectedOverlayHasBackdrop [cdkConnectedOverlayOrigin]=\"origin\"\r\n (backdropClick)=\"closeDropDown()\" (detach)=\"closeDropDown();\" (positionChange)=\"onPositionChange($event)\"\r\n [cdkConnectedOverlayWidth]=\"_triggerWidth\" [cdkConnectedOverlayOpen]=\"_isOpen\">\r\n <div [ngClass]=\"_dropDownClassMap\" [@dropDownAnimation]=\"_dropDownPosition\">\r\n <div style=\"overflow: auto;\">\r\n <ul class=\"pg-select-dropdown-menu pg-select-dropdown-menu-vertical pg-select-dropdown-menu-root\" #dropdownUl\r\n (scroll)=\"dropDownScroll(dropdownUl)\">\r\n <li *ngFor=\"let option of _filterOptions\" [class.pg-select-dropdown-menu-item-disabled]=\"option.Disabled\"\r\n [class.pg-select-dropdown-menu-item-active]=\"option.Value == _activeFilterOption?.Value\"\r\n [class.pg-select-dropdown-menu-item-selected]=\"(option.Value==(_selectedOption?.Value))||(isInSet(_selectedOptions,option))\"\r\n class=\"pg-select-dropdown-menu-item\" (click)=\"clickOption(option,$event)\">\r\n <ng-template *ngIf=\"option.OptionTemplate\" [ngTemplateOutlet]=\"option.OptionTemplate\">\r\n </ng-template>\r\n <ng-template [ngIf]=\"!option.OptionTemplate\">\r\n {{ option.Label }}\r\n </ng-template>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>", 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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], animations: [trigger('dropDownAnimation', [
1245
+ state('bottom', style({
1246
+ opacity: 1,
1247
+ transform: 'scaleY(1)',
1248
+ transformOrigin: '0% 0%'
1249
+ })),
1250
+ transition('void => bottom', [
1251
+ style({
1252
+ opacity: 0,
1253
+ transform: 'scaleY(0)',
1254
+ transformOrigin: '0% 0%'
1255
+ }),
1256
+ animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
1257
+ ]),
1258
+ state('top', style({
1259
+ opacity: 1,
1260
+ transform: 'scaleY(1)',
1261
+ transformOrigin: '0% 100%'
1262
+ })),
1263
+ transition('void => top', [
1264
+ style({
1265
+ opacity: 0,
1266
+ transform: 'scaleY(0)',
1267
+ transformOrigin: '0% 100%'
1268
+ }),
1269
+ animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
1270
+ ]),
1271
+ transition('* => void', [
1272
+ animate('250ms 100ms linear', style({ opacity: 0 }))
1273
+ ])
1274
+ ]),
1275
+ trigger('tagAnimation', [
1276
+ state('*', style({ opacity: 1, transform: 'scale(1)' })),
1277
+ transition('void => *', [
1278
+ style({ opacity: 0, transform: 'scale(0)' }),
1279
+ animate('150ms linear')
1280
+ ]),
1281
+ state('void', style({ opacity: 0, transform: 'scale(0)' })),
1282
+ transition('* => void', [
1283
+ style({ opacity: 1, transform: 'scale(1)' }),
1284
+ animate('150ms linear')
1285
+ ])
1286
+ ])], encapsulation: i0.ViewEncapsulation.None });
1457
1287
  }
1458
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: OptionPipe, decorators: [{
1459
- type: Pipe,
1460
- args: [{ name: "OptionPipe" }]
1461
- }] });
1288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectComponent, decorators: [{
1289
+ type: Component,
1290
+ args: [{ selector: "mefdev-select", encapsulation: ViewEncapsulation.None, providers: [
1291
+ {
1292
+ provide: NG_VALUE_ACCESSOR,
1293
+ useExisting: forwardRef(() => MefDevSelectComponent),
1294
+ multi: true
1295
+ }
1296
+ ], animations: [trigger('dropDownAnimation', [
1297
+ state('bottom', style({
1298
+ opacity: 1,
1299
+ transform: 'scaleY(1)',
1300
+ transformOrigin: '0% 0%'
1301
+ })),
1302
+ transition('void => bottom', [
1303
+ style({
1304
+ opacity: 0,
1305
+ transform: 'scaleY(0)',
1306
+ transformOrigin: '0% 0%'
1307
+ }),
1308
+ animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
1309
+ ]),
1310
+ state('top', style({
1311
+ opacity: 1,
1312
+ transform: 'scaleY(1)',
1313
+ transformOrigin: '0% 100%'
1314
+ })),
1315
+ transition('void => top', [
1316
+ style({
1317
+ opacity: 0,
1318
+ transform: 'scaleY(0)',
1319
+ transformOrigin: '0% 100%'
1320
+ }),
1321
+ animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
1322
+ ]),
1323
+ transition('* => void', [
1324
+ animate('250ms 100ms linear', style({ opacity: 0 }))
1325
+ ])
1326
+ ]),
1327
+ trigger('tagAnimation', [
1328
+ state('*', style({ opacity: 1, transform: 'scale(1)' })),
1329
+ transition('void => *', [
1330
+ style({ opacity: 0, transform: 'scale(0)' }),
1331
+ animate('150ms linear')
1332
+ ]),
1333
+ state('void', style({ opacity: 0, transform: 'scale(0)' })),
1334
+ transition('* => void', [
1335
+ style({ opacity: 1, transform: 'scale(1)' }),
1336
+ animate('150ms linear')
1337
+ ])
1338
+ ])], template: "<div tabindex=\"0\" #trigger cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" [ngClass]=\"_selectionClassMap\"\r\n (keydown.Enter)=\"handleKeyEnterEvent($event)\" (keydown.Backspace)=\"handleKeyBackspaceEvent($event)\"\r\n (keydown.ArrowUp)=\"handleKeyUpEvent($event)\" (keydown.ArrowDown)=\"handleKeyDownEvent($event)\">\r\n\r\n <!-- \u0423\u0432\u0435\u0441\u044C \u0441\u0435\u043B\u0435\u043A\u0442-->\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"!ShowSearch\">\r\n <div class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"!_selectedOption\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n <div class=\"pg-select-selection-selected-value\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n </div>\r\n <!--C\u043F\u0438\u0441\u043E\u043A options-->\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"ShowSearch\">\r\n <div [hidden]=\"_searchText||(!Open&&_selectedOption)||_selectedOptions.size\"\r\n class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"(!_composing)&&_selectedOption\">\r\n {{ _selectedOption.Label }}\r\n </ng-template>\r\n <ng-template [ngIf]=\"(!_composing)&&(!_selectedOption)\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n\r\n\r\n <!--\u041C\u0443\u043B\u044C\u0442\u0438\u0441\u0435\u043B\u0435\u043A\u0442-->\r\n <ul *ngIf=\"Multiple\"> \r\n <li *ngFor=\"let option of _selectedOptions\" [@tagAnimation] [attr.title]=\"option?.Label || option?.Value\"\r\n class=\"pg-select-selection__choice\" style=\"-webkit-user-select: none;\">\r\n <span class=\"pg-select-selection__choice__remove\" (click)=\"unSelectMultipleOption(option,$event)\"></span>\r\n <div class=\"pg-select-selection__choice__content\">{{ option?.Label }}</div>\r\n </li>\r\n <li class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd();updateWidth(searchInput,_searchText);\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\"\r\n (keydown)=\"updateWidth(searchInput,_searchText)\" (input)=\"updateWidth(searchInput,_searchText)\"\r\n (blur)=\"onTouched()\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span></div>\r\n </li>\r\n </ul>\r\n <div *ngIf=\"!Multiple\" class=\"pg-select-selection-selected-value\" [hidden]=\"!(_selectedOption?.Label)||Open\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n <div *ngIf=\"!Multiple\" [hidden]=\"!Open\" class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (blur)=\"onTouched()\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd()\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n <span (click)=\"onTouched();clearSelect($event)\" class=\"pg-select-selection__clear\" style=\"-webkit-user-select: none;\"\r\n *ngIf=\"_selectedOption?.Label&&AllowClear&&!Multiple\">\r\n </span>\r\n <span class=\"pg-select-arrow\"><b></b></span>\r\n</div>\r\n<ng-template cdkConnectedOverlay cdkConnectedOverlayHasBackdrop [cdkConnectedOverlayOrigin]=\"origin\"\r\n (backdropClick)=\"closeDropDown()\" (detach)=\"closeDropDown();\" (positionChange)=\"onPositionChange($event)\"\r\n [cdkConnectedOverlayWidth]=\"_triggerWidth\" [cdkConnectedOverlayOpen]=\"_isOpen\">\r\n <div [ngClass]=\"_dropDownClassMap\" [@dropDownAnimation]=\"_dropDownPosition\">\r\n <div style=\"overflow: auto;\">\r\n <ul class=\"pg-select-dropdown-menu pg-select-dropdown-menu-vertical pg-select-dropdown-menu-root\" #dropdownUl\r\n (scroll)=\"dropDownScroll(dropdownUl)\">\r\n <li *ngFor=\"let option of _filterOptions\" [class.pg-select-dropdown-menu-item-disabled]=\"option.Disabled\"\r\n [class.pg-select-dropdown-menu-item-active]=\"option.Value == _activeFilterOption?.Value\"\r\n [class.pg-select-dropdown-menu-item-selected]=\"(option.Value==(_selectedOption?.Value))||(isInSet(_selectedOptions,option))\"\r\n class=\"pg-select-dropdown-menu-item\" (click)=\"clickOption(option,$event)\">\r\n <ng-template *ngIf=\"option.OptionTemplate\" [ngTemplateOutlet]=\"option.OptionTemplate\">\r\n </ng-template>\r\n <ng-template [ngIf]=\"!option.OptionTemplate\">\r\n {{ option.Label }}\r\n </ng-template>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>" }]
1339
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { searchInputElementRef: [{
1340
+ type: ViewChild,
1341
+ args: ["searchInput"]
1342
+ }], trigger: [{
1343
+ type: ViewChild,
1344
+ args: ["trigger"]
1345
+ }], dropdownUl: [{
1346
+ type: ViewChild,
1347
+ args: ["dropdownUl"]
1348
+ }], SearchChange: [{
1349
+ type: Output
1350
+ }], change: [{
1351
+ type: Output
1352
+ }], OpenChange: [{
1353
+ type: Output
1354
+ }], ScrollToBottom: [{
1355
+ type: Output
1356
+ }], Filter: [{
1357
+ type: Input
1358
+ }], MaxMultiple: [{
1359
+ type: Input
1360
+ }], FirstDefault: [{
1361
+ type: Input
1362
+ }], _cdkOverlay: [{
1363
+ type: ViewChild,
1364
+ args: [CdkConnectedOverlay]
1365
+ }], AllowClear: [{
1366
+ type: Input
1367
+ }], KeepUnListOptions: [{
1368
+ type: Input
1369
+ }], Mode: [{
1370
+ type: Input
1371
+ }], Multiple: [{
1372
+ type: Input
1373
+ }], PlaceHolder: [{
1374
+ type: Input
1375
+ }], NotFoundContent: [{
1376
+ type: Input
1377
+ }], Size: [{
1378
+ type: Input
1379
+ }], ShowSearch: [{
1380
+ type: Input
1381
+ }], Tags: [{
1382
+ type: Input
1383
+ }], Disabled: [{
1384
+ type: Input
1385
+ }], Open: [{
1386
+ type: Input
1387
+ }], onClick: [{
1388
+ type: HostListener,
1389
+ args: ["click", ["$event"]]
1390
+ }], onKeyDown: [{
1391
+ type: HostListener,
1392
+ args: ["keydown", ["$event"]]
1393
+ }] } });
1462
1394
 
1463
1395
  /**
1464
- * complex but work well
1465
- * TODO: rebuild latter
1396
+ * @skipTemplateDoc true
1397
+ * Component for representing an option in a dropdown list.
1398
+ *
1399
+ *```
1400
+ * <mefdev-select>
1401
+ * <mefdev-option Value="1" Label="Option 1"></mefdev-option>
1402
+ * <mefdev-option Value="2" Label="Option 2"></mefdev-option>
1403
+ * <mefdev-option Value="3" Label="Option 3"></mefdev-option>
1404
+ * </mefdev-select>
1405
+ *```
1406
+ *
1466
1407
  */
1467
- /**
1468
- * Example of usage:
1469
- * <example-url>https://mef.dev/ui_kit_demo/view/select</example-url>
1470
- */
1471
- class MefDevSelectComponent {
1472
- _elementRef;
1473
- _renderer;
1474
- cDRef;
1475
- _allowClear = false;
1408
+ class MefDevOptionComponent {
1409
+ _Select;
1476
1410
  _disabled = false;
1477
- _isTags = false;
1478
- _isMultiple = false;
1479
- _keepUnListOptions = false;
1480
- _showSearch = false;
1481
- _el;
1482
- _isOpen = false;
1483
- _prefixCls = "pg-select";
1484
- _classList = [];
1485
- _dropDownClassMap;
1486
- _dropDownPrefixCls = `${this._prefixCls}-dropdown`;
1487
- _selectionClassMap;
1488
- _selectionPrefixCls = `${this._prefixCls}-selection`;
1489
- _size;
1490
1411
  _value;
1491
- _placeholder = "placeholder";
1492
- _notFoundContent = "No Content";
1493
- _searchText = "";
1494
- _triggerWidth = 0;
1495
- _selectedOption;
1496
- _operatingMultipleOption;
1497
- _selectedOptions = new Set();
1498
- _options = [];
1499
- _cacheOptions = [];
1500
- _filterOptions = [];
1501
- _tagsOptions = [];
1502
- _activeFilterOption;
1503
- _isMultiInit = false;
1504
- _dropDownPosition = "bottom";
1505
- _composing = false;
1506
- _mode;
1507
- // ngModel Access
1508
- onChange = () => null;
1509
- onTouched = () => null;
1510
- searchInputElementRef;
1511
- trigger;
1512
- dropdownUl;
1513
- SearchChange = new EventEmitter();
1514
- change = new EventEmitter();
1515
- OpenChange = new EventEmitter();
1516
- ScrollToBottom = new EventEmitter();
1517
- Filter = true;
1518
- MaxMultiple = Infinity;
1519
- FirstDefault = false;
1520
- _cdkOverlay;
1521
- set AllowClear(value) {
1522
- this._allowClear = toBoolean(value);
1523
- }
1524
- get AllowClear() {
1525
- return this._allowClear;
1526
- }
1527
- set KeepUnListOptions(value) {
1528
- this._keepUnListOptions = toBoolean(value);
1529
- }
1530
- get KeepUnListOptions() {
1531
- return this._keepUnListOptions;
1532
- }
1533
- set Mode(value) {
1534
- this._mode = value;
1535
- if (this._mode === "multiple") {
1536
- this.Multiple = true;
1537
- }
1538
- else if (this._mode === "tags") {
1539
- this.Tags = true;
1540
- }
1541
- else if (this._mode === "combobox") {
1542
- this.ShowSearch = true;
1543
- }
1544
- }
1545
- set Multiple(value) {
1546
- this._isMultiple = toBoolean(value);
1547
- if (this._isMultiple) {
1548
- this.ShowSearch = true;
1412
+ _label;
1413
+ /**
1414
+ * Template for the content of the option.
1415
+ */
1416
+ OptionTemplate;
1417
+ /**
1418
+ * The value of the option.
1419
+ */
1420
+ set Value(value) {
1421
+ if (this._value === value) {
1422
+ return;
1549
1423
  }
1424
+ this._value = value;
1550
1425
  }
1551
- get Multiple() {
1552
- return this._isMultiple;
1553
- }
1554
- set PlaceHolder(value) {
1555
- this._placeholder = value;
1556
- }
1557
- get PlaceHolder() {
1558
- return this._placeholder;
1559
- }
1560
- set NotFoundContent(value) {
1561
- this._notFoundContent = value;
1562
- }
1563
- get NotFoundContent() {
1564
- return this._notFoundContent;
1565
- }
1566
- set Size(value) {
1567
- // @ts-ignore
1568
- this._size = { large: "lg", small: "sm" }[value];
1569
- this.setClassMap();
1570
- }
1571
- get Size() {
1572
- return this._size;
1573
- }
1574
- set ShowSearch(value) {
1575
- this._showSearch = toBoolean(value);
1576
- }
1577
- get ShowSearch() {
1578
- return this._showSearch;
1426
+ get Value() {
1427
+ return this._value;
1579
1428
  }
1580
- set Tags(value) {
1581
- const isTags = toBoolean(value);
1582
- this._isTags = isTags;
1583
- this.Multiple = isTags;
1429
+ /**
1430
+ * The label of the option.
1431
+ */
1432
+ set Label(value) {
1433
+ if (this._label === value) {
1434
+ return;
1435
+ }
1436
+ this._label = value;
1584
1437
  }
1585
- get Tags() {
1586
- return this._isTags;
1438
+ get Label() {
1439
+ return this._label;
1587
1440
  }
1441
+ /**
1442
+ * Indicates whether the option is disabled.
1443
+ */
1588
1444
  set Disabled(value) {
1589
1445
  this._disabled = toBoolean(value);
1590
- this.closeDropDown();
1591
- this.setClassMap();
1592
1446
  }
1593
1447
  get Disabled() {
1594
1448
  return this._disabled;
1595
1449
  }
1596
- set Open(value) {
1597
- const isOpen = toBoolean(value);
1598
- if (this._isOpen === isOpen) {
1599
- return;
1600
- }
1601
- if (isOpen) {
1602
- this.scrollToActive();
1603
- this._setTriggerWidth();
1450
+ constructor(_Select) {
1451
+ this._Select = _Select;
1452
+ }
1453
+ /**
1454
+ * Initialization lifecycle hook.
1455
+ * Adds the option to the dropdown list.
1456
+ */
1457
+ ngOnInit() {
1458
+ this._Select.addOption(this);
1459
+ }
1460
+ /**
1461
+ * Destruction lifecycle hook.
1462
+ * Removes the option from the dropdown list.
1463
+ */
1464
+ ngOnDestroy() {
1465
+ this._Select.removeOption(this);
1466
+ }
1467
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevOptionComponent, deps: [{ token: MefDevSelectComponent }], target: i0.ɵɵFactoryTarget.Component });
1468
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefDevOptionComponent, selector: "mefdev-option", inputs: { Value: "Value", Label: "Label", Disabled: "Disabled" }, queries: [{ propertyName: "OptionTemplate", first: true, predicate: ["OptionTemplate"], descendants: true }], ngImport: i0, template: "<ng-content></ng-content>", encapsulation: i0.ViewEncapsulation.None });
1469
+ }
1470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevOptionComponent, decorators: [{
1471
+ type: Component,
1472
+ args: [{ selector: "mefdev-option", encapsulation: ViewEncapsulation.None, template: "<ng-content></ng-content>" }]
1473
+ }], ctorParameters: function () { return [{ type: MefDevSelectComponent }]; }, propDecorators: { OptionTemplate: [{
1474
+ type: ContentChild,
1475
+ args: ["OptionTemplate"]
1476
+ }], Value: [{
1477
+ type: Input
1478
+ }], Label: [{
1479
+ type: Input
1480
+ }], Disabled: [{
1481
+ type: Input
1482
+ }] } });
1483
+
1484
+ /**
1485
+ * Datepicker Component for selecting dates.
1486
+ *
1487
+ * This component allows users to pick a date from a calendar interface.
1488
+ * It supports various configuration options such as language, date format, and date range.
1489
+ *
1490
+ * @example
1491
+ * <mefdev-datepicker
1492
+ * [lang]="'uk'"
1493
+ * [dateFormat]="'dd/MM/yyyy'"
1494
+ * [range]="{startYear: 1900, toYear: 300}"
1495
+ * [disabled]="false"
1496
+ * (dateChanged)="onDateChanged($event)"
1497
+ * [topOffset]="'20'"
1498
+ * [leftOffset]="'10'">
1499
+ * </mefdev-datepicker>
1500
+ *
1501
+ * <example-url>https://mef.dev/ui_kit_demo/view/utils/datepicker</example-url>
1502
+ */
1503
+ class DatepickerComponent {
1504
+ datePipe;
1505
+ elementRef;
1506
+ /**
1507
+ * Flag to determine if the calendar is open or closed.
1508
+ * Default value: false (closed).
1509
+ */
1510
+ isCalendarOpen = false;
1511
+ /**
1512
+ * Flag to determine if the component is in editing mode.
1513
+ * Default value: false (not in editing mode).
1514
+ */
1515
+ isEditing = false;
1516
+ /**
1517
+ * The currently selected date.
1518
+ * Default value: Today's date.
1519
+ */
1520
+ selectedDate = new Date();
1521
+ /**
1522
+ * The formatted date for display in the input.
1523
+ * Default value: Formatted representation of the selected date.
1524
+ */
1525
+ formattedDate;
1526
+ /**
1527
+ * Track the edited date separately when in editing mode.
1528
+ * Default value: An empty string.
1529
+ */
1530
+ editedDate = '';
1531
+ /**
1532
+ * Flag to determine if the month dropdown is open or closed.
1533
+ * Default value: true (open).
1534
+ */
1535
+ isMonthDropdownOpen = true;
1536
+ /**
1537
+ * Flag to determine if the year dropdown is open or closed.
1538
+ * Default value: true (open).
1539
+ */
1540
+ isYearDropdownOpen = true;
1541
+ /**
1542
+ * The selected month (0-11).
1543
+ * Default value: The month of the selected date.
1544
+ */
1545
+ selectedDateMonth = this.selectedDate.getMonth();
1546
+ /**
1547
+ * The selected year.
1548
+ * Default value: The year of the selected date.
1549
+ */
1550
+ selectedDateYear = this.selectedDate.getFullYear();
1551
+ /**
1552
+ * An array of years for the year dropdown.
1553
+ * Default value: An array of years within the specified range.
1554
+ */
1555
+ years;
1556
+ /**
1557
+ * The language/locale for the datepicker.
1558
+ * Default value: 'en' (English).
1559
+ * @example
1560
+ * <mefdev-datepicker
1561
+ * [lang] = "'uk'">
1562
+ * </mefdev-datepicker>
1563
+ */
1564
+ lang = 'en';
1565
+ /**
1566
+ * The date format for displaying the selected date.
1567
+ * Default value: 'EEE MMM dd yyyy'.
1568
+ * @example
1569
+ * <mefdev-datepicker
1570
+ * [dateFormat]="'dd/MM/yyyy'">
1571
+ * </mefdev-datepicker>
1572
+ */
1573
+ dateFormat = 'EEE MMM dd yyyy';
1574
+ /**
1575
+ * The range of years available in the year dropdown.
1576
+ * Default value: { startYear: 1900, toYear: 300 }.
1577
+ * @example
1578
+ * <mefdev-datepicker
1579
+ * [range]="{startYear: 1900, toYear: 300}">
1580
+ * </mefdev-datepicker>
1581
+ */
1582
+ yearsRange = { startYear: 1900, toYear: 300 };
1583
+ /**
1584
+ * Whether the datepicker is disabled or not.
1585
+ * Default value: false (enabled).
1586
+ * @example
1587
+ * <mefdev-datepicker
1588
+ * [disabled]="false">
1589
+ * </mefdev-datepicker>
1590
+ */
1591
+ disabled = false;
1592
+ /**
1593
+ * The top offset for positioning the datepicker.
1594
+ * Default value: '20'.
1595
+ * @example
1596
+ * <mefdev-datepicker
1597
+ * [topOffset]="'20'">
1598
+ * </mefdev-datepicker>
1599
+ */
1600
+ topOffset = '20';
1601
+ /**
1602
+ * The left offset for positioning the datepicker.
1603
+ * Default value: '10'.
1604
+ * @example
1605
+ * <mefdev-datepicker
1606
+ * [leftOffset]="'10'">
1607
+ * </mefdev-datepicker>
1608
+ */
1609
+ leftOffset = '10'; //Default value
1610
+ /**
1611
+ * Event emitted when the selected date in the datepicker changes.
1612
+ * It emits a `Date` object representing the selected date.
1613
+ * @example
1614
+ * <mefdev-datepicker
1615
+ * (dateChanged)="onDateChanged($event)">
1616
+ * </mefdev-datepicker>
1617
+ */
1618
+ dateChanged = new EventEmitter();
1619
+ /**
1620
+ * Regular expression to validate user input for date in the format "dd/MM/yyyy".
1621
+ * - The day (dd) should be between 01 and 31.
1622
+ * - The month (MM) should be between 01 and 12.
1623
+ * - The year (yyyy) should be a 4-digit number.
1624
+ */
1625
+ dateRegExp = /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/;
1626
+ /**
1627
+ * The string entered by the user for date input.
1628
+ * This variable stores the user's input as they type in the date field.
1629
+ */
1630
+ userInput = '';
1631
+ /**
1632
+ * Host listener for document click events to handle calendar interaction.
1633
+ * This function checks if a click event occurred within the calendar or input elements.
1634
+ * - If the click occurred within the calendar, no action is taken.
1635
+ * - If the click occurred within the input element and the component is not in editing mode,
1636
+ * it opens the calendar.
1637
+ * - If the click occurred outside the calendar and input, it closes the calendar.
1638
+ * @param event The MouseEvent object representing the click event.
1639
+ */
1640
+ onClick(event) {
1641
+ const targetElement = event.target;
1642
+ const calendarElement = this.elementRef.nativeElement.querySelector('.calendar');
1643
+ const inputElement = this.elementRef.nativeElement.querySelector('input');
1644
+ if (calendarElement && calendarElement.contains(targetElement)) {
1645
+ // Клік відбувся на елементі календаря, нічого не робимо
1646
+ return;
1604
1647
  }
1605
- this._isOpen = isOpen;
1606
- this.OpenChange.emit(this._isOpen);
1607
- this.setClassMap();
1608
- if (this._isOpen) {
1609
- setTimeout(() => {
1610
- this.checkDropDownScroll();
1611
- });
1648
+ if (inputElement && inputElement.contains(targetElement) && !this.isEditing) {
1649
+ // Клік відбувся на елементі input, відкриваємо календар
1650
+ this.isCalendarOpen = true;
1651
+ }
1652
+ else {
1653
+ // Клік відбувся поза календарем та input, закриваємо календар
1654
+ this.isCalendarOpen = false;
1612
1655
  }
1613
1656
  }
1614
- get Open() {
1615
- return this._isOpen;
1657
+ /**
1658
+ * Constructor for the DatepickerComponent class.
1659
+ * @param datePipe A service for formatting and parsing dates.
1660
+ * @param elementRef A reference to the element on which this component is attached.
1661
+ * It is used to access DOM elements.
1662
+ */
1663
+ constructor(datePipe, elementRef) {
1664
+ this.datePipe = datePipe;
1665
+ this.elementRef = elementRef;
1666
+ this.updateInputValue();
1616
1667
  }
1617
- /** new -option insert or new tags insert */
1618
- // @ts-ignore
1619
- addOption = option => {
1620
- this._options.push(option);
1621
- if (!this._isTags) {
1622
- if (option.Value) {
1623
- this.updateSelectedOption(this._value);
1624
- }
1625
- else {
1626
- this.forceUpdateSelectedOption(this._value);
1627
- }
1628
- }
1629
- };
1630
- /** -option remove or tags remove */
1631
- removeOption(option) {
1632
- this._options.splice(this._options.indexOf(option), 1);
1633
- if (!this._isTags) {
1634
- this.forceUpdateSelectedOption(this._value);
1635
- }
1668
+ /**
1669
+ * Lifecycle hook called after the component is initialized.
1670
+ * It initializes the years for the year select dropdown.
1671
+ */
1672
+ ngOnInit() {
1673
+ this.initializeYears();
1636
1674
  }
1637
- /** dropdown position changed */
1638
- onPositionChange(position) {
1639
- this._dropDownPosition = position.connectionPair.originY;
1675
+ /**
1676
+ * Lifecycle hook called whenever the input properties of the component change.
1677
+ * It updates the input value.
1678
+ */
1679
+ ngOnChanges() {
1680
+ this.updateInputValue();
1640
1681
  }
1641
- compositionStart() {
1642
- this._composing = true;
1682
+ /**
1683
+ * An array of month names based on the selected language.
1684
+ * It provides localized month names for display in the datepicker.
1685
+ */
1686
+ get months() {
1687
+ return this.getMonthList(this.lang);
1643
1688
  }
1644
- compositionEnd() {
1645
- this._composing = false;
1689
+ /**
1690
+ * An array of weekday names based on the selected language.
1691
+ * It provides localized weekday names for display in the datepicker.
1692
+ */
1693
+ get weekdays() {
1694
+ return this.getWeekdayList(this.lang);
1646
1695
  }
1647
- /** clear single selected option */
1648
- clearSelect($event) {
1649
- if ($event) {
1650
- $event.preventDefault();
1651
- $event.stopPropagation();
1652
- } // @ts-ignore
1653
- this._selectedOption = null; // @ts-ignore
1654
- this.Value = null; // @ts-ignore
1655
- this.onChange(null);
1696
+ /**
1697
+ * Initialize the list of years to be displayed in the year dropdown.
1698
+ * This method populates the 'years' array with a range of years based on the provided 'yearsRange' configuration.
1699
+ * @example
1700
+ * ```
1701
+ * // Assuming 'yearsRange' is { startYear: 1900, toYear: 300 }
1702
+ * // After calling initializeYears(), 'years' might contain [1900, 1901, ..., 300]
1703
+ * this.initializeYears();
1704
+ * ```
1705
+ */
1706
+ initializeYears() {
1707
+ this.years = Array.from({ length: this.yearsRange.toYear }, (_, index) => index + this.yearsRange.startYear);
1656
1708
  }
1657
- /** click dropdown option by user */
1658
- clickOption(option, $event) {
1659
- if (!option) {
1660
- return;
1661
- }
1662
- this.chooseOption(option, true, $event);
1663
- this.clearSearchText();
1664
- if (!this._isMultiple) {
1665
- this.Open = false;
1666
- }
1709
+ /**
1710
+ * Toggle the editing mode for the date input. When enabled, the user can edit the date directly in the input field.
1711
+ * This method sets the 'isEditing' flag to true and stores the current formatted date for editing.
1712
+ */
1713
+ toggleEdit() {
1714
+ this.isEditing = true;
1715
+ this.editedDate = this.formatSelectedDate(); // Store the current formatted date for editing
1667
1716
  }
1668
- /** choose option */
1669
- chooseOption(option, isUserClick = false, $event) {
1670
- if ($event) {
1671
- $event.preventDefault();
1672
- $event.stopPropagation();
1673
- }
1674
- this._activeFilterOption = option;
1675
- if (option && !option.Disabled) {
1676
- if (!this.Multiple) {
1677
- this._selectedOption = option;
1678
- this._value = option.Value;
1679
- if (isUserClick) {
1680
- this.change.next(this._value);
1681
- this.onChange(option.Value);
1682
- }
1683
- }
1684
- else {
1685
- if (isUserClick) {
1686
- this.isInSet(this._selectedOptions, option)
1687
- ? this.unSelectMultipleOption(option)
1688
- : this.selectMultipleOption(option);
1689
- }
1690
- }
1691
- }
1717
+ /**
1718
+ * Get a list of month names in the specified language and format.
1719
+ * @param locales - An optional parameter specifying the locale or locales to use for formatting.
1720
+ * @param format - The format for month names, either "long" (default) or "short".
1721
+ * @returns An array of month names based on the provided format and locale.
1722
+ * ```
1723
+ * // Get a list of month names in the default language and long format
1724
+ * const months = this.getMonthList(this.lang);
1725
+ * ```
1726
+ */
1727
+ getMonthList(locales, format = "long") {
1728
+ const year = new Date().getFullYear();
1729
+ const monthList = [...Array(12).keys()];
1730
+ const formatter = new Intl.DateTimeFormat(locales, { month: format });
1731
+ const getMonthName = (monthIndex) => formatter.format(new Date(year, monthIndex));
1732
+ return monthList.map(getMonthName);
1733
+ }
1734
+ /**
1735
+ * Get a list of weekday names in the specified language and format.
1736
+ * @param locales - An optional parameter specifying the locale or locales to use for formatting.
1737
+ * @param format - The format for weekday names, either "short" (default) or "long".
1738
+ * @returns An array of weekday names based on the provided format and locale.
1739
+ * ```
1740
+ * // Get a list of weekday names in the default language and short format
1741
+ * const weekdays = this.getWeekdayList();
1742
+ * ```
1743
+ */
1744
+ getWeekdayList(locales, format = "short") {
1745
+ const weekdays = [...Array(7).keys()];
1746
+ const mondayIndex = weekdays.indexOf(0);
1747
+ weekdays.splice(mondayIndex, 1);
1748
+ weekdays.push(0);
1749
+ const formatter = new Intl.DateTimeFormat(locales, { weekday: format });
1750
+ const getWeekdayName = (weekdayIndex) => {
1751
+ return formatter.format(new Date(2023, 9, weekdayIndex + 1));
1752
+ };
1753
+ return weekdays.map(getWeekdayName);
1692
1754
  }
1693
- updateWidth(element, text) {
1694
- if (text) {
1695
- /** wait for scroll width change */ // @ts-ignore
1696
- setTimeout(_ => {
1697
- this._renderer.setStyle(element, "width", `${element.scrollWidth}px`);
1698
- });
1755
+ /**
1756
+ * Toggle the visibility of the calendar component. When called, this method changes the 'isCalendarOpen' flag
1757
+ * to show or hide the calendar interface.
1758
+ * ```
1759
+ * // Toggle the visibility of the calendar
1760
+ * this.toggleCalendar();
1761
+ * ```
1762
+ */
1763
+ toggleCalendar() {
1764
+ this.isCalendarOpen = !this.isCalendarOpen;
1765
+ }
1766
+ /**
1767
+ * Save the edited date input by the user, provided it matches the specified date format.
1768
+ * This method checks if the entered date is in a valid format, disables the editing mode, and applies
1769
+ * the edited date to the 'selectedDate'. It then reformats the selected date and closes the calendar.
1770
+ * ```
1771
+ * // Save the edited date and update the selected date
1772
+ * this.saveEditedDate();
1773
+ * ```
1774
+ */
1775
+ saveEditedDate() {
1776
+ if (this.isDateValid(this.editedDate)) {
1777
+ this.isEditing = false;
1778
+ const [day, month, year] = this.editedDate.split('/');
1779
+ this.selectedDate = new Date(+year, +month - 1, +day);
1780
+ this.formatDate();
1781
+ this.toggleCalendar();
1699
1782
  }
1700
- else {
1701
- this._renderer.removeStyle(element, "width");
1783
+ }
1784
+ /**
1785
+ * Handle user input in the editable input field for date editing. This method captures the input value
1786
+ * and stores it in the 'editedDate' variable. If the input matches the valid date format, it updates
1787
+ * 'selectedDateMonth' and 'selectedDateYear' accordingly.
1788
+ * @param event - The input event containing the user's input.
1789
+ * ```
1790
+ * // Handle user input in the editable input field
1791
+ * this.onDateInput(event);
1792
+ * ```
1793
+ */
1794
+ onDateInput(event) {
1795
+ const inputDate = event.target.value;
1796
+ if (this.isDateValid(inputDate)) {
1797
+ this.editedDate = inputDate;
1798
+ const parsedDate = inputDate.split('/');
1799
+ this.selectedDateMonth = +parsedDate[1] - 1;
1800
+ this.selectedDateYear = +parsedDate[2];
1702
1801
  }
1703
1802
  }
1704
- /** determine if option in set */
1705
- isInSet(set, option) {
1706
- return Array.from(set).find((data) => data.Value === option.Value);
1803
+ /**
1804
+ * Toggle the visibility of the month dropdown in the calendar interface.
1805
+ * This method is used to open or close the dropdown for selecting months.
1806
+ * @param event - The event triggering the toggle action (e.g., a click event).
1807
+ * ```
1808
+ * // Toggle the visibility of the month dropdown
1809
+ * this.toggleMonthDropdown(event);
1810
+ * ```
1811
+ */
1812
+ toggleMonthDropdown(event) {
1813
+ this.isMonthDropdownOpen = !this.isMonthDropdownOpen;
1707
1814
  }
1708
- /** cancel select multiple option */ // @ts-ignore
1709
- unSelectMultipleOption = (option, $event, emitChange = true) => {
1710
- this._operatingMultipleOption = option;
1711
- this._selectedOptions.delete(option);
1712
- if (emitChange) {
1713
- this.emitMultipleOptions();
1714
- }
1715
- // 对Tag进行特殊处理
1716
- if (this._isTags &&
1717
- this._options.indexOf(option) !== -1 &&
1718
- this._tagsOptions.indexOf(option) !== -1) {
1719
- this.removeOption(option);
1720
- this._tagsOptions.splice(this._tagsOptions.indexOf(option), 1);
1721
- }
1722
- if ($event) {
1723
- $event.preventDefault();
1724
- $event.stopPropagation();
1725
- }
1726
- };
1727
- /** select multiple option */
1728
- selectMultipleOption(option, $event) {
1729
- /** if tags do push to tag option */
1730
- if (this._isTags &&
1731
- this._options.indexOf(option) === -1 &&
1732
- this._tagsOptions.indexOf(option) === -1) {
1733
- this.addOption(option);
1734
- this._tagsOptions.push(option);
1735
- }
1736
- this._operatingMultipleOption = option;
1737
- if (this._selectedOptions.size < this.MaxMultiple) {
1738
- this._selectedOptions.add(option);
1739
- }
1740
- this.emitMultipleOptions();
1741
- if ($event) {
1742
- $event.preventDefault();
1743
- $event.stopPropagation();
1744
- }
1815
+ /**
1816
+ * Toggle the visibility of the year dropdown in the calendar interface.
1817
+ * This method is used to open or close the dropdown for selecting years.
1818
+ * @param event - The event triggering the toggle action (e.g., a click event).
1819
+ * ```
1820
+ * // Toggle the visibility of the year dropdown
1821
+ * this.toggleYearDropdown(event);
1822
+ * ```
1823
+ */
1824
+ toggleYearDropdown(event) {
1825
+ this.isYearDropdownOpen = !this.isYearDropdownOpen;
1745
1826
  }
1746
- /** emit multiple options */
1747
- emitMultipleOptions() {
1748
- if (this._isMultiInit) {
1749
- return;
1750
- }
1751
- const arrayOptions = Array.from(this._selectedOptions);
1752
- this._value = arrayOptions.map(item => item.Value);
1753
- this.onChange(this._value);
1827
+ /**
1828
+ * Handle the change of the selected month in the calendar interface.
1829
+ * This method updates the input value, sets the selected date to the first day of the chosen month,
1830
+ * and recalculates the calendar display accordingly.
1831
+ * ```
1832
+ * // Handle the change of the selected month
1833
+ * this.onMonthChange();
1834
+ * ```
1835
+ */
1836
+ onMonthChange() {
1837
+ this.updateInputValue();
1838
+ this.selectedDate = new Date(this.selectedDateYear, this.selectedDateMonth, 1);
1839
+ this.calculateFirstDayOfCalendar();
1754
1840
  }
1755
- /** update selected option when add remove option etc */
1756
- updateSelectedOption(currentModelValue, triggerByNgModel = false) {
1757
- if (currentModelValue == null) {
1758
- return;
1759
- }
1760
- if (this.Multiple) {
1761
- const selectedOptions = this._options.filter(item => {
1762
- return item != null && currentModelValue.indexOf(item.Value) !== -1;
1763
- });
1764
- if ((this.KeepUnListOptions || this.Tags) && !triggerByNgModel) {
1765
- const _selectedOptions = Array.from(this._selectedOptions);
1766
- selectedOptions.forEach(option => {
1767
- const _exist = _selectedOptions.some(item => item._value == option._value);
1768
- if (!_exist) {
1769
- this._selectedOptions.add(option);
1770
- }
1771
- });
1772
- }
1773
- else {
1774
- this._selectedOptions = new Set();
1775
- selectedOptions.forEach(option => {
1776
- this._selectedOptions.add(option);
1777
- });
1778
- }
1779
- }
1780
- else {
1781
- const selectedOption = this._options.filter(item => {
1782
- return item != null && item.Value == currentModelValue;
1783
- });
1784
- this.chooseOption(selectedOption[0]);
1785
- }
1841
+ /**
1842
+ * Handle the change of the selected year in the calendar interface.
1843
+ * This method updates the input value, sets the selected date to the first day of the chosen year,
1844
+ * reformats the selected date, and recalculates the calendar display.
1845
+ * ```
1846
+ * // Handle the change of the selected year
1847
+ * this.onYearChange();
1848
+ * ```
1849
+ */
1850
+ onYearChange() {
1851
+ this.updateInputValue();
1852
+ this.selectedDate = new Date(this.selectedDateYear, this.selectedDateMonth, 1);
1853
+ this.formatDate();
1854
+ this.calculateFirstDayOfCalendar();
1786
1855
  }
1787
- forceUpdateSelectedOption(value) {
1788
- /** trigger dirty check */ // @ts-ignore
1789
- setTimeout(_ => {
1790
- this.updateSelectedOption(value);
1791
- });
1856
+ /**
1857
+ * Select a date in the calendar interface and perform necessary updates.
1858
+ * This method sets the selected date, formats it, closes the calendar, and emits a dateChanged event.
1859
+ * It also updates the selected month and year dropdown values.
1860
+ * @param date - The date to be selected in the calendar.
1861
+ */
1862
+ selectDate(date) {
1863
+ this.selectedDate = date;
1864
+ this.formatDate();
1865
+ this.isCalendarOpen = false;
1866
+ this.dateChanged.next(this.selectedDate);
1867
+ this.selectedDateMonth = this.selectedDate.getMonth();
1868
+ this.selectedDateYear = this.selectedDate.getFullYear();
1869
+ }
1870
+ /**
1871
+ * Format the selected date based on the chosen date format and language.
1872
+ * This method uses the Angular DatePipe to format the selected date and updates the formattedDate variable.
1873
+ * ```
1874
+ * // Format the selected date
1875
+ * this.formatDate();
1876
+ * ```
1877
+ */
1878
+ formatDate() {
1879
+ this.formattedDate = this.datePipe.transform(this.selectedDate, this.dateFormat) || '';
1880
+ }
1881
+ /**
1882
+ * Format the selected date based on the chosen date format, language, and locale.
1883
+ * This method uses the Angular DatePipe to format the selected date with the specified language and updates the formatted date as a string.
1884
+ * @returns A formatted date string.
1885
+ * ```
1886
+ * // Format the selected date with language
1887
+ * const formatted = this.formatSelectedDate();
1888
+ * ```
1889
+ */
1890
+ formatSelectedDate() {
1891
+ return this.datePipe.transform(this.selectedDate, this.dateFormat, this.lang) || '';
1892
+ }
1893
+ /**
1894
+ * Update the input value displayed in the calendar interface.
1895
+ * This method updates the input value to either the edited date or the formatted selected date,
1896
+ * depending on whether the user is in edit mode or not.
1897
+ * ```
1898
+ * // Update the input value
1899
+ * this.updateInputValue();
1900
+ * ```
1901
+ */
1902
+ updateInputValue() {
1903
+ this.formattedDate = this.isEditing ? this.editedDate : this.formatSelectedDate();
1904
+ }
1905
+ /**
1906
+ * Get an array of arrays representing the days of the current month.
1907
+ * Each sub-array contains the day data for a week, and each day data object includes the date and whether it belongs to the current month.
1908
+ * @returns An array of arrays representing the days of the current month.
1909
+ * ```
1910
+ * // Get an array of arrays representing the days of the current month
1911
+ * const calendar = this.calendarDays;
1912
+ * ```
1913
+ */
1914
+ get calendarDays() {
1915
+ return this.calculateFirstDayOfCalendar();
1916
+ }
1917
+ /**
1918
+ * Get the date of the previous month to display in empty cells of the current month.
1919
+ * This method returns the date of the previous month if the provided date is not in the current month.
1920
+ * If the provided date is in the current month, it returns the date's day as a string.
1921
+ * @param date - The date to evaluate.
1922
+ * @returns The date of the previous month or a day string.
1923
+ * ```
1924
+ * // Get the previous month's date to display in empty cells
1925
+ * const previousMonthDate = this.getPreviousMonthDate(new Date(2023, 8, 1));
1926
+ * ```
1927
+ */
1928
+ getPreviousMonthDate(date) {
1929
+ if (!date) {
1930
+ return '';
1931
+ }
1932
+ const currentDate = new Date();
1933
+ if (date.getMonth() === currentDate.getMonth() && date.getFullYear() === currentDate.getFullYear()) {
1934
+ return date.getDate().toString();
1935
+ }
1936
+ else {
1937
+ return this.datePipe.transform(date, 'dd');
1938
+ }
1792
1939
  }
1793
- get Value() {
1794
- return this._value;
1940
+ /**
1941
+ * Navigate to the previous month in the calendar interface.
1942
+ * This method updates the selectedDate, formats it, and recalculates the first day of the calendar.
1943
+ * ```
1944
+ * // Navigate to the previous month
1945
+ * this.getPreviousMonth();
1946
+ * ```
1947
+ */
1948
+ getPreviousMonth() {
1949
+ const currentMonth = this.selectedDate.getMonth();
1950
+ this.selectedDate = new Date(this.selectedDate.getFullYear(), currentMonth - 1, 1);
1951
+ this.formatDate();
1952
+ this.calculateFirstDayOfCalendar();
1795
1953
  }
1796
- set Value(value) {
1797
- this._updateValue(value);
1954
+ /**
1955
+ * Navigate to the next month in the calendar interface.
1956
+ * This method updates the selectedDate, formats it, and recalculates the first day of the calendar.
1957
+ * ```
1958
+ * // Navigate to the next month
1959
+ * this.getNextMonth();
1960
+ * ```
1961
+ */
1962
+ getNextMonth() {
1963
+ const currentMonth = this.selectedDate.getMonth();
1964
+ this.selectedDate = new Date(this.selectedDate.getFullYear(), currentMonth + 1, 1);
1965
+ this.formatDate();
1966
+ this.calculateFirstDayOfCalendar();
1798
1967
  }
1799
- clearAllSelectedOption(emitChange = true) {
1800
- this._selectedOptions.forEach(item => {
1801
- this.unSelectMultipleOption(item, null, emitChange);
1802
- });
1968
+ /**
1969
+ * Get the number of days in a given month of a specific year.
1970
+ * @param year - The year for which you want to determine the number of days.
1971
+ * @param month - The month (0-based index) for which you want to determine the number of days.
1972
+ * @returns The number of days in the specified month of the given year.
1973
+ */
1974
+ daysInMonth(year, month) {
1975
+ return new Date(year, month + 1, 0).getDate();
1803
1976
  }
1804
- handleKeyEnterEvent(event) {
1805
- /** when composing end */
1806
- if (!this._composing && this._isOpen) {
1807
- event.preventDefault();
1808
- event.stopPropagation();
1809
- this.updateFilterOption(false);
1810
- this.clickOption(this._activeFilterOption);
1977
+ /**
1978
+ * Calculate the structure of days in a month for the calendar display.
1979
+ * This method generates a matrix of day data objects representing the days in the calendar.
1980
+ * Each day data object contains the date and whether it belongs to the current month.
1981
+ * @returns A matrix of day data objects for the calendar display.
1982
+ */
1983
+ calculateFirstDayOfCalendar() {
1984
+ const year = this.selectedDate.getFullYear();
1985
+ const month = this.selectedDate.getMonth();
1986
+ const firstDayOfMonth = new Date(year, month, 1);
1987
+ const firstWeekday = firstDayOfMonth.getDay();
1988
+ const startDay = firstWeekday === 0 ? -5 : 2 - firstWeekday;
1989
+ const calendarDays = [];
1990
+ let currentDay = startDay;
1991
+ for (let i = 0; i < 6; i++) {
1992
+ const week = [];
1993
+ for (let j = 0; j < 7; j++) {
1994
+ const day = new Date(year, month, currentDay);
1995
+ const dayData = {
1996
+ date: day,
1997
+ isCurrentMonth: currentDay >= 1 && currentDay <= this.daysInMonth(year, month),
1998
+ };
1999
+ week.push(dayData);
2000
+ currentDay++;
2001
+ }
2002
+ calendarDays.push(week);
1811
2003
  }
2004
+ return calendarDays;
1812
2005
  }
1813
- handleKeyBackspaceEvent(event) {
1814
- if (!this._searchText && !this._composing && this._isMultiple) {
1815
- event.preventDefault();
1816
- const lastOption = Array.from(this._selectedOptions).pop();
1817
- this.unSelectMultipleOption(lastOption);
1818
- }
2006
+ /**
2007
+ * Check if a given date is the currently selected date in the calendar.
2008
+ * @param date - The date to check.
2009
+ * @returns `true` if the provided date matches the selected date, otherwise `false`.
2010
+ * ```
2011
+ * // Check if a date is selected
2012
+ * const isSelected = this.isDateSelected(someDate);
2013
+ * ```
2014
+ */
2015
+ isDateSelected(date) {
2016
+ return date.toDateString() === this.selectedDate.toDateString();
1819
2017
  }
1820
- handleKeyDownEvent($event) {
1821
- if (this._isOpen) {
1822
- $event.preventDefault();
1823
- $event.stopPropagation();
1824
- this._activeFilterOption = this.nextOption(this._activeFilterOption, this._filterOptions.filter(w => !w.Disabled));
1825
- this.scrollToActive();
1826
- }
2018
+ /**
2019
+ * Check if a date string is valid based on the specified date format.
2020
+ * @param inputDate - The date string to validate.
2021
+ * @returns `true` if the input date string is valid, otherwise `false`.
2022
+ * ```
2023
+ * // Check if a date string is valid
2024
+ * const isValidDate = this.isDateValid('05/25/2023');
2025
+ * ```
2026
+ */
2027
+ isDateValid(inputDate) {
2028
+ return this.dateRegExp.test(inputDate);
1827
2029
  }
1828
- handleKeyUpEvent($event) {
1829
- if (this._isOpen) {
1830
- $event.preventDefault();
1831
- $event.stopPropagation();
1832
- this._activeFilterOption = this.preOption(this._activeFilterOption, this._filterOptions.filter(w => !w.Disabled));
1833
- this.scrollToActive();
2030
+ /**
2031
+ * Check if a given date is today's date.
2032
+ * @param date - The date to check.
2033
+ * @returns `true` if the provided date is today's date, otherwise `false`.
2034
+ * ```
2035
+ * // Check if a date is today's date
2036
+ * const isToday = this.isDateToday(someDate);
2037
+ * ```
2038
+ */
2039
+ isDateToday(date) {
2040
+ const today = new Date();
2041
+ return date.toDateString() === today.toDateString();
2042
+ }
2043
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: DatepickerComponent, deps: [{ token: i1.DatePipe }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2044
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: DatepickerComponent, selector: "mefdev-datepicker", inputs: { lang: "lang", dateFormat: "dateFormat", yearsRange: ["range", "yearsRange"], disabled: "disabled", topOffset: "topOffset", leftOffset: "leftOffset" }, outputs: { dateChanged: "dateChanged" }, host: { listeners: { "document:click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"datepicker-container\"\r\n[class.disabled]=\"disabled\"\r\n>\r\n\r\n <!-- Input, save & edit buttons -->\r\n <div class=\"input-container\">\r\n\r\n <div *ngIf=\"!isEditing\">\r\n\r\n <input\r\n type=\"text\"\r\n (click)=\"toggleCalendar()\"\r\n [value]=\"formattedDate\"\r\n [readOnly]=\"true\"\r\n [disabled]=\"isEditing\"\r\n >\r\n </div>\r\n <!-- Edit -->\r\n <i class=\"fa fa-pencil-square-o edit-button\" aria-hidden=\"true\" (click)=\"toggleEdit()\"></i> \r\n\r\n <div *ngIf=\"isEditing\">\r\n <input\r\n type=\"text\"\r\n [value]=\"editedDate\"\r\n (input)=\"onDateInput($event)\"\r\n class=\"border-3\"\r\n (click)=\"toggleCalendar()\"\r\n >\r\n <i class=\"fa fa-floppy-o edit-button\" (click)=\"saveEditedDate()\" aria-hidden=\"true\"></i>\r\n </div> \r\n </div>\r\n\r\n<!-- Calendar(Dropdowns, dates) -->\r\n <div *ngIf=\"isCalendarOpen\" class=\"calendar\" #calendarContainer \r\n [style.top]=\"topOffset\"\r\n [style.left]=\"leftOffset\">\r\n <div class=\"calendar-header\">\r\n <div class=\"monthButtonContainer\">\r\n <!-- Month dropdown -->\r\n <ng-container *ngIf=\"isMonthDropdownOpen; else monthLabel\">\r\n <mefdev-select \r\n class=\"monthDropdown\"\r\n [(ngModel)]=\"selectedDateMonth\" \r\n (ngModelChange)=\"onMonthChange()\"\r\n [PlaceHolder]=\"'month'\"\r\n >\r\n <mefdev-option \r\n *ngFor=\"let month of months; let i = index\" \r\n [Value]=\"i\"\r\n [Label] = \"month\" \r\n \r\n >{{ month }}</mefdev-option>\r\n </mefdev-select>\r\n </ng-container>\r\n <ng-template #monthLabel>\r\n <span (click)=\"toggleMonthDropdown($event)\"></span>\r\n </ng-template>\r\n\r\n <!-- Year dropdown -->\r\n <ng-container *ngIf=\"isYearDropdownOpen; else yearLabel\">\r\n <mefdev-select \r\n class=\"yearDropdown\" \r\n [(ngModel)]=\"selectedDateYear\" \r\n (ngModelChange)=\"onYearChange()\"\r\n [PlaceHolder]=\"'year'\"\r\n >\r\n <mefdev-option \r\n *ngFor=\"let year of years\" \r\n [Label] = \"year\" \r\n [Value]=\"year\" \r\n >{{year}}</mefdev-option>\r\n </mefdev-select>\r\n </ng-container>\r\n <ng-template #yearLabel>\r\n <span (click)=\"toggleYearDropdown($event)\">{{ selectedDateYear }}</span>\r\n </ng-template>\r\n </div>\r\n <!-- Calendar exit button -->\r\n <div>\r\n <i class=\"fa fa-times toggleCalendarButton\" (click)=\"toggleCalendar()\" aria-hidden=\"true\"></i>\r\n </div>\r\n </div>\r\n \r\n <div class=\"calendar-body\">\r\n <table>\r\n <tr>\r\n <th class=\"align-items-center\" *ngFor=\"let weekday of weekdays\">{{ weekday }}</th>\r\n </tr>\r\n <tr *ngFor=\"let week of calendarDays\">\r\n <td *ngFor=\"let dayData of week\" \r\n (click)=\"selectDate(dayData.date)\"\r\n [ngClass]=\"{ 'selected': isDateSelected(dayData.date), 'prev-month': !dayData.isCurrentMonth }\">\r\n\r\n <span class=\"date\" \r\n [class.prev-month]=\"!dayData.isCurrentMonth\"\r\n >\r\n {{ dayData.date.getDate() }}\r\n </span>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.datepicker-container{position:relative;display:inline-block}.datepicker-container.disabled{pointer-events:none;opacity:.8}.input-container{position:relative;display:inline-block}.input-container input[type=text]{cursor:pointer;padding:5px;border:1px solid #929292;border-radius:4px}.input-container input[type=text]:hover{border:1px solid #4D4D4D}.input-container .edit-button{position:absolute;top:0;right:0;height:100%;margin:0;padding:5px 10px;background-color:#eaeaea;border:1px solid #929292;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;display:flex;justify-content:center;align-items:center}.calendar{position:absolute;top:35px;left:10%;border:1px solid #929292;background-color:#eaeaea;border-radius:4px;z-index:1}.calendar .calendar-header{background-color:#fff;text-align:center;justify-content:space-between;display:flex;padding:5px 0}.calendar .calendar-header i.fa{display:flex;justify-content:center;align-items:center;width:30px;height:30px;font-size:20px;border-radius:50%;cursor:pointer;background-color:transparent;border:none;color:#cf0106}.calendar .calendar-header .monthButtonContainer{padding-left:10px;height:45px;min-width:140px;display:flex;align-items:center}.calendar .calendar-header .monthDropdown,.calendar .calendar-header .yearDropdown{height:45px;width:105px;cursor:pointer;display:inline-block;padding:6px 5px;border:1px solid #EAEAEA;border-radius:4px;background-color:#fff;color:#4d4d4d}.calendar .calendar-header .monthDropdown{margin:0 8px 0 0;width:130px}.calendar .calendar-header .monthDropdown:hover,.calendar .calendar-header .yearDropdown:hover{border-color:#f3f3f3}.calendar .calendar-body{padding:5px;width:260px}.calendar .calendar-body td{padding:10px;position:relative}.calendar .calendar-body td.selected{position:relative;color:#fff}.calendar .calendar-body td.selected:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:20%;background-color:#cf0106;z-index:-1;width:30px;height:30px;color:#fff;border:1px solid #373737}.calendar .calendar-body td:hover{color:#fff;font-weight:700;background-color:#929292;border-radius:20%;cursor:pointer}.calendar .calendar-body .date{display:flex;justify-content:center}.calendar .calendar-body .date.prev-month{color:#f3f3f3}\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: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MefDevOptionComponent, selector: "mefdev-option", inputs: ["Value", "Label", "Disabled"] }, { kind: "component", type: MefDevSelectComponent, selector: "mefdev-select", inputs: ["Filter", "MaxMultiple", "FirstDefault", "AllowClear", "KeepUnListOptions", "Mode", "Multiple", "PlaceHolder", "NotFoundContent", "Size", "ShowSearch", "Tags", "Disabled", "Open"], outputs: ["SearchChange", "change", "OpenChange", "ScrollToBottom"] }] });
2045
+ }
2046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: DatepickerComponent, decorators: [{
2047
+ type: Component,
2048
+ args: [{ selector: 'mefdev-datepicker', template: "<div class=\"datepicker-container\"\r\n[class.disabled]=\"disabled\"\r\n>\r\n\r\n <!-- Input, save & edit buttons -->\r\n <div class=\"input-container\">\r\n\r\n <div *ngIf=\"!isEditing\">\r\n\r\n <input\r\n type=\"text\"\r\n (click)=\"toggleCalendar()\"\r\n [value]=\"formattedDate\"\r\n [readOnly]=\"true\"\r\n [disabled]=\"isEditing\"\r\n >\r\n </div>\r\n <!-- Edit -->\r\n <i class=\"fa fa-pencil-square-o edit-button\" aria-hidden=\"true\" (click)=\"toggleEdit()\"></i> \r\n\r\n <div *ngIf=\"isEditing\">\r\n <input\r\n type=\"text\"\r\n [value]=\"editedDate\"\r\n (input)=\"onDateInput($event)\"\r\n class=\"border-3\"\r\n (click)=\"toggleCalendar()\"\r\n >\r\n <i class=\"fa fa-floppy-o edit-button\" (click)=\"saveEditedDate()\" aria-hidden=\"true\"></i>\r\n </div> \r\n </div>\r\n\r\n<!-- Calendar(Dropdowns, dates) -->\r\n <div *ngIf=\"isCalendarOpen\" class=\"calendar\" #calendarContainer \r\n [style.top]=\"topOffset\"\r\n [style.left]=\"leftOffset\">\r\n <div class=\"calendar-header\">\r\n <div class=\"monthButtonContainer\">\r\n <!-- Month dropdown -->\r\n <ng-container *ngIf=\"isMonthDropdownOpen; else monthLabel\">\r\n <mefdev-select \r\n class=\"monthDropdown\"\r\n [(ngModel)]=\"selectedDateMonth\" \r\n (ngModelChange)=\"onMonthChange()\"\r\n [PlaceHolder]=\"'month'\"\r\n >\r\n <mefdev-option \r\n *ngFor=\"let month of months; let i = index\" \r\n [Value]=\"i\"\r\n [Label] = \"month\" \r\n \r\n >{{ month }}</mefdev-option>\r\n </mefdev-select>\r\n </ng-container>\r\n <ng-template #monthLabel>\r\n <span (click)=\"toggleMonthDropdown($event)\"></span>\r\n </ng-template>\r\n\r\n <!-- Year dropdown -->\r\n <ng-container *ngIf=\"isYearDropdownOpen; else yearLabel\">\r\n <mefdev-select \r\n class=\"yearDropdown\" \r\n [(ngModel)]=\"selectedDateYear\" \r\n (ngModelChange)=\"onYearChange()\"\r\n [PlaceHolder]=\"'year'\"\r\n >\r\n <mefdev-option \r\n *ngFor=\"let year of years\" \r\n [Label] = \"year\" \r\n [Value]=\"year\" \r\n >{{year}}</mefdev-option>\r\n </mefdev-select>\r\n </ng-container>\r\n <ng-template #yearLabel>\r\n <span (click)=\"toggleYearDropdown($event)\">{{ selectedDateYear }}</span>\r\n </ng-template>\r\n </div>\r\n <!-- Calendar exit button -->\r\n <div>\r\n <i class=\"fa fa-times toggleCalendarButton\" (click)=\"toggleCalendar()\" aria-hidden=\"true\"></i>\r\n </div>\r\n </div>\r\n \r\n <div class=\"calendar-body\">\r\n <table>\r\n <tr>\r\n <th class=\"align-items-center\" *ngFor=\"let weekday of weekdays\">{{ weekday }}</th>\r\n </tr>\r\n <tr *ngFor=\"let week of calendarDays\">\r\n <td *ngFor=\"let dayData of week\" \r\n (click)=\"selectDate(dayData.date)\"\r\n [ngClass]=\"{ 'selected': isDateSelected(dayData.date), 'prev-month': !dayData.isCurrentMonth }\">\r\n\r\n <span class=\"date\" \r\n [class.prev-month]=\"!dayData.isCurrentMonth\"\r\n >\r\n {{ dayData.date.getDate() }}\r\n </span>\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.datepicker-container{position:relative;display:inline-block}.datepicker-container.disabled{pointer-events:none;opacity:.8}.input-container{position:relative;display:inline-block}.input-container input[type=text]{cursor:pointer;padding:5px;border:1px solid #929292;border-radius:4px}.input-container input[type=text]:hover{border:1px solid #4D4D4D}.input-container .edit-button{position:absolute;top:0;right:0;height:100%;margin:0;padding:5px 10px;background-color:#eaeaea;border:1px solid #929292;border-left:none;border-radius:0 4px 4px 0;cursor:pointer;display:flex;justify-content:center;align-items:center}.calendar{position:absolute;top:35px;left:10%;border:1px solid #929292;background-color:#eaeaea;border-radius:4px;z-index:1}.calendar .calendar-header{background-color:#fff;text-align:center;justify-content:space-between;display:flex;padding:5px 0}.calendar .calendar-header i.fa{display:flex;justify-content:center;align-items:center;width:30px;height:30px;font-size:20px;border-radius:50%;cursor:pointer;background-color:transparent;border:none;color:#cf0106}.calendar .calendar-header .monthButtonContainer{padding-left:10px;height:45px;min-width:140px;display:flex;align-items:center}.calendar .calendar-header .monthDropdown,.calendar .calendar-header .yearDropdown{height:45px;width:105px;cursor:pointer;display:inline-block;padding:6px 5px;border:1px solid #EAEAEA;border-radius:4px;background-color:#fff;color:#4d4d4d}.calendar .calendar-header .monthDropdown{margin:0 8px 0 0;width:130px}.calendar .calendar-header .monthDropdown:hover,.calendar .calendar-header .yearDropdown:hover{border-color:#f3f3f3}.calendar .calendar-body{padding:5px;width:260px}.calendar .calendar-body td{padding:10px;position:relative}.calendar .calendar-body td.selected{position:relative;color:#fff}.calendar .calendar-body td.selected:before{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:20%;background-color:#cf0106;z-index:-1;width:30px;height:30px;color:#fff;border:1px solid #373737}.calendar .calendar-body td:hover{color:#fff;font-weight:700;background-color:#929292;border-radius:20%;cursor:pointer}.calendar .calendar-body .date{display:flex;justify-content:center}.calendar .calendar-body .date.prev-month{color:#f3f3f3}\n"] }]
2049
+ }], ctorParameters: function () { return [{ type: i1.DatePipe }, { type: i0.ElementRef }]; }, propDecorators: { lang: [{
2050
+ type: Input
2051
+ }], dateFormat: [{
2052
+ type: Input
2053
+ }], yearsRange: [{
2054
+ type: Input,
2055
+ args: ['range']
2056
+ }], disabled: [{
2057
+ type: Input
2058
+ }], topOffset: [{
2059
+ type: Input
2060
+ }], leftOffset: [{
2061
+ type: Input
2062
+ }], dateChanged: [{
2063
+ type: Output
2064
+ }], onClick: [{
2065
+ type: HostListener,
2066
+ args: ['document:click', ['$event']]
2067
+ }] } });
2068
+
2069
+ class MefDevSelectModule {
2070
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2071
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, declarations: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent], imports: [CommonModule, FormsModule, OverlayModule], exports: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent] });
2072
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, imports: [CommonModule, FormsModule, OverlayModule] });
2073
+ }
2074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, decorators: [{
2075
+ type: NgModule,
2076
+ args: [{
2077
+ imports: [CommonModule, FormsModule, OverlayModule],
2078
+ declarations: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent],
2079
+ exports: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent]
2080
+ }]
2081
+ }] });
2082
+
2083
+ class MefDevDatepickerModule {
2084
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2085
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: MefDevDatepickerModule, declarations: [DatepickerComponent], imports: [CommonModule, FormsModule, DatePipe, MefDevSelectModule], exports: [DatepickerComponent] });
2086
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevDatepickerModule, providers: [DatePipe], imports: [CommonModule, FormsModule, MefDevSelectModule] });
2087
+ }
2088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevDatepickerModule, decorators: [{
2089
+ type: NgModule,
2090
+ args: [{
2091
+ declarations: [DatepickerComponent],
2092
+ exports: [DatepickerComponent],
2093
+ imports: [CommonModule, FormsModule, DatePipe, MefDevSelectModule],
2094
+ providers: [DatePipe]
2095
+ }]
2096
+ }] });
2097
+
2098
+ /**
2099
+ * Component representing a progress bar.
2100
+ *
2101
+ * Example of usage:
2102
+ *
2103
+ * ```
2104
+ * <mefdev-progress type="linear" color="blue" [thick]="true"></mefdev-progress>
2105
+ * <mefdev-progress type="circle" color="red" [indeterminate]="true"></mefdev-progress>
2106
+ * ```
2107
+ */
2108
+ class MefDevProgressComponent {
2109
+ _value;
2110
+ _value2;
2111
+ /**
2112
+ * The type of progress bar.
2113
+ * Possible values: "linear" | "circle".
2114
+ * Default value: "linear".
2115
+ */
2116
+ type;
2117
+ /**
2118
+ * The color of the progress bar.
2119
+ * Possible values: any valid CSS color value.
2120
+ * Default value: none.
2121
+ */
2122
+ color;
2123
+ /**
2124
+ * Determines whether the progress bar is thick.
2125
+ * Default value: false.
2126
+ */
2127
+ thick;
2128
+ /**
2129
+ * Determines whether the progress bar is indeterminate.
2130
+ * Default value: false.
2131
+ */
2132
+ indeterminate;
2133
+ /**
2134
+ * The value of the progress bar.
2135
+ * For the "circle" type, it should be a number between 0 and 100.
2136
+ */
2137
+ set value(value) {
2138
+ if (this.type == "circle") {
2139
+ this._value = (value / 100) * 360;
2140
+ if (this.value >= 50) {
2141
+ this._value2 = true;
2142
+ }
1834
2143
  }
2144
+ else
2145
+ this._value = value;
1835
2146
  }
1836
- preOption(option, options) {
1837
- return options[options.indexOf(option) - 1] || options[options.length - 1];
2147
+ get value() {
2148
+ return this._value;
1838
2149
  }
1839
- nextOption(option, options) {
1840
- return options[options.indexOf(option) + 1] || options[0];
2150
+ /**
2151
+ * Additional value property.
2152
+ */
2153
+ get value2() {
2154
+ return this._value2;
1841
2155
  }
1842
- clearSearchText() {
1843
- this._searchText = "";
1844
- this.updateFilterOption();
2156
+ constructor() { }
2157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2158
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefDevProgressComponent, selector: "mefdev-progress", inputs: { type: "type", color: "color", thick: "thick", indeterminate: "indeterminate", value: "value" }, ngImport: i0, template: "<div *ngIf=\"type === 'bar'; else circleBlock\">\r\n <div *ngIf=\"indeterminate; else determineBarBlock\">\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar-{{ color }}\" [class.progress-bar-indeterminate]=\"indeterminate\"></div>\r\n </div>\r\n </div>\r\n <ng-template #determineBarBlock>\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar progress-bar-{{ color }}\" [ngStyle]=\"{ width: value + '%' }\"></div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n<ng-template #circleBlock>\r\n <div class=\"progress-circle-{{ color }}\" [class.progress-circle-indeterminate]=\"indeterminate\"\r\n [class.progress-circle]=\"!indeterminate\" [class.progress-circle-thick]=\"thick\">\r\n <div *ngIf=\"indeterminate; else determineBlock\"></div>\r\n <ng-template #determineBlock>\r\n <div class=\"pie\" [ngStyle]=\"_value2 && { clip: 'rect(auto, auto, auto, auto)' }\">\r\n <div class=\"left-side half-circle\" [ngStyle]=\"_value2 && { transform: 'rotate(' + value + 'deg)' }\"></div>\r\n <div class=\"right-side half-circle\" [ngStyle]=\"{\r\n transform:\r\n _value2 === true ? 'rotate(180deg)' : 'rotate(' + value + 'deg)'\r\n }\"></div>\r\n </div>\r\n <div class=\"shadow\"></div>\r\n </ng-template>\r\n </div>\r\n</ng-template>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2159
+ }
2160
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevProgressComponent, decorators: [{
2161
+ type: Component,
2162
+ args: [{ selector: "mefdev-progress", template: "<div *ngIf=\"type === 'bar'; else circleBlock\">\r\n <div *ngIf=\"indeterminate; else determineBarBlock\">\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar-{{ color }}\" [class.progress-bar-indeterminate]=\"indeterminate\"></div>\r\n </div>\r\n </div>\r\n <ng-template #determineBarBlock>\r\n <div class=\"progress\" [class.progress-small]=\"!thick\">\r\n <div class=\"progress-bar progress-bar-{{ color }}\" [ngStyle]=\"{ width: value + '%' }\"></div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n<ng-template #circleBlock>\r\n <div class=\"progress-circle-{{ color }}\" [class.progress-circle-indeterminate]=\"indeterminate\"\r\n [class.progress-circle]=\"!indeterminate\" [class.progress-circle-thick]=\"thick\">\r\n <div *ngIf=\"indeterminate; else determineBlock\"></div>\r\n <ng-template #determineBlock>\r\n <div class=\"pie\" [ngStyle]=\"_value2 && { clip: 'rect(auto, auto, auto, auto)' }\">\r\n <div class=\"left-side half-circle\" [ngStyle]=\"_value2 && { transform: 'rotate(' + value + 'deg)' }\"></div>\r\n <div class=\"right-side half-circle\" [ngStyle]=\"{\r\n transform:\r\n _value2 === true ? 'rotate(180deg)' : 'rotate(' + value + 'deg)'\r\n }\"></div>\r\n </div>\r\n <div class=\"shadow\"></div>\r\n </ng-template>\r\n </div>\r\n</ng-template>" }]
2163
+ }], ctorParameters: function () { return []; }, propDecorators: { type: [{
2164
+ type: Input
2165
+ }], color: [{
2166
+ type: Input
2167
+ }], thick: [{
2168
+ type: Input
2169
+ }], indeterminate: [{
2170
+ type: Input
2171
+ }], value: [{
2172
+ type: Input
2173
+ }] } });
2174
+
2175
+ /**
2176
+ * Component representing a custom card.
2177
+ * It provides various styling and animation options for the card layout.
2178
+ *
2179
+ * Example usage:
2180
+ * ```
2181
+ * <pgcard [Title]="'Card Title'" [Type]="'default'" [MinimalHeader]="false" [ProgressType]="'circle'">
2182
+ * Card content goes here...
2183
+ * </pgcard>
2184
+ * ```
2185
+ */
2186
+ class pgCard {
2187
+ /**
2188
+ * Indicates whether the card is collapsed or not.
2189
+ * Default: false
2190
+ */
2191
+ _isCollapsed = false;
2192
+ /**
2193
+ * Indicates whether the card is maximized or not.
2194
+ * Default: false
2195
+ */
2196
+ _isMaximixed = false;
2197
+ /**
2198
+ * Indicates whether the card is in loading state or not.
2199
+ * Default: false
2200
+ */
2201
+ _isLoading = false;
2202
+ /**
2203
+ * Indicates whether the card has a minimal header or not.
2204
+ * Default: false
2205
+ */
2206
+ _minimalHeader = false;
2207
+ /**
2208
+ * The message to be displayed in the card.
2209
+ */
2210
+ _message = "";
2211
+ /**
2212
+ * The type of message to be displayed in the card (e.g., success, danger, warning).
2213
+ * Default: "danger"
2214
+ */
2215
+ _messageType = "danger";
2216
+ /**
2217
+ * Indicates whether the message in the card is visible or not.
2218
+ * Default: false
2219
+ */
2220
+ _messageVisible = false;
2221
+ /**
2222
+ * The type of progress indicator to be displayed in the card (e.g., circle, bar, none).
2223
+ * Default: "circle"
2224
+ */
2225
+ _progressType = "circle";
2226
+ /**
2227
+ * The color of the progress indicator in the card.
2228
+ */
2229
+ _progressColor = "";
2230
+ /**
2231
+ * Indicates whether the tools (e.g., refresh, close, maximize) are shown in the card header or not.
2232
+ * Default: true
2233
+ */
2234
+ _showTools = true;
2235
+ _close_card = false;
2236
+ _refresh = false;
2237
+ _refreshColor = "light";
2238
+ /**
2239
+ * Indicates whether the close button in the card is visible or not.
2240
+ * Default: true
2241
+ */
2242
+ _close = true;
2243
+ /**
2244
+ * Indicates whether the toggle button in the card is visible or not.
2245
+ * Default: true
2246
+ */
2247
+ _toggle = true;
2248
+ /**
2249
+ * Indicates whether the maximize button in the card is visible or not.
2250
+ * Default: true
2251
+ */
2252
+ _maximize = true;
2253
+ /**
2254
+ * The timeout value in milliseconds for the loading state of the card.
2255
+ * If set to 0, the loading state will not automatically turn off.
2256
+ * Default: 0
2257
+ */
2258
+ _timeout = 0;
2259
+ /**
2260
+ * The title text to be displayed in the card header.
2261
+ */
2262
+ _titleText = "";
2263
+ /**
2264
+ * The border style of the card.
2265
+ */
2266
+ _card_border_style = "";
2267
+ /**
2268
+ * The type of the card (e.g., default, bordered, minimal).
2269
+ * Default: "default"
2270
+ */
2271
+ _type = "default";
2272
+ /**
2273
+ * Additional CSS class(es) to be added to the card header.
2274
+ */
2275
+ _extraHeaderClass = "";
2276
+ /**
2277
+ * Additional CSS class(es) to be added to the card body.
2278
+ */
2279
+ _extraBodyClass = "";
2280
+ /**
2281
+ * Additional CSS class(es) to be added to the card.
2282
+ */
2283
+ _additionalClasses = "";
2284
+ /**
2285
+ * ViewChild reference to the host content element.
2286
+ */
2287
+ _hostContent;
2288
+ /**
2289
+ * ViewChild reference to the minimal circle loading element.
2290
+ */
2291
+ minimalCircleLoading;
2292
+ /**
2293
+ * ViewChild reference to the minimal circle loading trigger element.
2294
+ */
2295
+ minimalCircleLoadingTrigger;
2296
+ /**
2297
+ * ContentChild reference to the CardTitle template.
2298
+ */
2299
+ CardTitle;
2300
+ /**
2301
+ * ContentChild reference to the CardExtraControls template.
2302
+ */
2303
+ CardExtraControls;
2304
+ // Input properties
2305
+ /**
2306
+ * The title text to be displayed in the card header.
2307
+ */
2308
+ set Title(value) {
2309
+ this._titleText = value;
1845
2310
  }
1846
- updateFilterOption(updateActiveFilter = true) {
1847
- if (this.Filter) {
1848
- this._filterOptions = new OptionPipe().transform(this._options, {
1849
- searchText: this._searchText,
1850
- tags: this._isTags,
1851
- notFoundContent: this._isTags
1852
- ? this._searchText
1853
- : this._notFoundContent,
1854
- disabled: !this._isTags,
1855
- value: this._isTags ? this._searchText : "disabled"
1856
- });
1857
- }
1858
- else {
1859
- this._filterOptions = this._options;
1860
- }
1861
- /** TODO: cause pre & next key selection not work */
1862
- if (updateActiveFilter && !this._selectedOption) {
1863
- this._activeFilterOption = this._filterOptions[0];
1864
- }
2311
+ get Title() {
2312
+ return this._titleText;
1865
2313
  }
1866
- onSearchChange(searchValue) {
1867
- this.SearchChange.emit(searchValue);
2314
+ /**
2315
+ * The type of the card (e.g., default, bordered, minimal).
2316
+ * Default: "default"
2317
+ */
2318
+ set Type(value) {
2319
+ this._type = value;
1868
2320
  }
1869
- onClick(e) {
1870
- e.preventDefault();
1871
- if (!this._disabled) {
1872
- this.Open = !this.Open;
1873
- if (this.ShowSearch) {
1874
- /** wait for search display */ // @ts-ignore
1875
- setTimeout(_ => {
1876
- this.searchInputElementRef.nativeElement.focus();
1877
- });
1878
- }
1879
- }
2321
+ /**
2322
+ * Indicates whether the card has a minimal header or not.
2323
+ * Default: false
2324
+ */
2325
+ set MinimalHeader(value) {
2326
+ this._minimalHeader = value;
1880
2327
  }
1881
- onKeyDown(e) {
1882
- const keyCode = e.keyCode;
1883
- if (keyCode === TAB && this.Open) {
1884
- this.Open = false;
1885
- return;
1886
- }
1887
- if ((keyCode !== DOWN_ARROW && keyCode !== ENTER) || this.Open) {
1888
- return;
1889
- }
1890
- e.preventDefault();
1891
- if (!this._disabled) {
1892
- this.Open = true;
1893
- if (this.ShowSearch) {
1894
- /** wait for search display */ // @ts-ignore
1895
- setTimeout(_ => {
1896
- this.searchInputElementRef.nativeElement.focus();
1897
- });
1898
- }
1899
- }
2328
+ /**
2329
+ * The type of progress indicator to be displayed in the card (e.g., circle, bar, none).
2330
+ * Default: "circle"
2331
+ */
2332
+ set ProgressType(value) {
2333
+ this._progressType = value;
1900
2334
  }
1901
- closeDropDown() {
1902
- if (!this.Open) {
1903
- return;
1904
- }
1905
- this.onTouched();
1906
- if (this.Multiple) {
1907
- this._renderer.removeStyle(this.searchInputElementRef.nativeElement, "width");
1908
- }
1909
- this.clearSearchText();
1910
- this.Open = false;
2335
+ /**
2336
+ * The color of the progress indicator in the card.
2337
+ */
2338
+ set ProgressColor(value) {
2339
+ this._progressColor = value;
1911
2340
  }
1912
- setClassMap() {
1913
- this._classList.forEach(_className => {
1914
- this._renderer.removeClass(this._el, _className);
1915
- }); // @ts-ignore
1916
- this._classList = [
1917
- this._prefixCls,
1918
- this._mode === "combobox" && `${this._prefixCls}-combobox`,
1919
- !this._disabled && `${this._prefixCls}-enabled`,
1920
- this._disabled && `${this._prefixCls}-disabled`,
1921
- this._isOpen && `${this._prefixCls}-open`,
1922
- this._showSearch && `${this._prefixCls}-show-search`,
1923
- this._size && `${this._prefixCls}-${this._size}`
1924
- ].filter(item => {
1925
- return !!item;
1926
- });
1927
- this._classList.forEach(_className => {
1928
- this._renderer.addClass(this._el, _className);
1929
- });
1930
- this._selectionClassMap = {
1931
- [this._selectionPrefixCls]: true,
1932
- [`${this._selectionPrefixCls}--single`]: !this.Multiple,
1933
- [`${this._selectionPrefixCls}--multiple`]: this.Multiple
1934
- };
2341
+ /**
2342
+ * Indicates whether the card should have a refresh button or not.
2343
+ */
2344
+ set Refresh(value) {
2345
+ this._refresh = value;
1935
2346
  }
1936
- setDropDownClassMap() {
1937
- this._dropDownClassMap = {
1938
- [this._dropDownPrefixCls]: true,
1939
- ["component-select"]: this._mode === "combobox",
1940
- [`${this._dropDownPrefixCls}--single`]: !this.Multiple,
1941
- [`${this._dropDownPrefixCls}--multiple`]: this.Multiple,
1942
- [`${this._dropDownPrefixCls}-placement-bottomLeft`]: this._dropDownPosition === "bottom",
1943
- [`${this._dropDownPrefixCls}-placement-topLeft`]: this._dropDownPosition === "top"
1944
- };
2347
+ /**
2348
+ * The color of the refresh button in the card (e.g., light, dark).
2349
+ * Default: "light"
2350
+ */
2351
+ set RefreshColor(value) {
2352
+ this._refreshColor = value;
1945
2353
  }
1946
- scrollToActive() {
1947
- /** wait for dropdown display */ // @ts-ignore
1948
- setTimeout(_ => {
1949
- if (this._activeFilterOption && this._activeFilterOption.Value) {
1950
- const index = this._filterOptions.findIndex(option => option.Value === this._activeFilterOption.Value);
1951
- try {
1952
- const scrollPane = this.dropdownUl.nativeElement.children[index];
1953
- // TODO: scrollIntoViewIfNeeded is not a standard API, why doing so?
1954
- /* tslint:disable-next-line:no-any */
1955
- scrollPane.scrollIntoViewIfNeeded(false);
1956
- }
1957
- catch (e) { }
1958
- }
1959
- });
2354
+ /**
2355
+ * Indicates whether the card should have a maximize button or not.
2356
+ */
2357
+ set Maximize(value) {
2358
+ this._maximize = value;
1960
2359
  }
1961
- flushComponentState() {
1962
- this.updateFilterOption();
1963
- if (!this.Multiple) {
1964
- this.updateSelectedOption(this._value);
1965
- }
1966
- else {
1967
- if (this._value) {
1968
- this.updateSelectedOption(this._value);
1969
- }
1970
- }
2360
+ /**
2361
+ * Indicates whether the card should have a close button or not.
2362
+ */
2363
+ set Close(value) {
2364
+ this._close = value;
1971
2365
  }
1972
- _setTriggerWidth() {
1973
- this._triggerWidth = this._getTriggerRect().width;
1974
- /** should remove after after https://github.com/angular/material2/pull/8765 merged **/
1975
- if (this._cdkOverlay && this._cdkOverlay.overlayRef) {
1976
- this._cdkOverlay.overlayRef.updateSize({
1977
- width: this._triggerWidth
1978
- });
1979
- }
2366
+ /**
2367
+ * Indicates whether the card should have a toggle button or not.
2368
+ */
2369
+ set Toggle(value) {
2370
+ this._toggle = value;
1980
2371
  }
1981
- _getTriggerRect() {
1982
- return this.trigger.nativeElement.getBoundingClientRect();
2372
+ /**
2373
+ * Additional CSS class(es) to be added to the card header.
2374
+ */
2375
+ set HeaderClass(value) {
2376
+ this._extraHeaderClass = value;
1983
2377
  }
1984
- writeValue(value) {
1985
- this._updateValue(value, false);
2378
+ /**
2379
+ * Additional CSS class(es) to be added to the card body.
2380
+ */
2381
+ set BodyClass(value) {
2382
+ this._extraBodyClass = value;
1986
2383
  }
1987
- registerOnChange(fn) {
1988
- this.onChange = fn;
2384
+ /**
2385
+ * Additional CSS class(es) to be added to the card.
2386
+ */
2387
+ set AdditionalClasses(value) {
2388
+ this._additionalClasses = value;
1989
2389
  }
1990
- registerOnTouched(fn) {
1991
- this.onTouched = fn;
2390
+ /**
2391
+ * Indicates whether the tools (e.g., refresh, close, maximize) are shown in the card header or not.
2392
+ */
2393
+ set Controls(value) {
2394
+ this._showTools = value;
1992
2395
  }
1993
- setDisabledState(isDisabled) {
1994
- this.Disabled = isDisabled;
2396
+ /**
2397
+ * Indicates whether the message in the card is visible or not.
2398
+ */
2399
+ set ShowMessage(value) {
2400
+ this._messageVisible = value;
1995
2401
  }
1996
- dropDownScroll(ul) {
1997
- if (ul && ul.scrollHeight - ul.scrollTop === ul.clientHeight) {
1998
- this.ScrollToBottom.emit(true);
1999
- }
2402
+ /**
2403
+ * The message text to be displayed in the card.
2404
+ */
2405
+ set Message(value) {
2406
+ this._message = value;
2000
2407
  }
2001
- checkDropDownScroll() {
2002
- if (this.dropdownUl &&
2003
- this.dropdownUl.nativeElement.scrollHeight ===
2004
- this.dropdownUl.nativeElement.clientHeight) {
2005
- this.ScrollToBottom.emit(true);
2006
- }
2408
+ /**
2409
+ * Indicates whether the loading indicator is shown in the card or not.
2410
+ */
2411
+ set Loading(value) {
2412
+ this._isLoading = value;
2007
2413
  }
2008
- constructor(_elementRef, _renderer, cDRef) {
2009
- this._elementRef = _elementRef;
2010
- this._renderer = _renderer;
2011
- this.cDRef = cDRef;
2012
- this._el = this._elementRef.nativeElement;
2414
+ /**
2415
+ * The timeout duration for the loading indicator (in milliseconds).
2416
+ * If set to 0, the loading indicator will be displayed indefinitely until manually dismissed.
2417
+ * Default: 0
2418
+ */
2419
+ set TimeOut(value) {
2420
+ this._timeout = value;
2013
2421
  }
2014
- ngAfterContentInit() {
2015
- if (this._value != null) {
2016
- this.flushComponentState();
2017
- }
2422
+ /**
2423
+ * The border style of the card.
2424
+ */
2425
+ set CardBorderStyle(value) {
2426
+ this._card_border_style = value;
2018
2427
  }
2019
- ngOnInit() {
2020
- this.updateFilterOption();
2021
- this.setClassMap();
2022
- this.setDropDownClassMap();
2428
+ // Output properties
2429
+ /**
2430
+ * Event emitted when the refresh button is clicked.
2431
+ */
2432
+ onRefresh = new EventEmitter();
2433
+ // Other methods and lifecycle hooks
2434
+ /**
2435
+ * Toggles the collapsed state of the card.
2436
+ */
2437
+ toggle() {
2438
+ this._isCollapsed = this._isCollapsed === true ? false : true;
2023
2439
  }
2024
- ngAfterContentChecked() {
2025
- if (this._cacheOptions !== this._options) {
2026
- /** update filter option after every content check cycle */
2027
- this.updateFilterOption();
2028
- this._cacheOptions = this._options;
2440
+ /**
2441
+ * Maximizes or restores the card to its original position.
2442
+ */
2443
+ maximize() {
2444
+ let nativeElement = this._hostContent.nativeElement;
2445
+ if (this._isMaximixed) {
2446
+ this._isMaximixed = false;
2447
+ nativeElement.style.left = null;
2448
+ nativeElement.style.top = null;
2029
2449
  }
2030
2450
  else {
2031
- this.updateFilterOption(false);
2032
- }
2033
- if (this.FirstDefault) {
2034
- if (!this._value && this._options) {
2035
- if (this._options[0] !== undefined && this._options[0].Value) {
2036
- this.chooseOption(this._options[0], false);
2037
- setTimeout(() => {
2038
- this.onChange(this._options[0].Value);
2039
- });
2040
- }
2041
- }
2451
+ this._isMaximixed = true;
2452
+ let pagecontainer = document.querySelector(".content") ?? new Element();
2453
+ console.log(pagecontainer);
2454
+ let rect = pagecontainer.getBoundingClientRect();
2455
+ let elementRect = nativeElement.getBoundingClientRect();
2456
+ let style = window.getComputedStyle(pagecontainer);
2457
+ nativeElement.style.left =
2458
+ parseFloat(style["marginLeft"]) +
2459
+ parseFloat(style["paddingLeft"]) +
2460
+ rect.left +
2461
+ "px";
2462
+ nativeElement.style.top =
2463
+ parseFloat(style["padding-top"]) + rect.top + "px";
2042
2464
  }
2043
2465
  }
2044
- _updateValue(value, emitChange = true) {
2045
- if (this._value === value) {
2046
- return;
2047
- }
2048
- if (value == null && this.Multiple) {
2049
- this._value = [];
2050
- }
2051
- else {
2052
- this._value = value;
2053
- }
2054
- if (!this.Multiple) {
2055
- if (value == null) { // @ts-ignore
2056
- this._selectedOption = null;
2057
- }
2058
- else {
2059
- this.updateSelectedOption(value);
2060
- }
2466
+ /**
2467
+ * Dismisses the message in the card.
2468
+ */
2469
+ alertDismiss() {
2470
+ this._messageVisible = false;
2471
+ }
2472
+ /**
2473
+ * Triggers the refresh action of the card.
2474
+ */
2475
+ refresh() {
2476
+ if (!this._isLoading) {
2477
+ this._isLoading = true;
2478
+ this.onRefresh.emit();
2061
2479
  }
2062
- else {
2063
- if (value) {
2064
- if (value.length === 0) {
2065
- this.clearAllSelectedOption(emitChange);
2066
- }
2067
- else {
2068
- this.updateSelectedOption(value, true);
2069
- }
2070
- }
2071
- else if (value == null) {
2072
- this.clearAllSelectedOption(emitChange);
2073
- }
2480
+ if (this._timeout > 0) {
2481
+ setTimeout(() => {
2482
+ this._isLoading = false;
2483
+ }, this._timeout);
2074
2484
  }
2075
2485
  }
2076
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2077
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefDevSelectComponent, selector: "mefdev-select", inputs: { Filter: "Filter", MaxMultiple: "MaxMultiple", FirstDefault: "FirstDefault", AllowClear: "AllowClear", KeepUnListOptions: "KeepUnListOptions", Mode: "Mode", Multiple: "Multiple", PlaceHolder: "PlaceHolder", NotFoundContent: "NotFoundContent", Size: "Size", ShowSearch: "ShowSearch", Tags: "Tags", Disabled: "Disabled", Open: "Open" }, outputs: { SearchChange: "SearchChange", change: "change", OpenChange: "OpenChange", ScrollToBottom: "ScrollToBottom" }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, providers: [
2078
- {
2079
- provide: NG_VALUE_ACCESSOR,
2080
- useExisting: forwardRef(() => MefDevSelectComponent),
2081
- multi: true
2082
- }
2083
- ], viewQueries: [{ propertyName: "searchInputElementRef", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "dropdownUl", first: true, predicate: ["dropdownUl"], descendants: true }, { propertyName: "_cdkOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }], ngImport: i0, template: "<div tabindex=\"0\" #trigger cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" [ngClass]=\"_selectionClassMap\"\r\n (keydown.Enter)=\"handleKeyEnterEvent($event)\" (keydown.Backspace)=\"handleKeyBackspaceEvent($event)\"\r\n (keydown.ArrowUp)=\"handleKeyUpEvent($event)\" (keydown.ArrowDown)=\"handleKeyDownEvent($event)\">\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"!ShowSearch\">\r\n <div class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"!_selectedOption\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n <div class=\"pg-select-selection-selected-value\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n </div>\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"ShowSearch\">\r\n <div [hidden]=\"_searchText||(!Open&&_selectedOption)||_selectedOptions.size\"\r\n class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"(!_composing)&&_selectedOption\">\r\n {{ _selectedOption.Label }}\r\n </ng-template>\r\n <ng-template [ngIf]=\"(!_composing)&&(!_selectedOption)\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n <ul *ngIf=\"Multiple\">\r\n <li *ngFor=\"let option of _selectedOptions\" [@tagAnimation] [attr.title]=\"option?.Label || option?.Value\"\r\n class=\"pg-select-selection__choice\" style=\"-webkit-user-select: none;\">\r\n <span class=\"pg-select-selection__choice__remove\" (click)=\"unSelectMultipleOption(option,$event)\"></span>\r\n <div class=\"pg-select-selection__choice__content\">{{ option?.Label }}</div>\r\n </li>\r\n <li class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd();updateWidth(searchInput,_searchText);\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\"\r\n (keydown)=\"updateWidth(searchInput,_searchText)\" (input)=\"updateWidth(searchInput,_searchText)\"\r\n (blur)=\"onTouched()\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span></div>\r\n </li>\r\n </ul>\r\n <div *ngIf=\"!Multiple\" class=\"pg-select-selection-selected-value\" [hidden]=\"!(_selectedOption?.Label)||Open\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n <div *ngIf=\"!Multiple\" [hidden]=\"!Open\" class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (blur)=\"onTouched()\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd()\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n <span (click)=\"onTouched();clearSelect($event)\" class=\"pg-select-selection__clear\" style=\"-webkit-user-select: none;\"\r\n *ngIf=\"_selectedOption?.Label&&AllowClear&&!Multiple\">\r\n </span>\r\n <span class=\"pg-select-arrow\"><b></b></span>\r\n</div>\r\n<ng-template cdkConnectedOverlay cdkConnectedOverlayHasBackdrop [cdkConnectedOverlayOrigin]=\"origin\"\r\n (backdropClick)=\"closeDropDown()\" (detach)=\"closeDropDown();\" (positionChange)=\"onPositionChange($event)\"\r\n [cdkConnectedOverlayWidth]=\"_triggerWidth\" [cdkConnectedOverlayOpen]=\"_isOpen\">\r\n <div [ngClass]=\"_dropDownClassMap\" [@dropDownAnimation]=\"_dropDownPosition\">\r\n <div style=\"overflow: auto;\">\r\n <ul class=\"pg-select-dropdown-menu pg-select-dropdown-menu-vertical pg-select-dropdown-menu-root\" #dropdownUl\r\n (scroll)=\"dropDownScroll(dropdownUl)\">\r\n <li *ngFor=\"let option of _filterOptions\" [class.pg-select-dropdown-menu-item-disabled]=\"option.Disabled\"\r\n [class.pg-select-dropdown-menu-item-active]=\"option.Value == _activeFilterOption?.Value\"\r\n [class.pg-select-dropdown-menu-item-selected]=\"(option.Value==(_selectedOption?.Value))||(isInSet(_selectedOptions,option))\"\r\n class=\"pg-select-dropdown-menu-item\" (click)=\"clickOption(option,$event)\">\r\n <ng-template *ngIf=\"option.OptionTemplate\" [ngTemplateOutlet]=\"option.OptionTemplate\">\r\n </ng-template>\r\n <ng-template [ngIf]=\"!option.OptionTemplate\">\r\n {{ option.Label }}\r\n </ng-template>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>", 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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], animations: [trigger('dropDownAnimation', [
2084
- state('bottom', style({
2085
- opacity: 1,
2086
- transform: 'scaleY(1)',
2087
- transformOrigin: '0% 0%'
2486
+ /**
2487
+ * Closes the card.
2488
+ */
2489
+ close() {
2490
+ this._close_card = true;
2491
+ }
2492
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: pgCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
2493
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: pgCard, selector: "pgcard", inputs: { Title: "Title", Type: "Type", MinimalHeader: "MinimalHeader", ProgressType: "ProgressType", ProgressColor: "ProgressColor", Refresh: "Refresh", RefreshColor: "RefreshColor", Maximize: "Maximize", Close: "Close", Toggle: "Toggle", HeaderClass: "HeaderClass", BodyClass: "BodyClass", AdditionalClasses: "AdditionalClasses", Controls: "Controls", ShowMessage: "ShowMessage", Message: "Message", Loading: "Loading", TimeOut: "TimeOut", CardBorderStyle: "CardBorderStyle" }, outputs: { onRefresh: "onRefresh" }, queries: [{ propertyName: "CardTitle", first: true, predicate: ["CardTitle"], descendants: true }, { propertyName: "CardExtraControls", first: true, predicate: ["CardExtraControls"], descendants: true }], viewQueries: [{ propertyName: "_hostContent", first: true, predicate: ["hostContent"], descendants: true }, { propertyName: "minimalCircleLoading", first: true, predicate: ["minimalCircleLoading"], descendants: true }, { propertyName: "minimalCircleLoadingTrigger", first: true, predicate: ["minimalCircleLoadingTrigger"], descendants: true }], ngImport: i0, template: "<div class=\"card card-{{ _type }} {{ _additionalClasses }}\" *ngIf=\"!_close_card\" [class.card-collapsed]=\"_isCollapsed\"\r\n [class.card-maximized]=\"_isMaximixed\" #hostContent class=\"col-sm-12 col-md-6 col-lg-4\"\r\n [ngStyle]=\"{'border': _card_border_style}\">\r\n <div class=\"card-header {{ _extraHeaderClass }}\">\r\n <div class=\"card-title\">\r\n <ng-template [ngTemplateOutlet]=\"CardTitle\"></ng-template>\r\n </div>\r\n <div class=\"card-controls\" *ngIf=\"_showTools == true\">\r\n <ng-template [ngTemplateOutlet]=\"CardExtraControls\"></ng-template>\r\n <ul *ngIf=\"_minimalHeader == false; else minimalBlock\">\r\n <li *ngIf=\"_toggle == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-collapse\" (click)=\"toggle()\"><i\r\n class=\"pg pg-arrow_maximize\" [class.pg-arrow_minimize]=\"_isCollapsed\"></i></a>\r\n </li>\r\n <li *ngIf=\"_refresh == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-refresh\" (click)=\"refresh()\"><i\r\n class=\"card-icon card-icon-refresh\"></i></a>\r\n </li>\r\n <li *ngIf=\"_maximize == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-maximize\" (click)=\"maximize()\"><i\r\n class=\"card-icon card-icon-maximize\"></i></a>\r\n </li>\r\n <li *ngIf=\"_close == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-close\" (click)=\"close()\"><i\r\n class=\"card-icon card-icon-close\"></i></a>\r\n </li>\r\n </ul>\r\n <!-- <ng-template #minimalBlock>\r\n <ul>\r\n <li>\r\n <a href=\"javascript:void(0);\" (click)=\"refresh()\" class=\"card-refresh minimal\"\r\n [class.refreshing]=\"_isLoading\">\r\n <i #minimalCircleLoadingTrigger class=\"card-icon card-icon-refresh-lg-{{\r\n _refreshColor == 'light' ? 'white' : 'master'\r\n }}\" [class.fade]=\"_isLoading\"></i>\r\n <i #minimalCircleLoading class=\"card-icon-refresh-lg-white-animated\"\r\n style=\"position: absolute;top:0;left:0\" [class.active]=\"_isLoading\"\r\n [class.hide]=\"_isLoading != true\"></i>\r\n </a>\r\n </li>\r\n </ul>\r\n </ng-template> -->\r\n </div>\r\n </div>\r\n <div class=\"card-body {{ _extraBodyClass }}\" [@collapseState]=\"_isCollapsed == true ? 'inactive' : 'active'\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"pgn-wrapper\" data-position=\"top\">\r\n <div class=\"pgn pgn-bar push-on-sidebar-open\">\r\n <div class=\"alert alert-danger\">\r\n <span>{{ _message }}</span><button class=\"close\" (click)=\"alertDismiss()\" type=\"button\">\r\n <span aria-hidden=\"true\">\u00D7</span><span class=\"sr-only\">{{ 'Close' }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\" display: block;\"></div>\r\n <div [@fadeAnimation]=\"_isLoading\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\"display: block;pointer-events: none\">\r\n <mefdev-progress *ngIf=\"_minimalHeader == false\" type=\"{{ _progressType }}\" color=\"{{ _progressColor }}\"\r\n indeterminate=\"true\" class=\"\"></mefdev-progress>\r\n </div>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: MefDevProgressComponent, selector: "mefdev-progress", inputs: ["type", "color", "thick", "indeterminate", "value"] }], animations: [
2494
+ trigger("collapseState", [
2495
+ state("inactive", style({
2496
+ opacity: "0",
2497
+ height: 0,
2498
+ paddingBottom: "0"
2088
2499
  })),
2089
- transition('void => bottom', [
2090
- style({
2091
- opacity: 0,
2092
- transform: 'scaleY(0)',
2093
- transformOrigin: '0% 0%'
2094
- }),
2095
- animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
2096
- ]),
2097
- state('top', style({
2098
- opacity: 1,
2099
- transform: 'scaleY(1)',
2100
- transformOrigin: '0% 100%'
2500
+ state("active", style({
2501
+ opacity: "1",
2502
+ height: "*",
2503
+ paddingBottom: "*"
2101
2504
  })),
2102
- transition('void => top', [
2103
- style({
2104
- opacity: 0,
2105
- transform: 'scaleY(0)',
2106
- transformOrigin: '0% 100%'
2107
- }),
2108
- animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
2109
- ]),
2110
- transition('* => void', [
2111
- animate('250ms 100ms linear', style({ opacity: 0 }))
2112
- ])
2505
+ transition("inactive => active", animate("125ms ease-in")),
2506
+ transition("active => inactive", animate("125ms ease-out"))
2113
2507
  ]),
2114
- trigger('tagAnimation', [
2115
- state('*', style({ opacity: 1, transform: 'scale(1)' })),
2116
- transition('void => *', [
2117
- style({ opacity: 0, transform: 'scale(0)' }),
2118
- animate('150ms linear')
2119
- ]),
2120
- state('void', style({ opacity: 0, transform: 'scale(0)' })),
2121
- transition('* => void', [
2122
- style({ opacity: 1, transform: 'scale(1)' }),
2123
- animate('150ms linear')
2124
- ])
2125
- ])], encapsulation: i0.ViewEncapsulation.None });
2508
+ trigger("fadeAnimation", [
2509
+ state("false", style({
2510
+ opacity: "0",
2511
+ visibility: "hidden"
2512
+ })),
2513
+ state("true", style({
2514
+ opacity: "1",
2515
+ visibility: "visible"
2516
+ })),
2517
+ transition("false => true", animate("500ms ease-in")),
2518
+ transition("true => false", animate("500ms ease-out"))
2519
+ ])
2520
+ ], encapsulation: i0.ViewEncapsulation.None });
2126
2521
  }
2127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectComponent, decorators: [{
2128
- type: Component,
2129
- args: [{ selector: "mefdev-select", encapsulation: ViewEncapsulation.None, providers: [
2130
- {
2131
- provide: NG_VALUE_ACCESSOR,
2132
- useExisting: forwardRef(() => MefDevSelectComponent),
2133
- multi: true
2134
- }
2135
- ], animations: [trigger('dropDownAnimation', [
2136
- state('bottom', style({
2137
- opacity: 1,
2138
- transform: 'scaleY(1)',
2139
- transformOrigin: '0% 0%'
2140
- })),
2141
- transition('void => bottom', [
2142
- style({
2143
- opacity: 0,
2144
- transform: 'scaleY(0)',
2145
- transformOrigin: '0% 0%'
2146
- }),
2147
- animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
2148
- ]),
2149
- state('top', style({
2150
- opacity: 1,
2151
- transform: 'scaleY(1)',
2152
- transformOrigin: '0% 100%'
2522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: pgCard, decorators: [{
2523
+ type: Component,
2524
+ args: [{ selector: "pgcard", encapsulation: ViewEncapsulation.None, animations: [
2525
+ trigger("collapseState", [
2526
+ state("inactive", style({
2527
+ opacity: "0",
2528
+ height: 0,
2529
+ paddingBottom: "0"
2153
2530
  })),
2154
- transition('void => top', [
2155
- style({
2156
- opacity: 0,
2157
- transform: 'scaleY(0)',
2158
- transformOrigin: '0% 100%'
2159
- }),
2160
- animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)')
2161
- ]),
2162
- transition('* => void', [
2163
- animate('250ms 100ms linear', style({ opacity: 0 }))
2164
- ])
2531
+ state("active", style({
2532
+ opacity: "1",
2533
+ height: "*",
2534
+ paddingBottom: "*"
2535
+ })),
2536
+ transition("inactive => active", animate("125ms ease-in")),
2537
+ transition("active => inactive", animate("125ms ease-out"))
2165
2538
  ]),
2166
- trigger('tagAnimation', [
2167
- state('*', style({ opacity: 1, transform: 'scale(1)' })),
2168
- transition('void => *', [
2169
- style({ opacity: 0, transform: 'scale(0)' }),
2170
- animate('150ms linear')
2171
- ]),
2172
- state('void', style({ opacity: 0, transform: 'scale(0)' })),
2173
- transition('* => void', [
2174
- style({ opacity: 1, transform: 'scale(1)' }),
2175
- animate('150ms linear')
2176
- ])
2177
- ])], template: "<div tabindex=\"0\" #trigger cdkOverlayOrigin #origin=\"cdkOverlayOrigin\" [ngClass]=\"_selectionClassMap\"\r\n (keydown.Enter)=\"handleKeyEnterEvent($event)\" (keydown.Backspace)=\"handleKeyBackspaceEvent($event)\"\r\n (keydown.ArrowUp)=\"handleKeyUpEvent($event)\" (keydown.ArrowDown)=\"handleKeyDownEvent($event)\">\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"!ShowSearch\">\r\n <div class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"!_selectedOption\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n <div class=\"pg-select-selection-selected-value\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n </div>\r\n <div class=\"pg-select-selection__rendered\" *ngIf=\"ShowSearch\">\r\n <div [hidden]=\"_searchText||(!Open&&_selectedOption)||_selectedOptions.size\"\r\n class=\"pg-select-selection__placeholder\">\r\n <ng-template [ngIf]=\"(!_composing)&&_selectedOption\">\r\n {{ _selectedOption.Label }}\r\n </ng-template>\r\n <ng-template [ngIf]=\"(!_composing)&&(!_selectedOption)\">\r\n {{ PlaceHolder }}\r\n </ng-template>\r\n </div>\r\n <ul *ngIf=\"Multiple\">\r\n <li *ngFor=\"let option of _selectedOptions\" [@tagAnimation] [attr.title]=\"option?.Label || option?.Value\"\r\n class=\"pg-select-selection__choice\" style=\"-webkit-user-select: none;\">\r\n <span class=\"pg-select-selection__choice__remove\" (click)=\"unSelectMultipleOption(option,$event)\"></span>\r\n <div class=\"pg-select-selection__choice__content\">{{ option?.Label }}</div>\r\n </li>\r\n <li class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd();updateWidth(searchInput,_searchText);\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\"\r\n (keydown)=\"updateWidth(searchInput,_searchText)\" (input)=\"updateWidth(searchInput,_searchText)\"\r\n (blur)=\"onTouched()\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span></div>\r\n </li>\r\n </ul>\r\n <div *ngIf=\"!Multiple\" class=\"pg-select-selection-selected-value\" [hidden]=\"!(_selectedOption?.Label)||Open\">\r\n {{ _selectedOption?.Label }}\r\n </div>\r\n <div *ngIf=\"!Multiple\" [hidden]=\"!Open\" class=\"pg-select-search pg-select-search--inline\">\r\n <div class=\"pg-select-search__field__wrap\">\r\n <input class=\"pg-select-search__field\" (blur)=\"onTouched()\" (compositionstart)=\"compositionStart()\"\r\n (compositionend)=\"compositionEnd()\" [(ngModel)]=\"_searchText\"\r\n (ngModelChange)=\"updateFilterOption();onSearchChange($event);\" #searchInput>\r\n <span class=\"pg-select-search__field__mirror\"></span>\r\n </div>\r\n </div>\r\n </div>\r\n <span (click)=\"onTouched();clearSelect($event)\" class=\"pg-select-selection__clear\" style=\"-webkit-user-select: none;\"\r\n *ngIf=\"_selectedOption?.Label&&AllowClear&&!Multiple\">\r\n </span>\r\n <span class=\"pg-select-arrow\"><b></b></span>\r\n</div>\r\n<ng-template cdkConnectedOverlay cdkConnectedOverlayHasBackdrop [cdkConnectedOverlayOrigin]=\"origin\"\r\n (backdropClick)=\"closeDropDown()\" (detach)=\"closeDropDown();\" (positionChange)=\"onPositionChange($event)\"\r\n [cdkConnectedOverlayWidth]=\"_triggerWidth\" [cdkConnectedOverlayOpen]=\"_isOpen\">\r\n <div [ngClass]=\"_dropDownClassMap\" [@dropDownAnimation]=\"_dropDownPosition\">\r\n <div style=\"overflow: auto;\">\r\n <ul class=\"pg-select-dropdown-menu pg-select-dropdown-menu-vertical pg-select-dropdown-menu-root\" #dropdownUl\r\n (scroll)=\"dropDownScroll(dropdownUl)\">\r\n <li *ngFor=\"let option of _filterOptions\" [class.pg-select-dropdown-menu-item-disabled]=\"option.Disabled\"\r\n [class.pg-select-dropdown-menu-item-active]=\"option.Value == _activeFilterOption?.Value\"\r\n [class.pg-select-dropdown-menu-item-selected]=\"(option.Value==(_selectedOption?.Value))||(isInSet(_selectedOptions,option))\"\r\n class=\"pg-select-dropdown-menu-item\" (click)=\"clickOption(option,$event)\">\r\n <ng-template *ngIf=\"option.OptionTemplate\" [ngTemplateOutlet]=\"option.OptionTemplate\">\r\n </ng-template>\r\n <ng-template [ngIf]=\"!option.OptionTemplate\">\r\n {{ option.Label }}\r\n </ng-template>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n</ng-template>" }]
2178
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { searchInputElementRef: [{
2539
+ trigger("fadeAnimation", [
2540
+ state("false", style({
2541
+ opacity: "0",
2542
+ visibility: "hidden"
2543
+ })),
2544
+ state("true", style({
2545
+ opacity: "1",
2546
+ visibility: "visible"
2547
+ })),
2548
+ transition("false => true", animate("500ms ease-in")),
2549
+ transition("true => false", animate("500ms ease-out"))
2550
+ ])
2551
+ ], template: "<div class=\"card card-{{ _type }} {{ _additionalClasses }}\" *ngIf=\"!_close_card\" [class.card-collapsed]=\"_isCollapsed\"\r\n [class.card-maximized]=\"_isMaximixed\" #hostContent class=\"col-sm-12 col-md-6 col-lg-4\"\r\n [ngStyle]=\"{'border': _card_border_style}\">\r\n <div class=\"card-header {{ _extraHeaderClass }}\">\r\n <div class=\"card-title\">\r\n <ng-template [ngTemplateOutlet]=\"CardTitle\"></ng-template>\r\n </div>\r\n <div class=\"card-controls\" *ngIf=\"_showTools == true\">\r\n <ng-template [ngTemplateOutlet]=\"CardExtraControls\"></ng-template>\r\n <ul *ngIf=\"_minimalHeader == false; else minimalBlock\">\r\n <li *ngIf=\"_toggle == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-collapse\" (click)=\"toggle()\"><i\r\n class=\"pg pg-arrow_maximize\" [class.pg-arrow_minimize]=\"_isCollapsed\"></i></a>\r\n </li>\r\n <li *ngIf=\"_refresh == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-refresh\" (click)=\"refresh()\"><i\r\n class=\"card-icon card-icon-refresh\"></i></a>\r\n </li>\r\n <li *ngIf=\"_maximize == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-maximize\" (click)=\"maximize()\"><i\r\n class=\"card-icon card-icon-maximize\"></i></a>\r\n </li>\r\n <li *ngIf=\"_close == true\">\r\n <a href=\"javascript:void(0);\" data-toggle class=\"card-close\" (click)=\"close()\"><i\r\n class=\"card-icon card-icon-close\"></i></a>\r\n </li>\r\n </ul>\r\n <!-- <ng-template #minimalBlock>\r\n <ul>\r\n <li>\r\n <a href=\"javascript:void(0);\" (click)=\"refresh()\" class=\"card-refresh minimal\"\r\n [class.refreshing]=\"_isLoading\">\r\n <i #minimalCircleLoadingTrigger class=\"card-icon card-icon-refresh-lg-{{\r\n _refreshColor == 'light' ? 'white' : 'master'\r\n }}\" [class.fade]=\"_isLoading\"></i>\r\n <i #minimalCircleLoading class=\"card-icon-refresh-lg-white-animated\"\r\n style=\"position: absolute;top:0;left:0\" [class.active]=\"_isLoading\"\r\n [class.hide]=\"_isLoading != true\"></i>\r\n </a>\r\n </li>\r\n </ul>\r\n </ng-template> -->\r\n </div>\r\n </div>\r\n <div class=\"card-body {{ _extraBodyClass }}\" [@collapseState]=\"_isCollapsed == true ? 'inactive' : 'active'\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"pgn-wrapper\" data-position=\"top\">\r\n <div class=\"pgn pgn-bar push-on-sidebar-open\">\r\n <div class=\"alert alert-danger\">\r\n <span>{{ _message }}</span><button class=\"close\" (click)=\"alertDismiss()\" type=\"button\">\r\n <span aria-hidden=\"true\">\u00D7</span><span class=\"sr-only\">{{ 'Close' }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"_messageVisible == true\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\" display: block;\"></div>\r\n <div [@fadeAnimation]=\"_isLoading\" class=\"card-progress\" [style.backgroundColor]=\"\r\n _minimalHeader ? 'rgba(0,0,0, 0.6)' : 'rgba(255, 255, 255, 0.8)'\r\n \" style=\"display: block;pointer-events: none\">\r\n <mefdev-progress *ngIf=\"_minimalHeader == false\" type=\"{{ _progressType }}\" color=\"{{ _progressColor }}\"\r\n indeterminate=\"true\" class=\"\"></mefdev-progress>\r\n </div>\r\n</div>" }]
2552
+ }], propDecorators: { _hostContent: [{
2179
2553
  type: ViewChild,
2180
- args: ["searchInput"]
2181
- }], trigger: [{
2554
+ args: ["hostContent"]
2555
+ }], minimalCircleLoading: [{
2182
2556
  type: ViewChild,
2183
- args: ["trigger"]
2184
- }], dropdownUl: [{
2557
+ args: ["minimalCircleLoading"]
2558
+ }], minimalCircleLoadingTrigger: [{
2185
2559
  type: ViewChild,
2186
- args: ["dropdownUl"]
2187
- }], SearchChange: [{
2188
- type: Output
2189
- }], change: [{
2190
- type: Output
2191
- }], OpenChange: [{
2192
- type: Output
2193
- }], ScrollToBottom: [{
2194
- type: Output
2195
- }], Filter: [{
2560
+ args: ["minimalCircleLoadingTrigger"]
2561
+ }], CardTitle: [{
2562
+ type: ContentChild,
2563
+ args: ["CardTitle"]
2564
+ }], CardExtraControls: [{
2565
+ type: ContentChild,
2566
+ args: ["CardExtraControls"]
2567
+ }], Title: [{
2196
2568
  type: Input
2197
- }], MaxMultiple: [{
2569
+ }], Type: [{
2198
2570
  type: Input
2199
- }], FirstDefault: [{
2571
+ }], MinimalHeader: [{
2200
2572
  type: Input
2201
- }], _cdkOverlay: [{
2202
- type: ViewChild,
2203
- args: [CdkConnectedOverlay]
2204
- }], AllowClear: [{
2573
+ }], ProgressType: [{
2205
2574
  type: Input
2206
- }], KeepUnListOptions: [{
2575
+ }], ProgressColor: [{
2207
2576
  type: Input
2208
- }], Mode: [{
2577
+ }], Refresh: [{
2209
2578
  type: Input
2210
- }], Multiple: [{
2579
+ }], RefreshColor: [{
2211
2580
  type: Input
2212
- }], PlaceHolder: [{
2581
+ }], Maximize: [{
2213
2582
  type: Input
2214
- }], NotFoundContent: [{
2583
+ }], Close: [{
2215
2584
  type: Input
2216
- }], Size: [{
2585
+ }], Toggle: [{
2217
2586
  type: Input
2218
- }], ShowSearch: [{
2587
+ }], HeaderClass: [{
2219
2588
  type: Input
2220
- }], Tags: [{
2589
+ }], BodyClass: [{
2221
2590
  type: Input
2222
- }], Disabled: [{
2591
+ }], AdditionalClasses: [{
2223
2592
  type: Input
2224
- }], Open: [{
2593
+ }], Controls: [{
2225
2594
  type: Input
2226
- }], onClick: [{
2227
- type: HostListener,
2228
- args: ["click", ["$event"]]
2229
- }], onKeyDown: [{
2230
- type: HostListener,
2231
- args: ["keydown", ["$event"]]
2595
+ }], ShowMessage: [{
2596
+ type: Input
2597
+ }], Message: [{
2598
+ type: Input
2599
+ }], Loading: [{
2600
+ type: Input
2601
+ }], TimeOut: [{
2602
+ type: Input
2603
+ }], CardBorderStyle: [{
2604
+ type: Input
2605
+ }], onRefresh: [{
2606
+ type: Output
2232
2607
  }] } });
2233
2608
 
2234
2609
  /**
2235
- * @skipTemplateDoc true
2236
- * Component for representing an option in a dropdown list.
2237
- *
2238
- *```
2239
- * <mefdev-select>
2240
- * <mefdev-option Value="1" Label="Option 1"></mefdev-option>
2241
- * <mefdev-option Value="2" Label="Option 2"></mefdev-option>
2242
- * <mefdev-option Value="3" Label="Option 3"></mefdev-option>
2243
- * </mefdev-select>
2244
- *```
2245
- *
2246
- */
2247
- class MefDevOptionComponent {
2248
- _Select;
2249
- _disabled = false;
2250
- _value;
2251
- _label;
2610
+ * Component for displaying a card with a title, image, and description.
2611
+ *
2612
+ * Example of usage:
2613
+ *
2614
+ * ```
2615
+ * <mefdev-card>
2616
+ * <ng-template #card_title>
2617
+ * <!-- Content for the card title -->
2618
+ * </ng-template>
2619
+ * <ng-template #card_footer>
2620
+ * <!-- Content for the card footer -->
2621
+ * </ng-template>
2622
+ * </mefdev-card>
2623
+ * ```
2624
+ *
2625
+ * <example-url>https://mef.dev/ui_kit_demo/view/card</example-url>
2626
+ */
2627
+ class CardComponent {
2628
+ router;
2252
2629
  /**
2253
- * Template for the content of the option.
2254
- */
2255
- OptionTemplate;
2630
+ * The template reference to the content of the card title.
2631
+ *
2632
+ * @usageNotes
2633
+ * ```
2634
+ * <mefdev-card>
2635
+ * <ng-template #card_title>
2636
+ * <!-- Content for the card title -->
2637
+ * </ng-template>
2638
+ * </mefdev-card>
2639
+ * ```
2640
+ */
2641
+ card_title;
2642
+ /**
2643
+ * The template reference to the content of the card footer.
2644
+ * @usageNotes
2645
+ * ```
2646
+ * <mefdev-card>
2647
+ * <ng-template #card_footer>
2648
+ * <!-- Content for the card footer -->
2649
+ * </ng-template>
2650
+ * </mefdev-card>
2651
+ * ```
2652
+ */
2653
+ card_footer;
2654
+ /**
2655
+ * The type of the card.
2656
+ * @usageNotes
2657
+ * ```
2658
+ * <mefdev-card [card_type] = "'type'"></mefdev-card>
2659
+ * ```
2660
+ */
2661
+ card_type;
2662
+ /**
2663
+ * The path to the image.
2664
+ * @usageNotes
2665
+ * ```
2666
+ * <mefdev-card [img] = "'img/path/img.png'"></mefdev-card>
2667
+ * ```
2668
+ */
2669
+ img;
2670
+ /**
2671
+ * The path, where user goes after click at the image.
2672
+ * @usageNotes
2673
+ * ```
2674
+ * <mefdev-card [imgUrl] = "'Img.url'"></mefdev-card>
2675
+ * ```
2676
+ */
2677
+ imgUrl;
2678
+ /**
2679
+ * The description of the card.
2680
+ * @usageNotes
2681
+ * ```
2682
+ * <mefdev-card [description] = "'description'"></mefdev-card>
2683
+ * ```
2684
+ */
2685
+ description;
2686
+ constructor(router) {
2687
+ this.router = router;
2688
+ }
2689
+ ngOnInit() {
2690
+ }
2691
+ /**
2692
+ * Event handler for image click.
2693
+ * Navigates to the specified URL.
2694
+ */
2695
+ imgClick() {
2696
+ this.router.navigate(['/', this.imgUrl.toString()]);
2697
+ }
2698
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
2699
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: CardComponent, selector: "mefdev-card", inputs: { card_type: "card_type", img: "img", imgUrl: "imgUrl", description: "description" }, queries: [{ propertyName: "card_title", first: true, predicate: ["card_title"], descendants: true }, { propertyName: "card_footer", first: true, predicate: ["card_footer"], descendants: true }], ngImport: i0, template: "\r\n <pgcard\r\n MinimalHeader=\"true\"\r\n TimeOut=\"2500\"\r\n [Refresh]=\"false\"\r\n [Close]=\"false\">\r\n\r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title body-1\" [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </ng-template>\r\n\r\n <div class=\"plugin-type\">\r\n {{ card_type }}\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"m-l-2 card-description\">\r\n <div *ngIf=\"!description || description == ''\" class=\"card-no-description\"> {{'No plugin description'}}</div>\r\n <p>\r\n {{description}}\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"col-12 mt-3 text-center card-img\"\r\n [ngStyle]=\"{'background-color': img ? 'transparent' : '#fff'}\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\" >\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n style=\"max-width: 260px; max-height: 150px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row mb-3 mt-3\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_footer\"></ng-template>\r\n </div>\r\n </div>\r\n </pgcard>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,.plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,::ng-deep .card-title span,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,.card-description,.card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}.card-default{background-color:#eaeaea;border-radius:5px}.card-header{height:72px}::ng-deep .card-title{width:70%}.plugin-type{right:20px;top:25px;position:absolute;background-color:#cf0106;border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}.card-description{height:40px;overflow-y:clip;color:#4d4d4d}.card-no-description{overflow-y:clip;height:60px;color:#929292}.card-img{padding:0;height:130px;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: pgCard, selector: "pgcard", inputs: ["Title", "Type", "MinimalHeader", "ProgressType", "ProgressColor", "Refresh", "RefreshColor", "Maximize", "Close", "Toggle", "HeaderClass", "BodyClass", "AdditionalClasses", "Controls", "ShowMessage", "Message", "Loading", "TimeOut", "CardBorderStyle"], outputs: ["onRefresh"] }] });
2700
+ }
2701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardComponent, decorators: [{
2702
+ type: Component,
2703
+ args: [{ selector: 'mefdev-card', template: "\r\n <pgcard\r\n MinimalHeader=\"true\"\r\n TimeOut=\"2500\"\r\n [Refresh]=\"false\"\r\n [Close]=\"false\">\r\n\r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title body-1\" [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </ng-template>\r\n\r\n <div class=\"plugin-type\">\r\n {{ card_type }}\r\n </div>\r\n\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"m-l-2 card-description\">\r\n <div *ngIf=\"!description || description == ''\" class=\"card-no-description\"> {{'No plugin description'}}</div>\r\n <p>\r\n {{description}}\r\n </p>\r\n </div>\r\n </div>\r\n <div class=\"col-12 mt-3 text-center card-img\"\r\n [ngStyle]=\"{'background-color': img ? 'transparent' : '#fff'}\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\" >\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n style=\"max-width: 260px; max-height: 150px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"row mb-3 mt-3\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_footer\"></ng-template>\r\n </div>\r\n </div>\r\n </pgcard>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,.plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,::ng-deep .card-title span,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,.card-description,.card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}.card-default{background-color:#eaeaea;border-radius:5px}.card-header{height:72px}::ng-deep .card-title{width:70%}.plugin-type{right:20px;top:25px;position:absolute;background-color:#cf0106;border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}.card-description{height:40px;overflow-y:clip;color:#4d4d4d}.card-no-description{overflow-y:clip;height:60px;color:#929292}.card-img{padding:0;height:130px;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\n"] }]
2704
+ }], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { card_title: [{
2705
+ type: ContentChild,
2706
+ args: ["card_title"]
2707
+ }], card_footer: [{
2708
+ type: ContentChild,
2709
+ args: ["card_footer"]
2710
+ }], card_type: [{
2711
+ type: Input
2712
+ }], img: [{
2713
+ type: Input
2714
+ }], imgUrl: [{
2715
+ type: Input
2716
+ }], description: [{
2717
+ type: Input
2718
+ }] } });
2719
+
2720
+ var CartTypeColors;
2721
+ (function (CartTypeColors) {
2722
+ CartTypeColors["UNSET"] = "UNSET";
2723
+ CartTypeColors["RED"] = "RED";
2724
+ CartTypeColors["GREEN"] = "GREEN";
2725
+ })(CartTypeColors || (CartTypeColors = {}));
2726
+
2727
+ /**
2728
+ * Component for displaying a long card with a title, parameters, and description.
2729
+ *
2730
+ * Example of usage:
2731
+ *
2732
+ * ```
2733
+ * <medev-card-long
2734
+ * [type_text]="'Type Text'"
2735
+ * [type_color]="CartTypeColors.RED"
2736
+ * [img]="'path/to/image.jpg'"
2737
+ * [imgUrl]="'path/to/image'"
2738
+ * [description]="'Card description'">
2739
+ *
2740
+ * <ng-template #title>
2741
+ * <!-- Content for the card title -->
2742
+ * </ng-template>
2743
+
2744
+ * <ng-template #params>
2745
+ * <!-- Content for the card parameters -->
2746
+ * </ng-template>
2747
+
2748
+ * <ng-template #second_col>
2749
+ * <!-- Content for the second column -->
2750
+ * </ng-template>
2751
+
2752
+ * <ng-template #third_col>
2753
+ * <!-- Content for the third column -->
2754
+ * </ng-template>
2755
+ * </medev-card-long>
2756
+ * ```
2757
+ *
2758
+ * <example-url>https://mef.dev/ui_kit_demo/view/card/card-long</example-url>
2759
+ */
2760
+ class CardLongComponent {
2761
+ router;
2256
2762
  /**
2257
- * The value of the option.
2258
- */
2259
- set Value(value) {
2260
- if (this._value === value) {
2261
- return;
2262
- }
2263
- this._value = value;
2264
- }
2265
- get Value() {
2266
- return this._value;
2267
- }
2763
+ * Template for displaying the title of the card.
2764
+ * ```
2765
+ * <medev-card-long>
2766
+ * <ng-template #title>
2767
+ * <!-- Content for the card title -->
2768
+ * </ng-template>
2769
+ * </medev-card-long>
2770
+ * ```
2771
+ */
2772
+ title;
2268
2773
  /**
2269
- * The label of the option.
2774
+ * Template for displaying the parameters of the card.
2775
+ * ```
2776
+ * <medev-card-long>
2777
+ * <ng-template #params>
2778
+ * <!-- Content for the card params -->
2779
+ * </ng-template>
2780
+ * </medev-card-long>
2781
+ * ```
2270
2782
  */
2271
- set Label(value) {
2272
- if (this._label === value) {
2273
- return;
2274
- }
2275
- this._label = value;
2276
- }
2277
- get Label() {
2278
- return this._label;
2279
- }
2783
+ params;
2280
2784
  /**
2281
- * Indicates whether the option is disabled.
2282
- */
2283
- set Disabled(value) {
2284
- this._disabled = toBoolean(value);
2285
- }
2286
- get Disabled() {
2287
- return this._disabled;
2288
- }
2289
- constructor(_Select) {
2290
- this._Select = _Select;
2291
- }
2785
+ * Template for displaying the content of the second column.
2786
+ * ```
2787
+ * <medev-card-long>
2788
+ * <ng-template #second_col>
2789
+ * <!-- Content for the card second column -->
2790
+ * </ng-template>
2791
+ * </medev-card-long>
2792
+ * ```
2793
+ */
2794
+ second_col;
2292
2795
  /**
2293
- * Initialization lifecycle hook.
2294
- * Adds the option to the dropdown list.
2295
- */
2796
+ * Template for displaying the content of the third column.
2797
+ * ```
2798
+ * <medev-card-long>
2799
+ * <ng-template #third_col>
2800
+ * <!-- Content for the card third column -->
2801
+ * </ng-template>
2802
+ * </medev-card-long>
2803
+ * ```
2804
+ */
2805
+ third_col;
2806
+ /**
2807
+ * The text for the card type.
2808
+ * @usageNotes
2809
+ * ```
2810
+ * <medev-card-long type_text = "'Type'"></<medev-card-long>
2811
+ * ```
2812
+ */
2813
+ type_text;
2814
+ /**
2815
+ * The color of the card type.
2816
+ * @usageNotes
2817
+ * ```
2818
+ * <medev-card-long type_color = "'RED'"></<medev-card-long>
2819
+ * ```
2820
+ * Colors: RED, UNSET, GREEN
2821
+
2822
+ */
2823
+ type_color = CartTypeColors.UNSET;
2824
+ /**
2825
+ * The path to the image.
2826
+ * @usageNotes
2827
+ * ```
2828
+ * <mefdev-card-long [img] = "'img/path/img.png'"></mefdev-card-long>
2829
+ * ```
2830
+ */
2831
+ img;
2832
+ /**
2833
+ * The path, where user goes after click at the image.
2834
+ * @usageNotes
2835
+ * ```
2836
+ * <mefdev-card-long [imgUrl] = "'Img.url'"></mefdev-card-long>
2837
+ * ```
2838
+ */
2839
+ imgUrl;
2840
+ /**
2841
+ * The description of the card.
2842
+ * @usageNotes
2843
+ * ```
2844
+ * <mefdev-card-long [description] = "'description'"></mefdev-card-long>
2845
+ * ```
2846
+ */
2847
+ description;
2848
+ constructor(router) {
2849
+ this.router = router;
2850
+ }
2296
2851
  ngOnInit() {
2297
- this._Select.addOption(this);
2298
2852
  }
2299
2853
  /**
2300
- * Destruction lifecycle hook.
2301
- * Removes the option from the dropdown list.
2302
- */
2303
- ngOnDestroy() {
2304
- this._Select.removeOption(this);
2854
+ * Event handler for image click.
2855
+ * Navigates to the specified URL.
2856
+ */
2857
+ imgClick() {
2858
+ this.router.navigate(['/', this.imgUrl.toString()]);
2305
2859
  }
2306
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevOptionComponent, deps: [{ token: MefDevSelectComponent }], target: i0.ɵɵFactoryTarget.Component });
2307
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefDevOptionComponent, selector: "mefdev-option", inputs: { Value: "Value", Label: "Label", Disabled: "Disabled" }, queries: [{ propertyName: "OptionTemplate", first: true, predicate: ["OptionTemplate"], descendants: true }], ngImport: i0, template: "<ng-content></ng-content>", encapsulation: i0.ViewEncapsulation.None });
2860
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardLongComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component });
2861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: CardLongComponent, selector: "medev-card-long", inputs: { type_text: "type_text", type_color: "type_color", img: "img", imgUrl: "imgUrl", description: "description" }, queries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }, { propertyName: "params", first: true, predicate: ["params"], descendants: true }, { propertyName: "second_col", first: true, predicate: ["second_col"], descendants: true }, { propertyName: "third_col", first: true, predicate: ["third_col"], descendants: true }], ngImport: i0, template: "\r\n <pgcard \r\n MinimalHeader=\"true\" \r\n TimeOut=\"2500\" \r\n [Refresh]=\"false\" \r\n [Close]=\"false\"\r\n >\r\n \r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title\" [ngTemplateOutlet]=\"title\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template #CardExtraControls>\r\n <div class=\"plugin-type\" \r\n [ngClass] = \"{\r\n 'b-color-Light-Gray-1': type_color === 'UNSET',\r\n 'b-color-Red': type_color === 'RED',\r\n 'b-color-Green': type_color === 'GREEN'}\">\r\n {{type_text}}\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"row h-100 m-b-10\">\r\n <div class=\"col-lg-3 col-12 card-col\">\r\n <div class=\"row\">\r\n <div class=\"col-12 card-img m-b-10\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\">\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n height=\"110px\" \r\n style=\"max-width: 110px; max-height: 110px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div> \r\n </div>\r\n <div class=\"col-12 m-t-2 body-6 text-dark params-block\">\r\n <ng-template [ngTemplateOutlet]=\"params\"></ng-template> \r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-lg-5 col-12 card-col\">\r\n <ng-template [ngTemplateOutlet]=\"second_col\"></ng-template> \r\n </div>\r\n \r\n <div class=\"col-lg-4 col-12 card-col mt-lg-0 mt-5\">\r\n <ng-template [ngTemplateOutlet]=\"third_col\"></ng-template> \r\n </div> \r\n\r\n </div>\r\n </pgcard>", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,:host::ng-deep .card-title span,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,:host::ng-deep .plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,:host::ng-deep .card-description,:host::ng-deep .card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}:host::ng-deep .params-block .row{margin-top:.75em}:host::ng-deep .params-block .row:last-child{margin-bottom:.75em}:host::ng-deep .card-col{min-height:220px}:host::ng-deep .header-link{opacity:1}:host::ng-deep .card-default{background-color:#f3f3f3;border-radius:5px}:host::ng-deep .card-title{width:80%;color:#000}:host::ng-deep .plugin-type{border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}:host::ng-deep .card-description{height:40px;overflow-y:clip;color:#4d4d4d}:host::ng-deep .card-no-description{overflow-y:clip;height:60px;color:#929292}:host::ng-deep .card-img{padding:0;height:130px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: pgCard, selector: "pgcard", inputs: ["Title", "Type", "MinimalHeader", "ProgressType", "ProgressColor", "Refresh", "RefreshColor", "Maximize", "Close", "Toggle", "HeaderClass", "BodyClass", "AdditionalClasses", "Controls", "ShowMessage", "Message", "Loading", "TimeOut", "CardBorderStyle"], outputs: ["onRefresh"] }] });
2308
2862
  }
2309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevOptionComponent, decorators: [{
2863
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardLongComponent, decorators: [{
2310
2864
  type: Component,
2311
- args: [{ selector: "mefdev-option", encapsulation: ViewEncapsulation.None, template: "<ng-content></ng-content>" }]
2312
- }], ctorParameters: function () { return [{ type: MefDevSelectComponent }]; }, propDecorators: { OptionTemplate: [{
2865
+ args: [{ selector: 'medev-card-long', template: "\r\n <pgcard \r\n MinimalHeader=\"true\" \r\n TimeOut=\"2500\" \r\n [Refresh]=\"false\" \r\n [Close]=\"false\"\r\n >\r\n \r\n <ng-template #CardTitle>\r\n <ng-template class=\"card-title\" [ngTemplateOutlet]=\"title\"></ng-template>\r\n </ng-template>\r\n\r\n <ng-template #CardExtraControls>\r\n <div class=\"plugin-type\" \r\n [ngClass] = \"{\r\n 'b-color-Light-Gray-1': type_color === 'UNSET',\r\n 'b-color-Red': type_color === 'RED',\r\n 'b-color-Green': type_color === 'GREEN'}\">\r\n {{type_text}}\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"row h-100 m-b-10\">\r\n <div class=\"col-lg-3 col-12 card-col\">\r\n <div class=\"row\">\r\n <div class=\"col-12 card-img m-b-10\">\r\n <div *ngIf=\"!img || img == ''\" >\r\n <img src=\"assets/images/md_icon.png\"\r\n style=\"max-width: 110px; max-height: 110px;\"/>\r\n </div>\r\n <div *ngIf=\"img\">\r\n <img src=\"{{img}}\" alt=\"\" class=\"image-responsive-height img-middle\"\r\n height=\"110px\" \r\n style=\"max-width: 110px; max-height: 110px;\"\r\n onclick=\"imgClick()\"\r\n />\r\n </div> \r\n </div>\r\n <div class=\"col-12 m-t-2 body-6 text-dark params-block\">\r\n <ng-template [ngTemplateOutlet]=\"params\"></ng-template> \r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-lg-5 col-12 card-col\">\r\n <ng-template [ngTemplateOutlet]=\"second_col\"></ng-template> \r\n </div>\r\n \r\n <div class=\"col-lg-4 col-12 card-col mt-lg-0 mt-5\">\r\n <ng-template [ngTemplateOutlet]=\"third_col\"></ng-template> \r\n </div> \r\n\r\n </div>\r\n </pgcard>", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.h1,h1{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;text-transform:uppercase;color:#000}.h2,h2{font-family:Montserrat;font-size:24px;line-height:29px;font-weight:700;color:#000}.h3,:host::ng-deep .card-title span,h3{font-family:Montserrat;font-size:14px;line-height:20px;font-weight:400;text-transform:uppercase;color:#000}.h4,h4{font-family:Montserrat;font-weight:300;font-size:13px;line-height:20px;text-transform:uppercase;color:#000}.h5,h5{font-family:Montserrat;font-weight:600;font-size:13px;line-height:20px;color:#000}.h6,:host::ng-deep .plugin-type,h6{font-family:Montserrat;font-weight:500;font-size:12px;line-height:20px;text-transform:capitalize;color:#000}.body-1,body-1{font-family:Lato;font-size:18px;line-height:20px;font-weight:700;color:#000}.body-2,body-2{font-family:Lato;font-size:16px;line-height:28px;font-weight:400;color:#000}.body-3,body-3{font-family:Lato;font-size:14px;line-height:22px;font-weight:700;color:#000}.body-4,body-4{font-family:Lato;font-size:14px;line-height:22px;font-weight:400;color:#000}.body-5,:host::ng-deep .card-description,:host::ng-deep .card-no-description,body-5{font-family:Lato;font-weight:600;font-size:13px;line-height:18px;color:#000}.body-6,body-6{font-family:Lato;font-size:13px;line-height:16px;font-weight:400;color:#000}:host::ng-deep .params-block .row{margin-top:.75em}:host::ng-deep .params-block .row:last-child{margin-bottom:.75em}:host::ng-deep .card-col{min-height:220px}:host::ng-deep .header-link{opacity:1}:host::ng-deep .card-default{background-color:#f3f3f3;border-radius:5px}:host::ng-deep .card-title{width:80%;color:#000}:host::ng-deep .plugin-type{border-radius:5px 0 0 5px;margin-right:-20px;height:28px;padding:5px 15px;color:#fff}:host::ng-deep .card-description{height:40px;overflow-y:clip;color:#4d4d4d}:host::ng-deep .card-no-description{overflow-y:clip;height:60px;color:#929292}:host::ng-deep .card-img{padding:0;height:130px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:-webkit-fill-available;margin-right:calc(var(--bs-gutter-x) * .5);margin-left:calc(var(--bs-gutter-x) * .5)}\n"] }]
2866
+ }], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { title: [{
2313
2867
  type: ContentChild,
2314
- args: ["OptionTemplate"]
2315
- }], Value: [{
2868
+ args: ["title"]
2869
+ }], params: [{
2870
+ type: ContentChild,
2871
+ args: ["params"]
2872
+ }], second_col: [{
2873
+ type: ContentChild,
2874
+ args: ["second_col"]
2875
+ }], third_col: [{
2876
+ type: ContentChild,
2877
+ args: ["third_col"]
2878
+ }], type_text: [{
2316
2879
  type: Input
2317
- }], Label: [{
2880
+ }], type_color: [{
2318
2881
  type: Input
2319
- }], Disabled: [{
2882
+ }], img: [{
2883
+ type: Input
2884
+ }], imgUrl: [{
2885
+ type: Input
2886
+ }], description: [{
2320
2887
  type: Input
2321
2888
  }] } });
2322
2889
 
2323
- class MefDevSelectModule {
2324
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2325
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, declarations: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent], imports: [CommonModule, FormsModule, OverlayModule], exports: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent] });
2326
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, imports: [CommonModule, FormsModule, OverlayModule] });
2890
+ /**
2891
+ * Component for displaying a simple card with a title.
2892
+ *
2893
+ * Example of usage:
2894
+ *```
2895
+ * <medev-card-simple [disabled]="true">
2896
+ * <ng-template #card_title>
2897
+ * <!-- Content for the card title -->
2898
+ * </ng-template>
2899
+ * </medev-card-simple>
2900
+ *```
2901
+ *
2902
+ * <example-url>https://mef.dev/ui_kit_demo/view/card/card-simple</example-url>
2903
+ */
2904
+ class CardSimpleComponent {
2905
+ /**
2906
+ * Determines whether the card is disabled or not.
2907
+ */
2908
+ isDisabled = false;
2909
+ /**
2910
+ * Template for displaying the title of the card.
2911
+ *```
2912
+ * <medev-card-simple>
2913
+ * <ng-template #card_title>
2914
+ * <h3>Card Title</h3>
2915
+ * </ng-template>
2916
+ * </medev-card-simple>
2917
+ *```
2918
+ */
2919
+ card_title;
2920
+ constructor() { }
2921
+ ngOnInit() {
2922
+ }
2923
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardSimpleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2924
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: CardSimpleComponent, selector: "medev-card-simple", inputs: { isDisabled: ["disabled", "isDisabled"] }, queries: [{ propertyName: "card_title", first: true, predicate: ["card_title"], descendants: true }], ngImport: i0, template: "<div class=\"card-simple\" [ngClass]=\"{ 'unused-block':isDisabled }\">\r\n <div class=\"row m-2 body-1\" *ngIf=\"card_title\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </div>\r\n </div>\r\n <div class=\"row m-2\">\r\n <div class=\"col-12\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.card-simple{background-color:#f3f3f3;padding:.5em;border-radius:5px}.unused-block{opacity:.6;pointer-events:none}\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
2327
2925
  }
2328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevSelectModule, decorators: [{
2329
- type: NgModule,
2330
- args: [{
2331
- imports: [CommonModule, FormsModule, OverlayModule],
2332
- declarations: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent],
2333
- exports: [OptionPipe, MefDevOptionComponent, MefDevSelectComponent]
2334
- }]
2335
- }] });
2926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardSimpleComponent, decorators: [{
2927
+ type: Component,
2928
+ args: [{ selector: 'medev-card-simple', template: "<div class=\"card-simple\" [ngClass]=\"{ 'unused-block':isDisabled }\">\r\n <div class=\"row m-2 body-1\" *ngIf=\"card_title\">\r\n <div class=\"col-12\">\r\n <ng-template [ngTemplateOutlet]=\"card_title\"></ng-template>\r\n </div>\r\n </div>\r\n <div class=\"row m-2\">\r\n <div class=\"col-12\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".color-Dark-Gray-1{color:#373737!important}.color-Dark-Gray-2{color:#4d4d4d!important}.color-Red{color:#cf0106!important}.color-Green{color:#28b446!important}.color-Light-Gray-1{color:#929292!important}.color-Light-Gray-2{color:#eaeaea!important}.color-Light-Gray-3{color:#f3f3f3!important}.color-White{color:#fff!important}.color-Link{color:#0185cf!important}.b-color-Dark-Gray-1{background-color:#373737!important}.b-color-Dark-Gray-2{background-color:#4d4d4d!important}.b-color-Red{background-color:#cf0106!important}.b-color-Green{background-color:#28b446!important}.b-color-Light-Gray-1{background-color:#929292!important}.b-color-Light-Gray-2{background-color:#eaeaea!important}.b-color-Light-Gray-3{background-color:#f3f3f3!important}.b-color-White{background-color:#fff!important}.b-color-Link{background-color:#0185cf!important}.card-simple{background-color:#f3f3f3;padding:.5em;border-radius:5px}.unused-block{opacity:.6;pointer-events:none}\n"] }]
2929
+ }], ctorParameters: function () { return []; }, propDecorators: { isDisabled: [{
2930
+ type: Input,
2931
+ args: ["disabled"]
2932
+ }], card_title: [{
2933
+ type: ContentChild,
2934
+ args: ["card_title"]
2935
+ }] } });
2336
2936
 
2337
2937
  class ProgressConfig {
2338
2938
  color = "primary";
@@ -2616,7 +3216,7 @@ class SlideUpComponent {
2616
3216
  this.visibleChange.emit(this.visible);
2617
3217
  }
2618
3218
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: SlideUpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2619
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: SlideUpComponent, selector: "mefdev-slide-up-modal", inputs: { show: "show" }, outputs: { visibleChange: "visibleChange" }, queries: [{ propertyName: "modal_header", first: true, predicate: ["modal_header"], descendants: true }, { propertyName: "modal_footer", first: true, predicate: ["modal_footer"], descendants: true }], ngImport: i0, template: "<div [@dialog] *ngIf=\"visible\" class=\"dialog\">\r\n\t<button (click)=\"hideModal()\" aria-label=\"Close\" class=\"dialog__close-btn\">X</button>\r\n\t<div class=\"modal-content\">\r\n <div class=\"modal-header clearfix text-left\">\r\n <ng-template [ngTemplateOutlet]=\"modal_header\"></ng-template>\r\n </div>\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <ng-template [ngTemplateOutlet]=\"modal_footer\"></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n<div *ngIf=\"visible\" class=\"overlay\" (click)=\"hideModal()\"></div>\r\n", styles: [".overlay{position:fixed;inset:0;background-color:#00000080;z-index:999}.dialog{z-index:1000;position:fixed;right:0;left:0;top:40px;margin:auto;min-height:200px;min-width:520px;max-width:90%;width:-moz-fit-content;width:fit-content;background-color:#fff;padding:12px;box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.dialog__close-btn{border:0;background:none;color:#2d2d2d;position:absolute;z-index:10002;top:8px;right:8px;font-size:1.2em}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
3219
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: SlideUpComponent, selector: "mefdev-slide-up-modal", inputs: { show: "show" }, outputs: { visibleChange: "visibleChange" }, queries: [{ propertyName: "modal_header", first: true, predicate: ["modal_header"], descendants: true }, { propertyName: "modal_footer", first: true, predicate: ["modal_footer"], descendants: true }], ngImport: i0, template: "<div [@dialog] *ngIf=\"visible\" class=\"dialog\">\r\n\t<button (click)=\"hideModal()\" aria-label=\"Close\" class=\"dialog__close-btn\">X</button>\r\n\t<div class=\"modal-content\">\r\n <div class=\"modal-header clearfix text-left\">\r\n <ng-template [ngTemplateOutlet]=\"modal_header\"></ng-template>\r\n </div>\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <ng-template [ngTemplateOutlet]=\"modal_footer\"></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n<div *ngIf=\"visible\" class=\"overlay\" (click)=\"hideModal()\"></div>\r\n", styles: [".overlay{position:fixed;inset:0;background-color:#00000080;z-index:999}.dialog{z-index:1000;position:fixed;inset:50% 0;margin:auto;min-height:200px;min-width:520px;max-width:90%;width:-moz-fit-content;width:fit-content;background-color:#fff;padding:12px;box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.dialog__close-btn{border:0;background:none;color:#2d2d2d;position:absolute;z-index:10002;top:8px;right:8px;font-size:1.2em}.modal-content .modal-footer{position:absolute;top:130px;right:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
2620
3220
  trigger('dialog', [
2621
3221
  transition('void => *', [
2622
3222
  style({ transform: 'scale3d(.3, .3, .3)' }),
@@ -2640,7 +3240,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
2640
3240
  animate(100, style({ transform: 'scale3d(.0, .0, .0)' }))
2641
3241
  ])
2642
3242
  ])
2643
- ], template: "<div [@dialog] *ngIf=\"visible\" class=\"dialog\">\r\n\t<button (click)=\"hideModal()\" aria-label=\"Close\" class=\"dialog__close-btn\">X</button>\r\n\t<div class=\"modal-content\">\r\n <div class=\"modal-header clearfix text-left\">\r\n <ng-template [ngTemplateOutlet]=\"modal_header\"></ng-template>\r\n </div>\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <ng-template [ngTemplateOutlet]=\"modal_footer\"></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n<div *ngIf=\"visible\" class=\"overlay\" (click)=\"hideModal()\"></div>\r\n", styles: [".overlay{position:fixed;inset:0;background-color:#00000080;z-index:999}.dialog{z-index:1000;position:fixed;right:0;left:0;top:40px;margin:auto;min-height:200px;min-width:520px;max-width:90%;width:-moz-fit-content;width:fit-content;background-color:#fff;padding:12px;box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.dialog__close-btn{border:0;background:none;color:#2d2d2d;position:absolute;z-index:10002;top:8px;right:8px;font-size:1.2em}\n"] }]
3243
+ ], template: "<div [@dialog] *ngIf=\"visible\" class=\"dialog\">\r\n\t<button (click)=\"hideModal()\" aria-label=\"Close\" class=\"dialog__close-btn\">X</button>\r\n\t<div class=\"modal-content\">\r\n <div class=\"modal-header clearfix text-left\">\r\n <ng-template [ngTemplateOutlet]=\"modal_header\"></ng-template>\r\n </div>\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <ng-template [ngTemplateOutlet]=\"modal_footer\"></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n<div *ngIf=\"visible\" class=\"overlay\" (click)=\"hideModal()\"></div>\r\n", styles: [".overlay{position:fixed;inset:0;background-color:#00000080;z-index:999}.dialog{z-index:1000;position:fixed;inset:50% 0;margin:auto;min-height:200px;min-width:520px;max-width:90%;width:-moz-fit-content;width:fit-content;background-color:#fff;padding:12px;box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.dialog__close-btn{border:0;background:none;color:#2d2d2d;position:absolute;z-index:10002;top:8px;right:8px;font-size:1.2em}.modal-content .modal-footer{position:absolute;top:130px;right:10px}\n"] }]
2644
3244
  }], ctorParameters: function () { return []; }, propDecorators: { modal_header: [{
2645
3245
  type: ContentChild,
2646
3246
  args: ["modal_header"]
@@ -4380,5 +4980,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
4380
4980
  * Generated bundle index. Do not edit.
4381
4981
  */
4382
4982
 
4383
- export { CardComponent, CardLongComponent, CardSimpleComponent, CartTypeColors, CentralPageComponent, CentralPageRowComponent, CollapseComponent, CollapseSetComponent, FillComponent, FilteredFieldContainerComponent, FilteredFieldItemComponent, FilteredFieldService, FiltredItemModel, HelpBlockComponent, ManagePageComponent, MefDevCardModule, MefDevCollapseModule, MefDevFilteredFieldModule, MefDevHelpBlockModule, MefDevModalModule, MefDevOptionComponent, MefDevPageLayoutsModule, MefDevProgressComponent, MefDevProgressModule, MefDevSelectComponent, MefDevSelectModule, MefDevSpecFlowTestComponent, MefDevSpecFlowTestModule, MefDevSwitchComponent, MefDevSwitchModule, MefDevTabBodyComponent, MefDevTabComponent, MefDevTabLabelDirective, MefDevTabSetComponent, MefDevTabsInkBarDirective, MefDevTabsModule, MefDevTabsNavComponent, OptionPipe, ProfileComponent, ProgressConfig, RightFilterComponent, SlideRightComponent, SlideUpComponent, TabChangeEvent, TablePageComponent, mefDevCardComponents, mefDevCollapseModuleComponents, pgCard, pgCardModule };
4983
+ export { CardComponent, CardLongComponent, CardSimpleComponent, CartTypeColors, CentralPageComponent, CentralPageRowComponent, CollapseComponent, CollapseSetComponent, DatepickerComponent, FillComponent, FilteredFieldContainerComponent, FilteredFieldItemComponent, FilteredFieldService, FiltredItemModel, HelpBlockComponent, ManagePageComponent, MefDevCardModule, MefDevCollapseModule, MefDevDatepickerModule, MefDevFilteredFieldModule, MefDevHelpBlockModule, MefDevModalModule, MefDevOptionComponent, MefDevPageLayoutsModule, MefDevProgressComponent, MefDevProgressModule, MefDevSelectComponent, MefDevSelectModule, MefDevSpecFlowTestComponent, MefDevSpecFlowTestModule, MefDevSwitchComponent, MefDevSwitchModule, MefDevTabBodyComponent, MefDevTabComponent, MefDevTabLabelDirective, MefDevTabSetComponent, MefDevTabsInkBarDirective, MefDevTabsModule, MefDevTabsNavComponent, OptionPipe, ProfileComponent, ProgressConfig, RightFilterComponent, SlideRightComponent, SlideUpComponent, TabChangeEvent, TablePageComponent, mefDevCardComponents, mefDevCollapseModuleComponents, pgCard, pgCardModule };
4384
4984
  //# sourceMappingURL=natec-mef-dev-ui-kit.mjs.map