monkey-style-guide 2.0.129 → 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.
@@ -2828,6 +2828,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2828
2828
  args: ['click', ['$event']]
2829
2829
  }] } });
2830
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
+
2831
2905
  /**************************
2832
2906
  * Copyright Monkey Exchange. All Rights Reserved
2833
2907
  * This style guide was developed by Monkey Exchange Team
@@ -3035,15 +3109,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
3035
3109
  class MonkeyButtonModule {
3036
3110
  }
3037
3111
  MonkeyButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3038
- MonkeyButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, declarations: [MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonAvatarComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule], exports: [MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonAvatarComponent] });
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] });
3039
3119
  MonkeyButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, imports: [[CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule]] });
3040
3120
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, decorators: [{
3041
3121
  type: NgModule,
3042
3122
  args: [{
3043
- declarations: [MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonAvatarComponent],
3123
+ declarations: [
3124
+ MonkeyButtonComponent,
3125
+ MonkeyButtonDropdownComponent,
3126
+ MonkeyButtonLoadingComponent,
3127
+ MonkeyButtonAvatarComponent
3128
+ ],
3044
3129
  imports: [CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule],
3045
- exports: [MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonAvatarComponent],
3046
- schemas: [NO_ERRORS_SCHEMA],
3130
+ exports: [
3131
+ MonkeyButtonComponent,
3132
+ MonkeyButtonDropdownComponent,
3133
+ MonkeyButtonLoadingComponent,
3134
+ MonkeyButtonAvatarComponent
3135
+ ],
3136
+ schemas: [NO_ERRORS_SCHEMA]
3047
3137
  }]
3048
3138
  }] });
3049
3139
 
@@ -3060,11 +3150,11 @@ class MonkeyDateRangePickerComponent {
3060
3150
  this.helperMessage = '';
3061
3151
  this.moveDaysForward = true;
3062
3152
  this.onChange = new EventEmitter();
3063
- this.today = moment.default().format('YYYY-MM-DD');
3153
+ this.today = moment().format('YYYY-MM-DD');
3064
3154
  this.onModelChange = (value) => { };
3065
3155
  this.onModelTouched = (value) => { };
3066
- this._dateFirst = moment.default();
3067
- this._dateSecond = moment.default().add(1, 'M');
3156
+ this._dateFirst = moment();
3157
+ this._dateSecond = moment().add(1, 'M');
3068
3158
  this._id = `mecx-date-range-picker-${MonkeyUtils.getRandomString(10)}`;
3069
3159
  this._daysArrFirst = [];
3070
3160
  this._daysArrSecond = [];
@@ -3082,12 +3172,12 @@ class MonkeyDateRangePickerComponent {
3082
3172
  }));
3083
3173
  }
3084
3174
  createCalendar(month) {
3085
- let firstDay = moment.default(month).startOf('M');
3086
- let lastDay = moment.default(month).endOf('M');
3175
+ let firstDay = moment(month).startOf('M');
3176
+ let lastDay = moment(month).endOf('M');
3087
3177
  let days = Array.apply(null, { length: month.daysInMonth() })
3088
3178
  .map(Number.call, Number)
3089
3179
  .map((n) => {
3090
- return moment.default(firstDay).add(n, 'd');
3180
+ return moment(firstDay).add(n, 'd');
3091
3181
  });
3092
3182
  let n = 0;
3093
3183
  while (n < firstDay.weekday()) {
@@ -3125,8 +3215,8 @@ class MonkeyDateRangePickerComponent {
3125
3215
  this.writeValue(this._dateForm.value);
3126
3216
  }
3127
3217
  navigateToToday() {
3128
- this._dateFirst = moment.default();
3129
- this._dateSecond = moment.default().add(1, 'M');
3218
+ this._dateFirst = moment();
3219
+ this._dateSecond = moment().add(1, 'M');
3130
3220
  this.build();
3131
3221
  }
3132
3222
  ngOnInit() {
@@ -3181,14 +3271,14 @@ class MonkeyDateRangePickerComponent {
3181
3271
  if (!day) {
3182
3272
  return false;
3183
3273
  }
3184
- return moment.default().format('L') === day.format('L');
3274
+ return moment().format('L') === day.format('L');
3185
3275
  }
3186
3276
  isSelected(day) {
3187
3277
  if (!day) {
3188
3278
  return false;
3189
3279
  }
3190
- let startDateMoment = moment.default(this._dateForm.value.startDate, 'YYYY-MM-DD');
3191
- let endDateMoment = moment.default(this._dateForm.value.endDate, 'YYYY-MM-DD');
3280
+ let startDateMoment = moment(this._dateForm.value.startDate, 'YYYY-MM-DD');
3281
+ let endDateMoment = moment(this._dateForm.value.endDate, 'YYYY-MM-DD');
3192
3282
  if (this._dateForm.valid) {
3193
3283
  return startDateMoment.isSameOrBefore(day) && endDateMoment.isSameOrAfter(day);
3194
3284
  }
@@ -3199,7 +3289,7 @@ class MonkeyDateRangePickerComponent {
3199
3289
  isDisabled(day) {
3200
3290
  const { _minDate } = this;
3201
3291
  if (_minDate) {
3202
- const firstDay = moment.default(_minDate);
3292
+ const firstDay = moment(_minDate);
3203
3293
  return day.isBefore(firstDay.subtract(1, 'day'));
3204
3294
  }
3205
3295
  return false;
@@ -3220,7 +3310,7 @@ class MonkeyDateRangePickerComponent {
3220
3310
  const { _dateForm, _minDate } = this;
3221
3311
  let dayFormatted = day.format('YYYY-MM-DD');
3222
3312
  if (_minDate) {
3223
- const firstDay = moment.default(_minDate);
3313
+ const firstDay = moment(_minDate);
3224
3314
  if (day.isBefore(firstDay.subtract(1, 'day')))
3225
3315
  return;
3226
3316
  }
@@ -3229,7 +3319,7 @@ class MonkeyDateRangePickerComponent {
3229
3319
  }
3230
3320
  let { startDate, endDate } = _dateForm.value;
3231
3321
  if (startDate) {
3232
- if (moment.default(startDate).isAfter(moment.default(dayFormatted))) {
3322
+ if (moment(startDate).isAfter(moment(dayFormatted))) {
3233
3323
  endDate = startDate;
3234
3324
  startDate = dayFormatted;
3235
3325
  }
@@ -3252,9 +3342,9 @@ class MonkeyDateRangePickerComponent {
3252
3342
  return;
3253
3343
  const { _dateForm, _minDate, today, moveDaysForward } = this;
3254
3344
  const { startDate } = _dateForm.value;
3255
- const firstDay = moment.default(startDate || _minDate || today).format('YYYY-MM-DD');
3345
+ const firstDay = moment(startDate || _minDate || today).format('YYYY-MM-DD');
3256
3346
  const method = moveDaysForward ? 'add' : 'subtract';
3257
- const lastDay = moment.default(firstDay)[method](days, 'day').format('YYYY-MM-DD');
3347
+ const lastDay = moment(firstDay)[method](days, 'day').format('YYYY-MM-DD');
3258
3348
  if (moveDaysForward) {
3259
3349
  _dateForm.get('startDate').patchValue(firstDay);
3260
3350
  _dateForm.get('endDate').patchValue(lastDay);
@@ -3679,15 +3769,19 @@ class MonkeyInputComponent {
3679
3769
  return `${value}`.replace(new RegExp(/0/, 'g'), '');
3680
3770
  }
3681
3771
  formatValue(value) {
3682
- const { settings } = this;
3683
- if (this.currency) {
3772
+ const { settings, type, currency, percent } = this;
3773
+ if (currency) {
3684
3774
  if (!value || !this.replaceZero(value))
3685
3775
  return '';
3686
3776
  return this.currencyPipe.transform(value, settings?.currency?.code || 'BRL', '', '1.2-2', settings?.currency?.locale || 'pt-BR');
3687
3777
  }
3688
- else if (this.percent) {
3778
+ else if (percent) {
3689
3779
  return `${value}`;
3690
3780
  }
3781
+ else if (type === 'date') {
3782
+ //return `${value}`.substring(0,10);
3783
+ return value;
3784
+ }
3691
3785
  return value;
3692
3786
  }
3693
3787
  handleSymbol() {
@@ -8055,5 +8149,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
8055
8149
  * Generated bundle index. Do not edit.
8056
8150
  */
8057
8151
 
8058
- 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 };
8059
8153
  //# sourceMappingURL=monkey-style-guide.mjs.map