File size: 3,219 Bytes
d1ceb73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
  "title": "Application Context Menu",
  "description": "JupyterLab context menu settings.",
  "jupyter.lab.setting-icon-label": "Application Context Menu",
  "jupyter.lab.shortcuts": [],
  "jupyter.lab.transform": true,
  "properties": {
    "contextMenu": {
      "title": "The application context menu.",
      "description": "Note: To disable a context menu item,\ncopy it to User Preferences and add the\n\"disabled\" key. The following example will disable Download item on files:\n{\n  \"contextMenu\": [\n    {\n      \"command\": \"filebrowser:download\",\n      \"selector\": \".jp-DirListing-item[data-isdir=\\\"false\\\"]\",\n      \"disabled\": true\n    }\n  ]\n}\n\nContext menu description:",
      "items": {
        "allOf": [
          { "$ref": "#/definitions/menuItem" },
          {
            "properties": {
              "selector": {
                "description": "The CSS selector for the context menu item.",
                "type": "string"
              }
            }
          }
        ]
      },
      "type": "array",
      "default": []
    }
  },
  "additionalProperties": false,
  "definitions": {
    "menu": {
      "properties": {
        "disabled": {
          "description": "Whether the menu is disabled or not",
          "type": "boolean",
          "default": false
        },
        "icon": {
          "description": "Menu icon id",
          "type": "string"
        },
        "id": {
          "description": "Menu unique id",
          "type": "string",
          "pattern": "[a-z][a-z0-9\\-_]+"
        },
        "items": {
          "description": "Menu items",
          "type": "array",
          "items": {
            "$ref": "#/definitions/menuItem"
          }
        },
        "label": {
          "description": "Menu label",
          "type": "string"
        },
        "mnemonic": {
          "description": "Mnemonic index for the label",
          "type": "number",
          "minimum": -1,
          "default": -1
        },
        "rank": {
          "description": "Menu rank",
          "type": "number",
          "minimum": 0
        }
      },
      "required": ["id"],
      "additionalProperties": false,
      "type": "object"
    },
    "menuItem": {
      "properties": {
        "args": {
          "description": "Command arguments",
          "type": "object"
        },
        "command": {
          "description": "Command id",
          "type": "string"
        },
        "disabled": {
          "description": "Whether the item is disabled or not",
          "type": "boolean",
          "default": false
        },
        "type": {
          "description": "Item type",
          "type": "string",
          "enum": ["command", "submenu", "separator"],
          "default": "command"
        },
        "rank": {
          "description": "Item rank",
          "type": "number",
          "minimum": 0
        },
        "submenu": {
          "description": "Submenu definition",
          "oneOf": [
            {
              "$ref": "#/definitions/menu"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}