File

libs/nx/src/generators/journey-src/lib/vertical-spacing/vertical-spacing.ts

Index

Properties

Properties

dasherizedName
Type string
destinationDirectory
Type string
expert (Optional)
Type boolean
hasCompactBb (Optional)
Type boolean
hasSectionHeadline (Optional)
Type boolean
hasSectionWithDividerLine (Optional)
Type boolean
hasStage (Optional)
Type boolean
notifications (Optional)
Type literal type
overarchingDetails (Optional)
Type OverarchingDetailsBlockConfiguration
runtimeMode (Optional)
Type boolean
title (Optional)
Type string
useNewVerticalSpacing (Optional)
Type boolean
import {
  BaseNotificationConfig,
  ErrorNotificationConfig,
  OverarchingDetailsBlockConfiguration
} from '@allianz/taly-core/schemas';
import { generateFiles, joinPathFragments, Tree } from '@nx/devkit';

interface VerticalSpacingOptions {
  destinationDirectory: string;
  dasherizedName: string;
  hasSectionWithDividerLine?: boolean;
  useNewVerticalSpacing?: boolean;
  hasStage?: boolean;
  hasSectionHeadline?: boolean;
  hasCompactBb?: boolean;
  overarchingDetails?: OverarchingDetailsBlockConfiguration;
  runtimeMode?: boolean;
  expert?: boolean;
  title?: string;
  notifications?: {
    errors: ErrorNotificationConfig[];
    others: BaseNotificationConfig[];
    stateKeyJsonPathExpressions: string[];
  };
}

export function generateVerticalSpacingFiles(tree: Tree, options: VerticalSpacingOptions) {
  generateFiles(tree, joinPathFragments(__dirname, 'files'), options.destinationDirectory, {
    dasherizedName: options.dasherizedName,
    hasSectionWithDividerLine: options.hasSectionWithDividerLine ?? false,
    useNewVerticalSpacing: options.useNewVerticalSpacing ?? false,
    hasStage: options.hasStage ?? false,
    hasSectionHeadline: options.hasSectionHeadline ?? false,
    hasCompactBb: options.hasCompactBb ?? false,
    overarchingDetails: options.overarchingDetails ?? false,
    runtimeMode: options.runtimeMode ?? false,
    expert: options.expert ?? false,
    title: options.title ?? '',
    notifications: options.notifications ?? {
      errors: [],
      others: [],
      stateKeyJsonPathExpressions: []
    }
  });
}

results matching ""

    No results matching ""