@natec/mef-dev-ui-kit 16.2.1 → 16.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/markup-kit/executors/index.mjs +5 -0
- package/esm2022/lib/markup-kit/executors/mefdev-executor-page/mefdev-executor-page.component.mjs +44 -0
- package/esm2022/lib/markup-kit/executors/stage/stage.component.mjs +24 -0
- package/esm2022/lib/markup-kit/executors/step-executor/step-executor.component.mjs +110 -0
- package/esm2022/lib/markup-kit/executors/step-executor.module.mjs +38 -0
- package/esm2022/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.mjs +591 -0
- package/esm2022/lib/markup-kit/utils/datepicker/datepicker.module.mjs +21 -0
- package/esm2022/lib/markup-kit/utils/datepicker/index.mjs +3 -0
- package/esm2022/lib/pg-components/select/select.component.mjs +3 -3
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/natec-mef-dev-ui-kit.mjs +2389 -1590
- package/fesm2022/natec-mef-dev-ui-kit.mjs.map +1 -1
- package/lib/markup-kit/executors/index.d.ts +4 -0
- package/lib/markup-kit/executors/mefdev-executor-page/mefdev-executor-page.component.d.ts +16 -0
- package/lib/markup-kit/executors/stage/stage.component.d.ts +9 -0
- package/lib/markup-kit/executors/step-executor/step-executor.component.d.ts +29 -0
- package/lib/markup-kit/executors/step-executor.module.d.ts +11 -0
- package/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.d.ts +421 -0
- package/lib/markup-kit/utils/datepicker/datepicker.module.d.ts +10 -0
- package/lib/markup-kit/utils/datepicker/index.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, Input, EventEmitter, Host, ContentChild, HostBinding, Output, NgModule, Injectable,
|
|
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
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
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
|
-
|
|
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
|
-
|
|
639
|
-
static
|
|
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:
|
|
643
|
-
type:
|
|
644
|
-
args: [{
|
|
645
|
-
}]
|
|
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
|
-
*
|
|
659
|
-
*
|
|
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
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
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
|
-
|
|
805
|
-
* Default: false
|
|
806
|
-
*/
|
|
807
|
-
set MinimalHeader(value) {
|
|
808
|
-
this._minimalHeader = value;
|
|
685
|
+
get AllowClear() {
|
|
686
|
+
return this._allowClear;
|
|
809
687
|
}
|
|
810
|
-
|
|
811
|
-
|
|
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
|
-
|
|
819
|
-
*/
|
|
820
|
-
set ProgressColor(value) {
|
|
821
|
-
this._progressColor = value;
|
|
691
|
+
get KeepUnListOptions() {
|
|
692
|
+
return this._keepUnListOptions;
|
|
822
693
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
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
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
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
|
-
|
|
838
|
-
*/
|
|
839
|
-
set Maximize(value) {
|
|
840
|
-
this._maximize = value;
|
|
712
|
+
get Multiple() {
|
|
713
|
+
return this._isMultiple;
|
|
841
714
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
*/
|
|
845
|
-
set Close(value) {
|
|
846
|
-
this._close = value;
|
|
715
|
+
set PlaceHolder(value) {
|
|
716
|
+
this._placeholder = value;
|
|
847
717
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
*/
|
|
851
|
-
set Toggle(value) {
|
|
852
|
-
this._toggle = value;
|
|
718
|
+
get PlaceHolder() {
|
|
719
|
+
return this._placeholder;
|
|
853
720
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
*/
|
|
857
|
-
set HeaderClass(value) {
|
|
858
|
-
this._extraHeaderClass = value;
|
|
721
|
+
set NotFoundContent(value) {
|
|
722
|
+
this._notFoundContent = value;
|
|
859
723
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
*/
|
|
863
|
-
set BodyClass(value) {
|
|
864
|
-
this._extraBodyClass = value;
|
|
724
|
+
get NotFoundContent() {
|
|
725
|
+
return this._notFoundContent;
|
|
865
726
|
}
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
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
|
-
|
|
874
|
-
*/
|
|
875
|
-
set Controls(value) {
|
|
876
|
-
this._showTools = value;
|
|
732
|
+
get Size() {
|
|
733
|
+
return this._size;
|
|
877
734
|
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
*/
|
|
881
|
-
set ShowMessage(value) {
|
|
882
|
-
this._messageVisible = value;
|
|
735
|
+
set ShowSearch(value) {
|
|
736
|
+
this._showSearch = toBoolean(value);
|
|
883
737
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
*/
|
|
887
|
-
set Message(value) {
|
|
888
|
-
this._message = value;
|
|
738
|
+
get ShowSearch() {
|
|
739
|
+
return this._showSearch;
|
|
889
740
|
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
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
|
-
|
|
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
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
this._card_border_style = value;
|
|
749
|
+
set Disabled(value) {
|
|
750
|
+
this._disabled = toBoolean(value);
|
|
751
|
+
this.closeDropDown();
|
|
752
|
+
this.setClassMap();
|
|
909
753
|
}
|
|
910
|
-
|
|
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
|
-
|
|
924
|
-
|
|
925
|
-
|
|
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
|
-
|
|
933
|
-
this.
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
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
|
-
|
|
950
|
-
*/
|
|
951
|
-
alertDismiss() {
|
|
952
|
-
this._messageVisible = false;
|
|
775
|
+
get Open() {
|
|
776
|
+
return this._isOpen;
|
|
953
777
|
}
|
|
954
|
-
/**
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
if (!this.
|
|
959
|
-
|
|
960
|
-
|
|
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
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
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
|
-
|
|
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
|
-
|
|
802
|
+
compositionStart() {
|
|
803
|
+
this._composing = true;
|
|
1172
804
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
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
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
*/
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
/**
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
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
|
+
}
|
|
980
|
+
}
|
|
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
|
+
}
|
|
988
|
+
}
|
|
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
|
+
}
|
|
1332
1061
|
}
|
|
1333
|
-
|
|
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;
|
|
1334
1072
|
}
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
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
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
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
|
-
|
|
1436
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
1456
|
-
static
|
|
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:
|
|
1459
|
-
type:
|
|
1460
|
-
args: [{
|
|
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
|
-
*
|
|
1465
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
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);
|
|
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;
|
|
1423
|
+
}
|
|
1424
|
+
this._value = value;
|
|
1523
1425
|
}
|
|
1524
|
-
get
|
|
1525
|
-
return this.
|
|
1426
|
+
get Value() {
|
|
1427
|
+
return this._value;
|
|
1526
1428
|
}
|
|
1527
|
-
|
|
1528
|
-
|
|
1429
|
+
/**
|
|
1430
|
+
* The label of the option.
|
|
1431
|
+
*/
|
|
1432
|
+
set Label(value) {
|
|
1433
|
+
if (this._label === value) {
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
this._label = value;
|
|
1529
1437
|
}
|
|
1530
|
-
get
|
|
1531
|
-
return this.
|
|
1438
|
+
get Label() {
|
|
1439
|
+
return this._label;
|
|
1532
1440
|
}
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
else if (this._mode === "tags") {
|
|
1539
|
-
this.Tags = true;
|
|
1540
|
-
}
|
|
1541
|
-
else if (this._mode === "combobox") {
|
|
1542
|
-
this.ShowSearch = true;
|
|
1543
|
-
}
|
|
1441
|
+
/**
|
|
1442
|
+
* Indicates whether the option is disabled.
|
|
1443
|
+
*/
|
|
1444
|
+
set Disabled(value) {
|
|
1445
|
+
this._disabled = toBoolean(value);
|
|
1544
1446
|
}
|
|
1545
|
-
|
|
1546
|
-
this.
|
|
1547
|
-
if (this._isMultiple) {
|
|
1548
|
-
this.ShowSearch = true;
|
|
1549
|
-
}
|
|
1447
|
+
get Disabled() {
|
|
1448
|
+
return this._disabled;
|
|
1550
1449
|
}
|
|
1551
|
-
|
|
1552
|
-
|
|
1450
|
+
constructor(_Select) {
|
|
1451
|
+
this._Select = _Select;
|
|
1553
1452
|
}
|
|
1554
|
-
|
|
1555
|
-
|
|
1453
|
+
/**
|
|
1454
|
+
* Initialization lifecycle hook.
|
|
1455
|
+
* Adds the option to the dropdown list.
|
|
1456
|
+
*/
|
|
1457
|
+
ngOnInit() {
|
|
1458
|
+
this._Select.addOption(this);
|
|
1556
1459
|
}
|
|
1557
|
-
|
|
1558
|
-
|
|
1460
|
+
/**
|
|
1461
|
+
* Destruction lifecycle hook.
|
|
1462
|
+
* Removes the option from the dropdown list.
|
|
1463
|
+
*/
|
|
1464
|
+
ngOnDestroy() {
|
|
1465
|
+
this._Select.removeOption(this);
|
|
1559
1466
|
}
|
|
1560
|
-
|
|
1561
|
-
|
|
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;
|
|
1647
|
+
}
|
|
1648
|
+
if (inputElement && inputElement.contains(targetElement) && !this.isEditing) {
|
|
1649
|
+
// Клік відбувся на елементі input, відкриваємо календар
|
|
1650
|
+
this.isCalendarOpen = true;
|
|
1651
|
+
}
|
|
1652
|
+
else {
|
|
1653
|
+
// Клік відбувся поза календарем та input, закриваємо календар
|
|
1654
|
+
this.isCalendarOpen = false;
|
|
1655
|
+
}
|
|
1562
1656
|
}
|
|
1563
|
-
|
|
1564
|
-
|
|
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();
|
|
1565
1667
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
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();
|
|
1570
1674
|
}
|
|
1571
|
-
|
|
1572
|
-
|
|
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();
|
|
1573
1681
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
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);
|
|
1576
1688
|
}
|
|
1577
|
-
|
|
1578
|
-
|
|
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);
|
|
1579
1695
|
}
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
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);
|
|
1584
1708
|
}
|
|
1585
|
-
|
|
1586
|
-
|
|
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
|
|
1587
1716
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
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);
|
|
1592
1754
|
}
|
|
1593
|
-
|
|
1594
|
-
|
|
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;
|
|
1595
1765
|
}
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
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();
|
|
1604
1782
|
}
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
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];
|
|
1612
1801
|
}
|
|
1613
1802
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
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;
|
|
1616
1814
|
}
|
|
1617
|
-
/**
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
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
|
-
}
|
|
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;
|
|
1636
1826
|
}
|
|
1637
|
-
/**
|
|
1638
|
-
|
|
1639
|
-
|
|
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();
|
|
1640
1840
|
}
|
|
1641
|
-
|
|
1642
|
-
|
|
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();
|
|
1643
1855
|
}
|
|
1644
|
-
|
|
1645
|
-
|
|
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();
|
|
1646
1869
|
}
|
|
1647
|
-
/**
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
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) || '';
|
|
1656
1880
|
}
|
|
1657
|
-
/**
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
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) || '';
|
|
1667
1892
|
}
|
|
1668
|
-
/**
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
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
|
-
}
|
|
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();
|
|
1692
1904
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
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();
|
|
1699
1935
|
}
|
|
1700
1936
|
else {
|
|
1701
|
-
this.
|
|
1937
|
+
return this.datePipe.transform(date, 'dd');
|
|
1702
1938
|
}
|
|
1703
1939
|
}
|
|
1704
|
-
/**
|
|
1705
|
-
|
|
1706
|
-
|
|
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();
|
|
1707
1953
|
}
|
|
1708
|
-
/**
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
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
|
-
}
|
|
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();
|
|
1745
1967
|
}
|
|
1746
|
-
/**
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
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();
|
|
1754
1976
|
}
|
|
1755
|
-
/**
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
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++;
|
|
1772
2001
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
2002
|
+
calendarDays.push(week);
|
|
2003
|
+
}
|
|
2004
|
+
return calendarDays;
|
|
2005
|
+
}
|
|
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();
|
|
2017
|
+
}
|
|
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);
|
|
2029
|
+
}
|
|
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;
|
|
1778
2142
|
}
|
|
1779
2143
|
}
|
|
1780
|
-
else
|
|
1781
|
-
|
|
1782
|
-
return item != null && item.Value == currentModelValue;
|
|
1783
|
-
});
|
|
1784
|
-
this.chooseOption(selectedOption[0]);
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
forceUpdateSelectedOption(value) {
|
|
1788
|
-
/** trigger dirty check */ // @ts-ignore
|
|
1789
|
-
setTimeout(_ => {
|
|
1790
|
-
this.updateSelectedOption(value);
|
|
1791
|
-
});
|
|
2144
|
+
else
|
|
2145
|
+
this._value = value;
|
|
1792
2146
|
}
|
|
1793
|
-
get
|
|
2147
|
+
get value() {
|
|
1794
2148
|
return this._value;
|
|
1795
2149
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
this.
|
|
1801
|
-
this.unSelectMultipleOption(item, null, emitChange);
|
|
1802
|
-
});
|
|
1803
|
-
}
|
|
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);
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
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
|
-
}
|
|
1819
|
-
}
|
|
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
|
-
}
|
|
1827
|
-
}
|
|
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();
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
preOption(option, options) {
|
|
1837
|
-
return options[options.indexOf(option) - 1] || options[options.length - 1];
|
|
1838
|
-
}
|
|
1839
|
-
nextOption(option, options) {
|
|
1840
|
-
return options[options.indexOf(option) + 1] || options[0];
|
|
1841
|
-
}
|
|
1842
|
-
clearSearchText() {
|
|
1843
|
-
this._searchText = "";
|
|
1844
|
-
this.updateFilterOption();
|
|
2150
|
+
/**
|
|
2151
|
+
* Additional value property.
|
|
2152
|
+
*/
|
|
2153
|
+
get value2() {
|
|
2154
|
+
return this._value2;
|
|
1845
2155
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
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;
|
|
1865
2310
|
}
|
|
1866
|
-
|
|
1867
|
-
this.
|
|
2311
|
+
get Title() {
|
|
2312
|
+
return this._titleText;
|
|
1868
2313
|
}
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
setTimeout(_ => {
|
|
1876
|
-
this.searchInputElementRef.nativeElement.focus();
|
|
1877
|
-
});
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
2314
|
+
/**
|
|
2315
|
+
* The type of the card (e.g., default, bordered, minimal).
|
|
2316
|
+
* Default: "default"
|
|
2317
|
+
*/
|
|
2318
|
+
set Type(value) {
|
|
2319
|
+
this._type = value;
|
|
1880
2320
|
}
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
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
|
-
}
|
|
2321
|
+
/**
|
|
2322
|
+
* Indicates whether the card has a minimal header or not.
|
|
2323
|
+
* Default: false
|
|
2324
|
+
*/
|
|
2325
|
+
set MinimalHeader(value) {
|
|
2326
|
+
this._minimalHeader = value;
|
|
1900
2327
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
this._renderer.removeStyle(this.searchInputElementRef.nativeElement, "width");
|
|
1908
|
-
}
|
|
1909
|
-
this.clearSearchText();
|
|
1910
|
-
this.Open = false;
|
|
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;
|
|
1911
2334
|
}
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
this.
|
|
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
|
-
};
|
|
2335
|
+
/**
|
|
2336
|
+
* The color of the progress indicator in the card.
|
|
2337
|
+
*/
|
|
2338
|
+
set ProgressColor(value) {
|
|
2339
|
+
this._progressColor = value;
|
|
1935
2340
|
}
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
[`${this._dropDownPrefixCls}--multiple`]: this.Multiple,
|
|
1942
|
-
[`${this._dropDownPrefixCls}-placement-bottomLeft`]: this._dropDownPosition === "bottom",
|
|
1943
|
-
[`${this._dropDownPrefixCls}-placement-topLeft`]: this._dropDownPosition === "top"
|
|
1944
|
-
};
|
|
2341
|
+
/**
|
|
2342
|
+
* Indicates whether the card should have a refresh button or not.
|
|
2343
|
+
*/
|
|
2344
|
+
set Refresh(value) {
|
|
2345
|
+
this._refresh = value;
|
|
1945
2346
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
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
|
-
});
|
|
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;
|
|
1960
2353
|
}
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
else {
|
|
1967
|
-
if (this._value) {
|
|
1968
|
-
this.updateSelectedOption(this._value);
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
2354
|
+
/**
|
|
2355
|
+
* Indicates whether the card should have a maximize button or not.
|
|
2356
|
+
*/
|
|
2357
|
+
set Maximize(value) {
|
|
2358
|
+
this._maximize = value;
|
|
1971
2359
|
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
width: this._triggerWidth
|
|
1978
|
-
});
|
|
1979
|
-
}
|
|
2360
|
+
/**
|
|
2361
|
+
* Indicates whether the card should have a close button or not.
|
|
2362
|
+
*/
|
|
2363
|
+
set Close(value) {
|
|
2364
|
+
this._close = value;
|
|
1980
2365
|
}
|
|
1981
|
-
|
|
1982
|
-
|
|
2366
|
+
/**
|
|
2367
|
+
* Indicates whether the card should have a toggle button or not.
|
|
2368
|
+
*/
|
|
2369
|
+
set Toggle(value) {
|
|
2370
|
+
this._toggle = value;
|
|
1983
2371
|
}
|
|
1984
|
-
|
|
1985
|
-
|
|
2372
|
+
/**
|
|
2373
|
+
* Additional CSS class(es) to be added to the card header.
|
|
2374
|
+
*/
|
|
2375
|
+
set HeaderClass(value) {
|
|
2376
|
+
this._extraHeaderClass = value;
|
|
1986
2377
|
}
|
|
1987
|
-
|
|
1988
|
-
|
|
2378
|
+
/**
|
|
2379
|
+
* Additional CSS class(es) to be added to the card body.
|
|
2380
|
+
*/
|
|
2381
|
+
set BodyClass(value) {
|
|
2382
|
+
this._extraBodyClass = value;
|
|
1989
2383
|
}
|
|
1990
|
-
|
|
1991
|
-
|
|
2384
|
+
/**
|
|
2385
|
+
* Additional CSS class(es) to be added to the card.
|
|
2386
|
+
*/
|
|
2387
|
+
set AdditionalClasses(value) {
|
|
2388
|
+
this._additionalClasses = value;
|
|
1992
2389
|
}
|
|
1993
|
-
|
|
1994
|
-
|
|
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;
|
|
1995
2395
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2396
|
+
/**
|
|
2397
|
+
* Indicates whether the message in the card is visible or not.
|
|
2398
|
+
*/
|
|
2399
|
+
set ShowMessage(value) {
|
|
2400
|
+
this._messageVisible = value;
|
|
2000
2401
|
}
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
}
|
|
2402
|
+
/**
|
|
2403
|
+
* The message text to be displayed in the card.
|
|
2404
|
+
*/
|
|
2405
|
+
set Message(value) {
|
|
2406
|
+
this._message = value;
|
|
2007
2407
|
}
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
this.
|
|
2408
|
+
/**
|
|
2409
|
+
* Indicates whether the loading indicator is shown in the card or not.
|
|
2410
|
+
*/
|
|
2411
|
+
set Loading(value) {
|
|
2412
|
+
this._isLoading = value;
|
|
2013
2413
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
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;
|
|
2018
2421
|
}
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2422
|
+
/**
|
|
2423
|
+
* The border style of the card.
|
|
2424
|
+
*/
|
|
2425
|
+
set CardBorderStyle(value) {
|
|
2426
|
+
this._card_border_style = value;
|
|
2023
2427
|
}
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
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
|
-
}
|
|
2042
|
-
}
|
|
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;
|
|
2043
2439
|
}
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
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;
|
|
2050
2449
|
}
|
|
2051
2450
|
else {
|
|
2052
|
-
this.
|
|
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";
|
|
2053
2464
|
}
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2465
|
+
}
|
|
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
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
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
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
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
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
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(
|
|
2103
|
-
|
|
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(
|
|
2115
|
-
state(
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
])
|
|
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:
|
|
2522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: pgCard, decorators: [{
|
|
2128
2523
|
type: Component,
|
|
2129
|
-
args: [{ selector: "
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
], animations: [trigger('dropDownAnimation', [
|
|
2136
|
-
state('bottom', style({
|
|
2137
|
-
opacity: 1,
|
|
2138
|
-
transform: 'scaleY(1)',
|
|
2139
|
-
transformOrigin: '0% 0%'
|
|
2524
|
+
args: [{ selector: "pgcard", encapsulation: ViewEncapsulation.None, animations: [
|
|
2525
|
+
trigger("collapseState", [
|
|
2526
|
+
state("inactive", style({
|
|
2527
|
+
opacity: "0",
|
|
2528
|
+
height: 0,
|
|
2529
|
+
paddingBottom: "0"
|
|
2140
2530
|
})),
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
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%'
|
|
2531
|
+
state("active", style({
|
|
2532
|
+
opacity: "1",
|
|
2533
|
+
height: "*",
|
|
2534
|
+
paddingBottom: "*"
|
|
2153
2535
|
})),
|
|
2154
|
-
transition(
|
|
2155
|
-
|
|
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
|
-
])
|
|
2536
|
+
transition("inactive => active", animate("125ms ease-in")),
|
|
2537
|
+
transition("active => inactive", animate("125ms ease-out"))
|
|
2165
2538
|
]),
|
|
2166
|
-
trigger(
|
|
2167
|
-
state(
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
])
|
|
2178
|
-
|
|
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: ["
|
|
2181
|
-
}],
|
|
2554
|
+
args: ["hostContent"]
|
|
2555
|
+
}], minimalCircleLoading: [{
|
|
2182
2556
|
type: ViewChild,
|
|
2183
|
-
args: ["
|
|
2184
|
-
}],
|
|
2557
|
+
args: ["minimalCircleLoading"]
|
|
2558
|
+
}], minimalCircleLoadingTrigger: [{
|
|
2185
2559
|
type: ViewChild,
|
|
2186
|
-
args: ["
|
|
2187
|
-
}],
|
|
2188
|
-
type:
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
}],
|
|
2194
|
-
type:
|
|
2195
|
-
}],
|
|
2560
|
+
args: ["minimalCircleLoadingTrigger"]
|
|
2561
|
+
}], CardTitle: [{
|
|
2562
|
+
type: ContentChild,
|
|
2563
|
+
args: ["CardTitle"]
|
|
2564
|
+
}], CardExtraControls: [{
|
|
2565
|
+
type: ContentChild,
|
|
2566
|
+
args: ["CardExtraControls"]
|
|
2567
|
+
}], Title: [{
|
|
2568
|
+
type: Input
|
|
2569
|
+
}], Type: [{
|
|
2570
|
+
type: Input
|
|
2571
|
+
}], MinimalHeader: [{
|
|
2196
2572
|
type: Input
|
|
2197
|
-
}],
|
|
2573
|
+
}], ProgressType: [{
|
|
2198
2574
|
type: Input
|
|
2199
|
-
}],
|
|
2575
|
+
}], ProgressColor: [{
|
|
2200
2576
|
type: Input
|
|
2201
|
-
}],
|
|
2202
|
-
type: ViewChild,
|
|
2203
|
-
args: [CdkConnectedOverlay]
|
|
2204
|
-
}], AllowClear: [{
|
|
2577
|
+
}], Refresh: [{
|
|
2205
2578
|
type: Input
|
|
2206
|
-
}],
|
|
2579
|
+
}], RefreshColor: [{
|
|
2207
2580
|
type: Input
|
|
2208
|
-
}],
|
|
2581
|
+
}], Maximize: [{
|
|
2209
2582
|
type: Input
|
|
2210
|
-
}],
|
|
2583
|
+
}], Close: [{
|
|
2211
2584
|
type: Input
|
|
2212
|
-
}],
|
|
2585
|
+
}], Toggle: [{
|
|
2213
2586
|
type: Input
|
|
2214
|
-
}],
|
|
2587
|
+
}], HeaderClass: [{
|
|
2215
2588
|
type: Input
|
|
2216
|
-
}],
|
|
2589
|
+
}], BodyClass: [{
|
|
2217
2590
|
type: Input
|
|
2218
|
-
}],
|
|
2591
|
+
}], AdditionalClasses: [{
|
|
2219
2592
|
type: Input
|
|
2220
|
-
}],
|
|
2593
|
+
}], Controls: [{
|
|
2221
2594
|
type: Input
|
|
2222
|
-
}],
|
|
2595
|
+
}], ShowMessage: [{
|
|
2223
2596
|
type: Input
|
|
2224
|
-
}],
|
|
2597
|
+
}], Message: [{
|
|
2225
2598
|
type: Input
|
|
2226
|
-
}],
|
|
2227
|
-
type:
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
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
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
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;
|
|
2629
|
+
/**
|
|
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;
|
|
2762
|
+
/**
|
|
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;
|
|
2773
|
+
/**
|
|
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
|
+
* ```
|
|
2782
|
+
*/
|
|
2783
|
+
params;
|
|
2784
|
+
/**
|
|
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;
|
|
2795
|
+
/**
|
|
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;
|
|
2252
2806
|
/**
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
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;
|
|
2256
2814
|
/**
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
return this._value;
|
|
2267
|
-
}
|
|
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;
|
|
2268
2824
|
/**
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
}
|
|
2277
|
-
get Label() {
|
|
2278
|
-
return this._label;
|
|
2279
|
-
}
|
|
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;
|
|
2280
2832
|
/**
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
}
|
|
2289
|
-
constructor(_Select) {
|
|
2290
|
-
this._Select = _Select;
|
|
2291
|
-
}
|
|
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;
|
|
2292
2840
|
/**
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
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
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
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:
|
|
2307
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type:
|
|
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:
|
|
2863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: CardLongComponent, decorators: [{
|
|
2310
2864
|
type: Component,
|
|
2311
|
-
args: [{ selector: "
|
|
2312
|
-
}], ctorParameters: function () { return [{ type:
|
|
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: ["
|
|
2315
|
-
}],
|
|
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
|
-
}],
|
|
2880
|
+
}], type_color: [{
|
|
2318
2881
|
type: Input
|
|
2319
|
-
}],
|
|
2882
|
+
}], img: [{
|
|
2883
|
+
type: Input
|
|
2884
|
+
}], imgUrl: [{
|
|
2885
|
+
type: Input
|
|
2886
|
+
}], description: [{
|
|
2320
2887
|
type: Input
|
|
2321
2888
|
}] } });
|
|
2322
2889
|
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
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:
|
|
2329
|
-
type:
|
|
2330
|
-
args: [{
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
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";
|
|
@@ -3210,6 +3810,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
3210
3810
|
}]
|
|
3211
3811
|
}] });
|
|
3212
3812
|
|
|
3813
|
+
class StageComponent {
|
|
3814
|
+
currentExecutorStep;
|
|
3815
|
+
isRightModal;
|
|
3816
|
+
isCompleted;
|
|
3817
|
+
title;
|
|
3818
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: StageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: StageComponent, selector: "mefdev-stage", inputs: { currentExecutorStep: "currentExecutorStep", isRightModal: "isRightModal", isCompleted: "isCompleted", title: "title" }, ngImport: i0, template: "<div class=\"step\">\r\n <ng-container *ngIf=\"!isCompleted else done\">\r\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" [ngStyle]=\"isRightModal ? { 'fill': '#FFFFFF' } : { 'fill': '#F3F3F3' }\">\r\n <rect width=\"36\" height=\"36\" rx=\"18\" />\r\n <text class=\"body-3\" x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-size=\"16\" fill=\"black\">\r\n {{ currentExecutorStep }}\r\n </text>\r\n </svg>\r\n <div class=\"body-6 descriptionStepText\" *ngIf=\"!isRightModal\">\r\n {{ title }}\r\n </div>\r\n </ng-container>\r\n</div>\r\n<ng-template #done>\r\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"0.5\" y=\"0.5\" width=\"35\" height=\"35\" rx=\"17.5\" stroke=\"#929292\"/>\r\n <path d=\"M24.7373 10L14.5466 20.3769L11.2415 17.0114L8 20.3122L11.3051 23.6777L14.5678 27L17.8093 23.6992L28 13.3224L24.7373 10Z\"\r\n fill=\"#28B446\"/>\r\n </svg>\r\n <span class=\"body-6 descriptionStepText\" *ngIf=\"!isRightModal\">\r\n {{ title }}\r\n </span>\r\n</ng-template>\r\n", styles: [".step{display:flex;align-items:center;column-gap:11px}.step .descriptionStepText{width:77px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
3820
|
+
}
|
|
3821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: StageComponent, decorators: [{
|
|
3822
|
+
type: Component,
|
|
3823
|
+
args: [{ selector: 'mefdev-stage', template: "<div class=\"step\">\r\n <ng-container *ngIf=\"!isCompleted else done\">\r\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" [ngStyle]=\"isRightModal ? { 'fill': '#FFFFFF' } : { 'fill': '#F3F3F3' }\">\r\n <rect width=\"36\" height=\"36\" rx=\"18\" />\r\n <text class=\"body-3\" x=\"50%\" y=\"50%\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-size=\"16\" fill=\"black\">\r\n {{ currentExecutorStep }}\r\n </text>\r\n </svg>\r\n <div class=\"body-6 descriptionStepText\" *ngIf=\"!isRightModal\">\r\n {{ title }}\r\n </div>\r\n </ng-container>\r\n</div>\r\n<ng-template #done>\r\n <svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <rect x=\"0.5\" y=\"0.5\" width=\"35\" height=\"35\" rx=\"17.5\" stroke=\"#929292\"/>\r\n <path d=\"M24.7373 10L14.5466 20.3769L11.2415 17.0114L8 20.3122L11.3051 23.6777L14.5678 27L17.8093 23.6992L28 13.3224L24.7373 10Z\"\r\n fill=\"#28B446\"/>\r\n </svg>\r\n <span class=\"body-6 descriptionStepText\" *ngIf=\"!isRightModal\">\r\n {{ title }}\r\n </span>\r\n</ng-template>\r\n", styles: [".step{display:flex;align-items:center;column-gap:11px}.step .descriptionStepText{width:77px}\n"] }]
|
|
3824
|
+
}], propDecorators: { currentExecutorStep: [{
|
|
3825
|
+
type: Input
|
|
3826
|
+
}], isRightModal: [{
|
|
3827
|
+
type: Input
|
|
3828
|
+
}], isCompleted: [{
|
|
3829
|
+
type: Input
|
|
3830
|
+
}], title: [{
|
|
3831
|
+
type: Input
|
|
3832
|
+
}] } });
|
|
3833
|
+
|
|
3834
|
+
class StepExecutorComponent {
|
|
3835
|
+
renderer;
|
|
3836
|
+
view;
|
|
3837
|
+
container;
|
|
3838
|
+
title;
|
|
3839
|
+
description;
|
|
3840
|
+
footer;
|
|
3841
|
+
onActivePageChange = new EventEmitter();
|
|
3842
|
+
_activePageInd = 0;
|
|
3843
|
+
pages = [];
|
|
3844
|
+
constructor(renderer) {
|
|
3845
|
+
this.renderer = renderer;
|
|
3846
|
+
}
|
|
3847
|
+
set activePageInd(activePageNumber) {
|
|
3848
|
+
this._activePageInd = activePageNumber;
|
|
3849
|
+
if (activePageNumber >= 0 && this.container) {
|
|
3850
|
+
if (this.container.nativeElement.innerHTML != '') {
|
|
3851
|
+
this.container.nativeElement.innerHTML = '';
|
|
3852
|
+
}
|
|
3853
|
+
this.renderer.appendChild(this.container.nativeElement, this.activePage?.elRef.nativeElement);
|
|
3854
|
+
this.onActivePageChange.emit(this.pages.find((el) => el.isActive));
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
get activePageInd() {
|
|
3858
|
+
return this._activePageInd;
|
|
3859
|
+
}
|
|
3860
|
+
get activePage() {
|
|
3861
|
+
return this.activePageInd == -1 ? null : this.pages[this.activePageInd];
|
|
3862
|
+
}
|
|
3863
|
+
ngAfterViewInit() {
|
|
3864
|
+
this.renderer.appendChild(this.container.nativeElement, this.activePage?.elRef.nativeElement);
|
|
3865
|
+
this.onActivePageChange.emit(this.pages.find((el) => el.isActive));
|
|
3866
|
+
}
|
|
3867
|
+
nextBtnIsDisabled() {
|
|
3868
|
+
return this._activePageInd === this.pages.length - 1;
|
|
3869
|
+
}
|
|
3870
|
+
prev() {
|
|
3871
|
+
const newPageInd = this.activePageInd - 1;
|
|
3872
|
+
if (newPageInd >= 0) {
|
|
3873
|
+
this.activePageInd = newPageInd;
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
cancel() {
|
|
3877
|
+
this.activePageInd = 0;
|
|
3878
|
+
const newPageInd = this.activePageInd - 1;
|
|
3879
|
+
if (newPageInd >= 0) {
|
|
3880
|
+
this.activePageInd = newPageInd;
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
next() {
|
|
3884
|
+
const newPageInd = this.activePageInd + 1;
|
|
3885
|
+
if (newPageInd < this.pages.length) {
|
|
3886
|
+
this.activePageInd = newPageInd;
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
setActivePage(pageNumber) {
|
|
3890
|
+
pageNumber -= 1;
|
|
3891
|
+
if (pageNumber < this.pages.length && pageNumber >= 0) {
|
|
3892
|
+
this.activePageInd = pageNumber;
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
addPage(page) {
|
|
3896
|
+
this.pages.push(page);
|
|
3897
|
+
}
|
|
3898
|
+
removeSpecificPage(page) {
|
|
3899
|
+
const index = this.pages.indexOf(page);
|
|
3900
|
+
if (index !== -1) {
|
|
3901
|
+
this.pages.splice(index, 1);
|
|
3902
|
+
if (index === this.activePageInd) {
|
|
3903
|
+
this.prev();
|
|
3904
|
+
}
|
|
3905
|
+
}
|
|
3906
|
+
}
|
|
3907
|
+
removePageByIndex(index) {
|
|
3908
|
+
if (index >= 0 && index < this.pages.length) {
|
|
3909
|
+
this.pages.splice(index, 1);
|
|
3910
|
+
if (index === this.activePageInd) {
|
|
3911
|
+
this.prev();
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
}
|
|
3915
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: StepExecutorComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
3916
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: StepExecutorComponent, selector: "mefdev-step-executor", inputs: { view: "view" }, outputs: { onActivePageChange: "onActivePageChange" }, queries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }, { propertyName: "description", first: true, predicate: ["description"], descendants: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<!--view == regular-->\r\n\r\n<div class=\"stepExecutorBlock\" *ngIf=\"view === 'regular'\">\r\n <header class=\"stepExecutorHeader\">\r\n <div class=\"stepExecutorHeaderText\">\r\n <h1 class=\"title\">\r\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\r\n </h1>\r\n <p class=\"body-5\">\r\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\r\n </p>\r\n </div>\r\n <div class=\"steps\">\r\n <mefdev-stage *ngFor=\"let page of pages; let pageIndex = index\"\r\n [isRightModal]=\"false\"\r\n [title]=\"page.title\"\r\n [currentExecutorStep]=\"pageIndex + 1\"\r\n [isCompleted]=\"page.isCompleted\">\r\n </mefdev-stage>\r\n </div>\r\n </header>\r\n\r\n <div *ngIf=\"activePage\" class=\"executorChangeContent\">\r\n <div #container></div>\r\n </div>\r\n\r\n <div class=\"footerButtons\">\r\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\r\n </div>\r\n</div>\r\n\r\n\r\n<!--view == modal-->\r\n\r\n<div class=\"modalStepExecutor\" *ngIf=\"view === 'modal'\">\r\n\r\n <header class=\"modalHeader\">\r\n <div class=\"headerModalText\">\r\n <div class=\"textAndCloseButton\">\r\n <h1 class=\"title\">\r\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\r\n </h1>\r\n <p class=\"body-5\">\r\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\r\n </p>\r\n </div>\r\n <article class=\"closeBtn\">\r\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.26735 7.68135L0.610352 2.02435L2.02435 0.610352L7.68135 6.26735L13.3384 0.610352L14.7524 2.02435L9.09535 7.68135L14.7524 13.3384L13.3384 14.7524L7.68135 9.09535L2.02435 14.7524L0.610352 13.3384L6.26735 7.68135Z\" fill=\"#4D4D4D\"/>\r\n </svg>\r\n </article>\r\n </div>\r\n <div class=\"modalSteps\">\r\n <mefdev-stage *ngFor=\"let page of pages; let pageIndex = index\"\r\n [isRightModal]=\"false\"\r\n [title]=\"page.title\"\r\n [currentExecutorStep]=\"pageIndex + 1\"\r\n [isCompleted]=\"page.isCompleted\">\r\n </mefdev-stage>\r\n </div>\r\n </header>\r\n\r\n <main *ngIf=\"activePage\" class=\"modalExecutorMainContent\">\r\n <div #container></div>\r\n </main>\r\n\r\n <footer class=\"modalFooter\">\r\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\r\n </footer>\r\n\r\n</div>\r\n\r\n<!--view == right-->\r\n\r\n<div class=\"rightExecutorBlock\" *ngIf=\"view === 'right'\">\r\n\r\n <header class=\"rightExecutorHeader\">\r\n <div class=\"rightExecutorTextAndCloseButton\">\r\n <span class=\"body-1\">\r\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\r\n </span>\r\n <p class=\"body-5\">\r\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\r\n </p>\r\n </div>\r\n <div class=\"closeButton\">\r\n <svg width=\"17\" height=\"17\" viewBox=\"0 0 17 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.0566 1.59971L14.6566 0.199707L8.05664 6.79971L1.45664 0.199707L0.0566406 1.59971L6.65664 8.19971L0.0566406 14.7997L1.45664 16.1997L8.05664 9.59971L14.6566 16.1997L16.0566 14.7997L9.45664 8.19971L16.0566 1.59971Z\" fill=\"#525252\"/>\r\n </svg>\r\n </div>\r\n </header>\r\n\r\n <div class=\"line\">\r\n <svg width=\"363\" height=\"1\" viewBox=\"0 0 363 1\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <line x1=\"-4.37114e-08\" y1=\"0.5\" x2=\"362.674\" y2=\"0.499968\" stroke=\"#4D4D4D\"/>\r\n </svg>\r\n </div>\r\n\r\n <div class=\"contentExecutor\">\r\n <div class=\"rightChangeContent\">\r\n <div *ngIf=\"activePage\" class=\"executorChangeContent\">\r\n <div #container></div>\r\n </div>\r\n <div class=\"rightSteps\">\r\n <mefdev-stage *ngFor=\"let page of pages; let pageIndex = index\"\r\n [isRightModal]=\"true\"\r\n [title]=\"page.title\"\r\n [currentExecutorStep]=\"pageIndex + 1\"\r\n [isCompleted]=\"page.isCompleted\">\r\n </mefdev-stage>\r\n </div>\r\n </div>\r\n\r\n <footer class=\"rightFooter\">\r\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\r\n </footer>\r\n </div>\r\n\r\n</div>\r\n", styles: [".stepExecutorBlock{height:auto;display:flex;flex-direction:column}.stepExecutorBlock .stepExecutorHeader{padding:49px 71px 40px 154px;display:flex;flex-direction:column;row-gap:23px}.stepExecutorBlock .stepExecutorHeader .stepExecutorHeaderText{display:flex;flex-direction:column;row-gap:8px}.stepExecutorBlock .stepExecutorHeader .stepExecutorHeaderText .title{color:#4d4d4d}.stepExecutorBlock .stepExecutorHeader .stepExecutorHeaderText p{display:block;width:234px;height:auto;color:#4d4d4d}.stepExecutorBlock .stepExecutorHeader .steps{display:flex;flex-wrap:wrap;column-gap:23px;row-gap:17px}.stepExecutorBlock .executorChangeContent{padding:46px 31px 57px 154px;width:100%;min-height:359px;height:auto;background-color:#f3f3f3}.stepExecutorBlock .footerButtons{margin-top:46px;padding-left:154px;padding-bottom:74px}.modalStepExecutor{max-width:898px;width:auto;box-shadow:0 0 10px #0000001c}.modalStepExecutor .modalHeader{height:auto;padding:36px 25px 32px 33px;display:flex;flex-direction:column;row-gap:13px}.modalStepExecutor .modalHeader .headerModalText{display:flex;justify-content:space-between}.modalStepExecutor .modalHeader .headerModalText .textAndCloseButton{display:flex;column-gap:23px}.modalStepExecutor .modalHeader .headerModalText .closeBtn{width:33px;height:33px;border-radius:5px;background-color:#f3f3f3;display:flex;justify-content:center;align-items:center;cursor:pointer}.modalStepExecutor .modalHeader .headerModalText .closeBtn:hover svg path{fill:#cf0106}.modalStepExecutor .modalHeader .headerModalText p{width:235px;color:#4d4d4d}.modalStepExecutor .modalHeader .modalSteps{max-width:724px;width:auto;display:flex;flex-wrap:wrap;column-gap:23px}.modalStepExecutor .modalExecutorMainContent{padding:29px 45px 31px 33px;background-color:#f3f3f3;min-height:345px;height:auto}.modalStepExecutor .modalFooter{padding:32px 0 35px 33px;display:flex;column-gap:17px}.rightExecutorBlock{padding:25px 19px 43px;max-width:401px;height:auto;background-color:#f3f3f3;border-radius:5px}.rightExecutorBlock .rightExecutorHeader{display:flex;justify-content:space-between}.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton{display:flex;flex-direction:column;row-gap:8px}.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton span,.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton p{height:auto;width:225px}.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton p{color:#4d4d4d}.rightExecutorBlock .rightExecutorHeader .closeButton svg{cursor:pointer}.rightExecutorBlock .rightExecutorHeader .closeButton svg:hover path{fill:#cf0106}.rightExecutorBlock .line{margin-top:9px;margin-bottom:37px}.rightExecutorBlock .contentExecutor .rightChangeContent{display:flex;justify-content:space-between}.rightExecutorBlock .contentExecutor .rightChangeContent .executorChangeContent{max-width:291px;height:auto}.rightExecutorBlock .contentExecutor .rightChangeContent .rightSteps{display:flex;flex-direction:column;row-gap:22px}.rightExecutorBlock .rightFooter{margin-top:67px;display:flex;column-gap:16px}@media screen and (max-width: 768px){.stepExecutorBlock .stepExecutorHeader{padding:21px 41px}.stepExecutorBlock .executorChangeContent{padding:46px 31px 57px 54px}.stepExecutorBlock .footerButtons{padding:41px}.modalStepExecutor .modalHeader .headerModalText .textAndCloseButton{display:flex;flex-direction:column}.modalStepExecutor .modalHeader .modalSteps{row-gap:21px}}\n"], dependencies: [{ 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: "component", type: StageComponent, selector: "mefdev-stage", inputs: ["currentExecutorStep", "isRightModal", "isCompleted", "title"] }] });
|
|
3917
|
+
}
|
|
3918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: StepExecutorComponent, decorators: [{
|
|
3919
|
+
type: Component,
|
|
3920
|
+
args: [{ selector: 'mefdev-step-executor', template: "<!--view == regular-->\r\n\r\n<div class=\"stepExecutorBlock\" *ngIf=\"view === 'regular'\">\r\n <header class=\"stepExecutorHeader\">\r\n <div class=\"stepExecutorHeaderText\">\r\n <h1 class=\"title\">\r\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\r\n </h1>\r\n <p class=\"body-5\">\r\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\r\n </p>\r\n </div>\r\n <div class=\"steps\">\r\n <mefdev-stage *ngFor=\"let page of pages; let pageIndex = index\"\r\n [isRightModal]=\"false\"\r\n [title]=\"page.title\"\r\n [currentExecutorStep]=\"pageIndex + 1\"\r\n [isCompleted]=\"page.isCompleted\">\r\n </mefdev-stage>\r\n </div>\r\n </header>\r\n\r\n <div *ngIf=\"activePage\" class=\"executorChangeContent\">\r\n <div #container></div>\r\n </div>\r\n\r\n <div class=\"footerButtons\">\r\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\r\n </div>\r\n</div>\r\n\r\n\r\n<!--view == modal-->\r\n\r\n<div class=\"modalStepExecutor\" *ngIf=\"view === 'modal'\">\r\n\r\n <header class=\"modalHeader\">\r\n <div class=\"headerModalText\">\r\n <div class=\"textAndCloseButton\">\r\n <h1 class=\"title\">\r\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\r\n </h1>\r\n <p class=\"body-5\">\r\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\r\n </p>\r\n </div>\r\n <article class=\"closeBtn\">\r\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.26735 7.68135L0.610352 2.02435L2.02435 0.610352L7.68135 6.26735L13.3384 0.610352L14.7524 2.02435L9.09535 7.68135L14.7524 13.3384L13.3384 14.7524L7.68135 9.09535L2.02435 14.7524L0.610352 13.3384L6.26735 7.68135Z\" fill=\"#4D4D4D\"/>\r\n </svg>\r\n </article>\r\n </div>\r\n <div class=\"modalSteps\">\r\n <mefdev-stage *ngFor=\"let page of pages; let pageIndex = index\"\r\n [isRightModal]=\"false\"\r\n [title]=\"page.title\"\r\n [currentExecutorStep]=\"pageIndex + 1\"\r\n [isCompleted]=\"page.isCompleted\">\r\n </mefdev-stage>\r\n </div>\r\n </header>\r\n\r\n <main *ngIf=\"activePage\" class=\"modalExecutorMainContent\">\r\n <div #container></div>\r\n </main>\r\n\r\n <footer class=\"modalFooter\">\r\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\r\n </footer>\r\n\r\n</div>\r\n\r\n<!--view == right-->\r\n\r\n<div class=\"rightExecutorBlock\" *ngIf=\"view === 'right'\">\r\n\r\n <header class=\"rightExecutorHeader\">\r\n <div class=\"rightExecutorTextAndCloseButton\">\r\n <span class=\"body-1\">\r\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\r\n </span>\r\n <p class=\"body-5\">\r\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\r\n </p>\r\n </div>\r\n <div class=\"closeButton\">\r\n <svg width=\"17\" height=\"17\" viewBox=\"0 0 17 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.0566 1.59971L14.6566 0.199707L8.05664 6.79971L1.45664 0.199707L0.0566406 1.59971L6.65664 8.19971L0.0566406 14.7997L1.45664 16.1997L8.05664 9.59971L14.6566 16.1997L16.0566 14.7997L9.45664 8.19971L16.0566 1.59971Z\" fill=\"#525252\"/>\r\n </svg>\r\n </div>\r\n </header>\r\n\r\n <div class=\"line\">\r\n <svg width=\"363\" height=\"1\" viewBox=\"0 0 363 1\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <line x1=\"-4.37114e-08\" y1=\"0.5\" x2=\"362.674\" y2=\"0.499968\" stroke=\"#4D4D4D\"/>\r\n </svg>\r\n </div>\r\n\r\n <div class=\"contentExecutor\">\r\n <div class=\"rightChangeContent\">\r\n <div *ngIf=\"activePage\" class=\"executorChangeContent\">\r\n <div #container></div>\r\n </div>\r\n <div class=\"rightSteps\">\r\n <mefdev-stage *ngFor=\"let page of pages; let pageIndex = index\"\r\n [isRightModal]=\"true\"\r\n [title]=\"page.title\"\r\n [currentExecutorStep]=\"pageIndex + 1\"\r\n [isCompleted]=\"page.isCompleted\">\r\n </mefdev-stage>\r\n </div>\r\n </div>\r\n\r\n <footer class=\"rightFooter\">\r\n <ng-container [ngTemplateOutlet]=\"footer\"></ng-container>\r\n </footer>\r\n </div>\r\n\r\n</div>\r\n", styles: [".stepExecutorBlock{height:auto;display:flex;flex-direction:column}.stepExecutorBlock .stepExecutorHeader{padding:49px 71px 40px 154px;display:flex;flex-direction:column;row-gap:23px}.stepExecutorBlock .stepExecutorHeader .stepExecutorHeaderText{display:flex;flex-direction:column;row-gap:8px}.stepExecutorBlock .stepExecutorHeader .stepExecutorHeaderText .title{color:#4d4d4d}.stepExecutorBlock .stepExecutorHeader .stepExecutorHeaderText p{display:block;width:234px;height:auto;color:#4d4d4d}.stepExecutorBlock .stepExecutorHeader .steps{display:flex;flex-wrap:wrap;column-gap:23px;row-gap:17px}.stepExecutorBlock .executorChangeContent{padding:46px 31px 57px 154px;width:100%;min-height:359px;height:auto;background-color:#f3f3f3}.stepExecutorBlock .footerButtons{margin-top:46px;padding-left:154px;padding-bottom:74px}.modalStepExecutor{max-width:898px;width:auto;box-shadow:0 0 10px #0000001c}.modalStepExecutor .modalHeader{height:auto;padding:36px 25px 32px 33px;display:flex;flex-direction:column;row-gap:13px}.modalStepExecutor .modalHeader .headerModalText{display:flex;justify-content:space-between}.modalStepExecutor .modalHeader .headerModalText .textAndCloseButton{display:flex;column-gap:23px}.modalStepExecutor .modalHeader .headerModalText .closeBtn{width:33px;height:33px;border-radius:5px;background-color:#f3f3f3;display:flex;justify-content:center;align-items:center;cursor:pointer}.modalStepExecutor .modalHeader .headerModalText .closeBtn:hover svg path{fill:#cf0106}.modalStepExecutor .modalHeader .headerModalText p{width:235px;color:#4d4d4d}.modalStepExecutor .modalHeader .modalSteps{max-width:724px;width:auto;display:flex;flex-wrap:wrap;column-gap:23px}.modalStepExecutor .modalExecutorMainContent{padding:29px 45px 31px 33px;background-color:#f3f3f3;min-height:345px;height:auto}.modalStepExecutor .modalFooter{padding:32px 0 35px 33px;display:flex;column-gap:17px}.rightExecutorBlock{padding:25px 19px 43px;max-width:401px;height:auto;background-color:#f3f3f3;border-radius:5px}.rightExecutorBlock .rightExecutorHeader{display:flex;justify-content:space-between}.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton{display:flex;flex-direction:column;row-gap:8px}.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton span,.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton p{height:auto;width:225px}.rightExecutorBlock .rightExecutorHeader .rightExecutorTextAndCloseButton p{color:#4d4d4d}.rightExecutorBlock .rightExecutorHeader .closeButton svg{cursor:pointer}.rightExecutorBlock .rightExecutorHeader .closeButton svg:hover path{fill:#cf0106}.rightExecutorBlock .line{margin-top:9px;margin-bottom:37px}.rightExecutorBlock .contentExecutor .rightChangeContent{display:flex;justify-content:space-between}.rightExecutorBlock .contentExecutor .rightChangeContent .executorChangeContent{max-width:291px;height:auto}.rightExecutorBlock .contentExecutor .rightChangeContent .rightSteps{display:flex;flex-direction:column;row-gap:22px}.rightExecutorBlock .rightFooter{margin-top:67px;display:flex;column-gap:16px}@media screen and (max-width: 768px){.stepExecutorBlock .stepExecutorHeader{padding:21px 41px}.stepExecutorBlock .executorChangeContent{padding:46px 31px 57px 54px}.stepExecutorBlock .footerButtons{padding:41px}.modalStepExecutor .modalHeader .headerModalText .textAndCloseButton{display:flex;flex-direction:column}.modalStepExecutor .modalHeader .modalSteps{row-gap:21px}}\n"] }]
|
|
3921
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { view: [{
|
|
3922
|
+
type: Input,
|
|
3923
|
+
args: [{ required: true }]
|
|
3924
|
+
}], container: [{
|
|
3925
|
+
type: ViewChild,
|
|
3926
|
+
args: ['container']
|
|
3927
|
+
}], title: [{
|
|
3928
|
+
type: ContentChild,
|
|
3929
|
+
args: ['title']
|
|
3930
|
+
}], description: [{
|
|
3931
|
+
type: ContentChild,
|
|
3932
|
+
args: ['description']
|
|
3933
|
+
}], footer: [{
|
|
3934
|
+
type: ContentChild,
|
|
3935
|
+
args: ['footer']
|
|
3936
|
+
}], onActivePageChange: [{
|
|
3937
|
+
type: Output
|
|
3938
|
+
}] } });
|
|
3939
|
+
|
|
3940
|
+
class MefdevExecutorPageComponent {
|
|
3941
|
+
_mainExecutor;
|
|
3942
|
+
_elementRef;
|
|
3943
|
+
title;
|
|
3944
|
+
isActive = false;
|
|
3945
|
+
isCompleted = false;
|
|
3946
|
+
isCompletedChange = new EventEmitter();
|
|
3947
|
+
elRef;
|
|
3948
|
+
constructor(_mainExecutor, _elementRef) {
|
|
3949
|
+
this._mainExecutor = _mainExecutor;
|
|
3950
|
+
this._elementRef = _elementRef;
|
|
3951
|
+
this.elRef = _elementRef;
|
|
3952
|
+
_mainExecutor.pages.push(this);
|
|
3953
|
+
if (_mainExecutor.activePageInd == -1) {
|
|
3954
|
+
_mainExecutor.activePageInd = 0;
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
ngOnChanges(changes) {
|
|
3958
|
+
this.isCompletedChange.emit(changes['isCompleted']?.currentValue);
|
|
3959
|
+
}
|
|
3960
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefdevExecutorPageComponent, deps: [{ token: StepExecutorComponent, host: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3961
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: MefdevExecutorPageComponent, selector: "mefdev-executor-page", inputs: { title: "title", isActive: "isActive", isCompleted: "isCompleted" }, outputs: { isCompletedChange: "isCompletedChange" }, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
3962
|
+
}
|
|
3963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefdevExecutorPageComponent, decorators: [{
|
|
3964
|
+
type: Component,
|
|
3965
|
+
args: [{
|
|
3966
|
+
selector: 'mefdev-executor-page',
|
|
3967
|
+
template: '<ng-content></ng-content>',
|
|
3968
|
+
}]
|
|
3969
|
+
}], ctorParameters: function () { return [{ type: StepExecutorComponent, decorators: [{
|
|
3970
|
+
type: Host
|
|
3971
|
+
}] }, { type: i0.ElementRef }]; }, propDecorators: { title: [{
|
|
3972
|
+
type: Input
|
|
3973
|
+
}], isActive: [{
|
|
3974
|
+
type: Input
|
|
3975
|
+
}], isCompleted: [{
|
|
3976
|
+
type: Input
|
|
3977
|
+
}], isCompletedChange: [{
|
|
3978
|
+
type: Output
|
|
3979
|
+
}] } });
|
|
3980
|
+
|
|
3981
|
+
class MefDevStepExecutorModule {
|
|
3982
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevStepExecutorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3983
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.6", ngImport: i0, type: MefDevStepExecutorModule, declarations: [StepExecutorComponent,
|
|
3984
|
+
MefdevExecutorPageComponent,
|
|
3985
|
+
StageComponent], imports: [CommonModule,
|
|
3986
|
+
FormsModule], exports: [StepExecutorComponent,
|
|
3987
|
+
MefdevExecutorPageComponent,
|
|
3988
|
+
StageComponent] });
|
|
3989
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevStepExecutorModule, imports: [CommonModule,
|
|
3990
|
+
FormsModule] });
|
|
3991
|
+
}
|
|
3992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: MefDevStepExecutorModule, decorators: [{
|
|
3993
|
+
type: NgModule,
|
|
3994
|
+
args: [{
|
|
3995
|
+
declarations: [
|
|
3996
|
+
StepExecutorComponent,
|
|
3997
|
+
MefdevExecutorPageComponent,
|
|
3998
|
+
StageComponent
|
|
3999
|
+
],
|
|
4000
|
+
exports: [
|
|
4001
|
+
StepExecutorComponent,
|
|
4002
|
+
MefdevExecutorPageComponent,
|
|
4003
|
+
StageComponent,
|
|
4004
|
+
],
|
|
4005
|
+
imports: [
|
|
4006
|
+
CommonModule,
|
|
4007
|
+
FormsModule,
|
|
4008
|
+
]
|
|
4009
|
+
}]
|
|
4010
|
+
}] });
|
|
4011
|
+
|
|
3213
4012
|
class MefDevSpecFlowTestComponent {
|
|
3214
4013
|
/**
|
|
3215
4014
|
* UTC datetime
|
|
@@ -4380,5 +5179,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
4380
5179
|
* Generated bundle index. Do not edit.
|
|
4381
5180
|
*/
|
|
4382
5181
|
|
|
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 };
|
|
5182
|
+
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, MefDevStepExecutorModule, MefDevSwitchComponent, MefDevSwitchModule, MefDevTabBodyComponent, MefDevTabComponent, MefDevTabLabelDirective, MefDevTabSetComponent, MefDevTabsInkBarDirective, MefDevTabsModule, MefDevTabsNavComponent, MefdevExecutorPageComponent, OptionPipe, ProfileComponent, ProgressConfig, RightFilterComponent, SlideRightComponent, SlideUpComponent, StageComponent, StepExecutorComponent, TabChangeEvent, TablePageComponent, mefDevCardComponents, mefDevCollapseModuleComponents, pgCard, pgCardModule };
|
|
4384
5183
|
//# sourceMappingURL=natec-mef-dev-ui-kit.mjs.map
|