monkey-style-guide-v2 0.0.30 → 0.0.32
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/input/_styles.scss +2 -3
- package/assets/scss/partials/_index.scss +1 -0
- package/assets/scss/partials/_popover.scss +3 -0
- package/assets/scss/partials/_skeleton-loading.scss +7 -1
- package/assets/scss/theme.scss +0 -1
- package/fesm2022/monkey-style-guide-v2.mjs +380 -56
- package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/{assets/scss/typography/_index.scss → lib/components/input-date-range/index.d.ts} +3 -4
- package/lib/components/input-date-range/input-date-range.component.d.ts +57 -0
- package/lib/components/option/option.component.d.ts +2 -7
- package/lib/components/select/select.component.d.ts +3 -5
- package/monkey-style-guide-v2-0.0.32.tgz +0 -0
- package/package.json +1 -1
- package/assets/scss/typography/_styles.scss +0 -194
- package/monkey-style-guide-v2-0.0.30.tgz +0 -0
|
@@ -2163,7 +2163,7 @@ class MonkeyFormFieldComponent {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2166
|
-
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{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.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 }); }
|
|
2166
|
+
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{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.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 }); }
|
|
2167
2167
|
}
|
|
2168
2168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyFormFieldComponent, decorators: [{
|
|
2169
2169
|
type: Component,
|
|
@@ -2176,7 +2176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2176
2176
|
'[attr.id]': 'id',
|
|
2177
2177
|
'[id]': 'id',
|
|
2178
2178
|
'[class]': 'size'
|
|
2179
|
-
}, 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{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.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"] }]
|
|
2179
|
+
}, 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{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.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"] }]
|
|
2180
2180
|
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
2181
2181
|
type: Input
|
|
2182
2182
|
}], hideAction: [{
|
|
@@ -3001,10 +3001,14 @@ class MonkeyDateRangeComponent {
|
|
|
3001
3001
|
this.handledEndDate = val;
|
|
3002
3002
|
}
|
|
3003
3003
|
set minDate(val) {
|
|
3004
|
-
|
|
3004
|
+
if (val) {
|
|
3005
|
+
this.handledMinDate = parseStringDate(val);
|
|
3006
|
+
}
|
|
3005
3007
|
}
|
|
3006
3008
|
set maxDate(val) {
|
|
3007
|
-
|
|
3009
|
+
if (val) {
|
|
3010
|
+
this.handledMaxDate = parseStringDate(val);
|
|
3011
|
+
}
|
|
3008
3012
|
}
|
|
3009
3013
|
get id() {
|
|
3010
3014
|
return this._id;
|
|
@@ -3127,6 +3131,9 @@ class MonkeyDateRangeComponent {
|
|
|
3127
3131
|
this.handledStartDate = parseStringDate(baseDate);
|
|
3128
3132
|
this.handledEndDate = parseStringDate(endDate);
|
|
3129
3133
|
}
|
|
3134
|
+
if (this.hideActions) {
|
|
3135
|
+
this.onSubmit();
|
|
3136
|
+
}
|
|
3130
3137
|
}
|
|
3131
3138
|
onChangeInputStartDate(event) {
|
|
3132
3139
|
this.handleInputChange(event, true);
|
|
@@ -3155,7 +3162,7 @@ class MonkeyDateRangeComponent {
|
|
|
3155
3162
|
this.secondCalendar = calendars.secondCalendar;
|
|
3156
3163
|
}
|
|
3157
3164
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3158
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyDateRangeComponent, isStandalone: true, selector: "monkey-date-range", inputs: { startDate: "startDate", endDate: "endDate", hideQuickAction: ["hideQuickAction", "hideQuickAction", booleanAttribute], hideHeader: ["hideHeader", "hideHeader", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute], hideSecondCalendar: ["hideSecondCalendar", "hideSecondCalendar", booleanAttribute], allowFastActionOnHeader: ["allowFastActionOnHeader", "allowFastActionOnHeader", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onCancel: "onCancel", onDate: "onDate" }, host: { attributes: { "data-testid": "monkey-date-range" }, listeners: { "window:resize": "onResize($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-group{width:100%;display:inline-flex}:host .container-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-group .container{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { 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: 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: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyErrorDirective, selector: "monkey-error" }, { kind: "directive", type: MonkeyLabelDirective, selector: "monkey-label" }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "color", "size", "type", "id"] }, { kind: "component", type: MonkeyDateRangeMonthComponent, selector: "monkey-date-range-month", inputs: ["month", "year", "startDate", "endDate", "hidePrevious", "hideNext", "minDate", "maxDate", "id"], outputs: ["onNavigate", "onDate"] }, { kind: "component", type: MonkeyDateRangeQuickActionsComponent, selector: "monkey-date-range-quick-actions", inputs: ["id"], outputs: ["onChange"] }] }); }
|
|
3165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyDateRangeComponent, isStandalone: true, selector: "monkey-date-range", inputs: { startDate: "startDate", endDate: "endDate", hideQuickAction: ["hideQuickAction", "hideQuickAction", booleanAttribute], hideHeader: ["hideHeader", "hideHeader", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute], hideSecondCalendar: ["hideSecondCalendar", "hideSecondCalendar", booleanAttribute], allowFastActionOnHeader: ["allowFastActionOnHeader", "allowFastActionOnHeader", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onCancel: "onCancel", onDate: "onDate" }, host: { attributes: { "data-testid": "monkey-date-range" }, listeners: { "window:resize": "onResize($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-date-range-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container-date-range\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-date-range-group{width:100%;display:inline-flex}:host .container-date-range-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-date-range-group .container-date-range{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { 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: 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: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyErrorDirective, selector: "monkey-error" }, { kind: "directive", type: MonkeyLabelDirective, selector: "monkey-label" }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "color", "size", "type", "id"] }, { kind: "component", type: MonkeyDateRangeMonthComponent, selector: "monkey-date-range-month", inputs: ["month", "year", "startDate", "endDate", "hidePrevious", "hideNext", "minDate", "maxDate", "id"], outputs: ["onNavigate", "onDate"] }, { kind: "component", type: MonkeyDateRangeQuickActionsComponent, selector: "monkey-date-range-quick-actions", inputs: ["id"], outputs: ["onChange"] }] }); }
|
|
3159
3166
|
}
|
|
3160
3167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyDateRangeComponent, decorators: [{
|
|
3161
3168
|
type: Component,
|
|
@@ -3172,7 +3179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3172
3179
|
'data-testid': 'monkey-date-range',
|
|
3173
3180
|
'[attr.id]': 'id',
|
|
3174
3181
|
'[id]': 'id'
|
|
3175
|
-
}, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-group{width:100%;display:inline-flex}:host .container-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-group .container{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"] }]
|
|
3182
|
+
}, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-date-range-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container-date-range\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-date-range-group{width:100%;display:inline-flex}:host .container-date-range-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-date-range-group .container-date-range{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"] }]
|
|
3176
3183
|
}], ctorParameters: () => [], propDecorators: { startDate: [{
|
|
3177
3184
|
type: Input
|
|
3178
3185
|
}], endDate: [{
|
|
@@ -3489,6 +3496,266 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3489
3496
|
* MIT Licence
|
|
3490
3497
|
************************* */
|
|
3491
3498
|
|
|
3499
|
+
/** ************************
|
|
3500
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
3501
|
+
* This style guide was developed by Monkey Exchange Team
|
|
3502
|
+
* MIT Licence
|
|
3503
|
+
************************* */
|
|
3504
|
+
class MonkeyInputDateRangeComponent {
|
|
3505
|
+
get disabled() {
|
|
3506
|
+
if (this.ngControl && this.ngControl.disabled !== null) {
|
|
3507
|
+
return this.ngControl.disabled;
|
|
3508
|
+
}
|
|
3509
|
+
return this._disabled;
|
|
3510
|
+
}
|
|
3511
|
+
set disabled(value) {
|
|
3512
|
+
this._disabled = value;
|
|
3513
|
+
if (this.focused) {
|
|
3514
|
+
this.focused = false;
|
|
3515
|
+
this.stateChanges.next();
|
|
3516
|
+
}
|
|
3517
|
+
}
|
|
3518
|
+
get required() {
|
|
3519
|
+
return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
|
|
3520
|
+
}
|
|
3521
|
+
set required(value) {
|
|
3522
|
+
this._required = value;
|
|
3523
|
+
this.stateChanges.next();
|
|
3524
|
+
}
|
|
3525
|
+
set value(value) {
|
|
3526
|
+
if (this._value !== value && value !== undefined) {
|
|
3527
|
+
this._value = value;
|
|
3528
|
+
this.handleValue(value);
|
|
3529
|
+
this._onChange(value);
|
|
3530
|
+
this._onTouched(value);
|
|
3531
|
+
}
|
|
3532
|
+
}
|
|
3533
|
+
get value() {
|
|
3534
|
+
return this._value;
|
|
3535
|
+
}
|
|
3536
|
+
constructor(formField) {
|
|
3537
|
+
this.formField = formField;
|
|
3538
|
+
this.tabIndex = 0;
|
|
3539
|
+
this.minDate = '';
|
|
3540
|
+
this.maxDate = '';
|
|
3541
|
+
this._disabled = false;
|
|
3542
|
+
this._value = null;
|
|
3543
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
3544
|
+
this.idGenerator = inject(IdGenerator);
|
|
3545
|
+
this.id = this.idGenerator.getId('monkey-input-date-range-');
|
|
3546
|
+
this.focused = false;
|
|
3547
|
+
this.type = 'input-date-range';
|
|
3548
|
+
this.stateChanges = new Subject();
|
|
3549
|
+
this._elementRef = inject(ElementRef);
|
|
3550
|
+
this._onChange = () => { };
|
|
3551
|
+
this._onTouched = () => { };
|
|
3552
|
+
this.showPopOver = false;
|
|
3553
|
+
this.startDate = '';
|
|
3554
|
+
this.endDate = '';
|
|
3555
|
+
this.handledMinDate = '';
|
|
3556
|
+
this.handledMaxDate = '';
|
|
3557
|
+
this.closePopOver = () => {
|
|
3558
|
+
this.showPopOver = false;
|
|
3559
|
+
this.validateValue();
|
|
3560
|
+
};
|
|
3561
|
+
if (this.ngControl) {
|
|
3562
|
+
this.ngControl.valueAccessor = this;
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
get elementTarget() {
|
|
3566
|
+
if (this.formField?.elementRef) {
|
|
3567
|
+
return this.formField?.elementRef.nativeElement.querySelector('.mecx-form-field-body');
|
|
3568
|
+
}
|
|
3569
|
+
return this._elementRef.nativeElement;
|
|
3570
|
+
}
|
|
3571
|
+
ngAfterContentInit() { }
|
|
3572
|
+
ngOnChanges(changes) { }
|
|
3573
|
+
ngOnDestroy() { }
|
|
3574
|
+
onContainerClick(event) {
|
|
3575
|
+
event.preventDefault();
|
|
3576
|
+
this.onOpenPopover();
|
|
3577
|
+
}
|
|
3578
|
+
_onFocus() {
|
|
3579
|
+
if (!this.disabled) {
|
|
3580
|
+
this.focused = true;
|
|
3581
|
+
this._onTouched();
|
|
3582
|
+
this.stateChanges.next();
|
|
3583
|
+
}
|
|
3584
|
+
}
|
|
3585
|
+
_onBlur() {
|
|
3586
|
+
this.focused = false;
|
|
3587
|
+
this.stateChanges.next();
|
|
3588
|
+
}
|
|
3589
|
+
registerOnChange(fn) {
|
|
3590
|
+
this._onChange = fn;
|
|
3591
|
+
}
|
|
3592
|
+
registerOnTouched(fn) {
|
|
3593
|
+
this._onTouched = fn;
|
|
3594
|
+
}
|
|
3595
|
+
setDisabledState(isDisabled) {
|
|
3596
|
+
this.disabled = isDisabled;
|
|
3597
|
+
}
|
|
3598
|
+
handleValue(value) {
|
|
3599
|
+
try {
|
|
3600
|
+
const { startDate, endDate } = value || {
|
|
3601
|
+
startDate: '',
|
|
3602
|
+
endDate: ''
|
|
3603
|
+
};
|
|
3604
|
+
this.startDate = startDate;
|
|
3605
|
+
this.endDate = endDate;
|
|
3606
|
+
}
|
|
3607
|
+
catch (e) {
|
|
3608
|
+
// not to do
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
validateValue() {
|
|
3612
|
+
const { startDate, endDate } = this.value;
|
|
3613
|
+
if (!startDate || !endDate) {
|
|
3614
|
+
this.ngControl?.control?.setErrors({
|
|
3615
|
+
dateRange: true
|
|
3616
|
+
});
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
writeValue(value) {
|
|
3620
|
+
if (this._value !== value && value !== undefined) {
|
|
3621
|
+
this._value = value;
|
|
3622
|
+
this.handleValue(value);
|
|
3623
|
+
this._onChange(value);
|
|
3624
|
+
this._onTouched(value);
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
onOpenPopover() {
|
|
3628
|
+
if (!this.disabled) {
|
|
3629
|
+
this.showPopOver = true;
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
onHandleDate(event) {
|
|
3633
|
+
try {
|
|
3634
|
+
this.value = null;
|
|
3635
|
+
const { startDate, endDate } = event;
|
|
3636
|
+
this.value = event;
|
|
3637
|
+
if (startDate && endDate) {
|
|
3638
|
+
this.closePopOver();
|
|
3639
|
+
}
|
|
3640
|
+
}
|
|
3641
|
+
catch (e) {
|
|
3642
|
+
// not to do
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyInputDateRangeComponent, deps: [{ token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3646
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.14", type: MonkeyInputDateRangeComponent, isStandalone: true, selector: "monkey-input-date-range", inputs: { placeholder: "placeholder", title: "title", tabIndex: "tabIndex", minDate: "minDate", maxDate: "maxDate", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-input-date-range'", "class.mecx-input-date-range-disabled": "_disabled", "class.mecx-input-date-range-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-input-date-range" }, providers: [
|
|
3647
|
+
// eslint-disable-next-line no-use-before-define
|
|
3648
|
+
{ provide: MonkeyFormFieldControl, useExisting: MonkeyInputDateRangeComponent }
|
|
3649
|
+
], usesOnChanges: true, ngImport: i0, template: `
|
|
3650
|
+
<span #popoverTarget (click)="onOpenPopover()">
|
|
3651
|
+
<ng-container *ngIf="startDate; else noDate">
|
|
3652
|
+
{{ startDate | date }} - {{ endDate | date }}
|
|
3653
|
+
</ng-container>
|
|
3654
|
+
<ng-template #noDate>
|
|
3655
|
+
{{ placeholder }}
|
|
3656
|
+
</ng-template>
|
|
3657
|
+
</span>
|
|
3658
|
+
|
|
3659
|
+
<ng-template
|
|
3660
|
+
[monkeyPopover]="showPopOver"
|
|
3661
|
+
[monkeyPopoverTarget]="elementTarget"
|
|
3662
|
+
[monkeyPopoverClosed]="closePopOver"
|
|
3663
|
+
monkeyPopoverDir="ltr"
|
|
3664
|
+
[monkeyPopoverTitle]="title"
|
|
3665
|
+
>
|
|
3666
|
+
<monkey-date-range
|
|
3667
|
+
hideHeader
|
|
3668
|
+
hideActions
|
|
3669
|
+
[startDate]="startDate"
|
|
3670
|
+
[endDate]="endDate"
|
|
3671
|
+
(onDate)="onHandleDate($event)"
|
|
3672
|
+
[minDate]="minDate"
|
|
3673
|
+
[maxDate]="maxDate"
|
|
3674
|
+
>
|
|
3675
|
+
</monkey-date-range>
|
|
3676
|
+
</ng-template>
|
|
3677
|
+
`, isInline: true, styles: [":host{display:inline-flex;width:100%;min-width:0}:host.mecx-input-date-range-disabled{pointer-events:none;color:var(--mecx-color-gray-400)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { 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: MonkeyDateRangeComponent, selector: "monkey-date-range", inputs: ["startDate", "endDate", "hideQuickAction", "hideHeader", "hideActions", "hideSecondCalendar", "allowFastActionOnHeader", "minDate", "maxDate", "id"], outputs: ["onCancel", "onDate"] }] }); }
|
|
3678
|
+
}
|
|
3679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyInputDateRangeComponent, decorators: [{
|
|
3680
|
+
type: Component,
|
|
3681
|
+
args: [{ selector: 'monkey-input-date-range', imports: [
|
|
3682
|
+
CommonModule,
|
|
3683
|
+
FormsModule,
|
|
3684
|
+
ReactiveFormsModule,
|
|
3685
|
+
MonkeyFormFieldModule,
|
|
3686
|
+
MonkeyDirectivesModule,
|
|
3687
|
+
MonkeyDateRangeComponent
|
|
3688
|
+
], template: `
|
|
3689
|
+
<span #popoverTarget (click)="onOpenPopover()">
|
|
3690
|
+
<ng-container *ngIf="startDate; else noDate">
|
|
3691
|
+
{{ startDate | date }} - {{ endDate | date }}
|
|
3692
|
+
</ng-container>
|
|
3693
|
+
<ng-template #noDate>
|
|
3694
|
+
{{ placeholder }}
|
|
3695
|
+
</ng-template>
|
|
3696
|
+
</span>
|
|
3697
|
+
|
|
3698
|
+
<ng-template
|
|
3699
|
+
[monkeyPopover]="showPopOver"
|
|
3700
|
+
[monkeyPopoverTarget]="elementTarget"
|
|
3701
|
+
[monkeyPopoverClosed]="closePopOver"
|
|
3702
|
+
monkeyPopoverDir="ltr"
|
|
3703
|
+
[monkeyPopoverTitle]="title"
|
|
3704
|
+
>
|
|
3705
|
+
<monkey-date-range
|
|
3706
|
+
hideHeader
|
|
3707
|
+
hideActions
|
|
3708
|
+
[startDate]="startDate"
|
|
3709
|
+
[endDate]="endDate"
|
|
3710
|
+
(onDate)="onHandleDate($event)"
|
|
3711
|
+
[minDate]="minDate"
|
|
3712
|
+
[maxDate]="maxDate"
|
|
3713
|
+
>
|
|
3714
|
+
</monkey-date-range>
|
|
3715
|
+
</ng-template>
|
|
3716
|
+
`, providers: [
|
|
3717
|
+
// eslint-disable-next-line no-use-before-define
|
|
3718
|
+
{ provide: MonkeyFormFieldControl, useExisting: MonkeyInputDateRangeComponent }
|
|
3719
|
+
], host: {
|
|
3720
|
+
'[attr.data-testid]': "'monkey-input-date-range'",
|
|
3721
|
+
class: 'mecx-input-date-range',
|
|
3722
|
+
'[class.mecx-input-date-range-disabled]': '_disabled',
|
|
3723
|
+
'[class.mecx-input-date-range-focused]': 'focused',
|
|
3724
|
+
'[attr.id]': 'id',
|
|
3725
|
+
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3726
|
+
'(focus)': '_onFocus()',
|
|
3727
|
+
'(blur)': '_onBlur()'
|
|
3728
|
+
}, styles: [":host{display:inline-flex;width:100%;min-width:0}:host.mecx-input-date-range-disabled{pointer-events:none;color:var(--mecx-color-gray-400)}\n"] }]
|
|
3729
|
+
}], ctorParameters: () => [{ type: MonkeyFormFieldComponent, decorators: [{
|
|
3730
|
+
type: Optional
|
|
3731
|
+
}] }], propDecorators: { placeholder: [{
|
|
3732
|
+
type: Input,
|
|
3733
|
+
args: [{ required: true }]
|
|
3734
|
+
}], title: [{
|
|
3735
|
+
type: Input,
|
|
3736
|
+
args: [{ required: true }]
|
|
3737
|
+
}], tabIndex: [{
|
|
3738
|
+
type: Input
|
|
3739
|
+
}], minDate: [{
|
|
3740
|
+
type: Input
|
|
3741
|
+
}], maxDate: [{
|
|
3742
|
+
type: Input
|
|
3743
|
+
}], disabled: [{
|
|
3744
|
+
type: Input,
|
|
3745
|
+
args: [{ transform: booleanAttribute }]
|
|
3746
|
+
}], required: [{
|
|
3747
|
+
type: Input,
|
|
3748
|
+
args: [{ transform: booleanAttribute }]
|
|
3749
|
+
}], value: [{
|
|
3750
|
+
type: Input
|
|
3751
|
+
}] } });
|
|
3752
|
+
|
|
3753
|
+
/** ************************
|
|
3754
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
3755
|
+
* This style guide was developed by Monkey Exchange Team
|
|
3756
|
+
* MIT Licence
|
|
3757
|
+
************************* */
|
|
3758
|
+
|
|
3492
3759
|
/** ************************
|
|
3493
3760
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
3494
3761
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -3497,6 +3764,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3497
3764
|
class MonkeyOptionComponent {
|
|
3498
3765
|
constructor() {
|
|
3499
3766
|
this.idGenerator = inject(IdGenerator);
|
|
3767
|
+
this.value = input();
|
|
3500
3768
|
this.disabled = false;
|
|
3501
3769
|
this.type = 'select';
|
|
3502
3770
|
this.selected = false;
|
|
@@ -3525,11 +3793,25 @@ class MonkeyOptionComponent {
|
|
|
3525
3793
|
}
|
|
3526
3794
|
}
|
|
3527
3795
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3528
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3796
|
+
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: `
|
|
3797
|
+
@if (type === 'checkbox') {
|
|
3798
|
+
<span class="mecx-option-checkbox">
|
|
3799
|
+
<util-icon class="icon" name="check" />
|
|
3800
|
+
</span>
|
|
3801
|
+
}
|
|
3802
|
+
<div #content><ng-content /></div>
|
|
3803
|
+
`, isInline: true, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option.select:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.select.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color:var(--mecx-color-white);cursor:default}monkey-option.select.mecx-option-selected{color:var(--mecx-color-theme-contrast-main);background-color:var(--mecx-color-theme-main)}.ng-animating monkey-option.select.mecx-option-selected{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.radio{display:flex;align-items:center;gap:10px;padding:8px 24px 8px 0;cursor:pointer;border-radius:4px;-webkit-user-select:none;user-select:none;position:relative}monkey-option.radio:before{content:\"\";width:20px;height:20px;border:2px solid var(--mecx-color-gray-600);border-radius:800px;box-sizing:border-box;background-color:var(--mecx-color-white)}monkey-option.radio:focus{outline:unset;outline-offset:1px}monkey-option.radio:focus:before{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-option.radio.mecx-option-selected:before{border:5px solid var(--mecx-color-theme-main)}monkey-option.radio.mecx-option-disabled{opacity:.5;pointer-events:none}monkey-option.radio.mecx-option-disabled:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-option.checkbox{display:flex;align-items:center;gap:10px;padding:8px 24px 8px 8px;cursor:pointer;border-radius:4px;-webkit-user-select:none;user-select:none;position:relative}monkey-option.checkbox:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.checkbox .mecx-option-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;flex-shrink:0}monkey-option.checkbox .mecx-option-checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}monkey-option.checkbox.mecx-option-selected .mecx-option-checkbox{border:none;background-color:var(--mecx-color-theme-main)}monkey-option.checkbox.mecx-option-disabled{opacity:.5;pointer-events:none}monkey-option.checkbox.mecx-option-disabled .mecx-option-checkbox{outline:unset;outline-offset:unset}monkey-option.checkbox:focus{outline:unset;outline-offset:1px}monkey-option.checkbox:focus .mecx-option-checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3529
3804
|
}
|
|
3530
3805
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyOptionComponent, decorators: [{
|
|
3531
3806
|
type: Component,
|
|
3532
|
-
args: [{ selector: 'monkey-option', standalone: true,
|
|
3807
|
+
args: [{ selector: 'monkey-option', standalone: true, imports: [CommonModule, UtilIconComponent], template: `
|
|
3808
|
+
@if (type === 'checkbox') {
|
|
3809
|
+
<span class="mecx-option-checkbox">
|
|
3810
|
+
<util-icon class="icon" name="check" />
|
|
3811
|
+
</span>
|
|
3812
|
+
}
|
|
3813
|
+
<div #content><ng-content /></div>
|
|
3814
|
+
`, encapsulation: ViewEncapsulation.None, host: {
|
|
3533
3815
|
'data-testid': 'monkey-option',
|
|
3534
3816
|
'[attr.id]': 'id',
|
|
3535
3817
|
class: 'mecx-option',
|
|
@@ -3537,12 +3819,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3537
3819
|
'[class.mecx-option-selected]': 'selected',
|
|
3538
3820
|
'[attr.tabindex]': 'disabled ? -1 : tabIndex',
|
|
3539
3821
|
'[class]': 'type'
|
|
3540
|
-
}, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option.select:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.select.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color
|
|
3822
|
+
}, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option.select:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.select.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color:var(--mecx-color-white);cursor:default}monkey-option.select.mecx-option-selected{color:var(--mecx-color-theme-contrast-main);background-color:var(--mecx-color-theme-main)}.ng-animating monkey-option.select.mecx-option-selected{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.radio{display:flex;align-items:center;gap:10px;padding:8px 24px 8px 0;cursor:pointer;border-radius:4px;-webkit-user-select:none;user-select:none;position:relative}monkey-option.radio:before{content:\"\";width:20px;height:20px;border:2px solid var(--mecx-color-gray-600);border-radius:800px;box-sizing:border-box;background-color:var(--mecx-color-white)}monkey-option.radio:focus{outline:unset;outline-offset:1px}monkey-option.radio:focus:before{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-option.radio.mecx-option-selected:before{border:5px solid var(--mecx-color-theme-main)}monkey-option.radio.mecx-option-disabled{opacity:.5;pointer-events:none}monkey-option.radio.mecx-option-disabled:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-option.checkbox{display:flex;align-items:center;gap:10px;padding:8px 24px 8px 8px;cursor:pointer;border-radius:4px;-webkit-user-select:none;user-select:none;position:relative}monkey-option.checkbox:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.checkbox .mecx-option-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;flex-shrink:0}monkey-option.checkbox .mecx-option-checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}monkey-option.checkbox.mecx-option-selected .mecx-option-checkbox{border:none;background-color:var(--mecx-color-theme-main)}monkey-option.checkbox.mecx-option-disabled{opacity:.5;pointer-events:none}monkey-option.checkbox.mecx-option-disabled .mecx-option-checkbox{outline:unset;outline-offset:unset}monkey-option.checkbox:focus{outline:unset;outline-offset:1px}monkey-option.checkbox:focus .mecx-option-checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}\n"] }]
|
|
3541
3823
|
}], propDecorators: { _content: [{
|
|
3542
3824
|
type: ViewChild,
|
|
3543
3825
|
args: ['content', { static: true }]
|
|
3544
|
-
}], value: [{
|
|
3545
|
-
type: Input
|
|
3546
3826
|
}], disabled: [{
|
|
3547
3827
|
type: Input,
|
|
3548
3828
|
args: [{ transform: booleanAttribute }]
|
|
@@ -3604,12 +3884,11 @@ class MonkeySelectComponent {
|
|
|
3604
3884
|
this.formField = formField;
|
|
3605
3885
|
this.tabIndex = 0;
|
|
3606
3886
|
this.onChange = new EventEmitter();
|
|
3607
|
-
this.onSearch = new EventEmitter();
|
|
3608
3887
|
this.placeholder = '';
|
|
3609
3888
|
this.loading = false;
|
|
3610
3889
|
this.showSearch = true;
|
|
3611
3890
|
this.searchPlaceholder = '';
|
|
3612
|
-
this.
|
|
3891
|
+
this.type = 'select';
|
|
3613
3892
|
this._value = null;
|
|
3614
3893
|
this.labelSelected = '';
|
|
3615
3894
|
this.overlayRef = null;
|
|
@@ -3623,7 +3902,6 @@ class MonkeySelectComponent {
|
|
|
3623
3902
|
this.id = this.idGenerator.getId('monkey-select-');
|
|
3624
3903
|
this.percent = false;
|
|
3625
3904
|
this.stateChanges = new Subject();
|
|
3626
|
-
this.type = '';
|
|
3627
3905
|
this.searchHandle = new EventEmitter();
|
|
3628
3906
|
this.searchDictionary = inject(MonkeyDictionaryService).get('NO-DATA');
|
|
3629
3907
|
this.loadingDictionary = inject(MonkeyDictionaryService).get('LOADING');
|
|
@@ -3648,20 +3926,33 @@ class MonkeySelectComponent {
|
|
|
3648
3926
|
}
|
|
3649
3927
|
changeSelected() {
|
|
3650
3928
|
setTimeout(() => {
|
|
3651
|
-
if (this.options)
|
|
3929
|
+
if (!this.options)
|
|
3930
|
+
return;
|
|
3931
|
+
if (this.type === 'checkbox') {
|
|
3932
|
+
const selectedValues = this.getComparationValue();
|
|
3652
3933
|
this.options.forEach((opt) => {
|
|
3653
|
-
|
|
3934
|
+
if (!opt.disabled) {
|
|
3935
|
+
opt.selected = selectedValues.includes(String(opt.value()));
|
|
3936
|
+
}
|
|
3937
|
+
});
|
|
3938
|
+
}
|
|
3939
|
+
else {
|
|
3940
|
+
this.options.forEach((opt) => {
|
|
3941
|
+
opt.selected = String(opt.value()) === this.value;
|
|
3654
3942
|
});
|
|
3655
|
-
this.updateSelectedLabel();
|
|
3656
3943
|
}
|
|
3657
3944
|
this.changeDetectorRef.markForCheck();
|
|
3658
3945
|
});
|
|
3659
3946
|
}
|
|
3660
3947
|
initializeOptions() {
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
option.
|
|
3664
|
-
|
|
3948
|
+
setTimeout(() => {
|
|
3949
|
+
this.options.forEach((option) => {
|
|
3950
|
+
option.type = this.type;
|
|
3951
|
+
if (!option.action) {
|
|
3952
|
+
option.action = this.selectOption.bind(this, option);
|
|
3953
|
+
}
|
|
3954
|
+
});
|
|
3955
|
+
this.changeDetectorRef.detectChanges();
|
|
3665
3956
|
});
|
|
3666
3957
|
}
|
|
3667
3958
|
openDropdown() {
|
|
@@ -3672,13 +3963,11 @@ class MonkeySelectComponent {
|
|
|
3672
3963
|
}
|
|
3673
3964
|
}
|
|
3674
3965
|
closeDropdown() {
|
|
3675
|
-
this.changeDetectorRef.markForCheck();
|
|
3676
3966
|
this.isOpen = false;
|
|
3677
3967
|
this.focused = false;
|
|
3678
3968
|
this.formField.control.disableToBeDirty = false;
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
}
|
|
3969
|
+
this.searchData = '';
|
|
3970
|
+
this.changeDetectorRef.markForCheck();
|
|
3682
3971
|
}
|
|
3683
3972
|
closeOverlay() {
|
|
3684
3973
|
if (this.overlayRef) {
|
|
@@ -3761,10 +4050,29 @@ class MonkeySelectComponent {
|
|
|
3761
4050
|
this.initializeWithOverlay();
|
|
3762
4051
|
}
|
|
3763
4052
|
updateSelectedLabel() {
|
|
3764
|
-
|
|
3765
|
-
return
|
|
3766
|
-
|
|
3767
|
-
|
|
4053
|
+
if (!this.options)
|
|
4054
|
+
return;
|
|
4055
|
+
if (this.type === 'checkbox') {
|
|
4056
|
+
const selectedValues = this.getComparationValue();
|
|
4057
|
+
const selectedOptions = this.options.filter((opt) => {
|
|
4058
|
+
return selectedValues.includes(String(opt.value()));
|
|
4059
|
+
});
|
|
4060
|
+
const maxToShow = 3;
|
|
4061
|
+
const displayContents = selectedOptions.slice(0, maxToShow).map((opt) => {
|
|
4062
|
+
return opt.displayContent;
|
|
4063
|
+
});
|
|
4064
|
+
const hasMore = selectedOptions.length > maxToShow;
|
|
4065
|
+
this.labelSelected = hasMore
|
|
4066
|
+
? `${displayContents.join(', ')}...`
|
|
4067
|
+
: displayContents.join(', ');
|
|
4068
|
+
}
|
|
4069
|
+
else {
|
|
4070
|
+
const selectedOption = this.options.find((opt) => {
|
|
4071
|
+
return String(opt.value()) === this.value;
|
|
4072
|
+
});
|
|
4073
|
+
this.labelSelected = selectedOption ? selectedOption.displayContent : '';
|
|
4074
|
+
}
|
|
4075
|
+
this.changeDetectorRef.markForCheck();
|
|
3768
4076
|
}
|
|
3769
4077
|
executeSearch(search) {
|
|
3770
4078
|
let found = false;
|
|
@@ -3787,21 +4095,24 @@ class MonkeySelectComponent {
|
|
|
3787
4095
|
overlayElement.scrollTop = 0;
|
|
3788
4096
|
}
|
|
3789
4097
|
}
|
|
4098
|
+
getComparationValue() {
|
|
4099
|
+
return (this.value || '')
|
|
4100
|
+
.split(',')
|
|
4101
|
+
.map((v) => {
|
|
4102
|
+
return v.trim();
|
|
4103
|
+
})
|
|
4104
|
+
.filter(Boolean);
|
|
4105
|
+
}
|
|
3790
4106
|
ngOnInit() {
|
|
3791
4107
|
this.searchHandle
|
|
3792
4108
|
.pipe(debounceTime(200), takeUntilDestroyed(this._destroyRef))
|
|
3793
4109
|
.subscribe((search) => {
|
|
3794
|
-
|
|
3795
|
-
this.onSearch.next(search);
|
|
3796
|
-
this.repositionScroll();
|
|
3797
|
-
}
|
|
3798
|
-
else {
|
|
3799
|
-
this.executeSearch(search);
|
|
3800
|
-
}
|
|
4110
|
+
this.executeSearch(search);
|
|
3801
4111
|
});
|
|
3802
4112
|
}
|
|
3803
4113
|
ngAfterContentInit() {
|
|
3804
4114
|
this.initializeOptions();
|
|
4115
|
+
this.updateSelectedLabel();
|
|
3805
4116
|
this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((resp) => {
|
|
3806
4117
|
this.updateSelectedLabel();
|
|
3807
4118
|
this.initializeOptions();
|
|
@@ -3825,20 +4136,36 @@ class MonkeySelectComponent {
|
|
|
3825
4136
|
}
|
|
3826
4137
|
}
|
|
3827
4138
|
selectOption(option) {
|
|
3828
|
-
if (
|
|
3829
|
-
|
|
3830
|
-
|
|
4139
|
+
if (option.disabled || this.disabled)
|
|
4140
|
+
return;
|
|
4141
|
+
if (this.type === 'checkbox') {
|
|
4142
|
+
const values = this.getComparationValue();
|
|
4143
|
+
const index = values.indexOf(`${option.value()}`);
|
|
4144
|
+
if (index === -1) {
|
|
4145
|
+
values.push(`${option.value()}`);
|
|
4146
|
+
option.selected = true;
|
|
4147
|
+
}
|
|
4148
|
+
else {
|
|
4149
|
+
values.splice(index, 1);
|
|
4150
|
+
option.selected = false;
|
|
4151
|
+
}
|
|
4152
|
+
this.value = values.join(',');
|
|
4153
|
+
}
|
|
4154
|
+
else {
|
|
4155
|
+
this.value = `${option.value()}`;
|
|
4156
|
+
this.options.forEach((opt) => {
|
|
4157
|
+
opt.selected = `${opt.value()}` === `${this.value}`;
|
|
4158
|
+
});
|
|
3831
4159
|
this.closeDropdown();
|
|
3832
4160
|
this._onChange(this.value);
|
|
3833
4161
|
this.onChange.emit(this.value);
|
|
3834
|
-
this.options.forEach((opt) => {
|
|
3835
|
-
opt.selected = opt.value === this.value;
|
|
3836
|
-
});
|
|
3837
4162
|
}
|
|
4163
|
+
this.updateSelectedLabel();
|
|
3838
4164
|
}
|
|
3839
4165
|
writeValue(value) {
|
|
3840
4166
|
this.value = value;
|
|
3841
4167
|
this.changeSelected();
|
|
4168
|
+
this.updateSelectedLabel();
|
|
3842
4169
|
}
|
|
3843
4170
|
onContainerClick(event) {
|
|
3844
4171
|
if (this.disabled)
|
|
@@ -3889,7 +4216,7 @@ class MonkeySelectComponent {
|
|
|
3889
4216
|
}
|
|
3890
4217
|
}
|
|
3891
4218
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeySelectComponent, deps: [{ token: i1$1.Overlay }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3892
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeySelectComponent, isStandalone: true, selector: "monkey-select", inputs: { tabIndex: "tabIndex", placeholder: "placeholder", loading: ["loading", "loading", booleanAttribute], showSearch: ["showSearch", "showSearch", booleanAttribute], searchPlaceholder: "searchPlaceholder",
|
|
4219
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeySelectComponent, isStandalone: true, selector: "monkey-select", inputs: { tabIndex: "tabIndex", placeholder: "placeholder", loading: ["loading", "loading", booleanAttribute], showSearch: ["showSearch", "showSearch", booleanAttribute], searchPlaceholder: "searchPlaceholder", type: "type", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-select" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-select-disabled": "_disabled", "class.mecx-select-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-select" }, providers: [
|
|
3893
4220
|
// eslint-disable-next-line no-use-before-define
|
|
3894
4221
|
{ provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
|
|
3895
4222
|
], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }, { propertyName: "overlayEl", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <util-icon class=\"mecx-select-icon\" name=\"arrowDown\" />\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <util-icon class=\"mecx-select-search-icon\" name=\"search\" />\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <util-icon class=\"mecx-select-search-no-data-icon\" name=\"searchFail\" />\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px 0 var(--mecx-color-box-shadow)}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], animations: [
|
|
@@ -3963,8 +4290,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3963
4290
|
type: Input
|
|
3964
4291
|
}], onChange: [{
|
|
3965
4292
|
type: Output
|
|
3966
|
-
}], onSearch: [{
|
|
3967
|
-
type: Output
|
|
3968
4293
|
}], placeholder: [{
|
|
3969
4294
|
type: Input,
|
|
3970
4295
|
args: [{ required: true }]
|
|
@@ -3976,9 +4301,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3976
4301
|
args: [{ transform: booleanAttribute }]
|
|
3977
4302
|
}], searchPlaceholder: [{
|
|
3978
4303
|
type: Input
|
|
3979
|
-
}],
|
|
3980
|
-
type: Input
|
|
3981
|
-
args: [{ transform: booleanAttribute }]
|
|
4304
|
+
}], type: [{
|
|
4305
|
+
type: Input
|
|
3982
4306
|
}], disabled: [{
|
|
3983
4307
|
type: Input,
|
|
3984
4308
|
args: [{ transform: booleanAttribute }]
|
|
@@ -4041,8 +4365,8 @@ class MonkeyInputPhoneComponent {
|
|
|
4041
4365
|
this.idGenerator = inject(IdGenerator);
|
|
4042
4366
|
this.countryCode = inject(MECX_COUNTRY_CODE);
|
|
4043
4367
|
this.locale = inject(LOCALE_ID);
|
|
4044
|
-
this.id = this.idGenerator.getId('monkey-input-
|
|
4045
|
-
this.inputId = this.idGenerator.getId('monkey-input-
|
|
4368
|
+
this.id = this.idGenerator.getId('monkey-input-phone-');
|
|
4369
|
+
this.inputId = this.idGenerator.getId('monkey-input-phone-input-');
|
|
4046
4370
|
this.focused = false;
|
|
4047
4371
|
this.type = 'input-phone';
|
|
4048
4372
|
this.stateChanges = new Subject();
|
|
@@ -4227,7 +4551,7 @@ class MonkeyInputPhoneComponent {
|
|
|
4227
4551
|
(blur)="_onBlur()"
|
|
4228
4552
|
[attr.id]="inputId"
|
|
4229
4553
|
/>
|
|
4230
|
-
`, isInline: true, styles: [":host{display:inline-flex;width:100%;min-width:0}:host monkey-select{width:164px;border-right:2px solid var(--mecx-color-gray-400)}:host.mecx-input-phone-disabled monkey-select{border-right:2px solid var(--mecx-color-gray-200)}:host input{width:100%;border:none;margin-left:8px}monkey-option .option-flag{font-size:30px}monkey-option .option-name{letter-spacing:.48px;margin-left:4px}\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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "
|
|
4554
|
+
`, isInline: true, styles: [":host{display:inline-flex;width:100%;min-width:0}:host monkey-select{width:164px;border-right:2px solid var(--mecx-color-gray-400)}:host.mecx-input-phone-disabled monkey-select{border-right:2px solid var(--mecx-color-gray-200)}:host input{width:100%;border:none;margin-left:8px}monkey-option .option-flag{font-size:30px}monkey-option .option-name{letter-spacing:.48px;margin-left:4px}\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.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "type", "disabled", "required", "value"], outputs: ["onChange"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }] }); }
|
|
4231
4555
|
}
|
|
4232
4556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyInputPhoneComponent, decorators: [{
|
|
4233
4557
|
type: Component,
|
|
@@ -5221,7 +5545,7 @@ class MonkeyRadioButtonComponent {
|
|
|
5221
5545
|
setTimeout(() => {
|
|
5222
5546
|
if (this.options) {
|
|
5223
5547
|
this.options.forEach((opt) => {
|
|
5224
|
-
opt.selected = opt.value === this.value;
|
|
5548
|
+
opt.selected = opt.value() === this.value;
|
|
5225
5549
|
});
|
|
5226
5550
|
}
|
|
5227
5551
|
this.changeDetectorRef.markForCheck();
|
|
@@ -5247,11 +5571,11 @@ class MonkeyRadioButtonComponent {
|
|
|
5247
5571
|
}
|
|
5248
5572
|
selectOption(option) {
|
|
5249
5573
|
if (!option.disabled && !this.disabled) {
|
|
5250
|
-
this.value = option.value;
|
|
5574
|
+
this.value = option.value();
|
|
5251
5575
|
this._onChange(this.value);
|
|
5252
5576
|
this.onChange.emit(this.value);
|
|
5253
5577
|
this.options.forEach((opt) => {
|
|
5254
|
-
opt.selected = opt.value === this.value;
|
|
5578
|
+
opt.selected = opt.value() === this.value;
|
|
5255
5579
|
});
|
|
5256
5580
|
}
|
|
5257
5581
|
}
|
|
@@ -5543,7 +5867,7 @@ class MonkeyPaginationSizeComponent {
|
|
|
5543
5867
|
this.id = this.id;
|
|
5544
5868
|
}
|
|
5545
5869
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyPaginationSizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyPaginationSizeComponent, isStandalone: true, selector: "monkey-pagination-size", inputs: { size: "size", disabled: "disabled", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-pagination-size" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationSize"], ngImport: i0, template: "<ng-content></ng-content>\n<monkey-form-field hideClear size=\"sm\">\n <monkey-select\n placeholder=\"''\"\n [ngModel]=\"size\"\n (onChange)=\"onChange.next($event)\"\n [disabled]=\"disabled\"\n [showSearch]=\"false\"\n >\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "
|
|
5870
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MonkeyPaginationSizeComponent, isStandalone: true, selector: "monkey-pagination-size", inputs: { size: "size", disabled: "disabled", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-pagination-size" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationSize"], ngImport: i0, template: "<ng-content></ng-content>\n<monkey-form-field hideClear size=\"sm\">\n <monkey-select\n placeholder=\"''\"\n [ngModel]=\"size\"\n (onChange)=\"onChange.next($event)\"\n [disabled]=\"disabled\"\n [showSearch]=\"false\"\n >\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "type", "disabled", "required", "value"], outputs: ["onChange"] }, { 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"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
5547
5871
|
}
|
|
5548
5872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MonkeyPaginationSizeComponent, decorators: [{
|
|
5549
5873
|
type: Component,
|
|
@@ -6737,5 +7061,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
6737
7061
|
* Generated bundle index. Do not edit.
|
|
6738
7062
|
*/
|
|
6739
7063
|
|
|
6740
|
-
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, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, 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, MonkeySuffixDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, getCurrencySymbol };
|
|
7064
|
+
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, 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, MonkeySuffixDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, getCurrencySymbol };
|
|
6741
7065
|
//# sourceMappingURL=monkey-style-guide-v2.mjs.map
|