@uportal/portlet-registry-to-array
    TypeScript icon, indicating that this package has built-in type declarations

    1.37.0 • Public • Published

    Portlet Registry to Array

    NPM Version Maven Central Build Status

    A utility that flattens the portlet registry tree into an array

    Installation

    # install with npm
    npm install @uportal/portlet-registry-to-array
    
    # install with yarn
    yarn add @uportal/portlet-registry-to-array

    install with maven

    <dependency>
        <groupId>org.webjars.npm</groupId>
        <artifactId>uportal__portlet-registry-to-array</artifactId>
        <version>{version number goes here}</version>
    </dependency>

    install with gradle

    compile 'org.webjars.npm:uportal__portlet-registry-to-array:{version number goes here}'

    Usage

    import { portletRegistryToArray } from '@uportal/portlet-registry-to-array';
    
    // In production this would come over the network
    const exampleRegistry = {
      registry: {
        categories: [
          {
            name: 'All categories',
            description: 'All channel categories',
            id: 'local.1',
            portlets: [
              {
                fname: 'courses',
                keywords: [],
                averageRating: 0,
                name: 'Courses',
                description: 'Course links and announcements.',
                ratingsCount: 0,
                typeId: 8,
                id: 52,
                state: 'PUBLISHED',
                title: 'Courses',
                parameters: {
                  mobileIconUrl: {
                    name: 'mobileIconUrl',
                    description: '',
                    value: '/uPortal/media/skins/icons/mobile/courses_alt.png',
                  },
                  iconUrl: {
                    name: 'iconUrl',
                    description: '',
                    value:
                      '/ResourceServingWebapp/rs/tango/0.8.90/32x32/apps/accessories-text-editor.png',
                  },
                  configurable: {
                    name: 'configurable',
                    description: '',
                    value: 'true',
                  },
                },
              },
            ],
            subcategories: [],
          },
        ],
      },
    };
    
    const portletList = portletRegistryToArray(exampleRegistry);
    console.log(portletList);

    Install

    npm i @uportal/portlet-registry-to-array

    DownloadsWeekly Downloads

    2

    Version

    1.37.0

    License

    Apache-2.0

    Unpacked Size

    22.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • vertein
    • sibley
    • doug.reed
    • apetro
    • zeke.witter
    • christianmurphy
    • drewwills
    • bjagg
    • cbeach47
    • jgribonvald
    • nogalpaulina