@seniorsistemas/angular-components 17.8.6 → 17.8.7

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.
@@ -6214,6 +6214,21 @@ var ExportUtils = /** @class */ (function () {
6214
6214
  return ExportUtils;
6215
6215
  }());
6216
6216
 
6217
+ var convertToMomentDateFormat = function (format) {
6218
+ // A ordem dos replaces é importante.
6219
+ return format
6220
+ .replace(/\bd\b/, "D") // day of month (no leading zero)
6221
+ .replace(/\bdd\b/, "DD") // day of month
6222
+ .replace(/\bo\b/, "DDD") // day of the year (no leading zero)
6223
+ .replace(/\boo\b/, "DDDD") // day of the year
6224
+ .replace(/\bM\b/, "MMM") // month name short
6225
+ .replace(/\bMM\b/, "MMMM") // month name long
6226
+ .replace(/\bm\b/, "M") // month of year (no leading)
6227
+ .replace(/\bmm\b/, "MM") // month of year
6228
+ .replace(/\by\b/, "YY") // year (two digits)
6229
+ .replace(/\byy\b/, "YYYY"); // year (four digits)
6230
+ };
6231
+
6217
6232
  var ValidateErrors;
6218
6233
  (function (ValidateErrors) {
6219
6234
  ValidateErrors["MAX_FILE_SIZE"] = "MAX_FILE_SIZE";
@@ -8159,10 +8174,15 @@ var EnumBadgeColors;
8159
8174
 
8160
8175
  var moment$4 = moment_;
8161
8176
  var TableColumnsComponent = /** @class */ (function () {
8162
- function TableColumnsComponent(viewContainerRef, translate, hostProjectConfigs) {
8177
+ function TableColumnsComponent(localeService, viewContainerRef, translate, hostProjectConfigs) {
8178
+ this.localeService = localeService;
8163
8179
  this.viewContainerRef = viewContainerRef;
8164
8180
  this.translate = translate;
8165
8181
  this.hostProjectConfigs = hostProjectConfigs;
8182
+ this.locale = {
8183
+ calendar: __assign(__assign({}, this.localeService.getLocaleOptions().calendar), { dateFormat: convertToMomentDateFormat(this.localeService.getLocaleOptions().calendar.dateFormat) }),
8184
+ number: __assign(__assign({}, this.localeService.getLocaleOptions().number), { scale: 0 })
8185
+ };
8166
8186
  this.formattedColumns = [];
8167
8187
  }
8168
8188
  TableColumnsComponent.prototype.ngOnChanges = function (changes) {
@@ -8191,16 +8211,13 @@ var TableColumnsComponent = /** @class */ (function () {
8191
8211
  return null;
8192
8212
  };
8193
8213
  TableColumnsComponent.prototype.validateComponentAttributes = function (changes) {
8194
- var _a, _b, _c;
8214
+ var _a, _b;
8195
8215
  if (!this.columns && !((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue)) {
8196
8216
  throw new Error("The 'columns' attribute must be informed!");
8197
8217
  }
8198
8218
  if (!this.rowValue && !((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue)) {
8199
8219
  throw new Error("The 'rowValue' attribute must be informed!");
8200
8220
  }
8201
- if (!this.locale && !((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue)) {
8202
- throw new Error("The 'locale' attribute must be informed!");
8203
- }
8204
8221
  };
8205
8222
  TableColumnsComponent.prototype.createColumnsTemplate = function (changes) {
8206
8223
  var _this = this;
@@ -8259,10 +8276,10 @@ var TableColumnsComponent = /** @class */ (function () {
8259
8276
  });
8260
8277
  return attributeValue;
8261
8278
  };
8262
- TableColumnsComponent.prototype.getNumberConfigs = function (column, locale) {
8263
- return __assign(__assign({}, locale.number), { scale: column.scale !== null && column.scale !== undefined
8279
+ TableColumnsComponent.prototype.getNumberConfigs = function (column) {
8280
+ return __assign(__assign({}, this.locale.number), { scale: column.scale !== null && column.scale !== undefined
8264
8281
  ? this.getColumnScale(column.scale)
8265
- : locale.number.scale, prefix: locale.number.currencySymbol + " " });
8282
+ : this.locale.number.scale, prefix: this.locale.number.currencySymbol + " " });
8266
8283
  };
8267
8284
  TableColumnsComponent.prototype.getDateFormat = function (column, locale) {
8268
8285
  return column.dateFormat ? column.dateFormat : locale.calendar.dateFormat;
@@ -8280,7 +8297,7 @@ var TableColumnsComponent = /** @class */ (function () {
8280
8297
  if (_this.isAttributeValueInvalid(attributeValue)) {
8281
8298
  return uninformed;
8282
8299
  }
8283
- var numberConfigs = _this.getNumberConfigs(column, locale);
8300
+ var numberConfigs = _this.getNumberConfigs(column);
8284
8301
  switch (column.type) {
8285
8302
  case EnumColumnFieldType.ENUM:
8286
8303
  return _this.translate.instant(column.enumPrefix + attributeValue.toString().toLowerCase());
@@ -8378,6 +8395,7 @@ var TableColumnsComponent = /** @class */ (function () {
8378
8395
  return columns.sort(function (a, b) { return a.sequence - b.sequence; });
8379
8396
  };
8380
8397
  TableColumnsComponent.ctorParameters = function () { return [
8398
+ { type: LocaleService },
8381
8399
  { type: ViewContainerRef },
8382
8400
  { type: TranslateService },
8383
8401
  { type: undefined, decorators: [{ type: Inject, args: [HostProjectConfigsInjectionToken,] }] }
@@ -8400,7 +8418,7 @@ var TableColumnsComponent = /** @class */ (function () {
8400
8418
  selector: "s-table-columns",
8401
8419
  styles: [":host{display:none}"]
8402
8420
  }),
8403
- __param(2, Inject(HostProjectConfigsInjectionToken))
8421
+ __param(3, Inject(HostProjectConfigsInjectionToken))
8404
8422
  ], TableColumnsComponent);
8405
8423
  return TableColumnsComponent;
8406
8424
  }());
@@ -10795,8 +10813,10 @@ var ProfilePicturePickerComponent = /** @class */ (function () {
10795
10813
  event.stopPropagation();
10796
10814
  };
10797
10815
  ProfilePicturePickerComponent.prototype.onDrop = function (event) {
10816
+ var _a;
10798
10817
  event.preventDefault();
10799
10818
  event.stopPropagation();
10819
+ (_a = this._onTouched) === null || _a === void 0 ? void 0 : _a.call(this);
10800
10820
  var files = [];
10801
10821
  var dataTransferFiles = event.dataTransfer.files;
10802
10822
  for (var i = 0; i < dataTransferFiles.length; i++) {
@@ -10819,9 +10839,11 @@ var ProfilePicturePickerComponent = /** @class */ (function () {
10819
10839
  }
10820
10840
  };
10821
10841
  ProfilePicturePickerComponent.prototype.selectPhoto = function () {
10842
+ var _a;
10822
10843
  var fileInputElement = this.fileInput.nativeElement;
10823
10844
  fileInputElement.value = "";
10824
10845
  fileInputElement.click();
10846
+ (_a = this._onTouched) === null || _a === void 0 ? void 0 : _a.call(this);
10825
10847
  };
10826
10848
  ProfilePicturePickerComponent.prototype.removePhoto = function () {
10827
10849
  var _this = this;
@@ -10851,10 +10873,11 @@ var ProfilePicturePickerComponent = /** @class */ (function () {
10851
10873
  fileReader.readAsDataURL(file);
10852
10874
  fileReader.onloadend = function (fileEvent) {
10853
10875
  _this.imageCropperService.show(__assign({ imageSource: fileEvent.target.result, croppedImage: function (image) {
10876
+ var _a;
10854
10877
  _this.image = image;
10855
10878
  _this.changedImage.emit(image);
10856
10879
  _this._value = { sourceFile: file, base64: image };
10857
- _this._onChange(_this._value);
10880
+ (_a = _this._onChange) === null || _a === void 0 ? void 0 : _a.call(_this, _this._value);
10858
10881
  }, changeImage: function () { return _this.selectPhoto(); }, allowSelectAnother: false, aspectRatio: _this.aspectRatio }, _this.cropperLabelsConfig));
10859
10882
  };
10860
10883
  };
@@ -17944,5 +17967,5 @@ var fallback = {
17944
17967
  * Generated bundle index. Do not edit.
17945
17968
  */
17946
17969
 
17947
- export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv, BorderButtonModule as ɵcw, BorderButtonComponent as ɵcx, ProgressBarDeterminateComponent as ɵcy, ProgressBarIndeterminateComponent as ɵcz, TemplateModule as ɵd, SelectButtonItemComponent as ɵda, SlidePanelService as ɵdb, TieredMenuEventService as ɵdc, TieredMenuService as ɵdd, TieredMenuGlobalService as ɵde, TieredMenuComponent as ɵdf, TieredMenuNestedComponent as ɵdg, TieredMenuItemComponent as ɵdh, TieredMenuDividerComponent as ɵdi, TimelineItemModule as ɵdj, TimelineIconItemComponent as ɵdk, HorizontalTimelineModule as ɵdl, HorizontalTimelineComponent as ɵdm, VerticalTimelineModule as ɵdn, VerticalTimelineComponent as ɵdo, RangeLineComponent as ɵdp, CollapseOptionComponent as ɵdq, CollapsedItemsComponent as ɵdr, VerticalItemsComponent as ɵds, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
17970
+ export { AccordionComponent, AccordionModule, AccordionPanelComponent, AlertComponent, AlertModule, AngularComponentsModule, AutocompleteField, BadgeColors, BadgeComponent, BadgeModule, BaseFieldComponent, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, CardComponent, CardModule, CardTemplateTypes, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CountryPhonePickerComponent, CountryPhonePickerModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DebounceUtils, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, EnumSeverity, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FileValidation, FormField, GanttComponent, GanttModule, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, IAInsightComponent, IAInsightModule, IAInsightTemplateTypes, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, KanbanComponent, KanbanModule, KanbanTemplateTypes, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, Ordination, PanelComponent, PanelModule, PasswordField, PasswordStrengthComponent, PasswordStrengthDirective, PasswordStrengthModule, PasswordStrengthPositions, PasswordStrengths, ProductHeaderComponent, ProductHeaderModule, ProfilePicturePickerComponent, ProfilePicturePickerModule, ProgressBarColors, ProgressBarComponent, ProgressBarModule, RadioButtonField, RatingScaleComponent, RatingScaleModule, RationButtonOption, RowTogllerDirective, SVGFactoryDirective, SVGFactoryModule, Section, SelectButtonComponent, SelectButtonModule, SelectField, SelectOption, SidebarComponent, SidebarModule, SlidePanelComponent, SlidePanelModule, SplitButtonComponent, SplitButtonModule, SplitButtonType, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, SwitchComponent, SwitchModule, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TieredMenuDirective, TieredMenuModule, TileComponent, TileModule, TimelineComponent, TimelineItem, TimelineItemSeverity, TimelineItemSize, TimelineModule, TokenListComponent, TokenListModule, TooltipModule, TooltipPosition, ValidateErrors, ViewMode, WorkspaceSwitchComponent, WorkspaceSwitchModule, convertToMomentDateFormat, countries, fallback, TooltipComponent as ɵa, TooltipDirective as ɵb, TextFieldComponent as ɵba, NumberFieldModule as ɵbb, LocalizedNumberInputModule as ɵbc, NumberInputModule as ɵbd, NumberFieldComponent as ɵbe, CurrencyFieldModule as ɵbf, CurrencyFieldComponent as ɵbg, NumberFieldModule$1 as ɵbh, BignumberInputModule as ɵbi, BignumberFieldComponent as ɵbj, ProfilePictureModule as ɵbk, ThumbnailService as ɵbl, StructureModule as ɵbm, HeaderComponent as ɵbn, FooterComponent as ɵbo, ProfilePictureFieldComponent as ɵbp, AutocompleteFieldComponent as ɵbq, BooleanFieldComponent as ɵbr, BooleanSwitchFieldComponent as ɵbs, CalendarFieldComponent as ɵbt, ChipsFieldComponent as ɵbu, CountryPhonePickerFieldComponent as ɵbv, DynamicFieldComponent as ɵbw, DynamicFormDirective as ɵbx, FieldsetComponent as ɵby, FileUploadComponent$1 as ɵbz, TemplateDirective as ɵc, LookupFieldComponent as ɵca, RadioButtonComponent as ɵcb, RowComponent as ɵcc, SectionComponent as ɵcd, SelectFieldComponent as ɵce, SliderFieldComponent as ɵcf, TextAreaFieldComponent as ɵcg, TextAreaIAFieldComponent as ɵch, IAssistService as ɵci, DecimalField as ɵck, SideTableComponent as ɵcl, InfiniteScrollModule as ɵcm, InfiniteScrollDirective as ɵcn, IAInsightSidebarComponent as ɵco, IAInsightCardComponent as ɵcp, IAInsightCardLoaderComponent as ɵcq, KanbanEventService as ɵcr, KanbanItemComponent as ɵcs, KanbanColumnComponent as ɵct, KanbanItemDraggingComponent as ɵcu, NumberLocaleOptions as ɵcv, BorderButtonModule as ɵcw, BorderButtonComponent as ɵcx, ProgressBarDeterminateComponent as ɵcy, ProgressBarIndeterminateComponent as ɵcz, TemplateModule as ɵd, SelectButtonItemComponent as ɵda, SlidePanelService as ɵdb, TieredMenuEventService as ɵdc, TieredMenuService as ɵdd, TieredMenuGlobalService as ɵde, TieredMenuComponent as ɵdf, TieredMenuNestedComponent as ɵdg, TieredMenuItemComponent as ɵdh, TieredMenuDividerComponent as ɵdi, TimelineItemModule as ɵdj, TimelineIconItemComponent as ɵdk, HorizontalTimelineModule as ɵdl, HorizontalTimelineComponent as ɵdm, VerticalTimelineModule as ɵdn, VerticalTimelineComponent as ɵdo, RangeLineComponent as ɵdp, CollapseOptionComponent as ɵdq, CollapsedItemsComponent as ɵdr, VerticalItemsComponent as ɵds, CustomTranslationsModule as ɵe, CodeEditorComponent as ɵf, CoreFacade as ɵg, CodeMirror6Core as ɵh, CountryPhonePickerService as ɵi, LocalizedCurrencyImpurePipe as ɵj, LocalizedBignumberPipe as ɵk, LocalizedBignumberImpurePipe as ɵl, NumericPipe as ɵm, NumericService as ɵn, EmptyStateGoBackComponent as ɵo, IAssistIconComponent as ɵp, SeniorIconComponent as ɵq, DotsIndicatorComponent as ɵr, LoadingIndicatorComponent as ɵs, FileUploadService as ɵt, InfoSignComponent as ɵu, TableColumnsComponent as ɵv, TablePagingComponent as ɵw, PasswordFieldModule as ɵx, PasswordFieldComponent as ɵy, TextFieldModule as ɵz };
17948
17971
  //# sourceMappingURL=seniorsistemas-angular-components.js.map