monkey-style-guide-v2 0.0.40 → 0.0.42
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/assets/scss/directives/_popover.scss +23 -10
- package/assets/scss/theme.scss +0 -1
- package/fesm2022/monkey-style-guide-v2.mjs +551 -758
- package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
- package/lib/components/avatar/avatar.component.d.ts +1 -0
- package/lib/components/filter-bar/filter-bar.component.d.ts +0 -4
- package/lib/components/index.d.ts +1 -0
- package/lib/components/option/option.component.d.ts +0 -2
- package/{assets/scss/util/_index.scss → lib/components/user-profile-button/index.d.ts} +3 -4
- package/lib/components/user-profile-button/user-profile-button.component.d.ts +24 -0
- package/monkey-style-guide-v2-0.0.42.tgz +0 -0
- package/package.json +1 -1
- package/assets/scss/util/_icon.scss +0 -10
- package/lib/components/filter-bar/components/currency/currency.component.d.ts +0 -7
- package/lib/components/filter-bar/components/currency/index.d.ts +0 -1
- package/lib/components/filter-bar/components/date/date.component.d.ts +0 -11
- package/lib/components/filter-bar/components/date/index.d.ts +0 -1
- package/lib/components/filter-bar/components/index.d.ts +0 -4
- package/lib/components/filter-bar/components/input/index.d.ts +0 -1
- package/lib/components/filter-bar/components/input/input.component.d.ts +0 -6
- package/lib/components/filter-bar/components/status/index.d.ts +0 -1
- package/lib/components/filter-bar/components/status/status.component.d.ts +0 -5
- package/monkey-style-guide-v2-0.0.40.tgz +0 -0
|
@@ -168,7 +168,7 @@ class UtilIconComponent {
|
|
|
168
168
|
d="M9.808 2.528 C 9.752 2.542,9.671 2.574,9.628 2.599 C 9.585 2.625,8.414 3.781,7.025 5.168 L 4.500 7.690 3.475 6.667 C 2.865 6.059,2.414 5.624,2.360 5.594 C 2.137 5.467,1.822 5.478,1.603 5.620 C 1.226 5.863,1.141 6.369,1.419 6.715 C 1.558 6.887,4.068 9.375,4.140 9.411 C 4.366 9.525,4.634 9.525,4.860 9.411 C 4.931 9.376,10.438 3.892,10.581 3.715 C 10.688 3.582,10.742 3.425,10.742 3.250 C 10.742 2.758,10.293 2.410,9.808 2.528 "
|
|
169
169
|
stroke="none"
|
|
170
170
|
fill-rule="evenodd"
|
|
171
|
-
fill="var(--mecx-color-theme-contrast-500
|
|
171
|
+
fill="var(--mecx-color-theme-contrast-500"
|
|
172
172
|
></path>
|
|
173
173
|
</svg>
|
|
174
174
|
}
|
|
@@ -179,7 +179,7 @@ class UtilIconComponent {
|
|
|
179
179
|
d="M1.333 0.268 C 1.300 0.274,1.225 0.303,1.167 0.332 C 1.054 0.388,0.939 0.490,0.866 0.599 C 0.776 0.732,0.732 0.936,0.757 1.098 C 0.786 1.283,0.848 1.405,0.977 1.532 C 1.071 1.624,1.148 1.673,1.253 1.710 L 1.340 1.740 4.000 1.740 L 6.660 1.740 6.747 1.710 C 6.943 1.642,7.128 1.462,7.200 1.270 C 7.265 1.095,7.265 0.904,7.200 0.730 C 7.118 0.510,6.880 0.308,6.655 0.267 C 6.565 0.250,1.420 0.251,1.333 0.268"
|
|
180
180
|
stroke="none"
|
|
181
181
|
fill-rule="evenodd"
|
|
182
|
-
fill="var(--mecx-color-theme-contrast-500
|
|
182
|
+
fill="var(--mecx-color-theme-contrast-500"
|
|
183
183
|
></path>
|
|
184
184
|
</svg>
|
|
185
185
|
}
|
|
@@ -262,7 +262,7 @@ class UtilIconComponent {
|
|
|
262
262
|
</svg>
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
`, isInline: true, styles: [":host{display:flex}\n"] }); }
|
|
265
|
+
`, isInline: true, styles: [":host{display:flex;background-color:transparent}\n"] }); }
|
|
266
266
|
}
|
|
267
267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UtilIconComponent, decorators: [{
|
|
268
268
|
type: Component,
|
|
@@ -350,7 +350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
350
350
|
d="M9.808 2.528 C 9.752 2.542,9.671 2.574,9.628 2.599 C 9.585 2.625,8.414 3.781,7.025 5.168 L 4.500 7.690 3.475 6.667 C 2.865 6.059,2.414 5.624,2.360 5.594 C 2.137 5.467,1.822 5.478,1.603 5.620 C 1.226 5.863,1.141 6.369,1.419 6.715 C 1.558 6.887,4.068 9.375,4.140 9.411 C 4.366 9.525,4.634 9.525,4.860 9.411 C 4.931 9.376,10.438 3.892,10.581 3.715 C 10.688 3.582,10.742 3.425,10.742 3.250 C 10.742 2.758,10.293 2.410,9.808 2.528 "
|
|
351
351
|
stroke="none"
|
|
352
352
|
fill-rule="evenodd"
|
|
353
|
-
fill="var(--mecx-color-theme-contrast-500
|
|
353
|
+
fill="var(--mecx-color-theme-contrast-500"
|
|
354
354
|
></path>
|
|
355
355
|
</svg>
|
|
356
356
|
}
|
|
@@ -361,7 +361,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
361
361
|
d="M1.333 0.268 C 1.300 0.274,1.225 0.303,1.167 0.332 C 1.054 0.388,0.939 0.490,0.866 0.599 C 0.776 0.732,0.732 0.936,0.757 1.098 C 0.786 1.283,0.848 1.405,0.977 1.532 C 1.071 1.624,1.148 1.673,1.253 1.710 L 1.340 1.740 4.000 1.740 L 6.660 1.740 6.747 1.710 C 6.943 1.642,7.128 1.462,7.200 1.270 C 7.265 1.095,7.265 0.904,7.200 0.730 C 7.118 0.510,6.880 0.308,6.655 0.267 C 6.565 0.250,1.420 0.251,1.333 0.268"
|
|
362
362
|
stroke="none"
|
|
363
363
|
fill-rule="evenodd"
|
|
364
|
-
fill="var(--mecx-color-theme-contrast-500
|
|
364
|
+
fill="var(--mecx-color-theme-contrast-500"
|
|
365
365
|
></path>
|
|
366
366
|
</svg>
|
|
367
367
|
}
|
|
@@ -444,7 +444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
444
444
|
</svg>
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
`, styles: [":host{display:flex}\n"] }]
|
|
447
|
+
`, styles: [":host{display:flex;background-color:transparent}\n"] }]
|
|
448
448
|
}] });
|
|
449
449
|
|
|
450
450
|
/** ************************
|
|
@@ -699,6 +699,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
699
699
|
* MIT Licence
|
|
700
700
|
************************* */
|
|
701
701
|
class MonkeyAvatarComponent {
|
|
702
|
+
get classes() {
|
|
703
|
+
return this.size();
|
|
704
|
+
}
|
|
702
705
|
constructor() {
|
|
703
706
|
this._id = inject(IdGenerator).getId('monkey-avatar-');
|
|
704
707
|
this.size = input('xs');
|
|
@@ -733,16 +736,19 @@ class MonkeyAvatarComponent {
|
|
|
733
736
|
}
|
|
734
737
|
}
|
|
735
738
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
736
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyAvatarComponent, isStandalone: true, selector: "monkey-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-avatar" }, properties: { "attr.id": "_id", "id": "_id" } }, ngImport: i0, template: "
|
|
739
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyAvatarComponent, isStandalone: true, selector: "monkey-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-avatar" }, properties: { "attr.id": "_id", "id": "_id", "class": "this.classes" } }, ngImport: i0, template: "@switch (avatarType) {\n @case ('name') {\n <p [class]=\"size()\">{{ avatar }}</p>\n }\n\n @case ('icon') {\n <monkey-icon [icon]=\"avatar\" [size]=\"size()\" />\n }\n\n @case ('image') {\n <img loading=\"lazy\" [alt]=\"'Avatar ' + avatarType\" [class]=\"size()\" [src]=\"avatar\" />\n }\n}\n", styles: ["monkey-avatar{align-items:center;background:var(--mecx-color-gray-100);border-radius:4px;display:flex;flex-shrink:0;flex-direction:column;justify-content:center}monkey-avatar.xs{height:24px;width:24px}monkey-avatar.sm{height:32px;width:32px}monkey-avatar.md{border-radius:8px;height:40px;width:40px}monkey-avatar.lg{border-radius:12px;height:48px;width:48px}monkey-avatar p{font-style:normal;font-weight:400;letter-spacing:.26px;line-height:16px}monkey-avatar p.xs{font-size:16px}monkey-avatar p.sm{font-size:18px}monkey-avatar p.md{font-size:20px}monkey-avatar p.lg{font-size:22px}monkey-avatar img{border-radius:4px;height:auto}monkey-avatar img.xs{width:24px}monkey-avatar img.sm{width:32px}monkey-avatar img.md{border-radius:8px;width:40px}monkey-avatar img.lg{border-radius:12px;width:48px}\n"], dependencies: [{ kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
737
740
|
}
|
|
738
741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyAvatarComponent, decorators: [{
|
|
739
742
|
type: Component,
|
|
740
|
-
args: [{ imports: [MonkeyIconComponent], selector: 'monkey-avatar', host: {
|
|
743
|
+
args: [{ imports: [MonkeyIconComponent], encapsulation: ViewEncapsulation.None, selector: 'monkey-avatar', host: {
|
|
741
744
|
'data-testid': 'monkey-avatar',
|
|
742
745
|
'[attr.id]': '_id',
|
|
743
746
|
'[id]': '_id'
|
|
744
|
-
}, template: "
|
|
745
|
-
}], ctorParameters: () => []
|
|
747
|
+
}, template: "@switch (avatarType) {\n @case ('name') {\n <p [class]=\"size()\">{{ avatar }}</p>\n }\n\n @case ('icon') {\n <monkey-icon [icon]=\"avatar\" [size]=\"size()\" />\n }\n\n @case ('image') {\n <img loading=\"lazy\" [alt]=\"'Avatar ' + avatarType\" [class]=\"size()\" [src]=\"avatar\" />\n }\n}\n", styles: ["monkey-avatar{align-items:center;background:var(--mecx-color-gray-100);border-radius:4px;display:flex;flex-shrink:0;flex-direction:column;justify-content:center}monkey-avatar.xs{height:24px;width:24px}monkey-avatar.sm{height:32px;width:32px}monkey-avatar.md{border-radius:8px;height:40px;width:40px}monkey-avatar.lg{border-radius:12px;height:48px;width:48px}monkey-avatar p{font-style:normal;font-weight:400;letter-spacing:.26px;line-height:16px}monkey-avatar p.xs{font-size:16px}monkey-avatar p.sm{font-size:18px}monkey-avatar p.md{font-size:20px}monkey-avatar p.lg{font-size:22px}monkey-avatar img{border-radius:4px;height:auto}monkey-avatar img.xs{width:24px}monkey-avatar img.sm{width:32px}monkey-avatar img.md{border-radius:8px;width:40px}monkey-avatar img.lg{border-radius:12px;width:48px}\n"] }]
|
|
748
|
+
}], ctorParameters: () => [], propDecorators: { classes: [{
|
|
749
|
+
type: HostBinding,
|
|
750
|
+
args: ['class']
|
|
751
|
+
}] } });
|
|
746
752
|
|
|
747
753
|
/** ************************
|
|
748
754
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
@@ -1108,7 +1114,7 @@ class MonkeyPopoverContentComponent {
|
|
|
1108
1114
|
}
|
|
1109
1115
|
ngAfterViewInit() {
|
|
1110
1116
|
setTimeout(() => {
|
|
1111
|
-
const focusable = this.host.nativeElement.querySelector('button, input, select, textarea');
|
|
1117
|
+
const focusable = this.host.nativeElement.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
1112
1118
|
focusable?.focus();
|
|
1113
1119
|
});
|
|
1114
1120
|
}
|
|
@@ -1707,7 +1713,7 @@ class MonkeyCheckboxComponent {
|
|
|
1707
1713
|
useExisting: MonkeyCheckboxComponent,
|
|
1708
1714
|
multi: true
|
|
1709
1715
|
}
|
|
1710
|
-
], queries: [{ propertyName: "infoChildren", predicate: MonkeyInfoDirective, descendants: true }, { propertyName: "labelChildren", predicate: MonkeyLabelDirective, descendants: true }, { propertyName: "helperChildren", predicate: MonkeyHelperDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus($event)\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <util-icon class=\"icon\" name=\"minus\" />\n } @else if (value) {\n <util-icon class=\"icon\" name=\"check\" />\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:var(--mecx-color-white);border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox
|
|
1716
|
+
], queries: [{ propertyName: "infoChildren", predicate: MonkeyInfoDirective, descendants: true }, { propertyName: "labelChildren", predicate: MonkeyLabelDirective, descendants: true }, { propertyName: "helperChildren", predicate: MonkeyHelperDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus($event)\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <util-icon class=\"icon\" name=\"minus\" />\n } @else if (value) {\n <util-icon class=\"icon\" name=\"check\" />\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:var(--mecx-color-white);border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], animations: [
|
|
1711
1717
|
trigger('iconAnimation', [
|
|
1712
1718
|
transition(':enter', [
|
|
1713
1719
|
animate('250ms ease-in-out', keyframes([
|
|
@@ -1767,7 +1773,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1767
1773
|
'[class.sm]': 'size.includes("sm")',
|
|
1768
1774
|
'[class.md]': 'size.includes("md")',
|
|
1769
1775
|
'[class.lg]': 'size.includes("lg")'
|
|
1770
|
-
}, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus($event)\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <util-icon class=\"icon\" name=\"minus\" />\n } @else if (value) {\n <util-icon class=\"icon\" name=\"check\" />\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:var(--mecx-color-white);border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox
|
|
1776
|
+
}, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus($event)\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <util-icon class=\"icon\" name=\"minus\" />\n } @else if (value) {\n <util-icon class=\"icon\" name=\"check\" />\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:var(--mecx-spaces-xs);cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:var(--mecx-color-white);border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"] }]
|
|
1771
1777
|
}], propDecorators: { infoChildren: [{
|
|
1772
1778
|
type: ContentChildren,
|
|
1773
1779
|
args: [MonkeyInfoDirective, { descendants: true }]
|
|
@@ -2260,7 +2266,7 @@ class MonkeyFormFieldComponent {
|
|
|
2260
2266
|
}
|
|
2261
2267
|
}
|
|
2262
2268
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2263
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyFormFieldComponent, isStandalone: false, selector: "monkey-form-field", inputs: { id: "id", hideAction: ["hideAction", "hideAction", booleanAttribute], enableClear: ["enableClear", "enableClear", booleanAttribute], size: "size" }, host: { properties: { "class.mecx-disabled": "control.disabled", "class.mecx-form-field-focused": "control.focused", "class.mecx-form-field-invalid": "showInvalid", "class.mecx-form-field-borderless": "hideBorder", "attr.id": "id", "id": "id", "class": "size" }, classAttribute: "mecx-form-field" }, queries: [{ propertyName: "_formFieldControl", first: true, predicate: MonkeyFormFieldControl, descendants: true }, { propertyName: "_labelChildren", predicate: MonkeyLabelDirective, descendants: true }, { propertyName: "_helperChildren", predicate: MonkeyHelperDirective, descendants: true }, { propertyName: "_prefixChildren", predicate: MonkeyPrefixDirective, descendants: true }, { propertyName: "_suffixChildren", predicate: MonkeySuffixDirective, descendants: true }, { propertyName: "_infoChildren", predicate: MonkeyInfoDirective, descendants: true }, { propertyName: "_errorChildren", predicate: MonkeyErrorDirective, descendants: true }], exportAs: ["monkeyFormField"], ngImport: i0, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <util-icon class=\"mecx-clear\" name=\"clear\" (click)=\"onClear($event)\" />\n }\n @if (showCalendar) {\n <util-icon class=\"mecx-calendar\" name=\"calendar\" (click)=\"onOpenCalendar($event)\" />\n }\n @if (showLoading) {\n <util-icon class=\"mecx-form-field-loading\" name=\"loading\" />\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n<div class=\"mecx-form-field-footer\">\n
|
|
2269
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyFormFieldComponent, isStandalone: false, selector: "monkey-form-field", inputs: { id: "id", hideAction: ["hideAction", "hideAction", booleanAttribute], enableClear: ["enableClear", "enableClear", booleanAttribute], size: "size" }, host: { properties: { "class.mecx-disabled": "control.disabled", "class.mecx-form-field-focused": "control.focused", "class.mecx-form-field-invalid": "showInvalid", "class.mecx-form-field-borderless": "hideBorder", "attr.id": "id", "id": "id", "class": "size" }, classAttribute: "mecx-form-field" }, queries: [{ propertyName: "_formFieldControl", first: true, predicate: MonkeyFormFieldControl, descendants: true }, { propertyName: "_labelChildren", predicate: MonkeyLabelDirective, descendants: true }, { propertyName: "_helperChildren", predicate: MonkeyHelperDirective, descendants: true }, { propertyName: "_prefixChildren", predicate: MonkeyPrefixDirective, descendants: true }, { propertyName: "_suffixChildren", predicate: MonkeySuffixDirective, descendants: true }, { propertyName: "_infoChildren", predicate: MonkeyInfoDirective, descendants: true }, { propertyName: "_errorChildren", predicate: MonkeyErrorDirective, descendants: true }], exportAs: ["monkeyFormField"], ngImport: i0, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <util-icon class=\"mecx-clear\" name=\"clear\" (click)=\"onClear($event)\" />\n }\n @if (showCalendar) {\n <util-icon class=\"mecx-calendar\" name=\"calendar\" (click)=\"onOpenCalendar($event)\" />\n }\n @if (showLoading) {\n <util-icon class=\"mecx-form-field-loading\" name=\"loading\" />\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-invalid .mecx-form-field-body .mecx-option:not(.mecx-option-disabled).radio:before{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{border-color:var(--mecx-color-gray-900)}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px;cursor:not-allowed}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0;height:unset;align-items:flex-start;outline:none;outline-offset:unset}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"], dependencies: [{ kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2264
2270
|
}
|
|
2265
2271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFormFieldComponent, decorators: [{
|
|
2266
2272
|
type: Component,
|
|
@@ -2273,7 +2279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2273
2279
|
'[attr.id]': 'id',
|
|
2274
2280
|
'[id]': 'id',
|
|
2275
2281
|
'[class]': 'size'
|
|
2276
|
-
}, standalone: false, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <util-icon class=\"mecx-clear\" name=\"clear\" (click)=\"onClear($event)\" />\n }\n @if (showCalendar) {\n <util-icon class=\"mecx-calendar\" name=\"calendar\" (click)=\"onOpenCalendar($event)\" />\n }\n @if (showLoading) {\n <util-icon class=\"mecx-form-field-loading\" name=\"loading\" />\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n<div class=\"mecx-form-field-footer\">\n
|
|
2282
|
+
}, standalone: false, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <util-icon class=\"mecx-clear\" name=\"clear\" (click)=\"onClear($event)\" />\n }\n @if (showCalendar) {\n <util-icon class=\"mecx-calendar\" name=\"calendar\" (click)=\"onOpenCalendar($event)\" />\n }\n @if (showLoading) {\n <util-icon class=\"mecx-form-field-loading\" name=\"loading\" />\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-invalid .mecx-form-field-body .mecx-option:not(.mecx-option-disabled).radio:before{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{border-color:var(--mecx-color-gray-900)}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px;cursor:not-allowed}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0;height:unset;align-items:flex-start;outline:none;outline-offset:unset}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"] }]
|
|
2277
2283
|
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
2278
2284
|
type: Input
|
|
2279
2285
|
}], hideAction: [{
|
|
@@ -3380,7 +3386,6 @@ class MonkeyOptionComponent {
|
|
|
3380
3386
|
this.selected = false;
|
|
3381
3387
|
this.tabIndex = 0;
|
|
3382
3388
|
this.id = this.idGenerator.getId('mecx-option-');
|
|
3383
|
-
this.elementRef = inject(ElementRef);
|
|
3384
3389
|
}
|
|
3385
3390
|
get displayContent() {
|
|
3386
3391
|
return (this._content?.nativeElement.textContent || '').trim();
|
|
@@ -3403,9 +3408,6 @@ class MonkeyOptionComponent {
|
|
|
3403
3408
|
this.handleAction(event);
|
|
3404
3409
|
}
|
|
3405
3410
|
}
|
|
3406
|
-
get element() {
|
|
3407
|
-
return this.elementRef.nativeElement;
|
|
3408
|
-
}
|
|
3409
3411
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3410
3412
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyOptionComponent, isStandalone: true, selector: "monkey-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-option" }, listeners: { "click": "onClick($event)", "keydown": "handleKeyDown($event)" }, properties: { "attr.id": "id", "class.mecx-option-disabled": "disabled", "class.mecx-option-selected": "selected", "attr.tabindex": "disabled ? -1 : tabIndex", "class": "type" }, classAttribute: "mecx-option" }, viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: `
|
|
3411
3413
|
@if (type === 'checkbox') {
|
|
@@ -3461,10 +3463,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3461
3463
|
* This style guide was developed by Monkey Exchange Team
|
|
3462
3464
|
* MIT Licence
|
|
3463
3465
|
************************* */
|
|
3464
|
-
class
|
|
3465
|
-
|
|
3466
|
-
|
|
3466
|
+
class MonkeyFilterBarComponent {
|
|
3467
|
+
constructor() {
|
|
3468
|
+
this._elementRef = inject(ElementRef);
|
|
3469
|
+
this.showPopOver = false;
|
|
3470
|
+
this.elementTarget = null;
|
|
3471
|
+
this.closePopOver = () => {
|
|
3472
|
+
this.showPopOver = false;
|
|
3473
|
+
};
|
|
3474
|
+
}
|
|
3475
|
+
ngAfterContentInit() { }
|
|
3476
|
+
ngOnChanges(changes) { }
|
|
3477
|
+
ngOnDestroy() { }
|
|
3478
|
+
onShowPopOver(el) {
|
|
3479
|
+
this.elementTarget = el.element;
|
|
3480
|
+
this.showPopOver = true;
|
|
3467
3481
|
}
|
|
3482
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3483
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyFilterBarComponent, isStandalone: true, selector: "monkey-filter-bar", host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-filter-bar'", "class.mecx-filter-bar-disabled": "_disabled", "class.mecx-filter-bar-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-filter-bar" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3484
|
+
<monkey-form-field>
|
|
3485
|
+
<input type="text" monkey-input placeholder="Pesquise pelo nome ou CNPJ" />
|
|
3486
|
+
</monkey-form-field>
|
|
3487
|
+
<monkey-button
|
|
3488
|
+
#popoverTarget
|
|
3489
|
+
class="btn-filter"
|
|
3490
|
+
type="secondary"
|
|
3491
|
+
(click)="onShowPopOver(popoverTarget)"
|
|
3492
|
+
>
|
|
3493
|
+
<util-icon class="icon" name="addPlus" first />
|
|
3494
|
+
Adicionar Filtro
|
|
3495
|
+
</monkey-button>
|
|
3496
|
+
|
|
3497
|
+
<ng-template
|
|
3498
|
+
[monkeyPopover]="showPopOver"
|
|
3499
|
+
[monkeyPopoverTarget]="elementTarget"
|
|
3500
|
+
[monkeyPopoverClosed]="closePopOver"
|
|
3501
|
+
monkeyPopoverDir="ltr"
|
|
3502
|
+
[monkeyPopoverHideHeader]="true"
|
|
3503
|
+
>
|
|
3504
|
+
<monkey-option> Status </monkey-option>
|
|
3505
|
+
<monkey-option> Data de Emissão </monkey-option>
|
|
3506
|
+
<monkey-option> Data de Vencimento </monkey-option>
|
|
3507
|
+
</ng-template>
|
|
3508
|
+
`, isInline: true, styles: [":host{width:100%;display:inline-flex;min-width:0;gap:12px}:host .mecx-form-field{width:100%;max-width:400px}:host .btn-filter{width:100%;max-width:160px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyPopoverDirective, selector: "[monkeyPopover]", inputs: ["monkeyPopover", "monkeyPopoverClosed", "monkeyPopoverTarget", "monkeyPopoverMinwidth", "monkeyPopoverBackdrop", "monkeyPopoverWatch", "monkeyPopoverDir", "monkeyPopoverContextmenu", "monkeyPopoverHeight", "monkeyPopoverTitle", "monkeyPopoverActions", "monkeyPopoverHideClose", "monkeyPopoverHideHeader", "monkeyPopoverHideActions"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: ["name", "disabled", "id", "required", "type", "min", "max", "percent"], exportAs: ["monkeyInput"] }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "color", "size", "type", "loading", "id"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }] }); }
|
|
3509
|
+
}
|
|
3510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarComponent, decorators: [{
|
|
3511
|
+
type: Component,
|
|
3512
|
+
args: [{ selector: 'monkey-filter-bar', imports: [
|
|
3513
|
+
CommonModule,
|
|
3514
|
+
FormsModule,
|
|
3515
|
+
ReactiveFormsModule,
|
|
3516
|
+
MonkeyFormFieldModule,
|
|
3517
|
+
MonkeyDirectivesModule,
|
|
3518
|
+
MonkeyFormFieldModule,
|
|
3519
|
+
MonkeyInputModule,
|
|
3520
|
+
MonkeyButtonComponent,
|
|
3521
|
+
UtilIconComponent,
|
|
3522
|
+
MonkeyOptionComponent
|
|
3523
|
+
], template: `
|
|
3524
|
+
<monkey-form-field>
|
|
3525
|
+
<input type="text" monkey-input placeholder="Pesquise pelo nome ou CNPJ" />
|
|
3526
|
+
</monkey-form-field>
|
|
3527
|
+
<monkey-button
|
|
3528
|
+
#popoverTarget
|
|
3529
|
+
class="btn-filter"
|
|
3530
|
+
type="secondary"
|
|
3531
|
+
(click)="onShowPopOver(popoverTarget)"
|
|
3532
|
+
>
|
|
3533
|
+
<util-icon class="icon" name="addPlus" first />
|
|
3534
|
+
Adicionar Filtro
|
|
3535
|
+
</monkey-button>
|
|
3536
|
+
|
|
3537
|
+
<ng-template
|
|
3538
|
+
[monkeyPopover]="showPopOver"
|
|
3539
|
+
[monkeyPopoverTarget]="elementTarget"
|
|
3540
|
+
[monkeyPopoverClosed]="closePopOver"
|
|
3541
|
+
monkeyPopoverDir="ltr"
|
|
3542
|
+
[monkeyPopoverHideHeader]="true"
|
|
3543
|
+
>
|
|
3544
|
+
<monkey-option> Status </monkey-option>
|
|
3545
|
+
<monkey-option> Data de Emissão </monkey-option>
|
|
3546
|
+
<monkey-option> Data de Vencimento </monkey-option>
|
|
3547
|
+
</ng-template>
|
|
3548
|
+
`, host: {
|
|
3549
|
+
'[attr.data-testid]': "'monkey-filter-bar'",
|
|
3550
|
+
class: 'mecx-filter-bar',
|
|
3551
|
+
'[class.mecx-filter-bar-disabled]': '_disabled',
|
|
3552
|
+
'[class.mecx-filter-bar-focused]': 'focused',
|
|
3553
|
+
'[attr.id]': 'id',
|
|
3554
|
+
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3555
|
+
'(focus)': '_onFocus()',
|
|
3556
|
+
'(blur)': '_onBlur()'
|
|
3557
|
+
}, styles: [":host{width:100%;display:inline-flex;min-width:0;gap:12px}:host .mecx-form-field{width:100%;max-width:400px}:host .btn-filter{width:100%;max-width:160px}\n"] }]
|
|
3558
|
+
}] });
|
|
3559
|
+
|
|
3560
|
+
/** ************************
|
|
3561
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
3562
|
+
* This style guide was developed by Monkey Exchange Team
|
|
3563
|
+
* MIT Licence
|
|
3564
|
+
************************* */
|
|
3565
|
+
|
|
3566
|
+
/** ************************
|
|
3567
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
3568
|
+
* This style guide was developed by Monkey Exchange Team
|
|
3569
|
+
* MIT Licence
|
|
3570
|
+
************************* */
|
|
3571
|
+
class MonkeyInputCodeComponent {
|
|
3468
3572
|
get disabled() {
|
|
3469
3573
|
if (this.ngControl && this.ngControl.disabled !== null) {
|
|
3470
3574
|
return this.ngControl.disabled;
|
|
@@ -3478,93 +3582,53 @@ class MonkeyRadioButtonComponent {
|
|
|
3478
3582
|
this.stateChanges.next();
|
|
3479
3583
|
}
|
|
3480
3584
|
}
|
|
3481
|
-
get required() {
|
|
3482
|
-
return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
|
|
3483
|
-
}
|
|
3484
|
-
set required(value) {
|
|
3485
|
-
this._required = value;
|
|
3486
|
-
this.stateChanges.next();
|
|
3487
|
-
}
|
|
3488
3585
|
set value(value) {
|
|
3489
|
-
if (this._value !== value) {
|
|
3586
|
+
if (this._value !== value && value !== undefined) {
|
|
3490
3587
|
this._value = value;
|
|
3491
3588
|
this._onChange(value);
|
|
3589
|
+
this._onTouched();
|
|
3492
3590
|
}
|
|
3493
3591
|
}
|
|
3494
3592
|
get value() {
|
|
3495
3593
|
return this._value;
|
|
3496
3594
|
}
|
|
3497
|
-
constructor(
|
|
3498
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
3595
|
+
constructor(formField) {
|
|
3499
3596
|
this.formField = formField;
|
|
3500
|
-
this.
|
|
3501
|
-
this.
|
|
3502
|
-
this.
|
|
3503
|
-
this.
|
|
3504
|
-
this.
|
|
3597
|
+
this.stateChanges = new Subject();
|
|
3598
|
+
this.type = 'input-code';
|
|
3599
|
+
this.currency = false;
|
|
3600
|
+
this.percent = false;
|
|
3601
|
+
this.id = inject(IdGenerator).getId('monkey-input-code-');
|
|
3602
|
+
this._onChange = () => { };
|
|
3603
|
+
this._onTouched = () => { };
|
|
3505
3604
|
this._value = null;
|
|
3506
|
-
this._destroyRef = inject(DestroyRef);
|
|
3507
|
-
this.idGenerator = inject(IdGenerator);
|
|
3508
3605
|
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
3509
|
-
this._elementRef = inject(ElementRef);
|
|
3510
3606
|
this.focused = false;
|
|
3607
|
+
this.length = input(6);
|
|
3608
|
+
this.inputType = input('numeric');
|
|
3609
|
+
this.inputIndices = computed(() => {
|
|
3610
|
+
return Array.from({ length: this.length() }, (_, i) => {
|
|
3611
|
+
return '';
|
|
3612
|
+
});
|
|
3613
|
+
});
|
|
3511
3614
|
this._disabled = false;
|
|
3512
|
-
this.id = this.idGenerator.getId('monkey-radiobutton-');
|
|
3513
|
-
this.stateChanges = new Subject();
|
|
3514
|
-
this.type = 'radio-button';
|
|
3515
|
-
this._onChange = () => { };
|
|
3516
|
-
this._onTouched = () => { };
|
|
3517
3615
|
if (this.ngControl) {
|
|
3518
3616
|
this.ngControl.valueAccessor = this;
|
|
3519
3617
|
}
|
|
3618
|
+
if (this.formField) {
|
|
3619
|
+
this.formField.hideAction = true;
|
|
3620
|
+
}
|
|
3520
3621
|
}
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
}
|
|
3527
|
-
|
|
3528
|
-
this.changeDetectorRef.markForCheck();
|
|
3529
|
-
});
|
|
3530
|
-
}
|
|
3531
|
-
initializeOptions() {
|
|
3532
|
-
setTimeout(() => {
|
|
3533
|
-
this.options?.forEach((option) => {
|
|
3534
|
-
option.type = 'radio';
|
|
3535
|
-
if (!option.action) {
|
|
3536
|
-
option.action = this.selectOption.bind(this, option);
|
|
3537
|
-
}
|
|
3538
|
-
});
|
|
3539
|
-
this.changeDetectorRef.markForCheck();
|
|
3540
|
-
}, 0);
|
|
3541
|
-
}
|
|
3542
|
-
ngAfterContentInit() {
|
|
3543
|
-
this.initializeOptions();
|
|
3544
|
-
this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
3545
|
-
this.initializeOptions();
|
|
3546
|
-
this.changeSelected();
|
|
3547
|
-
});
|
|
3548
|
-
}
|
|
3549
|
-
selectOption(option) {
|
|
3550
|
-
if (!option.disabled && !this.disabled) {
|
|
3551
|
-
this.value = option.value();
|
|
3552
|
-
this._onChange(this.value);
|
|
3553
|
-
this.onChange.emit(this.value);
|
|
3554
|
-
this.options.forEach((opt) => {
|
|
3555
|
-
opt.selected = opt.value() === this.value;
|
|
3622
|
+
ngAfterViewInit() {
|
|
3623
|
+
if (this.formField) {
|
|
3624
|
+
const input = this.formField.elementRef.nativeElement.querySelector('.mecx-form-field-body');
|
|
3625
|
+
const height = input.offsetHeight > 40 ? input.offsetHeight : 40;
|
|
3626
|
+
this.inputs.forEach((inputEl) => {
|
|
3627
|
+
inputEl.nativeElement.style.height = `${height}px`;
|
|
3628
|
+
inputEl.nativeElement.style.width = `${height}px`;
|
|
3556
3629
|
});
|
|
3557
3630
|
}
|
|
3558
3631
|
}
|
|
3559
|
-
writeValue(value) {
|
|
3560
|
-
this.value = value;
|
|
3561
|
-
this.changeSelected();
|
|
3562
|
-
}
|
|
3563
|
-
onContainerClick(event) {
|
|
3564
|
-
if (this.disabled)
|
|
3565
|
-
return;
|
|
3566
|
-
this._elementRef.nativeElement.focus();
|
|
3567
|
-
}
|
|
3568
3632
|
_onFocus() {
|
|
3569
3633
|
if (!this.disabled) {
|
|
3570
3634
|
this.focused = true;
|
|
@@ -3572,624 +3636,23 @@ class MonkeyRadioButtonComponent {
|
|
|
3572
3636
|
this.stateChanges.next();
|
|
3573
3637
|
}
|
|
3574
3638
|
}
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
this.
|
|
3639
|
+
propagateCode() {
|
|
3640
|
+
const code = this.inputIndices().join('');
|
|
3641
|
+
this.writeValue(code);
|
|
3578
3642
|
}
|
|
3579
|
-
|
|
3580
|
-
|
|
3643
|
+
focusNextInput(input) {
|
|
3644
|
+
const next = input.nextElementSibling;
|
|
3645
|
+
next?.focus();
|
|
3581
3646
|
}
|
|
3582
|
-
|
|
3583
|
-
|
|
3647
|
+
focusPreviousInput(input) {
|
|
3648
|
+
const previous = input.previousElementSibling;
|
|
3649
|
+
previous?.focus();
|
|
3584
3650
|
}
|
|
3585
|
-
|
|
3586
|
-
this.
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: MonkeyRadioButtonComponent, isStandalone: true, selector: "monkey-radiobutton", inputs: { tabIndex: "tabIndex", position: "position", size: "size", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange", onSearch: "onSearch" }, host: { attributes: { "data-testid": "monkey-radiobutton" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-disabled": "disabled", "class.mecx-radiobutton-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex", "class": "this.classes" }, classAttribute: "mecx-radiobutton" }, providers: [
|
|
3591
|
-
// eslint-disable-next-line no-use-before-define
|
|
3592
|
-
{ provide: MonkeyFormFieldControl, useExisting: MonkeyRadioButtonComponent }
|
|
3593
|
-
], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], ngImport: i0, template: "<ng-content />\n", styles: ["monkey-radiobutton{display:inline-flex;width:100%;min-width:0;position:relative;flex-wrap:wrap}monkey-radiobutton:focus-visible,monkey-radiobutton:focus{outline:none}monkey-radiobutton.vertical{flex-direction:column}monkey-radiobutton.mecx-disabled monkey-option{opacity:.5;pointer-events:none}monkey-radiobutton.mecx-disabled monkey-option:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-radiobutton.mecx-form-field-invalid{background:var(--mecx-color-error-700)}monkey-radiobutton.md monkey-option:before{width:16px;height:16px}monkey-radiobutton.sm monkey-option:before{width:14px;height:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3594
|
-
}
|
|
3595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyRadioButtonComponent, decorators: [{
|
|
3596
|
-
type: Component,
|
|
3597
|
-
args: [{ selector: 'monkey-radiobutton', imports: [CommonModule, ReactiveFormsModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
3598
|
-
// eslint-disable-next-line no-use-before-define
|
|
3599
|
-
{ provide: MonkeyFormFieldControl, useExisting: MonkeyRadioButtonComponent }
|
|
3600
|
-
], host: {
|
|
3601
|
-
'data-testid': 'monkey-radiobutton',
|
|
3602
|
-
class: 'mecx-radiobutton',
|
|
3603
|
-
'[class.mecx-disabled]': 'disabled',
|
|
3604
|
-
'[class.mecx-radiobutton-focused]': 'focused',
|
|
3605
|
-
'[attr.id]': 'id',
|
|
3606
|
-
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3607
|
-
'(focus)': '_onFocus()',
|
|
3608
|
-
'(blur)': '_onBlur()'
|
|
3609
|
-
}, template: "<ng-content />\n", styles: ["monkey-radiobutton{display:inline-flex;width:100%;min-width:0;position:relative;flex-wrap:wrap}monkey-radiobutton:focus-visible,monkey-radiobutton:focus{outline:none}monkey-radiobutton.vertical{flex-direction:column}monkey-radiobutton.mecx-disabled monkey-option{opacity:.5;pointer-events:none}monkey-radiobutton.mecx-disabled monkey-option:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-radiobutton.mecx-form-field-invalid{background:var(--mecx-color-error-700)}monkey-radiobutton.md monkey-option:before{width:16px;height:16px}monkey-radiobutton.sm monkey-option:before{width:14px;height:14px}\n"] }]
|
|
3610
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: MonkeyFormFieldComponent, decorators: [{
|
|
3611
|
-
type: Optional
|
|
3612
|
-
}] }], propDecorators: { options: [{
|
|
3613
|
-
type: ContentChildren,
|
|
3614
|
-
args: [MonkeyOptionComponent]
|
|
3615
|
-
}], tabIndex: [{
|
|
3616
|
-
type: Input
|
|
3617
|
-
}], onChange: [{
|
|
3618
|
-
type: Output
|
|
3619
|
-
}], onSearch: [{
|
|
3620
|
-
type: Output
|
|
3621
|
-
}], position: [{
|
|
3622
|
-
type: Input
|
|
3623
|
-
}], size: [{
|
|
3624
|
-
type: Input
|
|
3625
|
-
}], classes: [{
|
|
3626
|
-
type: HostBinding,
|
|
3627
|
-
args: ['class']
|
|
3628
|
-
}], disabled: [{
|
|
3629
|
-
type: Input,
|
|
3630
|
-
args: [{ transform: booleanAttribute }]
|
|
3631
|
-
}], required: [{
|
|
3632
|
-
type: Input,
|
|
3633
|
-
args: [{ transform: booleanAttribute }]
|
|
3634
|
-
}], value: [{
|
|
3635
|
-
type: Input
|
|
3636
|
-
}] } });
|
|
3637
|
-
|
|
3638
|
-
/** ************************
|
|
3639
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3640
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3641
|
-
* MIT Licence
|
|
3642
|
-
************************* */
|
|
3643
|
-
|
|
3644
|
-
/** ************************
|
|
3645
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3646
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3647
|
-
* MIT Licence
|
|
3648
|
-
************************* */
|
|
3649
|
-
class MonkeyFilterBarCurrencyComponent {
|
|
3650
|
-
constructor() {
|
|
3651
|
-
this.option = 'FROM';
|
|
3652
|
-
this.value = 0;
|
|
3653
|
-
}
|
|
3654
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyFilterBarCurrencyComponent, isStandalone: true, selector: "monkey-filter-bar-currency", host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-filter-bar-currency'", "class.mecx-filter-bar-currency-disabled": "_disabled", "class.mecx-filter-bar-currency-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-filter-bar-currency" }, ngImport: i0, template: `
|
|
3656
|
-
<monkey-radiobutton [(ngModel)]="option">
|
|
3657
|
-
<monkey-option [value]="item" *ngFor="let item of ['FROM', 'UNTIL']">
|
|
3658
|
-
{{ item }}
|
|
3659
|
-
</monkey-option>
|
|
3660
|
-
</monkey-radiobutton>
|
|
3661
|
-
<monkey-form-field>
|
|
3662
|
-
<input type="text" monkey-input-currency [(ngModel)]="value" />
|
|
3663
|
-
<monkey-info>
|
|
3664
|
-
Helper text Helper text Helper text Helper text Helper text Helper text
|
|
3665
|
-
</monkey-info>
|
|
3666
|
-
<monkey-suffix>
|
|
3667
|
-
<i class="mk-i mk-i-calendar"></i>
|
|
3668
|
-
</monkey-suffix>
|
|
3669
|
-
</monkey-form-field>
|
|
3670
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:flex-start;padding:12px;max-width:240px}:host monkey-radiobutton{display:flex;flex-direction:column}:host monkey-radiobutton monkey-option{padding:0 24px 6px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { 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: "component", type: MonkeyRadioButtonComponent, selector: "monkey-radiobutton", inputs: ["tabIndex", "position", "size", "disabled", "required", "value"], outputs: ["onChange", "onSearch"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputCurrencyDirective, selector: "input[monkey-input-currency]", inputs: ["name", "disabled", "id", "required", "type"], exportAs: ["monkeyInput"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyInfoDirective, selector: "monkey-info" }, { kind: "directive", type: MonkeySuffixDirective, selector: "monkey-suffix", inputs: ["hasAction"] }] }); }
|
|
3671
|
-
}
|
|
3672
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarCurrencyComponent, decorators: [{
|
|
3673
|
-
type: Component,
|
|
3674
|
-
args: [{ selector: 'monkey-filter-bar-currency', imports: [
|
|
3675
|
-
CommonModule,
|
|
3676
|
-
FormsModule,
|
|
3677
|
-
MonkeyRadioButtonComponent,
|
|
3678
|
-
MonkeyOptionComponent,
|
|
3679
|
-
MonkeyFormFieldModule,
|
|
3680
|
-
MonkeyInputModule,
|
|
3681
|
-
MonkeyDirectivesModule
|
|
3682
|
-
], template: `
|
|
3683
|
-
<monkey-radiobutton [(ngModel)]="option">
|
|
3684
|
-
<monkey-option [value]="item" *ngFor="let item of ['FROM', 'UNTIL']">
|
|
3685
|
-
{{ item }}
|
|
3686
|
-
</monkey-option>
|
|
3687
|
-
</monkey-radiobutton>
|
|
3688
|
-
<monkey-form-field>
|
|
3689
|
-
<input type="text" monkey-input-currency [(ngModel)]="value" />
|
|
3690
|
-
<monkey-info>
|
|
3691
|
-
Helper text Helper text Helper text Helper text Helper text Helper text
|
|
3692
|
-
</monkey-info>
|
|
3693
|
-
<monkey-suffix>
|
|
3694
|
-
<i class="mk-i mk-i-calendar"></i>
|
|
3695
|
-
</monkey-suffix>
|
|
3696
|
-
</monkey-form-field>
|
|
3697
|
-
`, host: {
|
|
3698
|
-
'[attr.data-testid]': "'monkey-filter-bar-currency'",
|
|
3699
|
-
class: 'mecx-filter-bar-currency',
|
|
3700
|
-
'[class.mecx-filter-bar-currency-disabled]': '_disabled',
|
|
3701
|
-
'[class.mecx-filter-bar-currency-focused]': 'focused',
|
|
3702
|
-
'[attr.id]': 'id',
|
|
3703
|
-
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3704
|
-
'(focus)': '_onFocus()',
|
|
3705
|
-
'(blur)': '_onBlur()'
|
|
3706
|
-
}, styles: [":host{display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:flex-start;padding:12px;max-width:240px}:host monkey-radiobutton{display:flex;flex-direction:column}:host monkey-radiobutton monkey-option{padding:0 24px 6px 0}\n"] }]
|
|
3707
|
-
}] });
|
|
3708
|
-
|
|
3709
|
-
/** ************************
|
|
3710
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3711
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3712
|
-
* MIT Licence
|
|
3713
|
-
************************* */
|
|
3714
|
-
class MonkeyFilterBarDateComponent {
|
|
3715
|
-
constructor() {
|
|
3716
|
-
this.internalTarget = null;
|
|
3717
|
-
this.onClose = new EventEmitter();
|
|
3718
|
-
this.showPopOver = false;
|
|
3719
|
-
this.closePopOver = () => {
|
|
3720
|
-
this.showPopOver = false;
|
|
3721
|
-
};
|
|
3722
|
-
}
|
|
3723
|
-
onShowPopOver(el) {
|
|
3724
|
-
let { target } = el;
|
|
3725
|
-
if (target.tagName.toLowerCase() === 'div') {
|
|
3726
|
-
target = target.offsetParent;
|
|
3727
|
-
}
|
|
3728
|
-
this.internalTarget = target;
|
|
3729
|
-
this.showPopOver = true;
|
|
3730
|
-
}
|
|
3731
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3732
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyFilterBarDateComponent, isStandalone: true, selector: "monkey-filter-bar-date", inputs: { internalTarget: "internalTarget" }, outputs: { onClose: "onClose" }, host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-filter-bar-date'", "class.mecx-filter-bar-date-disabled": "_disabled", "class.mecx-filter-bar-date-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-filter-bar-date" }, ngImport: i0, template: `
|
|
3733
|
-
<monkey-option class="option"> 1 semana atrás </monkey-option>
|
|
3734
|
-
<monkey-option class="option"> 1 mês atras </monkey-option>
|
|
3735
|
-
<monkey-option class="option"> 3 mêses atras </monkey-option>
|
|
3736
|
-
<monkey-option class="option" (click)="onShowPopOver($event)"> Personalizado </monkey-option>
|
|
3737
|
-
|
|
3738
|
-
<ng-template
|
|
3739
|
-
[monkeyPopover]="showPopOver"
|
|
3740
|
-
[monkeyPopoverTarget]="internalTarget"
|
|
3741
|
-
[monkeyPopoverClosed]="closePopOver"
|
|
3742
|
-
monkeyPopoverDir="ltr"
|
|
3743
|
-
[monkeyPopoverHideHeader]="true"
|
|
3744
|
-
[hideQuickAction]="true"
|
|
3745
|
-
>
|
|
3746
|
-
<monkey-date-range minDate="2024-12-20" maxDate="2025-06-20" hideActions> </monkey-date-range>
|
|
3747
|
-
</ng-template>
|
|
3748
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyPopoverDirective, selector: "[monkeyPopover]", inputs: ["monkeyPopover", "monkeyPopoverClosed", "monkeyPopoverTarget", "monkeyPopoverMinwidth", "monkeyPopoverBackdrop", "monkeyPopoverWatch", "monkeyPopoverDir", "monkeyPopoverContextmenu", "monkeyPopoverHeight", "monkeyPopoverTitle", "monkeyPopoverActions", "monkeyPopoverHideClose", "monkeyPopoverHideHeader", "monkeyPopoverHideActions"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }, { kind: "component", type: MonkeyDateRangeComponent, selector: "monkey-date-range", inputs: ["startDate", "endDate", "hideQuickAction", "hideHeader", "hideActions", "hideSecondCalendar", "allowFastActionOnHeader", "minDate", "maxDate", "id"], outputs: ["onCancel", "onDate"] }] }); }
|
|
3749
|
-
}
|
|
3750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarDateComponent, decorators: [{
|
|
3751
|
-
type: Component,
|
|
3752
|
-
args: [{ selector: 'monkey-filter-bar-date', imports: [
|
|
3753
|
-
CommonModule,
|
|
3754
|
-
FormsModule,
|
|
3755
|
-
MonkeyDirectivesModule,
|
|
3756
|
-
MonkeyOptionComponent,
|
|
3757
|
-
MonkeyDateRangeComponent
|
|
3758
|
-
], template: `
|
|
3759
|
-
<monkey-option class="option"> 1 semana atrás </monkey-option>
|
|
3760
|
-
<monkey-option class="option"> 1 mês atras </monkey-option>
|
|
3761
|
-
<monkey-option class="option"> 3 mêses atras </monkey-option>
|
|
3762
|
-
<monkey-option class="option" (click)="onShowPopOver($event)"> Personalizado </monkey-option>
|
|
3763
|
-
|
|
3764
|
-
<ng-template
|
|
3765
|
-
[monkeyPopover]="showPopOver"
|
|
3766
|
-
[monkeyPopoverTarget]="internalTarget"
|
|
3767
|
-
[monkeyPopoverClosed]="closePopOver"
|
|
3768
|
-
monkeyPopoverDir="ltr"
|
|
3769
|
-
[monkeyPopoverHideHeader]="true"
|
|
3770
|
-
[hideQuickAction]="true"
|
|
3771
|
-
>
|
|
3772
|
-
<monkey-date-range minDate="2024-12-20" maxDate="2025-06-20" hideActions> </monkey-date-range>
|
|
3773
|
-
</ng-template>
|
|
3774
|
-
`, host: {
|
|
3775
|
-
'[attr.data-testid]': "'monkey-filter-bar-date'",
|
|
3776
|
-
class: 'mecx-filter-bar-date',
|
|
3777
|
-
'[class.mecx-filter-bar-date-disabled]': '_disabled',
|
|
3778
|
-
'[class.mecx-filter-bar-date-focused]': 'focused',
|
|
3779
|
-
'[attr.id]': 'id',
|
|
3780
|
-
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3781
|
-
'(focus)': '_onFocus()',
|
|
3782
|
-
'(blur)': '_onBlur()'
|
|
3783
|
-
}, styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
3784
|
-
}], propDecorators: { internalTarget: [{
|
|
3785
|
-
type: Input
|
|
3786
|
-
}], onClose: [{
|
|
3787
|
-
type: Output
|
|
3788
|
-
}] } });
|
|
3789
|
-
|
|
3790
|
-
/** ************************
|
|
3791
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3792
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3793
|
-
* MIT Licence
|
|
3794
|
-
************************* */
|
|
3795
|
-
class MonkeyFilterBarInputComponent {
|
|
3796
|
-
constructor() {
|
|
3797
|
-
this.value = '';
|
|
3798
|
-
}
|
|
3799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3800
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyFilterBarInputComponent, isStandalone: true, selector: "monkey-filter-bar-input", host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-filter-bar-input'", "class.mecx-filter-bar-input-disabled": "_disabled", "class.mecx-filter-bar-input-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-filter-bar-input" }, ngImport: i0, template: `
|
|
3801
|
-
<monkey-form-field>
|
|
3802
|
-
<input type="text" monkey-input [(ngModel)]="value" />
|
|
3803
|
-
<monkey-info>
|
|
3804
|
-
Helper text Helper text Helper text Helper text Helper text Helper text
|
|
3805
|
-
</monkey-info>
|
|
3806
|
-
</monkey-form-field>
|
|
3807
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:flex-start;padding:12px;max-width:240px}:host monkey-radiobutton{display:flex;flex-direction:column}:host monkey-radiobutton monkey-option{padding:0 24px 6px 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: ["name", "disabled", "id", "required", "type", "min", "max", "percent"], exportAs: ["monkeyInput"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyInfoDirective, selector: "monkey-info" }] }); }
|
|
3808
|
-
}
|
|
3809
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarInputComponent, decorators: [{
|
|
3810
|
-
type: Component,
|
|
3811
|
-
args: [{ selector: 'monkey-filter-bar-input', imports: [
|
|
3812
|
-
CommonModule,
|
|
3813
|
-
FormsModule,
|
|
3814
|
-
MonkeyRadioButtonComponent,
|
|
3815
|
-
MonkeyOptionComponent,
|
|
3816
|
-
MonkeyFormFieldModule,
|
|
3817
|
-
MonkeyInputModule,
|
|
3818
|
-
MonkeyDirectivesModule
|
|
3819
|
-
], template: `
|
|
3820
|
-
<monkey-form-field>
|
|
3821
|
-
<input type="text" monkey-input [(ngModel)]="value" />
|
|
3822
|
-
<monkey-info>
|
|
3823
|
-
Helper text Helper text Helper text Helper text Helper text Helper text
|
|
3824
|
-
</monkey-info>
|
|
3825
|
-
</monkey-form-field>
|
|
3826
|
-
`, host: {
|
|
3827
|
-
'[attr.data-testid]': "'monkey-filter-bar-input'",
|
|
3828
|
-
class: 'mecx-filter-bar-input',
|
|
3829
|
-
'[class.mecx-filter-bar-input-disabled]': '_disabled',
|
|
3830
|
-
'[class.mecx-filter-bar-input-focused]': 'focused',
|
|
3831
|
-
'[attr.id]': 'id',
|
|
3832
|
-
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3833
|
-
'(focus)': '_onFocus()',
|
|
3834
|
-
'(blur)': '_onBlur()'
|
|
3835
|
-
}, styles: [":host{display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:flex-start;padding:12px;max-width:240px}:host monkey-radiobutton{display:flex;flex-direction:column}:host monkey-radiobutton monkey-option{padding:0 24px 6px 0}\n"] }]
|
|
3836
|
-
}] });
|
|
3837
|
-
|
|
3838
|
-
/** ************************
|
|
3839
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3840
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3841
|
-
* MIT Licence
|
|
3842
|
-
************************* */
|
|
3843
|
-
class MonkeyStatusComponent {
|
|
3844
|
-
get class() {
|
|
3845
|
-
return `${this.type()} ${this.size()}`;
|
|
3846
|
-
}
|
|
3847
|
-
get id() {
|
|
3848
|
-
return this._id;
|
|
3849
|
-
}
|
|
3850
|
-
set id(value) {
|
|
3851
|
-
this._id = value || this._uid;
|
|
3852
|
-
}
|
|
3853
|
-
constructor() {
|
|
3854
|
-
this.type = input.required();
|
|
3855
|
-
this.size = input('md');
|
|
3856
|
-
this.label = input();
|
|
3857
|
-
this._uid = inject(IdGenerator).getId('monkey-status-');
|
|
3858
|
-
// eslint-disable-next-line no-self-assign
|
|
3859
|
-
this.id = this.id;
|
|
3860
|
-
}
|
|
3861
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3862
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: MonkeyStatusComponent, isStandalone: true, selector: "monkey-status", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-status" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:var(--mecx-color-success-main)}:host.warning .status{background-color:var(--mecx-color-warning-main)}:host.error .status{background-color:var(--mecx-color-error-700)}:host.question .status{background-color:var(--mecx-color-question-main)}:host.info .status{background-color:var(--mecx-color-info)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
3863
|
-
}
|
|
3864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyStatusComponent, decorators: [{
|
|
3865
|
-
type: Component,
|
|
3866
|
-
args: [{ selector: 'monkey-status', imports: [CommonModule], host: {
|
|
3867
|
-
'data-testid': 'monkey-status',
|
|
3868
|
-
'[attr.id]': 'id',
|
|
3869
|
-
'[id]': 'id'
|
|
3870
|
-
}, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:var(--mecx-color-success-main)}:host.warning .status{background-color:var(--mecx-color-warning-main)}:host.error .status{background-color:var(--mecx-color-error-700)}:host.question .status{background-color:var(--mecx-color-question-main)}:host.info .status{background-color:var(--mecx-color-info)}\n"] }]
|
|
3871
|
-
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
3872
|
-
type: HostBinding,
|
|
3873
|
-
args: ['class']
|
|
3874
|
-
}], id: [{
|
|
3875
|
-
type: Input
|
|
3876
|
-
}] } });
|
|
3877
|
-
|
|
3878
|
-
/** ************************
|
|
3879
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3880
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3881
|
-
* MIT Licence
|
|
3882
|
-
************************* */
|
|
3883
|
-
|
|
3884
|
-
/** ************************
|
|
3885
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3886
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3887
|
-
* MIT Licence
|
|
3888
|
-
************************* */
|
|
3889
|
-
class MonkeyFilterBarStatusComponent {
|
|
3890
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3891
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyFilterBarStatusComponent, isStandalone: true, selector: "monkey-filter-bar-status", host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-filter-bar-status'", "class.mecx-filter-bar-status-disabled": "_disabled", "class.mecx-filter-bar-status-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-filter-bar-status" }, ngImport: i0, template: `
|
|
3892
|
-
<monkey-checkbox>Disponível</monkey-checkbox>
|
|
3893
|
-
<monkey-checkbox>Antecipado</monkey-checkbox>
|
|
3894
|
-
<monkey-checkbox>Em Aprovação</monkey-checkbox>
|
|
3895
|
-
<monkey-checkbox>Recusado</monkey-checkbox>
|
|
3896
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:flex-start;padding:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: MonkeyCheckboxComponent, selector: "monkey-checkbox", inputs: ["disabled", "indeterminate", "required", "showFooter", "size", "value"], outputs: ["onChange"] }] }); }
|
|
3897
|
-
}
|
|
3898
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarStatusComponent, decorators: [{
|
|
3899
|
-
type: Component,
|
|
3900
|
-
args: [{ selector: 'monkey-filter-bar-status', imports: [CommonModule, FormsModule, MonkeyStatusComponent, MonkeyCheckboxComponent], template: `
|
|
3901
|
-
<monkey-checkbox>Disponível</monkey-checkbox>
|
|
3902
|
-
<monkey-checkbox>Antecipado</monkey-checkbox>
|
|
3903
|
-
<monkey-checkbox>Em Aprovação</monkey-checkbox>
|
|
3904
|
-
<monkey-checkbox>Recusado</monkey-checkbox>
|
|
3905
|
-
`, host: {
|
|
3906
|
-
'[attr.data-testid]': "'monkey-filter-bar-status'",
|
|
3907
|
-
class: 'mecx-filter-bar-status',
|
|
3908
|
-
'[class.mecx-filter-bar-status-disabled]': '_disabled',
|
|
3909
|
-
'[class.mecx-filter-bar-status-focused]': 'focused',
|
|
3910
|
-
'[attr.id]': 'id',
|
|
3911
|
-
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3912
|
-
'(focus)': '_onFocus()',
|
|
3913
|
-
'(blur)': '_onBlur()'
|
|
3914
|
-
}, styles: [":host{display:flex;flex-direction:column;gap:12px;justify-content:flex-start;align-items:flex-start;padding:12px}\n"] }]
|
|
3915
|
-
}] });
|
|
3916
|
-
|
|
3917
|
-
/** ************************
|
|
3918
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
3919
|
-
* This style guide was developed by Monkey Exchange Team
|
|
3920
|
-
* MIT Licence
|
|
3921
|
-
************************* */
|
|
3922
|
-
/*
|
|
3923
|
-
type: 'input' | 'date' | 'checkbox' | 'currency';
|
|
3924
|
-
*/
|
|
3925
|
-
class MonkeyFilterBarComponent {
|
|
3926
|
-
constructor() {
|
|
3927
|
-
this._elementRef = inject(ElementRef);
|
|
3928
|
-
this.showPopOver = false;
|
|
3929
|
-
this.elementTarget = null;
|
|
3930
|
-
this.showPopOverInternal = false;
|
|
3931
|
-
this.elementTargetInternal = null;
|
|
3932
|
-
this.closePopOver = () => {
|
|
3933
|
-
this.showPopOver = false;
|
|
3934
|
-
};
|
|
3935
|
-
this.closePopOverInternal = () => {
|
|
3936
|
-
this.showPopOverInternal = false;
|
|
3937
|
-
};
|
|
3938
|
-
}
|
|
3939
|
-
ngAfterContentInit() { }
|
|
3940
|
-
ngOnChanges(changes) { }
|
|
3941
|
-
ngOnDestroy() { }
|
|
3942
|
-
onShowPopOver(el) {
|
|
3943
|
-
this.elementTarget = el.element;
|
|
3944
|
-
this.showPopOver = true;
|
|
3945
|
-
}
|
|
3946
|
-
onShowPopOverInternal(el) {
|
|
3947
|
-
let { target } = el;
|
|
3948
|
-
if (target.tagName.toLowerCase() === 'div') {
|
|
3949
|
-
target = target.offsetParent;
|
|
3950
|
-
}
|
|
3951
|
-
this.elementTargetInternal = target;
|
|
3952
|
-
this.showPopOverInternal = true;
|
|
3953
|
-
}
|
|
3954
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3955
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyFilterBarComponent, isStandalone: true, selector: "monkey-filter-bar", host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-filter-bar'", "class.mecx-filter-bar-disabled": "_disabled", "class.mecx-filter-bar-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-filter-bar" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3956
|
-
<monkey-form-field>
|
|
3957
|
-
<input type="text" monkey-input placeholder="Pesquise pelo nome ou CNPJ" />
|
|
3958
|
-
</monkey-form-field>
|
|
3959
|
-
<monkey-button
|
|
3960
|
-
#popoverTarget
|
|
3961
|
-
class="btn-filter"
|
|
3962
|
-
type="secondary"
|
|
3963
|
-
(click)="onShowPopOver(popoverTarget)"
|
|
3964
|
-
>
|
|
3965
|
-
<util-icon class="icon" name="addPlus" first />
|
|
3966
|
-
Adicionar Filtro
|
|
3967
|
-
</monkey-button>
|
|
3968
|
-
|
|
3969
|
-
<ng-template
|
|
3970
|
-
[monkeyPopover]="showPopOver"
|
|
3971
|
-
[monkeyPopoverTarget]="elementTarget"
|
|
3972
|
-
[monkeyPopoverClosed]="closePopOver"
|
|
3973
|
-
monkeyPopoverDir="ltr"
|
|
3974
|
-
[monkeyPopoverHideHeader]="true"
|
|
3975
|
-
>
|
|
3976
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)"> Status </monkey-option>
|
|
3977
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)"> Valor </monkey-option>
|
|
3978
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)">
|
|
3979
|
-
Identificador
|
|
3980
|
-
</monkey-option>
|
|
3981
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)">
|
|
3982
|
-
Data de Criação
|
|
3983
|
-
</monkey-option>
|
|
3984
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)">
|
|
3985
|
-
Data de Vencimento 12 12
|
|
3986
|
-
</monkey-option>
|
|
3987
|
-
</ng-template>
|
|
3988
|
-
|
|
3989
|
-
<ng-template
|
|
3990
|
-
[monkeyPopover]="showPopOverInternal"
|
|
3991
|
-
[monkeyPopoverTarget]="elementTargetInternal"
|
|
3992
|
-
[monkeyPopoverClosed]="closePopOverInternal"
|
|
3993
|
-
monkeyPopoverDir="rt"
|
|
3994
|
-
[monkeyPopoverTitle]="'Status'"
|
|
3995
|
-
[monkeyPopoverActions]="popoverAction"
|
|
3996
|
-
>
|
|
3997
|
-
<!--<monkey-filter-bar-status></monkey-filter-bar-status>-->
|
|
3998
|
-
<!--<monkey-filter-bar-currency></monkey-filter-bar-currency>-->
|
|
3999
|
-
<monkey-filter-bar-input></monkey-filter-bar-input>
|
|
4000
|
-
|
|
4001
|
-
<!--<monkey-date-range hideSecondCalendar hideActions> </monkey-date-range>-->
|
|
4002
|
-
</ng-template>
|
|
4003
|
-
|
|
4004
|
-
<ng-template #popoverAction>
|
|
4005
|
-
<monkey-button type="secondary" size="sm" class="btn" (click)="closePopOver()">
|
|
4006
|
-
Limpar
|
|
4007
|
-
</monkey-button>
|
|
4008
|
-
<monkey-button type="primary" size="sm" class="btn"> Aplicar </monkey-button>
|
|
4009
|
-
</ng-template>
|
|
4010
|
-
`, isInline: true, styles: [":host{width:100%;display:inline-flex;min-width:0;gap:12px}:host .mecx-form-field{width:100%;max-width:400px}:host .btn-filter{width:100%;max-width:160px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyPopoverDirective, selector: "[monkeyPopover]", inputs: ["monkeyPopover", "monkeyPopoverClosed", "monkeyPopoverTarget", "monkeyPopoverMinwidth", "monkeyPopoverBackdrop", "monkeyPopoverWatch", "monkeyPopoverDir", "monkeyPopoverContextmenu", "monkeyPopoverHeight", "monkeyPopoverTitle", "monkeyPopoverActions", "monkeyPopoverHideClose", "monkeyPopoverHideHeader", "monkeyPopoverHideActions"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: ["name", "disabled", "id", "required", "type", "min", "max", "percent"], exportAs: ["monkeyInput"] }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "color", "size", "type", "loading", "id"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }, { kind: "component", type: MonkeyFilterBarInputComponent, selector: "monkey-filter-bar-input" }] }); }
|
|
4011
|
-
}
|
|
4012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFilterBarComponent, decorators: [{
|
|
4013
|
-
type: Component,
|
|
4014
|
-
args: [{ selector: 'monkey-filter-bar', imports: [
|
|
4015
|
-
CommonModule,
|
|
4016
|
-
FormsModule,
|
|
4017
|
-
ReactiveFormsModule,
|
|
4018
|
-
MonkeyFormFieldModule,
|
|
4019
|
-
MonkeyDirectivesModule,
|
|
4020
|
-
MonkeyFormFieldModule,
|
|
4021
|
-
MonkeyInputModule,
|
|
4022
|
-
MonkeyButtonComponent,
|
|
4023
|
-
UtilIconComponent,
|
|
4024
|
-
MonkeyOptionComponent,
|
|
4025
|
-
MonkeyFilterBarStatusComponent,
|
|
4026
|
-
MonkeyFilterBarDateComponent,
|
|
4027
|
-
MonkeyFilterBarCurrencyComponent,
|
|
4028
|
-
MonkeyFilterBarInputComponent,
|
|
4029
|
-
MonkeyDateRangeComponent
|
|
4030
|
-
], template: `
|
|
4031
|
-
<monkey-form-field>
|
|
4032
|
-
<input type="text" monkey-input placeholder="Pesquise pelo nome ou CNPJ" />
|
|
4033
|
-
</monkey-form-field>
|
|
4034
|
-
<monkey-button
|
|
4035
|
-
#popoverTarget
|
|
4036
|
-
class="btn-filter"
|
|
4037
|
-
type="secondary"
|
|
4038
|
-
(click)="onShowPopOver(popoverTarget)"
|
|
4039
|
-
>
|
|
4040
|
-
<util-icon class="icon" name="addPlus" first />
|
|
4041
|
-
Adicionar Filtro
|
|
4042
|
-
</monkey-button>
|
|
4043
|
-
|
|
4044
|
-
<ng-template
|
|
4045
|
-
[monkeyPopover]="showPopOver"
|
|
4046
|
-
[monkeyPopoverTarget]="elementTarget"
|
|
4047
|
-
[monkeyPopoverClosed]="closePopOver"
|
|
4048
|
-
monkeyPopoverDir="ltr"
|
|
4049
|
-
[monkeyPopoverHideHeader]="true"
|
|
4050
|
-
>
|
|
4051
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)"> Status </monkey-option>
|
|
4052
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)"> Valor </monkey-option>
|
|
4053
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)">
|
|
4054
|
-
Identificador
|
|
4055
|
-
</monkey-option>
|
|
4056
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)">
|
|
4057
|
-
Data de Criação
|
|
4058
|
-
</monkey-option>
|
|
4059
|
-
<monkey-option class="option" (click)="onShowPopOverInternal($event)">
|
|
4060
|
-
Data de Vencimento 12 12
|
|
4061
|
-
</monkey-option>
|
|
4062
|
-
</ng-template>
|
|
4063
|
-
|
|
4064
|
-
<ng-template
|
|
4065
|
-
[monkeyPopover]="showPopOverInternal"
|
|
4066
|
-
[monkeyPopoverTarget]="elementTargetInternal"
|
|
4067
|
-
[monkeyPopoverClosed]="closePopOverInternal"
|
|
4068
|
-
monkeyPopoverDir="rt"
|
|
4069
|
-
[monkeyPopoverTitle]="'Status'"
|
|
4070
|
-
[monkeyPopoverActions]="popoverAction"
|
|
4071
|
-
>
|
|
4072
|
-
<!--<monkey-filter-bar-status></monkey-filter-bar-status>-->
|
|
4073
|
-
<!--<monkey-filter-bar-currency></monkey-filter-bar-currency>-->
|
|
4074
|
-
<monkey-filter-bar-input></monkey-filter-bar-input>
|
|
4075
|
-
|
|
4076
|
-
<!--<monkey-date-range hideSecondCalendar hideActions> </monkey-date-range>-->
|
|
4077
|
-
</ng-template>
|
|
4078
|
-
|
|
4079
|
-
<ng-template #popoverAction>
|
|
4080
|
-
<monkey-button type="secondary" size="sm" class="btn" (click)="closePopOver()">
|
|
4081
|
-
Limpar
|
|
4082
|
-
</monkey-button>
|
|
4083
|
-
<monkey-button type="primary" size="sm" class="btn"> Aplicar </monkey-button>
|
|
4084
|
-
</ng-template>
|
|
4085
|
-
`, host: {
|
|
4086
|
-
'[attr.data-testid]': "'monkey-filter-bar'",
|
|
4087
|
-
class: 'mecx-filter-bar',
|
|
4088
|
-
'[class.mecx-filter-bar-disabled]': '_disabled',
|
|
4089
|
-
'[class.mecx-filter-bar-focused]': 'focused',
|
|
4090
|
-
'[attr.id]': 'id',
|
|
4091
|
-
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
4092
|
-
'(focus)': '_onFocus()',
|
|
4093
|
-
'(blur)': '_onBlur()'
|
|
4094
|
-
}, styles: [":host{width:100%;display:inline-flex;min-width:0;gap:12px}:host .mecx-form-field{width:100%;max-width:400px}:host .btn-filter{width:100%;max-width:160px}\n"] }]
|
|
4095
|
-
}] });
|
|
4096
|
-
|
|
4097
|
-
/** ************************
|
|
4098
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
4099
|
-
* This style guide was developed by Monkey Exchange Team
|
|
4100
|
-
* MIT Licence
|
|
4101
|
-
************************* */
|
|
4102
|
-
|
|
4103
|
-
/** ************************
|
|
4104
|
-
* Copyright Monkey Exchange. All Rights Reserved
|
|
4105
|
-
* This style guide was developed by Monkey Exchange Team
|
|
4106
|
-
* MIT Licence
|
|
4107
|
-
************************* */
|
|
4108
|
-
class MonkeyInputCodeComponent {
|
|
4109
|
-
get disabled() {
|
|
4110
|
-
if (this.ngControl && this.ngControl.disabled !== null) {
|
|
4111
|
-
return this.ngControl.disabled;
|
|
4112
|
-
}
|
|
4113
|
-
return this._disabled;
|
|
4114
|
-
}
|
|
4115
|
-
set disabled(value) {
|
|
4116
|
-
this._disabled = value;
|
|
4117
|
-
if (this.focused) {
|
|
4118
|
-
this.focused = false;
|
|
4119
|
-
this.stateChanges.next();
|
|
4120
|
-
}
|
|
4121
|
-
}
|
|
4122
|
-
set value(value) {
|
|
4123
|
-
if (this._value !== value && value !== undefined) {
|
|
4124
|
-
this._value = value;
|
|
4125
|
-
this._onChange(value);
|
|
4126
|
-
this._onTouched();
|
|
4127
|
-
}
|
|
4128
|
-
}
|
|
4129
|
-
get value() {
|
|
4130
|
-
return this._value;
|
|
4131
|
-
}
|
|
4132
|
-
constructor(formField) {
|
|
4133
|
-
this.formField = formField;
|
|
4134
|
-
this.stateChanges = new Subject();
|
|
4135
|
-
this.type = 'input-code';
|
|
4136
|
-
this.currency = false;
|
|
4137
|
-
this.percent = false;
|
|
4138
|
-
this.id = inject(IdGenerator).getId('monkey-input-code-');
|
|
4139
|
-
this._onChange = () => { };
|
|
4140
|
-
this._onTouched = () => { };
|
|
4141
|
-
this._value = null;
|
|
4142
|
-
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
4143
|
-
this.focused = false;
|
|
4144
|
-
this.length = input(6);
|
|
4145
|
-
this.inputType = input('numeric');
|
|
4146
|
-
this.inputIndices = computed(() => {
|
|
4147
|
-
return Array.from({ length: this.length() }, (_, i) => {
|
|
4148
|
-
return '';
|
|
4149
|
-
});
|
|
4150
|
-
});
|
|
4151
|
-
this._disabled = false;
|
|
4152
|
-
if (this.ngControl) {
|
|
4153
|
-
this.ngControl.valueAccessor = this;
|
|
4154
|
-
}
|
|
4155
|
-
if (this.formField) {
|
|
4156
|
-
this.formField.hideAction = true;
|
|
4157
|
-
}
|
|
4158
|
-
}
|
|
4159
|
-
ngAfterViewInit() {
|
|
4160
|
-
if (this.formField) {
|
|
4161
|
-
const input = this.formField.elementRef.nativeElement.querySelector('.mecx-form-field-body');
|
|
4162
|
-
const height = input.offsetHeight > 40 ? input.offsetHeight : 40;
|
|
4163
|
-
this.inputs.forEach((inputEl) => {
|
|
4164
|
-
inputEl.nativeElement.style.height = `${height}px`;
|
|
4165
|
-
inputEl.nativeElement.style.width = `${height}px`;
|
|
4166
|
-
});
|
|
4167
|
-
}
|
|
4168
|
-
}
|
|
4169
|
-
_onFocus() {
|
|
4170
|
-
if (!this.disabled) {
|
|
4171
|
-
this.focused = true;
|
|
4172
|
-
this._onTouched();
|
|
4173
|
-
this.stateChanges.next();
|
|
4174
|
-
}
|
|
4175
|
-
}
|
|
4176
|
-
propagateCode() {
|
|
4177
|
-
const code = this.inputIndices().join('');
|
|
4178
|
-
this.writeValue(code);
|
|
4179
|
-
}
|
|
4180
|
-
focusNextInput(input) {
|
|
4181
|
-
const next = input.nextElementSibling;
|
|
4182
|
-
next?.focus();
|
|
4183
|
-
}
|
|
4184
|
-
focusPreviousInput(input) {
|
|
4185
|
-
const previous = input.previousElementSibling;
|
|
4186
|
-
previous?.focus();
|
|
4187
|
-
}
|
|
4188
|
-
setFullInputValue(value) {
|
|
4189
|
-
const chars = value?.slice(0, this.length()).split('') || '';
|
|
4190
|
-
chars.forEach((digit, index) => {
|
|
4191
|
-
this.inputIndices()[index] = digit;
|
|
4192
|
-
});
|
|
3651
|
+
setFullInputValue(value) {
|
|
3652
|
+
const chars = value?.slice(0, this.length()).split('') || '';
|
|
3653
|
+
chars.forEach((digit, index) => {
|
|
3654
|
+
this.inputIndices()[index] = digit;
|
|
3655
|
+
});
|
|
4193
3656
|
}
|
|
4194
3657
|
isInvalid() {
|
|
4195
3658
|
return this.formField.showInvalid;
|
|
@@ -6157,68 +5620,253 @@ class MonkeyModalService {
|
|
|
6157
5620
|
maxHeight: config.maxHeight,
|
|
6158
5621
|
disposeOnNavigation: config.closeOnNavigation
|
|
6159
5622
|
});
|
|
6160
|
-
if (config.backdropClass) {
|
|
6161
|
-
state.backdropClass = config.backdropClass;
|
|
6162
|
-
}
|
|
6163
|
-
if (config.maxWidth) {
|
|
6164
|
-
state.width = '100%';
|
|
6165
|
-
}
|
|
6166
|
-
if (config.maxHeight) {
|
|
6167
|
-
state.height = '100%';
|
|
5623
|
+
if (config.backdropClass) {
|
|
5624
|
+
state.backdropClass = config.backdropClass;
|
|
5625
|
+
}
|
|
5626
|
+
if (config.maxWidth) {
|
|
5627
|
+
state.width = '100%';
|
|
5628
|
+
}
|
|
5629
|
+
if (config.maxHeight) {
|
|
5630
|
+
state.height = '100%';
|
|
5631
|
+
}
|
|
5632
|
+
return state;
|
|
5633
|
+
}
|
|
5634
|
+
createInjector(config, dialogRef, overlayRef, fallbackInjector) {
|
|
5635
|
+
const providers = [
|
|
5636
|
+
{ provide: OverlayRef, useValue: overlayRef },
|
|
5637
|
+
{ provide: MonkeyModalRef, useValue: dialogRef },
|
|
5638
|
+
{ provide: MECX_MODAL_DATA, useValue: config.data }
|
|
5639
|
+
];
|
|
5640
|
+
if (config.providers) {
|
|
5641
|
+
providers.push(...config.providers);
|
|
5642
|
+
}
|
|
5643
|
+
return Injector.create({ parent: fallbackInjector, providers });
|
|
5644
|
+
}
|
|
5645
|
+
open(component, config) {
|
|
5646
|
+
const defaultConfig = new MonkeyModalConfig();
|
|
5647
|
+
config = { ...defaultConfig, ...config };
|
|
5648
|
+
config.id = this._idGenerator.getId('monkey-modal-');
|
|
5649
|
+
const overlayConfig = this.getOverlayConfig(config);
|
|
5650
|
+
const overlayRef = this._overlay.create(overlayConfig);
|
|
5651
|
+
const modalRef = new MonkeyModalRef(overlayRef, config);
|
|
5652
|
+
const injector = this.createInjector(config, modalRef, overlayRef, this._injector);
|
|
5653
|
+
const componentPortal = new ComponentPortal(component, null, injector);
|
|
5654
|
+
const componentRef = overlayRef.attach(componentPortal);
|
|
5655
|
+
const componentElement = componentRef.location.nativeElement;
|
|
5656
|
+
componentElement.style.width = '100%';
|
|
5657
|
+
componentElement.style.height = '100%';
|
|
5658
|
+
modalRef.componentElement = componentElement;
|
|
5659
|
+
modalRef.componentInstance = componentRef.instance;
|
|
5660
|
+
this.openDialogs.push(modalRef);
|
|
5661
|
+
return modalRef;
|
|
5662
|
+
}
|
|
5663
|
+
openDefault(params, config) {
|
|
5664
|
+
config.providers = [{ provide: MECX_MODAL_DEFAULT_CONFIG, useValue: params }];
|
|
5665
|
+
config.icon = config.icon ? config.icon : 'help';
|
|
5666
|
+
return this.open(MonkeyModalDefaultComponent, config);
|
|
5667
|
+
}
|
|
5668
|
+
openConfirmation(params, config) {
|
|
5669
|
+
config.providers = [{ provide: MECX_MODAL_CONFIRMATION_CONFIG, useValue: params }];
|
|
5670
|
+
return this.open(MonkeyModalConfirmationComponent, config);
|
|
5671
|
+
}
|
|
5672
|
+
closeAll() {
|
|
5673
|
+
reverseForEach(this.openDialogs, (dialog) => {
|
|
5674
|
+
return dialog.close();
|
|
5675
|
+
});
|
|
5676
|
+
this.openDialogs.splice(0, this.openDialogs.length);
|
|
5677
|
+
}
|
|
5678
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5679
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyModalService, providedIn: 'root' }); }
|
|
5680
|
+
}
|
|
5681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyModalService, decorators: [{
|
|
5682
|
+
type: Injectable,
|
|
5683
|
+
args: [{ providedIn: 'root' }]
|
|
5684
|
+
}] });
|
|
5685
|
+
|
|
5686
|
+
/** ************************
|
|
5687
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
5688
|
+
* This style guide was developed by Monkey Exchange Team
|
|
5689
|
+
* MIT Licence
|
|
5690
|
+
************************* */
|
|
5691
|
+
|
|
5692
|
+
/** ************************
|
|
5693
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
5694
|
+
* This style guide was developed by Monkey Exchange Team
|
|
5695
|
+
* MIT Licence
|
|
5696
|
+
************************* */
|
|
5697
|
+
class MonkeyRadioButtonComponent {
|
|
5698
|
+
get classes() {
|
|
5699
|
+
return `${this.position} ${this.size}`;
|
|
5700
|
+
}
|
|
5701
|
+
get disabled() {
|
|
5702
|
+
if (this.ngControl && this.ngControl.disabled !== null) {
|
|
5703
|
+
return this.ngControl.disabled;
|
|
5704
|
+
}
|
|
5705
|
+
return this._disabled;
|
|
5706
|
+
}
|
|
5707
|
+
set disabled(value) {
|
|
5708
|
+
this._disabled = value;
|
|
5709
|
+
if (this.focused) {
|
|
5710
|
+
this.focused = false;
|
|
5711
|
+
this.stateChanges.next();
|
|
5712
|
+
}
|
|
5713
|
+
}
|
|
5714
|
+
get required() {
|
|
5715
|
+
return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
|
|
5716
|
+
}
|
|
5717
|
+
set required(value) {
|
|
5718
|
+
this._required = value;
|
|
5719
|
+
this.stateChanges.next();
|
|
5720
|
+
}
|
|
5721
|
+
set value(value) {
|
|
5722
|
+
if (this._value !== value) {
|
|
5723
|
+
this._value = value;
|
|
5724
|
+
this._onChange(value);
|
|
5725
|
+
}
|
|
5726
|
+
}
|
|
5727
|
+
get value() {
|
|
5728
|
+
return this._value;
|
|
5729
|
+
}
|
|
5730
|
+
constructor(changeDetectorRef, formField) {
|
|
5731
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
5732
|
+
this.formField = formField;
|
|
5733
|
+
this.tabIndex = 0;
|
|
5734
|
+
this.onChange = new EventEmitter();
|
|
5735
|
+
this.onSearch = new EventEmitter();
|
|
5736
|
+
this.position = 'horizontal';
|
|
5737
|
+
this.size = 'lg';
|
|
5738
|
+
this._value = null;
|
|
5739
|
+
this._destroyRef = inject(DestroyRef);
|
|
5740
|
+
this.idGenerator = inject(IdGenerator);
|
|
5741
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
5742
|
+
this._elementRef = inject(ElementRef);
|
|
5743
|
+
this.focused = false;
|
|
5744
|
+
this._disabled = false;
|
|
5745
|
+
this.id = this.idGenerator.getId('monkey-radiobutton-');
|
|
5746
|
+
this.stateChanges = new Subject();
|
|
5747
|
+
this.type = 'radio-button';
|
|
5748
|
+
this._onChange = () => { };
|
|
5749
|
+
this._onTouched = () => { };
|
|
5750
|
+
if (this.ngControl) {
|
|
5751
|
+
this.ngControl.valueAccessor = this;
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5754
|
+
changeSelected() {
|
|
5755
|
+
setTimeout(() => {
|
|
5756
|
+
if (this.options) {
|
|
5757
|
+
this.options.forEach((opt) => {
|
|
5758
|
+
opt.selected = opt.value() === this.value;
|
|
5759
|
+
});
|
|
5760
|
+
}
|
|
5761
|
+
this.changeDetectorRef.markForCheck();
|
|
5762
|
+
});
|
|
5763
|
+
}
|
|
5764
|
+
initializeOptions() {
|
|
5765
|
+
setTimeout(() => {
|
|
5766
|
+
this.options?.forEach((option) => {
|
|
5767
|
+
option.type = 'radio';
|
|
5768
|
+
if (!option.action) {
|
|
5769
|
+
option.action = this.selectOption.bind(this, option);
|
|
5770
|
+
}
|
|
5771
|
+
});
|
|
5772
|
+
this.changeDetectorRef.markForCheck();
|
|
5773
|
+
}, 0);
|
|
5774
|
+
}
|
|
5775
|
+
ngAfterContentInit() {
|
|
5776
|
+
this.initializeOptions();
|
|
5777
|
+
this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
5778
|
+
this.initializeOptions();
|
|
5779
|
+
this.changeSelected();
|
|
5780
|
+
});
|
|
5781
|
+
}
|
|
5782
|
+
selectOption(option) {
|
|
5783
|
+
if (!option.disabled && !this.disabled) {
|
|
5784
|
+
this.value = option.value();
|
|
5785
|
+
this._onChange(this.value);
|
|
5786
|
+
this.onChange.emit(this.value);
|
|
5787
|
+
this.options.forEach((opt) => {
|
|
5788
|
+
opt.selected = opt.value() === this.value;
|
|
5789
|
+
});
|
|
6168
5790
|
}
|
|
6169
|
-
return state;
|
|
6170
5791
|
}
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
5792
|
+
writeValue(value) {
|
|
5793
|
+
this.value = value;
|
|
5794
|
+
this.changeSelected();
|
|
5795
|
+
}
|
|
5796
|
+
onContainerClick(event) {
|
|
5797
|
+
if (this.disabled)
|
|
5798
|
+
return;
|
|
5799
|
+
this._elementRef.nativeElement.focus();
|
|
5800
|
+
}
|
|
5801
|
+
_onFocus() {
|
|
5802
|
+
if (!this.disabled) {
|
|
5803
|
+
this.focused = true;
|
|
5804
|
+
this._onTouched();
|
|
5805
|
+
this.stateChanges.next();
|
|
6179
5806
|
}
|
|
6180
|
-
return Injector.create({ parent: fallbackInjector, providers });
|
|
6181
5807
|
}
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
config.id = this._idGenerator.getId('monkey-modal-');
|
|
6186
|
-
const overlayConfig = this.getOverlayConfig(config);
|
|
6187
|
-
const overlayRef = this._overlay.create(overlayConfig);
|
|
6188
|
-
const modalRef = new MonkeyModalRef(overlayRef, config);
|
|
6189
|
-
const injector = this.createInjector(config, modalRef, overlayRef, this._injector);
|
|
6190
|
-
const componentPortal = new ComponentPortal(component, null, injector);
|
|
6191
|
-
const componentRef = overlayRef.attach(componentPortal);
|
|
6192
|
-
const componentElement = componentRef.location.nativeElement;
|
|
6193
|
-
componentElement.style.width = '100%';
|
|
6194
|
-
componentElement.style.height = '100%';
|
|
6195
|
-
modalRef.componentElement = componentElement;
|
|
6196
|
-
modalRef.componentInstance = componentRef.instance;
|
|
6197
|
-
this.openDialogs.push(modalRef);
|
|
6198
|
-
return modalRef;
|
|
5808
|
+
_onBlur() {
|
|
5809
|
+
this.focused = false;
|
|
5810
|
+
this.stateChanges.next();
|
|
6199
5811
|
}
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
config.icon = config.icon ? config.icon : 'help';
|
|
6203
|
-
return this.open(MonkeyModalDefaultComponent, config);
|
|
5812
|
+
registerOnChange(fn) {
|
|
5813
|
+
this._onChange = fn;
|
|
6204
5814
|
}
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
return this.open(MonkeyModalConfirmationComponent, config);
|
|
5815
|
+
registerOnTouched(fn) {
|
|
5816
|
+
this._onTouched = fn;
|
|
6208
5817
|
}
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
});
|
|
6213
|
-
this.openDialogs.splice(0, this.openDialogs.length);
|
|
5818
|
+
setDisabledState(isDisabled) {
|
|
5819
|
+
this.disabled = isDisabled;
|
|
5820
|
+
this.initializeOptions();
|
|
6214
5821
|
}
|
|
6215
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
6216
|
-
static { this.ɵ
|
|
5822
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyRadioButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5823
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: MonkeyRadioButtonComponent, isStandalone: true, selector: "monkey-radiobutton", inputs: { tabIndex: "tabIndex", position: "position", size: "size", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange", onSearch: "onSearch" }, host: { attributes: { "data-testid": "monkey-radiobutton" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-disabled": "disabled", "class.mecx-radiobutton-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex", "class": "this.classes" }, classAttribute: "mecx-radiobutton" }, providers: [
|
|
5824
|
+
// eslint-disable-next-line no-use-before-define
|
|
5825
|
+
{ provide: MonkeyFormFieldControl, useExisting: MonkeyRadioButtonComponent }
|
|
5826
|
+
], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], ngImport: i0, template: "<ng-content />\n", styles: ["monkey-radiobutton{display:inline-flex;width:100%;min-width:0;position:relative;flex-wrap:wrap}monkey-radiobutton:focus-visible,monkey-radiobutton:focus{outline:none}monkey-radiobutton.vertical{flex-direction:column}monkey-radiobutton.mecx-disabled monkey-option{opacity:.5;pointer-events:none}monkey-radiobutton.mecx-disabled monkey-option:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-radiobutton.mecx-form-field-invalid{background:var(--mecx-color-error-700)}monkey-radiobutton.md monkey-option:before{width:16px;height:16px}monkey-radiobutton.sm monkey-option:before{width:14px;height:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6217
5827
|
}
|
|
6218
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
6219
|
-
type:
|
|
6220
|
-
args: [{
|
|
6221
|
-
|
|
5828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyRadioButtonComponent, decorators: [{
|
|
5829
|
+
type: Component,
|
|
5830
|
+
args: [{ selector: 'monkey-radiobutton', imports: [CommonModule, ReactiveFormsModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
5831
|
+
// eslint-disable-next-line no-use-before-define
|
|
5832
|
+
{ provide: MonkeyFormFieldControl, useExisting: MonkeyRadioButtonComponent }
|
|
5833
|
+
], host: {
|
|
5834
|
+
'data-testid': 'monkey-radiobutton',
|
|
5835
|
+
class: 'mecx-radiobutton',
|
|
5836
|
+
'[class.mecx-disabled]': 'disabled',
|
|
5837
|
+
'[class.mecx-radiobutton-focused]': 'focused',
|
|
5838
|
+
'[attr.id]': 'id',
|
|
5839
|
+
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
5840
|
+
'(focus)': '_onFocus()',
|
|
5841
|
+
'(blur)': '_onBlur()'
|
|
5842
|
+
}, template: "<ng-content />\n", styles: ["monkey-radiobutton{display:inline-flex;width:100%;min-width:0;position:relative;flex-wrap:wrap}monkey-radiobutton:focus-visible,monkey-radiobutton:focus{outline:none}monkey-radiobutton.vertical{flex-direction:column}monkey-radiobutton.mecx-disabled monkey-option{opacity:.5;pointer-events:none}monkey-radiobutton.mecx-disabled monkey-option:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-radiobutton.mecx-form-field-invalid{background:var(--mecx-color-error-700)}monkey-radiobutton.md monkey-option:before{width:16px;height:16px}monkey-radiobutton.sm monkey-option:before{width:14px;height:14px}\n"] }]
|
|
5843
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: MonkeyFormFieldComponent, decorators: [{
|
|
5844
|
+
type: Optional
|
|
5845
|
+
}] }], propDecorators: { options: [{
|
|
5846
|
+
type: ContentChildren,
|
|
5847
|
+
args: [MonkeyOptionComponent]
|
|
5848
|
+
}], tabIndex: [{
|
|
5849
|
+
type: Input
|
|
5850
|
+
}], onChange: [{
|
|
5851
|
+
type: Output
|
|
5852
|
+
}], onSearch: [{
|
|
5853
|
+
type: Output
|
|
5854
|
+
}], position: [{
|
|
5855
|
+
type: Input
|
|
5856
|
+
}], size: [{
|
|
5857
|
+
type: Input
|
|
5858
|
+
}], classes: [{
|
|
5859
|
+
type: HostBinding,
|
|
5860
|
+
args: ['class']
|
|
5861
|
+
}], disabled: [{
|
|
5862
|
+
type: Input,
|
|
5863
|
+
args: [{ transform: booleanAttribute }]
|
|
5864
|
+
}], required: [{
|
|
5865
|
+
type: Input,
|
|
5866
|
+
args: [{ transform: booleanAttribute }]
|
|
5867
|
+
}], value: [{
|
|
5868
|
+
type: Input
|
|
5869
|
+
}] } });
|
|
6222
5870
|
|
|
6223
5871
|
/** ************************
|
|
6224
5872
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
@@ -6284,6 +5932,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
6284
5932
|
* MIT Licence
|
|
6285
5933
|
************************* */
|
|
6286
5934
|
|
|
5935
|
+
/** ************************
|
|
5936
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
5937
|
+
* This style guide was developed by Monkey Exchange Team
|
|
5938
|
+
* MIT Licence
|
|
5939
|
+
************************* */
|
|
5940
|
+
class MonkeyStatusComponent {
|
|
5941
|
+
get class() {
|
|
5942
|
+
return `${this.type()} ${this.size()}`;
|
|
5943
|
+
}
|
|
5944
|
+
get id() {
|
|
5945
|
+
return this._id;
|
|
5946
|
+
}
|
|
5947
|
+
set id(value) {
|
|
5948
|
+
this._id = value || this._uid;
|
|
5949
|
+
}
|
|
5950
|
+
constructor() {
|
|
5951
|
+
this.type = input.required();
|
|
5952
|
+
this.size = input('md');
|
|
5953
|
+
this.label = input();
|
|
5954
|
+
this._uid = inject(IdGenerator).getId('monkey-status-');
|
|
5955
|
+
// eslint-disable-next-line no-self-assign
|
|
5956
|
+
this.id = this.id;
|
|
5957
|
+
}
|
|
5958
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5959
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: MonkeyStatusComponent, isStandalone: true, selector: "monkey-status", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-status" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:var(--mecx-color-success-main)}:host.warning .status{background-color:var(--mecx-color-warning-main)}:host.error .status{background-color:var(--mecx-color-error-700)}:host.question .status{background-color:var(--mecx-color-question-main)}:host.info .status{background-color:var(--mecx-color-info)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
5960
|
+
}
|
|
5961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyStatusComponent, decorators: [{
|
|
5962
|
+
type: Component,
|
|
5963
|
+
args: [{ selector: 'monkey-status', imports: [CommonModule], host: {
|
|
5964
|
+
'data-testid': 'monkey-status',
|
|
5965
|
+
'[attr.id]': 'id',
|
|
5966
|
+
'[id]': 'id'
|
|
5967
|
+
}, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:var(--mecx-color-success-main)}:host.warning .status{background-color:var(--mecx-color-warning-main)}:host.error .status{background-color:var(--mecx-color-error-700)}:host.question .status{background-color:var(--mecx-color-question-main)}:host.info .status{background-color:var(--mecx-color-info)}\n"] }]
|
|
5968
|
+
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
5969
|
+
type: HostBinding,
|
|
5970
|
+
args: ['class']
|
|
5971
|
+
}], id: [{
|
|
5972
|
+
type: Input
|
|
5973
|
+
}] } });
|
|
5974
|
+
|
|
5975
|
+
/** ************************
|
|
5976
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
5977
|
+
* This style guide was developed by Monkey Exchange Team
|
|
5978
|
+
* MIT Licence
|
|
5979
|
+
************************* */
|
|
5980
|
+
|
|
6287
5981
|
/** ************************
|
|
6288
5982
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
6289
5983
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -7989,6 +7683,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7989
7683
|
}]
|
|
7990
7684
|
}] });
|
|
7991
7685
|
|
|
7686
|
+
/** ************************
|
|
7687
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
7688
|
+
* This style guide was developed by Monkey Exchange Team
|
|
7689
|
+
* MIT Licence
|
|
7690
|
+
************************* */
|
|
7691
|
+
class MonkeyUserProfileButtonComponent {
|
|
7692
|
+
get id() {
|
|
7693
|
+
return this._id;
|
|
7694
|
+
}
|
|
7695
|
+
set id(value) {
|
|
7696
|
+
this._id = value || this._uid;
|
|
7697
|
+
}
|
|
7698
|
+
constructor() {
|
|
7699
|
+
this._uid = inject(IdGenerator).getId('monkey-user-profile-button-');
|
|
7700
|
+
this.elementRef = inject(ElementRef);
|
|
7701
|
+
this.size = 'xs';
|
|
7702
|
+
this.iconName = '';
|
|
7703
|
+
this.open = false;
|
|
7704
|
+
this.handleClose = () => {
|
|
7705
|
+
this.open = false;
|
|
7706
|
+
};
|
|
7707
|
+
// eslint-disable-next-line no-self-assign
|
|
7708
|
+
this.id = this.id;
|
|
7709
|
+
}
|
|
7710
|
+
onClick(event) {
|
|
7711
|
+
event.stopPropagation();
|
|
7712
|
+
event.preventDefault();
|
|
7713
|
+
this.open = true;
|
|
7714
|
+
}
|
|
7715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyUserProfileButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7716
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: MonkeyUserProfileButtonComponent, isStandalone: true, selector: "monkey-user-profile-button", inputs: { size: "size", name: "name", iconName: "iconName", id: "id" }, host: { attributes: { "data-testid": "monkey-user-profile-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id", "class.open": "open", "class": "this.size" } }, ngImport: i0, template: `
|
|
7717
|
+
<monkey-avatar [size]="size" [src]="iconName ? { iconName } : { name }" />
|
|
7718
|
+
<div class="lh-24 text-truncate flex-grow-1 fs-xxs text-gray-900">
|
|
7719
|
+
{{ name }}
|
|
7720
|
+
</div>
|
|
7721
|
+
<util-icon class="arrow" name="arrowDown" />
|
|
7722
|
+
|
|
7723
|
+
<ng-template
|
|
7724
|
+
[monkeyPopover]="open"
|
|
7725
|
+
[monkeyPopoverTarget]="elementRef.nativeElement"
|
|
7726
|
+
[monkeyPopoverClosed]="handleClose"
|
|
7727
|
+
monkeyPopoverDir="rtl"
|
|
7728
|
+
[monkeyPopoverHideHeader]="true"
|
|
7729
|
+
>
|
|
7730
|
+
<div class="context-menu" (click)="open = false">
|
|
7731
|
+
<ng-content />
|
|
7732
|
+
</div>
|
|
7733
|
+
</ng-template>
|
|
7734
|
+
`, isInline: true, styles: ["monkey-user-profile-button{padding:4px;background:var(--mecx-color-gray-100);border-radius:8px;max-width:140px;cursor:pointer;display:inline-flex;gap:4px;align-items:center}monkey-user-profile-button.open .arrow{transform:rotate(180deg)}monkey-user-profile-button monkey-avatar{background-color:var(--mecx-color-white)}monkey-user-profile-button.sm{max-width:150px}monkey-user-profile-button.md{border-radius:12px;max-width:160px}monkey-user-profile-button.lg{border-radius:16px;max-width:170px}monkey-user-profile-button .menu{min-width:150px}monkey-user-profile-button monkey-button span{text-decoration:none}\n"], dependencies: [{ kind: "component", type: MonkeyAvatarComponent, selector: "monkey-avatar", inputs: ["size", "src", "id"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyPopoverDirective, selector: "[monkeyPopover]", inputs: ["monkeyPopover", "monkeyPopoverClosed", "monkeyPopoverTarget", "monkeyPopoverMinwidth", "monkeyPopoverBackdrop", "monkeyPopoverWatch", "monkeyPopoverDir", "monkeyPopoverContextmenu", "monkeyPopoverHeight", "monkeyPopoverTitle", "monkeyPopoverActions", "monkeyPopoverHideClose", "monkeyPopoverHideHeader", "monkeyPopoverHideActions"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
7735
|
+
}
|
|
7736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyUserProfileButtonComponent, decorators: [{
|
|
7737
|
+
type: Component,
|
|
7738
|
+
args: [{ encapsulation: ViewEncapsulation.None, imports: [MonkeyAvatarComponent, UtilIconComponent, MonkeyDirectivesModule], selector: 'monkey-user-profile-button', template: `
|
|
7739
|
+
<monkey-avatar [size]="size" [src]="iconName ? { iconName } : { name }" />
|
|
7740
|
+
<div class="lh-24 text-truncate flex-grow-1 fs-xxs text-gray-900">
|
|
7741
|
+
{{ name }}
|
|
7742
|
+
</div>
|
|
7743
|
+
<util-icon class="arrow" name="arrowDown" />
|
|
7744
|
+
|
|
7745
|
+
<ng-template
|
|
7746
|
+
[monkeyPopover]="open"
|
|
7747
|
+
[monkeyPopoverTarget]="elementRef.nativeElement"
|
|
7748
|
+
[monkeyPopoverClosed]="handleClose"
|
|
7749
|
+
monkeyPopoverDir="rtl"
|
|
7750
|
+
[monkeyPopoverHideHeader]="true"
|
|
7751
|
+
>
|
|
7752
|
+
<div class="context-menu" (click)="open = false">
|
|
7753
|
+
<ng-content />
|
|
7754
|
+
</div>
|
|
7755
|
+
</ng-template>
|
|
7756
|
+
`, host: {
|
|
7757
|
+
'data-testid': 'monkey-user-profile-button',
|
|
7758
|
+
'[attr.id]': 'id',
|
|
7759
|
+
'[id]': 'id',
|
|
7760
|
+
'[class.open]': 'open'
|
|
7761
|
+
}, styles: ["monkey-user-profile-button{padding:4px;background:var(--mecx-color-gray-100);border-radius:8px;max-width:140px;cursor:pointer;display:inline-flex;gap:4px;align-items:center}monkey-user-profile-button.open .arrow{transform:rotate(180deg)}monkey-user-profile-button monkey-avatar{background-color:var(--mecx-color-white)}monkey-user-profile-button.sm{max-width:150px}monkey-user-profile-button.md{border-radius:12px;max-width:160px}monkey-user-profile-button.lg{border-radius:16px;max-width:170px}monkey-user-profile-button .menu{min-width:150px}monkey-user-profile-button monkey-button span{text-decoration:none}\n"] }]
|
|
7762
|
+
}], ctorParameters: () => [], propDecorators: { size: [{
|
|
7763
|
+
type: HostBinding,
|
|
7764
|
+
args: ['class']
|
|
7765
|
+
}, {
|
|
7766
|
+
type: Input
|
|
7767
|
+
}], name: [{
|
|
7768
|
+
type: Input,
|
|
7769
|
+
args: [{ required: true }]
|
|
7770
|
+
}], iconName: [{
|
|
7771
|
+
type: Input
|
|
7772
|
+
}], id: [{
|
|
7773
|
+
type: Input
|
|
7774
|
+
}], onClick: [{
|
|
7775
|
+
type: HostListener,
|
|
7776
|
+
args: ['click', ['$event']]
|
|
7777
|
+
}] } });
|
|
7778
|
+
|
|
7779
|
+
/** ************************
|
|
7780
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
7781
|
+
* This style guide was developed by Monkey Exchange Team
|
|
7782
|
+
* MIT Licence
|
|
7783
|
+
************************* */
|
|
7784
|
+
|
|
7992
7785
|
/** ************************
|
|
7993
7786
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
7994
7787
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -8128,5 +7921,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
8128
7921
|
* Generated bundle index. Do not edit.
|
|
8129
7922
|
*/
|
|
8130
7923
|
|
|
8131
|
-
export { MECX_COUNTRY_CODE, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, getCurrencySymbol };
|
|
7924
|
+
export { MECX_COUNTRY_CODE, MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MECX_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyErrorDirective, MonkeyFilterBarComponent, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDateRangeComponent, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeyStepComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStepperService, MonkeySuffixDirective, MonkeyTabComponent, MonkeyTabLinkDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyTabsComponent, MonkeyTabsModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, MonkeyUserProfileButtonComponent, getCurrencySymbol };
|
|
8132
7925
|
//# sourceMappingURL=monkey-style-guide-v2.mjs.map
|