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.
@@ -2823,6 +2823,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
2823
2823
  args: ['click', ['$event']]
2824
2824
  }] } });
2825
2825
 
2826
+ /**************************
2827
+ * Copyright Monkey Exchange. All Rights Reserved
2828
+ * This style guide was developed by Monkey Exchange Team
2829
+ * MIT Licence
2830
+ **************************/
2831
+ class MonkeyButtonLoadingComponent {
2832
+ constructor() {
2833
+ this.size = 'md';
2834
+ this._id = `mecx-button-loading-${MonkeyUtils.getRandomString(10)}`;
2835
+ }
2836
+ }
2837
+ MonkeyButtonLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2838
+ 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: `
2839
+ <button
2840
+ [ngClass]="
2841
+ 'mecx-button-' +
2842
+ type +
2843
+ ' mecx-button-' +
2844
+ type +
2845
+ '__' +
2846
+ color +
2847
+ ' no-icon' +
2848
+ ' ' +
2849
+ size
2850
+ "
2851
+ type="button"
2852
+ [id]="_id"
2853
+ >
2854
+ <mecx-button-progress-info>
2855
+ <span [style.width.%]="progress"> {{ progress }}%</span>
2856
+ </mecx-button-progress-info>
2857
+ </button>
2858
+ `, isInline: true, directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
2859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonLoadingComponent, decorators: [{
2860
+ type: Component,
2861
+ args: [{
2862
+ selector: 'monkey-button-loading',
2863
+ template: `
2864
+ <button
2865
+ [ngClass]="
2866
+ 'mecx-button-' +
2867
+ type +
2868
+ ' mecx-button-' +
2869
+ type +
2870
+ '__' +
2871
+ color +
2872
+ ' no-icon' +
2873
+ ' ' +
2874
+ size
2875
+ "
2876
+ type="button"
2877
+ [id]="_id"
2878
+ >
2879
+ <mecx-button-progress-info>
2880
+ <span [style.width.%]="progress"> {{ progress }}%</span>
2881
+ </mecx-button-progress-info>
2882
+ </button>
2883
+ `,
2884
+ encapsulation: ViewEncapsulation.None
2885
+ }]
2886
+ }], propDecorators: { label: [{
2887
+ type: Input
2888
+ }], type: [{
2889
+ type: Input
2890
+ }], color: [{
2891
+ type: Input
2892
+ }], size: [{
2893
+ type: Input
2894
+ }], progress: [{
2895
+ type: Input
2896
+ }], totalProgress: [{
2897
+ type: Input
2898
+ }] } });
2899
+
2826
2900
  /**************************
2827
2901
  * Copyright Monkey Exchange. All Rights Reserved
2828
2902
  * This style guide was developed by Monkey Exchange Team
@@ -3030,15 +3104,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
3030
3104
  class MonkeyButtonModule {
3031
3105
  }
3032
3106
  MonkeyButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3033
- 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] });
3107
+ MonkeyButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, declarations: [MonkeyButtonComponent,
3108
+ MonkeyButtonDropdownComponent,
3109
+ MonkeyButtonLoadingComponent,
3110
+ MonkeyButtonAvatarComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule], exports: [MonkeyButtonComponent,
3111
+ MonkeyButtonDropdownComponent,
3112
+ MonkeyButtonLoadingComponent,
3113
+ MonkeyButtonAvatarComponent] });
3034
3114
  MonkeyButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, imports: [[CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule]] });
3035
3115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MonkeyButtonModule, decorators: [{
3036
3116
  type: NgModule,
3037
3117
  args: [{
3038
- declarations: [MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonAvatarComponent],
3118
+ declarations: [
3119
+ MonkeyButtonComponent,
3120
+ MonkeyButtonDropdownComponent,
3121
+ MonkeyButtonLoadingComponent,
3122
+ MonkeyButtonAvatarComponent
3123
+ ],
3039
3124
  imports: [CommonModule, FormsModule, ReactiveFormsModule, MonkeyIconModule],
3040
- exports: [MonkeyButtonComponent, MonkeyButtonDropdownComponent, MonkeyButtonAvatarComponent],
3041
- schemas: [NO_ERRORS_SCHEMA],
3125
+ exports: [
3126
+ MonkeyButtonComponent,
3127
+ MonkeyButtonDropdownComponent,
3128
+ MonkeyButtonLoadingComponent,
3129
+ MonkeyButtonAvatarComponent
3130
+ ],
3131
+ schemas: [NO_ERRORS_SCHEMA]
3042
3132
  }]
3043
3133
  }] });
3044
3134
 
@@ -3055,11 +3145,11 @@ class MonkeyDateRangePickerComponent {
3055
3145
  this.helperMessage = '';
3056
3146
  this.moveDaysForward = true;
3057
3147
  this.onChange = new EventEmitter();
3058
- this.today = moment.default().format('YYYY-MM-DD');
3148
+ this.today = moment().format('YYYY-MM-DD');
3059
3149
  this.onModelChange = (value) => { };
3060
3150
  this.onModelTouched = (value) => { };
3061
- this._dateFirst = moment.default();
3062
- this._dateSecond = moment.default().add(1, 'M');
3151
+ this._dateFirst = moment();
3152
+ this._dateSecond = moment().add(1, 'M');
3063
3153
  this._id = `mecx-date-range-picker-${MonkeyUtils.getRandomString(10)}`;
3064
3154
  this._daysArrFirst = [];
3065
3155
  this._daysArrSecond = [];
@@ -3077,12 +3167,12 @@ class MonkeyDateRangePickerComponent {
3077
3167
  }));
3078
3168
  }
3079
3169
  createCalendar(month) {
3080
- let firstDay = moment.default(month).startOf('M');
3081
- let lastDay = moment.default(month).endOf('M');
3170
+ let firstDay = moment(month).startOf('M');
3171
+ let lastDay = moment(month).endOf('M');
3082
3172
  let days = Array.apply(null, { length: month.daysInMonth() })
3083
3173
  .map(Number.call, Number)
3084
3174
  .map((n) => {
3085
- return moment.default(firstDay).add(n, 'd');
3175
+ return moment(firstDay).add(n, 'd');
3086
3176
  });
3087
3177
  let n = 0;
3088
3178
  while (n < firstDay.weekday()) {
@@ -3120,8 +3210,8 @@ class MonkeyDateRangePickerComponent {
3120
3210
  this.writeValue(this._dateForm.value);
3121
3211
  }
3122
3212
  navigateToToday() {
3123
- this._dateFirst = moment.default();
3124
- this._dateSecond = moment.default().add(1, 'M');
3213
+ this._dateFirst = moment();
3214
+ this._dateSecond = moment().add(1, 'M');
3125
3215
  this.build();
3126
3216
  }
3127
3217
  ngOnInit() {
@@ -3176,14 +3266,14 @@ class MonkeyDateRangePickerComponent {
3176
3266
  if (!day) {
3177
3267
  return false;
3178
3268
  }
3179
- return moment.default().format('L') === day.format('L');
3269
+ return moment().format('L') === day.format('L');
3180
3270
  }
3181
3271
  isSelected(day) {
3182
3272
  if (!day) {
3183
3273
  return false;
3184
3274
  }
3185
- let startDateMoment = moment.default(this._dateForm.value.startDate, 'YYYY-MM-DD');
3186
- let endDateMoment = moment.default(this._dateForm.value.endDate, 'YYYY-MM-DD');
3275
+ let startDateMoment = moment(this._dateForm.value.startDate, 'YYYY-MM-DD');
3276
+ let endDateMoment = moment(this._dateForm.value.endDate, 'YYYY-MM-DD');
3187
3277
  if (this._dateForm.valid) {
3188
3278
  return startDateMoment.isSameOrBefore(day) && endDateMoment.isSameOrAfter(day);
3189
3279
  }
@@ -3194,7 +3284,7 @@ class MonkeyDateRangePickerComponent {
3194
3284
  isDisabled(day) {
3195
3285
  const { _minDate } = this;
3196
3286
  if (_minDate) {
3197
- const firstDay = moment.default(_minDate);
3287
+ const firstDay = moment(_minDate);
3198
3288
  return day.isBefore(firstDay.subtract(1, 'day'));
3199
3289
  }
3200
3290
  return false;
@@ -3215,7 +3305,7 @@ class MonkeyDateRangePickerComponent {
3215
3305
  const { _dateForm, _minDate } = this;
3216
3306
  let dayFormatted = day.format('YYYY-MM-DD');
3217
3307
  if (_minDate) {
3218
- const firstDay = moment.default(_minDate);
3308
+ const firstDay = moment(_minDate);
3219
3309
  if (day.isBefore(firstDay.subtract(1, 'day')))
3220
3310
  return;
3221
3311
  }
@@ -3224,7 +3314,7 @@ class MonkeyDateRangePickerComponent {
3224
3314
  }
3225
3315
  let { startDate, endDate } = _dateForm.value;
3226
3316
  if (startDate) {
3227
- if (moment.default(startDate).isAfter(moment.default(dayFormatted))) {
3317
+ if (moment(startDate).isAfter(moment(dayFormatted))) {
3228
3318
  endDate = startDate;
3229
3319
  startDate = dayFormatted;
3230
3320
  }
@@ -3247,9 +3337,9 @@ class MonkeyDateRangePickerComponent {
3247
3337
  return;
3248
3338
  const { _dateForm, _minDate, today, moveDaysForward } = this;
3249
3339
  const { startDate } = _dateForm.value;
3250
- const firstDay = moment.default(startDate || _minDate || today).format('YYYY-MM-DD');
3340
+ const firstDay = moment(startDate || _minDate || today).format('YYYY-MM-DD');
3251
3341
  const method = moveDaysForward ? 'add' : 'subtract';
3252
- const lastDay = moment.default(firstDay)[method](days, 'day').format('YYYY-MM-DD');
3342
+ const lastDay = moment(firstDay)[method](days, 'day').format('YYYY-MM-DD');
3253
3343
  if (moveDaysForward) {
3254
3344
  _dateForm.get('startDate').patchValue(firstDay);
3255
3345
  _dateForm.get('endDate').patchValue(lastDay);
@@ -3675,15 +3765,19 @@ class MonkeyInputComponent {
3675
3765
  }
3676
3766
  formatValue(value) {
3677
3767
  var _a, _b;
3678
- const { settings } = this;
3679
- if (this.currency) {
3768
+ const { settings, type, currency, percent } = this;
3769
+ if (currency) {
3680
3770
  if (!value || !this.replaceZero(value))
3681
3771
  return '';
3682
3772
  return this.currencyPipe.transform(value, ((_a = settings === null || settings === void 0 ? void 0 : settings.currency) === null || _a === void 0 ? void 0 : _a.code) || 'BRL', '', '1.2-2', ((_b = settings === null || settings === void 0 ? void 0 : settings.currency) === null || _b === void 0 ? void 0 : _b.locale) || 'pt-BR');
3683
3773
  }
3684
- else if (this.percent) {
3774
+ else if (percent) {
3685
3775
  return `${value}`;
3686
3776
  }
3777
+ else if (type === 'date') {
3778
+ //return `${value}`.substring(0,10);
3779
+ return value;
3780
+ }
3687
3781
  return value;
3688
3782
  }
3689
3783
  handleSymbol() {
@@ -8065,5 +8159,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
8065
8159
  * Generated bundle index. Do not edit.
8066
8160
  */
8067
8161
 
8068
- 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 };
8162
+ 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 };
8069
8163
  //# sourceMappingURL=monkey-style-guide.mjs.map