src/app/view-config-utils.js
/**
 * Assign unique ids for view definitions where
 * they are missing a value for the uid property
 * in layout[].uid.
 * @param {object} config The view config
 * @returns The updated view config.
 */
Assign unique ids for view definitions where
they are missing a value for the uid property
in layout[].uid.
@param {object} config The view config
@returns The updated view config.
Assign unique ids for view definitions where they are missing a value for the uid property in layout [] . uid . @param { object } config The view config @returns The updated view config .
function assignViewUids(config) {
  const { layout } = config;
  const usedIds = layout.map(view => view.uid);
  layout.forEach((view, i) => {
    if (!view.uid) {
      const nextUid = getNextScope(usedIds);
      layout[i].uid = nextUid;
      usedIds.push(nextUid);
    }
  });
  return {
    ...config,
    layout,
  };
}
function assignViewUids ( config ) { const { layout } = config ; const usedIds = layout . map ( view => view . uid ) ; layout . forEach ( ( view , i ) => { if ( ! view . uid ) { const nextUid = getNextScope ( usedIds ) ; layout [ i ] . uid = nextUid ; usedIds . push ( nextUid ) ; } } ) ; return { ... config , layout , } ; }
Assign unique ids for view definitions where
 they are missing a value for the uid property
 in layout[].uid.
Assign unique ids for view definitions where they are missing a value for the uid property in layout [] . uid .
// Assign uids for views where they are not present.