How to use named-urls - 10 common examples

To help you get started, we’ve selected a few named-urls 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 syndesisio / syndesis / app / ui-react / syndesis / src / modules / connections / routes.ts View on Github external
/* tslint:disable:object-literal-sort-keys */
import { include } from 'named-urls';

export default include('/connections', {
  connections: '',
  connection: include(':connectionId', {
    edit: 'edit',
    details: '',
  }),
  create: include('create', {
    selectConnector: 'connection-basics',
    configureConnector: ':connectorId/configure-fields',
    review: ':connectorId/review',
    root: '',
  }),
});
github syndesisio / syndesis / app / ui-react / syndesis / src / modules / integrations / components / editor / interfaces.tsx View on Github external
step: 'step',
  // if selected step kind is step
  extension: 'extension',
  // if selected step kind is endpoint
  connection: include('connection/:connectionId', {
    selectAction: '',
    configureAction: ':actionId/:step',
    // if 'any' data shape
    describeData: 'describe-data/:position/:direction',
  }),
};
/**
 * Both the integration creator and editor share the same routes when the creator
 * reaches the third step in the wizard. This object is to keep them DRY.
 */
export const editorRoutes = include(':flowId', {
  index: 'add-step',
  addStep: include(':position/add', stepRoutes),
  editStep: include(':position/edit', stepRoutes),
  saveAndPublish: 'save',
  root: '',
});
github syndesisio / syndesis / app / ui-react / syndesis / src / modules / integrations / components / editor / interfaces.ts View on Github external
editSpecification: 'edit-specification',
  }),
  // if selected step kind is data mapper
  dataMapper: 'mapper',
  // if selected step kind is basic filter
  basicFilter: 'filter',
  // if selected step kind is choice
  choice: 'choice',
  // if selected step kind is template
  template: 'template',
  // if selected step kind is step
  step: 'step',
  // if selected step kind is step
  extension: 'extension',
  // if selected step kind is endpoint
  connection: include('connection/:connectionId', {
    selectAction: '',
    configureAction: ':actionId/:page',
    // if 'any' data shape
    describeData: 'describe-data/:position/:direction',
  }),
};
/**
 * Both the integration creator and editor share the same routes when the creator
 * reaches the third step in the wizard. This object is to keep them DRY.
 */
export const editorRoutes = include('editor', {
  index: ':flowId/add-step',
  operations: 'operations',
  addStep: include(':flowId/:position/add', stepRoutes),
  editStep: include(':flowId/:position/edit', stepRoutes),
  saveAndPublish: 'save',
github syndesisio / syndesis / app / ui-react / syndesis / src / modules / connections / routes.ts View on Github external
/* tslint:disable:object-literal-sort-keys */
import { include } from 'named-urls';

export default include('/connections', {
  connections: '',
  connection: include(':connectionId', {
    edit: 'edit',
    details: '',
  }),
  create: include('create', {
    selectConnector: 'connection-basics',
    configureConnector: ':connectorId/configure-fields',
    review: ':connectorId/review',
    root: '',
  }),
});
github syndesisio / syndesis / app / ui-react / syndesis / src / modules / data / routes.ts View on Github external
import { include } from 'named-urls';

export default include('/data', {
  root: '',
  virtualizations: include('virtualizations', {
    create: 'create',
    import: 'import',
    list: '',
    virtualization: include(':virtualizationId', {
      metrics: 'metrics',
      root: '',
      sqlClient: 'sqlClient',
      versions: 'versions',
      views: include('views', {
        createView: include('createView', {
          root: '',
          selectName: 'selectName',
          selectSources: 'selectSources',
        }),
        edit: include(':viewDefinitionId', {
          criteria: 'criteria',
github syndesisio / syndesis / syndesis / src / modules / customizations / routes.ts View on Github external
import { include } from 'named-urls';

export default include('/customizations', {
  apiConnectors: include('api-connector', {
    apiConnector: ':apiConnectorId',
    create: include('create/swagger-connector', {
      review: 'review',
      save: 'save',
      security: 'security',
      upload: 'upload',
    }),
    list: '',
  }),
  extensions: include('extensions', {
    extension: include(':extensionId', {
      details: '',
      update: 'update',
    }),
    import: 'import',
    list: '',
  }),
  root: '',
});
github syndesisio / syndesis / app / ui-react / syndesis / src / modules / integrations / routes.ts View on Github external
export default include('/integrations', {
  list: '',
  manageCicd: include('manageCicd', { root: '' }),
  import: 'import',
  create: include('create', {
    start: include(':integrationId/start/:flowId/:position', stepRoutes),
    finish: include(':integrationId/finish/:flowId/:position', stepRoutes),
    configure: include(':integrationId/configure', editorRoutes),
    root: '',
  }),
  integration: include(':integrationId', {
    details: 'details',
    activity: 'activity',
    metrics: 'metrics',
    edit: include('edit', editorRoutes),
    root: '',
  }),
});
github syndesisio / syndesis / syndesis / src / modules / data / routes.ts View on Github external
import { include } from 'named-urls';

export default include('/data', {
  root: '',
  virtualizations: include('virtualizations', {
    create: 'create',
    import: 'import',
    list: '',
    virtualization: include(':virtualizationId', {
      metrics: 'metrics',
      relationship: 'relationship',
      root: '',
      sqlClient: 'sqlClient',
      views: 'views',
    }),
  }),
});
github CLOSER-Cohorts / archivist / react / src / routes.js View on Github external
import { include } from 'named-urls'

export default {
    login : '/login',
    datasets: include('/datasets', {
      all: ''
    }),
    admin: include('/admin/', {
      import: 'import',
      imports: include('imports/', {
        all: '',
        show: ':importId'
      }),
      instruments: include('instruments/', {
        all: '',
        exports: 'exports',
        importMappings: ':instrumentId/imports',
        importMapping: ':instrumentId/imports/:id'
      }),
      datasets: include('datasets/', {
        all: '',
        importMappings: ':datasetId/imports',
        importMapping: ':datasetId/imports/:id'
      }),
github CLOSER-Cohorts / archivist / react / src / routes.js View on Github external
build: include('build/', {
            show: '',
            ccConditions: 'ccConditions',
            ccLoops: 'ccLoops',
            ccQuestions: 'ccQuestions',
            ccSequences: 'ccSequences',
            ccStatements: 'ccStatements',
            constructs: include('constructs/', {
                show: ''
            }),
            codeLists: include('code_lists/', {
              all: '',
              show: ':codeListId',
              new: 'new'
            }),
            questionItems: include('question_items/', {
              all: '',
              show: ':questionItemId',
              new: 'new'
            }),
            questionGrids: include('question_grids/', {
              all: '',
              show: ':questionGridId',
              new: 'new'
            }),
            responseDomains: include('response_domains/', {
              all: '',
              new: 'new',
              show: ':responseDomainType/:responseDomainId',
            })
        })
      })

named-urls

Simple named url patterns in Javascript

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Popular named-urls functions

Similar packages