Skip to content

Commit

Permalink
#26033 Move DotRelativeDatePipe to UI lib (#26331)
Browse files Browse the repository at this point in the history
* 26033 move `DotRelativeDatePipe` to UI lib

* #26033 fix lint
  • Loading branch information
oidacra authored Oct 3, 2023
1 parent 86dc2de commit 177fe24
Show file tree
Hide file tree
Showing 60 changed files with 98 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { DotMessageDisplayServiceMock } from '@components/dot-message-display/do
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotAlertConfirmService } from '@dotcms/data-access';
import { CoreWebService, LoginService } from '@dotcms/dotcms-js';
import { DotFormatDateService } from '@dotcms/ui';
import {
CoreWebServiceMock,
DotFormatDateServiceMock,
LoginServiceMock,
MockDotRouterService,
mockResponseView
} from '@dotcms/utils-testing';
import { DotFormatDateService } from '@services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@services/dot-router/dot-router.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { ConfirmationService } from 'primeng/api';

import { DotMessageDisplayServiceMock } from '@components/dot-message-display/dot-message-display.component.spec';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { DotAlertConfirmService } from '@dotcms/data-access';
import { CoreWebService, LoginService } from '@dotcms/dotcms-js';
import { DotFormatDateService } from '@dotcms/ui';
import {
CoreWebServiceMock,
DotFormatDateServiceMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { DotMessageDisplayService } from '@components/dot-message-display/servic
import { DotAlertConfirmService } from '@dotcms/data-access';
import { CoreWebService, LoginService } from '@dotcms/dotcms-js';
import { DotApps, DotAppsImportConfiguration, DotAppsSaveData } from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import * as dotUtils from '@dotcms/utils/lib/dot-utils';
import {
CoreWebServiceMock,
Expand All @@ -22,7 +23,6 @@ import {

import { DotAppsService } from './dot-apps.service';

import { DotFormatDateService } from '../dot-format-date-service';
import { DotHttpErrorManagerService } from '../dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '../dot-router/dot-router.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
UserModel
} from '@dotcms/dotcms-js';
import { FeaturedFlags } from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import { DotLoadingIndicatorService } from '@dotcms/utils';
import {
CoreWebServiceMock,
Expand All @@ -46,7 +47,6 @@ import {
} from '@dotcms/utils-testing';
import { DotCustomEventHandlerService } from '@services/dot-custom-event-handler/dot-custom-event-handler.service';
import { DotDownloadBundleDialogService } from '@services/dot-download-bundle-dialog/dot-download-bundle-dialog.service';
import { DotFormatDateService } from '@services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';
import { DotMenuService } from '@services/dot-menu.service';
import { DotRouterService } from '@services/dot-router/dot-router.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/
import { DotMessageDisplayServiceMock } from '@components/dot-message-display/dot-message-display.component.spec';
import { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { DotWizardService } from '@dotcms/app/api/services/dot-wizard/dot-wizard.service';
Expand Down Expand Up @@ -46,6 +45,7 @@ import {
DotProcessedWorkflowPayload,
DotWorkflowPayload
} from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import {
CoreWebServiceMock,
DotFormatDateServiceMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { DotPushPublishFormComponent } from '@components/_common/forms/dot-push-
import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service';
import { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { PushPublishService } from '@dotcms/app/api/services/push-publish/push-publish.service';
import { DotMessageService, DotWorkflowActionsFireService } from '@dotcms/data-access';
Expand All @@ -23,6 +22,7 @@ import {
DotProcessedWorkflowPayload,
DotWorkflowPayload
} from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import { DotEnvironment } from '@models/dot-environment/dot-environment';
import { DotWizardInput } from '@models/dot-wizard-input/dot-wizard-input.model';
import { DotWizardStep } from '@models/dot-wizard-step/dot-wizard-step.model';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { of } from 'rxjs';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';

import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotCurrentUserService } from '@dotcms/data-access';
import { ApiRoot, CoreWebService, LoggerService, StringUtils, UserModel } from '@dotcms/dotcms-js';
import { DotFormatDateService } from '@dotcms/ui';
import { CoreWebServiceMock, DotFormatDateServiceMock } from '@dotcms/utils-testing';
import { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publish-data';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { Injectable } from '@angular/core';

import { filter, map, mergeMap, pluck, toArray } from 'rxjs/operators';

import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotCurrentUserService } from '@dotcms/data-access';
import { ApiRoot, CoreWebService } from '@dotcms/dotcms-js';
import { DotAjaxActionResponseView, DotCurrentUser } from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import { DotEnvironment } from '@models/dot-environment/dot-environment';
import { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publish-data';

Expand All @@ -19,7 +19,6 @@ import { DotPushPublishData } from '@models/dot-push-publish-data/dot-push-publi
@Injectable()
export class PushPublishService {
private pushEnvironementsUrl = '/api/environment/loadenvironments/roleId';
private _lastEnvironmentPushed: string[];
/*
TODO: I had to do this because this line concat'api/' into the URL
https://github.com/dotCMS/dotcms-js/blob/master/src/core/core-web.service.ts#L169
Expand All @@ -34,6 +33,12 @@ export class PushPublishService {
private dotFormatDateService: DotFormatDateService
) {}

private _lastEnvironmentPushed: string[];

get lastEnvironmentPushed(): string[] {
return this._lastEnvironmentPushed;
}

/**
* Get push publish environments.
* @returns Observable<DotEnvironment[]>
Expand Down Expand Up @@ -120,8 +125,4 @@ export class PushPublishService {

return result;
}

get lastEnvironmentPushed(): string[] {
return this._lastEnvironmentPushed;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { of } from 'rxjs';
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA, Component, EventEmitter, Input, Output } from '@angular/core';
import { Component, CUSTOM_ELEMENTS_SCHEMA, EventEmitter, Input, Output } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
Expand All @@ -24,7 +24,6 @@ import { ActionHeaderModule } from '@components/dot-listing-data-table/action-he
import { DotMessageDisplayServiceMock } from '@components/dot-message-display/dot-message-display.component.spec';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotPortletBaseModule } from '@components/dot-portlet-base/dot-portlet-base.module';
import { DotRelativeDatePipe } from '@dotcms/app/view/pipes/dot-relative-date/dot-relative-date.pipe';
import {
DotAlertConfirmService,
DotMessageService,
Expand All @@ -46,15 +45,14 @@ import {
StringUtils
} from '@dotcms/dotcms-js';
import { CONTAINER_SOURCE, DotActionBulkResult, DotContainer } from '@dotcms/dotcms-models';
import { DotMessagePipe } from '@dotcms/ui';
import { DotFormatDateService, DotMessagePipe, DotRelativeDatePipe } from '@dotcms/ui';
import {
DotcmsConfigServiceMock,
DotFormatDateServiceMock,
MockDotMessageService,
SiteServiceMock
} from '@dotcms/utils-testing';
import { DotContainersService } from '@services/dot-containers/dot-containers.service';
import { DotFormatDateService } from '@services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@services/dot-router/dot-router.service';
import { dotEventSocketURLFactory } from '@tests/dot-test-bed';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ import { DotEmptyStateModule } from '@components/_common/dot-empty-state/dot-emp
import { DotContentTypeSelectorModule } from '@components/dot-content-type-selector';
import { ActionHeaderModule } from '@components/dot-listing-data-table/action-header/action-header.module';
import { DotPortletBaseModule } from '@components/dot-portlet-base/dot-portlet-base.module';
import { DotRelativeDatePipe } from '@dotcms/app/view/pipes/dot-relative-date/dot-relative-date.pipe';
import { DotSiteBrowserService } from '@dotcms/data-access';
import { DotMessagePipe } from '@dotcms/ui';
import { DotMessagePipe, DotRelativeDatePipe } from '@dotcms/ui';
import { DotContainerListResolver } from '@portlets/dot-containers/container-list/dot-container-list-resolver.service';
import { DotContainersService } from '@services/dot-containers/dot-containers.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
StringUtils,
UserModel
} from '@dotcms/dotcms-js';
import { DotFormatDateService } from '@dotcms/ui';
import { CoreWebServiceMock } from '@dotcms/utils-testing';
import { DotFormatDateService } from '@services/dot-format-date-service';
import { PushPublishService } from '@services/push-publish/push-publish.service';

import { DotContainerListResolver } from './dot-container-list-resolver.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ import {
StringUtils
} from '@dotcms/dotcms-js';
import { DotCMSContentType } from '@dotcms/dotcms-models';
import { DotAutofocusDirective, DotMessagePipe } from '@dotcms/ui';
import { DotAutofocusDirective, DotFormatDateService, DotMessagePipe } from '@dotcms/ui';
import {
CoreWebServiceMock,
DotFormatDateServiceMock,
MockDotMessageService
} from '@dotcms/utils-testing';
import { DotContainersService } from '@services/dot-containers/dot-containers.service';
import { DotFormatDateService } from '@services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@services/dot-router/dot-router.service';
import { dotEventSocketURLFactory } from '@tests/dot-test-bed';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { DotWizardModule } from '@components/_common/dot-wizard/dot-wizard.modul
import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { dotEventSocketURLFactory } from '@dotcms/app/test/dot-test-bed';
Expand Down Expand Up @@ -56,7 +55,7 @@ import {
ESContent,
RUNNING_UNTIL_DATE_FORMAT
} from '@dotcms/dotcms-models';
import { DotMessagePipe } from '@dotcms/ui';
import { DotFormatDateService, DotMessagePipe } from '@dotcms/ui';
import {
CoreWebServiceMock,
dotcmsContentletMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { DotGlobalMessageService } from '@components/_common/dot-global-message/
import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/dot-iframe.service';
import { DotMessageSeverity, DotMessageType } from '@components/dot-message-display/model';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { DotWizardService } from '@dotcms/app/api/services/dot-wizard/dot-wizard.service';
Expand All @@ -43,6 +42,7 @@ import {
StringUtils
} from '@dotcms/dotcms-js';
import { DotPage } from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import {
CoreWebServiceMock,
dotcmsContentletMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ConfirmationService } from 'primeng/api';
import { DotMessageDisplayServiceMock } from '@components/dot-message-display/dot-message-display.component.spec';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotFavoritePageService } from '@dotcms/app/api/services/dot-favorite-page/dot-favorite-page.service';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import {
Expand All @@ -29,6 +28,7 @@ import {
DotPersona
} from '@dotcms/dotcms-models';
import { DotExperimentsService } from '@dotcms/portlets/dot-experiments/data-access';
import { DotFormatDateService } from '@dotcms/ui';
import {
CoreWebServiceMock,
dotcmsContentletMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/
import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotCustomEventHandlerService } from '@dotcms/app/api/services/dot-custom-event-handler/dot-custom-event-handler.service';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { DotUiColorsService } from '@dotcms/app/api/services/dot-ui-colors/dot-ui-colors.service';
Expand Down Expand Up @@ -48,6 +47,7 @@ import {
UserModel
} from '@dotcms/dotcms-js';
import { DotPageRender, DotPageRenderState } from '@dotcms/dotcms-models';
import { DotFormatDateService } from '@dotcms/ui';
import { DotLoadingIndicatorService } from '@dotcms/utils';
import {
MockDotMessageService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { DotIframeService } from '@components/_common/iframe/service/dot-iframe/
import { DotContentletEditorService } from '@components/dot-contentlet-editor/services/dot-contentlet-editor.service';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotSecondaryToolbarModule } from '@components/dot-secondary-toolbar';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { dotEventSocketURLFactory } from '@dotcms/app/test/dot-test-bed';
Expand Down Expand Up @@ -57,7 +56,7 @@ import {
ESContent,
RUNNING_UNTIL_DATE_FORMAT
} from '@dotcms/dotcms-models';
import { DotMessagePipe } from '@dotcms/ui';
import { DotFormatDateService, DotMessagePipe } from '@dotcms/ui';
import {
CoreWebServiceMock,
dotcmsContentletMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { ConfirmationService } from 'primeng/api';
import { DotMessageDisplayServiceMock } from '@components/dot-message-display/dot-message-display.component.spec';
import { DotMessageDisplayService } from '@components/dot-message-display/services';
import { DotFavoritePageService } from '@dotcms/app/api/services/dot-favorite-page/dot-favorite-page.service';
import { DotFormatDateService } from '@dotcms/app/api/services/dot-format-date-service';
import { DotHttpErrorManagerService } from '@dotcms/app/api/services/dot-http-error-manager/dot-http-error-manager.service';
import { DotRouterService } from '@dotcms/app/api/services/dot-router/dot-router.service';
import { MockDotHttpErrorManagerService } from '@dotcms/app/test/dot-http-error-manager.service.mock';
Expand All @@ -27,6 +26,7 @@ import {
import { CoreWebService, HttpCode, LoginService, SiteService } from '@dotcms/dotcms-js';
import { DotPageMode, DotPageRender, DotPageRenderState } from '@dotcms/dotcms-models';
import { DotExperimentsService } from '@dotcms/portlets/dot-experiments/data-access';
import { DotFormatDateService } from '@dotcms/ui';
import {
CoreWebServiceMock,
LoginServiceMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ import { TooltipModule } from 'primeng/tooltip';

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

import { DotRelativeDatePipe } from '@dotcms/app/view/pipes/dot-relative-date/dot-relative-date.pipe';
import { DotMessageService } from '@dotcms/data-access';
import { CoreWebService, CoreWebServiceMock, DotcmsConfigService } from '@dotcms/dotcms-js';
import { DotAutofocusDirective, DotMessagePipe } from '@dotcms/ui';
import { DotAutofocusDirective, DotMessagePipe, DotRelativeDatePipe } from '@dotcms/ui';
import {
DotcmsConfigServiceMock,
dotcmsContentletMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import { SkeletonModule } from 'primeng/skeleton';
import { TableModule } from 'primeng/table';
import { TooltipModule } from 'primeng/tooltip';

import { DotRelativeDatePipe } from '@dotcms/app/view/pipes/dot-relative-date/dot-relative-date.pipe';
import { DotAutofocusDirective, DotMessagePipe } from '@dotcms/ui';
import { DotAutofocusDirective, DotMessagePipe, DotRelativeDatePipe } from '@dotcms/ui';

import { DotPagesListingPanelComponent } from './dot-pages-listing-panel.component';

Expand Down
Loading

0 comments on commit 177fe24

Please sign in to comment.