clean up TOCENTRY_ID_PREFIX
This commit is contained in:
parent
232915e155
commit
0860781cdf
|
@ -100,7 +100,7 @@
|
||||||
<div class="row toc-pane-container" #boundary>
|
<div class="row toc-pane-container" #boundary>
|
||||||
<div #spacer></div>
|
<div #spacer></div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<app-table-of-contents [visibilityRulesService]="visibilityRulesService" [selectedFieldsetId]="fieldsetIdWithFocus" #table0fContents [showErrors]="showtocentriesErrors" [TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX" [hasFocus]="step > 0" [formGroup]="formGroup.get('properties')" [descriptionTemplate]="item.descriptionTemplate" *ngIf="formGroup" [links]="links" [boundary]="boundary" [spacer]="spacer" [isActive]="step !== 0" stickyThing (stepFound)="onStepFound($event)" (currentLinks)="getLinks($event)" (entrySelected)="changeStep($event.entry, $event.execute)" [pageToFieldSetMap]="pageToFieldSetMap"></app-table-of-contents>
|
<app-table-of-contents [visibilityRulesService]="visibilityRulesService" [selectedFieldsetId]="fieldsetIdWithFocus" #table0fContents [showErrors]="showtocentriesErrors" [hasFocus]="step > 0" [formGroup]="formGroup.get('properties')" [descriptionTemplate]="item.descriptionTemplate" *ngIf="formGroup" [links]="links" [boundary]="boundary" [spacer]="spacer" [isActive]="step !== 0" stickyThing (stepFound)="onStepFound($event)" (currentLinks)="getLinks($event)" (entrySelected)="changeStep($event.entry, $event.execute)" [pageToFieldSetMap]="pageToFieldSetMap"></app-table-of-contents>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,7 +146,6 @@
|
||||||
[descriptionId]="formGroup.get('id').value"
|
[descriptionId]="formGroup.get('id').value"
|
||||||
[descriptionTemplate]="item.descriptionTemplate"
|
[descriptionTemplate]="item.descriptionTemplate"
|
||||||
[visibilityRulesService]="visibilityRulesService"
|
[visibilityRulesService]="visibilityRulesService"
|
||||||
[TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX"
|
|
||||||
[hidden]="this.step === 0"
|
[hidden]="this.step === 0"
|
||||||
[linkToScroll]="linkToScroll"
|
[linkToScroll]="linkToScroll"
|
||||||
[validationErrorModel]="editorModel.validationErrorModel"
|
[validationErrorModel]="editorModel.validationErrorModel"
|
||||||
|
|
|
@ -37,7 +37,6 @@ export class DescriptionFormSectionComponent extends BaseComponent implements On
|
||||||
subsectionLinkToScroll: LinkToScroll;
|
subsectionLinkToScroll: LinkToScroll;
|
||||||
@Output() askedToScroll = new EventEmitter<string>();
|
@Output() askedToScroll = new EventEmitter<string>();
|
||||||
tocentriesType = ToCEntryType;
|
tocentriesType = ToCEntryType;
|
||||||
@Input() TOCENTRY_ID_PREFIX = "";
|
|
||||||
@Input() validationErrorModel: ValidationErrorModel;
|
@Input() validationErrorModel: ValidationErrorModel;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|
|
@ -33,7 +33,6 @@ export class DescriptionFormComponent extends BaseComponent implements OnInit, A
|
||||||
// tocentries: ToCEntry[];
|
// tocentries: ToCEntry[];
|
||||||
|
|
||||||
|
|
||||||
@Input() TOCENTRY_ID_PREFIX = "";
|
|
||||||
@Input() validationErrorModel: ValidationErrorModel;
|
@Input() validationErrorModel: ValidationErrorModel;
|
||||||
|
|
||||||
// public hiddenEntriesIds: string[] = [];
|
// public hiddenEntriesIds: string[] = [];
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
*ngIf="entry.subEntries && entry.subEntries.length && expandChildren[idx]"
|
*ngIf="entry.subEntries && entry.subEntries.length && expandChildren[idx]"
|
||||||
(entrySelected)="onEntrySelected($event)"
|
(entrySelected)="onEntrySelected($event)"
|
||||||
[selected]="selected"
|
[selected]="selected"
|
||||||
[TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX"
|
|
||||||
[showErrors]="showErrors"
|
[showErrors]="showErrors"
|
||||||
[hiddenEntries]="hiddenEntries"
|
[hiddenEntries]="hiddenEntries"
|
||||||
[visibilityRulesService]="visibilityRulesService"
|
[visibilityRulesService]="visibilityRulesService"
|
||||||
|
|
|
@ -23,7 +23,6 @@ export class TableOfContentsInternal implements OnInit, OnDestroy {
|
||||||
|
|
||||||
expandChildren: boolean[];
|
expandChildren: boolean[];
|
||||||
tocEntryTypeEnum = ToCEntryType;
|
tocEntryTypeEnum = ToCEntryType;
|
||||||
@Input() TOCENTRY_ID_PREFIX = "";
|
|
||||||
@Input() showErrors: boolean = false;
|
@Input() showErrors: boolean = false;
|
||||||
@Input() hiddenEntries: string[] = [];
|
@Input() hiddenEntries: string[] = [];
|
||||||
@Input() visibilityRulesService: VisibilityRulesService;
|
@Input() visibilityRulesService: VisibilityRulesService;
|
||||||
|
@ -154,7 +153,6 @@ export class TableOfContentsInternal implements OnInit, OnDestroy {
|
||||||
if (entry.type === ToCEntryType.FieldSet) {
|
if (entry.type === ToCEntryType.FieldSet) {
|
||||||
|
|
||||||
const fieldSetId = entry.id;
|
const fieldSetId = entry.id;
|
||||||
// const element = document.getElementById(this.TOCENTRY_ID_PREFIX + fieldSetId);
|
|
||||||
const element = document.getElementById(fieldSetId);
|
const element = document.getElementById(fieldSetId);
|
||||||
if (element) {
|
if (element) {
|
||||||
element.click();//open mat expansion panel
|
element.click();//open mat expansion panel
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div *ngIf="tocentries" class="row docs-toc-container">
|
<div *ngIf="tocentries" class="row docs-toc-container">
|
||||||
|
|
||||||
<div class="scroll-container col-12 internal-table">
|
<div class="scroll-container col-12 internal-table">
|
||||||
<table-of-contents-internal #internalTable [TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX" [tocentries]="tocentries"
|
<table-of-contents-internal #internalTable [tocentries]="tocentries"
|
||||||
[showErrors]="showErrors"
|
[showErrors]="showErrors"
|
||||||
(entrySelected)="onToCentrySelected($event)"
|
(entrySelected)="onToCentrySelected($event)"
|
||||||
[selected]="tocentrySelected"
|
[selected]="tocentrySelected"
|
||||||
|
|
|
@ -50,7 +50,6 @@ export class TableOfContentsComponent extends BaseComponent implements OnInit, O
|
||||||
@Input() isActive: boolean;
|
@Input() isActive: boolean;
|
||||||
|
|
||||||
tocentries: ToCEntry[] = null;
|
tocentries: ToCEntry[] = null;
|
||||||
@Input() TOCENTRY_ID_PREFIX = '';
|
|
||||||
@Input() showErrors: boolean = false;
|
@Input() showErrors: boolean = false;
|
||||||
@Input() selectedFieldsetId: string;
|
@Input() selectedFieldsetId: string;
|
||||||
|
|
||||||
|
@ -222,8 +221,7 @@ export class TableOfContentsComponent extends BaseComponent implements OnInit, O
|
||||||
entries.forEach(ie => {
|
entries.forEach(ie => {
|
||||||
if (ie.isIntersecting) {
|
if (ie.isIntersecting) {
|
||||||
try {
|
try {
|
||||||
// const target_id = ie.target.id.replace(this.TOCENTRY_ID_PREFIX, '');
|
const target_id = ie.target.id;
|
||||||
const target_id = ie.target.id;//.replace(this.TOCENTRY_ID_PREFIX, '');
|
|
||||||
if (this.visibilityRulesService.isVisibleMap[target_id] ?? true) {
|
if (this.visibilityRulesService.isVisibleMap[target_id] ?? true) {
|
||||||
this.onToCentrySelected(this._findTocEntryById(target_id, this.tocentries));
|
this.onToCentrySelected(this._findTocEntryById(target_id, this.tocentries));
|
||||||
}
|
}
|
||||||
|
@ -239,7 +237,6 @@ export class TableOfContentsComponent extends BaseComponent implements OnInit, O
|
||||||
fieldsetsEtries.forEach(e => {
|
fieldsetsEtries.forEach(e => {
|
||||||
if (e.type === ToCEntryType.FieldSet) {
|
if (e.type === ToCEntryType.FieldSet) {
|
||||||
try {
|
try {
|
||||||
// const targetElement = document.getElementById(this.TOCENTRY_ID_PREFIX + e.id);
|
|
||||||
const targetElement = document.getElementById(e.id);
|
const targetElement = document.getElementById(e.id);
|
||||||
this._intersectionObserver.observe(targetElement);
|
this._intersectionObserver.observe(targetElement);
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
@ -357,7 +357,6 @@ export class DmpBlueprintValueEditorModel implements DmpBlueprintValuePersist {
|
||||||
|
|
||||||
}
|
}
|
||||||
this.isRequired = field.required;
|
this.isRequired = field.required;
|
||||||
if (this.isRequired) console.log(field);
|
|
||||||
this.category = field.category;
|
this.category = field.category;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue