How to use @alfresco/adf-extensions - 6 common examples

To help you get started, we’ve selected a few @alfresco/adf-extensions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Alfresco / alfresco-content-app / src / app / extensions / extension.service.ts View on Github external
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 };
  }
github Alfresco / alfresco-content-app / src / app / extensions / extension.service.ts View on Github external
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
            );
github Alfresco / alfresco-content-app / src / app / extensions / extension.service.ts View on Github external
.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, [])
github Alfresco / alfresco-ng2-components / demo-shell / src / app / app.module.ts View on Github external
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,
github Alfresco / alfresco-ng2-components / demo-shell / src / app / app.module.ts View on Github external
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,
github Alfresco / alfresco-ng2-components / lib / core / core.module.ts View on Github external
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,

@alfresco/adf-extensions

Provides extensibility support for ADF applications.

Apache-2.0
Latest version published 23 days ago

Package Health Score

87 / 100
Full package analysis