Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loadContentMetadata(config: ExtensionConfig): any {
const elements = this.loader.getElements(
config,
'features.content-metadata-presets'
);
let presets = {};
presets = this.filterDisabled(mergeObjects(presets, ...elements));
try {
this.appConfig.config['content-metadata'] = { presets };
} catch (error) {
console.error(
error,
'- could not change content-metadata from app.config -'
);
}
return { presets };
}
private buildMenu(actionRef: ContentActionRef): ContentActionRef {
if (
actionRef.type === ContentActionType.menu &&
actionRef.children &&
actionRef.children.length > 0
) {
const children = actionRef.children
.filter(action => this.filterByRules(action))
.map(action => this.buildMenu(action));
actionRef.children = children
.map(action => {
let disabled = false;
if (action.rules && action.rules.enabled) {
disabled = !this.extensions.evaluateRule(
action.rules.enabled,
this
);
.map(action => {
if (action.type === ContentActionType.menu) {
const copy = this.copyAction(action);
if (copy.children && copy.children.length > 0) {
copy.children = copy.children
.filter(childAction => this.filterByRules(childAction))
.reduce(reduceSeparators, []);
}
return copy;
}
return action;
})
.reduce(reduceEmptyMenus, [])
imports: [
BrowserModule,
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
ReactiveFormsModule,
routing,
FormsModule,
HttpClientModule,
MaterialModule,
AppExtensionsModule,
FlexLayoutModule,
CoreModule.forRoot(),
ContentModule.forRoot(),
InsightsModule.forRoot(),
ProcessModule.forRoot(),
ProcessServicesCloudModule,
ExtensionsModule.forRoot(),
ThemePickerModule,
ChartsModule,
AppCloudSharedModule,
MonacoEditorModule.forRoot()
],
declarations: [
AppComponent,
LogoutComponent,
AppLayoutComponent,
HomeComponent,
SearchBarComponent,
SearchResultComponent,
SearchExtendedComponent,
LogComponent,
ProcessServiceComponent,
ShowDiagramComponent,
imports: [
BrowserModule,
BrowserAnimationsModule,
ReactiveFormsModule,
routing,
FormsModule,
HttpClientModule,
MaterialModule,
AppExtensionsModule,
FlexLayoutModule,
CoreModule.forRoot(),
ContentModule.forRoot(),
InsightsModule.forRoot(),
ProcessModule.forRoot(),
ProcessServicesCloudModule,
ExtensionsModule.forRoot(),
ThemePickerModule,
ChartsModule,
MonacoEditorModule.forRoot()
],
declarations: [
AppComponent,
LoginComponent,
LogoutComponent,
AppLayoutComponent,
HomeComponent,
SearchBarComponent,
SearchResultComponent,
SearchExtendedComponent,
LogComponent,
ProcessServiceComponent,
ShowDiagramComponent,
import { AlfrescoApiService } from './services/alfresco-api.service';
import { TranslationService } from './services/translation.service';
import { startupServiceFactory } from './services/startup-service-factory';
import { SortingPickerModule } from './sorting-picker/sorting-picker.module';
import { IconModule } from './icon/icon.module';
import { TranslateLoaderService } from './services/translate-loader.service';
import { ExtensionsModule } from '@alfresco/adf-extensions';
import { directionalityConfigFactory } from './services/directionality-config-factory';
import { DirectionalityConfigService } from './services/directionality-config.service';
import { SearchTextModule } from './search-text/search-text-input.module';
@NgModule({
imports: [
TranslateModule,
ExtensionsModule.forChild(),
AboutModule,
ViewerModule,
SidenavLayoutModule,
PipeModule,
CommonModule,
DirectiveModule,
DialogModule,
FormsModule,
ReactiveFormsModule,
HostSettingsModule,
UserInfoModule,
MaterialModule,
AppConfigModule,
PaginationModule,
ToolbarModule,
ContextMenuModule,