monkey-style-guide 2.0.127 → 2.0.130
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/partials/_forms.scss +1 -1
- package/assets/scss/partials/components/_buttons.scss +43 -0
- package/esm2020/lib/components/button/button-loading.component.mjs +78 -0
- package/esm2020/lib/components/button/button.module.mjs +22 -5
- package/esm2020/lib/components/button/index.mjs +2 -1
- package/esm2020/lib/components/date-range-picker/date-range-picker.component.mjs +26 -32
- package/esm2020/lib/components/input/input.component.mjs +8 -4
- package/esm2020/lib/core/services/snackbar/mokey-style-guide-snackbar.service.mjs +7 -3
- package/fesm2015/monkey-style-guide.mjs +133 -41
- package/fesm2015/monkey-style-guide.mjs.map +1 -1
- package/fesm2020/monkey-style-guide.mjs +133 -41
- package/fesm2020/monkey-style-guide.mjs.map +1 -1
- package/lib/components/button/button-loading.component.d.ts +12 -0
- package/lib/components/button/button.module.d.ts +6 -5
- package/lib/components/button/index.d.ts +1 -0
- package/lib/core/services/snackbar/mokey-style-guide-snackbar.service.d.ts +2 -0
- package/monkey-style-guide-2.0.130.tgz +0 -0
- package/package.json +2 -2
- package/monkey-style-guide-2.0.127.tgz +0 -0
|
@@ -531,14 +531,18 @@ class MonkeyStyleGuideSnackbarService {
|
|
|
531
531
|
}
|
|
532
532
|
if (actionCancelElement) {
|
|
533
533
|
actionCancelElement.addEventListener('click', () => {
|
|
534
|
-
|
|
534
|
+
if (!cancel?.keepOnAction) {
|
|
535
|
+
this.close(id);
|
|
536
|
+
}
|
|
535
537
|
cancel.action();
|
|
536
538
|
});
|
|
537
539
|
actionElement.appendChild(actionCancelElement);
|
|
538
540
|
}
|
|
539
541
|
if (actionConfirmElement) {
|
|
540
542
|
actionConfirmElement.addEventListener('click', () => {
|
|
541
|
-
|
|
543
|
+
if (!confirm?.keepOnAction) {
|
|
544
|
+
this.close(id);
|
|
545
|
+
}
|
|
542
546
|
confirm.action();
|
|
543
547
|
});
|
|
544
548
|
actionElement.appendChild(actionConfirmElement);
|
|
@@ -2824,6 +2828,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
2824
2828
|
args: ['click', ['$event']]
|
|
2825
2829
|
}] } });
|
|
2826
2830
|
|
|
2831
|
+
/**************************
|
|
2832
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
2833
|
+
* This style guide was developed by Monkey Exchange Team
|
|
2834
|
+
* MIT Licence
|
|
2835
|
+
**************************/
|
|
2836
|
+
class MonkeyButtonLoadingComponent {
|
|
2837
|
+
constructor() {
|
|
2838
|
+
this.size = 'md';
|
|
2839
|
+
this._id = `mecx-button-loading-${MonkeyUtils.getRandomString(10)}`;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
MonkeyButtonLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2843
|
+
MonkeyButtonLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MonkeyButtonLoadingComponent, selector: "monkey-button-loading", inputs: { label: "label", type: "type", color: "color", size: "size", progress: "progress", totalProgress: "totalProgress" }, ngImport: i0, template: `
|
|
2844
|
+
<button
|
|
2845
|
+
[ngClass]="
|
|
2846
|
+
'mecx-button-' +
|
|
2847
|
+
type +
|
|
2848
|
+
' mecx-button-' +
|
|
2849
|
+
type +
|
|
2850
|
+
'__' +
|
|
2851
|
+
color +
|
|
2852
|
+
' no-icon' +
|
|
2853
|
+
' ' +
|
|
2854
|
+
size
|
|
2855
|
+
"
|
|
2856
|
+
type="button"
|
|
2857
|
+
[id]="_id"
|
|
2858
|
+
>
|
|
2859
|
+
<mecx-button-progress-info>
|
|
2860
|
+
<span [style.width.%]="progress"> {{ progress }}%</span>
|
|
2861
|
+
</mecx-button-progress-info>
|
|
2862
|
+
</button>
|
|
2863
|
+
`, isInline: true, directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonLoadingComponent, decorators: [{
|
|
2865
|
+
type: Component,
|
|
2866
|
+
args: [{
|
|
2867
|
+
selector: 'monkey-button-loading',
|
|
2868
|
+
template: `
|
|
2869
|
+
<button
|
|
2870
|
+
[ngClass]="
|
|
2871
|
+
'mecx-button-' +
|
|
2872
|
+
type +
|
|
2873
|
+
' mecx-button-' +
|
|
2874
|
+
type +
|
|
2875
|
+
'__' +
|
|
2876
|
+
color +
|
|
2877
|
+
' no-icon' +
|
|
2878
|
+
' ' +
|
|
2879
|
+
size
|
|
2880
|
+
"
|
|
2881
|
+
type="button"
|
|
2882
|
+
[id]="_id"
|
|
2883
|
+
>
|
|
2884
|
+
<mecx-button-progress-info>
|
|
2885
|
+
<span [style.width.%]="progress"> {{ progress }}%</span>
|
|
2886
|
+
</mecx-button-progress-info>
|
|
2887
|
+
</button>
|
|
2888
|
+
`,
|
|
2889
|
+
encapsulation: ViewEncapsulation.None
|
|
2890
|
+
}]
|
|
2891
|
+
}], propDecorators: { label: [{
|
|
2892
|
+
type: Input
|
|
2893
|
+
}], type: [{
|
|
2894
|
+
type: Input
|
|
2895
|
+
}], color: [{
|
|
2896
|
+
type: Input
|
|
2897
|
+
}], size: [{
|
|
2898
|
+
type: Input
|
|
2899
|
+
}], progress: [{
|
|
2900
|
+
type: Input
|
|
2901
|
+
}], totalProgress: [{
|
|
2902
|
+
type: Input
|
|
2903
|
+
}] } });
|
|
2904
|
+
|
|
2827
2905
|
/**************************
|
|
2828
2906
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
2829
2907
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -3031,15 +3109,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
3031
3109
|
class MonkeyButtonModule {
|
|
3032
3110
|
}
|
|
3033
3111
|
MonkeyButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3034
|
-
MonkeyButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, declarations: [MonkeyButtonComponent,
|
|
3112
|
+
MonkeyButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, declarations: [MonkeyButtonComponent,
|
|
3113
|
+
MonkeyButtonDropdownComponent,
|
|
3114
|
+
MonkeyButtonLoadingComponent,
|
|
3115
|
+
MonkeyButtonAvatarComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule], exports: [MonkeyButtonComponent,
|
|
3116
|
+
MonkeyButtonDropdownComponent,
|
|
3117
|
+
MonkeyButtonLoadingComponent,
|
|
3118
|
+
MonkeyButtonAvatarComponent] });
|
|
3035
3119
|
MonkeyButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, imports: [[CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule]] });
|
|
3036
3120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, decorators: [{
|
|
3037
3121
|
type: NgModule,
|
|
3038
3122
|
args: [{
|
|
3039
|
-
declarations: [
|
|
3123
|
+
declarations: [
|
|
3124
|
+
MonkeyButtonComponent,
|
|
3125
|
+
MonkeyButtonDropdownComponent,
|
|
3126
|
+
MonkeyButtonLoadingComponent,
|
|
3127
|
+
MonkeyButtonAvatarComponent
|
|
3128
|
+
],
|
|
3040
3129
|
imports: [CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule],
|
|
3041
|
-
exports: [
|
|
3042
|
-
|
|
3130
|
+
exports: [
|
|
3131
|
+
MonkeyButtonComponent,
|
|
3132
|
+
MonkeyButtonDropdownComponent,
|
|
3133
|
+
MonkeyButtonLoadingComponent,
|
|
3134
|
+
MonkeyButtonAvatarComponent
|
|
3135
|
+
],
|
|
3136
|
+
schemas: [NO_ERRORS_SCHEMA]
|
|
3043
3137
|
}]
|
|
3044
3138
|
}] });
|
|
3045
3139
|
|
|
@@ -3211,43 +3305,37 @@ class MonkeyDateRangePickerComponent {
|
|
|
3211
3305
|
return day?.isSame(endDate);
|
|
3212
3306
|
}
|
|
3213
3307
|
selectedDate(day) {
|
|
3214
|
-
|
|
3215
|
-
|
|
3308
|
+
if (this._disabled)
|
|
3309
|
+
return;
|
|
3310
|
+
const { _dateForm, _minDate } = this;
|
|
3311
|
+
let dayFormatted = day.format('YYYY-MM-DD');
|
|
3312
|
+
if (_minDate) {
|
|
3313
|
+
const firstDay = moment(_minDate);
|
|
3314
|
+
if (day.isBefore(firstDay.subtract(1, 'day')))
|
|
3216
3315
|
return;
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
this.clearDates();
|
|
3226
|
-
}
|
|
3227
|
-
let { startDate, endDate } = _dateForm.value;
|
|
3228
|
-
if (startDate) {
|
|
3229
|
-
if (moment(startDate).isAfter(moment(dayFormatted))) {
|
|
3230
|
-
endDate = startDate;
|
|
3231
|
-
startDate = dayFormatted;
|
|
3232
|
-
}
|
|
3233
|
-
else {
|
|
3234
|
-
endDate = dayFormatted;
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
else
|
|
3316
|
+
}
|
|
3317
|
+
if (_dateForm.valid) {
|
|
3318
|
+
this.clearDates();
|
|
3319
|
+
}
|
|
3320
|
+
let { startDate, endDate } = _dateForm.value;
|
|
3321
|
+
if (startDate) {
|
|
3322
|
+
if (moment(startDate).isAfter(moment(dayFormatted))) {
|
|
3323
|
+
endDate = startDate;
|
|
3238
3324
|
startDate = dayFormatted;
|
|
3239
|
-
if (startDate) {
|
|
3240
|
-
_dateForm.get('startDate').patchValue(startDate);
|
|
3241
3325
|
}
|
|
3242
|
-
|
|
3243
|
-
|
|
3326
|
+
else {
|
|
3327
|
+
endDate = dayFormatted;
|
|
3244
3328
|
}
|
|
3245
|
-
console.log(_dateForm.value);
|
|
3246
|
-
this.writeValue(_dateForm.value);
|
|
3247
3329
|
}
|
|
3248
|
-
|
|
3249
|
-
|
|
3330
|
+
else
|
|
3331
|
+
startDate = dayFormatted;
|
|
3332
|
+
if (startDate) {
|
|
3333
|
+
_dateForm.get('startDate').patchValue(startDate);
|
|
3334
|
+
}
|
|
3335
|
+
if (endDate) {
|
|
3336
|
+
_dateForm.get('endDate').patchValue(endDate);
|
|
3250
3337
|
}
|
|
3338
|
+
this.writeValue(_dateForm.value);
|
|
3251
3339
|
}
|
|
3252
3340
|
selectRangeOfDays(days) {
|
|
3253
3341
|
if (this._disabled)
|
|
@@ -3681,15 +3769,19 @@ class MonkeyInputComponent {
|
|
|
3681
3769
|
return `${value}`.replace(new RegExp(/0/, 'g'), '');
|
|
3682
3770
|
}
|
|
3683
3771
|
formatValue(value) {
|
|
3684
|
-
const { settings } = this;
|
|
3685
|
-
if (
|
|
3772
|
+
const { settings, type, currency, percent } = this;
|
|
3773
|
+
if (currency) {
|
|
3686
3774
|
if (!value || !this.replaceZero(value))
|
|
3687
3775
|
return '';
|
|
3688
3776
|
return this.currencyPipe.transform(value, settings?.currency?.code || 'BRL', '', '1.2-2', settings?.currency?.locale || 'pt-BR');
|
|
3689
3777
|
}
|
|
3690
|
-
else if (
|
|
3778
|
+
else if (percent) {
|
|
3691
3779
|
return `${value}`;
|
|
3692
3780
|
}
|
|
3781
|
+
else if (type === 'date') {
|
|
3782
|
+
//return `${value}`.substring(0,10);
|
|
3783
|
+
return value;
|
|
3784
|
+
}
|
|
3693
3785
|
return value;
|
|
3694
3786
|
}
|
|
3695
3787
|
handleSymbol() {
|
|
@@ -8057,5 +8149,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
|
|
|
8057
8149
|
* Generated bundle index. Do not edit.
|
|
8058
8150
|
*/
|
|
8059
8151
|
|
|
8060
|
-
export { MonkeyBadgeComponent, MonkeyBadgeModule, MonkeyButtonAvatarComponent, MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonModule, MonkeyCheckboxComponent, MonkeyCheckboxModule, MonkeyDateRangePickerComponent, MonkeyDateRangePickerModule, MonkeyExpansionComponent, MonkeyExpansionModule, MonkeyFileUploadComponent, MonkeyFileUploadModule, MonkeyIconArrowLeftComponent, MonkeyIconArrowRightComponent, MonkeyIconArrowUpComponent, MonkeyIconAuctionComponent, MonkeyIconBankComponent, MonkeyIconBellComponent, MonkeyIconBookComponent, MonkeyIconBoxComponent, MonkeyIconCNPJComponent, MonkeyIconCalendarComponent, MonkeyIconCameraComponent, MonkeyIconChatComponent, MonkeyIconCheckCircleComponent, MonkeyIconCheckCircleOutComponent, MonkeyIconCheckComponent, MonkeyIconCheckGreyComponent, MonkeyIconCheckWhiteComponent, MonkeyIconClipboardComponent, MonkeyIconClockComponent, MonkeyIconCloseComponent, MonkeyIconCodepenComponent, MonkeyIconCompanyNameComponent, MonkeyIconComponent, MonkeyIconContractComponent, MonkeyIconDeleteComponent, MonkeyIconDocumentComponent, MonkeyIconDollarSignComponent, MonkeyIconDomainComponent, MonkeyIconDownloadComponent, MonkeyIconEditComponent, MonkeyIconEmailComponent, MonkeyIconEmptyDocComponent, MonkeyIconErrorComponent, MonkeyIconEyeClosedComponent, MonkeyIconEyeOpenComponent, MonkeyIconFilterComponent, MonkeyIconGridComponent, MonkeyIconHelpComponent, MonkeyIconHexagonComponent, MonkeyIconHomeComponent, MonkeyIconImageComponent, MonkeyIconListComponent, MonkeyIconLocationPinComponent, MonkeyIconLoginComponent, MonkeyIconLogoutComponent, MonkeyIconMenuComponent, MonkeyIconModule, MonkeyIconMoneySignComponent, MonkeyIconMoreComponent, MonkeyIconOfferedComponent, MonkeyIconPasswordComponent, MonkeyIconPeopleComponent, MonkeyIconPercentComponent, MonkeyIconPersonDocumentComponent, MonkeyIconPersonSadComponent, MonkeyIconPhoneComponent, MonkeyIconPorkComponent, MonkeyIconRadioComponent, MonkeyIconRefreshComponent, MonkeyIconRepeatComponent, MonkeyIconSearchComponent, MonkeyIconSecondWarningComponent, MonkeyIconSettingsComponent, MonkeyIconTrashComponent, MonkeyIconTrophyComponent, MonkeyIconUploadComponent, MonkeyIconUserComponent, MonkeyIconWaitingComponent, MonkeyIconWalletComponent, MonkeyIconWarningComponent, MonkeyImageCropComponent, MonkeyImageCropModule, MonkeyInputComponent, MonkeyInputFilterComponent, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputPhoneModule, MonkeyModalComponent, MonkeyModalModule, MonkeyOptionComponent, MonkeyOptionModule, MonkeyRadioButtonComponent, MonkeyRadioButtonModule, MonkeySelectComponent, MonkeySelectFilterComponent, MonkeySelectModule, MonkeySelectMultipleComponent, MonkeySelectSearchComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStyleGuideModalFixedService, MonkeyStyleGuideModalService, MonkeyStyleGuideModule, MonkeyStyleGuideSettingsService, MonkeyStyleGuideSnackbarService, MonkeyTabComponent, MonkeyTabModule, MonkeyTableColumnComponent, MonkeyTableComponent, MonkeyTableModule, MonkeyToggleComponent, MonkeyToggleModule, MonkeyUtils, MonkeyWizardComponent, MonkeyWizardModule, PhoneNumberValidDirective };
|
|
8152
|
+
export { MonkeyBadgeComponent, MonkeyBadgeModule, MonkeyButtonAvatarComponent, MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonLoadingComponent, MonkeyButtonModule, MonkeyCheckboxComponent, MonkeyCheckboxModule, MonkeyDateRangePickerComponent, MonkeyDateRangePickerModule, MonkeyExpansionComponent, MonkeyExpansionModule, MonkeyFileUploadComponent, MonkeyFileUploadModule, MonkeyIconArrowLeftComponent, MonkeyIconArrowRightComponent, MonkeyIconArrowUpComponent, MonkeyIconAuctionComponent, MonkeyIconBankComponent, MonkeyIconBellComponent, MonkeyIconBookComponent, MonkeyIconBoxComponent, MonkeyIconCNPJComponent, MonkeyIconCalendarComponent, MonkeyIconCameraComponent, MonkeyIconChatComponent, MonkeyIconCheckCircleComponent, MonkeyIconCheckCircleOutComponent, MonkeyIconCheckComponent, MonkeyIconCheckGreyComponent, MonkeyIconCheckWhiteComponent, MonkeyIconClipboardComponent, MonkeyIconClockComponent, MonkeyIconCloseComponent, MonkeyIconCodepenComponent, MonkeyIconCompanyNameComponent, MonkeyIconComponent, MonkeyIconContractComponent, MonkeyIconDeleteComponent, MonkeyIconDocumentComponent, MonkeyIconDollarSignComponent, MonkeyIconDomainComponent, MonkeyIconDownloadComponent, MonkeyIconEditComponent, MonkeyIconEmailComponent, MonkeyIconEmptyDocComponent, MonkeyIconErrorComponent, MonkeyIconEyeClosedComponent, MonkeyIconEyeOpenComponent, MonkeyIconFilterComponent, MonkeyIconGridComponent, MonkeyIconHelpComponent, MonkeyIconHexagonComponent, MonkeyIconHomeComponent, MonkeyIconImageComponent, MonkeyIconListComponent, MonkeyIconLocationPinComponent, MonkeyIconLoginComponent, MonkeyIconLogoutComponent, MonkeyIconMenuComponent, MonkeyIconModule, MonkeyIconMoneySignComponent, MonkeyIconMoreComponent, MonkeyIconOfferedComponent, MonkeyIconPasswordComponent, MonkeyIconPeopleComponent, MonkeyIconPercentComponent, MonkeyIconPersonDocumentComponent, MonkeyIconPersonSadComponent, MonkeyIconPhoneComponent, MonkeyIconPorkComponent, MonkeyIconRadioComponent, MonkeyIconRefreshComponent, MonkeyIconRepeatComponent, MonkeyIconSearchComponent, MonkeyIconSecondWarningComponent, MonkeyIconSettingsComponent, MonkeyIconTrashComponent, MonkeyIconTrophyComponent, MonkeyIconUploadComponent, MonkeyIconUserComponent, MonkeyIconWaitingComponent, MonkeyIconWalletComponent, MonkeyIconWarningComponent, MonkeyImageCropComponent, MonkeyImageCropModule, MonkeyInputComponent, MonkeyInputFilterComponent, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputPhoneModule, MonkeyModalComponent, MonkeyModalModule, MonkeyOptionComponent, MonkeyOptionModule, MonkeyRadioButtonComponent, MonkeyRadioButtonModule, MonkeySelectComponent, MonkeySelectFilterComponent, MonkeySelectModule, MonkeySelectMultipleComponent, MonkeySelectSearchComponent, MonkeyStepperComponent, MonkeyStepperModule, MonkeyStyleGuideModalFixedService, MonkeyStyleGuideModalService, MonkeyStyleGuideModule, MonkeyStyleGuideSettingsService, MonkeyStyleGuideSnackbarService, MonkeyTabComponent, MonkeyTabModule, MonkeyTableColumnComponent, MonkeyTableComponent, MonkeyTableModule, MonkeyToggleComponent, MonkeyToggleModule, MonkeyUtils, MonkeyWizardComponent, MonkeyWizardModule, PhoneNumberValidDirective };
|
|
8061
8153
|
//# sourceMappingURL=monkey-style-guide.mjs.map
|