Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Treeselect in Site/Folder at Edit Content #28700

Merged
merged 43 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4d7e1a8
save
nicobytes May 22, 2024
cbb2204
Merge branch 'master' of github.com:dotCMS/core
nicobytes May 29, 2024
ce1e559
Use of new syntax and upgrade to prettier support for new syntax
nicobytes May 30, 2024
d209418
chore: add new type for host_folder type
nicobytes May 30, 2024
d783cd8
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes May 30, 2024
d3c5ff2
chore: create new component for host folder field
nicobytes May 30, 2024
6523b41
chore: add mock field
nicobytes May 30, 2024
e06df39
chore(edit-content): creating init setup for unit test with the new s…
nicobytes May 31, 2024
e976833
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes May 31, 2024
90af4d2
chore(edit-content): get current data and build current tree #28645
nicobytes Jun 5, 2024
f56b6dd
chore(edit-content): get current data and build current tree #28645
nicobytes Jun 5, 2024
20d005a
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 5, 2024
78d08e4
chore(edit-content): avoid code smells #28645
nicobytes Jun 6, 2024
17e473d
chore(edit-content): apply format #28645
nicobytes Jun 6, 2024
0ae0052
Merge branch 'master' of github.com:dotCMS/core
nicobytes Jun 6, 2024
2552dfc
chore(edit-content): sync with master and resolve conflicts #28645
nicobytes Jun 6, 2024
d4fd2f0
chore(edit-content): sync with master and resolve conflicts #28645
nicobytes Jun 6, 2024
45bbbc7
chore(edit-content): apply format #28645
nicobytes Jun 6, 2024
c470369
chore(edit-content): create unit tests #28645
nicobytes Jun 6, 2024
cb98133
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 6, 2024
54c54eb
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 6, 2024
f290a24
chore(edit-content): apply format #28645
nicobytes Jun 6, 2024
367bbc4
chore(edit-content): unit test #28645
nicobytes Jun 7, 2024
c85ba34
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 7, 2024
a9e75f1
chore(edit-content): add loading in nodes #28645
nicobytes Jun 7, 2024
f75b1a2
chore(edit-content): add loading in nodes #28645
nicobytes Jun 7, 2024
5246759
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 7, 2024
edd6948
Merge branch 'master' of github.com:dotCMS/core
nicobytes Jun 7, 2024
e2c33f5
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 7, 2024
c8196c0
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 8, 2024
e45f43d
Merge branch 'master' of github.com:dotCMS/core
nicobytes Jun 10, 2024
81af59b
chore(edit-content): fix conflicts and format #28645
nicobytes Jun 10, 2024
c6187aa
chore(edit-content): resolve issues #28645
nicobytes Jun 10, 2024
adabb3c
chore(edit-content): add docs #28645
nicobytes Jun 10, 2024
67d03dc
chore(edit-content): fix error with types #28645
nicobytes Jun 10, 2024
6199670
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 10, 2024
a755236
chore(edit-content): use signals convention #28645
nicobytes Jun 10, 2024
3001658
Merge branch '28645-use-treeselect-in-sitefolder-at-edit-content' of …
nicobytes Jun 10, 2024
40d870f
chore(edit-content): fix error #28645
nicobytes Jun 10, 2024
b578f82
chore(edit-content): apply format #28645
nicobytes Jun 10, 2024
2c30d29
Merge branch 'master' of github.com:dotCMS/core
nicobytes Jun 10, 2024
860c52d
save
nicobytes Jun 10, 2024
bc9a549
Merge branch 'master' into 28645-use-treeselect-in-sitefolder-at-edit…
nicobytes Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core-web/apps/dotcdn/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export class AppComponent implements OnInit {
chartHeight = '25rem';
options: CdnChartOptions;

constructor(private fb: UntypedFormBuilder, private dotCdnStore: DotCDNStore) {}
constructor(
private fb: UntypedFormBuilder,
private dotCdnStore: DotCDNStore
) {}

ngOnInit(): void {
this.setChartOptions();
Expand Down
5 changes: 4 additions & 1 deletion core-web/apps/dotcdn/src/app/dotcdn.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { DotCDNStats, PurgeReturnData, PurgeUrlOptions } from './app.models';
providedIn: 'root'
})
export class DotCDNService {
constructor(private coreWebService: CoreWebService, private siteService: SiteService) {}
constructor(
private coreWebService: CoreWebService,
private siteService: SiteService
) {}

/**
* Request stats via Core Web Service
Expand Down
2 changes: 1 addition & 1 deletion core-web/apps/dotcdn/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion core-web/apps/dotcms-binary-field-builder/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion core-web/apps/dotcms-block-editor/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { LoginService } from '@dotcms/dotcms-js';
*/
@Injectable()
export class AuthGuardService implements CanActivate {
constructor(private dotRouterService: DotRouterService, private loginService: LoginService) {}
constructor(
private dotRouterService: DotRouterService,
private loginService: LoginService
) {}

canActivate(_route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
return this.loginService.isLogin$.pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { LoginService } from '@dotcms/dotcms-js';
*/
@Injectable()
export class PublicAuthGuardService implements CanActivate {
constructor(private router: DotRouterService, private loginService: LoginService) {}
constructor(
private router: DotRouterService,
private loginService: LoginService
) {}

/**
* Guard checks is the User is logged in to redirect to the First Portlet otherwise approve the route request.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span *ngIf="show" #lockedPageMessage class="page-info__locked-by-message">
{{ 'editpage.toolbar.page.locked.by.user' | dm : [pageState.page.lockedByName] }}
{{ 'editpage.toolbar.page.locked.by.user' | dm: [pageState.page.lockedByName] }}
</span>

<span *ngIf="!pageState.page.canEdit" #lockedPageMessage class="page-info__cant-edit-message">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
[disabled]="!pageState.page.canLock"
[pTooltip]="
pageState.state.lockedByAnotherUser && pageState.page.canEdit
? ('editpage.toolbar.page.locked.by.user' | dm : [pageState.page.lockedByName])
? ('editpage.toolbar.page.locked.by.user' | dm: [pageState.page.lockedByName])
: null
"
[tooltipPosition]="pageState.page.lockedByName ? 'top' : null"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ p-inputSwitch {
position: absolute;
text-rendering: auto;
top: 1px;
transition: transform $basic-speed ease-in, color $basic-speed ease-in;
transition:
transform $basic-speed ease-in,
color $basic-speed ease-in;
}

.p-inputswitch-checked .p-inputswitch-slider:after {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h2>{{ variant.experimentName }}</h2>
' ' +
('dot.common.until' | dm) +
' ' +
(runningExperiment.scheduling.endDate | date : runningUntilDateFormat)
(runningExperiment.scheduling.endDate | date: runningUntilDateFormat)
"
class="sm p-tag-success dot-edit__experiments-results-tag"
data-testId="runningExperimentTag"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { DotMenuService } from '@dotcms/app/api/services/dot-menu.service';
export class DotLegacyTemplateAdditionalActionsComponent implements OnInit {
url: Observable<string>;

constructor(private route: ActivatedRoute, private dotMenuService: DotMenuService) {}
constructor(
private route: ActivatedRoute,
private dotMenuService: DotMenuService
) {}

ngOnInit(): void {
this.url = this.route.params.pipe(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span *ngIf="show" class="page-info__locked-by-message" #lockedPageMessage>
{{ 'editpage.toolbar.page.locked.by.user' | dm : [pageState.page.lockedByName] }}
{{ 'editpage.toolbar.page.locked.by.user' | dm: [pageState.page.lockedByName] }}
</span>

<span *ngIf="!pageState.page.canEdit" class="page-info__cant-edit-message" #lockedPageMessage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<span
[pTooltip]="
pageState.state.lockedByAnotherUser && pageState.page.canEdit
? ('editpage.toolbar.page.locked.by.user' | dm : [pageState.page.lockedByName])
? ('editpage.toolbar.page.locked.by.user' | dm: [pageState.page.lockedByName])
: ('lock.clipboard' | dm)
"
tooltipPosition="bottom"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ p-inputSwitch {
position: absolute;
text-rendering: auto;
top: 0;
transition: transform $basic-speed ease-in, color $basic-speed ease-in;
transition:
transform $basic-speed ease-in,
color $basic-speed ease-in;
}

.p-inputswitch-checked .p-inputswitch-slider:after {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h2>{{ variant.experimentName }}</h2>
' ' +
('dot.common.until' | dm) +
' ' +
(runningExperiment.scheduling.endDate | date : runningUntilDateFormat)
(runningExperiment.scheduling.endDate | date: runningUntilDateFormat)
"
[routerLink]="[
'/edit-page/experiments/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
rejectButtonStyleClass="p-button-outlined" />

@if (showEditJSPDialog()) {
<dot-iframe-dialog
(custom)="customIframeDialog($event)"
(shutdown)="removeEditJSPDialog()"
[header]="pageState.page.title"
[url]="urlEditPageIframeDialog()" />
<dot-iframe-dialog
(custom)="customIframeDialog($event)"
(shutdown)="removeEditJSPDialog()"
[header]="pageState.page.title"
[url]="urlEditPageIframeDialog()" />
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export class DotPagesListingPanelComponent implements OnInit, OnDestroy, AfterVi
draft: this.dotMessageService.get('Draft')
};

constructor(private store: DotPageStore, private dotMessageService: DotMessageService) {}
constructor(
private store: DotPageStore,
private dotMessageService: DotMessageService
) {}

ngOnInit() {
this.store.actionMenuDomId$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2 class="dot-starter-title" data-testId="dot-starter-title">
{{ 'starter.title' | dm }}
</h2>
<p
[innerHTML]="'starter.description' | dm : [user.username]"
[innerHTML]="'starter.description' | dm: [user.username]"
class="dot-starter-description"></p>
</div>
<p-checkbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export class DotStarterComponent implements OnInit {
showCreatePageLink: boolean;
showCreateTemplateLink: boolean;

constructor(private route: ActivatedRoute, private dotAccountService: DotAccountService) {}
constructor(
private route: ActivatedRoute,
private dotAccountService: DotAccountService
) {}

ngOnInit() {
this.userData$ = this.route.data.pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export class DotTemplateAdvancedComponent implements OnInit, OnDestroy, OnChange
actions: DotPortletToolbarActions;
private destroy$: Subject<boolean> = new Subject<boolean>();

constructor(private fb: UntypedFormBuilder, private dotMessageService: DotMessageService) {}
constructor(
private fb: UntypedFormBuilder,
private dotMessageService: DotMessageService
) {}

ngOnInit(): void {
this.form = this.fb.group({ body: this.body });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { DotTemplate } from '@dotcms/dotcms-models';

@Injectable()
export class DotTemplateCreateEditResolver implements Resolve<DotTemplate> {
constructor(private service: DotTemplatesService, private dotRouterService: DotRouterService) {}
constructor(
private service: DotTemplatesService,
private dotRouterService: DotRouterService
) {}

resolve(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable<DotTemplate> {
const inode = route.paramMap.get('inode');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
</small>
</div>
@for (option of systemOptions; track option.key) {
<p-divider
[style]="{
margin: '1rem 0'
}"></p-divider>
<div class="horizontal-field" formGroupName="systemOptions">
<p [innerHTML]="option.message | dm" class="info"></p>
<p-inputSwitch [formControlName]="option.key" data-testId="setting-switch"></p-inputSwitch>
</div>
<p-divider
[style]="{
margin: '1rem 0'
}"></p-divider>
<div class="horizontal-field" formGroupName="systemOptions">
<p [innerHTML]="option.message | dm" class="info"></p>
<p-inputSwitch
[formControlName]="option.key"
data-testId="setting-switch"></p-inputSwitch>
</div>
}
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export class ContentTypesFieldDragabbleItemComponent implements OnInit {
fieldAttributesString: string;
icon: string;

constructor(private dotMessageService: DotMessageService, public fieldService: FieldService) {}
constructor(
private dotMessageService: DotMessageService,
public fieldService: FieldService
) {}

ngOnInit(): void {
this.fieldTypeLabel = this.field.fieldTypeLabel ? this.field.fieldTypeLabel : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,26 @@
</div>
</p-tabPanel>
@if (!!currentField?.id && isFieldWithSettings) {
<p-tabPanel [header]="'Settings'" [disabled]="!currentField?.id" #panel>
@switch (this.currentFieldType?.clazz) { @case
('com.dotcms.contenttype.model.field.ImmutableStoryBlockField') {
<dot-block-editor-settings
(changeControls)="changesDialogActions($event)"
(save)="toggleDialog()"
(valid)="setDialogOkButtonState($event)"
[field]="currentField"
[isVisible]="panel.selected"></dot-block-editor-settings>
} @case ('com.dotcms.contenttype.model.field.ImmutableBinaryField') {
<dot-binary-settings
(save)="toggleDialog()"
(valid)="setDialogOkButtonState($event)"
(changeControls)="changesDialogActions($event)"
[field]="currentField"
[isVisible]="panel.selected"></dot-binary-settings>
} }
</p-tabPanel>
<p-tabPanel [header]="'Settings'" [disabled]="!currentField?.id" #panel>
@switch (this.currentFieldType?.clazz) {
@case ('com.dotcms.contenttype.model.field.ImmutableStoryBlockField') {
<dot-block-editor-settings
(changeControls)="changesDialogActions($event)"
(save)="toggleDialog()"
(valid)="setDialogOkButtonState($event)"
[field]="currentField"
[isVisible]="panel.selected"></dot-block-editor-settings>
}
@case ('com.dotcms.contenttype.model.field.ImmutableBinaryField') {
<dot-binary-settings
(save)="toggleDialog()"
(valid)="setDialogOkButtonState($event)"
(changeControls)="changesDialogActions($event)"
[field]="currentField"
[isVisible]="panel.selected"></dot-binary-settings>
}
}
</p-tabPanel>
}

<p-tabPanel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
formControlName="name"
dotAutofocus />
<dot-field-validation-message
[message]="'dot.common.message.field.required' | dm : [nameFieldLabel]"
[message]="'dot.common.message.field.required' | dm: [nameFieldLabel]"
[field]="form.get('name')"></dot-field-validation-message>
</div>
<div class="field">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(hide)="close()"
[(visible)]="contentType"
[actions]="dialogActions"
[header]="'contenttypes.content.add_to_menu.header' | dm : [contentType?.name]"
[header]="'contenttypes.content.add_to_menu.header' | dm: [contentType?.name]"
width="592px">
<form (ngSubmit)="submit()" [formGroup]="form" class="p-fluid" novalidate>
<div class="field">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dot-field-validation-message
[field]="nameControl"
[message]="
'dot.common.message.field.required' | dm : [inputNameWithType]
'dot.common.message.field.required' | dm: [inputNameWithType]
"></dot-field-validation-message>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const DEFAULT_CONFIG_FOR_NOT_EMPTY_GRID_TEMPLATE: Record<string, boolean | numbe
*/

export class DotLayoutGrid {
constructor(private dotLayoutGridBoxs: DotLayoutGridBox[], private rowClasses: string[]) {}
constructor(
private dotLayoutGridBoxs: DotLayoutGridBox[],
private rowClasses: string[]
) {}

static getDefaultConfig(): NgGridItemConfig {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import { DotActionBulkResult } from '@dotcms/dotcms-models';
})
export class DotBulkInformationComponent implements OnInit {
data: DotActionBulkResult;
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig) {}
constructor(
public ref: DynamicDialogRef,
public config: DynamicDialogConfig
) {}
ngOnInit(): void {
this.data = this.config.data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export class DotGlobalMessageComponent implements OnInit, OnDestroy {
};
private destroy$: Subject<boolean> = new Subject<boolean>();

constructor(private dotEventsService: DotEventsService, private cd: ChangeDetectorRef) {}
constructor(
private dotEventsService: DotEventsService,
private cd: ChangeDetectorRef
) {}

ngOnDestroy(): void {
this.destroy$.next(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ dot-material-icon-picker {

.dot-material-icon__list {
border: 0;
box-shadow: 0 5px 5px -3px $color-palette-black-op-20,
0 8px 10px 1px $color-palette-black-op-10, 0 3px 14px 2px $color-palette-black-op-10;
box-shadow:
0 5px 5px -3px $color-palette-black-op-20,
0 8px 10px 1px $color-palette-black-op-10,
0 3px 14px 2px $color-palette-black-op-10;
color: $black;

li:hover {
Expand Down
Loading
Loading