1.40.2 • Published 2 years ago

@uportal/portlet-registry-to-array v1.40.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

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);
1.40.0

2 years ago

1.40.2

2 years ago

1.40.1

2 years ago

1.39.0

2 years ago

1.38.1

2 years ago

1.37.0

4 years ago

1.36.0

5 years ago

1.35.0

5 years ago

1.34.3

5 years ago

1.34.2

5 years ago

1.34.1

5 years ago

1.34.0

5 years ago

1.33.2

6 years ago

1.33.1

6 years ago

1.33.0

6 years ago

1.32.1

6 years ago

1.32.0

6 years ago

1.31.1

6 years ago

1.31.0

6 years ago

1.30.1

6 years ago

1.30.0

6 years ago

1.29.0

6 years ago

1.28.0

6 years ago

1.27.0

6 years ago

1.26.2

6 years ago

1.26.1

6 years ago

1.26.0

6 years ago

1.25.0

6 years ago

1.24.0

6 years ago

1.23.0

6 years ago

1.22.1

6 years ago

1.22.0

6 years ago

1.21.2

7 years ago

1.21.1

7 years ago

1.21.0

7 years ago

1.20.0

7 years ago

1.19.1

7 years ago

1.19.0

7 years ago

1.18.2

7 years ago

1.18.1

7 years ago

1.18.0

7 years ago

1.17.0

7 years ago

1.16.2

7 years ago

1.16.1

7 years ago

1.16.0

7 years ago

1.15.0

7 years ago

1.14.2

7 years ago

1.14.1

7 years ago

1.14.0

7 years ago

1.13.7

7 years ago

1.13.6

7 years ago

1.13.5

7 years ago

1.13.4

7 years ago

1.13.3

7 years ago

1.13.2

7 years ago

1.12.1

7 years ago

1.12.0

7 years ago

1.11.0

7 years ago

1.10.1

7 years ago

1.9.1

7 years ago

1.8.0

7 years ago

1.7.4

7 years ago

1.7.2

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago