import type { Collection } from './types' export const basic: Collection = { ids: ['1', '2', '3', '4'], entities: new Map( Object.entries({ 1: { id: '1', title: 'Zeta' }, 2: { id: '2', title: 'Gamma' }, 3: { id: '3', title: 'Alpha' }, 4: { id: '4', title: 'Beta' }, }) ), meta: new Map(), } export const tree: Collection = { ids: ['1', '3'], entities: new Map( Object.entries({ 1: { id: '1', title: 'Zeta', }, 2: { id: '2', title: 'Gamma' }, 3: { id: '3', title: 'Alpha', }, 4: { id: '4', title: 'Beta' }, }) ), meta: new Map( Object.entries({ 1: { type: 'tree', children: ['2'] }, 3: { type: 'tree', children: ['4'] }, }) ), } export const group: Collection = { ids: ['group-1', 'group-2'], entities: new Map( Object.entries({ 1: { id: '1', title: 'Zeta' }, 2: { id: '2', title: 'Gamma' }, 3: { id: '3', title: 'Alpha' }, 4: { id: '4', title: 'Beta' }, 'group-1': { id: 'group-1', }, 'group-2': { id: 'group-2', }, }) ), meta: new Map( Object.entries({ 'group-1': { type: 'group', groupLabel: 'Basic', children: ['1', '4'], }, 'group-2': { type: 'group', groupLabel: 'Advanced', children: ['2', '3'], }, }) ), } export const groupedTree: Collection = { ids: ['group-1', 'group-2'], entities: new Map( Object.entries({ 1: { id: '1', title: 'Zeta', }, 2: { id: '2', title: 'Gamma' }, 3: { id: '3', title: 'Alpha', }, 4: { id: '4', title: 'Beta' }, 'group-1': { id: 'group-1', }, 'group-2': { id: 'group-2', }, }) ), meta: new Map( Object.entries({ 1: { type: 'tree', children: ['2'] }, 3: { type: 'tree', children: ['4'] }, 'group-1': { type: 'group', groupLabel: 'Basic', children: ['1'], }, 'group-2': { type: 'group', groupLabel: 'Advanced', children: ['3'], }, }) ), }