Welcome to mirror list, hosted at ThFree Co, Russian Federation.

state.js « stores « list « packages « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 18ab2390b871016516d12e7c17dac837dbc8559d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { PACKAGE_REGISTRY_TABS } from '../constants';

export default () => ({
  /**
   * Determine if the component is loading data from the API
   */
  isLoading: false,
  /**
   * configuration object, set once at store creation with the following structure
   * {
   *  resourceId: String,
   *  pageType: String,
   *  emptyListIllustration: String,
   *  emptyListHelpUrl: String,
   *  comingSoon: { projectPath: String, suggestedContributions : String } | null;
   * }
   */
  config: {},
  /**
   * Each object in `packages` has the following structure:
   * {
   *   id: String
   *   name: String,
   *   version: String,
   *   package_type: String // endpoint to request the list
   * }
   */
  packages: [],
  /**
   * Pagination object has the following structure:
   * {
   *  perPage: Number,
   *  page: Number
   *  total: Number
   * }
   */
  pagination: {},
  /**
   * Sorting object has the following structure:
   * {
   *  sort: String,
   *  orderBy: String
   * }
   */
  sorting: {
    sort: 'desc',
    orderBy: 'created_at',
  },
  /**
   * The search query that is used to filter packages by name
   */
  filterQuery: '',
  /**
   * The selected TAB of the package types tabs
   */
  selectedType: PACKAGE_REGISTRY_TABS[0],
});