Skip to content

Commit

Permalink
#26310 Move DotFieldValidationMessageComponent to UI lib (#26315)
Browse files Browse the repository at this point in the history
* #26310 move `DotFieldValidationMessageComponent` to UI lib

* #26310 fix import component on test

* #26310 fix import component on test
  • Loading branch information
oidacra authored and manuelrojas committed Oct 5, 2023
1 parent 3084364 commit 0b8d03f
Show file tree
Hide file tree
Showing 53 changed files with 302 additions and 293 deletions.
5 changes: 2 additions & 3 deletions core-web/apps/dotcms-ui/src/app/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ import { DotContentCompareModule } from '@components/dot-content-compare/dot-con
import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';
import { DotMessageDisplayModule } from '@components/dot-message-display/dot-message-display.module';
import { DotToolbarModule } from '@components/dot-toolbar/dot-toolbar.module';
import { DotIconModule } from '@dotcms/ui';
import { DotFieldValidationMessageComponent, DotIconModule } from '@dotcms/ui';

import { DotActionButtonModule } from './view/components/_common/dot-action-button/dot-action-button.module';
import { DotFieldValidationMessageModule } from './view/components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotGenerateSecurePasswordModule } from './view/components/_common/dot-generate-secure-password/dot-generate-secure-password.module';
import { DotSiteSelectorModule } from './view/components/_common/dot-site-selector/dot-site-selector.module';
import { DotTextareaContentModule } from './view/components/_common/dot-textarea-content/dot-textarea-content.module';
Expand All @@ -51,7 +50,7 @@ export const CUSTOM_MODULES = [
DotTextareaContentModule,
DotWorkflowTaskDetailModule,
DotMessageDisplayModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
IFrameModule,
DotListingDataTableModule,
SearchableDropDownModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ import { MultiSelectModule } from 'primeng/multiselect';

import { of } from 'rxjs/internal/observable/of';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { DotPagesFavoritePageEmptySkeletonComponent } from '@dotcms/app/portlets/dot-pages/dot-pages-favorite-page-empty-skeleton/dot-pages-favorite-page-empty-skeleton.component';
import { DotMessageService, DotSessionStorageService } from '@dotcms/data-access';
import { CoreWebService, CoreWebServiceMock, LoginService } from '@dotcms/dotcms-js';
import { DotPageRender, DotPageRenderState } from '@dotcms/dotcms-models';
import { DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';
import {
LoginServiceMock,
MockDotMessageService,
Expand Down Expand Up @@ -134,7 +137,7 @@ describe('DotFavoritePageComponent', () => {
FormsModule,
MultiSelectModule,
ReactiveFormsModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotFieldRequiredDirective,
DotPagesFavoritePageEmptySkeletonComponent,
HttpClientTestingModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ import { ReactiveFormsModule } from '@angular/forms';
import { ButtonModule } from 'primeng/button';
import { InputTextModule } from 'primeng/inputtext';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotFormDialogModule } from '@components/dot-form-dialog/dot-form-dialog.module';
import { DotTempFileUploadService } from '@dotcms/app/api/services/dot-temp-file-upload/dot-temp-file-upload.service';
import { DotPagesFavoritePageEmptySkeletonComponent } from '@dotcms/app/portlets/dot-pages/dot-pages-favorite-page-empty-skeleton/dot-pages-favorite-page-empty-skeleton.component';
import { DotWorkflowActionsFireService } from '@dotcms/data-access';
import { DotAutofocusDirective, DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotAutofocusDirective,
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';
import { DotPipesModule } from '@pipes/dot-pipes.module';

import { DotFavoritePageComponent } from './dot-favorite-page.component';
Expand All @@ -23,7 +27,7 @@ import { DotFavoritePageComponent } from './dot-favorite-page.component';
ButtonModule,
DotAutofocusDirective,
DotFormDialogModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotPagesFavoritePageEmptySkeletonComponent,
DotPipesModule,
InputTextModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import { By } from '@angular/platform-browser';

import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotMessageService } from '@dotcms/data-access';
import { DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';
import { MockDotMessageService } from '@dotcms/utils-testing';

import { DotTemplatePropsComponent } from './dot-template-props.component';
Expand Down Expand Up @@ -117,7 +120,7 @@ describe('DotTemplatePropsComponent', () => {
DotMessagePipe,
FormsModule,
ReactiveFormsModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotFieldRequiredDirective
],
providers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { InputTextModule } from 'primeng/inputtext';
import { InputTextareaModule } from 'primeng/inputtextarea';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotFormDialogModule } from '@components/dot-form-dialog/dot-form-dialog.module';
import { DotThemeSelectorDropdownModule } from '@components/dot-theme-selector-dropdown/dot-theme-selector-dropdown.module';
import { DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';

import { DotTemplatePropsComponent } from './dot-template-props.component';
import { DotTemplateThumbnailFieldModule } from './dot-template-thumbnail-field/dot-template-thumbnail-field.module';
Expand All @@ -17,7 +20,7 @@ import { DotTemplateThumbnailFieldModule } from './dot-template-thumbnail-field/
declarations: [DotTemplatePropsComponent],
imports: [
CommonModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotFormDialogModule,
FormsModule,
InputTextModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { TableModule } from 'primeng/table';
import { TabViewModule } from 'primeng/tabview';

import { DotActionButtonModule } from '@components/_common/dot-action-button/dot-action-button.module';
import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotDialogActions, DotDialogComponent } from '@components/dot-dialog/dot-dialog.component';
import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
Expand All @@ -41,7 +40,7 @@ import {
DotCMSContentTypeLayoutRow,
DotFieldVariable
} from '@dotcms/dotcms-models';
import { DotIconModule, DotMessagePipe } from '@dotcms/ui';
import { DotFieldValidationMessageComponent, DotIconModule, DotMessagePipe } from '@dotcms/ui';
import { DotLoadingIndicatorService } from '@dotcms/utils';
import {
cleanUpDialog,
Expand Down Expand Up @@ -212,7 +211,7 @@ describe('ContentTypeFieldsDropZoneComponent', () => {
DotIconModule,
DragulaModule,
TableModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
ReactiveFormsModule,
HttpClientTestingModule,
DotMessagePipe,
Expand Down Expand Up @@ -484,7 +483,6 @@ describe('Load fields and drag and drop', () => {
}
]),
DragulaModule,
DotFieldValidationMessageModule,
DotContentTypeFieldsVariablesModule,
FormsModule,
CheckboxModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import {
} from '@angular/forms';
import { By } from '@angular/platform-browser';

import { DotFieldValidationMessageComponent } from '@components/_common/dot-field-validation-message/dot-field-validation-message';
import { DotMessageService } from '@dotcms/data-access';
import { DotMessagePipe } from '@dotcms/ui';
import { DotFieldValidationMessageComponent, DotMessagePipe } from '@dotcms/ui';
import { dotcmsContentTypeFieldBasicMock, MockDotMessageService } from '@dotcms/utils-testing';
import { DotPipesModule } from '@pipes/dot-pipes.module';

Expand All @@ -30,8 +29,13 @@ describe('DefaultValuePropertyComponent', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DefaultValuePropertyComponent, DotFieldValidationMessageComponent],
imports: [ReactiveFormsModule, DotPipesModule, DotMessagePipe],
declarations: [DefaultValuePropertyComponent],
imports: [
ReactiveFormsModule,
DotPipesModule,
DotMessagePipe,
DotFieldValidationMessageComponent
],
providers: [{ provide: DotMessageService, useValue: messageServiceMock }]
}).compileComponents();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import { FormsModule } from '@angular/forms';
import { DropdownModule } from 'primeng/dropdown';
import { RadioButtonModule } from 'primeng/radiobutton';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { SearchableDropDownModule } from '@components/_common/searchable-dropdown';
import { DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';
import { DotPipesModule } from '@pipes/dot-pipes.module';

import { DotCardinalitySelectorComponent } from './dot-cardinality-selector/dot-cardinality-selector.component';
Expand All @@ -28,7 +31,7 @@ import { DotRelationshipService } from './services/dot-relationship.service';
imports: [
CommonModule,
DropdownModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
FormsModule,
RadioButtonModule,
SearchableDropDownModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { InputTextModule } from 'primeng/inputtext';
import { OverlayPanelModule } from 'primeng/overlaypanel';
import { TabViewModule } from 'primeng/tabview';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotPageSelectorModule } from '@components/_common/dot-page-selector/dot-page-selector.module';
import { DotWorkflowsActionsSelectorFieldModule } from '@components/_common/dot-workflows-actions-selector-field/dot-workflows-actions-selector-field.module';
import { DotWorkflowsSelectorFieldModule } from '@components/_common/dot-workflows-selector-field/dot-workflows-selector-field.module';
Expand All @@ -38,7 +37,7 @@ import {
} from '@dotcms/data-access';
import { DotcmsConfigService, LoginService, SiteService } from '@dotcms/dotcms-js';
import { DotCMSContentTypeLayoutRow, DotCMSSystemActionType } from '@dotcms/dotcms-models';
import { DotIconModule, DotMessagePipe } from '@dotcms/ui';
import { DotFieldValidationMessageComponent, DotIconModule, DotMessagePipe } from '@dotcms/ui';
import {
dotcmsContentTypeBasicMock,
dotcmsContentTypeFieldBasicMock,
Expand Down Expand Up @@ -165,7 +164,7 @@ describe('ContentTypesFormComponent', () => {
ButtonModule,
DotDirectivesModule,
DotFieldHelperModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotIconModule,
DotPageSelectorModule,
DotWorkflowsActionsSelectorFieldModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { TabViewModule } from 'primeng/tabview';
import { TooltipModule } from 'primeng/tooltip';

import { DotAddToBundleModule } from '@components/_common/dot-add-to-bundle';
import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotInlineEditModule } from '@components/_common/dot-inline-edit/dot-inline-edit.module';
import { DotMenuModule } from '@components/_common/dot-menu/dot-menu.module';
import { DotPageSelectorModule } from '@components/_common/dot-page-selector/dot-page-selector.module';
Expand All @@ -43,6 +42,7 @@ import { DotContentTypesInfoService, DotWorkflowService } from '@dotcms/data-acc
import {
DotAutofocusDirective,
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotIconModule,
DotMessagePipe
} from '@dotcms/ui';
Expand Down Expand Up @@ -130,7 +130,7 @@ import { DotAddToMenuModule } from '../dot-content-types-listing/components/dot-
DotPipesModule,
DotSecondaryToolbarModule,
DotFieldHelperModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
TooltipModule,
DotIconModule,
DotMaxlengthModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { DropdownModule } from 'primeng/dropdown';
import { InputTextModule } from 'primeng/inputtext';
import { RadioButtonModule } from 'primeng/radiobutton';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';
import { DotMenuServiceMock } from '@components/dot-navigation/services/dot-navigation.service.spec';
import {
Expand All @@ -22,7 +21,7 @@ import {
import { DotMenuService } from '@dotcms/app/api/services/dot-menu.service';
import { DotMessageService } from '@dotcms/data-access';
import { CoreWebService } from '@dotcms/dotcms-js';
import { DotMessagePipe } from '@dotcms/ui';
import { DotFieldValidationMessageComponent, DotMessagePipe } from '@dotcms/ui';
import {
CoreWebServiceMock,
dotcmsContentTypeBasicMock,
Expand Down Expand Up @@ -103,7 +102,7 @@ describe('DotAddToMenuComponent', () => {
DotPipesModule,
DotMessagePipe,
HttpClientTestingModule,
DotFieldValidationMessageModule
DotFieldValidationMessageComponent
],
providers: [
{ provide: CoreWebService, useClass: CoreWebServiceMock },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ import { DropdownModule } from 'primeng/dropdown';
import { InputTextModule } from 'primeng/inputtext';
import { RadioButtonModule } from 'primeng/radiobutton';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';
import { DotNavigationService } from '@components/dot-navigation/services/dot-navigation.service';
import { DotAddToMenuService } from '@dotcms/app/api/services/add-to-menu/add-to-menu.service';
import { DotMenuService } from '@dotcms/app/api/services/dot-menu.service';
import { DotAutofocusDirective, DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotAutofocusDirective,
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';
import { DotPipesModule } from '@pipes/dot-pipes.module';

import { DotAddToMenuComponent } from './dot-add-to-menu.component';
Expand All @@ -23,7 +27,7 @@ import { DotAddToMenuComponent } from './dot-add-to-menu.component';
CommonModule,
DotAutofocusDirective,
DotDialogModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotPipesModule,
DropdownModule,
InputTextModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import { ReactiveFormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotMdIconSelectorModule } from '@components/_common/dot-md-icon-selector/dot-md-icon-selector.module';
import { SiteSelectorFieldModule } from '@components/_common/dot-site-selector-field/dot-site-selector-field.module';
import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';
import { DotEventsService, DotMessageService } from '@dotcms/data-access';
import { CoreWebService, SiteService } from '@dotcms/dotcms-js';
import { DotMessagePipe } from '@dotcms/ui';
import { DotFieldValidationMessageComponent, DotMessagePipe } from '@dotcms/ui';
import { CoreWebServiceMock, MockDotMessageService, SiteServiceMock } from '@dotcms/utils-testing';
import { DotPipesModule } from '@pipes/dot-pipes.module';
import { DotFormSelectorModule } from '@portlets/dot-edit-page/content/components/dot-form-selector/dot-form-selector.module';
Expand Down Expand Up @@ -55,7 +54,7 @@ describe('DotContentTypeCloneDialogComponent', () => {
imports: [
DotFormSelectorModule,
BrowserAnimationsModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotMdIconSelectorModule,
SiteSelectorFieldModule,
DotDialogModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ import { ReactiveFormsModule } from '@angular/forms';

import { InputTextModule } from 'primeng/inputtext';

import { DotFieldValidationMessageModule } from '@components/_common/dot-field-validation-message/dot-file-validation-message.module';
import { DotMdIconSelectorModule } from '@components/_common/dot-md-icon-selector/dot-md-icon-selector.module';
import { SiteSelectorFieldModule } from '@components/_common/dot-site-selector-field/dot-site-selector-field.module';
import { DotBaseTypeSelectorModule } from '@components/dot-base-type-selector';
import { DotDialogModule } from '@components/dot-dialog/dot-dialog.module';
import { DotListingDataTableModule } from '@components/dot-listing-data-table';
import { DotAutofocusDirective, DotFieldRequiredDirective, DotMessagePipe } from '@dotcms/ui';
import {
DotAutofocusDirective,
DotFieldRequiredDirective,
DotFieldValidationMessageComponent,
DotMessagePipe
} from '@dotcms/ui';
import { DotPipesModule } from '@pipes/dot-pipes.module';

import { DotContentTypeCopyDialogComponent } from './dot-content-type-copy-dialog.component';
Expand All @@ -23,7 +27,7 @@ import { DotContentTypeCopyDialogComponent } from './dot-content-type-copy-dialo
DotListingDataTableModule,
DotBaseTypeSelectorModule,
DotPipesModule,
DotFieldValidationMessageModule,
DotFieldValidationMessageComponent,
DotDialogModule,
DotMdIconSelectorModule,
SiteSelectorFieldModule,
Expand Down
Loading

0 comments on commit 0b8d03f

Please sign in to comment.